diff --git a/apps/design-system/components/code-fragment.tsx b/apps/design-system/components/code-fragment.tsx index ccf33703720..4eeb7ee7c7c 100644 --- a/apps/design-system/components/code-fragment.tsx +++ b/apps/design-system/components/code-fragment.tsx @@ -94,10 +94,10 @@ export function CodeFragment({ )} > {showGrid && ( -
+
)} {showDottedGrid && ( -
+
)}
{ComponentPreview}
diff --git a/apps/design-system/components/component-preview.tsx b/apps/design-system/components/component-preview.tsx index 8689633cf91..04a5fc30ee1 100644 --- a/apps/design-system/components/component-preview.tsx +++ b/apps/design-system/components/component-preview.tsx @@ -101,10 +101,10 @@ export function ComponentPreview({ )} > {showGrid && ( -
+
)} {showDottedGrid && ( -
+
)}
{ComponentPreview}
{/*
*/} @@ -146,10 +146,10 @@ export function ComponentPreview({ })} > {showGrid && ( -
+
)} {showDottedGrid && ( -
+
)}
{ComponentPreview}
diff --git a/apps/design-system/registry/default/example/drawer-demo.tsx b/apps/design-system/registry/default/example/drawer-demo.tsx index 22ce3dd8566..1208680a3d0 100644 --- a/apps/design-system/registry/default/example/drawer-demo.tsx +++ b/apps/design-system/registry/default/example/drawer-demo.tsx @@ -111,7 +111,7 @@ export default function DrawerDemo() { dataKey="goal" style={ { - fill: 'hsl(var(--foreground-default))', + fill: 'var(--foreground-default)', opacity: 0.9, } as React.CSSProperties } diff --git a/apps/design-system/registry/default/example/page-layout-edge-function.tsx b/apps/design-system/registry/default/example/page-layout-edge-function.tsx index 1a9aeeaa5bc..4377bee9ec1 100644 --- a/apps/design-system/registry/default/example/page-layout-edge-function.tsx +++ b/apps/design-system/registry/default/example/page-layout-edge-function.tsx @@ -150,7 +150,7 @@ const buildMockChartData = (intervalKey: string) => { const EXECUTION_TIME_CHART_CONFIG = { avg_execution_time: { label: 'Average Execution Time', - color: 'hsl(var(--foreground-default))', + color: 'var(--foreground-default)', }, max_execution_time: { label: 'Max Execution Time', @@ -485,7 +485,7 @@ function OverviewPage() { { y: averageExecutionTime, label: 'average', - stroke: 'hsl(var(--foreground-default))', + stroke: 'var(--foreground-default)', strokeWidth: 1.5, }, ]} @@ -538,7 +538,7 @@ function OverviewPage() { { y: averageCpuTime, label: 'average', - stroke: 'hsl(var(--foreground-default))', + stroke: 'var(--foreground-default)', strokeWidth: 1.5, }, ]} @@ -589,7 +589,7 @@ function OverviewPage() { { y: averageMemoryUsage, label: 'average', - stroke: 'hsl(var(--foreground-default))', + stroke: 'var(--foreground-default)', strokeWidth: 1.5, }, ]} diff --git a/apps/design-system/styles/code-block-variables.css b/apps/design-system/styles/code-block-variables.css index f1054071748..f12e15fb992 100644 --- a/apps/design-system/styles/code-block-variables.css +++ b/apps/design-system/styles/code-block-variables.css @@ -18,16 +18,16 @@ [data-theme='light'], .light { --code-token-keyword: #6b35dc; - --code-foreground: hsl(var(--foreground-light) / 1); + --code-foreground: oklch(from var(--foreground-light) l c h / 1); --code-token-constant: #15593b; --code-token-string: #f1a10d; --code-token-comment: #7e7e7e; - --code-token-parameter: hsl(var(--foreground-light) / 1); + --code-token-parameter: oklch(from var(--foreground-light) l c h / 1); --code-token-function: #15593b; --code-token-string-expression: #f1a10d; - --code-token-punctuation: hsl(var(--foreground-light) / 1); - --code-token-link: hsl(var(--foreground-light) / 1); - --code-token-number: hsl(var(--foreground-light) / 1); + --code-token-punctuation: oklch(from var(--foreground-light) l c h / 1); + --code-token-link: oklch(from var(--foreground-light) l c h / 1); + --code-token-number: oklch(from var(--foreground-light) l c h / 1); --code-token-property: #15593b; --code-highlight-color: #1c1c1c; } diff --git a/apps/docs/components/DocsCoverLogo.tsx b/apps/docs/components/DocsCoverLogo.tsx index 8a66b35ea13..3b56575513f 100644 --- a/apps/docs/components/DocsCoverLogo.tsx +++ b/apps/docs/components/DocsCoverLogo.tsx @@ -1,7 +1,7 @@ 'use client' +import { domAnimation, LazyMotion, m } from 'framer-motion' import React, { type PropsWithChildren } from 'react' -import { LazyMotion, domAnimation, m } from 'framer-motion' const DocsCoverLogo = (props: PropsWithChildren) => { const pathMotionConfig = { @@ -47,7 +47,7 @@ const DocsCoverLogo = (props: PropsWithChildren) => { animate={pathMotionConfig.animate} transition={pathMotionConfig.transition as any} d="M125.25 191.383C167.828 191.383 202.344 156.867 202.344 114.289C202.344 71.7115 167.828 37.1953 125.25 37.1953C82.6724 37.1953 48.1562 71.7115 48.1562 114.289C48.1562 156.867 82.6724 191.383 125.25 191.383Z" - stroke="hsl(var(--foreground-light))" + stroke="var(--foreground-light)" strokeOpacity="0.1" strokeWidth="0.7" strokeMiterlimit="10" @@ -215,7 +215,7 @@ const DocsCoverLogo = (props: PropsWithChildren) => { animate={pathMotionConfig.animate} transition={pathMotionConfig.transition as any} d="M218.024 169.846H32.498" - stroke="hsl(var(--foreground-light))" + stroke="var(--foreground-light)" strokeOpacity="0.1" strokeWidth="0.7" strokeMiterlimit="10" @@ -291,8 +291,8 @@ const DocsCoverLogo = (props: PropsWithChildren) => { gradientUnits="userSpaceOnUse" gradientTransform="translate(125.451 114.82) rotate(90) scale(109.781 0.5)" > - - + + { y2="11.9994" gradientUnits="userSpaceOnUse" > - - + + { y2="204.984" gradientUnits="userSpaceOnUse" > - - + + { y2="13.9993" gradientUnits="userSpaceOnUse" > - - + + { y2="204.984" gradientUnits="userSpaceOnUse" > - - + + { y2="-7.94661" gradientUnits="userSpaceOnUse" > - - - + + + { y2="-3.99932" gradientUnits="userSpaceOnUse" > - - - + + + { y2="199.061" gradientUnits="userSpaceOnUse" > - - - + + + { gradientUnits="userSpaceOnUse" gradientTransform="translate(125.752 114.291) rotate(90) scale(109.271 0.5)" > - - + + { y2="6.31757" gradientUnits="userSpaceOnUse" > - - + + { y2="200" gradientUnits="userSpaceOnUse" > - - + + { y2="199.061" gradientUnits="userSpaceOnUse" > - - - + + + { gradientUnits="userSpaceOnUse" gradientTransform="translate(125.261 59.2344) rotate(90) scale(0.5 263.749)" > - - + + { y2="94.9749" gradientUnits="userSpaceOnUse" > - - - + + + { y2="131.43" gradientUnits="userSpaceOnUse" > - - - + + + { y2="1.99785" gradientUnits="userSpaceOnUse" > - - - + + + { const GlobalNavigationMenu: FC = () => { const activeLabel = useActiveMenuLabel(GLOBAL_MENU_ITEMS) const triggerClassName = - 'h-(--header-height) p-2 bg-transparent border-0 border-b-2 border-transparent font-normal rounded-none text-foreground-light hover:text-foreground data-open:text-foreground! data-radix-collection-item:focus-visible:ring-2 data-radix-collection-item:focus-visible:ring-foreground-lighter data-radix-collection-item:focus-visible:text-foreground h-full focus-visible:rounded-sm shadow-none! outline-hidden transition-all outline-0 focus-visible:outline-4 focus-visible:outline-offset-1 focus-visible:outline-brand-600' + 'h-(--header-height) p-2 bg-transparent border-0 border-b-2 border-transparent font-normal rounded-none text-foreground-light hover:bg-transparent hover:text-foreground data-open:bg-transparent! data-open:text-foreground! data-radix-collection-item:focus-visible:ring-2 data-radix-collection-item:focus-visible:ring-foreground-lighter data-radix-collection-item:focus-visible:text-foreground h-full focus-visible:rounded-sm shadow-none! outline-hidden transition-all outline-0 focus-visible:outline-4 focus-visible:outline-offset-1 focus-visible:outline-brand-600' return (
diff --git a/apps/docs/content/guides/auth/passwords.mdx b/apps/docs/content/guides/auth/passwords.mdx index 4548d785ba8..d466c02e9e5 100644 --- a/apps/docs/content/guides/auth/passwords.mdx +++ b/apps/docs/content/guides/auth/passwords.mdx @@ -28,9 +28,10 @@ The instructions in this section assume that email confirmations are enabled. stickyTabList={{ style: { top: 'var(--header-height)', - backgroundColor: 'hsl(var(--background-default) / var(--tw-bg-opacity))', + backgroundColor: + 'oklch(from var(--background-default) l c h / var(--tw-bg-opacity))', maskImage: 'none', - borderBottom: '1px solid hsl(var(--border-default) / 1)', + borderBottom: '1px solid oklch(from var(--border-default) l c h / 1)', } }} size="large" diff --git a/apps/docs/styles/globals.css b/apps/docs/styles/globals.css index a7f2386c79a..b9cdc543d93 100644 --- a/apps/docs/styles/globals.css +++ b/apps/docs/styles/globals.css @@ -46,7 +46,7 @@ ::before, ::backdrop, ::file-selector-button { - border-color: hsl(var(--border-default, currentColor)); + border-color: var(--border-default, currentColor); } code, @@ -399,7 +399,7 @@ th code { transition-timing-function: cubic-bezier(0.24, 0.25, 0.05, 1) !important; } [data-rmiz-modal-overlay='visible'] { - background-color: hsl(var(--background-default)) !important; + background-color: var(--background-default) !important; opacity: 0.8; } [data-rmiz-modal-img] { @@ -431,16 +431,16 @@ th code { [data-theme='light'], .light { --code-token-keyword: #6b35dc; - --code-foreground: hsl(var(--foreground-light) / 1); + --code-foreground: oklch(from var(--foreground-light) l c h / 1); --code-token-constant: #15593b; --code-token-string: #f1a10d; --code-token-comment: #7e7e7e; - --code-token-parameter: hsl(var(--foreground-light) / 1); + --code-token-parameter: oklch(from var(--foreground-light) l c h / 1); --code-token-function: #15593b; --code-token-string-expression: #f1a10d; - --code-token-punctuation: hsl(var(--foreground-light) / 1); - --code-token-link: hsl(var(--foreground-light) / 1); - --code-token-number: hsl(var(--foreground-light) / 1); + --code-token-punctuation: oklch(from var(--foreground-light) l c h / 1); + --code-token-link: oklch(from var(--foreground-light) l c h / 1); + --code-token-number: oklch(from var(--foreground-light) l c h / 1); --code-token-property: #15593b; --code-highlight-color: #1c1c1c; } diff --git a/apps/learn/styles/code-block-variables.css b/apps/learn/styles/code-block-variables.css index f1054071748..f12e15fb992 100644 --- a/apps/learn/styles/code-block-variables.css +++ b/apps/learn/styles/code-block-variables.css @@ -18,16 +18,16 @@ [data-theme='light'], .light { --code-token-keyword: #6b35dc; - --code-foreground: hsl(var(--foreground-light) / 1); + --code-foreground: oklch(from var(--foreground-light) l c h / 1); --code-token-constant: #15593b; --code-token-string: #f1a10d; --code-token-comment: #7e7e7e; - --code-token-parameter: hsl(var(--foreground-light) / 1); + --code-token-parameter: oklch(from var(--foreground-light) l c h / 1); --code-token-function: #15593b; --code-token-string-expression: #f1a10d; - --code-token-punctuation: hsl(var(--foreground-light) / 1); - --code-token-link: hsl(var(--foreground-light) / 1); - --code-token-number: hsl(var(--foreground-light) / 1); + --code-token-punctuation: oklch(from var(--foreground-light) l c h / 1); + --code-token-link: oklch(from var(--foreground-light) l c h / 1); + --code-token-number: oklch(from var(--foreground-light) l c h / 1); --code-token-property: #15593b; --code-highlight-color: #1c1c1c; } diff --git a/apps/learn/styles/globals.css b/apps/learn/styles/globals.css index 84065d57ffa..1478d871f62 100644 --- a/apps/learn/styles/globals.css +++ b/apps/learn/styles/globals.css @@ -11,25 +11,25 @@ --radius-lg: var(--radius); --radius-md: calc(var(--radius) - 2px); --radius-sm: calc(var(--radius) - 4px); - --color-background: hsl(var(--background)); - --color-foreground: hsl(var(--foreground)); - --color-card: hsl(var(--card)); - --color-card-foreground: hsl(var(--card-foreground)); - --color-popover: hsl(var(--popover)); - --color-popover-foreground: hsl(var(--popover-foreground)); - --color-primary: hsl(var(--primary)); - --color-primary-foreground: hsl(var(--primary-foreground)); - --color-secondary: hsl(var(--secondary)); - --color-secondary-foreground: hsl(var(--secondary-foreground)); - --color-muted: hsl(var(--muted)); - --color-muted-foreground: hsl(var(--muted-foreground)); - --color-accent: hsl(var(--accent)); - --color-accent-foreground: hsl(var(--accent-foreground)); - --color-destructive: hsl(var(--destructive)); - --color-destructive-foreground: hsl(var(--destructive-foreground)); - --color-border: hsl(var(--border)); - --color-input: hsl(var(--input)); - --color-ring: hsl(var(--ring)); + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); --color-chart-1: hsl(var(--chart-1)); --color-chart-2: hsl(var(--chart-2)); --color-chart-3: hsl(var(--chart-3)); @@ -39,74 +39,74 @@ @layer base { :root { - --background: 0 0% 100%; - --foreground: 224 71.4% 4.1%; - --card: 0 0% 100%; - --card-foreground: 224 71.4% 4.1%; - --popover: 0 0% 100%; - --popover-foreground: 224 71.4% 4.1%; - --primary: 220.9 39.3% 11%; - --primary-foreground: 210 20% 98%; - --secondary: 220 14.3% 95.9%; - --secondary-foreground: 220.9 39.3% 11%; - --muted: 220 14.3% 95.9%; - --muted-foreground: 220 8.9% 46.1%; - --accent: 220 14.3% 95.9%; - --accent-foreground: 220.9 39.3% 11%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 84.2% 60.2%; - --border: 220 13% 91%; - --input: 220 13% 91%; - --ring: 220 13% 70.8%; + --background: hsl(0 0% 100%); + --foreground: hsl(224 71.4% 4.1%); + --card: hsl(0 0% 100%); + --card-foreground: hsl(224 71.4% 4.1%); + --popover: hsl(0 0% 100%); + --popover-foreground: hsl(224 71.4% 4.1%); + --primary: hsl(220.9 39.3% 11%); + --primary-foreground: hsl(210 20% 98%); + --secondary: hsl(220 14.3% 95.9%); + --secondary-foreground: hsl(220.9 39.3% 11%); + --muted: hsl(220 14.3% 95.9%); + --muted-foreground: hsl(220 8.9% 46.1%); + --accent: hsl(220 14.3% 95.9%); + --accent-foreground: hsl(220.9 39.3% 11%); + --destructive: hsl(0 84.2% 60.2%); + --destructive-foreground: hsl(0 84.2% 60.2%); + --border: hsl(220 13% 91%); + --input: hsl(220 13% 91%); + --ring: hsl(220 13% 70.8%); --chart-1: 12 76% 61%; --chart-2: 173 58% 39%; --chart-3: 197 37% 24%; --chart-4: 43 74% 66%; --chart-5: 27 87% 67%; --radius: 0.625rem; - --sidebar: 210 20% 98.5%; - --sidebar-foreground: 224 71.4% 4.1%; - --sidebar-primary: 220.9 39.3% 11%; - --sidebar-primary-foreground: 210 20% 98%; - --sidebar-accent: 220 14.3% 95.9%; - --sidebar-accent-foreground: 220.9 39.3% 11%; - --sidebar-border: 220 13% 91%; - --sidebar-ring: 220 13% 70.8%; + --sidebar: hsl(210 20% 98.5%); + --sidebar-foreground: hsl(224 71.4% 4.1%); + --sidebar-primary: hsl(220.9 39.3% 11%); + --sidebar-primary-foreground: hsl(210 20% 98%); + --sidebar-accent: hsl(220 14.3% 95.9%); + --sidebar-accent-foreground: hsl(220.9 39.3% 11%); + --sidebar-border: hsl(220 13% 91%); + --sidebar-ring: hsl(220 13% 70.8%); } .dark { - --background: 224 71.4% 4.1%; - --foreground: 210 20% 98%; - --card: 224 71.4% 4.1%; - --card-foreground: 210 20% 98%; - --popover: 224 71.4% 4.1%; - --popover-foreground: 210 20% 98%; - --primary: 210 20% 98%; - --primary-foreground: 220.9 39.3% 11%; - --secondary: 215 27.9% 16.9%; - --secondary-foreground: 210 20% 98%; - --muted: 215 27.9% 16.9%; - --muted-foreground: 217.9 10.6% 64.9%; - --accent: 215 27.9% 16.9%; - --accent-foreground: 210 20% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 84.2% 60.2%; - --border: 215 27.9% 16.9%; - --input: 215 27.9% 16.9%; - --ring: 217.9 10.6% 55.6%; + --background: hsl(224 71.4% 4.1%); + --foreground: hsl(210 20% 98%); + --card: hsl(224 71.4% 4.1%); + --card-foreground: hsl(210 20% 98%); + --popover: hsl(224 71.4% 4.1%); + --popover-foreground: hsl(210 20% 98%); + --primary: hsl(210 20% 98%); + --primary-foreground: hsl(220.9 39.3% 11%); + --secondary: hsl(215 27.9% 16.9%); + --secondary-foreground: hsl(210 20% 98%); + --muted: hsl(215 27.9% 16.9%); + --muted-foreground: hsl(217.9 10.6% 64.9%); + --accent: hsl(215 27.9% 16.9%); + --accent-foreground: hsl(210 20% 98%); + --destructive: hsl(0 62.8% 30.6%); + --destructive-foreground: hsl(0 84.2% 60.2%); + --border: hsl(215 27.9% 16.9%); + --input: hsl(215 27.9% 16.9%); + --ring: hsl(217.9 10.6% 55.6%); --chart-1: 220 70% 50%; --chart-2: 160 60% 45%; --chart-3: 30 80% 55%; --chart-4: 280 65% 60%; --chart-5: 340 75% 55%; - --sidebar: 220.9 39.3% 11%; - --sidebar-foreground: 210 20% 98%; - --sidebar-primary: 220 70% 50%; - --sidebar-primary-foreground: 210 20% 98%; - --sidebar-accent: 215 27.9% 16.9%; - --sidebar-accent-foreground: 210 20% 98%; - --sidebar-border: 215 27.9% 16.9%; - --sidebar-ring: 220 13% 43.9%; + --sidebar: hsl(220.9 39.3% 11%); + --sidebar-foreground: hsl(210 20% 98%); + --sidebar-primary: hsl(220 70% 50%); + --sidebar-primary-foreground: hsl(210 20% 98%); + --sidebar-accent: hsl(215 27.9% 16.9%); + --sidebar-accent-foreground: hsl(210 20% 98%); + --sidebar-border: hsl(215 27.9% 16.9%); + --sidebar-ring: hsl(220 13% 43.9%); } } @@ -153,75 +153,75 @@ } .preview { - --background: 0 0% 100%; - --foreground: 0 0% 14.5%; - --card: 0 0% 100%; - --card-foreground: 0 0% 14.5%; - --popover: 0 0% 100%; - --popover-foreground: 0 0% 14.5%; - --primary: 0 0% 20.5%; - --primary-foreground: 0 0% 98.5%; - --secondary: 0 0% 97%; - --secondary-foreground: 0 0% 20.5%; - --muted: 0 0% 97%; - --muted-foreground: 0 0% 55.6%; - --accent: 0 0% 97%; - --accent-foreground: 0 0% 20.5%; - --destructive: 27.3 24.5% 57.7%; - --destructive-foreground: 27.3 24.5% 57.7%; - --border: 0 0% 92.2%; - --input: 0 0% 92.2%; - --ring: 0 0% 70.8%; + --background: hsl(0 0% 100%); + --foreground: hsl(0 0% 14.5%); + --card: hsl(0 0% 100%); + --card-foreground: hsl(0 0% 14.5%); + --popover: hsl(0 0% 100%); + --popover-foreground: hsl(0 0% 14.5%); + --primary: hsl(0 0% 20.5%); + --primary-foreground: hsl(0 0% 98.5%); + --secondary: hsl(0 0% 97%); + --secondary-foreground: hsl(0 0% 20.5%); + --muted: hsl(0 0% 97%); + --muted-foreground: hsl(0 0% 55.6%); + --accent: hsl(0 0% 97%); + --accent-foreground: hsl(0 0% 20.5%); + --destructive: hsl(27.3 24.5% 57.7%); + --destructive-foreground: hsl(27.3 24.5% 57.7%); + --border: hsl(0 0% 92.2%); + --input: hsl(0 0% 92.2%); + --ring: hsl(0 0% 70.8%); --chart-1: 41.1 22.2% 64.6%; --chart-2: 184.7 11.8% 60%; --chart-3: 227.4 7% 39.8%; --chart-4: 84.4 18.9% 82.8%; --chart-5: 70.1 18.8% 76.9%; --radius: 0.625rem; - --sidebar: 0 0% 98.5%; - --sidebar-foreground: 0 0% 14.5%; - --sidebar-primary: 0 0% 20.5%; - --sidebar-primary-foreground: 0 0% 98.5%; - --sidebar-accent: 0 0% 97%; - --sidebar-accent-foreground: 0 0% 20.5%; - --sidebar-border: 0 0% 92.2%; - --sidebar-ring: 0 0% 70.8%; + --sidebar: hsl(0 0% 98.5%); + --sidebar-foreground: hsl(0 0% 14.5%); + --sidebar-primary: hsl(0 0% 20.5%); + --sidebar-primary-foreground: hsl(0 0% 98.5%); + --sidebar-accent: hsl(0 0% 97%); + --sidebar-accent-foreground: hsl(0 0% 20.5%); + --sidebar-border: hsl(0 0% 92.2%); + --sidebar-ring: hsl(0 0% 70.8%); } [data-theme='dark'] .preview, [data-theme='classic-dark'] .preview { - --background: 0 0% 14.5%; - --foreground: 0 0% 98.5%; - --card: 0 0% 0%; - --card-foreground: 0 0% 98.5%; - --popover: 0 0% 14.5%; - --popover-foreground: 0 0% 98.5%; - --primary: 0 0% 98.5%; - --primary-foreground: 0 0% 20.5%; - --secondary: 0 0% 26.9%; - --secondary-foreground: 0 0% 98.5%; - --muted: 0 0% 26.9%; - --muted-foreground: 0 0% 70.8%; - --accent: 0 0% 26.9%; - --accent-foreground: 0 0% 98.5%; - --destructive: 25.7 14.1% 39.6%; - --destructive-foreground: 25.3 23.7% 63.7%; - --border: 0 0% 26.9%; - --input: 0 0% 26.9%; - --ring: 0 0% 55.6%; + --background: hsl(0 0% 14.5%); + --foreground: hsl(0 0% 98.5%); + --card: hsl(0 0% 0%); + --card-foreground: hsl(0 0% 98.5%); + --popover: hsl(0 0% 14.5%); + --popover-foreground: hsl(0 0% 98.5%); + --primary: hsl(0 0% 98.5%); + --primary-foreground: hsl(0 0% 20.5%); + --secondary: hsl(0 0% 26.9%); + --secondary-foreground: hsl(0 0% 98.5%); + --muted: hsl(0 0% 26.9%); + --muted-foreground: hsl(0 0% 70.8%); + --accent: hsl(0 0% 26.9%); + --accent-foreground: hsl(0 0% 98.5%); + --destructive: hsl(25.7 14.1% 39.6%); + --destructive-foreground: hsl(25.3 23.7% 63.7%); + --border: hsl(0 0% 26.9%); + --input: hsl(0 0% 26.9%); + --ring: hsl(0 0% 55.6%); --chart-1: 264.4 24.3% 48.8%; --chart-2: 162.5 17% 69.6%; --chart-3: 70.1 18.8% 76.9%; --chart-4: 303.9 26.5% 62.7%; --chart-5: 16.4 24.6% 64.5%; - --sidebar: 0 0% 20.5%; - --sidebar-foreground: 0 0% 98.5%; - --sidebar-primary: 264.4 24.3% 48.8%; - --sidebar-primary-foreground: 0 0% 98.5%; - --sidebar-accent: 0 0% 26.9%; - --sidebar-accent-foreground: 0 0% 98.5%; - --sidebar-border: 0 0% 26.9%; - --sidebar-ring: 0 0% 43.9%; + --sidebar: hsl(0 0% 20.5%); + --sidebar-foreground: hsl(0 0% 98.5%); + --sidebar-primary: hsl(264.4 24.3% 48.8%); + --sidebar-primary-foreground: hsl(0 0% 98.5%); + --sidebar-accent: hsl(0 0% 26.9%); + --sidebar-accent-foreground: hsl(0 0% 98.5%); + --sidebar-border: hsl(0 0% 26.9%); + --sidebar-ring: hsl(0 0% 43.9%); } .preview * { diff --git a/apps/lite-studio/styles/globals.css b/apps/lite-studio/styles/globals.css index 7450b023ad8..d468bbe9fef 100644 --- a/apps/lite-studio/styles/globals.css +++ b/apps/lite-studio/styles/globals.css @@ -38,6 +38,6 @@ body { ::before, ::backdrop, ::file-selector-button { - border-color: hsl(var(--border-default, currentColor)); + border-color: var(--border-default, currentColor); } } diff --git a/apps/studio/components/grid/components/grid/ColumnHeader.tsx b/apps/studio/components/grid/components/grid/ColumnHeader.tsx index cc75818f6f8..d5e528b7c38 100644 --- a/apps/studio/components/grid/components/grid/ColumnHeader.tsx +++ b/apps/studio/components/grid/components/grid/ColumnHeader.tsx @@ -38,7 +38,7 @@ export function ColumnHeader({ } as const return ( -
+
diff --git a/apps/studio/components/interfaces/Database/Replication/ReplicationDiagram/Edges.tsx b/apps/studio/components/interfaces/Database/Replication/ReplicationDiagram/Edges.tsx index 84eebdfbc91..4f35e64e14e 100644 --- a/apps/studio/components/interfaces/Database/Replication/ReplicationDiagram/Edges.tsx +++ b/apps/studio/components/interfaces/Database/Replication/ReplicationDiagram/Edges.tsx @@ -56,7 +56,7 @@ const getEdgeVisual = ({ isComingUp, isReplicating, isFailed }: ReplicationState if (isComingUp) { return { Icon: Loader2, - color: 'hsl(var(--foreground-light))', + color: 'var(--foreground-light)', opacity: 1, dashArray: '5', shouldAnimate: true, @@ -74,7 +74,7 @@ const getEdgeVisual = ({ isComingUp, isReplicating, isFailed }: ReplicationState } return { Icon: Square, - color: 'hsl(var(--foreground-lighter))', + color: 'var(--foreground-lighter)', opacity: 0.5, dashArray: '5 5', shouldAnimate: false, diff --git a/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.tsx b/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.tsx index 8b9d38811eb..bea2a4138b4 100644 --- a/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.tsx +++ b/apps/studio/components/interfaces/DiskManagement/DiskManagementReviewAndSubmitDialog/DiskManagementReviewAndSubmitDialog.tsx @@ -126,7 +126,7 @@ export const DiskManagementReviewAndSubmitDialog = ({ {(hasComputeChanges || anyBillableDiskChange) && ( <>
-
+
Before @@ -144,7 +144,7 @@ export const DiskManagementReviewAndSubmitDialog = ({
-
+
After diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionInvocationsChart.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionInvocationsChart.tsx index 15258cb47ce..39e21839edb 100644 --- a/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionInvocationsChart.tsx +++ b/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionInvocationsChart.tsx @@ -86,7 +86,7 @@ export const EdgeFunctionInvocationsChart = ({ {updateAnnotation && ( diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionOverview.utils.ts b/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionOverview.utils.ts index c773c098118..dfe484ea94c 100644 --- a/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionOverview.utils.ts +++ b/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionOverview.utils.ts @@ -105,7 +105,7 @@ export const CPU_TIME_CHART_CONFIG = { export const EXECUTION_TIME_CHART_CONFIG = { avg_execution_time: { label: 'Average Execution Time', - color: 'hsl(var(--foreground-default))', + color: 'var(--foreground-default)', }, max_execution_time: { label: 'Max Execution Time', diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionPerformanceSection.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionPerformanceSection.tsx index bd837b5ce60..13694aae2e2 100644 --- a/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionPerformanceSection.tsx +++ b/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionPerformanceSection.tsx @@ -86,7 +86,7 @@ export const EdgeFunctionPerformanceSection = ({ { y: averageExecutionTime, label: 'average', - stroke: 'hsl(var(--foreground-default))', + stroke: 'var(--foreground-default)', strokeWidth: 1.5, }, ]} diff --git a/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionUsageSection.tsx b/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionUsageSection.tsx index 1de5fbffd0c..99f4206a22f 100644 --- a/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionUsageSection.tsx +++ b/apps/studio/components/interfaces/Functions/EdgeFunctionOverview/EdgeFunctionUsageSection.tsx @@ -115,7 +115,7 @@ export const EdgeFunctionUsageSection = ({ { y: averageCpuTime, label: 'average', - stroke: 'hsl(var(--foreground-default))', + stroke: 'var(--foreground-default)', strokeWidth: 1.5, }, ]} @@ -140,7 +140,7 @@ export const EdgeFunctionUsageSection = ({ { y: averageMemoryUsage, label: 'average', - stroke: 'hsl(var(--foreground-default))', + stroke: 'var(--foreground-default)', strokeWidth: 1.5, }, ]} diff --git a/apps/studio/components/interfaces/Integrations/GraphQL/graphiql.module.css b/apps/studio/components/interfaces/Integrations/GraphQL/graphiql.module.css index 46c71de786d..9dd88c5be62 100644 --- a/apps/studio/components/interfaces/Integrations/GraphQL/graphiql.module.css +++ b/apps/studio/components/interfaces/Integrations/GraphQL/graphiql.module.css @@ -103,7 +103,7 @@ * (--background-surface-300) already resolves per theme — so only --color-base below * needs to branch on light/dark. */ --color-primary: 153, 50%, 50%; - --graphiql-response-bg: hsl(var(--background-surface-300)); + --graphiql-response-bg: var(--background-surface-300); } :global(body.graphiql-dark) .root { diff --git a/apps/studio/components/interfaces/Project/APIKeys.tsx b/apps/studio/components/interfaces/Project/APIKeys.tsx index c2e30b62411..2a652fed5b3 100644 --- a/apps/studio/components/interfaces/Project/APIKeys.tsx +++ b/apps/studio/components/interfaces/Project/APIKeys.tsx @@ -188,9 +188,9 @@ export const APIKeys = () => { className="absolute inset-0 rounded-md -mt-px" style={{ backgroundImage: ` - linear-gradient(to top, hsl(var(--background-surface-100)/1) 0%, hsl(var(--background-surface-100)/1) 30%, hsl(var(--background-surface-75)/0) 100%), - linear-gradient(to right, hsl(var(--border-default)/0.33) 1px, transparent 1px), - linear-gradient(to bottom, hsl(var(--border-default)/0.33) 1px, transparent 1px) + linear-gradient(to top, oklch(from var(--background-surface-100) l c h / 1) 0%, oklch(from var(--background-surface-100) l c h / 1) 30%, oklch(from var(--background-surface-75) l c h / 0) 100%), + linear-gradient(to right, oklch(from var(--border-default) l c h / 0.33) 1px, transparent 1px), + linear-gradient(to bottom, oklch(from var(--border-default) l c h / 0.33) 1px, transparent 1px) `, backgroundSize: '100% 100%, 15px 15px, 15px 15px', backgroundPosition: '0 0, 0 0, 0 0', diff --git a/apps/studio/components/interfaces/QueryInsights/QueryInsightsChart/QueryInsightsChart.tsx b/apps/studio/components/interfaces/QueryInsights/QueryInsightsChart/QueryInsightsChart.tsx index 0c3911f40cf..448eef47dae 100644 --- a/apps/studio/components/interfaces/QueryInsights/QueryInsightsChart/QueryInsightsChart.tsx +++ b/apps/studio/components/interfaces/QueryInsights/QueryInsightsChart/QueryInsightsChart.tsx @@ -181,13 +181,13 @@ export const QueryInsightsChart = ({ dataKey="time" tick={false} tickLine={false} - axisLine={{ stroke: 'hsl(var(--border-default))' }} + axisLine={{ stroke: 'var(--border-default)' }} height={1} /> {legendItems.map((item) => ( diff --git a/apps/studio/components/interfaces/QueryInsights/QueryInsightsHealth/QueryInsightsHealthScore.tsx b/apps/studio/components/interfaces/QueryInsights/QueryInsightsHealth/QueryInsightsHealthScore.tsx index 6c69d1eb004..d870e60f581 100644 --- a/apps/studio/components/interfaces/QueryInsights/QueryInsightsHealth/QueryInsightsHealthScore.tsx +++ b/apps/studio/components/interfaces/QueryInsights/QueryInsightsHealth/QueryInsightsHealthScore.tsx @@ -11,7 +11,7 @@ export const QueryInsightsHealthScore = ({
{ const threshold = METRIC_THRESHOLDS[attribute as keyof typeof METRIC_THRESHOLDS] - if (!threshold) return 'hsl(var(--chart-1))' + if (!threshold) return 'var(--chart-1)' if (threshold.check === 'gt') { return value >= threshold.danger - ? 'hsl(var(--chart-destructive))' + ? 'var(--chart-destructive)' : value >= threshold.warning - ? 'hsl(var(--chart-warning))' - : 'hsl(var(--chart-1))' + ? 'var(--chart-warning)' + : 'var(--chart-1)' } else { return value <= threshold.danger - ? 'hsl(var(--chart-destructive))' + ? 'var(--chart-destructive)' : value <= threshold.warning - ? 'hsl(var(--chart-warning))' - : 'hsl(var(--chart-1))' + ? 'var(--chart-warning)' + : 'var(--chart-1)' } } @@ -362,7 +362,7 @@ export const ChartBlock = ({ /> } /> - + )} diff --git a/apps/studio/components/interfaces/Reports/utils/geo.ts b/apps/studio/components/interfaces/Reports/utils/geo.ts index bb20edebdf8..af83306166b 100644 --- a/apps/studio/components/interfaces/Reports/utils/geo.ts +++ b/apps/studio/components/interfaces/Reports/utils/geo.ts @@ -15,19 +15,19 @@ export interface MapChartTheme { export const MAP_CHART_THEME: { light: MapChartTheme; dark: MapChartTheme } = { light: { - zeroFill: 'hsl(var(--background-surface-400))', + zeroFill: 'var(--background-surface-400)', brandFill: 'hsl(var(--brand-default))', opacityScale: [0.18, 0.32, 0.5, 0.68, 0.86], - boundaryStroke: 'hsla(var(--brand-300), 0.6)', + boundaryStroke: 'hsl(var(--brand-300) / 0.6)', boundaryStrokeHover: 'hsl(var(--brand-500))', markerFill: 'hsl(var(--brand-default))', oceanFill: 'transparent', }, dark: { - zeroFill: 'hsl(var(--background-selection))', + zeroFill: 'var(--background-selection)', brandFill: 'hsl(var(--brand-default))', opacityScale: [0.18, 0.32, 0.5, 0.68, 0.86], - boundaryStroke: 'hsla(var(--brand-300), 0.6)', + boundaryStroke: 'hsl(var(--brand-300) / 0.6)', boundaryStrokeHover: 'hsl(var(--brand-500))', markerFill: 'hsl(var(--brand-default))', oceanFill: 'transparent', diff --git a/apps/studio/components/interfaces/Support/Success.tsx b/apps/studio/components/interfaces/Support/Success.tsx index 7e43b1cf8c7..3ac45a837e7 100644 --- a/apps/studio/components/interfaces/Support/Success.tsx +++ b/apps/studio/components/interfaces/Support/Success.tsx @@ -65,7 +65,7 @@ export const Success = ({
@@ -264,7 +264,7 @@ const useVibeCodersContent: () => { ), className: 'border-l-0!', image: ( - + ), }, { diff --git a/apps/www/data/support.tsx b/apps/www/data/support.tsx index 657c0600921..b4edd7d9039 100644 --- a/apps/www/data/support.tsx +++ b/apps/www/data/support.tsx @@ -19,7 +19,7 @@ const data = { label: 'Join us on Discord', link: 'https://discord.supabase.com/', target: '_blank', - icon: , + icon: , type: 'secondary', }, ], diff --git a/apps/www/pages/launch-week/6/styles/launchWeek6.module.css b/apps/www/pages/launch-week/6/styles/launchWeek6.module.css index 1aec1a70377..d31924eece8 100644 --- a/apps/www/pages/launch-week/6/styles/launchWeek6.module.css +++ b/apps/www/pages/launch-week/6/styles/launchWeek6.module.css @@ -7,7 +7,7 @@ closest-side at 50% 50%, #132121, #132121db, - hsl(var(--background-default)) + var(--background-default) ); } diff --git a/apps/www/pages/partners/index.tsx b/apps/www/pages/partners/index.tsx index 7d4ef5cf528..06a3ce7419b 100644 --- a/apps/www/pages/partners/index.tsx +++ b/apps/www/pages/partners/index.tsx @@ -39,7 +39,7 @@ const Partners = () => { -
+
{
))}
-
+
diff --git a/apps/www/pages/solutions/innovation-teams.tsx b/apps/www/pages/solutions/innovation-teams.tsx index 48d5d2269dc..0777a4904fa 100644 --- a/apps/www/pages/solutions/innovation-teams.tsx +++ b/apps/www/pages/solutions/innovation-teams.tsx @@ -113,7 +113,7 @@ const InnovationTeams: NextPage = () => { { /> { /> { /> { diff --git a/apps/www/styles/globals.css b/apps/www/styles/globals.css index 5edaa3a8d6a..5a11bc8176d 100644 --- a/apps/www/styles/globals.css +++ b/apps/www/styles/globals.css @@ -134,7 +134,7 @@ ::before, ::backdrop, ::file-selector-button { - border-color: hsl(var(--border-default, currentColor)); + border-color: var(--border-default, currentColor); } h2, @@ -315,7 +315,7 @@ h6:not(.overwrite) { .stroke-text { -webkit-text-fill-color: transparent; /* Will override color (regardless of order) */ -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: hsl(var(--background-selection)); + -webkit-text-stroke-color: var(--background-selection); } .stroke-text.fill { @@ -604,8 +604,8 @@ launch week rgba(57, 97, 125, 0.32) 0%, rgba(57, 97, 125, 0.32) 5%, rgba(0, 222, 209, 0.75) 8%, - hsl(var(--background-default)) 65%, - hsl(var(--background-default)) 100% + var(--background-default) 65%, + var(--background-default) 100% ); } @@ -627,7 +627,7 @@ launch week background: radial-gradient( circle at 50% -60%, rgba(255, 255, 255, 0) 0%, - hsl(var(--background-default)) 65% + var(--background-default) 65% ); } @@ -636,7 +636,7 @@ launch week background: radial-gradient( circle at 50% -40%, rgba(255, 255, 255, 0) 0%, - hsl(var(--background-default)) 65% + var(--background-default) 65% ); } } @@ -656,7 +656,7 @@ launch week /* The inside of the circle */ .flair-mask-b { position: absolute; - background-color: hsl(var(--background-default)); + background-color: var(--background-default); top: 0px; width: 182%; left: -41%; @@ -738,8 +738,8 @@ launch week .gradient-text-500 { background-image: -webkit-linear-gradient( 45deg, - hsl(var(--foreground-lighter)) 0%, - hsl(var(--foreground-default)) 100% + var(--foreground-lighter) 0%, + var(--foreground-default) 100% ); } diff --git a/packages/config/code-hike.css b/packages/config/code-hike.css index 85997070341..ff98e38613f 100644 --- a/packages/config/code-hike.css +++ b/packages/config/code-hike.css @@ -16,7 +16,7 @@ --ch-13: #5a1e02; --ch-14: #161b22; --ch-15: #8b949e; - /* --ch-16: hsl(var(--foreground-lighter)); */ + /* --ch-16: var(--foreground-lighter); */ --ch-16: #2a2929; --ch-17: #264f78; --ch-18: #3794ff; @@ -47,7 +47,7 @@ --ch-13: #ffd8b5; --ch-14: #eaeef2; --ch-15: #57606a; - /* --ch-16: hsl(var(--foreground-lighter)); */ + /* --ch-16: var(--foreground-lighter); */ --ch-16: #eeeeee; --ch-17: #add6ff; --ch-18: #1a85ff; @@ -638,7 +638,7 @@ .ch-codegroup { margin-top: 1.25em; margin-bottom: 1.25em; - border: 1px solid hsl(var(--border-default)); /* @mildtomato */ + border: 1px solid var(--border-default); /* @mildtomato */ box-shadow: none; } .ch-inline-code > code { diff --git a/packages/config/css/theme.css b/packages/config/css/theme.css index f0084ebf05c..081452ba09f 100644 --- a/packages/config/css/theme.css +++ b/packages/config/css/theme.css @@ -1,47 +1,70 @@ /* * Defines every Tailwind v4 --color-* design token. Tailwind generates * bg-{name} / text-{name} / border-{name} / ring-{name} / border-{r,l,t,b}-{name} - * utilities for each entry. Semantic tokens wrap their HSL triplet in hsl(); - * Radix/scale/brand tokens self-reference the matching var declared in - * colors.css, which holds the per-theme literal values. + * utilities for each entry. Semantic tokens are complete color values derived + * from the shared OKLCH system. Radix scale tokens self-reference the matching + * var declared in colors.css, which holds the per-theme literal values. */ @theme inline { - --color-foreground: hsl(var(--foreground-default)); - --color-foreground-light: hsl(var(--foreground-light)); - --color-foreground-lighter: hsl(var(--foreground-lighter)); - --color-foreground-muted: hsl(var(--foreground-muted)); - --color-foreground-contrast: hsl(var(--foreground-contrast)); - --color-background-200: hsl(var(--background-200)); - --color-background: hsl(var(--background-default)); - --color-background-alternative-200: hsl(var(--background-alternative-200)); - --color-background-alternative: hsl(var(--background-alternative-default)); - --color-background-selection: hsl(var(--background-selection)); - --color-background-control: hsl(var(--background-control)); - --color-background-surface-75: hsl(var(--background-surface-75)); - --color-background-surface-100: hsl(var(--background-surface-100)); - --color-background-surface-200: hsl(var(--background-surface-200)); - --color-background-surface-300: hsl(var(--background-surface-300)); - --color-background-surface-400: hsl(var(--background-surface-400)); - --color-background-overlay: hsl(var(--background-overlay-default)); - --color-background-overlay-hover: hsl(var(--background-overlay-hover)); - --color-background-muted: hsl(var(--background-muted)); - --color-background-button: hsl(var(--background-button-default)); - --color-background-dialog: hsl(var(--background-dialog-default)); - --color-background-dash-sidebar: hsl(var(--background-dash-sidebar)); - --color-background-dash-canvas: hsl(var(--background-dash-canvas)); + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-tertiary: var(--tertiary); + --color-tertiary-foreground: var(--tertiary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-warning: var(--warning); + --color-warning-foreground: var(--warning-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-info: var(--info); + --color-info-foreground: var(--info-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + + /* Backwards-compatible utility names */ + --color-foreground-light: var(--muted-foreground); + --color-foreground-lighter: var(--tertiary-foreground); + --color-foreground-muted: var(--foreground-muted); + --color-foreground-contrast: var(--primary-foreground); + --color-background-200: var(--background-200); + --color-background-alternative-200: var(--background-alternative-200); + --color-background-alternative: var(--background-alternative-default); + --color-background-selection: var(--background-selection); + --color-background-control: var(--background-control); + --color-background-surface-75: var(--background-surface-75); + --color-background-surface-100: var(--background-surface-100); + --color-background-surface-200: var(--background-surface-200); + --color-background-surface-300: var(--background-surface-300); + --color-background-surface-400: var(--background-surface-400); + --color-background-overlay: var(--background-overlay-default); + --color-background-overlay-hover: var(--background-overlay-hover); + --color-background-muted: var(--background-muted); + --color-background-button: var(--background-button-default); + --color-background-dialog: var(--background-dialog-default); + --color-background-dash-sidebar: var(--background-dash-sidebar); + --color-background-dash-canvas: var(--background-dash-canvas); --color-destructive-200: hsl(var(--destructive-200)); --color-destructive-300: hsl(var(--destructive-300)); --color-destructive-400: hsl(var(--destructive-400)); --color-destructive-500: hsl(var(--destructive-500)); --color-destructive-600: hsl(var(--destructive-600)); - --color-destructive: hsl(var(--destructive-default)); --color-warning-200: hsl(var(--warning-200)); --color-warning-300: hsl(var(--warning-300)); --color-warning-400: hsl(var(--warning-400)); --color-warning-500: hsl(var(--warning-500)); --color-warning-600: hsl(var(--warning-600)); - --color-warning: hsl(var(--warning-default)); --color-brand-200: hsl(var(--brand-200)); --color-brand-300: hsl(var(--brand-300)); --color-brand-400: hsl(var(--brand-400)); @@ -256,71 +279,74 @@ --color-brand-1000: var(--color-brand-1000); --color-brand-1100: var(--color-brand-1100); --color-brand-1200: var(--color-brand-1200); - --color-sidebar: hsl(var(--sidebar-background)); - --color-sidebar-foreground: hsl(var(--sidebar-foreground)); - --color-sidebar-primary: hsl(var(--sidebar-primary)); - --color-sidebar-primary-foreground: hsl(var(--sidebar-primary-foreground)); - --color-sidebar-accent: hsl(var(--sidebar-accent)); - --color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground)); - --color-sidebar-border: hsl(var(--sidebar-border)); - --color-sidebar-ring: hsl(var(--sidebar-ring)); - --color-hi-contrast: hsl(var(--foreground-default)); - --color-lo-contrast: hsl(var(--background-alternative-default)); + --color-sidebar: var(--sidebar-background); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); + --color-hi-contrast: var(--foreground); + --color-lo-contrast: var(--background-alternative-default); /* * This will generate colors only for bg utilities. */ - --background-color-200: hsl(var(--background-200)); - --background-color-default: hsl(var(--background-default)); - --background-color-muted: hsl(var(--background-muted)); - --background-color-alternative-200: hsl(var(--background-alternative-200)); - --background-color-alternative: hsl(var(--background-alternative-default)); - --background-color-selection: hsl(var(--background-selection)); - --background-color-control: hsl(var(--background-control)); - --background-color-surface-75: hsl(var(--background-surface-75)); - --background-color-surface-100: hsl(var(--background-surface-100)); - --background-color-surface-200: hsl(var(--background-surface-200)); - --background-color-surface-300: hsl(var(--background-surface-300)); - --background-color-surface-400: hsl(var(--background-surface-400)); - --background-color-overlay: hsl(var(--background-overlay-default)); - --background-color-overlay-hover: hsl(var(--background-overlay-hover)); - --background-color-button: hsl(var(--background-button-default)); - --background-color-dialog: hsl(var(--background-dialog-default)); - --background-color-dash-sidebar: hsl(var(--background-dash-sidebar)); - --background-color-dash-canvas: hsl(var(--background-dash-canvas)); - --background-color-studio: hsl(var(--background-200)); + --background-color-200: var(--background-200); + --background-color-default: var(--background); + --background-color-muted: var(--background-muted); + --background-color-alternative-200: var(--background-alternative-200); + --background-color-alternative: var(--background-alternative-default); + --background-color-selection: var(--background-selection); + --background-color-control: var(--background-control); + --background-color-surface-75: var(--background-surface-75); + --background-color-surface-100: var(--background-surface-100); + --background-color-surface-200: var(--background-surface-200); + --background-color-surface-300: var(--background-surface-300); + --background-color-surface-400: var(--background-surface-400); + --background-color-overlay: var(--background-overlay-default); + --background-color-overlay-hover: var(--background-overlay-hover); + --background-color-button: var(--background-button-default); + --background-color-dialog: var(--background-dialog-default); + --background-color-dash-sidebar: var(--background-dash-sidebar); + --background-color-dash-canvas: var(--background-dash-canvas); + --background-color-studio: var(--background); /* * This will generate colors for all utilities, they'll have border in the name i.e. bg-border-overlay, text-border-muted * This usage should be discouraged and deprecated. */ - --color-border: hsl(var(--border-default)); - --color-border-overlay: hsl(var(--border-overlay)); - --color-border-muted: hsl(var(--border-muted)); - --color-border-control: hsl(var(--border-control)); - --color-border-strong: hsl(var(--border-strong)); - --color-border-stronger: hsl(var(--border-stronger)); + --color-border-overlay: var(--border-overlay); + --color-border-muted: var(--border-muted); + --color-border-control: var(--border-control); + --color-border-strong: var(--border-strong); + --color-border-stronger: var(--border-stronger); + --color-border-destructive: var(--border-destructive); + --color-border-warning: var(--border-warning); + --color-border-info: var(--border-info); + --color-border-brand: var(--border-brand); /* * This will generate colors only for border utilities * i.e. bg-muted and they'll only have border-color: var(--border-muted) rule */ - --border-color-default: hsl(var(--border-default)); - --border-color-overlay: hsl(var(--border-overlay)); - --border-color-muted: hsl(var(--border-muted)); - --border-color-control: hsl(var(--border-control)); - --border-color-strong: hsl(var(--border-strong)); - --border-color-stronger: hsl(var(--border-stronger)); - --border-color-secondary: hsl(var(--border-secondary)); - --border-color-alternative: hsl(var(--border-alternative)); - --border-color-button: hsl(var(--border-button-default)); - --border-color-button-hover: hsl(var(--border-button-hover)); + --border-color-default: var(--border); + --border-color-overlay: var(--border-overlay); + --border-color-muted: var(--border-muted); + --border-color-control: var(--border-control); + --border-color-strong: var(--border-strong); + --border-color-stronger: var(--border-stronger); + --border-color-secondary: var(--border-secondary); + --border-color-alternative: var(--border-alternative); + --border-color-button: var(--border-button-default); + --border-color-button-hover: var(--border-button-hover); /* This will generate colors only for text utilities */ - --text-color-default: hsl(var(--foreground-default)); - --text-color-light: hsl(var(--foreground-light)); - --text-color-lighter: hsl(var(--foreground-lighter)); - --text-color-muted: hsl(var(--foreground-muted)); - --text-color-contrast: hsl(var(--foreground-contrast)); + --text-color-default: var(--foreground); + --text-color-light: var(--muted-foreground); + --text-color-lighter: var(--tertiary-foreground); + --text-color-muted: var(--foreground-muted); + --text-color-contrast: var(--primary-foreground); /* misc theme tokens — typography, breakpoints, sizing, transform-origin */ --font-sans: var( diff --git a/packages/config/css/utilities.css b/packages/config/css/utilities.css index c7b1c4cd7bf..c792e512096 100644 --- a/packages/config/css/utilities.css +++ b/packages/config/css/utilities.css @@ -10,7 +10,7 @@ * Should be deprecated in favor of `bg-default`. */ @utility bg { - background-color: hsl(var(--background-default)); + background-color: var(--background); } /* diff --git a/packages/config/tailwind.config.css b/packages/config/tailwind.config.css index fa5316f9343..329638a906a 100644 --- a/packages/config/tailwind.config.css +++ b/packages/config/tailwind.config.css @@ -6,10 +6,13 @@ @plugin "@tailwindcss/forms"; @import 'tw-animate-css'; -/* Per-theme overrides for semantic --background-/--foreground-/--brand-* - * tokens. Radix/scale/brand --color-* values are inlined directly in - * colors.css below. */ +/* Define the semantic system first, then override its core inputs per theme. + * This order is significant because :root and a single class selector have + * equal specificity. Radix/scale/brand --color-* values are inlined directly + * in colors.css below. */ @import '../ui/build/css/source/global.css'; +@import '../ui/build/css/source/semantic.css'; +@import '../ui/build/css/source/compat.css'; @import '../ui/build/css/themes/dark.css'; @import '../ui/build/css/themes/light.css'; diff --git a/packages/config/typography.config.js b/packages/config/typography.config.js index 69efdd74ae2..508f17766a5 100644 --- a/packages/config/typography.config.js +++ b/packages/config/typography.config.js @@ -20,33 +20,33 @@ module.exports = { // https://github.com/tailwindlabs/tailwindcss-typography/issues/135 'code::before': { content: '""' }, 'code::after': { content: '""' }, - '--tw-prose-body': 'hsl(var(--foreground-light))', - '--tw-prose-headings': 'hsl(var(--foreground-default))', - '--tw-prose-lead': 'hsl(var(--foreground-light))', - '--tw-prose-links': 'hsl(var(--foreground-light))', - '--tw-prose-bold': 'hsl(var(--foreground-light))', - '--tw-prose-counters': 'hsl(var(--foreground-light))', - '--tw-prose-bullets': 'hsl(var(--foreground-muted))', - '--tw-prose-hr': 'hsl(var(--background-surface-300))', - '--tw-prose-quotes': 'hsl(var(--foreground-light))', - '--tw-prose-quote-borders': 'hsl(var(--background-surface-300))', - '--tw-prose-captions': 'hsl(var(--border-strong))', - '--tw-prose-code': 'hsl(var(--foreground-default))', - '--tw-prose-pre-code': 'hsl(var(--foreground-muted))', - '--tw-prose-pre-bg': 'hsl(var(--background-surface-200))', - '--tw-prose-th-borders': 'hsl(var(--background-surface-300))', - '--tw-prose-td-borders': 'hsl(var(--background-default))', - '--tw-prose-invert-body': 'hsl(var(--background-default))', + '--tw-prose-body': 'var(--foreground-light)', + '--tw-prose-headings': 'var(--foreground-default)', + '--tw-prose-lead': 'var(--foreground-light)', + '--tw-prose-links': 'var(--foreground-light)', + '--tw-prose-bold': 'var(--foreground-light)', + '--tw-prose-counters': 'var(--foreground-light)', + '--tw-prose-bullets': 'var(--foreground-muted)', + '--tw-prose-hr': 'var(--background-surface-300)', + '--tw-prose-quotes': 'var(--foreground-light)', + '--tw-prose-quote-borders': 'var(--background-surface-300)', + '--tw-prose-captions': 'var(--border-strong)', + '--tw-prose-code': 'var(--foreground-default)', + '--tw-prose-pre-code': 'var(--foreground-muted)', + '--tw-prose-pre-bg': 'var(--background-surface-200)', + '--tw-prose-th-borders': 'var(--background-surface-300)', + '--tw-prose-td-borders': 'var(--background-default)', + '--tw-prose-invert-body': 'var(--background-default)', '--tw-prose-invert-headings': 'white', - '--tw-prose-invert-lead': 'hsl(var(--background-surface-300))', + '--tw-prose-invert-lead': 'var(--background-surface-300)', '--tw-prose-invert-links': 'white', '--tw-prose-invert-bold': 'white', - '--tw-prose-invert-counters': 'hsl(var(--background-surface-200))', - '--tw-prose-invert-bullets': 'hsl(var(--background-selection))', - '--tw-prose-invert-hr': 'hsl(var(--border-strong))', - '--tw-prose-invert-quotes': 'hsl(var(--background-alternative-default))', - '--tw-prose-invert-quote-borders': 'hsl(var(--border-strong))', - '--tw-prose-invert-captions': 'hsl(var(--background-surface-200))', + '--tw-prose-invert-counters': 'var(--background-surface-200)', + '--tw-prose-invert-bullets': 'var(--background-selection)', + '--tw-prose-invert-hr': 'var(--border-strong)', + '--tw-prose-invert-quotes': 'var(--background-alternative-default)', + '--tw-prose-invert-quote-borders': 'var(--border-strong)', + '--tw-prose-invert-captions': 'var(--background-surface-200)', h4: { fontSize: '1.15em' }, // h5 isn't included in --tw-prose-headings. h5: { color: 'var(--color-scale-1200)' }, @@ -74,7 +74,7 @@ module.exports = { height: '0.125rem', width: '0.5rem', borderRadius: '0.25rem', - backgroundColor: 'hsl(var(--border-strong))', + backgroundColor: 'var(--border-strong)', content: '""', }, ol: { @@ -95,33 +95,33 @@ module.exports = { height: '1.2rem', width: '1.2rem', borderRadius: '0.25rem', - backgroundColor: 'hsl(var(--background-surface-100))', - border: '1px solid hsl(var(--border-default))', + backgroundColor: 'var(--background-surface-100)', + border: '1px solid var(--border-default)', content: 'counter(item) " "', counterIncrement: 'item', fontSize: '12px', - color: 'hsl(var(--foreground-muted))', + color: 'var(--foreground-muted)', display: 'flex', alignItems: 'center', justifyContent: 'center', }, 'p img': { - border: '1px solid hsl(var(--border-muted))', + border: '1px solid var(--border-muted)', borderRadius: '4px', overflow: 'hidden', }, iframe: { - border: '1px solid hsl(var(--border-default))', + border: '1px solid var(--border-default)', borderRadius: 'var(--radius-lg)', }, td: { - borderBottom: '1px solid hsl(var(--background-surface-200))', + borderBottom: '1px solid var(--background-surface-200)', }, code: { fontWeight: '400', padding: '0.2rem 0.4rem', - backgroundColor: 'hsl(var(--background-surface-200))', - border: '1px solid hsl(var(--background-surface-300))', + backgroundColor: 'var(--background-surface-200)', + border: '1px solid var(--background-surface-300)', borderRadius: 'var(--radius-lg)', }, a: { @@ -130,17 +130,17 @@ module.exports = { paddingBottom: '2px', fontWeight: '400', opacity: 1, - color: 'hsl(var(--foreground-default))', + color: 'var(--foreground-default)', textDecorationLine: 'underline', - textDecorationColor: 'hsl(var(--foreground-muted))', + textDecorationColor: 'var(--foreground-muted)', textDecorationThickness: '1px', textUnderlineOffset: '2px', }, 'a:hover': { - textDecorationColor: 'hsl(var(--foreground-default))', + textDecorationColor: 'var(--foreground-default)', }, figcaption: { - color: 'hsl(var(--foreground-muted))', + color: 'var(--foreground-muted)', fontFamily: 'Office Code Pro, monospace', }, 'figure.quote-figure p:first-child': { @@ -167,9 +167,9 @@ module.exports = { 'text-decoration': 'none', fontSize: '0.8rem', fontWeight: '200', - color: 'hsl(var(--foreground-light))', + color: 'var(--foreground-light)', '&:hover': { - color: 'hsl(var(--foreground-default))', + color: 'var(--foreground-default)', }, 'font-weight': '400', }, @@ -183,9 +183,9 @@ module.exports = { }, a: { fontWeight: '200', - color: 'hsl(var(--foreground-lighter))', + color: 'var(--foreground-lighter)', '&:hover': { - color: 'hsl(var(--foreground-default))', + color: 'var(--foreground-default)', }, }, }, @@ -196,33 +196,33 @@ module.exports = { // Used in docs and changelog content. docs: { css: { - '--tw-prose-body': 'hsl(var(--foreground-light))', - '--tw-prose-headings': 'hsl(var(--foreground-default))', - '--tw-prose-lead': 'hsl(var(--foreground-light))', + '--tw-prose-body': 'var(--foreground-light)', + '--tw-prose-headings': 'var(--foreground-default)', + '--tw-prose-lead': 'var(--foreground-light)', '--tw-prose-links': 'hsl(var(--brand-500))', - '--tw-prose-bold': 'hsl(var(--foreground-light))', - '--tw-prose-counters': 'hsl(var(--foreground-light))', - '--tw-prose-bullets': 'hsl(var(--foreground-muted))', - '--tw-prose-hr': 'hsl(var(--background-surface-300))', - '--tw-prose-quotes': 'hsl(var(--foreground-light))', - '--tw-prose-quote-borders': 'hsl(var(--background-surface-300))', - '--tw-prose-captions': 'hsl(var(--border-strong))', - '--tw-prose-code': 'hsl(var(--foreground-default))', - '--tw-prose-pre-code': 'hsl(var(--foreground-muted))', - '--tw-prose-pre-bg': 'hsl(var(--background-surface-200))', - '--tw-prose-th-borders': 'hsl(var(--background-surface-300))', - '--tw-prose-td-borders': 'hsl(var(--background-default))', - '--tw-prose-invert-body': 'hsl(var(--background-default))', + '--tw-prose-bold': 'var(--foreground-light)', + '--tw-prose-counters': 'var(--foreground-light)', + '--tw-prose-bullets': 'var(--foreground-muted)', + '--tw-prose-hr': 'var(--background-surface-300)', + '--tw-prose-quotes': 'var(--foreground-light)', + '--tw-prose-quote-borders': 'var(--background-surface-300)', + '--tw-prose-captions': 'var(--border-strong)', + '--tw-prose-code': 'var(--foreground-default)', + '--tw-prose-pre-code': 'var(--foreground-muted)', + '--tw-prose-pre-bg': 'var(--background-surface-200)', + '--tw-prose-th-borders': 'var(--background-surface-300)', + '--tw-prose-td-borders': 'var(--background-default)', + '--tw-prose-invert-body': 'var(--background-default)', '--tw-prose-invert-headings': 'white', - '--tw-prose-invert-lead': 'hsl(var(--background-surface-300))', + '--tw-prose-invert-lead': 'var(--background-surface-300)', '--tw-prose-invert-links': 'white', '--tw-prose-invert-bold': 'white', - '--tw-prose-invert-counters': 'hsl(var(--background-surface-200))', - '--tw-prose-invert-bullets': 'hsl(var(--background-selection))', - '--tw-prose-invert-hr': 'hsl(var(--border-strong))', - '--tw-prose-invert-quotes': 'hsl(var(--background-alternative-default))', - '--tw-prose-invert-quote-borders': 'hsl(var(--border-strong))', - '--tw-prose-invert-captions': 'hsl(var(--background-surface-200))', + '--tw-prose-invert-counters': 'var(--background-surface-200)', + '--tw-prose-invert-bullets': 'var(--background-selection)', + '--tw-prose-invert-hr': 'var(--border-strong)', + '--tw-prose-invert-quotes': 'var(--background-alternative-default)', + '--tw-prose-invert-quote-borders': 'var(--border-strong)', + '--tw-prose-invert-captions': 'var(--background-surface-200)', 'h1, h2, h3, h4, h5': { fontWeight: '400' }, }, }, diff --git a/packages/marketing/src/go/sections/CodeBlockSection.tsx b/packages/marketing/src/go/sections/CodeBlockSection.tsx index 5af9c1533e2..cc42fa29ed4 100644 --- a/packages/marketing/src/go/sections/CodeBlockSection.tsx +++ b/packages/marketing/src/go/sections/CodeBlockSection.tsx @@ -13,7 +13,7 @@ const lineNumberStyles = ` width: 2ch; margin-right: 1.5ch; text-align: right; - color: hsl(var(--foreground-light)); + color: var(--foreground-light); opacity: 0.35; } ` diff --git a/packages/ui-patterns/src/Chart/charts/chart-bar.tsx b/packages/ui-patterns/src/Chart/charts/chart-bar.tsx index e73e9e4108a..d2b455758e0 100644 --- a/packages/ui-patterns/src/Chart/charts/chart-bar.tsx +++ b/packages/ui-patterns/src/Chart/charts/chart-bar.tsx @@ -16,8 +16,8 @@ import type { CategoricalChartState } from 'recharts/types/chart/types' import { ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, cn } from 'ui' const CHART_COLORS = { - TICK: 'hsl(var(--background-overlay-hover))', - AXIS: 'hsl(var(--background-overlay-hover))', + TICK: 'var(--background-overlay-hover)', + AXIS: 'var(--background-overlay-hover)', BRAND: 'hsl(var(--brand-default))', BRAND_HOVER: 'hsl(var(--brand-500))', } diff --git a/packages/ui-patterns/src/Chart/charts/chart-line.tsx b/packages/ui-patterns/src/Chart/charts/chart-line.tsx index ae26fba202a..545925e0a48 100644 --- a/packages/ui-patterns/src/Chart/charts/chart-line.tsx +++ b/packages/ui-patterns/src/Chart/charts/chart-line.tsx @@ -16,8 +16,8 @@ import type { CategoricalChartState } from 'recharts/types/chart/types' import { ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, cn } from 'ui' const CHART_COLORS = { - TICK: 'hsl(var(--background-overlay-hover))', - AXIS: 'hsl(var(--background-overlay-hover))', + TICK: 'var(--background-overlay-hover)', + AXIS: 'var(--background-overlay-hover)', BRAND: 'hsl(var(--brand-default))', BRAND_HOVER: 'hsl(var(--brand-500))', } diff --git a/packages/ui-patterns/src/CodeBlock/CodeBlock.tsx b/packages/ui-patterns/src/CodeBlock/CodeBlock.tsx index 43e2b58ea2e..8fd0d29552f 100644 --- a/packages/ui-patterns/src/CodeBlock/CodeBlock.tsx +++ b/packages/ui-patterns/src/CodeBlock/CodeBlock.tsx @@ -219,9 +219,9 @@ export const CodeBlock = ({ display: 'block', backgroundColor: styleConfig?.highlightBackgroundColor ? styleConfig?.highlightBackgroundColor - : 'hsl(var(--background-selection))', + : 'var(--background-selection)', borderLeft: highlightBorder - ? `1px solid ${styleConfig?.highlightBorderColor ? styleConfig?.highlightBorderColor : 'hsl(var(--foreground-default)'})` + ? `1px solid ${styleConfig?.highlightBorderColor ? styleConfig?.highlightBorderColor : 'var(--foreground-default)'}` : null, }, class: 'hljs-line-highlight', diff --git a/packages/ui-patterns/src/LogsBarChart/index.tsx b/packages/ui-patterns/src/LogsBarChart/index.tsx index c0ad0476d8b..8747b3839fb 100644 --- a/packages/ui-patterns/src/LogsBarChart/index.tsx +++ b/packages/ui-patterns/src/LogsBarChart/index.tsx @@ -7,8 +7,8 @@ import type { CategoricalChartState } from 'recharts/types/chart/types' import { ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, cn } from 'ui' const CHART_COLORS = { - TICK: 'hsl(var(--background-overlay-hover))', - AXIS: 'hsl(var(--background-overlay-hover))', + TICK: 'var(--background-overlay-hover)', + AXIS: 'var(--background-overlay-hover)', GREEN_1: 'hsl(var(--brand-default))', GREEN_2: 'hsl(var(--brand-500))', RED_1: 'hsl(var(--destructive-default))', diff --git a/packages/ui-patterns/src/PromoToast/PromoBg.tsx b/packages/ui-patterns/src/PromoToast/PromoBg.tsx index b2d88078d2b..c30b0fd6220 100644 --- a/packages/ui-patterns/src/PromoToast/PromoBg.tsx +++ b/packages/ui-patterns/src/PromoToast/PromoBg.tsx @@ -16,7 +16,7 @@ const PromoBg = ({ className }: Props) => { > { gradientUnits="userSpaceOnUse" gradientTransform="translate(263 73.5) rotate(-143.669) scale(159.507 135.774)" > - - + + { gradientUnits="userSpaceOnUse" gradientTransform="translate(263 73.5) rotate(-143.669) scale(159.507 135.774)" > - - + + { gradientUnits="userSpaceOnUse" gradientTransform="translate(263 73.5) rotate(-143.669) scale(159.507 135.774)" > - - + + { y2="131.405" gradientUnits="userSpaceOnUse" > - - + + { gradientUnits="userSpaceOnUse" gradientTransform="translate(266 95) rotate(135) scale(142.482 176.767)" > - - + + diff --git a/packages/ui-patterns/src/ShimmeringLoader/index.css b/packages/ui-patterns/src/ShimmeringLoader/index.css index e5620e6beac..d538577cbf8 100644 --- a/packages/ui-patterns/src/ShimmeringLoader/index.css +++ b/packages/ui-patterns/src/ShimmeringLoader/index.css @@ -3,9 +3,9 @@ animation: shimmer 2s infinite linear; background: linear-gradient( to right, - hsl(var(--border-default)) 4%, - hsl(var(--background-surface-200)) 25%, - hsl(var(--border-default)) 36% + var(--border-default) 4%, + var(--background-surface-200) 25%, + var(--border-default) 36% ); background-size: 1000px 100%; } @@ -14,9 +14,9 @@ animation: shimmer 2s infinite linear; background: linear-gradient( to right, - hsl(var(--border-default)) 4%, - hsl(var(--border-control)) 25%, - hsl(var(--border-default)) 36% + var(--border-default) 4%, + var(--border-control) 25%, + var(--border-default) 36% ); background-size: 1000px 100%; } diff --git a/packages/ui/README.md b/packages/ui/README.md index cbf510fe4f5..1e971f755db 100644 --- a/packages/ui/README.md +++ b/packages/ui/README.md @@ -24,5 +24,12 @@ import { clipboard, cn, mergeDeep } from 'ui' // clsx + tailwind-merge ## Styling conventions - Tailwind only — no inline styles or CSS modules. -- Use semantic tokens (`bg-muted`, `text-foreground-light`, `border-default`) rather than hardcoded colors. +- Use shadcn semantic pairs (`bg-card text-card-foreground`, `bg-muted text-muted-foreground`, + `bg-tertiary text-tertiary-foreground`) rather than hardcoded colors. Legacy utilities such as + `text-foreground-light` and `border-default` are compatibility aliases only. +- Themes set the core `--hue` (or the split `--surface-hue` / `--primary-hue`), `--chroma`, + `--surface`, `--foreground-lightness`, and `--contrast` inputs, plus their + `--muted-foreground-level` and `--tertiary-foreground-level` hierarchy. + Semantic colors are derived from them in OKLCH; `--contrast: 1` is the baseline and the supported + adjustment range is `0.75` to `1.25`. - The workspace root owns the actual `tailwind.config.js`. The file in this package is a stub for IntelliSense only. diff --git a/packages/ui/build/css/source/compat.css b/packages/ui/build/css/source/compat.css new file mode 100644 index 00000000000..f2806ed468b --- /dev/null +++ b/packages/ui/build/css/source/compat.css @@ -0,0 +1,56 @@ +/* + * Backwards-compatibility aliases. + * + * These map the old token names onto the semantic system in semantic.css so + * components can migrate gradually. Nothing new should reference them — they + * exist only so un-migrated call sites keep resolving. Delete entries as their + * consumers move to the semantic tokens; the file goes away once it is empty. + * + * Kept separate from semantic.css so the core model reads as just inputs → + * derivations. Must be imported after semantic.css (see tailwind.config.css). + */ + +:root { + /* Legacy foreground aliases */ + --foreground-default: var(--foreground); + --foreground-light: var(--muted-foreground); + --foreground-lighter: var(--tertiary-foreground); + --foreground-muted: var(--tertiary-foreground); + --foreground-contrast: var(--primary-foreground); + + /* Legacy background aliases */ + --background-default: var(--background); + --background-200: var(--card); + --background-alternative-default: var(--background); + --background-alternative-200: var(--card); + --background-selection: var(--accent); + --background-control: var(--accent); + --background-surface-75: var(--card); + --background-surface-100: var(--card); + --background-surface-200: var(--muted); + --background-surface-300: var(--secondary); + --background-surface-400: var(--tertiary); + --background-overlay-default: var(--secondary); + --background-overlay-hover: var(--accent); + --background-muted: var(--muted); + --background-button-default: var(--secondary); + --background-dialog-default: var(--popover); + --background-dash-sidebar: var(--background); + --background-dash-canvas: var(--background); + + /* Legacy border aliases */ + --border-default: var(--border); + --border-muted: var(--border); + --border-secondary: var(--border-muted); + --border-overlay: oklch( + from var(--foreground) l calc(c * 0.5) h / calc(4% + 34% * var(--contrast-border)) + ); + --border-control: var(--input); + --border-alternative: var(--border); + --border-strong: var(--input); + --border-stronger: oklch( + from var(--foreground) l calc(c * 0.5) h / calc(5% + 45% * var(--contrast-border)) + ); + --border-button-default: var(--border); + --border-button-hover: var(--border-stronger); +} diff --git a/packages/ui/build/css/source/semantic.css b/packages/ui/build/css/source/semantic.css new file mode 100644 index 00000000000..4734b7144f6 --- /dev/null +++ b/packages/ui/build/css/source/semantic.css @@ -0,0 +1,223 @@ +/* + * Core semantic color system. + * + * Themes override the small set of inputs below; every semantic color is then + * derived from them in OKLCH. The stepped numeric scales (brand / warning / + * destructive / secondary) are NOT derived here — they live as per-theme values + * in the theme files and are mapped to utilities in packages/config/css/theme.css. + */ + +:root { + /* + * Hue inputs. A single --hue used to drive both the neutral surface/text ramp + * and the brand, so the two could never drift apart. They are now split so a + * theme can run, say, a cool-gray surface against the green brand: + * --surface-hue tints backgrounds, text and borders (the neutral ramp) + * --primary-hue is the brand hue that --primary is built from + * Both default to --hue (Supabase green ≈159° in OKLCH), so a theme that only + * sets --hue keeps surfaces and brand locked together as before; override + * either one to let them diverge. */ + --hue: 159; + --surface-hue: var(--hue); + --primary-hue: var(--hue); + /* Root defaults mirror the dark theme (the app's default appearance). */ + --chroma: 0.016; + --surface: 0.17; + + --foreground-lightness: 0.95; + /* How far muted/tertiary text sits from --surface toward --foreground-lightness + (0 = surface, 1 = full foreground) at --contrast 0.5; themes override. */ + --muted-foreground-level: 0.8; + --tertiary-foreground-level: 0.65; + + /* + * Global contrast knob, 0 to 1. Default 0.5 is the comfortable baseline; 0 keeps + * borders and accent barely visible over muted surfaces; 1 pushes them to full + * strength. Foreground hits --foreground-lightness at 0.5; below that it eases + * toward the surface down to --contrast-text-floor at 0. Muted and tertiary + * foreground lightness sits at the theme base level (a surface→foreground mix) at + * 0.5 and eases up toward foreground or down toward half that base as contrast moves. + * + * --contrast-delta is -1 at 0, 0 at 0.5, +1 at 1 — shared offset from baseline; + * --contrast-up / --contrast-down are its positive / negative halves. + * --contrast-border ramps [floor, 1] over --contrast and squares it so most of + * the range lives toward full strength. ((delta + 1) / 2 simplifies to contrast.) + */ + --contrast: 0.5; + --contrast-delta: calc((var(--contrast) - 0.5) / 0.5); + /* positive and negative halves of the delta, reused below */ + --contrast-up: max(0, var(--contrast-delta)); + --contrast-down: max(0, calc(var(--contrast-delta) * -1)); + --contrast-text-floor: 0.9; + --contrast-border-floor: 0.05; + --contrast-text: calc(1 - (1 - var(--contrast-text-floor)) * var(--contrast-down)); + --contrast-border-linear: calc( + var(--contrast-border-floor) + (1 - var(--contrast-border-floor)) * var(--contrast) + ); + --contrast-border: calc(var(--contrast-border-linear) * var(--contrast-border-linear)); + + /* + * Surface elevation. Each surface steps its lightness away from --background + * by `--elevation-step * ratio`, where the ratios are shared across themes and + * the step is signed: positive brightens as surfaces rise, negative darkens. + * + * The default step reproduces the historical behavior (≈3% per level mixed + * toward the foreground): dark themes brighten and the light baseline darkens. + * The light theme overrides --elevation-step (and lowers --surface for + * headroom) so its higher surfaces brighten toward white instead — giving a + * single "higher = lighter" model in both modes. 0 = flat (no elevation). + */ + --elevation-1: 1; + --elevation-2: 1.5; + --elevation-3: 2; + --elevation-4: 3; + /* Signed span surface→foreground (+ in dark, − in light). */ + --tone-span: calc(var(--foreground-lightness) - var(--surface)); + --elevation-step: calc(var(--tone-span) * 0.04); + /* + * Foreground overlays for muted / accent / tertiary. Alpha is tuned so each level + * matches the lightness delta of the same elevation ratio on --background; a + * translucent --foreground layer then composites with whatever surface sits + * beneath (lightens in dark, darkens in light). Steps: muted (e1) → accent + * (e2) → tertiary (e3). + */ + --surface-overlay-unit: calc(var(--elevation-step) / abs(var(--tone-span))); + --muted-alpha: calc(var(--surface-overlay-unit) * var(--elevation-1)); + --accent-alpha: calc(var(--surface-overlay-unit) * var(--elevation-2)); + --tertiary-alpha: calc(var(--surface-overlay-unit) * var(--elevation-3)); + + /* + * Status hues stay anchored to amber / red but pull a fraction of the way + * toward the brand --primary-hue for harmony, then clamp to their perceptual + * category so "warning" always reads amber and "destructive" always reads red + * no matter what --primary-hue is. --status-hue-pull: 0 = fixed amber/red, + * 1 = fully brand-relative. At the default --primary-hue the pull term is 0, so + * these resolve to their bases (warning 75 / destructive 25 / info 288). + * --brand-hue-reference is the --primary-hue at which pull is zero; keep it + * equal to the default brand hue. + * Warning sits at 75 (amber), not higher toward yellow — yellow can't darken + * without going olive, so it loses contrast on light surfaces. Info is a violet + * (matching the "no additional charge" badge); like the others it pulls a touch + * with the brand --primary-hue but clamps so it always reads violet. + */ + --brand-hue-reference: 159; + --status-hue-pull: 0.15; + --warning-hue: clamp( + 65, + calc(75 + (var(--primary-hue) - var(--brand-hue-reference)) * var(--status-hue-pull)), + 95 + ); + --destructive-hue: clamp( + 12, + calc(25 + (var(--primary-hue) - var(--brand-hue-reference)) * var(--status-hue-pull)), + 42 + ); + --info-hue: clamp( + 272, + calc(288 + (var(--primary-hue) - var(--brand-hue-reference)) * var(--status-hue-pull)), + 302 + ); + /* + * Expressive (status) colors are deliberately NOT derived from the neutral + * surface→foreground span the way text and surfaces are. An expressive color + * has its own identity; tying its lightness to the theme's text ramp is what + * left warning under-saturated in light mode and too dark in dark mode. + * + * Instead each is anchored to a fixed target lightness near its hue's chroma + * peak and a single shared --expressive-chroma. That chroma is a flat constant, + * deliberately NOT derived from the neutral --chroma knob: status colors must + * stay legible even when the brand is dialed toward grayscale. It sits inside + * sRGB at these lightnesses, so no gamut mapping is required. + * + * The dark-mode lightness anchors live here; light mode runs darker (set in + * light.css) so the fills hold contrast against the near-white surface. + */ + --expressive-chroma: 0.14; + --warning-lightness: 0.8; + --destructive-lightness: 0.75; + --info-lightness: 0.7; + + /* shadcn semantic pairs */ + --background: oklch(var(--surface) calc(var(--chroma) * 0.5) var(--surface-hue)); + --foreground: oklch( + calc(var(--surface) + var(--tone-span) * var(--contrast-text)) calc(var(--chroma) * 0.55) + var(--surface-hue) + ); + + --card: oklch(from var(--background) calc(l + var(--elevation-step) * var(--elevation-1)) c h); + --card-foreground: var(--foreground); + --popover: oklch(from var(--background) calc(l + var(--elevation-step) * var(--elevation-2)) c h); + --popover-foreground: var(--foreground); + + /* Primary is the brand-derived accent: a fixed, vivid Supabase green on + --primary-hue, mode-invariant and decoupled from the --chroma knob so it + holds its identity even as neutrals desaturate. NOTE: the `brand` utility + (--color-brand in theme.css) is deliberately NOT this — it maps to the + per-theme --brand-default scale (master behavior) while we resolve how + `brand` is used across the interface. */ + --primary: oklch(0.76 0.15 var(--primary-hue)); + --primary-foreground: oklch( + min(var(--surface), var(--foreground-lightness)) calc(var(--chroma) * 0.45) var(--primary-hue) + ); + + --secondary: oklch( + from var(--background) calc(l + var(--elevation-step) * var(--elevation-3)) c h + ); + --secondary-foreground: var(--foreground); + --tertiary: oklch(from var(--foreground) l c h / var(--tertiary-alpha)); + --tertiary-foreground-mix: calc( + var(--tertiary-foreground-level) + (1 - var(--tertiary-foreground-level)) * var(--contrast-up) - + var(--tertiary-foreground-level) * 0.5 * var(--contrast-down) + ); + --tertiary-foreground: oklch( + from var(--foreground) calc(var(--surface) + var(--tone-span) * var(--tertiary-foreground-mix)) + c h + ); + --muted: oklch(from var(--foreground) l c h / var(--muted-alpha)); + --muted-foreground-mix: calc( + var(--muted-foreground-level) + (1 - var(--muted-foreground-level)) * var(--contrast-up) - + var(--muted-foreground-level) * 0.5 * var(--contrast-down) + ); + --muted-foreground: oklch( + from var(--foreground) calc(var(--surface) + var(--tone-span) * var(--muted-foreground-mix)) c h + ); + --accent: oklch(from var(--foreground) l c h / var(--accent-alpha)); + --accent-foreground: var(--foreground); + + --warning: oklch(var(--warning-lightness) var(--expressive-chroma) var(--warning-hue)); + --destructive: oklch( + var(--destructive-lightness) var(--expressive-chroma) var(--destructive-hue) + ); + /* + * Text that sits on the solid fill: dark ink on light fills (amber), white on + * dark fills (red). The clamp turns the fill's own lightness into a hard flip + * around L≈0.62 — (0.62 − l) is negative for light fills (→ floor 0.12) and + * positive for dark fills (→ ceil 0.99) — so on-colors stay legible and keep + * flipping correctly if the anchors are retuned. A trace of hue chroma keeps + * the ink from reading as flat gray. + */ + --warning-foreground: oklch( + from var(--warning) clamp(0.12, calc((0.62 - l) * 100), 0.99) calc(c * 0.08) h + ); + --destructive-foreground: oklch( + from var(--destructive) clamp(0.12, calc((0.62 - l) * 100), 0.99) calc(c * 0.08) h + ); + --info: oklch(var(--info-lightness) var(--expressive-chroma) var(--info-hue)); + --info-foreground: oklch( + from var(--info) clamp(0.12, calc((0.62 - l) * 100), 0.99) calc(c * 0.08) h + ); + + /* Status border tokens for subtle / tinted surfaces */ + --border-destructive: oklch(from var(--destructive) l c h / 30%); + --border-warning: oklch(from var(--warning) l c h / 30%); + --border-info: oklch(from var(--info) l c h / 30%); + --border-brand: oklch(from var(--primary) l c h / 30%); + + --border: oklch( + from var(--foreground) l calc(c * 0.54) h / calc(2% + 20% * var(--contrast-border)) + ); + --input: oklch( + from var(--foreground) l calc(c * 0.5) h / calc(3% + 38% * var(--contrast-border)) + ); + --ring: oklch(from var(--primary) l c h / 55%); +} diff --git a/packages/ui/build/css/themes/classic-dark.css b/packages/ui/build/css/themes/classic-dark.css index 4d140300dd6..57e4ff9f334 100644 --- a/packages/ui/build/css/themes/classic-dark.css +++ b/packages/ui/build/css/themes/classic-dark.css @@ -1,11 +1,20 @@ [data-theme='classic-dark'], .classic-dark { --helpers-os-appearance: Dark; + --hue: 159; + --chroma: 0.014; + --surface: 0.205; + --foreground-lightness: 0.97; + --muted-foreground-level: 0.72; + --tertiary-foreground-level: 0.52; + --code-block-5: 13.8deg 89.7% 69.6%; --code-block-4: 276.1deg 67.7% 74.5%; --code-block-3: 83.8deg 61.7% 63.1%; --code-block-2: 33.2deg 90.3% 75.7%; --code-block-1: 170.8deg 43.1% 61.4%; + + /* Stepped numeric scales (per-theme literals; mapped in theme.css) */ --secondary-default: 0deg 0% 100%; --secondary-400: 0deg 0% 100%; --secondary-200: 0deg 0% 100%; @@ -28,37 +37,4 @@ --destructive-400: 6.7deg 60% 20.6%; --destructive-300: 7.5deg 51.3% 15.3%; --destructive-200: 10.9deg 23.4% 9.2%; - --background-dash-sidebar: 0deg 0% 11%; - --background-dialog-default: 0deg 0% 11%; - --background-surface-75: 0deg 0% 12.5%; - --background-200: 0deg 0% 11%; - --foreground-contrast: 0deg 0% 11%; - --border-button-hover: var(--colors-gray-dark-800); - --border-button-default: var(--colors-gray-dark-700); - --border-stronger: var(--colors-gray-dark-800); - --border-strong: var(--colors-gray-dark-700); - --border-alternative: var(--colors-gray-dark-500); - --border-control: var(--colors-gray-dark-600); - --border-overlay: var(--colors-gray-dark-500); - --border-secondary: var(--colors-gray-dark-500); - --border-muted: var(--colors-gray-dark-500); - --border-default: var(--colors-gray-dark-600); - --background-dash-canvas: var(--colors-gray-dark-200); - --background-button-default: var(--colors-gray-dark-500); - --background-muted: var(--colors-gray-dark-400); - --background-overlay-hover: var(--colors-gray-dark-500); - --background-overlay-default: var(--colors-gray-dark-300); - --background-surface-400: var(--colors-gray-dark-700); - --background-surface-300: var(--colors-gray-dark-500); - --background-surface-200: var(--colors-gray-dark-400); - --background-surface-100: var(--colors-gray-dark-300); - --background-control: var(--colors-gray-dark-300); - --background-selection: var(--colors-gray-dark-600); - --background-alternative-default: var(--colors-gray-dark-100); - --background-alternative-200: var(--colors-gray-dark-200); - --background-default: var(--colors-gray-dark-200); - --foreground-muted: var(--colors-gray-dark-900); - --foreground-lighter: var(--colors-gray-dark-1000); - --foreground-light: var(--colors-gray-dark-1100); - --foreground-default: var(--colors-gray-dark-1200); } diff --git a/packages/ui/build/css/themes/dark.css b/packages/ui/build/css/themes/dark.css index 4582c05d813..daf570a706a 100644 --- a/packages/ui/build/css/themes/dark.css +++ b/packages/ui/build/css/themes/dark.css @@ -1,11 +1,22 @@ [data-theme='dark'], .dark { --helpers-os-appearance: Dark; + --hue: 159; + --chroma: 0.005; + --surface: 0.19; + --elevation-step: 0.025; + --contrast: 0.5; + --foreground-lightness: 0.95; + --muted-foreground-level: 0.8; + --tertiary-foreground-level: 0.65; + --code-block-5: 13.8deg 89.7% 69.6%; --code-block-4: 276.1deg 67.7% 74.5%; --code-block-3: 83.8deg 61.7% 63.1%; --code-block-2: 33.2deg 90.3% 75.7%; --code-block-1: 170.8deg 43.1% 61.4%; + + /* Stepped numeric scales (per-theme literals; mapped in theme.css) */ --secondary-default: 247.8deg 100% 70%; --secondary-400: 248.3deg 54.5% 25.9%; --secondary-200: 248deg 53.6% 11%; @@ -16,7 +27,7 @@ --brand-400: 155.5deg 100% 9.6%; --brand-300: 155.1deg 100% 8%; --brand-200: 162deg 100% 2%; - --warning-default: 38.9deg 100% 42.9%; /* warning-600 */ + --warning-default: 38.9deg 100% 42.9%; --warning-600: 38.9deg 100% 42.9%; --warning-500: 34.8deg 90.9% 21.6%; --warning-400: 33.2deg 100% 14.5%; @@ -28,37 +39,4 @@ --destructive-400: 6.7deg 60% 20.6%; --destructive-300: 7.5deg 51.3% 15.3%; --destructive-200: 10.9deg 23.4% 9.2%; - --border-stronger: 0deg 0% 27.1%; - --border-strong: 0deg 0% 21.2%; - --border-alternative: 0deg 0% 26.7%; - --border-control: 0deg 0% 22.4%; - --border-overlay: 0deg 0% 20%; - --border-secondary: 0deg 0% 14.1%; - --border-muted: 0deg 0% 14.1%; - --border-default: 0deg 0% 18%; - --background-dash-canvas: 0deg 0% 7.1%; - --background-dash-sidebar: 0deg 0% 9%; - --background-dialog-default: 0deg 0% 7.1%; - --background-muted: 0deg 0% 14.1%; - --background-overlay-hover: 0deg 0% 18%; - --background-overlay-default: 0deg 0% 14.1%; - --background-surface-400: 0deg 0% 16.1%; - --background-surface-300: 0deg 0% 16.1%; - --background-surface-200: 0deg 0% 12.9%; - --background-surface-100: 0deg 0% 12.2%; - --background-surface-75: 0deg 0% 9%; - --background-control: 0deg 0% 14.1%; - --background-selection: 0deg 0% 19.2%; - --background-alternative-default: 0deg 0% 5.9%; - --background-default: 0deg 0% 7.1%; - --background-200: 0deg 0% 9%; - --foreground-contrast: 0deg 0% 8.6%; - --foreground-muted: 0deg 0% 30.2%; - --foreground-lighter: 0deg 0% 53.7%; - --foreground-light: 0deg 0% 70.6%; - --foreground-default: 0deg 0% 98%; - --border-button-hover: var(--colors-gray-dark-800); - --border-button-default: var(--colors-gray-dark-700); - --background-button-default: var(--colors-gray-dark-500); - --background-alternative-200: var(--colors-gray-dark-200); } diff --git a/packages/ui/build/css/themes/faux-classic-dark.css b/packages/ui/build/css/themes/faux-classic-dark.css index e99e7a8427e..44d33f82373 100644 --- a/packages/ui/build/css/themes/faux-classic-dark.css +++ b/packages/ui/build/css/themes/faux-classic-dark.css @@ -1,15 +1,24 @@ -/* - * This theme has the same values as the dark theme meant to be used in www and docs. www and docs can only support - * light and dark themes because they only have images for light and dark themes. +/* + * This theme intentionally follows the standard dark theme. It exists for + * apps that expose a classic-dark selector but only ship light/dark imagery. */ [data-theme='classic-dark'], .classic-dark { --helpers-os-appearance: Dark; + --hue: 159; + --chroma: 0.018; + --surface: 0.16; + --foreground-lightness: 0.985; + --muted-foreground-level: 0.72; + --tertiary-foreground-level: 0.52; + --code-block-5: 13.8deg 89.7% 69.6%; --code-block-4: 276.1deg 67.7% 74.5%; --code-block-3: 83.8deg 61.7% 63.1%; --code-block-2: 33.2deg 90.3% 75.7%; --code-block-1: 170.8deg 43.1% 61.4%; + + /* Stepped numeric scales (per-theme literals; mapped in theme.css) */ --secondary-default: 247.8deg 100% 70%; --secondary-400: 248.3deg 54.5% 25.9%; --secondary-200: 248deg 53.6% 11%; @@ -20,7 +29,7 @@ --brand-400: 155.5deg 100% 9.6%; --brand-300: 155.1deg 100% 8%; --brand-200: 162deg 100% 2%; - --warning-default: 38.9deg 100% 42.9%; /* warning-600 */ + --warning-default: 38.9deg 100% 42.9%; --warning-600: 38.9deg 100% 42.9%; --warning-500: 34.8deg 90.9% 21.6%; --warning-400: 33.2deg 100% 14.5%; @@ -32,37 +41,4 @@ --destructive-400: 6.7deg 60% 20.6%; --destructive-300: 7.5deg 51.3% 15.3%; --destructive-200: 10.9deg 23.4% 9.2%; - --border-stronger: 0deg 0% 27.1%; - --border-strong: 0deg 0% 21.2%; - --border-alternative: 0deg 0% 26.7%; - --border-control: 0deg 0% 22.4%; - --border-overlay: 0deg 0% 20%; - --border-secondary: 0deg 0% 14.1%; - --border-muted: 0deg 0% 14.1%; - --border-default: 0deg 0% 18%; - --background-dash-canvas: 0deg 0% 7.1%; - --background-dash-sidebar: 0deg 0% 9%; - --background-dialog-default: 0deg 0% 7.1%; - --background-muted: 0deg 0% 14.1%; - --background-overlay-hover: 0deg 0% 18%; - --background-overlay-default: 0deg 0% 14.1%; - --background-surface-400: 0deg 0% 16.1%; - --background-surface-300: 0deg 0% 16.1%; - --background-surface-200: 0deg 0% 12.9%; - --background-surface-100: 0deg 0% 12.2%; - --background-surface-75: 0deg 0% 9%; - --background-control: 0deg 0% 14.1%; - --background-selection: 0deg 0% 19.2%; - --background-alternative-default: 0deg 0% 5.9%; - --background-default: 0deg 0% 7.1%; - --background-200: 0deg 0% 9%; - --foreground-contrast: 0deg 0% 8.6%; - --foreground-muted: 0deg 0% 30.2%; - --foreground-lighter: 0deg 0% 53.7%; - --foreground-light: 0deg 0% 70.6%; - --foreground-default: 0deg 0% 98%; - --border-button-hover: var(--colors-gray-dark-800); - --border-button-default: var(--colors-gray-dark-700); - --background-button-default: var(--colors-gray-dark-500); - --background-alternative-200: var(--colors-gray-dark-200); } diff --git a/packages/ui/build/css/themes/light.css b/packages/ui/build/css/themes/light.css index 71766dbe3f7..d23cc96ed63 100644 --- a/packages/ui/build/css/themes/light.css +++ b/packages/ui/build/css/themes/light.css @@ -1,11 +1,38 @@ [data-theme='light'], .light { --helpers-os-appearance: Light; + --hue: 159; + /* Warm-gray surface ramp against the green brand (--primary stays on --hue). */ + --surface-hue: 34; + --chroma: 0.004; + /* + * Soft-gray canvas (not pure white) so elevated surfaces have headroom to + * brighten toward white. --elevation-step is positive here: higher surfaces + * get lighter, matching dark mode's direction. Tuned literal (previously + * derived from 1 - surface); retune alongside --surface. + */ + --surface: 0.98; + --elevation-step: 0.024; + --contrast: 0.53; + --foreground-lightness: 0.16; + --muted-foreground-level: 0.68; + --tertiary-foreground-level: 0.48; + /* + * Expressive fills run darker than the dark-theme anchors so they hold contrast + * against the near-white surface (a light amber on white disappears). Lightness + * is mode-aware; chroma is the shared --expressive-chroma from semantic.css. + */ + --warning-lightness: 0.68; + --destructive-lightness: 0.52; + --info-lightness: 0.54; + --code-block-5: 14deg 80.4% 58%; --code-block-4: 276.3deg 60% 52.9%; --code-block-3: 83.8deg 61.6% 48%; --code-block-2: 33.1deg 80% 52.9%; --code-block-1: 170.6deg 43.2% 51%; + + /* Stepped numeric scales (per-theme literals; mapped in theme.css) */ --secondary-default: 247.8deg 100% 70%; --secondary-400: 248.3deg 54.5% 25.9%; --secondary-200: 248deg 53.6% 11%; @@ -16,7 +43,7 @@ --brand-400: 151.3deg 66.9% 66.9%; --brand-300: 147.5deg 72% 80.4%; --brand-200: 147.6deg 72.5% 90%; - --warning-default: 30.3deg 80.3% 47.8%; /* warning-600 */ + /* --warning-default: 30.3deg 80.3% 47.8%; */ --warning-600: 30.3deg 80.3% 47.8%; --warning-500: 36.3deg 85.7% 67.1%; --warning-400: 41.9deg 100% 81.8%; @@ -28,37 +55,4 @@ --destructive-400: 7.1deg 91.3% 91%; --destructive-300: 7.1deg 100% 96.7%; --destructive-200: 0deg 100% 99.4%; - --border-stronger: 0deg 0% 56.1%; - --border-strong: 0deg 0% 83.1%; - --border-default: 0deg 0% 87.5%; - --background-dialog-default: 0deg 0% 100%; - --background-muted: 0deg 0% 96.9%; - --background-surface-400: 0deg 0% 89.8%; - --background-surface-300: 0deg 0% 92.9%; - --background-surface-200: 0deg 0% 95.3%; - --background-surface-100: 0deg 0% 98.8%; - --background-surface-75: 0deg 0% 100%; - --background-alternative-default: 0deg 0% 99.2%; - --background-alternative-200: 0deg 0% 100%; - --foreground-contrast: 0deg 0% 98.4%; - --foreground-muted: 0deg 0% 69.8%; - --foreground-lighter: 0deg 0% 43.9%; - --foreground-light: 0deg 0% 32.2%; - --border-button-hover: var(--colors-gray-light-700); - --border-button-default: var(--colors-gray-light-600); - --border-alternative: var(--colors-gray-light-500); - --border-control: var(--colors-gray-light-800); - --border-overlay: var(--colors-gray-light-500); - --border-secondary: var(--colors-gray-light-400); - --border-muted: var(--colors-gray-light-400); - --background-dash-canvas: var(--colors-gray-light-200); - --background-dash-sidebar: var(--colors-gray-light-100); - --background-button-default: var(--colors-gray-light-100); - --background-overlay-hover: var(--colors-gray-light-300); - --background-overlay-default: var(--colors-gray-light-100); - --background-control: var(--colors-gray-light-300); - --background-selection: var(--colors-gray-light-400); - --background-default: var(--colors-gray-light-100); - --background-200: var(--colors-gray-light-200); - --foreground-default: var(--colors-gray-light-1200); } diff --git a/packages/ui/src/components/Button/Button.tsx b/packages/ui/src/components/Button/Button.tsx index 10f1b94156b..807c016eb55 100644 --- a/packages/ui/src/components/Button/Button.tsx +++ b/packages/ui/src/components/Button/Button.tsx @@ -88,31 +88,31 @@ const buttonVariants = cva( `, text: ` text-foreground - hover:bg-surface-300 + hover:bg-accent shadow-none focus-visible:outline-border-strong - data-[state=open]:bg-surface-300 + data-[state=open]:bg-accent data-[state=open]:outline-border-strong border-transparent `, danger: ` text-foreground bg-destructive-300 dark:bg-destructive-400 hover:bg-destructive-400 dark:hover:bg-destructive/50 - border-destructive-500 hover:border-destructive + border-border-destructive hover:border-destructive hover:text-hi-contrast - focus-visible:outline-amber-700 + focus-visible:outline-destructive data-[state=open]:border-destructive - data-[state=open]:bg-destructive-400 dark:data-[state=open]:bg-destructive-/50 + data-[state=open]:bg-destructive-400 dark:data-[state=open]:bg-destructive/50 data-[state=open]:outline-destructive `, warning: ` text-foreground bg-warning-300 dark:bg-warning-400 hover:bg-warning-400 dark:hover:bg-warning/50 - border-warning-500 hover:border-warning + border-border-warning hover:border-warning hover:text-hi-contrast - focus-visible:outline-amber-700 + focus-visible:outline-warning data-[state=open]:border-warning - data-[state=open]:bg-warning-400 dark:data-[state=open]:bg-warning-/50 + data-[state=open]:bg-warning-400 dark:data-[state=open]:bg-warning/50 data-[state=open]:outline-warning `, }, @@ -163,7 +163,7 @@ const IconContainerVariants = cva('inline-flex items-center justify-center shrin dashed: 'text-foreground-lighter', link: 'text-brand-600', text: 'text-foreground-lighter', - danger: 'text-destructive-600', + danger: 'text-destructive', warning: 'text-warning', }, }, @@ -181,7 +181,7 @@ const loadingVariants = cva('', { dashed: 'text-foreground-lighter', link: 'text-brand-600', text: 'text-foreground-muted', - danger: 'text-destructive-600', + danger: 'text-destructive', warning: 'text-warning', }, loading: { diff --git a/packages/ui/src/components/SidePanel/SidePanel.tsx b/packages/ui/src/components/SidePanel/SidePanel.tsx index 9e1921305b0..577d7f08bde 100644 --- a/packages/ui/src/components/SidePanel/SidePanel.tsx +++ b/packages/ui/src/components/SidePanel/SidePanel.tsx @@ -43,7 +43,7 @@ interface CustomProps { } export const sidePanelContentVariants = cva( - cn('z-50 bg-dash-sidebar flex flex-col fixed inset-y-0 h-full lg:h-screen border-l shadow-xl'), + cn('z-50 bg-popover flex flex-col fixed inset-y-0 h-full lg:h-screen border-l shadow-xl'), { variants: { size: { @@ -161,7 +161,7 @@ const SidePanel = ({ {...props} > {header && ( -
+
{header}
)} diff --git a/packages/ui/src/components/shadcn/ui/badge.tsx b/packages/ui/src/components/shadcn/ui/badge.tsx index 55581c797e8..b5276b0bdee 100644 --- a/packages/ui/src/components/shadcn/ui/badge.tsx +++ b/packages/ui/src/components/shadcn/ui/badge.tsx @@ -9,9 +9,9 @@ const badgeVariants = cva( variants: { variant: { default: 'bg-surface-75 text-foreground-light border border-strong', - warning: 'bg-warning/10 text-warning border border-warning-500', - success: 'bg-brand/10 text-brand-600 border border-brand-500', - destructive: 'bg-destructive/10 text-destructive-600 border border-destructive-500', + warning: 'bg-warning/10 text-warning border border-border-warning', + success: 'bg-brand/10 text-brand border border-border-brand', + destructive: 'bg-destructive/10 text-destructive border border-border-destructive', // Secondary is invisible secondary: 'bg-secondary/50 hover:bg-secondary/80 border-transparent text-secondary-foreground', diff --git a/packages/ui/src/components/shadcn/ui/button.tsx b/packages/ui/src/components/shadcn/ui/button.tsx index 9c37deb239e..759fdf605a8 100644 --- a/packages/ui/src/components/shadcn/ui/button.tsx +++ b/packages/ui/src/components/shadcn/ui/button.tsx @@ -1,7 +1,7 @@ 'use client' -import { Slot as SlotPrimitive } from 'radix-ui' import { cva, type VariantProps } from 'class-variance-authority' +import { Slot as SlotPrimitive } from 'radix-ui' import * as React from 'react' import { cn } from '../../../lib/utils/cn' @@ -11,7 +11,7 @@ const buttonVariants = cva( { variants: { variant: { - default: 'bg-blue-300 text-primary-foreground hover:bg-primary/90', + default: 'bg-primary text-primary-foreground hover:bg-primary/90', destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90', outline: 'border border-control bg-background hover:bg-accent hover:text-accent-foreground', secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', diff --git a/packages/ui/src/components/shadcn/ui/sheet.tsx b/packages/ui/src/components/shadcn/ui/sheet.tsx index 5554734ed81..24d66f42940 100644 --- a/packages/ui/src/components/shadcn/ui/sheet.tsx +++ b/packages/ui/src/components/shadcn/ui/sheet.tsx @@ -49,7 +49,7 @@ const SheetOverlay = React.forwardRef< SheetOverlay.displayName = SheetPrimitive.Overlay.displayName const classes = cn([ - 'fixed z-50 scale-100 gap-4 bg-studio opacity-100 shadow-lg', + 'fixed z-50 scale-100 gap-4 bg-popover opacity-100 shadow-lg', 'data-[state=open]:animate-in data-[state=open]:duration-300 data-[state=closed]:animate-out data-[state=closed]:duration-300', ]) diff --git a/packages/ui/src/components/shadcn/ui/sidebar.tsx b/packages/ui/src/components/shadcn/ui/sidebar.tsx index 0f5842a90d8..5c2c0c82cac 100644 --- a/packages/ui/src/components/shadcn/ui/sidebar.tsx +++ b/packages/ui/src/components/shadcn/ui/sidebar.tsx @@ -510,7 +510,7 @@ const sidebarMenuButtonVariants = cva( variant: { default: 'hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground', outline: - 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]', + 'bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]', }, size: { default: 'h-8 text-sm',