@frontile/theme 0.18.0-alpha.13 → 0.18.0-alpha.15

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.
@@ -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: {
@@ -732,7 +785,7 @@ 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
791
  description: ['w-full', 'font-body text-body-micro', 'text-neutral-firm', 'group-hover:text-current'],
@@ -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',
@@ -1093,8 +1146,8 @@ const spinner = tv({
1093
1146
  variants: {
1094
1147
  size: {
1095
1148
  xs: 'w-4 h-4',
1096
- sm: 'w-6 h-6,',
1097
- md: 'w-8 h-8,',
1149
+ sm: 'w-6 h-6',
1150
+ md: 'w-8 h-8',
1098
1151
  lg: 'w-10 h-10',
1099
1152
  xl: 'w-12 h-12'
1100
1153
  },
@@ -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'],
@@ -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,7 +1294,10 @@ const table = tv({
1219
1294
  isSticky: true,
1220
1295
  stickyPosition: 'top',
1221
1296
  class: {
1222
- thead: ['sticky', 'top-0', 'z-2', 'bg-surface-card']
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))]']
1223
1301
  }
1224
1302
  },
1225
1303
  // Sticky footer
@@ -1227,23 +1305,26 @@ const table = tv({
1227
1305
  isSticky: true,
1228
1306
  stickyPosition: 'bottom',
1229
1307
  class: {
1230
- tfoot: ['sticky', 'bottom-0', 'z-2', 'bg-surface-card']
1308
+ tfoot: ['sticky', 'bottom-0', 'z-2', 'bg-surface-table']
1231
1309
  }
1232
1310
  },
1233
- // 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.
1234
1315
  {
1235
1316
  isSticky: true,
1236
1317
  stickyPosition: 'left',
1237
1318
  class: {
1238
- th: ['sticky', 'left-0', 'z-3', 'bg-surface-card', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
1239
- 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]']
1240
1321
  }
1241
1322
  }, {
1242
1323
  isSticky: true,
1243
1324
  stickyPosition: 'right',
1244
1325
  class: {
1245
- th: ['sticky', 'right-0', 'z-3', 'bg-surface-card', '[background-image:linear-gradient(var(--color-surface-overlay-subtle),var(--color-surface-overlay-subtle))]'],
1246
- 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]']
1247
1328
  }
1248
1329
  },
1249
1330
  // Sticky rows - base layer
@@ -1251,13 +1332,13 @@ const table = tv({
1251
1332
  isSticky: true,
1252
1333
  stickyPosition: 'top',
1253
1334
  class: {
1254
- tr: ['sticky', 'top-0', 'z-1', 'bg-surface-card']
1335
+ tr: ['sticky', 'top-0', 'z-1', 'bg-surface-table']
1255
1336
  }
1256
1337
  }, {
1257
1338
  isSticky: true,
1258
1339
  stickyPosition: 'bottom',
1259
1340
  class: {
1260
- tr: ['sticky', 'bottom-0', 'z-1', 'bg-surface-card']
1341
+ tr: ['sticky', 'bottom-0', 'z-1', 'bg-surface-table']
1261
1342
  }
1262
1343
  },
1263
1344
  // Sticky rows with sticky header - position after header
@@ -1266,7 +1347,7 @@ const table = tv({
1266
1347
  stickyPosition: 'top',
1267
1348
  hasStickyHeader: true,
1268
1349
  class: {
1269
- 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)]']
1270
1351
  }
1271
1352
  },
1272
1353
  // Intersection cells: sticky column + sticky row - highest z-index
@@ -1275,14 +1356,14 @@ const table = tv({
1275
1356
  stickyPosition: 'left',
1276
1357
  isInStickyRow: true,
1277
1358
  class: {
1278
- td: ['sticky', 'left-0', 'z-2', 'bg-surface-card']
1359
+ td: ['sticky', 'left-0', 'z-2', 'bg-inherit', '[background-image:inherit]']
1279
1360
  }
1280
1361
  }, {
1281
1362
  isSticky: true,
1282
1363
  stickyPosition: 'right',
1283
1364
  isInStickyRow: true,
1284
1365
  class: {
1285
- td: ['sticky', 'right-0', 'z-2', 'bg-surface-card']
1366
+ td: ['sticky', 'right-0', 'z-2', 'bg-inherit', '[background-image:inherit]']
1286
1367
  }
1287
1368
  },
1288
1369
  // Loading states with color variants
@@ -1321,7 +1402,15 @@ const table = tv({
1321
1402
  {
1322
1403
  selectionColor: 'default',
1323
1404
  class: {
1324
- 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))]',
1325
1414
  tr: ['data-[selectable=true]:focus-visible:ring-default']
1326
1415
  }
1327
1416
  }, {
@@ -1377,10 +1466,10 @@ const notificationsContainer = tv({
1377
1466
  const btn = ['transition transition-200', ...focusVisibleRing];
1378
1467
  const notificationCard = tv({
1379
1468
  slots: {
1380
- 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',
1381
1470
  message: 'grow',
1382
1471
  customActions: 'flex flex-nowrap',
1383
- 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'],
1384
1473
  closeButton: [...btn, 'inline-block p-2 ml-2 -mr-2 rounded-full hover:bg-surface-overlay-soft']
1385
1474
  },
1386
1475
  variants: {
@@ -1473,8 +1562,11 @@ const backdrop = tv({
1473
1562
  type: {
1474
1563
  none: '',
1475
1564
  transparent: '',
1476
- blur: 'bg-surface-overlay-strong backdrop-blur-sm',
1477
- faded: 'bg-surface-overlay-strong'
1565
+ // The scrim is `overlay-strong` in light and `lift-strong` in dark: the
1566
+ // two families are mirrored, so the black 75% step swaps sides. Pairing
1567
+ // them keeps the backdrop a dark scrim in both schemes.
1568
+ blur: 'bg-surface-overlay-strong dark:bg-surface-lift-strong backdrop-blur-sm',
1569
+ faded: 'bg-surface-overlay-strong dark:bg-surface-lift-strong'
1478
1570
  },
1479
1571
  inPlace: {
1480
1572
  true: 'absolute'
@@ -1743,15 +1835,20 @@ const formFeedback = tv({
1743
1835
  size: 'sm'
1744
1836
  }
1745
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'];
1746
1843
  const input = tv({
1747
1844
  slots: {
1748
1845
  base: '',
1749
1846
  innerContainer: 'relative flex',
1750
1847
  startContent: 'absolute inset-y-0 left-0 flex items-center',
1751
1848
  endContent: 'absolute inset-y-0 right-0 flex items-center',
1752
- 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',
1753
1850
  // body role family; single-line controls keep tight leading (not the body relaxed leading)
1754
- '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']
1755
1852
  },
1756
1853
  variants: {
1757
1854
  size: {
@@ -1781,6 +1878,23 @@ const input = tv({
1781
1878
  input: 'pe-10'
1782
1879
  }
1783
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
+ },
1784
1898
  startContentPointerEvents: {
1785
1899
  auto: {
1786
1900
  startContent: 'pointer-events-auto'
@@ -1902,15 +2016,117 @@ const select = tv({
1902
2016
  icon: 'w-5 h-5',
1903
2017
  clearButton: 'pointer-events-auto',
1904
2018
  input: '[button]:cursor-default',
1905
- 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: ''
1906
2028
  },
1907
2029
  variants: {
1908
2030
  size: {
1909
2031
  sm: {},
1910
2032
  md: {},
1911
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: {}
2056
+ }
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'
1912
2087
  }
1913
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
+ }],
1914
2130
  defaultVariants: {
1915
2131
  size: 'md'
1916
2132
  }
@@ -2144,4 +2360,4 @@ const formSelect = tv({
2144
2360
  });
2145
2361
 
2146
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 };
2147
- //# sourceMappingURL=forms-legacy-BYj1fPB4.js.map
2363
+ //# sourceMappingURL=forms-legacy-9Umui1Bp.js.map