@bergetai/ui 0.1.92 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1223 -387
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -1
- package/dist/index.d.ts +67 -1
- package/dist/index.js +1220 -408
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +60 -0
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -586,15 +586,391 @@ 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/table/Table.tsx
|
|
590
590
|
import * as React12 from "react";
|
|
591
591
|
|
|
592
|
-
// src/primitives/
|
|
592
|
+
// src/primitives/table.tsx
|
|
593
593
|
import * as React11 from "react";
|
|
594
594
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
595
|
-
var
|
|
595
|
+
var Table = React11.forwardRef(
|
|
596
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx12("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx12("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
597
|
+
);
|
|
598
|
+
Table.displayName = "Table";
|
|
599
|
+
var TableHeader = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
600
|
+
TableHeader.displayName = "TableHeader";
|
|
601
|
+
var TableBody = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
602
|
+
TableBody.displayName = "TableBody";
|
|
603
|
+
var TableFooter = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
604
|
+
"tfoot",
|
|
605
|
+
{
|
|
606
|
+
ref,
|
|
607
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
608
|
+
...props
|
|
609
|
+
}
|
|
610
|
+
));
|
|
611
|
+
TableFooter.displayName = "TableFooter";
|
|
612
|
+
var TableRow = React11.forwardRef(
|
|
613
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
614
|
+
"tr",
|
|
615
|
+
{
|
|
616
|
+
ref,
|
|
617
|
+
className: cn(
|
|
618
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
619
|
+
className
|
|
620
|
+
),
|
|
621
|
+
...props
|
|
622
|
+
}
|
|
623
|
+
)
|
|
624
|
+
);
|
|
625
|
+
TableRow.displayName = "TableRow";
|
|
626
|
+
var TableHead = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
627
|
+
"th",
|
|
628
|
+
{
|
|
629
|
+
ref,
|
|
630
|
+
className: cn(
|
|
631
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
632
|
+
className
|
|
633
|
+
),
|
|
634
|
+
...props
|
|
635
|
+
}
|
|
636
|
+
));
|
|
637
|
+
TableHead.displayName = "TableHead";
|
|
638
|
+
var TableCell = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
639
|
+
"td",
|
|
640
|
+
{
|
|
641
|
+
ref,
|
|
642
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
643
|
+
...props
|
|
644
|
+
}
|
|
645
|
+
));
|
|
646
|
+
TableCell.displayName = "TableCell";
|
|
647
|
+
var TableCaption = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
648
|
+
TableCaption.displayName = "TableCaption";
|
|
649
|
+
|
|
650
|
+
// src/components/table/Table.tsx
|
|
651
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
652
|
+
var Table2 = React12.forwardRef(
|
|
653
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx13(Table, { ref, className, ...props })
|
|
654
|
+
);
|
|
655
|
+
Table2.displayName = "Table";
|
|
656
|
+
var TableHeader2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(TableHeader, { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
657
|
+
TableHeader2.displayName = "TableHeader";
|
|
658
|
+
var TableBody2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
659
|
+
TableBody,
|
|
660
|
+
{
|
|
661
|
+
ref,
|
|
662
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
663
|
+
...props
|
|
664
|
+
}
|
|
665
|
+
));
|
|
666
|
+
TableBody2.displayName = "TableBody";
|
|
667
|
+
var TableFooter2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
668
|
+
TableFooter,
|
|
669
|
+
{
|
|
670
|
+
ref,
|
|
671
|
+
className: cn("border-t bg-berget-table-footer-bg font-medium [&>tr]:last:border-0", className),
|
|
672
|
+
...props
|
|
673
|
+
}
|
|
674
|
+
));
|
|
675
|
+
TableFooter2.displayName = "TableFooter";
|
|
676
|
+
var TableRow2 = React12.forwardRef(
|
|
677
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
678
|
+
TableRow,
|
|
679
|
+
{
|
|
680
|
+
ref,
|
|
681
|
+
className: cn(
|
|
682
|
+
"border-b transition-colors hover:bg-berget-table-row-hover data-[state=selected]:bg-berget-table-row-selected",
|
|
683
|
+
className
|
|
684
|
+
),
|
|
685
|
+
...props
|
|
686
|
+
}
|
|
687
|
+
)
|
|
688
|
+
);
|
|
689
|
+
TableRow2.displayName = "TableRow";
|
|
690
|
+
var TableHead2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
691
|
+
TableHead,
|
|
692
|
+
{
|
|
693
|
+
ref,
|
|
694
|
+
className: cn(
|
|
695
|
+
"h-12 px-4 text-left align-middle font-medium text-berget-table-head-text [&:has([role=checkbox])]:pr-0",
|
|
696
|
+
className
|
|
697
|
+
),
|
|
698
|
+
...props
|
|
699
|
+
}
|
|
700
|
+
));
|
|
701
|
+
TableHead2.displayName = "TableHead";
|
|
702
|
+
var TableCell2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
703
|
+
TableCell,
|
|
704
|
+
{
|
|
705
|
+
ref,
|
|
706
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
707
|
+
...props
|
|
708
|
+
}
|
|
709
|
+
));
|
|
710
|
+
TableCell2.displayName = "TableCell";
|
|
711
|
+
var TableCaption2 = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
712
|
+
TableCaption,
|
|
713
|
+
{
|
|
714
|
+
ref,
|
|
715
|
+
className: cn("mt-4 text-sm text-berget-table-caption-text", className),
|
|
716
|
+
...props
|
|
717
|
+
}
|
|
718
|
+
));
|
|
719
|
+
TableCaption2.displayName = "TableCaption";
|
|
720
|
+
|
|
721
|
+
// src/components/item/Item.tsx
|
|
722
|
+
import * as React14 from "react";
|
|
723
|
+
|
|
724
|
+
// src/primitives/item.tsx
|
|
725
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
726
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
727
|
+
|
|
728
|
+
// src/primitives/separator.tsx
|
|
729
|
+
import * as React13 from "react";
|
|
730
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
731
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
732
|
+
var Separator = React13.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
733
|
+
SeparatorPrimitive.Root,
|
|
734
|
+
{
|
|
735
|
+
ref,
|
|
736
|
+
decorative,
|
|
737
|
+
orientation,
|
|
738
|
+
className: cn(
|
|
739
|
+
"shrink-0 bg-border",
|
|
740
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
741
|
+
className
|
|
742
|
+
),
|
|
743
|
+
...props
|
|
744
|
+
}
|
|
745
|
+
));
|
|
746
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
747
|
+
|
|
748
|
+
// src/primitives/item.tsx
|
|
749
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
750
|
+
function ItemGroup({ className, ...props }) {
|
|
751
|
+
return /* @__PURE__ */ jsx15(
|
|
752
|
+
"div",
|
|
753
|
+
{
|
|
754
|
+
role: "list",
|
|
755
|
+
"data-slot": "item-group",
|
|
756
|
+
className: cn("group/item-group flex flex-col", className),
|
|
757
|
+
...props
|
|
758
|
+
}
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
function ItemSeparator({ className, ...props }) {
|
|
762
|
+
return /* @__PURE__ */ jsx15(
|
|
763
|
+
Separator,
|
|
764
|
+
{
|
|
765
|
+
"data-slot": "item-separator",
|
|
766
|
+
orientation: "horizontal",
|
|
767
|
+
className: cn("my-0", className),
|
|
768
|
+
...props
|
|
769
|
+
}
|
|
770
|
+
);
|
|
771
|
+
}
|
|
772
|
+
var itemVariants = cva7(
|
|
773
|
+
"group/item [a]:hover:bg-accent/50 focus-visible:border-ring focus-visible:ring-ring/50 [a]:transition-colors flex flex-wrap items-center rounded-md border border-transparent text-sm outline-none transition-colors duration-100 focus-visible:ring-[3px]",
|
|
774
|
+
{
|
|
775
|
+
variants: {
|
|
776
|
+
variant: {
|
|
777
|
+
default: "bg-transparent",
|
|
778
|
+
outline: "border-border",
|
|
779
|
+
muted: "bg-muted/50"
|
|
780
|
+
},
|
|
781
|
+
size: {
|
|
782
|
+
default: "gap-4 p-4 ",
|
|
783
|
+
sm: "gap-2.5 px-4 py-3"
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
defaultVariants: {
|
|
787
|
+
variant: "default",
|
|
788
|
+
size: "default"
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
);
|
|
792
|
+
function Item({
|
|
793
|
+
className,
|
|
794
|
+
variant = "default",
|
|
795
|
+
size = "default",
|
|
796
|
+
asChild = false,
|
|
797
|
+
...props
|
|
798
|
+
}) {
|
|
799
|
+
const Comp = asChild ? Slot2 : "div";
|
|
800
|
+
return /* @__PURE__ */ jsx15(
|
|
801
|
+
Comp,
|
|
802
|
+
{
|
|
803
|
+
"data-slot": "item",
|
|
804
|
+
"data-variant": variant,
|
|
805
|
+
"data-size": size,
|
|
806
|
+
className: cn(itemVariants({ variant, size, className })),
|
|
807
|
+
...props
|
|
808
|
+
}
|
|
809
|
+
);
|
|
810
|
+
}
|
|
811
|
+
var itemMediaVariants = cva7(
|
|
812
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none",
|
|
813
|
+
{
|
|
814
|
+
variants: {
|
|
815
|
+
variant: {
|
|
816
|
+
default: "bg-transparent",
|
|
817
|
+
icon: "bg-muted size-8 rounded-sm border [&_svg:not([class*='size-'])]:size-4",
|
|
818
|
+
image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
defaultVariants: {
|
|
822
|
+
variant: "default"
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
);
|
|
826
|
+
function ItemMedia({
|
|
827
|
+
className,
|
|
828
|
+
variant = "default",
|
|
829
|
+
...props
|
|
830
|
+
}) {
|
|
831
|
+
return /* @__PURE__ */ jsx15(
|
|
832
|
+
"div",
|
|
833
|
+
{
|
|
834
|
+
"data-slot": "item-media",
|
|
835
|
+
"data-variant": variant,
|
|
836
|
+
className: cn(itemMediaVariants({ variant, className })),
|
|
837
|
+
...props
|
|
838
|
+
}
|
|
839
|
+
);
|
|
840
|
+
}
|
|
841
|
+
function ItemContent({ className, ...props }) {
|
|
842
|
+
return /* @__PURE__ */ jsx15(
|
|
843
|
+
"div",
|
|
844
|
+
{
|
|
845
|
+
"data-slot": "item-content",
|
|
846
|
+
className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className),
|
|
847
|
+
...props
|
|
848
|
+
}
|
|
849
|
+
);
|
|
850
|
+
}
|
|
851
|
+
function ItemTitle({ className, ...props }) {
|
|
852
|
+
return /* @__PURE__ */ jsx15(
|
|
853
|
+
"div",
|
|
854
|
+
{
|
|
855
|
+
"data-slot": "item-title",
|
|
856
|
+
className: cn("flex w-fit items-center gap-2 text-sm font-medium leading-snug", className),
|
|
857
|
+
...props
|
|
858
|
+
}
|
|
859
|
+
);
|
|
860
|
+
}
|
|
861
|
+
function ItemDescription({ className, ...props }) {
|
|
862
|
+
return /* @__PURE__ */ jsx15(
|
|
863
|
+
"p",
|
|
864
|
+
{
|
|
865
|
+
"data-slot": "item-description",
|
|
866
|
+
className: cn(
|
|
867
|
+
"text-muted-foreground line-clamp-2 text-balance text-sm font-normal leading-normal",
|
|
868
|
+
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
869
|
+
className
|
|
870
|
+
),
|
|
871
|
+
...props
|
|
872
|
+
}
|
|
873
|
+
);
|
|
874
|
+
}
|
|
875
|
+
function ItemActions({ className, ...props }) {
|
|
876
|
+
return /* @__PURE__ */ jsx15("div", { "data-slot": "item-actions", className: cn("flex items-center gap-2", className), ...props });
|
|
877
|
+
}
|
|
878
|
+
function ItemHeader({ className, ...props }) {
|
|
879
|
+
return /* @__PURE__ */ jsx15(
|
|
880
|
+
"div",
|
|
881
|
+
{
|
|
882
|
+
"data-slot": "item-header",
|
|
883
|
+
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
884
|
+
...props
|
|
885
|
+
}
|
|
886
|
+
);
|
|
887
|
+
}
|
|
888
|
+
function ItemFooter({ className, ...props }) {
|
|
889
|
+
return /* @__PURE__ */ jsx15(
|
|
890
|
+
"div",
|
|
891
|
+
{
|
|
892
|
+
"data-slot": "item-footer",
|
|
893
|
+
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
894
|
+
...props
|
|
895
|
+
}
|
|
896
|
+
);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// src/components/item/Item.tsx
|
|
900
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
901
|
+
function Item2({ className, asChild, ...props }) {
|
|
902
|
+
return /* @__PURE__ */ jsx16(
|
|
903
|
+
Item,
|
|
904
|
+
{
|
|
905
|
+
asChild,
|
|
906
|
+
className: cn(
|
|
907
|
+
/* Variant colours — override primitive defaults */
|
|
908
|
+
"data-[variant=outline]:border-berget-item-outline-border",
|
|
909
|
+
"data-[variant=muted]:bg-berget-item-muted-bg",
|
|
910
|
+
"data-[variant=muted]:text-berget-item-muted-fg",
|
|
911
|
+
/* Hover / focus */
|
|
912
|
+
"[&_a]:hover:bg-berget-item-link-hover-surface",
|
|
913
|
+
"focus-visible:border-berget-item-focus-ring focus-visible:ring-berget-item-focus-ring/50",
|
|
914
|
+
className
|
|
915
|
+
),
|
|
916
|
+
...props
|
|
917
|
+
}
|
|
918
|
+
);
|
|
919
|
+
}
|
|
920
|
+
var ItemMedia2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
921
|
+
return /* @__PURE__ */ jsx16(
|
|
922
|
+
ItemMedia,
|
|
923
|
+
{
|
|
924
|
+
ref,
|
|
925
|
+
className: cn("data-[variant=icon]:bg-berget-item-media-icon-bg", className),
|
|
926
|
+
...props
|
|
927
|
+
}
|
|
928
|
+
);
|
|
929
|
+
});
|
|
930
|
+
ItemMedia2.displayName = "ItemMedia";
|
|
931
|
+
var ItemTitle2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
932
|
+
return /* @__PURE__ */ jsx16(
|
|
933
|
+
ItemTitle,
|
|
934
|
+
{
|
|
935
|
+
ref,
|
|
936
|
+
className: cn("text-berget-item-default-fg", className),
|
|
937
|
+
...props
|
|
938
|
+
}
|
|
939
|
+
);
|
|
940
|
+
});
|
|
941
|
+
ItemTitle2.displayName = "ItemTitle";
|
|
942
|
+
var ItemDescription2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
943
|
+
return /* @__PURE__ */ jsx16(
|
|
944
|
+
ItemDescription,
|
|
945
|
+
{
|
|
946
|
+
ref,
|
|
947
|
+
className: cn("text-berget-item-description-fg", className),
|
|
948
|
+
...props
|
|
949
|
+
}
|
|
950
|
+
);
|
|
951
|
+
});
|
|
952
|
+
ItemDescription2.displayName = "ItemDescription";
|
|
953
|
+
var ItemSeparator2 = React14.forwardRef(({ className, ...props }, ref) => {
|
|
954
|
+
return /* @__PURE__ */ jsx16(
|
|
955
|
+
ItemSeparator,
|
|
956
|
+
{
|
|
957
|
+
ref,
|
|
958
|
+
className: cn("bg-berget-item-separator", className),
|
|
959
|
+
...props
|
|
960
|
+
}
|
|
961
|
+
);
|
|
962
|
+
});
|
|
963
|
+
ItemSeparator2.displayName = "ItemSeparator";
|
|
964
|
+
|
|
965
|
+
// src/components/input/Input.tsx
|
|
966
|
+
import * as React16 from "react";
|
|
967
|
+
|
|
968
|
+
// src/primitives/input.tsx
|
|
969
|
+
import * as React15 from "react";
|
|
970
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
971
|
+
var Input = React15.forwardRef(
|
|
596
972
|
({ className, type, ...props }, ref) => {
|
|
597
|
-
return /* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ jsx17(
|
|
598
974
|
"input",
|
|
599
975
|
{
|
|
600
976
|
type,
|
|
@@ -611,14 +987,14 @@ var Input = React11.forwardRef(
|
|
|
611
987
|
Input.displayName = "Input";
|
|
612
988
|
|
|
613
989
|
// src/components/input/Input.tsx
|
|
614
|
-
import { jsx as
|
|
615
|
-
var Input2 =
|
|
990
|
+
import { jsx as jsx18, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
991
|
+
var Input2 = React16.forwardRef(
|
|
616
992
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
617
|
-
const generatedId =
|
|
993
|
+
const generatedId = React16.useId();
|
|
618
994
|
const inputId = id || generatedId;
|
|
619
995
|
const errorId = `${inputId}-error`;
|
|
620
996
|
const descriptionId = `${inputId}-description`;
|
|
621
|
-
const inputElement = /* @__PURE__ */
|
|
997
|
+
const inputElement = /* @__PURE__ */ jsx18(
|
|
622
998
|
Input,
|
|
623
999
|
{
|
|
624
1000
|
ref,
|
|
@@ -639,7 +1015,7 @@ var Input2 = React12.forwardRef(
|
|
|
639
1015
|
);
|
|
640
1016
|
if (!icon && !actionButton) {
|
|
641
1017
|
return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
|
|
642
|
-
label && /* @__PURE__ */
|
|
1018
|
+
label && /* @__PURE__ */ jsx18(
|
|
643
1019
|
"label",
|
|
644
1020
|
{
|
|
645
1021
|
htmlFor: inputId,
|
|
@@ -653,8 +1029,8 @@ var Input2 = React12.forwardRef(
|
|
|
653
1029
|
),
|
|
654
1030
|
inputElement,
|
|
655
1031
|
(description || error) && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
656
|
-
description && /* @__PURE__ */
|
|
657
|
-
error && /* @__PURE__ */
|
|
1032
|
+
description && /* @__PURE__ */ jsx18(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1033
|
+
error && /* @__PURE__ */ jsx18(
|
|
658
1034
|
Typography,
|
|
659
1035
|
{
|
|
660
1036
|
variant: "xs",
|
|
@@ -667,7 +1043,7 @@ var Input2 = React12.forwardRef(
|
|
|
667
1043
|
] });
|
|
668
1044
|
}
|
|
669
1045
|
return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
|
|
670
|
-
label && /* @__PURE__ */
|
|
1046
|
+
label && /* @__PURE__ */ jsx18(
|
|
671
1047
|
"label",
|
|
672
1048
|
{
|
|
673
1049
|
htmlFor: inputId,
|
|
@@ -680,13 +1056,13 @@ var Input2 = React12.forwardRef(
|
|
|
680
1056
|
}
|
|
681
1057
|
),
|
|
682
1058
|
/* @__PURE__ */ jsxs4("div", { className: "relative w-full", children: [
|
|
683
|
-
icon && /* @__PURE__ */
|
|
1059
|
+
icon && /* @__PURE__ */ jsx18("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
684
1060
|
inputElement,
|
|
685
|
-
actionButton && /* @__PURE__ */
|
|
1061
|
+
actionButton && /* @__PURE__ */ jsx18("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
686
1062
|
] }),
|
|
687
1063
|
(description || error) && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
688
|
-
description && /* @__PURE__ */
|
|
689
|
-
error && /* @__PURE__ */
|
|
1064
|
+
description && /* @__PURE__ */ jsx18(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1065
|
+
error && /* @__PURE__ */ jsx18(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
690
1066
|
] })
|
|
691
1067
|
] });
|
|
692
1068
|
}
|
|
@@ -694,17 +1070,17 @@ var Input2 = React12.forwardRef(
|
|
|
694
1070
|
Input2.displayName = "Input";
|
|
695
1071
|
|
|
696
1072
|
// src/components/checkbox/Checkbox.tsx
|
|
697
|
-
import * as
|
|
1073
|
+
import * as React18 from "react";
|
|
698
1074
|
import * as CheckboxPrimitive2 from "@radix-ui/react-checkbox";
|
|
699
1075
|
import { Check as Check2 } from "lucide-react";
|
|
700
|
-
import { cva as
|
|
1076
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
701
1077
|
|
|
702
1078
|
// src/primitives/checkbox.tsx
|
|
703
|
-
import * as
|
|
1079
|
+
import * as React17 from "react";
|
|
704
1080
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
705
1081
|
import { Check } from "lucide-react";
|
|
706
|
-
import { jsx as
|
|
707
|
-
var Checkbox =
|
|
1082
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1083
|
+
var Checkbox = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
708
1084
|
CheckboxPrimitive.Root,
|
|
709
1085
|
{
|
|
710
1086
|
ref,
|
|
@@ -713,24 +1089,24 @@ var Checkbox = React13.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
713
1089
|
className
|
|
714
1090
|
),
|
|
715
1091
|
...props,
|
|
716
|
-
children: children ?? /* @__PURE__ */
|
|
1092
|
+
children: children ?? /* @__PURE__ */ jsx19(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center"), children: /* @__PURE__ */ jsx19(Check, { className: "h-4 w-4" }) })
|
|
717
1093
|
}
|
|
718
1094
|
));
|
|
719
1095
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
720
|
-
var CheckboxIndicator =
|
|
1096
|
+
var CheckboxIndicator = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
721
1097
|
CheckboxPrimitive.Indicator,
|
|
722
1098
|
{
|
|
723
1099
|
ref,
|
|
724
1100
|
className: cn("grid place-content-center", className),
|
|
725
1101
|
...props,
|
|
726
|
-
children: children ?? /* @__PURE__ */
|
|
1102
|
+
children: children ?? /* @__PURE__ */ jsx19(Check, { className: "h-4 w-4" })
|
|
727
1103
|
}
|
|
728
1104
|
));
|
|
729
1105
|
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
730
1106
|
|
|
731
1107
|
// src/components/checkbox/Checkbox.tsx
|
|
732
|
-
import { jsx as
|
|
733
|
-
var checkboxVariants =
|
|
1108
|
+
import { jsx as jsx20, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1109
|
+
var checkboxVariants = cva8(
|
|
734
1110
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
735
1111
|
{
|
|
736
1112
|
variants: {
|
|
@@ -751,13 +1127,13 @@ var checkboxVariants = cva7(
|
|
|
751
1127
|
}
|
|
752
1128
|
}
|
|
753
1129
|
);
|
|
754
|
-
var Checkbox2 =
|
|
1130
|
+
var Checkbox2 = React18.forwardRef(
|
|
755
1131
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
756
|
-
const generatedId =
|
|
1132
|
+
const generatedId = React18.useId();
|
|
757
1133
|
const checkboxId = id || generatedId;
|
|
758
1134
|
const errorId = `${checkboxId}-error`;
|
|
759
1135
|
return /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-3", children: [
|
|
760
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ jsx20("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ jsx20(
|
|
761
1137
|
Checkbox,
|
|
762
1138
|
{
|
|
763
1139
|
ref,
|
|
@@ -772,7 +1148,7 @@ var Checkbox2 = React14.forwardRef(
|
|
|
772
1148
|
className
|
|
773
1149
|
),
|
|
774
1150
|
...props,
|
|
775
|
-
children: /* @__PURE__ */
|
|
1151
|
+
children: /* @__PURE__ */ jsx20(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ jsx20(
|
|
776
1152
|
Check2,
|
|
777
1153
|
{
|
|
778
1154
|
className: "h-4 w-4 text-current stroke-current",
|
|
@@ -782,7 +1158,7 @@ var Checkbox2 = React14.forwardRef(
|
|
|
782
1158
|
}
|
|
783
1159
|
) }),
|
|
784
1160
|
(label || description || error) && /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-1", children: [
|
|
785
|
-
label && /* @__PURE__ */
|
|
1161
|
+
label && /* @__PURE__ */ jsx20(
|
|
786
1162
|
"label",
|
|
787
1163
|
{
|
|
788
1164
|
htmlFor: checkboxId,
|
|
@@ -794,8 +1170,8 @@ var Checkbox2 = React14.forwardRef(
|
|
|
794
1170
|
children: label
|
|
795
1171
|
}
|
|
796
1172
|
),
|
|
797
|
-
description && /* @__PURE__ */
|
|
798
|
-
error && /* @__PURE__ */
|
|
1173
|
+
description && /* @__PURE__ */ jsx20(Typography, { variant: "xs", color: "muted", children: description }),
|
|
1174
|
+
error && /* @__PURE__ */ jsx20(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
799
1175
|
] })
|
|
800
1176
|
] });
|
|
801
1177
|
}
|
|
@@ -803,11 +1179,11 @@ var Checkbox2 = React14.forwardRef(
|
|
|
803
1179
|
Checkbox2.displayName = "Checkbox";
|
|
804
1180
|
|
|
805
1181
|
// src/components/switch/Switch.tsx
|
|
806
|
-
import * as
|
|
1182
|
+
import * as React19 from "react";
|
|
807
1183
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
808
|
-
import { cva as
|
|
809
|
-
import { jsx as
|
|
810
|
-
var switchRootVariants =
|
|
1184
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
1185
|
+
import { jsx as jsx21, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1186
|
+
var switchRootVariants = cva9(
|
|
811
1187
|
"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",
|
|
812
1188
|
{
|
|
813
1189
|
variants: {
|
|
@@ -828,7 +1204,7 @@ var switchRootVariants = cva8(
|
|
|
828
1204
|
}
|
|
829
1205
|
}
|
|
830
1206
|
);
|
|
831
|
-
var switchThumbVariants =
|
|
1207
|
+
var switchThumbVariants = cva9(
|
|
832
1208
|
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
833
1209
|
{
|
|
834
1210
|
variants: {
|
|
@@ -843,13 +1219,13 @@ var switchThumbVariants = cva8(
|
|
|
843
1219
|
}
|
|
844
1220
|
}
|
|
845
1221
|
);
|
|
846
|
-
var Switch =
|
|
1222
|
+
var Switch = React19.forwardRef(
|
|
847
1223
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
848
|
-
const generatedId =
|
|
1224
|
+
const generatedId = React19.useId();
|
|
849
1225
|
const switchId = id || generatedId;
|
|
850
1226
|
const errorId = `${switchId}-error`;
|
|
851
1227
|
return /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-3", children: [
|
|
852
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ jsx21(
|
|
853
1229
|
SwitchPrimitives.Root,
|
|
854
1230
|
{
|
|
855
1231
|
ref,
|
|
@@ -863,11 +1239,11 @@ var Switch = React15.forwardRef(
|
|
|
863
1239
|
className
|
|
864
1240
|
),
|
|
865
1241
|
...props,
|
|
866
|
-
children: /* @__PURE__ */
|
|
1242
|
+
children: /* @__PURE__ */ jsx21(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
867
1243
|
}
|
|
868
1244
|
),
|
|
869
1245
|
(label || description || error) && /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1", children: [
|
|
870
|
-
label && /* @__PURE__ */
|
|
1246
|
+
label && /* @__PURE__ */ jsx21(
|
|
871
1247
|
"label",
|
|
872
1248
|
{
|
|
873
1249
|
htmlFor: switchId,
|
|
@@ -878,8 +1254,8 @@ var Switch = React15.forwardRef(
|
|
|
878
1254
|
children: label
|
|
879
1255
|
}
|
|
880
1256
|
),
|
|
881
|
-
description && /* @__PURE__ */
|
|
882
|
-
error && /* @__PURE__ */
|
|
1257
|
+
description && /* @__PURE__ */ jsx21(Typography, { variant: "xs", color: "muted", children: description }),
|
|
1258
|
+
error && /* @__PURE__ */ jsx21(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
883
1259
|
] })
|
|
884
1260
|
] });
|
|
885
1261
|
}
|
|
@@ -887,17 +1263,17 @@ var Switch = React15.forwardRef(
|
|
|
887
1263
|
Switch.displayName = "Switch";
|
|
888
1264
|
|
|
889
1265
|
// src/components/select/Select.tsx
|
|
890
|
-
import * as
|
|
891
|
-
import { cva as
|
|
1266
|
+
import * as React21 from "react";
|
|
1267
|
+
import { cva as cva10 } from "class-variance-authority";
|
|
892
1268
|
|
|
893
1269
|
// src/primitives/select.tsx
|
|
894
|
-
import * as
|
|
1270
|
+
import * as React20 from "react";
|
|
895
1271
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
896
1272
|
import { Check as Check3, ChevronDown, ChevronUp } from "lucide-react";
|
|
897
|
-
import { jsx as
|
|
1273
|
+
import { jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
898
1274
|
var Select = SelectPrimitive.Root;
|
|
899
1275
|
var SelectValue = SelectPrimitive.Value;
|
|
900
|
-
var SelectTrigger =
|
|
1276
|
+
var SelectTrigger = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
901
1277
|
SelectPrimitive.Trigger,
|
|
902
1278
|
{
|
|
903
1279
|
ref,
|
|
@@ -908,199 +1284,669 @@ var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref)
|
|
|
908
1284
|
...props,
|
|
909
1285
|
children: [
|
|
910
1286
|
children,
|
|
911
|
-
/* @__PURE__ */
|
|
1287
|
+
/* @__PURE__ */ jsx22(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx22(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
1288
|
+
]
|
|
1289
|
+
}
|
|
1290
|
+
));
|
|
1291
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1292
|
+
var SelectScrollUpButton = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1293
|
+
SelectPrimitive.ScrollUpButton,
|
|
1294
|
+
{
|
|
1295
|
+
ref,
|
|
1296
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1297
|
+
...props,
|
|
1298
|
+
children: /* @__PURE__ */ jsx22(ChevronUp, { className: "h-4 w-4" })
|
|
1299
|
+
}
|
|
1300
|
+
));
|
|
1301
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1302
|
+
var SelectScrollDownButton = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1303
|
+
SelectPrimitive.ScrollDownButton,
|
|
1304
|
+
{
|
|
1305
|
+
ref,
|
|
1306
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1307
|
+
...props,
|
|
1308
|
+
children: /* @__PURE__ */ jsx22(ChevronDown, { className: "h-4 w-4" })
|
|
1309
|
+
}
|
|
1310
|
+
));
|
|
1311
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1312
|
+
var SelectContent = React20.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx22(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
|
|
1313
|
+
SelectPrimitive.Content,
|
|
1314
|
+
{
|
|
1315
|
+
ref,
|
|
1316
|
+
className: cn(
|
|
1317
|
+
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-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-select-content-transform-origin]",
|
|
1318
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1319
|
+
className
|
|
1320
|
+
),
|
|
1321
|
+
position,
|
|
1322
|
+
...props,
|
|
1323
|
+
children: [
|
|
1324
|
+
/* @__PURE__ */ jsx22(SelectScrollUpButton, {}),
|
|
1325
|
+
/* @__PURE__ */ jsx22(
|
|
1326
|
+
SelectPrimitive.Viewport,
|
|
1327
|
+
{
|
|
1328
|
+
className: cn(
|
|
1329
|
+
"p-1",
|
|
1330
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
1331
|
+
),
|
|
1332
|
+
children
|
|
1333
|
+
}
|
|
1334
|
+
),
|
|
1335
|
+
/* @__PURE__ */ jsx22(SelectScrollDownButton, {})
|
|
1336
|
+
]
|
|
1337
|
+
}
|
|
1338
|
+
) }));
|
|
1339
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1340
|
+
var SelectLabel = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1341
|
+
SelectPrimitive.Label,
|
|
1342
|
+
{
|
|
1343
|
+
ref,
|
|
1344
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm ", className),
|
|
1345
|
+
...props
|
|
1346
|
+
}
|
|
1347
|
+
));
|
|
1348
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1349
|
+
var SelectItem = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
1350
|
+
SelectPrimitive.Item,
|
|
1351
|
+
{
|
|
1352
|
+
ref,
|
|
1353
|
+
className: cn(
|
|
1354
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1355
|
+
className
|
|
1356
|
+
),
|
|
1357
|
+
...props,
|
|
1358
|
+
children: [
|
|
1359
|
+
/* @__PURE__ */ jsx22("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx22(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx22(Check3, { className: "h-4 w-4" }) }) }),
|
|
1360
|
+
/* @__PURE__ */ jsx22(SelectPrimitive.ItemText, { children })
|
|
912
1361
|
]
|
|
913
1362
|
}
|
|
914
|
-
));
|
|
915
|
-
|
|
916
|
-
var
|
|
917
|
-
SelectPrimitive.
|
|
1363
|
+
));
|
|
1364
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1365
|
+
var SelectSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1366
|
+
SelectPrimitive.Separator,
|
|
1367
|
+
{
|
|
1368
|
+
ref,
|
|
1369
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1370
|
+
...props
|
|
1371
|
+
}
|
|
1372
|
+
));
|
|
1373
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1374
|
+
|
|
1375
|
+
// src/components/select/Select.tsx
|
|
1376
|
+
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1377
|
+
var selectVariants = cva10(
|
|
1378
|
+
"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",
|
|
1379
|
+
{
|
|
1380
|
+
variants: {
|
|
1381
|
+
variant: {
|
|
1382
|
+
default: "border-berget-border-interactive hover:bg-berget-surface-hover",
|
|
1383
|
+
primary: "border-berget-primary-border bg-berget-primary-tint hover:bg-berget-surface-hover",
|
|
1384
|
+
subtle: "border-berget-border-subtle hover:bg-berget-surface-hover",
|
|
1385
|
+
muted: "border-berget-border-subtle/50 hover:bg-berget-surface-hover"
|
|
1386
|
+
},
|
|
1387
|
+
size: {
|
|
1388
|
+
sm: "px-3 py-2 text-xs",
|
|
1389
|
+
default: "px-4 py-3 text-sm",
|
|
1390
|
+
lg: "px-5 py-4 text-base"
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
defaultVariants: {
|
|
1394
|
+
variant: "default",
|
|
1395
|
+
size: "default"
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
);
|
|
1399
|
+
var Select2 = React21.forwardRef(
|
|
1400
|
+
({
|
|
1401
|
+
className,
|
|
1402
|
+
variant,
|
|
1403
|
+
size,
|
|
1404
|
+
label,
|
|
1405
|
+
description,
|
|
1406
|
+
error,
|
|
1407
|
+
placeholder,
|
|
1408
|
+
options,
|
|
1409
|
+
id,
|
|
1410
|
+
disabled,
|
|
1411
|
+
value,
|
|
1412
|
+
defaultValue,
|
|
1413
|
+
onValueChange,
|
|
1414
|
+
name,
|
|
1415
|
+
required
|
|
1416
|
+
}, ref) => {
|
|
1417
|
+
const generatedId = React21.useId();
|
|
1418
|
+
const selectId = id || generatedId;
|
|
1419
|
+
const errorId = `${selectId}-error`;
|
|
1420
|
+
const descriptionId = `${selectId}-description`;
|
|
1421
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-2", children: [
|
|
1422
|
+
label && /* @__PURE__ */ jsx23(
|
|
1423
|
+
"label",
|
|
1424
|
+
{
|
|
1425
|
+
htmlFor: selectId,
|
|
1426
|
+
className: cn(
|
|
1427
|
+
"text-sm font-sans leading-none",
|
|
1428
|
+
disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground",
|
|
1429
|
+
error && "text-berget-destructive-foreground"
|
|
1430
|
+
),
|
|
1431
|
+
children: label
|
|
1432
|
+
}
|
|
1433
|
+
),
|
|
1434
|
+
/* @__PURE__ */ jsxs8(
|
|
1435
|
+
Select,
|
|
1436
|
+
{
|
|
1437
|
+
value,
|
|
1438
|
+
defaultValue,
|
|
1439
|
+
onValueChange,
|
|
1440
|
+
disabled,
|
|
1441
|
+
name,
|
|
1442
|
+
required,
|
|
1443
|
+
children: [
|
|
1444
|
+
/* @__PURE__ */ jsx23(
|
|
1445
|
+
SelectTrigger,
|
|
1446
|
+
{
|
|
1447
|
+
ref,
|
|
1448
|
+
id: selectId,
|
|
1449
|
+
"aria-invalid": !!error,
|
|
1450
|
+
"aria-describedby": cn(error && errorId, description && descriptionId),
|
|
1451
|
+
className: cn(
|
|
1452
|
+
selectVariants({ variant, size }),
|
|
1453
|
+
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1454
|
+
className
|
|
1455
|
+
),
|
|
1456
|
+
children: /* @__PURE__ */ jsx23(SelectValue, { placeholder })
|
|
1457
|
+
}
|
|
1458
|
+
),
|
|
1459
|
+
/* @__PURE__ */ jsx23(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx23(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1460
|
+
]
|
|
1461
|
+
}
|
|
1462
|
+
),
|
|
1463
|
+
description && /* @__PURE__ */ jsx23(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1464
|
+
error && /* @__PURE__ */ jsx23(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1465
|
+
] });
|
|
1466
|
+
}
|
|
1467
|
+
);
|
|
1468
|
+
Select2.displayName = "Select";
|
|
1469
|
+
|
|
1470
|
+
// src/components/country-select/CountrySelect.tsx
|
|
1471
|
+
import * as React26 from "react";
|
|
1472
|
+
import { ChevronDown as ChevronDown2, Globe } from "lucide-react";
|
|
1473
|
+
|
|
1474
|
+
// src/components/icon/Icon.tsx
|
|
1475
|
+
import * as React22 from "react";
|
|
1476
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1477
|
+
var iconStrokeMap = {
|
|
1478
|
+
16: 1.4,
|
|
1479
|
+
24: 1.6,
|
|
1480
|
+
32: 1.8
|
|
1481
|
+
};
|
|
1482
|
+
var Icon2 = React22.forwardRef(
|
|
1483
|
+
({
|
|
1484
|
+
icon: IconComponent,
|
|
1485
|
+
size,
|
|
1486
|
+
className,
|
|
1487
|
+
"aria-label": ariaLabel,
|
|
1488
|
+
"aria-hidden": ariaHidden = true,
|
|
1489
|
+
...props
|
|
1490
|
+
}, ref) => {
|
|
1491
|
+
const strokeWidth = iconStrokeMap[size];
|
|
1492
|
+
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
1493
|
+
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
1494
|
+
return /* @__PURE__ */ jsx24(
|
|
1495
|
+
IconComponent,
|
|
1496
|
+
{
|
|
1497
|
+
ref,
|
|
1498
|
+
className: cn(sizeClass, className),
|
|
1499
|
+
strokeWidth,
|
|
1500
|
+
...ariaAttributes,
|
|
1501
|
+
...props
|
|
1502
|
+
}
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
);
|
|
1506
|
+
Icon2.displayName = "Icon";
|
|
1507
|
+
|
|
1508
|
+
// src/primitives/popover.tsx
|
|
1509
|
+
import * as React23 from "react";
|
|
1510
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1511
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1512
|
+
var Popover = PopoverPrimitive.Root;
|
|
1513
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1514
|
+
var PopoverContent = React23.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx25(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx25(
|
|
1515
|
+
PopoverPrimitive.Content,
|
|
1516
|
+
{
|
|
1517
|
+
ref,
|
|
1518
|
+
align,
|
|
1519
|
+
sideOffset,
|
|
1520
|
+
className: cn(
|
|
1521
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-popover-content-transform-origin]",
|
|
1522
|
+
className
|
|
1523
|
+
),
|
|
1524
|
+
...props
|
|
1525
|
+
}
|
|
1526
|
+
) }));
|
|
1527
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1528
|
+
|
|
1529
|
+
// src/primitives/command.tsx
|
|
1530
|
+
import * as React25 from "react";
|
|
1531
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
1532
|
+
import { Search } from "lucide-react";
|
|
1533
|
+
|
|
1534
|
+
// src/primitives/dialog.tsx
|
|
1535
|
+
import * as React24 from "react";
|
|
1536
|
+
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
1537
|
+
import { X as X2 } from "lucide-react";
|
|
1538
|
+
import { jsx as jsx26, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1539
|
+
var DialogPortal2 = DialogPrimitive2.Portal;
|
|
1540
|
+
var DialogOverlay2 = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1541
|
+
DialogPrimitive2.Overlay,
|
|
1542
|
+
{
|
|
1543
|
+
ref,
|
|
1544
|
+
className: cn(
|
|
1545
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1546
|
+
className
|
|
1547
|
+
),
|
|
1548
|
+
...props
|
|
1549
|
+
}
|
|
1550
|
+
));
|
|
1551
|
+
DialogOverlay2.displayName = DialogPrimitive2.Overlay.displayName;
|
|
1552
|
+
var DialogContent2 = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs9(DialogPortal2, { children: [
|
|
1553
|
+
/* @__PURE__ */ jsx26(DialogOverlay2, {}),
|
|
1554
|
+
/* @__PURE__ */ jsxs9(
|
|
1555
|
+
DialogPrimitive2.Content,
|
|
1556
|
+
{
|
|
1557
|
+
ref,
|
|
1558
|
+
className: cn(
|
|
1559
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-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%] sm:rounded-lg",
|
|
1560
|
+
className
|
|
1561
|
+
),
|
|
1562
|
+
...props,
|
|
1563
|
+
children: [
|
|
1564
|
+
children,
|
|
1565
|
+
/* @__PURE__ */ jsxs9(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: [
|
|
1566
|
+
/* @__PURE__ */ jsx26(X2, { className: "h-4 w-4" }),
|
|
1567
|
+
/* @__PURE__ */ jsx26("span", { className: "sr-only", children: "Close" })
|
|
1568
|
+
] })
|
|
1569
|
+
]
|
|
1570
|
+
}
|
|
1571
|
+
)
|
|
1572
|
+
] }));
|
|
1573
|
+
DialogContent2.displayName = DialogPrimitive2.Content.displayName;
|
|
1574
|
+
var DialogHeader2 = ({ className, ...props }) => /* @__PURE__ */ jsx26("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
1575
|
+
DialogHeader2.displayName = "DialogHeader";
|
|
1576
|
+
var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */ jsx26(
|
|
1577
|
+
"div",
|
|
1578
|
+
{
|
|
1579
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
1580
|
+
...props
|
|
1581
|
+
}
|
|
1582
|
+
);
|
|
1583
|
+
DialogFooter2.displayName = "DialogFooter";
|
|
1584
|
+
var DialogTitle2 = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1585
|
+
DialogPrimitive2.Title,
|
|
918
1586
|
{
|
|
919
1587
|
ref,
|
|
920
|
-
className: cn("
|
|
921
|
-
...props
|
|
922
|
-
children: /* @__PURE__ */ jsx17(ChevronUp, { className: "h-4 w-4" })
|
|
1588
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
1589
|
+
...props
|
|
923
1590
|
}
|
|
924
1591
|
));
|
|
925
|
-
|
|
926
|
-
var
|
|
927
|
-
|
|
1592
|
+
DialogTitle2.displayName = DialogPrimitive2.Title.displayName;
|
|
1593
|
+
var DialogDescription2 = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
|
|
1594
|
+
DialogPrimitive2.Description,
|
|
928
1595
|
{
|
|
929
1596
|
ref,
|
|
930
|
-
className: cn("
|
|
931
|
-
...props
|
|
932
|
-
children: /* @__PURE__ */ jsx17(ChevronDown, { className: "h-4 w-4" })
|
|
1597
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1598
|
+
...props
|
|
933
1599
|
}
|
|
934
1600
|
));
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
1601
|
+
DialogDescription2.displayName = DialogPrimitive2.Description.displayName;
|
|
1602
|
+
|
|
1603
|
+
// src/primitives/command.tsx
|
|
1604
|
+
import { jsx as jsx27, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1605
|
+
var Command = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1606
|
+
CommandPrimitive,
|
|
938
1607
|
{
|
|
939
1608
|
ref,
|
|
940
1609
|
className: cn(
|
|
941
|
-
"
|
|
942
|
-
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
1610
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
943
1611
|
className
|
|
944
1612
|
),
|
|
945
|
-
|
|
946
|
-
...props,
|
|
947
|
-
children: [
|
|
948
|
-
/* @__PURE__ */ jsx17(SelectScrollUpButton, {}),
|
|
949
|
-
/* @__PURE__ */ jsx17(
|
|
950
|
-
SelectPrimitive.Viewport,
|
|
951
|
-
{
|
|
952
|
-
className: cn(
|
|
953
|
-
"p-1",
|
|
954
|
-
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
955
|
-
),
|
|
956
|
-
children
|
|
957
|
-
}
|
|
958
|
-
),
|
|
959
|
-
/* @__PURE__ */ jsx17(SelectScrollDownButton, {})
|
|
960
|
-
]
|
|
1613
|
+
...props
|
|
961
1614
|
}
|
|
962
|
-
)
|
|
963
|
-
|
|
964
|
-
var
|
|
965
|
-
|
|
1615
|
+
));
|
|
1616
|
+
Command.displayName = CommandPrimitive.displayName;
|
|
1617
|
+
var CommandInput = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs10("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1618
|
+
/* @__PURE__ */ jsx27(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1619
|
+
/* @__PURE__ */ jsx27(
|
|
1620
|
+
CommandPrimitive.Input,
|
|
1621
|
+
{
|
|
1622
|
+
ref,
|
|
1623
|
+
className: cn(
|
|
1624
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
1625
|
+
className
|
|
1626
|
+
),
|
|
1627
|
+
...props
|
|
1628
|
+
}
|
|
1629
|
+
)
|
|
1630
|
+
] }));
|
|
1631
|
+
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
1632
|
+
var CommandList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1633
|
+
CommandPrimitive.List,
|
|
966
1634
|
{
|
|
967
1635
|
ref,
|
|
968
|
-
className: cn("
|
|
1636
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
969
1637
|
...props
|
|
970
1638
|
}
|
|
971
1639
|
));
|
|
972
|
-
|
|
973
|
-
var
|
|
974
|
-
|
|
1640
|
+
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
1641
|
+
var CommandEmpty = React25.forwardRef((props, ref) => /* @__PURE__ */ jsx27(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
1642
|
+
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
1643
|
+
var CommandGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1644
|
+
CommandPrimitive.Group,
|
|
975
1645
|
{
|
|
976
1646
|
ref,
|
|
977
1647
|
className: cn(
|
|
978
|
-
"
|
|
1648
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
979
1649
|
className
|
|
980
1650
|
),
|
|
981
|
-
...props
|
|
982
|
-
children: [
|
|
983
|
-
/* @__PURE__ */ jsx17("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx17(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx17(Check3, { className: "h-4 w-4" }) }) }),
|
|
984
|
-
/* @__PURE__ */ jsx17(SelectPrimitive.ItemText, { children })
|
|
985
|
-
]
|
|
1651
|
+
...props
|
|
986
1652
|
}
|
|
987
1653
|
));
|
|
988
|
-
|
|
989
|
-
var
|
|
990
|
-
|
|
1654
|
+
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
1655
|
+
var CommandSeparator = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1656
|
+
CommandPrimitive.Separator,
|
|
991
1657
|
{
|
|
992
1658
|
ref,
|
|
993
|
-
className: cn("-mx-1
|
|
1659
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
994
1660
|
...props
|
|
995
1661
|
}
|
|
996
1662
|
));
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1001
|
-
var selectVariants = cva9(
|
|
1002
|
-
"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",
|
|
1663
|
+
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
1664
|
+
var CommandItem = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
1665
|
+
CommandPrimitive.Item,
|
|
1003
1666
|
{
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
},
|
|
1011
|
-
size: {
|
|
1012
|
-
sm: "px-3 py-2 text-xs",
|
|
1013
|
-
default: "px-4 py-3 text-sm",
|
|
1014
|
-
lg: "px-5 py-4 text-base"
|
|
1015
|
-
}
|
|
1016
|
-
},
|
|
1017
|
-
defaultVariants: {
|
|
1018
|
-
variant: "default",
|
|
1019
|
-
size: "default"
|
|
1020
|
-
}
|
|
1667
|
+
ref,
|
|
1668
|
+
className: cn(
|
|
1669
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1670
|
+
className
|
|
1671
|
+
),
|
|
1672
|
+
...props
|
|
1021
1673
|
}
|
|
1022
|
-
);
|
|
1023
|
-
|
|
1674
|
+
));
|
|
1675
|
+
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
1676
|
+
var CommandShortcut = ({ className, ...props }) => {
|
|
1677
|
+
return /* @__PURE__ */ jsx27(
|
|
1678
|
+
"span",
|
|
1679
|
+
{
|
|
1680
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
1681
|
+
...props
|
|
1682
|
+
}
|
|
1683
|
+
);
|
|
1684
|
+
};
|
|
1685
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
1686
|
+
|
|
1687
|
+
// src/components/country-select/countries.ts
|
|
1688
|
+
var COUNTRIES = [
|
|
1689
|
+
{ code: "DZ", name: "Algeria", flag: "\u{1F1E9}\u{1F1FF}" },
|
|
1690
|
+
{ code: "AR", name: "Argentina", flag: "\u{1F1E6}\u{1F1F7}" },
|
|
1691
|
+
{ code: "AU", name: "Australia", flag: "\u{1F1E6}\u{1F1FA}" },
|
|
1692
|
+
{ code: "AT", name: "Austria", flag: "\u{1F1E6}\u{1F1F9}" },
|
|
1693
|
+
{ code: "BE", name: "Belgium", flag: "\u{1F1E7}\u{1F1EA}" },
|
|
1694
|
+
{ code: "BG", name: "Bulgaria", flag: "\u{1F1E7}\u{1F1EC}" },
|
|
1695
|
+
{ code: "BO", name: "Bolivia", flag: "\u{1F1E7}\u{1F1F4}" },
|
|
1696
|
+
{ code: "BR", name: "Brazil", flag: "\u{1F1E7}\u{1F1F7}" },
|
|
1697
|
+
{ code: "CA", name: "Canada", flag: "\u{1F1E8}\u{1F1E6}" },
|
|
1698
|
+
{ code: "CL", name: "Chile", flag: "\u{1F1E8}\u{1F1F1}" },
|
|
1699
|
+
{ code: "CN", name: "China", flag: "\u{1F1E8}\u{1F1F3}" },
|
|
1700
|
+
{ code: "CO", name: "Colombia", flag: "\u{1F1E8}\u{1F1F4}" },
|
|
1701
|
+
{ code: "CR", name: "Costa Rica", flag: "\u{1F1E8}\u{1F1F7}" },
|
|
1702
|
+
{ code: "CY", name: "Cyprus", flag: "\u{1F1E8}\u{1F1FE}" },
|
|
1703
|
+
{ code: "HR", name: "Croatia", flag: "\u{1F1ED}\u{1F1F7}" },
|
|
1704
|
+
{ code: "CZ", name: "Czech Republic", flag: "\u{1F1E8}\u{1F1FF}" },
|
|
1705
|
+
{ code: "DK", name: "Denmark", flag: "\u{1F1E9}\u{1F1F0}" },
|
|
1706
|
+
{ code: "DO", name: "Dominican Republic", flag: "\u{1F1E9}\u{1F1F4}" },
|
|
1707
|
+
{ code: "EC", name: "Ecuador", flag: "\u{1F1EA}\u{1F1E8}" },
|
|
1708
|
+
{ code: "EG", name: "Egypt", flag: "\u{1F1EA}\u{1F1EC}" },
|
|
1709
|
+
{ code: "EE", name: "Estonia", flag: "\u{1F1EA}\u{1F1EA}" },
|
|
1710
|
+
{ code: "ET", name: "Ethiopia", flag: "\u{1F1EA}\u{1F1F9}" },
|
|
1711
|
+
{ code: "FI", name: "Finland", flag: "\u{1F1EB}\u{1F1EE}" },
|
|
1712
|
+
{ code: "FR", name: "France", flag: "\u{1F1EB}\u{1F1F7}" },
|
|
1713
|
+
{ code: "DE", name: "Germany", flag: "\u{1F1E9}\u{1F1EA}" },
|
|
1714
|
+
{ code: "GR", name: "Greece", flag: "\u{1F1EC}\u{1F1F7}" },
|
|
1715
|
+
{ code: "GT", name: "Guatemala", flag: "\u{1F1EC}\u{1F1F9}" },
|
|
1716
|
+
{ code: "HN", name: "Honduras", flag: "\u{1F1ED}\u{1F1F3}" },
|
|
1717
|
+
{ code: "HK", name: "Hong Kong", flag: "\u{1F1ED}\u{1F1F0}" },
|
|
1718
|
+
{ code: "HU", name: "Hungary", flag: "\u{1F1ED}\u{1F1FA}" },
|
|
1719
|
+
{ code: "IN", name: "India", flag: "\u{1F1EE}\u{1F1F3}" },
|
|
1720
|
+
{ code: "ID", name: "Indonesia", flag: "\u{1F1EE}\u{1F1E9}" },
|
|
1721
|
+
{ code: "IE", name: "Ireland", flag: "\u{1F1EE}\u{1F1EA}" },
|
|
1722
|
+
{ code: "IL", name: "Israel", flag: "\u{1F1EE}\u{1F1F1}" },
|
|
1723
|
+
{ code: "IT", name: "Italy", flag: "\u{1F1EE}\u{1F1F9}" },
|
|
1724
|
+
{ code: "JP", name: "Japan", flag: "\u{1F1EF}\u{1F1F5}" },
|
|
1725
|
+
{ code: "KE", name: "Kenya", flag: "\u{1F1F0}\u{1F1EA}" },
|
|
1726
|
+
{ code: "LT", name: "Lithuania", flag: "\u{1F1F1}\u{1F1F9}" },
|
|
1727
|
+
{ code: "LV", name: "Latvia", flag: "\u{1F1F1}\u{1F1FB}" },
|
|
1728
|
+
{ code: "LU", name: "Luxembourg", flag: "\u{1F1F1}\u{1F1FA}" },
|
|
1729
|
+
{ code: "MA", name: "Morocco", flag: "\u{1F1F2}\u{1F1E6}" },
|
|
1730
|
+
{ code: "MT", name: "Malta", flag: "\u{1F1F2}\u{1F1F9}" },
|
|
1731
|
+
{ code: "MX", name: "Mexico", flag: "\u{1F1F2}\u{1F1FD}" },
|
|
1732
|
+
{ code: "MN", name: "Mongolia", flag: "\u{1F1F2}\u{1F1F3}" },
|
|
1733
|
+
{ code: "NL", name: "Netherlands", flag: "\u{1F1F3}\u{1F1F1}" },
|
|
1734
|
+
{ code: "NZ", name: "New Zealand", flag: "\u{1F1F3}\u{1F1FF}" },
|
|
1735
|
+
{ code: "NO", name: "Norway", flag: "\u{1F1F3}\u{1F1F4}" },
|
|
1736
|
+
{ code: "PK", name: "Pakistan", flag: "\u{1F1F5}\u{1F1F0}" },
|
|
1737
|
+
{ code: "PA", name: "Panama", flag: "\u{1F1F5}\u{1F1E6}" },
|
|
1738
|
+
{ code: "PE", name: "Peru", flag: "\u{1F1F5}\u{1F1EA}" },
|
|
1739
|
+
{ code: "PL", name: "Poland", flag: "\u{1F1F5}\u{1F1F1}" },
|
|
1740
|
+
{ code: "PT", name: "Portugal", flag: "\u{1F1F5}\u{1F1F9}" },
|
|
1741
|
+
{ code: "RO", name: "Romania", flag: "\u{1F1F7}\u{1F1F4}" },
|
|
1742
|
+
{ code: "SA", name: "Saudi Arabia", flag: "\u{1F1F8}\u{1F1E6}" },
|
|
1743
|
+
{ code: "SG", name: "Singapore", flag: "\u{1F1F8}\u{1F1EC}" },
|
|
1744
|
+
{ code: "SK", name: "Slovakia", flag: "\u{1F1F8}\u{1F1F0}" },
|
|
1745
|
+
{ code: "SI", name: "Slovenia", flag: "\u{1F1F8}\u{1F1EE}" },
|
|
1746
|
+
{ code: "ZA", name: "South Africa", flag: "\u{1F1FF}\u{1F1E6}" },
|
|
1747
|
+
{ code: "ES", name: "Spain", flag: "\u{1F1EA}\u{1F1F8}" },
|
|
1748
|
+
{ code: "SE", name: "Sweden", flag: "\u{1F1F8}\u{1F1EA}" },
|
|
1749
|
+
{ code: "CH", name: "Switzerland", flag: "\u{1F1E8}\u{1F1ED}" },
|
|
1750
|
+
{ code: "TW", name: "Taiwan", flag: "\u{1F1F9}\u{1F1FC}" },
|
|
1751
|
+
{ code: "TH", name: "Thailand", flag: "\u{1F1F9}\u{1F1ED}" },
|
|
1752
|
+
{ code: "TR", name: "Turkey", flag: "\u{1F1F9}\u{1F1F7}" },
|
|
1753
|
+
{ code: "AE", name: "United Arab Emirates", flag: "\u{1F1E6}\u{1F1EA}" },
|
|
1754
|
+
{ code: "GB", name: "United Kingdom", flag: "\u{1F1EC}\u{1F1E7}" },
|
|
1755
|
+
{ code: "UA", name: "Ukraine", flag: "\u{1F1FA}\u{1F1E6}" },
|
|
1756
|
+
{ code: "US", name: "United States", flag: "\u{1F1FA}\u{1F1F8}" },
|
|
1757
|
+
{ code: "UY", name: "Uruguay", flag: "\u{1F1FA}\u{1F1FE}" },
|
|
1758
|
+
{ code: "VE", name: "Venezuela", flag: "\u{1F1FB}\u{1F1EA}" },
|
|
1759
|
+
{ code: "VN", name: "Vietnam", flag: "\u{1F1FB}\u{1F1F3}" }
|
|
1760
|
+
];
|
|
1761
|
+
var getCountryByCode = (code) => {
|
|
1762
|
+
return COUNTRIES.find((country) => country.code === code);
|
|
1763
|
+
};
|
|
1764
|
+
var getCountryByName = (name) => {
|
|
1765
|
+
return COUNTRIES.find((country) => country.name.toLowerCase() === name.toLowerCase());
|
|
1766
|
+
};
|
|
1767
|
+
var EU_COUNTRY_CODES = [
|
|
1768
|
+
"AT",
|
|
1769
|
+
// Austria
|
|
1770
|
+
"BE",
|
|
1771
|
+
// Belgium
|
|
1772
|
+
"BG",
|
|
1773
|
+
// Bulgaria
|
|
1774
|
+
"HR",
|
|
1775
|
+
// Croatia
|
|
1776
|
+
"CY",
|
|
1777
|
+
// Cyprus
|
|
1778
|
+
"CZ",
|
|
1779
|
+
// Czech Republic
|
|
1780
|
+
"DK",
|
|
1781
|
+
// Denmark
|
|
1782
|
+
"EE",
|
|
1783
|
+
// Estonia
|
|
1784
|
+
"FI",
|
|
1785
|
+
// Finland
|
|
1786
|
+
"FR",
|
|
1787
|
+
// France
|
|
1788
|
+
"DE",
|
|
1789
|
+
// Germany
|
|
1790
|
+
"GR",
|
|
1791
|
+
// Greece
|
|
1792
|
+
"HU",
|
|
1793
|
+
// Hungary
|
|
1794
|
+
"IE",
|
|
1795
|
+
// Ireland
|
|
1796
|
+
"IT",
|
|
1797
|
+
// Italy
|
|
1798
|
+
"LV",
|
|
1799
|
+
// Latvia
|
|
1800
|
+
"LT",
|
|
1801
|
+
// Lithuania
|
|
1802
|
+
"LU",
|
|
1803
|
+
// Luxembourg
|
|
1804
|
+
"MT",
|
|
1805
|
+
// Malta
|
|
1806
|
+
"NL",
|
|
1807
|
+
// Netherlands
|
|
1808
|
+
"PL",
|
|
1809
|
+
// Poland
|
|
1810
|
+
"PT",
|
|
1811
|
+
// Portugal
|
|
1812
|
+
"RO",
|
|
1813
|
+
// Romania
|
|
1814
|
+
"SK",
|
|
1815
|
+
// Slovakia
|
|
1816
|
+
"SI",
|
|
1817
|
+
// Slovenia
|
|
1818
|
+
"ES",
|
|
1819
|
+
// Spain
|
|
1820
|
+
"SE"
|
|
1821
|
+
// Sweden
|
|
1822
|
+
];
|
|
1823
|
+
var isEUCountry = (countryCode) => {
|
|
1824
|
+
return EU_COUNTRY_CODES.includes(countryCode);
|
|
1825
|
+
};
|
|
1826
|
+
|
|
1827
|
+
// src/components/country-select/CountrySelect.tsx
|
|
1828
|
+
import { Fragment, jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1829
|
+
var CountrySelect = React26.forwardRef(
|
|
1024
1830
|
({
|
|
1025
|
-
className,
|
|
1026
|
-
variant,
|
|
1027
|
-
size,
|
|
1028
|
-
label,
|
|
1029
|
-
description,
|
|
1030
|
-
error,
|
|
1031
|
-
placeholder,
|
|
1032
|
-
options,
|
|
1033
|
-
id,
|
|
1034
|
-
disabled,
|
|
1035
1831
|
value,
|
|
1036
|
-
defaultValue,
|
|
1037
1832
|
onValueChange,
|
|
1038
|
-
|
|
1039
|
-
|
|
1833
|
+
placeholder = "Select country",
|
|
1834
|
+
disabled = false,
|
|
1835
|
+
className,
|
|
1836
|
+
align = "center",
|
|
1837
|
+
sideOffset = 4
|
|
1040
1838
|
}, ref) => {
|
|
1041
|
-
const
|
|
1042
|
-
const
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
label && /* @__PURE__ */ jsx18(
|
|
1047
|
-
"label",
|
|
1839
|
+
const [open, setOpen] = React26.useState(false);
|
|
1840
|
+
const selectedCountry = React26.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);
|
|
1841
|
+
return /* @__PURE__ */ jsxs11(Popover, { open, onOpenChange: setOpen, children: [
|
|
1842
|
+
/* @__PURE__ */ jsx28(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs11(
|
|
1843
|
+
"button",
|
|
1048
1844
|
{
|
|
1049
|
-
|
|
1845
|
+
ref,
|
|
1846
|
+
type: "button",
|
|
1847
|
+
disabled,
|
|
1848
|
+
"aria-expanded": open,
|
|
1050
1849
|
className: cn(
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1850
|
+
// Base layout — consistent with Select trigger
|
|
1851
|
+
"flex w-full items-center justify-between",
|
|
1852
|
+
"rounded-berget-xs border bg-card",
|
|
1853
|
+
"px-4 py-3 text-sm",
|
|
1854
|
+
"transition-colors duration-200",
|
|
1855
|
+
"focus-visible:outline-none focus-visible:ring-0",
|
|
1856
|
+
"focus-visible:ring-offset-0 focus-visible:border-berget-form-focus-border",
|
|
1857
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1858
|
+
// Default border & hover matching Select variant "default"
|
|
1859
|
+
"border-berget-border-interactive hover:bg-berget-surface-hover",
|
|
1860
|
+
className
|
|
1054
1861
|
),
|
|
1055
|
-
children: label
|
|
1056
|
-
}
|
|
1057
|
-
),
|
|
1058
|
-
/* @__PURE__ */ jsxs8(
|
|
1059
|
-
Select,
|
|
1060
|
-
{
|
|
1061
|
-
value,
|
|
1062
|
-
defaultValue,
|
|
1063
|
-
onValueChange,
|
|
1064
|
-
disabled,
|
|
1065
|
-
name,
|
|
1066
|
-
required,
|
|
1067
1862
|
children: [
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
|
|
1863
|
+
/* @__PURE__ */ jsx28("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ jsxs11(Fragment, { children: [
|
|
1864
|
+
/* @__PURE__ */ jsx28("span", { className: "text-xl flex-shrink-0", children: selectedCountry.flag }),
|
|
1865
|
+
/* @__PURE__ */ jsx28("span", { className: "truncate", children: selectedCountry.name }),
|
|
1866
|
+
/* @__PURE__ */ jsxs11("span", { className: "text-berget-muted-foreground text-xs flex-shrink-0", children: [
|
|
1867
|
+
"(",
|
|
1868
|
+
selectedCountry.code,
|
|
1869
|
+
")"
|
|
1870
|
+
] })
|
|
1871
|
+
] }) : /* @__PURE__ */ jsxs11(Fragment, { children: [
|
|
1872
|
+
/* @__PURE__ */ jsx28(
|
|
1873
|
+
Icon2,
|
|
1874
|
+
{
|
|
1875
|
+
icon: Globe,
|
|
1876
|
+
size: 16,
|
|
1877
|
+
className: "flex-shrink-0 text-berget-muted-foreground"
|
|
1878
|
+
}
|
|
1879
|
+
),
|
|
1880
|
+
/* @__PURE__ */ jsx28("span", { className: "text-berget-muted-foreground truncate", children: placeholder })
|
|
1881
|
+
] }) }),
|
|
1882
|
+
/* @__PURE__ */ jsx28(
|
|
1883
|
+
Icon2,
|
|
1070
1884
|
{
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
"aria-invalid": !!error,
|
|
1074
|
-
"aria-describedby": cn(error && errorId, description && descriptionId),
|
|
1885
|
+
icon: ChevronDown2,
|
|
1886
|
+
size: 16,
|
|
1075
1887
|
className: cn(
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
)
|
|
1080
|
-
children: /* @__PURE__ */ jsx18(SelectValue, { placeholder })
|
|
1888
|
+
"flex-shrink-0 text-berget-muted-foreground",
|
|
1889
|
+
"transition-transform duration-200",
|
|
1890
|
+
open && "rotate-180"
|
|
1891
|
+
)
|
|
1081
1892
|
}
|
|
1082
|
-
)
|
|
1083
|
-
/* @__PURE__ */ jsx18(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx18(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1893
|
+
)
|
|
1084
1894
|
]
|
|
1085
1895
|
}
|
|
1086
|
-
),
|
|
1087
|
-
|
|
1088
|
-
|
|
1896
|
+
) }),
|
|
1897
|
+
/* @__PURE__ */ jsx28(
|
|
1898
|
+
PopoverContent,
|
|
1899
|
+
{
|
|
1900
|
+
align,
|
|
1901
|
+
sideOffset,
|
|
1902
|
+
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
1903
|
+
children: /* @__PURE__ */ jsxs11(Command, { children: [
|
|
1904
|
+
/* @__PURE__ */ jsx28(CommandInput, { placeholder: "Search country..." }),
|
|
1905
|
+
/* @__PURE__ */ jsxs11(CommandList, { children: [
|
|
1906
|
+
/* @__PURE__ */ jsx28(CommandEmpty, { children: "No countries found." }),
|
|
1907
|
+
/* @__PURE__ */ jsx28(CommandGroup, { children: COUNTRIES.map((country) => /* @__PURE__ */ jsxs11(
|
|
1908
|
+
CommandItem,
|
|
1909
|
+
{
|
|
1910
|
+
value: `${country.name} ${country.code}`,
|
|
1911
|
+
onSelect: () => {
|
|
1912
|
+
onValueChange?.(country.code);
|
|
1913
|
+
setOpen(false);
|
|
1914
|
+
},
|
|
1915
|
+
className: cn(
|
|
1916
|
+
"flex items-center gap-3 px-3 py-2.5",
|
|
1917
|
+
"data-[selected='true']:bg-berget-brand-granite-700/40! data-[selected=true]:text-berget-foreground",
|
|
1918
|
+
value === country.code && "bg-berget-brand-granite-800/40"
|
|
1919
|
+
),
|
|
1920
|
+
children: [
|
|
1921
|
+
/* @__PURE__ */ jsx28("span", { className: "text-xl flex-shrink-0", children: country.flag }),
|
|
1922
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex-1 min-w-0", children: [
|
|
1923
|
+
/* @__PURE__ */ jsx28("div", { className: "text-sm truncate", children: country.name }),
|
|
1924
|
+
/* @__PURE__ */ jsx28("div", { className: "text-xs text-berget-muted-foreground", children: country.code })
|
|
1925
|
+
] }),
|
|
1926
|
+
value === country.code && /* @__PURE__ */ jsx28("div", { className: "w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0" })
|
|
1927
|
+
]
|
|
1928
|
+
},
|
|
1929
|
+
country.code
|
|
1930
|
+
)) })
|
|
1931
|
+
] })
|
|
1932
|
+
] })
|
|
1933
|
+
}
|
|
1934
|
+
)
|
|
1089
1935
|
] });
|
|
1090
1936
|
}
|
|
1091
1937
|
);
|
|
1092
|
-
|
|
1938
|
+
CountrySelect.displayName = "CountrySelect";
|
|
1093
1939
|
|
|
1094
1940
|
// src/components/text-area/TextArea.tsx
|
|
1095
|
-
import * as
|
|
1096
|
-
import { cva as
|
|
1941
|
+
import * as React28 from "react";
|
|
1942
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
1097
1943
|
|
|
1098
1944
|
// src/primitives/textarea.tsx
|
|
1099
|
-
import * as
|
|
1100
|
-
import { jsx as
|
|
1101
|
-
var Textarea =
|
|
1945
|
+
import * as React27 from "react";
|
|
1946
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1947
|
+
var Textarea = React27.forwardRef(
|
|
1102
1948
|
({ className, ...props }, ref) => {
|
|
1103
|
-
return /* @__PURE__ */
|
|
1949
|
+
return /* @__PURE__ */ jsx29(
|
|
1104
1950
|
"textarea",
|
|
1105
1951
|
{
|
|
1106
1952
|
className: cn(
|
|
@@ -1116,8 +1962,8 @@ var Textarea = React18.forwardRef(
|
|
|
1116
1962
|
Textarea.displayName = "Textarea";
|
|
1117
1963
|
|
|
1118
1964
|
// src/components/text-area/TextArea.tsx
|
|
1119
|
-
import { jsx as
|
|
1120
|
-
var textAreaVariants =
|
|
1965
|
+
import { jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1966
|
+
var textAreaVariants = cva11(
|
|
1121
1967
|
"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",
|
|
1122
1968
|
{
|
|
1123
1969
|
variants: {
|
|
@@ -1139,7 +1985,7 @@ var textAreaVariants = cva10(
|
|
|
1139
1985
|
}
|
|
1140
1986
|
}
|
|
1141
1987
|
);
|
|
1142
|
-
var TextArea =
|
|
1988
|
+
var TextArea = React28.forwardRef(
|
|
1143
1989
|
({
|
|
1144
1990
|
className,
|
|
1145
1991
|
variant,
|
|
@@ -1159,13 +2005,13 @@ var TextArea = React19.forwardRef(
|
|
|
1159
2005
|
actionButton,
|
|
1160
2006
|
...props
|
|
1161
2007
|
}, ref) => {
|
|
1162
|
-
const generatedId =
|
|
2008
|
+
const generatedId = React28.useId();
|
|
1163
2009
|
const textareaId = id || generatedId;
|
|
1164
2010
|
const errorId = `${textareaId}-error`;
|
|
1165
2011
|
const descriptionId = `${textareaId}-description`;
|
|
1166
2012
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
1167
|
-
return /* @__PURE__ */
|
|
1168
|
-
label && /* @__PURE__ */
|
|
2013
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-2", children: [
|
|
2014
|
+
label && /* @__PURE__ */ jsx30(
|
|
1169
2015
|
"label",
|
|
1170
2016
|
{
|
|
1171
2017
|
htmlFor: textareaId,
|
|
@@ -1177,9 +2023,9 @@ var TextArea = React19.forwardRef(
|
|
|
1177
2023
|
children: label
|
|
1178
2024
|
}
|
|
1179
2025
|
),
|
|
1180
|
-
/* @__PURE__ */
|
|
1181
|
-
icon && /* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ jsxs12("div", { className: "relative", children: [
|
|
2027
|
+
icon && /* @__PURE__ */ jsx30("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
2028
|
+
/* @__PURE__ */ jsx30(
|
|
1183
2029
|
Textarea,
|
|
1184
2030
|
{
|
|
1185
2031
|
ref,
|
|
@@ -1204,13 +2050,13 @@ var TextArea = React19.forwardRef(
|
|
|
1204
2050
|
...props
|
|
1205
2051
|
}
|
|
1206
2052
|
),
|
|
1207
|
-
secondaryIcon && /* @__PURE__ */
|
|
1208
|
-
actionButton && /* @__PURE__ */
|
|
2053
|
+
secondaryIcon && /* @__PURE__ */ jsx30("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
2054
|
+
actionButton && /* @__PURE__ */ jsx30("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1209
2055
|
] }),
|
|
1210
|
-
(description || error || showCount && maxLength) && /* @__PURE__ */
|
|
1211
|
-
description && /* @__PURE__ */
|
|
1212
|
-
(error || showCount && maxLength) && /* @__PURE__ */
|
|
1213
|
-
showCount && maxLength && /* @__PURE__ */
|
|
2056
|
+
(description || error || showCount && maxLength) && /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2057
|
+
description && /* @__PURE__ */ jsx30(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
2058
|
+
(error || showCount && maxLength) && /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
2059
|
+
showCount && maxLength && /* @__PURE__ */ jsxs12(
|
|
1214
2060
|
Typography,
|
|
1215
2061
|
{
|
|
1216
2062
|
variant: "xs",
|
|
@@ -1224,7 +2070,7 @@ var TextArea = React19.forwardRef(
|
|
|
1224
2070
|
]
|
|
1225
2071
|
}
|
|
1226
2072
|
),
|
|
1227
|
-
error && /* @__PURE__ */
|
|
2073
|
+
error && /* @__PURE__ */ jsx30(
|
|
1228
2074
|
Typography,
|
|
1229
2075
|
{
|
|
1230
2076
|
variant: "xs",
|
|
@@ -1241,44 +2087,22 @@ var TextArea = React19.forwardRef(
|
|
|
1241
2087
|
TextArea.displayName = "TextArea";
|
|
1242
2088
|
|
|
1243
2089
|
// src/primitives/label.tsx
|
|
1244
|
-
import * as
|
|
2090
|
+
import * as React29 from "react";
|
|
1245
2091
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1246
|
-
import { cva as
|
|
1247
|
-
import { jsx as
|
|
1248
|
-
var labelVariants =
|
|
2092
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
2093
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2094
|
+
var labelVariants = cva12(
|
|
1249
2095
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1250
2096
|
);
|
|
1251
|
-
var Label2 =
|
|
2097
|
+
var Label2 = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx31(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1252
2098
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1253
2099
|
|
|
1254
2100
|
// src/primitives/field.tsx
|
|
1255
|
-
import { useMemo as
|
|
1256
|
-
import { cva as
|
|
1257
|
-
|
|
1258
|
-
// src/primitives/separator.tsx
|
|
1259
|
-
import * as React21 from "react";
|
|
1260
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1261
|
-
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1262
|
-
var Separator2 = React21.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1263
|
-
SeparatorPrimitive.Root,
|
|
1264
|
-
{
|
|
1265
|
-
ref,
|
|
1266
|
-
decorative,
|
|
1267
|
-
orientation,
|
|
1268
|
-
className: cn(
|
|
1269
|
-
"shrink-0 bg-border",
|
|
1270
|
-
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
1271
|
-
className
|
|
1272
|
-
),
|
|
1273
|
-
...props
|
|
1274
|
-
}
|
|
1275
|
-
));
|
|
1276
|
-
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1277
|
-
|
|
1278
|
-
// src/primitives/field.tsx
|
|
1279
|
-
import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2101
|
+
import { useMemo as useMemo3 } from "react";
|
|
2102
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
2103
|
+
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1280
2104
|
function FieldSet({ className, ...props }) {
|
|
1281
|
-
return /* @__PURE__ */
|
|
2105
|
+
return /* @__PURE__ */ jsx32(
|
|
1282
2106
|
"fieldset",
|
|
1283
2107
|
{
|
|
1284
2108
|
"data-slot": "field-set",
|
|
@@ -1296,7 +2120,7 @@ function FieldLegend({
|
|
|
1296
2120
|
variant = "legend",
|
|
1297
2121
|
...props
|
|
1298
2122
|
}) {
|
|
1299
|
-
return /* @__PURE__ */
|
|
2123
|
+
return /* @__PURE__ */ jsx32(
|
|
1300
2124
|
"legend",
|
|
1301
2125
|
{
|
|
1302
2126
|
"data-slot": "field-legend",
|
|
@@ -1312,7 +2136,7 @@ function FieldLegend({
|
|
|
1312
2136
|
);
|
|
1313
2137
|
}
|
|
1314
2138
|
function FieldGroup({ className, ...props }) {
|
|
1315
|
-
return /* @__PURE__ */
|
|
2139
|
+
return /* @__PURE__ */ jsx32(
|
|
1316
2140
|
"div",
|
|
1317
2141
|
{
|
|
1318
2142
|
"data-slot": "field-group",
|
|
@@ -1324,7 +2148,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
1324
2148
|
}
|
|
1325
2149
|
);
|
|
1326
2150
|
}
|
|
1327
|
-
var fieldVariants =
|
|
2151
|
+
var fieldVariants = cva13(
|
|
1328
2152
|
"group/field data-[invalid=true]:text-berget-destructive-foreground flex w-full gap-3",
|
|
1329
2153
|
{
|
|
1330
2154
|
variants: {
|
|
@@ -1352,7 +2176,7 @@ function Field({
|
|
|
1352
2176
|
orientation = "vertical",
|
|
1353
2177
|
...props
|
|
1354
2178
|
}) {
|
|
1355
|
-
return /* @__PURE__ */
|
|
2179
|
+
return /* @__PURE__ */ jsx32(
|
|
1356
2180
|
"div",
|
|
1357
2181
|
{
|
|
1358
2182
|
role: "group",
|
|
@@ -1364,7 +2188,7 @@ function Field({
|
|
|
1364
2188
|
);
|
|
1365
2189
|
}
|
|
1366
2190
|
function FieldContent({ className, ...props }) {
|
|
1367
|
-
return /* @__PURE__ */
|
|
2191
|
+
return /* @__PURE__ */ jsx32(
|
|
1368
2192
|
"div",
|
|
1369
2193
|
{
|
|
1370
2194
|
"data-slot": "field-content",
|
|
@@ -1374,7 +2198,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1374
2198
|
);
|
|
1375
2199
|
}
|
|
1376
2200
|
function FieldLabel({ className, ...props }) {
|
|
1377
|
-
return /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ jsx32(
|
|
1378
2202
|
Label2,
|
|
1379
2203
|
{
|
|
1380
2204
|
"data-slot": "field-label",
|
|
@@ -1389,7 +2213,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1389
2213
|
);
|
|
1390
2214
|
}
|
|
1391
2215
|
function FieldTitle({ className, ...props }) {
|
|
1392
|
-
return /* @__PURE__ */
|
|
2216
|
+
return /* @__PURE__ */ jsx32(
|
|
1393
2217
|
"div",
|
|
1394
2218
|
{
|
|
1395
2219
|
"data-slot": "field-label",
|
|
@@ -1402,7 +2226,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1402
2226
|
);
|
|
1403
2227
|
}
|
|
1404
2228
|
function FieldDescription({ className, ...props }) {
|
|
1405
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ jsx32(
|
|
1406
2230
|
"p",
|
|
1407
2231
|
{
|
|
1408
2232
|
"data-slot": "field-description",
|
|
@@ -1421,7 +2245,7 @@ function FieldSeparator({
|
|
|
1421
2245
|
className,
|
|
1422
2246
|
...props
|
|
1423
2247
|
}) {
|
|
1424
|
-
return /* @__PURE__ */
|
|
2248
|
+
return /* @__PURE__ */ jsxs13(
|
|
1425
2249
|
"div",
|
|
1426
2250
|
{
|
|
1427
2251
|
"data-slot": "field-separator",
|
|
@@ -1432,8 +2256,8 @@ function FieldSeparator({
|
|
|
1432
2256
|
),
|
|
1433
2257
|
...props,
|
|
1434
2258
|
children: [
|
|
1435
|
-
/* @__PURE__ */
|
|
1436
|
-
children && /* @__PURE__ */
|
|
2259
|
+
/* @__PURE__ */ jsx32(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
2260
|
+
children && /* @__PURE__ */ jsx32(
|
|
1437
2261
|
"span",
|
|
1438
2262
|
{
|
|
1439
2263
|
className: "bg-berget-background text-berget-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -1451,7 +2275,7 @@ function FieldError({
|
|
|
1451
2275
|
errors,
|
|
1452
2276
|
...props
|
|
1453
2277
|
}) {
|
|
1454
|
-
const content =
|
|
2278
|
+
const content = useMemo3(() => {
|
|
1455
2279
|
if (children) {
|
|
1456
2280
|
return children;
|
|
1457
2281
|
}
|
|
@@ -1461,12 +2285,12 @@ function FieldError({
|
|
|
1461
2285
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
1462
2286
|
return errors[0].message;
|
|
1463
2287
|
}
|
|
1464
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsx32("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map((error, index) => error?.message && /* @__PURE__ */ jsx32("li", { children: error.message }, index)) });
|
|
1465
2289
|
}, [children, errors]);
|
|
1466
2290
|
if (!content) {
|
|
1467
2291
|
return null;
|
|
1468
2292
|
}
|
|
1469
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ jsx32(
|
|
1470
2294
|
"div",
|
|
1471
2295
|
{
|
|
1472
2296
|
role: "alert",
|
|
@@ -1479,47 +2303,11 @@ function FieldError({
|
|
|
1479
2303
|
}
|
|
1480
2304
|
|
|
1481
2305
|
// src/components/link/Link.tsx
|
|
1482
|
-
import * as
|
|
1483
|
-
import { cva as
|
|
1484
|
-
|
|
1485
|
-
// src/components/icon/Icon.tsx
|
|
1486
|
-
import * as React22 from "react";
|
|
1487
|
-
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1488
|
-
var iconStrokeMap = {
|
|
1489
|
-
16: 1.4,
|
|
1490
|
-
24: 1.6,
|
|
1491
|
-
32: 1.8
|
|
1492
|
-
};
|
|
1493
|
-
var Icon2 = React22.forwardRef(
|
|
1494
|
-
({
|
|
1495
|
-
icon: IconComponent,
|
|
1496
|
-
size,
|
|
1497
|
-
className,
|
|
1498
|
-
"aria-label": ariaLabel,
|
|
1499
|
-
"aria-hidden": ariaHidden = true,
|
|
1500
|
-
...props
|
|
1501
|
-
}, ref) => {
|
|
1502
|
-
const strokeWidth = iconStrokeMap[size];
|
|
1503
|
-
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
1504
|
-
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
1505
|
-
return /* @__PURE__ */ jsx24(
|
|
1506
|
-
IconComponent,
|
|
1507
|
-
{
|
|
1508
|
-
ref,
|
|
1509
|
-
className: cn(sizeClass, className),
|
|
1510
|
-
strokeWidth,
|
|
1511
|
-
...ariaAttributes,
|
|
1512
|
-
...props
|
|
1513
|
-
}
|
|
1514
|
-
);
|
|
1515
|
-
}
|
|
1516
|
-
);
|
|
1517
|
-
Icon2.displayName = "Icon";
|
|
1518
|
-
|
|
1519
|
-
// src/components/link/Link.tsx
|
|
2306
|
+
import * as React30 from "react";
|
|
2307
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
1520
2308
|
import { ExternalLink } from "lucide-react";
|
|
1521
|
-
import { jsx as
|
|
1522
|
-
var linkVariants =
|
|
2309
|
+
import { jsx as jsx33, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2310
|
+
var linkVariants = cva14(
|
|
1523
2311
|
"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",
|
|
1524
2312
|
{
|
|
1525
2313
|
variants: {
|
|
@@ -1543,7 +2331,7 @@ var linkVariants = cva13(
|
|
|
1543
2331
|
}
|
|
1544
2332
|
}
|
|
1545
2333
|
);
|
|
1546
|
-
var Link =
|
|
2334
|
+
var Link = React30.forwardRef(
|
|
1547
2335
|
({
|
|
1548
2336
|
className,
|
|
1549
2337
|
variant,
|
|
@@ -1556,7 +2344,7 @@ var Link = React23.forwardRef(
|
|
|
1556
2344
|
...props
|
|
1557
2345
|
}, ref) => {
|
|
1558
2346
|
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
1559
|
-
return /* @__PURE__ */
|
|
2347
|
+
return /* @__PURE__ */ jsxs14(
|
|
1560
2348
|
"a",
|
|
1561
2349
|
{
|
|
1562
2350
|
ref,
|
|
@@ -1572,8 +2360,8 @@ var Link = React23.forwardRef(
|
|
|
1572
2360
|
},
|
|
1573
2361
|
children: [
|
|
1574
2362
|
children,
|
|
1575
|
-
icon && /* @__PURE__ */
|
|
1576
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */
|
|
2363
|
+
icon && /* @__PURE__ */ jsx33("span", { className: "inline-flex items-center", children: icon }),
|
|
2364
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ jsx33("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ jsx33(Icon2, { icon: ExternalLink, size: 16 }) })
|
|
1577
2365
|
]
|
|
1578
2366
|
}
|
|
1579
2367
|
);
|
|
@@ -1582,11 +2370,11 @@ var Link = React23.forwardRef(
|
|
|
1582
2370
|
Link.displayName = "Link";
|
|
1583
2371
|
|
|
1584
2372
|
// src/components/container/Container.tsx
|
|
1585
|
-
import * as
|
|
1586
|
-
import { Slot as
|
|
1587
|
-
import { cva as
|
|
1588
|
-
import { jsx as
|
|
1589
|
-
var containerVariants =
|
|
2373
|
+
import * as React31 from "react";
|
|
2374
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
2375
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
2376
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2377
|
+
var containerVariants = cva15("w-full mx-auto", {
|
|
1590
2378
|
variants: {
|
|
1591
2379
|
size: {
|
|
1592
2380
|
sm: "max-w-3xl",
|
|
@@ -1607,10 +2395,10 @@ var containerVariants = cva14("w-full mx-auto", {
|
|
|
1607
2395
|
padding: "md"
|
|
1608
2396
|
}
|
|
1609
2397
|
});
|
|
1610
|
-
var Container =
|
|
2398
|
+
var Container = React31.forwardRef(
|
|
1611
2399
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
1612
|
-
const Component = asChild ?
|
|
1613
|
-
return /* @__PURE__ */
|
|
2400
|
+
const Component = asChild ? Slot3 : "div";
|
|
2401
|
+
return /* @__PURE__ */ jsx34(
|
|
1614
2402
|
Component,
|
|
1615
2403
|
{
|
|
1616
2404
|
ref,
|
|
@@ -1624,11 +2412,11 @@ var Container = React24.forwardRef(
|
|
|
1624
2412
|
Container.displayName = "Container";
|
|
1625
2413
|
|
|
1626
2414
|
// src/components/grid/Grid.tsx
|
|
1627
|
-
import * as
|
|
1628
|
-
import { cva as
|
|
1629
|
-
import { Slot as
|
|
1630
|
-
import { jsx as
|
|
1631
|
-
var gridVariants =
|
|
2415
|
+
import * as React32 from "react";
|
|
2416
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
2417
|
+
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
2418
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2419
|
+
var gridVariants = cva16("grid", {
|
|
1632
2420
|
variants: {
|
|
1633
2421
|
align: {
|
|
1634
2422
|
start: "items-start",
|
|
@@ -1650,10 +2438,10 @@ var gridVariants = cva15("grid", {
|
|
|
1650
2438
|
justify: "start"
|
|
1651
2439
|
}
|
|
1652
2440
|
});
|
|
1653
|
-
var Grid =
|
|
2441
|
+
var Grid = React32.forwardRef(
|
|
1654
2442
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
1655
|
-
const Component = asChild ?
|
|
1656
|
-
return /* @__PURE__ */
|
|
2443
|
+
const Component = asChild ? Slot4 : "div";
|
|
2444
|
+
return /* @__PURE__ */ jsx35(
|
|
1657
2445
|
Component,
|
|
1658
2446
|
{
|
|
1659
2447
|
ref,
|
|
@@ -1675,11 +2463,11 @@ var Grid = React25.forwardRef(
|
|
|
1675
2463
|
Grid.displayName = "Grid";
|
|
1676
2464
|
|
|
1677
2465
|
// src/components/box/Box.tsx
|
|
1678
|
-
import * as
|
|
1679
|
-
import { cva as
|
|
1680
|
-
import { Slot as
|
|
1681
|
-
import { jsx as
|
|
1682
|
-
var boxVariants =
|
|
2466
|
+
import * as React33 from "react";
|
|
2467
|
+
import { cva as cva17 } from "class-variance-authority";
|
|
2468
|
+
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
2469
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2470
|
+
var boxVariants = cva17("flex", {
|
|
1683
2471
|
variants: {
|
|
1684
2472
|
direction: {
|
|
1685
2473
|
row: "flex-row",
|
|
@@ -1715,10 +2503,10 @@ var boxVariants = cva16("flex", {
|
|
|
1715
2503
|
wrap: "nowrap"
|
|
1716
2504
|
}
|
|
1717
2505
|
});
|
|
1718
|
-
var Box =
|
|
2506
|
+
var Box = React33.forwardRef(
|
|
1719
2507
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
1720
|
-
const Component = asChild ?
|
|
1721
|
-
return /* @__PURE__ */
|
|
2508
|
+
const Component = asChild ? Slot5 : "div";
|
|
2509
|
+
return /* @__PURE__ */ jsx36(
|
|
1722
2510
|
Component,
|
|
1723
2511
|
{
|
|
1724
2512
|
ref,
|
|
@@ -1736,16 +2524,16 @@ var Box = React26.forwardRef(
|
|
|
1736
2524
|
Box.displayName = "Box";
|
|
1737
2525
|
|
|
1738
2526
|
// src/components/berget-logo/BergetLogo.tsx
|
|
1739
|
-
import * as
|
|
1740
|
-
import { jsx as
|
|
1741
|
-
var BergetLogo =
|
|
2527
|
+
import * as React34 from "react";
|
|
2528
|
+
import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2529
|
+
var BergetLogo = React34.forwardRef(
|
|
1742
2530
|
({ variant = "logotype", color = "auto", size = 48, className, ...props }, ref) => {
|
|
1743
2531
|
const fillColor = color === "auto" ? "var(--berget-logo-light)" : color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
1744
2532
|
if (variant === "symbol") {
|
|
1745
2533
|
const aspectRatio2 = 463 / 419;
|
|
1746
2534
|
const width2 = size * aspectRatio2;
|
|
1747
2535
|
const height2 = size;
|
|
1748
|
-
return /* @__PURE__ */
|
|
2536
|
+
return /* @__PURE__ */ jsx37(
|
|
1749
2537
|
"svg",
|
|
1750
2538
|
{
|
|
1751
2539
|
ref,
|
|
@@ -1758,7 +2546,7 @@ var BergetLogo = React27.forwardRef(
|
|
|
1758
2546
|
"aria-label": "Berget symbol",
|
|
1759
2547
|
className: cn("inline-block", className),
|
|
1760
2548
|
...props,
|
|
1761
|
-
children: /* @__PURE__ */
|
|
2549
|
+
children: /* @__PURE__ */ jsx37(
|
|
1762
2550
|
"path",
|
|
1763
2551
|
{
|
|
1764
2552
|
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",
|
|
@@ -1771,7 +2559,7 @@ var BergetLogo = React27.forwardRef(
|
|
|
1771
2559
|
const aspectRatio = 793.63 / 204.37;
|
|
1772
2560
|
const width = size * aspectRatio;
|
|
1773
2561
|
const height = size;
|
|
1774
|
-
return /* @__PURE__ */
|
|
2562
|
+
return /* @__PURE__ */ jsxs15(
|
|
1775
2563
|
"svg",
|
|
1776
2564
|
{
|
|
1777
2565
|
ref,
|
|
@@ -1785,59 +2573,59 @@ var BergetLogo = React27.forwardRef(
|
|
|
1785
2573
|
className: cn("inline-block", className),
|
|
1786
2574
|
...props,
|
|
1787
2575
|
children: [
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ jsxs15("g", { style: { fill: fillColor }, children: [
|
|
2577
|
+
/* @__PURE__ */ jsx37(
|
|
1790
2578
|
"path",
|
|
1791
2579
|
{
|
|
1792
2580
|
className: "berget-logotype-fill",
|
|
1793
2581
|
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"
|
|
1794
2582
|
}
|
|
1795
2583
|
),
|
|
1796
|
-
/* @__PURE__ */
|
|
2584
|
+
/* @__PURE__ */ jsx37(
|
|
1797
2585
|
"path",
|
|
1798
2586
|
{
|
|
1799
2587
|
className: "berget-logotype-fill",
|
|
1800
2588
|
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"
|
|
1801
2589
|
}
|
|
1802
2590
|
),
|
|
1803
|
-
/* @__PURE__ */
|
|
2591
|
+
/* @__PURE__ */ jsx37(
|
|
1804
2592
|
"path",
|
|
1805
2593
|
{
|
|
1806
2594
|
className: "berget-logotype-fill",
|
|
1807
2595
|
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"
|
|
1808
2596
|
}
|
|
1809
2597
|
),
|
|
1810
|
-
/* @__PURE__ */
|
|
2598
|
+
/* @__PURE__ */ jsx37(
|
|
1811
2599
|
"path",
|
|
1812
2600
|
{
|
|
1813
2601
|
className: "berget-logotype-fill",
|
|
1814
2602
|
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"
|
|
1815
2603
|
}
|
|
1816
2604
|
),
|
|
1817
|
-
/* @__PURE__ */
|
|
2605
|
+
/* @__PURE__ */ jsx37(
|
|
1818
2606
|
"path",
|
|
1819
2607
|
{
|
|
1820
2608
|
className: "berget-logotype-fill",
|
|
1821
2609
|
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"
|
|
1822
2610
|
}
|
|
1823
2611
|
),
|
|
1824
|
-
/* @__PURE__ */
|
|
2612
|
+
/* @__PURE__ */ jsx37(
|
|
1825
2613
|
"path",
|
|
1826
2614
|
{
|
|
1827
2615
|
className: "berget-logotype-fill",
|
|
1828
2616
|
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"
|
|
1829
2617
|
}
|
|
1830
2618
|
),
|
|
1831
|
-
/* @__PURE__ */
|
|
2619
|
+
/* @__PURE__ */ jsx37(
|
|
1832
2620
|
"path",
|
|
1833
2621
|
{
|
|
1834
2622
|
className: "berget-logotype-fill",
|
|
1835
2623
|
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"
|
|
1836
2624
|
}
|
|
1837
2625
|
),
|
|
1838
|
-
/* @__PURE__ */
|
|
2626
|
+
/* @__PURE__ */ jsx37("path", { className: "berget-logotype-fill", d: "M778.48,172.54v-96.04h15.15v96.04h-15.15Z" })
|
|
1839
2627
|
] }),
|
|
1840
|
-
/* @__PURE__ */
|
|
2628
|
+
/* @__PURE__ */ jsx37(
|
|
1841
2629
|
"path",
|
|
1842
2630
|
{
|
|
1843
2631
|
style: { fill: fillColor },
|
|
@@ -1852,13 +2640,13 @@ var BergetLogo = React27.forwardRef(
|
|
|
1852
2640
|
BergetLogo.displayName = "BergetLogo";
|
|
1853
2641
|
|
|
1854
2642
|
// src/components/language-select/LanguageSelect.tsx
|
|
1855
|
-
import * as
|
|
2643
|
+
import * as React35 from "react";
|
|
1856
2644
|
import * as SelectPrimitive2 from "@radix-ui/react-select";
|
|
1857
|
-
import { Globe } from "lucide-react";
|
|
1858
|
-
import { jsx as
|
|
1859
|
-
var LanguageSelect =
|
|
1860
|
-
return /* @__PURE__ */
|
|
1861
|
-
/* @__PURE__ */
|
|
2645
|
+
import { Globe as Globe2 } from "lucide-react";
|
|
2646
|
+
import { jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2647
|
+
var LanguageSelect = React35.forwardRef(({ className, options, value, onValueChange }, ref) => {
|
|
2648
|
+
return /* @__PURE__ */ jsxs16(SelectPrimitive2.Root, { value, onValueChange, children: [
|
|
2649
|
+
/* @__PURE__ */ jsx38(
|
|
1862
2650
|
SelectPrimitive2.Trigger,
|
|
1863
2651
|
{
|
|
1864
2652
|
ref,
|
|
@@ -1880,10 +2668,10 @@ var LanguageSelect = React28.forwardRef(({ className, options, value, onValueCha
|
|
|
1880
2668
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1881
2669
|
className
|
|
1882
2670
|
),
|
|
1883
|
-
children: /* @__PURE__ */
|
|
2671
|
+
children: /* @__PURE__ */ jsx38(Icon2, { icon: Globe2, size: 16 })
|
|
1884
2672
|
}
|
|
1885
2673
|
),
|
|
1886
|
-
/* @__PURE__ */
|
|
2674
|
+
/* @__PURE__ */ jsx38(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx38(
|
|
1887
2675
|
SelectPrimitive2.Content,
|
|
1888
2676
|
{
|
|
1889
2677
|
className: cn(
|
|
@@ -1911,7 +2699,7 @@ var LanguageSelect = React28.forwardRef(({ className, options, value, onValueCha
|
|
|
1911
2699
|
"origin-[--radix-select-content-transform-origin]"
|
|
1912
2700
|
),
|
|
1913
2701
|
position: "popper",
|
|
1914
|
-
children: /* @__PURE__ */
|
|
2702
|
+
children: /* @__PURE__ */ jsx38(SelectPrimitive2.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsx38(
|
|
1915
2703
|
SelectPrimitive2.Item,
|
|
1916
2704
|
{
|
|
1917
2705
|
value: option.value,
|
|
@@ -1928,7 +2716,7 @@ var LanguageSelect = React28.forwardRef(({ className, options, value, onValueCha
|
|
|
1928
2716
|
// Disabled state
|
|
1929
2717
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
1930
2718
|
),
|
|
1931
|
-
children: /* @__PURE__ */
|
|
2719
|
+
children: /* @__PURE__ */ jsx38(SelectPrimitive2.ItemText, { children: option.label })
|
|
1932
2720
|
},
|
|
1933
2721
|
option.value
|
|
1934
2722
|
)) })
|
|
@@ -1939,13 +2727,13 @@ var LanguageSelect = React28.forwardRef(({ className, options, value, onValueCha
|
|
|
1939
2727
|
LanguageSelect.displayName = "LanguageSelect";
|
|
1940
2728
|
|
|
1941
2729
|
// src/components/list/List.tsx
|
|
1942
|
-
import * as
|
|
2730
|
+
import * as React37 from "react";
|
|
1943
2731
|
|
|
1944
2732
|
// src/components/divider/Divider.tsx
|
|
1945
|
-
import * as
|
|
1946
|
-
import { cva as
|
|
1947
|
-
import { jsx as
|
|
1948
|
-
var dividerVariants =
|
|
2733
|
+
import * as React36 from "react";
|
|
2734
|
+
import { cva as cva18 } from "class-variance-authority";
|
|
2735
|
+
import { jsx as jsx39, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2736
|
+
var dividerVariants = cva18("", {
|
|
1949
2737
|
variants: {
|
|
1950
2738
|
variant: {
|
|
1951
2739
|
default: "bg-berget-separator",
|
|
@@ -1965,7 +2753,7 @@ var dividerVariants = cva17("", {
|
|
|
1965
2753
|
size: "thin"
|
|
1966
2754
|
}
|
|
1967
2755
|
});
|
|
1968
|
-
var Divider =
|
|
2756
|
+
var Divider = React36.forwardRef(
|
|
1969
2757
|
({
|
|
1970
2758
|
className,
|
|
1971
2759
|
orientation = "horizontal",
|
|
@@ -1976,17 +2764,17 @@ var Divider = React29.forwardRef(
|
|
|
1976
2764
|
...props
|
|
1977
2765
|
}, ref) => {
|
|
1978
2766
|
if (label) {
|
|
1979
|
-
return /* @__PURE__ */
|
|
1980
|
-
labelPosition !== "right" && /* @__PURE__ */
|
|
1981
|
-
|
|
2767
|
+
return /* @__PURE__ */ jsxs17("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
2768
|
+
labelPosition !== "right" && /* @__PURE__ */ jsx39(
|
|
2769
|
+
Separator,
|
|
1982
2770
|
{
|
|
1983
2771
|
orientation: "horizontal",
|
|
1984
2772
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
1985
2773
|
}
|
|
1986
2774
|
),
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
labelPosition !== "left" && /* @__PURE__ */
|
|
1989
|
-
|
|
2775
|
+
/* @__PURE__ */ jsx39(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
2776
|
+
labelPosition !== "left" && /* @__PURE__ */ jsx39(
|
|
2777
|
+
Separator,
|
|
1990
2778
|
{
|
|
1991
2779
|
orientation: "horizontal",
|
|
1992
2780
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
@@ -1994,8 +2782,8 @@ var Divider = React29.forwardRef(
|
|
|
1994
2782
|
)
|
|
1995
2783
|
] });
|
|
1996
2784
|
}
|
|
1997
|
-
return /* @__PURE__ */
|
|
1998
|
-
|
|
2785
|
+
return /* @__PURE__ */ jsx39(
|
|
2786
|
+
Separator,
|
|
1999
2787
|
{
|
|
2000
2788
|
ref,
|
|
2001
2789
|
orientation,
|
|
@@ -2012,19 +2800,19 @@ Divider.displayName = "Divider";
|
|
|
2012
2800
|
|
|
2013
2801
|
// src/components/list/List.tsx
|
|
2014
2802
|
import { Check as Check4 } from "lucide-react";
|
|
2015
|
-
import { jsx as
|
|
2016
|
-
var List =
|
|
2803
|
+
import { jsx as jsx40, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2804
|
+
var List = React37.forwardRef(
|
|
2017
2805
|
({ className, children, ...props }, ref) => {
|
|
2018
|
-
const childrenArray =
|
|
2019
|
-
return /* @__PURE__ */
|
|
2806
|
+
const childrenArray = React37.Children.toArray(children);
|
|
2807
|
+
return /* @__PURE__ */ jsx40("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs18(React37.Fragment, { children: [
|
|
2020
2808
|
child,
|
|
2021
|
-
index < childrenArray.length - 1 && /* @__PURE__ */
|
|
2809
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ jsx40(Divider, { variant: "subtle" })
|
|
2022
2810
|
] }, index)) });
|
|
2023
2811
|
}
|
|
2024
2812
|
);
|
|
2025
2813
|
List.displayName = "List";
|
|
2026
|
-
var ListItem =
|
|
2027
|
-
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */
|
|
2814
|
+
var ListItem = React37.forwardRef(
|
|
2815
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ jsxs18(
|
|
2028
2816
|
"div",
|
|
2029
2817
|
{
|
|
2030
2818
|
ref,
|
|
@@ -2035,15 +2823,15 @@ var ListItem = React30.forwardRef(
|
|
|
2035
2823
|
),
|
|
2036
2824
|
...props,
|
|
2037
2825
|
children: [
|
|
2038
|
-
icon && /* @__PURE__ */
|
|
2039
|
-
/* @__PURE__ */
|
|
2826
|
+
icon && /* @__PURE__ */ jsx40("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
2827
|
+
/* @__PURE__ */ jsx40("div", { className: "flex-1 min-w-0", children })
|
|
2040
2828
|
]
|
|
2041
2829
|
}
|
|
2042
2830
|
)
|
|
2043
2831
|
);
|
|
2044
2832
|
ListItem.displayName = "ListItem";
|
|
2045
|
-
var ListHeader =
|
|
2046
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
2833
|
+
var ListHeader = React37.forwardRef(
|
|
2834
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
2047
2835
|
"div",
|
|
2048
2836
|
{
|
|
2049
2837
|
ref,
|
|
@@ -2054,21 +2842,21 @@ var ListHeader = React30.forwardRef(
|
|
|
2054
2842
|
)
|
|
2055
2843
|
);
|
|
2056
2844
|
ListHeader.displayName = "ListHeader";
|
|
2057
|
-
var FeatureList =
|
|
2845
|
+
var FeatureList = React37.forwardRef(
|
|
2058
2846
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2059
|
-
return /* @__PURE__ */
|
|
2060
|
-
variant === "bullet" ? /* @__PURE__ */
|
|
2061
|
-
/* @__PURE__ */
|
|
2847
|
+
return /* @__PURE__ */ jsx40("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs18("li", { className: "flex items-start gap-fluid-md", children: [
|
|
2848
|
+
variant === "bullet" ? /* @__PURE__ */ jsx40("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ jsx40("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx40(Icon2, { icon: Check4, size: 24, className: "text-berget-logo-light" }) }),
|
|
2849
|
+
/* @__PURE__ */ jsx40(Typography, { variant: "body", color: "muted", children: item })
|
|
2062
2850
|
] }, index)) });
|
|
2063
2851
|
}
|
|
2064
2852
|
);
|
|
2065
2853
|
FeatureList.displayName = "FeatureList";
|
|
2066
2854
|
|
|
2067
2855
|
// src/components/hero-block/HeroBlock.tsx
|
|
2068
|
-
import * as
|
|
2069
|
-
import { cva as
|
|
2070
|
-
import { jsx as
|
|
2071
|
-
var heroBlockVariants =
|
|
2856
|
+
import * as React38 from "react";
|
|
2857
|
+
import { cva as cva19 } from "class-variance-authority";
|
|
2858
|
+
import { jsx as jsx41, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2859
|
+
var heroBlockVariants = cva19(
|
|
2072
2860
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2073
2861
|
{
|
|
2074
2862
|
variants: {
|
|
@@ -2088,7 +2876,7 @@ var heroBlockVariants = cva18(
|
|
|
2088
2876
|
}
|
|
2089
2877
|
}
|
|
2090
2878
|
);
|
|
2091
|
-
var HeroBlock =
|
|
2879
|
+
var HeroBlock = React38.forwardRef(
|
|
2092
2880
|
({
|
|
2093
2881
|
className,
|
|
2094
2882
|
variant,
|
|
@@ -2100,26 +2888,26 @@ var HeroBlock = React31.forwardRef(
|
|
|
2100
2888
|
actions,
|
|
2101
2889
|
...props
|
|
2102
2890
|
}, ref) => {
|
|
2103
|
-
return /* @__PURE__ */
|
|
2891
|
+
return /* @__PURE__ */ jsx41(
|
|
2104
2892
|
"div",
|
|
2105
2893
|
{
|
|
2106
2894
|
ref,
|
|
2107
2895
|
className: cn(heroBlockVariants({ variant, withPattern }), className),
|
|
2108
2896
|
...props,
|
|
2109
|
-
children: /* @__PURE__ */
|
|
2110
|
-
tagline && /* @__PURE__ */
|
|
2897
|
+
children: /* @__PURE__ */ jsx41("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs19("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
2898
|
+
tagline && /* @__PURE__ */ jsx41(
|
|
2111
2899
|
Badge,
|
|
2112
2900
|
{
|
|
2113
2901
|
variant: "default",
|
|
2114
|
-
icon: TaglineIcon ? /* @__PURE__ */
|
|
2902
|
+
icon: TaglineIcon ? /* @__PURE__ */ jsx41(Icon2, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2115
2903
|
iconGap: 2,
|
|
2116
2904
|
className: "mb-fluid-md",
|
|
2117
2905
|
children: tagline
|
|
2118
2906
|
}
|
|
2119
2907
|
),
|
|
2120
|
-
/* @__PURE__ */
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
actions && /* @__PURE__ */
|
|
2908
|
+
/* @__PURE__ */ jsx41(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
2909
|
+
/* @__PURE__ */ jsx41(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
2910
|
+
actions && /* @__PURE__ */ jsx41("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
2123
2911
|
] }) })
|
|
2124
2912
|
}
|
|
2125
2913
|
);
|
|
@@ -2128,12 +2916,12 @@ var HeroBlock = React31.forwardRef(
|
|
|
2128
2916
|
HeroBlock.displayName = "HeroBlock";
|
|
2129
2917
|
|
|
2130
2918
|
// src/components/code-block/CodeBlock.tsx
|
|
2131
|
-
import { useState as
|
|
2919
|
+
import { useState as useState3, useEffect as useEffect2, useCallback as useCallback3 } from "react";
|
|
2132
2920
|
import { Copy, Check as Check5 } from "lucide-react";
|
|
2133
|
-
import { jsx as
|
|
2921
|
+
import { jsx as jsx42, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2134
2922
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
2135
|
-
const [html, setHtml] =
|
|
2136
|
-
const [copied, setCopied] =
|
|
2923
|
+
const [html, setHtml] = useState3(null);
|
|
2924
|
+
const [copied, setCopied] = useState3(false);
|
|
2137
2925
|
useEffect2(() => {
|
|
2138
2926
|
getHighlighter().then((highlighter) => {
|
|
2139
2927
|
const loadedLangs = highlighter.getLoadedLanguages();
|
|
@@ -2146,16 +2934,16 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2146
2934
|
setCopied(true);
|
|
2147
2935
|
setTimeout(() => setCopied(false), 2e3);
|
|
2148
2936
|
}, [code]);
|
|
2149
|
-
const copyButton = /* @__PURE__ */
|
|
2937
|
+
const copyButton = /* @__PURE__ */ jsx42(
|
|
2150
2938
|
"button",
|
|
2151
2939
|
{
|
|
2152
2940
|
onClick: handleCopy,
|
|
2153
2941
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
2154
2942
|
"aria-label": "Copy code",
|
|
2155
|
-
children: copied ? /* @__PURE__ */
|
|
2943
|
+
children: copied ? /* @__PURE__ */ jsx42(Check5, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx42(Copy, { className: "w-3.5 h-3.5" })
|
|
2156
2944
|
}
|
|
2157
2945
|
);
|
|
2158
|
-
return /* @__PURE__ */
|
|
2946
|
+
return /* @__PURE__ */ jsxs20(
|
|
2159
2947
|
"div",
|
|
2160
2948
|
{
|
|
2161
2949
|
className: cn(
|
|
@@ -2163,27 +2951,27 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2163
2951
|
className
|
|
2164
2952
|
),
|
|
2165
2953
|
children: [
|
|
2166
|
-
title && /* @__PURE__ */
|
|
2167
|
-
/* @__PURE__ */
|
|
2168
|
-
html ? /* @__PURE__ */
|
|
2954
|
+
title && /* @__PURE__ */ jsx42("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__ */ jsx42("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
2955
|
+
/* @__PURE__ */ jsx42("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
2956
|
+
html ? /* @__PURE__ */ jsx42(
|
|
2169
2957
|
"div",
|
|
2170
2958
|
{
|
|
2171
2959
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
2172
2960
|
dangerouslySetInnerHTML: { __html: html }
|
|
2173
2961
|
}
|
|
2174
|
-
) : /* @__PURE__ */
|
|
2962
|
+
) : /* @__PURE__ */ jsx42("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ jsx42("code", { children: code }) })
|
|
2175
2963
|
]
|
|
2176
2964
|
}
|
|
2177
2965
|
);
|
|
2178
2966
|
}
|
|
2179
2967
|
|
|
2180
2968
|
// src/components/window-frame/WindowFrame.tsx
|
|
2181
|
-
import * as
|
|
2182
|
-
import { useState as
|
|
2183
|
-
import { jsx as
|
|
2184
|
-
var WindowFrame =
|
|
2969
|
+
import * as React39 from "react";
|
|
2970
|
+
import { useState as useState4 } from "react";
|
|
2971
|
+
import { jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2972
|
+
var WindowFrame = React39.forwardRef(
|
|
2185
2973
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
2186
|
-
const [internalActive, setInternalActive] =
|
|
2974
|
+
const [internalActive, setInternalActive] = useState4(tabs?.[0]?.id ?? "");
|
|
2187
2975
|
const currentTab = activeTab ?? internalActive;
|
|
2188
2976
|
const handleTabChange = (id) => {
|
|
2189
2977
|
if (onTabChange) {
|
|
@@ -2192,7 +2980,7 @@ var WindowFrame = React32.forwardRef(
|
|
|
2192
2980
|
setInternalActive(id);
|
|
2193
2981
|
}
|
|
2194
2982
|
};
|
|
2195
|
-
return /* @__PURE__ */
|
|
2983
|
+
return /* @__PURE__ */ jsxs21(
|
|
2196
2984
|
"div",
|
|
2197
2985
|
{
|
|
2198
2986
|
ref,
|
|
@@ -2202,13 +2990,13 @@ var WindowFrame = React32.forwardRef(
|
|
|
2202
2990
|
),
|
|
2203
2991
|
...props,
|
|
2204
2992
|
children: [
|
|
2205
|
-
/* @__PURE__ */
|
|
2206
|
-
/* @__PURE__ */
|
|
2207
|
-
/* @__PURE__ */
|
|
2208
|
-
/* @__PURE__ */
|
|
2209
|
-
/* @__PURE__ */
|
|
2993
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
2994
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
2995
|
+
/* @__PURE__ */ jsx43("div", { className: "w-3 h-3 rounded-full bg-[#FF5F56]" }),
|
|
2996
|
+
/* @__PURE__ */ jsx43("div", { className: "w-3 h-3 rounded-full bg-[#FFBD2E]" }),
|
|
2997
|
+
/* @__PURE__ */ jsx43("div", { className: "w-3 h-3 rounded-full bg-[#27C93F]" })
|
|
2210
2998
|
] }),
|
|
2211
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */
|
|
2999
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ jsx43("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsx43(
|
|
2212
3000
|
"button",
|
|
2213
3001
|
{
|
|
2214
3002
|
type: "button",
|
|
@@ -2220,9 +3008,9 @@ var WindowFrame = React32.forwardRef(
|
|
|
2220
3008
|
children: tab.label
|
|
2221
3009
|
},
|
|
2222
3010
|
tab.id
|
|
2223
|
-
)) }) : /* @__PURE__ */
|
|
3011
|
+
)) }) : /* @__PURE__ */ jsx43("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
2224
3012
|
] }),
|
|
2225
|
-
/* @__PURE__ */
|
|
3013
|
+
/* @__PURE__ */ jsx43("div", { children })
|
|
2226
3014
|
]
|
|
2227
3015
|
}
|
|
2228
3016
|
);
|
|
@@ -2237,6 +3025,7 @@ export {
|
|
|
2237
3025
|
BergetLogo,
|
|
2238
3026
|
Box,
|
|
2239
3027
|
Button2 as Button,
|
|
3028
|
+
COUNTRIES,
|
|
2240
3029
|
Card2 as Card,
|
|
2241
3030
|
CardContent,
|
|
2242
3031
|
CardDescription,
|
|
@@ -2246,6 +3035,7 @@ export {
|
|
|
2246
3035
|
Checkbox2 as Checkbox,
|
|
2247
3036
|
CodeBlock,
|
|
2248
3037
|
Container,
|
|
3038
|
+
CountrySelect,
|
|
2249
3039
|
Dialog,
|
|
2250
3040
|
DialogClose,
|
|
2251
3041
|
DialogContent,
|
|
@@ -2256,6 +3046,7 @@ export {
|
|
|
2256
3046
|
DialogPortal,
|
|
2257
3047
|
DialogTitle,
|
|
2258
3048
|
DialogTrigger,
|
|
3049
|
+
EU_COUNTRY_CODES,
|
|
2259
3050
|
FeatureList,
|
|
2260
3051
|
Field,
|
|
2261
3052
|
FieldContent,
|
|
@@ -2271,6 +3062,16 @@ export {
|
|
|
2271
3062
|
HeroBlock,
|
|
2272
3063
|
Icon2 as Icon,
|
|
2273
3064
|
Input2 as Input,
|
|
3065
|
+
Item2 as Item,
|
|
3066
|
+
ItemActions,
|
|
3067
|
+
ItemContent,
|
|
3068
|
+
ItemDescription2 as ItemDescription,
|
|
3069
|
+
ItemFooter,
|
|
3070
|
+
ItemGroup,
|
|
3071
|
+
ItemHeader,
|
|
3072
|
+
ItemMedia2 as ItemMedia,
|
|
3073
|
+
ItemSeparator2 as ItemSeparator,
|
|
3074
|
+
ItemTitle2 as ItemTitle,
|
|
2274
3075
|
Label2 as Label,
|
|
2275
3076
|
LanguageSelect,
|
|
2276
3077
|
Link,
|
|
@@ -2279,6 +3080,14 @@ export {
|
|
|
2279
3080
|
ListItem,
|
|
2280
3081
|
Select2 as Select,
|
|
2281
3082
|
Switch,
|
|
3083
|
+
Table2 as Table,
|
|
3084
|
+
TableBody2 as TableBody,
|
|
3085
|
+
TableCaption2 as TableCaption,
|
|
3086
|
+
TableCell2 as TableCell,
|
|
3087
|
+
TableFooter2 as TableFooter,
|
|
3088
|
+
TableHead2 as TableHead,
|
|
3089
|
+
TableHeader2 as TableHeader,
|
|
3090
|
+
TableRow2 as TableRow,
|
|
2282
3091
|
TextArea,
|
|
2283
3092
|
ThemeProvider,
|
|
2284
3093
|
ThemeToggle,
|
|
@@ -2291,7 +3100,10 @@ export {
|
|
|
2291
3100
|
cardVariants,
|
|
2292
3101
|
checkboxVariants,
|
|
2293
3102
|
containerVariants,
|
|
3103
|
+
getCountryByCode,
|
|
3104
|
+
getCountryByName,
|
|
2294
3105
|
gridVariants,
|
|
3106
|
+
isEUCountry,
|
|
2295
3107
|
linkVariants,
|
|
2296
3108
|
selectVariants,
|
|
2297
3109
|
switchRootVariants,
|