Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

update config and colors from figma

Jonathan Summers-Muir276bb1ffd357
diff --git a/packages/config/tailwind-shadcn.config.js b/packages/config/tailwind-shadcn.config.js
deleted file mode 100644
index 0377ea1ded1..00000000000
--- a/packages/config/tailwind-shadcn.config.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/** @type {import('tailwindcss').Config} */
-module.exports = {
- darkMode: ["class"],
- content: [
- './pages/**/*.{ts,tsx}',
- './components/**/*.{ts,tsx}',
- './app/**/*.{ts,tsx}',
- './src/**/*.{ts,tsx}',
- ],
- theme: {
- container: {
- center: true,
- padding: "2rem",
- screens: {
- "2xl": "1400px",
- },
- },
- extend: {
- colors: {
- border: "hsl(var(--border))",
- input: "hsl(var(--input))",
- ring: "hsl(var(--ring))",
- background: "hsl(var(--background))",
- foreground: "hsl(var(--foreground))",
- primary: {
- DEFAULT: "hsl(var(--primary))",
- foreground: "hsl(var(--primary-foreground))",
- },
- secondary: {
- DEFAULT: "hsl(var(--secondary))",
- foreground: "hsl(var(--secondary-foreground))",
- },
- destructive: {
- DEFAULT: "hsl(var(--destructive))",
- foreground: "hsl(var(--destructive-foreground))",
- },
- muted: {
- DEFAULT: "hsl(var(--muted))",
- foreground: "hsl(var(--muted-foreground))",
- },
- accent: {
- DEFAULT: "hsl(var(--accent))",
- foreground: "hsl(var(--accent-foreground))",
- },
- popover: {
- DEFAULT: "hsl(var(--popover))",
- foreground: "hsl(var(--popover-foreground))",
- },
- card: {
- DEFAULT: "hsl(var(--card))",
- foreground: "hsl(var(--card-foreground))",
- },
- },
- borderRadius: {
- lg: "var(--radius)",
- md: "calc(var(--radius) - 2px)",
- sm: "calc(var(--radius) - 4px)",
- },
- keyframes: {
- "accordion-down": {
- from: { height: 0 },
- to: { height: "var(--radix-accordion-content-height)" },
- },
- "accordion-up": {
- from: { height: "var(--radix-accordion-content-height)" },
- to: { height: 0 },
- },
- },
- animation: {
- "accordion-down": "accordion-down 0.2s ease-out",
- "accordion-up": "accordion-up 0.2s ease-out",
- },
- },
- },
- plugins: [require("tailwindcss-animate")],
-}
\ No newline at end of file
diff --git a/packages/config/tailwind.config.js b/packages/config/tailwind.config.js
index 49c3ee3a3e8..f24c57a4d22 100644
--- a/packages/config/tailwind.config.js
+++ b/packages/config/tailwind.config.js
@@ -12,7 +12,7 @@ Object.values(color).map((x, i) => {
})
console.log('colorExtend', colorExtend)
-console.log('colorExtend', kebabToNested(colorExtend))
+console.log('colorExtend kebabToNested', kebabToNested(colorExtend))
// console.log('colorExtend', kebabToNested(colorExtend).colors.gray)
diff --git a/packages/ui/.storybook/preview.css b/packages/ui/.storybook/preview.css
index ca8e28a9a0f..17d7c1c3725 100644
--- a/packages/ui/.storybook/preview.css
+++ b/packages/ui/.storybook/preview.css
@@ -76,10 +76,10 @@
/* * {
@apply border-border;
} */
- body {
+ /* body {
@apply bg-background text-foreground;
font-feature-settings: 'rlig' 1, 'calt' 1;
- }
+ } */
}
@layer utilities {
@@ -101,11 +101,8 @@
}
@layer base {
- /* * {
- @apply border-border;
- } */
body {
- @apply bg-background text-foreground;
+ @apply bg text;
font-feature-settings: 'rlig' 1, 'calt' 1;
font-family: 'Circular std';
}
@@ -115,6 +112,7 @@
.light,
.light .docs-story,
.dark .docs-story {
- @apply bg-background;
+ @apply bg text;
+ font-feature-settings: 'rlig' 1, 'calt' 1;
font-family: 'Circular std';
}
diff --git a/packages/ui/build/css/source/global.css b/packages/ui/build/css/source/global.css
index c0c6f8093c1..a925e02fbb3 100644
--- a/packages/ui/build/css/source/global.css
+++ b/packages/ui/build/css/source/global.css
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed, 05 Jul 2023 17:41:31 GMT
+ * Generated on Thu, 13 Jul 2023 04:13:59 GMT
*/
:root {
diff --git a/packages/ui/build/css/themes/dark.css b/packages/ui/build/css/themes/dark.css
index 90fcbfa6709..5b0ebe9c228 100644
--- a/packages/ui/build/css/themes/dark.css
+++ b/packages/ui/build/css/themes/dark.css
@@ -1,10 +1,10 @@
/**
* Do not edit directly
- * Generated on Wed, 05 Jul 2023 17:41:32 GMT
+ * Generated on Thu, 13 Jul 2023 04:13:59 GMT
*/
.dark {
- --brand-primary: 152.9deg 60% 52.9%;
+ --brand-default: 152.9deg 60% 52.9%;
--brand-400: 153.6deg 41% 12%;
--brand-300: 152.7deg 48.5% 26.7%;
--brand-200: 148.5deg 43.5% 82%;
@@ -13,6 +13,8 @@
--warning-300: 35.8deg 82.6% 13.5%;
--warning-200: 38.8deg 97.4% 69.8%;
--destructive-default: 358.1deg 75.1% 59%;
+ --destructive-border: 356.9deg 60.5% 31.8%;
+ --destructive-background: 350deg 24% 9.8%;
--destructive-400: 0deg 0% 8.6%;
--destructive-300: 0deg 40.8% 19.2%;
--destructive-200: 0deg 97% 74.1%;
@@ -22,7 +24,7 @@
--border-overlay: var(--colors-gray-dark-400);
--border-secondary: var(--colors-gray-dark-400);
--border-muted: var(--colors-gray-dark-400);
- --border-default: var(--colors-gray-dark-400);
+ --border-default: var(--colors-gray-dark-500);
--background-overlay-hover: var(--colors-gray-dark-500);
--background-overlay-default: var(--colors-gray-dark-300);
--background-surface-300: var(--colors-gray-dark-500);
diff --git a/packages/ui/build/css/themes/light.css b/packages/ui/build/css/themes/light.css
index 7c1b2397069..b98998b02a0 100644
--- a/packages/ui/build/css/themes/light.css
+++ b/packages/ui/build/css/themes/light.css
@@ -1,37 +1,41 @@
/**
* Do not edit directly
- * Generated on Wed, 05 Jul 2023 17:41:32 GMT
+ * Generated on Thu, 13 Jul 2023 04:13:59 GMT
*/
.light {
--brand-primary: 152.9deg 60% 52.9%;
- --brand-400: 153.6deg 41% 12%;
- --brand-300: 152.7deg 48.5% 26.7%;
+ --brand-400: 153.7deg 68.7% 83.7%;
+ --brand-300: 153deg 46% 65.9%;
--brand-200: 148.5deg 43.5% 82%;
--warning-default: 38.9deg 100% 57.1%;
--warning-400: 38.7deg 100% 93.9%;
--warning-300: 38.6deg 100% 89%;
--warning-200: 39deg 100% 75.3%;
--destructive-default: 0deg 100% 50%;
+ --destructive-background: 0deg 100% 98.4%;
+ --destructive-border: 0deg 100% 87.5%;
--destructive-400: 0deg 100% 98.4%;
--destructive-300: 0deg 100% 87.5%;
--destructive-200: 0deg 97% 74.1%;
--background-alternative: 0deg 0% 100%;
--background-muted: 0deg 0% 100%;
--background-secondary: 0deg 0% 100%;
- --foreground-muted: 0deg 0% 100%;
+ --border-control: var(--colors-slate-light-600);
--border-alternative: var(--colors-slate-light-500);
--border-overlay: var(--colors-slate-light-500);
--border-secondary: var(--colors-gray-dark-400);
--border-muted: var(--colors-gray-dark-400);
- --border-default: var(--colors-gray-dark-400);
+ --border-default: var(--colors-slate-light-500);
--background-overlay-hover: var(--colors-slate-light-300);
--background-overlay-default: var(--colors-slate-light-100);
- --background-surface-300: var(--colors-slate-light-300);
- --background-surface-200: var(--colors-slate-light-200);
+ --background-surface-300: var(--colors-slate-light-400);
+ --background-surface-200: var(--colors-slate-light-300);
--background-surface-100: var(--colors-slate-light-100);
+ --background-control: var(--colors-slate-light-300);
--background-selection: var(--colors-gray-light-400);
- --background-default: var(--colors-slate-light-100);
+ --background-default: var(--colors-slate-light-200);
+ --foreground-muted: var(--colors-slate-light-800);
--foreground-lighter: var(--colors-slate-light-1000);
--foreground-light: var(--colors-slate-light-1100);
--foreground-strong: var(--colors-slate-light-1200);
diff --git a/packages/ui/build/css/tw-extend/color.js b/packages/ui/build/css/tw-extend/color.js
index 76ceea9e27a..54f797f6294 100644
--- a/packages/ui/build/css/tw-extend/color.js
+++ b/packages/ui/build/css/tw-extend/color.js
@@ -457,7 +457,7 @@ module.exports = {
},
"border-DEFAULT": {
cssVariable: "var(--border-default)",
- value: "hsl(0, 0%, 15.7%)"
+ value: "hsl(0, 0%, 18%)"
},
"border-muted": {
cssVariable: "var(--border-muted)",
@@ -491,6 +491,14 @@ module.exports = {
cssVariable: "var(--destructive-400)",
value: "hsl(0, 0%, 8.6%)"
},
+"destructive-background": {
+ cssVariable: "var(--destructive-background)",
+ value: "hsl(350, 24%, 9.8%)"
+},
+"destructive-border": {
+ cssVariable: "var(--destructive-border)",
+ value: "hsl(356.9, 60.5%, 31.8%)"
+},
"destructive-DEFAULT": {
cssVariable: "var(--destructive-default)",
value: "hsl(358.1, 75.1%, 59%)"
@@ -523,8 +531,8 @@ module.exports = {
cssVariable: "var(--brand-400)",
value: "hsl(153.60000000000002, 41%, 12%)"
},
-"brand-PRIMARY": {
- cssVariable: "var(--brand-primary)",
+"brand-DEFAULT": {
+ cssVariable: "var(--brand-default)",
value: "hsl(152.89999999999998, 60%, 52.9%)"
}
}
\ No newline at end of file
diff --git a/packages/ui/src/components/shadcn/ui/alert.tsx b/packages/ui/src/components/shadcn/ui/alert.tsx
index 87abd7f973a..d68d34eb947 100644
--- a/packages/ui/src/components/shadcn/ui/alert.tsx
+++ b/packages/ui/src/components/shadcn/ui/alert.tsx
@@ -14,9 +14,9 @@ const alertVariants = cva(
default:
'text-foreground bg-alternative border-alternative [&>svg]:text-background [&>svg]:bg-foreground-strong',
destructive:
- 'text-destructive border-destructive-300 bg-destructive-400 [&>svg]:text-destructive-400 [&>svg]:bg-destructive',
+ 'text-destructive-100 dark:text-destructive border-destructive-300 bg-destructive-400 [&>svg]:text-destructive-400 [&>svg]:bg-destructive',
warning:
- 'text-warning border-warning-300 bg-warning-400 [&>svg]:text-warning-400 [&>svg]:bg-warning',
+ 'text-warning-100 dark:text-warning border-warning-300 bg-warning-400 [&>svg]:text-warning-400 [&>svg]:bg-warning',
},
},
defaultVariants: {
diff --git a/packages/ui/src/lib/tailwind-demo-classes.ts b/packages/ui/src/lib/tailwind-demo-classes.ts
index 09a233d7953..f5833fa183b 100644
--- a/packages/ui/src/lib/tailwind-demo-classes.ts
+++ b/packages/ui/src/lib/tailwind-demo-classes.ts
@@ -29,6 +29,8 @@ export default {
"bg-destructive-200",
"bg-destructive-300",
"bg-destructive-400",
+ "bg-destructive-bg",
+ "bg-destructive-border",
"bg-destructive",
"bg-warning-200",
"bg-warning-300",
@@ -37,7 +39,7 @@ export default {
"bg-brand-200",
"bg-brand-300",
"bg-brand-400",
- "bg-brand-primary"
+ "bg-brand"
],
"palletes": [
"bg-black",
diff --git a/packages/ui/tailwind.config.js b/packages/ui/tailwind.config.js
index 4c4b14ec252..ceed2515361 100644
--- a/packages/ui/tailwind.config.js
+++ b/packages/ui/tailwind.config.js
@@ -2,17 +2,7 @@ const config = require('config/tailwind.config')
const { fontFamily } = require('tailwindcss/defaultTheme')
module.exports = config({
- content: [
- // '../../packages/common/**/*.{ts,tsx}',
- '../../packages/ui/**/*.{tsx,ts,js}',
- '../../packages/ui/**/*.*.{tsx,ts,js}',
- // './pages/**/*.{tsx,mdx}',
- // './components/**/*.tsx',
- // './layouts/**/*.tsx',
- // './src/**/*.{ts,tsx,mdx}',
- // './_blog/*.mdx',
- // '../../packages/ui/**/*.stories.{tsx,ts,js}',
- ],
+ content: ['../../packages/ui/**/*.{tsx,ts,js}', '../../packages/ui/**/*.*.{tsx,ts,js}'],
theme: {
container: {
center: true,