@bergetai/ui 0.11.3 → 0.11.4

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.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' | 'outline' | 'link';
48
+ type CustomVariant = 'default' | 'primary' | 'destructive' | 'outline' | 'ghost' | '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. */
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' | 'outline' | 'link';
48
+ type CustomVariant = 'default' | 'primary' | 'destructive' | 'outline' | 'ghost' | '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. */
package/dist/index.js CHANGED
@@ -320,6 +320,21 @@ function brandVariantClasses(variant) {
320
320
  disabledClasses,
321
321
  "disabled:bg-transparent disabled:border-berget-button-disabled-border"
322
322
  );
323
+ case "ghost":
324
+ return cn(
325
+ "bg-transparent text-berget-button-ghost-fg",
326
+ // Pin the foreground on hover — the underlying primitive ghost adds
327
+ // hover:text-foreground, which is the same value here but pinned
328
+ // explicitly for parity with the other fg-token variants.
329
+ "hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg",
330
+ // The dark:hover twin neutralises the primitive ghost's
331
+ // dark:hover:bg-muted/50 so only the token fill applies.
332
+ "dark:hover:bg-berget-button-ghost-hover",
333
+ "active:bg-berget-button-ghost-active dark:active:bg-berget-button-ghost-active",
334
+ "focus-visible:border-transparent",
335
+ disabledClasses,
336
+ "disabled:bg-transparent"
337
+ );
323
338
  case "link":
324
339
  return cn(
325
340
  "h-auto bg-transparent p-0 text-berget-button-link-fg font-medium underline-offset-4 shadow-none",
@@ -354,6 +369,7 @@ function primitiveVariant(variant) {
354
369
  case "primary":
355
370
  case "destructive":
356
371
  case "outline":
372
+ case "ghost":
357
373
  return "ghost";
358
374
  default:
359
375
  return variant;