@frontile/theme 0.18.0-alpha.14 → 0.18.0-alpha.16

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 (33) hide show
  1. package/declarations/colors/types.d.ts +23 -2
  2. package/declarations/components/avatar.d.ts +8 -8
  3. package/declarations/components/button.d.ts +40 -40
  4. package/declarations/components/chip.d.ts +58 -43
  5. package/declarations/components/close-button.d.ts +8 -8
  6. package/declarations/components/divider.d.ts +8 -8
  7. package/declarations/components/dropdown.d.ts +10 -10
  8. package/declarations/components/forms/forms-legacy.d.ts +96 -96
  9. package/declarations/components/forms/forms.d.ts +342 -172
  10. package/declarations/components/listbox.d.ts +16 -16
  11. package/declarations/components/notification-card.d.ts +8 -8
  12. package/declarations/components/notifications-container.d.ts +8 -8
  13. package/declarations/components/overlays.d.ts +32 -32
  14. package/declarations/components/popover.d.ts +10 -10
  15. package/declarations/components/progress-bar.d.ts +8 -8
  16. package/declarations/components/skeleton.d.ts +8 -8
  17. package/declarations/components/spinner.d.ts +8 -8
  18. package/declarations/components/table.d.ts +8 -8
  19. package/declarations/tw.d.ts +8 -8
  20. package/declarations/types.d.ts +18 -1
  21. package/dist/colors.js +1 -1
  22. package/dist/{config-B7ki0xcw.js → config-BZyMPeuH.js} +5 -8
  23. package/dist/config-BZyMPeuH.js.map +1 -0
  24. package/dist/{forms-legacy-CmzotfYT.js → forms-legacy-D7knB8hB.js} +287 -76
  25. package/dist/forms-legacy-D7knB8hB.js.map +1 -0
  26. package/dist/index.js +2 -2
  27. package/dist/plugin.js +2 -2
  28. package/package.json +2 -2
  29. package/src/index.css +10 -10
  30. package/src/styles/theme.css +18 -7
  31. package/src/styles/typography.css +36 -29
  32. package/dist/config-B7ki0xcw.js.map +0 -1
  33. package/dist/forms-legacy-CmzotfYT.js.map +0 -1
@@ -21,7 +21,7 @@ const clsx = (...classes) => {
21
21
  };
22
22
 
23
23
  // Common size units used across all design tokens (icons, typography, etc.)
24
- const COMMON_UNITS = ['pico', 'nano', 'micro', '3xs', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'kilo', 'mega'];
24
+ const COMMON_UNITS = ['pico', 'nano', 'micro', '5xs', '4xs', '3xs', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', 'kilo', 'mega'];
25
25
  const ELEVATION_LEVELS = ['0', '1', '2', '3', '4', '5'];
26
26
  const twMergeConfig = {
27
27
  extend: {
@@ -362,41 +362,49 @@ const toggleButton = tv({
362
362
  true: ''
363
363
  }
364
364
  },
365
+ // Selected is a *filled* state, so every color has to be restated here —
366
+ // fill, border and ink, for the resting, hover and active steps. The
367
+ // unselected `outlined` rules in `baseButton` set their own
368
+ // `hover:text-*`/`active:*` colors, and anything we leave out keeps leaking
369
+ // through: an unselected ink color over a selected fill is what produced the
370
+ // unreadable label on hover. The ramp matches the filled button
371
+ // (`appearance: 'default'`) — one step deeper on hover, another on active —
372
+ // and pairs each fill with its generated `on-*` contrast ink.
365
373
  compoundVariants: [{
366
374
  appearance: 'outlined',
367
375
  intent: 'default',
368
376
  isSelected: true,
369
- class: 'bg-neutral-bolder text-on-neutral-bolder hover:bg-neutral-bolder'
377
+ 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'
370
378
  }, {
371
379
  appearance: 'outlined',
372
380
  intent: 'primary',
373
381
  isSelected: true,
374
- class: 'bg-primary text-on-primary hover:bg-primary-soft'
382
+ 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'
375
383
  }, {
376
384
  appearance: 'outlined',
377
385
  intent: 'secondary',
378
386
  isSelected: true,
379
- class: 'bg-secondary text-on-secondary hover:bg-secondary-soft'
387
+ 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'
380
388
  }, {
381
389
  appearance: 'outlined',
382
390
  intent: 'tertiary',
383
391
  isSelected: true,
384
- class: 'bg-tertiary text-on-tertiary hover:bg-tertiary-soft'
392
+ 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'
385
393
  }, {
386
394
  appearance: 'outlined',
387
395
  intent: 'success',
388
396
  isSelected: true,
389
- class: 'bg-success text-on-success hover:bg-success-soft'
397
+ 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'
390
398
  }, {
391
399
  appearance: 'outlined',
392
400
  intent: 'warning',
393
401
  isSelected: true,
394
- class: 'bg-warning text-on-warning hover:bg-warning-soft'
402
+ 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'
395
403
  }, {
396
404
  appearance: 'outlined',
397
405
  intent: 'danger',
398
406
  isSelected: true,
399
- class: 'bg-danger text-on-danger hover:bg-danger-soft'
407
+ 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'
400
408
  }]
401
409
  });
402
410
  const buttonGroup = tv({
@@ -405,65 +413,76 @@ const buttonGroup = tv({
405
413
 
406
414
  const chip = tv({
407
415
  slots: {
408
- base: ['disabled:cursor-not-allowed', 'disabled:opacity-disabled', 'whitespace-nowrap', 'inline-flex items-center justify-between box-border'],
416
+ base: ['whitespace-nowrap', 'inline-flex items-center justify-between box-border'],
409
417
  // label text role (size set per size variant)
410
418
  content: ['flex-1 text-inherit font-label'],
411
- dot: ['w-2', 'h-2', 'ml-1', 'rounded-full'],
412
- closeButton: ['p-0.5']
419
+ dot: ['shrink-0', 'ml-1', 'rounded-full'],
420
+ closeButton: ['shrink-0', 'p-0.5',
421
+ // The shared ring is drawn with a background-coloured offset, which
422
+ // inside a chip reads as a hole punched in the chip.
423
+ 'focus-visible:ring-2 focus-visible:ring-offset-0', 'disabled:cursor-not-allowed']
413
424
  },
414
425
  variants: {
415
426
  isDisabled: {
416
- true: 'opacity-disabled'
427
+ true: 'opacity-disabled cursor-not-allowed'
417
428
  },
418
429
  appearance: {
419
430
  default: '',
420
431
  outlined: '',
421
432
  faded: ''
422
433
  },
434
+ // The close button is a filled circle in every appearance. `-muted` is
435
+ // light enough to sit on the page in `outlined`/`faded` and to read as a
436
+ // disc on a filled chip, and each level carries its own `on-` colour — the
437
+ // pairing this used to get wrong, by putting `text-on-{intent}` (the
438
+ // contrast colour for the DEFAULT level) on a `-muted` circle.
423
439
  intent: {
424
440
  default: {
425
441
  dot: 'bg-neutral-strong',
426
- closeButton: ['bg-neutral-muted', 'text-on-neutral', 'hover:bg-neutral']
442
+ closeButton: 'bg-neutral-muted text-on-neutral-muted'
427
443
  },
428
444
  primary: {
429
445
  dot: 'bg-primary',
430
- closeButton: ['bg-primary-muted', 'text-on-primary', 'hover:bg-primary-firm', 'focus-visible:ring-primary-soft']
446
+ closeButton: 'bg-primary-muted text-on-primary-muted'
431
447
  },
432
448
  secondary: {
433
449
  dot: 'bg-secondary',
434
- closeButton: ['bg-secondary-muted', 'text-on-secondary', 'hover:bg-secondary-firm', 'focus-visible:ring-secondary-soft']
450
+ closeButton: 'bg-secondary-muted text-on-secondary-muted'
435
451
  },
436
452
  tertiary: {
437
453
  dot: 'bg-tertiary',
438
- closeButton: ['bg-tertiary-muted', 'text-on-tertiary', 'hover:bg-tertiary-firm', 'focus-visible:ring-tertiary-soft']
454
+ closeButton: 'bg-tertiary-muted text-on-tertiary-muted'
439
455
  },
440
456
  success: {
441
457
  dot: 'bg-success',
442
- closeButton: ['bg-success-muted', 'text-on-success', 'hover:bg-success-firm', 'focus-visible:ring-success-soft']
458
+ closeButton: 'bg-success-muted text-on-success-muted'
443
459
  },
444
460
  warning: {
445
461
  dot: 'bg-warning',
446
- closeButton: ['bg-warning-muted', 'text-on-warning', 'hover:bg-warning-firm', 'focus-visible:ring-warning-soft']
462
+ closeButton: 'bg-warning-muted text-on-warning-muted'
447
463
  },
448
464
  danger: {
449
465
  dot: 'bg-danger',
450
- closeButton: ['bg-danger-muted', 'text-on-danger', 'hover:bg-danger-firm', 'focus-visible:ring-danger-soft']
466
+ closeButton: 'bg-danger-muted text-on-danger-muted'
451
467
  }
452
468
  },
453
469
  size: {
454
470
  sm: {
455
471
  base: 'text-label-2xs px-1 h-6',
456
472
  content: 'px-1',
473
+ dot: 'size-1.5',
457
474
  closeButton: 'text-label-2xs'
458
475
  },
459
476
  md: {
460
477
  base: 'text-label-xs px-1 h-7',
461
478
  content: 'px-2',
479
+ dot: 'size-2',
462
480
  closeButton: 'text-label-xs'
463
481
  },
464
482
  lg: {
465
483
  base: 'text-label-md px-2 h-8',
466
484
  content: 'px-2',
485
+ dot: 'size-2.5',
467
486
  closeButton: 'text-label-md'
468
487
  }
469
488
  },
@@ -475,48 +494,68 @@ const chip = tv({
475
494
  }
476
495
  },
477
496
  compoundVariants: [
497
+ // A filled chip's background *is* the intent colour, so an intent-coloured
498
+ // dot disappears into it. Inherit the chip's text colour instead — the one
499
+ // colour guaranteed to contrast the fill.
500
+ {
501
+ appearance: 'default',
502
+ class: {
503
+ dot: 'bg-current'
504
+ }
505
+ },
478
506
  // APPEARANCE: default (filled)
507
+ //
508
+ // The chip's own fill is the intent's DEFAULT level, so the close button
509
+ // cannot hover *towards* it the way the other two appearances do — the
510
+ // circle would vanish into the chip. It steps down to `-subtle` instead.
479
511
  {
480
512
  appearance: 'default',
481
513
  intent: 'default',
482
514
  class: {
483
- base: 'bg-neutral-bolder text-on-neutral-bolder'
515
+ base: 'bg-neutral-bolder text-on-neutral-bolder',
516
+ closeButton: 'hover:bg-neutral-subtle hover:text-on-neutral-subtle'
484
517
  }
485
518
  }, {
486
519
  appearance: 'default',
487
520
  intent: 'primary',
488
521
  class: {
489
- base: 'bg-primary text-on-primary'
522
+ base: 'bg-primary text-on-primary',
523
+ closeButton: 'hover:bg-primary-subtle hover:text-on-primary-subtle'
490
524
  }
491
525
  }, {
492
526
  appearance: 'default',
493
527
  intent: 'secondary',
494
528
  class: {
495
- base: 'bg-secondary text-on-secondary'
529
+ base: 'bg-secondary text-on-secondary',
530
+ closeButton: 'hover:bg-secondary-subtle hover:text-on-secondary-subtle'
496
531
  }
497
532
  }, {
498
533
  appearance: 'default',
499
534
  intent: 'tertiary',
500
535
  class: {
501
- base: 'bg-tertiary text-on-tertiary'
536
+ base: 'bg-tertiary text-on-tertiary',
537
+ closeButton: 'hover:bg-tertiary-subtle hover:text-on-tertiary-subtle'
502
538
  }
503
539
  }, {
504
540
  appearance: 'default',
505
541
  intent: 'success',
506
542
  class: {
507
- base: 'bg-success text-on-success'
543
+ base: 'bg-success text-on-success',
544
+ closeButton: 'hover:bg-success-subtle hover:text-on-success-subtle'
508
545
  }
509
546
  }, {
510
547
  appearance: 'default',
511
548
  intent: 'warning',
512
549
  class: {
513
- base: 'bg-warning text-on-warning'
550
+ base: 'bg-warning text-on-warning',
551
+ closeButton: 'hover:bg-warning-subtle hover:text-on-warning-subtle'
514
552
  }
515
553
  }, {
516
554
  appearance: 'default',
517
555
  intent: 'danger',
518
556
  class: {
519
- base: 'bg-danger text-on-danger'
557
+ base: 'bg-danger text-on-danger',
558
+ closeButton: 'hover:bg-danger-subtle hover:text-on-danger-subtle'
520
559
  }
521
560
  },
522
561
  // APPEARANCE: faded (tonal)
@@ -524,43 +563,50 @@ const chip = tv({
524
563
  appearance: 'faded',
525
564
  intent: 'default',
526
565
  class: {
527
- base: 'text-neutral-strong bg-neutral-subtle'
566
+ base: 'text-neutral-strong bg-neutral-subtle',
567
+ closeButton: 'hover:bg-neutral hover:text-on-neutral'
528
568
  }
529
569
  }, {
530
570
  appearance: 'faded',
531
571
  intent: 'primary',
532
572
  class: {
533
- base: 'text-primary-strong bg-primary-subtle'
573
+ base: 'text-primary-strong bg-primary-subtle',
574
+ closeButton: 'hover:bg-primary hover:text-on-primary'
534
575
  }
535
576
  }, {
536
577
  appearance: 'faded',
537
578
  intent: 'secondary',
538
579
  class: {
539
- base: 'text-secondary-strong bg-secondary-subtle'
580
+ base: 'text-secondary-strong bg-secondary-subtle',
581
+ closeButton: 'hover:bg-secondary hover:text-on-secondary'
540
582
  }
541
583
  }, {
542
584
  appearance: 'faded',
543
585
  intent: 'tertiary',
544
586
  class: {
545
- base: 'text-tertiary-strong bg-tertiary-subtle'
587
+ base: 'text-tertiary-strong bg-tertiary-subtle',
588
+ closeButton: 'hover:bg-tertiary hover:text-on-tertiary'
546
589
  }
547
590
  }, {
548
591
  appearance: 'faded',
549
592
  intent: 'success',
550
593
  class: {
551
- base: 'text-success-strong bg-success-subtle'
594
+ base: 'text-success-strong bg-success-subtle',
595
+ closeButton: 'hover:bg-success hover:text-on-success'
552
596
  }
553
597
  }, {
554
598
  appearance: 'faded',
555
599
  intent: 'warning',
556
600
  class: {
557
- base: 'text-warning-strong bg-warning-subtle'
601
+ base: 'text-warning-strong bg-warning-subtle',
602
+ closeButton: 'hover:bg-warning hover:text-on-warning'
558
603
  }
559
604
  }, {
560
605
  appearance: 'faded',
561
606
  intent: 'danger',
562
607
  class: {
563
- base: 'text-danger-strong bg-danger-subtle'
608
+ base: 'text-danger-strong bg-danger-subtle',
609
+ closeButton: 'hover:bg-danger hover:text-on-danger'
564
610
  }
565
611
  },
566
612
  // APPEARANCE: outlined
@@ -568,43 +614,50 @@ const chip = tv({
568
614
  appearance: 'outlined',
569
615
  intent: 'default',
570
616
  class: {
571
- base: 'text-neutral-strong border border-neutral'
617
+ base: 'text-neutral-strong border border-neutral',
618
+ closeButton: 'hover:bg-neutral hover:text-on-neutral'
572
619
  }
573
620
  }, {
574
621
  appearance: 'outlined',
575
622
  intent: 'primary',
576
623
  class: {
577
- base: 'text-primary-strong border border-primary'
624
+ base: 'text-primary-strong border border-primary',
625
+ closeButton: 'hover:bg-primary hover:text-on-primary'
578
626
  }
579
627
  }, {
580
628
  appearance: 'outlined',
581
629
  intent: 'secondary',
582
630
  class: {
583
- base: 'text-secondary-strong border border-secondary'
631
+ base: 'text-secondary-strong border border-secondary',
632
+ closeButton: 'hover:bg-secondary hover:text-on-secondary'
584
633
  }
585
634
  }, {
586
635
  appearance: 'outlined',
587
636
  intent: 'tertiary',
588
637
  class: {
589
- base: 'text-tertiary-strong border border-tertiary'
638
+ base: 'text-tertiary-strong border border-tertiary',
639
+ closeButton: 'hover:bg-tertiary hover:text-on-tertiary'
590
640
  }
591
641
  }, {
592
642
  appearance: 'outlined',
593
643
  intent: 'success',
594
644
  class: {
595
- base: 'text-success-strong border border-success'
645
+ base: 'text-success-strong border border-success',
646
+ closeButton: 'hover:bg-success hover:text-on-success'
596
647
  }
597
648
  }, {
598
649
  appearance: 'outlined',
599
650
  intent: 'warning',
600
651
  class: {
601
- base: 'text-warning-strong border border-warning'
652
+ base: 'text-warning-strong border border-warning',
653
+ closeButton: 'hover:bg-warning hover:text-on-warning'
602
654
  }
603
655
  }, {
604
656
  appearance: 'outlined',
605
657
  intent: 'danger',
606
658
  class: {
607
- base: 'text-danger-strong border border-danger'
659
+ base: 'text-danger-strong border border-danger',
660
+ closeButton: 'hover:bg-danger hover:text-on-danger'
608
661
  }
609
662
  }],
610
663
  defaultVariants: {
@@ -620,7 +673,7 @@ const progressBar = tv({
620
673
  base: ['overflow-hidden w-full bg-surface-overlay-soft'],
621
674
  label: ['flex justify-between pb-1 gap-2 font-label text-label-sm'],
622
675
  progress: [''],
623
- description: ['text-neutral font-body text-body-micro pb-1']
676
+ description: ['text-neutral font-body text-body-2xs pb-1']
624
677
  },
625
678
  variants: {
626
679
  isIndeterminate: {
@@ -656,7 +709,7 @@ const progressBar = tv({
656
709
  base: 'h-1',
657
710
  progress: 'h-1',
658
711
  label: 'text-label-2xs',
659
- description: 'text-body-micro'
712
+ description: 'text-body-2xs'
660
713
  },
661
714
  sm: {
662
715
  base: 'h-2',
@@ -732,10 +785,10 @@ const listbox = tv({
732
785
  });
733
786
  const listboxItem = tv({
734
787
  slots: {
735
- base: ['flex', 'group', 'gap-2', 'items-center', 'justify-between', 'relative', 'px-2', 'py-1.5', 'w-full', 'h-full', 'box-border', 'rounded-sm', 'subpixel-antialiased', 'outline-hidden', 'cursor-pointer', 'tap-highlight-transparent'],
788
+ base: ['flex', 'group', 'gap-2', 'items-center', 'justify-between', 'relative', 'px-2', 'py-1.5', 'w-full', 'h-full', 'box-border', 'rounded-lg', 'subpixel-antialiased', 'outline-hidden', 'cursor-pointer', 'tap-highlight-transparent'],
736
789
  descriptionWrapper: 'w-full flex flex-col items-start justify-center',
737
790
  label: 'flex-1 font-body text-body-2xs truncate',
738
- description: ['w-full', 'font-body text-body-micro', 'text-neutral-firm', 'group-hover:text-current'],
791
+ description: ['w-full', 'font-body text-body-2xs', 'text-neutral-firm', 'group-hover:text-current'],
739
792
  selectedIcon: ['text-inherit', 'w-4', 'h-4', 'shrink-0'],
740
793
  shortcut: ['px-1', 'py-0.5', 'rounded-sm', 'font-label', 'text-neutral', 'text-label-2xs', 'border', 'border-neutral-soft', 'group-data-is-active:border-current']
741
794
  },
@@ -970,11 +1023,11 @@ const listboxItem = tv({
970
1023
  });
971
1024
 
972
1025
  const dropdownContent = tv({
973
- base: 'bg-surface-input w-[260px] rounded-sm border border-neutral-subtle'
1026
+ base: 'bg-surface-input w-[260px] rounded-xl border border-neutral-subtle'
974
1027
  });
975
1028
 
976
1029
  const popover = tv({
977
- base: 'bg-surface-input rounded-sm border border-neutral-subtle',
1030
+ base: 'bg-surface-input rounded-xl border border-neutral-subtle',
978
1031
  variants: {
979
1032
  size: {
980
1033
  sm: 'w-40',
@@ -1117,11 +1170,30 @@ const spinner = tv({
1117
1170
  const table = tv({
1118
1171
  slots: {
1119
1172
  base: ['w-full', 'caption-bottom', 'font-body text-body-2xs'],
1120
- wrapper: ['relative', 'isolate', 'overflow-auto', 'rounded-default', 'bg-surface-card'],
1173
+ wrapper: ['relative', 'isolate', 'overflow-auto', 'rounded-default',
1174
+ // `surface-table` rather than `surface-card`, which the table otherwise
1175
+ // looks exactly like: every sticky part of the table paints over the rows
1176
+ // and columns scrolling beneath it, and in dark `card` is a translucent
1177
+ // veil that would let them read through. The role carries the colour that
1178
+ // veil renders, with the alpha already resolved. Override
1179
+ // `--color-surface-table` to sit a table on a different background.
1180
+ 'bg-surface-table'],
1121
1181
  table: ['w-full', 'table-auto'],
1122
1182
  thead: ['relative', 'bg-surface-overlay-subtle'],
1123
- tbody: ['divide-y', 'divide-surface-overlay-subtle', '[&>tr]:data-[selectable=true]:data-[selected=false]:hover:bg-neutral-subtle', '[&>tr]:data-[selectable=true]:transition-colors'],
1124
- tfoot: ['relative'],
1183
+ tbody: ['divide-y', 'divide-surface-overlay-subtle',
1184
+ // Rows carry the surface themselves rather than letting the wrapper show
1185
+ // through: a sticky row has to hide the rows sliding under it, and a
1186
+ // sticky cell picks its fill up from its row via `background-color:
1187
+ // inherit`. Row tints layer on top of this, and any tint that replaces it
1188
+ // has to be opaque too — see `striped` and the selection variants.
1189
+ '[&>tr]:bg-surface-table',
1190
+ // `muted`, not `subtle`: in dark `neutral-subtle` is gray-900, the same
1191
+ // value `surface-table` carries, so a `subtle` hover reads as no hover at
1192
+ // all. This stays a background *colour* so `transition-colors` animates it.
1193
+ '[&>tr]:data-[selectable=true]:data-[selected=false]:hover:bg-neutral-muted', '[&>tr]:data-[selectable=true]:transition-colors'],
1194
+ // Footer rows take the surface for the same reason body rows do: a sticky
1195
+ // column in the footer scrolls past the cells to its side.
1196
+ tfoot: ['relative', '[&>tr]:bg-surface-table'],
1125
1197
  tr: ['data-[disabled=true]:opacity-50', 'data-[disabled=true]:cursor-not-allowed', 'data-[disabled=true]:hover:bg-transparent', 'data-[selectable=true]:focus-visible:ring-2', 'data-[selectable=true]:focus-visible:ring-inset', 'data-[selectable=true]:focus-visible:ring-default', 'data-[selectable=true]:focus-visible:z-10', 'transition-colors', 'duration-150', 'outline-hidden'],
1126
1198
  separator: ['absolute', 'z-2', 'left-0', 'w-full', 'h-px', 'bg-surface-overlay-mild'],
1127
1199
  th: ['h-12', 'px-4', 'text-left', 'align-middle', 'font-label', 'text-neutral-bolder', '[&:has([role=checkbox])]:pr-0', 'data-[sortable=true]:cursor-pointer'],
@@ -1145,7 +1217,7 @@ const table = tv({
1145
1217
  size: {
1146
1218
  sm: {
1147
1219
  th: 'h-10 px-3 py-2 text-label-2xs',
1148
- td: 'px-3 py-2 text-body-micro'
1220
+ td: 'px-3 py-2 text-body-2xs'
1149
1221
  },
1150
1222
  md: {
1151
1223
  th: 'h-12 px-4 text-label-xs',
@@ -1189,7 +1261,10 @@ const table = tv({
1189
1261
  },
1190
1262
  striped: {
1191
1263
  true: {
1192
- tbody: '[&_tr:nth-child(odd)]:bg-surface-overlay-subtle'
1264
+ // A translucent tint, so it goes on as a background *image* layer over
1265
+ // the row's opaque fill instead of replacing it. Painting it as the
1266
+ // background colour would make every striped sticky row see-through.
1267
+ tbody: '[&_tr:nth-child(odd)]:[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'
1193
1268
  }
1194
1269
  },
1195
1270
  isSticky: {
@@ -1219,9 +1294,10 @@ const table = tv({
1219
1294
  isSticky: true,
1220
1295
  stickyPosition: 'top',
1221
1296
  class: {
1222
- // `surface-card` is translucent in dark, which would let rows show
1223
- // through a stuck header; `surface-canvas` is opaque in both schemes.
1224
- thead: ['sticky', 'top-0', 'z-2', 'bg-surface-canvas']
1297
+ // The opaque surface plus the header's own translucent tint as a layer
1298
+ // above it, which is what a non-sticky `thead` composites to over the
1299
+ // wrapper — so stuck and unstuck headers read as the same colour.
1300
+ thead: ['sticky', 'top-0', 'z-2', 'bg-surface-table', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]']
1225
1301
  }
1226
1302
  },
1227
1303
  // Sticky footer
@@ -1229,23 +1305,26 @@ const table = tv({
1229
1305
  isSticky: true,
1230
1306
  stickyPosition: 'bottom',
1231
1307
  class: {
1232
- tfoot: ['sticky', 'bottom-0', 'z-2', 'bg-surface-card']
1308
+ tfoot: ['sticky', 'bottom-0', 'z-2', 'bg-surface-table']
1233
1309
  }
1234
1310
  },
1235
- // Sticky columns - medium priority, header cells get higher z-index
1311
+ // Sticky columns - medium priority, header cells get higher z-index.
1312
+ // Body and footer cells inherit their row's paint — fill, and any tint
1313
+ // layered over it — so a pinned column tracks selection, hover and striping
1314
+ // instead of masking them with a surface of its own.
1236
1315
  {
1237
1316
  isSticky: true,
1238
1317
  stickyPosition: 'left',
1239
1318
  class: {
1240
- th: ['sticky', 'left-0', 'z-3', 'bg-surface-card', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
1241
- td: ['sticky', 'left-0', 'z-1', 'bg-surface-card']
1319
+ th: ['sticky', 'left-0', 'z-3', 'bg-surface-table', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
1320
+ td: ['sticky', 'left-0', 'z-1', 'bg-inherit', '[background-image:inherit]']
1242
1321
  }
1243
1322
  }, {
1244
1323
  isSticky: true,
1245
1324
  stickyPosition: 'right',
1246
1325
  class: {
1247
- th: ['sticky', 'right-0', 'z-3', 'bg-surface-card', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
1248
- td: ['sticky', 'right-0', 'z-1', 'bg-surface-card']
1326
+ th: ['sticky', 'right-0', 'z-3', 'bg-surface-table', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
1327
+ td: ['sticky', 'right-0', 'z-1', 'bg-inherit', '[background-image:inherit]']
1249
1328
  }
1250
1329
  },
1251
1330
  // Sticky rows - base layer
@@ -1253,13 +1332,13 @@ const table = tv({
1253
1332
  isSticky: true,
1254
1333
  stickyPosition: 'top',
1255
1334
  class: {
1256
- tr: ['sticky', 'top-0', 'z-1', 'bg-surface-card']
1335
+ tr: ['sticky', 'top-0', 'z-1', 'bg-surface-table']
1257
1336
  }
1258
1337
  }, {
1259
1338
  isSticky: true,
1260
1339
  stickyPosition: 'bottom',
1261
1340
  class: {
1262
- tr: ['sticky', 'bottom-0', 'z-1', 'bg-surface-card']
1341
+ tr: ['sticky', 'bottom-0', 'z-1', 'bg-surface-table']
1263
1342
  }
1264
1343
  },
1265
1344
  // Sticky rows with sticky header - position after header
@@ -1268,7 +1347,7 @@ const table = tv({
1268
1347
  stickyPosition: 'top',
1269
1348
  hasStickyHeader: true,
1270
1349
  class: {
1271
- tr: ['sticky', 'z-2', 'bg-surface-card', '[&.sticky]:[top:var(--table-header-height,48px)]']
1350
+ tr: ['sticky', 'z-2', 'bg-surface-table', '[&.sticky]:[top:var(--table-header-height,48px)]']
1272
1351
  }
1273
1352
  },
1274
1353
  // Intersection cells: sticky column + sticky row - highest z-index
@@ -1277,14 +1356,14 @@ const table = tv({
1277
1356
  stickyPosition: 'left',
1278
1357
  isInStickyRow: true,
1279
1358
  class: {
1280
- td: ['sticky', 'left-0', 'z-2', 'bg-surface-card']
1359
+ td: ['sticky', 'left-0', 'z-2', 'bg-inherit', '[background-image:inherit]']
1281
1360
  }
1282
1361
  }, {
1283
1362
  isSticky: true,
1284
1363
  stickyPosition: 'right',
1285
1364
  isInStickyRow: true,
1286
1365
  class: {
1287
- td: ['sticky', 'right-0', 'z-2', 'bg-surface-card']
1366
+ td: ['sticky', 'right-0', 'z-2', 'bg-inherit', '[background-image:inherit]']
1288
1367
  }
1289
1368
  },
1290
1369
  // Loading states with color variants
@@ -1323,7 +1402,15 @@ const table = tv({
1323
1402
  {
1324
1403
  selectionColor: 'default',
1325
1404
  class: {
1326
- tbody: '[&>tr]:data-[selected=true]:bg-neutral-subtle/50',
1405
+ // Half-opacity, so it layers over the row's fill rather than replacing
1406
+ // it — a selected sticky row still has to occlude what scrolls under.
1407
+ // The other selection colours are opaque and can stay plain fills.
1408
+ //
1409
+ // `soft` rather than `subtle`, which in dark is the same value as
1410
+ // `surface-table` and so tints nothing. At 50% this lands on the weight
1411
+ // the colour variants carry (1.4:1 against the surface, against
1412
+ // `primary-subtle`'s 1.38:1).
1413
+ tbody: '[&>tr]:data-[selected=true]:[background-image:linear-gradient(color-mix(in_oklab,var(--color-neutral-soft)_50%,transparent),color-mix(in_oklab,var(--color-neutral-soft)_50%,transparent))]',
1327
1414
  tr: ['data-[selectable=true]:focus-visible:ring-default']
1328
1415
  }
1329
1416
  }, {
@@ -1379,10 +1466,10 @@ const notificationsContainer = tv({
1379
1466
  const btn = ['transition transition-200', ...focusVisibleRing];
1380
1467
  const notificationCard = tv({
1381
1468
  slots: {
1382
- base: 'py-3 px-4 overflow-hidden flex items-center justify-between relative min-h-16 font-body text-body-2xs rounded-sm shadow-sm transition-all transition-200 ease-in-out',
1469
+ base: 'py-3 px-4 overflow-hidden flex items-center justify-between relative min-h-16 font-body text-body-2xs rounded-xl shadow-sm transition-all transition-200 ease-in-out',
1383
1470
  message: 'grow',
1384
1471
  customActions: 'flex flex-nowrap',
1385
- customActionButton: [...btn, 'first:ml-4 last:-mr-2 font-label text-label-xs py-1 px-2 rounded-sm hover:bg-surface-overlay-soft'],
1472
+ customActionButton: [...btn, 'first:ml-4 last:-mr-2 font-label text-label-xs py-1 px-2 rounded-md hover:bg-surface-overlay-soft'],
1386
1473
  closeButton: [...btn, 'inline-block p-2 ml-2 -mr-2 rounded-full hover:bg-surface-overlay-soft']
1387
1474
  },
1388
1475
  variants: {
@@ -1714,10 +1801,10 @@ const label = tv({
1714
1801
  });
1715
1802
  const formDescription = tv({
1716
1803
  // help/description text — body role
1717
- base: 'text-neutral font-body text-body-micro pb-1 last:pb-0',
1804
+ base: 'text-neutral font-body text-body-2xs pb-1 last:pb-0',
1718
1805
  variants: {
1719
1806
  size: {
1720
- sm: 'text-body-micro',
1807
+ sm: 'text-body-2xs',
1721
1808
  md: '',
1722
1809
  lg: 'text-body-sm'
1723
1810
  }
@@ -1728,7 +1815,7 @@ const formDescription = tv({
1728
1815
  });
1729
1816
  const formFeedback = tv({
1730
1817
  // validation/feedback text — body role
1731
- base: 'font-body text-body-micro pt-1',
1818
+ base: 'font-body text-body-2xs pt-1',
1732
1819
  variants: {
1733
1820
  intent: {
1734
1821
  primary: 'text-primary',
@@ -1739,7 +1826,7 @@ const formFeedback = tv({
1739
1826
  warning: 'text-warning'
1740
1827
  },
1741
1828
  size: {
1742
- sm: 'text-body-micro',
1829
+ sm: 'text-body-2xs',
1743
1830
  md: '',
1744
1831
  lg: 'text-body-sm'
1745
1832
  }
@@ -1748,15 +1835,20 @@ const formFeedback = tv({
1748
1835
  size: 'sm'
1749
1836
  }
1750
1837
  });
1838
+
1839
+ // The visual shell of a form field: background, border, radius, and the
1840
+ // invalid/disabled treatments. Shared by the `input` slot and by `select`'s
1841
+ // `chipsField`, which becomes the shell when chips render beside the trigger.
1842
+ const fieldShell = ['bg-surface-input', 'border', 'border-neutral-soft', 'rounded-xl', 'selection:bg-surface-overlay-soft'];
1751
1843
  const input = tv({
1752
1844
  slots: {
1753
1845
  base: '',
1754
1846
  innerContainer: 'relative flex',
1755
1847
  startContent: 'absolute inset-y-0 left-0 flex items-center',
1756
1848
  endContent: 'absolute inset-y-0 right-0 flex items-center',
1757
- input: ['appearance-none', 'flex-1', 'w-full', 'bg-surface-input', 'text-neutral-strong', 'placeholder-neutral',
1849
+ input: ['appearance-none', 'flex-1', 'w-full', ...fieldShell, 'text-neutral-strong', 'placeholder-neutral',
1758
1850
  // body role family; single-line controls keep tight leading (not the body relaxed leading)
1759
- 'font-body text-base text-left', 'border', 'border-neutral-soft', 'rounded-xl', 'leading-tight', 'focus:ring-3', 'focus:ring-focus', 'focus:outline-hidden', 'focus:border-primary-soft', 'selection:bg-surface-overlay-soft', 'disabled:border-neutral-subtle disabled:text-neutral-soft', 'aria-invalid:border-danger-soft', 'aria-invalid:focus:ring-danger-soft']
1851
+ 'font-body text-base text-left', 'leading-tight', 'focus:ring-3', 'focus:ring-focus', 'focus:outline-hidden', 'focus:border-primary-soft', 'disabled:border-neutral-subtle disabled:text-neutral-soft', 'aria-invalid:border-danger-soft', 'aria-invalid:focus:ring-danger-soft']
1760
1852
  },
1761
1853
  variants: {
1762
1854
  size: {
@@ -1786,6 +1878,23 @@ const input = tv({
1786
1878
  input: 'pe-10'
1787
1879
  }
1788
1880
  },
1881
+ // When chips render beside the trigger, `chipsField` owns the field shell
1882
+ // and the trigger itself must be visually bare.
1883
+ hasChips: {
1884
+ true: {
1885
+ input: ['border-0', 'bg-transparent', 'p-0', 'w-auto', 'flex-1',
1886
+ // Once chips show the selection the trigger renders nothing at all, so
1887
+ // it has no content to give it a height -- it collapsed to a 0px box
1888
+ // that could not be clicked. Stretching makes it as tall as the chips
1889
+ // sitting next to it, which is the box a pointer needs to hit.
1890
+ 'self-stretch',
1891
+ // No horizontal floor by default: a bare (non-filterable) trigger has
1892
+ // no content of its own, so a floor would only push it onto a second
1893
+ // flex line. `select` puts the floor back for the filterable trigger,
1894
+ // which does need room to type.
1895
+ 'min-w-0', 'focus:ring-0', 'focus:border-transparent']
1896
+ }
1897
+ },
1789
1898
  startContentPointerEvents: {
1790
1899
  auto: {
1791
1900
  startContent: 'pointer-events-auto'
@@ -1907,15 +2016,117 @@ const select = tv({
1907
2016
  icon: 'w-5 h-5',
1908
2017
  clearButton: 'pointer-events-auto',
1909
2018
  input: '[button]:cursor-default',
1910
- emptyContent: 'p-2'
2019
+ emptyContent: 'p-2',
2020
+ // The wrapper around the trigger. It is rendered in every mode; the
2021
+ // `hasChips` variant below decides whether it is the field shell or a
2022
+ // transparent passthrough. Authored here rather than as literal classes in
2023
+ // the component template because Tailwind does not scan
2024
+ // `packages/frontile/src`.
2025
+ chipsField: '',
2026
+ chipsContainer: 'flex flex-wrap items-center gap-1 min-w-0',
2027
+ chip: ''
1911
2028
  },
1912
2029
  variants: {
1913
2030
  size: {
1914
2031
  sm: {},
1915
2032
  md: {},
1916
2033
  lg: {}
2034
+ },
2035
+ // When chips render, `chipsField` becomes the field shell in place of the
2036
+ // trigger's own border (see the `hasChips` variant on `input`), and owns the
2037
+ // padding. Otherwise it is a transparent, full-width flex passthrough: the
2038
+ // shell stays on the trigger, but the wrapper is still a real box, so it can
2039
+ // be measured as the popover's width reference in both modes.
2040
+ //
2041
+ // `data-invalid` / `data-disabled` are set by the component because
2042
+ // `aria-invalid:` and `disabled:` only match the element carrying them.
2043
+ hasChips: {
2044
+ true: {
2045
+ chipsField: [...fieldShell, 'flex', 'flex-wrap', 'items-center', 'gap-1', 'w-full', 'cursor-default', 'focus-within:ring-3', 'focus-within:ring-focus', 'focus-within:border-primary-soft', 'data-[invalid=true]:border-danger-soft', 'data-[invalid=true]:focus-within:ring-danger-soft', 'data-[disabled=true]:border-neutral-subtle', 'data-[disabled=true]:text-neutral-soft']
2046
+ },
2047
+ false: {
2048
+ chipsField: 'flex w-full min-w-0'
2049
+ }
2050
+ },
2051
+ // Whether the trigger is a filterable text input rather than a bare button.
2052
+ // Only affects how much horizontal room the trigger reserves in chips mode.
2053
+ isFilterable: {
2054
+ true: {},
2055
+ false: {}
1917
2056
  }
1918
2057
  },
2058
+ compoundVariants: [
2059
+ // Padding belongs to whichever element is the field shell, so it is applied
2060
+ // to `chipsField` only in chips mode -- in passthrough mode the wrapper has
2061
+ // to add no geometry of its own.
2062
+ // The `min-h-*` values are the height of the same-size text field
2063
+ // (padding + line box + border), so a chips field is exactly as tall as a
2064
+ // single-select one, does not change height as the first chip arrives, and
2065
+ // absorbs the flex gap when the trigger wraps below the chips.
2066
+ // No gap between the chips and the trigger: the chips carry their own gap,
2067
+ // and a gap here is space the trigger has to fit into before it is allowed
2068
+ // to stay on the chips' line. With `gap-0` a trigger that does have to wrap
2069
+ // (the chips already fill the row) costs no vertical space at all.
2070
+ {
2071
+ hasChips: true,
2072
+ size: 'sm',
2073
+ class: {
2074
+ chipsField: 'p-1 gap-0 min-h-9.5'
2075
+ }
2076
+ }, {
2077
+ hasChips: true,
2078
+ size: 'md',
2079
+ class: {
2080
+ chipsField: 'p-1.5 gap-0 min-h-11.5'
2081
+ }
2082
+ }, {
2083
+ hasChips: true,
2084
+ size: 'lg',
2085
+ class: {
2086
+ chipsField: 'p-2 gap-0 min-h-13.5'
2087
+ }
2088
+ },
2089
+ // Chips have to clear the absolutely-positioned start/end content the same
2090
+ // way a bare `input` does, otherwise they run underneath the chevron and the
2091
+ // clear button.
2092
+ {
2093
+ hasChips: true,
2094
+ hasStartContent: true,
2095
+ class: {
2096
+ chipsField: 'ps-8'
2097
+ }
2098
+ }, {
2099
+ hasChips: true,
2100
+ hasEndContent: true,
2101
+ class: {
2102
+ chipsField: 'pe-10'
2103
+ }
2104
+ },
2105
+ // ...and once `chipsField` reserves that room, the bare trigger inside it
2106
+ // must not reserve it a second time.
2107
+ {
2108
+ hasChips: true,
2109
+ hasStartContent: true,
2110
+ class: {
2111
+ input: 'ps-0'
2112
+ }
2113
+ }, {
2114
+ hasChips: true,
2115
+ hasEndContent: true,
2116
+ class: {
2117
+ input: 'pe-0'
2118
+ }
2119
+ },
2120
+ // Only the filterable trigger needs typing room -- and, since the field
2121
+ // itself no longer sets a gap, its own separation from the last chip.
2122
+ // See `min-w-0` and `gap-0` above.
2123
+ {
2124
+ hasChips: true,
2125
+ isFilterable: true,
2126
+ class: {
2127
+ input: 'min-w-16 ms-1'
2128
+ }
2129
+ }],
1919
2130
  defaultVariants: {
1920
2131
  size: 'md'
1921
2132
  }
@@ -2149,4 +2360,4 @@ const formSelect = tv({
2149
2360
  });
2150
2361
 
2151
2362
  export { nativeSelect as A, notificationCard as B, notificationTransitions as C, notificationsContainer as D, overlay as E, overlayTransitions as F, popover as G, progressBar as H, radio as I, radioGroup as J, select as K, skeleton as L, spinner as M, switchInput as N, table as O, textarea as P, toggleButton as Q, tv as R, twMerge as S, autocomplete as a, avatar as b, backdrop as c, button as d, buttonGroup as e, checkbox as f, checkboxGroup as g, chip as h, closeButton as i, divider as j, drawer as k, dropdownContent as l, formCheckbox as m, formCheckboxGroup as n, formDescription as o, formFeedback as p, formInput as q, formRadio as r, formRadioGroup as s, formSelect as t, formTextarea as u, input as v, label as w, listbox as x, listboxItem as y, modal as z };
2152
- //# sourceMappingURL=forms-legacy-CmzotfYT.js.map
2363
+ //# sourceMappingURL=forms-legacy-D7knB8hB.js.map