srcdev-nuxt-components 9.1.55 → 9.1.57

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.
Files changed (104) hide show
  1. package/.claude/settings.json +30 -2
  2. package/.claude/skills/components/alert-content-inner.md +60 -0
  3. package/.claude/skills/components/display-dialog.md +80 -0
  4. package/.claude/skills/components/display-prompt.md +163 -0
  5. package/.claude/skills/components/display-toast.md +235 -0
  6. package/.claude/skills/index.md +7 -3
  7. package/.claude/skills/theming-colour-ramps.md +328 -0
  8. package/.claude/skills/theming-override-default.md +115 -186
  9. package/.claude/skills/theming-partial-override.md +88 -75
  10. package/README.md +166 -0
  11. package/app/app.config.ts +44 -0
  12. package/app/assets/styles/setup/01.config/_head.css +3 -3
  13. package/app/assets/styles/setup/02.colours/_amber.css +12 -10
  14. package/app/assets/styles/setup/02.colours/_blue.css +10 -9
  15. package/app/assets/styles/setup/02.colours/_green.css +12 -11
  16. package/app/assets/styles/setup/02.colours/_orange.css +12 -10
  17. package/app/assets/styles/setup/02.colours/_red.css +10 -9
  18. package/app/assets/styles/setup/02.colours/_slate.css +12 -11
  19. package/app/assets/styles/setup/02.colours/_sunset.css +12 -10
  20. package/app/assets/styles/setup/02.colours/_theme-params.css +18 -0
  21. package/app/assets/styles/setup/02.colours/index.css +1 -0
  22. package/app/assets/styles/setup/03.theming/_default.css +87 -0
  23. package/app/assets/styles/setup/03.theming/_error.css +14 -0
  24. package/app/assets/styles/setup/03.theming/_success.css +4 -0
  25. package/app/assets/styles/setup/03.theming/_theme-slots.css +16 -0
  26. package/app/assets/styles/setup/03.theming/_warning.css +13 -0
  27. package/app/assets/styles/setup/03.theming/index.css +6 -4
  28. package/app/assets/styles/setup/03.theming/theme-ramp.css +19 -0
  29. package/app/assets/styles/setup/04.elements/forms/00.element-defaults.css +0 -7
  30. package/app/assets/styles/setup/04.elements/forms/06.button-geometry.css +1 -1
  31. package/app/assets/styles/setup/index.css +1 -1
  32. package/app/components/01.atoms/display-dialog/DisplayDialog.vue +74 -24
  33. package/app/components/01.atoms/display-dialog/tests/DisplayDialog.spec.ts +148 -14
  34. package/app/components/01.atoms/display-dialog/tests/__snapshots__/DisplayDialog.spec.ts.snap +3 -3
  35. package/app/components/01.atoms/prompt/DisplayPrompt.vue +113 -0
  36. package/app/components/01.atoms/prompt/stories/DisplayPrompt.stories.ts +112 -0
  37. package/app/components/01.atoms/prompt/tests/DisplayPrompt.spec.ts +205 -0
  38. package/app/components/01.atoms/toast/DisplayToast.vue +327 -0
  39. package/app/components/01.atoms/toast/DisplayToastProvider.vue +362 -0
  40. package/app/components/01.atoms/toast/stories/DisplayToast.stories.ts +195 -0
  41. package/app/components/01.atoms/toast/stories/DisplayToastProvider.stories.ts +142 -0
  42. package/app/components/01.atoms/toast/tests/DisplayToast.spec.ts +266 -0
  43. package/app/components/01.atoms/toast/tests/DisplayToastProvider.spec.ts +256 -0
  44. package/app/components/02.molecules/action-menu/ActionMenu.vue +8 -1
  45. package/app/components/02.molecules/action-menu/ActionMenuItemCore.vue +11 -3
  46. package/app/components/02.molecules/alert-content/AlertContent.vue +67 -0
  47. package/app/components/02.molecules/alert-content/AlertContentInner.vue +153 -0
  48. package/app/components/02.molecules/alert-content/stories/AlertContent.stories.ts +131 -0
  49. package/app/components/02.molecules/alert-content/tests/AlertContent.spec.ts +135 -0
  50. package/app/components/02.molecules/alert-content/tests/AlertContentInner.spec.ts +135 -0
  51. package/app/components/02.molecules/alert-masked-content/AlertMaskedContent.vue +78 -0
  52. package/app/components/02.molecules/alert-masked-content/stories/AlertMaskedContent.stories.ts +132 -0
  53. package/app/components/02.molecules/alert-masked-content/tests/AlertMaskedContent.spec.ts +149 -0
  54. package/app/components/05.forms/input-button/InputButtonCore.vue +35 -39
  55. package/app/components/05.forms/input-checkbox-radio/InputCheckboxRadioButton.vue +8 -8
  56. package/app/components/05.forms/input-checkbox-radio/InputCheckboxRadioCore.vue +5 -5
  57. package/app/components/05.forms/input-copy/InputCopyCore.vue +7 -7
  58. package/app/components/05.forms/input-number/InputNumberCore.vue +5 -5
  59. package/app/components/05.forms/input-select/InputSelectCore.vue +6 -6
  60. package/app/components/05.forms/input-text/InputTextCore.vue +6 -6
  61. package/app/components/05.forms/input-text/variants/InputTextAsNumberWithLabel.vue +2 -2
  62. package/app/components/05.forms/input-textarea/InputTextareaCore.vue +5 -5
  63. package/app/components/05.forms/pending-effect/PendingEffect.vue +60 -60
  64. package/app/components/05.forms/toggle-switch/ToggleSwitchCore.vue +10 -10
  65. package/app/components/05.forms/triple-toggle-switch/TripleToggleSwitchCore.vue +4 -4
  66. package/app/components/display-theme-switch/DisplayThemeSwitch.vue +4 -4
  67. package/app/components/display-tooltip/DisplayTooltip.vue +4 -4
  68. package/app/composables/useBodyLock.ts +21 -0
  69. package/app/composables/useDialogControls.ts +11 -11
  70. package/app/composables/useToastQueue.ts +39 -0
  71. package/app/layouts/default.vue +1 -1
  72. package/app/pages/ui/display-dialog.vue +275 -127
  73. package/app/pages/ui/display-prompt.vue +255 -52
  74. package/app/pages/ui/display-toast.vue +278 -299
  75. package/app/pages/ui/mask-element.vue +25 -3
  76. package/app/pages/ui/settings.vue +9 -35
  77. package/app/types/app-config.d.ts +41 -0
  78. package/app/types/components/display-prompt.d.ts +11 -0
  79. package/app/types/components/display-toast.d.ts +11 -9
  80. package/app/types/components/index.ts +2 -0
  81. package/app/types/components/semantic-theme.d.ts +1 -0
  82. package/nuxt.config.ts +16 -0
  83. package/package.json +8 -4
  84. package/ramps.config.mjs +28 -0
  85. package/scripts/check-ramps.mjs +50 -0
  86. package/scripts/generate-consumer-ramps.mjs +100 -0
  87. package/scripts/generate-ramps.mjs +92 -0
  88. package/app/assets/styles/setup/03.theming/default/_dark.css +0 -156
  89. package/app/assets/styles/setup/03.theming/default/_light.css +0 -166
  90. package/app/assets/styles/setup/03.theming/default/index.css +0 -2
  91. package/app/assets/styles/setup/03.theming/error/_dark.css +0 -56
  92. package/app/assets/styles/setup/03.theming/error/_light.css +0 -74
  93. package/app/assets/styles/setup/03.theming/error/index.css +0 -2
  94. package/app/assets/styles/setup/03.theming/success/_dark.css +0 -50
  95. package/app/assets/styles/setup/03.theming/success/_light.css +0 -65
  96. package/app/assets/styles/setup/03.theming/success/index.css +0 -2
  97. package/app/assets/styles/setup/03.theming/warning/_dark.css +0 -50
  98. package/app/assets/styles/setup/03.theming/warning/_light.css +0 -64
  99. package/app/assets/styles/setup/03.theming/warning/index.css +0 -2
  100. package/app/components/display-prompt/DisplayPromptCore.vue +0 -228
  101. package/app/components/display-prompt/variants/DisplayPromptError.vue +0 -53
  102. package/app/components/display-toast/DisplayToast.vue +0 -447
  103. package/app/components/display-toast/molecules/DefaultToastContent.vue +0 -163
  104. package/app/components/display-toast/stories/DisplayToast.stories.ts +0 -380
package/README.md CHANGED
@@ -104,6 +104,172 @@ When disabled, no `data-color-scheme` attribute is set on `<html>` and `useColou
104
104
 
105
105
  ---
106
106
 
107
+ ## Colour System
108
+
109
+ The layer ships a parametric oklch colour ramp. Two CSS custom properties — `--theme-hue` and
110
+ `--theme-chroma` — drive an 11-step colour scale (`--colour-theme-0` to `--colour-theme-10`) that
111
+ all themed components (buttons, inputs, prompts, toasts) read through a shared set of semantic
112
+ slots. Switching the palette is a two-variable change; no token-by-token remapping is required.
113
+
114
+ ### How it works
115
+
116
+ A formula declared on every potential theme host (`html`, `[data-theme]`, `[data-invalid]`)
117
+ computes the scale from the two params:
118
+
119
+ ```css
120
+ --colour-theme-6: oklch(56% calc(var(--theme-chroma) * 1.00) var(--theme-hue)); /* peak chroma */
121
+ --colour-theme-0: oklch(98% calc(var(--theme-chroma) * 0.045) var(--theme-hue)); /* near-white */
122
+ --colour-theme-10: oklch(25% calc(var(--theme-chroma) * 0.64) var(--theme-hue)); /* near-black */
123
+ ```
124
+
125
+ Scale direction: **00 = lightest, 10 = darkest**. Chroma tapers at both ends and peaks at step 06.
126
+
127
+ Nine semantic slots (`--theme-surface`, `--theme-accent`, `--theme-text`, `--theme-ring`, etc.) are derived from the
128
+ scale using `light-dark()` and are shared by all components. Theme variants (`data-theme="success"`,
129
+ `"warning"`, `"error"`) swap `--theme-hue` and `--theme-chroma` on their element; the formula
130
+ re-evaluates locally so each themed element gets its own full palette without affecting the page.
131
+
132
+ ### Built-in named palettes
133
+
134
+ | Name | Hue | Used for |
135
+ |--------|-----|---------------------------------------------------|
136
+ | blue | 255 | Default (page-level) |
137
+ | red | 30 | Error / `data-theme="error"` |
138
+ | green | 157 | Success / `data-theme="success"` |
139
+ | amber | 75 | Available for consumer use |
140
+ | orange | 60 | Available for consumer use |
141
+ | sunset | 50 | Warning / `data-theme="warning"` (with hue drift) |
142
+ | slate | 260 | Near-neutral grey |
143
+
144
+ ### Consumer app: generating a custom palette
145
+
146
+ The recommended approach for a consuming app is to generate your own named colour files. This gives
147
+ you clean step variables (`--gold-09`, `--gold-04`) rather than raw oklch values in your theme
148
+ overrides.
149
+
150
+ #### 1. Create `ramps.config.mjs` in your project root
151
+
152
+ Define the palettes you want. You can add new ones, reuse a built-in name to override the
153
+ layer's values, or do both. Consumer CSS loads after the layer, so your generated files win
154
+ the cascade automatically:
155
+
156
+ ```js
157
+ // ramps.config.mjs
158
+ export const ramps = {
159
+ // New palette — adds --gold-00..10 and --palette-gold-* vars
160
+ gold: { hue: 85, chroma: 0.20 },
161
+
162
+ // Override a built-in — replaces the layer's --blue-00..10 with your values
163
+ // blue: { hue: 240, chroma: 0.18 },
164
+
165
+ // Override the error palette — all error/invalid states use your red
166
+ // red: { hue: 15, chroma: 0.26 },
167
+
168
+ // Optional — add hue drift to rotate colour across the scale:
169
+ // copper: { hue: 45, chroma: 0.21, drift: -15 },
170
+ };
171
+ ```
172
+
173
+ #### 2. Add the generator script to `package.json`
174
+
175
+ The script lives in the layer's `node_modules` — no copying required. Prepending it to `dev`,
176
+ `build`, and `generate` prevents generated CSS from drifting out of sync with `ramps.config.mjs`:
177
+
178
+ ```json
179
+ "scripts": {
180
+ "generate:ramps": "node node_modules/srcdev-nuxt-components/scripts/generate-consumer-ramps.mjs",
181
+ "dev": "npm run generate:ramps && nuxt dev",
182
+ "build": "npm run generate:ramps && nuxt build",
183
+ "generate": "npm run generate:ramps && nuxt generate"
184
+ }
185
+ ```
186
+
187
+ > **Do not manually edit generated files.** They carry a `/* GENERATED */` comment at the top
188
+ > and are rebuilt every time the generator runs. Put all changes in `ramps.config.mjs` instead.
189
+
190
+ #### 3. Run it
191
+
192
+ ```bash
193
+ npm run generate:ramps
194
+ ```
195
+
196
+ Produces in `app/assets/styles/setup/02.colours/`:
197
+
198
+ - `_gold.css` — `--gold-00` … `--gold-10` (literal oklch values)
199
+ - `_palette-params.css` — `--palette-gold-hue`, `--palette-gold-chroma`
200
+
201
+ #### 4. Import the generated files
202
+
203
+ In your `app/assets/styles/setup/02.colours/index.css` (create if it doesn't exist):
204
+
205
+ ```css
206
+ @import "./_palette-params";
207
+ @import "./_gold";
208
+ ```
209
+
210
+ #### 5. Set the palette as your theme default
211
+
212
+ ```css
213
+ /* app/assets/styles/setup/03.theming/_default.css */
214
+ :where(html) {
215
+ --theme-hue: var(--palette-gold-hue);
216
+ --theme-chroma: var(--palette-gold-chroma);
217
+
218
+ /* Page-level tokens — readable named steps, not raw oklch */
219
+ --colour-text-accent: light-dark(var(--gold-09), var(--gold-04));
220
+ --colour-text-eyebrow: light-dark(var(--gold-09), var(--gold-04));
221
+ }
222
+ ```
223
+
224
+ #### 6. Wire up in your setup index
225
+
226
+ ```css
227
+ /* app/assets/styles/setup/index.css */
228
+ @import "./02.colours/";
229
+ @import "./03.theming/_default.css";
230
+ ```
231
+
232
+ And in `app/assets/styles/main.css`:
233
+
234
+ ```css
235
+ @import "./setup/";
236
+ ```
237
+
238
+ ### Hue quick reference
239
+
240
+ | Range | Colour |
241
+ |---------|----------------|
242
+ | 0–30 | Red / pink |
243
+ | 30–70 | Orange / amber |
244
+ | 70–100 | Yellow / gold |
245
+ | 100–160 | Green |
246
+ | 220–270 | Blue |
247
+ | 270–310 | Violet |
248
+
249
+ Use [oklch.com](https://oklch.com) to preview values before committing.
250
+
251
+ ### Generator (for library contributors)
252
+
253
+ Named palettes in the layer itself are maintained in `ramps.config.mjs` at the repo root:
254
+
255
+ ```bash
256
+ npm run generate:ramps # rebuild all layer CSS from ramps.config.mjs
257
+ npm run check:ramps # CI: fail if generated CSS is out of date
258
+ ```
259
+
260
+ ### Further reading
261
+
262
+ | Guide | Location |
263
+ |-------|----------|
264
+ | Full ramp architecture, formula details, hue drift | `.claude/skills/theming-colour-ramps.md` |
265
+ | Full palette swap for a consumer app | `.claude/skills/theming-override-default.md` |
266
+ | Partial token override (palette shift, buttons, inputs) | `.claude/skills/theming-partial-override.md` |
267
+ | Disable light/dark mode support | `.claude/skills/colour-scheme-disable.md` |
268
+
269
+ Skills are available in your project after running `npm run setup:claude`.
270
+
271
+ ---
272
+
107
273
  ## Known Build / Production Issues
108
274
 
109
275
  ### `ERR_MODULE_NOT_FOUND: vue/index.mjs` — 500 on every request (Node 22)
@@ -0,0 +1,44 @@
1
+ import type { SemanticTheme, DisplayPromptTheme, DisplayToastTheme, DisplayToastPosition, DisplayToastAlignment } from "~/types/components";
2
+
3
+ export default defineAppConfig({
4
+ srcdev: {
5
+ alertContent: {
6
+ icons: {
7
+ info: "akar-icons:info",
8
+ success: "akar-icons:check",
9
+ warning: "akar-icons:circle-alert",
10
+ error: "akar-icons:circle-alert",
11
+ },
12
+ dismissIcon: "material-symbols:close",
13
+ },
14
+ displayPrompt: {
15
+ theme: "info" as DisplayPromptTheme,
16
+ dismissible: false,
17
+ useAutoFocus: false,
18
+ masked: false,
19
+ },
20
+ displayToast: {
21
+ appearance: {
22
+ theme: "info" as DisplayToastTheme,
23
+ position: "top" as DisplayToastPosition,
24
+ alignment: "right" as DisplayToastAlignment,
25
+ fullWidth: false,
26
+ masked: false,
27
+ },
28
+ behavior: {
29
+ autoDismiss: true,
30
+ duration: 5000,
31
+ revealDuration: 550,
32
+ },
33
+ },
34
+ displayDialog: {
35
+ variant: "dialog" as "dialog" | "modal" | "confirm" | "alert" | "fullscreen",
36
+ justifyDialog: "center" as "start" | "center" | "end",
37
+ alignDialog: "center" as "start" | "center" | "end",
38
+ lockViewport: true,
39
+ allowContentScroll: false,
40
+ theme: undefined as SemanticTheme | undefined,
41
+ closeIcon: "bitcoin-icons:cross-filled",
42
+ },
43
+ },
44
+ });
@@ -1,14 +1,14 @@
1
1
  html {
2
- /* color-scheme: light dark; */
2
+ color-scheme: light dark;
3
3
  interpolate-size: allow-keywords;
4
4
 
5
- /* &.light {
5
+ &.light {
6
6
  color-scheme: light;
7
7
  }
8
8
 
9
9
  &.dark {
10
10
  color-scheme: dark;
11
- } */
11
+ }
12
12
 
13
13
  font-size: 62.5%;
14
14
 
@@ -1,12 +1,14 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
1
2
  :where(html) {
2
- --amber-01: oklch(0.945 0.064 75);
3
- --amber-02: oklch(0.894 0.11 75);
4
- --amber-03: oklch(0.788 0.177 75);
5
- --amber-04: oklch(0.733 0.194 75);
6
- --amber-05: oklch(0.592 0.188 75);
7
- --amber-06: oklch(0.501 0.166 75);
8
- --amber-07: oklch(0.433 0.144 75);
9
- --amber-08: oklch(0.383 0.123 75);
10
- --amber-09: oklch(0.238 0.1 75);
11
- --amber-10: oklch(0.188 0.072 75);
3
+ --amber-00: oklch(98% 0.0086 75);
4
+ --amber-01: oklch(94% 0.0342 75);
5
+ --amber-02: oklch(88% 0.0608 75);
6
+ --amber-03: oklch(80% 0.095 75);
7
+ --amber-04: oklch(72% 0.1292 75);
8
+ --amber-05: oklch(64% 0.1634 75);
9
+ --amber-06: oklch(56% 0.19 75);
10
+ --amber-07: oklch(48% 0.1805 75);
11
+ --amber-08: oklch(40% 0.1634 75);
12
+ --amber-09: oklch(32% 0.1463 75);
13
+ --amber-10: oklch(25% 0.1216 75);
12
14
  }
@@ -1,13 +1,14 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
1
2
  :where(html) {
2
- --blue-00: oklch(98% 0.01 255);
3
- --blue-01: oklch(94% 0.04 255);
4
- --blue-02: oklch(88% 0.07 255);
3
+ --blue-00: oklch(98% 0.0099 255);
4
+ --blue-01: oklch(94% 0.0396 255);
5
+ --blue-02: oklch(88% 0.0704 255);
5
6
  --blue-03: oklch(80% 0.11 255);
6
- --blue-04: oklch(72% 0.15 255);
7
- --blue-05: oklch(64% 0.19 255);
7
+ --blue-04: oklch(72% 0.1496 255);
8
+ --blue-05: oklch(64% 0.1892 255);
8
9
  --blue-06: oklch(56% 0.22 255);
9
- --blue-07: oklch(48% 0.21 255);
10
- --blue-08: oklch(40% 0.19 255);
11
- --blue-09: oklch(32% 0.17 255);
12
- --blue-10: oklch(25% 0.14 255);
10
+ --blue-07: oklch(48% 0.209 255);
11
+ --blue-08: oklch(40% 0.1892 255);
12
+ --blue-09: oklch(32% 0.1694 255);
13
+ --blue-10: oklch(25% 0.1408 255);
13
14
  }
@@ -1,13 +1,14 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
1
2
  :where(html) {
2
- --green-00: oklch(0.99 0.02 157);
3
- --green-01: oklch(0.95 0.078 157);
4
- --green-02: oklch(0.889 0.19 157);
5
- --green-03: oklch(0.829 0.197 157);
6
- --green-04: oklch(0.768 0.183 157);
7
- --green-05: oklch(0.708 0.169 157);
8
- --green-06: oklch(0.647 0.154 157);
9
- --green-07: oklch(0.587 0.14 157);
10
- --green-08: oklch(0.526 0.125 157);
11
- --green-09: oklch(0.466 0.111 157);
12
- --green-10: oklch(0.405 0.096 157);
3
+ --green-00: oklch(98% 0.0086 157);
4
+ --green-01: oklch(94% 0.0342 157);
5
+ --green-02: oklch(88% 0.0608 157);
6
+ --green-03: oklch(80% 0.095 157);
7
+ --green-04: oklch(72% 0.1292 157);
8
+ --green-05: oklch(64% 0.1634 157);
9
+ --green-06: oklch(56% 0.19 157);
10
+ --green-07: oklch(48% 0.1805 157);
11
+ --green-08: oklch(40% 0.1634 157);
12
+ --green-09: oklch(32% 0.1463 157);
13
+ --green-10: oklch(25% 0.1216 157);
13
14
  }
@@ -1,12 +1,14 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
1
2
  :where(html) {
2
- --orange-01: oklch(0.95 0.037 75);
3
- --orange-02: oklch(0.892 0.083 75);
4
- --orange-03: oklch(0.834 0.132 75);
5
- --orange-04: oklch(0.775 0.149 75);
6
- --orange-05: oklch(0.788 0.177 75);
7
- --orange-06: oklch(0.659 0.127 75);
8
- --orange-07: oklch(0.601 0.115 75);
9
- --orange-08: oklch(0.543 0.104 75);
10
- --orange-09: oklch(0.485 0.093 75);
11
- --orange-10: oklch(0.426 0.082 75);
3
+ --orange-00: oklch(98% 0.0067 60);
4
+ --orange-01: oklch(94% 0.027 60);
5
+ --orange-02: oklch(88% 0.048 60);
6
+ --orange-03: oklch(80% 0.075 60);
7
+ --orange-04: oklch(72% 0.102 60);
8
+ --orange-05: oklch(64% 0.129 60);
9
+ --orange-06: oklch(56% 0.15 60);
10
+ --orange-07: oklch(48% 0.1425 60);
11
+ --orange-08: oklch(40% 0.129 60);
12
+ --orange-09: oklch(32% 0.1155 60);
13
+ --orange-10: oklch(25% 0.096 60);
12
14
  }
@@ -1,13 +1,14 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
1
2
  :where(html) {
2
- --red-00: oklch(98% 0.01 30);
3
- --red-01: oklch(94% 0.04 30);
4
- --red-02: oklch(88% 0.07 30);
3
+ --red-00: oklch(98% 0.0108 30);
4
+ --red-01: oklch(94% 0.0432 30);
5
+ --red-02: oklch(88% 0.0768 30);
5
6
  --red-03: oklch(80% 0.12 30);
6
- --red-04: oklch(72% 0.17 30);
7
- --red-05: oklch(64% 0.21 30);
7
+ --red-04: oklch(72% 0.1632 30);
8
+ --red-05: oklch(64% 0.2064 30);
8
9
  --red-06: oklch(56% 0.24 30);
9
- --red-07: oklch(42% 0.23 30);
10
- --red-08: oklch(46% 0.21 30);
11
- --red-09: oklch(52% 0.22 30);
12
- --red-10: oklch(25% 0.16 30);
10
+ --red-07: oklch(48% 0.228 30);
11
+ --red-08: oklch(40% 0.2064 30);
12
+ --red-09: oklch(32% 0.1848 30);
13
+ --red-10: oklch(25% 0.1536 30);
13
14
  }
@@ -1,13 +1,14 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
1
2
  :where(html) {
2
- --slate-00: oklch(0.98 0.004 256);
3
- --slate-01: oklch(0.932 0.004 256);
4
- --slate-02: oklch(0.86 0.008 256);
5
- --slate-03: oklch(0.716 0.016 256);
6
- --slate-04: oklch(0.645 0.018 256);
7
- --slate-05: oklch(0.548 0.02 264);
8
- --slate-06: oklch(0.459 0.018 264);
9
- --slate-07: oklch(0.396 0.016 264);
10
- --slate-08: oklch(0.349 0.014 264);
11
- --slate-09: oklch(0.303 0.013 264);
12
- --slate-10: oklch(0.256 0.011 264);
3
+ --slate-00: oklch(98% 0.0009 260);
4
+ --slate-01: oklch(94% 0.0036 260);
5
+ --slate-02: oklch(88% 0.0064 260);
6
+ --slate-03: oklch(80% 0.01 260);
7
+ --slate-04: oklch(72% 0.0136 260);
8
+ --slate-05: oklch(64% 0.0172 260);
9
+ --slate-06: oklch(56% 0.02 260);
10
+ --slate-07: oklch(48% 0.019 260);
11
+ --slate-08: oklch(40% 0.0172 260);
12
+ --slate-09: oklch(32% 0.0154 260);
13
+ --slate-10: oklch(25% 0.0128 260);
13
14
  }
@@ -1,12 +1,14 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
1
2
  :where(html) {
2
- --sunset-01: oklch(0.98 0.06 45);
3
- --sunset-02: oklch(0.92 0.08 50);
4
- --sunset-03: oklch(0.82 0.12 55);
5
- --sunset-04: oklch(0.75 0.18 50);
6
- --sunset-05: oklch(0.7 0.2 48);
7
- --sunset-06: oklch(0.65 0.22 45);
8
- --sunset-07: oklch(0.6 0.22 40);
9
- --sunset-08: oklch(0.5 0.2 35);
10
- --sunset-09: oklch(0.4 0.18 30);
11
- --sunset-10: oklch(0.3 0.15 25);
3
+ --sunset-00: oklch(98% 0.0099 50);
4
+ --sunset-01: oklch(94% 0.0396 47.5);
5
+ --sunset-02: oklch(88% 0.0704 45);
6
+ --sunset-03: oklch(80% 0.11 42.5);
7
+ --sunset-04: oklch(72% 0.1496 40);
8
+ --sunset-05: oklch(64% 0.1892 37.5);
9
+ --sunset-06: oklch(56% 0.22 35);
10
+ --sunset-07: oklch(48% 0.209 32.5);
11
+ --sunset-08: oklch(40% 0.1892 30);
12
+ --sunset-09: oklch(32% 0.1694 27.5);
13
+ --sunset-10: oklch(25% 0.1408 25);
12
14
  }
@@ -0,0 +1,18 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
2
+ :where(html) {
3
+ --palette-blue-hue: 255;
4
+ --palette-blue-chroma: 0.22;
5
+ --palette-red-hue: 30;
6
+ --palette-red-chroma: 0.24;
7
+ --palette-green-hue: 157;
8
+ --palette-green-chroma: 0.19;
9
+ --palette-amber-hue: 75;
10
+ --palette-amber-chroma: 0.19;
11
+ --palette-orange-hue: 60;
12
+ --palette-orange-chroma: 0.15;
13
+ --palette-sunset-hue: 50;
14
+ --palette-sunset-chroma: 0.22;
15
+ --palette-sunset-drift: -25;
16
+ --palette-slate-hue: 260;
17
+ --palette-slate-chroma: 0.02;
18
+ }
@@ -1,3 +1,4 @@
1
+ @import "./_theme-params";
1
2
  @import "./_amber";
2
3
  @import "./_blue";
3
4
  @import "./_green";
@@ -0,0 +1,87 @@
1
+ :where(html) {
2
+ /* Default palette — blue */
3
+ --theme-hue: var(--palette-blue-hue);
4
+ --theme-chroma: var(--palette-blue-chroma);
5
+
6
+ /* ===========================================
7
+ GENERIC BODY VARIABLES
8
+ =========================================== */
9
+ --page-bg: light-dark(var(--slate-00), var(--slate-08));
10
+ --colour-text-default: light-dark(var(--slate-09), var(--slate-01));
11
+ --colour-text-accent: light-dark(var(--blue-09), var(--blue-05));
12
+ --colour-text-eyebrow: light-dark(var(--blue-09), var(--blue-05));
13
+
14
+ /* ===========================================
15
+ GLASS PANEL VARIABLES
16
+ =========================================== */
17
+ --glass-panel-bg: light-dark(rgba(255, 255, 255, 0.55), rgba(12, 12, 20, 0.45));
18
+ --glass-panel-border-color: light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.07));
19
+ /* Multi-shadow: opacity driven by light-dark() sub-vars */
20
+ --_gp-shadow-a: light-dark(0.08, 0.5);
21
+ --_gp-shadow-b: light-dark(0.04, 0.3);
22
+ --glass-panel-shadow: 0 8px 32px rgba(0, 0, 0, var(--_gp-shadow-a)), 0 2px 8px rgba(0, 0, 0, var(--_gp-shadow-b));
23
+ --glass-panel-highlight: light-dark(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.04));
24
+
25
+ /* ===========================================
26
+ HERO / EYEBROW TEXT VARIABLES
27
+ =========================================== */
28
+ --hero-text-bg-img: linear-gradient(135deg, #c2a770, #b4747e, #d1bd94);
29
+ --eyebrow-text-bg-img: linear-gradient(135deg, #c2a770, #b4747e, #d1bd94);
30
+
31
+ /* ===========================================
32
+ STEPPER LIST VARIABLES
33
+ =========================================== */
34
+ --stepper-list-counter-circle-background: transparent;
35
+ --stepper-list-counter-circle-text: light-dark(var(--blue-09), var(--blue-02));
36
+ --stepper-list-counter-circle-border: light-dark(var(--blue-09), var(--blue-02));
37
+ --stepper-list-counter-disc-background: light-dark(var(--blue-01), var(--blue-02));
38
+ --stepper-list-counter-disc-text: var(--blue-09);
39
+ --stepper-list-counter-disc-border: light-dark(var(--blue-01), var(--blue-02));
40
+ --stepper-list-counter-square-background: transparent;
41
+ --stepper-list-counter-square-text: light-dark(var(--blue-09), var(--blue-02));
42
+ --stepper-list-counter-square-border: light-dark(var(--blue-09), var(--blue-02));
43
+ --stepper-list-connector-color: light-dark(var(--blue-01), var(--blue-02));
44
+ --stepper-list-icon: light-dark(var(--blue-09), var(--blue-02));
45
+
46
+ /* ===========================================
47
+ COLOUR FINDER VARIABLES
48
+ =========================================== */
49
+ --colour-finder-primary-colour: var(--blue-03);
50
+ --colour-finder-border-colour: light-dark(var(--blue-02), var(--blue-03));
51
+ --colour-finder-checked-surface-colour: light-dark(var(--green-03), var(--green-10));
52
+ --colour-finder-checked-stroke-colour: light-dark(var(--green-09), var(--green-03));
53
+ --colour-finder-conflict-surface-colour: light-dark(var(--sunset-03), var(--sunset-09));
54
+ --colour-finder-conflict-stroke-colour: light-dark(var(--sunset-09), var(--sunset-03));
55
+
56
+ /* ===========================================
57
+ TREATMENT CONSULTANT VARIABLES
58
+ =========================================== */
59
+ --treatment-consultant-primary-colour: light-dark(var(--amber-05), var(--amber-02));
60
+ --treatment-consultant-primary-foreground: light-dark(var(--amber-09), var(--amber-02));
61
+ --treatment-consultant-muted-colour: light-dark(var(--amber-03), var(--amber-05));
62
+ --treatment-consultant-muted-foreground: light-dark(var(--amber-07), var(--amber-05));
63
+ --treatment-consultant-background: light-dark(var(--amber-01), var(--amber-10));
64
+ --treatment-consultant-foreground: light-dark(var(--amber-09), var(--amber-02));
65
+ --treatment-consultant-border-colour: light-dark(var(--blue-02), var(--amber-03));
66
+ --treatment-consultant-checked-surface-colour: light-dark(var(--green-03), var(--green-10));
67
+ --treatment-consultant-checked-stroke-colour: light-dark(var(--green-09), var(--green-03));
68
+ --treatment-consultant-conflict-surface-colour: light-dark(var(--sunset-03), var(--sunset-09));
69
+ --treatment-consultant-conflict-stroke-colour: light-dark(var(--sunset-09), var(--sunset-03));
70
+
71
+ /* ===========================================
72
+ ANCHOR LINK VARIABLES
73
+ =========================================== */
74
+ --colour-link-default: light-dark(var(--blue-10), var(--blue-02));
75
+ --colour-link-hover: light-dark(var(--blue-09), var(--blue-03));
76
+
77
+ /* ===========================================
78
+ STRUCTURAL INPUT TOKENS
79
+ Neutral slate surface — independent of theme colour
80
+ =========================================== */
81
+ --theme-input-surface: light-dark(var(--slate-00), var(--slate-10));
82
+ --theme-input-surface-hover: light-dark(var(--slate-01), var(--slate-09));
83
+ --theme-input-text-color-normal: light-dark(var(--slate-09), var(--slate-01));
84
+ --theme-input-placeholder: light-dark(var(--slate-05), var(--slate-04));
85
+ --theme-checkbox-symbol-surface: var(--theme-input-surface);
86
+ --input-error-margin-block-start: 0.25rem;
87
+ }
@@ -0,0 +1,14 @@
1
+ :where([data-invalid]),
2
+ :where([data-theme="error"]) {
3
+ --theme-hue: var(--palette-red-hue);
4
+ --theme-chroma: var(--palette-red-chroma);
5
+
6
+ /* ===========================================
7
+ FORM ERROR DISPLAY TOKENS
8
+ These are always error-red regardless of nesting context.
9
+ =========================================== */
10
+ --input-error-color: white;
11
+ --theme-error-surface: light-dark(var(--red-06), var(--red-07));
12
+ --theme-error-border: light-dark(var(--red-06), var(--red-07));
13
+ --theme-error-outline: light-dark(var(--red-01), var(--red-05));
14
+ }
@@ -0,0 +1,4 @@
1
+ :where([data-theme="success"]) {
2
+ --theme-hue: var(--palette-green-hue);
3
+ --theme-chroma: var(--palette-green-chroma);
4
+ }
@@ -0,0 +1,16 @@
1
+ /* Theme semantic slots — 8 shared colour roles used by all themed components.
2
+ Declared on the same selector as theme-ramp.css so the formula re-evaluates
3
+ per [data-theme] element rather than being inherited from html. */
4
+ :where(html, [data-theme], [data-invalid]) {
5
+ --theme-surface: light-dark(var(--colour-theme-7), var(--colour-theme-9));
6
+ --theme-surface-inverted: light-dark(var(--colour-theme-9), var(--colour-theme-2));
7
+ --theme-surface-hover: light-dark(var(--colour-theme-9), var(--colour-theme-7));
8
+ --theme-accent: light-dark(var(--colour-theme-5), var(--colour-theme-4));
9
+ --theme-surface-subtle: light-dark(var(--colour-theme-1), var(--colour-theme-9));
10
+ --theme-border: light-dark(var(--colour-theme-6), var(--colour-theme-5));
11
+ --theme-border-focus: light-dark(var(--colour-theme-4), var(--colour-theme-3));
12
+ --theme-ring: light-dark(var(--colour-theme-1), var(--colour-theme-9));
13
+ --theme-on-surface: var(--colour-theme-0);
14
+ --theme-text: light-dark(var(--colour-theme-9), var(--colour-theme-2));
15
+ --theme-text-inverted: light-dark(var(--colour-theme-9), var(--colour-theme-7));
16
+ }
@@ -0,0 +1,13 @@
1
+ /* Warning theme uses the full sunset ramp with hue drift.
2
+ Steps 00–05 sit in amber/orange territory; steps 06–10 shift toward red-orange.
3
+ --theme-surface overrides to step 5 (mid-light) so warning CTAs read as
4
+ warm/alert rather than the dark-filled default. */
5
+ :where([data-theme="warning"]) {
6
+ --theme-hue: var(--palette-sunset-hue);
7
+ --theme-chroma: var(--palette-sunset-chroma);
8
+ --theme-hue-drift: var(--palette-sunset-drift);
9
+
10
+ /* Lighter surface than the default step-9 — keeps warning buttons warm, not heavy */
11
+ --theme-surface: light-dark(var(--colour-theme-5), var(--colour-theme-4));
12
+ --theme-surface-hover: light-dark(var(--colour-theme-7), var(--colour-theme-5));
13
+ }
@@ -1,4 +1,6 @@
1
- @import "./default/";
2
- @import "./error/";
3
- @import "./success/";
4
- @import "./warning/";
1
+ @import "./theme-ramp";
2
+ @import "./_theme-slots";
3
+ @import "./_default";
4
+ @import "./_error";
5
+ @import "./_success";
6
+ @import "./_warning";
@@ -0,0 +1,19 @@
1
+ /* GENERATED — edit ramps.config.mjs, not this file */
2
+ /* Parametric theme-colour slot. Set --theme-hue and --theme-chroma on a
3
+ theme selector; these vars automatically pick up the right palette. */
4
+ :where(html, [data-theme], [data-invalid]) {
5
+ --colour-theme-0: oklch(98% calc(var(--theme-chroma) * 0.045) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (0)));
6
+ --colour-theme-1: oklch(94% calc(var(--theme-chroma) * 0.18) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (1 / 10)));
7
+ --colour-theme-2: oklch(88% calc(var(--theme-chroma) * 0.32) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (2 / 10)));
8
+ --colour-theme-3: oklch(80% calc(var(--theme-chroma) * 0.5) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (3 / 10)));
9
+ --colour-theme-4: oklch(72% calc(var(--theme-chroma) * 0.68) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (4 / 10)));
10
+ --colour-theme-5: oklch(64% calc(var(--theme-chroma) * 0.86) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (5 / 10)));
11
+ --colour-theme-6: oklch(56% calc(var(--theme-chroma) * 1) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (6 / 10)));
12
+ --colour-theme-7: oklch(48% calc(var(--theme-chroma) * 0.95) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (7 / 10)));
13
+ --colour-theme-8: oklch(40% calc(var(--theme-chroma) * 0.86) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (8 / 10)));
14
+ --colour-theme-9: oklch(32% calc(var(--theme-chroma) * 0.77) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (9 / 10)));
15
+ --colour-theme-10: oklch(25% calc(var(--theme-chroma) * 0.64) calc(var(--theme-hue) + var(--theme-hue-drift, 0) * (1)));
16
+ /* Aliases for legacy --colour-theme-11 / -12 references */
17
+ --colour-theme-11: var(--colour-theme-10);
18
+ --colour-theme-12: var(--colour-theme-10);
19
+ }
@@ -1,11 +1,4 @@
1
1
  :where(html) {
2
- input,
3
- textarea,
4
- select,
5
- button {
6
- /* all: unset; */
7
- }
8
-
9
2
  input:autofill,
10
3
  input:-internal-autofill-selected,
11
4
  input:-webkit-autofill-strong-password,
@@ -2,7 +2,7 @@
2
2
  --button-padding-block: 1rem;
3
3
  --button-padding-inline: 1.8rem;
4
4
 
5
- --button-border-radius: 0.8rem;
5
+ --button-border-radius: 0.2rem;
6
6
  --button-border-radius-icon-only: 100vw;
7
7
 
8
8
  --button-border-width: 0.1rem;
@@ -1,4 +1,4 @@
1
- @layer reset, colours, theming, form-tokens, typography, a11y, components, utilities;
1
+ @layer reset, colours, theming, form-tokens, typography, a11y, components, utilities, consumer;
2
2
 
3
3
  @import "./01.config/" layer(reset);
4
4
  @import "./02.colours/" layer(colours);