@bergetai/ui 0.2.6 → 0.3.1
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 +988 -715
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +175 -66
- package/dist/index.d.ts +175 -66
- package/dist/index.js +945 -681
- package/dist/index.js.map +1 -1
- package/package.json +8 -17
- package/LICENSE +0 -21
package/dist/index.cjs
CHANGED
|
@@ -98,9 +98,9 @@ __export(index_exports, {
|
|
|
98
98
|
FieldTitle: () => FieldTitle,
|
|
99
99
|
Grid: () => Grid,
|
|
100
100
|
HeroBlock: () => HeroBlock,
|
|
101
|
-
Icon: () =>
|
|
101
|
+
Icon: () => Icon,
|
|
102
102
|
Input: () => Input2,
|
|
103
|
-
Item: () =>
|
|
103
|
+
Item: () => Item2,
|
|
104
104
|
ItemActions: () => ItemActions,
|
|
105
105
|
ItemContent: () => ItemContent,
|
|
106
106
|
ItemDescription: () => ItemDescription2,
|
|
@@ -110,12 +110,20 @@ __export(index_exports, {
|
|
|
110
110
|
ItemMedia: () => ItemMedia2,
|
|
111
111
|
ItemSeparator: () => ItemSeparator2,
|
|
112
112
|
ItemTitle: () => ItemTitle2,
|
|
113
|
-
Label: () =>
|
|
113
|
+
Label: () => Label,
|
|
114
114
|
LanguageSelect: () => LanguageSelect,
|
|
115
115
|
Link: () => Link,
|
|
116
116
|
List: () => List,
|
|
117
117
|
ListHeader: () => ListHeader,
|
|
118
118
|
ListItem: () => ListItem,
|
|
119
|
+
NavigationMenu: () => NavigationMenu,
|
|
120
|
+
NavigationMenuContent: () => NavigationMenuContent,
|
|
121
|
+
NavigationMenuIndicator: () => NavigationMenuIndicator,
|
|
122
|
+
NavigationMenuItem: () => NavigationMenuItem,
|
|
123
|
+
NavigationMenuLink: () => NavigationMenuLink,
|
|
124
|
+
NavigationMenuList: () => NavigationMenuList,
|
|
125
|
+
NavigationMenuTrigger: () => NavigationMenuTrigger,
|
|
126
|
+
NavigationMenuViewport: () => NavigationMenuViewport,
|
|
119
127
|
Select: () => Select2,
|
|
120
128
|
Switch: () => Switch,
|
|
121
129
|
Table: () => Table2,
|
|
@@ -143,6 +151,7 @@ __export(index_exports, {
|
|
|
143
151
|
gridVariants: () => gridVariants,
|
|
144
152
|
isEUCountry: () => isEUCountry,
|
|
145
153
|
linkVariants: () => linkVariants,
|
|
154
|
+
navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
|
|
146
155
|
selectVariants: () => selectVariants,
|
|
147
156
|
switchRootVariants: () => switchRootVariants,
|
|
148
157
|
switchThumbVariants: () => switchThumbVariants,
|
|
@@ -235,9 +244,10 @@ function useTheme() {
|
|
|
235
244
|
}
|
|
236
245
|
|
|
237
246
|
// src/components/theme-provider/ThemeToggle.tsx
|
|
238
|
-
var
|
|
247
|
+
var React3 = __toESM(require("react"), 1);
|
|
239
248
|
|
|
240
249
|
// src/lib/utils.ts
|
|
250
|
+
var React2 = __toESM(require("react"), 1);
|
|
241
251
|
var import_clsx = require("clsx");
|
|
242
252
|
var import_tailwind_merge = require("tailwind-merge");
|
|
243
253
|
var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
@@ -258,13 +268,17 @@ var twMerge = (0, import_tailwind_merge.extendTailwindMerge)({
|
|
|
258
268
|
function cn(...inputs) {
|
|
259
269
|
return twMerge((0, import_clsx.clsx)(inputs));
|
|
260
270
|
}
|
|
271
|
+
function asChildRender(asChild, children) {
|
|
272
|
+
if (!asChild) return void 0;
|
|
273
|
+
return React2.Children.only(children);
|
|
274
|
+
}
|
|
261
275
|
|
|
262
276
|
// src/components/theme-provider/ThemeToggle.tsx
|
|
263
277
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
264
|
-
var ThemeToggle =
|
|
278
|
+
var ThemeToggle = React3.forwardRef(
|
|
265
279
|
({ className, label = "Toggle theme", size = "md", ...props }, ref) => {
|
|
266
280
|
const { theme, resolvedTheme, setTheme } = useTheme();
|
|
267
|
-
const toggle =
|
|
281
|
+
const toggle = React3.useCallback(() => {
|
|
268
282
|
setTheme(theme === "dark" ? "light" : "dark");
|
|
269
283
|
}, [theme, setTheme]);
|
|
270
284
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
@@ -347,9 +361,9 @@ var ThemeToggle = React2.forwardRef(
|
|
|
347
361
|
ThemeToggle.displayName = "ThemeToggle";
|
|
348
362
|
|
|
349
363
|
// src/primitives/button.tsx
|
|
350
|
-
var
|
|
364
|
+
var React4 = __toESM(require("react"), 1);
|
|
351
365
|
var import_class_variance_authority = require("class-variance-authority");
|
|
352
|
-
var
|
|
366
|
+
var import_button = require("@base-ui/react/button");
|
|
353
367
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
354
368
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
355
369
|
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -380,10 +394,19 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
380
394
|
}
|
|
381
395
|
}
|
|
382
396
|
);
|
|
383
|
-
var Button =
|
|
384
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
385
|
-
const Comp =
|
|
386
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
397
|
+
var Button = React4.forwardRef(
|
|
398
|
+
({ className, variant, size, asChild = false, children, ...props }, ref) => {
|
|
399
|
+
const Comp = import_button.Button;
|
|
400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
401
|
+
Comp,
|
|
402
|
+
{
|
|
403
|
+
ref,
|
|
404
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
405
|
+
render: asChild ? children : void 0,
|
|
406
|
+
...props,
|
|
407
|
+
children: asChild ? void 0 : children
|
|
408
|
+
}
|
|
409
|
+
);
|
|
387
410
|
}
|
|
388
411
|
);
|
|
389
412
|
Button.displayName = "Button";
|
|
@@ -443,7 +466,7 @@ function Button2({
|
|
|
443
466
|
}
|
|
444
467
|
|
|
445
468
|
// src/components/typography/Typography.tsx
|
|
446
|
-
var
|
|
469
|
+
var React5 = __toESM(require("react"), 1);
|
|
447
470
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
448
471
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
449
472
|
var typographyVariants = (0, import_class_variance_authority2.cva)("", {
|
|
@@ -490,7 +513,7 @@ var defaultElementMap = {
|
|
|
490
513
|
mono: "p",
|
|
491
514
|
code: "span"
|
|
492
515
|
};
|
|
493
|
-
var Typography =
|
|
516
|
+
var Typography = React5.forwardRef(
|
|
494
517
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
495
518
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
496
519
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -507,13 +530,13 @@ var Typography = React4.forwardRef(
|
|
|
507
530
|
Typography.displayName = "Typography";
|
|
508
531
|
|
|
509
532
|
// src/components/card/Card.tsx
|
|
510
|
-
var
|
|
533
|
+
var React7 = __toESM(require("react"), 1);
|
|
511
534
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
512
535
|
|
|
513
536
|
// src/primitives/card.tsx
|
|
514
|
-
var
|
|
537
|
+
var React6 = __toESM(require("react"), 1);
|
|
515
538
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
516
|
-
var Card =
|
|
539
|
+
var Card = React6.forwardRef(
|
|
517
540
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
518
541
|
"div",
|
|
519
542
|
{
|
|
@@ -524,23 +547,23 @@ var Card = React5.forwardRef(
|
|
|
524
547
|
)
|
|
525
548
|
);
|
|
526
549
|
Card.displayName = "Card";
|
|
527
|
-
var CardHeader =
|
|
550
|
+
var CardHeader = React6.forwardRef(
|
|
528
551
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
529
552
|
);
|
|
530
553
|
CardHeader.displayName = "CardHeader";
|
|
531
|
-
var CardTitle =
|
|
554
|
+
var CardTitle = React6.forwardRef(
|
|
532
555
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { ref, className: cn("text-2xl leading-none tracking-tight", className), ...props })
|
|
533
556
|
);
|
|
534
557
|
CardTitle.displayName = "CardTitle";
|
|
535
|
-
var CardDescription =
|
|
558
|
+
var CardDescription = React6.forwardRef(
|
|
536
559
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
537
560
|
);
|
|
538
561
|
CardDescription.displayName = "CardDescription";
|
|
539
|
-
var CardContent =
|
|
562
|
+
var CardContent = React6.forwardRef(
|
|
540
563
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
541
564
|
);
|
|
542
565
|
CardContent.displayName = "CardContent";
|
|
543
|
-
var CardFooter =
|
|
566
|
+
var CardFooter = React6.forwardRef(
|
|
544
567
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
545
568
|
);
|
|
546
569
|
CardFooter.displayName = "CardFooter";
|
|
@@ -565,7 +588,7 @@ var cardVariants = (0, import_class_variance_authority3.cva)("rounded-berget-sm"
|
|
|
565
588
|
padding: "md"
|
|
566
589
|
}
|
|
567
590
|
});
|
|
568
|
-
var Card2 =
|
|
591
|
+
var Card2 = React7.forwardRef(
|
|
569
592
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
570
593
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
571
594
|
Card,
|
|
@@ -581,7 +604,7 @@ var Card2 = React6.forwardRef(
|
|
|
581
604
|
Card2.displayName = "Card";
|
|
582
605
|
|
|
583
606
|
// src/components/badge/Badge.tsx
|
|
584
|
-
var
|
|
607
|
+
var React8 = __toESM(require("react"), 1);
|
|
585
608
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
586
609
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
587
610
|
var badgeVariants = (0, import_class_variance_authority4.cva)(
|
|
@@ -616,7 +639,7 @@ var badgeVariants = (0, import_class_variance_authority4.cva)(
|
|
|
616
639
|
}
|
|
617
640
|
}
|
|
618
641
|
);
|
|
619
|
-
var Badge =
|
|
642
|
+
var Badge = React8.forwardRef(
|
|
620
643
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
621
644
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
622
645
|
icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
@@ -627,11 +650,11 @@ var Badge = React7.forwardRef(
|
|
|
627
650
|
Badge.displayName = "Badge";
|
|
628
651
|
|
|
629
652
|
// src/components/alert/Alert.tsx
|
|
630
|
-
var
|
|
653
|
+
var React10 = __toESM(require("react"), 1);
|
|
631
654
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
632
655
|
|
|
633
656
|
// src/primitives/alert.tsx
|
|
634
|
-
var
|
|
657
|
+
var React9 = __toESM(require("react"), 1);
|
|
635
658
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
636
659
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
637
660
|
var alertVariants = (0, import_class_variance_authority5.cva)(
|
|
@@ -648,13 +671,13 @@ var alertVariants = (0, import_class_variance_authority5.cva)(
|
|
|
648
671
|
}
|
|
649
672
|
}
|
|
650
673
|
);
|
|
651
|
-
var Alert =
|
|
674
|
+
var Alert = React9.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
652
675
|
Alert.displayName = "Alert";
|
|
653
|
-
var AlertTitle =
|
|
676
|
+
var AlertTitle = React9.forwardRef(
|
|
654
677
|
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { ref, className: cn("mb-1 leading-none tracking-tight", className), ...props })
|
|
655
678
|
);
|
|
656
679
|
AlertTitle.displayName = "AlertTitle";
|
|
657
|
-
var AlertDescription =
|
|
680
|
+
var AlertDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
658
681
|
AlertDescription.displayName = "AlertDescription";
|
|
659
682
|
|
|
660
683
|
// src/components/alert/Alert.tsx
|
|
@@ -673,46 +696,49 @@ var alertVariants2 = (0, import_class_variance_authority6.cva)("", {
|
|
|
673
696
|
variant: "default"
|
|
674
697
|
}
|
|
675
698
|
});
|
|
676
|
-
var Alert2 =
|
|
699
|
+
var Alert2 = React10.forwardRef(
|
|
677
700
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Alert, { ref, className: cn(alertVariants2({ variant }), className), ...props })
|
|
678
701
|
);
|
|
679
702
|
Alert2.displayName = "Alert";
|
|
680
703
|
|
|
681
704
|
// src/components/dialog/Dialog.tsx
|
|
682
|
-
var
|
|
683
|
-
var
|
|
705
|
+
var React11 = __toESM(require("react"), 1);
|
|
706
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
684
707
|
var import_lucide_react = require("lucide-react");
|
|
685
708
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
686
|
-
var Dialog =
|
|
687
|
-
var DialogTrigger =
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
709
|
+
var Dialog = import_dialog.Dialog.Root;
|
|
710
|
+
var DialogTrigger = React11.forwardRef(
|
|
711
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_dialog.Dialog.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
712
|
+
);
|
|
713
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
714
|
+
var DialogPortal = import_dialog.Dialog.Portal;
|
|
715
|
+
var DialogClose = import_dialog.Dialog.Close;
|
|
716
|
+
var DialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
717
|
+
import_dialog.Dialog.Backdrop,
|
|
692
718
|
{
|
|
693
719
|
ref,
|
|
694
720
|
className: cn(
|
|
695
|
-
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg
|
|
721
|
+
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
696
722
|
className
|
|
697
723
|
),
|
|
698
724
|
...props
|
|
699
725
|
}
|
|
700
726
|
));
|
|
701
|
-
DialogOverlay.displayName =
|
|
702
|
-
var DialogContent =
|
|
727
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
728
|
+
var DialogContent = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(DialogPortal, { children: [
|
|
703
729
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogOverlay, {}),
|
|
704
730
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
705
|
-
|
|
731
|
+
import_dialog.Dialog.Popup,
|
|
706
732
|
{
|
|
707
733
|
ref,
|
|
708
734
|
className: cn(
|
|
709
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg
|
|
735
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95",
|
|
710
736
|
className
|
|
711
737
|
),
|
|
712
738
|
...props,
|
|
713
739
|
children: [
|
|
714
740
|
children,
|
|
715
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
741
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_dialog.Dialog.Close, { className: "absolute right-4 top-4 rounded-berget-xs opacity-70 ring-offset-berget-dialog-bg transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-berget-focus-ring focus:ring-offset-2 disabled:pointer-events-none data-open:bg-berget-muted data-open:text-berget-muted-foreground", children: [
|
|
716
742
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react.X, { className: "size-4" }),
|
|
717
743
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Close" })
|
|
718
744
|
] })
|
|
@@ -720,7 +746,7 @@ var DialogContent = React10.forwardRef(({ className, children, ...props }, ref)
|
|
|
720
746
|
}
|
|
721
747
|
)
|
|
722
748
|
] }));
|
|
723
|
-
DialogContent.displayName =
|
|
749
|
+
DialogContent.displayName = "DialogContent";
|
|
724
750
|
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: cn("flex flex-col gap-1.5 text-center sm:text-left", className), ...props });
|
|
725
751
|
DialogHeader.displayName = "DialogHeader";
|
|
726
752
|
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
@@ -731,45 +757,64 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
|
|
|
731
757
|
}
|
|
732
758
|
);
|
|
733
759
|
DialogFooter.displayName = "DialogFooter";
|
|
734
|
-
var DialogTitle =
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
760
|
+
var DialogTitle = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
761
|
+
import_dialog.Dialog.Title,
|
|
762
|
+
{
|
|
763
|
+
ref,
|
|
764
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "h5", color: "default", as: "h2", className }),
|
|
765
|
+
...props,
|
|
766
|
+
children
|
|
767
|
+
}
|
|
768
|
+
));
|
|
769
|
+
DialogTitle.displayName = "DialogTitle";
|
|
770
|
+
var DialogDescription = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
771
|
+
import_dialog.Dialog.Description,
|
|
772
|
+
{
|
|
773
|
+
ref,
|
|
774
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Typography, { variant: "small", color: "muted", className }),
|
|
775
|
+
...props,
|
|
776
|
+
children
|
|
777
|
+
}
|
|
778
|
+
));
|
|
779
|
+
DialogDescription.displayName = "DialogDescription";
|
|
738
780
|
|
|
739
781
|
// src/components/alert-dialog/AlertDialog.tsx
|
|
740
|
-
var
|
|
741
|
-
var
|
|
782
|
+
var React12 = __toESM(require("react"), 1);
|
|
783
|
+
var import_alert_dialog = require("@base-ui/react/alert-dialog");
|
|
742
784
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
743
|
-
var AlertDialog =
|
|
744
|
-
var AlertDialogTrigger =
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
785
|
+
var AlertDialog = import_alert_dialog.AlertDialog.Root;
|
|
786
|
+
var AlertDialogTrigger = React12.forwardRef(
|
|
787
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_alert_dialog.AlertDialog.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
788
|
+
);
|
|
789
|
+
AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
790
|
+
var AlertDialogPortal = import_alert_dialog.AlertDialog.Portal;
|
|
791
|
+
var AlertDialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
792
|
+
import_alert_dialog.AlertDialog.Backdrop,
|
|
748
793
|
{
|
|
749
794
|
ref,
|
|
750
795
|
className: cn(
|
|
751
|
-
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg
|
|
796
|
+
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
752
797
|
className
|
|
753
798
|
),
|
|
754
799
|
...props
|
|
755
800
|
}
|
|
756
801
|
));
|
|
757
|
-
AlertDialogOverlay.displayName =
|
|
758
|
-
var AlertDialogContent =
|
|
802
|
+
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
803
|
+
var AlertDialogContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(AlertDialogPortal, { children: [
|
|
759
804
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AlertDialogOverlay, {}),
|
|
760
805
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
761
|
-
|
|
806
|
+
import_alert_dialog.AlertDialog.Popup,
|
|
762
807
|
{
|
|
763
808
|
ref,
|
|
764
809
|
className: cn(
|
|
765
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg
|
|
810
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95",
|
|
766
811
|
className
|
|
767
812
|
),
|
|
768
813
|
...props
|
|
769
814
|
}
|
|
770
815
|
)
|
|
771
816
|
] }));
|
|
772
|
-
AlertDialogContent.displayName =
|
|
817
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
773
818
|
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: cn("flex flex-col gap-1.5 text-center sm:text-left", className), ...props });
|
|
774
819
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
775
820
|
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
@@ -780,116 +825,181 @@ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_
|
|
|
780
825
|
}
|
|
781
826
|
);
|
|
782
827
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
783
|
-
var AlertDialogTitle =
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
828
|
+
var AlertDialogTitle = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
829
|
+
import_alert_dialog.AlertDialog.Title,
|
|
830
|
+
{
|
|
831
|
+
ref,
|
|
832
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typography, { variant: "h5", color: "default", as: "h2", className }),
|
|
833
|
+
...props,
|
|
834
|
+
children
|
|
835
|
+
}
|
|
836
|
+
));
|
|
837
|
+
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
838
|
+
var AlertDialogDescription = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
839
|
+
import_alert_dialog.AlertDialog.Description,
|
|
840
|
+
{
|
|
841
|
+
ref,
|
|
842
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typography, { variant: "small", color: "muted", className }),
|
|
843
|
+
...props,
|
|
844
|
+
children
|
|
845
|
+
}
|
|
846
|
+
));
|
|
847
|
+
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
848
|
+
var AlertDialogAction = React12.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
849
|
+
import_alert_dialog.AlertDialog.Close,
|
|
850
|
+
{
|
|
851
|
+
ref,
|
|
852
|
+
className: cn(className),
|
|
853
|
+
render: asChildRender(asChild, children),
|
|
854
|
+
...props,
|
|
855
|
+
children: asChild ? void 0 : children
|
|
856
|
+
}
|
|
857
|
+
));
|
|
858
|
+
AlertDialogAction.displayName = "AlertDialogAction";
|
|
859
|
+
var AlertDialogCancel = React12.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
860
|
+
import_alert_dialog.AlertDialog.Close,
|
|
861
|
+
{
|
|
862
|
+
ref,
|
|
863
|
+
className: cn("mt-2 sm:mt-0", className),
|
|
864
|
+
render: asChildRender(asChild, children),
|
|
865
|
+
...props,
|
|
866
|
+
children: asChild ? void 0 : children
|
|
867
|
+
}
|
|
868
|
+
));
|
|
869
|
+
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
791
870
|
|
|
792
871
|
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
793
|
-
var
|
|
794
|
-
var
|
|
872
|
+
var React13 = __toESM(require("react"), 1);
|
|
873
|
+
var import_menu = require("@base-ui/react/menu");
|
|
795
874
|
var import_lucide_react2 = require("lucide-react");
|
|
796
875
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
797
|
-
var DropdownMenu =
|
|
798
|
-
var DropdownMenuTrigger =
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
var
|
|
803
|
-
var
|
|
804
|
-
|
|
876
|
+
var DropdownMenu = import_menu.Menu.Root;
|
|
877
|
+
var DropdownMenuTrigger = React13.forwardRef(
|
|
878
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_menu.Menu.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
879
|
+
);
|
|
880
|
+
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
881
|
+
var DropdownMenuGroup = import_menu.Menu.Group;
|
|
882
|
+
var DropdownMenuPortal = import_menu.Menu.Portal;
|
|
883
|
+
var DropdownMenuSub = import_menu.Menu.SubmenuRoot;
|
|
884
|
+
var DropdownMenuRadioGroup = import_menu.Menu.RadioGroup;
|
|
885
|
+
var DropdownMenuSubTrigger = React13.forwardRef(({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
886
|
+
import_menu.Menu.SubmenuTrigger,
|
|
805
887
|
{
|
|
806
888
|
ref,
|
|
807
889
|
className: cn(
|
|
808
|
-
"flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-
|
|
890
|
+
"flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-popup-open:bg-berget-surface-hover [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
809
891
|
inset && "pl-8",
|
|
810
892
|
className
|
|
811
893
|
),
|
|
894
|
+
render: asChildRender(asChild, children),
|
|
812
895
|
...props,
|
|
813
|
-
children: [
|
|
896
|
+
children: asChild ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
814
897
|
children,
|
|
815
898
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.ChevronRight, { className: "ml-auto" })
|
|
816
|
-
]
|
|
899
|
+
] })
|
|
817
900
|
}
|
|
818
901
|
));
|
|
819
|
-
DropdownMenuSubTrigger.displayName =
|
|
820
|
-
var DropdownMenuSubContent =
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
902
|
+
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
903
|
+
var DropdownMenuSubContent = React13.forwardRef(
|
|
904
|
+
({ className, side = "right", align = "start", alignOffset = -3, sideOffset = 0, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
905
|
+
import_menu.Menu.Positioner,
|
|
906
|
+
{
|
|
907
|
+
side,
|
|
908
|
+
align,
|
|
909
|
+
alignOffset,
|
|
910
|
+
sideOffset,
|
|
911
|
+
className: "isolate z-50 outline-none",
|
|
912
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
913
|
+
import_menu.Menu.Popup,
|
|
914
|
+
{
|
|
915
|
+
ref,
|
|
916
|
+
className: cn(
|
|
917
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-lg transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-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-[--transform-origin]",
|
|
918
|
+
className
|
|
919
|
+
),
|
|
920
|
+
...props
|
|
921
|
+
}
|
|
922
|
+
)
|
|
923
|
+
}
|
|
924
|
+
) })
|
|
925
|
+
);
|
|
926
|
+
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
927
|
+
var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, align = "center", side, alignOffset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_menu.Menu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
928
|
+
import_menu.Menu.Positioner,
|
|
834
929
|
{
|
|
835
|
-
|
|
930
|
+
side,
|
|
931
|
+
align,
|
|
932
|
+
alignOffset,
|
|
836
933
|
sideOffset,
|
|
837
|
-
className:
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
934
|
+
className: "isolate z-50 outline-none",
|
|
935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
936
|
+
import_menu.Menu.Popup,
|
|
937
|
+
{
|
|
938
|
+
ref,
|
|
939
|
+
className: cn(
|
|
940
|
+
"z-50 max-h-[var(--available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-berget-xs border border-berget-border bg-berget-popover p-1 text-berget-popover-foreground shadow-berget-md transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-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-[--transform-origin]",
|
|
941
|
+
className
|
|
942
|
+
),
|
|
943
|
+
...props
|
|
944
|
+
}
|
|
945
|
+
)
|
|
842
946
|
}
|
|
843
947
|
) }));
|
|
844
|
-
DropdownMenuContent.displayName =
|
|
845
|
-
var DropdownMenuItem =
|
|
846
|
-
|
|
948
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
949
|
+
var DropdownMenuItem = React13.forwardRef(({ className, inset, asChild, children, textValue, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
950
|
+
import_menu.Menu.Item,
|
|
847
951
|
{
|
|
848
952
|
ref,
|
|
953
|
+
label: textValue,
|
|
849
954
|
className: cn(
|
|
850
|
-
"relative flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-
|
|
955
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
851
956
|
inset && "pl-8",
|
|
852
957
|
className
|
|
853
958
|
),
|
|
854
|
-
|
|
959
|
+
render: asChildRender(asChild, children),
|
|
960
|
+
...props,
|
|
961
|
+
children: asChild ? void 0 : children
|
|
855
962
|
}
|
|
856
963
|
));
|
|
857
|
-
DropdownMenuItem.displayName =
|
|
858
|
-
var DropdownMenuCheckboxItem =
|
|
859
|
-
|
|
964
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
965
|
+
var DropdownMenuCheckboxItem = React13.forwardRef(({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
966
|
+
import_menu.Menu.CheckboxItem,
|
|
860
967
|
{
|
|
861
968
|
ref,
|
|
969
|
+
label: textValue,
|
|
862
970
|
className: cn(
|
|
863
|
-
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-
|
|
971
|
+
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
864
972
|
className
|
|
865
973
|
),
|
|
866
|
-
|
|
974
|
+
render: asChildRender(asChild, children),
|
|
867
975
|
...props,
|
|
868
976
|
children: [
|
|
869
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
870
|
-
children
|
|
977
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_menu.Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Check, { className: "size-4" }) }) }),
|
|
978
|
+
asChild ? void 0 : children
|
|
871
979
|
]
|
|
872
980
|
}
|
|
873
981
|
));
|
|
874
|
-
DropdownMenuCheckboxItem.displayName =
|
|
875
|
-
var DropdownMenuRadioItem =
|
|
876
|
-
|
|
982
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
983
|
+
var DropdownMenuRadioItem = React13.forwardRef(({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
984
|
+
import_menu.Menu.RadioItem,
|
|
877
985
|
{
|
|
878
986
|
ref,
|
|
987
|
+
label: textValue,
|
|
879
988
|
className: cn(
|
|
880
|
-
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-
|
|
989
|
+
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
881
990
|
className
|
|
882
991
|
),
|
|
992
|
+
render: asChildRender(asChild, children),
|
|
883
993
|
...props,
|
|
884
994
|
children: [
|
|
885
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
886
|
-
children
|
|
995
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_menu.Menu.RadioItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Circle, { className: "size-2 fill-current" }) }) }),
|
|
996
|
+
asChild ? void 0 : children
|
|
887
997
|
]
|
|
888
998
|
}
|
|
889
999
|
));
|
|
890
|
-
DropdownMenuRadioItem.displayName =
|
|
891
|
-
var DropdownMenuLabel =
|
|
892
|
-
|
|
1000
|
+
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
1001
|
+
var DropdownMenuLabel = React13.forwardRef(({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1002
|
+
import_menu.Menu.GroupLabel,
|
|
893
1003
|
{
|
|
894
1004
|
ref,
|
|
895
1005
|
className: cn(
|
|
@@ -897,19 +1007,21 @@ var DropdownMenuLabel = React12.forwardRef(({ className, inset, ...props }, ref)
|
|
|
897
1007
|
inset && "pl-8",
|
|
898
1008
|
className
|
|
899
1009
|
),
|
|
900
|
-
|
|
1010
|
+
render: asChildRender(asChild, children),
|
|
1011
|
+
...props,
|
|
1012
|
+
children: asChild ? void 0 : children
|
|
901
1013
|
}
|
|
902
1014
|
));
|
|
903
|
-
DropdownMenuLabel.displayName =
|
|
904
|
-
var DropdownMenuSeparator =
|
|
905
|
-
|
|
1015
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
1016
|
+
var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1017
|
+
import_menu.Menu.Separator,
|
|
906
1018
|
{
|
|
907
1019
|
ref,
|
|
908
1020
|
className: cn("-mx-1 my-1 h-px bg-berget-separator", className),
|
|
909
1021
|
...props
|
|
910
1022
|
}
|
|
911
1023
|
));
|
|
912
|
-
DropdownMenuSeparator.displayName =
|
|
1024
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
913
1025
|
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
914
1026
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
915
1027
|
"span",
|
|
@@ -921,21 +1033,128 @@ var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
|
921
1033
|
};
|
|
922
1034
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
923
1035
|
|
|
924
|
-
// src/components/
|
|
1036
|
+
// src/components/navigation-menu/NavigationMenu.tsx
|
|
925
1037
|
var React14 = __toESM(require("react"), 1);
|
|
1038
|
+
var import_navigation_menu = require("@base-ui/react/navigation-menu");
|
|
1039
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
1040
|
+
var import_lucide_react3 = require("lucide-react");
|
|
1041
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1042
|
+
var NavigationMenu = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1043
|
+
import_navigation_menu.NavigationMenu.Root,
|
|
1044
|
+
{
|
|
1045
|
+
ref,
|
|
1046
|
+
className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className),
|
|
1047
|
+
...props,
|
|
1048
|
+
children: [
|
|
1049
|
+
children,
|
|
1050
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NavigationMenuViewport, {})
|
|
1051
|
+
]
|
|
1052
|
+
}
|
|
1053
|
+
));
|
|
1054
|
+
NavigationMenu.displayName = "NavigationMenu";
|
|
1055
|
+
var NavigationMenuList = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1056
|
+
import_navigation_menu.NavigationMenu.List,
|
|
1057
|
+
{
|
|
1058
|
+
ref,
|
|
1059
|
+
className: cn("group flex flex-1 list-none items-center justify-center gap-1", className),
|
|
1060
|
+
...props
|
|
1061
|
+
}
|
|
1062
|
+
));
|
|
1063
|
+
NavigationMenuList.displayName = "NavigationMenuList";
|
|
1064
|
+
var NavigationMenuItem = import_navigation_menu.NavigationMenu.Item;
|
|
1065
|
+
var navigationMenuTriggerStyle = (0, import_class_variance_authority7.cva)(
|
|
1066
|
+
"group inline-flex h-10 w-max items-center justify-center rounded-berget-xs px-4 py-2 text-sm font-medium transition-colors hover:bg-berget-surface-02 hover:text-berget-foreground focus:bg-berget-surface-02 focus:text-berget-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-popup-open:text-berget-foreground data-popup-open:bg-berget-border data-popup-open:hover:bg-berget-border data-popup-open:focus:bg-berget-border"
|
|
1067
|
+
);
|
|
1068
|
+
var NavigationMenuTrigger = React14.forwardRef(({ className, children, asChild, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1069
|
+
import_navigation_menu.NavigationMenu.Trigger,
|
|
1070
|
+
{
|
|
1071
|
+
ref,
|
|
1072
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
1073
|
+
render: asChildRender(asChild, children),
|
|
1074
|
+
...props,
|
|
1075
|
+
children: asChild ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1076
|
+
children,
|
|
1077
|
+
" ",
|
|
1078
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1079
|
+
import_lucide_react3.ChevronDown,
|
|
1080
|
+
{
|
|
1081
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-200 group-data-[data-popup-open]:rotate-180",
|
|
1082
|
+
"aria-hidden": "true"
|
|
1083
|
+
}
|
|
1084
|
+
)
|
|
1085
|
+
] })
|
|
1086
|
+
}
|
|
1087
|
+
));
|
|
1088
|
+
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
1089
|
+
var NavigationMenuContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1090
|
+
import_navigation_menu.NavigationMenu.Content,
|
|
1091
|
+
{
|
|
1092
|
+
ref,
|
|
1093
|
+
className: cn(
|
|
1094
|
+
"left-0 top-0 w-full data-[activation-direction=left]:fade-in data-[activation-direction=right]:fade-out md:absolute md:w-auto",
|
|
1095
|
+
className
|
|
1096
|
+
),
|
|
1097
|
+
...props
|
|
1098
|
+
}
|
|
1099
|
+
));
|
|
1100
|
+
NavigationMenuContent.displayName = "NavigationMenuContent";
|
|
1101
|
+
var NavigationMenuLink = React14.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1102
|
+
import_navigation_menu.NavigationMenu.Link,
|
|
1103
|
+
{
|
|
1104
|
+
ref,
|
|
1105
|
+
className,
|
|
1106
|
+
render: asChildRender(asChild, children),
|
|
1107
|
+
...props,
|
|
1108
|
+
children: asChild ? void 0 : children
|
|
1109
|
+
}
|
|
1110
|
+
));
|
|
1111
|
+
NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
1112
|
+
var NavigationMenuViewport = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_navigation_menu.NavigationMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_navigation_menu.NavigationMenu.Positioner, { className: "isolate z-50 outline-none", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1113
|
+
import_navigation_menu.NavigationMenu.Popup,
|
|
1114
|
+
{
|
|
1115
|
+
ref,
|
|
1116
|
+
className: cn(
|
|
1117
|
+
"origin-top-center relative mt-1.5 h-[var(--popup-height)] w-full overflow-hidden rounded-berget-xs border border-berget-border bg-berget-popover text-berget-popover-foreground shadow-berget-lg transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-90 data-ending-style:opacity-0 data-ending-style:scale-90 md:w-[var(--popup-width)]",
|
|
1118
|
+
className
|
|
1119
|
+
),
|
|
1120
|
+
...props,
|
|
1121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_navigation_menu.NavigationMenu.Viewport, {})
|
|
1122
|
+
}
|
|
1123
|
+
) }) }));
|
|
1124
|
+
NavigationMenuViewport.displayName = "NavigationMenuViewport";
|
|
1125
|
+
var NavigationMenuIndicator = React14.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1126
|
+
import_navigation_menu.NavigationMenu.Icon,
|
|
1127
|
+
{
|
|
1128
|
+
ref,
|
|
1129
|
+
className: cn(
|
|
1130
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden transition-[opacity] data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
1131
|
+
className
|
|
1132
|
+
),
|
|
1133
|
+
render: asChildRender(asChild, children),
|
|
1134
|
+
...props,
|
|
1135
|
+
children: [
|
|
1136
|
+
asChild ? void 0 : children,
|
|
1137
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-berget-border shadow-md" })
|
|
1138
|
+
]
|
|
1139
|
+
}
|
|
1140
|
+
));
|
|
1141
|
+
NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
|
|
1142
|
+
|
|
1143
|
+
// src/components/table/Table.tsx
|
|
1144
|
+
var React16 = __toESM(require("react"), 1);
|
|
926
1145
|
|
|
927
1146
|
// src/primitives/table.tsx
|
|
928
|
-
var
|
|
929
|
-
var
|
|
930
|
-
var Table =
|
|
931
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1147
|
+
var React15 = __toESM(require("react"), 1);
|
|
1148
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1149
|
+
var Table = React15.forwardRef(
|
|
1150
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
932
1151
|
);
|
|
933
1152
|
Table.displayName = "Table";
|
|
934
|
-
var TableHeader =
|
|
1153
|
+
var TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
935
1154
|
TableHeader.displayName = "TableHeader";
|
|
936
|
-
var TableBody =
|
|
1155
|
+
var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
937
1156
|
TableBody.displayName = "TableBody";
|
|
938
|
-
var TableFooter =
|
|
1157
|
+
var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
939
1158
|
"tfoot",
|
|
940
1159
|
{
|
|
941
1160
|
ref,
|
|
@@ -944,8 +1163,8 @@ var TableFooter = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
944
1163
|
}
|
|
945
1164
|
));
|
|
946
1165
|
TableFooter.displayName = "TableFooter";
|
|
947
|
-
var TableRow =
|
|
948
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1166
|
+
var TableRow = React15.forwardRef(
|
|
1167
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
949
1168
|
"tr",
|
|
950
1169
|
{
|
|
951
1170
|
ref,
|
|
@@ -958,7 +1177,7 @@ var TableRow = React13.forwardRef(
|
|
|
958
1177
|
)
|
|
959
1178
|
);
|
|
960
1179
|
TableRow.displayName = "TableRow";
|
|
961
|
-
var TableHead =
|
|
1180
|
+
var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
962
1181
|
"th",
|
|
963
1182
|
{
|
|
964
1183
|
ref,
|
|
@@ -970,7 +1189,7 @@ var TableHead = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
970
1189
|
}
|
|
971
1190
|
));
|
|
972
1191
|
TableHead.displayName = "TableHead";
|
|
973
|
-
var TableCell =
|
|
1192
|
+
var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
974
1193
|
"td",
|
|
975
1194
|
{
|
|
976
1195
|
ref,
|
|
@@ -979,16 +1198,16 @@ var TableCell = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
979
1198
|
}
|
|
980
1199
|
));
|
|
981
1200
|
TableCell.displayName = "TableCell";
|
|
982
|
-
var TableCaption =
|
|
1201
|
+
var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
983
1202
|
TableCaption.displayName = "TableCaption";
|
|
984
1203
|
|
|
985
1204
|
// src/components/table/Table.tsx
|
|
986
|
-
var
|
|
987
|
-
var Table2 =
|
|
988
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1205
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1206
|
+
var Table2 = React16.forwardRef(
|
|
1207
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Table, { ref, className, ...props })
|
|
989
1208
|
);
|
|
990
1209
|
Table2.displayName = "Table";
|
|
991
|
-
var TableHeader2 =
|
|
1210
|
+
var TableHeader2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
992
1211
|
TableHeader,
|
|
993
1212
|
{
|
|
994
1213
|
ref,
|
|
@@ -997,7 +1216,7 @@ var TableHeader2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
997
1216
|
}
|
|
998
1217
|
));
|
|
999
1218
|
TableHeader2.displayName = "TableHeader";
|
|
1000
|
-
var TableBody2 =
|
|
1219
|
+
var TableBody2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1001
1220
|
TableBody,
|
|
1002
1221
|
{
|
|
1003
1222
|
ref,
|
|
@@ -1006,7 +1225,7 @@ var TableBody2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1006
1225
|
}
|
|
1007
1226
|
));
|
|
1008
1227
|
TableBody2.displayName = "TableBody";
|
|
1009
|
-
var TableFooter2 =
|
|
1228
|
+
var TableFooter2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1010
1229
|
TableFooter,
|
|
1011
1230
|
{
|
|
1012
1231
|
ref,
|
|
@@ -1018,8 +1237,8 @@ var TableFooter2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1018
1237
|
}
|
|
1019
1238
|
));
|
|
1020
1239
|
TableFooter2.displayName = "TableFooter";
|
|
1021
|
-
var TableRow2 =
|
|
1022
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1240
|
+
var TableRow2 = React16.forwardRef(
|
|
1241
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1023
1242
|
TableRow,
|
|
1024
1243
|
{
|
|
1025
1244
|
ref,
|
|
@@ -1032,7 +1251,7 @@ var TableRow2 = React14.forwardRef(
|
|
|
1032
1251
|
)
|
|
1033
1252
|
);
|
|
1034
1253
|
TableRow2.displayName = "TableRow";
|
|
1035
|
-
var TableHead2 =
|
|
1254
|
+
var TableHead2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1036
1255
|
TableHead,
|
|
1037
1256
|
{
|
|
1038
1257
|
ref,
|
|
@@ -1044,7 +1263,7 @@ var TableHead2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1044
1263
|
}
|
|
1045
1264
|
));
|
|
1046
1265
|
TableHead2.displayName = "TableHead";
|
|
1047
|
-
var TableCell2 =
|
|
1266
|
+
var TableCell2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1048
1267
|
TableCell,
|
|
1049
1268
|
{
|
|
1050
1269
|
ref,
|
|
@@ -1053,7 +1272,7 @@ var TableCell2 = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1053
1272
|
}
|
|
1054
1273
|
));
|
|
1055
1274
|
TableCell2.displayName = "TableCell";
|
|
1056
|
-
var TableCaption2 =
|
|
1275
|
+
var TableCaption2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1057
1276
|
TableCaption,
|
|
1058
1277
|
{
|
|
1059
1278
|
ref,
|
|
@@ -1064,21 +1283,21 @@ var TableCaption2 = React14.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1064
1283
|
TableCaption2.displayName = "TableCaption";
|
|
1065
1284
|
|
|
1066
1285
|
// src/components/item/Item.tsx
|
|
1067
|
-
var
|
|
1286
|
+
var React18 = __toESM(require("react"), 1);
|
|
1068
1287
|
|
|
1069
1288
|
// src/primitives/item.tsx
|
|
1070
|
-
var
|
|
1071
|
-
var
|
|
1289
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
1290
|
+
var import_merge_props = require("@base-ui/react/merge-props");
|
|
1291
|
+
var import_use_render = require("@base-ui/react/use-render");
|
|
1072
1292
|
|
|
1073
1293
|
// src/primitives/separator.tsx
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1076
|
-
var
|
|
1077
|
-
var
|
|
1078
|
-
|
|
1294
|
+
var React17 = __toESM(require("react"), 1);
|
|
1295
|
+
var import_separator = require("@base-ui/react/separator");
|
|
1296
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1297
|
+
var Separator = React17.forwardRef(({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1298
|
+
import_separator.Separator,
|
|
1079
1299
|
{
|
|
1080
1300
|
ref,
|
|
1081
|
-
decorative,
|
|
1082
1301
|
orientation,
|
|
1083
1302
|
className: cn(
|
|
1084
1303
|
"shrink-0 bg-border",
|
|
@@ -1088,12 +1307,12 @@ var Separator2 = React15.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1088
1307
|
...props
|
|
1089
1308
|
}
|
|
1090
1309
|
));
|
|
1091
|
-
|
|
1310
|
+
Separator.displayName = "Separator";
|
|
1092
1311
|
|
|
1093
1312
|
// src/primitives/item.tsx
|
|
1094
|
-
var
|
|
1313
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1095
1314
|
function ItemGroup({ className, ...props }) {
|
|
1096
|
-
return /* @__PURE__ */ (0,
|
|
1315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1097
1316
|
"div",
|
|
1098
1317
|
{
|
|
1099
1318
|
role: "list",
|
|
@@ -1104,8 +1323,8 @@ function ItemGroup({ className, ...props }) {
|
|
|
1104
1323
|
);
|
|
1105
1324
|
}
|
|
1106
1325
|
function ItemSeparator({ className, ...props }) {
|
|
1107
|
-
return /* @__PURE__ */ (0,
|
|
1108
|
-
|
|
1326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1327
|
+
Separator,
|
|
1109
1328
|
{
|
|
1110
1329
|
"data-slot": "item-separator",
|
|
1111
1330
|
orientation: "horizontal",
|
|
@@ -1114,7 +1333,7 @@ function ItemSeparator({ className, ...props }) {
|
|
|
1114
1333
|
}
|
|
1115
1334
|
);
|
|
1116
1335
|
}
|
|
1117
|
-
var itemVariants = (0,
|
|
1336
|
+
var itemVariants = (0, import_class_variance_authority8.cva)(
|
|
1118
1337
|
"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]",
|
|
1119
1338
|
{
|
|
1120
1339
|
variants: {
|
|
@@ -1134,26 +1353,28 @@ var itemVariants = (0, import_class_variance_authority7.cva)(
|
|
|
1134
1353
|
}
|
|
1135
1354
|
}
|
|
1136
1355
|
);
|
|
1137
|
-
function
|
|
1356
|
+
function Item({
|
|
1138
1357
|
className,
|
|
1139
1358
|
variant = "default",
|
|
1140
1359
|
size = "default",
|
|
1141
|
-
|
|
1360
|
+
render,
|
|
1142
1361
|
...props
|
|
1143
1362
|
}) {
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1363
|
+
return (0, import_use_render.useRender)({
|
|
1364
|
+
defaultTagName: "div",
|
|
1365
|
+
render,
|
|
1366
|
+
props: (0, import_merge_props.mergeProps)(
|
|
1367
|
+
{
|
|
1368
|
+
"data-slot": "item",
|
|
1369
|
+
"data-variant": variant,
|
|
1370
|
+
"data-size": size,
|
|
1371
|
+
className: cn(itemVariants({ variant, size, className }))
|
|
1372
|
+
},
|
|
1373
|
+
props
|
|
1374
|
+
)
|
|
1375
|
+
});
|
|
1155
1376
|
}
|
|
1156
|
-
var itemMediaVariants = (0,
|
|
1377
|
+
var itemMediaVariants = (0, import_class_variance_authority8.cva)(
|
|
1157
1378
|
"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",
|
|
1158
1379
|
{
|
|
1159
1380
|
variants: {
|
|
@@ -1173,7 +1394,7 @@ function ItemMedia({
|
|
|
1173
1394
|
variant = "default",
|
|
1174
1395
|
...props
|
|
1175
1396
|
}) {
|
|
1176
|
-
return /* @__PURE__ */ (0,
|
|
1397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1177
1398
|
"div",
|
|
1178
1399
|
{
|
|
1179
1400
|
"data-slot": "item-media",
|
|
@@ -1184,7 +1405,7 @@ function ItemMedia({
|
|
|
1184
1405
|
);
|
|
1185
1406
|
}
|
|
1186
1407
|
function ItemContent({ className, ...props }) {
|
|
1187
|
-
return /* @__PURE__ */ (0,
|
|
1408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1188
1409
|
"div",
|
|
1189
1410
|
{
|
|
1190
1411
|
"data-slot": "item-content",
|
|
@@ -1194,7 +1415,7 @@ function ItemContent({ className, ...props }) {
|
|
|
1194
1415
|
);
|
|
1195
1416
|
}
|
|
1196
1417
|
function ItemTitle({ className, ...props }) {
|
|
1197
|
-
return /* @__PURE__ */ (0,
|
|
1418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1198
1419
|
"div",
|
|
1199
1420
|
{
|
|
1200
1421
|
"data-slot": "item-title",
|
|
@@ -1204,7 +1425,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
1204
1425
|
);
|
|
1205
1426
|
}
|
|
1206
1427
|
function ItemDescription({ className, ...props }) {
|
|
1207
|
-
return /* @__PURE__ */ (0,
|
|
1428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1208
1429
|
"p",
|
|
1209
1430
|
{
|
|
1210
1431
|
"data-slot": "item-description",
|
|
@@ -1218,10 +1439,10 @@ function ItemDescription({ className, ...props }) {
|
|
|
1218
1439
|
);
|
|
1219
1440
|
}
|
|
1220
1441
|
function ItemActions({ className, ...props }) {
|
|
1221
|
-
return /* @__PURE__ */ (0,
|
|
1442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { "data-slot": "item-actions", className: cn("flex items-center gap-2", className), ...props });
|
|
1222
1443
|
}
|
|
1223
1444
|
function ItemHeader({ className, ...props }) {
|
|
1224
|
-
return /* @__PURE__ */ (0,
|
|
1445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1225
1446
|
"div",
|
|
1226
1447
|
{
|
|
1227
1448
|
"data-slot": "item-header",
|
|
@@ -1231,7 +1452,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
1231
1452
|
);
|
|
1232
1453
|
}
|
|
1233
1454
|
function ItemFooter({ className, ...props }) {
|
|
1234
|
-
return /* @__PURE__ */ (0,
|
|
1455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1235
1456
|
"div",
|
|
1236
1457
|
{
|
|
1237
1458
|
"data-slot": "item-footer",
|
|
@@ -1242,12 +1463,12 @@ function ItemFooter({ className, ...props }) {
|
|
|
1242
1463
|
}
|
|
1243
1464
|
|
|
1244
1465
|
// src/components/item/Item.tsx
|
|
1245
|
-
var
|
|
1246
|
-
function
|
|
1247
|
-
return /* @__PURE__ */ (0,
|
|
1248
|
-
|
|
1466
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1467
|
+
function Item2({ className, asChild, children, ...props }) {
|
|
1468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1469
|
+
Item,
|
|
1249
1470
|
{
|
|
1250
|
-
asChild,
|
|
1471
|
+
render: asChild ? children : void 0,
|
|
1251
1472
|
className: cn(
|
|
1252
1473
|
/* Variant colours — override primitive defaults */
|
|
1253
1474
|
"data-[variant=outline]:border-berget-item-outline-border",
|
|
@@ -1258,12 +1479,13 @@ function Item3({ className, asChild, ...props }) {
|
|
|
1258
1479
|
"focus-visible:border-berget-item-focus-ring focus-visible:ring-berget-item-focus-ring/50",
|
|
1259
1480
|
className
|
|
1260
1481
|
),
|
|
1261
|
-
...props
|
|
1482
|
+
...props,
|
|
1483
|
+
children: asChild ? void 0 : children
|
|
1262
1484
|
}
|
|
1263
1485
|
);
|
|
1264
1486
|
}
|
|
1265
|
-
var ItemMedia2 =
|
|
1266
|
-
return /* @__PURE__ */ (0,
|
|
1487
|
+
var ItemMedia2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
1488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1267
1489
|
ItemMedia,
|
|
1268
1490
|
{
|
|
1269
1491
|
ref,
|
|
@@ -1273,8 +1495,8 @@ var ItemMedia2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
1273
1495
|
);
|
|
1274
1496
|
});
|
|
1275
1497
|
ItemMedia2.displayName = "ItemMedia";
|
|
1276
|
-
var ItemTitle2 =
|
|
1277
|
-
return /* @__PURE__ */ (0,
|
|
1498
|
+
var ItemTitle2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
1499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1278
1500
|
ItemTitle,
|
|
1279
1501
|
{
|
|
1280
1502
|
ref,
|
|
@@ -1284,8 +1506,8 @@ var ItemTitle2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
1284
1506
|
);
|
|
1285
1507
|
});
|
|
1286
1508
|
ItemTitle2.displayName = "ItemTitle";
|
|
1287
|
-
var ItemDescription2 =
|
|
1288
|
-
return /* @__PURE__ */ (0,
|
|
1509
|
+
var ItemDescription2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
1510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1289
1511
|
ItemDescription,
|
|
1290
1512
|
{
|
|
1291
1513
|
ref,
|
|
@@ -1295,8 +1517,8 @@ var ItemDescription2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
1295
1517
|
);
|
|
1296
1518
|
});
|
|
1297
1519
|
ItemDescription2.displayName = "ItemDescription";
|
|
1298
|
-
var ItemSeparator2 =
|
|
1299
|
-
return /* @__PURE__ */ (0,
|
|
1520
|
+
var ItemSeparator2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
1521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1300
1522
|
ItemSeparator,
|
|
1301
1523
|
{
|
|
1302
1524
|
ref,
|
|
@@ -1308,14 +1530,14 @@ var ItemSeparator2 = React16.forwardRef(({ className, ...props }, ref) => {
|
|
|
1308
1530
|
ItemSeparator2.displayName = "ItemSeparator";
|
|
1309
1531
|
|
|
1310
1532
|
// src/components/input/Input.tsx
|
|
1311
|
-
var
|
|
1533
|
+
var React20 = __toESM(require("react"), 1);
|
|
1312
1534
|
|
|
1313
1535
|
// src/primitives/input.tsx
|
|
1314
|
-
var
|
|
1315
|
-
var
|
|
1316
|
-
var Input =
|
|
1536
|
+
var React19 = __toESM(require("react"), 1);
|
|
1537
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1538
|
+
var Input = React19.forwardRef(
|
|
1317
1539
|
({ className, type, ...props }, ref) => {
|
|
1318
|
-
return /* @__PURE__ */ (0,
|
|
1540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1319
1541
|
"input",
|
|
1320
1542
|
{
|
|
1321
1543
|
type,
|
|
@@ -1332,14 +1554,14 @@ var Input = React17.forwardRef(
|
|
|
1332
1554
|
Input.displayName = "Input";
|
|
1333
1555
|
|
|
1334
1556
|
// src/components/input/Input.tsx
|
|
1335
|
-
var
|
|
1336
|
-
var Input2 =
|
|
1557
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1558
|
+
var Input2 = React20.forwardRef(
|
|
1337
1559
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
1338
|
-
const generatedId =
|
|
1560
|
+
const generatedId = React20.useId();
|
|
1339
1561
|
const inputId = id || generatedId;
|
|
1340
1562
|
const errorId = `${inputId}-error`;
|
|
1341
1563
|
const descriptionId = `${inputId}-description`;
|
|
1342
|
-
const inputElement = /* @__PURE__ */ (0,
|
|
1564
|
+
const inputElement = /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1343
1565
|
Input,
|
|
1344
1566
|
{
|
|
1345
1567
|
ref,
|
|
@@ -1359,8 +1581,8 @@ var Input2 = React18.forwardRef(
|
|
|
1359
1581
|
}
|
|
1360
1582
|
);
|
|
1361
1583
|
if (!icon && !actionButton) {
|
|
1362
|
-
return /* @__PURE__ */ (0,
|
|
1363
|
-
label && /* @__PURE__ */ (0,
|
|
1584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1585
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1364
1586
|
"label",
|
|
1365
1587
|
{
|
|
1366
1588
|
htmlFor: inputId,
|
|
@@ -1373,9 +1595,9 @@ var Input2 = React18.forwardRef(
|
|
|
1373
1595
|
}
|
|
1374
1596
|
),
|
|
1375
1597
|
inputElement,
|
|
1376
|
-
(description || error) && /* @__PURE__ */ (0,
|
|
1377
|
-
description && /* @__PURE__ */ (0,
|
|
1378
|
-
error && /* @__PURE__ */ (0,
|
|
1598
|
+
(description || error) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1599
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1600
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1379
1601
|
Typography,
|
|
1380
1602
|
{
|
|
1381
1603
|
variant: "xs",
|
|
@@ -1387,8 +1609,8 @@ var Input2 = React18.forwardRef(
|
|
|
1387
1609
|
] })
|
|
1388
1610
|
] });
|
|
1389
1611
|
}
|
|
1390
|
-
return /* @__PURE__ */ (0,
|
|
1391
|
-
label && /* @__PURE__ */ (0,
|
|
1612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1613
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1392
1614
|
"label",
|
|
1393
1615
|
{
|
|
1394
1616
|
htmlFor: inputId,
|
|
@@ -1400,14 +1622,14 @@ var Input2 = React18.forwardRef(
|
|
|
1400
1622
|
children: label
|
|
1401
1623
|
}
|
|
1402
1624
|
),
|
|
1403
|
-
/* @__PURE__ */ (0,
|
|
1404
|
-
icon && /* @__PURE__ */ (0,
|
|
1625
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative w-full", children: [
|
|
1626
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
1405
1627
|
inputElement,
|
|
1406
|
-
actionButton && /* @__PURE__ */ (0,
|
|
1628
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1407
1629
|
] }),
|
|
1408
|
-
(description || error) && /* @__PURE__ */ (0,
|
|
1409
|
-
description && /* @__PURE__ */ (0,
|
|
1410
|
-
error && /* @__PURE__ */ (0,
|
|
1630
|
+
(description || error) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1631
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1632
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1411
1633
|
] })
|
|
1412
1634
|
] });
|
|
1413
1635
|
}
|
|
@@ -1415,43 +1637,43 @@ var Input2 = React18.forwardRef(
|
|
|
1415
1637
|
Input2.displayName = "Input";
|
|
1416
1638
|
|
|
1417
1639
|
// src/components/checkbox/Checkbox.tsx
|
|
1418
|
-
var
|
|
1419
|
-
var
|
|
1420
|
-
var
|
|
1421
|
-
var
|
|
1640
|
+
var React22 = __toESM(require("react"), 1);
|
|
1641
|
+
var import_checkbox2 = require("@base-ui/react/checkbox");
|
|
1642
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1643
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
1422
1644
|
|
|
1423
1645
|
// src/primitives/checkbox.tsx
|
|
1424
|
-
var
|
|
1425
|
-
var
|
|
1426
|
-
var
|
|
1427
|
-
var
|
|
1428
|
-
var Checkbox =
|
|
1429
|
-
|
|
1646
|
+
var React21 = __toESM(require("react"), 1);
|
|
1647
|
+
var import_checkbox = require("@base-ui/react/checkbox");
|
|
1648
|
+
var import_lucide_react4 = require("lucide-react");
|
|
1649
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1650
|
+
var Checkbox = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1651
|
+
import_checkbox.Checkbox.Root,
|
|
1430
1652
|
{
|
|
1431
1653
|
ref,
|
|
1432
1654
|
className: cn(
|
|
1433
|
-
"peer cursor-pointer ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1655
|
+
"peer cursor-pointer ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
1434
1656
|
className
|
|
1435
1657
|
),
|
|
1436
1658
|
...props,
|
|
1437
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
1659
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_checkbox.Checkbox.Indicator, { className: cn("grid place-content-center"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react4.Check, { className: "h-4 w-4" }) })
|
|
1438
1660
|
}
|
|
1439
1661
|
));
|
|
1440
|
-
Checkbox.displayName =
|
|
1441
|
-
var CheckboxIndicator =
|
|
1442
|
-
|
|
1662
|
+
Checkbox.displayName = "Checkbox";
|
|
1663
|
+
var CheckboxIndicator = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1664
|
+
import_checkbox.Checkbox.Indicator,
|
|
1443
1665
|
{
|
|
1444
1666
|
ref,
|
|
1445
1667
|
className: cn("grid place-content-center", className),
|
|
1446
1668
|
...props,
|
|
1447
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
1669
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react4.Check, { className: "h-4 w-4" })
|
|
1448
1670
|
}
|
|
1449
1671
|
));
|
|
1450
|
-
CheckboxIndicator.displayName =
|
|
1672
|
+
CheckboxIndicator.displayName = "CheckboxIndicator";
|
|
1451
1673
|
|
|
1452
1674
|
// src/components/checkbox/Checkbox.tsx
|
|
1453
|
-
var
|
|
1454
|
-
var checkboxVariants = (0,
|
|
1675
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1676
|
+
var checkboxVariants = (0, import_class_variance_authority9.cva)(
|
|
1455
1677
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1456
1678
|
{
|
|
1457
1679
|
variants: {
|
|
@@ -1472,7 +1694,7 @@ var checkboxVariants = (0, import_class_variance_authority8.cva)(
|
|
|
1472
1694
|
}
|
|
1473
1695
|
}
|
|
1474
1696
|
);
|
|
1475
|
-
var Checkbox2 =
|
|
1697
|
+
var Checkbox2 = React22.forwardRef(
|
|
1476
1698
|
({
|
|
1477
1699
|
"aria-label": ariaLabel,
|
|
1478
1700
|
className,
|
|
@@ -1485,16 +1707,17 @@ var Checkbox2 = React20.forwardRef(
|
|
|
1485
1707
|
disabled,
|
|
1486
1708
|
...props
|
|
1487
1709
|
}, ref) => {
|
|
1488
|
-
const generatedId =
|
|
1710
|
+
const generatedId = React22.useId();
|
|
1489
1711
|
const checkboxId = id || generatedId;
|
|
1490
1712
|
const errorId = `${checkboxId}-error`;
|
|
1491
|
-
return /* @__PURE__ */ (0,
|
|
1492
|
-
/* @__PURE__ */ (0,
|
|
1713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1493
1715
|
Checkbox,
|
|
1494
1716
|
{
|
|
1495
1717
|
ref,
|
|
1496
1718
|
id: checkboxId,
|
|
1497
1719
|
disabled,
|
|
1720
|
+
nativeButton: true,
|
|
1498
1721
|
"aria-invalid": !!error,
|
|
1499
1722
|
"aria-describedby": error ? errorId : void 0,
|
|
1500
1723
|
"aria-label": ariaLabel || label || void 0,
|
|
@@ -1505,8 +1728,8 @@ var Checkbox2 = React20.forwardRef(
|
|
|
1505
1728
|
className
|
|
1506
1729
|
),
|
|
1507
1730
|
...props,
|
|
1508
|
-
children: /* @__PURE__ */ (0,
|
|
1509
|
-
|
|
1731
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_checkbox2.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1732
|
+
import_lucide_react5.Check,
|
|
1510
1733
|
{
|
|
1511
1734
|
className: "h-4 w-4 text-current stroke-current",
|
|
1512
1735
|
style: { color: "currentColor", stroke: "currentColor" }
|
|
@@ -1514,8 +1737,8 @@ var Checkbox2 = React20.forwardRef(
|
|
|
1514
1737
|
) })
|
|
1515
1738
|
}
|
|
1516
1739
|
) }),
|
|
1517
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
1518
|
-
label && /* @__PURE__ */ (0,
|
|
1740
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1741
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1519
1742
|
"label",
|
|
1520
1743
|
{
|
|
1521
1744
|
htmlFor: checkboxId,
|
|
@@ -1527,8 +1750,8 @@ var Checkbox2 = React20.forwardRef(
|
|
|
1527
1750
|
children: label
|
|
1528
1751
|
}
|
|
1529
1752
|
),
|
|
1530
|
-
description && /* @__PURE__ */ (0,
|
|
1531
|
-
error && /* @__PURE__ */ (0,
|
|
1753
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
1754
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1532
1755
|
] })
|
|
1533
1756
|
] });
|
|
1534
1757
|
}
|
|
@@ -1536,18 +1759,18 @@ var Checkbox2 = React20.forwardRef(
|
|
|
1536
1759
|
Checkbox2.displayName = "Checkbox";
|
|
1537
1760
|
|
|
1538
1761
|
// src/components/switch/Switch.tsx
|
|
1539
|
-
var
|
|
1540
|
-
var
|
|
1541
|
-
var
|
|
1542
|
-
var
|
|
1543
|
-
var switchRootVariants = (0,
|
|
1762
|
+
var React23 = __toESM(require("react"), 1);
|
|
1763
|
+
var import_switch = require("@base-ui/react/switch");
|
|
1764
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1765
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1766
|
+
var switchRootVariants = (0, import_class_variance_authority10.cva)(
|
|
1544
1767
|
"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",
|
|
1545
1768
|
{
|
|
1546
1769
|
variants: {
|
|
1547
1770
|
variant: {
|
|
1548
|
-
default: "data-
|
|
1549
|
-
primary: "data-
|
|
1550
|
-
subtle: "data-
|
|
1771
|
+
default: "data-unchecked:bg-berget-border data-checked:bg-berget-secondary",
|
|
1772
|
+
primary: "data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-primary-checked",
|
|
1773
|
+
subtle: "data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-subtle-checked"
|
|
1551
1774
|
},
|
|
1552
1775
|
size: {
|
|
1553
1776
|
sm: "h-5 w-9",
|
|
@@ -1561,14 +1784,14 @@ var switchRootVariants = (0, import_class_variance_authority9.cva)(
|
|
|
1561
1784
|
}
|
|
1562
1785
|
}
|
|
1563
1786
|
);
|
|
1564
|
-
var switchThumbVariants = (0,
|
|
1787
|
+
var switchThumbVariants = (0, import_class_variance_authority10.cva)(
|
|
1565
1788
|
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
1566
1789
|
{
|
|
1567
1790
|
variants: {
|
|
1568
1791
|
size: {
|
|
1569
|
-
sm: "h-4 w-4 data-
|
|
1570
|
-
default: "h-5 w-5 data-
|
|
1571
|
-
lg: "h-6 w-6 data-
|
|
1792
|
+
sm: "h-4 w-4 data-checked:translate-x-4 data-unchecked:translate-x-0",
|
|
1793
|
+
default: "h-5 w-5 data-checked:translate-x-5 data-unchecked:translate-x-0",
|
|
1794
|
+
lg: "h-6 w-6 data-checked:translate-x-6 data-unchecked:translate-x-0"
|
|
1572
1795
|
}
|
|
1573
1796
|
},
|
|
1574
1797
|
defaultVariants: {
|
|
@@ -1576,7 +1799,7 @@ var switchThumbVariants = (0, import_class_variance_authority9.cva)(
|
|
|
1576
1799
|
}
|
|
1577
1800
|
}
|
|
1578
1801
|
);
|
|
1579
|
-
var Switch =
|
|
1802
|
+
var Switch = React23.forwardRef(
|
|
1580
1803
|
({
|
|
1581
1804
|
"aria-label": ariaLabel,
|
|
1582
1805
|
className,
|
|
@@ -1589,16 +1812,17 @@ var Switch = React21.forwardRef(
|
|
|
1589
1812
|
disabled,
|
|
1590
1813
|
...props
|
|
1591
1814
|
}, ref) => {
|
|
1592
|
-
const generatedId =
|
|
1815
|
+
const generatedId = React23.useId();
|
|
1593
1816
|
const switchId = id || generatedId;
|
|
1594
1817
|
const errorId = `${switchId}-error`;
|
|
1595
|
-
return /* @__PURE__ */ (0,
|
|
1596
|
-
/* @__PURE__ */ (0,
|
|
1597
|
-
|
|
1818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1820
|
+
import_switch.Switch.Root,
|
|
1598
1821
|
{
|
|
1599
1822
|
ref,
|
|
1600
1823
|
id: switchId,
|
|
1601
1824
|
disabled,
|
|
1825
|
+
nativeButton: true,
|
|
1602
1826
|
"aria-invalid": !!error,
|
|
1603
1827
|
"aria-describedby": error ? errorId : void 0,
|
|
1604
1828
|
"aria-label": ariaLabel || label || void 0,
|
|
@@ -1608,11 +1832,11 @@ var Switch = React21.forwardRef(
|
|
|
1608
1832
|
className
|
|
1609
1833
|
),
|
|
1610
1834
|
...props,
|
|
1611
|
-
children: /* @__PURE__ */ (0,
|
|
1835
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_switch.Switch.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
1612
1836
|
}
|
|
1613
1837
|
),
|
|
1614
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
1615
|
-
label && /* @__PURE__ */ (0,
|
|
1838
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
1839
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1616
1840
|
"label",
|
|
1617
1841
|
{
|
|
1618
1842
|
htmlFor: switchId,
|
|
@@ -1623,8 +1847,8 @@ var Switch = React21.forwardRef(
|
|
|
1623
1847
|
children: label
|
|
1624
1848
|
}
|
|
1625
1849
|
),
|
|
1626
|
-
description && /* @__PURE__ */ (0,
|
|
1627
|
-
error && /* @__PURE__ */ (0,
|
|
1850
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
1851
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1628
1852
|
] })
|
|
1629
1853
|
] });
|
|
1630
1854
|
}
|
|
@@ -1632,118 +1856,135 @@ var Switch = React21.forwardRef(
|
|
|
1632
1856
|
Switch.displayName = "Switch";
|
|
1633
1857
|
|
|
1634
1858
|
// src/components/select/Select.tsx
|
|
1635
|
-
var
|
|
1636
|
-
var
|
|
1859
|
+
var React25 = __toESM(require("react"), 1);
|
|
1860
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1637
1861
|
|
|
1638
1862
|
// src/primitives/select.tsx
|
|
1639
|
-
var
|
|
1640
|
-
var
|
|
1641
|
-
var
|
|
1642
|
-
var
|
|
1643
|
-
var Select =
|
|
1644
|
-
var
|
|
1645
|
-
var
|
|
1646
|
-
|
|
1863
|
+
var React24 = __toESM(require("react"), 1);
|
|
1864
|
+
var import_select = require("@base-ui/react/select");
|
|
1865
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1866
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1867
|
+
var Select = import_select.Select.Root;
|
|
1868
|
+
var SelectGroup = import_select.Select.Group;
|
|
1869
|
+
var SelectValue = import_select.Select.Value;
|
|
1870
|
+
var SelectTrigger = React24.forwardRef(({ className, children, asChild, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1871
|
+
import_select.Select.Trigger,
|
|
1647
1872
|
{
|
|
1648
1873
|
ref,
|
|
1649
1874
|
className: cn(
|
|
1650
1875
|
"flex h-10 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:border-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
1651
1876
|
className
|
|
1652
1877
|
),
|
|
1878
|
+
render: asChildRender(asChild, children),
|
|
1653
1879
|
...props,
|
|
1654
1880
|
children: [
|
|
1655
|
-
children,
|
|
1656
|
-
/* @__PURE__ */ (0,
|
|
1881
|
+
asChild ? void 0 : children,
|
|
1882
|
+
asChild ? null : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_select.Select.Icon, { render: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
1657
1883
|
]
|
|
1658
1884
|
}
|
|
1659
1885
|
));
|
|
1660
|
-
SelectTrigger.displayName =
|
|
1661
|
-
var SelectScrollUpButton =
|
|
1662
|
-
|
|
1886
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
1887
|
+
var SelectScrollUpButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1888
|
+
import_select.Select.ScrollUpArrow,
|
|
1663
1889
|
{
|
|
1664
1890
|
ref,
|
|
1665
1891
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1666
1892
|
...props,
|
|
1667
|
-
children: /* @__PURE__ */ (0,
|
|
1893
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronUp, { className: "h-4 w-4" })
|
|
1668
1894
|
}
|
|
1669
1895
|
));
|
|
1670
|
-
SelectScrollUpButton.displayName =
|
|
1671
|
-
var SelectScrollDownButton =
|
|
1672
|
-
|
|
1896
|
+
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
1897
|
+
var SelectScrollDownButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1898
|
+
import_select.Select.ScrollDownArrow,
|
|
1673
1899
|
{
|
|
1674
1900
|
ref,
|
|
1675
1901
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1676
1902
|
...props,
|
|
1677
|
-
children: /* @__PURE__ */ (0,
|
|
1903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.ChevronDown, { className: "h-4 w-4" })
|
|
1678
1904
|
}
|
|
1679
1905
|
));
|
|
1680
|
-
SelectScrollDownButton.displayName =
|
|
1681
|
-
var SelectContent =
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1906
|
+
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
1907
|
+
var SelectContent = React24.forwardRef(
|
|
1908
|
+
({
|
|
1909
|
+
className,
|
|
1910
|
+
children,
|
|
1911
|
+
alignItemWithTrigger = true,
|
|
1912
|
+
sideOffset = 4,
|
|
1913
|
+
align,
|
|
1914
|
+
side,
|
|
1915
|
+
alignOffset,
|
|
1916
|
+
...props
|
|
1917
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1918
|
+
import_select.Select.Positioner,
|
|
1919
|
+
{
|
|
1920
|
+
alignItemWithTrigger,
|
|
1921
|
+
side,
|
|
1922
|
+
align,
|
|
1923
|
+
alignOffset,
|
|
1924
|
+
sideOffset,
|
|
1925
|
+
className: "isolate z-50",
|
|
1926
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1927
|
+
import_select.Select.Popup,
|
|
1696
1928
|
{
|
|
1929
|
+
ref,
|
|
1697
1930
|
className: cn(
|
|
1698
|
-
"
|
|
1699
|
-
|
|
1931
|
+
"z-50 max-h-[var(--available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-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-[--transform-origin]",
|
|
1932
|
+
className
|
|
1700
1933
|
),
|
|
1701
|
-
|
|
1934
|
+
...props,
|
|
1935
|
+
children: [
|
|
1936
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectScrollUpButton, {}),
|
|
1937
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_select.Select.List, { className: cn("p-1"), children }),
|
|
1938
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectScrollDownButton, {})
|
|
1939
|
+
]
|
|
1702
1940
|
}
|
|
1703
|
-
)
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
SelectPrimitive.Label,
|
|
1941
|
+
)
|
|
1942
|
+
}
|
|
1943
|
+
) })
|
|
1944
|
+
);
|
|
1945
|
+
SelectContent.displayName = "SelectContent";
|
|
1946
|
+
var SelectLabel = React24.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1947
|
+
import_select.Select.GroupLabel,
|
|
1711
1948
|
{
|
|
1712
1949
|
ref,
|
|
1713
1950
|
className: cn("py-1.5 pl-8 pr-2 text-sm ", className),
|
|
1714
|
-
|
|
1951
|
+
render: asChildRender(asChild, children),
|
|
1952
|
+
...props,
|
|
1953
|
+
children: asChild ? void 0 : children
|
|
1715
1954
|
}
|
|
1716
1955
|
));
|
|
1717
|
-
SelectLabel.displayName =
|
|
1718
|
-
var SelectItem =
|
|
1719
|
-
|
|
1956
|
+
SelectLabel.displayName = "SelectLabel";
|
|
1957
|
+
var SelectItem = React24.forwardRef(({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1958
|
+
import_select.Select.Item,
|
|
1720
1959
|
{
|
|
1721
1960
|
ref,
|
|
1961
|
+
label: textValue,
|
|
1722
1962
|
className: cn(
|
|
1723
|
-
"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-
|
|
1963
|
+
"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",
|
|
1724
1964
|
className
|
|
1725
1965
|
),
|
|
1966
|
+
render: asChildRender(asChild, children),
|
|
1726
1967
|
...props,
|
|
1727
|
-
children: [
|
|
1728
|
-
/* @__PURE__ */ (0,
|
|
1729
|
-
/* @__PURE__ */ (0,
|
|
1730
|
-
]
|
|
1968
|
+
children: asChild ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_select.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react6.Check, { className: "h-4 w-4" }) }) }),
|
|
1970
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_select.Select.ItemText, { children })
|
|
1971
|
+
] })
|
|
1731
1972
|
}
|
|
1732
1973
|
));
|
|
1733
|
-
SelectItem.displayName =
|
|
1734
|
-
var SelectSeparator =
|
|
1735
|
-
|
|
1974
|
+
SelectItem.displayName = "SelectItem";
|
|
1975
|
+
var SelectSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1976
|
+
import_select.Select.Separator,
|
|
1736
1977
|
{
|
|
1737
1978
|
ref,
|
|
1738
1979
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1739
1980
|
...props
|
|
1740
1981
|
}
|
|
1741
1982
|
));
|
|
1742
|
-
SelectSeparator.displayName =
|
|
1983
|
+
SelectSeparator.displayName = "SelectSeparator";
|
|
1743
1984
|
|
|
1744
1985
|
// src/components/select/Select.tsx
|
|
1745
|
-
var
|
|
1746
|
-
var selectVariants = (0,
|
|
1986
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1987
|
+
var selectVariants = (0, import_class_variance_authority11.cva)(
|
|
1747
1988
|
"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",
|
|
1748
1989
|
{
|
|
1749
1990
|
variants: {
|
|
@@ -1765,7 +2006,7 @@ var selectVariants = (0, import_class_variance_authority10.cva)(
|
|
|
1765
2006
|
}
|
|
1766
2007
|
}
|
|
1767
2008
|
);
|
|
1768
|
-
var Select2 =
|
|
2009
|
+
var Select2 = React25.forwardRef(
|
|
1769
2010
|
({
|
|
1770
2011
|
className,
|
|
1771
2012
|
variant,
|
|
@@ -1783,12 +2024,12 @@ var Select2 = React23.forwardRef(
|
|
|
1783
2024
|
name,
|
|
1784
2025
|
required
|
|
1785
2026
|
}, ref) => {
|
|
1786
|
-
const generatedId =
|
|
2027
|
+
const generatedId = React25.useId();
|
|
1787
2028
|
const selectId = id || generatedId;
|
|
1788
2029
|
const errorId = `${selectId}-error`;
|
|
1789
2030
|
const descriptionId = `${selectId}-description`;
|
|
1790
|
-
return /* @__PURE__ */ (0,
|
|
1791
|
-
label && /* @__PURE__ */ (0,
|
|
2031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2032
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1792
2033
|
"label",
|
|
1793
2034
|
{
|
|
1794
2035
|
htmlFor: selectId,
|
|
@@ -1800,17 +2041,18 @@ var Select2 = React23.forwardRef(
|
|
|
1800
2041
|
children: label
|
|
1801
2042
|
}
|
|
1802
2043
|
),
|
|
1803
|
-
/* @__PURE__ */ (0,
|
|
2044
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1804
2045
|
Select,
|
|
1805
2046
|
{
|
|
1806
2047
|
value,
|
|
1807
2048
|
defaultValue,
|
|
1808
|
-
onValueChange,
|
|
2049
|
+
onValueChange: onValueChange ? (value2) => onValueChange(value2 ?? "") : void 0,
|
|
1809
2050
|
disabled,
|
|
1810
2051
|
name,
|
|
1811
2052
|
required,
|
|
2053
|
+
items: options,
|
|
1812
2054
|
children: [
|
|
1813
|
-
/* @__PURE__ */ (0,
|
|
2055
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1814
2056
|
SelectTrigger,
|
|
1815
2057
|
{
|
|
1816
2058
|
ref,
|
|
@@ -1822,33 +2064,33 @@ var Select2 = React23.forwardRef(
|
|
|
1822
2064
|
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1823
2065
|
className
|
|
1824
2066
|
),
|
|
1825
|
-
children: /* @__PURE__ */ (0,
|
|
2067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectValue, { placeholder })
|
|
1826
2068
|
}
|
|
1827
2069
|
),
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1829
2071
|
]
|
|
1830
2072
|
}
|
|
1831
2073
|
),
|
|
1832
|
-
description && /* @__PURE__ */ (0,
|
|
1833
|
-
error && /* @__PURE__ */ (0,
|
|
2074
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
2075
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1834
2076
|
] });
|
|
1835
2077
|
}
|
|
1836
2078
|
);
|
|
1837
2079
|
Select2.displayName = "Select";
|
|
1838
2080
|
|
|
1839
2081
|
// src/components/country-select/CountrySelect.tsx
|
|
1840
|
-
var
|
|
1841
|
-
var
|
|
2082
|
+
var React30 = __toESM(require("react"), 1);
|
|
2083
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1842
2084
|
|
|
1843
2085
|
// src/components/icon/Icon.tsx
|
|
1844
|
-
var
|
|
1845
|
-
var
|
|
2086
|
+
var React26 = __toESM(require("react"), 1);
|
|
2087
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1846
2088
|
var iconStrokeMap = {
|
|
1847
2089
|
16: 1.4,
|
|
1848
2090
|
24: 1.6,
|
|
1849
2091
|
32: 1.8
|
|
1850
2092
|
};
|
|
1851
|
-
var
|
|
2093
|
+
var Icon = React26.forwardRef(
|
|
1852
2094
|
({
|
|
1853
2095
|
icon: IconComponent,
|
|
1854
2096
|
size,
|
|
@@ -1860,7 +2102,7 @@ var Icon2 = React24.forwardRef(
|
|
|
1860
2102
|
const strokeWidth = iconStrokeMap[size];
|
|
1861
2103
|
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
1862
2104
|
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
1863
|
-
return /* @__PURE__ */ (0,
|
|
2105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1864
2106
|
IconComponent,
|
|
1865
2107
|
{
|
|
1866
2108
|
ref,
|
|
@@ -1872,77 +2114,87 @@ var Icon2 = React24.forwardRef(
|
|
|
1872
2114
|
);
|
|
1873
2115
|
}
|
|
1874
2116
|
);
|
|
1875
|
-
|
|
2117
|
+
Icon.displayName = "Icon";
|
|
1876
2118
|
|
|
1877
2119
|
// src/primitives/popover.tsx
|
|
1878
|
-
var
|
|
1879
|
-
var
|
|
1880
|
-
var
|
|
1881
|
-
var Popover =
|
|
1882
|
-
var PopoverTrigger =
|
|
1883
|
-
|
|
1884
|
-
|
|
2120
|
+
var React27 = __toESM(require("react"), 1);
|
|
2121
|
+
var import_popover = require("@base-ui/react/popover");
|
|
2122
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2123
|
+
var Popover = import_popover.Popover.Root;
|
|
2124
|
+
var PopoverTrigger = React27.forwardRef(
|
|
2125
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_popover.Popover.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
2126
|
+
);
|
|
2127
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
2128
|
+
var PopoverContent = React27.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_popover.Popover.Positioner, { align, sideOffset, className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2129
|
+
import_popover.Popover.Popup,
|
|
1885
2130
|
{
|
|
1886
2131
|
ref,
|
|
1887
|
-
align,
|
|
1888
|
-
sideOffset,
|
|
1889
2132
|
className: cn(
|
|
1890
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none
|
|
2133
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1 origin-[--transform-origin]",
|
|
1891
2134
|
className
|
|
1892
2135
|
),
|
|
1893
2136
|
...props
|
|
1894
2137
|
}
|
|
1895
|
-
) }));
|
|
1896
|
-
PopoverContent.displayName =
|
|
2138
|
+
) }) }));
|
|
2139
|
+
PopoverContent.displayName = "PopoverContent";
|
|
1897
2140
|
|
|
1898
2141
|
// src/primitives/command.tsx
|
|
1899
|
-
var
|
|
2142
|
+
var React29 = __toESM(require("react"), 1);
|
|
1900
2143
|
var import_cmdk = require("cmdk");
|
|
1901
|
-
var
|
|
2144
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1902
2145
|
|
|
1903
2146
|
// src/primitives/dialog.tsx
|
|
1904
|
-
var
|
|
1905
|
-
var
|
|
1906
|
-
var
|
|
1907
|
-
var
|
|
1908
|
-
var
|
|
1909
|
-
var
|
|
1910
|
-
|
|
2147
|
+
var React28 = __toESM(require("react"), 1);
|
|
2148
|
+
var import_dialog2 = require("@base-ui/react/dialog");
|
|
2149
|
+
var import_lucide_react7 = require("lucide-react");
|
|
2150
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2151
|
+
var Dialog2 = import_dialog2.Dialog.Root;
|
|
2152
|
+
var DialogTrigger2 = React28.forwardRef(
|
|
2153
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_dialog2.Dialog.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
2154
|
+
);
|
|
2155
|
+
DialogTrigger2.displayName = "DialogTrigger";
|
|
2156
|
+
var DialogPortal2 = import_dialog2.Dialog.Portal;
|
|
2157
|
+
var DialogClose2 = React28.forwardRef(
|
|
2158
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_dialog2.Dialog.Close, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
2159
|
+
);
|
|
2160
|
+
DialogClose2.displayName = "DialogClose";
|
|
2161
|
+
var DialogOverlay2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2162
|
+
import_dialog2.Dialog.Backdrop,
|
|
1911
2163
|
{
|
|
1912
2164
|
ref,
|
|
1913
2165
|
className: cn(
|
|
1914
|
-
"fixed inset-0 z-50 bg-black/80
|
|
2166
|
+
"fixed inset-0 z-50 bg-black/80 transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
1915
2167
|
className
|
|
1916
2168
|
),
|
|
1917
2169
|
...props
|
|
1918
2170
|
}
|
|
1919
2171
|
));
|
|
1920
|
-
DialogOverlay2.displayName =
|
|
1921
|
-
var DialogContent2 =
|
|
1922
|
-
/* @__PURE__ */ (0,
|
|
1923
|
-
/* @__PURE__ */ (0,
|
|
1924
|
-
|
|
2172
|
+
DialogOverlay2.displayName = "DialogOverlay";
|
|
2173
|
+
var DialogContent2 = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(DialogPortal2, { children: [
|
|
2174
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogOverlay2, {}),
|
|
2175
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2176
|
+
import_dialog2.Dialog.Popup,
|
|
1925
2177
|
{
|
|
1926
2178
|
ref,
|
|
1927
2179
|
className: cn(
|
|
1928
|
-
"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
|
|
2180
|
+
"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 transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95 sm:rounded-lg",
|
|
1929
2181
|
className
|
|
1930
2182
|
),
|
|
1931
2183
|
...props,
|
|
1932
2184
|
children: [
|
|
1933
2185
|
children,
|
|
1934
|
-
/* @__PURE__ */ (0,
|
|
1935
|
-
/* @__PURE__ */ (0,
|
|
1936
|
-
/* @__PURE__ */ (0,
|
|
2186
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_dialog2.Dialog.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-open:bg-accent data-open:text-muted-foreground", children: [
|
|
2187
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react7.X, { className: "h-4 w-4" }),
|
|
2188
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1937
2189
|
] })
|
|
1938
2190
|
]
|
|
1939
2191
|
}
|
|
1940
2192
|
)
|
|
1941
2193
|
] }));
|
|
1942
|
-
DialogContent2.displayName =
|
|
1943
|
-
var DialogHeader2 = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
2194
|
+
DialogContent2.displayName = "DialogContent";
|
|
2195
|
+
var DialogHeader2 = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
1944
2196
|
DialogHeader2.displayName = "DialogHeader";
|
|
1945
|
-
var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
2197
|
+
var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1946
2198
|
"div",
|
|
1947
2199
|
{
|
|
1948
2200
|
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
@@ -1950,28 +2202,28 @@ var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_
|
|
|
1950
2202
|
}
|
|
1951
2203
|
);
|
|
1952
2204
|
DialogFooter2.displayName = "DialogFooter";
|
|
1953
|
-
var DialogTitle2 =
|
|
1954
|
-
|
|
2205
|
+
var DialogTitle2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2206
|
+
import_dialog2.Dialog.Title,
|
|
1955
2207
|
{
|
|
1956
2208
|
ref,
|
|
1957
2209
|
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
1958
2210
|
...props
|
|
1959
2211
|
}
|
|
1960
2212
|
));
|
|
1961
|
-
DialogTitle2.displayName =
|
|
1962
|
-
var DialogDescription2 =
|
|
1963
|
-
|
|
2213
|
+
DialogTitle2.displayName = "DialogTitle";
|
|
2214
|
+
var DialogDescription2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2215
|
+
import_dialog2.Dialog.Description,
|
|
1964
2216
|
{
|
|
1965
2217
|
ref,
|
|
1966
2218
|
className: cn("text-sm text-muted-foreground", className),
|
|
1967
2219
|
...props
|
|
1968
2220
|
}
|
|
1969
2221
|
));
|
|
1970
|
-
DialogDescription2.displayName =
|
|
2222
|
+
DialogDescription2.displayName = "DialogDescription";
|
|
1971
2223
|
|
|
1972
2224
|
// src/primitives/command.tsx
|
|
1973
|
-
var
|
|
1974
|
-
var Command =
|
|
2225
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2226
|
+
var Command = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1975
2227
|
import_cmdk.Command,
|
|
1976
2228
|
{
|
|
1977
2229
|
ref,
|
|
@@ -1983,9 +2235,9 @@ var Command = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1983
2235
|
}
|
|
1984
2236
|
));
|
|
1985
2237
|
Command.displayName = import_cmdk.Command.displayName;
|
|
1986
|
-
var CommandInput =
|
|
1987
|
-
/* @__PURE__ */ (0,
|
|
1988
|
-
/* @__PURE__ */ (0,
|
|
2238
|
+
var CommandInput = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
2239
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react8.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2240
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1989
2241
|
import_cmdk.Command.Input,
|
|
1990
2242
|
{
|
|
1991
2243
|
ref,
|
|
@@ -1998,7 +2250,7 @@ var CommandInput = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1998
2250
|
)
|
|
1999
2251
|
] }));
|
|
2000
2252
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
2001
|
-
var CommandList =
|
|
2253
|
+
var CommandList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2002
2254
|
import_cmdk.Command.List,
|
|
2003
2255
|
{
|
|
2004
2256
|
ref,
|
|
@@ -2007,9 +2259,9 @@ var CommandList = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2007
2259
|
}
|
|
2008
2260
|
));
|
|
2009
2261
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
2010
|
-
var CommandEmpty =
|
|
2262
|
+
var CommandEmpty = React29.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_cmdk.Command.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
2011
2263
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
2012
|
-
var CommandGroup =
|
|
2264
|
+
var CommandGroup = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2013
2265
|
import_cmdk.Command.Group,
|
|
2014
2266
|
{
|
|
2015
2267
|
ref,
|
|
@@ -2021,7 +2273,7 @@ var CommandGroup = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2021
2273
|
}
|
|
2022
2274
|
));
|
|
2023
2275
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
2024
|
-
var CommandSeparator =
|
|
2276
|
+
var CommandSeparator = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2025
2277
|
import_cmdk.Command.Separator,
|
|
2026
2278
|
{
|
|
2027
2279
|
ref,
|
|
@@ -2030,7 +2282,7 @@ var CommandSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2030
2282
|
}
|
|
2031
2283
|
));
|
|
2032
2284
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
2033
|
-
var CommandItem =
|
|
2285
|
+
var CommandItem = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2034
2286
|
import_cmdk.Command.Item,
|
|
2035
2287
|
{
|
|
2036
2288
|
ref,
|
|
@@ -2043,7 +2295,7 @@ var CommandItem = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2043
2295
|
));
|
|
2044
2296
|
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
|
2045
2297
|
var CommandShortcut = ({ className, ...props }) => {
|
|
2046
|
-
return /* @__PURE__ */ (0,
|
|
2298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2047
2299
|
"span",
|
|
2048
2300
|
{
|
|
2049
2301
|
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
@@ -2194,8 +2446,8 @@ var isEUCountry = (countryCode) => {
|
|
|
2194
2446
|
};
|
|
2195
2447
|
|
|
2196
2448
|
// src/components/country-select/CountrySelect.tsx
|
|
2197
|
-
var
|
|
2198
|
-
var CountrySelect =
|
|
2449
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2450
|
+
var CountrySelect = React30.forwardRef(
|
|
2199
2451
|
({
|
|
2200
2452
|
value,
|
|
2201
2453
|
onValueChange,
|
|
@@ -2205,10 +2457,10 @@ var CountrySelect = React28.forwardRef(
|
|
|
2205
2457
|
align = "center",
|
|
2206
2458
|
sideOffset = 4
|
|
2207
2459
|
}, ref) => {
|
|
2208
|
-
const [open, setOpen] =
|
|
2209
|
-
const selectedCountry =
|
|
2210
|
-
return /* @__PURE__ */ (0,
|
|
2211
|
-
/* @__PURE__ */ (0,
|
|
2460
|
+
const [open, setOpen] = React30.useState(false);
|
|
2461
|
+
const selectedCountry = React30.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);
|
|
2462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
2463
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2212
2464
|
"button",
|
|
2213
2465
|
{
|
|
2214
2466
|
ref,
|
|
@@ -2229,29 +2481,29 @@ var CountrySelect = React28.forwardRef(
|
|
|
2229
2481
|
className
|
|
2230
2482
|
),
|
|
2231
2483
|
children: [
|
|
2232
|
-
/* @__PURE__ */ (0,
|
|
2233
|
-
/* @__PURE__ */ (0,
|
|
2234
|
-
/* @__PURE__ */ (0,
|
|
2235
|
-
/* @__PURE__ */ (0,
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
2485
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-xl flex-shrink-0", children: selectedCountry.flag }),
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "truncate", children: selectedCountry.name }),
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "text-berget-muted-foreground text-xs flex-shrink-0", children: [
|
|
2236
2488
|
"(",
|
|
2237
2489
|
selectedCountry.code,
|
|
2238
2490
|
")"
|
|
2239
2491
|
] })
|
|
2240
|
-
] }) : /* @__PURE__ */ (0,
|
|
2241
|
-
/* @__PURE__ */ (0,
|
|
2242
|
-
|
|
2492
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2494
|
+
Icon,
|
|
2243
2495
|
{
|
|
2244
|
-
icon:
|
|
2496
|
+
icon: import_lucide_react9.Globe,
|
|
2245
2497
|
size: 16,
|
|
2246
2498
|
className: "flex-shrink-0 text-berget-muted-foreground"
|
|
2247
2499
|
}
|
|
2248
2500
|
),
|
|
2249
|
-
/* @__PURE__ */ (0,
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-berget-muted-foreground truncate", children: placeholder })
|
|
2250
2502
|
] }) }),
|
|
2251
|
-
/* @__PURE__ */ (0,
|
|
2252
|
-
|
|
2503
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2504
|
+
Icon,
|
|
2253
2505
|
{
|
|
2254
|
-
icon:
|
|
2506
|
+
icon: import_lucide_react9.ChevronDown,
|
|
2255
2507
|
size: 16,
|
|
2256
2508
|
className: cn(
|
|
2257
2509
|
"flex-shrink-0 text-berget-muted-foreground",
|
|
@@ -2263,17 +2515,17 @@ var CountrySelect = React28.forwardRef(
|
|
|
2263
2515
|
]
|
|
2264
2516
|
}
|
|
2265
2517
|
) }),
|
|
2266
|
-
/* @__PURE__ */ (0,
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2267
2519
|
PopoverContent,
|
|
2268
2520
|
{
|
|
2269
2521
|
align,
|
|
2270
2522
|
sideOffset,
|
|
2271
2523
|
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
2272
|
-
children: /* @__PURE__ */ (0,
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2274
|
-
/* @__PURE__ */ (0,
|
|
2275
|
-
/* @__PURE__ */ (0,
|
|
2276
|
-
/* @__PURE__ */ (0,
|
|
2524
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Command, { children: [
|
|
2525
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CommandInput, { placeholder: "Search country..." }),
|
|
2526
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(CommandList, { children: [
|
|
2527
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CommandEmpty, { children: "No countries found." }),
|
|
2528
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CommandGroup, { children: COUNTRIES.map((country) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2277
2529
|
CommandItem,
|
|
2278
2530
|
{
|
|
2279
2531
|
value: `${country.name} ${country.code}`,
|
|
@@ -2287,12 +2539,12 @@ var CountrySelect = React28.forwardRef(
|
|
|
2287
2539
|
value === country.code && "bg-berget-brand-granite-800/40"
|
|
2288
2540
|
),
|
|
2289
2541
|
children: [
|
|
2290
|
-
/* @__PURE__ */ (0,
|
|
2291
|
-
/* @__PURE__ */ (0,
|
|
2292
|
-
/* @__PURE__ */ (0,
|
|
2293
|
-
/* @__PURE__ */ (0,
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-xl flex-shrink-0", children: country.flag }),
|
|
2543
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
2544
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "text-sm truncate", children: country.name }),
|
|
2545
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "text-xs text-berget-muted-foreground", children: country.code })
|
|
2294
2546
|
] }),
|
|
2295
|
-
value === country.code && /* @__PURE__ */ (0,
|
|
2547
|
+
value === country.code && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0" })
|
|
2296
2548
|
]
|
|
2297
2549
|
},
|
|
2298
2550
|
country.code
|
|
@@ -2307,15 +2559,15 @@ var CountrySelect = React28.forwardRef(
|
|
|
2307
2559
|
CountrySelect.displayName = "CountrySelect";
|
|
2308
2560
|
|
|
2309
2561
|
// src/components/text-area/TextArea.tsx
|
|
2310
|
-
var
|
|
2311
|
-
var
|
|
2562
|
+
var React32 = __toESM(require("react"), 1);
|
|
2563
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
2312
2564
|
|
|
2313
2565
|
// src/primitives/textarea.tsx
|
|
2314
|
-
var
|
|
2315
|
-
var
|
|
2316
|
-
var Textarea =
|
|
2566
|
+
var React31 = __toESM(require("react"), 1);
|
|
2567
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2568
|
+
var Textarea = React31.forwardRef(
|
|
2317
2569
|
({ className, ...props }, ref) => {
|
|
2318
|
-
return /* @__PURE__ */ (0,
|
|
2570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2319
2571
|
"textarea",
|
|
2320
2572
|
{
|
|
2321
2573
|
className: cn(
|
|
@@ -2331,8 +2583,8 @@ var Textarea = React29.forwardRef(
|
|
|
2331
2583
|
Textarea.displayName = "Textarea";
|
|
2332
2584
|
|
|
2333
2585
|
// src/components/text-area/TextArea.tsx
|
|
2334
|
-
var
|
|
2335
|
-
var textAreaVariants = (0,
|
|
2586
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2587
|
+
var textAreaVariants = (0, import_class_variance_authority12.cva)(
|
|
2336
2588
|
"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",
|
|
2337
2589
|
{
|
|
2338
2590
|
variants: {
|
|
@@ -2354,7 +2606,7 @@ var textAreaVariants = (0, import_class_variance_authority11.cva)(
|
|
|
2354
2606
|
}
|
|
2355
2607
|
}
|
|
2356
2608
|
);
|
|
2357
|
-
var TextArea =
|
|
2609
|
+
var TextArea = React32.forwardRef(
|
|
2358
2610
|
({
|
|
2359
2611
|
className,
|
|
2360
2612
|
variant,
|
|
@@ -2374,13 +2626,13 @@ var TextArea = React30.forwardRef(
|
|
|
2374
2626
|
actionButton,
|
|
2375
2627
|
...props
|
|
2376
2628
|
}, ref) => {
|
|
2377
|
-
const generatedId =
|
|
2629
|
+
const generatedId = React32.useId();
|
|
2378
2630
|
const textareaId = id || generatedId;
|
|
2379
2631
|
const errorId = `${textareaId}-error`;
|
|
2380
2632
|
const descriptionId = `${textareaId}-description`;
|
|
2381
2633
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
2382
|
-
return /* @__PURE__ */ (0,
|
|
2383
|
-
label && /* @__PURE__ */ (0,
|
|
2634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
2635
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2384
2636
|
"label",
|
|
2385
2637
|
{
|
|
2386
2638
|
htmlFor: textareaId,
|
|
@@ -2392,9 +2644,9 @@ var TextArea = React30.forwardRef(
|
|
|
2392
2644
|
children: label
|
|
2393
2645
|
}
|
|
2394
2646
|
),
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
2396
|
-
icon && /* @__PURE__ */ (0,
|
|
2397
|
-
/* @__PURE__ */ (0,
|
|
2647
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
|
|
2648
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
2649
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2398
2650
|
Textarea,
|
|
2399
2651
|
{
|
|
2400
2652
|
ref,
|
|
@@ -2419,13 +2671,13 @@ var TextArea = React30.forwardRef(
|
|
|
2419
2671
|
...props
|
|
2420
2672
|
}
|
|
2421
2673
|
),
|
|
2422
|
-
secondaryIcon && /* @__PURE__ */ (0,
|
|
2423
|
-
actionButton && /* @__PURE__ */ (0,
|
|
2674
|
+
secondaryIcon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
2675
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
2424
2676
|
] }),
|
|
2425
|
-
(description || error || showCount && maxLength) && /* @__PURE__ */ (0,
|
|
2426
|
-
description && /* @__PURE__ */ (0,
|
|
2427
|
-
(error || showCount && maxLength) && /* @__PURE__ */ (0,
|
|
2428
|
-
showCount && maxLength && /* @__PURE__ */ (0,
|
|
2677
|
+
(description || error || showCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2678
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
2679
|
+
(error || showCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
2680
|
+
showCount && maxLength && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2429
2681
|
Typography,
|
|
2430
2682
|
{
|
|
2431
2683
|
variant: "xs",
|
|
@@ -2439,7 +2691,7 @@ var TextArea = React30.forwardRef(
|
|
|
2439
2691
|
]
|
|
2440
2692
|
}
|
|
2441
2693
|
),
|
|
2442
|
-
error && /* @__PURE__ */ (0,
|
|
2694
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2443
2695
|
Typography,
|
|
2444
2696
|
{
|
|
2445
2697
|
variant: "xs",
|
|
@@ -2456,22 +2708,21 @@ var TextArea = React30.forwardRef(
|
|
|
2456
2708
|
TextArea.displayName = "TextArea";
|
|
2457
2709
|
|
|
2458
2710
|
// src/primitives/label.tsx
|
|
2459
|
-
var
|
|
2460
|
-
var
|
|
2461
|
-
var
|
|
2462
|
-
var
|
|
2463
|
-
var labelVariants = (0, import_class_variance_authority12.cva)(
|
|
2711
|
+
var React33 = __toESM(require("react"), 1);
|
|
2712
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
2713
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2714
|
+
var labelVariants = (0, import_class_variance_authority13.cva)(
|
|
2464
2715
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2465
2716
|
);
|
|
2466
|
-
var
|
|
2467
|
-
|
|
2717
|
+
var Label = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { ref, className: cn(labelVariants(), className), ...props }));
|
|
2718
|
+
Label.displayName = "Label";
|
|
2468
2719
|
|
|
2469
2720
|
// src/primitives/field.tsx
|
|
2470
2721
|
var import_react = require("react");
|
|
2471
|
-
var
|
|
2472
|
-
var
|
|
2722
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
2723
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2473
2724
|
function FieldSet({ className, ...props }) {
|
|
2474
|
-
return /* @__PURE__ */ (0,
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2475
2726
|
"fieldset",
|
|
2476
2727
|
{
|
|
2477
2728
|
"data-slot": "field-set",
|
|
@@ -2489,7 +2740,7 @@ function FieldLegend({
|
|
|
2489
2740
|
variant = "legend",
|
|
2490
2741
|
...props
|
|
2491
2742
|
}) {
|
|
2492
|
-
return /* @__PURE__ */ (0,
|
|
2743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2493
2744
|
"legend",
|
|
2494
2745
|
{
|
|
2495
2746
|
"data-slot": "field-legend",
|
|
@@ -2505,7 +2756,7 @@ function FieldLegend({
|
|
|
2505
2756
|
);
|
|
2506
2757
|
}
|
|
2507
2758
|
function FieldGroup({ className, ...props }) {
|
|
2508
|
-
return /* @__PURE__ */ (0,
|
|
2759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2509
2760
|
"div",
|
|
2510
2761
|
{
|
|
2511
2762
|
"data-slot": "field-group",
|
|
@@ -2517,7 +2768,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
2517
2768
|
}
|
|
2518
2769
|
);
|
|
2519
2770
|
}
|
|
2520
|
-
var fieldVariants = (0,
|
|
2771
|
+
var fieldVariants = (0, import_class_variance_authority14.cva)(
|
|
2521
2772
|
"group/field data-[invalid=true]:text-berget-destructive-foreground flex w-full gap-3",
|
|
2522
2773
|
{
|
|
2523
2774
|
variants: {
|
|
@@ -2545,7 +2796,7 @@ function Field({
|
|
|
2545
2796
|
orientation = "vertical",
|
|
2546
2797
|
...props
|
|
2547
2798
|
}) {
|
|
2548
|
-
return /* @__PURE__ */ (0,
|
|
2799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2549
2800
|
"div",
|
|
2550
2801
|
{
|
|
2551
2802
|
role: "group",
|
|
@@ -2557,7 +2808,7 @@ function Field({
|
|
|
2557
2808
|
);
|
|
2558
2809
|
}
|
|
2559
2810
|
function FieldContent({ className, ...props }) {
|
|
2560
|
-
return /* @__PURE__ */ (0,
|
|
2811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2561
2812
|
"div",
|
|
2562
2813
|
{
|
|
2563
2814
|
"data-slot": "field-content",
|
|
@@ -2567,8 +2818,8 @@ function FieldContent({ className, ...props }) {
|
|
|
2567
2818
|
);
|
|
2568
2819
|
}
|
|
2569
2820
|
function FieldLabel({ className, ...props }) {
|
|
2570
|
-
return /* @__PURE__ */ (0,
|
|
2571
|
-
|
|
2821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2822
|
+
Label,
|
|
2572
2823
|
{
|
|
2573
2824
|
"data-slot": "field-label",
|
|
2574
2825
|
className: cn(
|
|
@@ -2582,7 +2833,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
2582
2833
|
);
|
|
2583
2834
|
}
|
|
2584
2835
|
function FieldTitle({ className, ...props }) {
|
|
2585
|
-
return /* @__PURE__ */ (0,
|
|
2836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2586
2837
|
"div",
|
|
2587
2838
|
{
|
|
2588
2839
|
"data-slot": "field-label",
|
|
@@ -2595,7 +2846,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
2595
2846
|
);
|
|
2596
2847
|
}
|
|
2597
2848
|
function FieldDescription({ className, ...props }) {
|
|
2598
|
-
return /* @__PURE__ */ (0,
|
|
2849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2599
2850
|
"p",
|
|
2600
2851
|
{
|
|
2601
2852
|
"data-slot": "field-description",
|
|
@@ -2614,7 +2865,7 @@ function FieldSeparator({
|
|
|
2614
2865
|
className,
|
|
2615
2866
|
...props
|
|
2616
2867
|
}) {
|
|
2617
|
-
return /* @__PURE__ */ (0,
|
|
2868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2618
2869
|
"div",
|
|
2619
2870
|
{
|
|
2620
2871
|
"data-slot": "field-separator",
|
|
@@ -2625,8 +2876,8 @@ function FieldSeparator({
|
|
|
2625
2876
|
),
|
|
2626
2877
|
...props,
|
|
2627
2878
|
children: [
|
|
2628
|
-
/* @__PURE__ */ (0,
|
|
2629
|
-
children && /* @__PURE__ */ (0,
|
|
2879
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
2880
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2630
2881
|
"span",
|
|
2631
2882
|
{
|
|
2632
2883
|
className: "bg-berget-background text-berget-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -2654,12 +2905,12 @@ function FieldError({
|
|
|
2654
2905
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
2655
2906
|
return errors[0].message;
|
|
2656
2907
|
}
|
|
2657
|
-
return /* @__PURE__ */ (0,
|
|
2908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map((error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("li", { children: error.message }, index)) });
|
|
2658
2909
|
}, [children, errors]);
|
|
2659
2910
|
if (!content) {
|
|
2660
2911
|
return null;
|
|
2661
2912
|
}
|
|
2662
|
-
return /* @__PURE__ */ (0,
|
|
2913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2663
2914
|
"div",
|
|
2664
2915
|
{
|
|
2665
2916
|
role: "alert",
|
|
@@ -2672,11 +2923,11 @@ function FieldError({
|
|
|
2672
2923
|
}
|
|
2673
2924
|
|
|
2674
2925
|
// src/components/link/Link.tsx
|
|
2675
|
-
var
|
|
2676
|
-
var
|
|
2677
|
-
var
|
|
2678
|
-
var
|
|
2679
|
-
var linkVariants = (0,
|
|
2926
|
+
var React34 = __toESM(require("react"), 1);
|
|
2927
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
2928
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2929
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2930
|
+
var linkVariants = (0, import_class_variance_authority15.cva)(
|
|
2680
2931
|
"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",
|
|
2681
2932
|
{
|
|
2682
2933
|
variants: {
|
|
@@ -2700,7 +2951,7 @@ var linkVariants = (0, import_class_variance_authority14.cva)(
|
|
|
2700
2951
|
}
|
|
2701
2952
|
}
|
|
2702
2953
|
);
|
|
2703
|
-
var Link =
|
|
2954
|
+
var Link = React34.forwardRef(
|
|
2704
2955
|
({
|
|
2705
2956
|
className,
|
|
2706
2957
|
variant,
|
|
@@ -2713,7 +2964,7 @@ var Link = React32.forwardRef(
|
|
|
2713
2964
|
...props
|
|
2714
2965
|
}, ref) => {
|
|
2715
2966
|
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
2716
|
-
return /* @__PURE__ */ (0,
|
|
2967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2717
2968
|
"a",
|
|
2718
2969
|
{
|
|
2719
2970
|
ref,
|
|
@@ -2729,8 +2980,8 @@ var Link = React32.forwardRef(
|
|
|
2729
2980
|
},
|
|
2730
2981
|
children: [
|
|
2731
2982
|
children,
|
|
2732
|
-
icon && /* @__PURE__ */ (0,
|
|
2733
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0,
|
|
2983
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "inline-flex items-center", children: icon }),
|
|
2984
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon, { icon: import_lucide_react10.ExternalLink, size: 16 }) })
|
|
2734
2985
|
]
|
|
2735
2986
|
}
|
|
2736
2987
|
);
|
|
@@ -2739,11 +2990,11 @@ var Link = React32.forwardRef(
|
|
|
2739
2990
|
Link.displayName = "Link";
|
|
2740
2991
|
|
|
2741
2992
|
// src/components/container/Container.tsx
|
|
2742
|
-
var
|
|
2743
|
-
var
|
|
2744
|
-
var
|
|
2745
|
-
var
|
|
2746
|
-
var containerVariants = (0,
|
|
2993
|
+
var React35 = __toESM(require("react"), 1);
|
|
2994
|
+
var import_merge_props2 = require("@base-ui/react/merge-props");
|
|
2995
|
+
var import_use_render2 = require("@base-ui/react/use-render");
|
|
2996
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
2997
|
+
var containerVariants = (0, import_class_variance_authority16.cva)("w-full mx-auto", {
|
|
2747
2998
|
variants: {
|
|
2748
2999
|
size: {
|
|
2749
3000
|
sm: "max-w-3xl",
|
|
@@ -2764,28 +3015,30 @@ var containerVariants = (0, import_class_variance_authority15.cva)("w-full mx-au
|
|
|
2764
3015
|
padding: "md"
|
|
2765
3016
|
}
|
|
2766
3017
|
});
|
|
2767
|
-
var Container =
|
|
3018
|
+
var Container = React35.forwardRef(
|
|
2768
3019
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
3020
|
+
return (0, import_use_render2.useRender)({
|
|
3021
|
+
ref,
|
|
3022
|
+
defaultTagName: "div",
|
|
3023
|
+
render: asChild ? children : void 0,
|
|
3024
|
+
props: (0, import_merge_props2.mergeProps)(
|
|
3025
|
+
{
|
|
3026
|
+
className: cn(containerVariants({ size, padding }), className),
|
|
3027
|
+
children: asChild ? void 0 : children
|
|
3028
|
+
},
|
|
3029
|
+
props
|
|
3030
|
+
)
|
|
3031
|
+
});
|
|
2779
3032
|
}
|
|
2780
3033
|
);
|
|
2781
3034
|
Container.displayName = "Container";
|
|
2782
3035
|
|
|
2783
3036
|
// src/components/grid/Grid.tsx
|
|
2784
|
-
var
|
|
2785
|
-
var
|
|
2786
|
-
var
|
|
2787
|
-
var
|
|
2788
|
-
var gridVariants = (0,
|
|
3037
|
+
var React36 = __toESM(require("react"), 1);
|
|
3038
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
3039
|
+
var import_merge_props3 = require("@base-ui/react/merge-props");
|
|
3040
|
+
var import_use_render3 = require("@base-ui/react/use-render");
|
|
3041
|
+
var gridVariants = (0, import_class_variance_authority17.cva)("grid", {
|
|
2789
3042
|
variants: {
|
|
2790
3043
|
align: {
|
|
2791
3044
|
start: "items-start",
|
|
@@ -2807,36 +3060,38 @@ var gridVariants = (0, import_class_variance_authority16.cva)("grid", {
|
|
|
2807
3060
|
justify: "start"
|
|
2808
3061
|
}
|
|
2809
3062
|
});
|
|
2810
|
-
var Grid =
|
|
3063
|
+
var Grid = React36.forwardRef(
|
|
2811
3064
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
3065
|
+
return (0, import_use_render3.useRender)({
|
|
3066
|
+
ref,
|
|
3067
|
+
defaultTagName: "div",
|
|
3068
|
+
render: asChild ? children : void 0,
|
|
3069
|
+
props: (0, import_merge_props3.mergeProps)(
|
|
3070
|
+
{
|
|
3071
|
+
className: cn(
|
|
3072
|
+
gridVariants({ align, justify }),
|
|
3073
|
+
cols !== void 0 && `grid-cols-${cols}`,
|
|
3074
|
+
rows !== void 0 && `grid-rows-${rows}`,
|
|
3075
|
+
gap !== void 0 && `gap-${gap}`,
|
|
3076
|
+
gapX !== void 0 && `gap-x-${gapX}`,
|
|
3077
|
+
gapY !== void 0 && `gap-y-${gapY}`,
|
|
3078
|
+
className
|
|
3079
|
+
),
|
|
3080
|
+
children: asChild ? void 0 : children
|
|
3081
|
+
},
|
|
3082
|
+
props
|
|
3083
|
+
)
|
|
3084
|
+
});
|
|
2830
3085
|
}
|
|
2831
3086
|
);
|
|
2832
3087
|
Grid.displayName = "Grid";
|
|
2833
3088
|
|
|
2834
3089
|
// src/components/box/Box.tsx
|
|
2835
|
-
var
|
|
2836
|
-
var
|
|
2837
|
-
var
|
|
2838
|
-
var
|
|
2839
|
-
var boxVariants = (0,
|
|
3090
|
+
var React37 = __toESM(require("react"), 1);
|
|
3091
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
3092
|
+
var import_merge_props4 = require("@base-ui/react/merge-props");
|
|
3093
|
+
var import_use_render4 = require("@base-ui/react/use-render");
|
|
3094
|
+
var boxVariants = (0, import_class_variance_authority18.cva)("flex", {
|
|
2840
3095
|
variants: {
|
|
2841
3096
|
direction: {
|
|
2842
3097
|
row: "flex-row",
|
|
@@ -2872,37 +3127,39 @@ var boxVariants = (0, import_class_variance_authority17.cva)("flex", {
|
|
|
2872
3127
|
wrap: "nowrap"
|
|
2873
3128
|
}
|
|
2874
3129
|
});
|
|
2875
|
-
var Box =
|
|
3130
|
+
var Box = React37.forwardRef(
|
|
2876
3131
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
3132
|
+
return (0, import_use_render4.useRender)({
|
|
3133
|
+
ref,
|
|
3134
|
+
defaultTagName: "div",
|
|
3135
|
+
render: asChild ? children : void 0,
|
|
3136
|
+
props: (0, import_merge_props4.mergeProps)(
|
|
3137
|
+
{
|
|
3138
|
+
className: cn(
|
|
3139
|
+
boxVariants({ direction, align, justify, wrap }),
|
|
3140
|
+
gap !== void 0 && `gap-${gap}`,
|
|
3141
|
+
className
|
|
3142
|
+
),
|
|
3143
|
+
children: asChild ? void 0 : children
|
|
3144
|
+
},
|
|
3145
|
+
props
|
|
3146
|
+
)
|
|
3147
|
+
});
|
|
2891
3148
|
}
|
|
2892
3149
|
);
|
|
2893
3150
|
Box.displayName = "Box";
|
|
2894
3151
|
|
|
2895
3152
|
// src/components/berget-logo/BergetLogo.tsx
|
|
2896
|
-
var
|
|
2897
|
-
var
|
|
2898
|
-
var BergetLogo =
|
|
3153
|
+
var React38 = __toESM(require("react"), 1);
|
|
3154
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3155
|
+
var BergetLogo = React38.forwardRef(
|
|
2899
3156
|
({ variant = "logotype", color = "auto", size = 48, className, ...props }, ref) => {
|
|
2900
3157
|
const fillColor = color === "auto" ? "var(--berget-logo-light)" : color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
2901
3158
|
if (variant === "symbol") {
|
|
2902
3159
|
const aspectRatio2 = 463 / 419;
|
|
2903
3160
|
const width2 = size * aspectRatio2;
|
|
2904
3161
|
const height2 = size;
|
|
2905
|
-
return /* @__PURE__ */ (0,
|
|
3162
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2906
3163
|
"svg",
|
|
2907
3164
|
{
|
|
2908
3165
|
ref,
|
|
@@ -2915,7 +3172,7 @@ var BergetLogo = React36.forwardRef(
|
|
|
2915
3172
|
"aria-label": "Berget symbol",
|
|
2916
3173
|
className: cn("inline-block", className),
|
|
2917
3174
|
...props,
|
|
2918
|
-
children: /* @__PURE__ */ (0,
|
|
3175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2919
3176
|
"path",
|
|
2920
3177
|
{
|
|
2921
3178
|
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",
|
|
@@ -2928,7 +3185,7 @@ var BergetLogo = React36.forwardRef(
|
|
|
2928
3185
|
const aspectRatio = 793.63 / 204.37;
|
|
2929
3186
|
const width = size * aspectRatio;
|
|
2930
3187
|
const height = size;
|
|
2931
|
-
return /* @__PURE__ */ (0,
|
|
3188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
2932
3189
|
"svg",
|
|
2933
3190
|
{
|
|
2934
3191
|
ref,
|
|
@@ -2942,59 +3199,59 @@ var BergetLogo = React36.forwardRef(
|
|
|
2942
3199
|
className: cn("inline-block", className),
|
|
2943
3200
|
...props,
|
|
2944
3201
|
children: [
|
|
2945
|
-
/* @__PURE__ */ (0,
|
|
2946
|
-
/* @__PURE__ */ (0,
|
|
3202
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("g", { style: { fill: fillColor }, children: [
|
|
3203
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2947
3204
|
"path",
|
|
2948
3205
|
{
|
|
2949
3206
|
className: "berget-logotype-fill",
|
|
2950
3207
|
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"
|
|
2951
3208
|
}
|
|
2952
3209
|
),
|
|
2953
|
-
/* @__PURE__ */ (0,
|
|
3210
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2954
3211
|
"path",
|
|
2955
3212
|
{
|
|
2956
3213
|
className: "berget-logotype-fill",
|
|
2957
3214
|
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"
|
|
2958
3215
|
}
|
|
2959
3216
|
),
|
|
2960
|
-
/* @__PURE__ */ (0,
|
|
3217
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2961
3218
|
"path",
|
|
2962
3219
|
{
|
|
2963
3220
|
className: "berget-logotype-fill",
|
|
2964
3221
|
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"
|
|
2965
3222
|
}
|
|
2966
3223
|
),
|
|
2967
|
-
/* @__PURE__ */ (0,
|
|
3224
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2968
3225
|
"path",
|
|
2969
3226
|
{
|
|
2970
3227
|
className: "berget-logotype-fill",
|
|
2971
3228
|
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"
|
|
2972
3229
|
}
|
|
2973
3230
|
),
|
|
2974
|
-
/* @__PURE__ */ (0,
|
|
3231
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2975
3232
|
"path",
|
|
2976
3233
|
{
|
|
2977
3234
|
className: "berget-logotype-fill",
|
|
2978
3235
|
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"
|
|
2979
3236
|
}
|
|
2980
3237
|
),
|
|
2981
|
-
/* @__PURE__ */ (0,
|
|
3238
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2982
3239
|
"path",
|
|
2983
3240
|
{
|
|
2984
3241
|
className: "berget-logotype-fill",
|
|
2985
3242
|
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"
|
|
2986
3243
|
}
|
|
2987
3244
|
),
|
|
2988
|
-
/* @__PURE__ */ (0,
|
|
3245
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2989
3246
|
"path",
|
|
2990
3247
|
{
|
|
2991
3248
|
className: "berget-logotype-fill",
|
|
2992
3249
|
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"
|
|
2993
3250
|
}
|
|
2994
3251
|
),
|
|
2995
|
-
/* @__PURE__ */ (0,
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { className: "berget-logotype-fill", d: "M778.48,172.54v-96.04h15.15v96.04h-15.15Z" })
|
|
2996
3253
|
] }),
|
|
2997
|
-
/* @__PURE__ */ (0,
|
|
3254
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2998
3255
|
"path",
|
|
2999
3256
|
{
|
|
3000
3257
|
style: { fill: fillColor },
|
|
@@ -3009,103 +3266,110 @@ var BergetLogo = React36.forwardRef(
|
|
|
3009
3266
|
BergetLogo.displayName = "BergetLogo";
|
|
3010
3267
|
|
|
3011
3268
|
// src/components/language-select/LanguageSelect.tsx
|
|
3012
|
-
var
|
|
3013
|
-
var
|
|
3014
|
-
var
|
|
3015
|
-
var
|
|
3016
|
-
var LanguageSelect =
|
|
3017
|
-
|
|
3018
|
-
/* @__PURE__ */ (0,
|
|
3019
|
-
|
|
3269
|
+
var React39 = __toESM(require("react"), 1);
|
|
3270
|
+
var import_select3 = require("@base-ui/react/select");
|
|
3271
|
+
var import_lucide_react11 = require("lucide-react");
|
|
3272
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3273
|
+
var LanguageSelect = React39.forwardRef(
|
|
3274
|
+
({ className, options, value, onValueChange }, ref) => {
|
|
3275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3276
|
+
import_select3.Select.Root,
|
|
3020
3277
|
{
|
|
3021
|
-
|
|
3022
|
-
"
|
|
3023
|
-
className: cn(
|
|
3024
|
-
// Base styles
|
|
3025
|
-
"h-8 w-8 p-0 rounded-full",
|
|
3026
|
-
"flex items-center justify-center",
|
|
3027
|
-
// Border and background
|
|
3028
|
-
"border border-berget-border-subtle",
|
|
3029
|
-
"bg-transparent",
|
|
3030
|
-
// Hover effect
|
|
3031
|
-
"hover:bg-berget-surface-hover",
|
|
3032
|
-
// Transitions
|
|
3033
|
-
"transition-all duration-200",
|
|
3034
|
-
// Focus styles - remove all focus rings
|
|
3035
|
-
"focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
3036
|
-
// Disabled state
|
|
3037
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
3038
|
-
className
|
|
3039
|
-
),
|
|
3278
|
+
value,
|
|
3279
|
+
onValueChange: onValueChange ? (v) => onValueChange(v ?? "") : void 0,
|
|
3040
3280
|
children: [
|
|
3041
|
-
/* @__PURE__ */ (0,
|
|
3042
|
-
|
|
3281
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3282
|
+
import_select3.Select.Trigger,
|
|
3283
|
+
{
|
|
3284
|
+
ref,
|
|
3285
|
+
"aria-label": "Select language",
|
|
3286
|
+
className: cn(
|
|
3287
|
+
// Base styles
|
|
3288
|
+
"h-8 w-8 p-0 rounded-full",
|
|
3289
|
+
"flex items-center justify-center",
|
|
3290
|
+
// Border and background
|
|
3291
|
+
"border border-berget-border-subtle",
|
|
3292
|
+
"bg-transparent",
|
|
3293
|
+
// Hover effect
|
|
3294
|
+
"hover:bg-berget-surface-hover",
|
|
3295
|
+
// Transitions
|
|
3296
|
+
"transition-all duration-200",
|
|
3297
|
+
// Focus styles - remove all focus rings
|
|
3298
|
+
"focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
3299
|
+
// Disabled state
|
|
3300
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
3301
|
+
className
|
|
3302
|
+
),
|
|
3303
|
+
children: [
|
|
3304
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "sr-only", children: "Select language" }),
|
|
3305
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { icon: import_lucide_react11.Globe, size: 16, "aria-hidden": true })
|
|
3306
|
+
]
|
|
3307
|
+
}
|
|
3308
|
+
),
|
|
3309
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_select3.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_select3.Select.Positioner, { alignItemWithTrigger: false, className: "isolate z-50", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3310
|
+
import_select3.Select.Popup,
|
|
3311
|
+
{
|
|
3312
|
+
className: cn(
|
|
3313
|
+
// Positioning and z-index
|
|
3314
|
+
"z-50 min-w-[8rem]",
|
|
3315
|
+
// Overflow handling
|
|
3316
|
+
"overflow-y-auto overflow-x-hidden",
|
|
3317
|
+
// Border and background
|
|
3318
|
+
"border border-berget-border bg-berget-background",
|
|
3319
|
+
"text-berget-foreground",
|
|
3320
|
+
// Shadow
|
|
3321
|
+
"shadow-berget-lg",
|
|
3322
|
+
// Rounded corners
|
|
3323
|
+
"rounded-md",
|
|
3324
|
+
// Animations
|
|
3325
|
+
"transition-[opacity,transform]",
|
|
3326
|
+
"data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95",
|
|
3327
|
+
// Position-based animations
|
|
3328
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
3329
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
3330
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
3331
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
3332
|
+
// Origin for transforms
|
|
3333
|
+
"origin-[--transform-origin]"
|
|
3334
|
+
),
|
|
3335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_select3.Select.List, { className: "p-1", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3336
|
+
import_select3.Select.Item,
|
|
3337
|
+
{
|
|
3338
|
+
value: option.value,
|
|
3339
|
+
disabled: option.disabled,
|
|
3340
|
+
className: cn(
|
|
3341
|
+
// Layout
|
|
3342
|
+
"relative flex w-full cursor-default",
|
|
3343
|
+
"select-none items-center rounded-sm py-2 px-3",
|
|
3344
|
+
// Text
|
|
3345
|
+
"text-sm outline-none",
|
|
3346
|
+
// Focus/hover styles
|
|
3347
|
+
"focus:bg-berget-primary-tint focus:text-berget-foreground",
|
|
3348
|
+
"hover:bg-berget-primary-tint",
|
|
3349
|
+
// Disabled state
|
|
3350
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
3351
|
+
),
|
|
3352
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_select3.Select.ItemText, { children: option.label })
|
|
3353
|
+
},
|
|
3354
|
+
option.value
|
|
3355
|
+
)) })
|
|
3356
|
+
}
|
|
3357
|
+
) }) })
|
|
3043
3358
|
]
|
|
3044
3359
|
}
|
|
3045
|
-
)
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
{
|
|
3049
|
-
className: cn(
|
|
3050
|
-
// Positioning and z-index
|
|
3051
|
-
"relative z-50 min-w-[8rem]",
|
|
3052
|
-
// Overflow handling
|
|
3053
|
-
"overflow-y-auto overflow-x-hidden",
|
|
3054
|
-
// Border and background
|
|
3055
|
-
"border border-berget-border bg-berget-background",
|
|
3056
|
-
"text-berget-foreground",
|
|
3057
|
-
// Shadow
|
|
3058
|
-
"shadow-berget-lg",
|
|
3059
|
-
// Rounded corners
|
|
3060
|
-
"rounded-md",
|
|
3061
|
-
// Animations
|
|
3062
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3063
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3064
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
3065
|
-
// Position-based animations
|
|
3066
|
-
"data-[side=bottom]:slide-in-from-top-2",
|
|
3067
|
-
"data-[side=left]:slide-in-from-right-2",
|
|
3068
|
-
"data-[side=right]:slide-in-from-left-2",
|
|
3069
|
-
"data-[side=top]:slide-in-from-bottom-2",
|
|
3070
|
-
// Origin for transforms
|
|
3071
|
-
"origin-[--radix-select-content-transform-origin]"
|
|
3072
|
-
),
|
|
3073
|
-
position: "popper",
|
|
3074
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SelectPrimitive2.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3075
|
-
SelectPrimitive2.Item,
|
|
3076
|
-
{
|
|
3077
|
-
value: option.value,
|
|
3078
|
-
disabled: option.disabled,
|
|
3079
|
-
className: cn(
|
|
3080
|
-
// Layout
|
|
3081
|
-
"relative flex w-full cursor-default",
|
|
3082
|
-
"select-none items-center rounded-sm py-2 px-3",
|
|
3083
|
-
// Text
|
|
3084
|
-
"text-sm outline-none",
|
|
3085
|
-
// Focus/hover styles
|
|
3086
|
-
"focus:bg-berget-primary-tint focus:text-berget-foreground",
|
|
3087
|
-
"hover:bg-berget-primary-tint",
|
|
3088
|
-
// Disabled state
|
|
3089
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
3090
|
-
),
|
|
3091
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SelectPrimitive2.ItemText, { children: option.label })
|
|
3092
|
-
},
|
|
3093
|
-
option.value
|
|
3094
|
-
)) })
|
|
3095
|
-
}
|
|
3096
|
-
) })
|
|
3097
|
-
] });
|
|
3098
|
-
});
|
|
3360
|
+
);
|
|
3361
|
+
}
|
|
3362
|
+
);
|
|
3099
3363
|
LanguageSelect.displayName = "LanguageSelect";
|
|
3100
3364
|
|
|
3101
3365
|
// src/components/list/List.tsx
|
|
3102
|
-
var
|
|
3366
|
+
var React41 = __toESM(require("react"), 1);
|
|
3103
3367
|
|
|
3104
3368
|
// src/components/divider/Divider.tsx
|
|
3105
|
-
var
|
|
3106
|
-
var
|
|
3107
|
-
var
|
|
3108
|
-
var dividerVariants = (0,
|
|
3369
|
+
var React40 = __toESM(require("react"), 1);
|
|
3370
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
3371
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3372
|
+
var dividerVariants = (0, import_class_variance_authority19.cva)("", {
|
|
3109
3373
|
variants: {
|
|
3110
3374
|
variant: {
|
|
3111
3375
|
default: "bg-berget-separator",
|
|
@@ -3125,7 +3389,7 @@ var dividerVariants = (0, import_class_variance_authority18.cva)("", {
|
|
|
3125
3389
|
size: "thin"
|
|
3126
3390
|
}
|
|
3127
3391
|
});
|
|
3128
|
-
var Divider =
|
|
3392
|
+
var Divider = React40.forwardRef(
|
|
3129
3393
|
({
|
|
3130
3394
|
className,
|
|
3131
3395
|
orientation = "horizontal",
|
|
@@ -3136,17 +3400,17 @@ var Divider = React38.forwardRef(
|
|
|
3136
3400
|
...props
|
|
3137
3401
|
}, ref) => {
|
|
3138
3402
|
if (label) {
|
|
3139
|
-
return /* @__PURE__ */ (0,
|
|
3140
|
-
labelPosition !== "right" && /* @__PURE__ */ (0,
|
|
3141
|
-
|
|
3403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
3404
|
+
labelPosition !== "right" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3405
|
+
Separator,
|
|
3142
3406
|
{
|
|
3143
3407
|
orientation: "horizontal",
|
|
3144
3408
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
3145
3409
|
}
|
|
3146
3410
|
),
|
|
3147
|
-
/* @__PURE__ */ (0,
|
|
3148
|
-
labelPosition !== "left" && /* @__PURE__ */ (0,
|
|
3149
|
-
|
|
3411
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
3412
|
+
labelPosition !== "left" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3413
|
+
Separator,
|
|
3150
3414
|
{
|
|
3151
3415
|
orientation: "horizontal",
|
|
3152
3416
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
@@ -3154,8 +3418,8 @@ var Divider = React38.forwardRef(
|
|
|
3154
3418
|
)
|
|
3155
3419
|
] });
|
|
3156
3420
|
}
|
|
3157
|
-
return /* @__PURE__ */ (0,
|
|
3158
|
-
|
|
3421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3422
|
+
Separator,
|
|
3159
3423
|
{
|
|
3160
3424
|
ref,
|
|
3161
3425
|
orientation,
|
|
@@ -3171,20 +3435,20 @@ var Divider = React38.forwardRef(
|
|
|
3171
3435
|
Divider.displayName = "Divider";
|
|
3172
3436
|
|
|
3173
3437
|
// src/components/list/List.tsx
|
|
3174
|
-
var
|
|
3175
|
-
var
|
|
3176
|
-
var List =
|
|
3438
|
+
var import_lucide_react12 = require("lucide-react");
|
|
3439
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3440
|
+
var List = React41.forwardRef(
|
|
3177
3441
|
({ className, children, ...props }, ref) => {
|
|
3178
|
-
const childrenArray =
|
|
3179
|
-
return /* @__PURE__ */ (0,
|
|
3442
|
+
const childrenArray = React41.Children.toArray(children);
|
|
3443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(React41.Fragment, { children: [
|
|
3180
3444
|
child,
|
|
3181
|
-
index < childrenArray.length - 1 && /* @__PURE__ */ (0,
|
|
3445
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Divider, { variant: "subtle" })
|
|
3182
3446
|
] }, index)) });
|
|
3183
3447
|
}
|
|
3184
3448
|
);
|
|
3185
3449
|
List.displayName = "List";
|
|
3186
|
-
var ListItem =
|
|
3187
|
-
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3450
|
+
var ListItem = React41.forwardRef(
|
|
3451
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3188
3452
|
"div",
|
|
3189
3453
|
{
|
|
3190
3454
|
ref,
|
|
@@ -3195,15 +3459,15 @@ var ListItem = React39.forwardRef(
|
|
|
3195
3459
|
),
|
|
3196
3460
|
...props,
|
|
3197
3461
|
children: [
|
|
3198
|
-
icon && /* @__PURE__ */ (0,
|
|
3199
|
-
/* @__PURE__ */ (0,
|
|
3462
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
3463
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex-1 min-w-0", children })
|
|
3200
3464
|
]
|
|
3201
3465
|
}
|
|
3202
3466
|
)
|
|
3203
3467
|
);
|
|
3204
3468
|
ListItem.displayName = "ListItem";
|
|
3205
|
-
var ListHeader =
|
|
3206
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3469
|
+
var ListHeader = React41.forwardRef(
|
|
3470
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3207
3471
|
"div",
|
|
3208
3472
|
{
|
|
3209
3473
|
ref,
|
|
@@ -3214,21 +3478,21 @@ var ListHeader = React39.forwardRef(
|
|
|
3214
3478
|
)
|
|
3215
3479
|
);
|
|
3216
3480
|
ListHeader.displayName = "ListHeader";
|
|
3217
|
-
var FeatureList =
|
|
3481
|
+
var FeatureList = React41.forwardRef(
|
|
3218
3482
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
3219
|
-
return /* @__PURE__ */ (0,
|
|
3220
|
-
variant === "bullet" ? /* @__PURE__ */ (0,
|
|
3221
|
-
/* @__PURE__ */ (0,
|
|
3483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("li", { className: "flex items-start gap-fluid-md", children: [
|
|
3484
|
+
variant === "bullet" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Icon, { icon: import_lucide_react12.Check, size: 24, className: "text-berget-logo-light" }) }),
|
|
3485
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Typography, { variant: "body", color: "muted", children: item })
|
|
3222
3486
|
] }, index)) });
|
|
3223
3487
|
}
|
|
3224
3488
|
);
|
|
3225
3489
|
FeatureList.displayName = "FeatureList";
|
|
3226
3490
|
|
|
3227
3491
|
// src/components/hero-block/HeroBlock.tsx
|
|
3228
|
-
var
|
|
3229
|
-
var
|
|
3230
|
-
var
|
|
3231
|
-
var heroBlockVariants = (0,
|
|
3492
|
+
var React42 = __toESM(require("react"), 1);
|
|
3493
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
3494
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3495
|
+
var heroBlockVariants = (0, import_class_variance_authority20.cva)(
|
|
3232
3496
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
3233
3497
|
{
|
|
3234
3498
|
variants: {
|
|
@@ -3248,7 +3512,7 @@ var heroBlockVariants = (0, import_class_variance_authority19.cva)(
|
|
|
3248
3512
|
}
|
|
3249
3513
|
}
|
|
3250
3514
|
);
|
|
3251
|
-
var HeroBlock =
|
|
3515
|
+
var HeroBlock = React42.forwardRef(
|
|
3252
3516
|
({
|
|
3253
3517
|
className,
|
|
3254
3518
|
variant,
|
|
@@ -3260,26 +3524,26 @@ var HeroBlock = React40.forwardRef(
|
|
|
3260
3524
|
actions,
|
|
3261
3525
|
...props
|
|
3262
3526
|
}, ref) => {
|
|
3263
|
-
return /* @__PURE__ */ (0,
|
|
3527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3264
3528
|
"div",
|
|
3265
3529
|
{
|
|
3266
3530
|
ref,
|
|
3267
3531
|
className: cn(heroBlockVariants({ variant, withPattern }), className),
|
|
3268
3532
|
...props,
|
|
3269
|
-
children: /* @__PURE__ */ (0,
|
|
3270
|
-
tagline && /* @__PURE__ */ (0,
|
|
3533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
3534
|
+
tagline && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3271
3535
|
Badge,
|
|
3272
3536
|
{
|
|
3273
3537
|
variant: "default",
|
|
3274
|
-
icon: TaglineIcon ? /* @__PURE__ */ (0,
|
|
3538
|
+
icon: TaglineIcon ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
3275
3539
|
iconGap: 2,
|
|
3276
3540
|
className: "mb-fluid-md",
|
|
3277
3541
|
children: tagline
|
|
3278
3542
|
}
|
|
3279
3543
|
),
|
|
3280
|
-
/* @__PURE__ */ (0,
|
|
3281
|
-
/* @__PURE__ */ (0,
|
|
3282
|
-
actions && /* @__PURE__ */ (0,
|
|
3544
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
3545
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
3546
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
3283
3547
|
] }) })
|
|
3284
3548
|
}
|
|
3285
3549
|
);
|
|
@@ -3289,7 +3553,7 @@ HeroBlock.displayName = "HeroBlock";
|
|
|
3289
3553
|
|
|
3290
3554
|
// src/components/code-block/CodeBlock.tsx
|
|
3291
3555
|
var import_react2 = require("react");
|
|
3292
|
-
var
|
|
3556
|
+
var import_lucide_react13 = require("lucide-react");
|
|
3293
3557
|
|
|
3294
3558
|
// src/lib/shiki.ts
|
|
3295
3559
|
var import_core2 = require("shiki/core");
|
|
@@ -3330,7 +3594,7 @@ function getHighlighter() {
|
|
|
3330
3594
|
}
|
|
3331
3595
|
|
|
3332
3596
|
// src/components/code-block/CodeBlock.tsx
|
|
3333
|
-
var
|
|
3597
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3334
3598
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
3335
3599
|
const [html, setHtml] = (0, import_react2.useState)(null);
|
|
3336
3600
|
const [copied, setCopied] = (0, import_react2.useState)(false);
|
|
@@ -3346,16 +3610,16 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
3346
3610
|
setCopied(true);
|
|
3347
3611
|
setTimeout(() => setCopied(false), 2e3);
|
|
3348
3612
|
}, [code]);
|
|
3349
|
-
const copyButton = /* @__PURE__ */ (0,
|
|
3613
|
+
const copyButton = /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3350
3614
|
"button",
|
|
3351
3615
|
{
|
|
3352
3616
|
onClick: handleCopy,
|
|
3353
3617
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
3354
3618
|
"aria-label": "Copy code",
|
|
3355
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
3619
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react13.Check, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react13.Copy, { className: "w-3.5 h-3.5" })
|
|
3356
3620
|
}
|
|
3357
3621
|
);
|
|
3358
|
-
return /* @__PURE__ */ (0,
|
|
3622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3359
3623
|
"div",
|
|
3360
3624
|
{
|
|
3361
3625
|
className: cn(
|
|
@@ -3363,25 +3627,25 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
3363
3627
|
className
|
|
3364
3628
|
),
|
|
3365
3629
|
children: [
|
|
3366
|
-
title && /* @__PURE__ */ (0,
|
|
3367
|
-
/* @__PURE__ */ (0,
|
|
3368
|
-
html ? /* @__PURE__ */ (0,
|
|
3630
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("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__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
3632
|
+
html ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3369
3633
|
"div",
|
|
3370
3634
|
{
|
|
3371
3635
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
3372
3636
|
dangerouslySetInnerHTML: { __html: html }
|
|
3373
3637
|
}
|
|
3374
|
-
) : /* @__PURE__ */ (0,
|
|
3638
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("code", { children: code }) })
|
|
3375
3639
|
]
|
|
3376
3640
|
}
|
|
3377
3641
|
);
|
|
3378
3642
|
}
|
|
3379
3643
|
|
|
3380
3644
|
// src/components/window-frame/WindowFrame.tsx
|
|
3381
|
-
var
|
|
3645
|
+
var React43 = __toESM(require("react"), 1);
|
|
3382
3646
|
var import_react3 = require("react");
|
|
3383
|
-
var
|
|
3384
|
-
var WindowFrame =
|
|
3647
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3648
|
+
var WindowFrame = React43.forwardRef(
|
|
3385
3649
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
3386
3650
|
const [internalActive, setInternalActive] = (0, import_react3.useState)(tabs?.[0]?.id ?? "");
|
|
3387
3651
|
const currentTab = activeTab ?? internalActive;
|
|
@@ -3392,7 +3656,7 @@ var WindowFrame = React41.forwardRef(
|
|
|
3392
3656
|
setInternalActive(id);
|
|
3393
3657
|
}
|
|
3394
3658
|
};
|
|
3395
|
-
return /* @__PURE__ */ (0,
|
|
3659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3396
3660
|
"div",
|
|
3397
3661
|
{
|
|
3398
3662
|
ref,
|
|
@@ -3402,13 +3666,13 @@ var WindowFrame = React41.forwardRef(
|
|
|
3402
3666
|
),
|
|
3403
3667
|
...props,
|
|
3404
3668
|
children: [
|
|
3405
|
-
/* @__PURE__ */ (0,
|
|
3406
|
-
/* @__PURE__ */ (0,
|
|
3407
|
-
/* @__PURE__ */ (0,
|
|
3408
|
-
/* @__PURE__ */ (0,
|
|
3409
|
-
/* @__PURE__ */ (0,
|
|
3669
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
3670
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
3671
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-3 h-3 rounded-full bg-[#FF5F56]" }),
|
|
3672
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-3 h-3 rounded-full bg-[#FFBD2E]" }),
|
|
3673
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "w-3 h-3 rounded-full bg-[#27C93F]" })
|
|
3410
3674
|
] }),
|
|
3411
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */ (0,
|
|
3675
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3412
3676
|
"button",
|
|
3413
3677
|
{
|
|
3414
3678
|
type: "button",
|
|
@@ -3420,9 +3684,9 @@ var WindowFrame = React41.forwardRef(
|
|
|
3420
3684
|
children: tab.label
|
|
3421
3685
|
},
|
|
3422
3686
|
tab.id
|
|
3423
|
-
)) }) : /* @__PURE__ */ (0,
|
|
3687
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
3424
3688
|
] }),
|
|
3425
|
-
/* @__PURE__ */ (0,
|
|
3689
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { children })
|
|
3426
3690
|
]
|
|
3427
3691
|
}
|
|
3428
3692
|
);
|
|
@@ -3517,6 +3781,14 @@ WindowFrame.displayName = "WindowFrame";
|
|
|
3517
3781
|
List,
|
|
3518
3782
|
ListHeader,
|
|
3519
3783
|
ListItem,
|
|
3784
|
+
NavigationMenu,
|
|
3785
|
+
NavigationMenuContent,
|
|
3786
|
+
NavigationMenuIndicator,
|
|
3787
|
+
NavigationMenuItem,
|
|
3788
|
+
NavigationMenuLink,
|
|
3789
|
+
NavigationMenuList,
|
|
3790
|
+
NavigationMenuTrigger,
|
|
3791
|
+
NavigationMenuViewport,
|
|
3520
3792
|
Select,
|
|
3521
3793
|
Switch,
|
|
3522
3794
|
Table,
|
|
@@ -3544,6 +3816,7 @@ WindowFrame.displayName = "WindowFrame";
|
|
|
3544
3816
|
gridVariants,
|
|
3545
3817
|
isEUCountry,
|
|
3546
3818
|
linkVariants,
|
|
3819
|
+
navigationMenuTriggerStyle,
|
|
3547
3820
|
selectVariants,
|
|
3548
3821
|
switchRootVariants,
|
|
3549
3822
|
switchThumbVariants,
|