@cytario/design 3.4.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -14
- package/dist/index.js +307 -355
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -328,12 +328,44 @@ function IconButton({
|
|
|
328
328
|
// src/components/Form/Input/Input.tsx
|
|
329
329
|
import {
|
|
330
330
|
TextField,
|
|
331
|
-
Label,
|
|
332
331
|
Input as AriaInput,
|
|
333
332
|
Text
|
|
334
333
|
} from "react-aria-components";
|
|
335
334
|
import { twMerge as twMerge2 } from "tailwind-merge";
|
|
335
|
+
|
|
336
|
+
// src/components/Form/Label/Label.tsx
|
|
337
|
+
import {
|
|
338
|
+
Label as AriaLabel
|
|
339
|
+
} from "react-aria-components";
|
|
336
340
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
341
|
+
function Label({ isRequired, children, className, ...props }) {
|
|
342
|
+
return /* @__PURE__ */ jsxs4(
|
|
343
|
+
AriaLabel,
|
|
344
|
+
{
|
|
345
|
+
...props,
|
|
346
|
+
className: [
|
|
347
|
+
"text-sm",
|
|
348
|
+
"font-medium",
|
|
349
|
+
"text-(--color-text-primary)",
|
|
350
|
+
className
|
|
351
|
+
].filter(Boolean).join(" "),
|
|
352
|
+
children: [
|
|
353
|
+
children,
|
|
354
|
+
isRequired && /* @__PURE__ */ jsx6(
|
|
355
|
+
"span",
|
|
356
|
+
{
|
|
357
|
+
"aria-hidden": "true",
|
|
358
|
+
className: "ml-0.5 text-(--color-text-danger)",
|
|
359
|
+
children: "*"
|
|
360
|
+
}
|
|
361
|
+
)
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// src/components/Form/Input/Input.tsx
|
|
368
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
337
369
|
var alignClasses = {
|
|
338
370
|
left: "text-left",
|
|
339
371
|
center: "text-center",
|
|
@@ -366,14 +398,14 @@ function Input({
|
|
|
366
398
|
className,
|
|
367
399
|
...props
|
|
368
400
|
}) {
|
|
369
|
-
const
|
|
401
|
+
const Field = FieldProp;
|
|
370
402
|
const isInvalid = !!errorMessage;
|
|
371
403
|
const { inGroup, position } = useInputGroup();
|
|
372
404
|
const borderColor = isInvalid ? "border-(--color-border-danger)" : "border-(--color-border-default) hover:border-(--color-border-strong)";
|
|
373
405
|
const radiusClass = inGroup ? groupRadiusClasses(position) : "rounded-md";
|
|
374
406
|
const marginClass = inGroup && position !== "start" && position !== "standalone" ? "-ml-px" : "";
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
|
|
407
|
+
return /* @__PURE__ */ jsxs5(
|
|
408
|
+
Field,
|
|
377
409
|
{
|
|
378
410
|
...props,
|
|
379
411
|
type,
|
|
@@ -387,28 +419,8 @@ function Input({
|
|
|
387
419
|
className
|
|
388
420
|
),
|
|
389
421
|
children: [
|
|
390
|
-
label && /* @__PURE__ */
|
|
391
|
-
|
|
392
|
-
{
|
|
393
|
-
className: twMerge2(
|
|
394
|
-
"text-sm",
|
|
395
|
-
"font-medium",
|
|
396
|
-
"text-(--color-text-primary)"
|
|
397
|
-
),
|
|
398
|
-
children: [
|
|
399
|
-
label,
|
|
400
|
-
isRequired && /* @__PURE__ */ jsx6(
|
|
401
|
-
"span",
|
|
402
|
-
{
|
|
403
|
-
"aria-hidden": "true",
|
|
404
|
-
className: "ml-0.5 text-(--color-text-danger)",
|
|
405
|
-
children: "*"
|
|
406
|
-
}
|
|
407
|
-
)
|
|
408
|
-
]
|
|
409
|
-
}
|
|
410
|
-
),
|
|
411
|
-
prefix ? /* @__PURE__ */ jsxs4(
|
|
422
|
+
label && /* @__PURE__ */ jsx7(Label, { isRequired, children: label }),
|
|
423
|
+
prefix ? /* @__PURE__ */ jsxs5(
|
|
412
424
|
"div",
|
|
413
425
|
{
|
|
414
426
|
className: twMerge2(
|
|
@@ -423,7 +435,7 @@ function Input({
|
|
|
423
435
|
isDisabled && "opacity-50 pointer-events-none"
|
|
424
436
|
),
|
|
425
437
|
children: [
|
|
426
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ jsx7(
|
|
427
439
|
"span",
|
|
428
440
|
{
|
|
429
441
|
className: twMerge2(
|
|
@@ -436,7 +448,7 @@ function Input({
|
|
|
436
448
|
children: prefix
|
|
437
449
|
}
|
|
438
450
|
),
|
|
439
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ jsx7(
|
|
440
452
|
AriaInput,
|
|
441
453
|
{
|
|
442
454
|
placeholder,
|
|
@@ -452,7 +464,7 @@ function Input({
|
|
|
452
464
|
)
|
|
453
465
|
]
|
|
454
466
|
}
|
|
455
|
-
) : /* @__PURE__ */
|
|
467
|
+
) : /* @__PURE__ */ jsx7(
|
|
456
468
|
AriaInput,
|
|
457
469
|
{
|
|
458
470
|
placeholder,
|
|
@@ -473,7 +485,7 @@ function Input({
|
|
|
473
485
|
)
|
|
474
486
|
}
|
|
475
487
|
),
|
|
476
|
-
description &&
|
|
488
|
+
description && /* @__PURE__ */ jsx7(
|
|
477
489
|
Text,
|
|
478
490
|
{
|
|
479
491
|
slot: "description",
|
|
@@ -481,10 +493,11 @@ function Input({
|
|
|
481
493
|
children: description
|
|
482
494
|
}
|
|
483
495
|
),
|
|
484
|
-
isInvalid && /* @__PURE__ */
|
|
496
|
+
isInvalid && /* @__PURE__ */ jsx7(
|
|
485
497
|
Text,
|
|
486
498
|
{
|
|
487
499
|
slot: "errorMessage",
|
|
500
|
+
role: "alert",
|
|
488
501
|
className: "text-sm text-(--color-text-danger)",
|
|
489
502
|
children: errorMessage
|
|
490
503
|
}
|
|
@@ -498,19 +511,20 @@ function Input({
|
|
|
498
511
|
import { Check, ChevronDown } from "lucide-react";
|
|
499
512
|
import {
|
|
500
513
|
Button as Button2,
|
|
501
|
-
Label as Label2,
|
|
502
514
|
ListBox,
|
|
503
515
|
ListBoxItem,
|
|
504
516
|
Popover,
|
|
505
517
|
Select as AriaSelect,
|
|
506
|
-
SelectValue
|
|
518
|
+
SelectValue,
|
|
519
|
+
Text as Text2
|
|
507
520
|
} from "react-aria-components";
|
|
508
521
|
import { twMerge as twMerge3 } from "tailwind-merge";
|
|
509
|
-
import { Fragment, jsx as
|
|
522
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
510
523
|
function Select({
|
|
511
524
|
label,
|
|
512
525
|
items,
|
|
513
526
|
placeholder = "Select an option",
|
|
527
|
+
description,
|
|
514
528
|
errorMessage,
|
|
515
529
|
size = "md",
|
|
516
530
|
isDisabled,
|
|
@@ -520,7 +534,7 @@ function Select({
|
|
|
520
534
|
...props
|
|
521
535
|
}) {
|
|
522
536
|
const hasError = Boolean(errorMessage);
|
|
523
|
-
return /* @__PURE__ */
|
|
537
|
+
return /* @__PURE__ */ jsxs6(
|
|
524
538
|
AriaSelect,
|
|
525
539
|
{
|
|
526
540
|
...props,
|
|
@@ -529,20 +543,11 @@ function Select({
|
|
|
529
543
|
isInvalid: hasError,
|
|
530
544
|
className: twMerge3("flex flex-col gap-1", className),
|
|
531
545
|
children: [
|
|
532
|
-
label && /* @__PURE__ */
|
|
533
|
-
|
|
534
|
-
isRequired && /* @__PURE__ */ jsx7(
|
|
535
|
-
"span",
|
|
536
|
-
{
|
|
537
|
-
"aria-hidden": "true",
|
|
538
|
-
className: "ml-0.5 text-(--color-text-danger)",
|
|
539
|
-
children: "*"
|
|
540
|
-
}
|
|
541
|
-
)
|
|
542
|
-
] }),
|
|
543
|
-
/* @__PURE__ */ jsxs5(
|
|
546
|
+
label && /* @__PURE__ */ jsx8(Label, { isRequired, children: label }),
|
|
547
|
+
/* @__PURE__ */ jsxs6(
|
|
544
548
|
Button2,
|
|
545
549
|
{
|
|
550
|
+
"aria-required": isRequired || void 0,
|
|
546
551
|
className: twMerge3(
|
|
547
552
|
`
|
|
548
553
|
inline-flex items-center justify-between
|
|
@@ -557,7 +562,7 @@ function Select({
|
|
|
557
562
|
hasError ? "border-(--color-border-danger)" : "border-(--color-border-default)"
|
|
558
563
|
),
|
|
559
564
|
children: [
|
|
560
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ jsx8(
|
|
561
566
|
SelectValue,
|
|
562
567
|
{
|
|
563
568
|
className: twMerge3(
|
|
@@ -571,7 +576,7 @@ function Select({
|
|
|
571
576
|
}
|
|
572
577
|
}
|
|
573
578
|
),
|
|
574
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ jsx8(
|
|
575
580
|
ChevronDown,
|
|
576
581
|
{
|
|
577
582
|
"aria-hidden": true,
|
|
@@ -584,8 +589,17 @@ function Select({
|
|
|
584
589
|
]
|
|
585
590
|
}
|
|
586
591
|
),
|
|
587
|
-
|
|
588
|
-
/* @__PURE__ */
|
|
592
|
+
description && /* @__PURE__ */ jsx8(Text2, { slot: "description", className: "text-sm text-(--color-text-secondary)", children: description }),
|
|
593
|
+
hasError && /* @__PURE__ */ jsx8(
|
|
594
|
+
Text2,
|
|
595
|
+
{
|
|
596
|
+
slot: "errorMessage",
|
|
597
|
+
role: "alert",
|
|
598
|
+
className: "text-sm text-(--color-text-danger)",
|
|
599
|
+
children: errorMessage
|
|
600
|
+
}
|
|
601
|
+
),
|
|
602
|
+
/* @__PURE__ */ jsx8(
|
|
589
603
|
Popover,
|
|
590
604
|
{
|
|
591
605
|
className: twMerge3(
|
|
@@ -598,7 +612,7 @@ function Select({
|
|
|
598
612
|
"entering:animate-in entering:fade-in",
|
|
599
613
|
"exiting:animate-out exiting:fade-out"
|
|
600
614
|
),
|
|
601
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ jsx8(ListBox, { className: "p-1 outline-none", items, children: (item) => /* @__PURE__ */ jsx8(
|
|
602
616
|
ListBoxItem,
|
|
603
617
|
{
|
|
604
618
|
id: item.id,
|
|
@@ -615,9 +629,9 @@ function Select({
|
|
|
615
629
|
`,
|
|
616
630
|
sizeStyles[size]
|
|
617
631
|
),
|
|
618
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
isSelected && /* @__PURE__ */
|
|
632
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
633
|
+
/* @__PURE__ */ jsx8("span", { className: renderItem ? "min-w-0 flex-1" : "truncate", children: renderItem ? renderItem(item) : item.name }),
|
|
634
|
+
isSelected && /* @__PURE__ */ jsx8(Check, { className: "h-4 w-4 shrink-0 text-(--color-action-primary)" })
|
|
621
635
|
] })
|
|
622
636
|
}
|
|
623
637
|
) })
|
|
@@ -637,13 +651,13 @@ import {
|
|
|
637
651
|
TableBody as AriaTableBody,
|
|
638
652
|
TableHeader as AriaTableHeader
|
|
639
653
|
} from "react-aria-components";
|
|
640
|
-
import { jsx as
|
|
654
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
641
655
|
var tableSizeClass = {
|
|
642
656
|
compact: "[--table-row-py:theme(spacing.1)]",
|
|
643
657
|
comfortable: "[--table-row-py:theme(spacing.3)]"
|
|
644
658
|
};
|
|
645
659
|
function Table({ size = "comfortable", className, ...props }) {
|
|
646
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ jsx9(
|
|
647
661
|
AriaTable,
|
|
648
662
|
{
|
|
649
663
|
...props,
|
|
@@ -656,10 +670,10 @@ function Table({ size = "comfortable", className, ...props }) {
|
|
|
656
670
|
);
|
|
657
671
|
}
|
|
658
672
|
function TableHeader(props) {
|
|
659
|
-
return /* @__PURE__ */
|
|
673
|
+
return /* @__PURE__ */ jsx9(AriaTableHeader, { ...props });
|
|
660
674
|
}
|
|
661
675
|
function Column(props) {
|
|
662
|
-
return /* @__PURE__ */
|
|
676
|
+
return /* @__PURE__ */ jsx9(
|
|
663
677
|
AriaColumn,
|
|
664
678
|
{
|
|
665
679
|
...props,
|
|
@@ -669,18 +683,18 @@ function Column(props) {
|
|
|
669
683
|
"cursor-default select-none outline-none",
|
|
670
684
|
"focus-visible:outline-2 focus-visible:outline-(--color-border-focus) focus-visible:outline-offset-[-2px]"
|
|
671
685
|
].join(" "),
|
|
672
|
-
children: ({ allowsSorting, sortDirection }) => /* @__PURE__ */
|
|
686
|
+
children: ({ allowsSorting, sortDirection }) => /* @__PURE__ */ jsxs7("span", { className: "inline-flex items-center gap-1", children: [
|
|
673
687
|
props.children,
|
|
674
|
-
allowsSorting && /* @__PURE__ */
|
|
688
|
+
allowsSorting && /* @__PURE__ */ jsx9("span", { "aria-hidden": "true", className: "text-(--color-text-tertiary)", children: sortDirection === "ascending" ? "\u25B2" : sortDirection === "descending" ? "\u25BC" : "\u25B4" })
|
|
675
689
|
] })
|
|
676
690
|
}
|
|
677
691
|
);
|
|
678
692
|
}
|
|
679
693
|
function TableBody(props) {
|
|
680
|
-
return /* @__PURE__ */
|
|
694
|
+
return /* @__PURE__ */ jsx9(AriaTableBody, { ...props });
|
|
681
695
|
}
|
|
682
696
|
function Row(props) {
|
|
683
|
-
return /* @__PURE__ */
|
|
697
|
+
return /* @__PURE__ */ jsx9(
|
|
684
698
|
AriaRow,
|
|
685
699
|
{
|
|
686
700
|
...props,
|
|
@@ -696,7 +710,7 @@ function Row(props) {
|
|
|
696
710
|
);
|
|
697
711
|
}
|
|
698
712
|
function Cell(props) {
|
|
699
|
-
return /* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ jsx9(
|
|
700
714
|
AriaCell,
|
|
701
715
|
{
|
|
702
716
|
...props,
|
|
@@ -718,7 +732,7 @@ import {
|
|
|
718
732
|
Heading
|
|
719
733
|
} from "react-aria-components";
|
|
720
734
|
import { X } from "lucide-react";
|
|
721
|
-
import { Fragment as Fragment2, jsx as
|
|
735
|
+
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
722
736
|
var sizeStyles2 = {
|
|
723
737
|
sm: "max-w-md",
|
|
724
738
|
md: "max-w-lg",
|
|
@@ -734,7 +748,7 @@ function Dialog({
|
|
|
734
748
|
children,
|
|
735
749
|
className
|
|
736
750
|
}) {
|
|
737
|
-
return /* @__PURE__ */
|
|
751
|
+
return /* @__PURE__ */ jsx10(
|
|
738
752
|
ModalOverlay,
|
|
739
753
|
{
|
|
740
754
|
isOpen,
|
|
@@ -746,7 +760,7 @@ function Dialog({
|
|
|
746
760
|
"data-[entering]:animate-in data-[entering]:fade-in",
|
|
747
761
|
"data-[exiting]:animate-out data-[exiting]:fade-out"
|
|
748
762
|
].join(" "),
|
|
749
|
-
children: /* @__PURE__ */
|
|
763
|
+
children: /* @__PURE__ */ jsx10(
|
|
750
764
|
Modal,
|
|
751
765
|
{
|
|
752
766
|
className: [
|
|
@@ -757,9 +771,9 @@ function Dialog({
|
|
|
757
771
|
"data-[exiting]:animate-out data-[exiting]:zoom-out-95 data-[exiting]:fade-out",
|
|
758
772
|
className
|
|
759
773
|
].filter(Boolean).join(" "),
|
|
760
|
-
children: /* @__PURE__ */
|
|
761
|
-
/* @__PURE__ */
|
|
762
|
-
/* @__PURE__ */
|
|
774
|
+
children: /* @__PURE__ */ jsx10(AriaDialog, { className: "outline-none flex flex-col max-h-[85vh]", children: ({ close }) => /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
775
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between px-6 py-4 border-b border-(--color-border-default)", children: [
|
|
776
|
+
/* @__PURE__ */ jsx10(
|
|
763
777
|
Heading,
|
|
764
778
|
{
|
|
765
779
|
slot: "title",
|
|
@@ -767,7 +781,7 @@ function Dialog({
|
|
|
767
781
|
children: title
|
|
768
782
|
}
|
|
769
783
|
),
|
|
770
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ jsx10(
|
|
771
785
|
"button",
|
|
772
786
|
{
|
|
773
787
|
type: "button",
|
|
@@ -779,11 +793,11 @@ function Dialog({
|
|
|
779
793
|
"transition-colors"
|
|
780
794
|
].join(" "),
|
|
781
795
|
"aria-label": "Close",
|
|
782
|
-
children: /* @__PURE__ */
|
|
796
|
+
children: /* @__PURE__ */ jsx10(X, { size: 20, "aria-hidden": "true" })
|
|
783
797
|
}
|
|
784
798
|
)
|
|
785
799
|
] }),
|
|
786
|
-
/* @__PURE__ */
|
|
800
|
+
/* @__PURE__ */ jsx10("div", { className: "px-6 py-4 overflow-y-auto", children })
|
|
787
801
|
] }) })
|
|
788
802
|
}
|
|
789
803
|
)
|
|
@@ -792,7 +806,7 @@ function Dialog({
|
|
|
792
806
|
}
|
|
793
807
|
|
|
794
808
|
// src/components/Dialog/DialogFooter.tsx
|
|
795
|
-
import { jsx as
|
|
809
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
796
810
|
|
|
797
811
|
// src/components/Toast/Toast.tsx
|
|
798
812
|
import {
|
|
@@ -805,7 +819,7 @@ import {
|
|
|
805
819
|
} from "react";
|
|
806
820
|
import { createPortal } from "react-dom";
|
|
807
821
|
import { CheckCircle, XCircle, Info, X as X2 } from "lucide-react";
|
|
808
|
-
import { jsx as
|
|
822
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
809
823
|
var ToastContext = createContext2(null);
|
|
810
824
|
var toastCounter = 0;
|
|
811
825
|
var defaultDuration = {
|
|
@@ -863,7 +877,7 @@ function ToastItem({
|
|
|
863
877
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
864
878
|
};
|
|
865
879
|
}, [toast.duration, toast.variant, dismiss]);
|
|
866
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ jsxs9(
|
|
867
881
|
"div",
|
|
868
882
|
{
|
|
869
883
|
role: "status",
|
|
@@ -876,16 +890,16 @@ function ToastItem({
|
|
|
876
890
|
config.containerClass
|
|
877
891
|
].join(" "),
|
|
878
892
|
children: [
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ jsx12(IconComponent, { size: 20, className: ["shrink-0 mt-0.5", config.iconClass].join(" "), "aria-hidden": "true" }),
|
|
894
|
+
/* @__PURE__ */ jsx12("p", { className: "flex-1 text-sm font-medium", children: toast.message }),
|
|
895
|
+
/* @__PURE__ */ jsx12(
|
|
882
896
|
"button",
|
|
883
897
|
{
|
|
884
898
|
type: "button",
|
|
885
899
|
onClick: dismiss,
|
|
886
900
|
className: "shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-opacity outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
887
901
|
"aria-label": "Dismiss",
|
|
888
|
-
children: /* @__PURE__ */
|
|
902
|
+
children: /* @__PURE__ */ jsx12(X2, { size: 16, "aria-hidden": "true" })
|
|
889
903
|
}
|
|
890
904
|
)
|
|
891
905
|
]
|
|
@@ -905,7 +919,7 @@ function ToastContainer({
|
|
|
905
919
|
}) {
|
|
906
920
|
if (toasts.length === 0) return null;
|
|
907
921
|
return createPortal(
|
|
908
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ jsx12(PlacementContext.Provider, { value: placement, children: /* @__PURE__ */ jsx12("div", { className: containerPositionStyles[placement], children: toasts.map((toast) => /* @__PURE__ */ jsx12(ToastItem, { toast, onRemove: removeToast }, toast.id)) }) }),
|
|
909
923
|
document.body
|
|
910
924
|
);
|
|
911
925
|
}
|
|
@@ -936,9 +950,9 @@ function ToastProvider({ children, bridge, placement = "bottom-right" }) {
|
|
|
936
950
|
if (!bridge) return;
|
|
937
951
|
return bridge.subscribe(addToast);
|
|
938
952
|
}, [bridge, addToast]);
|
|
939
|
-
return /* @__PURE__ */
|
|
953
|
+
return /* @__PURE__ */ jsxs9(ToastContext.Provider, { value: { toasts, addToast, removeToast }, children: [
|
|
940
954
|
children,
|
|
941
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ jsx12(ToastContainer, { toasts, removeToast, placement })
|
|
942
956
|
] });
|
|
943
957
|
}
|
|
944
958
|
function useToast() {
|
|
@@ -954,7 +968,7 @@ function useToast() {
|
|
|
954
968
|
}
|
|
955
969
|
|
|
956
970
|
// src/components/EmptyState/EmptyState.tsx
|
|
957
|
-
import { jsx as
|
|
971
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
958
972
|
function EmptyState({
|
|
959
973
|
icon,
|
|
960
974
|
title,
|
|
@@ -962,7 +976,7 @@ function EmptyState({
|
|
|
962
976
|
action,
|
|
963
977
|
className
|
|
964
978
|
}) {
|
|
965
|
-
return /* @__PURE__ */
|
|
979
|
+
return /* @__PURE__ */ jsxs10(
|
|
966
980
|
"div",
|
|
967
981
|
{
|
|
968
982
|
className: [
|
|
@@ -970,10 +984,10 @@ function EmptyState({
|
|
|
970
984
|
className
|
|
971
985
|
].filter(Boolean).join(" "),
|
|
972
986
|
children: [
|
|
973
|
-
icon && /* @__PURE__ */
|
|
974
|
-
/* @__PURE__ */
|
|
975
|
-
description && /* @__PURE__ */
|
|
976
|
-
action && /* @__PURE__ */
|
|
987
|
+
icon && /* @__PURE__ */ jsx13(Icon, { icon, size: "xl", className: "text-(--color-text-tertiary)" }),
|
|
988
|
+
/* @__PURE__ */ jsx13("h3", { className: "text-lg font-semibold text-(--color-text-primary) mt-4", children: title }),
|
|
989
|
+
description && /* @__PURE__ */ jsx13("p", { className: "text-sm text-(--color-text-secondary) mt-2 max-w-sm", children: description }),
|
|
990
|
+
action && /* @__PURE__ */ jsx13("div", { className: "mt-6", children: action })
|
|
977
991
|
]
|
|
978
992
|
}
|
|
979
993
|
);
|
|
@@ -984,9 +998,9 @@ import {
|
|
|
984
998
|
Checkbox as AriaCheckbox
|
|
985
999
|
} from "react-aria-components";
|
|
986
1000
|
import { Check as Check2 } from "lucide-react";
|
|
987
|
-
import { Fragment as Fragment3, jsx as
|
|
1001
|
+
import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
988
1002
|
function Checkbox({ children, className, ...props }) {
|
|
989
|
-
return /* @__PURE__ */
|
|
1003
|
+
return /* @__PURE__ */ jsx14(
|
|
990
1004
|
AriaCheckbox,
|
|
991
1005
|
{
|
|
992
1006
|
...props,
|
|
@@ -995,8 +1009,8 @@ function Checkbox({ children, className, ...props }) {
|
|
|
995
1009
|
"disabled:opacity-50 disabled:cursor-default",
|
|
996
1010
|
className
|
|
997
1011
|
].filter(Boolean).join(" "),
|
|
998
|
-
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */
|
|
999
|
-
/* @__PURE__ */
|
|
1012
|
+
children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1013
|
+
/* @__PURE__ */ jsxs11(
|
|
1000
1014
|
"div",
|
|
1001
1015
|
{
|
|
1002
1016
|
className: [
|
|
@@ -1006,12 +1020,12 @@ function Checkbox({ children, className, ...props }) {
|
|
|
1006
1020
|
isSelected || isIndeterminate ? "bg-(--color-action-primary) border-(--color-action-primary)" : "bg-(--color-surface-default) border-(--color-border-default) group-hover:border-(--color-border-strong)"
|
|
1007
1021
|
].join(" "),
|
|
1008
1022
|
children: [
|
|
1009
|
-
isSelected && /* @__PURE__ */
|
|
1010
|
-
isIndeterminate && /* @__PURE__ */
|
|
1023
|
+
isSelected && /* @__PURE__ */ jsx14(Check2, { className: "w-4 h-4 text-(--color-text-inverse)", strokeWidth: 3 }),
|
|
1024
|
+
isIndeterminate && /* @__PURE__ */ jsx14("div", { className: "w-3 h-0.5 bg-(--color-text-inverse) rounded-full" })
|
|
1011
1025
|
]
|
|
1012
1026
|
}
|
|
1013
1027
|
),
|
|
1014
|
-
children && /* @__PURE__ */
|
|
1028
|
+
children && /* @__PURE__ */ jsx14("span", { children })
|
|
1015
1029
|
] })
|
|
1016
1030
|
}
|
|
1017
1031
|
);
|
|
@@ -1021,7 +1035,7 @@ function Checkbox({ children, className, ...props }) {
|
|
|
1021
1035
|
import {
|
|
1022
1036
|
Switch as AriaSwitch
|
|
1023
1037
|
} from "react-aria-components";
|
|
1024
|
-
import { Fragment as Fragment4, jsx as
|
|
1038
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1025
1039
|
var trackColorMap = {
|
|
1026
1040
|
primary: "bg-(--color-action-primary)",
|
|
1027
1041
|
success: "bg-(--color-action-success)",
|
|
@@ -1038,7 +1052,7 @@ function Switch({
|
|
|
1038
1052
|
...props
|
|
1039
1053
|
}) {
|
|
1040
1054
|
const isPreset = isPresetColor(color);
|
|
1041
|
-
return /* @__PURE__ */
|
|
1055
|
+
return /* @__PURE__ */ jsx15(
|
|
1042
1056
|
AriaSwitch,
|
|
1043
1057
|
{
|
|
1044
1058
|
...props,
|
|
@@ -1047,8 +1061,8 @@ function Switch({
|
|
|
1047
1061
|
"disabled:opacity-50 disabled:cursor-default",
|
|
1048
1062
|
className
|
|
1049
1063
|
].filter(Boolean).join(" "),
|
|
1050
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
1051
|
-
/* @__PURE__ */
|
|
1064
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
1065
|
+
/* @__PURE__ */ jsx15(
|
|
1052
1066
|
"div",
|
|
1053
1067
|
{
|
|
1054
1068
|
className: [
|
|
@@ -1057,7 +1071,7 @@ function Switch({
|
|
|
1057
1071
|
isSelected && isPreset ? trackColorMap[color] : !isSelected ? "bg-(--color-border-strong)" : ""
|
|
1058
1072
|
].join(" "),
|
|
1059
1073
|
style: isSelected && !isPreset ? { backgroundColor: color } : void 0,
|
|
1060
|
-
children: /* @__PURE__ */
|
|
1074
|
+
children: /* @__PURE__ */ jsx15(
|
|
1061
1075
|
"div",
|
|
1062
1076
|
{
|
|
1063
1077
|
className: [
|
|
@@ -1068,7 +1082,7 @@ function Switch({
|
|
|
1068
1082
|
)
|
|
1069
1083
|
}
|
|
1070
1084
|
),
|
|
1071
|
-
children && /* @__PURE__ */
|
|
1085
|
+
children && /* @__PURE__ */ jsx15("span", { children })
|
|
1072
1086
|
] })
|
|
1073
1087
|
}
|
|
1074
1088
|
);
|
|
@@ -1079,9 +1093,9 @@ import {
|
|
|
1079
1093
|
RadioGroup as AriaRadioGroup,
|
|
1080
1094
|
Radio as AriaRadio
|
|
1081
1095
|
} from "react-aria-components";
|
|
1082
|
-
import { Fragment as Fragment5, jsx as
|
|
1096
|
+
import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1083
1097
|
function RadioGroup({ children, className, ...props }) {
|
|
1084
|
-
return /* @__PURE__ */
|
|
1098
|
+
return /* @__PURE__ */ jsx16(
|
|
1085
1099
|
AriaRadioGroup,
|
|
1086
1100
|
{
|
|
1087
1101
|
...props,
|
|
@@ -1095,7 +1109,7 @@ function RadioGroup({ children, className, ...props }) {
|
|
|
1095
1109
|
);
|
|
1096
1110
|
}
|
|
1097
1111
|
function Radio({ children, className, ...props }) {
|
|
1098
|
-
return /* @__PURE__ */
|
|
1112
|
+
return /* @__PURE__ */ jsx16(
|
|
1099
1113
|
AriaRadio,
|
|
1100
1114
|
{
|
|
1101
1115
|
...props,
|
|
@@ -1104,8 +1118,8 @@ function Radio({ children, className, ...props }) {
|
|
|
1104
1118
|
"disabled:opacity-50 disabled:cursor-default",
|
|
1105
1119
|
className
|
|
1106
1120
|
].filter(Boolean).join(" "),
|
|
1107
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
1108
|
-
/* @__PURE__ */
|
|
1121
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
1122
|
+
/* @__PURE__ */ jsx16(
|
|
1109
1123
|
"div",
|
|
1110
1124
|
{
|
|
1111
1125
|
className: [
|
|
@@ -1114,16 +1128,16 @@ function Radio({ children, className, ...props }) {
|
|
|
1114
1128
|
"group-focus-visible:ring-2 group-focus-visible:ring-(--color-border-focus) group-focus-visible:ring-offset-2",
|
|
1115
1129
|
isSelected ? "border-(--color-action-primary)" : "border-(--color-border-default) group-hover:border-(--color-border-strong)"
|
|
1116
1130
|
].join(" "),
|
|
1117
|
-
children: isSelected && /* @__PURE__ */
|
|
1131
|
+
children: isSelected && /* @__PURE__ */ jsx16("div", { className: "w-2.5 h-2.5 rounded-full bg-(--color-action-primary)" })
|
|
1118
1132
|
}
|
|
1119
1133
|
),
|
|
1120
|
-
children && /* @__PURE__ */
|
|
1134
|
+
children && /* @__PURE__ */ jsx16("span", { children })
|
|
1121
1135
|
] })
|
|
1122
1136
|
}
|
|
1123
1137
|
);
|
|
1124
1138
|
}
|
|
1125
1139
|
function RadioButton({ children, className, ...props }) {
|
|
1126
|
-
return /* @__PURE__ */
|
|
1140
|
+
return /* @__PURE__ */ jsx16(
|
|
1127
1141
|
AriaRadio,
|
|
1128
1142
|
{
|
|
1129
1143
|
...props,
|
|
@@ -1132,7 +1146,7 @@ function RadioButton({ children, className, ...props }) {
|
|
|
1132
1146
|
"disabled:opacity-50 disabled:cursor-default",
|
|
1133
1147
|
className
|
|
1134
1148
|
].filter(Boolean).join(" "),
|
|
1135
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
1149
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsx16(
|
|
1136
1150
|
"div",
|
|
1137
1151
|
{
|
|
1138
1152
|
className: [
|
|
@@ -1148,71 +1162,10 @@ function RadioButton({ children, className, ...props }) {
|
|
|
1148
1162
|
);
|
|
1149
1163
|
}
|
|
1150
1164
|
|
|
1151
|
-
// src/components/Form/Label/Label.tsx
|
|
1152
|
-
import {
|
|
1153
|
-
Label as AriaLabel
|
|
1154
|
-
} from "react-aria-components";
|
|
1155
|
-
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1156
|
-
function Label3({ isRequired, children, className, ...props }) {
|
|
1157
|
-
return /* @__PURE__ */ jsxs13(
|
|
1158
|
-
AriaLabel,
|
|
1159
|
-
{
|
|
1160
|
-
...props,
|
|
1161
|
-
className: [
|
|
1162
|
-
"text-sm",
|
|
1163
|
-
"font-medium",
|
|
1164
|
-
"text-(--color-text-primary)",
|
|
1165
|
-
className
|
|
1166
|
-
].filter(Boolean).join(" "),
|
|
1167
|
-
children: [
|
|
1168
|
-
children,
|
|
1169
|
-
isRequired && /* @__PURE__ */ jsx16(
|
|
1170
|
-
"span",
|
|
1171
|
-
{
|
|
1172
|
-
"aria-hidden": "true",
|
|
1173
|
-
className: "ml-0.5 text-(--color-text-danger)",
|
|
1174
|
-
children: "*"
|
|
1175
|
-
}
|
|
1176
|
-
)
|
|
1177
|
-
]
|
|
1178
|
-
}
|
|
1179
|
-
);
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
// src/components/Form/Field/Field.tsx
|
|
1183
|
-
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1184
|
-
function getErrorMessage(error) {
|
|
1185
|
-
if (!error) return void 0;
|
|
1186
|
-
if (typeof error === "string") return error;
|
|
1187
|
-
return error.message;
|
|
1188
|
-
}
|
|
1189
|
-
function Field({
|
|
1190
|
-
label,
|
|
1191
|
-
isRequired,
|
|
1192
|
-
description,
|
|
1193
|
-
error,
|
|
1194
|
-
children,
|
|
1195
|
-
className
|
|
1196
|
-
}) {
|
|
1197
|
-
const errorMessage = getErrorMessage(error);
|
|
1198
|
-
return /* @__PURE__ */ jsxs14(
|
|
1199
|
-
"div",
|
|
1200
|
-
{
|
|
1201
|
-
className: ["flex flex-col gap-1", className].filter(Boolean).join(" "),
|
|
1202
|
-
children: [
|
|
1203
|
-
label && /* @__PURE__ */ jsx17(Label3, { isRequired, children: label }),
|
|
1204
|
-
children,
|
|
1205
|
-
description && !errorMessage && /* @__PURE__ */ jsx17("p", { className: "text-sm text-(--color-text-secondary)", children: description }),
|
|
1206
|
-
errorMessage && /* @__PURE__ */ jsx17("p", { className: "text-sm text-(--color-text-danger)", children: errorMessage })
|
|
1207
|
-
]
|
|
1208
|
-
}
|
|
1209
|
-
);
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
1165
|
// src/components/Form/Fieldset/Fieldset.tsx
|
|
1213
|
-
import { jsx as
|
|
1166
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1214
1167
|
function Fieldset({ legend, children, className }) {
|
|
1215
|
-
return /* @__PURE__ */
|
|
1168
|
+
return /* @__PURE__ */ jsxs14(
|
|
1216
1169
|
"fieldset",
|
|
1217
1170
|
{
|
|
1218
1171
|
className: [
|
|
@@ -1221,7 +1174,7 @@ function Fieldset({ legend, children, className }) {
|
|
|
1221
1174
|
className
|
|
1222
1175
|
].filter(Boolean).join(" "),
|
|
1223
1176
|
children: [
|
|
1224
|
-
legend && /* @__PURE__ */
|
|
1177
|
+
legend && /* @__PURE__ */ jsx17(
|
|
1225
1178
|
"legend",
|
|
1226
1179
|
{
|
|
1227
1180
|
className: [
|
|
@@ -1241,18 +1194,18 @@ function Fieldset({ legend, children, className }) {
|
|
|
1241
1194
|
|
|
1242
1195
|
// src/components/Form/InputGroup/InputGroup.tsx
|
|
1243
1196
|
import React from "react";
|
|
1244
|
-
import { jsx as
|
|
1197
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1245
1198
|
function InputGroup({ children, className }) {
|
|
1246
1199
|
const childArray = React.Children.toArray(children).filter(
|
|
1247
1200
|
React.isValidElement
|
|
1248
1201
|
);
|
|
1249
|
-
return /* @__PURE__ */
|
|
1202
|
+
return /* @__PURE__ */ jsx18(
|
|
1250
1203
|
"div",
|
|
1251
1204
|
{
|
|
1252
1205
|
className: ["flex items-stretch", className].filter(Boolean).join(" "),
|
|
1253
1206
|
children: childArray.map((child, index) => {
|
|
1254
1207
|
const position = childArray.length === 1 ? "standalone" : index === 0 ? "start" : index === childArray.length - 1 ? "end" : "middle";
|
|
1255
|
-
return /* @__PURE__ */
|
|
1208
|
+
return /* @__PURE__ */ jsx18(
|
|
1256
1209
|
InputGroupContext.Provider,
|
|
1257
1210
|
{
|
|
1258
1211
|
value: { inGroup: true, position },
|
|
@@ -1266,7 +1219,7 @@ function InputGroup({ children, className }) {
|
|
|
1266
1219
|
}
|
|
1267
1220
|
|
|
1268
1221
|
// src/components/Form/InputAddon/InputAddon.tsx
|
|
1269
|
-
import { jsx as
|
|
1222
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1270
1223
|
function groupRadiusClass3(position) {
|
|
1271
1224
|
switch (position) {
|
|
1272
1225
|
case "start":
|
|
@@ -1283,7 +1236,7 @@ function InputAddon({ children, className }) {
|
|
|
1283
1236
|
const { inGroup, position } = useInputGroup();
|
|
1284
1237
|
const radiusClass = inGroup ? groupRadiusClass3(position) : "rounded-md";
|
|
1285
1238
|
const marginClass = inGroup && position !== "start" && position !== "standalone" ? "-ml-px" : "";
|
|
1286
|
-
return /* @__PURE__ */
|
|
1239
|
+
return /* @__PURE__ */ jsx19(
|
|
1287
1240
|
"div",
|
|
1288
1241
|
{
|
|
1289
1242
|
className: [
|
|
@@ -1303,7 +1256,7 @@ function InputAddon({ children, className }) {
|
|
|
1303
1256
|
|
|
1304
1257
|
// src/components/Heading/Heading.tsx
|
|
1305
1258
|
import { twMerge as twMerge4 } from "tailwind-merge";
|
|
1306
|
-
import { jsx as
|
|
1259
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1307
1260
|
var defaultSizeMap = {
|
|
1308
1261
|
h1: "2xl",
|
|
1309
1262
|
h2: "xl",
|
|
@@ -1333,7 +1286,7 @@ function Heading2({
|
|
|
1333
1286
|
children
|
|
1334
1287
|
}) {
|
|
1335
1288
|
const resolvedSize = size ?? defaultSizeMap[Tag];
|
|
1336
|
-
return /* @__PURE__ */
|
|
1289
|
+
return /* @__PURE__ */ jsx20(
|
|
1337
1290
|
Tag,
|
|
1338
1291
|
{
|
|
1339
1292
|
className: twMerge4(
|
|
@@ -1347,7 +1300,7 @@ function Heading2({
|
|
|
1347
1300
|
);
|
|
1348
1301
|
}
|
|
1349
1302
|
function H1(props) {
|
|
1350
|
-
return /* @__PURE__ */
|
|
1303
|
+
return /* @__PURE__ */ jsx20(
|
|
1351
1304
|
Heading2,
|
|
1352
1305
|
{
|
|
1353
1306
|
...props,
|
|
@@ -1358,17 +1311,17 @@ function H1(props) {
|
|
|
1358
1311
|
);
|
|
1359
1312
|
}
|
|
1360
1313
|
function H2(props) {
|
|
1361
|
-
return /* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ jsx20(Heading2, { ...props, as: "h2", size: props.size ?? "xl" });
|
|
1362
1315
|
}
|
|
1363
1316
|
function H3(props) {
|
|
1364
|
-
return /* @__PURE__ */
|
|
1317
|
+
return /* @__PURE__ */ jsx20(Heading2, { ...props, as: "h3", size: props.size ?? "lg" });
|
|
1365
1318
|
}
|
|
1366
1319
|
|
|
1367
1320
|
// src/components/Link/Link.tsx
|
|
1368
1321
|
import {
|
|
1369
1322
|
Link as AriaLink
|
|
1370
1323
|
} from "react-aria-components";
|
|
1371
|
-
import { jsx as
|
|
1324
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1372
1325
|
var variantStyles2 = {
|
|
1373
1326
|
default: [
|
|
1374
1327
|
"text-teal-700 underline",
|
|
@@ -1384,7 +1337,7 @@ function Link({
|
|
|
1384
1337
|
className,
|
|
1385
1338
|
...props
|
|
1386
1339
|
}) {
|
|
1387
|
-
return /* @__PURE__ */
|
|
1340
|
+
return /* @__PURE__ */ jsx21(
|
|
1388
1341
|
AriaLink,
|
|
1389
1342
|
{
|
|
1390
1343
|
...props,
|
|
@@ -1405,20 +1358,20 @@ import {
|
|
|
1405
1358
|
Link as Link2
|
|
1406
1359
|
} from "react-aria-components";
|
|
1407
1360
|
import { ChevronRight } from "lucide-react";
|
|
1408
|
-
import { Fragment as Fragment6, jsx as
|
|
1361
|
+
import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1409
1362
|
function Breadcrumbs({ items, className }) {
|
|
1410
|
-
return /* @__PURE__ */
|
|
1363
|
+
return /* @__PURE__ */ jsx22(
|
|
1411
1364
|
"nav",
|
|
1412
1365
|
{
|
|
1413
1366
|
"aria-label": "Breadcrumb",
|
|
1414
1367
|
className,
|
|
1415
|
-
children: /* @__PURE__ */
|
|
1368
|
+
children: /* @__PURE__ */ jsx22(
|
|
1416
1369
|
AriaBreadcrumbs,
|
|
1417
1370
|
{
|
|
1418
1371
|
className: "flex items-center gap-1 text-sm min-w-0",
|
|
1419
1372
|
children: items.map((item, index) => {
|
|
1420
1373
|
const isLast = index === items.length - 1;
|
|
1421
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ jsx22(
|
|
1422
1375
|
AriaBreadcrumb,
|
|
1423
1376
|
{
|
|
1424
1377
|
id: item.id,
|
|
@@ -1426,8 +1379,8 @@ function Breadcrumbs({ items, className }) {
|
|
|
1426
1379
|
"flex items-center gap-1",
|
|
1427
1380
|
isLast ? "min-w-0" : "shrink-0"
|
|
1428
1381
|
].join(" "),
|
|
1429
|
-
children: isLast ? /* @__PURE__ */
|
|
1430
|
-
/* @__PURE__ */
|
|
1382
|
+
children: isLast ? /* @__PURE__ */ jsx22("span", { className: "font-medium text-(--color-text-primary) truncate", children: item.label }) : /* @__PURE__ */ jsxs15(Fragment6, { children: [
|
|
1383
|
+
/* @__PURE__ */ jsx22(
|
|
1431
1384
|
Link2,
|
|
1432
1385
|
{
|
|
1433
1386
|
href: item.href,
|
|
@@ -1435,7 +1388,7 @@ function Breadcrumbs({ items, className }) {
|
|
|
1435
1388
|
children: item.label
|
|
1436
1389
|
}
|
|
1437
1390
|
),
|
|
1438
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ jsx22(
|
|
1439
1392
|
ChevronRight,
|
|
1440
1393
|
{
|
|
1441
1394
|
className: "shrink-0 text-neutral-400",
|
|
@@ -1459,7 +1412,7 @@ import {
|
|
|
1459
1412
|
Link as AriaLink2
|
|
1460
1413
|
} from "react-aria-components";
|
|
1461
1414
|
import { twMerge as twMerge5 } from "tailwind-merge";
|
|
1462
|
-
import { jsx as
|
|
1415
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1463
1416
|
var iconSizeMap3 = {
|
|
1464
1417
|
sm: "sm",
|
|
1465
1418
|
md: "sm",
|
|
@@ -1474,7 +1427,7 @@ function ButtonLink({
|
|
|
1474
1427
|
children,
|
|
1475
1428
|
...props
|
|
1476
1429
|
}) {
|
|
1477
|
-
return /* @__PURE__ */
|
|
1430
|
+
return /* @__PURE__ */ jsxs16(
|
|
1478
1431
|
AriaLink2,
|
|
1479
1432
|
{
|
|
1480
1433
|
...props,
|
|
@@ -1490,9 +1443,9 @@ function ButtonLink({
|
|
|
1490
1443
|
className
|
|
1491
1444
|
),
|
|
1492
1445
|
children: [
|
|
1493
|
-
iconLeft && /* @__PURE__ */
|
|
1446
|
+
iconLeft && /* @__PURE__ */ jsx23(Icon, { icon: iconLeft, size: iconSizeMap3[size] }),
|
|
1494
1447
|
children,
|
|
1495
|
-
iconRight && /* @__PURE__ */
|
|
1448
|
+
iconRight && /* @__PURE__ */ jsx23(Icon, { icon: iconRight, size: iconSizeMap3[size] })
|
|
1496
1449
|
]
|
|
1497
1450
|
}
|
|
1498
1451
|
);
|
|
@@ -1512,7 +1465,7 @@ function IconButtonLink({
|
|
|
1512
1465
|
className,
|
|
1513
1466
|
...props
|
|
1514
1467
|
}) {
|
|
1515
|
-
const link = /* @__PURE__ */
|
|
1468
|
+
const link = /* @__PURE__ */ jsx23(
|
|
1516
1469
|
AriaLink2,
|
|
1517
1470
|
{
|
|
1518
1471
|
...props,
|
|
@@ -1526,11 +1479,11 @@ function IconButtonLink({
|
|
|
1526
1479
|
squareSizeStyles2[size],
|
|
1527
1480
|
className
|
|
1528
1481
|
),
|
|
1529
|
-
children: /* @__PURE__ */
|
|
1482
|
+
children: /* @__PURE__ */ jsx23(Icon, { icon, size: iconSizeMap3[size] })
|
|
1530
1483
|
}
|
|
1531
1484
|
);
|
|
1532
1485
|
if (showTooltip) {
|
|
1533
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ jsx23(Tooltip, { content: ariaLabel, placement: tooltipPlacement, children: link });
|
|
1534
1487
|
}
|
|
1535
1488
|
return link;
|
|
1536
1489
|
}
|
|
@@ -1540,7 +1493,7 @@ import {
|
|
|
1540
1493
|
ToggleButton as AriaToggleButton
|
|
1541
1494
|
} from "react-aria-components";
|
|
1542
1495
|
import { twMerge as twMerge6 } from "tailwind-merge";
|
|
1543
|
-
import { jsx as
|
|
1496
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1544
1497
|
var sizeStyles4 = {
|
|
1545
1498
|
sm: "px-3 py-1.5 text-sm",
|
|
1546
1499
|
md: "px-4 py-2 text-base",
|
|
@@ -1589,7 +1542,7 @@ function ToggleButton({
|
|
|
1589
1542
|
...props
|
|
1590
1543
|
}) {
|
|
1591
1544
|
const styles = variantStyles3[variant];
|
|
1592
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ jsx24(
|
|
1593
1546
|
AriaToggleButton,
|
|
1594
1547
|
{
|
|
1595
1548
|
...props,
|
|
@@ -1616,7 +1569,7 @@ import {
|
|
|
1616
1569
|
RadioGroup as AriaRadioGroup2,
|
|
1617
1570
|
Radio as AriaRadio2
|
|
1618
1571
|
} from "react-aria-components";
|
|
1619
|
-
import { jsx as
|
|
1572
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1620
1573
|
var ToggleButtonGroupContext = createContext3({
|
|
1621
1574
|
size: "md"
|
|
1622
1575
|
});
|
|
@@ -1636,7 +1589,7 @@ function ToggleButtonGroup({
|
|
|
1636
1589
|
children,
|
|
1637
1590
|
...props
|
|
1638
1591
|
}) {
|
|
1639
|
-
return /* @__PURE__ */
|
|
1592
|
+
return /* @__PURE__ */ jsx25(ToggleButtonGroupContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx25(
|
|
1640
1593
|
AriaRadioGroup2,
|
|
1641
1594
|
{
|
|
1642
1595
|
...props,
|
|
@@ -1656,7 +1609,7 @@ function ToggleButtonGroupItem({
|
|
|
1656
1609
|
...props
|
|
1657
1610
|
}) {
|
|
1658
1611
|
const { size } = useContext3(ToggleButtonGroupContext);
|
|
1659
|
-
return /* @__PURE__ */
|
|
1612
|
+
return /* @__PURE__ */ jsx25(
|
|
1660
1613
|
AriaRadio2,
|
|
1661
1614
|
{
|
|
1662
1615
|
...props,
|
|
@@ -1688,7 +1641,7 @@ import {
|
|
|
1688
1641
|
MenuItem as AriaMenuItem,
|
|
1689
1642
|
Popover as Popover2
|
|
1690
1643
|
} from "react-aria-components";
|
|
1691
|
-
import { jsx as
|
|
1644
|
+
import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1692
1645
|
var popoverStyles = [
|
|
1693
1646
|
"bg-(--color-surface-default) rounded-md",
|
|
1694
1647
|
"shadow-lg border border-(--color-border-default)",
|
|
@@ -1708,13 +1661,13 @@ function Menu({
|
|
|
1708
1661
|
className
|
|
1709
1662
|
}) {
|
|
1710
1663
|
const selectionProps = selectionMode && selectionMode !== "none" ? { selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange } : {};
|
|
1711
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ jsxs17(MenuTrigger, { children: [
|
|
1712
1665
|
children,
|
|
1713
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ jsx26(
|
|
1714
1667
|
Popover2,
|
|
1715
1668
|
{
|
|
1716
1669
|
className: [popoverStyles, className].filter(Boolean).join(" "),
|
|
1717
|
-
children: items ? /* @__PURE__ */
|
|
1670
|
+
children: items ? /* @__PURE__ */ jsx26(
|
|
1718
1671
|
AriaMenu,
|
|
1719
1672
|
{
|
|
1720
1673
|
items,
|
|
@@ -1725,7 +1678,7 @@ function Menu({
|
|
|
1725
1678
|
},
|
|
1726
1679
|
...selectionProps,
|
|
1727
1680
|
className: "outline-none",
|
|
1728
|
-
children: (item) => /* @__PURE__ */
|
|
1681
|
+
children: (item) => /* @__PURE__ */ jsxs17(
|
|
1729
1682
|
AriaMenuItem,
|
|
1730
1683
|
{
|
|
1731
1684
|
id: item.id,
|
|
@@ -1741,14 +1694,14 @@ function Menu({
|
|
|
1741
1694
|
item.isDanger ? "text-(--color-text-danger)" : "text-(--color-text-primary)"
|
|
1742
1695
|
].filter(Boolean).join(" "),
|
|
1743
1696
|
children: [
|
|
1744
|
-
item.icon && /* @__PURE__ */
|
|
1745
|
-
/* @__PURE__ */
|
|
1746
|
-
item.endContent && /* @__PURE__ */
|
|
1697
|
+
item.icon && /* @__PURE__ */ jsx26(Icon, { icon: item.icon, size: "sm" }),
|
|
1698
|
+
/* @__PURE__ */ jsx26("span", { className: "flex-1", children: item.label }),
|
|
1699
|
+
item.endContent && /* @__PURE__ */ jsx26("span", { className: "ml-auto flex items-center", children: item.endContent })
|
|
1747
1700
|
]
|
|
1748
1701
|
}
|
|
1749
1702
|
)
|
|
1750
1703
|
}
|
|
1751
|
-
) : /* @__PURE__ */
|
|
1704
|
+
) : /* @__PURE__ */ jsx26(
|
|
1752
1705
|
AriaMenu,
|
|
1753
1706
|
{
|
|
1754
1707
|
onAction: (key) => onAction?.(key),
|
|
@@ -1764,7 +1717,7 @@ function Menu({
|
|
|
1764
1717
|
|
|
1765
1718
|
// src/components/Menu/MenuItem.tsx
|
|
1766
1719
|
import { MenuItem as AriaMenuItem2 } from "react-aria-components";
|
|
1767
|
-
import { jsx as
|
|
1720
|
+
import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1768
1721
|
function MenuItem({
|
|
1769
1722
|
id,
|
|
1770
1723
|
children,
|
|
@@ -1778,7 +1731,7 @@ function MenuItem({
|
|
|
1778
1731
|
textValue,
|
|
1779
1732
|
className
|
|
1780
1733
|
}) {
|
|
1781
|
-
return /* @__PURE__ */
|
|
1734
|
+
return /* @__PURE__ */ jsxs18(
|
|
1782
1735
|
AriaMenuItem2,
|
|
1783
1736
|
{
|
|
1784
1737
|
id,
|
|
@@ -1797,9 +1750,9 @@ function MenuItem({
|
|
|
1797
1750
|
className
|
|
1798
1751
|
].filter(Boolean).join(" "),
|
|
1799
1752
|
children: [
|
|
1800
|
-
icon && /* @__PURE__ */
|
|
1801
|
-
/* @__PURE__ */
|
|
1802
|
-
endContent && /* @__PURE__ */
|
|
1753
|
+
icon && /* @__PURE__ */ jsx27(Icon, { icon, size: "sm" }),
|
|
1754
|
+
/* @__PURE__ */ jsx27("span", { className: "flex-1", children }),
|
|
1755
|
+
endContent && /* @__PURE__ */ jsx27("span", { className: "ml-auto flex items-center", children: endContent })
|
|
1803
1756
|
]
|
|
1804
1757
|
}
|
|
1805
1758
|
);
|
|
@@ -1808,7 +1761,7 @@ function MenuItem({
|
|
|
1808
1761
|
// src/components/Menu/MenuCheckboxItem.tsx
|
|
1809
1762
|
import { MenuItem as AriaMenuItem3 } from "react-aria-components";
|
|
1810
1763
|
import { Check as Check3 } from "lucide-react";
|
|
1811
|
-
import { Fragment as Fragment7, jsx as
|
|
1764
|
+
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1812
1765
|
function MenuCheckboxItem({
|
|
1813
1766
|
id,
|
|
1814
1767
|
children,
|
|
@@ -1816,7 +1769,7 @@ function MenuCheckboxItem({
|
|
|
1816
1769
|
isDisabled,
|
|
1817
1770
|
className
|
|
1818
1771
|
}) {
|
|
1819
|
-
return /* @__PURE__ */
|
|
1772
|
+
return /* @__PURE__ */ jsx28(
|
|
1820
1773
|
AriaMenuItem3,
|
|
1821
1774
|
{
|
|
1822
1775
|
id,
|
|
@@ -1832,9 +1785,9 @@ function MenuCheckboxItem({
|
|
|
1832
1785
|
isSelected ? "font-medium" : "",
|
|
1833
1786
|
className
|
|
1834
1787
|
].filter(Boolean).join(" "),
|
|
1835
|
-
children: ({ isSelected }) => /* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */
|
|
1788
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
1789
|
+
/* @__PURE__ */ jsx28("span", { className: "flex items-center justify-center w-4 h-4 shrink-0", children: isSelected && /* @__PURE__ */ jsx28(Check3, { size: 14, className: "text-(--color-action-primary)", "aria-hidden": "true" }) }),
|
|
1790
|
+
/* @__PURE__ */ jsx28("span", { className: "flex-1", children })
|
|
1838
1791
|
] })
|
|
1839
1792
|
}
|
|
1840
1793
|
);
|
|
@@ -1845,15 +1798,15 @@ import {
|
|
|
1845
1798
|
MenuSection as AriaMenuSection,
|
|
1846
1799
|
Header
|
|
1847
1800
|
} from "react-aria-components";
|
|
1848
|
-
import { jsx as
|
|
1801
|
+
import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1849
1802
|
function MenuSection({
|
|
1850
1803
|
header,
|
|
1851
1804
|
children,
|
|
1852
1805
|
"aria-label": ariaLabel,
|
|
1853
1806
|
className
|
|
1854
1807
|
}) {
|
|
1855
|
-
return /* @__PURE__ */
|
|
1856
|
-
header && /* @__PURE__ */
|
|
1808
|
+
return /* @__PURE__ */ jsxs20(AriaMenuSection, { className, "aria-label": ariaLabel, children: [
|
|
1809
|
+
header && /* @__PURE__ */ jsx29(
|
|
1857
1810
|
Header,
|
|
1858
1811
|
{
|
|
1859
1812
|
className: [
|
|
@@ -1872,16 +1825,16 @@ function MenuSection({
|
|
|
1872
1825
|
|
|
1873
1826
|
// src/components/Menu/MenuHeader.tsx
|
|
1874
1827
|
import { Header as Header2 } from "react-aria-components";
|
|
1875
|
-
import { jsx as
|
|
1828
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1876
1829
|
function MenuHeader({ children, className }) {
|
|
1877
|
-
return /* @__PURE__ */
|
|
1830
|
+
return /* @__PURE__ */ jsx30(Header2, { className, children });
|
|
1878
1831
|
}
|
|
1879
1832
|
|
|
1880
1833
|
// src/components/Menu/MenuSeparator.tsx
|
|
1881
1834
|
import { Separator } from "react-aria-components";
|
|
1882
|
-
import { jsx as
|
|
1835
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1883
1836
|
function MenuSeparator({ className }) {
|
|
1884
|
-
return /* @__PURE__ */
|
|
1837
|
+
return /* @__PURE__ */ jsx31(
|
|
1885
1838
|
Separator,
|
|
1886
1839
|
{
|
|
1887
1840
|
className: [
|
|
@@ -1899,16 +1852,16 @@ import {
|
|
|
1899
1852
|
Button as AriaButton3
|
|
1900
1853
|
} from "react-aria-components";
|
|
1901
1854
|
import { twMerge as twMerge8 } from "tailwind-merge";
|
|
1902
|
-
import { jsx as
|
|
1855
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1903
1856
|
function Popover3({ children, isOpen, onOpenChange }) {
|
|
1904
|
-
return /* @__PURE__ */
|
|
1857
|
+
return /* @__PURE__ */ jsx32(DialogTrigger, { isOpen, onOpenChange, children });
|
|
1905
1858
|
}
|
|
1906
1859
|
function PopoverTrigger({ children, className }) {
|
|
1907
1860
|
const cx = `
|
|
1908
1861
|
inline-flex items-center bg-transparent border-none p-0 outline-none cursor-pointer
|
|
1909
1862
|
focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:rounded-sm
|
|
1910
1863
|
`;
|
|
1911
|
-
return /* @__PURE__ */
|
|
1864
|
+
return /* @__PURE__ */ jsx32(AriaButton3, { className: twMerge8(cx, className), children });
|
|
1912
1865
|
}
|
|
1913
1866
|
function PopoverContent({
|
|
1914
1867
|
placement = "bottom",
|
|
@@ -1929,7 +1882,7 @@ function PopoverContent({
|
|
|
1929
1882
|
entering:placement-left:slide-in-from-right-1
|
|
1930
1883
|
entering:placement-right:slide-in-from-left-1
|
|
1931
1884
|
`;
|
|
1932
|
-
return /* @__PURE__ */
|
|
1885
|
+
return /* @__PURE__ */ jsx32(
|
|
1933
1886
|
AriaPopover,
|
|
1934
1887
|
{
|
|
1935
1888
|
...rest,
|
|
@@ -1950,7 +1903,7 @@ import {
|
|
|
1950
1903
|
Tab as AriaTab,
|
|
1951
1904
|
TabPanel as AriaTabPanel
|
|
1952
1905
|
} from "react-aria-components";
|
|
1953
|
-
import { jsx as
|
|
1906
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1954
1907
|
var TabsContext = createContext4({
|
|
1955
1908
|
variant: "underline",
|
|
1956
1909
|
size: "md"
|
|
@@ -1968,7 +1921,7 @@ function Tabs({
|
|
|
1968
1921
|
children,
|
|
1969
1922
|
...props
|
|
1970
1923
|
}) {
|
|
1971
|
-
return /* @__PURE__ */
|
|
1924
|
+
return /* @__PURE__ */ jsx33(TabsContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx33(
|
|
1972
1925
|
AriaTabs,
|
|
1973
1926
|
{
|
|
1974
1927
|
...props,
|
|
@@ -1988,7 +1941,7 @@ function TabList({
|
|
|
1988
1941
|
const { variant } = useContext4(TabsContext);
|
|
1989
1942
|
const baseStyles = variant === "unstyled" ? "flex items-center" : variant === "underline" ? "flex items-center border-b border-(--color-border-default)" : "inline-flex items-center bg-(--color-surface-muted) rounded-lg p-1 gap-1";
|
|
1990
1943
|
const verticalStyles = variant === "unstyled" ? "flex-col" : variant === "underline" ? "flex-col border-b-0 border-r border-(--color-border-default)" : "flex-col";
|
|
1991
|
-
return /* @__PURE__ */
|
|
1944
|
+
return /* @__PURE__ */ jsx33(
|
|
1992
1945
|
AriaTabList,
|
|
1993
1946
|
{
|
|
1994
1947
|
...props,
|
|
@@ -2002,7 +1955,7 @@ function TabList({
|
|
|
2002
1955
|
}
|
|
2003
1956
|
function Tab({ className, ...props }) {
|
|
2004
1957
|
const { variant, size } = useContext4(TabsContext);
|
|
2005
|
-
return /* @__PURE__ */
|
|
1958
|
+
return /* @__PURE__ */ jsx33(
|
|
2006
1959
|
AriaTab,
|
|
2007
1960
|
{
|
|
2008
1961
|
...props,
|
|
@@ -2059,7 +2012,7 @@ function getTabVariantStyles(variant, state) {
|
|
|
2059
2012
|
}
|
|
2060
2013
|
function TabPanel({ className, ...props }) {
|
|
2061
2014
|
const { variant } = useContext4(TabsContext);
|
|
2062
|
-
return /* @__PURE__ */
|
|
2015
|
+
return /* @__PURE__ */ jsx33(
|
|
2063
2016
|
AriaTabPanel,
|
|
2064
2017
|
{
|
|
2065
2018
|
...props,
|
|
@@ -2084,7 +2037,7 @@ import { useCallback as useCallback2, useImperativeHandle, useRef as useRef2, us
|
|
|
2084
2037
|
import { Tree as ArboristTree } from "react-arborist";
|
|
2085
2038
|
import { ChevronRight as ChevronRight2, Folder, File } from "lucide-react";
|
|
2086
2039
|
import { Check as Check4 } from "lucide-react";
|
|
2087
|
-
import { jsx as
|
|
2040
|
+
import { jsx as jsx34, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2088
2041
|
var rowHeightMap = {
|
|
2089
2042
|
compact: 32,
|
|
2090
2043
|
comfortable: 40
|
|
@@ -2108,7 +2061,7 @@ function NodeRenderer({
|
|
|
2108
2061
|
const isSelected = node.isSelected && !isCheckbox;
|
|
2109
2062
|
const isCompact = size === "compact";
|
|
2110
2063
|
const IconComponent = data.icon ? data.icon : node.isInternal ? Folder : File;
|
|
2111
|
-
return /* @__PURE__ */
|
|
2064
|
+
return /* @__PURE__ */ jsxs21(
|
|
2112
2065
|
"div",
|
|
2113
2066
|
{
|
|
2114
2067
|
ref: dragHandle,
|
|
@@ -2143,7 +2096,7 @@ function NodeRenderer({
|
|
|
2143
2096
|
}
|
|
2144
2097
|
},
|
|
2145
2098
|
children: [
|
|
2146
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ jsx34(
|
|
2147
2100
|
"button",
|
|
2148
2101
|
{
|
|
2149
2102
|
type: "button",
|
|
@@ -2162,7 +2115,7 @@ function NodeRenderer({
|
|
|
2162
2115
|
},
|
|
2163
2116
|
tabIndex: -1,
|
|
2164
2117
|
"aria-label": node.isOpen ? "Collapse" : "Expand",
|
|
2165
|
-
children: /* @__PURE__ */
|
|
2118
|
+
children: /* @__PURE__ */ jsx34(
|
|
2166
2119
|
ChevronRight2,
|
|
2167
2120
|
{
|
|
2168
2121
|
size: 14,
|
|
@@ -2174,7 +2127,7 @@ function NodeRenderer({
|
|
|
2174
2127
|
)
|
|
2175
2128
|
}
|
|
2176
2129
|
),
|
|
2177
|
-
isCheckbox && /* @__PURE__ */
|
|
2130
|
+
isCheckbox && /* @__PURE__ */ jsx34(
|
|
2178
2131
|
"div",
|
|
2179
2132
|
{
|
|
2180
2133
|
className: [
|
|
@@ -2185,7 +2138,7 @@ function NodeRenderer({
|
|
|
2185
2138
|
role: "checkbox",
|
|
2186
2139
|
"aria-checked": isChecked,
|
|
2187
2140
|
"aria-label": `Select ${data.name}`,
|
|
2188
|
-
children: isChecked && /* @__PURE__ */
|
|
2141
|
+
children: isChecked && /* @__PURE__ */ jsx34(
|
|
2189
2142
|
Check4,
|
|
2190
2143
|
{
|
|
2191
2144
|
className: "w-3 h-3 text-(--color-text-inverse)",
|
|
@@ -2194,7 +2147,7 @@ function NodeRenderer({
|
|
|
2194
2147
|
)
|
|
2195
2148
|
}
|
|
2196
2149
|
),
|
|
2197
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ jsx34(
|
|
2198
2151
|
IconComponent,
|
|
2199
2152
|
{
|
|
2200
2153
|
size: 16,
|
|
@@ -2202,7 +2155,7 @@ function NodeRenderer({
|
|
|
2202
2155
|
"aria-hidden": "true"
|
|
2203
2156
|
}
|
|
2204
2157
|
),
|
|
2205
|
-
/* @__PURE__ */
|
|
2158
|
+
/* @__PURE__ */ jsx34("span", { className: "truncate", children: data.name })
|
|
2206
2159
|
]
|
|
2207
2160
|
}
|
|
2208
2161
|
);
|
|
@@ -2269,13 +2222,13 @@ function Tree({
|
|
|
2269
2222
|
);
|
|
2270
2223
|
const arboristSearchMatch = searchMatch ? (node, term) => searchMatch(node.data, term) : void 0;
|
|
2271
2224
|
const selectionProp = selectionMode === "single" && selectedIds && selectedIds.size > 0 ? [...selectedIds][0] : void 0;
|
|
2272
|
-
return /* @__PURE__ */
|
|
2225
|
+
return /* @__PURE__ */ jsx34(
|
|
2273
2226
|
"div",
|
|
2274
2227
|
{
|
|
2275
2228
|
role: "tree",
|
|
2276
2229
|
"aria-label": ariaLabel,
|
|
2277
2230
|
className: ["outline-none overflow-hidden", className].filter(Boolean).join(" "),
|
|
2278
|
-
children: /* @__PURE__ */
|
|
2231
|
+
children: /* @__PURE__ */ jsx34(
|
|
2279
2232
|
ArboristTree,
|
|
2280
2233
|
{
|
|
2281
2234
|
ref: internalRef,
|
|
@@ -2294,7 +2247,7 @@ function Tree({
|
|
|
2294
2247
|
onSelect: handleSelect,
|
|
2295
2248
|
onActivate: handleActivate,
|
|
2296
2249
|
disableEdit: true,
|
|
2297
|
-
children: (props) => /* @__PURE__ */
|
|
2250
|
+
children: (props) => /* @__PURE__ */ jsx34(
|
|
2298
2251
|
NodeRenderer,
|
|
2299
2252
|
{
|
|
2300
2253
|
...props,
|
|
@@ -2320,7 +2273,7 @@ import {
|
|
|
2320
2273
|
ToggleButtonGroup as AriaToggleButtonGroup,
|
|
2321
2274
|
ToggleButton as AriaToggleButton2
|
|
2322
2275
|
} from "react-aria-components";
|
|
2323
|
-
import { jsx as
|
|
2276
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2324
2277
|
var SegmentedControlContext = createContext5({
|
|
2325
2278
|
size: "md"
|
|
2326
2279
|
});
|
|
@@ -2340,7 +2293,7 @@ function SegmentedControl({
|
|
|
2340
2293
|
...props
|
|
2341
2294
|
}) {
|
|
2342
2295
|
const isNoneMode = selectionMode === "none";
|
|
2343
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ jsx35(SegmentedControlContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx35(
|
|
2344
2297
|
AriaToggleButtonGroup,
|
|
2345
2298
|
{
|
|
2346
2299
|
...props,
|
|
@@ -2361,7 +2314,7 @@ function SegmentedControlItem({
|
|
|
2361
2314
|
...props
|
|
2362
2315
|
}) {
|
|
2363
2316
|
const { size } = useContext5(SegmentedControlContext);
|
|
2364
|
-
return /* @__PURE__ */
|
|
2317
|
+
return /* @__PURE__ */ jsx35(
|
|
2365
2318
|
AriaToggleButton2,
|
|
2366
2319
|
{
|
|
2367
2320
|
...props,
|
|
@@ -2388,7 +2341,7 @@ function SegmentedControlItem({
|
|
|
2388
2341
|
// src/components/FileCard/FileCard.tsx
|
|
2389
2342
|
import { useCallback as useCallback3 } from "react";
|
|
2390
2343
|
import { File as File2, Info as Info2 } from "lucide-react";
|
|
2391
|
-
import { Fragment as Fragment8, jsx as
|
|
2344
|
+
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2392
2345
|
function FileCard({
|
|
2393
2346
|
name,
|
|
2394
2347
|
icon: IconComponent = File2,
|
|
@@ -2422,15 +2375,15 @@ function FileCard({
|
|
|
2422
2375
|
},
|
|
2423
2376
|
[onPress]
|
|
2424
2377
|
);
|
|
2425
|
-
const cardContent = /* @__PURE__ */
|
|
2426
|
-
/* @__PURE__ */
|
|
2378
|
+
const cardContent = /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
2379
|
+
/* @__PURE__ */ jsx36(
|
|
2427
2380
|
"div",
|
|
2428
2381
|
{
|
|
2429
2382
|
className: `shrink-0 overflow-hidden bg-neutral-900 ${thumbnailClass}`,
|
|
2430
|
-
children: children ? /* @__PURE__ */
|
|
2383
|
+
children: children ? /* @__PURE__ */ jsx36("div", { className: "h-full w-full overflow-hidden", children }) : /* @__PURE__ */ jsx36("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx36(IconComponent, { size: iconSize, className: "text-(--color-text-secondary)" }) })
|
|
2431
2384
|
}
|
|
2432
2385
|
),
|
|
2433
|
-
/* @__PURE__ */
|
|
2386
|
+
/* @__PURE__ */ jsx36(
|
|
2434
2387
|
"div",
|
|
2435
2388
|
{
|
|
2436
2389
|
className: [
|
|
@@ -2438,17 +2391,17 @@ function FileCard({
|
|
|
2438
2391
|
"bg-(--color-surface-default)",
|
|
2439
2392
|
compact ? "px-2 py-1.5 rounded-b-(--border-radius-md)" : "gap-0.5 px-3 py-2 rounded-b-(--border-radius-lg)"
|
|
2440
2393
|
].join(" "),
|
|
2441
|
-
children: compact ? /* @__PURE__ */
|
|
2442
|
-
/* @__PURE__ */
|
|
2443
|
-
/* @__PURE__ */
|
|
2394
|
+
children: compact ? /* @__PURE__ */ jsx36("span", { className: "text-xs font-medium text-(--color-text-primary) truncate", children: name }) : /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
2395
|
+
/* @__PURE__ */ jsxs22("span", { className: "flex items-center gap-1.5", children: [
|
|
2396
|
+
/* @__PURE__ */ jsx36(
|
|
2444
2397
|
IconComponent,
|
|
2445
2398
|
{
|
|
2446
2399
|
size: 16,
|
|
2447
2400
|
className: "shrink-0 text-(--color-text-secondary)"
|
|
2448
2401
|
}
|
|
2449
2402
|
),
|
|
2450
|
-
/* @__PURE__ */
|
|
2451
|
-
onInfo && /* @__PURE__ */
|
|
2403
|
+
/* @__PURE__ */ jsx36("span", { className: "min-w-0 flex-1 text-sm font-medium text-(--color-text-primary) truncate", children: name }),
|
|
2404
|
+
onInfo && /* @__PURE__ */ jsx36(
|
|
2452
2405
|
"span",
|
|
2453
2406
|
{
|
|
2454
2407
|
onClick: handleInfoClick,
|
|
@@ -2458,7 +2411,7 @@ function FileCard({
|
|
|
2458
2411
|
}
|
|
2459
2412
|
},
|
|
2460
2413
|
role: "presentation",
|
|
2461
|
-
children: /* @__PURE__ */
|
|
2414
|
+
children: /* @__PURE__ */ jsx36(
|
|
2462
2415
|
IconButton,
|
|
2463
2416
|
{
|
|
2464
2417
|
icon: Info2,
|
|
@@ -2472,7 +2425,7 @@ function FileCard({
|
|
|
2472
2425
|
}
|
|
2473
2426
|
)
|
|
2474
2427
|
] }),
|
|
2475
|
-
size && /* @__PURE__ */
|
|
2428
|
+
size && /* @__PURE__ */ jsx36("span", { className: "text-xs text-(--color-text-secondary) tabular-nums pl-[22px]", children: size })
|
|
2476
2429
|
] })
|
|
2477
2430
|
}
|
|
2478
2431
|
)
|
|
@@ -2488,7 +2441,7 @@ function FileCard({
|
|
|
2488
2441
|
className
|
|
2489
2442
|
].filter(Boolean).join(" ");
|
|
2490
2443
|
if (onPress) {
|
|
2491
|
-
return /* @__PURE__ */
|
|
2444
|
+
return /* @__PURE__ */ jsx36(
|
|
2492
2445
|
"div",
|
|
2493
2446
|
{
|
|
2494
2447
|
role: "button",
|
|
@@ -2501,14 +2454,14 @@ function FileCard({
|
|
|
2501
2454
|
}
|
|
2502
2455
|
);
|
|
2503
2456
|
}
|
|
2504
|
-
return /* @__PURE__ */
|
|
2457
|
+
return /* @__PURE__ */ jsx36("div", { className: baseStyles, children: cardContent });
|
|
2505
2458
|
}
|
|
2506
2459
|
|
|
2507
2460
|
// src/components/StorageConnectionCard/StorageConnectionCard.tsx
|
|
2508
2461
|
import { useCallback as useCallback4 } from "react";
|
|
2509
2462
|
import { AlertCircle, Database } from "lucide-react";
|
|
2510
2463
|
import { twMerge as twMerge11 } from "tailwind-merge";
|
|
2511
|
-
import { Fragment as Fragment9, jsx as
|
|
2464
|
+
import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2512
2465
|
var statusDotStyles = {
|
|
2513
2466
|
connected: "bg-(--color-status-success)",
|
|
2514
2467
|
error: "border-2 border-(--color-status-danger) bg-transparent",
|
|
@@ -2520,11 +2473,11 @@ function PreviewArea({
|
|
|
2520
2473
|
children
|
|
2521
2474
|
}) {
|
|
2522
2475
|
if (status === "loading") {
|
|
2523
|
-
return /* @__PURE__ */
|
|
2476
|
+
return /* @__PURE__ */ jsx37("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx37(Spinner, { size: "lg", "aria-label": "Loading connection" }) });
|
|
2524
2477
|
}
|
|
2525
2478
|
if (status === "error") {
|
|
2526
|
-
return /* @__PURE__ */
|
|
2527
|
-
/* @__PURE__ */
|
|
2479
|
+
return /* @__PURE__ */ jsxs23("div", { className: "flex h-full flex-col items-center justify-center gap-2 bg-(--color-surface-danger) px-4", children: [
|
|
2480
|
+
/* @__PURE__ */ jsx37(
|
|
2528
2481
|
Icon,
|
|
2529
2482
|
{
|
|
2530
2483
|
icon: AlertCircle,
|
|
@@ -2532,13 +2485,13 @@ function PreviewArea({
|
|
|
2532
2485
|
className: "text-(--color-text-danger)"
|
|
2533
2486
|
}
|
|
2534
2487
|
),
|
|
2535
|
-
errorMessage && /* @__PURE__ */
|
|
2488
|
+
errorMessage && /* @__PURE__ */ jsx37("p", { className: "text-center text-xs text-(--color-text-danger)", children: errorMessage })
|
|
2536
2489
|
] });
|
|
2537
2490
|
}
|
|
2538
2491
|
if (children) {
|
|
2539
|
-
return /* @__PURE__ */
|
|
2492
|
+
return /* @__PURE__ */ jsx37("div", { className: "h-full w-full overflow-hidden", children });
|
|
2540
2493
|
}
|
|
2541
|
-
return /* @__PURE__ */
|
|
2494
|
+
return /* @__PURE__ */ jsx37("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx37(
|
|
2542
2495
|
Icon,
|
|
2543
2496
|
{
|
|
2544
2497
|
icon: Database,
|
|
@@ -2568,11 +2521,11 @@ function StorageConnectionCard({
|
|
|
2568
2521
|
},
|
|
2569
2522
|
[onPress]
|
|
2570
2523
|
);
|
|
2571
|
-
const cardContent = /* @__PURE__ */
|
|
2572
|
-
/* @__PURE__ */
|
|
2573
|
-
/* @__PURE__ */
|
|
2574
|
-
/* @__PURE__ */
|
|
2575
|
-
status && /* @__PURE__ */
|
|
2524
|
+
const cardContent = /* @__PURE__ */ jsxs23(Fragment9, { children: [
|
|
2525
|
+
/* @__PURE__ */ jsx37("div", { className: "aspect-[4/3] bg-neutral-900 overflow-hidden rounded-t-(--border-radius-lg)", children: /* @__PURE__ */ jsx37(PreviewArea, { status, errorMessage, children }) }),
|
|
2526
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1.5 border-t border-(--color-border-default) bg-(--color-surface-default) px-3 py-2.5 rounded-b-(--border-radius-lg)", children: [
|
|
2527
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-start gap-2", children: [
|
|
2528
|
+
status && /* @__PURE__ */ jsx37(
|
|
2576
2529
|
"span",
|
|
2577
2530
|
{
|
|
2578
2531
|
className: twMerge11(
|
|
@@ -2582,8 +2535,8 @@ function StorageConnectionCard({
|
|
|
2582
2535
|
"aria-label": `Status: ${status}`
|
|
2583
2536
|
}
|
|
2584
2537
|
),
|
|
2585
|
-
/* @__PURE__ */
|
|
2586
|
-
actions && /* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ jsx37("span", { className: "min-w-0 flex-1 line-clamp-2 text-sm font-medium text-(--color-text-primary)", children: name }),
|
|
2539
|
+
actions && /* @__PURE__ */ jsx37(
|
|
2587
2540
|
"span",
|
|
2588
2541
|
{
|
|
2589
2542
|
onClick: (e) => {
|
|
@@ -2603,7 +2556,7 @@ function StorageConnectionCard({
|
|
|
2603
2556
|
}
|
|
2604
2557
|
)
|
|
2605
2558
|
] }),
|
|
2606
|
-
meta && /* @__PURE__ */
|
|
2559
|
+
meta && /* @__PURE__ */ jsx37("div", { className: twMerge11("flex items-center gap-2", status && "pl-4"), children: meta })
|
|
2607
2560
|
] })
|
|
2608
2561
|
] });
|
|
2609
2562
|
const baseStyles = twMerge11(
|
|
@@ -2615,10 +2568,10 @@ function StorageConnectionCard({
|
|
|
2615
2568
|
className
|
|
2616
2569
|
);
|
|
2617
2570
|
if (href) {
|
|
2618
|
-
return /* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ jsx37("a", { href, className: twMerge11(baseStyles, "no-underline"), children: cardContent });
|
|
2619
2572
|
}
|
|
2620
2573
|
if (onPress) {
|
|
2621
|
-
return /* @__PURE__ */
|
|
2574
|
+
return /* @__PURE__ */ jsx37(
|
|
2622
2575
|
"div",
|
|
2623
2576
|
{
|
|
2624
2577
|
role: "button",
|
|
@@ -2630,12 +2583,12 @@ function StorageConnectionCard({
|
|
|
2630
2583
|
}
|
|
2631
2584
|
);
|
|
2632
2585
|
}
|
|
2633
|
-
return /* @__PURE__ */
|
|
2586
|
+
return /* @__PURE__ */ jsx37("div", { className: baseStyles, children: cardContent });
|
|
2634
2587
|
}
|
|
2635
2588
|
|
|
2636
2589
|
// src/components/Badge/Badge.tsx
|
|
2637
2590
|
import { twMerge as twMerge12 } from "tailwind-merge";
|
|
2638
|
-
import { jsx as
|
|
2591
|
+
import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2639
2592
|
var variantStyles4 = {
|
|
2640
2593
|
neutral: "bg-(--color-badge-neutral-bg) text-(--color-badge-neutral-text)",
|
|
2641
2594
|
purple: "bg-(--color-badge-purple-bg) text-(--color-badge-purple-text)",
|
|
@@ -2660,7 +2613,7 @@ function Badge({
|
|
|
2660
2613
|
icon: IconComponent,
|
|
2661
2614
|
className
|
|
2662
2615
|
}) {
|
|
2663
|
-
return /* @__PURE__ */
|
|
2616
|
+
return /* @__PURE__ */ jsxs24(
|
|
2664
2617
|
"span",
|
|
2665
2618
|
{
|
|
2666
2619
|
className: twMerge12(
|
|
@@ -2671,7 +2624,7 @@ function Badge({
|
|
|
2671
2624
|
className
|
|
2672
2625
|
),
|
|
2673
2626
|
children: [
|
|
2674
|
-
IconComponent && /* @__PURE__ */
|
|
2627
|
+
IconComponent && /* @__PURE__ */ jsx38(IconComponent, { size: iconSizeMap4[size], "aria-hidden": "true" }),
|
|
2675
2628
|
children
|
|
2676
2629
|
]
|
|
2677
2630
|
}
|
|
@@ -2681,7 +2634,7 @@ function Badge({
|
|
|
2681
2634
|
// src/components/Card/Card.tsx
|
|
2682
2635
|
import { useCallback as useCallback5 } from "react";
|
|
2683
2636
|
import { twMerge as twMerge13 } from "tailwind-merge";
|
|
2684
|
-
import { Fragment as Fragment10, jsx as
|
|
2637
|
+
import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2685
2638
|
var paddingStyles = {
|
|
2686
2639
|
none: "p-0",
|
|
2687
2640
|
sm: "p-3",
|
|
@@ -2714,8 +2667,8 @@ function Card({
|
|
|
2714
2667
|
},
|
|
2715
2668
|
[onPress]
|
|
2716
2669
|
);
|
|
2717
|
-
const content = /* @__PURE__ */
|
|
2718
|
-
header && /* @__PURE__ */
|
|
2670
|
+
const content = /* @__PURE__ */ jsxs25(Fragment10, { children: [
|
|
2671
|
+
header && /* @__PURE__ */ jsx39(
|
|
2719
2672
|
"div",
|
|
2720
2673
|
{
|
|
2721
2674
|
className: twMerge13(
|
|
@@ -2725,8 +2678,8 @@ function Card({
|
|
|
2725
2678
|
children: header
|
|
2726
2679
|
}
|
|
2727
2680
|
),
|
|
2728
|
-
/* @__PURE__ */
|
|
2729
|
-
footer && /* @__PURE__ */
|
|
2681
|
+
/* @__PURE__ */ jsx39("div", { className: paddingStyles[padding], children }),
|
|
2682
|
+
footer && /* @__PURE__ */ jsx39(
|
|
2730
2683
|
"div",
|
|
2731
2684
|
{
|
|
2732
2685
|
className: twMerge13(
|
|
@@ -2738,10 +2691,10 @@ function Card({
|
|
|
2738
2691
|
)
|
|
2739
2692
|
] });
|
|
2740
2693
|
if (href) {
|
|
2741
|
-
return /* @__PURE__ */
|
|
2694
|
+
return /* @__PURE__ */ jsx39("a", { href, className: containerClass, children: content });
|
|
2742
2695
|
}
|
|
2743
2696
|
if (onPress) {
|
|
2744
|
-
return /* @__PURE__ */
|
|
2697
|
+
return /* @__PURE__ */ jsx39(
|
|
2745
2698
|
"div",
|
|
2746
2699
|
{
|
|
2747
2700
|
role: "button",
|
|
@@ -2753,13 +2706,13 @@ function Card({
|
|
|
2753
2706
|
}
|
|
2754
2707
|
);
|
|
2755
2708
|
}
|
|
2756
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ jsx39("div", { className: containerClass, children: content });
|
|
2757
2710
|
}
|
|
2758
2711
|
|
|
2759
2712
|
// src/components/DeltaIndicator/DeltaIndicator.tsx
|
|
2760
2713
|
import { ArrowUp, ArrowDown, Minus } from "lucide-react";
|
|
2761
2714
|
import { twMerge as twMerge14 } from "tailwind-merge";
|
|
2762
|
-
import { jsx as
|
|
2715
|
+
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2763
2716
|
function getDirection(current, previous) {
|
|
2764
2717
|
const diff = current - previous;
|
|
2765
2718
|
if (diff > 0) return "increase";
|
|
@@ -2812,7 +2765,7 @@ function DeltaIndicator({
|
|
|
2812
2765
|
className
|
|
2813
2766
|
}) {
|
|
2814
2767
|
if (unavailable) {
|
|
2815
|
-
return /* @__PURE__ */
|
|
2768
|
+
return /* @__PURE__ */ jsxs26(
|
|
2816
2769
|
"span",
|
|
2817
2770
|
{
|
|
2818
2771
|
className: twMerge14(
|
|
@@ -2821,7 +2774,7 @@ function DeltaIndicator({
|
|
|
2821
2774
|
className
|
|
2822
2775
|
),
|
|
2823
2776
|
children: [
|
|
2824
|
-
label && /* @__PURE__ */
|
|
2777
|
+
label && /* @__PURE__ */ jsx40("span", { className: "text-sm text-(--color-text-secondary) mr-1", children: label }),
|
|
2825
2778
|
unavailableText
|
|
2826
2779
|
]
|
|
2827
2780
|
}
|
|
@@ -2851,7 +2804,7 @@ function DeltaIndicator({
|
|
|
2851
2804
|
}
|
|
2852
2805
|
}
|
|
2853
2806
|
const isPill = mode === "pill";
|
|
2854
|
-
return /* @__PURE__ */
|
|
2807
|
+
return /* @__PURE__ */ jsxs26(
|
|
2855
2808
|
"span",
|
|
2856
2809
|
{
|
|
2857
2810
|
className: twMerge14(
|
|
@@ -2865,8 +2818,8 @@ function DeltaIndicator({
|
|
|
2865
2818
|
className
|
|
2866
2819
|
),
|
|
2867
2820
|
children: [
|
|
2868
|
-
label && /* @__PURE__ */
|
|
2869
|
-
/* @__PURE__ */
|
|
2821
|
+
label && /* @__PURE__ */ jsx40("span", { className: "text-sm text-(--color-text-secondary) mr-1", children: label }),
|
|
2822
|
+
/* @__PURE__ */ jsx40(IconComponent, { size: 14, "aria-hidden": true }),
|
|
2870
2823
|
valueText
|
|
2871
2824
|
]
|
|
2872
2825
|
}
|
|
@@ -2875,7 +2828,7 @@ function DeltaIndicator({
|
|
|
2875
2828
|
|
|
2876
2829
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2877
2830
|
import { twMerge as twMerge15 } from "tailwind-merge";
|
|
2878
|
-
import { jsx as
|
|
2831
|
+
import { jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2879
2832
|
var fillStyles = {
|
|
2880
2833
|
brand: "bg-(--color-progress-fill)",
|
|
2881
2834
|
success: "bg-(--color-progress-fill-success)",
|
|
@@ -2898,12 +2851,12 @@ function ProgressBar({
|
|
|
2898
2851
|
className
|
|
2899
2852
|
}) {
|
|
2900
2853
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2901
|
-
return /* @__PURE__ */
|
|
2902
|
-
(label || description || showValue) && /* @__PURE__ */
|
|
2903
|
-
/* @__PURE__ */
|
|
2904
|
-
/* @__PURE__ */
|
|
2854
|
+
return /* @__PURE__ */ jsxs27("div", { className: twMerge15("w-full", className), children: [
|
|
2855
|
+
(label || description || showValue) && /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between mb-2", children: [
|
|
2856
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm font-medium text-(--color-text-primary)", children: label }),
|
|
2857
|
+
/* @__PURE__ */ jsx41("span", { className: "text-sm text-(--color-text-secondary)", children: description ?? (showValue ? `${clampedValue}%` : null) })
|
|
2905
2858
|
] }),
|
|
2906
|
-
/* @__PURE__ */
|
|
2859
|
+
/* @__PURE__ */ jsx41(
|
|
2907
2860
|
"div",
|
|
2908
2861
|
{
|
|
2909
2862
|
role: "progressbar",
|
|
@@ -2915,7 +2868,7 @@ function ProgressBar({
|
|
|
2915
2868
|
"w-full rounded-full bg-(--color-progress-track)",
|
|
2916
2869
|
sizeStyles9[size]
|
|
2917
2870
|
),
|
|
2918
|
-
children: /* @__PURE__ */
|
|
2871
|
+
children: /* @__PURE__ */ jsx41(
|
|
2919
2872
|
"div",
|
|
2920
2873
|
{
|
|
2921
2874
|
className: twMerge15(
|
|
@@ -2940,7 +2893,7 @@ import {
|
|
|
2940
2893
|
X as X3
|
|
2941
2894
|
} from "lucide-react";
|
|
2942
2895
|
import { twMerge as twMerge16 } from "tailwind-merge";
|
|
2943
|
-
import { jsx as
|
|
2896
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2944
2897
|
var variantConfig2 = {
|
|
2945
2898
|
info: {
|
|
2946
2899
|
icon: Info3,
|
|
@@ -2984,7 +2937,7 @@ function Banner({
|
|
|
2984
2937
|
setDismissed(true);
|
|
2985
2938
|
onDismiss?.();
|
|
2986
2939
|
};
|
|
2987
|
-
return /* @__PURE__ */
|
|
2940
|
+
return /* @__PURE__ */ jsxs28(
|
|
2988
2941
|
"div",
|
|
2989
2942
|
{
|
|
2990
2943
|
role: config.role,
|
|
@@ -2995,7 +2948,7 @@ function Banner({
|
|
|
2995
2948
|
className
|
|
2996
2949
|
),
|
|
2997
2950
|
children: [
|
|
2998
|
-
/* @__PURE__ */
|
|
2951
|
+
/* @__PURE__ */ jsx42(
|
|
2999
2952
|
IconComponent,
|
|
3000
2953
|
{
|
|
3001
2954
|
size: 20,
|
|
@@ -3003,21 +2956,21 @@ function Banner({
|
|
|
3003
2956
|
"aria-hidden": "true"
|
|
3004
2957
|
}
|
|
3005
2958
|
),
|
|
3006
|
-
/* @__PURE__ */
|
|
3007
|
-
title && /* @__PURE__ */
|
|
2959
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex-1", children: [
|
|
2960
|
+
title && /* @__PURE__ */ jsxs28("span", { className: "font-medium", children: [
|
|
3008
2961
|
title,
|
|
3009
2962
|
" \u2014 "
|
|
3010
2963
|
] }),
|
|
3011
2964
|
children
|
|
3012
2965
|
] }),
|
|
3013
|
-
dismissible && /* @__PURE__ */
|
|
2966
|
+
dismissible && /* @__PURE__ */ jsx42(
|
|
3014
2967
|
"button",
|
|
3015
2968
|
{
|
|
3016
2969
|
type: "button",
|
|
3017
2970
|
onClick: handleDismiss,
|
|
3018
2971
|
className: "shrink-0 rounded-sm p-0.5 opacity-70 hover:opacity-100 transition-opacity outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
3019
2972
|
"aria-label": "Dismiss",
|
|
3020
|
-
children: /* @__PURE__ */
|
|
2973
|
+
children: /* @__PURE__ */ jsx42(X3, { size: 16, "aria-hidden": "true" })
|
|
3021
2974
|
}
|
|
3022
2975
|
)
|
|
3023
2976
|
]
|
|
@@ -3027,7 +2980,7 @@ function Banner({
|
|
|
3027
2980
|
|
|
3028
2981
|
// src/components/MetricCard/MetricCard.tsx
|
|
3029
2982
|
import { twMerge as twMerge17 } from "tailwind-merge";
|
|
3030
|
-
import { Fragment as Fragment11, jsx as
|
|
2983
|
+
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3031
2984
|
var sizeConfig = {
|
|
3032
2985
|
sm: {
|
|
3033
2986
|
padding: "p-3",
|
|
@@ -3055,9 +3008,9 @@ function MetricCard({
|
|
|
3055
3008
|
href && "block transition-shadow hover:shadow-md hover:border-(--color-border-focus) focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
|
|
3056
3009
|
className
|
|
3057
3010
|
);
|
|
3058
|
-
const content = /* @__PURE__ */
|
|
3059
|
-
/* @__PURE__ */
|
|
3060
|
-
/* @__PURE__ */
|
|
3011
|
+
const content = /* @__PURE__ */ jsxs29(Fragment11, { children: [
|
|
3012
|
+
/* @__PURE__ */ jsx43("div", { className: twMerge17(config.labelClass, "text-(--color-text-secondary)"), children: label }),
|
|
3013
|
+
/* @__PURE__ */ jsx43(
|
|
3061
3014
|
"div",
|
|
3062
3015
|
{
|
|
3063
3016
|
className: twMerge17(
|
|
@@ -3067,23 +3020,23 @@ function MetricCard({
|
|
|
3067
3020
|
children: value
|
|
3068
3021
|
}
|
|
3069
3022
|
),
|
|
3070
|
-
secondary && /* @__PURE__ */
|
|
3023
|
+
secondary && /* @__PURE__ */ jsx43("div", { className: "mt-1 text-sm", children: secondary })
|
|
3071
3024
|
] });
|
|
3072
3025
|
if (href) {
|
|
3073
|
-
return /* @__PURE__ */
|
|
3026
|
+
return /* @__PURE__ */ jsx43("a", { href, className: containerClass, children: content });
|
|
3074
3027
|
}
|
|
3075
|
-
return /* @__PURE__ */
|
|
3028
|
+
return /* @__PURE__ */ jsx43("div", { className: containerClass, children: content });
|
|
3076
3029
|
}
|
|
3077
3030
|
|
|
3078
3031
|
// src/components/SectionHeader/SectionHeader.tsx
|
|
3079
3032
|
import { twMerge as twMerge18 } from "tailwind-merge";
|
|
3080
|
-
import { jsx as
|
|
3033
|
+
import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3081
3034
|
function SectionHeader({
|
|
3082
3035
|
title,
|
|
3083
3036
|
children,
|
|
3084
3037
|
className
|
|
3085
3038
|
}) {
|
|
3086
|
-
return /* @__PURE__ */
|
|
3039
|
+
return /* @__PURE__ */ jsxs30(
|
|
3087
3040
|
"div",
|
|
3088
3041
|
{
|
|
3089
3042
|
className: twMerge18(
|
|
@@ -3091,8 +3044,8 @@ function SectionHeader({
|
|
|
3091
3044
|
className
|
|
3092
3045
|
),
|
|
3093
3046
|
children: [
|
|
3094
|
-
/* @__PURE__ */
|
|
3095
|
-
children && /* @__PURE__ */
|
|
3047
|
+
/* @__PURE__ */ jsx44(H2, { children: title }),
|
|
3048
|
+
children && /* @__PURE__ */ jsx44("div", { className: "ml-auto flex flex-wrap items-center gap-2", children })
|
|
3096
3049
|
]
|
|
3097
3050
|
}
|
|
3098
3051
|
);
|
|
@@ -3100,7 +3053,7 @@ function SectionHeader({
|
|
|
3100
3053
|
|
|
3101
3054
|
// src/components/Pill/Pill.tsx
|
|
3102
3055
|
import { twMerge as twMerge19 } from "tailwind-merge";
|
|
3103
|
-
import { jsx as
|
|
3056
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3104
3057
|
var hashColors = {
|
|
3105
3058
|
purple: "bg-(--color-badge-purple-bg) text-(--color-badge-purple-text) border-(--color-badge-purple-text)/20",
|
|
3106
3059
|
teal: "bg-(--color-badge-teal-bg) text-(--color-badge-teal-text) border-(--color-badge-teal-text)/20",
|
|
@@ -3138,12 +3091,12 @@ function Pill({
|
|
|
3138
3091
|
colorStyles[color],
|
|
3139
3092
|
className
|
|
3140
3093
|
);
|
|
3141
|
-
return /* @__PURE__ */
|
|
3094
|
+
return /* @__PURE__ */ jsx45("span", { className: cx, ...rest, children });
|
|
3142
3095
|
}
|
|
3143
3096
|
|
|
3144
3097
|
// src/components/Pill/PathPill.tsx
|
|
3145
3098
|
import { twMerge as twMerge20 } from "tailwind-merge";
|
|
3146
|
-
import { jsx as
|
|
3099
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3147
3100
|
function PathPill({
|
|
3148
3101
|
children,
|
|
3149
3102
|
visibleCount,
|
|
@@ -3155,7 +3108,7 @@ function PathPill({
|
|
|
3155
3108
|
const effectiveVisible = visibleCount ?? segments.length;
|
|
3156
3109
|
const dotCount = Math.max(0, segments.length - effectiveVisible);
|
|
3157
3110
|
const fullPath = segments.join(" / ");
|
|
3158
|
-
return /* @__PURE__ */
|
|
3111
|
+
return /* @__PURE__ */ jsx46(
|
|
3159
3112
|
"div",
|
|
3160
3113
|
{
|
|
3161
3114
|
className: twMerge20("relative flex", className),
|
|
@@ -3165,7 +3118,7 @@ function PathPill({
|
|
|
3165
3118
|
const isLast = i === segments.length - 1;
|
|
3166
3119
|
const cx = twMerge20(!isLast && "pr-5 -mr-4", isCollapsed && "pr-3");
|
|
3167
3120
|
const color = colorFn ? colorFn(segment, i) : pillColorFromName(segment);
|
|
3168
|
-
return /* @__PURE__ */
|
|
3121
|
+
return /* @__PURE__ */ jsx46(
|
|
3169
3122
|
Pill,
|
|
3170
3123
|
{
|
|
3171
3124
|
className: cx,
|
|
@@ -3182,7 +3135,7 @@ function PathPill({
|
|
|
3182
3135
|
|
|
3183
3136
|
// src/components/FormWizard/FormWizard.tsx
|
|
3184
3137
|
import { createContext as createContext6, useContext as useContext6, useCallback as useCallback6, useMemo } from "react";
|
|
3185
|
-
import { jsx as
|
|
3138
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3186
3139
|
var FormWizardContext = createContext6({
|
|
3187
3140
|
currentStep: 0,
|
|
3188
3141
|
totalSteps: 1,
|
|
@@ -3217,13 +3170,13 @@ function FormWizard({
|
|
|
3217
3170
|
}),
|
|
3218
3171
|
[currentStep, totalSteps, canGoBack, goBack, isLastStep]
|
|
3219
3172
|
);
|
|
3220
|
-
return /* @__PURE__ */
|
|
3173
|
+
return /* @__PURE__ */ jsx47(FormWizardContext.Provider, { value, children });
|
|
3221
3174
|
}
|
|
3222
3175
|
|
|
3223
3176
|
// src/components/FormWizard/FormWizardProgress.tsx
|
|
3224
|
-
import { jsx as
|
|
3177
|
+
import { jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3225
3178
|
function CheckIcon() {
|
|
3226
|
-
return /* @__PURE__ */
|
|
3179
|
+
return /* @__PURE__ */ jsx48(
|
|
3227
3180
|
"svg",
|
|
3228
3181
|
{
|
|
3229
3182
|
"aria-hidden": "true",
|
|
@@ -3234,24 +3187,24 @@ function CheckIcon() {
|
|
|
3234
3187
|
strokeWidth: "2",
|
|
3235
3188
|
strokeLinecap: "round",
|
|
3236
3189
|
strokeLinejoin: "round",
|
|
3237
|
-
children: /* @__PURE__ */
|
|
3190
|
+
children: /* @__PURE__ */ jsx48("path", { d: "M3 8.5l3.5 3.5 6.5-7" })
|
|
3238
3191
|
}
|
|
3239
3192
|
);
|
|
3240
3193
|
}
|
|
3241
3194
|
function FormWizardProgress({ labels }) {
|
|
3242
3195
|
const { currentStep, totalSteps } = useFormWizard();
|
|
3243
|
-
return /* @__PURE__ */
|
|
3196
|
+
return /* @__PURE__ */ jsx48("nav", { "aria-label": "Form progress", children: /* @__PURE__ */ jsx48("ol", { className: "flex items-start", role: "list", children: labels.map((label, index) => {
|
|
3244
3197
|
const isCompleted = index < currentStep;
|
|
3245
3198
|
const isCurrent = index === currentStep;
|
|
3246
3199
|
const isFuture = index > currentStep;
|
|
3247
|
-
return /* @__PURE__ */
|
|
3200
|
+
return /* @__PURE__ */ jsxs31(
|
|
3248
3201
|
"li",
|
|
3249
3202
|
{
|
|
3250
3203
|
className: "flex flex-1 flex-col items-center",
|
|
3251
3204
|
"aria-current": isCurrent ? "step" : void 0,
|
|
3252
3205
|
children: [
|
|
3253
|
-
/* @__PURE__ */
|
|
3254
|
-
index > 0 ? /* @__PURE__ */
|
|
3206
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex w-full items-center", children: [
|
|
3207
|
+
index > 0 ? /* @__PURE__ */ jsx48(
|
|
3255
3208
|
"div",
|
|
3256
3209
|
{
|
|
3257
3210
|
"aria-hidden": "true",
|
|
@@ -3260,8 +3213,8 @@ function FormWizardProgress({ labels }) {
|
|
|
3260
3213
|
index <= currentStep ? "bg-(--color-brand-primary)" : "bg-(--color-border-default)"
|
|
3261
3214
|
].join(" ")
|
|
3262
3215
|
}
|
|
3263
|
-
) : /* @__PURE__ */
|
|
3264
|
-
/* @__PURE__ */
|
|
3216
|
+
) : /* @__PURE__ */ jsx48("div", { className: "flex-1", "aria-hidden": "true" }),
|
|
3217
|
+
/* @__PURE__ */ jsx48(
|
|
3265
3218
|
"div",
|
|
3266
3219
|
{
|
|
3267
3220
|
className: [
|
|
@@ -3273,10 +3226,10 @@ function FormWizardProgress({ labels }) {
|
|
|
3273
3226
|
isFuture ? "border-2 border-(--color-border-default) bg-(--color-surface-default) text-(--color-text-tertiary)" : ""
|
|
3274
3227
|
].join(" "),
|
|
3275
3228
|
"aria-hidden": "true",
|
|
3276
|
-
children: isCompleted ? /* @__PURE__ */
|
|
3229
|
+
children: isCompleted ? /* @__PURE__ */ jsx48(CheckIcon, {}) : index + 1
|
|
3277
3230
|
}
|
|
3278
3231
|
),
|
|
3279
|
-
index < totalSteps - 1 ? /* @__PURE__ */
|
|
3232
|
+
index < totalSteps - 1 ? /* @__PURE__ */ jsx48(
|
|
3280
3233
|
"div",
|
|
3281
3234
|
{
|
|
3282
3235
|
"aria-hidden": "true",
|
|
@@ -3285,9 +3238,9 @@ function FormWizardProgress({ labels }) {
|
|
|
3285
3238
|
index < currentStep ? "bg-(--color-brand-primary)" : "bg-(--color-border-default)"
|
|
3286
3239
|
].join(" ")
|
|
3287
3240
|
}
|
|
3288
|
-
) : /* @__PURE__ */
|
|
3241
|
+
) : /* @__PURE__ */ jsx48("div", { className: "flex-1", "aria-hidden": "true" })
|
|
3289
3242
|
] }),
|
|
3290
|
-
/* @__PURE__ */
|
|
3243
|
+
/* @__PURE__ */ jsx48(
|
|
3291
3244
|
"span",
|
|
3292
3245
|
{
|
|
3293
3246
|
className: [
|
|
@@ -3305,15 +3258,15 @@ function FormWizardProgress({ labels }) {
|
|
|
3305
3258
|
}
|
|
3306
3259
|
|
|
3307
3260
|
// src/components/FormWizard/FormWizardNav.tsx
|
|
3308
|
-
import { jsx as
|
|
3261
|
+
import { jsx as jsx49, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3309
3262
|
function FormWizardNav({
|
|
3310
3263
|
onNext,
|
|
3311
3264
|
isSubmitting = false,
|
|
3312
3265
|
submitLabel = "Submit"
|
|
3313
3266
|
}) {
|
|
3314
3267
|
const { canGoBack, goBack, isLastStep } = useFormWizard();
|
|
3315
|
-
return /* @__PURE__ */
|
|
3316
|
-
canGoBack && /* @__PURE__ */
|
|
3268
|
+
return /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-end gap-3", children: [
|
|
3269
|
+
canGoBack && /* @__PURE__ */ jsx49(
|
|
3317
3270
|
Button,
|
|
3318
3271
|
{
|
|
3319
3272
|
variant: "secondary",
|
|
@@ -3323,7 +3276,7 @@ function FormWizardNav({
|
|
|
3323
3276
|
children: "Back"
|
|
3324
3277
|
}
|
|
3325
3278
|
),
|
|
3326
|
-
/* @__PURE__ */
|
|
3279
|
+
/* @__PURE__ */ jsx49(
|
|
3327
3280
|
Button,
|
|
3328
3281
|
{
|
|
3329
3282
|
variant: "primary",
|
|
@@ -3728,7 +3681,6 @@ export {
|
|
|
3728
3681
|
DeltaIndicator,
|
|
3729
3682
|
Dialog,
|
|
3730
3683
|
EmptyState,
|
|
3731
|
-
Field,
|
|
3732
3684
|
Fieldset,
|
|
3733
3685
|
FileCard,
|
|
3734
3686
|
FontSize2xl,
|
|
@@ -3760,7 +3712,7 @@ export {
|
|
|
3760
3712
|
InputAddon,
|
|
3761
3713
|
InputGroup,
|
|
3762
3714
|
InputGroupContext,
|
|
3763
|
-
|
|
3715
|
+
Label,
|
|
3764
3716
|
LineHeightNormal,
|
|
3765
3717
|
LineHeightRelaxed,
|
|
3766
3718
|
LineHeightTight,
|