@snmt-react-ui/async-select 1.2.1 → 1.2.2
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/async-select.js +25 -15
- package/package.json +3 -3
package/dist/async-select.js
CHANGED
|
@@ -13506,39 +13506,47 @@ const ri = ({ children: e, width: t, size: n = "small", onClose: r, closable: o
|
|
|
13506
13506
|
values: e,
|
|
13507
13507
|
onTagClose: t,
|
|
13508
13508
|
maxWidth: n,
|
|
13509
|
-
disabled: r
|
|
13509
|
+
disabled: r,
|
|
13510
|
+
options: o,
|
|
13511
|
+
extraOptions: i
|
|
13510
13512
|
}) => {
|
|
13511
|
-
const [
|
|
13513
|
+
const [s, a] = Z(!1);
|
|
13512
13514
|
Ne(() => {
|
|
13513
|
-
e.length ||
|
|
13515
|
+
e.length || a(!1);
|
|
13514
13516
|
}, [e]);
|
|
13515
|
-
const
|
|
13516
|
-
|
|
13517
|
+
const u = (c) => {
|
|
13518
|
+
c.preventDefault(), c.stopPropagation();
|
|
13519
|
+
};
|
|
13520
|
+
if (!e.length)
|
|
13521
|
+
return null;
|
|
13522
|
+
const h = (c) => {
|
|
13523
|
+
var d, v;
|
|
13524
|
+
return ((d = o == null ? void 0 : o.find((w) => w.value === c)) == null ? void 0 : d.label) || ((v = i == null ? void 0 : i.find((w) => w.value === c)) == null ? void 0 : v.label) || c;
|
|
13517
13525
|
};
|
|
13518
|
-
return
|
|
13526
|
+
return /* @__PURE__ */ l("div", { onMouseDown: u, className: "wrapper", children: /* @__PURE__ */ l(
|
|
13519
13527
|
I6,
|
|
13520
13528
|
{
|
|
13521
13529
|
content: (
|
|
13522
13530
|
// 90: paddings + margins + gaps and so on
|
|
13523
|
-
/* @__PURE__ */ l("div", { style: { maxWidth: n - 90 }, children: /* @__PURE__ */ l(tt, { gap: 6, flexWrap: "wrap", children: e.map(({ value:
|
|
13531
|
+
/* @__PURE__ */ l("div", { style: { maxWidth: n - 90 }, children: /* @__PURE__ */ l(tt, { gap: 6, flexWrap: "wrap", children: e.map(({ value: c }) => /* @__PURE__ */ l(
|
|
13524
13532
|
ri,
|
|
13525
13533
|
{
|
|
13526
|
-
onClose: () => t(
|
|
13534
|
+
onClose: () => t(c),
|
|
13527
13535
|
closable: !r,
|
|
13528
|
-
children:
|
|
13536
|
+
children: h(c)
|
|
13529
13537
|
},
|
|
13530
|
-
|
|
13538
|
+
c
|
|
13531
13539
|
)) }) })
|
|
13532
13540
|
),
|
|
13533
13541
|
placement: "bottomRight",
|
|
13534
|
-
isOpen:
|
|
13535
|
-
setIsOpen:
|
|
13536
|
-
children: /* @__PURE__ */ l(ar, { className: `overflow-button ${
|
|
13542
|
+
isOpen: s,
|
|
13543
|
+
setIsOpen: a,
|
|
13544
|
+
children: /* @__PURE__ */ l(ar, { className: `overflow-button ${s ? "open" : ""}`, bordered: !1, children: /* @__PURE__ */ C(oi, { variant: "body4", color: s ? xe.BLUE_PRIMARY : void 0, children: [
|
|
13537
13545
|
e.length,
|
|
13538
13546
|
" more"
|
|
13539
13547
|
] }) })
|
|
13540
13548
|
}
|
|
13541
|
-
) })
|
|
13549
|
+
) });
|
|
13542
13550
|
}, or = kt(
|
|
13543
13551
|
({
|
|
13544
13552
|
value: e,
|
|
@@ -13651,7 +13659,9 @@ const ri = ({ children: e, width: t, size: n = "small", onClose: r, closable: o
|
|
|
13651
13659
|
values: M,
|
|
13652
13660
|
onTagClose: en,
|
|
13653
13661
|
maxWidth: ((V = W.current) == null ? void 0 : V.clientWidth) || 0,
|
|
13654
|
-
disabled: a
|
|
13662
|
+
disabled: a,
|
|
13663
|
+
options: i,
|
|
13664
|
+
extraOptions: f
|
|
13655
13665
|
}
|
|
13656
13666
|
);
|
|
13657
13667
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snmt-react-ui/async-select",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/async-select.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"build": "tsc && vite build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@snmt-react-ui/select": "^1.8.
|
|
21
|
+
"@snmt-react-ui/select": "^1.8.2"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"antd": "^5.18.3"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "9cbe01bff3dfa957e0d92527b6d3c1d20e5888ca"
|
|
27
27
|
}
|