@frontile/theme 0.18.0-beta.1 → 0.18.0-beta.3

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 (110) hide show
  1. package/declarations/colors/config.d.ts +1 -0
  2. package/declarations/colors/config.d.ts.map +1 -0
  3. package/declarations/colors/palette-absolute.d.ts +1 -0
  4. package/declarations/colors/palette-absolute.d.ts.map +1 -0
  5. package/declarations/colors/palette.d.ts +1 -0
  6. package/declarations/colors/palette.d.ts.map +1 -0
  7. package/declarations/colors/semantic.d.ts +1 -0
  8. package/declarations/colors/semantic.d.ts.map +1 -0
  9. package/declarations/colors/types.d.ts +1 -0
  10. package/declarations/colors/types.d.ts.map +1 -0
  11. package/declarations/colors/util.d.ts +1 -0
  12. package/declarations/colors/util.d.ts.map +1 -0
  13. package/declarations/colors.d.ts +1 -0
  14. package/declarations/colors.d.ts.map +1 -0
  15. package/declarations/components/accordion.d.ts +9 -143
  16. package/declarations/components/accordion.d.ts.map +1 -0
  17. package/declarations/components/alert.d.ts +18 -152
  18. package/declarations/components/alert.d.ts.map +1 -0
  19. package/declarations/components/avatar.d.ts +9 -98
  20. package/declarations/components/avatar.d.ts.map +1 -0
  21. package/declarations/components/button.d.ts +151 -525
  22. package/declarations/components/button.d.ts.map +1 -0
  23. package/declarations/components/calendar.d.ts +9 -157
  24. package/declarations/components/calendar.d.ts.map +1 -0
  25. package/declarations/components/chip.d.ts +36 -214
  26. package/declarations/components/chip.d.ts.map +1 -0
  27. package/declarations/components/close-button.d.ts +9 -106
  28. package/declarations/components/close-button.d.ts.map +1 -0
  29. package/declarations/components/command.d.ts +5 -146
  30. package/declarations/components/command.d.ts.map +1 -0
  31. package/declarations/components/divider.d.ts +19 -61
  32. package/declarations/components/divider.d.ts.map +1 -0
  33. package/declarations/components/dropdown.d.ts +2 -44
  34. package/declarations/components/dropdown.d.ts.map +1 -0
  35. package/declarations/components/external-link.d.ts +3 -88
  36. package/declarations/components/external-link.d.ts.map +1 -0
  37. package/declarations/components/forms/forms-legacy.d.ts +61 -704
  38. package/declarations/components/forms/forms-legacy.d.ts.map +1 -0
  39. package/declarations/components/forms/forms.d.ts +186 -1782
  40. package/declarations/components/forms/forms.d.ts.map +1 -0
  41. package/declarations/components/forms/index.d.ts +1 -0
  42. package/declarations/components/forms/index.d.ts.map +1 -0
  43. package/declarations/components/index.d.ts +1 -0
  44. package/declarations/components/index.d.ts.map +1 -0
  45. package/declarations/components/kbd.d.ts +21 -168
  46. package/declarations/components/kbd.d.ts.map +1 -0
  47. package/declarations/components/listbox.d.ts +54 -250
  48. package/declarations/components/listbox.d.ts.map +1 -0
  49. package/declarations/components/notification-card.d.ts +18 -145
  50. package/declarations/components/notification-card.d.ts.map +1 -0
  51. package/declarations/components/notifications-container.d.ts +3 -89
  52. package/declarations/components/notifications-container.d.ts.map +1 -0
  53. package/declarations/components/overlays.d.ts +91 -463
  54. package/declarations/components/overlays.d.ts.map +1 -0
  55. package/declarations/components/pagination.d.ts +9 -167
  56. package/declarations/components/pagination.d.ts.map +1 -0
  57. package/declarations/components/popover.d.ts +21 -78
  58. package/declarations/components/popover.d.ts.map +1 -0
  59. package/declarations/components/progress-bar.d.ts +21 -186
  60. package/declarations/components/progress-bar.d.ts.map +1 -0
  61. package/declarations/components/segmented-control.d.ts +9 -217
  62. package/declarations/components/segmented-control.d.ts.map +1 -0
  63. package/declarations/components/shared.d.ts +1 -0
  64. package/declarations/components/shared.d.ts.map +1 -0
  65. package/declarations/components/skeleton.d.ts +33 -119
  66. package/declarations/components/skeleton.d.ts.map +1 -0
  67. package/declarations/components/spinner.d.ts +47 -126
  68. package/declarations/components/spinner.d.ts.map +1 -0
  69. package/declarations/components/table.d.ts +3 -191
  70. package/declarations/components/table.d.ts.map +1 -0
  71. package/declarations/components/tabs.d.ts +9 -214
  72. package/declarations/components/tabs.d.ts.map +1 -0
  73. package/declarations/components/tooltip.d.ts +9 -138
  74. package/declarations/components/tooltip.d.ts.map +1 -0
  75. package/declarations/index.d.ts +1 -0
  76. package/declarations/index.d.ts.map +1 -0
  77. package/declarations/plugin/default-config.d.ts +1 -0
  78. package/declarations/plugin/default-config.d.ts.map +1 -0
  79. package/declarations/plugin/default.d.ts +2 -4
  80. package/declarations/plugin/default.d.ts.map +1 -0
  81. package/declarations/plugin/overlays.d.ts +2 -1
  82. package/declarations/plugin/overlays.d.ts.map +1 -0
  83. package/declarations/plugin/power-select.d.ts +2 -1
  84. package/declarations/plugin/power-select.d.ts.map +1 -0
  85. package/declarations/plugin/resolve.d.ts +4 -3
  86. package/declarations/plugin/resolve.d.ts.map +1 -0
  87. package/declarations/plugin/safelist.d.ts +1 -0
  88. package/declarations/plugin/safelist.d.ts.map +1 -0
  89. package/declarations/plugin/transitions.d.ts +2 -1
  90. package/declarations/plugin/transitions.d.ts.map +1 -0
  91. package/declarations/plugin/types.d.ts +11 -0
  92. package/declarations/plugin/types.d.ts.map +1 -0
  93. package/declarations/plugin.d.ts +1 -0
  94. package/declarations/plugin.d.ts.map +1 -0
  95. package/declarations/tw.d.ts +2 -42
  96. package/declarations/tw.d.ts.map +1 -0
  97. package/declarations/types.d.ts +1 -0
  98. package/declarations/types.d.ts.map +1 -0
  99. package/dist/index.js +573 -431
  100. package/dist/index.js.map +1 -1
  101. package/dist/{overlays-DIZlPzFH.js → overlays-DD7muPLd.js} +9 -9
  102. package/dist/overlays-DD7muPLd.js.map +1 -0
  103. package/dist/plugin/default.js.map +1 -1
  104. package/dist/plugin.js +19 -5
  105. package/dist/plugin.js.map +1 -1
  106. package/dist/util-Dp_dlOPq.js.map +1 -1
  107. package/package.json +17 -19
  108. package/dist/overlays-DIZlPzFH.js.map +0 -1
  109. package/dist/template-registry.js +0 -2
  110. package/dist/template-registry.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as tv, b as backdrop, d as drawer, m as modal, o as overlay, a as overlayArrow, c as overlayTransitions } from './overlays-DIZlPzFH.js';
2
- export { e as twMerge } from './overlays-DIZlPzFH.js';
1
+ import { t as tv, b as backdrop, d as drawer, m as modal, o as overlay, a as overlayArrow, c as overlayTransitions } from './overlays-DD7muPLd.js';
2
+ export { e as twMerge } from './overlays-DD7muPLd.js';
3
3
 
4
4
  const focusVisibleRing = ['outline-hidden', 'focus-visible:z-10', 'focus-visible:ring-3', 'focus-visible:ring-focus', 'focus-visible:ring-offset-2', 'focus-visible:ring-offset-background'];
5
5
 
@@ -15,7 +15,7 @@ const statusRowCloseButton = ['shrink-0 self-center -mr-1 inline-block p-1.5 rou
15
15
  const focusVisibleWithinRing = ['outline-hidden', 'has-focus-visible:z-10', 'has-focus-visible:ring-3', 'has-[:focus-visible]:ring-focus', 'has-focus-visible:ring-offset-2', 'has-[:focus-visible]:ring-offset-background'];
16
16
 
17
17
  /**
18
- * `default` and `tonal` wear the same outer box. `tonal` carries its colour
18
+ * `surface` and `soft` wear the same outer box. `soft` carries its colour
19
19
  * on the inner element instead (see its compound variants), so the two must
20
20
  * stay identical out here — sharing the object keeps that structural rather
21
21
  * than a thing a future edit has to remember.
@@ -38,20 +38,20 @@ const alert = tv({
38
38
  // the notification stack's geometry.
39
39
  //
40
40
  // `overflow-hidden` is not optional: this element owns the radius, but
41
- // the `tonal` variant paints its tint on `inner` (it needs an opaque
41
+ // the `soft` variant paints its tint on `inner` (it needs an opaque
42
42
  // surface underneath — see that slot). `inner` has square corners, so
43
43
  // without clipping here its tint paints over all four rounded corners
44
44
  // and the alert reads as a rectangle.
45
45
  base: 'w-full rounded-lg border overflow-hidden',
46
46
  // The inner element carries the row layout. Alert has no
47
47
  // ResizeObserver, so unlike the card it does not need this split for
48
- // measurement — it needs it because the `tonal` variant's translucent
49
- // `{intent}-soft` tint has to composite over an opaque surface. All
48
+ // measurement — it needs it because the `soft` variant's translucent
49
+ // `{status}-soft` tint has to composite over an opaque surface. All
50
50
  // three variants share the structure rather than branching the DOM.
51
51
  inner: 'flex gap-3 p-4 font-body text-body-2xs',
52
52
  // `inline-flex items-center justify-center` turns this slot into a
53
53
  // fixed 20px centering box, and `[&>*]:size-full` forces whatever
54
- // element lands inside it (default intent glyph, or arbitrary content
54
+ // element lands inside it (default status glyph, or arbitrary content
55
55
  // yielded through the `icon` block, e.g. `<Spinner @size='sm' />`) to
56
56
  // fill that box rather than render at its own intrinsic size. Without
57
57
  // this, a yielded `Spinner` (`sm` = 24px) would overflow and
@@ -72,25 +72,25 @@ const alert = tv({
72
72
  closeButton: statusRowCloseButton
73
73
  },
74
74
  variants: {
75
- // Intent alone paints nothing; every colour comes from an intent ×
75
+ // Status alone paints nothing; every colour comes from an status ×
76
76
  // variant compound below.
77
77
  //
78
- // The other half of an intent lives in the component: `INTENT_CONFIG` in
79
- // alert.gts maps it to a glyph and an ARIA role. Adding an intent means
78
+ // The other half of an status lives in the component: `STATUS_CONFIG` in
79
+ // alert.gts maps it to a glyph and an ARIA role. Adding an status means
80
80
  // adding it in both places — this list plus its three compound variants
81
81
  // here, and a row there.
82
- intent: {
83
- default: {},
84
- info: {},
82
+ status: {
83
+ neutral: {},
84
+ primary: {},
85
85
  success: {},
86
86
  warning: {},
87
87
  danger: {}
88
88
  },
89
89
  variant: {
90
- default: neutralSurface,
91
- // Intent-independent out here: every `tonal` compound below tints the
92
- // *inner* element instead, so the outer box is `default`'s.
93
- tonal: neutralSurface,
90
+ surface: neutralSurface,
91
+ // Status-independent out here: every `soft` compound below tints the
92
+ // *inner* element instead, so the outer box is `surface`'s.
93
+ soft: neutralSurface,
94
94
  solid: {
95
95
  base: 'border-transparent'
96
96
  }
@@ -140,20 +140,20 @@ const alert = tv({
140
140
  }
141
141
  },
142
142
  compoundVariants: [
143
- // default: neutral surface, colour carried by the icon and title.
144
- // The `default` intent has no accent colour to lend the title emphasis,
143
+ // surface: neutral surface, colour carried by the icon and title.
144
+ // The `neutral` status has no accent colour to lend the title emphasis,
145
145
  // so the title earns its prominence from weight of ink instead, sitting
146
146
  // a level above the icon.
147
147
  {
148
- variant: 'default',
149
- intent: 'default',
148
+ variant: 'surface',
149
+ status: 'neutral',
150
150
  class: {
151
151
  icon: 'text-neutral-firm',
152
152
  title: 'text-neutral-bolder'
153
153
  }
154
154
  }, {
155
- variant: 'default',
156
- intent: 'info',
155
+ variant: 'surface',
156
+ status: 'primary',
157
157
  class: {
158
158
  icon: 'text-primary',
159
159
  title: 'text-primary'
@@ -161,8 +161,8 @@ const alert = tv({
161
161
  }, {
162
162
  // `success-firm` is only ~2.3:1 on a light surface; `bolder` clears
163
163
  // AA in both themes. Same measurement the card's theme records.
164
- variant: 'default',
165
- intent: 'success',
164
+ variant: 'surface',
165
+ status: 'success',
166
166
  class: {
167
167
  icon: 'text-success-bolder',
168
168
  title: 'text-success-bolder'
@@ -170,59 +170,58 @@ const alert = tv({
170
170
  }, {
171
171
  // `warning-firm` is only ~3:1 on a light surface; `bolder` clears AA
172
172
  // in both themes.
173
- variant: 'default',
174
- intent: 'warning',
173
+ variant: 'surface',
174
+ status: 'warning',
175
175
  class: {
176
176
  icon: 'text-warning-bolder',
177
177
  title: 'text-warning-bolder'
178
178
  }
179
179
  }, {
180
- variant: 'default',
181
- intent: 'danger',
180
+ variant: 'surface',
181
+ status: 'danger',
182
182
  class: {
183
183
  icon: 'text-danger-firm',
184
184
  title: 'text-danger-firm'
185
185
  }
186
186
  },
187
- // tonal: an opaque outer surface with the translucent `{intent}-soft`
187
+ // soft: an opaque outer surface with the translucent `{status}-soft`
188
188
  // tint and its `on-*` contrast ink applied to the inner element, which
189
- // composites over that opaque surface. Same recipe as Button's
190
- // `appearance: 'tonal'` and NotificationCard's.
189
+ // composites over that opaque surface. Same recipe as NotificationCard's.
191
190
  {
192
- variant: 'tonal',
193
- intent: 'default',
191
+ variant: 'soft',
192
+ status: 'neutral',
194
193
  class: {
195
194
  inner: 'bg-neutral-soft',
196
195
  icon: 'text-on-neutral-soft',
197
196
  title: 'text-on-neutral-soft'
198
197
  }
199
198
  }, {
200
- variant: 'tonal',
201
- intent: 'info',
199
+ variant: 'soft',
200
+ status: 'primary',
202
201
  class: {
203
202
  inner: 'bg-primary-soft',
204
203
  icon: 'text-on-primary-soft',
205
204
  title: 'text-on-primary-soft'
206
205
  }
207
206
  }, {
208
- variant: 'tonal',
209
- intent: 'success',
207
+ variant: 'soft',
208
+ status: 'success',
210
209
  class: {
211
210
  inner: 'bg-success-soft',
212
211
  icon: 'text-on-success-soft',
213
212
  title: 'text-on-success-soft'
214
213
  }
215
214
  }, {
216
- variant: 'tonal',
217
- intent: 'warning',
215
+ variant: 'soft',
216
+ status: 'warning',
218
217
  class: {
219
218
  inner: 'bg-warning-soft',
220
219
  icon: 'text-on-warning-soft',
221
220
  title: 'text-on-warning-soft'
222
221
  }
223
222
  }, {
224
- variant: 'tonal',
225
- intent: 'danger',
223
+ variant: 'soft',
224
+ status: 'danger',
226
225
  class: {
227
226
  inner: 'bg-danger-soft',
228
227
  icon: 'text-on-danger-soft',
@@ -230,11 +229,11 @@ const alert = tv({
230
229
  }
231
230
  },
232
231
  // solid: filled surface, contrast ink. The description uses the
233
- // full-strength `on-{intent}` ink rather than a translucent cut — a
232
+ // full-strength `on-{status}` ink rather than a translucent cut — a
234
233
  // translucent cut failed WCAG AA in the equivalent card recipe.
235
234
  {
236
235
  variant: 'solid',
237
- intent: 'default',
236
+ status: 'neutral',
238
237
  class: {
239
238
  base: 'bg-neutral text-on-neutral',
240
239
  icon: 'text-on-neutral',
@@ -243,7 +242,7 @@ const alert = tv({
243
242
  }
244
243
  }, {
245
244
  variant: 'solid',
246
- intent: 'info',
245
+ status: 'primary',
247
246
  class: {
248
247
  base: 'bg-primary text-on-primary',
249
248
  icon: 'text-on-primary',
@@ -252,7 +251,7 @@ const alert = tv({
252
251
  }
253
252
  }, {
254
253
  variant: 'solid',
255
- intent: 'success',
254
+ status: 'success',
256
255
  class: {
257
256
  base: 'bg-success text-on-success',
258
257
  icon: 'text-on-success',
@@ -261,7 +260,7 @@ const alert = tv({
261
260
  }
262
261
  }, {
263
262
  variant: 'solid',
264
- intent: 'warning',
263
+ status: 'warning',
265
264
  class: {
266
265
  base: 'bg-warning text-on-warning',
267
266
  icon: 'text-on-warning',
@@ -270,7 +269,7 @@ const alert = tv({
270
269
  }
271
270
  }, {
272
271
  variant: 'solid',
273
- intent: 'danger',
272
+ status: 'danger',
274
273
  class: {
275
274
  base: 'bg-danger text-on-danger',
276
275
  icon: 'text-on-danger',
@@ -309,8 +308,8 @@ const alert = tv({
309
308
  }
310
309
  }],
311
310
  defaultVariants: {
312
- intent: 'default',
313
- variant: 'default',
311
+ status: 'neutral',
312
+ variant: 'surface',
314
313
  layout: 'inline',
315
314
  hasDescription: false,
316
315
  hasCloseButton: false
@@ -355,11 +354,11 @@ const avatar = tv({
355
354
  const baseButton = tv({
356
355
  base: ['inline-flex items-center justify-center', '[&_svg]:size-[1em]', 'font-header', 'border', 'border-transparent', 'disabled:cursor-not-allowed', 'disabled:opacity-disabled', ...focusVisibleRing],
357
356
  variants: {
358
- appearance: {
359
- outlined: ''
357
+ variant: {
358
+ outline: ''
360
359
  },
361
- intent: {
362
- default: '',
360
+ color: {
361
+ neutral: '',
363
362
  primary: 'focus-visible:ring-primary-soft',
364
363
  secondary: 'focus-visible:ring-secondary-soft',
365
364
  tertiary: 'focus-visible:ring-tertiary-soft',
@@ -380,49 +379,50 @@ const baseButton = tv({
380
379
  }
381
380
  },
382
381
  compoundVariants: [{
383
- appearance: 'outlined',
384
- intent: 'default',
382
+ variant: 'outline',
383
+ color: 'neutral',
385
384
  class: 'text-neutral-bolder border-neutral-bolder hover:bg-neutral-subtle hover:text-neutral-firm/80 hover:border-neutral-strong active:bg-neutral-muted active:text-neutral-firm active:border-neutral-firm'
386
385
  }, {
387
- appearance: 'outlined',
388
- intent: 'primary',
386
+ variant: 'outline',
387
+ color: 'primary',
389
388
  class: 'text-primary border-primary hover:text-primary-mild hover:border-primary-mild active:text-primary-firm active:border-primary-firm'
390
389
  }, {
391
- appearance: 'outlined',
392
- intent: 'secondary',
390
+ variant: 'outline',
391
+ color: 'secondary',
393
392
  class: 'text-secondary-strong border-secondary-strong hover:text-secondary-firm hover:border-secondary-firm active:text-secondary-bolder active:border-secondary-bolder'
394
393
  }, {
395
- appearance: 'outlined',
396
- intent: 'tertiary',
394
+ variant: 'outline',
395
+ color: 'tertiary',
397
396
  class: 'text-tertiary-strong border-tertiary-strong hover:text-tertiary-firm hover:border-tertiary-firm active:text-tertiary-bolder active:border-tertiary-bolder'
398
397
  }, {
399
- appearance: 'outlined',
400
- intent: 'success',
398
+ variant: 'outline',
399
+ color: 'success',
401
400
  class: 'text-success-strong border-success-strong hover:text-success-firm hover:border-success-firm active:text-success-bolder active:border-success-bolder'
402
401
  }, {
403
- appearance: 'outlined',
404
- intent: 'warning',
402
+ variant: 'outline',
403
+ color: 'warning',
405
404
  class: 'text-warning-strong border-warning-strong hover:text-warning-firm hover:border-warning-firm active:text-warning-bolder active:border-warning-bolder'
406
405
  }, {
407
- appearance: 'outlined',
408
- intent: 'danger',
406
+ variant: 'outline',
407
+ color: 'danger',
409
408
  class: 'text-danger border-danger hover:text-danger-mild hover:border-danger-mild active:text-danger-firm active:border-danger-firm'
410
409
  }],
411
410
  defaultVariants: {
412
411
  size: 'md',
413
- intent: 'default'
412
+ color: 'neutral'
414
413
  }
415
414
  });
416
415
  const button = tv({
417
416
  extend: baseButton,
418
417
  base: [''],
419
418
  variants: {
420
- appearance: {
421
- default: 'shadow-elevation-2',
419
+ variant: {
420
+ solid: 'shadow-elevation-2',
422
421
  soft: '',
423
- outlined: '',
424
- minimal: '',
425
- tonal: 'shadow-elevation-2',
422
+ subtle: '',
423
+ outline: '',
424
+ ghost: '',
425
+ plain: '',
426
426
  custom: ''
427
427
  },
428
428
  isLoading: {
@@ -430,159 +430,191 @@ const button = tv({
430
430
  }
431
431
  },
432
432
  compoundVariants: [
433
- // APPEARANCE: default (Facet "filled") — fill + border + on-color
433
+ // VARIANT: solid (Facet "filled") — fill + border + on-color
434
434
  {
435
- appearance: 'default',
436
- intent: 'default',
435
+ variant: 'solid',
436
+ color: 'neutral',
437
437
  class: 'bg-neutral-bolder border-neutral-bolder text-on-neutral-bolder hover:bg-neutral-strong hover:border-neutral-strong hover:text-on-neutral-strong active:bg-neutral-firm active:border-neutral-firm active:text-on-neutral-firm'
438
438
  }, {
439
- appearance: 'default',
440
- intent: 'primary',
439
+ variant: 'solid',
440
+ color: 'primary',
441
441
  class: 'bg-primary border-primary text-on-primary hover:bg-primary-mild hover:border-primary-mild hover:text-on-primary-mild active:bg-primary-firm active:border-primary-firm active:text-on-primary-firm'
442
442
  }, {
443
- appearance: 'default',
444
- intent: 'secondary',
443
+ variant: 'solid',
444
+ color: 'secondary',
445
445
  class: 'bg-secondary border-secondary text-on-secondary hover:bg-secondary-mild hover:border-secondary-mild hover:text-on-secondary-mild active:bg-secondary-firm active:border-secondary-firm active:text-on-secondary-firm'
446
446
  }, {
447
- appearance: 'default',
448
- intent: 'tertiary',
447
+ variant: 'solid',
448
+ color: 'tertiary',
449
449
  class: 'bg-tertiary border-tertiary text-on-tertiary hover:bg-tertiary-mild hover:border-tertiary-mild hover:text-on-tertiary-mild active:bg-tertiary-firm active:border-tertiary-firm active:text-on-tertiary-firm'
450
450
  }, {
451
- appearance: 'default',
452
- intent: 'success',
451
+ variant: 'solid',
452
+ color: 'success',
453
453
  class: 'bg-success border-success text-on-success hover:bg-success-mild hover:border-success-mild hover:text-on-success-mild active:bg-success-firm active:border-success-firm active:text-on-success-firm'
454
454
  }, {
455
- appearance: 'default',
456
- intent: 'warning',
455
+ variant: 'solid',
456
+ color: 'warning',
457
457
  class: 'bg-warning border-warning text-on-warning hover:bg-warning-mild hover:border-warning-mild hover:text-on-warning-mild active:bg-warning-firm active:border-warning-firm active:text-on-warning-firm'
458
458
  }, {
459
- appearance: 'default',
460
- intent: 'danger',
459
+ variant: 'solid',
460
+ color: 'danger',
461
461
  class: 'bg-danger border-danger text-on-danger hover:bg-danger-mild hover:border-danger-mild hover:text-on-danger-mild active:bg-danger-firm active:border-danger-firm active:text-on-danger-firm'
462
462
  },
463
- // APPEARANCE: soft — tint fill, plus the border Facet gives it
463
+ // VARIANT: subtle — tint fill, plus the border Facet gives it
464
464
  {
465
- appearance: 'soft',
466
- intent: 'default',
465
+ variant: 'subtle',
466
+ color: 'neutral',
467
467
  class: 'bg-neutral-soft border-neutral-bolder text-neutral-bolder hover:bg-neutral-subtle hover:border-neutral-strong hover:text-neutral-strong active:bg-neutral-muted active:border-neutral-firm active:text-neutral-firm'
468
468
  }, {
469
- appearance: 'soft',
470
- intent: 'primary',
469
+ variant: 'subtle',
470
+ color: 'primary',
471
471
  class: 'bg-primary-soft border-primary text-primary hover:bg-primary-subtle hover:border-primary-mild hover:text-primary-mild active:bg-primary-muted active:border-primary-firm active:text-primary-firm'
472
472
  }, {
473
- appearance: 'soft',
474
- intent: 'secondary',
473
+ variant: 'subtle',
474
+ color: 'secondary',
475
475
  class: 'bg-secondary-soft border-secondary-strong text-secondary-strong hover:bg-secondary-subtle hover:border-secondary-firm hover:text-secondary-firm active:bg-secondary-muted active:border-secondary-bolder active:text-secondary-bolder'
476
476
  }, {
477
- appearance: 'soft',
478
- intent: 'tertiary',
477
+ variant: 'subtle',
478
+ color: 'tertiary',
479
479
  class: 'bg-tertiary-soft border-tertiary-strong text-tertiary-strong hover:bg-tertiary-subtle hover:border-tertiary-firm hover:text-tertiary-firm active:bg-tertiary-muted active:border-tertiary-bolder active:text-tertiary-bolder'
480
480
  }, {
481
- appearance: 'soft',
482
- intent: 'success',
481
+ variant: 'subtle',
482
+ color: 'success',
483
483
  class: 'bg-success-soft border-success-strong text-success-strong hover:bg-success-subtle hover:border-success-firm hover:text-success-firm active:bg-success-muted active:border-success-bolder active:text-success-bolder'
484
484
  }, {
485
- appearance: 'soft',
486
- intent: 'warning',
485
+ variant: 'subtle',
486
+ color: 'warning',
487
487
  class: 'bg-warning-soft border-warning-strong text-warning-strong hover:bg-warning-subtle hover:border-warning-firm hover:text-warning-firm active:bg-warning-muted active:border-warning-bolder active:text-warning-bolder'
488
488
  }, {
489
- appearance: 'soft',
490
- intent: 'danger',
489
+ variant: 'subtle',
490
+ color: 'danger',
491
491
  class: 'bg-danger-soft border-danger text-danger hover:bg-danger-subtle hover:border-danger-mild hover:text-danger-mild active:bg-danger-muted active:border-danger-firm active:text-danger-firm'
492
492
  },
493
- // APPEARANCE: minimal (Facet "ghost") — ink only, no fill
493
+ // VARIANT: plain (Facet "ghost") — ink only, no fill
494
494
  {
495
- appearance: 'minimal',
496
- intent: 'default',
495
+ variant: 'plain',
496
+ color: 'neutral',
497
497
  class: 'text-neutral-bolder hover:text-neutral-firm/80 active:text-neutral-firm'
498
498
  }, {
499
- appearance: 'minimal',
500
- intent: 'primary',
499
+ variant: 'plain',
500
+ color: 'primary',
501
501
  class: 'text-primary hover:text-primary-mild active:text-primary-firm'
502
502
  }, {
503
- appearance: 'minimal',
504
- intent: 'secondary',
503
+ variant: 'plain',
504
+ color: 'secondary',
505
505
  class: 'text-secondary-strong hover:text-secondary-firm active:text-secondary-bolder'
506
506
  }, {
507
- appearance: 'minimal',
508
- intent: 'tertiary',
507
+ variant: 'plain',
508
+ color: 'tertiary',
509
509
  class: 'text-tertiary-strong hover:text-tertiary-firm active:text-tertiary-bolder'
510
510
  }, {
511
- appearance: 'minimal',
512
- intent: 'success',
511
+ variant: 'plain',
512
+ color: 'success',
513
513
  class: 'text-success-strong hover:text-success-firm active:text-success-bolder'
514
514
  }, {
515
- appearance: 'minimal',
516
- intent: 'warning',
515
+ variant: 'plain',
516
+ color: 'warning',
517
517
  class: 'text-warning-strong hover:text-warning-firm active:text-warning-bolder'
518
518
  }, {
519
- appearance: 'minimal',
520
- intent: 'danger',
519
+ variant: 'plain',
520
+ color: 'danger',
521
521
  class: 'text-danger hover:text-danger-mild active:text-danger-firm'
522
522
  },
523
- // APPEARANCE: tonal — tint fill that deepens through the ramp
523
+ // VARIANT: ghost — plain's ink, plus a hover tint. New in 0.18; `plain`
524
+ // (formerly `minimal`) stays the no-fill option.
525
+ {
526
+ variant: 'ghost',
527
+ color: 'neutral',
528
+ class: 'text-neutral-bolder hover:bg-neutral-subtle hover:text-neutral-firm/80 active:bg-neutral-muted active:text-neutral-firm'
529
+ }, {
530
+ variant: 'ghost',
531
+ color: 'primary',
532
+ class: 'text-primary hover:bg-primary-soft hover:text-primary-mild active:bg-primary-muted active:text-primary-firm'
533
+ }, {
534
+ variant: 'ghost',
535
+ color: 'secondary',
536
+ class: 'text-secondary-strong hover:bg-secondary-soft hover:text-secondary-firm active:bg-secondary-muted active:text-secondary-bolder'
537
+ }, {
538
+ variant: 'ghost',
539
+ color: 'tertiary',
540
+ class: 'text-tertiary-strong hover:bg-tertiary-soft hover:text-tertiary-firm active:bg-tertiary-muted active:text-tertiary-bolder'
541
+ }, {
542
+ variant: 'ghost',
543
+ color: 'success',
544
+ class: 'text-success-strong hover:bg-success-soft hover:text-success-firm active:bg-success-muted active:text-success-bolder'
545
+ }, {
546
+ variant: 'ghost',
547
+ color: 'warning',
548
+ class: 'text-warning-strong hover:bg-warning-soft hover:text-warning-firm active:bg-warning-muted active:text-warning-bolder'
549
+ }, {
550
+ variant: 'ghost',
551
+ color: 'danger',
552
+ class: 'text-danger hover:bg-danger-soft hover:text-danger-mild active:bg-danger-muted active:text-danger-firm'
553
+ },
554
+ // VARIANT: soft — tint fill that deepens through the ramp
524
555
  {
525
- appearance: 'tonal',
526
- intent: 'default',
556
+ variant: 'soft',
557
+ color: 'neutral',
527
558
  class: 'bg-neutral-soft text-on-neutral-soft hover:bg-neutral-muted hover:text-on-neutral-muted active:bg-neutral-mild active:text-on-neutral-mild'
528
559
  }, {
529
- appearance: 'tonal',
530
- intent: 'primary',
560
+ variant: 'soft',
561
+ color: 'primary',
531
562
  class: 'bg-primary-soft text-on-primary-soft hover:bg-primary-muted hover:text-on-primary-muted active:bg-primary-mild active:text-on-primary-mild'
532
563
  }, {
533
- appearance: 'tonal',
534
- intent: 'secondary',
564
+ variant: 'soft',
565
+ color: 'secondary',
535
566
  class: 'bg-secondary-soft text-on-secondary-soft hover:bg-secondary-muted hover:text-on-secondary-muted active:bg-secondary-mild active:text-on-secondary-mild'
536
567
  }, {
537
- appearance: 'tonal',
538
- intent: 'tertiary',
568
+ variant: 'soft',
569
+ color: 'tertiary',
539
570
  class: 'bg-tertiary-soft text-on-tertiary-soft hover:bg-tertiary-muted hover:text-on-tertiary-muted active:bg-tertiary-mild active:text-on-tertiary-mild'
540
571
  }, {
541
- appearance: 'tonal',
542
- intent: 'success',
572
+ variant: 'soft',
573
+ color: 'success',
543
574
  class: 'bg-success-soft text-on-success-soft hover:bg-success-muted hover:text-on-success-muted active:bg-success-mild active:text-on-success-mild'
544
575
  }, {
545
- appearance: 'tonal',
546
- intent: 'warning',
576
+ variant: 'soft',
577
+ color: 'warning',
547
578
  class: 'bg-warning-soft text-on-warning-soft hover:bg-warning-muted hover:text-on-warning-muted active:bg-warning-mild active:text-on-warning-mild'
548
579
  }, {
549
- appearance: 'tonal',
550
- intent: 'danger',
580
+ variant: 'soft',
581
+ color: 'danger',
551
582
  class: 'bg-danger-soft text-on-danger-soft hover:bg-danger-muted hover:text-on-danger-muted active:bg-danger-mild active:text-on-danger-mild'
552
583
  },
553
- // APPEARANCE: custom
584
+ // VARIANT: custom
554
585
  {
555
- appearance: 'custom',
556
- intent: 'default',
586
+ variant: 'custom',
587
+ color: 'neutral',
557
588
  class: 'text-neutral-strong'
558
589
  }, {
559
- appearance: 'custom',
560
- intent: 'primary',
590
+ variant: 'custom',
591
+ color: 'primary',
561
592
  class: 'text-primary-strong'
562
593
  }, {
563
- appearance: 'custom',
564
- intent: 'secondary',
594
+ variant: 'custom',
595
+ color: 'secondary',
565
596
  class: 'text-secondary-strong'
566
597
  }, {
567
- appearance: 'custom',
568
- intent: 'tertiary',
598
+ variant: 'custom',
599
+ color: 'tertiary',
569
600
  class: 'text-tertiary-strong'
570
601
  }, {
571
- appearance: 'custom',
572
- intent: 'success',
602
+ variant: 'custom',
603
+ color: 'success',
573
604
  class: 'text-success-strong'
574
605
  }, {
575
- appearance: 'custom',
576
- intent: 'warning',
606
+ variant: 'custom',
607
+ color: 'warning',
577
608
  class: 'text-warning-strong'
578
609
  }, {
579
- appearance: 'custom',
580
- intent: 'danger',
610
+ variant: 'custom',
611
+ color: 'danger',
581
612
  class: 'text-danger-strong'
582
613
  }],
583
614
  defaultVariants: {
584
615
  size: 'md',
585
- intent: 'primary'
616
+ color: 'primary',
617
+ variant: 'solid'
586
618
  }
587
619
  });
588
620
  const toggleButton = tv({
@@ -595,45 +627,45 @@ const toggleButton = tv({
595
627
  },
596
628
  // Selected is a *filled* state, so every color has to be restated here —
597
629
  // fill, border and ink, for the resting, hover and active steps. The
598
- // unselected `outlined` rules in `baseButton` set their own
630
+ // unselected `outline` rules in `baseButton` set their own
599
631
  // `hover:text-*`/`active:*` colors, and anything we leave out keeps leaking
600
632
  // through: an unselected ink color over a selected fill is what produced the
601
633
  // unreadable label on hover. The ramp matches the filled button
602
- // (`appearance: 'default'`) — one step deeper on hover, another on active —
634
+ // (`variant: 'solid'`) — one step deeper on hover, another on active —
603
635
  // and pairs each fill with its generated `on-*` contrast ink.
604
636
  compoundVariants: [{
605
- appearance: 'outlined',
606
- intent: 'default',
637
+ variant: 'outline',
638
+ color: 'neutral',
607
639
  isSelected: true,
608
640
  class: 'bg-neutral-bolder border-neutral-bolder text-on-neutral-bolder hover:bg-neutral-strong hover:border-neutral-strong hover:text-on-neutral-strong active:bg-neutral-firm active:border-neutral-firm active:text-on-neutral-firm'
609
641
  }, {
610
- appearance: 'outlined',
611
- intent: 'primary',
642
+ variant: 'outline',
643
+ color: 'primary',
612
644
  isSelected: true,
613
645
  class: 'bg-primary border-primary text-on-primary hover:bg-primary-mild hover:border-primary-mild hover:text-on-primary-mild active:bg-primary-firm active:border-primary-firm active:text-on-primary-firm'
614
646
  }, {
615
- appearance: 'outlined',
616
- intent: 'secondary',
647
+ variant: 'outline',
648
+ color: 'secondary',
617
649
  isSelected: true,
618
650
  class: 'bg-secondary border-secondary text-on-secondary hover:bg-secondary-mild hover:border-secondary-mild hover:text-on-secondary-mild active:bg-secondary-firm active:border-secondary-firm active:text-on-secondary-firm'
619
651
  }, {
620
- appearance: 'outlined',
621
- intent: 'tertiary',
652
+ variant: 'outline',
653
+ color: 'tertiary',
622
654
  isSelected: true,
623
655
  class: 'bg-tertiary border-tertiary text-on-tertiary hover:bg-tertiary-mild hover:border-tertiary-mild hover:text-on-tertiary-mild active:bg-tertiary-firm active:border-tertiary-firm active:text-on-tertiary-firm'
624
656
  }, {
625
- appearance: 'outlined',
626
- intent: 'success',
657
+ variant: 'outline',
658
+ color: 'success',
627
659
  isSelected: true,
628
660
  class: 'bg-success border-success text-on-success hover:bg-success-mild hover:border-success-mild hover:text-on-success-mild active:bg-success-firm active:border-success-firm active:text-on-success-firm'
629
661
  }, {
630
- appearance: 'outlined',
631
- intent: 'warning',
662
+ variant: 'outline',
663
+ color: 'warning',
632
664
  isSelected: true,
633
665
  class: 'bg-warning border-warning text-on-warning hover:bg-warning-mild hover:border-warning-mild hover:text-on-warning-mild active:bg-warning-firm active:border-warning-firm active:text-on-warning-firm'
634
666
  }, {
635
- appearance: 'outlined',
636
- intent: 'danger',
667
+ variant: 'outline',
668
+ color: 'danger',
637
669
  isSelected: true,
638
670
  class: 'bg-danger border-danger text-on-danger hover:bg-danger-mild hover:border-danger-mild hover:text-on-danger-mild active:bg-danger-firm active:border-danger-firm active:text-on-danger-firm'
639
671
  }]
@@ -665,18 +697,18 @@ const chip = tv({
665
697
  isDisabled: {
666
698
  true: 'opacity-disabled cursor-not-allowed'
667
699
  },
668
- appearance: {
669
- default: '',
670
- outlined: '',
671
- faded: ''
700
+ variant: {
701
+ solid: '',
702
+ outline: '',
703
+ soft: ''
672
704
  },
673
- // The close button is a filled circle in every appearance. `-muted` is
674
- // light enough to sit on the page in `outlined`/`faded` and to read as a
705
+ // The close button is a filled circle in every variant. `-muted` is
706
+ // light enough to sit on the page in `outline`/`soft` and to read as a
675
707
  // disc on a filled chip, and each level carries its own `on-` colour — the
676
708
  // pairing this used to get wrong, by putting `text-on-{intent}` (the
677
709
  // contrast colour for the DEFAULT level) on a `-muted` circle.
678
- intent: {
679
- default: {
710
+ color: {
711
+ neutral: {
680
712
  dot: 'bg-neutral-strong',
681
713
  closeButton: 'bg-neutral-muted text-on-neutral-muted'
682
714
  },
@@ -737,163 +769,163 @@ const chip = tv({
737
769
  // dot disappears into it. Inherit the chip's text colour instead — the one
738
770
  // colour guaranteed to contrast the fill.
739
771
  {
740
- appearance: 'default',
772
+ variant: 'solid',
741
773
  class: {
742
774
  dot: 'bg-current'
743
775
  }
744
776
  },
745
- // APPEARANCE: default (filled)
777
+ // VARIANT: solid (filled)
746
778
  //
747
779
  // The chip's own fill is the intent's DEFAULT level, so the close button
748
- // cannot hover *towards* it the way the other two appearances do — the
780
+ // cannot hover *towards* it the way the other two variants do — the
749
781
  // circle would vanish into the chip. It steps down to `-subtle` instead.
750
782
  {
751
- appearance: 'default',
752
- intent: 'default',
783
+ variant: 'solid',
784
+ color: 'neutral',
753
785
  class: {
754
786
  base: 'bg-neutral-bolder text-on-neutral-bolder',
755
787
  closeButton: 'hover:bg-neutral-subtle hover:text-on-neutral-subtle'
756
788
  }
757
789
  }, {
758
- appearance: 'default',
759
- intent: 'primary',
790
+ variant: 'solid',
791
+ color: 'primary',
760
792
  class: {
761
793
  base: 'bg-primary text-on-primary',
762
794
  closeButton: 'hover:bg-primary-subtle hover:text-on-primary-subtle'
763
795
  }
764
796
  }, {
765
- appearance: 'default',
766
- intent: 'secondary',
797
+ variant: 'solid',
798
+ color: 'secondary',
767
799
  class: {
768
800
  base: 'bg-secondary text-on-secondary',
769
801
  closeButton: 'hover:bg-secondary-subtle hover:text-on-secondary-subtle'
770
802
  }
771
803
  }, {
772
- appearance: 'default',
773
- intent: 'tertiary',
804
+ variant: 'solid',
805
+ color: 'tertiary',
774
806
  class: {
775
807
  base: 'bg-tertiary text-on-tertiary',
776
808
  closeButton: 'hover:bg-tertiary-subtle hover:text-on-tertiary-subtle'
777
809
  }
778
810
  }, {
779
- appearance: 'default',
780
- intent: 'success',
811
+ variant: 'solid',
812
+ color: 'success',
781
813
  class: {
782
814
  base: 'bg-success text-on-success',
783
815
  closeButton: 'hover:bg-success-subtle hover:text-on-success-subtle'
784
816
  }
785
817
  }, {
786
- appearance: 'default',
787
- intent: 'warning',
818
+ variant: 'solid',
819
+ color: 'warning',
788
820
  class: {
789
821
  base: 'bg-warning text-on-warning',
790
822
  closeButton: 'hover:bg-warning-subtle hover:text-on-warning-subtle'
791
823
  }
792
824
  }, {
793
- appearance: 'default',
794
- intent: 'danger',
825
+ variant: 'solid',
826
+ color: 'danger',
795
827
  class: {
796
828
  base: 'bg-danger text-on-danger',
797
829
  closeButton: 'hover:bg-danger-subtle hover:text-on-danger-subtle'
798
830
  }
799
831
  },
800
- // APPEARANCE: faded (tonal)
832
+ // VARIANT: soft (tonal)
801
833
  {
802
- appearance: 'faded',
803
- intent: 'default',
834
+ variant: 'soft',
835
+ color: 'neutral',
804
836
  class: {
805
837
  base: 'text-neutral-strong bg-neutral-subtle',
806
838
  closeButton: 'hover:bg-neutral hover:text-on-neutral'
807
839
  }
808
840
  }, {
809
- appearance: 'faded',
810
- intent: 'primary',
841
+ variant: 'soft',
842
+ color: 'primary',
811
843
  class: {
812
844
  base: 'text-primary-strong bg-primary-subtle',
813
845
  closeButton: 'hover:bg-primary hover:text-on-primary'
814
846
  }
815
847
  }, {
816
- appearance: 'faded',
817
- intent: 'secondary',
848
+ variant: 'soft',
849
+ color: 'secondary',
818
850
  class: {
819
851
  base: 'text-secondary-strong bg-secondary-subtle',
820
852
  closeButton: 'hover:bg-secondary hover:text-on-secondary'
821
853
  }
822
854
  }, {
823
- appearance: 'faded',
824
- intent: 'tertiary',
855
+ variant: 'soft',
856
+ color: 'tertiary',
825
857
  class: {
826
858
  base: 'text-tertiary-strong bg-tertiary-subtle',
827
859
  closeButton: 'hover:bg-tertiary hover:text-on-tertiary'
828
860
  }
829
861
  }, {
830
- appearance: 'faded',
831
- intent: 'success',
862
+ variant: 'soft',
863
+ color: 'success',
832
864
  class: {
833
865
  base: 'text-success-strong bg-success-subtle',
834
866
  closeButton: 'hover:bg-success hover:text-on-success'
835
867
  }
836
868
  }, {
837
- appearance: 'faded',
838
- intent: 'warning',
869
+ variant: 'soft',
870
+ color: 'warning',
839
871
  class: {
840
872
  base: 'text-warning-strong bg-warning-subtle',
841
873
  closeButton: 'hover:bg-warning hover:text-on-warning'
842
874
  }
843
875
  }, {
844
- appearance: 'faded',
845
- intent: 'danger',
876
+ variant: 'soft',
877
+ color: 'danger',
846
878
  class: {
847
879
  base: 'text-danger-strong bg-danger-subtle',
848
880
  closeButton: 'hover:bg-danger hover:text-on-danger'
849
881
  }
850
882
  },
851
- // APPEARANCE: outlined
883
+ // VARIANT: outline
852
884
  {
853
- appearance: 'outlined',
854
- intent: 'default',
885
+ variant: 'outline',
886
+ color: 'neutral',
855
887
  class: {
856
888
  base: 'text-neutral-strong border border-neutral',
857
889
  closeButton: 'hover:bg-neutral hover:text-on-neutral'
858
890
  }
859
891
  }, {
860
- appearance: 'outlined',
861
- intent: 'primary',
892
+ variant: 'outline',
893
+ color: 'primary',
862
894
  class: {
863
895
  base: 'text-primary-strong border border-primary',
864
896
  closeButton: 'hover:bg-primary hover:text-on-primary'
865
897
  }
866
898
  }, {
867
- appearance: 'outlined',
868
- intent: 'secondary',
899
+ variant: 'outline',
900
+ color: 'secondary',
869
901
  class: {
870
902
  base: 'text-secondary-strong border border-secondary',
871
903
  closeButton: 'hover:bg-secondary hover:text-on-secondary'
872
904
  }
873
905
  }, {
874
- appearance: 'outlined',
875
- intent: 'tertiary',
906
+ variant: 'outline',
907
+ color: 'tertiary',
876
908
  class: {
877
909
  base: 'text-tertiary-strong border border-tertiary',
878
910
  closeButton: 'hover:bg-tertiary hover:text-on-tertiary'
879
911
  }
880
912
  }, {
881
- appearance: 'outlined',
882
- intent: 'success',
913
+ variant: 'outline',
914
+ color: 'success',
883
915
  class: {
884
916
  base: 'text-success-strong border border-success',
885
917
  closeButton: 'hover:bg-success hover:text-on-success'
886
918
  }
887
919
  }, {
888
- appearance: 'outlined',
889
- intent: 'warning',
920
+ variant: 'outline',
921
+ color: 'warning',
890
922
  class: {
891
923
  base: 'text-warning-strong border border-warning',
892
924
  closeButton: 'hover:bg-warning hover:text-on-warning'
893
925
  }
894
926
  }, {
895
- appearance: 'outlined',
896
- intent: 'danger',
927
+ variant: 'outline',
928
+ color: 'danger',
897
929
  class: {
898
930
  base: 'text-danger-strong border border-danger',
899
931
  closeButton: 'hover:bg-danger hover:text-on-danger'
@@ -901,8 +933,8 @@ const chip = tv({
901
933
  }],
902
934
  defaultVariants: {
903
935
  size: 'md',
904
- intent: 'default',
905
- appearance: 'default',
936
+ color: 'neutral',
937
+ variant: 'solid',
906
938
  radius: 'full'
907
939
  }
908
940
  });
@@ -920,8 +952,8 @@ const progressBar = tv({
920
952
  progress: ['animate-loading origin-left']
921
953
  }
922
954
  },
923
- intent: {
924
- default: {
955
+ color: {
956
+ neutral: {
925
957
  progress: 'bg-neutral-strong'
926
958
  },
927
959
  primary: {
@@ -976,7 +1008,7 @@ const progressBar = tv({
976
1008
  },
977
1009
  defaultVariants: {
978
1010
  size: 'md',
979
- intent: 'default',
1011
+ color: 'neutral',
980
1012
  radius: 'sm'
981
1013
  }
982
1014
  });
@@ -1005,17 +1037,17 @@ const closeButton = tv({
1005
1037
  }
1006
1038
  },
1007
1039
  variant: {
1008
- transparent: {
1040
+ ghost: {
1009
1041
  base: ['bg-transparent', 'hover:bg-surface-overlay-subtle']
1010
1042
  },
1011
- subtle: {
1043
+ soft: {
1012
1044
  base: ['bg-neutral-subtle', 'text-on-neutral-subtle', 'hover:bg-surface-overlay-subtle']
1013
1045
  }
1014
1046
  }
1015
1047
  },
1016
1048
  defaultVariants: {
1017
1049
  size: 'md',
1018
- variant: 'transparent'
1050
+ variant: 'ghost'
1019
1051
  }
1020
1052
  });
1021
1053
 
@@ -1138,20 +1170,20 @@ const kbd = tv({
1138
1170
  key: 'h-7 min-w-7 px-2 rounded-md text-label-sm'
1139
1171
  }
1140
1172
  },
1141
- // Colours live in the compound variants below, paired with `intent`.
1142
- appearance: {
1143
- default: {
1173
+ // Colours live in the compound variants below, paired with `color`.
1174
+ variant: {
1175
+ solid: {
1144
1176
  key: 'border border-transparent'
1145
1177
  },
1146
- outlined: {
1178
+ outline: {
1147
1179
  key: 'border bg-transparent'
1148
1180
  },
1149
- faded: {
1181
+ subtle: {
1150
1182
  key: 'border'
1151
1183
  },
1152
1184
  // Follows whatever colour it is sitting on. This is what lets a keycap
1153
1185
  // ride an active, filled Listbox row without the row's theme having to
1154
- // repaint it for every intent.
1186
+ // repaint it for every color.
1155
1187
  inherit: {
1156
1188
  key: 'border border-current/20 bg-transparent text-current'
1157
1189
  },
@@ -1161,8 +1193,8 @@ const kbd = tv({
1161
1193
  key: 'border-0 bg-transparent px-0 min-w-0 text-current tracking-wide'
1162
1194
  }
1163
1195
  },
1164
- intent: {
1165
- default: {},
1196
+ color: {
1197
+ neutral: {},
1166
1198
  primary: {},
1167
1199
  secondary: {},
1168
1200
  tertiary: {},
@@ -1181,148 +1213,162 @@ const kbd = tv({
1181
1213
  }
1182
1214
  },
1183
1215
  compoundVariants: [
1184
- // appearance: default -- a filled cap. `-muted` is light enough to read as
1216
+ // variant: solid -- a filled cap. `-muted` is light enough to read as
1185
1217
  // a key on a page and each level carries its own `on-` contrast colour.
1186
1218
  {
1187
- appearance: 'default',
1188
- intent: 'default',
1219
+ variant: 'solid',
1220
+ color: 'neutral',
1189
1221
  class: {
1190
1222
  key: 'bg-neutral-muted text-on-neutral-muted'
1191
1223
  }
1192
1224
  }, {
1193
- appearance: 'default',
1194
- intent: 'primary',
1225
+ variant: 'solid',
1226
+ color: 'primary',
1195
1227
  class: {
1196
1228
  key: 'bg-primary-muted text-on-primary-muted'
1197
1229
  }
1198
1230
  }, {
1199
- appearance: 'default',
1200
- intent: 'secondary',
1231
+ variant: 'solid',
1232
+ color: 'secondary',
1201
1233
  class: {
1202
1234
  key: 'bg-secondary-muted text-on-secondary-muted'
1203
1235
  }
1204
1236
  }, {
1205
- appearance: 'default',
1206
- intent: 'tertiary',
1237
+ variant: 'solid',
1238
+ color: 'tertiary',
1207
1239
  class: {
1208
1240
  key: 'bg-tertiary-muted text-on-tertiary-muted'
1209
1241
  }
1210
1242
  }, {
1211
- appearance: 'default',
1212
- intent: 'success',
1243
+ variant: 'solid',
1244
+ color: 'success',
1213
1245
  class: {
1214
1246
  key: 'bg-success-muted text-on-success-muted'
1215
1247
  }
1216
1248
  }, {
1217
- appearance: 'default',
1218
- intent: 'warning',
1249
+ variant: 'solid',
1250
+ color: 'warning',
1219
1251
  class: {
1220
1252
  key: 'bg-warning-muted text-on-warning-muted'
1221
1253
  }
1222
1254
  }, {
1223
- appearance: 'default',
1224
- intent: 'danger',
1255
+ variant: 'solid',
1256
+ color: 'danger',
1225
1257
  class: {
1226
1258
  key: 'bg-danger-muted text-on-danger-muted'
1227
1259
  }
1228
1260
  },
1229
- // appearance: outlined
1261
+ // variant: outline
1230
1262
  {
1231
- appearance: 'outlined',
1232
- intent: 'default',
1263
+ variant: 'outline',
1264
+ color: 'neutral',
1233
1265
  class: {
1234
1266
  key: 'border-neutral text-neutral-strong'
1235
1267
  }
1236
1268
  }, {
1237
- appearance: 'outlined',
1238
- intent: 'primary',
1269
+ variant: 'outline',
1270
+ color: 'primary',
1239
1271
  class: {
1240
1272
  key: 'border-primary text-primary-strong'
1241
1273
  }
1242
1274
  }, {
1243
- appearance: 'outlined',
1244
- intent: 'secondary',
1275
+ variant: 'outline',
1276
+ color: 'secondary',
1245
1277
  class: {
1246
1278
  key: 'border-secondary text-secondary-strong'
1247
1279
  }
1248
1280
  }, {
1249
- appearance: 'outlined',
1250
- intent: 'tertiary',
1281
+ variant: 'outline',
1282
+ color: 'tertiary',
1251
1283
  class: {
1252
1284
  key: 'border-tertiary text-tertiary-strong'
1253
1285
  }
1254
1286
  }, {
1255
- appearance: 'outlined',
1256
- intent: 'success',
1287
+ variant: 'outline',
1288
+ color: 'success',
1257
1289
  class: {
1258
1290
  key: 'border-success text-success-strong'
1259
1291
  }
1260
1292
  }, {
1261
- appearance: 'outlined',
1262
- intent: 'warning',
1293
+ variant: 'outline',
1294
+ color: 'warning',
1263
1295
  class: {
1264
1296
  key: 'border-warning text-warning-strong'
1265
1297
  }
1266
1298
  }, {
1267
- appearance: 'outlined',
1268
- intent: 'danger',
1299
+ variant: 'outline',
1300
+ color: 'danger',
1269
1301
  class: {
1270
1302
  key: 'border-danger text-danger-strong'
1271
1303
  }
1272
1304
  },
1273
- // appearance: faded
1305
+ // variant: subtle
1274
1306
  {
1275
- appearance: 'faded',
1276
- intent: 'default',
1307
+ variant: 'subtle',
1308
+ color: 'neutral',
1277
1309
  class: {
1278
1310
  key: 'bg-neutral-subtle border-neutral-soft text-neutral-strong'
1279
1311
  }
1280
1312
  }, {
1281
- appearance: 'faded',
1282
- intent: 'primary',
1313
+ variant: 'subtle',
1314
+ color: 'primary',
1283
1315
  class: {
1284
1316
  key: 'bg-primary-subtle border-primary-soft text-primary-strong'
1285
1317
  }
1286
1318
  }, {
1287
- appearance: 'faded',
1288
- intent: 'secondary',
1319
+ variant: 'subtle',
1320
+ color: 'secondary',
1289
1321
  class: {
1290
1322
  key: 'bg-secondary-subtle border-secondary-soft text-secondary-strong'
1291
1323
  }
1292
1324
  }, {
1293
- appearance: 'faded',
1294
- intent: 'tertiary',
1325
+ variant: 'subtle',
1326
+ color: 'tertiary',
1295
1327
  class: {
1296
1328
  key: 'bg-tertiary-subtle border-tertiary-soft text-tertiary-strong'
1297
1329
  }
1298
1330
  }, {
1299
- appearance: 'faded',
1300
- intent: 'success',
1331
+ variant: 'subtle',
1332
+ color: 'success',
1301
1333
  class: {
1302
1334
  key: 'bg-success-subtle border-success-soft text-success-strong'
1303
1335
  }
1304
1336
  }, {
1305
- appearance: 'faded',
1306
- intent: 'warning',
1337
+ variant: 'subtle',
1338
+ color: 'warning',
1307
1339
  class: {
1308
1340
  key: 'bg-warning-subtle border-warning-soft text-warning-strong'
1309
1341
  }
1310
1342
  }, {
1311
- appearance: 'faded',
1312
- intent: 'danger',
1343
+ variant: 'subtle',
1344
+ color: 'danger',
1313
1345
  class: {
1314
1346
  key: 'bg-danger-subtle border-danger-soft text-danger-strong'
1315
1347
  }
1316
1348
  }],
1317
1349
  defaultVariants: {
1318
1350
  size: 'md',
1319
- intent: 'default',
1320
- appearance: 'default'
1351
+ color: 'neutral',
1352
+ variant: 'solid'
1321
1353
  }
1322
1354
  });
1323
1355
 
1324
1356
  const listbox = tv({
1325
- base: 'w-full flex flex-col gap-0.5 outline-hidden p-1'
1357
+ base: 'w-full flex flex-col gap-0.5 outline-hidden p-1',
1358
+ variants: {
1359
+ color: {
1360
+ neutral: '',
1361
+ primary: '',
1362
+ secondary: '',
1363
+ tertiary: '',
1364
+ success: '',
1365
+ warning: '',
1366
+ danger: ''
1367
+ }
1368
+ },
1369
+ defaultVariants: {
1370
+ color: 'neutral'
1371
+ }
1326
1372
  });
1327
1373
  const listboxItem = tv({
1328
1374
  slots: {
@@ -1338,19 +1384,19 @@ const listboxItem = tv({
1338
1384
  submenuIndicator: ['text-neutral-firm', 'group-data-is-active:text-inherit', 'w-4', 'h-4', 'shrink-0']
1339
1385
  },
1340
1386
  variants: {
1341
- appearance: {
1342
- default: {
1387
+ variant: {
1388
+ solid: {
1343
1389
  base: ''
1344
1390
  },
1345
- outlined: {
1391
+ outline: {
1346
1392
  base: 'border border-transparent bg-transparent'
1347
1393
  },
1348
- faded: {
1394
+ subtle: {
1349
1395
  base: ['border border-transparent']
1350
1396
  }
1351
1397
  },
1352
- intent: {
1353
- default: {},
1398
+ color: {
1399
+ neutral: {},
1354
1400
  primary: {},
1355
1401
  secondary: {},
1356
1402
  tertiary: {},
@@ -1380,138 +1426,138 @@ const listboxItem = tv({
1380
1426
  }
1381
1427
  },
1382
1428
  defaultVariants: {
1383
- appearance: 'default',
1384
- intent: 'default'
1429
+ variant: 'solid',
1430
+ color: 'neutral'
1385
1431
  },
1386
1432
  compoundVariants: [
1387
- // appearance: default
1433
+ // variant: solid
1388
1434
  {
1389
- appearance: 'default',
1390
- intent: 'default',
1435
+ variant: 'solid',
1436
+ color: 'neutral',
1391
1437
  class: {
1392
1438
  base: ['data-is-active:bg-neutral-subtle', 'data-is-active:text-neutral-strong']
1393
1439
  }
1394
1440
  }, {
1395
- appearance: 'default',
1396
- intent: 'primary',
1441
+ variant: 'solid',
1442
+ color: 'primary',
1397
1443
  class: {
1398
1444
  base: ['data-is-active:bg-primary-soft', 'data-is-active:text-on-primary-soft']
1399
1445
  }
1400
1446
  }, {
1401
- appearance: 'default',
1402
- intent: 'secondary',
1447
+ variant: 'solid',
1448
+ color: 'secondary',
1403
1449
  class: {
1404
1450
  base: ['data-is-active:bg-secondary-soft', 'data-is-active:text-on-secondary-soft']
1405
1451
  }
1406
1452
  }, {
1407
- appearance: 'default',
1408
- intent: 'tertiary',
1453
+ variant: 'solid',
1454
+ color: 'tertiary',
1409
1455
  class: {
1410
1456
  base: ['data-is-active:bg-tertiary-soft', 'data-is-active:text-on-tertiary-soft']
1411
1457
  }
1412
1458
  }, {
1413
- appearance: 'default',
1414
- intent: 'success',
1459
+ variant: 'solid',
1460
+ color: 'success',
1415
1461
  class: {
1416
1462
  base: ['data-is-active:bg-success-soft', 'data-is-active:text-on-success-soft']
1417
1463
  }
1418
1464
  }, {
1419
- appearance: 'default',
1420
- intent: 'warning',
1465
+ variant: 'solid',
1466
+ color: 'warning',
1421
1467
  class: {
1422
1468
  base: ['data-is-active:bg-warning-soft', 'data-is-active:text-on-warning-soft']
1423
1469
  }
1424
1470
  }, {
1425
- appearance: 'default',
1426
- intent: 'danger',
1471
+ variant: 'solid',
1472
+ color: 'danger',
1427
1473
  class: {
1428
1474
  base: ['data-is-active:bg-danger-soft', 'data-is-active:text-on-danger-soft']
1429
1475
  }
1430
1476
  },
1431
- // appearance: outlined
1477
+ // variant: outline
1432
1478
  {
1433
- appearance: 'outlined',
1434
- intent: 'default',
1479
+ variant: 'outline',
1480
+ color: 'neutral',
1435
1481
  class: {
1436
1482
  base: ['data-is-active:border-neutral', 'data-is-active:text-neutral-strong']
1437
1483
  }
1438
1484
  }, {
1439
- appearance: 'outlined',
1440
- intent: 'primary',
1485
+ variant: 'outline',
1486
+ color: 'primary',
1441
1487
  class: {
1442
1488
  base: ['data-is-active:border-primary', 'data-is-active:text-primary-strong']
1443
1489
  }
1444
1490
  }, {
1445
- appearance: 'outlined',
1446
- intent: 'secondary',
1491
+ variant: 'outline',
1492
+ color: 'secondary',
1447
1493
  class: {
1448
1494
  base: ['data-is-active:border-secondary', 'data-is-active:text-secondary-strong']
1449
1495
  }
1450
1496
  }, {
1451
- appearance: 'outlined',
1452
- intent: 'tertiary',
1497
+ variant: 'outline',
1498
+ color: 'tertiary',
1453
1499
  class: {
1454
1500
  base: ['data-is-active:border-tertiary', 'data-is-active:text-tertiary-strong']
1455
1501
  }
1456
1502
  }, {
1457
- appearance: 'outlined',
1458
- intent: 'success',
1503
+ variant: 'outline',
1504
+ color: 'success',
1459
1505
  class: {
1460
1506
  base: ['data-is-active:border-success', 'data-is-active:text-success-strong']
1461
1507
  }
1462
1508
  }, {
1463
- appearance: 'outlined',
1464
- intent: 'warning',
1509
+ variant: 'outline',
1510
+ color: 'warning',
1465
1511
  class: {
1466
1512
  base: ['data-is-active:border-warning', 'data-is-active:text-warning-strong']
1467
1513
  }
1468
1514
  }, {
1469
- appearance: 'outlined',
1470
- intent: 'danger',
1515
+ variant: 'outline',
1516
+ color: 'danger',
1471
1517
  class: {
1472
1518
  base: ['data-is-active:border-danger', 'data-is-active:text-danger-strong']
1473
1519
  }
1474
1520
  },
1475
- // appearance: faded
1521
+ // variant: subtle
1476
1522
  {
1477
- appearance: 'faded',
1478
- intent: 'default',
1523
+ variant: 'subtle',
1524
+ color: 'neutral',
1479
1525
  class: {
1480
1526
  base: ['data-is-active:bg-neutral-soft/20', 'data-is-active:border-neutral', 'data-is-active:text-neutral-strong']
1481
1527
  }
1482
1528
  }, {
1483
- appearance: 'faded',
1484
- intent: 'primary',
1529
+ variant: 'subtle',
1530
+ color: 'primary',
1485
1531
  class: {
1486
1532
  base: ['data-is-active:bg-primary-soft/20', 'data-is-active:border-primary', 'data-is-active:text-primary-strong']
1487
1533
  }
1488
1534
  }, {
1489
- appearance: 'faded',
1490
- intent: 'secondary',
1535
+ variant: 'subtle',
1536
+ color: 'secondary',
1491
1537
  class: {
1492
1538
  base: ['data-is-active:bg-secondary-soft/20', 'data-is-active:border-secondary', 'data-is-active:text-secondary-strong']
1493
1539
  }
1494
1540
  }, {
1495
- appearance: 'faded',
1496
- intent: 'tertiary',
1541
+ variant: 'subtle',
1542
+ color: 'tertiary',
1497
1543
  class: {
1498
1544
  base: ['data-is-active:bg-tertiary-soft/20', 'data-is-active:border-tertiary', 'data-is-active:text-tertiary-strong']
1499
1545
  }
1500
1546
  }, {
1501
- appearance: 'faded',
1502
- intent: 'success',
1547
+ variant: 'subtle',
1548
+ color: 'success',
1503
1549
  class: {
1504
1550
  base: ['data-is-active:bg-success-soft/20', 'data-is-active:border-success', 'data-is-active:text-success-strong']
1505
1551
  }
1506
1552
  }, {
1507
- appearance: 'faded',
1508
- intent: 'warning',
1553
+ variant: 'subtle',
1554
+ color: 'warning',
1509
1555
  class: {
1510
1556
  base: ['data-is-active:bg-warning-soft/20', 'data-is-active:border-warning', 'data-is-active:text-warning-strong']
1511
1557
  }
1512
1558
  }, {
1513
- appearance: 'faded',
1514
- intent: 'danger',
1559
+ variant: 'subtle',
1560
+ color: 'danger',
1515
1561
  class: {
1516
1562
  base: ['data-is-active:bg-danger-soft/20', 'data-is-active:border-danger', 'data-is-active:text-danger-strong']
1517
1563
  }
@@ -1543,7 +1589,12 @@ const popover = tv({
1543
1589
  md: 'w-64',
1544
1590
  lg: 'w-96',
1545
1591
  xl: 'w-136',
1546
- trigger: 'w-(--trigger-width)'
1592
+ trigger: 'w-(--trigger-width)',
1593
+ // Sizes to the content instead of a fixed width. For panels whose
1594
+ // natural width is the point -- a calendar grid is as wide as seven day
1595
+ // cells, and wider still with two months side by side -- a fixed width
1596
+ // either clips the content or leaves it swimming.
1597
+ auto: 'w-auto'
1547
1598
  }
1548
1599
  },
1549
1600
  defaultVariants: {
@@ -1552,15 +1603,52 @@ const popover = tv({
1552
1603
  });
1553
1604
 
1554
1605
  const divider = tv({
1555
- base: 'shrink-0 bg-neutral-subtle border-none',
1606
+ // `divider` is the purpose-built token for rules, and unlike the solid
1607
+ // `neutral-*` fills it is translucent — 15% ink over whatever sits behind it
1608
+ // (near-black in light, white in dark). That is what makes one divider work on
1609
+ // a page, a card and a tinted panel alike: it darkens or lightens its own
1610
+ // background rather than trying to match a fixed surface colour. `bg-neutral-subtle`
1611
+ // was the wrong choice here — it resolves to near-white in light and near-black
1612
+ // in dark, so it vanished on exactly the surfaces a divider is drawn on.
1613
+ base: 'shrink-0 bg-divider border-none',
1556
1614
  variants: {
1557
1615
  orientation: {
1558
1616
  horizontal: 'w-full h-px',
1559
1617
  vertical: 'h-full w-px'
1618
+ },
1619
+ variant: {
1620
+ solid: '',
1621
+ // Intentionally empty. The sketch treatment is attached by the compound
1622
+ // variant below, so it can only ever apply to a horizontal divider —
1623
+ // see the comment there.
1624
+ sketch: ''
1560
1625
  }
1561
1626
  },
1627
+ compoundVariants: [
1628
+ // Horizontal only, deliberately. The artwork is a near-horizontal ribbon;
1629
+ // squashed into a 1px-wide column by `mask-size: 100% 100%` it renders as a
1630
+ // stub covering roughly the top 45% of the height, not a rule. Scoping it
1631
+ // here means `orientation="vertical" variant="sketch"` silently falls back
1632
+ // to an ordinary vertical line.
1633
+ //
1634
+ // `h-1` (4px) is the artwork's native height, and the rule is deliberately
1635
+ // subtle at that size. The mask is sized `100% 100%`, so the wobble
1636
+ // amplitude scales with the element's height -- a taller divider reads as
1637
+ // more obviously hand-drawn, but overstates a line the design intends to be
1638
+ // quiet. Raise this only with design's agreement.
1639
+ //
1640
+ // The height lives here rather than in the variant so it beats `h-px`
1641
+ // deterministically: tv() applies compound variants after variants, so
1642
+ // this does not depend on tailwind-merge resolving the conflict by
1643
+ // declaration order.
1644
+ {
1645
+ orientation: 'horizontal',
1646
+ variant: 'sketch',
1647
+ class: 'h-1 divider-sketch'
1648
+ }],
1562
1649
  defaultVariants: {
1563
- orientation: 'horizontal'
1650
+ orientation: 'horizontal',
1651
+ variant: 'solid'
1564
1652
  }
1565
1653
  });
1566
1654
 
@@ -1704,8 +1792,8 @@ const spinner = tv({
1704
1792
  lg: 'w-10 h-10',
1705
1793
  xl: 'w-12 h-12'
1706
1794
  },
1707
- intent: {
1708
- default: 'fill-neutral-strong',
1795
+ color: {
1796
+ neutral: 'fill-neutral-strong',
1709
1797
  primary: 'fill-primary',
1710
1798
  secondary: 'fill-secondary',
1711
1799
  tertiary: 'fill-tertiary',
@@ -1716,7 +1804,7 @@ const spinner = tv({
1716
1804
  },
1717
1805
  defaultVariants: {
1718
1806
  size: 'md',
1719
- intent: 'default'
1807
+ color: 'neutral'
1720
1808
  }
1721
1809
  });
1722
1810
 
@@ -2060,8 +2148,8 @@ const segmentedControl = tv({
2060
2148
  // modes -- the two express selection on different elements, so a rule per
2061
2149
  // mode is one mode away from being forgotten. Written literally: Tailwind
2062
2150
  // generates nothing from a composed class string.
2063
- intent: {
2064
- default: {
2151
+ color: {
2152
+ neutral: {
2065
2153
  // Opaque white in light mode. In dark, `surface-card` is translucent,
2066
2154
  // so an opaque neutral is used instead -- see the track above.
2067
2155
  indicator: 'bg-surface-card dark:bg-neutral-soft',
@@ -2182,7 +2270,7 @@ const segmentedControl = tv({
2182
2270
  }],
2183
2271
  defaultVariants: {
2184
2272
  variant: 'solid',
2185
- intent: 'default',
2273
+ color: 'neutral',
2186
2274
  size: 'md',
2187
2275
  orientation: 'horizontal'
2188
2276
  }
@@ -2233,11 +2321,11 @@ const tabs = tv({
2233
2321
  }
2234
2322
  },
2235
2323
  // Fill and selected ink travel together: the label sits on the fill, so a
2236
- // new intent needs both or its selected label is unreadable on its own
2324
+ // new color needs both or its selected label is unreadable on its own
2237
2325
  // background. `underline` overrides the ink in one compound below, since a
2238
2326
  // bare bar puts no fill behind the label.
2239
- intent: {
2240
- default: {
2327
+ color: {
2328
+ neutral: {
2241
2329
  indicator: 'bg-surface-card dark:bg-neutral-soft',
2242
2330
  tab: 'data-[selected=true]:text-neutral-bolder'
2243
2331
  },
@@ -2309,8 +2397,8 @@ const tabs = tv({
2309
2397
  }
2310
2398
  },
2311
2399
  compoundVariants: [
2312
- // -- underline: no fill behind the label, so the intent colour lives on the
2313
- // bar alone and the label stays high-contrast neutral at every intent --
2400
+ // -- underline: no fill behind the label, so the color colour lives on the
2401
+ // bar alone and the label stays high-contrast neutral at every color --
2314
2402
  // matching the reference designs. The hover chip shares this matcher, so it
2315
2403
  // rides along rather than repeating the condition in a second entry.
2316
2404
  {
@@ -2332,10 +2420,10 @@ const tabs = tv({
2332
2420
  tab: 'rounded-xl'
2333
2421
  }
2334
2422
  },
2335
- // `default` intent's fill is a surface in solid; a bare bar needs ink.
2423
+ // `neutral` color's fill is a surface in solid; a bare bar needs ink.
2336
2424
  {
2337
2425
  variant: 'underline',
2338
- intent: 'default',
2426
+ color: 'neutral',
2339
2427
  class: {
2340
2428
  indicator: 'bg-neutral-bolder'
2341
2429
  }
@@ -2363,7 +2451,7 @@ const tabs = tv({
2363
2451
  }],
2364
2452
  defaultVariants: {
2365
2453
  variant: 'solid',
2366
- intent: 'default',
2454
+ color: 'neutral',
2367
2455
  size: 'md',
2368
2456
  orientation: 'horizontal'
2369
2457
  }
@@ -2398,12 +2486,12 @@ const accordion = tv({
2398
2486
  // No chrome at all.
2399
2487
  ghost: {},
2400
2488
  // Rules between items, none after the last.
2401
- outlined: {
2489
+ separated: {
2402
2490
  item: 'border-b border-neutral-muted last:border-b-0'
2403
2491
  },
2404
2492
  // A soft fill on the open item. Horizontal padding comes with the
2405
2493
  // surface -- text running to the edge of a tinted box reads as a bug.
2406
- faded: {
2494
+ soft: {
2407
2495
  item: 'rounded-lg data-[open=true]:bg-surface-overlay-soft',
2408
2496
  trigger: 'px-3',
2409
2497
  contentBody: 'px-3'
@@ -2458,7 +2546,7 @@ const accordion = tv({
2458
2546
  }
2459
2547
  },
2460
2548
  defaultVariants: {
2461
- variant: 'outlined',
2549
+ variant: 'separated',
2462
2550
  size: 'md'
2463
2551
  }
2464
2552
  });
@@ -2541,9 +2629,9 @@ const calendar = tv({
2541
2629
  // `relative` is the positioning context for the today dot. Deliberately
2542
2630
  // no z-index -- see `cellBand`.
2543
2631
  'relative', 'inline-flex items-center justify-center', 'size-[calc(var(--calendar-cell-size)-0.25rem)]', 'rounded-[var(--calendar-cell-radius)]', 'text-body-sm text-neutral-strong', 'cursor-pointer select-none', 'transition-colors duration-200 motion-reduce:transition-none',
2544
- // Selected days are excluded here and get their own hover per intent.
2632
+ // Selected days are excluded here and get their own hover per color.
2545
2633
  // Without the exclusion this rule wins on specificity -- it carries an
2546
- // extra `:hover` over the intent's plain `data-[selected=true]` -- so
2634
+ // extra `:hover` over the color's plain `data-[selected=true]` -- so
2547
2635
  // hovering the selected day replaced its fill with a grey overlay and
2548
2636
  // made it look deselected.
2549
2637
  'not-data-[disabled=true]:not-data-[selected=true]:hover:bg-surface-overlay-soft', 'data-[outside=true]:text-neutral-mild', 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:text-neutral-mild', 'data-[unavailable=true]:line-through data-[unavailable=true]:cursor-not-allowed', 'data-[unavailable=true]:hover:bg-transparent'],
@@ -2570,8 +2658,8 @@ const calendar = tv({
2570
2658
  yearCell: [...focusVisibleRing, 'rounded-full px-3 py-2 text-body-sm cursor-pointer', 'hover:bg-surface-overlay-soft', 'data-[selected=true]:bg-surface-overlay-soft data-[selected=true]:font-medium']
2571
2659
  },
2572
2660
  variants: {
2573
- intent: {
2574
- default: {
2661
+ color: {
2662
+ neutral: {
2575
2663
  day: 'data-[selected=true]:bg-neutral-strong data-[selected=true]:text-on-neutral-strong data-[selected=true]:hover:bg-neutral-bolder',
2576
2664
  cellBand: 'data-[in-range=true]:bg-neutral-soft'
2577
2665
  },
@@ -2622,7 +2710,7 @@ const calendar = tv({
2622
2710
  }
2623
2711
  },
2624
2712
  defaultVariants: {
2625
- intent: 'primary',
2713
+ color: 'primary',
2626
2714
  size: 'md'
2627
2715
  }
2628
2716
  });
@@ -2702,9 +2790,9 @@ const pagination = tv({
2702
2790
  }
2703
2791
  },
2704
2792
  // Fill and label travel together: the digit sits on the fill, so each
2705
- // intent needs both or the active chip is unreadable.
2706
- intent: {
2707
- default: {
2793
+ // color needs both or the active chip is unreadable.
2794
+ color: {
2795
+ neutral: {
2708
2796
  page: 'data-[active=true]:bg-neutral-bolder data-[active=true]:text-on-neutral-bolder'
2709
2797
  },
2710
2798
  primary: {
@@ -2739,7 +2827,7 @@ const pagination = tv({
2739
2827
  },
2740
2828
  defaultVariants: {
2741
2829
  size: 'md',
2742
- intent: 'default',
2830
+ color: 'neutral',
2743
2831
  isDisabled: false
2744
2832
  }
2745
2833
  });
@@ -2765,22 +2853,22 @@ const tooltip = tv({
2765
2853
  base: 'px-3 py-2 text-label-md'
2766
2854
  }
2767
2855
  },
2768
- // `bg-inherit` on the arrow (see `overlayArrow`) means each intent only
2856
+ // `bg-inherit` on the arrow (see `overlayArrow`) means each color only
2769
2857
  // has to state the background once, on `base`. The border is stated on
2770
- // both `base` and `arrow` for every intent so the two agree at the join:
2858
+ // both `base` and `arrow` for every color so the two agree at the join:
2771
2859
  // `default` carries a visible `border-neutral-soft` on each (the arrow's
2772
2860
  // own shadow-less edge needs a level with more contrast than the body's
2773
- // `shadow-md` gets away with), and every coloured intent clears both to
2861
+ // `shadow-md` gets away with), and every coloured color clears both to
2774
2862
  // `border-transparent`. The body needs this explicitly, not just the
2775
2863
  // arrow: `Content`'s classNames (`popover.gts`) run this `base` class
2776
2864
  // through the *`popover`* tv, whose own base carries
2777
2865
  // `border border-neutral-subtle` (`popover.ts`) -- twMerge only drops
2778
2866
  // that when a later class from the same border-color group replaces it,
2779
- // so a coloured intent with no border class of its own left that
2867
+ // so a coloured color with no border class of its own left that
2780
2868
  // neutral border showing on the body while the arrow (fixed here to
2781
2869
  // `border-transparent`) went invisible, a visible seam at the join.
2782
- intent: {
2783
- default: {
2870
+ color: {
2871
+ neutral: {
2784
2872
  base: 'bg-surface-input text-on-surface-input border border-neutral-soft',
2785
2873
  arrow: 'border-neutral-soft'
2786
2874
  },
@@ -2812,7 +2900,7 @@ const tooltip = tv({
2812
2900
  },
2813
2901
  defaultVariants: {
2814
2902
  size: 'md',
2815
- intent: 'default'
2903
+ color: 'neutral'
2816
2904
  }
2817
2905
  });
2818
2906
 
@@ -2895,12 +2983,12 @@ const notificationCard = tv({
2895
2983
  inner: 'flex gap-3 p-4 font-body text-body-2xs',
2896
2984
  icon: 'shrink-0 size-5',
2897
2985
  // The loading spinner's own slot, distinct from `icon`. It must NOT
2898
- // reuse `icon` — `icon`'s intent-coloured `text-*` class (the compound
2986
+ // reuse `icon` — `icon`'s status-coloured `text-*` class (the compound
2899
2987
  // variants below) would win the Tailwind-merge over the Spinner's own
2900
2988
  // dim `text-neutral-muted` track, making the arc and track nearly
2901
2989
  // identical and the spin unreadable. `size-5` matches `icon` exactly so
2902
2990
  // a promise settling (spinner -> icon) never resizes the card. The arc
2903
- // colour comes from `@intent` passed to <Spinner>, not from this slot;
2991
+ // colour comes from `@status` passed to <Spinner>, not from this slot;
2904
2992
  // this slot only ever supplies sizing/position and, where needed
2905
2993
  // (solid variant below), an explicit track/arc override.
2906
2994
  spinner: 'shrink-0 size-5',
@@ -2912,9 +3000,9 @@ const notificationCard = tv({
2912
3000
  closeButton: statusRowCloseButton
2913
3001
  },
2914
3002
  variants: {
2915
- intent: {
2916
- default: {},
2917
- info: {},
3003
+ status: {
3004
+ neutral: {},
3005
+ primary: {},
2918
3006
  success: {},
2919
3007
  warning: {},
2920
3008
  danger: {}
@@ -2925,15 +3013,15 @@ const notificationCard = tv({
2925
3013
  // size. `text-neutral-firm` clears it comfortably against every
2926
3014
  // surface this description can sit on, light or dark, tonal or not.
2927
3015
  // See packages/frontile/docs/notifications-usage.md's contrast note for the measured ratios.
2928
- default: {
3016
+ surface: {
2929
3017
  base: 'bg-surface-modal border-surface-overlay-mild',
2930
3018
  description: 'text-neutral-firm'
2931
3019
  },
2932
- // The outer surface/border is intent-independent — every `tonal`
2933
- // compound variant below borrows the same neutral surface `default`
2934
- // uses (see the comment above the `tonal` compound variants), so it
3020
+ // The outer surface/border is status-independent — every `soft`
3021
+ // compound variant below borrows the same neutral surface `surface`
3022
+ // uses (see the comment above the `soft` compound variants), so it
2935
3023
  // lives here once instead of repeating in each of them.
2936
- tonal: {
3024
+ soft: {
2937
3025
  base: 'bg-surface-modal border-surface-overlay-mild',
2938
3026
  description: 'text-neutral-firm'
2939
3027
  },
@@ -2972,19 +3060,19 @@ const notificationCard = tv({
2972
3060
  }
2973
3061
  },
2974
3062
  compoundVariants: [
2975
- // default: neutral surface, colour carried by the icon and title.
2976
- // `default` intent has no accent — icon and title stay neutral, same
2977
- // `firm` level the other intents use for their accent text.
3063
+ // surface: neutral surface, colour carried by the icon and title.
3064
+ // `default` status has no accent — icon and title stay neutral, same
3065
+ // `firm` level the other statuses use for their accent text.
2978
3066
  {
2979
- variant: 'default',
2980
- intent: 'default',
3067
+ variant: 'surface',
3068
+ status: 'neutral',
2981
3069
  class: {
2982
3070
  icon: 'text-neutral-firm',
2983
3071
  title: 'text-neutral-firm'
2984
3072
  }
2985
3073
  }, {
2986
- variant: 'default',
2987
- intent: 'info',
3074
+ variant: 'surface',
3075
+ status: 'primary',
2988
3076
  class: {
2989
3077
  icon: 'text-primary',
2990
3078
  title: 'text-primary'
@@ -2993,8 +3081,8 @@ const notificationCard = tv({
2993
3081
  // `success-firm` is only ~2.3:1 on the white card surface in light
2994
3082
  // mode; `bolder` clears AA in both themes. See packages/frontile/docs/notifications-usage.md's
2995
3083
  // contrast note.
2996
- variant: 'default',
2997
- intent: 'success',
3084
+ variant: 'surface',
3085
+ status: 'success',
2998
3086
  class: {
2999
3087
  icon: 'text-success-bolder',
3000
3088
  title: 'text-success-bolder'
@@ -3003,64 +3091,61 @@ const notificationCard = tv({
3003
3091
  // `warning-firm` is only ~3:1 on the white card surface in light
3004
3092
  // mode; `bolder` clears AA in both themes. See packages/frontile/docs/notifications-usage.md's
3005
3093
  // contrast note.
3006
- variant: 'default',
3007
- intent: 'warning',
3094
+ variant: 'surface',
3095
+ status: 'warning',
3008
3096
  class: {
3009
3097
  icon: 'text-warning-bolder',
3010
3098
  title: 'text-warning-bolder'
3011
3099
  }
3012
3100
  }, {
3013
- variant: 'default',
3014
- intent: 'danger',
3101
+ variant: 'surface',
3102
+ status: 'danger',
3015
3103
  class: {
3016
3104
  icon: 'text-danger-firm',
3017
3105
  title: 'text-danger-firm'
3018
3106
  }
3019
3107
  },
3020
- // tonal: same recipe as Button's `appearance: 'tonal'` — an opaque
3021
- // outer surface (so the floating card never lets page content show
3022
- // through) with the translucent `{intent}-soft` tint and its `on-*`
3023
- // contrast ink applied to the *inner* element, which composites over
3024
- // that opaque surface. The outer picks up the `default` variant's
3025
- // neutral surface/border instead of a colour-matched one: Button's
3026
- // tonal has no border at all, but a card floating over arbitrary page
3027
- // content benefits from the same edge definition `default` already
3028
- // uses, so it borrows that treatment rather than inventing a new one.
3108
+ // soft: an opaque outer surface (so the floating card never lets page
3109
+ // content show through) with the translucent `{status}-soft` tint and its
3110
+ // `on-*` contrast ink applied to the *inner* element, which composites
3111
+ // over that opaque surface. The outer picks up the `surface` variant's
3112
+ // neutral surface/border instead of a colour-matched one, so it borrows
3113
+ // that treatment rather than inventing a new one.
3029
3114
  {
3030
- variant: 'tonal',
3031
- intent: 'default',
3115
+ variant: 'soft',
3116
+ status: 'neutral',
3032
3117
  class: {
3033
3118
  inner: 'bg-neutral-soft',
3034
3119
  icon: 'text-on-neutral-soft',
3035
3120
  title: 'text-on-neutral-soft'
3036
3121
  }
3037
3122
  }, {
3038
- variant: 'tonal',
3039
- intent: 'info',
3123
+ variant: 'soft',
3124
+ status: 'primary',
3040
3125
  class: {
3041
3126
  inner: 'bg-primary-soft',
3042
3127
  icon: 'text-on-primary-soft',
3043
3128
  title: 'text-on-primary-soft'
3044
3129
  }
3045
3130
  }, {
3046
- variant: 'tonal',
3047
- intent: 'success',
3131
+ variant: 'soft',
3132
+ status: 'success',
3048
3133
  class: {
3049
3134
  inner: 'bg-success-soft',
3050
3135
  icon: 'text-on-success-soft',
3051
3136
  title: 'text-on-success-soft'
3052
3137
  }
3053
3138
  }, {
3054
- variant: 'tonal',
3055
- intent: 'warning',
3139
+ variant: 'soft',
3140
+ status: 'warning',
3056
3141
  class: {
3057
3142
  inner: 'bg-warning-soft',
3058
3143
  icon: 'text-on-warning-soft',
3059
3144
  title: 'text-on-warning-soft'
3060
3145
  }
3061
3146
  }, {
3062
- variant: 'tonal',
3063
- intent: 'danger',
3147
+ variant: 'soft',
3148
+ status: 'danger',
3064
3149
  class: {
3065
3150
  inner: 'bg-danger-soft',
3066
3151
  icon: 'text-on-danger-soft',
@@ -3068,18 +3153,18 @@ const notificationCard = tv({
3068
3153
  }
3069
3154
  },
3070
3155
  // solid: filled surface, contrast text. `description` uses the
3071
- // full-strength `on-{intent}` ink rather than a translucent cut — see
3156
+ // full-strength `on-{status}` ink rather than a translucent cut — see
3072
3157
  // packages/frontile/docs/notifications-usage.md's contrast note for why
3073
3158
  // (a translucent cut used to fail WCAG AA here).
3074
3159
  //
3075
- // The spinner override matters because `@intent` on <Spinner> drives its
3076
- // arc via `fill-{intent}`, the exact same color as this variant's own
3077
- // `bg-{intent}` surface — left alone the arc would be camouflaged
3160
+ // The spinner override matters because `@status` on <Spinner> drives its
3161
+ // arc via `fill-{status}`, the exact same color as this variant's own
3162
+ // `bg-{status}` surface — left alone the arc would be camouflaged
3078
3163
  // against its own card, so `solid` forces both halves of the spinner to
3079
3164
  // the contrast ink instead.
3080
3165
  {
3081
3166
  variant: 'solid',
3082
- intent: 'default',
3167
+ status: 'neutral',
3083
3168
  class: {
3084
3169
  base: 'bg-neutral text-on-neutral',
3085
3170
  icon: 'text-on-neutral',
@@ -3089,7 +3174,7 @@ const notificationCard = tv({
3089
3174
  }
3090
3175
  }, {
3091
3176
  variant: 'solid',
3092
- intent: 'info',
3177
+ status: 'primary',
3093
3178
  class: {
3094
3179
  base: 'bg-primary text-on-primary',
3095
3180
  icon: 'text-on-primary',
@@ -3099,7 +3184,7 @@ const notificationCard = tv({
3099
3184
  }
3100
3185
  }, {
3101
3186
  variant: 'solid',
3102
- intent: 'success',
3187
+ status: 'success',
3103
3188
  class: {
3104
3189
  base: 'bg-success text-on-success',
3105
3190
  icon: 'text-on-success',
@@ -3109,7 +3194,7 @@ const notificationCard = tv({
3109
3194
  }
3110
3195
  }, {
3111
3196
  variant: 'solid',
3112
- intent: 'warning',
3197
+ status: 'warning',
3113
3198
  class: {
3114
3199
  base: 'bg-warning text-on-warning',
3115
3200
  icon: 'text-on-warning',
@@ -3119,7 +3204,7 @@ const notificationCard = tv({
3119
3204
  }
3120
3205
  }, {
3121
3206
  variant: 'solid',
3122
- intent: 'danger',
3207
+ status: 'danger',
3123
3208
  class: {
3124
3209
  base: 'bg-danger text-on-danger',
3125
3210
  icon: 'text-on-danger',
@@ -3129,8 +3214,8 @@ const notificationCard = tv({
3129
3214
  }
3130
3215
  }],
3131
3216
  defaultVariants: {
3132
- intent: 'default',
3133
- variant: 'default',
3217
+ status: 'neutral',
3218
+ variant: 'surface',
3134
3219
  hasDescription: false,
3135
3220
  stackPlacement: 'none'
3136
3221
  }
@@ -3175,7 +3260,9 @@ const formFeedback = tv({
3175
3260
  // validation/feedback text — body role
3176
3261
  base: 'font-body text-body-2xs pt-1',
3177
3262
  variants: {
3178
- intent: {
3263
+ // `status`, not `color`: this value also decides whether the message is
3264
+ // announced assertively. See `isError` in form-feedback.gts.
3265
+ status: {
3179
3266
  primary: 'text-primary',
3180
3267
  secondary: 'text-secondary',
3181
3268
  tertiary: 'text-tertiary',
@@ -3574,6 +3661,60 @@ const select = tv({
3574
3661
  }
3575
3662
  });
3576
3663
 
3664
+ // Extends `input` directly rather than `select`, even though the two look
3665
+ // alike. tv() loses slot types across a two-level extend, and
3666
+ // input -> select -> datePicker would be that second level; the shared
3667
+ // appearance comes from the common base instead.
3668
+ const datePicker = tv({
3669
+ extend: input,
3670
+ slots: {
3671
+ base: [],
3672
+ placeholder: 'text-neutral',
3673
+ input: 'cursor-default text-left',
3674
+ // The calendar sits in the popover, which supplies its own surface and
3675
+ // padding, so this only reserves room around the grid.
3676
+ calendar: 'p-2',
3677
+ // `border-default` is not a generated utility -- there is no `default`
3678
+ // semantic level. `border-neutral-soft` is the same divider treatment
3679
+ // `command.ts` uses to separate a footer from the content above it.
3680
+ // `w-0 min-w-full` keeps the footer out of the popover's intrinsic width:
3681
+ // the popover is sized `auto`, so it takes the width of its widest child,
3682
+ // and a row of preset buttons would otherwise stretch it well past the
3683
+ // calendar. Contributing zero and then filling the resolved width lets the
3684
+ // calendar decide how wide the popover is, and the buttons wrap within it.
3685
+ footer: ['flex flex-wrap items-center gap-2', 'w-0 min-w-full', 'border-t border-neutral-soft p-2'],
3686
+ icon: 'w-5 h-5',
3687
+ clearButton: 'pointer-events-auto'
3688
+ },
3689
+ variants: {
3690
+ // The trigger is a `<button>` whose text *is* the value, so with neither a
3691
+ // value nor a `@placeholder` it has no content at all and collapses to its
3692
+ // padding -- noticeably shorter than every other field on the form.
3693
+ // (Select hit the same thing once chips took over its trigger's content.)
3694
+ //
3695
+ // The floor has to be stated per size, and as a border-box total: Tailwind
3696
+ // sets `box-sizing: border-box`, so a bare `min-h-5` is already satisfied
3697
+ // by the padding alone and does nothing. Each value is one line of
3698
+ // `text-base`/`leading-tight` (1.25rem) plus that size's vertical padding
3699
+ // plus the 1px borders -- i.e. exactly the height the field has once it
3700
+ // holds a single line of text.
3701
+ size: {
3702
+ sm: {
3703
+ input: 'min-h-[calc(1.25rem+1rem+2px)]'
3704
+ },
3705
+ md: {
3706
+ input: 'min-h-[calc(1.25rem+1.5rem+2px)]'
3707
+ },
3708
+ lg: {
3709
+ input: 'min-h-[calc(1.25rem+2rem+2px)]'
3710
+ }
3711
+ }
3712
+ },
3713
+ defaultVariants: {
3714
+ size: 'md'
3715
+ }
3716
+ });
3717
+
3577
3718
  // Note: extends `input` rather than `select` because tailwind-variants
3578
3719
  // loses inherited slot types across two levels of `extend`.
3579
3720
  const autocomplete = tv({
@@ -3662,8 +3803,8 @@ const switchInput = tv({
3662
3803
  label: 'text-lg'
3663
3804
  }
3664
3805
  },
3665
- intent: {
3666
- default: {
3806
+ color: {
3807
+ neutral: {
3667
3808
  wrapper: ['group-data-[selected=true]:bg-neutral-firm', 'group-data-[selected=true]:text-on-neutral-firm']
3668
3809
  },
3669
3810
  primary: {
@@ -3688,7 +3829,7 @@ const switchInput = tv({
3688
3829
  },
3689
3830
  defaultVariants: {
3690
3831
  size: 'md',
3691
- intent: 'primary',
3832
+ color: 'primary',
3692
3833
  isDisabled: false
3693
3834
  }
3694
3835
  });
@@ -3829,6 +3970,7 @@ var components = /*#__PURE__*/Object.freeze({
3829
3970
  closeButton: closeButton,
3830
3971
  command: command,
3831
3972
  commandDialog: commandDialog,
3973
+ datePicker: datePicker,
3832
3974
  divider: divider,
3833
3975
  drawer: drawer,
3834
3976
  dropdownContent: dropdownContent,