@bergetai/ui 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +94 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -59
- package/dist/index.d.ts +2 -59
- package/dist/index.js +94 -72
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +156 -20
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -45,7 +45,7 @@ declare const buttonVariants: (props?: ({
|
|
|
45
45
|
declare function Button$1({ className, variant, size, ...props }: Button$2.Props & VariantProps<typeof buttonVariants>): react_jsx_runtime.JSX.Element;
|
|
46
46
|
|
|
47
47
|
/** Variants exposed by the Berget wrapper. */
|
|
48
|
-
type CustomVariant = 'default' | 'primary' | 'destructive' | '
|
|
48
|
+
type CustomVariant = 'default' | 'primary' | 'destructive' | 'link';
|
|
49
49
|
/** Props for the Berget Button wrapper. */
|
|
50
50
|
interface ButtonProps extends Omit<React$1.ComponentProps<typeof Button$1>, 'variant' | 'ref'> {
|
|
51
51
|
/** Visual style variant. `primary` is Berget-specific. */
|
|
@@ -605,63 +605,6 @@ interface FeatureListProps extends React$1.HTMLAttributes<HTMLUListElement> {
|
|
|
605
605
|
}
|
|
606
606
|
declare const FeatureList: React$1.ForwardRefExoticComponent<FeatureListProps & React$1.RefAttributes<HTMLUListElement>>;
|
|
607
607
|
|
|
608
|
-
interface HeroBlockProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
609
|
-
/**
|
|
610
|
-
* Optional icon for the tagline badge
|
|
611
|
-
*/
|
|
612
|
-
taglineIcon?: LucideIcon;
|
|
613
|
-
/**
|
|
614
|
-
* Tagline text (appears in badge)
|
|
615
|
-
*/
|
|
616
|
-
tagline?: string;
|
|
617
|
-
/**
|
|
618
|
-
* Main hero title
|
|
619
|
-
*/
|
|
620
|
-
title: string;
|
|
621
|
-
/**
|
|
622
|
-
* Hero description
|
|
623
|
-
*/
|
|
624
|
-
description: string;
|
|
625
|
-
/**
|
|
626
|
-
* Call-to-action buttons
|
|
627
|
-
*/
|
|
628
|
-
actions?: React$1.ReactNode;
|
|
629
|
-
}
|
|
630
|
-
/**
|
|
631
|
-
* Hero Block Component
|
|
632
|
-
*
|
|
633
|
-
* Full-width hero section with optional tagline, title, description, and CTAs.
|
|
634
|
-
* Based on the pattern from why-berget and other landing pages.
|
|
635
|
-
*
|
|
636
|
-
* **Features:**
|
|
637
|
-
* - Tagline badge with optional icon
|
|
638
|
-
* - Responsive sizing
|
|
639
|
-
* - CTA button slots
|
|
640
|
-
*
|
|
641
|
-
* **Use Cases:**
|
|
642
|
-
* - Page heroes
|
|
643
|
-
* - Landing page intros
|
|
644
|
-
* - Feature announcements
|
|
645
|
-
* - Product showcases
|
|
646
|
-
*
|
|
647
|
-
* @example
|
|
648
|
-
* ```tsx
|
|
649
|
-
* <HeroBlock
|
|
650
|
-
* tagline="Built for Europe"
|
|
651
|
-
* taglineIcon={Shield}
|
|
652
|
-
* title="European AI Infrastructure"
|
|
653
|
-
* description="Deploy and scale AI models with data residency in Europe"
|
|
654
|
-
* actions={
|
|
655
|
-
* <>
|
|
656
|
-
* <Button size="lg" variant="primary">Get Started</Button>
|
|
657
|
-
* <Button size="lg" variant="outline">Learn More</Button>
|
|
658
|
-
* </>
|
|
659
|
-
* }
|
|
660
|
-
* />
|
|
661
|
-
* ```
|
|
662
|
-
*/
|
|
663
|
-
declare const HeroBlock: React$1.ForwardRefExoticComponent<HeroBlockProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
664
|
-
|
|
665
608
|
interface CodeBlockProps {
|
|
666
609
|
code: string;
|
|
667
610
|
language?: string;
|
|
@@ -729,4 +672,4 @@ interface FogIllustrationProps {
|
|
|
729
672
|
}
|
|
730
673
|
declare const FogIllustration: ({ palette, speed, className }: FogIllustrationProps) => react_jsx_runtime.JSX.Element;
|
|
731
674
|
|
|
732
|
-
export { Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Badge, type BadgeProps, BergetLogo, type BergetLogoProps, Box, type BoxProps, type SpacingScale as BoxSpacingScale, Button, type ButtonProps, COUNTRIES, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, Container, type ContainerProps, type Country, CountrySelect, type CountrySelectProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EU_COUNTRY_CODES, FOG_BRAND_PALETTE, FeatureList, type FeatureListProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FogIllustration, type FogIllustrationProps, type FogPalette, Grid, type GridColsScale, type GridProps, type GridRowsScale, type SpacingScale$1 as GridSpacingScale,
|
|
675
|
+
export { Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Badge, type BadgeProps, BergetLogo, type BergetLogoProps, Box, type BoxProps, type SpacingScale as BoxSpacingScale, Button, type ButtonProps, COUNTRIES, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, Container, type ContainerProps, type Country, CountrySelect, type CountrySelectProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EU_COUNTRY_CODES, FOG_BRAND_PALETTE, FeatureList, type FeatureListProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FogIllustration, type FogIllustrationProps, type FogPalette, Grid, type GridColsScale, type GridProps, type GridRowsScale, type SpacingScale$1 as GridSpacingScale, Icon, type IconProps, Input, type InputProps, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, type ItemProps, ItemSeparator, ItemTitle, Label, LanguageSelect, type LanguageSelectOption, type LanguageSelectProps, Link, type LinkProps, List, ListHeader, type ListHeaderProps, ListItem, type ListItemProps, type ListProps, ModelCard, type ModelCardProps, type ModelCategory, type ModelLifecycle, ModelLogo, type ModelLogoProps, type ModelLogoProvider, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, Select, type SelectOption, type SelectProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, type TerminalExample, TextArea, type TextAreaProps, type Theme, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, Typography, type TypographyProps, WindowFrame, type WindowFrameProps, type WindowTab, alertVariants, badgeVariants, boxVariants, buttonVariants, cardVariants, categoryLabels, checkboxVariants, containerVariants, getCountryByCode, getCountryByName, gridVariants, isEUCountry, linkVariants, navigationMenuTriggerStyle, selectVariants, switchRootVariants, switchThumbVariants, textAreaVariants, typographyVariants, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ declare const buttonVariants: (props?: ({
|
|
|
45
45
|
declare function Button$1({ className, variant, size, ...props }: Button$2.Props & VariantProps<typeof buttonVariants>): react_jsx_runtime.JSX.Element;
|
|
46
46
|
|
|
47
47
|
/** Variants exposed by the Berget wrapper. */
|
|
48
|
-
type CustomVariant = 'default' | 'primary' | 'destructive' | '
|
|
48
|
+
type CustomVariant = 'default' | 'primary' | 'destructive' | 'link';
|
|
49
49
|
/** Props for the Berget Button wrapper. */
|
|
50
50
|
interface ButtonProps extends Omit<React$1.ComponentProps<typeof Button$1>, 'variant' | 'ref'> {
|
|
51
51
|
/** Visual style variant. `primary` is Berget-specific. */
|
|
@@ -605,63 +605,6 @@ interface FeatureListProps extends React$1.HTMLAttributes<HTMLUListElement> {
|
|
|
605
605
|
}
|
|
606
606
|
declare const FeatureList: React$1.ForwardRefExoticComponent<FeatureListProps & React$1.RefAttributes<HTMLUListElement>>;
|
|
607
607
|
|
|
608
|
-
interface HeroBlockProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
609
|
-
/**
|
|
610
|
-
* Optional icon for the tagline badge
|
|
611
|
-
*/
|
|
612
|
-
taglineIcon?: LucideIcon;
|
|
613
|
-
/**
|
|
614
|
-
* Tagline text (appears in badge)
|
|
615
|
-
*/
|
|
616
|
-
tagline?: string;
|
|
617
|
-
/**
|
|
618
|
-
* Main hero title
|
|
619
|
-
*/
|
|
620
|
-
title: string;
|
|
621
|
-
/**
|
|
622
|
-
* Hero description
|
|
623
|
-
*/
|
|
624
|
-
description: string;
|
|
625
|
-
/**
|
|
626
|
-
* Call-to-action buttons
|
|
627
|
-
*/
|
|
628
|
-
actions?: React$1.ReactNode;
|
|
629
|
-
}
|
|
630
|
-
/**
|
|
631
|
-
* Hero Block Component
|
|
632
|
-
*
|
|
633
|
-
* Full-width hero section with optional tagline, title, description, and CTAs.
|
|
634
|
-
* Based on the pattern from why-berget and other landing pages.
|
|
635
|
-
*
|
|
636
|
-
* **Features:**
|
|
637
|
-
* - Tagline badge with optional icon
|
|
638
|
-
* - Responsive sizing
|
|
639
|
-
* - CTA button slots
|
|
640
|
-
*
|
|
641
|
-
* **Use Cases:**
|
|
642
|
-
* - Page heroes
|
|
643
|
-
* - Landing page intros
|
|
644
|
-
* - Feature announcements
|
|
645
|
-
* - Product showcases
|
|
646
|
-
*
|
|
647
|
-
* @example
|
|
648
|
-
* ```tsx
|
|
649
|
-
* <HeroBlock
|
|
650
|
-
* tagline="Built for Europe"
|
|
651
|
-
* taglineIcon={Shield}
|
|
652
|
-
* title="European AI Infrastructure"
|
|
653
|
-
* description="Deploy and scale AI models with data residency in Europe"
|
|
654
|
-
* actions={
|
|
655
|
-
* <>
|
|
656
|
-
* <Button size="lg" variant="primary">Get Started</Button>
|
|
657
|
-
* <Button size="lg" variant="outline">Learn More</Button>
|
|
658
|
-
* </>
|
|
659
|
-
* }
|
|
660
|
-
* />
|
|
661
|
-
* ```
|
|
662
|
-
*/
|
|
663
|
-
declare const HeroBlock: React$1.ForwardRefExoticComponent<HeroBlockProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
664
|
-
|
|
665
608
|
interface CodeBlockProps {
|
|
666
609
|
code: string;
|
|
667
610
|
language?: string;
|
|
@@ -729,4 +672,4 @@ interface FogIllustrationProps {
|
|
|
729
672
|
}
|
|
730
673
|
declare const FogIllustration: ({ palette, speed, className }: FogIllustrationProps) => react_jsx_runtime.JSX.Element;
|
|
731
674
|
|
|
732
|
-
export { Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Badge, type BadgeProps, BergetLogo, type BergetLogoProps, Box, type BoxProps, type SpacingScale as BoxSpacingScale, Button, type ButtonProps, COUNTRIES, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, Container, type ContainerProps, type Country, CountrySelect, type CountrySelectProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EU_COUNTRY_CODES, FOG_BRAND_PALETTE, FeatureList, type FeatureListProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FogIllustration, type FogIllustrationProps, type FogPalette, Grid, type GridColsScale, type GridProps, type GridRowsScale, type SpacingScale$1 as GridSpacingScale,
|
|
675
|
+
export { Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Badge, type BadgeProps, BergetLogo, type BergetLogoProps, Box, type BoxProps, type SpacingScale as BoxSpacingScale, Button, type ButtonProps, COUNTRIES, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, Container, type ContainerProps, type Country, CountrySelect, type CountrySelectProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EU_COUNTRY_CODES, FOG_BRAND_PALETTE, FeatureList, type FeatureListProps, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, FogIllustration, type FogIllustrationProps, type FogPalette, Grid, type GridColsScale, type GridProps, type GridRowsScale, type SpacingScale$1 as GridSpacingScale, Icon, type IconProps, Input, type InputProps, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, type ItemProps, ItemSeparator, ItemTitle, Label, LanguageSelect, type LanguageSelectOption, type LanguageSelectProps, Link, type LinkProps, List, ListHeader, type ListHeaderProps, ListItem, type ListItemProps, type ListProps, ModelCard, type ModelCardProps, type ModelCategory, type ModelLifecycle, ModelLogo, type ModelLogoProps, type ModelLogoProvider, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, Select, type SelectOption, type SelectProps, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, type TerminalExample, TextArea, type TextAreaProps, type Theme, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, Typography, type TypographyProps, WindowFrame, type WindowFrameProps, type WindowTab, alertVariants, badgeVariants, boxVariants, buttonVariants, cardVariants, categoryLabels, checkboxVariants, containerVariants, getCountryByCode, getCountryByName, gridVariants, isEUCountry, linkVariants, navigationMenuTriggerStyle, selectVariants, switchRootVariants, switchThumbVariants, textAreaVariants, typographyVariants, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -262,21 +262,72 @@ function Button({
|
|
|
262
262
|
|
|
263
263
|
// src/components/button/Button.tsx
|
|
264
264
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
265
|
+
var interactionClasses = cn(
|
|
266
|
+
// Outline-based focus indicator; neutralise the primitive's ring (the
|
|
267
|
+
// ring colour class is left — harmless at width 0).
|
|
268
|
+
"focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:ring-0",
|
|
269
|
+
// Neutralise the primitive's disabled fade; variants apply their own tokens.
|
|
270
|
+
"disabled:pointer-events-none disabled:opacity-100 disabled:cursor-not-allowed",
|
|
271
|
+
// No press movement: same compound selector as the primitive base's 1px
|
|
272
|
+
// active translate so tailwind-merge strips it down to 0.
|
|
273
|
+
"active:not-aria-[haspopup]:translate-y-0"
|
|
274
|
+
);
|
|
275
|
+
var disabledClasses = "disabled:text-berget-button-disabled-fg disabled:shadow-none";
|
|
265
276
|
function brandVariantClasses(variant) {
|
|
266
277
|
switch (variant) {
|
|
267
278
|
case "primary":
|
|
268
|
-
return
|
|
279
|
+
return cn(
|
|
280
|
+
// Flat tinted-glass fill; the alpha carries the state, so no shadow lift.
|
|
281
|
+
"bg-berget-button-primary-bg text-berget-button-primary-fg",
|
|
282
|
+
"hover:bg-berget-button-primary-hover",
|
|
283
|
+
// Pin the foreground on hover — the underlying primitive ghost adds
|
|
284
|
+
// hover:text-foreground, which would override the primary fg token.
|
|
285
|
+
"hover:text-berget-button-primary-fg",
|
|
286
|
+
"active:bg-berget-button-primary-active",
|
|
287
|
+
// Keep the resting (transparent) border on focus — the outline is the indicator.
|
|
288
|
+
"focus-visible:border-transparent",
|
|
289
|
+
disabledClasses,
|
|
290
|
+
"disabled:bg-berget-button-primary-disabled-bg"
|
|
291
|
+
);
|
|
269
292
|
case "destructive":
|
|
270
|
-
return
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
293
|
+
return cn(
|
|
294
|
+
"bg-berget-button-destructive-bg text-berget-button-destructive-fg",
|
|
295
|
+
"hover:bg-berget-button-destructive-hover",
|
|
296
|
+
// Pin the foreground on hover — the underlying primitive ghost adds
|
|
297
|
+
// hover:text-foreground, which would override the destructive fg token.
|
|
298
|
+
"hover:text-berget-button-destructive-hover-fg",
|
|
299
|
+
"active:bg-berget-button-destructive-active",
|
|
300
|
+
"focus-visible:border-transparent",
|
|
301
|
+
disabledClasses,
|
|
302
|
+
"disabled:bg-berget-button-destructive-disabled-bg"
|
|
303
|
+
);
|
|
275
304
|
case "link":
|
|
276
|
-
return
|
|
305
|
+
return cn(
|
|
306
|
+
"h-auto bg-transparent p-0 text-berget-button-link-fg underline-offset-4 shadow-none",
|
|
307
|
+
"hover:bg-transparent hover:text-berget-button-link-hover-fg",
|
|
308
|
+
// On press, return to the resting foreground (hover fg otherwise sticks).
|
|
309
|
+
"active:text-berget-button-link-fg",
|
|
310
|
+
"focus:bg-transparent",
|
|
311
|
+
// Neutralise the primitive base's focus-visible:border-ring + ring-3,
|
|
312
|
+
// which land on link too (the primitive merges its cva base under
|
|
313
|
+
// every variant): the outline above is the only focus indicator.
|
|
314
|
+
"focus-visible:border-transparent focus-visible:ring-0",
|
|
315
|
+
"focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:rounded-berget-xs",
|
|
316
|
+
"disabled:text-berget-button-disabled-fg disabled:no-underline",
|
|
317
|
+
"disabled:opacity-100 disabled:cursor-not-allowed"
|
|
318
|
+
);
|
|
277
319
|
case "default":
|
|
278
320
|
default:
|
|
279
|
-
return
|
|
321
|
+
return cn(
|
|
322
|
+
// Solid granite-800 fill with a granite-700 border on dark surfaces
|
|
323
|
+
// (ink glass in light theme).
|
|
324
|
+
"bg-berget-button-default-bg border-berget-button-default-border text-berget-button-default-fg",
|
|
325
|
+
"hover:bg-berget-button-default-hover",
|
|
326
|
+
"active:bg-berget-button-default-active",
|
|
327
|
+
"focus-visible:border-transparent",
|
|
328
|
+
disabledClasses,
|
|
329
|
+
"disabled:bg-berget-button-default-disabled-bg"
|
|
330
|
+
);
|
|
280
331
|
}
|
|
281
332
|
}
|
|
282
333
|
function primitiveVariant(variant) {
|
|
@@ -303,9 +354,16 @@ function Button2({
|
|
|
303
354
|
const isLink = variant === "link";
|
|
304
355
|
const baseClass = cn(
|
|
305
356
|
!isLink && buttonVariants({ variant: primitiveVariant(variant), size }),
|
|
306
|
-
// Berget brand overrides
|
|
307
|
-
|
|
357
|
+
// Berget brand overrides — full-width buttons use the square radius;
|
|
358
|
+
// everything else stays pill-shaped.
|
|
359
|
+
!isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"),
|
|
360
|
+
// Em-based padding, inline = 2× block — matches the 8px/16px spacing-scale
|
|
361
|
+
// values at the default text-sm (14px) and scales down/up with smaller or
|
|
362
|
+
// larger button text. h-auto drops the primitive's fixed h-* so the
|
|
363
|
+
// vertical paddings take effect.
|
|
364
|
+
!isLink && !isIcon && "py-[0.57em] px-[1.14em] h-auto",
|
|
308
365
|
brandVariantClasses(variant),
|
|
366
|
+
interactionClasses,
|
|
309
367
|
!isLink && width === "full" && "w-full",
|
|
310
368
|
isIcon && "rounded-full shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]",
|
|
311
369
|
className
|
|
@@ -413,7 +471,7 @@ function Card({
|
|
|
413
471
|
"data-slot": "card",
|
|
414
472
|
"data-size": size,
|
|
415
473
|
className: cn3(
|
|
416
|
-
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-
|
|
474
|
+
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-berget-xs bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
417
475
|
className
|
|
418
476
|
),
|
|
419
477
|
...props
|
|
@@ -482,7 +540,7 @@ function CardFooter({ className, ...props }) {
|
|
|
482
540
|
|
|
483
541
|
// src/components/card/Card.tsx
|
|
484
542
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
485
|
-
var cardVariants = cva3("rounded-berget-
|
|
543
|
+
var cardVariants = cva3("rounded-berget-xs ring-0", {
|
|
486
544
|
variants: {
|
|
487
545
|
variant: {
|
|
488
546
|
outlined: "bg-transparent border border-berget-border-subtle",
|
|
@@ -822,7 +880,7 @@ var ModelCard = React9.forwardRef(
|
|
|
822
880
|
{
|
|
823
881
|
variant: "filled",
|
|
824
882
|
padding: "none",
|
|
825
|
-
className: "relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))]
|
|
883
|
+
className: "relative flex h-full flex-col bg-berget-card-filled-bg p-5 transition-all hover:bg-[color-mix(in_oklab,var(--berget-brand-granite-100)_5%,var(--berget-card-filled-bg))] sm:p-6",
|
|
826
884
|
children: [
|
|
827
885
|
lifecycle && /* @__PURE__ */ jsx11("div", { className: "absolute top-0 right-0 z-10 overflow-hidden rounded-bl-berget-sm", children: /* @__PURE__ */ jsx11(
|
|
828
886
|
"div",
|
|
@@ -3865,45 +3923,10 @@ var FeatureList = React29.forwardRef(
|
|
|
3865
3923
|
);
|
|
3866
3924
|
FeatureList.displayName = "FeatureList";
|
|
3867
3925
|
|
|
3868
|
-
// src/components/hero-block/HeroBlock.tsx
|
|
3869
|
-
import * as React30 from "react";
|
|
3870
|
-
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3871
|
-
var HeroBlock = React30.forwardRef(
|
|
3872
|
-
({ className, taglineIcon: TaglineIcon, tagline, title, description, actions, ...props }, ref) => {
|
|
3873
|
-
return /* @__PURE__ */ jsx45(
|
|
3874
|
-
"div",
|
|
3875
|
-
{
|
|
3876
|
-
ref,
|
|
3877
|
-
className: cn(
|
|
3878
|
-
"relative overflow-hidden min-h-[40dvh] flex items-center py-fluid-2xl",
|
|
3879
|
-
className
|
|
3880
|
-
),
|
|
3881
|
-
...props,
|
|
3882
|
-
children: /* @__PURE__ */ jsx45("div", { className: "mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs25("div", { className: "mx-auto text-center max-w-4xl", children: [
|
|
3883
|
-
tagline && /* @__PURE__ */ jsx45(
|
|
3884
|
-
Badge,
|
|
3885
|
-
{
|
|
3886
|
-
variant: "default",
|
|
3887
|
-
icon: TaglineIcon ? /* @__PURE__ */ jsx45(Icon, { icon: TaglineIcon, size: 16 }) : void 0,
|
|
3888
|
-
iconGap: 2,
|
|
3889
|
-
className: "mb-fluid-md",
|
|
3890
|
-
children: tagline
|
|
3891
|
-
}
|
|
3892
|
-
),
|
|
3893
|
-
/* @__PURE__ */ jsx45(Typography, { variant: "h1", className: "mb-fluid-md", children: title }),
|
|
3894
|
-
/* @__PURE__ */ jsx45(Typography, { variant: "h3", color: "muted", className: "mb-fluid-lg", children: description }),
|
|
3895
|
-
actions && /* @__PURE__ */ jsx45("div", { className: "flex flex-wrap gap-fluid-md justify-center", children: actions })
|
|
3896
|
-
] }) })
|
|
3897
|
-
}
|
|
3898
|
-
);
|
|
3899
|
-
}
|
|
3900
|
-
);
|
|
3901
|
-
HeroBlock.displayName = "HeroBlock";
|
|
3902
|
-
|
|
3903
3926
|
// src/components/code-block/CodeBlock.tsx
|
|
3904
3927
|
import { useState as useState3, useEffect as useEffect2, useCallback as useCallback3 } from "react";
|
|
3905
3928
|
import { Copy, Check as Check4 } from "lucide-react";
|
|
3906
|
-
import { jsx as
|
|
3929
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3907
3930
|
function CodeBlock({ code, language = "text", title, className }) {
|
|
3908
3931
|
const [html, setHtml] = useState3(null);
|
|
3909
3932
|
const [copied, setCopied] = useState3(false);
|
|
@@ -3919,42 +3942,42 @@ function CodeBlock({ code, language = "text", title, className }) {
|
|
|
3919
3942
|
setCopied(true);
|
|
3920
3943
|
setTimeout(() => setCopied(false), 2e3);
|
|
3921
3944
|
}, [code]);
|
|
3922
|
-
const copyButton = /* @__PURE__ */
|
|
3945
|
+
const copyButton = /* @__PURE__ */ jsx45(
|
|
3923
3946
|
"button",
|
|
3924
3947
|
{
|
|
3925
3948
|
onClick: handleCopy,
|
|
3926
3949
|
className: "flex items-center justify-center w-6 h-6 text-berget-muted-foreground hover:text-berget-foreground transition-colors",
|
|
3927
3950
|
"aria-label": "Copy code",
|
|
3928
|
-
children: copied ? /* @__PURE__ */
|
|
3951
|
+
children: copied ? /* @__PURE__ */ jsx45(Check4, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx45(Copy, { className: "w-3.5 h-3.5" })
|
|
3929
3952
|
}
|
|
3930
3953
|
);
|
|
3931
|
-
return /* @__PURE__ */
|
|
3954
|
+
return /* @__PURE__ */ jsxs25(
|
|
3932
3955
|
"div",
|
|
3933
3956
|
{
|
|
3934
3957
|
className: cn(
|
|
3935
|
-
"rounded-berget-
|
|
3958
|
+
"rounded-berget-xs border bg-berget-codeblock-bg border-berget-border backdrop-blur-[12px] relative overflow-hidden isolate",
|
|
3936
3959
|
className
|
|
3937
3960
|
),
|
|
3938
3961
|
children: [
|
|
3939
|
-
title && /* @__PURE__ */
|
|
3940
|
-
/* @__PURE__ */
|
|
3941
|
-
html ? /* @__PURE__ */
|
|
3962
|
+
title && /* @__PURE__ */ jsx45("div", { className: "!h-10 flex items-center !px-4 !text-xs !leading-normal border-b border-berget-border bg-berget-codeblock-header-bg", children: /* @__PURE__ */ jsx45("span", { className: "text-berget-muted-foreground", children: title }) }),
|
|
3963
|
+
/* @__PURE__ */ jsx45("div", { className: "absolute right-2 top-2 z-10", children: copyButton }),
|
|
3964
|
+
html ? /* @__PURE__ */ jsx45(
|
|
3942
3965
|
"div",
|
|
3943
3966
|
{
|
|
3944
3967
|
className: "[&_.shiki]:!p-4 [&_.shiki]:!m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:!text-sm [&_.shiki]:!leading-relaxed [&_.shiki]:bg-transparent",
|
|
3945
3968
|
dangerouslySetInnerHTML: { __html: html }
|
|
3946
3969
|
}
|
|
3947
|
-
) : /* @__PURE__ */
|
|
3970
|
+
) : /* @__PURE__ */ jsx45("pre", { className: "!p-4 !m-0 overflow-x-auto !text-sm !leading-relaxed text-berget-muted-foreground", children: /* @__PURE__ */ jsx45("code", { children: code }) })
|
|
3948
3971
|
]
|
|
3949
3972
|
}
|
|
3950
3973
|
);
|
|
3951
3974
|
}
|
|
3952
3975
|
|
|
3953
3976
|
// src/components/window-frame/WindowFrame.tsx
|
|
3954
|
-
import * as
|
|
3977
|
+
import * as React30 from "react";
|
|
3955
3978
|
import { useState as useState4 } from "react";
|
|
3956
|
-
import { jsx as
|
|
3957
|
-
var WindowFrame =
|
|
3979
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3980
|
+
var WindowFrame = React30.forwardRef(
|
|
3958
3981
|
({ title = "window", tabs, activeTab, onTabChange, children, className, ...props }, ref) => {
|
|
3959
3982
|
const [internalActive, setInternalActive] = useState4(tabs?.[0]?.id ?? "");
|
|
3960
3983
|
const currentTab = activeTab ?? internalActive;
|
|
@@ -3965,7 +3988,7 @@ var WindowFrame = React31.forwardRef(
|
|
|
3965
3988
|
setInternalActive(id);
|
|
3966
3989
|
}
|
|
3967
3990
|
};
|
|
3968
|
-
return /* @__PURE__ */
|
|
3991
|
+
return /* @__PURE__ */ jsxs26(
|
|
3969
3992
|
"div",
|
|
3970
3993
|
{
|
|
3971
3994
|
ref,
|
|
@@ -3975,13 +3998,13 @@ var WindowFrame = React31.forwardRef(
|
|
|
3975
3998
|
),
|
|
3976
3999
|
...props,
|
|
3977
4000
|
children: [
|
|
3978
|
-
/* @__PURE__ */
|
|
3979
|
-
/* @__PURE__ */
|
|
3980
|
-
/* @__PURE__ */
|
|
3981
|
-
/* @__PURE__ */
|
|
3982
|
-
/* @__PURE__ */
|
|
4001
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 px-4 py-3 border-b border-berget-brand-granite-700 bg-berget-brand-granite-900", children: [
|
|
4002
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
4003
|
+
/* @__PURE__ */ jsx46("div", { className: "w-3 h-3 rounded-full bg-berget-brand-muscaria-400" }),
|
|
4004
|
+
/* @__PURE__ */ jsx46("div", { className: "w-3 h-3 rounded-full bg-berget-brand-chanterelle-200" }),
|
|
4005
|
+
/* @__PURE__ */ jsx46("div", { className: "w-3 h-3 rounded-full bg-berget-brand-moss-400" })
|
|
3983
4006
|
] }),
|
|
3984
|
-
tabs && tabs.length > 0 ? /* @__PURE__ */
|
|
4007
|
+
tabs && tabs.length > 0 ? /* @__PURE__ */ jsx46("div", { className: "ml-4 flex items-center gap-1", children: tabs.map((tab) => /* @__PURE__ */ jsx46(
|
|
3985
4008
|
"button",
|
|
3986
4009
|
{
|
|
3987
4010
|
type: "button",
|
|
@@ -3993,9 +4016,9 @@ var WindowFrame = React31.forwardRef(
|
|
|
3993
4016
|
children: tab.label
|
|
3994
4017
|
},
|
|
3995
4018
|
tab.id
|
|
3996
|
-
)) }) : /* @__PURE__ */
|
|
4019
|
+
)) }) : /* @__PURE__ */ jsx46("span", { className: "ml-4 text-sm font-mono text-berget-brand-moss-400", children: title })
|
|
3997
4020
|
] }),
|
|
3998
|
-
/* @__PURE__ */
|
|
4021
|
+
/* @__PURE__ */ jsx46("div", { children })
|
|
3999
4022
|
]
|
|
4000
4023
|
}
|
|
4001
4024
|
);
|
|
@@ -4005,7 +4028,7 @@ WindowFrame.displayName = "WindowFrame";
|
|
|
4005
4028
|
|
|
4006
4029
|
// src/components/fog-illustration/FogIllustration.tsx
|
|
4007
4030
|
import { useEffect as useEffect3, useRef } from "react";
|
|
4008
|
-
import { jsx as
|
|
4031
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
4009
4032
|
var FOG_BRAND_PALETTE = {
|
|
4010
4033
|
ink: "#171a1a",
|
|
4011
4034
|
milk: "#f7f5ed",
|
|
@@ -4318,7 +4341,7 @@ var FogIllustration = ({ palette, speed = 1, className }) => {
|
|
|
4318
4341
|
gl.deleteFramebuffer(fbo);
|
|
4319
4342
|
};
|
|
4320
4343
|
}, []);
|
|
4321
|
-
return /* @__PURE__ */
|
|
4344
|
+
return /* @__PURE__ */ jsx47("canvas", { ref, "aria-hidden": "true", className: cn("size-full", className) });
|
|
4322
4345
|
};
|
|
4323
4346
|
export {
|
|
4324
4347
|
Alert2 as Alert,
|
|
@@ -4390,7 +4413,6 @@ export {
|
|
|
4390
4413
|
FieldTitle,
|
|
4391
4414
|
FogIllustration,
|
|
4392
4415
|
Grid,
|
|
4393
|
-
HeroBlock,
|
|
4394
4416
|
Icon,
|
|
4395
4417
|
Input2 as Input,
|
|
4396
4418
|
Item2 as Item,
|