@bergetai/ui 0.1.84 → 0.1.85
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 +303 -291
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +285 -273
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -64,7 +64,7 @@ __export(index_exports, {
|
|
|
64
64
|
Grid: () => Grid,
|
|
65
65
|
Header: () => Header,
|
|
66
66
|
HeroBlock: () => HeroBlock,
|
|
67
|
-
Icon: () =>
|
|
67
|
+
Icon: () => Icon2,
|
|
68
68
|
Input: () => Input2,
|
|
69
69
|
Label: () => Label2,
|
|
70
70
|
LanguageSelect: () => LanguageSelect,
|
|
@@ -83,7 +83,7 @@ __export(index_exports, {
|
|
|
83
83
|
alertVariants: () => alertVariants2,
|
|
84
84
|
badgeVariants: () => badgeVariants,
|
|
85
85
|
boxVariants: () => boxVariants,
|
|
86
|
-
buttonVariants: () =>
|
|
86
|
+
buttonVariants: () => buttonVariants,
|
|
87
87
|
cardVariants: () => cardVariants,
|
|
88
88
|
checkboxVariants: () => checkboxVariants,
|
|
89
89
|
containerVariants: () => containerVariants,
|
|
@@ -294,31 +294,34 @@ var ThemeToggle = React2.forwardRef(
|
|
|
294
294
|
ThemeToggle.displayName = "ThemeToggle";
|
|
295
295
|
|
|
296
296
|
// src/components/button/Button.tsx
|
|
297
|
-
var
|
|
298
|
-
var import_class_variance_authority2 = require("class-variance-authority");
|
|
297
|
+
var React4 = __toESM(require("react"), 1);
|
|
299
298
|
|
|
300
299
|
// src/primitives/button.tsx
|
|
301
300
|
var React3 = __toESM(require("react"), 1);
|
|
302
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
303
301
|
var import_class_variance_authority = require("class-variance-authority");
|
|
302
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
304
303
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
305
304
|
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
306
|
-
"inline-flex items-center justify-center gap-2
|
|
305
|
+
"inline-flex shrink-0 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",
|
|
307
306
|
{
|
|
308
307
|
variants: {
|
|
309
308
|
variant: {
|
|
310
309
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
311
|
-
destructive: "bg-destructive text-destructive-
|
|
312
|
-
outline: "border
|
|
310
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
311
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
313
312
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
314
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
313
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
315
314
|
link: "text-primary underline-offset-4 hover:underline"
|
|
316
315
|
},
|
|
317
316
|
size: {
|
|
318
|
-
default: "h-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
317
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
318
|
+
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
319
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
320
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
321
|
+
icon: "size-9",
|
|
322
|
+
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
323
|
+
"icon-sm": "size-8",
|
|
324
|
+
"icon-lg": "size-10"
|
|
322
325
|
}
|
|
323
326
|
},
|
|
324
327
|
defaultVariants: {
|
|
@@ -335,91 +338,64 @@ var Button = React3.forwardRef(
|
|
|
335
338
|
);
|
|
336
339
|
Button.displayName = "Button";
|
|
337
340
|
|
|
338
|
-
// src/components/icon/Icon.tsx
|
|
339
|
-
var React4 = __toESM(require("react"), 1);
|
|
340
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
341
|
-
var iconStrokeMap = {
|
|
342
|
-
16: 1.4,
|
|
343
|
-
24: 1.6,
|
|
344
|
-
32: 1.8
|
|
345
|
-
};
|
|
346
|
-
var Icon = React4.forwardRef(
|
|
347
|
-
({
|
|
348
|
-
icon: IconComponent,
|
|
349
|
-
size,
|
|
350
|
-
className,
|
|
351
|
-
"aria-label": ariaLabel,
|
|
352
|
-
"aria-hidden": ariaHidden = true,
|
|
353
|
-
...props
|
|
354
|
-
}, ref) => {
|
|
355
|
-
const strokeWidth = iconStrokeMap[size];
|
|
356
|
-
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
357
|
-
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
358
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
359
|
-
IconComponent,
|
|
360
|
-
{
|
|
361
|
-
ref,
|
|
362
|
-
className: cn(sizeClass, className),
|
|
363
|
-
strokeWidth,
|
|
364
|
-
...ariaAttributes,
|
|
365
|
-
...props
|
|
366
|
-
}
|
|
367
|
-
);
|
|
368
|
-
}
|
|
369
|
-
);
|
|
370
|
-
Icon.displayName = "Icon";
|
|
371
|
-
|
|
372
341
|
// src/components/button/Button.tsx
|
|
373
342
|
var import_lucide_react = require("lucide-react");
|
|
374
|
-
var
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
},
|
|
393
|
-
width: {
|
|
394
|
-
default: "w-auto",
|
|
395
|
-
full: "w-full"
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
defaultVariants: {
|
|
399
|
-
variant: "default",
|
|
400
|
-
size: "default",
|
|
401
|
-
width: "default"
|
|
402
|
-
}
|
|
343
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
344
|
+
function brandVariantClasses(variant) {
|
|
345
|
+
switch (variant) {
|
|
346
|
+
case "primary":
|
|
347
|
+
return "bg-berget-button-primary-bg text-berget-button-primary-fg shadow-lg hover:bg-berget-button-primary-bg/90 hover:shadow-xl";
|
|
348
|
+
case "secondary":
|
|
349
|
+
return "bg-berget-button-secondary-bg text-berget-button-secondary-fg shadow hover:bg-berget-button-secondary-bg/80 hover:shadow-lg";
|
|
350
|
+
case "destructive":
|
|
351
|
+
return "bg-berget-button-destructive-bg text-berget-button-destructive-fg shadow-sm hover:bg-berget-button-destructive-bg/80 hover:shadow";
|
|
352
|
+
case "outline":
|
|
353
|
+
return "border-berget-border-interactive bg-transparent text-berget-foreground hover:bg-berget-surface-hover hover:text-berget-foreground hover:border-berget-border-interactive-elevated";
|
|
354
|
+
case "ghost":
|
|
355
|
+
return "bg-transparent text-berget-foreground hover:bg-berget-brand-granite-800 hover:text-berget-foreground";
|
|
356
|
+
case "link":
|
|
357
|
+
return "bg-transparent hover:bg-transparent focus:bg-transparent active:bg-transparent text-berget-button-link-fg underline-offset-4 hover:underline";
|
|
358
|
+
case "default":
|
|
359
|
+
default:
|
|
360
|
+
return "bg-berget-button-default-bg text-berget-button-default-fg shadow-lg hover:bg-berget-button-default-bg/90 hover:shadow-xl";
|
|
403
361
|
}
|
|
404
|
-
|
|
405
|
-
|
|
362
|
+
}
|
|
363
|
+
function primitiveVariant(variant) {
|
|
364
|
+
switch (variant) {
|
|
365
|
+
case "primary":
|
|
366
|
+
return "ghost";
|
|
367
|
+
default:
|
|
368
|
+
return variant;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
var Button2 = React4.forwardRef(
|
|
406
372
|
({
|
|
407
373
|
className,
|
|
408
|
-
variant,
|
|
374
|
+
variant = "default",
|
|
409
375
|
size,
|
|
410
|
-
width,
|
|
411
376
|
asChild = false,
|
|
412
377
|
isLoading = false,
|
|
378
|
+
width = "default",
|
|
413
379
|
type = "button",
|
|
414
380
|
children,
|
|
415
381
|
...props
|
|
416
382
|
}, ref) => {
|
|
417
|
-
const isIcon =
|
|
383
|
+
const isIcon = typeof size === "string" && size.startsWith("icon");
|
|
384
|
+
const isLink = variant === "link";
|
|
385
|
+
const baseClass = cn(
|
|
386
|
+
!isLink && buttonVariants({ variant: primitiveVariant(variant), size }),
|
|
387
|
+
// Berget brand overrides
|
|
388
|
+
!isLink && "rounded-full",
|
|
389
|
+
brandVariantClasses(variant),
|
|
390
|
+
!isLink && width === "full" && "w-full",
|
|
391
|
+
isIcon && "rounded-full shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]",
|
|
392
|
+
className
|
|
393
|
+
);
|
|
418
394
|
if (asChild) {
|
|
419
|
-
return /* @__PURE__ */ (0,
|
|
395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
420
396
|
Button,
|
|
421
397
|
{
|
|
422
|
-
className:
|
|
398
|
+
className: baseClass,
|
|
423
399
|
ref,
|
|
424
400
|
asChild: true,
|
|
425
401
|
type,
|
|
@@ -430,17 +406,17 @@ var Button2 = React5.forwardRef(
|
|
|
430
406
|
}
|
|
431
407
|
);
|
|
432
408
|
}
|
|
433
|
-
return /* @__PURE__ */ (0,
|
|
409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
434
410
|
Button,
|
|
435
411
|
{
|
|
436
|
-
className:
|
|
412
|
+
className: baseClass,
|
|
437
413
|
ref,
|
|
438
414
|
type,
|
|
439
415
|
"aria-disabled": isLoading || void 0,
|
|
440
416
|
"aria-busy": isLoading || void 0,
|
|
441
417
|
...props,
|
|
442
|
-
children: /* @__PURE__ */ (0,
|
|
443
|
-
/* @__PURE__ */ (0,
|
|
418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: cn("inline-flex items-center", !isIcon && "gap-2"), children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
419
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.Loader2, { className: "animate-spin", size: 16, "aria-hidden": "true" }),
|
|
444
420
|
!isIcon && children
|
|
445
421
|
] }) : children })
|
|
446
422
|
}
|
|
@@ -450,10 +426,10 @@ var Button2 = React5.forwardRef(
|
|
|
450
426
|
Button2.displayName = "Button";
|
|
451
427
|
|
|
452
428
|
// src/components/typography/Typography.tsx
|
|
453
|
-
var
|
|
454
|
-
var
|
|
455
|
-
var
|
|
456
|
-
var typographyVariants = (0,
|
|
429
|
+
var React5 = __toESM(require("react"), 1);
|
|
430
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
431
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
432
|
+
var typographyVariants = (0, import_class_variance_authority2.cva)("", {
|
|
457
433
|
variants: {
|
|
458
434
|
variant: {
|
|
459
435
|
// Fluid heading scale — use @theme tokens (clamp-based, 390px → 1440px)
|
|
@@ -497,10 +473,10 @@ var defaultElementMap = {
|
|
|
497
473
|
mono: "p",
|
|
498
474
|
code: "span"
|
|
499
475
|
};
|
|
500
|
-
var Typography =
|
|
476
|
+
var Typography = React5.forwardRef(
|
|
501
477
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
502
478
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
503
|
-
return /* @__PURE__ */ (0,
|
|
479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
504
480
|
Component,
|
|
505
481
|
{
|
|
506
482
|
className: cn(typographyVariants({ variant, color }), className),
|
|
@@ -514,14 +490,14 @@ var Typography = React6.forwardRef(
|
|
|
514
490
|
Typography.displayName = "Typography";
|
|
515
491
|
|
|
516
492
|
// src/components/card/Card.tsx
|
|
517
|
-
var
|
|
518
|
-
var
|
|
493
|
+
var React7 = __toESM(require("react"), 1);
|
|
494
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
519
495
|
|
|
520
496
|
// src/primitives/card.tsx
|
|
521
|
-
var
|
|
522
|
-
var
|
|
523
|
-
var Card =
|
|
524
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
497
|
+
var React6 = __toESM(require("react"), 1);
|
|
498
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
499
|
+
var Card = React6.forwardRef(
|
|
500
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
525
501
|
"div",
|
|
526
502
|
{
|
|
527
503
|
ref,
|
|
@@ -531,30 +507,30 @@ var Card = React7.forwardRef(
|
|
|
531
507
|
)
|
|
532
508
|
);
|
|
533
509
|
Card.displayName = "Card";
|
|
534
|
-
var CardHeader =
|
|
535
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
510
|
+
var CardHeader = React6.forwardRef(
|
|
511
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
536
512
|
);
|
|
537
513
|
CardHeader.displayName = "CardHeader";
|
|
538
|
-
var CardTitle =
|
|
539
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
514
|
+
var CardTitle = React6.forwardRef(
|
|
515
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h2", { ref, className: cn("text-2xl leading-none tracking-tight", className), ...props })
|
|
540
516
|
);
|
|
541
517
|
CardTitle.displayName = "CardTitle";
|
|
542
|
-
var CardDescription =
|
|
543
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
518
|
+
var CardDescription = React6.forwardRef(
|
|
519
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
544
520
|
);
|
|
545
521
|
CardDescription.displayName = "CardDescription";
|
|
546
|
-
var CardContent =
|
|
547
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
522
|
+
var CardContent = React6.forwardRef(
|
|
523
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
548
524
|
);
|
|
549
525
|
CardContent.displayName = "CardContent";
|
|
550
|
-
var CardFooter =
|
|
551
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
526
|
+
var CardFooter = React6.forwardRef(
|
|
527
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
552
528
|
);
|
|
553
529
|
CardFooter.displayName = "CardFooter";
|
|
554
530
|
|
|
555
531
|
// src/components/card/Card.tsx
|
|
556
|
-
var
|
|
557
|
-
var cardVariants = (0,
|
|
532
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
533
|
+
var cardVariants = (0, import_class_variance_authority3.cva)("rounded-berget-sm", {
|
|
558
534
|
variants: {
|
|
559
535
|
variant: {
|
|
560
536
|
outlined: "bg-transparent border border-berget-border",
|
|
@@ -572,9 +548,9 @@ var cardVariants = (0, import_class_variance_authority4.cva)("rounded-berget-sm"
|
|
|
572
548
|
padding: "md"
|
|
573
549
|
}
|
|
574
550
|
});
|
|
575
|
-
var Card2 =
|
|
551
|
+
var Card2 = React7.forwardRef(
|
|
576
552
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
577
|
-
return /* @__PURE__ */ (0,
|
|
553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
578
554
|
Card,
|
|
579
555
|
{
|
|
580
556
|
ref,
|
|
@@ -588,10 +564,10 @@ var Card2 = React8.forwardRef(
|
|
|
588
564
|
Card2.displayName = "Card";
|
|
589
565
|
|
|
590
566
|
// src/components/badge/Badge.tsx
|
|
591
|
-
var
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
var badgeVariants = (0,
|
|
567
|
+
var React8 = __toESM(require("react"), 1);
|
|
568
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
569
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
570
|
+
var badgeVariants = (0, import_class_variance_authority4.cva)(
|
|
595
571
|
"inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2",
|
|
596
572
|
{
|
|
597
573
|
variants: {
|
|
@@ -623,10 +599,10 @@ var badgeVariants = (0, import_class_variance_authority5.cva)(
|
|
|
623
599
|
}
|
|
624
600
|
}
|
|
625
601
|
);
|
|
626
|
-
var Badge =
|
|
602
|
+
var Badge = React8.forwardRef(
|
|
627
603
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
628
|
-
return /* @__PURE__ */ (0,
|
|
629
|
-
icon && /* @__PURE__ */ (0,
|
|
604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
605
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
630
606
|
children
|
|
631
607
|
] });
|
|
632
608
|
}
|
|
@@ -634,14 +610,14 @@ var Badge = React9.forwardRef(
|
|
|
634
610
|
Badge.displayName = "Badge";
|
|
635
611
|
|
|
636
612
|
// src/components/alert/Alert.tsx
|
|
637
|
-
var React11 = __toESM(require("react"), 1);
|
|
638
|
-
var import_class_variance_authority7 = require("class-variance-authority");
|
|
639
|
-
|
|
640
|
-
// src/primitives/alert.tsx
|
|
641
613
|
var React10 = __toESM(require("react"), 1);
|
|
642
614
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
643
|
-
|
|
644
|
-
|
|
615
|
+
|
|
616
|
+
// src/primitives/alert.tsx
|
|
617
|
+
var React9 = __toESM(require("react"), 1);
|
|
618
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
619
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
620
|
+
var alertVariants = (0, import_class_variance_authority5.cva)(
|
|
645
621
|
"relative w-full rounded-lg p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",
|
|
646
622
|
{
|
|
647
623
|
variants: {
|
|
@@ -655,18 +631,18 @@ var alertVariants = (0, import_class_variance_authority6.cva)(
|
|
|
655
631
|
}
|
|
656
632
|
}
|
|
657
633
|
);
|
|
658
|
-
var Alert =
|
|
634
|
+
var Alert = React9.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
659
635
|
Alert.displayName = "Alert";
|
|
660
|
-
var AlertTitle =
|
|
661
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
636
|
+
var AlertTitle = React9.forwardRef(
|
|
637
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h5", { ref, className: cn("mb-1 leading-none tracking-tight", className), ...props })
|
|
662
638
|
);
|
|
663
639
|
AlertTitle.displayName = "AlertTitle";
|
|
664
|
-
var AlertDescription =
|
|
640
|
+
var AlertDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
665
641
|
AlertDescription.displayName = "AlertDescription";
|
|
666
642
|
|
|
667
643
|
// src/components/alert/Alert.tsx
|
|
668
|
-
var
|
|
669
|
-
var alertVariants2 = (0,
|
|
644
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
645
|
+
var alertVariants2 = (0, import_class_variance_authority6.cva)("", {
|
|
670
646
|
variants: {
|
|
671
647
|
variant: {
|
|
672
648
|
default: "border-berget-border",
|
|
@@ -680,20 +656,20 @@ var alertVariants2 = (0, import_class_variance_authority7.cva)("", {
|
|
|
680
656
|
variant: "default"
|
|
681
657
|
}
|
|
682
658
|
});
|
|
683
|
-
var Alert2 =
|
|
684
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0,
|
|
659
|
+
var Alert2 = React10.forwardRef(
|
|
660
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Alert, { ref, className: cn(alertVariants2({ variant }), className), ...props })
|
|
685
661
|
);
|
|
686
662
|
Alert2.displayName = "Alert";
|
|
687
663
|
|
|
688
664
|
// src/components/input/Input.tsx
|
|
689
|
-
var
|
|
665
|
+
var React12 = __toESM(require("react"), 1);
|
|
690
666
|
|
|
691
667
|
// src/primitives/input.tsx
|
|
692
|
-
var
|
|
693
|
-
var
|
|
694
|
-
var Input =
|
|
668
|
+
var React11 = __toESM(require("react"), 1);
|
|
669
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
670
|
+
var Input = React11.forwardRef(
|
|
695
671
|
({ className, type, ...props }, ref) => {
|
|
696
|
-
return /* @__PURE__ */ (0,
|
|
672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
697
673
|
"input",
|
|
698
674
|
{
|
|
699
675
|
type,
|
|
@@ -710,14 +686,14 @@ var Input = React12.forwardRef(
|
|
|
710
686
|
Input.displayName = "Input";
|
|
711
687
|
|
|
712
688
|
// src/components/input/Input.tsx
|
|
713
|
-
var
|
|
714
|
-
var Input2 =
|
|
689
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
690
|
+
var Input2 = React12.forwardRef(
|
|
715
691
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
716
|
-
const generatedId =
|
|
692
|
+
const generatedId = React12.useId();
|
|
717
693
|
const inputId = id || generatedId;
|
|
718
694
|
const errorId = `${inputId}-error`;
|
|
719
695
|
const descriptionId = `${inputId}-description`;
|
|
720
|
-
const inputElement = /* @__PURE__ */ (0,
|
|
696
|
+
const inputElement = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
721
697
|
Input,
|
|
722
698
|
{
|
|
723
699
|
ref,
|
|
@@ -737,8 +713,8 @@ var Input2 = React13.forwardRef(
|
|
|
737
713
|
}
|
|
738
714
|
);
|
|
739
715
|
if (!icon && !actionButton) {
|
|
740
|
-
return /* @__PURE__ */ (0,
|
|
741
|
-
label && /* @__PURE__ */ (0,
|
|
716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
717
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
742
718
|
"label",
|
|
743
719
|
{
|
|
744
720
|
htmlFor: inputId,
|
|
@@ -751,9 +727,9 @@ var Input2 = React13.forwardRef(
|
|
|
751
727
|
}
|
|
752
728
|
),
|
|
753
729
|
inputElement,
|
|
754
|
-
(description || error) && /* @__PURE__ */ (0,
|
|
755
|
-
description && /* @__PURE__ */ (0,
|
|
756
|
-
error && /* @__PURE__ */ (0,
|
|
730
|
+
(description || error) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
731
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
732
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
757
733
|
Typography,
|
|
758
734
|
{
|
|
759
735
|
variant: "xs",
|
|
@@ -765,8 +741,8 @@ var Input2 = React13.forwardRef(
|
|
|
765
741
|
] })
|
|
766
742
|
] });
|
|
767
743
|
}
|
|
768
|
-
return /* @__PURE__ */ (0,
|
|
769
|
-
label && /* @__PURE__ */ (0,
|
|
744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
745
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
770
746
|
"label",
|
|
771
747
|
{
|
|
772
748
|
htmlFor: inputId,
|
|
@@ -778,14 +754,14 @@ var Input2 = React13.forwardRef(
|
|
|
778
754
|
children: label
|
|
779
755
|
}
|
|
780
756
|
),
|
|
781
|
-
/* @__PURE__ */ (0,
|
|
782
|
-
icon && /* @__PURE__ */ (0,
|
|
757
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative w-full", children: [
|
|
758
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
783
759
|
inputElement,
|
|
784
|
-
actionButton && /* @__PURE__ */ (0,
|
|
760
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
785
761
|
] }),
|
|
786
|
-
(description || error) && /* @__PURE__ */ (0,
|
|
787
|
-
description && /* @__PURE__ */ (0,
|
|
788
|
-
error && /* @__PURE__ */ (0,
|
|
762
|
+
(description || error) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
763
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
764
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
789
765
|
] })
|
|
790
766
|
] });
|
|
791
767
|
}
|
|
@@ -793,17 +769,17 @@ var Input2 = React13.forwardRef(
|
|
|
793
769
|
Input2.displayName = "Input";
|
|
794
770
|
|
|
795
771
|
// src/components/checkbox/Checkbox.tsx
|
|
796
|
-
var
|
|
772
|
+
var React14 = __toESM(require("react"), 1);
|
|
797
773
|
var CheckboxPrimitive2 = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
798
774
|
var import_lucide_react3 = require("lucide-react");
|
|
799
|
-
var
|
|
775
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
800
776
|
|
|
801
777
|
// src/primitives/checkbox.tsx
|
|
802
|
-
var
|
|
778
|
+
var React13 = __toESM(require("react"), 1);
|
|
803
779
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
804
780
|
var import_lucide_react2 = require("lucide-react");
|
|
805
|
-
var
|
|
806
|
-
var Checkbox =
|
|
781
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
782
|
+
var Checkbox = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
807
783
|
CheckboxPrimitive.Root,
|
|
808
784
|
{
|
|
809
785
|
ref,
|
|
@@ -812,24 +788,24 @@ var Checkbox = React14.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
812
788
|
className
|
|
813
789
|
),
|
|
814
790
|
...props,
|
|
815
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
791
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center"), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" }) })
|
|
816
792
|
}
|
|
817
793
|
));
|
|
818
794
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
819
|
-
var CheckboxIndicator =
|
|
795
|
+
var CheckboxIndicator = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
820
796
|
CheckboxPrimitive.Indicator,
|
|
821
797
|
{
|
|
822
798
|
ref,
|
|
823
799
|
className: cn("grid place-content-center", className),
|
|
824
800
|
...props,
|
|
825
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
801
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" })
|
|
826
802
|
}
|
|
827
803
|
));
|
|
828
804
|
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
829
805
|
|
|
830
806
|
// src/components/checkbox/Checkbox.tsx
|
|
831
|
-
var
|
|
832
|
-
var checkboxVariants = (0,
|
|
807
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
808
|
+
var checkboxVariants = (0, import_class_variance_authority7.cva)(
|
|
833
809
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
834
810
|
{
|
|
835
811
|
variants: {
|
|
@@ -850,13 +826,13 @@ var checkboxVariants = (0, import_class_variance_authority8.cva)(
|
|
|
850
826
|
}
|
|
851
827
|
}
|
|
852
828
|
);
|
|
853
|
-
var Checkbox2 =
|
|
829
|
+
var Checkbox2 = React14.forwardRef(
|
|
854
830
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
855
|
-
const generatedId =
|
|
831
|
+
const generatedId = React14.useId();
|
|
856
832
|
const checkboxId = id || generatedId;
|
|
857
833
|
const errorId = `${checkboxId}-error`;
|
|
858
|
-
return /* @__PURE__ */ (0,
|
|
859
|
-
/* @__PURE__ */ (0,
|
|
834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
835
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
860
836
|
Checkbox,
|
|
861
837
|
{
|
|
862
838
|
ref,
|
|
@@ -871,7 +847,7 @@ var Checkbox2 = React15.forwardRef(
|
|
|
871
847
|
className
|
|
872
848
|
),
|
|
873
849
|
...props,
|
|
874
|
-
children: /* @__PURE__ */ (0,
|
|
850
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
875
851
|
import_lucide_react3.Check,
|
|
876
852
|
{
|
|
877
853
|
className: "h-4 w-4 text-current stroke-current",
|
|
@@ -880,8 +856,8 @@ var Checkbox2 = React15.forwardRef(
|
|
|
880
856
|
) })
|
|
881
857
|
}
|
|
882
858
|
) }),
|
|
883
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
884
|
-
label && /* @__PURE__ */ (0,
|
|
859
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
860
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
885
861
|
"label",
|
|
886
862
|
{
|
|
887
863
|
htmlFor: checkboxId,
|
|
@@ -893,8 +869,8 @@ var Checkbox2 = React15.forwardRef(
|
|
|
893
869
|
children: label
|
|
894
870
|
}
|
|
895
871
|
),
|
|
896
|
-
description && /* @__PURE__ */ (0,
|
|
897
|
-
error && /* @__PURE__ */ (0,
|
|
872
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
873
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
898
874
|
] })
|
|
899
875
|
] });
|
|
900
876
|
}
|
|
@@ -902,11 +878,11 @@ var Checkbox2 = React15.forwardRef(
|
|
|
902
878
|
Checkbox2.displayName = "Checkbox";
|
|
903
879
|
|
|
904
880
|
// src/components/switch/Switch.tsx
|
|
905
|
-
var
|
|
881
|
+
var React15 = __toESM(require("react"), 1);
|
|
906
882
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
907
|
-
var
|
|
908
|
-
var
|
|
909
|
-
var switchRootVariants = (0,
|
|
883
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
884
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
885
|
+
var switchRootVariants = (0, import_class_variance_authority8.cva)(
|
|
910
886
|
"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",
|
|
911
887
|
{
|
|
912
888
|
variants: {
|
|
@@ -927,7 +903,7 @@ var switchRootVariants = (0, import_class_variance_authority9.cva)(
|
|
|
927
903
|
}
|
|
928
904
|
}
|
|
929
905
|
);
|
|
930
|
-
var switchThumbVariants = (0,
|
|
906
|
+
var switchThumbVariants = (0, import_class_variance_authority8.cva)(
|
|
931
907
|
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
932
908
|
{
|
|
933
909
|
variants: {
|
|
@@ -942,13 +918,13 @@ var switchThumbVariants = (0, import_class_variance_authority9.cva)(
|
|
|
942
918
|
}
|
|
943
919
|
}
|
|
944
920
|
);
|
|
945
|
-
var Switch =
|
|
921
|
+
var Switch = React15.forwardRef(
|
|
946
922
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
947
|
-
const generatedId =
|
|
923
|
+
const generatedId = React15.useId();
|
|
948
924
|
const switchId = id || generatedId;
|
|
949
925
|
const errorId = `${switchId}-error`;
|
|
950
|
-
return /* @__PURE__ */ (0,
|
|
951
|
-
/* @__PURE__ */ (0,
|
|
926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
952
928
|
SwitchPrimitives.Root,
|
|
953
929
|
{
|
|
954
930
|
ref,
|
|
@@ -962,11 +938,11 @@ var Switch = React16.forwardRef(
|
|
|
962
938
|
className
|
|
963
939
|
),
|
|
964
940
|
...props,
|
|
965
|
-
children: /* @__PURE__ */ (0,
|
|
941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
966
942
|
}
|
|
967
943
|
),
|
|
968
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
969
|
-
label && /* @__PURE__ */ (0,
|
|
944
|
+
(label || description || error) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
945
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
970
946
|
"label",
|
|
971
947
|
{
|
|
972
948
|
htmlFor: switchId,
|
|
@@ -977,8 +953,8 @@ var Switch = React16.forwardRef(
|
|
|
977
953
|
children: label
|
|
978
954
|
}
|
|
979
955
|
),
|
|
980
|
-
description && /* @__PURE__ */ (0,
|
|
981
|
-
error && /* @__PURE__ */ (0,
|
|
956
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typography, { variant: "xs", color: "muted", children: description }),
|
|
957
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
982
958
|
] })
|
|
983
959
|
] });
|
|
984
960
|
}
|
|
@@ -986,17 +962,17 @@ var Switch = React16.forwardRef(
|
|
|
986
962
|
Switch.displayName = "Switch";
|
|
987
963
|
|
|
988
964
|
// src/components/select/Select.tsx
|
|
989
|
-
var
|
|
990
|
-
var
|
|
965
|
+
var React17 = __toESM(require("react"), 1);
|
|
966
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
991
967
|
|
|
992
968
|
// src/primitives/select.tsx
|
|
993
|
-
var
|
|
969
|
+
var React16 = __toESM(require("react"), 1);
|
|
994
970
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
995
971
|
var import_lucide_react4 = require("lucide-react");
|
|
996
|
-
var
|
|
972
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
997
973
|
var Select = SelectPrimitive.Root;
|
|
998
974
|
var SelectValue = SelectPrimitive.Value;
|
|
999
|
-
var SelectTrigger =
|
|
975
|
+
var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1000
976
|
SelectPrimitive.Trigger,
|
|
1001
977
|
{
|
|
1002
978
|
ref,
|
|
@@ -1007,32 +983,32 @@ var SelectTrigger = React17.forwardRef(({ className, children, ...props }, ref)
|
|
|
1007
983
|
...props,
|
|
1008
984
|
children: [
|
|
1009
985
|
children,
|
|
1010
|
-
/* @__PURE__ */ (0,
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
1011
987
|
]
|
|
1012
988
|
}
|
|
1013
989
|
));
|
|
1014
990
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1015
|
-
var SelectScrollUpButton =
|
|
991
|
+
var SelectScrollUpButton = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1016
992
|
SelectPrimitive.ScrollUpButton,
|
|
1017
993
|
{
|
|
1018
994
|
ref,
|
|
1019
995
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1020
996
|
...props,
|
|
1021
|
-
children: /* @__PURE__ */ (0,
|
|
997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronUp, { className: "h-4 w-4" })
|
|
1022
998
|
}
|
|
1023
999
|
));
|
|
1024
1000
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1025
|
-
var SelectScrollDownButton =
|
|
1001
|
+
var SelectScrollDownButton = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1026
1002
|
SelectPrimitive.ScrollDownButton,
|
|
1027
1003
|
{
|
|
1028
1004
|
ref,
|
|
1029
1005
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1030
1006
|
...props,
|
|
1031
|
-
children: /* @__PURE__ */ (0,
|
|
1007
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" })
|
|
1032
1008
|
}
|
|
1033
1009
|
));
|
|
1034
1010
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1035
|
-
var SelectContent =
|
|
1011
|
+
var SelectContent = React16.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1036
1012
|
SelectPrimitive.Content,
|
|
1037
1013
|
{
|
|
1038
1014
|
ref,
|
|
@@ -1044,8 +1020,8 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
|
|
|
1044
1020
|
position,
|
|
1045
1021
|
...props,
|
|
1046
1022
|
children: [
|
|
1047
|
-
/* @__PURE__ */ (0,
|
|
1048
|
-
/* @__PURE__ */ (0,
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectScrollUpButton, {}),
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1049
1025
|
SelectPrimitive.Viewport,
|
|
1050
1026
|
{
|
|
1051
1027
|
className: cn(
|
|
@@ -1055,12 +1031,12 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
|
|
|
1055
1031
|
children
|
|
1056
1032
|
}
|
|
1057
1033
|
),
|
|
1058
|
-
/* @__PURE__ */ (0,
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectScrollDownButton, {})
|
|
1059
1035
|
]
|
|
1060
1036
|
}
|
|
1061
1037
|
) }));
|
|
1062
1038
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1063
|
-
var SelectLabel =
|
|
1039
|
+
var SelectLabel = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1064
1040
|
SelectPrimitive.Label,
|
|
1065
1041
|
{
|
|
1066
1042
|
ref,
|
|
@@ -1069,7 +1045,7 @@ var SelectLabel = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1069
1045
|
}
|
|
1070
1046
|
));
|
|
1071
1047
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1072
|
-
var SelectItem =
|
|
1048
|
+
var SelectItem = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1073
1049
|
SelectPrimitive.Item,
|
|
1074
1050
|
{
|
|
1075
1051
|
ref,
|
|
@@ -1079,13 +1055,13 @@ var SelectItem = React17.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1079
1055
|
),
|
|
1080
1056
|
...props,
|
|
1081
1057
|
children: [
|
|
1082
|
-
/* @__PURE__ */ (0,
|
|
1083
|
-
/* @__PURE__ */ (0,
|
|
1058
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.Check, { className: "h-4 w-4" }) }) }),
|
|
1059
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectPrimitive.ItemText, { children })
|
|
1084
1060
|
]
|
|
1085
1061
|
}
|
|
1086
1062
|
));
|
|
1087
1063
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1088
|
-
var SelectSeparator =
|
|
1064
|
+
var SelectSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1089
1065
|
SelectPrimitive.Separator,
|
|
1090
1066
|
{
|
|
1091
1067
|
ref,
|
|
@@ -1096,8 +1072,8 @@ var SelectSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1096
1072
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1097
1073
|
|
|
1098
1074
|
// src/components/select/Select.tsx
|
|
1099
|
-
var
|
|
1100
|
-
var selectVariants = (0,
|
|
1075
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1076
|
+
var selectVariants = (0, import_class_variance_authority9.cva)(
|
|
1101
1077
|
"flex w-full items-center justify-between rounded-berget-xs border bg-card px-4 py-3 text-sm transition-colors duration-200 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-berget-form-focus-border disabled:cursor-not-allowed disabled:opacity-50",
|
|
1102
1078
|
{
|
|
1103
1079
|
variants: {
|
|
@@ -1119,7 +1095,7 @@ var selectVariants = (0, import_class_variance_authority10.cva)(
|
|
|
1119
1095
|
}
|
|
1120
1096
|
}
|
|
1121
1097
|
);
|
|
1122
|
-
var Select2 =
|
|
1098
|
+
var Select2 = React17.forwardRef(
|
|
1123
1099
|
({
|
|
1124
1100
|
className,
|
|
1125
1101
|
variant,
|
|
@@ -1137,12 +1113,12 @@ var Select2 = React18.forwardRef(
|
|
|
1137
1113
|
name,
|
|
1138
1114
|
required
|
|
1139
1115
|
}, ref) => {
|
|
1140
|
-
const generatedId =
|
|
1116
|
+
const generatedId = React17.useId();
|
|
1141
1117
|
const selectId = id || generatedId;
|
|
1142
1118
|
const errorId = `${selectId}-error`;
|
|
1143
1119
|
const descriptionId = `${selectId}-description`;
|
|
1144
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
-
label && /* @__PURE__ */ (0,
|
|
1120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1121
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1146
1122
|
"label",
|
|
1147
1123
|
{
|
|
1148
1124
|
htmlFor: selectId,
|
|
@@ -1154,7 +1130,7 @@ var Select2 = React18.forwardRef(
|
|
|
1154
1130
|
children: label
|
|
1155
1131
|
}
|
|
1156
1132
|
),
|
|
1157
|
-
/* @__PURE__ */ (0,
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1158
1134
|
Select,
|
|
1159
1135
|
{
|
|
1160
1136
|
value,
|
|
@@ -1164,7 +1140,7 @@ var Select2 = React18.forwardRef(
|
|
|
1164
1140
|
name,
|
|
1165
1141
|
required,
|
|
1166
1142
|
children: [
|
|
1167
|
-
/* @__PURE__ */ (0,
|
|
1143
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1168
1144
|
SelectTrigger,
|
|
1169
1145
|
{
|
|
1170
1146
|
ref,
|
|
@@ -1176,30 +1152,30 @@ var Select2 = React18.forwardRef(
|
|
|
1176
1152
|
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1177
1153
|
className
|
|
1178
1154
|
),
|
|
1179
|
-
children: /* @__PURE__ */ (0,
|
|
1155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectValue, { placeholder })
|
|
1180
1156
|
}
|
|
1181
1157
|
),
|
|
1182
|
-
/* @__PURE__ */ (0,
|
|
1158
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectContent, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1183
1159
|
]
|
|
1184
1160
|
}
|
|
1185
1161
|
),
|
|
1186
|
-
description && /* @__PURE__ */ (0,
|
|
1187
|
-
error && /* @__PURE__ */ (0,
|
|
1162
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1163
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1188
1164
|
] });
|
|
1189
1165
|
}
|
|
1190
1166
|
);
|
|
1191
1167
|
Select2.displayName = "Select";
|
|
1192
1168
|
|
|
1193
1169
|
// src/components/text-area/TextArea.tsx
|
|
1194
|
-
var
|
|
1195
|
-
var
|
|
1170
|
+
var React19 = __toESM(require("react"), 1);
|
|
1171
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1196
1172
|
|
|
1197
1173
|
// src/primitives/textarea.tsx
|
|
1198
|
-
var
|
|
1199
|
-
var
|
|
1200
|
-
var Textarea =
|
|
1174
|
+
var React18 = __toESM(require("react"), 1);
|
|
1175
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1176
|
+
var Textarea = React18.forwardRef(
|
|
1201
1177
|
({ className, ...props }, ref) => {
|
|
1202
|
-
return /* @__PURE__ */ (0,
|
|
1178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1203
1179
|
"textarea",
|
|
1204
1180
|
{
|
|
1205
1181
|
className: cn(
|
|
@@ -1215,8 +1191,8 @@ var Textarea = React19.forwardRef(
|
|
|
1215
1191
|
Textarea.displayName = "Textarea";
|
|
1216
1192
|
|
|
1217
1193
|
// src/components/text-area/TextArea.tsx
|
|
1218
|
-
var
|
|
1219
|
-
var textAreaVariants = (0,
|
|
1194
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1195
|
+
var textAreaVariants = (0, import_class_variance_authority10.cva)(
|
|
1220
1196
|
"rounded-berget-xs bg-card px-4 py-3 transition-colors duration-200 focus-visible:border-berget-form-focus-border focus-visible:ring-0 focus-visible:ring-offset-0 resize-y",
|
|
1221
1197
|
{
|
|
1222
1198
|
variants: {
|
|
@@ -1238,7 +1214,7 @@ var textAreaVariants = (0, import_class_variance_authority11.cva)(
|
|
|
1238
1214
|
}
|
|
1239
1215
|
}
|
|
1240
1216
|
);
|
|
1241
|
-
var TextArea =
|
|
1217
|
+
var TextArea = React19.forwardRef(
|
|
1242
1218
|
({
|
|
1243
1219
|
className,
|
|
1244
1220
|
variant,
|
|
@@ -1258,13 +1234,13 @@ var TextArea = React20.forwardRef(
|
|
|
1258
1234
|
actionButton,
|
|
1259
1235
|
...props
|
|
1260
1236
|
}, ref) => {
|
|
1261
|
-
const generatedId =
|
|
1237
|
+
const generatedId = React19.useId();
|
|
1262
1238
|
const textareaId = id || generatedId;
|
|
1263
1239
|
const errorId = `${textareaId}-error`;
|
|
1264
1240
|
const descriptionId = `${textareaId}-description`;
|
|
1265
1241
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
1266
|
-
return /* @__PURE__ */ (0,
|
|
1267
|
-
label && /* @__PURE__ */ (0,
|
|
1242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1243
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1268
1244
|
"label",
|
|
1269
1245
|
{
|
|
1270
1246
|
htmlFor: textareaId,
|
|
@@ -1276,9 +1252,9 @@ var TextArea = React20.forwardRef(
|
|
|
1276
1252
|
children: label
|
|
1277
1253
|
}
|
|
1278
1254
|
),
|
|
1279
|
-
/* @__PURE__ */ (0,
|
|
1280
|
-
icon && /* @__PURE__ */ (0,
|
|
1281
|
-
/* @__PURE__ */ (0,
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative", children: [
|
|
1256
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1282
1258
|
Textarea,
|
|
1283
1259
|
{
|
|
1284
1260
|
ref,
|
|
@@ -1303,13 +1279,13 @@ var TextArea = React20.forwardRef(
|
|
|
1303
1279
|
...props
|
|
1304
1280
|
}
|
|
1305
1281
|
),
|
|
1306
|
-
secondaryIcon && /* @__PURE__ */ (0,
|
|
1307
|
-
actionButton && /* @__PURE__ */ (0,
|
|
1282
|
+
secondaryIcon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
1283
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1308
1284
|
] }),
|
|
1309
|
-
(description || error || showCount && maxLength) && /* @__PURE__ */ (0,
|
|
1310
|
-
description && /* @__PURE__ */ (0,
|
|
1311
|
-
(error || showCount && maxLength) && /* @__PURE__ */ (0,
|
|
1312
|
-
showCount && maxLength && /* @__PURE__ */ (0,
|
|
1285
|
+
(description || error || showCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1286
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1287
|
+
(error || showCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
1288
|
+
showCount && maxLength && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1313
1289
|
Typography,
|
|
1314
1290
|
{
|
|
1315
1291
|
variant: "xs",
|
|
@@ -1323,7 +1299,7 @@ var TextArea = React20.forwardRef(
|
|
|
1323
1299
|
]
|
|
1324
1300
|
}
|
|
1325
1301
|
),
|
|
1326
|
-
error && /* @__PURE__ */ (0,
|
|
1302
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1327
1303
|
Typography,
|
|
1328
1304
|
{
|
|
1329
1305
|
variant: "xs",
|
|
@@ -1340,25 +1316,25 @@ var TextArea = React20.forwardRef(
|
|
|
1340
1316
|
TextArea.displayName = "TextArea";
|
|
1341
1317
|
|
|
1342
1318
|
// src/primitives/label.tsx
|
|
1343
|
-
var
|
|
1319
|
+
var React20 = __toESM(require("react"), 1);
|
|
1344
1320
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
1345
|
-
var
|
|
1346
|
-
var
|
|
1347
|
-
var labelVariants = (0,
|
|
1321
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1322
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1323
|
+
var labelVariants = (0, import_class_variance_authority11.cva)(
|
|
1348
1324
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1349
1325
|
);
|
|
1350
|
-
var Label2 =
|
|
1326
|
+
var Label2 = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1351
1327
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1352
1328
|
|
|
1353
1329
|
// src/primitives/field.tsx
|
|
1354
1330
|
var import_react = require("react");
|
|
1355
|
-
var
|
|
1331
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1356
1332
|
|
|
1357
1333
|
// src/primitives/separator.tsx
|
|
1358
|
-
var
|
|
1334
|
+
var React21 = __toESM(require("react"), 1);
|
|
1359
1335
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
1360
|
-
var
|
|
1361
|
-
var Separator2 =
|
|
1336
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1337
|
+
var Separator2 = React21.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1362
1338
|
SeparatorPrimitive.Root,
|
|
1363
1339
|
{
|
|
1364
1340
|
ref,
|
|
@@ -1375,9 +1351,9 @@ var Separator2 = React22.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1375
1351
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1376
1352
|
|
|
1377
1353
|
// src/primitives/field.tsx
|
|
1378
|
-
var
|
|
1354
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1379
1355
|
function FieldSet({ className, ...props }) {
|
|
1380
|
-
return /* @__PURE__ */ (0,
|
|
1356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1381
1357
|
"fieldset",
|
|
1382
1358
|
{
|
|
1383
1359
|
"data-slot": "field-set",
|
|
@@ -1395,7 +1371,7 @@ function FieldLegend({
|
|
|
1395
1371
|
variant = "legend",
|
|
1396
1372
|
...props
|
|
1397
1373
|
}) {
|
|
1398
|
-
return /* @__PURE__ */ (0,
|
|
1374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1399
1375
|
"legend",
|
|
1400
1376
|
{
|
|
1401
1377
|
"data-slot": "field-legend",
|
|
@@ -1411,7 +1387,7 @@ function FieldLegend({
|
|
|
1411
1387
|
);
|
|
1412
1388
|
}
|
|
1413
1389
|
function FieldGroup({ className, ...props }) {
|
|
1414
|
-
return /* @__PURE__ */ (0,
|
|
1390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1415
1391
|
"div",
|
|
1416
1392
|
{
|
|
1417
1393
|
"data-slot": "field-group",
|
|
@@ -1423,7 +1399,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
1423
1399
|
}
|
|
1424
1400
|
);
|
|
1425
1401
|
}
|
|
1426
|
-
var fieldVariants = (0,
|
|
1402
|
+
var fieldVariants = (0, import_class_variance_authority12.cva)("group/field data-[invalid=true]:text-destructive flex w-full gap-3", {
|
|
1427
1403
|
variants: {
|
|
1428
1404
|
orientation: {
|
|
1429
1405
|
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
@@ -1448,7 +1424,7 @@ function Field({
|
|
|
1448
1424
|
orientation = "vertical",
|
|
1449
1425
|
...props
|
|
1450
1426
|
}) {
|
|
1451
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1452
1428
|
"div",
|
|
1453
1429
|
{
|
|
1454
1430
|
role: "group",
|
|
@@ -1460,7 +1436,7 @@ function Field({
|
|
|
1460
1436
|
);
|
|
1461
1437
|
}
|
|
1462
1438
|
function FieldContent({ className, ...props }) {
|
|
1463
|
-
return /* @__PURE__ */ (0,
|
|
1439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1464
1440
|
"div",
|
|
1465
1441
|
{
|
|
1466
1442
|
"data-slot": "field-content",
|
|
@@ -1470,7 +1446,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1470
1446
|
);
|
|
1471
1447
|
}
|
|
1472
1448
|
function FieldLabel({ className, ...props }) {
|
|
1473
|
-
return /* @__PURE__ */ (0,
|
|
1449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1474
1450
|
Label2,
|
|
1475
1451
|
{
|
|
1476
1452
|
"data-slot": "field-label",
|
|
@@ -1485,7 +1461,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1485
1461
|
);
|
|
1486
1462
|
}
|
|
1487
1463
|
function FieldTitle({ className, ...props }) {
|
|
1488
|
-
return /* @__PURE__ */ (0,
|
|
1464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1489
1465
|
"div",
|
|
1490
1466
|
{
|
|
1491
1467
|
"data-slot": "field-label",
|
|
@@ -1498,7 +1474,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1498
1474
|
);
|
|
1499
1475
|
}
|
|
1500
1476
|
function FieldDescription({ className, ...props }) {
|
|
1501
|
-
return /* @__PURE__ */ (0,
|
|
1477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1502
1478
|
"p",
|
|
1503
1479
|
{
|
|
1504
1480
|
"data-slot": "field-description",
|
|
@@ -1517,7 +1493,7 @@ function FieldSeparator({
|
|
|
1517
1493
|
className,
|
|
1518
1494
|
...props
|
|
1519
1495
|
}) {
|
|
1520
|
-
return /* @__PURE__ */ (0,
|
|
1496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1521
1497
|
"div",
|
|
1522
1498
|
{
|
|
1523
1499
|
"data-slot": "field-separator",
|
|
@@ -1528,8 +1504,8 @@ function FieldSeparator({
|
|
|
1528
1504
|
),
|
|
1529
1505
|
...props,
|
|
1530
1506
|
children: [
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
1532
|
-
children && /* @__PURE__ */ (0,
|
|
1507
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
1508
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1533
1509
|
"span",
|
|
1534
1510
|
{
|
|
1535
1511
|
className: "bg-berget-background text-berget-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -1557,12 +1533,12 @@ function FieldError({
|
|
|
1557
1533
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
1558
1534
|
return errors[0].message;
|
|
1559
1535
|
}
|
|
1560
|
-
return /* @__PURE__ */ (0,
|
|
1536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map((error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { children: error.message }, index)) });
|
|
1561
1537
|
}, [children, errors]);
|
|
1562
1538
|
if (!content) {
|
|
1563
1539
|
return null;
|
|
1564
1540
|
}
|
|
1565
|
-
return /* @__PURE__ */ (0,
|
|
1541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1566
1542
|
"div",
|
|
1567
1543
|
{
|
|
1568
1544
|
role: "alert",
|
|
@@ -1576,10 +1552,46 @@ function FieldError({
|
|
|
1576
1552
|
|
|
1577
1553
|
// src/components/link/Link.tsx
|
|
1578
1554
|
var React23 = __toESM(require("react"), 1);
|
|
1579
|
-
var
|
|
1555
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
1556
|
+
|
|
1557
|
+
// src/components/icon/Icon.tsx
|
|
1558
|
+
var React22 = __toESM(require("react"), 1);
|
|
1559
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1560
|
+
var iconStrokeMap = {
|
|
1561
|
+
16: 1.4,
|
|
1562
|
+
24: 1.6,
|
|
1563
|
+
32: 1.8
|
|
1564
|
+
};
|
|
1565
|
+
var Icon2 = React22.forwardRef(
|
|
1566
|
+
({
|
|
1567
|
+
icon: IconComponent,
|
|
1568
|
+
size,
|
|
1569
|
+
className,
|
|
1570
|
+
"aria-label": ariaLabel,
|
|
1571
|
+
"aria-hidden": ariaHidden = true,
|
|
1572
|
+
...props
|
|
1573
|
+
}, ref) => {
|
|
1574
|
+
const strokeWidth = iconStrokeMap[size];
|
|
1575
|
+
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
1576
|
+
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
1577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1578
|
+
IconComponent,
|
|
1579
|
+
{
|
|
1580
|
+
ref,
|
|
1581
|
+
className: cn(sizeClass, className),
|
|
1582
|
+
strokeWidth,
|
|
1583
|
+
...ariaAttributes,
|
|
1584
|
+
...props
|
|
1585
|
+
}
|
|
1586
|
+
);
|
|
1587
|
+
}
|
|
1588
|
+
);
|
|
1589
|
+
Icon2.displayName = "Icon";
|
|
1590
|
+
|
|
1591
|
+
// src/components/link/Link.tsx
|
|
1580
1592
|
var import_lucide_react5 = require("lucide-react");
|
|
1581
1593
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1582
|
-
var linkVariants = (0,
|
|
1594
|
+
var linkVariants = (0, import_class_variance_authority13.cva)(
|
|
1583
1595
|
"inline-flex 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",
|
|
1584
1596
|
{
|
|
1585
1597
|
variants: {
|
|
@@ -1633,7 +1645,7 @@ var Link = React23.forwardRef(
|
|
|
1633
1645
|
children: [
|
|
1634
1646
|
children,
|
|
1635
1647
|
icon && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "inline-flex items-center", children: icon }),
|
|
1636
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1648
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon2, { icon: import_lucide_react5.ExternalLink, size: 16 }) })
|
|
1637
1649
|
]
|
|
1638
1650
|
}
|
|
1639
1651
|
);
|
|
@@ -1643,14 +1655,14 @@ Link.displayName = "Link";
|
|
|
1643
1655
|
|
|
1644
1656
|
// src/components/section/Section.tsx
|
|
1645
1657
|
var React25 = __toESM(require("react"), 1);
|
|
1646
|
-
var
|
|
1658
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
1647
1659
|
|
|
1648
1660
|
// src/components/container/Container.tsx
|
|
1649
1661
|
var React24 = __toESM(require("react"), 1);
|
|
1650
1662
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1651
|
-
var
|
|
1663
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
1652
1664
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1653
|
-
var containerVariants = (0,
|
|
1665
|
+
var containerVariants = (0, import_class_variance_authority14.cva)("w-full mx-auto", {
|
|
1654
1666
|
variants: {
|
|
1655
1667
|
size: {
|
|
1656
1668
|
sm: "max-w-3xl",
|
|
@@ -1689,7 +1701,7 @@ Container.displayName = "Container";
|
|
|
1689
1701
|
|
|
1690
1702
|
// src/components/section/Section.tsx
|
|
1691
1703
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1692
|
-
var sectionVariants = (0,
|
|
1704
|
+
var sectionVariants = (0, import_class_variance_authority15.cva)("relative", {
|
|
1693
1705
|
variants: {
|
|
1694
1706
|
padding: {
|
|
1695
1707
|
none: "",
|
|
@@ -1763,10 +1775,10 @@ SectionHeader.displayName = "SectionHeader";
|
|
|
1763
1775
|
|
|
1764
1776
|
// src/components/grid/Grid.tsx
|
|
1765
1777
|
var React27 = __toESM(require("react"), 1);
|
|
1766
|
-
var
|
|
1778
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
1767
1779
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1768
1780
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1769
|
-
var gridVariants = (0,
|
|
1781
|
+
var gridVariants = (0, import_class_variance_authority16.cva)("grid", {
|
|
1770
1782
|
variants: {
|
|
1771
1783
|
align: {
|
|
1772
1784
|
start: "items-start",
|
|
@@ -1814,10 +1826,10 @@ Grid.displayName = "Grid";
|
|
|
1814
1826
|
|
|
1815
1827
|
// src/components/box/Box.tsx
|
|
1816
1828
|
var React28 = __toESM(require("react"), 1);
|
|
1817
|
-
var
|
|
1829
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
1818
1830
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
1819
1831
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1820
|
-
var boxVariants = (0,
|
|
1832
|
+
var boxVariants = (0, import_class_variance_authority17.cva)("flex", {
|
|
1821
1833
|
variants: {
|
|
1822
1834
|
direction: {
|
|
1823
1835
|
row: "flex-row",
|
|
@@ -1991,7 +2003,7 @@ BergetLogo.displayName = "BergetLogo";
|
|
|
1991
2003
|
|
|
1992
2004
|
// src/components/header/Header.tsx
|
|
1993
2005
|
var React31 = __toESM(require("react"), 1);
|
|
1994
|
-
var
|
|
2006
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
1995
2007
|
var import_lucide_react7 = require("lucide-react");
|
|
1996
2008
|
|
|
1997
2009
|
// src/components/language-select/LanguageSelect.tsx
|
|
@@ -2022,7 +2034,7 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
|
|
|
2022
2034
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
2023
2035
|
className
|
|
2024
2036
|
),
|
|
2025
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon2, { icon: import_lucide_react6.Globe, size: 16 })
|
|
2026
2038
|
}
|
|
2027
2039
|
),
|
|
2028
2040
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -2082,7 +2094,7 @@ LanguageSelect.displayName = "LanguageSelect";
|
|
|
2082
2094
|
|
|
2083
2095
|
// src/components/header/Header.tsx
|
|
2084
2096
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2085
|
-
var headerVariants = (0,
|
|
2097
|
+
var headerVariants = (0, import_class_variance_authority18.cva)(
|
|
2086
2098
|
"sticky top-0 z-50 header-backdrop backdrop-blur-xl border-b border-berget-border transition-all duration-200",
|
|
2087
2099
|
{
|
|
2088
2100
|
variants: {
|
|
@@ -2115,7 +2127,7 @@ var HeaderNav = React31.forwardRef(({ className, links, ...props }, ref) => {
|
|
|
2115
2127
|
size: "sm",
|
|
2116
2128
|
className: cn("relative transition-all duration-200", link.active && "font-medium"),
|
|
2117
2129
|
children: [
|
|
2118
|
-
link.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2130
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon2, { icon: link.icon, size: 16 }) }),
|
|
2119
2131
|
link.label
|
|
2120
2132
|
]
|
|
2121
2133
|
}
|
|
@@ -2164,7 +2176,7 @@ var MobileMenuButton = React31.forwardRef(({ className, ...props }, ref) => {
|
|
|
2164
2176
|
"aria-expanded": isMobileMenuOpen,
|
|
2165
2177
|
"aria-controls": "mobile-menu",
|
|
2166
2178
|
...props,
|
|
2167
|
-
children: isMobileMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2179
|
+
children: isMobileMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon2, { icon: import_lucide_react7.X, size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon2, { icon: import_lucide_react7.Menu, size: 16 })
|
|
2168
2180
|
}
|
|
2169
2181
|
);
|
|
2170
2182
|
});
|
|
@@ -2205,7 +2217,7 @@ var MobileMenu = React31.forwardRef(
|
|
|
2205
2217
|
),
|
|
2206
2218
|
onClick: () => setIsMobileMenuOpen(false),
|
|
2207
2219
|
children: [
|
|
2208
|
-
link.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2220
|
+
link.icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon2, { icon: link.icon, size: 16 }) }),
|
|
2209
2221
|
link.label
|
|
2210
2222
|
]
|
|
2211
2223
|
}
|
|
@@ -2289,16 +2301,16 @@ Header.displayName = "Header";
|
|
|
2289
2301
|
|
|
2290
2302
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2291
2303
|
var React34 = __toESM(require("react"), 1);
|
|
2292
|
-
var
|
|
2304
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
2293
2305
|
|
|
2294
2306
|
// src/components/list/List.tsx
|
|
2295
2307
|
var React33 = __toESM(require("react"), 1);
|
|
2296
2308
|
|
|
2297
2309
|
// src/components/divider/Divider.tsx
|
|
2298
2310
|
var React32 = __toESM(require("react"), 1);
|
|
2299
|
-
var
|
|
2311
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
2300
2312
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2301
|
-
var dividerVariants = (0,
|
|
2313
|
+
var dividerVariants = (0, import_class_variance_authority19.cva)("", {
|
|
2302
2314
|
variants: {
|
|
2303
2315
|
variant: {
|
|
2304
2316
|
default: "bg-berget-separator",
|
|
@@ -2410,7 +2422,7 @@ ListHeader.displayName = "ListHeader";
|
|
|
2410
2422
|
var FeatureList = React33.forwardRef(
|
|
2411
2423
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2412
2424
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("li", { className: "flex items-start gap-fluid-md", children: [
|
|
2413
|
-
variant === "bullet" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2425
|
+
variant === "bullet" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon2, { icon: import_lucide_react8.Check, size: 24, className: "text-berget-logo-light" }) }),
|
|
2414
2426
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typography, { variant: "body", color: "muted", children: item })
|
|
2415
2427
|
] }, index)) });
|
|
2416
2428
|
}
|
|
@@ -2419,7 +2431,7 @@ FeatureList.displayName = "FeatureList";
|
|
|
2419
2431
|
|
|
2420
2432
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2421
2433
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2422
|
-
var featureCardVariants = (0,
|
|
2434
|
+
var featureCardVariants = (0, import_class_variance_authority20.cva)("", {
|
|
2423
2435
|
variants: {
|
|
2424
2436
|
variant: {
|
|
2425
2437
|
highlight: "",
|
|
@@ -2509,9 +2521,9 @@ FeatureCards.displayName = "FeatureCards";
|
|
|
2509
2521
|
|
|
2510
2522
|
// src/components/hero-block/HeroBlock.tsx
|
|
2511
2523
|
var React35 = __toESM(require("react"), 1);
|
|
2512
|
-
var
|
|
2524
|
+
var import_class_variance_authority21 = require("class-variance-authority");
|
|
2513
2525
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2514
|
-
var heroBlockVariants = (0,
|
|
2526
|
+
var heroBlockVariants = (0, import_class_variance_authority21.cva)(
|
|
2515
2527
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2516
2528
|
{
|
|
2517
2529
|
variants: {
|
|
@@ -2554,7 +2566,7 @@ var HeroBlock = React35.forwardRef(
|
|
|
2554
2566
|
Badge,
|
|
2555
2567
|
{
|
|
2556
2568
|
variant: "default",
|
|
2557
|
-
icon: TaglineIcon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2569
|
+
icon: TaglineIcon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon2, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2558
2570
|
iconGap: 2,
|
|
2559
2571
|
className: "mb-fluid-md",
|
|
2560
2572
|
children: tagline
|