@caseparts-org/caseblocks 0.0.209 → 0.0.210
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as $, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { getHideAtStyles as
|
|
5
|
-
import { Icon as
|
|
4
|
+
import { getHideAtStyles as k } from "../HideAt.js";
|
|
5
|
+
import { Icon as w } from "../Icon/Icon.js";
|
|
6
6
|
import { Popover as W } from "../Popover/Popover.js";
|
|
7
7
|
import { buttonClassNames as S } from "../Button/buttonClassName.js";
|
|
8
8
|
import { Text as j } from "../Text/Text.js";
|
|
@@ -44,23 +44,23 @@ function U({
|
|
|
44
44
|
type: N = "button",
|
|
45
45
|
...x
|
|
46
46
|
}) {
|
|
47
|
-
const C = u.length > 0, a = _ || !C, I = e === "sm" ? "xs" : e === "md" ? "sm" : "md", l = i.useRef(null), [
|
|
47
|
+
const C = u.length > 0, a = _ || !C, I = e === "sm" ? "xs" : e === "md" ? "sm" : "md", l = i.useRef(null), [L, R] = i.useState();
|
|
48
48
|
return i.useLayoutEffect(() => {
|
|
49
49
|
const g = l.current;
|
|
50
50
|
if (!g) return;
|
|
51
51
|
const m = () => {
|
|
52
|
-
|
|
52
|
+
R(g.getBoundingClientRect().width + 2);
|
|
53
53
|
};
|
|
54
54
|
m();
|
|
55
55
|
const r = new ResizeObserver(m);
|
|
56
56
|
return r.observe(g), () => {
|
|
57
57
|
r.disconnect();
|
|
58
58
|
};
|
|
59
|
-
}, []), /* @__PURE__ */
|
|
59
|
+
}, []), /* @__PURE__ */ $(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
62
|
ref: l,
|
|
63
|
-
className: s(n.root,
|
|
63
|
+
className: s(n.root, k(f), h, t == null ? void 0 : t.root),
|
|
64
64
|
role: "group",
|
|
65
65
|
children: [
|
|
66
66
|
/* @__PURE__ */ o(
|
|
@@ -85,7 +85,7 @@ function U({
|
|
|
85
85
|
disabled: a,
|
|
86
86
|
position: "bottom right",
|
|
87
87
|
contentClassName: s(n.menu, n[`menu-${c}`], t == null ? void 0 : t.menu),
|
|
88
|
-
contentStyle: {
|
|
88
|
+
contentStyle: { minWidth: L },
|
|
89
89
|
closeOnOutsideClick: !0,
|
|
90
90
|
trigger: /* @__PURE__ */ o(
|
|
91
91
|
"button",
|
|
@@ -105,7 +105,7 @@ function U({
|
|
|
105
105
|
),
|
|
106
106
|
"aria-label": d,
|
|
107
107
|
disabled: a,
|
|
108
|
-
children: /* @__PURE__ */ o(
|
|
108
|
+
children: /* @__PURE__ */ o(w, { iconKey: "fa-solid fa-chevron-down", size: "3xs" })
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
111
|
children: ({ close: g }) => /* @__PURE__ */ o("div", { className: n.menuList, role: "menu", "aria-label": b, children: u.map((m) => /* @__PURE__ */ o(
|