@corbits/react-ui 0.2.0 → 0.3.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.
package/dist/styles.css CHANGED
@@ -5,7 +5,11 @@
5
5
  :root, :host {
6
6
  --font-sans: "Red Hat Display", "Open Sans", Roboto, Arial, sans-serif;
7
7
  --font-mono: "Space Mono", "Fira Code", Monaco, Consolas, monospace;
8
+ --color-blue-500: oklch(62.3% 0.214 259.815);
9
+ --color-gray-100: oklch(96.7% 0.003 264.542);
10
+ --color-gray-900: oklch(21% 0.034 264.665);
8
11
  --color-black: #000;
12
+ --color-white: #fff;
9
13
  --spacing: 0.25rem;
10
14
  --container-xs: 20rem;
11
15
  --container-sm: 24rem;
@@ -25,8 +29,11 @@
25
29
  --text-lg--line-height: calc(1.75 / 1.125);
26
30
  --text-xl: 1.25rem;
27
31
  --text-xl--line-height: calc(1.75 / 1.25);
32
+ --text-2xl: 1.5rem;
33
+ --text-2xl--line-height: calc(2 / 1.5);
28
34
  --text-3xl: 1.875rem;
29
35
  --text-3xl--line-height: calc(2.25 / 1.875);
36
+ --font-weight-normal: 400;
30
37
  --font-weight-medium: 500;
31
38
  --font-weight-semibold: 600;
32
39
  --font-weight-bold: 700;
@@ -47,10 +54,6 @@
47
54
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
48
55
  --default-font-family: "Red Hat Display", "Open Sans", Roboto, Arial, sans-serif;
49
56
  --default-mono-font-family: "Space Mono", "Fira Code", Monaco, Consolas, monospace;
50
- --text-icon-nav: var(--icon-size-nav);
51
- --text-icon-topbar: var(--icon-size-topbar);
52
- --text-icon-button: var(--icon-size-button);
53
- --text-icon-checkbox: var(--icon-size-checkbox);
54
57
  }
55
58
  }
56
59
  @layer base {
@@ -255,6 +258,9 @@
255
258
  .top-1\/2 {
256
259
  top: calc(1 / 2 * 100%);
257
260
  }
261
+ .top-4 {
262
+ top: calc(var(--spacing) * 4);
263
+ }
258
264
  .top-6 {
259
265
  top: calc(var(--spacing) * 6);
260
266
  }
@@ -276,15 +282,24 @@
276
282
  .right-2 {
277
283
  right: calc(var(--spacing) * 2);
278
284
  }
285
+ .right-4 {
286
+ right: calc(var(--spacing) * 4);
287
+ }
279
288
  .right-\[0\.85rem\] {
280
289
  right: 0.85rem;
281
290
  }
291
+ .right-auto {
292
+ right: auto;
293
+ }
282
294
  .-bottom-0\.5 {
283
295
  bottom: calc(var(--spacing) * -0.5);
284
296
  }
285
297
  .bottom-6 {
286
298
  bottom: calc(var(--spacing) * 6);
287
299
  }
300
+ .-left-0\.5 {
301
+ left: calc(var(--spacing) * -0.5);
302
+ }
288
303
  .left-0 {
289
304
  left: 0px;
290
305
  }
@@ -300,6 +315,12 @@
300
315
  .z-50 {
301
316
  z-index: 50;
302
317
  }
318
+ .z-90 {
319
+ z-index: 90;
320
+ }
321
+ .z-100 {
322
+ z-index: 100;
323
+ }
303
324
  .col-start-1 {
304
325
  grid-column-start: 1;
305
326
  }
@@ -491,6 +512,10 @@
491
512
  width: calc(var(--spacing) * 12);
492
513
  height: calc(var(--spacing) * 12);
493
514
  }
515
+ .size-14 {
516
+ width: calc(var(--spacing) * 14);
517
+ height: calc(var(--spacing) * 14);
518
+ }
494
519
  .size-\[1\.8rem\] {
495
520
  width: 1.8rem;
496
521
  height: 1.8rem;
@@ -523,6 +548,12 @@
523
548
  .h-6 {
524
549
  height: calc(var(--spacing) * 6);
525
550
  }
551
+ .h-6\.5 {
552
+ height: calc(var(--spacing) * 6.5);
553
+ }
554
+ .h-7 {
555
+ height: calc(var(--spacing) * 7);
556
+ }
526
557
  .h-8 {
527
558
  height: calc(var(--spacing) * 8);
528
559
  }
@@ -538,6 +569,9 @@
538
569
  .h-12 {
539
570
  height: calc(var(--spacing) * 12);
540
571
  }
572
+ .h-28 {
573
+ height: calc(var(--spacing) * 28);
574
+ }
541
575
  .h-40 {
542
576
  height: calc(var(--spacing) * 40);
543
577
  }
@@ -550,6 +584,9 @@
550
584
  .h-96 {
551
585
  height: calc(var(--spacing) * 96);
552
586
  }
587
+ .h-\[18px\] {
588
+ height: 18px;
589
+ }
553
590
  .h-\[520px\] {
554
591
  height: 520px;
555
592
  }
@@ -562,6 +599,9 @@
562
599
  .h-px {
563
600
  height: 1px;
564
601
  }
602
+ .max-h-40 {
603
+ max-height: calc(var(--spacing) * 40);
604
+ }
565
605
  .max-h-48 {
566
606
  max-height: calc(var(--spacing) * 48);
567
607
  }
@@ -571,6 +611,9 @@
571
611
  .max-h-64 {
572
612
  max-height: calc(var(--spacing) * 64);
573
613
  }
614
+ .max-h-80 {
615
+ max-height: calc(var(--spacing) * 80);
616
+ }
574
617
  .max-h-96 {
575
618
  max-height: calc(var(--spacing) * 96);
576
619
  }
@@ -580,6 +623,9 @@
580
623
  .max-h-\[75vh\] {
581
624
  max-height: 75vh;
582
625
  }
626
+ .max-h-\[80vh\] {
627
+ max-height: 80vh;
628
+ }
583
629
  .max-h-\[480px\] {
584
630
  max-height: 480px;
585
631
  }
@@ -601,6 +647,9 @@
601
647
  .min-h-16 {
602
648
  min-height: calc(var(--spacing) * 16);
603
649
  }
650
+ .min-h-dvh {
651
+ min-height: 100dvh;
652
+ }
604
653
  .min-h-full {
605
654
  min-height: 100%;
606
655
  }
@@ -616,6 +665,9 @@
616
665
  .w-1\/3 {
617
666
  width: calc(1 / 3 * 100%);
618
667
  }
668
+ .w-3\/4 {
669
+ width: calc(3 / 4 * 100%);
670
+ }
619
671
  .w-4 {
620
672
  width: calc(var(--spacing) * 4);
621
673
  }
@@ -625,6 +677,9 @@
625
677
  .w-6 {
626
678
  width: calc(var(--spacing) * 6);
627
679
  }
680
+ .w-7 {
681
+ width: calc(var(--spacing) * 7);
682
+ }
628
683
  .w-8 {
629
684
  width: calc(var(--spacing) * 8);
630
685
  }
@@ -661,6 +716,9 @@
661
716
  .w-96 {
662
717
  width: calc(var(--spacing) * 96);
663
718
  }
719
+ .w-\[18px\] {
720
+ width: 18px;
721
+ }
664
722
  .w-\[30px\] {
665
723
  width: 30px;
666
724
  }
@@ -682,9 +740,15 @@
682
740
  .max-w-40 {
683
741
  max-width: calc(var(--spacing) * 40);
684
742
  }
743
+ .max-w-44 {
744
+ max-width: calc(var(--spacing) * 44);
745
+ }
685
746
  .max-w-64 {
686
747
  max-width: calc(var(--spacing) * 64);
687
748
  }
749
+ .max-w-\[26rem\] {
750
+ max-width: 26rem;
751
+ }
688
752
  .max-w-\[32ch\] {
689
753
  max-width: 32ch;
690
754
  }
@@ -727,6 +791,9 @@
727
791
  .min-w-32 {
728
792
  min-width: calc(var(--spacing) * 32);
729
793
  }
794
+ .min-w-64 {
795
+ min-width: calc(var(--spacing) * 64);
796
+ }
730
797
  .min-w-\[3\.5rem\] {
731
798
  min-width: 3.5rem;
732
799
  }
@@ -818,6 +885,12 @@
818
885
  .\[animation\:corbits-boot-sweep_1\.4s_ease-in-out_infinite\] {
819
886
  animation: corbits-boot-sweep 1.4s ease-in-out infinite;
820
887
  }
888
+ .\[animation\:corbits-fade-in_150ms_ease-out\] {
889
+ animation: corbits-fade-in 150ms ease-out;
890
+ }
891
+ .\[animation\:corbits-fade-in_200ms_ease-out\] {
892
+ animation: corbits-fade-in 200ms ease-out;
893
+ }
821
894
  .\[animation\:corbits-rail-block-in_200ms_var\(--ease-out\)_both\] {
822
895
  animation: corbits-rail-block-in 200ms var(--ease-out) both;
823
896
  }
@@ -863,6 +936,9 @@
863
936
  .resize-none {
864
937
  resize: none;
865
938
  }
939
+ .resize-y {
940
+ resize: vertical;
941
+ }
866
942
  .\[scrollbar-width\:thin\] {
867
943
  scrollbar-width: thin;
868
944
  }
@@ -893,6 +969,9 @@
893
969
  .grid-cols-\[minmax\(7rem\,11rem\)_1fr_minmax\(4\.5rem\,6rem\)\] {
894
970
  grid-template-columns: minmax(7rem,11rem) 1fr minmax(4.5rem,6rem);
895
971
  }
972
+ .grid-cols-\[repeat\(auto-fill\,minmax\(11rem\,1fr\)\)\] {
973
+ grid-template-columns: repeat(auto-fill,minmax(11rem,1fr));
974
+ }
896
975
  .grid-rows-\[0fr\] {
897
976
  grid-template-rows: 0fr;
898
977
  }
@@ -929,6 +1008,9 @@
929
1008
  .justify-end {
930
1009
  justify-content: flex-end;
931
1010
  }
1011
+ .justify-start {
1012
+ justify-content: flex-start;
1013
+ }
932
1014
  .gap-0 {
933
1015
  gap: 0px;
934
1016
  }
@@ -991,6 +1073,16 @@
991
1073
  .gap-y-1 {
992
1074
  row-gap: var(--spacing);
993
1075
  }
1076
+ :where(.divide-y > :not(:last-child)) {
1077
+ --tw-divide-y-reverse: 0;
1078
+ border-bottom-style: var(--tw-border-style);
1079
+ border-top-style: var(--tw-border-style);
1080
+ border-top-width: calc(1px * var(--tw-divide-y-reverse));
1081
+ border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
1082
+ }
1083
+ :where(.divide-border > :not(:last-child)) {
1084
+ border-color: var(--border);
1085
+ }
994
1086
  .self-start {
995
1087
  align-self: flex-start;
996
1088
  }
@@ -1029,9 +1121,15 @@
1029
1121
  .rounded-\[3px\] {
1030
1122
  border-radius: 3px;
1031
1123
  }
1124
+ .rounded-\[10px\] {
1125
+ border-radius: 10px;
1126
+ }
1032
1127
  .rounded-\[12px\] {
1033
1128
  border-radius: 12px;
1034
1129
  }
1130
+ .rounded-\[var\(--avatar-radius\,var\(--radius\)\)\] {
1131
+ border-radius: var(--avatar-radius,var(--radius));
1132
+ }
1035
1133
  .rounded-\[var\(--sidebar-row-radius\)\] {
1036
1134
  border-radius: var(--sidebar-row-radius);
1037
1135
  }
@@ -1168,12 +1266,24 @@
1168
1266
  .bg-background {
1169
1267
  background-color: var(--background);
1170
1268
  }
1269
+ .bg-black {
1270
+ background-color: var(--color-black);
1271
+ }
1171
1272
  .bg-black\/50 {
1172
1273
  background-color: color-mix(in srgb, #000 50%, transparent);
1173
1274
  @supports (color: color-mix(in lab, red, red)) {
1174
1275
  background-color: color-mix(in oklab, var(--color-black) 50%, transparent);
1175
1276
  }
1176
1277
  }
1278
+ .bg-black\/60 {
1279
+ background-color: color-mix(in srgb, #000 60%, transparent);
1280
+ @supports (color: color-mix(in lab, red, red)) {
1281
+ background-color: color-mix(in oklab, var(--color-black) 60%, transparent);
1282
+ }
1283
+ }
1284
+ .bg-blue-500 {
1285
+ background-color: var(--color-blue-500);
1286
+ }
1177
1287
  .bg-border {
1178
1288
  background-color: var(--border);
1179
1289
  }
@@ -1225,6 +1335,9 @@
1225
1335
  background-color: color-mix(in oklab, var(--muted) 40%, transparent);
1226
1336
  }
1227
1337
  }
1338
+ .bg-ok {
1339
+ background-color: var(--ok);
1340
+ }
1228
1341
  .bg-popover {
1229
1342
  background-color: var(--popover);
1230
1343
  }
@@ -1270,6 +1383,9 @@
1270
1383
  .bg-transparent {
1271
1384
  background-color: transparent;
1272
1385
  }
1386
+ .bg-white {
1387
+ background-color: var(--color-white);
1388
+ }
1273
1389
  .\[background-image\:linear-gradient\(90deg\,var\(--muted-foreground\)_40\%\,var\(--foreground\)_50\%\,var\(--muted-foreground\)_60\%\)\] {
1274
1390
  background-image: linear-gradient(90deg,var(--muted-foreground) 40%,var(--foreground) 50%,var(--muted-foreground) 60%);
1275
1391
  }
@@ -1303,6 +1419,9 @@
1303
1419
  .fill-thinking-base {
1304
1420
  fill: var(--thinking-base);
1305
1421
  }
1422
+ .object-cover {
1423
+ object-fit: cover;
1424
+ }
1306
1425
  .p-0 {
1307
1426
  padding: 0px;
1308
1427
  }
@@ -1387,6 +1506,9 @@
1387
1506
  .py-3 {
1388
1507
  padding-block: calc(var(--spacing) * 3);
1389
1508
  }
1509
+ .py-4 {
1510
+ padding-block: calc(var(--spacing) * 4);
1511
+ }
1390
1512
  .py-5 {
1391
1513
  padding-block: calc(var(--spacing) * 5);
1392
1514
  }
@@ -1432,6 +1554,9 @@
1432
1554
  .pr-8 {
1433
1555
  padding-right: calc(var(--spacing) * 8);
1434
1556
  }
1557
+ .pb-2 {
1558
+ padding-bottom: calc(var(--spacing) * 2);
1559
+ }
1435
1560
  .pb-3 {
1436
1561
  padding-bottom: calc(var(--spacing) * 3);
1437
1562
  }
@@ -1474,6 +1599,10 @@
1474
1599
  .font-sans {
1475
1600
  font-family: "Red Hat Display", "Open Sans", Roboto, Arial, sans-serif;
1476
1601
  }
1602
+ .text-2xl {
1603
+ font-size: var(--text-2xl);
1604
+ line-height: var(--tw-leading, var(--text-2xl--line-height));
1605
+ }
1477
1606
  .text-3xl {
1478
1607
  font-size: var(--text-3xl);
1479
1608
  line-height: var(--tw-leading, var(--text-3xl--line-height));
@@ -1507,6 +1636,12 @@
1507
1636
  .text-\[0\.8125rem\] {
1508
1637
  font-size: 0.8125rem;
1509
1638
  }
1639
+ .text-\[2\.75rem\] {
1640
+ font-size: 2.75rem;
1641
+ }
1642
+ .text-\[6px\] {
1643
+ font-size: 6px;
1644
+ }
1510
1645
  .text-\[7px\] {
1511
1646
  font-size: 7px;
1512
1647
  }
@@ -1597,6 +1732,10 @@
1597
1732
  --tw-font-weight: var(--font-weight-medium);
1598
1733
  font-weight: var(--font-weight-medium);
1599
1734
  }
1735
+ .font-normal {
1736
+ --tw-font-weight: var(--font-weight-normal);
1737
+ font-weight: var(--font-weight-normal);
1738
+ }
1600
1739
  .font-semibold {
1601
1740
  --tw-font-weight: var(--font-weight-semibold);
1602
1741
  font-weight: var(--font-weight-semibold);
@@ -1660,12 +1799,15 @@
1660
1799
  .whitespace-pre-wrap {
1661
1800
  white-space: pre-wrap;
1662
1801
  }
1663
- .text-accent {
1664
- color: var(--accent);
1802
+ .\!text-white {
1803
+ color: var(--color-white) !important;
1665
1804
  }
1666
1805
  .text-accent-foreground {
1667
1806
  color: var(--accent-foreground);
1668
1807
  }
1808
+ .text-black {
1809
+ color: var(--color-black);
1810
+ }
1669
1811
  .text-card-foreground {
1670
1812
  color: var(--card-foreground);
1671
1813
  }
@@ -1678,6 +1820,9 @@
1678
1820
  .text-foreground {
1679
1821
  color: var(--foreground);
1680
1822
  }
1823
+ .text-gray-900 {
1824
+ color: var(--color-gray-900);
1825
+ }
1681
1826
  .text-muted-foreground {
1682
1827
  color: var(--muted-foreground);
1683
1828
  }
@@ -1687,24 +1832,15 @@
1687
1832
  .text-popover-foreground {
1688
1833
  color: var(--popover-foreground);
1689
1834
  }
1690
- .text-primary {
1691
- color: var(--primary);
1692
- }
1693
1835
  .text-primary-emphasis {
1694
1836
  color: var(--primary-emphasis);
1695
1837
  }
1696
1838
  .text-primary-foreground {
1697
1839
  color: var(--primary-foreground);
1698
1840
  }
1699
- .text-secondary {
1700
- color: var(--secondary);
1701
- }
1702
1841
  .text-secondary-foreground {
1703
1842
  color: var(--secondary-foreground);
1704
1843
  }
1705
- .text-success {
1706
- color: var(--success);
1707
- }
1708
1844
  .text-success-foreground {
1709
1845
  color: var(--success-foreground);
1710
1846
  }
@@ -1714,6 +1850,9 @@
1714
1850
  .text-warn {
1715
1851
  color: var(--warn);
1716
1852
  }
1853
+ .text-white {
1854
+ color: var(--color-white);
1855
+ }
1717
1856
  .capitalize {
1718
1857
  text-transform: capitalize;
1719
1858
  }
@@ -1746,6 +1885,10 @@
1746
1885
  .underline-offset-4 {
1747
1886
  text-underline-offset: 4px;
1748
1887
  }
1888
+ .antialiased {
1889
+ -webkit-font-smoothing: antialiased;
1890
+ -moz-osx-font-smoothing: grayscale;
1891
+ }
1749
1892
  .accent-\[var\(--primary\)\] {
1750
1893
  accent-color: var(--primary);
1751
1894
  }
@@ -1798,9 +1941,16 @@
1798
1941
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
1799
1942
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1800
1943
  }
1944
+ .ring-2 {
1945
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
1946
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
1947
+ }
1801
1948
  .ring-background {
1802
1949
  --tw-ring-color: var(--background);
1803
1950
  }
1951
+ .ring-primary {
1952
+ --tw-ring-color: var(--primary);
1953
+ }
1804
1954
  .outline {
1805
1955
  outline-style: var(--tw-outline-style);
1806
1956
  outline-width: 1px;
@@ -1851,6 +2001,11 @@
1851
2001
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1852
2002
  transition-duration: var(--tw-duration, var(--default-transition-duration));
1853
2003
  }
2004
+ .transition-all {
2005
+ transition-property: all;
2006
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
2007
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
2008
+ }
1854
2009
  .transition-colors {
1855
2010
  transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
1856
2011
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -2042,6 +2197,17 @@
2042
2197
  opacity: 100%;
2043
2198
  }
2044
2199
  }
2200
+ .focus\:border-border-strong:focus {
2201
+ border-color: var(--border-strong);
2202
+ }
2203
+ .focus\:ring-1:focus {
2204
+ --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
2205
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2206
+ }
2207
+ .focus\:outline-none:focus {
2208
+ --tw-outline-style: none;
2209
+ outline-style: none;
2210
+ }
2045
2211
  .focus-visible\:text-foreground:focus-visible {
2046
2212
  color: var(--foreground);
2047
2213
  }
@@ -2059,6 +2225,9 @@
2059
2225
  --tw-outline-style: none;
2060
2226
  outline-style: none;
2061
2227
  }
2228
+ .active\:scale-\[0\.97\]:active {
2229
+ scale: 0.97;
2230
+ }
2062
2231
  .active\:brightness-95:active {
2063
2232
  --tw-brightness: brightness(95%);
2064
2233
  filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
@@ -2270,6 +2439,12 @@
2270
2439
  .lg\:grid-cols-3 {
2271
2440
  grid-template-columns: repeat(3, minmax(0, 1fr));
2272
2441
  }
2442
+ .lg\:flex-col {
2443
+ flex-direction: column;
2444
+ }
2445
+ .lg\:overflow-visible {
2446
+ overflow: visible;
2447
+ }
2273
2448
  .lg\:border-r {
2274
2449
  border-right-style: var(--tw-border-style);
2275
2450
  border-right-width: 1px;
@@ -2280,6 +2455,28 @@
2280
2455
  .lg\:pr-6 {
2281
2456
  padding-right: calc(var(--spacing) * 6);
2282
2457
  }
2458
+ .lg\:pb-0 {
2459
+ padding-bottom: 0px;
2460
+ }
2461
+ }
2462
+ .dark\:bg-\[color-mix\(in_srgb\,var\(--foreground\)_14\%\,var\(--muted\)\)\]:is(.dark *) {
2463
+ background-color: var(--foreground);
2464
+ @supports (color: color-mix(in lab, red, red)) {
2465
+ background-color: color-mix(in srgb,var(--foreground) 14%,var(--muted));
2466
+ }
2467
+ }
2468
+ .dark\:bg-black:is(.dark *) {
2469
+ background-color: var(--color-black);
2470
+ }
2471
+ .dark\:text-gray-100:is(.dark *) {
2472
+ color: var(--color-gray-100);
2473
+ }
2474
+ .dark\:shadow-\[inset_0_0_0_1px_color-mix\(in_srgb\,var\(--foreground\)_14\%\,transparent\)\]:is(.dark *) {
2475
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--foreground));
2476
+ @supports (color: color-mix(in lab, red, red)) {
2477
+ --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, color-mix(in srgb,var(--foreground) 14%,transparent));
2478
+ }
2479
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
2283
2480
  }
2284
2481
  @media (forced-colors: active) {
2285
2482
  .forced-colors\:animate-none {
@@ -2301,6 +2498,10 @@
2301
2498
  .\[\&_\[aria-label\=Close\]\]\:hidden [aria-label=Close] {
2302
2499
  display: none;
2303
2500
  }
2501
+ .\[\&_svg\]\:size-3 svg {
2502
+ width: calc(var(--spacing) * 3);
2503
+ height: calc(var(--spacing) * 3);
2504
+ }
2304
2505
  .\[\&_svg\]\:size-3\.5 svg {
2305
2506
  width: calc(var(--spacing) * 3.5);
2306
2507
  height: calc(var(--spacing) * 3.5);
@@ -2686,6 +2887,36 @@
2686
2887
  outline-offset: 2px;
2687
2888
  }
2688
2889
  }
2890
+ @property --corbits-avatar-angle {
2891
+ syntax: "<angle>";
2892
+ inherits: false;
2893
+ initial-value: 0deg;
2894
+ }
2895
+ @keyframes corbits-avatar-orbit {
2896
+ to {
2897
+ --corbits-avatar-angle: 360deg;
2898
+ }
2899
+ }
2900
+ .corbits-avatar-orbit {
2901
+ position: absolute;
2902
+ inset: -4px;
2903
+ padding: 2px;
2904
+ background: conic-gradient( from var(--corbits-avatar-angle), var(--primary-emphasis) 0deg 90deg, transparent 90deg 360deg ), var(--foreground);
2905
+ @supports (color: color-mix(in lab, red, red)) {
2906
+ background: conic-gradient( from var(--corbits-avatar-angle), var(--primary-emphasis) 0deg 90deg, transparent 90deg 360deg ), color-mix(in srgb, var(--foreground) 12%, transparent);
2907
+ }
2908
+ -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
2909
+ -webkit-mask-composite: xor;
2910
+ mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
2911
+ animation: corbits-avatar-orbit 1.4s linear infinite;
2912
+ pointer-events: none;
2913
+ }
2914
+ @media (prefers-reduced-motion: reduce) {
2915
+ .corbits-avatar-orbit {
2916
+ animation: none;
2917
+ --corbits-avatar-angle: 120deg;
2918
+ }
2919
+ }
2689
2920
  @keyframes corbits-thinking-sweep {
2690
2921
  0% {
2691
2922
  transform: translateX(8px);
@@ -2792,6 +3023,11 @@
2792
3023
  inherits: false;
2793
3024
  initial-value: 0;
2794
3025
  }
3026
+ @property --tw-divide-y-reverse {
3027
+ syntax: "*";
3028
+ inherits: false;
3029
+ initial-value: 0;
3030
+ }
2795
3031
  @property --tw-border-style {
2796
3032
  syntax: "*";
2797
3033
  inherits: false;
@@ -3026,6 +3262,7 @@
3026
3262
  --tw-skew-x: initial;
3027
3263
  --tw-skew-y: initial;
3028
3264
  --tw-space-y-reverse: 0;
3265
+ --tw-divide-y-reverse: 0;
3029
3266
  --tw-border-style: solid;
3030
3267
  --tw-leading: initial;
3031
3268
  --tw-font-weight: initial;
@@ -3075,6 +3312,7 @@
3075
3312
  --tw-duration: initial;
3076
3313
  --tw-ease: initial;
3077
3314
  --tw-content: "";
3315
+ --corbits-avatar-angle: 0deg;
3078
3316
  }
3079
3317
  }
3080
3318
  }
package/dist/theme.css CHANGED
@@ -605,6 +605,47 @@
605
605
  }
606
606
  }
607
607
 
608
+ /* Avatar working orbit. The conic angle is a registered property so the arc
609
+ sweeps while the masked ring (and the avatar it encircles) never rotates.
610
+ Used by ui/avatar. */
611
+ @property --corbits-avatar-angle {
612
+ syntax: "<angle>";
613
+ inherits: false;
614
+ initial-value: 0deg;
615
+ }
616
+ @keyframes corbits-avatar-orbit {
617
+ to {
618
+ --corbits-avatar-angle: 360deg;
619
+ }
620
+ }
621
+ .corbits-avatar-orbit {
622
+ position: absolute;
623
+ inset: -4px;
624
+ padding: 2px;
625
+ background:
626
+ conic-gradient(
627
+ from var(--corbits-avatar-angle),
628
+ var(--primary-emphasis) 0deg 90deg,
629
+ transparent 90deg 360deg
630
+ ),
631
+ color-mix(in srgb, var(--foreground) 12%, transparent);
632
+ -webkit-mask:
633
+ linear-gradient(#000 0 0) content-box,
634
+ linear-gradient(#000 0 0);
635
+ -webkit-mask-composite: xor;
636
+ mask:
637
+ linear-gradient(#000 0 0) content-box exclude,
638
+ linear-gradient(#000 0 0);
639
+ animation: corbits-avatar-orbit 1.4s linear infinite;
640
+ pointer-events: none;
641
+ }
642
+ @media (prefers-reduced-motion: reduce) {
643
+ .corbits-avatar-orbit {
644
+ animation: none;
645
+ --corbits-avatar-angle: 120deg;
646
+ }
647
+ }
648
+
608
649
  /* Ridge-study motion: keep geometry and timing in the original 100 x 70 space. */
609
650
  @keyframes corbits-thinking-sweep {
610
651
  0% {
@@ -1,11 +1,23 @@
1
1
  import type { ReactNode } from "react";
2
2
  export type AvatarTone = "neutral" | "agent" | "agent2" | "agent3";
3
+ export type AvatarShape = "circle" | "square";
4
+ export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
5
+ export type AvatarStatus = "working" | "ready" | "idle";
3
6
  export type AvatarProps = {
4
7
  /** One or two characters shown when no image is provided. */
5
8
  readonly initials: string;
6
9
  readonly label: string;
7
10
  readonly tone?: AvatarTone;
8
- readonly size?: "sm" | "md" | "lg";
11
+ readonly size?: AvatarSize;
12
+ /**
13
+ * `circle` is fully round; `square` rounds by `--avatar-radius` (defaults to
14
+ * `--radius`). Omitted keeps the unrounded default.
15
+ */
16
+ readonly shape?: AvatarShape;
17
+ /** Corner dot marking state; the label gains the state for assistive tech. */
18
+ readonly status?: AvatarStatus;
19
+ /** Orange arc circling the avatar. Static under reduced motion. */
20
+ readonly orbit?: boolean;
9
21
  /** Tenant monogram badge overlaid on the corner. */
10
22
  readonly tenantMonogram?: string;
11
23
  readonly className?: string;
@@ -15,23 +27,28 @@ export type AvatarProps = {
15
27
  * intentionally unsupported here: identity headers should not flash or
16
28
  * depend on third-party avatar hosts.
17
29
  */
18
- export declare function Avatar({ initials, label, tone, size, tenantMonogram, className, }: AvatarProps): import("react").JSX.Element;
30
+ export declare function Avatar({ initials, label, tone, size, shape, status, orbit, tenantMonogram, className, }: AvatarProps): import("react").JSX.Element;
19
31
  export type AvatarStackItem = {
20
32
  readonly id: string;
21
33
  readonly initials: string;
22
34
  readonly label: string;
23
35
  readonly tone?: AvatarTone;
36
+ readonly shape?: AvatarShape;
37
+ readonly status?: AvatarStatus;
38
+ readonly orbit?: boolean;
24
39
  readonly tenantMonogram?: string;
25
40
  };
26
41
  export type AvatarStackProps = {
27
42
  readonly items: readonly AvatarStackItem[];
28
43
  /** Cap visible avatars; remainder becomes a +N chip. */
29
44
  readonly max?: number;
30
- readonly size?: "sm" | "md";
45
+ readonly size?: AvatarSize;
46
+ /** Default shape for every item; an item's own `shape` wins. */
47
+ readonly shape?: AvatarShape;
31
48
  readonly className?: string;
32
49
  };
33
50
  /**
34
51
  * Overlapping avatar stack for thread participants and channel members.
35
52
  */
36
- export declare function AvatarStack({ items, max, size, className, }: AvatarStackProps): import("react").JSX.Element;
53
+ export declare function AvatarStack({ items, max, size, shape, className, }: AvatarStackProps): import("react").JSX.Element;
37
54
  export type AvatarStackSlot = ReactNode;
package/dist/ui/avatar.js CHANGED
@@ -1,36 +1,64 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
3
  const SIZE_CLASS = {
4
+ xs: "size-5 text-[8px]",
4
5
  sm: "size-6 text-[10px]",
5
6
  md: "size-8 text-xs",
6
7
  lg: "size-10 text-sm",
8
+ xl: "size-14 text-lg",
9
+ };
10
+ const SHAPE_CLASS = {
11
+ circle: "rounded-full",
12
+ square: "rounded-[var(--avatar-radius,var(--radius))]",
13
+ };
14
+ const STATUS_CLASS = {
15
+ working: "bg-primary-emphasis",
16
+ ready: "bg-ok",
17
+ idle: "bg-muted-foreground",
18
+ };
19
+ const DOT_SIZE = {
20
+ xs: "size-1.5",
21
+ sm: "size-2",
22
+ md: "size-2.5",
23
+ lg: "size-3",
24
+ xl: "size-3.5",
7
25
  };
8
26
  const TONE_CLASS = {
9
- neutral: "bg-muted text-muted-foreground",
27
+ neutral: "bg-muted text-muted-foreground dark:bg-[color-mix(in_srgb,var(--foreground)_14%,var(--muted))]",
10
28
  agent: "bg-primary text-primary-foreground",
11
29
  agent2: "bg-accent text-accent-foreground",
12
30
  agent3: "bg-success text-success-foreground",
13
31
  };
14
32
  const BADGE_SIZE = {
33
+ xs: "size-2.5 text-[6px]",
15
34
  sm: "size-3 text-[7px]",
16
35
  md: "size-3.5 text-[8px]",
17
36
  lg: "size-4 text-[9px]",
37
+ xl: "size-5 text-[10px]",
18
38
  };
19
39
  /**
20
40
  * Initials avatar with optional tenant monogram badge. Images are
21
41
  * intentionally unsupported here: identity headers should not flash or
22
42
  * depend on third-party avatar hosts.
23
43
  */
24
- export function Avatar({ initials, label, tone = "neutral", size = "md", tenantMonogram, className, }) {
25
- return (_jsxs("span", { role: "img", "aria-label": label, className: cn("relative inline-flex shrink-0 items-center justify-center font-bold uppercase", SIZE_CLASS[size], TONE_CLASS[tone], className), children: [_jsx("span", { "aria-hidden": true, children: initials.slice(0, 2) }), tenantMonogram === undefined ? null : (_jsx("span", { "aria-hidden": true, className: cn("absolute -right-0.5 -bottom-0.5 inline-flex items-center justify-center border border-background bg-muted font-bold uppercase text-muted-foreground", BADGE_SIZE[size]), children: tenantMonogram.slice(0, 1) }))] }));
44
+ export function Avatar({ initials, label, tone = "neutral", size = "md", shape, status, orbit = false, tenantMonogram, className, }) {
45
+ return (_jsxs("span", { role: "img", "aria-label": status === undefined ? label : `${label}, ${status}`, className: cn("relative inline-flex shrink-0 items-center justify-center font-bold uppercase", SIZE_CLASS[size], TONE_CLASS[tone], "dark:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--foreground)_14%,transparent)]", shape !== undefined && SHAPE_CLASS[shape], className), children: [orbit ? (_jsx("span", { "aria-hidden": true, className: "corbits-avatar-orbit", style: {
46
+ borderRadius: shape === "circle"
47
+ ? "9999px"
48
+ : shape === "square"
49
+ ? "calc(var(--avatar-radius, var(--radius)) + 4px)"
50
+ : "0",
51
+ } })) : null, _jsx("span", { "aria-hidden": true, children: initials.slice(0, 2) }), tenantMonogram === undefined ? null : (_jsx("span", { "aria-hidden": true, className: cn("absolute -right-0.5 -bottom-0.5 inline-flex items-center justify-center border border-background bg-muted font-bold uppercase text-muted-foreground", BADGE_SIZE[size]), children: tenantMonogram.slice(0, 1) })), status === undefined ? null : (_jsx("span", { "aria-hidden": true, className: cn("absolute -right-0.5 -bottom-0.5 rounded-full ring-2 ring-background", DOT_SIZE[size], STATUS_CLASS[status], tenantMonogram !== undefined && "right-auto -left-0.5") }))] }));
26
52
  }
27
53
  /**
28
54
  * Overlapping avatar stack for thread participants and channel members.
29
55
  */
30
- export function AvatarStack({ items, max = 4, size = "sm", className, }) {
56
+ export function AvatarStack({ items, max = 4, size = "sm", shape, className, }) {
31
57
  const visible = items.slice(0, max);
32
58
  const overflow = items.length - visible.length;
33
- return (_jsxs("span", { className: cn("inline-flex items-center", className), role: "group", "aria-label": "Participants", children: [visible.map((item, index) => (_jsx(Avatar, { initials: item.initials, label: item.label, ...(item.tone === undefined ? {} : { tone: item.tone }), ...(item.tenantMonogram === undefined
59
+ return (_jsxs("span", { className: cn("inline-flex items-center", className), role: "group", "aria-label": "Participants", children: [visible.map((item, index) => (_jsx(Avatar, { initials: item.initials, label: item.label, ...(item.tone === undefined ? {} : { tone: item.tone }), ...(item.shape === undefined && shape === undefined
60
+ ? {}
61
+ : { shape: item.shape ?? shape }), ...(item.status === undefined ? {} : { status: item.status }), ...(item.orbit === undefined ? {} : { orbit: item.orbit }), ...(item.tenantMonogram === undefined
34
62
  ? {}
35
- : { tenantMonogram: item.tenantMonogram }), size: size, className: cn("ring-1 ring-background", index > 0 && "-ml-1.5") }, item.id))), overflow <= 0 ? null : (_jsxs("span", { className: cn("inline-flex items-center justify-center bg-muted font-mono font-semibold text-muted-foreground ring-1 ring-background", SIZE_CLASS[size], visible.length > 0 && "-ml-1.5"), "aria-label": `${overflow} more`, children: ["+", overflow] }))] }));
63
+ : { tenantMonogram: item.tenantMonogram }), size: size, className: cn("ring-1 ring-background", index > 0 && "-ml-1.5") }, item.id))), overflow <= 0 ? null : (_jsxs("span", { className: cn("inline-flex items-center justify-center bg-muted font-mono font-semibold text-muted-foreground ring-1 ring-background", shape !== undefined && SHAPE_CLASS[shape], SIZE_CLASS[size], visible.length > 0 && "-ml-1.5"), "aria-label": `${overflow} more`, children: ["+", overflow] }))] }));
36
64
  }
@@ -85,12 +85,26 @@ function PaletteFooter({ footer }) {
85
85
  */
86
86
  export function CommandPalette({ open, onOpenChange, query, onQueryChange, groups, onSelect, loading = false, error, hasMore = false, onLoadMore, placeholder = "Search or jump to…", inputAccessory, footer, className, }) {
87
87
  const inputRef = useRef(null);
88
+ const openerRef = useRef(null);
88
89
  const machine = usePaletteMachine(groups, onSelect, () => onOpenChange(false));
89
90
  useEffect(() => {
90
91
  if (open)
91
92
  inputRef.current?.focus();
92
93
  }, [open]);
93
- return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: cn("max-w-xl gap-0 p-0 [&_[aria-label=Close]]:hidden", className), onKeyDown: machine.onKeyDown, children: [_jsx(DialogTitle, { className: "sr-only", children: "Search" }), _jsxs("div", { className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4", children: [inputAccessory === undefined ? null : (_jsx("div", { "data-slot": "command-palette-input-accessory", className: "shrink-0", children: inputAccessory })), _jsx(PaletteInput, { machine: machine, inputRef: inputRef, query: query, onQueryChange: onQueryChange, loading: loading, placeholder: placeholder, className: "h-full min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground" })] }), _jsx(PaletteResults, { machine: machine, query: query, loading: loading, error: error, className: "max-h-96 min-h-0 flex-1 overflow-y-auto p-2" }), _jsx(PaletteLoadMore, { hasMore: hasMore, onLoadMore: onLoadMore, loading: loading }), _jsx(PaletteFooter, { footer: footer })] }) }));
94
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { className: cn("max-w-xl gap-0 p-0 [&_[aria-label=Close]]:hidden", className), onKeyDown: machine.onKeyDown,
95
+ // The palette opens from a shortcut or a host button, never a Radix
96
+ // trigger, so Radix has nothing to hand focus back to on close.
97
+ onOpenAutoFocus: () => {
98
+ openerRef.current =
99
+ document.activeElement instanceof HTMLElement
100
+ ? document.activeElement
101
+ : null;
102
+ }, onCloseAutoFocus: (event) => {
103
+ if (openerRef.current === null)
104
+ return;
105
+ event.preventDefault();
106
+ openerRef.current.focus();
107
+ }, children: [_jsx(DialogTitle, { className: "sr-only", children: "Search" }), _jsxs("div", { className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4", children: [inputAccessory === undefined ? null : (_jsx("div", { "data-slot": "command-palette-input-accessory", className: "shrink-0", children: inputAccessory })), _jsx(PaletteInput, { machine: machine, inputRef: inputRef, query: query, onQueryChange: onQueryChange, loading: loading, placeholder: placeholder, className: "h-full min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground" })] }), _jsx(PaletteResults, { machine: machine, query: query, loading: loading, error: error, className: "max-h-96 min-h-0 flex-1 overflow-y-auto p-2" }), _jsx(PaletteLoadMore, { hasMore: hasMore, onLoadMore: onLoadMore, loading: loading }), _jsx(PaletteFooter, { footer: footer })] }) }));
94
108
  }
95
109
  /**
96
110
  * The palette as an inline, non-modal surface: the field sits wherever the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corbits/react-ui",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "React components for agent and workflow surfaces.",
5
5
  "keywords": [
6
6
  "agents",
@@ -75,7 +75,7 @@
75
75
  "format": "oxfmt",
76
76
  "format:check": "oxfmt --check",
77
77
  "test": "bun test src --pass-with-no-tests",
78
- "test:e2e": "bun test e2e",
78
+ "test:e2e": "bun test ./e2e/exports.test.ts && playwright test",
79
79
  "check": "bun run typecheck && bun run lint && bun run format:check && bun run test",
80
80
  "build:css": "tailwindcss -i src/styles.css -o dist/styles.css && cp src/theme.css dist/theme.css",
81
81
  "dep-guard": "node scripts/dep-guard.mjs",
@@ -89,8 +89,10 @@
89
89
  "tailwind-merge": "^3.3.1"
90
90
  },
91
91
  "devDependencies": {
92
+ "@axe-core/playwright": "^4.13.0",
92
93
  "@happy-dom/global-registrator": "^20.11.2",
93
94
  "@ladle/react": "^5.1.1",
95
+ "@playwright/test": "^1.63.0",
94
96
  "@radix-ui/react-dialog": "^1.1.15",
95
97
  "@radix-ui/react-dropdown-menu": "^2.1.16",
96
98
  "@radix-ui/react-slot": "^1.2.3",