@bergetai/ui 0.1.89 → 0.1.91
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/chunk-3LBFYXI6.js +42 -0
- package/dist/chunk-3LBFYXI6.js.map +1 -0
- package/dist/index.cjs +244 -709
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -163
- package/dist/index.d.ts +24 -163
- package/dist/index.js +255 -628
- package/dist/index.js.map +1 -1
- package/dist/shiki.cjs +7 -92
- package/dist/shiki.cjs.map +1 -1
- package/dist/shiki.d.cts +3 -3
- package/dist/shiki.d.ts +3 -3
- package/dist/shiki.js +1 -1
- package/dist/styles/index.css +37 -12
- package/package.json +2 -2
- package/dist/chunk-SJTRISLQ.js +0 -127
- package/dist/chunk-SJTRISLQ.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getHighlighter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3LBFYXI6.js";
|
|
4
4
|
|
|
5
5
|
// src/components/theme-provider/ThemeProvider.tsx
|
|
6
6
|
import * as React from "react";
|
|
@@ -196,9 +196,6 @@ var ThemeToggle = React2.forwardRef(
|
|
|
196
196
|
);
|
|
197
197
|
ThemeToggle.displayName = "ThemeToggle";
|
|
198
198
|
|
|
199
|
-
// src/components/button/Button.tsx
|
|
200
|
-
import * as React4 from "react";
|
|
201
|
-
|
|
202
199
|
// src/primitives/button.tsx
|
|
203
200
|
import * as React3 from "react";
|
|
204
201
|
import { cva } from "class-variance-authority";
|
|
@@ -242,8 +239,7 @@ var Button = React3.forwardRef(
|
|
|
242
239
|
Button.displayName = "Button";
|
|
243
240
|
|
|
244
241
|
// src/components/button/Button.tsx
|
|
245
|
-
import {
|
|
246
|
-
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
242
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
247
243
|
function brandVariantClasses(variant) {
|
|
248
244
|
switch (variant) {
|
|
249
245
|
case "primary":
|
|
@@ -270,65 +266,34 @@ function primitiveVariant(variant) {
|
|
|
270
266
|
return variant;
|
|
271
267
|
}
|
|
272
268
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
Button,
|
|
299
|
-
{
|
|
300
|
-
className: baseClass,
|
|
301
|
-
ref,
|
|
302
|
-
asChild: true,
|
|
303
|
-
type,
|
|
304
|
-
"aria-disabled": isLoading || void 0,
|
|
305
|
-
"aria-busy": isLoading || void 0,
|
|
306
|
-
...props,
|
|
307
|
-
children
|
|
308
|
-
}
|
|
309
|
-
);
|
|
310
|
-
}
|
|
311
|
-
return /* @__PURE__ */ jsx4(
|
|
312
|
-
Button,
|
|
313
|
-
{
|
|
314
|
-
className: baseClass,
|
|
315
|
-
ref,
|
|
316
|
-
type,
|
|
317
|
-
"aria-disabled": isLoading || void 0,
|
|
318
|
-
"aria-busy": isLoading || void 0,
|
|
319
|
-
...props,
|
|
320
|
-
children: /* @__PURE__ */ jsx4("span", { className: cn("inline-flex items-center", !isIcon && "gap-2"), children: isLoading ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
321
|
-
/* @__PURE__ */ jsx4(Loader2, { className: "animate-spin", size: 16, "aria-hidden": "true" }),
|
|
322
|
-
!isIcon && children
|
|
323
|
-
] }) : children })
|
|
324
|
-
}
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
);
|
|
328
|
-
Button2.displayName = "Button";
|
|
269
|
+
function Button2({
|
|
270
|
+
className,
|
|
271
|
+
variant = "default",
|
|
272
|
+
size,
|
|
273
|
+
asChild = false,
|
|
274
|
+
width = "default",
|
|
275
|
+
type = "button",
|
|
276
|
+
ref,
|
|
277
|
+
children,
|
|
278
|
+
...props
|
|
279
|
+
}) {
|
|
280
|
+
const isIcon = typeof size === "string" && size.startsWith("icon");
|
|
281
|
+
const isLink = variant === "link";
|
|
282
|
+
const baseClass = cn(
|
|
283
|
+
!isLink && buttonVariants({ variant: primitiveVariant(variant), size }),
|
|
284
|
+
// Berget brand overrides
|
|
285
|
+
!isLink && "rounded-full",
|
|
286
|
+
brandVariantClasses(variant),
|
|
287
|
+
!isLink && width === "full" && "w-full",
|
|
288
|
+
isIcon && "rounded-full shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]",
|
|
289
|
+
className
|
|
290
|
+
);
|
|
291
|
+
const content = /* @__PURE__ */ jsx4("span", { className: cn("inline-flex items-center", !isIcon && "gap-2"), children });
|
|
292
|
+
return /* @__PURE__ */ jsx4(Button, { className: baseClass, ref, asChild, type, ...props, children: asChild ? children : content });
|
|
293
|
+
}
|
|
329
294
|
|
|
330
295
|
// src/components/typography/Typography.tsx
|
|
331
|
-
import * as
|
|
296
|
+
import * as React4 from "react";
|
|
332
297
|
import { cva as cva2 } from "class-variance-authority";
|
|
333
298
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
334
299
|
var typographyVariants = cva2("", {
|
|
@@ -375,7 +340,7 @@ var defaultElementMap = {
|
|
|
375
340
|
mono: "p",
|
|
376
341
|
code: "span"
|
|
377
342
|
};
|
|
378
|
-
var Typography =
|
|
343
|
+
var Typography = React4.forwardRef(
|
|
379
344
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
380
345
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
381
346
|
return /* @__PURE__ */ jsx5(
|
|
@@ -392,13 +357,13 @@ var Typography = React5.forwardRef(
|
|
|
392
357
|
Typography.displayName = "Typography";
|
|
393
358
|
|
|
394
359
|
// src/components/card/Card.tsx
|
|
395
|
-
import * as
|
|
360
|
+
import * as React6 from "react";
|
|
396
361
|
import { cva as cva3 } from "class-variance-authority";
|
|
397
362
|
|
|
398
363
|
// src/primitives/card.tsx
|
|
399
|
-
import * as
|
|
364
|
+
import * as React5 from "react";
|
|
400
365
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
401
|
-
var Card =
|
|
366
|
+
var Card = React5.forwardRef(
|
|
402
367
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
403
368
|
"div",
|
|
404
369
|
{
|
|
@@ -409,23 +374,23 @@ var Card = React6.forwardRef(
|
|
|
409
374
|
)
|
|
410
375
|
);
|
|
411
376
|
Card.displayName = "Card";
|
|
412
|
-
var CardHeader =
|
|
377
|
+
var CardHeader = React5.forwardRef(
|
|
413
378
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
414
379
|
);
|
|
415
380
|
CardHeader.displayName = "CardHeader";
|
|
416
|
-
var CardTitle =
|
|
381
|
+
var CardTitle = React5.forwardRef(
|
|
417
382
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("h2", { ref, className: cn("text-2xl leading-none tracking-tight", className), ...props })
|
|
418
383
|
);
|
|
419
384
|
CardTitle.displayName = "CardTitle";
|
|
420
|
-
var CardDescription =
|
|
385
|
+
var CardDescription = React5.forwardRef(
|
|
421
386
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
422
387
|
);
|
|
423
388
|
CardDescription.displayName = "CardDescription";
|
|
424
|
-
var CardContent =
|
|
389
|
+
var CardContent = React5.forwardRef(
|
|
425
390
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
426
391
|
);
|
|
427
392
|
CardContent.displayName = "CardContent";
|
|
428
|
-
var CardFooter =
|
|
393
|
+
var CardFooter = React5.forwardRef(
|
|
429
394
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
430
395
|
);
|
|
431
396
|
CardFooter.displayName = "CardFooter";
|
|
@@ -450,7 +415,7 @@ var cardVariants = cva3("rounded-berget-sm", {
|
|
|
450
415
|
padding: "md"
|
|
451
416
|
}
|
|
452
417
|
});
|
|
453
|
-
var Card2 =
|
|
418
|
+
var Card2 = React6.forwardRef(
|
|
454
419
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
455
420
|
return /* @__PURE__ */ jsx7(
|
|
456
421
|
Card,
|
|
@@ -466,9 +431,9 @@ var Card2 = React7.forwardRef(
|
|
|
466
431
|
Card2.displayName = "Card";
|
|
467
432
|
|
|
468
433
|
// src/components/badge/Badge.tsx
|
|
469
|
-
import * as
|
|
434
|
+
import * as React7 from "react";
|
|
470
435
|
import { cva as cva4 } from "class-variance-authority";
|
|
471
|
-
import { jsx as jsx8, jsxs as
|
|
436
|
+
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
472
437
|
var badgeVariants = cva4(
|
|
473
438
|
"inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2",
|
|
474
439
|
{
|
|
@@ -501,9 +466,9 @@ var badgeVariants = cva4(
|
|
|
501
466
|
}
|
|
502
467
|
}
|
|
503
468
|
);
|
|
504
|
-
var Badge =
|
|
469
|
+
var Badge = React7.forwardRef(
|
|
505
470
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
506
|
-
return /* @__PURE__ */
|
|
471
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
507
472
|
icon && /* @__PURE__ */ jsx8("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
508
473
|
children
|
|
509
474
|
] });
|
|
@@ -512,11 +477,11 @@ var Badge = React8.forwardRef(
|
|
|
512
477
|
Badge.displayName = "Badge";
|
|
513
478
|
|
|
514
479
|
// src/components/alert/Alert.tsx
|
|
515
|
-
import * as
|
|
480
|
+
import * as React9 from "react";
|
|
516
481
|
import { cva as cva6 } from "class-variance-authority";
|
|
517
482
|
|
|
518
483
|
// src/primitives/alert.tsx
|
|
519
|
-
import * as
|
|
484
|
+
import * as React8 from "react";
|
|
520
485
|
import { cva as cva5 } from "class-variance-authority";
|
|
521
486
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
522
487
|
var alertVariants = cva5(
|
|
@@ -533,13 +498,13 @@ var alertVariants = cva5(
|
|
|
533
498
|
}
|
|
534
499
|
}
|
|
535
500
|
);
|
|
536
|
-
var Alert =
|
|
501
|
+
var Alert = React8.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
537
502
|
Alert.displayName = "Alert";
|
|
538
|
-
var AlertTitle =
|
|
503
|
+
var AlertTitle = React8.forwardRef(
|
|
539
504
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx9("h5", { ref, className: cn("mb-1 leading-none tracking-tight", className), ...props })
|
|
540
505
|
);
|
|
541
506
|
AlertTitle.displayName = "AlertTitle";
|
|
542
|
-
var AlertDescription =
|
|
507
|
+
var AlertDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
543
508
|
AlertDescription.displayName = "AlertDescription";
|
|
544
509
|
|
|
545
510
|
// src/components/alert/Alert.tsx
|
|
@@ -558,18 +523,18 @@ var alertVariants2 = cva6("", {
|
|
|
558
523
|
variant: "default"
|
|
559
524
|
}
|
|
560
525
|
});
|
|
561
|
-
var Alert2 =
|
|
526
|
+
var Alert2 = React9.forwardRef(
|
|
562
527
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx10(Alert, { ref, className: cn(alertVariants2({ variant }), className), ...props })
|
|
563
528
|
);
|
|
564
529
|
Alert2.displayName = "Alert";
|
|
565
530
|
|
|
566
531
|
// src/components/input/Input.tsx
|
|
567
|
-
import * as
|
|
532
|
+
import * as React11 from "react";
|
|
568
533
|
|
|
569
534
|
// src/primitives/input.tsx
|
|
570
|
-
import * as
|
|
535
|
+
import * as React10 from "react";
|
|
571
536
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
572
|
-
var Input =
|
|
537
|
+
var Input = React10.forwardRef(
|
|
573
538
|
({ className, type, ...props }, ref) => {
|
|
574
539
|
return /* @__PURE__ */ jsx11(
|
|
575
540
|
"input",
|
|
@@ -588,10 +553,10 @@ var Input = React11.forwardRef(
|
|
|
588
553
|
Input.displayName = "Input";
|
|
589
554
|
|
|
590
555
|
// src/components/input/Input.tsx
|
|
591
|
-
import { jsx as jsx12, jsxs as
|
|
592
|
-
var Input2 =
|
|
556
|
+
import { jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
557
|
+
var Input2 = React11.forwardRef(
|
|
593
558
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
594
|
-
const generatedId =
|
|
559
|
+
const generatedId = React11.useId();
|
|
595
560
|
const inputId = id || generatedId;
|
|
596
561
|
const errorId = `${inputId}-error`;
|
|
597
562
|
const descriptionId = `${inputId}-description`;
|
|
@@ -615,7 +580,7 @@ var Input2 = React12.forwardRef(
|
|
|
615
580
|
}
|
|
616
581
|
);
|
|
617
582
|
if (!icon && !actionButton) {
|
|
618
|
-
return /* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
|
|
619
584
|
label && /* @__PURE__ */ jsx12(
|
|
620
585
|
"label",
|
|
621
586
|
{
|
|
@@ -629,7 +594,7 @@ var Input2 = React12.forwardRef(
|
|
|
629
594
|
}
|
|
630
595
|
),
|
|
631
596
|
inputElement,
|
|
632
|
-
(description || error) && /* @__PURE__ */
|
|
597
|
+
(description || error) && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-1", children: [
|
|
633
598
|
description && /* @__PURE__ */ jsx12(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
634
599
|
error && /* @__PURE__ */ jsx12(
|
|
635
600
|
Typography,
|
|
@@ -643,7 +608,7 @@ var Input2 = React12.forwardRef(
|
|
|
643
608
|
] })
|
|
644
609
|
] });
|
|
645
610
|
}
|
|
646
|
-
return /* @__PURE__ */
|
|
611
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
|
|
647
612
|
label && /* @__PURE__ */ jsx12(
|
|
648
613
|
"label",
|
|
649
614
|
{
|
|
@@ -656,12 +621,12 @@ var Input2 = React12.forwardRef(
|
|
|
656
621
|
children: label
|
|
657
622
|
}
|
|
658
623
|
),
|
|
659
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ jsxs3("div", { className: "relative w-full", children: [
|
|
660
625
|
icon && /* @__PURE__ */ jsx12("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
661
626
|
inputElement,
|
|
662
627
|
actionButton && /* @__PURE__ */ jsx12("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
663
628
|
] }),
|
|
664
|
-
(description || error) && /* @__PURE__ */
|
|
629
|
+
(description || error) && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-1", children: [
|
|
665
630
|
description && /* @__PURE__ */ jsx12(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
666
631
|
error && /* @__PURE__ */ jsx12(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
667
632
|
] })
|
|
@@ -671,17 +636,17 @@ var Input2 = React12.forwardRef(
|
|
|
671
636
|
Input2.displayName = "Input";
|
|
672
637
|
|
|
673
638
|
// src/components/checkbox/Checkbox.tsx
|
|
674
|
-
import * as
|
|
639
|
+
import * as React13 from "react";
|
|
675
640
|
import * as CheckboxPrimitive2 from "@radix-ui/react-checkbox";
|
|
676
641
|
import { Check as Check2 } from "lucide-react";
|
|
677
642
|
import { cva as cva7 } from "class-variance-authority";
|
|
678
643
|
|
|
679
644
|
// src/primitives/checkbox.tsx
|
|
680
|
-
import * as
|
|
645
|
+
import * as React12 from "react";
|
|
681
646
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
682
647
|
import { Check } from "lucide-react";
|
|
683
648
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
684
|
-
var Checkbox =
|
|
649
|
+
var Checkbox = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
685
650
|
CheckboxPrimitive.Root,
|
|
686
651
|
{
|
|
687
652
|
ref,
|
|
@@ -694,7 +659,7 @@ var Checkbox = React13.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
694
659
|
}
|
|
695
660
|
));
|
|
696
661
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
697
|
-
var CheckboxIndicator =
|
|
662
|
+
var CheckboxIndicator = React12.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
698
663
|
CheckboxPrimitive.Indicator,
|
|
699
664
|
{
|
|
700
665
|
ref,
|
|
@@ -706,7 +671,7 @@ var CheckboxIndicator = React13.forwardRef(({ className, children, ...props }, r
|
|
|
706
671
|
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
707
672
|
|
|
708
673
|
// src/components/checkbox/Checkbox.tsx
|
|
709
|
-
import { jsx as jsx14, jsxs as
|
|
674
|
+
import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
710
675
|
var checkboxVariants = cva7(
|
|
711
676
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
712
677
|
{
|
|
@@ -728,12 +693,12 @@ var checkboxVariants = cva7(
|
|
|
728
693
|
}
|
|
729
694
|
}
|
|
730
695
|
);
|
|
731
|
-
var Checkbox2 =
|
|
696
|
+
var Checkbox2 = React13.forwardRef(
|
|
732
697
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
733
|
-
const generatedId =
|
|
698
|
+
const generatedId = React13.useId();
|
|
734
699
|
const checkboxId = id || generatedId;
|
|
735
700
|
const errorId = `${checkboxId}-error`;
|
|
736
|
-
return /* @__PURE__ */
|
|
701
|
+
return /* @__PURE__ */ jsxs4("div", { className: "flex items-start gap-3", children: [
|
|
737
702
|
/* @__PURE__ */ jsx14("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ jsx14(
|
|
738
703
|
Checkbox,
|
|
739
704
|
{
|
|
@@ -758,7 +723,7 @@ var Checkbox2 = React14.forwardRef(
|
|
|
758
723
|
) })
|
|
759
724
|
}
|
|
760
725
|
) }),
|
|
761
|
-
(label || description || error) && /* @__PURE__ */
|
|
726
|
+
(label || description || error) && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
762
727
|
label && /* @__PURE__ */ jsx14(
|
|
763
728
|
"label",
|
|
764
729
|
{
|
|
@@ -780,10 +745,10 @@ var Checkbox2 = React14.forwardRef(
|
|
|
780
745
|
Checkbox2.displayName = "Checkbox";
|
|
781
746
|
|
|
782
747
|
// src/components/switch/Switch.tsx
|
|
783
|
-
import * as
|
|
748
|
+
import * as React14 from "react";
|
|
784
749
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
785
750
|
import { cva as cva8 } from "class-variance-authority";
|
|
786
|
-
import { jsx as jsx15, jsxs as
|
|
751
|
+
import { jsx as jsx15, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
787
752
|
var switchRootVariants = cva8(
|
|
788
753
|
"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",
|
|
789
754
|
{
|
|
@@ -820,12 +785,12 @@ var switchThumbVariants = cva8(
|
|
|
820
785
|
}
|
|
821
786
|
}
|
|
822
787
|
);
|
|
823
|
-
var Switch =
|
|
788
|
+
var Switch = React14.forwardRef(
|
|
824
789
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
825
|
-
const generatedId =
|
|
790
|
+
const generatedId = React14.useId();
|
|
826
791
|
const switchId = id || generatedId;
|
|
827
792
|
const errorId = `${switchId}-error`;
|
|
828
|
-
return /* @__PURE__ */
|
|
793
|
+
return /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-3", children: [
|
|
829
794
|
/* @__PURE__ */ jsx15(
|
|
830
795
|
SwitchPrimitives.Root,
|
|
831
796
|
{
|
|
@@ -843,7 +808,7 @@ var Switch = React15.forwardRef(
|
|
|
843
808
|
children: /* @__PURE__ */ jsx15(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
844
809
|
}
|
|
845
810
|
),
|
|
846
|
-
(label || description || error) && /* @__PURE__ */
|
|
811
|
+
(label || description || error) && /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-1", children: [
|
|
847
812
|
label && /* @__PURE__ */ jsx15(
|
|
848
813
|
"label",
|
|
849
814
|
{
|
|
@@ -864,17 +829,17 @@ var Switch = React15.forwardRef(
|
|
|
864
829
|
Switch.displayName = "Switch";
|
|
865
830
|
|
|
866
831
|
// src/components/select/Select.tsx
|
|
867
|
-
import * as
|
|
832
|
+
import * as React16 from "react";
|
|
868
833
|
import { cva as cva9 } from "class-variance-authority";
|
|
869
834
|
|
|
870
835
|
// src/primitives/select.tsx
|
|
871
|
-
import * as
|
|
836
|
+
import * as React15 from "react";
|
|
872
837
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
873
838
|
import { Check as Check3, ChevronDown, ChevronUp } from "lucide-react";
|
|
874
|
-
import { jsx as jsx16, jsxs as
|
|
839
|
+
import { jsx as jsx16, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
875
840
|
var Select = SelectPrimitive.Root;
|
|
876
841
|
var SelectValue = SelectPrimitive.Value;
|
|
877
|
-
var SelectTrigger =
|
|
842
|
+
var SelectTrigger = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
878
843
|
SelectPrimitive.Trigger,
|
|
879
844
|
{
|
|
880
845
|
ref,
|
|
@@ -890,7 +855,7 @@ var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref)
|
|
|
890
855
|
}
|
|
891
856
|
));
|
|
892
857
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
893
|
-
var SelectScrollUpButton =
|
|
858
|
+
var SelectScrollUpButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
894
859
|
SelectPrimitive.ScrollUpButton,
|
|
895
860
|
{
|
|
896
861
|
ref,
|
|
@@ -900,7 +865,7 @@ var SelectScrollUpButton = React16.forwardRef(({ className, ...props }, ref) =>
|
|
|
900
865
|
}
|
|
901
866
|
));
|
|
902
867
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
903
|
-
var SelectScrollDownButton =
|
|
868
|
+
var SelectScrollDownButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
904
869
|
SelectPrimitive.ScrollDownButton,
|
|
905
870
|
{
|
|
906
871
|
ref,
|
|
@@ -910,7 +875,7 @@ var SelectScrollDownButton = React16.forwardRef(({ className, ...props }, ref) =
|
|
|
910
875
|
}
|
|
911
876
|
));
|
|
912
877
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
913
|
-
var SelectContent =
|
|
878
|
+
var SelectContent = React15.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx16(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs6(
|
|
914
879
|
SelectPrimitive.Content,
|
|
915
880
|
{
|
|
916
881
|
ref,
|
|
@@ -938,7 +903,7 @@ var SelectContent = React16.forwardRef(({ className, children, position = "poppe
|
|
|
938
903
|
}
|
|
939
904
|
) }));
|
|
940
905
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
941
|
-
var SelectLabel =
|
|
906
|
+
var SelectLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
942
907
|
SelectPrimitive.Label,
|
|
943
908
|
{
|
|
944
909
|
ref,
|
|
@@ -947,7 +912,7 @@ var SelectLabel = React16.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
947
912
|
}
|
|
948
913
|
));
|
|
949
914
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
950
|
-
var SelectItem =
|
|
915
|
+
var SelectItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
951
916
|
SelectPrimitive.Item,
|
|
952
917
|
{
|
|
953
918
|
ref,
|
|
@@ -963,7 +928,7 @@ var SelectItem = React16.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
963
928
|
}
|
|
964
929
|
));
|
|
965
930
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
966
|
-
var SelectSeparator =
|
|
931
|
+
var SelectSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
967
932
|
SelectPrimitive.Separator,
|
|
968
933
|
{
|
|
969
934
|
ref,
|
|
@@ -974,7 +939,7 @@ var SelectSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
974
939
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
975
940
|
|
|
976
941
|
// src/components/select/Select.tsx
|
|
977
|
-
import { jsx as jsx17, jsxs as
|
|
942
|
+
import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
978
943
|
var selectVariants = cva9(
|
|
979
944
|
"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",
|
|
980
945
|
{
|
|
@@ -997,7 +962,7 @@ var selectVariants = cva9(
|
|
|
997
962
|
}
|
|
998
963
|
}
|
|
999
964
|
);
|
|
1000
|
-
var Select2 =
|
|
965
|
+
var Select2 = React16.forwardRef(
|
|
1001
966
|
({
|
|
1002
967
|
className,
|
|
1003
968
|
variant,
|
|
@@ -1015,11 +980,11 @@ var Select2 = React17.forwardRef(
|
|
|
1015
980
|
name,
|
|
1016
981
|
required
|
|
1017
982
|
}, ref) => {
|
|
1018
|
-
const generatedId =
|
|
983
|
+
const generatedId = React16.useId();
|
|
1019
984
|
const selectId = id || generatedId;
|
|
1020
985
|
const errorId = `${selectId}-error`;
|
|
1021
986
|
const descriptionId = `${selectId}-description`;
|
|
1022
|
-
return /* @__PURE__ */
|
|
987
|
+
return /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2", children: [
|
|
1023
988
|
label && /* @__PURE__ */ jsx17(
|
|
1024
989
|
"label",
|
|
1025
990
|
{
|
|
@@ -1032,7 +997,7 @@ var Select2 = React17.forwardRef(
|
|
|
1032
997
|
children: label
|
|
1033
998
|
}
|
|
1034
999
|
),
|
|
1035
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ jsxs7(
|
|
1036
1001
|
Select,
|
|
1037
1002
|
{
|
|
1038
1003
|
value,
|
|
@@ -1069,13 +1034,13 @@ var Select2 = React17.forwardRef(
|
|
|
1069
1034
|
Select2.displayName = "Select";
|
|
1070
1035
|
|
|
1071
1036
|
// src/components/text-area/TextArea.tsx
|
|
1072
|
-
import * as
|
|
1037
|
+
import * as React18 from "react";
|
|
1073
1038
|
import { cva as cva10 } from "class-variance-authority";
|
|
1074
1039
|
|
|
1075
1040
|
// src/primitives/textarea.tsx
|
|
1076
|
-
import * as
|
|
1041
|
+
import * as React17 from "react";
|
|
1077
1042
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1078
|
-
var Textarea =
|
|
1043
|
+
var Textarea = React17.forwardRef(
|
|
1079
1044
|
({ className, ...props }, ref) => {
|
|
1080
1045
|
return /* @__PURE__ */ jsx18(
|
|
1081
1046
|
"textarea",
|
|
@@ -1093,7 +1058,7 @@ var Textarea = React18.forwardRef(
|
|
|
1093
1058
|
Textarea.displayName = "Textarea";
|
|
1094
1059
|
|
|
1095
1060
|
// src/components/text-area/TextArea.tsx
|
|
1096
|
-
import { jsx as jsx19, jsxs as
|
|
1061
|
+
import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1097
1062
|
var textAreaVariants = cva10(
|
|
1098
1063
|
"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",
|
|
1099
1064
|
{
|
|
@@ -1116,7 +1081,7 @@ var textAreaVariants = cva10(
|
|
|
1116
1081
|
}
|
|
1117
1082
|
}
|
|
1118
1083
|
);
|
|
1119
|
-
var TextArea =
|
|
1084
|
+
var TextArea = React18.forwardRef(
|
|
1120
1085
|
({
|
|
1121
1086
|
className,
|
|
1122
1087
|
variant,
|
|
@@ -1136,12 +1101,12 @@ var TextArea = React19.forwardRef(
|
|
|
1136
1101
|
actionButton,
|
|
1137
1102
|
...props
|
|
1138
1103
|
}, ref) => {
|
|
1139
|
-
const generatedId =
|
|
1104
|
+
const generatedId = React18.useId();
|
|
1140
1105
|
const textareaId = id || generatedId;
|
|
1141
1106
|
const errorId = `${textareaId}-error`;
|
|
1142
1107
|
const descriptionId = `${textareaId}-description`;
|
|
1143
1108
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
1144
|
-
return /* @__PURE__ */
|
|
1109
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-2", children: [
|
|
1145
1110
|
label && /* @__PURE__ */ jsx19(
|
|
1146
1111
|
"label",
|
|
1147
1112
|
{
|
|
@@ -1154,7 +1119,7 @@ var TextArea = React19.forwardRef(
|
|
|
1154
1119
|
children: label
|
|
1155
1120
|
}
|
|
1156
1121
|
),
|
|
1157
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ jsxs8("div", { className: "relative", children: [
|
|
1158
1123
|
icon && /* @__PURE__ */ jsx19("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
1159
1124
|
/* @__PURE__ */ jsx19(
|
|
1160
1125
|
Textarea,
|
|
@@ -1184,10 +1149,10 @@ var TextArea = React19.forwardRef(
|
|
|
1184
1149
|
secondaryIcon && /* @__PURE__ */ jsx19("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
1185
1150
|
actionButton && /* @__PURE__ */ jsx19("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1186
1151
|
] }),
|
|
1187
|
-
(description || error || showCount && maxLength) && /* @__PURE__ */
|
|
1152
|
+
(description || error || showCount && maxLength) && /* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1188
1153
|
description && /* @__PURE__ */ jsx19(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1189
|
-
(error || showCount && maxLength) && /* @__PURE__ */
|
|
1190
|
-
showCount && maxLength && /* @__PURE__ */
|
|
1154
|
+
(error || showCount && maxLength) && /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
1155
|
+
showCount && maxLength && /* @__PURE__ */ jsxs8(
|
|
1191
1156
|
Typography,
|
|
1192
1157
|
{
|
|
1193
1158
|
variant: "xs",
|
|
@@ -1218,14 +1183,14 @@ var TextArea = React19.forwardRef(
|
|
|
1218
1183
|
TextArea.displayName = "TextArea";
|
|
1219
1184
|
|
|
1220
1185
|
// src/primitives/label.tsx
|
|
1221
|
-
import * as
|
|
1186
|
+
import * as React19 from "react";
|
|
1222
1187
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1223
1188
|
import { cva as cva11 } from "class-variance-authority";
|
|
1224
1189
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1225
1190
|
var labelVariants = cva11(
|
|
1226
1191
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1227
1192
|
);
|
|
1228
|
-
var Label2 =
|
|
1193
|
+
var Label2 = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1229
1194
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1230
1195
|
|
|
1231
1196
|
// src/primitives/field.tsx
|
|
@@ -1233,10 +1198,10 @@ import { useMemo as useMemo2 } from "react";
|
|
|
1233
1198
|
import { cva as cva12 } from "class-variance-authority";
|
|
1234
1199
|
|
|
1235
1200
|
// src/primitives/separator.tsx
|
|
1236
|
-
import * as
|
|
1201
|
+
import * as React20 from "react";
|
|
1237
1202
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1238
1203
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1239
|
-
var Separator2 =
|
|
1204
|
+
var Separator2 = React20.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1240
1205
|
SeparatorPrimitive.Root,
|
|
1241
1206
|
{
|
|
1242
1207
|
ref,
|
|
@@ -1253,7 +1218,7 @@ var Separator2 = React21.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1253
1218
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1254
1219
|
|
|
1255
1220
|
// src/primitives/field.tsx
|
|
1256
|
-
import { jsx as jsx22, jsxs as
|
|
1221
|
+
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1257
1222
|
function FieldSet({ className, ...props }) {
|
|
1258
1223
|
return /* @__PURE__ */ jsx22(
|
|
1259
1224
|
"fieldset",
|
|
@@ -1398,7 +1363,7 @@ function FieldSeparator({
|
|
|
1398
1363
|
className,
|
|
1399
1364
|
...props
|
|
1400
1365
|
}) {
|
|
1401
|
-
return /* @__PURE__ */
|
|
1366
|
+
return /* @__PURE__ */ jsxs9(
|
|
1402
1367
|
"div",
|
|
1403
1368
|
{
|
|
1404
1369
|
"data-slot": "field-separator",
|
|
@@ -1456,18 +1421,18 @@ function FieldError({
|
|
|
1456
1421
|
}
|
|
1457
1422
|
|
|
1458
1423
|
// src/components/link/Link.tsx
|
|
1459
|
-
import * as
|
|
1424
|
+
import * as React22 from "react";
|
|
1460
1425
|
import { cva as cva13 } from "class-variance-authority";
|
|
1461
1426
|
|
|
1462
1427
|
// src/components/icon/Icon.tsx
|
|
1463
|
-
import * as
|
|
1428
|
+
import * as React21 from "react";
|
|
1464
1429
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1465
1430
|
var iconStrokeMap = {
|
|
1466
1431
|
16: 1.4,
|
|
1467
1432
|
24: 1.6,
|
|
1468
1433
|
32: 1.8
|
|
1469
1434
|
};
|
|
1470
|
-
var Icon2 =
|
|
1435
|
+
var Icon2 = React21.forwardRef(
|
|
1471
1436
|
({
|
|
1472
1437
|
icon: IconComponent,
|
|
1473
1438
|
size,
|
|
@@ -1495,7 +1460,7 @@ Icon2.displayName = "Icon";
|
|
|
1495
1460
|
|
|
1496
1461
|
// src/components/link/Link.tsx
|
|
1497
1462
|
import { ExternalLink } from "lucide-react";
|
|
1498
|
-
import { jsx as jsx24, jsxs as
|
|
1463
|
+
import { jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1499
1464
|
var linkVariants = cva13(
|
|
1500
1465
|
"inline-flex cursor-pointer items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
|
|
1501
1466
|
{
|
|
@@ -1520,7 +1485,7 @@ var linkVariants = cva13(
|
|
|
1520
1485
|
}
|
|
1521
1486
|
}
|
|
1522
1487
|
);
|
|
1523
|
-
var Link =
|
|
1488
|
+
var Link = React22.forwardRef(
|
|
1524
1489
|
({
|
|
1525
1490
|
className,
|
|
1526
1491
|
variant,
|
|
@@ -1533,7 +1498,7 @@ var Link = React23.forwardRef(
|
|
|
1533
1498
|
...props
|
|
1534
1499
|
}, ref) => {
|
|
1535
1500
|
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
1536
|
-
return /* @__PURE__ */
|
|
1501
|
+
return /* @__PURE__ */ jsxs10(
|
|
1537
1502
|
"a",
|
|
1538
1503
|
{
|
|
1539
1504
|
ref,
|
|
@@ -1558,12 +1523,8 @@ var Link = React23.forwardRef(
|
|
|
1558
1523
|
);
|
|
1559
1524
|
Link.displayName = "Link";
|
|
1560
1525
|
|
|
1561
|
-
// src/components/section/Section.tsx
|
|
1562
|
-
import * as React25 from "react";
|
|
1563
|
-
import { cva as cva15 } from "class-variance-authority";
|
|
1564
|
-
|
|
1565
1526
|
// src/components/container/Container.tsx
|
|
1566
|
-
import * as
|
|
1527
|
+
import * as React23 from "react";
|
|
1567
1528
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
1568
1529
|
import { cva as cva14 } from "class-variance-authority";
|
|
1569
1530
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
@@ -1588,7 +1549,7 @@ var containerVariants = cva14("w-full mx-auto", {
|
|
|
1588
1549
|
padding: "md"
|
|
1589
1550
|
}
|
|
1590
1551
|
});
|
|
1591
|
-
var Container =
|
|
1552
|
+
var Container = React23.forwardRef(
|
|
1592
1553
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
1593
1554
|
const Component = asChild ? Slot2 : "div";
|
|
1594
1555
|
return /* @__PURE__ */ jsx25(
|
|
@@ -1604,86 +1565,12 @@ var Container = React24.forwardRef(
|
|
|
1604
1565
|
);
|
|
1605
1566
|
Container.displayName = "Container";
|
|
1606
1567
|
|
|
1607
|
-
// src/components/section/Section.tsx
|
|
1608
|
-
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1609
|
-
var sectionVariants = cva15("relative", {
|
|
1610
|
-
variants: {
|
|
1611
|
-
padding: {
|
|
1612
|
-
none: "",
|
|
1613
|
-
sm: "py-12",
|
|
1614
|
-
md: "py-16",
|
|
1615
|
-
lg: "py-24",
|
|
1616
|
-
xl: "py-32"
|
|
1617
|
-
},
|
|
1618
|
-
background: {
|
|
1619
|
-
transparent: "",
|
|
1620
|
-
muted: "bg-berget-section-muted-bg"
|
|
1621
|
-
}
|
|
1622
|
-
},
|
|
1623
|
-
defaultVariants: {
|
|
1624
|
-
padding: "lg",
|
|
1625
|
-
background: "transparent"
|
|
1626
|
-
}
|
|
1627
|
-
});
|
|
1628
|
-
var Section = React25.forwardRef(
|
|
1629
|
-
({ className, padding, background, children, ...props }, ref) => {
|
|
1630
|
-
return /* @__PURE__ */ jsx26(
|
|
1631
|
-
"section",
|
|
1632
|
-
{
|
|
1633
|
-
ref,
|
|
1634
|
-
className: cn(sectionVariants({ padding, background }), className),
|
|
1635
|
-
...props,
|
|
1636
|
-
children: /* @__PURE__ */ jsx26(Container, { children })
|
|
1637
|
-
}
|
|
1638
|
-
);
|
|
1639
|
-
}
|
|
1640
|
-
);
|
|
1641
|
-
Section.displayName = "Section";
|
|
1642
|
-
|
|
1643
|
-
// src/components/section-header/SectionHeader.tsx
|
|
1644
|
-
import * as React26 from "react";
|
|
1645
|
-
import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1646
|
-
var SectionHeader = React26.forwardRef(
|
|
1647
|
-
({
|
|
1648
|
-
className,
|
|
1649
|
-
title,
|
|
1650
|
-
description,
|
|
1651
|
-
descriptionVariant = "large",
|
|
1652
|
-
tagline,
|
|
1653
|
-
action,
|
|
1654
|
-
headingLevel = "h2",
|
|
1655
|
-
id,
|
|
1656
|
-
...props
|
|
1657
|
-
}, ref) => {
|
|
1658
|
-
return /* @__PURE__ */ jsx27(
|
|
1659
|
-
"div",
|
|
1660
|
-
{
|
|
1661
|
-
id,
|
|
1662
|
-
ref,
|
|
1663
|
-
className: cn("w-full px-fluid-md py-fluid-xl text-center", className),
|
|
1664
|
-
...props,
|
|
1665
|
-
children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center gap-fluid-lg", children: [
|
|
1666
|
-
/* @__PURE__ */ jsxs12("div", { className: "max-w-3xl mx-auto flex flex-col items-center gap-fluid-lg", children: [
|
|
1667
|
-
tagline && /* @__PURE__ */ jsx27(Badge, { variant: "default", className: "text-sm", children: tagline }),
|
|
1668
|
-
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center gap-fluid-sm", children: [
|
|
1669
|
-
/* @__PURE__ */ jsx27(Typography, { variant: headingLevel, children: title }),
|
|
1670
|
-
description && /* @__PURE__ */ jsx27(Typography, { variant: descriptionVariant, color: "muted", children: description })
|
|
1671
|
-
] })
|
|
1672
|
-
] }),
|
|
1673
|
-
action && /* @__PURE__ */ jsx27("div", { className: "mt-4", children: action })
|
|
1674
|
-
] })
|
|
1675
|
-
}
|
|
1676
|
-
);
|
|
1677
|
-
}
|
|
1678
|
-
);
|
|
1679
|
-
SectionHeader.displayName = "SectionHeader";
|
|
1680
|
-
|
|
1681
1568
|
// src/components/grid/Grid.tsx
|
|
1682
|
-
import * as
|
|
1683
|
-
import { cva as
|
|
1569
|
+
import * as React24 from "react";
|
|
1570
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
1684
1571
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
1685
|
-
import { jsx as
|
|
1686
|
-
var gridVariants =
|
|
1572
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1573
|
+
var gridVariants = cva15("grid", {
|
|
1687
1574
|
variants: {
|
|
1688
1575
|
align: {
|
|
1689
1576
|
start: "items-start",
|
|
@@ -1705,10 +1592,10 @@ var gridVariants = cva16("grid", {
|
|
|
1705
1592
|
justify: "start"
|
|
1706
1593
|
}
|
|
1707
1594
|
});
|
|
1708
|
-
var Grid =
|
|
1595
|
+
var Grid = React24.forwardRef(
|
|
1709
1596
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
1710
1597
|
const Component = asChild ? Slot3 : "div";
|
|
1711
|
-
return /* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ jsx26(
|
|
1712
1599
|
Component,
|
|
1713
1600
|
{
|
|
1714
1601
|
ref,
|
|
@@ -1730,11 +1617,11 @@ var Grid = React27.forwardRef(
|
|
|
1730
1617
|
Grid.displayName = "Grid";
|
|
1731
1618
|
|
|
1732
1619
|
// src/components/box/Box.tsx
|
|
1733
|
-
import * as
|
|
1734
|
-
import { cva as
|
|
1620
|
+
import * as React25 from "react";
|
|
1621
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
1735
1622
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
1736
|
-
import { jsx as
|
|
1737
|
-
var boxVariants =
|
|
1623
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1624
|
+
var boxVariants = cva16("flex", {
|
|
1738
1625
|
variants: {
|
|
1739
1626
|
direction: {
|
|
1740
1627
|
row: "flex-row",
|
|
@@ -1770,10 +1657,10 @@ var boxVariants = cva17("flex", {
|
|
|
1770
1657
|
wrap: "nowrap"
|
|
1771
1658
|
}
|
|
1772
1659
|
});
|
|
1773
|
-
var Box =
|
|
1660
|
+
var Box = React25.forwardRef(
|
|
1774
1661
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
1775
1662
|
const Component = asChild ? Slot4 : "div";
|
|
1776
|
-
return /* @__PURE__ */
|
|
1663
|
+
return /* @__PURE__ */ jsx27(
|
|
1777
1664
|
Component,
|
|
1778
1665
|
{
|
|
1779
1666
|
ref,
|
|
@@ -1791,16 +1678,16 @@ var Box = React28.forwardRef(
|
|
|
1791
1678
|
Box.displayName = "Box";
|
|
1792
1679
|
|
|
1793
1680
|
// src/components/berget-logo/BergetLogo.tsx
|
|
1794
|
-
import * as
|
|
1795
|
-
import { jsx as
|
|
1796
|
-
var BergetLogo =
|
|
1681
|
+
import * as React26 from "react";
|
|
1682
|
+
import { jsx as jsx28, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1683
|
+
var BergetLogo = React26.forwardRef(
|
|
1797
1684
|
({ variant = "logotype", color = "auto", size = 48, className, ...props }, ref) => {
|
|
1798
1685
|
const fillColor = color === "auto" ? "var(--berget-logo-light)" : color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
1799
1686
|
if (variant === "symbol") {
|
|
1800
1687
|
const aspectRatio2 = 463 / 419;
|
|
1801
1688
|
const width2 = size * aspectRatio2;
|
|
1802
1689
|
const height2 = size;
|
|
1803
|
-
return /* @__PURE__ */
|
|
1690
|
+
return /* @__PURE__ */ jsx28(
|
|
1804
1691
|
"svg",
|
|
1805
1692
|
{
|
|
1806
1693
|
ref,
|
|
@@ -1813,7 +1700,7 @@ var BergetLogo = React29.forwardRef(
|
|
|
1813
1700
|
"aria-label": "Berget symbol",
|
|
1814
1701
|
className: cn("inline-block", className),
|
|
1815
1702
|
...props,
|
|
1816
|
-
children: /* @__PURE__ */
|
|
1703
|
+
children: /* @__PURE__ */ jsx28(
|
|
1817
1704
|
"path",
|
|
1818
1705
|
{
|
|
1819
1706
|
d: "M208.739 17L255.261 17L446 403L398 403L313.5 255L261.5 176L233.163 96.1677L237.815 98.6522H226.185L230.837 96.1677L113 331L64.5 403L18 403L208.739 17Z",
|
|
@@ -1826,7 +1713,7 @@ var BergetLogo = React29.forwardRef(
|
|
|
1826
1713
|
const aspectRatio = 793.63 / 204.37;
|
|
1827
1714
|
const width = size * aspectRatio;
|
|
1828
1715
|
const height = size;
|
|
1829
|
-
return /* @__PURE__ */
|
|
1716
|
+
return /* @__PURE__ */ jsxs11(
|
|
1830
1717
|
"svg",
|
|
1831
1718
|
{
|
|
1832
1719
|
ref,
|
|
@@ -1840,59 +1727,59 @@ var BergetLogo = React29.forwardRef(
|
|
|
1840
1727
|
className: cn("inline-block", className),
|
|
1841
1728
|
...props,
|
|
1842
1729
|
children: [
|
|
1843
|
-
/* @__PURE__ */
|
|
1844
|
-
/* @__PURE__ */
|
|
1730
|
+
/* @__PURE__ */ jsxs11("g", { style: { fill: fillColor }, children: [
|
|
1731
|
+
/* @__PURE__ */ jsx28(
|
|
1845
1732
|
"path",
|
|
1846
1733
|
{
|
|
1847
1734
|
className: "berget-logotype-fill",
|
|
1848
1735
|
d: "M268.78,172.54v-96.04h37.74c10.39,0,18.26,2.33,23.6,7,5.33,4.67,8.01,10.52,8.01,17.56,0,6.13-1.72,11-5.15,14.61-3.43,3.61-7.58,6.06-12.44,7.34,3.81.73,7.22,2.2,10.22,4.39,3.01,2.2,5.36,4.94,7.08,8.23,1.72,3.29,2.58,6.86,2.58,10.7,0,4.94-1.27,9.4-3.79,13.38-2.53,3.98-6.22,7.11-11.08,9.4-4.86,2.29-10.82,3.43-17.87,3.43h-38.89ZM283.93,117.66h20.74c5.81,0,10.24-1.3,13.29-3.91,3.05-2.61,4.58-6.19,4.58-10.77s-1.51-8.05-4.51-10.7c-3-2.65-7.55-3.98-13.65-3.98h-20.45v29.36ZM283.93,160.61h21.74c6.1,0,10.84-1.37,14.22-4.11,3.38-2.75,5.08-6.59,5.08-11.53s-1.76-8.85-5.29-11.73-8.29-4.32-14.3-4.32h-21.45v31.69Z"
|
|
1849
1736
|
}
|
|
1850
1737
|
),
|
|
1851
|
-
/* @__PURE__ */
|
|
1738
|
+
/* @__PURE__ */ jsx28(
|
|
1852
1739
|
"path",
|
|
1853
1740
|
{
|
|
1854
1741
|
className: "berget-logotype-fill",
|
|
1855
1742
|
d: "M382.45,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81,2.91-1.88,5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM382.45,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z"
|
|
1856
1743
|
}
|
|
1857
1744
|
),
|
|
1858
|
-
/* @__PURE__ */
|
|
1745
|
+
/* @__PURE__ */ jsx28(
|
|
1859
1746
|
"path",
|
|
1860
1747
|
{
|
|
1861
1748
|
className: "berget-logotype-fill",
|
|
1862
1749
|
d: "M425.62,172.54v-68.05h13.59l1.29,12.9c2.47-4.48,5.93-8.03,10.37-10.63,4.43-2.61,9.79-3.91,16.08-3.91v15.23h-4.15c-4.19,0-7.93.67-11.22,1.99-3.29,1.33-5.91,3.57-7.86,6.72-1.96,3.16-2.93,7.53-2.93,13.1v32.65h-15.16Z"
|
|
1863
1750
|
}
|
|
1864
1751
|
),
|
|
1865
|
-
/* @__PURE__ */
|
|
1752
|
+
/* @__PURE__ */ jsx28(
|
|
1866
1753
|
"path",
|
|
1867
1754
|
{
|
|
1868
1755
|
className: "berget-logotype-fill",
|
|
1869
1756
|
d: "M500.25,151.69c-3.72,0-7.14-.41-10.29-1.24l-6.15,5.76c1.05.64,2.34,1.19,3.86,1.65,1.52.46,3.66.87,6.43,1.23,2.76.37,6.53.73,11.29,1.1,9.43.82,16.25,3,20.44,6.52,4.2,3.52,6.29,8.21,6.29,14.06,0,4.02-1.12,7.84-3.35,11.45-2.24,3.61-5.72,6.54-10.44,8.78s-10.74,3.36-18.09,3.36c-9.91,0-17.94-1.8-24.09-5.42-6.15-3.62-9.22-9.08-9.22-16.4,0-2.84.78-5.65,2.35-8.44,1.57-2.79,4.08-5.42,7.51-7.89-2-.83-3.74-1.72-5.22-2.68-1.48-.96-2.79-1.94-3.94-2.95v-3.29l12.3-12.07c-5.53-4.57-8.29-10.56-8.29-17.97,0-4.48,1.12-8.58,3.36-12.28,2.24-3.7,5.5-6.65,9.79-8.85,4.29-2.2,9.43-3.29,15.44-3.29,4.01,0,7.72.55,11.15,1.64h26.45v9.6l-12.58.69c2.28,3.75,3.43,7.91,3.43,12.49s-1.13,8.69-3.36,12.35c-2.24,3.66-5.48,6.59-9.72,8.78-4.25,2.2-9.37,3.29-15.37,3.29ZM481.24,181.19c0,3.93,1.81,6.88,5.44,8.85,3.62,1.97,8.15,2.95,13.58,2.95s9.48-1.07,12.72-3.22c3.24-2.15,4.86-5,4.86-8.57,0-2.65-1.09-4.92-3.29-6.79-2.19-1.87-6.34-3.04-12.44-3.5-4.57-.27-8.63-.68-12.15-1.23-3.34,1.74-5.63,3.61-6.86,5.63-1.25,2.01-1.86,3.98-1.86,5.9ZM500.25,140.3c4.38,0,7.93-1.12,10.66-3.36,2.71-2.24,4.07-5.42,4.07-9.53s-1.36-7.41-4.07-9.6c-2.72-2.2-6.27-3.29-10.66-3.29s-8.08,1.1-10.79,3.29c-2.71,2.2-4.08,5.4-4.08,9.6s1.36,7.3,4.08,9.53c2.71,2.24,6.31,3.36,10.79,3.36Z"
|
|
1870
1757
|
}
|
|
1871
1758
|
),
|
|
1872
|
-
/* @__PURE__ */
|
|
1759
|
+
/* @__PURE__ */ jsx28(
|
|
1873
1760
|
"path",
|
|
1874
1761
|
{
|
|
1875
1762
|
className: "berget-logotype-fill",
|
|
1876
1763
|
d: "M574.61,174.19c-6.96,0-13.13-1.49-18.52-4.46-5.39-2.97-9.6-7.11-12.65-12.42-3.05-5.3-4.57-11.48-4.57-18.52s1.5-13.4,4.5-18.79c3-5.4,7.19-9.61,12.58-12.62c5.39-3.02,11.65-4.53,18.81-4.53s13,1.48,18.15,4.46c5.15,2.97,9.16,6.93,12.01,11.87,2.86,4.94,4.29,10.38,4.29,16.33,0,.92-.02,1.9-.07,2.95-.05,1.05-.12,2.22-.22,3.5h-55.19c.48,6.59,2.75,11.59,6.79,15.02,4.05,3.43,8.75,5.14,14.09,5.14,4.29,0,7.89-.93,10.79-2.81s5.08-4.41,6.51-7.61h15.16c-1.91,6.4-5.7,11.75-11.37,16.05-5.68,4.3-12.71,6.45-21.09,6.45ZM574.61,114.78c-5.05,0-9.54,1.44-13.44,4.32-3.91,2.88-6.29,7.2-7.15,12.97h40.04c-.29-5.3-2.24-9.51-5.87-12.62-3.62-3.11-8.15-4.67-13.58-4.67Z"
|
|
1877
1764
|
}
|
|
1878
1765
|
),
|
|
1879
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ jsx28(
|
|
1880
1767
|
"path",
|
|
1881
1768
|
{
|
|
1882
1769
|
className: "berget-logotype-fill",
|
|
1883
1770
|
d: "M646.23,172.54c-6.96,0-12.49-1.62-16.59-4.87-4.1-3.25-6.15-9.03-6.15-17.36v-33.61h-12.16v-12.21h12.16l1.86-17.29h13.29v17.29h20.02v12.21h-20.02v33.61c0,3.75.84,6.33,2.51,7.75,1.67,1.42,4.55,2.13,8.65,2.13h8.14v12.35h-11.72Z"
|
|
1884
1771
|
}
|
|
1885
1772
|
),
|
|
1886
|
-
/* @__PURE__ */
|
|
1773
|
+
/* @__PURE__ */ jsx28(
|
|
1887
1774
|
"path",
|
|
1888
1775
|
{
|
|
1889
1776
|
className: "berget-logotype-fill",
|
|
1890
1777
|
d: "M684.4,172.54l36.89-96.04h16.59l36.6,96.04h-16.01l-8.58-23.46h-40.88l-8.58,23.46h-16.01ZM713.28,137.56h32.31l-16.16-43.77-16.16,43.77Z"
|
|
1891
1778
|
}
|
|
1892
1779
|
),
|
|
1893
|
-
/* @__PURE__ */
|
|
1780
|
+
/* @__PURE__ */ jsx28("path", { className: "berget-logotype-fill", d: "M778.48,172.54v-96.04h15.15v96.04h-15.15Z" })
|
|
1894
1781
|
] }),
|
|
1895
|
-
/* @__PURE__ */
|
|
1782
|
+
/* @__PURE__ */ jsx28(
|
|
1896
1783
|
"path",
|
|
1897
1784
|
{
|
|
1898
1785
|
style: { fill: fillColor },
|
|
@@ -1906,19 +1793,14 @@ var BergetLogo = React29.forwardRef(
|
|
|
1906
1793
|
);
|
|
1907
1794
|
BergetLogo.displayName = "BergetLogo";
|
|
1908
1795
|
|
|
1909
|
-
// src/components/header/Header.tsx
|
|
1910
|
-
import * as React31 from "react";
|
|
1911
|
-
import { cva as cva18 } from "class-variance-authority";
|
|
1912
|
-
import { Menu, X } from "lucide-react";
|
|
1913
|
-
|
|
1914
1796
|
// src/components/language-select/LanguageSelect.tsx
|
|
1915
|
-
import * as
|
|
1797
|
+
import * as React27 from "react";
|
|
1916
1798
|
import * as SelectPrimitive2 from "@radix-ui/react-select";
|
|
1917
1799
|
import { Globe } from "lucide-react";
|
|
1918
|
-
import { jsx as
|
|
1919
|
-
var LanguageSelect =
|
|
1920
|
-
return /* @__PURE__ */
|
|
1921
|
-
/* @__PURE__ */
|
|
1800
|
+
import { jsx as jsx29, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1801
|
+
var LanguageSelect = React27.forwardRef(({ className, options, value, onValueChange }, ref) => {
|
|
1802
|
+
return /* @__PURE__ */ jsxs12(SelectPrimitive2.Root, { value, onValueChange, children: [
|
|
1803
|
+
/* @__PURE__ */ jsx29(
|
|
1922
1804
|
SelectPrimitive2.Trigger,
|
|
1923
1805
|
{
|
|
1924
1806
|
ref,
|
|
@@ -1940,10 +1822,10 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
|
|
|
1940
1822
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1941
1823
|
className
|
|
1942
1824
|
),
|
|
1943
|
-
children: /* @__PURE__ */
|
|
1825
|
+
children: /* @__PURE__ */ jsx29(Icon2, { icon: Globe, size: 16 })
|
|
1944
1826
|
}
|
|
1945
1827
|
),
|
|
1946
|
-
/* @__PURE__ */
|
|
1828
|
+
/* @__PURE__ */ jsx29(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx29(
|
|
1947
1829
|
SelectPrimitive2.Content,
|
|
1948
1830
|
{
|
|
1949
1831
|
className: cn(
|
|
@@ -1971,7 +1853,7 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
|
|
|
1971
1853
|
"origin-[--radix-select-content-transform-origin]"
|
|
1972
1854
|
),
|
|
1973
1855
|
position: "popper",
|
|
1974
|
-
children: /* @__PURE__ */
|
|
1856
|
+
children: /* @__PURE__ */ jsx29(SelectPrimitive2.Viewport, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsx29(
|
|
1975
1857
|
SelectPrimitive2.Item,
|
|
1976
1858
|
{
|
|
1977
1859
|
value: option.value,
|
|
@@ -1988,7 +1870,7 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
|
|
|
1988
1870
|
// Disabled state
|
|
1989
1871
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
|
|
1990
1872
|
),
|
|
1991
|
-
children: /* @__PURE__ */
|
|
1873
|
+
children: /* @__PURE__ */ jsx29(SelectPrimitive2.ItemText, { children: option.label })
|
|
1992
1874
|
},
|
|
1993
1875
|
option.value
|
|
1994
1876
|
)) })
|
|
@@ -1998,225 +1880,14 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
|
|
|
1998
1880
|
});
|
|
1999
1881
|
LanguageSelect.displayName = "LanguageSelect";
|
|
2000
1882
|
|
|
2001
|
-
// src/components/header/Header.tsx
|
|
2002
|
-
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2003
|
-
var headerVariants = cva18(
|
|
2004
|
-
"sticky top-0 z-50 header-backdrop backdrop-blur-xl border-b border-berget-border transition-all duration-200",
|
|
2005
|
-
{
|
|
2006
|
-
variants: {
|
|
2007
|
-
variant: {
|
|
2008
|
-
default: "",
|
|
2009
|
-
transparent: "border-transparent bg-transparent backdrop-blur-none"
|
|
2010
|
-
}
|
|
2011
|
-
},
|
|
2012
|
-
defaultVariants: {
|
|
2013
|
-
variant: "default"
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
);
|
|
2017
|
-
var HeaderContext = React31.createContext({
|
|
2018
|
-
isMobileMenuOpen: false,
|
|
2019
|
-
setIsMobileMenuOpen: () => {
|
|
2020
|
-
}
|
|
2021
|
-
});
|
|
2022
|
-
var useHeaderContext = () => React31.useContext(HeaderContext);
|
|
2023
|
-
var HeaderLogo = React31.forwardRef(
|
|
2024
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx32("div", { ref, className: cn("flex items-center", className), ...props, children })
|
|
2025
|
-
);
|
|
2026
|
-
HeaderLogo.displayName = "HeaderLogo";
|
|
2027
|
-
var HeaderNav = React31.forwardRef(({ className, links, ...props }, ref) => {
|
|
2028
|
-
return /* @__PURE__ */ jsx32("nav", { ref, className: cn("hidden md:flex items-center gap-fluid-lg", className), ...props, children: /* @__PURE__ */ jsx32("ul", { className: "flex items-center gap-fluid-lg", children: links.map((link) => /* @__PURE__ */ jsx32("li", { children: /* @__PURE__ */ jsxs15(
|
|
2029
|
-
Link,
|
|
2030
|
-
{
|
|
2031
|
-
href: link.href,
|
|
2032
|
-
variant: link.active ? "primary" : "default",
|
|
2033
|
-
size: "sm",
|
|
2034
|
-
className: cn("relative transition-all duration-200", link.active && "font-medium"),
|
|
2035
|
-
children: [
|
|
2036
|
-
link.icon && /* @__PURE__ */ jsx32("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ jsx32(Icon2, { icon: link.icon, size: 16 }) }),
|
|
2037
|
-
link.label
|
|
2038
|
-
]
|
|
2039
|
-
}
|
|
2040
|
-
) }, link.href)) }) });
|
|
2041
|
-
});
|
|
2042
|
-
HeaderNav.displayName = "HeaderNav";
|
|
2043
|
-
var HeaderActions = React31.forwardRef(
|
|
2044
|
-
({
|
|
2045
|
-
className,
|
|
2046
|
-
languageOptions,
|
|
2047
|
-
currentLanguage,
|
|
2048
|
-
onLanguageChange,
|
|
2049
|
-
loginButton,
|
|
2050
|
-
ctaButton,
|
|
2051
|
-
...props
|
|
2052
|
-
}, ref) => {
|
|
2053
|
-
return /* @__PURE__ */ jsxs15("div", { ref, className: cn("hidden md:flex items-center gap-2", className), ...props, children: [
|
|
2054
|
-
languageOptions.length > 0 && /* @__PURE__ */ jsx32(
|
|
2055
|
-
LanguageSelect,
|
|
2056
|
-
{
|
|
2057
|
-
options: languageOptions,
|
|
2058
|
-
value: currentLanguage,
|
|
2059
|
-
onValueChange: onLanguageChange
|
|
2060
|
-
}
|
|
2061
|
-
),
|
|
2062
|
-
loginButton,
|
|
2063
|
-
ctaButton
|
|
2064
|
-
] });
|
|
2065
|
-
}
|
|
2066
|
-
);
|
|
2067
|
-
HeaderActions.displayName = "HeaderActions";
|
|
2068
|
-
var MobileMenuButton = React31.forwardRef(({ className, ...props }, ref) => {
|
|
2069
|
-
const { isMobileMenuOpen, setIsMobileMenuOpen } = useHeaderContext();
|
|
2070
|
-
return /* @__PURE__ */ jsx32(
|
|
2071
|
-
"button",
|
|
2072
|
-
{
|
|
2073
|
-
ref,
|
|
2074
|
-
className: cn(
|
|
2075
|
-
"md:hidden flex items-center justify-center w-8 h-8 rounded-full",
|
|
2076
|
-
"cursor-pointer transition-all duration-200",
|
|
2077
|
-
"hover:bg-berget-surface-hover",
|
|
2078
|
-
className
|
|
2079
|
-
),
|
|
2080
|
-
onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen),
|
|
2081
|
-
"aria-label": isMobileMenuOpen ? "Close menu" : "Open menu",
|
|
2082
|
-
"aria-expanded": isMobileMenuOpen,
|
|
2083
|
-
"aria-controls": "mobile-menu",
|
|
2084
|
-
...props,
|
|
2085
|
-
children: isMobileMenuOpen ? /* @__PURE__ */ jsx32(Icon2, { icon: X, size: 16 }) : /* @__PURE__ */ jsx32(Icon2, { icon: Menu, size: 16 })
|
|
2086
|
-
}
|
|
2087
|
-
);
|
|
2088
|
-
});
|
|
2089
|
-
MobileMenuButton.displayName = "MobileMenuButton";
|
|
2090
|
-
var MobileMenu = React31.forwardRef(
|
|
2091
|
-
({
|
|
2092
|
-
className,
|
|
2093
|
-
links,
|
|
2094
|
-
languageOptions,
|
|
2095
|
-
currentLanguage,
|
|
2096
|
-
onLanguageChange,
|
|
2097
|
-
loginButton,
|
|
2098
|
-
ctaButton,
|
|
2099
|
-
...props
|
|
2100
|
-
}, ref) => {
|
|
2101
|
-
const { isMobileMenuOpen, setIsMobileMenuOpen } = useHeaderContext();
|
|
2102
|
-
if (!isMobileMenuOpen) return null;
|
|
2103
|
-
return /* @__PURE__ */ jsx32(
|
|
2104
|
-
"nav",
|
|
2105
|
-
{
|
|
2106
|
-
ref,
|
|
2107
|
-
id: "mobile-menu",
|
|
2108
|
-
"aria-label": "Mobile navigation menu",
|
|
2109
|
-
className: cn(
|
|
2110
|
-
"md:hidden absolute top-full left-0 right-0 bg-berget-background border-b border-berget-border shadow-berget-lg",
|
|
2111
|
-
className
|
|
2112
|
-
),
|
|
2113
|
-
...props,
|
|
2114
|
-
children: /* @__PURE__ */ jsxs15(Box, { direction: "column", gap: 0, className: "py-fluid-md", children: [
|
|
2115
|
-
/* @__PURE__ */ jsx32("ul", { className: "px-fluid-md pb-fluid-md border-b border-berget-border/50", children: links.map((link) => /* @__PURE__ */ jsx32("li", { children: /* @__PURE__ */ jsxs15(
|
|
2116
|
-
Link,
|
|
2117
|
-
{
|
|
2118
|
-
href: link.href,
|
|
2119
|
-
variant: link.active ? "primary" : "default",
|
|
2120
|
-
className: cn(
|
|
2121
|
-
"w-full py-3 px-4 rounded-lg transition-all duration-200 hover:bg-berget-surface-hover",
|
|
2122
|
-
link.active && "bg-berget-primary-tint font-medium"
|
|
2123
|
-
),
|
|
2124
|
-
onClick: () => setIsMobileMenuOpen(false),
|
|
2125
|
-
children: [
|
|
2126
|
-
link.icon && /* @__PURE__ */ jsx32("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ jsx32(Icon2, { icon: link.icon, size: 16 }) }),
|
|
2127
|
-
link.label
|
|
2128
|
-
]
|
|
2129
|
-
}
|
|
2130
|
-
) }, link.href)) }),
|
|
2131
|
-
/* @__PURE__ */ jsxs15("div", { className: "px-fluid-md py-fluid-md", children: [
|
|
2132
|
-
languageOptions.length > 0 && /* @__PURE__ */ jsx32("div", { className: "mb-fluid-md", children: /* @__PURE__ */ jsx32(
|
|
2133
|
-
LanguageSelect,
|
|
2134
|
-
{
|
|
2135
|
-
options: languageOptions,
|
|
2136
|
-
value: currentLanguage,
|
|
2137
|
-
onValueChange: onLanguageChange
|
|
2138
|
-
}
|
|
2139
|
-
) }),
|
|
2140
|
-
loginButton && /* @__PURE__ */ jsx32("div", { className: "mb-fluid-md w-full", children: loginButton }),
|
|
2141
|
-
ctaButton && /* @__PURE__ */ jsx32("div", { className: "w-full", children: ctaButton })
|
|
2142
|
-
] })
|
|
2143
|
-
] })
|
|
2144
|
-
}
|
|
2145
|
-
);
|
|
2146
|
-
}
|
|
2147
|
-
);
|
|
2148
|
-
MobileMenu.displayName = "MobileMenu";
|
|
2149
|
-
var Header = React31.forwardRef(
|
|
2150
|
-
({
|
|
2151
|
-
className,
|
|
2152
|
-
variant,
|
|
2153
|
-
logo,
|
|
2154
|
-
links,
|
|
2155
|
-
languageOptions,
|
|
2156
|
-
loginButton,
|
|
2157
|
-
ctaButton,
|
|
2158
|
-
currentLanguage,
|
|
2159
|
-
onLanguageChange,
|
|
2160
|
-
...props
|
|
2161
|
-
}, ref) => {
|
|
2162
|
-
const [isMobileMenuOpen, setIsMobileMenuOpen] = React31.useState(false);
|
|
2163
|
-
React31.useEffect(() => {
|
|
2164
|
-
if (isMobileMenuOpen) {
|
|
2165
|
-
document.body.style.overflow = "hidden";
|
|
2166
|
-
} else {
|
|
2167
|
-
document.body.style.overflow = "unset";
|
|
2168
|
-
}
|
|
2169
|
-
return () => {
|
|
2170
|
-
document.body.style.overflow = "unset";
|
|
2171
|
-
};
|
|
2172
|
-
}, [isMobileMenuOpen]);
|
|
2173
|
-
return /* @__PURE__ */ jsx32(HeaderContext.Provider, { value: { isMobileMenuOpen, setIsMobileMenuOpen }, children: /* @__PURE__ */ jsxs15("header", { ref, className: cn(headerVariants({ variant }), className), ...props, children: [
|
|
2174
|
-
/* @__PURE__ */ jsx32(Container, { size: "xl", children: /* @__PURE__ */ jsxs15(Box, { direction: "row", align: "center", justify: "between", className: "h-16", children: [
|
|
2175
|
-
/* @__PURE__ */ jsx32(HeaderLogo, { children: logo || /* @__PURE__ */ jsx32(BergetLogo, { variant: "logotype", color: "auto", size: 32 }) }),
|
|
2176
|
-
/* @__PURE__ */ jsx32(HeaderNav, { links }),
|
|
2177
|
-
/* @__PURE__ */ jsxs15(Box, { direction: "row", align: "center", gap: 3, children: [
|
|
2178
|
-
/* @__PURE__ */ jsx32(
|
|
2179
|
-
HeaderActions,
|
|
2180
|
-
{
|
|
2181
|
-
languageOptions,
|
|
2182
|
-
currentLanguage,
|
|
2183
|
-
onLanguageChange,
|
|
2184
|
-
loginButton,
|
|
2185
|
-
ctaButton
|
|
2186
|
-
}
|
|
2187
|
-
),
|
|
2188
|
-
ctaButton && /* @__PURE__ */ jsx32("div", { className: "md:hidden", children: ctaButton }),
|
|
2189
|
-
/* @__PURE__ */ jsx32(MobileMenuButton, {})
|
|
2190
|
-
] })
|
|
2191
|
-
] }) }),
|
|
2192
|
-
/* @__PURE__ */ jsx32(
|
|
2193
|
-
MobileMenu,
|
|
2194
|
-
{
|
|
2195
|
-
links,
|
|
2196
|
-
languageOptions,
|
|
2197
|
-
currentLanguage,
|
|
2198
|
-
onLanguageChange,
|
|
2199
|
-
loginButton,
|
|
2200
|
-
ctaButton
|
|
2201
|
-
}
|
|
2202
|
-
)
|
|
2203
|
-
] }) });
|
|
2204
|
-
}
|
|
2205
|
-
);
|
|
2206
|
-
Header.displayName = "Header";
|
|
2207
|
-
|
|
2208
|
-
// src/components/feature-cards/FeatureCards.tsx
|
|
2209
|
-
import * as React34 from "react";
|
|
2210
|
-
import { cva as cva20 } from "class-variance-authority";
|
|
2211
|
-
|
|
2212
1883
|
// src/components/list/List.tsx
|
|
2213
|
-
import * as
|
|
1884
|
+
import * as React29 from "react";
|
|
2214
1885
|
|
|
2215
1886
|
// src/components/divider/Divider.tsx
|
|
2216
|
-
import * as
|
|
2217
|
-
import { cva as
|
|
2218
|
-
import { jsx as
|
|
2219
|
-
var dividerVariants =
|
|
1887
|
+
import * as React28 from "react";
|
|
1888
|
+
import { cva as cva17 } from "class-variance-authority";
|
|
1889
|
+
import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1890
|
+
var dividerVariants = cva17("", {
|
|
2220
1891
|
variants: {
|
|
2221
1892
|
variant: {
|
|
2222
1893
|
default: "bg-berget-separator",
|
|
@@ -2236,7 +1907,7 @@ var dividerVariants = cva19("", {
|
|
|
2236
1907
|
size: "thin"
|
|
2237
1908
|
}
|
|
2238
1909
|
});
|
|
2239
|
-
var Divider =
|
|
1910
|
+
var Divider = React28.forwardRef(
|
|
2240
1911
|
({
|
|
2241
1912
|
className,
|
|
2242
1913
|
orientation = "horizontal",
|
|
@@ -2247,16 +1918,16 @@ var Divider = React32.forwardRef(
|
|
|
2247
1918
|
...props
|
|
2248
1919
|
}, ref) => {
|
|
2249
1920
|
if (label) {
|
|
2250
|
-
return /* @__PURE__ */
|
|
2251
|
-
labelPosition !== "right" && /* @__PURE__ */
|
|
1921
|
+
return /* @__PURE__ */ jsxs13("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
1922
|
+
labelPosition !== "right" && /* @__PURE__ */ jsx30(
|
|
2252
1923
|
Separator2,
|
|
2253
1924
|
{
|
|
2254
1925
|
orientation: "horizontal",
|
|
2255
1926
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
2256
1927
|
}
|
|
2257
1928
|
),
|
|
2258
|
-
/* @__PURE__ */
|
|
2259
|
-
labelPosition !== "left" && /* @__PURE__ */
|
|
1929
|
+
/* @__PURE__ */ jsx30(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
1930
|
+
labelPosition !== "left" && /* @__PURE__ */ jsx30(
|
|
2260
1931
|
Separator2,
|
|
2261
1932
|
{
|
|
2262
1933
|
orientation: "horizontal",
|
|
@@ -2265,7 +1936,7 @@ var Divider = React32.forwardRef(
|
|
|
2265
1936
|
)
|
|
2266
1937
|
] });
|
|
2267
1938
|
}
|
|
2268
|
-
return /* @__PURE__ */
|
|
1939
|
+
return /* @__PURE__ */ jsx30(
|
|
2269
1940
|
Separator2,
|
|
2270
1941
|
{
|
|
2271
1942
|
ref,
|
|
@@ -2283,19 +1954,19 @@ Divider.displayName = "Divider";
|
|
|
2283
1954
|
|
|
2284
1955
|
// src/components/list/List.tsx
|
|
2285
1956
|
import { Check as Check4 } from "lucide-react";
|
|
2286
|
-
import { jsx as
|
|
2287
|
-
var List =
|
|
1957
|
+
import { jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1958
|
+
var List = React29.forwardRef(
|
|
2288
1959
|
({ className, children, ...props }, ref) => {
|
|
2289
|
-
const childrenArray =
|
|
2290
|
-
return /* @__PURE__ */
|
|
1960
|
+
const childrenArray = React29.Children.toArray(children);
|
|
1961
|
+
return /* @__PURE__ */ jsx31("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs14(React29.Fragment, { children: [
|
|
2291
1962
|
child,
|
|
2292
|
-
index < childrenArray.length - 1 && /* @__PURE__ */
|
|
1963
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ jsx31(Divider, { variant: "subtle" })
|
|
2293
1964
|
] }, index)) });
|
|
2294
1965
|
}
|
|
2295
1966
|
);
|
|
2296
1967
|
List.displayName = "List";
|
|
2297
|
-
var ListItem =
|
|
2298
|
-
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */
|
|
1968
|
+
var ListItem = React29.forwardRef(
|
|
1969
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
2299
1970
|
"div",
|
|
2300
1971
|
{
|
|
2301
1972
|
ref,
|
|
@@ -2306,15 +1977,15 @@ var ListItem = React33.forwardRef(
|
|
|
2306
1977
|
),
|
|
2307
1978
|
...props,
|
|
2308
1979
|
children: [
|
|
2309
|
-
icon && /* @__PURE__ */
|
|
2310
|
-
/* @__PURE__ */
|
|
1980
|
+
icon && /* @__PURE__ */ jsx31("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
1981
|
+
/* @__PURE__ */ jsx31("div", { className: "flex-1 min-w-0", children })
|
|
2311
1982
|
]
|
|
2312
1983
|
}
|
|
2313
1984
|
)
|
|
2314
1985
|
);
|
|
2315
1986
|
ListItem.displayName = "ListItem";
|
|
2316
|
-
var ListHeader =
|
|
2317
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
1987
|
+
var ListHeader = React29.forwardRef(
|
|
1988
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
2318
1989
|
"div",
|
|
2319
1990
|
{
|
|
2320
1991
|
ref,
|
|
@@ -2325,111 +1996,21 @@ var ListHeader = React33.forwardRef(
|
|
|
2325
1996
|
)
|
|
2326
1997
|
);
|
|
2327
1998
|
ListHeader.displayName = "ListHeader";
|
|
2328
|
-
var FeatureList =
|
|
1999
|
+
var FeatureList = React29.forwardRef(
|
|
2329
2000
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2330
|
-
return /* @__PURE__ */
|
|
2331
|
-
variant === "bullet" ? /* @__PURE__ */
|
|
2332
|
-
/* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ jsx31("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs14("li", { className: "flex items-start gap-fluid-md", children: [
|
|
2002
|
+
variant === "bullet" ? /* @__PURE__ */ jsx31("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ jsx31("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx31(Icon2, { icon: Check4, size: 24, className: "text-berget-logo-light" }) }),
|
|
2003
|
+
/* @__PURE__ */ jsx31(Typography, { variant: "body", color: "muted", children: item })
|
|
2333
2004
|
] }, index)) });
|
|
2334
2005
|
}
|
|
2335
2006
|
);
|
|
2336
2007
|
FeatureList.displayName = "FeatureList";
|
|
2337
2008
|
|
|
2338
|
-
// src/components/feature-cards/FeatureCards.tsx
|
|
2339
|
-
import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2340
|
-
var featureCardVariants = cva20("", {
|
|
2341
|
-
variants: {
|
|
2342
|
-
variant: {
|
|
2343
|
-
highlight: "",
|
|
2344
|
-
glass: "",
|
|
2345
|
-
solid: ""
|
|
2346
|
-
}
|
|
2347
|
-
},
|
|
2348
|
-
defaultVariants: {
|
|
2349
|
-
variant: "highlight"
|
|
2350
|
-
}
|
|
2351
|
-
});
|
|
2352
|
-
var FeatureCard = React34.forwardRef(
|
|
2353
|
-
({
|
|
2354
|
-
className,
|
|
2355
|
-
variant = "highlight",
|
|
2356
|
-
icon: Icon3,
|
|
2357
|
-
iconColor,
|
|
2358
|
-
title,
|
|
2359
|
-
description,
|
|
2360
|
-
badge,
|
|
2361
|
-
linkText,
|
|
2362
|
-
linkHref,
|
|
2363
|
-
items,
|
|
2364
|
-
columns: _columns,
|
|
2365
|
-
...props
|
|
2366
|
-
}, ref) => {
|
|
2367
|
-
return /* @__PURE__ */ jsx35(
|
|
2368
|
-
Card2,
|
|
2369
|
-
{
|
|
2370
|
-
ref,
|
|
2371
|
-
variant,
|
|
2372
|
-
className: cn("w-full py-fluid-lg px-fluid-md", className),
|
|
2373
|
-
...props,
|
|
2374
|
-
children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-start gap-fluid-md", children: [
|
|
2375
|
-
(Icon3 || badge) && /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between w-full", children: [
|
|
2376
|
-
Icon3 && /* @__PURE__ */ jsx35("div", { className: "flex h-7 w-7 items-center justify-center", children: /* @__PURE__ */ jsx35(
|
|
2377
|
-
Icon3,
|
|
2378
|
-
{
|
|
2379
|
-
className: cn("h-7 w-7", iconColor || "text-foreground"),
|
|
2380
|
-
strokeWidth: 1.5
|
|
2381
|
-
}
|
|
2382
|
-
) }),
|
|
2383
|
-
badge && /* @__PURE__ */ jsx35("div", { className: "flex h-6 items-center justify-start px-6 bg-berget-feature-card-badge-bg rounded-full", children: /* @__PURE__ */ jsx35(
|
|
2384
|
-
Typography,
|
|
2385
|
-
{
|
|
2386
|
-
variant: "body",
|
|
2387
|
-
as: "span",
|
|
2388
|
-
className: "text-berget-feature-card-badge-fg",
|
|
2389
|
-
children: badge
|
|
2390
|
-
}
|
|
2391
|
-
) })
|
|
2392
|
-
] }),
|
|
2393
|
-
/* @__PURE__ */ jsx35(Typography, { variant: "h3", className: "text-foreground", children: title }),
|
|
2394
|
-
/* @__PURE__ */ jsx35(Typography, { variant: "body", className: "text-foreground/80", children: description }),
|
|
2395
|
-
items && items.length > 0 && /* @__PURE__ */ jsx35(FeatureList, { items, variant: "bullet" }),
|
|
2396
|
-
linkText && linkHref && /* @__PURE__ */ jsxs18("a", { href: linkHref, className: "text-p font-p leading-p text-berget-accent", children: [
|
|
2397
|
-
linkText,
|
|
2398
|
-
" \u2192"
|
|
2399
|
-
] })
|
|
2400
|
-
] })
|
|
2401
|
-
}
|
|
2402
|
-
);
|
|
2403
|
-
}
|
|
2404
|
-
);
|
|
2405
|
-
FeatureCard.displayName = "FeatureCard";
|
|
2406
|
-
var FeatureCards = React34.forwardRef(
|
|
2407
|
-
({ features, columns = 3, className }, ref) => {
|
|
2408
|
-
return /* @__PURE__ */ jsx35(
|
|
2409
|
-
"div",
|
|
2410
|
-
{
|
|
2411
|
-
ref,
|
|
2412
|
-
className: cn(
|
|
2413
|
-
"grid gap-fluid-lg p-fluid-md",
|
|
2414
|
-
// Explicit classes so Tailwind compiles them
|
|
2415
|
-
columns === 1 && "grid-cols-1 max-w-md mx-auto",
|
|
2416
|
-
columns === 2 && "grid-cols-1 md:grid-cols-2",
|
|
2417
|
-
columns === 3 && "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
2418
|
-
columns === 4 && "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
|
|
2419
|
-
className
|
|
2420
|
-
),
|
|
2421
|
-
children: features.map((feature, index) => /* @__PURE__ */ jsx35(FeatureCard, { ...feature }, index))
|
|
2422
|
-
}
|
|
2423
|
-
);
|
|
2424
|
-
}
|
|
2425
|
-
);
|
|
2426
|
-
FeatureCards.displayName = "FeatureCards";
|
|
2427
|
-
|
|
2428
2009
|
// src/components/hero-block/HeroBlock.tsx
|
|
2429
|
-
import * as
|
|
2430
|
-
import { cva as
|
|
2431
|
-
import { jsx as
|
|
2432
|
-
var heroBlockVariants =
|
|
2010
|
+
import * as React30 from "react";
|
|
2011
|
+
import { cva as cva18 } from "class-variance-authority";
|
|
2012
|
+
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2013
|
+
var heroBlockVariants = cva18(
|
|
2433
2014
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2434
2015
|
{
|
|
2435
2016
|
variants: {
|
|
@@ -2449,7 +2030,7 @@ var heroBlockVariants = cva21(
|
|
|
2449
2030
|
}
|
|
2450
2031
|
}
|
|
2451
2032
|
);
|
|
2452
|
-
var HeroBlock =
|
|
2033
|
+
var HeroBlock = React30.forwardRef(
|
|
2453
2034
|
({
|
|
2454
2035
|
className,
|
|
2455
2036
|
variant,
|
|
@@ -2461,26 +2042,26 @@ var HeroBlock = React35.forwardRef(
|
|
|
2461
2042
|
actions,
|
|
2462
2043
|
...props
|
|
2463
2044
|
}, ref) => {
|
|
2464
|
-
return /* @__PURE__ */
|
|
2045
|
+
return /* @__PURE__ */ jsx32(
|
|
2465
2046
|
"div",
|
|
2466
2047
|
{
|
|
2467
2048
|
ref,
|
|
2468
2049
|
className: cn(heroBlockVariants({ variant, withPattern }), className),
|
|
2469
2050
|
...props,
|
|
2470
|
-
children: /* @__PURE__ */
|
|
2471
|
-
tagline && /* @__PURE__ */
|
|
2051
|
+
children: /* @__PURE__ */ jsx32("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs15("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
2052
|
+
tagline && /* @__PURE__ */ jsx32(
|
|
2472
2053
|
Badge,
|
|
2473
2054
|
{
|
|
2474
2055
|
variant: "default",
|
|
2475
|
-
icon: TaglineIcon ? /* @__PURE__ */
|
|
2056
|
+
icon: TaglineIcon ? /* @__PURE__ */ jsx32(Icon2, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2476
2057
|
iconGap: 2,
|
|
2477
2058
|
className: "mb-fluid-md",
|
|
2478
2059
|
children: tagline
|
|
2479
2060
|
}
|
|
2480
2061
|
),
|
|
2481
|
-
/* @__PURE__ */
|
|
2482
|
-
/* @__PURE__ */
|
|
2483
|
-
actions && /* @__PURE__ */
|
|
2062
|
+
/* @__PURE__ */ jsx32(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
2063
|
+
/* @__PURE__ */ jsx32(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
2064
|
+
actions && /* @__PURE__ */ jsx32("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
2484
2065
|
] }) })
|
|
2485
2066
|
}
|
|
2486
2067
|
);
|
|
@@ -2489,13 +2070,13 @@ var HeroBlock = React35.forwardRef(
|
|
|
2489
2070
|
HeroBlock.displayName = "HeroBlock";
|
|
2490
2071
|
|
|
2491
2072
|
// src/components/code-block/CodeBlock.tsx
|
|
2492
|
-
import { useState as
|
|
2073
|
+
import { useState as useState2, useEffect as useEffect2, useCallback as useCallback3 } from "react";
|
|
2493
2074
|
import { Copy, Check as Check5 } from "lucide-react";
|
|
2494
|
-
import { jsx as
|
|
2075
|
+
import { jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2495
2076
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
2496
|
-
const [html, setHtml] =
|
|
2497
|
-
const [copied, setCopied] =
|
|
2498
|
-
|
|
2077
|
+
const [html, setHtml] = useState2(null);
|
|
2078
|
+
const [copied, setCopied] = useState2(false);
|
|
2079
|
+
useEffect2(() => {
|
|
2499
2080
|
getHighlighter().then((highlighter) => {
|
|
2500
2081
|
const loadedLangs = highlighter.getLoadedLanguages();
|
|
2501
2082
|
const lang = loadedLangs.includes(language) ? language : "text";
|
|
@@ -2507,16 +2088,16 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2507
2088
|
setCopied(true);
|
|
2508
2089
|
setTimeout(() => setCopied(false), 2e3);
|
|
2509
2090
|
}, [code]);
|
|
2510
|
-
const copyButton = /* @__PURE__ */
|
|
2091
|
+
const copyButton = /* @__PURE__ */ jsx33(
|
|
2511
2092
|
"button",
|
|
2512
2093
|
{
|
|
2513
2094
|
onClick: handleCopy,
|
|
2514
2095
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
2515
2096
|
"aria-label": "Copy code",
|
|
2516
|
-
children: copied ? /* @__PURE__ */
|
|
2097
|
+
children: copied ? /* @__PURE__ */ jsx33(Check5, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx33(Copy, { className: "w-3.5 h-3.5" })
|
|
2517
2098
|
}
|
|
2518
2099
|
);
|
|
2519
|
-
return /* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ jsxs16(
|
|
2520
2101
|
"div",
|
|
2521
2102
|
{
|
|
2522
2103
|
className: cn(
|
|
@@ -2524,27 +2105,78 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
2524
2105
|
className
|
|
2525
2106
|
),
|
|
2526
2107
|
children: [
|
|
2527
|
-
title && /* @__PURE__ */
|
|
2528
|
-
/* @__PURE__ */
|
|
2529
|
-
html ? /* @__PURE__ */
|
|
2108
|
+
title && /* @__PURE__ */ jsx33("div", { className: "!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg", children: /* @__PURE__ */ jsx33("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
2109
|
+
/* @__PURE__ */ jsx33("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
2110
|
+
html ? /* @__PURE__ */ jsx33(
|
|
2530
2111
|
"div",
|
|
2531
2112
|
{
|
|
2532
2113
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
2533
2114
|
dangerouslySetInnerHTML: { __html: html }
|
|
2534
2115
|
}
|
|
2535
|
-
) : /* @__PURE__ */
|
|
2116
|
+
) : /* @__PURE__ */ jsx33("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ jsx33("code", { children: code }) })
|
|
2536
2117
|
]
|
|
2537
2118
|
}
|
|
2538
2119
|
);
|
|
2539
2120
|
}
|
|
2121
|
+
|
|
2122
|
+
// src/components/window-frame/WindowFrame.tsx
|
|
2123
|
+
import * as React31 from "react";
|
|
2124
|
+
import { useState as useState3 } from "react";
|
|
2125
|
+
import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2126
|
+
var WindowFrame = React31.forwardRef(
|
|
2127
|
+
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
2128
|
+
const [internalActive, setInternalActive] = useState3(tabs?.[0]?.id ?? "");
|
|
2129
|
+
const currentTab = activeTab ?? internalActive;
|
|
2130
|
+
const handleTabChange = (id) => {
|
|
2131
|
+
if (onTabChange) {
|
|
2132
|
+
onTabChange(id);
|
|
2133
|
+
} else {
|
|
2134
|
+
setInternalActive(id);
|
|
2135
|
+
}
|
|
2136
|
+
};
|
|
2137
|
+
return /* @__PURE__ */ jsxs17(
|
|
2138
|
+
"div",
|
|
2139
|
+
{
|
|
2140
|
+
ref,
|
|
2141
|
+
className: cn(
|
|
2142
|
+
"rounded-berget-sm overflow-hidden shadow-berget-md border border-berget-brand-granite-700 bg-berget-brand-granite-800",
|
|
2143
|
+
className
|
|
2144
|
+
),
|
|
2145
|
+
...props,
|
|
2146
|
+
children: [
|
|
2147
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
2148
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
2149
|
+
/* @__PURE__ */ jsx34("div", { className: "w-3 h-3 rounded-full bg-[#FF5F56]" }),
|
|
2150
|
+
/* @__PURE__ */ jsx34("div", { className: "w-3 h-3 rounded-full bg-[#FFBD2E]" }),
|
|
2151
|
+
/* @__PURE__ */ jsx34("div", { className: "w-3 h-3 rounded-full bg-[#27C93F]" })
|
|
2152
|
+
] }),
|
|
2153
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ jsx34("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsx34(
|
|
2154
|
+
"button",
|
|
2155
|
+
{
|
|
2156
|
+
type: "button",
|
|
2157
|
+
onClick: () => handleTabChange(tab.id),
|
|
2158
|
+
className: cn(
|
|
2159
|
+
"px-3 py-1 text-sm transition-colors cursor-pointer",
|
|
2160
|
+
currentTab === tab.id ? "rounded-lg bg-white/10 text-berget-foreground font-medium" : "rounded text-berget-muted-foreground hover:text-berget-foreground font-medium"
|
|
2161
|
+
),
|
|
2162
|
+
children: tab.label
|
|
2163
|
+
},
|
|
2164
|
+
tab.id
|
|
2165
|
+
)) }) : /* @__PURE__ */ jsx34("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
2166
|
+
] }),
|
|
2167
|
+
/* @__PURE__ */ jsx34("div", { children })
|
|
2168
|
+
]
|
|
2169
|
+
}
|
|
2170
|
+
);
|
|
2171
|
+
}
|
|
2172
|
+
);
|
|
2173
|
+
WindowFrame.displayName = "WindowFrame";
|
|
2540
2174
|
export {
|
|
2541
2175
|
Alert2 as Alert,
|
|
2542
2176
|
AlertDescription,
|
|
2543
2177
|
AlertTitle,
|
|
2544
2178
|
Badge,
|
|
2545
2179
|
BergetLogo,
|
|
2546
|
-
BergetLogo as BergetLogotype,
|
|
2547
|
-
BergetLogo as BergetSymbol,
|
|
2548
2180
|
Box,
|
|
2549
2181
|
Button2 as Button,
|
|
2550
2182
|
Card2 as Card,
|
|
@@ -2556,8 +2188,6 @@ export {
|
|
|
2556
2188
|
Checkbox2 as Checkbox,
|
|
2557
2189
|
CodeBlock,
|
|
2558
2190
|
Container,
|
|
2559
|
-
FeatureCard,
|
|
2560
|
-
FeatureCards,
|
|
2561
2191
|
FeatureList,
|
|
2562
2192
|
Field,
|
|
2563
2193
|
FieldContent,
|
|
@@ -2570,7 +2200,6 @@ export {
|
|
|
2570
2200
|
FieldSet,
|
|
2571
2201
|
FieldTitle,
|
|
2572
2202
|
Grid,
|
|
2573
|
-
Header,
|
|
2574
2203
|
HeroBlock,
|
|
2575
2204
|
Icon2 as Icon,
|
|
2576
2205
|
Input2 as Input,
|
|
@@ -2580,14 +2209,13 @@ export {
|
|
|
2580
2209
|
List,
|
|
2581
2210
|
ListHeader,
|
|
2582
2211
|
ListItem,
|
|
2583
|
-
Section,
|
|
2584
|
-
SectionHeader,
|
|
2585
2212
|
Select2 as Select,
|
|
2586
2213
|
Switch,
|
|
2587
2214
|
TextArea,
|
|
2588
2215
|
ThemeProvider,
|
|
2589
2216
|
ThemeToggle,
|
|
2590
2217
|
Typography,
|
|
2218
|
+
WindowFrame,
|
|
2591
2219
|
alertVariants2 as alertVariants,
|
|
2592
2220
|
badgeVariants,
|
|
2593
2221
|
boxVariants,
|
|
@@ -2597,7 +2225,6 @@ export {
|
|
|
2597
2225
|
containerVariants,
|
|
2598
2226
|
gridVariants,
|
|
2599
2227
|
linkVariants,
|
|
2600
|
-
sectionVariants,
|
|
2601
2228
|
selectVariants,
|
|
2602
2229
|
switchRootVariants,
|
|
2603
2230
|
switchThumbVariants,
|