@bergetai/ui 0.1.83 → 0.1.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +305 -310
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +287 -292
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -197,31 +197,34 @@ var ThemeToggle = React2.forwardRef(
|
|
|
197
197
|
ThemeToggle.displayName = "ThemeToggle";
|
|
198
198
|
|
|
199
199
|
// src/components/button/Button.tsx
|
|
200
|
-
import * as
|
|
201
|
-
import { cva as cva2 } from "class-variance-authority";
|
|
200
|
+
import * as React4 from "react";
|
|
202
201
|
|
|
203
202
|
// src/primitives/button.tsx
|
|
204
203
|
import * as React3 from "react";
|
|
205
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
206
204
|
import { cva } from "class-variance-authority";
|
|
205
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
207
206
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
208
207
|
var buttonVariants = cva(
|
|
209
|
-
"inline-flex items-center justify-center gap-2
|
|
208
|
+
"inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
210
209
|
{
|
|
211
210
|
variants: {
|
|
212
211
|
variant: {
|
|
213
212
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
214
|
-
destructive: "bg-destructive text-destructive-
|
|
215
|
-
outline: "border
|
|
213
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
214
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
216
215
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
217
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
216
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
218
217
|
link: "text-primary underline-offset-4 hover:underline"
|
|
219
218
|
},
|
|
220
219
|
size: {
|
|
221
|
-
default: "h-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
221
|
+
xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
222
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
223
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
224
|
+
icon: "size-9",
|
|
225
|
+
"icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
226
|
+
"icon-sm": "size-8",
|
|
227
|
+
"icon-lg": "size-10"
|
|
225
228
|
}
|
|
226
229
|
},
|
|
227
230
|
defaultVariants: {
|
|
@@ -238,92 +241,64 @@ var Button = React3.forwardRef(
|
|
|
238
241
|
);
|
|
239
242
|
Button.displayName = "Button";
|
|
240
243
|
|
|
241
|
-
// src/components/icon/Icon.tsx
|
|
242
|
-
import * as React4 from "react";
|
|
243
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
244
|
-
var iconStrokeMap = {
|
|
245
|
-
16: 1.4,
|
|
246
|
-
24: 1.6,
|
|
247
|
-
32: 1.8
|
|
248
|
-
};
|
|
249
|
-
var Icon = React4.forwardRef(
|
|
250
|
-
({
|
|
251
|
-
icon: IconComponent,
|
|
252
|
-
size,
|
|
253
|
-
className,
|
|
254
|
-
"aria-label": ariaLabel,
|
|
255
|
-
"aria-hidden": ariaHidden = true,
|
|
256
|
-
...props
|
|
257
|
-
}, ref) => {
|
|
258
|
-
const strokeWidth = iconStrokeMap[size];
|
|
259
|
-
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
260
|
-
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
261
|
-
return /* @__PURE__ */ jsx4(
|
|
262
|
-
IconComponent,
|
|
263
|
-
{
|
|
264
|
-
ref,
|
|
265
|
-
className: cn(sizeClass, className),
|
|
266
|
-
strokeWidth,
|
|
267
|
-
...ariaAttributes,
|
|
268
|
-
...props
|
|
269
|
-
}
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
);
|
|
273
|
-
Icon.displayName = "Icon";
|
|
274
|
-
|
|
275
244
|
// src/components/button/Button.tsx
|
|
276
245
|
import { Loader2 } from "lucide-react";
|
|
277
|
-
import { Fragment, jsx as
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
},
|
|
296
|
-
width: {
|
|
297
|
-
default: "w-auto",
|
|
298
|
-
full: "w-full"
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
defaultVariants: {
|
|
302
|
-
variant: "default",
|
|
303
|
-
size: "default",
|
|
304
|
-
width: "default"
|
|
305
|
-
}
|
|
246
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
247
|
+
function brandVariantClasses(variant) {
|
|
248
|
+
switch (variant) {
|
|
249
|
+
case "primary":
|
|
250
|
+
return "bg-berget-button-primary-bg text-berget-button-primary-fg shadow-lg hover:bg-berget-button-primary-bg/90 hover:shadow-xl";
|
|
251
|
+
case "secondary":
|
|
252
|
+
return "bg-berget-button-secondary-bg text-berget-button-secondary-fg shadow hover:bg-berget-button-secondary-bg/80 hover:shadow-lg";
|
|
253
|
+
case "destructive":
|
|
254
|
+
return "bg-berget-button-destructive-bg text-berget-button-destructive-fg shadow-sm hover:bg-berget-button-destructive-bg/80 hover:shadow";
|
|
255
|
+
case "outline":
|
|
256
|
+
return "border-berget-border-interactive bg-transparent text-berget-foreground hover:bg-berget-surface-hover hover:text-berget-foreground hover:border-berget-border-interactive-elevated";
|
|
257
|
+
case "ghost":
|
|
258
|
+
return "bg-transparent text-berget-foreground hover:bg-berget-brand-granite-800 hover:text-berget-foreground";
|
|
259
|
+
case "link":
|
|
260
|
+
return "bg-transparent hover:bg-transparent focus:bg-transparent active:bg-transparent text-berget-button-link-fg underline-offset-4 hover:underline";
|
|
261
|
+
case "default":
|
|
262
|
+
default:
|
|
263
|
+
return "bg-berget-button-default-bg text-berget-button-default-fg shadow-lg hover:bg-berget-button-default-bg/90 hover:shadow-xl";
|
|
306
264
|
}
|
|
307
|
-
|
|
308
|
-
|
|
265
|
+
}
|
|
266
|
+
function primitiveVariant(variant) {
|
|
267
|
+
switch (variant) {
|
|
268
|
+
case "primary":
|
|
269
|
+
return "ghost";
|
|
270
|
+
default:
|
|
271
|
+
return variant;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
var Button2 = React4.forwardRef(
|
|
309
275
|
({
|
|
310
276
|
className,
|
|
311
|
-
variant,
|
|
277
|
+
variant = "default",
|
|
312
278
|
size,
|
|
313
|
-
width,
|
|
314
279
|
asChild = false,
|
|
315
280
|
isLoading = false,
|
|
281
|
+
width = "default",
|
|
316
282
|
type = "button",
|
|
317
283
|
children,
|
|
318
284
|
...props
|
|
319
285
|
}, ref) => {
|
|
320
|
-
const
|
|
321
|
-
const
|
|
286
|
+
const isIcon = typeof size === "string" && size.startsWith("icon");
|
|
287
|
+
const isLink = variant === "link";
|
|
288
|
+
const baseClass = cn(
|
|
289
|
+
!isLink && buttonVariants({ variant: primitiveVariant(variant), size }),
|
|
290
|
+
// Berget brand overrides
|
|
291
|
+
!isLink && "rounded-full",
|
|
292
|
+
brandVariantClasses(variant),
|
|
293
|
+
!isLink && width === "full" && "w-full",
|
|
294
|
+
isIcon && "rounded-full shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]",
|
|
295
|
+
className
|
|
296
|
+
);
|
|
322
297
|
if (asChild) {
|
|
323
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ jsx4(
|
|
324
299
|
Button,
|
|
325
300
|
{
|
|
326
|
-
className:
|
|
301
|
+
className: baseClass,
|
|
327
302
|
ref,
|
|
328
303
|
asChild: true,
|
|
329
304
|
type,
|
|
@@ -334,35 +309,19 @@ var Button2 = React5.forwardRef(
|
|
|
334
309
|
}
|
|
335
310
|
);
|
|
336
311
|
}
|
|
337
|
-
return /* @__PURE__ */
|
|
312
|
+
return /* @__PURE__ */ jsx4(
|
|
338
313
|
Button,
|
|
339
314
|
{
|
|
340
|
-
className:
|
|
315
|
+
className: baseClass,
|
|
341
316
|
ref,
|
|
342
317
|
type,
|
|
343
318
|
"aria-disabled": isLoading || void 0,
|
|
344
319
|
"aria-busy": isLoading || void 0,
|
|
345
320
|
...props,
|
|
346
|
-
children: [
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
] }),
|
|
351
|
-
/* @__PURE__ */ jsx5(
|
|
352
|
-
"span",
|
|
353
|
-
{
|
|
354
|
-
className: cn(
|
|
355
|
-
"inline-flex items-center",
|
|
356
|
-
!isIcon && "gap-2",
|
|
357
|
-
isHighlight && "relative z-10"
|
|
358
|
-
),
|
|
359
|
-
children: isLoading ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
360
|
-
/* @__PURE__ */ jsx5(Icon, { icon: Loader2, size: 16, className: "animate-spin", "aria-hidden": true }),
|
|
361
|
-
!isIcon && children
|
|
362
|
-
] }) : children
|
|
363
|
-
}
|
|
364
|
-
)
|
|
365
|
-
]
|
|
321
|
+
children: /* @__PURE__ */ jsx4("span", { className: cn("inline-flex items-center", !isIcon && "gap-2"), children: isLoading ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
322
|
+
/* @__PURE__ */ jsx4(Loader2, { className: "animate-spin", size: 16, "aria-hidden": "true" }),
|
|
323
|
+
!isIcon && children
|
|
324
|
+
] }) : children })
|
|
366
325
|
}
|
|
367
326
|
);
|
|
368
327
|
}
|
|
@@ -370,10 +329,10 @@ var Button2 = React5.forwardRef(
|
|
|
370
329
|
Button2.displayName = "Button";
|
|
371
330
|
|
|
372
331
|
// src/components/typography/Typography.tsx
|
|
373
|
-
import * as
|
|
374
|
-
import { cva as
|
|
375
|
-
import { jsx as
|
|
376
|
-
var typographyVariants =
|
|
332
|
+
import * as React5 from "react";
|
|
333
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
334
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
335
|
+
var typographyVariants = cva2("", {
|
|
377
336
|
variants: {
|
|
378
337
|
variant: {
|
|
379
338
|
// Fluid heading scale — use @theme tokens (clamp-based, 390px → 1440px)
|
|
@@ -417,10 +376,10 @@ var defaultElementMap = {
|
|
|
417
376
|
mono: "p",
|
|
418
377
|
code: "span"
|
|
419
378
|
};
|
|
420
|
-
var Typography =
|
|
379
|
+
var Typography = React5.forwardRef(
|
|
421
380
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
422
381
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
423
|
-
return /* @__PURE__ */
|
|
382
|
+
return /* @__PURE__ */ jsx5(
|
|
424
383
|
Component,
|
|
425
384
|
{
|
|
426
385
|
className: cn(typographyVariants({ variant, color }), className),
|
|
@@ -434,14 +393,14 @@ var Typography = React6.forwardRef(
|
|
|
434
393
|
Typography.displayName = "Typography";
|
|
435
394
|
|
|
436
395
|
// src/components/card/Card.tsx
|
|
437
|
-
import * as
|
|
438
|
-
import { cva as
|
|
396
|
+
import * as React7 from "react";
|
|
397
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
439
398
|
|
|
440
399
|
// src/primitives/card.tsx
|
|
441
|
-
import * as
|
|
442
|
-
import { jsx as
|
|
443
|
-
var Card =
|
|
444
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
400
|
+
import * as React6 from "react";
|
|
401
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
402
|
+
var Card = React6.forwardRef(
|
|
403
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
445
404
|
"div",
|
|
446
405
|
{
|
|
447
406
|
ref,
|
|
@@ -451,30 +410,30 @@ var Card = React7.forwardRef(
|
|
|
451
410
|
)
|
|
452
411
|
);
|
|
453
412
|
Card.displayName = "Card";
|
|
454
|
-
var CardHeader =
|
|
455
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
413
|
+
var CardHeader = React6.forwardRef(
|
|
414
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
|
|
456
415
|
);
|
|
457
416
|
CardHeader.displayName = "CardHeader";
|
|
458
|
-
var CardTitle =
|
|
459
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
417
|
+
var CardTitle = React6.forwardRef(
|
|
418
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("h2", { ref, className: cn("text-2xl leading-none tracking-tight", className), ...props })
|
|
460
419
|
);
|
|
461
420
|
CardTitle.displayName = "CardTitle";
|
|
462
|
-
var CardDescription =
|
|
463
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
421
|
+
var CardDescription = React6.forwardRef(
|
|
422
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("text-sm text-muted-foreground", className), ...props })
|
|
464
423
|
);
|
|
465
424
|
CardDescription.displayName = "CardDescription";
|
|
466
|
-
var CardContent =
|
|
467
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
425
|
+
var CardContent = React6.forwardRef(
|
|
426
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("p-6 pt-0", className), ...props })
|
|
468
427
|
);
|
|
469
428
|
CardContent.displayName = "CardContent";
|
|
470
|
-
var CardFooter =
|
|
471
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
429
|
+
var CardFooter = React6.forwardRef(
|
|
430
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx6("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
|
|
472
431
|
);
|
|
473
432
|
CardFooter.displayName = "CardFooter";
|
|
474
433
|
|
|
475
434
|
// src/components/card/Card.tsx
|
|
476
|
-
import { jsx as
|
|
477
|
-
var cardVariants =
|
|
435
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
436
|
+
var cardVariants = cva3("rounded-berget-sm", {
|
|
478
437
|
variants: {
|
|
479
438
|
variant: {
|
|
480
439
|
outlined: "bg-transparent border border-berget-border",
|
|
@@ -492,9 +451,9 @@ var cardVariants = cva4("rounded-berget-sm", {
|
|
|
492
451
|
padding: "md"
|
|
493
452
|
}
|
|
494
453
|
});
|
|
495
|
-
var Card2 =
|
|
454
|
+
var Card2 = React7.forwardRef(
|
|
496
455
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
497
|
-
return /* @__PURE__ */
|
|
456
|
+
return /* @__PURE__ */ jsx7(
|
|
498
457
|
Card,
|
|
499
458
|
{
|
|
500
459
|
ref,
|
|
@@ -508,10 +467,10 @@ var Card2 = React8.forwardRef(
|
|
|
508
467
|
Card2.displayName = "Card";
|
|
509
468
|
|
|
510
469
|
// src/components/badge/Badge.tsx
|
|
511
|
-
import * as
|
|
512
|
-
import { cva as
|
|
513
|
-
import { jsx as
|
|
514
|
-
var badgeVariants =
|
|
470
|
+
import * as React8 from "react";
|
|
471
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
472
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
473
|
+
var badgeVariants = cva4(
|
|
515
474
|
"inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2",
|
|
516
475
|
{
|
|
517
476
|
variants: {
|
|
@@ -543,10 +502,10 @@ var badgeVariants = cva5(
|
|
|
543
502
|
}
|
|
544
503
|
}
|
|
545
504
|
);
|
|
546
|
-
var Badge =
|
|
505
|
+
var Badge = React8.forwardRef(
|
|
547
506
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
548
507
|
return /* @__PURE__ */ jsxs3("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
549
|
-
icon && /* @__PURE__ */
|
|
508
|
+
icon && /* @__PURE__ */ jsx8("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
550
509
|
children
|
|
551
510
|
] });
|
|
552
511
|
}
|
|
@@ -554,14 +513,14 @@ var Badge = React9.forwardRef(
|
|
|
554
513
|
Badge.displayName = "Badge";
|
|
555
514
|
|
|
556
515
|
// src/components/alert/Alert.tsx
|
|
557
|
-
import * as React11 from "react";
|
|
558
|
-
import { cva as cva7 } from "class-variance-authority";
|
|
559
|
-
|
|
560
|
-
// src/primitives/alert.tsx
|
|
561
516
|
import * as React10 from "react";
|
|
562
517
|
import { cva as cva6 } from "class-variance-authority";
|
|
563
|
-
|
|
564
|
-
|
|
518
|
+
|
|
519
|
+
// src/primitives/alert.tsx
|
|
520
|
+
import * as React9 from "react";
|
|
521
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
522
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
523
|
+
var alertVariants = cva5(
|
|
565
524
|
"relative w-full rounded-lg p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",
|
|
566
525
|
{
|
|
567
526
|
variants: {
|
|
@@ -575,18 +534,18 @@ var alertVariants = cva6(
|
|
|
575
534
|
}
|
|
576
535
|
}
|
|
577
536
|
);
|
|
578
|
-
var Alert =
|
|
537
|
+
var Alert = React9.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
579
538
|
Alert.displayName = "Alert";
|
|
580
|
-
var AlertTitle =
|
|
581
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
539
|
+
var AlertTitle = React9.forwardRef(
|
|
540
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx9("h5", { ref, className: cn("mb-1 leading-none tracking-tight", className), ...props })
|
|
582
541
|
);
|
|
583
542
|
AlertTitle.displayName = "AlertTitle";
|
|
584
|
-
var AlertDescription =
|
|
543
|
+
var AlertDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
585
544
|
AlertDescription.displayName = "AlertDescription";
|
|
586
545
|
|
|
587
546
|
// src/components/alert/Alert.tsx
|
|
588
|
-
import { jsx as
|
|
589
|
-
var alertVariants2 =
|
|
547
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
548
|
+
var alertVariants2 = cva6("", {
|
|
590
549
|
variants: {
|
|
591
550
|
variant: {
|
|
592
551
|
default: "border-berget-border",
|
|
@@ -600,20 +559,20 @@ var alertVariants2 = cva7("", {
|
|
|
600
559
|
variant: "default"
|
|
601
560
|
}
|
|
602
561
|
});
|
|
603
|
-
var Alert2 =
|
|
604
|
-
({ className, variant, ...props }, ref) => /* @__PURE__ */
|
|
562
|
+
var Alert2 = React10.forwardRef(
|
|
563
|
+
({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx10(Alert, { ref, className: cn(alertVariants2({ variant }), className), ...props })
|
|
605
564
|
);
|
|
606
565
|
Alert2.displayName = "Alert";
|
|
607
566
|
|
|
608
567
|
// src/components/input/Input.tsx
|
|
609
|
-
import * as
|
|
568
|
+
import * as React12 from "react";
|
|
610
569
|
|
|
611
570
|
// src/primitives/input.tsx
|
|
612
|
-
import * as
|
|
613
|
-
import { jsx as
|
|
614
|
-
var Input =
|
|
571
|
+
import * as React11 from "react";
|
|
572
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
573
|
+
var Input = React11.forwardRef(
|
|
615
574
|
({ className, type, ...props }, ref) => {
|
|
616
|
-
return /* @__PURE__ */
|
|
575
|
+
return /* @__PURE__ */ jsx11(
|
|
617
576
|
"input",
|
|
618
577
|
{
|
|
619
578
|
type,
|
|
@@ -630,14 +589,14 @@ var Input = React12.forwardRef(
|
|
|
630
589
|
Input.displayName = "Input";
|
|
631
590
|
|
|
632
591
|
// src/components/input/Input.tsx
|
|
633
|
-
import { jsx as
|
|
634
|
-
var Input2 =
|
|
592
|
+
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
593
|
+
var Input2 = React12.forwardRef(
|
|
635
594
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
636
|
-
const generatedId =
|
|
595
|
+
const generatedId = React12.useId();
|
|
637
596
|
const inputId = id || generatedId;
|
|
638
597
|
const errorId = `${inputId}-error`;
|
|
639
598
|
const descriptionId = `${inputId}-description`;
|
|
640
|
-
const inputElement = /* @__PURE__ */
|
|
599
|
+
const inputElement = /* @__PURE__ */ jsx12(
|
|
641
600
|
Input,
|
|
642
601
|
{
|
|
643
602
|
ref,
|
|
@@ -658,7 +617,7 @@ var Input2 = React13.forwardRef(
|
|
|
658
617
|
);
|
|
659
618
|
if (!icon && !actionButton) {
|
|
660
619
|
return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
|
|
661
|
-
label && /* @__PURE__ */
|
|
620
|
+
label && /* @__PURE__ */ jsx12(
|
|
662
621
|
"label",
|
|
663
622
|
{
|
|
664
623
|
htmlFor: inputId,
|
|
@@ -672,8 +631,8 @@ var Input2 = React13.forwardRef(
|
|
|
672
631
|
),
|
|
673
632
|
inputElement,
|
|
674
633
|
(description || error) && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
675
|
-
description && /* @__PURE__ */
|
|
676
|
-
error && /* @__PURE__ */
|
|
634
|
+
description && /* @__PURE__ */ jsx12(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
635
|
+
error && /* @__PURE__ */ jsx12(
|
|
677
636
|
Typography,
|
|
678
637
|
{
|
|
679
638
|
variant: "xs",
|
|
@@ -686,7 +645,7 @@ var Input2 = React13.forwardRef(
|
|
|
686
645
|
] });
|
|
687
646
|
}
|
|
688
647
|
return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
|
|
689
|
-
label && /* @__PURE__ */
|
|
648
|
+
label && /* @__PURE__ */ jsx12(
|
|
690
649
|
"label",
|
|
691
650
|
{
|
|
692
651
|
htmlFor: inputId,
|
|
@@ -699,13 +658,13 @@ var Input2 = React13.forwardRef(
|
|
|
699
658
|
}
|
|
700
659
|
),
|
|
701
660
|
/* @__PURE__ */ jsxs4("div", { className: "relative w-full", children: [
|
|
702
|
-
icon && /* @__PURE__ */
|
|
661
|
+
icon && /* @__PURE__ */ jsx12("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
703
662
|
inputElement,
|
|
704
|
-
actionButton && /* @__PURE__ */
|
|
663
|
+
actionButton && /* @__PURE__ */ jsx12("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
705
664
|
] }),
|
|
706
665
|
(description || error) && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
707
|
-
description && /* @__PURE__ */
|
|
708
|
-
error && /* @__PURE__ */
|
|
666
|
+
description && /* @__PURE__ */ jsx12(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
667
|
+
error && /* @__PURE__ */ jsx12(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
709
668
|
] })
|
|
710
669
|
] });
|
|
711
670
|
}
|
|
@@ -713,17 +672,17 @@ var Input2 = React13.forwardRef(
|
|
|
713
672
|
Input2.displayName = "Input";
|
|
714
673
|
|
|
715
674
|
// src/components/checkbox/Checkbox.tsx
|
|
716
|
-
import * as
|
|
675
|
+
import * as React14 from "react";
|
|
717
676
|
import * as CheckboxPrimitive2 from "@radix-ui/react-checkbox";
|
|
718
677
|
import { Check as Check2 } from "lucide-react";
|
|
719
|
-
import { cva as
|
|
678
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
720
679
|
|
|
721
680
|
// src/primitives/checkbox.tsx
|
|
722
|
-
import * as
|
|
681
|
+
import * as React13 from "react";
|
|
723
682
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
724
683
|
import { Check } from "lucide-react";
|
|
725
|
-
import { jsx as
|
|
726
|
-
var Checkbox =
|
|
684
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
685
|
+
var Checkbox = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
727
686
|
CheckboxPrimitive.Root,
|
|
728
687
|
{
|
|
729
688
|
ref,
|
|
@@ -732,24 +691,24 @@ var Checkbox = React14.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
732
691
|
className
|
|
733
692
|
),
|
|
734
693
|
...props,
|
|
735
|
-
children: children ?? /* @__PURE__ */
|
|
694
|
+
children: children ?? /* @__PURE__ */ jsx13(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center"), children: /* @__PURE__ */ jsx13(Check, { className: "h-4 w-4" }) })
|
|
736
695
|
}
|
|
737
696
|
));
|
|
738
697
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
739
|
-
var CheckboxIndicator =
|
|
698
|
+
var CheckboxIndicator = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
740
699
|
CheckboxPrimitive.Indicator,
|
|
741
700
|
{
|
|
742
701
|
ref,
|
|
743
702
|
className: cn("grid place-content-center", className),
|
|
744
703
|
...props,
|
|
745
|
-
children: children ?? /* @__PURE__ */
|
|
704
|
+
children: children ?? /* @__PURE__ */ jsx13(Check, { className: "h-4 w-4" })
|
|
746
705
|
}
|
|
747
706
|
));
|
|
748
707
|
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
749
708
|
|
|
750
709
|
// src/components/checkbox/Checkbox.tsx
|
|
751
|
-
import { jsx as
|
|
752
|
-
var checkboxVariants =
|
|
710
|
+
import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
711
|
+
var checkboxVariants = cva7(
|
|
753
712
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
754
713
|
{
|
|
755
714
|
variants: {
|
|
@@ -770,13 +729,13 @@ var checkboxVariants = cva8(
|
|
|
770
729
|
}
|
|
771
730
|
}
|
|
772
731
|
);
|
|
773
|
-
var Checkbox2 =
|
|
732
|
+
var Checkbox2 = React14.forwardRef(
|
|
774
733
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
775
|
-
const generatedId =
|
|
734
|
+
const generatedId = React14.useId();
|
|
776
735
|
const checkboxId = id || generatedId;
|
|
777
736
|
const errorId = `${checkboxId}-error`;
|
|
778
737
|
return /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-3", children: [
|
|
779
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ jsx14("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ jsx14(
|
|
780
739
|
Checkbox,
|
|
781
740
|
{
|
|
782
741
|
ref,
|
|
@@ -791,7 +750,7 @@ var Checkbox2 = React15.forwardRef(
|
|
|
791
750
|
className
|
|
792
751
|
),
|
|
793
752
|
...props,
|
|
794
|
-
children: /* @__PURE__ */
|
|
753
|
+
children: /* @__PURE__ */ jsx14(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ jsx14(
|
|
795
754
|
Check2,
|
|
796
755
|
{
|
|
797
756
|
className: "h-4 w-4 text-current stroke-current",
|
|
@@ -801,7 +760,7 @@ var Checkbox2 = React15.forwardRef(
|
|
|
801
760
|
}
|
|
802
761
|
) }),
|
|
803
762
|
(label || description || error) && /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-1", children: [
|
|
804
|
-
label && /* @__PURE__ */
|
|
763
|
+
label && /* @__PURE__ */ jsx14(
|
|
805
764
|
"label",
|
|
806
765
|
{
|
|
807
766
|
htmlFor: checkboxId,
|
|
@@ -813,8 +772,8 @@ var Checkbox2 = React15.forwardRef(
|
|
|
813
772
|
children: label
|
|
814
773
|
}
|
|
815
774
|
),
|
|
816
|
-
description && /* @__PURE__ */
|
|
817
|
-
error && /* @__PURE__ */
|
|
775
|
+
description && /* @__PURE__ */ jsx14(Typography, { variant: "xs", color: "muted", children: description }),
|
|
776
|
+
error && /* @__PURE__ */ jsx14(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
818
777
|
] })
|
|
819
778
|
] });
|
|
820
779
|
}
|
|
@@ -822,11 +781,11 @@ var Checkbox2 = React15.forwardRef(
|
|
|
822
781
|
Checkbox2.displayName = "Checkbox";
|
|
823
782
|
|
|
824
783
|
// src/components/switch/Switch.tsx
|
|
825
|
-
import * as
|
|
784
|
+
import * as React15 from "react";
|
|
826
785
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
827
|
-
import { cva as
|
|
828
|
-
import { jsx as
|
|
829
|
-
var switchRootVariants =
|
|
786
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
787
|
+
import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
788
|
+
var switchRootVariants = cva8(
|
|
830
789
|
"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",
|
|
831
790
|
{
|
|
832
791
|
variants: {
|
|
@@ -847,7 +806,7 @@ var switchRootVariants = cva9(
|
|
|
847
806
|
}
|
|
848
807
|
}
|
|
849
808
|
);
|
|
850
|
-
var switchThumbVariants =
|
|
809
|
+
var switchThumbVariants = cva8(
|
|
851
810
|
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
852
811
|
{
|
|
853
812
|
variants: {
|
|
@@ -862,13 +821,13 @@ var switchThumbVariants = cva9(
|
|
|
862
821
|
}
|
|
863
822
|
}
|
|
864
823
|
);
|
|
865
|
-
var Switch =
|
|
824
|
+
var Switch = React15.forwardRef(
|
|
866
825
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
867
|
-
const generatedId =
|
|
826
|
+
const generatedId = React15.useId();
|
|
868
827
|
const switchId = id || generatedId;
|
|
869
828
|
const errorId = `${switchId}-error`;
|
|
870
829
|
return /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-3", children: [
|
|
871
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ jsx15(
|
|
872
831
|
SwitchPrimitives.Root,
|
|
873
832
|
{
|
|
874
833
|
ref,
|
|
@@ -882,11 +841,11 @@ var Switch = React16.forwardRef(
|
|
|
882
841
|
className
|
|
883
842
|
),
|
|
884
843
|
...props,
|
|
885
|
-
children: /* @__PURE__ */
|
|
844
|
+
children: /* @__PURE__ */ jsx15(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
886
845
|
}
|
|
887
846
|
),
|
|
888
847
|
(label || description || error) && /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1", children: [
|
|
889
|
-
label && /* @__PURE__ */
|
|
848
|
+
label && /* @__PURE__ */ jsx15(
|
|
890
849
|
"label",
|
|
891
850
|
{
|
|
892
851
|
htmlFor: switchId,
|
|
@@ -897,8 +856,8 @@ var Switch = React16.forwardRef(
|
|
|
897
856
|
children: label
|
|
898
857
|
}
|
|
899
858
|
),
|
|
900
|
-
description && /* @__PURE__ */
|
|
901
|
-
error && /* @__PURE__ */
|
|
859
|
+
description && /* @__PURE__ */ jsx15(Typography, { variant: "xs", color: "muted", children: description }),
|
|
860
|
+
error && /* @__PURE__ */ jsx15(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
902
861
|
] })
|
|
903
862
|
] });
|
|
904
863
|
}
|
|
@@ -906,17 +865,17 @@ var Switch = React16.forwardRef(
|
|
|
906
865
|
Switch.displayName = "Switch";
|
|
907
866
|
|
|
908
867
|
// src/components/select/Select.tsx
|
|
909
|
-
import * as
|
|
910
|
-
import { cva as
|
|
868
|
+
import * as React17 from "react";
|
|
869
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
911
870
|
|
|
912
871
|
// src/primitives/select.tsx
|
|
913
|
-
import * as
|
|
872
|
+
import * as React16 from "react";
|
|
914
873
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
915
874
|
import { Check as Check3, ChevronDown, ChevronUp } from "lucide-react";
|
|
916
|
-
import { jsx as
|
|
875
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
917
876
|
var Select = SelectPrimitive.Root;
|
|
918
877
|
var SelectValue = SelectPrimitive.Value;
|
|
919
|
-
var SelectTrigger =
|
|
878
|
+
var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
920
879
|
SelectPrimitive.Trigger,
|
|
921
880
|
{
|
|
922
881
|
ref,
|
|
@@ -927,32 +886,32 @@ var SelectTrigger = React17.forwardRef(({ className, children, ...props }, ref)
|
|
|
927
886
|
...props,
|
|
928
887
|
children: [
|
|
929
888
|
children,
|
|
930
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ jsx16(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx16(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
931
890
|
]
|
|
932
891
|
}
|
|
933
892
|
));
|
|
934
893
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
935
|
-
var SelectScrollUpButton =
|
|
894
|
+
var SelectScrollUpButton = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
936
895
|
SelectPrimitive.ScrollUpButton,
|
|
937
896
|
{
|
|
938
897
|
ref,
|
|
939
898
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
940
899
|
...props,
|
|
941
|
-
children: /* @__PURE__ */
|
|
900
|
+
children: /* @__PURE__ */ jsx16(ChevronUp, { className: "h-4 w-4" })
|
|
942
901
|
}
|
|
943
902
|
));
|
|
944
903
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
945
|
-
var SelectScrollDownButton =
|
|
904
|
+
var SelectScrollDownButton = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
946
905
|
SelectPrimitive.ScrollDownButton,
|
|
947
906
|
{
|
|
948
907
|
ref,
|
|
949
908
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
950
909
|
...props,
|
|
951
|
-
children: /* @__PURE__ */
|
|
910
|
+
children: /* @__PURE__ */ jsx16(ChevronDown, { className: "h-4 w-4" })
|
|
952
911
|
}
|
|
953
912
|
));
|
|
954
913
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
955
|
-
var SelectContent =
|
|
914
|
+
var SelectContent = React16.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx16(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
|
|
956
915
|
SelectPrimitive.Content,
|
|
957
916
|
{
|
|
958
917
|
ref,
|
|
@@ -964,8 +923,8 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
|
|
|
964
923
|
position,
|
|
965
924
|
...props,
|
|
966
925
|
children: [
|
|
967
|
-
/* @__PURE__ */
|
|
968
|
-
/* @__PURE__ */
|
|
926
|
+
/* @__PURE__ */ jsx16(SelectScrollUpButton, {}),
|
|
927
|
+
/* @__PURE__ */ jsx16(
|
|
969
928
|
SelectPrimitive.Viewport,
|
|
970
929
|
{
|
|
971
930
|
className: cn(
|
|
@@ -975,12 +934,12 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
|
|
|
975
934
|
children
|
|
976
935
|
}
|
|
977
936
|
),
|
|
978
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ jsx16(SelectScrollDownButton, {})
|
|
979
938
|
]
|
|
980
939
|
}
|
|
981
940
|
) }));
|
|
982
941
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
983
|
-
var SelectLabel =
|
|
942
|
+
var SelectLabel = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
984
943
|
SelectPrimitive.Label,
|
|
985
944
|
{
|
|
986
945
|
ref,
|
|
@@ -989,7 +948,7 @@ var SelectLabel = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
989
948
|
}
|
|
990
949
|
));
|
|
991
950
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
992
|
-
var SelectItem =
|
|
951
|
+
var SelectItem = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
993
952
|
SelectPrimitive.Item,
|
|
994
953
|
{
|
|
995
954
|
ref,
|
|
@@ -999,13 +958,13 @@ var SelectItem = React17.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
999
958
|
),
|
|
1000
959
|
...props,
|
|
1001
960
|
children: [
|
|
1002
|
-
/* @__PURE__ */
|
|
1003
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ jsx16("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx16(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx16(Check3, { className: "h-4 w-4" }) }) }),
|
|
962
|
+
/* @__PURE__ */ jsx16(SelectPrimitive.ItemText, { children })
|
|
1004
963
|
]
|
|
1005
964
|
}
|
|
1006
965
|
));
|
|
1007
966
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
1008
|
-
var SelectSeparator =
|
|
967
|
+
var SelectSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
1009
968
|
SelectPrimitive.Separator,
|
|
1010
969
|
{
|
|
1011
970
|
ref,
|
|
@@ -1016,8 +975,8 @@ var SelectSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1016
975
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1017
976
|
|
|
1018
977
|
// src/components/select/Select.tsx
|
|
1019
|
-
import { jsx as
|
|
1020
|
-
var selectVariants =
|
|
978
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
979
|
+
var selectVariants = cva9(
|
|
1021
980
|
"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",
|
|
1022
981
|
{
|
|
1023
982
|
variants: {
|
|
@@ -1039,7 +998,7 @@ var selectVariants = cva10(
|
|
|
1039
998
|
}
|
|
1040
999
|
}
|
|
1041
1000
|
);
|
|
1042
|
-
var Select2 =
|
|
1001
|
+
var Select2 = React17.forwardRef(
|
|
1043
1002
|
({
|
|
1044
1003
|
className,
|
|
1045
1004
|
variant,
|
|
@@ -1057,12 +1016,12 @@ var Select2 = React18.forwardRef(
|
|
|
1057
1016
|
name,
|
|
1058
1017
|
required
|
|
1059
1018
|
}, ref) => {
|
|
1060
|
-
const generatedId =
|
|
1019
|
+
const generatedId = React17.useId();
|
|
1061
1020
|
const selectId = id || generatedId;
|
|
1062
1021
|
const errorId = `${selectId}-error`;
|
|
1063
1022
|
const descriptionId = `${selectId}-description`;
|
|
1064
1023
|
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-2", children: [
|
|
1065
|
-
label && /* @__PURE__ */
|
|
1024
|
+
label && /* @__PURE__ */ jsx17(
|
|
1066
1025
|
"label",
|
|
1067
1026
|
{
|
|
1068
1027
|
htmlFor: selectId,
|
|
@@ -1084,7 +1043,7 @@ var Select2 = React18.forwardRef(
|
|
|
1084
1043
|
name,
|
|
1085
1044
|
required,
|
|
1086
1045
|
children: [
|
|
1087
|
-
/* @__PURE__ */
|
|
1046
|
+
/* @__PURE__ */ jsx17(
|
|
1088
1047
|
SelectTrigger,
|
|
1089
1048
|
{
|
|
1090
1049
|
ref,
|
|
@@ -1096,30 +1055,30 @@ var Select2 = React18.forwardRef(
|
|
|
1096
1055
|
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1097
1056
|
className
|
|
1098
1057
|
),
|
|
1099
|
-
children: /* @__PURE__ */
|
|
1058
|
+
children: /* @__PURE__ */ jsx17(SelectValue, { placeholder })
|
|
1100
1059
|
}
|
|
1101
1060
|
),
|
|
1102
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ jsx17(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx17(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1103
1062
|
]
|
|
1104
1063
|
}
|
|
1105
1064
|
),
|
|
1106
|
-
description && /* @__PURE__ */
|
|
1107
|
-
error && /* @__PURE__ */
|
|
1065
|
+
description && /* @__PURE__ */ jsx17(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1066
|
+
error && /* @__PURE__ */ jsx17(Typography, { variant: "xs", id: errorId, className: "text-berget-destructive-foreground", children: error })
|
|
1108
1067
|
] });
|
|
1109
1068
|
}
|
|
1110
1069
|
);
|
|
1111
1070
|
Select2.displayName = "Select";
|
|
1112
1071
|
|
|
1113
1072
|
// src/components/text-area/TextArea.tsx
|
|
1114
|
-
import * as
|
|
1115
|
-
import { cva as
|
|
1073
|
+
import * as React19 from "react";
|
|
1074
|
+
import { cva as cva10 } from "class-variance-authority";
|
|
1116
1075
|
|
|
1117
1076
|
// src/primitives/textarea.tsx
|
|
1118
|
-
import * as
|
|
1119
|
-
import { jsx as
|
|
1120
|
-
var Textarea =
|
|
1077
|
+
import * as React18 from "react";
|
|
1078
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1079
|
+
var Textarea = React18.forwardRef(
|
|
1121
1080
|
({ className, ...props }, ref) => {
|
|
1122
|
-
return /* @__PURE__ */
|
|
1081
|
+
return /* @__PURE__ */ jsx18(
|
|
1123
1082
|
"textarea",
|
|
1124
1083
|
{
|
|
1125
1084
|
className: cn(
|
|
@@ -1135,8 +1094,8 @@ var Textarea = React19.forwardRef(
|
|
|
1135
1094
|
Textarea.displayName = "Textarea";
|
|
1136
1095
|
|
|
1137
1096
|
// src/components/text-area/TextArea.tsx
|
|
1138
|
-
import { jsx as
|
|
1139
|
-
var textAreaVariants =
|
|
1097
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1098
|
+
var textAreaVariants = cva10(
|
|
1140
1099
|
"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",
|
|
1141
1100
|
{
|
|
1142
1101
|
variants: {
|
|
@@ -1158,7 +1117,7 @@ var textAreaVariants = cva11(
|
|
|
1158
1117
|
}
|
|
1159
1118
|
}
|
|
1160
1119
|
);
|
|
1161
|
-
var TextArea =
|
|
1120
|
+
var TextArea = React19.forwardRef(
|
|
1162
1121
|
({
|
|
1163
1122
|
className,
|
|
1164
1123
|
variant,
|
|
@@ -1178,13 +1137,13 @@ var TextArea = React20.forwardRef(
|
|
|
1178
1137
|
actionButton,
|
|
1179
1138
|
...props
|
|
1180
1139
|
}, ref) => {
|
|
1181
|
-
const generatedId =
|
|
1140
|
+
const generatedId = React19.useId();
|
|
1182
1141
|
const textareaId = id || generatedId;
|
|
1183
1142
|
const errorId = `${textareaId}-error`;
|
|
1184
1143
|
const descriptionId = `${textareaId}-description`;
|
|
1185
1144
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
1186
1145
|
return /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-2", children: [
|
|
1187
|
-
label && /* @__PURE__ */
|
|
1146
|
+
label && /* @__PURE__ */ jsx19(
|
|
1188
1147
|
"label",
|
|
1189
1148
|
{
|
|
1190
1149
|
htmlFor: textareaId,
|
|
@@ -1197,8 +1156,8 @@ var TextArea = React20.forwardRef(
|
|
|
1197
1156
|
}
|
|
1198
1157
|
),
|
|
1199
1158
|
/* @__PURE__ */ jsxs9("div", { className: "relative", children: [
|
|
1200
|
-
icon && /* @__PURE__ */
|
|
1201
|
-
/* @__PURE__ */
|
|
1159
|
+
icon && /* @__PURE__ */ jsx19("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
1160
|
+
/* @__PURE__ */ jsx19(
|
|
1202
1161
|
Textarea,
|
|
1203
1162
|
{
|
|
1204
1163
|
ref,
|
|
@@ -1223,11 +1182,11 @@ var TextArea = React20.forwardRef(
|
|
|
1223
1182
|
...props
|
|
1224
1183
|
}
|
|
1225
1184
|
),
|
|
1226
|
-
secondaryIcon && /* @__PURE__ */
|
|
1227
|
-
actionButton && /* @__PURE__ */
|
|
1185
|
+
secondaryIcon && /* @__PURE__ */ jsx19("div", { className: "absolute right-12 top-1/2 -translate-y-1/2", children: secondaryIcon }),
|
|
1186
|
+
actionButton && /* @__PURE__ */ jsx19("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
1228
1187
|
] }),
|
|
1229
1188
|
(description || error || showCount && maxLength) && /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1230
|
-
description && /* @__PURE__ */
|
|
1189
|
+
description && /* @__PURE__ */ jsx19(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1231
1190
|
(error || showCount && maxLength) && /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
1232
1191
|
showCount && maxLength && /* @__PURE__ */ jsxs9(
|
|
1233
1192
|
Typography,
|
|
@@ -1243,7 +1202,7 @@ var TextArea = React20.forwardRef(
|
|
|
1243
1202
|
]
|
|
1244
1203
|
}
|
|
1245
1204
|
),
|
|
1246
|
-
error && /* @__PURE__ */
|
|
1205
|
+
error && /* @__PURE__ */ jsx19(
|
|
1247
1206
|
Typography,
|
|
1248
1207
|
{
|
|
1249
1208
|
variant: "xs",
|
|
@@ -1260,25 +1219,25 @@ var TextArea = React20.forwardRef(
|
|
|
1260
1219
|
TextArea.displayName = "TextArea";
|
|
1261
1220
|
|
|
1262
1221
|
// src/primitives/label.tsx
|
|
1263
|
-
import * as
|
|
1222
|
+
import * as React20 from "react";
|
|
1264
1223
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1265
|
-
import { cva as
|
|
1266
|
-
import { jsx as
|
|
1267
|
-
var labelVariants =
|
|
1224
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
1225
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1226
|
+
var labelVariants = cva11(
|
|
1268
1227
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1269
1228
|
);
|
|
1270
|
-
var Label2 =
|
|
1229
|
+
var Label2 = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1271
1230
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1272
1231
|
|
|
1273
1232
|
// src/primitives/field.tsx
|
|
1274
1233
|
import { useMemo as useMemo2 } from "react";
|
|
1275
|
-
import { cva as
|
|
1234
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
1276
1235
|
|
|
1277
1236
|
// src/primitives/separator.tsx
|
|
1278
|
-
import * as
|
|
1237
|
+
import * as React21 from "react";
|
|
1279
1238
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1280
|
-
import { jsx as
|
|
1281
|
-
var Separator2 =
|
|
1239
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1240
|
+
var Separator2 = React21.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx21(
|
|
1282
1241
|
SeparatorPrimitive.Root,
|
|
1283
1242
|
{
|
|
1284
1243
|
ref,
|
|
@@ -1295,9 +1254,9 @@ var Separator2 = React22.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1295
1254
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1296
1255
|
|
|
1297
1256
|
// src/primitives/field.tsx
|
|
1298
|
-
import { jsx as
|
|
1257
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1299
1258
|
function FieldSet({ className, ...props }) {
|
|
1300
|
-
return /* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ jsx22(
|
|
1301
1260
|
"fieldset",
|
|
1302
1261
|
{
|
|
1303
1262
|
"data-slot": "field-set",
|
|
@@ -1315,7 +1274,7 @@ function FieldLegend({
|
|
|
1315
1274
|
variant = "legend",
|
|
1316
1275
|
...props
|
|
1317
1276
|
}) {
|
|
1318
|
-
return /* @__PURE__ */
|
|
1277
|
+
return /* @__PURE__ */ jsx22(
|
|
1319
1278
|
"legend",
|
|
1320
1279
|
{
|
|
1321
1280
|
"data-slot": "field-legend",
|
|
@@ -1331,7 +1290,7 @@ function FieldLegend({
|
|
|
1331
1290
|
);
|
|
1332
1291
|
}
|
|
1333
1292
|
function FieldGroup({ className, ...props }) {
|
|
1334
|
-
return /* @__PURE__ */
|
|
1293
|
+
return /* @__PURE__ */ jsx22(
|
|
1335
1294
|
"div",
|
|
1336
1295
|
{
|
|
1337
1296
|
"data-slot": "field-group",
|
|
@@ -1343,7 +1302,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
1343
1302
|
}
|
|
1344
1303
|
);
|
|
1345
1304
|
}
|
|
1346
|
-
var fieldVariants =
|
|
1305
|
+
var fieldVariants = cva12("group/field data-[invalid=true]:text-destructive flex w-full gap-3", {
|
|
1347
1306
|
variants: {
|
|
1348
1307
|
orientation: {
|
|
1349
1308
|
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
@@ -1368,7 +1327,7 @@ function Field({
|
|
|
1368
1327
|
orientation = "vertical",
|
|
1369
1328
|
...props
|
|
1370
1329
|
}) {
|
|
1371
|
-
return /* @__PURE__ */
|
|
1330
|
+
return /* @__PURE__ */ jsx22(
|
|
1372
1331
|
"div",
|
|
1373
1332
|
{
|
|
1374
1333
|
role: "group",
|
|
@@ -1380,7 +1339,7 @@ function Field({
|
|
|
1380
1339
|
);
|
|
1381
1340
|
}
|
|
1382
1341
|
function FieldContent({ className, ...props }) {
|
|
1383
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ jsx22(
|
|
1384
1343
|
"div",
|
|
1385
1344
|
{
|
|
1386
1345
|
"data-slot": "field-content",
|
|
@@ -1390,7 +1349,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1390
1349
|
);
|
|
1391
1350
|
}
|
|
1392
1351
|
function FieldLabel({ className, ...props }) {
|
|
1393
|
-
return /* @__PURE__ */
|
|
1352
|
+
return /* @__PURE__ */ jsx22(
|
|
1394
1353
|
Label2,
|
|
1395
1354
|
{
|
|
1396
1355
|
"data-slot": "field-label",
|
|
@@ -1405,7 +1364,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1405
1364
|
);
|
|
1406
1365
|
}
|
|
1407
1366
|
function FieldTitle({ className, ...props }) {
|
|
1408
|
-
return /* @__PURE__ */
|
|
1367
|
+
return /* @__PURE__ */ jsx22(
|
|
1409
1368
|
"div",
|
|
1410
1369
|
{
|
|
1411
1370
|
"data-slot": "field-label",
|
|
@@ -1418,7 +1377,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1418
1377
|
);
|
|
1419
1378
|
}
|
|
1420
1379
|
function FieldDescription({ className, ...props }) {
|
|
1421
|
-
return /* @__PURE__ */
|
|
1380
|
+
return /* @__PURE__ */ jsx22(
|
|
1422
1381
|
"p",
|
|
1423
1382
|
{
|
|
1424
1383
|
"data-slot": "field-description",
|
|
@@ -1448,8 +1407,8 @@ function FieldSeparator({
|
|
|
1448
1407
|
),
|
|
1449
1408
|
...props,
|
|
1450
1409
|
children: [
|
|
1451
|
-
/* @__PURE__ */
|
|
1452
|
-
children && /* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ jsx22(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
1411
|
+
children && /* @__PURE__ */ jsx22(
|
|
1453
1412
|
"span",
|
|
1454
1413
|
{
|
|
1455
1414
|
className: "bg-berget-background text-berget-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -1477,12 +1436,12 @@ function FieldError({
|
|
|
1477
1436
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
1478
1437
|
return errors[0].message;
|
|
1479
1438
|
}
|
|
1480
|
-
return /* @__PURE__ */
|
|
1439
|
+
return /* @__PURE__ */ jsx22("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map((error, index) => error?.message && /* @__PURE__ */ jsx22("li", { children: error.message }, index)) });
|
|
1481
1440
|
}, [children, errors]);
|
|
1482
1441
|
if (!content) {
|
|
1483
1442
|
return null;
|
|
1484
1443
|
}
|
|
1485
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ jsx22(
|
|
1486
1445
|
"div",
|
|
1487
1446
|
{
|
|
1488
1447
|
role: "alert",
|
|
@@ -1496,10 +1455,46 @@ function FieldError({
|
|
|
1496
1455
|
|
|
1497
1456
|
// src/components/link/Link.tsx
|
|
1498
1457
|
import * as React23 from "react";
|
|
1499
|
-
import { cva as
|
|
1458
|
+
import { cva as cva13 } from "class-variance-authority";
|
|
1459
|
+
|
|
1460
|
+
// src/components/icon/Icon.tsx
|
|
1461
|
+
import * as React22 from "react";
|
|
1462
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1463
|
+
var iconStrokeMap = {
|
|
1464
|
+
16: 1.4,
|
|
1465
|
+
24: 1.6,
|
|
1466
|
+
32: 1.8
|
|
1467
|
+
};
|
|
1468
|
+
var Icon2 = React22.forwardRef(
|
|
1469
|
+
({
|
|
1470
|
+
icon: IconComponent,
|
|
1471
|
+
size,
|
|
1472
|
+
className,
|
|
1473
|
+
"aria-label": ariaLabel,
|
|
1474
|
+
"aria-hidden": ariaHidden = true,
|
|
1475
|
+
...props
|
|
1476
|
+
}, ref) => {
|
|
1477
|
+
const strokeWidth = iconStrokeMap[size];
|
|
1478
|
+
const sizeClass = size === 16 ? "w-4 h-4" : size === 24 ? "w-6 h-6" : "w-8 h-8";
|
|
1479
|
+
const ariaAttributes = ariaLabel ? { "aria-label": ariaLabel } : { "aria-hidden": ariaHidden };
|
|
1480
|
+
return /* @__PURE__ */ jsx23(
|
|
1481
|
+
IconComponent,
|
|
1482
|
+
{
|
|
1483
|
+
ref,
|
|
1484
|
+
className: cn(sizeClass, className),
|
|
1485
|
+
strokeWidth,
|
|
1486
|
+
...ariaAttributes,
|
|
1487
|
+
...props
|
|
1488
|
+
}
|
|
1489
|
+
);
|
|
1490
|
+
}
|
|
1491
|
+
);
|
|
1492
|
+
Icon2.displayName = "Icon";
|
|
1493
|
+
|
|
1494
|
+
// src/components/link/Link.tsx
|
|
1500
1495
|
import { ExternalLink } from "lucide-react";
|
|
1501
1496
|
import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1502
|
-
var linkVariants =
|
|
1497
|
+
var linkVariants = cva13(
|
|
1503
1498
|
"inline-flex items-center gap-2 transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
|
|
1504
1499
|
{
|
|
1505
1500
|
variants: {
|
|
@@ -1553,7 +1548,7 @@ var Link = React23.forwardRef(
|
|
|
1553
1548
|
children: [
|
|
1554
1549
|
children,
|
|
1555
1550
|
icon && /* @__PURE__ */ jsx24("span", { className: "inline-flex items-center", children: icon }),
|
|
1556
|
-
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ jsx24("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ jsx24(
|
|
1551
|
+
showExternalIcon && isExternal && !disabled && /* @__PURE__ */ jsx24("span", { className: "inline-flex items-center ml-1 opacity-60", "aria-hidden": "true", children: /* @__PURE__ */ jsx24(Icon2, { icon: ExternalLink, size: 16 }) })
|
|
1557
1552
|
]
|
|
1558
1553
|
}
|
|
1559
1554
|
);
|
|
@@ -1563,14 +1558,14 @@ Link.displayName = "Link";
|
|
|
1563
1558
|
|
|
1564
1559
|
// src/components/section/Section.tsx
|
|
1565
1560
|
import * as React25 from "react";
|
|
1566
|
-
import { cva as
|
|
1561
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
1567
1562
|
|
|
1568
1563
|
// src/components/container/Container.tsx
|
|
1569
1564
|
import * as React24 from "react";
|
|
1570
1565
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
1571
|
-
import { cva as
|
|
1566
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
1572
1567
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1573
|
-
var containerVariants =
|
|
1568
|
+
var containerVariants = cva14("w-full mx-auto", {
|
|
1574
1569
|
variants: {
|
|
1575
1570
|
size: {
|
|
1576
1571
|
sm: "max-w-3xl",
|
|
@@ -1609,7 +1604,7 @@ Container.displayName = "Container";
|
|
|
1609
1604
|
|
|
1610
1605
|
// src/components/section/Section.tsx
|
|
1611
1606
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1612
|
-
var sectionVariants =
|
|
1607
|
+
var sectionVariants = cva15("relative", {
|
|
1613
1608
|
variants: {
|
|
1614
1609
|
padding: {
|
|
1615
1610
|
none: "",
|
|
@@ -1683,10 +1678,10 @@ SectionHeader.displayName = "SectionHeader";
|
|
|
1683
1678
|
|
|
1684
1679
|
// src/components/grid/Grid.tsx
|
|
1685
1680
|
import * as React27 from "react";
|
|
1686
|
-
import { cva as
|
|
1681
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
1687
1682
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
1688
1683
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1689
|
-
var gridVariants =
|
|
1684
|
+
var gridVariants = cva16("grid", {
|
|
1690
1685
|
variants: {
|
|
1691
1686
|
align: {
|
|
1692
1687
|
start: "items-start",
|
|
@@ -1734,10 +1729,10 @@ Grid.displayName = "Grid";
|
|
|
1734
1729
|
|
|
1735
1730
|
// src/components/box/Box.tsx
|
|
1736
1731
|
import * as React28 from "react";
|
|
1737
|
-
import { cva as
|
|
1732
|
+
import { cva as cva17 } from "class-variance-authority";
|
|
1738
1733
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
1739
1734
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1740
|
-
var boxVariants =
|
|
1735
|
+
var boxVariants = cva17("flex", {
|
|
1741
1736
|
variants: {
|
|
1742
1737
|
direction: {
|
|
1743
1738
|
row: "flex-row",
|
|
@@ -1911,7 +1906,7 @@ BergetLogo.displayName = "BergetLogo";
|
|
|
1911
1906
|
|
|
1912
1907
|
// src/components/header/Header.tsx
|
|
1913
1908
|
import * as React31 from "react";
|
|
1914
|
-
import { cva as
|
|
1909
|
+
import { cva as cva18 } from "class-variance-authority";
|
|
1915
1910
|
import { Menu, X } from "lucide-react";
|
|
1916
1911
|
|
|
1917
1912
|
// src/components/language-select/LanguageSelect.tsx
|
|
@@ -1942,7 +1937,7 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
|
|
|
1942
1937
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1943
1938
|
className
|
|
1944
1939
|
),
|
|
1945
|
-
children: /* @__PURE__ */ jsx31(
|
|
1940
|
+
children: /* @__PURE__ */ jsx31(Icon2, { icon: Globe, size: 16 })
|
|
1946
1941
|
}
|
|
1947
1942
|
),
|
|
1948
1943
|
/* @__PURE__ */ jsx31(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx31(
|
|
@@ -2002,7 +1997,7 @@ LanguageSelect.displayName = "LanguageSelect";
|
|
|
2002
1997
|
|
|
2003
1998
|
// src/components/header/Header.tsx
|
|
2004
1999
|
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2005
|
-
var headerVariants =
|
|
2000
|
+
var headerVariants = cva18(
|
|
2006
2001
|
"sticky top-0 z-50 header-backdrop backdrop-blur-xl border-b border-berget-border transition-all duration-200",
|
|
2007
2002
|
{
|
|
2008
2003
|
variants: {
|
|
@@ -2035,7 +2030,7 @@ var HeaderNav = React31.forwardRef(({ className, links, ...props }, ref) => {
|
|
|
2035
2030
|
size: "sm",
|
|
2036
2031
|
className: cn("relative transition-all duration-200", link.active && "font-medium"),
|
|
2037
2032
|
children: [
|
|
2038
|
-
link.icon && /* @__PURE__ */ jsx32("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ jsx32(
|
|
2033
|
+
link.icon && /* @__PURE__ */ jsx32("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ jsx32(Icon2, { icon: link.icon, size: 16 }) }),
|
|
2039
2034
|
link.label
|
|
2040
2035
|
]
|
|
2041
2036
|
}
|
|
@@ -2084,7 +2079,7 @@ var MobileMenuButton = React31.forwardRef(({ className, ...props }, ref) => {
|
|
|
2084
2079
|
"aria-expanded": isMobileMenuOpen,
|
|
2085
2080
|
"aria-controls": "mobile-menu",
|
|
2086
2081
|
...props,
|
|
2087
|
-
children: isMobileMenuOpen ? /* @__PURE__ */ jsx32(
|
|
2082
|
+
children: isMobileMenuOpen ? /* @__PURE__ */ jsx32(Icon2, { icon: X, size: 16 }) : /* @__PURE__ */ jsx32(Icon2, { icon: Menu, size: 16 })
|
|
2088
2083
|
}
|
|
2089
2084
|
);
|
|
2090
2085
|
});
|
|
@@ -2125,7 +2120,7 @@ var MobileMenu = React31.forwardRef(
|
|
|
2125
2120
|
),
|
|
2126
2121
|
onClick: () => setIsMobileMenuOpen(false),
|
|
2127
2122
|
children: [
|
|
2128
|
-
link.icon && /* @__PURE__ */ jsx32("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ jsx32(
|
|
2123
|
+
link.icon && /* @__PURE__ */ jsx32("span", { className: "inline-flex items-center mr-2", children: /* @__PURE__ */ jsx32(Icon2, { icon: link.icon, size: 16 }) }),
|
|
2129
2124
|
link.label
|
|
2130
2125
|
]
|
|
2131
2126
|
}
|
|
@@ -2209,16 +2204,16 @@ Header.displayName = "Header";
|
|
|
2209
2204
|
|
|
2210
2205
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2211
2206
|
import * as React34 from "react";
|
|
2212
|
-
import { cva as
|
|
2207
|
+
import { cva as cva20 } from "class-variance-authority";
|
|
2213
2208
|
|
|
2214
2209
|
// src/components/list/List.tsx
|
|
2215
2210
|
import * as React33 from "react";
|
|
2216
2211
|
|
|
2217
2212
|
// src/components/divider/Divider.tsx
|
|
2218
2213
|
import * as React32 from "react";
|
|
2219
|
-
import { cva as
|
|
2214
|
+
import { cva as cva19 } from "class-variance-authority";
|
|
2220
2215
|
import { jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2221
|
-
var dividerVariants =
|
|
2216
|
+
var dividerVariants = cva19("", {
|
|
2222
2217
|
variants: {
|
|
2223
2218
|
variant: {
|
|
2224
2219
|
default: "bg-berget-separator",
|
|
@@ -2330,7 +2325,7 @@ ListHeader.displayName = "ListHeader";
|
|
|
2330
2325
|
var FeatureList = React33.forwardRef(
|
|
2331
2326
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2332
2327
|
return /* @__PURE__ */ jsx34("ul", { ref, className: cn("flex flex-col gap-fluid-md", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs17("li", { className: "flex items-start gap-fluid-md", children: [
|
|
2333
|
-
variant === "bullet" ? /* @__PURE__ */ jsx34("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ jsx34("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx34(
|
|
2328
|
+
variant === "bullet" ? /* @__PURE__ */ jsx34("span", { className: "w-1.5 h-1.5 rounded-full bg-berget-icon-muted flex-shrink-0 mt-2" }) : /* @__PURE__ */ jsx34("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx34(Icon2, { icon: Check4, size: 24, className: "text-berget-logo-light" }) }),
|
|
2334
2329
|
/* @__PURE__ */ jsx34(Typography, { variant: "body", color: "muted", children: item })
|
|
2335
2330
|
] }, index)) });
|
|
2336
2331
|
}
|
|
@@ -2339,7 +2334,7 @@ FeatureList.displayName = "FeatureList";
|
|
|
2339
2334
|
|
|
2340
2335
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2341
2336
|
import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2342
|
-
var featureCardVariants =
|
|
2337
|
+
var featureCardVariants = cva20("", {
|
|
2343
2338
|
variants: {
|
|
2344
2339
|
variant: {
|
|
2345
2340
|
highlight: "",
|
|
@@ -2429,9 +2424,9 @@ FeatureCards.displayName = "FeatureCards";
|
|
|
2429
2424
|
|
|
2430
2425
|
// src/components/hero-block/HeroBlock.tsx
|
|
2431
2426
|
import * as React35 from "react";
|
|
2432
|
-
import { cva as
|
|
2427
|
+
import { cva as cva21 } from "class-variance-authority";
|
|
2433
2428
|
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2434
|
-
var heroBlockVariants =
|
|
2429
|
+
var heroBlockVariants = cva21(
|
|
2435
2430
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2436
2431
|
{
|
|
2437
2432
|
variants: {
|
|
@@ -2474,7 +2469,7 @@ var HeroBlock = React35.forwardRef(
|
|
|
2474
2469
|
Badge,
|
|
2475
2470
|
{
|
|
2476
2471
|
variant: "default",
|
|
2477
|
-
icon: TaglineIcon ? /* @__PURE__ */ jsx36(
|
|
2472
|
+
icon: TaglineIcon ? /* @__PURE__ */ jsx36(Icon2, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2478
2473
|
iconGap: 2,
|
|
2479
2474
|
className: "mb-fluid-md",
|
|
2480
2475
|
children: tagline
|
|
@@ -2574,7 +2569,7 @@ export {
|
|
|
2574
2569
|
Grid,
|
|
2575
2570
|
Header,
|
|
2576
2571
|
HeroBlock,
|
|
2577
|
-
Icon,
|
|
2572
|
+
Icon2 as Icon,
|
|
2578
2573
|
Input2 as Input,
|
|
2579
2574
|
Label2 as Label,
|
|
2580
2575
|
LanguageSelect,
|
|
@@ -2593,7 +2588,7 @@ export {
|
|
|
2593
2588
|
alertVariants2 as alertVariants,
|
|
2594
2589
|
badgeVariants,
|
|
2595
2590
|
boxVariants,
|
|
2596
|
-
|
|
2591
|
+
buttonVariants,
|
|
2597
2592
|
cardVariants,
|
|
2598
2593
|
checkboxVariants,
|
|
2599
2594
|
containerVariants,
|