@bergetai/ui 0.2.5 → 0.2.6
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.cjs +583 -346
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.js +550 -339
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -586,21 +586,206 @@ DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
|
586
586
|
var DialogDescription = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx11(DialogPrimitive.Description, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx11(Typography, { variant: "small", color: "muted", className, children }) }));
|
|
587
587
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
588
588
|
|
|
589
|
-
// src/components/
|
|
589
|
+
// src/components/alert-dialog/AlertDialog.tsx
|
|
590
|
+
import * as React11 from "react";
|
|
591
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
592
|
+
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
593
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
594
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
595
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
596
|
+
var AlertDialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
597
|
+
AlertDialogPrimitive.Overlay,
|
|
598
|
+
{
|
|
599
|
+
ref,
|
|
600
|
+
className: cn(
|
|
601
|
+
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
602
|
+
className
|
|
603
|
+
),
|
|
604
|
+
...props
|
|
605
|
+
}
|
|
606
|
+
));
|
|
607
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
608
|
+
var AlertDialogContent = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs4(AlertDialogPortal, { children: [
|
|
609
|
+
/* @__PURE__ */ jsx12(AlertDialogOverlay, {}),
|
|
610
|
+
/* @__PURE__ */ jsx12(
|
|
611
|
+
AlertDialogPrimitive.Content,
|
|
612
|
+
{
|
|
613
|
+
ref,
|
|
614
|
+
className: cn(
|
|
615
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
616
|
+
className
|
|
617
|
+
),
|
|
618
|
+
...props
|
|
619
|
+
}
|
|
620
|
+
)
|
|
621
|
+
] }));
|
|
622
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
623
|
+
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx12("div", { className: cn("flex flex-col gap-1.5 text-center sm:text-left", className), ...props });
|
|
624
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
625
|
+
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx12(
|
|
626
|
+
"div",
|
|
627
|
+
{
|
|
628
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
629
|
+
...props
|
|
630
|
+
}
|
|
631
|
+
);
|
|
632
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
633
|
+
var AlertDialogTitle = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx12(AlertDialogPrimitive.Title, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx12(Typography, { variant: "h5", color: "default", as: "h2", className, children }) }));
|
|
634
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
635
|
+
var AlertDialogDescription = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx12(AlertDialogPrimitive.Description, { ref, asChild: true, ...props, children: /* @__PURE__ */ jsx12(Typography, { variant: "small", color: "muted", className, children }) }));
|
|
636
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
637
|
+
var AlertDialogAction = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(AlertDialogPrimitive.Action, { ref, className: cn(className), ...props }));
|
|
638
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
639
|
+
var AlertDialogCancel = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(AlertDialogPrimitive.Cancel, { ref, className: cn("mt-2 sm:mt-0", className), ...props }));
|
|
640
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
641
|
+
|
|
642
|
+
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
590
643
|
import * as React12 from "react";
|
|
644
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
645
|
+
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
646
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
647
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
648
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
649
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
650
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
651
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
652
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
653
|
+
var DropdownMenuSubTrigger = React12.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
654
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
655
|
+
{
|
|
656
|
+
ref,
|
|
657
|
+
className: cn(
|
|
658
|
+
"flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-[state=open]:bg-berget-surface-hover [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
659
|
+
inset && "pl-8",
|
|
660
|
+
className
|
|
661
|
+
),
|
|
662
|
+
...props,
|
|
663
|
+
children: [
|
|
664
|
+
children,
|
|
665
|
+
/* @__PURE__ */ jsx13(ChevronRight, { className: "ml-auto" })
|
|
666
|
+
]
|
|
667
|
+
}
|
|
668
|
+
));
|
|
669
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
670
|
+
var DropdownMenuSubContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
671
|
+
DropdownMenuPrimitive.SubContent,
|
|
672
|
+
{
|
|
673
|
+
ref,
|
|
674
|
+
className: cn(
|
|
675
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
676
|
+
className
|
|
677
|
+
),
|
|
678
|
+
...props
|
|
679
|
+
}
|
|
680
|
+
));
|
|
681
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
682
|
+
var DropdownMenuContent = React12.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
|
|
683
|
+
DropdownMenuPrimitive.Content,
|
|
684
|
+
{
|
|
685
|
+
ref,
|
|
686
|
+
sideOffset,
|
|
687
|
+
className: cn(
|
|
688
|
+
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
689
|
+
className
|
|
690
|
+
),
|
|
691
|
+
...props
|
|
692
|
+
}
|
|
693
|
+
) }));
|
|
694
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
695
|
+
var DropdownMenuItem = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
696
|
+
DropdownMenuPrimitive.Item,
|
|
697
|
+
{
|
|
698
|
+
ref,
|
|
699
|
+
className: cn(
|
|
700
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
701
|
+
inset && "pl-8",
|
|
702
|
+
className
|
|
703
|
+
),
|
|
704
|
+
...props
|
|
705
|
+
}
|
|
706
|
+
));
|
|
707
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
708
|
+
var DropdownMenuCheckboxItem = React12.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
709
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
710
|
+
{
|
|
711
|
+
ref,
|
|
712
|
+
className: cn(
|
|
713
|
+
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
714
|
+
className
|
|
715
|
+
),
|
|
716
|
+
checked,
|
|
717
|
+
...props,
|
|
718
|
+
children: [
|
|
719
|
+
/* @__PURE__ */ jsx13("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx13(Check, { className: "size-4" }) }) }),
|
|
720
|
+
children
|
|
721
|
+
]
|
|
722
|
+
}
|
|
723
|
+
));
|
|
724
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
725
|
+
var DropdownMenuRadioItem = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
726
|
+
DropdownMenuPrimitive.RadioItem,
|
|
727
|
+
{
|
|
728
|
+
ref,
|
|
729
|
+
className: cn(
|
|
730
|
+
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
731
|
+
className
|
|
732
|
+
),
|
|
733
|
+
...props,
|
|
734
|
+
children: [
|
|
735
|
+
/* @__PURE__ */ jsx13("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx13(Circle, { className: "size-2 fill-current" }) }) }),
|
|
736
|
+
children
|
|
737
|
+
]
|
|
738
|
+
}
|
|
739
|
+
));
|
|
740
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
741
|
+
var DropdownMenuLabel = React12.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
742
|
+
DropdownMenuPrimitive.Label,
|
|
743
|
+
{
|
|
744
|
+
ref,
|
|
745
|
+
className: cn(
|
|
746
|
+
"px-2 py-1.5 text-sm font-semibold text-berget-foreground",
|
|
747
|
+
inset && "pl-8",
|
|
748
|
+
className
|
|
749
|
+
),
|
|
750
|
+
...props
|
|
751
|
+
}
|
|
752
|
+
));
|
|
753
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
754
|
+
var DropdownMenuSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
755
|
+
DropdownMenuPrimitive.Separator,
|
|
756
|
+
{
|
|
757
|
+
ref,
|
|
758
|
+
className: cn("-mx-1 my-1 h-px bg-berget-separator", className),
|
|
759
|
+
...props
|
|
760
|
+
}
|
|
761
|
+
));
|
|
762
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
763
|
+
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
764
|
+
return /* @__PURE__ */ jsx13(
|
|
765
|
+
"span",
|
|
766
|
+
{
|
|
767
|
+
className: cn("ml-auto text-xs tracking-widest text-berget-muted-foreground", className),
|
|
768
|
+
...props
|
|
769
|
+
}
|
|
770
|
+
);
|
|
771
|
+
};
|
|
772
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
773
|
+
|
|
774
|
+
// src/components/table/Table.tsx
|
|
775
|
+
import * as React14 from "react";
|
|
591
776
|
|
|
592
777
|
// src/primitives/table.tsx
|
|
593
|
-
import * as
|
|
594
|
-
import { jsx as
|
|
595
|
-
var Table =
|
|
596
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
778
|
+
import * as React13 from "react";
|
|
779
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
780
|
+
var Table = React13.forwardRef(
|
|
781
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx14("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx14("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
597
782
|
);
|
|
598
783
|
Table.displayName = "Table";
|
|
599
|
-
var TableHeader =
|
|
784
|
+
var TableHeader = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
600
785
|
TableHeader.displayName = "TableHeader";
|
|
601
|
-
var TableBody =
|
|
786
|
+
var TableBody = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
602
787
|
TableBody.displayName = "TableBody";
|
|
603
|
-
var TableFooter =
|
|
788
|
+
var TableFooter = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
604
789
|
"tfoot",
|
|
605
790
|
{
|
|
606
791
|
ref,
|
|
@@ -609,8 +794,8 @@ var TableFooter = React11.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
609
794
|
}
|
|
610
795
|
));
|
|
611
796
|
TableFooter.displayName = "TableFooter";
|
|
612
|
-
var TableRow =
|
|
613
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
797
|
+
var TableRow = React13.forwardRef(
|
|
798
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
614
799
|
"tr",
|
|
615
800
|
{
|
|
616
801
|
ref,
|
|
@@ -623,7 +808,7 @@ var TableRow = React11.forwardRef(
|
|
|
623
808
|
)
|
|
624
809
|
);
|
|
625
810
|
TableRow.displayName = "TableRow";
|
|
626
|
-
var TableHead =
|
|
811
|
+
var TableHead = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
627
812
|
"th",
|
|
628
813
|
{
|
|
629
814
|
ref,
|
|
@@ -635,7 +820,7 @@ var TableHead = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
635
820
|
}
|
|
636
821
|
));
|
|
637
822
|
TableHead.displayName = "TableHead";
|
|
638
|
-
var TableCell =
|
|
823
|
+
var TableCell = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
639
824
|
"td",
|
|
640
825
|
{
|
|
641
826
|
ref,
|
|
@@ -644,16 +829,16 @@ var TableCell = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
644
829
|
}
|
|
645
830
|
));
|
|
646
831
|
TableCell.displayName = "TableCell";
|
|
647
|
-
var TableCaption =
|
|
832
|
+
var TableCaption = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
648
833
|
TableCaption.displayName = "TableCaption";
|
|
649
834
|
|
|
650
835
|
// src/components/table/Table.tsx
|
|
651
|
-
import { jsx as
|
|
652
|
-
var Table2 =
|
|
653
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
836
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
837
|
+
var Table2 = React14.forwardRef(
|
|
838
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx15(Table, { ref, className, ...props })
|
|
654
839
|
);
|
|
655
840
|
Table2.displayName = "Table";
|
|
656
|
-
var TableHeader2 =
|
|
841
|
+
var TableHeader2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
657
842
|
TableHeader,
|
|
658
843
|
{
|
|
659
844
|
ref,
|
|
@@ -662,7 +847,7 @@ var TableHeader2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
662
847
|
}
|
|
663
848
|
));
|
|
664
849
|
TableHeader2.displayName = "TableHeader";
|
|
665
|
-
var TableBody2 =
|
|
850
|
+
var TableBody2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
666
851
|
TableBody,
|
|
667
852
|
{
|
|
668
853
|
ref,
|
|
@@ -671,7 +856,7 @@ var TableBody2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
671
856
|
}
|
|
672
857
|
));
|
|
673
858
|
TableBody2.displayName = "TableBody";
|
|
674
|
-
var TableFooter2 =
|
|
859
|
+
var TableFooter2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
675
860
|
TableFooter,
|
|
676
861
|
{
|
|
677
862
|
ref,
|
|
@@ -683,8 +868,8 @@ var TableFooter2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
683
868
|
}
|
|
684
869
|
));
|
|
685
870
|
TableFooter2.displayName = "TableFooter";
|
|
686
|
-
var TableRow2 =
|
|
687
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
871
|
+
var TableRow2 = React14.forwardRef(
|
|
872
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
688
873
|
TableRow,
|
|
689
874
|
{
|
|
690
875
|
ref,
|
|
@@ -697,7 +882,7 @@ var TableRow2 = React12.forwardRef(
|
|
|
697
882
|
)
|
|
698
883
|
);
|
|
699
884
|
TableRow2.displayName = "TableRow";
|
|
700
|
-
var TableHead2 =
|
|
885
|
+
var TableHead2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
701
886
|
TableHead,
|
|
702
887
|
{
|
|
703
888
|
ref,
|
|
@@ -709,7 +894,7 @@ var TableHead2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
709
894
|
}
|
|
710
895
|
));
|
|
711
896
|
TableHead2.displayName = "TableHead";
|
|
712
|
-
var TableCell2 =
|
|
897
|
+
var TableCell2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
713
898
|
TableCell,
|
|
714
899
|
{
|
|
715
900
|
ref,
|
|
@@ -718,7 +903,7 @@ var TableCell2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
718
903
|
}
|
|
719
904
|
));
|
|
720
905
|
TableCell2.displayName = "TableCell";
|
|
721
|
-
var TableCaption2 =
|
|
906
|
+
var TableCaption2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
722
907
|
TableCaption,
|
|
723
908
|
{
|
|
724
909
|
ref,
|
|
@@ -729,17 +914,17 @@ var TableCaption2 = React12.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
729
914
|
TableCaption2.displayName = "TableCaption";
|
|
730
915
|
|
|
731
916
|
// src/components/item/Item.tsx
|
|
732
|
-
import * as
|
|
917
|
+
import * as React16 from "react";
|
|
733
918
|
|
|
734
919
|
// src/primitives/item.tsx
|
|
735
920
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
736
921
|
import { cva as cva7 } from "class-variance-authority";
|
|
737
922
|
|
|
738
923
|
// src/primitives/separator.tsx
|
|
739
|
-
import * as
|
|
924
|
+
import * as React15 from "react";
|
|
740
925
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
741
|
-
import { jsx as
|
|
742
|
-
var
|
|
926
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
927
|
+
var Separator2 = React15.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
743
928
|
SeparatorPrimitive.Root,
|
|
744
929
|
{
|
|
745
930
|
ref,
|
|
@@ -753,12 +938,12 @@ var Separator = React13.forwardRef(({ className, orientation = "horizontal", dec
|
|
|
753
938
|
...props
|
|
754
939
|
}
|
|
755
940
|
));
|
|
756
|
-
|
|
941
|
+
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
757
942
|
|
|
758
943
|
// src/primitives/item.tsx
|
|
759
|
-
import { jsx as
|
|
944
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
760
945
|
function ItemGroup({ className, ...props }) {
|
|
761
|
-
return /* @__PURE__ */
|
|
946
|
+
return /* @__PURE__ */ jsx17(
|
|
762
947
|
"div",
|
|
763
948
|
{
|
|
764
949
|
role: "list",
|
|
@@ -769,8 +954,8 @@ function ItemGroup({ className, ...props }) {
|
|
|
769
954
|
);
|
|
770
955
|
}
|
|
771
956
|
function ItemSeparator({ className, ...props }) {
|
|
772
|
-
return /* @__PURE__ */
|
|
773
|
-
|
|
957
|
+
return /* @__PURE__ */ jsx17(
|
|
958
|
+
Separator2,
|
|
774
959
|
{
|
|
775
960
|
"data-slot": "item-separator",
|
|
776
961
|
orientation: "horizontal",
|
|
@@ -799,7 +984,7 @@ var itemVariants = cva7(
|
|
|
799
984
|
}
|
|
800
985
|
}
|
|
801
986
|
);
|
|
802
|
-
function
|
|
987
|
+
function Item2({
|
|
803
988
|
className,
|
|
804
989
|
variant = "default",
|
|
805
990
|
size = "default",
|
|
@@ -807,7 +992,7 @@ function Item({
|
|
|
807
992
|
...props
|
|
808
993
|
}) {
|
|
809
994
|
const Comp = asChild ? Slot2 : "div";
|
|
810
|
-
return /* @__PURE__ */
|
|
995
|
+
return /* @__PURE__ */ jsx17(
|
|
811
996
|
Comp,
|
|
812
997
|
{
|
|
813
998
|
"data-slot": "item",
|
|
@@ -838,7 +1023,7 @@ function ItemMedia({
|
|
|
838
1023
|
variant = "default",
|
|
839
1024
|
...props
|
|
840
1025
|
}) {
|
|
841
|
-
return /* @__PURE__ */
|
|
1026
|
+
return /* @__PURE__ */ jsx17(
|
|
842
1027
|
"div",
|
|
843
1028
|
{
|
|
844
1029
|
"data-slot": "item-media",
|
|
@@ -849,7 +1034,7 @@ function ItemMedia({
|
|
|
849
1034
|
);
|
|
850
1035
|
}
|
|
851
1036
|
function ItemContent({ className, ...props }) {
|
|
852
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsx17(
|
|
853
1038
|
"div",
|
|
854
1039
|
{
|
|
855
1040
|
"data-slot": "item-content",
|
|
@@ -859,7 +1044,7 @@ function ItemContent({ className, ...props }) {
|
|
|
859
1044
|
);
|
|
860
1045
|
}
|
|
861
1046
|
function ItemTitle({ className, ...props }) {
|
|
862
|
-
return /* @__PURE__ */
|
|
1047
|
+
return /* @__PURE__ */ jsx17(
|
|
863
1048
|
"div",
|
|
864
1049
|
{
|
|
865
1050
|
"data-slot": "item-title",
|
|
@@ -869,7 +1054,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
869
1054
|
);
|
|
870
1055
|
}
|
|
871
1056
|
function ItemDescription({ className, ...props }) {
|
|
872
|
-
return /* @__PURE__ */
|
|
1057
|
+
return /* @__PURE__ */ jsx17(
|
|
873
1058
|
"p",
|
|
874
1059
|
{
|
|
875
1060
|
"data-slot": "item-description",
|
|
@@ -883,10 +1068,10 @@ function ItemDescription({ className, ...props }) {
|
|
|
883
1068
|
);
|
|
884
1069
|
}
|
|
885
1070
|
function ItemActions({ className, ...props }) {
|
|
886
|
-
return /* @__PURE__ */
|
|
1071
|
+
return /* @__PURE__ */ jsx17("div", { "data-slot": "item-actions", className: cn("flex items-center gap-2", className), ...props });
|
|
887
1072
|
}
|
|
888
1073
|
function ItemHeader({ className, ...props }) {
|
|
889
|
-
return /* @__PURE__ */
|
|
1074
|
+
return /* @__PURE__ */ jsx17(
|
|
890
1075
|
"div",
|
|
891
1076
|
{
|
|
892
1077
|
"data-slot": "item-header",
|
|
@@ -896,7 +1081,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
896
1081
|
);
|
|
897
1082
|
}
|
|
898
1083
|
function ItemFooter({ className, ...props }) {
|
|
899
|
-
return /* @__PURE__ */
|
|
1084
|
+
return /* @__PURE__ */ jsx17(
|
|
900
1085
|
"div",
|
|
901
1086
|
{
|
|
902
1087
|
"data-slot": "item-footer",
|
|
@@ -907,10 +1092,10 @@ function ItemFooter({ className, ...props }) {
|
|
|
907
1092
|
}
|
|
908
1093
|
|
|
909
1094
|
// src/components/item/Item.tsx
|
|
910
|
-
import { jsx as
|
|
911
|
-
function
|
|
912
|
-
return /* @__PURE__ */
|
|
913
|
-
|
|
1095
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1096
|
+
function Item3({ className, asChild, ...props }) {
|
|
1097
|
+
return /* @__PURE__ */ jsx18(
|
|
1098
|
+
Item2,
|
|
914
1099
|
{
|
|
915
1100
|
asChild,
|
|
916
1101
|
className: cn(
|
|
@@ -927,8 +1112,8 @@ function Item2({ className, asChild, ...props }) {
|
|
|
927
1112
|
}
|
|
928
1113
|
);
|
|
929
1114
|
}
|
|
930
|
-
var ItemMedia2 =
|
|
931
|
-
return /* @__PURE__ */
|
|
1115
|
+
var ItemMedia2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
1116
|
+
return /* @__PURE__ */ jsx18(
|
|
932
1117
|
ItemMedia,
|
|
933
1118
|
{
|
|
934
1119
|
ref,
|
|
@@ -938,8 +1123,8 @@ var ItemMedia2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
|
938
1123
|
);
|
|
939
1124
|
});
|
|
940
1125
|
ItemMedia2.displayName = "ItemMedia";
|
|
941
|
-
var ItemTitle2 =
|
|
942
|
-
return /* @__PURE__ */
|
|
1126
|
+
var ItemTitle2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
1127
|
+
return /* @__PURE__ */ jsx18(
|
|
943
1128
|
ItemTitle,
|
|
944
1129
|
{
|
|
945
1130
|
ref,
|
|
@@ -949,8 +1134,8 @@ var ItemTitle2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
|
949
1134
|
);
|
|
950
1135
|
});
|
|
951
1136
|
ItemTitle2.displayName = "ItemTitle";
|
|
952
|
-
var ItemDescription2 =
|
|
953
|
-
return /* @__PURE__ */
|
|
1137
|
+
var ItemDescription2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
1138
|
+
return /* @__PURE__ */ jsx18(
|
|
954
1139
|
ItemDescription,
|
|
955
1140
|
{
|
|
956
1141
|
ref,
|
|
@@ -960,8 +1145,8 @@ var ItemDescription2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
|
960
1145
|
);
|
|
961
1146
|
});
|
|
962
1147
|
ItemDescription2.displayName = "ItemDescription";
|
|
963
|
-
var ItemSeparator2 =
|
|
964
|
-
return /* @__PURE__ */
|
|
1148
|
+
var ItemSeparator2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
1149
|
+
return /* @__PURE__ */ jsx18(
|
|
965
1150
|
ItemSeparator,
|
|
966
1151
|
{
|
|
967
1152
|
ref,
|
|
@@ -973,14 +1158,14 @@ var ItemSeparator2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
|
973
1158
|
ItemSeparator2.displayName = "ItemSeparator";
|
|
974
1159
|
|
|
975
1160
|
// src/components/input/Input.tsx
|
|
976
|
-
import * as
|
|
1161
|
+
import * as React18 from "react";
|
|
977
1162
|
|
|
978
1163
|
// src/primitives/input.tsx
|
|
979
|
-
import * as
|
|
980
|
-
import { jsx as
|
|
981
|
-
var Input =
|
|
1164
|
+
import * as React17 from "react";
|
|
1165
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1166
|
+
var Input = React17.forwardRef(
|
|
982
1167
|
({ className, type, ...props }, ref) => {
|
|
983
|
-
return /* @__PURE__ */
|
|
1168
|
+
return /* @__PURE__ */ jsx19(
|
|
984
1169
|
"input",
|
|
985
1170
|
{
|
|
986
1171
|
type,
|
|
@@ -997,14 +1182,14 @@ var Input = React15.forwardRef(
|
|
|
997
1182
|
Input.displayName = "Input";
|
|
998
1183
|
|
|
999
1184
|
// src/components/input/Input.tsx
|
|
1000
|
-
import { jsx as
|
|
1001
|
-
var Input2 =
|
|
1185
|
+
import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1186
|
+
var Input2 = React18.forwardRef(
|
|
1002
1187
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
1003
|
-
const generatedId =
|
|
1188
|
+
const generatedId = React18.useId();
|
|
1004
1189
|
const inputId = id || generatedId;
|
|
1005
1190
|
const errorId = `${inputId}-error`;
|
|
1006
1191
|
const descriptionId = `${inputId}-description`;
|
|
1007
|
-
const inputElement = /* @__PURE__ */
|
|
1192
|
+
const inputElement = /* @__PURE__ */ jsx20(
|
|
1008
1193
|
Input,
|
|
1009
1194
|
{
|
|
1010
1195
|
ref,
|
|
@@ -1024,8 +1209,8 @@ var Input2 = React16.forwardRef(
|
|
|
1024
1209
|
}
|
|
1025
1210
|
);
|
|
1026
1211
|
if (!icon && !actionButton) {
|
|
1027
|
-
return /* @__PURE__ */
|
|
1028
|
-
label && /* @__PURE__ */
|
|
1212
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
|
|
1213
|
+
label && /* @__PURE__ */ jsx20(
|
|
1029
1214
|
"label",
|
|
1030
1215
|
{
|
|
1031
1216
|
htmlFor: inputId,
|
|
@@ -1038,9 +1223,9 @@ var Input2 = React16.forwardRef(
|
|
|
1038
1223
|
}
|
|
1039
1224
|
),
|
|
1040
1225
|
inputElement,
|
|
1041
|
-
(description || error) && /* @__PURE__ */
|
|
1042
|
-
description && /* @__PURE__ */
|
|
1043
|
-
error && /* @__PURE__ */
|
|
1226
|
+
(description || error) && /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1", children: [
|
|
1227
|
+
description && /* @__PURE__ */ jsx20(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1228
|
+
error && /* @__PURE__ */ jsx20(
|
|
1044
1229
|
Typography,
|
|
1045
1230
|
{
|
|
1046
1231
|
variant: "xs",
|
|
@@ -1052,8 +1237,8 @@ var Input2 = React16.forwardRef(
|
|
|
1052
1237
|
] })
|
|
1053
1238
|
] });
|
|
1054
1239
|
}
|
|
1055
|
-
return /* @__PURE__ */
|
|
1056
|
-
label && /* @__PURE__ */
|
|
1240
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
|
|
1241
|
+
label && /* @__PURE__ */ jsx20(
|
|
1057
1242
|
"label",
|
|
1058
1243
|
{
|
|
1059
1244
|
htmlFor: inputId,
|
|
@@ -1065,14 +1250,14 @@ var Input2 = React16.forwardRef(
|
|
|
1065
1250
|
children: label
|
|
1066
1251
|
}
|
|
1067
1252
|
),
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
icon && /* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ jsxs6("div", { className: "relative w-full", children: [
|
|
1254
|
+
icon && /* @__PURE__ */ jsx20("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
1070
1255
|
inputElement,
|
|
1071
|
-
actionButton && /* @__PURE__ */
|
|
1256
|
+
actionButton && /* @__PURE__ */ jsx20("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1072
1257
|
] }),
|
|
1073
|
-
(description || error) && /* @__PURE__ */
|
|
1074
|
-
description && /* @__PURE__ */
|
|
1075
|
-
error && /* @__PURE__ */
|
|
1258
|
+
(description || error) && /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1", children: [
|
|
1259
|
+
description && /* @__PURE__ */ jsx20(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1260
|
+
error && /* @__PURE__ */ jsx20(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1076
1261
|
] })
|
|
1077
1262
|
] });
|
|
1078
1263
|
}
|
|
@@ -1080,17 +1265,17 @@ var Input2 = React16.forwardRef(
|
|
|
1080
1265
|
Input2.displayName = "Input";
|
|
1081
1266
|
|
|
1082
1267
|
// src/components/checkbox/Checkbox.tsx
|
|
1083
|
-
import * as
|
|
1268
|
+
import * as React20 from "react";
|
|
1084
1269
|
import * as CheckboxPrimitive2 from "@radix-ui/react-checkbox";
|
|
1085
|
-
import { Check as
|
|
1270
|
+
import { Check as Check3 } from "lucide-react";
|
|
1086
1271
|
import { cva as cva8 } from "class-variance-authority";
|
|
1087
1272
|
|
|
1088
1273
|
// src/primitives/checkbox.tsx
|
|
1089
|
-
import * as
|
|
1274
|
+
import * as React19 from "react";
|
|
1090
1275
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
1091
|
-
import { Check } from "lucide-react";
|
|
1092
|
-
import { jsx as
|
|
1093
|
-
var Checkbox =
|
|
1276
|
+
import { Check as Check2 } from "lucide-react";
|
|
1277
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1278
|
+
var Checkbox = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1094
1279
|
CheckboxPrimitive.Root,
|
|
1095
1280
|
{
|
|
1096
1281
|
ref,
|
|
@@ -1099,23 +1284,23 @@ var Checkbox = React17.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
1099
1284
|
className
|
|
1100
1285
|
),
|
|
1101
1286
|
...props,
|
|
1102
|
-
children: children ?? /* @__PURE__ */
|
|
1287
|
+
children: children ?? /* @__PURE__ */ jsx21(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center"), children: /* @__PURE__ */ jsx21(Check2, { className: "h-4 w-4" }) })
|
|
1103
1288
|
}
|
|
1104
1289
|
));
|
|
1105
1290
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
1106
|
-
var CheckboxIndicator =
|
|
1291
|
+
var CheckboxIndicator = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1107
1292
|
CheckboxPrimitive.Indicator,
|
|
1108
1293
|
{
|
|
1109
1294
|
ref,
|
|
1110
1295
|
className: cn("grid place-content-center", className),
|
|
1111
1296
|
...props,
|
|
1112
|
-
children: children ?? /* @__PURE__ */
|
|
1297
|
+
children: children ?? /* @__PURE__ */ jsx21(Check2, { className: "h-4 w-4" })
|
|
1113
1298
|
}
|
|
1114
1299
|
));
|
|
1115
1300
|
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
1116
1301
|
|
|
1117
1302
|
// src/components/checkbox/Checkbox.tsx
|
|
1118
|
-
import { jsx as
|
|
1303
|
+
import { jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1119
1304
|
var checkboxVariants = cva8(
|
|
1120
1305
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1121
1306
|
{
|
|
@@ -1137,7 +1322,7 @@ var checkboxVariants = cva8(
|
|
|
1137
1322
|
}
|
|
1138
1323
|
}
|
|
1139
1324
|
);
|
|
1140
|
-
var Checkbox2 =
|
|
1325
|
+
var Checkbox2 = React20.forwardRef(
|
|
1141
1326
|
({
|
|
1142
1327
|
"aria-label": ariaLabel,
|
|
1143
1328
|
className,
|
|
@@ -1150,11 +1335,11 @@ var Checkbox2 = React18.forwardRef(
|
|
|
1150
1335
|
disabled,
|
|
1151
1336
|
...props
|
|
1152
1337
|
}, ref) => {
|
|
1153
|
-
const generatedId =
|
|
1338
|
+
const generatedId = React20.useId();
|
|
1154
1339
|
const checkboxId = id || generatedId;
|
|
1155
1340
|
const errorId = `${checkboxId}-error`;
|
|
1156
|
-
return /* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */
|
|
1341
|
+
return /* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-3", children: [
|
|
1342
|
+
/* @__PURE__ */ jsx22("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ jsx22(
|
|
1158
1343
|
Checkbox,
|
|
1159
1344
|
{
|
|
1160
1345
|
ref,
|
|
@@ -1170,8 +1355,8 @@ var Checkbox2 = React18.forwardRef(
|
|
|
1170
1355
|
className
|
|
1171
1356
|
),
|
|
1172
1357
|
...props,
|
|
1173
|
-
children: /* @__PURE__ */
|
|
1174
|
-
|
|
1358
|
+
children: /* @__PURE__ */ jsx22(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ jsx22(
|
|
1359
|
+
Check3,
|
|
1175
1360
|
{
|
|
1176
1361
|
className: "h-4 w-4 text-current stroke-current",
|
|
1177
1362
|
style: { color: "currentColor", stroke: "currentColor" }
|
|
@@ -1179,8 +1364,8 @@ var Checkbox2 = React18.forwardRef(
|
|
|
1179
1364
|
) })
|
|
1180
1365
|
}
|
|
1181
1366
|
) }),
|
|
1182
|
-
(label || description || error) && /* @__PURE__ */
|
|
1183
|
-
label && /* @__PURE__ */
|
|
1367
|
+
(label || description || error) && /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-1", children: [
|
|
1368
|
+
label && /* @__PURE__ */ jsx22(
|
|
1184
1369
|
"label",
|
|
1185
1370
|
{
|
|
1186
1371
|
htmlFor: checkboxId,
|
|
@@ -1192,8 +1377,8 @@ var Checkbox2 = React18.forwardRef(
|
|
|
1192
1377
|
children: label
|
|
1193
1378
|
}
|
|
1194
1379
|
),
|
|
1195
|
-
description && /* @__PURE__ */
|
|
1196
|
-
error && /* @__PURE__ */
|
|
1380
|
+
description && /* @__PURE__ */ jsx22(Typography, { variant: "xs", color: "muted", children: description }),
|
|
1381
|
+
error && /* @__PURE__ */ jsx22(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1197
1382
|
] })
|
|
1198
1383
|
] });
|
|
1199
1384
|
}
|
|
@@ -1201,10 +1386,10 @@ var Checkbox2 = React18.forwardRef(
|
|
|
1201
1386
|
Checkbox2.displayName = "Checkbox";
|
|
1202
1387
|
|
|
1203
1388
|
// src/components/switch/Switch.tsx
|
|
1204
|
-
import * as
|
|
1389
|
+
import * as React21 from "react";
|
|
1205
1390
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
1206
1391
|
import { cva as cva9 } from "class-variance-authority";
|
|
1207
|
-
import { jsx as
|
|
1392
|
+
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1208
1393
|
var switchRootVariants = cva9(
|
|
1209
1394
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
1210
1395
|
{
|
|
@@ -1241,7 +1426,7 @@ var switchThumbVariants = cva9(
|
|
|
1241
1426
|
}
|
|
1242
1427
|
}
|
|
1243
1428
|
);
|
|
1244
|
-
var Switch =
|
|
1429
|
+
var Switch = React21.forwardRef(
|
|
1245
1430
|
({
|
|
1246
1431
|
"aria-label": ariaLabel,
|
|
1247
1432
|
className,
|
|
@@ -1254,11 +1439,11 @@ var Switch = React19.forwardRef(
|
|
|
1254
1439
|
disabled,
|
|
1255
1440
|
...props
|
|
1256
1441
|
}, ref) => {
|
|
1257
|
-
const generatedId =
|
|
1442
|
+
const generatedId = React21.useId();
|
|
1258
1443
|
const switchId = id || generatedId;
|
|
1259
1444
|
const errorId = `${switchId}-error`;
|
|
1260
|
-
return /* @__PURE__ */
|
|
1261
|
-
/* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3", children: [
|
|
1446
|
+
/* @__PURE__ */ jsx23(
|
|
1262
1447
|
SwitchPrimitives.Root,
|
|
1263
1448
|
{
|
|
1264
1449
|
ref,
|
|
@@ -1273,11 +1458,11 @@ var Switch = React19.forwardRef(
|
|
|
1273
1458
|
className
|
|
1274
1459
|
),
|
|
1275
1460
|
...props,
|
|
1276
|
-
children: /* @__PURE__ */
|
|
1461
|
+
children: /* @__PURE__ */ jsx23(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
1277
1462
|
}
|
|
1278
1463
|
),
|
|
1279
|
-
(label || description || error) && /* @__PURE__ */
|
|
1280
|
-
label && /* @__PURE__ */
|
|
1464
|
+
(label || description || error) && /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-1", children: [
|
|
1465
|
+
label && /* @__PURE__ */ jsx23(
|
|
1281
1466
|
"label",
|
|
1282
1467
|
{
|
|
1283
1468
|
htmlFor: switchId,
|
|
@@ -1288,8 +1473,8 @@ var Switch = React19.forwardRef(
|
|
|
1288
1473
|
children: label
|
|
1289
1474
|
}
|
|
1290
1475
|
),
|
|
1291
|
-
description && /* @__PURE__ */
|
|
1292
|
-
error && /* @__PURE__ */
|
|
1476
|
+
description && /* @__PURE__ */ jsx23(Typography, { variant: "xs", color: "muted", children: description }),
|
|
1477
|
+
error && /* @__PURE__ */ jsx23(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1293
1478
|
] })
|
|
1294
1479
|
] });
|
|
1295
1480
|
}
|
|
@@ -1297,17 +1482,17 @@ var Switch = React19.forwardRef(
|
|
|
1297
1482
|
Switch.displayName = "Switch";
|
|
1298
1483
|
|
|
1299
1484
|
// src/components/select/Select.tsx
|
|
1300
|
-
import * as
|
|
1485
|
+
import * as React23 from "react";
|
|
1301
1486
|
import { cva as cva10 } from "class-variance-authority";
|
|
1302
1487
|
|
|
1303
1488
|
// src/primitives/select.tsx
|
|
1304
|
-
import * as
|
|
1489
|
+
import * as React22 from "react";
|
|
1305
1490
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1306
|
-
import { Check as
|
|
1307
|
-
import { jsx as
|
|
1491
|
+
import { Check as Check4, ChevronDown, ChevronUp } from "lucide-react";
|
|
1492
|
+
import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1308
1493
|
var Select = SelectPrimitive.Root;
|
|
1309
1494
|
var SelectValue = SelectPrimitive.Value;
|
|
1310
|
-
var SelectTrigger =
|
|
1495
|
+
var SelectTrigger = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs9(
|
|
1311
1496
|
SelectPrimitive.Trigger,
|
|
1312
1497
|
{
|
|
1313
1498
|
ref,
|
|
@@ -1318,32 +1503,32 @@ var SelectTrigger = React20.forwardRef(({ className, children, ...props }, ref)
|
|
|
1318
1503
|
...props,
|
|
1319
1504
|
children: [
|
|
1320
1505
|
children,
|
|
1321
|
-
/* @__PURE__ */
|
|
1506
|
+
/* @__PURE__ */ jsx24(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx24(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
1322
1507
|
]
|
|
1323
1508
|
}
|
|
1324
1509
|
));
|
|
1325
1510
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1326
|
-
var SelectScrollUpButton =
|
|
1511
|
+
var SelectScrollUpButton = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1327
1512
|
SelectPrimitive.ScrollUpButton,
|
|
1328
1513
|
{
|
|
1329
1514
|
ref,
|
|
1330
1515
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1331
1516
|
...props,
|
|
1332
|
-
children: /* @__PURE__ */
|
|
1517
|
+
children: /* @__PURE__ */ jsx24(ChevronUp, { className: "h-4 w-4" })
|
|
1333
1518
|
}
|
|
1334
1519
|
));
|
|
1335
1520
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1336
|
-
var SelectScrollDownButton =
|
|
1521
|
+
var SelectScrollDownButton = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1337
1522
|
SelectPrimitive.ScrollDownButton,
|
|
1338
1523
|
{
|
|
1339
1524
|
ref,
|
|
1340
1525
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1341
1526
|
...props,
|
|
1342
|
-
children: /* @__PURE__ */
|
|
1527
|
+
children: /* @__PURE__ */ jsx24(ChevronDown, { className: "h-4 w-4" })
|
|
1343
1528
|
}
|
|
1344
1529
|
));
|
|
1345
1530
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1346
|
-
var SelectContent =
|
|
1531
|
+
var SelectContent = React22.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx24(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs9(
|
|
1347
1532
|
SelectPrimitive.Content,
|
|
1348
1533
|
{
|
|
1349
1534
|
ref,
|
|
@@ -1355,8 +1540,8 @@ var SelectContent = React20.forwardRef(({ className, children, position = "poppe
|
|
|
1355
1540
|
position,
|
|
1356
1541
|
...props,
|
|
1357
1542
|
children: [
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ jsx24(SelectScrollUpButton, {}),
|
|
1544
|
+
/* @__PURE__ */ jsx24(
|
|
1360
1545
|
SelectPrimitive.Viewport,
|
|
1361
1546
|
{
|
|
1362
1547
|
className: cn(
|
|
@@ -1366,12 +1551,12 @@ var SelectContent = React20.forwardRef(({ className, children, position = "poppe
|
|
|
1366
1551
|
children
|
|
1367
1552
|
}
|
|
1368
1553
|
),
|
|
1369
|
-
/* @__PURE__ */
|
|
1554
|
+
/* @__PURE__ */ jsx24(SelectScrollDownButton, {})
|
|
1370
1555
|
]
|
|
1371
1556
|
}
|
|
1372
1557
|
) }));
|
|
1373
1558
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1374
|
-
var SelectLabel =
|
|
1559
|
+
var SelectLabel = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1375
1560
|
SelectPrimitive.Label,
|
|
1376
1561
|
{
|
|
1377
1562
|
ref,
|
|
@@ -1380,7 +1565,7 @@ var SelectLabel = React20.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1380
1565
|
}
|
|
1381
1566
|
));
|
|
1382
1567
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1383
|
-
var SelectItem =
|
|
1568
|
+
var SelectItem = React22.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs9(
|
|
1384
1569
|
SelectPrimitive.Item,
|
|
1385
1570
|
{
|
|
1386
1571
|
ref,
|
|
@@ -1390,13 +1575,13 @@ var SelectItem = React20.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1390
1575
|
),
|
|
1391
1576
|
...props,
|
|
1392
1577
|
children: [
|
|
1393
|
-
/* @__PURE__ */
|
|
1394
|
-
/* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ jsx24("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx24(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx24(Check4, { className: "h-4 w-4" }) }) }),
|
|
1579
|
+
/* @__PURE__ */ jsx24(SelectPrimitive.ItemText, { children })
|
|
1395
1580
|
]
|
|
1396
1581
|
}
|
|
1397
1582
|
));
|
|
1398
1583
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1399
|
-
var SelectSeparator =
|
|
1584
|
+
var SelectSeparator = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
|
|
1400
1585
|
SelectPrimitive.Separator,
|
|
1401
1586
|
{
|
|
1402
1587
|
ref,
|
|
@@ -1407,7 +1592,7 @@ var SelectSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1407
1592
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1408
1593
|
|
|
1409
1594
|
// src/components/select/Select.tsx
|
|
1410
|
-
import { jsx as
|
|
1595
|
+
import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1411
1596
|
var selectVariants = cva10(
|
|
1412
1597
|
"flex w-full items-center justify-between rounded-berget-xs border bg-card px-4 py-3 text-sm transition-colors duration-200 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-berget-form-focus-border disabled:cursor-not-allowed disabled:opacity-50",
|
|
1413
1598
|
{
|
|
@@ -1430,7 +1615,7 @@ var selectVariants = cva10(
|
|
|
1430
1615
|
}
|
|
1431
1616
|
}
|
|
1432
1617
|
);
|
|
1433
|
-
var Select2 =
|
|
1618
|
+
var Select2 = React23.forwardRef(
|
|
1434
1619
|
({
|
|
1435
1620
|
className,
|
|
1436
1621
|
variant,
|
|
@@ -1448,12 +1633,12 @@ var Select2 = React21.forwardRef(
|
|
|
1448
1633
|
name,
|
|
1449
1634
|
required
|
|
1450
1635
|
}, ref) => {
|
|
1451
|
-
const generatedId =
|
|
1636
|
+
const generatedId = React23.useId();
|
|
1452
1637
|
const selectId = id || generatedId;
|
|
1453
1638
|
const errorId = `${selectId}-error`;
|
|
1454
1639
|
const descriptionId = `${selectId}-description`;
|
|
1455
|
-
return /* @__PURE__ */
|
|
1456
|
-
label && /* @__PURE__ */
|
|
1640
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-2", children: [
|
|
1641
|
+
label && /* @__PURE__ */ jsx25(
|
|
1457
1642
|
"label",
|
|
1458
1643
|
{
|
|
1459
1644
|
htmlFor: selectId,
|
|
@@ -1465,7 +1650,7 @@ var Select2 = React21.forwardRef(
|
|
|
1465
1650
|
children: label
|
|
1466
1651
|
}
|
|
1467
1652
|
),
|
|
1468
|
-
/* @__PURE__ */
|
|
1653
|
+
/* @__PURE__ */ jsxs10(
|
|
1469
1654
|
Select,
|
|
1470
1655
|
{
|
|
1471
1656
|
value,
|
|
@@ -1475,7 +1660,7 @@ var Select2 = React21.forwardRef(
|
|
|
1475
1660
|
name,
|
|
1476
1661
|
required,
|
|
1477
1662
|
children: [
|
|
1478
|
-
/* @__PURE__ */
|
|
1663
|
+
/* @__PURE__ */ jsx25(
|
|
1479
1664
|
SelectTrigger,
|
|
1480
1665
|
{
|
|
1481
1666
|
ref,
|
|
@@ -1487,33 +1672,33 @@ var Select2 = React21.forwardRef(
|
|
|
1487
1672
|
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1488
1673
|
className
|
|
1489
1674
|
),
|
|
1490
|
-
children: /* @__PURE__ */
|
|
1675
|
+
children: /* @__PURE__ */ jsx25(SelectValue, { placeholder })
|
|
1491
1676
|
}
|
|
1492
1677
|
),
|
|
1493
|
-
/* @__PURE__ */
|
|
1678
|
+
/* @__PURE__ */ jsx25(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx25(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1494
1679
|
]
|
|
1495
1680
|
}
|
|
1496
1681
|
),
|
|
1497
|
-
description && /* @__PURE__ */
|
|
1498
|
-
error && /* @__PURE__ */
|
|
1682
|
+
description && /* @__PURE__ */ jsx25(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1683
|
+
error && /* @__PURE__ */ jsx25(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1499
1684
|
] });
|
|
1500
1685
|
}
|
|
1501
1686
|
);
|
|
1502
1687
|
Select2.displayName = "Select";
|
|
1503
1688
|
|
|
1504
1689
|
// src/components/country-select/CountrySelect.tsx
|
|
1505
|
-
import * as
|
|
1690
|
+
import * as React28 from "react";
|
|
1506
1691
|
import { ChevronDown as ChevronDown2, Globe } from "lucide-react";
|
|
1507
1692
|
|
|
1508
1693
|
// src/components/icon/Icon.tsx
|
|
1509
|
-
import * as
|
|
1510
|
-
import { jsx as
|
|
1694
|
+
import * as React24 from "react";
|
|
1695
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1511
1696
|
var iconStrokeMap = {
|
|
1512
1697
|
16: 1.4,
|
|
1513
1698
|
24: 1.6,
|
|
1514
1699
|
32: 1.8
|
|
1515
1700
|
};
|
|
1516
|
-
var Icon2 =
|
|
1701
|
+
var Icon2 = React24.forwardRef(
|
|
1517
1702
|
({
|
|
1518
1703
|
icon: IconComponent,
|
|
1519
1704
|
size,
|
|
@@ -1525,7 +1710,7 @@ var Icon2 = React22.forwardRef(
|
|
|
1525
1710
|
const strokeWidth = iconStrokeMap[size];
|
|
1526
1711
|
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
1527
1712
|
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
1528
|
-
return /* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ jsx26(
|
|
1529
1714
|
IconComponent,
|
|
1530
1715
|
{
|
|
1531
1716
|
ref,
|
|
@@ -1540,12 +1725,12 @@ var Icon2 = React22.forwardRef(
|
|
|
1540
1725
|
Icon2.displayName = "Icon";
|
|
1541
1726
|
|
|
1542
1727
|
// src/primitives/popover.tsx
|
|
1543
|
-
import * as
|
|
1728
|
+
import * as React25 from "react";
|
|
1544
1729
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1545
|
-
import { jsx as
|
|
1730
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1546
1731
|
var Popover = PopoverPrimitive.Root;
|
|
1547
1732
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1548
|
-
var PopoverContent =
|
|
1733
|
+
var PopoverContent = React25.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx27(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx27(
|
|
1549
1734
|
PopoverPrimitive.Content,
|
|
1550
1735
|
{
|
|
1551
1736
|
ref,
|
|
@@ -1561,17 +1746,17 @@ var PopoverContent = React23.forwardRef(({ className, align = "center", sideOffs
|
|
|
1561
1746
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1562
1747
|
|
|
1563
1748
|
// src/primitives/command.tsx
|
|
1564
|
-
import * as
|
|
1749
|
+
import * as React27 from "react";
|
|
1565
1750
|
import { Command as CommandPrimitive } from "cmdk";
|
|
1566
1751
|
import { Search } from "lucide-react";
|
|
1567
1752
|
|
|
1568
1753
|
// src/primitives/dialog.tsx
|
|
1569
|
-
import * as
|
|
1754
|
+
import * as React26 from "react";
|
|
1570
1755
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
1571
1756
|
import { X as X2 } from "lucide-react";
|
|
1572
|
-
import { jsx as
|
|
1757
|
+
import { jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1573
1758
|
var DialogPortal2 = DialogPrimitive2.Portal;
|
|
1574
|
-
var DialogOverlay2 =
|
|
1759
|
+
var DialogOverlay2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1575
1760
|
DialogPrimitive2.Overlay,
|
|
1576
1761
|
{
|
|
1577
1762
|
ref,
|
|
@@ -1583,9 +1768,9 @@ var DialogOverlay2 = React24.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1583
1768
|
}
|
|
1584
1769
|
));
|
|
1585
1770
|
DialogOverlay2.displayName = DialogPrimitive2.Overlay.displayName;
|
|
1586
|
-
var DialogContent2 =
|
|
1587
|
-
/* @__PURE__ */
|
|
1588
|
-
/* @__PURE__ */
|
|
1771
|
+
var DialogContent2 = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs11(DialogPortal2, { children: [
|
|
1772
|
+
/* @__PURE__ */ jsx28(DialogOverlay2, {}),
|
|
1773
|
+
/* @__PURE__ */ jsxs11(
|
|
1589
1774
|
DialogPrimitive2.Content,
|
|
1590
1775
|
{
|
|
1591
1776
|
ref,
|
|
@@ -1596,18 +1781,18 @@ var DialogContent2 = React24.forwardRef(({ className, children, ...props }, ref)
|
|
|
1596
1781
|
...props,
|
|
1597
1782
|
children: [
|
|
1598
1783
|
children,
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1784
|
+
/* @__PURE__ */ jsxs11(DialogPrimitive2.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1785
|
+
/* @__PURE__ */ jsx28(X2, { className: "h-4 w-4" }),
|
|
1786
|
+
/* @__PURE__ */ jsx28("span", { className: "sr-only", children: "Close" })
|
|
1602
1787
|
] })
|
|
1603
1788
|
]
|
|
1604
1789
|
}
|
|
1605
1790
|
)
|
|
1606
1791
|
] }));
|
|
1607
1792
|
DialogContent2.displayName = DialogPrimitive2.Content.displayName;
|
|
1608
|
-
var DialogHeader2 = ({ className, ...props }) => /* @__PURE__ */
|
|
1793
|
+
var DialogHeader2 = ({ className, ...props }) => /* @__PURE__ */ jsx28("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
1609
1794
|
DialogHeader2.displayName = "DialogHeader";
|
|
1610
|
-
var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */
|
|
1795
|
+
var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */ jsx28(
|
|
1611
1796
|
"div",
|
|
1612
1797
|
{
|
|
1613
1798
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
@@ -1615,7 +1800,7 @@ var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */ jsx26(
|
|
|
1615
1800
|
}
|
|
1616
1801
|
);
|
|
1617
1802
|
DialogFooter2.displayName = "DialogFooter";
|
|
1618
|
-
var DialogTitle2 =
|
|
1803
|
+
var DialogTitle2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1619
1804
|
DialogPrimitive2.Title,
|
|
1620
1805
|
{
|
|
1621
1806
|
ref,
|
|
@@ -1624,7 +1809,7 @@ var DialogTitle2 = React24.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1624
1809
|
}
|
|
1625
1810
|
));
|
|
1626
1811
|
DialogTitle2.displayName = DialogPrimitive2.Title.displayName;
|
|
1627
|
-
var DialogDescription2 =
|
|
1812
|
+
var DialogDescription2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
1628
1813
|
DialogPrimitive2.Description,
|
|
1629
1814
|
{
|
|
1630
1815
|
ref,
|
|
@@ -1635,8 +1820,8 @@ var DialogDescription2 = React24.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1635
1820
|
DialogDescription2.displayName = DialogPrimitive2.Description.displayName;
|
|
1636
1821
|
|
|
1637
1822
|
// src/primitives/command.tsx
|
|
1638
|
-
import { jsx as
|
|
1639
|
-
var Command =
|
|
1823
|
+
import { jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1824
|
+
var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1640
1825
|
CommandPrimitive,
|
|
1641
1826
|
{
|
|
1642
1827
|
ref,
|
|
@@ -1648,9 +1833,9 @@ var Command = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1648
1833
|
}
|
|
1649
1834
|
));
|
|
1650
1835
|
Command.displayName = CommandPrimitive.displayName;
|
|
1651
|
-
var CommandInput =
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1836
|
+
var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs12("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1837
|
+
/* @__PURE__ */ jsx29(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1838
|
+
/* @__PURE__ */ jsx29(
|
|
1654
1839
|
CommandPrimitive.Input,
|
|
1655
1840
|
{
|
|
1656
1841
|
ref,
|
|
@@ -1663,7 +1848,7 @@ var CommandInput = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1663
1848
|
)
|
|
1664
1849
|
] }));
|
|
1665
1850
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
1666
|
-
var CommandList =
|
|
1851
|
+
var CommandList = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1667
1852
|
CommandPrimitive.List,
|
|
1668
1853
|
{
|
|
1669
1854
|
ref,
|
|
@@ -1672,9 +1857,9 @@ var CommandList = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1672
1857
|
}
|
|
1673
1858
|
));
|
|
1674
1859
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
1675
|
-
var CommandEmpty =
|
|
1860
|
+
var CommandEmpty = React27.forwardRef((props, ref) => /* @__PURE__ */ jsx29(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
1676
1861
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
1677
|
-
var CommandGroup =
|
|
1862
|
+
var CommandGroup = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1678
1863
|
CommandPrimitive.Group,
|
|
1679
1864
|
{
|
|
1680
1865
|
ref,
|
|
@@ -1686,7 +1871,7 @@ var CommandGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1686
1871
|
}
|
|
1687
1872
|
));
|
|
1688
1873
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
1689
|
-
var CommandSeparator =
|
|
1874
|
+
var CommandSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1690
1875
|
CommandPrimitive.Separator,
|
|
1691
1876
|
{
|
|
1692
1877
|
ref,
|
|
@@ -1695,7 +1880,7 @@ var CommandSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1695
1880
|
}
|
|
1696
1881
|
));
|
|
1697
1882
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
1698
|
-
var CommandItem =
|
|
1883
|
+
var CommandItem = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1699
1884
|
CommandPrimitive.Item,
|
|
1700
1885
|
{
|
|
1701
1886
|
ref,
|
|
@@ -1708,7 +1893,7 @@ var CommandItem = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1708
1893
|
));
|
|
1709
1894
|
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
1710
1895
|
var CommandShortcut = ({ className, ...props }) => {
|
|
1711
|
-
return /* @__PURE__ */
|
|
1896
|
+
return /* @__PURE__ */ jsx29(
|
|
1712
1897
|
"span",
|
|
1713
1898
|
{
|
|
1714
1899
|
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
@@ -1859,8 +2044,8 @@ var isEUCountry = (countryCode) => {
|
|
|
1859
2044
|
};
|
|
1860
2045
|
|
|
1861
2046
|
// src/components/country-select/CountrySelect.tsx
|
|
1862
|
-
import { Fragment, jsx as
|
|
1863
|
-
var CountrySelect =
|
|
2047
|
+
import { Fragment, jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2048
|
+
var CountrySelect = React28.forwardRef(
|
|
1864
2049
|
({
|
|
1865
2050
|
value,
|
|
1866
2051
|
onValueChange,
|
|
@@ -1870,10 +2055,10 @@ var CountrySelect = React26.forwardRef(
|
|
|
1870
2055
|
align = "center",
|
|
1871
2056
|
sideOffset = 4
|
|
1872
2057
|
}, ref) => {
|
|
1873
|
-
const [open, setOpen] =
|
|
1874
|
-
const selectedCountry =
|
|
1875
|
-
return /* @__PURE__ */
|
|
1876
|
-
/* @__PURE__ */
|
|
2058
|
+
const [open, setOpen] = React28.useState(false);
|
|
2059
|
+
const selectedCountry = React28.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);
|
|
2060
|
+
return /* @__PURE__ */ jsxs13(Popover, { open, onOpenChange: setOpen, children: [
|
|
2061
|
+
/* @__PURE__ */ jsx30(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs13(
|
|
1877
2062
|
"button",
|
|
1878
2063
|
{
|
|
1879
2064
|
ref,
|
|
@@ -1894,16 +2079,16 @@ var CountrySelect = React26.forwardRef(
|
|
|
1894
2079
|
className
|
|
1895
2080
|
),
|
|
1896
2081
|
children: [
|
|
1897
|
-
/* @__PURE__ */
|
|
1898
|
-
/* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */
|
|
1900
|
-
/* @__PURE__ */
|
|
2082
|
+
/* @__PURE__ */ jsx30("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ jsxs13(Fragment, { children: [
|
|
2083
|
+
/* @__PURE__ */ jsx30("span", { className: "text-xl flex-shrink-0", children: selectedCountry.flag }),
|
|
2084
|
+
/* @__PURE__ */ jsx30("span", { className: "truncate", children: selectedCountry.name }),
|
|
2085
|
+
/* @__PURE__ */ jsxs13("span", { className: "text-berget-muted-foreground text-xs flex-shrink-0", children: [
|
|
1901
2086
|
"(",
|
|
1902
2087
|
selectedCountry.code,
|
|
1903
2088
|
")"
|
|
1904
2089
|
] })
|
|
1905
|
-
] }) : /* @__PURE__ */
|
|
1906
|
-
/* @__PURE__ */
|
|
2090
|
+
] }) : /* @__PURE__ */ jsxs13(Fragment, { children: [
|
|
2091
|
+
/* @__PURE__ */ jsx30(
|
|
1907
2092
|
Icon2,
|
|
1908
2093
|
{
|
|
1909
2094
|
icon: Globe,
|
|
@@ -1911,9 +2096,9 @@ var CountrySelect = React26.forwardRef(
|
|
|
1911
2096
|
className: "flex-shrink-0 text-berget-muted-foreground"
|
|
1912
2097
|
}
|
|
1913
2098
|
),
|
|
1914
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ jsx30("span", { className: "text-berget-muted-foreground truncate", children: placeholder })
|
|
1915
2100
|
] }) }),
|
|
1916
|
-
/* @__PURE__ */
|
|
2101
|
+
/* @__PURE__ */ jsx30(
|
|
1917
2102
|
Icon2,
|
|
1918
2103
|
{
|
|
1919
2104
|
icon: ChevronDown2,
|
|
@@ -1928,17 +2113,17 @@ var CountrySelect = React26.forwardRef(
|
|
|
1928
2113
|
]
|
|
1929
2114
|
}
|
|
1930
2115
|
) }),
|
|
1931
|
-
/* @__PURE__ */
|
|
2116
|
+
/* @__PURE__ */ jsx30(
|
|
1932
2117
|
PopoverContent,
|
|
1933
2118
|
{
|
|
1934
2119
|
align,
|
|
1935
2120
|
sideOffset,
|
|
1936
2121
|
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
1937
|
-
children: /* @__PURE__ */
|
|
1938
|
-
/* @__PURE__ */
|
|
1939
|
-
/* @__PURE__ */
|
|
1940
|
-
/* @__PURE__ */
|
|
1941
|
-
/* @__PURE__ */
|
|
2122
|
+
children: /* @__PURE__ */ jsxs13(Command, { children: [
|
|
2123
|
+
/* @__PURE__ */ jsx30(CommandInput, { placeholder: "Search country..." }),
|
|
2124
|
+
/* @__PURE__ */ jsxs13(CommandList, { children: [
|
|
2125
|
+
/* @__PURE__ */ jsx30(CommandEmpty, { children: "No countries found." }),
|
|
2126
|
+
/* @__PURE__ */ jsx30(CommandGroup, { children: COUNTRIES.map((country) => /* @__PURE__ */ jsxs13(
|
|
1942
2127
|
CommandItem,
|
|
1943
2128
|
{
|
|
1944
2129
|
value: `${country.name} ${country.code}`,
|
|
@@ -1952,12 +2137,12 @@ var CountrySelect = React26.forwardRef(
|
|
|
1952
2137
|
value === country.code && "bg-berget-brand-granite-800/40"
|
|
1953
2138
|
),
|
|
1954
2139
|
children: [
|
|
1955
|
-
/* @__PURE__ */
|
|
1956
|
-
/* @__PURE__ */
|
|
1957
|
-
/* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
2140
|
+
/* @__PURE__ */ jsx30("span", { className: "text-xl flex-shrink-0", children: country.flag }),
|
|
2141
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex-1 min-w-0", children: [
|
|
2142
|
+
/* @__PURE__ */ jsx30("div", { className: "text-sm truncate", children: country.name }),
|
|
2143
|
+
/* @__PURE__ */ jsx30("div", { className: "text-xs text-berget-muted-foreground", children: country.code })
|
|
1959
2144
|
] }),
|
|
1960
|
-
value === country.code && /* @__PURE__ */
|
|
2145
|
+
value === country.code && /* @__PURE__ */ jsx30("div", { className: "w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0" })
|
|
1961
2146
|
]
|
|
1962
2147
|
},
|
|
1963
2148
|
country.code
|
|
@@ -1972,15 +2157,15 @@ var CountrySelect = React26.forwardRef(
|
|
|
1972
2157
|
CountrySelect.displayName = "CountrySelect";
|
|
1973
2158
|
|
|
1974
2159
|
// src/components/text-area/TextArea.tsx
|
|
1975
|
-
import * as
|
|
2160
|
+
import * as React30 from "react";
|
|
1976
2161
|
import { cva as cva11 } from "class-variance-authority";
|
|
1977
2162
|
|
|
1978
2163
|
// src/primitives/textarea.tsx
|
|
1979
|
-
import * as
|
|
1980
|
-
import { jsx as
|
|
1981
|
-
var Textarea =
|
|
2164
|
+
import * as React29 from "react";
|
|
2165
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2166
|
+
var Textarea = React29.forwardRef(
|
|
1982
2167
|
({ className, ...props }, ref) => {
|
|
1983
|
-
return /* @__PURE__ */
|
|
2168
|
+
return /* @__PURE__ */ jsx31(
|
|
1984
2169
|
"textarea",
|
|
1985
2170
|
{
|
|
1986
2171
|
className: cn(
|
|
@@ -1996,7 +2181,7 @@ var Textarea = React27.forwardRef(
|
|
|
1996
2181
|
Textarea.displayName = "Textarea";
|
|
1997
2182
|
|
|
1998
2183
|
// src/components/text-area/TextArea.tsx
|
|
1999
|
-
import { jsx as
|
|
2184
|
+
import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2000
2185
|
var textAreaVariants = cva11(
|
|
2001
2186
|
"rounded-berget-xs bg-card px-4 py-3 transition-colors duration-200 focus-visible:border-berget-form-focus-border focus-visible:ring-0 focus-visible:ring-offset-0 resize-y",
|
|
2002
2187
|
{
|
|
@@ -2019,7 +2204,7 @@ var textAreaVariants = cva11(
|
|
|
2019
2204
|
}
|
|
2020
2205
|
}
|
|
2021
2206
|
);
|
|
2022
|
-
var TextArea =
|
|
2207
|
+
var TextArea = React30.forwardRef(
|
|
2023
2208
|
({
|
|
2024
2209
|
className,
|
|
2025
2210
|
variant,
|
|
@@ -2039,13 +2224,13 @@ var TextArea = React28.forwardRef(
|
|
|
2039
2224
|
actionButton,
|
|
2040
2225
|
...props
|
|
2041
2226
|
}, ref) => {
|
|
2042
|
-
const generatedId =
|
|
2227
|
+
const generatedId = React30.useId();
|
|
2043
2228
|
const textareaId = id || generatedId;
|
|
2044
2229
|
const errorId = `${textareaId}-error`;
|
|
2045
2230
|
const descriptionId = `${textareaId}-description`;
|
|
2046
2231
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
2047
|
-
return /* @__PURE__ */
|
|
2048
|
-
label && /* @__PURE__ */
|
|
2232
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-2", children: [
|
|
2233
|
+
label && /* @__PURE__ */ jsx32(
|
|
2049
2234
|
"label",
|
|
2050
2235
|
{
|
|
2051
2236
|
htmlFor: textareaId,
|
|
@@ -2057,9 +2242,9 @@ var TextArea = React28.forwardRef(
|
|
|
2057
2242
|
children: label
|
|
2058
2243
|
}
|
|
2059
2244
|
),
|
|
2060
|
-
/* @__PURE__ */
|
|
2061
|
-
icon && /* @__PURE__ */
|
|
2062
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative", children: [
|
|
2246
|
+
icon && /* @__PURE__ */ jsx32("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
2247
|
+
/* @__PURE__ */ jsx32(
|
|
2063
2248
|
Textarea,
|
|
2064
2249
|
{
|
|
2065
2250
|
ref,
|
|
@@ -2084,13 +2269,13 @@ var TextArea = React28.forwardRef(
|
|
|
2084
2269
|
...props
|
|
2085
2270
|
}
|
|
2086
2271
|
),
|
|
2087
|
-
secondaryIcon && /* @__PURE__ */
|
|
2088
|
-
actionButton && /* @__PURE__ */
|
|
2272
|
+
secondaryIcon && /* @__PURE__ */ jsx32("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
2273
|
+
actionButton && /* @__PURE__ */ jsx32("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
2089
2274
|
] }),
|
|
2090
|
-
(description || error || showCount && maxLength) && /* @__PURE__ */
|
|
2091
|
-
description && /* @__PURE__ */
|
|
2092
|
-
(error || showCount && maxLength) && /* @__PURE__ */
|
|
2093
|
-
showCount && maxLength && /* @__PURE__ */
|
|
2275
|
+
(description || error || showCount && maxLength) && /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2276
|
+
description && /* @__PURE__ */ jsx32(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
2277
|
+
(error || showCount && maxLength) && /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
2278
|
+
showCount && maxLength && /* @__PURE__ */ jsxs14(
|
|
2094
2279
|
Typography,
|
|
2095
2280
|
{
|
|
2096
2281
|
variant: "xs",
|
|
@@ -2104,7 +2289,7 @@ var TextArea = React28.forwardRef(
|
|
|
2104
2289
|
]
|
|
2105
2290
|
}
|
|
2106
2291
|
),
|
|
2107
|
-
error && /* @__PURE__ */
|
|
2292
|
+
error && /* @__PURE__ */ jsx32(
|
|
2108
2293
|
Typography,
|
|
2109
2294
|
{
|
|
2110
2295
|
variant: "xs",
|
|
@@ -2121,22 +2306,22 @@ var TextArea = React28.forwardRef(
|
|
|
2121
2306
|
TextArea.displayName = "TextArea";
|
|
2122
2307
|
|
|
2123
2308
|
// src/primitives/label.tsx
|
|
2124
|
-
import * as
|
|
2309
|
+
import * as React31 from "react";
|
|
2125
2310
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2126
2311
|
import { cva as cva12 } from "class-variance-authority";
|
|
2127
|
-
import { jsx as
|
|
2312
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2128
2313
|
var labelVariants = cva12(
|
|
2129
2314
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2130
2315
|
);
|
|
2131
|
-
var
|
|
2132
|
-
|
|
2316
|
+
var Label3 = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
2317
|
+
Label3.displayName = LabelPrimitive.Root.displayName;
|
|
2133
2318
|
|
|
2134
2319
|
// src/primitives/field.tsx
|
|
2135
2320
|
import { useMemo as useMemo3 } from "react";
|
|
2136
2321
|
import { cva as cva13 } from "class-variance-authority";
|
|
2137
|
-
import { jsx as
|
|
2322
|
+
import { jsx as jsx34, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2138
2323
|
function FieldSet({ className, ...props }) {
|
|
2139
|
-
return /* @__PURE__ */
|
|
2324
|
+
return /* @__PURE__ */ jsx34(
|
|
2140
2325
|
"fieldset",
|
|
2141
2326
|
{
|
|
2142
2327
|
"data-slot": "field-set",
|
|
@@ -2154,7 +2339,7 @@ function FieldLegend({
|
|
|
2154
2339
|
variant = "legend",
|
|
2155
2340
|
...props
|
|
2156
2341
|
}) {
|
|
2157
|
-
return /* @__PURE__ */
|
|
2342
|
+
return /* @__PURE__ */ jsx34(
|
|
2158
2343
|
"legend",
|
|
2159
2344
|
{
|
|
2160
2345
|
"data-slot": "field-legend",
|
|
@@ -2170,7 +2355,7 @@ function FieldLegend({
|
|
|
2170
2355
|
);
|
|
2171
2356
|
}
|
|
2172
2357
|
function FieldGroup({ className, ...props }) {
|
|
2173
|
-
return /* @__PURE__ */
|
|
2358
|
+
return /* @__PURE__ */ jsx34(
|
|
2174
2359
|
"div",
|
|
2175
2360
|
{
|
|
2176
2361
|
"data-slot": "field-group",
|
|
@@ -2210,7 +2395,7 @@ function Field({
|
|
|
2210
2395
|
orientation = "vertical",
|
|
2211
2396
|
...props
|
|
2212
2397
|
}) {
|
|
2213
|
-
return /* @__PURE__ */
|
|
2398
|
+
return /* @__PURE__ */ jsx34(
|
|
2214
2399
|
"div",
|
|
2215
2400
|
{
|
|
2216
2401
|
role: "group",
|
|
@@ -2222,7 +2407,7 @@ function Field({
|
|
|
2222
2407
|
);
|
|
2223
2408
|
}
|
|
2224
2409
|
function FieldContent({ className, ...props }) {
|
|
2225
|
-
return /* @__PURE__ */
|
|
2410
|
+
return /* @__PURE__ */ jsx34(
|
|
2226
2411
|
"div",
|
|
2227
2412
|
{
|
|
2228
2413
|
"data-slot": "field-content",
|
|
@@ -2232,8 +2417,8 @@ function FieldContent({ className, ...props }) {
|
|
|
2232
2417
|
);
|
|
2233
2418
|
}
|
|
2234
2419
|
function FieldLabel({ className, ...props }) {
|
|
2235
|
-
return /* @__PURE__ */
|
|
2236
|
-
|
|
2420
|
+
return /* @__PURE__ */ jsx34(
|
|
2421
|
+
Label3,
|
|
2237
2422
|
{
|
|
2238
2423
|
"data-slot": "field-label",
|
|
2239
2424
|
className: cn(
|
|
@@ -2247,7 +2432,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
2247
2432
|
);
|
|
2248
2433
|
}
|
|
2249
2434
|
function FieldTitle({ className, ...props }) {
|
|
2250
|
-
return /* @__PURE__ */
|
|
2435
|
+
return /* @__PURE__ */ jsx34(
|
|
2251
2436
|
"div",
|
|
2252
2437
|
{
|
|
2253
2438
|
"data-slot": "field-label",
|
|
@@ -2260,7 +2445,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
2260
2445
|
);
|
|
2261
2446
|
}
|
|
2262
2447
|
function FieldDescription({ className, ...props }) {
|
|
2263
|
-
return /* @__PURE__ */
|
|
2448
|
+
return /* @__PURE__ */ jsx34(
|
|
2264
2449
|
"p",
|
|
2265
2450
|
{
|
|
2266
2451
|
"data-slot": "field-description",
|
|
@@ -2279,7 +2464,7 @@ function FieldSeparator({
|
|
|
2279
2464
|
className,
|
|
2280
2465
|
...props
|
|
2281
2466
|
}) {
|
|
2282
|
-
return /* @__PURE__ */
|
|
2467
|
+
return /* @__PURE__ */ jsxs15(
|
|
2283
2468
|
"div",
|
|
2284
2469
|
{
|
|
2285
2470
|
"data-slot": "field-separator",
|
|
@@ -2290,8 +2475,8 @@ function FieldSeparator({
|
|
|
2290
2475
|
),
|
|
2291
2476
|
...props,
|
|
2292
2477
|
children: [
|
|
2293
|
-
/* @__PURE__ */
|
|
2294
|
-
children && /* @__PURE__ */
|
|
2478
|
+
/* @__PURE__ */ jsx34(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
2479
|
+
children && /* @__PURE__ */ jsx34(
|
|
2295
2480
|
"span",
|
|
2296
2481
|
{
|
|
2297
2482
|
className: "bg-berget-background text-berget-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -2319,12 +2504,12 @@ function FieldError({
|
|
|
2319
2504
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
2320
2505
|
return errors[0].message;
|
|
2321
2506
|
}
|
|
2322
|
-
return /* @__PURE__ */
|
|
2507
|
+
return /* @__PURE__ */ jsx34("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map((error, index) => error?.message && /* @__PURE__ */ jsx34("li", { children: error.message }, index)) });
|
|
2323
2508
|
}, [children, errors]);
|
|
2324
2509
|
if (!content) {
|
|
2325
2510
|
return null;
|
|
2326
2511
|
}
|
|
2327
|
-
return /* @__PURE__ */
|
|
2512
|
+
return /* @__PURE__ */ jsx34(
|
|
2328
2513
|
"div",
|
|
2329
2514
|
{
|
|
2330
2515
|
role: "alert",
|
|
@@ -2337,10 +2522,10 @@ function FieldError({
|
|
|
2337
2522
|
}
|
|
2338
2523
|
|
|
2339
2524
|
// src/components/link/Link.tsx
|
|
2340
|
-
import * as
|
|
2525
|
+
import * as React32 from "react";
|
|
2341
2526
|
import { cva as cva14 } from "class-variance-authority";
|
|
2342
2527
|
import { ExternalLink } from "lucide-react";
|
|
2343
|
-
import { jsx as
|
|
2528
|
+
import { jsx as jsx35, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2344
2529
|
var linkVariants = cva14(
|
|
2345
2530
|
"inline-flex cursor-pointer items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
|
|
2346
2531
|
{
|
|
@@ -2365,7 +2550,7 @@ var linkVariants = cva14(
|
|
|
2365
2550
|
}
|
|
2366
2551
|
}
|
|
2367
2552
|
);
|
|
2368
|
-
var Link =
|
|
2553
|
+
var Link = React32.forwardRef(
|
|
2369
2554
|
({
|
|
2370
2555
|
className,
|
|
2371
2556
|
variant,
|
|
@@ -2378,7 +2563,7 @@ var Link = React30.forwardRef(
|
|
|
2378
2563
|
...props
|
|
2379
2564
|
}, ref) => {
|
|
2380
2565
|
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
2381
|
-
return /* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ jsxs16(
|
|
2382
2567
|
"a",
|
|
2383
2568
|
{
|
|
2384
2569
|
ref,
|
|
@@ -2394,8 +2579,8 @@ var Link = React30.forwardRef(
|
|
|
2394
2579
|
},
|
|
2395
2580
|
children: [
|
|
2396
2581
|
children,
|
|
2397
|
-
icon && /* @__PURE__ */
|
|
2398
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */
|
|
2582
|
+
icon && /* @__PURE__ */ jsx35("span", { className: "inline-flex items-center", children: icon }),
|
|
2583
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ jsx35("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ jsx35(Icon2, { icon: ExternalLink, size: 16 }) })
|
|
2399
2584
|
]
|
|
2400
2585
|
}
|
|
2401
2586
|
);
|
|
@@ -2404,10 +2589,10 @@ var Link = React30.forwardRef(
|
|
|
2404
2589
|
Link.displayName = "Link";
|
|
2405
2590
|
|
|
2406
2591
|
// src/components/container/Container.tsx
|
|
2407
|
-
import * as
|
|
2592
|
+
import * as React33 from "react";
|
|
2408
2593
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
2409
2594
|
import { cva as cva15 } from "class-variance-authority";
|
|
2410
|
-
import { jsx as
|
|
2595
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2411
2596
|
var containerVariants = cva15("w-full mx-auto", {
|
|
2412
2597
|
variants: {
|
|
2413
2598
|
size: {
|
|
@@ -2429,10 +2614,10 @@ var containerVariants = cva15("w-full mx-auto", {
|
|
|
2429
2614
|
padding: "md"
|
|
2430
2615
|
}
|
|
2431
2616
|
});
|
|
2432
|
-
var Container =
|
|
2617
|
+
var Container = React33.forwardRef(
|
|
2433
2618
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
2434
2619
|
const Component = asChild ? Slot3 : "div";
|
|
2435
|
-
return /* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ jsx36(
|
|
2436
2621
|
Component,
|
|
2437
2622
|
{
|
|
2438
2623
|
ref,
|
|
@@ -2446,10 +2631,10 @@ var Container = React31.forwardRef(
|
|
|
2446
2631
|
Container.displayName = "Container";
|
|
2447
2632
|
|
|
2448
2633
|
// src/components/grid/Grid.tsx
|
|
2449
|
-
import * as
|
|
2634
|
+
import * as React34 from "react";
|
|
2450
2635
|
import { cva as cva16 } from "class-variance-authority";
|
|
2451
2636
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
2452
|
-
import { jsx as
|
|
2637
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2453
2638
|
var gridVariants = cva16("grid", {
|
|
2454
2639
|
variants: {
|
|
2455
2640
|
align: {
|
|
@@ -2472,10 +2657,10 @@ var gridVariants = cva16("grid", {
|
|
|
2472
2657
|
justify: "start"
|
|
2473
2658
|
}
|
|
2474
2659
|
});
|
|
2475
|
-
var Grid =
|
|
2660
|
+
var Grid = React34.forwardRef(
|
|
2476
2661
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
2477
2662
|
const Component = asChild ? Slot4 : "div";
|
|
2478
|
-
return /* @__PURE__ */
|
|
2663
|
+
return /* @__PURE__ */ jsx37(
|
|
2479
2664
|
Component,
|
|
2480
2665
|
{
|
|
2481
2666
|
ref,
|
|
@@ -2497,10 +2682,10 @@ var Grid = React32.forwardRef(
|
|
|
2497
2682
|
Grid.displayName = "Grid";
|
|
2498
2683
|
|
|
2499
2684
|
// src/components/box/Box.tsx
|
|
2500
|
-
import * as
|
|
2685
|
+
import * as React35 from "react";
|
|
2501
2686
|
import { cva as cva17 } from "class-variance-authority";
|
|
2502
2687
|
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
2503
|
-
import { jsx as
|
|
2688
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
2504
2689
|
var boxVariants = cva17("flex", {
|
|
2505
2690
|
variants: {
|
|
2506
2691
|
direction: {
|
|
@@ -2537,10 +2722,10 @@ var boxVariants = cva17("flex", {
|
|
|
2537
2722
|
wrap: "nowrap"
|
|
2538
2723
|
}
|
|
2539
2724
|
});
|
|
2540
|
-
var Box =
|
|
2725
|
+
var Box = React35.forwardRef(
|
|
2541
2726
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
2542
2727
|
const Component = asChild ? Slot5 : "div";
|
|
2543
|
-
return /* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ jsx38(
|
|
2544
2729
|
Component,
|
|
2545
2730
|
{
|
|
2546
2731
|
ref,
|
|
@@ -2558,16 +2743,16 @@ var Box = React33.forwardRef(
|
|
|
2558
2743
|
Box.displayName = "Box";
|
|
2559
2744
|
|
|
2560
2745
|
// src/components/berget-logo/BergetLogo.tsx
|
|
2561
|
-
import * as
|
|
2562
|
-
import { jsx as
|
|
2563
|
-
var BergetLogo =
|
|
2746
|
+
import * as React36 from "react";
|
|
2747
|
+
import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2748
|
+
var BergetLogo = React36.forwardRef(
|
|
2564
2749
|
({ variant = "logotype", color = "auto", size = 48, className, ...props }, ref) => {
|
|
2565
2750
|
const fillColor = color === "auto" ? "var(--berget-logo-light)" : color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
2566
2751
|
if (variant === "symbol") {
|
|
2567
2752
|
const aspectRatio2 = 463 / 419;
|
|
2568
2753
|
const width2 = size * aspectRatio2;
|
|
2569
2754
|
const height2 = size;
|
|
2570
|
-
return /* @__PURE__ */
|
|
2755
|
+
return /* @__PURE__ */ jsx39(
|
|
2571
2756
|
"svg",
|
|
2572
2757
|
{
|
|
2573
2758
|
ref,
|
|
@@ -2580,7 +2765,7 @@ var BergetLogo = React34.forwardRef(
|
|
|
2580
2765
|
"aria-label": "Berget symbol",
|
|
2581
2766
|
className: cn("inline-block", className),
|
|
2582
2767
|
...props,
|
|
2583
|
-
children: /* @__PURE__ */
|
|
2768
|
+
children: /* @__PURE__ */ jsx39(
|
|
2584
2769
|
"path",
|
|
2585
2770
|
{
|
|
2586
2771
|
d: "M208.739 17L255.261 17L446 403L398 403L313.5 255L261.5 176L233.163 96.1677L237.815 98.6522H226.185L230.837 96.1677L113 331L64.5 403L18 403L208.739 17Z",
|
|
@@ -2593,7 +2778,7 @@ var BergetLogo = React34.forwardRef(
|
|
|
2593
2778
|
const aspectRatio = 793.63 / 204.37;
|
|
2594
2779
|
const width = size * aspectRatio;
|
|
2595
2780
|
const height = size;
|
|
2596
|
-
return /* @__PURE__ */
|
|
2781
|
+
return /* @__PURE__ */ jsxs17(
|
|
2597
2782
|
"svg",
|
|
2598
2783
|
{
|
|
2599
2784
|
ref,
|
|
@@ -2607,59 +2792,59 @@ var BergetLogo = React34.forwardRef(
|
|
|
2607
2792
|
className: cn("inline-block", className),
|
|
2608
2793
|
...props,
|
|
2609
2794
|
children: [
|
|
2610
|
-
/* @__PURE__ */
|
|
2611
|
-
/* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ jsxs17("g", { style: { fill: fillColor }, children: [
|
|
2796
|
+
/* @__PURE__ */ jsx39(
|
|
2612
2797
|
"path",
|
|
2613
2798
|
{
|
|
2614
2799
|
className: "berget-logotype-fill",
|
|
2615
2800
|
d: "M268.78,172.54v-96.04h37.74c10.39,0,18.26,2.33,23.6,7,5.33,4.67,8.01,10.52,8.01,17.56,0,6.13-1.72,11-5.15,14.61-3.43,3.61-7.58,6.06-12.44,7.34,3.81.73,7.22,2.2,10.22,4.39,3.01,2.2,5.36,4.94,7.08,8.23,1.72,3.29,2.58,6.86,2.58,10.7,0,4.94-1.27,9.4-3.79,13.38-2.53,3.98-6.22,7.11-11.08,9.4-4.86,2.29-10.82,3.43-17.87,3.43h-38.89ZM283.93,117.66h20.74c5.81,0,10.24-1.3,13.29-3.91,3.05-2.61,4.58-6.19,4.58-10.77s-1.51-8.05-4.51-10.7c-3-2.65-7.55-3.98-13.65-3.98h-20.45v29.36ZM283.93,160.61h21.74c6.1,0,10.84-1.37,14.22-4.11,3.38-2.75,5.08-6.59,5.08-11.53s-1.76-8.85-5.29-11.73-8.29-4.32-14.3-4.32h-21.45v31.69Z"
|
|
2616
2801
|
}
|
|
2617
2802
|
),
|
|
2618
|
-
/* @__PURE__ */
|
|
2803
|
+
/* @__PURE__ */ jsx39(
|
|
2619
2804
|
"path",
|
|
2620
2805
|
{
|
|
2621
2806
|
className: "berget-logotype-fill",
|
|
2622
2807
|
d: "M382.45,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81,2.91-1.88,5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM382.45,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z"
|
|
2623
2808
|
}
|
|
2624
2809
|
),
|
|
2625
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ jsx39(
|
|
2626
2811
|
"path",
|
|
2627
2812
|
{
|
|
2628
2813
|
className: "berget-logotype-fill",
|
|
2629
2814
|
d: "M425.62,172.54v-68.05h13.59l1.29,12.9c2.47-4.48,5.93-8.03,10.37-10.63,4.43-2.61,9.79-3.91,16.08-3.91v15.23h-4.15c-4.19,0-7.93.67-11.22,1.99-3.29,1.33-5.91,3.57-7.86,6.72-1.96,3.16-2.93,7.53-2.93,13.1v32.65h-15.16Z"
|
|
2630
2815
|
}
|
|
2631
2816
|
),
|
|
2632
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ jsx39(
|
|
2633
2818
|
"path",
|
|
2634
2819
|
{
|
|
2635
2820
|
className: "berget-logotype-fill",
|
|
2636
2821
|
d: "M500.25,151.69c-3.72,0-7.14-.41-10.29-1.24l-6.15,5.76c1.05.64,2.34,1.19,3.86,1.65,1.52.46,3.66.87,6.43,1.23,2.76.37,6.53.73,11.29,1.1,9.43.82,16.25,3,20.44,6.52,4.2,3.52,6.29,8.21,6.29,14.06,0,4.02-1.12,7.84-3.35,11.45-2.24,3.61-5.72,6.54-10.44,8.78s-10.74,3.36-18.09,3.36c-9.91,0-17.94-1.8-24.09-5.42-6.15-3.62-9.22-9.08-9.22-16.4,0-2.84.78-5.65,2.35-8.44,1.57-2.79,4.08-5.42,7.51-7.89-2-.83-3.74-1.72-5.22-2.68-1.48-.96-2.79-1.94-3.94-2.95v-3.29l12.3-12.07c-5.53-4.57-8.29-10.56-8.29-17.97,0-4.48,1.12-8.58,3.36-12.28,2.24-3.7,5.5-6.65,9.79-8.85,4.29-2.2,9.43-3.29,15.44-3.29,4.01,0,7.72.55,11.15,1.64h26.45v9.6l-12.58.69c2.28,3.75,3.43,7.91,3.43,12.49s-1.13,8.69-3.36,12.35c-2.24,3.66-5.48,6.59-9.72,8.78-4.25,2.2-9.37,3.29-15.37,3.29ZM481.24,181.19c0,3.93,1.81,6.88,5.44,8.85,3.62,1.97,8.15,2.95,13.58,2.95s9.48-1.07,12.72-3.22c3.24-2.15,4.86-5,4.86-8.57,0-2.65-1.09-4.92-3.29-6.79-2.19-1.87-6.34-3.04-12.44-3.5-4.57-.27-8.63-.68-12.15-1.23-3.34,1.74-5.63,3.61-6.86,5.63-1.25,2.01-1.86,3.98-1.86,5.9ZM500.25,140.3c4.38,0,7.93-1.12,10.66-3.36,2.71-2.24,4.07-5.42,4.07-9.53s-1.36-7.41-4.07-9.6c-2.72-2.2-6.27-3.29-10.66-3.29s-8.08,1.1-10.79,3.29c-2.71,2.2-4.08,5.4-4.08,9.6s1.36,7.3,4.08,9.53c2.71,2.24,6.31,3.36,10.79,3.36Z"
|
|
2637
2822
|
}
|
|
2638
2823
|
),
|
|
2639
|
-
/* @__PURE__ */
|
|
2824
|
+
/* @__PURE__ */ jsx39(
|
|
2640
2825
|
"path",
|
|
2641
2826
|
{
|
|
2642
2827
|
className: "berget-logotype-fill",
|
|
2643
2828
|
d: "M574.61,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79c3-5.4,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81s5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM574.61,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z"
|
|
2644
2829
|
}
|
|
2645
2830
|
),
|
|
2646
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ jsx39(
|
|
2647
2832
|
"path",
|
|
2648
2833
|
{
|
|
2649
2834
|
className: "berget-logotype-fill",
|
|
2650
2835
|
d: "M646.23,172.54c-6.96,0-12.49-1.62-16.59-4.87-4.1-3.25-6.15-9.03-6.15-17.36v-33.61h-12.16v-12.21h12.16l1.86-17.29h13.29v17.29h20.02v12.21h-20.02v33.61c0,3.75.84,6.33,2.51,7.75,1.67,1.42,4.55,2.13,8.65,2.13h8.14v12.35h-11.72Z"
|
|
2651
2836
|
}
|
|
2652
2837
|
),
|
|
2653
|
-
/* @__PURE__ */
|
|
2838
|
+
/* @__PURE__ */ jsx39(
|
|
2654
2839
|
"path",
|
|
2655
2840
|
{
|
|
2656
2841
|
className: "berget-logotype-fill",
|
|
2657
2842
|
d: "M684.4,172.54l36.89-96.04h16.59l36.6,96.04h-16.01l-8.58-23.46h-40.88l-8.58,23.46h-16.01ZM713.28,137.56h32.31l-16.16-43.77-16.16,43.77Z"
|
|
2658
2843
|
}
|
|
2659
2844
|
),
|
|
2660
|
-
/* @__PURE__ */
|
|
2845
|
+
/* @__PURE__ */ jsx39("path", { className: "berget-logotype-fill", d: "M778.48,172.54v-96.04h15.15v96.04h-15.15Z" })
|
|
2661
2846
|
] }),
|
|
2662
|
-
/* @__PURE__ */
|
|
2847
|
+
/* @__PURE__ */ jsx39(
|
|
2663
2848
|
"path",
|
|
2664
2849
|
{
|
|
2665
2850
|
style: { fill: fillColor },
|
|
@@ -2674,13 +2859,13 @@ var BergetLogo = React34.forwardRef(
|
|
|
2674
2859
|
BergetLogo.displayName = "BergetLogo";
|
|
2675
2860
|
|
|
2676
2861
|
// src/components/language-select/LanguageSelect.tsx
|
|
2677
|
-
import * as
|
|
2862
|
+
import * as React37 from "react";
|
|
2678
2863
|
import * as SelectPrimitive2 from "@radix-ui/react-select";
|
|
2679
2864
|
import { Globe as Globe2 } from "lucide-react";
|
|
2680
|
-
import { jsx as
|
|
2681
|
-
var LanguageSelect =
|
|
2682
|
-
return /* @__PURE__ */
|
|
2683
|
-
/* @__PURE__ */
|
|
2865
|
+
import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2866
|
+
var LanguageSelect = React37.forwardRef(({ className, options, value, onValueChange }, ref) => {
|
|
2867
|
+
return /* @__PURE__ */ jsxs18(SelectPrimitive2.Root, { value, onValueChange, children: [
|
|
2868
|
+
/* @__PURE__ */ jsxs18(
|
|
2684
2869
|
SelectPrimitive2.Trigger,
|
|
2685
2870
|
{
|
|
2686
2871
|
ref,
|
|
@@ -2703,12 +2888,12 @@ var LanguageSelect = React35.forwardRef(({ className, options, value, onValueCha
|
|
|
2703
2888
|
className
|
|
2704
2889
|
),
|
|
2705
2890
|
children: [
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
/* @__PURE__ */
|
|
2891
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Select language" }),
|
|
2892
|
+
/* @__PURE__ */ jsx40(Icon2, { icon: Globe2, size: 16, "aria-hidden": true })
|
|
2708
2893
|
]
|
|
2709
2894
|
}
|
|
2710
2895
|
),
|
|
2711
|
-
/* @__PURE__ */
|
|
2896
|
+
/* @__PURE__ */ jsx40(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx40(
|
|
2712
2897
|
SelectPrimitive2.Content,
|
|
2713
2898
|
{
|
|
2714
2899
|
className: cn(
|
|
@@ -2736,7 +2921,7 @@ var LanguageSelect = React35.forwardRef(({ className, options, value, onValueCha
|
|
|
2736
2921
|
"origin-[--radix-select-content-transform-origin]"
|
|
2737
2922
|
),
|
|
2738
2923
|
position: "popper",
|
|
2739
|
-
children: /* @__PURE__ */
|
|
2924
|
+
children: /* @__PURE__ */ jsx40(SelectPrimitive2.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsx40(
|
|
2740
2925
|
SelectPrimitive2.Item,
|
|
2741
2926
|
{
|
|
2742
2927
|
value: option.value,
|
|
@@ -2753,7 +2938,7 @@ var LanguageSelect = React35.forwardRef(({ className, options, value, onValueCha
|
|
|
2753
2938
|
// Disabled state
|
|
2754
2939
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
2755
2940
|
),
|
|
2756
|
-
children: /* @__PURE__ */
|
|
2941
|
+
children: /* @__PURE__ */ jsx40(SelectPrimitive2.ItemText, { children: option.label })
|
|
2757
2942
|
},
|
|
2758
2943
|
option.value
|
|
2759
2944
|
)) })
|
|
@@ -2764,12 +2949,12 @@ var LanguageSelect = React35.forwardRef(({ className, options, value, onValueCha
|
|
|
2764
2949
|
LanguageSelect.displayName = "LanguageSelect";
|
|
2765
2950
|
|
|
2766
2951
|
// src/components/list/List.tsx
|
|
2767
|
-
import * as
|
|
2952
|
+
import * as React39 from "react";
|
|
2768
2953
|
|
|
2769
2954
|
// src/components/divider/Divider.tsx
|
|
2770
|
-
import * as
|
|
2955
|
+
import * as React38 from "react";
|
|
2771
2956
|
import { cva as cva18 } from "class-variance-authority";
|
|
2772
|
-
import { jsx as
|
|
2957
|
+
import { jsx as jsx41, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2773
2958
|
var dividerVariants = cva18("", {
|
|
2774
2959
|
variants: {
|
|
2775
2960
|
variant: {
|
|
@@ -2790,7 +2975,7 @@ var dividerVariants = cva18("", {
|
|
|
2790
2975
|
size: "thin"
|
|
2791
2976
|
}
|
|
2792
2977
|
});
|
|
2793
|
-
var Divider =
|
|
2978
|
+
var Divider = React38.forwardRef(
|
|
2794
2979
|
({
|
|
2795
2980
|
className,
|
|
2796
2981
|
orientation = "horizontal",
|
|
@@ -2801,17 +2986,17 @@ var Divider = React36.forwardRef(
|
|
|
2801
2986
|
...props
|
|
2802
2987
|
}, ref) => {
|
|
2803
2988
|
if (label) {
|
|
2804
|
-
return /* @__PURE__ */
|
|
2805
|
-
labelPosition !== "right" && /* @__PURE__ */
|
|
2806
|
-
|
|
2989
|
+
return /* @__PURE__ */ jsxs19("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
2990
|
+
labelPosition !== "right" && /* @__PURE__ */ jsx41(
|
|
2991
|
+
Separator2,
|
|
2807
2992
|
{
|
|
2808
2993
|
orientation: "horizontal",
|
|
2809
2994
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
2810
2995
|
}
|
|
2811
2996
|
),
|
|
2812
|
-
/* @__PURE__ */
|
|
2813
|
-
labelPosition !== "left" && /* @__PURE__ */
|
|
2814
|
-
|
|
2997
|
+
/* @__PURE__ */ jsx41(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
2998
|
+
labelPosition !== "left" && /* @__PURE__ */ jsx41(
|
|
2999
|
+
Separator2,
|
|
2815
3000
|
{
|
|
2816
3001
|
orientation: "horizontal",
|
|
2817
3002
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
@@ -2819,8 +3004,8 @@ var Divider = React36.forwardRef(
|
|
|
2819
3004
|
)
|
|
2820
3005
|
] });
|
|
2821
3006
|
}
|
|
2822
|
-
return /* @__PURE__ */
|
|
2823
|
-
|
|
3007
|
+
return /* @__PURE__ */ jsx41(
|
|
3008
|
+
Separator2,
|
|
2824
3009
|
{
|
|
2825
3010
|
ref,
|
|
2826
3011
|
orientation,
|
|
@@ -2836,20 +3021,20 @@ var Divider = React36.forwardRef(
|
|
|
2836
3021
|
Divider.displayName = "Divider";
|
|
2837
3022
|
|
|
2838
3023
|
// src/components/list/List.tsx
|
|
2839
|
-
import { Check as
|
|
2840
|
-
import { jsx as
|
|
2841
|
-
var List =
|
|
3024
|
+
import { Check as Check5 } from "lucide-react";
|
|
3025
|
+
import { jsx as jsx42, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3026
|
+
var List = React39.forwardRef(
|
|
2842
3027
|
({ className, children, ...props }, ref) => {
|
|
2843
|
-
const childrenArray =
|
|
2844
|
-
return /* @__PURE__ */
|
|
3028
|
+
const childrenArray = React39.Children.toArray(children);
|
|
3029
|
+
return /* @__PURE__ */ jsx42("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs20(React39.Fragment, { children: [
|
|
2845
3030
|
child,
|
|
2846
|
-
index < childrenArray.length - 1 && /* @__PURE__ */
|
|
3031
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ jsx42(Divider, { variant: "subtle" })
|
|
2847
3032
|
] }, index)) });
|
|
2848
3033
|
}
|
|
2849
3034
|
);
|
|
2850
3035
|
List.displayName = "List";
|
|
2851
|
-
var ListItem =
|
|
2852
|
-
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */
|
|
3036
|
+
var ListItem = React39.forwardRef(
|
|
3037
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ jsxs20(
|
|
2853
3038
|
"div",
|
|
2854
3039
|
{
|
|
2855
3040
|
ref,
|
|
@@ -2860,15 +3045,15 @@ var ListItem = React37.forwardRef(
|
|
|
2860
3045
|
),
|
|
2861
3046
|
...props,
|
|
2862
3047
|
children: [
|
|
2863
|
-
icon && /* @__PURE__ */
|
|
2864
|
-
/* @__PURE__ */
|
|
3048
|
+
icon && /* @__PURE__ */ jsx42("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
3049
|
+
/* @__PURE__ */ jsx42("div", { className: "flex-1 min-w-0", children })
|
|
2865
3050
|
]
|
|
2866
3051
|
}
|
|
2867
3052
|
)
|
|
2868
3053
|
);
|
|
2869
3054
|
ListItem.displayName = "ListItem";
|
|
2870
|
-
var ListHeader =
|
|
2871
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
3055
|
+
var ListHeader = React39.forwardRef(
|
|
3056
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
2872
3057
|
"div",
|
|
2873
3058
|
{
|
|
2874
3059
|
ref,
|
|
@@ -2879,20 +3064,20 @@ var ListHeader = React37.forwardRef(
|
|
|
2879
3064
|
)
|
|
2880
3065
|
);
|
|
2881
3066
|
ListHeader.displayName = "ListHeader";
|
|
2882
|
-
var FeatureList =
|
|
3067
|
+
var FeatureList = React39.forwardRef(
|
|
2883
3068
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2884
|
-
return /* @__PURE__ */
|
|
2885
|
-
variant === "bullet" ? /* @__PURE__ */
|
|
2886
|
-
/* @__PURE__ */
|
|
3069
|
+
return /* @__PURE__ */ jsx42("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs20("li", { className: "flex items-start gap-fluid-md", children: [
|
|
3070
|
+
variant === "bullet" ? /* @__PURE__ */ jsx42("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ jsx42("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx42(Icon2, { icon: Check5, size: 24, className: "text-berget-logo-light" }) }),
|
|
3071
|
+
/* @__PURE__ */ jsx42(Typography, { variant: "body", color: "muted", children: item })
|
|
2887
3072
|
] }, index)) });
|
|
2888
3073
|
}
|
|
2889
3074
|
);
|
|
2890
3075
|
FeatureList.displayName = "FeatureList";
|
|
2891
3076
|
|
|
2892
3077
|
// src/components/hero-block/HeroBlock.tsx
|
|
2893
|
-
import * as
|
|
3078
|
+
import * as React40 from "react";
|
|
2894
3079
|
import { cva as cva19 } from "class-variance-authority";
|
|
2895
|
-
import { jsx as
|
|
3080
|
+
import { jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2896
3081
|
var heroBlockVariants = cva19(
|
|
2897
3082
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2898
3083
|
{
|
|
@@ -2913,7 +3098,7 @@ var heroBlockVariants = cva19(
|
|
|
2913
3098
|
}
|
|
2914
3099
|
}
|
|
2915
3100
|
);
|
|
2916
|
-
var HeroBlock =
|
|
3101
|
+
var HeroBlock = React40.forwardRef(
|
|
2917
3102
|
({
|
|
2918
3103
|
className,
|
|
2919
3104
|
variant,
|
|
@@ -2925,26 +3110,26 @@ var HeroBlock = React38.forwardRef(
|
|
|
2925
3110
|
actions,
|
|
2926
3111
|
...props
|
|
2927
3112
|
}, ref) => {
|
|
2928
|
-
return /* @__PURE__ */
|
|
3113
|
+
return /* @__PURE__ */ jsx43(
|
|
2929
3114
|
"div",
|
|
2930
3115
|
{
|
|
2931
3116
|
ref,
|
|
2932
3117
|
className: cn(heroBlockVariants({ variant, withPattern }), className),
|
|
2933
3118
|
...props,
|
|
2934
|
-
children: /* @__PURE__ */
|
|
2935
|
-
tagline && /* @__PURE__ */
|
|
3119
|
+
children: /* @__PURE__ */ jsx43("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs21("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
3120
|
+
tagline && /* @__PURE__ */ jsx43(
|
|
2936
3121
|
Badge,
|
|
2937
3122
|
{
|
|
2938
3123
|
variant: "default",
|
|
2939
|
-
icon: TaglineIcon ? /* @__PURE__ */
|
|
3124
|
+
icon: TaglineIcon ? /* @__PURE__ */ jsx43(Icon2, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2940
3125
|
iconGap: 2,
|
|
2941
3126
|
className: "mb-fluid-md",
|
|
2942
3127
|
children: tagline
|
|
2943
3128
|
}
|
|
2944
3129
|
),
|
|
2945
|
-
/* @__PURE__ */
|
|
2946
|
-
/* @__PURE__ */
|
|
2947
|
-
actions && /* @__PURE__ */
|
|
3130
|
+
/* @__PURE__ */ jsx43(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
3131
|
+
/* @__PURE__ */ jsx43(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
3132
|
+
actions && /* @__PURE__ */ jsx43("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
2948
3133
|
] }) })
|
|
2949
3134
|
}
|
|
2950
3135
|
);
|
|
@@ -2954,8 +3139,8 @@ HeroBlock.displayName = "HeroBlock";
|
|
|
2954
3139
|
|
|
2955
3140
|
// src/components/code-block/CodeBlock.tsx
|
|
2956
3141
|
import { useState as useState3, useEffect as useEffect2, useCallback as useCallback3 } from "react";
|
|
2957
|
-
import { Copy, Check as
|
|
2958
|
-
import { jsx as
|
|
3142
|
+
import { Copy, Check as Check6 } from "lucide-react";
|
|
3143
|
+
import { jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2959
3144
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
2960
3145
|
const [html, setHtml] = useState3(null);
|
|
2961
3146
|
const [copied, setCopied] = useState3(false);
|
|
@@ -2971,16 +3156,16 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2971
3156
|
setCopied(true);
|
|
2972
3157
|
setTimeout(() => setCopied(false), 2e3);
|
|
2973
3158
|
}, [code]);
|
|
2974
|
-
const copyButton = /* @__PURE__ */
|
|
3159
|
+
const copyButton = /* @__PURE__ */ jsx44(
|
|
2975
3160
|
"button",
|
|
2976
3161
|
{
|
|
2977
3162
|
onClick: handleCopy,
|
|
2978
3163
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
2979
3164
|
"aria-label": "Copy code",
|
|
2980
|
-
children: copied ? /* @__PURE__ */
|
|
3165
|
+
children: copied ? /* @__PURE__ */ jsx44(Check6, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx44(Copy, { className: "w-3.5 h-3.5" })
|
|
2981
3166
|
}
|
|
2982
3167
|
);
|
|
2983
|
-
return /* @__PURE__ */
|
|
3168
|
+
return /* @__PURE__ */ jsxs22(
|
|
2984
3169
|
"div",
|
|
2985
3170
|
{
|
|
2986
3171
|
className: cn(
|
|
@@ -2988,25 +3173,25 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2988
3173
|
className
|
|
2989
3174
|
),
|
|
2990
3175
|
children: [
|
|
2991
|
-
title && /* @__PURE__ */
|
|
2992
|
-
/* @__PURE__ */
|
|
2993
|
-
html ? /* @__PURE__ */
|
|
3176
|
+
title && /* @__PURE__ */ jsx44("div", { className: "!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg", children: /* @__PURE__ */ jsx44("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
3177
|
+
/* @__PURE__ */ jsx44("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
3178
|
+
html ? /* @__PURE__ */ jsx44(
|
|
2994
3179
|
"div",
|
|
2995
3180
|
{
|
|
2996
3181
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
2997
3182
|
dangerouslySetInnerHTML: { __html: html }
|
|
2998
3183
|
}
|
|
2999
|
-
) : /* @__PURE__ */
|
|
3184
|
+
) : /* @__PURE__ */ jsx44("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ jsx44("code", { children: code }) })
|
|
3000
3185
|
]
|
|
3001
3186
|
}
|
|
3002
3187
|
);
|
|
3003
3188
|
}
|
|
3004
3189
|
|
|
3005
3190
|
// src/components/window-frame/WindowFrame.tsx
|
|
3006
|
-
import * as
|
|
3191
|
+
import * as React41 from "react";
|
|
3007
3192
|
import { useState as useState4 } from "react";
|
|
3008
|
-
import { jsx as
|
|
3009
|
-
var WindowFrame =
|
|
3193
|
+
import { jsx as jsx45, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3194
|
+
var WindowFrame = React41.forwardRef(
|
|
3010
3195
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
3011
3196
|
const [internalActive, setInternalActive] = useState4(tabs?.[0]?.id ?? "");
|
|
3012
3197
|
const currentTab = activeTab ?? internalActive;
|
|
@@ -3017,7 +3202,7 @@ var WindowFrame = React39.forwardRef(
|
|
|
3017
3202
|
setInternalActive(id);
|
|
3018
3203
|
}
|
|
3019
3204
|
};
|
|
3020
|
-
return /* @__PURE__ */
|
|
3205
|
+
return /* @__PURE__ */ jsxs23(
|
|
3021
3206
|
"div",
|
|
3022
3207
|
{
|
|
3023
3208
|
ref,
|
|
@@ -3027,13 +3212,13 @@ var WindowFrame = React39.forwardRef(
|
|
|
3027
3212
|
),
|
|
3028
3213
|
...props,
|
|
3029
3214
|
children: [
|
|
3030
|
-
/* @__PURE__ */
|
|
3031
|
-
/* @__PURE__ */
|
|
3032
|
-
/* @__PURE__ */
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
3215
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
3216
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
3217
|
+
/* @__PURE__ */ jsx45("div", { className: "w-3 h-3 rounded-full bg-[#FF5F56]" }),
|
|
3218
|
+
/* @__PURE__ */ jsx45("div", { className: "w-3 h-3 rounded-full bg-[#FFBD2E]" }),
|
|
3219
|
+
/* @__PURE__ */ jsx45("div", { className: "w-3 h-3 rounded-full bg-[#27C93F]" })
|
|
3035
3220
|
] }),
|
|
3036
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */
|
|
3221
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ jsx45("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsx45(
|
|
3037
3222
|
"button",
|
|
3038
3223
|
{
|
|
3039
3224
|
type: "button",
|
|
@@ -3045,9 +3230,9 @@ var WindowFrame = React39.forwardRef(
|
|
|
3045
3230
|
children: tab.label
|
|
3046
3231
|
},
|
|
3047
3232
|
tab.id
|
|
3048
|
-
)) }) : /* @__PURE__ */
|
|
3233
|
+
)) }) : /* @__PURE__ */ jsx45("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
3049
3234
|
] }),
|
|
3050
|
-
/* @__PURE__ */
|
|
3235
|
+
/* @__PURE__ */ jsx45("div", { children })
|
|
3051
3236
|
]
|
|
3052
3237
|
}
|
|
3053
3238
|
);
|
|
@@ -3057,6 +3242,17 @@ WindowFrame.displayName = "WindowFrame";
|
|
|
3057
3242
|
export {
|
|
3058
3243
|
Alert2 as Alert,
|
|
3059
3244
|
AlertDescription,
|
|
3245
|
+
AlertDialog,
|
|
3246
|
+
AlertDialogAction,
|
|
3247
|
+
AlertDialogCancel,
|
|
3248
|
+
AlertDialogContent,
|
|
3249
|
+
AlertDialogDescription,
|
|
3250
|
+
AlertDialogFooter,
|
|
3251
|
+
AlertDialogHeader,
|
|
3252
|
+
AlertDialogOverlay,
|
|
3253
|
+
AlertDialogPortal,
|
|
3254
|
+
AlertDialogTitle,
|
|
3255
|
+
AlertDialogTrigger,
|
|
3060
3256
|
AlertTitle,
|
|
3061
3257
|
Badge,
|
|
3062
3258
|
BergetLogo,
|
|
@@ -3083,6 +3279,21 @@ export {
|
|
|
3083
3279
|
DialogPortal,
|
|
3084
3280
|
DialogTitle,
|
|
3085
3281
|
DialogTrigger,
|
|
3282
|
+
DropdownMenu,
|
|
3283
|
+
DropdownMenuCheckboxItem,
|
|
3284
|
+
DropdownMenuContent,
|
|
3285
|
+
DropdownMenuGroup,
|
|
3286
|
+
DropdownMenuItem,
|
|
3287
|
+
DropdownMenuLabel,
|
|
3288
|
+
DropdownMenuPortal,
|
|
3289
|
+
DropdownMenuRadioGroup,
|
|
3290
|
+
DropdownMenuRadioItem,
|
|
3291
|
+
DropdownMenuSeparator,
|
|
3292
|
+
DropdownMenuShortcut,
|
|
3293
|
+
DropdownMenuSub,
|
|
3294
|
+
DropdownMenuSubContent,
|
|
3295
|
+
DropdownMenuSubTrigger,
|
|
3296
|
+
DropdownMenuTrigger,
|
|
3086
3297
|
EU_COUNTRY_CODES,
|
|
3087
3298
|
FeatureList,
|
|
3088
3299
|
Field,
|
|
@@ -3099,7 +3310,7 @@ export {
|
|
|
3099
3310
|
HeroBlock,
|
|
3100
3311
|
Icon2 as Icon,
|
|
3101
3312
|
Input2 as Input,
|
|
3102
|
-
|
|
3313
|
+
Item3 as Item,
|
|
3103
3314
|
ItemActions,
|
|
3104
3315
|
ItemContent,
|
|
3105
3316
|
ItemDescription2 as ItemDescription,
|
|
@@ -3109,7 +3320,7 @@ export {
|
|
|
3109
3320
|
ItemMedia2 as ItemMedia,
|
|
3110
3321
|
ItemSeparator2 as ItemSeparator,
|
|
3111
3322
|
ItemTitle2 as ItemTitle,
|
|
3112
|
-
|
|
3323
|
+
Label3 as Label,
|
|
3113
3324
|
LanguageSelect,
|
|
3114
3325
|
Link,
|
|
3115
3326
|
List,
|