tyrell-components 1.0.0-TC47 → 1.0.0-TC49

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 (41) hide show
  1. package/css/tyrell-theme.css +88 -92
  2. package/css/tyrell.css +19 -0
  3. package/dist/tyrell-theme.css +88 -92
  4. package/dist/tyrell.css +19 -0
  5. package/dist/tyrell.js +1 -1
  6. package/lib/base/ty-component.d.ts +8 -3
  7. package/lib/base/ty-component.js +13 -5
  8. package/lib/components/date-picker.js +2 -8
  9. package/lib/components/file-upload.d.ts +6 -0
  10. package/lib/components/file-upload.js +19 -4
  11. package/lib/components/input.js +1 -0
  12. package/lib/components/modal.d.ts +12 -0
  13. package/lib/components/modal.js +56 -13
  14. package/lib/components/popup.js +4 -4
  15. package/lib/components/radio.js +10 -2
  16. package/lib/components/resize-observer.d.ts +1 -0
  17. package/lib/components/resize-observer.js +12 -1
  18. package/lib/components/select.js +3 -5
  19. package/lib/components/selected-tags.js +1 -1
  20. package/lib/components/tabs.d.ts +2 -0
  21. package/lib/components/tabs.js +15 -0
  22. package/lib/components/tooltip.js +22 -0
  23. package/lib/components/wizard.d.ts +2 -0
  24. package/lib/components/wizard.js +15 -0
  25. package/lib/styles/button.js +4 -1
  26. package/lib/styles/date-picker.js +27 -1
  27. package/lib/styles/modal.d.ts +1 -1
  28. package/lib/styles/modal.js +18 -0
  29. package/lib/styles/option.d.ts +1 -1
  30. package/lib/styles/option.js +15 -0
  31. package/lib/styles/popup.d.ts +1 -1
  32. package/lib/styles/popup.js +22 -5
  33. package/lib/styles/select-base.js +53 -5
  34. package/lib/styles/select.d.ts +1 -1
  35. package/lib/styles/select.js +5 -1
  36. package/lib/utils/number-format.d.ts +6 -1
  37. package/lib/utils/number-format.js +9 -2
  38. package/lib/utils/positioning.js +4 -4
  39. package/lib/version.d.ts +1 -1
  40. package/lib/version.js +1 -1
  41. package/package.json +1 -1
@@ -13,8 +13,8 @@
13
13
  * <link rel="stylesheet" href=".../tyrell-theme.css">
14
14
  *
15
15
  * :root {
16
- * --ty-brand-hue: 200; // teal. Try 260 indigo, 30 orange, 145 emerald.
17
- * --ty-brand-chroma: 0.13;
16
+ * --ty-primary-hue: 200; // teal. Try 260 indigo, 30 orange, 145 emerald.
17
+ * --ty-primary-chroma: 0.13;
18
18
  * }
19
19
  *
20
20
  * =====================================================================
@@ -24,9 +24,9 @@
24
24
  * Every color in the library is one formula on five axes:
25
25
  *
26
26
  * oklch(
27
- * L = L-curve[shade] × flavor-l-factor ← Tier 3 × Tier 5
28
- * C = flavor-chroma × saturation-curve[shade] ← Tier 2 × Tier 4
29
- * H = flavor-hue ← Tier 2
27
+ * L = L-curve[shade] × flavor-l-factor ← Tier 2 × Tier 4
28
+ * C = flavor-chroma × saturation-curve[shade] ← Tier 1 × Tier 3
29
+ * H = flavor-hue ← Tier 1
30
30
  * )
31
31
  *
32
32
  * Pick a flavor (primary / success / warning / danger /
@@ -61,15 +61,15 @@
61
61
  *
62
62
  * SECTION 1 — KNOBS
63
63
  * The variables you might want to override. Six tiers from drop-in
64
- * rebrand (Tier 1) to surgical per-flavor tweak (Tier 5) plus solid
65
- * buttons (Tier 6).
64
+ * rebrand (Tier 1) to surgical per-flavor tweak (Tier 4) plus solid
65
+ * buttons (Tier 5).
66
66
  *
67
67
  * SECTION 2 — IMPLEMENTATION
68
68
  * The oklch() expressions that wire the knobs through to the actual
69
69
  * color tokens. Rarely needs editing — Section 1 is the contract.
70
70
  *
71
71
  * Browser support: oklch() is in every evergreen browser since mid-2023.
72
- * Tier 6 (solid) additionally uses OKLCH relative color — oklch(from …) —
72
+ * Tier 5 (solid) additionally uses OKLCH relative color — oklch(from …) —
73
73
  * which lands later: Chrome 119, Safari 16.4, Firefox 128 (mid-2024).
74
74
  * Solid fills have no fallback below those versions.
75
75
  *
@@ -83,59 +83,53 @@
83
83
  * these in your own `:root` (or `html.dark` for per-mode tuning) —
84
84
  * your declaration wins by source order.
85
85
  *
86
- * Tier 1 — SEEDS brand-hue + chroma. Rebrand in 2 lines.
87
- * Tier 2 — PER-FLAVOR ANCHORS each flavor's hue + chroma.
88
- * Tier 3 — L-CURVE 5 lightness stops for the emphasis ramp.
89
- * Tier 4 — SATURATION CURVE per-shade chroma multipliers.
90
- * Tier 5 — PER-FLAVOR L-FACTOR per-flavor lightness multiplier — push
86
+ * Tier 1 — FLAVOR SEEDS each flavor's hue + chroma, incl. primary.
87
+ * Tier 2 — L-CURVE 5 lightness stops for the emphasis ramp.
88
+ * Tier 3 — SATURATION CURVE per-shade chroma multipliers.
89
+ * Tier 4 — PER-FLAVOR L-FACTOR per-flavor lightness multiplier — push
91
90
  * one flavor up or down without touching
92
91
  * the others. Default 1.
93
- * Tier 6 — SOLID FILLS solid-button system: hover/active/tone
92
+ * Tier 5 — SOLID FILLS solid-button system: hover/active/tone
94
93
  * L offsets + per-theme dim/desaturate.
95
94
  * ===================================================================== */
96
95
 
97
96
  :root {
98
97
  /* ----------------------------------------------------------------
99
- * Tier 1 — SEEDS
100
- * Brand-hue + chroma drive primary, neutral, surfaces, inputs,
101
- * solid buttons. One slider rebrands the page.
98
+ * Tier 1 — FLAVOR SEEDS
99
+ * Every flavor including primary is one hue + one chroma. No
100
+ * flavor derives from another; each is a standalone dial:
101
+ * --ty-success-hue: 160; (more teal)
102
+ * --ty-warning-chroma: 0.2; (more vivid)
103
+ * Rebrand by overriding --ty-primary-hue/-chroma alone; touch the
104
+ * others only when a specific flavor needs its own tuning.
102
105
  * --------------------------------------------------------------*/
103
106
 
104
- --ty-brand-hue: 252;
105
- --ty-brand-chroma: 0.08; /* restrained default; the loud 0.2 read as "bollywood" */
107
+ --ty-primary-hue: 252;
108
+ --ty-primary-chroma: 0.08; /* restrained default; the loud 0.2 read as "bollywood" */
106
109
 
107
- /* Surface tint. 0 = monochrome surfaces (default, no brand leak).
108
- * Bump to ~0.005 (light) / ~0.012 (dark) to warm surfaces toward brand. */
110
+ /* Surface tint. 0 = monochrome surfaces (default, no primary leak).
111
+ * Bump to ~0.005 (light) / ~0.012 (dark) to warm surfaces toward primary. */
109
112
  --ty-surface-chroma: 0;
110
113
 
111
- /* ----------------------------------------------------------------
112
- * Tier 2 — PER-FLAVOR ANCHORS
113
- * Semantic colors (success/warning/danger/neutral) have their own
114
- * hue + chroma seeds so they keep meaning across brand changes.
115
- * Override any individually:
116
- * --ty-success-hue: 160; (more teal)
117
- * --ty-warning-chroma: 0.2; (more vivid)
118
- * --------------------------------------------------------------*/
119
-
120
114
  --ty-success-hue: 145;
121
- --ty-success-chroma: calc(var(--ty-brand-chroma) * 1.08);
115
+ --ty-success-chroma: 0.086;
122
116
 
123
117
  --ty-warning-hue: 76;
124
- --ty-warning-chroma: calc(var(--ty-brand-chroma) * 2.22);
118
+ --ty-warning-chroma: 0.178;
125
119
 
126
120
  --ty-danger-hue: 31;
127
- --ty-danger-chroma: calc(var(--ty-brand-chroma) * 1.95);
121
+ --ty-danger-chroma: 0.134;
128
122
 
129
- /* Neutral is ACHROMATIC by default — greys do not follow the brand.
123
+ /* Neutral is ACHROMATIC by default — greys do not follow primary.
130
124
  * Most of an interface is monochrome; a rebrand should not drift it.
131
- * To warm greys toward the brand (the pre-2026-08 behavior), opt in:
132
- * --ty-neutral-hue: var(--ty-brand-hue);
133
- * --ty-neutral-chroma: calc(var(--ty-brand-chroma) * 0.04); */
125
+ * To warm greys toward primary (the pre-2026-08 behavior), opt in:
126
+ * --ty-neutral-hue: var(--ty-primary-hue);
127
+ * --ty-neutral-chroma: 0.003; */
134
128
  --ty-neutral-hue: 0;
135
129
  --ty-neutral-chroma: 0;
136
130
 
137
131
  /* ----------------------------------------------------------------
138
- * Tier 3 — L-CURVE (light mode)
132
+ * Tier 2 — L-CURVE (light mode)
139
133
  * 5 lightness stops per flavor for the emphasis ramp.
140
134
  * Lower L = darker = more emphasis in light mode.
141
135
  * Plus 3 bg L stops for the soft-tint backgrounds.
@@ -209,7 +203,7 @@
209
203
  --ty-focus-ring-alpha: 5%; /* focus ring mix strength (dark needs more) */
210
204
 
211
205
  /* ----------------------------------------------------------------
212
- * Tier 4 — SATURATION CURVE
206
+ * Tier 3 — SATURATION CURVE
213
207
  * Per-shade chroma multipliers. Each shade's chroma =
214
208
  * flavor-chroma × multiplier. Drops near the extremes so
215
209
  * near-white and near-black can hold their tint.
@@ -222,13 +216,13 @@
222
216
  --ty-c-faint-mult: 0.46;
223
217
 
224
218
  /* ----------------------------------------------------------------
225
- * Tier 5 — PER-FLAVOR L-FACTOR
219
+ * Tier 4 — PER-FLAVOR L-FACTOR
226
220
  * Multiplies the L-curve values for that flavor only. Default 1 =
227
- * no change. Useful when one flavor's brand-default sits too close
228
- * to brand-hue on the wheel and the buttons blend.
221
+ * no change. Useful when one flavor's hue sits too close to
222
+ * primary's on the wheel and the buttons blend.
229
223
  *
230
- * Example: brand-hue: 47° (gold). Warning sits at 75° (amber).
231
- * Both render as similar warm browns at brand-chroma. Drop warning
224
+ * Example: primary-hue: 47° (gold). Warning sits at 75° (amber).
225
+ * Both render as similar warm browns at that chroma. Drop warning
232
226
  * a notch and it darkens enough to stand apart:
233
227
  * --ty-warning-l-factor: 0.85;
234
228
  *
@@ -238,24 +232,24 @@
238
232
  * light AND set its inverse (1 / factor, roughly) in `html.dark`.
239
233
  * --------------------------------------------------------------*/
240
234
 
241
- --ty-primary-l-factor: 1;
235
+ --ty-primary-l-factor: 0.96;
242
236
  --ty-success-l-factor: 1;
243
237
  --ty-warning-l-factor: 1.3;
244
- --ty-danger-l-factor: 1.01;
238
+ --ty-danger-l-factor: 0.93;
245
239
  --ty-neutral-l-factor: 1;
246
240
 
247
241
  /* ----------------------------------------------------------------
248
- * Tier 6 — SOLID FILLS
242
+ * Tier 5 — SOLID FILLS
249
243
  * Solid buttons are their OWN system, not the emphasis ramp. Each
250
244
  * flavor's fill defaults to --ty-color-{flavor}; the knobs below
251
245
  * derive its hover / active / tone+ / tone- and per-theme adjust.
252
- * Math lives in SECTION 2 (search "Tier 6 — SOLID"); these are the
246
+ * Math lives in SECTION 2 (search "Tier 5 — SOLID"); these are the
253
247
  * dials.
254
248
  *
255
249
  * Axis A — interaction & tone, OKLCH L offsets on the fill.
256
250
  * Axis B — per-theme adjust applied to the base fill (dim/desaturate).
257
251
  *
258
- * NOTE: like Tier 5, the emphasis curve flips for dark, so these L
252
+ * NOTE: like Tier 4, the emphasis curve flips for dark, so these L
259
253
  * offsets are sign-flipped in `html.dark` below (darken in light =
260
254
  * lighten in dark). Keep the two blocks in sync.
261
255
  * --------------------------------------------------------------*/
@@ -284,26 +278,27 @@
284
278
  }
285
279
 
286
280
  /* Dark mode overrides for the L-curve and saturation curve, plus Tier 1
287
- * (brand-hue/chroma), Tier 2 (per-flavor hue/chroma) and Tier 5 (l-factor)
288
- * — dark ships its own distinct brand/semantic tuning here, not a
281
+ * (per-flavor hue/chroma, incl. primary) and Tier 4 (l-factor)
282
+ * — dark ships its own distinct flavor tuning here, not a
289
283
  * carry-through of :root's light values. */
290
284
  html.dark,
291
285
  html[data-theme="dark"],
292
286
  [data-ty-theme].dark,
293
287
  [data-ty-theme][data-theme="dark"] {
288
+ --ty-primary-l-factor: 1;
294
289
  --ty-solid-fg-threshold: 0.5 !important;
295
- --ty-brand-hue: 233;
296
- --ty-brand-chroma: 0.095;
290
+ --ty-primary-hue: 226;
291
+ --ty-primary-chroma: 0.065;
297
292
  --ty-success-hue: 129;
298
- --ty-success-chroma: calc(var(--ty-brand-chroma) * 1.42);
293
+ --ty-success-chroma: 0.092;
299
294
  --ty-success-l-factor: 1.09;
300
295
  --ty-danger-hue: 13;
301
- --ty-danger-chroma: calc(var(--ty-brand-chroma) * 1.96);
296
+ --ty-danger-chroma: 0.101;
302
297
  --ty-danger-l-factor: 1.06;
303
298
  --ty-warning-hue: 82;
304
- --ty-warning-chroma: calc(var(--ty-brand-chroma) * 3);
299
+ --ty-warning-chroma: 0.195;
305
300
  --ty-warning-l-factor: 1.5;
306
- /* Tier 3 dark — inverted curve. Higher L = lighter text = more
301
+ /* Tier 2 dark — inverted curve. Higher L = lighter text = more
307
302
  * emphasis on a dark background. */
308
303
  --ty-l-strong: 0.72;
309
304
  --ty-l-bold: 0.66;
@@ -349,12 +344,12 @@ html[data-theme="dark"],
349
344
  --ty-l-bg-neutral-faint: 0.15;
350
345
  --ty-c-bg-neutral-faint-mult: 2;
351
346
 
352
- /* Tier 5 dark — neutral inks pulled down a notch against dark surfaces. */
347
+ /* Tier 4 dark — neutral inks pulled down a notch against dark surfaces. */
353
348
  --ty-neutral-l-factor: 0.8;
354
349
 
355
350
  --ty-focus-ring-alpha: 20%;
356
351
 
357
- /* Tier 4 dark — dim shades hold more chroma so they don't grey out;
352
+ /* Tier 3 dark — dim shades hold more chroma so they don't grey out;
358
353
  * strong shades trim chroma so bright tones don't over-pop. */
359
354
  --ty-c-strong-mult: 0.77;
360
355
  --ty-c-bold-mult: 1;
@@ -362,7 +357,7 @@ html[data-theme="dark"],
362
357
  --ty-c-soft-mult: 0.77;
363
358
  --ty-c-faint-mult: 0.5;
364
359
 
365
- /* Tier 6 dark — interaction offsets flip sign (press LIGHTENS on dark),
360
+ /* Tier 5 dark — interaction offsets flip sign (press LIGHTENS on dark),
366
361
  * and the per-theme adjust dims + desaturates the fills against the
367
362
  * dark canvas. (Computed solid tokens are declared once at html:root.) */
368
363
  /* Bigger than light mode's 0.04/0.08: small L deltas at the dark end of
@@ -401,8 +396,8 @@ html[data-theme="dark"],
401
396
  * Formulas are declared ONCE, at `html:root` (specificity 0,1,1 — NOT
402
397
  * plain `:root` (0,1,0)): they out-rank tyrell.css's hardcoded light
403
398
  * tokens by specificity and its hardcoded `html.dark` hexes (0,1,1) by
404
- * source order, since the brand layer loads after. Dark mode needs no
405
- * formula duplicates — the dials they read (Tier 3/4, SECTION 1) are
399
+ * source order, since the theme layer loads after. Dark mode needs no
400
+ * formula duplicates — the dials they read (Tier 2/3, SECTION 1) are
406
401
  * what flip per mode. The `html.dark` block at the END of this file
407
402
  * holds only genuine per-mode DATA (surface ladder, hand-pinned
408
403
  * absolutes) — never formulas. If you add a token here, do NOT mirror
@@ -418,8 +413,8 @@ html:root,
418
413
  * ramp formula reads that seed's c + h channels via relative color
419
414
  * syntax; L always comes from the mode-flipped curve. Two ways in:
420
415
  *
421
- * numbers (default) — the Tier 1/2 hue+chroma dials construct the
422
- * seed: --ty-brand-hue: 200; --ty-brand-chroma: 0.13;
416
+ * numbers (default) — the Tier 1 hue+chroma dials construct the
417
+ * seed: --ty-primary-hue: 200; --ty-primary-chroma: 0.13;
423
418
  *
424
419
  * a color — set the seed directly and the dials are bypassed:
425
420
  * --ty-primary-seed: #76467c;
@@ -444,10 +439,10 @@ html:root,
444
439
  * - l-factor points rather than shoves: it moves the ink a little,
445
440
  * and only alpha × that movement reaches the tint.
446
441
  *
447
- * The wash amount is the --ty-a-bg-* dials (Tier 3 area). */
442
+ * The wash amount is the --ty-a-bg-* dials (Tier 2 area). */
448
443
  --ty-primary-seed-resolved: var(
449
444
  --ty-primary-seed,
450
- oklch(0.5 var(--ty-brand-chroma) var(--ty-brand-hue))
445
+ oklch(0.5 var(--ty-primary-chroma) var(--ty-primary-hue))
451
446
  );
452
447
  --ty-success-seed-resolved: var(
453
448
  --ty-success-seed,
@@ -659,7 +654,7 @@ html:root,
659
654
  );
660
655
 
661
656
  /* ----------------------------------------------------------------
662
- * Global neutral borders — own family, own L ladder (Tier 3).
657
+ * Global neutral borders — own family, own L ladder (Tier 2).
663
658
  * Tinted by the neutral seeds like everything grey, but NOT tied to
664
659
  * the text emphasis curve or --ty-neutral-l-factor. Per-flavor
665
660
  * accent borders (--ty-border-{flavor}) stay ink aliases — a colored
@@ -683,7 +678,7 @@ html:root,
683
678
 
684
679
  /* ----------------------------------------------------------------
685
680
  * Text ladder + surface borders — engine-wired versions of tokens
686
- * tyrell.css hardcodes as hexes. Own L dials (Tier 3), neutral
681
+ * tyrell.css hardcodes as hexes. Own L dials (Tier 2), neutral
687
682
  * hue/chroma tint. These out-rank the base hexes the same way every
688
683
  * other token here does; a rebrand now reaches body text too.
689
684
  * --------------------------------------------------------------*/
@@ -738,7 +733,7 @@ html:root,
738
733
  );
739
734
 
740
735
  /* ----------------------------------------------------------------
741
- * Inputs — tied to neutral ramp so form controls retint with brand.
736
+ * Inputs — tied to neutral ramp so form controls retint with primary.
742
737
  * --------------------------------------------------------------*/
743
738
  --ty-input-bg: var(--ty-surface-input);
744
739
  --ty-input-color: var(--ty-color-neutral-strong);
@@ -757,10 +752,10 @@ html:root,
757
752
  }
758
753
 
759
754
  /* ----------------------------------------------------------------
760
- * Tier 6 — SOLID (implementation)
755
+ * Tier 5 — SOLID (implementation)
761
756
  * Solid is its OWN system, NOT the text/emphasis ramp. The dials
762
757
  * (--ty-solid-hover-l / -active-l / -strong-l / -soft-l and
763
- * --ty-solid-l / -c / -h) live in SECTION 1, Tier 6. Below is the
758
+ * --ty-solid-l / -c / -h) live in SECTION 1, Tier 5. Below is the
764
759
  * derivation only: base fill bakes in the per-theme adjust (Axis B);
765
760
  * hover/active/strong/soft offset the base by Axis A. Override any
766
761
  * single --ty-solid-{flavor}-{state} to recolor just that segment.
@@ -768,8 +763,8 @@ html:root,
768
763
  * Declared at `html:root` (specificity 0,1,1) — NOT plain `:root` (0,1,0) —
769
764
  * on purpose: it must out-rank tyrell.css's hardcoded dark solids at
770
765
  * `html.dark` (0,1,1). It wins light by specificity over base's `html{}`,
771
- * and wins dark by source order over base's `html.dark` (brand loads after).
772
- * That's what lets dark solids re-tint with --ty-brand-hue. Declared ONCE —
766
+ * and wins dark by source order over base's `html.dark` (theme layer loads after).
767
+ * That's what lets dark solids re-tint with --ty-primary-hue. Declared ONCE —
773
768
  * the oklch(from var(--ty-color-*)) formulas resolve per-mode automatically,
774
769
  * so no dark duplicate is needed.
775
770
  * --------------------------------------------------------------*/
@@ -806,7 +801,7 @@ html:root,
806
801
  * SOLID FOREGROUNDS — auto-contrast.
807
802
  *
808
803
  * Each fill gets a foreground picked from its OWN lightness, so a
809
- * rebrand (--ty-brand-hue / --ty-brand-chroma / any L-curve override)
804
+ * rebrand (--ty-primary-hue / --ty-primary-chroma / any L-curve override)
810
805
  * can't strand white text on a pale fill. Branchless, no JS:
811
806
  *
812
807
  * clamp(0, (threshold - l) * 1000, 1) -> 1 (white) when the fill
@@ -993,15 +988,15 @@ html:root,
993
988
  * work, switches just snap (the pre-TC37 behavior).
994
989
  * ===================================================================== */
995
990
 
996
- @property --ty-brand-hue {
991
+ @property --ty-primary-hue {
997
992
  syntax: "<number>";
998
993
  inherits: true;
999
- initial-value: 45;
994
+ initial-value: 252;
1000
995
  }
1001
- @property --ty-brand-chroma {
996
+ @property --ty-primary-chroma {
1002
997
  syntax: "<number>";
1003
998
  inherits: true;
1004
- initial-value: 0.125;
999
+ initial-value: 0.08;
1005
1000
  }
1006
1001
  @property --ty-surface-chroma {
1007
1002
  syntax: "<number>";
@@ -1378,20 +1373,21 @@ html:root,
1378
1373
  html,
1379
1374
  [data-ty-theme] {
1380
1375
  transition-property:
1381
- --ty-brand-hue, --ty-brand-chroma, --ty-surface-chroma, --ty-success-hue,
1382
- --ty-success-chroma, --ty-warning-hue, --ty-warning-chroma,
1383
- --ty-danger-hue, --ty-danger-chroma, --ty-neutral-hue,
1384
- --ty-neutral-chroma, --ty-l-strong, --ty-l-bold, --ty-l-base, --ty-l-soft,
1385
- --ty-l-faint, --ty-a-bg-base, --ty-a-bg-bold, --ty-a-bg-soft,
1386
- --ty-l-text-strong, --ty-l-text-bold, --ty-l-text-base, --ty-l-text-soft,
1387
- --ty-l-text-faint, --ty-l-border-content, --ty-l-border-elevated,
1388
- --ty-l-border-floating, --ty-l-border-strong, --ty-l-border-bold,
1389
- --ty-l-border, --ty-l-border-soft, --ty-l-border-faint,
1390
- --ty-l-surface-canvas, --ty-l-surface-content, --ty-l-surface-elevated,
1391
- --ty-l-surface-floating, --ty-l-surface-input, --ty-l-solid-neutral,
1392
- --ty-l-solid-neutral-strong, --ty-l-bg-neutral-strong,
1393
- --ty-l-bg-neutral-faint, --ty-c-bg-neutral-faint-mult, --ty-c-strong-mult,
1394
- --ty-c-bold-mult, --ty-c-base-mult, --ty-c-soft-mult, --ty-c-faint-mult,
1376
+ --ty-primary-hue, --ty-primary-chroma, --ty-surface-chroma,
1377
+ --ty-success-hue, --ty-success-chroma, --ty-warning-hue,
1378
+ --ty-warning-chroma, --ty-danger-hue, --ty-danger-chroma,
1379
+ --ty-neutral-hue, --ty-neutral-chroma, --ty-l-strong, --ty-l-bold,
1380
+ --ty-l-base, --ty-l-soft, --ty-l-faint, --ty-a-bg-base, --ty-a-bg-bold,
1381
+ --ty-a-bg-soft, --ty-l-text-strong, --ty-l-text-bold, --ty-l-text-base,
1382
+ --ty-l-text-soft, --ty-l-text-faint, --ty-l-border-content,
1383
+ --ty-l-border-elevated, --ty-l-border-floating, --ty-l-border-strong,
1384
+ --ty-l-border-bold, --ty-l-border, --ty-l-border-soft,
1385
+ --ty-l-border-faint, --ty-l-surface-canvas, --ty-l-surface-content,
1386
+ --ty-l-surface-elevated, --ty-l-surface-floating, --ty-l-surface-input,
1387
+ --ty-l-solid-neutral, --ty-l-solid-neutral-strong,
1388
+ --ty-l-bg-neutral-strong, --ty-l-bg-neutral-faint,
1389
+ --ty-c-bg-neutral-faint-mult, --ty-c-strong-mult, --ty-c-bold-mult,
1390
+ --ty-c-base-mult, --ty-c-soft-mult, --ty-c-faint-mult,
1395
1391
  --ty-primary-l-factor, --ty-success-l-factor, --ty-warning-l-factor,
1396
1392
  --ty-danger-l-factor, --ty-neutral-l-factor, --ty-primary-solid-l,
1397
1393
  --ty-success-solid-l, --ty-warning-solid-l, --ty-danger-solid-l,
package/css/tyrell.css CHANGED
@@ -1369,3 +1369,22 @@ RESPONSIVE VARIANTS
1369
1369
  --ty-font-sm: 1rem;
1370
1370
  }
1371
1371
  }
1372
+
1373
+ /* =================================================================
1374
+ MODAL BACKDROP ZOOM (opt-in)
1375
+ While any <ty-modal backdrop-zoom open> is open, the component toggles
1376
+ .ty-modal-zoom on <html> and the page body scales down slightly
1377
+ (Vaul/shadcn-style). The modal itself renders in the top layer, which
1378
+ escapes ancestor transforms — only the page behind it moves.
1379
+ Caveat: a scaled <body> becomes the containing block for position:fixed
1380
+ descendants — apps with fixed headers/sidebars should not use backdrop-zoom.
1381
+ ================================================================= */
1382
+
1383
+ body {
1384
+ transition: scale var(--ty-modal-duration, 200ms) ease-out;
1385
+ }
1386
+
1387
+ html.ty-modal-zoom body {
1388
+ scale: 0.99;
1389
+ transform-origin: 50% 50%;
1390
+ }