@indxsearch/systm 2.6.0 → 2.7.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/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import e, { useCallback as t, useEffect as n,
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { Check as
|
|
4
|
-
import { Range as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
var
|
|
1
|
+
import e, { useCallback as t, useEffect as n, useId as r, useRef as i, useState as a } from "react";
|
|
2
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import { Check as l, Chevron_down as u, Chevron_left as d, Chevron_right as f, Minus as p, Plus as m, Search as h, X_or_error as g } from "@indxsearch/pixl";
|
|
4
|
+
import { Range as _ } from "react-range";
|
|
5
|
+
import * as v from "@radix-ui/react-select";
|
|
6
|
+
import * as y from "@radix-ui/react-popover";
|
|
7
|
+
import * as b from "@radix-ui/react-tooltip";
|
|
8
|
+
import * as x from "@radix-ui/react-dialog";
|
|
9
|
+
var S = {
|
|
10
10
|
button: "_button_1sns4_1",
|
|
11
11
|
micro: "_micro_1sns4_22",
|
|
12
12
|
default: "_default_1sns4_30",
|
|
@@ -17,99 +17,104 @@ var x = {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/Button/Button.tsx
|
|
20
|
-
function
|
|
21
|
-
let { size: n = "default", variant: r = "primary", iconLeft: i, iconRight:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
function C(t) {
|
|
21
|
+
let { size: n = "default", variant: r = "primary", iconLeft: i, iconRight: a, className: l, children: u, disabled: d = !1, ...f } = t, { href: p } = f, m = n === "micro" ? "14px" : n === "large" ? "21px" : "14px", h = [
|
|
22
|
+
S.button,
|
|
23
|
+
S[n],
|
|
24
|
+
S[r],
|
|
25
|
+
d ? "cursor-not-allowed" : "cursor-pointer",
|
|
26
26
|
l
|
|
27
|
-
].filter(Boolean).join(" ")
|
|
28
|
-
if (process.env.NODE_ENV !== "production") {
|
|
29
|
-
let e = (i || c) && !u, t = d["aria-label"] || d["aria-labelledby"];
|
|
30
|
-
e && !t && console.warn("Button: Icon-only buttons should have an aria-label or aria-labelledby for accessibility.");
|
|
31
|
-
}
|
|
32
|
-
let g = /* @__PURE__ */ s(a, { children: [
|
|
27
|
+
].filter(Boolean).join(" "), g = /* @__PURE__ */ c(o, { children: [
|
|
33
28
|
i && e.cloneElement(i, {
|
|
34
29
|
size: m,
|
|
35
30
|
color: "currentColor"
|
|
36
31
|
}),
|
|
37
32
|
u,
|
|
38
|
-
|
|
33
|
+
a && e.cloneElement(a, {
|
|
39
34
|
size: m,
|
|
40
35
|
color: "currentColor"
|
|
41
36
|
})
|
|
42
37
|
] });
|
|
43
|
-
if (
|
|
44
|
-
let { type: e,
|
|
45
|
-
return /* @__PURE__ */
|
|
38
|
+
if (p) {
|
|
39
|
+
let { type: e, href: t, onClick: n, tabIndex: r, ...i } = f;
|
|
40
|
+
return d ? /* @__PURE__ */ s("a", {
|
|
41
|
+
className: h,
|
|
42
|
+
...i,
|
|
43
|
+
"aria-disabled": "true",
|
|
44
|
+
tabIndex: -1,
|
|
45
|
+
onClick: (e) => {
|
|
46
|
+
e.preventDefault(), e.stopPropagation();
|
|
47
|
+
},
|
|
48
|
+
children: g
|
|
49
|
+
}) : /* @__PURE__ */ s("a", {
|
|
46
50
|
className: h,
|
|
47
|
-
href:
|
|
48
|
-
...
|
|
49
|
-
|
|
50
|
-
onClick:
|
|
51
|
+
href: p,
|
|
52
|
+
...i,
|
|
53
|
+
tabIndex: r,
|
|
54
|
+
onClick: n,
|
|
51
55
|
children: g
|
|
52
56
|
});
|
|
53
57
|
}
|
|
54
|
-
let { type: _ = "button",
|
|
55
|
-
return /* @__PURE__ */
|
|
58
|
+
let { type: _ = "button", href: v, ...y } = f;
|
|
59
|
+
return /* @__PURE__ */ s("button", {
|
|
56
60
|
className: h,
|
|
57
61
|
type: _,
|
|
58
|
-
|
|
62
|
+
disabled: d,
|
|
63
|
+
...y,
|
|
59
64
|
children: g
|
|
60
65
|
});
|
|
61
66
|
}
|
|
62
|
-
var
|
|
67
|
+
var w = {
|
|
63
68
|
checkboxWrapper: "_checkboxWrapper_1vygn_1",
|
|
64
69
|
checkbox: "_checkbox_1vygn_1",
|
|
65
70
|
label: "_label_1vygn_44",
|
|
66
71
|
score: "_score_1vygn_48",
|
|
67
72
|
disabled: "_disabled_1vygn_55"
|
|
68
|
-
},
|
|
69
|
-
let l = e.useId(), u = i || l, d = n ? `${u}-score` : void 0, f =
|
|
70
|
-
return t || n ? /* @__PURE__ */
|
|
73
|
+
}, T = ({ label: t, score: n, className: r = "", id: i, "aria-label": a, ...o }) => {
|
|
74
|
+
let l = e.useId(), u = i || l, d = n ? `${u}-score` : void 0, f = o.disabled;
|
|
75
|
+
return t || n ? /* @__PURE__ */ c("label", {
|
|
71
76
|
htmlFor: u,
|
|
72
|
-
className: `${
|
|
77
|
+
className: `${w.checkboxWrapper} ${r} ${f ? w.disabled : ""} ${f ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
73
78
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ s("input", {
|
|
75
80
|
id: u,
|
|
76
81
|
type: "checkbox",
|
|
77
|
-
className:
|
|
82
|
+
className: w.checkbox,
|
|
78
83
|
"aria-describedby": d,
|
|
79
84
|
"aria-label": a,
|
|
80
|
-
...
|
|
85
|
+
...o
|
|
81
86
|
}),
|
|
82
|
-
t && /* @__PURE__ */
|
|
83
|
-
className:
|
|
87
|
+
t && /* @__PURE__ */ s("span", {
|
|
88
|
+
className: w.label,
|
|
84
89
|
children: t
|
|
85
90
|
}),
|
|
86
|
-
n && /* @__PURE__ */
|
|
91
|
+
n && /* @__PURE__ */ s("span", {
|
|
87
92
|
id: d,
|
|
88
|
-
className:
|
|
93
|
+
className: w.score,
|
|
89
94
|
children: n
|
|
90
95
|
})
|
|
91
96
|
]
|
|
92
|
-
}) : /* @__PURE__ */
|
|
97
|
+
}) : /* @__PURE__ */ s("input", {
|
|
93
98
|
id: u,
|
|
94
99
|
type: "checkbox",
|
|
95
|
-
className: `${
|
|
100
|
+
className: `${w.checkbox} ${r}`,
|
|
96
101
|
"aria-label": a,
|
|
97
102
|
disabled: f,
|
|
98
|
-
...
|
|
103
|
+
...o
|
|
99
104
|
});
|
|
100
|
-
},
|
|
105
|
+
}, E = {
|
|
101
106
|
container: "_container_dlzj1_1",
|
|
102
107
|
default: "_default_dlzj1_5"
|
|
103
108
|
};
|
|
104
109
|
//#endregion
|
|
105
110
|
//#region src/components/Base/Base.tsx
|
|
106
|
-
function
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
className: `${
|
|
111
|
+
function D({ children: e, className: t }) {
|
|
112
|
+
return /* @__PURE__ */ s("div", {
|
|
113
|
+
className: `${E.container} ${E.default} ${t || ""}`,
|
|
109
114
|
children: e
|
|
110
115
|
});
|
|
111
116
|
}
|
|
112
|
-
var
|
|
117
|
+
var O = {
|
|
113
118
|
container: "_container_10bfq_1",
|
|
114
119
|
header: "_header_10bfq_11",
|
|
115
120
|
title: "_title_10bfq_31",
|
|
@@ -118,47 +123,47 @@ var D = {
|
|
|
118
123
|
};
|
|
119
124
|
//#endregion
|
|
120
125
|
//#region src/components/FilterPanelBase/FilterPanelBase.tsx
|
|
121
|
-
function
|
|
122
|
-
let [u, d] =
|
|
126
|
+
function k({ title: t, children: r, className: i = "", collapsible: o = !0, collapsed: l = !1 }) {
|
|
127
|
+
let [u, d] = a(() => !l), f = e.useId();
|
|
123
128
|
return n(() => {
|
|
124
|
-
|
|
125
|
-
}, [l,
|
|
126
|
-
className: `${
|
|
127
|
-
children: [t && (
|
|
129
|
+
o && d(!l);
|
|
130
|
+
}, [l, o]), /* @__PURE__ */ c("div", {
|
|
131
|
+
className: `${O.container} ${i}`,
|
|
132
|
+
children: [t && (o ? /* @__PURE__ */ c("button", {
|
|
128
133
|
type: "button",
|
|
129
|
-
className:
|
|
134
|
+
className: O.header,
|
|
130
135
|
onClick: () => {
|
|
131
|
-
|
|
136
|
+
o && d((e) => !e);
|
|
132
137
|
},
|
|
133
138
|
"aria-label": `${t}: ${u ? "Collapse panel" : "Expand panel"}`,
|
|
134
139
|
"aria-expanded": u,
|
|
135
|
-
"aria-controls":
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
-
className:
|
|
140
|
+
"aria-controls": f,
|
|
141
|
+
children: [/* @__PURE__ */ s("div", {
|
|
142
|
+
className: O.title,
|
|
138
143
|
children: t
|
|
139
|
-
}), /* @__PURE__ */
|
|
144
|
+
}), /* @__PURE__ */ s("span", {
|
|
140
145
|
"aria-hidden": "true",
|
|
141
|
-
children:
|
|
146
|
+
children: s(u ? p : m, {
|
|
142
147
|
color: "var(--lv5)",
|
|
143
148
|
size: 14
|
|
144
149
|
})
|
|
145
150
|
})]
|
|
146
|
-
}) : /* @__PURE__ */
|
|
147
|
-
className:
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
-
className:
|
|
151
|
+
}) : /* @__PURE__ */ s("div", {
|
|
152
|
+
className: O.header,
|
|
153
|
+
children: /* @__PURE__ */ s("div", {
|
|
154
|
+
className: O.title,
|
|
150
155
|
children: t
|
|
151
156
|
})
|
|
152
|
-
})), (!
|
|
153
|
-
id:
|
|
154
|
-
className:
|
|
157
|
+
})), (!o || u) && /* @__PURE__ */ s("div", {
|
|
158
|
+
id: f,
|
|
159
|
+
className: O.body,
|
|
155
160
|
role: "region",
|
|
156
161
|
"aria-label": t || "Filter panel content",
|
|
157
162
|
children: r
|
|
158
163
|
})]
|
|
159
164
|
});
|
|
160
165
|
}
|
|
161
|
-
var
|
|
166
|
+
var A = {
|
|
162
167
|
wrapper: "_wrapper_tf1yl_1",
|
|
163
168
|
label: "_label_tf1yl_7",
|
|
164
169
|
inputContainer: "_inputContainer_tf1yl_12",
|
|
@@ -170,59 +175,59 @@ var k = {
|
|
|
170
175
|
sizeDefault: "_sizeDefault_tf1yl_87",
|
|
171
176
|
error: "_error_tf1yl_110",
|
|
172
177
|
errorText: "_errorText_tf1yl_114"
|
|
173
|
-
},
|
|
178
|
+
}, j = {
|
|
174
179
|
micro: 14,
|
|
175
180
|
default: 21
|
|
176
181
|
};
|
|
177
|
-
function
|
|
178
|
-
let _ =
|
|
182
|
+
function M({ label: t, error: n, className: r = "", showSearchIcon: a = !0, searchIcon: o, searchIconColor: l, inputSize: u = "default", showFocusBorder: d = !1, children: f, id: p, type: m = "search", ...g }) {
|
|
183
|
+
let _ = i(null), v = e.useId(), y = p || v, b = `${y}-error`, x = j[u], S = {};
|
|
179
184
|
l && (S["--search-icon-color"] = l);
|
|
180
|
-
let C =
|
|
181
|
-
return /* @__PURE__ */
|
|
182
|
-
className: `${
|
|
185
|
+
let C = o ?? /* @__PURE__ */ s(h, {}), w = u === "micro" ? A.sizeMicro : A.sizeDefault;
|
|
186
|
+
return /* @__PURE__ */ c("div", {
|
|
187
|
+
className: `${A.wrapper} ${r}`,
|
|
183
188
|
children: [
|
|
184
|
-
t && /* @__PURE__ */
|
|
189
|
+
t && /* @__PURE__ */ s("label", {
|
|
185
190
|
htmlFor: y,
|
|
186
|
-
className:
|
|
191
|
+
className: A.label,
|
|
187
192
|
children: t
|
|
188
193
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
className: `${
|
|
194
|
+
/* @__PURE__ */ c("div", {
|
|
195
|
+
className: `${A.inputContainer} ${w}`,
|
|
191
196
|
children: [
|
|
192
|
-
a && /* @__PURE__ */
|
|
193
|
-
className:
|
|
197
|
+
a && /* @__PURE__ */ s("span", {
|
|
198
|
+
className: A.searchIcon,
|
|
194
199
|
"aria-hidden": "true",
|
|
195
200
|
children: e.cloneElement(C, {
|
|
196
201
|
size: x,
|
|
197
202
|
color: l ?? "var(--search-icon-color)"
|
|
198
203
|
})
|
|
199
204
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ s("input", {
|
|
201
206
|
ref: _,
|
|
202
207
|
id: y,
|
|
203
|
-
type:
|
|
204
|
-
className: `${
|
|
208
|
+
type: m,
|
|
209
|
+
className: `${A.input} ${d ? A.focus : ""} ${n ? A.error : ""}`,
|
|
205
210
|
style: S,
|
|
206
211
|
"aria-invalid": n ? "true" : "false",
|
|
207
212
|
"aria-describedby": n ? b : void 0,
|
|
208
213
|
...g
|
|
209
214
|
}),
|
|
210
|
-
f && /* @__PURE__ */
|
|
211
|
-
className:
|
|
215
|
+
f && /* @__PURE__ */ s("div", {
|
|
216
|
+
className: A.rightContent,
|
|
212
217
|
children: f
|
|
213
218
|
})
|
|
214
219
|
]
|
|
215
220
|
}),
|
|
216
|
-
n && /* @__PURE__ */
|
|
221
|
+
n && /* @__PURE__ */ s("span", {
|
|
217
222
|
id: b,
|
|
218
|
-
className:
|
|
223
|
+
className: A.errorText,
|
|
219
224
|
role: "alert",
|
|
220
225
|
children: n
|
|
221
226
|
})
|
|
222
227
|
]
|
|
223
228
|
});
|
|
224
229
|
}
|
|
225
|
-
var
|
|
230
|
+
var N = {
|
|
226
231
|
wrapper: "_wrapper_su5p5_1",
|
|
227
232
|
label: "_label_su5p5_7",
|
|
228
233
|
input: "_input_su5p5_12",
|
|
@@ -232,94 +237,94 @@ var M = {
|
|
|
232
237
|
};
|
|
233
238
|
//#endregion
|
|
234
239
|
//#region src/components/InputField/InputField.tsx
|
|
235
|
-
function
|
|
236
|
-
let u = e.useId(), d =
|
|
237
|
-
return /* @__PURE__ */
|
|
238
|
-
className: `${
|
|
240
|
+
function P({ label: t, error: n, className: r = "", isValid: i = !0, variant: a = "default", id: o, ...l }) {
|
|
241
|
+
let u = e.useId(), d = o || u, f = `${d}-error`, p = n || !i;
|
|
242
|
+
return /* @__PURE__ */ c("div", {
|
|
243
|
+
className: `${N.wrapper} ${r}`,
|
|
239
244
|
children: [
|
|
240
|
-
t && /* @__PURE__ */
|
|
245
|
+
t && /* @__PURE__ */ c("label", {
|
|
241
246
|
htmlFor: d,
|
|
242
|
-
className:
|
|
243
|
-
children: [t, l.required && /* @__PURE__ */
|
|
247
|
+
className: N.label,
|
|
248
|
+
children: [t, l.required && /* @__PURE__ */ s("span", {
|
|
244
249
|
"aria-label": "required",
|
|
245
250
|
children: " *"
|
|
246
251
|
})]
|
|
247
252
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ s("input", {
|
|
249
254
|
id: d,
|
|
250
|
-
className: `${
|
|
255
|
+
className: `${N.input} ${a === "borderBottom" ? N.borderBottom : ""} ${p ? N.error : ""}`,
|
|
251
256
|
"aria-invalid": p ? "true" : "false",
|
|
252
257
|
"aria-describedby": n ? f : void 0,
|
|
253
258
|
...l
|
|
254
259
|
}),
|
|
255
|
-
n && /* @__PURE__ */
|
|
260
|
+
n && /* @__PURE__ */ s("span", {
|
|
256
261
|
id: f,
|
|
257
|
-
className:
|
|
262
|
+
className: N.errorText,
|
|
258
263
|
role: "alert",
|
|
259
264
|
children: n
|
|
260
265
|
})
|
|
261
266
|
]
|
|
262
267
|
});
|
|
263
268
|
}
|
|
264
|
-
var
|
|
269
|
+
var F = {
|
|
265
270
|
radioWrapper: "_radioWrapper_1faq0_1",
|
|
266
271
|
radioInput: "_radioInput_1faq0_9",
|
|
267
272
|
customRadio: "_customRadio_1faq0_23",
|
|
268
273
|
labelText: "_labelText_1faq0_57",
|
|
269
274
|
disabled: "_disabled_1faq0_63"
|
|
270
|
-
},
|
|
275
|
+
}, I = ({ id: e, name: t, value: n, label: r, checked: i = !1, onChange: a, disabled: o = !1, "aria-label": l }) => /* @__PURE__ */ c("label", {
|
|
271
276
|
htmlFor: e,
|
|
272
|
-
className: `${
|
|
277
|
+
className: `${F.radioWrapper} ${o ? F.disabled : ""} ${o ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
273
278
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ s("input", {
|
|
275
280
|
id: e,
|
|
276
281
|
type: "radio",
|
|
277
282
|
name: t,
|
|
278
283
|
value: n,
|
|
279
284
|
checked: i,
|
|
280
285
|
onChange: a,
|
|
281
|
-
disabled:
|
|
286
|
+
disabled: o,
|
|
282
287
|
"aria-label": l,
|
|
283
|
-
className:
|
|
288
|
+
className: F.radioInput
|
|
284
289
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
className:
|
|
290
|
+
/* @__PURE__ */ s("span", { className: F.customRadio }),
|
|
291
|
+
/* @__PURE__ */ s("span", {
|
|
292
|
+
className: F.labelText,
|
|
288
293
|
children: r
|
|
289
294
|
})
|
|
290
295
|
]
|
|
291
|
-
}),
|
|
296
|
+
}), L = {
|
|
292
297
|
switch: "_switch_1xsea_1",
|
|
293
298
|
slider: "_slider_1xsea_23",
|
|
294
299
|
label: "_label_1xsea_28",
|
|
295
300
|
disabled: "_disabled_1xsea_43"
|
|
296
|
-
}, ee = ({ id: t, checked: n, onChange: r, disabled: i = !1, label: a, "aria-label":
|
|
301
|
+
}, ee = ({ id: t, checked: n, onChange: r, disabled: i = !1, label: a, "aria-label": o }) => {
|
|
297
302
|
let l = e.useId(), u = t || l;
|
|
298
|
-
return /* @__PURE__ */
|
|
303
|
+
return /* @__PURE__ */ c("label", {
|
|
299
304
|
htmlFor: u,
|
|
300
|
-
className: `${
|
|
305
|
+
className: `${L.switch} ${i ? L.disabled : ""} ${i ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
301
306
|
children: [
|
|
302
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ s("input", {
|
|
303
308
|
id: u,
|
|
304
309
|
type: "checkbox",
|
|
305
310
|
role: "switch",
|
|
306
311
|
"aria-checked": n,
|
|
307
|
-
"aria-label":
|
|
312
|
+
"aria-label": o,
|
|
308
313
|
checked: n,
|
|
309
314
|
onChange: (e) => r(e.target.checked),
|
|
310
315
|
disabled: i
|
|
311
316
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
className:
|
|
317
|
+
/* @__PURE__ */ s("span", {
|
|
318
|
+
className: L.slider,
|
|
314
319
|
"aria-hidden": "true"
|
|
315
320
|
}),
|
|
316
|
-
a && /* @__PURE__ */
|
|
317
|
-
className:
|
|
321
|
+
a && /* @__PURE__ */ s("span", {
|
|
322
|
+
className: L.label,
|
|
318
323
|
children: a
|
|
319
324
|
})
|
|
320
325
|
]
|
|
321
326
|
});
|
|
322
|
-
},
|
|
327
|
+
}, R = {
|
|
323
328
|
label: "_label_12as9_1",
|
|
324
329
|
basetrack: "_basetrack_12as9_8",
|
|
325
330
|
selectedtrack: "_selectedtrack_12as9_36",
|
|
@@ -329,16 +334,26 @@ var P = {
|
|
|
329
334
|
thumbs: "_thumbs_12as9_55",
|
|
330
335
|
disabled: "_disabled_12as9_89"
|
|
331
336
|
}, te = (t) => {
|
|
332
|
-
let { min: n, max: r, step: i = 1, disabled: a = !1, className:
|
|
333
|
-
if (
|
|
337
|
+
let { min: n, max: r, step: i = 1, disabled: a = !1, className: o, activeMin: l, activeMax: u, isFaceted: d = !1, highlightFaceted: f = !0, onChange: p, onFinalChange: m, label: h, "aria-label": g, id: v } = t, y = e.useId(), b = v || y;
|
|
338
|
+
if (!(Number.isFinite(n) && Number.isFinite(r) && r > n)) return /* @__PURE__ */ c("div", {
|
|
339
|
+
className: o,
|
|
340
|
+
children: [h && /* @__PURE__ */ s("span", {
|
|
341
|
+
className: R.label,
|
|
342
|
+
children: h
|
|
343
|
+
}), /* @__PURE__ */ s("div", {
|
|
344
|
+
className: `${R.basetrack} ${R.disabled}`,
|
|
345
|
+
"aria-hidden": "true"
|
|
346
|
+
})]
|
|
347
|
+
});
|
|
348
|
+
if ("isRange" in t && t.isRange) {
|
|
334
349
|
let e = t.value, [f, v] = e;
|
|
335
|
-
return /* @__PURE__ */
|
|
336
|
-
className:
|
|
337
|
-
children: [h && /* @__PURE__ */
|
|
350
|
+
return /* @__PURE__ */ c("div", {
|
|
351
|
+
className: o,
|
|
352
|
+
children: [h && /* @__PURE__ */ s("label", {
|
|
338
353
|
htmlFor: b,
|
|
339
|
-
className:
|
|
354
|
+
className: R.label,
|
|
340
355
|
children: h
|
|
341
|
-
}), /* @__PURE__ */
|
|
356
|
+
}), /* @__PURE__ */ s(_, {
|
|
342
357
|
step: i,
|
|
343
358
|
min: n,
|
|
344
359
|
max: r,
|
|
@@ -347,22 +362,22 @@ var P = {
|
|
|
347
362
|
onFinalChange: (e) => m?.(e),
|
|
348
363
|
disabled: a,
|
|
349
364
|
renderTrack: ({ props: e, children: t }) => {
|
|
350
|
-
let { key: i, ...a } = e,
|
|
351
|
-
return _ && (h = (l - n) /
|
|
365
|
+
let { key: i, ...a } = e, o = r - n, p = (f - n) / o * 100, m = (v - f) / o * 100, h = 0, g = 0, _ = typeof l == "number" && typeof u == "number" && u > l && (l > n || u < r);
|
|
366
|
+
return _ && (h = (l - n) / o * 100, g = (u - l) / o * 100), /* @__PURE__ */ c("div", {
|
|
352
367
|
...a,
|
|
353
|
-
className:
|
|
368
|
+
className: R.basetrack,
|
|
354
369
|
style: { ...a.style },
|
|
355
370
|
children: [
|
|
356
|
-
!_ && /* @__PURE__ */
|
|
357
|
-
className:
|
|
371
|
+
!_ && /* @__PURE__ */ s("div", {
|
|
372
|
+
className: R.selectedtrack,
|
|
358
373
|
style: {
|
|
359
374
|
left: `${p}%`,
|
|
360
375
|
width: `${m}%`,
|
|
361
376
|
zIndex: "1"
|
|
362
377
|
}
|
|
363
378
|
}),
|
|
364
|
-
_ && /* @__PURE__ */
|
|
365
|
-
className: `${
|
|
379
|
+
_ && /* @__PURE__ */ s("div", {
|
|
380
|
+
className: `${R.livetrack} ${d ? R.livetrackFaceted : R.livetrackDefault}`,
|
|
366
381
|
style: {
|
|
367
382
|
left: `${h}%`,
|
|
368
383
|
width: `${g}%`,
|
|
@@ -374,16 +389,16 @@ var P = {
|
|
|
374
389
|
}, i);
|
|
375
390
|
},
|
|
376
391
|
renderThumb: ({ props: e, index: t }) => {
|
|
377
|
-
let { key: i, ...
|
|
378
|
-
return /* @__PURE__ */
|
|
379
|
-
...
|
|
392
|
+
let { key: i, ...o } = e, c = t === 0 ? f : v;
|
|
393
|
+
return /* @__PURE__ */ s("div", {
|
|
394
|
+
...o,
|
|
380
395
|
id: t === 0 ? b : void 0,
|
|
381
|
-
className: `${
|
|
396
|
+
className: `${R.thumbs} ${a ? R.disabled : ""} ${a ? "cursor-not-allowed" : "cursor-resize-col"}`,
|
|
382
397
|
style: {
|
|
383
|
-
...
|
|
398
|
+
...o.style,
|
|
384
399
|
zIndex: "3"
|
|
385
400
|
},
|
|
386
|
-
"aria-label":
|
|
401
|
+
"aria-label": g || (t === 0 ? "Minimum value" : "Maximum value"),
|
|
387
402
|
"aria-valuemin": n,
|
|
388
403
|
"aria-valuemax": r,
|
|
389
404
|
"aria-valuenow": c
|
|
@@ -393,13 +408,13 @@ var P = {
|
|
|
393
408
|
});
|
|
394
409
|
} else {
|
|
395
410
|
let e = t.value;
|
|
396
|
-
return /* @__PURE__ */
|
|
397
|
-
className:
|
|
398
|
-
children: [h && /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ c("div", {
|
|
412
|
+
className: o,
|
|
413
|
+
children: [h && /* @__PURE__ */ s("label", {
|
|
399
414
|
htmlFor: b,
|
|
400
|
-
className:
|
|
415
|
+
className: R.label,
|
|
401
416
|
children: h
|
|
402
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ s(_, {
|
|
403
418
|
step: i,
|
|
404
419
|
min: n,
|
|
405
420
|
max: r,
|
|
@@ -408,22 +423,22 @@ var P = {
|
|
|
408
423
|
onFinalChange: (e) => m?.(e[0]),
|
|
409
424
|
disabled: a,
|
|
410
425
|
renderTrack: ({ props: t, children: i }) => {
|
|
411
|
-
let { key: a, ...
|
|
412
|
-
return g && (m = (l - n) / f * 100, h = (u - l) / f * 100), /* @__PURE__ */
|
|
413
|
-
...
|
|
414
|
-
className:
|
|
415
|
-
style: { ...
|
|
426
|
+
let { key: a, ...o } = t, f = r - n, p = (e - n) / f * 100, m = 0, h = 0, g = typeof l == "number" && typeof u == "number" && u > l && (l > n || u < r);
|
|
427
|
+
return g && (m = (l - n) / f * 100, h = (u - l) / f * 100), /* @__PURE__ */ c("div", {
|
|
428
|
+
...o,
|
|
429
|
+
className: R.basetrack,
|
|
430
|
+
style: { ...o.style },
|
|
416
431
|
children: [
|
|
417
|
-
!g && /* @__PURE__ */
|
|
418
|
-
className:
|
|
432
|
+
!g && /* @__PURE__ */ s("div", {
|
|
433
|
+
className: R.selectedtrack,
|
|
419
434
|
style: {
|
|
420
435
|
left: "0%",
|
|
421
436
|
width: `${p}%`,
|
|
422
437
|
zIndex: "1"
|
|
423
438
|
}
|
|
424
439
|
}),
|
|
425
|
-
g && /* @__PURE__ */
|
|
426
|
-
className: `${
|
|
440
|
+
g && /* @__PURE__ */ s("div", {
|
|
441
|
+
className: `${R.livetrack} ${d ? R.livetrackFaceted : R.livetrackDefault}`,
|
|
427
442
|
style: {
|
|
428
443
|
left: `${m}%`,
|
|
429
444
|
width: `${h}%`,
|
|
@@ -435,16 +450,16 @@ var P = {
|
|
|
435
450
|
}, a);
|
|
436
451
|
},
|
|
437
452
|
renderThumb: ({ props: t }) => {
|
|
438
|
-
let { key: i, ...
|
|
439
|
-
return /* @__PURE__ */
|
|
440
|
-
...
|
|
453
|
+
let { key: i, ...o } = t;
|
|
454
|
+
return /* @__PURE__ */ s("div", {
|
|
455
|
+
...o,
|
|
441
456
|
id: b,
|
|
442
|
-
className: `${
|
|
457
|
+
className: `${R.thumbs} ${a ? R.disabled : ""} ${a ? "cursor-not-allowed" : "cursor-resize-col"}`,
|
|
443
458
|
style: {
|
|
444
|
-
...
|
|
459
|
+
...o.style,
|
|
445
460
|
zIndex: "3"
|
|
446
461
|
},
|
|
447
|
-
"aria-label":
|
|
462
|
+
"aria-label": g,
|
|
448
463
|
"aria-valuemin": n,
|
|
449
464
|
"aria-valuemax": r,
|
|
450
465
|
"aria-valuenow": e
|
|
@@ -453,7 +468,7 @@ var P = {
|
|
|
453
468
|
})]
|
|
454
469
|
});
|
|
455
470
|
}
|
|
456
|
-
},
|
|
471
|
+
}, z = {
|
|
457
472
|
wrapper: "_wrapper_15fsv_1",
|
|
458
473
|
label: "_label_15fsv_7",
|
|
459
474
|
trigger: "_trigger_15fsv_12",
|
|
@@ -465,51 +480,51 @@ var P = {
|
|
|
465
480
|
viewport: "_viewport_15fsv_76",
|
|
466
481
|
item: "_item_15fsv_82",
|
|
467
482
|
itemIndicator: "_itemIndicator_15fsv_105"
|
|
468
|
-
}, ne = ({ value: t, onValueChange: n, options: r, placeholder: i = "Select...", className: a = "", disabled:
|
|
469
|
-
let h = e.useId(), g = m || h,
|
|
483
|
+
}, ne = ({ value: t, onValueChange: n, options: r, placeholder: i = "Select...", className: a = "", disabled: o = !1, label: d, size: f = "default", "aria-label": p, id: m }) => {
|
|
484
|
+
let h = e.useId(), g = m || h, _ = `${g}-label`, y = r.find((e) => e.value === t), b = /* @__PURE__ */ c(v.Root, {
|
|
470
485
|
value: t,
|
|
471
486
|
onValueChange: n,
|
|
472
|
-
disabled:
|
|
473
|
-
children: [/* @__PURE__ */
|
|
487
|
+
disabled: o,
|
|
488
|
+
children: [/* @__PURE__ */ c(v.Trigger, {
|
|
474
489
|
id: g,
|
|
475
|
-
className: `${
|
|
476
|
-
...d ? { "aria-labelledby":
|
|
477
|
-
children: [/* @__PURE__ */
|
|
490
|
+
className: `${z.trigger} ${z[f]} ${a} cursor-pointer`,
|
|
491
|
+
...d ? { "aria-labelledby": _ } : p ? { "aria-label": p } : {},
|
|
492
|
+
children: [/* @__PURE__ */ c("span", {
|
|
478
493
|
style: {
|
|
479
494
|
display: "inline-flex",
|
|
480
495
|
alignItems: "center",
|
|
481
496
|
gap: 6
|
|
482
497
|
},
|
|
483
|
-
children: [y?.icon, /* @__PURE__ */
|
|
484
|
-
}), /* @__PURE__ */
|
|
485
|
-
className:
|
|
498
|
+
children: [y?.icon, /* @__PURE__ */ s(v.Value, { placeholder: i })]
|
|
499
|
+
}), /* @__PURE__ */ s(v.Icon, {
|
|
500
|
+
className: z.icon,
|
|
486
501
|
"aria-hidden": "true",
|
|
487
|
-
children: /* @__PURE__ */
|
|
502
|
+
children: /* @__PURE__ */ s(u, {
|
|
488
503
|
size: f === "large" ? 21 : 14,
|
|
489
504
|
color: "currentColor"
|
|
490
505
|
})
|
|
491
506
|
})]
|
|
492
|
-
}), /* @__PURE__ */
|
|
493
|
-
className:
|
|
507
|
+
}), /* @__PURE__ */ s(v.Portal, { children: /* @__PURE__ */ s(v.Content, {
|
|
508
|
+
className: z.content,
|
|
494
509
|
position: "popper",
|
|
495
510
|
side: "bottom",
|
|
496
511
|
align: "start",
|
|
497
512
|
sideOffset: 4,
|
|
498
|
-
children: /* @__PURE__ */
|
|
499
|
-
className:
|
|
500
|
-
children: r.map((e) => /* @__PURE__ */
|
|
513
|
+
children: /* @__PURE__ */ s(v.Viewport, {
|
|
514
|
+
className: z.viewport,
|
|
515
|
+
children: r.map((e) => /* @__PURE__ */ c(v.Item, {
|
|
501
516
|
value: e.value,
|
|
502
|
-
className:
|
|
503
|
-
children: [/* @__PURE__ */
|
|
517
|
+
className: z.item,
|
|
518
|
+
children: [/* @__PURE__ */ c("span", {
|
|
504
519
|
style: {
|
|
505
520
|
display: "inline-flex",
|
|
506
521
|
alignItems: "center",
|
|
507
522
|
gap: 6
|
|
508
523
|
},
|
|
509
|
-
children: [e.icon, /* @__PURE__ */
|
|
510
|
-
}), /* @__PURE__ */
|
|
511
|
-
className:
|
|
512
|
-
children: /* @__PURE__ */
|
|
524
|
+
children: [e.icon, /* @__PURE__ */ s(v.ItemText, { children: e.label })]
|
|
525
|
+
}), /* @__PURE__ */ s(v.ItemIndicator, {
|
|
526
|
+
className: z.itemIndicator,
|
|
527
|
+
children: /* @__PURE__ */ s(l, {
|
|
513
528
|
size: 12,
|
|
514
529
|
color: "currentColor"
|
|
515
530
|
})
|
|
@@ -518,31 +533,31 @@ var P = {
|
|
|
518
533
|
})
|
|
519
534
|
}) })]
|
|
520
535
|
});
|
|
521
|
-
return d ? /* @__PURE__ */
|
|
522
|
-
className:
|
|
523
|
-
children: [/* @__PURE__ */
|
|
524
|
-
id:
|
|
536
|
+
return d ? /* @__PURE__ */ c("div", {
|
|
537
|
+
className: z.wrapper,
|
|
538
|
+
children: [/* @__PURE__ */ s("label", {
|
|
539
|
+
id: _,
|
|
525
540
|
htmlFor: g,
|
|
526
|
-
className:
|
|
541
|
+
className: z.label,
|
|
527
542
|
children: d
|
|
528
543
|
}), b]
|
|
529
544
|
}) : b;
|
|
530
|
-
}, re = { content: "_content_1qahr_1" }, ie = ({ trigger: e, children: t, open: n, onOpenChange: r, align: i = "end", side: a = "bottom", sideOffset:
|
|
545
|
+
}, re = { content: "_content_1qahr_1" }, ie = ({ trigger: e, children: t, open: n, onOpenChange: r, align: i = "end", side: a = "bottom", sideOffset: o = 5, className: l = "", "aria-label": u, "aria-describedby": d }) => /* @__PURE__ */ c(y.Root, {
|
|
531
546
|
open: n,
|
|
532
547
|
onOpenChange: r,
|
|
533
|
-
children: [/* @__PURE__ */
|
|
548
|
+
children: [/* @__PURE__ */ s(y.Trigger, {
|
|
534
549
|
asChild: !0,
|
|
535
550
|
children: e
|
|
536
|
-
}), /* @__PURE__ */
|
|
551
|
+
}), /* @__PURE__ */ s(y.Portal, { children: /* @__PURE__ */ s(y.Content, {
|
|
537
552
|
className: `${re.content} ${l}`,
|
|
538
553
|
align: i,
|
|
539
554
|
side: a,
|
|
540
|
-
sideOffset:
|
|
555
|
+
sideOffset: o,
|
|
541
556
|
"aria-label": u,
|
|
542
557
|
"aria-describedby": d,
|
|
543
558
|
children: t
|
|
544
559
|
}) })]
|
|
545
|
-
}),
|
|
560
|
+
}), B = {
|
|
546
561
|
table: "_table_1b0iq_1",
|
|
547
562
|
caption: "_caption_1b0iq_8",
|
|
548
563
|
headerRow: "_headerRow_1b0iq_25",
|
|
@@ -556,11 +571,11 @@ var P = {
|
|
|
556
571
|
//#endregion
|
|
557
572
|
//#region src/components/Table/Table.tsx
|
|
558
573
|
function ae({ children: e, caption: t, "aria-label": n }) {
|
|
559
|
-
return
|
|
560
|
-
className:
|
|
574
|
+
return /* @__PURE__ */ c("table", {
|
|
575
|
+
className: B.table,
|
|
561
576
|
"aria-label": n,
|
|
562
|
-
children: [t && /* @__PURE__ */
|
|
563
|
-
className:
|
|
577
|
+
children: [t && /* @__PURE__ */ s("caption", {
|
|
578
|
+
className: B.caption,
|
|
564
579
|
children: t
|
|
565
580
|
}), e]
|
|
566
581
|
});
|
|
@@ -568,20 +583,20 @@ function ae({ children: e, caption: t, "aria-label": n }) {
|
|
|
568
583
|
//#endregion
|
|
569
584
|
//#region src/components/Table/TableHeader.tsx
|
|
570
585
|
function oe({ children: t }) {
|
|
571
|
-
let n = e.Children.map(t, (t) => e.isValidElement(t) && t.type === "td" ? /* @__PURE__ */
|
|
586
|
+
let n = e.Children.map(t, (t) => e.isValidElement(t) && t.type === "td" ? /* @__PURE__ */ s("th", {
|
|
572
587
|
scope: "col",
|
|
573
588
|
...t.props
|
|
574
589
|
}) : t);
|
|
575
|
-
return /* @__PURE__ */
|
|
576
|
-
className:
|
|
590
|
+
return /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ s("tr", {
|
|
591
|
+
className: B.headerRow,
|
|
577
592
|
children: n
|
|
578
593
|
}) });
|
|
579
594
|
}
|
|
580
595
|
//#endregion
|
|
581
596
|
//#region src/components/Table/TableRow.tsx
|
|
582
597
|
function se({ children: e }) {
|
|
583
|
-
return /* @__PURE__ */
|
|
584
|
-
className:
|
|
598
|
+
return /* @__PURE__ */ s("tr", {
|
|
599
|
+
className: B.dataRow,
|
|
585
600
|
children: e
|
|
586
601
|
});
|
|
587
602
|
}
|
|
@@ -589,19 +604,19 @@ function se({ children: e }) {
|
|
|
589
604
|
//#region src/components/Table/TableCell.tsx
|
|
590
605
|
function ce({ label: e, children: t, isHeader: n = !1, scope: r }) {
|
|
591
606
|
let i = n ? "th" : "td", a = n && r ? { scope: r } : {};
|
|
592
|
-
return e || t ? /* @__PURE__ */
|
|
607
|
+
return e || t ? /* @__PURE__ */ s(i, {
|
|
593
608
|
...a,
|
|
594
|
-
children: /* @__PURE__ */
|
|
595
|
-
className:
|
|
596
|
-
children: [e && /* @__PURE__ */
|
|
597
|
-
className:
|
|
609
|
+
children: /* @__PURE__ */ c("div", {
|
|
610
|
+
className: B.cellInner,
|
|
611
|
+
children: [e && /* @__PURE__ */ s("span", {
|
|
612
|
+
className: B.cellLabel,
|
|
598
613
|
children: e
|
|
599
|
-
}), t && /* @__PURE__ */
|
|
600
|
-
className:
|
|
614
|
+
}), t && /* @__PURE__ */ s("div", {
|
|
615
|
+
className: B.cellContent,
|
|
601
616
|
children: t
|
|
602
617
|
})]
|
|
603
618
|
})
|
|
604
|
-
}) : /* @__PURE__ */
|
|
619
|
+
}) : /* @__PURE__ */ s(i, {
|
|
605
620
|
...a,
|
|
606
621
|
children: t
|
|
607
622
|
});
|
|
@@ -609,8 +624,8 @@ function ce({ label: e, children: t, isHeader: n = !1, scope: r }) {
|
|
|
609
624
|
//#endregion
|
|
610
625
|
//#region src/components/Table/TableValue.tsx
|
|
611
626
|
function le({ children: e }) {
|
|
612
|
-
return /* @__PURE__ */
|
|
613
|
-
className:
|
|
627
|
+
return /* @__PURE__ */ s("span", {
|
|
628
|
+
className: B.value,
|
|
614
629
|
children: e
|
|
615
630
|
});
|
|
616
631
|
}
|
|
@@ -618,8 +633,8 @@ function le({ children: e }) {
|
|
|
618
633
|
//#region src/components/Table/TableIcon.tsx
|
|
619
634
|
function ue({ children: t, "aria-label": n }) {
|
|
620
635
|
let r = !n;
|
|
621
|
-
return /* @__PURE__ */
|
|
622
|
-
className:
|
|
636
|
+
return /* @__PURE__ */ s("span", {
|
|
637
|
+
className: B.icon,
|
|
623
638
|
"aria-hidden": r ? "true" : void 0,
|
|
624
639
|
"aria-label": n,
|
|
625
640
|
children: e.cloneElement(t, {
|
|
@@ -628,7 +643,7 @@ function ue({ children: t, "aria-label": n }) {
|
|
|
628
643
|
})
|
|
629
644
|
});
|
|
630
645
|
}
|
|
631
|
-
var
|
|
646
|
+
var V = {
|
|
632
647
|
tabs: "_tabs_11q71_1",
|
|
633
648
|
scrollable: "_scrollable_11q71_11",
|
|
634
649
|
tab: "_tab_11q71_1",
|
|
@@ -639,17 +654,45 @@ var B = {
|
|
|
639
654
|
};
|
|
640
655
|
//#endregion
|
|
641
656
|
//#region src/components/Tabs/Tabs.tsx
|
|
642
|
-
function de({ items: e, value: t, onValueChange:
|
|
643
|
-
let
|
|
657
|
+
function de({ items: e, value: t, onValueChange: o, size: c = "default", scrollable: l = !1, getPanelId: u }) {
|
|
658
|
+
let d = i(null), f = i(/* @__PURE__ */ new Map()), p = r(), [m, h] = a({
|
|
644
659
|
start: !1,
|
|
645
660
|
end: !1
|
|
646
|
-
})
|
|
661
|
+
}), g = Math.max(e.findIndex((e) => e.value === t), 0), _ = (t) => {
|
|
662
|
+
let n = e[t];
|
|
663
|
+
if (!n) return;
|
|
664
|
+
o(n.value);
|
|
665
|
+
let r = f.current.get(n.value);
|
|
666
|
+
r?.focus({ preventScroll: !0 }), l && r?.scrollIntoView({
|
|
667
|
+
block: "nearest",
|
|
668
|
+
inline: "nearest"
|
|
669
|
+
});
|
|
670
|
+
}, v = (t, n) => {
|
|
671
|
+
if (e.length === 0) return;
|
|
672
|
+
let r;
|
|
673
|
+
switch (t.key) {
|
|
674
|
+
case "ArrowLeft":
|
|
675
|
+
r = (n - 1 + e.length) % e.length;
|
|
676
|
+
break;
|
|
677
|
+
case "ArrowRight":
|
|
678
|
+
r = (n + 1) % e.length;
|
|
679
|
+
break;
|
|
680
|
+
case "Home":
|
|
681
|
+
r = 0;
|
|
682
|
+
break;
|
|
683
|
+
case "End":
|
|
684
|
+
r = e.length - 1;
|
|
685
|
+
break;
|
|
686
|
+
default: return;
|
|
687
|
+
}
|
|
688
|
+
t.preventDefault(), _(r);
|
|
689
|
+
};
|
|
647
690
|
return n(() => {
|
|
648
|
-
let e =
|
|
649
|
-
if (!
|
|
691
|
+
let e = d.current;
|
|
692
|
+
if (!l || !e) return;
|
|
650
693
|
let t = () => {
|
|
651
694
|
let t = e.scrollLeft > 1, n = Math.ceil(e.scrollLeft + e.clientWidth) < e.scrollWidth - 1;
|
|
652
|
-
|
|
695
|
+
h((e) => e.start === t && e.end === n ? e : {
|
|
653
696
|
start: t,
|
|
654
697
|
end: n
|
|
655
698
|
});
|
|
@@ -659,23 +702,33 @@ function de({ items: e, value: t, onValueChange: a, size: s = "default", scrolla
|
|
|
659
702
|
return n.observe(e), () => {
|
|
660
703
|
e.removeEventListener("scroll", t), n.disconnect();
|
|
661
704
|
};
|
|
662
|
-
}, [
|
|
663
|
-
ref:
|
|
664
|
-
className: `${
|
|
665
|
-
"data-overflow-start":
|
|
666
|
-
"data-overflow-end":
|
|
705
|
+
}, [l, e.length]), /* @__PURE__ */ s("div", {
|
|
706
|
+
ref: d,
|
|
707
|
+
className: `${V.tabs} ${l ? V.scrollable : ""}`,
|
|
708
|
+
"data-overflow-start": l && m.start ? "" : void 0,
|
|
709
|
+
"data-overflow-end": l && m.end ? "" : void 0,
|
|
667
710
|
role: "tablist",
|
|
668
|
-
children: e.map((e) =>
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
711
|
+
children: e.map((e, t) => {
|
|
712
|
+
let n = t === g;
|
|
713
|
+
return /* @__PURE__ */ s("button", {
|
|
714
|
+
ref: (t) => {
|
|
715
|
+
t ? f.current.set(e.value, t) : f.current.delete(e.value);
|
|
716
|
+
},
|
|
717
|
+
id: `${p}-tab-${e.value}`,
|
|
718
|
+
role: "tab",
|
|
719
|
+
type: "button",
|
|
720
|
+
"aria-selected": n,
|
|
721
|
+
"aria-controls": u?.(e),
|
|
722
|
+
tabIndex: n ? 0 : -1,
|
|
723
|
+
className: `${V.tab} ${V[c]} ${n ? V.active : ""}`,
|
|
724
|
+
onClick: () => o(e.value),
|
|
725
|
+
onKeyDown: (e) => v(e, t),
|
|
726
|
+
children: e.label
|
|
727
|
+
}, e.value);
|
|
728
|
+
})
|
|
676
729
|
});
|
|
677
730
|
}
|
|
678
|
-
var
|
|
731
|
+
var H = {
|
|
679
732
|
wrapper: "_wrapper_1a9jo_1",
|
|
680
733
|
track: "_track_1a9jo_8",
|
|
681
734
|
fill: "_fill_1a9jo_36",
|
|
@@ -684,71 +737,71 @@ var V = {
|
|
|
684
737
|
//#endregion
|
|
685
738
|
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
686
739
|
function fe({ value: e, showLabel: t = !1, fulfilledColor: n = !1, className: r = "" }) {
|
|
687
|
-
let i = Math.min(100, Math.max(0, e)), a = `${Math.round(i)}%`,
|
|
688
|
-
return /* @__PURE__ */
|
|
689
|
-
className: `${
|
|
740
|
+
let i = Math.min(100, Math.max(0, e)), a = `${Math.round(i)}%`, o = n && i >= 100 ? "var(--CPureBlue)" : void 0;
|
|
741
|
+
return /* @__PURE__ */ c("div", {
|
|
742
|
+
className: `${H.wrapper} ${r}`,
|
|
690
743
|
role: "progressbar",
|
|
691
744
|
"aria-valuenow": i,
|
|
692
745
|
"aria-valuemin": 0,
|
|
693
746
|
"aria-valuemax": 100,
|
|
694
|
-
children: [/* @__PURE__ */
|
|
695
|
-
className:
|
|
696
|
-
children: /* @__PURE__ */
|
|
697
|
-
className:
|
|
747
|
+
children: [/* @__PURE__ */ s("div", {
|
|
748
|
+
className: H.track,
|
|
749
|
+
children: /* @__PURE__ */ s("div", {
|
|
750
|
+
className: H.fill,
|
|
698
751
|
style: {
|
|
699
752
|
width: `${i}%`,
|
|
700
|
-
backgroundColor:
|
|
753
|
+
backgroundColor: o
|
|
701
754
|
}
|
|
702
755
|
})
|
|
703
|
-
}), t && /* @__PURE__ */
|
|
704
|
-
className:
|
|
756
|
+
}), t && /* @__PURE__ */ s("span", {
|
|
757
|
+
className: H.label,
|
|
705
758
|
"aria-hidden": "true",
|
|
706
759
|
children: a
|
|
707
760
|
})]
|
|
708
761
|
});
|
|
709
762
|
}
|
|
710
|
-
var
|
|
763
|
+
var U = {
|
|
711
764
|
chip: "_chip_iaxe0_1",
|
|
712
765
|
large: "_large_iaxe0_14"
|
|
713
766
|
};
|
|
714
767
|
//#endregion
|
|
715
768
|
//#region src/components/Chip/Chip.tsx
|
|
716
769
|
function pe({ children: t, color: n, textColor: r, className: i, icon: a, size: o = "default" }) {
|
|
717
|
-
let
|
|
718
|
-
return n && (
|
|
770
|
+
let s = {};
|
|
771
|
+
return n && (s.backgroundColor = n), r && (s.color = r), /* @__PURE__ */ c("span", {
|
|
719
772
|
className: [
|
|
720
|
-
|
|
721
|
-
o === "large" &&
|
|
773
|
+
U.chip,
|
|
774
|
+
o === "large" && U.large,
|
|
722
775
|
i
|
|
723
776
|
].filter(Boolean).join(" "),
|
|
724
|
-
style:
|
|
777
|
+
style: s,
|
|
725
778
|
children: [a && e.cloneElement(a, {
|
|
726
779
|
size: 14,
|
|
727
780
|
color: "currentColor"
|
|
728
781
|
}), t]
|
|
729
782
|
});
|
|
730
783
|
}
|
|
731
|
-
var
|
|
784
|
+
var W = {
|
|
732
785
|
tooltip: "_tooltip_1de7z_1",
|
|
733
786
|
arrow: "_arrow_1de7z_13"
|
|
734
787
|
};
|
|
735
788
|
//#endregion
|
|
736
789
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
737
790
|
function me({ content: e, position: t = "top", children: n, className: r }) {
|
|
738
|
-
return /* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */ s(b.Provider, {
|
|
739
792
|
delayDuration: 80,
|
|
740
|
-
children: /* @__PURE__ */
|
|
793
|
+
children: /* @__PURE__ */ c(b.Root, { children: [/* @__PURE__ */ s(b.Trigger, {
|
|
741
794
|
asChild: !0,
|
|
742
795
|
children: n
|
|
743
|
-
}), /* @__PURE__ */
|
|
796
|
+
}), /* @__PURE__ */ s(b.Portal, { children: /* @__PURE__ */ c(b.Content, {
|
|
744
797
|
side: t,
|
|
745
798
|
sideOffset: 7,
|
|
746
|
-
className: [
|
|
747
|
-
children: [e, /* @__PURE__ */
|
|
799
|
+
className: [W.tooltip, r].filter(Boolean).join(" "),
|
|
800
|
+
children: [e, /* @__PURE__ */ s(b.Arrow, { className: W.arrow })]
|
|
748
801
|
}) })] })
|
|
749
802
|
});
|
|
750
803
|
}
|
|
751
|
-
var
|
|
804
|
+
var G = {
|
|
752
805
|
wrapper: "_wrapper_1w5vh_1",
|
|
753
806
|
chart: "_chart_1w5vh_8",
|
|
754
807
|
svg: "_svg_1w5vh_33",
|
|
@@ -762,30 +815,30 @@ var W = {
|
|
|
762
815
|
legendItem: "_legendItem_1w5vh_90",
|
|
763
816
|
legendMark: "_legendMark_1w5vh_96",
|
|
764
817
|
legendLabel: "_legendLabel_1w5vh_102"
|
|
765
|
-
},
|
|
818
|
+
}, K = "var(--lv4)", q = 12, he = 20, ge = 8, _e = 28, J = 20;
|
|
766
819
|
function ve(e) {
|
|
767
820
|
return Number.isInteger(e) ? String(e) : e.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
768
821
|
}
|
|
769
|
-
function ye({ series: e, labels:
|
|
770
|
-
let f =
|
|
822
|
+
function ye({ series: e, labels: r, type: o = "line", height: l = 200, showLegend: u = !0, className: d }) {
|
|
823
|
+
let f = i(null), [p, m] = a(0), [h, g] = a(null);
|
|
771
824
|
n(() => {
|
|
772
825
|
let e = f.current;
|
|
773
826
|
if (!e) return;
|
|
774
827
|
let t = new ResizeObserver(([e]) => m(e.contentRect.width));
|
|
775
828
|
return t.observe(e), m(e.clientWidth), () => t.disconnect();
|
|
776
829
|
}, []);
|
|
777
|
-
let _ =
|
|
830
|
+
let _ = r?.length ? _e : ge, v = Math.max(p - J - he, 0), y = Math.max(l - q - _, 0), b = e.flatMap((e) => e.data.filter(Number.isFinite)), x = b.length ? Math.max(...b, 0) : 1, S = o === "bar" ? 0 : Math.min(...b, 0), C = x - S || 1, w = Math.max(...e.map((e) => e.data.length), 0), T = (e) => q + (1 - (e - S) / C) * y, E = (e) => w <= 1 ? J + v / 2 : J + e / (w - 1) * v, D = t((e) => {
|
|
778
831
|
if (w === 0) return;
|
|
779
832
|
let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top;
|
|
780
|
-
if (
|
|
781
|
-
let e = Math.round((n -
|
|
833
|
+
if (o === "line") {
|
|
834
|
+
let e = Math.round((n - J) / v * (w - 1));
|
|
782
835
|
g({
|
|
783
836
|
index: Math.max(0, Math.min(w - 1, e)),
|
|
784
837
|
x: n,
|
|
785
838
|
y: r
|
|
786
839
|
});
|
|
787
840
|
} else {
|
|
788
|
-
let e = v / w, t = Math.floor((n -
|
|
841
|
+
let e = v / w, t = Math.floor((n - J) / e);
|
|
789
842
|
g({
|
|
790
843
|
index: Math.max(0, Math.min(w - 1, t)),
|
|
791
844
|
x: n,
|
|
@@ -793,36 +846,36 @@ function ye({ series: e, labels: a, type: c = "line", height: l = 200, showLegen
|
|
|
793
846
|
});
|
|
794
847
|
}
|
|
795
848
|
}, [
|
|
796
|
-
|
|
849
|
+
o,
|
|
797
850
|
w,
|
|
798
851
|
v
|
|
799
|
-
]), O = t(() => g(null), []), k = /* @__PURE__ */
|
|
800
|
-
x1:
|
|
801
|
-
y1:
|
|
802
|
-
x2:
|
|
803
|
-
y2:
|
|
852
|
+
]), O = t(() => g(null), []), k = /* @__PURE__ */ s("line", {
|
|
853
|
+
x1: J,
|
|
854
|
+
y1: q + y * .5,
|
|
855
|
+
x2: J + v,
|
|
856
|
+
y2: q + y * .5,
|
|
804
857
|
stroke: "var(--chart-midline)",
|
|
805
858
|
strokeWidth: "0.5"
|
|
806
|
-
}), A = /* @__PURE__ */
|
|
807
|
-
x1:
|
|
808
|
-
y1:
|
|
809
|
-
x2:
|
|
810
|
-
y2:
|
|
859
|
+
}), A = /* @__PURE__ */ s("line", {
|
|
860
|
+
x1: J,
|
|
861
|
+
y1: q + y,
|
|
862
|
+
x2: J + v,
|
|
863
|
+
y2: q + y,
|
|
811
864
|
stroke: "var(--chart-baseline)",
|
|
812
865
|
strokeWidth: "1"
|
|
813
|
-
}), j = h &&
|
|
866
|
+
}), j = h && o === "bar" ? (() => {
|
|
814
867
|
let e = v / w;
|
|
815
|
-
return /* @__PURE__ */
|
|
816
|
-
x:
|
|
817
|
-
y:
|
|
868
|
+
return /* @__PURE__ */ s("rect", {
|
|
869
|
+
x: J + h.index * e,
|
|
870
|
+
y: q,
|
|
818
871
|
width: e,
|
|
819
872
|
height: y,
|
|
820
873
|
fill: "var(--chart-column-hover)"
|
|
821
874
|
});
|
|
822
875
|
})() : null, M = () => e.map((e, t) => {
|
|
823
876
|
if (!e.data.length) return null;
|
|
824
|
-
let n = e.color ??
|
|
825
|
-
return /* @__PURE__ */
|
|
877
|
+
let n = e.color ?? K;
|
|
878
|
+
return /* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("polyline", {
|
|
826
879
|
points: e.data.map((e, t) => `${E(t).toFixed(2)},${T(e).toFixed(2)}`).join(" "),
|
|
827
880
|
fill: "none",
|
|
828
881
|
stroke: n,
|
|
@@ -831,7 +884,7 @@ function ye({ series: e, labels: a, type: c = "line", height: l = 200, showLegen
|
|
|
831
884
|
strokeLinecap: "round"
|
|
832
885
|
}), e.data.map((e, t) => {
|
|
833
886
|
let r = h?.index === t ? 10 : 5, i = r / 2;
|
|
834
|
-
return /* @__PURE__ */
|
|
887
|
+
return /* @__PURE__ */ s("rect", {
|
|
835
888
|
x: E(t) - i,
|
|
836
889
|
y: T(e) - i,
|
|
837
890
|
width: r,
|
|
@@ -841,40 +894,40 @@ function ye({ series: e, labels: a, type: c = "line", height: l = 200, showLegen
|
|
|
841
894
|
})] }, t);
|
|
842
895
|
}), N = () => {
|
|
843
896
|
if (!w) return null;
|
|
844
|
-
let t = e.length, n = v / w, r = Math.max((n - 2 * (t + 1)) / t, 2), i =
|
|
845
|
-
return e.map((e, t) => e.data.map((a,
|
|
846
|
-
let c =
|
|
847
|
-
return /* @__PURE__ */
|
|
897
|
+
let t = e.length, n = v / w, r = Math.max((n - 2 * (t + 1)) / t, 2), i = q + y;
|
|
898
|
+
return e.map((e, t) => e.data.map((a, o) => {
|
|
899
|
+
let c = J + o * n + 2 + t * (r + 2), l = T(a);
|
|
900
|
+
return /* @__PURE__ */ s("rect", {
|
|
848
901
|
x: c,
|
|
849
902
|
y: l,
|
|
850
903
|
width: r,
|
|
851
904
|
height: Math.max(i - l, 0),
|
|
852
905
|
fill: e.color ?? "var(--chart-bar)"
|
|
853
|
-
}, `${t}-${
|
|
906
|
+
}, `${t}-${o}`);
|
|
854
907
|
}));
|
|
855
908
|
}, P = () => {
|
|
856
|
-
if (!
|
|
857
|
-
let e =
|
|
858
|
-
return
|
|
859
|
-
x:
|
|
909
|
+
if (!r?.length) return null;
|
|
910
|
+
let e = q + y + 18;
|
|
911
|
+
return r.map((t, n) => /* @__PURE__ */ s("text", {
|
|
912
|
+
x: o === "line" ? E(n) : J + (n + .5) * (v / w),
|
|
860
913
|
y: e,
|
|
861
914
|
textAnchor: "middle",
|
|
862
915
|
fill: "var(--lv4)",
|
|
863
916
|
style: { font: "var(--text-2xs)" },
|
|
864
917
|
children: t
|
|
865
918
|
}, n));
|
|
866
|
-
}, F = h &&
|
|
919
|
+
}, F = h && o === "line" ? /* @__PURE__ */ s("line", {
|
|
867
920
|
x1: E(h.index),
|
|
868
|
-
y1:
|
|
921
|
+
y1: q,
|
|
869
922
|
x2: E(h.index),
|
|
870
|
-
y2:
|
|
923
|
+
y2: q + y,
|
|
871
924
|
stroke: "var(--chart-crosshair)",
|
|
872
925
|
strokeWidth: "1",
|
|
873
926
|
strokeDasharray: "3 3"
|
|
874
927
|
}) : null, I = h ? (() => {
|
|
875
|
-
let t =
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
-
className:
|
|
928
|
+
let t = r?.[h.index] ?? String(h.index + 1), n = Math.min(Math.max(h.x, 60), p - 60);
|
|
929
|
+
return /* @__PURE__ */ c("div", {
|
|
930
|
+
className: G.tooltip,
|
|
878
931
|
style: h.y < 80 ? {
|
|
879
932
|
left: n,
|
|
880
933
|
top: h.y + 12,
|
|
@@ -884,38 +937,38 @@ function ye({ series: e, labels: a, type: c = "line", height: l = 200, showLegen
|
|
|
884
937
|
top: h.y - 8,
|
|
885
938
|
transform: "translate(-50%, -100%)"
|
|
886
939
|
},
|
|
887
|
-
children: [/* @__PURE__ */
|
|
888
|
-
className:
|
|
940
|
+
children: [/* @__PURE__ */ s("div", {
|
|
941
|
+
className: G.tooltipLabel,
|
|
889
942
|
children: t
|
|
890
|
-
}), e.map((e, t) => /* @__PURE__ */
|
|
891
|
-
className:
|
|
943
|
+
}), e.map((e, t) => /* @__PURE__ */ c("div", {
|
|
944
|
+
className: G.tooltipRow,
|
|
892
945
|
children: [
|
|
893
|
-
/* @__PURE__ */
|
|
894
|
-
className:
|
|
895
|
-
style: { background: e.color ??
|
|
946
|
+
/* @__PURE__ */ s("span", {
|
|
947
|
+
className: G.tooltipDot,
|
|
948
|
+
style: { background: e.color ?? K }
|
|
896
949
|
}),
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
className:
|
|
950
|
+
/* @__PURE__ */ s("span", {
|
|
951
|
+
className: G.tooltipName,
|
|
899
952
|
children: e.label
|
|
900
953
|
}),
|
|
901
|
-
/* @__PURE__ */
|
|
902
|
-
className:
|
|
954
|
+
/* @__PURE__ */ s("span", {
|
|
955
|
+
className: G.tooltipValue,
|
|
903
956
|
children: ve(e.data[h.index] ?? 0)
|
|
904
957
|
})
|
|
905
958
|
]
|
|
906
959
|
}, t))]
|
|
907
960
|
});
|
|
908
961
|
})() : null;
|
|
909
|
-
return /* @__PURE__ */
|
|
910
|
-
className: [
|
|
911
|
-
children: [/* @__PURE__ */
|
|
962
|
+
return /* @__PURE__ */ c("div", {
|
|
963
|
+
className: [G.wrapper, d].filter(Boolean).join(" "),
|
|
964
|
+
children: [/* @__PURE__ */ c("div", {
|
|
912
965
|
ref: f,
|
|
913
|
-
className:
|
|
966
|
+
className: G.chart,
|
|
914
967
|
style: { height: l },
|
|
915
|
-
children: [p > 0 && /* @__PURE__ */
|
|
968
|
+
children: [p > 0 && /* @__PURE__ */ c("svg", {
|
|
916
969
|
width: p,
|
|
917
970
|
height: l,
|
|
918
|
-
className:
|
|
971
|
+
className: G.svg,
|
|
919
972
|
onMouseMove: D,
|
|
920
973
|
onMouseLeave: O,
|
|
921
974
|
children: [
|
|
@@ -923,26 +976,26 @@ function ye({ series: e, labels: a, type: c = "line", height: l = 200, showLegen
|
|
|
923
976
|
A,
|
|
924
977
|
j,
|
|
925
978
|
F,
|
|
926
|
-
|
|
979
|
+
o === "line" ? M() : N(),
|
|
927
980
|
P()
|
|
928
981
|
]
|
|
929
982
|
}), I]
|
|
930
|
-
}), u && e.length > 1 && /* @__PURE__ */
|
|
931
|
-
className:
|
|
932
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
933
|
-
className:
|
|
934
|
-
children: [/* @__PURE__ */
|
|
935
|
-
className:
|
|
936
|
-
style: { background: e.color ??
|
|
937
|
-
}), /* @__PURE__ */
|
|
938
|
-
className:
|
|
983
|
+
}), u && e.length > 1 && /* @__PURE__ */ s("div", {
|
|
984
|
+
className: G.legend,
|
|
985
|
+
children: e.map((e, t) => /* @__PURE__ */ c("div", {
|
|
986
|
+
className: G.legendItem,
|
|
987
|
+
children: [/* @__PURE__ */ s("div", {
|
|
988
|
+
className: G.legendMark,
|
|
989
|
+
style: { background: e.color ?? K }
|
|
990
|
+
}), /* @__PURE__ */ s("span", {
|
|
991
|
+
className: G.legendLabel,
|
|
939
992
|
children: e.label
|
|
940
993
|
})]
|
|
941
994
|
}, t))
|
|
942
995
|
})]
|
|
943
996
|
});
|
|
944
997
|
}
|
|
945
|
-
var
|
|
998
|
+
var Y = {
|
|
946
999
|
wrapper: "_wrapper_17ws4_1",
|
|
947
1000
|
label: "_label_17ws4_7",
|
|
948
1001
|
textarea: "_textarea_17ws4_12",
|
|
@@ -951,64 +1004,64 @@ var J = {
|
|
|
951
1004
|
};
|
|
952
1005
|
//#endregion
|
|
953
1006
|
//#region src/components/Textarea/Textarea.tsx
|
|
954
|
-
function be({ label: t, error: n, className: r = "", isValid: i = !0, id: a, rows:
|
|
1007
|
+
function be({ label: t, error: n, className: r = "", isValid: i = !0, id: a, rows: o = 4, ...l }) {
|
|
955
1008
|
let u = e.useId(), d = a || u, f = `${d}-error`, p = n || !i;
|
|
956
|
-
return /* @__PURE__ */
|
|
957
|
-
className: `${
|
|
1009
|
+
return /* @__PURE__ */ c("div", {
|
|
1010
|
+
className: `${Y.wrapper} ${r}`,
|
|
958
1011
|
children: [
|
|
959
|
-
t && /* @__PURE__ */
|
|
1012
|
+
t && /* @__PURE__ */ c("label", {
|
|
960
1013
|
htmlFor: d,
|
|
961
|
-
className:
|
|
962
|
-
children: [t, l.required && /* @__PURE__ */
|
|
1014
|
+
className: Y.label,
|
|
1015
|
+
children: [t, l.required && /* @__PURE__ */ s("span", {
|
|
963
1016
|
"aria-label": "required",
|
|
964
1017
|
children: " *"
|
|
965
1018
|
})]
|
|
966
1019
|
}),
|
|
967
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ s("textarea", {
|
|
968
1021
|
id: d,
|
|
969
|
-
rows:
|
|
970
|
-
className: `${
|
|
1022
|
+
rows: o,
|
|
1023
|
+
className: `${Y.textarea} ${p ? Y.error : ""}`,
|
|
971
1024
|
"aria-invalid": p ? "true" : "false",
|
|
972
1025
|
"aria-describedby": n ? f : void 0,
|
|
973
1026
|
...l
|
|
974
1027
|
}),
|
|
975
|
-
n && /* @__PURE__ */
|
|
1028
|
+
n && /* @__PURE__ */ s("span", {
|
|
976
1029
|
id: f,
|
|
977
|
-
className:
|
|
1030
|
+
className: Y.errorText,
|
|
978
1031
|
role: "alert",
|
|
979
1032
|
children: n
|
|
980
1033
|
})
|
|
981
1034
|
]
|
|
982
1035
|
});
|
|
983
1036
|
}
|
|
984
|
-
var
|
|
1037
|
+
var X = {
|
|
985
1038
|
overlay: "_overlay_xud7c_1",
|
|
986
1039
|
content: "_content_xud7c_8",
|
|
987
1040
|
title: "_title_xud7c_26",
|
|
988
1041
|
description: "_description_xud7c_34",
|
|
989
1042
|
close: "_close_xud7c_40",
|
|
990
1043
|
srOnly: "_srOnly_xud7c_62"
|
|
991
|
-
}, xe = ({ trigger: e, children: t, open: n, onOpenChange: r, title: i, description: a, className:
|
|
1044
|
+
}, xe = ({ trigger: e, children: t, open: n, onOpenChange: r, title: i, description: a, className: o = "", showClose: l = !0 }) => /* @__PURE__ */ c(x.Root, {
|
|
992
1045
|
open: n,
|
|
993
1046
|
onOpenChange: r,
|
|
994
|
-
children: [e && /* @__PURE__ */
|
|
1047
|
+
children: [e && /* @__PURE__ */ s(x.Trigger, {
|
|
995
1048
|
asChild: !0,
|
|
996
1049
|
children: e
|
|
997
|
-
}), /* @__PURE__ */
|
|
998
|
-
className: `${
|
|
1050
|
+
}), /* @__PURE__ */ c(x.Portal, { children: [/* @__PURE__ */ s(x.Overlay, { className: X.overlay }), /* @__PURE__ */ c(x.Content, {
|
|
1051
|
+
className: `${X.content} ${o}`,
|
|
999
1052
|
children: [
|
|
1000
|
-
/* @__PURE__ */
|
|
1001
|
-
className: i ?
|
|
1053
|
+
/* @__PURE__ */ s(x.Title, {
|
|
1054
|
+
className: i ? X.title : X.srOnly,
|
|
1002
1055
|
children: i || "Dialog"
|
|
1003
1056
|
}),
|
|
1004
|
-
a && /* @__PURE__ */
|
|
1005
|
-
className:
|
|
1057
|
+
a && /* @__PURE__ */ s(x.Description, {
|
|
1058
|
+
className: X.description,
|
|
1006
1059
|
children: a
|
|
1007
1060
|
}),
|
|
1008
|
-
l && /* @__PURE__ */
|
|
1009
|
-
className:
|
|
1061
|
+
l && /* @__PURE__ */ s(x.Close, {
|
|
1062
|
+
className: X.close,
|
|
1010
1063
|
"aria-label": "Close",
|
|
1011
|
-
children: /* @__PURE__ */
|
|
1064
|
+
children: /* @__PURE__ */ s(g, {
|
|
1012
1065
|
size: 16,
|
|
1013
1066
|
color: "currentColor"
|
|
1014
1067
|
})
|
|
@@ -1016,7 +1069,7 @@ var Y = {
|
|
|
1016
1069
|
t
|
|
1017
1070
|
]
|
|
1018
1071
|
})] })]
|
|
1019
|
-
}),
|
|
1072
|
+
}), Z = {
|
|
1020
1073
|
wrapper: "_wrapper_aimna_1",
|
|
1021
1074
|
label: "_label_aimna_7",
|
|
1022
1075
|
trigger: "_trigger_aimna_12",
|
|
@@ -1057,114 +1110,159 @@ var Y = {
|
|
|
1057
1110
|
"November",
|
|
1058
1111
|
"December"
|
|
1059
1112
|
];
|
|
1060
|
-
function
|
|
1113
|
+
function Q(e) {
|
|
1061
1114
|
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
1062
1115
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
1063
1116
|
}
|
|
1064
|
-
function
|
|
1117
|
+
function $(e, t) {
|
|
1065
1118
|
return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1066
1119
|
}
|
|
1067
|
-
function
|
|
1120
|
+
function we(e, t) {
|
|
1068
1121
|
let n = (new Date(e, t, 1).getDay() + 6) % 7, r = [];
|
|
1069
1122
|
for (let i = 0; i < 42; i++) r.push(new Date(e, t, 1 - n + i));
|
|
1070
1123
|
return r;
|
|
1071
1124
|
}
|
|
1072
|
-
var
|
|
1073
|
-
let g =
|
|
1125
|
+
var Te = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", error: o, isValid: l = !0, disabled: p = !1, className: m = "", formatDate: h = Q }) => {
|
|
1126
|
+
let g = e.useId(), _ = `${g}-error`, v = !!o || !l, [b, x] = a(!1), S = /* @__PURE__ */ new Date(), C = t ?? S, [w, T] = a(C.getFullYear()), [E, D] = a(C.getMonth()), [O, k] = a(C), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1), M = (e) => {
|
|
1127
|
+
if (e) {
|
|
1128
|
+
let e = t ?? /* @__PURE__ */ new Date();
|
|
1129
|
+
k(e), T(e.getFullYear()), D(e.getMonth());
|
|
1130
|
+
}
|
|
1131
|
+
x(e);
|
|
1132
|
+
};
|
|
1074
1133
|
e.useEffect(() => {
|
|
1075
|
-
|
|
1076
|
-
}, [
|
|
1077
|
-
let
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1134
|
+
j.current &&= (A.current.get(Q(O))?.focus(), !1);
|
|
1135
|
+
}, [O]);
|
|
1136
|
+
let N = (e, t) => {
|
|
1137
|
+
let n = new Date(t), r = {
|
|
1138
|
+
ArrowLeft: -1,
|
|
1139
|
+
ArrowRight: 1,
|
|
1140
|
+
ArrowUp: -7,
|
|
1141
|
+
ArrowDown: 7
|
|
1142
|
+
}[e.key];
|
|
1143
|
+
if (r !== void 0) n.setDate(n.getDate() + r);
|
|
1144
|
+
else if (e.key === "Home") n.setDate(n.getDate() - (n.getDay() + 6) % 7);
|
|
1145
|
+
else if (e.key === "End") n.setDate(n.getDate() + 6 - (n.getDay() + 6) % 7);
|
|
1146
|
+
else if (e.key === "PageUp" || e.key === "PageDown") {
|
|
1147
|
+
let t = n.getDate();
|
|
1148
|
+
n.setDate(1), n.setMonth(n.getMonth() + (e.key === "PageUp" ? -1 : 1) * (e.shiftKey ? 12 : 1)), n.setDate(Math.min(t, new Date(n.getFullYear(), n.getMonth() + 1, 0).getDate()));
|
|
1149
|
+
} else return;
|
|
1150
|
+
e.preventDefault(), j.current = !0, k(n), T(n.getFullYear()), D(n.getMonth());
|
|
1151
|
+
};
|
|
1152
|
+
e.useEffect(() => {
|
|
1153
|
+
b && t && (T(t.getFullYear()), D(t.getMonth()));
|
|
1154
|
+
}, [b]);
|
|
1155
|
+
let P = () => {
|
|
1156
|
+
E === 0 ? (D(11), T(w - 1)) : D(E - 1);
|
|
1157
|
+
}, F = () => {
|
|
1158
|
+
E === 11 ? (D(0), T(w + 1)) : D(E + 1);
|
|
1159
|
+
}, I = (e) => {
|
|
1160
|
+
n?.(e), x(!1);
|
|
1161
|
+
}, L = we(w, E);
|
|
1162
|
+
return /* @__PURE__ */ c("div", {
|
|
1163
|
+
className: `${Z.wrapper} ${m}`,
|
|
1086
1164
|
children: [
|
|
1087
|
-
r && /* @__PURE__ */
|
|
1088
|
-
|
|
1165
|
+
r && /* @__PURE__ */ s("span", {
|
|
1166
|
+
id: `${g}-label`,
|
|
1167
|
+
className: Z.label,
|
|
1089
1168
|
children: r
|
|
1090
1169
|
}),
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
open:
|
|
1093
|
-
onOpenChange:
|
|
1094
|
-
children: [/* @__PURE__ */
|
|
1170
|
+
/* @__PURE__ */ c(y.Root, {
|
|
1171
|
+
open: b,
|
|
1172
|
+
onOpenChange: M,
|
|
1173
|
+
children: [/* @__PURE__ */ s(y.Trigger, {
|
|
1095
1174
|
asChild: !0,
|
|
1096
|
-
children: /* @__PURE__ */
|
|
1175
|
+
children: /* @__PURE__ */ c("button", {
|
|
1097
1176
|
type: "button",
|
|
1098
|
-
className: `${
|
|
1177
|
+
className: `${Z.trigger} ${v ? Z.error : ""}`,
|
|
1099
1178
|
disabled: p,
|
|
1100
|
-
"aria-
|
|
1101
|
-
"aria-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1179
|
+
"aria-labelledby": r ? `${g}-label ${g}-value` : void 0,
|
|
1180
|
+
"aria-invalid": v ? "true" : "false",
|
|
1181
|
+
"aria-describedby": o ? _ : void 0,
|
|
1182
|
+
children: [/* @__PURE__ */ s("span", {
|
|
1183
|
+
id: `${g}-value`,
|
|
1184
|
+
className: t ? Z.valueText : Z.placeholder,
|
|
1185
|
+
children: t ? h(t) : i
|
|
1186
|
+
}), /* @__PURE__ */ s(u, {
|
|
1106
1187
|
size: 14,
|
|
1107
1188
|
color: "currentColor"
|
|
1108
1189
|
})]
|
|
1109
1190
|
})
|
|
1110
|
-
}), /* @__PURE__ */
|
|
1111
|
-
className:
|
|
1191
|
+
}), /* @__PURE__ */ s(y.Portal, { children: /* @__PURE__ */ c(y.Content, {
|
|
1192
|
+
className: Z.calendar,
|
|
1112
1193
|
align: "start",
|
|
1113
1194
|
sideOffset: 5,
|
|
1195
|
+
"aria-label": r ? `${r} calendar` : "Choose a date",
|
|
1196
|
+
onOpenAutoFocus: (e) => {
|
|
1197
|
+
e.preventDefault(), A.current.get(Q(O))?.focus();
|
|
1198
|
+
},
|
|
1114
1199
|
children: [
|
|
1115
|
-
/* @__PURE__ */
|
|
1116
|
-
className:
|
|
1200
|
+
/* @__PURE__ */ c("div", {
|
|
1201
|
+
className: Z.header,
|
|
1117
1202
|
children: [
|
|
1118
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ s("button", {
|
|
1119
1204
|
type: "button",
|
|
1120
|
-
className:
|
|
1121
|
-
onClick:
|
|
1205
|
+
className: Z.navButton,
|
|
1206
|
+
onClick: P,
|
|
1122
1207
|
"aria-label": "Previous month",
|
|
1123
|
-
children: /* @__PURE__ */
|
|
1208
|
+
children: /* @__PURE__ */ s(d, {
|
|
1124
1209
|
size: 14,
|
|
1125
1210
|
color: "currentColor"
|
|
1126
1211
|
})
|
|
1127
1212
|
}),
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
className:
|
|
1213
|
+
/* @__PURE__ */ c("span", {
|
|
1214
|
+
className: Z.monthLabel,
|
|
1130
1215
|
children: [
|
|
1131
|
-
Ce[
|
|
1216
|
+
Ce[E],
|
|
1132
1217
|
" ",
|
|
1133
|
-
|
|
1218
|
+
w
|
|
1134
1219
|
]
|
|
1135
1220
|
}),
|
|
1136
|
-
/* @__PURE__ */
|
|
1221
|
+
/* @__PURE__ */ s("button", {
|
|
1137
1222
|
type: "button",
|
|
1138
|
-
className:
|
|
1139
|
-
onClick:
|
|
1223
|
+
className: Z.navButton,
|
|
1224
|
+
onClick: F,
|
|
1140
1225
|
"aria-label": "Next month",
|
|
1141
|
-
children: /* @__PURE__ */
|
|
1226
|
+
children: /* @__PURE__ */ s(f, {
|
|
1142
1227
|
size: 14,
|
|
1143
1228
|
color: "currentColor"
|
|
1144
1229
|
})
|
|
1145
1230
|
})
|
|
1146
1231
|
]
|
|
1147
1232
|
}),
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
className:
|
|
1150
|
-
children: Se.map((e) => /* @__PURE__ */
|
|
1151
|
-
className:
|
|
1233
|
+
/* @__PURE__ */ s("div", {
|
|
1234
|
+
className: Z.weekdays,
|
|
1235
|
+
children: Se.map((e) => /* @__PURE__ */ s("span", {
|
|
1236
|
+
className: Z.weekday,
|
|
1152
1237
|
children: e
|
|
1153
1238
|
}, e))
|
|
1154
1239
|
}),
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
-
className:
|
|
1157
|
-
children:
|
|
1158
|
-
let n = e.getMonth() !==
|
|
1159
|
-
return /* @__PURE__ */
|
|
1240
|
+
/* @__PURE__ */ s("div", {
|
|
1241
|
+
className: Z.grid,
|
|
1242
|
+
children: L.map((e) => {
|
|
1243
|
+
let n = e.getMonth() !== E, r = $(e, t), i = $(e, S);
|
|
1244
|
+
return /* @__PURE__ */ s("button", {
|
|
1160
1245
|
type: "button",
|
|
1161
1246
|
className: [
|
|
1162
|
-
|
|
1163
|
-
n ?
|
|
1164
|
-
r ?
|
|
1165
|
-
i && !r ?
|
|
1247
|
+
Z.day,
|
|
1248
|
+
n ? Z.outside : "",
|
|
1249
|
+
r ? Z.selected : "",
|
|
1250
|
+
i && !r ? Z.today : ""
|
|
1166
1251
|
].filter(Boolean).join(" "),
|
|
1167
|
-
onClick: () =>
|
|
1252
|
+
onClick: () => I(e),
|
|
1253
|
+
ref: (t) => {
|
|
1254
|
+
t ? A.current.set(Q(e), t) : A.current.delete(Q(e));
|
|
1255
|
+
},
|
|
1256
|
+
"aria-label": e.toLocaleDateString(void 0, {
|
|
1257
|
+
weekday: "long",
|
|
1258
|
+
year: "numeric",
|
|
1259
|
+
month: "long",
|
|
1260
|
+
day: "numeric"
|
|
1261
|
+
}),
|
|
1262
|
+
"aria-pressed": r,
|
|
1263
|
+
"aria-current": i ? "date" : void 0,
|
|
1264
|
+
tabIndex: $(e, O) || O.getMonth() !== E && e.getDate() === 1 && !n ? 0 : -1,
|
|
1265
|
+
onKeyDown: (t) => N(t, e),
|
|
1168
1266
|
children: e.getDate()
|
|
1169
1267
|
}, e.toISOString());
|
|
1170
1268
|
})
|
|
@@ -1172,18 +1270,18 @@ var Ee = ({ value: t, onChange: n, label: r, placeholder: a = "Select a date", e
|
|
|
1172
1270
|
]
|
|
1173
1271
|
}) })]
|
|
1174
1272
|
}),
|
|
1175
|
-
|
|
1176
|
-
id:
|
|
1177
|
-
className:
|
|
1273
|
+
o && /* @__PURE__ */ s("span", {
|
|
1274
|
+
id: _,
|
|
1275
|
+
className: Z.errorText,
|
|
1178
1276
|
role: "alert",
|
|
1179
|
-
children:
|
|
1277
|
+
children: o
|
|
1180
1278
|
})
|
|
1181
1279
|
]
|
|
1182
1280
|
});
|
|
1183
|
-
},
|
|
1281
|
+
}, Ee = {
|
|
1184
1282
|
spinner: "_spinner_wspyi_1",
|
|
1185
1283
|
frame: "_frame_wspyi_8"
|
|
1186
|
-
},
|
|
1284
|
+
}, De = {
|
|
1187
1285
|
accelerate: {
|
|
1188
1286
|
viewBox: "0 0 7 5",
|
|
1189
1287
|
delay: 50,
|
|
@@ -1228,6 +1326,20 @@ var Ee = ({ value: t, onChange: n, label: r, placeholder: a = "Select a date", e
|
|
|
1228
1326
|
"M1 2H2V3H1V2Z"
|
|
1229
1327
|
]
|
|
1230
1328
|
},
|
|
1329
|
+
analytics: {
|
|
1330
|
+
viewBox: "0 0 8 5",
|
|
1331
|
+
delay: 250,
|
|
1332
|
+
frames: [
|
|
1333
|
+
"M0 2H1V5H0V2Z M2 0H3V5H2V0Z M4 3H5V5H4V3Z M6 1H7V5H6V1Z",
|
|
1334
|
+
"M7 2H8V5H7V2Z M1 0H2V5H1V0Z M3 3H4V5H3V3Z M5 1H6V5H5V1Z",
|
|
1335
|
+
"M6 2H7V5H6V2Z M0 0H1V5H0V0Z M2 3H3V5H2V3Z M4 1H5V5H4V1Z",
|
|
1336
|
+
"M5 2H6V5H5V2Z M7 0H8V5H7V0Z M1 3H2V5H1V3Z M3 1H4V5H3V1Z",
|
|
1337
|
+
"M4 2H5V5H4V2Z M6 0H7V5H6V0Z M0 3H1V5H0V3Z M2 1H3V5H2V1Z",
|
|
1338
|
+
"M3 2H4V5H3V2Z M5 0H6V5H5V0Z M7 3H8V5H7V3Z M1 1H2V5H1V1Z",
|
|
1339
|
+
"M2 2H3V5H2V2Z M4 0H5V5H4V0Z M6 3H7V5H6V3Z M0 1H1V5H0V1Z",
|
|
1340
|
+
"M1 2H2V5H1V2Z M3 0H4V5H3V0Z M5 3H6V5H5V3Z M7 1H8V5H7V1Z"
|
|
1341
|
+
]
|
|
1342
|
+
},
|
|
1231
1343
|
"circle-open-close": {
|
|
1232
1344
|
viewBox: "0 0 7 5",
|
|
1233
1345
|
delay: 100,
|
|
@@ -1286,6 +1398,15 @@ var Ee = ({ value: t, onChange: n, label: r, placeholder: a = "Select a date", e
|
|
|
1286
1398
|
"M5 4H6V5H5V4Z M4 4H5V5H4V4Z M3 4H4V5H3V4Z M3 3H6V4H3V3Z M2 3H3V4H2V3Z M0 1H1V2H0V1Z M1 1H2V2H1V1Z M0 2H1V3H0V2Z M2 1H3V2H2V1Z M2 0H3V1H2V0Z M3 0H4V1H3V0Z M5 0H6V1H5V0Z M4 0H5V1H4V0Z M6 0H7V1H6V0Z M2 2H3V3H2V2Z M6 3H7V4H6V3Z M6 2H7V3H6V2Z M6 1H7V2H6V1Z"
|
|
1287
1399
|
]
|
|
1288
1400
|
},
|
|
1401
|
+
flag: {
|
|
1402
|
+
viewBox: "0 0 7 5",
|
|
1403
|
+
delay: 250,
|
|
1404
|
+
frames: [
|
|
1405
|
+
"M5 3H6V4H5V3Z M3 3H4V4H3V3Z M2 2H3V3H2V2Z M1 2H2V3H1V2Z M0 2H1V3H0V2Z M0 3H1V4H0V3Z M0 4H1V5H0V4Z M0 1H1V2H0V1Z M0 0H1V1H0V0Z M2 0H3V1H2V0Z M1 0H2V1H1V0Z M3 0H4V1H3V0Z M4 1H5V2H4V1Z M4 3H5V4H4V3Z M5 2H6V3H5V2Z M5 1H6V2H5V1Z",
|
|
1406
|
+
"M5 3H6V4H5V3Z M3 2H4V3H3V2Z M2 2H3V3H2V2Z M1 2H2V3H1V2Z M0 2H1V3H0V2Z M0 3H1V4H0V3Z M0 4H1V5H0V4Z M0 1H1V2H0V1Z M0 0H1V1H0V0Z M2 0H3V1H2V0Z M1 0H2V1H1V0Z M3 0H4V1H3V0Z M4 1H5V2H4V1Z M4 3H5V4H4V3Z M5 2H6V3H5V2Z M5 1H6V2H5V1Z",
|
|
1407
|
+
"M5 2H6V3H5V2Z M3 2H4V3H3V2Z M2 2H3V3H2V2Z M1 2H2V3H1V2Z M0 2H1V3H0V2Z M0 3H1V4H0V3Z M0 4H1V5H0V4Z M0 1H1V2H0V1Z M0 0H1V1H0V0Z M2 0H3V1H2V0Z M1 0H2V1H1V0Z M3 0H4V1H3V0Z M4 0H5V1H4V0Z M4 2H5V3H4V2Z M5 1H6V2H5V1Z M5 0H6V1H5V0Z"
|
|
1408
|
+
]
|
|
1409
|
+
},
|
|
1289
1410
|
grow: {
|
|
1290
1411
|
viewBox: "0 0 7 5",
|
|
1291
1412
|
delay: 250,
|
|
@@ -1421,22 +1542,22 @@ var Ee = ({ value: t, onChange: n, label: r, placeholder: a = "Select a date", e
|
|
|
1421
1542
|
"M3 4H4V5H3V4Z M5 3H6V4H5V3Z M6 1H7V2H6V1Z M1 3H2V4H1V3Z M0 1H1V2H0V1Z M2 2H5V3H2V2Z M1 0H6V1H1V0Z"
|
|
1422
1543
|
]
|
|
1423
1544
|
}
|
|
1424
|
-
},
|
|
1545
|
+
}, Oe = Object.keys(De);
|
|
1425
1546
|
//#endregion
|
|
1426
1547
|
//#region src/components/Spinner/Spinner.tsx
|
|
1427
|
-
function
|
|
1428
|
-
let
|
|
1429
|
-
return /* @__PURE__ */
|
|
1430
|
-
className: `${
|
|
1548
|
+
function ke({ name: e = Oe[0], size: t = 21, color: n = "currentColor", delay: r, className: i = "", "aria-label": a = "Loading" }) {
|
|
1549
|
+
let o = De[e], [, , c, l] = o.viewBox.split(" ").map(Number), u = l / c, d = typeof t == "number" ? t * u : `calc(${t} * ${u})`, f = r ?? o.delay, p = o.frames.length, m = p * f;
|
|
1550
|
+
return /* @__PURE__ */ s("svg", {
|
|
1551
|
+
className: `${Ee.spinner} ${i}`,
|
|
1431
1552
|
width: t,
|
|
1432
1553
|
height: d,
|
|
1433
|
-
viewBox:
|
|
1554
|
+
viewBox: o.viewBox,
|
|
1434
1555
|
fill: "none",
|
|
1435
1556
|
role: "status",
|
|
1436
1557
|
"aria-label": a,
|
|
1437
1558
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1438
|
-
children:
|
|
1439
|
-
className:
|
|
1559
|
+
children: o.frames.map((e, t) => e ? /* @__PURE__ */ s("path", {
|
|
1560
|
+
className: Ee.frame,
|
|
1440
1561
|
d: e,
|
|
1441
1562
|
fill: n,
|
|
1442
1563
|
style: {
|
|
@@ -1447,4 +1568,4 @@ function Oe({ name: e = De[0], size: t = 21, color: n = "currentColor", delay: r
|
|
|
1447
1568
|
});
|
|
1448
1569
|
}
|
|
1449
1570
|
//#endregion
|
|
1450
|
-
export {
|
|
1571
|
+
export { D as Base, C as Button, ye as Chart, T as Checkbox, pe as Chip, Te as DatePicker, k as FilterPanelBase, P as InputField, xe as Modal, ie as Popover, fe as ProgressBar, I as RadioButton, M as SearchField, ne as Select, te as Slider, ke as Spinner, ae as Table, ce as TableCell, oe as TableHeader, ue as TableIcon, se as TableRow, le as TableValue, de as Tabs, be as Textarea, ee as ToggleSwitch, me as Tooltip, Oe as spinnerNames };
|