@osmova/quasar-design-system 0.9.2 → 0.10.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +114 -0
  2. package/README.md +55 -5
  3. package/dist/css/index.css +1 -0
  4. package/dist/css/layered/index.css +1 -0
  5. package/dist/css/layered/variants/glass.css +1 -0
  6. package/dist/css/layered/variants/ink.css +1 -0
  7. package/dist/css/layered/variants/one.css +1 -0
  8. package/dist/css/layered/variants/shadcn.css +1 -0
  9. package/dist/css/layered/variants/term.css +1 -0
  10. package/dist/css/layered/variants/zen.css +1 -0
  11. package/dist/css/variants/glass.css +1 -0
  12. package/dist/css/variants/ink.css +1 -0
  13. package/dist/css/variants/one.css +1 -0
  14. package/dist/css/variants/shadcn.css +1 -0
  15. package/dist/css/variants/term.css +1 -0
  16. package/dist/css/variants/zen.css +1 -0
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/runtime/theme.d.ts +5 -1
  22. package/dist/runtime/theme.d.ts.map +1 -1
  23. package/dist/runtime/theme.js +56 -6
  24. package/dist/runtime/theme.js.map +1 -1
  25. package/dist/themes/index.d.ts +15 -3
  26. package/dist/themes/index.d.ts.map +1 -1
  27. package/dist/themes/index.js +36 -22
  28. package/dist/themes/index.js.map +1 -1
  29. package/package.json +12 -6
  30. package/src/css/_base.scss +7 -0
  31. package/src/css/components/_actions.scss +20 -8
  32. package/src/css/components/_badge.scss +0 -4
  33. package/src/css/components/_button.scss +18 -3
  34. package/src/css/components/_card.scss +32 -24
  35. package/src/css/components/_chip.scss +4 -4
  36. package/src/css/components/_complex-media.scss +4 -12
  37. package/src/css/components/_compositions.scss +0 -8
  38. package/src/css/components/_dialog.scss +33 -14
  39. package/src/css/components/_drawer.scss +24 -21
  40. package/src/css/components/_field.scss +4 -3
  41. package/src/css/components/_footer.scss +0 -2
  42. package/src/css/components/_form-field.scss +0 -8
  43. package/src/css/components/_forms.scss +0 -10
  44. package/src/css/components/_list.scss +13 -23
  45. package/src/css/components/_loading-data.scss +3 -7
  46. package/src/css/components/_menu.scss +4 -3
  47. package/src/css/components/_notification.scss +5 -9
  48. package/src/css/components/_pagination.scss +0 -4
  49. package/src/css/components/_plugins.scss +0 -12
  50. package/src/css/components/_popup.scss +0 -3
  51. package/src/css/components/_rating.scss +0 -4
  52. package/src/css/components/_selection.scss +42 -26
  53. package/src/css/components/_table.scss +13 -21
  54. package/src/css/components/_tabs.scss +14 -3
  55. package/src/css/components/_toolbar.scss +27 -23
  56. package/src/css/components/variants/_glass.scss +124 -0
  57. package/src/css/components/variants/_ink.scss +549 -0
  58. package/src/css/components/variants/_zen.scss +385 -82
  59. package/src/css/extensions/_qwindow-styles.scss +14 -6
  60. package/src/css/extensions/qwindow.layered.scss +2 -0
  61. package/src/css/extensions/qwindow.scss +2 -0
  62. package/src/css/index.layered.scss +4 -0
  63. package/src/css/index.scss +4 -0
  64. package/src/fonts/THIRD_PARTY_NOTICES.md +10 -1
  65. package/src/fonts/files/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2 +0 -0
  66. package/src/fonts/files/atkinson-hyperlegible-next-latin-wght-normal.woff2 +0 -0
  67. package/src/fonts/files/caveat-latin-ext-wght-normal.woff2 +0 -0
  68. package/src/fonts/files/caveat-latin-wght-normal.woff2 +0 -0
  69. package/src/fonts/files/figtree-latin-ext-wght-normal.woff2 +0 -0
  70. package/src/fonts/files/figtree-latin-wght-normal.woff2 +0 -0
  71. package/src/fonts/files/fraunces-latin-ext-wght-italic.woff2 +0 -0
  72. package/src/fonts/files/fraunces-latin-wght-italic.woff2 +0 -0
  73. package/src/fonts/ink.css +36 -0
  74. package/src/fonts/zen.css +36 -0
  75. package/src/index.ts +3 -0
  76. package/src/runtime/theme.ts +64 -5
  77. package/src/themes/default.scss +354 -86
  78. package/src/themes/index.ts +43 -25
  79. package/src/tokens/_default.scss +85 -26
  80. package/src/css/components/variants/_atrium.scss +0 -123
@@ -1,3 +1,4 @@
1
+ @use 'sass:color';
1
2
  @use 'sass:map';
2
3
  @use '../tokens/default' as tokens;
3
4
  @use 'fallbacks' as fallbacks;
@@ -159,6 +160,8 @@
159
160
  --qds-table-header-height-value: #{qds-variant-token(term, table-header-height)};
160
161
  }
161
162
 
163
+ // Ink draws every affordance with a pen stroke and owns no blur depth: control
164
+ // edges resolve to the 3:1 ink stroke, elevation is drawn by the grammar.
162
165
  @mixin qds-ink-paper($scheme) {
163
166
  @each $step, $geometry in tokens.$shadow-steps {
164
167
  --qds-shadow-#{$step}: none;
@@ -166,33 +169,82 @@
166
169
  @each $token in button-elevated-shadow-hover, elevation-card, elevation-flyout, elevation-dialog {
167
170
  --qds-#{$token}: none;
168
171
  }
169
- --qds-stroke-strong: #{qds-variant-token(ink, '#{$scheme}-stroke-strong')};
170
- --qds-control-stroke-strong: var(--qds-stroke-strong);
171
- @each $token in control-stroke-default, control-stroke-secondary, control-stroke-top, control-stroke-bottom {
172
- --qds-#{$token}: var(--qds-border);
172
+ @each $token in control-stroke-default, control-stroke-secondary, control-stroke-strong, control-stroke-top, control-stroke-bottom, material-stroke, menu-border, stroke-subtle, stroke-divider, stroke-focus, card-stroke, card-border {
173
+ --qds-#{$token}: var(--qds-stroke-strong);
174
+ }
175
+ --qds-bg-overlay: transparent;
176
+ // E-ink has no tinted states: hover, press and selection are drawn by the component rules.
177
+ @each $token in state-hover, state-pressed, state-selected, tab-hover-bg, tab-active-bg {
178
+ --qds-#{$token}: transparent;
179
+ }
180
+ @each $token in separator-color, scrollbar-thumb, stepper-rail, timeline-rail, pagination-active-bg, pagination-active-border {
181
+ --qds-#{$token}: var(--qds-stroke-strong);
182
+ }
183
+ --qds-pagination-active-text: var(--qds-surface-0);
184
+ --qds-mica-alt: var(--qds-surface-1);
185
+ --qds-backdrop: var(--qds-surface-1);
186
+ --qds-toolbar-bg: var(--qds-surface-1);
187
+ --qds-focus-ring-width: 2px;
188
+ --qds-focus-ring-offset: 2px;
189
+ @if $scheme == light {
190
+ // An explicit dark bar on a light page is the inverted ink bar.
191
+ --qds-bar-dark-bg: var(--qds-text-strong);
192
+ --qds-bar-dark-fg: var(--qds-surface-0);
173
193
  }
174
- --qds-material-stroke: var(--qds-stroke-strong);
175
- --qds-menu-border: var(--qds-stroke-strong);
176
- --qds-bg-overlay: #{qds-variant-token(ink, '#{$scheme}-scrim')};
177
- --qds-color-primary-pressed: color-mix(in srgb, var(--qds-color-primary) 70%, var(--qds-surface-0));
178
194
  --qds-fg-on-brand: var(--qds-text-on-primary);
179
- --qds-text-on-solid: #{map.get(qds-variant-token(ink, light-on-fill), primary)};
180
- @each $role in secondary, accent, positive, negative, warning, info {
181
- --qds-fg-#{$role}: color-mix(in srgb, var(--qds-color-#{$role}) 80%, var(--qds-text-strong));
195
+ @each $role in brand, primary, secondary, accent, positive, negative, warning, info {
196
+ --qds-fg-#{$role}: var(--qds-text-strong);
182
197
  }
198
+ @include qds-ink-colour('charcoal', $scheme);
199
+ }
200
+
201
+ // One ink and one paper per scheme; every derived alias on the same element follows them.
202
+ @mixin qds-ink-colour($name, $scheme) {
203
+ $c: map.get(tokens.$ink-colors, $name);
204
+ $ink: map.get($c, '#{$scheme}-ink');
205
+ $paper: map.get($c, '#{$scheme}-paper');
206
+ $ink-rgb: '#{color.channel($ink, "red", $space: rgb)}, #{color.channel($ink, "green", $space: rgb)}, #{color.channel($ink, "blue", $space: rgb)}';
207
+ --_qds-ink: #{$ink};
208
+ --_qds-paper: #{$paper};
209
+ @each $color in primary, primary-light, primary-dark, secondary, accent, positive, warning, info {
210
+ --qds-color-#{$color}: #{$ink};
211
+ --qds-color-#{$color}-rgb: #{$ink-rgb};
212
+ }
213
+ @each $role in primary, secondary, accent, positive, negative, warning, info {
214
+ --qds-text-on-#{$role}: #{$paper};
215
+ }
216
+ @each $step in 0, 1, 2, 3 {
217
+ --qds-surface-#{$step}: #{$paper};
218
+ }
219
+ @each $token in surface-brand-soft, surface-accent-soft, surface-positive-soft, surface-warning-soft, surface-negative-soft, surface-info-soft, surface-focus-block, surface-transient {
220
+ --qds-#{$token}: #{$paper};
221
+ }
222
+ @each $token in text, text-strong, border, border-subtle, stroke-strong {
223
+ --qds-#{$token}: #{$ink};
224
+ }
225
+ --qds-text-muted: #{map.get($c, '#{$scheme}-muted')};
226
+ --qds-fg-disabled: #{map.get($c, '#{$scheme}-disabled')};
227
+ --qds-text-on-solid: #{$paper};
228
+ --qds-card-acrylic-tint-rgb: #{$ink-rgb};
229
+ // The one red: negative roles, destructive actions and errors.
230
+ $danger: map.get($c, '#{$scheme}-danger');
231
+ --qds-color-negative: #{$danger};
232
+ --qds-color-negative-rgb: #{color.channel($danger, "red", $space: rgb)}, #{color.channel($danger, "green", $space: rgb)}, #{color.channel($danger, "blue", $space: rgb)};
233
+ --qds-fg-negative: #{$danger};
234
+ --qds-stroke-error: #{$danger};
235
+ $inverse: 'light-danger';
236
+ @if $scheme == light { $inverse: 'dark-danger'; }
237
+ --_qds-danger-inverse: #{map.get($c, $inverse)};
183
238
  }
184
239
 
185
- // Zen keeps gentle raised/recessed depth, so shadows stay. Every affordance
186
- // must still read with shadows off, which is why control strokes resolve to the
187
- // 3:1 stroke-strong value rather than the quiet divider border.
240
+ // Zen's boundary is essential and its depth decorative: control strokes resolve
241
+ // to the 3:1 stroke-strong value so every affordance reads with shadows off.
188
242
  @mixin qds-zen-paper($scheme) {
189
243
  --qds-stroke-strong: #{qds-variant-token(zen, '#{$scheme}-stroke-strong')};
190
244
  @each $token in control-stroke-default, control-stroke-secondary, control-stroke-strong, control-stroke-top, control-stroke-bottom, material-stroke, menu-border {
191
245
  --qds-#{$token}: var(--qds-stroke-strong);
192
246
  }
193
247
  --qds-bg-overlay: #{qds-variant-token(zen, '#{$scheme}-scrim')};
194
- // Zen owns its disabled value instead of inheriting the Fluent grey, and
195
- // holds it at the 3:1 non-text floor even though WCAG 1.4.3 exempts it.
196
248
  --qds-fg-disabled: #{qds-variant-token(zen, '#{$scheme}-fg-disabled')};
197
249
  --qds-fg-on-brand: var(--qds-text-on-primary);
198
250
  --qds-text-on-solid: #{map.get(qds-variant-token(zen, '#{$scheme}-on-fill'), primary)};
@@ -200,12 +252,83 @@
200
252
  @each $role in secondary, accent, positive, negative, warning, info {
201
253
  --qds-fg-#{$role}: color-mix(in srgb, var(--qds-color-#{$role}) 80%, var(--qds-text-strong));
202
254
  }
203
- // Quasar's native #c10015 validation paint must never reach a Zen field.
204
255
  --qds-stroke-error: var(--qds-fg-negative);
205
256
  --qds-stroke-focus: var(--qds-fg-brand);
206
- --qds-segmented-track-bg: var(--qds-surface-2);
207
- --qds-segmented-thumb-bg: var(--qds-surface-0);
257
+ --qds-segmented-track-bg: var(--qds-surface-0);
258
+ --qds-segmented-thumb-bg: var(--qds-surface-2);
208
259
  --qds-row-radius: var(--qds-radius-control);
260
+ --qds-button-radius: var(--qds-radius-full);
261
+ --qds-tab-radius: var(--qds-radius-full);
262
+ --qds-menu-radius: var(--qds-radius-lg);
263
+ --qds-notification-radius: var(--qds-radius-lg);
264
+ --qds-toggle-track-width: 3rem;
265
+ --qds-toggle-track-height: 1.75rem;
266
+ --qds-toggle-thumb-inset: 0.1875rem;
267
+ --qds-slider-label-bg: var(--qds-text-strong);
268
+ --qds-slider-label-text: var(--qds-surface-0);
269
+ --qds-slider-label-border: var(--qds-text-strong);
270
+ @each $step, $level in (2: --qds-shadow-sm, 4: --qds-shadow-sm, 8: --_qds-zen-lift-3, 16: --_qds-zen-lift-3, 28: --qds-shadow-md, 64: --qds-shadow-lg) {
271
+ --qds-shadow-#{$step}: var(#{$level});
272
+ }
273
+ @each $level in lift-2, lift-3, edge, inset, press {
274
+ --_qds-zen-#{$level}: #{qds-variant-token(zen, '#{$scheme}-#{$level}')};
275
+ }
276
+ }
277
+
278
+ // Ink's emission is isolated like zen's: it was rebuilt for 0.10.0, and the
279
+ // frozen default-theme hash re-inserts the retired emission it replaced.
280
+ @mixin qds-ink-scopes {
281
+ @layer qds.tokens {
282
+ .qds-variant-ink {
283
+ --qds-font-family: #{qds-variant-token(ink, font-family)};
284
+ --qds-font-family-display: #{qds-variant-token(ink, font-family-display)};
285
+ @each $step in xs, sm, md, xl {
286
+ --qds-radius-#{$step}: #{qds-variant-token(ink, radius-#{$step})};
287
+ }
288
+ --qds-motion-fast: #{qds-variant-token(ink, motion-fast)};
289
+ --qds-motion-duration-fast: 60ms;
290
+ --qds-motion-duration-base: 80ms;
291
+ --qds-motion-duration-medium: 80ms;
292
+ --qds-motion-duration-slow: 100ms;
293
+ --qds-motion-ease-out: linear;
294
+ --qds-motion-ease-in-out: linear;
295
+ @each $step in h1, h2, h3, h4 {
296
+ --qds-font-weight-#{$step}: 600;
297
+ }
298
+ @include qds-variant-scheme(ink);
299
+ @include fallbacks.qds-material-tokens(solid);
300
+ @include qds-ink-paper(light);
301
+ }
302
+
303
+ @media not (pointer: coarse) {
304
+ .qds-variant-ink {
305
+ --qds-list-item-min-height-value: #{qds-variant-token(ink, list-item-min-height)};
306
+ --qds-menu-item-min-height-value: #{qds-variant-token(ink, menu-item-min-height)};
307
+ }
308
+ }
309
+
310
+ // Selected inks are listed before the dark scopes, which outrank them only by order.
311
+ @each $name in 'black', 'navy' {
312
+ .qds-variant-ink[data-qds-ink="#{$name}"] { @include qds-ink-colour($name, light); }
313
+ }
314
+
315
+ .qds-theme-dark.qds-variant-ink,
316
+ .qds-theme-dark .qds-variant-ink,
317
+ body.qds-ui.body--dark.qds-variant-ink,
318
+ body.qds-ui.body--dark .qds-variant-ink {
319
+ @include qds-variant-scheme(ink, true);
320
+ @include fallbacks.qds-material-tokens(solid);
321
+ @include qds-ink-paper(dark);
322
+ }
323
+
324
+ @each $name in 'black', 'navy' {
325
+ $ink: '.qds-variant-ink[data-qds-ink="#{$name}"]';
326
+ .qds-theme-dark#{$ink},
327
+ .qds-theme-dark #{$ink},
328
+ body.qds-ui.body--dark#{$ink},
329
+ body.qds-ui.body--dark #{$ink} { @include qds-ink-colour($name, dark); }
330
+ }
331
+ }
209
332
  }
210
333
 
211
334
  // Zen's emission is isolated in one mixin so the frozen pre-Zen default
@@ -216,6 +339,20 @@
216
339
  .qds-variant-zen {
217
340
  --qds-font-family: #{qds-variant-token(zen, font-family)};
218
341
  --qds-font-family-display: #{qds-variant-token(zen, font-family-display)};
342
+ @each $step in xs, sm, md, xl {
343
+ --qds-radius-#{$step}: #{qds-variant-token(zen, radius-#{$step})};
344
+ }
345
+ @each $size in sm, md, lg {
346
+ --qds-control-size-#{$size}: #{qds-variant-token(zen, control-size-#{$size})};
347
+ }
348
+ --qds-motion-fast: #{qds-variant-token(zen, motion-fast)};
349
+ --_qds-zen-spring: #{qds-variant-token(zen, motion-spring)};
350
+ @each $step in h1, h2, h3, h4 {
351
+ --qds-font-weight-#{$step}: 380;
352
+ }
353
+ --qds-font-weight-h5: 450;
354
+ --qds-font-weight-h6: 500;
355
+ --qds-letter-spacing-overline: 0.1em;
219
356
  @include qds-variant-scheme(zen);
220
357
  @include fallbacks.qds-material-tokens(solid);
221
358
  @include qds-zen-paper(light);
@@ -239,21 +376,24 @@
239
376
  }
240
377
  }
241
378
 
242
- // Atrium is a quiet floating-panel system: translucent chrome over a grouped
243
- // background, soft rings instead of hard strokes, and capability-aware density.
244
- // Translucency is decoration only; every affordance must survive the opaque
245
- // fallback below.
246
- @mixin qds-atrium-material($scheme) {
247
- --qds-stroke-strong: #{qds-variant-token(atrium, '#{$scheme}-stroke-strong')};
248
- @each $token in control-stroke-default, control-stroke-secondary, control-stroke-top, control-stroke-bottom, material-stroke, menu-border {
249
- --qds-#{$token}: #{qds-variant-token(atrium, '#{$scheme}-border')};
250
- }
251
- --qds-control-stroke-strong: var(--qds-stroke-strong);
252
- --qds-bg-overlay: #{qds-variant-token(atrium, '#{$scheme}-scrim')};
253
- --qds-fg-disabled: #{qds-variant-token(atrium, '#{$scheme}-fg-disabled')};
379
+ // Glass: controls and bars float on a translucent functional layer above content.
380
+ // Translucency is decoration only; every affordance must survive the opaque fallback.
381
+ @mixin qds-glass-material($scheme) {
382
+ --qds-stroke-strong: #{qds-variant-token(glass, '#{$scheme}-stroke-strong')};
383
+ @each $token in control-stroke-default, control-stroke-secondary, control-stroke-top, control-stroke-bottom, control-stroke-strong {
384
+ --qds-#{$token}: var(--qds-stroke-strong);
385
+ }
386
+ @each $token in material-stroke, menu-border {
387
+ --qds-#{$token}: #{qds-variant-token(glass, '#{$scheme}-border')};
388
+ }
389
+ --qds-bg-overlay: #{qds-variant-token(glass, '#{$scheme}-scrim')};
390
+ --qds-fg-disabled: #{qds-variant-token(glass, '#{$scheme}-fg-disabled')};
254
391
  --qds-fg-on-brand: var(--qds-text-on-primary);
255
- --qds-text-on-solid: #{map.get(qds-variant-token(atrium, '#{$scheme}-on-fill'), primary)};
392
+ --qds-text-on-solid: #{map.get(qds-variant-token(glass, '#{$scheme}-on-fill'), primary)};
256
393
  --qds-fg-brand: var(--qds-color-primary);
394
+ // Content stays opaque under the glass layer; the shared material tokens carry an acrylic card fill.
395
+ --qds-card-fill: var(--qds-surface-0);
396
+ --qds-notification-radius: var(--qds-radius-lg);
257
397
  @each $role in secondary, accent, positive, negative, warning, info {
258
398
  --qds-fg-#{$role}: color-mix(in srgb, var(--qds-color-#{$role}) 86%, var(--qds-text-strong));
259
399
  }
@@ -262,61 +402,200 @@
262
402
  --qds-segmented-track-bg: var(--qds-surface-2);
263
403
  --qds-segmented-thumb-bg: var(--qds-surface-0);
264
404
  --qds-row-radius: var(--qds-radius-control);
265
- // Capsule geometry, after qds-variant-scheme, which re-emits these three.
266
- --qds-toggle-track-width: 3.1875rem;
267
- --qds-toggle-track-height: 1.9375rem;
405
+ --qds-button-radius: var(--qds-radius-full);
406
+ --qds-menu-radius: #{qds-variant-token(glass, menu-radius)};
407
+ --qds-menu-shadow: var(--qds-shadow-lg);
408
+ // Capsule geometry, after qds-variant-scheme, which re-emits these three; the knob is itself a capsule.
409
+ --qds-toggle-track-width: 3.9375rem;
410
+ --qds-toggle-track-height: 1.75rem;
268
411
  --qds-toggle-thumb-inset: 0.125rem;
412
+ // Glass diffuses busy content and is edged by a bright top highlight rather than a deep drop shadow.
413
+ --qds-material-regular-blur: 40px;
414
+ --qds-material-saturate: 1.8;
269
415
  // The switch and slider knob stays light in both schemes, unlike an on-fill foreground.
270
416
  @if $scheme == light {
271
- --_qds-atrium-knob: #{qds-variant-token(atrium, light-surface-0)};
417
+ --qds-material-regular-bg: color-mix(in srgb, var(--qds-surface-0) 92%, transparent);
418
+ --qds-material-edge: inset 0 1px 0 rgba(255, 255, 255, 0.9);
419
+ --_qds-glass-knob: #{qds-variant-token(glass, light-surface-0)};
420
+ --_qds-glass-nested: var(--qds-surface-1);
421
+ --_qds-glass-on-track: currentColor;
272
422
  } @else {
273
- --_qds-atrium-knob: #{qds-variant-token(atrium, dark-text-strong)};
423
+ --qds-material-edge: inset 0 1px 0 rgba(255, 255, 255, 0.18);
424
+ --_qds-glass-knob: #{qds-variant-token(glass, dark-text-strong)};
425
+ --_qds-glass-nested: var(--qds-surface-2);
426
+ // The page stays black, but a well inside a card is the elevated grey, never a black hole.
427
+ --qds-bg-surface-1: var(--qds-surface-2);
428
+ --qds-chrome-surface: color-mix(in srgb, var(--qds-surface-0) var(--qds-chrome-surface-mix, 86%), transparent);
429
+ // A light role on a dark track would wash out the light knob.
430
+ --_qds-glass-on-track: color-mix(in srgb, currentColor 70%, var(--qds-surface-0));
431
+ }
432
+ --_qds-glass-bar-line: transparent;
433
+ --qds-toolbar-bg: transparent;
434
+ @each $state, $mix in (default: 10%, hover: 16%, pressed: 24%) {
435
+ --qds-control-fill-#{$state}: color-mix(in srgb, var(--qds-text-muted) #{$mix}, var(--qds-material-regular-bg));
274
436
  }
275
437
  }
276
438
 
277
- @mixin qds-atrium-scopes {
439
+ @mixin qds-glass-geometry {
440
+ --qds-font-family: #{qds-variant-token(glass, font-family)};
441
+ --qds-font-family-display: #{qds-variant-token(glass, font-family-display)};
442
+ --qds-motion-fast: #{qds-variant-token(glass, motion-fast)};
443
+ --qds-motion-ease-out: #{qds-variant-token(glass, motion-ease-out)};
444
+ @each $step in h1, h2, h3, h4, h5, h6 {
445
+ --qds-font-weight-#{$step}: var(--qds-font-weight-bold);
446
+ }
447
+ // Concentric: a nested shape's radius is its container's radius minus the padding between them.
448
+ --_qds-glass-pad: #{qds-variant-token(glass, pad)};
449
+ --_qds-glass-inset: #{qds-variant-token(glass, inset)};
450
+ --_qds-glass-sheet-pad: #{qds-variant-token(glass, sheet-pad)};
451
+ --_qds-glass-sheet-radius: calc(var(--qds-radius-control) + var(--_qds-glass-sheet-pad));
452
+ --_qds-glass-spring: #{qds-variant-token(glass, spring)};
453
+ }
454
+
455
+ @mixin qds-glass-solid {
456
+ @include fallbacks.qds-material-tokens(solid);
457
+ --_qds-glass-bar-line: var(--qds-border);
458
+ }
459
+
460
+ @mixin qds-glass-contrast($scheme) {
461
+ --qds-stroke-strong: var(--qds-text-muted);
462
+ --qds-border-subtle: var(--qds-stroke-strong);
463
+ --qds-material-stroke: var(--qds-stroke-strong);
464
+ --qds-color-primary: #{qds-variant-token(glass, '#{$scheme}-hc-primary')};
465
+ --qds-color-primary-rgb: #{qds-variant-token(glass, '#{$scheme}-hc-primary-rgb')};
466
+ }
467
+
468
+ $glass-dark: '.qds-theme-dark.qds-variant-glass, .qds-theme-dark .qds-variant-glass, body.qds-ui.body--dark.qds-variant-glass, body.qds-ui.body--dark .qds-variant-glass';
469
+
470
+ @mixin qds-glass-scopes {
278
471
  @layer qds.tokens {
279
- .qds-variant-atrium {
280
- --qds-font-family: #{qds-variant-token(atrium, font-family)};
281
- --qds-font-family-display: #{qds-variant-token(atrium, font-family-display)};
282
- --qds-motion-fast: #{qds-variant-token(atrium, motion-fast)};
283
- --qds-motion-ease-out: #{qds-variant-token(atrium, motion-ease-out)};
284
- @include qds-variant-scheme(atrium);
472
+ .qds-variant-glass {
473
+ @include qds-glass-geometry;
474
+ @include qds-variant-scheme(glass);
285
475
  @include fallbacks.qds-material-tokens(light);
286
- @include qds-atrium-material(light);
476
+ @include qds-glass-material(light);
287
477
  }
288
478
 
289
479
  @media not (pointer: coarse) {
290
- .qds-variant-atrium {
291
- --qds-list-item-min-height-value: #{qds-variant-token(atrium, list-item-min-height)};
292
- --qds-menu-item-min-height-value: #{qds-variant-token(atrium, menu-item-min-height)};
480
+ .qds-variant-glass {
481
+ --qds-list-item-min-height-value: #{qds-variant-token(glass, list-item-min-height)};
482
+ --qds-menu-item-min-height-value: #{qds-variant-token(glass, menu-item-min-height)};
293
483
  }
294
484
  }
295
485
 
296
- .qds-theme-dark.qds-variant-atrium,
297
- .qds-theme-dark .qds-variant-atrium,
298
- body.qds-ui.body--dark.qds-variant-atrium,
299
- body.qds-ui.body--dark .qds-variant-atrium {
300
- @include qds-variant-scheme(atrium, true);
486
+ #{$glass-dark} {
487
+ @include qds-variant-scheme(glass, true);
301
488
  @include fallbacks.qds-material-tokens(dark);
302
- @include qds-atrium-material(dark);
489
+ @include qds-glass-material(dark);
490
+ }
491
+
492
+ // One body per condition; each dark selector ties the dark scope and follows it.
493
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
494
+ .qds-variant-glass, #{$glass-dark} { @include qds-glass-solid; }
495
+ }
496
+
497
+ @media (prefers-reduced-transparency: reduce), (forced-colors: active), (prefers-contrast: more) {
498
+ .qds-variant-glass, #{$glass-dark} { @include qds-glass-solid; }
499
+ }
500
+
501
+ @media (prefers-contrast: more) {
502
+ .qds-variant-glass { @include qds-glass-contrast(light); }
503
+ #{$glass-dark} { @include qds-glass-contrast(dark); }
504
+ }
505
+ }
506
+ }
507
+
508
+ @mixin qds-win-values($values) {
509
+ @each $token in fg-disabled, state-hover, state-pressed, control-stroke-on-accent-bottom, bg-overlay, stroke-divider, material-stroke {
510
+ --qds-#{$token}: #{map.get($values, $token)};
511
+ }
512
+ @each $token in accent-fill-disabled, text-on-accent-disabled, layer-alt, surface-stroke, focus-outer {
513
+ --_qds-win-#{$token}: #{map.get($values, $token)};
514
+ }
515
+ // Derived, so every dark scope re-emits it; WinUI keeps 16px glyphs when dense.
516
+ --qds-button-dense-icon-size: var(--qds-control-icon-size-md);
517
+ // WinUI elevation: flyouts sit at 32, dialogs at 128.
518
+ @each $token in menu-shadow, notification-shadow, elevation-flyout {
519
+ --qds-#{$token}: var(--qds-shadow-28);
520
+ }
521
+ --qds-backdrop: radial-gradient(ellipse 64rem 36rem at 0% 0%, rgba(var(--qds-color-primary-rgb), #{map.get($values, backdrop-brand)}), transparent 72%), radial-gradient(ellipse 56rem 36rem at 100% 100%, rgba(var(--qds-color-primary-rgb), #{map.get($values, backdrop-accent)}), transparent 72%), var(--qds-surface-1);
522
+ }
303
523
 
304
- // Nested so the fallback shares this scope's specificity; (0,1,0) loses.
305
- @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
306
- @include fallbacks.qds-material-tokens(solid);
524
+ // Aliases are re-declared because :root resolved them against the shared palette.
525
+ @mixin qds-win-palette($scheme) {
526
+ $values: map.get(tokens.$win-palette, $scheme);
527
+ @each $role in primary, primary-light, primary-dark, positive, negative, warning, info {
528
+ $value: map.get($values, $role);
529
+ --qds-color-#{$role}: #{$value};
530
+ --qds-color-#{$role}-rgb: #{color.channel($value, 'red', $space: rgb)}, #{color.channel($value, 'green', $space: rgb)}, #{color.channel($value, 'blue', $space: rgb)};
531
+ }
532
+ @each $role in primary, positive, negative, warning, info {
533
+ --qds-text-on-#{$role}: #{map.get($values, on-fill)};
534
+ }
535
+ --qds-fg-brand: #{map.get($values, fg-brand)};
536
+ --qds-fg-info: #{map.get($values, fg-info)};
537
+ @each $role in positive, negative, warning {
538
+ --qds-surface-#{$role}-soft: #{map.get($values, '#{$role}-soft')};
539
+ }
540
+ // Status text leans toward the strong ink so it holds 4.5:1 on its pressed tonal wash; dark accent shares the fix.
541
+ @each $role in if($scheme == dark, (accent, positive, negative, warning), (positive, negative, warning)) {
542
+ --qds-fg-#{$role}: color-mix(in srgb, var(--qds-color-#{$role}) 70%, var(--qds-text-strong));
543
+ }
544
+ // The dark root re-declares these same aliases on its own element, so only the light scope needs them.
545
+ @if $scheme == light {
546
+ --qds-fg-primary: var(--qds-fg-brand);
547
+ --qds-color-primary-hover: color-mix(in srgb, var(--qds-color-primary) var(--qds-fill-hover-mix), var(--qds-fill-state-base));
548
+ --qds-color-primary-pressed: color-mix(in srgb, var(--qds-color-primary) var(--qds-fill-pressed-mix), var(--qds-fill-state-base));
549
+ @each $token in stroke-focus, state-focus-indicator, tab-active-rail, banner-accent, notify-accent, stepper-rail-active, table-sort-icon {
550
+ --qds-#{$token}: var(--qds-color-primary);
307
551
  }
552
+ --qds-banner-accent-rgb: var(--qds-color-primary-rgb);
553
+ --qds-notify-accent-rgb: var(--qds-color-primary-rgb);
554
+ --qds-stroke-error: var(--qds-color-negative);
555
+ --qds-state-selected: color-mix(in srgb, var(--qds-color-primary) calc(var(--qds-tonal-bg-opacity) * 100%), transparent);
556
+ --qds-handle-color: color-mix(in srgb, var(--qds-border) var(--qds-handle-border-mix, 58%), var(--qds-color-primary) var(--qds-handle-primary-mix, 10%));
557
+ --qds-scrollbar-thumb: var(--qds-handle-color);
558
+ --qds-scrollbar-thumb-hover: color-mix(in srgb, var(--qds-handle-color) 72%, var(--qds-text-muted));
559
+ --qds-tab-hover-bg: color-mix(in srgb, var(--qds-surface-2) 88%, var(--qds-color-primary) 12%);
560
+ --qds-tab-active-bg: rgba(var(--qds-color-primary-rgb), var(--qds-tonal-bg-opacity));
561
+ --qds-tab-active-text: color-mix(in srgb, var(--qds-color-primary) var(--qds-tonal-text-mix), var(--qds-text-strong));
562
+ --qds-pagination-active-border: rgba(var(--qds-color-primary-rgb), var(--qds-tonal-border-opacity));
563
+ }
564
+ }
308
565
 
309
- @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
310
- @include fallbacks.qds-material-tokens(solid);
566
+ // Win's WinUI deltas live on its own variant class, isolated in one mixin
567
+ // like zen/atrium, so the frozen theme hash stays verifiable and every other
568
+ // profile keeps the shared semantic values.
569
+ @mixin qds-win-scopes {
570
+ $dark: '.qds-theme-dark.qds-variant-win, .qds-theme-dark .qds-variant-win, .qds-variant-win .qds-theme-dark, body.qds-ui.body--dark.qds-variant-win, body.qds-ui.body--dark .qds-variant-win';
571
+ @layer qds.tokens {
572
+ .qds-variant-win {
573
+ @include qds-win-palette(light);
574
+ @include qds-win-values(tokens.$win-light);
575
+ --qds-font-family: #{map.get(tokens.$win-font, body)};
576
+ --qds-font-family-display: #{map.get(tokens.$win-font, display)};
577
+ --qds-focus-ring-offset: 1px;
578
+ --qds-control-icon-opacity: 1;
579
+ --qds-control-icon-opacity-active: 1;
580
+ }
581
+
582
+ #{$dark} {
583
+ @include qds-win-palette(dark);
584
+ @include qds-win-values(tokens.$win-dark);
585
+ --qds-text-muted: #{map.get(tokens.$win-dark, text-muted)};
586
+ // Rebound here so a win subtree inside a dark root does not keep the inherited value.
587
+ @each $alias in fg-muted, interactive-text-muted, control-icon-color {
588
+ --qds-#{$alias}: var(--qds-text-muted);
311
589
  }
312
590
  }
313
591
 
592
+ // Opaque material fallbacks drop the accent edge and the Mica tint, as on :root.
314
593
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
315
- .qds-variant-atrium { @include fallbacks.qds-material-tokens(solid); }
594
+ .qds-variant-win, #{$dark} { --qds-control-stroke-on-accent-bottom: transparent; --qds-backdrop: var(--qds-surface-1); }
316
595
  }
317
596
 
318
597
  @media (prefers-reduced-transparency: reduce), (forced-colors: active) {
319
- .qds-variant-atrium { @include fallbacks.qds-material-tokens(solid); }
598
+ .qds-variant-win, #{$dark} { --qds-control-stroke-on-accent-bottom: transparent; --qds-backdrop: var(--qds-surface-1); }
320
599
  }
321
600
  }
322
601
  }
@@ -416,30 +695,6 @@ $qds-material-scopes: '.qds-theme-dark, body.qds-ui.body--dark, .qds-variant-one
416
695
  @include fallbacks.qds-material-tokens(dark);
417
696
  }
418
697
 
419
- .qds-variant-ink {
420
- --qds-font-family: #{qds-variant-token(ink, font-family)};
421
- --qds-font-family-display: #{qds-variant-token(ink, font-family-display)};
422
- @include qds-variant-scheme(ink);
423
- @include fallbacks.qds-material-tokens(solid);
424
- @include qds-ink-paper(light);
425
- }
426
-
427
- @media not (pointer: coarse) {
428
- .qds-variant-ink {
429
- --qds-list-item-min-height-value: #{qds-variant-token(ink, list-item-min-height)};
430
- --qds-menu-item-min-height-value: #{qds-variant-token(ink, menu-item-min-height)};
431
- }
432
- }
433
-
434
- .qds-theme-dark.qds-variant-ink,
435
- .qds-theme-dark .qds-variant-ink,
436
- body.qds-ui.body--dark.qds-variant-ink,
437
- body.qds-ui.body--dark .qds-variant-ink {
438
- @include qds-variant-scheme(ink, true);
439
- @include fallbacks.qds-material-tokens(solid);
440
- @include qds-ink-paper(dark);
441
- }
442
-
443
698
  .qds-variant-one {
444
699
  --qds-font-family: #{qds-variant-token(one, font-family)};
445
700
  --qds-font-family-display: #{qds-variant-token(one, font-family-display)};
@@ -509,5 +764,18 @@ $qds-material-scopes: '.qds-theme-dark, body.qds-ui.body--dark, .qds-variant-one
509
764
  }
510
765
 
511
766
  @include qds-zen-scopes;
512
- @include qds-atrium-scopes;
767
+ @include qds-glass-scopes;
768
+ @include qds-win-scopes;
769
+ @include qds-ink-scopes;
513
770
  @include shadcn.scopes;
771
+
772
+ // Runtime sentinel: the controller warns in development when the active variant's stylesheet is missing.
773
+ @mixin qds-variant-sentinels {
774
+ @layer qds.tokens {
775
+ @each $variant in win, ink, one, term, shadcn, zen, glass {
776
+ .qds-variant-#{$variant} { --_qds-variant: #{$variant}; }
777
+ }
778
+ }
779
+ }
780
+
781
+ @include qds-variant-sentinels;
@@ -1,5 +1,5 @@
1
- export type CanonicalDesignSystemVariantName = 'fluent' | 'ink' | 'one' | 'term' | 'shadcn' | 'zen'
2
- export type LegacyDesignSystemVariantName = 'studio' | 'air' | 'glass' | 'feather' | 'mobile' | 'terminal'
1
+ export type CanonicalDesignSystemVariantName = 'win' | 'ink' | 'one' | 'term' | 'shadcn' | 'zen' | 'glass'
2
+ export type LegacyDesignSystemVariantName = 'fluent' | 'studio' | 'air' | 'feather' | 'mobile' | 'terminal'
3
3
  export type BuiltInDesignSystemVariantName = CanonicalDesignSystemVariantName | LegacyDesignSystemVariantName
4
4
 
5
5
  // Built-ins are typed narrowly while still accepting variants registered by
@@ -37,6 +37,18 @@ export function isShadcnBaseColor(value: unknown): value is ShadcnBaseColor {
37
37
  return SHADCN_BASE_COLORS.some((color) => color.name === value)
38
38
  }
39
39
 
40
+ export const INK_COLORS = [
41
+ { name: 'charcoal', label: 'Charcoal' },
42
+ { name: 'black', label: 'Black' },
43
+ { name: 'navy', label: 'Navy' },
44
+ ] as const
45
+
46
+ export type InkColor = (typeof INK_COLORS)[number]['name']
47
+
48
+ export function isInkColor(value: unknown): value is InkColor {
49
+ return INK_COLORS.some((color) => color.name === value)
50
+ }
51
+
40
52
  // Optional brand accent over the shadcn base palette ('none' keeps the palette's own primary).
41
53
  export const SHADCN_ACCENT_COLORS = [
42
54
  { name: 'none', label: 'None' },
@@ -50,16 +62,16 @@ export function isShadcnAccentColor(value: unknown): value is ShadcnAccentColor
50
62
  }
51
63
 
52
64
  export const DESIGN_SYSTEM_VARIANTS = {
53
- fluent: {
54
- name: 'fluent',
55
- label: 'Fluent',
56
- description: 'Default Fluent 2-inspired baseline with solid mica surfaces and restrained tonal color.',
57
- cssClass: 'qds-variant-fluent',
65
+ win: {
66
+ name: 'win',
67
+ label: 'Win',
68
+ description: 'Default Windows 11 baseline: WinUI surfaces, solid mica layers and restrained tonal color.',
69
+ cssClass: 'qds-variant-win',
58
70
  },
59
71
  ink: {
60
72
  name: 'ink',
61
73
  label: 'Ink',
62
- description: 'Paper-neutral editorial surfaces with charcoal type and coordinated pastel role washes.',
74
+ description: 'One ink on paper, like an e-reader: charcoal, black or navy strokes, inverted selection, patterned roles and one red for danger.',
63
75
  cssClass: 'qds-variant-ink',
64
76
  },
65
77
  one: {
@@ -86,33 +98,39 @@ export const DESIGN_SYSTEM_VARIANTS = {
86
98
  description: 'Soft tinted paper blocks with a quiet reading rhythm, gentle depth and an essential boundary on every control.',
87
99
  cssClass: 'qds-variant-zen',
88
100
  },
101
+ glass: {
102
+ name: 'glass',
103
+ label: 'Glass',
104
+ description: 'Apple-inspired floating glass controls and bars, capsule and concentric shapes, and tint only for primary actions.',
105
+ cssClass: 'qds-variant-glass',
106
+ },
89
107
  } as Record<CanonicalDesignSystemVariantName, DesignSystemVariant> & {
108
+ fluent: DesignSystemVariant
90
109
  studio: DesignSystemVariant
91
110
  air: DesignSystemVariant
92
- glass: DesignSystemVariant
93
111
  feather: DesignSystemVariant
94
112
  mobile: DesignSystemVariant
95
113
  terminal: DesignSystemVariant
96
114
  }
97
115
 
98
116
  const LEGACY_VARIANT_ALIASES = {
117
+ fluent: {
118
+ name: 'fluent',
119
+ label: 'Win',
120
+ description: 'Legacy alias for the win variant.',
121
+ cssClass: 'qds-variant-win',
122
+ },
99
123
  studio: {
100
124
  name: 'studio',
101
- label: 'Fluent',
102
- description: 'Legacy alias for the fluent variant.',
103
- cssClass: 'qds-variant-fluent',
125
+ label: 'Win',
126
+ description: 'Legacy alias for the win variant.',
127
+ cssClass: 'qds-variant-win',
104
128
  },
105
129
  air: {
106
130
  name: 'air',
107
- label: 'Fluent',
108
- description: 'Legacy alias for the fluent variant.',
109
- cssClass: 'qds-variant-fluent',
110
- },
111
- glass: {
112
- name: 'glass',
113
- label: 'Fluent',
114
- description: 'Legacy alias for the fluent variant.',
115
- cssClass: 'qds-variant-fluent',
131
+ label: 'Win',
132
+ description: 'Legacy alias for the win variant.',
133
+ cssClass: 'qds-variant-win',
116
134
  },
117
135
  feather: {
118
136
  name: 'feather',
@@ -145,7 +163,7 @@ for (const [name, variant] of Object.entries(LEGACY_VARIANT_ALIASES)) {
145
163
  export const DEFAULT_THEME: QuasarDesignTheme = {
146
164
  name: DEFAULT_THEME_NAME,
147
165
  label: 'Default',
148
- description: 'Fluent 2 focused Quasar 2 design language with Ink, One, Term, Shadcn, and Zen variants.',
166
+ description: 'Windows 11 focused Quasar 2 design language with Ink, One, Term, Shadcn, Zen, and Glass variants.',
149
167
  variants: DESIGN_SYSTEM_VARIANTS,
150
168
  }
151
169
 
@@ -154,9 +172,9 @@ export const DESIGN_SYSTEM_THEMES = {
154
172
  } as const
155
173
 
156
174
  export function isBuiltInDesignSystemVariantName(value: unknown): value is BuiltInDesignSystemVariantName {
157
- return value === 'fluent' || value === 'ink' || value === 'one' || value === 'term' || value === 'shadcn'
158
- || value === 'zen'
159
- || value === 'studio' || value === 'air' || value === 'glass' || value === 'feather'
175
+ return value === 'win' || value === 'fluent' || value === 'ink' || value === 'one' || value === 'term' || value === 'shadcn'
176
+ || value === 'zen' || value === 'glass'
177
+ || value === 'studio' || value === 'air' || value === 'feather'
160
178
  || value === 'mobile' || value === 'terminal'
161
179
  }
162
180