@caseparts-org/caseblocks 0.0.207 → 0.0.208
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 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._root_1s2i7_1{display:inline-flex;align-items:stretch}._segment_1s2i7_6{height:100%}._segment-sm_1s2i7_10{min-height:22px}._segment-md_1s2i7_14{min-height:32px}._segment-lg_1s2i7_18{min-height:40px}._actionSegment_1s2i7_22{border-top-right-radius:0;border-bottom-right-radius:0}._actionSegment-sm_1s2i7_27{min-width:70px}._actionSegment-md_1s2i7_31{min-width:90px}._actionSegment-lg_1s2i7_35{min-width:112px}._toggleSegment_1s2i7_39{border-top-left-radius:0;border-bottom-left-radius:0;border-left:1px solid white;padding-inline:var(--spacing-spacing-2xs)}._toggleSegment-sm_1s2i7_46{min-width:26px}._toggleSegment-md_1s2i7_50{min-width:32px}._toggleSegment-lg_1s2i7_54{min-width:40px}._menu_1s2i7_58{--menu-item-hover-background: var(--surface-surface-secondary);padding:var(--spacing-spacing-2xs);min-width:0;box-sizing:border-box}._menu-primary_1s2i7_65{--menu-item-hover-background: var(--color-brand-secondary-dark-teal-blue);background-color:var(--surface-surface-primary-btn);color:var(--surface-surface-primary)}._menu-secondary_1s2i7_71{--menu-item-hover-background: var(--surface-surface-secondary);background-color:var(--surface-surface-secondary-btn);color:var(--text-text-links)}._menu-secondary-transparent_1s2i7_77{--menu-item-hover-background: var(--color-neutrals-neutral-2);background-color:var(--color-neutrals-neutral-1);color:#000}._menu-cta-primary_1s2i7_83{--menu-item-hover-background: var(--surface-surface-call-to-action-btn-focus);background-color:var(--surface-surface-call-to-action-btn);color:var(--surface-surface-primary)}._menu-tertiary_1s2i7_89{--menu-item-hover-background: var(--surface-surface-tertiary-btn-focus);background-color:var(--surface-surface-tertiary-btn);color:var(--surface-surface-tertiary-btn-focus)}._menu-destructive_1s2i7_95{--menu-item-hover-background: var(--border-border-error-warning);background-color:var(--surface-surface-error-warning-btn);color:var(--surface-surface-primary)}._menuList_1s2i7_101{display:flex;flex-direction:column;width:100%}._menuItem_1s2i7_107{background:transparent;border:none;border-radius:var(--border-radius-xs);color:inherit;cursor:pointer;display:flex;justify-content:flex-start;padding:var(--spacing-spacing-3xs);text-align:left;width:100%;box-sizing:border-box}._menuItem_1s2i7_107:hover{background:var(--menu-item-hover-background)}._menuItem_1s2i7_107:disabled{color:var(--surface-surface-disabled-btn);cursor:default}._menuItem_1s2i7_107:disabled:hover{background:transparent}
|
|
@@ -1,94 +1,101 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { c } from "../../clsx-OuTLNxxd.js";
|
|
4
|
-
import { getHideAtStyles as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { Popover as
|
|
7
|
-
import { buttonClassNames as
|
|
8
|
-
import { Text as
|
|
9
|
-
import '../../assets/DropdownButton.css';const
|
|
10
|
-
root:
|
|
11
|
-
segment:
|
|
12
|
-
"segment-sm": "_segment-
|
|
13
|
-
"segment-md": "_segment-
|
|
14
|
-
"segment-lg": "_segment-
|
|
15
|
-
actionSegment:
|
|
16
|
-
"actionSegment-sm": "_actionSegment-
|
|
17
|
-
"actionSegment-md": "_actionSegment-
|
|
18
|
-
"actionSegment-lg": "_actionSegment-
|
|
19
|
-
toggleSegment:
|
|
20
|
-
"toggleSegment-sm": "_toggleSegment-
|
|
21
|
-
"toggleSegment-md": "_toggleSegment-
|
|
22
|
-
"toggleSegment-lg": "_toggleSegment-
|
|
23
|
-
menu:
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { jsxs as R, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { getHideAtStyles as $ } from "../HideAt.js";
|
|
5
|
+
import { Icon as k } from "../Icon/Icon.js";
|
|
6
|
+
import { Popover as W } from "../Popover/Popover.js";
|
|
7
|
+
import { buttonClassNames as S } from "../Button/buttonClassName.js";
|
|
8
|
+
import { Text as j } from "../Text/Text.js";
|
|
9
|
+
import '../../assets/DropdownButton.css';const B = "_root_1s2i7_1", D = "_segment_1s2i7_6", M = "_actionSegment_1s2i7_22", T = "_toggleSegment_1s2i7_39", A = "_menu_1s2i7_58", E = "_menuList_1s2i7_101", H = "_menuItem_1s2i7_107", n = {
|
|
10
|
+
root: B,
|
|
11
|
+
segment: D,
|
|
12
|
+
"segment-sm": "_segment-sm_1s2i7_10",
|
|
13
|
+
"segment-md": "_segment-md_1s2i7_14",
|
|
14
|
+
"segment-lg": "_segment-lg_1s2i7_18",
|
|
15
|
+
actionSegment: M,
|
|
16
|
+
"actionSegment-sm": "_actionSegment-sm_1s2i7_27",
|
|
17
|
+
"actionSegment-md": "_actionSegment-md_1s2i7_31",
|
|
18
|
+
"actionSegment-lg": "_actionSegment-lg_1s2i7_35",
|
|
19
|
+
toggleSegment: T,
|
|
20
|
+
"toggleSegment-sm": "_toggleSegment-sm_1s2i7_46",
|
|
21
|
+
"toggleSegment-md": "_toggleSegment-md_1s2i7_50",
|
|
22
|
+
"toggleSegment-lg": "_toggleSegment-lg_1s2i7_54",
|
|
23
|
+
menu: A,
|
|
24
|
+
"menu-primary": "_menu-primary_1s2i7_65",
|
|
25
|
+
"menu-secondary": "_menu-secondary_1s2i7_71",
|
|
26
|
+
"menu-secondary-transparent": "_menu-secondary-transparent_1s2i7_77",
|
|
27
|
+
"menu-cta-primary": "_menu-cta-primary_1s2i7_83",
|
|
28
|
+
"menu-tertiary": "_menu-tertiary_1s2i7_89",
|
|
29
|
+
"menu-destructive": "_menu-destructive_1s2i7_95",
|
|
30
|
+
menuList: E,
|
|
31
|
+
menuItem: H
|
|
26
32
|
};
|
|
27
33
|
function U({
|
|
28
|
-
children:
|
|
29
|
-
options:
|
|
30
|
-
menuLabel:
|
|
31
|
-
toggleLabel:
|
|
34
|
+
children: p,
|
|
35
|
+
options: u,
|
|
36
|
+
menuLabel: b = "More actions",
|
|
37
|
+
toggleLabel: d = "Open actions menu",
|
|
32
38
|
styles: t,
|
|
33
39
|
size: e,
|
|
34
|
-
variant:
|
|
35
|
-
hideAt:
|
|
36
|
-
className:
|
|
37
|
-
disabled:
|
|
40
|
+
variant: c,
|
|
41
|
+
hideAt: f,
|
|
42
|
+
className: h,
|
|
43
|
+
disabled: _,
|
|
38
44
|
type: N = "button",
|
|
39
45
|
...x
|
|
40
46
|
}) {
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
const g =
|
|
47
|
+
const C = u.length > 0, a = _ || !C, I = e === "sm" ? "xs" : e === "md" ? "sm" : "md", l = i.useRef(null), [w, L] = i.useState();
|
|
48
|
+
return i.useLayoutEffect(() => {
|
|
49
|
+
const g = l.current;
|
|
44
50
|
if (!g) return;
|
|
45
51
|
const m = () => {
|
|
46
|
-
|
|
52
|
+
L(g.getBoundingClientRect().width + 2);
|
|
47
53
|
};
|
|
48
54
|
m();
|
|
49
|
-
const
|
|
50
|
-
return
|
|
51
|
-
|
|
55
|
+
const r = new ResizeObserver(m);
|
|
56
|
+
return r.observe(g), () => {
|
|
57
|
+
r.disconnect();
|
|
52
58
|
};
|
|
53
|
-
}, []), /* @__PURE__ */
|
|
59
|
+
}, []), /* @__PURE__ */ R(
|
|
54
60
|
"div",
|
|
55
61
|
{
|
|
56
|
-
ref:
|
|
57
|
-
className:
|
|
62
|
+
ref: l,
|
|
63
|
+
className: s(n.root, $(f), h, t == null ? void 0 : t.root),
|
|
58
64
|
role: "group",
|
|
59
65
|
children: [
|
|
60
66
|
/* @__PURE__ */ o(
|
|
61
67
|
"button",
|
|
62
68
|
{
|
|
63
|
-
className:
|
|
64
|
-
|
|
69
|
+
className: s(
|
|
70
|
+
S({ size: e, variant: c, disabled: _, className: t == null ? void 0 : t.action }),
|
|
65
71
|
n.segment,
|
|
66
72
|
n[`segment-${e}`],
|
|
67
73
|
n[`actionSegment-${e}`],
|
|
68
74
|
n.actionSegment
|
|
69
75
|
),
|
|
70
|
-
disabled:
|
|
76
|
+
disabled: _,
|
|
71
77
|
type: N,
|
|
72
78
|
...x,
|
|
73
|
-
children:
|
|
79
|
+
children: p
|
|
74
80
|
}
|
|
75
81
|
),
|
|
76
82
|
/* @__PURE__ */ o(
|
|
77
|
-
|
|
83
|
+
W,
|
|
78
84
|
{
|
|
79
|
-
disabled:
|
|
85
|
+
disabled: a,
|
|
80
86
|
position: "bottom right",
|
|
81
|
-
contentClassName:
|
|
87
|
+
contentClassName: s(n.menu, n[`menu-${c}`], t == null ? void 0 : t.menu),
|
|
82
88
|
contentStyle: { width: w },
|
|
89
|
+
closeOnOutsideClick: !0,
|
|
83
90
|
trigger: /* @__PURE__ */ o(
|
|
84
91
|
"button",
|
|
85
92
|
{
|
|
86
93
|
type: "button",
|
|
87
|
-
className:
|
|
88
|
-
|
|
94
|
+
className: s(
|
|
95
|
+
S({
|
|
89
96
|
size: e,
|
|
90
|
-
variant:
|
|
91
|
-
disabled:
|
|
97
|
+
variant: c,
|
|
98
|
+
disabled: a,
|
|
92
99
|
className: t == null ? void 0 : t.toggle
|
|
93
100
|
}),
|
|
94
101
|
n.segment,
|
|
@@ -96,22 +103,22 @@ function U({
|
|
|
96
103
|
n[`toggleSegment-${e}`],
|
|
97
104
|
n.toggleSegment
|
|
98
105
|
),
|
|
99
|
-
"aria-label":
|
|
100
|
-
disabled:
|
|
101
|
-
children: /* @__PURE__ */ o(
|
|
106
|
+
"aria-label": d,
|
|
107
|
+
disabled: a,
|
|
108
|
+
children: /* @__PURE__ */ o(k, { iconKey: "fa-solid fa-chevron-down", size: "3xs" })
|
|
102
109
|
}
|
|
103
110
|
),
|
|
104
|
-
children: ({ close: g }) => /* @__PURE__ */ o("div", { className: n.menuList, role: "menu", "aria-label":
|
|
111
|
+
children: ({ close: g }) => /* @__PURE__ */ o("div", { className: n.menuList, role: "menu", "aria-label": b, children: u.map((m) => /* @__PURE__ */ o(
|
|
105
112
|
"button",
|
|
106
113
|
{
|
|
107
114
|
type: "button",
|
|
108
115
|
role: "menuitem",
|
|
109
|
-
className:
|
|
116
|
+
className: s(n.menuItem, t == null ? void 0 : t.menuItem),
|
|
110
117
|
disabled: m.disabled,
|
|
111
118
|
onClick: () => {
|
|
112
119
|
m.onClick(), g();
|
|
113
120
|
},
|
|
114
|
-
children: /* @__PURE__ */ o(
|
|
121
|
+
children: /* @__PURE__ */ o(j, { size: I, children: m.label })
|
|
115
122
|
},
|
|
116
123
|
m.key
|
|
117
124
|
)) })
|