@bergetai/ui 0.13.4 → 0.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +401 -248
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +370 -223
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +18 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -86,6 +86,12 @@ __export(src_exports, {
|
|
|
86
86
|
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger2,
|
|
87
87
|
DropdownMenuTrigger: () => DropdownMenuTrigger2,
|
|
88
88
|
EU_COUNTRY_CODES: () => EU_COUNTRY_CODES,
|
|
89
|
+
Empty: () => Empty2,
|
|
90
|
+
EmptyContent: () => EmptyContent,
|
|
91
|
+
EmptyDescription: () => EmptyDescription2,
|
|
92
|
+
EmptyHeader: () => EmptyHeader,
|
|
93
|
+
EmptyMedia: () => EmptyMedia2,
|
|
94
|
+
EmptyTitle: () => EmptyTitle2,
|
|
89
95
|
FOG_BRAND_PALETTE: () => FOG_BRAND_PALETTE,
|
|
90
96
|
FeatureList: () => FeatureList,
|
|
91
97
|
Field: () => Field,
|
|
@@ -3440,24 +3446,165 @@ var ItemSeparator2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
3440
3446
|
});
|
|
3441
3447
|
ItemSeparator2.displayName = "ItemSeparator";
|
|
3442
3448
|
|
|
3449
|
+
// src/components/empty/Empty.tsx
|
|
3450
|
+
var React19 = __toESM(require("react"), 1);
|
|
3451
|
+
|
|
3452
|
+
// src/primitives/empty.tsx
|
|
3453
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
3454
|
+
var import_cn14 = require("cn");
|
|
3455
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3456
|
+
function Empty({ className, ...props }) {
|
|
3457
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3458
|
+
"div",
|
|
3459
|
+
{
|
|
3460
|
+
"data-slot": "empty",
|
|
3461
|
+
className: (0, import_cn14.cn)(
|
|
3462
|
+
"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
|
|
3463
|
+
className
|
|
3464
|
+
),
|
|
3465
|
+
...props
|
|
3466
|
+
}
|
|
3467
|
+
);
|
|
3468
|
+
}
|
|
3469
|
+
function EmptyHeader({ className, ...props }) {
|
|
3470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3471
|
+
"div",
|
|
3472
|
+
{
|
|
3473
|
+
"data-slot": "empty-header",
|
|
3474
|
+
className: (0, import_cn14.cn)("flex max-w-sm flex-col items-center gap-2", className),
|
|
3475
|
+
...props
|
|
3476
|
+
}
|
|
3477
|
+
);
|
|
3478
|
+
}
|
|
3479
|
+
var emptyMediaVariants = (0, import_class_variance_authority11.cva)(
|
|
3480
|
+
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
3481
|
+
{
|
|
3482
|
+
variants: {
|
|
3483
|
+
variant: {
|
|
3484
|
+
default: "bg-transparent",
|
|
3485
|
+
icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
|
|
3486
|
+
}
|
|
3487
|
+
},
|
|
3488
|
+
defaultVariants: {
|
|
3489
|
+
variant: "default"
|
|
3490
|
+
}
|
|
3491
|
+
}
|
|
3492
|
+
);
|
|
3493
|
+
function EmptyMedia({
|
|
3494
|
+
className,
|
|
3495
|
+
variant = "default",
|
|
3496
|
+
...props
|
|
3497
|
+
}) {
|
|
3498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3499
|
+
"div",
|
|
3500
|
+
{
|
|
3501
|
+
"data-slot": "empty-icon",
|
|
3502
|
+
"data-variant": variant,
|
|
3503
|
+
className: (0, import_cn14.cn)(emptyMediaVariants({ variant, className })),
|
|
3504
|
+
...props
|
|
3505
|
+
}
|
|
3506
|
+
);
|
|
3507
|
+
}
|
|
3508
|
+
function EmptyTitle({ className, ...props }) {
|
|
3509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3510
|
+
"div",
|
|
3511
|
+
{
|
|
3512
|
+
"data-slot": "empty-title",
|
|
3513
|
+
className: (0, import_cn14.cn)(
|
|
3514
|
+
"text-sm font-medium tracking-tight",
|
|
3515
|
+
className
|
|
3516
|
+
),
|
|
3517
|
+
...props
|
|
3518
|
+
}
|
|
3519
|
+
);
|
|
3520
|
+
}
|
|
3521
|
+
function EmptyDescription({ className, ...props }) {
|
|
3522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3523
|
+
"div",
|
|
3524
|
+
{
|
|
3525
|
+
"data-slot": "empty-description",
|
|
3526
|
+
className: (0, import_cn14.cn)(
|
|
3527
|
+
"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
3528
|
+
className
|
|
3529
|
+
),
|
|
3530
|
+
...props
|
|
3531
|
+
}
|
|
3532
|
+
);
|
|
3533
|
+
}
|
|
3534
|
+
function EmptyContent({ className, ...props }) {
|
|
3535
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3536
|
+
"div",
|
|
3537
|
+
{
|
|
3538
|
+
"data-slot": "empty-content",
|
|
3539
|
+
className: (0, import_cn14.cn)(
|
|
3540
|
+
"flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
|
|
3541
|
+
className
|
|
3542
|
+
),
|
|
3543
|
+
...props
|
|
3544
|
+
}
|
|
3545
|
+
);
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
// src/components/empty/Empty.tsx
|
|
3549
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3550
|
+
function Empty2({ className, ...props }) {
|
|
3551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Empty, { className, ...props });
|
|
3552
|
+
}
|
|
3553
|
+
var EmptyMedia2 = React19.forwardRef(({ className, ...props }, ref) => {
|
|
3554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3555
|
+
EmptyMedia,
|
|
3556
|
+
{
|
|
3557
|
+
ref,
|
|
3558
|
+
className: cn(
|
|
3559
|
+
"data-[variant=icon]:bg-berget-empty-media-icon-bg data-[variant=icon]:text-berget-empty-media-icon-fg",
|
|
3560
|
+
className
|
|
3561
|
+
),
|
|
3562
|
+
...props
|
|
3563
|
+
}
|
|
3564
|
+
);
|
|
3565
|
+
});
|
|
3566
|
+
EmptyMedia2.displayName = "EmptyMedia";
|
|
3567
|
+
var EmptyTitle2 = React19.forwardRef(({ className, ...props }, ref) => {
|
|
3568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3569
|
+
EmptyTitle,
|
|
3570
|
+
{
|
|
3571
|
+
ref,
|
|
3572
|
+
className: cn("text-base text-berget-empty-title-fg", className),
|
|
3573
|
+
...props
|
|
3574
|
+
}
|
|
3575
|
+
);
|
|
3576
|
+
});
|
|
3577
|
+
EmptyTitle2.displayName = "EmptyTitle";
|
|
3578
|
+
var EmptyDescription2 = React19.forwardRef(({ className, ...props }, ref) => {
|
|
3579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3580
|
+
EmptyDescription,
|
|
3581
|
+
{
|
|
3582
|
+
ref,
|
|
3583
|
+
className: cn("text-berget-empty-description-fg", className),
|
|
3584
|
+
...props
|
|
3585
|
+
}
|
|
3586
|
+
);
|
|
3587
|
+
});
|
|
3588
|
+
EmptyDescription2.displayName = "EmptyDescription";
|
|
3589
|
+
|
|
3443
3590
|
// src/components/search-input/SearchInput.tsx
|
|
3444
3591
|
var import_lucide_react8 = require("lucide-react");
|
|
3445
|
-
var
|
|
3592
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3446
3593
|
var SearchInput = ({
|
|
3447
3594
|
type = "search",
|
|
3448
3595
|
placeholder = "Search...",
|
|
3449
3596
|
className,
|
|
3450
3597
|
ref,
|
|
3451
3598
|
...props
|
|
3452
|
-
}) => /* @__PURE__ */ (0,
|
|
3453
|
-
/* @__PURE__ */ (0,
|
|
3599
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative flex w-full items-center", "data-slot": "search-input", children: [
|
|
3600
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3454
3601
|
import_lucide_react8.Search,
|
|
3455
3602
|
{
|
|
3456
3603
|
"aria-hidden": "true",
|
|
3457
3604
|
className: "pointer-events-none absolute left-2.5 size-4 text-berget-muted-foreground"
|
|
3458
3605
|
}
|
|
3459
3606
|
),
|
|
3460
|
-
/* @__PURE__ */ (0,
|
|
3607
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3461
3608
|
Input,
|
|
3462
3609
|
{
|
|
3463
3610
|
ref,
|
|
@@ -3471,32 +3618,32 @@ var SearchInput = ({
|
|
|
3471
3618
|
SearchInput.displayName = "SearchInput";
|
|
3472
3619
|
|
|
3473
3620
|
// src/components/checkbox/Checkbox.tsx
|
|
3474
|
-
var
|
|
3621
|
+
var React20 = __toESM(require("react"), 1);
|
|
3475
3622
|
var import_checkbox2 = require("@base-ui/react/checkbox");
|
|
3476
3623
|
var import_lucide_react10 = require("lucide-react");
|
|
3477
|
-
var
|
|
3624
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
3478
3625
|
|
|
3479
3626
|
// src/primitives/checkbox.tsx
|
|
3480
3627
|
var import_checkbox = require("@base-ui/react/checkbox");
|
|
3481
|
-
var
|
|
3628
|
+
var import_cn15 = require("cn");
|
|
3482
3629
|
var import_lucide_react9 = require("lucide-react");
|
|
3483
|
-
var
|
|
3630
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3484
3631
|
function Checkbox({ className, ...props }) {
|
|
3485
|
-
return /* @__PURE__ */ (0,
|
|
3632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3486
3633
|
import_checkbox.Checkbox.Root,
|
|
3487
3634
|
{
|
|
3488
3635
|
"data-slot": "checkbox",
|
|
3489
|
-
className: (0,
|
|
3636
|
+
className: (0, import_cn15.cn)(
|
|
3490
3637
|
"peer relative flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
|
|
3491
3638
|
className
|
|
3492
3639
|
),
|
|
3493
3640
|
...props,
|
|
3494
|
-
children: /* @__PURE__ */ (0,
|
|
3641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3495
3642
|
import_checkbox.Checkbox.Indicator,
|
|
3496
3643
|
{
|
|
3497
3644
|
"data-slot": "checkbox-indicator",
|
|
3498
3645
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
3499
|
-
children: /* @__PURE__ */ (0,
|
|
3646
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3500
3647
|
import_lucide_react9.CheckIcon,
|
|
3501
3648
|
{}
|
|
3502
3649
|
)
|
|
@@ -3507,8 +3654,8 @@ function Checkbox({ className, ...props }) {
|
|
|
3507
3654
|
}
|
|
3508
3655
|
|
|
3509
3656
|
// src/components/checkbox/Checkbox.tsx
|
|
3510
|
-
var
|
|
3511
|
-
var checkboxVariants = (0,
|
|
3657
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3658
|
+
var checkboxVariants = (0, import_class_variance_authority12.cva)(
|
|
3512
3659
|
"inline-flex items-center justify-center rounded-berget-xs transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
3513
3660
|
{
|
|
3514
3661
|
variants: {
|
|
@@ -3529,7 +3676,7 @@ var checkboxVariants = (0, import_class_variance_authority11.cva)(
|
|
|
3529
3676
|
}
|
|
3530
3677
|
}
|
|
3531
3678
|
);
|
|
3532
|
-
var Checkbox2 =
|
|
3679
|
+
var Checkbox2 = React20.forwardRef(
|
|
3533
3680
|
({
|
|
3534
3681
|
"aria-label": ariaLabel,
|
|
3535
3682
|
className,
|
|
@@ -3542,11 +3689,11 @@ var Checkbox2 = React19.forwardRef(
|
|
|
3542
3689
|
disabled,
|
|
3543
3690
|
...props
|
|
3544
3691
|
}, ref) => {
|
|
3545
|
-
const generatedId =
|
|
3692
|
+
const generatedId = React20.useId();
|
|
3546
3693
|
const checkboxId = id || generatedId;
|
|
3547
3694
|
const errorId = `${checkboxId}-error`;
|
|
3548
|
-
return /* @__PURE__ */ (0,
|
|
3549
|
-
/* @__PURE__ */ (0,
|
|
3695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
3696
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3550
3697
|
Checkbox,
|
|
3551
3698
|
{
|
|
3552
3699
|
ref,
|
|
@@ -3562,7 +3709,7 @@ var Checkbox2 = React19.forwardRef(
|
|
|
3562
3709
|
className
|
|
3563
3710
|
),
|
|
3564
3711
|
...props,
|
|
3565
|
-
children: /* @__PURE__ */ (0,
|
|
3712
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_checkbox2.Checkbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3566
3713
|
import_lucide_react10.Check,
|
|
3567
3714
|
{
|
|
3568
3715
|
className: "h-4 w-4 text-current stroke-current",
|
|
@@ -3571,8 +3718,8 @@ var Checkbox2 = React19.forwardRef(
|
|
|
3571
3718
|
) })
|
|
3572
3719
|
}
|
|
3573
3720
|
) }),
|
|
3574
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
3575
|
-
label && /* @__PURE__ */ (0,
|
|
3721
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3722
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3576
3723
|
"label",
|
|
3577
3724
|
{
|
|
3578
3725
|
htmlFor: checkboxId,
|
|
@@ -3584,8 +3731,8 @@ var Checkbox2 = React19.forwardRef(
|
|
|
3584
3731
|
children: label
|
|
3585
3732
|
}
|
|
3586
3733
|
),
|
|
3587
|
-
description && /* @__PURE__ */ (0,
|
|
3588
|
-
error && /* @__PURE__ */ (0,
|
|
3734
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
3735
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
3589
3736
|
] })
|
|
3590
3737
|
] });
|
|
3591
3738
|
}
|
|
@@ -3593,11 +3740,11 @@ var Checkbox2 = React19.forwardRef(
|
|
|
3593
3740
|
Checkbox2.displayName = "Checkbox";
|
|
3594
3741
|
|
|
3595
3742
|
// src/components/switch/Switch.tsx
|
|
3596
|
-
var
|
|
3743
|
+
var React21 = __toESM(require("react"), 1);
|
|
3597
3744
|
var import_switch = require("@base-ui/react/switch");
|
|
3598
|
-
var
|
|
3599
|
-
var
|
|
3600
|
-
var switchRootVariants = (0,
|
|
3745
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
3746
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3747
|
+
var switchRootVariants = (0, import_class_variance_authority13.cva)(
|
|
3601
3748
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
3602
3749
|
{
|
|
3603
3750
|
variants: {
|
|
@@ -3618,7 +3765,7 @@ var switchRootVariants = (0, import_class_variance_authority12.cva)(
|
|
|
3618
3765
|
}
|
|
3619
3766
|
}
|
|
3620
3767
|
);
|
|
3621
|
-
var switchThumbVariants = (0,
|
|
3768
|
+
var switchThumbVariants = (0, import_class_variance_authority13.cva)(
|
|
3622
3769
|
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
3623
3770
|
{
|
|
3624
3771
|
variants: {
|
|
@@ -3633,7 +3780,7 @@ var switchThumbVariants = (0, import_class_variance_authority12.cva)(
|
|
|
3633
3780
|
}
|
|
3634
3781
|
}
|
|
3635
3782
|
);
|
|
3636
|
-
var Switch =
|
|
3783
|
+
var Switch = React21.forwardRef(
|
|
3637
3784
|
({
|
|
3638
3785
|
"aria-label": ariaLabel,
|
|
3639
3786
|
className,
|
|
@@ -3646,11 +3793,11 @@ var Switch = React20.forwardRef(
|
|
|
3646
3793
|
disabled,
|
|
3647
3794
|
...props
|
|
3648
3795
|
}, ref) => {
|
|
3649
|
-
const generatedId =
|
|
3796
|
+
const generatedId = React21.useId();
|
|
3650
3797
|
const switchId = id || generatedId;
|
|
3651
3798
|
const errorId = `${switchId}-error`;
|
|
3652
|
-
return /* @__PURE__ */ (0,
|
|
3653
|
-
/* @__PURE__ */ (0,
|
|
3799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
3800
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3654
3801
|
import_switch.Switch.Root,
|
|
3655
3802
|
{
|
|
3656
3803
|
ref,
|
|
@@ -3665,11 +3812,11 @@ var Switch = React20.forwardRef(
|
|
|
3665
3812
|
className
|
|
3666
3813
|
),
|
|
3667
3814
|
...props,
|
|
3668
|
-
children: /* @__PURE__ */ (0,
|
|
3815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_switch.Switch.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
3669
3816
|
}
|
|
3670
3817
|
),
|
|
3671
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
3672
|
-
label && /* @__PURE__ */ (0,
|
|
3818
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3819
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3673
3820
|
"label",
|
|
3674
3821
|
{
|
|
3675
3822
|
htmlFor: switchId,
|
|
@@ -3680,8 +3827,8 @@ var Switch = React20.forwardRef(
|
|
|
3680
3827
|
children: label
|
|
3681
3828
|
}
|
|
3682
3829
|
),
|
|
3683
|
-
description && /* @__PURE__ */ (0,
|
|
3684
|
-
error && /* @__PURE__ */ (0,
|
|
3830
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
3831
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
3685
3832
|
] })
|
|
3686
3833
|
] });
|
|
3687
3834
|
}
|
|
@@ -3690,26 +3837,26 @@ Switch.displayName = "Switch";
|
|
|
3690
3837
|
|
|
3691
3838
|
// src/primitives/select.tsx
|
|
3692
3839
|
var import_select = require("@base-ui/react/select");
|
|
3693
|
-
var
|
|
3840
|
+
var import_cn16 = require("cn");
|
|
3694
3841
|
var import_lucide_react11 = require("lucide-react");
|
|
3695
|
-
var
|
|
3842
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3696
3843
|
var Select = import_select.Select.Root;
|
|
3697
3844
|
function SelectGroup({ className, ...props }) {
|
|
3698
|
-
return /* @__PURE__ */ (0,
|
|
3845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3699
3846
|
import_select.Select.Group,
|
|
3700
3847
|
{
|
|
3701
3848
|
"data-slot": "select-group",
|
|
3702
|
-
className: (0,
|
|
3849
|
+
className: (0, import_cn16.cn)("scroll-my-1 p-1", className),
|
|
3703
3850
|
...props
|
|
3704
3851
|
}
|
|
3705
3852
|
);
|
|
3706
3853
|
}
|
|
3707
3854
|
function SelectValue({ className, ...props }) {
|
|
3708
|
-
return /* @__PURE__ */ (0,
|
|
3855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3709
3856
|
import_select.Select.Value,
|
|
3710
3857
|
{
|
|
3711
3858
|
"data-slot": "select-value",
|
|
3712
|
-
className: (0,
|
|
3859
|
+
className: (0, import_cn16.cn)("flex flex-1 text-left", className),
|
|
3713
3860
|
...props
|
|
3714
3861
|
}
|
|
3715
3862
|
);
|
|
@@ -3720,22 +3867,22 @@ function SelectTrigger({
|
|
|
3720
3867
|
children,
|
|
3721
3868
|
...props
|
|
3722
3869
|
}) {
|
|
3723
|
-
return /* @__PURE__ */ (0,
|
|
3870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3724
3871
|
import_select.Select.Trigger,
|
|
3725
3872
|
{
|
|
3726
3873
|
"data-slot": "select-trigger",
|
|
3727
3874
|
"data-size": size,
|
|
3728
|
-
className: (0,
|
|
3875
|
+
className: (0, import_cn16.cn)(
|
|
3729
3876
|
"flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-input/30 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3730
3877
|
className
|
|
3731
3878
|
),
|
|
3732
3879
|
...props,
|
|
3733
3880
|
children: [
|
|
3734
3881
|
children,
|
|
3735
|
-
/* @__PURE__ */ (0,
|
|
3882
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3736
3883
|
import_select.Select.Icon,
|
|
3737
3884
|
{
|
|
3738
|
-
render: /* @__PURE__ */ (0,
|
|
3885
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react11.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
3739
3886
|
}
|
|
3740
3887
|
)
|
|
3741
3888
|
]
|
|
@@ -3752,7 +3899,7 @@ function SelectContent({
|
|
|
3752
3899
|
alignItemWithTrigger = true,
|
|
3753
3900
|
...props
|
|
3754
3901
|
}) {
|
|
3755
|
-
return /* @__PURE__ */ (0,
|
|
3902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_select.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3756
3903
|
import_select.Select.Positioner,
|
|
3757
3904
|
{
|
|
3758
3905
|
side,
|
|
@@ -3761,17 +3908,17 @@ function SelectContent({
|
|
|
3761
3908
|
alignOffset,
|
|
3762
3909
|
alignItemWithTrigger,
|
|
3763
3910
|
className: "isolate z-50",
|
|
3764
|
-
children: /* @__PURE__ */ (0,
|
|
3911
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3765
3912
|
import_select.Select.Popup,
|
|
3766
3913
|
{
|
|
3767
3914
|
"data-slot": "select-content",
|
|
3768
3915
|
"data-align-trigger": alignItemWithTrigger,
|
|
3769
|
-
className: (0,
|
|
3916
|
+
className: (0, import_cn16.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
3770
3917
|
...props,
|
|
3771
3918
|
children: [
|
|
3772
|
-
/* @__PURE__ */ (0,
|
|
3773
|
-
/* @__PURE__ */ (0,
|
|
3774
|
-
/* @__PURE__ */ (0,
|
|
3919
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SelectScrollUpButton, {}),
|
|
3920
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_select.Select.List, { children }),
|
|
3921
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SelectScrollDownButton, {})
|
|
3775
3922
|
]
|
|
3776
3923
|
}
|
|
3777
3924
|
)
|
|
@@ -3782,11 +3929,11 @@ function SelectLabel({
|
|
|
3782
3929
|
className,
|
|
3783
3930
|
...props
|
|
3784
3931
|
}) {
|
|
3785
|
-
return /* @__PURE__ */ (0,
|
|
3932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3786
3933
|
import_select.Select.GroupLabel,
|
|
3787
3934
|
{
|
|
3788
3935
|
"data-slot": "select-label",
|
|
3789
|
-
className: (0,
|
|
3936
|
+
className: (0, import_cn16.cn)("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
3790
3937
|
...props
|
|
3791
3938
|
}
|
|
3792
3939
|
);
|
|
@@ -3796,22 +3943,22 @@ function SelectItem({
|
|
|
3796
3943
|
children,
|
|
3797
3944
|
...props
|
|
3798
3945
|
}) {
|
|
3799
|
-
return /* @__PURE__ */ (0,
|
|
3946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3800
3947
|
import_select.Select.Item,
|
|
3801
3948
|
{
|
|
3802
3949
|
"data-slot": "select-item",
|
|
3803
|
-
className: (0,
|
|
3950
|
+
className: (0, import_cn16.cn)(
|
|
3804
3951
|
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
3805
3952
|
className
|
|
3806
3953
|
),
|
|
3807
3954
|
...props,
|
|
3808
3955
|
children: [
|
|
3809
|
-
/* @__PURE__ */ (0,
|
|
3810
|
-
/* @__PURE__ */ (0,
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_select.Select.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
3957
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3811
3958
|
import_select.Select.ItemIndicator,
|
|
3812
3959
|
{
|
|
3813
|
-
render: /* @__PURE__ */ (0,
|
|
3814
|
-
children: /* @__PURE__ */ (0,
|
|
3960
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
3961
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react11.CheckIcon, { className: "pointer-events-none" })
|
|
3815
3962
|
}
|
|
3816
3963
|
)
|
|
3817
3964
|
]
|
|
@@ -3822,11 +3969,11 @@ function SelectSeparator({
|
|
|
3822
3969
|
className,
|
|
3823
3970
|
...props
|
|
3824
3971
|
}) {
|
|
3825
|
-
return /* @__PURE__ */ (0,
|
|
3972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3826
3973
|
import_select.Select.Separator,
|
|
3827
3974
|
{
|
|
3828
3975
|
"data-slot": "select-separator",
|
|
3829
|
-
className: (0,
|
|
3976
|
+
className: (0, import_cn16.cn)("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
3830
3977
|
...props
|
|
3831
3978
|
}
|
|
3832
3979
|
);
|
|
@@ -3835,16 +3982,16 @@ function SelectScrollUpButton({
|
|
|
3835
3982
|
className,
|
|
3836
3983
|
...props
|
|
3837
3984
|
}) {
|
|
3838
|
-
return /* @__PURE__ */ (0,
|
|
3985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3839
3986
|
import_select.Select.ScrollUpArrow,
|
|
3840
3987
|
{
|
|
3841
3988
|
"data-slot": "select-scroll-up-button",
|
|
3842
|
-
className: (0,
|
|
3989
|
+
className: (0, import_cn16.cn)(
|
|
3843
3990
|
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
3844
3991
|
className
|
|
3845
3992
|
),
|
|
3846
3993
|
...props,
|
|
3847
|
-
children: /* @__PURE__ */ (0,
|
|
3994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3848
3995
|
import_lucide_react11.ChevronUpIcon,
|
|
3849
3996
|
{}
|
|
3850
3997
|
)
|
|
@@ -3855,16 +4002,16 @@ function SelectScrollDownButton({
|
|
|
3855
4002
|
className,
|
|
3856
4003
|
...props
|
|
3857
4004
|
}) {
|
|
3858
|
-
return /* @__PURE__ */ (0,
|
|
4005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3859
4006
|
import_select.Select.ScrollDownArrow,
|
|
3860
4007
|
{
|
|
3861
4008
|
"data-slot": "select-scroll-down-button",
|
|
3862
|
-
className: (0,
|
|
4009
|
+
className: (0, import_cn16.cn)(
|
|
3863
4010
|
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
3864
4011
|
className
|
|
3865
4012
|
),
|
|
3866
4013
|
...props,
|
|
3867
|
-
children: /* @__PURE__ */ (0,
|
|
4014
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3868
4015
|
import_lucide_react11.ChevronDownIcon,
|
|
3869
4016
|
{}
|
|
3870
4017
|
)
|
|
@@ -3873,19 +4020,19 @@ function SelectScrollDownButton({
|
|
|
3873
4020
|
}
|
|
3874
4021
|
|
|
3875
4022
|
// src/components/country-select/CountrySelect.tsx
|
|
3876
|
-
var
|
|
4023
|
+
var React23 = __toESM(require("react"), 1);
|
|
3877
4024
|
var import_lucide_react14 = require("lucide-react");
|
|
3878
4025
|
|
|
3879
4026
|
// src/components/icon/Icon.tsx
|
|
3880
|
-
var
|
|
3881
|
-
var
|
|
4027
|
+
var React22 = __toESM(require("react"), 1);
|
|
4028
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3882
4029
|
var iconStrokeMap = {
|
|
3883
4030
|
12: 1.4,
|
|
3884
4031
|
16: 1.4,
|
|
3885
4032
|
24: 1.6,
|
|
3886
4033
|
32: 1.8
|
|
3887
4034
|
};
|
|
3888
|
-
var Icon =
|
|
4035
|
+
var Icon = React22.forwardRef(
|
|
3889
4036
|
({
|
|
3890
4037
|
icon: IconComponent,
|
|
3891
4038
|
size,
|
|
@@ -3897,7 +4044,7 @@ var Icon = React21.forwardRef(
|
|
|
3897
4044
|
const strokeWidth = iconStrokeMap[size];
|
|
3898
4045
|
const sizeClass = size === 12 ? "w-3 h-3" : size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
3899
4046
|
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
4047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3901
4048
|
IconComponent,
|
|
3902
4049
|
{
|
|
3903
4050
|
ref,
|
|
@@ -3913,13 +4060,13 @@ Icon.displayName = "Icon";
|
|
|
3913
4060
|
|
|
3914
4061
|
// src/primitives/popover.tsx
|
|
3915
4062
|
var import_popover = require("@base-ui/react/popover");
|
|
3916
|
-
var
|
|
3917
|
-
var
|
|
4063
|
+
var import_cn17 = require("cn");
|
|
4064
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3918
4065
|
function Popover({ ...props }) {
|
|
3919
|
-
return /* @__PURE__ */ (0,
|
|
4066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_popover.Popover.Root, { "data-slot": "popover", ...props });
|
|
3920
4067
|
}
|
|
3921
4068
|
function PopoverTrigger({ ...props }) {
|
|
3922
|
-
return /* @__PURE__ */ (0,
|
|
4069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_popover.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
3923
4070
|
}
|
|
3924
4071
|
function PopoverContent({
|
|
3925
4072
|
className,
|
|
@@ -3929,7 +4076,7 @@ function PopoverContent({
|
|
|
3929
4076
|
sideOffset = 4,
|
|
3930
4077
|
...props
|
|
3931
4078
|
}) {
|
|
3932
|
-
return /* @__PURE__ */ (0,
|
|
4079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_popover.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3933
4080
|
import_popover.Popover.Positioner,
|
|
3934
4081
|
{
|
|
3935
4082
|
align,
|
|
@@ -3937,11 +4084,11 @@ function PopoverContent({
|
|
|
3937
4084
|
side,
|
|
3938
4085
|
sideOffset,
|
|
3939
4086
|
className: "isolate z-50",
|
|
3940
|
-
children: /* @__PURE__ */ (0,
|
|
4087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3941
4088
|
import_popover.Popover.Popup,
|
|
3942
4089
|
{
|
|
3943
4090
|
"data-slot": "popover-content",
|
|
3944
|
-
className: (0,
|
|
4091
|
+
className: (0, import_cn17.cn)(
|
|
3945
4092
|
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
3946
4093
|
className
|
|
3947
4094
|
),
|
|
@@ -3954,27 +4101,27 @@ function PopoverContent({
|
|
|
3954
4101
|
|
|
3955
4102
|
// src/primitives/command.tsx
|
|
3956
4103
|
var import_cmdk = require("cmdk");
|
|
3957
|
-
var
|
|
4104
|
+
var import_cn21 = require("cn");
|
|
3958
4105
|
|
|
3959
4106
|
// src/primitives/dialog.tsx
|
|
3960
4107
|
var import_dialog3 = require("@base-ui/react/dialog");
|
|
3961
|
-
var
|
|
4108
|
+
var import_cn18 = require("cn");
|
|
3962
4109
|
var import_lucide_react12 = require("lucide-react");
|
|
3963
|
-
var
|
|
4110
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3964
4111
|
|
|
3965
4112
|
// src/primitives/input-group.tsx
|
|
3966
|
-
var
|
|
3967
|
-
var
|
|
4113
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
4114
|
+
var import_cn20 = require("cn");
|
|
3968
4115
|
|
|
3969
4116
|
// src/primitives/textarea.tsx
|
|
3970
|
-
var
|
|
3971
|
-
var
|
|
4117
|
+
var import_cn19 = require("cn");
|
|
4118
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3972
4119
|
function Textarea({ className, ...props }) {
|
|
3973
|
-
return /* @__PURE__ */ (0,
|
|
4120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3974
4121
|
"textarea",
|
|
3975
4122
|
{
|
|
3976
4123
|
"data-slot": "textarea",
|
|
3977
|
-
className: (0,
|
|
4124
|
+
className: (0, import_cn19.cn)(
|
|
3978
4125
|
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
3979
4126
|
className
|
|
3980
4127
|
),
|
|
@@ -3984,14 +4131,14 @@ function Textarea({ className, ...props }) {
|
|
|
3984
4131
|
}
|
|
3985
4132
|
|
|
3986
4133
|
// src/primitives/input-group.tsx
|
|
3987
|
-
var
|
|
4134
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3988
4135
|
function InputGroup({ className, ...props }) {
|
|
3989
|
-
return /* @__PURE__ */ (0,
|
|
4136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3990
4137
|
"div",
|
|
3991
4138
|
{
|
|
3992
4139
|
"data-slot": "input-group",
|
|
3993
4140
|
role: "group",
|
|
3994
|
-
className: (0,
|
|
4141
|
+
className: (0, import_cn20.cn)(
|
|
3995
4142
|
"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
3996
4143
|
className
|
|
3997
4144
|
),
|
|
@@ -3999,7 +4146,7 @@ function InputGroup({ className, ...props }) {
|
|
|
3999
4146
|
}
|
|
4000
4147
|
);
|
|
4001
4148
|
}
|
|
4002
|
-
var inputGroupAddonVariants = (0,
|
|
4149
|
+
var inputGroupAddonVariants = (0, import_class_variance_authority14.cva)(
|
|
4003
4150
|
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
4004
4151
|
{
|
|
4005
4152
|
variants: {
|
|
@@ -4020,13 +4167,13 @@ function InputGroupAddon({
|
|
|
4020
4167
|
align = "inline-start",
|
|
4021
4168
|
...props
|
|
4022
4169
|
}) {
|
|
4023
|
-
return /* @__PURE__ */ (0,
|
|
4170
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4024
4171
|
"div",
|
|
4025
4172
|
{
|
|
4026
4173
|
role: "group",
|
|
4027
4174
|
"data-slot": "input-group-addon",
|
|
4028
4175
|
"data-align": align,
|
|
4029
|
-
className: (0,
|
|
4176
|
+
className: (0, import_cn20.cn)(inputGroupAddonVariants({ align }), className),
|
|
4030
4177
|
onClick: (e) => {
|
|
4031
4178
|
if (e.target.closest("button")) {
|
|
4032
4179
|
return;
|
|
@@ -4037,7 +4184,7 @@ function InputGroupAddon({
|
|
|
4037
4184
|
}
|
|
4038
4185
|
);
|
|
4039
4186
|
}
|
|
4040
|
-
var inputGroupButtonVariants = (0,
|
|
4187
|
+
var inputGroupButtonVariants = (0, import_class_variance_authority14.cva)(
|
|
4041
4188
|
"flex items-center gap-2 text-sm shadow-none",
|
|
4042
4189
|
{
|
|
4043
4190
|
variants: {
|
|
@@ -4056,16 +4203,16 @@ var inputGroupButtonVariants = (0, import_class_variance_authority13.cva)(
|
|
|
4056
4203
|
|
|
4057
4204
|
// src/primitives/command.tsx
|
|
4058
4205
|
var import_lucide_react13 = require("lucide-react");
|
|
4059
|
-
var
|
|
4206
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4060
4207
|
function Command({
|
|
4061
4208
|
className,
|
|
4062
4209
|
...props
|
|
4063
4210
|
}) {
|
|
4064
|
-
return /* @__PURE__ */ (0,
|
|
4211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4065
4212
|
import_cmdk.Command,
|
|
4066
4213
|
{
|
|
4067
4214
|
"data-slot": "command",
|
|
4068
|
-
className: (0,
|
|
4215
|
+
className: (0, import_cn21.cn)(
|
|
4069
4216
|
"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
|
|
4070
4217
|
className
|
|
4071
4218
|
),
|
|
@@ -4077,30 +4224,30 @@ function CommandInput({
|
|
|
4077
4224
|
className,
|
|
4078
4225
|
...props
|
|
4079
4226
|
}) {
|
|
4080
|
-
return /* @__PURE__ */ (0,
|
|
4081
|
-
/* @__PURE__ */ (0,
|
|
4227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(InputGroup, { className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [
|
|
4228
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4082
4229
|
import_cmdk.Command.Input,
|
|
4083
4230
|
{
|
|
4084
4231
|
"data-slot": "command-input",
|
|
4085
|
-
className: (0,
|
|
4232
|
+
className: (0, import_cn21.cn)(
|
|
4086
4233
|
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
4087
4234
|
className
|
|
4088
4235
|
),
|
|
4089
4236
|
...props
|
|
4090
4237
|
}
|
|
4091
4238
|
),
|
|
4092
|
-
/* @__PURE__ */ (0,
|
|
4239
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(InputGroupAddon, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react13.SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })
|
|
4093
4240
|
] }) });
|
|
4094
4241
|
}
|
|
4095
4242
|
function CommandList({
|
|
4096
4243
|
className,
|
|
4097
4244
|
...props
|
|
4098
4245
|
}) {
|
|
4099
|
-
return /* @__PURE__ */ (0,
|
|
4246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4100
4247
|
import_cmdk.Command.List,
|
|
4101
4248
|
{
|
|
4102
4249
|
"data-slot": "command-list",
|
|
4103
|
-
className: (0,
|
|
4250
|
+
className: (0, import_cn21.cn)(
|
|
4104
4251
|
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
4105
4252
|
className
|
|
4106
4253
|
),
|
|
@@ -4112,11 +4259,11 @@ function CommandEmpty({
|
|
|
4112
4259
|
className,
|
|
4113
4260
|
...props
|
|
4114
4261
|
}) {
|
|
4115
|
-
return /* @__PURE__ */ (0,
|
|
4262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4116
4263
|
import_cmdk.Command.Empty,
|
|
4117
4264
|
{
|
|
4118
4265
|
"data-slot": "command-empty",
|
|
4119
|
-
className: (0,
|
|
4266
|
+
className: (0, import_cn21.cn)("py-6 text-center text-sm", className),
|
|
4120
4267
|
...props
|
|
4121
4268
|
}
|
|
4122
4269
|
);
|
|
@@ -4125,11 +4272,11 @@ function CommandGroup({
|
|
|
4125
4272
|
className,
|
|
4126
4273
|
...props
|
|
4127
4274
|
}) {
|
|
4128
|
-
return /* @__PURE__ */ (0,
|
|
4275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4129
4276
|
import_cmdk.Command.Group,
|
|
4130
4277
|
{
|
|
4131
4278
|
"data-slot": "command-group",
|
|
4132
|
-
className: (0,
|
|
4279
|
+
className: (0, import_cn21.cn)(
|
|
4133
4280
|
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
4134
4281
|
className
|
|
4135
4282
|
),
|
|
@@ -4142,18 +4289,18 @@ function CommandItem({
|
|
|
4142
4289
|
children,
|
|
4143
4290
|
...props
|
|
4144
4291
|
}) {
|
|
4145
|
-
return /* @__PURE__ */ (0,
|
|
4292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
4146
4293
|
import_cmdk.Command.Item,
|
|
4147
4294
|
{
|
|
4148
4295
|
"data-slot": "command-item",
|
|
4149
|
-
className: (0,
|
|
4296
|
+
className: (0, import_cn21.cn)(
|
|
4150
4297
|
"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
4151
4298
|
className
|
|
4152
4299
|
),
|
|
4153
4300
|
...props,
|
|
4154
4301
|
children: [
|
|
4155
4302
|
children,
|
|
4156
|
-
/* @__PURE__ */ (0,
|
|
4303
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react13.CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
4157
4304
|
]
|
|
4158
4305
|
}
|
|
4159
4306
|
);
|
|
@@ -4301,8 +4448,8 @@ var isEUCountry = (countryCode) => {
|
|
|
4301
4448
|
};
|
|
4302
4449
|
|
|
4303
4450
|
// src/components/country-select/CountrySelect.tsx
|
|
4304
|
-
var
|
|
4305
|
-
var CountrySelect =
|
|
4451
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4452
|
+
var CountrySelect = React23.forwardRef(
|
|
4306
4453
|
({
|
|
4307
4454
|
value,
|
|
4308
4455
|
onValueChange,
|
|
@@ -4312,14 +4459,14 @@ var CountrySelect = React22.forwardRef(
|
|
|
4312
4459
|
align = "center",
|
|
4313
4460
|
sideOffset = 4
|
|
4314
4461
|
}, ref) => {
|
|
4315
|
-
const [open, setOpen] =
|
|
4316
|
-
const selectedCountry =
|
|
4317
|
-
return /* @__PURE__ */ (0,
|
|
4318
|
-
/* @__PURE__ */ (0,
|
|
4462
|
+
const [open, setOpen] = React23.useState(false);
|
|
4463
|
+
const selectedCountry = React23.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);
|
|
4464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
4465
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4319
4466
|
PopoverTrigger,
|
|
4320
4467
|
{
|
|
4321
4468
|
ref,
|
|
4322
|
-
render: /* @__PURE__ */ (0,
|
|
4469
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4323
4470
|
"button",
|
|
4324
4471
|
{
|
|
4325
4472
|
type: "button",
|
|
@@ -4341,16 +4488,16 @@ var CountrySelect = React22.forwardRef(
|
|
|
4341
4488
|
}
|
|
4342
4489
|
),
|
|
4343
4490
|
children: [
|
|
4344
|
-
/* @__PURE__ */ (0,
|
|
4345
|
-
/* @__PURE__ */ (0,
|
|
4346
|
-
/* @__PURE__ */ (0,
|
|
4347
|
-
/* @__PURE__ */ (0,
|
|
4491
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
4492
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xl flex-shrink-0", children: selectedCountry.flag }),
|
|
4493
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "truncate", children: selectedCountry.name }),
|
|
4494
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "text-berget-muted-foreground text-xs flex-shrink-0", children: [
|
|
4348
4495
|
"(",
|
|
4349
4496
|
selectedCountry.code,
|
|
4350
4497
|
")"
|
|
4351
4498
|
] })
|
|
4352
|
-
] }) : /* @__PURE__ */ (0,
|
|
4353
|
-
/* @__PURE__ */ (0,
|
|
4499
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
4500
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4354
4501
|
Icon,
|
|
4355
4502
|
{
|
|
4356
4503
|
icon: import_lucide_react14.Globe,
|
|
@@ -4358,9 +4505,9 @@ var CountrySelect = React22.forwardRef(
|
|
|
4358
4505
|
className: "flex-shrink-0 text-berget-muted-foreground"
|
|
4359
4506
|
}
|
|
4360
4507
|
),
|
|
4361
|
-
/* @__PURE__ */ (0,
|
|
4508
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-berget-muted-foreground truncate", children: placeholder })
|
|
4362
4509
|
] }) }),
|
|
4363
|
-
/* @__PURE__ */ (0,
|
|
4510
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4364
4511
|
Icon,
|
|
4365
4512
|
{
|
|
4366
4513
|
icon: import_lucide_react14.ChevronDown,
|
|
@@ -4375,17 +4522,17 @@ var CountrySelect = React22.forwardRef(
|
|
|
4375
4522
|
]
|
|
4376
4523
|
}
|
|
4377
4524
|
),
|
|
4378
|
-
/* @__PURE__ */ (0,
|
|
4525
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4379
4526
|
PopoverContent,
|
|
4380
4527
|
{
|
|
4381
4528
|
align,
|
|
4382
4529
|
sideOffset,
|
|
4383
4530
|
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
4384
|
-
children: /* @__PURE__ */ (0,
|
|
4385
|
-
/* @__PURE__ */ (0,
|
|
4386
|
-
/* @__PURE__ */ (0,
|
|
4387
|
-
/* @__PURE__ */ (0,
|
|
4388
|
-
/* @__PURE__ */ (0,
|
|
4531
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Command, { children: [
|
|
4532
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CommandInput, { placeholder: "Search country..." }),
|
|
4533
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(CommandList, { children: [
|
|
4534
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CommandEmpty, { children: "No countries found." }),
|
|
4535
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CommandGroup, { children: COUNTRIES.map((country) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4389
4536
|
CommandItem,
|
|
4390
4537
|
{
|
|
4391
4538
|
value: `${country.name} ${country.code}`,
|
|
@@ -4399,12 +4546,12 @@ var CountrySelect = React22.forwardRef(
|
|
|
4399
4546
|
value === country.code && "bg-berget-brand-granite-800/40"
|
|
4400
4547
|
),
|
|
4401
4548
|
children: [
|
|
4402
|
-
/* @__PURE__ */ (0,
|
|
4403
|
-
/* @__PURE__ */ (0,
|
|
4404
|
-
/* @__PURE__ */ (0,
|
|
4405
|
-
/* @__PURE__ */ (0,
|
|
4549
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xl flex-shrink-0", children: country.flag }),
|
|
4550
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
4551
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-sm truncate", children: country.name }),
|
|
4552
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-xs text-berget-muted-foreground", children: country.code })
|
|
4406
4553
|
] }),
|
|
4407
|
-
value === country.code && /* @__PURE__ */ (0,
|
|
4554
|
+
value === country.code && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0" })
|
|
4408
4555
|
]
|
|
4409
4556
|
},
|
|
4410
4557
|
country.code
|
|
@@ -4419,14 +4566,14 @@ var CountrySelect = React22.forwardRef(
|
|
|
4419
4566
|
CountrySelect.displayName = "CountrySelect";
|
|
4420
4567
|
|
|
4421
4568
|
// src/primitives/label.tsx
|
|
4422
|
-
var
|
|
4423
|
-
var
|
|
4569
|
+
var import_cn22 = require("cn");
|
|
4570
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
4424
4571
|
function Label({ className, ...props }) {
|
|
4425
|
-
return /* @__PURE__ */ (0,
|
|
4572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4426
4573
|
"label",
|
|
4427
4574
|
{
|
|
4428
4575
|
"data-slot": "label",
|
|
4429
|
-
className: (0,
|
|
4576
|
+
className: (0, import_cn22.cn)(
|
|
4430
4577
|
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
4431
4578
|
className
|
|
4432
4579
|
),
|
|
@@ -4437,15 +4584,15 @@ function Label({ className, ...props }) {
|
|
|
4437
4584
|
|
|
4438
4585
|
// src/primitives/field.tsx
|
|
4439
4586
|
var import_react = require("react");
|
|
4440
|
-
var
|
|
4441
|
-
var
|
|
4442
|
-
var
|
|
4587
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
4588
|
+
var import_cn23 = require("cn");
|
|
4589
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
4443
4590
|
function FieldSet({ className, ...props }) {
|
|
4444
|
-
return /* @__PURE__ */ (0,
|
|
4591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4445
4592
|
"fieldset",
|
|
4446
4593
|
{
|
|
4447
4594
|
"data-slot": "field-set",
|
|
4448
|
-
className: (0,
|
|
4595
|
+
className: (0, import_cn23.cn)(
|
|
4449
4596
|
"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
4450
4597
|
className
|
|
4451
4598
|
),
|
|
@@ -4458,12 +4605,12 @@ function FieldLegend({
|
|
|
4458
4605
|
variant = "legend",
|
|
4459
4606
|
...props
|
|
4460
4607
|
}) {
|
|
4461
|
-
return /* @__PURE__ */ (0,
|
|
4608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4462
4609
|
"legend",
|
|
4463
4610
|
{
|
|
4464
4611
|
"data-slot": "field-legend",
|
|
4465
4612
|
"data-variant": variant,
|
|
4466
|
-
className: (0,
|
|
4613
|
+
className: (0, import_cn23.cn)(
|
|
4467
4614
|
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
4468
4615
|
className
|
|
4469
4616
|
),
|
|
@@ -4472,11 +4619,11 @@ function FieldLegend({
|
|
|
4472
4619
|
);
|
|
4473
4620
|
}
|
|
4474
4621
|
function FieldGroup({ className, ...props }) {
|
|
4475
|
-
return /* @__PURE__ */ (0,
|
|
4622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4476
4623
|
"div",
|
|
4477
4624
|
{
|
|
4478
4625
|
"data-slot": "field-group",
|
|
4479
|
-
className: (0,
|
|
4626
|
+
className: (0, import_cn23.cn)(
|
|
4480
4627
|
"group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
|
|
4481
4628
|
className
|
|
4482
4629
|
),
|
|
@@ -4484,7 +4631,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
4484
4631
|
}
|
|
4485
4632
|
);
|
|
4486
4633
|
}
|
|
4487
|
-
var fieldVariants = (0,
|
|
4634
|
+
var fieldVariants = (0, import_class_variance_authority15.cva)(
|
|
4488
4635
|
"group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
|
|
4489
4636
|
{
|
|
4490
4637
|
variants: {
|
|
@@ -4504,23 +4651,23 @@ function Field({
|
|
|
4504
4651
|
orientation = "vertical",
|
|
4505
4652
|
...props
|
|
4506
4653
|
}) {
|
|
4507
|
-
return /* @__PURE__ */ (0,
|
|
4654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4508
4655
|
"div",
|
|
4509
4656
|
{
|
|
4510
4657
|
role: "group",
|
|
4511
4658
|
"data-slot": "field",
|
|
4512
4659
|
"data-orientation": orientation,
|
|
4513
|
-
className: (0,
|
|
4660
|
+
className: (0, import_cn23.cn)(fieldVariants({ orientation }), className),
|
|
4514
4661
|
...props
|
|
4515
4662
|
}
|
|
4516
4663
|
);
|
|
4517
4664
|
}
|
|
4518
4665
|
function FieldContent({ className, ...props }) {
|
|
4519
|
-
return /* @__PURE__ */ (0,
|
|
4666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4520
4667
|
"div",
|
|
4521
4668
|
{
|
|
4522
4669
|
"data-slot": "field-content",
|
|
4523
|
-
className: (0,
|
|
4670
|
+
className: (0, import_cn23.cn)(
|
|
4524
4671
|
"group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
|
|
4525
4672
|
className
|
|
4526
4673
|
),
|
|
@@ -4532,11 +4679,11 @@ function FieldLabel({
|
|
|
4532
4679
|
className,
|
|
4533
4680
|
...props
|
|
4534
4681
|
}) {
|
|
4535
|
-
return /* @__PURE__ */ (0,
|
|
4682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4536
4683
|
Label,
|
|
4537
4684
|
{
|
|
4538
4685
|
"data-slot": "field-label",
|
|
4539
|
-
className: (0,
|
|
4686
|
+
className: (0, import_cn23.cn)(
|
|
4540
4687
|
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
|
|
4541
4688
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
4542
4689
|
className
|
|
@@ -4546,11 +4693,11 @@ function FieldLabel({
|
|
|
4546
4693
|
);
|
|
4547
4694
|
}
|
|
4548
4695
|
function FieldTitle({ className, ...props }) {
|
|
4549
|
-
return /* @__PURE__ */ (0,
|
|
4696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4550
4697
|
"div",
|
|
4551
4698
|
{
|
|
4552
4699
|
"data-slot": "field-label",
|
|
4553
|
-
className: (0,
|
|
4700
|
+
className: (0, import_cn23.cn)(
|
|
4554
4701
|
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
4555
4702
|
className
|
|
4556
4703
|
),
|
|
@@ -4559,11 +4706,11 @@ function FieldTitle({ className, ...props }) {
|
|
|
4559
4706
|
);
|
|
4560
4707
|
}
|
|
4561
4708
|
function FieldDescription({ className, ...props }) {
|
|
4562
|
-
return /* @__PURE__ */ (0,
|
|
4709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4563
4710
|
"p",
|
|
4564
4711
|
{
|
|
4565
4712
|
"data-slot": "field-description",
|
|
4566
|
-
className: (0,
|
|
4713
|
+
className: (0, import_cn23.cn)(
|
|
4567
4714
|
"text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
4568
4715
|
"last:mt-0 nth-last-2:-mt-1",
|
|
4569
4716
|
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
@@ -4578,19 +4725,19 @@ function FieldSeparator({
|
|
|
4578
4725
|
className,
|
|
4579
4726
|
...props
|
|
4580
4727
|
}) {
|
|
4581
|
-
return /* @__PURE__ */ (0,
|
|
4728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
4582
4729
|
"div",
|
|
4583
4730
|
{
|
|
4584
4731
|
"data-slot": "field-separator",
|
|
4585
4732
|
"data-content": !!children,
|
|
4586
|
-
className: (0,
|
|
4733
|
+
className: (0, import_cn23.cn)(
|
|
4587
4734
|
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
4588
4735
|
className
|
|
4589
4736
|
),
|
|
4590
4737
|
...props,
|
|
4591
4738
|
children: [
|
|
4592
|
-
/* @__PURE__ */ (0,
|
|
4593
|
-
children && /* @__PURE__ */ (0,
|
|
4739
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
4740
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4594
4741
|
"span",
|
|
4595
4742
|
{
|
|
4596
4743
|
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
@@ -4621,19 +4768,19 @@ function FieldError({
|
|
|
4621
4768
|
if (uniqueErrors?.length == 1) {
|
|
4622
4769
|
return uniqueErrors[0]?.message;
|
|
4623
4770
|
}
|
|
4624
|
-
return /* @__PURE__ */ (0,
|
|
4625
|
-
(error, index) => error?.message && /* @__PURE__ */ (0,
|
|
4771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
4772
|
+
(error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("li", { children: error.message }, index)
|
|
4626
4773
|
) });
|
|
4627
4774
|
}, [children, errors]);
|
|
4628
4775
|
if (!content) {
|
|
4629
4776
|
return null;
|
|
4630
4777
|
}
|
|
4631
|
-
return /* @__PURE__ */ (0,
|
|
4778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
4632
4779
|
"div",
|
|
4633
4780
|
{
|
|
4634
4781
|
role: "alert",
|
|
4635
4782
|
"data-slot": "field-error",
|
|
4636
|
-
className: (0,
|
|
4783
|
+
className: (0, import_cn23.cn)("text-sm font-normal text-destructive", className),
|
|
4637
4784
|
...props,
|
|
4638
4785
|
children: content
|
|
4639
4786
|
}
|
|
@@ -4641,11 +4788,11 @@ function FieldError({
|
|
|
4641
4788
|
}
|
|
4642
4789
|
|
|
4643
4790
|
// src/components/link/Link.tsx
|
|
4644
|
-
var
|
|
4645
|
-
var
|
|
4791
|
+
var React24 = __toESM(require("react"), 1);
|
|
4792
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
4646
4793
|
var import_lucide_react15 = require("lucide-react");
|
|
4647
|
-
var
|
|
4648
|
-
var linkVariants = (0,
|
|
4794
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
4795
|
+
var linkVariants = (0, import_class_variance_authority16.cva)(
|
|
4649
4796
|
"inline-flex cursor-pointer items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
|
|
4650
4797
|
{
|
|
4651
4798
|
variants: {
|
|
@@ -4669,7 +4816,7 @@ var linkVariants = (0, import_class_variance_authority15.cva)(
|
|
|
4669
4816
|
}
|
|
4670
4817
|
}
|
|
4671
4818
|
);
|
|
4672
|
-
var Link =
|
|
4819
|
+
var Link = React24.forwardRef(
|
|
4673
4820
|
({
|
|
4674
4821
|
className,
|
|
4675
4822
|
variant,
|
|
@@ -4682,7 +4829,7 @@ var Link = React23.forwardRef(
|
|
|
4682
4829
|
...props
|
|
4683
4830
|
}, ref) => {
|
|
4684
4831
|
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
4685
|
-
return /* @__PURE__ */ (0,
|
|
4832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
4686
4833
|
"a",
|
|
4687
4834
|
{
|
|
4688
4835
|
ref,
|
|
@@ -4698,8 +4845,8 @@ var Link = React23.forwardRef(
|
|
|
4698
4845
|
},
|
|
4699
4846
|
children: [
|
|
4700
4847
|
children,
|
|
4701
|
-
icon && /* @__PURE__ */ (0,
|
|
4702
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0,
|
|
4848
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "inline-flex items-center", children: icon }),
|
|
4849
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon, { icon: import_lucide_react15.ExternalLink, size: 16 }) })
|
|
4703
4850
|
]
|
|
4704
4851
|
}
|
|
4705
4852
|
);
|
|
@@ -4708,11 +4855,11 @@ var Link = React23.forwardRef(
|
|
|
4708
4855
|
Link.displayName = "Link";
|
|
4709
4856
|
|
|
4710
4857
|
// src/components/container/Container.tsx
|
|
4711
|
-
var
|
|
4858
|
+
var React25 = __toESM(require("react"), 1);
|
|
4712
4859
|
var import_merge_props3 = require("@base-ui/react/merge-props");
|
|
4713
4860
|
var import_use_render3 = require("@base-ui/react/use-render");
|
|
4714
|
-
var
|
|
4715
|
-
var containerVariants = (0,
|
|
4861
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
4862
|
+
var containerVariants = (0, import_class_variance_authority17.cva)("w-full mx-auto", {
|
|
4716
4863
|
variants: {
|
|
4717
4864
|
size: {
|
|
4718
4865
|
sm: "max-w-3xl",
|
|
@@ -4733,7 +4880,7 @@ var containerVariants = (0, import_class_variance_authority16.cva)("w-full mx-au
|
|
|
4733
4880
|
padding: "md"
|
|
4734
4881
|
}
|
|
4735
4882
|
});
|
|
4736
|
-
var Container =
|
|
4883
|
+
var Container = React25.forwardRef(
|
|
4737
4884
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
4738
4885
|
return (0, import_use_render3.useRender)({
|
|
4739
4886
|
ref,
|
|
@@ -4752,11 +4899,11 @@ var Container = React24.forwardRef(
|
|
|
4752
4899
|
Container.displayName = "Container";
|
|
4753
4900
|
|
|
4754
4901
|
// src/components/grid/Grid.tsx
|
|
4755
|
-
var
|
|
4756
|
-
var
|
|
4902
|
+
var React26 = __toESM(require("react"), 1);
|
|
4903
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
4757
4904
|
var import_merge_props4 = require("@base-ui/react/merge-props");
|
|
4758
4905
|
var import_use_render4 = require("@base-ui/react/use-render");
|
|
4759
|
-
var gridVariants = (0,
|
|
4906
|
+
var gridVariants = (0, import_class_variance_authority18.cva)("grid", {
|
|
4760
4907
|
variants: {
|
|
4761
4908
|
align: {
|
|
4762
4909
|
start: "items-start",
|
|
@@ -4778,7 +4925,7 @@ var gridVariants = (0, import_class_variance_authority17.cva)("grid", {
|
|
|
4778
4925
|
justify: "start"
|
|
4779
4926
|
}
|
|
4780
4927
|
});
|
|
4781
|
-
var Grid =
|
|
4928
|
+
var Grid = React26.forwardRef(
|
|
4782
4929
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
4783
4930
|
return (0, import_use_render4.useRender)({
|
|
4784
4931
|
ref,
|
|
@@ -4805,11 +4952,11 @@ var Grid = React25.forwardRef(
|
|
|
4805
4952
|
Grid.displayName = "Grid";
|
|
4806
4953
|
|
|
4807
4954
|
// src/components/box/Box.tsx
|
|
4808
|
-
var
|
|
4809
|
-
var
|
|
4955
|
+
var React27 = __toESM(require("react"), 1);
|
|
4956
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
4810
4957
|
var import_merge_props5 = require("@base-ui/react/merge-props");
|
|
4811
4958
|
var import_use_render5 = require("@base-ui/react/use-render");
|
|
4812
|
-
var boxVariants = (0,
|
|
4959
|
+
var boxVariants = (0, import_class_variance_authority19.cva)("flex", {
|
|
4813
4960
|
variants: {
|
|
4814
4961
|
direction: {
|
|
4815
4962
|
row: "flex-row",
|
|
@@ -4845,7 +4992,7 @@ var boxVariants = (0, import_class_variance_authority18.cva)("flex", {
|
|
|
4845
4992
|
wrap: "nowrap"
|
|
4846
4993
|
}
|
|
4847
4994
|
});
|
|
4848
|
-
var Box =
|
|
4995
|
+
var Box = React27.forwardRef(
|
|
4849
4996
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
4850
4997
|
return (0, import_use_render5.useRender)({
|
|
4851
4998
|
ref,
|
|
@@ -4868,22 +5015,22 @@ var Box = React26.forwardRef(
|
|
|
4868
5015
|
Box.displayName = "Box";
|
|
4869
5016
|
|
|
4870
5017
|
// src/components/language-select/LanguageSelect.tsx
|
|
4871
|
-
var
|
|
5018
|
+
var React28 = __toESM(require("react"), 1);
|
|
4872
5019
|
var import_lucide_react16 = require("lucide-react");
|
|
4873
|
-
var
|
|
4874
|
-
var LanguageSelect =
|
|
5020
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
5021
|
+
var LanguageSelect = React28.forwardRef(
|
|
4875
5022
|
({ className, options, value, onValueChange }, ref) => {
|
|
4876
|
-
return /* @__PURE__ */ (0,
|
|
4877
|
-
/* @__PURE__ */ (0,
|
|
4878
|
-
/* @__PURE__ */ (0,
|
|
4879
|
-
/* @__PURE__ */ (0,
|
|
5023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(DropdownMenu, { children: [
|
|
5024
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuTrigger2, { ref, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Button2, { variant: "outline", size: "icon", className, "aria-label": "Select language", children: [
|
|
5025
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "sr-only", children: "Select language" }),
|
|
5026
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { icon: import_lucide_react16.Globe, size: 16, "aria-hidden": true })
|
|
4880
5027
|
] }) }),
|
|
4881
|
-
/* @__PURE__ */ (0,
|
|
5028
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuContent2, { align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4882
5029
|
DropdownMenuRadioGroup,
|
|
4883
5030
|
{
|
|
4884
5031
|
value,
|
|
4885
5032
|
onValueChange: onValueChange ? (v) => onValueChange(v) : void 0,
|
|
4886
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
5033
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4887
5034
|
DropdownMenuRadioItem2,
|
|
4888
5035
|
{
|
|
4889
5036
|
value: option.value,
|
|
@@ -4901,13 +5048,13 @@ var LanguageSelect = React27.forwardRef(
|
|
|
4901
5048
|
LanguageSelect.displayName = "LanguageSelect";
|
|
4902
5049
|
|
|
4903
5050
|
// src/components/list/List.tsx
|
|
4904
|
-
var
|
|
5051
|
+
var React30 = __toESM(require("react"), 1);
|
|
4905
5052
|
|
|
4906
5053
|
// src/components/divider/Divider.tsx
|
|
4907
|
-
var
|
|
4908
|
-
var
|
|
4909
|
-
var
|
|
4910
|
-
var dividerVariants = (0,
|
|
5054
|
+
var React29 = __toESM(require("react"), 1);
|
|
5055
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
5056
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5057
|
+
var dividerVariants = (0, import_class_variance_authority20.cva)("", {
|
|
4911
5058
|
variants: {
|
|
4912
5059
|
variant: {
|
|
4913
5060
|
default: "bg-berget-separator",
|
|
@@ -4927,7 +5074,7 @@ var dividerVariants = (0, import_class_variance_authority19.cva)("", {
|
|
|
4927
5074
|
size: "thin"
|
|
4928
5075
|
}
|
|
4929
5076
|
});
|
|
4930
|
-
var Divider =
|
|
5077
|
+
var Divider = React29.forwardRef(
|
|
4931
5078
|
({
|
|
4932
5079
|
className,
|
|
4933
5080
|
orientation = "horizontal",
|
|
@@ -4938,16 +5085,16 @@ var Divider = React28.forwardRef(
|
|
|
4938
5085
|
...props
|
|
4939
5086
|
}, ref) => {
|
|
4940
5087
|
if (label) {
|
|
4941
|
-
return /* @__PURE__ */ (0,
|
|
4942
|
-
labelPosition !== "right" && /* @__PURE__ */ (0,
|
|
5088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
5089
|
+
labelPosition !== "right" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4943
5090
|
Separator,
|
|
4944
5091
|
{
|
|
4945
5092
|
orientation: "horizontal",
|
|
4946
5093
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
4947
5094
|
}
|
|
4948
5095
|
),
|
|
4949
|
-
/* @__PURE__ */ (0,
|
|
4950
|
-
labelPosition !== "left" && /* @__PURE__ */ (0,
|
|
5096
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
5097
|
+
labelPosition !== "left" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4951
5098
|
Separator,
|
|
4952
5099
|
{
|
|
4953
5100
|
orientation: "horizontal",
|
|
@@ -4956,7 +5103,7 @@ var Divider = React28.forwardRef(
|
|
|
4956
5103
|
)
|
|
4957
5104
|
] });
|
|
4958
5105
|
}
|
|
4959
|
-
return /* @__PURE__ */ (0,
|
|
5106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4960
5107
|
Separator,
|
|
4961
5108
|
{
|
|
4962
5109
|
ref,
|
|
@@ -4974,19 +5121,19 @@ Divider.displayName = "Divider";
|
|
|
4974
5121
|
|
|
4975
5122
|
// src/components/list/List.tsx
|
|
4976
5123
|
var import_lucide_react17 = require("lucide-react");
|
|
4977
|
-
var
|
|
4978
|
-
var List =
|
|
5124
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5125
|
+
var List = React30.forwardRef(
|
|
4979
5126
|
({ className, children, ...props }, ref) => {
|
|
4980
|
-
const childrenArray =
|
|
4981
|
-
return /* @__PURE__ */ (0,
|
|
5127
|
+
const childrenArray = React30.Children.toArray(children);
|
|
5128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(React30.Fragment, { children: [
|
|
4982
5129
|
child,
|
|
4983
|
-
index < childrenArray.length - 1 && /* @__PURE__ */ (0,
|
|
5130
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Divider, { variant: "subtle" })
|
|
4984
5131
|
] }, index)) });
|
|
4985
5132
|
}
|
|
4986
5133
|
);
|
|
4987
5134
|
List.displayName = "List";
|
|
4988
|
-
var ListItem =
|
|
4989
|
-
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5135
|
+
var ListItem = React30.forwardRef(
|
|
5136
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
4990
5137
|
"div",
|
|
4991
5138
|
{
|
|
4992
5139
|
ref,
|
|
@@ -4997,15 +5144,15 @@ var ListItem = React29.forwardRef(
|
|
|
4997
5144
|
),
|
|
4998
5145
|
...props,
|
|
4999
5146
|
children: [
|
|
5000
|
-
icon && /* @__PURE__ */ (0,
|
|
5001
|
-
/* @__PURE__ */ (0,
|
|
5147
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
5148
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-1 min-w-0", children })
|
|
5002
5149
|
]
|
|
5003
5150
|
}
|
|
5004
5151
|
)
|
|
5005
5152
|
);
|
|
5006
5153
|
ListItem.displayName = "ListItem";
|
|
5007
|
-
var ListHeader =
|
|
5008
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5154
|
+
var ListHeader = React30.forwardRef(
|
|
5155
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
5009
5156
|
"div",
|
|
5010
5157
|
{
|
|
5011
5158
|
ref,
|
|
@@ -5016,11 +5163,11 @@ var ListHeader = React29.forwardRef(
|
|
|
5016
5163
|
)
|
|
5017
5164
|
);
|
|
5018
5165
|
ListHeader.displayName = "ListHeader";
|
|
5019
|
-
var FeatureList =
|
|
5166
|
+
var FeatureList = React30.forwardRef(
|
|
5020
5167
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
5021
|
-
return /* @__PURE__ */ (0,
|
|
5022
|
-
variant === "bullet" ? /* @__PURE__ */ (0,
|
|
5023
|
-
/* @__PURE__ */ (0,
|
|
5168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("li", { className: "flex items-start gap-fluid-md", children: [
|
|
5169
|
+
variant === "bullet" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { icon: import_lucide_react17.Check, size: 24, className: "text-berget-logo-light" }) }),
|
|
5170
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Typography, { variant: "body", color: "muted", children: item })
|
|
5024
5171
|
] }, index)) });
|
|
5025
5172
|
}
|
|
5026
5173
|
);
|
|
@@ -5069,7 +5216,7 @@ function getHighlighter() {
|
|
|
5069
5216
|
}
|
|
5070
5217
|
|
|
5071
5218
|
// src/components/code-block/CodeBlock.tsx
|
|
5072
|
-
var
|
|
5219
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5073
5220
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
5074
5221
|
const [html, setHtml] = (0, import_react2.useState)(null);
|
|
5075
5222
|
const [copied, setCopied] = (0, import_react2.useState)(false);
|
|
@@ -5085,16 +5232,16 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
5085
5232
|
setCopied(true);
|
|
5086
5233
|
setTimeout(() => setCopied(false), 2e3);
|
|
5087
5234
|
}, [code]);
|
|
5088
|
-
const copyButton = /* @__PURE__ */ (0,
|
|
5235
|
+
const copyButton = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5089
5236
|
"button",
|
|
5090
5237
|
{
|
|
5091
5238
|
onClick: handleCopy,
|
|
5092
5239
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
5093
5240
|
"aria-label": "Copy code",
|
|
5094
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
5241
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react18.Check, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react18.Copy, { className: "w-3.5 h-3.5" })
|
|
5095
5242
|
}
|
|
5096
5243
|
);
|
|
5097
|
-
return /* @__PURE__ */ (0,
|
|
5244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5098
5245
|
"div",
|
|
5099
5246
|
{
|
|
5100
5247
|
className: cn(
|
|
@@ -5102,25 +5249,25 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
5102
5249
|
className
|
|
5103
5250
|
),
|
|
5104
5251
|
children: [
|
|
5105
|
-
title && /* @__PURE__ */ (0,
|
|
5106
|
-
/* @__PURE__ */ (0,
|
|
5107
|
-
html ? /* @__PURE__ */ (0,
|
|
5252
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
5253
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
5254
|
+
html ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5108
5255
|
"div",
|
|
5109
5256
|
{
|
|
5110
5257
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
5111
5258
|
dangerouslySetInnerHTML: { __html: html }
|
|
5112
5259
|
}
|
|
5113
|
-
) : /* @__PURE__ */ (0,
|
|
5260
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("code", { children: code }) })
|
|
5114
5261
|
]
|
|
5115
5262
|
}
|
|
5116
5263
|
);
|
|
5117
5264
|
}
|
|
5118
5265
|
|
|
5119
5266
|
// src/components/window-frame/WindowFrame.tsx
|
|
5120
|
-
var
|
|
5267
|
+
var React31 = __toESM(require("react"), 1);
|
|
5121
5268
|
var import_react3 = require("react");
|
|
5122
|
-
var
|
|
5123
|
-
var WindowFrame =
|
|
5269
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5270
|
+
var WindowFrame = React31.forwardRef(
|
|
5124
5271
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
5125
5272
|
const [internalActive, setInternalActive] = (0, import_react3.useState)(tabs?.[0]?.id ?? "");
|
|
5126
5273
|
const currentTab = activeTab ?? internalActive;
|
|
@@ -5131,7 +5278,7 @@ var WindowFrame = React30.forwardRef(
|
|
|
5131
5278
|
setInternalActive(id);
|
|
5132
5279
|
}
|
|
5133
5280
|
};
|
|
5134
|
-
return /* @__PURE__ */ (0,
|
|
5281
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
5135
5282
|
"div",
|
|
5136
5283
|
{
|
|
5137
5284
|
ref,
|
|
@@ -5141,13 +5288,13 @@ var WindowFrame = React30.forwardRef(
|
|
|
5141
5288
|
),
|
|
5142
5289
|
...props,
|
|
5143
5290
|
children: [
|
|
5144
|
-
/* @__PURE__ */ (0,
|
|
5145
|
-
/* @__PURE__ */ (0,
|
|
5146
|
-
/* @__PURE__ */ (0,
|
|
5147
|
-
/* @__PURE__ */ (0,
|
|
5148
|
-
/* @__PURE__ */ (0,
|
|
5291
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
5292
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
5293
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "w-3 h-3 rounded-full bg-berget-brand-muscaria-400" }),
|
|
5294
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "w-3 h-3 rounded-full bg-berget-brand-chanterelle-200" }),
|
|
5295
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "w-3 h-3 rounded-full bg-berget-brand-moss-400" })
|
|
5149
5296
|
] }),
|
|
5150
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */ (0,
|
|
5297
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
5151
5298
|
"button",
|
|
5152
5299
|
{
|
|
5153
5300
|
type: "button",
|
|
@@ -5159,9 +5306,9 @@ var WindowFrame = React30.forwardRef(
|
|
|
5159
5306
|
children: tab.label
|
|
5160
5307
|
},
|
|
5161
5308
|
tab.id
|
|
5162
|
-
)) }) : /* @__PURE__ */ (0,
|
|
5309
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
5163
5310
|
] }),
|
|
5164
|
-
/* @__PURE__ */ (0,
|
|
5311
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { children })
|
|
5165
5312
|
]
|
|
5166
5313
|
}
|
|
5167
5314
|
);
|
|
@@ -5171,7 +5318,7 @@ WindowFrame.displayName = "WindowFrame";
|
|
|
5171
5318
|
|
|
5172
5319
|
// src/components/fog-illustration/FogIllustration.tsx
|
|
5173
5320
|
var import_react4 = require("react");
|
|
5174
|
-
var
|
|
5321
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5175
5322
|
var FOG_BRAND_PALETTE = {
|
|
5176
5323
|
ink: "#171a1a",
|
|
5177
5324
|
milk: "#f7f5ed",
|
|
@@ -5484,7 +5631,7 @@ var FogIllustration = ({ palette, speed = 1, className }) => {
|
|
|
5484
5631
|
gl.deleteFramebuffer(fbo);
|
|
5485
5632
|
};
|
|
5486
5633
|
}, []);
|
|
5487
|
-
return /* @__PURE__ */ (0,
|
|
5634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("canvas", { ref, "aria-hidden": "true", className: cn("size-full", className) });
|
|
5488
5635
|
};
|
|
5489
5636
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5490
5637
|
0 && (module.exports = {
|
|
@@ -5544,6 +5691,12 @@ var FogIllustration = ({ palette, speed = 1, className }) => {
|
|
|
5544
5691
|
DropdownMenuSubTrigger,
|
|
5545
5692
|
DropdownMenuTrigger,
|
|
5546
5693
|
EU_COUNTRY_CODES,
|
|
5694
|
+
Empty,
|
|
5695
|
+
EmptyContent,
|
|
5696
|
+
EmptyDescription,
|
|
5697
|
+
EmptyHeader,
|
|
5698
|
+
EmptyMedia,
|
|
5699
|
+
EmptyTitle,
|
|
5547
5700
|
FOG_BRAND_PALETTE,
|
|
5548
5701
|
FeatureList,
|
|
5549
5702
|
Field,
|