@snmt-react-ui/country-select 1.4.5 → 1.4.6

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.
@@ -13310,25 +13310,38 @@ const Ds = ({ children: e, width: t, size: n = "small", onClose: r, closable: o
13310
13310
  children: e
13311
13311
  }
13312
13312
  );
13313
- }, Cu = ({ values: e, onTagClose: t, maxWidth: n }) => {
13314
- const [r, o] = ee(!1);
13313
+ }, Cu = ({
13314
+ values: e,
13315
+ onTagClose: t,
13316
+ maxWidth: n,
13317
+ disabled: r
13318
+ }) => {
13319
+ const [o, i] = ee(!1);
13315
13320
  ie(() => {
13316
- e.length || o(!1);
13321
+ e.length || i(!1);
13317
13322
  }, [e]);
13318
- const i = (s) => {
13319
- s.preventDefault(), s.stopPropagation();
13323
+ const s = (a) => {
13324
+ a.preventDefault(), a.stopPropagation();
13320
13325
  };
13321
- return e.length ? /* @__PURE__ */ h("div", { onMouseDown: i, className: "wrapper", children: /* @__PURE__ */ h(
13326
+ return e.length ? /* @__PURE__ */ h("div", { onMouseDown: s, className: "wrapper", children: /* @__PURE__ */ h(
13322
13327
  wu,
13323
13328
  {
13324
13329
  content: (
13325
13330
  // 90: paddings + margins + gaps and so on
13326
- /* @__PURE__ */ h("div", { style: { maxWidth: n - 90 }, children: /* @__PURE__ */ h(gt, { gap: 6, flexWrap: "wrap", children: e.map(({ value: s, label: a }) => /* @__PURE__ */ h(Ds, { onClose: () => t(s), children: a }, s)) }) })
13331
+ /* @__PURE__ */ h("div", { style: { maxWidth: n - 90 }, children: /* @__PURE__ */ h(gt, { gap: 6, flexWrap: "wrap", children: e.map(({ value: a, label: d }) => /* @__PURE__ */ h(
13332
+ Ds,
13333
+ {
13334
+ onClose: () => t(a),
13335
+ closable: !r,
13336
+ children: d
13337
+ },
13338
+ a
13339
+ )) }) })
13327
13340
  ),
13328
13341
  placement: "bottomRight",
13329
- isOpen: r,
13330
- setIsOpen: o,
13331
- children: /* @__PURE__ */ h(Uo, { className: `overflow-button ${r ? "open" : ""}`, bordered: !1, children: /* @__PURE__ */ w(Is, { variant: "body4", color: r ? Be.BLUE_PRIMARY : void 0, children: [
13342
+ isOpen: o,
13343
+ setIsOpen: i,
13344
+ children: /* @__PURE__ */ h(Uo, { className: `overflow-button ${o ? "open" : ""}`, bordered: !1, children: /* @__PURE__ */ w(Is, { variant: "body4", color: o ? Be.BLUE_PRIMARY : void 0, children: [
13332
13345
  e.length,
13333
13346
  " more"
13334
13347
  ] }) })
@@ -13416,7 +13429,14 @@ const Ds = ({ children: e, width: t, size: n = "small", onClose: r, closable: o
13416
13429
  tagRender: r === "filter" ? (
13417
13430
  // HACK to prevent showing selected options in input
13418
13431
  (P) => sn(P.value)
13419
- ) : (P) => /* @__PURE__ */ h("div", { onMouseDown: Ce, className: "tag-wrapper", children: /* @__PURE__ */ h(Ds, { onClose: () => on(P.value), children: /* @__PURE__ */ h(Is, { variant: "body4", children: P.label }) }) }),
13432
+ ) : (P) => /* @__PURE__ */ h("div", { onMouseDown: Ce, className: "tag-wrapper", children: /* @__PURE__ */ h(
13433
+ Ds,
13434
+ {
13435
+ onClose: () => on(P.value),
13436
+ closable: !a,
13437
+ children: /* @__PURE__ */ h(Is, { variant: "body4", children: P.label })
13438
+ }
13439
+ ) }),
13420
13440
  maxTagCount: "responsive",
13421
13441
  maxTagPlaceholder: (P) => {
13422
13442
  var K;
@@ -13425,7 +13445,8 @@ const Ds = ({ children: e, width: t, size: n = "small", onClose: r, closable: o
13425
13445
  {
13426
13446
  values: P,
13427
13447
  onTagClose: on,
13428
- maxWidth: ((K = E.current) == null ? void 0 : K.clientWidth) || 0
13448
+ maxWidth: ((K = E.current) == null ? void 0 : K.clientWidth) || 0,
13449
+ disabled: a
13429
13450
  }
13430
13451
  );
13431
13452
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snmt-react-ui/country-select",
3
3
  "private": false,
4
- "version": "1.4.5",
4
+ "version": "1.4.6",
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": "^1.7.5",
21
+ "@snmt-react-ui/city-select": "^1.7.6",
22
22
  "@snmt-react-ui/core": "^1.6.0",
23
23
  "@snmt-react-ui/flex": "^1.4.0",
24
24
  "i18next": "^23.11.5",
@@ -27,5 +27,5 @@
27
27
  "peerDependencies": {
28
28
  "antd": "^5.18.3"
29
29
  },
30
- "gitHead": "8068cb319e7dd0e7cf04e492205916c8efd31f3e"
30
+ "gitHead": "61a03c3b51838fa9daf90e4bd45368b6735232e9"
31
31
  }