@top-message/ui-lib 1.19.2 → 1.19.5
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/index.js
CHANGED
|
@@ -53517,31 +53517,35 @@ const V_ = /* @__PURE__ */ Wa(G_), W_ = "_wrapper_1wmsl_1", F_ = "_icon_1wmsl_55
|
|
|
53517
53517
|
isDropdownMenuOpen: a,
|
|
53518
53518
|
setDropdownMenuOpen: o,
|
|
53519
53519
|
style: i,
|
|
53520
|
-
className: l = ""
|
|
53520
|
+
className: l = "",
|
|
53521
|
+
afterClose: s = () => {
|
|
53522
|
+
}
|
|
53521
53523
|
}) => {
|
|
53522
|
-
const
|
|
53523
|
-
...
|
|
53524
|
-
children: /* @__PURE__ */ B("span", { children: mee(
|
|
53525
|
-
})), [r, t]),
|
|
53526
|
-
(
|
|
53527
|
-
!
|
|
53524
|
+
const c = Le(null), u = Le(null), d = Yt(() => r.map((g) => ({
|
|
53525
|
+
...g,
|
|
53526
|
+
children: /* @__PURE__ */ B("span", { children: mee(g.children, t) })
|
|
53527
|
+
})), [r, t]), v = Qt(
|
|
53528
|
+
(g) => {
|
|
53529
|
+
!c.current || !u.current || c.current.contains(g.target) || o(!1);
|
|
53528
53530
|
},
|
|
53529
|
-
[
|
|
53531
|
+
[c.current, u.current]
|
|
53530
53532
|
);
|
|
53531
|
-
return vt(() => (document.addEventListener("mousedown",
|
|
53532
|
-
document.removeEventListener("mousedown",
|
|
53533
|
-
}), [
|
|
53533
|
+
return vt(() => (document.addEventListener("mousedown", v), () => {
|
|
53534
|
+
document.removeEventListener("mousedown", v);
|
|
53535
|
+
}), [v]), vt(() => {
|
|
53536
|
+
a || s();
|
|
53537
|
+
}, [a]), /* @__PURE__ */ lt("div", { className: `${$c.wrapper} ${l}`, style: i, children: [
|
|
53534
53538
|
/* @__PURE__ */ B(
|
|
53535
53539
|
JC,
|
|
53536
53540
|
{
|
|
53537
53541
|
placeholder: e,
|
|
53538
53542
|
value: t,
|
|
53539
53543
|
onChange: n,
|
|
53540
|
-
ref:
|
|
53544
|
+
ref: u,
|
|
53541
53545
|
prefix: /* @__PURE__ */ B(On, { name: "search", size: 20 })
|
|
53542
53546
|
}
|
|
53543
53547
|
),
|
|
53544
|
-
t && a ? /* @__PURE__ */ B("div", { className: $c.dropdown, ref:
|
|
53548
|
+
t && a ? /* @__PURE__ */ B("div", { className: $c.dropdown, ref: c, children: d.length ? /* @__PURE__ */ B(Ry, { menuItems: d }) : /* @__PURE__ */ B("div", { className: $c.empty, children: "No Results" }) }) : null
|
|
53545
53549
|
] });
|
|
53546
53550
|
}, pee = "_wrapper_1uccl_1", bee = "_item_1uccl_6", hee = "_label_1uccl_11", Cee = "_active_1uccl_22", yee = "_icon_1uccl_27", Pi = {
|
|
53547
53551
|
wrapper: pee,
|