@mucsi96/react-ui 0.4.0 → 0.5.0
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/README.md +40 -0
- package/dist/components/app-layout/app-layout.d.ts +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +462 -432
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,44 +1,74 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { Button as r, Checkbox as i, ComboBox as a, Dialog as o, DialogTrigger as s, FieldError as c, Group as l, Heading as u, Input as d, Label as f, Link as p, ListBox as m, ListBoxItem as h, Menu as g, MenuItem as _, MenuTrigger as v, MenuTrigger as y, Modal as b, ModalOverlay as x, Popover as S, ProgressBar as C, Radio as w, RadioGroup as T, Select as E, SelectValue as D, Separator as O, SubmenuTrigger as k, Switch as A, Text as j, TextArea as M, TextField as N, Tooltip as ee, TooltipTrigger as te } from "react-aria-components";
|
|
4
4
|
import { createContext as ne, useCallback as P, useContext as re, useEffect as ie, useId as ae, useMemo as oe, useRef as F, useState as I } from "react";
|
|
5
5
|
import { createPortal as se } from "react-dom";
|
|
6
6
|
//#region src/internal/classes.ts
|
|
7
7
|
function L(...e) {
|
|
8
8
|
return e.filter(Boolean).join(" ");
|
|
9
9
|
}
|
|
10
|
-
var R = {
|
|
10
|
+
var R = {
|
|
11
|
+
header: "_header_dm2fi_1",
|
|
12
|
+
headerContent: "_headerContent_dm2fi_8",
|
|
13
|
+
main: "_main_dm2fi_9",
|
|
14
|
+
actions: "_actions_dm2fi_30"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/app-layout/app-layout.tsx
|
|
18
|
+
function ce({ children: e, className: n, ...r }) {
|
|
19
|
+
return /* @__PURE__ */ t("header", {
|
|
20
|
+
...r,
|
|
21
|
+
className: L(R.header, n),
|
|
22
|
+
children: /* @__PURE__ */ t("div", {
|
|
23
|
+
className: R.headerContent,
|
|
24
|
+
children: e
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function le({ className: e, ...n }) {
|
|
29
|
+
return /* @__PURE__ */ t("div", {
|
|
30
|
+
...n,
|
|
31
|
+
className: L(R.actions, e)
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function ue({ className: e, ...n }) {
|
|
35
|
+
return /* @__PURE__ */ t("main", {
|
|
36
|
+
...n,
|
|
37
|
+
className: L(R.main, e)
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
var z = { button: "_button_s6jxa_1" };
|
|
11
41
|
//#endregion
|
|
12
42
|
//#region src/components/button/button.tsx
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
...
|
|
16
|
-
ref:
|
|
17
|
-
className: L(
|
|
18
|
-
"data-variant":
|
|
43
|
+
function B({ variant: e = "filled", tone: n = "primary", background: i, className: a, style: o, children: s, ref: c, ...l }) {
|
|
44
|
+
return /* @__PURE__ */ t(r, {
|
|
45
|
+
...l,
|
|
46
|
+
ref: c,
|
|
47
|
+
className: L(z.button, a),
|
|
48
|
+
"data-variant": e,
|
|
19
49
|
"data-tone": n,
|
|
20
50
|
style: {
|
|
21
|
-
...
|
|
22
|
-
"--bt-button-bg":
|
|
51
|
+
...o,
|
|
52
|
+
"--bt-button-bg": i
|
|
23
53
|
},
|
|
24
|
-
children:
|
|
54
|
+
children: s
|
|
25
55
|
});
|
|
26
56
|
}
|
|
27
|
-
function
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
...
|
|
30
|
-
ref:
|
|
31
|
-
className: L(
|
|
57
|
+
function de({ variant: e = "filled", tone: n = "primary", background: r, className: i, style: a, children: o, ref: s, ...c }) {
|
|
58
|
+
return /* @__PURE__ */ t(p, {
|
|
59
|
+
...c,
|
|
60
|
+
ref: s,
|
|
61
|
+
className: L(z.button, i),
|
|
32
62
|
"data-variant": e,
|
|
33
|
-
"data-tone":
|
|
63
|
+
"data-tone": n,
|
|
34
64
|
style: {
|
|
35
|
-
...
|
|
36
|
-
"--bt-button-bg":
|
|
65
|
+
...a,
|
|
66
|
+
"--bt-button-bg": r
|
|
37
67
|
},
|
|
38
|
-
children:
|
|
68
|
+
children: o
|
|
39
69
|
});
|
|
40
70
|
}
|
|
41
|
-
var
|
|
71
|
+
var V = {
|
|
42
72
|
field: "_field_b8e40_1",
|
|
43
73
|
label: "_label_b8e40_10",
|
|
44
74
|
surface: "_surface_b8e40_14",
|
|
@@ -60,44 +90,44 @@ var B = {
|
|
|
60
90
|
};
|
|
61
91
|
//#endregion
|
|
62
92
|
//#region src/components/forms/text-field.tsx
|
|
63
|
-
function
|
|
64
|
-
return /* @__PURE__ */ N
|
|
65
|
-
...
|
|
66
|
-
ref:
|
|
67
|
-
isInvalid: !!
|
|
68
|
-
className: L(
|
|
69
|
-
"data-appearance":
|
|
93
|
+
function fe({ label: e, description: r, error: i, placeholder: a, multiline: o = !1, rows: s = 3, appearance: l = "filled", className: u, ref: p, ...m }) {
|
|
94
|
+
return /* @__PURE__ */ n(N, {
|
|
95
|
+
...m,
|
|
96
|
+
ref: p,
|
|
97
|
+
isInvalid: !!i || m.isInvalid,
|
|
98
|
+
className: L(V.field, u),
|
|
99
|
+
"data-appearance": l,
|
|
70
100
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
className:
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
-
className:
|
|
75
|
-
children: [e,
|
|
101
|
+
/* @__PURE__ */ n("div", {
|
|
102
|
+
className: V.surface,
|
|
103
|
+
children: [/* @__PURE__ */ n(f, {
|
|
104
|
+
className: V.floatingLabel,
|
|
105
|
+
children: [e, m.isRequired && /* @__PURE__ */ t("span", {
|
|
76
106
|
"aria-hidden": "true",
|
|
77
107
|
children: " *"
|
|
78
108
|
})]
|
|
79
|
-
}),
|
|
80
|
-
className:
|
|
81
|
-
placeholder:
|
|
82
|
-
rows:
|
|
83
|
-
}) : /* @__PURE__ */
|
|
84
|
-
className:
|
|
85
|
-
placeholder:
|
|
109
|
+
}), o ? /* @__PURE__ */ t(M, {
|
|
110
|
+
className: V.input,
|
|
111
|
+
placeholder: a,
|
|
112
|
+
rows: s
|
|
113
|
+
}) : /* @__PURE__ */ t(d, {
|
|
114
|
+
className: V.input,
|
|
115
|
+
placeholder: a
|
|
86
116
|
})]
|
|
87
117
|
}),
|
|
88
|
-
|
|
118
|
+
r && /* @__PURE__ */ t(j, {
|
|
89
119
|
slot: "description",
|
|
90
|
-
className:
|
|
91
|
-
children:
|
|
120
|
+
className: V.description,
|
|
121
|
+
children: r
|
|
92
122
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
className:
|
|
95
|
-
children:
|
|
123
|
+
/* @__PURE__ */ t(c, {
|
|
124
|
+
className: V.error,
|
|
125
|
+
children: i
|
|
96
126
|
})
|
|
97
127
|
]
|
|
98
128
|
});
|
|
99
129
|
}
|
|
100
|
-
var
|
|
130
|
+
var pe = { icon: "_icon_1xold_1" }, me = {
|
|
101
131
|
"chevron-down": "m6 9 6 6 6-6",
|
|
102
132
|
"chevron-right": "m9 6 6 6-6 6",
|
|
103
133
|
"arrow-left": "m12 19-7-7 7-7M5 12h14",
|
|
@@ -107,9 +137,9 @@ var ue = { icon: "_icon_1xold_1" }, de = {
|
|
|
107
137
|
sort: "m8 3-4 4h8M8 3v18m8 0 4-4h-8m4-14v18",
|
|
108
138
|
close: "m6 6 12 12M6 18 18 6"
|
|
109
139
|
};
|
|
110
|
-
function
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
...
|
|
140
|
+
function H({ name: e, className: n, ...r }) {
|
|
141
|
+
return /* @__PURE__ */ t("svg", {
|
|
142
|
+
...r,
|
|
113
143
|
width: "16",
|
|
114
144
|
height: "16",
|
|
115
145
|
viewBox: "0 0 24 24",
|
|
@@ -118,54 +148,54 @@ function V({ name: e, className: t, ...n }) {
|
|
|
118
148
|
strokeWidth: "2",
|
|
119
149
|
strokeLinecap: "round",
|
|
120
150
|
strokeLinejoin: "round",
|
|
121
|
-
className: L(
|
|
151
|
+
className: L(pe.icon, n),
|
|
122
152
|
"aria-hidden": "true",
|
|
123
153
|
focusable: "false",
|
|
124
|
-
children: /* @__PURE__ */
|
|
154
|
+
children: /* @__PURE__ */ t("path", { d: me[e] })
|
|
125
155
|
});
|
|
126
156
|
}
|
|
127
157
|
//#endregion
|
|
128
158
|
//#region src/components/forms/select.tsx
|
|
129
|
-
function
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
...
|
|
132
|
-
isInvalid: !!
|
|
133
|
-
className: L(
|
|
134
|
-
placeholder:
|
|
135
|
-
"data-appearance":
|
|
159
|
+
function he({ label: e, options: i, description: a, error: o, placeholder: s = "Select an option", appearance: l = "filled", className: u, ...d }) {
|
|
160
|
+
return /* @__PURE__ */ n(E, {
|
|
161
|
+
...d,
|
|
162
|
+
isInvalid: !!o || d.isInvalid,
|
|
163
|
+
className: L(V.field, u),
|
|
164
|
+
placeholder: s,
|
|
165
|
+
"data-appearance": l,
|
|
136
166
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
className:
|
|
139
|
-
children: [/* @__PURE__ */
|
|
140
|
-
className:
|
|
141
|
-
children: [
|
|
167
|
+
/* @__PURE__ */ n("div", {
|
|
168
|
+
className: V.surface,
|
|
169
|
+
children: [/* @__PURE__ */ n(f, {
|
|
170
|
+
className: V.floatingLabel,
|
|
171
|
+
children: [e, d.isRequired && /* @__PURE__ */ t("span", {
|
|
142
172
|
"aria-hidden": "true",
|
|
143
173
|
children: " *"
|
|
144
174
|
})]
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
-
className:
|
|
147
|
-
children: [/* @__PURE__ */
|
|
175
|
+
}), /* @__PURE__ */ n(r, {
|
|
176
|
+
className: V.selectButton,
|
|
177
|
+
children: [/* @__PURE__ */ t(D, {}), /* @__PURE__ */ t(H, { name: "chevron-down" })]
|
|
148
178
|
})]
|
|
149
179
|
}),
|
|
150
|
-
|
|
180
|
+
a && /* @__PURE__ */ t(j, {
|
|
151
181
|
slot: "description",
|
|
152
|
-
className:
|
|
153
|
-
children:
|
|
182
|
+
className: V.description,
|
|
183
|
+
children: a
|
|
154
184
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
className:
|
|
157
|
-
children:
|
|
185
|
+
/* @__PURE__ */ t(c, {
|
|
186
|
+
className: V.error,
|
|
187
|
+
children: o
|
|
158
188
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
className:
|
|
161
|
-
children: /* @__PURE__ */
|
|
162
|
-
items:
|
|
163
|
-
className:
|
|
164
|
-
children: (e) => /* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ t(S, {
|
|
190
|
+
className: V.popover,
|
|
191
|
+
children: /* @__PURE__ */ t(m, {
|
|
192
|
+
items: i,
|
|
193
|
+
className: V.list,
|
|
194
|
+
children: (e) => /* @__PURE__ */ t(h, {
|
|
165
195
|
id: e.id,
|
|
166
196
|
textValue: e.label,
|
|
167
197
|
isDisabled: e.isDisabled,
|
|
168
|
-
className:
|
|
198
|
+
className: V.option,
|
|
169
199
|
children: e.label
|
|
170
200
|
})
|
|
171
201
|
})
|
|
@@ -173,53 +203,53 @@ function fe({ label: t, options: n, description: r, error: i, placeholder: o = "
|
|
|
173
203
|
]
|
|
174
204
|
});
|
|
175
205
|
}
|
|
176
|
-
function
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
-
...
|
|
179
|
-
defaultItems:
|
|
180
|
-
isInvalid: !!s ||
|
|
181
|
-
className: L(
|
|
206
|
+
function ge({ label: e, options: i, description: o, error: s, placeholder: u = "Search…", appearance: p = "filled", className: g, ..._ }) {
|
|
207
|
+
return /* @__PURE__ */ n(a, {
|
|
208
|
+
..._,
|
|
209
|
+
defaultItems: i,
|
|
210
|
+
isInvalid: !!s || _.isInvalid,
|
|
211
|
+
className: L(V.field, g),
|
|
182
212
|
"data-appearance": p,
|
|
183
213
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
className:
|
|
186
|
-
children: [/* @__PURE__ */
|
|
187
|
-
className:
|
|
188
|
-
children: [
|
|
214
|
+
/* @__PURE__ */ n("div", {
|
|
215
|
+
className: V.surface,
|
|
216
|
+
children: [/* @__PURE__ */ n(f, {
|
|
217
|
+
className: V.floatingLabel,
|
|
218
|
+
children: [e, _.isRequired && /* @__PURE__ */ t("span", {
|
|
189
219
|
"aria-hidden": "true",
|
|
190
220
|
children: " *"
|
|
191
221
|
})]
|
|
192
|
-
}), /* @__PURE__ */
|
|
193
|
-
className:
|
|
194
|
-
children: [/* @__PURE__ */
|
|
195
|
-
className:
|
|
222
|
+
}), /* @__PURE__ */ n(l, {
|
|
223
|
+
className: V.combo,
|
|
224
|
+
children: [/* @__PURE__ */ t(d, {
|
|
225
|
+
className: V.input,
|
|
196
226
|
placeholder: u
|
|
197
|
-
}), /* @__PURE__ */
|
|
198
|
-
className:
|
|
199
|
-
"aria-label": `Show ${
|
|
200
|
-
children: /* @__PURE__ */
|
|
227
|
+
}), /* @__PURE__ */ t(r, {
|
|
228
|
+
className: V.comboButton,
|
|
229
|
+
"aria-label": `Show ${e.toLowerCase()} options`,
|
|
230
|
+
children: /* @__PURE__ */ t(H, { name: "chevron-down" })
|
|
201
231
|
})]
|
|
202
232
|
})]
|
|
203
233
|
}),
|
|
204
|
-
|
|
234
|
+
o && /* @__PURE__ */ t(j, {
|
|
205
235
|
slot: "description",
|
|
206
|
-
className:
|
|
207
|
-
children:
|
|
236
|
+
className: V.description,
|
|
237
|
+
children: o
|
|
208
238
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
className:
|
|
239
|
+
/* @__PURE__ */ t(c, {
|
|
240
|
+
className: V.error,
|
|
211
241
|
children: s
|
|
212
242
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
className:
|
|
215
|
-
children: /* @__PURE__ */
|
|
216
|
-
className:
|
|
243
|
+
/* @__PURE__ */ t(S, {
|
|
244
|
+
className: V.popover,
|
|
245
|
+
children: /* @__PURE__ */ t(m, {
|
|
246
|
+
className: V.list,
|
|
217
247
|
renderEmptyState: () => "No results",
|
|
218
|
-
children: (e) => /* @__PURE__ */
|
|
248
|
+
children: (e) => /* @__PURE__ */ t(h, {
|
|
219
249
|
id: e.id,
|
|
220
250
|
textValue: e.label,
|
|
221
251
|
isDisabled: e.isDisabled,
|
|
222
|
-
className:
|
|
252
|
+
className: V.option,
|
|
223
253
|
children: e.label
|
|
224
254
|
})
|
|
225
255
|
})
|
|
@@ -229,66 +259,66 @@ function pe({ label: t, options: r, description: i, error: s, placeholder: u = "
|
|
|
229
259
|
}
|
|
230
260
|
//#endregion
|
|
231
261
|
//#region src/components/forms/controls.tsx
|
|
232
|
-
function
|
|
233
|
-
return /* @__PURE__ */
|
|
234
|
-
...
|
|
235
|
-
className: L(
|
|
236
|
-
children: ({ isSelected:
|
|
237
|
-
className:
|
|
262
|
+
function _e({ children: r, className: a, ...o }) {
|
|
263
|
+
return /* @__PURE__ */ t(i, {
|
|
264
|
+
...o,
|
|
265
|
+
className: L(V.control, a),
|
|
266
|
+
children: ({ isSelected: i, isIndeterminate: a }) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
267
|
+
className: V.check,
|
|
238
268
|
"aria-hidden": "true",
|
|
239
|
-
children: (
|
|
269
|
+
children: (i || a) && /* @__PURE__ */ t("svg", {
|
|
240
270
|
viewBox: "0 0 18 18",
|
|
241
271
|
fill: "none",
|
|
242
272
|
stroke: "currentColor",
|
|
243
273
|
strokeWidth: "2",
|
|
244
274
|
focusable: "false",
|
|
245
|
-
children: /* @__PURE__ */
|
|
275
|
+
children: /* @__PURE__ */ t("path", { d: a ? "M3 9h12" : "M3 9l4 4 8-8" })
|
|
246
276
|
})
|
|
247
|
-
}),
|
|
277
|
+
}), r] })
|
|
248
278
|
});
|
|
249
279
|
}
|
|
250
|
-
function
|
|
251
|
-
return /* @__PURE__ */
|
|
252
|
-
...
|
|
253
|
-
className: L(
|
|
254
|
-
children: [/* @__PURE__ */
|
|
255
|
-
className:
|
|
280
|
+
function ve({ label: e, children: r, className: i, ...a }) {
|
|
281
|
+
return /* @__PURE__ */ n(T, {
|
|
282
|
+
...a,
|
|
283
|
+
className: L(V.field, i),
|
|
284
|
+
children: [/* @__PURE__ */ t(f, {
|
|
285
|
+
className: V.label,
|
|
256
286
|
children: e
|
|
257
|
-
}),
|
|
287
|
+
}), r]
|
|
258
288
|
});
|
|
259
289
|
}
|
|
260
|
-
function
|
|
261
|
-
return /* @__PURE__ */
|
|
262
|
-
...
|
|
263
|
-
className: L(
|
|
264
|
-
children: [/* @__PURE__ */
|
|
265
|
-
className:
|
|
290
|
+
function ye({ children: e, className: r, ...i }) {
|
|
291
|
+
return /* @__PURE__ */ n(w, {
|
|
292
|
+
...i,
|
|
293
|
+
className: L(V.control, r),
|
|
294
|
+
children: [/* @__PURE__ */ t("span", {
|
|
295
|
+
className: V.radio,
|
|
266
296
|
"aria-hidden": "true"
|
|
267
297
|
}), e]
|
|
268
298
|
});
|
|
269
299
|
}
|
|
270
|
-
function
|
|
271
|
-
return /* @__PURE__ */
|
|
272
|
-
...
|
|
273
|
-
className: L(
|
|
274
|
-
children: ({ isSelected:
|
|
275
|
-
className:
|
|
300
|
+
function be({ children: r, className: i, ...a }) {
|
|
301
|
+
return /* @__PURE__ */ t(A, {
|
|
302
|
+
...a,
|
|
303
|
+
className: L(V.control, i),
|
|
304
|
+
children: ({ isSelected: i }) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
305
|
+
className: V.track,
|
|
276
306
|
"aria-hidden": "true",
|
|
277
|
-
children: /* @__PURE__ */
|
|
278
|
-
className:
|
|
279
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ t("span", {
|
|
308
|
+
className: V.thumb,
|
|
309
|
+
children: /* @__PURE__ */ t("svg", {
|
|
280
310
|
viewBox: "0 0 24 24",
|
|
281
311
|
fill: "none",
|
|
282
312
|
stroke: "currentColor",
|
|
283
313
|
strokeWidth: "2",
|
|
284
314
|
focusable: "false",
|
|
285
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ t("path", { d: i ? "m5 12 4 4 10-10" : "m7 7 10 10M7 17 17 7" })
|
|
286
316
|
})
|
|
287
317
|
})
|
|
288
|
-
}),
|
|
318
|
+
}), r] })
|
|
289
319
|
});
|
|
290
320
|
}
|
|
291
|
-
var
|
|
321
|
+
var U = {
|
|
292
322
|
slider: "_slider_17fzv_1",
|
|
293
323
|
svg: "_svg_17fzv_11",
|
|
294
324
|
track: "_track_17fzv_27",
|
|
@@ -301,137 +331,137 @@ var H = {
|
|
|
301
331
|
};
|
|
302
332
|
//#endregion
|
|
303
333
|
//#region src/components/donut-slider/donut-slider.tsx
|
|
304
|
-
function
|
|
334
|
+
function W(e, t, n, r) {
|
|
305
335
|
let i = Number((Math.round(e / t) * t).toFixed(12));
|
|
306
336
|
return Math.min(r ?? Infinity, Math.max(n ?? -Infinity, i));
|
|
307
337
|
}
|
|
308
|
-
function
|
|
338
|
+
function G(e) {
|
|
309
339
|
let t = e.currentTarget.getBoundingClientRect();
|
|
310
340
|
return (Math.atan2(e.clientX - t.left - t.width / 2, -(e.clientY - t.top - t.height / 2)) * 180 / Math.PI + 360) % 360;
|
|
311
341
|
}
|
|
312
|
-
function
|
|
313
|
-
let [
|
|
314
|
-
if (!Number.isFinite(
|
|
315
|
-
if (
|
|
316
|
-
if (!Number.isFinite(
|
|
317
|
-
let
|
|
318
|
-
function
|
|
319
|
-
let
|
|
320
|
-
|
|
342
|
+
function xe({ label: e, value: r, defaultValue: i = 0, onChange: a, valuePerTurn: o = 100, step: s = 1, min: c, max: l, unit: u = "", size: d = 220, displayDecimals: f = 0, isDisabled: p = !1, className: m }) {
|
|
343
|
+
let [h, g] = I(i), [_, v] = I(!1), y = F(null), b = F(null);
|
|
344
|
+
if (!Number.isFinite(o) || o <= 0 || !Number.isFinite(s) || s <= 0) throw RangeError("DonutSlider requires positive, finite step and valuePerTurn values.");
|
|
345
|
+
if (c !== void 0 && l !== void 0 && c > l) throw RangeError("DonutSlider min must not exceed max.");
|
|
346
|
+
if (!Number.isFinite(d) || d < 16) throw RangeError("DonutSlider requires a finite size of at least 16 pixels.");
|
|
347
|
+
let x = W(r ?? h, s, c, l), S = (x / o % 1 + 1) % 1, C = (S * 360 - 90) * Math.PI / 180, w = Math.round(d * .14), T = d / 2, E = T - w / 2 - 4, D = 2 * Math.PI * E, O = x.toFixed(Math.min(20, Math.max(0, Math.trunc(f))));
|
|
348
|
+
function k(e) {
|
|
349
|
+
let t = W(e, s, c, l);
|
|
350
|
+
t !== x && (r === void 0 && g(t), a?.(t));
|
|
321
351
|
}
|
|
322
|
-
function
|
|
323
|
-
if (
|
|
324
|
-
let t =
|
|
325
|
-
|
|
352
|
+
function A(e) {
|
|
353
|
+
if (p || e.button !== 0 || y.current) return;
|
|
354
|
+
let t = G(e), n = Math.round(x / o - t / 360);
|
|
355
|
+
y.current = {
|
|
326
356
|
pointerId: e.pointerId,
|
|
327
357
|
lastAngle: t,
|
|
328
358
|
turn: n
|
|
329
|
-
}, e.currentTarget.setPointerCapture(e.pointerId),
|
|
359
|
+
}, e.currentTarget.setPointerCapture(e.pointerId), b.current?.focus(), v(!0), k((n + t / 360) * o), e.preventDefault();
|
|
330
360
|
}
|
|
331
|
-
function
|
|
332
|
-
let t =
|
|
333
|
-
if (
|
|
334
|
-
let n =
|
|
335
|
-
t.lastAngle > 270 && n < 90 ? t.turn += 1 : t.lastAngle < 90 && n > 270 && --t.turn, t.lastAngle = n,
|
|
361
|
+
function j(e) {
|
|
362
|
+
let t = y.current;
|
|
363
|
+
if (p || !t || e.pointerId !== t.pointerId) return;
|
|
364
|
+
let n = G(e);
|
|
365
|
+
t.lastAngle > 270 && n < 90 ? t.turn += 1 : t.lastAngle < 90 && n > 270 && --t.turn, t.lastAngle = n, k((t.turn + n / 360) * o), e.preventDefault();
|
|
336
366
|
}
|
|
337
|
-
function
|
|
338
|
-
e.pointerId ===
|
|
367
|
+
function M(e) {
|
|
368
|
+
e.pointerId === y.current?.pointerId && (y.current = null, v(!1), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
|
|
339
369
|
}
|
|
340
|
-
function
|
|
341
|
-
if (
|
|
370
|
+
function N(e) {
|
|
371
|
+
if (p) return;
|
|
342
372
|
let t;
|
|
343
373
|
switch (e.key) {
|
|
344
374
|
case "ArrowUp":
|
|
345
375
|
case "ArrowRight":
|
|
346
|
-
t =
|
|
376
|
+
t = x + s;
|
|
347
377
|
break;
|
|
348
378
|
case "ArrowDown":
|
|
349
379
|
case "ArrowLeft":
|
|
350
|
-
t =
|
|
380
|
+
t = x - s;
|
|
351
381
|
break;
|
|
352
382
|
case "PageUp":
|
|
353
|
-
t =
|
|
383
|
+
t = x + o / 10;
|
|
354
384
|
break;
|
|
355
385
|
case "PageDown":
|
|
356
|
-
t =
|
|
386
|
+
t = x - o / 10;
|
|
357
387
|
break;
|
|
358
388
|
case "Home":
|
|
359
|
-
if (
|
|
360
|
-
t =
|
|
389
|
+
if (c === void 0) return;
|
|
390
|
+
t = c;
|
|
361
391
|
break;
|
|
362
392
|
case "End":
|
|
363
|
-
if (
|
|
364
|
-
t =
|
|
393
|
+
if (l === void 0) return;
|
|
394
|
+
t = l;
|
|
365
395
|
break;
|
|
366
396
|
default: return;
|
|
367
397
|
}
|
|
368
|
-
e.preventDefault(),
|
|
398
|
+
e.preventDefault(), k(t);
|
|
369
399
|
}
|
|
370
|
-
return /* @__PURE__ */
|
|
371
|
-
ref:
|
|
400
|
+
return /* @__PURE__ */ n("div", {
|
|
401
|
+
ref: b,
|
|
372
402
|
role: "slider",
|
|
373
|
-
tabIndex:
|
|
403
|
+
tabIndex: p ? -1 : 0,
|
|
374
404
|
"aria-label": e,
|
|
375
|
-
"aria-valuenow":
|
|
376
|
-
"aria-valuemin":
|
|
377
|
-
"aria-valuemax":
|
|
378
|
-
"aria-valuetext": `${
|
|
379
|
-
"aria-disabled":
|
|
380
|
-
className: L(
|
|
381
|
-
"data-dragging":
|
|
382
|
-
"data-disabled":
|
|
383
|
-
style: { "--dial-size": `${
|
|
384
|
-
onKeyDown:
|
|
385
|
-
children: [/* @__PURE__ */
|
|
386
|
-
viewBox: `0 0 ${
|
|
387
|
-
className:
|
|
405
|
+
"aria-valuenow": x,
|
|
406
|
+
"aria-valuemin": c,
|
|
407
|
+
"aria-valuemax": l,
|
|
408
|
+
"aria-valuetext": `${O}${u ? ` ${u}` : ""}`,
|
|
409
|
+
"aria-disabled": p || void 0,
|
|
410
|
+
className: L(U.slider, m),
|
|
411
|
+
"data-dragging": _ || void 0,
|
|
412
|
+
"data-disabled": p || void 0,
|
|
413
|
+
style: { "--dial-size": `${d}px` },
|
|
414
|
+
onKeyDown: N,
|
|
415
|
+
children: [/* @__PURE__ */ n("svg", {
|
|
416
|
+
viewBox: `0 0 ${d} ${d}`,
|
|
417
|
+
className: U.svg,
|
|
388
418
|
"aria-hidden": "true",
|
|
389
|
-
onPointerDown:
|
|
390
|
-
onPointerMove:
|
|
391
|
-
onPointerUp:
|
|
392
|
-
onPointerCancel:
|
|
393
|
-
onLostPointerCapture:
|
|
419
|
+
onPointerDown: A,
|
|
420
|
+
onPointerMove: j,
|
|
421
|
+
onPointerUp: M,
|
|
422
|
+
onPointerCancel: M,
|
|
423
|
+
onLostPointerCapture: M,
|
|
394
424
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
cx:
|
|
397
|
-
cy:
|
|
398
|
-
r:
|
|
399
|
-
strokeWidth:
|
|
400
|
-
className:
|
|
425
|
+
/* @__PURE__ */ t("circle", {
|
|
426
|
+
cx: T,
|
|
427
|
+
cy: T,
|
|
428
|
+
r: E,
|
|
429
|
+
strokeWidth: w,
|
|
430
|
+
className: U.track
|
|
401
431
|
}),
|
|
402
|
-
|
|
403
|
-
cx:
|
|
404
|
-
cy:
|
|
405
|
-
r:
|
|
406
|
-
strokeWidth:
|
|
407
|
-
className:
|
|
408
|
-
strokeDasharray: `${
|
|
409
|
-
transform: `rotate(-90 ${
|
|
432
|
+
S * 360 > .5 && /* @__PURE__ */ t("circle", {
|
|
433
|
+
cx: T,
|
|
434
|
+
cy: T,
|
|
435
|
+
r: E,
|
|
436
|
+
strokeWidth: w,
|
|
437
|
+
className: U.progress,
|
|
438
|
+
strokeDasharray: `${S * D} ${D}`,
|
|
439
|
+
transform: `rotate(-90 ${T} ${T})`
|
|
410
440
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
cx:
|
|
413
|
-
cy:
|
|
414
|
-
r:
|
|
415
|
-
className:
|
|
441
|
+
/* @__PURE__ */ t("circle", {
|
|
442
|
+
cx: T + E * Math.cos(C),
|
|
443
|
+
cy: T + E * Math.sin(C),
|
|
444
|
+
r: w / 2 + 2,
|
|
445
|
+
className: U.handle
|
|
416
446
|
})
|
|
417
447
|
]
|
|
418
|
-
}), /* @__PURE__ */
|
|
419
|
-
className:
|
|
448
|
+
}), /* @__PURE__ */ n("div", {
|
|
449
|
+
className: U.readout,
|
|
420
450
|
"aria-hidden": "true",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
422
|
-
className:
|
|
451
|
+
children: [/* @__PURE__ */ t("span", {
|
|
452
|
+
className: U.label,
|
|
423
453
|
children: e
|
|
424
|
-
}), /* @__PURE__ */
|
|
425
|
-
className:
|
|
426
|
-
children: [
|
|
427
|
-
className:
|
|
428
|
-
children:
|
|
454
|
+
}), /* @__PURE__ */ n("span", {
|
|
455
|
+
className: U.value,
|
|
456
|
+
children: [O, /* @__PURE__ */ t("span", {
|
|
457
|
+
className: U.unit,
|
|
458
|
+
children: u
|
|
429
459
|
})]
|
|
430
460
|
})]
|
|
431
461
|
})]
|
|
432
462
|
});
|
|
433
463
|
}
|
|
434
|
-
var
|
|
464
|
+
var K = {
|
|
435
465
|
popover: "_popover_3pd1a_1",
|
|
436
466
|
menu: "_menu_3pd1a_14",
|
|
437
467
|
item: "_item_3pd1a_22",
|
|
@@ -440,32 +470,32 @@ var G = {
|
|
|
440
470
|
};
|
|
441
471
|
//#endregion
|
|
442
472
|
//#region src/components/menu/menu.tsx
|
|
443
|
-
function
|
|
444
|
-
return /* @__PURE__ */
|
|
445
|
-
...
|
|
446
|
-
className: L(
|
|
473
|
+
function q({ className: e, ...n }) {
|
|
474
|
+
return /* @__PURE__ */ t(g, {
|
|
475
|
+
...n,
|
|
476
|
+
className: L(K.menu, e)
|
|
447
477
|
});
|
|
448
478
|
}
|
|
449
|
-
function
|
|
450
|
-
return /* @__PURE__ */
|
|
451
|
-
...
|
|
452
|
-
textValue:
|
|
453
|
-
className: L(
|
|
454
|
-
"data-tone":
|
|
455
|
-
children: ({ hasSubmenu:
|
|
479
|
+
function Se({ className: r, tone: i = "default", children: a, ...o }) {
|
|
480
|
+
return /* @__PURE__ */ t(_, {
|
|
481
|
+
...o,
|
|
482
|
+
textValue: o.textValue ?? (typeof a == "string" ? a : void 0),
|
|
483
|
+
className: L(K.item, r),
|
|
484
|
+
"data-tone": i,
|
|
485
|
+
children: ({ hasSubmenu: r }) => /* @__PURE__ */ n(e, { children: [a, r && /* @__PURE__ */ t(H, {
|
|
456
486
|
name: "chevron-right",
|
|
457
|
-
className:
|
|
487
|
+
className: K.submenuIcon
|
|
458
488
|
})] })
|
|
459
489
|
});
|
|
460
490
|
}
|
|
461
|
-
function
|
|
462
|
-
return /* @__PURE__ */
|
|
463
|
-
...
|
|
464
|
-
className: L(
|
|
491
|
+
function Ce({ className: e, ...n }) {
|
|
492
|
+
return /* @__PURE__ */ t(S, {
|
|
493
|
+
...n,
|
|
494
|
+
className: L(K.popover, e)
|
|
465
495
|
});
|
|
466
496
|
}
|
|
467
|
-
function
|
|
468
|
-
return /* @__PURE__ */
|
|
497
|
+
function we() {
|
|
498
|
+
return /* @__PURE__ */ t(O, { className: K.separator });
|
|
469
499
|
}
|
|
470
500
|
var J = {
|
|
471
501
|
group: "_group_zvomd_1",
|
|
@@ -474,25 +504,25 @@ var J = {
|
|
|
474
504
|
};
|
|
475
505
|
//#endregion
|
|
476
506
|
//#region src/components/split-button/split-button.tsx
|
|
477
|
-
function
|
|
478
|
-
return /* @__PURE__ */
|
|
479
|
-
className: L(J.group,
|
|
480
|
-
children: [/* @__PURE__ */
|
|
481
|
-
...
|
|
507
|
+
function Te({ label: e, icon: r, menuLabel: i = "More actions", children: a, className: o, ...s }) {
|
|
508
|
+
return /* @__PURE__ */ n("div", {
|
|
509
|
+
className: L(J.group, o),
|
|
510
|
+
children: [/* @__PURE__ */ n(B, {
|
|
511
|
+
...s,
|
|
482
512
|
className: J.primary,
|
|
483
|
-
children: [
|
|
484
|
-
}), /* @__PURE__ */
|
|
485
|
-
tone:
|
|
486
|
-
background:
|
|
487
|
-
isDisabled:
|
|
513
|
+
children: [r, e]
|
|
514
|
+
}), /* @__PURE__ */ n(y, { children: [/* @__PURE__ */ t(B, {
|
|
515
|
+
tone: s.tone,
|
|
516
|
+
background: s.background,
|
|
517
|
+
isDisabled: s.isDisabled,
|
|
488
518
|
className: J.trigger,
|
|
489
|
-
"aria-label":
|
|
490
|
-
children: /* @__PURE__ */
|
|
491
|
-
}), /* @__PURE__ */
|
|
519
|
+
"aria-label": i,
|
|
520
|
+
children: /* @__PURE__ */ t(H, { name: "chevron-down" })
|
|
521
|
+
}), /* @__PURE__ */ t(Ce, {
|
|
492
522
|
placement: "bottom end",
|
|
493
|
-
children: /* @__PURE__ */
|
|
494
|
-
"aria-label":
|
|
495
|
-
children:
|
|
523
|
+
children: /* @__PURE__ */ t(q, {
|
|
524
|
+
"aria-label": i,
|
|
525
|
+
children: a
|
|
496
526
|
})
|
|
497
527
|
})] })]
|
|
498
528
|
});
|
|
@@ -507,53 +537,53 @@ var Y = {
|
|
|
507
537
|
};
|
|
508
538
|
//#endregion
|
|
509
539
|
//#region src/components/dialog/dialog.tsx
|
|
510
|
-
function
|
|
511
|
-
let
|
|
512
|
-
return /* @__PURE__ */
|
|
513
|
-
...
|
|
514
|
-
isDismissable:
|
|
540
|
+
function Ee({ title: r, description: i, children: a, role: s = "dialog", className: c, isDismissable: l = !0, ...d }) {
|
|
541
|
+
let f = ae();
|
|
542
|
+
return /* @__PURE__ */ t(x, {
|
|
543
|
+
...d,
|
|
544
|
+
isDismissable: l,
|
|
515
545
|
className: Y.overlay,
|
|
516
|
-
children: /* @__PURE__ */
|
|
546
|
+
children: /* @__PURE__ */ t(b, {
|
|
517
547
|
className: Y.modal,
|
|
518
|
-
children: /* @__PURE__ */
|
|
519
|
-
role:
|
|
520
|
-
"aria-describedby":
|
|
521
|
-
className: L(Y.dialog,
|
|
522
|
-
children: ({ close:
|
|
523
|
-
/* @__PURE__ */
|
|
548
|
+
children: /* @__PURE__ */ t(o, {
|
|
549
|
+
role: s,
|
|
550
|
+
"aria-describedby": i ? f : void 0,
|
|
551
|
+
className: L(Y.dialog, c),
|
|
552
|
+
children: ({ close: o }) => /* @__PURE__ */ n(e, { children: [
|
|
553
|
+
/* @__PURE__ */ n("header", {
|
|
524
554
|
className: Y.header,
|
|
525
|
-
children: [/* @__PURE__ */
|
|
555
|
+
children: [/* @__PURE__ */ t(u, {
|
|
526
556
|
slot: "title",
|
|
527
557
|
className: Y.title,
|
|
528
|
-
children:
|
|
529
|
-
}), /* @__PURE__ */
|
|
558
|
+
children: r
|
|
559
|
+
}), /* @__PURE__ */ t(B, {
|
|
530
560
|
variant: "icon",
|
|
531
561
|
"aria-label": "Close dialog",
|
|
532
|
-
onPress:
|
|
533
|
-
children: /* @__PURE__ */
|
|
562
|
+
onPress: o,
|
|
563
|
+
children: /* @__PURE__ */ t(H, { name: "close" })
|
|
534
564
|
})]
|
|
535
565
|
}),
|
|
536
|
-
|
|
537
|
-
id:
|
|
566
|
+
i && /* @__PURE__ */ t("p", {
|
|
567
|
+
id: f,
|
|
538
568
|
className: Y.description,
|
|
539
|
-
children:
|
|
569
|
+
children: i
|
|
540
570
|
}),
|
|
541
|
-
typeof
|
|
571
|
+
typeof a == "function" ? a({ close: o }) : a
|
|
542
572
|
] })
|
|
543
573
|
})
|
|
544
574
|
})
|
|
545
575
|
});
|
|
546
576
|
}
|
|
547
|
-
var
|
|
577
|
+
var De = { tooltip: "_tooltip_trnx2_1" };
|
|
548
578
|
//#endregion
|
|
549
579
|
//#region src/components/tooltip/tooltip.tsx
|
|
550
|
-
function
|
|
551
|
-
return /* @__PURE__ */
|
|
552
|
-
delay:
|
|
553
|
-
children: [e, /* @__PURE__ */
|
|
554
|
-
className:
|
|
555
|
-
placement:
|
|
556
|
-
children:
|
|
580
|
+
function Oe({ children: e, content: r, placement: i = "top", delay: a = 500 }) {
|
|
581
|
+
return /* @__PURE__ */ n(te, {
|
|
582
|
+
delay: a,
|
|
583
|
+
children: [e, /* @__PURE__ */ t(ee, {
|
|
584
|
+
className: De.tooltip,
|
|
585
|
+
placement: i,
|
|
586
|
+
children: r
|
|
557
587
|
})]
|
|
558
588
|
});
|
|
559
589
|
}
|
|
@@ -570,103 +600,103 @@ var X = {
|
|
|
570
600
|
};
|
|
571
601
|
//#endregion
|
|
572
602
|
//#region src/components/table/data-table.tsx
|
|
573
|
-
function
|
|
574
|
-
let [
|
|
575
|
-
function
|
|
576
|
-
|
|
603
|
+
function ke({ caption: e, rows: r, columns: i, getRowKey: a, pageSize: o = 10, selectedKey: s = null, onSelectionChange: c, getRowLabel: l, emptyMessage: u = "No results found.", className: d }) {
|
|
604
|
+
let [f, p] = I(null), [m, h] = I(0), g = ae(), _ = Math.max(1, Math.trunc(o)), v = Math.max(1, Math.ceil(r.length / _)), y = Math.min(m, v - 1), b = i.find((e) => e.id === f?.column)?.compare, x = (b && f ? [...r].sort((e, t) => b(e, t) * (f.direction === "ascending" ? 1 : -1)) : r).slice(y * _, (y + 1) * _);
|
|
605
|
+
function S(e) {
|
|
606
|
+
p((t) => t?.column === e ? t.direction === "ascending" ? {
|
|
577
607
|
column: e,
|
|
578
608
|
direction: "descending"
|
|
579
609
|
} : null : {
|
|
580
610
|
column: e,
|
|
581
611
|
direction: "ascending"
|
|
582
|
-
}),
|
|
612
|
+
}), h(0);
|
|
583
613
|
}
|
|
584
|
-
return /* @__PURE__ */
|
|
585
|
-
className: L(X.container,
|
|
614
|
+
return /* @__PURE__ */ n("div", {
|
|
615
|
+
className: L(X.container, d),
|
|
586
616
|
children: [
|
|
587
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ t("div", {
|
|
588
618
|
className: X.scroll,
|
|
589
|
-
children: /* @__PURE__ */
|
|
619
|
+
children: /* @__PURE__ */ n("table", {
|
|
590
620
|
className: X.table,
|
|
591
|
-
"aria-describedby":
|
|
621
|
+
"aria-describedby": x.length === 0 ? g : void 0,
|
|
592
622
|
children: [
|
|
593
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ t("caption", {
|
|
594
624
|
className: X.caption,
|
|
595
|
-
children: /* @__PURE__ */
|
|
625
|
+
children: /* @__PURE__ */ t("span", {
|
|
596
626
|
className: X.captionText,
|
|
597
627
|
children: e
|
|
598
628
|
})
|
|
599
629
|
}),
|
|
600
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ n("tr", { children: [c && /* @__PURE__ */ t("th", {
|
|
601
631
|
scope: "col",
|
|
602
|
-
children: /* @__PURE__ */
|
|
632
|
+
children: /* @__PURE__ */ t("span", {
|
|
603
633
|
className: X.srOnly,
|
|
604
634
|
children: "Selection"
|
|
605
635
|
})
|
|
606
|
-
}),
|
|
636
|
+
}), i.map((e) => /* @__PURE__ */ t("th", {
|
|
607
637
|
scope: "col",
|
|
608
638
|
"data-align": e.align,
|
|
609
|
-
"aria-sort": e.compare ?
|
|
610
|
-
children: e.compare ? /* @__PURE__ */
|
|
639
|
+
"aria-sort": e.compare ? f?.column === e.id ? f.direction : "none" : void 0,
|
|
640
|
+
children: e.compare ? /* @__PURE__ */ n("button", {
|
|
611
641
|
className: X.sort,
|
|
612
|
-
onClick: () =>
|
|
613
|
-
children: [e.label, /* @__PURE__ */
|
|
642
|
+
onClick: () => S(e.id),
|
|
643
|
+
children: [e.label, /* @__PURE__ */ t(H, { name: f?.column === e.id ? f.direction === "ascending" ? "arrow-up" : "arrow-down" : "sort" })]
|
|
614
644
|
}) : e.label
|
|
615
645
|
}, e.id))] }) }),
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
-
let
|
|
618
|
-
return /* @__PURE__ */
|
|
619
|
-
"data-selected":
|
|
620
|
-
children: [
|
|
646
|
+
/* @__PURE__ */ t("tbody", { children: x.map((e) => {
|
|
647
|
+
let r = a(e);
|
|
648
|
+
return /* @__PURE__ */ n("tr", {
|
|
649
|
+
"data-selected": r === s || void 0,
|
|
650
|
+
children: [c && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(B, {
|
|
621
651
|
variant: "icon",
|
|
622
|
-
"aria-label": `Select ${
|
|
623
|
-
"aria-pressed":
|
|
624
|
-
onPress: () =>
|
|
625
|
-
children: /* @__PURE__ */
|
|
626
|
-
}) }),
|
|
627
|
-
"data-align":
|
|
628
|
-
children:
|
|
629
|
-
},
|
|
630
|
-
},
|
|
652
|
+
"aria-label": `Select ${l?.(e) ?? String(r)}`,
|
|
653
|
+
"aria-pressed": s === r,
|
|
654
|
+
onPress: () => c(s === r ? null : r),
|
|
655
|
+
children: /* @__PURE__ */ t(H, { name: "chevron-right" })
|
|
656
|
+
}) }), i.map((n) => /* @__PURE__ */ t("td", {
|
|
657
|
+
"data-align": n.align,
|
|
658
|
+
children: n.renderCell(e)
|
|
659
|
+
}, n.id))]
|
|
660
|
+
}, r);
|
|
631
661
|
}) })
|
|
632
662
|
]
|
|
633
663
|
})
|
|
634
664
|
}),
|
|
635
|
-
|
|
636
|
-
id:
|
|
665
|
+
x.length === 0 && /* @__PURE__ */ t("p", {
|
|
666
|
+
id: g,
|
|
637
667
|
className: X.empty,
|
|
638
|
-
children:
|
|
668
|
+
children: u
|
|
639
669
|
}),
|
|
640
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ n("nav", {
|
|
641
671
|
"aria-label": `${e} pagination`,
|
|
642
672
|
className: X.pagination,
|
|
643
673
|
children: [
|
|
644
|
-
/* @__PURE__ */
|
|
645
|
-
|
|
674
|
+
/* @__PURE__ */ n("span", { children: [
|
|
675
|
+
r.length === 0 ? 0 : y * _ + 1,
|
|
646
676
|
"–",
|
|
647
|
-
Math.min((
|
|
677
|
+
Math.min((y + 1) * _, r.length),
|
|
648
678
|
" of ",
|
|
649
|
-
|
|
679
|
+
r.length
|
|
650
680
|
] }),
|
|
651
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ t(B, {
|
|
652
682
|
variant: "text",
|
|
653
683
|
"aria-label": "Previous page",
|
|
654
|
-
isDisabled:
|
|
655
|
-
onPress: () =>
|
|
656
|
-
children: /* @__PURE__ */
|
|
684
|
+
isDisabled: y === 0,
|
|
685
|
+
onPress: () => h(y - 1),
|
|
686
|
+
children: /* @__PURE__ */ t(H, { name: "arrow-left" })
|
|
657
687
|
}),
|
|
658
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ n("span", { children: [
|
|
659
689
|
"Page ",
|
|
660
|
-
|
|
690
|
+
y + 1,
|
|
661
691
|
" of ",
|
|
662
|
-
|
|
692
|
+
v
|
|
663
693
|
] }),
|
|
664
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ t(B, {
|
|
665
695
|
variant: "text",
|
|
666
696
|
"aria-label": "Next page",
|
|
667
|
-
isDisabled:
|
|
668
|
-
onPress: () =>
|
|
669
|
-
children: /* @__PURE__ */
|
|
697
|
+
isDisabled: y === v - 1,
|
|
698
|
+
onPress: () => h(y + 1),
|
|
699
|
+
children: /* @__PURE__ */ t(H, { name: "arrow-right" })
|
|
670
700
|
})
|
|
671
701
|
]
|
|
672
702
|
})
|
|
@@ -681,91 +711,91 @@ var Z = {
|
|
|
681
711
|
};
|
|
682
712
|
//#endregion
|
|
683
713
|
//#region src/components/notifications/notifications.tsx
|
|
684
|
-
function
|
|
685
|
-
return /* @__PURE__ */
|
|
686
|
-
...
|
|
687
|
-
role:
|
|
688
|
-
className: L(Z.alert,
|
|
714
|
+
function Ae({ tone: e = "info", title: r, children: i, className: a, role: o, ...s }) {
|
|
715
|
+
return /* @__PURE__ */ t("div", {
|
|
716
|
+
...s,
|
|
717
|
+
role: o ?? (e === "error" ? "alert" : "status"),
|
|
718
|
+
className: L(Z.alert, a),
|
|
689
719
|
"data-tone": e,
|
|
690
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ n("div", { children: [r && /* @__PURE__ */ t("strong", {
|
|
691
721
|
className: Z.title,
|
|
692
|
-
children:
|
|
693
|
-
}),
|
|
722
|
+
children: r
|
|
723
|
+
}), i] })
|
|
694
724
|
});
|
|
695
725
|
}
|
|
696
|
-
var
|
|
697
|
-
function
|
|
698
|
-
let [
|
|
726
|
+
var je = ne(null);
|
|
727
|
+
function Me({ notification: e, dismiss: r }) {
|
|
728
|
+
let [i, a] = I(!1), [o, s] = I(!1), c = F(e.duration);
|
|
699
729
|
return ie(() => {
|
|
700
|
-
if (
|
|
701
|
-
let
|
|
730
|
+
if (i || o || e.duration <= 0) return;
|
|
731
|
+
let t = Date.now(), n = setTimeout(() => r(e.id), Math.max(0, c.current));
|
|
702
732
|
return () => {
|
|
703
|
-
clearTimeout(
|
|
733
|
+
clearTimeout(n), c.current = Math.max(0, c.current - (Date.now() - t));
|
|
704
734
|
};
|
|
705
735
|
}, [
|
|
706
|
-
n,
|
|
707
736
|
i,
|
|
737
|
+
o,
|
|
708
738
|
e.duration,
|
|
709
739
|
e.id,
|
|
710
|
-
|
|
711
|
-
]), /* @__PURE__ */
|
|
740
|
+
r
|
|
741
|
+
]), /* @__PURE__ */ n("div", {
|
|
712
742
|
className: Z.alert,
|
|
713
743
|
"data-tone": e.tone,
|
|
714
744
|
role: e.tone === "error" ? "alert" : "status",
|
|
715
|
-
onMouseEnter: () =>
|
|
716
|
-
onMouseLeave: () =>
|
|
717
|
-
onFocus: () =>
|
|
745
|
+
onMouseEnter: () => a(!0),
|
|
746
|
+
onMouseLeave: () => a(!1),
|
|
747
|
+
onFocus: () => s(!0),
|
|
718
748
|
onBlur: (e) => {
|
|
719
|
-
e.currentTarget.contains(e.relatedTarget) ||
|
|
749
|
+
e.currentTarget.contains(e.relatedTarget) || s(!1);
|
|
720
750
|
},
|
|
721
|
-
children: [/* @__PURE__ */
|
|
751
|
+
children: [/* @__PURE__ */ n("div", { children: [e.title && /* @__PURE__ */ t("strong", {
|
|
722
752
|
className: Z.title,
|
|
723
753
|
children: e.title
|
|
724
|
-
}), e.message] }), /* @__PURE__ */
|
|
754
|
+
}), e.message] }), /* @__PURE__ */ t("button", {
|
|
725
755
|
className: Z.dismiss,
|
|
726
|
-
onClick: () =>
|
|
756
|
+
onClick: () => r(e.id),
|
|
727
757
|
"aria-label": "Dismiss notification",
|
|
728
|
-
children: /* @__PURE__ */
|
|
758
|
+
children: /* @__PURE__ */ t(H, { name: "close" })
|
|
729
759
|
})]
|
|
730
760
|
});
|
|
731
761
|
}
|
|
732
|
-
function
|
|
733
|
-
let [
|
|
734
|
-
let
|
|
735
|
-
return
|
|
736
|
-
...
|
|
737
|
-
id:
|
|
762
|
+
function Ne({ children: e, defaultDuration: r = 4e3 }) {
|
|
763
|
+
let [i, a] = I([]), o = F(0), s = P((e) => a((t) => t.filter((t) => t.id !== e)), []), c = P(() => a([]), []), l = P((e, t, n = {}) => {
|
|
764
|
+
let i = ++o.current;
|
|
765
|
+
return a((a) => [...a, {
|
|
766
|
+
...n,
|
|
767
|
+
id: i,
|
|
738
768
|
tone: e,
|
|
739
|
-
message:
|
|
740
|
-
duration:
|
|
741
|
-
}]),
|
|
742
|
-
}, [
|
|
743
|
-
info: (e, t) =>
|
|
744
|
-
success: (e, t) =>
|
|
745
|
-
warn: (e, t) =>
|
|
746
|
-
error: (e, t) =>
|
|
747
|
-
dismiss:
|
|
748
|
-
clear:
|
|
769
|
+
message: t,
|
|
770
|
+
duration: n.duration ?? r
|
|
771
|
+
}]), i;
|
|
772
|
+
}, [r]), u = oe(() => ({
|
|
773
|
+
info: (e, t) => l("info", e, t),
|
|
774
|
+
success: (e, t) => l("success", e, t),
|
|
775
|
+
warn: (e, t) => l("warn", e, t),
|
|
776
|
+
error: (e, t) => l("error", e, t),
|
|
777
|
+
dismiss: s,
|
|
778
|
+
clear: c
|
|
749
779
|
}), [
|
|
780
|
+
l,
|
|
750
781
|
s,
|
|
751
|
-
|
|
752
|
-
o
|
|
782
|
+
c
|
|
753
783
|
]);
|
|
754
|
-
return /* @__PURE__ */
|
|
755
|
-
value:
|
|
756
|
-
children: [e,
|
|
784
|
+
return /* @__PURE__ */ n(je, {
|
|
785
|
+
value: u,
|
|
786
|
+
children: [e, i.length > 0 && typeof document < "u" && se(/* @__PURE__ */ t("section", {
|
|
757
787
|
className: Z.region,
|
|
758
788
|
"aria-label": "Notifications",
|
|
759
789
|
"data-react-aria-top-layer": !0,
|
|
760
|
-
children:
|
|
790
|
+
children: i.map((e) => /* @__PURE__ */ t(Me, {
|
|
761
791
|
notification: e,
|
|
762
|
-
dismiss:
|
|
792
|
+
dismiss: s
|
|
763
793
|
}, e.id))
|
|
764
794
|
}), document.body)]
|
|
765
795
|
});
|
|
766
796
|
}
|
|
767
|
-
function
|
|
768
|
-
let e = re(
|
|
797
|
+
function Pe() {
|
|
798
|
+
let e = re(je);
|
|
769
799
|
if (!e) throw Error("useNotifications must be used within NotificationsProvider.");
|
|
770
800
|
return e;
|
|
771
801
|
}
|
|
@@ -781,40 +811,40 @@ var Q = {
|
|
|
781
811
|
};
|
|
782
812
|
//#endregion
|
|
783
813
|
//#region src/components/loader/loader.tsx
|
|
784
|
-
function
|
|
785
|
-
return /* @__PURE__ */
|
|
814
|
+
function Fe({ label: e = "Loading", color: n, className: r }) {
|
|
815
|
+
return /* @__PURE__ */ t("div", {
|
|
786
816
|
role: "progressbar",
|
|
787
817
|
"aria-label": e,
|
|
788
818
|
"aria-busy": "true",
|
|
789
|
-
className: L(Q.bars,
|
|
790
|
-
style: { "--bt-bar-loader-color":
|
|
819
|
+
className: L(Q.bars, r),
|
|
820
|
+
style: { "--bt-bar-loader-color": n },
|
|
791
821
|
children: [
|
|
792
822
|
0,
|
|
793
823
|
1,
|
|
794
824
|
2,
|
|
795
825
|
3,
|
|
796
826
|
4
|
|
797
|
-
].map((e) => /* @__PURE__ */
|
|
827
|
+
].map((e) => /* @__PURE__ */ t("span", { "aria-hidden": "true" }, e))
|
|
798
828
|
});
|
|
799
829
|
}
|
|
800
|
-
function
|
|
801
|
-
return /* @__PURE__ */
|
|
830
|
+
function Ie({ label: e = "Loading", className: n }) {
|
|
831
|
+
return /* @__PURE__ */ t("div", {
|
|
802
832
|
role: "progressbar",
|
|
803
833
|
"aria-label": e,
|
|
804
834
|
"aria-busy": "true",
|
|
805
|
-
className: L(Q.spinner,
|
|
835
|
+
className: L(Q.spinner, n)
|
|
806
836
|
});
|
|
807
837
|
}
|
|
808
|
-
function
|
|
809
|
-
return /* @__PURE__ */
|
|
810
|
-
...
|
|
811
|
-
className: L(Q.progress,
|
|
812
|
-
children: ({ percentage:
|
|
838
|
+
function Le({ label: r, className: i, ...a }) {
|
|
839
|
+
return /* @__PURE__ */ t(C, {
|
|
840
|
+
...a,
|
|
841
|
+
className: L(Q.progress, i),
|
|
842
|
+
children: ({ percentage: i, isIndeterminate: a }) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t(f, { children: r }), /* @__PURE__ */ t("div", {
|
|
813
843
|
className: Q.track,
|
|
814
|
-
children: /* @__PURE__ */
|
|
844
|
+
children: /* @__PURE__ */ t("div", {
|
|
815
845
|
className: Q.fill,
|
|
816
|
-
"data-indeterminate":
|
|
817
|
-
style: { width:
|
|
846
|
+
"data-indeterminate": a || void 0,
|
|
847
|
+
style: { width: a ? "35%" : `${i}%` }
|
|
818
848
|
})
|
|
819
849
|
})] })
|
|
820
850
|
});
|
|
@@ -830,41 +860,41 @@ var $ = {
|
|
|
830
860
|
};
|
|
831
861
|
//#endregion
|
|
832
862
|
//#region src/components/surface/surface.tsx
|
|
833
|
-
function
|
|
834
|
-
return /* @__PURE__ */
|
|
835
|
-
...
|
|
836
|
-
className: L($.card,
|
|
863
|
+
function Re({ variant: e = "outlined", className: n, ...r }) {
|
|
864
|
+
return /* @__PURE__ */ t("section", {
|
|
865
|
+
...r,
|
|
866
|
+
className: L($.card, n),
|
|
837
867
|
"data-variant": e
|
|
838
868
|
});
|
|
839
869
|
}
|
|
840
|
-
function
|
|
841
|
-
return /* @__PURE__ */
|
|
842
|
-
...
|
|
843
|
-
className: L($.badge,
|
|
870
|
+
function ze({ tone: e = "neutral", className: n, ...r }) {
|
|
871
|
+
return /* @__PURE__ */ t("span", {
|
|
872
|
+
...r,
|
|
873
|
+
className: L($.badge, n),
|
|
844
874
|
"data-tone": e
|
|
845
875
|
});
|
|
846
876
|
}
|
|
847
|
-
function
|
|
848
|
-
let
|
|
849
|
-
return /* @__PURE__ */
|
|
850
|
-
...
|
|
851
|
-
className: L($.heading,
|
|
877
|
+
function Be({ level: e = 2, className: n, ...r }) {
|
|
878
|
+
let i = `h${e}`;
|
|
879
|
+
return /* @__PURE__ */ t(i, {
|
|
880
|
+
...r,
|
|
881
|
+
className: L($.heading, n)
|
|
852
882
|
});
|
|
853
883
|
}
|
|
854
|
-
function
|
|
855
|
-
return /* @__PURE__ */
|
|
856
|
-
...
|
|
857
|
-
className: L($.text, e && $.muted,
|
|
884
|
+
function Ve({ muted: e = !1, className: n, ...r }) {
|
|
885
|
+
return /* @__PURE__ */ t("p", {
|
|
886
|
+
...r,
|
|
887
|
+
className: L($.text, e && $.muted, n)
|
|
858
888
|
});
|
|
859
889
|
}
|
|
860
|
-
function
|
|
861
|
-
return /* @__PURE__ */
|
|
890
|
+
function He({ children: e }) {
|
|
891
|
+
return /* @__PURE__ */ t("code", {
|
|
862
892
|
className: $.code,
|
|
863
893
|
children: e
|
|
864
894
|
});
|
|
865
895
|
}
|
|
866
|
-
function
|
|
867
|
-
return /* @__PURE__ */
|
|
896
|
+
function Ue() {
|
|
897
|
+
return /* @__PURE__ */ t("hr", { className: $.divider });
|
|
868
898
|
}
|
|
869
899
|
//#endregion
|
|
870
|
-
export {
|
|
900
|
+
export { Ae as Alert, ce as AppHeader, le as AppHeaderActions, ue as AppMain, ze as Badge, Fe as BarLoader, B as Button, Re as Card, _e as Checkbox, He as Code, ge as ComboBox, ke as DataTable, Ee as Dialog, s as DialogTrigger, Ue as Divider, xe as DonutSlider, Be as Heading, de as LinkButton, q as Menu, Se as MenuItem, Ce as MenuPopover, we as MenuSeparator, v as MenuTrigger, Ne as NotificationsProvider, Le as ProgressBar, ye as Radio, ve as RadioGroup, he as Select, Ie as Spinner, Te as SplitButton, k as SubmenuTrigger, be as Switch, Ve as Text, fe as TextField, Oe as Tooltip, Pe as useNotifications };
|