basecoat-css 1.1.0 → 1.2.0

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 (92) hide show
  1. package/README.md +1 -1
  2. package/dist/base/base.css +1 -0
  3. package/dist/base/scroll-fade.css +41 -0
  4. package/dist/base/transition-details.css +12 -0
  5. package/dist/basecoat-base.bundle.css +767 -119
  6. package/dist/basecoat-base.cdn.css +1924 -673
  7. package/dist/basecoat-base.cdn.min.css +1 -1
  8. package/dist/basecoat-compat.cdn.css +250 -75
  9. package/dist/basecoat-compat.cdn.min.css +1 -1
  10. package/dist/basecoat-components.css +10 -0
  11. package/dist/basecoat-luma.bundle.css +1115 -125
  12. package/dist/basecoat-luma.cdn.css +4649 -2558
  13. package/dist/basecoat-luma.cdn.min.css +1 -1
  14. package/dist/basecoat-lyra.bundle.css +1110 -125
  15. package/dist/basecoat-lyra.cdn.css +5118 -3079
  16. package/dist/basecoat-lyra.cdn.min.css +1 -1
  17. package/dist/basecoat-maia.bundle.css +1113 -125
  18. package/dist/basecoat-maia.cdn.css +5244 -3202
  19. package/dist/basecoat-maia.cdn.min.css +1 -1
  20. package/dist/basecoat-mira.bundle.css +1113 -125
  21. package/dist/basecoat-mira.cdn.css +3623 -1583
  22. package/dist/basecoat-mira.cdn.min.css +1 -1
  23. package/dist/basecoat-nova.bundle.css +1115 -129
  24. package/dist/basecoat-nova.cdn.css +5271 -3229
  25. package/dist/basecoat-nova.cdn.min.css +1 -1
  26. package/dist/basecoat-rhea.bundle.css +1117 -127
  27. package/dist/basecoat-rhea.cdn.css +5286 -3192
  28. package/dist/basecoat-rhea.cdn.min.css +1 -1
  29. package/dist/basecoat-sera.bundle.css +1111 -128
  30. package/dist/basecoat-sera.cdn.css +3280 -1254
  31. package/dist/basecoat-sera.cdn.min.css +1 -1
  32. package/dist/basecoat-vega.bundle.css +1113 -125
  33. package/dist/basecoat-vega.cdn.css +5225 -3180
  34. package/dist/basecoat-vega.cdn.min.css +1 -1
  35. package/dist/basecoat.bundle.css +1113 -125
  36. package/dist/basecoat.cdn.css +5225 -3180
  37. package/dist/basecoat.cdn.min.css +1 -1
  38. package/dist/compat/legacy.css +3 -18
  39. package/dist/components/accordion.css +15 -1
  40. package/dist/components/alert.css +4 -0
  41. package/dist/components/attachment.css +66 -0
  42. package/dist/components/bubble.css +28 -0
  43. package/dist/components/button-group.css +2 -1
  44. package/dist/components/button.css +23 -0
  45. package/dist/components/carousel.css +30 -0
  46. package/dist/components/checkbox.css +5 -1
  47. package/dist/components/code-block.css +80 -0
  48. package/dist/components/collapsible.css +0 -9
  49. package/dist/components/command.css +13 -0
  50. package/dist/components/dialog.css +2 -4
  51. package/dist/components/drawer.css +48 -14
  52. package/dist/components/input-otp.css +49 -0
  53. package/dist/components/item.css +6 -0
  54. package/dist/components/marker.css +20 -0
  55. package/dist/components/message.css +24 -0
  56. package/dist/components/range.css +7 -0
  57. package/dist/components/scrollbar.css +20 -42
  58. package/dist/components/sheet.css +123 -0
  59. package/dist/components/shimmer.css +49 -0
  60. package/dist/components/sidebar.css +9 -1
  61. package/dist/components/toast.css +59 -44
  62. package/dist/components/trace.css +34 -0
  63. package/dist/js/all.js +488 -112
  64. package/dist/js/all.min.js +1 -1
  65. package/dist/js/carousel.js +105 -0
  66. package/dist/js/carousel.min.js +1 -0
  67. package/dist/js/code-block.js +47 -0
  68. package/dist/js/code-block.min.js +1 -0
  69. package/dist/js/drawer.js +6 -2
  70. package/dist/js/drawer.min.js +1 -1
  71. package/dist/js/input-otp.js +76 -0
  72. package/dist/js/input-otp.min.js +1 -0
  73. package/dist/js/tabs.js +31 -58
  74. package/dist/js/tabs.min.js +1 -1
  75. package/dist/js/toast.js +221 -53
  76. package/dist/js/toast.min.js +1 -1
  77. package/dist/styles/luma.css +348 -6
  78. package/dist/styles/lyra.css +343 -6
  79. package/dist/styles/maia.css +346 -6
  80. package/dist/styles/mira.css +346 -6
  81. package/dist/styles/nova.css +348 -10
  82. package/dist/styles/rhea.css +350 -8
  83. package/dist/styles/sera.css +344 -9
  84. package/dist/styles/vega.css +346 -6
  85. package/dist/typeset.cdn.css +381 -0
  86. package/dist/typeset.cdn.min.css +1 -0
  87. package/dist/typeset.css +435 -0
  88. package/package.json +16 -7
  89. package/templates/jinja/tabs.html.jinja +0 -1
  90. package/templates/jinja/toast.html.jinja +29 -26
  91. package/templates/nunjucks/tabs.njk +1 -1
  92. package/templates/nunjucks/toast.njk +30 -27
@@ -1,4 +1,4 @@
1
- /* Basecoat v1.1.0, base (no style pack), single-file source. Import after tailwindcss. */
1
+ /* Basecoat v1.2.0, base (no style pack), single-file source. Import after tailwindcss. */
2
2
  @custom-variant dark (&:is(html.dark *));
3
3
 
4
4
  :root {
@@ -91,6 +91,7 @@
91
91
  --radius-md: calc(var(--radius) - 2px);
92
92
  --radius-lg: var(--radius);
93
93
  --radius-xl: calc(var(--radius) + 4px);
94
+ --radius-2xl: calc(var(--radius) + 8px);
94
95
  --color-background: var(--background);
95
96
  --color-foreground: var(--foreground);
96
97
  --color-card: var(--card);
@@ -145,8 +146,27 @@
145
146
  }
146
147
  }
147
148
  /* Components */
149
+ @source inline("transition-details");
150
+
151
+ @utility transition-details {
152
+ &::details-content {
153
+ block-size: 0;
154
+ @apply flow-root overflow-clip transition-[block-size,content-visibility,opacity] transition-discrete motion-reduce:transition-none;
155
+ }
156
+ &[open]::details-content {
157
+ block-size: auto;
158
+ block-size: calc-size(auto, size);
159
+ }
160
+ }
161
+
148
162
  /* Accordion */
149
163
  @layer components {
164
+ .accordion > details {
165
+ @apply transition-details;
166
+ &::details-content { @apply opacity-0; }
167
+ &[open]::details-content { @apply opacity-100; }
168
+ }
169
+
150
170
  .accordion {
151
171
  @apply flex w-full flex-col;
152
172
  }
@@ -156,7 +176,7 @@
156
176
  }
157
177
 
158
178
  .accordion > details > summary > svg:last-child {
159
- @apply pointer-events-none shrink-0 transition-transform;
179
+ @apply pointer-events-none shrink-0 transition-transform motion-reduce:transition-none;
160
180
  }
161
181
 
162
182
  .accordion > details[open] > summary > svg:last-child {
@@ -171,6 +191,12 @@
171
191
  .accordion > details > :not(summary) {
172
192
  @apply overflow-hidden;
173
193
  }
194
+ @media (forced-colors: active) {
195
+ .accordion > details > summary:focus-visible {
196
+ outline: 2px solid Highlight;
197
+ outline-offset: 2px;
198
+ }
199
+ }
174
200
  }
175
201
  /* Alert */
176
202
  @layer components {
@@ -186,6 +212,10 @@
186
212
  @apply min-h-4;
187
213
  }
188
214
 
215
+ .alert > :is(h2, h3, h4, h5, h6, strong, [data-title], section) :where(a[href]:not(.btn)) {
216
+ @apply underline decoration-dotted decoration-current/50 underline-offset-3 hover:text-foreground hover:decoration-current focus-visible:decoration-current;
217
+ }
218
+
189
219
  .alert > section {
190
220
  @apply grid justify-items-start gap-1;
191
221
 
@@ -298,6 +328,29 @@
298
328
  .btn {
299
329
  @apply inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0;
300
330
  }
331
+ .btn:has(> input:is([type='checkbox'], [type='radio'])) {
332
+ @apply relative;
333
+ }
334
+ .btn > input:is([type='checkbox'], [type='radio']) {
335
+ @apply sr-only;
336
+ }
337
+ @media (forced-colors: active) {
338
+ .btn:has(> input:checked)::after {
339
+ content: '';
340
+ position: absolute;
341
+ inset: 4px;
342
+ border: 2px solid Highlight;
343
+ pointer-events: none;
344
+ }
345
+ .btn:focus-visible,
346
+ .btn:has(> input:focus-visible) {
347
+ outline: 2px solid Highlight;
348
+ outline-offset: 2px;
349
+ }
350
+ }
351
+ .btn:has(> input:disabled) {
352
+ @apply pointer-events-none opacity-50;
353
+ }
301
354
  }
302
355
  /* Button Group */
303
356
  @layer components {
@@ -313,6 +366,7 @@
313
366
  }
314
367
 
315
368
  > *:focus-visible,
369
+ > .btn:has(> input:focus-visible),
316
370
  > :is(.dropdown-menu, .popover, .select) > button:focus-visible {
317
371
  @apply relative z-10;
318
372
  }
@@ -349,7 +403,7 @@
349
403
  }
350
404
  }
351
405
 
352
- .button-group > :is(span, label, output) {
406
+ .button-group > :is(span, label, output):not(.btn) {
353
407
  @apply flex items-center [&_svg]:pointer-events-none;
354
408
  }
355
409
  }
@@ -438,15 +492,6 @@
438
492
  /* Collapsible */
439
493
  @layer components {
440
494
  details {
441
- &::details-content {
442
- block-size: 0;
443
- @apply block opacity-0 transition-discrete transition-all;
444
- }
445
- &[open]::details-content {
446
- block-size: auto;
447
- block-size: calc-size(auto, size);
448
- @apply opacity-100;
449
- }
450
495
  summary {
451
496
  @apply inline-flex items-center cursor-pointer;
452
497
  }
@@ -455,8 +500,21 @@
455
500
  display: none;
456
501
  }
457
502
  }
503
+ @keyframes command-scroll-lock {
504
+ from, to {
505
+ scrollbar-gutter: stable;
506
+ }
507
+ }
508
+
458
509
  /* Command */
459
510
  @layer components {
511
+ /* Reserve the scrollbar gutter only when the page can scroll. */
512
+ html:has(.command-dialog:modal) {
513
+ overflow: hidden;
514
+ animation: command-scroll-lock linear both;
515
+ animation-timeline: scroll(self);
516
+ }
517
+
460
518
  .command-dialog {
461
519
  @apply inset-y-0 bg-transparent p-0 text-inherit opacity-0 transition-all transition-discrete;
462
520
  max-width: none;
@@ -694,7 +752,6 @@
694
752
  @apply inline-flex shrink-0 items-center justify-center;
695
753
  }
696
754
  }
697
- /* Dialog */
698
755
  @keyframes dialog-scroll-lock {
699
756
  from, to {
700
757
  scrollbar-gutter: stable;
@@ -702,9 +759,8 @@
702
759
  }
703
760
 
704
761
  @layer components {
705
- /* Lock page scroll while a modal dialog is open. The scroll timeline only
706
- reserves the scrollbar gutter if the page can scroll, so nothing shifts. */
707
- html:has(:is(.dialog, .alert-dialog, .command-dialog, .drawer):modal) {
762
+ /* Reserve the scrollbar gutter only when the page can scroll. */
763
+ html:has(:is(.dialog, .alert-dialog):modal) {
708
764
  overflow: hidden;
709
765
  animation: dialog-scroll-lock linear both;
710
766
  animation-timeline: scroll(self);
@@ -809,30 +865,46 @@
809
865
  }
810
866
  }
811
867
  }
868
+ @keyframes drawer-scroll-lock {
869
+ from, to {
870
+ scrollbar-gutter: stable;
871
+ }
872
+ }
873
+
812
874
  /* Drawer */
813
875
  @layer components {
876
+ /* Reserve the scrollbar gutter only when the page can scroll. */
877
+ html:has(.drawer:modal) {
878
+ overflow: hidden;
879
+ animation: drawer-scroll-lock linear both;
880
+ animation-timeline: scroll(self);
881
+ }
882
+
814
883
  .drawer {
815
- @apply fixed inset-0 m-0 size-auto max-h-none max-w-none overflow-visible bg-transparent p-0 text-inherit opacity-0 transition-all transition-discrete duration-500 ease-[cubic-bezier(0.32,0.72,0,1)] backdrop:opacity-0 backdrop:transition-all backdrop:transition-discrete backdrop:duration-500 backdrop:ease-[cubic-bezier(0.32,0.72,0,1)];
884
+ --_drawer-duration: 500ms;
885
+ --_drawer-ease: cubic-bezier(0.32, 0.72, 0, 1);
886
+ --_drawer-travel: 100%;
887
+ @apply fixed inset-0 m-0 size-auto max-h-none max-w-none overflow-visible bg-transparent p-0 text-inherit opacity-0 transition-all transition-discrete duration-(--_drawer-duration) ease-(--_drawer-ease) backdrop:opacity-0 backdrop:transition-all backdrop:transition-discrete backdrop:duration-500 backdrop:ease-[cubic-bezier(0.32,0.72,0,1)];
816
888
 
817
889
  > * {
818
- @apply fixed z-50 flex h-auto flex-col transition-transform duration-500 ease-[cubic-bezier(0.32,0.72,0,1)] will-change-transform outline-hidden;
890
+ @apply fixed z-50 flex h-auto flex-col transition-transform duration-(--_drawer-duration) ease-(--_drawer-ease) will-change-transform outline-hidden;
819
891
  }
820
892
 
821
893
  &:not([data-side]) > *,
822
894
  &[data-side='bottom'] > * {
823
- @apply inset-x-0 bottom-0 mt-24 max-h-[80vh] translate-y-full;
895
+ @apply inset-x-0 bottom-0 translate-y-(--_drawer-travel);
824
896
  }
825
897
 
826
898
  &[data-side='top'] > * {
827
- @apply inset-x-0 top-0 mb-24 max-h-[80vh] -translate-y-full;
899
+ @apply inset-x-0 top-0 -translate-y-(--_drawer-travel);
828
900
  }
829
901
 
830
902
  &[data-side='left'] > * {
831
- @apply inset-y-0 left-0 w-3/4 max-w-sm -translate-x-full;
903
+ @apply inset-y-0 left-0 w-3/4 -translate-x-(--_drawer-travel);
832
904
  }
833
905
 
834
906
  &[data-side='right'] > * {
835
- @apply inset-y-0 right-0 w-3/4 max-w-sm translate-x-full;
907
+ @apply inset-y-0 right-0 w-3/4 translate-x-(--_drawer-travel);
836
908
  }
837
909
 
838
910
  &[data-closing] {
@@ -841,19 +913,19 @@
841
913
 
842
914
  &[data-closing]:not([data-side]) > *,
843
915
  &[data-closing][data-side='bottom'] > * {
844
- @apply translate-y-full;
916
+ @apply translate-y-(--_drawer-travel);
845
917
  }
846
918
 
847
919
  &[data-closing][data-side='top'] > * {
848
- @apply -translate-y-full;
920
+ @apply -translate-y-(--_drawer-travel);
849
921
  }
850
922
 
851
923
  &[data-closing][data-side='left'] > * {
852
- @apply -translate-x-full;
924
+ @apply -translate-x-(--_drawer-travel);
853
925
  }
854
926
 
855
927
  &[data-closing][data-side='right'] > * {
856
- @apply translate-x-full;
928
+ @apply translate-x-(--_drawer-travel);
857
929
  }
858
930
 
859
931
  &:is([open], :popover-open):not([data-closing]) {
@@ -868,19 +940,19 @@
868
940
 
869
941
  &:not([data-side]) > *,
870
942
  &[data-side='bottom'] > * {
871
- @apply translate-y-full;
943
+ @apply translate-y-(--_drawer-travel);
872
944
  }
873
945
 
874
946
  &[data-side='top'] > * {
875
- @apply -translate-y-full;
947
+ @apply -translate-y-(--_drawer-travel);
876
948
  }
877
949
 
878
950
  &[data-side='left'] > * {
879
- @apply -translate-x-full;
951
+ @apply -translate-x-(--_drawer-travel);
880
952
  }
881
953
 
882
954
  &[data-side='right'] > * {
883
- @apply translate-x-full;
955
+ @apply translate-x-(--_drawer-travel);
884
956
  }
885
957
  }
886
958
  }
@@ -897,6 +969,24 @@
897
969
  @apply mt-auto flex flex-col;
898
970
  }
899
971
  }
972
+
973
+ .drawer:not([data-side]) > *,
974
+ .drawer[data-side='bottom'] > * {
975
+ @apply mt-24 max-h-[80vh];
976
+ }
977
+ .drawer[data-side='top'] > * {
978
+ @apply mb-24 max-h-[80vh];
979
+ }
980
+ .drawer:is([data-side='left'], [data-side='right']) > * {
981
+ @apply max-w-sm;
982
+ }
983
+ @media (prefers-reduced-motion: reduce) {
984
+ .drawer,
985
+ .drawer::backdrop,
986
+ .drawer > * {
987
+ transition: none;
988
+ }
989
+ }
900
990
  }
901
991
  /* Dropdown Menu */
902
992
  @layer components {
@@ -1068,7 +1158,11 @@
1068
1158
  .input[type='checkbox']:not([role='switch']) {
1069
1159
  @apply relative shrink-0 appearance-none outline-none disabled:cursor-not-allowed disabled:opacity-50;
1070
1160
 
1071
- &:checked:after {
1161
+ &:indeterminate::after {
1162
+ @apply block h-0.5 w-2.5 bg-current content-[''];
1163
+ }
1164
+
1165
+ &:checked:not(:indeterminate):after {
1072
1166
  @apply content-[''] block bg-current;
1073
1167
  @apply mask-[image:var(--check-icon)] mask-size-[0.875rem] mask-no-repeat mask-center;
1074
1168
  }
@@ -1155,6 +1249,12 @@
1155
1249
  .item p {
1156
1250
  @apply text-muted-foreground line-clamp-2 text-start font-normal [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary;
1157
1251
  }
1252
+ @media (forced-colors: active) {
1253
+ a.item:focus-visible {
1254
+ outline: 2px solid Highlight;
1255
+ outline-offset: 2px;
1256
+ }
1257
+ }
1158
1258
  }
1159
1259
  /* Kbd */
1160
1260
  @layer components {
@@ -1368,6 +1468,13 @@
1368
1468
  @apply bg-muted;
1369
1469
  }
1370
1470
  }
1471
+ @media (forced-colors: active) {
1472
+ .field > input[type='range']:focus-visible,
1473
+ .input[type='range']:focus-visible {
1474
+ outline: 2px solid Highlight;
1475
+ outline-offset: 2px;
1476
+ }
1477
+ }
1371
1478
  }
1372
1479
  /* Select */
1373
1480
  @layer components {
@@ -1433,8 +1540,15 @@
1433
1540
  @apply bg-accent text-accent-foreground;
1434
1541
  }
1435
1542
  }
1543
+
1436
1544
  /* Sidebar */
1437
1545
  @layer components {
1546
+ .sidebar > nav li > details {
1547
+ @apply transition-details;
1548
+ &::details-content { @apply opacity-0; }
1549
+ &[open]::details-content { @apply opacity-100; }
1550
+ }
1551
+
1438
1552
  .sidebar {
1439
1553
  &:not([data-sidebar-initialized]) {
1440
1554
  @apply max-md:hidden;
@@ -1523,7 +1637,7 @@
1523
1637
  }
1524
1638
  > summary {
1525
1639
  &::after {
1526
- @apply ms-auto block size-3.5 bg-current content-[''] transition-transform ease-linear;
1640
+ @apply ms-auto block size-3.5 bg-current content-[''] transition-transform ease-linear motion-reduce:transition-none;
1527
1641
  @apply mask-[image:var(--chevron-down-icon)] mask-size-[1rem] mask-no-repeat mask-center;
1528
1642
  }
1529
1643
  }
@@ -1537,50 +1651,28 @@
1537
1651
  }
1538
1652
  }
1539
1653
  }
1540
- /* Scrollbar */
1541
- @layer components {
1542
- .scrollbar {
1543
- scrollbar-width: auto;
1544
- scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
1654
+ @source inline("scrollbar scrollbar-thin");
1545
1655
 
1546
- &::-webkit-scrollbar {
1547
- width: var(--scrollbar-width);
1548
- height: var(--scrollbar-width);
1549
- }
1550
- &::-webkit-scrollbar-track {
1551
- background: var(--scrollbar-track);
1552
- }
1553
- &::-webkit-scrollbar-thumb {
1554
- background: var(--scrollbar-thumb);
1555
- border-radius: var(--scrollbar-radius);
1556
- border: 1px solid transparent;
1557
- background-clip: padding-box;
1558
- }
1559
- &::-webkit-scrollbar-corner {
1560
- background: var(--scrollbar-track);
1561
- }
1562
- }
1656
+ @utility scrollbar {
1657
+ scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
1563
1658
 
1564
- .scrollbar-sm {
1565
- scrollbar-width: thin;
1566
- scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
1567
-
1568
- &::-webkit-scrollbar {
1569
- width: var(--scrollbar-sm-width);
1570
- height: var(--scrollbar-sm-width);
1571
- }
1572
- &::-webkit-scrollbar-track {
1573
- background: var(--scrollbar-track);
1574
- }
1575
- &::-webkit-scrollbar-thumb {
1576
- background: var(--scrollbar-thumb);
1577
- border-radius: var(--scrollbar-radius);
1578
- border: 1px solid transparent;
1579
- background-clip: padding-box;
1580
- }
1581
- &::-webkit-scrollbar-corner {
1582
- background: var(--scrollbar-track);
1583
- }
1659
+ &::-webkit-scrollbar {
1660
+ width: var(--scrollbar-width);
1661
+ height: var(--scrollbar-width);
1662
+ }
1663
+ &.scrollbar-thin::-webkit-scrollbar {
1664
+ width: var(--scrollbar-sm-width);
1665
+ height: var(--scrollbar-sm-width);
1666
+ }
1667
+ &::-webkit-scrollbar-track,
1668
+ &::-webkit-scrollbar-corner {
1669
+ background: var(--scrollbar-track);
1670
+ }
1671
+ &::-webkit-scrollbar-thumb {
1672
+ background: var(--scrollbar-thumb);
1673
+ border-radius: var(--scrollbar-radius);
1674
+ border: 1px solid transparent;
1675
+ background-clip: padding-box;
1584
1676
  }
1585
1677
  }
1586
1678
  /* Skeleton */
@@ -1743,61 +1835,76 @@
1743
1835
  @apply me-1;
1744
1836
  }
1745
1837
  }
1746
- /* Toasts */
1838
+ /* Toasts: measured native content, CSS stacking and transitions. */
1747
1839
  @layer components {
1748
1840
  .toaster {
1749
- @apply pointer-events-none fixed bottom-0 z-50 flex w-full flex-col-reverse gap-4 p-4 sm:max-w-90;
1841
+ @apply pointer-events-none fixed inset-x-4 bottom-4 z-50 m-0 mx-auto h-0 w-auto max-w-sm list-none p-0 outline-none sm:mx-0 sm:w-full;
1750
1842
 
1751
1843
  &:not([data-align]),
1752
- &[data-align='end'] {
1753
- @apply right-0;
1754
- }
1755
- &[data-align='start'] {
1756
- @apply left-0;
1757
- }
1758
- &[data-align='center'] {
1759
- @apply left-1/2 -translate-x-1/2;
1760
- }
1761
- .toast {
1762
- @apply pointer-events-auto grid w-full grid-rows-[1fr] animate-[toast-up_0.3s_ease-in-out] transition-[grid-template-rows,opacity] duration-300 ease-in-out;
1763
-
1764
- .toast-content {
1765
- @apply flex items-center gap-2.5 overflow-hidden p-3 text-[13px];
1844
+ &[data-align='end'] { @apply sm:start-auto sm:end-4; }
1845
+ &[data-align='start'] { @apply sm:start-4 sm:end-auto; }
1846
+ &[data-align='center'] { @apply sm:start-1/2 sm:end-auto sm:-translate-x-1/2 sm:rtl:translate-x-1/2; }
1766
1847
 
1767
- svg {
1768
- @apply size-4 shrink-0;
1769
- }
1770
- section {
1771
- h2 {
1772
- @apply font-medium tracking-tight;
1773
- }
1774
- p {
1775
- @apply text-muted-foreground break-all;
1776
- }
1777
- }
1778
- footer {
1779
- @apply ms-auto flex flex-col gap-2;
1780
-
1781
- [data-toast-action],
1782
- [data-toast-cancel] {
1783
- @apply h-6 px-2.5 text-xs;
1784
- }
1785
- }
1848
+ .toast {
1849
+ --toast-scale: max(0, calc(1 - var(--toast-index, 0) * 0.1));
1850
+ --toast-lift: calc(var(--toast-index, 0) * -12px - (1 - var(--toast-scale)) * var(--toast-front-height, 0px));
1851
+ --toast-swipe-x: 0px;
1852
+ --toast-swipe-y: 0px;
1853
+ @apply pointer-events-auto absolute inset-x-0 bottom-0 w-full list-none select-none outline-none;
1854
+ height: var(--toast-front-height, auto);
1855
+ z-index: calc(1000 - var(--toast-index, 0));
1856
+ transform-origin: bottom center;
1857
+ transform: translateX(var(--toast-swipe-x)) translateY(calc(var(--toast-lift) + var(--toast-swipe-y))) scale(var(--toast-scale));
1858
+ transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), opacity 500ms, height 150ms;
1859
+ touch-action: none;
1860
+
1861
+ &::after {
1862
+ content: '';
1863
+ @apply absolute inset-x-0 top-full h-[13px];
1786
1864
  }
1787
- &[aria-hidden='true'] {
1788
- @apply grid-rows-[0fr] overflow-hidden border-0 p-0 opacity-0;
1789
1865
 
1790
- .toast-content {
1791
- @apply border-0;
1866
+ > .toast-content {
1867
+ @apply flex items-center overflow-hidden;
1868
+ transition: opacity 250ms cubic-bezier(0.22, 1, 0.36, 1);
1869
+ > svg { @apply pointer-events-none shrink-0; }
1870
+ > section { @apply flex min-w-0 flex-1 flex-col wrap-break-word; }
1871
+ > footer { @apply ms-auto flex shrink-0 items-center; }
1872
+ > footer > .btn[data-size='icon-sm'] {
1873
+ @apply relative after:absolute after:-inset-2 after:content-[''];
1792
1874
  }
1793
1875
  }
1876
+
1877
+ &:where(:has(~ .toast:not([aria-hidden='true']))) > .toast-content { @apply opacity-0; }
1878
+ &[data-toast-stack-overflow] { @apply pointer-events-none opacity-0; }
1879
+ &[aria-hidden='true'] { @apply pointer-events-none; }
1880
+ }
1881
+
1882
+ &:where(:hover, :focus-within, :has([data-toast-swiping])) .toast:not([aria-hidden='true']) {
1883
+ height: var(--toast-height);
1884
+ transform: translateX(var(--toast-swipe-x)) translateY(calc(var(--toast-offset, 0px) * -1 + var(--toast-swipe-y)));
1885
+ > .toast-content { @apply opacity-100; }
1886
+ }
1887
+
1888
+ .toast[data-toast-expanded][aria-hidden='true'] {
1889
+ height: var(--toast-height);
1890
+ > .toast-content { opacity: 1; }
1891
+ }
1892
+ .toast > .toast-content > footer > :is([data-toast-action], [data-toast-cancel]):not([data-size]) { @apply h-6 px-2.5 text-xs; }
1893
+
1894
+ .toast:not([data-toast-initialized]),
1895
+ .toast[aria-hidden='true']:not([data-toast-stack-overflow]) {
1896
+ transform: translateY(calc(var(--toast-swipe-y) + 150%));
1897
+ }
1898
+ .toast[aria-hidden='true'][data-toast-swipe='x'] {
1899
+ transform: translateX(calc(var(--toast-swipe-x) + var(--toast-swipe-end))) translateY(calc(var(--toast-offset, 0px) * -1));
1900
+ }
1901
+ .toast[data-toast-swiping] { transition: none; }
1902
+ .toast[data-category='loading'] > .toast-content > svg { @apply animate-spin; }
1903
+
1904
+ @media (prefers-reduced-motion: reduce) {
1905
+ .toast, .toast > .toast-content { transition: none; }
1906
+ .toast[data-category='loading'] > .toast-content > svg { animation: none; }
1794
1907
  }
1795
- }
1796
- }
1797
- @keyframes toast-up {
1798
- from {
1799
- opacity: 0;
1800
- transform: translateY(100%);
1801
1908
  }
1802
1909
  }
1803
1910
  /* Tooltip */
@@ -1882,3 +1989,544 @@
1882
1989
  }
1883
1990
  }
1884
1991
  }
1992
+ /* Progressive scroll-edge fades. Unsupported browsers keep an unmasked scroller. */
1993
+ @property --_scroll-fade-start {
1994
+ syntax: '<length-percentage>';
1995
+ inherits: false;
1996
+ initial-value: 0px;
1997
+ }
1998
+ @property --_scroll-fade-end {
1999
+ syntax: '<length-percentage>';
2000
+ inherits: false;
2001
+ initial-value: 0px;
2002
+ }
2003
+ @keyframes basecoat-scroll-fade-start {
2004
+ from { --_scroll-fade-start: 0px; }
2005
+ to { --_scroll-fade-start: min(12%, 2.5rem); }
2006
+ }
2007
+ @keyframes basecoat-scroll-fade-end {
2008
+ from { --_scroll-fade-end: min(12%, 2.5rem); }
2009
+ to { --_scroll-fade-end: 0px; }
2010
+ }
2011
+
2012
+ @source inline("scroll-fade scroll-fade-x");
2013
+
2014
+ @utility scroll-fade {
2015
+ --_fade-direction: to bottom;
2016
+ --_fade-axis: y;
2017
+ @supports (animation-timeline: scroll()) {
2018
+ @media (forced-colors: none) {
2019
+ mask-image: linear-gradient(var(--_fade-direction), transparent, #000 var(--_scroll-fade-start), #000 calc(100% - var(--_scroll-fade-end)), transparent);
2020
+ animation: basecoat-scroll-fade-start 1ms ease-in-out both, basecoat-scroll-fade-end 1ms ease-in-out both;
2021
+ animation-timeline: scroll(self var(--_fade-axis)), scroll(self var(--_fade-axis));
2022
+ animation-range: 0 6rem, calc(100% - 6rem) 100%;
2023
+ }
2024
+ }
2025
+ }
2026
+
2027
+ @utility scroll-fade-x {
2028
+ @apply scroll-fade;
2029
+ --_fade-axis: inline;
2030
+ --_fade-direction: to right;
2031
+ &:dir(rtl) { --_fade-direction: to left; }
2032
+ }
2033
+
2034
+ /* Attachment */
2035
+ @layer components {
2036
+ .attachment {
2037
+ @apply relative flex max-w-full min-w-0 shrink-0 flex-wrap transition-colors;
2038
+ }
2039
+ .attachment:not([data-orientation='vertical']) {
2040
+ @apply items-center;
2041
+ }
2042
+ .attachment[data-orientation='vertical'] {
2043
+ @apply flex-col;
2044
+ }
2045
+ .attachment > figure {
2046
+ @apply relative flex aspect-square shrink-0 items-center justify-center overflow-hidden;
2047
+ }
2048
+ .attachment > figure > svg {
2049
+ @apply pointer-events-none;
2050
+ }
2051
+ .attachment > figure > img {
2052
+ @apply aspect-square w-full object-cover;
2053
+ }
2054
+ .attachment > section {
2055
+ @apply max-w-full min-w-0 flex-1;
2056
+ }
2057
+ .attachment > section > * {
2058
+ @apply block max-w-full min-w-0 truncate;
2059
+ }
2060
+
2061
+ .attachment > div {
2062
+ @apply relative z-20 flex shrink-0 items-center;
2063
+ }
2064
+
2065
+ .attachment[data-orientation='vertical'] > div {
2066
+ @apply absolute;
2067
+ }
2068
+ .attachment > :is(a, button) {
2069
+ @apply absolute inset-0 z-10 outline-none;
2070
+ }
2071
+ /* An inset focus indicator stays visible at the clipped edges of a file row. */
2072
+ .attachment:has(> :is(a, button):focus-visible) {
2073
+ outline: 2px solid currentColor;
2074
+ outline-offset: -2px;
2075
+ }
2076
+ .attachment > button:disabled {
2077
+ @apply cursor-not-allowed;
2078
+ }
2079
+ .attachment-group {
2080
+ @apply flex min-w-0 snap-x snap-mandatory overflow-x-auto overscroll-x-contain;
2081
+ @apply scroll-fade-x;
2082
+ scrollbar-width: none;
2083
+ }
2084
+ .attachment-group:focus-within { mask-image: none; }
2085
+ .attachment-group::-webkit-scrollbar { display: none; }
2086
+ .attachment-group > .attachment {
2087
+ @apply flex-none snap-start;
2088
+ }
2089
+ @media (forced-colors: active) {
2090
+ .attachment:has(> :is(a, button):focus-visible),
2091
+ .attachment-group:focus-visible {
2092
+ outline: 2px solid Highlight;
2093
+ outline-offset: -2px;
2094
+ }
2095
+ .attachment-group { mask-image: none; }
2096
+ }
2097
+ }
2098
+ /* Bubble */
2099
+ @layer components {
2100
+ .bubble-group {
2101
+ @apply flex min-w-0 flex-col;
2102
+ }
2103
+ .bubble {
2104
+ @apply relative flex w-fit min-w-0 flex-col;
2105
+ }
2106
+ .bubble > :first-child {
2107
+ @apply w-fit max-w-full min-w-0 overflow-hidden wrap-break-word;
2108
+ }
2109
+ .bubble > :is(a, button):first-child {
2110
+ @apply text-start transition-colors outline-none;
2111
+ }
2112
+ .bubble > button:disabled {
2113
+ @apply pointer-events-none opacity-50;
2114
+ }
2115
+
2116
+ .bubble > div:not(:first-child) {
2117
+ @apply absolute z-10 flex w-fit shrink-0 items-center justify-center;
2118
+ }
2119
+ @media (forced-colors: active) {
2120
+ .bubble > :is(a, button):first-child:focus-visible {
2121
+ outline: 2px solid Highlight;
2122
+ outline-offset: 2px;
2123
+ }
2124
+ }
2125
+ }
2126
+ /* Carousel */
2127
+ @layer components {
2128
+ .carousel {
2129
+ @apply relative min-w-0;
2130
+
2131
+ > ul {
2132
+ @apply flex overflow-x-auto overscroll-x-contain snap-x snap-mandatory scroll-smooth motion-reduce:scroll-auto;
2133
+ }
2134
+ > button {
2135
+ @apply touch-manipulation;
2136
+ }
2137
+ > ul > li {
2138
+ @apply min-w-0 shrink-0 basis-full snap-start;
2139
+ }
2140
+ &[data-orientation='vertical'] > ul {
2141
+ @apply flex-col overflow-x-hidden overflow-y-auto snap-y;
2142
+ }
2143
+ &[data-orientation='vertical'] > ul > li {
2144
+ @apply min-h-0;
2145
+ }
2146
+ }
2147
+ }
2148
+
2149
+ /* Initialized controls replace the optional scrollbar utility. */
2150
+ @layer utilities {
2151
+ .carousel[data-carousel-initialized] > ul {
2152
+ scrollbar-width: none;
2153
+ &::-webkit-scrollbar { display: none; }
2154
+ }
2155
+ }
2156
+
2157
+ /* Code Block */
2158
+ @layer components {
2159
+ .code-block {
2160
+ @apply relative m-0 flex w-full min-w-0 flex-col overflow-hidden;
2161
+ }
2162
+ .code-block > output { @apply sr-only; }
2163
+ .code-block > header,
2164
+ .code-block > footer {
2165
+ @apply flex min-w-0 shrink-0 items-center;
2166
+ }
2167
+ .code-block > header > :first-child:not(div) {
2168
+ @apply min-w-0 truncate [&_svg]:inline-block [&_svg]:align-middle;
2169
+ }
2170
+ .code-block > div,
2171
+ .code-block > header > div {
2172
+ @apply ms-auto flex shrink-0 items-center;
2173
+ }
2174
+ .code-block > div {
2175
+ @apply absolute z-10 opacity-0 transition-opacity;
2176
+ }
2177
+ .code-block:is(:hover, :focus-within) > div {
2178
+ @apply opacity-100;
2179
+ }
2180
+ @media (pointer: coarse) {
2181
+ .code-block > div { opacity: 1; }
2182
+ }
2183
+ .code-block > pre {
2184
+ @apply scroll-fade m-0 min-h-0 min-w-0 overflow-auto text-start font-mono outline-none;
2185
+ direction: ltr;
2186
+ color-scheme: light;
2187
+ tab-size: 2;
2188
+ }
2189
+ html.dark .code-block > pre { color-scheme: dark; }
2190
+ .code-block > pre > code {
2191
+ @apply block w-auto min-h-lh min-w-max p-0;
2192
+ font-size: inherit;
2193
+ font-family: inherit;
2194
+ counter-reset: line;
2195
+ }
2196
+ .code-block > pre > code > span {
2197
+ /* Keep real newline text in the inline flow for native selection and copying. */
2198
+ @apply relative inline-block min-h-lh align-top;
2199
+ width: calc(100% + 2 * var(--_code-padding));
2200
+ counter-increment: line;
2201
+ }
2202
+ .code-block > pre[data-line-numbers] > code > span {
2203
+ padding-inline-start: calc(var(--_code-padding) + 4ch);
2204
+ }
2205
+ .code-block > pre[data-line-numbers] > code > span::before {
2206
+ content: counter(line);
2207
+ @apply absolute select-none;
2208
+ inset-inline-start: var(--_code-padding);
2209
+ width: 3ch;
2210
+ }
2211
+ @supports (content: counter(line) / '') {
2212
+ .code-block > pre[data-line-numbers] > code > span::before { content: counter(line) / ''; }
2213
+ }
2214
+ .code-block > pre[data-wrap] {
2215
+ @apply whitespace-pre-wrap break-words;
2216
+ }
2217
+ .code-block > pre[data-wrap] > code {
2218
+ @apply min-w-0;
2219
+ }
2220
+ .code-block button[data-copy] > svg:last-child:not(:first-child) { display: none; }
2221
+ .code-block button[data-copy][data-copied] > svg:first-child { display: none; }
2222
+ .code-block button[data-copy][data-copied] > svg:last-child { display: block; }
2223
+ .code-block > pre:not([data-wrap]) {
2224
+ /* Source code always reads left to right, including in RTL documents. */
2225
+ --_fade-axis: x;
2226
+ --_fade-direction: to right;
2227
+ }
2228
+ @media (forced-colors: active) {
2229
+ .code-block:has(> pre:focus-visible) { outline: 2px solid Highlight; outline-offset: 2px; }
2230
+ }
2231
+ @media (prefers-reduced-motion: reduce) {
2232
+ .code-block > div { transition: none; }
2233
+ }
2234
+ }
2235
+ /* Input OTP: the input remains the only form control and keyboard target. */
2236
+ @keyframes otp-caret {
2237
+ 0%, 70%, 100% { opacity: 1; }
2238
+ 20%, 50% { opacity: 0; }
2239
+ }
2240
+ @layer components {
2241
+ .input-otp {
2242
+ @apply relative inline-flex max-w-full items-center has-disabled:opacity-50;
2243
+ }
2244
+ .input-otp > div { display: none; }
2245
+ .input-otp[data-input-otp-initialized] > input {
2246
+ @apply absolute inset-0 z-20 h-full w-full cursor-text opacity-0;
2247
+ font: 16px/1 monospace;
2248
+ letter-spacing: -.5em;
2249
+ text-align: left;
2250
+ }
2251
+ .input-otp[data-input-otp-initialized] > input:disabled { cursor: not-allowed; }
2252
+ .input-otp[data-input-otp-initialized] > div {
2253
+ @apply pointer-events-none flex items-center;
2254
+ }
2255
+ /* Keep the native long-press paste menu available on iOS. */
2256
+ @supports (-webkit-touch-callout: none) {
2257
+ .input-otp[data-input-otp-initialized] > input[type='text'] {
2258
+ @apply opacity-100 border-transparent bg-transparent text-transparent caret-transparent outline-none;
2259
+ box-shadow: none;
2260
+ }
2261
+ .input-otp[data-input-otp-initialized] > input::selection { background: transparent; }
2262
+ .input-otp[data-input-otp-initialized] > input[type='text']:autofill { opacity: 0; }
2263
+ }
2264
+ .input-otp > div > div { @apply flex items-center; }
2265
+ .input-otp > div > div > span {
2266
+ @apply relative flex shrink-0 items-center justify-center;
2267
+ }
2268
+ .input-otp > div > div > span[data-active] { @apply z-10; }
2269
+ .input-otp > div > div > span[data-caret]::after {
2270
+ content: '';
2271
+ @apply pointer-events-none absolute;
2272
+ animation: otp-caret 1s infinite;
2273
+ }
2274
+ @media (prefers-reduced-motion: reduce) {
2275
+ .input-otp > div > div > span { transition: none; }
2276
+ .input-otp > div > div > span[data-caret]::after { animation: none; }
2277
+ }
2278
+ @media (forced-colors: active) {
2279
+ .input-otp:focus-within > div { outline: 2px solid Highlight; outline-offset: 3px; }
2280
+ .input-otp > div > div > span[data-active] { outline: 2px solid Highlight; outline-offset: -2px; }
2281
+ .input-otp > div > div > span[data-caret]::after { background: CanvasText; }
2282
+ }
2283
+ }
2284
+ /* Marker */
2285
+ @layer components {
2286
+ .marker {
2287
+ @apply relative flex w-full min-w-0 items-center;
2288
+ }
2289
+ .marker > svg {
2290
+ @apply shrink-0;
2291
+ }
2292
+ .marker > span {
2293
+ @apply min-w-0 wrap-break-word;
2294
+ }
2295
+ .marker[data-variant='separator']::before,
2296
+ .marker[data-variant='separator']::after {
2297
+ content: '';
2298
+ @apply min-w-0 flex-1 border-t;
2299
+ }
2300
+ .marker[data-variant='separator'] > span {
2301
+ @apply flex-none text-center;
2302
+ }
2303
+ }
2304
+ /* Message */
2305
+ @layer components {
2306
+ .message-group {
2307
+ @apply flex min-w-0 flex-col;
2308
+ }
2309
+ .message {
2310
+ @apply flex w-full min-w-0;
2311
+ }
2312
+ .message > .avatar {
2313
+ @apply shrink-0 self-end;
2314
+ }
2315
+ .message > div:last-child {
2316
+ @apply flex min-w-0 flex-1 flex-col wrap-break-word;
2317
+ }
2318
+ .message > div:last-child > :is(header, footer) {
2319
+ @apply flex max-w-full min-w-0 items-center;
2320
+ }
2321
+ .message[data-align='end'] {
2322
+ @apply flex-row-reverse;
2323
+ }
2324
+ .message[data-align='end'] > div:last-child {
2325
+ @apply items-end;
2326
+ }
2327
+ }
2328
+ @keyframes sheet-scroll-lock {
2329
+ from, to {
2330
+ scrollbar-gutter: stable;
2331
+ }
2332
+ }
2333
+
2334
+ /* Sheet */
2335
+ @layer components {
2336
+ /* Reserve the scrollbar gutter only when the page can scroll. */
2337
+ html:has(.sheet:modal) {
2338
+ overflow: hidden;
2339
+ animation: sheet-scroll-lock linear both;
2340
+ animation-timeline: scroll(self);
2341
+ }
2342
+
2343
+ .sheet {
2344
+ --_sheet-duration: 200ms;
2345
+ --_sheet-ease: ease-in-out;
2346
+ --_sheet-travel: 2.5rem;
2347
+ @apply fixed inset-0 m-0 size-auto max-h-none max-w-none overflow-visible bg-transparent p-0 text-inherit opacity-0 transition-all transition-discrete duration-(--_sheet-duration) ease-(--_sheet-ease) backdrop:opacity-0 backdrop:transition-all backdrop:transition-discrete backdrop:duration-200 backdrop:ease-in-out;
2348
+
2349
+ > * {
2350
+ @apply fixed z-50 flex h-auto flex-col transition-transform duration-(--_sheet-duration) ease-(--_sheet-ease) will-change-transform outline-hidden;
2351
+ }
2352
+
2353
+ &[data-side='bottom'] > * {
2354
+ @apply inset-x-0 bottom-0 translate-y-(--_sheet-travel);
2355
+ }
2356
+
2357
+ &[data-side='top'] > * {
2358
+ @apply inset-x-0 top-0 -translate-y-(--_sheet-travel);
2359
+ }
2360
+
2361
+ &[data-side='left'] > * {
2362
+ @apply inset-y-0 left-0 w-3/4 -translate-x-(--_sheet-travel);
2363
+ }
2364
+
2365
+ &:not([data-side]) > *,
2366
+ &[data-side='right'] > * {
2367
+ @apply inset-y-0 right-0 w-3/4 translate-x-(--_sheet-travel);
2368
+ }
2369
+
2370
+ &[data-closing] {
2371
+ @apply opacity-0 backdrop:opacity-0;
2372
+ }
2373
+
2374
+ &[data-closing][data-side='bottom'] > * {
2375
+ @apply translate-y-(--_sheet-travel);
2376
+ }
2377
+
2378
+ &[data-closing][data-side='top'] > * {
2379
+ @apply -translate-y-(--_sheet-travel);
2380
+ }
2381
+
2382
+ &[data-closing][data-side='left'] > * {
2383
+ @apply -translate-x-(--_sheet-travel);
2384
+ }
2385
+
2386
+ &[data-closing]:not([data-side]) > *,
2387
+ &[data-closing][data-side='right'] > * {
2388
+ @apply translate-x-(--_sheet-travel);
2389
+ }
2390
+
2391
+ &:is([open], :popover-open):not([data-closing]) {
2392
+ @apply opacity-100 backdrop:opacity-100;
2393
+
2394
+ > * {
2395
+ @apply translate-x-0 translate-y-0;
2396
+ }
2397
+
2398
+ @starting-style {
2399
+ @apply opacity-0 backdrop:opacity-0;
2400
+
2401
+ &[data-side='bottom'] > * {
2402
+ @apply translate-y-(--_sheet-travel);
2403
+ }
2404
+
2405
+ &[data-side='top'] > * {
2406
+ @apply -translate-y-(--_sheet-travel);
2407
+ }
2408
+
2409
+ &[data-side='left'] > * {
2410
+ @apply -translate-x-(--_sheet-travel);
2411
+ }
2412
+
2413
+ &:not([data-side]) > *,
2414
+ &[data-side='right'] > * {
2415
+ @apply translate-x-(--_sheet-travel);
2416
+ }
2417
+ }
2418
+ }
2419
+
2420
+ > * > header {
2421
+ @apply flex flex-col;
2422
+ }
2423
+
2424
+ > * > section {
2425
+ @apply min-h-0 flex-1 overflow-y-auto;
2426
+ }
2427
+
2428
+ > * > footer {
2429
+ @apply mt-auto flex flex-col;
2430
+ }
2431
+ }
2432
+
2433
+ .sheet:not([data-side]) > *,
2434
+ .sheet:is([data-side='left'], [data-side='right']) > * {
2435
+ @apply h-full sm:max-w-sm;
2436
+ }
2437
+ .sheet > * {
2438
+ @apply max-h-dvh;
2439
+ }
2440
+ .sheet > * > button:last-child {
2441
+ @apply absolute;
2442
+ }
2443
+ @media (prefers-reduced-motion: reduce) {
2444
+ .sheet,
2445
+ .sheet::backdrop,
2446
+ .sheet > * {
2447
+ transition: none;
2448
+ }
2449
+ }
2450
+ }
2451
+ /* Shimmer */
2452
+ @keyframes basecoat-shimmer {
2453
+ from { background-position: 100% 0; }
2454
+ to { background-position: 0 0; }
2455
+ }
2456
+
2457
+ @source inline("shimmer");
2458
+
2459
+ @utility shimmer {
2460
+ -webkit-text-fill-color: currentColor;
2461
+
2462
+ /* Keep text readable where the relative-color gradient is unsupported. */
2463
+ @supports (color: oklch(from currentColor l c h)) {
2464
+ --_shimmer-spread: var(--shimmer-spread, calc(3ch + 40px));
2465
+ --_shimmer-highlight: var(--shimmer-color, oklch(from currentColor l c h / calc(alpha * 0.2)));
2466
+ background-image: linear-gradient(
2467
+ calc(90deg + var(--shimmer-angle, 20deg)),
2468
+ currentColor calc(50% - var(--_shimmer-spread)),
2469
+ color-mix(in oklch, var(--_shimmer-highlight), currentColor 50%) calc(50% - var(--_shimmer-spread) * 0.5),
2470
+ var(--_shimmer-highlight) 50%,
2471
+ color-mix(in oklch, var(--_shimmer-highlight), currentColor 50%) calc(50% + var(--_shimmer-spread) * 0.5),
2472
+ currentColor calc(50% + var(--_shimmer-spread))
2473
+ );
2474
+ background-repeat: no-repeat;
2475
+ background-size: calc(200% + var(--_shimmer-spread) * 2) 100%;
2476
+ background-clip: text;
2477
+ -webkit-background-clip: text;
2478
+ -webkit-text-fill-color: transparent;
2479
+ animation: basecoat-shimmer var(--shimmer-duration, 2s) linear infinite;
2480
+
2481
+ html.dark & {
2482
+ --_shimmer-highlight: var(--shimmer-color, oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4)));
2483
+ }
2484
+ &:dir(rtl) { animation-direction: reverse; }
2485
+ }
2486
+
2487
+ @media (prefers-reduced-motion: reduce), (forced-colors: active) {
2488
+ animation: none;
2489
+ background-image: none;
2490
+ -webkit-text-fill-color: currentColor;
2491
+ }
2492
+ @media (forced-colors: active) { -webkit-text-fill-color: CanvasText; }
2493
+ }
2494
+
2495
+ @layer utilities {
2496
+ :where(.attachment:is([data-state='uploading'], [data-state='processing']) > section > :first-child) {
2497
+ @apply shimmer;
2498
+ }
2499
+ }
2500
+
2501
+ /* Trace */
2502
+ @layer components {
2503
+ .trace {
2504
+ @apply flex w-full min-w-0 flex-col;
2505
+ }
2506
+ .trace-line {
2507
+ @apply flex w-fit max-w-full min-w-0 items-center text-start;
2508
+ }
2509
+ .trace-line > span {
2510
+ @apply min-w-0 truncate;
2511
+ }
2512
+ .trace-line > :is(svg, small) {
2513
+ @apply shrink-0;
2514
+ }
2515
+ :is(a, button, summary).trace-line {
2516
+ @apply cursor-pointer;
2517
+ }
2518
+ details:has(> summary.trace-line) { @apply transition-details; }
2519
+ summary.trace-line::-webkit-details-marker { display: none; }
2520
+ summary.trace-line::after {
2521
+ content: '';
2522
+ @apply size-1.5 shrink-0 rotate-45 border-e border-t transition-transform motion-reduce:transition-none;
2523
+ }
2524
+ details[open] > summary.trace-line::after {
2525
+ @apply rotate-[135deg];
2526
+ }
2527
+ summary.trace-line:dir(rtl)::after { rotate: -45deg; }
2528
+ details[open] > summary.trace-line:dir(rtl)::after { rotate: -135deg; }
2529
+ summary.trace-line + div {
2530
+ @apply min-w-0 wrap-break-word;
2531
+ }
2532
+ }