@indxsearch/systm 2.18.0 → 2.20.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/CHANGELOG.md +22 -0
- package/dist/components/CodeCopy/CodeCopy.d.ts +10 -0
- package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +690 -628
- package/dist/systm.css +1 -1
- package/package.json +8 -9
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import e, { cloneElement as t, isValidElement as n, useCallback as r, useEffect as i, useId as a, useImperativeHandle as o,
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { Ai_agent as
|
|
4
|
-
import { Range as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
1
|
+
import e, { cloneElement as t, isValidElement as n, useCallback as r, useEffect as i, useId as a, useImperativeHandle as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
|
|
2
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
3
|
+
import { Ai_agent as p, ArrowUp as m, Check as h, Chevron_down as g, Chevron_left as _, Chevron_right as v, Copy as y, Dropdown as b, Minus as x, Plus as S, Search as C, Stop as w, Warning as T, X_or_error as E } from "@indxsearch/pixl";
|
|
4
|
+
import { Range as D } from "react-range";
|
|
5
|
+
import * as O from "@radix-ui/react-select";
|
|
6
|
+
import * as k from "@radix-ui/react-popover";
|
|
7
|
+
import * as A from "@radix-ui/react-tooltip";
|
|
8
|
+
import * as j from "@radix-ui/react-dialog";
|
|
9
|
+
import * as M from "@radix-ui/react-navigation-menu";
|
|
10
10
|
var ee = {
|
|
11
11
|
button: "_button_15lsu_1",
|
|
12
12
|
micro: "_micro_15lsu_29",
|
|
@@ -283,17 +283,17 @@ var ee = {
|
|
|
283
283
|
//#endregion
|
|
284
284
|
//#region src/components/Spinner/Spinner.tsx
|
|
285
285
|
function ie({ name: e = re[0], size: t = 21, color: n = "currentColor", delay: r, className: i = "", "aria-label": a = "Loading" }) {
|
|
286
|
-
let o = ne[e], [, , s, c] = o.viewBox.split(" ").map(Number), l = c / s,
|
|
287
|
-
return /* @__PURE__ */
|
|
286
|
+
let o = ne[e], [, , s, c] = o.viewBox.split(" ").map(Number), l = c / s, u = typeof t == "number" ? t * l : `calc(${t} * ${l})`, f = r ?? o.delay, p = o.frames.length, m = p * f;
|
|
287
|
+
return /* @__PURE__ */ d("svg", {
|
|
288
288
|
className: `${te.spinner} ${i}`,
|
|
289
289
|
width: t,
|
|
290
|
-
height:
|
|
290
|
+
height: u,
|
|
291
291
|
viewBox: o.viewBox,
|
|
292
292
|
fill: "none",
|
|
293
293
|
role: "status",
|
|
294
294
|
"aria-label": a,
|
|
295
295
|
xmlns: "http://www.w3.org/2000/svg",
|
|
296
|
-
children: o.frames.map((e, t) => e ? /* @__PURE__ */
|
|
296
|
+
children: o.frames.map((e, t) => e ? /* @__PURE__ */ d("path", {
|
|
297
297
|
className: te.frame,
|
|
298
298
|
d: e,
|
|
299
299
|
fill: n,
|
|
@@ -306,15 +306,15 @@ function ie({ name: e = re[0], size: t = 21, color: n = "currentColor", delay: r
|
|
|
306
306
|
}
|
|
307
307
|
//#endregion
|
|
308
308
|
//#region src/components/Button/Button.tsx
|
|
309
|
-
function
|
|
310
|
-
let { size: n = "default", variant: r = "primary", iconLeft: i, iconRight: a, className: o, children: s, loading: c = !1, ...
|
|
309
|
+
function N(t) {
|
|
310
|
+
let { size: n = "default", variant: r = "primary", iconLeft: i, iconRight: a, className: o, children: s, loading: c = !1, ...l } = t, p = t.disabled || c, { href: m } = l, h = n === "micro" ? "14px" : n === "large" ? "21px" : "14px", g = n === "large" ? 21 : 14, _ = [
|
|
311
311
|
ee.button,
|
|
312
312
|
ee[n],
|
|
313
313
|
ee[r],
|
|
314
314
|
p ? "cursor-not-allowed" : "cursor-pointer",
|
|
315
315
|
o
|
|
316
|
-
].filter(Boolean).join(" "), v = /* @__PURE__ */
|
|
317
|
-
c ? /* @__PURE__ */
|
|
316
|
+
].filter(Boolean).join(" "), v = /* @__PURE__ */ f(u, { children: [
|
|
317
|
+
c ? /* @__PURE__ */ d(ie, { size: g }) : i && e.cloneElement(i, {
|
|
318
318
|
size: h,
|
|
319
319
|
color: "currentColor"
|
|
320
320
|
}),
|
|
@@ -325,8 +325,8 @@ function M(t) {
|
|
|
325
325
|
})
|
|
326
326
|
] });
|
|
327
327
|
if (m) {
|
|
328
|
-
let { type: e, href: t, onClick: n, tabIndex: r, disabled: i, ...a } =
|
|
329
|
-
return p ? /* @__PURE__ */
|
|
328
|
+
let { type: e, href: t, onClick: n, tabIndex: r, disabled: i, ...a } = l;
|
|
329
|
+
return p ? /* @__PURE__ */ d("a", {
|
|
330
330
|
className: _,
|
|
331
331
|
...a,
|
|
332
332
|
"aria-disabled": "true",
|
|
@@ -336,7 +336,7 @@ function M(t) {
|
|
|
336
336
|
e.preventDefault(), e.stopPropagation();
|
|
337
337
|
},
|
|
338
338
|
children: v
|
|
339
|
-
}) : /* @__PURE__ */
|
|
339
|
+
}) : /* @__PURE__ */ d("a", {
|
|
340
340
|
className: _,
|
|
341
341
|
href: m,
|
|
342
342
|
...a,
|
|
@@ -345,8 +345,8 @@ function M(t) {
|
|
|
345
345
|
children: v
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
|
-
let { type: y = "button", href: b, disabled: x, ...S } =
|
|
349
|
-
return /* @__PURE__ */
|
|
348
|
+
let { type: y = "button", href: b, disabled: x, ...S } = l;
|
|
349
|
+
return /* @__PURE__ */ d("button", {
|
|
350
350
|
className: _,
|
|
351
351
|
type: y,
|
|
352
352
|
disabled: p,
|
|
@@ -355,42 +355,42 @@ function M(t) {
|
|
|
355
355
|
children: v
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
var
|
|
358
|
+
var P = {
|
|
359
359
|
checkboxWrapper: "_checkboxWrapper_1vygn_1",
|
|
360
360
|
checkbox: "_checkbox_1vygn_1",
|
|
361
361
|
label: "_label_1vygn_44",
|
|
362
362
|
score: "_score_1vygn_48",
|
|
363
363
|
disabled: "_disabled_1vygn_55"
|
|
364
364
|
}, ae = ({ label: t, score: n, className: r = "", id: i, "aria-label": a, ...o }) => {
|
|
365
|
-
let s = e.useId(), c = i || s, l = n ? `${c}-score` : void 0,
|
|
366
|
-
return t || n ? /* @__PURE__ */
|
|
365
|
+
let s = e.useId(), c = i || s, l = n ? `${c}-score` : void 0, u = o.disabled;
|
|
366
|
+
return t || n ? /* @__PURE__ */ f("label", {
|
|
367
367
|
htmlFor: c,
|
|
368
|
-
className: `${
|
|
368
|
+
className: `${P.checkboxWrapper} ${r} ${u ? P.disabled : ""} ${u ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
369
369
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ d("input", {
|
|
371
371
|
id: c,
|
|
372
372
|
type: "checkbox",
|
|
373
|
-
className:
|
|
373
|
+
className: P.checkbox,
|
|
374
374
|
"aria-describedby": l,
|
|
375
375
|
"aria-label": a,
|
|
376
376
|
...o
|
|
377
377
|
}),
|
|
378
|
-
t && /* @__PURE__ */
|
|
379
|
-
className:
|
|
378
|
+
t && /* @__PURE__ */ d("span", {
|
|
379
|
+
className: P.label,
|
|
380
380
|
children: t
|
|
381
381
|
}),
|
|
382
|
-
n && /* @__PURE__ */
|
|
382
|
+
n && /* @__PURE__ */ d("span", {
|
|
383
383
|
id: l,
|
|
384
|
-
className:
|
|
384
|
+
className: P.score,
|
|
385
385
|
children: n
|
|
386
386
|
})
|
|
387
387
|
]
|
|
388
|
-
}) : /* @__PURE__ */
|
|
388
|
+
}) : /* @__PURE__ */ d("input", {
|
|
389
389
|
id: c,
|
|
390
390
|
type: "checkbox",
|
|
391
|
-
className: `${
|
|
391
|
+
className: `${P.checkbox} ${r}`,
|
|
392
392
|
"aria-label": a,
|
|
393
|
-
disabled:
|
|
393
|
+
disabled: u,
|
|
394
394
|
...o
|
|
395
395
|
});
|
|
396
396
|
}, oe = {
|
|
@@ -400,12 +400,12 @@ var N = {
|
|
|
400
400
|
//#endregion
|
|
401
401
|
//#region src/components/Base/Base.tsx
|
|
402
402
|
function se({ children: e, className: t }) {
|
|
403
|
-
return /* @__PURE__ */
|
|
403
|
+
return /* @__PURE__ */ d("div", {
|
|
404
404
|
className: `${oe.container} ${oe.default} ${t || ""}`,
|
|
405
405
|
children: e
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
|
-
var
|
|
408
|
+
var F = {
|
|
409
409
|
container: "_container_10bfq_1",
|
|
410
410
|
header: "_header_10bfq_11",
|
|
411
411
|
title: "_title_10bfq_31",
|
|
@@ -415,110 +415,123 @@ var P = {
|
|
|
415
415
|
//#endregion
|
|
416
416
|
//#region src/components/FilterPanelBase/FilterPanelBase.tsx
|
|
417
417
|
function ce({ title: t, children: n, className: r = "", collapsible: a = !0, collapsed: o = !1 }) {
|
|
418
|
-
let [s,
|
|
418
|
+
let [s, c] = l(() => !o), u = e.useId();
|
|
419
419
|
return i(() => {
|
|
420
|
-
a &&
|
|
421
|
-
}, [o, a]), /* @__PURE__ */
|
|
422
|
-
className: `${
|
|
423
|
-
children: [t && (a ? /* @__PURE__ */
|
|
420
|
+
a && c(!o);
|
|
421
|
+
}, [o, a]), /* @__PURE__ */ f("div", {
|
|
422
|
+
className: `${F.container} ${r}`,
|
|
423
|
+
children: [t && (a ? /* @__PURE__ */ f("button", {
|
|
424
424
|
type: "button",
|
|
425
|
-
className:
|
|
425
|
+
className: F.header,
|
|
426
426
|
onClick: () => {
|
|
427
|
-
a &&
|
|
427
|
+
a && c((e) => !e);
|
|
428
428
|
},
|
|
429
429
|
"aria-label": `${t}: ${s ? "Collapse panel" : "Expand panel"}`,
|
|
430
430
|
"aria-expanded": s,
|
|
431
|
-
"aria-controls":
|
|
432
|
-
children: [/* @__PURE__ */
|
|
433
|
-
className:
|
|
431
|
+
"aria-controls": u,
|
|
432
|
+
children: [/* @__PURE__ */ d("div", {
|
|
433
|
+
className: F.title,
|
|
434
434
|
children: t
|
|
435
|
-
}), /* @__PURE__ */
|
|
435
|
+
}), /* @__PURE__ */ d("span", {
|
|
436
436
|
"aria-hidden": "true",
|
|
437
|
-
children:
|
|
437
|
+
children: d(s ? x : S, {
|
|
438
438
|
color: "var(--lv5)",
|
|
439
439
|
size: 14
|
|
440
440
|
})
|
|
441
441
|
})]
|
|
442
|
-
}) : /* @__PURE__ */
|
|
443
|
-
className:
|
|
444
|
-
children: /* @__PURE__ */
|
|
445
|
-
className:
|
|
442
|
+
}) : /* @__PURE__ */ d("div", {
|
|
443
|
+
className: F.header,
|
|
444
|
+
children: /* @__PURE__ */ d("div", {
|
|
445
|
+
className: F.title,
|
|
446
446
|
children: t
|
|
447
447
|
})
|
|
448
|
-
})), (!a || s) && /* @__PURE__ */
|
|
449
|
-
id:
|
|
450
|
-
className:
|
|
448
|
+
})), (!a || s) && /* @__PURE__ */ d("div", {
|
|
449
|
+
id: u,
|
|
450
|
+
className: F.body,
|
|
451
451
|
role: "region",
|
|
452
452
|
"aria-label": t || "Filter panel content",
|
|
453
453
|
children: n
|
|
454
454
|
})]
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
var
|
|
458
|
-
wrapper: "
|
|
459
|
-
label: "
|
|
460
|
-
inputContainer: "
|
|
461
|
-
input: "
|
|
462
|
-
focus: "
|
|
463
|
-
searchIcon: "
|
|
464
|
-
rightContent: "
|
|
465
|
-
sizeMicro: "
|
|
466
|
-
sizeDefault: "
|
|
467
|
-
error: "
|
|
468
|
-
errorText: "
|
|
457
|
+
var I = {
|
|
458
|
+
wrapper: "_wrapper_nc093_1",
|
|
459
|
+
label: "_label_nc093_7",
|
|
460
|
+
inputContainer: "_inputContainer_nc093_12",
|
|
461
|
+
input: "_input_nc093_12",
|
|
462
|
+
focus: "_focus_nc093_35",
|
|
463
|
+
searchIcon: "_searchIcon_nc093_52",
|
|
464
|
+
rightContent: "_rightContent_nc093_69",
|
|
465
|
+
sizeMicro: "_sizeMicro_nc093_80",
|
|
466
|
+
sizeDefault: "_sizeDefault_nc093_89",
|
|
467
|
+
error: "_error_nc093_112",
|
|
468
|
+
errorText: "_errorText_nc093_116"
|
|
469
469
|
}, le = {
|
|
470
470
|
micro: 14,
|
|
471
471
|
default: 21
|
|
472
472
|
};
|
|
473
|
-
function ue({ label: t, error: n, className: r = "", showSearchIcon: i = !0, searchIcon: a, searchIconColor: o, inputSize:
|
|
474
|
-
let
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
473
|
+
function ue({ label: t, error: n, className: r = "", showSearchIcon: i = !0, searchIcon: a, searchIconColor: o, inputSize: u = "default", showFocusBorder: p = !1, children: m, id: h, type: g = "search", ..._ }) {
|
|
474
|
+
let v = c(null), y = c(null), [b, x] = l(0), S = e.Children.toArray(m).length > 0;
|
|
475
|
+
s(() => {
|
|
476
|
+
let e = y.current;
|
|
477
|
+
if (!e) {
|
|
478
|
+
x(0);
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
let t = () => x(e.offsetWidth);
|
|
482
|
+
t();
|
|
483
|
+
let n = new ResizeObserver(t);
|
|
484
|
+
return n.observe(e), () => n.disconnect();
|
|
485
|
+
}, [S]);
|
|
486
|
+
let w = e.useId(), T = h || w, E = `${T}-error`, D = le[u], O = {};
|
|
487
|
+
o && (O["--search-icon-color"] = o), b > 0 && (O.paddingRight = `${b + 10}px`);
|
|
488
|
+
let k = a ?? /* @__PURE__ */ d(C, {}), A = u === "micro" ? I.sizeMicro : I.sizeDefault;
|
|
489
|
+
return /* @__PURE__ */ f("div", {
|
|
490
|
+
className: `${I.wrapper} ${r}`,
|
|
479
491
|
children: [
|
|
480
|
-
t && /* @__PURE__ */
|
|
481
|
-
htmlFor:
|
|
482
|
-
className:
|
|
492
|
+
t && /* @__PURE__ */ d("label", {
|
|
493
|
+
htmlFor: T,
|
|
494
|
+
className: I.label,
|
|
483
495
|
children: t
|
|
484
496
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
className: `${
|
|
497
|
+
/* @__PURE__ */ f("div", {
|
|
498
|
+
className: `${I.inputContainer} ${A}`,
|
|
487
499
|
children: [
|
|
488
|
-
i && /* @__PURE__ */
|
|
489
|
-
className:
|
|
500
|
+
i && /* @__PURE__ */ d("span", {
|
|
501
|
+
className: I.searchIcon,
|
|
490
502
|
"aria-hidden": "true",
|
|
491
|
-
children: e.cloneElement(
|
|
492
|
-
size:
|
|
503
|
+
children: e.cloneElement(k, {
|
|
504
|
+
size: D,
|
|
493
505
|
color: o ?? "var(--search-icon-color)"
|
|
494
506
|
})
|
|
495
507
|
}),
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
-
ref:
|
|
498
|
-
id:
|
|
499
|
-
type:
|
|
500
|
-
className: `${
|
|
501
|
-
style:
|
|
508
|
+
/* @__PURE__ */ d("input", {
|
|
509
|
+
ref: v,
|
|
510
|
+
id: T,
|
|
511
|
+
type: g,
|
|
512
|
+
className: `${I.input} ${p ? I.focus : ""} ${n ? I.error : ""}`,
|
|
513
|
+
style: O,
|
|
502
514
|
"aria-invalid": n ? "true" : "false",
|
|
503
|
-
"aria-describedby": n ?
|
|
504
|
-
...
|
|
515
|
+
"aria-describedby": n ? E : void 0,
|
|
516
|
+
..._
|
|
505
517
|
}),
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
518
|
+
S && /* @__PURE__ */ d("div", {
|
|
519
|
+
ref: y,
|
|
520
|
+
className: I.rightContent,
|
|
521
|
+
children: m
|
|
509
522
|
})
|
|
510
523
|
]
|
|
511
524
|
}),
|
|
512
|
-
n && /* @__PURE__ */
|
|
513
|
-
id:
|
|
514
|
-
className:
|
|
525
|
+
n && /* @__PURE__ */ d("span", {
|
|
526
|
+
id: E,
|
|
527
|
+
className: I.errorText,
|
|
515
528
|
role: "alert",
|
|
516
529
|
children: n
|
|
517
530
|
})
|
|
518
531
|
]
|
|
519
532
|
});
|
|
520
533
|
}
|
|
521
|
-
var
|
|
534
|
+
var L = {
|
|
522
535
|
wrapper: "_wrapper_roite_1",
|
|
523
536
|
label: "_label_roite_10",
|
|
524
537
|
input: "_input_roite_15",
|
|
@@ -529,45 +542,45 @@ var I = {
|
|
|
529
542
|
//#endregion
|
|
530
543
|
//#region src/components/InputField/InputField.tsx
|
|
531
544
|
function de({ label: t, error: n, className: r = "", isValid: i = !0, variant: a = "default", id: o, ...s }) {
|
|
532
|
-
let c = e.useId(), l = o || c,
|
|
533
|
-
return /* @__PURE__ */
|
|
534
|
-
className: `${
|
|
545
|
+
let c = e.useId(), l = o || c, u = `${l}-error`, p = n || !i;
|
|
546
|
+
return /* @__PURE__ */ f("div", {
|
|
547
|
+
className: `${L.wrapper} ${r}`,
|
|
535
548
|
children: [
|
|
536
|
-
t && /* @__PURE__ */
|
|
549
|
+
t && /* @__PURE__ */ f("label", {
|
|
537
550
|
htmlFor: l,
|
|
538
|
-
className:
|
|
539
|
-
children: [t, s.required && /* @__PURE__ */
|
|
551
|
+
className: L.label,
|
|
552
|
+
children: [t, s.required && /* @__PURE__ */ d("span", {
|
|
540
553
|
"aria-label": "required",
|
|
541
554
|
children: " *"
|
|
542
555
|
})]
|
|
543
556
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ d("input", {
|
|
545
558
|
id: l,
|
|
546
|
-
className: `${
|
|
559
|
+
className: `${L.input} ${a === "borderBottom" ? L.borderBottom : ""} ${p ? L.error : ""}`,
|
|
547
560
|
"aria-invalid": p ? "true" : "false",
|
|
548
|
-
"aria-describedby": n ?
|
|
561
|
+
"aria-describedby": n ? u : void 0,
|
|
549
562
|
...s
|
|
550
563
|
}),
|
|
551
|
-
n && /* @__PURE__ */
|
|
552
|
-
id:
|
|
553
|
-
className:
|
|
564
|
+
n && /* @__PURE__ */ d("span", {
|
|
565
|
+
id: u,
|
|
566
|
+
className: L.errorText,
|
|
554
567
|
role: "alert",
|
|
555
568
|
children: n
|
|
556
569
|
})
|
|
557
570
|
]
|
|
558
571
|
});
|
|
559
572
|
}
|
|
560
|
-
var
|
|
573
|
+
var R = {
|
|
561
574
|
radioWrapper: "_radioWrapper_1faq0_1",
|
|
562
575
|
radioInput: "_radioInput_1faq0_9",
|
|
563
576
|
customRadio: "_customRadio_1faq0_23",
|
|
564
577
|
labelText: "_labelText_1faq0_57",
|
|
565
578
|
disabled: "_disabled_1faq0_63"
|
|
566
|
-
}, fe = ({ id: e, name: t, value: n, label: r, checked: i = !1, onChange: a, disabled: o = !1, "aria-label": s }) => /* @__PURE__ */
|
|
579
|
+
}, fe = ({ id: e, name: t, value: n, label: r, checked: i = !1, onChange: a, disabled: o = !1, "aria-label": s }) => /* @__PURE__ */ f("label", {
|
|
567
580
|
htmlFor: e,
|
|
568
|
-
className: `${
|
|
581
|
+
className: `${R.radioWrapper} ${o ? R.disabled : ""} ${o ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
569
582
|
children: [
|
|
570
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ d("input", {
|
|
571
584
|
id: e,
|
|
572
585
|
type: "radio",
|
|
573
586
|
name: t,
|
|
@@ -576,27 +589,28 @@ var L = {
|
|
|
576
589
|
onChange: a,
|
|
577
590
|
disabled: o,
|
|
578
591
|
"aria-label": s,
|
|
579
|
-
className:
|
|
592
|
+
className: R.radioInput
|
|
580
593
|
}),
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
className:
|
|
594
|
+
/* @__PURE__ */ d("span", { className: R.customRadio }),
|
|
595
|
+
/* @__PURE__ */ d("span", {
|
|
596
|
+
className: R.labelText,
|
|
584
597
|
children: r
|
|
585
598
|
})
|
|
586
599
|
]
|
|
587
600
|
}), pe = {
|
|
588
|
-
switch: "
|
|
589
|
-
slider: "
|
|
590
|
-
label: "
|
|
591
|
-
disabled: "
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
601
|
+
switch: "_switch_1kxu1_1",
|
|
602
|
+
slider: "_slider_1kxu1_23",
|
|
603
|
+
label: "_label_1kxu1_28",
|
|
604
|
+
disabled: "_disabled_1kxu1_43",
|
|
605
|
+
positive: "_positive_1kxu1_72"
|
|
606
|
+
}, me = ({ id: t, checked: n, onChange: r, disabled: i = !1, label: a, "aria-label": o, variant: s = "default" }) => {
|
|
607
|
+
let c = e.useId(), l = t || c;
|
|
608
|
+
return /* @__PURE__ */ f("label", {
|
|
609
|
+
htmlFor: l,
|
|
610
|
+
className: `${pe.switch} ${s === "positive" ? pe.positive : ""} ${i ? pe.disabled : ""} ${i ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
597
611
|
children: [
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
id:
|
|
612
|
+
/* @__PURE__ */ d("input", {
|
|
613
|
+
id: l,
|
|
600
614
|
type: "checkbox",
|
|
601
615
|
role: "switch",
|
|
602
616
|
"aria-checked": n,
|
|
@@ -605,17 +619,17 @@ var L = {
|
|
|
605
619
|
onChange: (e) => r(e.target.checked),
|
|
606
620
|
disabled: i
|
|
607
621
|
}),
|
|
608
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ d("span", {
|
|
609
623
|
className: pe.slider,
|
|
610
624
|
"aria-hidden": "true"
|
|
611
625
|
}),
|
|
612
|
-
a && /* @__PURE__ */
|
|
626
|
+
a && /* @__PURE__ */ d("span", {
|
|
613
627
|
className: pe.label,
|
|
614
628
|
children: a
|
|
615
629
|
})
|
|
616
630
|
]
|
|
617
631
|
});
|
|
618
|
-
},
|
|
632
|
+
}, z = {
|
|
619
633
|
label: "_label_1o3ls_1",
|
|
620
634
|
basetrack: "_basetrack_1o3ls_8",
|
|
621
635
|
selectedtrack: "_selectedtrack_1o3ls_36",
|
|
@@ -630,34 +644,34 @@ var L = {
|
|
|
630
644
|
stepmarksBelow: "_stepmarksBelow_1o3ls_120",
|
|
631
645
|
basetrackStepsBelow: "_basetrackStepsBelow_1o3ls_125"
|
|
632
646
|
}, he = 50, ge = (t) => {
|
|
633
|
-
let { min: n, max: r, step: i = 1, disabled: a = !1, className: o, activeMin: s, activeMax: c, isFaceted: l = !1, highlightFaceted:
|
|
634
|
-
if (!(Number.isFinite(n) && Number.isFinite(r) && r > n)) return /* @__PURE__ */
|
|
647
|
+
let { min: n, max: r, step: i = 1, disabled: a = !1, className: o, activeMin: s, activeMax: c, isFaceted: l = !1, highlightFaceted: u = !0, stepMarks: p, onChange: m, onFinalChange: h, label: g, "aria-label": _, id: v } = t, y = e.useId(), b = v || y;
|
|
648
|
+
if (!(Number.isFinite(n) && Number.isFinite(r) && r > n)) return /* @__PURE__ */ f("div", {
|
|
635
649
|
className: o,
|
|
636
|
-
children: [g && /* @__PURE__ */
|
|
637
|
-
className:
|
|
650
|
+
children: [g && /* @__PURE__ */ d("span", {
|
|
651
|
+
className: z.label,
|
|
638
652
|
children: g
|
|
639
|
-
}), /* @__PURE__ */
|
|
640
|
-
className: `${
|
|
653
|
+
}), /* @__PURE__ */ d("div", {
|
|
654
|
+
className: `${z.basetrack} ${z.disabled}`,
|
|
641
655
|
"aria-hidden": "true"
|
|
642
656
|
})]
|
|
643
657
|
});
|
|
644
|
-
let x = i > 0 ? Math.round((r - n) / i) : 0, S = !!p && x > 0 && x <= he, C = S && p === "below" ? `${
|
|
645
|
-
className: `${
|
|
658
|
+
let x = i > 0 ? Math.round((r - n) / i) : 0, S = !!p && x > 0 && x <= he, C = S && p === "below" ? `${z.basetrack} ${z.basetrackStepsBelow}` : z.basetrack, w = S ? /* @__PURE__ */ d("div", {
|
|
659
|
+
className: `${z.stepmarks} ${p === "below" ? z.stepmarksBelow : z.stepmarksInline}`,
|
|
646
660
|
"aria-hidden": "true",
|
|
647
|
-
children: Array.from({ length: x + 1 }, (e, t) => /* @__PURE__ */
|
|
648
|
-
className:
|
|
661
|
+
children: Array.from({ length: x + 1 }, (e, t) => /* @__PURE__ */ d("span", {
|
|
662
|
+
className: z.stepmark,
|
|
649
663
|
style: { left: `${Math.min(t * i, r - n) / (r - n) * 100}%` }
|
|
650
664
|
}, t))
|
|
651
665
|
}) : null;
|
|
652
666
|
if ("isRange" in t && t.isRange) {
|
|
653
|
-
let e = t.value, [
|
|
654
|
-
return /* @__PURE__ */
|
|
667
|
+
let e = t.value, [u, p] = e;
|
|
668
|
+
return /* @__PURE__ */ f("div", {
|
|
655
669
|
className: o,
|
|
656
|
-
children: [g && /* @__PURE__ */
|
|
670
|
+
children: [g && /* @__PURE__ */ d("label", {
|
|
657
671
|
htmlFor: b,
|
|
658
|
-
className:
|
|
672
|
+
className: z.label,
|
|
659
673
|
children: g
|
|
660
|
-
}), /* @__PURE__ */
|
|
674
|
+
}), /* @__PURE__ */ d(D, {
|
|
661
675
|
step: i,
|
|
662
676
|
min: n,
|
|
663
677
|
max: r,
|
|
@@ -666,22 +680,22 @@ var L = {
|
|
|
666
680
|
onFinalChange: (e) => h?.(e),
|
|
667
681
|
disabled: a,
|
|
668
682
|
renderTrack: ({ props: e, children: t }) => {
|
|
669
|
-
let { key: i, ...a } = e, o = r - n, m = (
|
|
670
|
-
return v && (g = (s - n) / o * 100, _ = (c - s) / o * 100), /* @__PURE__ */
|
|
683
|
+
let { key: i, ...a } = e, o = r - n, m = (u - n) / o * 100, h = (p - u) / o * 100, g = 0, _ = 0, v = typeof s == "number" && typeof c == "number" && c > s && (s > n || c < r);
|
|
684
|
+
return v && (g = (s - n) / o * 100, _ = (c - s) / o * 100), /* @__PURE__ */ f("div", {
|
|
671
685
|
...a,
|
|
672
686
|
className: C,
|
|
673
687
|
style: { ...a.style },
|
|
674
688
|
children: [
|
|
675
|
-
!v && /* @__PURE__ */
|
|
676
|
-
className:
|
|
689
|
+
!v && /* @__PURE__ */ d("div", {
|
|
690
|
+
className: z.selectedtrack,
|
|
677
691
|
style: {
|
|
678
692
|
left: `${m}%`,
|
|
679
693
|
width: `${h}%`,
|
|
680
694
|
zIndex: "1"
|
|
681
695
|
}
|
|
682
696
|
}),
|
|
683
|
-
v && /* @__PURE__ */
|
|
684
|
-
className: `${
|
|
697
|
+
v && /* @__PURE__ */ d("div", {
|
|
698
|
+
className: `${z.livetrack} ${l ? z.livetrackFaceted : z.livetrackDefault}`,
|
|
685
699
|
style: {
|
|
686
700
|
left: `${g}%`,
|
|
687
701
|
width: `${_}%`,
|
|
@@ -694,11 +708,11 @@ var L = {
|
|
|
694
708
|
}, i);
|
|
695
709
|
},
|
|
696
710
|
renderThumb: ({ props: e, index: t }) => {
|
|
697
|
-
let { key: i, ...o } = e, s = t === 0 ?
|
|
698
|
-
return /* @__PURE__ */
|
|
711
|
+
let { key: i, ...o } = e, s = t === 0 ? u : p;
|
|
712
|
+
return /* @__PURE__ */ d("div", {
|
|
699
713
|
...o,
|
|
700
714
|
id: t === 0 ? b : void 0,
|
|
701
|
-
className: `${
|
|
715
|
+
className: `${z.thumbs} ${a ? z.disabled : ""} ${a ? "cursor-not-allowed" : "cursor-resize-col"}`,
|
|
702
716
|
style: {
|
|
703
717
|
...o.style,
|
|
704
718
|
zIndex: "3"
|
|
@@ -713,13 +727,13 @@ var L = {
|
|
|
713
727
|
});
|
|
714
728
|
} else {
|
|
715
729
|
let e = t.value;
|
|
716
|
-
return /* @__PURE__ */
|
|
730
|
+
return /* @__PURE__ */ f("div", {
|
|
717
731
|
className: o,
|
|
718
|
-
children: [g && /* @__PURE__ */
|
|
732
|
+
children: [g && /* @__PURE__ */ d("label", {
|
|
719
733
|
htmlFor: b,
|
|
720
|
-
className:
|
|
734
|
+
className: z.label,
|
|
721
735
|
children: g
|
|
722
|
-
}), /* @__PURE__ */
|
|
736
|
+
}), /* @__PURE__ */ d(D, {
|
|
723
737
|
step: i,
|
|
724
738
|
min: n,
|
|
725
739
|
max: r,
|
|
@@ -728,22 +742,22 @@ var L = {
|
|
|
728
742
|
onFinalChange: (e) => h?.(e[0]),
|
|
729
743
|
disabled: a,
|
|
730
744
|
renderTrack: ({ props: t, children: i }) => {
|
|
731
|
-
let { key: a, ...o } = t,
|
|
732
|
-
return g && (m = (s - n) /
|
|
745
|
+
let { key: a, ...o } = t, u = r - n, p = (e - n) / u * 100, m = 0, h = 0, g = typeof s == "number" && typeof c == "number" && c > s && (s > n || c < r);
|
|
746
|
+
return g && (m = (s - n) / u * 100, h = (c - s) / u * 100), /* @__PURE__ */ f("div", {
|
|
733
747
|
...o,
|
|
734
748
|
className: C,
|
|
735
749
|
style: { ...o.style },
|
|
736
750
|
children: [
|
|
737
|
-
!g && /* @__PURE__ */
|
|
738
|
-
className:
|
|
751
|
+
!g && /* @__PURE__ */ d("div", {
|
|
752
|
+
className: z.selectedtrack,
|
|
739
753
|
style: {
|
|
740
754
|
left: "0%",
|
|
741
755
|
width: `${p}%`,
|
|
742
756
|
zIndex: "1"
|
|
743
757
|
}
|
|
744
758
|
}),
|
|
745
|
-
g && /* @__PURE__ */
|
|
746
|
-
className: `${
|
|
759
|
+
g && /* @__PURE__ */ d("div", {
|
|
760
|
+
className: `${z.livetrack} ${l ? z.livetrackFaceted : z.livetrackDefault}`,
|
|
747
761
|
style: {
|
|
748
762
|
left: `${m}%`,
|
|
749
763
|
width: `${h}%`,
|
|
@@ -757,10 +771,10 @@ var L = {
|
|
|
757
771
|
},
|
|
758
772
|
renderThumb: ({ props: t }) => {
|
|
759
773
|
let { key: i, ...o } = t;
|
|
760
|
-
return /* @__PURE__ */
|
|
774
|
+
return /* @__PURE__ */ d("div", {
|
|
761
775
|
...o,
|
|
762
776
|
id: b,
|
|
763
|
-
className: `${
|
|
777
|
+
className: `${z.thumbs} ${a ? z.disabled : ""} ${a ? "cursor-not-allowed" : "cursor-resize-col"}`,
|
|
764
778
|
style: {
|
|
765
779
|
...o.style,
|
|
766
780
|
zIndex: "3"
|
|
@@ -774,7 +788,7 @@ var L = {
|
|
|
774
788
|
})]
|
|
775
789
|
});
|
|
776
790
|
}
|
|
777
|
-
},
|
|
791
|
+
}, B = {
|
|
778
792
|
wrapper: "_wrapper_y1e72_1",
|
|
779
793
|
label: "_label_y1e72_7",
|
|
780
794
|
trigger: "_trigger_y1e72_12",
|
|
@@ -789,58 +803,58 @@ var L = {
|
|
|
789
803
|
viewport: "_viewport_y1e72_107",
|
|
790
804
|
item: "_item_y1e72_113",
|
|
791
805
|
itemIndicator: "_itemIndicator_y1e72_136"
|
|
792
|
-
}, _e = ({ value: t, onValueChange: n, options: r, placeholder: i = "Select...", className: a = "", disabled: o = !1, label: s, size: c = "default", variant: l = "default", "aria-label":
|
|
793
|
-
let
|
|
806
|
+
}, _e = ({ value: t, onValueChange: n, options: r, placeholder: i = "Select...", className: a = "", disabled: o = !1, label: s, size: c = "default", variant: l = "default", "aria-label": u, id: p }) => {
|
|
807
|
+
let m = e.useId(), _ = p || m, v = `${_}-label`, y = r.find((e) => e.value === t), b = /* @__PURE__ */ f(O.Root, {
|
|
794
808
|
value: t,
|
|
795
809
|
onValueChange: n,
|
|
796
810
|
disabled: o,
|
|
797
|
-
children: [/* @__PURE__ */
|
|
811
|
+
children: [/* @__PURE__ */ f(O.Trigger, {
|
|
798
812
|
id: _,
|
|
799
|
-
className: `${
|
|
800
|
-
...s ? { "aria-labelledby": v } :
|
|
801
|
-
children: [/* @__PURE__ */
|
|
813
|
+
className: `${B.trigger} ${B[c]} ${l === "ghost" ? B.ghost : ""} ${a} cursor-pointer`,
|
|
814
|
+
...s ? { "aria-labelledby": v } : u ? { "aria-label": u } : {},
|
|
815
|
+
children: [/* @__PURE__ */ f("span", {
|
|
802
816
|
style: {
|
|
803
817
|
display: "inline-flex",
|
|
804
818
|
alignItems: "center",
|
|
805
819
|
gap: 6
|
|
806
820
|
},
|
|
807
|
-
children: [y?.icon, l === "ghost" ? /* @__PURE__ */
|
|
808
|
-
className:
|
|
809
|
-
children: [r.filter((e) => e.value !== t).map((e) => /* @__PURE__ */
|
|
810
|
-
className:
|
|
821
|
+
children: [y?.icon, l === "ghost" ? /* @__PURE__ */ f("span", {
|
|
822
|
+
className: B.sizer,
|
|
823
|
+
children: [r.filter((e) => e.value !== t).map((e) => /* @__PURE__ */ d("span", {
|
|
824
|
+
className: B.sizerHidden,
|
|
811
825
|
"aria-hidden": "true",
|
|
812
826
|
children: e.label
|
|
813
|
-
}, e.value)), /* @__PURE__ */
|
|
814
|
-
}) : /* @__PURE__ */
|
|
815
|
-
}), /* @__PURE__ */
|
|
816
|
-
className:
|
|
827
|
+
}, e.value)), /* @__PURE__ */ d("span", { children: /* @__PURE__ */ d(O.Value, { placeholder: i }) })]
|
|
828
|
+
}) : /* @__PURE__ */ d(O.Value, { placeholder: i })]
|
|
829
|
+
}), /* @__PURE__ */ d(O.Icon, {
|
|
830
|
+
className: B.icon,
|
|
817
831
|
"aria-hidden": "true",
|
|
818
|
-
children: /* @__PURE__ */
|
|
832
|
+
children: /* @__PURE__ */ d(g, {
|
|
819
833
|
size: c === "large" ? 21 : 14,
|
|
820
834
|
color: "currentColor"
|
|
821
835
|
})
|
|
822
836
|
})]
|
|
823
|
-
}), /* @__PURE__ */
|
|
824
|
-
className:
|
|
837
|
+
}), /* @__PURE__ */ d(O.Portal, { children: /* @__PURE__ */ d(O.Content, {
|
|
838
|
+
className: B.content,
|
|
825
839
|
position: "popper",
|
|
826
840
|
side: "bottom",
|
|
827
841
|
align: "start",
|
|
828
842
|
sideOffset: 4,
|
|
829
|
-
children: /* @__PURE__ */
|
|
830
|
-
className:
|
|
831
|
-
children: r.map((e) => /* @__PURE__ */
|
|
843
|
+
children: /* @__PURE__ */ d(O.Viewport, {
|
|
844
|
+
className: B.viewport,
|
|
845
|
+
children: r.map((e) => /* @__PURE__ */ f(O.Item, {
|
|
832
846
|
value: e.value,
|
|
833
|
-
className:
|
|
834
|
-
children: [/* @__PURE__ */
|
|
847
|
+
className: B.item,
|
|
848
|
+
children: [/* @__PURE__ */ f("span", {
|
|
835
849
|
style: {
|
|
836
850
|
display: "inline-flex",
|
|
837
851
|
alignItems: "center",
|
|
838
852
|
gap: 6
|
|
839
853
|
},
|
|
840
|
-
children: [e.icon, /* @__PURE__ */
|
|
841
|
-
}), /* @__PURE__ */
|
|
842
|
-
className:
|
|
843
|
-
children: /* @__PURE__ */
|
|
854
|
+
children: [e.icon, /* @__PURE__ */ d(O.ItemText, { children: e.label })]
|
|
855
|
+
}), /* @__PURE__ */ d(O.ItemIndicator, {
|
|
856
|
+
className: B.itemIndicator,
|
|
857
|
+
children: /* @__PURE__ */ d(h, {
|
|
844
858
|
size: 12,
|
|
845
859
|
color: "currentColor"
|
|
846
860
|
})
|
|
@@ -849,22 +863,22 @@ var L = {
|
|
|
849
863
|
})
|
|
850
864
|
}) })]
|
|
851
865
|
});
|
|
852
|
-
return s ? /* @__PURE__ */
|
|
853
|
-
className:
|
|
854
|
-
children: [/* @__PURE__ */
|
|
866
|
+
return s ? /* @__PURE__ */ f("div", {
|
|
867
|
+
className: B.wrapper,
|
|
868
|
+
children: [/* @__PURE__ */ d("label", {
|
|
855
869
|
id: v,
|
|
856
870
|
htmlFor: _,
|
|
857
|
-
className:
|
|
871
|
+
className: B.label,
|
|
858
872
|
children: s
|
|
859
873
|
}), b]
|
|
860
874
|
}) : b;
|
|
861
|
-
}, ve = { content: "_content_1qahr_1" }, ye = ({ trigger: e, children: t, open: n, onOpenChange: r, align: i = "end", side: a = "bottom", sideOffset: o = 5, className: s = "", "aria-label": c, "aria-describedby": l }) => /* @__PURE__ */
|
|
875
|
+
}, ve = { content: "_content_1qahr_1" }, ye = ({ trigger: e, children: t, open: n, onOpenChange: r, align: i = "end", side: a = "bottom", sideOffset: o = 5, className: s = "", "aria-label": c, "aria-describedby": l }) => /* @__PURE__ */ f(k.Root, {
|
|
862
876
|
open: n,
|
|
863
877
|
onOpenChange: r,
|
|
864
|
-
children: [/* @__PURE__ */
|
|
878
|
+
children: [/* @__PURE__ */ d(k.Trigger, {
|
|
865
879
|
asChild: !0,
|
|
866
880
|
children: e
|
|
867
|
-
}), /* @__PURE__ */
|
|
881
|
+
}), /* @__PURE__ */ d(k.Portal, { children: /* @__PURE__ */ d(k.Content, {
|
|
868
882
|
className: `${ve.content} ${s}`,
|
|
869
883
|
align: i,
|
|
870
884
|
side: a,
|
|
@@ -873,7 +887,7 @@ var L = {
|
|
|
873
887
|
"aria-describedby": l,
|
|
874
888
|
children: t
|
|
875
889
|
}) })]
|
|
876
|
-
}),
|
|
890
|
+
}), V = {
|
|
877
891
|
table: "_table_j6zqj_1",
|
|
878
892
|
caption: "_caption_j6zqj_8",
|
|
879
893
|
headerRow: "_headerRow_j6zqj_25",
|
|
@@ -890,16 +904,16 @@ var L = {
|
|
|
890
904
|
//#endregion
|
|
891
905
|
//#region src/components/Table/Table.tsx
|
|
892
906
|
function be({ children: e, caption: t, "aria-label": n, scrollable: r = !1, stickyFirstColumn: i = !1, bleedEnd: a }) {
|
|
893
|
-
let o = /* @__PURE__ */
|
|
894
|
-
className: `${
|
|
907
|
+
let o = /* @__PURE__ */ f("table", {
|
|
908
|
+
className: `${V.table} ${r && i ? V.stickyFirst : ""}`,
|
|
895
909
|
"aria-label": n,
|
|
896
|
-
children: [t && /* @__PURE__ */
|
|
897
|
-
className:
|
|
910
|
+
children: [t && /* @__PURE__ */ d("caption", {
|
|
911
|
+
className: V.caption,
|
|
898
912
|
children: t
|
|
899
913
|
}), e]
|
|
900
914
|
});
|
|
901
|
-
return r ? /* @__PURE__ */
|
|
902
|
-
className: `${
|
|
915
|
+
return r ? /* @__PURE__ */ d("div", {
|
|
916
|
+
className: `${V.scroll} ${a === void 0 ? "" : V.bleedEnd}`,
|
|
903
917
|
style: a === void 0 ? void 0 : { "--table-bleed": typeof a == "number" ? `${a}px` : a },
|
|
904
918
|
role: "region",
|
|
905
919
|
"aria-label": n ?? t,
|
|
@@ -910,20 +924,20 @@ function be({ children: e, caption: t, "aria-label": n, scrollable: r = !1, stic
|
|
|
910
924
|
//#endregion
|
|
911
925
|
//#region src/components/Table/TableHeader.tsx
|
|
912
926
|
function xe({ children: t }) {
|
|
913
|
-
let n = e.Children.map(t, (t) => e.isValidElement(t) && t.type === "td" ? /* @__PURE__ */
|
|
927
|
+
let n = e.Children.map(t, (t) => e.isValidElement(t) && t.type === "td" ? /* @__PURE__ */ d("th", {
|
|
914
928
|
scope: "col",
|
|
915
929
|
...t.props
|
|
916
930
|
}) : t);
|
|
917
|
-
return /* @__PURE__ */
|
|
918
|
-
className:
|
|
931
|
+
return /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", {
|
|
932
|
+
className: V.headerRow,
|
|
919
933
|
children: n
|
|
920
934
|
}) });
|
|
921
935
|
}
|
|
922
936
|
//#endregion
|
|
923
937
|
//#region src/components/Table/TableRow.tsx
|
|
924
938
|
function Se({ children: e }) {
|
|
925
|
-
return /* @__PURE__ */
|
|
926
|
-
className:
|
|
939
|
+
return /* @__PURE__ */ d("tr", {
|
|
940
|
+
className: V.dataRow,
|
|
927
941
|
children: e
|
|
928
942
|
});
|
|
929
943
|
}
|
|
@@ -934,19 +948,19 @@ function Ce({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
|
934
948
|
...n && r ? { scope: r } : {},
|
|
935
949
|
...i ? { colSpan: i } : {}
|
|
936
950
|
};
|
|
937
|
-
return e || t ? /* @__PURE__ */
|
|
951
|
+
return e || t ? /* @__PURE__ */ d(a, {
|
|
938
952
|
...o,
|
|
939
|
-
children: /* @__PURE__ */
|
|
940
|
-
className:
|
|
941
|
-
children: [e && /* @__PURE__ */
|
|
942
|
-
className:
|
|
953
|
+
children: /* @__PURE__ */ f("div", {
|
|
954
|
+
className: V.cellInner,
|
|
955
|
+
children: [e && /* @__PURE__ */ d("span", {
|
|
956
|
+
className: V.cellLabel,
|
|
943
957
|
children: e
|
|
944
|
-
}), t && /* @__PURE__ */
|
|
945
|
-
className:
|
|
958
|
+
}), t && /* @__PURE__ */ d("div", {
|
|
959
|
+
className: V.cellContent,
|
|
946
960
|
children: t
|
|
947
961
|
})]
|
|
948
962
|
})
|
|
949
|
-
}) : /* @__PURE__ */
|
|
963
|
+
}) : /* @__PURE__ */ d(a, {
|
|
950
964
|
...o,
|
|
951
965
|
children: t
|
|
952
966
|
});
|
|
@@ -954,8 +968,8 @@ function Ce({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
|
954
968
|
//#endregion
|
|
955
969
|
//#region src/components/Table/TableValue.tsx
|
|
956
970
|
function we({ children: e }) {
|
|
957
|
-
return /* @__PURE__ */
|
|
958
|
-
className:
|
|
971
|
+
return /* @__PURE__ */ d("span", {
|
|
972
|
+
className: V.value,
|
|
959
973
|
children: e
|
|
960
974
|
});
|
|
961
975
|
}
|
|
@@ -963,8 +977,8 @@ function we({ children: e }) {
|
|
|
963
977
|
//#region src/components/Table/TableIcon.tsx
|
|
964
978
|
function Te({ children: t, "aria-label": n }) {
|
|
965
979
|
let r = !n;
|
|
966
|
-
return /* @__PURE__ */
|
|
967
|
-
className:
|
|
980
|
+
return /* @__PURE__ */ d("span", {
|
|
981
|
+
className: V.icon,
|
|
968
982
|
"aria-hidden": r ? "true" : void 0,
|
|
969
983
|
"aria-label": n,
|
|
970
984
|
children: e.cloneElement(t, {
|
|
@@ -973,7 +987,7 @@ function Te({ children: t, "aria-label": n }) {
|
|
|
973
987
|
})
|
|
974
988
|
});
|
|
975
989
|
}
|
|
976
|
-
var
|
|
990
|
+
var H = {
|
|
977
991
|
tabs: "_tabs_q9gjb_1",
|
|
978
992
|
scrollable: "_scrollable_q9gjb_16",
|
|
979
993
|
tab: "_tab_q9gjb_1",
|
|
@@ -999,8 +1013,8 @@ var De = {
|
|
|
999
1013
|
default: 14,
|
|
1000
1014
|
large: 21
|
|
1001
1015
|
};
|
|
1002
|
-
function Oe({ items: e, value: r, onValueChange: o, size:
|
|
1003
|
-
let v =
|
|
1016
|
+
function Oe({ items: e, value: r, onValueChange: o, size: s = "default", variant: l = "underline", scrollable: p = !1, bleed: m, getPanelId: h, "aria-label": g, renderLink: _ }) {
|
|
1017
|
+
let v = c(null), y = c(/* @__PURE__ */ new Map()), b = a(), x = Math.max(e.findIndex((e) => e.value === r), 0), S = e.some((e) => e.href !== void 0), C = (t) => {
|
|
1004
1018
|
let n = e[t];
|
|
1005
1019
|
if (!n) return;
|
|
1006
1020
|
o(n.value);
|
|
@@ -1053,46 +1067,46 @@ function Oe({ items: e, value: r, onValueChange: o, size: c = "default", variant
|
|
|
1053
1067
|
e.length
|
|
1054
1068
|
]), i(() => {
|
|
1055
1069
|
p && Ee(v.current, y.current.get(r));
|
|
1056
|
-
}, [p, r]), /* @__PURE__ */
|
|
1070
|
+
}, [p, r]), /* @__PURE__ */ d("div", {
|
|
1057
1071
|
ref: v,
|
|
1058
|
-
className: `${
|
|
1072
|
+
className: `${H.tabs} ${l === "button" ? H.buttonVariant : ""} ${p ? H.scrollable : ""} ${p && m !== void 0 ? H.bleed : ""}`,
|
|
1059
1073
|
style: p && m !== void 0 ? { "--tabs-bleed": typeof m == "number" ? `${m}px` : m } : void 0,
|
|
1060
1074
|
role: S ? "navigation" : "tablist",
|
|
1061
1075
|
"aria-label": g,
|
|
1062
1076
|
children: e.map((e, r) => {
|
|
1063
|
-
let i = r === x, a = /* @__PURE__ */
|
|
1064
|
-
e.icon ? /* @__PURE__ */
|
|
1065
|
-
className:
|
|
1077
|
+
let i = r === x, a = /* @__PURE__ */ f(u, { children: [
|
|
1078
|
+
e.icon ? /* @__PURE__ */ d("span", {
|
|
1079
|
+
className: H.icon,
|
|
1066
1080
|
"aria-hidden": "true",
|
|
1067
|
-
children: n(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size: De[
|
|
1081
|
+
children: n(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size: De[s] }) : e.icon
|
|
1068
1082
|
}) : null,
|
|
1069
1083
|
e.label,
|
|
1070
|
-
e.badge != null && e.badge !== !1 ? /* @__PURE__ */
|
|
1071
|
-
className: e.badgeTone === "info" ? `${
|
|
1084
|
+
e.badge != null && e.badge !== !1 ? /* @__PURE__ */ d("span", {
|
|
1085
|
+
className: e.badgeTone === "info" ? `${H.badge} ${H.badgeInfo}` : H.badge,
|
|
1072
1086
|
title: e.badgeTitle,
|
|
1073
1087
|
children: e.badge
|
|
1074
1088
|
}) : null
|
|
1075
|
-
] }),
|
|
1089
|
+
] }), c = `${H.tab} ${H[s]} ${i ? H.active : ""}`;
|
|
1076
1090
|
if (e.href !== void 0) {
|
|
1077
1091
|
let t = {
|
|
1078
1092
|
id: `${b}-tab-${e.value}`,
|
|
1079
|
-
className:
|
|
1093
|
+
className: c,
|
|
1080
1094
|
href: e.disabled ? void 0 : e.href,
|
|
1081
1095
|
"aria-current": i ? "page" : void 0,
|
|
1082
1096
|
"aria-disabled": e.disabled || void 0,
|
|
1083
1097
|
title: e.title,
|
|
1084
1098
|
children: a
|
|
1085
1099
|
};
|
|
1086
|
-
return /* @__PURE__ */
|
|
1100
|
+
return /* @__PURE__ */ d("span", {
|
|
1087
1101
|
style: { display: "contents" },
|
|
1088
1102
|
ref: (t) => {
|
|
1089
1103
|
let n = t?.firstElementChild;
|
|
1090
1104
|
n ? y.current.set(e.value, n) : y.current.delete(e.value);
|
|
1091
1105
|
},
|
|
1092
|
-
children: _ ? _(e, t) : /* @__PURE__ */
|
|
1106
|
+
children: _ ? _(e, t) : /* @__PURE__ */ d("a", { ...t })
|
|
1093
1107
|
}, e.value);
|
|
1094
1108
|
}
|
|
1095
|
-
return /* @__PURE__ */
|
|
1109
|
+
return /* @__PURE__ */ d("button", {
|
|
1096
1110
|
ref: (t) => {
|
|
1097
1111
|
t ? y.current.set(e.value, t) : y.current.delete(e.value);
|
|
1098
1112
|
},
|
|
@@ -1104,7 +1118,7 @@ function Oe({ items: e, value: r, onValueChange: o, size: c = "default", variant
|
|
|
1104
1118
|
"aria-disabled": e.disabled || void 0,
|
|
1105
1119
|
title: e.title,
|
|
1106
1120
|
tabIndex: i ? 0 : -1,
|
|
1107
|
-
className:
|
|
1121
|
+
className: c,
|
|
1108
1122
|
onClick: () => {
|
|
1109
1123
|
e.disabled || o(e.value);
|
|
1110
1124
|
},
|
|
@@ -1114,7 +1128,7 @@ function Oe({ items: e, value: r, onValueChange: o, size: c = "default", variant
|
|
|
1114
1128
|
})
|
|
1115
1129
|
});
|
|
1116
1130
|
}
|
|
1117
|
-
var
|
|
1131
|
+
var U = {
|
|
1118
1132
|
root: "_root_wrjxq_1",
|
|
1119
1133
|
micro: "_micro_wrjxq_2",
|
|
1120
1134
|
default: "_default_wrjxq_3",
|
|
@@ -1140,106 +1154,106 @@ function ke(t) {
|
|
|
1140
1154
|
color: "currentColor"
|
|
1141
1155
|
}) : t;
|
|
1142
1156
|
}
|
|
1143
|
-
var Ae = "\0action", je = ({ items: e, size: t = "default", overflow: n = "wrap", className: r = "", separator: i = /* @__PURE__ */
|
|
1157
|
+
var Ae = "\0action", je = ({ items: e, size: t = "default", overflow: n = "wrap", className: r = "", separator: i = /* @__PURE__ */ d(v, {
|
|
1144
1158
|
size: 14,
|
|
1145
1159
|
color: "currentColor"
|
|
1146
|
-
}), renderLink: a, "aria-label": o = "Breadcrumb" }) => /* @__PURE__ */
|
|
1160
|
+
}), renderLink: a, "aria-label": o = "Breadcrumb" }) => /* @__PURE__ */ d("nav", {
|
|
1147
1161
|
"aria-label": o,
|
|
1148
|
-
className: `${
|
|
1149
|
-
children: /* @__PURE__ */
|
|
1150
|
-
className:
|
|
1151
|
-
children: e.map((t, r) => /* @__PURE__ */
|
|
1152
|
-
className:
|
|
1153
|
-
children: [r > 0 && /* @__PURE__ */
|
|
1154
|
-
className:
|
|
1162
|
+
className: `${U.root} ${U[t]} ${n === "truncate" ? U.truncate : ""} ${r}`,
|
|
1163
|
+
children: /* @__PURE__ */ d("ol", {
|
|
1164
|
+
className: U.list,
|
|
1165
|
+
children: e.map((t, r) => /* @__PURE__ */ f("li", {
|
|
1166
|
+
className: U.item,
|
|
1167
|
+
children: [r > 0 && /* @__PURE__ */ d("span", {
|
|
1168
|
+
className: U.separator,
|
|
1155
1169
|
"aria-hidden": "true",
|
|
1156
1170
|
children: i
|
|
1157
|
-
}), /* @__PURE__ */
|
|
1158
|
-
className: `${
|
|
1171
|
+
}), /* @__PURE__ */ f("div", {
|
|
1172
|
+
className: `${U.step} ${t.switcher ? U.switchable : ""}`,
|
|
1159
1173
|
children: [t.href ? (() => {
|
|
1160
1174
|
let i = {
|
|
1161
|
-
className:
|
|
1175
|
+
className: U.label,
|
|
1162
1176
|
href: t.href,
|
|
1163
1177
|
title: n === "truncate" ? t.label : void 0,
|
|
1164
1178
|
onClick: t.onClick,
|
|
1165
1179
|
"aria-current": r === e.length - 1 ? "page" : void 0,
|
|
1166
|
-
children: /* @__PURE__ */
|
|
1167
|
-
className:
|
|
1180
|
+
children: /* @__PURE__ */ f(u, { children: [t.icon && /* @__PURE__ */ d("span", {
|
|
1181
|
+
className: U.icon,
|
|
1168
1182
|
"aria-hidden": "true",
|
|
1169
1183
|
children: ke(t.icon)
|
|
1170
|
-
}), /* @__PURE__ */
|
|
1171
|
-
className:
|
|
1184
|
+
}), /* @__PURE__ */ d("span", {
|
|
1185
|
+
className: U.text,
|
|
1172
1186
|
children: t.label
|
|
1173
1187
|
})] })
|
|
1174
1188
|
};
|
|
1175
|
-
return a ? a(t, i) : /* @__PURE__ */
|
|
1176
|
-
})() : /* @__PURE__ */
|
|
1177
|
-
className:
|
|
1189
|
+
return a ? a(t, i) : /* @__PURE__ */ d("a", { ...i });
|
|
1190
|
+
})() : /* @__PURE__ */ f("span", {
|
|
1191
|
+
className: U.label,
|
|
1178
1192
|
title: n === "truncate" ? t.label : void 0,
|
|
1179
1193
|
"aria-current": r === e.length - 1 ? "page" : void 0,
|
|
1180
|
-
children: [t.icon && /* @__PURE__ */
|
|
1181
|
-
className:
|
|
1194
|
+
children: [t.icon && /* @__PURE__ */ d("span", {
|
|
1195
|
+
className: U.icon,
|
|
1182
1196
|
"aria-hidden": "true",
|
|
1183
1197
|
children: ke(t.icon)
|
|
1184
|
-
}), /* @__PURE__ */
|
|
1185
|
-
className:
|
|
1198
|
+
}), /* @__PURE__ */ d("span", {
|
|
1199
|
+
className: U.text,
|
|
1186
1200
|
children: t.label
|
|
1187
1201
|
})]
|
|
1188
|
-
}), t.switcher && /* @__PURE__ */
|
|
1202
|
+
}), t.switcher && /* @__PURE__ */ f(O.Root, {
|
|
1189
1203
|
value: t.switcher.value,
|
|
1190
1204
|
onValueChange: (e) => e === Ae ? t.switcher.action?.onSelect() : t.switcher.onValueChange(e),
|
|
1191
1205
|
disabled: t.switcher.disabled || t.switcher.options.length === 0 && !t.switcher.action,
|
|
1192
|
-
children: [/* @__PURE__ */
|
|
1193
|
-
className:
|
|
1206
|
+
children: [/* @__PURE__ */ d(O.Trigger, {
|
|
1207
|
+
className: U.trigger,
|
|
1194
1208
|
"aria-label": `${t.switcher.label}: ${t.label}`,
|
|
1195
|
-
children: /* @__PURE__ */
|
|
1209
|
+
children: /* @__PURE__ */ d(O.Icon, {
|
|
1196
1210
|
"aria-hidden": "true",
|
|
1197
|
-
className:
|
|
1198
|
-
children: /* @__PURE__ */
|
|
1211
|
+
className: U.icon,
|
|
1212
|
+
children: /* @__PURE__ */ d(b, {
|
|
1199
1213
|
size: 14,
|
|
1200
1214
|
color: "currentColor"
|
|
1201
1215
|
})
|
|
1202
1216
|
})
|
|
1203
|
-
}), /* @__PURE__ */
|
|
1204
|
-
className: `${
|
|
1217
|
+
}), /* @__PURE__ */ d(O.Portal, { children: /* @__PURE__ */ d(O.Content, {
|
|
1218
|
+
className: `${B.content} ${U.menu}`,
|
|
1205
1219
|
position: "popper",
|
|
1206
1220
|
align: "end",
|
|
1207
1221
|
sideOffset: 4,
|
|
1208
1222
|
collisionPadding: 8,
|
|
1209
|
-
children: /* @__PURE__ */
|
|
1210
|
-
className:
|
|
1211
|
-
children: [t.switcher.options.map((e) => /* @__PURE__ */
|
|
1223
|
+
children: /* @__PURE__ */ f(O.Viewport, {
|
|
1224
|
+
className: B.viewport,
|
|
1225
|
+
children: [t.switcher.options.map((e) => /* @__PURE__ */ f(O.Item, {
|
|
1212
1226
|
value: e.value,
|
|
1213
|
-
className:
|
|
1227
|
+
className: B.item,
|
|
1214
1228
|
textValue: e.label,
|
|
1215
|
-
children: [/* @__PURE__ */
|
|
1216
|
-
className:
|
|
1217
|
-
children: [e.icon && /* @__PURE__ */
|
|
1218
|
-
className:
|
|
1229
|
+
children: [/* @__PURE__ */ f("span", {
|
|
1230
|
+
className: U.option,
|
|
1231
|
+
children: [e.icon && /* @__PURE__ */ d("span", {
|
|
1232
|
+
className: U.icon,
|
|
1219
1233
|
"aria-hidden": "true",
|
|
1220
1234
|
children: e.icon
|
|
1221
|
-
}), /* @__PURE__ */
|
|
1222
|
-
}), /* @__PURE__ */
|
|
1223
|
-
className:
|
|
1224
|
-
children: /* @__PURE__ */
|
|
1235
|
+
}), /* @__PURE__ */ d(O.ItemText, { children: e.label })]
|
|
1236
|
+
}), /* @__PURE__ */ d(O.ItemIndicator, {
|
|
1237
|
+
className: B.itemIndicator,
|
|
1238
|
+
children: /* @__PURE__ */ d(h, {
|
|
1225
1239
|
size: 12,
|
|
1226
1240
|
color: "currentColor"
|
|
1227
1241
|
})
|
|
1228
1242
|
})]
|
|
1229
|
-
}, e.value)), t.switcher.action && /* @__PURE__ */
|
|
1243
|
+
}, e.value)), t.switcher.action && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(O.Separator, { className: U.menuDivider }), /* @__PURE__ */ d(O.Item, {
|
|
1230
1244
|
value: Ae,
|
|
1231
|
-
className:
|
|
1245
|
+
className: B.item,
|
|
1232
1246
|
textValue: t.switcher.action.label,
|
|
1233
|
-
children: /* @__PURE__ */
|
|
1234
|
-
className:
|
|
1235
|
-
children: [/* @__PURE__ */
|
|
1236
|
-
className:
|
|
1247
|
+
children: /* @__PURE__ */ f("span", {
|
|
1248
|
+
className: U.option,
|
|
1249
|
+
children: [/* @__PURE__ */ d("span", {
|
|
1250
|
+
className: U.icon,
|
|
1237
1251
|
"aria-hidden": "true",
|
|
1238
|
-
children: /* @__PURE__ */
|
|
1252
|
+
children: /* @__PURE__ */ d(S, {
|
|
1239
1253
|
size: 14,
|
|
1240
1254
|
color: "currentColor"
|
|
1241
1255
|
})
|
|
1242
|
-
}), /* @__PURE__ */
|
|
1256
|
+
}), /* @__PURE__ */ d(O.ItemText, { children: t.switcher.action.label })]
|
|
1243
1257
|
})
|
|
1244
1258
|
})] })]
|
|
1245
1259
|
})
|
|
@@ -1258,22 +1272,22 @@ var Ae = "\0action", je = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1258
1272
|
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
1259
1273
|
function Ne({ value: e, showLabel: t = !1, fulfilledColor: n = !1, className: r = "" }) {
|
|
1260
1274
|
let i = Math.min(100, Math.max(0, e)), a = `${Math.round(i)}%`, o = n && i >= 100 ? "var(--CPureBlue)" : void 0;
|
|
1261
|
-
return /* @__PURE__ */
|
|
1275
|
+
return /* @__PURE__ */ f("div", {
|
|
1262
1276
|
className: `${Me.wrapper} ${r}`,
|
|
1263
1277
|
role: "progressbar",
|
|
1264
1278
|
"aria-valuenow": i,
|
|
1265
1279
|
"aria-valuemin": 0,
|
|
1266
1280
|
"aria-valuemax": 100,
|
|
1267
|
-
children: [/* @__PURE__ */
|
|
1281
|
+
children: [/* @__PURE__ */ d("div", {
|
|
1268
1282
|
className: Me.track,
|
|
1269
|
-
children: /* @__PURE__ */
|
|
1283
|
+
children: /* @__PURE__ */ d("div", {
|
|
1270
1284
|
className: Me.fill,
|
|
1271
1285
|
style: {
|
|
1272
1286
|
width: `${i}%`,
|
|
1273
1287
|
backgroundColor: o
|
|
1274
1288
|
}
|
|
1275
1289
|
})
|
|
1276
|
-
}), t && /* @__PURE__ */
|
|
1290
|
+
}), t && /* @__PURE__ */ d("span", {
|
|
1277
1291
|
className: Me.label,
|
|
1278
1292
|
"aria-hidden": "true",
|
|
1279
1293
|
children: a
|
|
@@ -1288,7 +1302,7 @@ var Pe = {
|
|
|
1288
1302
|
//#region src/components/Chip/Chip.tsx
|
|
1289
1303
|
function Fe({ children: t, color: n, textColor: r, className: i, icon: a, size: o = "default" }) {
|
|
1290
1304
|
let s = {};
|
|
1291
|
-
return n && (s.backgroundColor = n), r && (s.color = r), /* @__PURE__ */
|
|
1305
|
+
return n && (s.backgroundColor = n), r && (s.color = r), /* @__PURE__ */ f("span", {
|
|
1292
1306
|
className: [
|
|
1293
1307
|
Pe.chip,
|
|
1294
1308
|
o === "large" && Pe.large,
|
|
@@ -1301,7 +1315,7 @@ function Fe({ children: t, color: n, textColor: r, className: i, icon: a, size:
|
|
|
1301
1315
|
}), t]
|
|
1302
1316
|
});
|
|
1303
1317
|
}
|
|
1304
|
-
var
|
|
1318
|
+
var W = {
|
|
1305
1319
|
root: "_root_ok48u_3",
|
|
1306
1320
|
icon: "_icon_ok48u_16",
|
|
1307
1321
|
body: "_body_ok48u_17",
|
|
@@ -1313,9 +1327,9 @@ var U = {
|
|
|
1313
1327
|
warning: "_warning_ok48u_25",
|
|
1314
1328
|
destructive: "_destructive_ok48u_26"
|
|
1315
1329
|
}, Ie = {
|
|
1316
|
-
success: /* @__PURE__ */
|
|
1317
|
-
warning: /* @__PURE__ */
|
|
1318
|
-
destructive: /* @__PURE__ */
|
|
1330
|
+
success: /* @__PURE__ */ d(h, {}),
|
|
1331
|
+
warning: /* @__PURE__ */ d(T, {}),
|
|
1332
|
+
destructive: /* @__PURE__ */ d(T, {})
|
|
1319
1333
|
};
|
|
1320
1334
|
function Le(t) {
|
|
1321
1335
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
@@ -1325,40 +1339,40 @@ function Le(t) {
|
|
|
1325
1339
|
}
|
|
1326
1340
|
var Re = ({ variant: e = "default", icon: t, className: n = "", children: r, role: i }) => {
|
|
1327
1341
|
let a = t === void 0 ? Ie[e] : t;
|
|
1328
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ f("div", {
|
|
1329
1343
|
role: i ?? (e === "destructive" || e === "warning" ? "alert" : "status"),
|
|
1330
|
-
className: `${
|
|
1331
|
-
children: [a && /* @__PURE__ */
|
|
1332
|
-
className:
|
|
1344
|
+
className: `${W.root} ${W[e]} ${n}`,
|
|
1345
|
+
children: [a && /* @__PURE__ */ d("span", {
|
|
1346
|
+
className: W.icon,
|
|
1333
1347
|
"aria-hidden": "true",
|
|
1334
1348
|
children: Le(a)
|
|
1335
|
-
}), /* @__PURE__ */
|
|
1336
|
-
className:
|
|
1349
|
+
}), /* @__PURE__ */ d("div", {
|
|
1350
|
+
className: W.body,
|
|
1337
1351
|
children: r
|
|
1338
1352
|
})]
|
|
1339
1353
|
});
|
|
1340
|
-
}, ze = ({ children: e, className: t = "" }) => /* @__PURE__ */
|
|
1341
|
-
className: `${
|
|
1354
|
+
}, ze = ({ children: e, className: t = "" }) => /* @__PURE__ */ d("div", {
|
|
1355
|
+
className: `${W.title} ${t}`,
|
|
1342
1356
|
children: e
|
|
1343
|
-
}), Be = ({ children: e, className: t = "" }) => /* @__PURE__ */
|
|
1344
|
-
className: `${
|
|
1357
|
+
}), Be = ({ children: e, className: t = "" }) => /* @__PURE__ */ d("div", {
|
|
1358
|
+
className: `${W.description} ${t}`,
|
|
1345
1359
|
children: e
|
|
1346
1360
|
}), Ve = {
|
|
1347
1361
|
root: "_root_1aak8_10",
|
|
1348
1362
|
main: "_main_1aak8_33",
|
|
1349
1363
|
aside: "_aside_1aak8_34",
|
|
1350
1364
|
message: "_message_1aak8_41"
|
|
1351
|
-
}, He = ({ visible: e = !0, message: t, aside: n, children: r, className: i = "", "aria-label": a = "Unsaved changes" }) => e ? /* @__PURE__ */
|
|
1365
|
+
}, He = ({ visible: e = !0, message: t, aside: n, children: r, className: i = "", "aria-label": a = "Unsaved changes" }) => e ? /* @__PURE__ */ f("div", {
|
|
1352
1366
|
role: "region",
|
|
1353
1367
|
"aria-label": a,
|
|
1354
1368
|
className: `${Ve.root} ${i}`,
|
|
1355
|
-
children: [/* @__PURE__ */
|
|
1369
|
+
children: [/* @__PURE__ */ f("div", {
|
|
1356
1370
|
className: Ve.main,
|
|
1357
|
-
children: [r, t && /* @__PURE__ */
|
|
1371
|
+
children: [r, t && /* @__PURE__ */ d("span", {
|
|
1358
1372
|
className: Ve.message,
|
|
1359
1373
|
children: t
|
|
1360
1374
|
})]
|
|
1361
|
-
}), n && /* @__PURE__ */
|
|
1375
|
+
}), n && /* @__PURE__ */ d("div", {
|
|
1362
1376
|
className: Ve.aside,
|
|
1363
1377
|
children: n
|
|
1364
1378
|
})]
|
|
@@ -1369,20 +1383,20 @@ var Re = ({ variant: e = "default", icon: t, className: n = "", children: r, rol
|
|
|
1369
1383
|
//#endregion
|
|
1370
1384
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
1371
1385
|
function We({ content: e, position: t = "top", children: n, className: r }) {
|
|
1372
|
-
return /* @__PURE__ */
|
|
1386
|
+
return /* @__PURE__ */ d(A.Provider, {
|
|
1373
1387
|
delayDuration: 80,
|
|
1374
|
-
children: /* @__PURE__ */
|
|
1388
|
+
children: /* @__PURE__ */ f(A.Root, { children: [/* @__PURE__ */ d(A.Trigger, {
|
|
1375
1389
|
asChild: !0,
|
|
1376
1390
|
children: n
|
|
1377
|
-
}), /* @__PURE__ */
|
|
1391
|
+
}), /* @__PURE__ */ d(A.Portal, { children: /* @__PURE__ */ f(A.Content, {
|
|
1378
1392
|
side: t,
|
|
1379
1393
|
sideOffset: 7,
|
|
1380
1394
|
className: [Ue.tooltip, r].filter(Boolean).join(" "),
|
|
1381
|
-
children: [e, /* @__PURE__ */
|
|
1395
|
+
children: [e, /* @__PURE__ */ d(A.Arrow, { className: Ue.arrow })]
|
|
1382
1396
|
}) })] })
|
|
1383
1397
|
});
|
|
1384
1398
|
}
|
|
1385
|
-
var
|
|
1399
|
+
var G = {
|
|
1386
1400
|
wrapper: "_wrapper_1wrxy_1",
|
|
1387
1401
|
chart: "_chart_1wrxy_8",
|
|
1388
1402
|
svg: "_svg_1wrxy_33",
|
|
@@ -1399,34 +1413,34 @@ var W = {
|
|
|
1399
1413
|
marker: "_marker_1wrxy_111",
|
|
1400
1414
|
tooltipMarker: "_tooltipMarker_1wrxy_115",
|
|
1401
1415
|
markerDot: "_markerDot_1wrxy_119"
|
|
1402
|
-
}, Ge = "var(--lv4)",
|
|
1416
|
+
}, Ge = "var(--lv4)", K = 12, Ke = 20, qe = 8, Je = 28, q = 20;
|
|
1403
1417
|
function Ye(e) {
|
|
1404
1418
|
return Number.isInteger(e) ? String(e) : e.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
1405
1419
|
}
|
|
1406
|
-
function Xe({ series: e, labels: t, type: n = "line", height: a = 200, showLegend: o = !0, className:
|
|
1407
|
-
let p =
|
|
1420
|
+
function Xe({ series: e, labels: t, type: n = "line", height: a = 200, showLegend: o = !0, className: s, markers: u }) {
|
|
1421
|
+
let p = c(null), [m, h] = l(0), [g, _] = l(null);
|
|
1408
1422
|
i(() => {
|
|
1409
1423
|
let e = p.current;
|
|
1410
1424
|
if (!e) return;
|
|
1411
1425
|
let t = new ResizeObserver(([e]) => h(e.contentRect.width));
|
|
1412
1426
|
return t.observe(e), h(e.clientWidth), () => t.disconnect();
|
|
1413
1427
|
}, []);
|
|
1414
|
-
let v = t?.length ? Je : qe, y = Math.max(m -
|
|
1428
|
+
let v = t?.length ? Je : qe, y = Math.max(m - q - Ke, 0), b = Math.max(a - K - v, 0), x = e.flatMap((e) => e.data.filter(Number.isFinite)), S = x.length ? Math.max(...x, 0) : 1, C = n === "bar" ? 0 : Math.min(...x, 0), w = S - C || 1, T = Math.max(...e.map((e) => e.data.length), 0), E = (() => {
|
|
1415
1429
|
if (!t || t.length <= 1 || y <= 0) return 1;
|
|
1416
1430
|
let e = Math.max(...t.map((e) => e.length)) * 6 + 12, n = Math.max(Math.floor(y / e), 1);
|
|
1417
1431
|
return Math.ceil(t.length / n);
|
|
1418
|
-
})(), D = T <= 1 || y / (T - 1) >= 12, O = (e) =>
|
|
1432
|
+
})(), D = T <= 1 || y / (T - 1) >= 12, O = (e) => K + (1 - (e - C) / w) * b, k = (e) => T <= 1 ? q + y / 2 : q + e / (T - 1) * y, A = r((e) => {
|
|
1419
1433
|
if (T === 0) return;
|
|
1420
1434
|
let t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left, i = e.clientY - t.top;
|
|
1421
1435
|
if (n === "line") {
|
|
1422
|
-
let e = Math.round((r -
|
|
1436
|
+
let e = Math.round((r - q) / y * (T - 1));
|
|
1423
1437
|
_({
|
|
1424
1438
|
index: Math.max(0, Math.min(T - 1, e)),
|
|
1425
1439
|
x: r,
|
|
1426
1440
|
y: i
|
|
1427
1441
|
});
|
|
1428
1442
|
} else {
|
|
1429
|
-
let e = y / T, t = Math.floor((r -
|
|
1443
|
+
let e = y / T, t = Math.floor((r - q) / e);
|
|
1430
1444
|
_({
|
|
1431
1445
|
index: Math.max(0, Math.min(T - 1, t)),
|
|
1432
1446
|
x: r,
|
|
@@ -1439,33 +1453,33 @@ function Xe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1439
1453
|
y
|
|
1440
1454
|
]), j = r((e) => {
|
|
1441
1455
|
e.pointerType === "mouse" && _(null);
|
|
1442
|
-
}, []),
|
|
1443
|
-
x1:
|
|
1444
|
-
y1:
|
|
1445
|
-
x2:
|
|
1446
|
-
y2:
|
|
1456
|
+
}, []), M = /* @__PURE__ */ d("line", {
|
|
1457
|
+
x1: q,
|
|
1458
|
+
y1: K + b * .5,
|
|
1459
|
+
x2: q + y,
|
|
1460
|
+
y2: K + b * .5,
|
|
1447
1461
|
stroke: "var(--chart-midline)",
|
|
1448
1462
|
strokeWidth: "0.5"
|
|
1449
|
-
}),
|
|
1450
|
-
x1:
|
|
1451
|
-
y1:
|
|
1452
|
-
x2:
|
|
1453
|
-
y2:
|
|
1463
|
+
}), ee = /* @__PURE__ */ d("line", {
|
|
1464
|
+
x1: q,
|
|
1465
|
+
y1: K + b,
|
|
1466
|
+
x2: q + y,
|
|
1467
|
+
y2: K + b,
|
|
1454
1468
|
stroke: "var(--chart-baseline)",
|
|
1455
1469
|
strokeWidth: "1"
|
|
1456
|
-
}),
|
|
1470
|
+
}), te = g && n === "bar" ? (() => {
|
|
1457
1471
|
let e = y / T;
|
|
1458
|
-
return /* @__PURE__ */
|
|
1459
|
-
x:
|
|
1460
|
-
y:
|
|
1472
|
+
return /* @__PURE__ */ d("rect", {
|
|
1473
|
+
x: q + g.index * e,
|
|
1474
|
+
y: K,
|
|
1461
1475
|
width: e,
|
|
1462
1476
|
height: b,
|
|
1463
1477
|
fill: "var(--chart-column-hover)"
|
|
1464
1478
|
});
|
|
1465
|
-
})() : null,
|
|
1479
|
+
})() : null, ne = () => e.map((e, t) => {
|
|
1466
1480
|
if (!e.data.length) return null;
|
|
1467
1481
|
let n = e.color ?? Ge;
|
|
1468
|
-
return /* @__PURE__ */
|
|
1482
|
+
return /* @__PURE__ */ f("g", { children: [/* @__PURE__ */ d("polyline", {
|
|
1469
1483
|
points: e.data.map((e, t) => `${k(t).toFixed(2)},${O(e).toFixed(2)}`).join(" "),
|
|
1470
1484
|
fill: "none",
|
|
1471
1485
|
stroke: n,
|
|
@@ -1476,7 +1490,7 @@ function Xe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1476
1490
|
let r = g?.index === t;
|
|
1477
1491
|
if (!r && !D) return null;
|
|
1478
1492
|
let i = r ? D ? 10 : 7 : 5, a = i / 2;
|
|
1479
|
-
return /* @__PURE__ */
|
|
1493
|
+
return /* @__PURE__ */ d("rect", {
|
|
1480
1494
|
x: k(t) - a,
|
|
1481
1495
|
y: O(e) - a,
|
|
1482
1496
|
width: i,
|
|
@@ -1484,12 +1498,12 @@ function Xe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1484
1498
|
fill: n
|
|
1485
1499
|
}, t);
|
|
1486
1500
|
})] }, t);
|
|
1487
|
-
}),
|
|
1501
|
+
}), re = () => {
|
|
1488
1502
|
if (!T) return null;
|
|
1489
|
-
let t = e.length, n = y / T, r = Math.max((n - 2 * (t + 1)) / t, 2), i =
|
|
1503
|
+
let t = e.length, n = y / T, r = Math.max((n - 2 * (t + 1)) / t, 2), i = K + b;
|
|
1490
1504
|
return e.map((e, t) => e.data.map((a, o) => {
|
|
1491
|
-
let s =
|
|
1492
|
-
return /* @__PURE__ */
|
|
1505
|
+
let s = q + o * n + 2 + t * (r + 2), c = O(a);
|
|
1506
|
+
return /* @__PURE__ */ d("rect", {
|
|
1493
1507
|
x: s,
|
|
1494
1508
|
y: c,
|
|
1495
1509
|
width: r,
|
|
@@ -1497,29 +1511,29 @@ function Xe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1497
1511
|
fill: e.color ?? "var(--chart-bar)"
|
|
1498
1512
|
}, `${t}-${o}`);
|
|
1499
1513
|
}));
|
|
1500
|
-
},
|
|
1514
|
+
}, ie = () => {
|
|
1501
1515
|
if (!t?.length) return null;
|
|
1502
|
-
let e =
|
|
1503
|
-
return t.map((t, i) => (r - i) % E === 0 ? /* @__PURE__ */
|
|
1504
|
-
x: n === "line" ? k(i) :
|
|
1516
|
+
let e = K + b + 18, r = t.length - 1;
|
|
1517
|
+
return t.map((t, i) => (r - i) % E === 0 ? /* @__PURE__ */ d("text", {
|
|
1518
|
+
x: n === "line" ? k(i) : q + (i + .5) * (y / T),
|
|
1505
1519
|
y: e,
|
|
1506
1520
|
textAnchor: n !== "line" || r === 0 ? "middle" : i === 0 ? "start" : i === r ? "end" : "middle",
|
|
1507
1521
|
fill: "var(--lv4)",
|
|
1508
1522
|
style: { font: "var(--text-2xs)" },
|
|
1509
1523
|
children: t
|
|
1510
1524
|
}, i) : null);
|
|
1511
|
-
}, N = g && n === "line" ? /* @__PURE__ */
|
|
1525
|
+
}, N = g && n === "line" ? /* @__PURE__ */ d("line", {
|
|
1512
1526
|
x1: k(g.index),
|
|
1513
|
-
y1:
|
|
1527
|
+
y1: K,
|
|
1514
1528
|
x2: k(g.index),
|
|
1515
|
-
y2:
|
|
1529
|
+
y2: K + b,
|
|
1516
1530
|
stroke: "var(--chart-crosshair)",
|
|
1517
1531
|
strokeWidth: "1",
|
|
1518
1532
|
strokeDasharray: "3 3"
|
|
1519
|
-
}) : null,
|
|
1533
|
+
}) : null, P = g ? (() => {
|
|
1520
1534
|
let n = t?.[g.index] ?? String(g.index + 1), r = Math.min(Math.max(g.x, 60), m - 60);
|
|
1521
|
-
return /* @__PURE__ */
|
|
1522
|
-
className:
|
|
1535
|
+
return /* @__PURE__ */ f("div", {
|
|
1536
|
+
className: G.tooltip,
|
|
1523
1537
|
style: g.y < 80 ? {
|
|
1524
1538
|
left: r,
|
|
1525
1539
|
top: g.y + 12,
|
|
@@ -1530,85 +1544,85 @@ function Xe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1530
1544
|
transform: "translate(-50%, -100%)"
|
|
1531
1545
|
},
|
|
1532
1546
|
children: [
|
|
1533
|
-
/* @__PURE__ */
|
|
1534
|
-
className:
|
|
1547
|
+
/* @__PURE__ */ d("div", {
|
|
1548
|
+
className: G.tooltipLabel,
|
|
1535
1549
|
children: n
|
|
1536
1550
|
}),
|
|
1537
|
-
e.map((e, t) => /* @__PURE__ */
|
|
1538
|
-
className:
|
|
1551
|
+
e.map((e, t) => /* @__PURE__ */ f("div", {
|
|
1552
|
+
className: G.tooltipRow,
|
|
1539
1553
|
children: [
|
|
1540
|
-
/* @__PURE__ */
|
|
1541
|
-
className:
|
|
1554
|
+
/* @__PURE__ */ d("span", {
|
|
1555
|
+
className: G.tooltipDot,
|
|
1542
1556
|
style: { background: e.color ?? Ge }
|
|
1543
1557
|
}),
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
className:
|
|
1558
|
+
/* @__PURE__ */ d("span", {
|
|
1559
|
+
className: G.tooltipName,
|
|
1546
1560
|
children: e.label
|
|
1547
1561
|
}),
|
|
1548
|
-
/* @__PURE__ */
|
|
1549
|
-
className:
|
|
1562
|
+
/* @__PURE__ */ d("span", {
|
|
1563
|
+
className: G.tooltipValue,
|
|
1550
1564
|
children: Ye(e.data[g.index] ?? 0)
|
|
1551
1565
|
})
|
|
1552
1566
|
]
|
|
1553
1567
|
}, t)),
|
|
1554
|
-
|
|
1555
|
-
className: `${
|
|
1556
|
-
children: [/* @__PURE__ */
|
|
1557
|
-
className:
|
|
1568
|
+
u?.filter((e) => e.index === g.index).map((e, t) => /* @__PURE__ */ f("div", {
|
|
1569
|
+
className: `${G.tooltipRow} ${G.tooltipMarker}`,
|
|
1570
|
+
children: [/* @__PURE__ */ d("span", { className: `${G.tooltipDot} ${G.markerDot}` }), /* @__PURE__ */ d("span", {
|
|
1571
|
+
className: G.tooltipName,
|
|
1558
1572
|
children: e.label
|
|
1559
1573
|
})]
|
|
1560
1574
|
}, `m${t}`))
|
|
1561
1575
|
]
|
|
1562
1576
|
});
|
|
1563
1577
|
})() : null;
|
|
1564
|
-
return /* @__PURE__ */
|
|
1565
|
-
className: [
|
|
1566
|
-
children: [/* @__PURE__ */
|
|
1578
|
+
return /* @__PURE__ */ f("div", {
|
|
1579
|
+
className: [G.wrapper, s].filter(Boolean).join(" "),
|
|
1580
|
+
children: [/* @__PURE__ */ f("div", {
|
|
1567
1581
|
ref: p,
|
|
1568
|
-
className:
|
|
1582
|
+
className: G.chart,
|
|
1569
1583
|
style: { height: a },
|
|
1570
|
-
children: [m > 0 && /* @__PURE__ */
|
|
1584
|
+
children: [m > 0 && /* @__PURE__ */ f("svg", {
|
|
1571
1585
|
width: m,
|
|
1572
1586
|
height: a,
|
|
1573
|
-
className:
|
|
1587
|
+
className: G.svg,
|
|
1574
1588
|
onPointerMove: A,
|
|
1575
1589
|
onPointerDown: A,
|
|
1576
1590
|
onPointerLeave: j,
|
|
1577
1591
|
children: [
|
|
1592
|
+
M,
|
|
1578
1593
|
ee,
|
|
1579
1594
|
te,
|
|
1580
|
-
ne,
|
|
1581
1595
|
N,
|
|
1582
|
-
n === "line" ?
|
|
1583
|
-
|
|
1584
|
-
let t = n === "line" ? k(e) :
|
|
1585
|
-
return /* @__PURE__ */
|
|
1586
|
-
className:
|
|
1596
|
+
n === "line" ? ne() : re(),
|
|
1597
|
+
u && T > 0 && [...new Set(u.map((e) => e.index).filter((e) => e >= 0 && e < T))].map((e) => {
|
|
1598
|
+
let t = n === "line" ? k(e) : q + (e + .5) * (y / T);
|
|
1599
|
+
return /* @__PURE__ */ d("rect", {
|
|
1600
|
+
className: G.marker,
|
|
1587
1601
|
x: t - 3,
|
|
1588
|
-
y:
|
|
1602
|
+
y: K + b - 3,
|
|
1589
1603
|
width: 6,
|
|
1590
1604
|
height: 6
|
|
1591
1605
|
}, `m${e}`);
|
|
1592
1606
|
}),
|
|
1593
|
-
|
|
1607
|
+
ie()
|
|
1594
1608
|
]
|
|
1595
|
-
}),
|
|
1596
|
-
}), o && e.length > 1 && /* @__PURE__ */
|
|
1597
|
-
className:
|
|
1598
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
1599
|
-
className:
|
|
1600
|
-
children: [/* @__PURE__ */
|
|
1601
|
-
className:
|
|
1609
|
+
}), P]
|
|
1610
|
+
}), o && e.length > 1 && /* @__PURE__ */ d("div", {
|
|
1611
|
+
className: G.legend,
|
|
1612
|
+
children: e.map((e, t) => /* @__PURE__ */ f("div", {
|
|
1613
|
+
className: G.legendItem,
|
|
1614
|
+
children: [/* @__PURE__ */ d("div", {
|
|
1615
|
+
className: G.legendMark,
|
|
1602
1616
|
style: { background: e.color ?? Ge }
|
|
1603
|
-
}), /* @__PURE__ */
|
|
1604
|
-
className:
|
|
1617
|
+
}), /* @__PURE__ */ d("span", {
|
|
1618
|
+
className: G.legendLabel,
|
|
1605
1619
|
children: e.label
|
|
1606
1620
|
})]
|
|
1607
1621
|
}, t))
|
|
1608
1622
|
})]
|
|
1609
1623
|
});
|
|
1610
1624
|
}
|
|
1611
|
-
var
|
|
1625
|
+
var J = {
|
|
1612
1626
|
sparkline: "_sparkline_fqcg9_4",
|
|
1613
1627
|
line: "_line_fqcg9_12",
|
|
1614
1628
|
partial: "_partial_fqcg9_22",
|
|
@@ -1616,33 +1630,33 @@ var q = {
|
|
|
1616
1630
|
bars: "_bars_fqcg9_34",
|
|
1617
1631
|
bar: "_bar_fqcg9_34",
|
|
1618
1632
|
baseline: "_baseline_fqcg9_48"
|
|
1619
|
-
}, Ze = 100,
|
|
1620
|
-
function Qe({ values: e, type: t = "line", width: n = "100%", height: r = 24, color: i = "currentColor", fill: a = !1, baseline: o = !1, lastIsPartial: s = !1, gap: c = 1, ariaLabel:
|
|
1621
|
-
let m = e.filter((e) => Number.isFinite(e)), h =
|
|
1622
|
-
className: [
|
|
1633
|
+
}, Ze = 100, Y = 100;
|
|
1634
|
+
function Qe({ values: e, type: t = "line", width: n = "100%", height: r = 24, color: i = "currentColor", fill: a = !1, baseline: o = !1, lastIsPartial: s = !1, gap: c = 1, ariaLabel: l, className: p }) {
|
|
1635
|
+
let m = e.filter((e) => Number.isFinite(e)), h = l == null, g = m.length ? Math.max(...m) : 0, _ = m.length ? Math.min(...m) : 0, v = g - _ || 1, y = Y - 12, b = (e) => 94 - (e - _) / v * y, x = (e) => /* @__PURE__ */ f("svg", {
|
|
1636
|
+
className: [J.sparkline, p].filter(Boolean).join(" "),
|
|
1623
1637
|
style: {
|
|
1624
1638
|
width: n,
|
|
1625
1639
|
height: r,
|
|
1626
1640
|
color: i
|
|
1627
1641
|
},
|
|
1628
|
-
viewBox: `0 0 ${Ze} ${
|
|
1642
|
+
viewBox: `0 0 ${Ze} ${Y}`,
|
|
1629
1643
|
preserveAspectRatio: "none",
|
|
1630
1644
|
role: h ? void 0 : "img",
|
|
1631
|
-
"aria-label":
|
|
1645
|
+
"aria-label": l,
|
|
1632
1646
|
"aria-hidden": h || void 0,
|
|
1633
1647
|
focusable: "false",
|
|
1634
|
-
children: [e, o && /* @__PURE__ */
|
|
1648
|
+
children: [e, o && /* @__PURE__ */ d("line", {
|
|
1635
1649
|
x1: "0",
|
|
1636
|
-
y1:
|
|
1650
|
+
y1: Y - .5,
|
|
1637
1651
|
x2: Ze,
|
|
1638
|
-
y2:
|
|
1639
|
-
className:
|
|
1652
|
+
y2: Y - .5,
|
|
1653
|
+
className: J.baseline,
|
|
1640
1654
|
vectorEffect: "non-scaling-stroke"
|
|
1641
1655
|
})]
|
|
1642
1656
|
});
|
|
1643
1657
|
if (m.length < 2) return x(null);
|
|
1644
|
-
if (t === "bar") return /* @__PURE__ */
|
|
1645
|
-
className: [
|
|
1658
|
+
if (t === "bar") return /* @__PURE__ */ d("div", {
|
|
1659
|
+
className: [J.bars, p].filter(Boolean).join(" "),
|
|
1646
1660
|
style: {
|
|
1647
1661
|
width: n,
|
|
1648
1662
|
height: r,
|
|
@@ -1651,27 +1665,27 @@ function Qe({ values: e, type: t = "line", width: n = "100%", height: r = 24, co
|
|
|
1651
1665
|
borderBottomWidth: +!!o
|
|
1652
1666
|
},
|
|
1653
1667
|
role: h ? void 0 : "img",
|
|
1654
|
-
"aria-label":
|
|
1668
|
+
"aria-label": l,
|
|
1655
1669
|
"aria-hidden": h || void 0,
|
|
1656
|
-
children: m.map((e, t) => /* @__PURE__ */
|
|
1657
|
-
className:
|
|
1670
|
+
children: m.map((e, t) => /* @__PURE__ */ d("span", {
|
|
1671
|
+
className: J.bar,
|
|
1658
1672
|
style: { height: `${Math.max((e - _) / v * 100, 2)}%` }
|
|
1659
1673
|
}, t))
|
|
1660
1674
|
});
|
|
1661
1675
|
let S = Ze / (m.length - 1), C = (e, t) => m.slice(e, e + t).map((t, n) => `${(e + n) * S},${b(t)}`).join(" "), w = C(0, m.length);
|
|
1662
|
-
return x(/* @__PURE__ */
|
|
1663
|
-
className:
|
|
1664
|
-
points: `0,${
|
|
1665
|
-
}), s ? /* @__PURE__ */
|
|
1666
|
-
className:
|
|
1676
|
+
return x(/* @__PURE__ */ f(u, { children: [a && /* @__PURE__ */ d("polygon", {
|
|
1677
|
+
className: J.fill,
|
|
1678
|
+
points: `0,${Y} ${w} ${Ze},${Y}`
|
|
1679
|
+
}), s ? /* @__PURE__ */ f(u, { children: [m.length > 2 && /* @__PURE__ */ d("polyline", {
|
|
1680
|
+
className: J.line,
|
|
1667
1681
|
points: C(0, m.length - 1),
|
|
1668
1682
|
vectorEffect: "non-scaling-stroke"
|
|
1669
|
-
}), /* @__PURE__ */
|
|
1670
|
-
className: `${
|
|
1683
|
+
}), /* @__PURE__ */ d("polyline", {
|
|
1684
|
+
className: `${J.line} ${J.partial}`,
|
|
1671
1685
|
points: C(m.length - 2, 2),
|
|
1672
1686
|
vectorEffect: "non-scaling-stroke"
|
|
1673
|
-
})] }) : /* @__PURE__ */
|
|
1674
|
-
className:
|
|
1687
|
+
})] }) : /* @__PURE__ */ d("polyline", {
|
|
1688
|
+
className: J.line,
|
|
1675
1689
|
points: w,
|
|
1676
1690
|
vectorEffect: "non-scaling-stroke"
|
|
1677
1691
|
})] }));
|
|
@@ -1686,28 +1700,28 @@ var $e = {
|
|
|
1686
1700
|
//#endregion
|
|
1687
1701
|
//#region src/components/Textarea/Textarea.tsx
|
|
1688
1702
|
function et({ label: t, error: n, className: r = "", isValid: i = !0, id: a, rows: o = 4, ...s }) {
|
|
1689
|
-
let c = e.useId(), l = a || c,
|
|
1690
|
-
return /* @__PURE__ */
|
|
1703
|
+
let c = e.useId(), l = a || c, u = `${l}-error`, p = n || !i;
|
|
1704
|
+
return /* @__PURE__ */ f("div", {
|
|
1691
1705
|
className: `${$e.wrapper} ${r}`,
|
|
1692
1706
|
children: [
|
|
1693
|
-
t && /* @__PURE__ */
|
|
1707
|
+
t && /* @__PURE__ */ f("label", {
|
|
1694
1708
|
htmlFor: l,
|
|
1695
1709
|
className: $e.label,
|
|
1696
|
-
children: [t, s.required && /* @__PURE__ */
|
|
1710
|
+
children: [t, s.required && /* @__PURE__ */ d("span", {
|
|
1697
1711
|
"aria-label": "required",
|
|
1698
1712
|
children: " *"
|
|
1699
1713
|
})]
|
|
1700
1714
|
}),
|
|
1701
|
-
/* @__PURE__ */
|
|
1715
|
+
/* @__PURE__ */ d("textarea", {
|
|
1702
1716
|
id: l,
|
|
1703
1717
|
rows: o,
|
|
1704
1718
|
className: `${$e.textarea} ${p ? $e.error : ""}`,
|
|
1705
1719
|
"aria-invalid": p ? "true" : "false",
|
|
1706
|
-
"aria-describedby": n ?
|
|
1720
|
+
"aria-describedby": n ? u : void 0,
|
|
1707
1721
|
...s
|
|
1708
1722
|
}),
|
|
1709
|
-
n && /* @__PURE__ */
|
|
1710
|
-
id:
|
|
1723
|
+
n && /* @__PURE__ */ d("span", {
|
|
1724
|
+
id: u,
|
|
1711
1725
|
className: $e.errorText,
|
|
1712
1726
|
role: "alert",
|
|
1713
1727
|
children: n
|
|
@@ -1715,34 +1729,34 @@ function et({ label: t, error: n, className: r = "", isValid: i = !0, id: a, row
|
|
|
1715
1729
|
]
|
|
1716
1730
|
});
|
|
1717
1731
|
}
|
|
1718
|
-
var
|
|
1732
|
+
var X = {
|
|
1719
1733
|
overlay: "_overlay_xud7c_1",
|
|
1720
1734
|
content: "_content_xud7c_8",
|
|
1721
1735
|
title: "_title_xud7c_26",
|
|
1722
1736
|
description: "_description_xud7c_34",
|
|
1723
1737
|
close: "_close_xud7c_40",
|
|
1724
1738
|
srOnly: "_srOnly_xud7c_62"
|
|
1725
|
-
}, tt = ({ trigger: e, children: t, open: n, onOpenChange: r, title: i, description: a, className: o = "", showClose: s = !0 }) => /* @__PURE__ */
|
|
1739
|
+
}, tt = ({ trigger: e, children: t, open: n, onOpenChange: r, title: i, description: a, className: o = "", showClose: s = !0 }) => /* @__PURE__ */ f(j.Root, {
|
|
1726
1740
|
open: n,
|
|
1727
1741
|
onOpenChange: r,
|
|
1728
|
-
children: [e && /* @__PURE__ */
|
|
1742
|
+
children: [e && /* @__PURE__ */ d(j.Trigger, {
|
|
1729
1743
|
asChild: !0,
|
|
1730
1744
|
children: e
|
|
1731
|
-
}), /* @__PURE__ */
|
|
1732
|
-
className: `${
|
|
1745
|
+
}), /* @__PURE__ */ f(j.Portal, { children: [/* @__PURE__ */ d(j.Overlay, { className: X.overlay }), /* @__PURE__ */ f(j.Content, {
|
|
1746
|
+
className: `${X.content} ${o}`,
|
|
1733
1747
|
children: [
|
|
1734
|
-
/* @__PURE__ */
|
|
1735
|
-
className: i ?
|
|
1748
|
+
/* @__PURE__ */ d(j.Title, {
|
|
1749
|
+
className: i ? X.title : X.srOnly,
|
|
1736
1750
|
children: i || "Dialog"
|
|
1737
1751
|
}),
|
|
1738
|
-
a && /* @__PURE__ */
|
|
1739
|
-
className:
|
|
1752
|
+
a && /* @__PURE__ */ d(j.Description, {
|
|
1753
|
+
className: X.description,
|
|
1740
1754
|
children: a
|
|
1741
1755
|
}),
|
|
1742
|
-
s && /* @__PURE__ */
|
|
1743
|
-
className:
|
|
1756
|
+
s && /* @__PURE__ */ d(j.Close, {
|
|
1757
|
+
className: X.close,
|
|
1744
1758
|
"aria-label": "Close",
|
|
1745
|
-
children: /* @__PURE__ */
|
|
1759
|
+
children: /* @__PURE__ */ d(E, {
|
|
1746
1760
|
size: 16,
|
|
1747
1761
|
color: "currentColor"
|
|
1748
1762
|
})
|
|
@@ -1750,7 +1764,7 @@ var Y = {
|
|
|
1750
1764
|
t
|
|
1751
1765
|
]
|
|
1752
1766
|
})] })]
|
|
1753
|
-
}),
|
|
1767
|
+
}), Z = {
|
|
1754
1768
|
wrapper: "_wrapper_aimna_1",
|
|
1755
1769
|
label: "_label_aimna_7",
|
|
1756
1770
|
trigger: "_trigger_aimna_12",
|
|
@@ -1803,18 +1817,18 @@ function ot(e, t) {
|
|
|
1803
1817
|
for (let i = 0; i < 42; i++) r.push(new Date(e, t, 1 - n + i));
|
|
1804
1818
|
return r;
|
|
1805
1819
|
}
|
|
1806
|
-
var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", error: a, isValid: o = !0, disabled: s = !1, className:
|
|
1807
|
-
let p = e.useId(), m = `${p}-error`,
|
|
1820
|
+
var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", error: a, isValid: o = !0, disabled: s = !1, className: c = "", formatDate: u = it }) => {
|
|
1821
|
+
let p = e.useId(), m = `${p}-error`, h = !!a || !o, [y, b] = l(!1), x = /* @__PURE__ */ new Date(), S = t ?? x, [C, w] = l(S.getFullYear()), [T, E] = l(S.getMonth()), [D, O] = l(S), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1), M = (e) => {
|
|
1808
1822
|
if (e) {
|
|
1809
1823
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
1810
|
-
|
|
1824
|
+
O(e), w(e.getFullYear()), E(e.getMonth());
|
|
1811
1825
|
}
|
|
1812
1826
|
b(e);
|
|
1813
1827
|
};
|
|
1814
1828
|
e.useEffect(() => {
|
|
1815
1829
|
j.current &&= (A.current.get(it(D))?.focus(), !1);
|
|
1816
1830
|
}, [D]);
|
|
1817
|
-
let
|
|
1831
|
+
let ee = (e, t) => {
|
|
1818
1832
|
let n = new Date(t), r = {
|
|
1819
1833
|
ArrowLeft: -1,
|
|
1820
1834
|
ArrowRight: 1,
|
|
@@ -1828,49 +1842,49 @@ var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1828
1842
|
let t = n.getDate();
|
|
1829
1843
|
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()));
|
|
1830
1844
|
} else return;
|
|
1831
|
-
e.preventDefault(), j.current = !0,
|
|
1845
|
+
e.preventDefault(), j.current = !0, O(n), w(n.getFullYear()), E(n.getMonth());
|
|
1832
1846
|
};
|
|
1833
1847
|
e.useEffect(() => {
|
|
1834
1848
|
y && t && (w(t.getFullYear()), E(t.getMonth()));
|
|
1835
1849
|
}, [y]);
|
|
1836
|
-
let
|
|
1850
|
+
let te = () => {
|
|
1837
1851
|
T === 0 ? (E(11), w(C - 1)) : E(T - 1);
|
|
1838
|
-
},
|
|
1852
|
+
}, ne = () => {
|
|
1839
1853
|
T === 11 ? (E(0), w(C + 1)) : E(T + 1);
|
|
1840
|
-
},
|
|
1854
|
+
}, re = (e) => {
|
|
1841
1855
|
n?.(e), b(!1);
|
|
1842
|
-
},
|
|
1843
|
-
return /* @__PURE__ */
|
|
1844
|
-
className: `${
|
|
1856
|
+
}, ie = ot(C, T);
|
|
1857
|
+
return /* @__PURE__ */ f("div", {
|
|
1858
|
+
className: `${Z.wrapper} ${c}`,
|
|
1845
1859
|
children: [
|
|
1846
|
-
r && /* @__PURE__ */
|
|
1860
|
+
r && /* @__PURE__ */ d("span", {
|
|
1847
1861
|
id: `${p}-label`,
|
|
1848
|
-
className:
|
|
1862
|
+
className: Z.label,
|
|
1849
1863
|
children: r
|
|
1850
1864
|
}),
|
|
1851
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ f(k.Root, {
|
|
1852
1866
|
open: y,
|
|
1853
|
-
onOpenChange:
|
|
1854
|
-
children: [/* @__PURE__ */
|
|
1867
|
+
onOpenChange: M,
|
|
1868
|
+
children: [/* @__PURE__ */ d(k.Trigger, {
|
|
1855
1869
|
asChild: !0,
|
|
1856
|
-
children: /* @__PURE__ */
|
|
1870
|
+
children: /* @__PURE__ */ f("button", {
|
|
1857
1871
|
type: "button",
|
|
1858
|
-
className: `${
|
|
1872
|
+
className: `${Z.trigger} ${h ? Z.error : ""}`,
|
|
1859
1873
|
disabled: s,
|
|
1860
1874
|
"aria-labelledby": r ? `${p}-label ${p}-value` : void 0,
|
|
1861
|
-
"aria-invalid":
|
|
1875
|
+
"aria-invalid": h ? "true" : "false",
|
|
1862
1876
|
"aria-describedby": a ? m : void 0,
|
|
1863
|
-
children: [/* @__PURE__ */
|
|
1877
|
+
children: [/* @__PURE__ */ d("span", {
|
|
1864
1878
|
id: `${p}-value`,
|
|
1865
|
-
className: t ?
|
|
1866
|
-
children: t ?
|
|
1867
|
-
}), /* @__PURE__ */
|
|
1879
|
+
className: t ? Z.valueText : Z.placeholder,
|
|
1880
|
+
children: t ? u(t) : i
|
|
1881
|
+
}), /* @__PURE__ */ d(g, {
|
|
1868
1882
|
size: 14,
|
|
1869
1883
|
color: "currentColor"
|
|
1870
1884
|
})]
|
|
1871
1885
|
})
|
|
1872
|
-
}), /* @__PURE__ */
|
|
1873
|
-
className:
|
|
1886
|
+
}), /* @__PURE__ */ d(k.Portal, { children: /* @__PURE__ */ f(k.Content, {
|
|
1887
|
+
className: Z.calendar,
|
|
1874
1888
|
align: "start",
|
|
1875
1889
|
sideOffset: 5,
|
|
1876
1890
|
"aria-label": r ? `${r} calendar` : "Choose a date",
|
|
@@ -1878,59 +1892,59 @@ var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1878
1892
|
e.preventDefault(), A.current.get(it(D))?.focus();
|
|
1879
1893
|
},
|
|
1880
1894
|
children: [
|
|
1881
|
-
/* @__PURE__ */
|
|
1882
|
-
className:
|
|
1895
|
+
/* @__PURE__ */ f("div", {
|
|
1896
|
+
className: Z.header,
|
|
1883
1897
|
children: [
|
|
1884
|
-
/* @__PURE__ */
|
|
1898
|
+
/* @__PURE__ */ d("button", {
|
|
1885
1899
|
type: "button",
|
|
1886
|
-
className:
|
|
1887
|
-
onClick:
|
|
1900
|
+
className: Z.navButton,
|
|
1901
|
+
onClick: te,
|
|
1888
1902
|
"aria-label": "Previous month",
|
|
1889
|
-
children: /* @__PURE__ */
|
|
1903
|
+
children: /* @__PURE__ */ d(_, {
|
|
1890
1904
|
size: 14,
|
|
1891
1905
|
color: "currentColor"
|
|
1892
1906
|
})
|
|
1893
1907
|
}),
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
className:
|
|
1908
|
+
/* @__PURE__ */ f("span", {
|
|
1909
|
+
className: Z.monthLabel,
|
|
1896
1910
|
children: [
|
|
1897
1911
|
rt[T],
|
|
1898
1912
|
" ",
|
|
1899
1913
|
C
|
|
1900
1914
|
]
|
|
1901
1915
|
}),
|
|
1902
|
-
/* @__PURE__ */
|
|
1916
|
+
/* @__PURE__ */ d("button", {
|
|
1903
1917
|
type: "button",
|
|
1904
|
-
className:
|
|
1905
|
-
onClick:
|
|
1918
|
+
className: Z.navButton,
|
|
1919
|
+
onClick: ne,
|
|
1906
1920
|
"aria-label": "Next month",
|
|
1907
|
-
children: /* @__PURE__ */
|
|
1921
|
+
children: /* @__PURE__ */ d(v, {
|
|
1908
1922
|
size: 14,
|
|
1909
1923
|
color: "currentColor"
|
|
1910
1924
|
})
|
|
1911
1925
|
})
|
|
1912
1926
|
]
|
|
1913
1927
|
}),
|
|
1914
|
-
/* @__PURE__ */
|
|
1915
|
-
className:
|
|
1916
|
-
children: nt.map((e) => /* @__PURE__ */
|
|
1917
|
-
className:
|
|
1928
|
+
/* @__PURE__ */ d("div", {
|
|
1929
|
+
className: Z.weekdays,
|
|
1930
|
+
children: nt.map((e) => /* @__PURE__ */ d("span", {
|
|
1931
|
+
className: Z.weekday,
|
|
1918
1932
|
children: e
|
|
1919
1933
|
}, e))
|
|
1920
1934
|
}),
|
|
1921
|
-
/* @__PURE__ */
|
|
1922
|
-
className:
|
|
1923
|
-
children:
|
|
1935
|
+
/* @__PURE__ */ d("div", {
|
|
1936
|
+
className: Z.grid,
|
|
1937
|
+
children: ie.map((e) => {
|
|
1924
1938
|
let n = e.getMonth() !== T, r = at(e, t), i = at(e, x);
|
|
1925
|
-
return /* @__PURE__ */
|
|
1939
|
+
return /* @__PURE__ */ d("button", {
|
|
1926
1940
|
type: "button",
|
|
1927
1941
|
className: [
|
|
1928
|
-
|
|
1929
|
-
n ?
|
|
1930
|
-
r ?
|
|
1931
|
-
i && !r ?
|
|
1942
|
+
Z.day,
|
|
1943
|
+
n ? Z.outside : "",
|
|
1944
|
+
r ? Z.selected : "",
|
|
1945
|
+
i && !r ? Z.today : ""
|
|
1932
1946
|
].filter(Boolean).join(" "),
|
|
1933
|
-
onClick: () =>
|
|
1947
|
+
onClick: () => re(e),
|
|
1934
1948
|
ref: (t) => {
|
|
1935
1949
|
t ? A.current.set(it(e), t) : A.current.delete(it(e));
|
|
1936
1950
|
},
|
|
@@ -1943,7 +1957,7 @@ var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1943
1957
|
"aria-pressed": r,
|
|
1944
1958
|
"aria-current": i ? "date" : void 0,
|
|
1945
1959
|
tabIndex: at(e, D) || D.getMonth() !== T && e.getDate() === 1 && !n ? 0 : -1,
|
|
1946
|
-
onKeyDown: (t) =>
|
|
1960
|
+
onKeyDown: (t) => ee(t, e),
|
|
1947
1961
|
children: e.getDate()
|
|
1948
1962
|
}, e.toISOString());
|
|
1949
1963
|
})
|
|
@@ -1951,15 +1965,15 @@ var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1951
1965
|
]
|
|
1952
1966
|
}) })]
|
|
1953
1967
|
}),
|
|
1954
|
-
a && /* @__PURE__ */
|
|
1968
|
+
a && /* @__PURE__ */ d("span", {
|
|
1955
1969
|
id: m,
|
|
1956
|
-
className:
|
|
1970
|
+
className: Z.errorText,
|
|
1957
1971
|
role: "alert",
|
|
1958
1972
|
children: a
|
|
1959
1973
|
})
|
|
1960
1974
|
]
|
|
1961
1975
|
});
|
|
1962
|
-
},
|
|
1976
|
+
}, Q = {
|
|
1963
1977
|
root: "_root_biiv1_1",
|
|
1964
1978
|
micro: "_micro_biiv1_7",
|
|
1965
1979
|
default: "_default_biiv1_8",
|
|
@@ -1979,7 +1993,7 @@ var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1979
1993
|
micro: 14,
|
|
1980
1994
|
default: 14,
|
|
1981
1995
|
large: 21
|
|
1982
|
-
}, lt = e.createContext("default"), ut = typeof window > "u" ? e.useEffect : e.useLayoutEffect, dt = e.forwardRef(({ size: t = "default", align: n = "start", panelAlign: r = "trigger", panelWidth: i, className: a = "", style: o, children: s, "aria-label": c = "Main navigation", ...l },
|
|
1996
|
+
}, lt = e.createContext("default"), ut = typeof window > "u" ? e.useEffect : e.useLayoutEffect, dt = e.forwardRef(({ size: t = "default", align: n = "start", panelAlign: r = "trigger", panelWidth: i, className: a = "", style: o, children: s, "aria-label": c = "Main navigation", ...l }, u) => {
|
|
1983
1997
|
let p = e.useRef(null), m = e.useRef(!1);
|
|
1984
1998
|
ut(() => {
|
|
1985
1999
|
let e = p.current;
|
|
@@ -2010,36 +2024,36 @@ var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
2010
2024
|
let h = {
|
|
2011
2025
|
...o,
|
|
2012
2026
|
...i === void 0 ? {} : { "--panel-width": typeof i == "number" ? `${i}px` : i }
|
|
2013
|
-
}, g = r === "trigger" ?
|
|
2014
|
-
return /* @__PURE__ */
|
|
2027
|
+
}, g = r === "trigger" ? Q.panelTrigger : r === "end" ? Q.alignEnd : "";
|
|
2028
|
+
return /* @__PURE__ */ d(lt.Provider, {
|
|
2015
2029
|
value: t,
|
|
2016
|
-
children: /* @__PURE__ */
|
|
2030
|
+
children: /* @__PURE__ */ f(M.Root, {
|
|
2017
2031
|
...l,
|
|
2018
2032
|
ref: (e) => {
|
|
2019
|
-
p.current = e, typeof
|
|
2033
|
+
p.current = e, typeof u == "function" ? u(e) : u && (u.current = e);
|
|
2020
2034
|
},
|
|
2021
2035
|
"aria-label": c,
|
|
2022
2036
|
style: h,
|
|
2023
|
-
className: `${
|
|
2024
|
-
children: [s, /* @__PURE__ */
|
|
2025
|
-
className:
|
|
2026
|
-
children: /* @__PURE__ */
|
|
2037
|
+
className: `${Q.root} ${Q[t]} ${n === "end" ? Q.alignList : ""} ${g} ${a}`,
|
|
2038
|
+
children: [s, /* @__PURE__ */ d("div", {
|
|
2039
|
+
className: Q.viewportPosition,
|
|
2040
|
+
children: /* @__PURE__ */ d(M.Viewport, { className: Q.viewport })
|
|
2027
2041
|
})]
|
|
2028
2042
|
})
|
|
2029
2043
|
});
|
|
2030
2044
|
});
|
|
2031
2045
|
dt.displayName = "NavigationMenu";
|
|
2032
|
-
var ft = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */
|
|
2046
|
+
var ft = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ d(M.List, {
|
|
2033
2047
|
...t,
|
|
2034
2048
|
ref: n,
|
|
2035
|
-
className: `${
|
|
2049
|
+
className: `${Q.list} ${e}`
|
|
2036
2050
|
}));
|
|
2037
2051
|
ft.displayName = "NavigationMenuList";
|
|
2038
|
-
var pt =
|
|
2052
|
+
var pt = M.Item;
|
|
2039
2053
|
function mt({ icon: t }) {
|
|
2040
2054
|
let n = e.useContext(lt);
|
|
2041
|
-
return t ? /* @__PURE__ */
|
|
2042
|
-
className:
|
|
2055
|
+
return t ? /* @__PURE__ */ d("span", {
|
|
2056
|
+
className: Q.icon,
|
|
2043
2057
|
"aria-hidden": "true",
|
|
2044
2058
|
children: e.cloneElement(t, {
|
|
2045
2059
|
size: ct[n],
|
|
@@ -2049,17 +2063,17 @@ function mt({ icon: t }) {
|
|
|
2049
2063
|
}
|
|
2050
2064
|
var ht = e.forwardRef(({ className: t = "", icon: n, children: r, ...i }, a) => {
|
|
2051
2065
|
let o = e.useContext(lt);
|
|
2052
|
-
return /* @__PURE__ */
|
|
2066
|
+
return /* @__PURE__ */ f(M.Trigger, {
|
|
2053
2067
|
...i,
|
|
2054
2068
|
ref: a,
|
|
2055
|
-
className: `${
|
|
2069
|
+
className: `${Q.control} ${t}`,
|
|
2056
2070
|
children: [
|
|
2057
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ d(mt, { icon: n }),
|
|
2058
2072
|
r,
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
className:
|
|
2073
|
+
/* @__PURE__ */ d("span", {
|
|
2074
|
+
className: Q.caret,
|
|
2061
2075
|
"aria-hidden": "true",
|
|
2062
|
-
children: /* @__PURE__ */
|
|
2076
|
+
children: /* @__PURE__ */ d(g, {
|
|
2063
2077
|
size: ct[o],
|
|
2064
2078
|
color: "currentColor"
|
|
2065
2079
|
})
|
|
@@ -2068,20 +2082,20 @@ var ht = e.forwardRef(({ className: t = "", icon: n, children: r, ...i }, a) =>
|
|
|
2068
2082
|
});
|
|
2069
2083
|
});
|
|
2070
2084
|
ht.displayName = "NavigationMenuTrigger";
|
|
2071
|
-
var gt = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */
|
|
2085
|
+
var gt = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ d(M.Content, {
|
|
2072
2086
|
...t,
|
|
2073
2087
|
ref: n,
|
|
2074
|
-
className: `${
|
|
2088
|
+
className: `${Q.content} ${e}`
|
|
2075
2089
|
}));
|
|
2076
2090
|
gt.displayName = "NavigationMenuContent";
|
|
2077
|
-
var _t = e.forwardRef(({ variant: e = "panel", icon: t, className: n = "", children: r, ...i }, a) => /* @__PURE__ */
|
|
2091
|
+
var _t = e.forwardRef(({ variant: e = "panel", icon: t, className: n = "", children: r, ...i }, a) => /* @__PURE__ */ d(M.Link, {
|
|
2078
2092
|
...i,
|
|
2079
2093
|
ref: a,
|
|
2080
|
-
className: `${e === "navigation" ?
|
|
2081
|
-
children: e === "navigation" && !i.asChild ? /* @__PURE__ */
|
|
2094
|
+
className: `${e === "navigation" ? Q.control : Q.link} ${n}`,
|
|
2095
|
+
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(mt, { icon: t }), r] }) : r
|
|
2082
2096
|
}));
|
|
2083
2097
|
_t.displayName = "NavigationMenuLink";
|
|
2084
|
-
var
|
|
2098
|
+
var $ = {
|
|
2085
2099
|
panel: "_panel_1hiss_6",
|
|
2086
2100
|
header: "_header_1hiss_14",
|
|
2087
2101
|
thread: "_thread_1hiss_15",
|
|
@@ -2113,38 +2127,38 @@ var Q = {
|
|
|
2113
2127
|
//#endregion
|
|
2114
2128
|
//#region src/components/Chat/ChatPanel.tsx
|
|
2115
2129
|
function vt({ children: e }) {
|
|
2116
|
-
return /* @__PURE__ */
|
|
2117
|
-
className:
|
|
2130
|
+
return /* @__PURE__ */ d("kbd", {
|
|
2131
|
+
className: $.kbd,
|
|
2118
2132
|
children: e
|
|
2119
2133
|
});
|
|
2120
2134
|
}
|
|
2121
|
-
var yt = /* @__PURE__ */
|
|
2122
|
-
/* @__PURE__ */
|
|
2123
|
-
/* @__PURE__ */
|
|
2124
|
-
/* @__PURE__ */
|
|
2135
|
+
var yt = /* @__PURE__ */ f(u, { children: [
|
|
2136
|
+
/* @__PURE__ */ f("span", { children: [/* @__PURE__ */ d(vt, { children: "↵" }), " send"] }),
|
|
2137
|
+
/* @__PURE__ */ f("span", { children: [/* @__PURE__ */ d(vt, { children: "⇧↵" }), " new line"] }),
|
|
2138
|
+
/* @__PURE__ */ f("span", { children: [/* @__PURE__ */ d(vt, { children: "esc" }), " close"] })
|
|
2125
2139
|
] });
|
|
2126
2140
|
function bt({ header: e, children: t, composer: n, hints: r = yt, className: i = "", threadRef: a, "aria-label": o }) {
|
|
2127
|
-
return /* @__PURE__ */
|
|
2128
|
-
className: `${
|
|
2141
|
+
return /* @__PURE__ */ f("div", {
|
|
2142
|
+
className: `${$.panel} ${i}`,
|
|
2129
2143
|
"aria-label": o,
|
|
2130
2144
|
children: [
|
|
2131
|
-
e && /* @__PURE__ */
|
|
2132
|
-
className:
|
|
2145
|
+
e && /* @__PURE__ */ d("div", {
|
|
2146
|
+
className: $.header,
|
|
2133
2147
|
children: e
|
|
2134
2148
|
}),
|
|
2135
|
-
/* @__PURE__ */
|
|
2136
|
-
className:
|
|
2149
|
+
/* @__PURE__ */ d("div", {
|
|
2150
|
+
className: $.thread,
|
|
2137
2151
|
ref: a,
|
|
2138
2152
|
role: "log",
|
|
2139
2153
|
"aria-live": "polite",
|
|
2140
2154
|
children: t
|
|
2141
2155
|
}),
|
|
2142
|
-
n && /* @__PURE__ */
|
|
2143
|
-
className:
|
|
2156
|
+
n && /* @__PURE__ */ d("div", {
|
|
2157
|
+
className: $.footer,
|
|
2144
2158
|
children: n
|
|
2145
2159
|
}),
|
|
2146
|
-
r !== !1 && r && /* @__PURE__ */
|
|
2147
|
-
className:
|
|
2160
|
+
r !== !1 && r && /* @__PURE__ */ d("div", {
|
|
2161
|
+
className: $.hints,
|
|
2148
2162
|
children: r
|
|
2149
2163
|
})
|
|
2150
2164
|
]
|
|
@@ -2153,33 +2167,33 @@ function bt({ header: e, children: t, composer: n, hints: r = yt, className: i =
|
|
|
2153
2167
|
//#endregion
|
|
2154
2168
|
//#region src/components/Chat/Message.tsx
|
|
2155
2169
|
function xt({ children: e, className: t = "" }) {
|
|
2156
|
-
return /* @__PURE__ */
|
|
2157
|
-
className:
|
|
2158
|
-
children: /* @__PURE__ */
|
|
2159
|
-
className: `${
|
|
2170
|
+
return /* @__PURE__ */ d("div", {
|
|
2171
|
+
className: $.userRow,
|
|
2172
|
+
children: /* @__PURE__ */ d("div", {
|
|
2173
|
+
className: `${$.userMsg} ${t}`,
|
|
2160
2174
|
children: e
|
|
2161
2175
|
})
|
|
2162
2176
|
});
|
|
2163
2177
|
}
|
|
2164
2178
|
function St({ label: e = "Assistant", icon: t, children: n, className: r = "" }) {
|
|
2165
|
-
return /* @__PURE__ */
|
|
2166
|
-
className: `${
|
|
2167
|
-
children: [/* @__PURE__ */
|
|
2168
|
-
className:
|
|
2169
|
-
children: [t === void 0 ? /* @__PURE__ */
|
|
2179
|
+
return /* @__PURE__ */ f("div", {
|
|
2180
|
+
className: `${$.assistant} ${r}`,
|
|
2181
|
+
children: [/* @__PURE__ */ f("div", {
|
|
2182
|
+
className: $.assistantHead,
|
|
2183
|
+
children: [t === void 0 ? /* @__PURE__ */ d(p, {
|
|
2170
2184
|
color: "currentColor",
|
|
2171
2185
|
size: 14
|
|
2172
|
-
}) : t, /* @__PURE__ */
|
|
2173
|
-
}), /* @__PURE__ */
|
|
2174
|
-
className:
|
|
2186
|
+
}) : t, /* @__PURE__ */ d("span", { children: e })]
|
|
2187
|
+
}), /* @__PURE__ */ d("div", {
|
|
2188
|
+
className: $.assistantBody,
|
|
2175
2189
|
children: n
|
|
2176
2190
|
})]
|
|
2177
2191
|
});
|
|
2178
2192
|
}
|
|
2179
2193
|
//#endregion
|
|
2180
2194
|
//#region src/components/Chat/Composer.tsx
|
|
2181
|
-
var Ct = 18, wt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onStop: a, streaming:
|
|
2182
|
-
let x =
|
|
2195
|
+
var Ct = 18, wt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onStop: a, streaming: s = !1, placeholder: l = "Ask a question…", disabled: u = !1, autoFocus: h = !1, icon: g, maxLines: _ = 6, className: v = "", "aria-label": y = "Message" }, b) {
|
|
2196
|
+
let x = c(null);
|
|
2183
2197
|
o(b, () => ({ focus: () => x.current?.focus() }), []), i(() => {
|
|
2184
2198
|
let e = x.current;
|
|
2185
2199
|
if (!e) return;
|
|
@@ -2187,53 +2201,53 @@ var Ct = 18, wt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
2187
2201
|
let t = Ct * _ + 12;
|
|
2188
2202
|
e.style.height = `${Math.min(e.scrollHeight, t)}px`;
|
|
2189
2203
|
}, [e, _]);
|
|
2190
|
-
let S = !
|
|
2204
|
+
let S = !s && !u && e.trim().length > 0, C = r(() => {
|
|
2191
2205
|
S && n(e.trim());
|
|
2192
2206
|
}, [
|
|
2193
2207
|
S,
|
|
2194
2208
|
n,
|
|
2195
2209
|
e
|
|
2196
2210
|
]);
|
|
2197
|
-
return /* @__PURE__ */
|
|
2198
|
-
className: `${
|
|
2199
|
-
children: [/* @__PURE__ */
|
|
2200
|
-
className:
|
|
2201
|
-
children: [g !== null && /* @__PURE__ */
|
|
2202
|
-
className:
|
|
2211
|
+
return /* @__PURE__ */ f("div", {
|
|
2212
|
+
className: `${$.composer} ${v}`,
|
|
2213
|
+
children: [/* @__PURE__ */ f("div", {
|
|
2214
|
+
className: $.composerField,
|
|
2215
|
+
children: [g !== null && /* @__PURE__ */ d("span", {
|
|
2216
|
+
className: $.composerIcon,
|
|
2203
2217
|
"aria-hidden": "true",
|
|
2204
|
-
children: g === void 0 ? /* @__PURE__ */
|
|
2218
|
+
children: g === void 0 ? /* @__PURE__ */ d(p, {
|
|
2205
2219
|
color: "currentColor",
|
|
2206
2220
|
size: 21
|
|
2207
2221
|
}) : g
|
|
2208
|
-
}), /* @__PURE__ */
|
|
2222
|
+
}), /* @__PURE__ */ d("textarea", {
|
|
2209
2223
|
ref: x,
|
|
2210
|
-
className:
|
|
2224
|
+
className: $.composerInput,
|
|
2211
2225
|
rows: 1,
|
|
2212
2226
|
value: e,
|
|
2213
2227
|
placeholder: l,
|
|
2214
|
-
disabled:
|
|
2228
|
+
disabled: u,
|
|
2215
2229
|
autoFocus: h,
|
|
2216
2230
|
"aria-label": y,
|
|
2217
2231
|
onChange: (e) => t(e.target.value),
|
|
2218
2232
|
onKeyDown: (e) => {
|
|
2219
|
-
e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(),
|
|
2233
|
+
e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(), C());
|
|
2220
2234
|
}
|
|
2221
2235
|
})]
|
|
2222
|
-
}), /* @__PURE__ */
|
|
2223
|
-
className:
|
|
2224
|
-
children:
|
|
2236
|
+
}), /* @__PURE__ */ d("div", {
|
|
2237
|
+
className: $.composerButton,
|
|
2238
|
+
children: s ? /* @__PURE__ */ d(N, {
|
|
2225
2239
|
variant: "secondary",
|
|
2226
2240
|
size: "micro",
|
|
2227
2241
|
"aria-label": "Stop",
|
|
2228
|
-
iconLeft: /* @__PURE__ */
|
|
2242
|
+
iconLeft: /* @__PURE__ */ d(w, {}),
|
|
2229
2243
|
onClick: a
|
|
2230
|
-
}) : /* @__PURE__ */
|
|
2244
|
+
}) : /* @__PURE__ */ d(N, {
|
|
2231
2245
|
variant: "primary",
|
|
2232
2246
|
size: "micro",
|
|
2233
2247
|
"aria-label": "Send",
|
|
2234
|
-
iconLeft: /* @__PURE__ */
|
|
2248
|
+
iconLeft: /* @__PURE__ */ d(m, {}),
|
|
2235
2249
|
disabled: !S,
|
|
2236
|
-
onClick:
|
|
2250
|
+
onClick: C
|
|
2237
2251
|
})
|
|
2238
2252
|
})]
|
|
2239
2253
|
});
|
|
@@ -2241,15 +2255,15 @@ var Ct = 18, wt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
2241
2255
|
//#endregion
|
|
2242
2256
|
//#region src/components/Chat/Citation.tsx
|
|
2243
2257
|
function Tt({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
2244
|
-
let a = `${
|
|
2245
|
-
return t ? /* @__PURE__ */
|
|
2258
|
+
let a = `${$.ref} ${i}`;
|
|
2259
|
+
return t ? /* @__PURE__ */ d("a", {
|
|
2246
2260
|
href: t,
|
|
2247
2261
|
className: a,
|
|
2248
2262
|
onClick: n,
|
|
2249
2263
|
title: r,
|
|
2250
2264
|
"aria-label": `Source ${e}${r ? `: ${r}` : ""}`,
|
|
2251
2265
|
children: e
|
|
2252
|
-
}) : /* @__PURE__ */
|
|
2266
|
+
}) : /* @__PURE__ */ d("button", {
|
|
2253
2267
|
type: "button",
|
|
2254
2268
|
className: a,
|
|
2255
2269
|
onClick: n,
|
|
@@ -2259,33 +2273,33 @@ function Tt({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
|
2259
2273
|
});
|
|
2260
2274
|
}
|
|
2261
2275
|
function Et({ items: e, label: t = "Sources", className: n = "" }) {
|
|
2262
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
2263
|
-
className: `${
|
|
2264
|
-
children: [/* @__PURE__ */
|
|
2265
|
-
className:
|
|
2276
|
+
return e.length === 0 ? null : /* @__PURE__ */ f("div", {
|
|
2277
|
+
className: `${$.stack} ${n}`,
|
|
2278
|
+
children: [/* @__PURE__ */ d("div", {
|
|
2279
|
+
className: $.label,
|
|
2266
2280
|
children: t
|
|
2267
|
-
}), /* @__PURE__ */
|
|
2268
|
-
className:
|
|
2281
|
+
}), /* @__PURE__ */ d("div", {
|
|
2282
|
+
className: $.wrap,
|
|
2269
2283
|
children: e.map((e) => {
|
|
2270
|
-
let t = /* @__PURE__ */
|
|
2284
|
+
let t = /* @__PURE__ */ f(Fe, {
|
|
2271
2285
|
icon: e.icon,
|
|
2272
2286
|
children: [
|
|
2273
|
-
/* @__PURE__ */
|
|
2274
|
-
className:
|
|
2287
|
+
/* @__PURE__ */ d("span", {
|
|
2288
|
+
className: $.citationNumber,
|
|
2275
2289
|
children: e.n
|
|
2276
2290
|
}),
|
|
2277
2291
|
" ",
|
|
2278
2292
|
e.title
|
|
2279
2293
|
]
|
|
2280
2294
|
});
|
|
2281
|
-
return e.href ? /* @__PURE__ */
|
|
2295
|
+
return e.href ? /* @__PURE__ */ d("a", {
|
|
2282
2296
|
href: e.href,
|
|
2283
|
-
className:
|
|
2297
|
+
className: $.citationLink,
|
|
2284
2298
|
onClick: e.onClick,
|
|
2285
2299
|
children: t
|
|
2286
|
-
}, e.n) : /* @__PURE__ */
|
|
2300
|
+
}, e.n) : /* @__PURE__ */ d("button", {
|
|
2287
2301
|
type: "button",
|
|
2288
|
-
className:
|
|
2302
|
+
className: $.citationLink,
|
|
2289
2303
|
onClick: e.onClick,
|
|
2290
2304
|
children: t
|
|
2291
2305
|
}, e.n);
|
|
@@ -2296,26 +2310,26 @@ function Et({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
2296
2310
|
//#endregion
|
|
2297
2311
|
//#region src/components/Chat/StreamStatus.tsx
|
|
2298
2312
|
function Dt({ children: e, className: t = "" }) {
|
|
2299
|
-
return /* @__PURE__ */
|
|
2300
|
-
className: `${
|
|
2313
|
+
return /* @__PURE__ */ f("div", {
|
|
2314
|
+
className: `${$.status} ${t}`,
|
|
2301
2315
|
role: "status",
|
|
2302
|
-
children: [/* @__PURE__ */
|
|
2303
|
-
className:
|
|
2304
|
-
children: /* @__PURE__ */
|
|
2305
|
-
}), /* @__PURE__ */
|
|
2316
|
+
children: [/* @__PURE__ */ d("span", {
|
|
2317
|
+
className: $.statusSpinner,
|
|
2318
|
+
children: /* @__PURE__ */ d(ie, { size: 14 })
|
|
2319
|
+
}), /* @__PURE__ */ d("span", { children: e })]
|
|
2306
2320
|
});
|
|
2307
2321
|
}
|
|
2308
2322
|
//#endregion
|
|
2309
2323
|
//#region src/components/Chat/Suggestions.tsx
|
|
2310
2324
|
function Ot({ items: e, onPick: t, label: n = "Try asking", className: r = "" }) {
|
|
2311
|
-
return /* @__PURE__ */
|
|
2312
|
-
className: `${
|
|
2313
|
-
children: [/* @__PURE__ */
|
|
2314
|
-
className:
|
|
2325
|
+
return /* @__PURE__ */ f("div", {
|
|
2326
|
+
className: `${$.suggestions} ${r}`,
|
|
2327
|
+
children: [/* @__PURE__ */ d("div", {
|
|
2328
|
+
className: $.label,
|
|
2315
2329
|
children: n
|
|
2316
|
-
}), /* @__PURE__ */
|
|
2317
|
-
className:
|
|
2318
|
-
children: e.map((e) => /* @__PURE__ */
|
|
2330
|
+
}), /* @__PURE__ */ d("div", {
|
|
2331
|
+
className: $.wrap,
|
|
2332
|
+
children: e.map((e) => /* @__PURE__ */ d(N, {
|
|
2319
2333
|
variant: "secondary",
|
|
2320
2334
|
size: "micro",
|
|
2321
2335
|
onClick: () => t(e),
|
|
@@ -2327,21 +2341,21 @@ function Ot({ items: e, onPick: t, label: n = "Try asking", className: r = "" })
|
|
|
2327
2341
|
//#endregion
|
|
2328
2342
|
//#region src/components/Chat/AnswerActions.tsx
|
|
2329
2343
|
function kt({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask a follow-up", className: i = "" }) {
|
|
2330
|
-
return /* @__PURE__ */
|
|
2331
|
-
className: `${
|
|
2344
|
+
return /* @__PURE__ */ f("div", {
|
|
2345
|
+
className: `${$.actions} ${i}`,
|
|
2332
2346
|
children: [
|
|
2333
|
-
e && /* @__PURE__ */
|
|
2347
|
+
e && /* @__PURE__ */ d(N, {
|
|
2334
2348
|
variant: "ghost",
|
|
2335
2349
|
size: "micro",
|
|
2336
|
-
iconLeft:
|
|
2350
|
+
iconLeft: d(t ? h : y, {}),
|
|
2337
2351
|
onClick: e,
|
|
2338
2352
|
children: t ? "Copied" : "Copy"
|
|
2339
2353
|
}),
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
n && /* @__PURE__ */
|
|
2354
|
+
/* @__PURE__ */ d("span", { className: $.actionsSpacer }),
|
|
2355
|
+
n && /* @__PURE__ */ d(N, {
|
|
2342
2356
|
variant: "ghost",
|
|
2343
2357
|
size: "micro",
|
|
2344
|
-
iconRight: /* @__PURE__ */
|
|
2358
|
+
iconRight: /* @__PURE__ */ d(v, {}),
|
|
2345
2359
|
onClick: n,
|
|
2346
2360
|
children: r
|
|
2347
2361
|
})
|
|
@@ -2356,13 +2370,13 @@ var At = {
|
|
|
2356
2370
|
//#region src/components/Truncate/Truncate.tsx
|
|
2357
2371
|
function jt({ children: e, side: t = "end", title: n, className: r = "" }) {
|
|
2358
2372
|
let i = n ?? (typeof e == "string" ? e : void 0);
|
|
2359
|
-
return /* @__PURE__ */
|
|
2373
|
+
return /* @__PURE__ */ d("span", {
|
|
2360
2374
|
className: `${At.truncate} ${t === "start" ? At.start : ""} ${r}`,
|
|
2361
2375
|
title: i,
|
|
2362
|
-
children: t === "start" ? /* @__PURE__ */
|
|
2376
|
+
children: t === "start" ? /* @__PURE__ */ d("bdi", { children: e }) : e
|
|
2363
2377
|
});
|
|
2364
2378
|
}
|
|
2365
|
-
var
|
|
2379
|
+
var Mt = {
|
|
2366
2380
|
disclosure: "_disclosure_94bgy_1",
|
|
2367
2381
|
trigger: "_trigger_94bgy_7",
|
|
2368
2382
|
summary: "_summary_94bgy_31",
|
|
@@ -2371,36 +2385,84 @@ var $ = {
|
|
|
2371
2385
|
};
|
|
2372
2386
|
//#endregion
|
|
2373
2387
|
//#region src/components/Disclosure/Disclosure.tsx
|
|
2374
|
-
function
|
|
2375
|
-
let [s, c] = e.useState(i), l = r ?? s,
|
|
2376
|
-
return /* @__PURE__ */
|
|
2377
|
-
className: `${
|
|
2388
|
+
function Nt({ summary: t, children: n, open: r, defaultOpen: i = !1, onOpenChange: a, className: o = "" }) {
|
|
2389
|
+
let [s, c] = e.useState(i), l = r ?? s, u = e.useId();
|
|
2390
|
+
return /* @__PURE__ */ f("div", {
|
|
2391
|
+
className: `${Mt.disclosure} ${o}`,
|
|
2378
2392
|
"data-state": l ? "open" : "closed",
|
|
2379
|
-
children: [/* @__PURE__ */
|
|
2393
|
+
children: [/* @__PURE__ */ f("button", {
|
|
2380
2394
|
type: "button",
|
|
2381
|
-
className:
|
|
2395
|
+
className: Mt.trigger,
|
|
2382
2396
|
"aria-expanded": l,
|
|
2383
|
-
"aria-controls": l ?
|
|
2397
|
+
"aria-controls": l ? u : void 0,
|
|
2384
2398
|
onClick: () => {
|
|
2385
2399
|
r === void 0 && c(!l), a?.(!l);
|
|
2386
2400
|
},
|
|
2387
|
-
children: [/* @__PURE__ */
|
|
2388
|
-
className:
|
|
2401
|
+
children: [/* @__PURE__ */ d("span", {
|
|
2402
|
+
className: Mt.summary,
|
|
2389
2403
|
children: t
|
|
2390
|
-
}), /* @__PURE__ */
|
|
2391
|
-
className:
|
|
2404
|
+
}), /* @__PURE__ */ d("span", {
|
|
2405
|
+
className: Mt.chevron,
|
|
2392
2406
|
"aria-hidden": "true",
|
|
2393
|
-
children:
|
|
2407
|
+
children: d(l ? g : v, {
|
|
2394
2408
|
size: 14,
|
|
2395
2409
|
color: "currentColor"
|
|
2396
2410
|
})
|
|
2397
2411
|
})]
|
|
2398
|
-
}), l && /* @__PURE__ */
|
|
2399
|
-
id:
|
|
2400
|
-
className:
|
|
2412
|
+
}), l && /* @__PURE__ */ d("div", {
|
|
2413
|
+
id: u,
|
|
2414
|
+
className: Mt.content,
|
|
2401
2415
|
children: n
|
|
2402
2416
|
})]
|
|
2403
2417
|
});
|
|
2404
2418
|
}
|
|
2419
|
+
var Pt = {
|
|
2420
|
+
field: "_field_5juos_1",
|
|
2421
|
+
code: "_code_5juos_16",
|
|
2422
|
+
status: "_status_5juos_31"
|
|
2423
|
+
};
|
|
2424
|
+
//#endregion
|
|
2425
|
+
//#region src/components/CodeCopy/CodeCopy.tsx
|
|
2426
|
+
async function Ft(e) {
|
|
2427
|
+
if (navigator.clipboard && window.isSecureContext) try {
|
|
2428
|
+
return await navigator.clipboard.writeText(e), !0;
|
|
2429
|
+
} catch {}
|
|
2430
|
+
let t = document.createElement("textarea");
|
|
2431
|
+
t.value = e, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.left = "-9999px", document.body.appendChild(t), t.select();
|
|
2432
|
+
try {
|
|
2433
|
+
return document.execCommand("copy");
|
|
2434
|
+
} catch {
|
|
2435
|
+
return !1;
|
|
2436
|
+
} finally {
|
|
2437
|
+
t.remove();
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
function It({ code: e, className: t, onCopy: n }) {
|
|
2441
|
+
let [r, a] = l(!1), o = c(void 0);
|
|
2442
|
+
return i(() => () => clearTimeout(o.current), []), /* @__PURE__ */ f("div", {
|
|
2443
|
+
className: [Pt.field, t].filter(Boolean).join(" "),
|
|
2444
|
+
children: [
|
|
2445
|
+
/* @__PURE__ */ d("code", {
|
|
2446
|
+
className: Pt.code,
|
|
2447
|
+
children: e
|
|
2448
|
+
}),
|
|
2449
|
+
/* @__PURE__ */ d(N, {
|
|
2450
|
+
size: "micro",
|
|
2451
|
+
variant: "ghost",
|
|
2452
|
+
iconLeft: d(r ? h : y, {}),
|
|
2453
|
+
onClick: async () => {
|
|
2454
|
+
await Ft(e) && (a(!0), n?.(), clearTimeout(o.current), o.current = setTimeout(() => a(!1), 2e3));
|
|
2455
|
+
},
|
|
2456
|
+
"aria-label": r ? "Copied" : "Copy",
|
|
2457
|
+
title: r ? "Copied" : "Copy"
|
|
2458
|
+
}),
|
|
2459
|
+
/* @__PURE__ */ d("span", {
|
|
2460
|
+
className: Pt.status,
|
|
2461
|
+
role: "status",
|
|
2462
|
+
children: r ? "Copied" : ""
|
|
2463
|
+
})
|
|
2464
|
+
]
|
|
2465
|
+
});
|
|
2466
|
+
}
|
|
2405
2467
|
//#endregion
|
|
2406
|
-
export { Re as Alert, Be as AlertDescription, ze as AlertTitle, kt as AnswerActions, St as AssistantMessage, se as Base, je as Breadcrumbs,
|
|
2468
|
+
export { Re as Alert, Be as AlertDescription, ze as AlertTitle, kt as AnswerActions, St as AssistantMessage, se as Base, je as Breadcrumbs, N as Button, Xe as Chart, bt as ChatPanel, ae as Checkbox, Fe as Chip, Et as CitationList, Tt as CitationRef, It as CodeCopy, wt as Composer, st as DatePicker, Nt as Disclosure, ce as FilterPanelBase, de as InputField, vt as Kbd, tt as Modal, dt as NavigationMenu, gt as NavigationMenuContent, pt as NavigationMenuItem, _t as NavigationMenuLink, ft as NavigationMenuList, ht as NavigationMenuTrigger, ye as Popover, Ne as ProgressBar, fe as RadioButton, He as SaveBar, ue as SearchField, _e as Select, ge as Slider, Qe as Sparkline, ie as Spinner, Dt as StreamStatus, Ot as Suggestions, be as Table, Ce as TableCell, xe as TableHeader, Te as TableIcon, Se as TableRow, we as TableValue, Oe as Tabs, et as Textarea, me as ToggleSwitch, We as Tooltip, jt as Truncate, xt as UserMessage, yt as defaultChatHints, re as spinnerNames };
|