@snmt-react-ui/country-select 1.4.4 → 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.
@@ -13226,8 +13226,8 @@ const fu = rt({
13226
13226
  axios: U.create()
13227
13227
  });
13228
13228
  fu.Provider;
13229
- const Ds = ({ children: e, width: t, size: n = "small", onClose: r }) => {
13230
- const o = n === "small" ? 10 : 12.5;
13229
+ const Ds = ({ children: e, width: t, size: n = "small", onClose: r, closable: o = !0 }) => {
13230
+ const i = n === "small" ? 10 : 12.5;
13231
13231
  return /* @__PURE__ */ h(
13232
13232
  Uo,
13233
13233
  {
@@ -13237,13 +13237,14 @@ const Ds = ({ children: e, width: t, size: n = "small", onClose: r }) => {
13237
13237
  {
13238
13238
  name: "errorSmall",
13239
13239
  color: ds.GREY_DARK_2,
13240
- width: o,
13241
- height: o,
13240
+ width: i,
13241
+ height: i,
13242
13242
  onClick: r
13243
13243
  }
13244
13244
  ),
13245
13245
  bordered: !1,
13246
13246
  style: { width: t ?? "fit-content" },
13247
+ closable: o,
13247
13248
  children: typeof e == "string" ? /* @__PURE__ */ h(B2, { variant: n === "small" ? "body4" : "body2", children: e }) : e
13248
13249
  }
13249
13250
  );
@@ -13309,25 +13310,38 @@ const Ds = ({ children: e, width: t, size: n = "small", onClose: r }) => {
13309
13310
  children: e
13310
13311
  }
13311
13312
  );
13312
- }, Cu = ({ values: e, onTagClose: t, maxWidth: n }) => {
13313
- 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);
13314
13320
  ie(() => {
13315
- e.length || o(!1);
13321
+ e.length || i(!1);
13316
13322
  }, [e]);
13317
- const i = (s) => {
13318
- s.preventDefault(), s.stopPropagation();
13323
+ const s = (a) => {
13324
+ a.preventDefault(), a.stopPropagation();
13319
13325
  };
13320
- 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(
13321
13327
  wu,
13322
13328
  {
13323
13329
  content: (
13324
13330
  // 90: paddings + margins + gaps and so on
13325
- /* @__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
+ )) }) })
13326
13340
  ),
13327
13341
  placement: "bottomRight",
13328
- isOpen: r,
13329
- setIsOpen: o,
13330
- 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: [
13331
13345
  e.length,
13332
13346
  " more"
13333
13347
  ] }) })
@@ -13415,7 +13429,14 @@ const Ds = ({ children: e, width: t, size: n = "small", onClose: r }) => {
13415
13429
  tagRender: r === "filter" ? (
13416
13430
  // HACK to prevent showing selected options in input
13417
13431
  (P) => sn(P.value)
13418
- ) : (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
+ ) }),
13419
13440
  maxTagCount: "responsive",
13420
13441
  maxTagPlaceholder: (P) => {
13421
13442
  var K;
@@ -13424,7 +13445,8 @@ const Ds = ({ children: e, width: t, size: n = "small", onClose: r }) => {
13424
13445
  {
13425
13446
  values: P,
13426
13447
  onTagClose: on,
13427
- maxWidth: ((K = E.current) == null ? void 0 : K.clientWidth) || 0
13448
+ maxWidth: ((K = E.current) == null ? void 0 : K.clientWidth) || 0,
13449
+ disabled: a
13428
13450
  }
13429
13451
  );
13430
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.4",
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.4",
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": "4e28bb3761aff068d7e74654c048827fffcfddaf"
30
+ "gitHead": "61a03c3b51838fa9daf90e4bd45368b6735232e9"
31
31
  }