@indxsearch/systm 2.11.1 → 2.12.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 +6 -0
- package/README.md +9 -5
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +12 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +177 -152
- package/dist/systm.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -7,7 +7,7 @@ import * as O from "@radix-ui/react-popover";
|
|
|
7
7
|
import * as k from "@radix-ui/react-tooltip";
|
|
8
8
|
import * as A from "@radix-ui/react-dialog";
|
|
9
9
|
import * as j from "@radix-ui/react-navigation-menu";
|
|
10
|
-
var
|
|
10
|
+
var M = {
|
|
11
11
|
button: "_button_15lsu_1",
|
|
12
12
|
micro: "_micro_15lsu_29",
|
|
13
13
|
default: "_default_15lsu_37",
|
|
@@ -15,10 +15,10 @@ var ee = {
|
|
|
15
15
|
primary: "_primary_15lsu_54",
|
|
16
16
|
secondary: "_secondary_15lsu_64",
|
|
17
17
|
ghost: "_ghost_15lsu_74"
|
|
18
|
-
},
|
|
18
|
+
}, ee = {
|
|
19
19
|
spinner: "_spinner_wspyi_1",
|
|
20
20
|
frame: "_frame_wspyi_8"
|
|
21
|
-
},
|
|
21
|
+
}, te = {
|
|
22
22
|
accelerate: {
|
|
23
23
|
viewBox: "0 0 7 5",
|
|
24
24
|
delay: 50,
|
|
@@ -279,13 +279,13 @@ var ee = {
|
|
|
279
279
|
"M3 4H4V5H3V4Z M5 3H6V4H5V3Z M6 1H7V2H6V1Z M1 3H2V4H1V3Z M0 1H1V2H0V1Z M2 2H5V3H2V2Z M1 0H6V1H1V0Z"
|
|
280
280
|
]
|
|
281
281
|
}
|
|
282
|
-
},
|
|
282
|
+
}, ne = Object.keys(te);
|
|
283
283
|
//#endregion
|
|
284
284
|
//#region src/components/Spinner/Spinner.tsx
|
|
285
|
-
function
|
|
286
|
-
let o =
|
|
285
|
+
function N({ name: e = ne[0], size: t = 21, color: n = "currentColor", delay: r, className: i = "", "aria-label": a = "Loading" }) {
|
|
286
|
+
let o = te[e], [, , s, c] = o.viewBox.split(" ").map(Number), l = c / s, d = typeof t == "number" ? t * l : `calc(${t} * ${l})`, f = r ?? o.delay, p = o.frames.length, m = p * f;
|
|
287
287
|
return /* @__PURE__ */ u("svg", {
|
|
288
|
-
className: `${
|
|
288
|
+
className: `${ee.spinner} ${i}`,
|
|
289
289
|
width: t,
|
|
290
290
|
height: d,
|
|
291
291
|
viewBox: o.viewBox,
|
|
@@ -294,7 +294,7 @@ function M({ name: e = re[0], size: t = 21, color: n = "currentColor", delay: r,
|
|
|
294
294
|
"aria-label": a,
|
|
295
295
|
xmlns: "http://www.w3.org/2000/svg",
|
|
296
296
|
children: o.frames.map((e, t) => e ? /* @__PURE__ */ u("path", {
|
|
297
|
-
className:
|
|
297
|
+
className: ee.frame,
|
|
298
298
|
d: e,
|
|
299
299
|
fill: n,
|
|
300
300
|
style: {
|
|
@@ -306,15 +306,15 @@ function M({ 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
|
|
309
|
+
function P(t) {
|
|
310
310
|
let { size: n = "default", variant: r = "primary", iconLeft: i, iconRight: a, className: o, children: s, loading: c = !1, ...f } = t, p = t.disabled || c, { href: m } = f, h = n === "micro" ? "14px" : n === "large" ? "21px" : "14px", g = n === "large" ? 21 : 14, _ = [
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
311
|
+
M.button,
|
|
312
|
+
M[n],
|
|
313
|
+
M[r],
|
|
314
314
|
p ? "cursor-not-allowed" : "cursor-pointer",
|
|
315
315
|
o
|
|
316
316
|
].filter(Boolean).join(" "), v = /* @__PURE__ */ d(l, { children: [
|
|
317
|
-
c ? /* @__PURE__ */ u(
|
|
317
|
+
c ? /* @__PURE__ */ u(N, { size: g }) : i && e.cloneElement(i, {
|
|
318
318
|
size: h,
|
|
319
319
|
color: "currentColor"
|
|
320
320
|
}),
|
|
@@ -355,57 +355,57 @@ function N(t) {
|
|
|
355
355
|
children: v
|
|
356
356
|
});
|
|
357
357
|
}
|
|
358
|
-
var
|
|
358
|
+
var F = {
|
|
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
|
+
}, re = ({ label: t, score: n, className: r = "", id: i, "aria-label": a, ...o }) => {
|
|
365
365
|
let s = e.useId(), c = i || s, l = n ? `${c}-score` : void 0, f = o.disabled;
|
|
366
366
|
return t || n ? /* @__PURE__ */ d("label", {
|
|
367
367
|
htmlFor: c,
|
|
368
|
-
className: `${
|
|
368
|
+
className: `${F.checkboxWrapper} ${r} ${f ? F.disabled : ""} ${f ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
369
369
|
children: [
|
|
370
370
|
/* @__PURE__ */ u("input", {
|
|
371
371
|
id: c,
|
|
372
372
|
type: "checkbox",
|
|
373
|
-
className:
|
|
373
|
+
className: F.checkbox,
|
|
374
374
|
"aria-describedby": l,
|
|
375
375
|
"aria-label": a,
|
|
376
376
|
...o
|
|
377
377
|
}),
|
|
378
378
|
t && /* @__PURE__ */ u("span", {
|
|
379
|
-
className:
|
|
379
|
+
className: F.label,
|
|
380
380
|
children: t
|
|
381
381
|
}),
|
|
382
382
|
n && /* @__PURE__ */ u("span", {
|
|
383
383
|
id: l,
|
|
384
|
-
className:
|
|
384
|
+
className: F.score,
|
|
385
385
|
children: n
|
|
386
386
|
})
|
|
387
387
|
]
|
|
388
388
|
}) : /* @__PURE__ */ u("input", {
|
|
389
389
|
id: c,
|
|
390
390
|
type: "checkbox",
|
|
391
|
-
className: `${
|
|
391
|
+
className: `${F.checkbox} ${r}`,
|
|
392
392
|
"aria-label": a,
|
|
393
393
|
disabled: f,
|
|
394
394
|
...o
|
|
395
395
|
});
|
|
396
|
-
},
|
|
396
|
+
}, ie = {
|
|
397
397
|
container: "_container_dlzj1_1",
|
|
398
398
|
default: "_default_dlzj1_5"
|
|
399
399
|
};
|
|
400
400
|
//#endregion
|
|
401
401
|
//#region src/components/Base/Base.tsx
|
|
402
|
-
function
|
|
402
|
+
function ae({ children: e, className: t }) {
|
|
403
403
|
return /* @__PURE__ */ u("div", {
|
|
404
|
-
className: `${
|
|
404
|
+
className: `${ie.container} ${ie.default} ${t || ""}`,
|
|
405
405
|
children: e
|
|
406
406
|
});
|
|
407
407
|
}
|
|
408
|
-
var
|
|
408
|
+
var I = {
|
|
409
409
|
container: "_container_10bfq_1",
|
|
410
410
|
header: "_header_10bfq_11",
|
|
411
411
|
title: "_title_10bfq_31",
|
|
@@ -414,15 +414,15 @@ var F = {
|
|
|
414
414
|
};
|
|
415
415
|
//#endregion
|
|
416
416
|
//#region src/components/FilterPanelBase/FilterPanelBase.tsx
|
|
417
|
-
function
|
|
417
|
+
function oe({ title: t, children: n, className: r = "", collapsible: a = !0, collapsed: o = !1 }) {
|
|
418
418
|
let [s, l] = c(() => !o), f = e.useId();
|
|
419
419
|
return i(() => {
|
|
420
420
|
a && l(!o);
|
|
421
421
|
}, [o, a]), /* @__PURE__ */ d("div", {
|
|
422
|
-
className: `${
|
|
422
|
+
className: `${I.container} ${r}`,
|
|
423
423
|
children: [t && (a ? /* @__PURE__ */ d("button", {
|
|
424
424
|
type: "button",
|
|
425
|
-
className:
|
|
425
|
+
className: I.header,
|
|
426
426
|
onClick: () => {
|
|
427
427
|
a && l((e) => !e);
|
|
428
428
|
},
|
|
@@ -430,7 +430,7 @@ function se({ title: t, children: n, className: r = "", collapsible: a = !0, col
|
|
|
430
430
|
"aria-expanded": s,
|
|
431
431
|
"aria-controls": f,
|
|
432
432
|
children: [/* @__PURE__ */ u("div", {
|
|
433
|
-
className:
|
|
433
|
+
className: I.title,
|
|
434
434
|
children: t
|
|
435
435
|
}), /* @__PURE__ */ u("span", {
|
|
436
436
|
"aria-hidden": "true",
|
|
@@ -440,21 +440,21 @@ function se({ title: t, children: n, className: r = "", collapsible: a = !0, col
|
|
|
440
440
|
})
|
|
441
441
|
})]
|
|
442
442
|
}) : /* @__PURE__ */ u("div", {
|
|
443
|
-
className:
|
|
443
|
+
className: I.header,
|
|
444
444
|
children: /* @__PURE__ */ u("div", {
|
|
445
|
-
className:
|
|
445
|
+
className: I.title,
|
|
446
446
|
children: t
|
|
447
447
|
})
|
|
448
448
|
})), (!a || s) && /* @__PURE__ */ u("div", {
|
|
449
449
|
id: f,
|
|
450
|
-
className:
|
|
450
|
+
className: I.body,
|
|
451
451
|
role: "region",
|
|
452
452
|
"aria-label": t || "Filter panel content",
|
|
453
453
|
children: n
|
|
454
454
|
})]
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
var
|
|
457
|
+
var L = {
|
|
458
458
|
wrapper: "_wrapper_tf1yl_1",
|
|
459
459
|
label: "_label_tf1yl_7",
|
|
460
460
|
inputContainer: "_inputContainer_tf1yl_12",
|
|
@@ -466,27 +466,27 @@ var I = {
|
|
|
466
466
|
sizeDefault: "_sizeDefault_tf1yl_87",
|
|
467
467
|
error: "_error_tf1yl_110",
|
|
468
468
|
errorText: "_errorText_tf1yl_114"
|
|
469
|
-
},
|
|
469
|
+
}, se = {
|
|
470
470
|
micro: 14,
|
|
471
471
|
default: 21
|
|
472
472
|
};
|
|
473
|
-
function
|
|
474
|
-
let g = s(null), _ = e.useId(), v = p || _, y = `${v}-error`, b =
|
|
473
|
+
function ce({ label: t, error: n, className: r = "", showSearchIcon: i = !0, searchIcon: a, searchIconColor: o, inputSize: c = "default", showFocusBorder: l = !1, children: f, id: p, type: m = "search", ...h }) {
|
|
474
|
+
let g = s(null), _ = e.useId(), v = p || _, y = `${v}-error`, b = se[c], x = {};
|
|
475
475
|
o && (x["--search-icon-color"] = o);
|
|
476
|
-
let C = a ?? /* @__PURE__ */ u(S, {}), w = c === "micro" ?
|
|
476
|
+
let C = a ?? /* @__PURE__ */ u(S, {}), w = c === "micro" ? L.sizeMicro : L.sizeDefault;
|
|
477
477
|
return /* @__PURE__ */ d("div", {
|
|
478
|
-
className: `${
|
|
478
|
+
className: `${L.wrapper} ${r}`,
|
|
479
479
|
children: [
|
|
480
480
|
t && /* @__PURE__ */ u("label", {
|
|
481
481
|
htmlFor: v,
|
|
482
|
-
className:
|
|
482
|
+
className: L.label,
|
|
483
483
|
children: t
|
|
484
484
|
}),
|
|
485
485
|
/* @__PURE__ */ d("div", {
|
|
486
|
-
className: `${
|
|
486
|
+
className: `${L.inputContainer} ${w}`,
|
|
487
487
|
children: [
|
|
488
488
|
i && /* @__PURE__ */ u("span", {
|
|
489
|
-
className:
|
|
489
|
+
className: L.searchIcon,
|
|
490
490
|
"aria-hidden": "true",
|
|
491
491
|
children: e.cloneElement(C, {
|
|
492
492
|
size: b,
|
|
@@ -497,28 +497,28 @@ function le({ label: t, error: n, className: r = "", showSearchIcon: i = !0, sea
|
|
|
497
497
|
ref: g,
|
|
498
498
|
id: v,
|
|
499
499
|
type: m,
|
|
500
|
-
className: `${
|
|
500
|
+
className: `${L.input} ${l ? L.focus : ""} ${n ? L.error : ""}`,
|
|
501
501
|
style: x,
|
|
502
502
|
"aria-invalid": n ? "true" : "false",
|
|
503
503
|
"aria-describedby": n ? y : void 0,
|
|
504
504
|
...h
|
|
505
505
|
}),
|
|
506
506
|
f && /* @__PURE__ */ u("div", {
|
|
507
|
-
className:
|
|
507
|
+
className: L.rightContent,
|
|
508
508
|
children: f
|
|
509
509
|
})
|
|
510
510
|
]
|
|
511
511
|
}),
|
|
512
512
|
n && /* @__PURE__ */ u("span", {
|
|
513
513
|
id: y,
|
|
514
|
-
className:
|
|
514
|
+
className: L.errorText,
|
|
515
515
|
role: "alert",
|
|
516
516
|
children: n
|
|
517
517
|
})
|
|
518
518
|
]
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var R = {
|
|
522
522
|
wrapper: "_wrapper_su5p5_1",
|
|
523
523
|
label: "_label_su5p5_7",
|
|
524
524
|
input: "_input_su5p5_12",
|
|
@@ -528,14 +528,14 @@ var L = {
|
|
|
528
528
|
};
|
|
529
529
|
//#endregion
|
|
530
530
|
//#region src/components/InputField/InputField.tsx
|
|
531
|
-
function
|
|
531
|
+
function le({ label: t, error: n, className: r = "", isValid: i = !0, variant: a = "default", id: o, ...s }) {
|
|
532
532
|
let c = e.useId(), l = o || c, f = `${l}-error`, p = n || !i;
|
|
533
533
|
return /* @__PURE__ */ d("div", {
|
|
534
|
-
className: `${
|
|
534
|
+
className: `${R.wrapper} ${r}`,
|
|
535
535
|
children: [
|
|
536
536
|
t && /* @__PURE__ */ d("label", {
|
|
537
537
|
htmlFor: l,
|
|
538
|
-
className:
|
|
538
|
+
className: R.label,
|
|
539
539
|
children: [t, s.required && /* @__PURE__ */ u("span", {
|
|
540
540
|
"aria-label": "required",
|
|
541
541
|
children: " *"
|
|
@@ -543,21 +543,21 @@ function ue({ label: t, error: n, className: r = "", isValid: i = !0, variant: a
|
|
|
543
543
|
}),
|
|
544
544
|
/* @__PURE__ */ u("input", {
|
|
545
545
|
id: l,
|
|
546
|
-
className: `${
|
|
546
|
+
className: `${R.input} ${a === "borderBottom" ? R.borderBottom : ""} ${p ? R.error : ""}`,
|
|
547
547
|
"aria-invalid": p ? "true" : "false",
|
|
548
548
|
"aria-describedby": n ? f : void 0,
|
|
549
549
|
...s
|
|
550
550
|
}),
|
|
551
551
|
n && /* @__PURE__ */ u("span", {
|
|
552
552
|
id: f,
|
|
553
|
-
className:
|
|
553
|
+
className: R.errorText,
|
|
554
554
|
role: "alert",
|
|
555
555
|
children: n
|
|
556
556
|
})
|
|
557
557
|
]
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var ue = {
|
|
561
561
|
radioWrapper: "_radioWrapper_1faq0_1",
|
|
562
562
|
radioInput: "_radioInput_1faq0_9",
|
|
563
563
|
customRadio: "_customRadio_1faq0_23",
|
|
@@ -565,7 +565,7 @@ var R = {
|
|
|
565
565
|
disabled: "_disabled_1faq0_63"
|
|
566
566
|
}, de = ({ id: e, name: t, value: n, label: r, checked: i = !1, onChange: a, disabled: o = !1, "aria-label": s }) => /* @__PURE__ */ d("label", {
|
|
567
567
|
htmlFor: e,
|
|
568
|
-
className: `${
|
|
568
|
+
className: `${ue.radioWrapper} ${o ? ue.disabled : ""} ${o ? "cursor-not-allowed" : "cursor-pointer"}`,
|
|
569
569
|
children: [
|
|
570
570
|
/* @__PURE__ */ u("input", {
|
|
571
571
|
id: e,
|
|
@@ -576,11 +576,11 @@ var R = {
|
|
|
576
576
|
onChange: a,
|
|
577
577
|
disabled: o,
|
|
578
578
|
"aria-label": s,
|
|
579
|
-
className:
|
|
579
|
+
className: ue.radioInput
|
|
580
580
|
}),
|
|
581
|
-
/* @__PURE__ */ u("span", { className:
|
|
581
|
+
/* @__PURE__ */ u("span", { className: ue.customRadio }),
|
|
582
582
|
/* @__PURE__ */ u("span", {
|
|
583
|
-
className:
|
|
583
|
+
className: ue.labelText,
|
|
584
584
|
children: r
|
|
585
585
|
})
|
|
586
586
|
]
|
|
@@ -1343,7 +1343,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1343
1343
|
height: y,
|
|
1344
1344
|
fill: "var(--chart-column-hover)"
|
|
1345
1345
|
});
|
|
1346
|
-
})() : null,
|
|
1346
|
+
})() : null, M = () => e.map((e, t) => {
|
|
1347
1347
|
if (!e.data.length) return null;
|
|
1348
1348
|
let n = e.color ?? Be;
|
|
1349
1349
|
return /* @__PURE__ */ d("g", { children: [/* @__PURE__ */ u("polyline", {
|
|
@@ -1363,7 +1363,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1363
1363
|
fill: n
|
|
1364
1364
|
}, t);
|
|
1365
1365
|
})] }, t);
|
|
1366
|
-
}),
|
|
1366
|
+
}), ee = () => {
|
|
1367
1367
|
if (!w) return null;
|
|
1368
1368
|
let t = e.length, n = v / w, r = Math.max((n - 2 * (t + 1)) / t, 2), i = K + y;
|
|
1369
1369
|
return e.map((e, t) => e.data.map((a, o) => {
|
|
@@ -1376,7 +1376,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1376
1376
|
fill: e.color ?? "var(--chart-bar)"
|
|
1377
1377
|
}, `${t}-${o}`);
|
|
1378
1378
|
}));
|
|
1379
|
-
},
|
|
1379
|
+
}, te = () => {
|
|
1380
1380
|
if (!t?.length) return null;
|
|
1381
1381
|
let e = K + y + 18;
|
|
1382
1382
|
return t.map((t, r) => /* @__PURE__ */ u("text", {
|
|
@@ -1387,7 +1387,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1387
1387
|
style: { font: "var(--text-2xs)" },
|
|
1388
1388
|
children: t
|
|
1389
1389
|
}, r));
|
|
1390
|
-
},
|
|
1390
|
+
}, ne = h && n === "line" ? /* @__PURE__ */ u("line", {
|
|
1391
1391
|
x1: E(h.index),
|
|
1392
1392
|
y1: K,
|
|
1393
1393
|
x2: E(h.index),
|
|
@@ -1395,7 +1395,7 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1395
1395
|
stroke: "var(--chart-crosshair)",
|
|
1396
1396
|
strokeWidth: "1",
|
|
1397
1397
|
strokeDasharray: "3 3"
|
|
1398
|
-
}) : null,
|
|
1398
|
+
}) : null, N = h ? (() => {
|
|
1399
1399
|
let n = t?.[h.index] ?? String(h.index + 1), r = Math.min(Math.max(h.x, 60), p - 60);
|
|
1400
1400
|
return /* @__PURE__ */ d("div", {
|
|
1401
1401
|
className: G.tooltip,
|
|
@@ -1446,11 +1446,11 @@ function Ge({ series: e, labels: t, type: n = "line", height: a = 200, showLegen
|
|
|
1446
1446
|
k,
|
|
1447
1447
|
A,
|
|
1448
1448
|
j,
|
|
1449
|
-
|
|
1450
|
-
n === "line" ?
|
|
1451
|
-
|
|
1449
|
+
ne,
|
|
1450
|
+
n === "line" ? M() : ee(),
|
|
1451
|
+
te()
|
|
1452
1452
|
]
|
|
1453
|
-
}),
|
|
1453
|
+
}), N]
|
|
1454
1454
|
}), o && e.length > 1 && /* @__PURE__ */ u("div", {
|
|
1455
1455
|
className: G.legend,
|
|
1456
1456
|
children: e.map((e, t) => /* @__PURE__ */ d("div", {
|
|
@@ -1594,7 +1594,7 @@ function Ze(e, t) {
|
|
|
1594
1594
|
return r;
|
|
1595
1595
|
}
|
|
1596
1596
|
var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", error: a, isValid: o = !0, disabled: s = !1, className: l = "", formatDate: f = Z }) => {
|
|
1597
|
-
let p = e.useId(), m = `${p}-error`, v = !!a || !o, [y, b] = c(!1), x = /* @__PURE__ */ new Date(), S = t ?? x, [C, w] = c(S.getFullYear()), [T, E] = c(S.getMonth()), [D, k] = c(S), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1),
|
|
1597
|
+
let p = e.useId(), m = `${p}-error`, v = !!a || !o, [y, b] = c(!1), x = /* @__PURE__ */ new Date(), S = t ?? x, [C, w] = c(S.getFullYear()), [T, E] = c(S.getMonth()), [D, k] = c(S), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1), M = (e) => {
|
|
1598
1598
|
if (e) {
|
|
1599
1599
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
1600
1600
|
k(e), w(e.getFullYear()), E(e.getMonth());
|
|
@@ -1604,7 +1604,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1604
1604
|
e.useEffect(() => {
|
|
1605
1605
|
j.current &&= (A.current.get(Z(D))?.focus(), !1);
|
|
1606
1606
|
}, [D]);
|
|
1607
|
-
let
|
|
1607
|
+
let ee = (e, t) => {
|
|
1608
1608
|
let n = new Date(t), r = {
|
|
1609
1609
|
ArrowLeft: -1,
|
|
1610
1610
|
ArrowRight: 1,
|
|
@@ -1623,13 +1623,13 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1623
1623
|
e.useEffect(() => {
|
|
1624
1624
|
y && t && (w(t.getFullYear()), E(t.getMonth()));
|
|
1625
1625
|
}, [y]);
|
|
1626
|
-
let
|
|
1626
|
+
let te = () => {
|
|
1627
1627
|
T === 0 ? (E(11), w(C - 1)) : E(T - 1);
|
|
1628
|
-
},
|
|
1628
|
+
}, ne = () => {
|
|
1629
1629
|
T === 11 ? (E(0), w(C + 1)) : E(T + 1);
|
|
1630
|
-
},
|
|
1630
|
+
}, N = (e) => {
|
|
1631
1631
|
n?.(e), b(!1);
|
|
1632
|
-
},
|
|
1632
|
+
}, P = Ze(C, T);
|
|
1633
1633
|
return /* @__PURE__ */ d("div", {
|
|
1634
1634
|
className: `${X.wrapper} ${l}`,
|
|
1635
1635
|
children: [
|
|
@@ -1640,7 +1640,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1640
1640
|
}),
|
|
1641
1641
|
/* @__PURE__ */ d(O.Root, {
|
|
1642
1642
|
open: y,
|
|
1643
|
-
onOpenChange:
|
|
1643
|
+
onOpenChange: M,
|
|
1644
1644
|
children: [/* @__PURE__ */ u(O.Trigger, {
|
|
1645
1645
|
asChild: !0,
|
|
1646
1646
|
children: /* @__PURE__ */ d("button", {
|
|
@@ -1674,7 +1674,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1674
1674
|
/* @__PURE__ */ u("button", {
|
|
1675
1675
|
type: "button",
|
|
1676
1676
|
className: X.navButton,
|
|
1677
|
-
onClick:
|
|
1677
|
+
onClick: te,
|
|
1678
1678
|
"aria-label": "Previous month",
|
|
1679
1679
|
children: /* @__PURE__ */ u(g, {
|
|
1680
1680
|
size: 14,
|
|
@@ -1692,7 +1692,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1692
1692
|
/* @__PURE__ */ u("button", {
|
|
1693
1693
|
type: "button",
|
|
1694
1694
|
className: X.navButton,
|
|
1695
|
-
onClick:
|
|
1695
|
+
onClick: ne,
|
|
1696
1696
|
"aria-label": "Next month",
|
|
1697
1697
|
children: /* @__PURE__ */ u(_, {
|
|
1698
1698
|
size: 14,
|
|
@@ -1710,7 +1710,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1710
1710
|
}),
|
|
1711
1711
|
/* @__PURE__ */ u("div", {
|
|
1712
1712
|
className: X.grid,
|
|
1713
|
-
children:
|
|
1713
|
+
children: P.map((e) => {
|
|
1714
1714
|
let n = e.getMonth() !== T, r = Xe(e, t), i = Xe(e, x);
|
|
1715
1715
|
return /* @__PURE__ */ u("button", {
|
|
1716
1716
|
type: "button",
|
|
@@ -1720,7 +1720,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1720
1720
|
r ? X.selected : "",
|
|
1721
1721
|
i && !r ? X.today : ""
|
|
1722
1722
|
].filter(Boolean).join(" "),
|
|
1723
|
-
onClick: () =>
|
|
1723
|
+
onClick: () => N(e),
|
|
1724
1724
|
ref: (t) => {
|
|
1725
1725
|
t ? A.current.set(Z(e), t) : A.current.delete(Z(e));
|
|
1726
1726
|
},
|
|
@@ -1733,7 +1733,7 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1733
1733
|
"aria-pressed": r,
|
|
1734
1734
|
"aria-current": i ? "date" : void 0,
|
|
1735
1735
|
tabIndex: Xe(e, D) || D.getMonth() !== T && e.getDate() === 1 && !n ? 0 : -1,
|
|
1736
|
-
onKeyDown: (t) =>
|
|
1736
|
+
onKeyDown: (t) => ee(t, e),
|
|
1737
1737
|
children: e.getDate()
|
|
1738
1738
|
}, e.toISOString());
|
|
1739
1739
|
})
|
|
@@ -1750,71 +1750,96 @@ var Qe = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
1750
1750
|
]
|
|
1751
1751
|
});
|
|
1752
1752
|
}, Q = {
|
|
1753
|
-
root: "
|
|
1754
|
-
micro: "
|
|
1755
|
-
default: "
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
|
|
1753
|
+
root: "_root_qu8jg_1",
|
|
1754
|
+
micro: "_micro_qu8jg_7",
|
|
1755
|
+
default: "_default_qu8jg_8",
|
|
1756
|
+
large: "_large_qu8jg_9",
|
|
1757
|
+
list: "_list_qu8jg_11",
|
|
1758
|
+
alignEnd: "_alignEnd_qu8jg_24",
|
|
1759
|
+
control: "_control_qu8jg_29",
|
|
1760
|
+
link: "_link_qu8jg_55",
|
|
1761
|
+
icon: "_icon_qu8jg_56",
|
|
1762
|
+
caret: "_caret_qu8jg_56",
|
|
1763
|
+
viewportPosition: "_viewportPosition_qu8jg_59",
|
|
1764
|
+
viewport: "_viewport_qu8jg_59",
|
|
1765
|
+
content: "_content_qu8jg_85"
|
|
1766
|
+
}, $e = {
|
|
1767
|
+
micro: 14,
|
|
1768
|
+
default: 14,
|
|
1769
|
+
large: 21
|
|
1770
|
+
}, et = e.createContext("default"), tt = e.forwardRef(({ size: e = "default", align: t = "start", panelWidth: n, className: r = "", style: i, children: a, "aria-label": o = "Main navigation", ...s }, c) => {
|
|
1771
|
+
let l = n === void 0 ? i : {
|
|
1772
|
+
...i,
|
|
1773
|
+
"--panel-width": typeof n == "number" ? `${n}px` : n
|
|
1774
|
+
};
|
|
1775
|
+
return /* @__PURE__ */ u(et.Provider, {
|
|
1776
|
+
value: e,
|
|
1777
|
+
children: /* @__PURE__ */ d(j.Root, {
|
|
1778
|
+
...s,
|
|
1779
|
+
ref: c,
|
|
1780
|
+
"aria-label": o,
|
|
1781
|
+
style: l,
|
|
1782
|
+
className: `${Q.root} ${Q[e]} ${t === "end" ? Q.alignEnd : ""} ${r}`,
|
|
1783
|
+
children: [a, /* @__PURE__ */ u("div", {
|
|
1784
|
+
className: Q.viewportPosition,
|
|
1785
|
+
children: /* @__PURE__ */ u(j.Viewport, { className: Q.viewport })
|
|
1786
|
+
})]
|
|
1787
|
+
})
|
|
1788
|
+
});
|
|
1789
|
+
});
|
|
1790
|
+
tt.displayName = "NavigationMenu";
|
|
1791
|
+
var nt = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ u(j.List, {
|
|
1776
1792
|
...t,
|
|
1777
1793
|
ref: n,
|
|
1778
1794
|
className: `${Q.list} ${e}`
|
|
1779
1795
|
}));
|
|
1780
|
-
|
|
1781
|
-
var
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
size: 14,
|
|
1791
|
-
color: "currentColor"
|
|
1792
|
-
})
|
|
1793
|
-
}),
|
|
1794
|
-
r,
|
|
1795
|
-
/* @__PURE__ */ u("span", {
|
|
1796
|
-
className: Q.caret,
|
|
1797
|
-
"aria-hidden": "true",
|
|
1798
|
-
children: /* @__PURE__ */ u(h, {
|
|
1799
|
-
size: 14,
|
|
1800
|
-
color: "currentColor"
|
|
1801
|
-
})
|
|
1796
|
+
nt.displayName = "NavigationMenuList";
|
|
1797
|
+
var rt = j.Item;
|
|
1798
|
+
function it({ icon: t }) {
|
|
1799
|
+
let n = e.useContext(et);
|
|
1800
|
+
return t ? /* @__PURE__ */ u("span", {
|
|
1801
|
+
className: Q.icon,
|
|
1802
|
+
"aria-hidden": "true",
|
|
1803
|
+
children: e.cloneElement(t, {
|
|
1804
|
+
size: $e[n],
|
|
1805
|
+
color: "currentColor"
|
|
1802
1806
|
})
|
|
1803
|
-
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
+
}) : null;
|
|
1808
|
+
}
|
|
1809
|
+
var at = e.forwardRef(({ className: t = "", icon: n, children: r, ...i }, a) => {
|
|
1810
|
+
let o = e.useContext(et);
|
|
1811
|
+
return /* @__PURE__ */ d(j.Trigger, {
|
|
1812
|
+
...i,
|
|
1813
|
+
ref: a,
|
|
1814
|
+
className: `${Q.control} ${t}`,
|
|
1815
|
+
children: [
|
|
1816
|
+
/* @__PURE__ */ u(it, { icon: n }),
|
|
1817
|
+
r,
|
|
1818
|
+
/* @__PURE__ */ u("span", {
|
|
1819
|
+
className: Q.caret,
|
|
1820
|
+
"aria-hidden": "true",
|
|
1821
|
+
children: /* @__PURE__ */ u(h, {
|
|
1822
|
+
size: $e[o],
|
|
1823
|
+
color: "currentColor"
|
|
1824
|
+
})
|
|
1825
|
+
})
|
|
1826
|
+
]
|
|
1827
|
+
});
|
|
1828
|
+
});
|
|
1829
|
+
at.displayName = "NavigationMenuTrigger";
|
|
1830
|
+
var ot = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ u(j.Content, {
|
|
1807
1831
|
...t,
|
|
1808
1832
|
ref: n,
|
|
1809
1833
|
className: `${Q.content} ${e}`
|
|
1810
1834
|
}));
|
|
1811
|
-
|
|
1812
|
-
var
|
|
1813
|
-
...
|
|
1814
|
-
ref:
|
|
1815
|
-
className: `${e === "navigation" ? Q.control : Q.link} ${
|
|
1835
|
+
ot.displayName = "NavigationMenuContent";
|
|
1836
|
+
var st = e.forwardRef(({ variant: e = "panel", icon: t, className: n = "", children: r, ...i }, a) => /* @__PURE__ */ u(j.Link, {
|
|
1837
|
+
...i,
|
|
1838
|
+
ref: a,
|
|
1839
|
+
className: `${e === "navigation" ? Q.control : Q.link} ${n}`,
|
|
1840
|
+
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(it, { icon: t }), r] }) : r
|
|
1816
1841
|
}));
|
|
1817
|
-
|
|
1842
|
+
st.displayName = "NavigationMenuLink";
|
|
1818
1843
|
var $ = {
|
|
1819
1844
|
panel: "_panel_1hiss_6",
|
|
1820
1845
|
header: "_header_1hiss_14",
|
|
@@ -1846,18 +1871,18 @@ var $ = {
|
|
|
1846
1871
|
};
|
|
1847
1872
|
//#endregion
|
|
1848
1873
|
//#region src/components/Chat/ChatPanel.tsx
|
|
1849
|
-
function
|
|
1874
|
+
function ct({ children: e }) {
|
|
1850
1875
|
return /* @__PURE__ */ u("kbd", {
|
|
1851
1876
|
className: $.kbd,
|
|
1852
1877
|
children: e
|
|
1853
1878
|
});
|
|
1854
1879
|
}
|
|
1855
|
-
var
|
|
1856
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1857
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1858
|
-
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(
|
|
1880
|
+
var lt = /* @__PURE__ */ d(l, { children: [
|
|
1881
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(ct, { children: "↵" }), " send"] }),
|
|
1882
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(ct, { children: "⇧↵" }), " new line"] }),
|
|
1883
|
+
/* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u(ct, { children: "esc" }), " close"] })
|
|
1859
1884
|
] });
|
|
1860
|
-
function
|
|
1885
|
+
function ut({ header: e, children: t, composer: n, hints: r = lt, className: i = "", threadRef: a, "aria-label": o }) {
|
|
1861
1886
|
return /* @__PURE__ */ d("div", {
|
|
1862
1887
|
className: `${$.panel} ${i}`,
|
|
1863
1888
|
"aria-label": o,
|
|
@@ -1886,7 +1911,7 @@ function st({ header: e, children: t, composer: n, hints: r = ot, className: i =
|
|
|
1886
1911
|
}
|
|
1887
1912
|
//#endregion
|
|
1888
1913
|
//#region src/components/Chat/Message.tsx
|
|
1889
|
-
function
|
|
1914
|
+
function dt({ children: e, className: t = "" }) {
|
|
1890
1915
|
return /* @__PURE__ */ u("div", {
|
|
1891
1916
|
className: $.userRow,
|
|
1892
1917
|
children: /* @__PURE__ */ u("div", {
|
|
@@ -1895,7 +1920,7 @@ function ct({ children: e, className: t = "" }) {
|
|
|
1895
1920
|
})
|
|
1896
1921
|
});
|
|
1897
1922
|
}
|
|
1898
|
-
function
|
|
1923
|
+
function ft({ label: e = "Assistant", icon: t, children: n, className: r = "" }) {
|
|
1899
1924
|
return /* @__PURE__ */ d("div", {
|
|
1900
1925
|
className: `${$.assistant} ${r}`,
|
|
1901
1926
|
children: [/* @__PURE__ */ d("div", {
|
|
@@ -1912,13 +1937,13 @@ function lt({ label: e = "Assistant", icon: t, children: n, className: r = "" })
|
|
|
1912
1937
|
}
|
|
1913
1938
|
//#endregion
|
|
1914
1939
|
//#region src/components/Chat/Composer.tsx
|
|
1915
|
-
var
|
|
1940
|
+
var pt = 18, mt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onStop: a, streaming: c = !1, placeholder: l = "Ask a question…", disabled: m = !1, autoFocus: h = !1, icon: g, maxLines: _ = 6, className: v = "", "aria-label": y = "Message" }, b) {
|
|
1916
1941
|
let x = s(null);
|
|
1917
1942
|
o(b, () => ({ focus: () => x.current?.focus() }), []), i(() => {
|
|
1918
1943
|
let e = x.current;
|
|
1919
1944
|
if (!e) return;
|
|
1920
1945
|
e.style.height = "auto";
|
|
1921
|
-
let t =
|
|
1946
|
+
let t = pt * _ + 12;
|
|
1922
1947
|
e.style.height = `${Math.min(e.scrollHeight, t)}px`;
|
|
1923
1948
|
}, [e, _]);
|
|
1924
1949
|
let S = !c && !m && e.trim().length > 0, w = r(() => {
|
|
@@ -1955,13 +1980,13 @@ var ut = 18, dt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
1955
1980
|
})]
|
|
1956
1981
|
}), /* @__PURE__ */ u("div", {
|
|
1957
1982
|
className: $.composerButton,
|
|
1958
|
-
children: c ? /* @__PURE__ */ u(
|
|
1983
|
+
children: c ? /* @__PURE__ */ u(P, {
|
|
1959
1984
|
variant: "secondary",
|
|
1960
1985
|
size: "micro",
|
|
1961
1986
|
"aria-label": "Stop",
|
|
1962
1987
|
iconLeft: /* @__PURE__ */ u(C, {}),
|
|
1963
1988
|
onClick: a
|
|
1964
|
-
}) : /* @__PURE__ */ u(
|
|
1989
|
+
}) : /* @__PURE__ */ u(P, {
|
|
1965
1990
|
variant: "primary",
|
|
1966
1991
|
size: "micro",
|
|
1967
1992
|
"aria-label": "Send",
|
|
@@ -1974,7 +1999,7 @@ var ut = 18, dt = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
1974
1999
|
});
|
|
1975
2000
|
//#endregion
|
|
1976
2001
|
//#region src/components/Chat/Citation.tsx
|
|
1977
|
-
function
|
|
2002
|
+
function ht({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
1978
2003
|
let a = `${$.ref} ${i}`;
|
|
1979
2004
|
return t ? /* @__PURE__ */ u("a", {
|
|
1980
2005
|
href: t,
|
|
@@ -1992,7 +2017,7 @@ function ft({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
|
1992
2017
|
children: e
|
|
1993
2018
|
});
|
|
1994
2019
|
}
|
|
1995
|
-
function
|
|
2020
|
+
function gt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
1996
2021
|
return e.length === 0 ? null : /* @__PURE__ */ d("div", {
|
|
1997
2022
|
className: `${$.stack} ${n}`,
|
|
1998
2023
|
children: [/* @__PURE__ */ u("div", {
|
|
@@ -2029,19 +2054,19 @@ function pt({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
2029
2054
|
}
|
|
2030
2055
|
//#endregion
|
|
2031
2056
|
//#region src/components/Chat/StreamStatus.tsx
|
|
2032
|
-
function
|
|
2057
|
+
function _t({ children: e, className: t = "" }) {
|
|
2033
2058
|
return /* @__PURE__ */ d("div", {
|
|
2034
2059
|
className: `${$.status} ${t}`,
|
|
2035
2060
|
role: "status",
|
|
2036
2061
|
children: [/* @__PURE__ */ u("span", {
|
|
2037
2062
|
className: $.statusSpinner,
|
|
2038
|
-
children: /* @__PURE__ */ u(
|
|
2063
|
+
children: /* @__PURE__ */ u(N, { size: 14 })
|
|
2039
2064
|
}), /* @__PURE__ */ u("span", { children: e })]
|
|
2040
2065
|
});
|
|
2041
2066
|
}
|
|
2042
2067
|
//#endregion
|
|
2043
2068
|
//#region src/components/Chat/Suggestions.tsx
|
|
2044
|
-
function
|
|
2069
|
+
function vt({ items: e, onPick: t, label: n = "Try asking", className: r = "" }) {
|
|
2045
2070
|
return /* @__PURE__ */ d("div", {
|
|
2046
2071
|
className: `${$.suggestions} ${r}`,
|
|
2047
2072
|
children: [/* @__PURE__ */ u("div", {
|
|
@@ -2049,7 +2074,7 @@ function ht({ items: e, onPick: t, label: n = "Try asking", className: r = "" })
|
|
|
2049
2074
|
children: n
|
|
2050
2075
|
}), /* @__PURE__ */ u("div", {
|
|
2051
2076
|
className: $.wrap,
|
|
2052
|
-
children: e.map((e) => /* @__PURE__ */ u(
|
|
2077
|
+
children: e.map((e) => /* @__PURE__ */ u(P, {
|
|
2053
2078
|
variant: "secondary",
|
|
2054
2079
|
size: "micro",
|
|
2055
2080
|
onClick: () => t(e),
|
|
@@ -2060,11 +2085,11 @@ function ht({ items: e, onPick: t, label: n = "Try asking", className: r = "" })
|
|
|
2060
2085
|
}
|
|
2061
2086
|
//#endregion
|
|
2062
2087
|
//#region src/components/Chat/AnswerActions.tsx
|
|
2063
|
-
function
|
|
2088
|
+
function yt({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask a follow-up", className: i = "" }) {
|
|
2064
2089
|
return /* @__PURE__ */ d("div", {
|
|
2065
2090
|
className: `${$.actions} ${i}`,
|
|
2066
2091
|
children: [
|
|
2067
|
-
e && /* @__PURE__ */ u(
|
|
2092
|
+
e && /* @__PURE__ */ u(P, {
|
|
2068
2093
|
variant: "ghost",
|
|
2069
2094
|
size: "micro",
|
|
2070
2095
|
iconLeft: u(t ? m : v, {}),
|
|
@@ -2072,7 +2097,7 @@ function gt({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask
|
|
|
2072
2097
|
children: t ? "Copied" : "Copy"
|
|
2073
2098
|
}),
|
|
2074
2099
|
/* @__PURE__ */ u("span", { className: $.actionsSpacer }),
|
|
2075
|
-
n && /* @__PURE__ */ u(
|
|
2100
|
+
n && /* @__PURE__ */ u(P, {
|
|
2076
2101
|
variant: "ghost",
|
|
2077
2102
|
size: "micro",
|
|
2078
2103
|
iconRight: /* @__PURE__ */ u(_, {}),
|
|
@@ -2083,4 +2108,4 @@ function gt({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask
|
|
|
2083
2108
|
});
|
|
2084
2109
|
}
|
|
2085
2110
|
//#endregion
|
|
2086
|
-
export { Fe as Alert, Le as AlertDescription, Ie as AlertTitle,
|
|
2111
|
+
export { Fe as Alert, Le as AlertDescription, Ie as AlertTitle, yt as AnswerActions, ft as AssistantMessage, ae as Base, Oe as Breadcrumbs, P as Button, Ge as Chart, ut as ChatPanel, re as Checkbox, Me as Chip, gt as CitationList, ht as CitationRef, mt as Composer, Qe as DatePicker, oe as FilterPanelBase, le as InputField, ct as Kbd, qe as Modal, tt as NavigationMenu, ot as NavigationMenuContent, rt as NavigationMenuItem, st as NavigationMenuLink, nt as NavigationMenuList, at as NavigationMenuTrigger, _e as Popover, Ae as ProgressBar, de as RadioButton, ce as SearchField, he as Select, me as Slider, N as Spinner, _t as StreamStatus, vt as Suggestions, ve as Table, xe as TableCell, ye as TableHeader, Ce as TableIcon, be as TableRow, Se as TableValue, Te as Tabs, Ke as Textarea, pe as ToggleSwitch, ze as Tooltip, dt as UserMessage, lt as defaultChatHints, ne as spinnerNames };
|