@snmt-react-ui/city-select 2.8.26 → 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/city-select.js +134 -128
  2. package/package.json +3 -3
@@ -10664,147 +10664,153 @@ const A3 = d1((i, e) => {
10664
10664
  },
10665
10665
  [r, X, g1, G1, I, C]
10666
10666
  ), t1 = Array.isArray(Z) && Z.length > 0 || !!Z && typeof Z == "string" && Z.trim() !== "";
10667
- return /* @__PURE__ */ d("div", { className: "snmt-select-container", children: [
10668
- /* @__PURE__ */ d(
10669
- "div",
10670
- {
10671
- className: `snmt-select ${Q ? "snmt-select-focused" : ""}
10667
+ return /* @__PURE__ */ d(
10668
+ "div",
10669
+ {
10670
+ className: `snmt-select-container ${G === "borderless" ? "snmt-select-container-borderless" : ""}`,
10671
+ children: [
10672
+ /* @__PURE__ */ d(
10673
+ "div",
10674
+ {
10675
+ className: `snmt-select ${Q ? "snmt-select-focused" : ""}
10672
10676
  ${h ? "" : "snmt-select-single"}
10673
10677
  ${V ? "snmt-select-read-only" : ""}
10674
10678
  ${e1 === "static" ? "snmt-select-static" : ""}
10675
10679
  ${G === "borderless" ? "snmt-select-borderless" : ""}`,
10676
- ref: C1,
10677
- style: { width: l },
10678
- children: [
10679
- /* @__PURE__ */ s(
10680
- O2,
10681
- {
10682
- className: "snmt-select-blank",
10683
- popupClassName: V ? "dropdown-read-only" : "",
10684
- id: H,
10685
- ref: e,
10686
- showSearch: !!c,
10687
- filterOption: c && E1,
10688
- onDropdownVisibleChange: V1,
10689
- disabled: r,
10690
- value: Z || void 0,
10691
- labelRender: (M) => {
10692
- const b = X(M.value);
10693
- return r ? /* @__PURE__ */ s("span", { style: { color: U.GREY_DARK_1 }, children: b }) : b;
10694
- },
10695
- mode: I3(h, I),
10696
- variant: G,
10697
- onChange: a1,
10698
- onFocus: A1,
10699
- onBlur: I1,
10700
- onMouseEnter: () => n1(!0),
10701
- onMouseLeave: () => n1(!1),
10702
- onSearch: (M) => {
10703
- Y(!M), u && u(M);
10704
- },
10705
- onSelect: () => Y(!0),
10706
- onDeselect: () => Y(!0),
10707
- tagRender: (M) => J({ ...M, mode: h }),
10708
- maxTagCount: e1 === "responsive" ? "responsive" : void 0,
10709
- maxCount: h === "single" && I === "badge" ? 1 : void 0,
10710
- maxTagPlaceholder: (M) => F(M, I),
10711
- onPopupScroll: P,
10712
- prefix: m && /* @__PURE__ */ s(n2, { size: "small" }),
10713
- suffixIcon: /* @__PURE__ */ s("div", { className: "wrapper-suffix-icon", children: h !== "filter" && /* @__PURE__ */ d(r1, { children: [
10714
- Z && !!Z.length && w && /* @__PURE__ */ s(
10715
- "div",
10716
- {
10717
- onClick: Z1,
10718
- style: {
10719
- cursor: r ? "not-allowed" : "pointer"
10720
- },
10721
- children: /* @__PURE__ */ s(
10722
- v1,
10680
+ ref: C1,
10681
+ style: { width: l },
10682
+ children: [
10683
+ /* @__PURE__ */ s(
10684
+ O2,
10685
+ {
10686
+ className: "snmt-select-blank",
10687
+ popupClassName: V ? "dropdown-read-only" : "",
10688
+ id: H,
10689
+ ref: e,
10690
+ showSearch: !!c,
10691
+ filterOption: c && E1,
10692
+ onDropdownVisibleChange: V1,
10693
+ disabled: r,
10694
+ value: Z || void 0,
10695
+ labelRender: (M) => {
10696
+ const b = X(M.value);
10697
+ return r ? /* @__PURE__ */ s("span", { style: { color: U.GREY_DARK_1 }, children: b }) : b;
10698
+ },
10699
+ mode: I3(h, I),
10700
+ variant: G,
10701
+ onChange: a1,
10702
+ onFocus: A1,
10703
+ onBlur: I1,
10704
+ onMouseEnter: () => n1(!0),
10705
+ onMouseLeave: () => n1(!1),
10706
+ onSearch: (M) => {
10707
+ Y(!M), u && u(M);
10708
+ },
10709
+ onSelect: () => Y(!0),
10710
+ onDeselect: () => Y(!0),
10711
+ tagRender: (M) => J({ ...M, mode: h }),
10712
+ maxTagCount: e1 === "responsive" ? "responsive" : void 0,
10713
+ maxCount: h === "single" && I === "badge" ? 1 : void 0,
10714
+ maxTagPlaceholder: (M) => F(M, I),
10715
+ onPopupScroll: P,
10716
+ prefix: m && /* @__PURE__ */ s(n2, { size: "small" }),
10717
+ suffixIcon: /* @__PURE__ */ s("div", { className: "wrapper-suffix-icon", children: h !== "filter" && /* @__PURE__ */ d(r1, { children: [
10718
+ Z && !!Z.length && w && /* @__PURE__ */ s(
10719
+ "div",
10723
10720
  {
10724
- name: "cancel",
10725
- color: r ? U.GREY_DARK_1 : U.GREY_DARK_2
10721
+ onClick: Z1,
10722
+ style: {
10723
+ cursor: r ? "not-allowed" : "pointer"
10724
+ },
10725
+ children: /* @__PURE__ */ s(
10726
+ v1,
10727
+ {
10728
+ name: "cancel",
10729
+ color: r ? U.GREY_DARK_1 : U.GREY_DARK_2
10730
+ }
10731
+ )
10726
10732
  }
10727
- )
10728
- }
10729
- ),
10730
- G === "borderless" && ($ || Q) && /* @__PURE__ */ s(
10731
- H3,
10732
- {
10733
- isActive: K,
10734
- onClick: () => i1(!K)
10735
- }
10736
- ),
10737
- G === "outlined" && /* @__PURE__ */ s(
10738
- v1,
10739
- {
10740
- name: "selectArrowIcon",
10741
- color: r ? U.GREY_DARK_1 : U.GREY_DARK_5,
10742
- className: K ? "select-arrow-rotated" : "select-arrow",
10743
- onClick: () => i1(!K)
10744
- }
10745
- )
10746
- ] }) }),
10747
- removeIcon: /* @__PURE__ */ s(v1, { name: "cancelCircle", color: U.GREY_DARK_1 }),
10748
- options: C,
10749
- optionRender: (M) => x ? x(M.data) : /* @__PURE__ */ d(R1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
10750
- /* @__PURE__ */ d(R1, { alignItems: "center", gap: 12, children: [
10751
- h && /* @__PURE__ */ s(
10752
- m5,
10753
- {
10754
- checked: !!(Z != null && Z.includes(M.value))
10755
- }
10756
- ),
10757
- /* @__PURE__ */ d(R1, { alignItems: "center", gap: 8, children: [
10758
- M.data.image !== void 0 && /* @__PURE__ */ s(
10759
- u5,
10733
+ ),
10734
+ G === "borderless" && ($ || Q) && /* @__PURE__ */ s(
10735
+ H3,
10760
10736
  {
10761
- src: M.data.image,
10762
- variant: "xsmall",
10763
- fallbackText: M.data.imageFallbackText ? M.data.imageFallbackText : ""
10737
+ isActive: K,
10738
+ onClick: () => i1(!K)
10764
10739
  }
10765
10740
  ),
10766
- /* @__PURE__ */ s("span", { children: M.label })
10741
+ G === "outlined" && /* @__PURE__ */ s(
10742
+ v1,
10743
+ {
10744
+ name: "selectArrowIcon",
10745
+ color: r ? U.GREY_DARK_1 : U.GREY_DARK_5,
10746
+ className: K ? "select-arrow-rotated" : "select-arrow",
10747
+ onClick: () => i1(!K)
10748
+ }
10749
+ )
10750
+ ] }) }),
10751
+ removeIcon: /* @__PURE__ */ s(v1, { name: "cancelCircle", color: U.GREY_DARK_1 }),
10752
+ options: C,
10753
+ optionRender: (M) => x ? x(M.data) : /* @__PURE__ */ d(R1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
10754
+ /* @__PURE__ */ d(R1, { alignItems: "center", gap: 12, children: [
10755
+ h && /* @__PURE__ */ s(
10756
+ m5,
10757
+ {
10758
+ checked: !!(Z != null && Z.includes(M.value))
10759
+ }
10760
+ ),
10761
+ /* @__PURE__ */ d(R1, { alignItems: "center", gap: 8, children: [
10762
+ M.data.image !== void 0 && /* @__PURE__ */ s(
10763
+ u5,
10764
+ {
10765
+ src: M.data.image,
10766
+ variant: "xsmall",
10767
+ fallbackText: M.data.imageFallbackText ? M.data.imageFallbackText : ""
10768
+ }
10769
+ ),
10770
+ /* @__PURE__ */ s("span", { children: M.label })
10771
+ ] })
10772
+ ] }),
10773
+ !h && Z === M.value && /* @__PURE__ */ s(v1, { name: "check", color: U.BLUE_DARK_1 })
10774
+ ] }),
10775
+ dropdownRender: (M) => /* @__PURE__ */ d("div", { className: "dropdown-container", children: [
10776
+ /* @__PURE__ */ s("div", { className: "dropdown-menu", children: T ? T(M) : M }),
10777
+ m && /* @__PURE__ */ s("div", { className: "loading-overlay", children: /* @__PURE__ */ s(n2, {}) })
10767
10778
  ] })
10768
- ] }),
10769
- !h && Z === M.value && /* @__PURE__ */ s(v1, { name: "check", color: U.BLUE_DARK_1 })
10770
- ] }),
10771
- dropdownRender: (M) => /* @__PURE__ */ d("div", { className: "dropdown-container", children: [
10772
- /* @__PURE__ */ s("div", { className: "dropdown-menu", children: T ? T(M) : M }),
10773
- m && /* @__PURE__ */ s("div", { className: "loading-overlay", children: /* @__PURE__ */ s(n2, {}) })
10774
- ] })
10775
- }
10776
- ),
10777
- n && G !== "borderless" && /* @__PURE__ */ s(
10778
- "label",
10779
- {
10780
- className: `${Q || t1 ? "label-floating" : ""} ${r ? "label-disabled" : ""} ${Q ? "label-focused" : ""} ${m ? "label-loading" : ""} ${k ? "label-error" : ""}`,
10781
- children: a ? `${n}*` : n
10782
- }
10783
- ),
10779
+ }
10780
+ ),
10781
+ n && G !== "borderless" && /* @__PURE__ */ s(
10782
+ "label",
10783
+ {
10784
+ className: `${Q || t1 ? "label-floating" : ""} ${r ? "label-disabled" : ""} ${Q ? "label-focused" : ""} ${m ? "label-loading" : ""} ${k ? "label-error" : ""}`,
10785
+ children: a ? `${n}*` : n
10786
+ }
10787
+ ),
10788
+ /* @__PURE__ */ s(
10789
+ "fieldset",
10790
+ {
10791
+ className: `${Q ? "fieldset-focused" : ""} ${r ? "fieldset-disabled" : ""} ${t1 ? "fieldset-filled" : ""} ${k ? "fieldset-error" : ""}
10792
+ ${$ ? "fieldset-hovered" : ""}`,
10793
+ children: /* @__PURE__ */ s("legend", { children: n && G !== "borderless" && /* @__PURE__ */ s("span", { children: a ? `${n}*` : n }) })
10794
+ }
10795
+ )
10796
+ ]
10797
+ }
10798
+ ),
10799
+ k && /* @__PURE__ */ d(R1, { justifyContent: "flex-start", gap: 6, children: [
10784
10800
  /* @__PURE__ */ s(
10785
- "fieldset",
10801
+ v1,
10786
10802
  {
10787
- className: `${Q ? "fieldset-focused" : ""} ${r ? "fieldset-disabled" : ""} ${t1 ? "fieldset-filled" : ""} ${k ? "fieldset-error" : ""}
10788
- ${$ ? "fieldset-hovered" : ""}`,
10789
- children: /* @__PURE__ */ s("legend", { children: n && G !== "borderless" && /* @__PURE__ */ s("span", { children: a ? `${n}*` : n }) })
10803
+ name: "attention",
10804
+ color: U.NOTIFICATION_ERROR_DARK,
10805
+ height: 16,
10806
+ width: 16
10790
10807
  }
10791
- )
10792
- ]
10793
- }
10794
- ),
10795
- k && /* @__PURE__ */ d(R1, { justifyContent: "flex-start", gap: 6, children: [
10796
- /* @__PURE__ */ s(
10797
- v1,
10798
- {
10799
- name: "attention",
10800
- color: U.NOTIFICATION_ERROR_DARK,
10801
- height: 16,
10802
- width: 16
10803
- }
10804
- ),
10805
- typeof k == "string" ? /* @__PURE__ */ s(z0, { color: U.NOTIFICATION_ERROR_DARK, variant: "body4", children: k }) : k
10806
- ] })
10807
- ] });
10808
+ ),
10809
+ typeof k == "string" ? /* @__PURE__ */ s(z0, { color: U.NOTIFICATION_ERROR_DARK, variant: "body4", children: k }) : k
10810
+ ] })
10811
+ ]
10812
+ }
10813
+ );
10808
10814
  });
10809
10815
  function I3(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/city-select",
3
3
  "private": false,
4
- "version": "2.8.26",
4
+ "version": "2.8.27",
5
5
  "type": "module",
6
6
  "main": "dist/city-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/async-select": "^1.12.1",
21
+ "@snmt-react-ui/async-select": "^1.12.2",
22
22
  "@snmt-react-ui/core": "^2.8.1",
23
23
  "i18next": "^23.11.5",
24
24
  "react-i18next": "^14.1.1",
@@ -27,5 +27,5 @@
27
27
  "peerDependencies": {
28
28
  "antd": "^5.22.0"
29
29
  },
30
- "gitHead": "982183fd6c658b2b9886d2a28f593ca796f3e696"
30
+ "gitHead": "42d20da0aeaaa5f031b320255ef5d879870f8989"
31
31
  }