@bergetai/ui 0.3.6 → 0.5.0
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 +1594 -968
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -71
- package/dist/index.d.ts +78 -71
- package/dist/index.js +1590 -966
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -202,31 +202,31 @@ var ThemeToggle = React3.forwardRef(
|
|
|
202
202
|
ThemeToggle.displayName = "ThemeToggle";
|
|
203
203
|
|
|
204
204
|
// src/primitives/button.tsx
|
|
205
|
-
import * as React4 from "react";
|
|
206
|
-
import { cva } from "class-variance-authority";
|
|
207
205
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
206
|
+
import { cva } from "class-variance-authority";
|
|
207
|
+
import { cn as cn2 } from "cn";
|
|
208
208
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
209
209
|
var buttonVariants = cva(
|
|
210
|
-
"inline-flex shrink-0
|
|
210
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
211
211
|
{
|
|
212
212
|
variants: {
|
|
213
213
|
variant: {
|
|
214
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
214
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
215
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
216
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
217
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
218
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
219
219
|
link: "text-primary underline-offset-4 hover:underline"
|
|
220
220
|
},
|
|
221
221
|
size: {
|
|
222
|
-
default: "h-
|
|
223
|
-
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[
|
|
224
|
-
sm: "h-
|
|
225
|
-
lg: "h-
|
|
226
|
-
icon: "size-
|
|
227
|
-
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
228
|
-
"icon-sm": "size-
|
|
229
|
-
"icon-lg": "size-
|
|
222
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
223
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
224
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
225
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
226
|
+
icon: "size-8",
|
|
227
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
228
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
229
|
+
"icon-lg": "size-9"
|
|
230
230
|
}
|
|
231
231
|
},
|
|
232
232
|
defaultVariants: {
|
|
@@ -235,22 +235,21 @@ var buttonVariants = cva(
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
Button.displayName = "Button";
|
|
238
|
+
function Button({
|
|
239
|
+
className,
|
|
240
|
+
variant = "default",
|
|
241
|
+
size = "default",
|
|
242
|
+
...props
|
|
243
|
+
}) {
|
|
244
|
+
return /* @__PURE__ */ jsx3(
|
|
245
|
+
ButtonPrimitive,
|
|
246
|
+
{
|
|
247
|
+
"data-slot": "button",
|
|
248
|
+
className: cn2(buttonVariants({ variant, size, className })),
|
|
249
|
+
...props
|
|
250
|
+
}
|
|
251
|
+
);
|
|
252
|
+
}
|
|
254
253
|
|
|
255
254
|
// src/components/button/Button.tsx
|
|
256
255
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
@@ -303,11 +302,21 @@ function Button2({
|
|
|
303
302
|
className
|
|
304
303
|
);
|
|
305
304
|
const content = /* @__PURE__ */ jsx4("span", { className: cn("inline-flex items-center", !isIcon && "gap-2"), children });
|
|
306
|
-
return /* @__PURE__ */ jsx4(
|
|
305
|
+
return /* @__PURE__ */ jsx4(
|
|
306
|
+
Button,
|
|
307
|
+
{
|
|
308
|
+
className: baseClass,
|
|
309
|
+
ref,
|
|
310
|
+
render: asChildRender(asChild, children),
|
|
311
|
+
type,
|
|
312
|
+
...props,
|
|
313
|
+
children: asChild ? void 0 : content
|
|
314
|
+
}
|
|
315
|
+
);
|
|
307
316
|
}
|
|
308
317
|
|
|
309
318
|
// src/components/typography/Typography.tsx
|
|
310
|
-
import * as
|
|
319
|
+
import * as React4 from "react";
|
|
311
320
|
import { cva as cva2 } from "class-variance-authority";
|
|
312
321
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
313
322
|
var typographyVariants = cva2("", {
|
|
@@ -354,7 +363,7 @@ var defaultElementMap = {
|
|
|
354
363
|
mono: "p",
|
|
355
364
|
code: "span"
|
|
356
365
|
};
|
|
357
|
-
var Typography =
|
|
366
|
+
var Typography = React4.forwardRef(
|
|
358
367
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
359
368
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
360
369
|
return /* @__PURE__ */ jsx5(
|
|
@@ -371,43 +380,89 @@ var Typography = React5.forwardRef(
|
|
|
371
380
|
Typography.displayName = "Typography";
|
|
372
381
|
|
|
373
382
|
// src/components/card/Card.tsx
|
|
374
|
-
import * as
|
|
383
|
+
import * as React5 from "react";
|
|
375
384
|
import { cva as cva3 } from "class-variance-authority";
|
|
376
385
|
|
|
377
386
|
// src/primitives/card.tsx
|
|
378
|
-
import
|
|
387
|
+
import { cn as cn3 } from "cn";
|
|
379
388
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
380
|
-
|
|
381
|
-
|
|
389
|
+
function Card({
|
|
390
|
+
className,
|
|
391
|
+
size = "default",
|
|
392
|
+
...props
|
|
393
|
+
}) {
|
|
394
|
+
return /* @__PURE__ */ jsx6(
|
|
382
395
|
"div",
|
|
383
396
|
{
|
|
384
|
-
|
|
385
|
-
|
|
397
|
+
"data-slot": "card",
|
|
398
|
+
"data-size": size,
|
|
399
|
+
className: cn3(
|
|
400
|
+
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
401
|
+
className
|
|
402
|
+
),
|
|
386
403
|
...props
|
|
387
404
|
}
|
|
388
|
-
)
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
);
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
function CardHeader({ className, ...props }) {
|
|
408
|
+
return /* @__PURE__ */ jsx6(
|
|
409
|
+
"div",
|
|
410
|
+
{
|
|
411
|
+
"data-slot": "card-header",
|
|
412
|
+
className: cn3(
|
|
413
|
+
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
|
|
414
|
+
className
|
|
415
|
+
),
|
|
416
|
+
...props
|
|
417
|
+
}
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
function CardTitle({ className, ...props }) {
|
|
421
|
+
return /* @__PURE__ */ jsx6(
|
|
422
|
+
"div",
|
|
423
|
+
{
|
|
424
|
+
"data-slot": "card-title",
|
|
425
|
+
className: cn3(
|
|
426
|
+
"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
|
|
427
|
+
className
|
|
428
|
+
),
|
|
429
|
+
...props
|
|
430
|
+
}
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
function CardDescription({ className, ...props }) {
|
|
434
|
+
return /* @__PURE__ */ jsx6(
|
|
435
|
+
"div",
|
|
436
|
+
{
|
|
437
|
+
"data-slot": "card-description",
|
|
438
|
+
className: cn3("text-sm text-muted-foreground", className),
|
|
439
|
+
...props
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
function CardContent({ className, ...props }) {
|
|
444
|
+
return /* @__PURE__ */ jsx6(
|
|
445
|
+
"div",
|
|
446
|
+
{
|
|
447
|
+
"data-slot": "card-content",
|
|
448
|
+
className: cn3("px-(--card-spacing)", className),
|
|
449
|
+
...props
|
|
450
|
+
}
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
function CardFooter({ className, ...props }) {
|
|
454
|
+
return /* @__PURE__ */ jsx6(
|
|
455
|
+
"div",
|
|
456
|
+
{
|
|
457
|
+
"data-slot": "card-footer",
|
|
458
|
+
className: cn3(
|
|
459
|
+
"flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",
|
|
460
|
+
className
|
|
461
|
+
),
|
|
462
|
+
...props
|
|
463
|
+
}
|
|
464
|
+
);
|
|
465
|
+
}
|
|
411
466
|
|
|
412
467
|
// src/components/card/Card.tsx
|
|
413
468
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
@@ -429,7 +484,7 @@ var cardVariants = cva3("rounded-berget-sm", {
|
|
|
429
484
|
padding: "md"
|
|
430
485
|
}
|
|
431
486
|
});
|
|
432
|
-
var Card2 =
|
|
487
|
+
var Card2 = React5.forwardRef(
|
|
433
488
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
434
489
|
return /* @__PURE__ */ jsx7(
|
|
435
490
|
Card,
|
|
@@ -445,7 +500,7 @@ var Card2 = React7.forwardRef(
|
|
|
445
500
|
Card2.displayName = "Card";
|
|
446
501
|
|
|
447
502
|
// src/components/badge/Badge.tsx
|
|
448
|
-
import * as
|
|
503
|
+
import * as React6 from "react";
|
|
449
504
|
import { cva as cva4 } from "class-variance-authority";
|
|
450
505
|
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
451
506
|
var badgeVariants = cva4(
|
|
@@ -480,7 +535,7 @@ var badgeVariants = cva4(
|
|
|
480
535
|
}
|
|
481
536
|
}
|
|
482
537
|
);
|
|
483
|
-
var Badge =
|
|
538
|
+
var Badge = React6.forwardRef(
|
|
484
539
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
485
540
|
return /* @__PURE__ */ jsxs2("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
486
541
|
icon && /* @__PURE__ */ jsx8("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
@@ -491,20 +546,20 @@ var Badge = React8.forwardRef(
|
|
|
491
546
|
Badge.displayName = "Badge";
|
|
492
547
|
|
|
493
548
|
// src/components/alert/Alert.tsx
|
|
494
|
-
import * as
|
|
549
|
+
import * as React7 from "react";
|
|
495
550
|
import { cva as cva6 } from "class-variance-authority";
|
|
496
551
|
|
|
497
552
|
// src/primitives/alert.tsx
|
|
498
|
-
import * as React9 from "react";
|
|
499
553
|
import { cva as cva5 } from "class-variance-authority";
|
|
554
|
+
import { cn as cn4 } from "cn";
|
|
500
555
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
501
556
|
var alertVariants = cva5(
|
|
502
|
-
"relative w-full rounded-lg
|
|
557
|
+
"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
503
558
|
{
|
|
504
559
|
variants: {
|
|
505
560
|
variant: {
|
|
506
|
-
default: "",
|
|
507
|
-
destructive: ""
|
|
561
|
+
default: "bg-card text-card-foreground",
|
|
562
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
508
563
|
}
|
|
509
564
|
},
|
|
510
565
|
defaultVariants: {
|
|
@@ -512,14 +567,50 @@ var alertVariants = cva5(
|
|
|
512
567
|
}
|
|
513
568
|
}
|
|
514
569
|
);
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
)
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
570
|
+
function Alert({
|
|
571
|
+
className,
|
|
572
|
+
variant,
|
|
573
|
+
...props
|
|
574
|
+
}) {
|
|
575
|
+
return /* @__PURE__ */ jsx9(
|
|
576
|
+
"div",
|
|
577
|
+
{
|
|
578
|
+
"data-slot": "alert",
|
|
579
|
+
role: "alert",
|
|
580
|
+
className: cn4(alertVariants({ variant }), className),
|
|
581
|
+
...props
|
|
582
|
+
}
|
|
583
|
+
);
|
|
584
|
+
}
|
|
585
|
+
function AlertTitle({ className, ...props }) {
|
|
586
|
+
return /* @__PURE__ */ jsx9(
|
|
587
|
+
"div",
|
|
588
|
+
{
|
|
589
|
+
"data-slot": "alert-title",
|
|
590
|
+
className: cn4(
|
|
591
|
+
"font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
|
|
592
|
+
className
|
|
593
|
+
),
|
|
594
|
+
...props
|
|
595
|
+
}
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
function AlertDescription({
|
|
599
|
+
className,
|
|
600
|
+
...props
|
|
601
|
+
}) {
|
|
602
|
+
return /* @__PURE__ */ jsx9(
|
|
603
|
+
"div",
|
|
604
|
+
{
|
|
605
|
+
"data-slot": "alert-description",
|
|
606
|
+
className: cn4(
|
|
607
|
+
"text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
608
|
+
className
|
|
609
|
+
),
|
|
610
|
+
...props
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
}
|
|
523
614
|
|
|
524
615
|
// src/components/alert/Alert.tsx
|
|
525
616
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
@@ -537,24 +628,24 @@ var alertVariants2 = cva6("", {
|
|
|
537
628
|
variant: "default"
|
|
538
629
|
}
|
|
539
630
|
});
|
|
540
|
-
var Alert2 =
|
|
631
|
+
var Alert2 = React7.forwardRef(
|
|
541
632
|
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx10(Alert, { ref, className: cn(alertVariants2({ variant }), className), ...props })
|
|
542
633
|
);
|
|
543
634
|
Alert2.displayName = "Alert";
|
|
544
635
|
|
|
545
636
|
// src/components/dialog/Dialog.tsx
|
|
546
|
-
import * as
|
|
637
|
+
import * as React8 from "react";
|
|
547
638
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
548
639
|
import { X } from "lucide-react";
|
|
549
640
|
import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
550
641
|
var Dialog = DialogPrimitive.Root;
|
|
551
|
-
var DialogTrigger =
|
|
642
|
+
var DialogTrigger = React8.forwardRef(
|
|
552
643
|
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx11(DialogPrimitive.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
553
644
|
);
|
|
554
645
|
DialogTrigger.displayName = "DialogTrigger";
|
|
555
646
|
var DialogPortal = DialogPrimitive.Portal;
|
|
556
647
|
var DialogClose = DialogPrimitive.Close;
|
|
557
|
-
var DialogOverlay =
|
|
648
|
+
var DialogOverlay = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
558
649
|
DialogPrimitive.Backdrop,
|
|
559
650
|
{
|
|
560
651
|
ref,
|
|
@@ -566,7 +657,7 @@ var DialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
566
657
|
}
|
|
567
658
|
));
|
|
568
659
|
DialogOverlay.displayName = "DialogOverlay";
|
|
569
|
-
var DialogContent =
|
|
660
|
+
var DialogContent = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs3(DialogPortal, { children: [
|
|
570
661
|
/* @__PURE__ */ jsx11(DialogOverlay, {}),
|
|
571
662
|
/* @__PURE__ */ jsxs3(
|
|
572
663
|
DialogPrimitive.Popup,
|
|
@@ -598,7 +689,7 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx11(
|
|
|
598
689
|
}
|
|
599
690
|
);
|
|
600
691
|
DialogFooter.displayName = "DialogFooter";
|
|
601
|
-
var DialogTitle =
|
|
692
|
+
var DialogTitle = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
602
693
|
DialogPrimitive.Title,
|
|
603
694
|
{
|
|
604
695
|
ref,
|
|
@@ -608,7 +699,7 @@ var DialogTitle = React11.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
608
699
|
}
|
|
609
700
|
));
|
|
610
701
|
DialogTitle.displayName = "DialogTitle";
|
|
611
|
-
var DialogDescription =
|
|
702
|
+
var DialogDescription = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
612
703
|
DialogPrimitive.Description,
|
|
613
704
|
{
|
|
614
705
|
ref,
|
|
@@ -620,16 +711,16 @@ var DialogDescription = React11.forwardRef(({ className, children, ...props }, r
|
|
|
620
711
|
DialogDescription.displayName = "DialogDescription";
|
|
621
712
|
|
|
622
713
|
// src/components/alert-dialog/AlertDialog.tsx
|
|
623
|
-
import * as
|
|
714
|
+
import * as React9 from "react";
|
|
624
715
|
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
625
716
|
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
626
717
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
627
|
-
var AlertDialogTrigger =
|
|
718
|
+
var AlertDialogTrigger = React9.forwardRef(
|
|
628
719
|
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx12(AlertDialogPrimitive.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
629
720
|
);
|
|
630
721
|
AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
631
722
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
632
|
-
var AlertDialogOverlay =
|
|
723
|
+
var AlertDialogOverlay = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
633
724
|
AlertDialogPrimitive.Backdrop,
|
|
634
725
|
{
|
|
635
726
|
ref,
|
|
@@ -641,7 +732,7 @@ var AlertDialogOverlay = React12.forwardRef(({ className, ...props }, ref) => /*
|
|
|
641
732
|
}
|
|
642
733
|
));
|
|
643
734
|
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
644
|
-
var AlertDialogContent =
|
|
735
|
+
var AlertDialogContent = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs4(AlertDialogPortal, { children: [
|
|
645
736
|
/* @__PURE__ */ jsx12(AlertDialogOverlay, {}),
|
|
646
737
|
/* @__PURE__ */ jsx12(
|
|
647
738
|
AlertDialogPrimitive.Popup,
|
|
@@ -666,7 +757,7 @@ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx12(
|
|
|
666
757
|
}
|
|
667
758
|
);
|
|
668
759
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
669
|
-
var AlertDialogTitle =
|
|
760
|
+
var AlertDialogTitle = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
670
761
|
AlertDialogPrimitive.Title,
|
|
671
762
|
{
|
|
672
763
|
ref,
|
|
@@ -676,7 +767,7 @@ var AlertDialogTitle = React12.forwardRef(({ className, children, ...props }, re
|
|
|
676
767
|
}
|
|
677
768
|
));
|
|
678
769
|
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
679
|
-
var AlertDialogDescription =
|
|
770
|
+
var AlertDialogDescription = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
680
771
|
AlertDialogPrimitive.Description,
|
|
681
772
|
{
|
|
682
773
|
ref,
|
|
@@ -686,7 +777,7 @@ var AlertDialogDescription = React12.forwardRef(({ className, children, ...props
|
|
|
686
777
|
}
|
|
687
778
|
));
|
|
688
779
|
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
689
|
-
var AlertDialogAction =
|
|
780
|
+
var AlertDialogAction = React9.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
690
781
|
AlertDialogPrimitive.Close,
|
|
691
782
|
{
|
|
692
783
|
ref,
|
|
@@ -697,7 +788,7 @@ var AlertDialogAction = React12.forwardRef(({ className, asChild, children, ...p
|
|
|
697
788
|
}
|
|
698
789
|
));
|
|
699
790
|
AlertDialogAction.displayName = "AlertDialogAction";
|
|
700
|
-
var AlertDialogCancel =
|
|
791
|
+
var AlertDialogCancel = React9.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
701
792
|
AlertDialogPrimitive.Close,
|
|
702
793
|
{
|
|
703
794
|
ref,
|
|
@@ -710,12 +801,12 @@ var AlertDialogCancel = React12.forwardRef(({ className, asChild, children, ...p
|
|
|
710
801
|
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
711
802
|
|
|
712
803
|
// src/components/dropdown-menu/DropdownMenu.tsx
|
|
713
|
-
import * as
|
|
804
|
+
import * as React10 from "react";
|
|
714
805
|
import { Menu as DropdownMenuPrimitive } from "@base-ui/react/menu";
|
|
715
806
|
import { Check, ChevronRight, Circle } from "lucide-react";
|
|
716
807
|
import { Fragment, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
717
808
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
718
|
-
var DropdownMenuTrigger =
|
|
809
|
+
var DropdownMenuTrigger = React10.forwardRef(
|
|
719
810
|
({ asChild, children, ...props }, ref) => /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Trigger, { ref, render: asChildRender(asChild, children), ...props, children: asChild ? void 0 : children })
|
|
720
811
|
);
|
|
721
812
|
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
@@ -723,7 +814,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
|
723
814
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
724
815
|
var DropdownMenuSub = DropdownMenuPrimitive.SubmenuRoot;
|
|
725
816
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
726
|
-
var DropdownMenuSubTrigger =
|
|
817
|
+
var DropdownMenuSubTrigger = React10.forwardRef(({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
727
818
|
DropdownMenuPrimitive.SubmenuTrigger,
|
|
728
819
|
{
|
|
729
820
|
ref,
|
|
@@ -741,7 +832,7 @@ var DropdownMenuSubTrigger = React13.forwardRef(({ className, inset, asChild, ch
|
|
|
741
832
|
}
|
|
742
833
|
));
|
|
743
834
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
744
|
-
var DropdownMenuSubContent =
|
|
835
|
+
var DropdownMenuSubContent = React10.forwardRef(
|
|
745
836
|
({ className, side = "right", align = "start", alignOffset = -3, sideOffset = 0, ...props }, ref) => /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
|
|
746
837
|
DropdownMenuPrimitive.Positioner,
|
|
747
838
|
{
|
|
@@ -765,7 +856,7 @@ var DropdownMenuSubContent = React13.forwardRef(
|
|
|
765
856
|
) })
|
|
766
857
|
);
|
|
767
858
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
768
|
-
var DropdownMenuContent =
|
|
859
|
+
var DropdownMenuContent = React10.forwardRef(({ className, sideOffset = 4, align = "center", side, alignOffset, ...props }, ref) => /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
|
|
769
860
|
DropdownMenuPrimitive.Positioner,
|
|
770
861
|
{
|
|
771
862
|
side,
|
|
@@ -787,7 +878,7 @@ var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, align
|
|
|
787
878
|
}
|
|
788
879
|
) }));
|
|
789
880
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
790
|
-
var DropdownMenuItem =
|
|
881
|
+
var DropdownMenuItem = React10.forwardRef(({ className, inset, asChild, children, textValue, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
791
882
|
DropdownMenuPrimitive.Item,
|
|
792
883
|
{
|
|
793
884
|
ref,
|
|
@@ -803,7 +894,7 @@ var DropdownMenuItem = React13.forwardRef(({ className, inset, asChild, children
|
|
|
803
894
|
}
|
|
804
895
|
));
|
|
805
896
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
806
|
-
var DropdownMenuCheckboxItem =
|
|
897
|
+
var DropdownMenuCheckboxItem = React10.forwardRef(({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
807
898
|
DropdownMenuPrimitive.CheckboxItem,
|
|
808
899
|
{
|
|
809
900
|
ref,
|
|
@@ -821,7 +912,7 @@ var DropdownMenuCheckboxItem = React13.forwardRef(({ className, children, asChil
|
|
|
821
912
|
}
|
|
822
913
|
));
|
|
823
914
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
824
|
-
var DropdownMenuRadioItem =
|
|
915
|
+
var DropdownMenuRadioItem = React10.forwardRef(({ className, children, asChild, textValue, ...props }, ref) => /* @__PURE__ */ jsxs5(
|
|
825
916
|
DropdownMenuPrimitive.RadioItem,
|
|
826
917
|
{
|
|
827
918
|
ref,
|
|
@@ -839,7 +930,7 @@ var DropdownMenuRadioItem = React13.forwardRef(({ className, children, asChild,
|
|
|
839
930
|
}
|
|
840
931
|
));
|
|
841
932
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
842
|
-
var DropdownMenuLabel =
|
|
933
|
+
var DropdownMenuLabel = React10.forwardRef(({ className, inset, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
843
934
|
DropdownMenuPrimitive.GroupLabel,
|
|
844
935
|
{
|
|
845
936
|
ref,
|
|
@@ -854,7 +945,7 @@ var DropdownMenuLabel = React13.forwardRef(({ className, inset, asChild, childre
|
|
|
854
945
|
}
|
|
855
946
|
));
|
|
856
947
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
857
|
-
var DropdownMenuSeparator =
|
|
948
|
+
var DropdownMenuSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
858
949
|
DropdownMenuPrimitive.Separator,
|
|
859
950
|
{
|
|
860
951
|
ref,
|
|
@@ -875,180 +966,288 @@ var DropdownMenuShortcut = ({ className, ...props }) => {
|
|
|
875
966
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
876
967
|
|
|
877
968
|
// src/components/navigation-menu/NavigationMenu.tsx
|
|
878
|
-
import
|
|
969
|
+
import { NavigationMenu as NavigationMenuPrimitive2 } from "@base-ui/react/navigation-menu";
|
|
970
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
971
|
+
import { ChevronDown } from "lucide-react";
|
|
972
|
+
|
|
973
|
+
// src/primitives/navigation-menu.tsx
|
|
879
974
|
import { NavigationMenu as NavigationMenuPrimitive } from "@base-ui/react/navigation-menu";
|
|
880
975
|
import { cva as cva7 } from "class-variance-authority";
|
|
881
|
-
import {
|
|
882
|
-
import {
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
)
|
|
904
|
-
|
|
905
|
-
|
|
976
|
+
import { cn as cn5 } from "cn";
|
|
977
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
978
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
979
|
+
function NavigationMenuList({
|
|
980
|
+
className,
|
|
981
|
+
...props
|
|
982
|
+
}) {
|
|
983
|
+
return /* @__PURE__ */ jsx14(
|
|
984
|
+
NavigationMenuPrimitive.List,
|
|
985
|
+
{
|
|
986
|
+
"data-slot": "navigation-menu-list",
|
|
987
|
+
className: cn5(
|
|
988
|
+
"group flex flex-1 list-none items-center justify-center gap-0",
|
|
989
|
+
className
|
|
990
|
+
),
|
|
991
|
+
...props
|
|
992
|
+
}
|
|
993
|
+
);
|
|
994
|
+
}
|
|
995
|
+
function NavigationMenuItem({
|
|
996
|
+
className,
|
|
997
|
+
...props
|
|
998
|
+
}) {
|
|
999
|
+
return /* @__PURE__ */ jsx14(
|
|
1000
|
+
NavigationMenuPrimitive.Item,
|
|
1001
|
+
{
|
|
1002
|
+
"data-slot": "navigation-menu-item",
|
|
1003
|
+
className: cn5("relative", className),
|
|
1004
|
+
...props
|
|
1005
|
+
}
|
|
1006
|
+
);
|
|
1007
|
+
}
|
|
906
1008
|
var navigationMenuTriggerStyle = cva7(
|
|
907
|
-
"group inline-flex h-
|
|
1009
|
+
"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted"
|
|
908
1010
|
);
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
)
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
)
|
|
941
|
-
|
|
942
|
-
var NavigationMenuLink = React14.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
943
|
-
NavigationMenuPrimitive.Link,
|
|
944
|
-
{
|
|
945
|
-
ref,
|
|
946
|
-
className,
|
|
947
|
-
render: asChildRender(asChild, children),
|
|
948
|
-
...props,
|
|
949
|
-
children: asChild ? void 0 : children
|
|
950
|
-
}
|
|
951
|
-
));
|
|
952
|
-
NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
953
|
-
var NavigationMenuViewport = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(NavigationMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx14(NavigationMenuPrimitive.Positioner, { className: "isolate z-50 outline-none", children: /* @__PURE__ */ jsx14(
|
|
954
|
-
NavigationMenuPrimitive.Popup,
|
|
955
|
-
{
|
|
956
|
-
ref,
|
|
957
|
-
className: cn(
|
|
958
|
-
"origin-top-center relative mt-1.5 h-[var(--popup-height)] w-full overflow-hidden rounded-berget-xs border border-berget-border bg-berget-popover text-berget-popover-foreground shadow-berget-lg transition-[opacity,transform] data-starting-style:opacity-0 data-starting-style:scale-90 data-ending-style:opacity-0 data-ending-style:scale-90 md:w-[var(--popup-width)]",
|
|
959
|
-
className
|
|
960
|
-
),
|
|
961
|
-
...props,
|
|
962
|
-
children: /* @__PURE__ */ jsx14(NavigationMenuPrimitive.Viewport, {})
|
|
963
|
-
}
|
|
964
|
-
) }) }));
|
|
965
|
-
NavigationMenuViewport.displayName = "NavigationMenuViewport";
|
|
966
|
-
var NavigationMenuIndicator = React14.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsxs6(
|
|
967
|
-
NavigationMenuPrimitive.Icon,
|
|
968
|
-
{
|
|
969
|
-
ref,
|
|
970
|
-
className: cn(
|
|
971
|
-
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden transition-[opacity] data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
972
|
-
className
|
|
973
|
-
),
|
|
974
|
-
render: asChildRender(asChild, children),
|
|
975
|
-
...props,
|
|
976
|
-
children: [
|
|
977
|
-
asChild ? void 0 : children,
|
|
978
|
-
/* @__PURE__ */ jsx14("div", { className: "relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-berget-border shadow-md" })
|
|
979
|
-
]
|
|
980
|
-
}
|
|
981
|
-
));
|
|
982
|
-
NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
|
|
983
|
-
|
|
984
|
-
// src/components/table/Table.tsx
|
|
985
|
-
import * as React16 from "react";
|
|
1011
|
+
function NavigationMenuContent({
|
|
1012
|
+
className,
|
|
1013
|
+
...props
|
|
1014
|
+
}) {
|
|
1015
|
+
return /* @__PURE__ */ jsx14(
|
|
1016
|
+
NavigationMenuPrimitive.Content,
|
|
1017
|
+
{
|
|
1018
|
+
"data-slot": "navigation-menu-content",
|
|
1019
|
+
className: cn5(
|
|
1020
|
+
"data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",
|
|
1021
|
+
className
|
|
1022
|
+
),
|
|
1023
|
+
...props
|
|
1024
|
+
}
|
|
1025
|
+
);
|
|
1026
|
+
}
|
|
1027
|
+
function NavigationMenuIndicator({
|
|
1028
|
+
className,
|
|
1029
|
+
...props
|
|
1030
|
+
}) {
|
|
1031
|
+
return /* @__PURE__ */ jsx14(
|
|
1032
|
+
NavigationMenuPrimitive.Icon,
|
|
1033
|
+
{
|
|
1034
|
+
"data-slot": "navigation-menu-indicator",
|
|
1035
|
+
className: cn5(
|
|
1036
|
+
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",
|
|
1037
|
+
className
|
|
1038
|
+
),
|
|
1039
|
+
...props,
|
|
1040
|
+
children: /* @__PURE__ */ jsx14("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
1041
|
+
}
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
986
1044
|
|
|
987
|
-
// src/
|
|
988
|
-
import
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
TableBody.displayName = "TableBody";
|
|
998
|
-
var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
999
|
-
"tfoot",
|
|
1000
|
-
{
|
|
1001
|
-
ref,
|
|
1002
|
-
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
1003
|
-
...props
|
|
1004
|
-
}
|
|
1005
|
-
));
|
|
1006
|
-
TableFooter.displayName = "TableFooter";
|
|
1007
|
-
var TableRow = React15.forwardRef(
|
|
1008
|
-
({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
1009
|
-
"tr",
|
|
1045
|
+
// src/components/navigation-menu/NavigationMenu.tsx
|
|
1046
|
+
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1047
|
+
function NavigationMenu({
|
|
1048
|
+
align = "start",
|
|
1049
|
+
className,
|
|
1050
|
+
children,
|
|
1051
|
+
...props
|
|
1052
|
+
}) {
|
|
1053
|
+
return /* @__PURE__ */ jsxs7(
|
|
1054
|
+
NavigationMenuPrimitive2.Root,
|
|
1010
1055
|
{
|
|
1011
|
-
|
|
1056
|
+
"data-slot": "navigation-menu",
|
|
1012
1057
|
className: cn(
|
|
1013
|
-
"
|
|
1058
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
1014
1059
|
className
|
|
1015
1060
|
),
|
|
1016
|
-
...props
|
|
1061
|
+
...props,
|
|
1062
|
+
children: [
|
|
1063
|
+
children,
|
|
1064
|
+
/* @__PURE__ */ jsx15(NavigationMenuPositioner, { align })
|
|
1065
|
+
]
|
|
1017
1066
|
}
|
|
1018
|
-
)
|
|
1067
|
+
);
|
|
1068
|
+
}
|
|
1069
|
+
var navigationMenuTriggerStyle2 = cva8(
|
|
1070
|
+
"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-berget-xs px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-berget-surface-02 focus:bg-berget-surface-02 focus-visible:ring-3 focus-visible:ring-berget-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-berget-surface-02/50 data-popup-open:hover:bg-berget-surface-02 data-open:bg-berget-surface-02/50 data-open:hover:bg-berget-surface-02 data-open:focus:bg-berget-surface-02"
|
|
1019
1071
|
);
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
)
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1072
|
+
function NavigationMenuTrigger({
|
|
1073
|
+
className,
|
|
1074
|
+
children,
|
|
1075
|
+
...props
|
|
1076
|
+
}) {
|
|
1077
|
+
return /* @__PURE__ */ jsxs7(
|
|
1078
|
+
NavigationMenuPrimitive2.Trigger,
|
|
1079
|
+
{
|
|
1080
|
+
"data-slot": "navigation-menu-trigger",
|
|
1081
|
+
className: cn(navigationMenuTriggerStyle2(), "group", className),
|
|
1082
|
+
...props,
|
|
1083
|
+
children: [
|
|
1084
|
+
children,
|
|
1085
|
+
" ",
|
|
1086
|
+
/* @__PURE__ */ jsx15(
|
|
1087
|
+
ChevronDown,
|
|
1088
|
+
{
|
|
1089
|
+
className: "relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
|
|
1090
|
+
"aria-hidden": "true"
|
|
1091
|
+
}
|
|
1092
|
+
)
|
|
1093
|
+
]
|
|
1094
|
+
}
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
function NavigationMenuLink({ className, ...props }) {
|
|
1098
|
+
return /* @__PURE__ */ jsx15(
|
|
1099
|
+
NavigationMenuPrimitive2.Link,
|
|
1100
|
+
{
|
|
1101
|
+
"data-slot": "navigation-menu-link",
|
|
1102
|
+
className: cn(
|
|
1103
|
+
"flex items-center gap-2 rounded-berget-xs p-2 text-sm transition-all outline-none hover:bg-berget-surface-02 focus:bg-berget-surface-02 focus-visible:ring-3 focus-visible:ring-berget-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-berget-xs data-active:bg-berget-surface-02/50 data-active:hover:bg-berget-surface-02 data-active:focus:bg-berget-surface-02 [&_svg:not([class*='size-'])]:size-4",
|
|
1104
|
+
className
|
|
1105
|
+
),
|
|
1106
|
+
...props
|
|
1107
|
+
}
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1110
|
+
function NavigationMenuPositioner({
|
|
1111
|
+
className,
|
|
1112
|
+
side = "bottom",
|
|
1113
|
+
sideOffset = 8,
|
|
1114
|
+
align = "start",
|
|
1115
|
+
alignOffset = 0,
|
|
1116
|
+
...props
|
|
1117
|
+
}) {
|
|
1118
|
+
return /* @__PURE__ */ jsx15(NavigationMenuPrimitive2.Portal, { children: /* @__PURE__ */ jsx15(
|
|
1119
|
+
NavigationMenuPrimitive2.Positioner,
|
|
1120
|
+
{
|
|
1121
|
+
side,
|
|
1122
|
+
sideOffset,
|
|
1123
|
+
align,
|
|
1124
|
+
alignOffset,
|
|
1125
|
+
className: cn(
|
|
1126
|
+
"isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0",
|
|
1127
|
+
className
|
|
1128
|
+
),
|
|
1129
|
+
...props,
|
|
1130
|
+
children: /* @__PURE__ */ jsx15(NavigationMenuPrimitive2.Popup, { className: "data-[ending-style]:easing-[ease] xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-lg ring-1 ring-berget-border transition-[opacity,transform,width,height,scale,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0", children: /* @__PURE__ */ jsx15(NavigationMenuPrimitive2.Viewport, { className: "relative size-full overflow-hidden" }) })
|
|
1131
|
+
}
|
|
1132
|
+
) });
|
|
1133
|
+
}
|
|
1044
1134
|
|
|
1045
1135
|
// src/components/table/Table.tsx
|
|
1136
|
+
import * as React11 from "react";
|
|
1137
|
+
|
|
1138
|
+
// src/primitives/table.tsx
|
|
1139
|
+
import { cn as cn6 } from "cn";
|
|
1046
1140
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1047
|
-
|
|
1048
|
-
|
|
1141
|
+
function Table({ className, ...props }) {
|
|
1142
|
+
return /* @__PURE__ */ jsx16(
|
|
1143
|
+
"div",
|
|
1144
|
+
{
|
|
1145
|
+
"data-slot": "table-container",
|
|
1146
|
+
className: "relative w-full overflow-x-auto",
|
|
1147
|
+
children: /* @__PURE__ */ jsx16(
|
|
1148
|
+
"table",
|
|
1149
|
+
{
|
|
1150
|
+
"data-slot": "table",
|
|
1151
|
+
className: cn6("w-full caption-bottom text-sm", className),
|
|
1152
|
+
...props
|
|
1153
|
+
}
|
|
1154
|
+
)
|
|
1155
|
+
}
|
|
1156
|
+
);
|
|
1157
|
+
}
|
|
1158
|
+
function TableHeader({ className, ...props }) {
|
|
1159
|
+
return /* @__PURE__ */ jsx16(
|
|
1160
|
+
"thead",
|
|
1161
|
+
{
|
|
1162
|
+
"data-slot": "table-header",
|
|
1163
|
+
className: cn6("[&_tr]:border-b", className),
|
|
1164
|
+
...props
|
|
1165
|
+
}
|
|
1166
|
+
);
|
|
1167
|
+
}
|
|
1168
|
+
function TableBody({ className, ...props }) {
|
|
1169
|
+
return /* @__PURE__ */ jsx16(
|
|
1170
|
+
"tbody",
|
|
1171
|
+
{
|
|
1172
|
+
"data-slot": "table-body",
|
|
1173
|
+
className: cn6("[&_tr:last-child]:border-0", className),
|
|
1174
|
+
...props
|
|
1175
|
+
}
|
|
1176
|
+
);
|
|
1177
|
+
}
|
|
1178
|
+
function TableFooter({ className, ...props }) {
|
|
1179
|
+
return /* @__PURE__ */ jsx16(
|
|
1180
|
+
"tfoot",
|
|
1181
|
+
{
|
|
1182
|
+
"data-slot": "table-footer",
|
|
1183
|
+
className: cn6(
|
|
1184
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1185
|
+
className
|
|
1186
|
+
),
|
|
1187
|
+
...props
|
|
1188
|
+
}
|
|
1189
|
+
);
|
|
1190
|
+
}
|
|
1191
|
+
function TableRow({ className, ...props }) {
|
|
1192
|
+
return /* @__PURE__ */ jsx16(
|
|
1193
|
+
"tr",
|
|
1194
|
+
{
|
|
1195
|
+
"data-slot": "table-row",
|
|
1196
|
+
className: cn6(
|
|
1197
|
+
"border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1198
|
+
className
|
|
1199
|
+
),
|
|
1200
|
+
...props
|
|
1201
|
+
}
|
|
1202
|
+
);
|
|
1203
|
+
}
|
|
1204
|
+
function TableHead({ className, ...props }) {
|
|
1205
|
+
return /* @__PURE__ */ jsx16(
|
|
1206
|
+
"th",
|
|
1207
|
+
{
|
|
1208
|
+
"data-slot": "table-head",
|
|
1209
|
+
className: cn6(
|
|
1210
|
+
"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
|
|
1211
|
+
className
|
|
1212
|
+
),
|
|
1213
|
+
...props
|
|
1214
|
+
}
|
|
1215
|
+
);
|
|
1216
|
+
}
|
|
1217
|
+
function TableCell({ className, ...props }) {
|
|
1218
|
+
return /* @__PURE__ */ jsx16(
|
|
1219
|
+
"td",
|
|
1220
|
+
{
|
|
1221
|
+
"data-slot": "table-cell",
|
|
1222
|
+
className: cn6(
|
|
1223
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
|
|
1224
|
+
className
|
|
1225
|
+
),
|
|
1226
|
+
...props
|
|
1227
|
+
}
|
|
1228
|
+
);
|
|
1229
|
+
}
|
|
1230
|
+
function TableCaption({
|
|
1231
|
+
className,
|
|
1232
|
+
...props
|
|
1233
|
+
}) {
|
|
1234
|
+
return /* @__PURE__ */ jsx16(
|
|
1235
|
+
"caption",
|
|
1236
|
+
{
|
|
1237
|
+
"data-slot": "table-caption",
|
|
1238
|
+
className: cn6("mt-4 text-sm text-muted-foreground", className),
|
|
1239
|
+
...props
|
|
1240
|
+
}
|
|
1241
|
+
);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
// src/components/table/Table.tsx
|
|
1245
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1246
|
+
var Table2 = React11.forwardRef(
|
|
1247
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx17(Table, { ref, className, ...props })
|
|
1049
1248
|
);
|
|
1050
1249
|
Table2.displayName = "Table";
|
|
1051
|
-
var TableHeader2 =
|
|
1250
|
+
var TableHeader2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1052
1251
|
TableHeader,
|
|
1053
1252
|
{
|
|
1054
1253
|
ref,
|
|
@@ -1057,7 +1256,7 @@ var TableHeader2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1057
1256
|
}
|
|
1058
1257
|
));
|
|
1059
1258
|
TableHeader2.displayName = "TableHeader";
|
|
1060
|
-
var TableBody2 =
|
|
1259
|
+
var TableBody2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1061
1260
|
TableBody,
|
|
1062
1261
|
{
|
|
1063
1262
|
ref,
|
|
@@ -1066,7 +1265,7 @@ var TableBody2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1066
1265
|
}
|
|
1067
1266
|
));
|
|
1068
1267
|
TableBody2.displayName = "TableBody";
|
|
1069
|
-
var TableFooter2 =
|
|
1268
|
+
var TableFooter2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1070
1269
|
TableFooter,
|
|
1071
1270
|
{
|
|
1072
1271
|
ref,
|
|
@@ -1078,8 +1277,8 @@ var TableFooter2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1078
1277
|
}
|
|
1079
1278
|
));
|
|
1080
1279
|
TableFooter2.displayName = "TableFooter";
|
|
1081
|
-
var TableRow2 =
|
|
1082
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
1280
|
+
var TableRow2 = React11.forwardRef(
|
|
1281
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1083
1282
|
TableRow,
|
|
1084
1283
|
{
|
|
1085
1284
|
ref,
|
|
@@ -1092,7 +1291,7 @@ var TableRow2 = React16.forwardRef(
|
|
|
1092
1291
|
)
|
|
1093
1292
|
);
|
|
1094
1293
|
TableRow2.displayName = "TableRow";
|
|
1095
|
-
var TableHead2 =
|
|
1294
|
+
var TableHead2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1096
1295
|
TableHead,
|
|
1097
1296
|
{
|
|
1098
1297
|
ref,
|
|
@@ -1104,7 +1303,7 @@ var TableHead2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1104
1303
|
}
|
|
1105
1304
|
));
|
|
1106
1305
|
TableHead2.displayName = "TableHead";
|
|
1107
|
-
var TableCell2 =
|
|
1306
|
+
var TableCell2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1108
1307
|
TableCell,
|
|
1109
1308
|
{
|
|
1110
1309
|
ref,
|
|
@@ -1113,7 +1312,7 @@ var TableCell2 = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1113
1312
|
}
|
|
1114
1313
|
));
|
|
1115
1314
|
TableCell2.displayName = "TableCell";
|
|
1116
|
-
var TableCaption2 =
|
|
1315
|
+
var TableCaption2 = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx17(
|
|
1117
1316
|
TableCaption,
|
|
1118
1317
|
{
|
|
1119
1318
|
ref,
|
|
@@ -1124,68 +1323,80 @@ var TableCaption2 = React16.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1124
1323
|
TableCaption2.displayName = "TableCaption";
|
|
1125
1324
|
|
|
1126
1325
|
// src/components/item/Item.tsx
|
|
1127
|
-
import * as
|
|
1326
|
+
import * as React12 from "react";
|
|
1128
1327
|
|
|
1129
1328
|
// src/primitives/item.tsx
|
|
1130
|
-
import { cva as cva8 } from "class-variance-authority";
|
|
1131
1329
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
1132
1330
|
import { useRender } from "@base-ui/react/use-render";
|
|
1331
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
1332
|
+
import { cn as cn8 } from "cn";
|
|
1133
1333
|
|
|
1134
1334
|
// src/primitives/separator.tsx
|
|
1135
|
-
import * as React17 from "react";
|
|
1136
1335
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
1137
|
-
import {
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1336
|
+
import { cn as cn7 } from "cn";
|
|
1337
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1338
|
+
function Separator({
|
|
1339
|
+
className,
|
|
1340
|
+
orientation = "horizontal",
|
|
1341
|
+
...props
|
|
1342
|
+
}) {
|
|
1343
|
+
return /* @__PURE__ */ jsx18(
|
|
1344
|
+
SeparatorPrimitive,
|
|
1345
|
+
{
|
|
1346
|
+
"data-slot": "separator",
|
|
1347
|
+
orientation,
|
|
1348
|
+
className: cn7(
|
|
1349
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
1350
|
+
className
|
|
1351
|
+
),
|
|
1352
|
+
...props
|
|
1353
|
+
}
|
|
1354
|
+
);
|
|
1355
|
+
}
|
|
1152
1356
|
|
|
1153
1357
|
// src/primitives/item.tsx
|
|
1154
|
-
import { jsx as
|
|
1358
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1155
1359
|
function ItemGroup({ className, ...props }) {
|
|
1156
|
-
return /* @__PURE__ */
|
|
1360
|
+
return /* @__PURE__ */ jsx19(
|
|
1157
1361
|
"div",
|
|
1158
1362
|
{
|
|
1159
1363
|
role: "list",
|
|
1160
1364
|
"data-slot": "item-group",
|
|
1161
|
-
className:
|
|
1365
|
+
className: cn8(
|
|
1366
|
+
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
1367
|
+
className
|
|
1368
|
+
),
|
|
1162
1369
|
...props
|
|
1163
1370
|
}
|
|
1164
1371
|
);
|
|
1165
1372
|
}
|
|
1166
|
-
function ItemSeparator({
|
|
1167
|
-
|
|
1373
|
+
function ItemSeparator({
|
|
1374
|
+
className,
|
|
1375
|
+
...props
|
|
1376
|
+
}) {
|
|
1377
|
+
return /* @__PURE__ */ jsx19(
|
|
1168
1378
|
Separator,
|
|
1169
1379
|
{
|
|
1170
1380
|
"data-slot": "item-separator",
|
|
1171
1381
|
orientation: "horizontal",
|
|
1172
|
-
className:
|
|
1382
|
+
className: cn8("my-2", className),
|
|
1173
1383
|
...props
|
|
1174
1384
|
}
|
|
1175
1385
|
);
|
|
1176
1386
|
}
|
|
1177
|
-
var itemVariants =
|
|
1178
|
-
"group/item
|
|
1387
|
+
var itemVariants = cva9(
|
|
1388
|
+
"group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
|
|
1179
1389
|
{
|
|
1180
1390
|
variants: {
|
|
1181
1391
|
variant: {
|
|
1182
|
-
default: "
|
|
1392
|
+
default: "border-transparent",
|
|
1183
1393
|
outline: "border-border",
|
|
1184
|
-
muted: "bg-muted/50"
|
|
1394
|
+
muted: "border-transparent bg-muted/50"
|
|
1185
1395
|
},
|
|
1186
1396
|
size: {
|
|
1187
|
-
default: "gap-
|
|
1188
|
-
sm: "gap-2.5 px-
|
|
1397
|
+
default: "gap-2.5 px-3 py-2.5",
|
|
1398
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
1399
|
+
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
1189
1400
|
}
|
|
1190
1401
|
},
|
|
1191
1402
|
defaultVariants: {
|
|
@@ -1203,26 +1414,28 @@ function Item({
|
|
|
1203
1414
|
}) {
|
|
1204
1415
|
return useRender({
|
|
1205
1416
|
defaultTagName: "div",
|
|
1206
|
-
render,
|
|
1207
1417
|
props: mergeProps(
|
|
1208
1418
|
{
|
|
1209
|
-
|
|
1210
|
-
"data-variant": variant,
|
|
1211
|
-
"data-size": size,
|
|
1212
|
-
className: cn(itemVariants({ variant, size, className }))
|
|
1419
|
+
className: cn8(itemVariants({ variant, size, className }))
|
|
1213
1420
|
},
|
|
1214
1421
|
props
|
|
1215
|
-
)
|
|
1422
|
+
),
|
|
1423
|
+
render,
|
|
1424
|
+
state: {
|
|
1425
|
+
slot: "item",
|
|
1426
|
+
variant,
|
|
1427
|
+
size
|
|
1428
|
+
}
|
|
1216
1429
|
});
|
|
1217
1430
|
}
|
|
1218
|
-
var itemMediaVariants =
|
|
1219
|
-
"flex shrink-0 items-center justify-center gap-2 group-has-
|
|
1431
|
+
var itemMediaVariants = cva9(
|
|
1432
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
|
|
1220
1433
|
{
|
|
1221
1434
|
variants: {
|
|
1222
1435
|
variant: {
|
|
1223
1436
|
default: "bg-transparent",
|
|
1224
|
-
icon: "
|
|
1225
|
-
image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
|
|
1437
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
1438
|
+
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
1226
1439
|
}
|
|
1227
1440
|
},
|
|
1228
1441
|
defaultVariants: {
|
|
@@ -1235,44 +1448,49 @@ function ItemMedia({
|
|
|
1235
1448
|
variant = "default",
|
|
1236
1449
|
...props
|
|
1237
1450
|
}) {
|
|
1238
|
-
return /* @__PURE__ */
|
|
1451
|
+
return /* @__PURE__ */ jsx19(
|
|
1239
1452
|
"div",
|
|
1240
1453
|
{
|
|
1241
1454
|
"data-slot": "item-media",
|
|
1242
1455
|
"data-variant": variant,
|
|
1243
|
-
className:
|
|
1456
|
+
className: cn8(itemMediaVariants({ variant, className })),
|
|
1244
1457
|
...props
|
|
1245
1458
|
}
|
|
1246
1459
|
);
|
|
1247
1460
|
}
|
|
1248
1461
|
function ItemContent({ className, ...props }) {
|
|
1249
|
-
return /* @__PURE__ */
|
|
1462
|
+
return /* @__PURE__ */ jsx19(
|
|
1250
1463
|
"div",
|
|
1251
1464
|
{
|
|
1252
1465
|
"data-slot": "item-content",
|
|
1253
|
-
className:
|
|
1466
|
+
className: cn8(
|
|
1467
|
+
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
|
|
1468
|
+
className
|
|
1469
|
+
),
|
|
1254
1470
|
...props
|
|
1255
1471
|
}
|
|
1256
1472
|
);
|
|
1257
1473
|
}
|
|
1258
1474
|
function ItemTitle({ className, ...props }) {
|
|
1259
|
-
return /* @__PURE__ */
|
|
1475
|
+
return /* @__PURE__ */ jsx19(
|
|
1260
1476
|
"div",
|
|
1261
1477
|
{
|
|
1262
1478
|
"data-slot": "item-title",
|
|
1263
|
-
className:
|
|
1479
|
+
className: cn8(
|
|
1480
|
+
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
1481
|
+
className
|
|
1482
|
+
),
|
|
1264
1483
|
...props
|
|
1265
1484
|
}
|
|
1266
1485
|
);
|
|
1267
1486
|
}
|
|
1268
1487
|
function ItemDescription({ className, ...props }) {
|
|
1269
|
-
return /* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ jsx19(
|
|
1270
1489
|
"p",
|
|
1271
1490
|
{
|
|
1272
1491
|
"data-slot": "item-description",
|
|
1273
|
-
className:
|
|
1274
|
-
"
|
|
1275
|
-
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
1492
|
+
className: cn8(
|
|
1493
|
+
"line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
1276
1494
|
className
|
|
1277
1495
|
),
|
|
1278
1496
|
...props
|
|
@@ -1280,33 +1498,46 @@ function ItemDescription({ className, ...props }) {
|
|
|
1280
1498
|
);
|
|
1281
1499
|
}
|
|
1282
1500
|
function ItemActions({ className, ...props }) {
|
|
1283
|
-
return /* @__PURE__ */
|
|
1501
|
+
return /* @__PURE__ */ jsx19(
|
|
1502
|
+
"div",
|
|
1503
|
+
{
|
|
1504
|
+
"data-slot": "item-actions",
|
|
1505
|
+
className: cn8("flex items-center gap-2", className),
|
|
1506
|
+
...props
|
|
1507
|
+
}
|
|
1508
|
+
);
|
|
1284
1509
|
}
|
|
1285
1510
|
function ItemHeader({ className, ...props }) {
|
|
1286
|
-
return /* @__PURE__ */
|
|
1511
|
+
return /* @__PURE__ */ jsx19(
|
|
1287
1512
|
"div",
|
|
1288
1513
|
{
|
|
1289
1514
|
"data-slot": "item-header",
|
|
1290
|
-
className:
|
|
1515
|
+
className: cn8(
|
|
1516
|
+
"flex basis-full items-center justify-between gap-2",
|
|
1517
|
+
className
|
|
1518
|
+
),
|
|
1291
1519
|
...props
|
|
1292
1520
|
}
|
|
1293
1521
|
);
|
|
1294
1522
|
}
|
|
1295
1523
|
function ItemFooter({ className, ...props }) {
|
|
1296
|
-
return /* @__PURE__ */
|
|
1524
|
+
return /* @__PURE__ */ jsx19(
|
|
1297
1525
|
"div",
|
|
1298
1526
|
{
|
|
1299
1527
|
"data-slot": "item-footer",
|
|
1300
|
-
className:
|
|
1528
|
+
className: cn8(
|
|
1529
|
+
"flex basis-full items-center justify-between gap-2",
|
|
1530
|
+
className
|
|
1531
|
+
),
|
|
1301
1532
|
...props
|
|
1302
1533
|
}
|
|
1303
1534
|
);
|
|
1304
1535
|
}
|
|
1305
1536
|
|
|
1306
1537
|
// src/components/item/Item.tsx
|
|
1307
|
-
import { jsx as
|
|
1538
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1308
1539
|
function Item2({ className, asChild, children, ...props }) {
|
|
1309
|
-
return /* @__PURE__ */
|
|
1540
|
+
return /* @__PURE__ */ jsx20(
|
|
1310
1541
|
Item,
|
|
1311
1542
|
{
|
|
1312
1543
|
render: asChild ? children : void 0,
|
|
@@ -1325,8 +1556,8 @@ function Item2({ className, asChild, children, ...props }) {
|
|
|
1325
1556
|
}
|
|
1326
1557
|
);
|
|
1327
1558
|
}
|
|
1328
|
-
var ItemMedia2 =
|
|
1329
|
-
return /* @__PURE__ */
|
|
1559
|
+
var ItemMedia2 = React12.forwardRef(({ className, ...props }, ref) => {
|
|
1560
|
+
return /* @__PURE__ */ jsx20(
|
|
1330
1561
|
ItemMedia,
|
|
1331
1562
|
{
|
|
1332
1563
|
ref,
|
|
@@ -1336,8 +1567,8 @@ var ItemMedia2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
1336
1567
|
);
|
|
1337
1568
|
});
|
|
1338
1569
|
ItemMedia2.displayName = "ItemMedia";
|
|
1339
|
-
var ItemTitle2 =
|
|
1340
|
-
return /* @__PURE__ */
|
|
1570
|
+
var ItemTitle2 = React12.forwardRef(({ className, ...props }, ref) => {
|
|
1571
|
+
return /* @__PURE__ */ jsx20(
|
|
1341
1572
|
ItemTitle,
|
|
1342
1573
|
{
|
|
1343
1574
|
ref,
|
|
@@ -1347,8 +1578,8 @@ var ItemTitle2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
1347
1578
|
);
|
|
1348
1579
|
});
|
|
1349
1580
|
ItemTitle2.displayName = "ItemTitle";
|
|
1350
|
-
var ItemDescription2 =
|
|
1351
|
-
return /* @__PURE__ */
|
|
1581
|
+
var ItemDescription2 = React12.forwardRef(({ className, ...props }, ref) => {
|
|
1582
|
+
return /* @__PURE__ */ jsx20(
|
|
1352
1583
|
ItemDescription,
|
|
1353
1584
|
{
|
|
1354
1585
|
ref,
|
|
@@ -1358,8 +1589,8 @@ var ItemDescription2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
1358
1589
|
);
|
|
1359
1590
|
});
|
|
1360
1591
|
ItemDescription2.displayName = "ItemDescription";
|
|
1361
|
-
var ItemSeparator2 =
|
|
1362
|
-
return /* @__PURE__ */
|
|
1592
|
+
var ItemSeparator2 = React12.forwardRef(({ className, ...props }, ref) => {
|
|
1593
|
+
return /* @__PURE__ */ jsx20(
|
|
1363
1594
|
ItemSeparator,
|
|
1364
1595
|
{
|
|
1365
1596
|
ref,
|
|
@@ -1371,38 +1602,36 @@ var ItemSeparator2 = React18.forwardRef(({ className, ...props }, ref) => {
|
|
|
1371
1602
|
ItemSeparator2.displayName = "ItemSeparator";
|
|
1372
1603
|
|
|
1373
1604
|
// src/components/input/Input.tsx
|
|
1374
|
-
import * as
|
|
1605
|
+
import * as React13 from "react";
|
|
1375
1606
|
|
|
1376
1607
|
// src/primitives/input.tsx
|
|
1377
|
-
import
|
|
1378
|
-
import {
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
);
|
|
1395
|
-
Input.displayName = "Input";
|
|
1608
|
+
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
1609
|
+
import { cn as cn9 } from "cn";
|
|
1610
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1611
|
+
function Input({ className, type, ...props }) {
|
|
1612
|
+
return /* @__PURE__ */ jsx21(
|
|
1613
|
+
InputPrimitive,
|
|
1614
|
+
{
|
|
1615
|
+
type,
|
|
1616
|
+
"data-slot": "input",
|
|
1617
|
+
className: cn9(
|
|
1618
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
1619
|
+
className
|
|
1620
|
+
),
|
|
1621
|
+
...props
|
|
1622
|
+
}
|
|
1623
|
+
);
|
|
1624
|
+
}
|
|
1396
1625
|
|
|
1397
1626
|
// src/components/input/Input.tsx
|
|
1398
|
-
import { jsx as
|
|
1399
|
-
var Input2 =
|
|
1627
|
+
import { jsx as jsx22, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1628
|
+
var Input2 = React13.forwardRef(
|
|
1400
1629
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
1401
|
-
const generatedId =
|
|
1630
|
+
const generatedId = React13.useId();
|
|
1402
1631
|
const inputId = id || generatedId;
|
|
1403
1632
|
const errorId = `${inputId}-error`;
|
|
1404
1633
|
const descriptionId = `${inputId}-description`;
|
|
1405
|
-
const inputElement = /* @__PURE__ */
|
|
1634
|
+
const inputElement = /* @__PURE__ */ jsx22(
|
|
1406
1635
|
Input,
|
|
1407
1636
|
{
|
|
1408
1637
|
ref,
|
|
@@ -1422,8 +1651,8 @@ var Input2 = React20.forwardRef(
|
|
|
1422
1651
|
}
|
|
1423
1652
|
);
|
|
1424
1653
|
if (!icon && !actionButton) {
|
|
1425
|
-
return /* @__PURE__ */
|
|
1426
|
-
label && /* @__PURE__ */
|
|
1654
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-2", children: [
|
|
1655
|
+
label && /* @__PURE__ */ jsx22(
|
|
1427
1656
|
"label",
|
|
1428
1657
|
{
|
|
1429
1658
|
htmlFor: inputId,
|
|
@@ -1436,9 +1665,9 @@ var Input2 = React20.forwardRef(
|
|
|
1436
1665
|
}
|
|
1437
1666
|
),
|
|
1438
1667
|
inputElement,
|
|
1439
|
-
(description || error) && /* @__PURE__ */
|
|
1440
|
-
description && /* @__PURE__ */
|
|
1441
|
-
error && /* @__PURE__ */
|
|
1668
|
+
(description || error) && /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-1", children: [
|
|
1669
|
+
description && /* @__PURE__ */ jsx22(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1670
|
+
error && /* @__PURE__ */ jsx22(
|
|
1442
1671
|
Typography,
|
|
1443
1672
|
{
|
|
1444
1673
|
variant: "xs",
|
|
@@ -1450,8 +1679,8 @@ var Input2 = React20.forwardRef(
|
|
|
1450
1679
|
] })
|
|
1451
1680
|
] });
|
|
1452
1681
|
}
|
|
1453
|
-
return /* @__PURE__ */
|
|
1454
|
-
label && /* @__PURE__ */
|
|
1682
|
+
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-2", children: [
|
|
1683
|
+
label && /* @__PURE__ */ jsx22(
|
|
1455
1684
|
"label",
|
|
1456
1685
|
{
|
|
1457
1686
|
htmlFor: inputId,
|
|
@@ -1463,14 +1692,14 @@ var Input2 = React20.forwardRef(
|
|
|
1463
1692
|
children: label
|
|
1464
1693
|
}
|
|
1465
1694
|
),
|
|
1466
|
-
/* @__PURE__ */
|
|
1467
|
-
icon && /* @__PURE__ */
|
|
1695
|
+
/* @__PURE__ */ jsxs8("div", { className: "relative w-full", children: [
|
|
1696
|
+
icon && /* @__PURE__ */ jsx22("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
1468
1697
|
inputElement,
|
|
1469
|
-
actionButton && /* @__PURE__ */
|
|
1698
|
+
actionButton && /* @__PURE__ */ jsx22("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1470
1699
|
] }),
|
|
1471
|
-
(description || error) && /* @__PURE__ */
|
|
1472
|
-
description && /* @__PURE__ */
|
|
1473
|
-
error && /* @__PURE__ */
|
|
1700
|
+
(description || error) && /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-1", children: [
|
|
1701
|
+
description && /* @__PURE__ */ jsx22(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1702
|
+
error && /* @__PURE__ */ jsx22(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1474
1703
|
] })
|
|
1475
1704
|
] });
|
|
1476
1705
|
}
|
|
@@ -1478,43 +1707,44 @@ var Input2 = React20.forwardRef(
|
|
|
1478
1707
|
Input2.displayName = "Input";
|
|
1479
1708
|
|
|
1480
1709
|
// src/components/checkbox/Checkbox.tsx
|
|
1481
|
-
import * as
|
|
1710
|
+
import * as React14 from "react";
|
|
1482
1711
|
import { Checkbox as CheckboxPrimitive2 } from "@base-ui/react/checkbox";
|
|
1483
|
-
import { Check as
|
|
1484
|
-
import { cva as
|
|
1712
|
+
import { Check as Check2 } from "lucide-react";
|
|
1713
|
+
import { cva as cva10 } from "class-variance-authority";
|
|
1485
1714
|
|
|
1486
1715
|
// src/primitives/checkbox.tsx
|
|
1487
|
-
import * as React21 from "react";
|
|
1488
1716
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
1489
|
-
import {
|
|
1490
|
-
import {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
"
|
|
1497
|
-
className
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
)
|
|
1513
|
-
|
|
1717
|
+
import { cn as cn10 } from "cn";
|
|
1718
|
+
import { CheckIcon } from "lucide-react";
|
|
1719
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1720
|
+
function Checkbox({ className, ...props }) {
|
|
1721
|
+
return /* @__PURE__ */ jsx23(
|
|
1722
|
+
CheckboxPrimitive.Root,
|
|
1723
|
+
{
|
|
1724
|
+
"data-slot": "checkbox",
|
|
1725
|
+
className: cn10(
|
|
1726
|
+
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
|
|
1727
|
+
className
|
|
1728
|
+
),
|
|
1729
|
+
...props,
|
|
1730
|
+
children: /* @__PURE__ */ jsx23(
|
|
1731
|
+
CheckboxPrimitive.Indicator,
|
|
1732
|
+
{
|
|
1733
|
+
"data-slot": "checkbox-indicator",
|
|
1734
|
+
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
1735
|
+
children: /* @__PURE__ */ jsx23(
|
|
1736
|
+
CheckIcon,
|
|
1737
|
+
{}
|
|
1738
|
+
)
|
|
1739
|
+
}
|
|
1740
|
+
)
|
|
1741
|
+
}
|
|
1742
|
+
);
|
|
1743
|
+
}
|
|
1514
1744
|
|
|
1515
1745
|
// src/components/checkbox/Checkbox.tsx
|
|
1516
|
-
import { jsx as
|
|
1517
|
-
var checkboxVariants =
|
|
1746
|
+
import { jsx as jsx24, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1747
|
+
var checkboxVariants = cva10(
|
|
1518
1748
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1519
1749
|
{
|
|
1520
1750
|
variants: {
|
|
@@ -1535,7 +1765,7 @@ var checkboxVariants = cva9(
|
|
|
1535
1765
|
}
|
|
1536
1766
|
}
|
|
1537
1767
|
);
|
|
1538
|
-
var Checkbox2 =
|
|
1768
|
+
var Checkbox2 = React14.forwardRef(
|
|
1539
1769
|
({
|
|
1540
1770
|
"aria-label": ariaLabel,
|
|
1541
1771
|
className,
|
|
@@ -1548,11 +1778,11 @@ var Checkbox2 = React22.forwardRef(
|
|
|
1548
1778
|
disabled,
|
|
1549
1779
|
...props
|
|
1550
1780
|
}, ref) => {
|
|
1551
|
-
const generatedId =
|
|
1781
|
+
const generatedId = React14.useId();
|
|
1552
1782
|
const checkboxId = id || generatedId;
|
|
1553
1783
|
const errorId = `${checkboxId}-error`;
|
|
1554
|
-
return /* @__PURE__ */
|
|
1555
|
-
/* @__PURE__ */
|
|
1784
|
+
return /* @__PURE__ */ jsxs9("div", { className: "flex items-start gap-3", children: [
|
|
1785
|
+
/* @__PURE__ */ jsx24("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ jsx24(
|
|
1556
1786
|
Checkbox,
|
|
1557
1787
|
{
|
|
1558
1788
|
ref,
|
|
@@ -1569,8 +1799,8 @@ var Checkbox2 = React22.forwardRef(
|
|
|
1569
1799
|
className
|
|
1570
1800
|
),
|
|
1571
1801
|
...props,
|
|
1572
|
-
children: /* @__PURE__ */
|
|
1573
|
-
|
|
1802
|
+
children: /* @__PURE__ */ jsx24(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ jsx24(
|
|
1803
|
+
Check2,
|
|
1574
1804
|
{
|
|
1575
1805
|
className: "h-4 w-4 text-current stroke-current",
|
|
1576
1806
|
style: { color: "currentColor", stroke: "currentColor" }
|
|
@@ -1578,8 +1808,8 @@ var Checkbox2 = React22.forwardRef(
|
|
|
1578
1808
|
) })
|
|
1579
1809
|
}
|
|
1580
1810
|
) }),
|
|
1581
|
-
(label || description || error) && /* @__PURE__ */
|
|
1582
|
-
label && /* @__PURE__ */
|
|
1811
|
+
(label || description || error) && /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-1", children: [
|
|
1812
|
+
label && /* @__PURE__ */ jsx24(
|
|
1583
1813
|
"label",
|
|
1584
1814
|
{
|
|
1585
1815
|
htmlFor: checkboxId,
|
|
@@ -1591,8 +1821,8 @@ var Checkbox2 = React22.forwardRef(
|
|
|
1591
1821
|
children: label
|
|
1592
1822
|
}
|
|
1593
1823
|
),
|
|
1594
|
-
description && /* @__PURE__ */
|
|
1595
|
-
error && /* @__PURE__ */
|
|
1824
|
+
description && /* @__PURE__ */ jsx24(Typography, { variant: "xs", color: "muted", children: description }),
|
|
1825
|
+
error && /* @__PURE__ */ jsx24(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1596
1826
|
] })
|
|
1597
1827
|
] });
|
|
1598
1828
|
}
|
|
@@ -1600,11 +1830,11 @@ var Checkbox2 = React22.forwardRef(
|
|
|
1600
1830
|
Checkbox2.displayName = "Checkbox";
|
|
1601
1831
|
|
|
1602
1832
|
// src/components/switch/Switch.tsx
|
|
1603
|
-
import * as
|
|
1833
|
+
import * as React15 from "react";
|
|
1604
1834
|
import { Switch as SwitchPrimitives } from "@base-ui/react/switch";
|
|
1605
|
-
import { cva as
|
|
1606
|
-
import { jsx as
|
|
1607
|
-
var switchRootVariants =
|
|
1835
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
1836
|
+
import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1837
|
+
var switchRootVariants = cva11(
|
|
1608
1838
|
"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",
|
|
1609
1839
|
{
|
|
1610
1840
|
variants: {
|
|
@@ -1625,7 +1855,7 @@ var switchRootVariants = cva10(
|
|
|
1625
1855
|
}
|
|
1626
1856
|
}
|
|
1627
1857
|
);
|
|
1628
|
-
var switchThumbVariants =
|
|
1858
|
+
var switchThumbVariants = cva11(
|
|
1629
1859
|
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
1630
1860
|
{
|
|
1631
1861
|
variants: {
|
|
@@ -1640,7 +1870,7 @@ var switchThumbVariants = cva10(
|
|
|
1640
1870
|
}
|
|
1641
1871
|
}
|
|
1642
1872
|
);
|
|
1643
|
-
var Switch =
|
|
1873
|
+
var Switch = React15.forwardRef(
|
|
1644
1874
|
({
|
|
1645
1875
|
"aria-label": ariaLabel,
|
|
1646
1876
|
className,
|
|
@@ -1653,11 +1883,11 @@ var Switch = React23.forwardRef(
|
|
|
1653
1883
|
disabled,
|
|
1654
1884
|
...props
|
|
1655
1885
|
}, ref) => {
|
|
1656
|
-
const generatedId =
|
|
1886
|
+
const generatedId = React15.useId();
|
|
1657
1887
|
const switchId = id || generatedId;
|
|
1658
1888
|
const errorId = `${switchId}-error`;
|
|
1659
|
-
return /* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1889
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-3", children: [
|
|
1890
|
+
/* @__PURE__ */ jsx25(
|
|
1661
1891
|
SwitchPrimitives.Root,
|
|
1662
1892
|
{
|
|
1663
1893
|
ref,
|
|
@@ -1673,11 +1903,11 @@ var Switch = React23.forwardRef(
|
|
|
1673
1903
|
className
|
|
1674
1904
|
),
|
|
1675
1905
|
...props,
|
|
1676
|
-
children: /* @__PURE__ */
|
|
1906
|
+
children: /* @__PURE__ */ jsx25(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
1677
1907
|
}
|
|
1678
1908
|
),
|
|
1679
|
-
(label || description || error) && /* @__PURE__ */
|
|
1680
|
-
label && /* @__PURE__ */
|
|
1909
|
+
(label || description || error) && /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-1", children: [
|
|
1910
|
+
label && /* @__PURE__ */ jsx25(
|
|
1681
1911
|
"label",
|
|
1682
1912
|
{
|
|
1683
1913
|
htmlFor: switchId,
|
|
@@ -1688,8 +1918,8 @@ var Switch = React23.forwardRef(
|
|
|
1688
1918
|
children: label
|
|
1689
1919
|
}
|
|
1690
1920
|
),
|
|
1691
|
-
description && /* @__PURE__ */
|
|
1692
|
-
error && /* @__PURE__ */
|
|
1921
|
+
description && /* @__PURE__ */ jsx25(Typography, { variant: "xs", color: "muted", children: description }),
|
|
1922
|
+
error && /* @__PURE__ */ jsx25(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1693
1923
|
] })
|
|
1694
1924
|
] });
|
|
1695
1925
|
}
|
|
@@ -1697,135 +1927,160 @@ var Switch = React23.forwardRef(
|
|
|
1697
1927
|
Switch.displayName = "Switch";
|
|
1698
1928
|
|
|
1699
1929
|
// src/components/select/Select.tsx
|
|
1700
|
-
import * as
|
|
1701
|
-
import { cva as
|
|
1930
|
+
import * as React16 from "react";
|
|
1931
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
1702
1932
|
|
|
1703
1933
|
// src/primitives/select.tsx
|
|
1704
|
-
import * as React24 from "react";
|
|
1705
1934
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
1706
|
-
import {
|
|
1707
|
-
import {
|
|
1935
|
+
import { cn as cn11 } from "cn";
|
|
1936
|
+
import { ChevronDownIcon as ChevronDownIcon2, CheckIcon as CheckIcon2, ChevronUpIcon } from "lucide-react";
|
|
1937
|
+
import { jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1708
1938
|
var Select = SelectPrimitive.Root;
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
}, ref) => /* @__PURE__ */ jsx25(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx25(
|
|
1939
|
+
function SelectValue({ className, ...props }) {
|
|
1940
|
+
return /* @__PURE__ */ jsx26(
|
|
1941
|
+
SelectPrimitive.Value,
|
|
1942
|
+
{
|
|
1943
|
+
"data-slot": "select-value",
|
|
1944
|
+
className: cn11("flex flex-1 text-left", className),
|
|
1945
|
+
...props
|
|
1946
|
+
}
|
|
1947
|
+
);
|
|
1948
|
+
}
|
|
1949
|
+
function SelectTrigger({
|
|
1950
|
+
className,
|
|
1951
|
+
size = "default",
|
|
1952
|
+
children,
|
|
1953
|
+
...props
|
|
1954
|
+
}) {
|
|
1955
|
+
return /* @__PURE__ */ jsxs11(
|
|
1956
|
+
SelectPrimitive.Trigger,
|
|
1957
|
+
{
|
|
1958
|
+
"data-slot": "select-trigger",
|
|
1959
|
+
"data-size": size,
|
|
1960
|
+
className: cn11(
|
|
1961
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1962
|
+
className
|
|
1963
|
+
),
|
|
1964
|
+
...props,
|
|
1965
|
+
children: [
|
|
1966
|
+
children,
|
|
1967
|
+
/* @__PURE__ */ jsx26(
|
|
1968
|
+
SelectPrimitive.Icon,
|
|
1969
|
+
{
|
|
1970
|
+
render: /* @__PURE__ */ jsx26(ChevronDownIcon2, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
1971
|
+
}
|
|
1972
|
+
)
|
|
1973
|
+
]
|
|
1974
|
+
}
|
|
1975
|
+
);
|
|
1976
|
+
}
|
|
1977
|
+
function SelectContent({
|
|
1978
|
+
className,
|
|
1979
|
+
children,
|
|
1980
|
+
side = "bottom",
|
|
1981
|
+
sideOffset = 4,
|
|
1982
|
+
align = "center",
|
|
1983
|
+
alignOffset = 0,
|
|
1984
|
+
alignItemWithTrigger = true,
|
|
1985
|
+
...props
|
|
1986
|
+
}) {
|
|
1987
|
+
return /* @__PURE__ */ jsx26(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx26(
|
|
1759
1988
|
SelectPrimitive.Positioner,
|
|
1760
1989
|
{
|
|
1761
|
-
alignItemWithTrigger,
|
|
1762
1990
|
side,
|
|
1991
|
+
sideOffset,
|
|
1763
1992
|
align,
|
|
1764
1993
|
alignOffset,
|
|
1765
|
-
|
|
1994
|
+
alignItemWithTrigger,
|
|
1766
1995
|
className: "isolate z-50",
|
|
1767
|
-
children: /* @__PURE__ */
|
|
1996
|
+
children: /* @__PURE__ */ jsxs11(
|
|
1768
1997
|
SelectPrimitive.Popup,
|
|
1769
1998
|
{
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
className
|
|
1774
|
-
),
|
|
1999
|
+
"data-slot": "select-content",
|
|
2000
|
+
"data-align-trigger": alignItemWithTrigger,
|
|
2001
|
+
className: cn11("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
1775
2002
|
...props,
|
|
1776
2003
|
children: [
|
|
1777
|
-
/* @__PURE__ */
|
|
1778
|
-
/* @__PURE__ */
|
|
1779
|
-
/* @__PURE__ */
|
|
2004
|
+
/* @__PURE__ */ jsx26(SelectScrollUpButton, {}),
|
|
2005
|
+
/* @__PURE__ */ jsx26(SelectPrimitive.List, { children }),
|
|
2006
|
+
/* @__PURE__ */ jsx26(SelectScrollDownButton, {})
|
|
1780
2007
|
]
|
|
1781
2008
|
}
|
|
1782
2009
|
)
|
|
1783
2010
|
}
|
|
1784
|
-
) })
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
)
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
2011
|
+
) });
|
|
2012
|
+
}
|
|
2013
|
+
function SelectItem({
|
|
2014
|
+
className,
|
|
2015
|
+
children,
|
|
2016
|
+
...props
|
|
2017
|
+
}) {
|
|
2018
|
+
return /* @__PURE__ */ jsxs11(
|
|
2019
|
+
SelectPrimitive.Item,
|
|
2020
|
+
{
|
|
2021
|
+
"data-slot": "select-item",
|
|
2022
|
+
className: cn11(
|
|
2023
|
+
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
2024
|
+
className
|
|
2025
|
+
),
|
|
2026
|
+
...props,
|
|
2027
|
+
children: [
|
|
2028
|
+
/* @__PURE__ */ jsx26(SelectPrimitive.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
2029
|
+
/* @__PURE__ */ jsx26(
|
|
2030
|
+
SelectPrimitive.ItemIndicator,
|
|
2031
|
+
{
|
|
2032
|
+
render: /* @__PURE__ */ jsx26("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
2033
|
+
children: /* @__PURE__ */ jsx26(CheckIcon2, { className: "pointer-events-none" })
|
|
2034
|
+
}
|
|
2035
|
+
)
|
|
2036
|
+
]
|
|
2037
|
+
}
|
|
2038
|
+
);
|
|
2039
|
+
}
|
|
2040
|
+
function SelectScrollUpButton({
|
|
2041
|
+
className,
|
|
2042
|
+
...props
|
|
2043
|
+
}) {
|
|
2044
|
+
return /* @__PURE__ */ jsx26(
|
|
2045
|
+
SelectPrimitive.ScrollUpArrow,
|
|
2046
|
+
{
|
|
2047
|
+
"data-slot": "select-scroll-up-button",
|
|
2048
|
+
className: cn11(
|
|
2049
|
+
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
2050
|
+
className
|
|
2051
|
+
),
|
|
2052
|
+
...props,
|
|
2053
|
+
children: /* @__PURE__ */ jsx26(
|
|
2054
|
+
ChevronUpIcon,
|
|
2055
|
+
{}
|
|
2056
|
+
)
|
|
2057
|
+
}
|
|
2058
|
+
);
|
|
2059
|
+
}
|
|
2060
|
+
function SelectScrollDownButton({
|
|
2061
|
+
className,
|
|
2062
|
+
...props
|
|
2063
|
+
}) {
|
|
2064
|
+
return /* @__PURE__ */ jsx26(
|
|
2065
|
+
SelectPrimitive.ScrollDownArrow,
|
|
2066
|
+
{
|
|
2067
|
+
"data-slot": "select-scroll-down-button",
|
|
2068
|
+
className: cn11(
|
|
2069
|
+
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
2070
|
+
className
|
|
2071
|
+
),
|
|
2072
|
+
...props,
|
|
2073
|
+
children: /* @__PURE__ */ jsx26(
|
|
2074
|
+
ChevronDownIcon2,
|
|
2075
|
+
{}
|
|
2076
|
+
)
|
|
2077
|
+
}
|
|
2078
|
+
);
|
|
2079
|
+
}
|
|
1825
2080
|
|
|
1826
2081
|
// src/components/select/Select.tsx
|
|
1827
|
-
import { jsx as
|
|
1828
|
-
var selectVariants =
|
|
2082
|
+
import { jsx as jsx27, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2083
|
+
var selectVariants = cva12(
|
|
1829
2084
|
"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",
|
|
1830
2085
|
{
|
|
1831
2086
|
variants: {
|
|
@@ -1847,7 +2102,7 @@ var selectVariants = cva11(
|
|
|
1847
2102
|
}
|
|
1848
2103
|
}
|
|
1849
2104
|
);
|
|
1850
|
-
var Select2 =
|
|
2105
|
+
var Select2 = React16.forwardRef(
|
|
1851
2106
|
({
|
|
1852
2107
|
className,
|
|
1853
2108
|
variant,
|
|
@@ -1865,12 +2120,12 @@ var Select2 = React25.forwardRef(
|
|
|
1865
2120
|
name,
|
|
1866
2121
|
required
|
|
1867
2122
|
}, ref) => {
|
|
1868
|
-
const generatedId =
|
|
2123
|
+
const generatedId = React16.useId();
|
|
1869
2124
|
const selectId = id || generatedId;
|
|
1870
2125
|
const errorId = `${selectId}-error`;
|
|
1871
2126
|
const descriptionId = `${selectId}-description`;
|
|
1872
|
-
return /* @__PURE__ */
|
|
1873
|
-
label && /* @__PURE__ */
|
|
2127
|
+
return /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-2", children: [
|
|
2128
|
+
label && /* @__PURE__ */ jsx27(
|
|
1874
2129
|
"label",
|
|
1875
2130
|
{
|
|
1876
2131
|
htmlFor: selectId,
|
|
@@ -1882,7 +2137,7 @@ var Select2 = React25.forwardRef(
|
|
|
1882
2137
|
children: label
|
|
1883
2138
|
}
|
|
1884
2139
|
),
|
|
1885
|
-
/* @__PURE__ */
|
|
2140
|
+
/* @__PURE__ */ jsxs12(
|
|
1886
2141
|
Select,
|
|
1887
2142
|
{
|
|
1888
2143
|
value,
|
|
@@ -1893,7 +2148,7 @@ var Select2 = React25.forwardRef(
|
|
|
1893
2148
|
required,
|
|
1894
2149
|
items: options,
|
|
1895
2150
|
children: [
|
|
1896
|
-
/* @__PURE__ */
|
|
2151
|
+
/* @__PURE__ */ jsx27(
|
|
1897
2152
|
SelectTrigger,
|
|
1898
2153
|
{
|
|
1899
2154
|
ref,
|
|
@@ -1905,33 +2160,33 @@ var Select2 = React25.forwardRef(
|
|
|
1905
2160
|
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1906
2161
|
className
|
|
1907
2162
|
),
|
|
1908
|
-
children: /* @__PURE__ */
|
|
2163
|
+
children: /* @__PURE__ */ jsx27(SelectValue, { placeholder })
|
|
1909
2164
|
}
|
|
1910
2165
|
),
|
|
1911
|
-
/* @__PURE__ */
|
|
2166
|
+
/* @__PURE__ */ jsx27(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx27(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1912
2167
|
]
|
|
1913
2168
|
}
|
|
1914
2169
|
),
|
|
1915
|
-
description && /* @__PURE__ */
|
|
1916
|
-
error && /* @__PURE__ */
|
|
2170
|
+
description && /* @__PURE__ */ jsx27(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
2171
|
+
error && /* @__PURE__ */ jsx27(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1917
2172
|
] });
|
|
1918
2173
|
}
|
|
1919
2174
|
);
|
|
1920
2175
|
Select2.displayName = "Select";
|
|
1921
2176
|
|
|
1922
2177
|
// src/components/country-select/CountrySelect.tsx
|
|
1923
|
-
import * as
|
|
1924
|
-
import { ChevronDown as
|
|
2178
|
+
import * as React18 from "react";
|
|
2179
|
+
import { ChevronDown as ChevronDown2, Globe } from "lucide-react";
|
|
1925
2180
|
|
|
1926
2181
|
// src/components/icon/Icon.tsx
|
|
1927
|
-
import * as
|
|
1928
|
-
import { jsx as
|
|
2182
|
+
import * as React17 from "react";
|
|
2183
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1929
2184
|
var iconStrokeMap = {
|
|
1930
2185
|
16: 1.4,
|
|
1931
2186
|
24: 1.6,
|
|
1932
2187
|
32: 1.8
|
|
1933
2188
|
};
|
|
1934
|
-
var Icon =
|
|
2189
|
+
var Icon = React17.forwardRef(
|
|
1935
2190
|
({
|
|
1936
2191
|
icon: IconComponent,
|
|
1937
2192
|
size,
|
|
@@ -1943,7 +2198,7 @@ var Icon = React26.forwardRef(
|
|
|
1943
2198
|
const strokeWidth = iconStrokeMap[size];
|
|
1944
2199
|
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
1945
2200
|
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
1946
|
-
return /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ jsx28(
|
|
1947
2202
|
IconComponent,
|
|
1948
2203
|
{
|
|
1949
2204
|
ref,
|
|
@@ -1958,193 +2213,252 @@ var Icon = React26.forwardRef(
|
|
|
1958
2213
|
Icon.displayName = "Icon";
|
|
1959
2214
|
|
|
1960
2215
|
// src/primitives/popover.tsx
|
|
1961
|
-
import * as React27 from "react";
|
|
1962
2216
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
1963
|
-
import {
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
PopoverTrigger
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2217
|
+
import { cn as cn12 } from "cn";
|
|
2218
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2219
|
+
function Popover({ ...props }) {
|
|
2220
|
+
return /* @__PURE__ */ jsx29(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
2221
|
+
}
|
|
2222
|
+
function PopoverTrigger({ ...props }) {
|
|
2223
|
+
return /* @__PURE__ */ jsx29(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
2224
|
+
}
|
|
2225
|
+
function PopoverContent({
|
|
2226
|
+
className,
|
|
2227
|
+
align = "center",
|
|
2228
|
+
alignOffset = 0,
|
|
2229
|
+
side = "bottom",
|
|
2230
|
+
sideOffset = 4,
|
|
2231
|
+
...props
|
|
2232
|
+
}) {
|
|
2233
|
+
return /* @__PURE__ */ jsx29(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx29(
|
|
2234
|
+
PopoverPrimitive.Positioner,
|
|
2235
|
+
{
|
|
2236
|
+
align,
|
|
2237
|
+
alignOffset,
|
|
2238
|
+
side,
|
|
2239
|
+
sideOffset,
|
|
2240
|
+
className: "isolate z-50",
|
|
2241
|
+
children: /* @__PURE__ */ jsx29(
|
|
2242
|
+
PopoverPrimitive.Popup,
|
|
2243
|
+
{
|
|
2244
|
+
"data-slot": "popover-content",
|
|
2245
|
+
className: cn12(
|
|
2246
|
+
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
2247
|
+
className
|
|
2248
|
+
),
|
|
2249
|
+
...props
|
|
2250
|
+
}
|
|
2251
|
+
)
|
|
2252
|
+
}
|
|
2253
|
+
) });
|
|
2254
|
+
}
|
|
1981
2255
|
|
|
1982
2256
|
// src/primitives/command.tsx
|
|
1983
|
-
import * as React29 from "react";
|
|
1984
2257
|
import { Command as CommandPrimitive } from "cmdk";
|
|
1985
|
-
import {
|
|
2258
|
+
import { cn as cn16 } from "cn";
|
|
1986
2259
|
|
|
1987
2260
|
// src/primitives/dialog.tsx
|
|
1988
|
-
import * as React28 from "react";
|
|
1989
2261
|
import { Dialog as DialogPrimitive2 } from "@base-ui/react/dialog";
|
|
1990
|
-
import {
|
|
1991
|
-
import {
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
{
|
|
2005
|
-
ref,
|
|
2006
|
-
className: cn(
|
|
2007
|
-
"fixed inset-0 z-50 bg-black/80 transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
2008
|
-
className
|
|
2009
|
-
),
|
|
2010
|
-
...props
|
|
2011
|
-
}
|
|
2012
|
-
));
|
|
2013
|
-
DialogOverlay2.displayName = "DialogOverlay";
|
|
2014
|
-
var DialogContent2 = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs12(DialogPortal2, { children: [
|
|
2015
|
-
/* @__PURE__ */ jsx29(DialogOverlay2, {}),
|
|
2016
|
-
/* @__PURE__ */ jsxs12(
|
|
2017
|
-
DialogPrimitive2.Popup,
|
|
2262
|
+
import { cn as cn13 } from "cn";
|
|
2263
|
+
import { XIcon } from "lucide-react";
|
|
2264
|
+
import { jsx as jsx30, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2265
|
+
|
|
2266
|
+
// src/primitives/input-group.tsx
|
|
2267
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
2268
|
+
import { cn as cn15 } from "cn";
|
|
2269
|
+
|
|
2270
|
+
// src/primitives/textarea.tsx
|
|
2271
|
+
import { cn as cn14 } from "cn";
|
|
2272
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2273
|
+
function Textarea({ className, ...props }) {
|
|
2274
|
+
return /* @__PURE__ */ jsx31(
|
|
2275
|
+
"textarea",
|
|
2018
2276
|
{
|
|
2019
|
-
|
|
2020
|
-
className:
|
|
2021
|
-
"
|
|
2277
|
+
"data-slot": "textarea",
|
|
2278
|
+
className: cn14(
|
|
2279
|
+
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
2022
2280
|
className
|
|
2023
2281
|
),
|
|
2024
|
-
...props
|
|
2025
|
-
children: [
|
|
2026
|
-
children,
|
|
2027
|
-
/* @__PURE__ */ jsxs12(DialogPrimitive2.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-open:bg-accent data-open:text-muted-foreground", children: [
|
|
2028
|
-
/* @__PURE__ */ jsx29(X2, { className: "h-4 w-4" }),
|
|
2029
|
-
/* @__PURE__ */ jsx29("span", { className: "sr-only", children: "Close" })
|
|
2030
|
-
] })
|
|
2031
|
-
]
|
|
2282
|
+
...props
|
|
2032
2283
|
}
|
|
2033
|
-
)
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2284
|
+
);
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
// src/primitives/input-group.tsx
|
|
2288
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2289
|
+
function InputGroup({ className, ...props }) {
|
|
2290
|
+
return /* @__PURE__ */ jsx32(
|
|
2291
|
+
"div",
|
|
2292
|
+
{
|
|
2293
|
+
"data-slot": "input-group",
|
|
2294
|
+
role: "group",
|
|
2295
|
+
className: cn15(
|
|
2296
|
+
"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
2297
|
+
className
|
|
2298
|
+
),
|
|
2299
|
+
...props
|
|
2300
|
+
}
|
|
2301
|
+
);
|
|
2302
|
+
}
|
|
2303
|
+
var inputGroupAddonVariants = cva13(
|
|
2304
|
+
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
2040
2305
|
{
|
|
2041
|
-
|
|
2042
|
-
|
|
2306
|
+
variants: {
|
|
2307
|
+
align: {
|
|
2308
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
2309
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
2310
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
2311
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
2312
|
+
}
|
|
2313
|
+
},
|
|
2314
|
+
defaultVariants: {
|
|
2315
|
+
align: "inline-start"
|
|
2316
|
+
}
|
|
2043
2317
|
}
|
|
2044
2318
|
);
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2319
|
+
function InputGroupAddon({
|
|
2320
|
+
className,
|
|
2321
|
+
align = "inline-start",
|
|
2322
|
+
...props
|
|
2323
|
+
}) {
|
|
2324
|
+
return /* @__PURE__ */ jsx32(
|
|
2325
|
+
"div",
|
|
2326
|
+
{
|
|
2327
|
+
role: "group",
|
|
2328
|
+
"data-slot": "input-group-addon",
|
|
2329
|
+
"data-align": align,
|
|
2330
|
+
className: cn15(inputGroupAddonVariants({ align }), className),
|
|
2331
|
+
onClick: (e) => {
|
|
2332
|
+
if (e.target.closest("button")) {
|
|
2333
|
+
return;
|
|
2334
|
+
}
|
|
2335
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
2336
|
+
},
|
|
2337
|
+
...props
|
|
2338
|
+
}
|
|
2339
|
+
);
|
|
2340
|
+
}
|
|
2341
|
+
var inputGroupButtonVariants = cva13(
|
|
2342
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
2057
2343
|
{
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2344
|
+
variants: {
|
|
2345
|
+
size: {
|
|
2346
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
2347
|
+
sm: "",
|
|
2348
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
2349
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
2350
|
+
}
|
|
2351
|
+
},
|
|
2352
|
+
defaultVariants: {
|
|
2353
|
+
size: "xs"
|
|
2354
|
+
}
|
|
2061
2355
|
}
|
|
2062
|
-
)
|
|
2063
|
-
DialogDescription2.displayName = "DialogDescription";
|
|
2356
|
+
);
|
|
2064
2357
|
|
|
2065
2358
|
// src/primitives/command.tsx
|
|
2066
|
-
import {
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
),
|
|
2075
|
-
...props
|
|
2076
|
-
}
|
|
2077
|
-
));
|
|
2078
|
-
Command.displayName = CommandPrimitive.displayName;
|
|
2079
|
-
var CommandInput = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs13("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
2080
|
-
/* @__PURE__ */ jsx30(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2081
|
-
/* @__PURE__ */ jsx30(
|
|
2082
|
-
CommandPrimitive.Input,
|
|
2359
|
+
import { SearchIcon, CheckIcon as CheckIcon3 } from "lucide-react";
|
|
2360
|
+
import { jsx as jsx33, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2361
|
+
function Command({
|
|
2362
|
+
className,
|
|
2363
|
+
...props
|
|
2364
|
+
}) {
|
|
2365
|
+
return /* @__PURE__ */ jsx33(
|
|
2366
|
+
CommandPrimitive,
|
|
2083
2367
|
{
|
|
2084
|
-
|
|
2085
|
-
className:
|
|
2086
|
-
"flex
|
|
2368
|
+
"data-slot": "command",
|
|
2369
|
+
className: cn16(
|
|
2370
|
+
"flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",
|
|
2087
2371
|
className
|
|
2088
2372
|
),
|
|
2089
2373
|
...props
|
|
2090
2374
|
}
|
|
2091
|
-
)
|
|
2092
|
-
|
|
2093
|
-
CommandInput
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
ref,
|
|
2109
|
-
className: cn(
|
|
2110
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
2111
|
-
className
|
|
2112
|
-
),
|
|
2113
|
-
...props
|
|
2114
|
-
}
|
|
2115
|
-
));
|
|
2116
|
-
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
2117
|
-
var CommandSeparator = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
2118
|
-
CommandPrimitive.Separator,
|
|
2119
|
-
{
|
|
2120
|
-
ref,
|
|
2121
|
-
className: cn("-mx-1 h-px bg-border", className),
|
|
2122
|
-
...props
|
|
2123
|
-
}
|
|
2124
|
-
));
|
|
2125
|
-
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
2126
|
-
var CommandItem = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
2127
|
-
CommandPrimitive.Item,
|
|
2128
|
-
{
|
|
2129
|
-
ref,
|
|
2130
|
-
className: cn(
|
|
2131
|
-
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
2132
|
-
className
|
|
2375
|
+
);
|
|
2376
|
+
}
|
|
2377
|
+
function CommandInput({
|
|
2378
|
+
className,
|
|
2379
|
+
...props
|
|
2380
|
+
}) {
|
|
2381
|
+
return /* @__PURE__ */ jsx33("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs14(InputGroup, { className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [
|
|
2382
|
+
/* @__PURE__ */ jsx33(
|
|
2383
|
+
CommandPrimitive.Input,
|
|
2384
|
+
{
|
|
2385
|
+
"data-slot": "command-input",
|
|
2386
|
+
className: cn16(
|
|
2387
|
+
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
2388
|
+
className
|
|
2389
|
+
),
|
|
2390
|
+
...props
|
|
2391
|
+
}
|
|
2133
2392
|
),
|
|
2134
|
-
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2393
|
+
/* @__PURE__ */ jsx33(InputGroupAddon, { children: /* @__PURE__ */ jsx33(SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })
|
|
2394
|
+
] }) });
|
|
2395
|
+
}
|
|
2396
|
+
function CommandList({
|
|
2397
|
+
className,
|
|
2398
|
+
...props
|
|
2399
|
+
}) {
|
|
2400
|
+
return /* @__PURE__ */ jsx33(
|
|
2401
|
+
CommandPrimitive.List,
|
|
2141
2402
|
{
|
|
2142
|
-
|
|
2403
|
+
"data-slot": "command-list",
|
|
2404
|
+
className: cn16(
|
|
2405
|
+
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
2406
|
+
className
|
|
2407
|
+
),
|
|
2143
2408
|
...props
|
|
2144
2409
|
}
|
|
2145
2410
|
);
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2411
|
+
}
|
|
2412
|
+
function CommandEmpty({
|
|
2413
|
+
className,
|
|
2414
|
+
...props
|
|
2415
|
+
}) {
|
|
2416
|
+
return /* @__PURE__ */ jsx33(
|
|
2417
|
+
CommandPrimitive.Empty,
|
|
2418
|
+
{
|
|
2419
|
+
"data-slot": "command-empty",
|
|
2420
|
+
className: cn16("py-6 text-center text-sm", className),
|
|
2421
|
+
...props
|
|
2422
|
+
}
|
|
2423
|
+
);
|
|
2424
|
+
}
|
|
2425
|
+
function CommandGroup({
|
|
2426
|
+
className,
|
|
2427
|
+
...props
|
|
2428
|
+
}) {
|
|
2429
|
+
return /* @__PURE__ */ jsx33(
|
|
2430
|
+
CommandPrimitive.Group,
|
|
2431
|
+
{
|
|
2432
|
+
"data-slot": "command-group",
|
|
2433
|
+
className: cn16(
|
|
2434
|
+
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
2435
|
+
className
|
|
2436
|
+
),
|
|
2437
|
+
...props
|
|
2438
|
+
}
|
|
2439
|
+
);
|
|
2440
|
+
}
|
|
2441
|
+
function CommandItem({
|
|
2442
|
+
className,
|
|
2443
|
+
children,
|
|
2444
|
+
...props
|
|
2445
|
+
}) {
|
|
2446
|
+
return /* @__PURE__ */ jsxs14(
|
|
2447
|
+
CommandPrimitive.Item,
|
|
2448
|
+
{
|
|
2449
|
+
"data-slot": "command-item",
|
|
2450
|
+
className: cn16(
|
|
2451
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
2452
|
+
className
|
|
2453
|
+
),
|
|
2454
|
+
...props,
|
|
2455
|
+
children: [
|
|
2456
|
+
children,
|
|
2457
|
+
/* @__PURE__ */ jsx33(CheckIcon3, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
2458
|
+
]
|
|
2459
|
+
}
|
|
2460
|
+
);
|
|
2461
|
+
}
|
|
2148
2462
|
|
|
2149
2463
|
// src/components/country-select/countries.ts
|
|
2150
2464
|
var COUNTRIES = [
|
|
@@ -2288,8 +2602,8 @@ var isEUCountry = (countryCode) => {
|
|
|
2288
2602
|
};
|
|
2289
2603
|
|
|
2290
2604
|
// src/components/country-select/CountrySelect.tsx
|
|
2291
|
-
import { Fragment as
|
|
2292
|
-
var CountrySelect =
|
|
2605
|
+
import { Fragment as Fragment2, jsx as jsx34, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2606
|
+
var CountrySelect = React18.forwardRef(
|
|
2293
2607
|
({
|
|
2294
2608
|
value,
|
|
2295
2609
|
onValueChange,
|
|
@@ -2299,40 +2613,45 @@ var CountrySelect = React30.forwardRef(
|
|
|
2299
2613
|
align = "center",
|
|
2300
2614
|
sideOffset = 4
|
|
2301
2615
|
}, ref) => {
|
|
2302
|
-
const [open, setOpen] =
|
|
2303
|
-
const selectedCountry =
|
|
2304
|
-
return /* @__PURE__ */
|
|
2305
|
-
/* @__PURE__ */
|
|
2306
|
-
|
|
2616
|
+
const [open, setOpen] = React18.useState(false);
|
|
2617
|
+
const selectedCountry = React18.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);
|
|
2618
|
+
return /* @__PURE__ */ jsxs15(Popover, { open, onOpenChange: setOpen, children: [
|
|
2619
|
+
/* @__PURE__ */ jsxs15(
|
|
2620
|
+
PopoverTrigger,
|
|
2307
2621
|
{
|
|
2308
2622
|
ref,
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2623
|
+
render: /* @__PURE__ */ jsx34(
|
|
2624
|
+
"button",
|
|
2625
|
+
{
|
|
2626
|
+
type: "button",
|
|
2627
|
+
disabled,
|
|
2628
|
+
"aria-expanded": open,
|
|
2629
|
+
className: cn(
|
|
2630
|
+
// Base layout — consistent with Select trigger
|
|
2631
|
+
"flex w-full items-center justify-between",
|
|
2632
|
+
"rounded-berget-xs border bg-card",
|
|
2633
|
+
"px-4 py-3 text-sm",
|
|
2634
|
+
"transition-colors duration-200",
|
|
2635
|
+
"focus-visible:outline-none focus-visible:ring-0",
|
|
2636
|
+
"focus-visible:ring-offset-0 focus-visible:border-berget-form-focus-border",
|
|
2637
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
2638
|
+
// Default border & hover matching Select variant "default"
|
|
2639
|
+
"border-berget-border-interactive hover:bg-berget-surface-hover",
|
|
2640
|
+
className
|
|
2641
|
+
)
|
|
2642
|
+
}
|
|
2324
2643
|
),
|
|
2325
2644
|
children: [
|
|
2326
|
-
/* @__PURE__ */
|
|
2327
|
-
/* @__PURE__ */
|
|
2328
|
-
/* @__PURE__ */
|
|
2329
|
-
/* @__PURE__ */
|
|
2645
|
+
/* @__PURE__ */ jsx34("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: selectedCountry ? /* @__PURE__ */ jsxs15(Fragment2, { children: [
|
|
2646
|
+
/* @__PURE__ */ jsx34("span", { className: "text-xl flex-shrink-0", children: selectedCountry.flag }),
|
|
2647
|
+
/* @__PURE__ */ jsx34("span", { className: "truncate", children: selectedCountry.name }),
|
|
2648
|
+
/* @__PURE__ */ jsxs15("span", { className: "text-berget-muted-foreground text-xs flex-shrink-0", children: [
|
|
2330
2649
|
"(",
|
|
2331
2650
|
selectedCountry.code,
|
|
2332
2651
|
")"
|
|
2333
2652
|
] })
|
|
2334
|
-
] }) : /* @__PURE__ */
|
|
2335
|
-
/* @__PURE__ */
|
|
2653
|
+
] }) : /* @__PURE__ */ jsxs15(Fragment2, { children: [
|
|
2654
|
+
/* @__PURE__ */ jsx34(
|
|
2336
2655
|
Icon,
|
|
2337
2656
|
{
|
|
2338
2657
|
icon: Globe,
|
|
@@ -2340,12 +2659,12 @@ var CountrySelect = React30.forwardRef(
|
|
|
2340
2659
|
className: "flex-shrink-0 text-berget-muted-foreground"
|
|
2341
2660
|
}
|
|
2342
2661
|
),
|
|
2343
|
-
/* @__PURE__ */
|
|
2662
|
+
/* @__PURE__ */ jsx34("span", { className: "text-berget-muted-foreground truncate", children: placeholder })
|
|
2344
2663
|
] }) }),
|
|
2345
|
-
/* @__PURE__ */
|
|
2664
|
+
/* @__PURE__ */ jsx34(
|
|
2346
2665
|
Icon,
|
|
2347
2666
|
{
|
|
2348
|
-
icon:
|
|
2667
|
+
icon: ChevronDown2,
|
|
2349
2668
|
size: 16,
|
|
2350
2669
|
className: cn(
|
|
2351
2670
|
"flex-shrink-0 text-berget-muted-foreground",
|
|
@@ -2356,18 +2675,18 @@ var CountrySelect = React30.forwardRef(
|
|
|
2356
2675
|
)
|
|
2357
2676
|
]
|
|
2358
2677
|
}
|
|
2359
|
-
)
|
|
2360
|
-
/* @__PURE__ */
|
|
2678
|
+
),
|
|
2679
|
+
/* @__PURE__ */ jsx34(
|
|
2361
2680
|
PopoverContent,
|
|
2362
2681
|
{
|
|
2363
2682
|
align,
|
|
2364
2683
|
sideOffset,
|
|
2365
2684
|
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
2366
|
-
children: /* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
2368
|
-
/* @__PURE__ */
|
|
2369
|
-
/* @__PURE__ */
|
|
2370
|
-
/* @__PURE__ */
|
|
2685
|
+
children: /* @__PURE__ */ jsxs15(Command, { children: [
|
|
2686
|
+
/* @__PURE__ */ jsx34(CommandInput, { placeholder: "Search country..." }),
|
|
2687
|
+
/* @__PURE__ */ jsxs15(CommandList, { children: [
|
|
2688
|
+
/* @__PURE__ */ jsx34(CommandEmpty, { children: "No countries found." }),
|
|
2689
|
+
/* @__PURE__ */ jsx34(CommandGroup, { children: COUNTRIES.map((country) => /* @__PURE__ */ jsxs15(
|
|
2371
2690
|
CommandItem,
|
|
2372
2691
|
{
|
|
2373
2692
|
value: `${country.name} ${country.code}`,
|
|
@@ -2381,12 +2700,12 @@ var CountrySelect = React30.forwardRef(
|
|
|
2381
2700
|
value === country.code && "bg-berget-brand-granite-800/40"
|
|
2382
2701
|
),
|
|
2383
2702
|
children: [
|
|
2384
|
-
/* @__PURE__ */
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
/* @__PURE__ */
|
|
2387
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ jsx34("span", { className: "text-xl flex-shrink-0", children: country.flag }),
|
|
2704
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex-1 min-w-0", children: [
|
|
2705
|
+
/* @__PURE__ */ jsx34("div", { className: "text-sm truncate", children: country.name }),
|
|
2706
|
+
/* @__PURE__ */ jsx34("div", { className: "text-xs text-berget-muted-foreground", children: country.code })
|
|
2388
2707
|
] }),
|
|
2389
|
-
value === country.code && /* @__PURE__ */
|
|
2708
|
+
value === country.code && /* @__PURE__ */ jsx34("div", { className: "w-2 h-2 rounded-full bg-berget-brand-granite-400 flex-shrink-0" })
|
|
2390
2709
|
]
|
|
2391
2710
|
},
|
|
2392
2711
|
country.code
|
|
@@ -2401,32 +2720,10 @@ var CountrySelect = React30.forwardRef(
|
|
|
2401
2720
|
CountrySelect.displayName = "CountrySelect";
|
|
2402
2721
|
|
|
2403
2722
|
// src/components/text-area/TextArea.tsx
|
|
2404
|
-
import * as
|
|
2405
|
-
import { cva as
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
import * as React31 from "react";
|
|
2409
|
-
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2410
|
-
var Textarea = React31.forwardRef(
|
|
2411
|
-
({ className, ...props }, ref) => {
|
|
2412
|
-
return /* @__PURE__ */ jsx32(
|
|
2413
|
-
"textarea",
|
|
2414
|
-
{
|
|
2415
|
-
className: cn(
|
|
2416
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2417
|
-
className
|
|
2418
|
-
),
|
|
2419
|
-
ref,
|
|
2420
|
-
...props
|
|
2421
|
-
}
|
|
2422
|
-
);
|
|
2423
|
-
}
|
|
2424
|
-
);
|
|
2425
|
-
Textarea.displayName = "Textarea";
|
|
2426
|
-
|
|
2427
|
-
// src/components/text-area/TextArea.tsx
|
|
2428
|
-
import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2429
|
-
var textAreaVariants = cva12(
|
|
2723
|
+
import * as React19 from "react";
|
|
2724
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
2725
|
+
import { jsx as jsx35, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2726
|
+
var textAreaVariants = cva14(
|
|
2430
2727
|
"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",
|
|
2431
2728
|
{
|
|
2432
2729
|
variants: {
|
|
@@ -2448,7 +2745,7 @@ var textAreaVariants = cva12(
|
|
|
2448
2745
|
}
|
|
2449
2746
|
}
|
|
2450
2747
|
);
|
|
2451
|
-
var TextArea =
|
|
2748
|
+
var TextArea = React19.forwardRef(
|
|
2452
2749
|
({
|
|
2453
2750
|
className,
|
|
2454
2751
|
variant,
|
|
@@ -2468,13 +2765,13 @@ var TextArea = React32.forwardRef(
|
|
|
2468
2765
|
actionButton,
|
|
2469
2766
|
...props
|
|
2470
2767
|
}, ref) => {
|
|
2471
|
-
const generatedId =
|
|
2768
|
+
const generatedId = React19.useId();
|
|
2472
2769
|
const textareaId = id || generatedId;
|
|
2473
2770
|
const errorId = `${textareaId}-error`;
|
|
2474
2771
|
const descriptionId = `${textareaId}-description`;
|
|
2475
2772
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
2476
|
-
return /* @__PURE__ */
|
|
2477
|
-
label && /* @__PURE__ */
|
|
2773
|
+
return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2", children: [
|
|
2774
|
+
label && /* @__PURE__ */ jsx35(
|
|
2478
2775
|
"label",
|
|
2479
2776
|
{
|
|
2480
2777
|
htmlFor: textareaId,
|
|
@@ -2486,9 +2783,9 @@ var TextArea = React32.forwardRef(
|
|
|
2486
2783
|
children: label
|
|
2487
2784
|
}
|
|
2488
2785
|
),
|
|
2489
|
-
/* @__PURE__ */
|
|
2490
|
-
icon && /* @__PURE__ */
|
|
2491
|
-
/* @__PURE__ */
|
|
2786
|
+
/* @__PURE__ */ jsxs16("div", { className: "relative", children: [
|
|
2787
|
+
icon && /* @__PURE__ */ jsx35("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
2788
|
+
/* @__PURE__ */ jsx35(
|
|
2492
2789
|
Textarea,
|
|
2493
2790
|
{
|
|
2494
2791
|
ref,
|
|
@@ -2513,13 +2810,13 @@ var TextArea = React32.forwardRef(
|
|
|
2513
2810
|
...props
|
|
2514
2811
|
}
|
|
2515
2812
|
),
|
|
2516
|
-
secondaryIcon && /* @__PURE__ */
|
|
2517
|
-
actionButton && /* @__PURE__ */
|
|
2813
|
+
secondaryIcon && /* @__PURE__ */ jsx35("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
2814
|
+
actionButton && /* @__PURE__ */ jsx35("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
2518
2815
|
] }),
|
|
2519
|
-
(description || error || showCount && maxLength) && /* @__PURE__ */
|
|
2520
|
-
description && /* @__PURE__ */
|
|
2521
|
-
(error || showCount && maxLength) && /* @__PURE__ */
|
|
2522
|
-
showCount && maxLength && /* @__PURE__ */
|
|
2816
|
+
(description || error || showCount && maxLength) && /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2817
|
+
description && /* @__PURE__ */ jsx35(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
2818
|
+
(error || showCount && maxLength) && /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
2819
|
+
showCount && maxLength && /* @__PURE__ */ jsxs16(
|
|
2523
2820
|
Typography,
|
|
2524
2821
|
{
|
|
2525
2822
|
variant: "xs",
|
|
@@ -2533,7 +2830,7 @@ var TextArea = React32.forwardRef(
|
|
|
2533
2830
|
]
|
|
2534
2831
|
}
|
|
2535
2832
|
),
|
|
2536
|
-
error && /* @__PURE__ */
|
|
2833
|
+
error && /* @__PURE__ */ jsx35(
|
|
2537
2834
|
Typography,
|
|
2538
2835
|
{
|
|
2539
2836
|
variant: "xs",
|
|
@@ -2550,27 +2847,34 @@ var TextArea = React32.forwardRef(
|
|
|
2550
2847
|
TextArea.displayName = "TextArea";
|
|
2551
2848
|
|
|
2552
2849
|
// src/primitives/label.tsx
|
|
2553
|
-
import
|
|
2554
|
-
import {
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2850
|
+
import { cn as cn17 } from "cn";
|
|
2851
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2852
|
+
function Label({ className, ...props }) {
|
|
2853
|
+
return /* @__PURE__ */ jsx36(
|
|
2854
|
+
"label",
|
|
2855
|
+
{
|
|
2856
|
+
"data-slot": "label",
|
|
2857
|
+
className: cn17(
|
|
2858
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
2859
|
+
className
|
|
2860
|
+
),
|
|
2861
|
+
...props
|
|
2862
|
+
}
|
|
2863
|
+
);
|
|
2864
|
+
}
|
|
2561
2865
|
|
|
2562
2866
|
// src/primitives/field.tsx
|
|
2563
2867
|
import { useMemo as useMemo3 } from "react";
|
|
2564
|
-
import { cva as
|
|
2565
|
-
import {
|
|
2868
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
2869
|
+
import { cn as cn18 } from "cn";
|
|
2870
|
+
import { jsx as jsx37, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2566
2871
|
function FieldSet({ className, ...props }) {
|
|
2567
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ jsx37(
|
|
2568
2873
|
"fieldset",
|
|
2569
2874
|
{
|
|
2570
2875
|
"data-slot": "field-set",
|
|
2571
|
-
className:
|
|
2572
|
-
"flex flex-col gap-
|
|
2573
|
-
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
2876
|
+
className: cn18(
|
|
2877
|
+
"flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
2574
2878
|
className
|
|
2575
2879
|
),
|
|
2576
2880
|
...props
|
|
@@ -2582,15 +2886,13 @@ function FieldLegend({
|
|
|
2582
2886
|
variant = "legend",
|
|
2583
2887
|
...props
|
|
2584
2888
|
}) {
|
|
2585
|
-
return /* @__PURE__ */
|
|
2889
|
+
return /* @__PURE__ */ jsx37(
|
|
2586
2890
|
"legend",
|
|
2587
2891
|
{
|
|
2588
2892
|
"data-slot": "field-legend",
|
|
2589
2893
|
"data-variant": variant,
|
|
2590
|
-
className:
|
|
2591
|
-
"mb-
|
|
2592
|
-
"data-[variant=legend]:text-base",
|
|
2593
|
-
"data-[variant=label]:text-sm",
|
|
2894
|
+
className: cn18(
|
|
2895
|
+
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
2594
2896
|
className
|
|
2595
2897
|
),
|
|
2596
2898
|
...props
|
|
@@ -2598,34 +2900,26 @@ function FieldLegend({
|
|
|
2598
2900
|
);
|
|
2599
2901
|
}
|
|
2600
2902
|
function FieldGroup({ className, ...props }) {
|
|
2601
|
-
return /* @__PURE__ */
|
|
2903
|
+
return /* @__PURE__ */ jsx37(
|
|
2602
2904
|
"div",
|
|
2603
2905
|
{
|
|
2604
2906
|
"data-slot": "field-group",
|
|
2605
|
-
className:
|
|
2606
|
-
"group/field-group @container/field-group flex w-full flex-col gap-
|
|
2907
|
+
className: cn18(
|
|
2908
|
+
"group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
|
|
2607
2909
|
className
|
|
2608
2910
|
),
|
|
2609
2911
|
...props
|
|
2610
2912
|
}
|
|
2611
2913
|
);
|
|
2612
2914
|
}
|
|
2613
|
-
var fieldVariants =
|
|
2614
|
-
"group/field data-[invalid=true]:text-
|
|
2915
|
+
var fieldVariants = cva15(
|
|
2916
|
+
"group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
|
|
2615
2917
|
{
|
|
2616
2918
|
variants: {
|
|
2617
2919
|
orientation: {
|
|
2618
|
-
vertical:
|
|
2619
|
-
horizontal: [
|
|
2620
|
-
|
|
2621
|
-
"[&>[data-slot=field-label]]:flex-auto",
|
|
2622
|
-
"has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
|
|
2623
|
-
],
|
|
2624
|
-
responsive: [
|
|
2625
|
-
"@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
|
|
2626
|
-
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
2627
|
-
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
2628
|
-
]
|
|
2920
|
+
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
2921
|
+
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
2922
|
+
responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
2629
2923
|
}
|
|
2630
2924
|
},
|
|
2631
2925
|
defaultVariants: {
|
|
@@ -2638,36 +2932,41 @@ function Field({
|
|
|
2638
2932
|
orientation = "vertical",
|
|
2639
2933
|
...props
|
|
2640
2934
|
}) {
|
|
2641
|
-
return /* @__PURE__ */
|
|
2935
|
+
return /* @__PURE__ */ jsx37(
|
|
2642
2936
|
"div",
|
|
2643
2937
|
{
|
|
2644
2938
|
role: "group",
|
|
2645
2939
|
"data-slot": "field",
|
|
2646
2940
|
"data-orientation": orientation,
|
|
2647
|
-
className:
|
|
2941
|
+
className: cn18(fieldVariants({ orientation }), className),
|
|
2648
2942
|
...props
|
|
2649
2943
|
}
|
|
2650
2944
|
);
|
|
2651
2945
|
}
|
|
2652
2946
|
function FieldContent({ className, ...props }) {
|
|
2653
|
-
return /* @__PURE__ */
|
|
2947
|
+
return /* @__PURE__ */ jsx37(
|
|
2654
2948
|
"div",
|
|
2655
2949
|
{
|
|
2656
2950
|
"data-slot": "field-content",
|
|
2657
|
-
className:
|
|
2951
|
+
className: cn18(
|
|
2952
|
+
"group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
|
|
2953
|
+
className
|
|
2954
|
+
),
|
|
2658
2955
|
...props
|
|
2659
2956
|
}
|
|
2660
2957
|
);
|
|
2661
2958
|
}
|
|
2662
|
-
function FieldLabel({
|
|
2663
|
-
|
|
2959
|
+
function FieldLabel({
|
|
2960
|
+
className,
|
|
2961
|
+
...props
|
|
2962
|
+
}) {
|
|
2963
|
+
return /* @__PURE__ */ jsx37(
|
|
2664
2964
|
Label,
|
|
2665
2965
|
{
|
|
2666
2966
|
"data-slot": "field-label",
|
|
2667
|
-
className:
|
|
2668
|
-
"group/field-label peer/field-label flex w-fit gap-2 leading-snug
|
|
2669
|
-
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col
|
|
2670
|
-
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
2967
|
+
className: cn18(
|
|
2968
|
+
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
|
|
2969
|
+
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
2671
2970
|
className
|
|
2672
2971
|
),
|
|
2673
2972
|
...props
|
|
@@ -2675,12 +2974,12 @@ function FieldLabel({ className, ...props }) {
|
|
|
2675
2974
|
);
|
|
2676
2975
|
}
|
|
2677
2976
|
function FieldTitle({ className, ...props }) {
|
|
2678
|
-
return /* @__PURE__ */
|
|
2977
|
+
return /* @__PURE__ */ jsx37(
|
|
2679
2978
|
"div",
|
|
2680
2979
|
{
|
|
2681
2980
|
"data-slot": "field-label",
|
|
2682
|
-
className:
|
|
2683
|
-
"flex w-fit items-center gap-2 text-sm font-medium
|
|
2981
|
+
className: cn18(
|
|
2982
|
+
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
2684
2983
|
className
|
|
2685
2984
|
),
|
|
2686
2985
|
...props
|
|
@@ -2688,14 +2987,14 @@ function FieldTitle({ className, ...props }) {
|
|
|
2688
2987
|
);
|
|
2689
2988
|
}
|
|
2690
2989
|
function FieldDescription({ className, ...props }) {
|
|
2691
|
-
return /* @__PURE__ */
|
|
2990
|
+
return /* @__PURE__ */ jsx37(
|
|
2692
2991
|
"p",
|
|
2693
2992
|
{
|
|
2694
2993
|
"data-slot": "field-description",
|
|
2695
|
-
className:
|
|
2696
|
-
"text-
|
|
2697
|
-
"
|
|
2698
|
-
"[&>a
|
|
2994
|
+
className: cn18(
|
|
2995
|
+
"text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
2996
|
+
"last:mt-0 nth-last-2:-mt-1",
|
|
2997
|
+
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
2699
2998
|
className
|
|
2700
2999
|
),
|
|
2701
3000
|
...props
|
|
@@ -2707,22 +3006,22 @@ function FieldSeparator({
|
|
|
2707
3006
|
className,
|
|
2708
3007
|
...props
|
|
2709
3008
|
}) {
|
|
2710
|
-
return /* @__PURE__ */
|
|
3009
|
+
return /* @__PURE__ */ jsxs17(
|
|
2711
3010
|
"div",
|
|
2712
3011
|
{
|
|
2713
3012
|
"data-slot": "field-separator",
|
|
2714
3013
|
"data-content": !!children,
|
|
2715
|
-
className:
|
|
3014
|
+
className: cn18(
|
|
2716
3015
|
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
2717
3016
|
className
|
|
2718
3017
|
),
|
|
2719
3018
|
...props,
|
|
2720
3019
|
children: [
|
|
2721
|
-
/* @__PURE__ */
|
|
2722
|
-
children && /* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ jsx37(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
3021
|
+
children && /* @__PURE__ */ jsx37(
|
|
2723
3022
|
"span",
|
|
2724
3023
|
{
|
|
2725
|
-
className: "
|
|
3024
|
+
className: "relative mx-auto block w-fit bg-background px-2 text-muted-foreground",
|
|
2726
3025
|
"data-slot": "field-separator-content",
|
|
2727
3026
|
children
|
|
2728
3027
|
}
|
|
@@ -2741,23 +3040,28 @@ function FieldError({
|
|
|
2741
3040
|
if (children) {
|
|
2742
3041
|
return children;
|
|
2743
3042
|
}
|
|
2744
|
-
if (!errors) {
|
|
3043
|
+
if (!errors?.length) {
|
|
2745
3044
|
return null;
|
|
2746
3045
|
}
|
|
2747
|
-
|
|
2748
|
-
|
|
3046
|
+
const uniqueErrors = [
|
|
3047
|
+
...new Map(errors.map((error) => [error?.message, error])).values()
|
|
3048
|
+
];
|
|
3049
|
+
if (uniqueErrors?.length == 1) {
|
|
3050
|
+
return uniqueErrors[0]?.message;
|
|
2749
3051
|
}
|
|
2750
|
-
return /* @__PURE__ */
|
|
3052
|
+
return /* @__PURE__ */ jsx37("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
3053
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx37("li", { children: error.message }, index)
|
|
3054
|
+
) });
|
|
2751
3055
|
}, [children, errors]);
|
|
2752
3056
|
if (!content) {
|
|
2753
3057
|
return null;
|
|
2754
3058
|
}
|
|
2755
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ jsx37(
|
|
2756
3060
|
"div",
|
|
2757
3061
|
{
|
|
2758
3062
|
role: "alert",
|
|
2759
3063
|
"data-slot": "field-error",
|
|
2760
|
-
className:
|
|
3064
|
+
className: cn18("text-sm font-normal text-destructive", className),
|
|
2761
3065
|
...props,
|
|
2762
3066
|
children: content
|
|
2763
3067
|
}
|
|
@@ -2765,11 +3069,11 @@ function FieldError({
|
|
|
2765
3069
|
}
|
|
2766
3070
|
|
|
2767
3071
|
// src/components/link/Link.tsx
|
|
2768
|
-
import * as
|
|
2769
|
-
import { cva as
|
|
3072
|
+
import * as React20 from "react";
|
|
3073
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
2770
3074
|
import { ExternalLink } from "lucide-react";
|
|
2771
|
-
import { jsx as
|
|
2772
|
-
var linkVariants =
|
|
3075
|
+
import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3076
|
+
var linkVariants = cva16(
|
|
2773
3077
|
"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",
|
|
2774
3078
|
{
|
|
2775
3079
|
variants: {
|
|
@@ -2793,7 +3097,7 @@ var linkVariants = cva15(
|
|
|
2793
3097
|
}
|
|
2794
3098
|
}
|
|
2795
3099
|
);
|
|
2796
|
-
var Link =
|
|
3100
|
+
var Link = React20.forwardRef(
|
|
2797
3101
|
({
|
|
2798
3102
|
className,
|
|
2799
3103
|
variant,
|
|
@@ -2806,7 +3110,7 @@ var Link = React34.forwardRef(
|
|
|
2806
3110
|
...props
|
|
2807
3111
|
}, ref) => {
|
|
2808
3112
|
const isExternal = external || typeof props.href === "string" && (props.href.startsWith("http://") || props.href.startsWith("https://") || props.href.startsWith("mailto:") || props.href.startsWith("tel:"));
|
|
2809
|
-
return /* @__PURE__ */
|
|
3113
|
+
return /* @__PURE__ */ jsxs18(
|
|
2810
3114
|
"a",
|
|
2811
3115
|
{
|
|
2812
3116
|
ref,
|
|
@@ -2822,8 +3126,8 @@ var Link = React34.forwardRef(
|
|
|
2822
3126
|
},
|
|
2823
3127
|
children: [
|
|
2824
3128
|
children,
|
|
2825
|
-
icon && /* @__PURE__ */
|
|
2826
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */
|
|
3129
|
+
icon && /* @__PURE__ */ jsx38("span", { className: "inline-flex items-center", children: icon }),
|
|
3130
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ jsx38("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ jsx38(Icon, { icon: ExternalLink, size: 16 }) })
|
|
2827
3131
|
]
|
|
2828
3132
|
}
|
|
2829
3133
|
);
|
|
@@ -2832,11 +3136,11 @@ var Link = React34.forwardRef(
|
|
|
2832
3136
|
Link.displayName = "Link";
|
|
2833
3137
|
|
|
2834
3138
|
// src/components/container/Container.tsx
|
|
2835
|
-
import * as
|
|
3139
|
+
import * as React21 from "react";
|
|
2836
3140
|
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
2837
3141
|
import { useRender as useRender2 } from "@base-ui/react/use-render";
|
|
2838
|
-
import { cva as
|
|
2839
|
-
var containerVariants =
|
|
3142
|
+
import { cva as cva17 } from "class-variance-authority";
|
|
3143
|
+
var containerVariants = cva17("w-full mx-auto", {
|
|
2840
3144
|
variants: {
|
|
2841
3145
|
size: {
|
|
2842
3146
|
sm: "max-w-3xl",
|
|
@@ -2857,7 +3161,7 @@ var containerVariants = cva16("w-full mx-auto", {
|
|
|
2857
3161
|
padding: "md"
|
|
2858
3162
|
}
|
|
2859
3163
|
});
|
|
2860
|
-
var Container =
|
|
3164
|
+
var Container = React21.forwardRef(
|
|
2861
3165
|
({ className, size, padding, asChild = false, children, ...props }, ref) => {
|
|
2862
3166
|
return useRender2({
|
|
2863
3167
|
ref,
|
|
@@ -2876,11 +3180,11 @@ var Container = React35.forwardRef(
|
|
|
2876
3180
|
Container.displayName = "Container";
|
|
2877
3181
|
|
|
2878
3182
|
// src/components/grid/Grid.tsx
|
|
2879
|
-
import * as
|
|
2880
|
-
import { cva as
|
|
3183
|
+
import * as React22 from "react";
|
|
3184
|
+
import { cva as cva18 } from "class-variance-authority";
|
|
2881
3185
|
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
2882
3186
|
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
2883
|
-
var gridVariants =
|
|
3187
|
+
var gridVariants = cva18("grid", {
|
|
2884
3188
|
variants: {
|
|
2885
3189
|
align: {
|
|
2886
3190
|
start: "items-start",
|
|
@@ -2902,7 +3206,7 @@ var gridVariants = cva17("grid", {
|
|
|
2902
3206
|
justify: "start"
|
|
2903
3207
|
}
|
|
2904
3208
|
});
|
|
2905
|
-
var Grid =
|
|
3209
|
+
var Grid = React22.forwardRef(
|
|
2906
3210
|
({ className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props }, ref) => {
|
|
2907
3211
|
return useRender3({
|
|
2908
3212
|
ref,
|
|
@@ -2929,11 +3233,11 @@ var Grid = React36.forwardRef(
|
|
|
2929
3233
|
Grid.displayName = "Grid";
|
|
2930
3234
|
|
|
2931
3235
|
// src/components/box/Box.tsx
|
|
2932
|
-
import * as
|
|
2933
|
-
import { cva as
|
|
3236
|
+
import * as React23 from "react";
|
|
3237
|
+
import { cva as cva19 } from "class-variance-authority";
|
|
2934
3238
|
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
2935
3239
|
import { useRender as useRender4 } from "@base-ui/react/use-render";
|
|
2936
|
-
var boxVariants =
|
|
3240
|
+
var boxVariants = cva19("flex", {
|
|
2937
3241
|
variants: {
|
|
2938
3242
|
direction: {
|
|
2939
3243
|
row: "flex-row",
|
|
@@ -2969,7 +3273,7 @@ var boxVariants = cva18("flex", {
|
|
|
2969
3273
|
wrap: "nowrap"
|
|
2970
3274
|
}
|
|
2971
3275
|
});
|
|
2972
|
-
var Box =
|
|
3276
|
+
var Box = React23.forwardRef(
|
|
2973
3277
|
({ className, direction, align, justify, wrap, gap, asChild = false, children, ...props }, ref) => {
|
|
2974
3278
|
return useRender4({
|
|
2975
3279
|
ref,
|
|
@@ -2992,16 +3296,16 @@ var Box = React37.forwardRef(
|
|
|
2992
3296
|
Box.displayName = "Box";
|
|
2993
3297
|
|
|
2994
3298
|
// src/components/berget-logo/BergetLogo.tsx
|
|
2995
|
-
import * as
|
|
2996
|
-
import { jsx as
|
|
2997
|
-
var BergetLogo =
|
|
3299
|
+
import * as React24 from "react";
|
|
3300
|
+
import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3301
|
+
var BergetLogo = React24.forwardRef(
|
|
2998
3302
|
({ variant = "logotype", color = "auto", size = 48, className, ...props }, ref) => {
|
|
2999
3303
|
const fillColor = color === "auto" ? "var(--berget-logo-light)" : color === "white" ? "var(--berget-logo-light)" : "var(--berget-logo-dark)";
|
|
3000
3304
|
if (variant === "symbol") {
|
|
3001
3305
|
const aspectRatio2 = 463 / 419;
|
|
3002
3306
|
const width2 = size * aspectRatio2;
|
|
3003
3307
|
const height2 = size;
|
|
3004
|
-
return /* @__PURE__ */
|
|
3308
|
+
return /* @__PURE__ */ jsx39(
|
|
3005
3309
|
"svg",
|
|
3006
3310
|
{
|
|
3007
3311
|
ref,
|
|
@@ -3014,7 +3318,7 @@ var BergetLogo = React38.forwardRef(
|
|
|
3014
3318
|
"aria-label": "Berget symbol",
|
|
3015
3319
|
className: cn("inline-block", className),
|
|
3016
3320
|
...props,
|
|
3017
|
-
children: /* @__PURE__ */
|
|
3321
|
+
children: /* @__PURE__ */ jsx39(
|
|
3018
3322
|
"path",
|
|
3019
3323
|
{
|
|
3020
3324
|
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",
|
|
@@ -3027,7 +3331,7 @@ var BergetLogo = React38.forwardRef(
|
|
|
3027
3331
|
const aspectRatio = 793.63 / 204.37;
|
|
3028
3332
|
const width = size * aspectRatio;
|
|
3029
3333
|
const height = size;
|
|
3030
|
-
return /* @__PURE__ */
|
|
3334
|
+
return /* @__PURE__ */ jsxs19(
|
|
3031
3335
|
"svg",
|
|
3032
3336
|
{
|
|
3033
3337
|
ref,
|
|
@@ -3041,59 +3345,59 @@ var BergetLogo = React38.forwardRef(
|
|
|
3041
3345
|
className: cn("inline-block", className),
|
|
3042
3346
|
...props,
|
|
3043
3347
|
children: [
|
|
3044
|
-
/* @__PURE__ */
|
|
3045
|
-
/* @__PURE__ */
|
|
3348
|
+
/* @__PURE__ */ jsxs19("g", { style: { fill: fillColor }, children: [
|
|
3349
|
+
/* @__PURE__ */ jsx39(
|
|
3046
3350
|
"path",
|
|
3047
3351
|
{
|
|
3048
3352
|
className: "berget-logotype-fill",
|
|
3049
3353
|
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"
|
|
3050
3354
|
}
|
|
3051
3355
|
),
|
|
3052
|
-
/* @__PURE__ */
|
|
3356
|
+
/* @__PURE__ */ jsx39(
|
|
3053
3357
|
"path",
|
|
3054
3358
|
{
|
|
3055
3359
|
className: "berget-logotype-fill",
|
|
3056
3360
|
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"
|
|
3057
3361
|
}
|
|
3058
3362
|
),
|
|
3059
|
-
/* @__PURE__ */
|
|
3363
|
+
/* @__PURE__ */ jsx39(
|
|
3060
3364
|
"path",
|
|
3061
3365
|
{
|
|
3062
3366
|
className: "berget-logotype-fill",
|
|
3063
3367
|
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"
|
|
3064
3368
|
}
|
|
3065
3369
|
),
|
|
3066
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ jsx39(
|
|
3067
3371
|
"path",
|
|
3068
3372
|
{
|
|
3069
3373
|
className: "berget-logotype-fill",
|
|
3070
3374
|
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"
|
|
3071
3375
|
}
|
|
3072
3376
|
),
|
|
3073
|
-
/* @__PURE__ */
|
|
3377
|
+
/* @__PURE__ */ jsx39(
|
|
3074
3378
|
"path",
|
|
3075
3379
|
{
|
|
3076
3380
|
className: "berget-logotype-fill",
|
|
3077
3381
|
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"
|
|
3078
3382
|
}
|
|
3079
3383
|
),
|
|
3080
|
-
/* @__PURE__ */
|
|
3384
|
+
/* @__PURE__ */ jsx39(
|
|
3081
3385
|
"path",
|
|
3082
3386
|
{
|
|
3083
3387
|
className: "berget-logotype-fill",
|
|
3084
3388
|
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"
|
|
3085
3389
|
}
|
|
3086
3390
|
),
|
|
3087
|
-
/* @__PURE__ */
|
|
3391
|
+
/* @__PURE__ */ jsx39(
|
|
3088
3392
|
"path",
|
|
3089
3393
|
{
|
|
3090
3394
|
className: "berget-logotype-fill",
|
|
3091
3395
|
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"
|
|
3092
3396
|
}
|
|
3093
3397
|
),
|
|
3094
|
-
/* @__PURE__ */
|
|
3398
|
+
/* @__PURE__ */ jsx39("path", { className: "berget-logotype-fill", d: "M778.48,172.54v-96.04h15.15v96.04h-15.15Z" })
|
|
3095
3399
|
] }),
|
|
3096
|
-
/* @__PURE__ */
|
|
3400
|
+
/* @__PURE__ */ jsx39(
|
|
3097
3401
|
"path",
|
|
3098
3402
|
{
|
|
3099
3403
|
style: { fill: fillColor },
|
|
@@ -3108,19 +3412,19 @@ var BergetLogo = React38.forwardRef(
|
|
|
3108
3412
|
BergetLogo.displayName = "BergetLogo";
|
|
3109
3413
|
|
|
3110
3414
|
// src/components/language-select/LanguageSelect.tsx
|
|
3111
|
-
import * as
|
|
3415
|
+
import * as React25 from "react";
|
|
3112
3416
|
import { Select as SelectPrimitive2 } from "@base-ui/react/select";
|
|
3113
3417
|
import { Globe as Globe2 } from "lucide-react";
|
|
3114
|
-
import { jsx as
|
|
3115
|
-
var LanguageSelect =
|
|
3418
|
+
import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3419
|
+
var LanguageSelect = React25.forwardRef(
|
|
3116
3420
|
({ className, options, value, onValueChange }, ref) => {
|
|
3117
|
-
return /* @__PURE__ */
|
|
3421
|
+
return /* @__PURE__ */ jsxs20(
|
|
3118
3422
|
SelectPrimitive2.Root,
|
|
3119
3423
|
{
|
|
3120
3424
|
value,
|
|
3121
3425
|
onValueChange: onValueChange ? (v) => onValueChange(v ?? "") : void 0,
|
|
3122
3426
|
children: [
|
|
3123
|
-
/* @__PURE__ */
|
|
3427
|
+
/* @__PURE__ */ jsxs20(
|
|
3124
3428
|
SelectPrimitive2.Trigger,
|
|
3125
3429
|
{
|
|
3126
3430
|
ref,
|
|
@@ -3143,12 +3447,12 @@ var LanguageSelect = React39.forwardRef(
|
|
|
3143
3447
|
className
|
|
3144
3448
|
),
|
|
3145
3449
|
children: [
|
|
3146
|
-
/* @__PURE__ */
|
|
3147
|
-
/* @__PURE__ */
|
|
3450
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Select language" }),
|
|
3451
|
+
/* @__PURE__ */ jsx40(Icon, { icon: Globe2, size: 16, "aria-hidden": true })
|
|
3148
3452
|
]
|
|
3149
3453
|
}
|
|
3150
3454
|
),
|
|
3151
|
-
/* @__PURE__ */
|
|
3455
|
+
/* @__PURE__ */ jsx40(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx40(SelectPrimitive2.Positioner, { alignItemWithTrigger: false, className: "isolate z-50", children: /* @__PURE__ */ jsx40(
|
|
3152
3456
|
SelectPrimitive2.Popup,
|
|
3153
3457
|
{
|
|
3154
3458
|
className: cn(
|
|
@@ -3174,7 +3478,7 @@ var LanguageSelect = React39.forwardRef(
|
|
|
3174
3478
|
// Origin for transforms
|
|
3175
3479
|
"origin-[--transform-origin]"
|
|
3176
3480
|
),
|
|
3177
|
-
children: /* @__PURE__ */
|
|
3481
|
+
children: /* @__PURE__ */ jsx40(SelectPrimitive2.List, { className: "p-1", children: options.map((option) => /* @__PURE__ */ jsx40(
|
|
3178
3482
|
SelectPrimitive2.Item,
|
|
3179
3483
|
{
|
|
3180
3484
|
value: option.value,
|
|
@@ -3191,7 +3495,7 @@ var LanguageSelect = React39.forwardRef(
|
|
|
3191
3495
|
// Disabled state
|
|
3192
3496
|
"data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
3193
3497
|
),
|
|
3194
|
-
children: /* @__PURE__ */
|
|
3498
|
+
children: /* @__PURE__ */ jsx40(SelectPrimitive2.ItemText, { children: option.label })
|
|
3195
3499
|
},
|
|
3196
3500
|
option.value
|
|
3197
3501
|
)) })
|
|
@@ -3205,13 +3509,13 @@ var LanguageSelect = React39.forwardRef(
|
|
|
3205
3509
|
LanguageSelect.displayName = "LanguageSelect";
|
|
3206
3510
|
|
|
3207
3511
|
// src/components/list/List.tsx
|
|
3208
|
-
import * as
|
|
3512
|
+
import * as React27 from "react";
|
|
3209
3513
|
|
|
3210
3514
|
// src/components/divider/Divider.tsx
|
|
3211
|
-
import * as
|
|
3212
|
-
import { cva as
|
|
3213
|
-
import { jsx as
|
|
3214
|
-
var dividerVariants =
|
|
3515
|
+
import * as React26 from "react";
|
|
3516
|
+
import { cva as cva20 } from "class-variance-authority";
|
|
3517
|
+
import { jsx as jsx41, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3518
|
+
var dividerVariants = cva20("", {
|
|
3215
3519
|
variants: {
|
|
3216
3520
|
variant: {
|
|
3217
3521
|
default: "bg-berget-separator",
|
|
@@ -3231,7 +3535,7 @@ var dividerVariants = cva19("", {
|
|
|
3231
3535
|
size: "thin"
|
|
3232
3536
|
}
|
|
3233
3537
|
});
|
|
3234
|
-
var Divider =
|
|
3538
|
+
var Divider = React26.forwardRef(
|
|
3235
3539
|
({
|
|
3236
3540
|
className,
|
|
3237
3541
|
orientation = "horizontal",
|
|
@@ -3242,16 +3546,16 @@ var Divider = React40.forwardRef(
|
|
|
3242
3546
|
...props
|
|
3243
3547
|
}, ref) => {
|
|
3244
3548
|
if (label) {
|
|
3245
|
-
return /* @__PURE__ */
|
|
3246
|
-
labelPosition !== "right" && /* @__PURE__ */
|
|
3549
|
+
return /* @__PURE__ */ jsxs21("div", { ref, className: cn("flex items-center w-full", className), ...props, children: [
|
|
3550
|
+
labelPosition !== "right" && /* @__PURE__ */ jsx41(
|
|
3247
3551
|
Separator,
|
|
3248
3552
|
{
|
|
3249
3553
|
orientation: "horizontal",
|
|
3250
3554
|
className: cn(dividerVariants({ variant, size }), "flex-1")
|
|
3251
3555
|
}
|
|
3252
3556
|
),
|
|
3253
|
-
/* @__PURE__ */
|
|
3254
|
-
labelPosition !== "left" && /* @__PURE__ */
|
|
3557
|
+
/* @__PURE__ */ jsx41(Typography, { variant: "small", color: "muted", className: "px-4 whitespace-nowrap", children: label }),
|
|
3558
|
+
labelPosition !== "left" && /* @__PURE__ */ jsx41(
|
|
3255
3559
|
Separator,
|
|
3256
3560
|
{
|
|
3257
3561
|
orientation: "horizontal",
|
|
@@ -3260,7 +3564,7 @@ var Divider = React40.forwardRef(
|
|
|
3260
3564
|
)
|
|
3261
3565
|
] });
|
|
3262
3566
|
}
|
|
3263
|
-
return /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ jsx41(
|
|
3264
3568
|
Separator,
|
|
3265
3569
|
{
|
|
3266
3570
|
ref,
|
|
@@ -3277,20 +3581,20 @@ var Divider = React40.forwardRef(
|
|
|
3277
3581
|
Divider.displayName = "Divider";
|
|
3278
3582
|
|
|
3279
3583
|
// src/components/list/List.tsx
|
|
3280
|
-
import { Check as
|
|
3281
|
-
import { jsx as
|
|
3282
|
-
var List =
|
|
3584
|
+
import { Check as Check3 } from "lucide-react";
|
|
3585
|
+
import { jsx as jsx42, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3586
|
+
var List = React27.forwardRef(
|
|
3283
3587
|
({ className, children, ...props }, ref) => {
|
|
3284
|
-
const childrenArray =
|
|
3285
|
-
return /* @__PURE__ */
|
|
3588
|
+
const childrenArray = React27.Children.toArray(children);
|
|
3589
|
+
return /* @__PURE__ */ jsx42("div", { ref, className: cn("flex flex-col", className), ...props, children: childrenArray.map((child, index) => /* @__PURE__ */ jsxs22(React27.Fragment, { children: [
|
|
3286
3590
|
child,
|
|
3287
|
-
index < childrenArray.length - 1 && /* @__PURE__ */
|
|
3591
|
+
index < childrenArray.length - 1 && /* @__PURE__ */ jsx42(Divider, { variant: "subtle" })
|
|
3288
3592
|
] }, index)) });
|
|
3289
3593
|
}
|
|
3290
3594
|
);
|
|
3291
3595
|
List.displayName = "List";
|
|
3292
|
-
var ListItem =
|
|
3293
|
-
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */
|
|
3596
|
+
var ListItem = React27.forwardRef(
|
|
3597
|
+
({ className, icon, children, interactive = true, ...props }, ref) => /* @__PURE__ */ jsxs22(
|
|
3294
3598
|
"div",
|
|
3295
3599
|
{
|
|
3296
3600
|
ref,
|
|
@@ -3301,15 +3605,15 @@ var ListItem = React41.forwardRef(
|
|
|
3301
3605
|
),
|
|
3302
3606
|
...props,
|
|
3303
3607
|
children: [
|
|
3304
|
-
icon && /* @__PURE__ */
|
|
3305
|
-
/* @__PURE__ */
|
|
3608
|
+
icon && /* @__PURE__ */ jsx42("div", { className: "flex-shrink-0 flex items-center justify-center", children: icon }),
|
|
3609
|
+
/* @__PURE__ */ jsx42("div", { className: "flex-1 min-w-0", children })
|
|
3306
3610
|
]
|
|
3307
3611
|
}
|
|
3308
3612
|
)
|
|
3309
3613
|
);
|
|
3310
3614
|
ListItem.displayName = "ListItem";
|
|
3311
|
-
var ListHeader =
|
|
3312
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
3615
|
+
var ListHeader = React27.forwardRef(
|
|
3616
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx42(
|
|
3313
3617
|
"div",
|
|
3314
3618
|
{
|
|
3315
3619
|
ref,
|
|
@@ -3320,21 +3624,21 @@ var ListHeader = React41.forwardRef(
|
|
|
3320
3624
|
)
|
|
3321
3625
|
);
|
|
3322
3626
|
ListHeader.displayName = "ListHeader";
|
|
3323
|
-
var FeatureList =
|
|
3627
|
+
var FeatureList = React27.forwardRef(
|
|
3324
3628
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
3325
|
-
return /* @__PURE__ */
|
|
3326
|
-
variant === "bullet" ? /* @__PURE__ */
|
|
3327
|
-
/* @__PURE__ */
|
|
3629
|
+
return /* @__PURE__ */ jsx42("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs22("li", { className: "flex items-start gap-fluid-md", children: [
|
|
3630
|
+
variant === "bullet" ? /* @__PURE__ */ jsx42("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ jsx42("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx42(Icon, { icon: Check3, size: 24, className: "text-berget-logo-light" }) }),
|
|
3631
|
+
/* @__PURE__ */ jsx42(Typography, { variant: "body", color: "muted", children: item })
|
|
3328
3632
|
] }, index)) });
|
|
3329
3633
|
}
|
|
3330
3634
|
);
|
|
3331
3635
|
FeatureList.displayName = "FeatureList";
|
|
3332
3636
|
|
|
3333
3637
|
// src/components/hero-block/HeroBlock.tsx
|
|
3334
|
-
import * as
|
|
3335
|
-
import { cva as
|
|
3336
|
-
import { jsx as
|
|
3337
|
-
var heroBlockVariants =
|
|
3638
|
+
import * as React28 from "react";
|
|
3639
|
+
import { cva as cva21 } from "class-variance-authority";
|
|
3640
|
+
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3641
|
+
var heroBlockVariants = cva21(
|
|
3338
3642
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
3339
3643
|
{
|
|
3340
3644
|
variants: {
|
|
@@ -3354,7 +3658,7 @@ var heroBlockVariants = cva20(
|
|
|
3354
3658
|
}
|
|
3355
3659
|
}
|
|
3356
3660
|
);
|
|
3357
|
-
var HeroBlock =
|
|
3661
|
+
var HeroBlock = React28.forwardRef(
|
|
3358
3662
|
({
|
|
3359
3663
|
className,
|
|
3360
3664
|
variant,
|
|
@@ -3366,26 +3670,26 @@ var HeroBlock = React42.forwardRef(
|
|
|
3366
3670
|
actions,
|
|
3367
3671
|
...props
|
|
3368
3672
|
}, ref) => {
|
|
3369
|
-
return /* @__PURE__ */
|
|
3673
|
+
return /* @__PURE__ */ jsx43(
|
|
3370
3674
|
"div",
|
|
3371
3675
|
{
|
|
3372
3676
|
ref,
|
|
3373
3677
|
className: cn(heroBlockVariants({ variant, withPattern }), className),
|
|
3374
3678
|
...props,
|
|
3375
|
-
children: /* @__PURE__ */
|
|
3376
|
-
tagline && /* @__PURE__ */
|
|
3679
|
+
children: /* @__PURE__ */ jsx43("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs23("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
3680
|
+
tagline && /* @__PURE__ */ jsx43(
|
|
3377
3681
|
Badge,
|
|
3378
3682
|
{
|
|
3379
3683
|
variant: "default",
|
|
3380
|
-
icon: TaglineIcon ? /* @__PURE__ */
|
|
3684
|
+
icon: TaglineIcon ? /* @__PURE__ */ jsx43(Icon, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
3381
3685
|
iconGap: 2,
|
|
3382
3686
|
className: "mb-fluid-md",
|
|
3383
3687
|
children: tagline
|
|
3384
3688
|
}
|
|
3385
3689
|
),
|
|
3386
|
-
/* @__PURE__ */
|
|
3387
|
-
/* @__PURE__ */
|
|
3388
|
-
actions && /* @__PURE__ */
|
|
3690
|
+
/* @__PURE__ */ jsx43(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
3691
|
+
/* @__PURE__ */ jsx43(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
3692
|
+
actions && /* @__PURE__ */ jsx43("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
3389
3693
|
] }) })
|
|
3390
3694
|
}
|
|
3391
3695
|
);
|
|
@@ -3395,8 +3699,8 @@ HeroBlock.displayName = "HeroBlock";
|
|
|
3395
3699
|
|
|
3396
3700
|
// src/components/code-block/CodeBlock.tsx
|
|
3397
3701
|
import { useState as useState3, useEffect as useEffect2, useCallback as useCallback3 } from "react";
|
|
3398
|
-
import { Copy, Check as
|
|
3399
|
-
import { jsx as
|
|
3702
|
+
import { Copy, Check as Check4 } from "lucide-react";
|
|
3703
|
+
import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3400
3704
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
3401
3705
|
const [html, setHtml] = useState3(null);
|
|
3402
3706
|
const [copied, setCopied] = useState3(false);
|
|
@@ -3412,16 +3716,16 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
3412
3716
|
setCopied(true);
|
|
3413
3717
|
setTimeout(() => setCopied(false), 2e3);
|
|
3414
3718
|
}, [code]);
|
|
3415
|
-
const copyButton = /* @__PURE__ */
|
|
3719
|
+
const copyButton = /* @__PURE__ */ jsx44(
|
|
3416
3720
|
"button",
|
|
3417
3721
|
{
|
|
3418
3722
|
onClick: handleCopy,
|
|
3419
3723
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
3420
3724
|
"aria-label": "Copy code",
|
|
3421
|
-
children: copied ? /* @__PURE__ */
|
|
3725
|
+
children: copied ? /* @__PURE__ */ jsx44(Check4, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx44(Copy, { className: "w-3.5 h-3.5" })
|
|
3422
3726
|
}
|
|
3423
3727
|
);
|
|
3424
|
-
return /* @__PURE__ */
|
|
3728
|
+
return /* @__PURE__ */ jsxs24(
|
|
3425
3729
|
"div",
|
|
3426
3730
|
{
|
|
3427
3731
|
className: cn(
|
|
@@ -3429,25 +3733,25 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
3429
3733
|
className
|
|
3430
3734
|
),
|
|
3431
3735
|
children: [
|
|
3432
|
-
title && /* @__PURE__ */
|
|
3433
|
-
/* @__PURE__ */
|
|
3434
|
-
html ? /* @__PURE__ */
|
|
3736
|
+
title && /* @__PURE__ */ jsx44("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__ */ jsx44("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
3737
|
+
/* @__PURE__ */ jsx44("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
3738
|
+
html ? /* @__PURE__ */ jsx44(
|
|
3435
3739
|
"div",
|
|
3436
3740
|
{
|
|
3437
3741
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
3438
3742
|
dangerouslySetInnerHTML: { __html: html }
|
|
3439
3743
|
}
|
|
3440
|
-
) : /* @__PURE__ */
|
|
3744
|
+
) : /* @__PURE__ */ jsx44("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ jsx44("code", { children: code }) })
|
|
3441
3745
|
]
|
|
3442
3746
|
}
|
|
3443
3747
|
);
|
|
3444
3748
|
}
|
|
3445
3749
|
|
|
3446
3750
|
// src/components/window-frame/WindowFrame.tsx
|
|
3447
|
-
import * as
|
|
3751
|
+
import * as React29 from "react";
|
|
3448
3752
|
import { useState as useState4 } from "react";
|
|
3449
|
-
import { jsx as
|
|
3450
|
-
var WindowFrame =
|
|
3753
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3754
|
+
var WindowFrame = React29.forwardRef(
|
|
3451
3755
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
3452
3756
|
const [internalActive, setInternalActive] = useState4(tabs?.[0]?.id ?? "");
|
|
3453
3757
|
const currentTab = activeTab ?? internalActive;
|
|
@@ -3458,7 +3762,7 @@ var WindowFrame = React43.forwardRef(
|
|
|
3458
3762
|
setInternalActive(id);
|
|
3459
3763
|
}
|
|
3460
3764
|
};
|
|
3461
|
-
return /* @__PURE__ */
|
|
3765
|
+
return /* @__PURE__ */ jsxs25(
|
|
3462
3766
|
"div",
|
|
3463
3767
|
{
|
|
3464
3768
|
ref,
|
|
@@ -3468,13 +3772,13 @@ var WindowFrame = React43.forwardRef(
|
|
|
3468
3772
|
),
|
|
3469
3773
|
...props,
|
|
3470
3774
|
children: [
|
|
3471
|
-
/* @__PURE__ */
|
|
3472
|
-
/* @__PURE__ */
|
|
3473
|
-
/* @__PURE__ */
|
|
3474
|
-
/* @__PURE__ */
|
|
3475
|
-
/* @__PURE__ */
|
|
3775
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
3776
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
3777
|
+
/* @__PURE__ */ jsx45("div", { className: "w-3 h-3 rounded-full bg-[#FF5F56]" }),
|
|
3778
|
+
/* @__PURE__ */ jsx45("div", { className: "w-3 h-3 rounded-full bg-[#FFBD2E]" }),
|
|
3779
|
+
/* @__PURE__ */ jsx45("div", { className: "w-3 h-3 rounded-full bg-[#27C93F]" })
|
|
3476
3780
|
] }),
|
|
3477
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */
|
|
3781
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ jsx45("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsx45(
|
|
3478
3782
|
"button",
|
|
3479
3783
|
{
|
|
3480
3784
|
type: "button",
|
|
@@ -3486,15 +3790,333 @@ var WindowFrame = React43.forwardRef(
|
|
|
3486
3790
|
children: tab.label
|
|
3487
3791
|
},
|
|
3488
3792
|
tab.id
|
|
3489
|
-
)) }) : /* @__PURE__ */
|
|
3793
|
+
)) }) : /* @__PURE__ */ jsx45("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
3490
3794
|
] }),
|
|
3491
|
-
/* @__PURE__ */
|
|
3795
|
+
/* @__PURE__ */ jsx45("div", { children })
|
|
3492
3796
|
]
|
|
3493
3797
|
}
|
|
3494
3798
|
);
|
|
3495
3799
|
}
|
|
3496
3800
|
);
|
|
3497
3801
|
WindowFrame.displayName = "WindowFrame";
|
|
3802
|
+
|
|
3803
|
+
// src/components/fog-illustration/FogIllustration.tsx
|
|
3804
|
+
import { useEffect as useEffect3, useRef } from "react";
|
|
3805
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3806
|
+
var FOG_BRAND_PALETTE = {
|
|
3807
|
+
ink: "#171a1a",
|
|
3808
|
+
milk: "#f7f5ed",
|
|
3809
|
+
moss: "#598c6b"
|
|
3810
|
+
};
|
|
3811
|
+
var hexToRgb = (hex) => {
|
|
3812
|
+
let h = hex.replace("#", "");
|
|
3813
|
+
if (h.length === 3)
|
|
3814
|
+
h = h.split("").map((c) => c + c).join("");
|
|
3815
|
+
const n = Number.parseInt(h, 16);
|
|
3816
|
+
return [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255];
|
|
3817
|
+
};
|
|
3818
|
+
var hexToRgbAll = (p) => ({
|
|
3819
|
+
ink: hexToRgb(p.ink),
|
|
3820
|
+
milk: hexToRgb(p.milk),
|
|
3821
|
+
moss: hexToRgb(p.moss)
|
|
3822
|
+
});
|
|
3823
|
+
var VERT = `#version 300 es
|
|
3824
|
+
void main() {
|
|
3825
|
+
vec2 p = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2));
|
|
3826
|
+
gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0);
|
|
3827
|
+
}`;
|
|
3828
|
+
var SCENE_FRAG = `#version 300 es
|
|
3829
|
+
precision highp float;
|
|
3830
|
+
out vec4 outColor;
|
|
3831
|
+
uniform vec2 uRes;
|
|
3832
|
+
uniform float uTime;
|
|
3833
|
+
uniform sampler2D uNoise;
|
|
3834
|
+
|
|
3835
|
+
float noise(vec3 x) {
|
|
3836
|
+
// 3D value noise from the 2D random texture \u2014 iq's two-slice trick:
|
|
3837
|
+
// z slices are tiled into the u axis, two neighbours mixed by fract(z).
|
|
3838
|
+
vec3 p = floor(x), f = fract(x);
|
|
3839
|
+
f = f * f * (3.0 - 2.0 * f);
|
|
3840
|
+
vec2 uv = (p.xy + vec2(37.0, 239.0) * p.z) + f.xy;
|
|
3841
|
+
vec2 rg = texture(uNoise, (uv + 0.5) / 256.0).xy;
|
|
3842
|
+
return mix(rg.x, rg.y, f.z) * 2.0 - 1.0;
|
|
3843
|
+
}
|
|
3844
|
+
|
|
3845
|
+
float ground(vec3 pos, int oct) {
|
|
3846
|
+
float f = 0.0;
|
|
3847
|
+
float s = 1.4;
|
|
3848
|
+
vec3 p = pos * s * 0.1;
|
|
3849
|
+
for (int i = 0; i < 6; i++) {
|
|
3850
|
+
if (i >= oct) break;
|
|
3851
|
+
f += abs(noise(p)) * s;
|
|
3852
|
+
p = vec3(p.z * 5.0, p.xy * 3.0 + p.yx * 4.0 * vec2(1, -1)) * 2.0 / 5.0;
|
|
3853
|
+
s /= 2.0;
|
|
3854
|
+
}
|
|
3855
|
+
return (pos.y + f) * 0.8;
|
|
3856
|
+
}
|
|
3857
|
+
|
|
3858
|
+
float fogD(vec3 pos, int oct) {
|
|
3859
|
+
float f = 0.0;
|
|
3860
|
+
float s = 1.0;
|
|
3861
|
+
vec3 p = pos * 0.7;
|
|
3862
|
+
p += uTime * vec3(0.0, -0.02, 0.02);
|
|
3863
|
+
for (int i = 0; i < 6; i++) {
|
|
3864
|
+
if (i >= oct) break;
|
|
3865
|
+
f += noise(p) * s;
|
|
3866
|
+
p = vec3(p.z * 5.0, p.xy * 3.0 + p.yx * 4.0 * vec2(1, -1)) * 2.0 / 5.0;
|
|
3867
|
+
s /= 1.7;
|
|
3868
|
+
}
|
|
3869
|
+
f += smoothstep(0.2, 0.0, abs(pos.y + 1.0)) * 0.4;
|
|
3870
|
+
f += smoothstep(0.35, 0.15, abs(pos.y - 0.02)) * 0.7;
|
|
3871
|
+
f *= 1.0 - smoothstep(-0.1, 0.55, pos.y);
|
|
3872
|
+
f = smoothstep(0.45, 1.7, f);
|
|
3873
|
+
float g = ground(pos, 2);
|
|
3874
|
+
f *= 1.0 - g / (abs(g) + 0.04);
|
|
3875
|
+
return f;
|
|
3876
|
+
}
|
|
3877
|
+
|
|
3878
|
+
float airD(vec3 pos) { return exp2(-pos.y / 5.0 - 3.0); }
|
|
3879
|
+
|
|
3880
|
+
void main() {
|
|
3881
|
+
float time = uTime * 0.2;
|
|
3882
|
+
vec3 velocity = vec3(1.0, 0.0, 0.0);
|
|
3883
|
+
vec3 camPos = vec3(sin(time * 0.618) * 0.4, 0.62 + 0.08 * sin(time), 0.0) + time * velocity;
|
|
3884
|
+
vec3 camLook = vec3(-1.0, -0.3, 4.0) + (time - sin(time)) * velocity;
|
|
3885
|
+
|
|
3886
|
+
vec2 fc = gl_FragCoord.xy;
|
|
3887
|
+
vec3 ray = vec3((fc - uRes * 0.5) / uRes.x, 1.0);
|
|
3888
|
+
vec3 camDir = normalize(camLook - camPos);
|
|
3889
|
+
vec3 camRight = normalize(cross(vec3(0.0, 1.0, 0.0), camDir));
|
|
3890
|
+
vec3 camUp = cross(camDir, camRight);
|
|
3891
|
+
ray = normalize(ray.x * camRight + ray.y * camUp + ray.z * camDir);
|
|
3892
|
+
|
|
3893
|
+
vec3 sunDir = normalize(vec3(-3.0, 2.0, 1.0));
|
|
3894
|
+
|
|
3895
|
+
vec3 pos = camPos;
|
|
3896
|
+
float absorption = 1.0;
|
|
3897
|
+
float emission = 0.0;
|
|
3898
|
+
float fogFactor = 0.0;
|
|
3899
|
+
float lastStride = 0.0;
|
|
3900
|
+
float lastFog = 0.0;
|
|
3901
|
+
float lastAir = 0.0;
|
|
3902
|
+
|
|
3903
|
+
for (int i = 0; i < 80; i++) {
|
|
3904
|
+
float h = ground(pos, 4);
|
|
3905
|
+
float fog = fogD(pos, 3);
|
|
3906
|
+
float fogIntegral = lastStride * mix(fog, lastFog, 0.5);
|
|
3907
|
+
float air = airD(pos);
|
|
3908
|
+
float airIntegral = lastStride * mix(air, lastAir, 0.5);
|
|
3909
|
+
|
|
3910
|
+
float fogAbsDelta = pow(0.1, fogIntegral);
|
|
3911
|
+
float fogEmiDelta = 1.0 - fogAbsDelta;
|
|
3912
|
+
float shadowStep = 0.07;
|
|
3913
|
+
float shadow = (fog - fogD(pos + sunDir * shadowStep, 2)) / shadowStep;
|
|
3914
|
+
fogEmiDelta *= mix(0.2, 0.85, smoothstep(-1.0, 1.0, shadow));
|
|
3915
|
+
|
|
3916
|
+
float airAbsDelta = pow(0.55, airIntegral);
|
|
3917
|
+
float airEmiDelta = (1.0 - pow(0.55, airIntegral)) * 0.5;
|
|
3918
|
+
|
|
3919
|
+
float absDelta = fogAbsDelta * airAbsDelta;
|
|
3920
|
+
emission += absorption * sqrt(absDelta) * (fogEmiDelta + airEmiDelta);
|
|
3921
|
+
absorption *= absDelta;
|
|
3922
|
+
|
|
3923
|
+
fogFactor = max(fogFactor, (1.0 - absorption) * step(0.05, fog));
|
|
3924
|
+
|
|
3925
|
+
lastFog = fog;
|
|
3926
|
+
lastAir = air;
|
|
3927
|
+
h = min(h, 0.1);
|
|
3928
|
+
lastStride = h;
|
|
3929
|
+
pos += h * ray;
|
|
3930
|
+
if (h < 0.001) break;
|
|
3931
|
+
}
|
|
3932
|
+
|
|
3933
|
+
float brightness;
|
|
3934
|
+
if (absorption > 0.02) {
|
|
3935
|
+
// terrain visible \u2014 light it
|
|
3936
|
+
vec2 d = vec2(-1.0, 1.0) * 0.02;
|
|
3937
|
+
vec3 normal = normalize(
|
|
3938
|
+
ground(pos + d.xxx, 5) * d.xxx +
|
|
3939
|
+
ground(pos + d.xyy, 5) * d.xyy +
|
|
3940
|
+
ground(pos + d.yxy, 5) * d.yxy +
|
|
3941
|
+
ground(pos + d.yyx, 5) * d.yyx
|
|
3942
|
+
);
|
|
3943
|
+
float ao = smoothstep(-0.2, 1.5, ground(pos + normal * 0.3, 5) / 0.3);
|
|
3944
|
+
float shade = (0.5 * ao + 0.5 * max(dot(normal, sunDir), 0.0)) * 0.65;
|
|
3945
|
+
brightness = shade * absorption + emission;
|
|
3946
|
+
} else {
|
|
3947
|
+
brightness = emission;
|
|
3948
|
+
}
|
|
3949
|
+
|
|
3950
|
+
// Clear sky \u2014 rays that escape upward land on milk, whatever the
|
|
3951
|
+
// haze did. The poster look: light sky, dark ridges, fog between.
|
|
3952
|
+
float sky = smoothstep(-0.15, 0.35, ray.y) * 0.92;
|
|
3953
|
+
brightness = max(brightness, sky * absorption);
|
|
3954
|
+
|
|
3955
|
+
outColor = vec4(clamp(brightness, 0.0, 1.0), clamp(fogFactor, 0.0, 1.0), 0.0, 1.0);
|
|
3956
|
+
}`;
|
|
3957
|
+
var DITHER_FRAG = `#version 300 es
|
|
3958
|
+
precision highp float;
|
|
3959
|
+
out vec4 outColor;
|
|
3960
|
+
uniform vec2 uRes;
|
|
3961
|
+
uniform float uDot;
|
|
3962
|
+
uniform sampler2D uScene;
|
|
3963
|
+
uniform vec3 uInk;
|
|
3964
|
+
uniform vec3 uMilk;
|
|
3965
|
+
uniform vec3 uMoss;
|
|
3966
|
+
|
|
3967
|
+
float bayer2(vec2 a) { a = floor(a); return fract(a.x / 2.0 + a.y * a.y * 0.75); }
|
|
3968
|
+
float bayer4(vec2 a) { return bayer2(0.5 * a) * 0.25 + bayer2(a); }
|
|
3969
|
+
float hash12(vec2 p) {
|
|
3970
|
+
vec3 p3 = fract(vec3(p.xyx) * 0.1031);
|
|
3971
|
+
p3 += dot(p3, p3.yzx + 33.33);
|
|
3972
|
+
return fract((p3.x + p3.y) * p3.z);
|
|
3973
|
+
}
|
|
3974
|
+
|
|
3975
|
+
void main() {
|
|
3976
|
+
// Chunky cells: one dot decision per uDot\xD7uDot block \u2014 the dither
|
|
3977
|
+
// reads as visible pixels, not 1px noise.
|
|
3978
|
+
vec2 cell = floor(gl_FragCoord.xy / uDot);
|
|
3979
|
+
vec4 scene = texture(uScene, (cell * uDot + uDot * 0.5) / uRes);
|
|
3980
|
+
float darkness = 1.0 - scene.r;
|
|
3981
|
+
float jitter = (hash12(cell) - 0.5) * 0.3;
|
|
3982
|
+
float on = step(darkness, bayer4(cell) + jitter);
|
|
3983
|
+
vec3 col = scene.g > 0.5 ? uMoss : uInk;
|
|
3984
|
+
outColor = vec4(mix(col, uMilk, on), 1.0);
|
|
3985
|
+
}`;
|
|
3986
|
+
var compile = (gl, type, src) => {
|
|
3987
|
+
const sh = gl.createShader(type);
|
|
3988
|
+
if (!sh) throw new Error("shader creation failed");
|
|
3989
|
+
gl.shaderSource(sh, src);
|
|
3990
|
+
gl.compileShader(sh);
|
|
3991
|
+
if (!gl.getShaderParameter(sh, gl.COMPILE_STATUS)) {
|
|
3992
|
+
throw new Error(gl.getShaderInfoLog(sh) || "shader compile failed");
|
|
3993
|
+
}
|
|
3994
|
+
return sh;
|
|
3995
|
+
};
|
|
3996
|
+
var program = (gl, frag) => {
|
|
3997
|
+
const p = gl.createProgram();
|
|
3998
|
+
if (!p) throw new Error("program creation failed");
|
|
3999
|
+
gl.attachShader(p, compile(gl, gl.VERTEX_SHADER, VERT));
|
|
4000
|
+
gl.attachShader(p, compile(gl, gl.FRAGMENT_SHADER, frag));
|
|
4001
|
+
gl.linkProgram(p);
|
|
4002
|
+
if (!gl.getProgramParameter(p, gl.LINK_STATUS)) {
|
|
4003
|
+
throw new Error(gl.getProgramInfoLog(p) || "program link failed");
|
|
4004
|
+
}
|
|
4005
|
+
return p;
|
|
4006
|
+
};
|
|
4007
|
+
var FogIllustration = ({ palette, speed = 1, className }) => {
|
|
4008
|
+
const ref = useRef(null);
|
|
4009
|
+
const live = useRef({ palette: { ...FOG_BRAND_PALETTE, ...palette }, speed });
|
|
4010
|
+
live.current = { palette: { ...FOG_BRAND_PALETTE, ...palette }, speed };
|
|
4011
|
+
useEffect3(() => {
|
|
4012
|
+
const canvas = ref.current;
|
|
4013
|
+
const parent = canvas?.parentElement;
|
|
4014
|
+
if (!canvas || !parent) return;
|
|
4015
|
+
const gl = canvas.getContext("webgl2", {
|
|
4016
|
+
antialias: false,
|
|
4017
|
+
alpha: false,
|
|
4018
|
+
preserveDrawingBuffer: true
|
|
4019
|
+
});
|
|
4020
|
+
if (!gl) return;
|
|
4021
|
+
let sceneProg;
|
|
4022
|
+
let ditherProg;
|
|
4023
|
+
try {
|
|
4024
|
+
sceneProg = program(gl, SCENE_FRAG);
|
|
4025
|
+
ditherProg = program(gl, DITHER_FRAG);
|
|
4026
|
+
} catch (err) {
|
|
4027
|
+
console.error("fog shader failed:", err);
|
|
4028
|
+
return;
|
|
4029
|
+
}
|
|
4030
|
+
const noiseTex = gl.createTexture();
|
|
4031
|
+
gl.bindTexture(gl.TEXTURE_2D, noiseTex);
|
|
4032
|
+
const N = 256;
|
|
4033
|
+
const data = new Uint8Array(N * N * 4);
|
|
4034
|
+
for (let i = 0; i < data.length; i += 4) {
|
|
4035
|
+
data[i] = Math.random() * 256;
|
|
4036
|
+
data[i + 1] = Math.random() * 256;
|
|
4037
|
+
data[i + 2] = Math.random() * 256;
|
|
4038
|
+
data[i + 3] = 255;
|
|
4039
|
+
}
|
|
4040
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, N, N, 0, gl.RGBA, gl.UNSIGNED_BYTE, data);
|
|
4041
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
|
|
4042
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
|
|
4043
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
|
4044
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
4045
|
+
const sceneTex = gl.createTexture();
|
|
4046
|
+
gl.bindTexture(gl.TEXTURE_2D, sceneTex);
|
|
4047
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
4048
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
4049
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
4050
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
4051
|
+
const fbo = gl.createFramebuffer();
|
|
4052
|
+
const SCALE = 0.3;
|
|
4053
|
+
const reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
4054
|
+
const start = performance.now();
|
|
4055
|
+
let raf = 0;
|
|
4056
|
+
let last = 0;
|
|
4057
|
+
const render = (elapsed) => {
|
|
4058
|
+
const w = parent.clientWidth;
|
|
4059
|
+
const h = parent.clientHeight;
|
|
4060
|
+
if (w === 0 || h === 0) return;
|
|
4061
|
+
const dpr = Math.min(window.devicePixelRatio || 1, 2);
|
|
4062
|
+
if (canvas.width !== Math.round(w * dpr) || canvas.height !== Math.round(h * dpr)) {
|
|
4063
|
+
canvas.width = Math.round(w * dpr);
|
|
4064
|
+
canvas.height = Math.round(h * dpr);
|
|
4065
|
+
}
|
|
4066
|
+
const sceneW = Math.max(64, Math.round(w * SCALE));
|
|
4067
|
+
const sceneH = Math.max(64, Math.round(h * SCALE));
|
|
4068
|
+
gl.bindTexture(gl.TEXTURE_2D, sceneTex);
|
|
4069
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, sceneW, sceneH, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
|
|
4070
|
+
const t = elapsed * live.current.speed;
|
|
4071
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
|
|
4072
|
+
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, sceneTex, 0);
|
|
4073
|
+
gl.viewport(0, 0, sceneW, sceneH);
|
|
4074
|
+
gl.useProgram(sceneProg);
|
|
4075
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
4076
|
+
gl.bindTexture(gl.TEXTURE_2D, noiseTex);
|
|
4077
|
+
gl.uniform1i(gl.getUniformLocation(sceneProg, "uNoise"), 0);
|
|
4078
|
+
gl.uniform2f(gl.getUniformLocation(sceneProg, "uRes"), sceneW, sceneH);
|
|
4079
|
+
gl.uniform1f(gl.getUniformLocation(sceneProg, "uTime"), t);
|
|
4080
|
+
gl.drawArrays(gl.TRIANGLES, 0, 3);
|
|
4081
|
+
const { ink, milk, moss } = hexToRgbAll(live.current.palette);
|
|
4082
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
4083
|
+
gl.viewport(0, 0, canvas.width, canvas.height);
|
|
4084
|
+
gl.useProgram(ditherProg);
|
|
4085
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
4086
|
+
gl.bindTexture(gl.TEXTURE_2D, sceneTex);
|
|
4087
|
+
gl.uniform1i(gl.getUniformLocation(ditherProg, "uScene"), 0);
|
|
4088
|
+
gl.uniform2f(gl.getUniformLocation(ditherProg, "uRes"), canvas.width, canvas.height);
|
|
4089
|
+
gl.uniform1f(gl.getUniformLocation(ditherProg, "uDot"), Math.max(3, Math.round(dpr * 2)));
|
|
4090
|
+
gl.uniform3f(gl.getUniformLocation(ditherProg, "uInk"), ...ink);
|
|
4091
|
+
gl.uniform3f(gl.getUniformLocation(ditherProg, "uMilk"), ...milk);
|
|
4092
|
+
gl.uniform3f(gl.getUniformLocation(ditherProg, "uMoss"), ...moss);
|
|
4093
|
+
gl.drawArrays(gl.TRIANGLES, 0, 3);
|
|
4094
|
+
};
|
|
4095
|
+
render(0);
|
|
4096
|
+
if (!reduced) {
|
|
4097
|
+
const frame = (now) => {
|
|
4098
|
+
if (now - last >= 1e3 / 30) {
|
|
4099
|
+
last = now;
|
|
4100
|
+
render((now - start) / 1e3);
|
|
4101
|
+
}
|
|
4102
|
+
raf = requestAnimationFrame(frame);
|
|
4103
|
+
};
|
|
4104
|
+
raf = requestAnimationFrame(frame);
|
|
4105
|
+
}
|
|
4106
|
+
const observer = new ResizeObserver(() => render((performance.now() - start) / 1e3));
|
|
4107
|
+
observer.observe(parent);
|
|
4108
|
+
return () => {
|
|
4109
|
+
cancelAnimationFrame(raf);
|
|
4110
|
+
observer.disconnect();
|
|
4111
|
+
gl.deleteProgram(sceneProg);
|
|
4112
|
+
gl.deleteProgram(ditherProg);
|
|
4113
|
+
gl.deleteTexture(noiseTex);
|
|
4114
|
+
gl.deleteTexture(sceneTex);
|
|
4115
|
+
gl.deleteFramebuffer(fbo);
|
|
4116
|
+
};
|
|
4117
|
+
}, []);
|
|
4118
|
+
return /* @__PURE__ */ jsx46("canvas", { ref, "aria-hidden": "true", className: cn("size-full", className) });
|
|
4119
|
+
};
|
|
3498
4120
|
export {
|
|
3499
4121
|
Alert2 as Alert,
|
|
3500
4122
|
AlertDescription,
|
|
@@ -3551,6 +4173,7 @@ export {
|
|
|
3551
4173
|
DropdownMenuSubTrigger,
|
|
3552
4174
|
DropdownMenuTrigger,
|
|
3553
4175
|
EU_COUNTRY_CODES,
|
|
4176
|
+
FOG_BRAND_PALETTE,
|
|
3554
4177
|
FeatureList,
|
|
3555
4178
|
Field,
|
|
3556
4179
|
FieldContent,
|
|
@@ -3562,6 +4185,7 @@ export {
|
|
|
3562
4185
|
FieldSeparator,
|
|
3563
4186
|
FieldSet,
|
|
3564
4187
|
FieldTitle,
|
|
4188
|
+
FogIllustration,
|
|
3565
4189
|
Grid,
|
|
3566
4190
|
HeroBlock,
|
|
3567
4191
|
Icon,
|
|
@@ -3588,8 +4212,8 @@ export {
|
|
|
3588
4212
|
NavigationMenuItem,
|
|
3589
4213
|
NavigationMenuLink,
|
|
3590
4214
|
NavigationMenuList,
|
|
4215
|
+
NavigationMenuPositioner,
|
|
3591
4216
|
NavigationMenuTrigger,
|
|
3592
|
-
NavigationMenuViewport,
|
|
3593
4217
|
Select2 as Select,
|
|
3594
4218
|
Switch,
|
|
3595
4219
|
Table2 as Table,
|
|
@@ -3617,7 +4241,7 @@ export {
|
|
|
3617
4241
|
gridVariants,
|
|
3618
4242
|
isEUCountry,
|
|
3619
4243
|
linkVariants,
|
|
3620
|
-
navigationMenuTriggerStyle,
|
|
4244
|
+
navigationMenuTriggerStyle2 as navigationMenuTriggerStyle,
|
|
3621
4245
|
selectVariants,
|
|
3622
4246
|
switchRootVariants,
|
|
3623
4247
|
switchThumbVariants,
|