@snmt-react-ui/city-select 1.7.4 → 1.7.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.
- package/dist/city-select.js +38 -16
- package/package.json +3 -3
package/dist/city-select.js
CHANGED
@@ -13226,8 +13226,8 @@ const ku = st({
|
|
13226
13226
|
axios: V.create()
|
13227
13227
|
});
|
13228
13228
|
ku.Provider;
|
13229
|
-
const Ws = ({ children: e, width: t, size: n = "small", onClose: r }) => {
|
13230
|
-
const
|
13229
|
+
const Ws = ({ 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
|
$o,
|
13233
13233
|
{
|
@@ -13237,13 +13237,14 @@ const Ws = ({ children: e, width: t, size: n = "small", onClose: r }) => {
|
|
13237
13237
|
{
|
13238
13238
|
name: "errorSmall",
|
13239
13239
|
color: Cs.GREY_DARK_2,
|
13240
|
-
width:
|
13241
|
-
height:
|
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(U2, { variant: n === "small" ? "body4" : "body2", children: e }) : e
|
13248
13249
|
}
|
13249
13250
|
);
|
@@ -13309,25 +13310,38 @@ const Ws = ({ children: e, width: t, size: n = "small", onClose: r }) => {
|
|
13309
13310
|
children: e
|
13310
13311
|
}
|
13311
13312
|
);
|
13312
|
-
}, Ru = ({
|
13313
|
-
|
13313
|
+
}, Ru = ({
|
13314
|
+
values: e,
|
13315
|
+
onTagClose: t,
|
13316
|
+
maxWidth: n,
|
13317
|
+
disabled: r
|
13318
|
+
}) => {
|
13319
|
+
const [o, i] = G(!1);
|
13314
13320
|
le(() => {
|
13315
|
-
e.length ||
|
13321
|
+
e.length || i(!1);
|
13316
13322
|
}, [e]);
|
13317
|
-
const
|
13318
|
-
|
13323
|
+
const s = (a) => {
|
13324
|
+
a.preventDefault(), a.stopPropagation();
|
13319
13325
|
};
|
13320
|
-
return e.length ? /* @__PURE__ */ h("div", { onMouseDown:
|
13326
|
+
return e.length ? /* @__PURE__ */ h("div", { onMouseDown: s, className: "wrapper", children: /* @__PURE__ */ h(
|
13321
13327
|
vu,
|
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(yt, { gap: 6, flexWrap: "wrap", children: e.map(({ value:
|
13331
|
+
/* @__PURE__ */ h("div", { style: { maxWidth: n - 90 }, children: /* @__PURE__ */ h(yt, { gap: 6, flexWrap: "wrap", children: e.map(({ value: a, label: d }) => /* @__PURE__ */ h(
|
13332
|
+
Ws,
|
13333
|
+
{
|
13334
|
+
onClose: () => t(a),
|
13335
|
+
closable: !r,
|
13336
|
+
children: d
|
13337
|
+
},
|
13338
|
+
a
|
13339
|
+
)) }) })
|
13326
13340
|
),
|
13327
13341
|
placement: "bottomRight",
|
13328
|
-
isOpen:
|
13329
|
-
setIsOpen:
|
13330
|
-
children: /* @__PURE__ */ h($o, { className: `overflow-button ${
|
13342
|
+
isOpen: o,
|
13343
|
+
setIsOpen: i,
|
13344
|
+
children: /* @__PURE__ */ h($o, { className: `overflow-button ${o ? "open" : ""}`, bordered: !1, children: /* @__PURE__ */ w(Ks, { variant: "body4", color: o ? De.BLUE_PRIMARY : void 0, children: [
|
13331
13345
|
e.length,
|
13332
13346
|
" more"
|
13333
13347
|
] }) })
|
@@ -13415,7 +13429,14 @@ const Ws = ({ 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
|
(D) => je(D.value)
|
13418
|
-
) : (D) => /* @__PURE__ */ h("div", { onMouseDown: ae, className: "tag-wrapper", children: /* @__PURE__ */ h(
|
13432
|
+
) : (D) => /* @__PURE__ */ h("div", { onMouseDown: ae, className: "tag-wrapper", children: /* @__PURE__ */ h(
|
13433
|
+
Ws,
|
13434
|
+
{
|
13435
|
+
onClose: () => qe(D.value),
|
13436
|
+
closable: !a,
|
13437
|
+
children: /* @__PURE__ */ h(Ks, { variant: "body4", children: D.label })
|
13438
|
+
}
|
13439
|
+
) }),
|
13419
13440
|
maxTagCount: "responsive",
|
13420
13441
|
maxTagPlaceholder: (D) => {
|
13421
13442
|
var q;
|
@@ -13424,7 +13445,8 @@ const Ws = ({ children: e, width: t, size: n = "small", onClose: r }) => {
|
|
13424
13445
|
{
|
13425
13446
|
values: D,
|
13426
13447
|
onTagClose: qe,
|
13427
|
-
maxWidth: ((q = E.current) == null ? void 0 : q.clientWidth) || 0
|
13448
|
+
maxWidth: ((q = E.current) == null ? void 0 : q.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/city-select",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.7.
|
4
|
+
"version": "1.7.6",
|
5
5
|
"type": "module",
|
6
6
|
"main": "dist/city-select.js",
|
7
7
|
"types": "dist/index.d.ts",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"@snmt-react-ui/core": "^1.6.0",
|
22
|
-
"@snmt-react-ui/select": "^1.7.
|
22
|
+
"@snmt-react-ui/select": "^1.7.6",
|
23
23
|
"i18next": "^23.11.5",
|
24
24
|
"react-i18next": "^14.1.1",
|
25
25
|
"uuid": "^10.0.0"
|
@@ -27,5 +27,5 @@
|
|
27
27
|
"peerDependencies": {
|
28
28
|
"antd": "^5.22.0"
|
29
29
|
},
|
30
|
-
"gitHead": "
|
30
|
+
"gitHead": "61a03c3b51838fa9daf90e4bd45368b6735232e9"
|
31
31
|
}
|