@bergetai/ui 0.11.0 → 0.11.2

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 CHANGED
@@ -50,6 +50,7 @@ __export(src_exports, {
50
50
  Button: () => Button2,
51
51
  COUNTRIES: () => COUNTRIES,
52
52
  Card: () => Card2,
53
+ CardAction: () => CardAction,
53
54
  CardContent: () => CardContent,
54
55
  CardDescription: () => CardDescription,
55
56
  CardFooter: () => CardFooter,
@@ -464,9 +465,28 @@ function brandVariantClasses(variant) {
464
465
  disabledClasses,
465
466
  "disabled:bg-berget-button-destructive-disabled-bg"
466
467
  );
468
+ case "outline":
469
+ return cn(
470
+ // Transparent fill with a theme-foreground-derived border (25% of the
471
+ // foreground). The state treatment is static: hover, press and
472
+ // keyboard focus render identically to rest — only the shared focus
473
+ // outline and the disabled treatment deviate.
474
+ "bg-transparent border-berget-button-outline-border text-berget-button-outline-fg",
475
+ // Hover: slight brightening (hover bg token); the border and
476
+ // foreground stay at rest. The dark:hover twin also neutralises
477
+ // the primitive ghost's dark:hover:bg-muted/50. Pressed drops the
478
+ // fill back to transparent (a pressed element is still hovered, so
479
+ // an explicit active override is needed in both colour schemes).
480
+ "hover:bg-berget-button-outline-hover dark:hover:bg-berget-button-outline-hover",
481
+ "active:bg-transparent dark:active:bg-transparent",
482
+ // Keep the resting border on focus — the shared outline is the indicator.
483
+ "focus-visible:border-berget-button-outline-border",
484
+ disabledClasses,
485
+ "disabled:bg-transparent disabled:border-berget-button-disabled-border"
486
+ );
467
487
  case "link":
468
488
  return cn(
469
- "h-auto bg-transparent p-0 text-berget-button-link-fg underline-offset-4 shadow-none",
489
+ "h-auto bg-transparent p-0 text-berget-button-link-fg font-medium underline-offset-4 shadow-none",
470
490
  "hover:bg-transparent hover:text-berget-button-link-hover-fg",
471
491
  // On press, return to the resting foreground (hover fg otherwise sticks).
472
492
  "active:text-berget-button-link-fg",
@@ -497,6 +517,7 @@ function primitiveVariant(variant) {
497
517
  switch (variant) {
498
518
  case "primary":
499
519
  case "destructive":
520
+ case "outline":
500
521
  return "ghost";
501
522
  default:
502
523
  return variant;
@@ -525,6 +546,14 @@ function Button2({
525
546
  // larger button text. h-auto drops the primitive's fixed h-* so the
526
547
  // vertical paddings take effect.
527
548
  !isLink && !isIcon && "py-[0.57em] px-[1.14em] h-auto",
549
+ // Text ladder: size = typography scale; the em-based padding above
550
+ // follows automatically, so no per-size paddings are needed. Only
551
+ // default/lg/sm need overrides — xs keeps the primitive's text-xs.
552
+ !isLink && !isIcon && (size === "lg" ? "text-lg" : size === "sm" ? "text-sm" : size === "xs" ? "" : "text-base"),
553
+ // Normal weight for every non-link variant — tailwind-merge strips the
554
+ // primitive's font-medium (font-weight: var(--font-weight-medium)); the
555
+ // link variant keeps medium via its own classes above.
556
+ !isLink && "font-normal",
528
557
  brandVariantClasses(variant),
529
558
  interactionClasses,
530
559
  !isLink && width === "full" && "w-full",
@@ -677,6 +706,19 @@ function CardDescription({ className, ...props }) {
677
706
  }
678
707
  );
679
708
  }
709
+ function CardAction({ className, ...props }) {
710
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
711
+ "div",
712
+ {
713
+ "data-slot": "card-action",
714
+ className: (0, import_cn2.cn)(
715
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
716
+ className
717
+ ),
718
+ ...props
719
+ }
720
+ );
721
+ }
680
722
  function CardContent({ className, ...props }) {
681
723
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
682
724
  "div",
@@ -4568,6 +4610,7 @@ var FogIllustration = ({ palette, speed = 1, className }) => {
4568
4610
  Button,
4569
4611
  COUNTRIES,
4570
4612
  Card,
4613
+ CardAction,
4571
4614
  CardContent,
4572
4615
  CardDescription,
4573
4616
  CardFooter,