@dowel-ui/themes 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LibName contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,24 @@
1
+ //#region src/index.d.ts
2
+ /**
3
+ * Typed surface of the theme layer. The CSS is the implementation; these
4
+ * constants exist so theme switchers, the docs playground and the future CLI
5
+ * all agree on the same vocabulary.
6
+ */
7
+ declare const THEME_PRESETS: readonly ["default", "ocean", "emerald", "violet", "rose", "amber", "monochrome"];
8
+ type ThemePreset = (typeof THEME_PRESETS)[number];
9
+ declare const COLOR_MODES: readonly ["light", "dark", "system"];
10
+ type ColorMode = (typeof COLOR_MODES)[number];
11
+ /** Attribute set on the <html> element to activate a preset. */
12
+ declare const THEME_ATTRIBUTE = "data-theme";
13
+ /** Class toggled on the <html> element for dark mode. */
14
+ declare const DARK_CLASS = "dark";
15
+ /**
16
+ * Custom property that re-proportions every radius token at once.
17
+ * `1` is the designed default; `0` gives fully square corners.
18
+ */
19
+ declare const RADIUS_SCALE_PROPERTY = "--radius-scale";
20
+ declare function isThemePreset(value: string): value is ThemePreset;
21
+ declare function isColorMode(value: string): value is ColorMode;
22
+ //#endregion
23
+ export { COLOR_MODES, ColorMode, DARK_CLASS, RADIUS_SCALE_PROPERTY, THEME_ATTRIBUTE, THEME_PRESETS, ThemePreset, isColorMode, isThemePreset };
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;cAMa;KAUD,sBAAsB;cAErB;KAED,oBAAoB;;cAGnB;;cAGA;;;;;cAMA;iBAEG,cAAc,gBAAgB,SAAS;iBAIvC,YAAY,gBAAgB,SAAS"}
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ //#region src/index.ts
2
+ /**
3
+ * Typed surface of the theme layer. The CSS is the implementation; these
4
+ * constants exist so theme switchers, the docs playground and the future CLI
5
+ * all agree on the same vocabulary.
6
+ */
7
+ const THEME_PRESETS = [
8
+ "default",
9
+ "ocean",
10
+ "emerald",
11
+ "violet",
12
+ "rose",
13
+ "amber",
14
+ "monochrome"
15
+ ];
16
+ const COLOR_MODES = [
17
+ "light",
18
+ "dark",
19
+ "system"
20
+ ];
21
+ /** Attribute set on the <html> element to activate a preset. */
22
+ const THEME_ATTRIBUTE = "data-theme";
23
+ /** Class toggled on the <html> element for dark mode. */
24
+ const DARK_CLASS = "dark";
25
+ /**
26
+ * Custom property that re-proportions every radius token at once.
27
+ * `1` is the designed default; `0` gives fully square corners.
28
+ */
29
+ const RADIUS_SCALE_PROPERTY = "--radius-scale";
30
+ function isThemePreset(value) {
31
+ return THEME_PRESETS.includes(value);
32
+ }
33
+ function isColorMode(value) {
34
+ return COLOR_MODES.includes(value);
35
+ }
36
+ //#endregion
37
+ export { COLOR_MODES, DARK_CLASS, RADIUS_SCALE_PROPERTY, THEME_ATTRIBUTE, THEME_PRESETS, isColorMode, isThemePreset };
38
+
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Typed surface of the theme layer. The CSS is the implementation; these\n * constants exist so theme switchers, the docs playground and the future CLI\n * all agree on the same vocabulary.\n */\n\nexport const THEME_PRESETS = [\n \"default\",\n \"ocean\",\n \"emerald\",\n \"violet\",\n \"rose\",\n \"amber\",\n \"monochrome\",\n] as const;\n\nexport type ThemePreset = (typeof THEME_PRESETS)[number];\n\nexport const COLOR_MODES = [\"light\", \"dark\", \"system\"] as const;\n\nexport type ColorMode = (typeof COLOR_MODES)[number];\n\n/** Attribute set on the <html> element to activate a preset. */\nexport const THEME_ATTRIBUTE = \"data-theme\";\n\n/** Class toggled on the <html> element for dark mode. */\nexport const DARK_CLASS = \"dark\";\n\n/**\n * Custom property that re-proportions every radius token at once.\n * `1` is the designed default; `0` gives fully square corners.\n */\nexport const RADIUS_SCALE_PROPERTY = \"--radius-scale\";\n\nexport function isThemePreset(value: string): value is ThemePreset {\n return (THEME_PRESETS as readonly string[]).includes(value);\n}\n\nexport function isColorMode(value: string): value is ColorMode {\n return (COLOR_MODES as readonly string[]).includes(value);\n}\n"],"mappings":";;;;;;AAMA,MAAa,gBAAgB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,MAAa,cAAc;CAAC;CAAS;CAAQ;AAAQ;;AAKrD,MAAa,kBAAkB;;AAG/B,MAAa,aAAa;;;;;AAM1B,MAAa,wBAAwB;AAErC,SAAgB,cAAc,OAAqC;CACjE,OAAQ,cAAoC,SAAS,KAAK;AAC5D;AAEA,SAAgB,YAAY,OAAmC;CAC7D,OAAQ,YAAkC,SAAS,KAAK;AAC1D"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@dowel-ui/themes",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Design tokens and theme presets.",
6
+ "sideEffects": [
7
+ "*.css"
8
+ ],
9
+ "files": [
10
+ "dist",
11
+ "src"
12
+ ],
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ },
18
+ "./styles.css": "./src/index.css",
19
+ "./tokens.css": "./src/tokens.css",
20
+ "./base.css": "./src/base.css",
21
+ "./presets.css": "./src/presets/index.css",
22
+ "./presets/*.css": "./src/presets/*.css"
23
+ },
24
+ "peerDependencies": {
25
+ "tailwindcss": "^4.0.0"
26
+ },
27
+ "devDependencies": {
28
+ "tailwindcss": "4.3.3",
29
+ "tsdown": "0.22.14",
30
+ "typescript": "6.0.3",
31
+ "@dowel-ui/config": "0.1.0"
32
+ },
33
+ "scripts": {
34
+ "build": "tsdown",
35
+ "typecheck": "tsc --noEmit",
36
+ "clean": "rm -rf dist .turbo"
37
+ }
38
+ }
package/src/base.css ADDED
@@ -0,0 +1,178 @@
1
+ /* -----------------------------------------------------------------------------
2
+ * Tier 2 — semantic tokens.
3
+ *
4
+ * Components reference ONLY these. Because every semantic token resolves through
5
+ * a var(), a theme preset can re-skin the entire system by reassigning a handful
6
+ * of values without touching a single component file.
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ @custom-variant dark (&:is(.dark *));
10
+
11
+ :root {
12
+ --radius-scale: 1;
13
+
14
+ --background: oklch(1 0 0);
15
+ --foreground: var(--color-neutral-900);
16
+
17
+ --card: oklch(1 0 0);
18
+ --card-foreground: var(--color-neutral-900);
19
+
20
+ --popover: oklch(1 0 0);
21
+ --popover-foreground: var(--color-neutral-900);
22
+
23
+ --primary: oklch(0.545 0.196 275);
24
+ --primary-hover: oklch(0.5 0.196 275);
25
+ --primary-active: oklch(0.462 0.19 275);
26
+ --primary-foreground: oklch(0.985 0.002 265);
27
+
28
+ --secondary: var(--color-neutral-100);
29
+ --secondary-foreground: var(--color-neutral-900);
30
+
31
+ --muted: var(--color-neutral-100);
32
+ --muted-foreground: var(--color-neutral-500);
33
+
34
+ --accent: var(--color-neutral-100);
35
+ --accent-foreground: var(--color-neutral-900);
36
+
37
+ --destructive: var(--color-red-500);
38
+ --destructive-foreground: oklch(0.985 0.002 265);
39
+
40
+ --success: var(--color-green-500);
41
+ --success-foreground: oklch(0.985 0.002 265);
42
+
43
+ --warning: var(--color-amber-500);
44
+ --warning-foreground: oklch(0.985 0.002 265);
45
+
46
+ --info: var(--color-blue-500);
47
+ --info-foreground: oklch(0.985 0.002 265);
48
+
49
+ --border: var(--color-neutral-200);
50
+ --border-strong: var(--color-neutral-300);
51
+ --input: oklch(0.66 0.013 265);
52
+ --ring: var(--primary);
53
+
54
+ --overlay: oklch(0.212 0.011 265 / 0.55);
55
+ --shadow-color: oklch(0.212 0.011 265 / 0.1);
56
+ }
57
+
58
+ .dark {
59
+ --background: var(--color-neutral-950);
60
+ --foreground: var(--color-neutral-100);
61
+
62
+ --card: oklch(0.178 0.011 265);
63
+ --card-foreground: var(--color-neutral-100);
64
+
65
+ --popover: oklch(0.196 0.011 265);
66
+ --popover-foreground: var(--color-neutral-100);
67
+
68
+ --primary: oklch(0.645 0.17 275);
69
+ --primary-hover: oklch(0.69 0.165 275);
70
+ --primary-active: oklch(0.6 0.17 275);
71
+ --primary-foreground: oklch(0.155 0.03 275);
72
+
73
+ --secondary: oklch(0.245 0.012 265);
74
+ --secondary-foreground: var(--color-neutral-100);
75
+
76
+ --muted: oklch(0.245 0.012 265);
77
+ --muted-foreground: var(--color-neutral-400);
78
+
79
+ --accent: oklch(0.268 0.013 265);
80
+ --accent-foreground: var(--color-neutral-50);
81
+
82
+ --destructive: var(--color-red-400);
83
+ --destructive-foreground: oklch(0.155 0.02 27);
84
+
85
+ --success: var(--color-green-400);
86
+ --success-foreground: oklch(0.16 0.02 152);
87
+
88
+ --warning: var(--color-amber-400);
89
+ --warning-foreground: oklch(0.16 0.02 78);
90
+
91
+ --info: var(--color-blue-400);
92
+ --info-foreground: oklch(0.16 0.02 240);
93
+
94
+ --border: oklch(0.279 0.012 265);
95
+ --border-strong: oklch(0.34 0.013 265);
96
+ --input: oklch(0.48 0.013 265);
97
+ --ring: var(--primary);
98
+
99
+ --overlay: oklch(0.1 0.008 265 / 0.7);
100
+ --shadow-color: oklch(0 0 0 / 0.45);
101
+ }
102
+
103
+ /* Map semantic tokens into Tailwind's color namespace. `inline` keeps the
104
+ * utility referencing the var() rather than baking in the light-mode value,
105
+ * which is what makes a single class work in both modes. */
106
+ @theme inline {
107
+ --color-background: var(--background);
108
+ --color-foreground: var(--foreground);
109
+ --color-card: var(--card);
110
+ --color-card-foreground: var(--card-foreground);
111
+ --color-popover: var(--popover);
112
+ --color-popover-foreground: var(--popover-foreground);
113
+ --color-primary: var(--primary);
114
+ --color-primary-hover: var(--primary-hover);
115
+ --color-primary-active: var(--primary-active);
116
+ --color-primary-foreground: var(--primary-foreground);
117
+ --color-secondary: var(--secondary);
118
+ --color-secondary-foreground: var(--secondary-foreground);
119
+ --color-muted: var(--muted);
120
+ --color-muted-foreground: var(--muted-foreground);
121
+ --color-accent: var(--accent);
122
+ --color-accent-foreground: var(--accent-foreground);
123
+ --color-destructive: var(--destructive);
124
+ --color-destructive-foreground: var(--destructive-foreground);
125
+ --color-success: var(--success);
126
+ --color-success-foreground: var(--success-foreground);
127
+ --color-warning: var(--warning);
128
+ --color-warning-foreground: var(--warning-foreground);
129
+ --color-info: var(--info);
130
+ --color-info-foreground: var(--info-foreground);
131
+ --color-border: var(--border);
132
+ --color-border-strong: var(--border-strong);
133
+ --color-input: var(--input);
134
+ --color-ring: var(--ring);
135
+ --color-overlay: var(--overlay);
136
+ }
137
+
138
+ @layer base {
139
+ *,
140
+ ::after,
141
+ ::before,
142
+ ::backdrop,
143
+ ::file-selector-button {
144
+ border-color: var(--color-border);
145
+ }
146
+
147
+ html {
148
+ -webkit-text-size-adjust: 100%;
149
+ text-size-adjust: 100%;
150
+ }
151
+
152
+ body {
153
+ background-color: var(--color-background);
154
+ color: var(--color-foreground);
155
+ font-family: var(--font-sans);
156
+ font-size: var(--text-base);
157
+ line-height: var(--text-base--line-height);
158
+ -webkit-font-smoothing: antialiased;
159
+ -moz-osx-font-smoothing: grayscale;
160
+ }
161
+
162
+ ::selection {
163
+ background-color: color-mix(in oklab, var(--color-primary) 26%, transparent);
164
+ }
165
+
166
+ /* Respect the OS setting globally (design spec §14). Individual components do
167
+ * not need to re-implement this. */
168
+ @media (prefers-reduced-motion: reduce) {
169
+ *,
170
+ ::before,
171
+ ::after {
172
+ animation-duration: 0.01ms !important;
173
+ animation-iteration-count: 1 !important;
174
+ transition-duration: 0.01ms !important;
175
+ scroll-behavior: auto !important;
176
+ }
177
+ }
178
+ }
package/src/index.css ADDED
@@ -0,0 +1,4 @@
1
+ /* Entry point consumers import once, at the root of their app. */
2
+ @import "tailwindcss";
3
+ @import "./tokens.css";
4
+ @import "./base.css";
package/src/index.ts ADDED
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Typed surface of the theme layer. The CSS is the implementation; these
3
+ * constants exist so theme switchers, the docs playground and the future CLI
4
+ * all agree on the same vocabulary.
5
+ */
6
+
7
+ export const THEME_PRESETS = [
8
+ "default",
9
+ "ocean",
10
+ "emerald",
11
+ "violet",
12
+ "rose",
13
+ "amber",
14
+ "monochrome",
15
+ ] as const;
16
+
17
+ export type ThemePreset = (typeof THEME_PRESETS)[number];
18
+
19
+ export const COLOR_MODES = ["light", "dark", "system"] as const;
20
+
21
+ export type ColorMode = (typeof COLOR_MODES)[number];
22
+
23
+ /** Attribute set on the <html> element to activate a preset. */
24
+ export const THEME_ATTRIBUTE = "data-theme";
25
+
26
+ /** Class toggled on the <html> element for dark mode. */
27
+ export const DARK_CLASS = "dark";
28
+
29
+ /**
30
+ * Custom property that re-proportions every radius token at once.
31
+ * `1` is the designed default; `0` gives fully square corners.
32
+ */
33
+ export const RADIUS_SCALE_PROPERTY = "--radius-scale";
34
+
35
+ export function isThemePreset(value: string): value is ThemePreset {
36
+ return (THEME_PRESETS as readonly string[]).includes(value);
37
+ }
38
+
39
+ export function isColorMode(value: string): value is ColorMode {
40
+ return (COLOR_MODES as readonly string[]).includes(value);
41
+ }
@@ -0,0 +1,21 @@
1
+ /* Theme preset: amber.
2
+ * Apply with data-theme="amber" on the <html> element. Only the brand-carrying
3
+ * tokens are reassigned; every neutral, radius and motion token is inherited. */
4
+
5
+ [data-theme="amber"] {
6
+ /* Darker than the amber a brand palette would pick. A bright amber cannot be
7
+ read as text on a light background — it tops out around 2.4:1 — and this
8
+ token is also the focus ring, which has its own 3:1 floor. The colour that
9
+ satisfies both is an ochre. */
10
+ --primary: oklch(0.55 0.155 70);
11
+ --primary-hover: oklch(0.505 0.155 70);
12
+ --primary-active: oklch(0.467 0.155 70);
13
+ --primary-foreground: oklch(0.985 0.002 265);
14
+ }
15
+
16
+ .dark[data-theme="amber"] {
17
+ --primary: oklch(0.8 0.15 70);
18
+ --primary-hover: oklch(0.845 0.15 70);
19
+ --primary-active: oklch(0.755 0.15 70);
20
+ --primary-foreground: oklch(0.16 0.02 70);
21
+ }
@@ -0,0 +1,17 @@
1
+ /* Theme preset: emerald.
2
+ * Apply with data-theme="emerald" on the <html> element. Only the brand-carrying
3
+ * tokens are reassigned; every neutral, radius and motion token is inherited. */
4
+
5
+ [data-theme="emerald"] {
6
+ --primary: oklch(0.53 0.13 162);
7
+ --primary-hover: oklch(0.5 0.13 162);
8
+ --primary-active: oklch(0.447 0.13 162);
9
+ --primary-foreground: oklch(0.985 0.002 265);
10
+ }
11
+
12
+ .dark[data-theme="emerald"] {
13
+ --primary: oklch(0.645 0.12 162);
14
+ --primary-hover: oklch(0.69 0.12 162);
15
+ --primary-active: oklch(0.6 0.12 162);
16
+ --primary-foreground: oklch(0.155 0.03 162);
17
+ }
@@ -0,0 +1,7 @@
1
+ /* Import individually, or import this file to make every preset available. */
2
+ @import "./ocean.css";
3
+ @import "./emerald.css";
4
+ @import "./violet.css";
5
+ @import "./rose.css";
6
+ @import "./amber.css";
7
+ @import "./monochrome.css";
@@ -0,0 +1,18 @@
1
+ /* Theme preset: monochrome.
2
+ * Apply with data-theme="monochrome" on the <html> element. Drops brand hue
3
+ * entirely — useful for editorial surfaces and for testing that no component
4
+ * relies on colour alone to convey state. */
5
+
6
+ [data-theme="monochrome"] {
7
+ --primary: var(--color-neutral-900);
8
+ --primary-hover: var(--color-neutral-800);
9
+ --primary-active: var(--color-neutral-700);
10
+ --primary-foreground: var(--color-neutral-50);
11
+ }
12
+
13
+ .dark[data-theme="monochrome"] {
14
+ --primary: var(--color-neutral-100);
15
+ --primary-hover: var(--color-neutral-50);
16
+ --primary-active: var(--color-neutral-300);
17
+ --primary-foreground: var(--color-neutral-950);
18
+ }
@@ -0,0 +1,17 @@
1
+ /* Theme preset: ocean.
2
+ * Apply with data-theme="ocean" on the <html> element. Only the brand-carrying
3
+ * tokens are reassigned; every neutral, radius and motion token is inherited. */
4
+
5
+ [data-theme="ocean"] {
6
+ --primary: oklch(0.53 0.15 232);
7
+ --primary-hover: oklch(0.5 0.15 232);
8
+ --primary-active: oklch(0.447 0.15 232);
9
+ --primary-foreground: oklch(0.985 0.002 265);
10
+ }
11
+
12
+ .dark[data-theme="ocean"] {
13
+ --primary: oklch(0.645 0.135 232);
14
+ --primary-hover: oklch(0.69 0.135 232);
15
+ --primary-active: oklch(0.6 0.135 232);
16
+ --primary-foreground: oklch(0.155 0.03 232);
17
+ }
@@ -0,0 +1,17 @@
1
+ /* Theme preset: rose.
2
+ * Apply with data-theme="rose" on the <html> element. Only the brand-carrying
3
+ * tokens are reassigned; every neutral, radius and motion token is inherited. */
4
+
5
+ [data-theme="rose"] {
6
+ --primary: oklch(0.545 0.195 17);
7
+ --primary-hover: oklch(0.5 0.195 17);
8
+ --primary-active: oklch(0.462 0.195 17);
9
+ --primary-foreground: oklch(0.985 0.002 265);
10
+ }
11
+
12
+ .dark[data-theme="rose"] {
13
+ --primary: oklch(0.645 0.17 17);
14
+ --primary-hover: oklch(0.69 0.17 17);
15
+ --primary-active: oklch(0.6 0.17 17);
16
+ --primary-foreground: oklch(0.155 0.03 17);
17
+ }
@@ -0,0 +1,17 @@
1
+ /* Theme preset: violet.
2
+ * Apply with data-theme="violet" on the <html> element. Only the brand-carrying
3
+ * tokens are reassigned; every neutral, radius and motion token is inherited. */
4
+
5
+ [data-theme="violet"] {
6
+ --primary: oklch(0.545 0.205 302);
7
+ --primary-hover: oklch(0.5 0.205 302);
8
+ --primary-active: oklch(0.462 0.205 302);
9
+ --primary-foreground: oklch(0.985 0.002 265);
10
+ }
11
+
12
+ .dark[data-theme="violet"] {
13
+ --primary: oklch(0.645 0.175 302);
14
+ --primary-hover: oklch(0.69 0.175 302);
15
+ --primary-active: oklch(0.6 0.175 302);
16
+ --primary-foreground: oklch(0.155 0.03 302);
17
+ }
package/src/tokens.css ADDED
@@ -0,0 +1,275 @@
1
+ /* -----------------------------------------------------------------------------
2
+ * Tier 1 — raw design scales.
3
+ *
4
+ * These values never change between light and dark mode. Components must NOT
5
+ * reference them directly; they consume the Tier 2 semantic tokens in base.css.
6
+ * See docs/architecture/0002-design-tokens.md.
7
+ * -------------------------------------------------------------------------- */
8
+
9
+ @theme {
10
+ /* --- Neutrals -------------------------------------------------------------
11
+ * A cool-tinted grey ramp (hue 265, very low chroma). The slight blue cast
12
+ * keeps large surfaces from reading as flat newsprint grey under dark mode.
13
+ */
14
+ --color-neutral-50: oklch(0.985 0.002 265);
15
+ --color-neutral-100: oklch(0.968 0.004 265);
16
+ --color-neutral-200: oklch(0.928 0.006 265);
17
+ --color-neutral-300: oklch(0.874 0.009 265);
18
+ --color-neutral-400: oklch(0.712 0.013 265);
19
+ --color-neutral-500: oklch(0.532 0.015 265);
20
+ --color-neutral-600: oklch(0.452 0.015 265);
21
+ --color-neutral-700: oklch(0.371 0.014 265);
22
+ --color-neutral-800: oklch(0.279 0.012 265);
23
+ --color-neutral-900: oklch(0.212 0.011 265);
24
+ --color-neutral-950: oklch(0.145 0.01 265);
25
+
26
+ /* --- Status hues ---------------------------------------------------------- */
27
+ --color-red-500: oklch(0.577 0.22 27);
28
+ --color-red-400: oklch(0.66 0.2 27);
29
+ --color-green-500: oklch(0.53 0.14 152);
30
+ --color-green-400: oklch(0.68 0.135 152);
31
+ --color-amber-500: oklch(0.55 0.15 78);
32
+ --color-amber-400: oklch(0.82 0.14 82);
33
+ --color-blue-500: oklch(0.545 0.13 240);
34
+ --color-blue-400: oklch(0.685 0.125 240);
35
+
36
+ /* --- Radius ---------------------------------------------------------------
37
+ * A 1.5x-ish ladder driven by a single multiplier. Setting --radius-scale on
38
+ * :root re-proportions every corner in the system at once, which is the knob
39
+ * the theme editor and CLI expose to consumers.
40
+ */
41
+ --radius-xs: calc(0.25rem * var(--radius-scale, 1));
42
+ --radius-sm: calc(0.375rem * var(--radius-scale, 1));
43
+ --radius-md: calc(0.5rem * var(--radius-scale, 1));
44
+ --radius-lg: calc(0.75rem * var(--radius-scale, 1));
45
+ --radius-xl: calc(1rem * var(--radius-scale, 1));
46
+ --radius-2xl: calc(1.5rem * var(--radius-scale, 1));
47
+ --radius-3xl: calc(2rem * var(--radius-scale, 1));
48
+ --radius-full: 9999px;
49
+
50
+ /* --- Typography -----------------------------------------------------------
51
+ * Base size is 15px, not 16px: this is an application UI system, and 15px is
52
+ * the density most product surfaces (dashboards, tables, side panels) want.
53
+ * Marketing pages can step up to --text-lg for body copy.
54
+ */
55
+ --font-sans:
56
+ ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
57
+ "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
58
+ --font-mono:
59
+ ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
60
+
61
+ --text-2xs: 0.6875rem;
62
+ --text-2xs--line-height: 1rem;
63
+ --text-xs: 0.75rem;
64
+ --text-xs--line-height: 1.125rem;
65
+ --text-sm: 0.875rem;
66
+ --text-sm--line-height: 1.25rem;
67
+ --text-base: 0.9375rem;
68
+ --text-base--line-height: 1.4rem;
69
+ --text-lg: 1.0625rem;
70
+ --text-lg--line-height: 1.6rem;
71
+ --text-xl: 1.25rem;
72
+ --text-xl--line-height: 1.75rem;
73
+ --text-2xl: 1.5rem;
74
+ --text-2xl--line-height: 2rem;
75
+ --text-2xl--letter-spacing: -0.014em;
76
+ --text-3xl: 1.875rem;
77
+ --text-3xl--line-height: 2.25rem;
78
+ --text-3xl--letter-spacing: -0.02em;
79
+ --text-4xl: 2.25rem;
80
+ --text-4xl--line-height: 2.5rem;
81
+ --text-4xl--letter-spacing: -0.024em;
82
+
83
+ --tracking-tight: -0.014em;
84
+ --tracking-normal: 0em;
85
+ --tracking-wide: 0.02em;
86
+
87
+ /* --- Elevation ------------------------------------------------------------
88
+ * Shadows are built from a themeable --shadow-color so they tint with the
89
+ * surface instead of muddying it with pure black.
90
+ */
91
+ --shadow-xs: 0 1px 2px -1px var(--shadow-color);
92
+ --shadow-sm: 0 1px 2px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
93
+ --shadow-md: 0 2px 4px -2px var(--shadow-color), 0 6px 12px -4px var(--shadow-color);
94
+ --shadow-lg: 0 4px 8px -4px var(--shadow-color), 0 12px 24px -8px var(--shadow-color);
95
+ --shadow-xl: 0 8px 16px -8px var(--shadow-color), 0 24px 48px -12px var(--shadow-color);
96
+
97
+ /* --- Motion ---------------------------------------------------------------
98
+ * Durations stay short: UI motion should confirm an action, not perform one.
99
+ */
100
+ --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
101
+ --ease-in-quint: cubic-bezier(0.64, 0, 0.78, 0);
102
+ --ease-in-out-quint: cubic-bezier(0.65, 0, 0.35, 1);
103
+ --ease-overshoot: cubic-bezier(0.34, 1.4, 0.64, 1);
104
+
105
+ --animate-spin: spin 0.7s linear infinite;
106
+ --animate-pulse-soft: pulse-soft 1.8s var(--ease-in-out-quint) infinite;
107
+
108
+ /* Overlay surfaces. Exits are deliberately faster than entrances: an opening
109
+ * surface is information arriving and can afford to be seen, a closing one is
110
+ * the user already moving on. */
111
+ --animate-overlay-in: fade-in var(--duration-normal) var(--ease-out-quint);
112
+ --animate-overlay-out: fade-out var(--duration-fast) var(--ease-in-quint);
113
+ --animate-dialog-in: dialog-in var(--duration-normal) var(--ease-out-quint);
114
+ --animate-dialog-out: dialog-out var(--duration-fast) var(--ease-in-quint);
115
+
116
+ /* Floating surfaces grow from the edge they are anchored to. Direction comes
117
+ * from transform-origin, which Radix computes, so one keyframe covers all
118
+ * twelve side/align combinations instead of eight hand-written variants. */
119
+ --animate-float-in: float-in var(--duration-fast) var(--ease-out-quint);
120
+ --animate-float-out: float-out var(--duration-instant) var(--ease-in-quint);
121
+
122
+ /* Edge-anchored panels. The travel direction is supplied by --slide-x and
123
+ * --slide-y, set per side by the component, so four sides share one keyframe
124
+ * pair rather than eight. */
125
+ --animate-slide-in: slide-in var(--duration-slow) var(--ease-out-quint);
126
+ --animate-slide-out: slide-out var(--duration-normal) var(--ease-in-quint);
127
+
128
+ /* A toast flicked away should leave along the path the finger was taking,
129
+ * continuing from where the gesture ended rather than snapping back first. */
130
+ --animate-toast-swipe-out: toast-swipe-out var(--duration-fast) var(--ease-out-quint);
131
+
132
+ /* The caret that trails streaming text. Steps rather than a fade, so it reads
133
+ * as a terminal cursor rather than as something loading. */
134
+ --animate-caret: caret 1s steps(2, start) infinite;
135
+
136
+ --animate-accordion-open: accordion-open var(--duration-normal) var(--ease-out-quint);
137
+ --animate-accordion-close: accordion-close var(--duration-fast) var(--ease-in-quint);
138
+
139
+ @keyframes fade-in {
140
+ from {
141
+ opacity: 0;
142
+ }
143
+ }
144
+
145
+ @keyframes fade-out {
146
+ to {
147
+ opacity: 0;
148
+ }
149
+ }
150
+
151
+ @keyframes dialog-in {
152
+ from {
153
+ opacity: 0;
154
+ transform: translateY(0.5rem) scale(0.97);
155
+ }
156
+ }
157
+
158
+ @keyframes dialog-out {
159
+ to {
160
+ opacity: 0;
161
+ transform: translateY(0.25rem) scale(0.98);
162
+ }
163
+ }
164
+
165
+ @keyframes float-in {
166
+ from {
167
+ opacity: 0;
168
+ transform: scale(0.95);
169
+ }
170
+ }
171
+
172
+ @keyframes float-out {
173
+ to {
174
+ opacity: 0;
175
+ transform: scale(0.97);
176
+ }
177
+ }
178
+
179
+ @keyframes slide-in {
180
+ from {
181
+ transform: translate3d(var(--slide-x, 0), var(--slide-y, 0), 0);
182
+ }
183
+ }
184
+
185
+ @keyframes slide-out {
186
+ to {
187
+ transform: translate3d(var(--slide-x, 0), var(--slide-y, 0), 0);
188
+ }
189
+ }
190
+
191
+ @keyframes toast-swipe-out {
192
+ from {
193
+ transform: translate3d(var(--radix-toast-swipe-end-x, 0), 0, 0);
194
+ }
195
+ to {
196
+ transform: translate3d(calc(100% + 1rem), 0, 0);
197
+ opacity: 0;
198
+ }
199
+ }
200
+
201
+ @keyframes caret {
202
+ 0%,
203
+ 100% {
204
+ opacity: 1;
205
+ }
206
+ 50% {
207
+ opacity: 0;
208
+ }
209
+ }
210
+
211
+ @keyframes accordion-open {
212
+ from {
213
+ height: 0;
214
+ opacity: 0;
215
+ }
216
+ to {
217
+ height: var(--radix-accordion-content-height);
218
+ opacity: 1;
219
+ }
220
+ }
221
+
222
+ @keyframes accordion-close {
223
+ from {
224
+ height: var(--radix-accordion-content-height);
225
+ opacity: 1;
226
+ }
227
+ to {
228
+ height: 0;
229
+ opacity: 0;
230
+ }
231
+ }
232
+
233
+ @keyframes spin {
234
+ to {
235
+ transform: rotate(360deg);
236
+ }
237
+ }
238
+
239
+ @keyframes pulse-soft {
240
+ 0%,
241
+ 100% {
242
+ opacity: 1;
243
+ }
244
+ 50% {
245
+ opacity: 0.45;
246
+ }
247
+ }
248
+ }
249
+
250
+ /* --- Non-utility scales ------------------------------------------------------
251
+ * These are not Tailwind theme namespaces, so they are plain custom properties
252
+ * consumed via var() or arbitrary values (e.g. z-[var(--z-popover)]).
253
+ */
254
+ :root {
255
+ --duration-instant: 75ms;
256
+ --duration-fast: 130ms;
257
+ --duration-normal: 200ms;
258
+ --duration-slow: 320ms;
259
+ --duration-slower: 480ms;
260
+
261
+ --size-icon-xs: 0.75rem;
262
+ --size-icon-sm: 0.875rem;
263
+ --size-icon-md: 1rem;
264
+ --size-icon-lg: 1.25rem;
265
+ --size-icon-xl: 1.5rem;
266
+
267
+ --z-base: 0;
268
+ --z-sticky: 100;
269
+ --z-drawer: 200;
270
+ --z-overlay: 300;
271
+ --z-modal: 400;
272
+ --z-popover: 500;
273
+ --z-toast: 600;
274
+ --z-tooltip: 700;
275
+ }