@indxsearch/systm 2.14.1 → 2.16.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 +17 -0
- package/dist/components/Chart/Chart.d.ts +11 -1
- package/dist/components/Slider/Slider.d.ts +2 -0
- package/dist/components/Sparkline/Sparkline.d.ts +40 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +594 -479
- package/dist/systm.css +1 -1
- package/package.json +8 -9
package/dist/index.es.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as O from "@radix-ui/react-popover";
|
|
|
7
7
|
import * as k from "@radix-ui/react-tooltip";
|
|
8
8
|
import * as A from "@radix-ui/react-dialog";
|
|
9
9
|
import * as j from "@radix-ui/react-navigation-menu";
|
|
10
|
-
var
|
|
10
|
+
var ee = {
|
|
11
11
|
button: "_button_15lsu_1",
|
|
12
12
|
micro: "_micro_15lsu_29",
|
|
13
13
|
default: "_default_15lsu_37",
|
|
@@ -15,10 +15,10 @@ var M = {
|
|
|
15
15
|
primary: "_primary_15lsu_54",
|
|
16
16
|
secondary: "_secondary_15lsu_64",
|
|
17
17
|
ghost: "_ghost_15lsu_74"
|
|
18
|
-
},
|
|
18
|
+
}, te = {
|
|
19
19
|
spinner: "_spinner_wspyi_1",
|
|
20
20
|
frame: "_frame_wspyi_8"
|
|
21
|
-
},
|
|
21
|
+
}, ne = {
|
|
22
22
|
accelerate: {
|
|
23
23
|
viewBox: "0 0 7 5",
|
|
24
24
|
delay: 50,
|
|
@@ -279,13 +279,13 @@ var M = {
|
|
|
279
279
|
"M3 4H4V5H3V4Z M5 3H6V4H5V3Z M6 1H7V2H6V1Z M1 3H2V4H1V3Z M0 1H1V2H0V1Z M2 2H5V3H2V2Z M1 0H6V1H1V0Z"
|
|
280
280
|
]
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, re = Object.keys(ne);
|
|
283
283
|
//#endregion
|
|
284
284
|
//#region src/components/Spinner/Spinner.tsx
|
|
285
|
-
function
|
|
286
|
-
let o =
|
|
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, d = typeof t == "number" ? t * l : `calc(${t} * ${l})`, f = r ?? o.delay, p = o.frames.length, m = p * f;
|
|
287
287
|
return /* @__PURE__ */ u("svg", {
|
|
288
|
-
className: `${
|
|
288
|
+
className: `${te.spinner} ${i}`,
|
|
289
289
|
width: t,
|
|
290
290
|
height: d,
|
|
291
291
|
viewBox: o.viewBox,
|
|
@@ -294,7 +294,7 @@ function N({ name: e = ne[0], size: t = 21, color: n = "currentColor", delay: r,
|
|
|
294
294
|
"aria-label": a,
|
|
295
295
|
xmlns: "http://www.w3.org/2000/svg",
|
|
296
296
|
children: o.frames.map((e, t) => e ? /* @__PURE__ */ u("path", {
|
|
297
|
-
className:
|
|
297
|
+
className: te.frame,
|
|
298
298
|
d: e,
|
|
299
299
|
fill: n,
|
|
300
300
|
style: {
|
|
@@ -306,15 +306,15 @@ function N({ name: e = ne[0], size: t = 21, color: n = "currentColor", delay: r,
|
|
|
306
306
|
}
|
|
307
307
|
//#endregion
|
|
308
308
|
//#region src/components/Button/Button.tsx
|
|
309
|
-
function
|
|
309
|
+
function M(t) {
|
|
310
310
|
let { size: n = "default", variant: r = "primary", iconLeft: i, iconRight: a, className: o, children: s, loading: c = !1, ...f } = t, p = t.disabled || c, { href: m } = f, h = n === "micro" ? "14px" : n === "large" ? "21px" : "14px", g = n === "large" ? 21 : 14, _ = [
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
311
|
+
ee.button,
|
|
312
|
+
ee[n],
|
|
313
|
+
ee[r],
|
|
314
314
|
p ? "cursor-not-allowed" : "cursor-pointer",
|
|
315
315
|
o
|
|
316
316
|
].filter(Boolean).join(" "), v = /* @__PURE__ */ d(l, { children: [
|
|
317
|
-
c ? /* @__PURE__ */ u(
|
|
317
|
+
c ? /* @__PURE__ */ u(ie, { size: g }) : i && e.cloneElement(i, {
|
|
318
318
|
size: h,
|
|
319
319
|
color: "currentColor"
|
|
320
320
|
}),
|
|
@@ -355,57 +355,57 @@ function P(t) {
|
|
|
355
355
|
children: v
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
var
|
|
358
|
+
var N = {
|
|
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
365
|
let s = e.useId(), c = i || s, l = n ? `${c}-score` : void 0, f = o.disabled;
|
|
366
366
|
return t || n ? /* @__PURE__ */ d("label", {
|
|
367
367
|
htmlFor: c,
|
|
368
|
-
className: `${
|
|
368
|
+
className: `${N.checkboxWrapper} ${r} ${f ? N.disabled : ""} ${f ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
369
369
|
children: [
|
|
370
370
|
/* @__PURE__ */ u("input", {
|
|
371
371
|
id: c,
|
|
372
372
|
type: "checkbox",
|
|
373
|
-
className:
|
|
373
|
+
className: N.checkbox,
|
|
374
374
|
"aria-describedby": l,
|
|
375
375
|
"aria-label": a,
|
|
376
376
|
...o
|
|
377
377
|
}),
|
|
378
378
|
t && /* @__PURE__ */ u("span", {
|
|
379
|
-
className:
|
|
379
|
+
className: N.label,
|
|
380
380
|
children: t
|
|
381
381
|
}),
|
|
382
382
|
n && /* @__PURE__ */ u("span", {
|
|
383
383
|
id: l,
|
|
384
|
-
className:
|
|
384
|
+
className: N.score,
|
|
385
385
|
children: n
|
|
386
386
|
})
|
|
387
387
|
]
|
|
388
388
|
}) : /* @__PURE__ */ u("input", {
|
|
389
389
|
id: c,
|
|
390
390
|
type: "checkbox",
|
|
391
|
-
className: `${
|
|
391
|
+
className: `${N.checkbox} ${r}`,
|
|
392
392
|
"aria-label": a,
|
|
393
393
|
disabled: f,
|
|
394
394
|
...o
|
|
395
395
|
});
|
|
396
|
-
},
|
|
396
|
+
}, oe = {
|
|
397
397
|
container: "_container_dlzj1_1",
|
|
398
398
|
default: "_default_dlzj1_5"
|
|
399
399
|
};
|
|
400
400
|
//#endregion
|
|
401
401
|
//#region src/components/Base/Base.tsx
|
|
402
|
-
function
|
|
402
|
+
function se({ children: e, className: t }) {
|
|
403
403
|
return /* @__PURE__ */ u("div", {
|
|
404
|
-
className: `${
|
|
404
|
+
className: `${oe.container} ${oe.default} ${t || ""}`,
|
|
405
405
|
children: e
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
|
-
var
|
|
408
|
+
var P = {
|
|
409
409
|
container: "_container_10bfq_1",
|
|
410
410
|
header: "_header_10bfq_11",
|
|
411
411
|
title: "_title_10bfq_31",
|
|
@@ -414,15 +414,15 @@ var I = {
|
|
|
414
414
|
};
|
|
415
415
|
//#endregion
|
|
416
416
|
//#region src/components/FilterPanelBase/FilterPanelBase.tsx
|
|
417
|
-
function
|
|
417
|
+
function ce({ title: t, children: n, className: r = "", collapsible: a = !0, collapsed: o = !1 }) {
|
|
418
418
|
let [s, l] = c(() => !o), f = e.useId();
|
|
419
419
|
return i(() => {
|
|
420
420
|
a && l(!o);
|
|
421
421
|
}, [o, a]), /* @__PURE__ */ d("div", {
|
|
422
|
-
className: `${
|
|
422
|
+
className: `${P.container} ${r}`,
|
|
423
423
|
children: [t && (a ? /* @__PURE__ */ d("button", {
|
|
424
424
|
type: "button",
|
|
425
|
-
className:
|
|
425
|
+
className: P.header,
|
|
426
426
|
onClick: () => {
|
|
427
427
|
a && l((e) => !e);
|
|
428
428
|
},
|
|
@@ -430,7 +430,7 @@ function oe({ title: t, children: n, className: r = "", collapsible: a = !0, col
|
|
|
430
430
|
"aria-expanded": s,
|
|
431
431
|
"aria-controls": f,
|
|
432
432
|
children: [/* @__PURE__ */ u("div", {
|
|
433
|
-
className:
|
|
433
|
+
className: P.title,
|
|
434
434
|
children: t
|
|
435
435
|
}), /* @__PURE__ */ u("span", {
|
|
436
436
|
"aria-hidden": "true",
|
|
@@ -440,21 +440,21 @@ function oe({ title: t, children: n, className: r = "", collapsible: a = !0, col
|
|
|
440
440
|
})
|
|
441
441
|
})]
|
|
442
442
|
}) : /* @__PURE__ */ u("div", {
|
|
443
|
-
className:
|
|
443
|
+
className: P.header,
|
|
444
444
|
children: /* @__PURE__ */ u("div", {
|
|
445
|
-
className:
|
|
445
|
+
className: P.title,
|
|
446
446
|
children: t
|
|
447
447
|
})
|
|
448
448
|
})), (!a || s) && /* @__PURE__ */ u("div", {
|
|
449
449
|
id: f,
|
|
450
|
-
className:
|
|
450
|
+
className: P.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
|
|
457
|
+
var F = {
|
|
458
458
|
wrapper: "_wrapper_tf1yl_1",
|
|
459
459
|
label: "_label_tf1yl_7",
|
|
460
460
|
inputContainer: "_inputContainer_tf1yl_12",
|
|
@@ -466,27 +466,27 @@ var L = {
|
|
|
466
466
|
sizeDefault: "_sizeDefault_tf1yl_87",
|
|
467
467
|
error: "_error_tf1yl_110",
|
|
468
468
|
errorText: "_errorText_tf1yl_114"
|
|
469
|
-
},
|
|
469
|
+
}, le = {
|
|
470
470
|
micro: 14,
|
|
471
471
|
default: 21
|
|
472
472
|
};
|
|
473
|
-
function
|
|
474
|
-
let g = s(null), _ = e.useId(), v = p || _, y = `${v}-error`, b =
|
|
473
|
+
function ue({ label: t, error: n, className: r = "", showSearchIcon: i = !0, searchIcon: a, searchIconColor: o, inputSize: c = "default", showFocusBorder: l = !1, children: f, id: p, type: m = "search", ...h }) {
|
|
474
|
+
let g = s(null), _ = e.useId(), v = p || _, y = `${v}-error`, b = le[c], x = {};
|
|
475
475
|
o && (x["--search-icon-color"] = o);
|
|
476
|
-
let C = a ?? /* @__PURE__ */ u(S, {}), w = c === "micro" ?
|
|
476
|
+
let C = a ?? /* @__PURE__ */ u(S, {}), w = c === "micro" ? F.sizeMicro : F.sizeDefault;
|
|
477
477
|
return /* @__PURE__ */ d("div", {
|
|
478
|
-
className: `${
|
|
478
|
+
className: `${F.wrapper} ${r}`,
|
|
479
479
|
children: [
|
|
480
480
|
t && /* @__PURE__ */ u("label", {
|
|
481
481
|
htmlFor: v,
|
|
482
|
-
className:
|
|
482
|
+
className: F.label,
|
|
483
483
|
children: t
|
|
484
484
|
}),
|
|
485
485
|
/* @__PURE__ */ d("div", {
|
|
486
|
-
className: `${
|
|
486
|
+
className: `${F.inputContainer} ${w}`,
|
|
487
487
|
children: [
|
|
488
488
|
i && /* @__PURE__ */ u("span", {
|
|
489
|
-
className:
|
|
489
|
+
className: F.searchIcon,
|
|
490
490
|
"aria-hidden": "true",
|
|
491
491
|
children: e.cloneElement(C, {
|
|
492
492
|
size: b,
|
|
@@ -497,28 +497,28 @@ function ce({ label: t, error: n, className: r = "", showSearchIcon: i = !0, sea
|
|
|
497
497
|
ref: g,
|
|
498
498
|
id: v,
|
|
499
499
|
type: m,
|
|
500
|
-
className: `${
|
|
500
|
+
className: `${F.input} ${l ? F.focus : ""} ${n ? F.error : ""}`,
|
|
501
501
|
style: x,
|
|
502
502
|
"aria-invalid": n ? "true" : "false",
|
|
503
503
|
"aria-describedby": n ? y : void 0,
|
|
504
504
|
...h
|
|
505
505
|
}),
|
|
506
506
|
f && /* @__PURE__ */ u("div", {
|
|
507
|
-
className:
|
|
507
|
+
className: F.rightContent,
|
|
508
508
|
children: f
|
|
509
509
|
})
|
|
510
510
|
]
|
|
511
511
|
}),
|
|
512
512
|
n && /* @__PURE__ */ u("span", {
|
|
513
513
|
id: y,
|
|
514
|
-
className:
|
|
514
|
+
className: F.errorText,
|
|
515
515
|
role: "alert",
|
|
516
516
|
children: n
|
|
517
517
|
})
|
|
518
518
|
]
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var I = {
|
|
522
522
|
wrapper: "_wrapper_roite_1",
|
|
523
523
|
label: "_label_roite_10",
|
|
524
524
|
input: "_input_roite_15",
|
|
@@ -528,14 +528,14 @@ var R = {
|
|
|
528
528
|
};
|
|
529
529
|
//#endregion
|
|
530
530
|
//#region src/components/InputField/InputField.tsx
|
|
531
|
-
function
|
|
531
|
+
function de({ label: t, error: n, className: r = "", isValid: i = !0, variant: a = "default", id: o, ...s }) {
|
|
532
532
|
let c = e.useId(), l = o || c, f = `${l}-error`, p = n || !i;
|
|
533
533
|
return /* @__PURE__ */ d("div", {
|
|
534
|
-
className: `${
|
|
534
|
+
className: `${I.wrapper} ${r}`,
|
|
535
535
|
children: [
|
|
536
536
|
t && /* @__PURE__ */ d("label", {
|
|
537
537
|
htmlFor: l,
|
|
538
|
-
className:
|
|
538
|
+
className: I.label,
|
|
539
539
|
children: [t, s.required && /* @__PURE__ */ u("span", {
|
|
540
540
|
"aria-label": "required",
|
|
541
541
|
children: " *"
|
|
@@ -543,29 +543,29 @@ function le({ label: t, error: n, className: r = "", isValid: i = !0, variant: a
|
|
|
543
543
|
}),
|
|
544
544
|
/* @__PURE__ */ u("input", {
|
|
545
545
|
id: l,
|
|
546
|
-
className: `${
|
|
546
|
+
className: `${I.input} ${a === "borderBottom" ? I.borderBottom : ""} ${p ? I.error : ""}`,
|
|
547
547
|
"aria-invalid": p ? "true" : "false",
|
|
548
548
|
"aria-describedby": n ? f : void 0,
|
|
549
549
|
...s
|
|
550
550
|
}),
|
|
551
551
|
n && /* @__PURE__ */ u("span", {
|
|
552
552
|
id: f,
|
|
553
|
-
className:
|
|
553
|
+
className: I.errorText,
|
|
554
554
|
role: "alert",
|
|
555
555
|
children: n
|
|
556
556
|
})
|
|
557
557
|
]
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var L = {
|
|
561
561
|
radioWrapper: "_radioWrapper_1faq0_1",
|
|
562
562
|
radioInput: "_radioInput_1faq0_9",
|
|
563
563
|
customRadio: "_customRadio_1faq0_23",
|
|
564
564
|
labelText: "_labelText_1faq0_57",
|
|
565
565
|
disabled: "_disabled_1faq0_63"
|
|
566
|
-
},
|
|
566
|
+
}, fe = ({ id: e, name: t, value: n, label: r, checked: i = !1, onChange: a, disabled: o = !1, "aria-label": s }) => /* @__PURE__ */ d("label", {
|
|
567
567
|
htmlFor: e,
|
|
568
|
-
className: `${
|
|
568
|
+
className: `${L.radioWrapper} ${o ? L.disabled : ""} ${o ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
569
569
|
children: [
|
|
570
570
|
/* @__PURE__ */ u("input", {
|
|
571
571
|
id: e,
|
|
@@ -576,24 +576,24 @@ var z = {
|
|
|
576
576
|
onChange: a,
|
|
577
577
|
disabled: o,
|
|
578
578
|
"aria-label": s,
|
|
579
|
-
className:
|
|
579
|
+
className: L.radioInput
|
|
580
580
|
}),
|
|
581
|
-
/* @__PURE__ */ u("span", { className:
|
|
581
|
+
/* @__PURE__ */ u("span", { className: L.customRadio }),
|
|
582
582
|
/* @__PURE__ */ u("span", {
|
|
583
|
-
className:
|
|
583
|
+
className: L.labelText,
|
|
584
584
|
children: r
|
|
585
585
|
})
|
|
586
586
|
]
|
|
587
|
-
}),
|
|
587
|
+
}), pe = {
|
|
588
588
|
switch: "_switch_1xsea_1",
|
|
589
589
|
slider: "_slider_1xsea_23",
|
|
590
590
|
label: "_label_1xsea_28",
|
|
591
591
|
disabled: "_disabled_1xsea_43"
|
|
592
|
-
},
|
|
592
|
+
}, me = ({ id: t, checked: n, onChange: r, disabled: i = !1, label: a, "aria-label": o }) => {
|
|
593
593
|
let s = e.useId(), c = t || s;
|
|
594
594
|
return /* @__PURE__ */ d("label", {
|
|
595
595
|
htmlFor: c,
|
|
596
|
-
className: `${
|
|
596
|
+
className: `${pe.switch} ${i ? pe.disabled : ""} ${i ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
597
597
|
children: [
|
|
598
598
|
/* @__PURE__ */ u("input", {
|
|
599
599
|
id: c,
|
|
@@ -606,90 +606,104 @@ var z = {
|
|
|
606
606
|
disabled: i
|
|
607
607
|
}),
|
|
608
608
|
/* @__PURE__ */ u("span", {
|
|
609
|
-
className:
|
|
609
|
+
className: pe.slider,
|
|
610
610
|
"aria-hidden": "true"
|
|
611
611
|
}),
|
|
612
612
|
a && /* @__PURE__ */ u("span", {
|
|
613
|
-
className:
|
|
613
|
+
className: pe.label,
|
|
614
614
|
children: a
|
|
615
615
|
})
|
|
616
616
|
]
|
|
617
617
|
});
|
|
618
|
-
},
|
|
619
|
-
label: "
|
|
620
|
-
basetrack: "
|
|
621
|
-
selectedtrack: "
|
|
622
|
-
livetrack: "
|
|
623
|
-
livetrackFaceted: "
|
|
624
|
-
livetrackDefault: "
|
|
625
|
-
thumbs: "
|
|
626
|
-
disabled: "
|
|
627
|
-
|
|
628
|
-
|
|
618
|
+
}, R = {
|
|
619
|
+
label: "_label_1o3ls_1",
|
|
620
|
+
basetrack: "_basetrack_1o3ls_8",
|
|
621
|
+
selectedtrack: "_selectedtrack_1o3ls_36",
|
|
622
|
+
livetrack: "_livetrack_1o3ls_43",
|
|
623
|
+
livetrackFaceted: "_livetrackFaceted_1o3ls_49",
|
|
624
|
+
livetrackDefault: "_livetrackDefault_1o3ls_52",
|
|
625
|
+
thumbs: "_thumbs_1o3ls_55",
|
|
626
|
+
disabled: "_disabled_1o3ls_89",
|
|
627
|
+
stepmarks: "_stepmarks_1o3ls_94",
|
|
628
|
+
stepmark: "_stepmark_1o3ls_94",
|
|
629
|
+
stepmarksInline: "_stepmarksInline_1o3ls_113",
|
|
630
|
+
stepmarksBelow: "_stepmarksBelow_1o3ls_120",
|
|
631
|
+
basetrackStepsBelow: "_basetrackStepsBelow_1o3ls_125"
|
|
632
|
+
}, 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: f = !0, stepMarks: p, onChange: m, onFinalChange: h, label: g, "aria-label": _, id: v } = t, y = e.useId(), b = v || y;
|
|
629
634
|
if (!(Number.isFinite(n) && Number.isFinite(r) && r > n)) return /* @__PURE__ */ d("div", {
|
|
630
635
|
className: o,
|
|
631
|
-
children: [
|
|
632
|
-
className:
|
|
633
|
-
children:
|
|
636
|
+
children: [g && /* @__PURE__ */ u("span", {
|
|
637
|
+
className: R.label,
|
|
638
|
+
children: g
|
|
634
639
|
}), /* @__PURE__ */ u("div", {
|
|
635
|
-
className: `${
|
|
640
|
+
className: `${R.basetrack} ${R.disabled}`,
|
|
636
641
|
"aria-hidden": "true"
|
|
637
642
|
})]
|
|
638
643
|
});
|
|
644
|
+
let x = i > 0 ? Math.round((r - n) / i) : 0, S = !!p && x > 0 && x <= he, C = S && p === "below" ? `${R.basetrack} ${R.basetrackStepsBelow}` : R.basetrack, w = S ? /* @__PURE__ */ u("div", {
|
|
645
|
+
className: `${R.stepmarks} ${p === "below" ? R.stepmarksBelow : R.stepmarksInline}`,
|
|
646
|
+
"aria-hidden": "true",
|
|
647
|
+
children: Array.from({ length: x + 1 }, (e, t) => /* @__PURE__ */ u("span", {
|
|
648
|
+
className: R.stepmark,
|
|
649
|
+
style: { left: `${Math.min(t * i, r - n) / (r - n) * 100}%` }
|
|
650
|
+
}, t))
|
|
651
|
+
}) : null;
|
|
639
652
|
if ("isRange" in t && t.isRange) {
|
|
640
|
-
let e = t.value, [f,
|
|
653
|
+
let e = t.value, [f, p] = e;
|
|
641
654
|
return /* @__PURE__ */ d("div", {
|
|
642
655
|
className: o,
|
|
643
|
-
children: [
|
|
644
|
-
htmlFor:
|
|
645
|
-
className:
|
|
646
|
-
children:
|
|
656
|
+
children: [g && /* @__PURE__ */ u("label", {
|
|
657
|
+
htmlFor: b,
|
|
658
|
+
className: R.label,
|
|
659
|
+
children: g
|
|
647
660
|
}), /* @__PURE__ */ u(E, {
|
|
648
661
|
step: i,
|
|
649
662
|
min: n,
|
|
650
663
|
max: r,
|
|
651
664
|
values: e,
|
|
652
|
-
onChange: (e) =>
|
|
653
|
-
onFinalChange: (e) =>
|
|
665
|
+
onChange: (e) => m(e),
|
|
666
|
+
onFinalChange: (e) => h?.(e),
|
|
654
667
|
disabled: a,
|
|
655
668
|
renderTrack: ({ props: e, children: t }) => {
|
|
656
|
-
let { key: i, ...a } = e, o = r - n,
|
|
657
|
-
return v && (
|
|
669
|
+
let { key: i, ...a } = e, o = r - n, m = (f - n) / o * 100, h = (p - f) / o * 100, g = 0, _ = 0, v = typeof s == "number" && typeof c == "number" && c > s && (s > n || c < r);
|
|
670
|
+
return v && (g = (s - n) / o * 100, _ = (c - s) / o * 100), /* @__PURE__ */ d("div", {
|
|
658
671
|
...a,
|
|
659
|
-
className:
|
|
672
|
+
className: C,
|
|
660
673
|
style: { ...a.style },
|
|
661
674
|
children: [
|
|
662
675
|
!v && /* @__PURE__ */ u("div", {
|
|
663
|
-
className:
|
|
676
|
+
className: R.selectedtrack,
|
|
664
677
|
style: {
|
|
665
|
-
left: `${
|
|
666
|
-
width: `${
|
|
678
|
+
left: `${m}%`,
|
|
679
|
+
width: `${h}%`,
|
|
667
680
|
zIndex: "1"
|
|
668
681
|
}
|
|
669
682
|
}),
|
|
670
683
|
v && /* @__PURE__ */ u("div", {
|
|
671
|
-
className: `${
|
|
684
|
+
className: `${R.livetrack} ${l ? R.livetrackFaceted : R.livetrackDefault}`,
|
|
672
685
|
style: {
|
|
673
|
-
left: `${
|
|
674
|
-
width: `${
|
|
686
|
+
left: `${g}%`,
|
|
687
|
+
width: `${_}%`,
|
|
675
688
|
zIndex: "2"
|
|
676
689
|
}
|
|
677
690
|
}),
|
|
691
|
+
w,
|
|
678
692
|
t
|
|
679
693
|
]
|
|
680
694
|
}, i);
|
|
681
695
|
},
|
|
682
696
|
renderThumb: ({ props: e, index: t }) => {
|
|
683
|
-
let { key: i, ...o } = e, s = t === 0 ? f :
|
|
697
|
+
let { key: i, ...o } = e, s = t === 0 ? f : p;
|
|
684
698
|
return /* @__PURE__ */ u("div", {
|
|
685
699
|
...o,
|
|
686
|
-
id: t === 0 ?
|
|
687
|
-
className: `${
|
|
700
|
+
id: t === 0 ? b : void 0,
|
|
701
|
+
className: `${R.thumbs} ${a ? R.disabled : ""} ${a ? "cursor-not-allowed" : "cursor-resize-col"}`,
|
|
688
702
|
style: {
|
|
689
703
|
...o.style,
|
|
690
704
|
zIndex: "3"
|
|
691
705
|
},
|
|
692
|
-
"aria-label":
|
|
706
|
+
"aria-label": _ || (t === 0 ? "Minimum value" : "Maximum value"),
|
|
693
707
|
"aria-valuemin": n,
|
|
694
708
|
"aria-valuemax": r,
|
|
695
709
|
"aria-valuenow": s
|
|
@@ -701,27 +715,27 @@ var z = {
|
|
|
701
715
|
let e = t.value;
|
|
702
716
|
return /* @__PURE__ */ d("div", {
|
|
703
717
|
className: o,
|
|
704
|
-
children: [
|
|
705
|
-
htmlFor:
|
|
706
|
-
className:
|
|
707
|
-
children:
|
|
718
|
+
children: [g && /* @__PURE__ */ u("label", {
|
|
719
|
+
htmlFor: b,
|
|
720
|
+
className: R.label,
|
|
721
|
+
children: g
|
|
708
722
|
}), /* @__PURE__ */ u(E, {
|
|
709
723
|
step: i,
|
|
710
724
|
min: n,
|
|
711
725
|
max: r,
|
|
712
726
|
values: [e],
|
|
713
|
-
onChange: (e) =>
|
|
714
|
-
onFinalChange: (e) =>
|
|
727
|
+
onChange: (e) => m(e[0]),
|
|
728
|
+
onFinalChange: (e) => h?.(e[0]),
|
|
715
729
|
disabled: a,
|
|
716
730
|
renderTrack: ({ props: t, children: i }) => {
|
|
717
731
|
let { key: a, ...o } = t, f = r - n, p = (e - n) / f * 100, m = 0, h = 0, g = typeof s == "number" && typeof c == "number" && c > s && (s > n || c < r);
|
|
718
732
|
return g && (m = (s - n) / f * 100, h = (c - s) / f * 100), /* @__PURE__ */ d("div", {
|
|
719
733
|
...o,
|
|
720
|
-
className:
|
|
734
|
+
className: C,
|
|
721
735
|
style: { ...o.style },
|
|
722
736
|
children: [
|
|
723
737
|
!g && /* @__PURE__ */ u("div", {
|
|
724
|
-
className:
|
|
738
|
+
className: R.selectedtrack,
|
|
725
739
|
style: {
|
|
726
740
|
left: "0%",
|
|
727
741
|
width: `${p}%`,
|
|
@@ -729,13 +743,14 @@ var z = {
|
|
|
729
743
|
}
|
|
730
744
|
}),
|
|
731
745
|
g && /* @__PURE__ */ u("div", {
|
|
732
|
-
className: `${
|
|
746
|
+
className: `${R.livetrack} ${l ? R.livetrackFaceted : R.livetrackDefault}`,
|
|
733
747
|
style: {
|
|
734
748
|
left: `${m}%`,
|
|
735
749
|
width: `${h}%`,
|
|
736
750
|
zIndex: "2"
|
|
737
751
|
}
|
|
738
752
|
}),
|
|
753
|
+
w,
|
|
739
754
|
i
|
|
740
755
|
]
|
|
741
756
|
}, a);
|
|
@@ -744,13 +759,13 @@ var z = {
|
|
|
744
759
|
let { key: i, ...o } = t;
|
|
745
760
|
return /* @__PURE__ */ u("div", {
|
|
746
761
|
...o,
|
|
747
|
-
id:
|
|
748
|
-
className: `${
|
|
762
|
+
id: b,
|
|
763
|
+
className: `${R.thumbs} ${a ? R.disabled : ""} ${a ? "cursor-not-allowed" : "cursor-resize-col"}`,
|
|
749
764
|
style: {
|
|
750
765
|
...o.style,
|
|
751
766
|
zIndex: "3"
|
|
752
767
|
},
|
|
753
|
-
"aria-label":
|
|
768
|
+
"aria-label": _,
|
|
754
769
|
"aria-valuemin": n,
|
|
755
770
|
"aria-valuemax": r,
|
|
756
771
|
"aria-valuenow": e
|
|
@@ -759,7 +774,7 @@ var z = {
|
|
|
759
774
|
})]
|
|
760
775
|
});
|
|
761
776
|
}
|
|
762
|
-
},
|
|
777
|
+
}, z = {
|
|
763
778
|
wrapper: "_wrapper_15fsv_1",
|
|
764
779
|
label: "_label_15fsv_7",
|
|
765
780
|
trigger: "_trigger_15fsv_12",
|
|
@@ -771,14 +786,14 @@ var z = {
|
|
|
771
786
|
viewport: "_viewport_15fsv_76",
|
|
772
787
|
item: "_item_15fsv_82",
|
|
773
788
|
itemIndicator: "_itemIndicator_15fsv_105"
|
|
774
|
-
},
|
|
789
|
+
}, _e = ({ value: t, onValueChange: n, options: r, placeholder: i = "Select...", className: a = "", disabled: o = !1, label: s, size: c = "default", "aria-label": l, id: f }) => {
|
|
775
790
|
let p = e.useId(), g = f || p, _ = `${g}-label`, v = r.find((e) => e.value === t), y = /* @__PURE__ */ d(D.Root, {
|
|
776
791
|
value: t,
|
|
777
792
|
onValueChange: n,
|
|
778
793
|
disabled: o,
|
|
779
794
|
children: [/* @__PURE__ */ d(D.Trigger, {
|
|
780
795
|
id: g,
|
|
781
|
-
className: `${
|
|
796
|
+
className: `${z.trigger} ${z[c]} ${a} cursor-pointer`,
|
|
782
797
|
...s ? { "aria-labelledby": _ } : l ? { "aria-label": l } : {},
|
|
783
798
|
children: [/* @__PURE__ */ d("span", {
|
|
784
799
|
style: {
|
|
@@ -788,7 +803,7 @@ var z = {
|
|
|
788
803
|
},
|
|
789
804
|
children: [v?.icon, /* @__PURE__ */ u(D.Value, { placeholder: i })]
|
|
790
805
|
}), /* @__PURE__ */ u(D.Icon, {
|
|
791
|
-
className:
|
|
806
|
+
className: z.icon,
|
|
792
807
|
"aria-hidden": "true",
|
|
793
808
|
children: /* @__PURE__ */ u(h, {
|
|
794
809
|
size: c === "large" ? 21 : 14,
|
|
@@ -796,16 +811,16 @@ var z = {
|
|
|
796
811
|
})
|
|
797
812
|
})]
|
|
798
813
|
}), /* @__PURE__ */ u(D.Portal, { children: /* @__PURE__ */ u(D.Content, {
|
|
799
|
-
className:
|
|
814
|
+
className: z.content,
|
|
800
815
|
position: "popper",
|
|
801
816
|
side: "bottom",
|
|
802
817
|
align: "start",
|
|
803
818
|
sideOffset: 4,
|
|
804
819
|
children: /* @__PURE__ */ u(D.Viewport, {
|
|
805
|
-
className:
|
|
820
|
+
className: z.viewport,
|
|
806
821
|
children: r.map((e) => /* @__PURE__ */ d(D.Item, {
|
|
807
822
|
value: e.value,
|
|
808
|
-
className:
|
|
823
|
+
className: z.item,
|
|
809
824
|
children: [/* @__PURE__ */ d("span", {
|
|
810
825
|
style: {
|
|
811
826
|
display: "inline-flex",
|
|
@@ -814,7 +829,7 @@ var z = {
|
|
|
814
829
|
},
|
|
815
830
|
children: [e.icon, /* @__PURE__ */ u(D.ItemText, { children: e.label })]
|
|
816
831
|
}), /* @__PURE__ */ u(D.ItemIndicator, {
|
|
817
|
-
className:
|
|
832
|
+
className: z.itemIndicator,
|
|
818
833
|
children: /* @__PURE__ */ u(m, {
|
|
819
834
|
size: 12,
|
|
820
835
|
color: "currentColor"
|
|
@@ -825,22 +840,22 @@ var z = {
|
|
|
825
840
|
}) })]
|
|
826
841
|
});
|
|
827
842
|
return s ? /* @__PURE__ */ d("div", {
|
|
828
|
-
className:
|
|
843
|
+
className: z.wrapper,
|
|
829
844
|
children: [/* @__PURE__ */ u("label", {
|
|
830
845
|
id: _,
|
|
831
846
|
htmlFor: g,
|
|
832
|
-
className:
|
|
847
|
+
className: z.label,
|
|
833
848
|
children: s
|
|
834
849
|
}), y]
|
|
835
850
|
}) : y;
|
|
836
|
-
},
|
|
851
|
+
}, 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__ */ d(O.Root, {
|
|
837
852
|
open: n,
|
|
838
853
|
onOpenChange: r,
|
|
839
854
|
children: [/* @__PURE__ */ u(O.Trigger, {
|
|
840
855
|
asChild: !0,
|
|
841
856
|
children: e
|
|
842
857
|
}), /* @__PURE__ */ u(O.Portal, { children: /* @__PURE__ */ u(O.Content, {
|
|
843
|
-
className: `${
|
|
858
|
+
className: `${ve.content} ${s}`,
|
|
844
859
|
align: i,
|
|
845
860
|
side: a,
|
|
846
861
|
sideOffset: o,
|
|
@@ -848,7 +863,7 @@ var z = {
|
|
|
848
863
|
"aria-describedby": l,
|
|
849
864
|
children: t
|
|
850
865
|
}) })]
|
|
851
|
-
}),
|
|
866
|
+
}), B = {
|
|
852
867
|
table: "_table_j6zqj_1",
|
|
853
868
|
caption: "_caption_j6zqj_8",
|
|
854
869
|
headerRow: "_headerRow_j6zqj_25",
|
|
@@ -864,17 +879,17 @@ var z = {
|
|
|
864
879
|
};
|
|
865
880
|
//#endregion
|
|
866
881
|
//#region src/components/Table/Table.tsx
|
|
867
|
-
function
|
|
882
|
+
function be({ children: e, caption: t, "aria-label": n, scrollable: r = !1, stickyFirstColumn: i = !1, bleedEnd: a }) {
|
|
868
883
|
let o = /* @__PURE__ */ d("table", {
|
|
869
|
-
className: `${
|
|
884
|
+
className: `${B.table} ${r && i ? B.stickyFirst : ""}`,
|
|
870
885
|
"aria-label": n,
|
|
871
886
|
children: [t && /* @__PURE__ */ u("caption", {
|
|
872
|
-
className:
|
|
887
|
+
className: B.caption,
|
|
873
888
|
children: t
|
|
874
889
|
}), e]
|
|
875
890
|
});
|
|
876
891
|
return r ? /* @__PURE__ */ u("div", {
|
|
877
|
-
className: `${
|
|
892
|
+
className: `${B.scroll} ${a === void 0 ? "" : B.bleedEnd}`,
|
|
878
893
|
style: a === void 0 ? void 0 : { "--table-bleed": typeof a == "number" ? `${a}px` : a },
|
|
879
894
|
role: "region",
|
|
880
895
|
"aria-label": n ?? t,
|
|
@@ -884,27 +899,27 @@ function _e({ children: e, caption: t, "aria-label": n, scrollable: r = !1, stic
|
|
|
884
899
|
}
|
|
885
900
|
//#endregion
|
|
886
901
|
//#region src/components/Table/TableHeader.tsx
|
|
887
|
-
function
|
|
902
|
+
function xe({ children: t }) {
|
|
888
903
|
let n = e.Children.map(t, (t) => e.isValidElement(t) && t.type === "td" ? /* @__PURE__ */ u("th", {
|
|
889
904
|
scope: "col",
|
|
890
905
|
...t.props
|
|
891
906
|
}) : t);
|
|
892
907
|
return /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", {
|
|
893
|
-
className:
|
|
908
|
+
className: B.headerRow,
|
|
894
909
|
children: n
|
|
895
910
|
}) });
|
|
896
911
|
}
|
|
897
912
|
//#endregion
|
|
898
913
|
//#region src/components/Table/TableRow.tsx
|
|
899
|
-
function
|
|
914
|
+
function Se({ children: e }) {
|
|
900
915
|
return /* @__PURE__ */ u("tr", {
|
|
901
|
-
className:
|
|
916
|
+
className: B.dataRow,
|
|
902
917
|
children: e
|
|
903
918
|
});
|
|
904
919
|
}
|
|
905
920
|
//#endregion
|
|
906
921
|
//#region src/components/Table/TableCell.tsx
|
|
907
|
-
function
|
|
922
|
+
function Ce({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
908
923
|
let a = n ? "th" : "td", o = {
|
|
909
924
|
...n && r ? { scope: r } : {},
|
|
910
925
|
...i ? { colSpan: i } : {}
|
|
@@ -912,12 +927,12 @@ function be({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
|
912
927
|
return e || t ? /* @__PURE__ */ u(a, {
|
|
913
928
|
...o,
|
|
914
929
|
children: /* @__PURE__ */ d("div", {
|
|
915
|
-
className:
|
|
930
|
+
className: B.cellInner,
|
|
916
931
|
children: [e && /* @__PURE__ */ u("span", {
|
|
917
|
-
className:
|
|
932
|
+
className: B.cellLabel,
|
|
918
933
|
children: e
|
|
919
934
|
}), t && /* @__PURE__ */ u("div", {
|
|
920
|
-
className:
|
|
935
|
+
className: B.cellContent,
|
|
921
936
|
children: t
|
|
922
937
|
})]
|
|
923
938
|
})
|
|
@@ -928,18 +943,18 @@ function be({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
|
928
943
|
}
|
|
929
944
|
//#endregion
|
|
930
945
|
//#region src/components/Table/TableValue.tsx
|
|
931
|
-
function
|
|
946
|
+
function we({ children: e }) {
|
|
932
947
|
return /* @__PURE__ */ u("span", {
|
|
933
|
-
className:
|
|
948
|
+
className: B.value,
|
|
934
949
|
children: e
|
|
935
950
|
});
|
|
936
951
|
}
|
|
937
952
|
//#endregion
|
|
938
953
|
//#region src/components/Table/TableIcon.tsx
|
|
939
|
-
function
|
|
954
|
+
function Te({ children: t, "aria-label": n }) {
|
|
940
955
|
let r = !n;
|
|
941
956
|
return /* @__PURE__ */ u("span", {
|
|
942
|
-
className:
|
|
957
|
+
className: B.icon,
|
|
943
958
|
"aria-hidden": r ? "true" : void 0,
|
|
944
959
|
"aria-label": n,
|
|
945
960
|
children: e.cloneElement(t, {
|
|
@@ -948,7 +963,7 @@ function Se({ children: t, "aria-label": n }) {
|
|
|
948
963
|
})
|
|
949
964
|
});
|
|
950
965
|
}
|
|
951
|
-
var
|
|
966
|
+
var V = {
|
|
952
967
|
tabs: "_tabs_5w265_1",
|
|
953
968
|
scrollable: "_scrollable_5w265_16",
|
|
954
969
|
tab: "_tab_5w265_1",
|
|
@@ -963,23 +978,23 @@ var U = {
|
|
|
963
978
|
};
|
|
964
979
|
//#endregion
|
|
965
980
|
//#region src/components/Tabs/Tabs.tsx
|
|
966
|
-
function
|
|
981
|
+
function Ee(e, t) {
|
|
967
982
|
if (!e || !t) return;
|
|
968
983
|
let n = parseFloat(getComputedStyle(e).paddingInlineStart) || 32, r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
969
984
|
i.left < r.left + n ? e.scrollLeft -= r.left + n - i.left : i.right > r.right - n && (e.scrollLeft += i.right - (r.right - n));
|
|
970
985
|
}
|
|
971
|
-
var
|
|
986
|
+
var De = {
|
|
972
987
|
micro: 14,
|
|
973
988
|
default: 14,
|
|
974
989
|
large: 21
|
|
975
990
|
};
|
|
976
|
-
function
|
|
991
|
+
function Oe({ items: e, value: r, onValueChange: o, size: c = "default", variant: f = "underline", scrollable: p = !1, bleed: m, getPanelId: h, "aria-label": g, renderLink: _ }) {
|
|
977
992
|
let v = s(null), y = s(/* @__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) => {
|
|
978
993
|
let n = e[t];
|
|
979
994
|
if (!n) return;
|
|
980
995
|
o(n.value);
|
|
981
996
|
let r = y.current.get(n.value);
|
|
982
|
-
r?.focus({ preventScroll: !0 }), p &&
|
|
997
|
+
r?.focus({ preventScroll: !0 }), p && Ee(v.current, r);
|
|
983
998
|
}, w = (t, n) => {
|
|
984
999
|
for (let r = 1; r <= e.length; r++) {
|
|
985
1000
|
let i = (t + n * r + e.length * r) % e.length;
|
|
@@ -1026,27 +1041,27 @@ function Te({ items: e, value: r, onValueChange: o, size: c = "default", variant
|
|
|
1026
1041
|
m,
|
|
1027
1042
|
e.length
|
|
1028
1043
|
]), i(() => {
|
|
1029
|
-
p &&
|
|
1044
|
+
p && Ee(v.current, y.current.get(r));
|
|
1030
1045
|
}, [p, r]), /* @__PURE__ */ u("div", {
|
|
1031
1046
|
ref: v,
|
|
1032
|
-
className: `${
|
|
1047
|
+
className: `${V.tabs} ${f === "button" ? V.buttonVariant : ""} ${p ? V.scrollable : ""} ${p && m !== void 0 ? V.bleed : ""}`,
|
|
1033
1048
|
style: p && m !== void 0 ? { "--tabs-bleed": typeof m == "number" ? `${m}px` : m } : void 0,
|
|
1034
1049
|
role: S ? "navigation" : "tablist",
|
|
1035
1050
|
"aria-label": g,
|
|
1036
1051
|
children: e.map((e, r) => {
|
|
1037
1052
|
let i = r === x, a = /* @__PURE__ */ d(l, { children: [
|
|
1038
1053
|
e.icon ? /* @__PURE__ */ u("span", {
|
|
1039
|
-
className:
|
|
1054
|
+
className: V.icon,
|
|
1040
1055
|
"aria-hidden": "true",
|
|
1041
|
-
children: n(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size:
|
|
1056
|
+
children: n(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size: De[c] }) : e.icon
|
|
1042
1057
|
}) : null,
|
|
1043
1058
|
e.label,
|
|
1044
1059
|
e.badge != null && e.badge !== !1 ? /* @__PURE__ */ u("span", {
|
|
1045
|
-
className:
|
|
1060
|
+
className: V.badge,
|
|
1046
1061
|
title: e.badgeTitle,
|
|
1047
1062
|
children: e.badge
|
|
1048
1063
|
}) : null
|
|
1049
|
-
] }), s = `${
|
|
1064
|
+
] }), s = `${V.tab} ${V[c]} ${i ? V.active : ""}`;
|
|
1050
1065
|
if (e.href !== void 0) {
|
|
1051
1066
|
let t = {
|
|
1052
1067
|
id: `${b}-tab-${e.value}`,
|
|
@@ -1088,7 +1103,7 @@ function Te({ items: e, value: r, onValueChange: o, size: c = "default", variant
|
|
|
1088
1103
|
})
|
|
1089
1104
|
});
|
|
1090
1105
|
}
|
|
1091
|
-
var
|
|
1106
|
+
var H = {
|
|
1092
1107
|
root: "_root_wrjxq_1",
|
|
1093
1108
|
micro: "_micro_wrjxq_2",
|
|
1094
1109
|
default: "_default_wrjxq_3",
|
|
@@ -1108,106 +1123,106 @@ var W = {
|
|
|
1108
1123
|
};
|
|
1109
1124
|
//#endregion
|
|
1110
1125
|
//#region src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
1111
|
-
function
|
|
1126
|
+
function ke(t) {
|
|
1112
1127
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
1113
1128
|
size: "14px",
|
|
1114
1129
|
color: "currentColor"
|
|
1115
1130
|
}) : t;
|
|
1116
1131
|
}
|
|
1117
|
-
var
|
|
1132
|
+
var Ae = "\0action", je = ({ items: e, size: t = "default", overflow: n = "wrap", className: r = "", separator: i = /* @__PURE__ */ u(_, {
|
|
1118
1133
|
size: 14,
|
|
1119
1134
|
color: "currentColor"
|
|
1120
1135
|
}), renderLink: a, "aria-label": o = "Breadcrumb" }) => /* @__PURE__ */ u("nav", {
|
|
1121
1136
|
"aria-label": o,
|
|
1122
|
-
className: `${
|
|
1137
|
+
className: `${H.root} ${H[t]} ${n === "truncate" ? H.truncate : ""} ${r}`,
|
|
1123
1138
|
children: /* @__PURE__ */ u("ol", {
|
|
1124
|
-
className:
|
|
1139
|
+
className: H.list,
|
|
1125
1140
|
children: e.map((t, r) => /* @__PURE__ */ d("li", {
|
|
1126
|
-
className:
|
|
1141
|
+
className: H.item,
|
|
1127
1142
|
children: [r > 0 && /* @__PURE__ */ u("span", {
|
|
1128
|
-
className:
|
|
1143
|
+
className: H.separator,
|
|
1129
1144
|
"aria-hidden": "true",
|
|
1130
1145
|
children: i
|
|
1131
1146
|
}), /* @__PURE__ */ d("div", {
|
|
1132
|
-
className: `${
|
|
1147
|
+
className: `${H.step} ${t.switcher ? H.switchable : ""}`,
|
|
1133
1148
|
children: [t.href ? (() => {
|
|
1134
1149
|
let i = {
|
|
1135
|
-
className:
|
|
1150
|
+
className: H.label,
|
|
1136
1151
|
href: t.href,
|
|
1137
1152
|
title: n === "truncate" ? t.label : void 0,
|
|
1138
1153
|
onClick: t.onClick,
|
|
1139
1154
|
"aria-current": r === e.length - 1 ? "page" : void 0,
|
|
1140
1155
|
children: /* @__PURE__ */ d(l, { children: [t.icon && /* @__PURE__ */ u("span", {
|
|
1141
|
-
className:
|
|
1156
|
+
className: H.icon,
|
|
1142
1157
|
"aria-hidden": "true",
|
|
1143
|
-
children:
|
|
1158
|
+
children: ke(t.icon)
|
|
1144
1159
|
}), /* @__PURE__ */ u("span", {
|
|
1145
|
-
className:
|
|
1160
|
+
className: H.text,
|
|
1146
1161
|
children: t.label
|
|
1147
1162
|
})] })
|
|
1148
1163
|
};
|
|
1149
1164
|
return a ? a(t, i) : /* @__PURE__ */ u("a", { ...i });
|
|
1150
1165
|
})() : /* @__PURE__ */ d("span", {
|
|
1151
|
-
className:
|
|
1166
|
+
className: H.label,
|
|
1152
1167
|
title: n === "truncate" ? t.label : void 0,
|
|
1153
1168
|
"aria-current": r === e.length - 1 ? "page" : void 0,
|
|
1154
1169
|
children: [t.icon && /* @__PURE__ */ u("span", {
|
|
1155
|
-
className:
|
|
1170
|
+
className: H.icon,
|
|
1156
1171
|
"aria-hidden": "true",
|
|
1157
|
-
children:
|
|
1172
|
+
children: ke(t.icon)
|
|
1158
1173
|
}), /* @__PURE__ */ u("span", {
|
|
1159
|
-
className:
|
|
1174
|
+
className: H.text,
|
|
1160
1175
|
children: t.label
|
|
1161
1176
|
})]
|
|
1162
1177
|
}), t.switcher && /* @__PURE__ */ d(D.Root, {
|
|
1163
1178
|
value: t.switcher.value,
|
|
1164
|
-
onValueChange: (e) => e ===
|
|
1179
|
+
onValueChange: (e) => e === Ae ? t.switcher.action?.onSelect() : t.switcher.onValueChange(e),
|
|
1165
1180
|
disabled: t.switcher.disabled || t.switcher.options.length === 0 && !t.switcher.action,
|
|
1166
1181
|
children: [/* @__PURE__ */ u(D.Trigger, {
|
|
1167
|
-
className:
|
|
1182
|
+
className: H.trigger,
|
|
1168
1183
|
"aria-label": `${t.switcher.label}: ${t.label}`,
|
|
1169
1184
|
children: /* @__PURE__ */ u(D.Icon, {
|
|
1170
1185
|
"aria-hidden": "true",
|
|
1171
|
-
className:
|
|
1186
|
+
className: H.icon,
|
|
1172
1187
|
children: /* @__PURE__ */ u(y, {
|
|
1173
1188
|
size: 14,
|
|
1174
1189
|
color: "currentColor"
|
|
1175
1190
|
})
|
|
1176
1191
|
})
|
|
1177
1192
|
}), /* @__PURE__ */ u(D.Portal, { children: /* @__PURE__ */ u(D.Content, {
|
|
1178
|
-
className: `${
|
|
1193
|
+
className: `${z.content} ${H.menu}`,
|
|
1179
1194
|
position: "popper",
|
|
1180
1195
|
align: "end",
|
|
1181
1196
|
sideOffset: 4,
|
|
1182
1197
|
collisionPadding: 8,
|
|
1183
1198
|
children: /* @__PURE__ */ d(D.Viewport, {
|
|
1184
|
-
className:
|
|
1199
|
+
className: z.viewport,
|
|
1185
1200
|
children: [t.switcher.options.map((e) => /* @__PURE__ */ d(D.Item, {
|
|
1186
1201
|
value: e.value,
|
|
1187
|
-
className:
|
|
1202
|
+
className: z.item,
|
|
1188
1203
|
textValue: e.label,
|
|
1189
1204
|
children: [/* @__PURE__ */ d("span", {
|
|
1190
|
-
className:
|
|
1205
|
+
className: H.option,
|
|
1191
1206
|
children: [e.icon && /* @__PURE__ */ u("span", {
|
|
1192
|
-
className:
|
|
1207
|
+
className: H.icon,
|
|
1193
1208
|
"aria-hidden": "true",
|
|
1194
1209
|
children: e.icon
|
|
1195
1210
|
}), /* @__PURE__ */ u(D.ItemText, { children: e.label })]
|
|
1196
1211
|
}), /* @__PURE__ */ u(D.ItemIndicator, {
|
|
1197
|
-
className:
|
|
1212
|
+
className: z.itemIndicator,
|
|
1198
1213
|
children: /* @__PURE__ */ u(m, {
|
|
1199
1214
|
size: 12,
|
|
1200
1215
|
color: "currentColor"
|
|
1201
1216
|
})
|
|
1202
1217
|
})]
|
|
1203
|
-
}, e.value)), t.switcher.action && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(D.Separator, { className:
|
|
1204
|
-
value:
|
|
1205
|
-
className:
|
|
1218
|
+
}, e.value)), t.switcher.action && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(D.Separator, { className: H.menuDivider }), /* @__PURE__ */ u(D.Item, {
|
|
1219
|
+
value: Ae,
|
|
1220
|
+
className: z.item,
|
|
1206
1221
|
textValue: t.switcher.action.label,
|
|
1207
1222
|
children: /* @__PURE__ */ d("span", {
|
|
1208
|
-
className:
|
|
1223
|
+
className: H.option,
|
|
1209
1224
|
children: [/* @__PURE__ */ u("span", {
|
|
1210
|
-
className:
|
|
1225
|
+
className: H.icon,
|
|
1211
1226
|
"aria-hidden": "true",
|
|
1212
1227
|
children: /* @__PURE__ */ u(x, {
|
|
1213
1228
|
size: 14,
|
|
@@ -1222,7 +1237,7 @@ var De = "\0action", Oe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1222
1237
|
})]
|
|
1223
1238
|
}, t.id))
|
|
1224
1239
|
})
|
|
1225
|
-
}),
|
|
1240
|
+
}), Me = {
|
|
1226
1241
|
wrapper: "_wrapper_1a9jo_1",
|
|
1227
1242
|
track: "_track_1a9jo_8",
|
|
1228
1243
|
fill: "_fill_1a9jo_36",
|
|
@@ -1230,42 +1245,42 @@ var De = "\0action", Oe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1230
1245
|
};
|
|
1231
1246
|
//#endregion
|
|
1232
1247
|
//#region src/components/ProgressBar/ProgressBar.tsx
|
|
1233
|
-
function
|
|
1248
|
+
function Ne({ value: e, showLabel: t = !1, fulfilledColor: n = !1, className: r = "" }) {
|
|
1234
1249
|
let i = Math.min(100, Math.max(0, e)), a = `${Math.round(i)}%`, o = n && i >= 100 ? "var(--CPureBlue)" : void 0;
|
|
1235
1250
|
return /* @__PURE__ */ d("div", {
|
|
1236
|
-
className: `${
|
|
1251
|
+
className: `${Me.wrapper} ${r}`,
|
|
1237
1252
|
role: "progressbar",
|
|
1238
1253
|
"aria-valuenow": i,
|
|
1239
1254
|
"aria-valuemin": 0,
|
|
1240
1255
|
"aria-valuemax": 100,
|
|
1241
1256
|
children: [/* @__PURE__ */ u("div", {
|
|
1242
|
-
className:
|
|
1257
|
+
className: Me.track,
|
|
1243
1258
|
children: /* @__PURE__ */ u("div", {
|
|
1244
|
-
className:
|
|
1259
|
+
className: Me.fill,
|
|
1245
1260
|
style: {
|
|
1246
1261
|
width: `${i}%`,
|
|
1247
1262
|
backgroundColor: o
|
|
1248
1263
|
}
|
|
1249
1264
|
})
|
|
1250
1265
|
}), t && /* @__PURE__ */ u("span", {
|
|
1251
|
-
className:
|
|
1266
|
+
className: Me.label,
|
|
1252
1267
|
"aria-hidden": "true",
|
|
1253
1268
|
children: a
|
|
1254
1269
|
})]
|
|
1255
1270
|
});
|
|
1256
1271
|
}
|
|
1257
|
-
var
|
|
1272
|
+
var Pe = {
|
|
1258
1273
|
chip: "_chip_iaxe0_1",
|
|
1259
1274
|
large: "_large_iaxe0_14"
|
|
1260
1275
|
};
|
|
1261
1276
|
//#endregion
|
|
1262
1277
|
//#region src/components/Chip/Chip.tsx
|
|
1263
|
-
function
|
|
1278
|
+
function Fe({ children: t, color: n, textColor: r, className: i, icon: a, size: o = "default" }) {
|
|
1264
1279
|
let s = {};
|
|
1265
1280
|
return n && (s.backgroundColor = n), r && (s.color = r), /* @__PURE__ */ d("span", {
|
|
1266
1281
|
className: [
|
|
1267
|
-
|
|
1268
|
-
o === "large" &&
|
|
1282
|
+
Pe.chip,
|
|
1283
|
+
o === "large" && Pe.large,
|
|
1269
1284
|
i
|
|
1270
1285
|
].filter(Boolean).join(" "),
|
|
1271
1286
|
style: s,
|
|
@@ -1275,7 +1290,7 @@ function Me({ children: t, color: n, textColor: r, className: i, icon: a, size:
|
|
|
1275
1290
|
}), t]
|
|
1276
1291
|
});
|
|
1277
1292
|
}
|
|
1278
|
-
var
|
|
1293
|
+
var U = {
|
|
1279
1294
|
root: "_root_ok48u_3",
|
|
1280
1295
|
icon: "_icon_ok48u_16",
|
|
1281
1296
|
body: "_body_ok48u_17",
|
|
@@ -1286,63 +1301,63 @@ var G = {
|
|
|
1286
1301
|
success: "_success_ok48u_24",
|
|
1287
1302
|
warning: "_warning_ok48u_25",
|
|
1288
1303
|
destructive: "_destructive_ok48u_26"
|
|
1289
|
-
},
|
|
1304
|
+
}, Ie = {
|
|
1290
1305
|
success: /* @__PURE__ */ u(m, {}),
|
|
1291
1306
|
warning: /* @__PURE__ */ u(w, {}),
|
|
1292
1307
|
destructive: /* @__PURE__ */ u(w, {})
|
|
1293
1308
|
};
|
|
1294
|
-
function
|
|
1309
|
+
function Le(t) {
|
|
1295
1310
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
1296
1311
|
size: 16,
|
|
1297
1312
|
color: "currentColor"
|
|
1298
1313
|
}) : t;
|
|
1299
1314
|
}
|
|
1300
|
-
var
|
|
1301
|
-
let a = t === void 0 ?
|
|
1315
|
+
var Re = ({ variant: e = "default", icon: t, className: n = "", children: r, role: i }) => {
|
|
1316
|
+
let a = t === void 0 ? Ie[e] : t;
|
|
1302
1317
|
return /* @__PURE__ */ d("div", {
|
|
1303
1318
|
role: i ?? (e === "destructive" || e === "warning" ? "alert" : "status"),
|
|
1304
|
-
className: `${
|
|
1319
|
+
className: `${U.root} ${U[e]} ${n}`,
|
|
1305
1320
|
children: [a && /* @__PURE__ */ u("span", {
|
|
1306
|
-
className:
|
|
1321
|
+
className: U.icon,
|
|
1307
1322
|
"aria-hidden": "true",
|
|
1308
|
-
children:
|
|
1323
|
+
children: Le(a)
|
|
1309
1324
|
}), /* @__PURE__ */ u("div", {
|
|
1310
|
-
className:
|
|
1325
|
+
className: U.body,
|
|
1311
1326
|
children: r
|
|
1312
1327
|
})]
|
|
1313
1328
|
});
|
|
1314
|
-
},
|
|
1315
|
-
className: `${
|
|
1329
|
+
}, ze = ({ children: e, className: t = "" }) => /* @__PURE__ */ u("div", {
|
|
1330
|
+
className: `${U.title} ${t}`,
|
|
1316
1331
|
children: e
|
|
1317
|
-
}),
|
|
1318
|
-
className: `${
|
|
1332
|
+
}), Be = ({ children: e, className: t = "" }) => /* @__PURE__ */ u("div", {
|
|
1333
|
+
className: `${U.description} ${t}`,
|
|
1319
1334
|
children: e
|
|
1320
|
-
}),
|
|
1321
|
-
root: "
|
|
1322
|
-
main: "
|
|
1323
|
-
aside: "
|
|
1324
|
-
message: "
|
|
1325
|
-
},
|
|
1335
|
+
}), Ve = {
|
|
1336
|
+
root: "_root_1aak8_10",
|
|
1337
|
+
main: "_main_1aak8_33",
|
|
1338
|
+
aside: "_aside_1aak8_34",
|
|
1339
|
+
message: "_message_1aak8_41"
|
|
1340
|
+
}, He = ({ visible: e = !0, message: t, aside: n, children: r, className: i = "", "aria-label": a = "Unsaved changes" }) => e ? /* @__PURE__ */ d("div", {
|
|
1326
1341
|
role: "region",
|
|
1327
1342
|
"aria-label": a,
|
|
1328
|
-
className: `${
|
|
1343
|
+
className: `${Ve.root} ${i}`,
|
|
1329
1344
|
children: [/* @__PURE__ */ d("div", {
|
|
1330
|
-
className:
|
|
1345
|
+
className: Ve.main,
|
|
1331
1346
|
children: [r, t && /* @__PURE__ */ u("span", {
|
|
1332
|
-
className:
|
|
1347
|
+
className: Ve.message,
|
|
1333
1348
|
children: t
|
|
1334
1349
|
})]
|
|
1335
1350
|
}), n && /* @__PURE__ */ u("div", {
|
|
1336
|
-
className:
|
|
1351
|
+
className: Ve.aside,
|
|
1337
1352
|
children: n
|
|
1338
1353
|
})]
|
|
1339
|
-
}) : null,
|
|
1354
|
+
}) : null, Ue = {
|
|
1340
1355
|
tooltip: "_tooltip_1de7z_1",
|
|
1341
1356
|
arrow: "_arrow_1de7z_13"
|
|
1342
1357
|
};
|
|
1343
1358
|
//#endregion
|
|
1344
1359
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
1345
|
-
function
|
|
1360
|
+
function We({ content: e, position: t = "top", children: n, className: r }) {
|
|
1346
1361
|
return /* @__PURE__ */ u(k.Provider, {
|
|
1347
1362
|
delayDuration: 80,
|
|
1348
1363
|
children: /* @__PURE__ */ d(k.Root, { children: [/* @__PURE__ */ u(k.Trigger, {
|
|
@@ -1351,107 +1366,118 @@ function Ve({ content: e, position: t = "top", children: n, className: r }) {
|
|
|
1351
1366
|
}), /* @__PURE__ */ u(k.Portal, { children: /* @__PURE__ */ d(k.Content, {
|
|
1352
1367
|
side: t,
|
|
1353
1368
|
sideOffset: 7,
|
|
1354
|
-
className: [
|
|
1355
|
-
children: [e, /* @__PURE__ */ u(k.Arrow, { className:
|
|
1369
|
+
className: [Ue.tooltip, r].filter(Boolean).join(" "),
|
|
1370
|
+
children: [e, /* @__PURE__ */ u(k.Arrow, { className: Ue.arrow })]
|
|
1356
1371
|
}) })] })
|
|
1357
1372
|
});
|
|
1358
1373
|
}
|
|
1359
|
-
var
|
|
1360
|
-
wrapper: "
|
|
1361
|
-
chart: "
|
|
1362
|
-
svg: "
|
|
1363
|
-
tooltip: "
|
|
1364
|
-
tooltipLabel: "
|
|
1365
|
-
tooltipRow: "
|
|
1366
|
-
tooltipDot: "
|
|
1367
|
-
tooltipName: "
|
|
1368
|
-
tooltipValue: "
|
|
1369
|
-
legend: "
|
|
1370
|
-
legendItem: "
|
|
1371
|
-
legendMark: "
|
|
1372
|
-
legendLabel: "
|
|
1373
|
-
|
|
1374
|
-
|
|
1374
|
+
var W = {
|
|
1375
|
+
wrapper: "_wrapper_1wrxy_1",
|
|
1376
|
+
chart: "_chart_1wrxy_8",
|
|
1377
|
+
svg: "_svg_1wrxy_33",
|
|
1378
|
+
tooltip: "_tooltip_1wrxy_41",
|
|
1379
|
+
tooltipLabel: "_tooltipLabel_1wrxy_51",
|
|
1380
|
+
tooltipRow: "_tooltipRow_1wrxy_59",
|
|
1381
|
+
tooltipDot: "_tooltipDot_1wrxy_66",
|
|
1382
|
+
tooltipName: "_tooltipName_1wrxy_72",
|
|
1383
|
+
tooltipValue: "_tooltipValue_1wrxy_78",
|
|
1384
|
+
legend: "_legend_1wrxy_85",
|
|
1385
|
+
legendItem: "_legendItem_1wrxy_92",
|
|
1386
|
+
legendMark: "_legendMark_1wrxy_98",
|
|
1387
|
+
legendLabel: "_legendLabel_1wrxy_104",
|
|
1388
|
+
marker: "_marker_1wrxy_111",
|
|
1389
|
+
tooltipMarker: "_tooltipMarker_1wrxy_115",
|
|
1390
|
+
markerDot: "_markerDot_1wrxy_119"
|
|
1391
|
+
}, Ge = "var(--lv4)", G = 12, Ke = 20, qe = 8, Je = 28, K = 20;
|
|
1392
|
+
function Ye(e) {
|
|
1375
1393
|
return Number.isInteger(e) ? String(e) : e.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
1376
1394
|
}
|
|
1377
|
-
function
|
|
1378
|
-
let
|
|
1395
|
+
function Xe({ series: e, labels: t, type: n = "line", height: a = 200, showLegend: o = !0, className: l, markers: f }) {
|
|
1396
|
+
let p = s(null), [m, h] = c(0), [g, _] = c(null);
|
|
1379
1397
|
i(() => {
|
|
1380
|
-
let e =
|
|
1398
|
+
let e = p.current;
|
|
1381
1399
|
if (!e) return;
|
|
1382
|
-
let t = new ResizeObserver(([e]) =>
|
|
1383
|
-
return t.observe(e),
|
|
1400
|
+
let t = new ResizeObserver(([e]) => h(e.contentRect.width));
|
|
1401
|
+
return t.observe(e), h(e.clientWidth), () => t.disconnect();
|
|
1384
1402
|
}, []);
|
|
1385
|
-
let
|
|
1386
|
-
if (
|
|
1403
|
+
let v = t?.length ? Je : qe, y = Math.max(m - K - Ke, 0), b = Math.max(a - G - 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 = (() => {
|
|
1404
|
+
if (!t || t.length <= 1 || y <= 0) return 1;
|
|
1405
|
+
let e = Math.max(...t.map((e) => e.length)) * 6 + 12, n = Math.max(Math.floor(y / e), 1);
|
|
1406
|
+
return Math.ceil(t.length / n);
|
|
1407
|
+
})(), D = T <= 1 || y / (T - 1) >= 12, O = (e) => G + (1 - (e - C) / w) * b, k = (e) => T <= 1 ? K + y / 2 : K + e / (T - 1) * y, A = r((e) => {
|
|
1408
|
+
if (T === 0) return;
|
|
1387
1409
|
let t = e.currentTarget.getBoundingClientRect(), r = e.clientX - t.left, i = e.clientY - t.top;
|
|
1388
1410
|
if (n === "line") {
|
|
1389
|
-
let e = Math.round((r -
|
|
1390
|
-
|
|
1391
|
-
index: Math.max(0, Math.min(
|
|
1411
|
+
let e = Math.round((r - K) / y * (T - 1));
|
|
1412
|
+
_({
|
|
1413
|
+
index: Math.max(0, Math.min(T - 1, e)),
|
|
1392
1414
|
x: r,
|
|
1393
1415
|
y: i
|
|
1394
1416
|
});
|
|
1395
1417
|
} else {
|
|
1396
|
-
let e =
|
|
1397
|
-
|
|
1398
|
-
index: Math.max(0, Math.min(
|
|
1418
|
+
let e = y / T, t = Math.floor((r - K) / e);
|
|
1419
|
+
_({
|
|
1420
|
+
index: Math.max(0, Math.min(T - 1, t)),
|
|
1399
1421
|
x: r,
|
|
1400
1422
|
y: i
|
|
1401
1423
|
});
|
|
1402
1424
|
}
|
|
1403
1425
|
}, [
|
|
1404
1426
|
n,
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
]),
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1427
|
+
T,
|
|
1428
|
+
y
|
|
1429
|
+
]), j = r((e) => {
|
|
1430
|
+
e.pointerType === "mouse" && _(null);
|
|
1431
|
+
}, []), ee = /* @__PURE__ */ u("line", {
|
|
1432
|
+
x1: K,
|
|
1433
|
+
y1: G + b * .5,
|
|
1434
|
+
x2: K + y,
|
|
1435
|
+
y2: G + b * .5,
|
|
1412
1436
|
stroke: "var(--chart-midline)",
|
|
1413
1437
|
strokeWidth: "0.5"
|
|
1414
|
-
}),
|
|
1415
|
-
x1:
|
|
1416
|
-
y1:
|
|
1417
|
-
x2:
|
|
1418
|
-
y2:
|
|
1438
|
+
}), te = /* @__PURE__ */ u("line", {
|
|
1439
|
+
x1: K,
|
|
1440
|
+
y1: G + b,
|
|
1441
|
+
x2: K + y,
|
|
1442
|
+
y2: G + b,
|
|
1419
1443
|
stroke: "var(--chart-baseline)",
|
|
1420
1444
|
strokeWidth: "1"
|
|
1421
|
-
}),
|
|
1422
|
-
let e =
|
|
1445
|
+
}), ne = g && n === "bar" ? (() => {
|
|
1446
|
+
let e = y / T;
|
|
1423
1447
|
return /* @__PURE__ */ u("rect", {
|
|
1424
|
-
x:
|
|
1425
|
-
y:
|
|
1448
|
+
x: K + g.index * e,
|
|
1449
|
+
y: G,
|
|
1426
1450
|
width: e,
|
|
1427
|
-
height:
|
|
1451
|
+
height: b,
|
|
1428
1452
|
fill: "var(--chart-column-hover)"
|
|
1429
1453
|
});
|
|
1430
|
-
})() : null,
|
|
1454
|
+
})() : null, re = () => e.map((e, t) => {
|
|
1431
1455
|
if (!e.data.length) return null;
|
|
1432
|
-
let n = e.color ??
|
|
1456
|
+
let n = e.color ?? Ge;
|
|
1433
1457
|
return /* @__PURE__ */ d("g", { children: [/* @__PURE__ */ u("polyline", {
|
|
1434
|
-
points: e.data.map((e, t) => `${
|
|
1458
|
+
points: e.data.map((e, t) => `${k(t).toFixed(2)},${O(e).toFixed(2)}`).join(" "),
|
|
1435
1459
|
fill: "none",
|
|
1436
1460
|
stroke: n,
|
|
1437
1461
|
strokeWidth: "1",
|
|
1438
1462
|
strokeLinejoin: "round",
|
|
1439
1463
|
strokeLinecap: "round"
|
|
1440
1464
|
}), e.data.map((e, t) => {
|
|
1441
|
-
let r =
|
|
1465
|
+
let r = g?.index === t;
|
|
1466
|
+
if (!r && !D) return null;
|
|
1467
|
+
let i = r ? D ? 10 : 7 : 5, a = i / 2;
|
|
1442
1468
|
return /* @__PURE__ */ u("rect", {
|
|
1443
|
-
x:
|
|
1444
|
-
y:
|
|
1445
|
-
width:
|
|
1446
|
-
height:
|
|
1469
|
+
x: k(t) - a,
|
|
1470
|
+
y: O(e) - a,
|
|
1471
|
+
width: i,
|
|
1472
|
+
height: i,
|
|
1447
1473
|
fill: n
|
|
1448
1474
|
}, t);
|
|
1449
1475
|
})] }, t);
|
|
1450
|
-
}),
|
|
1451
|
-
if (!
|
|
1452
|
-
let t = e.length, n =
|
|
1476
|
+
}), ie = () => {
|
|
1477
|
+
if (!T) return null;
|
|
1478
|
+
let t = e.length, n = y / T, r = Math.max((n - 2 * (t + 1)) / t, 2), i = G + b;
|
|
1453
1479
|
return e.map((e, t) => e.data.map((a, o) => {
|
|
1454
|
-
let s =
|
|
1480
|
+
let s = K + o * n + 2 + t * (r + 2), c = O(a);
|
|
1455
1481
|
return /* @__PURE__ */ u("rect", {
|
|
1456
1482
|
x: s,
|
|
1457
1483
|
y: c,
|
|
@@ -1460,97 +1486,186 @@ function qe({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1460
1486
|
fill: e.color ?? "var(--chart-bar)"
|
|
1461
1487
|
}, `${t}-${o}`);
|
|
1462
1488
|
}));
|
|
1463
|
-
},
|
|
1489
|
+
}, M = () => {
|
|
1464
1490
|
if (!t?.length) return null;
|
|
1465
|
-
let e =
|
|
1466
|
-
return t.map((t,
|
|
1467
|
-
x: n === "line" ?
|
|
1491
|
+
let e = G + b + 18, r = t.length - 1;
|
|
1492
|
+
return t.map((t, i) => (r - i) % E === 0 ? /* @__PURE__ */ u("text", {
|
|
1493
|
+
x: n === "line" ? k(i) : K + (i + .5) * (y / T),
|
|
1468
1494
|
y: e,
|
|
1469
|
-
textAnchor: "middle",
|
|
1495
|
+
textAnchor: n !== "line" || r === 0 ? "middle" : i === 0 ? "start" : i === r ? "end" : "middle",
|
|
1470
1496
|
fill: "var(--lv4)",
|
|
1471
1497
|
style: { font: "var(--text-2xs)" },
|
|
1472
1498
|
children: t
|
|
1473
|
-
},
|
|
1474
|
-
},
|
|
1475
|
-
x1:
|
|
1476
|
-
y1:
|
|
1477
|
-
x2:
|
|
1478
|
-
y2:
|
|
1499
|
+
}, i) : null);
|
|
1500
|
+
}, N = g && n === "line" ? /* @__PURE__ */ u("line", {
|
|
1501
|
+
x1: k(g.index),
|
|
1502
|
+
y1: G,
|
|
1503
|
+
x2: k(g.index),
|
|
1504
|
+
y2: G + b,
|
|
1479
1505
|
stroke: "var(--chart-crosshair)",
|
|
1480
1506
|
strokeWidth: "1",
|
|
1481
1507
|
strokeDasharray: "3 3"
|
|
1482
|
-
}) : null,
|
|
1483
|
-
let n = t?.[
|
|
1508
|
+
}) : null, ae = g ? (() => {
|
|
1509
|
+
let n = t?.[g.index] ?? String(g.index + 1), r = Math.min(Math.max(g.x, 60), m - 60);
|
|
1484
1510
|
return /* @__PURE__ */ d("div", {
|
|
1485
|
-
className:
|
|
1486
|
-
style:
|
|
1511
|
+
className: W.tooltip,
|
|
1512
|
+
style: g.y < 80 ? {
|
|
1487
1513
|
left: r,
|
|
1488
|
-
top:
|
|
1514
|
+
top: g.y + 12,
|
|
1489
1515
|
transform: "translate(-50%, 0)"
|
|
1490
1516
|
} : {
|
|
1491
1517
|
left: r,
|
|
1492
|
-
top:
|
|
1518
|
+
top: g.y - 8,
|
|
1493
1519
|
transform: "translate(-50%, -100%)"
|
|
1494
1520
|
},
|
|
1495
|
-
children: [
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1521
|
+
children: [
|
|
1522
|
+
/* @__PURE__ */ u("div", {
|
|
1523
|
+
className: W.tooltipLabel,
|
|
1524
|
+
children: n
|
|
1525
|
+
}),
|
|
1526
|
+
e.map((e, t) => /* @__PURE__ */ d("div", {
|
|
1527
|
+
className: W.tooltipRow,
|
|
1528
|
+
children: [
|
|
1529
|
+
/* @__PURE__ */ u("span", {
|
|
1530
|
+
className: W.tooltipDot,
|
|
1531
|
+
style: { background: e.color ?? Ge }
|
|
1532
|
+
}),
|
|
1533
|
+
/* @__PURE__ */ u("span", {
|
|
1534
|
+
className: W.tooltipName,
|
|
1535
|
+
children: e.label
|
|
1536
|
+
}),
|
|
1537
|
+
/* @__PURE__ */ u("span", {
|
|
1538
|
+
className: W.tooltipValue,
|
|
1539
|
+
children: Ye(e.data[g.index] ?? 0)
|
|
1540
|
+
})
|
|
1541
|
+
]
|
|
1542
|
+
}, t)),
|
|
1543
|
+
f?.filter((e) => e.index === g.index).map((e, t) => /* @__PURE__ */ d("div", {
|
|
1544
|
+
className: `${W.tooltipRow} ${W.tooltipMarker}`,
|
|
1545
|
+
children: [/* @__PURE__ */ u("span", { className: `${W.tooltipDot} ${W.markerDot}` }), /* @__PURE__ */ u("span", {
|
|
1546
|
+
className: W.tooltipName,
|
|
1507
1547
|
children: e.label
|
|
1508
|
-
})
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
children: Ke(e.data[h.index] ?? 0)
|
|
1512
|
-
})
|
|
1513
|
-
]
|
|
1514
|
-
}, t))]
|
|
1548
|
+
})]
|
|
1549
|
+
}, `m${t}`))
|
|
1550
|
+
]
|
|
1515
1551
|
});
|
|
1516
1552
|
})() : null;
|
|
1517
1553
|
return /* @__PURE__ */ d("div", {
|
|
1518
|
-
className: [
|
|
1554
|
+
className: [W.wrapper, l].filter(Boolean).join(" "),
|
|
1519
1555
|
children: [/* @__PURE__ */ d("div", {
|
|
1520
|
-
ref:
|
|
1521
|
-
className:
|
|
1556
|
+
ref: p,
|
|
1557
|
+
className: W.chart,
|
|
1522
1558
|
style: { height: a },
|
|
1523
|
-
children: [
|
|
1524
|
-
width:
|
|
1559
|
+
children: [m > 0 && /* @__PURE__ */ d("svg", {
|
|
1560
|
+
width: m,
|
|
1525
1561
|
height: a,
|
|
1526
|
-
className:
|
|
1527
|
-
|
|
1528
|
-
|
|
1562
|
+
className: W.svg,
|
|
1563
|
+
onPointerMove: A,
|
|
1564
|
+
onPointerDown: A,
|
|
1565
|
+
onPointerLeave: j,
|
|
1529
1566
|
children: [
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
j,
|
|
1567
|
+
ee,
|
|
1568
|
+
te,
|
|
1533
1569
|
ne,
|
|
1534
|
-
|
|
1535
|
-
|
|
1570
|
+
N,
|
|
1571
|
+
n === "line" ? re() : ie(),
|
|
1572
|
+
f && T > 0 && [...new Set(f.map((e) => e.index).filter((e) => e >= 0 && e < T))].map((e) => {
|
|
1573
|
+
let t = n === "line" ? k(e) : K + (e + .5) * (y / T);
|
|
1574
|
+
return /* @__PURE__ */ u("rect", {
|
|
1575
|
+
className: W.marker,
|
|
1576
|
+
x: t - 3,
|
|
1577
|
+
y: G + b - 3,
|
|
1578
|
+
width: 6,
|
|
1579
|
+
height: 6
|
|
1580
|
+
}, `m${e}`);
|
|
1581
|
+
}),
|
|
1582
|
+
M()
|
|
1536
1583
|
]
|
|
1537
|
-
}),
|
|
1584
|
+
}), ae]
|
|
1538
1585
|
}), o && e.length > 1 && /* @__PURE__ */ u("div", {
|
|
1539
|
-
className:
|
|
1586
|
+
className: W.legend,
|
|
1540
1587
|
children: e.map((e, t) => /* @__PURE__ */ d("div", {
|
|
1541
|
-
className:
|
|
1588
|
+
className: W.legendItem,
|
|
1542
1589
|
children: [/* @__PURE__ */ u("div", {
|
|
1543
|
-
className:
|
|
1544
|
-
style: { background: e.color ??
|
|
1590
|
+
className: W.legendMark,
|
|
1591
|
+
style: { background: e.color ?? Ge }
|
|
1545
1592
|
}), /* @__PURE__ */ u("span", {
|
|
1546
|
-
className:
|
|
1593
|
+
className: W.legendLabel,
|
|
1547
1594
|
children: e.label
|
|
1548
1595
|
})]
|
|
1549
1596
|
}, t))
|
|
1550
1597
|
})]
|
|
1551
1598
|
});
|
|
1552
1599
|
}
|
|
1553
|
-
var
|
|
1600
|
+
var q = {
|
|
1601
|
+
sparkline: "_sparkline_fqcg9_4",
|
|
1602
|
+
line: "_line_fqcg9_12",
|
|
1603
|
+
partial: "_partial_fqcg9_22",
|
|
1604
|
+
fill: "_fill_fqcg9_26",
|
|
1605
|
+
bars: "_bars_fqcg9_34",
|
|
1606
|
+
bar: "_bar_fqcg9_34",
|
|
1607
|
+
baseline: "_baseline_fqcg9_48"
|
|
1608
|
+
}, Ze = 100, J = 100;
|
|
1609
|
+
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: f, className: p }) {
|
|
1610
|
+
let m = e.filter((e) => Number.isFinite(e)), h = f == null, g = m.length ? Math.max(...m) : 0, _ = m.length ? Math.min(...m) : 0, v = g - _ || 1, y = J - 12, b = (e) => 94 - (e - _) / v * y, x = (e) => /* @__PURE__ */ d("svg", {
|
|
1611
|
+
className: [q.sparkline, p].filter(Boolean).join(" "),
|
|
1612
|
+
style: {
|
|
1613
|
+
width: n,
|
|
1614
|
+
height: r,
|
|
1615
|
+
color: i
|
|
1616
|
+
},
|
|
1617
|
+
viewBox: `0 0 ${Ze} ${J}`,
|
|
1618
|
+
preserveAspectRatio: "none",
|
|
1619
|
+
role: h ? void 0 : "img",
|
|
1620
|
+
"aria-label": f,
|
|
1621
|
+
"aria-hidden": h || void 0,
|
|
1622
|
+
focusable: "false",
|
|
1623
|
+
children: [e, o && /* @__PURE__ */ u("line", {
|
|
1624
|
+
x1: "0",
|
|
1625
|
+
y1: J - .5,
|
|
1626
|
+
x2: Ze,
|
|
1627
|
+
y2: J - .5,
|
|
1628
|
+
className: q.baseline,
|
|
1629
|
+
vectorEffect: "non-scaling-stroke"
|
|
1630
|
+
})]
|
|
1631
|
+
});
|
|
1632
|
+
if (m.length < 2) return x(null);
|
|
1633
|
+
if (t === "bar") return /* @__PURE__ */ u("div", {
|
|
1634
|
+
className: [q.bars, p].filter(Boolean).join(" "),
|
|
1635
|
+
style: {
|
|
1636
|
+
width: n,
|
|
1637
|
+
height: r,
|
|
1638
|
+
color: i,
|
|
1639
|
+
gap: c,
|
|
1640
|
+
borderBottomWidth: +!!o
|
|
1641
|
+
},
|
|
1642
|
+
role: h ? void 0 : "img",
|
|
1643
|
+
"aria-label": f,
|
|
1644
|
+
"aria-hidden": h || void 0,
|
|
1645
|
+
children: m.map((e, t) => /* @__PURE__ */ u("span", {
|
|
1646
|
+
className: q.bar,
|
|
1647
|
+
style: { height: `${Math.max((e - _) / v * 100, 2)}%` }
|
|
1648
|
+
}, t))
|
|
1649
|
+
});
|
|
1650
|
+
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);
|
|
1651
|
+
return x(/* @__PURE__ */ d(l, { children: [a && /* @__PURE__ */ u("polygon", {
|
|
1652
|
+
className: q.fill,
|
|
1653
|
+
points: `0,${J} ${w} ${Ze},${J}`
|
|
1654
|
+
}), s ? /* @__PURE__ */ d(l, { children: [m.length > 2 && /* @__PURE__ */ u("polyline", {
|
|
1655
|
+
className: q.line,
|
|
1656
|
+
points: C(0, m.length - 1),
|
|
1657
|
+
vectorEffect: "non-scaling-stroke"
|
|
1658
|
+
}), /* @__PURE__ */ u("polyline", {
|
|
1659
|
+
className: `${q.line} ${q.partial}`,
|
|
1660
|
+
points: C(m.length - 2, 2),
|
|
1661
|
+
vectorEffect: "non-scaling-stroke"
|
|
1662
|
+
})] }) : /* @__PURE__ */ u("polyline", {
|
|
1663
|
+
className: q.line,
|
|
1664
|
+
points: w,
|
|
1665
|
+
vectorEffect: "non-scaling-stroke"
|
|
1666
|
+
})] }));
|
|
1667
|
+
}
|
|
1668
|
+
var $e = {
|
|
1554
1669
|
wrapper: "_wrapper_17ws4_1",
|
|
1555
1670
|
label: "_label_17ws4_7",
|
|
1556
1671
|
textarea: "_textarea_17ws4_12",
|
|
@@ -1559,14 +1674,14 @@ var Y = {
|
|
|
1559
1674
|
};
|
|
1560
1675
|
//#endregion
|
|
1561
1676
|
//#region src/components/Textarea/Textarea.tsx
|
|
1562
|
-
function
|
|
1677
|
+
function et({ label: t, error: n, className: r = "", isValid: i = !0, id: a, rows: o = 4, ...s }) {
|
|
1563
1678
|
let c = e.useId(), l = a || c, f = `${l}-error`, p = n || !i;
|
|
1564
1679
|
return /* @__PURE__ */ d("div", {
|
|
1565
|
-
className: `${
|
|
1680
|
+
className: `${$e.wrapper} ${r}`,
|
|
1566
1681
|
children: [
|
|
1567
1682
|
t && /* @__PURE__ */ d("label", {
|
|
1568
1683
|
htmlFor: l,
|
|
1569
|
-
className:
|
|
1684
|
+
className: $e.label,
|
|
1570
1685
|
children: [t, s.required && /* @__PURE__ */ u("span", {
|
|
1571
1686
|
"aria-label": "required",
|
|
1572
1687
|
children: " *"
|
|
@@ -1575,46 +1690,46 @@ function Je({ label: t, error: n, className: r = "", isValid: i = !0, id: a, row
|
|
|
1575
1690
|
/* @__PURE__ */ u("textarea", {
|
|
1576
1691
|
id: l,
|
|
1577
1692
|
rows: o,
|
|
1578
|
-
className: `${
|
|
1693
|
+
className: `${$e.textarea} ${p ? $e.error : ""}`,
|
|
1579
1694
|
"aria-invalid": p ? "true" : "false",
|
|
1580
1695
|
"aria-describedby": n ? f : void 0,
|
|
1581
1696
|
...s
|
|
1582
1697
|
}),
|
|
1583
1698
|
n && /* @__PURE__ */ u("span", {
|
|
1584
1699
|
id: f,
|
|
1585
|
-
className:
|
|
1700
|
+
className: $e.errorText,
|
|
1586
1701
|
role: "alert",
|
|
1587
1702
|
children: n
|
|
1588
1703
|
})
|
|
1589
1704
|
]
|
|
1590
1705
|
});
|
|
1591
1706
|
}
|
|
1592
|
-
var
|
|
1707
|
+
var Y = {
|
|
1593
1708
|
overlay: "_overlay_xud7c_1",
|
|
1594
1709
|
content: "_content_xud7c_8",
|
|
1595
1710
|
title: "_title_xud7c_26",
|
|
1596
1711
|
description: "_description_xud7c_34",
|
|
1597
1712
|
close: "_close_xud7c_40",
|
|
1598
1713
|
srOnly: "_srOnly_xud7c_62"
|
|
1599
|
-
},
|
|
1714
|
+
}, tt = ({ trigger: e, children: t, open: n, onOpenChange: r, title: i, description: a, className: o = "", showClose: s = !0 }) => /* @__PURE__ */ d(A.Root, {
|
|
1600
1715
|
open: n,
|
|
1601
1716
|
onOpenChange: r,
|
|
1602
1717
|
children: [e && /* @__PURE__ */ u(A.Trigger, {
|
|
1603
1718
|
asChild: !0,
|
|
1604
1719
|
children: e
|
|
1605
|
-
}), /* @__PURE__ */ d(A.Portal, { children: [/* @__PURE__ */ u(A.Overlay, { className:
|
|
1606
|
-
className: `${
|
|
1720
|
+
}), /* @__PURE__ */ d(A.Portal, { children: [/* @__PURE__ */ u(A.Overlay, { className: Y.overlay }), /* @__PURE__ */ d(A.Content, {
|
|
1721
|
+
className: `${Y.content} ${o}`,
|
|
1607
1722
|
children: [
|
|
1608
1723
|
/* @__PURE__ */ u(A.Title, {
|
|
1609
|
-
className: i ?
|
|
1724
|
+
className: i ? Y.title : Y.srOnly,
|
|
1610
1725
|
children: i || "Dialog"
|
|
1611
1726
|
}),
|
|
1612
1727
|
a && /* @__PURE__ */ u(A.Description, {
|
|
1613
|
-
className:
|
|
1728
|
+
className: Y.description,
|
|
1614
1729
|
children: a
|
|
1615
1730
|
}),
|
|
1616
1731
|
s && /* @__PURE__ */ u(A.Close, {
|
|
1617
|
-
className:
|
|
1732
|
+
className: Y.close,
|
|
1618
1733
|
"aria-label": "Close",
|
|
1619
1734
|
children: /* @__PURE__ */ u(T, {
|
|
1620
1735
|
size: 16,
|
|
@@ -1624,7 +1739,7 @@ var X = {
|
|
|
1624
1739
|
t
|
|
1625
1740
|
]
|
|
1626
1741
|
})] })]
|
|
1627
|
-
}),
|
|
1742
|
+
}), X = {
|
|
1628
1743
|
wrapper: "_wrapper_aimna_1",
|
|
1629
1744
|
label: "_label_aimna_7",
|
|
1630
1745
|
trigger: "_trigger_aimna_12",
|
|
@@ -1643,7 +1758,7 @@ var X = {
|
|
|
1643
1758
|
today: "_today_aimna_131",
|
|
1644
1759
|
selected: "_selected_aimna_136",
|
|
1645
1760
|
errorText: "_errorText_aimna_142"
|
|
1646
|
-
},
|
|
1761
|
+
}, nt = [
|
|
1647
1762
|
"Mo",
|
|
1648
1763
|
"Tu",
|
|
1649
1764
|
"We",
|
|
@@ -1651,7 +1766,7 @@ var X = {
|
|
|
1651
1766
|
"Fr",
|
|
1652
1767
|
"Sa",
|
|
1653
1768
|
"Su"
|
|
1654
|
-
],
|
|
1769
|
+
], rt = [
|
|
1655
1770
|
"January",
|
|
1656
1771
|
"February",
|
|
1657
1772
|
"March",
|
|
@@ -1665,20 +1780,20 @@ var X = {
|
|
|
1665
1780
|
"November",
|
|
1666
1781
|
"December"
|
|
1667
1782
|
];
|
|
1668
|
-
function
|
|
1783
|
+
function it(e) {
|
|
1669
1784
|
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
1670
1785
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
1671
1786
|
}
|
|
1672
|
-
function
|
|
1787
|
+
function at(e, t) {
|
|
1673
1788
|
return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
1674
1789
|
}
|
|
1675
|
-
function
|
|
1790
|
+
function ot(e, t) {
|
|
1676
1791
|
let n = (new Date(e, t, 1).getDay() + 6) % 7, r = [];
|
|
1677
1792
|
for (let i = 0; i < 42; i++) r.push(new Date(e, t, 1 - n + i));
|
|
1678
1793
|
return r;
|
|
1679
1794
|
}
|
|
1680
|
-
var
|
|
1681
|
-
let p = e.useId(), m = `${p}-error`, v = !!a || !o, [y, b] = c(!1), x = /* @__PURE__ */ new Date(), S = t ?? x, [C, w] = c(S.getFullYear()), [T, E] = c(S.getMonth()), [D, k] = c(S), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1),
|
|
1795
|
+
var st = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", error: a, isValid: o = !0, disabled: s = !1, className: l = "", formatDate: f = it }) => {
|
|
1796
|
+
let p = e.useId(), m = `${p}-error`, v = !!a || !o, [y, b] = c(!1), x = /* @__PURE__ */ new Date(), S = t ?? x, [C, w] = c(S.getFullYear()), [T, E] = c(S.getMonth()), [D, k] = c(S), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1), ee = (e) => {
|
|
1682
1797
|
if (e) {
|
|
1683
1798
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
1684
1799
|
k(e), w(e.getFullYear()), E(e.getMonth());
|
|
@@ -1686,9 +1801,9 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1686
1801
|
b(e);
|
|
1687
1802
|
};
|
|
1688
1803
|
e.useEffect(() => {
|
|
1689
|
-
j.current &&= (A.current.get(
|
|
1804
|
+
j.current &&= (A.current.get(it(D))?.focus(), !1);
|
|
1690
1805
|
}, [D]);
|
|
1691
|
-
let
|
|
1806
|
+
let te = (e, t) => {
|
|
1692
1807
|
let n = new Date(t), r = {
|
|
1693
1808
|
ArrowLeft: -1,
|
|
1694
1809
|
ArrowRight: 1,
|
|
@@ -1707,36 +1822,36 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1707
1822
|
e.useEffect(() => {
|
|
1708
1823
|
y && t && (w(t.getFullYear()), E(t.getMonth()));
|
|
1709
1824
|
}, [y]);
|
|
1710
|
-
let
|
|
1825
|
+
let ne = () => {
|
|
1711
1826
|
T === 0 ? (E(11), w(C - 1)) : E(T - 1);
|
|
1712
|
-
},
|
|
1827
|
+
}, re = () => {
|
|
1713
1828
|
T === 11 ? (E(0), w(C + 1)) : E(T + 1);
|
|
1714
|
-
},
|
|
1829
|
+
}, ie = (e) => {
|
|
1715
1830
|
n?.(e), b(!1);
|
|
1716
|
-
},
|
|
1831
|
+
}, M = ot(C, T);
|
|
1717
1832
|
return /* @__PURE__ */ d("div", {
|
|
1718
|
-
className: `${
|
|
1833
|
+
className: `${X.wrapper} ${l}`,
|
|
1719
1834
|
children: [
|
|
1720
1835
|
r && /* @__PURE__ */ u("span", {
|
|
1721
1836
|
id: `${p}-label`,
|
|
1722
|
-
className:
|
|
1837
|
+
className: X.label,
|
|
1723
1838
|
children: r
|
|
1724
1839
|
}),
|
|
1725
1840
|
/* @__PURE__ */ d(O.Root, {
|
|
1726
1841
|
open: y,
|
|
1727
|
-
onOpenChange:
|
|
1842
|
+
onOpenChange: ee,
|
|
1728
1843
|
children: [/* @__PURE__ */ u(O.Trigger, {
|
|
1729
1844
|
asChild: !0,
|
|
1730
1845
|
children: /* @__PURE__ */ d("button", {
|
|
1731
1846
|
type: "button",
|
|
1732
|
-
className: `${
|
|
1847
|
+
className: `${X.trigger} ${v ? X.error : ""}`,
|
|
1733
1848
|
disabled: s,
|
|
1734
1849
|
"aria-labelledby": r ? `${p}-label ${p}-value` : void 0,
|
|
1735
1850
|
"aria-invalid": v ? "true" : "false",
|
|
1736
1851
|
"aria-describedby": a ? m : void 0,
|
|
1737
1852
|
children: [/* @__PURE__ */ u("span", {
|
|
1738
1853
|
id: `${p}-value`,
|
|
1739
|
-
className: t ?
|
|
1854
|
+
className: t ? X.valueText : X.placeholder,
|
|
1740
1855
|
children: t ? f(t) : i
|
|
1741
1856
|
}), /* @__PURE__ */ u(h, {
|
|
1742
1857
|
size: 14,
|
|
@@ -1744,21 +1859,21 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1744
1859
|
})]
|
|
1745
1860
|
})
|
|
1746
1861
|
}), /* @__PURE__ */ u(O.Portal, { children: /* @__PURE__ */ d(O.Content, {
|
|
1747
|
-
className:
|
|
1862
|
+
className: X.calendar,
|
|
1748
1863
|
align: "start",
|
|
1749
1864
|
sideOffset: 5,
|
|
1750
1865
|
"aria-label": r ? `${r} calendar` : "Choose a date",
|
|
1751
1866
|
onOpenAutoFocus: (e) => {
|
|
1752
|
-
e.preventDefault(), A.current.get(
|
|
1867
|
+
e.preventDefault(), A.current.get(it(D))?.focus();
|
|
1753
1868
|
},
|
|
1754
1869
|
children: [
|
|
1755
1870
|
/* @__PURE__ */ d("div", {
|
|
1756
|
-
className:
|
|
1871
|
+
className: X.header,
|
|
1757
1872
|
children: [
|
|
1758
1873
|
/* @__PURE__ */ u("button", {
|
|
1759
1874
|
type: "button",
|
|
1760
|
-
className:
|
|
1761
|
-
onClick:
|
|
1875
|
+
className: X.navButton,
|
|
1876
|
+
onClick: ne,
|
|
1762
1877
|
"aria-label": "Previous month",
|
|
1763
1878
|
children: /* @__PURE__ */ u(g, {
|
|
1764
1879
|
size: 14,
|
|
@@ -1766,17 +1881,17 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1766
1881
|
})
|
|
1767
1882
|
}),
|
|
1768
1883
|
/* @__PURE__ */ d("span", {
|
|
1769
|
-
className:
|
|
1884
|
+
className: X.monthLabel,
|
|
1770
1885
|
children: [
|
|
1771
|
-
|
|
1886
|
+
rt[T],
|
|
1772
1887
|
" ",
|
|
1773
1888
|
C
|
|
1774
1889
|
]
|
|
1775
1890
|
}),
|
|
1776
1891
|
/* @__PURE__ */ u("button", {
|
|
1777
1892
|
type: "button",
|
|
1778
|
-
className:
|
|
1779
|
-
onClick:
|
|
1893
|
+
className: X.navButton,
|
|
1894
|
+
onClick: re,
|
|
1780
1895
|
"aria-label": "Next month",
|
|
1781
1896
|
children: /* @__PURE__ */ u(_, {
|
|
1782
1897
|
size: 14,
|
|
@@ -1786,27 +1901,27 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1786
1901
|
]
|
|
1787
1902
|
}),
|
|
1788
1903
|
/* @__PURE__ */ u("div", {
|
|
1789
|
-
className:
|
|
1790
|
-
children:
|
|
1791
|
-
className:
|
|
1904
|
+
className: X.weekdays,
|
|
1905
|
+
children: nt.map((e) => /* @__PURE__ */ u("span", {
|
|
1906
|
+
className: X.weekday,
|
|
1792
1907
|
children: e
|
|
1793
1908
|
}, e))
|
|
1794
1909
|
}),
|
|
1795
1910
|
/* @__PURE__ */ u("div", {
|
|
1796
|
-
className:
|
|
1797
|
-
children:
|
|
1798
|
-
let n = e.getMonth() !== T, r =
|
|
1911
|
+
className: X.grid,
|
|
1912
|
+
children: M.map((e) => {
|
|
1913
|
+
let n = e.getMonth() !== T, r = at(e, t), i = at(e, x);
|
|
1799
1914
|
return /* @__PURE__ */ u("button", {
|
|
1800
1915
|
type: "button",
|
|
1801
1916
|
className: [
|
|
1802
|
-
|
|
1803
|
-
n ?
|
|
1804
|
-
r ?
|
|
1805
|
-
i && !r ?
|
|
1917
|
+
X.day,
|
|
1918
|
+
n ? X.outside : "",
|
|
1919
|
+
r ? X.selected : "",
|
|
1920
|
+
i && !r ? X.today : ""
|
|
1806
1921
|
].filter(Boolean).join(" "),
|
|
1807
|
-
onClick: () =>
|
|
1922
|
+
onClick: () => ie(e),
|
|
1808
1923
|
ref: (t) => {
|
|
1809
|
-
t ? A.current.set(
|
|
1924
|
+
t ? A.current.set(it(e), t) : A.current.delete(it(e));
|
|
1810
1925
|
},
|
|
1811
1926
|
"aria-label": e.toLocaleDateString(void 0, {
|
|
1812
1927
|
weekday: "long",
|
|
@@ -1816,8 +1931,8 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1816
1931
|
}),
|
|
1817
1932
|
"aria-pressed": r,
|
|
1818
1933
|
"aria-current": i ? "date" : void 0,
|
|
1819
|
-
tabIndex:
|
|
1820
|
-
onKeyDown: (t) =>
|
|
1934
|
+
tabIndex: at(e, D) || D.getMonth() !== T && e.getDate() === 1 && !n ? 0 : -1,
|
|
1935
|
+
onKeyDown: (t) => te(t, e),
|
|
1821
1936
|
children: e.getDate()
|
|
1822
1937
|
}, e.toISOString());
|
|
1823
1938
|
})
|
|
@@ -1827,13 +1942,13 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1827
1942
|
}),
|
|
1828
1943
|
a && /* @__PURE__ */ u("span", {
|
|
1829
1944
|
id: m,
|
|
1830
|
-
className:
|
|
1945
|
+
className: X.errorText,
|
|
1831
1946
|
role: "alert",
|
|
1832
1947
|
children: a
|
|
1833
1948
|
})
|
|
1834
1949
|
]
|
|
1835
1950
|
});
|
|
1836
|
-
},
|
|
1951
|
+
}, Z = {
|
|
1837
1952
|
root: "_root_biiv1_1",
|
|
1838
1953
|
micro: "_micro_biiv1_7",
|
|
1839
1954
|
default: "_default_biiv1_8",
|
|
@@ -1849,13 +1964,13 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1849
1964
|
panelTrigger: "_panelTrigger_biiv1_77",
|
|
1850
1965
|
viewport: "_viewport_biiv1_60",
|
|
1851
1966
|
content: "_content_biiv1_110"
|
|
1852
|
-
},
|
|
1967
|
+
}, ct = {
|
|
1853
1968
|
micro: 14,
|
|
1854
1969
|
default: 14,
|
|
1855
1970
|
large: 21
|
|
1856
|
-
},
|
|
1971
|
+
}, 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 }, f) => {
|
|
1857
1972
|
let p = e.useRef(null), m = e.useRef(!1);
|
|
1858
|
-
|
|
1973
|
+
ut(() => {
|
|
1859
1974
|
let e = p.current;
|
|
1860
1975
|
if (!e || r !== "trigger") return;
|
|
1861
1976
|
let t = () => {
|
|
@@ -1884,8 +1999,8 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1884
1999
|
let h = {
|
|
1885
2000
|
...o,
|
|
1886
2001
|
...i === void 0 ? {} : { "--panel-width": typeof i == "number" ? `${i}px` : i }
|
|
1887
|
-
}, g = r === "trigger" ?
|
|
1888
|
-
return /* @__PURE__ */ u(
|
|
2002
|
+
}, g = r === "trigger" ? Z.panelTrigger : r === "end" ? Z.alignEnd : "";
|
|
2003
|
+
return /* @__PURE__ */ u(lt.Provider, {
|
|
1889
2004
|
value: t,
|
|
1890
2005
|
children: /* @__PURE__ */ d(j.Root, {
|
|
1891
2006
|
...l,
|
|
@@ -1894,68 +2009,68 @@ var tt = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1894
2009
|
},
|
|
1895
2010
|
"aria-label": c,
|
|
1896
2011
|
style: h,
|
|
1897
|
-
className: `${
|
|
2012
|
+
className: `${Z.root} ${Z[t]} ${n === "end" ? Z.alignList : ""} ${g} ${a}`,
|
|
1898
2013
|
children: [s, /* @__PURE__ */ u("div", {
|
|
1899
|
-
className:
|
|
1900
|
-
children: /* @__PURE__ */ u(j.Viewport, { className:
|
|
2014
|
+
className: Z.viewportPosition,
|
|
2015
|
+
children: /* @__PURE__ */ u(j.Viewport, { className: Z.viewport })
|
|
1901
2016
|
})]
|
|
1902
2017
|
})
|
|
1903
2018
|
});
|
|
1904
2019
|
});
|
|
1905
|
-
|
|
1906
|
-
var
|
|
2020
|
+
dt.displayName = "NavigationMenu";
|
|
2021
|
+
var ft = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ u(j.List, {
|
|
1907
2022
|
...t,
|
|
1908
2023
|
ref: n,
|
|
1909
|
-
className: `${
|
|
2024
|
+
className: `${Z.list} ${e}`
|
|
1910
2025
|
}));
|
|
1911
|
-
|
|
1912
|
-
var
|
|
1913
|
-
function
|
|
1914
|
-
let n = e.useContext(
|
|
2026
|
+
ft.displayName = "NavigationMenuList";
|
|
2027
|
+
var pt = j.Item;
|
|
2028
|
+
function mt({ icon: t }) {
|
|
2029
|
+
let n = e.useContext(lt);
|
|
1915
2030
|
return t ? /* @__PURE__ */ u("span", {
|
|
1916
|
-
className:
|
|
2031
|
+
className: Z.icon,
|
|
1917
2032
|
"aria-hidden": "true",
|
|
1918
2033
|
children: e.cloneElement(t, {
|
|
1919
|
-
size:
|
|
2034
|
+
size: ct[n],
|
|
1920
2035
|
color: "currentColor"
|
|
1921
2036
|
})
|
|
1922
2037
|
}) : null;
|
|
1923
2038
|
}
|
|
1924
|
-
var
|
|
1925
|
-
let o = e.useContext(
|
|
2039
|
+
var ht = e.forwardRef(({ className: t = "", icon: n, children: r, ...i }, a) => {
|
|
2040
|
+
let o = e.useContext(lt);
|
|
1926
2041
|
return /* @__PURE__ */ d(j.Trigger, {
|
|
1927
2042
|
...i,
|
|
1928
2043
|
ref: a,
|
|
1929
|
-
className: `${
|
|
2044
|
+
className: `${Z.control} ${t}`,
|
|
1930
2045
|
children: [
|
|
1931
|
-
/* @__PURE__ */ u(
|
|
2046
|
+
/* @__PURE__ */ u(mt, { icon: n }),
|
|
1932
2047
|
r,
|
|
1933
2048
|
/* @__PURE__ */ u("span", {
|
|
1934
|
-
className:
|
|
2049
|
+
className: Z.caret,
|
|
1935
2050
|
"aria-hidden": "true",
|
|
1936
2051
|
children: /* @__PURE__ */ u(h, {
|
|
1937
|
-
size:
|
|
2052
|
+
size: ct[o],
|
|
1938
2053
|
color: "currentColor"
|
|
1939
2054
|
})
|
|
1940
2055
|
})
|
|
1941
2056
|
]
|
|
1942
2057
|
});
|
|
1943
2058
|
});
|
|
1944
|
-
|
|
1945
|
-
var
|
|
2059
|
+
ht.displayName = "NavigationMenuTrigger";
|
|
2060
|
+
var gt = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ u(j.Content, {
|
|
1946
2061
|
...t,
|
|
1947
2062
|
ref: n,
|
|
1948
|
-
className: `${
|
|
2063
|
+
className: `${Z.content} ${e}`
|
|
1949
2064
|
}));
|
|
1950
|
-
|
|
1951
|
-
var
|
|
2065
|
+
gt.displayName = "NavigationMenuContent";
|
|
2066
|
+
var _t = e.forwardRef(({ variant: e = "panel", icon: t, className: n = "", children: r, ...i }, a) => /* @__PURE__ */ u(j.Link, {
|
|
1952
2067
|
...i,
|
|
1953
2068
|
ref: a,
|
|
1954
|
-
className: `${e === "navigation" ?
|
|
1955
|
-
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(
|
|
2069
|
+
className: `${e === "navigation" ? Z.control : Z.link} ${n}`,
|
|
2070
|
+
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(mt, { icon: t }), r] }) : r
|
|
1956
2071
|
}));
|
|
1957
|
-
|
|
1958
|
-
var
|
|
2072
|
+
_t.displayName = "NavigationMenuLink";
|
|
2073
|
+
var Q = {
|
|
1959
2074
|
panel: "_panel_1hiss_6",
|
|
1960
2075
|
header: "_header_1hiss_14",
|
|
1961
2076
|
thread: "_thread_1hiss_15",
|
|
@@ -1986,39 +2101,39 @@ var $ = {
|
|
|
1986
2101
|
};
|
|
1987
2102
|
//#endregion
|
|
1988
2103
|
//#region src/components/Chat/ChatPanel.tsx
|
|
1989
|
-
function
|
|
2104
|
+
function vt({ children: e }) {
|
|
1990
2105
|
return /* @__PURE__ */ u("kbd", {
|
|
1991
|
-
className:
|
|
2106
|
+
className: Q.kbd,
|
|
1992
2107
|
children: e
|
|
1993
2108
|
});
|
|
1994
2109
|
}
|
|
1995
|
-
var
|
|
1996
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1997
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1998
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
2110
|
+
var yt = /* @__PURE__ */ d(l, { children: [
|
|
2111
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(vt, { children: "↵" }), " send"] }),
|
|
2112
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(vt, { children: "⇧↵" }), " new line"] }),
|
|
2113
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(vt, { children: "esc" }), " close"] })
|
|
1999
2114
|
] });
|
|
2000
|
-
function
|
|
2115
|
+
function bt({ header: e, children: t, composer: n, hints: r = yt, className: i = "", threadRef: a, "aria-label": o }) {
|
|
2001
2116
|
return /* @__PURE__ */ d("div", {
|
|
2002
|
-
className: `${
|
|
2117
|
+
className: `${Q.panel} ${i}`,
|
|
2003
2118
|
"aria-label": o,
|
|
2004
2119
|
children: [
|
|
2005
2120
|
e && /* @__PURE__ */ u("div", {
|
|
2006
|
-
className:
|
|
2121
|
+
className: Q.header,
|
|
2007
2122
|
children: e
|
|
2008
2123
|
}),
|
|
2009
2124
|
/* @__PURE__ */ u("div", {
|
|
2010
|
-
className:
|
|
2125
|
+
className: Q.thread,
|
|
2011
2126
|
ref: a,
|
|
2012
2127
|
role: "log",
|
|
2013
2128
|
"aria-live": "polite",
|
|
2014
2129
|
children: t
|
|
2015
2130
|
}),
|
|
2016
2131
|
n && /* @__PURE__ */ u("div", {
|
|
2017
|
-
className:
|
|
2132
|
+
className: Q.footer,
|
|
2018
2133
|
children: n
|
|
2019
2134
|
}),
|
|
2020
2135
|
r !== !1 && r && /* @__PURE__ */ u("div", {
|
|
2021
|
-
className:
|
|
2136
|
+
className: Q.hints,
|
|
2022
2137
|
children: r
|
|
2023
2138
|
})
|
|
2024
2139
|
]
|
|
@@ -2026,39 +2141,39 @@ function mt({ header: e, children: t, composer: n, hints: r = pt, className: i =
|
|
|
2026
2141
|
}
|
|
2027
2142
|
//#endregion
|
|
2028
2143
|
//#region src/components/Chat/Message.tsx
|
|
2029
|
-
function
|
|
2144
|
+
function xt({ children: e, className: t = "" }) {
|
|
2030
2145
|
return /* @__PURE__ */ u("div", {
|
|
2031
|
-
className:
|
|
2146
|
+
className: Q.userRow,
|
|
2032
2147
|
children: /* @__PURE__ */ u("div", {
|
|
2033
|
-
className: `${
|
|
2148
|
+
className: `${Q.userMsg} ${t}`,
|
|
2034
2149
|
children: e
|
|
2035
2150
|
})
|
|
2036
2151
|
});
|
|
2037
2152
|
}
|
|
2038
|
-
function
|
|
2153
|
+
function St({ label: e = "Assistant", icon: t, children: n, className: r = "" }) {
|
|
2039
2154
|
return /* @__PURE__ */ d("div", {
|
|
2040
|
-
className: `${
|
|
2155
|
+
className: `${Q.assistant} ${r}`,
|
|
2041
2156
|
children: [/* @__PURE__ */ d("div", {
|
|
2042
|
-
className:
|
|
2157
|
+
className: Q.assistantHead,
|
|
2043
2158
|
children: [t === void 0 ? /* @__PURE__ */ u(f, {
|
|
2044
2159
|
color: "currentColor",
|
|
2045
2160
|
size: 14
|
|
2046
2161
|
}) : t, /* @__PURE__ */ u("span", { children: e })]
|
|
2047
2162
|
}), /* @__PURE__ */ u("div", {
|
|
2048
|
-
className:
|
|
2163
|
+
className: Q.assistantBody,
|
|
2049
2164
|
children: n
|
|
2050
2165
|
})]
|
|
2051
2166
|
});
|
|
2052
2167
|
}
|
|
2053
2168
|
//#endregion
|
|
2054
2169
|
//#region src/components/Chat/Composer.tsx
|
|
2055
|
-
var
|
|
2170
|
+
var Ct = 18, wt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onStop: a, streaming: c = !1, placeholder: l = "Ask a question…", disabled: m = !1, autoFocus: h = !1, icon: g, maxLines: _ = 6, className: v = "", "aria-label": y = "Message" }, b) {
|
|
2056
2171
|
let x = s(null);
|
|
2057
2172
|
o(b, () => ({ focus: () => x.current?.focus() }), []), i(() => {
|
|
2058
2173
|
let e = x.current;
|
|
2059
2174
|
if (!e) return;
|
|
2060
2175
|
e.style.height = "auto";
|
|
2061
|
-
let t =
|
|
2176
|
+
let t = Ct * _ + 12;
|
|
2062
2177
|
e.style.height = `${Math.min(e.scrollHeight, t)}px`;
|
|
2063
2178
|
}, [e, _]);
|
|
2064
2179
|
let S = !c && !m && e.trim().length > 0, w = r(() => {
|
|
@@ -2069,11 +2184,11 @@ var _t = 18, vt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
2069
2184
|
e
|
|
2070
2185
|
]);
|
|
2071
2186
|
return /* @__PURE__ */ d("div", {
|
|
2072
|
-
className: `${
|
|
2187
|
+
className: `${Q.composer} ${v}`,
|
|
2073
2188
|
children: [/* @__PURE__ */ d("div", {
|
|
2074
|
-
className:
|
|
2189
|
+
className: Q.composerField,
|
|
2075
2190
|
children: [g !== null && /* @__PURE__ */ u("span", {
|
|
2076
|
-
className:
|
|
2191
|
+
className: Q.composerIcon,
|
|
2077
2192
|
"aria-hidden": "true",
|
|
2078
2193
|
children: g === void 0 ? /* @__PURE__ */ u(f, {
|
|
2079
2194
|
color: "currentColor",
|
|
@@ -2081,7 +2196,7 @@ var _t = 18, vt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
2081
2196
|
}) : g
|
|
2082
2197
|
}), /* @__PURE__ */ u("textarea", {
|
|
2083
2198
|
ref: x,
|
|
2084
|
-
className:
|
|
2199
|
+
className: Q.composerInput,
|
|
2085
2200
|
rows: 1,
|
|
2086
2201
|
value: e,
|
|
2087
2202
|
placeholder: l,
|
|
@@ -2094,14 +2209,14 @@ var _t = 18, vt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
2094
2209
|
}
|
|
2095
2210
|
})]
|
|
2096
2211
|
}), /* @__PURE__ */ u("div", {
|
|
2097
|
-
className:
|
|
2098
|
-
children: c ? /* @__PURE__ */ u(
|
|
2212
|
+
className: Q.composerButton,
|
|
2213
|
+
children: c ? /* @__PURE__ */ u(M, {
|
|
2099
2214
|
variant: "secondary",
|
|
2100
2215
|
size: "micro",
|
|
2101
2216
|
"aria-label": "Stop",
|
|
2102
2217
|
iconLeft: /* @__PURE__ */ u(C, {}),
|
|
2103
2218
|
onClick: a
|
|
2104
|
-
}) : /* @__PURE__ */ u(
|
|
2219
|
+
}) : /* @__PURE__ */ u(M, {
|
|
2105
2220
|
variant: "primary",
|
|
2106
2221
|
size: "micro",
|
|
2107
2222
|
"aria-label": "Send",
|
|
@@ -2114,8 +2229,8 @@ var _t = 18, vt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
2114
2229
|
});
|
|
2115
2230
|
//#endregion
|
|
2116
2231
|
//#region src/components/Chat/Citation.tsx
|
|
2117
|
-
function
|
|
2118
|
-
let a = `${
|
|
2232
|
+
function Tt({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
2233
|
+
let a = `${Q.ref} ${i}`;
|
|
2119
2234
|
return t ? /* @__PURE__ */ u("a", {
|
|
2120
2235
|
href: t,
|
|
2121
2236
|
className: a,
|
|
@@ -2132,20 +2247,20 @@ function yt({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
|
2132
2247
|
children: e
|
|
2133
2248
|
});
|
|
2134
2249
|
}
|
|
2135
|
-
function
|
|
2250
|
+
function Et({ items: e, label: t = "Sources", className: n = "" }) {
|
|
2136
2251
|
return e.length === 0 ? null : /* @__PURE__ */ d("div", {
|
|
2137
|
-
className: `${
|
|
2252
|
+
className: `${Q.stack} ${n}`,
|
|
2138
2253
|
children: [/* @__PURE__ */ u("div", {
|
|
2139
|
-
className:
|
|
2254
|
+
className: Q.label,
|
|
2140
2255
|
children: t
|
|
2141
2256
|
}), /* @__PURE__ */ u("div", {
|
|
2142
|
-
className:
|
|
2257
|
+
className: Q.wrap,
|
|
2143
2258
|
children: e.map((e) => {
|
|
2144
|
-
let t = /* @__PURE__ */ d(
|
|
2259
|
+
let t = /* @__PURE__ */ d(Fe, {
|
|
2145
2260
|
icon: e.icon,
|
|
2146
2261
|
children: [
|
|
2147
2262
|
/* @__PURE__ */ u("span", {
|
|
2148
|
-
className:
|
|
2263
|
+
className: Q.citationNumber,
|
|
2149
2264
|
children: e.n
|
|
2150
2265
|
}),
|
|
2151
2266
|
" ",
|
|
@@ -2154,12 +2269,12 @@ function bt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
2154
2269
|
});
|
|
2155
2270
|
return e.href ? /* @__PURE__ */ u("a", {
|
|
2156
2271
|
href: e.href,
|
|
2157
|
-
className:
|
|
2272
|
+
className: Q.citationLink,
|
|
2158
2273
|
onClick: e.onClick,
|
|
2159
2274
|
children: t
|
|
2160
2275
|
}, e.n) : /* @__PURE__ */ u("button", {
|
|
2161
2276
|
type: "button",
|
|
2162
|
-
className:
|
|
2277
|
+
className: Q.citationLink,
|
|
2163
2278
|
onClick: e.onClick,
|
|
2164
2279
|
children: t
|
|
2165
2280
|
}, e.n);
|
|
@@ -2169,27 +2284,27 @@ function bt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
2169
2284
|
}
|
|
2170
2285
|
//#endregion
|
|
2171
2286
|
//#region src/components/Chat/StreamStatus.tsx
|
|
2172
|
-
function
|
|
2287
|
+
function Dt({ children: e, className: t = "" }) {
|
|
2173
2288
|
return /* @__PURE__ */ d("div", {
|
|
2174
|
-
className: `${
|
|
2289
|
+
className: `${Q.status} ${t}`,
|
|
2175
2290
|
role: "status",
|
|
2176
2291
|
children: [/* @__PURE__ */ u("span", {
|
|
2177
|
-
className:
|
|
2178
|
-
children: /* @__PURE__ */ u(
|
|
2292
|
+
className: Q.statusSpinner,
|
|
2293
|
+
children: /* @__PURE__ */ u(ie, { size: 14 })
|
|
2179
2294
|
}), /* @__PURE__ */ u("span", { children: e })]
|
|
2180
2295
|
});
|
|
2181
2296
|
}
|
|
2182
2297
|
//#endregion
|
|
2183
2298
|
//#region src/components/Chat/Suggestions.tsx
|
|
2184
|
-
function
|
|
2299
|
+
function Ot({ items: e, onPick: t, label: n = "Try asking", className: r = "" }) {
|
|
2185
2300
|
return /* @__PURE__ */ d("div", {
|
|
2186
|
-
className: `${
|
|
2301
|
+
className: `${Q.suggestions} ${r}`,
|
|
2187
2302
|
children: [/* @__PURE__ */ u("div", {
|
|
2188
|
-
className:
|
|
2303
|
+
className: Q.label,
|
|
2189
2304
|
children: n
|
|
2190
2305
|
}), /* @__PURE__ */ u("div", {
|
|
2191
|
-
className:
|
|
2192
|
-
children: e.map((e) => /* @__PURE__ */ u(
|
|
2306
|
+
className: Q.wrap,
|
|
2307
|
+
children: e.map((e) => /* @__PURE__ */ u(M, {
|
|
2193
2308
|
variant: "secondary",
|
|
2194
2309
|
size: "micro",
|
|
2195
2310
|
onClick: () => t(e),
|
|
@@ -2200,19 +2315,19 @@ function St({ items: e, onPick: t, label: n = "Try asking", className: r = "" })
|
|
|
2200
2315
|
}
|
|
2201
2316
|
//#endregion
|
|
2202
2317
|
//#region src/components/Chat/AnswerActions.tsx
|
|
2203
|
-
function
|
|
2318
|
+
function kt({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask a follow-up", className: i = "" }) {
|
|
2204
2319
|
return /* @__PURE__ */ d("div", {
|
|
2205
|
-
className: `${
|
|
2320
|
+
className: `${Q.actions} ${i}`,
|
|
2206
2321
|
children: [
|
|
2207
|
-
e && /* @__PURE__ */ u(
|
|
2322
|
+
e && /* @__PURE__ */ u(M, {
|
|
2208
2323
|
variant: "ghost",
|
|
2209
2324
|
size: "micro",
|
|
2210
2325
|
iconLeft: u(t ? m : v, {}),
|
|
2211
2326
|
onClick: e,
|
|
2212
2327
|
children: t ? "Copied" : "Copy"
|
|
2213
2328
|
}),
|
|
2214
|
-
/* @__PURE__ */ u("span", { className:
|
|
2215
|
-
n && /* @__PURE__ */ u(
|
|
2329
|
+
/* @__PURE__ */ u("span", { className: Q.actionsSpacer }),
|
|
2330
|
+
n && /* @__PURE__ */ u(M, {
|
|
2216
2331
|
variant: "ghost",
|
|
2217
2332
|
size: "micro",
|
|
2218
2333
|
iconRight: /* @__PURE__ */ u(_, {}),
|
|
@@ -2222,21 +2337,21 @@ function Ct({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask
|
|
|
2222
2337
|
]
|
|
2223
2338
|
});
|
|
2224
2339
|
}
|
|
2225
|
-
var
|
|
2340
|
+
var At = {
|
|
2226
2341
|
truncate: "_truncate_za4sm_1",
|
|
2227
2342
|
start: "_start_za4sm_13"
|
|
2228
2343
|
};
|
|
2229
2344
|
//#endregion
|
|
2230
2345
|
//#region src/components/Truncate/Truncate.tsx
|
|
2231
|
-
function
|
|
2346
|
+
function jt({ children: e, side: t = "end", title: n, className: r = "" }) {
|
|
2232
2347
|
let i = n ?? (typeof e == "string" ? e : void 0);
|
|
2233
2348
|
return /* @__PURE__ */ u("span", {
|
|
2234
|
-
className: `${
|
|
2349
|
+
className: `${At.truncate} ${t === "start" ? At.start : ""} ${r}`,
|
|
2235
2350
|
title: i,
|
|
2236
2351
|
children: t === "start" ? /* @__PURE__ */ u("bdi", { children: e }) : e
|
|
2237
2352
|
});
|
|
2238
2353
|
}
|
|
2239
|
-
var
|
|
2354
|
+
var $ = {
|
|
2240
2355
|
disclosure: "_disclosure_94bgy_1",
|
|
2241
2356
|
trigger: "_trigger_94bgy_7",
|
|
2242
2357
|
summary: "_summary_94bgy_31",
|
|
@@ -2245,24 +2360,24 @@ var Et = {
|
|
|
2245
2360
|
};
|
|
2246
2361
|
//#endregion
|
|
2247
2362
|
//#region src/components/Disclosure/Disclosure.tsx
|
|
2248
|
-
function
|
|
2363
|
+
function Mt({ summary: t, children: n, open: r, defaultOpen: i = !1, onOpenChange: a, className: o = "" }) {
|
|
2249
2364
|
let [s, c] = e.useState(i), l = r ?? s, f = e.useId();
|
|
2250
2365
|
return /* @__PURE__ */ d("div", {
|
|
2251
|
-
className: `${
|
|
2366
|
+
className: `${$.disclosure} ${o}`,
|
|
2252
2367
|
"data-state": l ? "open" : "closed",
|
|
2253
2368
|
children: [/* @__PURE__ */ d("button", {
|
|
2254
2369
|
type: "button",
|
|
2255
|
-
className:
|
|
2370
|
+
className: $.trigger,
|
|
2256
2371
|
"aria-expanded": l,
|
|
2257
2372
|
"aria-controls": l ? f : void 0,
|
|
2258
2373
|
onClick: () => {
|
|
2259
2374
|
r === void 0 && c(!l), a?.(!l);
|
|
2260
2375
|
},
|
|
2261
2376
|
children: [/* @__PURE__ */ u("span", {
|
|
2262
|
-
className:
|
|
2377
|
+
className: $.summary,
|
|
2263
2378
|
children: t
|
|
2264
2379
|
}), /* @__PURE__ */ u("span", {
|
|
2265
|
-
className:
|
|
2380
|
+
className: $.chevron,
|
|
2266
2381
|
"aria-hidden": "true",
|
|
2267
2382
|
children: u(l ? h : _, {
|
|
2268
2383
|
size: 14,
|
|
@@ -2271,10 +2386,10 @@ function Dt({ summary: t, children: n, open: r, defaultOpen: i = !1, onOpenChang
|
|
|
2271
2386
|
})]
|
|
2272
2387
|
}), l && /* @__PURE__ */ u("div", {
|
|
2273
2388
|
id: f,
|
|
2274
|
-
className:
|
|
2389
|
+
className: $.content,
|
|
2275
2390
|
children: n
|
|
2276
2391
|
})]
|
|
2277
2392
|
});
|
|
2278
2393
|
}
|
|
2279
2394
|
//#endregion
|
|
2280
|
-
export {
|
|
2395
|
+
export { Re as Alert, Be as AlertDescription, ze as AlertTitle, kt as AnswerActions, St as AssistantMessage, se as Base, je as Breadcrumbs, M as Button, Xe as Chart, bt as ChatPanel, ae as Checkbox, Fe as Chip, Et as CitationList, Tt as CitationRef, wt as Composer, st as DatePicker, Mt 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 };
|