tharaday 0.7.4 → 0.7.6
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/ds.css +1 -1
- package/dist/ds.js +655 -633
- package/dist/ds.umd.cjs +1 -1
- package/package.json +4 -4
- package/src/components/Accordion/Accordion.tsx +13 -5
- package/src/components/Avatar/Avatar.tsx +3 -3
- package/src/components/Badge/Badge.tsx +2 -2
- package/src/components/Box/Box.tsx +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +3 -3
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Card/Card.tsx +5 -5
- package/src/components/Checkbox/Checkbox.module.css +1 -1
- package/src/components/Checkbox/Checkbox.tsx +4 -4
- package/src/components/Divider/Divider.tsx +3 -3
- package/src/components/Dropdown/Dropdown.module.css +1 -0
- package/src/components/Dropdown/Dropdown.tsx +5 -5
- package/src/components/Header/Header.tsx +4 -4
- package/src/components/Input/Input.tsx +4 -4
- package/src/components/List/List.tsx +2 -2
- package/src/components/List/ListItem.tsx +2 -2
- package/src/components/Loader/Loader.tsx +2 -2
- package/src/components/Modal/Modal.tsx +2 -2
- package/src/components/NavBar/NavBar.tsx +3 -3
- package/src/components/Notification/Notification.tsx +2 -2
- package/src/components/Pagination/Pagination.tsx +2 -2
- package/src/components/ProgressBar/ProgressBar.tsx +5 -2
- package/src/components/RadioButton/RadioButton.tsx +5 -5
- package/src/components/Select/Select.tsx +4 -4
- package/src/components/Skeleton/Skeleton.tsx +2 -2
- package/src/components/Slider/Slider.tsx +8 -6
- package/src/components/Stepper/Step.tsx +6 -4
- package/src/components/Stepper/Stepper.tsx +2 -2
- package/src/components/Switch/Switch.tsx +6 -3
- package/src/components/Table/Table.tsx +9 -9
- package/src/components/Tabs/Tabs.tsx +4 -4
- package/src/components/Text/Text.tsx +2 -2
- package/src/components/Textarea/Textarea.tsx +4 -4
- package/src/components/Tooltip/Tooltip.tsx +3 -3
- package/src/components/Tree/Tree.tsx +2 -2
- package/src/components/Tree/TreeItem.tsx +2 -2
- package/src/layouts/AppLayout/AppLayout.tsx +2 -2
- package/src/layouts/AuthLayout/AuthLayout.tsx +2 -2
- package/src/layouts/DashboardLayout/DashboardLayout.tsx +2 -2
- package/src/layouts/SettingsLayout/SettingsLayout.tsx +2 -2
- package/tsconfig.app.json +1 -1
- package/vite.config.ts +0 -1
- package/dist/index.d.ts +0 -1
package/dist/ds.js
CHANGED
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
import { Children as e, Fragment as t, cloneElement as n, isValidElement as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
2
2
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
3
3
|
import { createPortal as f } from "react-dom";
|
|
4
|
-
//#region
|
|
5
|
-
|
|
6
|
-
var t,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
var p = Object.create, m = Object.defineProperty, h = Object.getOwnPropertyDescriptor, g = Object.getOwnPropertyNames, _ = Object.getPrototypeOf, v = Object.prototype.hasOwnProperty, y = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), b = (e, t, n, r) => {
|
|
6
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = g(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !v.call(e, s) && s !== n && m(e, s, {
|
|
7
|
+
get: ((e) => t[e]).bind(null, s),
|
|
8
|
+
enumerable: !(r = h(t, s)) || r.enumerable
|
|
9
|
+
});
|
|
10
|
+
return e;
|
|
11
|
+
}, x = /* @__PURE__ */ ((e, t, n) => (n = e == null ? {} : p(_(e)), b(t || !e || !e.__esModule ? m(n, "default", {
|
|
12
|
+
value: e,
|
|
13
|
+
enumerable: !0
|
|
14
|
+
}) : n, e)))((/* @__PURE__ */ y(((e, t) => {
|
|
15
|
+
(function() {
|
|
16
|
+
var e = {}.hasOwnProperty;
|
|
17
|
+
function n() {
|
|
18
|
+
for (var e = "", t = 0; t < arguments.length; t++) {
|
|
19
|
+
var n = arguments[t];
|
|
20
|
+
n && (e = i(e, r(n)));
|
|
21
|
+
}
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
function r(t) {
|
|
25
|
+
if (typeof t == "string" || typeof t == "number") return t;
|
|
26
|
+
if (typeof t != "object") return "";
|
|
27
|
+
if (Array.isArray(t)) return n.apply(null, t);
|
|
28
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) return t.toString();
|
|
29
|
+
var r = "";
|
|
30
|
+
for (var a in t) e.call(t, a) && t[a] && (r = i(r, a));
|
|
31
|
+
return r;
|
|
32
|
+
}
|
|
33
|
+
function i(e, t) {
|
|
34
|
+
return t ? e ? e + " " + t : e + t : e;
|
|
35
|
+
}
|
|
36
|
+
t !== void 0 && t.exports ? (n.default = n, t.exports = n) : typeof define == "function" && typeof define.amd == "object" && define.amd ? define("classnames", [], function() {
|
|
37
|
+
return n;
|
|
38
|
+
}) : window.classNames = n;
|
|
39
|
+
})();
|
|
40
|
+
})))(), 1), S = {
|
|
19
41
|
root: "_root_1f38q_1",
|
|
20
42
|
default: "_default_1f38q_8",
|
|
21
43
|
bordered: "_bordered_1f38q_14",
|
|
@@ -33,27 +55,27 @@ var h = {
|
|
|
33
55
|
content: "_content_1f38q_106",
|
|
34
56
|
contentBody: "_contentBody_1f38q_121",
|
|
35
57
|
contentBodyExpanded: "_contentBodyExpanded_1f38q_134"
|
|
36
|
-
},
|
|
37
|
-
let l = a(), f = s ?? `ds-accordion-${l}`, [p,
|
|
38
|
-
|
|
58
|
+
}, C = ({ items: e, allowMultiple: t = !1, defaultExpanded: n = [], variant: r = "default", size: i = "md", className: o, id: s }) => {
|
|
59
|
+
let l = a(), f = s ?? `ds-accordion-${l}`, [p, m] = c(n), h = (e) => {
|
|
60
|
+
m((n) => n.includes(e) ? n.filter((t) => t !== e) : t ? [...n, e] : [e]);
|
|
39
61
|
};
|
|
40
62
|
return /* @__PURE__ */ u("div", {
|
|
41
63
|
id: f,
|
|
42
|
-
className:
|
|
64
|
+
className: (0, x.default)(S.root, S[r], S[i], o),
|
|
43
65
|
children: e.map((e) => {
|
|
44
66
|
let t = p.includes(e.id);
|
|
45
67
|
return /* @__PURE__ */ d("div", {
|
|
46
|
-
className:
|
|
68
|
+
className: S.item,
|
|
47
69
|
children: [/* @__PURE__ */ d("button", {
|
|
48
70
|
type: "button",
|
|
49
71
|
id: `${f}-header-${e.id}`,
|
|
50
|
-
className:
|
|
51
|
-
onClick: () =>
|
|
72
|
+
className: S.header,
|
|
73
|
+
onClick: () => h(e.id),
|
|
52
74
|
disabled: e.isDisabled,
|
|
53
75
|
"aria-expanded": t,
|
|
54
76
|
"aria-controls": `${f}-content-${e.id}`,
|
|
55
77
|
children: [/* @__PURE__ */ u("span", { children: e.title }), /* @__PURE__ */ u("span", {
|
|
56
|
-
className:
|
|
78
|
+
className: (0, x.default)(S.icon, t && S.iconExpanded),
|
|
57
79
|
"aria-hidden": "true",
|
|
58
80
|
children: /* @__PURE__ */ u("svg", {
|
|
59
81
|
width: "12",
|
|
@@ -73,11 +95,11 @@ var h = {
|
|
|
73
95
|
id: `${f}-content-${e.id}`,
|
|
74
96
|
role: "region",
|
|
75
97
|
"aria-labelledby": `${f}-header-${e.id}`,
|
|
76
|
-
className:
|
|
98
|
+
className: (0, x.default)(S.contentWrapper, t && S.contentExpanded),
|
|
77
99
|
children: /* @__PURE__ */ u("div", {
|
|
78
|
-
className:
|
|
100
|
+
className: S.content,
|
|
79
101
|
children: /* @__PURE__ */ u("div", {
|
|
80
|
-
className:
|
|
102
|
+
className: (0, x.default)(S.contentBody, t && S.contentBodyExpanded),
|
|
81
103
|
children: e.content
|
|
82
104
|
})
|
|
83
105
|
})
|
|
@@ -85,7 +107,7 @@ var h = {
|
|
|
85
107
|
}, e.id);
|
|
86
108
|
})
|
|
87
109
|
});
|
|
88
|
-
},
|
|
110
|
+
}, w = {
|
|
89
111
|
root: "_root_17k2j_1",
|
|
90
112
|
image: "_image_17k2j_14",
|
|
91
113
|
defaultIcon: "_defaultIcon_17k2j_20",
|
|
@@ -95,32 +117,32 @@ var h = {
|
|
|
95
117
|
md: "_md_17k2j_44",
|
|
96
118
|
lg: "_lg_17k2j_49",
|
|
97
119
|
xl: "_xl_17k2j_54"
|
|
98
|
-
},
|
|
120
|
+
}, ee = ({ src: e, alt: t, name: n, size: r = "md", fallback: i, className: a, ...o }) => {
|
|
99
121
|
let [s, l] = c(!1), d = t ?? n, f = (e) => e.split(" ").map((e) => e[0]).slice(0, 2).join(""), p = () => e && !s ? /* @__PURE__ */ u("img", {
|
|
100
122
|
src: e,
|
|
101
123
|
alt: d || "",
|
|
102
|
-
className:
|
|
124
|
+
className: w.image,
|
|
103
125
|
onError: () => l(!0)
|
|
104
126
|
}) : i ? /* @__PURE__ */ u("span", {
|
|
105
|
-
className:
|
|
127
|
+
className: w.fallback,
|
|
106
128
|
children: i
|
|
107
129
|
}) : n ? /* @__PURE__ */ u("span", {
|
|
108
|
-
className:
|
|
130
|
+
className: w.fallback,
|
|
109
131
|
children: f(n)
|
|
110
132
|
}) : /* @__PURE__ */ u("svg", {
|
|
111
133
|
viewBox: "0 0 24 24",
|
|
112
134
|
fill: "currentColor",
|
|
113
|
-
className:
|
|
135
|
+
className: (0, x.default)(w.image, w.defaultIcon),
|
|
114
136
|
"aria-hidden": "true",
|
|
115
137
|
focusable: "false",
|
|
116
138
|
children: /* @__PURE__ */ u("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" })
|
|
117
139
|
});
|
|
118
140
|
return /* @__PURE__ */ u("div", {
|
|
119
|
-
className:
|
|
141
|
+
className: (0, x.default)(w.root, w[r], a),
|
|
120
142
|
...o,
|
|
121
143
|
children: p()
|
|
122
144
|
});
|
|
123
|
-
},
|
|
145
|
+
}, T = {
|
|
124
146
|
root: "_root_13wyx_1",
|
|
125
147
|
sm: "_sm_13wyx_12",
|
|
126
148
|
md: "_md_13wyx_18",
|
|
@@ -133,13 +155,13 @@ var h = {
|
|
|
133
155
|
info: "_info_13wyx_47",
|
|
134
156
|
subtle: "_subtle_13wyx_53",
|
|
135
157
|
outline: "_outline_13wyx_75"
|
|
136
|
-
},
|
|
137
|
-
className:
|
|
158
|
+
}, E = ({ variant: e = "solid", size: t = "md", intent: n = "neutral", className: r, children: i, ...a }) => /* @__PURE__ */ u("span", {
|
|
159
|
+
className: (0, x.default)(T.root, T[e], T[t], T[n], r),
|
|
138
160
|
...a,
|
|
139
161
|
children: i
|
|
140
|
-
}),
|
|
141
|
-
box:
|
|
142
|
-
fullWidth:
|
|
162
|
+
}), D = "_box_ynnco_1", O = "_fullWidth_ynnco_5", k = "_border_ynnco_683", A = "_borderBottom_ynnco_686", j = {
|
|
163
|
+
box: D,
|
|
164
|
+
fullWidth: O,
|
|
143
165
|
"display-block": "_display-block_ynnco_10",
|
|
144
166
|
"display-flex": "_display-flex_ynnco_13",
|
|
145
167
|
"display-inline-flex": "_display-inline-flex_ynnco_16",
|
|
@@ -339,8 +361,8 @@ var h = {
|
|
|
339
361
|
"bg-success-subtle": "_bg-success-subtle_ynnco_672",
|
|
340
362
|
"bg-warning-subtle": "_bg-warning-subtle_ynnco_675",
|
|
341
363
|
"bg-danger-subtle": "_bg-danger-subtle_ynnco_678",
|
|
342
|
-
border:
|
|
343
|
-
borderBottom:
|
|
364
|
+
border: k,
|
|
365
|
+
borderBottom: A,
|
|
344
366
|
"borderColor-main": "_borderColor-main_ynnco_691",
|
|
345
367
|
"borderColor-subtle": "_borderColor-subtle_ynnco_694",
|
|
346
368
|
"borderColor-danger": "_borderColor-danger_ynnco_697",
|
|
@@ -355,64 +377,64 @@ var h = {
|
|
|
355
377
|
"borderRadius-md": "_borderRadius-md_ynnco_728",
|
|
356
378
|
"borderRadius-lg": "_borderRadius-lg_ynnco_731",
|
|
357
379
|
"borderRadius-full": "_borderRadius-full_ynnco_734"
|
|
358
|
-
},
|
|
380
|
+
}, M = (e, t, n, r, i, a, o, s) => {
|
|
359
381
|
let c = {};
|
|
360
382
|
return typeof t == "string" && (c[e] = t), typeof i == "string" && (c[`${e}Top`] = i), typeof a == "string" && (c[`${e}Bottom`] = a), typeof o == "string" && (c[`${e}Left`] = o), typeof s == "string" && (c[`${e}Right`] = s), typeof n == "string" && (c[`${e}Left`] = n, c[`${e}Right`] = n), typeof r == "string" && (c[`${e}Top`] = r, c[`${e}Bottom`] = r), c;
|
|
361
|
-
},
|
|
362
|
-
let
|
|
363
|
-
...
|
|
383
|
+
}, N = ({ children: e, as: t = "div", display: n, padding: r, paddingX: i, paddingY: a, paddingTop: o, paddingBottom: s, paddingLeft: c, paddingRight: l, margin: d, marginX: f, marginY: p, marginTop: m, marginBottom: h, marginLeft: g, marginRight: _, gap: v, flexDirection: y, alignItems: b, justifyContent: S, flexWrap: C, flexGrow: w, flexShrink: ee, flex: T, fullWidth: E, textAlign: D, width: O, height: k, maxWidth: A, gridTemplateColumns: N, backgroundColor: P, border: te, borderBottom: ne, borderColor: F, borderRadius: I, className: re, style: ie, ...ae }) => {
|
|
384
|
+
let oe = {
|
|
385
|
+
...ie,
|
|
364
386
|
flexGrow: w,
|
|
365
|
-
flexShrink:
|
|
366
|
-
flex:
|
|
367
|
-
width:
|
|
368
|
-
height:
|
|
369
|
-
maxWidth:
|
|
370
|
-
gridTemplateColumns:
|
|
371
|
-
gap: typeof
|
|
372
|
-
...
|
|
373
|
-
...
|
|
387
|
+
flexShrink: ee,
|
|
388
|
+
flex: T,
|
|
389
|
+
width: O,
|
|
390
|
+
height: k,
|
|
391
|
+
maxWidth: A,
|
|
392
|
+
gridTemplateColumns: N,
|
|
393
|
+
gap: typeof v == "string" ? v : void 0,
|
|
394
|
+
...M("padding", r, i, a, o, s, c, l),
|
|
395
|
+
...M("margin", d, f, p, m, h, g, _)
|
|
374
396
|
};
|
|
375
397
|
return /* @__PURE__ */ u(t, {
|
|
376
|
-
className:
|
|
377
|
-
style:
|
|
378
|
-
...
|
|
398
|
+
className: (0, x.default)(j.box, n && j[`display-${n}`], D && j[`textAlign-${D}`], typeof r == "number" && j[`p-${r}`], typeof i == "number" && j[`px-${i}`], typeof a == "number" && j[`py-${a}`], typeof o == "number" && j[`pt-${o}`], typeof s == "number" && j[`pb-${s}`], typeof c == "number" && j[`pl-${c}`], typeof l == "number" && j[`pr-${l}`], typeof d == "number" && j[`margin-${d}`], typeof f == "number" && j[`marginX-${f}`], typeof p == "number" && j[`marginY-${p}`], typeof m == "number" && j[`marginTop-${m}`], typeof h == "number" && j[`marginBottom-${h}`], typeof g == "number" && j[`marginLeft-${g}`], typeof _ == "number" && j[`marginRight-${_}`], typeof v == "number" && j[`gap-${v}`], y && j[`flexDirection-${y}`], b && j[`alignItems-${b}`], S && j[`justifyContent-${S}`], C && j[`flexWrap-${C}`], P && j[`bg-${P}`], te && j.border, ne && j.borderBottom, F && j[`borderColor-${F}`], I && j[`borderRadius-${I}`], E && j.fullWidth, re),
|
|
399
|
+
style: oe,
|
|
400
|
+
...ae,
|
|
379
401
|
children: e
|
|
380
402
|
});
|
|
381
|
-
},
|
|
403
|
+
}, P = {
|
|
382
404
|
root: "_root_10ujs_1",
|
|
383
405
|
list: "_list_10ujs_6",
|
|
384
406
|
item: "_item_10ujs_16",
|
|
385
407
|
link: "_link_10ujs_21",
|
|
386
408
|
current: "_current_10ujs_27",
|
|
387
409
|
separator: "_separator_10ujs_38"
|
|
388
|
-
},
|
|
410
|
+
}, te = ({ href: e, isCurrent: t, children: n, className: r, ...i }) => {
|
|
389
411
|
let a = e && !t ? "a" : "span";
|
|
390
412
|
return /* @__PURE__ */ u("li", {
|
|
391
|
-
className:
|
|
413
|
+
className: P.item,
|
|
392
414
|
children: /* @__PURE__ */ u(a, {
|
|
393
415
|
href: e,
|
|
394
|
-
className:
|
|
416
|
+
className: (0, x.default)(P.link, t && P.current, r),
|
|
395
417
|
"aria-current": t ? "page" : void 0,
|
|
396
418
|
...i,
|
|
397
419
|
children: n
|
|
398
420
|
})
|
|
399
421
|
});
|
|
400
|
-
},
|
|
422
|
+
}, ne = ({ children: n, separator: r = "/", className: i, ...a }) => {
|
|
401
423
|
let o = e.toArray(n);
|
|
402
424
|
return /* @__PURE__ */ u("nav", {
|
|
403
425
|
"aria-label": "Breadcrumbs",
|
|
404
|
-
className:
|
|
426
|
+
className: (0, x.default)(P.root, i),
|
|
405
427
|
...a,
|
|
406
428
|
children: /* @__PURE__ */ u("ol", {
|
|
407
|
-
className:
|
|
429
|
+
className: P.list,
|
|
408
430
|
children: o.map((e, n) => /* @__PURE__ */ d(t, { children: [e, n < o.length - 1 && /* @__PURE__ */ u("li", {
|
|
409
|
-
className:
|
|
431
|
+
className: P.separator,
|
|
410
432
|
"aria-hidden": "true",
|
|
411
433
|
children: r
|
|
412
434
|
})] }, n))
|
|
413
435
|
})
|
|
414
436
|
});
|
|
415
|
-
},
|
|
437
|
+
}, F = {
|
|
416
438
|
root: "_root_1vhu8_1",
|
|
417
439
|
xs: "_xs_1vhu8_31",
|
|
418
440
|
sm: "_sm_1vhu8_39",
|
|
@@ -430,14 +452,14 @@ var h = {
|
|
|
430
452
|
loading: "_loading_1vhu8_249",
|
|
431
453
|
spinner: "_spinner_1vhu8_253",
|
|
432
454
|
spin: "_spin_1vhu8_253"
|
|
433
|
-
},
|
|
455
|
+
}, I = ({ size: e = "md", variant: t = "outline", intent: n = "neutral", fullWidth: r = !1, isLoading: i = !1, className: a, children: o, disabled: s, ...c }) => /* @__PURE__ */ d("button", {
|
|
434
456
|
type: "button",
|
|
435
|
-
className:
|
|
457
|
+
className: (0, x.default)(F.root, F[e], F[t], F[n], r && F.fullWidth, i && F.loading, a),
|
|
436
458
|
disabled: s || i,
|
|
437
459
|
"aria-busy": i || void 0,
|
|
438
460
|
...c,
|
|
439
461
|
children: [i && /* @__PURE__ */ u("svg", {
|
|
440
|
-
className:
|
|
462
|
+
className: F.spinner,
|
|
441
463
|
viewBox: "0 0 16 16",
|
|
442
464
|
fill: "none",
|
|
443
465
|
"aria-hidden": "true",
|
|
@@ -451,12 +473,12 @@ var h = {
|
|
|
451
473
|
strokeDashoffset: "10"
|
|
452
474
|
})
|
|
453
475
|
}), o]
|
|
454
|
-
}),
|
|
455
|
-
root:
|
|
456
|
-
bordered:
|
|
457
|
-
shadowNone:
|
|
458
|
-
shadowSm:
|
|
459
|
-
shadowMd:
|
|
476
|
+
}), re = "_root_1k781_1", ie = "_bordered_1k781_9", ae = "_shadowNone_1k781_14", oe = "_shadowSm_1k781_17", se = "_shadowMd_1k781_20", ce = "_pNone_1k781_65", le = "_pSm_1k781_68", ue = "_pMd_1k781_71", de = "_pLg_1k781_74", fe = "_header_1k781_79", pe = "_title_1k781_85", me = "_subtitle_1k781_93", he = "_content_1k781_100", ge = "_footer_1k781_104", L = {
|
|
477
|
+
root: re,
|
|
478
|
+
bordered: ie,
|
|
479
|
+
shadowNone: ae,
|
|
480
|
+
shadowSm: oe,
|
|
481
|
+
shadowMd: se,
|
|
460
482
|
"borderColor-main": "_borderColor-main_1k781_25",
|
|
461
483
|
"borderColor-subtle": "_borderColor-subtle_1k781_28",
|
|
462
484
|
"borderColor-danger": "_borderColor-danger_1k781_31",
|
|
@@ -469,83 +491,83 @@ var h = {
|
|
|
469
491
|
"backgroundColor-success-subtle": "_backgroundColor-success-subtle_1k781_54",
|
|
470
492
|
"backgroundColor-warning-subtle": "_backgroundColor-warning-subtle_1k781_57",
|
|
471
493
|
"backgroundColor-info-subtle": "_backgroundColor-info-subtle_1k781_60",
|
|
472
|
-
pNone:
|
|
473
|
-
pSm:
|
|
474
|
-
pMd:
|
|
475
|
-
pLg:
|
|
476
|
-
header:
|
|
477
|
-
title:
|
|
478
|
-
subtitle:
|
|
479
|
-
content:
|
|
480
|
-
footer:
|
|
481
|
-
},
|
|
494
|
+
pNone: ce,
|
|
495
|
+
pSm: le,
|
|
496
|
+
pMd: ue,
|
|
497
|
+
pLg: de,
|
|
498
|
+
header: fe,
|
|
499
|
+
title: pe,
|
|
500
|
+
subtitle: me,
|
|
501
|
+
content: he,
|
|
502
|
+
footer: ge
|
|
503
|
+
}, _e = ({ padding: e = "md", shadow: t = "sm", bordered: n = !0, borderColor: r, backgroundColor: i, className: a, children: o, ...s }) => {
|
|
482
504
|
let c = {
|
|
483
|
-
none:
|
|
484
|
-
sm:
|
|
485
|
-
md:
|
|
486
|
-
lg:
|
|
505
|
+
none: L.pNone,
|
|
506
|
+
sm: L.pSm,
|
|
507
|
+
md: L.pMd,
|
|
508
|
+
lg: L.pLg
|
|
487
509
|
}[e], l = {
|
|
488
|
-
none:
|
|
489
|
-
sm:
|
|
490
|
-
md:
|
|
510
|
+
none: L.shadowNone,
|
|
511
|
+
sm: L.shadowSm,
|
|
512
|
+
md: L.shadowMd
|
|
491
513
|
}[t];
|
|
492
514
|
return /* @__PURE__ */ u("div", {
|
|
493
|
-
className:
|
|
515
|
+
className: (0, x.default)(L.root, c, l, n && L.bordered, r && L[`borderColor-${r}`], i && L[`backgroundColor-${i}`], a),
|
|
494
516
|
...s,
|
|
495
517
|
children: o
|
|
496
518
|
});
|
|
497
|
-
},
|
|
498
|
-
className:
|
|
519
|
+
}, ve = ({ title: e, subtitle: t, className: n, children: r, ...i }) => /* @__PURE__ */ d("div", {
|
|
520
|
+
className: (0, x.default)(L.header, n),
|
|
499
521
|
...i,
|
|
500
522
|
children: [
|
|
501
523
|
e && /* @__PURE__ */ u("h3", {
|
|
502
|
-
className:
|
|
524
|
+
className: L.title,
|
|
503
525
|
children: e
|
|
504
526
|
}),
|
|
505
527
|
t && /* @__PURE__ */ u("p", {
|
|
506
|
-
className:
|
|
528
|
+
className: L.subtitle,
|
|
507
529
|
children: t
|
|
508
530
|
}),
|
|
509
531
|
r
|
|
510
532
|
]
|
|
511
|
-
}),
|
|
512
|
-
className:
|
|
533
|
+
}), ye = ({ className: e, children: t, ...n }) => /* @__PURE__ */ u("div", {
|
|
534
|
+
className: (0, x.default)(L.content, e),
|
|
513
535
|
...n,
|
|
514
536
|
children: t
|
|
515
|
-
}),
|
|
516
|
-
className:
|
|
537
|
+
}), be = ({ className: e, children: t, ...n }) => /* @__PURE__ */ u("div", {
|
|
538
|
+
className: (0, x.default)(L.footer, e),
|
|
517
539
|
...n,
|
|
518
540
|
children: t
|
|
519
|
-
}),
|
|
520
|
-
wrapper: "
|
|
521
|
-
container: "
|
|
522
|
-
disabled: "
|
|
523
|
-
input: "
|
|
524
|
-
control: "
|
|
525
|
-
checkmark: "
|
|
526
|
-
label: "
|
|
527
|
-
error: "
|
|
528
|
-
helperText: "
|
|
529
|
-
errorText: "
|
|
530
|
-
},
|
|
541
|
+
}), R = {
|
|
542
|
+
wrapper: "_wrapper_2le1f_1",
|
|
543
|
+
container: "_container_2le1f_8",
|
|
544
|
+
disabled: "_disabled_2le1f_16",
|
|
545
|
+
input: "_input_2le1f_21",
|
|
546
|
+
control: "_control_2le1f_29",
|
|
547
|
+
checkmark: "_checkmark_2le1f_58",
|
|
548
|
+
label: "_label_2le1f_69",
|
|
549
|
+
error: "_error_2le1f_76",
|
|
550
|
+
helperText: "_helperText_2le1f_80",
|
|
551
|
+
errorText: "_errorText_2le1f_87"
|
|
552
|
+
}, xe = ({ label: e, error: t, helperText: n, className: r, disabled: i, id: o, ...s }) => {
|
|
531
553
|
let c = a(), l = o ?? `ds-checkbox-${c}`, f = n ? `${l}-help` : void 0;
|
|
532
554
|
return /* @__PURE__ */ d("div", {
|
|
533
|
-
className:
|
|
555
|
+
className: (0, x.default)(R.wrapper, r),
|
|
534
556
|
children: [/* @__PURE__ */ d("label", {
|
|
535
557
|
htmlFor: l,
|
|
536
|
-
className:
|
|
558
|
+
className: (0, x.default)(R.container, i && R.disabled, t && R.error),
|
|
537
559
|
children: [
|
|
538
560
|
/* @__PURE__ */ u("input", {
|
|
539
561
|
type: "checkbox",
|
|
540
562
|
id: l,
|
|
541
563
|
disabled: i,
|
|
542
|
-
className:
|
|
564
|
+
className: R.input,
|
|
543
565
|
"aria-describedby": f,
|
|
544
566
|
"aria-invalid": t || void 0,
|
|
545
567
|
...s
|
|
546
568
|
}),
|
|
547
569
|
/* @__PURE__ */ u("span", {
|
|
548
|
-
className:
|
|
570
|
+
className: R.control,
|
|
549
571
|
children: /* @__PURE__ */ u("svg", {
|
|
550
572
|
viewBox: "0 0 24 24",
|
|
551
573
|
fill: "none",
|
|
@@ -553,124 +575,124 @@ var h = {
|
|
|
553
575
|
strokeWidth: "4",
|
|
554
576
|
strokeLinecap: "round",
|
|
555
577
|
strokeLinejoin: "round",
|
|
556
|
-
className:
|
|
578
|
+
className: R.checkmark,
|
|
557
579
|
children: /* @__PURE__ */ u("polyline", { points: "20 6 9 17 4 12" })
|
|
558
580
|
})
|
|
559
581
|
}),
|
|
560
582
|
e && /* @__PURE__ */ u("span", {
|
|
561
|
-
className:
|
|
583
|
+
className: R.label,
|
|
562
584
|
children: e
|
|
563
585
|
})
|
|
564
586
|
]
|
|
565
587
|
}), n && /* @__PURE__ */ u("span", {
|
|
566
588
|
id: f,
|
|
567
|
-
className:
|
|
589
|
+
className: (0, x.default)(R.helperText, t && R.errorText),
|
|
568
590
|
children: n
|
|
569
591
|
})]
|
|
570
592
|
});
|
|
571
|
-
},
|
|
572
|
-
wrapper: "
|
|
573
|
-
fullWidth: "
|
|
574
|
-
label: "
|
|
575
|
-
container: "
|
|
576
|
-
trigger: "
|
|
577
|
-
error: "
|
|
578
|
-
sm: "
|
|
579
|
-
lg: "
|
|
580
|
-
icon: "
|
|
581
|
-
isOpen: "
|
|
582
|
-
menu: "
|
|
583
|
-
option: "
|
|
584
|
-
optionFocused: "
|
|
585
|
-
optionSelected: "
|
|
586
|
-
optionDisabled: "
|
|
587
|
-
optionLabel: "
|
|
588
|
-
optionDescription: "
|
|
589
|
-
helperText: "
|
|
590
|
-
errorText: "
|
|
591
|
-
},
|
|
592
|
-
let
|
|
593
|
-
if (!
|
|
593
|
+
}, z = {
|
|
594
|
+
wrapper: "_wrapper_ei4w8_1",
|
|
595
|
+
fullWidth: "_fullWidth_ei4w8_9",
|
|
596
|
+
label: "_label_ei4w8_13",
|
|
597
|
+
container: "_container_ei4w8_19",
|
|
598
|
+
trigger: "_trigger_ei4w8_23",
|
|
599
|
+
error: "_error_ei4w8_55",
|
|
600
|
+
sm: "_sm_ei4w8_59",
|
|
601
|
+
lg: "_lg_ei4w8_64",
|
|
602
|
+
icon: "_icon_ei4w8_69",
|
|
603
|
+
isOpen: "_isOpen_ei4w8_75",
|
|
604
|
+
menu: "_menu_ei4w8_79",
|
|
605
|
+
option: "_option_ei4w8_96",
|
|
606
|
+
optionFocused: "_optionFocused_ei4w8_105",
|
|
607
|
+
optionSelected: "_optionSelected_ei4w8_109",
|
|
608
|
+
optionDisabled: "_optionDisabled_ei4w8_119",
|
|
609
|
+
optionLabel: "_optionLabel_ei4w8_125",
|
|
610
|
+
optionDescription: "_optionDescription_ei4w8_129",
|
|
611
|
+
helperText: "_helperText_ei4w8_134",
|
|
612
|
+
errorText: "_errorText_ei4w8_139"
|
|
613
|
+
}, Se = ({ options: e, value: t, defaultValue: n, onChange: r, placeholder: o = "Select an option", label: l, helperText: f, error: p, disabled: m, size: h = "md", className: g, id: _, fullWidth: v = !1 }) => {
|
|
614
|
+
let y = a(), b = _ ?? `ds-dropdown-${y}`, S = f ? `${b}-help` : void 0, [C, w] = c(!1), [ee, T] = c(n), [E, D] = c(-1), O = s(null), k = s(null), A = t === void 0 ? ee : t, j = e.find((e) => e.value === A), M = E >= 0 ? `${b}-opt-${E}` : void 0, N = () => {
|
|
615
|
+
if (!m) {
|
|
594
616
|
let t = !C;
|
|
595
617
|
if (w(t), t) {
|
|
596
|
-
if (
|
|
618
|
+
if (E === -1) {
|
|
597
619
|
let t = e.findIndex((e) => e.value === A);
|
|
598
|
-
|
|
620
|
+
D(t >= 0 ? t : 0);
|
|
599
621
|
}
|
|
600
|
-
} else
|
|
622
|
+
} else D(-1);
|
|
601
623
|
}
|
|
602
|
-
},
|
|
603
|
-
e.disabled || (t === void 0 &&
|
|
624
|
+
}, P = (e, n) => {
|
|
625
|
+
e.disabled || (t === void 0 && T(e.value), r?.(e.value), w(!1), D(n), k.current?.focus());
|
|
604
626
|
};
|
|
605
627
|
return i(() => {
|
|
606
|
-
C &&
|
|
628
|
+
C && E >= 0 && document.getElementById(`${b}-opt-${E}`)?.scrollIntoView({ block: "nearest" });
|
|
607
629
|
}, [
|
|
608
|
-
|
|
630
|
+
E,
|
|
609
631
|
C,
|
|
610
|
-
|
|
632
|
+
b
|
|
611
633
|
]), i(() => {
|
|
612
634
|
let e = (e) => {
|
|
613
|
-
|
|
635
|
+
O.current && !O.current.contains(e.target) && (w(!1), D(-1));
|
|
614
636
|
};
|
|
615
637
|
return document.addEventListener("mousedown", e), () => {
|
|
616
638
|
document.removeEventListener("mousedown", e);
|
|
617
639
|
};
|
|
618
640
|
}, []), /* @__PURE__ */ d("div", {
|
|
619
|
-
className:
|
|
620
|
-
ref:
|
|
641
|
+
className: (0, x.default)(z.wrapper, z[h], v && z.fullWidth, p && z.error, g),
|
|
642
|
+
ref: O,
|
|
621
643
|
children: [
|
|
622
644
|
l && /* @__PURE__ */ u("label", {
|
|
623
|
-
htmlFor:
|
|
624
|
-
className:
|
|
645
|
+
htmlFor: b,
|
|
646
|
+
className: z.label,
|
|
625
647
|
children: l
|
|
626
648
|
}),
|
|
627
649
|
/* @__PURE__ */ d("div", {
|
|
628
|
-
className:
|
|
650
|
+
className: z.container,
|
|
629
651
|
children: [/* @__PURE__ */ d("button", {
|
|
630
|
-
id:
|
|
652
|
+
id: b,
|
|
631
653
|
ref: k,
|
|
632
654
|
type: "button",
|
|
633
|
-
className:
|
|
634
|
-
onClick:
|
|
655
|
+
className: (0, x.default)(z.trigger, C && z.isOpen),
|
|
656
|
+
onClick: N,
|
|
635
657
|
onKeyDown: (t) => {
|
|
636
|
-
if (!
|
|
658
|
+
if (!m) switch (t.key) {
|
|
637
659
|
case "ArrowDown":
|
|
638
|
-
t.preventDefault(), C ?
|
|
660
|
+
t.preventDefault(), C ? D((t) => t < e.length - 1 ? t + 1 : t) : (w(!0), D(e.findIndex((e) => e.value === A) || 0));
|
|
639
661
|
break;
|
|
640
662
|
case "ArrowUp":
|
|
641
|
-
t.preventDefault(), C ?
|
|
663
|
+
t.preventDefault(), C ? D((e) => e > 0 ? e - 1 : e) : (w(!0), D(e.findIndex((e) => e.value === A) || e.length - 1));
|
|
642
664
|
break;
|
|
643
665
|
case "Enter":
|
|
644
666
|
case " ":
|
|
645
|
-
t.preventDefault(), C ?
|
|
667
|
+
t.preventDefault(), C ? E >= 0 && P(e[E], E) : (w(!0), D(e.findIndex((e) => e.value === A) || 0));
|
|
646
668
|
break;
|
|
647
669
|
case "Escape":
|
|
648
|
-
C && (t.preventDefault(), w(!1),
|
|
670
|
+
C && (t.preventDefault(), w(!1), D(-1), k.current?.focus());
|
|
649
671
|
break;
|
|
650
672
|
case "Tab":
|
|
651
|
-
C && (w(!1),
|
|
673
|
+
C && (w(!1), D(-1));
|
|
652
674
|
break;
|
|
653
675
|
case "Home":
|
|
654
|
-
C && (t.preventDefault(),
|
|
676
|
+
C && (t.preventDefault(), D(0));
|
|
655
677
|
break;
|
|
656
678
|
case "End":
|
|
657
|
-
C && (t.preventDefault(),
|
|
679
|
+
C && (t.preventDefault(), D(e.length - 1));
|
|
658
680
|
break;
|
|
659
681
|
default: break;
|
|
660
682
|
}
|
|
661
683
|
},
|
|
662
|
-
disabled:
|
|
684
|
+
disabled: m,
|
|
663
685
|
"aria-haspopup": "listbox",
|
|
664
686
|
"aria-expanded": C,
|
|
665
687
|
"aria-describedby": S,
|
|
666
688
|
"aria-invalid": p || void 0,
|
|
667
|
-
"aria-controls": C ? `${
|
|
689
|
+
"aria-controls": C ? `${b}-menu` : void 0,
|
|
668
690
|
"aria-activedescendant": C ? M : void 0,
|
|
669
691
|
children: [/* @__PURE__ */ u("span", {
|
|
670
|
-
className:
|
|
692
|
+
className: z.selectedLabel,
|
|
671
693
|
children: j ? j.label : o
|
|
672
694
|
}), /* @__PURE__ */ u("span", {
|
|
673
|
-
className:
|
|
695
|
+
className: z.icon,
|
|
674
696
|
"aria-hidden": "true",
|
|
675
697
|
children: /* @__PURE__ */ u("svg", {
|
|
676
698
|
width: "12",
|
|
@@ -688,24 +710,24 @@ var h = {
|
|
|
688
710
|
})
|
|
689
711
|
})]
|
|
690
712
|
}), C && /* @__PURE__ */ u("ul", {
|
|
691
|
-
id: `${
|
|
692
|
-
className:
|
|
713
|
+
id: `${b}-menu`,
|
|
714
|
+
className: z.menu,
|
|
693
715
|
role: "listbox",
|
|
694
|
-
"aria-labelledby": l ? void 0 :
|
|
716
|
+
"aria-labelledby": l ? void 0 : b,
|
|
695
717
|
children: e.map((e, t) => {
|
|
696
|
-
let n = e.value === A, r = t ===
|
|
718
|
+
let n = e.value === A, r = t === E;
|
|
697
719
|
return /* @__PURE__ */ d("li", {
|
|
698
|
-
id: `${
|
|
720
|
+
id: `${b}-opt-${t}`,
|
|
699
721
|
role: "option",
|
|
700
722
|
"aria-selected": n,
|
|
701
|
-
className:
|
|
702
|
-
onClick: () =>
|
|
703
|
-
onMouseEnter: () => !e.disabled &&
|
|
723
|
+
className: (0, x.default)(z.option, n && z.optionSelected, r && z.optionFocused, e.disabled && z.optionDisabled),
|
|
724
|
+
onClick: () => P(e, t),
|
|
725
|
+
onMouseEnter: () => !e.disabled && D(t),
|
|
704
726
|
children: [/* @__PURE__ */ u("span", {
|
|
705
|
-
className:
|
|
727
|
+
className: z.optionLabel,
|
|
706
728
|
children: e.label
|
|
707
729
|
}), e.description && /* @__PURE__ */ u("span", {
|
|
708
|
-
className:
|
|
730
|
+
className: z.optionDescription,
|
|
709
731
|
children: e.description
|
|
710
732
|
})]
|
|
711
733
|
}, e.value);
|
|
@@ -714,35 +736,35 @@ var h = {
|
|
|
714
736
|
}),
|
|
715
737
|
f && /* @__PURE__ */ u("span", {
|
|
716
738
|
id: S,
|
|
717
|
-
className:
|
|
739
|
+
className: (0, x.default)(z.helperText, p && z.errorText),
|
|
718
740
|
children: f
|
|
719
741
|
})
|
|
720
742
|
]
|
|
721
743
|
});
|
|
722
|
-
},
|
|
744
|
+
}, Ce = {
|
|
723
745
|
root: "_root_1one2_1",
|
|
724
746
|
horizontal: "_horizontal_1one2_13",
|
|
725
747
|
vertical: "_vertical_1one2_21"
|
|
726
|
-
},
|
|
748
|
+
}, we = (e) => typeof e == "number" ? `${e}px` : e, Te = ({ orientation: e = "horizontal", thickness: t, length: n, spacing: r, inset: i, className: a, style: o, ...s }) => {
|
|
727
749
|
let c = {
|
|
728
750
|
...o,
|
|
729
|
-
"--divider-thickness":
|
|
730
|
-
"--divider-length":
|
|
731
|
-
"--divider-spacing":
|
|
732
|
-
"--divider-inset":
|
|
751
|
+
"--divider-thickness": we(t),
|
|
752
|
+
"--divider-length": we(n),
|
|
753
|
+
"--divider-spacing": we(r),
|
|
754
|
+
"--divider-inset": we(i)
|
|
733
755
|
};
|
|
734
756
|
return e === "vertical" ? /* @__PURE__ */ u("div", {
|
|
735
757
|
role: "separator",
|
|
736
758
|
"aria-orientation": "vertical",
|
|
737
|
-
className:
|
|
759
|
+
className: (0, x.default)(Ce.root, Ce.vertical, a),
|
|
738
760
|
style: c,
|
|
739
761
|
...s
|
|
740
762
|
}) : /* @__PURE__ */ u("hr", {
|
|
741
|
-
className:
|
|
763
|
+
className: (0, x.default)(Ce.root, Ce.horizontal, a),
|
|
742
764
|
style: c,
|
|
743
765
|
...s
|
|
744
766
|
});
|
|
745
|
-
},
|
|
767
|
+
}, B = {
|
|
746
768
|
root: "_root_1ujj3_1",
|
|
747
769
|
container: "_container_1ujj3_8",
|
|
748
770
|
sideContainer: "_sideContainer_1ujj3_18",
|
|
@@ -751,46 +773,46 @@ var h = {
|
|
|
751
773
|
actions: "_actions_1ujj3_32",
|
|
752
774
|
title: "_title_1ujj3_44",
|
|
753
775
|
welcome: "_welcome_1ujj3_52"
|
|
754
|
-
},
|
|
776
|
+
}, Ee = ({ id: e, logo: t, title: n, user: r, onLogin: i, onLogout: a, onCreateAccount: o, className: s, maxWidth: c }) => {
|
|
755
777
|
let l = {
|
|
756
778
|
size: "sm",
|
|
757
779
|
intent: "info"
|
|
758
780
|
};
|
|
759
781
|
return /* @__PURE__ */ u("header", {
|
|
760
782
|
id: e,
|
|
761
|
-
className:
|
|
783
|
+
className: (0, x.default)(B.root, s),
|
|
762
784
|
children: /* @__PURE__ */ d("div", {
|
|
763
|
-
className:
|
|
785
|
+
className: B.container,
|
|
764
786
|
style: { maxWidth: c },
|
|
765
787
|
children: [/* @__PURE__ */ d("div", {
|
|
766
|
-
className:
|
|
788
|
+
className: (0, x.default)(B.sideContainer, B.leftSide),
|
|
767
789
|
children: [t, n ? /* @__PURE__ */ u("h1", {
|
|
768
|
-
className:
|
|
790
|
+
className: B.title,
|
|
769
791
|
children: n
|
|
770
792
|
}) : null]
|
|
771
793
|
}), /* @__PURE__ */ u("div", {
|
|
772
|
-
className:
|
|
794
|
+
className: (0, x.default)(B.sideContainer, B.rightSide),
|
|
773
795
|
children: r ? /* @__PURE__ */ d("div", {
|
|
774
|
-
className:
|
|
796
|
+
className: B.actions,
|
|
775
797
|
children: [/* @__PURE__ */ d("span", {
|
|
776
|
-
className:
|
|
798
|
+
className: B.welcome,
|
|
777
799
|
children: [
|
|
778
800
|
"Welcome, ",
|
|
779
801
|
/* @__PURE__ */ u("strong", { children: r.name }),
|
|
780
802
|
"!"
|
|
781
803
|
]
|
|
782
|
-
}), /* @__PURE__ */ u(
|
|
804
|
+
}), /* @__PURE__ */ u(I, {
|
|
783
805
|
...l,
|
|
784
806
|
onClick: a,
|
|
785
807
|
children: "Log out"
|
|
786
808
|
})]
|
|
787
809
|
}) : /* @__PURE__ */ d("div", {
|
|
788
|
-
className:
|
|
789
|
-
children: [i ? /* @__PURE__ */ u(
|
|
810
|
+
className: B.actions,
|
|
811
|
+
children: [i ? /* @__PURE__ */ u(I, {
|
|
790
812
|
...l,
|
|
791
813
|
onClick: i,
|
|
792
814
|
children: "Log in"
|
|
793
|
-
}) : null, o ? /* @__PURE__ */ u(
|
|
815
|
+
}) : null, o ? /* @__PURE__ */ u(I, {
|
|
794
816
|
size: "sm",
|
|
795
817
|
intent: "info",
|
|
796
818
|
variant: "solid",
|
|
@@ -801,7 +823,7 @@ var h = {
|
|
|
801
823
|
})]
|
|
802
824
|
})
|
|
803
825
|
});
|
|
804
|
-
},
|
|
826
|
+
}, V = {
|
|
805
827
|
root: "_root_1eu6u_1",
|
|
806
828
|
container: "_container_1eu6u_7",
|
|
807
829
|
leftSection: "_leftSection_1eu6u_16",
|
|
@@ -812,26 +834,26 @@ var h = {
|
|
|
812
834
|
disabled: "_disabled_1eu6u_59",
|
|
813
835
|
active: "_active_1eu6u_63",
|
|
814
836
|
rightSection: "_rightSection_1eu6u_73"
|
|
815
|
-
},
|
|
837
|
+
}, De = ({ id: e, items: t, activeId: n, logo: r, actions: i, onItemClick: a, className: o, maxWidth: s }) => /* @__PURE__ */ u("nav", {
|
|
816
838
|
id: e,
|
|
817
|
-
className:
|
|
839
|
+
className: (0, x.default)(V.root, o),
|
|
818
840
|
children: /* @__PURE__ */ d("div", {
|
|
819
|
-
className:
|
|
841
|
+
className: V.container,
|
|
820
842
|
style: { maxWidth: s },
|
|
821
843
|
children: [
|
|
822
844
|
r && /* @__PURE__ */ u("div", {
|
|
823
|
-
className:
|
|
845
|
+
className: V.leftSection,
|
|
824
846
|
children: r
|
|
825
847
|
}),
|
|
826
848
|
/* @__PURE__ */ u("div", {
|
|
827
|
-
className:
|
|
849
|
+
className: V.nav,
|
|
828
850
|
children: /* @__PURE__ */ u("ul", {
|
|
829
|
-
className:
|
|
851
|
+
className: V.navList,
|
|
830
852
|
children: t.map((e) => /* @__PURE__ */ u("li", {
|
|
831
|
-
className:
|
|
853
|
+
className: V.navItem,
|
|
832
854
|
children: /* @__PURE__ */ u("button", {
|
|
833
855
|
type: "button",
|
|
834
|
-
className:
|
|
856
|
+
className: (0, x.default)(V.navLink, n === e.id && V.active, e.disabled && V.disabled),
|
|
835
857
|
onClick: () => !e.disabled && a?.(e.id),
|
|
836
858
|
disabled: e.disabled,
|
|
837
859
|
"aria-current": n === e.id ? "page" : void 0,
|
|
@@ -841,12 +863,12 @@ var h = {
|
|
|
841
863
|
})
|
|
842
864
|
}),
|
|
843
865
|
i && /* @__PURE__ */ u("div", {
|
|
844
|
-
className:
|
|
866
|
+
className: V.rightSection,
|
|
845
867
|
children: i
|
|
846
868
|
})
|
|
847
869
|
]
|
|
848
870
|
})
|
|
849
|
-
}),
|
|
871
|
+
}), H = {
|
|
850
872
|
wrapper: "_wrapper_15ibj_1",
|
|
851
873
|
fullWidth: "_fullWidth_15ibj_8",
|
|
852
874
|
label: "_label_15ibj_13",
|
|
@@ -857,31 +879,31 @@ var h = {
|
|
|
857
879
|
error: "_error_15ibj_79",
|
|
858
880
|
helperText: "_helperText_15ibj_88",
|
|
859
881
|
errorText: "_errorText_15ibj_94"
|
|
860
|
-
},
|
|
882
|
+
}, Oe = ({ size: e = "md", error: t, label: n, helperText: r, fullWidth: i = !1, className: o, id: s, ...c }) => {
|
|
861
883
|
let l = a(), f = s ?? `ds-input-${l}`, p = r ? `${f}-help` : void 0;
|
|
862
884
|
return /* @__PURE__ */ d("div", {
|
|
863
|
-
className:
|
|
885
|
+
className: (0, x.default)(H.wrapper, i && H.fullWidth, o),
|
|
864
886
|
children: [
|
|
865
887
|
n && /* @__PURE__ */ u("label", {
|
|
866
888
|
htmlFor: f,
|
|
867
|
-
className:
|
|
889
|
+
className: H.label,
|
|
868
890
|
children: n
|
|
869
891
|
}),
|
|
870
892
|
/* @__PURE__ */ u("input", {
|
|
871
893
|
id: f,
|
|
872
|
-
className:
|
|
894
|
+
className: (0, x.default)(H.inputRoot, H[e], t && H.error),
|
|
873
895
|
"aria-describedby": p,
|
|
874
896
|
"aria-invalid": t || void 0,
|
|
875
897
|
...c
|
|
876
898
|
}),
|
|
877
899
|
r && /* @__PURE__ */ u("span", {
|
|
878
900
|
id: p,
|
|
879
|
-
className:
|
|
901
|
+
className: (0, x.default)(H.helperText, t && H.errorText),
|
|
880
902
|
children: r
|
|
881
903
|
})
|
|
882
904
|
]
|
|
883
905
|
});
|
|
884
|
-
},
|
|
906
|
+
}, ke = {
|
|
885
907
|
loader: "_loader_wvz8q_1",
|
|
886
908
|
spin: "_spin_wvz8q_1",
|
|
887
909
|
neutral: "_neutral_wvz8q_10",
|
|
@@ -892,16 +914,16 @@ var h = {
|
|
|
892
914
|
sm: "_sm_wvz8q_27",
|
|
893
915
|
md: "_md_wvz8q_33",
|
|
894
916
|
lg: "_lg_wvz8q_39"
|
|
895
|
-
},
|
|
917
|
+
}, Ae = ({ id: e, size: t = "md", intent: n = "neutral", className: r }) => /* @__PURE__ */ u("div", {
|
|
896
918
|
id: e,
|
|
897
|
-
className:
|
|
919
|
+
className: (0, x.default)(ke.loader, ke[t], ke[n], r),
|
|
898
920
|
role: "status",
|
|
899
921
|
"aria-label": "Loading"
|
|
900
|
-
}),
|
|
901
|
-
root:
|
|
902
|
-
unordered:
|
|
903
|
-
ordered:
|
|
904
|
-
none:
|
|
922
|
+
}), je = "_root_16t5p_1", Me = "_unordered_16t5p_6", Ne = "_ordered_16t5p_11", Pe = "_none_16t5p_16", Fe = "_flex_16t5p_57", U = {
|
|
923
|
+
root: je,
|
|
924
|
+
unordered: Me,
|
|
925
|
+
ordered: Ne,
|
|
926
|
+
none: Pe,
|
|
905
927
|
"gap-0": "_gap-0_16t5p_21",
|
|
906
928
|
"gap-1": "_gap-1_16t5p_24",
|
|
907
929
|
"gap-2": "_gap-2_16t5p_27",
|
|
@@ -913,36 +935,36 @@ var h = {
|
|
|
913
935
|
"gap-10": "_gap-10_16t5p_45",
|
|
914
936
|
"gap-12": "_gap-12_16t5p_48",
|
|
915
937
|
"gap-14": "_gap-14_16t5p_51",
|
|
916
|
-
flex:
|
|
917
|
-
},
|
|
938
|
+
flex: Fe
|
|
939
|
+
}, Ie = {
|
|
918
940
|
item: "_item_1x04p_1",
|
|
919
941
|
iconWrapper: "_iconWrapper_1x04p_6"
|
|
920
|
-
},
|
|
921
|
-
className:
|
|
942
|
+
}, Le = ({ children: e, icon: t, className: n, ...r }) => /* @__PURE__ */ d("li", {
|
|
943
|
+
className: (0, x.default)(Ie.item, n),
|
|
922
944
|
...r,
|
|
923
945
|
children: [t && /* @__PURE__ */ u("span", {
|
|
924
|
-
className:
|
|
946
|
+
className: Ie.iconWrapper,
|
|
925
947
|
children: t
|
|
926
948
|
}), /* @__PURE__ */ u("div", {
|
|
927
|
-
className:
|
|
949
|
+
className: Ie.content,
|
|
928
950
|
children: e
|
|
929
951
|
})]
|
|
930
|
-
}),
|
|
952
|
+
}), Re = ({ children: e, variant: t = "unordered", spacing: n = 0, className: r, margin: i, marginX: a, marginY: o, marginTop: s, marginBottom: c, marginLeft: l, marginRight: d, padding: f, paddingX: p, paddingY: m, paddingTop: h, paddingBottom: g, paddingLeft: _, paddingRight: v, style: y, ...b }) => {
|
|
931
953
|
let S = t === "ordered" ? "ol" : "ul", C = {
|
|
932
|
-
...
|
|
933
|
-
...
|
|
934
|
-
...
|
|
954
|
+
...y,
|
|
955
|
+
...M("padding", f, p, m, h, g, _, v),
|
|
956
|
+
...M("margin", i, a, o, s, c, l, d),
|
|
935
957
|
"--list-spacing": typeof n == "number" ? `${n * .25}rem` : n
|
|
936
958
|
};
|
|
937
959
|
return /* @__PURE__ */ u(S, {
|
|
938
|
-
className:
|
|
960
|
+
className: (0, x.default)(U.root, U[t], typeof n == "number" && U[`gap-${n}`], (t === "none" || typeof n == "number" && n > 0 || typeof n == "string") && U.flex, typeof f == "number" && U[`p-${f}`], typeof p == "number" && U[`px-${p}`], typeof m == "number" && U[`py-${m}`], typeof h == "number" && U[`pt-${h}`], typeof g == "number" && U[`pb-${g}`], typeof _ == "number" && U[`pl-${_}`], typeof v == "number" && U[`pr-${v}`], typeof i == "number" && U[`margin-${i}`], typeof a == "number" && U[`marginX-${a}`], typeof o == "number" && U[`marginY-${o}`], typeof s == "number" && U[`marginTop-${s}`], typeof c == "number" && U[`marginBottom-${c}`], typeof l == "number" && U[`marginLeft-${l}`], typeof d == "number" && U[`marginRight-${d}`], r),
|
|
939
961
|
style: C,
|
|
940
|
-
...
|
|
962
|
+
...b,
|
|
941
963
|
children: e
|
|
942
964
|
});
|
|
943
965
|
};
|
|
944
|
-
|
|
945
|
-
var
|
|
966
|
+
Re.Item = Le;
|
|
967
|
+
var W = {
|
|
946
968
|
overlay: "_overlay_ay3tu_1",
|
|
947
969
|
modal: "_modal_ay3tu_15",
|
|
948
970
|
header: "_header_ay3tu_27",
|
|
@@ -956,50 +978,50 @@ var U = {
|
|
|
956
978
|
xl: "_xl_ay3tu_81",
|
|
957
979
|
full: "_full_ay3tu_84",
|
|
958
980
|
loading: "_loading_ay3tu_89"
|
|
959
|
-
},
|
|
960
|
-
let
|
|
981
|
+
}, ze = ({ isOpen: e, onClose: t, title: n, children: r, footer: o, size: c = "md", isLoading: l = !1, className: p, id: m }) => {
|
|
982
|
+
let h = s(null), g = s(null), _ = s(t), v = a(), y = m ?? `ds-modal-${v}`, b = `${y}-title`;
|
|
961
983
|
return i(() => {
|
|
962
|
-
|
|
984
|
+
_.current = t;
|
|
963
985
|
}, [t]), i(() => {
|
|
964
986
|
let t = (e) => {
|
|
965
987
|
if (e.key === "Escape" && !l) {
|
|
966
|
-
|
|
988
|
+
_.current();
|
|
967
989
|
return;
|
|
968
990
|
}
|
|
969
|
-
if (e.key === "Tab" &&
|
|
970
|
-
let t =
|
|
991
|
+
if (e.key === "Tab" && h.current) {
|
|
992
|
+
let t = h.current.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])"), n = t[0], r = t[t.length - 1];
|
|
971
993
|
e.shiftKey ? document.activeElement === n && (r.focus(), e.preventDefault()) : document.activeElement === r && (n.focus(), e.preventDefault());
|
|
972
994
|
}
|
|
973
995
|
};
|
|
974
|
-
return e && (
|
|
975
|
-
let e =
|
|
996
|
+
return e && (g.current = document.activeElement, document.body.style.overflow = "hidden", window.addEventListener("keydown", t), requestAnimationFrame(() => {
|
|
997
|
+
let e = h.current?.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])");
|
|
976
998
|
e && e.length > 0 && e[0].focus();
|
|
977
999
|
})), () => {
|
|
978
|
-
document.body.style.overflow = "unset", window.removeEventListener("keydown", t),
|
|
1000
|
+
document.body.style.overflow = "unset", window.removeEventListener("keydown", t), g.current?.focus();
|
|
979
1001
|
};
|
|
980
1002
|
}, [e, l]), e ? f(/* @__PURE__ */ u("div", {
|
|
981
|
-
className:
|
|
1003
|
+
className: W.overlay,
|
|
982
1004
|
onClick: () => !l && t(),
|
|
983
1005
|
children: /* @__PURE__ */ d("div", {
|
|
984
|
-
id:
|
|
985
|
-
className:
|
|
1006
|
+
id: y,
|
|
1007
|
+
className: (0, x.default)(W.modal, W[c], l && W.loading, p),
|
|
986
1008
|
onClick: (e) => e.stopPropagation(),
|
|
987
1009
|
role: "dialog",
|
|
988
1010
|
"aria-modal": "true",
|
|
989
|
-
"aria-labelledby": n ?
|
|
990
|
-
ref:
|
|
1011
|
+
"aria-labelledby": n ? b : void 0,
|
|
1012
|
+
ref: h,
|
|
991
1013
|
children: [
|
|
992
1014
|
/* @__PURE__ */ d("div", {
|
|
993
|
-
className:
|
|
1015
|
+
className: W.header,
|
|
994
1016
|
children: [n && /* @__PURE__ */ u("h2", {
|
|
995
|
-
id:
|
|
996
|
-
className:
|
|
1017
|
+
id: b,
|
|
1018
|
+
className: W.title,
|
|
997
1019
|
children: n
|
|
998
|
-
}), /* @__PURE__ */ u(
|
|
1020
|
+
}), /* @__PURE__ */ u(I, {
|
|
999
1021
|
variant: "subtle",
|
|
1000
1022
|
size: "sm",
|
|
1001
1023
|
onClick: t,
|
|
1002
|
-
className:
|
|
1024
|
+
className: W.closeButton,
|
|
1003
1025
|
"aria-label": "Close modal",
|
|
1004
1026
|
disabled: l,
|
|
1005
1027
|
children: /* @__PURE__ */ u("svg", {
|
|
@@ -1018,17 +1040,17 @@ var U = {
|
|
|
1018
1040
|
})]
|
|
1019
1041
|
}),
|
|
1020
1042
|
/* @__PURE__ */ u("div", {
|
|
1021
|
-
className:
|
|
1043
|
+
className: W.content,
|
|
1022
1044
|
children: r
|
|
1023
1045
|
}),
|
|
1024
1046
|
o && /* @__PURE__ */ u("div", {
|
|
1025
|
-
className:
|
|
1047
|
+
className: W.footer,
|
|
1026
1048
|
children: o
|
|
1027
1049
|
})
|
|
1028
1050
|
]
|
|
1029
1051
|
})
|
|
1030
1052
|
}), document.body) : null;
|
|
1031
|
-
},
|
|
1053
|
+
}, Be = {
|
|
1032
1054
|
root: "_root_1bwyw_1",
|
|
1033
1055
|
content: "_content_1bwyw_13",
|
|
1034
1056
|
title: "_title_1bwyw_17",
|
|
@@ -1039,24 +1061,24 @@ var U = {
|
|
|
1039
1061
|
success: "_success_1bwyw_56",
|
|
1040
1062
|
warning: "_warning_1bwyw_62",
|
|
1041
1063
|
danger: "_danger_1bwyw_68"
|
|
1042
|
-
},
|
|
1043
|
-
className:
|
|
1064
|
+
}, Ve = ({ intent: e = "neutral", title: t, children: n, onClose: r, className: i, ...a }) => /* @__PURE__ */ d("div", {
|
|
1065
|
+
className: (0, x.default)(Be.root, Be[e], i),
|
|
1044
1066
|
role: "alert",
|
|
1045
1067
|
...a,
|
|
1046
1068
|
children: [/* @__PURE__ */ d("div", {
|
|
1047
|
-
className:
|
|
1069
|
+
className: Be.content,
|
|
1048
1070
|
children: [t && /* @__PURE__ */ u("div", {
|
|
1049
|
-
className:
|
|
1071
|
+
className: Be.title,
|
|
1050
1072
|
children: t
|
|
1051
1073
|
}), /* @__PURE__ */ u("div", {
|
|
1052
|
-
className:
|
|
1074
|
+
className: Be.message,
|
|
1053
1075
|
children: n
|
|
1054
1076
|
})]
|
|
1055
|
-
}), r && /* @__PURE__ */ u(
|
|
1077
|
+
}), r && /* @__PURE__ */ u(I, {
|
|
1056
1078
|
variant: "subtle",
|
|
1057
1079
|
size: "xs",
|
|
1058
1080
|
onClick: r,
|
|
1059
|
-
className:
|
|
1081
|
+
className: Be.closeButton,
|
|
1060
1082
|
"aria-label": "Close notification",
|
|
1061
1083
|
children: /* @__PURE__ */ u("svg", {
|
|
1062
1084
|
width: "10",
|
|
@@ -1072,130 +1094,130 @@ var U = {
|
|
|
1072
1094
|
})
|
|
1073
1095
|
})
|
|
1074
1096
|
})]
|
|
1075
|
-
}),
|
|
1097
|
+
}), G = {
|
|
1076
1098
|
root: "_root_o4mj7_1",
|
|
1077
1099
|
list: "_list_o4mj7_6",
|
|
1078
1100
|
item: "_item_o4mj7_15",
|
|
1079
1101
|
ellipsis: "_ellipsis_o4mj7_19",
|
|
1080
1102
|
pageButton: "_pageButton_o4mj7_29"
|
|
1081
|
-
},
|
|
1103
|
+
}, He = (e, t, n) => Math.min(Math.max(e, t), n), Ue = (e, t) => {
|
|
1082
1104
|
let n = [];
|
|
1083
1105
|
for (let r = e; r <= t; r += 1) n.push(r);
|
|
1084
1106
|
return n;
|
|
1085
|
-
},
|
|
1107
|
+
}, We = (e, t, n, r, i) => {
|
|
1086
1108
|
if (e <= 0) return [];
|
|
1087
|
-
if (!i || e <= n * 2 + 1 + r * 2 + 2) return
|
|
1088
|
-
let a =
|
|
1089
|
-
return l && d.push("ellipsis"), f <= p && d.push(...
|
|
1090
|
-
},
|
|
1091
|
-
let k = a(), A = e ?? `ds-pagination-${k}`, [
|
|
1109
|
+
if (!i || e <= n * 2 + 1 + r * 2 + 2) return Ue(1, e);
|
|
1110
|
+
let a = Ue(1, Math.min(r, e)), o = Ue(Math.max(e - r + 1, r + 1), e), s = Math.max(t - n, r + 2), c = Math.min(t + n, e - r - 1), l = s > r + 2, u = c < e - r - 1, d = [...a], f = l ? s : r + 1, p = u ? c : e - r;
|
|
1111
|
+
return l && d.push("ellipsis"), f <= p && d.push(...Ue(f, p)), u && d.push("ellipsis"), d.push(...o), d;
|
|
1112
|
+
}, Ge = ({ id: e, count: t, page: n, defaultPage: r = 1, onPageChange: i, onFirstClick: s, onLastClick: l, onNextClick: f, onPrevClick: p, siblingCount: m = 1, boundaryCount: h = 1, showFirstLast: g = !0, showPrevNext: _ = !0, showEllipsis: v = !0, disabled: y = !1, size: b = "sm", variant: S = "outline", intent: C = "neutral", activeVariant: w = "solid", activeIntent: ee, labels: T, ariaLabel: E = "Pagination", getPageLabel: D, className: O }) => {
|
|
1113
|
+
let k = a(), A = e ?? `ds-pagination-${k}`, [j, M] = c(r), N = Math.max(0, t), P = He(n ?? j, 1, Math.max(1, N)), te = o(() => We(N, P, m, h, v), [
|
|
1092
1114
|
N,
|
|
1093
1115
|
P,
|
|
1116
|
+
m,
|
|
1094
1117
|
h,
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1118
|
+
v
|
|
1119
|
+
]), ne = (e) => {
|
|
1120
|
+
y || e === P || (n === void 0 && M(e), i?.(e));
|
|
1121
|
+
}, F = () => {
|
|
1122
|
+
ne(1), s?.(1);
|
|
1099
1123
|
}, re = () => {
|
|
1100
|
-
F(1), s?.(1);
|
|
1101
|
-
}, ie = () => {
|
|
1102
1124
|
let e = N;
|
|
1103
|
-
|
|
1104
|
-
},
|
|
1125
|
+
ne(e), l?.(e);
|
|
1126
|
+
}, ie = () => {
|
|
1105
1127
|
let e = Math.max(1, P - 1);
|
|
1106
|
-
|
|
1107
|
-
},
|
|
1128
|
+
ne(e), p?.(e);
|
|
1129
|
+
}, ae = () => {
|
|
1108
1130
|
let e = Math.min(N, P + 1);
|
|
1109
|
-
|
|
1131
|
+
ne(e), f?.(e);
|
|
1110
1132
|
};
|
|
1111
1133
|
return N <= 0 ? null : /* @__PURE__ */ u("nav", {
|
|
1112
1134
|
id: A,
|
|
1113
|
-
"aria-label":
|
|
1114
|
-
className:
|
|
1135
|
+
"aria-label": E,
|
|
1136
|
+
className: (0, x.default)(G.root, O),
|
|
1115
1137
|
children: /* @__PURE__ */ d("ul", {
|
|
1116
|
-
className:
|
|
1138
|
+
className: G.list,
|
|
1117
1139
|
children: [
|
|
1118
|
-
|
|
1119
|
-
className:
|
|
1120
|
-
children: /* @__PURE__ */ u(
|
|
1121
|
-
size:
|
|
1140
|
+
g && /* @__PURE__ */ u("li", {
|
|
1141
|
+
className: G.item,
|
|
1142
|
+
children: /* @__PURE__ */ u(I, {
|
|
1143
|
+
size: b,
|
|
1122
1144
|
variant: S,
|
|
1123
1145
|
intent: C,
|
|
1124
|
-
className:
|
|
1125
|
-
onClick:
|
|
1126
|
-
disabled:
|
|
1146
|
+
className: G.pageButton,
|
|
1147
|
+
onClick: F,
|
|
1148
|
+
disabled: y || P === 1,
|
|
1127
1149
|
"aria-label": "Go to first page",
|
|
1128
|
-
children:
|
|
1150
|
+
children: T?.first ?? "First"
|
|
1129
1151
|
})
|
|
1130
1152
|
}),
|
|
1131
|
-
|
|
1132
|
-
className:
|
|
1133
|
-
children: /* @__PURE__ */ u(
|
|
1134
|
-
size:
|
|
1153
|
+
_ && /* @__PURE__ */ u("li", {
|
|
1154
|
+
className: G.item,
|
|
1155
|
+
children: /* @__PURE__ */ u(I, {
|
|
1156
|
+
size: b,
|
|
1135
1157
|
variant: S,
|
|
1136
1158
|
intent: C,
|
|
1137
|
-
className:
|
|
1138
|
-
onClick:
|
|
1139
|
-
disabled:
|
|
1159
|
+
className: G.pageButton,
|
|
1160
|
+
onClick: ie,
|
|
1161
|
+
disabled: y || P === 1,
|
|
1140
1162
|
"aria-label": "Go to previous page",
|
|
1141
|
-
children:
|
|
1163
|
+
children: T?.prev ?? "Prev"
|
|
1142
1164
|
})
|
|
1143
1165
|
}),
|
|
1144
|
-
|
|
1166
|
+
te.map((e, t) => {
|
|
1145
1167
|
if (e === "ellipsis") return /* @__PURE__ */ u("li", {
|
|
1146
|
-
className:
|
|
1168
|
+
className: G.item,
|
|
1147
1169
|
"aria-hidden": "true",
|
|
1148
1170
|
children: /* @__PURE__ */ u("span", {
|
|
1149
|
-
className:
|
|
1171
|
+
className: G.ellipsis,
|
|
1150
1172
|
children: "…"
|
|
1151
1173
|
})
|
|
1152
1174
|
}, `ellipsis-${t}`);
|
|
1153
|
-
let n = e === P, r =
|
|
1175
|
+
let n = e === P, r = D?.(e, n) ?? `Page ${e}${n ? ", current page" : ""}`;
|
|
1154
1176
|
return /* @__PURE__ */ u("li", {
|
|
1155
|
-
className:
|
|
1156
|
-
children: /* @__PURE__ */ u(
|
|
1157
|
-
size:
|
|
1177
|
+
className: G.item,
|
|
1178
|
+
children: /* @__PURE__ */ u(I, {
|
|
1179
|
+
size: b,
|
|
1158
1180
|
variant: n ? w : S,
|
|
1159
|
-
intent: n ?
|
|
1160
|
-
className:
|
|
1161
|
-
onClick: () =>
|
|
1162
|
-
disabled:
|
|
1181
|
+
intent: n ? ee ?? C : C,
|
|
1182
|
+
className: G.pageButton,
|
|
1183
|
+
onClick: () => ne(e),
|
|
1184
|
+
disabled: y,
|
|
1163
1185
|
"aria-current": n ? "page" : void 0,
|
|
1164
1186
|
"aria-label": r,
|
|
1165
1187
|
children: e
|
|
1166
1188
|
})
|
|
1167
1189
|
}, e);
|
|
1168
1190
|
}),
|
|
1169
|
-
|
|
1170
|
-
className:
|
|
1171
|
-
children: /* @__PURE__ */ u(
|
|
1172
|
-
size:
|
|
1191
|
+
_ && /* @__PURE__ */ u("li", {
|
|
1192
|
+
className: G.item,
|
|
1193
|
+
children: /* @__PURE__ */ u(I, {
|
|
1194
|
+
size: b,
|
|
1173
1195
|
variant: S,
|
|
1174
1196
|
intent: C,
|
|
1175
|
-
className:
|
|
1176
|
-
onClick:
|
|
1177
|
-
disabled:
|
|
1197
|
+
className: G.pageButton,
|
|
1198
|
+
onClick: ae,
|
|
1199
|
+
disabled: y || P === N,
|
|
1178
1200
|
"aria-label": "Go to next page",
|
|
1179
|
-
children:
|
|
1201
|
+
children: T?.next ?? "Next"
|
|
1180
1202
|
})
|
|
1181
1203
|
}),
|
|
1182
|
-
|
|
1183
|
-
className:
|
|
1184
|
-
children: /* @__PURE__ */ u(
|
|
1185
|
-
size:
|
|
1204
|
+
g && /* @__PURE__ */ u("li", {
|
|
1205
|
+
className: G.item,
|
|
1206
|
+
children: /* @__PURE__ */ u(I, {
|
|
1207
|
+
size: b,
|
|
1186
1208
|
variant: S,
|
|
1187
1209
|
intent: C,
|
|
1188
|
-
className:
|
|
1189
|
-
onClick:
|
|
1190
|
-
disabled:
|
|
1210
|
+
className: G.pageButton,
|
|
1211
|
+
onClick: re,
|
|
1212
|
+
disabled: y || P === N,
|
|
1191
1213
|
"aria-label": "Go to last page",
|
|
1192
|
-
children:
|
|
1214
|
+
children: T?.last ?? "Last"
|
|
1193
1215
|
})
|
|
1194
1216
|
})
|
|
1195
1217
|
]
|
|
1196
1218
|
})
|
|
1197
1219
|
});
|
|
1198
|
-
},
|
|
1220
|
+
}, K = {
|
|
1199
1221
|
wrapper: "_wrapper_16yvn_1",
|
|
1200
1222
|
labelWrapper: "_labelWrapper_16yvn_8",
|
|
1201
1223
|
label: "_label_16yvn_8",
|
|
@@ -1209,36 +1231,36 @@ var U = {
|
|
|
1209
1231
|
success: "_success_16yvn_57",
|
|
1210
1232
|
warning: "_warning_16yvn_61",
|
|
1211
1233
|
danger: "_danger_16yvn_65"
|
|
1212
|
-
},
|
|
1213
|
-
let l = a(), f = c ?? `ds-progressbar-${l}`, p = t > 0 ? t : 0,
|
|
1234
|
+
}, Ke = ({ value: e, max: t = 100, size: n = "md", intent: r = "info", showLabel: i = !1, label: o, className: s, id: c }) => {
|
|
1235
|
+
let l = a(), f = c ?? `ds-progressbar-${l}`, p = t > 0 ? t : 0, m = Math.min(Math.max(0, e), p), h = p > 0 ? Math.min(Math.max(0, m / p * 100), 100) : 0, g = o ? `${f}-label` : void 0;
|
|
1214
1236
|
return /* @__PURE__ */ d("div", {
|
|
1215
1237
|
id: f,
|
|
1216
|
-
className:
|
|
1238
|
+
className: (0, x.default)(K.wrapper, K[n], K[r], s),
|
|
1217
1239
|
children: [(o || i) && /* @__PURE__ */ d("div", {
|
|
1218
|
-
className:
|
|
1240
|
+
className: K.labelWrapper,
|
|
1219
1241
|
children: [o && /* @__PURE__ */ u("span", {
|
|
1220
|
-
id:
|
|
1221
|
-
className:
|
|
1242
|
+
id: g,
|
|
1243
|
+
className: K.label,
|
|
1222
1244
|
children: o
|
|
1223
1245
|
}), i && /* @__PURE__ */ d("span", {
|
|
1224
|
-
className:
|
|
1225
|
-
children: [Math.round(
|
|
1246
|
+
className: K.percentage,
|
|
1247
|
+
children: [Math.round(h), "%"]
|
|
1226
1248
|
})]
|
|
1227
1249
|
}), /* @__PURE__ */ u("div", {
|
|
1228
|
-
className:
|
|
1250
|
+
className: K.progressRoot,
|
|
1229
1251
|
role: "progressbar",
|
|
1230
|
-
"aria-valuenow":
|
|
1252
|
+
"aria-valuenow": m,
|
|
1231
1253
|
"aria-valuemin": 0,
|
|
1232
1254
|
"aria-valuemax": t,
|
|
1233
|
-
"aria-labelledby":
|
|
1255
|
+
"aria-labelledby": g,
|
|
1234
1256
|
"aria-label": o ? void 0 : "Progress",
|
|
1235
1257
|
children: /* @__PURE__ */ u("div", {
|
|
1236
|
-
className:
|
|
1237
|
-
style: { width: `${
|
|
1258
|
+
className: K.indicator,
|
|
1259
|
+
style: { width: `${h}%` }
|
|
1238
1260
|
})
|
|
1239
1261
|
})]
|
|
1240
1262
|
});
|
|
1241
|
-
},
|
|
1263
|
+
}, q = {
|
|
1242
1264
|
wrapper: "_wrapper_92sko_1",
|
|
1243
1265
|
fullWidth: "_fullWidth_92sko_8",
|
|
1244
1266
|
header: "_header_92sko_13",
|
|
@@ -1258,143 +1280,143 @@ var U = {
|
|
|
1258
1280
|
inputsRow: "_inputsRow_92sko_179",
|
|
1259
1281
|
singleInputRow: "_singleInputRow_92sko_187",
|
|
1260
1282
|
separator: "_separator_92sko_191"
|
|
1261
|
-
},
|
|
1283
|
+
}, J = (e, t) => {
|
|
1262
1284
|
if (e == null) return t;
|
|
1263
1285
|
let n = typeof e == "number" ? e : Number(e);
|
|
1264
1286
|
return Number.isNaN(n) ? t : n;
|
|
1265
|
-
},
|
|
1287
|
+
}, qe = (e, t, n) => Math.min(Math.max(e, t), n), Je = (e, t, n, r) => qe(r == null || r === "any" || r <= 0 ? e : t + Math.round((e - t) / r) * r, t, n), Ye = (e, t, n) => {
|
|
1266
1288
|
if (Array.isArray(e)) {
|
|
1267
|
-
let r =
|
|
1289
|
+
let r = qe(J(e[0], t), t, n), i = qe(J(e[1], n), t, n);
|
|
1268
1290
|
return r <= i ? [r, i] : [i, r];
|
|
1269
1291
|
}
|
|
1270
|
-
let r =
|
|
1292
|
+
let r = qe(J(e, t), t, n);
|
|
1271
1293
|
return [r, r];
|
|
1272
|
-
},
|
|
1273
|
-
let
|
|
1274
|
-
|
|
1294
|
+
}, Xe = ({ size: e = "md", label: t, helperText: n, fullWidth: r = !1, showValue: i = !1, showInputs: s = !1, className: l, id: f, value: p, defaultValue: m, onValueChange: h, ...g }) => {
|
|
1295
|
+
let _ = a(), v = f ?? `ds-slider-${_}`, y = n ? `${v}-help` : void 0, b = J(g.min, 0), S = J(g.max, 100), C = g.step === "any" ? "any" : J(g.step, 1), w = Array.isArray(p) || Array.isArray(m), [ee, T] = c(o(() => Ye(m ?? p, b, S), [
|
|
1296
|
+
m,
|
|
1275
1297
|
S,
|
|
1276
|
-
|
|
1298
|
+
b,
|
|
1277
1299
|
p
|
|
1278
|
-
])), [
|
|
1279
|
-
p ??
|
|
1280
|
-
},
|
|
1300
|
+
])), [E, D] = p == null ? ee : Ye(p, b, S), O = w ? `${E} - ${D}` : String(E), k = Math.max(S - b, 1), A = (E - b) / k * 100, j = (D - b) / k * 100, M = (e) => {
|
|
1301
|
+
p ?? T(e), h?.(w ? e : e[0]);
|
|
1302
|
+
}, N = (e) => {
|
|
1281
1303
|
if (!e.trim()) return;
|
|
1282
1304
|
let t = Number(e);
|
|
1283
|
-
Number.isNaN(t) || M([
|
|
1284
|
-
},
|
|
1305
|
+
Number.isNaN(t) || M([Je(t, b, w ? D : S, C), D]);
|
|
1306
|
+
}, P = (e) => {
|
|
1285
1307
|
if (!e.trim()) return;
|
|
1286
1308
|
let t = Number(e);
|
|
1287
|
-
Number.isNaN(t) || M([
|
|
1309
|
+
Number.isNaN(t) || M([E, Je(t, E, S, C)]);
|
|
1288
1310
|
};
|
|
1289
1311
|
return /* @__PURE__ */ d("div", {
|
|
1290
|
-
className:
|
|
1312
|
+
className: (0, x.default)(q.wrapper, r && q.fullWidth, l),
|
|
1291
1313
|
children: [
|
|
1292
1314
|
(t || i) && /* @__PURE__ */ d("div", {
|
|
1293
|
-
className:
|
|
1315
|
+
className: q.header,
|
|
1294
1316
|
children: [t && /* @__PURE__ */ u("label", {
|
|
1295
|
-
htmlFor:
|
|
1296
|
-
className:
|
|
1317
|
+
htmlFor: v,
|
|
1318
|
+
className: q.label,
|
|
1297
1319
|
children: t
|
|
1298
1320
|
}), i && /* @__PURE__ */ u("span", {
|
|
1299
|
-
className:
|
|
1300
|
-
children:
|
|
1321
|
+
className: q.value,
|
|
1322
|
+
children: O
|
|
1301
1323
|
})]
|
|
1302
1324
|
}),
|
|
1303
1325
|
/* @__PURE__ */ d("div", {
|
|
1304
|
-
className:
|
|
1326
|
+
className: (0, x.default)(q.sliderRoot, q[e], g.disabled && q.disabled),
|
|
1305
1327
|
children: [
|
|
1306
|
-
/* @__PURE__ */ u("div", { className:
|
|
1328
|
+
/* @__PURE__ */ u("div", { className: q.track }),
|
|
1307
1329
|
/* @__PURE__ */ u("div", {
|
|
1308
|
-
className:
|
|
1330
|
+
className: q.activeTrack,
|
|
1309
1331
|
style: {
|
|
1310
1332
|
left: `${w ? A : 0}%`,
|
|
1311
1333
|
width: `${w ? j - A : A}%`
|
|
1312
1334
|
}
|
|
1313
1335
|
}),
|
|
1314
1336
|
/* @__PURE__ */ u("input", {
|
|
1315
|
-
id:
|
|
1337
|
+
id: v,
|
|
1316
1338
|
type: "range",
|
|
1317
|
-
className:
|
|
1318
|
-
"aria-describedby":
|
|
1339
|
+
className: (0, x.default)(q.inputRoot, w && q.inputStart),
|
|
1340
|
+
"aria-describedby": y,
|
|
1319
1341
|
"aria-label": t ? void 0 : w ? "Slider minimum" : "Slider",
|
|
1320
|
-
"aria-valuetext": i ?
|
|
1321
|
-
...
|
|
1322
|
-
min:
|
|
1342
|
+
"aria-valuetext": i ? O : void 0,
|
|
1343
|
+
...g,
|
|
1344
|
+
min: b,
|
|
1323
1345
|
max: S,
|
|
1324
1346
|
step: C,
|
|
1325
|
-
value:
|
|
1347
|
+
value: E,
|
|
1326
1348
|
onChange: (e) => {
|
|
1327
|
-
M([
|
|
1349
|
+
M([Je(J(e.target.value, b), b, D, C), D]);
|
|
1328
1350
|
}
|
|
1329
1351
|
}),
|
|
1330
1352
|
w && /* @__PURE__ */ u("input", {
|
|
1331
|
-
id: `${
|
|
1353
|
+
id: `${v}-end`,
|
|
1332
1354
|
type: "range",
|
|
1333
|
-
className:
|
|
1334
|
-
"aria-describedby":
|
|
1355
|
+
className: (0, x.default)(q.inputRoot, q.inputEnd),
|
|
1356
|
+
"aria-describedby": y,
|
|
1335
1357
|
"aria-label": t ? `${t} maximum` : "Slider maximum",
|
|
1336
|
-
...
|
|
1337
|
-
min:
|
|
1358
|
+
...g,
|
|
1359
|
+
min: b,
|
|
1338
1360
|
max: S,
|
|
1339
1361
|
step: C,
|
|
1340
|
-
value:
|
|
1362
|
+
value: D,
|
|
1341
1363
|
onChange: (e) => {
|
|
1342
|
-
M([
|
|
1364
|
+
M([E, Je(J(e.target.value, S), E, S, C)]);
|
|
1343
1365
|
}
|
|
1344
1366
|
})
|
|
1345
1367
|
]
|
|
1346
1368
|
}),
|
|
1347
1369
|
s && /* @__PURE__ */ d("div", {
|
|
1348
|
-
className:
|
|
1370
|
+
className: (0, x.default)(q.inputsRow, !w && q.singleInputRow),
|
|
1349
1371
|
children: [
|
|
1350
|
-
/* @__PURE__ */ u(
|
|
1372
|
+
/* @__PURE__ */ u(Oe, {
|
|
1351
1373
|
type: "number",
|
|
1352
1374
|
inputMode: "decimal",
|
|
1353
1375
|
size: e,
|
|
1354
|
-
defaultValue:
|
|
1355
|
-
min:
|
|
1356
|
-
max: w ?
|
|
1376
|
+
defaultValue: E,
|
|
1377
|
+
min: b,
|
|
1378
|
+
max: w ? D : S,
|
|
1357
1379
|
step: C,
|
|
1358
1380
|
"aria-label": t ? `${t} minimum input` : w ? "Slider minimum input" : "Slider input",
|
|
1359
1381
|
fullWidth: !0,
|
|
1360
1382
|
onBlur: (e) => {
|
|
1361
|
-
|
|
1383
|
+
N(e.target.value);
|
|
1362
1384
|
},
|
|
1363
1385
|
onKeyDown: (e) => {
|
|
1364
|
-
e.key === "Enter" &&
|
|
1386
|
+
e.key === "Enter" && N(e.currentTarget.value);
|
|
1365
1387
|
}
|
|
1366
|
-
}, `slider-start-${
|
|
1388
|
+
}, `slider-start-${E}-${D}`),
|
|
1367
1389
|
w && /* @__PURE__ */ u("span", {
|
|
1368
|
-
className:
|
|
1390
|
+
className: q.separator,
|
|
1369
1391
|
children: "-"
|
|
1370
1392
|
}),
|
|
1371
|
-
w && /* @__PURE__ */ u(
|
|
1393
|
+
w && /* @__PURE__ */ u(Oe, {
|
|
1372
1394
|
type: "number",
|
|
1373
1395
|
inputMode: "decimal",
|
|
1374
1396
|
size: e,
|
|
1375
|
-
defaultValue:
|
|
1376
|
-
min:
|
|
1397
|
+
defaultValue: D,
|
|
1398
|
+
min: E,
|
|
1377
1399
|
max: S,
|
|
1378
1400
|
step: C,
|
|
1379
1401
|
"aria-label": t ? `${t} maximum input` : "Slider maximum input",
|
|
1380
1402
|
fullWidth: !0,
|
|
1381
1403
|
onBlur: (e) => {
|
|
1382
|
-
|
|
1404
|
+
P(e.target.value);
|
|
1383
1405
|
},
|
|
1384
1406
|
onKeyDown: (e) => {
|
|
1385
|
-
e.key === "Enter" &&
|
|
1407
|
+
e.key === "Enter" && P(e.currentTarget.value);
|
|
1386
1408
|
}
|
|
1387
|
-
}, `slider-end-${
|
|
1409
|
+
}, `slider-end-${E}-${D}`)
|
|
1388
1410
|
]
|
|
1389
1411
|
}),
|
|
1390
1412
|
n && /* @__PURE__ */ u("span", {
|
|
1391
|
-
id:
|
|
1392
|
-
className:
|
|
1413
|
+
id: y,
|
|
1414
|
+
className: q.helperText,
|
|
1393
1415
|
children: n
|
|
1394
1416
|
})
|
|
1395
1417
|
]
|
|
1396
1418
|
});
|
|
1397
|
-
},
|
|
1419
|
+
}, Y = {
|
|
1398
1420
|
wrapper: "_wrapper_4v5ks_1",
|
|
1399
1421
|
label: "_label_4v5ks_7",
|
|
1400
1422
|
sm: "_sm_4v5ks_17",
|
|
@@ -1407,34 +1429,34 @@ var U = {
|
|
|
1407
1429
|
error: "_error_4v5ks_133",
|
|
1408
1430
|
helperText: "_helperText_4v5ks_142",
|
|
1409
1431
|
errorText: "_errorText_4v5ks_156"
|
|
1410
|
-
},
|
|
1432
|
+
}, Ze = ({ size: e = "md", label: t, helperText: n, error: r, className: i, id: o, ...s }) => {
|
|
1411
1433
|
let c = a(), l = o ?? `ds-radio-${c}`, f = n ? `${l}-help` : void 0;
|
|
1412
1434
|
return /* @__PURE__ */ d("div", {
|
|
1413
|
-
className:
|
|
1435
|
+
className: (0, x.default)(Y.wrapper, i),
|
|
1414
1436
|
children: [/* @__PURE__ */ d("label", {
|
|
1415
1437
|
htmlFor: l,
|
|
1416
|
-
className:
|
|
1438
|
+
className: (0, x.default)(Y.label, Y[e]),
|
|
1417
1439
|
children: [/* @__PURE__ */ d("div", {
|
|
1418
|
-
className:
|
|
1440
|
+
className: Y.inputWrapper,
|
|
1419
1441
|
children: [/* @__PURE__ */ u("input", {
|
|
1420
1442
|
type: "radio",
|
|
1421
1443
|
id: l,
|
|
1422
|
-
className:
|
|
1444
|
+
className: (0, x.default)(Y.radioRoot, Y[e], r && Y.error),
|
|
1423
1445
|
"aria-describedby": f,
|
|
1424
1446
|
"aria-invalid": r || void 0,
|
|
1425
1447
|
...s
|
|
1426
|
-
}), /* @__PURE__ */ u("span", { className:
|
|
1448
|
+
}), /* @__PURE__ */ u("span", { className: Y.checkmark })]
|
|
1427
1449
|
}), t && /* @__PURE__ */ u("span", {
|
|
1428
|
-
className:
|
|
1450
|
+
className: Y.labelText,
|
|
1429
1451
|
children: t
|
|
1430
1452
|
})]
|
|
1431
1453
|
}), n && /* @__PURE__ */ u("span", {
|
|
1432
1454
|
id: f,
|
|
1433
|
-
className:
|
|
1455
|
+
className: (0, x.default)(Y.helperText, r && Y.errorText),
|
|
1434
1456
|
children: n
|
|
1435
1457
|
})]
|
|
1436
1458
|
});
|
|
1437
|
-
},
|
|
1459
|
+
}, Qe = {
|
|
1438
1460
|
root: "_root_1qfdr_1",
|
|
1439
1461
|
text: "_text_1qfdr_6",
|
|
1440
1462
|
rectangular: "_rectangular_1qfdr_15",
|
|
@@ -1442,38 +1464,38 @@ var U = {
|
|
|
1442
1464
|
circular: "_circular_1qfdr_23",
|
|
1443
1465
|
pulse: "_pulse_1qfdr_28",
|
|
1444
1466
|
wave: "_wave_1qfdr_44"
|
|
1445
|
-
},
|
|
1446
|
-
className:
|
|
1467
|
+
}, $e = ({ variant: e = "rectangular", width: t, height: n, animation: r = "pulse", className: i, style: a, "aria-hidden": o, ...s }) => /* @__PURE__ */ u(N, {
|
|
1468
|
+
className: (0, x.default)(Qe.root, Qe[e], r !== "none" && Qe[r], i),
|
|
1447
1469
|
width: t,
|
|
1448
1470
|
height: n,
|
|
1449
1471
|
style: a,
|
|
1450
1472
|
"aria-hidden": o ?? !0,
|
|
1451
1473
|
...s
|
|
1452
|
-
}),
|
|
1453
|
-
step:
|
|
1454
|
-
stepRow:
|
|
1455
|
-
interactive:
|
|
1456
|
-
marker:
|
|
1457
|
-
text:
|
|
1458
|
-
label:
|
|
1459
|
-
description:
|
|
1460
|
-
connector:
|
|
1461
|
-
completed:
|
|
1474
|
+
}), et = "_step_69ymb_1", tt = "_stepRow_69ymb_18", nt = "_interactive_69ymb_28", rt = "_marker_69ymb_48", it = "_text_69ymb_67", at = "_label_69ymb_74", ot = "_description_69ymb_83", st = "_connector_69ymb_92", ct = "_completed_69ymb_110", lt = "_current_69ymb_124", ut = "_error_69ymb_138", dt = "_upcoming_69ymb_152", ft = "_disabled_69ymb_156", X = {
|
|
1475
|
+
step: et,
|
|
1476
|
+
stepRow: tt,
|
|
1477
|
+
interactive: nt,
|
|
1478
|
+
marker: rt,
|
|
1479
|
+
text: it,
|
|
1480
|
+
label: at,
|
|
1481
|
+
description: ot,
|
|
1482
|
+
connector: st,
|
|
1483
|
+
completed: ct,
|
|
1462
1484
|
"connector-completed": "_connector-completed_69ymb_120",
|
|
1463
|
-
current:
|
|
1485
|
+
current: lt,
|
|
1464
1486
|
"connector-current": "_connector-current_69ymb_134",
|
|
1465
|
-
error:
|
|
1487
|
+
error: ut,
|
|
1466
1488
|
"connector-error": "_connector-error_69ymb_148",
|
|
1467
|
-
upcoming:
|
|
1468
|
-
disabled:
|
|
1469
|
-
},
|
|
1489
|
+
upcoming: dt,
|
|
1490
|
+
disabled: ft
|
|
1491
|
+
}, pt = ({ step: e, index: t, status: n, isInteractive: r, onStepClick: i, isLast: a, id: o, className: s }) => {
|
|
1470
1492
|
let c = !!e.disabled, l = r ? "button" : "div", f = n === "error" ? "!" : String(t + 1);
|
|
1471
1493
|
return /* @__PURE__ */ d("li", {
|
|
1472
|
-
className:
|
|
1494
|
+
className: (0, x.default)(X.step, X[n], c && X.disabled, s),
|
|
1473
1495
|
children: [/* @__PURE__ */ d(l, {
|
|
1474
1496
|
id: o,
|
|
1475
1497
|
type: r ? "button" : void 0,
|
|
1476
|
-
className:
|
|
1498
|
+
className: (0, x.default)(X.stepRow, r && X.interactive),
|
|
1477
1499
|
onClick: () => {
|
|
1478
1500
|
r && !c && i?.(e, t);
|
|
1479
1501
|
},
|
|
@@ -1485,49 +1507,49 @@ var U = {
|
|
|
1485
1507
|
disabled: r && c ? !0 : void 0,
|
|
1486
1508
|
tabIndex: r && !c ? 0 : void 0,
|
|
1487
1509
|
children: [/* @__PURE__ */ u("span", {
|
|
1488
|
-
className:
|
|
1510
|
+
className: X.marker,
|
|
1489
1511
|
"aria-hidden": "true",
|
|
1490
1512
|
children: f
|
|
1491
1513
|
}), /* @__PURE__ */ d("span", {
|
|
1492
|
-
className:
|
|
1514
|
+
className: X.text,
|
|
1493
1515
|
children: [/* @__PURE__ */ u("span", {
|
|
1494
|
-
className:
|
|
1516
|
+
className: X.label,
|
|
1495
1517
|
children: e.label
|
|
1496
1518
|
}), e.description && /* @__PURE__ */ u("span", {
|
|
1497
|
-
className:
|
|
1519
|
+
className: X.description,
|
|
1498
1520
|
children: e.description
|
|
1499
1521
|
})]
|
|
1500
1522
|
})]
|
|
1501
1523
|
}), !a && /* @__PURE__ */ u("span", {
|
|
1502
|
-
className:
|
|
1524
|
+
className: (0, x.default)(X.connector, X[`connector-${n}`]),
|
|
1503
1525
|
"aria-hidden": "true"
|
|
1504
1526
|
})]
|
|
1505
1527
|
});
|
|
1506
|
-
},
|
|
1528
|
+
}, mt = {
|
|
1507
1529
|
root: "_root_cxvk2_1",
|
|
1508
1530
|
sm: "_sm_cxvk2_15",
|
|
1509
1531
|
lg: "_lg_cxvk2_22",
|
|
1510
1532
|
horizontal: "_horizontal_cxvk2_29",
|
|
1511
1533
|
vertical: "_vertical_cxvk2_35"
|
|
1512
|
-
},
|
|
1513
|
-
let d = a(), f = c ?? `ds-stepper-${d}`, p =
|
|
1534
|
+
}, ht = (e, t) => Number.isNaN(e) || t <= 0 ? -1 : Math.min(Math.max(e, 0), t - 1), gt = (e, t) => typeof e == "number" ? ht(e, t.length) : typeof e == "string" ? t.findIndex((t) => t.id === e) : t.findIndex((e) => e.status === "current"), _t = (e, t, n) => n || (t === -1 ? "upcoming" : e < t ? "completed" : e === t ? "current" : "upcoming"), vt = ({ steps: e, currentStep: t, orientation: n = "horizontal", size: r = "md", onStepClick: i, ariaLabel: o, className: s, id: c, ...l }) => {
|
|
1535
|
+
let d = a(), f = c ?? `ds-stepper-${d}`, p = gt(t, e), m = o ?? "Progress";
|
|
1514
1536
|
return /* @__PURE__ */ u("ol", {
|
|
1515
1537
|
id: f,
|
|
1516
|
-
className:
|
|
1517
|
-
"aria-label":
|
|
1538
|
+
className: (0, x.default)(mt.root, mt[n], mt[r], s),
|
|
1539
|
+
"aria-label": m,
|
|
1518
1540
|
"data-orientation": n,
|
|
1519
1541
|
...l,
|
|
1520
|
-
children: e.map((t, n) => /* @__PURE__ */ u(
|
|
1542
|
+
children: e.map((t, n) => /* @__PURE__ */ u(pt, {
|
|
1521
1543
|
id: `${f}-step-${t.id}`,
|
|
1522
1544
|
step: t,
|
|
1523
1545
|
index: n,
|
|
1524
|
-
status:
|
|
1546
|
+
status: _t(n, p, t.status),
|
|
1525
1547
|
isInteractive: !!i,
|
|
1526
1548
|
onStepClick: i,
|
|
1527
1549
|
isLast: n === e.length - 1
|
|
1528
1550
|
}, t.id))
|
|
1529
1551
|
});
|
|
1530
|
-
},
|
|
1552
|
+
}, yt = {
|
|
1531
1553
|
wrapper: "_wrapper_vo2yb_1",
|
|
1532
1554
|
fullWidth: "_fullWidth_vo2yb_8",
|
|
1533
1555
|
label: "_label_vo2yb_13",
|
|
@@ -1538,20 +1560,20 @@ var U = {
|
|
|
1538
1560
|
error: "_error_vo2yb_80",
|
|
1539
1561
|
helperText: "_helperText_vo2yb_89",
|
|
1540
1562
|
errorText: "_errorText_vo2yb_95"
|
|
1541
|
-
},
|
|
1542
|
-
let p = a(),
|
|
1563
|
+
}, bt = ({ size: e = "md", error: t, label: n, helperText: r, fullWidth: i = !1, className: o, id: s, options: c, children: l, ...f }) => {
|
|
1564
|
+
let p = a(), m = s ?? `ds-select-${p}`, h = r ? `${m}-help` : void 0;
|
|
1543
1565
|
return /* @__PURE__ */ d("div", {
|
|
1544
|
-
className:
|
|
1566
|
+
className: (0, x.default)(yt.wrapper, i && yt.fullWidth, o),
|
|
1545
1567
|
children: [
|
|
1546
1568
|
n && /* @__PURE__ */ u("label", {
|
|
1547
|
-
htmlFor:
|
|
1548
|
-
className:
|
|
1569
|
+
htmlFor: m,
|
|
1570
|
+
className: yt.label,
|
|
1549
1571
|
children: n
|
|
1550
1572
|
}),
|
|
1551
1573
|
/* @__PURE__ */ u("select", {
|
|
1552
|
-
id:
|
|
1553
|
-
className:
|
|
1554
|
-
"aria-describedby":
|
|
1574
|
+
id: m,
|
|
1575
|
+
className: (0, x.default)(yt.selectRoot, yt[e], t && yt.error),
|
|
1576
|
+
"aria-describedby": h,
|
|
1555
1577
|
"aria-invalid": t || void 0,
|
|
1556
1578
|
...f,
|
|
1557
1579
|
children: c ? c.map((e) => /* @__PURE__ */ u("option", {
|
|
@@ -1561,13 +1583,13 @@ var U = {
|
|
|
1561
1583
|
}, e.value)) : l
|
|
1562
1584
|
}),
|
|
1563
1585
|
r && /* @__PURE__ */ u("span", {
|
|
1564
|
-
id:
|
|
1565
|
-
className:
|
|
1586
|
+
id: h,
|
|
1587
|
+
className: (0, x.default)(yt.helperText, t && yt.errorText),
|
|
1566
1588
|
children: r
|
|
1567
1589
|
})
|
|
1568
1590
|
]
|
|
1569
1591
|
});
|
|
1570
|
-
},
|
|
1592
|
+
}, xt = {
|
|
1571
1593
|
wrapper: "_wrapper_196po_1",
|
|
1572
1594
|
container: "_container_196po_7",
|
|
1573
1595
|
disabled: "_disabled_196po_15",
|
|
@@ -1576,87 +1598,87 @@ var U = {
|
|
|
1576
1598
|
thumb: "_thumb_196po_46",
|
|
1577
1599
|
label: "_label_196po_62",
|
|
1578
1600
|
helperText: "_helperText_196po_69"
|
|
1579
|
-
},
|
|
1601
|
+
}, St = ({ label: e, helperText: t, className: n, disabled: r, id: i, ...o }) => {
|
|
1580
1602
|
let s = a(), c = i ?? `ds-switch-${s}`, l = t ? `${c}-help` : void 0;
|
|
1581
1603
|
return /* @__PURE__ */ d("div", {
|
|
1582
|
-
className:
|
|
1604
|
+
className: (0, x.default)(xt.wrapper, n),
|
|
1583
1605
|
children: [/* @__PURE__ */ d("label", {
|
|
1584
1606
|
htmlFor: c,
|
|
1585
|
-
className:
|
|
1607
|
+
className: (0, x.default)(xt.container, r && xt.disabled),
|
|
1586
1608
|
children: [
|
|
1587
1609
|
/* @__PURE__ */ u("input", {
|
|
1588
1610
|
type: "checkbox",
|
|
1589
1611
|
id: c,
|
|
1590
1612
|
role: "switch",
|
|
1591
1613
|
disabled: r,
|
|
1592
|
-
className:
|
|
1614
|
+
className: xt.input,
|
|
1593
1615
|
"aria-describedby": l,
|
|
1594
1616
|
...o
|
|
1595
1617
|
}),
|
|
1596
1618
|
/* @__PURE__ */ u("span", {
|
|
1597
|
-
className:
|
|
1598
|
-
children: /* @__PURE__ */ u("span", { className:
|
|
1619
|
+
className: xt.track,
|
|
1620
|
+
children: /* @__PURE__ */ u("span", { className: xt.thumb })
|
|
1599
1621
|
}),
|
|
1600
1622
|
e && /* @__PURE__ */ u("span", {
|
|
1601
|
-
className:
|
|
1623
|
+
className: xt.label,
|
|
1602
1624
|
children: e
|
|
1603
1625
|
})
|
|
1604
1626
|
]
|
|
1605
1627
|
}), t && /* @__PURE__ */ u("span", {
|
|
1606
1628
|
id: l,
|
|
1607
|
-
className:
|
|
1629
|
+
className: xt.helperText,
|
|
1608
1630
|
children: t
|
|
1609
1631
|
})]
|
|
1610
1632
|
});
|
|
1611
|
-
},
|
|
1612
|
-
wrapper:
|
|
1613
|
-
table:
|
|
1614
|
-
thead:
|
|
1615
|
-
tbody:
|
|
1616
|
-
tr:
|
|
1617
|
-
th:
|
|
1618
|
-
td:
|
|
1619
|
-
striped:
|
|
1620
|
-
hoverable:
|
|
1621
|
-
dense:
|
|
1633
|
+
}, Ct = "_wrapper_1w3cj_1", wt = "_table_1w3cj_8", Tt = "_thead_1w3cj_17", Et = "_tbody_1w3cj_22", Dt = "_tr_1w3cj_22", Ot = "_th_1w3cj_17", kt = "_td_1w3cj_40", At = "_striped_1w3cj_46", jt = "_hoverable_1w3cj_50", Mt = "_dense_1w3cj_54", Nt = "_loading_1w3cj_75", Z = {
|
|
1634
|
+
wrapper: Ct,
|
|
1635
|
+
table: wt,
|
|
1636
|
+
thead: Tt,
|
|
1637
|
+
tbody: Et,
|
|
1638
|
+
tr: Dt,
|
|
1639
|
+
th: Ot,
|
|
1640
|
+
td: kt,
|
|
1641
|
+
striped: At,
|
|
1642
|
+
hoverable: jt,
|
|
1643
|
+
dense: Mt,
|
|
1622
1644
|
"align-left": "_align-left_1w3cj_62",
|
|
1623
1645
|
"align-center": "_align-center_1w3cj_65",
|
|
1624
1646
|
"align-right": "_align-right_1w3cj_68",
|
|
1625
1647
|
"align-justify": "_align-justify_1w3cj_71",
|
|
1626
|
-
loading:
|
|
1627
|
-
},
|
|
1628
|
-
className:
|
|
1648
|
+
loading: Nt
|
|
1649
|
+
}, Pt = ({ children: e, className: t, striped: n, hoverable: r, dense: i, isLoading: a, ...o }) => /* @__PURE__ */ u("div", {
|
|
1650
|
+
className: (0, x.default)(Z.wrapper, a && Z.loading, t),
|
|
1629
1651
|
children: /* @__PURE__ */ u("table", {
|
|
1630
|
-
className:
|
|
1652
|
+
className: (0, x.default)(Z.table, n && Z.striped, r && Z.hoverable, i && Z.dense),
|
|
1631
1653
|
"aria-busy": a || void 0,
|
|
1632
1654
|
...o,
|
|
1633
1655
|
children: e
|
|
1634
1656
|
})
|
|
1635
|
-
}),
|
|
1636
|
-
className:
|
|
1657
|
+
}), Ft = ({ children: e, className: t, ...n }) => /* @__PURE__ */ u("thead", {
|
|
1658
|
+
className: (0, x.default)(Z.thead, t),
|
|
1637
1659
|
...n,
|
|
1638
1660
|
children: e
|
|
1639
|
-
}),
|
|
1640
|
-
className:
|
|
1661
|
+
}), It = ({ children: e, className: t, ...n }) => /* @__PURE__ */ u("tbody", {
|
|
1662
|
+
className: (0, x.default)(Z.tbody, t),
|
|
1641
1663
|
...n,
|
|
1642
1664
|
children: e
|
|
1643
|
-
}),
|
|
1644
|
-
className:
|
|
1665
|
+
}), Lt = ({ children: e, className: t, ...n }) => /* @__PURE__ */ u("tfoot", {
|
|
1666
|
+
className: (0, x.default)(Z.tfoot, t),
|
|
1645
1667
|
...n,
|
|
1646
1668
|
children: e
|
|
1647
|
-
}),
|
|
1648
|
-
className:
|
|
1669
|
+
}), Rt = ({ children: e, className: t, ...n }) => /* @__PURE__ */ u("tr", {
|
|
1670
|
+
className: (0, x.default)(Z.tr, t),
|
|
1649
1671
|
...n,
|
|
1650
1672
|
children: e
|
|
1651
|
-
}),
|
|
1652
|
-
className:
|
|
1673
|
+
}), zt = ({ children: e, className: t, align: n, ...r }) => /* @__PURE__ */ u("th", {
|
|
1674
|
+
className: (0, x.default)(Z.th, n && Z[`align-${n}`], t),
|
|
1653
1675
|
...r,
|
|
1654
1676
|
children: e
|
|
1655
|
-
}),
|
|
1656
|
-
className:
|
|
1677
|
+
}), Bt = ({ children: e, className: t, align: n, ...r }) => /* @__PURE__ */ u("td", {
|
|
1678
|
+
className: (0, x.default)(Z.td, n && Z[`align-${n}`], t),
|
|
1657
1679
|
...r,
|
|
1658
1680
|
children: e
|
|
1659
|
-
}),
|
|
1681
|
+
}), Vt = {
|
|
1660
1682
|
root: "_root_1luck_1",
|
|
1661
1683
|
tabList: "_tabList_1luck_8",
|
|
1662
1684
|
tabItem: "_tabItem_1luck_16",
|
|
@@ -1665,29 +1687,29 @@ var U = {
|
|
|
1665
1687
|
pillList: "_pillList_1luck_52",
|
|
1666
1688
|
pillItem: "_pillItem_1luck_60",
|
|
1667
1689
|
tabPanel: "_tabPanel_1luck_72"
|
|
1668
|
-
},
|
|
1669
|
-
let f = a(), p = l ?? `ds-tabs-${f}`, [
|
|
1670
|
-
t || (n === void 0 &&
|
|
1671
|
-
},
|
|
1672
|
-
let n = e.filter((e) => !e.disabled), r = n.findIndex((e) => e.id ===
|
|
1690
|
+
}, Ht = ({ items: e, defaultActiveId: t, activeId: n, onChange: r, className: i, variant: o = "line", id: l }) => {
|
|
1691
|
+
let f = a(), p = l ?? `ds-tabs-${f}`, [m, h] = c(t || (e.length > 0 ? e[0].id : "")), g = n === void 0 ? m : n, _ = s(null), v = (e, t) => {
|
|
1692
|
+
t || (n === void 0 && h(e), r?.(e));
|
|
1693
|
+
}, y = (t) => {
|
|
1694
|
+
let n = e.filter((e) => !e.disabled), r = n.findIndex((e) => e.id === g), i = -1;
|
|
1673
1695
|
if (t.key === "ArrowRight" || t.key === "ArrowDown" ? i = (r + 1) % n.length : t.key === "ArrowLeft" || t.key === "ArrowUp" ? i = (r - 1 + n.length) % n.length : t.key === "Home" ? i = 0 : t.key === "End" && (i = n.length - 1), i !== -1) {
|
|
1674
1696
|
t.preventDefault();
|
|
1675
1697
|
let e = n[i].id;
|
|
1676
|
-
|
|
1677
|
-
let r =
|
|
1698
|
+
v(e);
|
|
1699
|
+
let r = _.current?.querySelectorAll("[role=\"tab\"]");
|
|
1678
1700
|
Array.from(r || []).find((t) => t.getAttribute("data-id") === e)?.focus();
|
|
1679
1701
|
}
|
|
1680
|
-
},
|
|
1702
|
+
}, b = e.find((e) => e.id === g);
|
|
1681
1703
|
return /* @__PURE__ */ d("div", {
|
|
1682
1704
|
id: p,
|
|
1683
|
-
className:
|
|
1705
|
+
className: (0, x.default)(Vt.root, i),
|
|
1684
1706
|
children: [/* @__PURE__ */ u("div", {
|
|
1685
1707
|
role: "tablist",
|
|
1686
|
-
ref:
|
|
1687
|
-
className:
|
|
1688
|
-
onKeyDown:
|
|
1708
|
+
ref: _,
|
|
1709
|
+
className: (0, x.default)(Vt.tabList, o === "pill" && Vt.pillList),
|
|
1710
|
+
onKeyDown: y,
|
|
1689
1711
|
children: e.map((e) => {
|
|
1690
|
-
let t = e.id ===
|
|
1712
|
+
let t = e.id === g, n = !!e.disabled, r = n ? -1 : t ? 0 : -1;
|
|
1691
1713
|
return /* @__PURE__ */ u("button", {
|
|
1692
1714
|
role: "tab",
|
|
1693
1715
|
id: `${p}-tab-${e.id}`,
|
|
@@ -1697,40 +1719,40 @@ var U = {
|
|
|
1697
1719
|
tabIndex: r,
|
|
1698
1720
|
disabled: n,
|
|
1699
1721
|
"data-id": e.id,
|
|
1700
|
-
className:
|
|
1701
|
-
onClick: () =>
|
|
1722
|
+
className: (0, x.default)(Vt.tabItem, o === "pill" && Vt.pillItem, t && Vt.active, n && Vt.disabled),
|
|
1723
|
+
onClick: () => v(e.id, n),
|
|
1702
1724
|
children: e.label
|
|
1703
1725
|
}, e.id);
|
|
1704
1726
|
})
|
|
1705
1727
|
}), /* @__PURE__ */ u("div", {
|
|
1706
1728
|
role: "tabpanel",
|
|
1707
|
-
id: `${p}-panel-${
|
|
1708
|
-
"aria-labelledby": `${p}-tab-${
|
|
1709
|
-
className:
|
|
1729
|
+
id: `${p}-panel-${g}`,
|
|
1730
|
+
"aria-labelledby": `${p}-tab-${g}`,
|
|
1731
|
+
className: Vt.tabPanel,
|
|
1710
1732
|
tabIndex: 0,
|
|
1711
|
-
children:
|
|
1733
|
+
children: b?.content
|
|
1712
1734
|
})]
|
|
1713
1735
|
});
|
|
1714
|
-
},
|
|
1715
|
-
root:
|
|
1716
|
-
h1:
|
|
1717
|
-
h2:
|
|
1718
|
-
h3:
|
|
1719
|
-
h4:
|
|
1720
|
-
h5:
|
|
1721
|
-
h6:
|
|
1736
|
+
}, Ut = "_root_1onf5_1", Wt = "_h1_1onf5_9", Gt = "_h2_1onf5_15", Kt = "_h3_1onf5_21", qt = "_h4_1onf5_27", Jt = "_h5_1onf5_32", Yt = "_h6_1onf5_37", Xt = "_label_1onf5_54", Zt = "_code_1onf5_61", Qt = "_left_1onf5_70", $t = "_center_1onf5_73", en = "_right_1onf5_76", tn = "_justify_1onf5_79", nn = "_regular_1onf5_84", rn = "_medium_1onf5_87", an = "_bold_1onf5_90", on = "_noWrap_1onf5_121", Q = {
|
|
1737
|
+
root: Ut,
|
|
1738
|
+
h1: Wt,
|
|
1739
|
+
h2: Gt,
|
|
1740
|
+
h3: Kt,
|
|
1741
|
+
h4: qt,
|
|
1742
|
+
h5: Jt,
|
|
1743
|
+
h6: Yt,
|
|
1722
1744
|
"body-lg": "_body-lg_1onf5_42",
|
|
1723
1745
|
"body-md": "_body-md_1onf5_46",
|
|
1724
1746
|
"body-sm": "_body-sm_1onf5_50",
|
|
1725
|
-
label:
|
|
1726
|
-
code:
|
|
1727
|
-
left:
|
|
1728
|
-
center:
|
|
1729
|
-
right:
|
|
1730
|
-
justify:
|
|
1731
|
-
regular:
|
|
1732
|
-
medium:
|
|
1733
|
-
bold:
|
|
1747
|
+
label: Xt,
|
|
1748
|
+
code: Zt,
|
|
1749
|
+
left: Qt,
|
|
1750
|
+
center: $t,
|
|
1751
|
+
right: en,
|
|
1752
|
+
justify: tn,
|
|
1753
|
+
regular: nn,
|
|
1754
|
+
medium: rn,
|
|
1755
|
+
bold: an,
|
|
1734
1756
|
"color-main": "_color-main_1onf5_95",
|
|
1735
1757
|
"color-subtle": "_color-subtle_1onf5_98",
|
|
1736
1758
|
"color-on-brand": "_color-on-brand_1onf5_104",
|
|
@@ -1738,7 +1760,7 @@ var U = {
|
|
|
1738
1760
|
"color-success": "_color-success_1onf5_110",
|
|
1739
1761
|
"color-warning": "_color-warning_1onf5_113",
|
|
1740
1762
|
"color-info": "_color-info_1onf5_116",
|
|
1741
|
-
noWrap:
|
|
1763
|
+
noWrap: on,
|
|
1742
1764
|
"p-0": "_p-0_1onf5_128",
|
|
1743
1765
|
"p-1": "_p-1_1onf5_131",
|
|
1744
1766
|
"p-2": "_p-2_1onf5_134",
|
|
@@ -1904,7 +1926,7 @@ var U = {
|
|
|
1904
1926
|
"mr-10": "_mr-10_1onf5_674",
|
|
1905
1927
|
"mr-12": "_mr-12_1onf5_677",
|
|
1906
1928
|
"mr-14": "_mr-14_1onf5_680"
|
|
1907
|
-
},
|
|
1929
|
+
}, sn = {
|
|
1908
1930
|
h1: "h1",
|
|
1909
1931
|
h2: "h2",
|
|
1910
1932
|
h3: "h3",
|
|
@@ -1916,11 +1938,11 @@ var U = {
|
|
|
1916
1938
|
"body-sm": "p",
|
|
1917
1939
|
label: "span",
|
|
1918
1940
|
code: "code"
|
|
1919
|
-
},
|
|
1920
|
-
className:
|
|
1941
|
+
}, cn = ({ children: e, variant: t = "body-md", as: n, align: r, weight: i, color: a, noWrap: o, className: s, padding: c, paddingX: l, paddingY: d, paddingTop: f, paddingBottom: p, paddingLeft: m, paddingRight: h, margin: g, marginX: _, marginY: v, marginTop: y, marginBottom: b, marginLeft: S, marginRight: C, ...w }) => /* @__PURE__ */ u(n || sn[t] || "span", {
|
|
1942
|
+
className: (0, x.default)(Q.root, Q[t], r && Q[r], i && Q[i], a && Q[`color-${a}`], o && Q.noWrap, c !== void 0 && Q[`p-${c}`], l !== void 0 && Q[`px-${l}`], d !== void 0 && Q[`py-${d}`], f !== void 0 && Q[`pt-${f}`], p !== void 0 && Q[`pb-${p}`], m !== void 0 && Q[`pl-${m}`], h !== void 0 && Q[`pr-${h}`], g !== void 0 && Q[`margin-${g}`], _ !== void 0 && Q[`marginX-${_}`], v !== void 0 && Q[`marginY-${v}`], y !== void 0 && Q[`marginTop-${y}`], b !== void 0 && Q[`marginBottom-${b}`], S !== void 0 && Q[`marginLeft-${S}`], C !== void 0 && Q[`marginRight-${C}`], s),
|
|
1921
1943
|
...w,
|
|
1922
1944
|
children: e
|
|
1923
|
-
}),
|
|
1945
|
+
}), ln = {
|
|
1924
1946
|
wrapper: "_wrapper_idhh9_1",
|
|
1925
1947
|
fullWidth: "_fullWidth_idhh9_8",
|
|
1926
1948
|
label: "_label_idhh9_13",
|
|
@@ -1931,32 +1953,32 @@ var U = {
|
|
|
1931
1953
|
error: "_error_idhh9_74",
|
|
1932
1954
|
helperText: "_helperText_idhh9_83",
|
|
1933
1955
|
errorText: "_errorText_idhh9_89"
|
|
1934
|
-
},
|
|
1935
|
-
let f = a(), p = s ?? `ds-textarea-${f}`,
|
|
1956
|
+
}, un = ({ size: e = "md", error: t, label: n, helperText: r, fullWidth: i = !1, className: o, id: s, rows: c = 4, ...l }) => {
|
|
1957
|
+
let f = a(), p = s ?? `ds-textarea-${f}`, m = r ? `${p}-help` : void 0;
|
|
1936
1958
|
return /* @__PURE__ */ d("div", {
|
|
1937
|
-
className:
|
|
1959
|
+
className: (0, x.default)(ln.wrapper, i && ln.fullWidth, o),
|
|
1938
1960
|
children: [
|
|
1939
1961
|
n && /* @__PURE__ */ u("label", {
|
|
1940
1962
|
htmlFor: p,
|
|
1941
|
-
className:
|
|
1963
|
+
className: ln.label,
|
|
1942
1964
|
children: n
|
|
1943
1965
|
}),
|
|
1944
1966
|
/* @__PURE__ */ u("textarea", {
|
|
1945
1967
|
id: p,
|
|
1946
1968
|
rows: c,
|
|
1947
|
-
className:
|
|
1948
|
-
"aria-describedby":
|
|
1969
|
+
className: (0, x.default)(ln.textareaRoot, ln[e], t && ln.error),
|
|
1970
|
+
"aria-describedby": m,
|
|
1949
1971
|
"aria-invalid": t || void 0,
|
|
1950
1972
|
...l
|
|
1951
1973
|
}),
|
|
1952
1974
|
r && /* @__PURE__ */ u("span", {
|
|
1953
|
-
id:
|
|
1954
|
-
className:
|
|
1975
|
+
id: m,
|
|
1976
|
+
className: (0, x.default)(ln.helperText, t && ln.errorText),
|
|
1955
1977
|
children: r
|
|
1956
1978
|
})
|
|
1957
1979
|
]
|
|
1958
1980
|
});
|
|
1959
|
-
},
|
|
1981
|
+
}, dn = {
|
|
1960
1982
|
root: "_root_67qke_1",
|
|
1961
1983
|
trigger: "_trigger_67qke_6",
|
|
1962
1984
|
tooltip: "_tooltip_67qke_10",
|
|
@@ -1967,38 +1989,38 @@ var U = {
|
|
|
1967
1989
|
bottom: "_bottom_67qke_45",
|
|
1968
1990
|
left: "_left_67qke_51",
|
|
1969
1991
|
right: "_right_67qke_57"
|
|
1970
|
-
},
|
|
1971
|
-
let [
|
|
1972
|
-
|
|
1973
|
-
|
|
1992
|
+
}, fn = ({ content: e, children: t, position: i = "top", variant: o = "dark", delay: l = 200, className: f, id: p }) => {
|
|
1993
|
+
let [m, h] = c(!1), g = s(null), _ = a(), v = p ?? `ds-tooltip-${_}`, y = `${v}-content`, b = () => {
|
|
1994
|
+
g.current = window.setTimeout(() => {
|
|
1995
|
+
h(!0);
|
|
1974
1996
|
}, l);
|
|
1975
1997
|
}, S = () => {
|
|
1976
|
-
|
|
1998
|
+
g.current && window.clearTimeout(g.current), h(!1);
|
|
1977
1999
|
}, C = (e) => {
|
|
1978
2000
|
e.key === "Escape" && S();
|
|
1979
2001
|
}, w = r(t) ? (() => {
|
|
1980
2002
|
let e = t;
|
|
1981
|
-
return n(e, { "aria-describedby": [e.props["aria-describedby"],
|
|
2003
|
+
return n(e, { "aria-describedby": [e.props["aria-describedby"], y].filter(Boolean).join(" ") });
|
|
1982
2004
|
})() : t;
|
|
1983
2005
|
return /* @__PURE__ */ d("div", {
|
|
1984
|
-
id:
|
|
1985
|
-
className:
|
|
1986
|
-
onMouseEnter:
|
|
2006
|
+
id: v,
|
|
2007
|
+
className: (0, x.default)(dn.root, f),
|
|
2008
|
+
onMouseEnter: b,
|
|
1987
2009
|
onMouseLeave: S,
|
|
1988
|
-
onFocus:
|
|
2010
|
+
onFocus: b,
|
|
1989
2011
|
onBlur: S,
|
|
1990
2012
|
onKeyDown: C,
|
|
1991
2013
|
children: [/* @__PURE__ */ u("div", {
|
|
1992
|
-
className:
|
|
2014
|
+
className: dn.trigger,
|
|
1993
2015
|
children: w
|
|
1994
2016
|
}), /* @__PURE__ */ u("div", {
|
|
1995
|
-
className:
|
|
1996
|
-
id:
|
|
2017
|
+
className: (0, x.default)(dn.tooltip, dn[i], dn[o], m && dn.visible),
|
|
2018
|
+
id: y,
|
|
1997
2019
|
role: "tooltip",
|
|
1998
2020
|
children: e
|
|
1999
2021
|
})]
|
|
2000
2022
|
});
|
|
2001
|
-
},
|
|
2023
|
+
}, pn = { root: "_root_kcagb_1" }, $ = {
|
|
2002
2024
|
item: "_item_m6oh9_1",
|
|
2003
2025
|
itemHeader: "_itemHeader_m6oh9_5",
|
|
2004
2026
|
branch: "_branch_m6oh9_21",
|
|
@@ -2010,49 +2032,49 @@ var U = {
|
|
|
2010
2032
|
};
|
|
2011
2033
|
//#endregion
|
|
2012
2034
|
//#region src/components/Tree/TreeItem.tsx
|
|
2013
|
-
function
|
|
2035
|
+
function mn(e) {
|
|
2014
2036
|
let t = e.closest("[role=\"tree\"]");
|
|
2015
2037
|
t && (t.querySelectorAll("[role=\"treeitem\"]").forEach((e) => {
|
|
2016
2038
|
e.tabIndex = -1;
|
|
2017
2039
|
}), e.tabIndex = 0, e.focus());
|
|
2018
2040
|
}
|
|
2019
|
-
var
|
|
2020
|
-
let [
|
|
2041
|
+
var hn = ({ data: e, label: t, defaultExpanded: n, expandIcon: r, collapseIcon: i, isRoot: a, level: o, setSize: f, posInSet: p }) => {
|
|
2042
|
+
let [m, h] = c(a ? !0 : n ?? !1), g = s(null), _ = typeof e == "object" && !!e, v = _ && (Array.isArray(e) ? e.length > 0 : Object.keys(e).length > 0), y = a ? o : o + 1, b = _ ? Array.isArray(e) ? e.map((e, t) => ({
|
|
2021
2043
|
key: String(t),
|
|
2022
2044
|
value: e
|
|
2023
2045
|
})) : Object.entries(e).map(([e, t]) => ({
|
|
2024
2046
|
key: e,
|
|
2025
2047
|
value: t
|
|
2026
2048
|
})) : [], S = (e) => {
|
|
2027
|
-
e.stopPropagation(),
|
|
2049
|
+
e.stopPropagation(), v && h((e) => !e), g.current && mn(g.current);
|
|
2028
2050
|
}, C = (e) => {
|
|
2029
|
-
if (e.stopPropagation(), !
|
|
2030
|
-
let t =
|
|
2051
|
+
if (e.stopPropagation(), !g.current) return;
|
|
2052
|
+
let t = g.current.closest("[role=\"tree\"]");
|
|
2031
2053
|
t && (t.querySelectorAll("[role=\"treeitem\"]").forEach((e) => {
|
|
2032
2054
|
e.tabIndex = -1;
|
|
2033
|
-
}),
|
|
2055
|
+
}), g.current.tabIndex = 0);
|
|
2034
2056
|
}, w = (e) => {
|
|
2035
2057
|
switch (e.key) {
|
|
2036
2058
|
case "Enter":
|
|
2037
2059
|
case " ":
|
|
2038
|
-
e.preventDefault(),
|
|
2060
|
+
e.preventDefault(), v && h((e) => !e);
|
|
2039
2061
|
break;
|
|
2040
2062
|
case "ArrowRight":
|
|
2041
|
-
if (e.preventDefault(), e.stopPropagation(),
|
|
2042
|
-
else if (
|
|
2043
|
-
let e =
|
|
2044
|
-
e &&
|
|
2063
|
+
if (e.preventDefault(), e.stopPropagation(), v && !m) h(!0);
|
|
2064
|
+
else if (v && m) {
|
|
2065
|
+
let e = g.current?.querySelector("[role=\"treeitem\"]");
|
|
2066
|
+
e && mn(e);
|
|
2045
2067
|
}
|
|
2046
2068
|
break;
|
|
2047
2069
|
case "ArrowLeft":
|
|
2048
|
-
if (e.preventDefault(), e.stopPropagation(),
|
|
2070
|
+
if (e.preventDefault(), e.stopPropagation(), v && m) h(!1);
|
|
2049
2071
|
else {
|
|
2050
|
-
let e =
|
|
2051
|
-
e &&
|
|
2072
|
+
let e = g.current?.parentElement?.closest("[role=\"treeitem\"]");
|
|
2073
|
+
e && mn(e);
|
|
2052
2074
|
}
|
|
2053
2075
|
break;
|
|
2054
2076
|
}
|
|
2055
|
-
},
|
|
2077
|
+
}, ee = /* @__PURE__ */ u("svg", {
|
|
2056
2078
|
width: "10",
|
|
2057
2079
|
height: "10",
|
|
2058
2080
|
viewBox: "0 0 24 24",
|
|
@@ -2062,7 +2084,7 @@ var cn = ({ data: e, label: t, defaultExpanded: n, expandIcon: r, collapseIcon:
|
|
|
2062
2084
|
strokeLinecap: "round",
|
|
2063
2085
|
strokeLinejoin: "round",
|
|
2064
2086
|
children: /* @__PURE__ */ u("polyline", { points: "9 18 15 12 9 6" })
|
|
2065
|
-
}),
|
|
2087
|
+
}), T = /* @__PURE__ */ u("svg", {
|
|
2066
2088
|
width: "10",
|
|
2067
2089
|
height: "10",
|
|
2068
2090
|
viewBox: "0 0 24 24",
|
|
@@ -2072,7 +2094,7 @@ var cn = ({ data: e, label: t, defaultExpanded: n, expandIcon: r, collapseIcon:
|
|
|
2072
2094
|
strokeLinecap: "round",
|
|
2073
2095
|
strokeLinejoin: "round",
|
|
2074
2096
|
children: /* @__PURE__ */ u("polyline", { points: "6 9 12 15 18 9" })
|
|
2075
|
-
}),
|
|
2097
|
+
}), E = () => e === void 0 ? /* @__PURE__ */ u("span", {
|
|
2076
2098
|
className: $.empty,
|
|
2077
2099
|
children: "undefined"
|
|
2078
2100
|
}) : e === null ? /* @__PURE__ */ u("span", {
|
|
@@ -2087,25 +2109,25 @@ var cn = ({ data: e, label: t, defaultExpanded: n, expandIcon: r, collapseIcon:
|
|
|
2087
2109
|
}) : null : /* @__PURE__ */ u("span", {
|
|
2088
2110
|
className: $.value,
|
|
2089
2111
|
children: String(e)
|
|
2090
|
-
}),
|
|
2112
|
+
}), D = b.map((t, a) => /* @__PURE__ */ u(hn, {
|
|
2091
2113
|
label: Array.isArray(e) ? void 0 : t.key,
|
|
2092
2114
|
data: t.value,
|
|
2093
2115
|
defaultExpanded: n,
|
|
2094
2116
|
expandIcon: r,
|
|
2095
2117
|
collapseIcon: i,
|
|
2096
|
-
level:
|
|
2097
|
-
setSize:
|
|
2118
|
+
level: y,
|
|
2119
|
+
setSize: b.length,
|
|
2098
2120
|
posInSet: a + 1
|
|
2099
2121
|
}, t.key));
|
|
2100
|
-
return a ?
|
|
2101
|
-
ref:
|
|
2122
|
+
return a ? v ? /* @__PURE__ */ u(l, { children: D }) : /* @__PURE__ */ u(l, { children: E() }) : /* @__PURE__ */ d("div", {
|
|
2123
|
+
ref: g,
|
|
2102
2124
|
role: "treeitem",
|
|
2103
|
-
"aria-expanded":
|
|
2125
|
+
"aria-expanded": v ? m : void 0,
|
|
2104
2126
|
"aria-level": o,
|
|
2105
2127
|
"aria-setsize": f,
|
|
2106
2128
|
"aria-posinset": p,
|
|
2107
2129
|
tabIndex: -1,
|
|
2108
|
-
className:
|
|
2130
|
+
className: (0, x.default)($.item, v && $.branch),
|
|
2109
2131
|
onClick: S,
|
|
2110
2132
|
onFocus: C,
|
|
2111
2133
|
onKeyDown: w,
|
|
@@ -2115,21 +2137,21 @@ var cn = ({ data: e, label: t, defaultExpanded: n, expandIcon: r, collapseIcon:
|
|
|
2115
2137
|
/* @__PURE__ */ u("span", {
|
|
2116
2138
|
className: $.toggleIcon,
|
|
2117
2139
|
"aria-hidden": "true",
|
|
2118
|
-
children:
|
|
2140
|
+
children: v ? m ? i ?? T : r ?? ee : null
|
|
2119
2141
|
}),
|
|
2120
2142
|
t !== void 0 && /* @__PURE__ */ d("span", {
|
|
2121
2143
|
className: $.key,
|
|
2122
2144
|
children: [t, ":"]
|
|
2123
2145
|
}),
|
|
2124
|
-
!
|
|
2146
|
+
!v && E()
|
|
2125
2147
|
]
|
|
2126
|
-
}),
|
|
2148
|
+
}), v && m && /* @__PURE__ */ u("div", {
|
|
2127
2149
|
role: "group",
|
|
2128
2150
|
className: $.childGroup,
|
|
2129
|
-
children:
|
|
2151
|
+
children: D
|
|
2130
2152
|
})]
|
|
2131
2153
|
});
|
|
2132
|
-
},
|
|
2154
|
+
}, gn = ({ data: e, className: t, defaultExpanded: n, expandIcon: r, collapseIcon: a, ...o }) => {
|
|
2133
2155
|
let c = s(null);
|
|
2134
2156
|
return i(() => {
|
|
2135
2157
|
let e = c.current?.querySelector("[role=\"treeitem\"]");
|
|
@@ -2137,7 +2159,7 @@ var cn = ({ data: e, label: t, defaultExpanded: n, expandIcon: r, collapseIcon:
|
|
|
2137
2159
|
}, []), /* @__PURE__ */ u("div", {
|
|
2138
2160
|
ref: c,
|
|
2139
2161
|
role: "tree",
|
|
2140
|
-
className:
|
|
2162
|
+
className: (0, x.default)(pn.root, t),
|
|
2141
2163
|
onKeyDown: (e) => {
|
|
2142
2164
|
let t = c.current;
|
|
2143
2165
|
if (!t) return;
|
|
@@ -2160,7 +2182,7 @@ var cn = ({ data: e, label: t, defaultExpanded: n, expandIcon: r, collapseIcon:
|
|
|
2160
2182
|
}
|
|
2161
2183
|
},
|
|
2162
2184
|
...o,
|
|
2163
|
-
children: /* @__PURE__ */ u(
|
|
2185
|
+
children: /* @__PURE__ */ u(hn, {
|
|
2164
2186
|
data: e,
|
|
2165
2187
|
defaultExpanded: n,
|
|
2166
2188
|
expandIcon: r,
|
|
@@ -2172,26 +2194,26 @@ var cn = ({ data: e, label: t, defaultExpanded: n, expandIcon: r, collapseIcon:
|
|
|
2172
2194
|
})
|
|
2173
2195
|
});
|
|
2174
2196
|
};
|
|
2175
|
-
|
|
2176
|
-
var
|
|
2197
|
+
gn.Item = hn;
|
|
2198
|
+
var _n = {
|
|
2177
2199
|
root: "_root_1931n_1",
|
|
2178
2200
|
main: "_main_1931n_8",
|
|
2179
2201
|
container: "_container_1931n_13"
|
|
2180
|
-
},
|
|
2181
|
-
className:
|
|
2202
|
+
}, vn = ({ header: e, navbar: t, children: n, className: r, maxWidth: i = "75rem" }) => /* @__PURE__ */ d("div", {
|
|
2203
|
+
className: (0, x.default)(_n.root, r),
|
|
2182
2204
|
children: [
|
|
2183
2205
|
e,
|
|
2184
2206
|
t,
|
|
2185
2207
|
/* @__PURE__ */ u("main", {
|
|
2186
|
-
className:
|
|
2187
|
-
children: /* @__PURE__ */ u(
|
|
2188
|
-
className:
|
|
2208
|
+
className: _n.main,
|
|
2209
|
+
children: /* @__PURE__ */ u(N, {
|
|
2210
|
+
className: _n.container,
|
|
2189
2211
|
maxWidth: i,
|
|
2190
2212
|
children: n
|
|
2191
2213
|
})
|
|
2192
2214
|
})
|
|
2193
2215
|
]
|
|
2194
|
-
}),
|
|
2216
|
+
}), yn = {
|
|
2195
2217
|
root: "_root_416o7_1",
|
|
2196
2218
|
card: "_card_416o7_11",
|
|
2197
2219
|
header: "_header_416o7_21",
|
|
@@ -2199,93 +2221,93 @@ var un = {
|
|
|
2199
2221
|
title: "_title_416o7_32",
|
|
2200
2222
|
description: "_description_416o7_39",
|
|
2201
2223
|
content: "_content_416o7_45"
|
|
2202
|
-
},
|
|
2203
|
-
className:
|
|
2204
|
-
children: /* @__PURE__ */ d(
|
|
2205
|
-
className:
|
|
2206
|
-
children: [/* @__PURE__ */ d(
|
|
2207
|
-
className:
|
|
2224
|
+
}, bn = ({ logo: e, title: t, description: n, children: r, className: i }) => /* @__PURE__ */ u(N, {
|
|
2225
|
+
className: (0, x.default)(yn.root, i),
|
|
2226
|
+
children: /* @__PURE__ */ d(N, {
|
|
2227
|
+
className: yn.card,
|
|
2228
|
+
children: [/* @__PURE__ */ d(N, {
|
|
2229
|
+
className: yn.header,
|
|
2208
2230
|
children: [
|
|
2209
|
-
e && /* @__PURE__ */ u(
|
|
2210
|
-
className:
|
|
2231
|
+
e && /* @__PURE__ */ u(N, {
|
|
2232
|
+
className: yn.logo,
|
|
2211
2233
|
children: e
|
|
2212
2234
|
}),
|
|
2213
|
-
t && /* @__PURE__ */ u(
|
|
2235
|
+
t && /* @__PURE__ */ u(cn, {
|
|
2214
2236
|
variant: "h3",
|
|
2215
2237
|
as: "h1",
|
|
2216
|
-
className:
|
|
2238
|
+
className: yn.title,
|
|
2217
2239
|
children: t
|
|
2218
2240
|
}),
|
|
2219
|
-
n && /* @__PURE__ */ u(
|
|
2241
|
+
n && /* @__PURE__ */ u(cn, {
|
|
2220
2242
|
variant: "body-sm",
|
|
2221
2243
|
color: "subtle",
|
|
2222
|
-
className:
|
|
2244
|
+
className: yn.description,
|
|
2223
2245
|
children: n
|
|
2224
2246
|
})
|
|
2225
2247
|
]
|
|
2226
|
-
}), /* @__PURE__ */ u(
|
|
2227
|
-
className:
|
|
2248
|
+
}), /* @__PURE__ */ u(N, {
|
|
2249
|
+
className: yn.content,
|
|
2228
2250
|
children: r
|
|
2229
2251
|
})]
|
|
2230
2252
|
})
|
|
2231
|
-
}),
|
|
2253
|
+
}), xn = {
|
|
2232
2254
|
root: "_root_1vwxr_1",
|
|
2233
2255
|
main: "_main_1vwxr_7",
|
|
2234
2256
|
container: "_container_1vwxr_11",
|
|
2235
2257
|
topBar: "_topBar_1vwxr_20",
|
|
2236
2258
|
stats: "_stats_1vwxr_27",
|
|
2237
2259
|
content: "_content_1vwxr_33"
|
|
2238
|
-
},
|
|
2239
|
-
className:
|
|
2260
|
+
}, Sn = ({ header: e, breadcrumbs: t, actions: n, stats: r, children: i, className: a }) => /* @__PURE__ */ d("div", {
|
|
2261
|
+
className: (0, x.default)(xn.root, a),
|
|
2240
2262
|
children: [e, /* @__PURE__ */ u("main", {
|
|
2241
|
-
className:
|
|
2263
|
+
className: xn.main,
|
|
2242
2264
|
children: /* @__PURE__ */ d("div", {
|
|
2243
|
-
className:
|
|
2265
|
+
className: xn.container,
|
|
2244
2266
|
children: [
|
|
2245
2267
|
(t || n) && /* @__PURE__ */ d("div", {
|
|
2246
|
-
className:
|
|
2268
|
+
className: xn.topBar,
|
|
2247
2269
|
children: [/* @__PURE__ */ u("div", {
|
|
2248
|
-
className:
|
|
2270
|
+
className: xn.breadcrumbs,
|
|
2249
2271
|
children: t
|
|
2250
2272
|
}), /* @__PURE__ */ u("div", {
|
|
2251
|
-
className:
|
|
2273
|
+
className: xn.actions,
|
|
2252
2274
|
children: n
|
|
2253
2275
|
})]
|
|
2254
2276
|
}),
|
|
2255
2277
|
r && /* @__PURE__ */ u("div", {
|
|
2256
|
-
className:
|
|
2278
|
+
className: xn.stats,
|
|
2257
2279
|
children: r
|
|
2258
2280
|
}),
|
|
2259
2281
|
/* @__PURE__ */ u("div", {
|
|
2260
|
-
className:
|
|
2282
|
+
className: xn.content,
|
|
2261
2283
|
children: i
|
|
2262
2284
|
})
|
|
2263
2285
|
]
|
|
2264
2286
|
})
|
|
2265
2287
|
})]
|
|
2266
|
-
}),
|
|
2288
|
+
}), Cn = {
|
|
2267
2289
|
root: "_root_o4vai_1",
|
|
2268
2290
|
main: "_main_o4vai_7",
|
|
2269
2291
|
container: "_container_o4vai_11",
|
|
2270
2292
|
layoutBody: "_layoutBody_o4vai_20",
|
|
2271
2293
|
sidebar: "_sidebar_o4vai_26",
|
|
2272
2294
|
content: "_content_o4vai_34"
|
|
2273
|
-
},
|
|
2274
|
-
className:
|
|
2295
|
+
}, wn = ({ header: e, breadcrumbs: t, sidebar: n, children: r, className: i }) => /* @__PURE__ */ d("div", {
|
|
2296
|
+
className: (0, x.default)(Cn.root, i),
|
|
2275
2297
|
children: [e, /* @__PURE__ */ u("main", {
|
|
2276
|
-
className:
|
|
2298
|
+
className: Cn.main,
|
|
2277
2299
|
children: /* @__PURE__ */ d("div", {
|
|
2278
|
-
className:
|
|
2300
|
+
className: Cn.container,
|
|
2279
2301
|
children: [t && /* @__PURE__ */ u("div", {
|
|
2280
|
-
className:
|
|
2302
|
+
className: Cn.breadcrumbs,
|
|
2281
2303
|
children: t
|
|
2282
2304
|
}), /* @__PURE__ */ d("div", {
|
|
2283
|
-
className:
|
|
2305
|
+
className: Cn.layoutBody,
|
|
2284
2306
|
children: [n && /* @__PURE__ */ u("aside", {
|
|
2285
|
-
className:
|
|
2307
|
+
className: Cn.sidebar,
|
|
2286
2308
|
children: n
|
|
2287
2309
|
}), /* @__PURE__ */ u("section", {
|
|
2288
|
-
className:
|
|
2310
|
+
className: Cn.content,
|
|
2289
2311
|
children: r
|
|
2290
2312
|
})]
|
|
2291
2313
|
})]
|
|
@@ -2293,4 +2315,4 @@ var un = {
|
|
|
2293
2315
|
})]
|
|
2294
2316
|
});
|
|
2295
2317
|
//#endregion
|
|
2296
|
-
export {
|
|
2318
|
+
export { C as Accordion, vn as AppLayout, bn as AuthLayout, ee as Avatar, E as Badge, N as Box, te as BreadcrumbItem, ne as Breadcrumbs, I as Button, _e as Card, ye as CardContent, be as CardFooter, ve as CardHeader, xe as Checkbox, Sn as DashboardLayout, Te as Divider, Se as Dropdown, Ee as Header, Oe as Input, Re as List, Le as ListItem, Ae as Loader, ze as Modal, De as NavBar, Ve as Notification, Ge as Pagination, Ke as ProgressBar, Ze as RadioButton, bt as Select, wn as SettingsLayout, $e as Skeleton, Xe as Slider, vt as Stepper, St as Switch, Pt as Table, It as TableBody, Bt as TableCell, Lt as TableFooter, zt as TableHead, Ft as TableHeader, Rt as TableRow, Ht as Tabs, cn as Text, un as Textarea, fn as Tooltip, gn as Tree, hn as TreeItem };
|