@starasia/dropdown 5.5.0 → 5.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.
@@ -1,5 +1,5 @@
1
- import { jsxs as l, jsx as n, Fragment as sn } from "react/jsx-runtime";
2
- import ln, { useState as I, useRef as M, useEffect as v, forwardRef as yn } from "react";
1
+ import { jsxs as l, jsx as n, Fragment as dn } from "react/jsx-runtime";
2
+ import ln, { useState as W, useRef as M, useEffect as v, forwardRef as yn } from "react";
3
3
  const Nn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
4
4
  * {
5
5
  margin: 0;
@@ -461,17 +461,19 @@ const Nn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
461
461
  .sa-select-field-label-row {
462
462
  display: flex;
463
463
  align-items: center;
464
- gap: 6px;
464
+ gap: 4px;
465
465
  flex-wrap: wrap;
466
466
  }
467
467
  .sa-select-field-label-text {
468
468
  font-size: 14px;
469
469
  font-weight: 500;
470
470
  color: var(--sa-dropdown-text-primary);
471
- line-height: 1.3;
471
+ line-height: normal;
472
472
  }
473
- .sa-select-field-left .sa-select-field-label-text {
474
- font-size: 14px;
473
+ /* match Input: xs/sm label drops to 12px */
474
+ .sa-select-field-size-xs .sa-select-field-label-text,
475
+ .sa-select-field-size-sm .sa-select-field-label-text {
476
+ font-size: 12px;
475
477
  }
476
478
  .sa-select-field-required {
477
479
  font-size: 14px;
@@ -479,6 +481,10 @@ const Nn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
479
481
  color: var(--sa-dropdown-text-error);
480
482
  line-height: 1;
481
483
  }
484
+ .sa-select-field-size-xs .sa-select-field-required,
485
+ .sa-select-field-size-sm .sa-select-field-required {
486
+ font-size: 12px;
487
+ }
482
488
  .sa-select-field-optional-badge {
483
489
  display: inline-flex;
484
490
  align-items: center;
@@ -546,12 +552,12 @@ const Nn = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
546
552
 
547
553
  `;
548
554
  function En(o) {
549
- const [p, d] = I(o), s = M(null), i = (r) => {
550
- s.current && !s.current.contains(r.target) && d(!1);
555
+ const [p, s] = W(o), d = M(null), i = (r) => {
556
+ d.current && !d.current.contains(r.target) && s(!1);
551
557
  };
552
558
  return v(() => (document.addEventListener("click", i, !0), () => {
553
559
  document.removeEventListener("click", i, !0);
554
- }), []), { ref: s, isComponentVisible: p, setIsComponentVisible: d };
560
+ }), []), { ref: d, isComponentVisible: p, setIsComponentVisible: s };
555
561
  }
556
562
  const Cn = ({ ...o }) => /* @__PURE__ */ l(
557
563
  "svg",
@@ -608,8 +614,8 @@ const Cn = ({ ...o }) => /* @__PURE__ */ l(
608
614
  ({
609
615
  positionDropdown: o,
610
616
  dropdownLists: p,
611
- isComponentVisible: d,
612
- searchAble: s,
617
+ isComponentVisible: s,
618
+ searchAble: d,
613
619
  hideSearch: i,
614
620
  onSearch: r,
615
621
  value: m,
@@ -626,7 +632,7 @@ const Cn = ({ ...o }) => /* @__PURE__ */ l(
626
632
  var t;
627
633
  y >= 0 && j.current[y] && ((t = j.current[y]) == null || t.scrollIntoView({ block: "nearest" }));
628
634
  }, [y]);
629
- const H = s && !i ? /* @__PURE__ */ l("div", { className: "sa-input-dropdown-container-dropdown-search", children: [
635
+ const $ = d && !i ? /* @__PURE__ */ l("div", { className: "sa-input-dropdown-container-dropdown-search", children: [
630
636
  /* @__PURE__ */ n(Cn, { strokeWidth: 2, width: 16, style: { flexShrink: 0, color: "var(--sa-dropdown-placeholder-subtle)" } }),
631
637
  /* @__PURE__ */ n(
632
638
  "input",
@@ -640,14 +646,14 @@ const Cn = ({ ...o }) => /* @__PURE__ */ l(
640
646
  }
641
647
  )
642
648
  ] }) : null;
643
- return /* @__PURE__ */ n(sn, { children: d ? /* @__PURE__ */ l(
649
+ return /* @__PURE__ */ n(dn, { children: s ? /* @__PURE__ */ l(
644
650
  "div",
645
651
  {
646
652
  className: "sa-input-dropdown-lists-container",
647
653
  onClick: (t) => t.stopPropagation(),
648
654
  ref: U,
649
655
  children: [
650
- o !== "top" && H,
656
+ o !== "top" && $,
651
657
  /* @__PURE__ */ l(
652
658
  "div",
653
659
  {
@@ -667,14 +673,14 @@ const Cn = ({ ...o }) => /* @__PURE__ */ l(
667
673
  )
668
674
  ] }),
669
675
  p.map((t, A) => {
670
- const $ = !!(m != null && m.find((P) => P.value === t.value)), w = !!t.description;
676
+ const H = !!(m != null && m.find((P) => P.value === t.value)), w = !!t.description;
671
677
  return /* @__PURE__ */ l(
672
678
  "div",
673
679
  {
674
680
  className: [
675
681
  "sa-input-dropdown-item",
676
682
  w ? "has-description" : "",
677
- $ ? "active" : "",
683
+ H ? "active" : "",
678
684
  A === y ? "highlight" : "",
679
685
  t.disable ? "sa-input-dropdown-item-disable" : ""
680
686
  ].filter(Boolean).join(" "),
@@ -683,7 +689,7 @@ const Cn = ({ ...o }) => /* @__PURE__ */ l(
683
689
  },
684
690
  onClick: () => u(t.label, t.value),
685
691
  children: [
686
- R && /* @__PURE__ */ n("div", { className: "sa-input-dropdown-item-check", children: $ && /* @__PURE__ */ n(zn, { width: 16 }) }),
692
+ R && /* @__PURE__ */ n("div", { className: "sa-input-dropdown-item-check", children: H && /* @__PURE__ */ n(zn, { width: 16 }) }),
687
693
  t.icon && /* @__PURE__ */ n("div", { style: { flexShrink: 0, display: "flex" }, children: ln.cloneElement(t.icon, { width: 16 }) }),
688
694
  /* @__PURE__ */ l("div", { style: { minWidth: 0, flex: 1 }, children: [
689
695
  /* @__PURE__ */ n(
@@ -715,7 +721,7 @@ const Cn = ({ ...o }) => /* @__PURE__ */ l(
715
721
  ]
716
722
  }
717
723
  ),
718
- o === "top" && H,
724
+ o === "top" && $,
719
725
  F && /* @__PURE__ */ n("div", { className: "sa-input-dropdown-footer", onClick: (t) => t.stopPropagation(), children: F })
720
726
  ]
721
727
  }
@@ -725,26 +731,26 @@ const Cn = ({ ...o }) => /* @__PURE__ */ l(
725
731
  children: o,
726
732
  handleChangePosition: p
727
733
  }) => {
728
- const d = M(null);
734
+ const s = M(null);
729
735
  v(() => {
730
736
  var m;
731
737
  const i = () => {
732
- if (d.current) {
733
- let u = d.current.parentElement;
734
- for (; u && !s(u); )
738
+ if (s.current) {
739
+ let u = s.current.parentElement;
740
+ for (; u && !d(u); )
735
741
  u = u.parentElement;
736
742
  u && p();
737
743
  }
738
744
  };
739
- let r = (m = d.current) == null ? void 0 : m.parentElement;
740
- for (; r && !s(r); )
745
+ let r = (m = s.current) == null ? void 0 : m.parentElement;
746
+ for (; r && !d(r); )
741
747
  r = r.parentElement;
742
748
  return r && r.addEventListener("scroll", i), i(), () => {
743
749
  r && r.removeEventListener("scroll", i);
744
750
  };
745
751
  }, []);
746
- const s = (i) => i && (i.scrollHeight > i.clientHeight || i.scrollWidth > i.clientWidth);
747
- return /* @__PURE__ */ n("div", { ref: d, children: o });
752
+ const d = (i) => i && (i.scrollHeight > i.clientHeight || i.scrollWidth > i.clientWidth);
753
+ return /* @__PURE__ */ n("div", { ref: s, children: o });
748
754
  }, an = "sa-input-dropdown-styles", Bn = (o) => {
749
755
  if (!document.getElementById(an)) {
750
756
  const p = document.createElement("style");
@@ -752,11 +758,11 @@ const Cn = ({ ...o }) => /* @__PURE__ */ l(
752
758
  }
753
759
  };
754
760
  Bn(Nn);
755
- const On = ({
761
+ const In = ({
756
762
  dropdownLists: o,
757
763
  onChange: p,
758
- defaultValue: d,
759
- value: s,
764
+ defaultValue: s,
765
+ value: d,
760
766
  size: i = "sm",
761
767
  multiSelect: r,
762
768
  searchAble: m,
@@ -769,10 +775,10 @@ const On = ({
769
775
  disable: N,
770
776
  searchValue: U,
771
777
  variant: j = "outline",
772
- footer: H,
778
+ footer: $,
773
779
  groupLabel: t,
774
780
  onSelectAll: A,
775
- fullWidth: $ = !0,
781
+ fullWidth: H = !0,
776
782
  triggerInput: w = !1,
777
783
  clearOnSelect: P = !1,
778
784
  hideChevronIcon: pn = !1,
@@ -789,20 +795,21 @@ const On = ({
789
795
  }) => {
790
796
  const Z = [
791
797
  "sa-select-field",
792
- $ ? "sa-select-field-fullwidth" : ""
793
- ].filter(Boolean).join(" "), E = s !== void 0, Q = M(), un = y || !!h, [c, S] = I(
794
- E ? s || [] : d || []
795
- ), [hn, en] = I(""), [k, X] = I(-1), [fn, q] = I(
798
+ `sa-select-field-size-${i}`,
799
+ H ? "sa-select-field-fullwidth" : ""
800
+ ].filter(Boolean).join(" "), E = d !== void 0, Q = M(), un = y || !!h, [c, S] = W(
801
+ E ? d || [] : s || []
802
+ ), [hn, en] = W(""), [k, X] = W(-1), [fn, q] = W(
796
803
  () => {
797
804
  var e, a;
798
- return !r && (s != null && s.length || d != null && d.length) ? ((e = s == null ? void 0 : s[0]) == null ? void 0 : e.label) ?? ((a = d == null ? void 0 : d[0]) == null ? void 0 : a.label) ?? "" : "";
805
+ return !r && (d != null && d.length || s != null && s.length) ? ((e = d == null ? void 0 : d[0]) == null ? void 0 : e.label) ?? ((a = s == null ? void 0 : s[0]) == null ? void 0 : a.label) ?? "" : "";
799
806
  }
800
- ), g = M(null), { isComponentVisible: f, ref: Y, setIsComponentVisible: C } = En(!1), O = o !== void 0, on = c.length > 0, bn = (e) => {
807
+ ), g = M(null), { isComponentVisible: f, ref: Y, setIsComponentVisible: C } = En(!1), I = o !== void 0, on = c.length > 0, bn = (e) => {
801
808
  e.stopPropagation();
802
809
  const a = [];
803
810
  E || S(a), p(a), w && q(""), K == null || K();
804
811
  }, gn = () => {
805
- O && C((e) => !e);
812
+ I && C((e) => !e);
806
813
  }, G = (e, a) => {
807
814
  if (r) {
808
815
  if (c == null ? void 0 : c.find((x) => x.value === a)) {
@@ -819,14 +826,14 @@ const On = ({
819
826
  }
820
827
  };
821
828
  v(() => {
822
- E && S(s || []);
823
- }, [s]), v(() => {
824
- E || JSON.stringify(Q.current) === JSON.stringify(d) || (Q.current = d, S(Q.current || []));
825
- }, [d]);
829
+ E && S(d || []);
830
+ }, [d]), v(() => {
831
+ E || JSON.stringify(Q.current) === JSON.stringify(s) || (Q.current = s, S(Q.current || []));
832
+ }, [s]);
826
833
  const xn = () => c.length ? r ? c == null ? void 0 : c.map((e, a) => /* @__PURE__ */ l("div", { className: "sa-input-dropdown-preview-item", children: [
827
834
  /* @__PURE__ */ n("p", { style: { minWidth: "max-content" }, children: e == null ? void 0 : e.label }),
828
835
  /* @__PURE__ */ n(
829
- dn,
836
+ sn,
830
837
  {
831
838
  onClick: (b) => {
832
839
  b.stopPropagation(), G(e.label, e.value);
@@ -854,7 +861,7 @@ const On = ({
854
861
  f || X(-1);
855
862
  }, [f]);
856
863
  const rn = (e) => {
857
- if (O) {
864
+ if (I) {
858
865
  if (!f) {
859
866
  (e.key === "ArrowDown" || e.key === "Enter") && (e.preventDefault(), C(!0));
860
867
  return;
@@ -884,7 +891,7 @@ const On = ({
884
891
  break;
885
892
  }
886
893
  }
887
- }, W = i === "lg" || i === "xl" ? 20 : i === "xs" ? 14 : 16, vn = cn && !N ? /* @__PURE__ */ n(
894
+ }, O = i === "lg" || i === "xl" ? 20 : i === "xs" ? 14 : 16, vn = cn && !N ? /* @__PURE__ */ n(
888
895
  "button",
889
896
  {
890
897
  type: "button",
@@ -894,13 +901,13 @@ const On = ({
894
901
  tabIndex: -1,
895
902
  onClick: bn,
896
903
  onMouseDown: (e) => e.preventDefault(),
897
- children: /* @__PURE__ */ n(Dn, { width: W, height: W })
904
+ children: /* @__PURE__ */ n(Dn, { width: O, height: O })
898
905
  }
899
- ) : null, mn = w ? /* @__PURE__ */ l(sn, { children: [
906
+ ) : null, mn = w ? /* @__PURE__ */ l(dn, { children: [
900
907
  r && c.map((e, a) => /* @__PURE__ */ l("div", { className: "sa-input-dropdown-preview-item", children: [
901
908
  /* @__PURE__ */ n("p", { style: { minWidth: "max-content" }, children: e == null ? void 0 : e.label }),
902
909
  /* @__PURE__ */ n(
903
- dn,
910
+ sn,
904
911
  {
905
912
  onClick: (b) => {
906
913
  b.stopPropagation(), G(e.label, e.value);
@@ -915,10 +922,10 @@ const On = ({
915
922
  value: fn,
916
923
  onChange: (e) => {
917
924
  const a = e.target.value;
918
- q(a), L == null || L(a), !f && O && C(!0);
925
+ q(a), L == null || L(a), !f && I && C(!0);
919
926
  },
920
927
  onFocus: () => {
921
- !N && O && C(!0);
928
+ !N && I && C(!0);
922
929
  },
923
930
  onBlur: () => {
924
931
  r || setTimeout(() => C(!1), 150);
@@ -949,14 +956,14 @@ const On = ({
949
956
  children: [
950
957
  /* @__PURE__ */ l("div", { className: "sa-input-dropdown-preview-container", children: [
951
958
  u ? ln.cloneElement(u, {
952
- width: W,
959
+ width: O,
953
960
  style: { color: "var(--sa-dropdown-placeholder)", flexShrink: 0 }
954
961
  }) : null,
955
962
  /* @__PURE__ */ n("div", { className: "sa-input-dropdown-container-preview-item", children: w ? mn : xn() }),
956
963
  vn,
957
- !pn && /* @__PURE__ */ n("div", { className: "sa-input-dropdown-chevron", children: f ? /* @__PURE__ */ n(jn, { width: W }) : /* @__PURE__ */ n(Sn, { width: W }) })
964
+ !pn && /* @__PURE__ */ n("div", { className: "sa-input-dropdown-chevron", children: f ? /* @__PURE__ */ n(jn, { width: O }) : /* @__PURE__ */ n(Sn, { width: O }) })
958
965
  ] }),
959
- O && /* @__PURE__ */ n(
966
+ I && /* @__PURE__ */ n(
960
967
  Rn,
961
968
  {
962
969
  dropdownLists: o,
@@ -971,7 +978,7 @@ const On = ({
971
978
  multiSelect: r,
972
979
  searchValue: U,
973
980
  highlightedIndex: k,
974
- footer: H,
981
+ footer: $,
975
982
  groupLabel: t,
976
983
  onSelectAll: A
977
984
  }
@@ -1009,27 +1016,27 @@ const On = ({
1009
1016
  D && !h && /* @__PURE__ */ n("p", { className: "sa-select-field-helper", children: D }),
1010
1017
  h && /* @__PURE__ */ n("p", { className: "sa-select-field-error-msg", children: h })
1011
1018
  ] });
1012
- }, tn = (o, p, d) => {
1013
- const s = o.length;
1014
- let i = p + d;
1015
- for (; i >= 0 && i < s; ) {
1019
+ }, tn = (o, p, s) => {
1020
+ const d = o.length;
1021
+ let i = p + s;
1022
+ for (; i >= 0 && i < d; ) {
1016
1023
  if (!o[i].disable)
1017
1024
  return i;
1018
- i += d;
1025
+ i += s;
1019
1026
  }
1020
- if (d === 1) {
1021
- for (let r = 0; r < s; r++)
1027
+ if (s === 1) {
1028
+ for (let r = 0; r < d; r++)
1022
1029
  if (!o[r].disable)
1023
1030
  return r;
1024
1031
  } else
1025
- for (let r = s - 1; r >= 0; r--)
1032
+ for (let r = d - 1; r >= 0; r--)
1026
1033
  if (!o[r].disable)
1027
1034
  return r;
1028
1035
  return -1;
1029
1036
  }, Dn = (o) => /* @__PURE__ */ l("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o, children: [
1030
1037
  /* @__PURE__ */ n("circle", { cx: "8", cy: "8", r: "7", fill: "currentColor", opacity: "0.2" }),
1031
1038
  /* @__PURE__ */ n("path", { d: "M5.5 5.5l5 5M10.5 5.5l-5 5", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" })
1032
- ] }), dn = (o) => /* @__PURE__ */ n(
1039
+ ] }), sn = (o) => /* @__PURE__ */ n(
1033
1040
  "svg",
1034
1041
  {
1035
1042
  xmlns: "http://www.w3.org/2000/svg",
@@ -1092,5 +1099,5 @@ const On = ({
1092
1099
  }
1093
1100
  );
1094
1101
  export {
1095
- On as Dropdown
1102
+ In as Dropdown
1096
1103
  };
@@ -459,17 +459,19 @@
459
459
  .sa-select-field-label-row {
460
460
  display: flex;
461
461
  align-items: center;
462
- gap: 6px;
462
+ gap: 4px;
463
463
  flex-wrap: wrap;
464
464
  }
465
465
  .sa-select-field-label-text {
466
466
  font-size: 14px;
467
467
  font-weight: 500;
468
468
  color: var(--sa-dropdown-text-primary);
469
- line-height: 1.3;
469
+ line-height: normal;
470
470
  }
471
- .sa-select-field-left .sa-select-field-label-text {
472
- font-size: 14px;
471
+ /* match Input: xs/sm label drops to 12px */
472
+ .sa-select-field-size-xs .sa-select-field-label-text,
473
+ .sa-select-field-size-sm .sa-select-field-label-text {
474
+ font-size: 12px;
473
475
  }
474
476
  .sa-select-field-required {
475
477
  font-size: 14px;
@@ -477,6 +479,10 @@
477
479
  color: var(--sa-dropdown-text-error);
478
480
  line-height: 1;
479
481
  }
482
+ .sa-select-field-size-xs .sa-select-field-required,
483
+ .sa-select-field-size-sm .sa-select-field-required {
484
+ font-size: 12px;
485
+ }
480
486
  .sa-select-field-optional-badge {
481
487
  display: inline-flex;
482
488
  align-items: center;
@@ -542,4 +548,4 @@
542
548
  display: none;
543
549
  }
544
550
 
545
- `;function dn(o){const[p,d]=l.useState(o),t=l.useRef(null),s=r=>{t.current&&!t.current.contains(r.target)&&d(!1)};return l.useEffect(()=>(document.addEventListener("click",s,!0),()=>{document.removeEventListener("click",s,!0)}),[]),{ref:t,isComponentVisible:p,setIsComponentVisible:d}}const tn=({...o})=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",...o,viewBox:"0 0 20 20",fill:"none",children:[n.jsx("circle",{cx:"9.80547",cy:"9.8055",r:"7.49047",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("path",{d:"M15.0153 15.4043L17.9519 18.3333",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),ln=({width:o=16})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 16 16",fill:"none",children:n.jsx("path",{d:"M3.5 8L6.5 11L12.5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),pn=l.forwardRef(({positionDropdown:o,dropdownLists:p,isComponentVisible:d,searchAble:t,hideSearch:s,onSearch:r,value:k,handleChangeValue:h,multiSelect:L,searchValue:B,highlightedIndex:y,footer:I,groupLabel:F,onSelectAll:N},G)=>{const P=l.useRef([]);l.useEffect(()=>{var i;y>=0&&P.current[y]&&((i=P.current[y])==null||i.scrollIntoView({block:"nearest"}))},[y]);const T=t&&!s?n.jsxs("div",{className:"sa-input-dropdown-container-dropdown-search",children:[n.jsx(tn,{strokeWidth:2,width:16,style:{flexShrink:0,color:"var(--sa-dropdown-placeholder-subtle)"}}),n.jsx("input",{onChange:i=>{r&&r(i.target.value)},value:B,autoFocus:!0,placeholder:"Search..."})]}):null;return n.jsx(n.Fragment,{children:d?n.jsxs("div",{className:"sa-input-dropdown-lists-container",onClick:i=>i.stopPropagation(),ref:G,children:[o!=="top"&&T,n.jsxs("div",{className:`sa-input-dropdown-item-container ${L?"multi":""}`,children:[F&&n.jsxs("div",{className:"sa-input-dropdown-section-header",children:[n.jsx("span",{className:"sa-input-dropdown-section-label",children:F}),L&&N&&n.jsx("button",{className:"sa-input-dropdown-section-select-all",onClick:i=>{i.stopPropagation(),N()},children:"Select all"})]}),p.map((i,A)=>{const H=!!(k!=null&&k.find(O=>O.value===i.value)),w=!!i.description;return n.jsxs("div",{className:["sa-input-dropdown-item",w?"has-description":"",H?"active":"",A===y?"highlight":"",i.disable?"sa-input-dropdown-item-disable":""].filter(Boolean).join(" "),ref:O=>{P.current[A]=O},onClick:()=>h(i.label,i.value),children:[L&&n.jsx("div",{className:"sa-input-dropdown-item-check",children:H&&n.jsx(ln,{width:16})}),i.icon&&n.jsx("div",{style:{flexShrink:0,display:"flex"},children:l.cloneElement(i.icon,{width:16})}),n.jsxs("div",{style:{minWidth:0,flex:1},children:[n.jsx("p",{className:["sa-input-dropdown-item-text",i.disable?"sa-input-dropdown-item-disable":""].filter(Boolean).join(" "),children:i.label}),i.description&&n.jsx("p",{className:["sa-input-dropdown-item-text-description",i.disable?"sa-input-dropdown-item-disable":""].filter(Boolean).join(" "),children:i.description})]})]},A)})]}),o==="top"&&T,I&&n.jsx("div",{className:"sa-input-dropdown-footer",onClick:i=>i.stopPropagation(),children:I})]}):null})}),cn=({children:o,handleChangePosition:p})=>{const d=l.useRef(null);l.useEffect(()=>{var k;const s=()=>{if(d.current){let h=d.current.parentElement;for(;h&&!t(h);)h=h.parentElement;h&&p()}};let r=(k=d.current)==null?void 0:k.parentElement;for(;r&&!t(r);)r=r.parentElement;return r&&r.addEventListener("scroll",s),s(),()=>{r&&r.removeEventListener("scroll",s)}},[]);const t=s=>s&&(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);return n.jsx("div",{ref:d,children:o})},_="sa-input-dropdown-styles";(o=>{if(!document.getElementById(_)){const p=document.createElement("style");p.id=_,p.textContent=o,document.head.appendChild(p)}})(sn);const wn=({dropdownLists:o,onChange:p,defaultValue:d,value:t,size:s="sm",multiSelect:r,searchAble:k,iconLeft:h,placeholder:L,onSearch:B,error:y,onBlur:I,onFocus:F,disable:N,searchValue:G,variant:P="outline",footer:T,groupLabel:i,onSelectAll:A,fullWidth:H=!0,triggerInput:w=!1,clearOnSelect:O=!1,hideChevronIcon:bn=!1,clearable:gn=!1,onClear:U,label:K,labelPosition:xn="outside-top",required:nn,optional:en,description:S,helperText:D,errorText:f})=>{const J=["sa-select-field",H?"sa-select-field-fullwidth":""].filter(Boolean).join(" "),E=t!==void 0,Z=l.useRef(),vn=y||!!f,[c,j]=l.useState(E?t||[]:d||[]),[kn,on]=l.useState(""),[m,Q]=l.useState(-1),[mn,$]=l.useState(()=>{var e,a;return!r&&(t!=null&&t.length||d!=null&&d.length)?((e=t==null?void 0:t[0])==null?void 0:e.label)??((a=d==null?void 0:d[0])==null?void 0:a.label)??"":""}),g=l.useRef(null),{isComponentVisible:u,ref:X,setIsComponentVisible:C}=dn(!1),M=o!==void 0,rn=c.length>0,yn=e=>{e.stopPropagation();const a=[];E||j(a),p(a),w&&$(""),U==null||U()},Nn=()=>{M&&C(e=>!e)},q=(e,a)=>{if(r){if(c==null?void 0:c.find(x=>x.value===a)){const x=c.filter(Ln=>Ln.value!==a);E||j(x),p(x)}else{const x=[...c,{label:e,value:a}];E||j(x),p(x)}w&&$("")}else{const b=[{label:e,value:a}];E||j(b),p(b),w&&$(O?"":e),C(!1)}};l.useEffect(()=>{E&&j(t||[])},[t]),l.useEffect(()=>{E||JSON.stringify(Z.current)===JSON.stringify(d)||(Z.current=d,j(Z.current||[]))},[d]);const En=()=>c.length?r?c==null?void 0:c.map((e,a)=>n.jsxs("div",{className:"sa-input-dropdown-preview-item",children:[n.jsx("p",{style:{minWidth:"max-content"},children:e==null?void 0:e.label}),n.jsx(R,{onClick:b=>{b.stopPropagation(),q(e.label,e.value)}})]},a)):n.jsx("p",{style:{minWidth:"max-content"},children:c==null?void 0:c[0].label}):n.jsx("p",{className:"sa-input-dropdown-placeholder",children:L}),z=()=>{if(X.current&&g.current){const e=window.innerHeight,a=X.current.getBoundingClientRect(),b=g.current.getBoundingClientRect(),x=a.bottom+b.height;g.current.style.left=`${a.left}px`,g.current.style.width=`${a.width}px`,x>=e-10?(g.current.style.top=`${a.top-b.height-5}px`,on("top")):(g.current.style.top=`${a.top+a.height+4}px`,on("bottom"))}};l.useEffect(()=>(window.addEventListener("scroll",z),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z),window.removeEventListener("resize",z)}),[]),l.useEffect(()=>{z()},[u]),l.useEffect(()=>{if(!u||!g.current)return;const e=new ResizeObserver(()=>{z()});return e.observe(g.current),()=>e.disconnect()},[u]),l.useEffect(()=>{u||Q(-1)},[u]);const an=e=>{if(M){if(!u){(e.key==="ArrowDown"||e.key==="Enter")&&(e.preventDefault(),C(!0));return}switch(e.key){case"ArrowDown":{e.preventDefault();const a=V(o,m,1);a!==-1&&Q(a);break}case"ArrowUp":{e.preventDefault();const a=V(o,m,-1);a!==-1&&Q(a);break}case"Enter":{e.preventDefault(),m>=0&&o[m]&&!o[m].disable&&q(o[m].label,o[m].value);break}case"Escape":C(!1);break}}},W=s==="lg"||s==="xl"?20:s==="xs"?14:16,Cn=gn&&!N?n.jsx("button",{type:"button",className:`sa-input-dropdown-clear${rn?"":" sa-input-dropdown-clear-hidden"}`,"aria-label":"Clear selection","aria-hidden":!rn,tabIndex:-1,onClick:yn,onMouseDown:e=>e.preventDefault(),children:n.jsx(hn,{width:W,height:W})}):null,zn=w?n.jsxs(n.Fragment,{children:[r&&c.map((e,a)=>n.jsxs("div",{className:"sa-input-dropdown-preview-item",children:[n.jsx("p",{style:{minWidth:"max-content"},children:e==null?void 0:e.label}),n.jsx(R,{onClick:b=>{b.stopPropagation(),q(e.label,e.value)}})]},a)),n.jsx("input",{className:"sa-input-dropdown-trigger-input",value:mn,onChange:e=>{const a=e.target.value;$(a),B==null||B(a),!u&&M&&C(!0)},onFocus:()=>{!N&&M&&C(!0)},onBlur:()=>{r||setTimeout(()=>C(!1),150)},onKeyDown:an,placeholder:c.length===0||r?L:void 0,disabled:N})]}):null,Y=n.jsx(cn,{handleChangePosition:z,children:n.jsxs("div",{className:["sa-input-dropdown-container",P,`sa-input-dropdown-size-${s}`,w?"trigger-input":"",u?"active":"",vn?"error":"",N?"disable":""].filter(Boolean).join(" "),ref:X,onClick:w?void 0:Nn,onKeyDown:w?void 0:an,tabIndex:w?void 0:0,onBlur:w?void 0:I,onFocus:w?void 0:F,children:[n.jsxs("div",{className:"sa-input-dropdown-preview-container",children:[h?l.cloneElement(h,{width:W,style:{color:"var(--sa-dropdown-placeholder)",flexShrink:0}}):null,n.jsx("div",{className:"sa-input-dropdown-container-preview-item",children:w?zn:En()}),Cn,!bn&&n.jsx("div",{className:"sa-input-dropdown-chevron",children:u?n.jsx(un,{width:W}):n.jsx(fn,{width:W})})]}),M&&n.jsx(pn,{dropdownLists:o,handleChangeValue:q,isComponentVisible:u,positionDropdown:kn,searchAble:!!k,hideSearch:w,value:c,onSearch:B,ref:g,multiSelect:r,searchValue:G,highlightedIndex:m,footer:T,groupLabel:i,onSelectAll:A})]})});return K?xn==="outside-left"?n.jsxs("div",{className:`${J} sa-select-field-left`,children:[n.jsxs("div",{className:"sa-select-field-left-label",children:[n.jsxs("div",{className:"sa-select-field-label-row",children:[n.jsx("span",{className:"sa-select-field-label-text",children:K}),en&&n.jsx("span",{className:"sa-select-field-optional-badge",children:"Optional"}),nn&&n.jsx("span",{className:"sa-select-field-required",children:"*"})]}),S&&n.jsx("p",{className:"sa-select-field-helper-top",children:S})]}),n.jsxs("div",{className:"sa-select-field-input-wrap",children:[Y,D&&!f&&n.jsx("p",{className:"sa-select-field-helper",children:D}),f&&n.jsx("p",{className:"sa-select-field-error-msg",children:f})]})]}):n.jsxs("div",{className:J,children:[n.jsxs("div",{className:"sa-select-field-label-row",children:[n.jsx("span",{className:"sa-select-field-label-text",children:K}),en&&n.jsx("span",{className:"sa-select-field-optional-badge",children:"Optional"}),nn&&n.jsx("span",{className:"sa-select-field-required",children:"*"})]}),S&&n.jsx("p",{className:"sa-select-field-helper-top",children:S}),Y,D&&!f&&n.jsx("p",{className:"sa-select-field-helper",children:D}),f&&n.jsx("p",{className:"sa-select-field-error-msg",children:f})]}):n.jsxs("div",{className:J,children:[S&&n.jsx("p",{className:"sa-select-field-helper-top",children:S}),Y,D&&!f&&n.jsx("p",{className:"sa-select-field-helper",children:D}),f&&n.jsx("p",{className:"sa-select-field-error-msg",children:f})]})},V=(o,p,d)=>{const t=o.length;let s=p+d;for(;s>=0&&s<t;){if(!o[s].disable)return s;s+=d}if(d===1){for(let r=0;r<t;r++)if(!o[r].disable)return r}else for(let r=t-1;r>=0;r--)if(!o[r].disable)return r;return-1},hn=o=>n.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"currentColor",opacity:"0.2"}),n.jsx("path",{d:"M5.5 5.5l5 5M10.5 5.5l-5 5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),R=o=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",style:{flexShrink:0,cursor:"pointer"},...o,children:n.jsx("path",{d:"M12 6L6 12M6.00001 6L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),fn=({width:o=16})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 16 16",fill:"none",style:{color:"var(--sa-dropdown-placeholder)",flexShrink:0},children:n.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),un=({width:o=16})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 16 16",fill:"none",style:{color:"var(--sa-dropdown-placeholder)",flexShrink:0},children:n.jsx("path",{d:"M4 10L8 6L12 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});v.Dropdown=wn,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
551
+ `;function dn(o){const[p,d]=l.useState(o),t=l.useRef(null),s=r=>{t.current&&!t.current.contains(r.target)&&d(!1)};return l.useEffect(()=>(document.addEventListener("click",s,!0),()=>{document.removeEventListener("click",s,!0)}),[]),{ref:t,isComponentVisible:p,setIsComponentVisible:d}}const tn=({...o})=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",...o,viewBox:"0 0 20 20",fill:"none",children:[n.jsx("circle",{cx:"9.80547",cy:"9.8055",r:"7.49047",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("path",{d:"M15.0153 15.4043L17.9519 18.3333",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}),ln=({width:o=16})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 16 16",fill:"none",children:n.jsx("path",{d:"M3.5 8L6.5 11L12.5 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),pn=l.forwardRef(({positionDropdown:o,dropdownLists:p,isComponentVisible:d,searchAble:t,hideSearch:s,onSearch:r,value:k,handleChangeValue:h,multiSelect:L,searchValue:B,highlightedIndex:y,footer:W,groupLabel:F,onSelectAll:N},G)=>{const P=l.useRef([]);l.useEffect(()=>{var i;y>=0&&P.current[y]&&((i=P.current[y])==null||i.scrollIntoView({block:"nearest"}))},[y]);const T=t&&!s?n.jsxs("div",{className:"sa-input-dropdown-container-dropdown-search",children:[n.jsx(tn,{strokeWidth:2,width:16,style:{flexShrink:0,color:"var(--sa-dropdown-placeholder-subtle)"}}),n.jsx("input",{onChange:i=>{r&&r(i.target.value)},value:B,autoFocus:!0,placeholder:"Search..."})]}):null;return n.jsx(n.Fragment,{children:d?n.jsxs("div",{className:"sa-input-dropdown-lists-container",onClick:i=>i.stopPropagation(),ref:G,children:[o!=="top"&&T,n.jsxs("div",{className:`sa-input-dropdown-item-container ${L?"multi":""}`,children:[F&&n.jsxs("div",{className:"sa-input-dropdown-section-header",children:[n.jsx("span",{className:"sa-input-dropdown-section-label",children:F}),L&&N&&n.jsx("button",{className:"sa-input-dropdown-section-select-all",onClick:i=>{i.stopPropagation(),N()},children:"Select all"})]}),p.map((i,A)=>{const $=!!(k!=null&&k.find(O=>O.value===i.value)),w=!!i.description;return n.jsxs("div",{className:["sa-input-dropdown-item",w?"has-description":"",$?"active":"",A===y?"highlight":"",i.disable?"sa-input-dropdown-item-disable":""].filter(Boolean).join(" "),ref:O=>{P.current[A]=O},onClick:()=>h(i.label,i.value),children:[L&&n.jsx("div",{className:"sa-input-dropdown-item-check",children:$&&n.jsx(ln,{width:16})}),i.icon&&n.jsx("div",{style:{flexShrink:0,display:"flex"},children:l.cloneElement(i.icon,{width:16})}),n.jsxs("div",{style:{minWidth:0,flex:1},children:[n.jsx("p",{className:["sa-input-dropdown-item-text",i.disable?"sa-input-dropdown-item-disable":""].filter(Boolean).join(" "),children:i.label}),i.description&&n.jsx("p",{className:["sa-input-dropdown-item-text-description",i.disable?"sa-input-dropdown-item-disable":""].filter(Boolean).join(" "),children:i.description})]})]},A)})]}),o==="top"&&T,W&&n.jsx("div",{className:"sa-input-dropdown-footer",onClick:i=>i.stopPropagation(),children:W})]}):null})}),cn=({children:o,handleChangePosition:p})=>{const d=l.useRef(null);l.useEffect(()=>{var k;const s=()=>{if(d.current){let h=d.current.parentElement;for(;h&&!t(h);)h=h.parentElement;h&&p()}};let r=(k=d.current)==null?void 0:k.parentElement;for(;r&&!t(r);)r=r.parentElement;return r&&r.addEventListener("scroll",s),s(),()=>{r&&r.removeEventListener("scroll",s)}},[]);const t=s=>s&&(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);return n.jsx("div",{ref:d,children:o})},_="sa-input-dropdown-styles";(o=>{if(!document.getElementById(_)){const p=document.createElement("style");p.id=_,p.textContent=o,document.head.appendChild(p)}})(sn);const wn=({dropdownLists:o,onChange:p,defaultValue:d,value:t,size:s="sm",multiSelect:r,searchAble:k,iconLeft:h,placeholder:L,onSearch:B,error:y,onBlur:W,onFocus:F,disable:N,searchValue:G,variant:P="outline",footer:T,groupLabel:i,onSelectAll:A,fullWidth:$=!0,triggerInput:w=!1,clearOnSelect:O=!1,hideChevronIcon:bn=!1,clearable:gn=!1,onClear:U,label:K,labelPosition:xn="outside-top",required:nn,optional:en,description:S,helperText:D,errorText:f})=>{const J=["sa-select-field",`sa-select-field-size-${s}`,$?"sa-select-field-fullwidth":""].filter(Boolean).join(" "),E=t!==void 0,Z=l.useRef(),vn=y||!!f,[c,j]=l.useState(E?t||[]:d||[]),[kn,on]=l.useState(""),[m,Q]=l.useState(-1),[mn,q]=l.useState(()=>{var e,a;return!r&&(t!=null&&t.length||d!=null&&d.length)?((e=t==null?void 0:t[0])==null?void 0:e.label)??((a=d==null?void 0:d[0])==null?void 0:a.label)??"":""}),g=l.useRef(null),{isComponentVisible:u,ref:X,setIsComponentVisible:C}=dn(!1),I=o!==void 0,rn=c.length>0,yn=e=>{e.stopPropagation();const a=[];E||j(a),p(a),w&&q(""),U==null||U()},Nn=()=>{I&&C(e=>!e)},H=(e,a)=>{if(r){if(c==null?void 0:c.find(x=>x.value===a)){const x=c.filter(Ln=>Ln.value!==a);E||j(x),p(x)}else{const x=[...c,{label:e,value:a}];E||j(x),p(x)}w&&q("")}else{const b=[{label:e,value:a}];E||j(b),p(b),w&&q(O?"":e),C(!1)}};l.useEffect(()=>{E&&j(t||[])},[t]),l.useEffect(()=>{E||JSON.stringify(Z.current)===JSON.stringify(d)||(Z.current=d,j(Z.current||[]))},[d]);const En=()=>c.length?r?c==null?void 0:c.map((e,a)=>n.jsxs("div",{className:"sa-input-dropdown-preview-item",children:[n.jsx("p",{style:{minWidth:"max-content"},children:e==null?void 0:e.label}),n.jsx(R,{onClick:b=>{b.stopPropagation(),H(e.label,e.value)}})]},a)):n.jsx("p",{style:{minWidth:"max-content"},children:c==null?void 0:c[0].label}):n.jsx("p",{className:"sa-input-dropdown-placeholder",children:L}),z=()=>{if(X.current&&g.current){const e=window.innerHeight,a=X.current.getBoundingClientRect(),b=g.current.getBoundingClientRect(),x=a.bottom+b.height;g.current.style.left=`${a.left}px`,g.current.style.width=`${a.width}px`,x>=e-10?(g.current.style.top=`${a.top-b.height-5}px`,on("top")):(g.current.style.top=`${a.top+a.height+4}px`,on("bottom"))}};l.useEffect(()=>(window.addEventListener("scroll",z),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z),window.removeEventListener("resize",z)}),[]),l.useEffect(()=>{z()},[u]),l.useEffect(()=>{if(!u||!g.current)return;const e=new ResizeObserver(()=>{z()});return e.observe(g.current),()=>e.disconnect()},[u]),l.useEffect(()=>{u||Q(-1)},[u]);const an=e=>{if(I){if(!u){(e.key==="ArrowDown"||e.key==="Enter")&&(e.preventDefault(),C(!0));return}switch(e.key){case"ArrowDown":{e.preventDefault();const a=V(o,m,1);a!==-1&&Q(a);break}case"ArrowUp":{e.preventDefault();const a=V(o,m,-1);a!==-1&&Q(a);break}case"Enter":{e.preventDefault(),m>=0&&o[m]&&!o[m].disable&&H(o[m].label,o[m].value);break}case"Escape":C(!1);break}}},M=s==="lg"||s==="xl"?20:s==="xs"?14:16,Cn=gn&&!N?n.jsx("button",{type:"button",className:`sa-input-dropdown-clear${rn?"":" sa-input-dropdown-clear-hidden"}`,"aria-label":"Clear selection","aria-hidden":!rn,tabIndex:-1,onClick:yn,onMouseDown:e=>e.preventDefault(),children:n.jsx(hn,{width:M,height:M})}):null,zn=w?n.jsxs(n.Fragment,{children:[r&&c.map((e,a)=>n.jsxs("div",{className:"sa-input-dropdown-preview-item",children:[n.jsx("p",{style:{minWidth:"max-content"},children:e==null?void 0:e.label}),n.jsx(R,{onClick:b=>{b.stopPropagation(),H(e.label,e.value)}})]},a)),n.jsx("input",{className:"sa-input-dropdown-trigger-input",value:mn,onChange:e=>{const a=e.target.value;q(a),B==null||B(a),!u&&I&&C(!0)},onFocus:()=>{!N&&I&&C(!0)},onBlur:()=>{r||setTimeout(()=>C(!1),150)},onKeyDown:an,placeholder:c.length===0||r?L:void 0,disabled:N})]}):null,Y=n.jsx(cn,{handleChangePosition:z,children:n.jsxs("div",{className:["sa-input-dropdown-container",P,`sa-input-dropdown-size-${s}`,w?"trigger-input":"",u?"active":"",vn?"error":"",N?"disable":""].filter(Boolean).join(" "),ref:X,onClick:w?void 0:Nn,onKeyDown:w?void 0:an,tabIndex:w?void 0:0,onBlur:w?void 0:W,onFocus:w?void 0:F,children:[n.jsxs("div",{className:"sa-input-dropdown-preview-container",children:[h?l.cloneElement(h,{width:M,style:{color:"var(--sa-dropdown-placeholder)",flexShrink:0}}):null,n.jsx("div",{className:"sa-input-dropdown-container-preview-item",children:w?zn:En()}),Cn,!bn&&n.jsx("div",{className:"sa-input-dropdown-chevron",children:u?n.jsx(un,{width:M}):n.jsx(fn,{width:M})})]}),I&&n.jsx(pn,{dropdownLists:o,handleChangeValue:H,isComponentVisible:u,positionDropdown:kn,searchAble:!!k,hideSearch:w,value:c,onSearch:B,ref:g,multiSelect:r,searchValue:G,highlightedIndex:m,footer:T,groupLabel:i,onSelectAll:A})]})});return K?xn==="outside-left"?n.jsxs("div",{className:`${J} sa-select-field-left`,children:[n.jsxs("div",{className:"sa-select-field-left-label",children:[n.jsxs("div",{className:"sa-select-field-label-row",children:[n.jsx("span",{className:"sa-select-field-label-text",children:K}),en&&n.jsx("span",{className:"sa-select-field-optional-badge",children:"Optional"}),nn&&n.jsx("span",{className:"sa-select-field-required",children:"*"})]}),S&&n.jsx("p",{className:"sa-select-field-helper-top",children:S})]}),n.jsxs("div",{className:"sa-select-field-input-wrap",children:[Y,D&&!f&&n.jsx("p",{className:"sa-select-field-helper",children:D}),f&&n.jsx("p",{className:"sa-select-field-error-msg",children:f})]})]}):n.jsxs("div",{className:J,children:[n.jsxs("div",{className:"sa-select-field-label-row",children:[n.jsx("span",{className:"sa-select-field-label-text",children:K}),en&&n.jsx("span",{className:"sa-select-field-optional-badge",children:"Optional"}),nn&&n.jsx("span",{className:"sa-select-field-required",children:"*"})]}),S&&n.jsx("p",{className:"sa-select-field-helper-top",children:S}),Y,D&&!f&&n.jsx("p",{className:"sa-select-field-helper",children:D}),f&&n.jsx("p",{className:"sa-select-field-error-msg",children:f})]}):n.jsxs("div",{className:J,children:[S&&n.jsx("p",{className:"sa-select-field-helper-top",children:S}),Y,D&&!f&&n.jsx("p",{className:"sa-select-field-helper",children:D}),f&&n.jsx("p",{className:"sa-select-field-error-msg",children:f})]})},V=(o,p,d)=>{const t=o.length;let s=p+d;for(;s>=0&&s<t;){if(!o[s].disable)return s;s+=d}if(d===1){for(let r=0;r<t;r++)if(!o[r].disable)return r}else for(let r=t-1;r>=0;r--)if(!o[r].disable)return r;return-1},hn=o=>n.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[n.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"currentColor",opacity:"0.2"}),n.jsx("path",{d:"M5.5 5.5l5 5M10.5 5.5l-5 5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),R=o=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",style:{flexShrink:0,cursor:"pointer"},...o,children:n.jsx("path",{d:"M12 6L6 12M6.00001 6L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),fn=({width:o=16})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 16 16",fill:"none",style:{color:"var(--sa-dropdown-placeholder)",flexShrink:0},children:n.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),un=({width:o=16})=>n.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 16 16",fill:"none",style:{color:"var(--sa-dropdown-placeholder)",flexShrink:0},children:n.jsx("path",{d:"M4 10L8 6L12 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});v.Dropdown=wn,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starasia/dropdown",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "description": "dropdown component for starasia UI",
5
5
  "author": "Prawito Hudoro",
6
6
  "main": "dist/dropdown.umd.js",