tyrell-components 1.0.0-RC11 → 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 (240) 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 +112 -420
  5. package/dist/tyrell-colors-static.css +316 -0
  6. package/dist/tyrell-theme.css +1454 -0
  7. package/dist/tyrell.css +112 -420
  8. package/dist/tyrell.js +1 -1
  9. package/lib/base/ty-component.d.ts +7 -0
  10. package/lib/base/ty-component.d.ts.map +1 -1
  11. package/lib/base/ty-component.js +27 -0
  12. package/lib/base/ty-component.js.map +1 -1
  13. package/lib/components/button.d.ts +16 -1
  14. package/lib/components/button.d.ts.map +1 -1
  15. package/lib/components/button.js +34 -4
  16. package/lib/components/button.js.map +1 -1
  17. package/lib/components/calendar-month.d.ts +23 -0
  18. package/lib/components/calendar-month.d.ts.map +1 -1
  19. package/lib/components/calendar-month.js +168 -11
  20. package/lib/components/calendar-month.js.map +1 -1
  21. package/lib/components/calendar-navigation.d.ts +31 -5
  22. package/lib/components/calendar-navigation.d.ts.map +1 -1
  23. package/lib/components/calendar-navigation.js +71 -31
  24. package/lib/components/calendar-navigation.js.map +1 -1
  25. package/lib/components/calendar.d.ts +17 -2
  26. package/lib/components/calendar.d.ts.map +1 -1
  27. package/lib/components/calendar.js +83 -12
  28. package/lib/components/calendar.js.map +1 -1
  29. package/lib/components/checkbox.d.ts +14 -3
  30. package/lib/components/checkbox.d.ts.map +1 -1
  31. package/lib/components/checkbox.js +86 -57
  32. package/lib/components/checkbox.js.map +1 -1
  33. package/lib/components/copy.d.ts +14 -3
  34. package/lib/components/copy.d.ts.map +1 -1
  35. package/lib/components/copy.js +47 -25
  36. package/lib/components/copy.js.map +1 -1
  37. package/lib/components/date-picker.d.ts +26 -1
  38. package/lib/components/date-picker.d.ts.map +1 -1
  39. package/lib/components/date-picker.js +151 -32
  40. package/lib/components/date-picker.js.map +1 -1
  41. package/lib/components/input.d.ts +17 -2
  42. package/lib/components/input.d.ts.map +1 -1
  43. package/lib/components/input.js +104 -25
  44. package/lib/components/input.js.map +1 -1
  45. package/lib/components/modal.d.ts.map +1 -1
  46. package/lib/components/modal.js +28 -3
  47. package/lib/components/modal.js.map +1 -1
  48. package/lib/components/option.d.ts +0 -27
  49. package/lib/components/option.d.ts.map +1 -1
  50. package/lib/components/option.js +11 -102
  51. package/lib/components/option.js.map +1 -1
  52. package/lib/components/popup.d.ts.map +1 -1
  53. package/lib/components/popup.js +36 -2
  54. package/lib/components/popup.js.map +1 -1
  55. package/lib/components/radio.d.ts +6 -2
  56. package/lib/components/radio.d.ts.map +1 -1
  57. package/lib/components/radio.js +55 -13
  58. package/lib/components/radio.js.map +1 -1
  59. package/lib/components/scroll-container.d.ts +16 -0
  60. package/lib/components/scroll-container.d.ts.map +1 -1
  61. package/lib/components/scroll-container.js +105 -1
  62. package/lib/components/scroll-container.js.map +1 -1
  63. package/lib/components/select.d.ts +550 -0
  64. package/lib/components/select.d.ts.map +1 -0
  65. package/lib/components/select.js +2115 -0
  66. package/lib/components/select.js.map +1 -0
  67. package/lib/components/selected-tags.d.ts +93 -0
  68. package/lib/components/selected-tags.d.ts.map +1 -0
  69. package/lib/components/selected-tags.js +286 -0
  70. package/lib/components/selected-tags.js.map +1 -0
  71. package/lib/components/switch.d.ts +6 -3
  72. package/lib/components/switch.d.ts.map +1 -1
  73. package/lib/components/switch.js +54 -36
  74. package/lib/components/switch.js.map +1 -1
  75. package/lib/components/tabs.d.ts.map +1 -1
  76. package/lib/components/tabs.js +190 -25
  77. package/lib/components/tabs.js.map +1 -1
  78. package/lib/components/tag.d.ts +9 -1
  79. package/lib/components/tag.d.ts.map +1 -1
  80. package/lib/components/tag.js +41 -5
  81. package/lib/components/tag.js.map +1 -1
  82. package/lib/components/textarea.d.ts +3 -0
  83. package/lib/components/textarea.d.ts.map +1 -1
  84. package/lib/components/textarea.js +61 -6
  85. package/lib/components/textarea.js.map +1 -1
  86. package/lib/components/tooltip.d.ts +4 -2
  87. package/lib/components/tooltip.d.ts.map +1 -1
  88. package/lib/components/tooltip.js +109 -70
  89. package/lib/components/tooltip.js.map +1 -1
  90. package/lib/components/wizard.d.ts.map +1 -1
  91. package/lib/components/wizard.js +22 -3
  92. package/lib/components/wizard.js.map +1 -1
  93. package/lib/index.d.ts +3 -2
  94. package/lib/index.d.ts.map +1 -1
  95. package/lib/index.js +3 -2
  96. package/lib/index.js.map +1 -1
  97. package/lib/styles/button.d.ts +41 -6
  98. package/lib/styles/button.d.ts.map +1 -1
  99. package/lib/styles/button.js +294 -254
  100. package/lib/styles/button.js.map +1 -1
  101. package/lib/styles/calendar-month.d.ts +3 -1
  102. package/lib/styles/calendar-month.d.ts.map +1 -1
  103. package/lib/styles/calendar-month.js +100 -67
  104. package/lib/styles/calendar-month.js.map +1 -1
  105. package/lib/styles/calendar-navigation.d.ts +1 -1
  106. package/lib/styles/calendar-navigation.d.ts.map +1 -1
  107. package/lib/styles/calendar-navigation.js +20 -28
  108. package/lib/styles/calendar-navigation.js.map +1 -1
  109. package/lib/styles/checkbox.d.ts +7 -5
  110. package/lib/styles/checkbox.d.ts.map +1 -1
  111. package/lib/styles/checkbox.js +125 -8
  112. package/lib/styles/checkbox.js.map +1 -1
  113. package/lib/styles/copy.d.ts +3 -1
  114. package/lib/styles/copy.d.ts.map +1 -1
  115. package/lib/styles/copy.js +61 -6
  116. package/lib/styles/copy.js.map +1 -1
  117. package/lib/styles/custom-scrollbar.d.ts +1 -1
  118. package/lib/styles/custom-scrollbar.d.ts.map +1 -1
  119. package/lib/styles/custom-scrollbar.js +2 -2
  120. package/lib/styles/date-picker.d.ts +3 -1
  121. package/lib/styles/date-picker.d.ts.map +1 -1
  122. package/lib/styles/date-picker.js +65 -103
  123. package/lib/styles/date-picker.js.map +1 -1
  124. package/lib/styles/file-upload.d.ts +1 -1
  125. package/lib/styles/file-upload.d.ts.map +1 -1
  126. package/lib/styles/file-upload.js +3 -3
  127. package/lib/styles/input.d.ts +3 -1
  128. package/lib/styles/input.d.ts.map +1 -1
  129. package/lib/styles/input.js +93 -419
  130. package/lib/styles/input.js.map +1 -1
  131. package/lib/styles/multiselect.d.ts +3 -1
  132. package/lib/styles/multiselect.d.ts.map +1 -1
  133. package/lib/styles/multiselect.js +26 -2
  134. package/lib/styles/multiselect.js.map +1 -1
  135. package/lib/styles/option.d.ts +1 -1
  136. package/lib/styles/option.d.ts.map +1 -1
  137. package/lib/styles/option.js +20 -47
  138. package/lib/styles/option.js.map +1 -1
  139. package/lib/styles/radio.d.ts +3 -1
  140. package/lib/styles/radio.d.ts.map +1 -1
  141. package/lib/styles/radio.js +24 -21
  142. package/lib/styles/radio.js.map +1 -1
  143. package/lib/styles/scroll-container.d.ts +1 -1
  144. package/lib/styles/scroll-container.d.ts.map +1 -1
  145. package/lib/styles/scroll-container.js +6 -0
  146. package/lib/styles/scroll-container.js.map +1 -1
  147. package/lib/styles/select-base.d.ts +9 -0
  148. package/lib/styles/select-base.d.ts.map +1 -0
  149. package/lib/styles/select-base.js +973 -0
  150. package/lib/styles/select-base.js.map +1 -0
  151. package/lib/styles/select.d.ts +12 -0
  152. package/lib/styles/select.d.ts.map +1 -0
  153. package/lib/styles/select.js +308 -0
  154. package/lib/styles/select.js.map +1 -0
  155. package/lib/styles/step.d.ts +1 -1
  156. package/lib/styles/step.d.ts.map +1 -1
  157. package/lib/styles/switch.d.ts +3 -1
  158. package/lib/styles/switch.d.ts.map +1 -1
  159. package/lib/styles/switch.js +25 -10
  160. package/lib/styles/switch.js.map +1 -1
  161. package/lib/styles/tab.d.ts +1 -1
  162. package/lib/styles/tab.d.ts.map +1 -1
  163. package/lib/styles/tabs.d.ts +1 -1
  164. package/lib/styles/tabs.d.ts.map +1 -1
  165. package/lib/styles/tabs.js +71 -1
  166. package/lib/styles/tabs.js.map +1 -1
  167. package/lib/styles/tag.d.ts +1 -1
  168. package/lib/styles/tag.d.ts.map +1 -1
  169. package/lib/styles/tag.js +40 -141
  170. package/lib/styles/tag.js.map +1 -1
  171. package/lib/styles/textarea.d.ts +1 -1
  172. package/lib/styles/textarea.d.ts.map +1 -1
  173. package/lib/styles/textarea.js +71 -37
  174. package/lib/styles/textarea.js.map +1 -1
  175. package/lib/styles/tooltip.d.ts +4 -2
  176. package/lib/styles/tooltip.d.ts.map +1 -1
  177. package/lib/styles/tooltip.js +4 -119
  178. package/lib/styles/tooltip.js.map +1 -1
  179. package/lib/styles/wizard.d.ts +1 -1
  180. package/lib/styles/wizard.d.ts.map +1 -1
  181. package/lib/styles/wizard.js +18 -6
  182. package/lib/styles/wizard.js.map +1 -1
  183. package/lib/types/common.d.ts +2 -1
  184. package/lib/types/common.d.ts.map +1 -1
  185. package/lib/types/common.js +15 -1
  186. package/lib/types/common.js.map +1 -1
  187. package/lib/utils/calendar-utils.d.ts +0 -48
  188. package/lib/utils/calendar-utils.d.ts.map +1 -1
  189. package/lib/utils/calendar-utils.js +0 -69
  190. package/lib/utils/calendar-utils.js.map +1 -1
  191. package/lib/utils/flavor-sheet.d.ts +32 -0
  192. package/lib/utils/flavor-sheet.d.ts.map +1 -0
  193. package/lib/utils/flavor-sheet.js +40 -0
  194. package/lib/utils/flavor-sheet.js.map +1 -0
  195. package/lib/utils/icon-registry.d.ts +0 -13
  196. package/lib/utils/icon-registry.d.ts.map +1 -1
  197. package/lib/utils/icon-registry.js +0 -35
  198. package/lib/utils/icon-registry.js.map +1 -1
  199. package/lib/utils/icons.d.ts +10 -0
  200. package/lib/utils/icons.d.ts.map +1 -0
  201. package/lib/utils/icons.js +10 -0
  202. package/lib/utils/icons.js.map +1 -0
  203. package/lib/utils/loader-registry.d.ts +2 -2
  204. package/lib/utils/loader-registry.js +2 -2
  205. package/lib/utils/locale.d.ts +0 -57
  206. package/lib/utils/locale.d.ts.map +1 -1
  207. package/lib/utils/locale.js +0 -89
  208. package/lib/utils/locale.js.map +1 -1
  209. package/lib/utils/number-format.d.ts +0 -21
  210. package/lib/utils/number-format.d.ts.map +1 -1
  211. package/lib/utils/number-format.js +0 -27
  212. package/lib/utils/number-format.js.map +1 -1
  213. package/lib/utils/positioning.d.ts +29 -22
  214. package/lib/utils/positioning.d.ts.map +1 -1
  215. package/lib/utils/positioning.js +23 -87
  216. package/lib/utils/positioning.js.map +1 -1
  217. package/lib/utils/scroll-lock.d.ts.map +1 -1
  218. package/lib/utils/scroll-lock.js +0 -1
  219. package/lib/utils/scroll-lock.js.map +1 -1
  220. package/lib/utils/styles.d.ts +0 -5
  221. package/lib/utils/styles.d.ts.map +1 -1
  222. package/lib/utils/styles.js +0 -7
  223. package/lib/utils/styles.js.map +1 -1
  224. package/lib/version.d.ts +1 -1
  225. package/lib/version.js +1 -1
  226. package/package.json +22 -11
  227. package/css/tyrell-brand.css +0 -913
  228. package/dist/tyrell-brand.css +0 -913
  229. package/lib/components/dropdown.d.ts +0 -424
  230. package/lib/components/dropdown.d.ts.map +0 -1
  231. package/lib/components/dropdown.js +0 -1640
  232. package/lib/components/dropdown.js.map +0 -1
  233. package/lib/components/multiselect.d.ts +0 -397
  234. package/lib/components/multiselect.d.ts.map +0 -1
  235. package/lib/components/multiselect.js +0 -1595
  236. package/lib/components/multiselect.js.map +0 -1
  237. package/lib/styles/dropdown.d.ts +0 -12
  238. package/lib/styles/dropdown.d.ts.map +0 -1
  239. package/lib/styles/dropdown.js +0 -1081
  240. package/lib/styles/dropdown.js.map +0 -1
@@ -1,15 +1,177 @@
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
- * - solid → --ty-solid-{flavor}-{strong|base|soft} (bg) + --ty-solid-{flavor}-fg (text)
7
- * - outlined → --ty-color-{flavor}-{strong|base|soft} (text === border)
8
- * - ghost → --ty-color-{flavor}-{strong|base|soft} (text), --ty-bg-{flavor}-soft (hover)
6
+ *
7
+ * - solid → flat per-segment tokens --ty-solid-{flavor}{,-hover,-active,
8
+ * -strong,-soft,-fg}. Derived in tyrell-theme.css via OKLCH on
9
+ * 3 axes (color / hover-active / theme chroma-hue); literal in
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.
9
41
  *
10
42
  * Per-instance overrides via host CSS variables:
11
- * --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
12
45
  */
46
+ import { FLAVORS } from '../types/common.js';
47
+ /* One block per flavor, per appearance. Selectors and tokens are formulaic —
48
+ see the section comments below for which token system each appearance uses.
49
+
50
+ Each generator takes an optional fallback flavor `fb`: token references
51
+ then become var(--ty-*-f, var(--ty-*-fb)). Built-ins pass no fallback
52
+ (their tokens always exist); buttonCustomFlavorCss() passes 'neutral' so a
53
+ custom flavor with missing tokens degrades to neutral instead of an
54
+ invisible button. */
55
+ const tokenRef = (prefix, f, suffix, fb) => fb
56
+ ? `var(${prefix}-${f}${suffix}, var(${prefix}-${fb}${suffix}))`
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. */
78
+ const solidFlavor = (f, fb) => {
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;
90
+ return `
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')}; }
100
+ `;
101
+ };
102
+ const outlinedFlavor = (f, fb) => {
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));
111
+ return `
112
+ button.outlined.${f} {
113
+ color: var(--ty-button-color, var(--_muted-outlined-line, ${textInk('')}));
114
+ border-color: var(--ty-button-border, var(--_muted-outlined-line, ${textInk('')}));
115
+ }
116
+ button.outlined.${f}.tone-plus {
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')}));
119
+ }
120
+ button.outlined.${f}.tone-minus {
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')}));
123
+ }
124
+ button.outlined.${f}:hover:not(:disabled) {
125
+ background: var(--ty-button-bg-hover, ${tokenRef('--ty-bg', f, '-soft', fb)});
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
+ }
143
+ `;
144
+ };
145
+ const ghostFlavor = (f, fb) => {
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));
157
+ return `
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')})); }
161
+ button.ghost.${f}:hover:not(:disabled) {
162
+ background: var(--ty-button-bg-hover, ${tokenRef('--ty-bg', f, '-soft', fb)});
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
+ }
171
+ `;
172
+ };
173
+ /** Rules for one custom (non-built-in) flavor across all three appearances. */
174
+ export const buttonCustomFlavorCss = (base) => solidFlavor(base, 'neutral') + outlinedFlavor(base, 'neutral') + ghostFlavor(base, 'neutral');
13
175
  export const buttonStyles = `
14
176
  :host {
15
177
  display: inline-block;
@@ -30,11 +192,14 @@ button {
30
192
  font-size: var(--ty-font-xs);
31
193
  line-height: var(--ty-leading-xs);
32
194
  letter-spacing: var(--ty-tracking-xs);
33
- 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));
34
199
  white-space: nowrap;
35
200
  cursor: pointer;
36
201
  user-select: none;
37
- 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);
38
203
  background: transparent;
39
204
  color: var(--ty-color-neutral);
40
205
  border: 1px solid transparent;
@@ -117,7 +282,11 @@ button.loading > .loader-icon {
117
282
  flex-grow: 1;
118
283
  }
119
284
 
120
- /* ===== 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. */
121
290
 
122
291
  button.xs {
123
292
  padding: 0 var(--ty-spacing-2);
@@ -125,7 +294,7 @@ button.xs {
125
294
  line-height: var(--ty-leading-xs);
126
295
  letter-spacing: var(--ty-tracking-xs);
127
296
  gap: var(--ty-spacing-1);
128
- height: 1.375rem;
297
+ height: 1.5rem; /* 24px */
129
298
  }
130
299
 
131
300
  button.sm {
@@ -134,7 +303,7 @@ button.sm {
134
303
  line-height: var(--ty-leading-xs);
135
304
  letter-spacing: var(--ty-tracking-xs);
136
305
  gap: var(--ty-spacing-1);
137
- height: 1.5rem;
306
+ height: 1.75rem; /* 28px */
138
307
  }
139
308
 
140
309
  button.md {
@@ -143,7 +312,7 @@ button.md {
143
312
  line-height: var(--ty-leading-sm);
144
313
  letter-spacing: var(--ty-tracking-sm);
145
314
  gap: var(--ty-spacing-2);
146
- height: 1.8rem;
315
+ height: 2rem; /* 32px — matches field sm */
147
316
  }
148
317
 
149
318
  button.lg {
@@ -152,7 +321,7 @@ button.lg {
152
321
  line-height: var(--ty-leading-sm);
153
322
  letter-spacing: var(--ty-tracking-sm);
154
323
  gap: var(--ty-spacing-2);
155
- height: 2.1rem;
324
+ height: 2.25rem; /* 36px — matches field md */
156
325
  }
157
326
 
158
327
  button.xl {
@@ -161,7 +330,7 @@ button.xl {
161
330
  line-height: var(--ty-leading-base);
162
331
  letter-spacing: var(--ty-tracking-base);
163
332
  gap: var(--ty-spacing-2);
164
- height: 2.3rem;
333
+ height: 2.5rem; /* 40px — matches field lg */
165
334
  }
166
335
 
167
336
  /* ===== ACTION (icon-only square) ===== */
@@ -190,6 +359,61 @@ button.action.lg ::slotted(ty-icon) { height: 1.125rem; width: 1.125rem; }
190
359
  button.action.xl { height: 2.5rem; width: 2.5rem; }
191
360
  button.action.xl ::slotted(ty-icon) { height: 1.25rem; width: 1.25rem; }
192
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
+
193
417
  /* ===== PILL ===== */
194
418
 
195
419
  button.pill {
@@ -218,101 +442,64 @@ button.pill.lg:has(ty-icon:only-child) { min-width: 2.25rem; min-height: 2.25rem
218
442
  button.pill.xl:has(ty-icon:only-child) { min-width: 2.5rem; min-height: 2.5rem; }
219
443
 
220
444
  /* ============================================================
221
- SOLID — saturated brand fill (uses --ty-solid-{flavor}-* tokens)
222
- Bare .solid rule = fallback for custom flavors (theme via --ty-button-*).
445
+ SOLID — flat: one variable per segment. No color math here; all the
446
+ --ty-solid-{flavor}-{hover,active,strong,soft} tokens are DERIVED in
447
+ tyrell-theme.css (OKLCH) or set literally in tyrell.css. Override any
448
+ single token to recolor that one segment. Bare .solid = custom-flavor
449
+ fallback, themable via --ty-button-{bg,bg-hover,color}.
223
450
  ============================================================ */
224
451
 
225
452
  button.solid {
226
- border: none;
227
- background: var(--ty-button-bg, var(--ty-solid-neutral));
228
- color: var(--ty-button-color, var(--ty-solid-neutral-fg));
229
- }
230
- button.solid:hover:not(:disabled) {
231
- background: var(--ty-button-bg-hover, var(--ty-button-bg, var(--ty-solid-neutral-strong)));
232
- }
233
-
234
- /* Primary */
235
- button.solid.primary {
236
- background: var(--ty-button-bg, var(--ty-solid-primary));
237
- color: var(--ty-button-color, var(--ty-solid-primary-fg));
238
- }
239
- button.solid.primary.tone-plus { background: var(--ty-button-bg, var(--ty-solid-primary-strong)); }
240
- button.solid.primary.tone-minus { background: var(--ty-button-bg, var(--ty-solid-primary-soft)); }
241
- button.solid.primary:hover:not(:disabled) {
242
- background: var(--ty-button-bg-hover, var(--ty-solid-primary-strong));
243
- }
244
- button.solid.primary:focus-visible {
245
- box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-primary);
246
- }
247
-
248
- /* Secondary */
249
- button.solid.secondary {
250
- background: var(--ty-button-bg, var(--ty-solid-secondary));
251
- color: var(--ty-button-color, var(--ty-solid-secondary-fg));
252
- }
253
- button.solid.secondary.tone-plus { background: var(--ty-button-bg, var(--ty-solid-secondary-strong)); }
254
- button.solid.secondary.tone-minus { background: var(--ty-button-bg, var(--ty-solid-secondary-soft)); }
255
- button.solid.secondary:hover:not(:disabled) {
256
- background: var(--ty-button-bg-hover, var(--ty-solid-secondary-strong));
257
- }
258
- button.solid.secondary:focus-visible {
259
- box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-secondary);
260
- }
261
-
262
- /* Success */
263
- button.solid.success {
264
- background: var(--ty-button-bg, var(--ty-solid-success));
265
- color: var(--ty-button-color, var(--ty-solid-success-fg));
266
- }
267
- button.solid.success.tone-plus { background: var(--ty-button-bg, var(--ty-solid-success-strong)); }
268
- button.solid.success.tone-minus { background: var(--ty-button-bg, var(--ty-solid-success-soft)); }
269
- button.solid.success:hover:not(:disabled) {
270
- background: var(--ty-button-bg-hover, var(--ty-solid-success-strong));
271
- }
272
- button.solid.success:focus-visible {
273
- box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-success);
274
- }
275
-
276
- /* Danger */
277
- button.solid.danger {
278
- background: var(--ty-button-bg, var(--ty-solid-danger));
279
- color: var(--ty-button-color, var(--ty-solid-danger-fg));
280
- }
281
- button.solid.danger.tone-plus { background: var(--ty-button-bg, var(--ty-solid-danger-strong)); }
282
- button.solid.danger.tone-minus { background: var(--ty-button-bg, var(--ty-solid-danger-soft)); }
283
- button.solid.danger:hover:not(:disabled) {
284
- background: var(--ty-button-bg-hover, var(--ty-solid-danger-strong));
285
- }
286
- button.solid.danger:focus-visible {
287
- box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-danger);
288
- }
289
-
290
- /* Warning */
291
- button.solid.warning {
292
- background: var(--ty-button-bg, var(--ty-solid-warning));
293
- color: var(--ty-button-color, var(--ty-solid-warning-fg));
294
- }
295
- button.solid.warning.tone-plus { background: var(--ty-button-bg, var(--ty-solid-warning-strong)); }
296
- button.solid.warning.tone-minus { background: var(--ty-button-bg, var(--ty-solid-warning-soft)); }
297
- button.solid.warning:hover:not(:disabled) {
298
- background: var(--ty-button-bg-hover, var(--ty-solid-warning-strong));
299
- }
300
- button.solid.warning:focus-visible {
301
- box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-warning);
302
- }
303
-
304
- /* Neutral */
305
- button.solid.neutral {
306
- background: var(--ty-button-bg, var(--ty-solid-neutral));
307
- color: var(--ty-button-color, var(--ty-solid-neutral-fg));
308
- }
309
- button.solid.neutral.tone-plus { background: var(--ty-button-bg, var(--ty-solid-neutral-strong)); }
310
- button.solid.neutral.tone-minus { background: var(--ty-button-bg, var(--ty-solid-neutral-soft)); }
311
- button.solid.neutral:hover:not(:disabled) {
312
- background: var(--ty-button-bg-hover, var(--ty-solid-neutral-strong));
313
- }
314
- button.solid.neutral:focus-visible {
315
- box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--ty-color-neutral);
453
+ --_ring: var(--ty-color-neutral);
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);
498
+ }
499
+
500
+ ${FLAVORS.map((f) => solidFlavor(f)).join('')}
501
+ button.solid:focus-visible {
502
+ box-shadow: 0 0 0 2px var(--ty-focus-ring-gap), 0 0 0 4px var(--_ring);
316
503
  }
317
504
 
318
505
  /* ============================================================
@@ -331,107 +518,7 @@ button.outlined:hover:not(:disabled) {
331
518
  background: var(--ty-button-bg-hover, var(--ty-bg-neutral-soft));
332
519
  }
333
520
 
334
- /* Primary */
335
- button.outlined.primary {
336
- color: var(--ty-button-color, var(--ty-color-primary));
337
- border-color: var(--ty-button-border, var(--ty-color-primary));
338
- }
339
- button.outlined.primary.tone-plus {
340
- color: var(--ty-button-color, var(--ty-color-primary-strong));
341
- border-color: var(--ty-button-border, var(--ty-color-primary-strong));
342
- }
343
- button.outlined.primary.tone-minus {
344
- color: var(--ty-button-color, var(--ty-color-primary-soft));
345
- border-color: var(--ty-button-border, var(--ty-color-primary-soft));
346
- }
347
- button.outlined.primary:hover:not(:disabled) {
348
- background: var(--ty-button-bg-hover, var(--ty-bg-primary-soft));
349
- }
350
-
351
- /* Secondary */
352
- button.outlined.secondary {
353
- color: var(--ty-button-color, var(--ty-color-secondary));
354
- border-color: var(--ty-button-border, var(--ty-color-secondary));
355
- }
356
- button.outlined.secondary.tone-plus {
357
- color: var(--ty-button-color, var(--ty-color-secondary-strong));
358
- border-color: var(--ty-button-border, var(--ty-color-secondary-strong));
359
- }
360
- button.outlined.secondary.tone-minus {
361
- color: var(--ty-button-color, var(--ty-color-secondary-soft));
362
- border-color: var(--ty-button-border, var(--ty-color-secondary-soft));
363
- }
364
- button.outlined.secondary:hover:not(:disabled) {
365
- background: var(--ty-button-bg-hover, var(--ty-bg-secondary-soft));
366
- }
367
-
368
- /* Success */
369
- button.outlined.success {
370
- color: var(--ty-button-color, var(--ty-color-success));
371
- border-color: var(--ty-button-border, var(--ty-color-success));
372
- }
373
- button.outlined.success.tone-plus {
374
- color: var(--ty-button-color, var(--ty-color-success-strong));
375
- border-color: var(--ty-button-border, var(--ty-color-success-strong));
376
- }
377
- button.outlined.success.tone-minus {
378
- color: var(--ty-button-color, var(--ty-color-success-soft));
379
- border-color: var(--ty-button-border, var(--ty-color-success-soft));
380
- }
381
- button.outlined.success:hover:not(:disabled) {
382
- background: var(--ty-button-bg-hover, var(--ty-bg-success-soft));
383
- }
384
-
385
- /* Danger */
386
- button.outlined.danger {
387
- color: var(--ty-button-color, var(--ty-color-danger));
388
- border-color: var(--ty-button-border, var(--ty-color-danger));
389
- }
390
- button.outlined.danger.tone-plus {
391
- color: var(--ty-button-color, var(--ty-color-danger-strong));
392
- border-color: var(--ty-button-border, var(--ty-color-danger-strong));
393
- }
394
- button.outlined.danger.tone-minus {
395
- color: var(--ty-button-color, var(--ty-color-danger-soft));
396
- border-color: var(--ty-button-border, var(--ty-color-danger-soft));
397
- }
398
- button.outlined.danger:hover:not(:disabled) {
399
- background: var(--ty-button-bg-hover, var(--ty-bg-danger-soft));
400
- }
401
-
402
- /* Warning */
403
- button.outlined.warning {
404
- color: var(--ty-button-color, var(--ty-color-warning));
405
- border-color: var(--ty-button-border, var(--ty-color-warning));
406
- }
407
- button.outlined.warning.tone-plus {
408
- color: var(--ty-button-color, var(--ty-color-warning-strong));
409
- border-color: var(--ty-button-border, var(--ty-color-warning-strong));
410
- }
411
- button.outlined.warning.tone-minus {
412
- color: var(--ty-button-color, var(--ty-color-warning-soft));
413
- border-color: var(--ty-button-border, var(--ty-color-warning-soft));
414
- }
415
- button.outlined.warning:hover:not(:disabled) {
416
- background: var(--ty-button-bg-hover, var(--ty-bg-warning-soft));
417
- }
418
-
419
- /* Neutral */
420
- button.outlined.neutral {
421
- color: var(--ty-button-color, var(--ty-color-neutral));
422
- border-color: var(--ty-button-border, var(--ty-color-neutral));
423
- }
424
- button.outlined.neutral.tone-plus {
425
- color: var(--ty-button-color, var(--ty-color-neutral-strong));
426
- border-color: var(--ty-button-border, var(--ty-color-neutral-strong));
427
- }
428
- button.outlined.neutral.tone-minus {
429
- color: var(--ty-button-color, var(--ty-color-neutral-soft));
430
- border-color: var(--ty-button-border, var(--ty-color-neutral-soft));
431
- }
432
- button.outlined.neutral:hover:not(:disabled) {
433
- background: var(--ty-button-bg-hover, var(--ty-bg-neutral-soft));
434
- }
521
+ ${FLAVORS.map((f) => outlinedFlavor(f)).join('')}
435
522
 
436
523
  /* ============================================================
437
524
  GHOST — text only, hover bg (uses --ty-color-* + --ty-bg-*-soft)
@@ -447,52 +534,5 @@ button.ghost:hover:not(:disabled) {
447
534
  background: var(--ty-button-bg-hover, var(--ty-bg-neutral-soft));
448
535
  }
449
536
 
450
- /* Primary */
451
- button.ghost.primary { color: var(--ty-button-color, var(--ty-color-primary)); }
452
- button.ghost.primary.tone-plus { color: var(--ty-button-color, var(--ty-color-primary-strong)); }
453
- button.ghost.primary.tone-minus { color: var(--ty-button-color, var(--ty-color-primary-soft)); }
454
- button.ghost.primary:hover:not(:disabled) {
455
- background: var(--ty-button-bg-hover, var(--ty-bg-primary-soft));
456
- }
457
-
458
- /* Secondary */
459
- button.ghost.secondary { color: var(--ty-button-color, var(--ty-color-secondary)); }
460
- button.ghost.secondary.tone-plus { color: var(--ty-button-color, var(--ty-color-secondary-strong)); }
461
- button.ghost.secondary.tone-minus { color: var(--ty-button-color, var(--ty-color-secondary-soft)); }
462
- button.ghost.secondary:hover:not(:disabled) {
463
- background: var(--ty-button-bg-hover, var(--ty-bg-secondary-soft));
464
- }
465
-
466
- /* Success */
467
- button.ghost.success { color: var(--ty-button-color, var(--ty-color-success)); }
468
- button.ghost.success.tone-plus { color: var(--ty-button-color, var(--ty-color-success-strong)); }
469
- button.ghost.success.tone-minus { color: var(--ty-button-color, var(--ty-color-success-soft)); }
470
- button.ghost.success:hover:not(:disabled) {
471
- background: var(--ty-button-bg-hover, var(--ty-bg-success-soft));
472
- }
473
-
474
- /* Danger */
475
- button.ghost.danger { color: var(--ty-button-color, var(--ty-color-danger)); }
476
- button.ghost.danger.tone-plus { color: var(--ty-button-color, var(--ty-color-danger-strong)); }
477
- button.ghost.danger.tone-minus { color: var(--ty-button-color, var(--ty-color-danger-soft)); }
478
- button.ghost.danger:hover:not(:disabled) {
479
- background: var(--ty-button-bg-hover, var(--ty-bg-danger-soft));
480
- }
481
-
482
- /* Warning */
483
- button.ghost.warning { color: var(--ty-button-color, var(--ty-color-warning)); }
484
- button.ghost.warning.tone-plus { color: var(--ty-button-color, var(--ty-color-warning-strong)); }
485
- button.ghost.warning.tone-minus { color: var(--ty-button-color, var(--ty-color-warning-soft)); }
486
- button.ghost.warning:hover:not(:disabled) {
487
- background: var(--ty-button-bg-hover, var(--ty-bg-warning-soft));
488
- }
489
-
490
- /* Neutral */
491
- button.ghost.neutral { color: var(--ty-button-color, var(--ty-color-neutral)); }
492
- button.ghost.neutral.tone-plus { color: var(--ty-button-color, var(--ty-color-neutral-strong)); }
493
- button.ghost.neutral.tone-minus { color: var(--ty-button-color, var(--ty-color-neutral-soft)); }
494
- button.ghost.neutral:hover:not(:disabled) {
495
- background: var(--ty-button-bg-hover, var(--ty-bg-neutral-soft));
496
- }
497
- `;
537
+ ${FLAVORS.map((f) => ghostFlavor(f)).join('')}`;
498
538
  //# sourceMappingURL=button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/styles/button.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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