tyrell-components 1.0.0-RC12 → 1.0.0-RC13

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 (178) hide show
  1. package/README.md +1 -0
  2. package/css/tyrell-colors-static.css +316 -0
  3. package/css/tyrell-theme.css +1454 -0
  4. package/css/tyrell.css +108 -423
  5. package/dist/tyrell-colors-static.css +316 -0
  6. package/dist/tyrell-theme.css +1454 -0
  7. package/dist/tyrell.css +108 -423
  8. package/dist/tyrell.js +1 -1
  9. package/lib/components/button.d.ts +7 -0
  10. package/lib/components/button.d.ts.map +1 -1
  11. package/lib/components/button.js +12 -1
  12. package/lib/components/button.js.map +1 -1
  13. package/lib/components/calendar-month.d.ts +17 -0
  14. package/lib/components/calendar-month.d.ts.map +1 -1
  15. package/lib/components/calendar-month.js +121 -7
  16. package/lib/components/calendar-month.js.map +1 -1
  17. package/lib/components/calendar.d.ts +3 -1
  18. package/lib/components/calendar.d.ts.map +1 -1
  19. package/lib/components/calendar.js +19 -9
  20. package/lib/components/calendar.js.map +1 -1
  21. package/lib/components/checkbox.d.ts +4 -3
  22. package/lib/components/checkbox.d.ts.map +1 -1
  23. package/lib/components/checkbox.js +23 -35
  24. package/lib/components/checkbox.js.map +1 -1
  25. package/lib/components/copy.d.ts +4 -3
  26. package/lib/components/copy.d.ts.map +1 -1
  27. package/lib/components/copy.js +22 -21
  28. package/lib/components/copy.js.map +1 -1
  29. package/lib/components/date-picker.d.ts +12 -1
  30. package/lib/components/date-picker.d.ts.map +1 -1
  31. package/lib/components/date-picker.js +122 -32
  32. package/lib/components/date-picker.js.map +1 -1
  33. package/lib/components/input.d.ts +3 -2
  34. package/lib/components/input.d.ts.map +1 -1
  35. package/lib/components/input.js +24 -21
  36. package/lib/components/input.js.map +1 -1
  37. package/lib/components/modal.d.ts.map +1 -1
  38. package/lib/components/modal.js +22 -3
  39. package/lib/components/modal.js.map +1 -1
  40. package/lib/components/option.d.ts +0 -11
  41. package/lib/components/option.d.ts.map +1 -1
  42. package/lib/components/option.js +4 -103
  43. package/lib/components/option.js.map +1 -1
  44. package/lib/components/popup.d.ts.map +1 -1
  45. package/lib/components/popup.js +36 -2
  46. package/lib/components/popup.js.map +1 -1
  47. package/lib/components/radio.d.ts +5 -2
  48. package/lib/components/radio.d.ts.map +1 -1
  49. package/lib/components/radio.js +16 -5
  50. package/lib/components/radio.js.map +1 -1
  51. package/lib/components/select.d.ts +119 -9
  52. package/lib/components/select.d.ts.map +1 -1
  53. package/lib/components/select.js +426 -58
  54. package/lib/components/select.js.map +1 -1
  55. package/lib/components/selected-tags.d.ts +19 -6
  56. package/lib/components/selected-tags.d.ts.map +1 -1
  57. package/lib/components/selected-tags.js +43 -7
  58. package/lib/components/selected-tags.js.map +1 -1
  59. package/lib/components/switch.d.ts +4 -3
  60. package/lib/components/switch.d.ts.map +1 -1
  61. package/lib/components/switch.js +17 -29
  62. package/lib/components/switch.js.map +1 -1
  63. package/lib/components/tabs.d.ts.map +1 -1
  64. package/lib/components/tabs.js +180 -25
  65. package/lib/components/tabs.js.map +1 -1
  66. package/lib/components/tag.js +1 -1
  67. package/lib/components/tag.js.map +1 -1
  68. package/lib/components/tooltip.d.ts +4 -2
  69. package/lib/components/tooltip.d.ts.map +1 -1
  70. package/lib/components/tooltip.js +109 -70
  71. package/lib/components/tooltip.js.map +1 -1
  72. package/lib/components/wizard.d.ts.map +1 -1
  73. package/lib/components/wizard.js +22 -3
  74. package/lib/components/wizard.js.map +1 -1
  75. package/lib/index.d.ts +2 -1
  76. package/lib/index.d.ts.map +1 -1
  77. package/lib/index.js +2 -1
  78. package/lib/index.js.map +1 -1
  79. package/lib/styles/button.d.ts +36 -6
  80. package/lib/styles/button.d.ts.map +1 -1
  81. package/lib/styles/button.js +239 -36
  82. package/lib/styles/button.js.map +1 -1
  83. package/lib/styles/calendar-month.d.ts +3 -1
  84. package/lib/styles/calendar-month.d.ts.map +1 -1
  85. package/lib/styles/calendar-month.js +64 -9
  86. package/lib/styles/calendar-month.js.map +1 -1
  87. package/lib/styles/calendar-navigation.d.ts +1 -1
  88. package/lib/styles/calendar-navigation.d.ts.map +1 -1
  89. package/lib/styles/calendar-navigation.js +1 -1
  90. package/lib/styles/checkbox.d.ts +3 -1
  91. package/lib/styles/checkbox.d.ts.map +1 -1
  92. package/lib/styles/checkbox.js +33 -55
  93. package/lib/styles/checkbox.js.map +1 -1
  94. package/lib/styles/copy.d.ts +3 -1
  95. package/lib/styles/copy.d.ts.map +1 -1
  96. package/lib/styles/copy.js +29 -6
  97. package/lib/styles/copy.js.map +1 -1
  98. package/lib/styles/custom-scrollbar.d.ts +1 -1
  99. package/lib/styles/custom-scrollbar.d.ts.map +1 -1
  100. package/lib/styles/custom-scrollbar.js +2 -2
  101. package/lib/styles/date-picker.d.ts +3 -1
  102. package/lib/styles/date-picker.d.ts.map +1 -1
  103. package/lib/styles/date-picker.js +53 -99
  104. package/lib/styles/date-picker.js.map +1 -1
  105. package/lib/styles/file-upload.d.ts +1 -1
  106. package/lib/styles/file-upload.d.ts.map +1 -1
  107. package/lib/styles/file-upload.js +3 -3
  108. package/lib/styles/input.d.ts +3 -1
  109. package/lib/styles/input.d.ts.map +1 -1
  110. package/lib/styles/input.js +67 -123
  111. package/lib/styles/input.js.map +1 -1
  112. package/lib/styles/multiselect.d.ts +3 -1
  113. package/lib/styles/multiselect.d.ts.map +1 -1
  114. package/lib/styles/multiselect.js +26 -2
  115. package/lib/styles/multiselect.js.map +1 -1
  116. package/lib/styles/option.d.ts +1 -1
  117. package/lib/styles/option.d.ts.map +1 -1
  118. package/lib/styles/option.js +0 -51
  119. package/lib/styles/option.js.map +1 -1
  120. package/lib/styles/radio.d.ts +3 -1
  121. package/lib/styles/radio.d.ts.map +1 -1
  122. package/lib/styles/radio.js +24 -21
  123. package/lib/styles/radio.js.map +1 -1
  124. package/lib/styles/scroll-container.d.ts +1 -1
  125. package/lib/styles/scroll-container.d.ts.map +1 -1
  126. package/lib/styles/select-base.d.ts +9 -0
  127. package/lib/styles/select-base.d.ts.map +1 -0
  128. package/lib/styles/select-base.js +973 -0
  129. package/lib/styles/select-base.js.map +1 -0
  130. package/lib/styles/select.d.ts +3 -3
  131. package/lib/styles/select.d.ts.map +1 -1
  132. package/lib/styles/select.js +98 -30
  133. package/lib/styles/select.js.map +1 -1
  134. package/lib/styles/step.d.ts +1 -1
  135. package/lib/styles/step.d.ts.map +1 -1
  136. package/lib/styles/switch.d.ts +3 -1
  137. package/lib/styles/switch.d.ts.map +1 -1
  138. package/lib/styles/switch.js +25 -10
  139. package/lib/styles/switch.js.map +1 -1
  140. package/lib/styles/tab.d.ts +1 -1
  141. package/lib/styles/tab.d.ts.map +1 -1
  142. package/lib/styles/tabs.d.ts +1 -1
  143. package/lib/styles/tabs.d.ts.map +1 -1
  144. package/lib/styles/tabs.js +71 -1
  145. package/lib/styles/tabs.js.map +1 -1
  146. package/lib/styles/tag.d.ts.map +1 -1
  147. package/lib/styles/tag.js +4 -1
  148. package/lib/styles/tag.js.map +1 -1
  149. package/lib/styles/textarea.d.ts +1 -1
  150. package/lib/styles/textarea.d.ts.map +1 -1
  151. package/lib/styles/textarea.js +5 -5
  152. package/lib/styles/tooltip.d.ts +4 -2
  153. package/lib/styles/tooltip.d.ts.map +1 -1
  154. package/lib/styles/tooltip.js +4 -119
  155. package/lib/styles/tooltip.js.map +1 -1
  156. package/lib/styles/wizard.d.ts +1 -1
  157. package/lib/styles/wizard.d.ts.map +1 -1
  158. package/lib/styles/wizard.js +18 -6
  159. package/lib/styles/wizard.js.map +1 -1
  160. package/lib/types/common.d.ts +1 -1
  161. package/lib/types/common.d.ts.map +1 -1
  162. package/lib/types/common.js +3 -1
  163. package/lib/types/common.js.map +1 -1
  164. package/lib/utils/icons.d.ts +10 -0
  165. package/lib/utils/icons.d.ts.map +1 -0
  166. package/lib/utils/icons.js +10 -0
  167. package/lib/utils/icons.js.map +1 -0
  168. package/lib/utils/loader-registry.d.ts +2 -2
  169. package/lib/utils/loader-registry.js +2 -2
  170. package/lib/utils/positioning.d.ts +31 -0
  171. package/lib/utils/positioning.d.ts.map +1 -1
  172. package/lib/utils/positioning.js +22 -3
  173. package/lib/utils/positioning.js.map +1 -1
  174. package/lib/version.d.ts +1 -1
  175. package/lib/version.js +1 -1
  176. package/package.json +7 -4
  177. package/css/tyrell-brand.css +0 -1015
  178. package/dist/tyrell-brand.css +0 -1015
@@ -1,17 +1,47 @@
1
1
  /**
2
2
  * Button Component Styles
3
3
  *
4
- * Three appearance variants × six semantic flavors × three tones (+/base/-).
4
+ * Three appearance variants × five semantic flavors × three tones (+/base/-).
5
5
  * Each variant uses ONE token system:
6
+ *
6
7
  * - solid → flat per-segment tokens --ty-solid-{flavor}{,-hover,-active,
7
- * -strong,-soft,-fg}. Derived in tyrell-brand.css via OKLCH on
8
+ * -strong,-soft,-fg}. Derived in tyrell-theme.css via OKLCH on
8
9
  * 3 axes (color / hover-active / theme chroma-hue); literal in
9
- * tyrell.css. The component does no color math.
10
- * - outlined → --ty-color-{flavor}-{strong|base|soft} (text === border)
11
- * - ghost → --ty-color-{flavor}-{strong|base|soft} (text), --ty-bg-{flavor}-soft (hover)
10
+ * tyrell.css. The component does no color math for the fill.
11
+ * Depth chrome (border + drop shadow) IS computed here, from
12
+ * the fill, via relative color — see "Depth chrome" below.
13
+ * - outlined → --ty-color-{flavor}-{strong|base|soft} (text === border at
14
+ * rest); hover/active/focus always resolve to -strong,
15
+ * whatever the resting tone was — see "Hover escalation".
16
+ * - ghost → same as outlined, text only (no border), --ty-bg-{flavor}-soft
17
+ * background on hover.
18
+ *
19
+ * Neutral is the exception in both outlined and ghost: its `+` tone reads
20
+ * --ty-solid-neutral-strong (the ink dial solid buttons use — the only
21
+ * value that actually inverts light↔dark for full contrast) instead of the
22
+ * generic --ty-color-neutral-strong text-emphasis token. Base/soft neutral
23
+ * stay on the generic token like every other flavor.
24
+ *
25
+ * Depth chrome (solid only): a 1px border + soft drop shadow, both derived
26
+ * from the fill via oklch(from …), scaled by --ty-button-depth (0–1). The
27
+ * border reads the TONE'S RESTING fill (not the current/hover one) so it
28
+ * stays stationary while the fill rises toward it on interaction. Offset
29
+ * direction/magnitude is --ty-button-border-l (mode-flipped: no border at
30
+ * all for colored solids in dark, a lit edge in light) with its own
31
+ * stronger dial for neutral, --ty-button-border-l-neutral (ink has no hue
32
+ * to separate it from the canvas). Escape hatches --ty-solid-border-color
33
+ * / --ty-solid-border-width outrank the derivation entirely.
34
+ *
35
+ * Hover escalation (outlined/ghost): :hover/:active/:focus-visible always
36
+ * resolve to the -strong tier regardless of starting tone — soft and base
37
+ * both rise to the same peak on interaction. Composes with `muted` rather
38
+ * than fighting it (see the escalation rules themselves for the exact
39
+ * split) — a pressed muted button lands on the same color as a pressed
40
+ * plain one of the same flavor.
12
41
  *
13
42
  * Per-instance overrides via host CSS variables:
14
- * --ty-button-bg, --ty-button-bg-hover, --ty-button-color, --ty-button-border
43
+ * --ty-button-bg, --ty-button-bg-hover, --ty-button-color, --ty-button-border,
44
+ * --ty-solid-border-color, --ty-solid-border-width
15
45
  */
16
46
  import { FLAVORS } from '../types/common.js';
17
47
  /* One block per flavor, per appearance. Selectors and tokens are formulaic —
@@ -25,45 +55,119 @@ import { FLAVORS } from '../types/common.js';
25
55
  const tokenRef = (prefix, f, suffix, fb) => fb
26
56
  ? `var(${prefix}-${f}${suffix}, var(${prefix}-${fb}${suffix}))`
27
57
  : `var(${prefix}-${f}${suffix})`;
58
+ /* Nudge a fill by an interaction offset (hover/active), tone-aware: each
59
+ tone's states derive from the TONE's own fill, not the base fill —
60
+ otherwise tone- hover jumps from the soft fill to near-base darkness.
61
+ States deliberately do NOT re-derive the text color: fg is decided by
62
+ the tone's REST fill and stays stable through interaction — the ±0.04/
63
+ 0.08 L nudges keep AA for any rest-passing fill, and re-deriving would
64
+ flicker black↔white whenever a nudge crosses the fg threshold. */
65
+ const nudged = (fillExpr, offsetDial) => `oklch(from ${fillExpr} calc(l + var(--ty-${offsetDial})) c h)`;
66
+ /* Fill-relative nudge: moves TOWARD mid-lightness by the dial's magnitude,
67
+ whatever the fill. Needed for neutral+ — full-contrast ink sits at an L
68
+ extreme in both modes (near-black light / near-white dark), where the
69
+ MODE-directional dials clip into the L ceiling/floor and vanish. */
70
+ const nudgedMid = (fillExpr, offsetDial) => `oklch(from ${fillExpr} calc(l + sign(0.5 - l) * abs(var(--ty-${offsetDial}))) c h)`;
71
+ /* Solid rules assign --_solid-bg (the CURRENT fill — swapped by hover/
72
+ active) and --_solid-rest (the tone's RESTING fill — set only by rest/
73
+ tone rules, never by state rules). The base button.solid rule holds the
74
+ single set of formulas that consume them: background follows --_solid-bg;
75
+ the depth border derives from --_solid-rest so it stays STATIONARY while
76
+ the fill steps up on hover — the fill rises toward the lit edge instead
77
+ of dragging the edge along with it. */
28
78
  const solidFlavor = (f, fb) => {
29
79
  const solid = (suffix) => tokenRef('--ty-solid', f, suffix, fb);
80
+ // Neutral reads its own, stronger border offset (no hue separates ink
81
+ // from the canvas — see --ty-button-border-l-neutral in tyrell.css).
82
+ // Colored flavors must RESET to the plain dial: the bare button.solid
83
+ // rule (which matches every solid button) sets the neutral chain.
84
+ const borderL = f === 'neutral'
85
+ ? ' --_border-l: var(--ty-button-border-l-neutral, var(--ty-button-border-l, -0.15));'
86
+ : ' --_border-l: var(--ty-button-border-l, -0.15);';
87
+ // Neutral+ is full-contrast ink at an L extreme — its hover/active must
88
+ // move toward mid (fill-relative), not in the mode's direction.
89
+ const plusNudge = f === 'neutral' ? nudgedMid : nudged;
30
90
  return `
31
- button.solid.${f} { --_ring: ${tokenRef('--ty-color', f, '', fb)}; background: var(--ty-button-bg, ${solid('')}); color: var(--ty-button-color, ${solid('-fg')}); }
32
- button.solid.${f}.tone-plus { background: var(--ty-button-bg, ${solid('-strong')}); }
33
- button.solid.${f}.tone-minus { background: var(--ty-button-bg, ${solid('-soft')}); }
34
- button.solid.${f}:hover:not(:disabled) { background: var(--ty-button-bg-hover, ${solid('-hover')}); }
35
- button.solid.${f}:active:not(:disabled) { background: ${solid('-active')}; }
91
+ button.solid.${f} { --_ring: ${tokenRef('--ty-color', f, '', fb)}; --_solid-bg: var(--ty-button-bg, var(--_muted-solid-bg, ${solid('')})); --_solid-rest: var(--ty-button-bg, var(--_muted-solid-bg, ${solid('')}));${borderL} color: var(--ty-button-color, var(--_muted-solid-fg, ${solid('-fg')})); }
92
+ button.solid.${f}.tone-plus { --_solid-bg: var(--ty-button-bg, var(--_muted-solid-bg, ${solid('-strong')})); --_solid-rest: var(--ty-button-bg, var(--_muted-solid-bg, ${solid('-strong')})); color: var(--ty-button-color, var(--_muted-solid-fg, ${solid('-strong-fg')})); }
93
+ button.solid.${f}.tone-minus { --_solid-bg: var(--ty-button-bg, var(--_muted-solid-bg, ${solid('-soft')})); --_solid-rest: var(--ty-button-bg, var(--_muted-solid-bg, ${solid('-soft')})); color: var(--ty-button-color, var(--_muted-solid-fg, ${solid('-soft-fg')})); }
94
+ button.solid.${f}:hover:not(:disabled) { --_solid-bg: var(--ty-button-bg-hover, ${solid('-hover')}); }
95
+ button.solid.${f}:active:not(:disabled) { --_solid-bg: ${solid('-active')}; }
96
+ button.solid.${f}.tone-plus:hover:not(:disabled) { --_solid-bg: var(--ty-button-bg-hover, ${plusNudge(solid('-strong'), 'solid-hover-l')}); }
97
+ button.solid.${f}.tone-plus:active:not(:disabled) { --_solid-bg: ${plusNudge(solid('-strong'), 'solid-active-l')}; }
98
+ button.solid.${f}.tone-minus:hover:not(:disabled) { --_solid-bg: var(--ty-button-bg-hover, ${nudged(solid('-soft'), 'solid-hover-l')}); }
99
+ button.solid.${f}.tone-minus:active:not(:disabled) { --_solid-bg: ${nudged(solid('-soft'), 'solid-active-l')}; }
36
100
  `;
37
101
  };
38
102
  const outlinedFlavor = (f, fb) => {
39
103
  const color = (suffix) => tokenRef('--ty-color', f, suffix, fb);
104
+ // Neutral+ only: bare text/border need page contrast, which the
105
+ // per-flavor ladder is FOR (it deliberately inverts per mode) — pointing
106
+ // base/soft at the solid ink ramp was a real bug (dark-mode contrast
107
+ // against the canvas measured 1.01/1.20 — invisible; WCAG minimum is
108
+ // 4.5). Strong stays on ink: at 0.93 dark / 0.15 light it's still 16.5:1,
109
+ // and matches solid's "+" for the loud-CTA identity that was the ask.
110
+ const textInk = (suffix) => (f === 'neutral' && suffix === '-strong' ? `var(--ty-solid-neutral${suffix})` : color(suffix));
40
111
  return `
41
112
  button.outlined.${f} {
42
- color: var(--ty-button-color, ${color('')});
43
- border-color: var(--ty-button-border, ${color('')});
113
+ color: var(--ty-button-color, var(--_muted-outlined-line, ${textInk('')}));
114
+ border-color: var(--ty-button-border, var(--_muted-outlined-line, ${textInk('')}));
44
115
  }
45
116
  button.outlined.${f}.tone-plus {
46
- color: var(--ty-button-color, ${color('-strong')});
47
- border-color: var(--ty-button-border, ${color('-strong')});
117
+ color: var(--ty-button-color, var(--_muted-outlined-line, ${textInk('-strong')}));
118
+ border-color: var(--ty-button-border, var(--_muted-outlined-line, ${textInk('-strong')}));
48
119
  }
49
120
  button.outlined.${f}.tone-minus {
50
- color: var(--ty-button-color, ${color('-soft')});
51
- border-color: var(--ty-button-border, ${color('-soft')});
121
+ color: var(--ty-button-color, var(--_muted-outlined-line, ${textInk('-soft')}));
122
+ border-color: var(--ty-button-border, var(--_muted-outlined-line, ${textInk('-soft')}));
52
123
  }
53
124
  button.outlined.${f}:hover:not(:disabled) {
54
125
  background: var(--ty-button-bg-hover, ${tokenRef('--ty-bg', f, '-soft', fb)});
55
126
  }
127
+ /* Rest is whatever tone you picked; hover/active/focus always escalates to
128
+ the SAME peak — most-emphasized ("+") color, regardless of starting
129
+ tone. tone-plus is already there at rest, so this is a no-op for it.
130
+ :hover only, :not(.muted) — muted's hover-reveal is a DIFFERENT contract
131
+ (reveal the plain button's RESTING color, tested directly against it);
132
+ this rule would outrank that fallback and show strong instead.
133
+ :active/:focus-visible apply to muted too (no exclusion) — muted's own
134
+ reveal-on-press mechanism has much lower specificity than this rule, so
135
+ it simply wins outright, landing muted and plain on the same escalated
136
+ color when both are pressed — which is what muted's OWN test expects. */
137
+ button.outlined.${f}:not(.muted):hover:not(:disabled),
138
+ button.outlined.${f}:active:not(:disabled),
139
+ button.outlined.${f}:focus-visible {
140
+ color: var(--ty-button-color, ${textInk('-strong')});
141
+ border-color: var(--ty-button-border, ${textInk('-strong')});
142
+ }
56
143
  `;
57
144
  };
58
145
  const ghostFlavor = (f, fb) => {
59
146
  const color = (suffix) => tokenRef('--ty-color', f, suffix, fb);
147
+ // Neutral+ only: bare text needs page contrast, which is what the
148
+ // per-flavor text ladder is FOR (it deliberately inverts per mode) — the
149
+ // solid ink ramp doesn't need to invert for readability, a fill reads as
150
+ // a shape regardless of its own lightness. Pointing base/soft neutral
151
+ // text at ink was a real bug: dark-mode contrast against the canvas
152
+ // measured 1.01/1.20 (WCAG minimum is 4.5), i.e. invisible. Strong stays
153
+ // on ink — at 0.93 dark / 0.15 light it's still far above threshold
154
+ // (16.5:1), and matches solid's "+" for the loud-CTA identity that was
155
+ // the actual ask.
156
+ const ink = (suffix) => (f === 'neutral' && suffix === '-strong' ? `var(--ty-solid-neutral${suffix})` : color(suffix));
60
157
  return `
61
- button.ghost.${f} { color: var(--ty-button-color, ${color('')}); }
62
- button.ghost.${f}.tone-plus { color: var(--ty-button-color, ${color('-strong')}); }
63
- button.ghost.${f}.tone-minus { color: var(--ty-button-color, ${color('-soft')}); }
158
+ button.ghost.${f} { color: var(--ty-button-color, var(--_muted-ghost-fg, ${ink('')})); }
159
+ button.ghost.${f}.tone-plus { color: var(--ty-button-color, var(--_muted-ghost-fg, ${ink('-strong')})); }
160
+ button.ghost.${f}.tone-minus { color: var(--ty-button-color, var(--_muted-ghost-fg, ${ink('-soft')})); }
64
161
  button.ghost.${f}:hover:not(:disabled) {
65
162
  background: var(--ty-button-bg-hover, ${tokenRef('--ty-bg', f, '-soft', fb)});
66
163
  }
164
+ /* See outlinedFlavor above — same escalation-to-peak, same :hover-only
165
+ :not(.muted) split, text only. */
166
+ button.ghost.${f}:not(.muted):hover:not(:disabled),
167
+ button.ghost.${f}:active:not(:disabled),
168
+ button.ghost.${f}:focus-visible {
169
+ color: var(--ty-button-color, ${ink('-strong')});
170
+ }
67
171
  `;
68
172
  };
69
173
  /** Rules for one custom (non-built-in) flavor across all three appearances. */
@@ -88,11 +192,14 @@ button {
88
192
  font-size: var(--ty-font-xs);
89
193
  line-height: var(--ty-leading-xs);
90
194
  letter-spacing: var(--ty-tracking-xs);
91
- font-weight: var(--ty-font-semibold);
195
+ /* Mode-flipped weight dial (tyrell.css): medium in light, normal in dark —
196
+ light-on-dark text blooms, a fixed semibold read heavy there. Override
197
+ with --ty-weight-action at any scope. */
198
+ font-weight: var(--ty-weight-action, var(--ty-font-medium));
92
199
  white-space: nowrap;
93
200
  cursor: pointer;
94
201
  user-select: none;
95
- transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
202
+ transition: var(--ty-local-transition, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease);
96
203
  background: transparent;
97
204
  color: var(--ty-color-neutral);
98
205
  border: 1px solid transparent;
@@ -175,7 +282,11 @@ button.loading > .loader-icon {
175
282
  flex-grow: 1;
176
283
  }
177
284
 
178
- /* ===== SIZES ===== */
285
+ /* ===== SIZES =====
286
+ Buttons run a 4px ladder (24-40px). Shared scale with fields
287
+ (--ty-size-sm/md/lg — see tyrell.css): field sm = button md (32px),
288
+ field md = button lg (36px), field lg = button xl (40px) — a button
289
+ and a field of the paired size sit flush, same height, in a row. */
179
290
 
180
291
  button.xs {
181
292
  padding: 0 var(--ty-spacing-2);
@@ -183,7 +294,7 @@ button.xs {
183
294
  line-height: var(--ty-leading-xs);
184
295
  letter-spacing: var(--ty-tracking-xs);
185
296
  gap: var(--ty-spacing-1);
186
- height: 1.375rem;
297
+ height: 1.5rem; /* 24px */
187
298
  }
188
299
 
189
300
  button.sm {
@@ -192,7 +303,7 @@ button.sm {
192
303
  line-height: var(--ty-leading-xs);
193
304
  letter-spacing: var(--ty-tracking-xs);
194
305
  gap: var(--ty-spacing-1);
195
- height: 1.5rem;
306
+ height: 1.75rem; /* 28px */
196
307
  }
197
308
 
198
309
  button.md {
@@ -201,7 +312,7 @@ button.md {
201
312
  line-height: var(--ty-leading-sm);
202
313
  letter-spacing: var(--ty-tracking-sm);
203
314
  gap: var(--ty-spacing-2);
204
- height: 1.8rem;
315
+ height: 2rem; /* 32px — matches field sm */
205
316
  }
206
317
 
207
318
  button.lg {
@@ -210,7 +321,7 @@ button.lg {
210
321
  line-height: var(--ty-leading-sm);
211
322
  letter-spacing: var(--ty-tracking-sm);
212
323
  gap: var(--ty-spacing-2);
213
- height: 2.1rem;
324
+ height: 2.25rem; /* 36px — matches field md */
214
325
  }
215
326
 
216
327
  button.xl {
@@ -219,7 +330,7 @@ button.xl {
219
330
  line-height: var(--ty-leading-base);
220
331
  letter-spacing: var(--ty-tracking-base);
221
332
  gap: var(--ty-spacing-2);
222
- height: 2.3rem;
333
+ height: 2.5rem; /* 40px — matches field lg */
223
334
  }
224
335
 
225
336
  /* ===== ACTION (icon-only square) ===== */
@@ -248,6 +359,61 @@ button.action.lg ::slotted(ty-icon) { height: 1.125rem; width: 1.125rem; }
248
359
  button.action.xl { height: 2.5rem; width: 2.5rem; }
249
360
  button.action.xl ::slotted(ty-icon) { height: 1.25rem; width: 1.25rem; }
250
361
 
362
+ /* ===== MUTED =====
363
+ Show the neutral tokens at rest instead of the flavor color; reveal the
364
+ real flavor on interaction. Implemented as a fallback tier the flavor
365
+ rules above already read (--_muted-*), which sits behind the public
366
+ --ty-button-{bg,color,border} override slots and ahead of the flavor's
367
+ own token — so a custom brand color still wins, muted or not. Unsetting
368
+ --_muted-* on interaction falls the var() chain through to whatever's
369
+ next (the user's override, or the real flavor color).
370
+ Hover reveal is gated to real pointers (touch has no hover); :active /
371
+ :focus-visible cover the tap case so touch still gets the color on press. */
372
+
373
+ /* --_muted-solid-* reads the SOLID neutral ink tokens — a fill's L doesn't
374
+ need page contrast. --_muted-outlined-line / --_muted-ghost-fg are bare
375
+ text/border and DO — they stay on the regular text ladder (it already
376
+ inverts correctly per mode), except tone-plus, which is legible AND
377
+ loud on the ink dial (16.5:1 dark, matches solid's "+" identity). Base/
378
+ soft on ink measured 1.01/1.20 dark contrast against the canvas —
379
+ invisible; WCAG minimum is 4.5. */
380
+ button.muted {
381
+ --_muted-solid-bg: var(--ty-solid-neutral);
382
+ --_muted-solid-fg: var(--ty-solid-neutral-fg);
383
+ --_muted-outlined-line: var(--ty-color-neutral);
384
+ --_muted-ghost-fg: var(--ty-color-neutral);
385
+ }
386
+ button.muted.tone-plus {
387
+ --_muted-solid-bg: var(--ty-solid-neutral-strong);
388
+ /* fg must track the tone's fill: neutral+ is inverted ink in dark mode
389
+ (white fill), so inheriting base neutral's white fg would be
390
+ white-on-white. */
391
+ --_muted-solid-fg: var(--ty-solid-neutral-strong-fg);
392
+ --_muted-outlined-line: var(--ty-solid-neutral-strong);
393
+ --_muted-ghost-fg: var(--ty-solid-neutral-strong);
394
+ }
395
+ button.muted.tone-minus {
396
+ --_muted-solid-bg: var(--ty-solid-neutral-soft);
397
+ --_muted-solid-fg: var(--ty-solid-neutral-soft-fg);
398
+ --_muted-outlined-line: var(--ty-color-neutral-soft);
399
+ --_muted-ghost-fg: var(--ty-color-neutral-soft);
400
+ }
401
+ @media (hover: hover) and (pointer: fine) {
402
+ button.muted:hover:not(:disabled) {
403
+ --_muted-solid-bg: unset;
404
+ --_muted-solid-fg: unset;
405
+ --_muted-outlined-line: unset;
406
+ --_muted-ghost-fg: unset;
407
+ }
408
+ }
409
+ button.muted:active:not(:disabled),
410
+ button.muted:focus-visible:not(:disabled) {
411
+ --_muted-solid-bg: unset;
412
+ --_muted-solid-fg: unset;
413
+ --_muted-outlined-line: unset;
414
+ --_muted-ghost-fg: unset;
415
+ }
416
+
251
417
  /* ===== PILL ===== */
252
418
 
253
419
  button.pill {
@@ -278,21 +444,58 @@ button.pill.xl:has(ty-icon:only-child) { min-width: 2.5rem; min-height: 2.5rem;
278
444
  /* ============================================================
279
445
  SOLID — flat: one variable per segment. No color math here; all the
280
446
  --ty-solid-{flavor}-{hover,active,strong,soft} tokens are DERIVED in
281
- tyrell-brand.css (OKLCH) or set literally in tyrell.css. Override any
447
+ tyrell-theme.css (OKLCH) or set literally in tyrell.css. Override any
282
448
  single token to recolor that one segment. Bare .solid = custom-flavor
283
449
  fallback, themable via --ty-button-{bg,bg-hover,color}.
284
450
  ============================================================ */
285
451
 
286
452
  button.solid {
287
- border: none;
288
453
  --_ring: var(--ty-color-neutral);
289
- background: var(--ty-button-bg, var(--ty-solid-neutral));
290
- color: var(--ty-button-color, var(--ty-solid-neutral-fg));
454
+ --_solid-bg: var(--ty-button-bg, var(--ty-solid-neutral));
455
+ --_solid-rest: var(--ty-button-bg, var(--ty-solid-neutral));
456
+ /* Bare .solid is the flavorless default = neutral ink, so it takes the
457
+ neutral border offset; colored flavor rules reset this to the plain
458
+ dial. */
459
+ --_border-l: var(--ty-button-border-l-neutral, var(--ty-button-border-l, -0.15));
460
+ background: var(--_solid-bg);
461
+ color: var(--ty-button-color, var(--ty-solid-neutral-fg));
462
+ /* Depth chrome — border + drop shadow, both scaled by --ty-button-depth.
463
+ (A top-edge sheen — inset 0 1px 0 <lightened fill> — used to live here
464
+ too; dropped, it read as a dizzying bright line rather than a subtle
465
+ highlight.) depth 0 = border matches fill exactly and the shadow goes
466
+ transparent — pixel-flat, but the 1px border stays in the layout so
467
+ toggling depth never shifts geometry (and solid now shares the same
468
+ box as outlined/ghost, which always had a 1px border).
469
+ --ty-button-border-l flips sign with the mode (tyrell.css): dark mode
470
+ runs a LIGHTER-than-fill hairline (fills read washed-out against dark
471
+ surfaces without a lit edge), light mode a slightly darker one.
472
+ Direct escape hatches outrank the derivation: --ty-solid-border-color
473
+ pins the border to ANY color (the L-offset dials stop mattering), and
474
+ --ty-solid-border-width changes thickness (widths ≠ 1px do shift
475
+ geometry — that's inherent).
476
+ Browsers without relative color drop these declarations: border falls
477
+ back to the base button's 1px transparent, shadows to none. */
478
+ border: var(--ty-solid-border-width, 1px) solid
479
+ var(--ty-solid-border-color,
480
+ oklch(from var(--_solid-rest, var(--_solid-bg)) calc(l + var(--_border-l, -0.15) * var(--ty-button-depth, 0.35)) c h));
481
+ box-shadow: 0 1px 2px oklch(0 0 0 / calc(0.4 * var(--ty-button-depth, 0.35)));
482
+ }
483
+ button.solid.tone-plus { --_solid-bg: var(--ty-button-bg, var(--ty-solid-neutral-strong)); --_solid-rest: var(--ty-button-bg, var(--ty-solid-neutral-strong)); color: var(--ty-button-color, var(--ty-solid-neutral-strong-fg)); }
484
+ button.solid.tone-minus { --_solid-bg: var(--ty-button-bg, var(--ty-solid-neutral-soft)); --_solid-rest: var(--ty-button-bg, var(--ty-solid-neutral-soft)); color: var(--ty-button-color, var(--ty-solid-neutral-soft-fg)); }
485
+ button.solid:hover:not(:disabled) { --_solid-bg: var(--ty-button-bg-hover, var(--ty-solid-neutral-hover)); }
486
+ button.solid:active:not(:disabled) { --_solid-bg: var(--ty-solid-neutral-active); }
487
+ button.solid.tone-plus:hover:not(:disabled) {
488
+ --_solid-bg: var(--ty-button-bg-hover, oklch(from var(--ty-solid-neutral-strong) calc(l + sign(0.5 - l) * abs(var(--ty-solid-hover-l))) c h));
489
+ }
490
+ button.solid.tone-plus:active:not(:disabled) {
491
+ --_solid-bg: oklch(from var(--ty-solid-neutral-strong) calc(l + sign(0.5 - l) * abs(var(--ty-solid-active-l))) c h);
492
+ }
493
+ button.solid.tone-minus:hover:not(:disabled) {
494
+ --_solid-bg: var(--ty-button-bg-hover, oklch(from var(--ty-solid-neutral-soft) calc(l + var(--ty-solid-hover-l)) c h));
495
+ }
496
+ button.solid.tone-minus:active:not(:disabled) {
497
+ --_solid-bg: oklch(from var(--ty-solid-neutral-soft) calc(l + var(--ty-solid-active-l)) c h);
291
498
  }
292
- button.solid.tone-plus { background: var(--ty-button-bg, var(--ty-solid-neutral-strong)); }
293
- button.solid.tone-minus { background: var(--ty-button-bg, var(--ty-solid-neutral-soft)); }
294
- button.solid:hover:not(:disabled) { background: var(--ty-button-bg-hover, var(--ty-solid-neutral-hover)); }
295
- button.solid:active:not(:disabled) { background: var(--ty-solid-neutral-active); }
296
499
 
297
500
  ${FLAVORS.map((f) => solidFlavor(f)).join('')}
298
501
  button.solid:focus-visible {
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/styles/button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAE5C;;;;;;;uBAOuB;AAEvB,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAE,CAAS,EAAE,MAAc,EAAE,EAAW,EAAE,EAAE,CAC1E,EAAE;IACA,CAAC,CAAC,OAAO,MAAM,IAAI,CAAC,GAAG,MAAM,SAAS,MAAM,IAAI,EAAE,GAAG,MAAM,IAAI;IAC/D,CAAC,CAAC,OAAO,MAAM,IAAI,CAAC,GAAG,MAAM,GAAG,CAAA;AAEpC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAE,EAAW,EAAE,EAAE;IAC7C,MAAM,KAAK,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;IACvE,OAAO;eACM,CAAC,eAAe,QAAQ,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,qCAAqC,KAAK,CAAC,EAAE,CAAC,oCAAoC,KAAK,CAAC,KAAK,CAAC;eAC/I,CAAC,iDAAiD,KAAK,CAAC,SAAS,CAAC;eAClE,CAAC,iDAAiD,KAAK,CAAC,OAAO,CAAC;eAChE,CAAC,kEAAkE,KAAK,CAAC,QAAQ,CAAC;eAClF,CAAC,wCAAwC,KAAK,CAAC,SAAS,CAAC;CACvE,CAAA;AACD,CAAC,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqU1B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;EAqB3C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;EAgB9C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC"}
@@ -2,5 +2,7 @@
2
2
  * Calendar Month Styles
3
3
  * Improved design with better visual hierarchy and size variants
4
4
  */
5
- export declare const calendarMonthStyles = "\n/* ============================================================================\n Theming Tokens\n Override these to retheme the calendar without touching the global palette.\n Defaults chain back to the global --ty-color-* / --ty-bg-* / --ty-border tokens.\n ============================================================================ */\n\n/* Theming tokens are applied as var(--ty-calendar-*, <default>) at point\n of use (not declared on :host) so consumers can override any of them\n from outside the shadow root. The 3 accent aliases \u2014 --ty-calendar-accent,\n --ty-calendar-today-accent, --ty-calendar-muted \u2014 still cascade into the\n derived defaults, so overriding one retints the related cells. */\n\n/* ============================================================================\n Base Calendar Container\n ============================================================================ */\n\n.calendar-flex-container {\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n gap: 0;\n padding: 0.75rem;\n border-radius: var(--ty-radius-md);\n font-family: system-ui, sans-serif;\n user-select: none;\n width: var(--calendar-width, fit-content);\n min-width: 280px;\n max-width: var(--calendar-max-width, none);\n}\n\n/* ============================================================================\n Rows (Header + 6 Day Rows)\n ============================================================================ */\n\n.calendar-row {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.calendar-header-row {\n flex: 0 0 auto;\n color: var(--ty-calendar-header-color, var(--ty-color-neutral-soft));\n}\n\n.calendar-day-row {\n flex: 1;\n min-height: 2rem;\n margin-bottom: 0.125rem;\n}\n\n/* ============================================================================\n Base Cell Styles\n ============================================================================ */\n\n.calendar-cell {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n position: relative;\n box-sizing: border-box;\n}\n\n/* ============================================================================\n Header Cells\n ============================================================================ */\n\n.calendar-header-cell {\n text-align: center;\n font-weight: 500;\n text-transform: uppercase;\n padding: 0.25rem;\n letter-spacing: 0.05em;\n}\n\n/* ============================================================================\n Day Cells - Square with Better Visual Hierarchy\n ============================================================================ */\n\n.calendar-day-cell {\n /* Square cells */\n aspect-ratio: 1;\n\n /* Layout */\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n\n /* Spacing */\n margin: 0.125rem;\n\n /* Visual: ghost cells \u2014 no boxes; the border is a theming hook only */\n border-radius: var(--ty-calendar-day-radius, 0.5rem);\n border: 1px solid var(--ty-calendar-day-border, transparent);\n background-color: var(--ty-calendar-day-bg, transparent);\n color: var(--ty-calendar-day-color, var(--ty-calendar-muted, var(--ty-text)));\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n\n /* Typography */\n font-weight: 400;\n font-variant-numeric: tabular-nums;\n}\n\n/* Hover: soft rounded pill, no border flash */\n.calendar-day-cell:hover {\n color: var(--ty-calendar-day-hover-color, var(--ty-text-strong));\n background-color: var(--ty-calendar-day-hover-bg, var(--ty-bg-neutral-soft));\n border-color: var(--ty-calendar-day-hover-border, transparent);\n}\n\n/* ============================================================================\n Day States\n ============================================================================ */\n\n/* Today: accent number, no slab \u2014 never collides with hover, and the\n selected pill wins when today is picked */\n.calendar-day-cell.today {\n background-color: var(--ty-calendar-today-bg, transparent);\n color: var(--ty-calendar-today-color, var(--ty-calendar-today-accent, var(--ty-color-primary)));\n border-color: var(--ty-calendar-today-border, transparent);\n font-weight: 600;\n}\n\n/* Weekend: no distinction by default (hook kept for theming) */\n.calendar-day-cell.weekend {\n color: var(--ty-calendar-weekend-color, var(--ty-calendar-day-color, var(--ty-text)));\n}\n\n/* Other Month - Muted */\n.calendar-day-cell.other-month {\n color: var(--ty-calendar-other-month-color, var(--ty-color-neutral-faint));\n opacity: var(--ty-calendar-other-month-opacity, 0.5);\n}\n\n.calendar-day-cell.other-month:hover { \n color: var(--ty-calendar-day-hover-color, var(--ty-color-neutral-strong));\n background-color: var(--ty-calendar-day-hover-bg, var(--ty-bg-neutral-soft));\n opacity: 0.7;\n}\n\n/* Disabled - outside min/max bounds */\n.calendar-day-cell.disabled {\n color: var(--ty-calendar-disabled-color, var(--ty-color-neutral-faint));\n opacity: var(--ty-calendar-disabled-opacity, 0.35);\n cursor: default;\n pointer-events: none;\n}\n\n/* Selected: the one strong element in the grid */\n.calendar-day-cell.selected {\n background-color: var(--ty-calendar-selected-bg, var(--ty-bg-primary));\n color: var(--ty-calendar-selected-color, var(--ty-color-primary-strong));\n border-color: var(--ty-calendar-selected-border, var(--ty-calendar-accent, transparent));\n font-weight: 600;\n}\n\n.calendar-day-cell.selected:hover {\n background-color: var(--ty-calendar-selected-hover-bg, var(--ty-bg-primary-bold));\n border-color: var(--ty-calendar-selected-hover-border, transparent);\n}\n\n.calendar-day-cell.selected.other-month {\n opacity: 0.7;\n}\n\n/* ============================================================================\n Size Variants\n ============================================================================ */\n\n/* Small - Compact (240px min-width) */\n.calendar-size-sm {\n padding: 0.5rem;\n min-width: 240px;\n}\n\n.calendar-size-sm .calendar-header-cell {\n font-size: 0.625rem;\n padding: 0.125rem;\n}\n\n.calendar-size-sm .calendar-day-cell {\n font-size: 0.75rem;\n margin: 0.0625rem;\n}\n\n.calendar-size-sm .calendar-day-row {\n min-height: 1.5rem;\n}\n\n/* Medium - Default (280px min-width) */\n.calendar-size-md {\n padding: 0.75rem;\n min-width: 280px;\n}\n\n.calendar-size-md .calendar-header-cell {\n font-size: 0.6875rem;\n padding: 0.25rem;\n}\n\n.calendar-size-md .calendar-day-cell {\n font-size: 0.8125rem;\n margin: 0.125rem;\n}\n\n.calendar-size-md .calendar-day-row {\n min-height: 2rem;\n}\n\n/* Large - Spacious (360px min-width) */\n.calendar-size-lg {\n padding: 1rem;\n min-width: 360px;\n}\n\n.calendar-size-lg .calendar-header-cell {\n font-size: 0.75rem;\n padding: 0.375rem;\n}\n\n.calendar-size-lg .calendar-day-cell {\n font-size: 0.875rem;\n margin: 0.1875rem;\n}\n\n.calendar-size-lg .calendar-day-row {\n min-height: 2.5rem;\n}\n\n/* ============================================================================\n Backwards Compatibility\n ============================================================================ */\n\n.calendar-day {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n}\n";
5
+ /** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
6
+ export declare const calendarMonthCustomFlavorCss: (base: string) => string;
7
+ export declare const calendarMonthStyles: string;
6
8
  //# sourceMappingURL=calendar-month.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-month.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-month.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,6vOAuP/B,CAAC"}
1
+ {"version":3,"file":"calendar-month.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-month.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,8EAA8E;AAC9E,eAAO,MAAM,4BAA4B,GAAI,MAAM,MAAM,WAAyC,CAAC;AAEnG,eAAO,MAAM,mBAAmB,QAyQ/B,CAAC"}
@@ -2,6 +2,43 @@
2
2
  * Calendar Month Styles
3
3
  * Improved design with better visual hierarchy and size variants
4
4
  */
5
+ import { FLAVORS } from "../types/common.js";
6
+ /* Flavor rules set --calendar-month-* local vars, wired in as the fallback
7
+ BEHIND every existing --ty-calendar-* public override (so those keep
8
+ working exactly as before) and AHEAD of the hardcoded primary default.
9
+ Doubles as the per-instance override API for a specific flavor: e.g.
10
+ `ty-calendar-month { --calendar-month-accent: ... }`. Fallback flavor
11
+ `fb` is used for custom flavors so missing tokens degrade to neutral. */
12
+ const calendarMonthFlavor = (f, fb) => {
13
+ const color = (s) => fb
14
+ ? `var(--ty-color-${f}${s}, var(--ty-color-${fb}${s}))`
15
+ : `var(--ty-color-${f}${s})`;
16
+ const bg = (s) => fb
17
+ ? `var(--ty-bg-${f}${s}, var(--ty-bg-${fb}${s}))`
18
+ : `var(--ty-bg-${f}${s})`;
19
+ return `
20
+ :host([flavor="${f}"]) {
21
+ --calendar-month-accent: ${color("")};
22
+ --calendar-month-selected-bg: ${bg("")};
23
+ --calendar-month-selected-color: ${color("-strong")};
24
+ --calendar-month-selected-hover-bg: ${bg("-bold")};
25
+ }
26
+ :host([flavor="${f}+"]) {
27
+ --calendar-month-accent: ${color("-strong")};
28
+ --calendar-month-selected-bg: ${bg("-bold")};
29
+ --calendar-month-selected-color: ${color("-strong")};
30
+ --calendar-month-selected-hover-bg: ${bg("-bold")};
31
+ }
32
+ :host([flavor="${f}-"]) {
33
+ --calendar-month-accent: ${color("-soft")};
34
+ --calendar-month-selected-bg: ${bg("-soft")};
35
+ --calendar-month-selected-color: ${color("")};
36
+ --calendar-month-selected-hover-bg: ${bg("")};
37
+ }
38
+ `;
39
+ };
40
+ /** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
41
+ export const calendarMonthCustomFlavorCss = (base) => calendarMonthFlavor(base, "neutral");
5
42
  export const calendarMonthStyles = `
6
43
  /* ============================================================================
7
44
  Theming Tokens
@@ -103,7 +140,7 @@ export const calendarMonthStyles = `
103
140
  background-color: var(--ty-calendar-day-bg, transparent);
104
141
  color: var(--ty-calendar-day-color, var(--ty-calendar-muted, var(--ty-text)));
105
142
  cursor: pointer;
106
- transition: background-color 0.15s ease, color 0.15s ease;
143
+ transition: var(--ty-local-transition, background-color 0.15s ease, color 0.15s ease);
107
144
 
108
145
  /* Typography */
109
146
  font-weight: 400;
@@ -117,6 +154,14 @@ export const calendarMonthStyles = `
117
154
  border-color: var(--ty-calendar-day-hover-border, transparent);
118
155
  }
119
156
 
157
+ /* Keyboard focus ring (roving tabindex — see calendar-month.ts's render()).
158
+ :focus-visible, not :focus, so mouse/pointerdown activation doesn't flash
159
+ a ring; only Tab-in / arrow-key navigation does. */
160
+ .calendar-day-cell:focus-visible {
161
+ outline: none;
162
+ box-shadow: 0 0 0 2px var(--calendar-month-accent, var(--ty-color-primary));
163
+ }
164
+
120
165
  /* ============================================================================
121
166
  Day States
122
167
  ============================================================================ */
@@ -125,7 +170,7 @@ export const calendarMonthStyles = `
125
170
  selected pill wins when today is picked */
126
171
  .calendar-day-cell.today {
127
172
  background-color: var(--ty-calendar-today-bg, transparent);
128
- color: var(--ty-calendar-today-color, var(--ty-calendar-today-accent, var(--ty-color-primary)));
173
+ color: var(--ty-calendar-today-color, var(--ty-calendar-today-accent, var(--calendar-month-accent, var(--ty-color-primary))));
129
174
  border-color: var(--ty-calendar-today-border, transparent);
130
175
  font-weight: 600;
131
176
  }
@@ -135,10 +180,15 @@ export const calendarMonthStyles = `
135
180
  color: var(--ty-calendar-weekend-color, var(--ty-calendar-day-color, var(--ty-text)));
136
181
  }
137
182
 
138
- /* Other Month - Muted */
183
+ /* Other Month - Muted.
184
+ Was color: var(--ty-color-neutral-faint) at opacity 0.5 — -faint alone is
185
+ only ~2.5:1 against the content surface (already under the 4.5:1 AA text
186
+ minimum), and blending it toward the background via opacity made it
187
+ worse (~1.5:1 in light mode). --ty-calendar-other-month-color is its own
188
+ token (tyrell.css :root / html.dark) calibrated to actually pass, with
189
+ opacity dropped rather than layered on top. */
139
190
  .calendar-day-cell.other-month {
140
- color: var(--ty-calendar-other-month-color, var(--ty-color-neutral-faint));
141
- opacity: var(--ty-calendar-other-month-opacity, 0.5);
191
+ color: var(--ty-calendar-other-month-color, #6b7280);
142
192
  }
143
193
 
144
194
  .calendar-day-cell.other-month:hover {
@@ -157,14 +207,14 @@ export const calendarMonthStyles = `
157
207
 
158
208
  /* Selected: the one strong element in the grid */
159
209
  .calendar-day-cell.selected {
160
- background-color: var(--ty-calendar-selected-bg, var(--ty-bg-primary));
161
- color: var(--ty-calendar-selected-color, var(--ty-color-primary-strong));
162
- border-color: var(--ty-calendar-selected-border, var(--ty-calendar-accent, transparent));
210
+ background-color: var(--ty-calendar-selected-bg, var(--calendar-month-selected-bg, var(--ty-bg-primary)));
211
+ color: var(--ty-calendar-selected-color, var(--calendar-month-selected-color, var(--ty-color-primary-strong)));
212
+ border-color: var(--ty-calendar-selected-border, var(--ty-calendar-accent, var(--calendar-month-accent, transparent)));
163
213
  font-weight: 600;
164
214
  }
165
215
 
166
216
  .calendar-day-cell.selected:hover {
167
- background-color: var(--ty-calendar-selected-hover-bg, var(--ty-bg-primary-bold));
217
+ background-color: var(--ty-calendar-selected-hover-bg, var(--calendar-month-selected-hover-bg, var(--ty-bg-primary-bold)));
168
218
  border-color: var(--ty-calendar-selected-hover-border, transparent);
169
219
  }
170
220
 
@@ -249,5 +299,10 @@ export const calendarMonthStyles = `
249
299
  justify-content: center;
250
300
  box-sizing: border-box;
251
301
  }
302
+
303
+ /* ============================================================================
304
+ Flavor Variants (set --calendar-month-*, consumed above)
305
+ ============================================================================ */
306
+ ${FLAVORS.map((f) => calendarMonthFlavor(f)).join("")}
252
307
  `;
253
308
  //# sourceMappingURL=calendar-month.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-month.js","sourceRoot":"","sources":["../../src/styles/calendar-month.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,CAAC;;CAE7C,CAAC;AACF,CAAC,CAAC;AAEF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAEnG,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwQjC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;CACpD,CAAC"}
@@ -2,5 +2,5 @@
2
2
  * Calendar Navigation Styles
3
3
  * Clean, modern design with proper visual hierarchy and size variants
4
4
  */
5
- export declare const calendarNavigationStyles = "\n/* ============================================================================\n Size Variants (CSS Custom Properties)\n ============================================================================ */\n\n/* Theming tokens applied as var(--ty-calendar-nav-*, <default>) at point of\n use (NOT on :host) so consumers can override them from outside \u2014 this\n component is nested inside ty-calendar's shadow, so a :host default would\n block inherited overrides. --ty-calendar-accent still cascades in. */\n\n:host([data-size=\"md\"]) {\n --nav-btn-size: 2rem;\n --nav-btn-icon-size: 1.25rem;\n --nav-font-size: 1rem;\n --nav-padding: 0.5rem 0.75rem;\n --nav-default-width: 280px;\n}\n\n:host([data-size=\"sm\"]) {\n --nav-btn-size: 1.5rem;\n --nav-btn-icon-size: 1rem;\n --nav-font-size: 0.875rem;\n --nav-padding: 0.375rem 0.5rem;\n --nav-default-width: 240px;\n}\n\n:host([data-size=\"lg\"]) {\n --nav-btn-size: 2.5rem;\n --nav-btn-icon-size: 1.5rem;\n --nav-font-size: 1.125rem;\n --nav-padding: 0.625rem 1rem;\n --nav-default-width: 360px;\n}\n\n/* ============================================================================\n Main Navigation Header\n ============================================================================ */\n\n.calendar-navigation-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--nav-padding);\n font-family: system-ui, sans-serif;\n user-select: none;\n width: var(--nav-width, var(--nav-default-width));\n box-sizing: border-box;\n}\n\n/* ============================================================================\n Navigation Groups (Left, Center, Right)\n ============================================================================ */\n\n.nav-group {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.nav-group-left,\n.nav-group-right {\n flex: 0 0 auto;\n}\n\n.nav-group-center {\n flex: 1;\n justify-content: center;\n}\n\n/* ============================================================================\n Navigation Buttons\n ============================================================================ */\n\n.nav-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nav-btn-size);\n height: var(--nav-btn-size);\n padding: 0;\n border: none;\n border-radius: var(--ty-radius-base);\n background-color: transparent;\n color: var(--ty-calendar-nav-color, var(--ty-color-neutral));\n cursor: pointer;\n transition: all 0.15s ease;\n outline: none;\n}\n\n.nav-btn:hover {\n background-color: var(--ty-calendar-nav-hover-bg, var(--ty-bg-neutral-soft));\n color: var(--ty-calendar-nav-hover-color, var(--ty-color-neutral-strong));\n}\n\n.nav-btn:active {\n background-color: var(--ty-calendar-nav-active-bg, var(--ty-bg-neutral));\n transform: scale(0.95);\n}\n\n.nav-btn:disabled {\n opacity: 0.35;\n cursor: default;\n pointer-events: none;\n}\n\n.nav-btn:focus-visible {\n outline: 2px solid var(--ty-calendar-nav-focus-outline, var(--ty-calendar-accent, var(--ty-color-primary)));\n outline-offset: 2px;\n}\n\n/* SVG sizing */\n.nav-btn svg {\n width: var(--nav-btn-icon-size);\n height: var(--nav-btn-icon-size);\n display: block;\n}\n\n/* ============================================================================\n Month/Year Display (Center)\n ============================================================================ */\n\n.month-year-display {\n font-size: var(--nav-font-size);\n font-weight: 600;\n color: var(--ty-calendar-nav-title-color, var(--ty-color-neutral-strong));\n text-align: center;\n white-space: nowrap;\n letter-spacing: -0.01em;\n}\n";
5
+ export declare const calendarNavigationStyles = "\n/* ============================================================================\n Size Variants (CSS Custom Properties)\n ============================================================================ */\n\n/* Theming tokens applied as var(--ty-calendar-nav-*, <default>) at point of\n use (NOT on :host) so consumers can override them from outside \u2014 this\n component is nested inside ty-calendar's shadow, so a :host default would\n block inherited overrides. --ty-calendar-accent still cascades in. */\n\n:host([data-size=\"md\"]) {\n --nav-btn-size: 2rem;\n --nav-btn-icon-size: 1.25rem;\n --nav-font-size: 1rem;\n --nav-padding: 0.5rem 0.75rem;\n --nav-default-width: 280px;\n}\n\n:host([data-size=\"sm\"]) {\n --nav-btn-size: 1.5rem;\n --nav-btn-icon-size: 1rem;\n --nav-font-size: 0.875rem;\n --nav-padding: 0.375rem 0.5rem;\n --nav-default-width: 240px;\n}\n\n:host([data-size=\"lg\"]) {\n --nav-btn-size: 2.5rem;\n --nav-btn-icon-size: 1.5rem;\n --nav-font-size: 1.125rem;\n --nav-padding: 0.625rem 1rem;\n --nav-default-width: 360px;\n}\n\n/* ============================================================================\n Main Navigation Header\n ============================================================================ */\n\n.calendar-navigation-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--nav-padding);\n font-family: system-ui, sans-serif;\n user-select: none;\n width: var(--nav-width, var(--nav-default-width));\n box-sizing: border-box;\n}\n\n/* ============================================================================\n Navigation Groups (Left, Center, Right)\n ============================================================================ */\n\n.nav-group {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.nav-group-left,\n.nav-group-right {\n flex: 0 0 auto;\n}\n\n.nav-group-center {\n flex: 1;\n justify-content: center;\n}\n\n/* ============================================================================\n Navigation Buttons\n ============================================================================ */\n\n.nav-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nav-btn-size);\n height: var(--nav-btn-size);\n padding: 0;\n border: none;\n border-radius: var(--ty-radius-base);\n background-color: transparent;\n color: var(--ty-calendar-nav-color, var(--ty-color-neutral));\n cursor: pointer;\n transition: var(--ty-local-transition, all 0.15s ease);\n outline: none;\n}\n\n.nav-btn:hover {\n background-color: var(--ty-calendar-nav-hover-bg, var(--ty-bg-neutral-soft));\n color: var(--ty-calendar-nav-hover-color, var(--ty-color-neutral-strong));\n}\n\n.nav-btn:active {\n background-color: var(--ty-calendar-nav-active-bg, var(--ty-bg-neutral));\n transform: scale(0.95);\n}\n\n.nav-btn:disabled {\n opacity: 0.35;\n cursor: default;\n pointer-events: none;\n}\n\n.nav-btn:focus-visible {\n outline: 2px solid var(--ty-calendar-nav-focus-outline, var(--ty-calendar-accent, var(--ty-color-primary)));\n outline-offset: 2px;\n}\n\n/* SVG sizing */\n.nav-btn svg {\n width: var(--nav-btn-icon-size);\n height: var(--nav-btn-icon-size);\n display: block;\n}\n\n/* ============================================================================\n Month/Year Display (Center)\n ============================================================================ */\n\n.month-year-display {\n font-size: var(--nav-font-size);\n font-weight: 600;\n color: var(--ty-calendar-nav-title-color, var(--ty-color-neutral-strong));\n text-align: center;\n white-space: nowrap;\n letter-spacing: -0.01em;\n}\n";
6
6
  //# sourceMappingURL=calendar-navigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-navigation.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-navigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,wBAAwB,snHAiIpC,CAAC"}
1
+ {"version":3,"file":"calendar-navigation.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-navigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,wBAAwB,kpHAiIpC,CAAC"}
@@ -87,7 +87,7 @@ export const calendarNavigationStyles = `
87
87
  background-color: transparent;
88
88
  color: var(--ty-calendar-nav-color, var(--ty-color-neutral));
89
89
  cursor: pointer;
90
- transition: all 0.15s ease;
90
+ transition: var(--ty-local-transition, all 0.15s ease);
91
91
  outline: none;
92
92
  }
93
93
 
@@ -5,5 +5,7 @@
5
5
  * carries the state. Full flavor color when checked, faint when unchecked,
6
6
  * dash at mid-opacity when indeterminate, grayscale when disabled.
7
7
  */
8
- export declare const checkboxStyles = "\n:host {\n display: inline-flex;\n width: auto;\n vertical-align: middle;\n}\n\n.checkbox-container {\n display: inline-flex;\n align-items: center;\n outline: none;\n transition: all 0.15s ease-in-out;\n user-select: none;\n cursor: pointer;\n border-radius: 6px;\n gap: var(--ty-spacing-1);\n color: var(--ty-text-faint);\n}\n\n.checkbox-container[aria-checked=\"true\"] {\n color: var(--ty-text);\n}\n\n/* Visible focus ring (keyboard) \u2014 .focused is toggled by the component */\n.checkbox-container.focused,\n.checkbox-container:focus-visible {\n box-shadow: 0 0 0 3px color-mix(in oklab, var(--ty-color-primary) 25%, transparent);\n}\n\n.checkbox-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n color: inherit;\n transition: color 0.15s ease-in-out;\n pointer-events: none;\n /* Let the container handle the click */\n}\n\n/* ===== SIZES ===== */\n\n.checkbox-container svg {\n width: 16px;\n height: 16px;\n}\n\n.checkbox-container.xs svg {\n width: 12px;\n height: 12px;\n}\n\n.checkbox-container.sm svg {\n width: 14px;\n height: 14px;\n}\n\n.checkbox-container.lg svg {\n width: 20px;\n height: 20px;\n}\n\n.checkbox-container.xl svg {\n width: 24px;\n height: 24px;\n}\n\n/* ===== SEMANTIC FLAVORS ===== */\n\n.checkbox-container.primary {\n color: var(--ty-color-primary-soft);\n}\n\n.checkbox-container.primary[aria-checked=\"true\"] {\n color: var(--ty-color-primary);\n}\n\n.checkbox-container.secondary {\n color: var(--ty-color-secondary-soft);\n}\n\n.checkbox-container.secondary[aria-checked=\"true\"] {\n color: var(--ty-color-secondary);\n}\n\n.checkbox-container.success {\n color: var(--ty-color-success-soft);\n}\n\n.checkbox-container.success[aria-checked=\"true\"] {\n color: var(--ty-color-success);\n}\n\n.checkbox-container.danger {\n color: var(--ty-color-danger-soft);\n}\n\n.checkbox-container.danger[aria-checked=\"true\"] {\n color: var(--ty-color-danger);\n}\n\n.checkbox-container.warning {\n color: var(--ty-color-warning-soft);\n}\n\n.checkbox-container.warning[aria-checked=\"true\"] {\n color: var(--ty-color-warning);\n}\n\n.checkbox-container.neutral {\n color: var(--ty-color-neutral-soft);\n}\n\n.checkbox-container.neutral[aria-checked=\"true\"] {\n color: var(--ty-color-neutral);\n}\n\n/* ===== STATES ===== */\n\n/* Clean tick: no box outline, just the checkmark. Inactive = faint tick. */\n.checkbox-container:not([aria-checked=\"true\"]) {\n opacity: 0.35;\n}\n\n/* Indeterminate (dash) sits between unchecked and checked */\n.checkbox-container[aria-checked=\"mixed\"] {\n opacity: 0.7;\n}\n\n/* Disabled must stay distinguishable from merely-unchecked: grayscale kills\n the flavor color, and disabled-unchecked drops below the unchecked 0.35. */\n.checkbox-container.disabled {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n filter: grayscale(1);\n}\n\n.checkbox-container.disabled:not([aria-checked=\"true\"]) {\n opacity: 0.2;\n}\n\n/* Error state */\n.checkbox-container.error .checkbox-icon {\n color: var(--ty-color-danger);\n}\n\n.checkbox-container.error:focus {\n box-shadow: 0 0 0 3px color-mix(in oklab, var(--ty-color-danger) 15%, transparent);\n}\n";
8
+ /** Rules for one custom (non-built-in) flavor — see utils/flavor-sheet.ts. */
9
+ export declare const checkboxCustomFlavorCss: (base: string) => string;
10
+ export declare const checkboxStyles: string;
9
11
  //# sourceMappingURL=checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/styles/checkbox.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,cAAc,spGAqJ1B,CAAC"}
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/styles/checkbox.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAwBH,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,GAAI,MAAM,MAAM,WAAoC,CAAC;AAEzF,eAAO,MAAM,cAAc,QA0G1B,CAAC"}