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