@caseparts-org/caseblocks 0.0.250 → 0.0.252
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/Table-f_q_CCA-.js +187 -0
- package/dist/assets/Availability.css +1 -1
- package/dist/assets/Modal.css +1 -1
- package/dist/assets/Select.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/atoms/Pill/Pill.d.ts +3 -2
- package/dist/atoms/Pill/Pill.js +29 -26
- package/dist/atoms/Select/Select.js +53 -42
- package/dist/main-client.js +1 -1
- package/dist/molecules/Availability/Availability.d.ts +6 -0
- package/dist/molecules/Availability/Availability.js +109 -57
- package/dist/molecules/Availability/Availability.stories.d.ts +4 -0
- package/dist/molecules/Availability/Availability.stories.js +33 -17
- package/dist/molecules/CustomWizardBadge/CustomWizardBadge.d.ts +3 -2
- package/dist/molecules/CustomWizardBadge/CustomWizardBadge.js +23 -22
- package/dist/molecules/Disclaimer/Disclaimer.d.ts +11 -10
- package/dist/molecules/Disclaimer/Disclaimer.js +44 -41
- package/dist/molecules/Disclaimer/Disclaimer.stories.d.ts +5 -5
- package/dist/molecules/Error/Error.d.ts +4 -3
- package/dist/molecules/Error/Error.js +104 -101
- package/dist/molecules/Modal/Modal.d.ts +1 -0
- package/dist/molecules/Modal/Modal.js +56 -44
- package/dist/molecules/Modal/Modal.stories.d.ts +1 -1
- package/dist/molecules/Modal/Modal.stories.js +50 -52
- package/dist/molecules/Table/Table.d.ts +7 -4
- package/dist/molecules/Table/Table.js +4 -3
- package/dist/molecules/Table/Table.stories.js +1 -1
- package/package.json +1 -1
- package/dist/Table-BX4PtCNE.js +0 -178
|
@@ -1,171 +1,174 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { jsx as r, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import g, { useState as N, useEffect as E } from "react";
|
|
3
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { getHideAtStyles as H } from "../../atoms/HideAt.js";
|
|
5
|
+
import { Icon as y } from "../../atoms/Icon/Icon.js";
|
|
6
|
+
import { Text as Y } from "../../atoms/Text/Text.js";
|
|
7
|
+
import '../../assets/Error.css';const G = "_error_9tpem_1", J = "_variantError_9tpem_16", P = "_variantWarning_9tpem_21", Q = "_variantDefault_9tpem_26", X = "_errorHeader_9tpem_31", Z = "_errorHeaderContent_9tpem_40", ee = "_detailsToggleButton_9tpem_48", te = "_detailsChevron_9tpem_66", re = "_detailsChevronOpen_9tpem_74", ne = "_errorDetails_9tpem_78", oe = "_errorDetailsContent_9tpem_94", ae = "_copyButton_9tpem_99", se = "_copyIcon_9tpem_114", ie = "_checkIcon_9tpem_115", le = "_hiddenIcon_9tpem_122", t = {
|
|
8
|
+
error: G,
|
|
9
|
+
variantError: J,
|
|
10
|
+
variantWarning: P,
|
|
11
|
+
variantDefault: Q,
|
|
12
|
+
errorHeader: X,
|
|
13
|
+
errorHeaderContent: Z,
|
|
14
|
+
detailsToggleButton: ee,
|
|
15
|
+
detailsChevron: te,
|
|
16
|
+
detailsChevronOpen: re,
|
|
17
|
+
errorDetails: ne,
|
|
18
|
+
errorDetailsContent: oe,
|
|
19
|
+
copyButton: ae,
|
|
20
|
+
copyIcon: se,
|
|
21
|
+
checkIcon: ie,
|
|
22
|
+
hiddenIcon: le
|
|
22
23
|
};
|
|
23
|
-
function
|
|
24
|
+
function b({
|
|
24
25
|
as: n,
|
|
25
|
-
size:
|
|
26
|
-
variant:
|
|
27
|
-
weight:
|
|
28
|
-
colorToken:
|
|
29
|
-
hideAt:
|
|
30
|
-
className:
|
|
31
|
-
children:
|
|
26
|
+
size: i = "md",
|
|
27
|
+
variant: l = "body",
|
|
28
|
+
weight: c = "regular",
|
|
29
|
+
colorToken: d = "inherit",
|
|
30
|
+
hideAt: u,
|
|
31
|
+
className: a,
|
|
32
|
+
children: S
|
|
32
33
|
}) {
|
|
33
34
|
return /* @__PURE__ */ r(
|
|
34
|
-
|
|
35
|
+
Y,
|
|
35
36
|
{
|
|
36
37
|
as: n,
|
|
37
|
-
size:
|
|
38
|
-
variant:
|
|
39
|
-
weight:
|
|
40
|
-
colorToken:
|
|
41
|
-
hideAt:
|
|
42
|
-
className:
|
|
43
|
-
children:
|
|
38
|
+
size: i,
|
|
39
|
+
variant: l,
|
|
40
|
+
weight: c,
|
|
41
|
+
colorToken: d,
|
|
42
|
+
hideAt: u,
|
|
43
|
+
className: a,
|
|
44
|
+
children: S
|
|
44
45
|
}
|
|
45
46
|
);
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
48
|
+
function z({ children: n, hide: i, hideAt: l, className: c, ...d }) {
|
|
49
|
+
return i ? null : /* @__PURE__ */ r("div", { ...d, className: s(H(l), c), children: n });
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
51
|
+
function O(n) {
|
|
52
|
+
return g.isValidElement(n) && n.type === b;
|
|
52
53
|
}
|
|
53
|
-
function
|
|
54
|
-
return
|
|
54
|
+
function M(n) {
|
|
55
|
+
return g.isValidElement(n) && n.type === z;
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function ce({
|
|
57
58
|
isVisible: n = !0,
|
|
58
|
-
className:
|
|
59
|
-
children:
|
|
60
|
-
hideDetails:
|
|
61
|
-
|
|
59
|
+
className: i,
|
|
60
|
+
children: l,
|
|
61
|
+
hideDetails: c = !1,
|
|
62
|
+
hideAt: d,
|
|
63
|
+
detailsMaxHeight: u = 300,
|
|
62
64
|
variant: a = "error"
|
|
63
65
|
}) {
|
|
64
|
-
const [o,
|
|
65
|
-
(e) =>
|
|
66
|
-
), x =
|
|
67
|
-
(e) => !
|
|
68
|
-
),
|
|
69
|
-
children:
|
|
70
|
-
hide:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
const [o, C] = N(!1), [v, D] = N(!1), [m, T] = N(!1), I = g.Children.toArray(l), k = I.find(
|
|
67
|
+
(e) => M(e) && !e.props.hide
|
|
68
|
+
), x = I.find(O), A = I.filter(
|
|
69
|
+
(e) => !M(e) && !O(e)
|
|
70
|
+
), B = x ? /* @__PURE__ */ r(b, { ...x.props }) : A.length > 0 ? A : null, h = c || !k ? null : k.props, p = h == null ? void 0 : h.children, f = p != null && p !== !1, {
|
|
71
|
+
children: de,
|
|
72
|
+
hide: ue,
|
|
73
|
+
hideAt: R,
|
|
74
|
+
className: j,
|
|
75
|
+
style: K,
|
|
76
|
+
...V
|
|
77
|
+
} = h ?? {};
|
|
78
|
+
if (E(() => {
|
|
79
|
+
f || (C(!1), D(!1));
|
|
80
|
+
}, [f]), E(() => {
|
|
81
|
+
if (o || !v)
|
|
79
82
|
return;
|
|
80
|
-
const e = window.setTimeout(() =>
|
|
83
|
+
const e = window.setTimeout(() => D(!1), 280);
|
|
81
84
|
return () => window.clearTimeout(e);
|
|
82
|
-
}, [o,
|
|
83
|
-
if (!
|
|
85
|
+
}, [o, v]), E(() => {
|
|
86
|
+
if (!m)
|
|
84
87
|
return;
|
|
85
|
-
const e = window.setTimeout(() =>
|
|
88
|
+
const e = window.setTimeout(() => T(!1), 1500);
|
|
86
89
|
return () => window.clearTimeout(e);
|
|
87
|
-
}, [
|
|
90
|
+
}, [m]), !n || !B)
|
|
88
91
|
return null;
|
|
89
|
-
const
|
|
90
|
-
if (!
|
|
92
|
+
const W = t[`variant${a[0].toUpperCase()}${a.slice(1)}`], $ = a === "warning" ? "warning" : a === "default" ? "default" : "error-warning", L = typeof u == "number" ? `${u}px` : u, w = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((U) => w(U)).join("") : g.isValidElement(e) ? w(e.props.children) : "", q = async () => {
|
|
93
|
+
if (!f)
|
|
91
94
|
return;
|
|
92
|
-
const e =
|
|
95
|
+
const e = w(p);
|
|
93
96
|
if (e.trim())
|
|
94
97
|
try {
|
|
95
|
-
await navigator.clipboard.writeText(e),
|
|
98
|
+
await navigator.clipboard.writeText(e), T(!0);
|
|
96
99
|
} catch {
|
|
97
|
-
|
|
100
|
+
T(!1);
|
|
98
101
|
}
|
|
99
|
-
},
|
|
102
|
+
}, F = () => {
|
|
100
103
|
if (o) {
|
|
101
|
-
|
|
104
|
+
C(!1);
|
|
102
105
|
return;
|
|
103
106
|
}
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
D(!0), window.requestAnimationFrame(() => {
|
|
108
|
+
C(!0);
|
|
106
109
|
});
|
|
107
110
|
};
|
|
108
|
-
return /* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ _("div", { className: s(t.error, W, H(d), i), children: [
|
|
112
|
+
/* @__PURE__ */ _("div", { className: t.errorHeader, children: [
|
|
113
|
+
/* @__PURE__ */ _("div", { className: t.errorHeaderContent, children: [
|
|
111
114
|
/* @__PURE__ */ r(
|
|
112
|
-
|
|
115
|
+
y,
|
|
113
116
|
{
|
|
114
117
|
iconKey: "fa-solid fa-triangle-exclamation",
|
|
115
118
|
size: "md",
|
|
116
|
-
colorToken:
|
|
119
|
+
colorToken: $
|
|
117
120
|
}
|
|
118
121
|
),
|
|
119
|
-
|
|
122
|
+
B
|
|
120
123
|
] }),
|
|
121
|
-
|
|
124
|
+
f && /* @__PURE__ */ r(
|
|
122
125
|
"button",
|
|
123
126
|
{
|
|
124
127
|
type: "button",
|
|
125
128
|
className: t.detailsToggleButton,
|
|
126
129
|
"aria-label": o ? "Hide details" : "Show details",
|
|
127
130
|
title: o ? "Hide details" : "Show details",
|
|
128
|
-
onClick:
|
|
129
|
-
children: /* @__PURE__ */ r("span", { className:
|
|
131
|
+
onClick: F,
|
|
132
|
+
children: /* @__PURE__ */ r("span", { className: s(t.detailsChevron, o && t.detailsChevronOpen), children: /* @__PURE__ */ r(y, { iconKey: "fa-light fa-chevron-down", size: "sm", colorToken: "default" }) })
|
|
130
133
|
}
|
|
131
134
|
)
|
|
132
135
|
] }),
|
|
133
|
-
|
|
136
|
+
f && v && /* @__PURE__ */ _(
|
|
134
137
|
"div",
|
|
135
138
|
{
|
|
136
|
-
className:
|
|
139
|
+
className: s(t.errorDetails, H(R), j),
|
|
137
140
|
style: {
|
|
138
|
-
...
|
|
139
|
-
maxHeight: o ?
|
|
141
|
+
...K,
|
|
142
|
+
maxHeight: o ? L : "0px",
|
|
140
143
|
opacity: o ? 1 : 0,
|
|
141
144
|
overflowY: o ? "auto" : "hidden"
|
|
142
145
|
},
|
|
143
|
-
...
|
|
146
|
+
...V,
|
|
144
147
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ _(
|
|
146
149
|
"button",
|
|
147
150
|
{
|
|
148
151
|
type: "button",
|
|
149
152
|
className: t.copyButton,
|
|
150
153
|
"aria-label": "Copy error details",
|
|
151
|
-
title:
|
|
152
|
-
onClick:
|
|
154
|
+
title: m ? "Copied" : "Copy details",
|
|
155
|
+
onClick: q,
|
|
153
156
|
children: [
|
|
154
|
-
/* @__PURE__ */ r("span", { className:
|
|
155
|
-
/* @__PURE__ */ r("span", { className:
|
|
157
|
+
/* @__PURE__ */ r("span", { className: s(t.copyIcon, m && t.hiddenIcon), children: /* @__PURE__ */ r(y, { iconKey: "fa-regular fa-copy", size: "sm", colorToken: "default" }) }),
|
|
158
|
+
/* @__PURE__ */ r("span", { className: s(t.checkIcon, !m && t.hiddenIcon), children: /* @__PURE__ */ r(y, { iconKey: "fa-regular fa-check", size: "sm", colorToken: "default" }) })
|
|
156
159
|
]
|
|
157
160
|
}
|
|
158
161
|
),
|
|
159
|
-
/* @__PURE__ */ r("div", { className: t.errorDetailsContent, children:
|
|
162
|
+
/* @__PURE__ */ r("div", { className: t.errorDetailsContent, children: p })
|
|
160
163
|
]
|
|
161
164
|
}
|
|
162
165
|
)
|
|
163
166
|
] });
|
|
164
167
|
}
|
|
165
|
-
const
|
|
166
|
-
Message:
|
|
167
|
-
Details:
|
|
168
|
+
const ge = Object.assign(ce, {
|
|
169
|
+
Message: b,
|
|
170
|
+
Details: z
|
|
168
171
|
});
|
|
169
172
|
export {
|
|
170
|
-
|
|
173
|
+
ge as Error
|
|
171
174
|
};
|
|
@@ -6,6 +6,7 @@ export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
onClose: () => void;
|
|
8
8
|
closeOnOverlayClick?: boolean;
|
|
9
|
+
width?: React.CSSProperties["width"];
|
|
9
10
|
}
|
|
10
11
|
type ModalCompound = React.FC<ModalProps> & {
|
|
11
12
|
Toolbar: React.FC<ModalToolbarProps>;
|
|
@@ -1,75 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import '../../assets/Modal.css';const
|
|
7
|
-
overlay:
|
|
8
|
-
container:
|
|
9
|
-
toolbar:
|
|
10
|
-
toolbarPlain:
|
|
11
|
-
headerGroup:
|
|
12
|
-
headerLeft:
|
|
13
|
-
headerRight:
|
|
14
|
-
closeButton:
|
|
15
|
-
content:
|
|
16
|
-
},
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import v from "react";
|
|
3
|
+
import { c as n } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { Text as p } from "../../atoms/Text/Text.js";
|
|
5
|
+
import { Icon as g } from "../../atoms/Icon/Icon.js";
|
|
6
|
+
import '../../assets/Modal.css';const b = "_overlay_1imlv_1", y = "_container_1imlv_11", T = "_toolbar_1imlv_30", x = "_toolbarPlain_1imlv_47", z = "_headerGroup_1imlv_52", B = "_headerLeft_1imlv_60", M = "_headerRight_1imlv_64", N = "_closeButton_1imlv_68", R = "_content_1imlv_87", r = {
|
|
7
|
+
overlay: b,
|
|
8
|
+
container: y,
|
|
9
|
+
toolbar: T,
|
|
10
|
+
toolbarPlain: x,
|
|
11
|
+
headerGroup: z,
|
|
12
|
+
headerLeft: B,
|
|
13
|
+
headerRight: M,
|
|
14
|
+
closeButton: N,
|
|
15
|
+
content: R
|
|
16
|
+
}, w = {
|
|
17
17
|
sm: "sm",
|
|
18
18
|
md: "md",
|
|
19
19
|
lg: "lg"
|
|
20
|
-
},
|
|
20
|
+
}, C = {
|
|
21
21
|
sm: "sm",
|
|
22
22
|
md: "md",
|
|
23
23
|
lg: "md"
|
|
24
|
-
},
|
|
24
|
+
}, d = ({
|
|
25
25
|
isOpen: t,
|
|
26
26
|
onClose: o,
|
|
27
27
|
closeOnOverlayClick: e = !0,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
width: l,
|
|
29
|
+
className: s,
|
|
30
|
+
style: m,
|
|
31
|
+
children: u,
|
|
32
|
+
..._
|
|
31
33
|
}) => {
|
|
32
|
-
const
|
|
34
|
+
const c = v.useRef(!1);
|
|
33
35
|
if (!t) return null;
|
|
34
|
-
const
|
|
35
|
-
e && (
|
|
36
|
-
},
|
|
36
|
+
const h = (i) => {
|
|
37
|
+
e && (c.current = i.target === i.currentTarget);
|
|
38
|
+
}, f = (i) => {
|
|
37
39
|
if (!e) {
|
|
38
|
-
|
|
40
|
+
c.current = !1;
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
41
|
-
|
|
43
|
+
c.current && i.target === i.currentTarget && o(), c.current = !1;
|
|
42
44
|
};
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
45
|
+
return /* @__PURE__ */ a("div", { className: n(r.overlay), onMouseDown: h, onMouseUp: f, children: /* @__PURE__ */ a(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: n(r.container, s),
|
|
49
|
+
role: "dialog",
|
|
50
|
+
"aria-modal": "true",
|
|
51
|
+
style: { ...m, "--modal-width": l },
|
|
52
|
+
..._,
|
|
53
|
+
children: u
|
|
54
|
+
}
|
|
55
|
+
) });
|
|
56
|
+
}, G = ({ variant: t = "standard", className: o, children: e, ...l }) => /* @__PURE__ */ a(
|
|
45
57
|
"div",
|
|
46
58
|
{
|
|
47
|
-
className:
|
|
48
|
-
...
|
|
59
|
+
className: n(r.toolbar, t === "plain" && r.toolbarPlain, o),
|
|
60
|
+
...l,
|
|
49
61
|
children: e
|
|
50
62
|
}
|
|
51
|
-
),
|
|
63
|
+
), L = ({
|
|
52
64
|
align: t = "left",
|
|
53
65
|
size: o = "md",
|
|
54
66
|
variant: e = "display",
|
|
55
|
-
className:
|
|
56
|
-
children:
|
|
67
|
+
className: l,
|
|
68
|
+
children: s,
|
|
57
69
|
...m
|
|
58
70
|
}) => {
|
|
59
|
-
const
|
|
60
|
-
return /* @__PURE__ */
|
|
71
|
+
const u = typeof s == "string";
|
|
72
|
+
return /* @__PURE__ */ a(
|
|
61
73
|
"div",
|
|
62
74
|
{
|
|
63
|
-
className:
|
|
75
|
+
className: n(r.headerGroup, t === "left" ? r.headerLeft : r.headerRight, l),
|
|
64
76
|
...m,
|
|
65
|
-
children:
|
|
77
|
+
children: u ? /* @__PURE__ */ a(p, { as: "div", size: w[o], variant: e, weight: "medium", children: s }) : s
|
|
66
78
|
}
|
|
67
79
|
);
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
}, P = ({ size: t = "md", className: o, ...e }) => /* @__PURE__ */ a("button", { type: "button", className: n(r.closeButton, o), "aria-label": "Close", ...e, children: /* @__PURE__ */ a(g, { iconKey: "fa-regular fa-xmark", size: C[t] }) }), S = ({ className: t, children: o, ...e }) => /* @__PURE__ */ a("div", { className: n(r.content, t), ...e, children: o });
|
|
81
|
+
d.Toolbar = G;
|
|
82
|
+
d.Header = L;
|
|
83
|
+
d.CloseButton = P;
|
|
84
|
+
d.Content = S;
|
|
73
85
|
export {
|
|
74
|
-
|
|
86
|
+
d as Modal
|
|
75
87
|
};
|
|
@@ -1,81 +1,79 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Button as
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as r } from "react";
|
|
3
|
+
import { Modal as n } from "./Modal.js";
|
|
4
|
+
import { Text as o } from "../../atoms/Text/Text.js";
|
|
5
|
+
import { Button as a } from "../../atoms/Button/Button.js";
|
|
6
6
|
const v = {
|
|
7
7
|
title: "Case Parts/Molecules/Modal",
|
|
8
|
-
component:
|
|
8
|
+
component: n,
|
|
9
|
+
// tags: ["autodocs"],
|
|
9
10
|
argTypes: {
|
|
10
11
|
isOpen: { control: { type: "boolean" }, description: "Controls visibility of the modal" },
|
|
11
12
|
closeOnOverlayClick: { control: { type: "boolean" }, description: "Close when clicking on overlay" }
|
|
12
13
|
},
|
|
13
14
|
args: { isOpen: !0, closeOnOverlayClick: !0 }
|
|
14
15
|
};
|
|
15
|
-
function C(
|
|
16
|
-
const [
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */ e(
|
|
19
|
-
/* @__PURE__ */ n
|
|
20
|
-
/* @__PURE__ */ n
|
|
21
|
-
/* @__PURE__ */ e(
|
|
22
|
-
/* @__PURE__ */ e(
|
|
16
|
+
function C() {
|
|
17
|
+
const [t, i] = r(!0);
|
|
18
|
+
return /* @__PURE__ */ l("div", { style: { padding: 24 }, children: [
|
|
19
|
+
/* @__PURE__ */ e(a, { variant: "primary", size: "md", onClick: () => i(!0), children: "Open Modal" }),
|
|
20
|
+
/* @__PURE__ */ l(n, { isOpen: t, onClose: () => i(!1), children: [
|
|
21
|
+
/* @__PURE__ */ l(n.Toolbar, { variant: "plain", children: [
|
|
22
|
+
/* @__PURE__ */ e(n.Header, { align: "left", size: "lg", variant: "display", children: "Plain Toolbar" }),
|
|
23
|
+
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { onClick: () => i(!1) }) })
|
|
23
24
|
] }),
|
|
24
|
-
/* @__PURE__ */ n
|
|
25
|
-
/* @__PURE__ */ e(r, { as: "p", size: "md", children: "This is a reusable modal with a non-scrollable toolbar. Click the overlay or the X to close." }),
|
|
26
|
-
/* @__PURE__ */ e("div", { style: { height: 600 }, children: /* @__PURE__ */ e(r, { as: "p", size: "sm", children: "Scrollable content spacer..." }) })
|
|
27
|
-
] })
|
|
25
|
+
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "md", children: "This modal uses a toolbar without a background or bottom border." }) })
|
|
28
26
|
] })
|
|
29
27
|
] });
|
|
30
28
|
}
|
|
31
|
-
const
|
|
32
|
-
render: (
|
|
29
|
+
const O = {
|
|
30
|
+
render: () => /* @__PURE__ */ e(C, {})
|
|
33
31
|
};
|
|
34
|
-
function
|
|
35
|
-
const [
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
-
/* @__PURE__ */ n
|
|
39
|
-
/* @__PURE__ */ n
|
|
40
|
-
/* @__PURE__ */ e(
|
|
41
|
-
/* @__PURE__ */ e(
|
|
32
|
+
function u() {
|
|
33
|
+
const [t, i] = r(!1), [h, s] = r(!1), [m, d] = r(!1), [p, c] = r(!1);
|
|
34
|
+
return /* @__PURE__ */ l("div", { style: { width: "200px", display: "grid", gap: 12 }, children: [
|
|
35
|
+
/* @__PURE__ */ e(a, { variant: "secondary", size: "sm", onClick: () => i(!0), children: "Small Header" }),
|
|
36
|
+
/* @__PURE__ */ l(n, { isOpen: t, onClose: () => i(!1), children: [
|
|
37
|
+
/* @__PURE__ */ l(n.Toolbar, { children: [
|
|
38
|
+
/* @__PURE__ */ e(n.Header, { align: "left", size: "sm", variant: "display", children: "Small Header" }),
|
|
39
|
+
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "sm", onClick: () => i(!1) }) })
|
|
42
40
|
] }),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
41
|
+
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "sm", children: "Small header modal content." }) })
|
|
44
42
|
] }),
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
/* @__PURE__ */ n
|
|
47
|
-
/* @__PURE__ */ n
|
|
48
|
-
/* @__PURE__ */ e(
|
|
49
|
-
/* @__PURE__ */ e(
|
|
43
|
+
/* @__PURE__ */ e(a, { variant: "primary", size: "md", onClick: () => s(!0), children: "Medium Header" }),
|
|
44
|
+
/* @__PURE__ */ l(n, { isOpen: h, onClose: () => s(!1), children: [
|
|
45
|
+
/* @__PURE__ */ l(n.Toolbar, { children: [
|
|
46
|
+
/* @__PURE__ */ e(n.Header, { align: "left", size: "md", variant: "display", children: "Medium Header" }),
|
|
47
|
+
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => s(!1) }) })
|
|
50
48
|
] }),
|
|
51
|
-
/* @__PURE__ */ e(
|
|
49
|
+
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "md", children: "Medium header modal content." }) })
|
|
52
50
|
] }),
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
-
/* @__PURE__ */ n
|
|
55
|
-
/* @__PURE__ */ n
|
|
56
|
-
/* @__PURE__ */ e(
|
|
57
|
-
/* @__PURE__ */ e(
|
|
51
|
+
/* @__PURE__ */ e(a, { variant: "cta-primary", size: "lg", onClick: () => d(!0), children: "Large Header" }),
|
|
52
|
+
/* @__PURE__ */ l(n, { isOpen: m, onClose: () => d(!1), children: [
|
|
53
|
+
/* @__PURE__ */ l(n.Toolbar, { children: [
|
|
54
|
+
/* @__PURE__ */ e(n.Header, { align: "left", size: "lg", variant: "display", children: "Large Header" }),
|
|
55
|
+
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => d(!1) }) })
|
|
58
56
|
] }),
|
|
59
|
-
/* @__PURE__ */ e(
|
|
57
|
+
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "lg", children: "Large header modal content." }) })
|
|
60
58
|
] }),
|
|
61
|
-
/* @__PURE__ */ e(
|
|
62
|
-
/* @__PURE__ */ n
|
|
63
|
-
/* @__PURE__ */ n
|
|
64
|
-
/* @__PURE__ */ e(
|
|
65
|
-
/* @__PURE__ */ n
|
|
59
|
+
/* @__PURE__ */ e(a, { variant: "tertiary", size: "md", onClick: () => c(!0), children: "Custom Toolbar" }),
|
|
60
|
+
/* @__PURE__ */ l(n, { isOpen: p, onClose: () => c(!1), children: [
|
|
61
|
+
/* @__PURE__ */ l(n.Toolbar, { children: [
|
|
62
|
+
/* @__PURE__ */ e(n.Header, { align: "left", size: "md", variant: "display", children: "Custom Toolbar" }),
|
|
63
|
+
/* @__PURE__ */ l(n.Header, { align: "right", children: [
|
|
66
64
|
/* @__PURE__ */ e("button", { onClick: () => alert("Sent!"), children: "Send Email" }),
|
|
67
|
-
/* @__PURE__ */ e(
|
|
65
|
+
/* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => c(!1) })
|
|
68
66
|
] })
|
|
69
67
|
] }),
|
|
70
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "md", children: "Modal with custom toolbar functions." }) })
|
|
71
69
|
] })
|
|
72
70
|
] });
|
|
73
71
|
}
|
|
74
|
-
const
|
|
75
|
-
render: () => /* @__PURE__ */ e(
|
|
72
|
+
const H = {
|
|
73
|
+
render: () => /* @__PURE__ */ e(u, {})
|
|
76
74
|
};
|
|
77
75
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
O as PlainToolbar,
|
|
77
|
+
H as Sizes,
|
|
80
78
|
v as default
|
|
81
79
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
import { HideAtProps } from '../../atoms/HideAt';
|
|
2
3
|
export type TableAlign = 'left' | 'center' | 'right';
|
|
3
|
-
export interface TableProps extends React.HTMLAttributes<HTMLTableElement
|
|
4
|
+
export interface TableProps extends React.HTMLAttributes<HTMLTableElement>, HideAtProps {
|
|
4
5
|
children?: React.ReactNode;
|
|
5
6
|
className?: string;
|
|
6
7
|
/** When true, applies alternating row background styling */
|
|
7
8
|
alternatingRows?: boolean;
|
|
9
|
+
/** When true, renders a border around the table */
|
|
10
|
+
bordered?: boolean;
|
|
8
11
|
/** Enables sortable headers with click handlers */
|
|
9
12
|
isSortable?: boolean;
|
|
10
13
|
/** Current sort field identifier (consumer-defined) */
|
|
@@ -16,10 +19,10 @@ export interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
|
16
19
|
/** Header click handler to trigger consumer-side sorting */
|
|
17
20
|
onSort?: (_sortField: string, _sortFieldKey?: string | number) => void;
|
|
18
21
|
}
|
|
19
|
-
export interface ColumnsProps {
|
|
22
|
+
export interface ColumnsProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
20
23
|
children: React.ReactNode;
|
|
21
24
|
}
|
|
22
|
-
export interface ColumnProps extends React.ThHTMLAttributes<HTMLTableCellElement
|
|
25
|
+
export interface ColumnProps extends React.ThHTMLAttributes<HTMLTableCellElement>, HideAtProps {
|
|
23
26
|
children: React.ReactNode;
|
|
24
27
|
align?: TableAlign;
|
|
25
28
|
colSpan?: number;
|
|
@@ -39,7 +42,7 @@ export interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
|
39
42
|
/** Marks this row as expanded content (detail row) */
|
|
40
43
|
isExpandedContent?: boolean;
|
|
41
44
|
}
|
|
42
|
-
export interface CellProps extends React.TdHTMLAttributes<HTMLTableCellElement
|
|
45
|
+
export interface CellProps extends React.TdHTMLAttributes<HTMLTableCellElement>, HideAtProps {
|
|
43
46
|
children: React.ReactNode;
|
|
44
47
|
align?: TableAlign;
|
|
45
48
|
colSpan?: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../clsx-OuTLNxxd.js";
|
|
4
|
-
import
|
|
4
|
+
import "../../atoms/HideAt.js";
|
|
5
|
+
import { T as e, T } from "../../Table-f_q_CCA-.js";
|
|
5
6
|
import "../../atoms/Icon/Icon.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
e as Table,
|
|
9
|
+
T as default
|
|
9
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import R, { useState as d, useEffect as P } from "react";
|
|
3
|
-
import { T as t, s as x } from "../../Table-
|
|
3
|
+
import { T as t, s as x } from "../../Table-f_q_CCA-.js";
|
|
4
4
|
const v = {
|
|
5
5
|
title: "Case Parts/Molecules/Table",
|
|
6
6
|
component: t,
|