@bergetai/ui 0.1.83 → 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 +305 -310
- 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 +287 -292
- 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,92 +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
|
|
418
|
-
const
|
|
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
|
+
);
|
|
419
394
|
if (asChild) {
|
|
420
|
-
return /* @__PURE__ */ (0,
|
|
395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
421
396
|
Button,
|
|
422
397
|
{
|
|
423
|
-
className:
|
|
398
|
+
className: baseClass,
|
|
424
399
|
ref,
|
|
425
400
|
asChild: true,
|
|
426
401
|
type,
|
|
@@ -431,35 +406,19 @@ var Button2 = React5.forwardRef(
|
|
|
431
406
|
}
|
|
432
407
|
);
|
|
433
408
|
}
|
|
434
|
-
return /* @__PURE__ */ (0,
|
|
409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
435
410
|
Button,
|
|
436
411
|
{
|
|
437
|
-
className:
|
|
412
|
+
className: baseClass,
|
|
438
413
|
ref,
|
|
439
414
|
type,
|
|
440
415
|
"aria-disabled": isLoading || void 0,
|
|
441
416
|
"aria-busy": isLoading || void 0,
|
|
442
417
|
...props,
|
|
443
|
-
children: [
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
] }),
|
|
448
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
449
|
-
"span",
|
|
450
|
-
{
|
|
451
|
-
className: cn(
|
|
452
|
-
"inline-flex items-center",
|
|
453
|
-
!isIcon && "gap-2",
|
|
454
|
-
isHighlight && "relative z-10"
|
|
455
|
-
),
|
|
456
|
-
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
457
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, { icon: import_lucide_react.Loader2, size: 16, className: "animate-spin", "aria-hidden": true }),
|
|
458
|
-
!isIcon && children
|
|
459
|
-
] }) : children
|
|
460
|
-
}
|
|
461
|
-
)
|
|
462
|
-
]
|
|
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" }),
|
|
420
|
+
!isIcon && children
|
|
421
|
+
] }) : children })
|
|
463
422
|
}
|
|
464
423
|
);
|
|
465
424
|
}
|
|
@@ -467,10 +426,10 @@ var Button2 = React5.forwardRef(
|
|
|
467
426
|
Button2.displayName = "Button";
|
|
468
427
|
|
|
469
428
|
// src/components/typography/Typography.tsx
|
|
470
|
-
var
|
|
471
|
-
var
|
|
472
|
-
var
|
|
473
|
-
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)("", {
|
|
474
433
|
variants: {
|
|
475
434
|
variant: {
|
|
476
435
|
// Fluid heading scale — use @theme tokens (clamp-based, 390px → 1440px)
|
|
@@ -514,10 +473,10 @@ var defaultElementMap = {
|
|
|
514
473
|
mono: "p",
|
|
515
474
|
code: "span"
|
|
516
475
|
};
|
|
517
|
-
var Typography =
|
|
476
|
+
var Typography = React5.forwardRef(
|
|
518
477
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
519
478
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
520
|
-
return /* @__PURE__ */ (0,
|
|
479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
521
480
|
Component,
|
|
522
481
|
{
|
|
523
482
|
className: cn(typographyVariants({ variant, color }), className),
|
|
@@ -531,14 +490,14 @@ var Typography = React6.forwardRef(
|
|
|
531
490
|
Typography.displayName = "Typography";
|
|
532
491
|
|
|
533
492
|
// src/components/card/Card.tsx
|
|
534
|
-
var
|
|
535
|
-
var
|
|
493
|
+
var React7 = __toESM(require("react"), 1);
|
|
494
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
536
495
|
|
|
537
496
|
// src/primitives/card.tsx
|
|
538
|
-
var
|
|
539
|
-
var
|
|
540
|
-
var Card =
|
|
541
|
-
({ 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)(
|
|
542
501
|
"div",
|
|
543
502
|
{
|
|
544
503
|
ref,
|
|
@@ -548,30 +507,30 @@ var Card = React7.forwardRef(
|
|
|
548
507
|
)
|
|
549
508
|
);
|
|
550
509
|
Card.displayName = "Card";
|
|
551
|
-
var CardHeader =
|
|
552
|
-
({ 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 })
|
|
553
512
|
);
|
|
554
513
|
CardHeader.displayName = "CardHeader";
|
|
555
|
-
var CardTitle =
|
|
556
|
-
({ 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 })
|
|
557
516
|
);
|
|
558
517
|
CardTitle.displayName = "CardTitle";
|
|
559
|
-
var CardDescription =
|
|
560
|
-
({ 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 })
|
|
561
520
|
);
|
|
562
521
|
CardDescription.displayName = "CardDescription";
|
|
563
|
-
var CardContent =
|
|
564
|
-
({ 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 })
|
|
565
524
|
);
|
|
566
525
|
CardContent.displayName = "CardContent";
|
|
567
|
-
var CardFooter =
|
|
568
|
-
({ 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 })
|
|
569
528
|
);
|
|
570
529
|
CardFooter.displayName = "CardFooter";
|
|
571
530
|
|
|
572
531
|
// src/components/card/Card.tsx
|
|
573
|
-
var
|
|
574
|
-
var cardVariants = (0,
|
|
532
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
533
|
+
var cardVariants = (0, import_class_variance_authority3.cva)("rounded-berget-sm", {
|
|
575
534
|
variants: {
|
|
576
535
|
variant: {
|
|
577
536
|
outlined: "bg-transparent border border-berget-border",
|
|
@@ -589,9 +548,9 @@ var cardVariants = (0, import_class_variance_authority4.cva)("rounded-berget-sm"
|
|
|
589
548
|
padding: "md"
|
|
590
549
|
}
|
|
591
550
|
});
|
|
592
|
-
var Card2 =
|
|
551
|
+
var Card2 = React7.forwardRef(
|
|
593
552
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
594
|
-
return /* @__PURE__ */ (0,
|
|
553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
595
554
|
Card,
|
|
596
555
|
{
|
|
597
556
|
ref,
|
|
@@ -605,10 +564,10 @@ var Card2 = React8.forwardRef(
|
|
|
605
564
|
Card2.displayName = "Card";
|
|
606
565
|
|
|
607
566
|
// src/components/badge/Badge.tsx
|
|
608
|
-
var
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
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)(
|
|
612
571
|
"inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2",
|
|
613
572
|
{
|
|
614
573
|
variants: {
|
|
@@ -640,10 +599,10 @@ var badgeVariants = (0, import_class_variance_authority5.cva)(
|
|
|
640
599
|
}
|
|
641
600
|
}
|
|
642
601
|
);
|
|
643
|
-
var Badge =
|
|
602
|
+
var Badge = React8.forwardRef(
|
|
644
603
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
645
|
-
return /* @__PURE__ */ (0,
|
|
646
|
-
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 }),
|
|
647
606
|
children
|
|
648
607
|
] });
|
|
649
608
|
}
|
|
@@ -651,14 +610,14 @@ var Badge = React9.forwardRef(
|
|
|
651
610
|
Badge.displayName = "Badge";
|
|
652
611
|
|
|
653
612
|
// src/components/alert/Alert.tsx
|
|
654
|
-
var React11 = __toESM(require("react"), 1);
|
|
655
|
-
var import_class_variance_authority7 = require("class-variance-authority");
|
|
656
|
-
|
|
657
|
-
// src/primitives/alert.tsx
|
|
658
613
|
var React10 = __toESM(require("react"), 1);
|
|
659
614
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
660
|
-
|
|
661
|
-
|
|
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)(
|
|
662
621
|
"relative w-full rounded-lg p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",
|
|
663
622
|
{
|
|
664
623
|
variants: {
|
|
@@ -672,18 +631,18 @@ var alertVariants = (0, import_class_variance_authority6.cva)(
|
|
|
672
631
|
}
|
|
673
632
|
}
|
|
674
633
|
);
|
|
675
|
-
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 }));
|
|
676
635
|
Alert.displayName = "Alert";
|
|
677
|
-
var AlertTitle =
|
|
678
|
-
({ 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 })
|
|
679
638
|
);
|
|
680
639
|
AlertTitle.displayName = "AlertTitle";
|
|
681
|
-
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 }));
|
|
682
641
|
AlertDescription.displayName = "AlertDescription";
|
|
683
642
|
|
|
684
643
|
// src/components/alert/Alert.tsx
|
|
685
|
-
var
|
|
686
|
-
var alertVariants2 = (0,
|
|
644
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
645
|
+
var alertVariants2 = (0, import_class_variance_authority6.cva)("", {
|
|
687
646
|
variants: {
|
|
688
647
|
variant: {
|
|
689
648
|
default: "border-berget-border",
|
|
@@ -697,20 +656,20 @@ var alertVariants2 = (0, import_class_variance_authority7.cva)("", {
|
|
|
697
656
|
variant: "default"
|
|
698
657
|
}
|
|
699
658
|
});
|
|
700
|
-
var Alert2 =
|
|
701
|
-
({ 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 })
|
|
702
661
|
);
|
|
703
662
|
Alert2.displayName = "Alert";
|
|
704
663
|
|
|
705
664
|
// src/components/input/Input.tsx
|
|
706
|
-
var
|
|
665
|
+
var React12 = __toESM(require("react"), 1);
|
|
707
666
|
|
|
708
667
|
// src/primitives/input.tsx
|
|
709
|
-
var
|
|
710
|
-
var
|
|
711
|
-
var Input =
|
|
668
|
+
var React11 = __toESM(require("react"), 1);
|
|
669
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
670
|
+
var Input = React11.forwardRef(
|
|
712
671
|
({ className, type, ...props }, ref) => {
|
|
713
|
-
return /* @__PURE__ */ (0,
|
|
672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
714
673
|
"input",
|
|
715
674
|
{
|
|
716
675
|
type,
|
|
@@ -727,14 +686,14 @@ var Input = React12.forwardRef(
|
|
|
727
686
|
Input.displayName = "Input";
|
|
728
687
|
|
|
729
688
|
// src/components/input/Input.tsx
|
|
730
|
-
var
|
|
731
|
-
var Input2 =
|
|
689
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
690
|
+
var Input2 = React12.forwardRef(
|
|
732
691
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
733
|
-
const generatedId =
|
|
692
|
+
const generatedId = React12.useId();
|
|
734
693
|
const inputId = id || generatedId;
|
|
735
694
|
const errorId = `${inputId}-error`;
|
|
736
695
|
const descriptionId = `${inputId}-description`;
|
|
737
|
-
const inputElement = /* @__PURE__ */ (0,
|
|
696
|
+
const inputElement = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
738
697
|
Input,
|
|
739
698
|
{
|
|
740
699
|
ref,
|
|
@@ -754,8 +713,8 @@ var Input2 = React13.forwardRef(
|
|
|
754
713
|
}
|
|
755
714
|
);
|
|
756
715
|
if (!icon && !actionButton) {
|
|
757
|
-
return /* @__PURE__ */ (0,
|
|
758
|
-
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)(
|
|
759
718
|
"label",
|
|
760
719
|
{
|
|
761
720
|
htmlFor: inputId,
|
|
@@ -768,9 +727,9 @@ var Input2 = React13.forwardRef(
|
|
|
768
727
|
}
|
|
769
728
|
),
|
|
770
729
|
inputElement,
|
|
771
|
-
(description || error) && /* @__PURE__ */ (0,
|
|
772
|
-
description && /* @__PURE__ */ (0,
|
|
773
|
-
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)(
|
|
774
733
|
Typography,
|
|
775
734
|
{
|
|
776
735
|
variant: "xs",
|
|
@@ -782,8 +741,8 @@ var Input2 = React13.forwardRef(
|
|
|
782
741
|
] })
|
|
783
742
|
] });
|
|
784
743
|
}
|
|
785
|
-
return /* @__PURE__ */ (0,
|
|
786
|
-
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)(
|
|
787
746
|
"label",
|
|
788
747
|
{
|
|
789
748
|
htmlFor: inputId,
|
|
@@ -795,14 +754,14 @@ var Input2 = React13.forwardRef(
|
|
|
795
754
|
children: label
|
|
796
755
|
}
|
|
797
756
|
),
|
|
798
|
-
/* @__PURE__ */ (0,
|
|
799
|
-
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 }),
|
|
800
759
|
inputElement,
|
|
801
|
-
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 })
|
|
802
761
|
] }),
|
|
803
|
-
(description || error) && /* @__PURE__ */ (0,
|
|
804
|
-
description && /* @__PURE__ */ (0,
|
|
805
|
-
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 })
|
|
806
765
|
] })
|
|
807
766
|
] });
|
|
808
767
|
}
|
|
@@ -810,17 +769,17 @@ var Input2 = React13.forwardRef(
|
|
|
810
769
|
Input2.displayName = "Input";
|
|
811
770
|
|
|
812
771
|
// src/components/checkbox/Checkbox.tsx
|
|
813
|
-
var
|
|
772
|
+
var React14 = __toESM(require("react"), 1);
|
|
814
773
|
var CheckboxPrimitive2 = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
815
774
|
var import_lucide_react3 = require("lucide-react");
|
|
816
|
-
var
|
|
775
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
817
776
|
|
|
818
777
|
// src/primitives/checkbox.tsx
|
|
819
|
-
var
|
|
778
|
+
var React13 = __toESM(require("react"), 1);
|
|
820
779
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
821
780
|
var import_lucide_react2 = require("lucide-react");
|
|
822
|
-
var
|
|
823
|
-
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)(
|
|
824
783
|
CheckboxPrimitive.Root,
|
|
825
784
|
{
|
|
826
785
|
ref,
|
|
@@ -829,24 +788,24 @@ var Checkbox = React14.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
829
788
|
className
|
|
830
789
|
),
|
|
831
790
|
...props,
|
|
832
|
-
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" }) })
|
|
833
792
|
}
|
|
834
793
|
));
|
|
835
794
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
836
|
-
var CheckboxIndicator =
|
|
795
|
+
var CheckboxIndicator = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
837
796
|
CheckboxPrimitive.Indicator,
|
|
838
797
|
{
|
|
839
798
|
ref,
|
|
840
799
|
className: cn("grid place-content-center", className),
|
|
841
800
|
...props,
|
|
842
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
801
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react2.Check, { className: "h-4 w-4" })
|
|
843
802
|
}
|
|
844
803
|
));
|
|
845
804
|
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
846
805
|
|
|
847
806
|
// src/components/checkbox/Checkbox.tsx
|
|
848
|
-
var
|
|
849
|
-
var checkboxVariants = (0,
|
|
807
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
808
|
+
var checkboxVariants = (0, import_class_variance_authority7.cva)(
|
|
850
809
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
851
810
|
{
|
|
852
811
|
variants: {
|
|
@@ -867,13 +826,13 @@ var checkboxVariants = (0, import_class_variance_authority8.cva)(
|
|
|
867
826
|
}
|
|
868
827
|
}
|
|
869
828
|
);
|
|
870
|
-
var Checkbox2 =
|
|
829
|
+
var Checkbox2 = React14.forwardRef(
|
|
871
830
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
872
|
-
const generatedId =
|
|
831
|
+
const generatedId = React14.useId();
|
|
873
832
|
const checkboxId = id || generatedId;
|
|
874
833
|
const errorId = `${checkboxId}-error`;
|
|
875
|
-
return /* @__PURE__ */ (0,
|
|
876
|
-
/* @__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)(
|
|
877
836
|
Checkbox,
|
|
878
837
|
{
|
|
879
838
|
ref,
|
|
@@ -888,7 +847,7 @@ var Checkbox2 = React15.forwardRef(
|
|
|
888
847
|
className
|
|
889
848
|
),
|
|
890
849
|
...props,
|
|
891
|
-
children: /* @__PURE__ */ (0,
|
|
850
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
892
851
|
import_lucide_react3.Check,
|
|
893
852
|
{
|
|
894
853
|
className: "h-4 w-4 text-current stroke-current",
|
|
@@ -897,8 +856,8 @@ var Checkbox2 = React15.forwardRef(
|
|
|
897
856
|
) })
|
|
898
857
|
}
|
|
899
858
|
) }),
|
|
900
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
901
|
-
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)(
|
|
902
861
|
"label",
|
|
903
862
|
{
|
|
904
863
|
htmlFor: checkboxId,
|
|
@@ -910,8 +869,8 @@ var Checkbox2 = React15.forwardRef(
|
|
|
910
869
|
children: label
|
|
911
870
|
}
|
|
912
871
|
),
|
|
913
|
-
description && /* @__PURE__ */ (0,
|
|
914
|
-
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 })
|
|
915
874
|
] })
|
|
916
875
|
] });
|
|
917
876
|
}
|
|
@@ -919,11 +878,11 @@ var Checkbox2 = React15.forwardRef(
|
|
|
919
878
|
Checkbox2.displayName = "Checkbox";
|
|
920
879
|
|
|
921
880
|
// src/components/switch/Switch.tsx
|
|
922
|
-
var
|
|
881
|
+
var React15 = __toESM(require("react"), 1);
|
|
923
882
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
924
|
-
var
|
|
925
|
-
var
|
|
926
|
-
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)(
|
|
927
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",
|
|
928
887
|
{
|
|
929
888
|
variants: {
|
|
@@ -944,7 +903,7 @@ var switchRootVariants = (0, import_class_variance_authority9.cva)(
|
|
|
944
903
|
}
|
|
945
904
|
}
|
|
946
905
|
);
|
|
947
|
-
var switchThumbVariants = (0,
|
|
906
|
+
var switchThumbVariants = (0, import_class_variance_authority8.cva)(
|
|
948
907
|
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
949
908
|
{
|
|
950
909
|
variants: {
|
|
@@ -959,13 +918,13 @@ var switchThumbVariants = (0, import_class_variance_authority9.cva)(
|
|
|
959
918
|
}
|
|
960
919
|
}
|
|
961
920
|
);
|
|
962
|
-
var Switch =
|
|
921
|
+
var Switch = React15.forwardRef(
|
|
963
922
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
964
|
-
const generatedId =
|
|
923
|
+
const generatedId = React15.useId();
|
|
965
924
|
const switchId = id || generatedId;
|
|
966
925
|
const errorId = `${switchId}-error`;
|
|
967
|
-
return /* @__PURE__ */ (0,
|
|
968
|
-
/* @__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)(
|
|
969
928
|
SwitchPrimitives.Root,
|
|
970
929
|
{
|
|
971
930
|
ref,
|
|
@@ -979,11 +938,11 @@ var Switch = React16.forwardRef(
|
|
|
979
938
|
className
|
|
980
939
|
),
|
|
981
940
|
...props,
|
|
982
|
-
children: /* @__PURE__ */ (0,
|
|
941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
983
942
|
}
|
|
984
943
|
),
|
|
985
|
-
(label || description || error) && /* @__PURE__ */ (0,
|
|
986
|
-
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)(
|
|
987
946
|
"label",
|
|
988
947
|
{
|
|
989
948
|
htmlFor: switchId,
|
|
@@ -994,8 +953,8 @@ var Switch = React16.forwardRef(
|
|
|
994
953
|
children: label
|
|
995
954
|
}
|
|
996
955
|
),
|
|
997
|
-
description && /* @__PURE__ */ (0,
|
|
998
|
-
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 })
|
|
999
958
|
] })
|
|
1000
959
|
] });
|
|
1001
960
|
}
|
|
@@ -1003,17 +962,17 @@ var Switch = React16.forwardRef(
|
|
|
1003
962
|
Switch.displayName = "Switch";
|
|
1004
963
|
|
|
1005
964
|
// src/components/select/Select.tsx
|
|
1006
|
-
var
|
|
1007
|
-
var
|
|
965
|
+
var React17 = __toESM(require("react"), 1);
|
|
966
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
1008
967
|
|
|
1009
968
|
// src/primitives/select.tsx
|
|
1010
|
-
var
|
|
969
|
+
var React16 = __toESM(require("react"), 1);
|
|
1011
970
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
1012
971
|
var import_lucide_react4 = require("lucide-react");
|
|
1013
|
-
var
|
|
972
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1014
973
|
var Select = SelectPrimitive.Root;
|
|
1015
974
|
var SelectValue = SelectPrimitive.Value;
|
|
1016
|
-
var SelectTrigger =
|
|
975
|
+
var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1017
976
|
SelectPrimitive.Trigger,
|
|
1018
977
|
{
|
|
1019
978
|
ref,
|
|
@@ -1024,32 +983,32 @@ var SelectTrigger = React17.forwardRef(({ className, children, ...props }, ref)
|
|
|
1024
983
|
...props,
|
|
1025
984
|
children: [
|
|
1026
985
|
children,
|
|
1027
|
-
/* @__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" }) })
|
|
1028
987
|
]
|
|
1029
988
|
}
|
|
1030
989
|
));
|
|
1031
990
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
1032
|
-
var SelectScrollUpButton =
|
|
991
|
+
var SelectScrollUpButton = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1033
992
|
SelectPrimitive.ScrollUpButton,
|
|
1034
993
|
{
|
|
1035
994
|
ref,
|
|
1036
995
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1037
996
|
...props,
|
|
1038
|
-
children: /* @__PURE__ */ (0,
|
|
997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronUp, { className: "h-4 w-4" })
|
|
1039
998
|
}
|
|
1040
999
|
));
|
|
1041
1000
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
1042
|
-
var SelectScrollDownButton =
|
|
1001
|
+
var SelectScrollDownButton = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1043
1002
|
SelectPrimitive.ScrollDownButton,
|
|
1044
1003
|
{
|
|
1045
1004
|
ref,
|
|
1046
1005
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1047
1006
|
...props,
|
|
1048
|
-
children: /* @__PURE__ */ (0,
|
|
1007
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ChevronDown, { className: "h-4 w-4" })
|
|
1049
1008
|
}
|
|
1050
1009
|
));
|
|
1051
1010
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
1052
|
-
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)(
|
|
1053
1012
|
SelectPrimitive.Content,
|
|
1054
1013
|
{
|
|
1055
1014
|
ref,
|
|
@@ -1061,8 +1020,8 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
|
|
|
1061
1020
|
position,
|
|
1062
1021
|
...props,
|
|
1063
1022
|
children: [
|
|
1064
|
-
/* @__PURE__ */ (0,
|
|
1065
|
-
/* @__PURE__ */ (0,
|
|
1023
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectScrollUpButton, {}),
|
|
1024
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1066
1025
|
SelectPrimitive.Viewport,
|
|
1067
1026
|
{
|
|
1068
1027
|
className: cn(
|
|
@@ -1072,12 +1031,12 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
|
|
|
1072
1031
|
children
|
|
1073
1032
|
}
|
|
1074
1033
|
),
|
|
1075
|
-
/* @__PURE__ */ (0,
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SelectScrollDownButton, {})
|
|
1076
1035
|
]
|
|
1077
1036
|
}
|
|
1078
1037
|
) }));
|
|
1079
1038
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
1080
|
-
var SelectLabel =
|
|
1039
|
+
var SelectLabel = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1081
1040
|
SelectPrimitive.Label,
|
|
1082
1041
|
{
|
|
1083
1042
|
ref,
|
|
@@ -1086,7 +1045,7 @@ var SelectLabel = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
1086
1045
|
}
|
|
1087
1046
|
));
|
|
1088
1047
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
1089
|
-
var SelectItem =
|
|
1048
|
+
var SelectItem = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1090
1049
|
SelectPrimitive.Item,
|
|
1091
1050
|
{
|
|
1092
1051
|
ref,
|
|
@@ -1096,13 +1055,13 @@ var SelectItem = React17.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1096
1055
|
),
|
|
1097
1056
|
...props,
|
|
1098
1057
|
children: [
|
|
1099
|
-
/* @__PURE__ */ (0,
|
|
1100
|
-
/* @__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 })
|
|
1101
1060
|
]
|
|
1102
1061
|
}
|
|
1103
1062
|
));
|
|
1104
1063
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1105
|
-
var SelectSeparator =
|
|
1064
|
+
var SelectSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1106
1065
|
SelectPrimitive.Separator,
|
|
1107
1066
|
{
|
|
1108
1067
|
ref,
|
|
@@ -1113,8 +1072,8 @@ var SelectSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1113
1072
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1114
1073
|
|
|
1115
1074
|
// src/components/select/Select.tsx
|
|
1116
|
-
var
|
|
1117
|
-
var selectVariants = (0,
|
|
1075
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1076
|
+
var selectVariants = (0, import_class_variance_authority9.cva)(
|
|
1118
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",
|
|
1119
1078
|
{
|
|
1120
1079
|
variants: {
|
|
@@ -1136,7 +1095,7 @@ var selectVariants = (0, import_class_variance_authority10.cva)(
|
|
|
1136
1095
|
}
|
|
1137
1096
|
}
|
|
1138
1097
|
);
|
|
1139
|
-
var Select2 =
|
|
1098
|
+
var Select2 = React17.forwardRef(
|
|
1140
1099
|
({
|
|
1141
1100
|
className,
|
|
1142
1101
|
variant,
|
|
@@ -1154,12 +1113,12 @@ var Select2 = React18.forwardRef(
|
|
|
1154
1113
|
name,
|
|
1155
1114
|
required
|
|
1156
1115
|
}, ref) => {
|
|
1157
|
-
const generatedId =
|
|
1116
|
+
const generatedId = React17.useId();
|
|
1158
1117
|
const selectId = id || generatedId;
|
|
1159
1118
|
const errorId = `${selectId}-error`;
|
|
1160
1119
|
const descriptionId = `${selectId}-description`;
|
|
1161
|
-
return /* @__PURE__ */ (0,
|
|
1162
|
-
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)(
|
|
1163
1122
|
"label",
|
|
1164
1123
|
{
|
|
1165
1124
|
htmlFor: selectId,
|
|
@@ -1171,7 +1130,7 @@ var Select2 = React18.forwardRef(
|
|
|
1171
1130
|
children: label
|
|
1172
1131
|
}
|
|
1173
1132
|
),
|
|
1174
|
-
/* @__PURE__ */ (0,
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1175
1134
|
Select,
|
|
1176
1135
|
{
|
|
1177
1136
|
value,
|
|
@@ -1181,7 +1140,7 @@ var Select2 = React18.forwardRef(
|
|
|
1181
1140
|
name,
|
|
1182
1141
|
required,
|
|
1183
1142
|
children: [
|
|
1184
|
-
/* @__PURE__ */ (0,
|
|
1143
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1185
1144
|
SelectTrigger,
|
|
1186
1145
|
{
|
|
1187
1146
|
ref,
|
|
@@ -1193,30 +1152,30 @@ var Select2 = React18.forwardRef(
|
|
|
1193
1152
|
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1194
1153
|
className
|
|
1195
1154
|
),
|
|
1196
|
-
children: /* @__PURE__ */ (0,
|
|
1155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SelectValue, { placeholder })
|
|
1197
1156
|
}
|
|
1198
1157
|
),
|
|
1199
|
-
/* @__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)) })
|
|
1200
1159
|
]
|
|
1201
1160
|
}
|
|
1202
1161
|
),
|
|
1203
|
-
description && /* @__PURE__ */ (0,
|
|
1204
|
-
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 })
|
|
1205
1164
|
] });
|
|
1206
1165
|
}
|
|
1207
1166
|
);
|
|
1208
1167
|
Select2.displayName = "Select";
|
|
1209
1168
|
|
|
1210
1169
|
// src/components/text-area/TextArea.tsx
|
|
1211
|
-
var
|
|
1212
|
-
var
|
|
1170
|
+
var React19 = __toESM(require("react"), 1);
|
|
1171
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1213
1172
|
|
|
1214
1173
|
// src/primitives/textarea.tsx
|
|
1215
|
-
var
|
|
1216
|
-
var
|
|
1217
|
-
var Textarea =
|
|
1174
|
+
var React18 = __toESM(require("react"), 1);
|
|
1175
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1176
|
+
var Textarea = React18.forwardRef(
|
|
1218
1177
|
({ className, ...props }, ref) => {
|
|
1219
|
-
return /* @__PURE__ */ (0,
|
|
1178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1220
1179
|
"textarea",
|
|
1221
1180
|
{
|
|
1222
1181
|
className: cn(
|
|
@@ -1232,8 +1191,8 @@ var Textarea = React19.forwardRef(
|
|
|
1232
1191
|
Textarea.displayName = "Textarea";
|
|
1233
1192
|
|
|
1234
1193
|
// src/components/text-area/TextArea.tsx
|
|
1235
|
-
var
|
|
1236
|
-
var textAreaVariants = (0,
|
|
1194
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1195
|
+
var textAreaVariants = (0, import_class_variance_authority10.cva)(
|
|
1237
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",
|
|
1238
1197
|
{
|
|
1239
1198
|
variants: {
|
|
@@ -1255,7 +1214,7 @@ var textAreaVariants = (0, import_class_variance_authority11.cva)(
|
|
|
1255
1214
|
}
|
|
1256
1215
|
}
|
|
1257
1216
|
);
|
|
1258
|
-
var TextArea =
|
|
1217
|
+
var TextArea = React19.forwardRef(
|
|
1259
1218
|
({
|
|
1260
1219
|
className,
|
|
1261
1220
|
variant,
|
|
@@ -1275,13 +1234,13 @@ var TextArea = React20.forwardRef(
|
|
|
1275
1234
|
actionButton,
|
|
1276
1235
|
...props
|
|
1277
1236
|
}, ref) => {
|
|
1278
|
-
const generatedId =
|
|
1237
|
+
const generatedId = React19.useId();
|
|
1279
1238
|
const textareaId = id || generatedId;
|
|
1280
1239
|
const errorId = `${textareaId}-error`;
|
|
1281
1240
|
const descriptionId = `${textareaId}-description`;
|
|
1282
1241
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
1283
|
-
return /* @__PURE__ */ (0,
|
|
1284
|
-
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)(
|
|
1285
1244
|
"label",
|
|
1286
1245
|
{
|
|
1287
1246
|
htmlFor: textareaId,
|
|
@@ -1293,9 +1252,9 @@ var TextArea = React20.forwardRef(
|
|
|
1293
1252
|
children: label
|
|
1294
1253
|
}
|
|
1295
1254
|
),
|
|
1296
|
-
/* @__PURE__ */ (0,
|
|
1297
|
-
icon && /* @__PURE__ */ (0,
|
|
1298
|
-
/* @__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)(
|
|
1299
1258
|
Textarea,
|
|
1300
1259
|
{
|
|
1301
1260
|
ref,
|
|
@@ -1320,13 +1279,13 @@ var TextArea = React20.forwardRef(
|
|
|
1320
1279
|
...props
|
|
1321
1280
|
}
|
|
1322
1281
|
),
|
|
1323
|
-
secondaryIcon && /* @__PURE__ */ (0,
|
|
1324
|
-
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 })
|
|
1325
1284
|
] }),
|
|
1326
|
-
(description || error || showCount && maxLength) && /* @__PURE__ */ (0,
|
|
1327
|
-
description && /* @__PURE__ */ (0,
|
|
1328
|
-
(error || showCount && maxLength) && /* @__PURE__ */ (0,
|
|
1329
|
-
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)(
|
|
1330
1289
|
Typography,
|
|
1331
1290
|
{
|
|
1332
1291
|
variant: "xs",
|
|
@@ -1340,7 +1299,7 @@ var TextArea = React20.forwardRef(
|
|
|
1340
1299
|
]
|
|
1341
1300
|
}
|
|
1342
1301
|
),
|
|
1343
|
-
error && /* @__PURE__ */ (0,
|
|
1302
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1344
1303
|
Typography,
|
|
1345
1304
|
{
|
|
1346
1305
|
variant: "xs",
|
|
@@ -1357,25 +1316,25 @@ var TextArea = React20.forwardRef(
|
|
|
1357
1316
|
TextArea.displayName = "TextArea";
|
|
1358
1317
|
|
|
1359
1318
|
// src/primitives/label.tsx
|
|
1360
|
-
var
|
|
1319
|
+
var React20 = __toESM(require("react"), 1);
|
|
1361
1320
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
1362
|
-
var
|
|
1363
|
-
var
|
|
1364
|
-
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)(
|
|
1365
1324
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1366
1325
|
);
|
|
1367
|
-
var Label2 =
|
|
1326
|
+
var Label2 = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1368
1327
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1369
1328
|
|
|
1370
1329
|
// src/primitives/field.tsx
|
|
1371
1330
|
var import_react = require("react");
|
|
1372
|
-
var
|
|
1331
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1373
1332
|
|
|
1374
1333
|
// src/primitives/separator.tsx
|
|
1375
|
-
var
|
|
1334
|
+
var React21 = __toESM(require("react"), 1);
|
|
1376
1335
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
1377
|
-
var
|
|
1378
|
-
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)(
|
|
1379
1338
|
SeparatorPrimitive.Root,
|
|
1380
1339
|
{
|
|
1381
1340
|
ref,
|
|
@@ -1392,9 +1351,9 @@ var Separator2 = React22.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1392
1351
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1393
1352
|
|
|
1394
1353
|
// src/primitives/field.tsx
|
|
1395
|
-
var
|
|
1354
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1396
1355
|
function FieldSet({ className, ...props }) {
|
|
1397
|
-
return /* @__PURE__ */ (0,
|
|
1356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1398
1357
|
"fieldset",
|
|
1399
1358
|
{
|
|
1400
1359
|
"data-slot": "field-set",
|
|
@@ -1412,7 +1371,7 @@ function FieldLegend({
|
|
|
1412
1371
|
variant = "legend",
|
|
1413
1372
|
...props
|
|
1414
1373
|
}) {
|
|
1415
|
-
return /* @__PURE__ */ (0,
|
|
1374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1416
1375
|
"legend",
|
|
1417
1376
|
{
|
|
1418
1377
|
"data-slot": "field-legend",
|
|
@@ -1428,7 +1387,7 @@ function FieldLegend({
|
|
|
1428
1387
|
);
|
|
1429
1388
|
}
|
|
1430
1389
|
function FieldGroup({ className, ...props }) {
|
|
1431
|
-
return /* @__PURE__ */ (0,
|
|
1390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1432
1391
|
"div",
|
|
1433
1392
|
{
|
|
1434
1393
|
"data-slot": "field-group",
|
|
@@ -1440,7 +1399,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
1440
1399
|
}
|
|
1441
1400
|
);
|
|
1442
1401
|
}
|
|
1443
|
-
var fieldVariants = (0,
|
|
1402
|
+
var fieldVariants = (0, import_class_variance_authority12.cva)("group/field data-[invalid=true]:text-destructive flex w-full gap-3", {
|
|
1444
1403
|
variants: {
|
|
1445
1404
|
orientation: {
|
|
1446
1405
|
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
@@ -1465,7 +1424,7 @@ function Field({
|
|
|
1465
1424
|
orientation = "vertical",
|
|
1466
1425
|
...props
|
|
1467
1426
|
}) {
|
|
1468
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1469
1428
|
"div",
|
|
1470
1429
|
{
|
|
1471
1430
|
role: "group",
|
|
@@ -1477,7 +1436,7 @@ function Field({
|
|
|
1477
1436
|
);
|
|
1478
1437
|
}
|
|
1479
1438
|
function FieldContent({ className, ...props }) {
|
|
1480
|
-
return /* @__PURE__ */ (0,
|
|
1439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1481
1440
|
"div",
|
|
1482
1441
|
{
|
|
1483
1442
|
"data-slot": "field-content",
|
|
@@ -1487,7 +1446,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1487
1446
|
);
|
|
1488
1447
|
}
|
|
1489
1448
|
function FieldLabel({ className, ...props }) {
|
|
1490
|
-
return /* @__PURE__ */ (0,
|
|
1449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1491
1450
|
Label2,
|
|
1492
1451
|
{
|
|
1493
1452
|
"data-slot": "field-label",
|
|
@@ -1502,7 +1461,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1502
1461
|
);
|
|
1503
1462
|
}
|
|
1504
1463
|
function FieldTitle({ className, ...props }) {
|
|
1505
|
-
return /* @__PURE__ */ (0,
|
|
1464
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1506
1465
|
"div",
|
|
1507
1466
|
{
|
|
1508
1467
|
"data-slot": "field-label",
|
|
@@ -1515,7 +1474,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1515
1474
|
);
|
|
1516
1475
|
}
|
|
1517
1476
|
function FieldDescription({ className, ...props }) {
|
|
1518
|
-
return /* @__PURE__ */ (0,
|
|
1477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1519
1478
|
"p",
|
|
1520
1479
|
{
|
|
1521
1480
|
"data-slot": "field-description",
|
|
@@ -1534,7 +1493,7 @@ function FieldSeparator({
|
|
|
1534
1493
|
className,
|
|
1535
1494
|
...props
|
|
1536
1495
|
}) {
|
|
1537
|
-
return /* @__PURE__ */ (0,
|
|
1496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1538
1497
|
"div",
|
|
1539
1498
|
{
|
|
1540
1499
|
"data-slot": "field-separator",
|
|
@@ -1545,8 +1504,8 @@ function FieldSeparator({
|
|
|
1545
1504
|
),
|
|
1546
1505
|
...props,
|
|
1547
1506
|
children: [
|
|
1548
|
-
/* @__PURE__ */ (0,
|
|
1549
|
-
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)(
|
|
1550
1509
|
"span",
|
|
1551
1510
|
{
|
|
1552
1511
|
className: "bg-berget-background text-berget-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -1574,12 +1533,12 @@ function FieldError({
|
|
|
1574
1533
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
1575
1534
|
return errors[0].message;
|
|
1576
1535
|
}
|
|
1577
|
-
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)) });
|
|
1578
1537
|
}, [children, errors]);
|
|
1579
1538
|
if (!content) {
|
|
1580
1539
|
return null;
|
|
1581
1540
|
}
|
|
1582
|
-
return /* @__PURE__ */ (0,
|
|
1541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1583
1542
|
"div",
|
|
1584
1543
|
{
|
|
1585
1544
|
role: "alert",
|
|
@@ -1593,10 +1552,46 @@ function FieldError({
|
|
|
1593
1552
|
|
|
1594
1553
|
// src/components/link/Link.tsx
|
|
1595
1554
|
var React23 = __toESM(require("react"), 1);
|
|
1596
|
-
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
|
|
1597
1592
|
var import_lucide_react5 = require("lucide-react");
|
|
1598
1593
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1599
|
-
var linkVariants = (0,
|
|
1594
|
+
var linkVariants = (0, import_class_variance_authority13.cva)(
|
|
1600
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",
|
|
1601
1596
|
{
|
|
1602
1597
|
variants: {
|
|
@@ -1650,7 +1645,7 @@ var Link = React23.forwardRef(
|
|
|
1650
1645
|
children: [
|
|
1651
1646
|
children,
|
|
1652
1647
|
icon && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "inline-flex items-center", children: icon }),
|
|
1653
|
-
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 }) })
|
|
1654
1649
|
]
|
|
1655
1650
|
}
|
|
1656
1651
|
);
|
|
@@ -1660,14 +1655,14 @@ Link.displayName = "Link";
|
|
|
1660
1655
|
|
|
1661
1656
|
// src/components/section/Section.tsx
|
|
1662
1657
|
var React25 = __toESM(require("react"), 1);
|
|
1663
|
-
var
|
|
1658
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
1664
1659
|
|
|
1665
1660
|
// src/components/container/Container.tsx
|
|
1666
1661
|
var React24 = __toESM(require("react"), 1);
|
|
1667
1662
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1668
|
-
var
|
|
1663
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
1669
1664
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1670
|
-
var containerVariants = (0,
|
|
1665
|
+
var containerVariants = (0, import_class_variance_authority14.cva)("w-full mx-auto", {
|
|
1671
1666
|
variants: {
|
|
1672
1667
|
size: {
|
|
1673
1668
|
sm: "max-w-3xl",
|
|
@@ -1706,7 +1701,7 @@ Container.displayName = "Container";
|
|
|
1706
1701
|
|
|
1707
1702
|
// src/components/section/Section.tsx
|
|
1708
1703
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1709
|
-
var sectionVariants = (0,
|
|
1704
|
+
var sectionVariants = (0, import_class_variance_authority15.cva)("relative", {
|
|
1710
1705
|
variants: {
|
|
1711
1706
|
padding: {
|
|
1712
1707
|
none: "",
|
|
@@ -1780,10 +1775,10 @@ SectionHeader.displayName = "SectionHeader";
|
|
|
1780
1775
|
|
|
1781
1776
|
// src/components/grid/Grid.tsx
|
|
1782
1777
|
var React27 = __toESM(require("react"), 1);
|
|
1783
|
-
var
|
|
1778
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
1784
1779
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1785
1780
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1786
|
-
var gridVariants = (0,
|
|
1781
|
+
var gridVariants = (0, import_class_variance_authority16.cva)("grid", {
|
|
1787
1782
|
variants: {
|
|
1788
1783
|
align: {
|
|
1789
1784
|
start: "items-start",
|
|
@@ -1831,10 +1826,10 @@ Grid.displayName = "Grid";
|
|
|
1831
1826
|
|
|
1832
1827
|
// src/components/box/Box.tsx
|
|
1833
1828
|
var React28 = __toESM(require("react"), 1);
|
|
1834
|
-
var
|
|
1829
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
1835
1830
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
1836
1831
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1837
|
-
var boxVariants = (0,
|
|
1832
|
+
var boxVariants = (0, import_class_variance_authority17.cva)("flex", {
|
|
1838
1833
|
variants: {
|
|
1839
1834
|
direction: {
|
|
1840
1835
|
row: "flex-row",
|
|
@@ -2008,7 +2003,7 @@ BergetLogo.displayName = "BergetLogo";
|
|
|
2008
2003
|
|
|
2009
2004
|
// src/components/header/Header.tsx
|
|
2010
2005
|
var React31 = __toESM(require("react"), 1);
|
|
2011
|
-
var
|
|
2006
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
2012
2007
|
var import_lucide_react7 = require("lucide-react");
|
|
2013
2008
|
|
|
2014
2009
|
// src/components/language-select/LanguageSelect.tsx
|
|
@@ -2039,7 +2034,7 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
|
|
|
2039
2034
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
2040
2035
|
className
|
|
2041
2036
|
),
|
|
2042
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon2, { icon: import_lucide_react6.Globe, size: 16 })
|
|
2043
2038
|
}
|
|
2044
2039
|
),
|
|
2045
2040
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
@@ -2099,7 +2094,7 @@ LanguageSelect.displayName = "LanguageSelect";
|
|
|
2099
2094
|
|
|
2100
2095
|
// src/components/header/Header.tsx
|
|
2101
2096
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2102
|
-
var headerVariants = (0,
|
|
2097
|
+
var headerVariants = (0, import_class_variance_authority18.cva)(
|
|
2103
2098
|
"sticky top-0 z-50 header-backdrop backdrop-blur-xl border-b border-berget-border transition-all duration-200",
|
|
2104
2099
|
{
|
|
2105
2100
|
variants: {
|
|
@@ -2132,7 +2127,7 @@ var HeaderNav = React31.forwardRef(({ className, links, ...props }, ref) => {
|
|
|
2132
2127
|
size: "sm",
|
|
2133
2128
|
className: cn("relative transition-all duration-200", link.active && "font-medium"),
|
|
2134
2129
|
children: [
|
|
2135
|
-
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 }) }),
|
|
2136
2131
|
link.label
|
|
2137
2132
|
]
|
|
2138
2133
|
}
|
|
@@ -2181,7 +2176,7 @@ var MobileMenuButton = React31.forwardRef(({ className, ...props }, ref) => {
|
|
|
2181
2176
|
"aria-expanded": isMobileMenuOpen,
|
|
2182
2177
|
"aria-controls": "mobile-menu",
|
|
2183
2178
|
...props,
|
|
2184
|
-
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 })
|
|
2185
2180
|
}
|
|
2186
2181
|
);
|
|
2187
2182
|
});
|
|
@@ -2222,7 +2217,7 @@ var MobileMenu = React31.forwardRef(
|
|
|
2222
2217
|
),
|
|
2223
2218
|
onClick: () => setIsMobileMenuOpen(false),
|
|
2224
2219
|
children: [
|
|
2225
|
-
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 }) }),
|
|
2226
2221
|
link.label
|
|
2227
2222
|
]
|
|
2228
2223
|
}
|
|
@@ -2306,16 +2301,16 @@ Header.displayName = "Header";
|
|
|
2306
2301
|
|
|
2307
2302
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2308
2303
|
var React34 = __toESM(require("react"), 1);
|
|
2309
|
-
var
|
|
2304
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
2310
2305
|
|
|
2311
2306
|
// src/components/list/List.tsx
|
|
2312
2307
|
var React33 = __toESM(require("react"), 1);
|
|
2313
2308
|
|
|
2314
2309
|
// src/components/divider/Divider.tsx
|
|
2315
2310
|
var React32 = __toESM(require("react"), 1);
|
|
2316
|
-
var
|
|
2311
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
2317
2312
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2318
|
-
var dividerVariants = (0,
|
|
2313
|
+
var dividerVariants = (0, import_class_variance_authority19.cva)("", {
|
|
2319
2314
|
variants: {
|
|
2320
2315
|
variant: {
|
|
2321
2316
|
default: "bg-berget-separator",
|
|
@@ -2427,7 +2422,7 @@ ListHeader.displayName = "ListHeader";
|
|
|
2427
2422
|
var FeatureList = React33.forwardRef(
|
|
2428
2423
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2429
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: [
|
|
2430
|
-
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" }) }),
|
|
2431
2426
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typography, { variant: "body", color: "muted", children: item })
|
|
2432
2427
|
] }, index)) });
|
|
2433
2428
|
}
|
|
@@ -2436,7 +2431,7 @@ FeatureList.displayName = "FeatureList";
|
|
|
2436
2431
|
|
|
2437
2432
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2438
2433
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2439
|
-
var featureCardVariants = (0,
|
|
2434
|
+
var featureCardVariants = (0, import_class_variance_authority20.cva)("", {
|
|
2440
2435
|
variants: {
|
|
2441
2436
|
variant: {
|
|
2442
2437
|
highlight: "",
|
|
@@ -2526,9 +2521,9 @@ FeatureCards.displayName = "FeatureCards";
|
|
|
2526
2521
|
|
|
2527
2522
|
// src/components/hero-block/HeroBlock.tsx
|
|
2528
2523
|
var React35 = __toESM(require("react"), 1);
|
|
2529
|
-
var
|
|
2524
|
+
var import_class_variance_authority21 = require("class-variance-authority");
|
|
2530
2525
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2531
|
-
var heroBlockVariants = (0,
|
|
2526
|
+
var heroBlockVariants = (0, import_class_variance_authority21.cva)(
|
|
2532
2527
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2533
2528
|
{
|
|
2534
2529
|
variants: {
|
|
@@ -2571,7 +2566,7 @@ var HeroBlock = React35.forwardRef(
|
|
|
2571
2566
|
Badge,
|
|
2572
2567
|
{
|
|
2573
2568
|
variant: "default",
|
|
2574
|
-
icon: TaglineIcon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2569
|
+
icon: TaglineIcon ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon2, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2575
2570
|
iconGap: 2,
|
|
2576
2571
|
className: "mb-fluid-md",
|
|
2577
2572
|
children: tagline
|