@bergetai/ui 0.2.7 → 0.3.2
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 +739 -575
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +172 -74
- package/dist/index.d.ts +172 -74
- package/dist/index.js +702 -538
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +15 -0
- package/package.json +8 -18
- package/LICENSE +0 -21
package/dist/index.js
CHANGED
|
@@ -85,9 +85,10 @@ function useTheme() {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
// src/components/theme-provider/ThemeToggle.tsx
|
|
88
|
-
import * as
|
|
88
|
+
import * as React3 from "react";
|
|
89
89
|
|
|
90
90
|
// src/lib/utils.ts
|
|
91
|
+
import * as React2 from "react";
|
|
91
92
|
import { clsx } from "clsx";
|
|
92
93
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
93
94
|
var twMerge = extendTailwindMerge({
|
|
@@ -108,13 +109,17 @@ var twMerge = extendTailwindMerge({
|
|
|
108
109
|
function cn(...inputs) {
|
|
109
110
|
return twMerge(clsx(inputs));
|
|
110
111
|
}
|
|
112
|
+
function asChildRender(asChild, children) {
|
|
113
|
+
if (!asChild) return void 0;
|
|
114
|
+
return React2.Children.only(children);
|
|
115
|
+
}
|
|
111
116
|
|
|
112
117
|
// src/components/theme-provider/ThemeToggle.tsx
|
|
113
118
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
114
|
-
var ThemeToggle =
|
|
119
|
+
var ThemeToggle = React3.forwardRef(
|
|
115
120
|
({ className, label = "Toggle theme", size = "md", ...props }, ref) => {
|
|
116
121
|
const { theme, resolvedTheme, setTheme } = useTheme();
|
|
117
|
-
const toggle =
|
|
122
|
+
const toggle = React3.useCallback(() => {
|
|
118
123
|
setTheme(theme === "dark" ? "light" : "dark");
|
|
119
124
|
}, [theme, setTheme]);
|
|
120
125
|
return /* @__PURE__ */ jsxs(
|
|
@@ -197,9 +202,9 @@ var ThemeToggle = React2.forwardRef(
|
|
|
197
202
|
ThemeToggle.displayName = "ThemeToggle";
|
|
198
203
|
|
|
199
204
|
// src/primitives/button.tsx
|
|
200
|
-
import * as
|
|
205
|
+
import * as React4 from "react";
|
|
201
206
|
import { cva } from "class-variance-authority";
|
|
202
|
-
import {
|
|
207
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
203
208
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
204
209
|
var buttonVariants = cva(
|
|
205
210
|
"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",
|
|
@@ -230,10 +235,19 @@ var buttonVariants = cva(
|
|
|
230
235
|
}
|
|
231
236
|
}
|
|
232
237
|
);
|
|
233
|
-
var Button =
|
|
234
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
235
|
-
const Comp =
|
|
236
|
-
return /* @__PURE__ */ jsx3(
|
|
238
|
+
var Button = React4.forwardRef(
|
|
239
|
+
({ className, variant, size, asChild = false, children, ...props }, ref) => {
|
|
240
|
+
const Comp = ButtonPrimitive;
|
|
241
|
+
return /* @__PURE__ */ jsx3(
|
|
242
|
+
Comp,
|
|
243
|
+
{
|
|
244
|
+
ref,
|
|
245
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
246
|
+
render: asChild ? children : void 0,
|
|
247
|
+
...props,
|
|
248
|
+
children: asChild ? void 0 : children
|
|
249
|
+
}
|
|
250
|
+
);
|
|
237
251
|
}
|
|
238
252
|
);
|
|
239
253
|
Button.displayName = "Button";
|
|
@@ -293,7 +307,7 @@ function Button2({
|
|
|
293
307
|
}
|
|
294
308
|
|
|
295
309
|
// src/components/typography/Typography.tsx
|
|
296
|
-
import * as
|
|
310
|
+
import * as React5 from "react";
|
|
297
311
|
import { cva as cva2 } from "class-variance-authority";
|
|
298
312
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
299
313
|
var typographyVariants = cva2("", {
|
|
@@ -340,7 +354,7 @@ var defaultElementMap = {
|
|
|
340
354
|
mono: "p",
|
|
341
355
|
code: "span"
|
|
342
356
|
};
|
|
343
|
-
var Typography =
|
|
357
|
+
var Typography = React5.forwardRef(
|
|
344
358
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
345
359
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
346
360
|
return /* @__PURE__ */ jsx5(
|
|
@@ -357,13 +371,13 @@ var Typography = React4.forwardRef(
|
|
|
357
371
|
Typography.displayName = "Typography";
|
|
358
372
|
|
|
359
373
|
// src/components/card/Card.tsx
|
|
360
|
-
import * as
|
|
374
|
+
import * as React7 from "react";
|
|
361
375
|
import { cva as cva3 } from "class-variance-authority";
|
|
362
376
|
|
|
363
377
|
// src/primitives/card.tsx
|
|
364
|
-
import * as
|
|
378
|
+
import * as React6 from "react";
|
|
365
379
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
366
|
-
var Card =
|
|
380
|
+
var Card = React6.forwardRef(
|
|
367
381
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
368
382
|
"div",
|
|
369
383
|
{
|
|
@@ -374,23 +388,23 @@ var Card = React5.forwardRef(
|
|
|
374
388
|
)
|
|
375
389
|
);
|
|
376
390
|
Card.displayName = "Card";
|
|
377
|
-
var CardHeader =
|
|
391
|
+
var CardHeader = React6.forwardRef(
|
|
378
392
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
379
393
|
);
|
|
380
394
|
CardHeader.displayName = "CardHeader";
|
|
381
|
-
var CardTitle =
|
|
395
|
+
var CardTitle = React6.forwardRef(
|
|
382
396
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("h2", { ref, className: cn("text-2xl leading-none tracking-tight", className), ...props })
|
|
383
397
|
);
|
|
384
398
|
CardTitle.displayName = "CardTitle";
|
|
385
|
-
var CardDescription =
|
|
399
|
+
var CardDescription = React6.forwardRef(
|
|
386
400
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
387
401
|
);
|
|
388
402
|
CardDescription.displayName = "CardDescription";
|
|
389
|
-
var CardContent =
|
|
403
|
+
var CardContent = React6.forwardRef(
|
|
390
404
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
391
405
|
);
|
|
392
406
|
CardContent.displayName = "CardContent";
|
|
393
|
-
var CardFooter =
|
|
407
|
+
var CardFooter = React6.forwardRef(
|
|
394
408
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
395
409
|
);
|
|
396
410
|
CardFooter.displayName = "CardFooter";
|
|
@@ -415,7 +429,7 @@ var cardVariants = cva3("rounded-berget-sm", {
|
|
|
415
429
|
padding: "md"
|
|
416
430
|
}
|
|
417
431
|
});
|
|
418
|
-
var Card2 =
|
|
432
|
+
var Card2 = React7.forwardRef(
|
|
419
433
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
420
434
|
return /* @__PURE__ */ jsx7(
|
|
421
435
|
Card,
|
|
@@ -431,7 +445,7 @@ var Card2 = React6.forwardRef(
|
|
|
431
445
|
Card2.displayName = "Card";
|
|
432
446
|
|
|
433
447
|
// src/components/badge/Badge.tsx
|
|
434
|
-
import * as
|
|
448
|
+
import * as React8 from "react";
|
|
435
449
|
import { cva as cva4 } from "class-variance-authority";
|
|
436
450
|
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
437
451
|
var badgeVariants = cva4(
|
|
@@ -466,7 +480,7 @@ var badgeVariants = cva4(
|
|
|
466
480
|
}
|
|
467
481
|
}
|
|
468
482
|
);
|
|
469
|
-
var Badge =
|
|
483
|
+
var Badge = React8.forwardRef(
|
|
470
484
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
471
485
|
return /* @__PURE__ */ jsxs2("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
472
486
|
icon && /* @__PURE__ */ jsx8("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
@@ -477,11 +491,11 @@ var Badge = React7.forwardRef(
|
|
|
477
491
|
Badge.displayName = "Badge";
|
|
478
492
|
|
|
479
493
|
// src/components/alert/Alert.tsx
|
|
480
|
-
import * as
|
|
494
|
+
import * as React10 from "react";
|
|
481
495
|
import { cva as cva6 } from "class-variance-authority";
|
|
482
496
|
|
|
483
497
|
// src/primitives/alert.tsx
|
|
484
|
-
import * as
|
|
498
|
+
import * as React9 from "react";
|
|
485
499
|
import { cva as cva5 } from "class-variance-authority";
|
|
486
500
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
487
501
|
var alertVariants = cva5(
|
|
@@ -498,13 +512,13 @@ var alertVariants = cva5(
|
|
|
498
512
|
}
|
|
499
513
|
}
|
|
500
514
|
);
|
|
501
|
-
var Alert =
|
|
515
|
+
var Alert = React9.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
502
516
|
Alert.displayName = "Alert";
|
|
503
|
-
var AlertTitle =
|
|
517
|
+
var AlertTitle = React9.forwardRef(
|
|
504
518
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx9("h5", { ref, className: cn("mb-1 leading-none tracking-tight", className), ...props })
|
|
505
519
|
);
|
|
506
520
|
AlertTitle.displayName = "AlertTitle";
|
|
507
|
-
var AlertDescription =
|
|
521
|
+
var AlertDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
508
522
|
AlertDescription.displayName = "AlertDescription";
|
|
509
523
|
|
|
510
524
|
// src/components/alert/Alert.tsx
|
|
@@ -523,46 +537,49 @@ var alertVariants2 = cva6("", {
|
|
|
523
537
|
variant: "default"
|
|
524
538
|
}
|
|
525
539
|
});
|
|
526
|
-
var Alert2 =
|
|
540
|
+
var Alert2 = React10.forwardRef(
|
|
527
541
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx10(Alert, { ref, className: cn(alertVariants2({ variant }), className), ...props })
|
|
528
542
|
);
|
|
529
543
|
Alert2.displayName = "Alert";
|
|
530
544
|
|
|
531
545
|
// src/components/dialog/Dialog.tsx
|
|
532
|
-
import * as
|
|
533
|
-
import
|
|
546
|
+
import * as React11 from "react";
|
|
547
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
534
548
|
import { X } from "lucide-react";
|
|
535
549
|
import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
536
550
|
var Dialog = DialogPrimitive.Root;
|
|
537
|
-
var DialogTrigger =
|
|
551
|
+
var DialogTrigger = React11.forwardRef(
|
|
552
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx11(DialogPrimitive.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
553
|
+
);
|
|
554
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
538
555
|
var DialogPortal = DialogPrimitive.Portal;
|
|
539
556
|
var DialogClose = DialogPrimitive.Close;
|
|
540
|
-
var DialogOverlay =
|
|
541
|
-
DialogPrimitive.
|
|
557
|
+
var DialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
558
|
+
DialogPrimitive.Backdrop,
|
|
542
559
|
{
|
|
543
560
|
ref,
|
|
544
561
|
className: cn(
|
|
545
|
-
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg
|
|
562
|
+
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
546
563
|
className
|
|
547
564
|
),
|
|
548
565
|
...props
|
|
549
566
|
}
|
|
550
567
|
));
|
|
551
|
-
DialogOverlay.displayName =
|
|
552
|
-
var DialogContent =
|
|
568
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
569
|
+
var DialogContent = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs3(DialogPortal, { children: [
|
|
553
570
|
/* @__PURE__ */ jsx11(DialogOverlay, {}),
|
|
554
571
|
/* @__PURE__ */ jsxs3(
|
|
555
|
-
DialogPrimitive.
|
|
572
|
+
DialogPrimitive.Popup,
|
|
556
573
|
{
|
|
557
574
|
ref,
|
|
558
575
|
className: cn(
|
|
559
|
-
"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
|
|
576
|
+
"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",
|
|
560
577
|
className
|
|
561
578
|
),
|
|
562
579
|
...props,
|
|
563
580
|
children: [
|
|
564
581
|
children,
|
|
565
|
-
/* @__PURE__ */ jsxs3(DialogPrimitive.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-
|
|
582
|
+
/* @__PURE__ */ jsxs3(DialogPrimitive.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: [
|
|
566
583
|
/* @__PURE__ */ jsx11(X, { className: "size-4" }),
|
|
567
584
|
/* @__PURE__ */ jsx11("span", { className: "sr-only", children: "Close" })
|
|
568
585
|
] })
|
|
@@ -570,7 +587,7 @@ var DialogContent = React10.forwardRef(({ className, children, ...props }, ref)
|
|
|
570
587
|
}
|
|
571
588
|
)
|
|
572
589
|
] }));
|
|
573
|
-
DialogContent.displayName =
|
|
590
|
+
DialogContent.displayName = "DialogContent";
|
|
574
591
|
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx11("div", { className: cn("flex flex-col gap-1.5 text-center sm:text-left", className), ...props });
|
|
575
592
|
DialogHeader.displayName = "DialogHeader";
|
|
576
593
|
var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx11(
|
|
@@ -581,45 +598,64 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx11(
|
|
|
581
598
|
}
|
|
582
599
|
);
|
|
583
600
|
DialogFooter.displayName = "DialogFooter";
|
|
584
|
-
var DialogTitle =
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
601
|
+
var DialogTitle = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
602
|
+
DialogPrimitive.Title,
|
|
603
|
+
{
|
|
604
|
+
ref,
|
|
605
|
+
render: /* @__PURE__ */ jsx11(Typography, { variant: "h5", color: "default", as: "h2", className }),
|
|
606
|
+
...props,
|
|
607
|
+
children
|
|
608
|
+
}
|
|
609
|
+
));
|
|
610
|
+
DialogTitle.displayName = "DialogTitle";
|
|
611
|
+
var DialogDescription = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
612
|
+
DialogPrimitive.Description,
|
|
613
|
+
{
|
|
614
|
+
ref,
|
|
615
|
+
render: /* @__PURE__ */ jsx11(Typography, { variant: "small", color: "muted", className }),
|
|
616
|
+
...props,
|
|
617
|
+
children
|
|
618
|
+
}
|
|
619
|
+
));
|
|
620
|
+
DialogDescription.displayName = "DialogDescription";
|
|
588
621
|
|
|
589
622
|
// src/components/alert-dialog/AlertDialog.tsx
|
|
590
|
-
import * as
|
|
591
|
-
import
|
|
623
|
+
import * as React12 from "react";
|
|
624
|
+
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
592
625
|
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
593
626
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
594
|
-
var AlertDialogTrigger =
|
|
627
|
+
var AlertDialogTrigger = React12.forwardRef(
|
|
628
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx12(AlertDialogPrimitive.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
629
|
+
);
|
|
630
|
+
AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
595
631
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
596
|
-
var AlertDialogOverlay =
|
|
597
|
-
AlertDialogPrimitive.
|
|
632
|
+
var AlertDialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
633
|
+
AlertDialogPrimitive.Backdrop,
|
|
598
634
|
{
|
|
599
635
|
ref,
|
|
600
636
|
className: cn(
|
|
601
|
-
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg
|
|
637
|
+
"fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
602
638
|
className
|
|
603
639
|
),
|
|
604
640
|
...props
|
|
605
641
|
}
|
|
606
642
|
));
|
|
607
|
-
AlertDialogOverlay.displayName =
|
|
608
|
-
var AlertDialogContent =
|
|
643
|
+
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
644
|
+
var AlertDialogContent = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs4(AlertDialogPortal, { children: [
|
|
609
645
|
/* @__PURE__ */ jsx12(AlertDialogOverlay, {}),
|
|
610
646
|
/* @__PURE__ */ jsx12(
|
|
611
|
-
AlertDialogPrimitive.
|
|
647
|
+
AlertDialogPrimitive.Popup,
|
|
612
648
|
{
|
|
613
649
|
ref,
|
|
614
650
|
className: cn(
|
|
615
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg
|
|
651
|
+
"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",
|
|
616
652
|
className
|
|
617
653
|
),
|
|
618
654
|
...props
|
|
619
655
|
}
|
|
620
656
|
)
|
|
621
657
|
] }));
|
|
622
|
-
AlertDialogContent.displayName =
|
|
658
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
623
659
|
var AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx12("div", { className: cn("flex flex-col gap-1.5 text-center sm:text-left", className), ...props });
|
|
624
660
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
625
661
|
var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx12(
|
|
@@ -630,116 +666,181 @@ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx12(
|
|
|
630
666
|
}
|
|
631
667
|
);
|
|
632
668
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
633
|
-
var AlertDialogTitle =
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
669
|
+
var AlertDialogTitle = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
670
|
+
AlertDialogPrimitive.Title,
|
|
671
|
+
{
|
|
672
|
+
ref,
|
|
673
|
+
render: /* @__PURE__ */ jsx12(Typography, { variant: "h5", color: "default", as: "h2", className }),
|
|
674
|
+
...props,
|
|
675
|
+
children
|
|
676
|
+
}
|
|
677
|
+
));
|
|
678
|
+
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
679
|
+
var AlertDialogDescription = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
680
|
+
AlertDialogPrimitive.Description,
|
|
681
|
+
{
|
|
682
|
+
ref,
|
|
683
|
+
render: /* @__PURE__ */ jsx12(Typography, { variant: "small", color: "muted", className }),
|
|
684
|
+
...props,
|
|
685
|
+
children
|
|
686
|
+
}
|
|
687
|
+
));
|
|
688
|
+
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
689
|
+
var AlertDialogAction = React12.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
690
|
+
AlertDialogPrimitive.Close,
|
|
691
|
+
{
|
|
692
|
+
ref,
|
|
693
|
+
className: cn(className),
|
|
694
|
+
render: asChildRender(asChild, children),
|
|
695
|
+
...props,
|
|
696
|
+
children: asChild ? void 0 : children
|
|
697
|
+
}
|
|
698
|
+
));
|
|
699
|
+
AlertDialogAction.displayName = "AlertDialogAction";
|
|
700
|
+
var AlertDialogCancel = React12.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
701
|
+
AlertDialogPrimitive.Close,
|
|
702
|
+
{
|
|
703
|
+
ref,
|
|
704
|
+
className: cn("mt-2 sm:mt-0", className),
|
|
705
|
+
render: asChildRender(asChild, children),
|
|
706
|
+
...props,
|
|
707
|
+
children: asChild ? void 0 : children
|
|
708
|
+
}
|
|
709
|
+
));
|
|
710
|
+
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
641
711
|
|
|
642
712
|
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
643
|
-
import * as
|
|
644
|
-
import
|
|
713
|
+
import * as React13 from "react";
|
|
714
|
+
import { Menu as DropdownMenuPrimitive } from "@base-ui/react/menu";
|
|
645
715
|
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
646
|
-
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
716
|
+
import { Fragment, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
647
717
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
648
|
-
var DropdownMenuTrigger =
|
|
718
|
+
var DropdownMenuTrigger = React13.forwardRef(
|
|
719
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
720
|
+
);
|
|
721
|
+
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
649
722
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
650
723
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
651
|
-
var DropdownMenuSub = DropdownMenuPrimitive.
|
|
724
|
+
var DropdownMenuSub = DropdownMenuPrimitive.SubmenuRoot;
|
|
652
725
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
653
|
-
var DropdownMenuSubTrigger =
|
|
654
|
-
DropdownMenuPrimitive.
|
|
726
|
+
var DropdownMenuSubTrigger = React13.forwardRef(({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
727
|
+
DropdownMenuPrimitive.SubmenuTrigger,
|
|
655
728
|
{
|
|
656
729
|
ref,
|
|
657
730
|
className: cn(
|
|
658
|
-
"flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-
|
|
731
|
+
"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",
|
|
659
732
|
inset && "pl-8",
|
|
660
733
|
className
|
|
661
734
|
),
|
|
735
|
+
render: asChildRender(asChild, children),
|
|
662
736
|
...props,
|
|
663
|
-
children: [
|
|
737
|
+
children: asChild ? void 0 : /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
664
738
|
children,
|
|
665
739
|
/* @__PURE__ */ jsx13(ChevronRight, { className: "ml-auto" })
|
|
666
|
-
]
|
|
740
|
+
] })
|
|
667
741
|
}
|
|
668
742
|
));
|
|
669
|
-
DropdownMenuSubTrigger.displayName =
|
|
670
|
-
var DropdownMenuSubContent =
|
|
671
|
-
DropdownMenuPrimitive.
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
743
|
+
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
744
|
+
var DropdownMenuSubContent = React13.forwardRef(
|
|
745
|
+
({ className, side = "right", align = "start", alignOffset = -3, sideOffset = 0, ...props }, ref) => /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
|
|
746
|
+
DropdownMenuPrimitive.Positioner,
|
|
747
|
+
{
|
|
748
|
+
side,
|
|
749
|
+
align,
|
|
750
|
+
alignOffset,
|
|
751
|
+
sideOffset,
|
|
752
|
+
className: "isolate z-50 outline-none",
|
|
753
|
+
children: /* @__PURE__ */ jsx13(
|
|
754
|
+
DropdownMenuPrimitive.Popup,
|
|
755
|
+
{
|
|
756
|
+
ref,
|
|
757
|
+
className: cn(
|
|
758
|
+
"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]",
|
|
759
|
+
className
|
|
760
|
+
),
|
|
761
|
+
...props
|
|
762
|
+
}
|
|
763
|
+
)
|
|
764
|
+
}
|
|
765
|
+
) })
|
|
766
|
+
);
|
|
767
|
+
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
768
|
+
var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, align = "center", side, alignOffset, ...props }, ref) => /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
|
|
769
|
+
DropdownMenuPrimitive.Positioner,
|
|
684
770
|
{
|
|
685
|
-
|
|
771
|
+
side,
|
|
772
|
+
align,
|
|
773
|
+
alignOffset,
|
|
686
774
|
sideOffset,
|
|
687
|
-
className:
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
775
|
+
className: "isolate z-50 outline-none",
|
|
776
|
+
children: /* @__PURE__ */ jsx13(
|
|
777
|
+
DropdownMenuPrimitive.Popup,
|
|
778
|
+
{
|
|
779
|
+
ref,
|
|
780
|
+
className: cn(
|
|
781
|
+
"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]",
|
|
782
|
+
className
|
|
783
|
+
),
|
|
784
|
+
...props
|
|
785
|
+
}
|
|
786
|
+
)
|
|
692
787
|
}
|
|
693
788
|
) }));
|
|
694
|
-
DropdownMenuContent.displayName =
|
|
695
|
-
var DropdownMenuItem =
|
|
789
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
790
|
+
var DropdownMenuItem = React13.forwardRef(({ className, inset, asChild, children, textValue, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
696
791
|
DropdownMenuPrimitive.Item,
|
|
697
792
|
{
|
|
698
793
|
ref,
|
|
794
|
+
label: textValue,
|
|
699
795
|
className: cn(
|
|
700
|
-
"relative flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-
|
|
796
|
+
"relative flex cursor-default select-none items-center gap-2 rounded-berget-xs px-2 py-1.5 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
701
797
|
inset && "pl-8",
|
|
702
798
|
className
|
|
703
799
|
),
|
|
704
|
-
|
|
800
|
+
render: asChildRender(asChild, children),
|
|
801
|
+
...props,
|
|
802
|
+
children: asChild ? void 0 : children
|
|
705
803
|
}
|
|
706
804
|
));
|
|
707
|
-
DropdownMenuItem.displayName =
|
|
708
|
-
var DropdownMenuCheckboxItem =
|
|
805
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
806
|
+
var DropdownMenuCheckboxItem = React13.forwardRef(({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
709
807
|
DropdownMenuPrimitive.CheckboxItem,
|
|
710
808
|
{
|
|
711
809
|
ref,
|
|
810
|
+
label: textValue,
|
|
712
811
|
className: cn(
|
|
713
|
-
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-
|
|
812
|
+
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
714
813
|
className
|
|
715
814
|
),
|
|
716
|
-
|
|
815
|
+
render: asChildRender(asChild, children),
|
|
717
816
|
...props,
|
|
718
817
|
children: [
|
|
719
|
-
/* @__PURE__ */ jsx13("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(DropdownMenuPrimitive.
|
|
720
|
-
children
|
|
818
|
+
/* @__PURE__ */ jsx13("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(DropdownMenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx13(Check, { className: "size-4" }) }) }),
|
|
819
|
+
asChild ? void 0 : children
|
|
721
820
|
]
|
|
722
821
|
}
|
|
723
822
|
));
|
|
724
|
-
DropdownMenuCheckboxItem.displayName =
|
|
725
|
-
var DropdownMenuRadioItem =
|
|
823
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
824
|
+
var DropdownMenuRadioItem = React13.forwardRef(({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
726
825
|
DropdownMenuPrimitive.RadioItem,
|
|
727
826
|
{
|
|
728
827
|
ref,
|
|
828
|
+
label: textValue,
|
|
729
829
|
className: cn(
|
|
730
|
-
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-
|
|
830
|
+
"relative flex cursor-default select-none items-center rounded-berget-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-berget-surface-hover data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
731
831
|
className
|
|
732
832
|
),
|
|
833
|
+
render: asChildRender(asChild, children),
|
|
733
834
|
...props,
|
|
734
835
|
children: [
|
|
735
|
-
/* @__PURE__ */ jsx13("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(DropdownMenuPrimitive.
|
|
736
|
-
children
|
|
836
|
+
/* @__PURE__ */ jsx13("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx13(DropdownMenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx13(Circle, { className: "size-2 fill-current" }) }) }),
|
|
837
|
+
asChild ? void 0 : children
|
|
737
838
|
]
|
|
738
839
|
}
|
|
739
840
|
));
|
|
740
|
-
DropdownMenuRadioItem.displayName =
|
|
741
|
-
var DropdownMenuLabel =
|
|
742
|
-
DropdownMenuPrimitive.
|
|
841
|
+
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
842
|
+
var DropdownMenuLabel = React13.forwardRef(({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
843
|
+
DropdownMenuPrimitive.GroupLabel,
|
|
743
844
|
{
|
|
744
845
|
ref,
|
|
745
846
|
className: cn(
|
|
@@ -747,11 +848,13 @@ var DropdownMenuLabel = React12.forwardRef(({ className, inset, ...props }, ref)
|
|
|
747
848
|
inset && "pl-8",
|
|
748
849
|
className
|
|
749
850
|
),
|
|
750
|
-
|
|
851
|
+
render: asChildRender(asChild, children),
|
|
852
|
+
...props,
|
|
853
|
+
children: asChild ? void 0 : children
|
|
751
854
|
}
|
|
752
855
|
));
|
|
753
|
-
DropdownMenuLabel.displayName =
|
|
754
|
-
var DropdownMenuSeparator =
|
|
856
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
857
|
+
var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
755
858
|
DropdownMenuPrimitive.Separator,
|
|
756
859
|
{
|
|
757
860
|
ref,
|
|
@@ -759,7 +862,7 @@ var DropdownMenuSeparator = React12.forwardRef(({ className, ...props }, ref) =>
|
|
|
759
862
|
...props
|
|
760
863
|
}
|
|
761
864
|
));
|
|
762
|
-
DropdownMenuSeparator.displayName =
|
|
865
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
763
866
|
var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
764
867
|
return /* @__PURE__ */ jsx13(
|
|
765
868
|
"span",
|
|
@@ -772,12 +875,12 @@ var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
|
772
875
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
773
876
|
|
|
774
877
|
// src/components/navigation-menu/NavigationMenu.tsx
|
|
775
|
-
import * as
|
|
776
|
-
import
|
|
878
|
+
import * as React14 from "react";
|
|
879
|
+
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
|
|
777
880
|
import { cva as cva7 } from "class-variance-authority";
|
|
778
881
|
import { ChevronDown } from "lucide-react";
|
|
779
|
-
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
780
|
-
var NavigationMenu =
|
|
882
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
883
|
+
var NavigationMenu = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
781
884
|
NavigationMenuPrimitive.Root,
|
|
782
885
|
{
|
|
783
886
|
ref,
|
|
@@ -789,8 +892,8 @@ var NavigationMenu = React13.forwardRef(({ className, children, ...props }, ref)
|
|
|
789
892
|
]
|
|
790
893
|
}
|
|
791
894
|
));
|
|
792
|
-
NavigationMenu.displayName =
|
|
793
|
-
var NavigationMenuList =
|
|
895
|
+
NavigationMenu.displayName = "NavigationMenu";
|
|
896
|
+
var NavigationMenuList = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
794
897
|
NavigationMenuPrimitive.List,
|
|
795
898
|
{
|
|
796
899
|
ref,
|
|
@@ -798,85 +901,101 @@ var NavigationMenuList = React13.forwardRef(({ className, ...props }, ref) => /*
|
|
|
798
901
|
...props
|
|
799
902
|
}
|
|
800
903
|
));
|
|
801
|
-
NavigationMenuList.displayName =
|
|
904
|
+
NavigationMenuList.displayName = "NavigationMenuList";
|
|
802
905
|
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
803
906
|
var navigationMenuTriggerStyle = cva7(
|
|
804
|
-
"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-
|
|
907
|
+
"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"
|
|
805
908
|
);
|
|
806
|
-
var NavigationMenuTrigger =
|
|
909
|
+
var NavigationMenuTrigger = React14.forwardRef(({ className, children, asChild, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
807
910
|
NavigationMenuPrimitive.Trigger,
|
|
808
911
|
{
|
|
809
912
|
ref,
|
|
810
913
|
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
914
|
+
render: asChildRender(asChild, children),
|
|
811
915
|
...props,
|
|
812
|
-
children: [
|
|
916
|
+
children: asChild ? void 0 : /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
813
917
|
children,
|
|
814
918
|
" ",
|
|
815
919
|
/* @__PURE__ */ jsx14(
|
|
816
920
|
ChevronDown,
|
|
817
921
|
{
|
|
818
|
-
className: "relative top-[1px] ml-1 size-3 transition duration-200 group-data-[
|
|
922
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-200 group-data-[data-popup-open]:rotate-180",
|
|
819
923
|
"aria-hidden": "true"
|
|
820
924
|
}
|
|
821
925
|
)
|
|
822
|
-
]
|
|
926
|
+
] })
|
|
823
927
|
}
|
|
824
928
|
));
|
|
825
|
-
NavigationMenuTrigger.displayName =
|
|
826
|
-
var NavigationMenuContent =
|
|
929
|
+
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
930
|
+
var NavigationMenuContent = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
827
931
|
NavigationMenuPrimitive.Content,
|
|
828
932
|
{
|
|
829
933
|
ref,
|
|
830
934
|
className: cn(
|
|
831
|
-
"left-0 top-0 w-full data-[
|
|
935
|
+
"left-0 top-0 w-full data-[activation-direction=left]:fade-in data-[activation-direction=right]:fade-out md:absolute md:w-auto",
|
|
832
936
|
className
|
|
833
937
|
),
|
|
834
938
|
...props
|
|
835
939
|
}
|
|
836
940
|
));
|
|
837
|
-
NavigationMenuContent.displayName =
|
|
838
|
-
var NavigationMenuLink =
|
|
839
|
-
|
|
840
|
-
NavigationMenuPrimitive.Viewport,
|
|
941
|
+
NavigationMenuContent.displayName = "NavigationMenuContent";
|
|
942
|
+
var NavigationMenuLink = React14.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
943
|
+
NavigationMenuPrimitive.Link,
|
|
841
944
|
{
|
|
945
|
+
ref,
|
|
946
|
+
className,
|
|
947
|
+
render: asChildRender(asChild, children),
|
|
948
|
+
...props,
|
|
949
|
+
children: asChild ? void 0 : children
|
|
950
|
+
}
|
|
951
|
+
));
|
|
952
|
+
NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
953
|
+
var NavigationMenuViewport = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(NavigationMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx14(NavigationMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", children: /* @__PURE__ */ jsx14(
|
|
954
|
+
NavigationMenuPrimitive.Popup,
|
|
955
|
+
{
|
|
956
|
+
ref,
|
|
842
957
|
className: cn(
|
|
843
|
-
"origin-top-center relative mt-1.5 h-[var(--
|
|
958
|
+
"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)]",
|
|
844
959
|
className
|
|
845
960
|
),
|
|
846
|
-
|
|
847
|
-
|
|
961
|
+
...props,
|
|
962
|
+
children: /* @__PURE__ */ jsx14(NavigationMenuPrimitive.Viewport, {})
|
|
848
963
|
}
|
|
849
|
-
) }));
|
|
850
|
-
NavigationMenuViewport.displayName =
|
|
851
|
-
var NavigationMenuIndicator =
|
|
852
|
-
NavigationMenuPrimitive.
|
|
964
|
+
) }) }));
|
|
965
|
+
NavigationMenuViewport.displayName = "NavigationMenuViewport";
|
|
966
|
+
var NavigationMenuIndicator = React14.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
967
|
+
NavigationMenuPrimitive.Icon,
|
|
853
968
|
{
|
|
854
969
|
ref,
|
|
855
970
|
className: cn(
|
|
856
|
-
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden
|
|
971
|
+
"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",
|
|
857
972
|
className
|
|
858
973
|
),
|
|
974
|
+
render: asChildRender(asChild, children),
|
|
859
975
|
...props,
|
|
860
|
-
children:
|
|
976
|
+
children: [
|
|
977
|
+
asChild ? void 0 : children,
|
|
978
|
+
/* @__PURE__ */ jsx14("div", { className: "relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-berget-border shadow-md" })
|
|
979
|
+
]
|
|
861
980
|
}
|
|
862
981
|
));
|
|
863
|
-
NavigationMenuIndicator.displayName =
|
|
982
|
+
NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
|
|
864
983
|
|
|
865
984
|
// src/components/table/Table.tsx
|
|
866
|
-
import * as
|
|
985
|
+
import * as React16 from "react";
|
|
867
986
|
|
|
868
987
|
// src/primitives/table.tsx
|
|
869
|
-
import * as
|
|
988
|
+
import * as React15 from "react";
|
|
870
989
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
871
|
-
var Table =
|
|
990
|
+
var Table = React15.forwardRef(
|
|
872
991
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx15("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx15("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
|
|
873
992
|
);
|
|
874
993
|
Table.displayName = "Table";
|
|
875
|
-
var TableHeader =
|
|
994
|
+
var TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
876
995
|
TableHeader.displayName = "TableHeader";
|
|
877
|
-
var TableBody =
|
|
996
|
+
var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
|
|
878
997
|
TableBody.displayName = "TableBody";
|
|
879
|
-
var TableFooter =
|
|
998
|
+
var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
880
999
|
"tfoot",
|
|
881
1000
|
{
|
|
882
1001
|
ref,
|
|
@@ -885,7 +1004,7 @@ var TableFooter = React14.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
885
1004
|
}
|
|
886
1005
|
));
|
|
887
1006
|
TableFooter.displayName = "TableFooter";
|
|
888
|
-
var TableRow =
|
|
1007
|
+
var TableRow = React15.forwardRef(
|
|
889
1008
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
890
1009
|
"tr",
|
|
891
1010
|
{
|
|
@@ -899,7 +1018,7 @@ var TableRow = React14.forwardRef(
|
|
|
899
1018
|
)
|
|
900
1019
|
);
|
|
901
1020
|
TableRow.displayName = "TableRow";
|
|
902
|
-
var TableHead =
|
|
1021
|
+
var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
903
1022
|
"th",
|
|
904
1023
|
{
|
|
905
1024
|
ref,
|
|
@@ -911,7 +1030,7 @@ var TableHead = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
911
1030
|
}
|
|
912
1031
|
));
|
|
913
1032
|
TableHead.displayName = "TableHead";
|
|
914
|
-
var TableCell =
|
|
1033
|
+
var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
915
1034
|
"td",
|
|
916
1035
|
{
|
|
917
1036
|
ref,
|
|
@@ -920,16 +1039,16 @@ var TableCell = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
920
1039
|
}
|
|
921
1040
|
));
|
|
922
1041
|
TableCell.displayName = "TableCell";
|
|
923
|
-
var TableCaption =
|
|
1042
|
+
var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
|
|
924
1043
|
TableCaption.displayName = "TableCaption";
|
|
925
1044
|
|
|
926
1045
|
// src/components/table/Table.tsx
|
|
927
1046
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
928
|
-
var Table2 =
|
|
1047
|
+
var Table2 = React16.forwardRef(
|
|
929
1048
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx16(Table, { ref, className, ...props })
|
|
930
1049
|
);
|
|
931
1050
|
Table2.displayName = "Table";
|
|
932
|
-
var TableHeader2 =
|
|
1051
|
+
var TableHeader2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
933
1052
|
TableHeader,
|
|
934
1053
|
{
|
|
935
1054
|
ref,
|
|
@@ -938,7 +1057,7 @@ var TableHeader2 = React15.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
938
1057
|
}
|
|
939
1058
|
));
|
|
940
1059
|
TableHeader2.displayName = "TableHeader";
|
|
941
|
-
var TableBody2 =
|
|
1060
|
+
var TableBody2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
942
1061
|
TableBody,
|
|
943
1062
|
{
|
|
944
1063
|
ref,
|
|
@@ -947,7 +1066,7 @@ var TableBody2 = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
947
1066
|
}
|
|
948
1067
|
));
|
|
949
1068
|
TableBody2.displayName = "TableBody";
|
|
950
|
-
var TableFooter2 =
|
|
1069
|
+
var TableFooter2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
951
1070
|
TableFooter,
|
|
952
1071
|
{
|
|
953
1072
|
ref,
|
|
@@ -959,7 +1078,7 @@ var TableFooter2 = React15.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
959
1078
|
}
|
|
960
1079
|
));
|
|
961
1080
|
TableFooter2.displayName = "TableFooter";
|
|
962
|
-
var TableRow2 =
|
|
1081
|
+
var TableRow2 = React16.forwardRef(
|
|
963
1082
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
964
1083
|
TableRow,
|
|
965
1084
|
{
|
|
@@ -973,7 +1092,7 @@ var TableRow2 = React15.forwardRef(
|
|
|
973
1092
|
)
|
|
974
1093
|
);
|
|
975
1094
|
TableRow2.displayName = "TableRow";
|
|
976
|
-
var TableHead2 =
|
|
1095
|
+
var TableHead2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
977
1096
|
TableHead,
|
|
978
1097
|
{
|
|
979
1098
|
ref,
|
|
@@ -985,7 +1104,7 @@ var TableHead2 = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
985
1104
|
}
|
|
986
1105
|
));
|
|
987
1106
|
TableHead2.displayName = "TableHead";
|
|
988
|
-
var TableCell2 =
|
|
1107
|
+
var TableCell2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
989
1108
|
TableCell,
|
|
990
1109
|
{
|
|
991
1110
|
ref,
|
|
@@ -994,7 +1113,7 @@ var TableCell2 = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
994
1113
|
}
|
|
995
1114
|
));
|
|
996
1115
|
TableCell2.displayName = "TableCell";
|
|
997
|
-
var TableCaption2 =
|
|
1116
|
+
var TableCaption2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
998
1117
|
TableCaption,
|
|
999
1118
|
{
|
|
1000
1119
|
ref,
|
|
@@ -1005,21 +1124,21 @@ var TableCaption2 = React15.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1005
1124
|
TableCaption2.displayName = "TableCaption";
|
|
1006
1125
|
|
|
1007
1126
|
// src/components/item/Item.tsx
|
|
1008
|
-
import * as
|
|
1127
|
+
import * as React18 from "react";
|
|
1009
1128
|
|
|
1010
1129
|
// src/primitives/item.tsx
|
|
1011
|
-
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
1012
1130
|
import { cva as cva8 } from "class-variance-authority";
|
|
1131
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
1132
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
1013
1133
|
|
|
1014
1134
|
// src/primitives/separator.tsx
|
|
1015
|
-
import * as
|
|
1016
|
-
import
|
|
1135
|
+
import * as React17 from "react";
|
|
1136
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
1017
1137
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1018
|
-
var
|
|
1019
|
-
SeparatorPrimitive
|
|
1138
|
+
var Separator = React17.forwardRef(({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1139
|
+
SeparatorPrimitive,
|
|
1020
1140
|
{
|
|
1021
1141
|
ref,
|
|
1022
|
-
decorative,
|
|
1023
1142
|
orientation,
|
|
1024
1143
|
className: cn(
|
|
1025
1144
|
"shrink-0 bg-border",
|
|
@@ -1029,7 +1148,7 @@ var Separator2 = React16.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1029
1148
|
...props
|
|
1030
1149
|
}
|
|
1031
1150
|
));
|
|
1032
|
-
|
|
1151
|
+
Separator.displayName = "Separator";
|
|
1033
1152
|
|
|
1034
1153
|
// src/primitives/item.tsx
|
|
1035
1154
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
@@ -1046,7 +1165,7 @@ function ItemGroup({ className, ...props }) {
|
|
|
1046
1165
|
}
|
|
1047
1166
|
function ItemSeparator({ className, ...props }) {
|
|
1048
1167
|
return /* @__PURE__ */ jsx18(
|
|
1049
|
-
|
|
1168
|
+
Separator,
|
|
1050
1169
|
{
|
|
1051
1170
|
"data-slot": "item-separator",
|
|
1052
1171
|
orientation: "horizontal",
|
|
@@ -1075,24 +1194,26 @@ var itemVariants = cva8(
|
|
|
1075
1194
|
}
|
|
1076
1195
|
}
|
|
1077
1196
|
);
|
|
1078
|
-
function
|
|
1197
|
+
function Item({
|
|
1079
1198
|
className,
|
|
1080
1199
|
variant = "default",
|
|
1081
1200
|
size = "default",
|
|
1082
|
-
|
|
1201
|
+
render,
|
|
1083
1202
|
...props
|
|
1084
1203
|
}) {
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1204
|
+
return useRender({
|
|
1205
|
+
defaultTagName: "div",
|
|
1206
|
+
render,
|
|
1207
|
+
props: mergeProps(
|
|
1208
|
+
{
|
|
1209
|
+
"data-slot": "item",
|
|
1210
|
+
"data-variant": variant,
|
|
1211
|
+
"data-size": size,
|
|
1212
|
+
className: cn(itemVariants({ variant, size, className }))
|
|
1213
|
+
},
|
|
1214
|
+
props
|
|
1215
|
+
)
|
|
1216
|
+
});
|
|
1096
1217
|
}
|
|
1097
1218
|
var itemMediaVariants = cva8(
|
|
1098
1219
|
"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",
|
|
@@ -1184,11 +1305,11 @@ function ItemFooter({ className, ...props }) {
|
|
|
1184
1305
|
|
|
1185
1306
|
// src/components/item/Item.tsx
|
|
1186
1307
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1187
|
-
function
|
|
1308
|
+
function Item2({ className, asChild, children, ...props }) {
|
|
1188
1309
|
return /* @__PURE__ */ jsx19(
|
|
1189
|
-
|
|
1310
|
+
Item,
|
|
1190
1311
|
{
|
|
1191
|
-
asChild,
|
|
1312
|
+
render: asChild ? children : void 0,
|
|
1192
1313
|
className: cn(
|
|
1193
1314
|
/* Variant colours — override primitive defaults */
|
|
1194
1315
|
"data-[variant=outline]:border-berget-item-outline-border",
|
|
@@ -1199,11 +1320,12 @@ function Item4({ className, asChild, ...props }) {
|
|
|
1199
1320
|
"focus-visible:border-berget-item-focus-ring focus-visible:ring-berget-item-focus-ring/50",
|
|
1200
1321
|
className
|
|
1201
1322
|
),
|
|
1202
|
-
...props
|
|
1323
|
+
...props,
|
|
1324
|
+
children: asChild ? void 0 : children
|
|
1203
1325
|
}
|
|
1204
1326
|
);
|
|
1205
1327
|
}
|
|
1206
|
-
var ItemMedia2 =
|
|
1328
|
+
var ItemMedia2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
1207
1329
|
return /* @__PURE__ */ jsx19(
|
|
1208
1330
|
ItemMedia,
|
|
1209
1331
|
{
|
|
@@ -1214,7 +1336,7 @@ var ItemMedia2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
1214
1336
|
);
|
|
1215
1337
|
});
|
|
1216
1338
|
ItemMedia2.displayName = "ItemMedia";
|
|
1217
|
-
var ItemTitle2 =
|
|
1339
|
+
var ItemTitle2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
1218
1340
|
return /* @__PURE__ */ jsx19(
|
|
1219
1341
|
ItemTitle,
|
|
1220
1342
|
{
|
|
@@ -1225,7 +1347,7 @@ var ItemTitle2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
1225
1347
|
);
|
|
1226
1348
|
});
|
|
1227
1349
|
ItemTitle2.displayName = "ItemTitle";
|
|
1228
|
-
var ItemDescription2 =
|
|
1350
|
+
var ItemDescription2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
1229
1351
|
return /* @__PURE__ */ jsx19(
|
|
1230
1352
|
ItemDescription,
|
|
1231
1353
|
{
|
|
@@ -1236,7 +1358,7 @@ var ItemDescription2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
1236
1358
|
);
|
|
1237
1359
|
});
|
|
1238
1360
|
ItemDescription2.displayName = "ItemDescription";
|
|
1239
|
-
var ItemSeparator2 =
|
|
1361
|
+
var ItemSeparator2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
1240
1362
|
return /* @__PURE__ */ jsx19(
|
|
1241
1363
|
ItemSeparator,
|
|
1242
1364
|
{
|
|
@@ -1249,12 +1371,12 @@ var ItemSeparator2 = React17.forwardRef(({ className, ...props }, ref) => {
|
|
|
1249
1371
|
ItemSeparator2.displayName = "ItemSeparator";
|
|
1250
1372
|
|
|
1251
1373
|
// src/components/input/Input.tsx
|
|
1252
|
-
import * as
|
|
1374
|
+
import * as React20 from "react";
|
|
1253
1375
|
|
|
1254
1376
|
// src/primitives/input.tsx
|
|
1255
|
-
import * as
|
|
1377
|
+
import * as React19 from "react";
|
|
1256
1378
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1257
|
-
var Input =
|
|
1379
|
+
var Input = React19.forwardRef(
|
|
1258
1380
|
({ className, type, ...props }, ref) => {
|
|
1259
1381
|
return /* @__PURE__ */ jsx20(
|
|
1260
1382
|
"input",
|
|
@@ -1274,9 +1396,9 @@ Input.displayName = "Input";
|
|
|
1274
1396
|
|
|
1275
1397
|
// src/components/input/Input.tsx
|
|
1276
1398
|
import { jsx as jsx21, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1277
|
-
var Input2 =
|
|
1399
|
+
var Input2 = React20.forwardRef(
|
|
1278
1400
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
1279
|
-
const generatedId =
|
|
1401
|
+
const generatedId = React20.useId();
|
|
1280
1402
|
const inputId = id || generatedId;
|
|
1281
1403
|
const errorId = `${inputId}-error`;
|
|
1282
1404
|
const descriptionId = `${inputId}-description`;
|
|
@@ -1356,30 +1478,30 @@ var Input2 = React19.forwardRef(
|
|
|
1356
1478
|
Input2.displayName = "Input";
|
|
1357
1479
|
|
|
1358
1480
|
// src/components/checkbox/Checkbox.tsx
|
|
1359
|
-
import * as
|
|
1360
|
-
import
|
|
1481
|
+
import * as React22 from "react";
|
|
1482
|
+
import { Checkbox as CheckboxPrimitive2 } from "@base-ui/react/checkbox";
|
|
1361
1483
|
import { Check as Check3 } from "lucide-react";
|
|
1362
1484
|
import { cva as cva9 } from "class-variance-authority";
|
|
1363
1485
|
|
|
1364
1486
|
// src/primitives/checkbox.tsx
|
|
1365
|
-
import * as
|
|
1366
|
-
import
|
|
1487
|
+
import * as React21 from "react";
|
|
1488
|
+
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
1367
1489
|
import { Check as Check2 } from "lucide-react";
|
|
1368
1490
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1369
|
-
var Checkbox =
|
|
1491
|
+
var Checkbox = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1370
1492
|
CheckboxPrimitive.Root,
|
|
1371
1493
|
{
|
|
1372
1494
|
ref,
|
|
1373
1495
|
className: cn(
|
|
1374
|
-
"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",
|
|
1496
|
+
"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",
|
|
1375
1497
|
className
|
|
1376
1498
|
),
|
|
1377
1499
|
...props,
|
|
1378
1500
|
children: children ?? /* @__PURE__ */ jsx22(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center"), children: /* @__PURE__ */ jsx22(Check2, { className: "h-4 w-4" }) })
|
|
1379
1501
|
}
|
|
1380
1502
|
));
|
|
1381
|
-
Checkbox.displayName =
|
|
1382
|
-
var CheckboxIndicator =
|
|
1503
|
+
Checkbox.displayName = "Checkbox";
|
|
1504
|
+
var CheckboxIndicator = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx22(
|
|
1383
1505
|
CheckboxPrimitive.Indicator,
|
|
1384
1506
|
{
|
|
1385
1507
|
ref,
|
|
@@ -1388,7 +1510,7 @@ var CheckboxIndicator = React20.forwardRef(({ className, children, ...props }, r
|
|
|
1388
1510
|
children: children ?? /* @__PURE__ */ jsx22(Check2, { className: "h-4 w-4" })
|
|
1389
1511
|
}
|
|
1390
1512
|
));
|
|
1391
|
-
CheckboxIndicator.displayName =
|
|
1513
|
+
CheckboxIndicator.displayName = "CheckboxIndicator";
|
|
1392
1514
|
|
|
1393
1515
|
// src/components/checkbox/Checkbox.tsx
|
|
1394
1516
|
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
@@ -1413,7 +1535,7 @@ var checkboxVariants = cva9(
|
|
|
1413
1535
|
}
|
|
1414
1536
|
}
|
|
1415
1537
|
);
|
|
1416
|
-
var Checkbox2 =
|
|
1538
|
+
var Checkbox2 = React22.forwardRef(
|
|
1417
1539
|
({
|
|
1418
1540
|
"aria-label": ariaLabel,
|
|
1419
1541
|
className,
|
|
@@ -1426,7 +1548,7 @@ var Checkbox2 = React21.forwardRef(
|
|
|
1426
1548
|
disabled,
|
|
1427
1549
|
...props
|
|
1428
1550
|
}, ref) => {
|
|
1429
|
-
const generatedId =
|
|
1551
|
+
const generatedId = React22.useId();
|
|
1430
1552
|
const checkboxId = id || generatedId;
|
|
1431
1553
|
const errorId = `${checkboxId}-error`;
|
|
1432
1554
|
return /* @__PURE__ */ jsxs8("div", { className: "flex items-start gap-3", children: [
|
|
@@ -1436,6 +1558,7 @@ var Checkbox2 = React21.forwardRef(
|
|
|
1436
1558
|
ref,
|
|
1437
1559
|
id: checkboxId,
|
|
1438
1560
|
disabled,
|
|
1561
|
+
nativeButton: true,
|
|
1439
1562
|
"aria-invalid": !!error,
|
|
1440
1563
|
"aria-describedby": error ? errorId : void 0,
|
|
1441
1564
|
"aria-label": ariaLabel || label || void 0,
|
|
@@ -1477,8 +1600,8 @@ var Checkbox2 = React21.forwardRef(
|
|
|
1477
1600
|
Checkbox2.displayName = "Checkbox";
|
|
1478
1601
|
|
|
1479
1602
|
// src/components/switch/Switch.tsx
|
|
1480
|
-
import * as
|
|
1481
|
-
import
|
|
1603
|
+
import * as React23 from "react";
|
|
1604
|
+
import { Switch as SwitchPrimitives } from "@base-ui/react/switch";
|
|
1482
1605
|
import { cva as cva10 } from "class-variance-authority";
|
|
1483
1606
|
import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1484
1607
|
var switchRootVariants = cva10(
|
|
@@ -1486,9 +1609,9 @@ var switchRootVariants = cva10(
|
|
|
1486
1609
|
{
|
|
1487
1610
|
variants: {
|
|
1488
1611
|
variant: {
|
|
1489
|
-
default: "data-
|
|
1490
|
-
primary: "data-
|
|
1491
|
-
subtle: "data-
|
|
1612
|
+
default: "data-unchecked:bg-berget-border data-checked:bg-berget-secondary",
|
|
1613
|
+
primary: "data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-primary-checked",
|
|
1614
|
+
subtle: "data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-subtle-checked"
|
|
1492
1615
|
},
|
|
1493
1616
|
size: {
|
|
1494
1617
|
sm: "h-5 w-9",
|
|
@@ -1507,9 +1630,9 @@ var switchThumbVariants = cva10(
|
|
|
1507
1630
|
{
|
|
1508
1631
|
variants: {
|
|
1509
1632
|
size: {
|
|
1510
|
-
sm: "h-4 w-4 data-
|
|
1511
|
-
default: "h-5 w-5 data-
|
|
1512
|
-
lg: "h-6 w-6 data-
|
|
1633
|
+
sm: "h-4 w-4 data-checked:translate-x-4 data-unchecked:translate-x-0",
|
|
1634
|
+
default: "h-5 w-5 data-checked:translate-x-5 data-unchecked:translate-x-0",
|
|
1635
|
+
lg: "h-6 w-6 data-checked:translate-x-6 data-unchecked:translate-x-0"
|
|
1513
1636
|
}
|
|
1514
1637
|
},
|
|
1515
1638
|
defaultVariants: {
|
|
@@ -1517,7 +1640,7 @@ var switchThumbVariants = cva10(
|
|
|
1517
1640
|
}
|
|
1518
1641
|
}
|
|
1519
1642
|
);
|
|
1520
|
-
var Switch =
|
|
1643
|
+
var Switch = React23.forwardRef(
|
|
1521
1644
|
({
|
|
1522
1645
|
"aria-label": ariaLabel,
|
|
1523
1646
|
className,
|
|
@@ -1530,7 +1653,7 @@ var Switch = React22.forwardRef(
|
|
|
1530
1653
|
disabled,
|
|
1531
1654
|
...props
|
|
1532
1655
|
}, ref) => {
|
|
1533
|
-
const generatedId =
|
|
1656
|
+
const generatedId = React23.useId();
|
|
1534
1657
|
const switchId = id || generatedId;
|
|
1535
1658
|
const errorId = `${switchId}-error`;
|
|
1536
1659
|
return /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-3", children: [
|
|
@@ -1540,6 +1663,7 @@ var Switch = React22.forwardRef(
|
|
|
1540
1663
|
ref,
|
|
1541
1664
|
id: switchId,
|
|
1542
1665
|
disabled,
|
|
1666
|
+
nativeButton: true,
|
|
1543
1667
|
"aria-invalid": !!error,
|
|
1544
1668
|
"aria-describedby": error ? errorId : void 0,
|
|
1545
1669
|
"aria-label": ariaLabel || label || void 0,
|
|
@@ -1573,17 +1697,18 @@ var Switch = React22.forwardRef(
|
|
|
1573
1697
|
Switch.displayName = "Switch";
|
|
1574
1698
|
|
|
1575
1699
|
// src/components/select/Select.tsx
|
|
1576
|
-
import * as
|
|
1700
|
+
import * as React25 from "react";
|
|
1577
1701
|
import { cva as cva11 } from "class-variance-authority";
|
|
1578
1702
|
|
|
1579
1703
|
// src/primitives/select.tsx
|
|
1580
|
-
import * as
|
|
1581
|
-
import
|
|
1704
|
+
import * as React24 from "react";
|
|
1705
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
1582
1706
|
import { Check as Check4, ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
1583
|
-
import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1707
|
+
import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1584
1708
|
var Select = SelectPrimitive.Root;
|
|
1709
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
1585
1710
|
var SelectValue = SelectPrimitive.Value;
|
|
1586
|
-
var SelectTrigger =
|
|
1711
|
+
var SelectTrigger = React24.forwardRef(({ className, children, asChild, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1587
1712
|
SelectPrimitive.Trigger,
|
|
1588
1713
|
{
|
|
1589
1714
|
ref,
|
|
@@ -1591,16 +1716,17 @@ var SelectTrigger = React23.forwardRef(({ className, children, ...props }, ref)
|
|
|
1591
1716
|
"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",
|
|
1592
1717
|
className
|
|
1593
1718
|
),
|
|
1719
|
+
render: asChildRender(asChild, children),
|
|
1594
1720
|
...props,
|
|
1595
1721
|
children: [
|
|
1596
|
-
children,
|
|
1597
|
-
/* @__PURE__ */ jsx25(SelectPrimitive.Icon, {
|
|
1722
|
+
asChild ? void 0 : children,
|
|
1723
|
+
asChild ? null : /* @__PURE__ */ jsx25(SelectPrimitive.Icon, { render: /* @__PURE__ */ jsx25(ChevronDown2, { className: "h-4 w-4 opacity-50" }) })
|
|
1598
1724
|
]
|
|
1599
1725
|
}
|
|
1600
1726
|
));
|
|
1601
|
-
SelectTrigger.displayName =
|
|
1602
|
-
var SelectScrollUpButton =
|
|
1603
|
-
SelectPrimitive.
|
|
1727
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
1728
|
+
var SelectScrollUpButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1729
|
+
SelectPrimitive.ScrollUpArrow,
|
|
1604
1730
|
{
|
|
1605
1731
|
ref,
|
|
1606
1732
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
@@ -1608,9 +1734,9 @@ var SelectScrollUpButton = React23.forwardRef(({ className, ...props }, ref) =>
|
|
|
1608
1734
|
children: /* @__PURE__ */ jsx25(ChevronUp, { className: "h-4 w-4" })
|
|
1609
1735
|
}
|
|
1610
1736
|
));
|
|
1611
|
-
SelectScrollUpButton.displayName =
|
|
1612
|
-
var SelectScrollDownButton =
|
|
1613
|
-
SelectPrimitive.
|
|
1737
|
+
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
1738
|
+
var SelectScrollDownButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1739
|
+
SelectPrimitive.ScrollDownArrow,
|
|
1614
1740
|
{
|
|
1615
1741
|
ref,
|
|
1616
1742
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
@@ -1618,61 +1744,76 @@ var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) =
|
|
|
1618
1744
|
children: /* @__PURE__ */ jsx25(ChevronDown2, { className: "h-4 w-4" })
|
|
1619
1745
|
}
|
|
1620
1746
|
));
|
|
1621
|
-
SelectScrollDownButton.displayName =
|
|
1622
|
-
var SelectContent =
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1747
|
+
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
1748
|
+
var SelectContent = React24.forwardRef(
|
|
1749
|
+
({
|
|
1750
|
+
className,
|
|
1751
|
+
children,
|
|
1752
|
+
alignItemWithTrigger = true,
|
|
1753
|
+
sideOffset = 4,
|
|
1754
|
+
align,
|
|
1755
|
+
side,
|
|
1756
|
+
alignOffset,
|
|
1757
|
+
...props
|
|
1758
|
+
}, ref) => /* @__PURE__ */ jsx25(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx25(
|
|
1759
|
+
SelectPrimitive.Positioner,
|
|
1760
|
+
{
|
|
1761
|
+
alignItemWithTrigger,
|
|
1762
|
+
side,
|
|
1763
|
+
align,
|
|
1764
|
+
alignOffset,
|
|
1765
|
+
sideOffset,
|
|
1766
|
+
className: "isolate z-50",
|
|
1767
|
+
children: /* @__PURE__ */ jsxs10(
|
|
1768
|
+
SelectPrimitive.Popup,
|
|
1637
1769
|
{
|
|
1770
|
+
ref,
|
|
1638
1771
|
className: cn(
|
|
1639
|
-
"
|
|
1640
|
-
|
|
1772
|
+
"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]",
|
|
1773
|
+
className
|
|
1641
1774
|
),
|
|
1642
|
-
|
|
1775
|
+
...props,
|
|
1776
|
+
children: [
|
|
1777
|
+
/* @__PURE__ */ jsx25(SelectScrollUpButton, {}),
|
|
1778
|
+
/* @__PURE__ */ jsx25(SelectPrimitive.List, { className: cn("p-1"), children }),
|
|
1779
|
+
/* @__PURE__ */ jsx25(SelectScrollDownButton, {})
|
|
1780
|
+
]
|
|
1643
1781
|
}
|
|
1644
|
-
)
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
SelectPrimitive.Label,
|
|
1782
|
+
)
|
|
1783
|
+
}
|
|
1784
|
+
) })
|
|
1785
|
+
);
|
|
1786
|
+
SelectContent.displayName = "SelectContent";
|
|
1787
|
+
var SelectLabel = React24.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1788
|
+
SelectPrimitive.GroupLabel,
|
|
1652
1789
|
{
|
|
1653
1790
|
ref,
|
|
1654
1791
|
className: cn("py-1.5 pl-8 pr-2 text-sm ", className),
|
|
1655
|
-
|
|
1792
|
+
render: asChildRender(asChild, children),
|
|
1793
|
+
...props,
|
|
1794
|
+
children: asChild ? void 0 : children
|
|
1656
1795
|
}
|
|
1657
1796
|
));
|
|
1658
|
-
SelectLabel.displayName =
|
|
1659
|
-
var SelectItem =
|
|
1797
|
+
SelectLabel.displayName = "SelectLabel";
|
|
1798
|
+
var SelectItem = React24.forwardRef(({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1660
1799
|
SelectPrimitive.Item,
|
|
1661
1800
|
{
|
|
1662
1801
|
ref,
|
|
1802
|
+
label: textValue,
|
|
1663
1803
|
className: cn(
|
|
1664
|
-
"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-
|
|
1804
|
+
"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",
|
|
1665
1805
|
className
|
|
1666
1806
|
),
|
|
1807
|
+
render: asChildRender(asChild, children),
|
|
1667
1808
|
...props,
|
|
1668
|
-
children: [
|
|
1809
|
+
children: asChild ? void 0 : /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
1669
1810
|
/* @__PURE__ */ jsx25("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx25(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx25(Check4, { className: "h-4 w-4" }) }) }),
|
|
1670
1811
|
/* @__PURE__ */ jsx25(SelectPrimitive.ItemText, { children })
|
|
1671
|
-
]
|
|
1812
|
+
] })
|
|
1672
1813
|
}
|
|
1673
1814
|
));
|
|
1674
|
-
SelectItem.displayName =
|
|
1675
|
-
var SelectSeparator =
|
|
1815
|
+
SelectItem.displayName = "SelectItem";
|
|
1816
|
+
var SelectSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
|
|
1676
1817
|
SelectPrimitive.Separator,
|
|
1677
1818
|
{
|
|
1678
1819
|
ref,
|
|
@@ -1680,7 +1821,7 @@ var SelectSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1680
1821
|
...props
|
|
1681
1822
|
}
|
|
1682
1823
|
));
|
|
1683
|
-
SelectSeparator.displayName =
|
|
1824
|
+
SelectSeparator.displayName = "SelectSeparator";
|
|
1684
1825
|
|
|
1685
1826
|
// src/components/select/Select.tsx
|
|
1686
1827
|
import { jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
@@ -1706,7 +1847,7 @@ var selectVariants = cva11(
|
|
|
1706
1847
|
}
|
|
1707
1848
|
}
|
|
1708
1849
|
);
|
|
1709
|
-
var Select2 =
|
|
1850
|
+
var Select2 = React25.forwardRef(
|
|
1710
1851
|
({
|
|
1711
1852
|
className,
|
|
1712
1853
|
variant,
|
|
@@ -1724,7 +1865,7 @@ var Select2 = React24.forwardRef(
|
|
|
1724
1865
|
name,
|
|
1725
1866
|
required
|
|
1726
1867
|
}, ref) => {
|
|
1727
|
-
const generatedId =
|
|
1868
|
+
const generatedId = React25.useId();
|
|
1728
1869
|
const selectId = id || generatedId;
|
|
1729
1870
|
const errorId = `${selectId}-error`;
|
|
1730
1871
|
const descriptionId = `${selectId}-description`;
|
|
@@ -1746,10 +1887,11 @@ var Select2 = React24.forwardRef(
|
|
|
1746
1887
|
{
|
|
1747
1888
|
value,
|
|
1748
1889
|
defaultValue,
|
|
1749
|
-
onValueChange,
|
|
1890
|
+
onValueChange: onValueChange ? (value2) => onValueChange(value2 ?? "") : void 0,
|
|
1750
1891
|
disabled,
|
|
1751
1892
|
name,
|
|
1752
1893
|
required,
|
|
1894
|
+
items: options,
|
|
1753
1895
|
children: [
|
|
1754
1896
|
/* @__PURE__ */ jsx26(
|
|
1755
1897
|
SelectTrigger,
|
|
@@ -1778,18 +1920,18 @@ var Select2 = React24.forwardRef(
|
|
|
1778
1920
|
Select2.displayName = "Select";
|
|
1779
1921
|
|
|
1780
1922
|
// src/components/country-select/CountrySelect.tsx
|
|
1781
|
-
import * as
|
|
1923
|
+
import * as React30 from "react";
|
|
1782
1924
|
import { ChevronDown as ChevronDown3, Globe } from "lucide-react";
|
|
1783
1925
|
|
|
1784
1926
|
// src/components/icon/Icon.tsx
|
|
1785
|
-
import * as
|
|
1927
|
+
import * as React26 from "react";
|
|
1786
1928
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1787
1929
|
var iconStrokeMap = {
|
|
1788
1930
|
16: 1.4,
|
|
1789
1931
|
24: 1.6,
|
|
1790
1932
|
32: 1.8
|
|
1791
1933
|
};
|
|
1792
|
-
var
|
|
1934
|
+
var Icon = React26.forwardRef(
|
|
1793
1935
|
({
|
|
1794
1936
|
icon: IconComponent,
|
|
1795
1937
|
size,
|
|
@@ -1813,66 +1955,76 @@ var Icon2 = React25.forwardRef(
|
|
|
1813
1955
|
);
|
|
1814
1956
|
}
|
|
1815
1957
|
);
|
|
1816
|
-
|
|
1958
|
+
Icon.displayName = "Icon";
|
|
1817
1959
|
|
|
1818
1960
|
// src/primitives/popover.tsx
|
|
1819
|
-
import * as
|
|
1820
|
-
import
|
|
1961
|
+
import * as React27 from "react";
|
|
1962
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
1821
1963
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1822
1964
|
var Popover = PopoverPrimitive.Root;
|
|
1823
|
-
var PopoverTrigger =
|
|
1824
|
-
|
|
1825
|
-
|
|
1965
|
+
var PopoverTrigger = React27.forwardRef(
|
|
1966
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx28(PopoverPrimitive.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
1967
|
+
);
|
|
1968
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
1969
|
+
var PopoverContent = React27.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx28(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx28(PopoverPrimitive.Positioner, { align, sideOffset, className: "isolate z-50", children: /* @__PURE__ */ jsx28(
|
|
1970
|
+
PopoverPrimitive.Popup,
|
|
1826
1971
|
{
|
|
1827
1972
|
ref,
|
|
1828
|
-
align,
|
|
1829
|
-
sideOffset,
|
|
1830
1973
|
className: cn(
|
|
1831
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none
|
|
1974
|
+
"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]",
|
|
1832
1975
|
className
|
|
1833
1976
|
),
|
|
1834
1977
|
...props
|
|
1835
1978
|
}
|
|
1836
|
-
) }));
|
|
1837
|
-
PopoverContent.displayName =
|
|
1979
|
+
) }) }));
|
|
1980
|
+
PopoverContent.displayName = "PopoverContent";
|
|
1838
1981
|
|
|
1839
1982
|
// src/primitives/command.tsx
|
|
1840
|
-
import * as
|
|
1983
|
+
import * as React29 from "react";
|
|
1841
1984
|
import { Command as CommandPrimitive } from "cmdk";
|
|
1842
1985
|
import { Search } from "lucide-react";
|
|
1843
1986
|
|
|
1844
1987
|
// src/primitives/dialog.tsx
|
|
1845
|
-
import * as
|
|
1846
|
-
import
|
|
1988
|
+
import * as React28 from "react";
|
|
1989
|
+
import { Dialog as DialogPrimitive2 } from "@base-ui/react/dialog";
|
|
1847
1990
|
import { X as X2 } from "lucide-react";
|
|
1848
1991
|
import { jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1992
|
+
var Dialog2 = DialogPrimitive2.Root;
|
|
1993
|
+
var DialogTrigger2 = React28.forwardRef(
|
|
1994
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx29(DialogPrimitive2.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
1995
|
+
);
|
|
1996
|
+
DialogTrigger2.displayName = "DialogTrigger";
|
|
1849
1997
|
var DialogPortal2 = DialogPrimitive2.Portal;
|
|
1850
|
-
var
|
|
1851
|
-
DialogPrimitive2.
|
|
1998
|
+
var DialogClose2 = React28.forwardRef(
|
|
1999
|
+
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx29(DialogPrimitive2.Close, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
2000
|
+
);
|
|
2001
|
+
DialogClose2.displayName = "DialogClose";
|
|
2002
|
+
var DialogOverlay2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2003
|
+
DialogPrimitive2.Backdrop,
|
|
1852
2004
|
{
|
|
1853
2005
|
ref,
|
|
1854
2006
|
className: cn(
|
|
1855
|
-
"fixed inset-0 z-50 bg-black/80
|
|
2007
|
+
"fixed inset-0 z-50 bg-black/80 transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
1856
2008
|
className
|
|
1857
2009
|
),
|
|
1858
2010
|
...props
|
|
1859
2011
|
}
|
|
1860
2012
|
));
|
|
1861
|
-
DialogOverlay2.displayName =
|
|
1862
|
-
var DialogContent2 =
|
|
2013
|
+
DialogOverlay2.displayName = "DialogOverlay";
|
|
2014
|
+
var DialogContent2 = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs12(DialogPortal2, { children: [
|
|
1863
2015
|
/* @__PURE__ */ jsx29(DialogOverlay2, {}),
|
|
1864
2016
|
/* @__PURE__ */ jsxs12(
|
|
1865
|
-
DialogPrimitive2.
|
|
2017
|
+
DialogPrimitive2.Popup,
|
|
1866
2018
|
{
|
|
1867
2019
|
ref,
|
|
1868
2020
|
className: cn(
|
|
1869
|
-
"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
|
|
2021
|
+
"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",
|
|
1870
2022
|
className
|
|
1871
2023
|
),
|
|
1872
2024
|
...props,
|
|
1873
2025
|
children: [
|
|
1874
2026
|
children,
|
|
1875
|
-
/* @__PURE__ */ jsxs12(DialogPrimitive2.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-
|
|
2027
|
+
/* @__PURE__ */ jsxs12(DialogPrimitive2.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-open:bg-accent data-open:text-muted-foreground", children: [
|
|
1876
2028
|
/* @__PURE__ */ jsx29(X2, { className: "h-4 w-4" }),
|
|
1877
2029
|
/* @__PURE__ */ jsx29("span", { className: "sr-only", children: "Close" })
|
|
1878
2030
|
] })
|
|
@@ -1880,7 +2032,7 @@ var DialogContent2 = React27.forwardRef(({ className, children, ...props }, ref)
|
|
|
1880
2032
|
}
|
|
1881
2033
|
)
|
|
1882
2034
|
] }));
|
|
1883
|
-
DialogContent2.displayName =
|
|
2035
|
+
DialogContent2.displayName = "DialogContent";
|
|
1884
2036
|
var DialogHeader2 = ({ className, ...props }) => /* @__PURE__ */ jsx29("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
1885
2037
|
DialogHeader2.displayName = "DialogHeader";
|
|
1886
2038
|
var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */ jsx29(
|
|
@@ -1891,7 +2043,7 @@ var DialogFooter2 = ({ className, ...props }) => /* @__PURE__ */ jsx29(
|
|
|
1891
2043
|
}
|
|
1892
2044
|
);
|
|
1893
2045
|
DialogFooter2.displayName = "DialogFooter";
|
|
1894
|
-
var DialogTitle2 =
|
|
2046
|
+
var DialogTitle2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1895
2047
|
DialogPrimitive2.Title,
|
|
1896
2048
|
{
|
|
1897
2049
|
ref,
|
|
@@ -1899,8 +2051,8 @@ var DialogTitle2 = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1899
2051
|
...props
|
|
1900
2052
|
}
|
|
1901
2053
|
));
|
|
1902
|
-
DialogTitle2.displayName =
|
|
1903
|
-
var DialogDescription2 =
|
|
2054
|
+
DialogTitle2.displayName = "DialogTitle";
|
|
2055
|
+
var DialogDescription2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
1904
2056
|
DialogPrimitive2.Description,
|
|
1905
2057
|
{
|
|
1906
2058
|
ref,
|
|
@@ -1908,11 +2060,11 @@ var DialogDescription2 = React27.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1908
2060
|
...props
|
|
1909
2061
|
}
|
|
1910
2062
|
));
|
|
1911
|
-
DialogDescription2.displayName =
|
|
2063
|
+
DialogDescription2.displayName = "DialogDescription";
|
|
1912
2064
|
|
|
1913
2065
|
// src/primitives/command.tsx
|
|
1914
2066
|
import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1915
|
-
var Command =
|
|
2067
|
+
var Command = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1916
2068
|
CommandPrimitive,
|
|
1917
2069
|
{
|
|
1918
2070
|
ref,
|
|
@@ -1924,7 +2076,7 @@ var Command = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1924
2076
|
}
|
|
1925
2077
|
));
|
|
1926
2078
|
Command.displayName = CommandPrimitive.displayName;
|
|
1927
|
-
var CommandInput =
|
|
2079
|
+
var CommandInput = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs13("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1928
2080
|
/* @__PURE__ */ jsx30(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
1929
2081
|
/* @__PURE__ */ jsx30(
|
|
1930
2082
|
CommandPrimitive.Input,
|
|
@@ -1939,7 +2091,7 @@ var CommandInput = React28.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1939
2091
|
)
|
|
1940
2092
|
] }));
|
|
1941
2093
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
1942
|
-
var CommandList =
|
|
2094
|
+
var CommandList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1943
2095
|
CommandPrimitive.List,
|
|
1944
2096
|
{
|
|
1945
2097
|
ref,
|
|
@@ -1948,9 +2100,9 @@ var CommandList = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1948
2100
|
}
|
|
1949
2101
|
));
|
|
1950
2102
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
1951
|
-
var CommandEmpty =
|
|
2103
|
+
var CommandEmpty = React29.forwardRef((props, ref) => /* @__PURE__ */ jsx30(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
|
|
1952
2104
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
1953
|
-
var CommandGroup =
|
|
2105
|
+
var CommandGroup = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1954
2106
|
CommandPrimitive.Group,
|
|
1955
2107
|
{
|
|
1956
2108
|
ref,
|
|
@@ -1962,7 +2114,7 @@ var CommandGroup = React28.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1962
2114
|
}
|
|
1963
2115
|
));
|
|
1964
2116
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
1965
|
-
var CommandSeparator =
|
|
2117
|
+
var CommandSeparator = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1966
2118
|
CommandPrimitive.Separator,
|
|
1967
2119
|
{
|
|
1968
2120
|
ref,
|
|
@@ -1971,7 +2123,7 @@ var CommandSeparator = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1971
2123
|
}
|
|
1972
2124
|
));
|
|
1973
2125
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
1974
|
-
var CommandItem =
|
|
2126
|
+
var CommandItem = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
1975
2127
|
CommandPrimitive.Item,
|
|
1976
2128
|
{
|
|
1977
2129
|
ref,
|
|
@@ -2135,8 +2287,8 @@ var isEUCountry = (countryCode) => {
|
|
|
2135
2287
|
};
|
|
2136
2288
|
|
|
2137
2289
|
// src/components/country-select/CountrySelect.tsx
|
|
2138
|
-
import { Fragment, jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2139
|
-
var CountrySelect =
|
|
2290
|
+
import { Fragment as Fragment4, jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2291
|
+
var CountrySelect = React30.forwardRef(
|
|
2140
2292
|
({
|
|
2141
2293
|
value,
|
|
2142
2294
|
onValueChange,
|
|
@@ -2146,8 +2298,8 @@ var CountrySelect = React29.forwardRef(
|
|
|
2146
2298
|
align = "center",
|
|
2147
2299
|
sideOffset = 4
|
|
2148
2300
|
}, ref) => {
|
|
2149
|
-
const [open, setOpen] =
|
|
2150
|
-
const selectedCountry =
|
|
2301
|
+
const [open, setOpen] = React30.useState(false);
|
|
2302
|
+
const selectedCountry = React30.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);
|
|
2151
2303
|
return /* @__PURE__ */ jsxs14(Popover, { open, onOpenChange: setOpen, children: [
|
|
2152
2304
|
/* @__PURE__ */ jsx31(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs14(
|
|
2153
2305
|
"button",
|
|
@@ -2170,7 +2322,7 @@ var CountrySelect = React29.forwardRef(
|
|
|
2170
2322
|
className
|
|
2171
2323
|
),
|
|
2172
2324
|
children: [
|
|
2173
|
-
/* @__PURE__ */ jsx31("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ jsxs14(
|
|
2325
|
+
/* @__PURE__ */ jsx31("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
2174
2326
|
/* @__PURE__ */ jsx31("span", { className: "text-xl flex-shrink-0", children: selectedCountry.flag }),
|
|
2175
2327
|
/* @__PURE__ */ jsx31("span", { className: "truncate", children: selectedCountry.name }),
|
|
2176
2328
|
/* @__PURE__ */ jsxs14("span", { className: "text-berget-muted-foreground text-xs flex-shrink-0", children: [
|
|
@@ -2178,9 +2330,9 @@ var CountrySelect = React29.forwardRef(
|
|
|
2178
2330
|
selectedCountry.code,
|
|
2179
2331
|
")"
|
|
2180
2332
|
] })
|
|
2181
|
-
] }) : /* @__PURE__ */ jsxs14(
|
|
2333
|
+
] }) : /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
2182
2334
|
/* @__PURE__ */ jsx31(
|
|
2183
|
-
|
|
2335
|
+
Icon,
|
|
2184
2336
|
{
|
|
2185
2337
|
icon: Globe,
|
|
2186
2338
|
size: 16,
|
|
@@ -2190,7 +2342,7 @@ var CountrySelect = React29.forwardRef(
|
|
|
2190
2342
|
/* @__PURE__ */ jsx31("span", { className: "text-berget-muted-foreground truncate", children: placeholder })
|
|
2191
2343
|
] }) }),
|
|
2192
2344
|
/* @__PURE__ */ jsx31(
|
|
2193
|
-
|
|
2345
|
+
Icon,
|
|
2194
2346
|
{
|
|
2195
2347
|
icon: ChevronDown3,
|
|
2196
2348
|
size: 16,
|
|
@@ -2248,13 +2400,13 @@ var CountrySelect = React29.forwardRef(
|
|
|
2248
2400
|
CountrySelect.displayName = "CountrySelect";
|
|
2249
2401
|
|
|
2250
2402
|
// src/components/text-area/TextArea.tsx
|
|
2251
|
-
import * as
|
|
2403
|
+
import * as React32 from "react";
|
|
2252
2404
|
import { cva as cva12 } from "class-variance-authority";
|
|
2253
2405
|
|
|
2254
2406
|
// src/primitives/textarea.tsx
|
|
2255
|
-
import * as
|
|
2407
|
+
import * as React31 from "react";
|
|
2256
2408
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2257
|
-
var Textarea =
|
|
2409
|
+
var Textarea = React31.forwardRef(
|
|
2258
2410
|
({ className, ...props }, ref) => {
|
|
2259
2411
|
return /* @__PURE__ */ jsx32(
|
|
2260
2412
|
"textarea",
|
|
@@ -2295,7 +2447,7 @@ var textAreaVariants = cva12(
|
|
|
2295
2447
|
}
|
|
2296
2448
|
}
|
|
2297
2449
|
);
|
|
2298
|
-
var TextArea =
|
|
2450
|
+
var TextArea = React32.forwardRef(
|
|
2299
2451
|
({
|
|
2300
2452
|
className,
|
|
2301
2453
|
variant,
|
|
@@ -2315,7 +2467,7 @@ var TextArea = React31.forwardRef(
|
|
|
2315
2467
|
actionButton,
|
|
2316
2468
|
...props
|
|
2317
2469
|
}, ref) => {
|
|
2318
|
-
const generatedId =
|
|
2470
|
+
const generatedId = React32.useId();
|
|
2319
2471
|
const textareaId = id || generatedId;
|
|
2320
2472
|
const errorId = `${textareaId}-error`;
|
|
2321
2473
|
const descriptionId = `${textareaId}-description`;
|
|
@@ -2397,15 +2549,14 @@ var TextArea = React31.forwardRef(
|
|
|
2397
2549
|
TextArea.displayName = "TextArea";
|
|
2398
2550
|
|
|
2399
2551
|
// src/primitives/label.tsx
|
|
2400
|
-
import * as
|
|
2401
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2552
|
+
import * as React33 from "react";
|
|
2402
2553
|
import { cva as cva13 } from "class-variance-authority";
|
|
2403
2554
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2404
2555
|
var labelVariants = cva13(
|
|
2405
2556
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2406
2557
|
);
|
|
2407
|
-
var
|
|
2408
|
-
|
|
2558
|
+
var Label = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34("label", { ref, className: cn(labelVariants(), className), ...props }));
|
|
2559
|
+
Label.displayName = "Label";
|
|
2409
2560
|
|
|
2410
2561
|
// src/primitives/field.tsx
|
|
2411
2562
|
import { useMemo as useMemo3 } from "react";
|
|
@@ -2509,7 +2660,7 @@ function FieldContent({ className, ...props }) {
|
|
|
2509
2660
|
}
|
|
2510
2661
|
function FieldLabel({ className, ...props }) {
|
|
2511
2662
|
return /* @__PURE__ */ jsx35(
|
|
2512
|
-
|
|
2663
|
+
Label,
|
|
2513
2664
|
{
|
|
2514
2665
|
"data-slot": "field-label",
|
|
2515
2666
|
className: cn(
|
|
@@ -2566,7 +2717,7 @@ function FieldSeparator({
|
|
|
2566
2717
|
),
|
|
2567
2718
|
...props,
|
|
2568
2719
|
children: [
|
|
2569
|
-
/* @__PURE__ */ jsx35(
|
|
2720
|
+
/* @__PURE__ */ jsx35(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
2570
2721
|
children && /* @__PURE__ */ jsx35(
|
|
2571
2722
|
"span",
|
|
2572
2723
|
{
|
|
@@ -2613,7 +2764,7 @@ function FieldError({
|
|
|
2613
2764
|
}
|
|
2614
2765
|
|
|
2615
2766
|
// src/components/link/Link.tsx
|
|
2616
|
-
import * as
|
|
2767
|
+
import * as React34 from "react";
|
|
2617
2768
|
import { cva as cva15 } from "class-variance-authority";
|
|
2618
2769
|
import { ExternalLink } from "lucide-react";
|
|
2619
2770
|
import { jsx as jsx36, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
@@ -2641,7 +2792,7 @@ var linkVariants = cva15(
|
|
|
2641
2792
|
}
|
|
2642
2793
|
}
|
|
2643
2794
|
);
|
|
2644
|
-
var
|
|
2795
|
+
var Link = React34.forwardRef(
|
|
2645
2796
|
({
|
|
2646
2797
|
className,
|
|
2647
2798
|
variant,
|
|
@@ -2671,19 +2822,19 @@ var Link2 = React33.forwardRef(
|
|
|
2671
2822
|
children: [
|
|
2672
2823
|
children,
|
|
2673
2824
|
icon && /* @__PURE__ */ jsx36("span", { className: "inline-flex items-center", children: icon }),
|
|
2674
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ jsx36("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ jsx36(
|
|
2825
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ jsx36("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ jsx36(Icon, { icon: ExternalLink, size: 16 }) })
|
|
2675
2826
|
]
|
|
2676
2827
|
}
|
|
2677
2828
|
);
|
|
2678
2829
|
}
|
|
2679
2830
|
);
|
|
2680
|
-
|
|
2831
|
+
Link.displayName = "Link";
|
|
2681
2832
|
|
|
2682
2833
|
// src/components/container/Container.tsx
|
|
2683
|
-
import * as
|
|
2684
|
-
import {
|
|
2834
|
+
import * as React35 from "react";
|
|
2835
|
+
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
2836
|
+
import { useRender as useRender2 } from "@base-ui/react/use-render";
|
|
2685
2837
|
import { cva as cva16 } from "class-variance-authority";
|
|
2686
|
-
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2687
2838
|
var containerVariants = cva16("w-full mx-auto", {
|
|
2688
2839
|
variants: {
|
|
2689
2840
|
size: {
|
|
@@ -2705,27 +2856,29 @@ var containerVariants = cva16("w-full mx-auto", {
|
|
|
2705
2856
|
padding: "md"
|
|
2706
2857
|
}
|
|
2707
2858
|
});
|
|
2708
|
-
var Container =
|
|
2859
|
+
var Container = React35.forwardRef(
|
|
2709
2860
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2861
|
+
return useRender2({
|
|
2862
|
+
ref,
|
|
2863
|
+
defaultTagName: "div",
|
|
2864
|
+
render: asChild ? children : void 0,
|
|
2865
|
+
props: mergeProps2(
|
|
2866
|
+
{
|
|
2867
|
+
className: cn(containerVariants({ size, padding }), className),
|
|
2868
|
+
children: asChild ? void 0 : children
|
|
2869
|
+
},
|
|
2870
|
+
props
|
|
2871
|
+
)
|
|
2872
|
+
});
|
|
2720
2873
|
}
|
|
2721
2874
|
);
|
|
2722
2875
|
Container.displayName = "Container";
|
|
2723
2876
|
|
|
2724
2877
|
// src/components/grid/Grid.tsx
|
|
2725
|
-
import * as
|
|
2878
|
+
import * as React36 from "react";
|
|
2726
2879
|
import { cva as cva17 } from "class-variance-authority";
|
|
2727
|
-
import {
|
|
2728
|
-
import {
|
|
2880
|
+
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
2881
|
+
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
2729
2882
|
var gridVariants = cva17("grid", {
|
|
2730
2883
|
variants: {
|
|
2731
2884
|
align: {
|
|
@@ -2748,35 +2901,37 @@ var gridVariants = cva17("grid", {
|
|
|
2748
2901
|
justify: "start"
|
|
2749
2902
|
}
|
|
2750
2903
|
});
|
|
2751
|
-
var Grid =
|
|
2904
|
+
var Grid = React36.forwardRef(
|
|
2752
2905
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2906
|
+
return useRender3({
|
|
2907
|
+
ref,
|
|
2908
|
+
defaultTagName: "div",
|
|
2909
|
+
render: asChild ? children : void 0,
|
|
2910
|
+
props: mergeProps3(
|
|
2911
|
+
{
|
|
2912
|
+
className: cn(
|
|
2913
|
+
gridVariants({ align, justify }),
|
|
2914
|
+
cols !== void 0 && `grid-cols-${cols}`,
|
|
2915
|
+
rows !== void 0 && `grid-rows-${rows}`,
|
|
2916
|
+
gap !== void 0 && `gap-${gap}`,
|
|
2917
|
+
gapX !== void 0 && `gap-x-${gapX}`,
|
|
2918
|
+
gapY !== void 0 && `gap-y-${gapY}`,
|
|
2919
|
+
className
|
|
2920
|
+
),
|
|
2921
|
+
children: asChild ? void 0 : children
|
|
2922
|
+
},
|
|
2923
|
+
props
|
|
2924
|
+
)
|
|
2925
|
+
});
|
|
2771
2926
|
}
|
|
2772
2927
|
);
|
|
2773
2928
|
Grid.displayName = "Grid";
|
|
2774
2929
|
|
|
2775
2930
|
// src/components/box/Box.tsx
|
|
2776
|
-
import * as
|
|
2931
|
+
import * as React37 from "react";
|
|
2777
2932
|
import { cva as cva18 } from "class-variance-authority";
|
|
2778
|
-
import {
|
|
2779
|
-
import {
|
|
2933
|
+
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
2934
|
+
import { useRender as useRender4 } from "@base-ui/react/use-render";
|
|
2780
2935
|
var boxVariants = cva18("flex", {
|
|
2781
2936
|
variants: {
|
|
2782
2937
|
direction: {
|
|
@@ -2813,37 +2968,39 @@ var boxVariants = cva18("flex", {
|
|
|
2813
2968
|
wrap: "nowrap"
|
|
2814
2969
|
}
|
|
2815
2970
|
});
|
|
2816
|
-
var Box =
|
|
2971
|
+
var Box = React37.forwardRef(
|
|
2817
2972
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2973
|
+
return useRender4({
|
|
2974
|
+
ref,
|
|
2975
|
+
defaultTagName: "div",
|
|
2976
|
+
render: asChild ? children : void 0,
|
|
2977
|
+
props: mergeProps4(
|
|
2978
|
+
{
|
|
2979
|
+
className: cn(
|
|
2980
|
+
boxVariants({ direction, align, justify, wrap }),
|
|
2981
|
+
gap !== void 0 && `gap-${gap}`,
|
|
2982
|
+
className
|
|
2983
|
+
),
|
|
2984
|
+
children: asChild ? void 0 : children
|
|
2985
|
+
},
|
|
2986
|
+
props
|
|
2987
|
+
)
|
|
2988
|
+
});
|
|
2832
2989
|
}
|
|
2833
2990
|
);
|
|
2834
2991
|
Box.displayName = "Box";
|
|
2835
2992
|
|
|
2836
2993
|
// src/components/berget-logo/BergetLogo.tsx
|
|
2837
|
-
import * as
|
|
2838
|
-
import { jsx as
|
|
2839
|
-
var BergetLogo =
|
|
2994
|
+
import * as React38 from "react";
|
|
2995
|
+
import { jsx as jsx37, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2996
|
+
var BergetLogo = React38.forwardRef(
|
|
2840
2997
|
({ variant = "logotype", color = "auto", size = 48, className, ...props }, ref) => {
|
|
2841
2998
|
const fillColor = color === "auto" ? "var(--berget-logo-light)" : color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
2842
2999
|
if (variant === "symbol") {
|
|
2843
3000
|
const aspectRatio2 = 463 / 419;
|
|
2844
3001
|
const width2 = size * aspectRatio2;
|
|
2845
3002
|
const height2 = size;
|
|
2846
|
-
return /* @__PURE__ */
|
|
3003
|
+
return /* @__PURE__ */ jsx37(
|
|
2847
3004
|
"svg",
|
|
2848
3005
|
{
|
|
2849
3006
|
ref,
|
|
@@ -2856,7 +3013,7 @@ var BergetLogo = React37.forwardRef(
|
|
|
2856
3013
|
"aria-label": "Berget symbol",
|
|
2857
3014
|
className: cn("inline-block", className),
|
|
2858
3015
|
...props,
|
|
2859
|
-
children: /* @__PURE__ */
|
|
3016
|
+
children: /* @__PURE__ */ jsx37(
|
|
2860
3017
|
"path",
|
|
2861
3018
|
{
|
|
2862
3019
|
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",
|
|
@@ -2884,58 +3041,58 @@ var BergetLogo = React37.forwardRef(
|
|
|
2884
3041
|
...props,
|
|
2885
3042
|
children: [
|
|
2886
3043
|
/* @__PURE__ */ jsxs18("g", { style: { fill: fillColor }, children: [
|
|
2887
|
-
/* @__PURE__ */
|
|
3044
|
+
/* @__PURE__ */ jsx37(
|
|
2888
3045
|
"path",
|
|
2889
3046
|
{
|
|
2890
3047
|
className: "berget-logotype-fill",
|
|
2891
3048
|
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"
|
|
2892
3049
|
}
|
|
2893
3050
|
),
|
|
2894
|
-
/* @__PURE__ */
|
|
3051
|
+
/* @__PURE__ */ jsx37(
|
|
2895
3052
|
"path",
|
|
2896
3053
|
{
|
|
2897
3054
|
className: "berget-logotype-fill",
|
|
2898
3055
|
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"
|
|
2899
3056
|
}
|
|
2900
3057
|
),
|
|
2901
|
-
/* @__PURE__ */
|
|
3058
|
+
/* @__PURE__ */ jsx37(
|
|
2902
3059
|
"path",
|
|
2903
3060
|
{
|
|
2904
3061
|
className: "berget-logotype-fill",
|
|
2905
3062
|
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"
|
|
2906
3063
|
}
|
|
2907
3064
|
),
|
|
2908
|
-
/* @__PURE__ */
|
|
3065
|
+
/* @__PURE__ */ jsx37(
|
|
2909
3066
|
"path",
|
|
2910
3067
|
{
|
|
2911
3068
|
className: "berget-logotype-fill",
|
|
2912
3069
|
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"
|
|
2913
3070
|
}
|
|
2914
3071
|
),
|
|
2915
|
-
/* @__PURE__ */
|
|
3072
|
+
/* @__PURE__ */ jsx37(
|
|
2916
3073
|
"path",
|
|
2917
3074
|
{
|
|
2918
3075
|
className: "berget-logotype-fill",
|
|
2919
3076
|
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"
|
|
2920
3077
|
}
|
|
2921
3078
|
),
|
|
2922
|
-
/* @__PURE__ */
|
|
3079
|
+
/* @__PURE__ */ jsx37(
|
|
2923
3080
|
"path",
|
|
2924
3081
|
{
|
|
2925
3082
|
className: "berget-logotype-fill",
|
|
2926
3083
|
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"
|
|
2927
3084
|
}
|
|
2928
3085
|
),
|
|
2929
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsx37(
|
|
2930
3087
|
"path",
|
|
2931
3088
|
{
|
|
2932
3089
|
className: "berget-logotype-fill",
|
|
2933
3090
|
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"
|
|
2934
3091
|
}
|
|
2935
3092
|
),
|
|
2936
|
-
/* @__PURE__ */
|
|
3093
|
+
/* @__PURE__ */ jsx37("path", { className: "berget-logotype-fill", d: "M778.48,172.54v-96.04h15.15v96.04h-15.15Z" })
|
|
2937
3094
|
] }),
|
|
2938
|
-
/* @__PURE__ */
|
|
3095
|
+
/* @__PURE__ */ jsx37(
|
|
2939
3096
|
"path",
|
|
2940
3097
|
{
|
|
2941
3098
|
style: { fill: fillColor },
|
|
@@ -2950,102 +3107,109 @@ var BergetLogo = React37.forwardRef(
|
|
|
2950
3107
|
BergetLogo.displayName = "BergetLogo";
|
|
2951
3108
|
|
|
2952
3109
|
// src/components/language-select/LanguageSelect.tsx
|
|
2953
|
-
import * as
|
|
2954
|
-
import
|
|
3110
|
+
import * as React39 from "react";
|
|
3111
|
+
import { Select as SelectPrimitive2 } from "@base-ui/react/select";
|
|
2955
3112
|
import { Globe as Globe2 } from "lucide-react";
|
|
2956
|
-
import { jsx as
|
|
2957
|
-
var LanguageSelect =
|
|
2958
|
-
|
|
2959
|
-
/* @__PURE__ */ jsxs19(
|
|
2960
|
-
SelectPrimitive2.
|
|
3113
|
+
import { jsx as jsx38, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3114
|
+
var LanguageSelect = React39.forwardRef(
|
|
3115
|
+
({ className, options, value, onValueChange }, ref) => {
|
|
3116
|
+
return /* @__PURE__ */ jsxs19(
|
|
3117
|
+
SelectPrimitive2.Root,
|
|
2961
3118
|
{
|
|
2962
|
-
|
|
2963
|
-
"
|
|
2964
|
-
className: cn(
|
|
2965
|
-
// Base styles
|
|
2966
|
-
"h-8 w-8 p-0 rounded-full",
|
|
2967
|
-
"flex items-center justify-center",
|
|
2968
|
-
// Border and background
|
|
2969
|
-
"border border-berget-border-subtle",
|
|
2970
|
-
"bg-transparent",
|
|
2971
|
-
// Hover effect
|
|
2972
|
-
"hover:bg-berget-surface-hover",
|
|
2973
|
-
// Transitions
|
|
2974
|
-
"transition-all duration-200",
|
|
2975
|
-
// Focus styles - remove all focus rings
|
|
2976
|
-
"focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
2977
|
-
// Disabled state
|
|
2978
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
2979
|
-
className
|
|
2980
|
-
),
|
|
3119
|
+
value,
|
|
3120
|
+
onValueChange: onValueChange ? (v) => onValueChange(v ?? "") : void 0,
|
|
2981
3121
|
children: [
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
|
|
3122
|
+
/* @__PURE__ */ jsxs19(
|
|
3123
|
+
SelectPrimitive2.Trigger,
|
|
3124
|
+
{
|
|
3125
|
+
ref,
|
|
3126
|
+
"aria-label": "Select language",
|
|
3127
|
+
className: cn(
|
|
3128
|
+
// Base styles
|
|
3129
|
+
"h-8 w-8 p-0 rounded-full",
|
|
3130
|
+
"flex items-center justify-center",
|
|
3131
|
+
// Border and background
|
|
3132
|
+
"border border-berget-border-subtle",
|
|
3133
|
+
"bg-transparent",
|
|
3134
|
+
// Hover effect
|
|
3135
|
+
"hover:bg-berget-surface-hover",
|
|
3136
|
+
// Transitions
|
|
3137
|
+
"transition-all duration-200",
|
|
3138
|
+
// Focus styles - remove all focus rings
|
|
3139
|
+
"focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
3140
|
+
// Disabled state
|
|
3141
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
3142
|
+
className
|
|
3143
|
+
),
|
|
3144
|
+
children: [
|
|
3145
|
+
/* @__PURE__ */ jsx38("span", { className: "sr-only", children: "Select language" }),
|
|
3146
|
+
/* @__PURE__ */ jsx38(Icon, { icon: Globe2, size: 16, "aria-hidden": true })
|
|
3147
|
+
]
|
|
3148
|
+
}
|
|
3149
|
+
),
|
|
3150
|
+
/* @__PURE__ */ jsx38(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx38(SelectPrimitive2.Positioner, { alignItemWithTrigger: false, className: "isolate z-50", children: /* @__PURE__ */ jsx38(
|
|
3151
|
+
SelectPrimitive2.Popup,
|
|
3152
|
+
{
|
|
3153
|
+
className: cn(
|
|
3154
|
+
// Positioning and z-index
|
|
3155
|
+
"z-50 min-w-[8rem]",
|
|
3156
|
+
// Overflow handling
|
|
3157
|
+
"overflow-y-auto overflow-x-hidden",
|
|
3158
|
+
// Border and background
|
|
3159
|
+
"border border-berget-border bg-berget-background",
|
|
3160
|
+
"text-berget-foreground",
|
|
3161
|
+
// Shadow
|
|
3162
|
+
"shadow-berget-lg",
|
|
3163
|
+
// Rounded corners
|
|
3164
|
+
"rounded-md",
|
|
3165
|
+
// Animations
|
|
3166
|
+
"transition-[opacity,transform]",
|
|
3167
|
+
"data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95",
|
|
3168
|
+
// Position-based animations
|
|
3169
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
3170
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
3171
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
3172
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
3173
|
+
// Origin for transforms
|
|
3174
|
+
"origin-[--transform-origin]"
|
|
3175
|
+
),
|
|
3176
|
+
children: /* @__PURE__ */ jsx38(SelectPrimitive2.List, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsx38(
|
|
3177
|
+
SelectPrimitive2.Item,
|
|
3178
|
+
{
|
|
3179
|
+
value: option.value,
|
|
3180
|
+
disabled: option.disabled,
|
|
3181
|
+
className: cn(
|
|
3182
|
+
// Layout
|
|
3183
|
+
"relative flex w-full cursor-default",
|
|
3184
|
+
"select-none items-center rounded-sm py-2 px-3",
|
|
3185
|
+
// Text
|
|
3186
|
+
"text-sm outline-none",
|
|
3187
|
+
// Focus/hover styles
|
|
3188
|
+
"focus:bg-berget-primary-tint focus:text-berget-foreground",
|
|
3189
|
+
"hover:bg-berget-primary-tint",
|
|
3190
|
+
// Disabled state
|
|
3191
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
3192
|
+
),
|
|
3193
|
+
children: /* @__PURE__ */ jsx38(SelectPrimitive2.ItemText, { children: option.label })
|
|
3194
|
+
},
|
|
3195
|
+
option.value
|
|
3196
|
+
)) })
|
|
3197
|
+
}
|
|
3198
|
+
) }) })
|
|
2984
3199
|
]
|
|
2985
3200
|
}
|
|
2986
|
-
)
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
{
|
|
2990
|
-
className: cn(
|
|
2991
|
-
// Positioning and z-index
|
|
2992
|
-
"relative z-50 min-w-[8rem]",
|
|
2993
|
-
// Overflow handling
|
|
2994
|
-
"overflow-y-auto overflow-x-hidden",
|
|
2995
|
-
// Border and background
|
|
2996
|
-
"border border-berget-border bg-berget-background",
|
|
2997
|
-
"text-berget-foreground",
|
|
2998
|
-
// Shadow
|
|
2999
|
-
"shadow-berget-lg",
|
|
3000
|
-
// Rounded corners
|
|
3001
|
-
"rounded-md",
|
|
3002
|
-
// Animations
|
|
3003
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3004
|
-
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3005
|
-
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
3006
|
-
// Position-based animations
|
|
3007
|
-
"data-[side=bottom]:slide-in-from-top-2",
|
|
3008
|
-
"data-[side=left]:slide-in-from-right-2",
|
|
3009
|
-
"data-[side=right]:slide-in-from-left-2",
|
|
3010
|
-
"data-[side=top]:slide-in-from-bottom-2",
|
|
3011
|
-
// Origin for transforms
|
|
3012
|
-
"origin-[--radix-select-content-transform-origin]"
|
|
3013
|
-
),
|
|
3014
|
-
position: "popper",
|
|
3015
|
-
children: /* @__PURE__ */ jsx41(SelectPrimitive2.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsx41(
|
|
3016
|
-
SelectPrimitive2.Item,
|
|
3017
|
-
{
|
|
3018
|
-
value: option.value,
|
|
3019
|
-
disabled: option.disabled,
|
|
3020
|
-
className: cn(
|
|
3021
|
-
// Layout
|
|
3022
|
-
"relative flex w-full cursor-default",
|
|
3023
|
-
"select-none items-center rounded-sm py-2 px-3",
|
|
3024
|
-
// Text
|
|
3025
|
-
"text-sm outline-none",
|
|
3026
|
-
// Focus/hover styles
|
|
3027
|
-
"focus:bg-berget-primary-tint focus:text-berget-foreground",
|
|
3028
|
-
"hover:bg-berget-primary-tint",
|
|
3029
|
-
// Disabled state
|
|
3030
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
3031
|
-
),
|
|
3032
|
-
children: /* @__PURE__ */ jsx41(SelectPrimitive2.ItemText, { children: option.label })
|
|
3033
|
-
},
|
|
3034
|
-
option.value
|
|
3035
|
-
)) })
|
|
3036
|
-
}
|
|
3037
|
-
) })
|
|
3038
|
-
] });
|
|
3039
|
-
});
|
|
3201
|
+
);
|
|
3202
|
+
}
|
|
3203
|
+
);
|
|
3040
3204
|
LanguageSelect.displayName = "LanguageSelect";
|
|
3041
3205
|
|
|
3042
3206
|
// src/components/list/List.tsx
|
|
3043
|
-
import * as
|
|
3207
|
+
import * as React41 from "react";
|
|
3044
3208
|
|
|
3045
3209
|
// src/components/divider/Divider.tsx
|
|
3046
|
-
import * as
|
|
3210
|
+
import * as React40 from "react";
|
|
3047
3211
|
import { cva as cva19 } from "class-variance-authority";
|
|
3048
|
-
import { jsx as
|
|
3212
|
+
import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3049
3213
|
var dividerVariants = cva19("", {
|
|
3050
3214
|
variants: {
|
|
3051
3215
|
variant: {
|
|
@@ -3066,7 +3230,7 @@ var dividerVariants = cva19("", {
|
|
|
3066
3230
|
size: "thin"
|
|
3067
3231
|
}
|
|
3068
3232
|
});
|
|
3069
|
-
var Divider =
|
|
3233
|
+
var Divider = React40.forwardRef(
|
|
3070
3234
|
({
|
|
3071
3235
|
className,
|
|
3072
3236
|
orientation = "horizontal",
|
|
@@ -3078,16 +3242,16 @@ var Divider = React39.forwardRef(
|
|
|
3078
3242
|
}, ref) => {
|
|
3079
3243
|
if (label) {
|
|
3080
3244
|
return /* @__PURE__ */ jsxs20("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
3081
|
-
labelPosition !== "right" && /* @__PURE__ */
|
|
3082
|
-
|
|
3245
|
+
labelPosition !== "right" && /* @__PURE__ */ jsx39(
|
|
3246
|
+
Separator,
|
|
3083
3247
|
{
|
|
3084
3248
|
orientation: "horizontal",
|
|
3085
3249
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
3086
3250
|
}
|
|
3087
3251
|
),
|
|
3088
|
-
/* @__PURE__ */
|
|
3089
|
-
labelPosition !== "left" && /* @__PURE__ */
|
|
3090
|
-
|
|
3252
|
+
/* @__PURE__ */ jsx39(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
3253
|
+
labelPosition !== "left" && /* @__PURE__ */ jsx39(
|
|
3254
|
+
Separator,
|
|
3091
3255
|
{
|
|
3092
3256
|
orientation: "horizontal",
|
|
3093
3257
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
@@ -3095,8 +3259,8 @@ var Divider = React39.forwardRef(
|
|
|
3095
3259
|
)
|
|
3096
3260
|
] });
|
|
3097
3261
|
}
|
|
3098
|
-
return /* @__PURE__ */
|
|
3099
|
-
|
|
3262
|
+
return /* @__PURE__ */ jsx39(
|
|
3263
|
+
Separator,
|
|
3100
3264
|
{
|
|
3101
3265
|
ref,
|
|
3102
3266
|
orientation,
|
|
@@ -3113,18 +3277,18 @@ Divider.displayName = "Divider";
|
|
|
3113
3277
|
|
|
3114
3278
|
// src/components/list/List.tsx
|
|
3115
3279
|
import { Check as Check5 } from "lucide-react";
|
|
3116
|
-
import { jsx as
|
|
3117
|
-
var
|
|
3280
|
+
import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3281
|
+
var List = React41.forwardRef(
|
|
3118
3282
|
({ className, children, ...props }, ref) => {
|
|
3119
|
-
const childrenArray =
|
|
3120
|
-
return /* @__PURE__ */
|
|
3283
|
+
const childrenArray = React41.Children.toArray(children);
|
|
3284
|
+
return /* @__PURE__ */ jsx40("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs21(React41.Fragment, { children: [
|
|
3121
3285
|
child,
|
|
3122
|
-
index < childrenArray.length - 1 && /* @__PURE__ */
|
|
3286
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ jsx40(Divider, { variant: "subtle" })
|
|
3123
3287
|
] }, index)) });
|
|
3124
3288
|
}
|
|
3125
3289
|
);
|
|
3126
|
-
|
|
3127
|
-
var ListItem =
|
|
3290
|
+
List.displayName = "List";
|
|
3291
|
+
var ListItem = React41.forwardRef(
|
|
3128
3292
|
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ jsxs21(
|
|
3129
3293
|
"div",
|
|
3130
3294
|
{
|
|
@@ -3136,15 +3300,15 @@ var ListItem = React40.forwardRef(
|
|
|
3136
3300
|
),
|
|
3137
3301
|
...props,
|
|
3138
3302
|
children: [
|
|
3139
|
-
icon && /* @__PURE__ */
|
|
3140
|
-
/* @__PURE__ */
|
|
3303
|
+
icon && /* @__PURE__ */ jsx40("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
3304
|
+
/* @__PURE__ */ jsx40("div", { className: "flex-1 min-w-0", children })
|
|
3141
3305
|
]
|
|
3142
3306
|
}
|
|
3143
3307
|
)
|
|
3144
3308
|
);
|
|
3145
3309
|
ListItem.displayName = "ListItem";
|
|
3146
|
-
var ListHeader =
|
|
3147
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
3310
|
+
var ListHeader = React41.forwardRef(
|
|
3311
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
3148
3312
|
"div",
|
|
3149
3313
|
{
|
|
3150
3314
|
ref,
|
|
@@ -3155,20 +3319,20 @@ var ListHeader = React40.forwardRef(
|
|
|
3155
3319
|
)
|
|
3156
3320
|
);
|
|
3157
3321
|
ListHeader.displayName = "ListHeader";
|
|
3158
|
-
var FeatureList =
|
|
3322
|
+
var FeatureList = React41.forwardRef(
|
|
3159
3323
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
3160
|
-
return /* @__PURE__ */
|
|
3161
|
-
variant === "bullet" ? /* @__PURE__ */
|
|
3162
|
-
/* @__PURE__ */
|
|
3324
|
+
return /* @__PURE__ */ jsx40("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs21("li", { className: "flex items-start gap-fluid-md", children: [
|
|
3325
|
+
variant === "bullet" ? /* @__PURE__ */ jsx40("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ jsx40("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx40(Icon, { icon: Check5, size: 24, className: "text-berget-logo-light" }) }),
|
|
3326
|
+
/* @__PURE__ */ jsx40(Typography, { variant: "body", color: "muted", children: item })
|
|
3163
3327
|
] }, index)) });
|
|
3164
3328
|
}
|
|
3165
3329
|
);
|
|
3166
3330
|
FeatureList.displayName = "FeatureList";
|
|
3167
3331
|
|
|
3168
3332
|
// src/components/hero-block/HeroBlock.tsx
|
|
3169
|
-
import * as
|
|
3333
|
+
import * as React42 from "react";
|
|
3170
3334
|
import { cva as cva20 } from "class-variance-authority";
|
|
3171
|
-
import { jsx as
|
|
3335
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3172
3336
|
var heroBlockVariants = cva20(
|
|
3173
3337
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
3174
3338
|
{
|
|
@@ -3189,7 +3353,7 @@ var heroBlockVariants = cva20(
|
|
|
3189
3353
|
}
|
|
3190
3354
|
}
|
|
3191
3355
|
);
|
|
3192
|
-
var HeroBlock =
|
|
3356
|
+
var HeroBlock = React42.forwardRef(
|
|
3193
3357
|
({
|
|
3194
3358
|
className,
|
|
3195
3359
|
variant,
|
|
@@ -3201,26 +3365,26 @@ var HeroBlock = React41.forwardRef(
|
|
|
3201
3365
|
actions,
|
|
3202
3366
|
...props
|
|
3203
3367
|
}, ref) => {
|
|
3204
|
-
return /* @__PURE__ */
|
|
3368
|
+
return /* @__PURE__ */ jsx41(
|
|
3205
3369
|
"div",
|
|
3206
3370
|
{
|
|
3207
3371
|
ref,
|
|
3208
3372
|
className: cn(heroBlockVariants({ variant, withPattern }), className),
|
|
3209
3373
|
...props,
|
|
3210
|
-
children: /* @__PURE__ */
|
|
3211
|
-
tagline && /* @__PURE__ */
|
|
3374
|
+
children: /* @__PURE__ */ jsx41("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs22("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
3375
|
+
tagline && /* @__PURE__ */ jsx41(
|
|
3212
3376
|
Badge,
|
|
3213
3377
|
{
|
|
3214
3378
|
variant: "default",
|
|
3215
|
-
icon: TaglineIcon ? /* @__PURE__ */
|
|
3379
|
+
icon: TaglineIcon ? /* @__PURE__ */ jsx41(Icon, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
3216
3380
|
iconGap: 2,
|
|
3217
3381
|
className: "mb-fluid-md",
|
|
3218
3382
|
children: tagline
|
|
3219
3383
|
}
|
|
3220
3384
|
),
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
actions && /* @__PURE__ */
|
|
3385
|
+
/* @__PURE__ */ jsx41(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
3386
|
+
/* @__PURE__ */ jsx41(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
3387
|
+
actions && /* @__PURE__ */ jsx41("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
3224
3388
|
] }) })
|
|
3225
3389
|
}
|
|
3226
3390
|
);
|
|
@@ -3231,7 +3395,7 @@ HeroBlock.displayName = "HeroBlock";
|
|
|
3231
3395
|
// src/components/code-block/CodeBlock.tsx
|
|
3232
3396
|
import { useState as useState3, useEffect as useEffect2, useCallback as useCallback3 } from "react";
|
|
3233
3397
|
import { Copy, Check as Check6 } from "lucide-react";
|
|
3234
|
-
import { jsx as
|
|
3398
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3235
3399
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
3236
3400
|
const [html, setHtml] = useState3(null);
|
|
3237
3401
|
const [copied, setCopied] = useState3(false);
|
|
@@ -3247,13 +3411,13 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
3247
3411
|
setCopied(true);
|
|
3248
3412
|
setTimeout(() => setCopied(false), 2e3);
|
|
3249
3413
|
}, [code]);
|
|
3250
|
-
const copyButton = /* @__PURE__ */
|
|
3414
|
+
const copyButton = /* @__PURE__ */ jsx42(
|
|
3251
3415
|
"button",
|
|
3252
3416
|
{
|
|
3253
3417
|
onClick: handleCopy,
|
|
3254
3418
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
3255
3419
|
"aria-label": "Copy code",
|
|
3256
|
-
children: copied ? /* @__PURE__ */
|
|
3420
|
+
children: copied ? /* @__PURE__ */ jsx42(Check6, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx42(Copy, { className: "w-3.5 h-3.5" })
|
|
3257
3421
|
}
|
|
3258
3422
|
);
|
|
3259
3423
|
return /* @__PURE__ */ jsxs23(
|
|
@@ -3264,25 +3428,25 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
3264
3428
|
className
|
|
3265
3429
|
),
|
|
3266
3430
|
children: [
|
|
3267
|
-
title && /* @__PURE__ */
|
|
3268
|
-
/* @__PURE__ */
|
|
3269
|
-
html ? /* @__PURE__ */
|
|
3431
|
+
title && /* @__PURE__ */ jsx42("div", { className: "!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg", children: /* @__PURE__ */ jsx42("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
3432
|
+
/* @__PURE__ */ jsx42("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
3433
|
+
html ? /* @__PURE__ */ jsx42(
|
|
3270
3434
|
"div",
|
|
3271
3435
|
{
|
|
3272
3436
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
3273
3437
|
dangerouslySetInnerHTML: { __html: html }
|
|
3274
3438
|
}
|
|
3275
|
-
) : /* @__PURE__ */
|
|
3439
|
+
) : /* @__PURE__ */ jsx42("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ jsx42("code", { children: code }) })
|
|
3276
3440
|
]
|
|
3277
3441
|
}
|
|
3278
3442
|
);
|
|
3279
3443
|
}
|
|
3280
3444
|
|
|
3281
3445
|
// src/components/window-frame/WindowFrame.tsx
|
|
3282
|
-
import * as
|
|
3446
|
+
import * as React43 from "react";
|
|
3283
3447
|
import { useState as useState4 } from "react";
|
|
3284
|
-
import { jsx as
|
|
3285
|
-
var WindowFrame =
|
|
3448
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3449
|
+
var WindowFrame = React43.forwardRef(
|
|
3286
3450
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
3287
3451
|
const [internalActive, setInternalActive] = useState4(tabs?.[0]?.id ?? "");
|
|
3288
3452
|
const currentTab = activeTab ?? internalActive;
|
|
@@ -3305,11 +3469,11 @@ var WindowFrame = React42.forwardRef(
|
|
|
3305
3469
|
children: [
|
|
3306
3470
|
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
3307
3471
|
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
3308
|
-
/* @__PURE__ */
|
|
3309
|
-
/* @__PURE__ */
|
|
3310
|
-
/* @__PURE__ */
|
|
3472
|
+
/* @__PURE__ */ jsx43("div", { className: "w-3 h-3 rounded-full bg-[#FF5F56]" }),
|
|
3473
|
+
/* @__PURE__ */ jsx43("div", { className: "w-3 h-3 rounded-full bg-[#FFBD2E]" }),
|
|
3474
|
+
/* @__PURE__ */ jsx43("div", { className: "w-3 h-3 rounded-full bg-[#27C93F]" })
|
|
3311
3475
|
] }),
|
|
3312
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */
|
|
3476
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ jsx43("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsx43(
|
|
3313
3477
|
"button",
|
|
3314
3478
|
{
|
|
3315
3479
|
type: "button",
|
|
@@ -3321,9 +3485,9 @@ var WindowFrame = React42.forwardRef(
|
|
|
3321
3485
|
children: tab.label
|
|
3322
3486
|
},
|
|
3323
3487
|
tab.id
|
|
3324
|
-
)) }) : /* @__PURE__ */
|
|
3488
|
+
)) }) : /* @__PURE__ */ jsx43("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
3325
3489
|
] }),
|
|
3326
|
-
/* @__PURE__ */
|
|
3490
|
+
/* @__PURE__ */ jsx43("div", { children })
|
|
3327
3491
|
]
|
|
3328
3492
|
}
|
|
3329
3493
|
);
|
|
@@ -3399,9 +3563,9 @@ export {
|
|
|
3399
3563
|
FieldTitle,
|
|
3400
3564
|
Grid,
|
|
3401
3565
|
HeroBlock,
|
|
3402
|
-
|
|
3566
|
+
Icon,
|
|
3403
3567
|
Input2 as Input,
|
|
3404
|
-
|
|
3568
|
+
Item2 as Item,
|
|
3405
3569
|
ItemActions,
|
|
3406
3570
|
ItemContent,
|
|
3407
3571
|
ItemDescription2 as ItemDescription,
|
|
@@ -3411,10 +3575,10 @@ export {
|
|
|
3411
3575
|
ItemMedia2 as ItemMedia,
|
|
3412
3576
|
ItemSeparator2 as ItemSeparator,
|
|
3413
3577
|
ItemTitle2 as ItemTitle,
|
|
3414
|
-
|
|
3578
|
+
Label,
|
|
3415
3579
|
LanguageSelect,
|
|
3416
|
-
|
|
3417
|
-
|
|
3580
|
+
Link,
|
|
3581
|
+
List,
|
|
3418
3582
|
ListHeader,
|
|
3419
3583
|
ListItem,
|
|
3420
3584
|
NavigationMenu,
|