@bergetai/ui 0.1.84 → 0.1.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +303 -291
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +285 -273
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
package/dist/index.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,91 +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 isIcon =
|
|
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
|
+
);
|
|
321
297
|
if (asChild) {
|
|
322
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ jsx4(
|
|
323
299
|
Button,
|
|
324
300
|
{
|
|
325
|
-
className:
|
|
301
|
+
className: baseClass,
|
|
326
302
|
ref,
|
|
327
303
|
asChild: true,
|
|
328
304
|
type,
|
|
@@ -333,17 +309,17 @@ var Button2 = React5.forwardRef(
|
|
|
333
309
|
}
|
|
334
310
|
);
|
|
335
311
|
}
|
|
336
|
-
return /* @__PURE__ */
|
|
312
|
+
return /* @__PURE__ */ jsx4(
|
|
337
313
|
Button,
|
|
338
314
|
{
|
|
339
|
-
className:
|
|
315
|
+
className: baseClass,
|
|
340
316
|
ref,
|
|
341
317
|
type,
|
|
342
318
|
"aria-disabled": isLoading || void 0,
|
|
343
319
|
"aria-busy": isLoading || void 0,
|
|
344
320
|
...props,
|
|
345
|
-
children: /* @__PURE__ */
|
|
346
|
-
/* @__PURE__ */
|
|
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" }),
|
|
347
323
|
!isIcon && children
|
|
348
324
|
] }) : children })
|
|
349
325
|
}
|
|
@@ -353,10 +329,10 @@ var Button2 = React5.forwardRef(
|
|
|
353
329
|
Button2.displayName = "Button";
|
|
354
330
|
|
|
355
331
|
// src/components/typography/Typography.tsx
|
|
356
|
-
import * as
|
|
357
|
-
import { cva as
|
|
358
|
-
import { jsx as
|
|
359
|
-
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("", {
|
|
360
336
|
variants: {
|
|
361
337
|
variant: {
|
|
362
338
|
// Fluid heading scale — use @theme tokens (clamp-based, 390px → 1440px)
|
|
@@ -400,10 +376,10 @@ var defaultElementMap = {
|
|
|
400
376
|
mono: "p",
|
|
401
377
|
code: "span"
|
|
402
378
|
};
|
|
403
|
-
var Typography =
|
|
379
|
+
var Typography = React5.forwardRef(
|
|
404
380
|
({ className, variant = "body", color = "default", as, children, ...props }, ref) => {
|
|
405
381
|
const Component = as ?? defaultElementMap[variant ?? "body"] ?? "p";
|
|
406
|
-
return /* @__PURE__ */
|
|
382
|
+
return /* @__PURE__ */ jsx5(
|
|
407
383
|
Component,
|
|
408
384
|
{
|
|
409
385
|
className: cn(typographyVariants({ variant, color }), className),
|
|
@@ -417,14 +393,14 @@ var Typography = React6.forwardRef(
|
|
|
417
393
|
Typography.displayName = "Typography";
|
|
418
394
|
|
|
419
395
|
// src/components/card/Card.tsx
|
|
420
|
-
import * as
|
|
421
|
-
import { cva as
|
|
396
|
+
import * as React7 from "react";
|
|
397
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
422
398
|
|
|
423
399
|
// src/primitives/card.tsx
|
|
424
|
-
import * as
|
|
425
|
-
import { jsx as
|
|
426
|
-
var Card =
|
|
427
|
-
({ 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(
|
|
428
404
|
"div",
|
|
429
405
|
{
|
|
430
406
|
ref,
|
|
@@ -434,30 +410,30 @@ var Card = React7.forwardRef(
|
|
|
434
410
|
)
|
|
435
411
|
);
|
|
436
412
|
Card.displayName = "Card";
|
|
437
|
-
var CardHeader =
|
|
438
|
-
({ 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 })
|
|
439
415
|
);
|
|
440
416
|
CardHeader.displayName = "CardHeader";
|
|
441
|
-
var CardTitle =
|
|
442
|
-
({ 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 })
|
|
443
419
|
);
|
|
444
420
|
CardTitle.displayName = "CardTitle";
|
|
445
|
-
var CardDescription =
|
|
446
|
-
({ 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 })
|
|
447
423
|
);
|
|
448
424
|
CardDescription.displayName = "CardDescription";
|
|
449
|
-
var CardContent =
|
|
450
|
-
({ 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 })
|
|
451
427
|
);
|
|
452
428
|
CardContent.displayName = "CardContent";
|
|
453
|
-
var CardFooter =
|
|
454
|
-
({ 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 })
|
|
455
431
|
);
|
|
456
432
|
CardFooter.displayName = "CardFooter";
|
|
457
433
|
|
|
458
434
|
// src/components/card/Card.tsx
|
|
459
|
-
import { jsx as
|
|
460
|
-
var cardVariants =
|
|
435
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
436
|
+
var cardVariants = cva3("rounded-berget-sm", {
|
|
461
437
|
variants: {
|
|
462
438
|
variant: {
|
|
463
439
|
outlined: "bg-transparent border border-berget-border",
|
|
@@ -475,9 +451,9 @@ var cardVariants = cva4("rounded-berget-sm", {
|
|
|
475
451
|
padding: "md"
|
|
476
452
|
}
|
|
477
453
|
});
|
|
478
|
-
var Card2 =
|
|
454
|
+
var Card2 = React7.forwardRef(
|
|
479
455
|
({ className, variant, padding, children, ...props }, ref) => {
|
|
480
|
-
return /* @__PURE__ */
|
|
456
|
+
return /* @__PURE__ */ jsx7(
|
|
481
457
|
Card,
|
|
482
458
|
{
|
|
483
459
|
ref,
|
|
@@ -491,10 +467,10 @@ var Card2 = React8.forwardRef(
|
|
|
491
467
|
Card2.displayName = "Card";
|
|
492
468
|
|
|
493
469
|
// src/components/badge/Badge.tsx
|
|
494
|
-
import * as
|
|
495
|
-
import { cva as
|
|
496
|
-
import { jsx as
|
|
497
|
-
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(
|
|
498
474
|
"inline-flex items-center whitespace-nowrap rounded-full transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2",
|
|
499
475
|
{
|
|
500
476
|
variants: {
|
|
@@ -526,10 +502,10 @@ var badgeVariants = cva5(
|
|
|
526
502
|
}
|
|
527
503
|
}
|
|
528
504
|
);
|
|
529
|
-
var Badge =
|
|
505
|
+
var Badge = React8.forwardRef(
|
|
530
506
|
({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {
|
|
531
507
|
return /* @__PURE__ */ jsxs3("div", { className: cn(badgeVariants({ variant, status, size }), className), ref, ...props, children: [
|
|
532
|
-
icon && /* @__PURE__ */
|
|
508
|
+
icon && /* @__PURE__ */ jsx8("div", { style: { marginRight: children ? `${iconGap * 0.25}rem` : "0" }, children: icon }),
|
|
533
509
|
children
|
|
534
510
|
] });
|
|
535
511
|
}
|
|
@@ -537,14 +513,14 @@ var Badge = React9.forwardRef(
|
|
|
537
513
|
Badge.displayName = "Badge";
|
|
538
514
|
|
|
539
515
|
// src/components/alert/Alert.tsx
|
|
540
|
-
import * as React11 from "react";
|
|
541
|
-
import { cva as cva7 } from "class-variance-authority";
|
|
542
|
-
|
|
543
|
-
// src/primitives/alert.tsx
|
|
544
516
|
import * as React10 from "react";
|
|
545
517
|
import { cva as cva6 } from "class-variance-authority";
|
|
546
|
-
|
|
547
|
-
|
|
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(
|
|
548
524
|
"relative w-full rounded-lg p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",
|
|
549
525
|
{
|
|
550
526
|
variants: {
|
|
@@ -558,18 +534,18 @@ var alertVariants = cva6(
|
|
|
558
534
|
}
|
|
559
535
|
}
|
|
560
536
|
);
|
|
561
|
-
var Alert =
|
|
537
|
+
var Alert = React9.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
562
538
|
Alert.displayName = "Alert";
|
|
563
|
-
var AlertTitle =
|
|
564
|
-
({ 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 })
|
|
565
541
|
);
|
|
566
542
|
AlertTitle.displayName = "AlertTitle";
|
|
567
|
-
var AlertDescription =
|
|
543
|
+
var AlertDescription = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx9("div", { ref, className: cn("text-sm [&_p]:leading-relaxed", className), ...props }));
|
|
568
544
|
AlertDescription.displayName = "AlertDescription";
|
|
569
545
|
|
|
570
546
|
// src/components/alert/Alert.tsx
|
|
571
|
-
import { jsx as
|
|
572
|
-
var alertVariants2 =
|
|
547
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
548
|
+
var alertVariants2 = cva6("", {
|
|
573
549
|
variants: {
|
|
574
550
|
variant: {
|
|
575
551
|
default: "border-berget-border",
|
|
@@ -583,20 +559,20 @@ var alertVariants2 = cva7("", {
|
|
|
583
559
|
variant: "default"
|
|
584
560
|
}
|
|
585
561
|
});
|
|
586
|
-
var Alert2 =
|
|
587
|
-
({ 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 })
|
|
588
564
|
);
|
|
589
565
|
Alert2.displayName = "Alert";
|
|
590
566
|
|
|
591
567
|
// src/components/input/Input.tsx
|
|
592
|
-
import * as
|
|
568
|
+
import * as React12 from "react";
|
|
593
569
|
|
|
594
570
|
// src/primitives/input.tsx
|
|
595
|
-
import * as
|
|
596
|
-
import { jsx as
|
|
597
|
-
var Input =
|
|
571
|
+
import * as React11 from "react";
|
|
572
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
573
|
+
var Input = React11.forwardRef(
|
|
598
574
|
({ className, type, ...props }, ref) => {
|
|
599
|
-
return /* @__PURE__ */
|
|
575
|
+
return /* @__PURE__ */ jsx11(
|
|
600
576
|
"input",
|
|
601
577
|
{
|
|
602
578
|
type,
|
|
@@ -613,14 +589,14 @@ var Input = React12.forwardRef(
|
|
|
613
589
|
Input.displayName = "Input";
|
|
614
590
|
|
|
615
591
|
// src/components/input/Input.tsx
|
|
616
|
-
import { jsx as
|
|
617
|
-
var Input2 =
|
|
592
|
+
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
593
|
+
var Input2 = React12.forwardRef(
|
|
618
594
|
({ className, icon, actionButton, label, description, error, id, disabled, ...props }, ref) => {
|
|
619
|
-
const generatedId =
|
|
595
|
+
const generatedId = React12.useId();
|
|
620
596
|
const inputId = id || generatedId;
|
|
621
597
|
const errorId = `${inputId}-error`;
|
|
622
598
|
const descriptionId = `${inputId}-description`;
|
|
623
|
-
const inputElement = /* @__PURE__ */
|
|
599
|
+
const inputElement = /* @__PURE__ */ jsx12(
|
|
624
600
|
Input,
|
|
625
601
|
{
|
|
626
602
|
ref,
|
|
@@ -641,7 +617,7 @@ var Input2 = React13.forwardRef(
|
|
|
641
617
|
);
|
|
642
618
|
if (!icon && !actionButton) {
|
|
643
619
|
return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
|
|
644
|
-
label && /* @__PURE__ */
|
|
620
|
+
label && /* @__PURE__ */ jsx12(
|
|
645
621
|
"label",
|
|
646
622
|
{
|
|
647
623
|
htmlFor: inputId,
|
|
@@ -655,8 +631,8 @@ var Input2 = React13.forwardRef(
|
|
|
655
631
|
),
|
|
656
632
|
inputElement,
|
|
657
633
|
(description || error) && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
658
|
-
description && /* @__PURE__ */
|
|
659
|
-
error && /* @__PURE__ */
|
|
634
|
+
description && /* @__PURE__ */ jsx12(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
635
|
+
error && /* @__PURE__ */ jsx12(
|
|
660
636
|
Typography,
|
|
661
637
|
{
|
|
662
638
|
variant: "xs",
|
|
@@ -669,7 +645,7 @@ var Input2 = React13.forwardRef(
|
|
|
669
645
|
] });
|
|
670
646
|
}
|
|
671
647
|
return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2", children: [
|
|
672
|
-
label && /* @__PURE__ */
|
|
648
|
+
label && /* @__PURE__ */ jsx12(
|
|
673
649
|
"label",
|
|
674
650
|
{
|
|
675
651
|
htmlFor: inputId,
|
|
@@ -682,13 +658,13 @@ var Input2 = React13.forwardRef(
|
|
|
682
658
|
}
|
|
683
659
|
),
|
|
684
660
|
/* @__PURE__ */ jsxs4("div", { className: "relative w-full", children: [
|
|
685
|
-
icon && /* @__PURE__ */
|
|
661
|
+
icon && /* @__PURE__ */ jsx12("div", { className: "absolute left-3 top-1/2 -translate-y-1/2", children: icon }),
|
|
686
662
|
inputElement,
|
|
687
|
-
actionButton && /* @__PURE__ */
|
|
663
|
+
actionButton && /* @__PURE__ */ jsx12("div", { className: "absolute right-2 top-1/2 -translate-y-1/2", children: actionButton })
|
|
688
664
|
] }),
|
|
689
665
|
(description || error) && /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1", children: [
|
|
690
|
-
description && /* @__PURE__ */
|
|
691
|
-
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 })
|
|
692
668
|
] })
|
|
693
669
|
] });
|
|
694
670
|
}
|
|
@@ -696,17 +672,17 @@ var Input2 = React13.forwardRef(
|
|
|
696
672
|
Input2.displayName = "Input";
|
|
697
673
|
|
|
698
674
|
// src/components/checkbox/Checkbox.tsx
|
|
699
|
-
import * as
|
|
675
|
+
import * as React14 from "react";
|
|
700
676
|
import * as CheckboxPrimitive2 from "@radix-ui/react-checkbox";
|
|
701
677
|
import { Check as Check2 } from "lucide-react";
|
|
702
|
-
import { cva as
|
|
678
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
703
679
|
|
|
704
680
|
// src/primitives/checkbox.tsx
|
|
705
|
-
import * as
|
|
681
|
+
import * as React13 from "react";
|
|
706
682
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
707
683
|
import { Check } from "lucide-react";
|
|
708
|
-
import { jsx as
|
|
709
|
-
var Checkbox =
|
|
684
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
685
|
+
var Checkbox = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
710
686
|
CheckboxPrimitive.Root,
|
|
711
687
|
{
|
|
712
688
|
ref,
|
|
@@ -715,24 +691,24 @@ var Checkbox = React14.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
715
691
|
className
|
|
716
692
|
),
|
|
717
693
|
...props,
|
|
718
|
-
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" }) })
|
|
719
695
|
}
|
|
720
696
|
));
|
|
721
697
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
722
|
-
var CheckboxIndicator =
|
|
698
|
+
var CheckboxIndicator = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
723
699
|
CheckboxPrimitive.Indicator,
|
|
724
700
|
{
|
|
725
701
|
ref,
|
|
726
702
|
className: cn("grid place-content-center", className),
|
|
727
703
|
...props,
|
|
728
|
-
children: children ?? /* @__PURE__ */
|
|
704
|
+
children: children ?? /* @__PURE__ */ jsx13(Check, { className: "h-4 w-4" })
|
|
729
705
|
}
|
|
730
706
|
));
|
|
731
707
|
CheckboxIndicator.displayName = CheckboxPrimitive.Indicator.displayName;
|
|
732
708
|
|
|
733
709
|
// src/components/checkbox/Checkbox.tsx
|
|
734
|
-
import { jsx as
|
|
735
|
-
var checkboxVariants =
|
|
710
|
+
import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
711
|
+
var checkboxVariants = cva7(
|
|
736
712
|
"inline-flex items-center justify-center rounded-md transition-all duration-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
737
713
|
{
|
|
738
714
|
variants: {
|
|
@@ -753,13 +729,13 @@ var checkboxVariants = cva8(
|
|
|
753
729
|
}
|
|
754
730
|
}
|
|
755
731
|
);
|
|
756
|
-
var Checkbox2 =
|
|
732
|
+
var Checkbox2 = React14.forwardRef(
|
|
757
733
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
758
|
-
const generatedId =
|
|
734
|
+
const generatedId = React14.useId();
|
|
759
735
|
const checkboxId = id || generatedId;
|
|
760
736
|
const errorId = `${checkboxId}-error`;
|
|
761
737
|
return /* @__PURE__ */ jsxs5("div", { className: "flex items-start gap-3", children: [
|
|
762
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ jsx14("div", { className: "relative flex items-start pt-0.5", children: /* @__PURE__ */ jsx14(
|
|
763
739
|
Checkbox,
|
|
764
740
|
{
|
|
765
741
|
ref,
|
|
@@ -774,7 +750,7 @@ var Checkbox2 = React15.forwardRef(
|
|
|
774
750
|
className
|
|
775
751
|
),
|
|
776
752
|
...props,
|
|
777
|
-
children: /* @__PURE__ */
|
|
753
|
+
children: /* @__PURE__ */ jsx14(CheckboxPrimitive2.Indicator, { children: /* @__PURE__ */ jsx14(
|
|
778
754
|
Check2,
|
|
779
755
|
{
|
|
780
756
|
className: "h-4 w-4 text-current stroke-current",
|
|
@@ -784,7 +760,7 @@ var Checkbox2 = React15.forwardRef(
|
|
|
784
760
|
}
|
|
785
761
|
) }),
|
|
786
762
|
(label || description || error) && /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-1", children: [
|
|
787
|
-
label && /* @__PURE__ */
|
|
763
|
+
label && /* @__PURE__ */ jsx14(
|
|
788
764
|
"label",
|
|
789
765
|
{
|
|
790
766
|
htmlFor: checkboxId,
|
|
@@ -796,8 +772,8 @@ var Checkbox2 = React15.forwardRef(
|
|
|
796
772
|
children: label
|
|
797
773
|
}
|
|
798
774
|
),
|
|
799
|
-
description && /* @__PURE__ */
|
|
800
|
-
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 })
|
|
801
777
|
] })
|
|
802
778
|
] });
|
|
803
779
|
}
|
|
@@ -805,11 +781,11 @@ var Checkbox2 = React15.forwardRef(
|
|
|
805
781
|
Checkbox2.displayName = "Checkbox";
|
|
806
782
|
|
|
807
783
|
// src/components/switch/Switch.tsx
|
|
808
|
-
import * as
|
|
784
|
+
import * as React15 from "react";
|
|
809
785
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
810
|
-
import { cva as
|
|
811
|
-
import { jsx as
|
|
812
|
-
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(
|
|
813
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",
|
|
814
790
|
{
|
|
815
791
|
variants: {
|
|
@@ -830,7 +806,7 @@ var switchRootVariants = cva9(
|
|
|
830
806
|
}
|
|
831
807
|
}
|
|
832
808
|
);
|
|
833
|
-
var switchThumbVariants =
|
|
809
|
+
var switchThumbVariants = cva8(
|
|
834
810
|
"pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground",
|
|
835
811
|
{
|
|
836
812
|
variants: {
|
|
@@ -845,13 +821,13 @@ var switchThumbVariants = cva9(
|
|
|
845
821
|
}
|
|
846
822
|
}
|
|
847
823
|
);
|
|
848
|
-
var Switch =
|
|
824
|
+
var Switch = React15.forwardRef(
|
|
849
825
|
({ className, variant, size, label, description, error, id, disabled, ...props }, ref) => {
|
|
850
|
-
const generatedId =
|
|
826
|
+
const generatedId = React15.useId();
|
|
851
827
|
const switchId = id || generatedId;
|
|
852
828
|
const errorId = `${switchId}-error`;
|
|
853
829
|
return /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-3", children: [
|
|
854
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ jsx15(
|
|
855
831
|
SwitchPrimitives.Root,
|
|
856
832
|
{
|
|
857
833
|
ref,
|
|
@@ -865,11 +841,11 @@ var Switch = React16.forwardRef(
|
|
|
865
841
|
className
|
|
866
842
|
),
|
|
867
843
|
...props,
|
|
868
|
-
children: /* @__PURE__ */
|
|
844
|
+
children: /* @__PURE__ */ jsx15(SwitchPrimitives.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
869
845
|
}
|
|
870
846
|
),
|
|
871
847
|
(label || description || error) && /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1", children: [
|
|
872
|
-
label && /* @__PURE__ */
|
|
848
|
+
label && /* @__PURE__ */ jsx15(
|
|
873
849
|
"label",
|
|
874
850
|
{
|
|
875
851
|
htmlFor: switchId,
|
|
@@ -880,8 +856,8 @@ var Switch = React16.forwardRef(
|
|
|
880
856
|
children: label
|
|
881
857
|
}
|
|
882
858
|
),
|
|
883
|
-
description && /* @__PURE__ */
|
|
884
|
-
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 })
|
|
885
861
|
] })
|
|
886
862
|
] });
|
|
887
863
|
}
|
|
@@ -889,17 +865,17 @@ var Switch = React16.forwardRef(
|
|
|
889
865
|
Switch.displayName = "Switch";
|
|
890
866
|
|
|
891
867
|
// src/components/select/Select.tsx
|
|
892
|
-
import * as
|
|
893
|
-
import { cva as
|
|
868
|
+
import * as React17 from "react";
|
|
869
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
894
870
|
|
|
895
871
|
// src/primitives/select.tsx
|
|
896
|
-
import * as
|
|
872
|
+
import * as React16 from "react";
|
|
897
873
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
898
874
|
import { Check as Check3, ChevronDown, ChevronUp } from "lucide-react";
|
|
899
|
-
import { jsx as
|
|
875
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
900
876
|
var Select = SelectPrimitive.Root;
|
|
901
877
|
var SelectValue = SelectPrimitive.Value;
|
|
902
|
-
var SelectTrigger =
|
|
878
|
+
var SelectTrigger = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
903
879
|
SelectPrimitive.Trigger,
|
|
904
880
|
{
|
|
905
881
|
ref,
|
|
@@ -910,32 +886,32 @@ var SelectTrigger = React17.forwardRef(({ className, children, ...props }, ref)
|
|
|
910
886
|
...props,
|
|
911
887
|
children: [
|
|
912
888
|
children,
|
|
913
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ jsx16(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx16(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
914
890
|
]
|
|
915
891
|
}
|
|
916
892
|
));
|
|
917
893
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
918
|
-
var SelectScrollUpButton =
|
|
894
|
+
var SelectScrollUpButton = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
919
895
|
SelectPrimitive.ScrollUpButton,
|
|
920
896
|
{
|
|
921
897
|
ref,
|
|
922
898
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
923
899
|
...props,
|
|
924
|
-
children: /* @__PURE__ */
|
|
900
|
+
children: /* @__PURE__ */ jsx16(ChevronUp, { className: "h-4 w-4" })
|
|
925
901
|
}
|
|
926
902
|
));
|
|
927
903
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
928
|
-
var SelectScrollDownButton =
|
|
904
|
+
var SelectScrollDownButton = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
929
905
|
SelectPrimitive.ScrollDownButton,
|
|
930
906
|
{
|
|
931
907
|
ref,
|
|
932
908
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
933
909
|
...props,
|
|
934
|
-
children: /* @__PURE__ */
|
|
910
|
+
children: /* @__PURE__ */ jsx16(ChevronDown, { className: "h-4 w-4" })
|
|
935
911
|
}
|
|
936
912
|
));
|
|
937
913
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
938
|
-
var SelectContent =
|
|
914
|
+
var SelectContent = React16.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx16(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs7(
|
|
939
915
|
SelectPrimitive.Content,
|
|
940
916
|
{
|
|
941
917
|
ref,
|
|
@@ -947,8 +923,8 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
|
|
|
947
923
|
position,
|
|
948
924
|
...props,
|
|
949
925
|
children: [
|
|
950
|
-
/* @__PURE__ */
|
|
951
|
-
/* @__PURE__ */
|
|
926
|
+
/* @__PURE__ */ jsx16(SelectScrollUpButton, {}),
|
|
927
|
+
/* @__PURE__ */ jsx16(
|
|
952
928
|
SelectPrimitive.Viewport,
|
|
953
929
|
{
|
|
954
930
|
className: cn(
|
|
@@ -958,12 +934,12 @@ var SelectContent = React17.forwardRef(({ className, children, position = "poppe
|
|
|
958
934
|
children
|
|
959
935
|
}
|
|
960
936
|
),
|
|
961
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ jsx16(SelectScrollDownButton, {})
|
|
962
938
|
]
|
|
963
939
|
}
|
|
964
940
|
) }));
|
|
965
941
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
966
|
-
var SelectLabel =
|
|
942
|
+
var SelectLabel = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
967
943
|
SelectPrimitive.Label,
|
|
968
944
|
{
|
|
969
945
|
ref,
|
|
@@ -972,7 +948,7 @@ var SelectLabel = React17.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
972
948
|
}
|
|
973
949
|
));
|
|
974
950
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
975
|
-
var SelectItem =
|
|
951
|
+
var SelectItem = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
976
952
|
SelectPrimitive.Item,
|
|
977
953
|
{
|
|
978
954
|
ref,
|
|
@@ -982,13 +958,13 @@ var SelectItem = React17.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
982
958
|
),
|
|
983
959
|
...props,
|
|
984
960
|
children: [
|
|
985
|
-
/* @__PURE__ */
|
|
986
|
-
/* @__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 })
|
|
987
963
|
]
|
|
988
964
|
}
|
|
989
965
|
));
|
|
990
966
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
991
|
-
var SelectSeparator =
|
|
967
|
+
var SelectSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
|
|
992
968
|
SelectPrimitive.Separator,
|
|
993
969
|
{
|
|
994
970
|
ref,
|
|
@@ -999,8 +975,8 @@ var SelectSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
999
975
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
1000
976
|
|
|
1001
977
|
// src/components/select/Select.tsx
|
|
1002
|
-
import { jsx as
|
|
1003
|
-
var selectVariants =
|
|
978
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
979
|
+
var selectVariants = cva9(
|
|
1004
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",
|
|
1005
981
|
{
|
|
1006
982
|
variants: {
|
|
@@ -1022,7 +998,7 @@ var selectVariants = cva10(
|
|
|
1022
998
|
}
|
|
1023
999
|
}
|
|
1024
1000
|
);
|
|
1025
|
-
var Select2 =
|
|
1001
|
+
var Select2 = React17.forwardRef(
|
|
1026
1002
|
({
|
|
1027
1003
|
className,
|
|
1028
1004
|
variant,
|
|
@@ -1040,12 +1016,12 @@ var Select2 = React18.forwardRef(
|
|
|
1040
1016
|
name,
|
|
1041
1017
|
required
|
|
1042
1018
|
}, ref) => {
|
|
1043
|
-
const generatedId =
|
|
1019
|
+
const generatedId = React17.useId();
|
|
1044
1020
|
const selectId = id || generatedId;
|
|
1045
1021
|
const errorId = `${selectId}-error`;
|
|
1046
1022
|
const descriptionId = `${selectId}-description`;
|
|
1047
1023
|
return /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-2", children: [
|
|
1048
|
-
label && /* @__PURE__ */
|
|
1024
|
+
label && /* @__PURE__ */ jsx17(
|
|
1049
1025
|
"label",
|
|
1050
1026
|
{
|
|
1051
1027
|
htmlFor: selectId,
|
|
@@ -1067,7 +1043,7 @@ var Select2 = React18.forwardRef(
|
|
|
1067
1043
|
name,
|
|
1068
1044
|
required,
|
|
1069
1045
|
children: [
|
|
1070
|
-
/* @__PURE__ */
|
|
1046
|
+
/* @__PURE__ */ jsx17(
|
|
1071
1047
|
SelectTrigger,
|
|
1072
1048
|
{
|
|
1073
1049
|
ref,
|
|
@@ -1079,30 +1055,30 @@ var Select2 = React18.forwardRef(
|
|
|
1079
1055
|
error && "border-berget-destructive-foreground/50 bg-berget-destructive",
|
|
1080
1056
|
className
|
|
1081
1057
|
),
|
|
1082
|
-
children: /* @__PURE__ */
|
|
1058
|
+
children: /* @__PURE__ */ jsx17(SelectValue, { placeholder })
|
|
1083
1059
|
}
|
|
1084
1060
|
),
|
|
1085
|
-
/* @__PURE__ */
|
|
1061
|
+
/* @__PURE__ */ jsx17(SelectContent, { children: options.map((option) => /* @__PURE__ */ jsx17(SelectItem, { value: option.value, disabled: option.disabled, children: option.label }, option.value)) })
|
|
1086
1062
|
]
|
|
1087
1063
|
}
|
|
1088
1064
|
),
|
|
1089
|
-
description && /* @__PURE__ */
|
|
1090
|
-
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 })
|
|
1091
1067
|
] });
|
|
1092
1068
|
}
|
|
1093
1069
|
);
|
|
1094
1070
|
Select2.displayName = "Select";
|
|
1095
1071
|
|
|
1096
1072
|
// src/components/text-area/TextArea.tsx
|
|
1097
|
-
import * as
|
|
1098
|
-
import { cva as
|
|
1073
|
+
import * as React19 from "react";
|
|
1074
|
+
import { cva as cva10 } from "class-variance-authority";
|
|
1099
1075
|
|
|
1100
1076
|
// src/primitives/textarea.tsx
|
|
1101
|
-
import * as
|
|
1102
|
-
import { jsx as
|
|
1103
|
-
var Textarea =
|
|
1077
|
+
import * as React18 from "react";
|
|
1078
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1079
|
+
var Textarea = React18.forwardRef(
|
|
1104
1080
|
({ className, ...props }, ref) => {
|
|
1105
|
-
return /* @__PURE__ */
|
|
1081
|
+
return /* @__PURE__ */ jsx18(
|
|
1106
1082
|
"textarea",
|
|
1107
1083
|
{
|
|
1108
1084
|
className: cn(
|
|
@@ -1118,8 +1094,8 @@ var Textarea = React19.forwardRef(
|
|
|
1118
1094
|
Textarea.displayName = "Textarea";
|
|
1119
1095
|
|
|
1120
1096
|
// src/components/text-area/TextArea.tsx
|
|
1121
|
-
import { jsx as
|
|
1122
|
-
var textAreaVariants =
|
|
1097
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1098
|
+
var textAreaVariants = cva10(
|
|
1123
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",
|
|
1124
1100
|
{
|
|
1125
1101
|
variants: {
|
|
@@ -1141,7 +1117,7 @@ var textAreaVariants = cva11(
|
|
|
1141
1117
|
}
|
|
1142
1118
|
}
|
|
1143
1119
|
);
|
|
1144
|
-
var TextArea =
|
|
1120
|
+
var TextArea = React19.forwardRef(
|
|
1145
1121
|
({
|
|
1146
1122
|
className,
|
|
1147
1123
|
variant,
|
|
@@ -1161,13 +1137,13 @@ var TextArea = React20.forwardRef(
|
|
|
1161
1137
|
actionButton,
|
|
1162
1138
|
...props
|
|
1163
1139
|
}, ref) => {
|
|
1164
|
-
const generatedId =
|
|
1140
|
+
const generatedId = React19.useId();
|
|
1165
1141
|
const textareaId = id || generatedId;
|
|
1166
1142
|
const errorId = `${textareaId}-error`;
|
|
1167
1143
|
const descriptionId = `${textareaId}-description`;
|
|
1168
1144
|
const characterCount = typeof value === "string" ? value.length : 0;
|
|
1169
1145
|
return /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-2", children: [
|
|
1170
|
-
label && /* @__PURE__ */
|
|
1146
|
+
label && /* @__PURE__ */ jsx19(
|
|
1171
1147
|
"label",
|
|
1172
1148
|
{
|
|
1173
1149
|
htmlFor: textareaId,
|
|
@@ -1180,8 +1156,8 @@ var TextArea = React20.forwardRef(
|
|
|
1180
1156
|
}
|
|
1181
1157
|
),
|
|
1182
1158
|
/* @__PURE__ */ jsxs9("div", { className: "relative", children: [
|
|
1183
|
-
icon && /* @__PURE__ */
|
|
1184
|
-
/* @__PURE__ */
|
|
1159
|
+
icon && /* @__PURE__ */ jsx19("div", { className: "absolute left-2 top-1/2 -translate-y-1/2", children: icon }),
|
|
1160
|
+
/* @__PURE__ */ jsx19(
|
|
1185
1161
|
Textarea,
|
|
1186
1162
|
{
|
|
1187
1163
|
ref,
|
|
@@ -1206,11 +1182,11 @@ var TextArea = React20.forwardRef(
|
|
|
1206
1182
|
...props
|
|
1207
1183
|
}
|
|
1208
1184
|
),
|
|
1209
|
-
secondaryIcon && /* @__PURE__ */
|
|
1210
|
-
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 })
|
|
1211
1187
|
] }),
|
|
1212
1188
|
(description || error || showCount && maxLength) && /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1213
|
-
description && /* @__PURE__ */
|
|
1189
|
+
description && /* @__PURE__ */ jsx19(Typography, { variant: "xs", color: "muted", id: descriptionId, children: description }),
|
|
1214
1190
|
(error || showCount && maxLength) && /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2 ml-auto", children: [
|
|
1215
1191
|
showCount && maxLength && /* @__PURE__ */ jsxs9(
|
|
1216
1192
|
Typography,
|
|
@@ -1226,7 +1202,7 @@ var TextArea = React20.forwardRef(
|
|
|
1226
1202
|
]
|
|
1227
1203
|
}
|
|
1228
1204
|
),
|
|
1229
|
-
error && /* @__PURE__ */
|
|
1205
|
+
error && /* @__PURE__ */ jsx19(
|
|
1230
1206
|
Typography,
|
|
1231
1207
|
{
|
|
1232
1208
|
variant: "xs",
|
|
@@ -1243,25 +1219,25 @@ var TextArea = React20.forwardRef(
|
|
|
1243
1219
|
TextArea.displayName = "TextArea";
|
|
1244
1220
|
|
|
1245
1221
|
// src/primitives/label.tsx
|
|
1246
|
-
import * as
|
|
1222
|
+
import * as React20 from "react";
|
|
1247
1223
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1248
|
-
import { cva as
|
|
1249
|
-
import { jsx as
|
|
1250
|
-
var labelVariants =
|
|
1224
|
+
import { cva as cva11 } from "class-variance-authority";
|
|
1225
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1226
|
+
var labelVariants = cva11(
|
|
1251
1227
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1252
1228
|
);
|
|
1253
|
-
var Label2 =
|
|
1229
|
+
var Label2 = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
1254
1230
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1255
1231
|
|
|
1256
1232
|
// src/primitives/field.tsx
|
|
1257
1233
|
import { useMemo as useMemo2 } from "react";
|
|
1258
|
-
import { cva as
|
|
1234
|
+
import { cva as cva12 } from "class-variance-authority";
|
|
1259
1235
|
|
|
1260
1236
|
// src/primitives/separator.tsx
|
|
1261
|
-
import * as
|
|
1237
|
+
import * as React21 from "react";
|
|
1262
1238
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
1263
|
-
import { jsx as
|
|
1264
|
-
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(
|
|
1265
1241
|
SeparatorPrimitive.Root,
|
|
1266
1242
|
{
|
|
1267
1243
|
ref,
|
|
@@ -1278,9 +1254,9 @@ var Separator2 = React22.forwardRef(({ className, orientation = "horizontal", de
|
|
|
1278
1254
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
1279
1255
|
|
|
1280
1256
|
// src/primitives/field.tsx
|
|
1281
|
-
import { jsx as
|
|
1257
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1282
1258
|
function FieldSet({ className, ...props }) {
|
|
1283
|
-
return /* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ jsx22(
|
|
1284
1260
|
"fieldset",
|
|
1285
1261
|
{
|
|
1286
1262
|
"data-slot": "field-set",
|
|
@@ -1298,7 +1274,7 @@ function FieldLegend({
|
|
|
1298
1274
|
variant = "legend",
|
|
1299
1275
|
...props
|
|
1300
1276
|
}) {
|
|
1301
|
-
return /* @__PURE__ */
|
|
1277
|
+
return /* @__PURE__ */ jsx22(
|
|
1302
1278
|
"legend",
|
|
1303
1279
|
{
|
|
1304
1280
|
"data-slot": "field-legend",
|
|
@@ -1314,7 +1290,7 @@ function FieldLegend({
|
|
|
1314
1290
|
);
|
|
1315
1291
|
}
|
|
1316
1292
|
function FieldGroup({ className, ...props }) {
|
|
1317
|
-
return /* @__PURE__ */
|
|
1293
|
+
return /* @__PURE__ */ jsx22(
|
|
1318
1294
|
"div",
|
|
1319
1295
|
{
|
|
1320
1296
|
"data-slot": "field-group",
|
|
@@ -1326,7 +1302,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
1326
1302
|
}
|
|
1327
1303
|
);
|
|
1328
1304
|
}
|
|
1329
|
-
var fieldVariants =
|
|
1305
|
+
var fieldVariants = cva12("group/field data-[invalid=true]:text-destructive flex w-full gap-3", {
|
|
1330
1306
|
variants: {
|
|
1331
1307
|
orientation: {
|
|
1332
1308
|
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
@@ -1351,7 +1327,7 @@ function Field({
|
|
|
1351
1327
|
orientation = "vertical",
|
|
1352
1328
|
...props
|
|
1353
1329
|
}) {
|
|
1354
|
-
return /* @__PURE__ */
|
|
1330
|
+
return /* @__PURE__ */ jsx22(
|
|
1355
1331
|
"div",
|
|
1356
1332
|
{
|
|
1357
1333
|
role: "group",
|
|
@@ -1363,7 +1339,7 @@ function Field({
|
|
|
1363
1339
|
);
|
|
1364
1340
|
}
|
|
1365
1341
|
function FieldContent({ className, ...props }) {
|
|
1366
|
-
return /* @__PURE__ */
|
|
1342
|
+
return /* @__PURE__ */ jsx22(
|
|
1367
1343
|
"div",
|
|
1368
1344
|
{
|
|
1369
1345
|
"data-slot": "field-content",
|
|
@@ -1373,7 +1349,7 @@ function FieldContent({ className, ...props }) {
|
|
|
1373
1349
|
);
|
|
1374
1350
|
}
|
|
1375
1351
|
function FieldLabel({ className, ...props }) {
|
|
1376
|
-
return /* @__PURE__ */
|
|
1352
|
+
return /* @__PURE__ */ jsx22(
|
|
1377
1353
|
Label2,
|
|
1378
1354
|
{
|
|
1379
1355
|
"data-slot": "field-label",
|
|
@@ -1388,7 +1364,7 @@ function FieldLabel({ className, ...props }) {
|
|
|
1388
1364
|
);
|
|
1389
1365
|
}
|
|
1390
1366
|
function FieldTitle({ className, ...props }) {
|
|
1391
|
-
return /* @__PURE__ */
|
|
1367
|
+
return /* @__PURE__ */ jsx22(
|
|
1392
1368
|
"div",
|
|
1393
1369
|
{
|
|
1394
1370
|
"data-slot": "field-label",
|
|
@@ -1401,7 +1377,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1401
1377
|
);
|
|
1402
1378
|
}
|
|
1403
1379
|
function FieldDescription({ className, ...props }) {
|
|
1404
|
-
return /* @__PURE__ */
|
|
1380
|
+
return /* @__PURE__ */ jsx22(
|
|
1405
1381
|
"p",
|
|
1406
1382
|
{
|
|
1407
1383
|
"data-slot": "field-description",
|
|
@@ -1431,8 +1407,8 @@ function FieldSeparator({
|
|
|
1431
1407
|
),
|
|
1432
1408
|
...props,
|
|
1433
1409
|
children: [
|
|
1434
|
-
/* @__PURE__ */
|
|
1435
|
-
children && /* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ jsx22(Separator2, { className: "absolute inset-0 top-1/2" }),
|
|
1411
|
+
children && /* @__PURE__ */ jsx22(
|
|
1436
1412
|
"span",
|
|
1437
1413
|
{
|
|
1438
1414
|
className: "bg-berget-background text-berget-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -1460,12 +1436,12 @@ function FieldError({
|
|
|
1460
1436
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
1461
1437
|
return errors[0].message;
|
|
1462
1438
|
}
|
|
1463
|
-
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)) });
|
|
1464
1440
|
}, [children, errors]);
|
|
1465
1441
|
if (!content) {
|
|
1466
1442
|
return null;
|
|
1467
1443
|
}
|
|
1468
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ jsx22(
|
|
1469
1445
|
"div",
|
|
1470
1446
|
{
|
|
1471
1447
|
role: "alert",
|
|
@@ -1479,10 +1455,46 @@ function FieldError({
|
|
|
1479
1455
|
|
|
1480
1456
|
// src/components/link/Link.tsx
|
|
1481
1457
|
import * as React23 from "react";
|
|
1482
|
-
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
|
|
1483
1495
|
import { ExternalLink } from "lucide-react";
|
|
1484
1496
|
import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1485
|
-
var linkVariants =
|
|
1497
|
+
var linkVariants = cva13(
|
|
1486
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",
|
|
1487
1499
|
{
|
|
1488
1500
|
variants: {
|
|
@@ -1536,7 +1548,7 @@ var Link = React23.forwardRef(
|
|
|
1536
1548
|
children: [
|
|
1537
1549
|
children,
|
|
1538
1550
|
icon && /* @__PURE__ */ jsx24("span", { className: "inline-flex items-center", children: icon }),
|
|
1539
|
-
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 }) })
|
|
1540
1552
|
]
|
|
1541
1553
|
}
|
|
1542
1554
|
);
|
|
@@ -1546,14 +1558,14 @@ Link.displayName = "Link";
|
|
|
1546
1558
|
|
|
1547
1559
|
// src/components/section/Section.tsx
|
|
1548
1560
|
import * as React25 from "react";
|
|
1549
|
-
import { cva as
|
|
1561
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
1550
1562
|
|
|
1551
1563
|
// src/components/container/Container.tsx
|
|
1552
1564
|
import * as React24 from "react";
|
|
1553
1565
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
1554
|
-
import { cva as
|
|
1566
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
1555
1567
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1556
|
-
var containerVariants =
|
|
1568
|
+
var containerVariants = cva14("w-full mx-auto", {
|
|
1557
1569
|
variants: {
|
|
1558
1570
|
size: {
|
|
1559
1571
|
sm: "max-w-3xl",
|
|
@@ -1592,7 +1604,7 @@ Container.displayName = "Container";
|
|
|
1592
1604
|
|
|
1593
1605
|
// src/components/section/Section.tsx
|
|
1594
1606
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1595
|
-
var sectionVariants =
|
|
1607
|
+
var sectionVariants = cva15("relative", {
|
|
1596
1608
|
variants: {
|
|
1597
1609
|
padding: {
|
|
1598
1610
|
none: "",
|
|
@@ -1666,10 +1678,10 @@ SectionHeader.displayName = "SectionHeader";
|
|
|
1666
1678
|
|
|
1667
1679
|
// src/components/grid/Grid.tsx
|
|
1668
1680
|
import * as React27 from "react";
|
|
1669
|
-
import { cva as
|
|
1681
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
1670
1682
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
1671
1683
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1672
|
-
var gridVariants =
|
|
1684
|
+
var gridVariants = cva16("grid", {
|
|
1673
1685
|
variants: {
|
|
1674
1686
|
align: {
|
|
1675
1687
|
start: "items-start",
|
|
@@ -1717,10 +1729,10 @@ Grid.displayName = "Grid";
|
|
|
1717
1729
|
|
|
1718
1730
|
// src/components/box/Box.tsx
|
|
1719
1731
|
import * as React28 from "react";
|
|
1720
|
-
import { cva as
|
|
1732
|
+
import { cva as cva17 } from "class-variance-authority";
|
|
1721
1733
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
1722
1734
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1723
|
-
var boxVariants =
|
|
1735
|
+
var boxVariants = cva17("flex", {
|
|
1724
1736
|
variants: {
|
|
1725
1737
|
direction: {
|
|
1726
1738
|
row: "flex-row",
|
|
@@ -1894,7 +1906,7 @@ BergetLogo.displayName = "BergetLogo";
|
|
|
1894
1906
|
|
|
1895
1907
|
// src/components/header/Header.tsx
|
|
1896
1908
|
import * as React31 from "react";
|
|
1897
|
-
import { cva as
|
|
1909
|
+
import { cva as cva18 } from "class-variance-authority";
|
|
1898
1910
|
import { Menu, X } from "lucide-react";
|
|
1899
1911
|
|
|
1900
1912
|
// src/components/language-select/LanguageSelect.tsx
|
|
@@ -1925,7 +1937,7 @@ var LanguageSelect = React30.forwardRef(({ className, options, value, onValueCha
|
|
|
1925
1937
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1926
1938
|
className
|
|
1927
1939
|
),
|
|
1928
|
-
children: /* @__PURE__ */ jsx31(
|
|
1940
|
+
children: /* @__PURE__ */ jsx31(Icon2, { icon: Globe, size: 16 })
|
|
1929
1941
|
}
|
|
1930
1942
|
),
|
|
1931
1943
|
/* @__PURE__ */ jsx31(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx31(
|
|
@@ -1985,7 +1997,7 @@ LanguageSelect.displayName = "LanguageSelect";
|
|
|
1985
1997
|
|
|
1986
1998
|
// src/components/header/Header.tsx
|
|
1987
1999
|
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1988
|
-
var headerVariants =
|
|
2000
|
+
var headerVariants = cva18(
|
|
1989
2001
|
"sticky top-0 z-50 header-backdrop backdrop-blur-xl border-b border-berget-border transition-all duration-200",
|
|
1990
2002
|
{
|
|
1991
2003
|
variants: {
|
|
@@ -2018,7 +2030,7 @@ var HeaderNav = React31.forwardRef(({ className, links, ...props }, ref) => {
|
|
|
2018
2030
|
size: "sm",
|
|
2019
2031
|
className: cn("relative transition-all duration-200", link.active && "font-medium"),
|
|
2020
2032
|
children: [
|
|
2021
|
-
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 }) }),
|
|
2022
2034
|
link.label
|
|
2023
2035
|
]
|
|
2024
2036
|
}
|
|
@@ -2067,7 +2079,7 @@ var MobileMenuButton = React31.forwardRef(({ className, ...props }, ref) => {
|
|
|
2067
2079
|
"aria-expanded": isMobileMenuOpen,
|
|
2068
2080
|
"aria-controls": "mobile-menu",
|
|
2069
2081
|
...props,
|
|
2070
|
-
children: isMobileMenuOpen ? /* @__PURE__ */ jsx32(
|
|
2082
|
+
children: isMobileMenuOpen ? /* @__PURE__ */ jsx32(Icon2, { icon: X, size: 16 }) : /* @__PURE__ */ jsx32(Icon2, { icon: Menu, size: 16 })
|
|
2071
2083
|
}
|
|
2072
2084
|
);
|
|
2073
2085
|
});
|
|
@@ -2108,7 +2120,7 @@ var MobileMenu = React31.forwardRef(
|
|
|
2108
2120
|
),
|
|
2109
2121
|
onClick: () => setIsMobileMenuOpen(false),
|
|
2110
2122
|
children: [
|
|
2111
|
-
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 }) }),
|
|
2112
2124
|
link.label
|
|
2113
2125
|
]
|
|
2114
2126
|
}
|
|
@@ -2192,16 +2204,16 @@ Header.displayName = "Header";
|
|
|
2192
2204
|
|
|
2193
2205
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2194
2206
|
import * as React34 from "react";
|
|
2195
|
-
import { cva as
|
|
2207
|
+
import { cva as cva20 } from "class-variance-authority";
|
|
2196
2208
|
|
|
2197
2209
|
// src/components/list/List.tsx
|
|
2198
2210
|
import * as React33 from "react";
|
|
2199
2211
|
|
|
2200
2212
|
// src/components/divider/Divider.tsx
|
|
2201
2213
|
import * as React32 from "react";
|
|
2202
|
-
import { cva as
|
|
2214
|
+
import { cva as cva19 } from "class-variance-authority";
|
|
2203
2215
|
import { jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2204
|
-
var dividerVariants =
|
|
2216
|
+
var dividerVariants = cva19("", {
|
|
2205
2217
|
variants: {
|
|
2206
2218
|
variant: {
|
|
2207
2219
|
default: "bg-berget-separator",
|
|
@@ -2313,7 +2325,7 @@ ListHeader.displayName = "ListHeader";
|
|
|
2313
2325
|
var FeatureList = React33.forwardRef(
|
|
2314
2326
|
({ items, variant = "bullet", className, ...props }, ref) => {
|
|
2315
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: [
|
|
2316
|
-
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" }) }),
|
|
2317
2329
|
/* @__PURE__ */ jsx34(Typography, { variant: "body", color: "muted", children: item })
|
|
2318
2330
|
] }, index)) });
|
|
2319
2331
|
}
|
|
@@ -2322,7 +2334,7 @@ FeatureList.displayName = "FeatureList";
|
|
|
2322
2334
|
|
|
2323
2335
|
// src/components/feature-cards/FeatureCards.tsx
|
|
2324
2336
|
import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2325
|
-
var featureCardVariants =
|
|
2337
|
+
var featureCardVariants = cva20("", {
|
|
2326
2338
|
variants: {
|
|
2327
2339
|
variant: {
|
|
2328
2340
|
highlight: "",
|
|
@@ -2412,9 +2424,9 @@ FeatureCards.displayName = "FeatureCards";
|
|
|
2412
2424
|
|
|
2413
2425
|
// src/components/hero-block/HeroBlock.tsx
|
|
2414
2426
|
import * as React35 from "react";
|
|
2415
|
-
import { cva as
|
|
2427
|
+
import { cva as cva21 } from "class-variance-authority";
|
|
2416
2428
|
import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2417
|
-
var heroBlockVariants =
|
|
2429
|
+
var heroBlockVariants = cva21(
|
|
2418
2430
|
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
2419
2431
|
{
|
|
2420
2432
|
variants: {
|
|
@@ -2457,7 +2469,7 @@ var HeroBlock = React35.forwardRef(
|
|
|
2457
2469
|
Badge,
|
|
2458
2470
|
{
|
|
2459
2471
|
variant: "default",
|
|
2460
|
-
icon: TaglineIcon ? /* @__PURE__ */ jsx36(
|
|
2472
|
+
icon: TaglineIcon ? /* @__PURE__ */ jsx36(Icon2, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
2461
2473
|
iconGap: 2,
|
|
2462
2474
|
className: "mb-fluid-md",
|
|
2463
2475
|
children: tagline
|
|
@@ -2557,7 +2569,7 @@ export {
|
|
|
2557
2569
|
Grid,
|
|
2558
2570
|
Header,
|
|
2559
2571
|
HeroBlock,
|
|
2560
|
-
Icon,
|
|
2572
|
+
Icon2 as Icon,
|
|
2561
2573
|
Input2 as Input,
|
|
2562
2574
|
Label2 as Label,
|
|
2563
2575
|
LanguageSelect,
|
|
@@ -2576,7 +2588,7 @@ export {
|
|
|
2576
2588
|
alertVariants2 as alertVariants,
|
|
2577
2589
|
badgeVariants,
|
|
2578
2590
|
boxVariants,
|
|
2579
|
-
|
|
2591
|
+
buttonVariants,
|
|
2580
2592
|
cardVariants,
|
|
2581
2593
|
checkboxVariants,
|
|
2582
2594
|
containerVariants,
|