@dtlvmw/react 0.0.1

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.
Files changed (35) hide show
  1. package/dist/index.d.ts +457 -0
  2. package/dist/index.js +772 -0
  3. package/guidelines/Guidelines.md +53 -0
  4. package/guidelines/components/accordion.md +109 -0
  5. package/guidelines/components/alert.md +107 -0
  6. package/guidelines/components/badge-label.md +100 -0
  7. package/guidelines/components/breadcrumbs.md +45 -0
  8. package/guidelines/components/button.md +77 -0
  9. package/guidelines/components/card.md +78 -0
  10. package/guidelines/components/dropdown.md +75 -0
  11. package/guidelines/components/forms.md +133 -0
  12. package/guidelines/components/header.md +59 -0
  13. package/guidelines/components/icon.md +64 -0
  14. package/guidelines/components/login.md +59 -0
  15. package/guidelines/components/modal.md +87 -0
  16. package/guidelines/components/progress.md +75 -0
  17. package/guidelines/components/spinner.md +52 -0
  18. package/guidelines/components/stack-view.md +57 -0
  19. package/guidelines/components/table.md +76 -0
  20. package/guidelines/components/tabs.md +70 -0
  21. package/guidelines/components/timeline.md +87 -0
  22. package/guidelines/components/wizard.md +160 -0
  23. package/guidelines/design-tokens/colors.md +21 -0
  24. package/guidelines/design-tokens/spacing.md +15 -0
  25. package/guidelines/design-tokens/typography.md +11 -0
  26. package/guidelines/overview-components.md +48 -0
  27. package/guidelines/tier2/combobox.md +48 -0
  28. package/guidelines/tier2/datagrid.md +62 -0
  29. package/guidelines/tier2/datepicker.md +26 -0
  30. package/guidelines/tier2/overview.md +69 -0
  31. package/guidelines/tier2/popovers.md +81 -0
  32. package/guidelines/tier2/stepper.md +39 -0
  33. package/guidelines/tier2/tree-view.md +45 -0
  34. package/guidelines/tier2/vertical-nav.md +52 -0
  35. package/package.json +52 -0
package/dist/index.js ADDED
@@ -0,0 +1,772 @@
1
+ import { jsxs as u, jsx as l, Fragment as V } from "react/jsx-runtime";
2
+ import $, { forwardRef as n, useMemo as W, useState as H, useEffect as y, useRef as L, useCallback as w } from "react";
3
+ function o(...e) {
4
+ return e.filter(Boolean).join(" ");
5
+ }
6
+ const _ = n(
7
+ ({ btnType: e = "primary", btnStyle: s = "solid", size: a, block: r, loading: c, disabled: i, className: m, children: d, ...t }, p) => {
8
+ const N = o(
9
+ "btn",
10
+ s === "outline" && `btn-${e}-outline`,
11
+ s === "link" && "btn-link",
12
+ s === "link" && e !== "primary" && `btn-link-${e}`,
13
+ s === "solid" && `btn-${e}`,
14
+ a === "sm" && "btn-sm",
15
+ r && "btn-block",
16
+ c && "btn-loading",
17
+ m
18
+ );
19
+ return /* @__PURE__ */ u("button", { ref: p, className: N, disabled: i || c, ...t, children: [
20
+ c && /* @__PURE__ */ l("span", { className: "spinner spinner-inline" }),
21
+ d
22
+ ] });
23
+ }
24
+ );
25
+ _.displayName = "Button";
26
+ const I = {
27
+ up: "0deg",
28
+ down: "180deg",
29
+ right: "90deg",
30
+ left: "270deg"
31
+ }, J = {
32
+ success: "var(--cds-alias-status-success, #2f8400)",
33
+ danger: "var(--cds-alias-status-danger, #c92100)",
34
+ warning: "var(--cds-alias-status-warning-dark, #c47d00)",
35
+ info: "var(--cds-alias-status-info, #0072a3)",
36
+ neutral: "var(--cds-alias-status-neutral, #6d7884)"
37
+ }, Y = {
38
+ xs: 12,
39
+ sm: 16,
40
+ md: 20,
41
+ lg: 24,
42
+ xl: 28,
43
+ xxl: 32
44
+ };
45
+ function j(e, s) {
46
+ var c, i;
47
+ const a = (i = (c = window.CDS) == null ? void 0 : c._state) == null ? void 0 : i.iconRegistry;
48
+ if (!a) return "";
49
+ const r = a[e] ?? a.unknown;
50
+ return r ? typeof r == "string" ? r : s && r.solid ? r.solid : r.outline ?? "" : "";
51
+ }
52
+ const k = n(
53
+ ({ shape: e, size: s, direction: a, status: r, solid: c, className: i, role: m, ...d }, t) => {
54
+ const p = W(() => j(e, c), [e, c]), N = s ? Y[s] ?? (parseInt(s, 10) || void 0) : void 0, v = N ? `${N}px` : void 0, f = {
55
+ display: "inline-block",
56
+ width: v ?? "1rem",
57
+ height: v ?? "1rem",
58
+ minWidth: v ?? "1rem",
59
+ minHeight: v ?? "1rem",
60
+ verticalAlign: "middle",
61
+ fill: r ? J[r] : "currentColor",
62
+ color: r ? J[r] : "currentColor",
63
+ contain: "strict",
64
+ cursor: "inherit",
65
+ transform: a ? `rotate(${I[a]})` : void 0
66
+ };
67
+ return /* @__PURE__ */ l("span", { ref: t, className: o("cds-icon-react", i), style: f, role: m, ...d, children: /* @__PURE__ */ l(
68
+ "svg",
69
+ {
70
+ viewBox: "0 0 36 36",
71
+ xmlns: "http://www.w3.org/2000/svg",
72
+ "aria-hidden": "true",
73
+ style: { display: "block", width: "100%", height: "100%" },
74
+ dangerouslySetInnerHTML: { __html: p }
75
+ }
76
+ ) });
77
+ }
78
+ );
79
+ k.displayName = "CdsIcon";
80
+ const F = {
81
+ info: "info-circle",
82
+ warning: "exclamation-triangle",
83
+ danger: "exclamation-circle",
84
+ success: "check-circle"
85
+ }, U = n(
86
+ ({ alertType: e = "info", closable: s = !0, small: a, lightweight: r, appLevel: c, onClose: i, className: m, children: d, ...t }, p) => {
87
+ const [N, v] = H(!1);
88
+ if (N) return null;
89
+ const f = o(
90
+ "alert",
91
+ `alert-${e}`,
92
+ a && "alert-sm",
93
+ r && "alert-lightweight",
94
+ c && "alert-app-level",
95
+ m
96
+ );
97
+ return /* @__PURE__ */ u("div", { ref: p, className: f, ...t, children: [
98
+ /* @__PURE__ */ l("div", { className: "alert-items", children: /* @__PURE__ */ u("div", { className: "alert-item static", children: [
99
+ /* @__PURE__ */ l("div", { className: "alert-icon-wrapper", children: /* @__PURE__ */ l(k, { className: "alert-icon", shape: F[e] }) }),
100
+ /* @__PURE__ */ l("div", { className: "alert-text", children: d })
101
+ ] }) }),
102
+ s && /* @__PURE__ */ l("button", { type: "button", className: "close", onClick: () => {
103
+ v(!0), i == null || i();
104
+ }, children: /* @__PURE__ */ l(k, { shape: "times" }) })
105
+ ] });
106
+ }
107
+ );
108
+ U.displayName = "Alert";
109
+ const X = n(
110
+ ({ color: e, className: s, children: a, ...r }, c) => /* @__PURE__ */ l("span", { ref: c, className: o("badge", e && `badge-${e}`, s), ...r, children: a })
111
+ );
112
+ X.displayName = "Badge";
113
+ const Z = n(
114
+ ({ color: e, labelType: s, clickable: a, disabled: r, text: c, badgeText: i, className: m, children: d, ...t }, p) => {
115
+ const N = o(
116
+ "label",
117
+ e && `label-${e}`,
118
+ s === "solid" && "solid",
119
+ a && "clickable",
120
+ r && "disabled",
121
+ m
122
+ );
123
+ return /* @__PURE__ */ u("span", { ref: p, className: N, ...t, children: [
124
+ c && /* @__PURE__ */ l("span", { className: "text", children: c }),
125
+ d,
126
+ i && /* @__PURE__ */ l("span", { className: "badge", children: i })
127
+ ] });
128
+ }
129
+ );
130
+ Z.displayName = "Label";
131
+ const q = n(
132
+ ({ clickable: e, className: s, children: a, ...r }, c) => /* @__PURE__ */ l("div", { ref: c, className: o("card", e && "clickable", s), ...r, children: a })
133
+ );
134
+ q.displayName = "Card";
135
+ const G = n(
136
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("card-header", e), ...a, children: s })
137
+ );
138
+ G.displayName = "CardHeader";
139
+ const K = n(
140
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("card-block", e), ...a, children: s })
141
+ );
142
+ K.displayName = "CardBlock";
143
+ const Q = n(
144
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("card-title", e), ...a, children: s })
145
+ );
146
+ Q.displayName = "CardTitle";
147
+ const C = n(
148
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("card-text", e), ...a, children: s })
149
+ );
150
+ C.displayName = "CardText";
151
+ const ee = n(
152
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("card-footer", e), ...a, children: s })
153
+ );
154
+ ee.displayName = "CardFooter";
155
+ const ae = n(
156
+ ({ open: e, closable: s = !0, size: a = "md", staticBackdrop: r = !0, onClose: c, className: i, children: m, ...d }, t) => (y(() => {
157
+ if (!e) return;
158
+ const p = (N) => {
159
+ N.key === "Escape" && s && !r && (c == null || c());
160
+ };
161
+ return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
162
+ }, [e, s, r, c]), e ? /* @__PURE__ */ u("div", { ref: t, className: o("modal", i), ...d, children: [
163
+ /* @__PURE__ */ l(
164
+ "div",
165
+ {
166
+ className: o("modal-dialog", a === "sm" && "modal-sm", a === "lg" && "modal-lg", a === "xl" && "modal-xl", a === "full-screen" && "modal-full-screen"),
167
+ role: "dialog",
168
+ "aria-modal": "true",
169
+ children: /* @__PURE__ */ l("div", { className: "modal-content-wrapper", children: /* @__PURE__ */ u("div", { className: "modal-content", children: [
170
+ m,
171
+ s && /* @__PURE__ */ l("div", { className: "modal-header--accessible", children: /* @__PURE__ */ l("button", { type: "button", className: "close", onClick: c, children: /* @__PURE__ */ l(k, { shape: "window-close" }) }) })
172
+ ] }) })
173
+ }
174
+ ),
175
+ /* @__PURE__ */ l("div", { className: "modal-backdrop", "aria-hidden": "true", onClick: () => {
176
+ r || c == null || c();
177
+ } })
178
+ ] }) : null)
179
+ );
180
+ ae.displayName = "Modal";
181
+ const re = n(
182
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("modal-header", e), ...a, children: s })
183
+ );
184
+ re.displayName = "ModalHeader";
185
+ const se = n(
186
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("modal-body", e), ...a, children: s })
187
+ );
188
+ se.displayName = "ModalBody";
189
+ const le = n(
190
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("modal-footer", e), ...a, children: s })
191
+ );
192
+ le.displayName = "ModalFooter";
193
+ const ce = n(
194
+ ({ label: e, state: s, helperText: a, errorText: r, successText: c, className: i, ...m }, d) => /* @__PURE__ */ u("div", { className: o("clr-form-control", s === "error" && "clr-error", s === "success" && "clr-success"), children: [
195
+ e && /* @__PURE__ */ l("label", { className: "clr-control-label", children: e }),
196
+ /* @__PURE__ */ u("div", { className: "clr-control-container", children: [
197
+ /* @__PURE__ */ l("div", { className: "clr-input-wrapper", children: /* @__PURE__ */ l("input", { ref: d, className: o("clr-input", i), ...m }) }),
198
+ a && s !== "error" && s !== "success" && /* @__PURE__ */ l("span", { className: "clr-subtext", children: a }),
199
+ r && s === "error" && /* @__PURE__ */ l("span", { className: "clr-subtext", children: r }),
200
+ c && s === "success" && /* @__PURE__ */ l("span", { className: "clr-subtext", children: c })
201
+ ] })
202
+ ] })
203
+ );
204
+ ce.displayName = "Input";
205
+ const ie = n(
206
+ ({ label: e, state: s, helperText: a, errorText: r, className: c, children: i, ...m }, d) => /* @__PURE__ */ u("div", { className: o("clr-form-control", s === "error" && "clr-error"), children: [
207
+ e && /* @__PURE__ */ l("label", { className: "clr-control-label", children: e }),
208
+ /* @__PURE__ */ u("div", { className: "clr-control-container", children: [
209
+ /* @__PURE__ */ l("div", { className: "clr-select-wrapper", children: /* @__PURE__ */ l("select", { ref: d, className: o("clr-select", c), ...m, children: i }) }),
210
+ a && s !== "error" && /* @__PURE__ */ l("span", { className: "clr-subtext", children: a }),
211
+ r && s === "error" && /* @__PURE__ */ l("span", { className: "clr-subtext", children: r })
212
+ ] })
213
+ ] })
214
+ );
215
+ ie.displayName = "Select";
216
+ const ne = n(
217
+ ({ label: e, inline: s, state: a, helperText: r, errorText: c, successText: i, className: m, ...d }, t) => /* @__PURE__ */ l("div", { className: o("clr-form-control", a === "error" && "clr-error", a === "success" && "clr-success"), children: /* @__PURE__ */ u("div", { className: o("clr-control-container", s && "clr-control-inline"), children: [
218
+ /* @__PURE__ */ u("div", { className: "clr-checkbox-wrapper", children: [
219
+ /* @__PURE__ */ l("input", { ref: t, type: "checkbox", className: o("clr-checkbox", m), ...d }),
220
+ e && /* @__PURE__ */ l("label", { className: "clr-control-label", children: e })
221
+ ] }),
222
+ r && a !== "error" && a !== "success" && /* @__PURE__ */ l("span", { className: "clr-subtext", children: r }),
223
+ c && a === "error" && /* @__PURE__ */ l("span", { className: "clr-subtext", children: c }),
224
+ i && a === "success" && /* @__PURE__ */ l("span", { className: "clr-subtext", children: i })
225
+ ] }) })
226
+ );
227
+ ne.displayName = "Checkbox";
228
+ const te = n(
229
+ ({ label: e, className: s, ...a }, r) => /* @__PURE__ */ l("div", { className: "clr-form-control", children: /* @__PURE__ */ l("div", { className: "clr-control-container", children: /* @__PURE__ */ u("div", { className: "clr-toggle-wrapper", children: [
230
+ /* @__PURE__ */ l("input", { ref: r, type: "checkbox", className: o("clr-toggle", s), ...a }),
231
+ e && /* @__PURE__ */ l("label", { className: "clr-control-label", children: e })
232
+ ] }) }) })
233
+ );
234
+ te.displayName = "Toggle";
235
+ const de = n(
236
+ ({ vertical: e, className: s, children: a, ...r }, c) => /* @__PURE__ */ l("div", { ref: c, className: o(e && "nav-tabs-vertical", s), ...r, children: a })
237
+ );
238
+ de.displayName = "Tabs";
239
+ const oe = n(
240
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("ul", { ref: r, className: o("nav", e), role: "tablist", ...a, children: s })
241
+ );
242
+ oe.displayName = "TabList";
243
+ const me = n(
244
+ ({ active: e, disabled: s, className: a, children: r, ...c }, i) => /* @__PURE__ */ l("li", { role: "presentation", className: "nav-item", children: /* @__PURE__ */ l("button", { ref: i, className: o("btn btn-link nav-link", e && "active", a), disabled: s, role: "tab", "aria-selected": e, ...c, children: r }) })
245
+ );
246
+ me.displayName = "Tab";
247
+ const pe = n(
248
+ ({ active: e, className: s, children: a, ...r }, c) => e ? /* @__PURE__ */ l("section", { ref: c, className: o("tab-content active", s), role: "tabpanel", ...r, children: a }) : null
249
+ );
250
+ pe.displayName = "TabPanel";
251
+ const Ne = n(
252
+ ({ open: e, position: s = "bottom-left", onOpenChange: a, className: r, children: c, ...i }, m) => {
253
+ const d = L(null), t = m || d;
254
+ return y(() => {
255
+ if (!e) return;
256
+ const p = (N) => {
257
+ t.current && !t.current.contains(N.target) && (a == null || a(!1));
258
+ };
259
+ return document.addEventListener("click", p), () => document.removeEventListener("click", p);
260
+ }, [e, a, t]), /* @__PURE__ */ l("div", { ref: t, className: o("dropdown", e && "open", s && s, r), ...i, children: c });
261
+ }
262
+ );
263
+ Ne.displayName = "Dropdown";
264
+ const ue = n(
265
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ u("button", { ref: r, className: o("dropdown-toggle btn btn-link", e), ...a, children: [
266
+ s,
267
+ /* @__PURE__ */ l(k, { shape: "angle", direction: "down" })
268
+ ] })
269
+ );
270
+ ue.displayName = "DropdownTrigger";
271
+ const ve = n(
272
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("dropdown-menu", e), ...a, children: s })
273
+ );
274
+ ve.displayName = "DropdownMenu";
275
+ const be = n(
276
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("button", { ref: r, type: "button", className: o("dropdown-item", e), ...a, children: s })
277
+ );
278
+ be.displayName = "DropdownItem";
279
+ const he = () => /* @__PURE__ */ l("div", { className: "dropdown-divider" });
280
+ he.displayName = "DropdownDivider";
281
+ const ge = n(
282
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("dropdown-header", e), ...a, children: s })
283
+ );
284
+ ge.displayName = "DropdownHeader";
285
+ const we = n(
286
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("clr-accordion", e), ...a, children: s })
287
+ );
288
+ we.displayName = "Accordion";
289
+ const ye = n(
290
+ ({ panelOpen: e, disabled: s, title: a, onToggle: r, className: c, children: i, ...m }, d) => /* @__PURE__ */ l("div", { ref: d, className: o("clr-accordion-panel", s && "clr-accordion-panel-disabled", c), ...m, children: /* @__PURE__ */ u("div", { className: e ? "clr-accordion-panel-open" : "clr-accordion-panel-closed", children: [
291
+ /* @__PURE__ */ l("div", { className: "clr-accordion-header", children: /* @__PURE__ */ u("button", { type: "button", className: "clr-accordion-header-button", disabled: s, "aria-expanded": e, onClick: r, children: [
292
+ /* @__PURE__ */ l("span", { className: "clr-accordion-status", children: /* @__PURE__ */ l(k, { shape: "angle", direction: "right", className: "clr-accordion-angle" }) }),
293
+ a && /* @__PURE__ */ l("span", { className: "clr-accordion-title", children: a })
294
+ ] }) }),
295
+ e && /* @__PURE__ */ l("div", { role: "region", className: "clr-accordion-content-region", children: /* @__PURE__ */ l("div", { className: "clr-accordion-content", children: /* @__PURE__ */ l("div", { className: "clr-accordion-inner-content", children: i }) }) })
296
+ ] }) })
297
+ );
298
+ ye.displayName = "AccordionPanel";
299
+ const fe = n(
300
+ ({ size: e, inline: s, inverse: a, className: r, children: c, ...i }, m) => /* @__PURE__ */ l(
301
+ "span",
302
+ {
303
+ ref: m,
304
+ className: o("spinner", e === "sm" && "spinner-sm", e === "md" && "spinner-md", s && "spinner-inline", a && "spinner-inverse", r),
305
+ "aria-busy": "true",
306
+ ...i,
307
+ children: c
308
+ }
309
+ )
310
+ );
311
+ fe.displayName = "Spinner";
312
+ const ke = n(
313
+ ({ value: e = 0, max: s = 100, color: a, labeled: r, compact: c, loop: i, fade: m, className: d, ...t }, p) => {
314
+ const N = `${e}%`;
315
+ return /* @__PURE__ */ u(
316
+ "div",
317
+ {
318
+ ref: p,
319
+ className: o("progress", c && "compact", r && "labeled", i && "loop", m && "progress-fade", a === "success" && "success", a === "warning" && "warning", a === "danger" && "danger", d),
320
+ ...t,
321
+ children: [
322
+ /* @__PURE__ */ l("progress", { max: s, value: e, "data-displayval": N }),
323
+ r && /* @__PURE__ */ l("span", { children: N })
324
+ ]
325
+ }
326
+ );
327
+ }
328
+ );
329
+ ke.displayName = "ProgressBar";
330
+ const Le = n(
331
+ ({ vertical: e, className: s, children: a, ...r }, c) => /* @__PURE__ */ l("div", { ref: c, className: o("clr-timeline", e && "clr-timeline-vertical", s), role: "list", ...r, children: a })
332
+ );
333
+ Le.displayName = "Timeline";
334
+ const xe = {
335
+ "not-started": { shape: "circle" },
336
+ current: { shape: "dot-circle", status: "info" },
337
+ processing: { shape: "dot-circle", status: "info" },
338
+ success: { shape: "success-standard", status: "success" },
339
+ error: { shape: "error-standard", status: "danger" }
340
+ }, Ee = n(
341
+ ({ state: e = "not-started", header: s, title: a, description: r, className: c, children: i, ...m }, d) => {
342
+ const t = xe[e];
343
+ return /* @__PURE__ */ u("div", { ref: d, className: o("clr-timeline-step", c), role: "listitem", ...m, children: [
344
+ s && /* @__PURE__ */ l("div", { className: "clr-timeline-step-header", children: s }),
345
+ e === "processing" ? /* @__PURE__ */ l("span", { className: "spinner spinner-md", "aria-label": "In progress" }) : /* @__PURE__ */ l(k, { shape: t.shape, status: t.status }),
346
+ /* @__PURE__ */ u("div", { className: "clr-timeline-step-body", children: [
347
+ a && /* @__PURE__ */ l("div", { className: "clr-timeline-step-title", children: a }),
348
+ r && /* @__PURE__ */ l("div", { className: "clr-timeline-step-description", children: r }),
349
+ i
350
+ ] })
351
+ ] });
352
+ }
353
+ );
354
+ Ee.displayName = "TimelineStep";
355
+ const ze = n(
356
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("stack-view", e), ...a, children: s })
357
+ );
358
+ ze.displayName = "StackView";
359
+ const De = n(
360
+ ({ expandable: e, expanded: s, onToggle: a, label: r, content: c, className: i, children: m, ...d }, t) => /* @__PURE__ */ u("div", { ref: t, className: o("stack-block", e && "stack-block-expandable", s && "stack-block-expanded", i), ...d, children: [
361
+ /* @__PURE__ */ l("div", { className: "stack-block-label", onClick: e ? a : void 0, style: e ? { cursor: "pointer" } : void 0, children: r }),
362
+ c && /* @__PURE__ */ l("div", { className: "stack-block-content", children: c }),
363
+ s && m
364
+ ] })
365
+ );
366
+ De.displayName = "StackBlock";
367
+ const Re = n(
368
+ ({ color: e, className: s, children: a, ...r }, c) => /* @__PURE__ */ l("header", { ref: c, className: o("header", e && `header-${e}`, s), ...r, children: a })
369
+ );
370
+ Re.displayName = "Header";
371
+ const Se = n(
372
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("branding", e), ...a, children: s })
373
+ );
374
+ Se.displayName = "HeaderBranding";
375
+ const Te = n(
376
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("header-nav", e), ...a, children: s })
377
+ );
378
+ Te.displayName = "HeaderNav";
379
+ const Pe = n(
380
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("header-actions", e), ...a, children: s })
381
+ );
382
+ Pe.displayName = "HeaderActions";
383
+ const Be = n(
384
+ ({ compact: e, vertical: s, noBorder: a, className: r, children: c, ...i }, m) => /* @__PURE__ */ l(
385
+ "table",
386
+ {
387
+ ref: m,
388
+ className: o("table", e && "table-compact", s && "table-vertical", a && "table-noborder", r),
389
+ ...i,
390
+ children: c
391
+ }
392
+ )
393
+ );
394
+ Be.displayName = "Table";
395
+ const He = n(
396
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("login-wrapper", e), ...a, children: s })
397
+ );
398
+ He.displayName = "LoginWrapper";
399
+ const Me = n(
400
+ ({ className: e, children: s, ...a }, r) => /* @__PURE__ */ l("div", { ref: r, className: o("login", e), ...a, children: s })
401
+ );
402
+ Me.displayName = "Login";
403
+ const O = ({ children: e }) => /* @__PURE__ */ l(V, { children: e });
404
+ O.displayName = "WizardPage";
405
+ const Ae = n(
406
+ ({ open: e, title: s = "Wizard", size: a = "lg", closable: r = !0, onFinish: c, onCancel: i, className: m, children: d }, t) => {
407
+ var g, M;
408
+ const [p, N] = H(0), [v, f] = H(/* @__PURE__ */ new Set()), x = W(() => {
409
+ const h = [];
410
+ return $.Children.forEach(d, (b) => {
411
+ $.isValidElement(b) && b.type === O && h.push({
412
+ title: b.props.title || "",
413
+ nextDisabled: !!b.props.nextDisabled,
414
+ children: b.props.children
415
+ });
416
+ }), h;
417
+ }, [d]), R = p === 0, z = p === x.length - 1;
418
+ y(() => {
419
+ e && (N(0), f(/* @__PURE__ */ new Set()));
420
+ }, [e]), y(() => {
421
+ if (!e) return;
422
+ const h = (b) => {
423
+ b.key === "Escape" && r && (i == null || i());
424
+ };
425
+ return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
426
+ }, [e, r, i]);
427
+ const D = w(() => {
428
+ z ? c == null || c() : (f((h) => new Set(h).add(p)), N((h) => h + 1));
429
+ }, [p, z, c]), S = w(() => {
430
+ R || N((h) => h - 1);
431
+ }, [R]), T = w((h) => {
432
+ (h === 0 || v.has(h - 1) || h <= p) && N(h);
433
+ }, [v, p]);
434
+ if (!e || x.length === 0) return null;
435
+ const E = (g = x[p]) == null ? void 0 : g.nextDisabled;
436
+ return /* @__PURE__ */ l("div", { ref: t, className: o("clr-wizard", `wizard-${a}`, m), children: /* @__PURE__ */ u("div", { className: "modal", children: [
437
+ /* @__PURE__ */ l("div", { className: o("modal-dialog", a === "md" && "modal-md", a === "lg" && "modal-lg", a === "xl" && "modal-xl"), role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ u("div", { className: "modal-content-wrapper", children: [
438
+ /* @__PURE__ */ u("div", { className: "modal-nav clr-wizard-stepnav-wrapper", role: "region", children: [
439
+ /* @__PURE__ */ l("div", { className: "clr-wizard-title", role: "heading", "aria-level": 1, children: s }),
440
+ /* @__PURE__ */ l("div", { className: "clr-wizard-stepnav", children: /* @__PURE__ */ l("nav", { "aria-label": "Wizard steps", children: /* @__PURE__ */ l("ol", { className: "clr-wizard-stepnav-list", children: x.map((h, b) => {
441
+ const P = b === p, B = v.has(b), A = !P && !B && b > 0 && !v.has(b - 1);
442
+ return /* @__PURE__ */ l(
443
+ "li",
444
+ {
445
+ className: o(
446
+ "clr-wizard-stepnav-item",
447
+ P && "active",
448
+ B && "complete",
449
+ A && "disabled"
450
+ ),
451
+ "aria-current": P ? "step" : void 0,
452
+ children: /* @__PURE__ */ u(
453
+ "button",
454
+ {
455
+ type: "button",
456
+ className: "btn btn-link clr-wizard-stepnav-link",
457
+ disabled: A,
458
+ onClick: () => T(b),
459
+ children: [
460
+ /* @__PURE__ */ u("div", { className: "clr-wizard-stepnav-link-icon", children: [
461
+ P && /* @__PURE__ */ l(k, { shape: "dot-circle", role: "img", "aria-label": "Current" }),
462
+ B && !P && /* @__PURE__ */ l(k, { shape: "success-standard", role: "img", "aria-label": "Completed" })
463
+ ] }),
464
+ /* @__PURE__ */ l("span", { className: "clr-sr-only", children: "Step" }),
465
+ /* @__PURE__ */ l("div", { className: "clr-wizard-stepnav-link-page-number", children: b + 1 }),
466
+ /* @__PURE__ */ l("span", { className: "clr-wizard-stepnav-link-title", children: h.title })
467
+ ]
468
+ }
469
+ )
470
+ },
471
+ b
472
+ );
473
+ }) }) }) })
474
+ ] }),
475
+ /* @__PURE__ */ u("div", { className: "modal-content", children: [
476
+ /* @__PURE__ */ u("div", { className: "modal-header--accessible", children: [
477
+ /* @__PURE__ */ l("div", { className: "modal-title-wrapper", tabIndex: -1, children: /* @__PURE__ */ l("div", { className: "modal-title", role: "heading", "aria-level": 2, children: /* @__PURE__ */ l("span", { tabIndex: -1, className: "modal-title-text", children: (M = x[p]) == null ? void 0 : M.title }) }) }),
478
+ r && /* @__PURE__ */ l("button", { type: "button", className: "close", "aria-label": "Close", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ l(k, { shape: "window-close" }) })
479
+ ] }),
480
+ /* @__PURE__ */ l("div", { className: "modal-body-wrapper", children: /* @__PURE__ */ l("div", { className: "modal-body", children: /* @__PURE__ */ l("main", { className: "clr-wizard-content", children: x.map((h, b) => /* @__PURE__ */ l(
481
+ "div",
482
+ {
483
+ className: o("clr-wizard-page", b === p && "active"),
484
+ "aria-hidden": b !== p,
485
+ style: b !== p ? { display: "none" } : void 0,
486
+ children: h.children
487
+ },
488
+ b
489
+ )) }) }) }),
490
+ /* @__PURE__ */ l("div", { className: "modal-footer clr-wizard-footer", children: /* @__PURE__ */ l("div", { className: "clr-wizard-footer-buttons", children: /* @__PURE__ */ u("div", { className: "clr-wizard-footer-buttons-wrapper", children: [
491
+ /* @__PURE__ */ l("div", { className: "clr-wizard-btn-wrapper", children: /* @__PURE__ */ l("button", { type: "button", className: "btn clr-wizard-btn btn-link clr-wizard-btn--tertiary", onClick: () => i == null ? void 0 : i(), children: "Cancel" }) }),
492
+ !R && /* @__PURE__ */ l("div", { className: "clr-wizard-btn-wrapper", children: /* @__PURE__ */ l("button", { type: "button", className: "btn clr-wizard-btn btn-outline clr-wizard-btn--secondary", onClick: S, children: "Back" }) }),
493
+ !z && /* @__PURE__ */ l("div", { className: "clr-wizard-btn-wrapper", children: /* @__PURE__ */ l(
494
+ "button",
495
+ {
496
+ type: "button",
497
+ className: o("btn clr-wizard-btn btn-primary clr-wizard-btn--primary", E && "disabled"),
498
+ disabled: E,
499
+ onClick: D,
500
+ children: "Next"
501
+ }
502
+ ) }),
503
+ z && /* @__PURE__ */ l("div", { className: "clr-wizard-btn-wrapper", children: /* @__PURE__ */ l(
504
+ "button",
505
+ {
506
+ type: "button",
507
+ className: o("btn clr-wizard-btn btn-success clr-wizard-btn--primary", E && "disabled"),
508
+ disabled: E,
509
+ onClick: D,
510
+ children: "Finish"
511
+ }
512
+ ) })
513
+ ] }) }) })
514
+ ] })
515
+ ] }) }),
516
+ /* @__PURE__ */ l("div", { className: "modal-backdrop", "aria-hidden": "true" })
517
+ ] }) });
518
+ }
519
+ );
520
+ Ae.displayName = "Wizard";
521
+ const $e = n(
522
+ ({ items: e, maxItems: s, onItemClick: a, className: r }, c) => {
523
+ const i = L(null), m = c || i, d = w((t) => a == null ? void 0 : a(t.detail), [a]);
524
+ return y(() => {
525
+ const t = m.current;
526
+ if (t)
527
+ return t.addEventListener("breadcrumbClick", d), () => t.removeEventListener("breadcrumbClick", d);
528
+ }, [m, d]), /* @__PURE__ */ l(
529
+ "clr-wc-breadcrumbs",
530
+ {
531
+ ref: m,
532
+ items: JSON.stringify(e),
533
+ maxItems: s,
534
+ class: r
535
+ }
536
+ );
537
+ }
538
+ );
539
+ $e.displayName = "Breadcrumbs";
540
+ const Je = n(
541
+ ({ columns: e, data: s, loading: a, paginate: r, pageSize: c = 10, selectable: i, expandable: m, showDetailPane: d, showRowActions: t, rowActions: p, onRefresh: N, onSelectedChange: v, onRowAction: f, className: x }, R) => {
542
+ const z = L(null), D = R || z, S = w((g) => N == null ? void 0 : N(g.detail), [N]), T = w((g) => v == null ? void 0 : v(g.detail), [v]), E = w((g) => f == null ? void 0 : f(g.detail), [f]);
543
+ return y(() => {
544
+ const g = D.current;
545
+ if (g)
546
+ return g.addEventListener("dgRefresh", S), g.addEventListener("dgSelectedChange", T), g.addEventListener("dgRowAction", E), () => {
547
+ g.removeEventListener("dgRefresh", S), g.removeEventListener("dgSelectedChange", T), g.removeEventListener("dgRowAction", E);
548
+ };
549
+ }, [D, S, T, E]), /* @__PURE__ */ l(
550
+ "clr-wc-datagrid",
551
+ {
552
+ ref: D,
553
+ columns: JSON.stringify(e),
554
+ data: JSON.stringify(s),
555
+ loading: a || void 0,
556
+ paginate: r || void 0,
557
+ pageSize: c,
558
+ selectable: i || void 0,
559
+ expandable: m || void 0,
560
+ showDetailPane: d || void 0,
561
+ showRowActions: t || void 0,
562
+ rowActions: p ? JSON.stringify(p) : void 0,
563
+ class: x
564
+ }
565
+ );
566
+ }
567
+ );
568
+ Je.displayName = "Datagrid";
569
+ const We = n(
570
+ ({ nodes: e, selectable: s, className: a }, r) => /* @__PURE__ */ l(
571
+ "clr-wc-tree",
572
+ {
573
+ ref: r,
574
+ nodes: JSON.stringify(e),
575
+ selectable: s || void 0,
576
+ class: a
577
+ }
578
+ )
579
+ );
580
+ We.displayName = "TreeView";
581
+ const Oe = n(
582
+ ({ steps: e, onSubmit: s, className: a }, r) => {
583
+ const c = L(null), i = r || c, m = w(() => s == null ? void 0 : s(), [s]);
584
+ return y(() => {
585
+ const d = i.current;
586
+ if (d)
587
+ return d.addEventListener("onSubmit", m), () => d.removeEventListener("onSubmit", m);
588
+ }, [i, m]), /* @__PURE__ */ l(
589
+ "clr-wc-stepper",
590
+ {
591
+ ref: i,
592
+ steps: JSON.stringify(e),
593
+ class: a
594
+ }
595
+ );
596
+ }
597
+ );
598
+ Oe.displayName = "Stepper";
599
+ const Ve = n(
600
+ ({ label: e, value: s, placeholder: a = "MM/DD/YYYY", onChange: r, className: c }, i) => {
601
+ const m = L(null), d = i || m, t = w((p) => r == null ? void 0 : r(p.detail), [r]);
602
+ return y(() => {
603
+ const p = d.current;
604
+ if (p)
605
+ return p.addEventListener("valueChange", t), () => p.removeEventListener("valueChange", t);
606
+ }, [d, t]), /* @__PURE__ */ l(
607
+ "clr-wc-datepicker",
608
+ {
609
+ ref: d,
610
+ label: e,
611
+ value: s,
612
+ placeholder: a,
613
+ class: c
614
+ }
615
+ );
616
+ }
617
+ );
618
+ Ve.displayName = "Datepicker";
619
+ const _e = n(
620
+ ({ label: e, startDate: s, endDate: a, onStartDateChange: r, onEndDateChange: c, className: i }, m) => {
621
+ const d = L(null), t = m || d, p = w((v) => r == null ? void 0 : r(v.detail), [r]), N = w((v) => c == null ? void 0 : c(v.detail), [c]);
622
+ return y(() => {
623
+ const v = t.current;
624
+ if (v)
625
+ return v.addEventListener("startDateChange", p), v.addEventListener("endDateChange", N), () => {
626
+ v.removeEventListener("startDateChange", p), v.removeEventListener("endDateChange", N);
627
+ };
628
+ }, [t, p, N]), /* @__PURE__ */ l(
629
+ "clr-wc-date-range-picker",
630
+ {
631
+ ref: t,
632
+ label: e,
633
+ startDate: s,
634
+ endDate: a,
635
+ class: i
636
+ }
637
+ );
638
+ }
639
+ );
640
+ _e.displayName = "DateRangePicker";
641
+ const Ie = n(
642
+ ({ label: e, placeholder: s, options: a, selected: r, onSelectionChange: c, className: i }, m) => {
643
+ const d = L(null), t = m || d, p = w((N) => c == null ? void 0 : c(N.detail), [c]);
644
+ return y(() => {
645
+ const N = t.current;
646
+ if (N)
647
+ return N.addEventListener("selectionChange", p), () => N.removeEventListener("selectionChange", p);
648
+ }, [t, p]), /* @__PURE__ */ l(
649
+ "clr-wc-combobox",
650
+ {
651
+ ref: t,
652
+ label: e,
653
+ placeholder: s,
654
+ options: JSON.stringify(a),
655
+ selected: r,
656
+ class: i
657
+ }
658
+ );
659
+ }
660
+ );
661
+ Ie.displayName = "Combobox";
662
+ const Ye = n(
663
+ ({ position: e = "right-middle", className: s, children: a }, r) => /* @__PURE__ */ l("clr-wc-signpost", { ref: r, position: e, class: s, children: a })
664
+ );
665
+ Ye.displayName = "Signpost";
666
+ const je = n(
667
+ ({ tooltipText: e, position: s = "right", size: a = "sm", className: r, children: c }, i) => /* @__PURE__ */ l("clr-wc-tooltip", { ref: i, tooltipText: e, position: s, size: a, class: r, children: c })
668
+ );
669
+ je.displayName = "Tooltip";
670
+ const Fe = n(
671
+ ({ triggerLabel: e = "Dropdown", items: s, onItemClick: a, className: r }, c) => {
672
+ const i = L(null), m = c || i, d = w((t) => a == null ? void 0 : a(t.detail), [a]);
673
+ return y(() => {
674
+ const t = m.current;
675
+ if (t)
676
+ return t.addEventListener("itemClick", d), () => t.removeEventListener("itemClick", d);
677
+ }, [m, d]), /* @__PURE__ */ l(
678
+ "clr-wc-dropdown-angular",
679
+ {
680
+ ref: m,
681
+ triggerLabel: e,
682
+ items: JSON.stringify(s),
683
+ class: r
684
+ }
685
+ );
686
+ }
687
+ );
688
+ Fe.displayName = "DropdownAngular";
689
+ const Ue = n(
690
+ ({ items: e, collapsible: s, collapsed: a, onNavItemClick: r, className: c }, i) => {
691
+ const m = L(null), d = i || m, t = w((p) => r == null ? void 0 : r(p.detail), [r]);
692
+ return y(() => {
693
+ const p = d.current;
694
+ if (p)
695
+ return p.addEventListener("navItemClick", t), () => p.removeEventListener("navItemClick", t);
696
+ }, [d, t]), /* @__PURE__ */ l(
697
+ "clr-wc-vertical-nav",
698
+ {
699
+ ref: d,
700
+ items: JSON.stringify(e),
701
+ collapsible: s || void 0,
702
+ collapsed: a || void 0,
703
+ class: c
704
+ }
705
+ );
706
+ }
707
+ );
708
+ Ue.displayName = "VerticalNav";
709
+ const Xe = n(
710
+ ({ badge: e, ...s }, a) => /* @__PURE__ */ l(k, { ref: a, ...s })
711
+ );
712
+ Xe.displayName = "Icon";
713
+ export {
714
+ we as Accordion,
715
+ ye as AccordionPanel,
716
+ U as Alert,
717
+ X as Badge,
718
+ $e as Breadcrumbs,
719
+ _ as Button,
720
+ q as Card,
721
+ K as CardBlock,
722
+ ee as CardFooter,
723
+ G as CardHeader,
724
+ C as CardText,
725
+ Q as CardTitle,
726
+ k as CdsIcon,
727
+ ne as Checkbox,
728
+ Ie as Combobox,
729
+ Je as Datagrid,
730
+ _e as DateRangePicker,
731
+ Ve as Datepicker,
732
+ Ne as Dropdown,
733
+ Fe as DropdownAngular,
734
+ he as DropdownDivider,
735
+ ge as DropdownHeader,
736
+ be as DropdownItem,
737
+ ve as DropdownMenu,
738
+ ue as DropdownTrigger,
739
+ Re as Header,
740
+ Pe as HeaderActions,
741
+ Se as HeaderBranding,
742
+ Te as HeaderNav,
743
+ Xe as Icon,
744
+ ce as Input,
745
+ Z as Label,
746
+ Me as Login,
747
+ He as LoginWrapper,
748
+ ae as Modal,
749
+ se as ModalBody,
750
+ le as ModalFooter,
751
+ re as ModalHeader,
752
+ ke as ProgressBar,
753
+ ie as Select,
754
+ Ye as Signpost,
755
+ fe as Spinner,
756
+ De as StackBlock,
757
+ ze as StackView,
758
+ Oe as Stepper,
759
+ me as Tab,
760
+ oe as TabList,
761
+ pe as TabPanel,
762
+ Be as Table,
763
+ de as Tabs,
764
+ Le as Timeline,
765
+ Ee as TimelineStep,
766
+ te as Toggle,
767
+ je as Tooltip,
768
+ We as TreeView,
769
+ Ue as VerticalNav,
770
+ Ae as Wizard,
771
+ O as WizardPage
772
+ };