@okshaun/components 0.4.6 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import React__default, { forwardRef, useMemo, createElement, useEffect, useState, useRef, useLayoutEffect, createContext, useContext, useCallback, useSyncExternalStore } from "react";
2
+ import React__default, { forwardRef, useMemo, createElement, useEffect, useState, useRef, createContext, useContext, useCallback, useLayoutEffect, useSyncExternalStore } from "react";
3
3
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import { b as breakpoints, c as containerSizes } from "./size.primitives-j2MFgtrT.js";
@@ -239,7 +239,7 @@ function normalizeHTMLProps(props) {
239
239
  return Object.fromEntries(Object.entries(props).map(([key, value]) => [convert(key), value]));
240
240
  }
241
241
  normalizeHTMLProps.keys = htmlProps;
242
- const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_collapsed,_error,_paused,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,base";
242
+ const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_deleted,_collapsed,_error,_paused,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,base";
243
243
  const conditions = new Set(conditionsStr.split(","));
244
244
  const conditionRegex = /^@|&|&$/;
245
245
  function isCondition(value) {
@@ -449,38 +449,6 @@ const mergeRecipes = (recipeA, recipeB) => {
449
449
  }
450
450
  });
451
451
  };
452
- const badgeFn = /* @__PURE__ */ createRecipe("badge", {
453
- "variant": "subtle",
454
- "size": "md"
455
- }, []);
456
- const badgeVariantMap = {
457
- "variant": [
458
- "solid",
459
- "subtle",
460
- "outline"
461
- ],
462
- "size": [
463
- "sm",
464
- "md",
465
- "lg"
466
- ]
467
- };
468
- const badgeVariantKeys = Object.keys(badgeVariantMap);
469
- const badge = /* @__PURE__ */ Object.assign(memo(badgeFn.recipeFn), {
470
- __recipe__: true,
471
- __name__: "badge",
472
- __getCompoundVariantCss__: badgeFn.__getCompoundVariantCss__,
473
- raw: (props) => props,
474
- variantKeys: badgeVariantKeys,
475
- variantMap: badgeVariantMap,
476
- merge(recipe) {
477
- return mergeRecipes(this, recipe);
478
- },
479
- splitVariantProps(props) {
480
- return splitProps$1(props, badgeVariantKeys);
481
- },
482
- getVariantProps: badgeFn.getVariantProps
483
- });
484
452
  const boxFn = /* @__PURE__ */ createRecipe("box", {}, []);
485
453
  const boxVariantMap = {};
486
454
  const boxVariantKeys = Object.keys(boxVariantMap);
@@ -560,362 +528,6 @@ const checkboxInput = /* @__PURE__ */ Object.assign(memo(checkboxInputFn.recipeF
560
528
  },
561
529
  getVariantProps: checkboxInputFn.getVariantProps
562
530
  });
563
- const chipFn = /* @__PURE__ */ createRecipe("chip", {
564
- "state": "resolved",
565
- "hue": "blue",
566
- "hasIcon": false
567
- }, [
568
- {
569
- "hue": "blue",
570
- "state": "resolved",
571
- "css": {
572
- "color": {
573
- "base": "blue.70",
574
- "_dark": "blue.20"
575
- },
576
- "bg": {
577
- "base": "blue.20",
578
- "_dark": "blue.90"
579
- },
580
- "_hover": {
581
- "bg": {
582
- "base": "blue.30",
583
- "_dark": "blue.80"
584
- }
585
- }
586
- }
587
- },
588
- {
589
- "hue": "blue",
590
- "state": "placeholder",
591
- "css": {
592
- "color": {
593
- "base": "blue.50",
594
- "_dark": "blue.40"
595
- },
596
- "borderColor": {
597
- "base": "blue.40",
598
- "_dark": "blue.60"
599
- },
600
- "bg": "transparent",
601
- "_hover": {
602
- "bg": {
603
- "base": "blue.10",
604
- "_dark": "blue.90/50"
605
- }
606
- }
607
- }
608
- },
609
- {
610
- "hue": "blue",
611
- "state": "loading",
612
- "css": {
613
- "color": {
614
- "base": "blue.50",
615
- "_dark": "blue.40"
616
- },
617
- "bg": {
618
- "base": "blue.10",
619
- "_dark": "blue.90"
620
- }
621
- }
622
- },
623
- {
624
- "hue": "blue",
625
- "state": "deleted",
626
- "css": {
627
- "color": {
628
- "base": "blue.40",
629
- "_dark": "blue.60"
630
- },
631
- "bg": {
632
- "base": "blue.10",
633
- "_dark": "blue.90"
634
- }
635
- }
636
- },
637
- {
638
- "hue": "purple",
639
- "state": "resolved",
640
- "css": {
641
- "color": {
642
- "base": "purple.70",
643
- "_dark": "purple.20"
644
- },
645
- "bg": {
646
- "base": "purple.20",
647
- "_dark": "purple.90"
648
- },
649
- "_hover": {
650
- "bg": {
651
- "base": "purple.30",
652
- "_dark": "purple.80"
653
- }
654
- }
655
- }
656
- },
657
- {
658
- "hue": "purple",
659
- "state": "placeholder",
660
- "css": {
661
- "color": {
662
- "base": "purple.50",
663
- "_dark": "purple.40"
664
- },
665
- "borderColor": {
666
- "base": "purple.40",
667
- "_dark": "purple.60"
668
- },
669
- "bg": "transparent",
670
- "_hover": {
671
- "bg": {
672
- "base": "purple.10",
673
- "_dark": "purple.90/50"
674
- }
675
- }
676
- }
677
- },
678
- {
679
- "hue": "purple",
680
- "state": "loading",
681
- "css": {
682
- "color": {
683
- "base": "purple.50",
684
- "_dark": "purple.40"
685
- },
686
- "bg": {
687
- "base": "purple.10",
688
- "_dark": "purple.90"
689
- }
690
- }
691
- },
692
- {
693
- "hue": "purple",
694
- "state": "deleted",
695
- "css": {
696
- "color": {
697
- "base": "purple.40",
698
- "_dark": "purple.60"
699
- },
700
- "bg": {
701
- "base": "purple.10",
702
- "_dark": "purple.90"
703
- }
704
- }
705
- },
706
- {
707
- "hue": "orange",
708
- "state": "resolved",
709
- "css": {
710
- "color": {
711
- "base": "orange.70",
712
- "_dark": "orange.20"
713
- },
714
- "bg": {
715
- "base": "orange.20",
716
- "_dark": "orange.100"
717
- },
718
- "_hover": {
719
- "bg": {
720
- "base": "orange.30",
721
- "_dark": "orange.90"
722
- }
723
- }
724
- }
725
- },
726
- {
727
- "hue": "orange",
728
- "state": "placeholder",
729
- "css": {
730
- "color": {
731
- "base": "orange.50",
732
- "_dark": "orange.40"
733
- },
734
- "borderColor": {
735
- "base": "orange.40",
736
- "_dark": "orange.60"
737
- },
738
- "bg": "transparent",
739
- "_hover": {
740
- "bg": {
741
- "base": "orange.10",
742
- "_dark": "orange.90/50"
743
- }
744
- }
745
- }
746
- },
747
- {
748
- "hue": "orange",
749
- "state": "loading",
750
- "css": {
751
- "color": {
752
- "base": "orange.50",
753
- "_dark": "orange.40"
754
- },
755
- "bg": {
756
- "base": "orange.10",
757
- "_dark": "orange.100"
758
- }
759
- }
760
- },
761
- {
762
- "hue": "orange",
763
- "state": "deleted",
764
- "css": {
765
- "color": {
766
- "base": "orange.40",
767
- "_dark": "orange.60"
768
- },
769
- "bg": {
770
- "base": "orange.10",
771
- "_dark": "orange.100"
772
- }
773
- }
774
- },
775
- {
776
- "hue": "green",
777
- "state": "resolved",
778
- "css": {
779
- "color": {
780
- "base": "green.70",
781
- "_dark": "green.20"
782
- },
783
- "bg": {
784
- "base": "green.20",
785
- "_dark": "green.90"
786
- },
787
- "_hover": {
788
- "bg": {
789
- "base": "green.30",
790
- "_dark": "green.80"
791
- }
792
- }
793
- }
794
- },
795
- {
796
- "hue": "green",
797
- "state": "placeholder",
798
- "css": {
799
- "color": {
800
- "base": "green.50",
801
- "_dark": "green.40"
802
- },
803
- "borderColor": {
804
- "base": "green.40",
805
- "_dark": "green.60"
806
- },
807
- "bg": "transparent",
808
- "_hover": {
809
- "bg": {
810
- "base": "green.10",
811
- "_dark": "green.90/50"
812
- }
813
- }
814
- }
815
- },
816
- {
817
- "hue": "green",
818
- "state": "loading",
819
- "css": {
820
- "color": {
821
- "base": "green.50",
822
- "_dark": "green.40"
823
- },
824
- "bg": {
825
- "base": "green.10",
826
- "_dark": "green.90"
827
- }
828
- }
829
- },
830
- {
831
- "hue": "green",
832
- "state": "deleted",
833
- "css": {
834
- "color": {
835
- "base": "green.40",
836
- "_dark": "green.60"
837
- },
838
- "bg": {
839
- "base": "green.10",
840
- "_dark": "green.90"
841
- }
842
- }
843
- },
844
- {
845
- "hue": "gray",
846
- "state": "resolved",
847
- "css": {
848
- "color": "text.subtle",
849
- "bg": "bg.neutral",
850
- "_hover": {
851
- "bg": "bg.neutral.hovered"
852
- }
853
- }
854
- },
855
- {
856
- "hue": "gray",
857
- "state": "placeholder",
858
- "css": {
859
- "color": "text.subtlest",
860
- "borderColor": "border.default",
861
- "bg": "transparent",
862
- "_hover": {
863
- "bg": "bg.neutral"
864
- }
865
- }
866
- },
867
- {
868
- "hue": "gray",
869
- "state": "loading",
870
- "css": {
871
- "color": "text.subtlest",
872
- "bg": "bg.neutral"
873
- }
874
- },
875
- {
876
- "hue": "gray",
877
- "state": "deleted",
878
- "css": {
879
- "color": "text.disabled",
880
- "bg": "bg.neutral"
881
- }
882
- }
883
- ]);
884
- const chipVariantMap = {
885
- "state": [
886
- "resolved",
887
- "placeholder",
888
- "loading",
889
- "deleted"
890
- ],
891
- "hue": [
892
- "blue",
893
- "purple",
894
- "orange",
895
- "green",
896
- "gray"
897
- ],
898
- "hasIcon": [
899
- "true",
900
- "false"
901
- ]
902
- };
903
- const chipVariantKeys = Object.keys(chipVariantMap);
904
- const chip = /* @__PURE__ */ Object.assign(memo(chipFn.recipeFn), {
905
- __recipe__: true,
906
- __name__: "chip",
907
- __getCompoundVariantCss__: chipFn.__getCompoundVariantCss__,
908
- raw: (props) => props,
909
- variantKeys: chipVariantKeys,
910
- variantMap: chipVariantMap,
911
- merge(recipe) {
912
- return mergeRecipes(this, recipe);
913
- },
914
- splitVariantProps(props) {
915
- return splitProps$1(props, chipVariantKeys);
916
- },
917
- getVariantProps: chipFn.getVariantProps
918
- });
919
531
  const codeFn = /* @__PURE__ */ createRecipe("code", {}, []);
920
532
  const codeVariantMap = {};
921
533
  const codeVariantKeys = Object.keys(codeVariantMap);
@@ -1630,15 +1242,108 @@ const toggleInput = /* @__PURE__ */ Object.assign(memo(toggleInputFn.recipeFn),
1630
1242
  __name__: "toggleInput",
1631
1243
  __getCompoundVariantCss__: toggleInputFn.__getCompoundVariantCss__,
1632
1244
  raw: (props) => props,
1633
- variantKeys: toggleInputVariantKeys,
1634
- variantMap: toggleInputVariantMap,
1635
- merge(recipe) {
1636
- return mergeRecipes(this, recipe);
1245
+ variantKeys: toggleInputVariantKeys,
1246
+ variantMap: toggleInputVariantMap,
1247
+ merge(recipe) {
1248
+ return mergeRecipes(this, recipe);
1249
+ },
1250
+ splitVariantProps(props) {
1251
+ return splitProps$1(props, toggleInputVariantKeys);
1252
+ },
1253
+ getVariantProps: toggleInputFn.getVariantProps
1254
+ });
1255
+ const badgeDefaultVariants = {
1256
+ "size": "md",
1257
+ "appearance": "danger"
1258
+ };
1259
+ const badgeCompoundVariants = [
1260
+ {
1261
+ "dot": false,
1262
+ "size": "sm",
1263
+ "css": {
1264
+ "indicator": {
1265
+ "minW": "16",
1266
+ "h": "fit"
1267
+ }
1268
+ }
1269
+ },
1270
+ {
1271
+ "dot": false,
1272
+ "size": "md",
1273
+ "css": {
1274
+ "indicator": {
1275
+ "minW": "20",
1276
+ "h": "fit"
1277
+ }
1278
+ }
1279
+ },
1280
+ {
1281
+ "dot": false,
1282
+ "size": "lg",
1283
+ "css": {
1284
+ "indicator": {
1285
+ "minW": "24",
1286
+ "h": "fit"
1287
+ }
1288
+ }
1289
+ }
1290
+ ];
1291
+ const badgeSlotNames = [
1292
+ [
1293
+ "root",
1294
+ "badge__root"
1295
+ ],
1296
+ [
1297
+ "indicator",
1298
+ "badge__indicator"
1299
+ ]
1300
+ ];
1301
+ const badgeSlotFns = /* @__PURE__ */ badgeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, badgeDefaultVariants, getSlotCompoundVariant(badgeCompoundVariants, slotName))]);
1302
+ const badgeFn = memo((props = {}) => {
1303
+ return Object.fromEntries(badgeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
1304
+ });
1305
+ const badgeVariantKeys = [
1306
+ "size",
1307
+ "standalone",
1308
+ "dot",
1309
+ "appearance"
1310
+ ];
1311
+ const getVariantProps$9 = (variants) => ({ ...badgeDefaultVariants, ...compact(variants) });
1312
+ const badge = /* @__PURE__ */ Object.assign(badgeFn, {
1313
+ __recipe__: false,
1314
+ __name__: "badge",
1315
+ raw: (props) => props,
1316
+ classNameMap: {},
1317
+ variantKeys: badgeVariantKeys,
1318
+ variantMap: {
1319
+ "size": [
1320
+ "sm",
1321
+ "md",
1322
+ "lg"
1323
+ ],
1324
+ "standalone": [
1325
+ "true",
1326
+ "false"
1327
+ ],
1328
+ "dot": [
1329
+ "true",
1330
+ "false"
1331
+ ],
1332
+ "appearance": [
1333
+ "neutral",
1334
+ "subtle",
1335
+ "inverted",
1336
+ "subtle-inverted",
1337
+ "success",
1338
+ "danger",
1339
+ "warning",
1340
+ "info"
1341
+ ]
1637
1342
  },
1638
1343
  splitVariantProps(props) {
1639
- return splitProps$1(props, toggleInputVariantKeys);
1344
+ return splitProps$1(props, badgeVariantKeys);
1640
1345
  },
1641
- getVariantProps: toggleInputFn.getVariantProps
1346
+ getVariantProps: getVariantProps$9
1642
1347
  });
1643
1348
  const buttonDefaultVariants = {
1644
1349
  "appearance": "default",
@@ -1738,7 +1443,7 @@ const buttonVariantKeys = [
1738
1443
  "iconBefore",
1739
1444
  "iconAfter"
1740
1445
  ];
1741
- const getVariantProps$6 = (variants) => ({ ...buttonDefaultVariants, ...compact(variants) });
1446
+ const getVariantProps$8 = (variants) => ({ ...buttonDefaultVariants, ...compact(variants) });
1742
1447
  const button = /* @__PURE__ */ Object.assign(buttonFn, {
1743
1448
  __recipe__: false,
1744
1449
  __name__: "button",
@@ -1768,7 +1473,7 @@ const button = /* @__PURE__ */ Object.assign(buttonFn, {
1768
1473
  splitVariantProps(props) {
1769
1474
  return splitProps$1(props, buttonVariantKeys);
1770
1475
  },
1771
- getVariantProps: getVariantProps$6
1476
+ getVariantProps: getVariantProps$8
1772
1477
  });
1773
1478
  const iconButtonDefaultVariants = {
1774
1479
  "appearance": "default",
@@ -1793,7 +1498,7 @@ const iconButtonVariantKeys = [
1793
1498
  "appearance",
1794
1499
  "size"
1795
1500
  ];
1796
- const getVariantProps$5 = (variants) => ({ ...iconButtonDefaultVariants, ...compact(variants) });
1501
+ const getVariantProps$7 = (variants) => ({ ...iconButtonDefaultVariants, ...compact(variants) });
1797
1502
  const iconButton = /* @__PURE__ */ Object.assign(iconButtonFn, {
1798
1503
  __recipe__: false,
1799
1504
  __name__: "iconButton",
@@ -1816,7 +1521,7 @@ const iconButton = /* @__PURE__ */ Object.assign(iconButtonFn, {
1816
1521
  splitVariantProps(props) {
1817
1522
  return splitProps$1(props, iconButtonVariantKeys);
1818
1523
  },
1819
- getVariantProps: getVariantProps$5
1524
+ getVariantProps: getVariantProps$7
1820
1525
  });
1821
1526
  const checkboxDefaultVariants = {};
1822
1527
  const checkboxCompoundVariants = [];
@@ -1839,7 +1544,7 @@ const checkboxFn = memo((props = {}) => {
1839
1544
  return Object.fromEntries(checkboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
1840
1545
  });
1841
1546
  const checkboxVariantKeys = [];
1842
- const getVariantProps$4 = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) });
1547
+ const getVariantProps$6 = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) });
1843
1548
  const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
1844
1549
  __recipe__: false,
1845
1550
  __name__: "checkbox",
@@ -1850,7 +1555,7 @@ const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
1850
1555
  splitVariantProps(props) {
1851
1556
  return splitProps$1(props, checkboxVariantKeys);
1852
1557
  },
1853
- getVariantProps: getVariantProps$4
1558
+ getVariantProps: getVariantProps$6
1854
1559
  });
1855
1560
  const radioDefaultVariants = {};
1856
1561
  const radioCompoundVariants = [];
@@ -1873,7 +1578,7 @@ const radioFn = memo((props = {}) => {
1873
1578
  return Object.fromEntries(radioSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
1874
1579
  });
1875
1580
  const radioVariantKeys = [];
1876
- const getVariantProps$3 = (variants) => ({ ...radioDefaultVariants, ...compact(variants) });
1581
+ const getVariantProps$5 = (variants) => ({ ...radioDefaultVariants, ...compact(variants) });
1877
1582
  const radio = /* @__PURE__ */ Object.assign(radioFn, {
1878
1583
  __recipe__: false,
1879
1584
  __name__: "radio",
@@ -1884,7 +1589,7 @@ const radio = /* @__PURE__ */ Object.assign(radioFn, {
1884
1589
  splitVariantProps(props) {
1885
1590
  return splitProps$1(props, radioVariantKeys);
1886
1591
  },
1887
- getVariantProps: getVariantProps$3
1592
+ getVariantProps: getVariantProps$5
1888
1593
  });
1889
1594
  const tooltipDefaultVariants = {
1890
1595
  "position": "bottom"
@@ -2013,7 +1718,7 @@ const tooltipVariantKeys = [
2013
1718
  "position",
2014
1719
  "caret"
2015
1720
  ];
2016
- const getVariantProps$2 = (variants) => ({ ...tooltipDefaultVariants, ...compact(variants) });
1721
+ const getVariantProps$4 = (variants) => ({ ...tooltipDefaultVariants, ...compact(variants) });
2017
1722
  const tooltip = /* @__PURE__ */ Object.assign(tooltipFn, {
2018
1723
  __recipe__: false,
2019
1724
  __name__: "tooltip",
@@ -2043,7 +1748,7 @@ const tooltip = /* @__PURE__ */ Object.assign(tooltipFn, {
2043
1748
  splitVariantProps(props) {
2044
1749
  return splitProps$1(props, tooltipVariantKeys);
2045
1750
  },
2046
- getVariantProps: getVariantProps$2
1751
+ getVariantProps: getVariantProps$4
2047
1752
  });
2048
1753
  const menuDefaultVariants = {
2049
1754
  "size": "default",
@@ -2104,7 +1809,7 @@ const menuVariantKeys = [
2104
1809
  "size",
2105
1810
  "indicatorPosition"
2106
1811
  ];
2107
- const getVariantProps$1 = (variants) => ({ ...menuDefaultVariants, ...compact(variants) });
1812
+ const getVariantProps$3 = (variants) => ({ ...menuDefaultVariants, ...compact(variants) });
2108
1813
  const menu = /* @__PURE__ */ Object.assign(menuFn, {
2109
1814
  __recipe__: false,
2110
1815
  __name__: "menu",
@@ -2125,7 +1830,7 @@ const menu = /* @__PURE__ */ Object.assign(menuFn, {
2125
1830
  splitVariantProps(props) {
2126
1831
  return splitProps$1(props, menuVariantKeys);
2127
1832
  },
2128
- getVariantProps: getVariantProps$1
1833
+ getVariantProps: getVariantProps$3
2129
1834
  });
2130
1835
  const toggleDefaultVariants = {};
2131
1836
  const toggleCompoundVariants = [];
@@ -2152,7 +1857,7 @@ const toggleFn = memo((props = {}) => {
2152
1857
  return Object.fromEntries(toggleSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
2153
1858
  });
2154
1859
  const toggleVariantKeys = [];
2155
- const getVariantProps = (variants) => ({ ...toggleDefaultVariants, ...compact(variants) });
1860
+ const getVariantProps$2 = (variants) => ({ ...toggleDefaultVariants, ...compact(variants) });
2156
1861
  const toggle = /* @__PURE__ */ Object.assign(toggleFn, {
2157
1862
  __recipe__: false,
2158
1863
  __name__: "toggle",
@@ -2163,9 +1868,174 @@ const toggle = /* @__PURE__ */ Object.assign(toggleFn, {
2163
1868
  splitVariantProps(props) {
2164
1869
  return splitProps$1(props, toggleVariantKeys);
2165
1870
  },
1871
+ getVariantProps: getVariantProps$2
1872
+ });
1873
+ const chipDefaultVariants = {
1874
+ "size": "default"
1875
+ };
1876
+ const chipCompoundVariants = [
1877
+ {
1878
+ "size": "default",
1879
+ "before": true,
1880
+ "css": {
1881
+ "container": {
1882
+ "ps": "2"
1883
+ }
1884
+ }
1885
+ },
1886
+ {
1887
+ "size": "default",
1888
+ "after": true,
1889
+ "css": {
1890
+ "container": {
1891
+ "pe": "2"
1892
+ }
1893
+ }
1894
+ },
1895
+ {
1896
+ "size": "small",
1897
+ "before": true,
1898
+ "css": {
1899
+ "container": {
1900
+ "ps": "2"
1901
+ }
1902
+ }
1903
+ },
1904
+ {
1905
+ "size": "small",
1906
+ "after": true,
1907
+ "css": {
1908
+ "container": {
1909
+ "pe": "2"
1910
+ }
1911
+ }
1912
+ },
1913
+ {
1914
+ "size": "large",
1915
+ "before": true,
1916
+ "css": {
1917
+ "container": {
1918
+ "ps": "4"
1919
+ }
1920
+ }
1921
+ },
1922
+ {
1923
+ "size": "large",
1924
+ "after": true,
1925
+ "css": {
1926
+ "container": {
1927
+ "pe": "4"
1928
+ }
1929
+ }
1930
+ }
1931
+ ];
1932
+ const chipSlotNames = [
1933
+ [
1934
+ "container",
1935
+ "chip__container"
1936
+ ],
1937
+ [
1938
+ "icon",
1939
+ "chip__icon"
1940
+ ]
1941
+ ];
1942
+ const chipSlotFns = /* @__PURE__ */ chipSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, chipDefaultVariants, getSlotCompoundVariant(chipCompoundVariants, slotName))]);
1943
+ const chipFn = memo((props = {}) => {
1944
+ return Object.fromEntries(chipSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
1945
+ });
1946
+ const chipVariantKeys = [
1947
+ "size",
1948
+ "before",
1949
+ "after"
1950
+ ];
1951
+ const getVariantProps$1 = (variants) => ({ ...chipDefaultVariants, ...compact(variants) });
1952
+ const chip = /* @__PURE__ */ Object.assign(chipFn, {
1953
+ __recipe__: false,
1954
+ __name__: "chip",
1955
+ raw: (props) => props,
1956
+ classNameMap: {},
1957
+ variantKeys: chipVariantKeys,
1958
+ variantMap: {
1959
+ "size": [
1960
+ "default",
1961
+ "small",
1962
+ "large"
1963
+ ],
1964
+ "before": [
1965
+ "true"
1966
+ ],
1967
+ "after": [
1968
+ "true"
1969
+ ]
1970
+ },
1971
+ splitVariantProps(props) {
1972
+ return splitProps$1(props, chipVariantKeys);
1973
+ },
1974
+ getVariantProps: getVariantProps$1
1975
+ });
1976
+ const avatarDefaultVariants = {
1977
+ "size": "md",
1978
+ "shape": "circle"
1979
+ };
1980
+ const avatarCompoundVariants = [];
1981
+ const avatarSlotNames = [
1982
+ [
1983
+ "root",
1984
+ "avatar__root"
1985
+ ],
1986
+ [
1987
+ "image",
1988
+ "avatar__image"
1989
+ ],
1990
+ [
1991
+ "fallback",
1992
+ "avatar__fallback"
1993
+ ],
1994
+ [
1995
+ "presence",
1996
+ "avatar__presence"
1997
+ ],
1998
+ [
1999
+ "status",
2000
+ "avatar__status"
2001
+ ]
2002
+ ];
2003
+ const avatarSlotFns = /* @__PURE__ */ avatarSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, avatarDefaultVariants, getSlotCompoundVariant(avatarCompoundVariants, slotName))]);
2004
+ const avatarFn = memo((props = {}) => {
2005
+ return Object.fromEntries(avatarSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]));
2006
+ });
2007
+ const avatarVariantKeys = [
2008
+ "size",
2009
+ "shape"
2010
+ ];
2011
+ const getVariantProps = (variants) => ({ ...avatarDefaultVariants, ...compact(variants) });
2012
+ const avatar = /* @__PURE__ */ Object.assign(avatarFn, {
2013
+ __recipe__: false,
2014
+ __name__: "avatar",
2015
+ raw: (props) => props,
2016
+ classNameMap: {},
2017
+ variantKeys: avatarVariantKeys,
2018
+ variantMap: {
2019
+ "size": [
2020
+ "xs",
2021
+ "sm",
2022
+ "md",
2023
+ "lg",
2024
+ "xl",
2025
+ "2xl"
2026
+ ],
2027
+ "shape": [
2028
+ "circle",
2029
+ "square",
2030
+ "hexagon"
2031
+ ]
2032
+ },
2033
+ splitVariantProps(props) {
2034
+ return splitProps$1(props, avatarVariantKeys);
2035
+ },
2166
2036
  getVariantProps
2167
2037
  });
2168
- var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_collapsed,_error,_paused,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,textStyle";
2038
+ var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_deleted,_collapsed,_error,_paused,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,xsToSm,xsToMd,xsToLg,xsToXl,xsTo2xl,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,textStyle";
2169
2039
  var userGenerated = userGeneratedStr.split(",");
2170
2040
  var cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical";
2171
2041
  var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
@@ -2326,6 +2196,31 @@ const Grid = /* @__PURE__ */ forwardRef(function Grid2(props, ref) {
2326
2196
  const mergedProps = { ref, ...styleProps, ...restProps };
2327
2197
  return createElement(styled.div, mergedProps);
2328
2198
  });
2199
+ const wrapConfig = {
2200
+ transform(props) {
2201
+ const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "8px", align, justify, ...rest } = props;
2202
+ return {
2203
+ display: "flex",
2204
+ flexWrap: "wrap",
2205
+ alignItems: align,
2206
+ justifyContent: justify,
2207
+ gap,
2208
+ columnGap,
2209
+ rowGap,
2210
+ ...rest
2211
+ };
2212
+ }
2213
+ };
2214
+ const getWrapStyle = (styles = {}) => {
2215
+ const _styles = getPatternStyles(wrapConfig, styles);
2216
+ return wrapConfig.transform(_styles, patternFns);
2217
+ };
2218
+ const Wrap = /* @__PURE__ */ forwardRef(function Wrap2(props, ref) {
2219
+ const [patternProps, restProps] = splitProps$1(props, ["gap", "rowGap", "columnGap", "align", "justify"]);
2220
+ const styleProps = getWrapStyle(patternProps);
2221
+ const mergedProps = { ref, ...styleProps, ...restProps };
2222
+ return createElement(styled.div, mergedProps);
2223
+ });
2329
2224
  const splitProps = (props) => {
2330
2225
  const [cssProps, otherProps] = splitCssProps(props);
2331
2226
  const { css: cssProp, ...styleProps } = cssProps;
@@ -2739,6 +2634,7 @@ const Button = React.forwardRef(
2739
2634
  disabled,
2740
2635
  iconBefore,
2741
2636
  iconAfter,
2637
+ gap,
2742
2638
  ...props
2743
2639
  }, ref) => {
2744
2640
  const trulyDisabled = loading || disabled;
@@ -2761,7 +2657,7 @@ const Button = React.forwardRef(
2761
2657
  type: asComponent === "button" ? "button" : void 0,
2762
2658
  ...props,
2763
2659
  children: /* @__PURE__ */ jsxs(Fragment, { children: [
2764
- /* @__PURE__ */ jsxs(HStack, { gap: "4", opacity: loading ? 0 : 1, children: [
2660
+ /* @__PURE__ */ jsxs(HStack, { gap: gap || "4", opacity: loading ? 0 : 1, children: [
2765
2661
  iconBefore && /* @__PURE__ */ jsx(Icon, { name: iconBefore, className: classes.icon }),
2766
2662
  children,
2767
2663
  iconAfter && /* @__PURE__ */ jsx(Icon, { name: iconAfter, className: classes.icon })
@@ -2783,20 +2679,165 @@ const Button = React.forwardRef(
2783
2679
  );
2784
2680
  }
2785
2681
  );
2682
+ const animationStyles = {
2683
+ pop: css({
2684
+ animation: "badgePop 200ms ease-out"
2685
+ }),
2686
+ popStandalone: css({
2687
+ animation: "badgePopStandalone 200ms ease-out"
2688
+ })
2689
+ };
2786
2690
  const Badge = React.forwardRef(
2787
- ({ variant, size: size2, className, children, ...props }, ref) => {
2788
- return /* @__PURE__ */ jsx(
2789
- Box,
2691
+ ({
2692
+ count: count2,
2693
+ showZero = false,
2694
+ overflowCount = 99,
2695
+ appearance = "danger",
2696
+ size: size2 = "md",
2697
+ children,
2698
+ ...props
2699
+ }, ref) => {
2700
+ const [className, otherProps] = splitProps(props);
2701
+ const prevCountRef = React.useRef(count2);
2702
+ const [isAnimating, setIsAnimating] = React.useState(false);
2703
+ React.useEffect(() => {
2704
+ if (count2 !== void 0 && prevCountRef.current !== count2) {
2705
+ if (prevCountRef.current !== void 0) {
2706
+ setIsAnimating(true);
2707
+ const timer = setTimeout(() => setIsAnimating(false), 200);
2708
+ return () => clearTimeout(timer);
2709
+ }
2710
+ }
2711
+ prevCountRef.current = count2;
2712
+ }, [count2]);
2713
+ const isCountMode = count2 !== void 0;
2714
+ const isDotMode = !isCountMode;
2715
+ const isVisible = isDotMode || count2 !== 0 || showZero;
2716
+ const displayCount = isCountMode && count2 !== void 0 ? count2 > overflowCount ? `${overflowCount}+` : count2 : null;
2717
+ const isStandalone = !children;
2718
+ const classes = badge({
2719
+ size: size2,
2720
+ standalone: isStandalone,
2721
+ dot: isDotMode,
2722
+ appearance
2723
+ });
2724
+ const animationClass = isAnimating ? isStandalone ? animationStyles.popStandalone : animationStyles.pop : "";
2725
+ if (!isVisible && !children) {
2726
+ return null;
2727
+ }
2728
+ const indicator = isVisible ? /* @__PURE__ */ jsx("span", { className: cx(classes.indicator, animationClass), children: displayCount }) : null;
2729
+ if (isStandalone) {
2730
+ return /* @__PURE__ */ jsx("span", { ref, className: cx(classes.root, className), ...otherProps, children: indicator });
2731
+ }
2732
+ return /* @__PURE__ */ jsxs("span", { ref, className: cx(classes.root, className), ...otherProps, children: [
2733
+ children,
2734
+ indicator
2735
+ ] });
2736
+ }
2737
+ );
2738
+ Badge.displayName = "Badge";
2739
+ const presenceStyles = {
2740
+ online: css({ bg: "bg.success.bold" }),
2741
+ busy: css({ bg: "bg.danger.bold" }),
2742
+ offline: css({ bg: "bg.neutral.bold" }),
2743
+ focus: css({ bg: "bg.brand.bold" })
2744
+ };
2745
+ const statusStyles = {
2746
+ approved: css({ bg: "bg.success.bold", color: "icon.inverse" }),
2747
+ declined: css({ bg: "bg.danger.bold", color: "icon.inverse" }),
2748
+ locked: css({ bg: "bg.neutral.bold", color: "icon.inverse" })
2749
+ };
2750
+ const sizeToStatusIconSize = {
2751
+ xs: "8",
2752
+ sm: "10",
2753
+ md: "12",
2754
+ lg: "14",
2755
+ xl: "16",
2756
+ "2xl": "20"
2757
+ };
2758
+ function getInitials(name) {
2759
+ const parts = name.trim().split(/\s+/);
2760
+ if (parts.length === 0 || !parts[0]) {
2761
+ return "";
2762
+ }
2763
+ if (parts.length === 1) {
2764
+ return parts[0].charAt(0);
2765
+ }
2766
+ const lastPart = parts[parts.length - 1];
2767
+ return parts[0].charAt(0) + (lastPart ? lastPart.charAt(0) : "");
2768
+ }
2769
+ const Avatar = React.forwardRef(
2770
+ (props, ref) => {
2771
+ const {
2772
+ src,
2773
+ alt = "",
2774
+ name,
2775
+ size: size2 = "md",
2776
+ shape = "circle",
2777
+ presence,
2778
+ status,
2779
+ fallback,
2780
+ borderColor,
2781
+ ...rest
2782
+ } = props;
2783
+ const [className, otherProps] = splitProps(rest);
2784
+ const [imageError, setImageError] = React.useState(false);
2785
+ const [imageLoaded, setImageLoaded] = React.useState(false);
2786
+ React.useEffect(() => {
2787
+ setImageError(false);
2788
+ setImageLoaded(false);
2789
+ }, [src]);
2790
+ const safeSize = size2;
2791
+ const classes = avatar({ size: safeSize, shape });
2792
+ const showImage = src && !imageError;
2793
+ const initials = name ? getInitials(name) : null;
2794
+ const iconSize = sizeToStatusIconSize[safeSize];
2795
+ return /* @__PURE__ */ jsxs(
2796
+ "span",
2790
2797
  {
2791
- as: "span",
2792
2798
  ref,
2793
- className: cx(badge({ variant, size: size2 }), className),
2794
- ...props,
2795
- children
2799
+ className: cx(classes.root, className),
2800
+ style: borderColor ? { borderColor } : void 0,
2801
+ ...otherProps,
2802
+ children: [
2803
+ showImage && /* @__PURE__ */ jsx(
2804
+ "img",
2805
+ {
2806
+ src,
2807
+ alt,
2808
+ className: classes.image,
2809
+ onError: () => setImageError(true),
2810
+ onLoad: () => setImageLoaded(true),
2811
+ style: { opacity: imageLoaded ? 1 : 0 }
2812
+ }
2813
+ ),
2814
+ (!showImage || !imageLoaded) && /* @__PURE__ */ jsx("span", { className: classes.fallback, children: fallback || initials || /* @__PURE__ */ jsx(Icon, { name: "user" }) }),
2815
+ presence && /* @__PURE__ */ jsx(
2816
+ "span",
2817
+ {
2818
+ className: cx(
2819
+ classes.presence,
2820
+ presenceStyles[presence]
2821
+ )
2822
+ }
2823
+ ),
2824
+ status && /* @__PURE__ */ jsxs(
2825
+ "span",
2826
+ {
2827
+ className: cx(classes.status, statusStyles[status]),
2828
+ children: [
2829
+ status === "approved" && /* @__PURE__ */ jsx(Icon, { name: "check", size: iconSize }),
2830
+ status === "declined" && /* @__PURE__ */ jsx(Icon, { name: "x", size: iconSize }),
2831
+ status === "locked" && /* @__PURE__ */ jsx(Icon, { name: "lock", size: iconSize })
2832
+ ]
2833
+ }
2834
+ )
2835
+ ]
2796
2836
  }
2797
2837
  );
2798
2838
  }
2799
2839
  );
2840
+ Avatar.displayName = "Avatar";
2800
2841
  const IconButton = React.forwardRef(
2801
2842
  ({
2802
2843
  appearance,
@@ -3429,33 +3470,221 @@ const Tag = ({
3429
3470
  }
3430
3471
  );
3431
3472
  };
3473
+ const ChipGroupContext = createContext(
3474
+ null
3475
+ );
3476
+ const useChipGroup = () => {
3477
+ return useContext(ChipGroupContext);
3478
+ };
3479
+ const chipSizeToIconSize = {
3480
+ small: "20",
3481
+ default: "20",
3482
+ large: "24"
3483
+ };
3432
3484
  const Chip = ({
3433
- state = "resolved",
3434
- hue = "blue",
3485
+ size: size2 = "default",
3435
3486
  children,
3436
- iconName,
3487
+ loading,
3488
+ disabled,
3489
+ deleted,
3490
+ before,
3491
+ after,
3492
+ dismissable,
3493
+ onDismiss,
3494
+ value,
3495
+ gap,
3437
3496
  onClick,
3438
3497
  ...props
3439
3498
  }) => {
3440
3499
  const [className, otherProps] = splitProps(props);
3441
- const hasIcon = !!iconName;
3442
- const isClickable = state === "resolved" || state === "placeholder";
3500
+ const groupContext = useChipGroup();
3501
+ const buttonRef = useRef(null);
3502
+ const isSelectable = value !== void 0 && groupContext !== null;
3503
+ useEffect(() => {
3504
+ if (isSelectable && value && groupContext) {
3505
+ groupContext.registerChip(value, buttonRef);
3506
+ return () => groupContext.unregisterChip(value);
3507
+ }
3508
+ }, [isSelectable, value, groupContext]);
3509
+ const isSelected = isSelectable ? groupContext.type === "single" ? groupContext.value === value : Array.isArray(groupContext.value) && groupContext.value.includes(value) : false;
3510
+ const isMultiSelected = isSelectable && groupContext.type === "multi" && isSelected;
3511
+ const hasBefore = Boolean(before) || isMultiSelected;
3512
+ const hasAfter = Boolean(after) || dismissable;
3513
+ const classes = chip({
3514
+ size: size2,
3515
+ before: hasBefore,
3516
+ after: hasAfter
3517
+ });
3518
+ const iconSize = chipSizeToIconSize[size2];
3519
+ const handleClick = () => {
3520
+ if (dismissable && onDismiss) {
3521
+ onDismiss();
3522
+ } else if (isSelectable && groupContext) {
3523
+ if (groupContext.type === "single") {
3524
+ groupContext.onChange(value);
3525
+ } else {
3526
+ const currentValues = Array.isArray(groupContext.value) ? groupContext.value : [];
3527
+ const newValues = currentValues.includes(value) ? currentValues.filter((v) => v !== value) : [...currentValues, value];
3528
+ groupContext.onChange(newValues);
3529
+ }
3530
+ } else if (onClick) {
3531
+ onClick();
3532
+ }
3533
+ };
3534
+ const handleKeyDown = (e) => {
3535
+ if (!isSelectable || !groupContext || !value) return;
3536
+ if (groupContext.type === "single") {
3537
+ if (e.key === "ArrowRight" || e.key === "ArrowDown") {
3538
+ e.preventDefault();
3539
+ groupContext.focusChip("next", value);
3540
+ } else if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
3541
+ e.preventDefault();
3542
+ groupContext.focusChip("prev", value);
3543
+ }
3544
+ }
3545
+ };
3546
+ const childText = typeof children === "string" ? children : void 0;
3547
+ const ariaLabel = dismissable && childText ? `${childText}, dismiss` : void 0;
3548
+ const role = isSelectable ? groupContext.type === "single" ? "radio" : "checkbox" : void 0;
3549
+ const getTabIndex3 = () => {
3550
+ if (!isSelectable || !groupContext) return void 0;
3551
+ if (groupContext.type === "single") {
3552
+ if (isSelected) return 0;
3553
+ const hasSelection = groupContext.value !== void 0 && groupContext.value !== "";
3554
+ if (!hasSelection && groupContext.chipValues[0] === value) return 0;
3555
+ return -1;
3556
+ }
3557
+ return 0;
3558
+ };
3443
3559
  return /* @__PURE__ */ jsxs(
3444
3560
  Box,
3445
3561
  {
3446
- as: "span",
3447
- className: cx(chip({ state, hue, hasIcon }), className),
3448
- onClick: isClickable ? onClick : void 0,
3449
- role: isClickable ? "button" : void 0,
3450
- tabIndex: isClickable ? 0 : void 0,
3562
+ as: "button",
3563
+ ref: buttonRef,
3564
+ className: cx(classes.container, className),
3565
+ onClick: handleClick,
3566
+ onKeyDown: handleKeyDown,
3567
+ tabIndex: getTabIndex3(),
3568
+ disabled: disabled ? true : void 0,
3569
+ "aria-disabled": disabled ? true : void 0,
3570
+ "aria-label": ariaLabel,
3571
+ role,
3572
+ "aria-checked": isSelectable ? isSelected : void 0,
3573
+ "data-selected": isSelected ? true : void 0,
3574
+ "data-loading": loading ? true : void 0,
3575
+ "aria-busy": loading ? true : void 0,
3576
+ type: "button",
3577
+ "data-deleted": deleted ? true : void 0,
3451
3578
  ...otherProps,
3452
3579
  children: [
3453
- iconName && /* @__PURE__ */ jsx(Icon, { name: iconName, width: 14, height: 14 }),
3454
- children
3580
+ /* @__PURE__ */ jsxs(HStack, { gap: gap || "4", opacity: loading ? 0 : 1, children: [
3581
+ isMultiSelected && /* @__PURE__ */ jsx(
3582
+ Icon,
3583
+ {
3584
+ name: "check",
3585
+ size: iconSize,
3586
+ className: classes.icon,
3587
+ "aria-hidden": true
3588
+ }
3589
+ ),
3590
+ before,
3591
+ children,
3592
+ dismissable ? /* @__PURE__ */ jsx(Icon, { name: "x", size: iconSize, className: classes.icon, "aria-hidden": true }) : after
3593
+ ] }),
3594
+ loading && /* @__PURE__ */ jsx(
3595
+ Grid,
3596
+ {
3597
+ position: "absolute",
3598
+ top: "0",
3599
+ left: "0",
3600
+ right: "0",
3601
+ bottom: "0",
3602
+ placeItems: "center",
3603
+ children: /* @__PURE__ */ jsx(Spinner, {})
3604
+ }
3605
+ )
3455
3606
  ]
3456
3607
  }
3457
3608
  );
3458
3609
  };
3610
+ const ChipGroup = ({
3611
+ type,
3612
+ value,
3613
+ onChange,
3614
+ children,
3615
+ label: label2,
3616
+ id,
3617
+ name,
3618
+ gap = "2",
3619
+ ...props
3620
+ }) => {
3621
+ const role = type === "single" ? "radiogroup" : "group";
3622
+ const chipRefs = useRef(/* @__PURE__ */ new Map());
3623
+ const chipValuesRef = useRef([]);
3624
+ const registerChip = useCallback(
3625
+ (chipValue, ref) => {
3626
+ chipRefs.current.set(chipValue, ref);
3627
+ if (!chipValuesRef.current.includes(chipValue)) {
3628
+ chipValuesRef.current.push(chipValue);
3629
+ }
3630
+ },
3631
+ []
3632
+ );
3633
+ const unregisterChip = useCallback((chipValue) => {
3634
+ chipRefs.current.delete(chipValue);
3635
+ chipValuesRef.current = chipValuesRef.current.filter((v) => v !== chipValue);
3636
+ }, []);
3637
+ const focusChip = useCallback(
3638
+ (direction, currentValue) => {
3639
+ var _a;
3640
+ const values = chipValuesRef.current;
3641
+ const currentIndex = values.indexOf(currentValue);
3642
+ if (currentIndex === -1) return;
3643
+ let nextIndex;
3644
+ if (direction === "next") {
3645
+ nextIndex = currentIndex === values.length - 1 ? 0 : currentIndex + 1;
3646
+ } else {
3647
+ nextIndex = currentIndex === 0 ? values.length - 1 : currentIndex - 1;
3648
+ }
3649
+ const nextValue = values[nextIndex];
3650
+ if (nextValue) {
3651
+ const nextRef = chipRefs.current.get(nextValue);
3652
+ (_a = nextRef == null ? void 0 : nextRef.current) == null ? void 0 : _a.focus();
3653
+ if (type === "single") {
3654
+ onChange(nextValue);
3655
+ }
3656
+ }
3657
+ },
3658
+ [type, onChange]
3659
+ );
3660
+ return /* @__PURE__ */ jsx(
3661
+ ChipGroupContext.Provider,
3662
+ {
3663
+ value: {
3664
+ type,
3665
+ value,
3666
+ onChange,
3667
+ name,
3668
+ registerChip,
3669
+ unregisterChip,
3670
+ focusChip,
3671
+ chipValues: chipValuesRef.current
3672
+ },
3673
+ children: /* @__PURE__ */ jsx(
3674
+ Wrap,
3675
+ {
3676
+ role,
3677
+ "aria-label": label2,
3678
+ "aria-labelledby": id ? `${id}-label` : void 0,
3679
+ id,
3680
+ gap,
3681
+ ...props,
3682
+ children
3683
+ }
3684
+ )
3685
+ }
3686
+ );
3687
+ };
3459
3688
  function hasWindow() {
3460
3689
  return typeof window !== "undefined";
3461
3690
  }
@@ -8759,6 +8988,7 @@ function BreakpointIndicator() {
8759
8988
  }
8760
8989
  export {
8761
8990
  Autocomplete,
8991
+ Avatar,
8762
8992
  Badge,
8763
8993
  Box,
8764
8994
  Breadcrumbs,
@@ -8768,6 +8998,7 @@ export {
8768
8998
  Checkbox,
8769
8999
  CheckboxInput,
8770
9000
  Chip,
9001
+ ChipGroup,
8771
9002
  Code,
8772
9003
  Divider,
8773
9004
  Dropdown,