@frontile/theme 0.18.0-beta.0 → 0.18.0-beta.2

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.
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.
524
525
  {
525
- appearance: 'tonal',
526
- intent: 'default',
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
555
+ {
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
 
@@ -1051,7 +1083,7 @@ const command = tv({
1051
1083
  // hairline box; `neutral-muted` is one step up and visible in both schemes.
1052
1084
  '[&_[data-component=listbox-item][data-active=true]]:bg-neutral-muted', '[&_[data-component=listbox-item][data-active=true]]:text-neutral-bolder',
1053
1085
  // row text
1054
- '[&_[data-test-id=listbox-item-label]]:text-body-sm', '[&_[data-test-id=listbox-item-label]]:font-medium',
1086
+ '[&_[data-component=listbox-item]_[data-part=label]]:text-body-sm', '[&_[data-component=listbox-item]_[data-part=label]]:font-medium',
1055
1087
  // leading icons are sized and muted unless the consumer says otherwise
1056
1088
  '[&_[data-component=listbox-item]_svg:not([class*=size-])]:size-4', '[&_[data-component=listbox-item]_svg]:shrink-0', '[&_[data-component=listbox-item]_svg:not([class*=text-])]:text-neutral',
1057
1089
  // group headings
@@ -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: {
@@ -1704,8 +1755,8 @@ const spinner = tv({
1704
1755
  lg: 'w-10 h-10',
1705
1756
  xl: 'w-12 h-12'
1706
1757
  },
1707
- intent: {
1708
- default: 'fill-neutral-strong',
1758
+ color: {
1759
+ neutral: 'fill-neutral-strong',
1709
1760
  primary: 'fill-primary',
1710
1761
  secondary: 'fill-secondary',
1711
1762
  tertiary: 'fill-tertiary',
@@ -1716,13 +1767,18 @@ const spinner = tv({
1716
1767
  },
1717
1768
  defaultVariants: {
1718
1769
  size: 'md',
1719
- intent: 'default'
1770
+ color: 'neutral'
1720
1771
  }
1721
1772
  });
1722
1773
 
1723
1774
  const table = tv({
1724
1775
  slots: {
1725
- base: ['w-full', 'caption-bottom', 'font-body text-body-2xs'],
1776
+ // No `base` slot: Table has no single wrapping root element of its own --
1777
+ // `wrapper` (below) is the outermost rendered element, and nothing ever
1778
+ // called `.base()`. `w-full caption-bottom font-body text-body-2xs` was
1779
+ // dead here (never applied by any renderer); it is not carried over to
1780
+ // any other slot, since restoring it would be a visual change out of
1781
+ // scope for this migration -- see Task 12's brief.
1726
1782
  wrapper: ['relative', 'isolate', 'overflow-auto', 'rounded-default',
1727
1783
  // `surface-table` rather than `surface-card`, which the table otherwise
1728
1784
  // looks exactly like: every sticky part of the table paints over the rows
@@ -1731,6 +1787,8 @@ const table = tv({
1731
1787
  // veil renders, with the alpha already resolved. Override
1732
1788
  // `--color-surface-table` to sit a table on a different background.
1733
1789
  'bg-surface-table'],
1790
+ // The optional controls strip above the table (e.g. column visibility).
1791
+ toolbar: ['px-4', 'pt-3'],
1734
1792
  table: ['w-full', 'table-auto'],
1735
1793
  thead: ['relative', 'bg-surface-overlay-subtle'],
1736
1794
  tbody: ['divide-y', 'divide-surface-overlay-subtle',
@@ -2053,8 +2111,8 @@ const segmentedControl = tv({
2053
2111
  // modes -- the two express selection on different elements, so a rule per
2054
2112
  // mode is one mode away from being forgotten. Written literally: Tailwind
2055
2113
  // generates nothing from a composed class string.
2056
- intent: {
2057
- default: {
2114
+ color: {
2115
+ neutral: {
2058
2116
  // Opaque white in light mode. In dark, `surface-card` is translucent,
2059
2117
  // so an opaque neutral is used instead -- see the track above.
2060
2118
  indicator: 'bg-surface-card dark:bg-neutral-soft',
@@ -2175,7 +2233,7 @@ const segmentedControl = tv({
2175
2233
  }],
2176
2234
  defaultVariants: {
2177
2235
  variant: 'solid',
2178
- intent: 'default',
2236
+ color: 'neutral',
2179
2237
  size: 'md',
2180
2238
  orientation: 'horizontal'
2181
2239
  }
@@ -2226,11 +2284,11 @@ const tabs = tv({
2226
2284
  }
2227
2285
  },
2228
2286
  // Fill and selected ink travel together: the label sits on the fill, so a
2229
- // new intent needs both or its selected label is unreadable on its own
2287
+ // new color needs both or its selected label is unreadable on its own
2230
2288
  // background. `underline` overrides the ink in one compound below, since a
2231
2289
  // bare bar puts no fill behind the label.
2232
- intent: {
2233
- default: {
2290
+ color: {
2291
+ neutral: {
2234
2292
  indicator: 'bg-surface-card dark:bg-neutral-soft',
2235
2293
  tab: 'data-[selected=true]:text-neutral-bolder'
2236
2294
  },
@@ -2302,8 +2360,8 @@ const tabs = tv({
2302
2360
  }
2303
2361
  },
2304
2362
  compoundVariants: [
2305
- // -- underline: no fill behind the label, so the intent colour lives on the
2306
- // bar alone and the label stays high-contrast neutral at every intent --
2363
+ // -- underline: no fill behind the label, so the color colour lives on the
2364
+ // bar alone and the label stays high-contrast neutral at every color --
2307
2365
  // matching the reference designs. The hover chip shares this matcher, so it
2308
2366
  // rides along rather than repeating the condition in a second entry.
2309
2367
  {
@@ -2325,10 +2383,10 @@ const tabs = tv({
2325
2383
  tab: 'rounded-xl'
2326
2384
  }
2327
2385
  },
2328
- // `default` intent's fill is a surface in solid; a bare bar needs ink.
2386
+ // `neutral` color's fill is a surface in solid; a bare bar needs ink.
2329
2387
  {
2330
2388
  variant: 'underline',
2331
- intent: 'default',
2389
+ color: 'neutral',
2332
2390
  class: {
2333
2391
  indicator: 'bg-neutral-bolder'
2334
2392
  }
@@ -2356,7 +2414,7 @@ const tabs = tv({
2356
2414
  }],
2357
2415
  defaultVariants: {
2358
2416
  variant: 'solid',
2359
- intent: 'default',
2417
+ color: 'neutral',
2360
2418
  size: 'md',
2361
2419
  orientation: 'horizontal'
2362
2420
  }
@@ -2391,12 +2449,12 @@ const accordion = tv({
2391
2449
  // No chrome at all.
2392
2450
  ghost: {},
2393
2451
  // Rules between items, none after the last.
2394
- outlined: {
2452
+ separated: {
2395
2453
  item: 'border-b border-neutral-muted last:border-b-0'
2396
2454
  },
2397
2455
  // A soft fill on the open item. Horizontal padding comes with the
2398
2456
  // surface -- text running to the edge of a tinted box reads as a bug.
2399
- faded: {
2457
+ soft: {
2400
2458
  item: 'rounded-lg data-[open=true]:bg-surface-overlay-soft',
2401
2459
  trigger: 'px-3',
2402
2460
  contentBody: 'px-3'
@@ -2451,7 +2509,7 @@ const accordion = tv({
2451
2509
  }
2452
2510
  },
2453
2511
  defaultVariants: {
2454
- variant: 'outlined',
2512
+ variant: 'separated',
2455
2513
  size: 'md'
2456
2514
  }
2457
2515
  });
@@ -2534,9 +2592,9 @@ const calendar = tv({
2534
2592
  // `relative` is the positioning context for the today dot. Deliberately
2535
2593
  // no z-index -- see `cellBand`.
2536
2594
  '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',
2537
- // Selected days are excluded here and get their own hover per intent.
2595
+ // Selected days are excluded here and get their own hover per color.
2538
2596
  // Without the exclusion this rule wins on specificity -- it carries an
2539
- // extra `:hover` over the intent's plain `data-[selected=true]` -- so
2597
+ // extra `:hover` over the color's plain `data-[selected=true]` -- so
2540
2598
  // hovering the selected day replaced its fill with a grey overlay and
2541
2599
  // made it look deselected.
2542
2600
  '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'],
@@ -2563,8 +2621,8 @@ const calendar = tv({
2563
2621
  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']
2564
2622
  },
2565
2623
  variants: {
2566
- intent: {
2567
- default: {
2624
+ color: {
2625
+ neutral: {
2568
2626
  day: 'data-[selected=true]:bg-neutral-strong data-[selected=true]:text-on-neutral-strong data-[selected=true]:hover:bg-neutral-bolder',
2569
2627
  cellBand: 'data-[in-range=true]:bg-neutral-soft'
2570
2628
  },
@@ -2615,7 +2673,7 @@ const calendar = tv({
2615
2673
  }
2616
2674
  },
2617
2675
  defaultVariants: {
2618
- intent: 'primary',
2676
+ color: 'primary',
2619
2677
  size: 'md'
2620
2678
  }
2621
2679
  });
@@ -2695,9 +2753,9 @@ const pagination = tv({
2695
2753
  }
2696
2754
  },
2697
2755
  // Fill and label travel together: the digit sits on the fill, so each
2698
- // intent needs both or the active chip is unreadable.
2699
- intent: {
2700
- default: {
2756
+ // color needs both or the active chip is unreadable.
2757
+ color: {
2758
+ neutral: {
2701
2759
  page: 'data-[active=true]:bg-neutral-bolder data-[active=true]:text-on-neutral-bolder'
2702
2760
  },
2703
2761
  primary: {
@@ -2732,7 +2790,7 @@ const pagination = tv({
2732
2790
  },
2733
2791
  defaultVariants: {
2734
2792
  size: 'md',
2735
- intent: 'default',
2793
+ color: 'neutral',
2736
2794
  isDisabled: false
2737
2795
  }
2738
2796
  });
@@ -2758,22 +2816,22 @@ const tooltip = tv({
2758
2816
  base: 'px-3 py-2 text-label-md'
2759
2817
  }
2760
2818
  },
2761
- // `bg-inherit` on the arrow (see `overlayArrow`) means each intent only
2819
+ // `bg-inherit` on the arrow (see `overlayArrow`) means each color only
2762
2820
  // has to state the background once, on `base`. The border is stated on
2763
- // both `base` and `arrow` for every intent so the two agree at the join:
2821
+ // both `base` and `arrow` for every color so the two agree at the join:
2764
2822
  // `default` carries a visible `border-neutral-soft` on each (the arrow's
2765
2823
  // own shadow-less edge needs a level with more contrast than the body's
2766
- // `shadow-md` gets away with), and every coloured intent clears both to
2824
+ // `shadow-md` gets away with), and every coloured color clears both to
2767
2825
  // `border-transparent`. The body needs this explicitly, not just the
2768
2826
  // arrow: `Content`'s classNames (`popover.gts`) run this `base` class
2769
2827
  // through the *`popover`* tv, whose own base carries
2770
2828
  // `border border-neutral-subtle` (`popover.ts`) -- twMerge only drops
2771
2829
  // that when a later class from the same border-color group replaces it,
2772
- // so a coloured intent with no border class of its own left that
2830
+ // so a coloured color with no border class of its own left that
2773
2831
  // neutral border showing on the body while the arrow (fixed here to
2774
2832
  // `border-transparent`) went invisible, a visible seam at the join.
2775
- intent: {
2776
- default: {
2833
+ color: {
2834
+ neutral: {
2777
2835
  base: 'bg-surface-input text-on-surface-input border border-neutral-soft',
2778
2836
  arrow: 'border-neutral-soft'
2779
2837
  },
@@ -2805,7 +2863,7 @@ const tooltip = tv({
2805
2863
  },
2806
2864
  defaultVariants: {
2807
2865
  size: 'md',
2808
- intent: 'default'
2866
+ color: 'neutral'
2809
2867
  }
2810
2868
  });
2811
2869
 
@@ -2888,12 +2946,12 @@ const notificationCard = tv({
2888
2946
  inner: 'flex gap-3 p-4 font-body text-body-2xs',
2889
2947
  icon: 'shrink-0 size-5',
2890
2948
  // The loading spinner's own slot, distinct from `icon`. It must NOT
2891
- // reuse `icon` — `icon`'s intent-coloured `text-*` class (the compound
2949
+ // reuse `icon` — `icon`'s status-coloured `text-*` class (the compound
2892
2950
  // variants below) would win the Tailwind-merge over the Spinner's own
2893
2951
  // dim `text-neutral-muted` track, making the arc and track nearly
2894
2952
  // identical and the spin unreadable. `size-5` matches `icon` exactly so
2895
2953
  // a promise settling (spinner -> icon) never resizes the card. The arc
2896
- // colour comes from `@intent` passed to <Spinner>, not from this slot;
2954
+ // colour comes from `@status` passed to <Spinner>, not from this slot;
2897
2955
  // this slot only ever supplies sizing/position and, where needed
2898
2956
  // (solid variant below), an explicit track/arc override.
2899
2957
  spinner: 'shrink-0 size-5',
@@ -2905,9 +2963,9 @@ const notificationCard = tv({
2905
2963
  closeButton: statusRowCloseButton
2906
2964
  },
2907
2965
  variants: {
2908
- intent: {
2909
- default: {},
2910
- info: {},
2966
+ status: {
2967
+ neutral: {},
2968
+ primary: {},
2911
2969
  success: {},
2912
2970
  warning: {},
2913
2971
  danger: {}
@@ -2918,15 +2976,15 @@ const notificationCard = tv({
2918
2976
  // size. `text-neutral-firm` clears it comfortably against every
2919
2977
  // surface this description can sit on, light or dark, tonal or not.
2920
2978
  // See packages/frontile/docs/notifications-usage.md's contrast note for the measured ratios.
2921
- default: {
2979
+ surface: {
2922
2980
  base: 'bg-surface-modal border-surface-overlay-mild',
2923
2981
  description: 'text-neutral-firm'
2924
2982
  },
2925
- // The outer surface/border is intent-independent — every `tonal`
2926
- // compound variant below borrows the same neutral surface `default`
2927
- // uses (see the comment above the `tonal` compound variants), so it
2983
+ // The outer surface/border is status-independent — every `soft`
2984
+ // compound variant below borrows the same neutral surface `surface`
2985
+ // uses (see the comment above the `soft` compound variants), so it
2928
2986
  // lives here once instead of repeating in each of them.
2929
- tonal: {
2987
+ soft: {
2930
2988
  base: 'bg-surface-modal border-surface-overlay-mild',
2931
2989
  description: 'text-neutral-firm'
2932
2990
  },
@@ -2965,19 +3023,19 @@ const notificationCard = tv({
2965
3023
  }
2966
3024
  },
2967
3025
  compoundVariants: [
2968
- // default: neutral surface, colour carried by the icon and title.
2969
- // `default` intent has no accent — icon and title stay neutral, same
2970
- // `firm` level the other intents use for their accent text.
3026
+ // surface: neutral surface, colour carried by the icon and title.
3027
+ // `default` status has no accent — icon and title stay neutral, same
3028
+ // `firm` level the other statuses use for their accent text.
2971
3029
  {
2972
- variant: 'default',
2973
- intent: 'default',
3030
+ variant: 'surface',
3031
+ status: 'neutral',
2974
3032
  class: {
2975
3033
  icon: 'text-neutral-firm',
2976
3034
  title: 'text-neutral-firm'
2977
3035
  }
2978
3036
  }, {
2979
- variant: 'default',
2980
- intent: 'info',
3037
+ variant: 'surface',
3038
+ status: 'primary',
2981
3039
  class: {
2982
3040
  icon: 'text-primary',
2983
3041
  title: 'text-primary'
@@ -2986,8 +3044,8 @@ const notificationCard = tv({
2986
3044
  // `success-firm` is only ~2.3:1 on the white card surface in light
2987
3045
  // mode; `bolder` clears AA in both themes. See packages/frontile/docs/notifications-usage.md's
2988
3046
  // contrast note.
2989
- variant: 'default',
2990
- intent: 'success',
3047
+ variant: 'surface',
3048
+ status: 'success',
2991
3049
  class: {
2992
3050
  icon: 'text-success-bolder',
2993
3051
  title: 'text-success-bolder'
@@ -2996,64 +3054,61 @@ const notificationCard = tv({
2996
3054
  // `warning-firm` is only ~3:1 on the white card surface in light
2997
3055
  // mode; `bolder` clears AA in both themes. See packages/frontile/docs/notifications-usage.md's
2998
3056
  // contrast note.
2999
- variant: 'default',
3000
- intent: 'warning',
3057
+ variant: 'surface',
3058
+ status: 'warning',
3001
3059
  class: {
3002
3060
  icon: 'text-warning-bolder',
3003
3061
  title: 'text-warning-bolder'
3004
3062
  }
3005
3063
  }, {
3006
- variant: 'default',
3007
- intent: 'danger',
3064
+ variant: 'surface',
3065
+ status: 'danger',
3008
3066
  class: {
3009
3067
  icon: 'text-danger-firm',
3010
3068
  title: 'text-danger-firm'
3011
3069
  }
3012
3070
  },
3013
- // tonal: same recipe as Button's `appearance: 'tonal'` — an opaque
3014
- // outer surface (so the floating card never lets page content show
3015
- // through) with the translucent `{intent}-soft` tint and its `on-*`
3016
- // contrast ink applied to the *inner* element, which composites over
3017
- // that opaque surface. The outer picks up the `default` variant's
3018
- // neutral surface/border instead of a colour-matched one: Button's
3019
- // tonal has no border at all, but a card floating over arbitrary page
3020
- // content benefits from the same edge definition `default` already
3021
- // uses, so it borrows that treatment rather than inventing a new one.
3071
+ // soft: an opaque outer surface (so the floating card never lets page
3072
+ // content show through) with the translucent `{status}-soft` tint and its
3073
+ // `on-*` contrast ink applied to the *inner* element, which composites
3074
+ // over that opaque surface. The outer picks up the `surface` variant's
3075
+ // neutral surface/border instead of a colour-matched one, so it borrows
3076
+ // that treatment rather than inventing a new one.
3022
3077
  {
3023
- variant: 'tonal',
3024
- intent: 'default',
3078
+ variant: 'soft',
3079
+ status: 'neutral',
3025
3080
  class: {
3026
3081
  inner: 'bg-neutral-soft',
3027
3082
  icon: 'text-on-neutral-soft',
3028
3083
  title: 'text-on-neutral-soft'
3029
3084
  }
3030
3085
  }, {
3031
- variant: 'tonal',
3032
- intent: 'info',
3086
+ variant: 'soft',
3087
+ status: 'primary',
3033
3088
  class: {
3034
3089
  inner: 'bg-primary-soft',
3035
3090
  icon: 'text-on-primary-soft',
3036
3091
  title: 'text-on-primary-soft'
3037
3092
  }
3038
3093
  }, {
3039
- variant: 'tonal',
3040
- intent: 'success',
3094
+ variant: 'soft',
3095
+ status: 'success',
3041
3096
  class: {
3042
3097
  inner: 'bg-success-soft',
3043
3098
  icon: 'text-on-success-soft',
3044
3099
  title: 'text-on-success-soft'
3045
3100
  }
3046
3101
  }, {
3047
- variant: 'tonal',
3048
- intent: 'warning',
3102
+ variant: 'soft',
3103
+ status: 'warning',
3049
3104
  class: {
3050
3105
  inner: 'bg-warning-soft',
3051
3106
  icon: 'text-on-warning-soft',
3052
3107
  title: 'text-on-warning-soft'
3053
3108
  }
3054
3109
  }, {
3055
- variant: 'tonal',
3056
- intent: 'danger',
3110
+ variant: 'soft',
3111
+ status: 'danger',
3057
3112
  class: {
3058
3113
  inner: 'bg-danger-soft',
3059
3114
  icon: 'text-on-danger-soft',
@@ -3061,18 +3116,18 @@ const notificationCard = tv({
3061
3116
  }
3062
3117
  },
3063
3118
  // solid: filled surface, contrast text. `description` uses the
3064
- // full-strength `on-{intent}` ink rather than a translucent cut — see
3119
+ // full-strength `on-{status}` ink rather than a translucent cut — see
3065
3120
  // packages/frontile/docs/notifications-usage.md's contrast note for why
3066
3121
  // (a translucent cut used to fail WCAG AA here).
3067
3122
  //
3068
- // The spinner override matters because `@intent` on <Spinner> drives its
3069
- // arc via `fill-{intent}`, the exact same color as this variant's own
3070
- // `bg-{intent}` surface — left alone the arc would be camouflaged
3123
+ // The spinner override matters because `@status` on <Spinner> drives its
3124
+ // arc via `fill-{status}`, the exact same color as this variant's own
3125
+ // `bg-{status}` surface — left alone the arc would be camouflaged
3071
3126
  // against its own card, so `solid` forces both halves of the spinner to
3072
3127
  // the contrast ink instead.
3073
3128
  {
3074
3129
  variant: 'solid',
3075
- intent: 'default',
3130
+ status: 'neutral',
3076
3131
  class: {
3077
3132
  base: 'bg-neutral text-on-neutral',
3078
3133
  icon: 'text-on-neutral',
@@ -3082,7 +3137,7 @@ const notificationCard = tv({
3082
3137
  }
3083
3138
  }, {
3084
3139
  variant: 'solid',
3085
- intent: 'info',
3140
+ status: 'primary',
3086
3141
  class: {
3087
3142
  base: 'bg-primary text-on-primary',
3088
3143
  icon: 'text-on-primary',
@@ -3092,7 +3147,7 @@ const notificationCard = tv({
3092
3147
  }
3093
3148
  }, {
3094
3149
  variant: 'solid',
3095
- intent: 'success',
3150
+ status: 'success',
3096
3151
  class: {
3097
3152
  base: 'bg-success text-on-success',
3098
3153
  icon: 'text-on-success',
@@ -3102,7 +3157,7 @@ const notificationCard = tv({
3102
3157
  }
3103
3158
  }, {
3104
3159
  variant: 'solid',
3105
- intent: 'warning',
3160
+ status: 'warning',
3106
3161
  class: {
3107
3162
  base: 'bg-warning text-on-warning',
3108
3163
  icon: 'text-on-warning',
@@ -3112,7 +3167,7 @@ const notificationCard = tv({
3112
3167
  }
3113
3168
  }, {
3114
3169
  variant: 'solid',
3115
- intent: 'danger',
3170
+ status: 'danger',
3116
3171
  class: {
3117
3172
  base: 'bg-danger text-on-danger',
3118
3173
  icon: 'text-on-danger',
@@ -3122,8 +3177,8 @@ const notificationCard = tv({
3122
3177
  }
3123
3178
  }],
3124
3179
  defaultVariants: {
3125
- intent: 'default',
3126
- variant: 'default',
3180
+ status: 'neutral',
3181
+ variant: 'surface',
3127
3182
  hasDescription: false,
3128
3183
  stackPlacement: 'none'
3129
3184
  }
@@ -3168,7 +3223,9 @@ const formFeedback = tv({
3168
3223
  // validation/feedback text — body role
3169
3224
  base: 'font-body text-body-2xs pt-1',
3170
3225
  variants: {
3171
- intent: {
3226
+ // `status`, not `color`: this value also decides whether the message is
3227
+ // announced assertively. See `isError` in form-feedback.gts.
3228
+ status: {
3172
3229
  primary: 'text-primary',
3173
3230
  secondary: 'text-secondary',
3174
3231
  tertiary: 'text-tertiary',
@@ -3567,6 +3624,60 @@ const select = tv({
3567
3624
  }
3568
3625
  });
3569
3626
 
3627
+ // Extends `input` directly rather than `select`, even though the two look
3628
+ // alike. tv() loses slot types across a two-level extend, and
3629
+ // input -> select -> datePicker would be that second level; the shared
3630
+ // appearance comes from the common base instead.
3631
+ const datePicker = tv({
3632
+ extend: input,
3633
+ slots: {
3634
+ base: [],
3635
+ placeholder: 'text-neutral',
3636
+ input: 'cursor-default text-left',
3637
+ // The calendar sits in the popover, which supplies its own surface and
3638
+ // padding, so this only reserves room around the grid.
3639
+ calendar: 'p-2',
3640
+ // `border-default` is not a generated utility -- there is no `default`
3641
+ // semantic level. `border-neutral-soft` is the same divider treatment
3642
+ // `command.ts` uses to separate a footer from the content above it.
3643
+ // `w-0 min-w-full` keeps the footer out of the popover's intrinsic width:
3644
+ // the popover is sized `auto`, so it takes the width of its widest child,
3645
+ // and a row of preset buttons would otherwise stretch it well past the
3646
+ // calendar. Contributing zero and then filling the resolved width lets the
3647
+ // calendar decide how wide the popover is, and the buttons wrap within it.
3648
+ footer: ['flex flex-wrap items-center gap-2', 'w-0 min-w-full', 'border-t border-neutral-soft p-2'],
3649
+ icon: 'w-5 h-5',
3650
+ clearButton: 'pointer-events-auto'
3651
+ },
3652
+ variants: {
3653
+ // The trigger is a `<button>` whose text *is* the value, so with neither a
3654
+ // value nor a `@placeholder` it has no content at all and collapses to its
3655
+ // padding -- noticeably shorter than every other field on the form.
3656
+ // (Select hit the same thing once chips took over its trigger's content.)
3657
+ //
3658
+ // The floor has to be stated per size, and as a border-box total: Tailwind
3659
+ // sets `box-sizing: border-box`, so a bare `min-h-5` is already satisfied
3660
+ // by the padding alone and does nothing. Each value is one line of
3661
+ // `text-base`/`leading-tight` (1.25rem) plus that size's vertical padding
3662
+ // plus the 1px borders -- i.e. exactly the height the field has once it
3663
+ // holds a single line of text.
3664
+ size: {
3665
+ sm: {
3666
+ input: 'min-h-[calc(1.25rem+1rem+2px)]'
3667
+ },
3668
+ md: {
3669
+ input: 'min-h-[calc(1.25rem+1.5rem+2px)]'
3670
+ },
3671
+ lg: {
3672
+ input: 'min-h-[calc(1.25rem+2rem+2px)]'
3673
+ }
3674
+ }
3675
+ },
3676
+ defaultVariants: {
3677
+ size: 'md'
3678
+ }
3679
+ });
3680
+
3570
3681
  // Note: extends `input` rather than `select` because tailwind-variants
3571
3682
  // loses inherited slot types across two levels of `extend`.
3572
3683
  const autocomplete = tv({
@@ -3655,8 +3766,8 @@ const switchInput = tv({
3655
3766
  label: 'text-lg'
3656
3767
  }
3657
3768
  },
3658
- intent: {
3659
- default: {
3769
+ color: {
3770
+ neutral: {
3660
3771
  wrapper: ['group-data-[selected=true]:bg-neutral-firm', 'group-data-[selected=true]:text-on-neutral-firm']
3661
3772
  },
3662
3773
  primary: {
@@ -3681,7 +3792,7 @@ const switchInput = tv({
3681
3792
  },
3682
3793
  defaultVariants: {
3683
3794
  size: 'md',
3684
- intent: 'primary',
3795
+ color: 'primary',
3685
3796
  isDisabled: false
3686
3797
  }
3687
3798
  });
@@ -3822,6 +3933,7 @@ var components = /*#__PURE__*/Object.freeze({
3822
3933
  closeButton: closeButton,
3823
3934
  command: command,
3824
3935
  commandDialog: commandDialog,
3936
+ datePicker: datePicker,
3825
3937
  divider: divider,
3826
3938
  drawer: drawer,
3827
3939
  dropdownContent: dropdownContent,