@parrot-co/parrot-ui 0.0.79 → 0.0.81

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/main.js CHANGED
@@ -29,7 +29,7 @@ $parcel$export(module.exports, "CheckboxGroup", () => $b8075849c644c9bf$export$4
29
29
  $parcel$export(module.exports, "Radio", () => $98a03e69ce05a78a$export$d7b12c4107be0d61);
30
30
  $parcel$export(module.exports, "RadioGroup", () => $98a03e69ce05a78a$export$a98f0dcb43a68a25);
31
31
  $parcel$export(module.exports, "RadioCard", () => $037280c850c74ffd$export$f8afaea2e9656b91);
32
- $parcel$export(module.exports, "Select", () => $0a4561d925fa922e$export$a26e8b900a29a570);
32
+ $parcel$export(module.exports, "Select", () => $0a4561d925fa922e$export$ef9b1a59e592288f);
33
33
  $parcel$export(module.exports, "DatePicker", () => $4d607687132d9f4f$export$5109c6dd95d8fb00);
34
34
  $parcel$export(module.exports, "Avatar", () => $53cff1de4d77d0c5$export$e2255cf6045e8d47);
35
35
  $parcel$export(module.exports, "FileUploader", () => $5bdc448a87fb1cbf$export$1a5cb5295a7d2749);
@@ -49,6 +49,7 @@ $parcel$export(module.exports, "Table", () => $3dd82f03c348455b$export$54ec01a60
49
49
  $parcel$export(module.exports, "Timeline", () => $c07c6db9734c74af$export$e6a97ba2cae5bb94);
50
50
  $parcel$export(module.exports, "Modal", () => $ceb05569908c0e0d$export$2b77a92f1a5ad772);
51
51
  $parcel$export(module.exports, "Space", () => $78991f4fdd965321$export$eef1e68107c58ef2);
52
+ $parcel$export(module.exports, "TagInput", () => $b30cd386a46620b6$export$39299b56cfd4e361);
52
53
  $parcel$export(module.exports, "parrot", () => $80923bc9c1ba824c$export$3817b7a54a07cec7);
53
54
  $parcel$export(module.exports, "ParrotTheme", () => $80923bc9c1ba824c$export$bca14c5b3b88a9c9);
54
55
  $parcel$export(module.exports, "ParrotThemeConfig", () => $80923bc9c1ba824c$export$e506a1d27d1eaa20);
@@ -867,22 +868,28 @@ var $85c11fe4a674fe33$export$2e2bcd8739ae039 = $85c11fe4a674fe33$var$Column;
867
868
 
868
869
 
869
870
  const $ace9347704301509$export$719e80a44b5e9ad0 = (0, $80923bc9c1ba824c$export$dbf350e5966cf602)({
871
+ "$$input-height": "24px",
870
872
  boxSizing: "border-box",
871
873
  fontFamily: "$sans",
872
874
  lineHeight: "$base",
873
- "&:not(button):focus-within": {
874
- boxShadow: "$focusRing",
875
- border: "1px solid $violet6",
876
- background: "white"
877
- },
878
- "&:where(button):focus": {
875
+ minHeight: "$$input-height",
876
+ "&[data-focused=true]": {
879
877
  boxShadow: "$focusRing",
880
878
  border: "1px solid $violet6"
881
879
  },
880
+ // "&:not(button):focus-within": {
881
+ // boxShadow: "$focusRing",
882
+ // border: "1px solid $violet6",
883
+ // background: "white",
884
+ // },
885
+ // "&:where(button):focus": {
886
+ // boxShadow: "$focusRing",
887
+ // border: "1px solid $violet6",
888
+ // },
882
889
  defaultVariants: {
883
- appearance: "filled",
884
890
  size: "sm",
885
- shape: "round"
891
+ shape: "round",
892
+ appearance: "outline"
886
893
  },
887
894
  variants: {
888
895
  isDisabled: {
@@ -916,69 +923,33 @@ const $ace9347704301509$export$719e80a44b5e9ad0 = (0, $80923bc9c1ba824c$export$d
916
923
  }
917
924
  },
918
925
  shape: {
919
- round: {},
926
+ round: {
927
+ borderRadius: "calc($$input-height / 4)"
928
+ },
920
929
  sharp: {}
921
930
  },
922
931
  size: {
923
932
  xs: {
924
- height: 24,
925
933
  fontSize: "$2"
926
934
  },
927
935
  sm: {
928
- height: 32,
936
+ "$$input-height": "32px",
929
937
  fontSize: "$3"
930
938
  },
931
939
  md: {
932
- height: 40,
940
+ "$$input-height": "40px",
933
941
  fontSize: "$3"
934
942
  },
935
943
  lg: {
936
- height: 44,
944
+ "$$input-height": "44px",
937
945
  fontSize: "$4"
938
946
  },
939
947
  xl: {
940
- height: 52,
948
+ "$$input-height": "52px",
941
949
  fontSize: "$5"
942
950
  }
943
951
  }
944
- },
945
- compoundVariants: [
946
- {
947
- size: "xs",
948
- shape: "round",
949
- css: {
950
- borderRadius: 8
951
- }
952
- },
953
- {
954
- size: "sm",
955
- shape: "round",
956
- css: {
957
- borderRadius: 7
958
- }
959
- },
960
- {
961
- size: "md",
962
- shape: "round",
963
- css: {
964
- borderRadius: 8
965
- }
966
- },
967
- {
968
- size: "lg",
969
- shape: "round",
970
- css: {
971
- borderRadius: 8
972
- }
973
- },
974
- {
975
- size: "xl",
976
- shape: "round",
977
- css: {
978
- borderRadius: 8
979
- }
980
- }
981
- ]
952
+ }
982
953
  });
983
954
 
984
955
 
@@ -1124,8 +1095,10 @@ function $02a166a5043d2558$export$ccdcc3b9d72a654(color, variant) {
1124
1095
  background: `$${color}4`,
1125
1096
  color: `$${color}11`,
1126
1097
  fill: `$${color}11`,
1098
+ border: "none",
1127
1099
  "&:focus": {
1128
- boxShadow: $02a166a5043d2558$export$71074ab0ed740397(color)
1100
+ boxShadow: $02a166a5043d2558$export$71074ab0ed740397(color),
1101
+ border: `1.5px solid $${color}5`
1129
1102
  }
1130
1103
  }
1131
1104
  };
@@ -1595,7 +1568,7 @@ const $78991f4fdd965321$var$SpaceContext = /*#__PURE__*/ $E4F9t$react.createCont
1595
1568
  classNames: {},
1596
1569
  compactItemWrapperAdjust: ""
1597
1570
  });
1598
- function $78991f4fdd965321$export$eef1e68107c58ef2({ children: children , compact: compact , gap: gap , ...props }) {
1571
+ function $78991f4fdd965321$var$SpaceComponent({ children: children , compact: compact , gap: gap , ...props }, ref) {
1599
1572
  const childrenCount = $E4F9t$react.Children.count(children);
1600
1573
  const nodes = $E4F9t$react.useMemo(()=>{
1601
1574
  return $E4F9t$react.Children.map(children, (child, index)=>{
@@ -1619,30 +1592,30 @@ function $78991f4fdd965321$export$eef1e68107c58ef2({ children: children , compac
1619
1592
  ]);
1620
1593
  const realGap = compact ? undefined : gap;
1621
1594
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($78991f4fdd965321$export$30d85e96e785900a, {
1595
+ ref: ref,
1622
1596
  gap: realGap,
1623
1597
  ...props,
1624
1598
  compact: compact,
1625
1599
  children: nodes
1626
1600
  });
1627
1601
  }
1602
+ const $78991f4fdd965321$export$eef1e68107c58ef2 = /*#__PURE__*/ $E4F9t$react.forwardRef($78991f4fdd965321$var$SpaceComponent);
1628
1603
  function $78991f4fdd965321$export$450c36e0b0e62ccd() {
1629
1604
  return $E4F9t$react.useContext($78991f4fdd965321$var$SpaceContext);
1630
1605
  }
1631
1606
 
1632
1607
 
1633
1608
 
1634
- const $a40dc702bc0ad3b7$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef(({ label: label , error: error , appearance: appearance , size: size , shape: shape , append: append , prepend: prepend , description: description , css: css , isDisabled: isDisabled , validationStatus: validationStatus , className: className , ...props }, ref)=>{
1609
+ const $a40dc702bc0ad3b7$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef(({ label: label , error: error , appearance: appearance , size: size , shape: shape , append: append , prepend: prepend , description: description , css: css , isDisabled: isDisabled , validationStatus: validationStatus , className: className , inputRef: inputRef , ...props }, ref)=>{
1635
1610
  const space = (0, $78991f4fdd965321$export$450c36e0b0e62ccd)();
1636
- const inputRef = (0, ($parcel$interopDefault($E4F9t$react))).useRef(null);
1611
+ const internalInputRef = (0, ($parcel$interopDefault($E4F9t$react))).useRef(null);
1637
1612
  const { labelProps: labelProps , inputProps: inputProps , errorMessageProps: errorMessageProps , descriptionProps: descriptionProps } = (0, $E4F9t$reactaria.useTextField)({
1638
1613
  ...props,
1639
1614
  inputElementType: "input",
1640
1615
  label: label,
1641
1616
  description: description,
1642
1617
  isDisabled: isDisabled
1643
- }, inputRef);
1644
- //This is messy
1645
- //TODO Fix how props are extracted for variants and html props
1618
+ }, internalInputRef);
1646
1619
  const variantProps = {
1647
1620
  appearance: appearance,
1648
1621
  size: size,
@@ -1652,7 +1625,7 @@ const $a40dc702bc0ad3b7$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
1652
1625
  };
1653
1626
  const hasAddOns = !!prepend || !!append;
1654
1627
  function captureFocus() {
1655
- inputRef.current?.focus();
1628
+ internalInputRef.current?.focus();
1656
1629
  }
1657
1630
  const commonProps = {
1658
1631
  className: (0, $d5b2fb178ea6b1b9$export$a274e22fb40f762e)({
@@ -1661,6 +1634,7 @@ const $a40dc702bc0ad3b7$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
1661
1634
  ...space.classNames
1662
1635
  })
1663
1636
  };
1637
+ const { isFocused: isFocused , focusProps: focusProps } = (0, $E4F9t$reactaria.useFocusRing)();
1664
1638
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
1665
1639
  className: space.compactItemWrapperAdjust,
1666
1640
  css: css,
@@ -1674,21 +1648,21 @@ const $a40dc702bc0ad3b7$export$f5b8910cec6cf069 = /*#__PURE__*/ (0, ($parcel$int
1674
1648
  children: label
1675
1649
  }),
1676
1650
  !hasAddOns && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $61604ea65ee6bc29$export$a195049fd73b3fe2), {
1677
- ...commonProps,
1678
- ...variantProps,
1679
- ...inputProps
1651
+ "data-focused": isFocused,
1652
+ ref: (0, $d5b2fb178ea6b1b9$export$c9058316764c140e)(internalInputRef, inputRef),
1653
+ ...(0, $E4F9t$reactaria.mergeProps)(focusProps, commonProps, variantProps, inputProps)
1680
1654
  }),
1681
1655
  hasAddOns && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $61604ea65ee6bc29$export$479bffa770f4fc8b), {
1682
- ...commonProps,
1656
+ "data-focused": isFocused,
1683
1657
  onClick: captureFocus,
1684
1658
  hasPrependComponent: !!prepend,
1685
- ...variantProps,
1659
+ ...(0, $E4F9t$reactaria.mergeProps)(focusProps, commonProps, variantProps),
1686
1660
  children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $04e5d96aee536e27$export$2e2bcd8739ae039), {
1687
1661
  append: append,
1688
1662
  prepend: prepend,
1689
1663
  children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("input", {
1690
- ...inputProps,
1691
- ref: inputRef
1664
+ ...(0, $E4F9t$reactaria.mergeProps)(focusProps, inputProps),
1665
+ ref: (0, $d5b2fb178ea6b1b9$export$c9058316764c140e)(inputRef, internalInputRef)
1692
1666
  })
1693
1667
  })
1694
1668
  }),
@@ -1724,7 +1698,7 @@ $a40dc702bc0ad3b7$export$f5b8910cec6cf069.displayName = "Input";
1724
1698
  /* eslint-disable @typescript-eslint/no-explicit-any */
1725
1699
 
1726
1700
  const $c68076e2eb9f7d63$export$303ef672e091d99 = (0, $80923bc9c1ba824c$export$dbf350e5966cf602)((0, $02a166a5043d2558$export$5a7eb6284e7684f5), {
1727
- "$$button-base-height": "28px",
1701
+ "$$button-base-height": "18px",
1728
1702
  display: "inline-flex",
1729
1703
  flexWrap: "nowrap",
1730
1704
  alignItems: "center",
@@ -1772,7 +1746,12 @@ const $c68076e2eb9f7d63$export$303ef672e091d99 = (0, $80923bc9c1ba824c$export$db
1772
1746
  }
1773
1747
  },
1774
1748
  size: {
1749
+ "2xs": {
1750
+ px: 12,
1751
+ fontSize: "$2"
1752
+ },
1775
1753
  xs: {
1754
+ "$$button-base-height": "28px",
1776
1755
  px: 12,
1777
1756
  fontSize: "$2"
1778
1757
  },
@@ -2766,7 +2745,6 @@ $037280c850c74ffd$export$f8afaea2e9656b91.displayName = "RadioCard";
2766
2745
 
2767
2746
 
2768
2747
 
2769
-
2770
2748
  const $765152e7e434b079$export$5ff5fb60b45fffad = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("div", {
2771
2749
  fontFamily: "$sans",
2772
2750
  fontSize: "$3",
@@ -2808,7 +2786,8 @@ const $765152e7e434b079$export$844bee7de236d7ec = (0, $80923bc9c1ba824c$export$3
2808
2786
  });
2809
2787
 
2810
2788
 
2811
- const $4c66e88b2158ec4e$var$_ListBox = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef((props, ref)=>{
2789
+
2790
+ function $4c66e88b2158ec4e$var$AriaListBox(props) {
2812
2791
  const internalState = (0, $E4F9t$reactstately.useListState)(props);
2813
2792
  const listRef = (0, $E4F9t$react.useRef)(null);
2814
2793
  const state = props.state || internalState;
@@ -2826,7 +2805,7 @@ const $4c66e88b2158ec4e$var$_ListBox = /*#__PURE__*/ (0, ($parcel$interopDefault
2826
2805
  overflow: "auto",
2827
2806
  outline: "none"
2828
2807
  },
2829
- ref: (0, $d5b2fb178ea6b1b9$export$c9058316764c140e)(listRef, ref),
2808
+ ref: (0, $d5b2fb178ea6b1b9$export$c9058316764c140e)(listRef),
2830
2809
  ...listBoxProps,
2831
2810
  children: [
2832
2811
  ...state.collection
@@ -2842,8 +2821,25 @@ const $4c66e88b2158ec4e$var$_ListBox = /*#__PURE__*/ (0, ($parcel$interopDefault
2842
2821
  })
2843
2822
  ]
2844
2823
  });
2845
- });
2846
- const $4c66e88b2158ec4e$var$_Option = (props, ref)=>{
2824
+ }
2825
+ const $4c66e88b2158ec4e$export$41f133550aa26f48 = ({ labelKey: labelKey , valueKey: valueKey , renderOption: renderOption , ...props })=>{
2826
+ if (props.items) return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($4c66e88b2158ec4e$var$AriaListBox, {
2827
+ ...props,
2828
+ children: (item)=>{
2829
+ const label = item?.[labelKey || "label"];
2830
+ const value = item?.[valueKey || "value"];
2831
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reactstately.Item), {
2832
+ textValue: value ?? label,
2833
+ children: renderOption ? renderOption(item) : label
2834
+ }, value);
2835
+ }
2836
+ });
2837
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($4c66e88b2158ec4e$var$AriaListBox, {
2838
+ ...props
2839
+ });
2840
+ };
2841
+ $4c66e88b2158ec4e$export$41f133550aa26f48.displayName = "ListBox";
2842
+ const $4c66e88b2158ec4e$var$Option = (props)=>{
2847
2843
  const { item: item , state: state } = props;
2848
2844
  const optionRef = (0, $E4F9t$react.useRef)(null);
2849
2845
  const { optionProps: optionProps , isSelected: isSelected , isDisabled: isDisabled , isFocused: isFocused , isPressed: isPressed } = (0, $E4F9t$reactaria.useOption)({
@@ -2855,12 +2851,12 @@ const $4c66e88b2158ec4e$var$_Option = (props, ref)=>{
2855
2851
  "data-selected": isSelected,
2856
2852
  "data-disabled": isDisabled,
2857
2853
  "data-pressed": isPressed,
2858
- ref: (0, $d5b2fb178ea6b1b9$export$c9058316764c140e)(optionRef, ref),
2854
+ ref: optionRef,
2859
2855
  ...(0, $E4F9t$reactaria.mergeProps)(focusProps, optionProps),
2860
2856
  children: item.rendered
2861
2857
  });
2862
2858
  };
2863
- const $4c66e88b2158ec4e$var$_ListSection = (props, ref)=>{
2859
+ const $4c66e88b2158ec4e$var$ListSection = (props)=>{
2864
2860
  const { section: section , state: state } = props;
2865
2861
  const { itemProps: itemProps , headingProps: headingProps , groupProps: groupProps } = (0, $E4F9t$reactaria.useListBoxSection)({
2866
2862
  heading: section.rendered,
@@ -2872,7 +2868,6 @@ const $4c66e88b2158ec4e$var$_ListSection = (props, ref)=>{
2872
2868
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $E4F9t$reactjsxruntime.Fragment), {
2873
2869
  children: [
2874
2870
  section.key !== state.collection.getFirstKey() && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("li", {
2875
- ref: ref,
2876
2871
  ...separatorProps
2877
2872
  }),
2878
2873
  /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $765152e7e434b079$export$844bee7de236d7ec), {
@@ -2898,24 +2893,6 @@ const $4c66e88b2158ec4e$var$_ListSection = (props, ref)=>{
2898
2893
  ]
2899
2894
  });
2900
2895
  };
2901
- const $4c66e88b2158ec4e$export$41f133550aa26f48 = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef((props, ref)=>{
2902
- const { labelKey: labelKey = "label" , renderOption: renderOption } = props;
2903
- if (!props.items) return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($4c66e88b2158ec4e$var$_ListBox, {
2904
- ref: ref,
2905
- ...props
2906
- });
2907
- return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($4c66e88b2158ec4e$var$_ListBox, {
2908
- ref: ref,
2909
- ...props,
2910
- children: (item)=>/*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reactstately.Item), {
2911
- children: renderOption ? renderOption?.(item) : item?.[labelKey]
2912
- })
2913
- });
2914
- });
2915
- $4c66e88b2158ec4e$var$_ListBox.displayName = "ListBox";
2916
- $4c66e88b2158ec4e$export$41f133550aa26f48.displayName = "WrappedListBox";
2917
- const $4c66e88b2158ec4e$var$ListSection = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef($4c66e88b2158ec4e$var$_ListSection);
2918
- const $4c66e88b2158ec4e$var$Option = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef($4c66e88b2158ec4e$var$_Option);
2919
2896
 
2920
2897
 
2921
2898
 
@@ -2923,7 +2900,6 @@ const $4c66e88b2158ec4e$var$Option = /*#__PURE__*/ (0, ($parcel$interopDefault($
2923
2900
 
2924
2901
 
2925
2902
  const $6f8af3bc5f5b1477$export$3ac1e88a1c0b9f1 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("button", (0, $ace9347704301509$export$719e80a44b5e9ad0), {
2926
- all: "unset",
2927
2903
  boxSizing: "border-box",
2928
2904
  display: "inline-flex",
2929
2905
  alignItems: "center",
@@ -2992,7 +2968,7 @@ $3347a410c0691704$export$5b6b19405a83ff9d.displayName = "Popover";
2992
2968
 
2993
2969
 
2994
2970
 
2995
- const $0a4561d925fa922e$export$cd0225d99c675387 = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef((props, ref)=>{
2971
+ function $0a4561d925fa922e$var$AriaSelect(props) {
2996
2972
  const space = (0, $78991f4fdd965321$export$450c36e0b0e62ccd)();
2997
2973
  const { renderValue: renderValue , renderOption: renderOption , placeholder: placeholder = "Select an option" , appearance: appearance , size: size , css: css , labelKey: labelKey , label: label } = props;
2998
2974
  const state = (0, $E4F9t$reactstately.useSelectState)(props);
@@ -3001,13 +2977,16 @@ const $0a4561d925fa922e$export$cd0225d99c675387 = /*#__PURE__*/ (0, ($parcel$int
3001
2977
  const { buttonProps: buttonProps } = (0, $E4F9t$reactaria.useButton)(triggerProps, selectRef);
3002
2978
  const { focusProps: focusProps , isFocused: isFocused } = (0, $E4F9t$reactaria.useFocusRing)();
3003
2979
  const hasSelection = state.selectedItem != null;
2980
+ function renderSelectedValue() {
2981
+ if (renderValue) return renderValue(state.selectedItem.value);
2982
+ return (state.selectedItem?.value)?.[labelKey || "label"] ?? state?.selectedItem?.rendered;
2983
+ }
3004
2984
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
3005
2985
  className: space.compactItemWrapperAdjust,
3006
2986
  stretchX: true,
3007
2987
  css: css,
3008
2988
  position: "relative",
3009
2989
  gap: 2,
3010
- ref: ref,
3011
2990
  align: "start",
3012
2991
  stack: true,
3013
2992
  children: [
@@ -3037,7 +3016,7 @@ const $0a4561d925fa922e$export$cd0225d99c675387 = /*#__PURE__*/ (0, ($parcel$int
3037
3016
  ...valueProps,
3038
3017
  children: [
3039
3018
  !hasSelection && placeholder,
3040
- hasSelection && renderValue ? renderValue(state.selectedItem) : (state.selectedItem?.value)?.[labelKey || "label"]
3019
+ hasSelection && renderSelectedValue()
3041
3020
  ]
3042
3021
  }),
3043
3022
  /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reacticonshi.HiSelector), {})
@@ -3063,25 +3042,21 @@ const $0a4561d925fa922e$export$cd0225d99c675387 = /*#__PURE__*/ (0, ($parcel$int
3063
3042
  })
3064
3043
  ]
3065
3044
  });
3066
- });
3067
- const $0a4561d925fa922e$export$a26e8b900a29a570 = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef((props, ref)=>{
3068
- if (!props.items) return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($0a4561d925fa922e$export$cd0225d99c675387, {
3069
- ...props,
3070
- ref: ref
3045
+ }
3046
+ function $0a4561d925fa922e$export$ef9b1a59e592288f(props) {
3047
+ if (!props.items) return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($0a4561d925fa922e$var$AriaSelect, {
3048
+ ...props
3071
3049
  });
3072
- const key = props.valueKey || "id";
3050
+ const key = props.valueKey || "value";
3073
3051
  const labelKey = props.labelKey || "label";
3074
- return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($0a4561d925fa922e$export$cd0225d99c675387, {
3075
- ref: ref,
3052
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($0a4561d925fa922e$var$AriaSelect, {
3076
3053
  ...props,
3077
3054
  children: (item)=>/*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reactstately.Item), {
3078
3055
  textValue: item[key] || "key",
3079
3056
  children: props.renderOption ? props.renderOption?.(item) : item?.[labelKey]
3080
3057
  }, item[key] ?? "key")
3081
3058
  });
3082
- });
3083
- $0a4561d925fa922e$export$a26e8b900a29a570.displayName = "Select";
3084
- $0a4561d925fa922e$export$cd0225d99c675387.displayName = "_Select";
3059
+ }
3085
3060
 
3086
3061
 
3087
3062
 
@@ -3534,39 +3509,48 @@ const $8fff24416ec1775a$export$f7513421c53ce141 = (0, $80923bc9c1ba824c$export$3
3534
3509
  size: {
3535
3510
  "3xs": {
3536
3511
  size: 12,
3537
- borderRadius: 4
3512
+ borderRadius: 4,
3513
+ fontSize: "$1"
3538
3514
  },
3539
3515
  "2xs": {
3540
3516
  size: 18,
3541
- borderRadius: 6
3517
+ borderRadius: 6,
3518
+ fontSize: "$2"
3542
3519
  },
3543
3520
  xs: {
3544
3521
  size: 24,
3545
- borderRadius: 6
3522
+ borderRadius: 6,
3523
+ fontSize: "$2"
3546
3524
  },
3547
3525
  sm: {
3548
3526
  size: 32,
3549
- borderRadius: 6
3527
+ borderRadius: 6,
3528
+ fontSize: "$3"
3550
3529
  },
3551
3530
  md: {
3552
3531
  size: 40,
3553
- borderRadius: 6
3532
+ borderRadius: 6,
3533
+ fontSize: "$4"
3554
3534
  },
3555
3535
  lg: {
3556
3536
  size: 48,
3557
- borderRadius: 8
3537
+ borderRadius: 8,
3538
+ fontSize: "$4"
3558
3539
  },
3559
3540
  xl: {
3560
3541
  size: 56,
3561
- borderRadius: 8
3542
+ borderRadius: 8,
3543
+ fontSize: "$5"
3562
3544
  },
3563
3545
  "2xl": {
3564
3546
  size: 64,
3565
- borderRadius: 8
3547
+ borderRadius: 8,
3548
+ fontSize: "$5"
3566
3549
  },
3567
3550
  "3xl": {
3568
3551
  size: 72,
3569
- borderRadius: 8
3552
+ borderRadius: 8,
3553
+ fontSize: "$5"
3570
3554
  }
3571
3555
  }
3572
3556
  }
@@ -4119,7 +4103,7 @@ const $e1b9bb7437d6292e$export$7a4af5518e2bbe67 = (0, $80923bc9c1ba824c$export$3
4119
4103
  },
4120
4104
  sm: {
4121
4105
  "$$tag-base-height": "24px",
4122
- px: 6,
4106
+ px: 10,
4123
4107
  fontSize: 13
4124
4108
  },
4125
4109
  md: {
@@ -4131,6 +4115,11 @@ const $e1b9bb7437d6292e$export$7a4af5518e2bbe67 = (0, $80923bc9c1ba824c$export$3
4131
4115
  "$$tag-base-height": "32px",
4132
4116
  px: 6,
4133
4117
  fontSize: 14
4118
+ },
4119
+ xl: {
4120
+ "$$tag-base-height": "36px",
4121
+ px: 6,
4122
+ fontSize: 14
4134
4123
  }
4135
4124
  },
4136
4125
  shape: {
@@ -5259,6 +5248,7 @@ function $ceb05569908c0e0d$var$Dialog({ width: width = 400 , title: title , onCa
5259
5248
  children: cancelLabel
5260
5249
  }),
5261
5250
  onConfirm && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $8d4373b1a05e63fb$export$353f5b6fc5456de1), {
5251
+ onPress: onConfirm,
5262
5252
  ...confirmButtonProps,
5263
5253
  children: confirmLabel
5264
5254
  })
@@ -5290,4 +5280,199 @@ $ceb05569908c0e0d$export$2b77a92f1a5ad772.useModal = $ceb05569908c0e0d$export$33
5290
5280
 
5291
5281
 
5292
5282
 
5283
+
5284
+
5285
+ const $f7d4ed4fd144ec49$export$7b7637218245c8a = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
5286
+
5287
+
5288
+
5289
+
5290
+
5291
+ const $30a70c8bea3715d9$export$a455218a85c89869 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), (0, $ace9347704301509$export$719e80a44b5e9ad0), {
5292
+ display: "flex",
5293
+ alignItems: "center",
5294
+ flexWrap: "wrap",
5295
+ px: 4,
5296
+ py: 4,
5297
+ gap: "$1",
5298
+ boxSizing: "border-box",
5299
+ // ".input-container": {
5300
+ // width: 4,
5301
+ // },
5302
+ input: {
5303
+ border: "none",
5304
+ background: "transparent",
5305
+ outline: "none",
5306
+ minWidth: 4,
5307
+ width: "100%",
5308
+ marginInlineStart: 4,
5309
+ writingMode: "horizontal-tb"
5310
+ }
5311
+ });
5312
+
5313
+
5314
+
5315
+
5316
+
5317
+ function $6a510d1235dad636$export$40bfa8c7b0832715(value, defaultValue, onChange) {
5318
+ const [state, setState] = $E4F9t$react.useState(value || defaultValue);
5319
+ const isControlled = !(0, $aa33179d12a671ed$export$ae45edb09e2fe7c2)(value);
5320
+ const controlledValue = isControlled ? value : state;
5321
+ const setValue = $E4F9t$react.useCallback((value)=>{
5322
+ if (!isControlled) setState(value);
5323
+ if (!Object.is(controlledValue, value)) onChange?.(value);
5324
+ }, [
5325
+ isControlled,
5326
+ controlledValue
5327
+ ]);
5328
+ return [
5329
+ controlledValue,
5330
+ setValue
5331
+ ];
5332
+ }
5333
+
5334
+
5335
+
5336
+
5337
+
5338
+ function $b30cd386a46620b6$export$39299b56cfd4e361({ css: css , appearance: appearance , size: size , label: label , error: error , placeholder: placeholder , tags: tags , defaultTags: defaultTags , tagColor: tagColor = "gray" , tagVariant: tagVariant = "light" , tagShape: tagShape = "round" , tagSize: tagSize = "md" , onChange: onChange , renderTag: renderTag }) {
5339
+ const [inputValue, setInputValue] = $E4F9t$react.useState("");
5340
+ const [values, setValues] = (0, $6a510d1235dad636$export$40bfa8c7b0832715)(dedupe(tags), dedupe(defaultTags), onChange);
5341
+ const [isFocused, setIsFocused] = $E4F9t$react.useState(false);
5342
+ function dedupe(values) {
5343
+ if (!values) return undefined;
5344
+ return Array.from(new Set(values));
5345
+ }
5346
+ const inputRef = $E4F9t$react.useRef(null);
5347
+ function onInputChange(e) {
5348
+ const { value: value } = e.target;
5349
+ setInputValue(value);
5350
+ }
5351
+ // function hasTrailingSpace(value: string) {
5352
+ // return /\s$/.test(value);
5353
+ // }
5354
+ function hasTrailingComma(value) {
5355
+ return /,$/.test(value);
5356
+ }
5357
+ function onInputFocus() {
5358
+ setIsFocused(true);
5359
+ }
5360
+ function onInputBlur() {
5361
+ setIsFocused(false);
5362
+ }
5363
+ function onKeyDown(e) {
5364
+ switch(e.key){
5365
+ case "Enter":
5366
+ case " ":
5367
+ if (isValid(inputValue.trim())) commit([
5368
+ inputValue
5369
+ ]);
5370
+ break;
5371
+ case "Backspace":
5372
+ if (!inputValue) onRemove(values[values.length - 1]);
5373
+ break;
5374
+ default:
5375
+ break;
5376
+ }
5377
+ }
5378
+ function captureFocus() {
5379
+ inputRef.current?.focus();
5380
+ }
5381
+ function onRemove(value) {
5382
+ setValues(values.filter((v)=>v !== value));
5383
+ }
5384
+ function isValid(value) {
5385
+ return (0, $f7d4ed4fd144ec49$export$7b7637218245c8a).test(value);
5386
+ }
5387
+ function commit(newValues) {
5388
+ const validValues = newValues.map((v)=>v.trim()).filter((v)=>isValid(v));
5389
+ if (validValues.length > 0) setInputValue("");
5390
+ const finalValues = Array.from(new Set([
5391
+ ...values,
5392
+ ...validValues
5393
+ ]));
5394
+ setValues(finalValues);
5395
+ }
5396
+ const showPlaceholder = !inputValue && values.length === 0;
5397
+ function getInputContainerWidth() {
5398
+ if (showPlaceholder) return (placeholder?.length ?? 0) * 10;
5399
+ if (!showPlaceholder && isFocused) return inputValue.length * 10 || 10;
5400
+ return 0;
5401
+ }
5402
+ $E4F9t$react.useEffect(()=>{
5403
+ if (hasTrailingComma(inputValue.trim())) {
5404
+ const split = inputValue.split(",");
5405
+ commit(split);
5406
+ }
5407
+ }, [
5408
+ inputValue
5409
+ ]);
5410
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5411
+ css: css,
5412
+ stack: true,
5413
+ gap: 2,
5414
+ children: [
5415
+ label && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $0c337ac78d7dfe7f$export$2e2bcd8739ae039), {
5416
+ children: label
5417
+ }),
5418
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $30a70c8bea3715d9$export$a455218a85c89869), {
5419
+ "data-focused": isFocused,
5420
+ onClick: captureFocus,
5421
+ size: size,
5422
+ appearance: appearance,
5423
+ children: [
5424
+ values.map((value)=>{
5425
+ return renderTag ? renderTag?.(value, onRemove) : /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $232939a9dd93729d$export$3288d34c523a1192), {
5426
+ variant: tagVariant,
5427
+ color: tagColor,
5428
+ shape: tagShape,
5429
+ size: tagSize,
5430
+ append: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $626c660fba87c9a3$export$c25acd513dcc8062), {
5431
+ variant: "plain",
5432
+ color: "gray",
5433
+ shape: "round",
5434
+ css: {
5435
+ marginLeft: 8
5436
+ },
5437
+ onPress: ()=>{
5438
+ onRemove(value);
5439
+ },
5440
+ size: "2xs",
5441
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reacticonshi.HiX), {
5442
+ size: 16
5443
+ })
5444
+ }),
5445
+ children: value
5446
+ }, value);
5447
+ }),
5448
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
5449
+ css: {
5450
+ width: getInputContainerWidth()
5451
+ },
5452
+ className: "input-container",
5453
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("input", {
5454
+ ref: inputRef,
5455
+ placeholder: showPlaceholder ? placeholder : "",
5456
+ onKeyDown: onKeyDown,
5457
+ value: inputValue,
5458
+ onChange: onInputChange,
5459
+ onFocus: onInputFocus,
5460
+ onBlur: onInputBlur
5461
+ })
5462
+ })
5463
+ ]
5464
+ }),
5465
+ error && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $66ede1fa66acd93e$export$2e2bcd8739ae039), {
5466
+ children: error
5467
+ })
5468
+ ]
5469
+ });
5470
+ }
5471
+
5472
+
5473
+
5474
+
5475
+
5476
+
5477
+
5293
5478
  //# sourceMappingURL=main.js.map