@snmt-react-ui/country-select 2.8.25 → 2.8.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/country-select.js +134 -128
  2. package/package.json +3 -3
@@ -10664,147 +10664,153 @@ const x3 = o1((i, e) => {
10664
10664
  },
10665
10665
  [l, E1, k1, K1, D, C]
10666
10666
  ), Y1 = Array.isArray(I) && I.length > 0 || !!I && typeof I == "string" && I.trim() !== "";
10667
- return /* @__PURE__ */ d("div", { className: "snmt-select-container", children: [
10668
- /* @__PURE__ */ d(
10669
- "div",
10670
- {
10671
- className: `snmt-select ${X ? "snmt-select-focused" : ""}
10667
+ return /* @__PURE__ */ d(
10668
+ "div",
10669
+ {
10670
+ className: `snmt-select-container ${S === "borderless" ? "snmt-select-container-borderless" : ""}`,
10671
+ children: [
10672
+ /* @__PURE__ */ d(
10673
+ "div",
10674
+ {
10675
+ className: `snmt-select ${X ? "snmt-select-focused" : ""}
10672
10676
  ${h ? "" : "snmt-select-single"}
10673
10677
  ${M ? "snmt-select-read-only" : ""}
10674
10678
  ${s1 === "static" ? "snmt-select-static" : ""}
10675
10679
  ${S === "borderless" ? "snmt-select-borderless" : ""}`,
10676
- ref: c1,
10677
- style: { width: r },
10678
- children: [
10679
- /* @__PURE__ */ n(
10680
- y2,
10681
- {
10682
- className: "snmt-select-blank",
10683
- popupClassName: M ? "dropdown-read-only" : "",
10684
- id: H,
10685
- ref: e,
10686
- showSearch: !!c,
10687
- filterOption: c && N2,
10688
- onDropdownVisibleChange: v2,
10689
- disabled: l,
10690
- value: I || void 0,
10691
- labelRender: (R) => {
10692
- const Z = E1(R.value);
10693
- return l ? /* @__PURE__ */ n("span", { style: { color: Y.GREY_DARK_1 }, children: Z }) : Z;
10694
- },
10695
- mode: H3(h, D),
10696
- variant: S,
10697
- onChange: n1,
10698
- onFocus: R2,
10699
- onBlur: _2,
10700
- onMouseEnter: () => e1(!0),
10701
- onMouseLeave: () => e1(!1),
10702
- onSearch: (R) => {
10703
- T(!R), u && u(R);
10704
- },
10705
- onSelect: () => T(!0),
10706
- onDeselect: () => T(!0),
10707
- tagRender: (R) => V2({ ...R, mode: h }),
10708
- maxTagCount: s1 === "responsive" ? "responsive" : void 0,
10709
- maxCount: h === "single" && D === "badge" ? 1 : void 0,
10710
- maxTagPlaceholder: (R) => E2(R, D),
10711
- onPopupScroll: H2,
10712
- prefix: A && /* @__PURE__ */ n(F1, { size: "small" }),
10713
- suffixIcon: /* @__PURE__ */ n("div", { className: "wrapper-suffix-icon", children: h !== "filter" && /* @__PURE__ */ d(F, { children: [
10714
- I && !!I.length && w && /* @__PURE__ */ n(
10715
- "div",
10716
- {
10717
- onClick: M2,
10718
- style: {
10719
- cursor: l ? "not-allowed" : "pointer"
10720
- },
10721
- children: /* @__PURE__ */ n(
10722
- C1,
10680
+ ref: c1,
10681
+ style: { width: r },
10682
+ children: [
10683
+ /* @__PURE__ */ n(
10684
+ y2,
10685
+ {
10686
+ className: "snmt-select-blank",
10687
+ popupClassName: M ? "dropdown-read-only" : "",
10688
+ id: H,
10689
+ ref: e,
10690
+ showSearch: !!c,
10691
+ filterOption: c && N2,
10692
+ onDropdownVisibleChange: v2,
10693
+ disabled: l,
10694
+ value: I || void 0,
10695
+ labelRender: (R) => {
10696
+ const Z = E1(R.value);
10697
+ return l ? /* @__PURE__ */ n("span", { style: { color: Y.GREY_DARK_1 }, children: Z }) : Z;
10698
+ },
10699
+ mode: H3(h, D),
10700
+ variant: S,
10701
+ onChange: n1,
10702
+ onFocus: R2,
10703
+ onBlur: _2,
10704
+ onMouseEnter: () => e1(!0),
10705
+ onMouseLeave: () => e1(!1),
10706
+ onSearch: (R) => {
10707
+ T(!R), u && u(R);
10708
+ },
10709
+ onSelect: () => T(!0),
10710
+ onDeselect: () => T(!0),
10711
+ tagRender: (R) => V2({ ...R, mode: h }),
10712
+ maxTagCount: s1 === "responsive" ? "responsive" : void 0,
10713
+ maxCount: h === "single" && D === "badge" ? 1 : void 0,
10714
+ maxTagPlaceholder: (R) => E2(R, D),
10715
+ onPopupScroll: H2,
10716
+ prefix: A && /* @__PURE__ */ n(F1, { size: "small" }),
10717
+ suffixIcon: /* @__PURE__ */ n("div", { className: "wrapper-suffix-icon", children: h !== "filter" && /* @__PURE__ */ d(F, { children: [
10718
+ I && !!I.length && w && /* @__PURE__ */ n(
10719
+ "div",
10723
10720
  {
10724
- name: "cancel",
10725
- color: l ? Y.GREY_DARK_1 : Y.GREY_DARK_2
10721
+ onClick: M2,
10722
+ style: {
10723
+ cursor: l ? "not-allowed" : "pointer"
10724
+ },
10725
+ children: /* @__PURE__ */ n(
10726
+ C1,
10727
+ {
10728
+ name: "cancel",
10729
+ color: l ? Y.GREY_DARK_1 : Y.GREY_DARK_2
10730
+ }
10731
+ )
10726
10732
  }
10727
- )
10728
- }
10729
- ),
10730
- S === "borderless" && (q || X) && /* @__PURE__ */ n(
10731
- R3,
10732
- {
10733
- isActive: W,
10734
- onClick: () => m1(!W)
10735
- }
10736
- ),
10737
- S === "outlined" && /* @__PURE__ */ n(
10738
- C1,
10739
- {
10740
- name: "selectArrowIcon",
10741
- color: l ? Y.GREY_DARK_1 : Y.GREY_DARK_5,
10742
- className: W ? "select-arrow-rotated" : "select-arrow",
10743
- onClick: () => m1(!W)
10744
- }
10745
- )
10746
- ] }) }),
10747
- removeIcon: /* @__PURE__ */ n(C1, { name: "cancelCircle", color: Y.GREY_DARK_1 }),
10748
- options: C,
10749
- optionRender: (R) => _ ? _(R.data) : /* @__PURE__ */ d(g1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
10750
- /* @__PURE__ */ d(g1, { alignItems: "center", gap: 12, children: [
10751
- h && /* @__PURE__ */ n(
10752
- w5,
10753
- {
10754
- checked: !!(I != null && I.includes(R.value))
10755
- }
10756
- ),
10757
- /* @__PURE__ */ d(g1, { alignItems: "center", gap: 8, children: [
10758
- R.data.image !== void 0 && /* @__PURE__ */ n(
10759
- c5,
10733
+ ),
10734
+ S === "borderless" && (q || X) && /* @__PURE__ */ n(
10735
+ R3,
10760
10736
  {
10761
- src: R.data.image,
10762
- variant: "xsmall",
10763
- fallbackText: R.data.imageFallbackText ? R.data.imageFallbackText : ""
10737
+ isActive: W,
10738
+ onClick: () => m1(!W)
10764
10739
  }
10765
10740
  ),
10766
- /* @__PURE__ */ n("span", { children: R.label })
10741
+ S === "outlined" && /* @__PURE__ */ n(
10742
+ C1,
10743
+ {
10744
+ name: "selectArrowIcon",
10745
+ color: l ? Y.GREY_DARK_1 : Y.GREY_DARK_5,
10746
+ className: W ? "select-arrow-rotated" : "select-arrow",
10747
+ onClick: () => m1(!W)
10748
+ }
10749
+ )
10750
+ ] }) }),
10751
+ removeIcon: /* @__PURE__ */ n(C1, { name: "cancelCircle", color: Y.GREY_DARK_1 }),
10752
+ options: C,
10753
+ optionRender: (R) => _ ? _(R.data) : /* @__PURE__ */ d(g1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
10754
+ /* @__PURE__ */ d(g1, { alignItems: "center", gap: 12, children: [
10755
+ h && /* @__PURE__ */ n(
10756
+ w5,
10757
+ {
10758
+ checked: !!(I != null && I.includes(R.value))
10759
+ }
10760
+ ),
10761
+ /* @__PURE__ */ d(g1, { alignItems: "center", gap: 8, children: [
10762
+ R.data.image !== void 0 && /* @__PURE__ */ n(
10763
+ c5,
10764
+ {
10765
+ src: R.data.image,
10766
+ variant: "xsmall",
10767
+ fallbackText: R.data.imageFallbackText ? R.data.imageFallbackText : ""
10768
+ }
10769
+ ),
10770
+ /* @__PURE__ */ n("span", { children: R.label })
10771
+ ] })
10772
+ ] }),
10773
+ !h && I === R.value && /* @__PURE__ */ n(C1, { name: "check", color: Y.BLUE_DARK_1 })
10774
+ ] }),
10775
+ dropdownRender: (R) => /* @__PURE__ */ d("div", { className: "dropdown-container", children: [
10776
+ /* @__PURE__ */ n("div", { className: "dropdown-menu", children: G ? G(R) : R }),
10777
+ A && /* @__PURE__ */ n("div", { className: "loading-overlay", children: /* @__PURE__ */ n(F1, {}) })
10767
10778
  ] })
10768
- ] }),
10769
- !h && I === R.value && /* @__PURE__ */ n(C1, { name: "check", color: Y.BLUE_DARK_1 })
10770
- ] }),
10771
- dropdownRender: (R) => /* @__PURE__ */ d("div", { className: "dropdown-container", children: [
10772
- /* @__PURE__ */ n("div", { className: "dropdown-menu", children: G ? G(R) : R }),
10773
- A && /* @__PURE__ */ n("div", { className: "loading-overlay", children: /* @__PURE__ */ n(F1, {}) })
10774
- ] })
10775
- }
10776
- ),
10777
- s && S !== "borderless" && /* @__PURE__ */ n(
10778
- "label",
10779
- {
10780
- className: `${X || Y1 ? "label-floating" : ""} ${l ? "label-disabled" : ""} ${X ? "label-focused" : ""} ${A ? "label-loading" : ""} ${x ? "label-error" : ""}`,
10781
- children: a ? `${s}*` : s
10782
- }
10783
- ),
10779
+ }
10780
+ ),
10781
+ s && S !== "borderless" && /* @__PURE__ */ n(
10782
+ "label",
10783
+ {
10784
+ className: `${X || Y1 ? "label-floating" : ""} ${l ? "label-disabled" : ""} ${X ? "label-focused" : ""} ${A ? "label-loading" : ""} ${x ? "label-error" : ""}`,
10785
+ children: a ? `${s}*` : s
10786
+ }
10787
+ ),
10788
+ /* @__PURE__ */ n(
10789
+ "fieldset",
10790
+ {
10791
+ className: `${X ? "fieldset-focused" : ""} ${l ? "fieldset-disabled" : ""} ${Y1 ? "fieldset-filled" : ""} ${x ? "fieldset-error" : ""}
10792
+ ${q ? "fieldset-hovered" : ""}`,
10793
+ children: /* @__PURE__ */ n("legend", { children: s && S !== "borderless" && /* @__PURE__ */ n("span", { children: a ? `${s}*` : s }) })
10794
+ }
10795
+ )
10796
+ ]
10797
+ }
10798
+ ),
10799
+ x && /* @__PURE__ */ d(g1, { justifyContent: "flex-start", gap: 6, children: [
10784
10800
  /* @__PURE__ */ n(
10785
- "fieldset",
10801
+ C1,
10786
10802
  {
10787
- className: `${X ? "fieldset-focused" : ""} ${l ? "fieldset-disabled" : ""} ${Y1 ? "fieldset-filled" : ""} ${x ? "fieldset-error" : ""}
10788
- ${q ? "fieldset-hovered" : ""}`,
10789
- children: /* @__PURE__ */ n("legend", { children: s && S !== "borderless" && /* @__PURE__ */ n("span", { children: a ? `${s}*` : s }) })
10803
+ name: "attention",
10804
+ color: Y.NOTIFICATION_ERROR_DARK,
10805
+ height: 16,
10806
+ width: 16
10790
10807
  }
10791
- )
10792
- ]
10793
- }
10794
- ),
10795
- x && /* @__PURE__ */ d(g1, { justifyContent: "flex-start", gap: 6, children: [
10796
- /* @__PURE__ */ n(
10797
- C1,
10798
- {
10799
- name: "attention",
10800
- color: Y.NOTIFICATION_ERROR_DARK,
10801
- height: 16,
10802
- width: 16
10803
- }
10804
- ),
10805
- typeof x == "string" ? /* @__PURE__ */ n(P0, { color: Y.NOTIFICATION_ERROR_DARK, variant: "body4", children: x }) : x
10806
- ] })
10807
- ] });
10808
+ ),
10809
+ typeof x == "string" ? /* @__PURE__ */ n(P0, { color: Y.NOTIFICATION_ERROR_DARK, variant: "body4", children: x }) : x
10810
+ ] })
10811
+ ]
10812
+ }
10813
+ );
10808
10814
  });
10809
10815
  function H3(i, e) {
10810
10816
  return i === "filter" || i === "single" && e === "badge" ? "multiple" : i === "single" ? void 0 : i;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snmt-react-ui/country-select",
3
3
  "private": false,
4
- "version": "2.8.25",
4
+ "version": "2.8.27",
5
5
  "type": "module",
6
6
  "main": "dist/country-select.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "build": "tsc && vite build"
19
19
  },
20
20
  "dependencies": {
21
- "@snmt-react-ui/city-select": "^2.8.25",
21
+ "@snmt-react-ui/city-select": "^2.8.27",
22
22
  "@snmt-react-ui/core": "^2.8.1",
23
23
  "@snmt-react-ui/flex": "^1.7.5",
24
24
  "i18next": "^23.11.5",
@@ -27,5 +27,5 @@
27
27
  "peerDependencies": {
28
28
  "antd": "^5.18.3"
29
29
  },
30
- "gitHead": "db733fad80937cf2feb900cd7907e50bb10dd760"
30
+ "gitHead": "42d20da0aeaaa5f031b320255ef5d879870f8989"
31
31
  }