@olwiba/ui 0.1.10 → 0.1.11

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.ts CHANGED
@@ -521,10 +521,14 @@ interface PricingCardProps extends React.HTMLAttributes<HTMLDivElement> {
521
521
  cta: string;
522
522
  highlighted?: boolean;
523
523
  disabled?: boolean;
524
+ /** Disables only the CTA button, leaving the rest of the card interactive. */
525
+ ctaDisabled?: boolean;
524
526
  badge?: React.ReactNode;
527
+ /** Rendered directly below the CTA button (e.g. a "Get notified" link). */
528
+ footer?: React.ReactNode;
525
529
  onSelect?: () => void;
526
530
  }
527
- declare function PricingCard({ name, price, period, description, features, cta, highlighted, disabled, badge, onSelect, className, ...props }: PricingCardProps): react_jsx_runtime.JSX.Element;
531
+ declare function PricingCard({ name, price, period, description, features, cta, highlighted, disabled, ctaDisabled, badge, footer, onSelect, className, ...props }: PricingCardProps): react_jsx_runtime.JSX.Element;
528
532
 
529
533
  interface PricingPlan {
530
534
  name: string;
@@ -534,6 +538,8 @@ interface PricingPlan {
534
538
  cta: string;
535
539
  highlighted?: boolean;
536
540
  disabled?: boolean;
541
+ /** Disables only the CTA button, leaving the rest of the card interactive. */
542
+ ctaDisabled?: boolean;
537
543
  features: PricingFeature[];
538
544
  /** Overrides computed price display (e.g. "$?" for community/reach-out tiers). */
539
545
  priceDisplay?: string;
@@ -551,8 +557,10 @@ interface PricingSectionProps {
551
557
  footnote?: string;
552
558
  mode?: 'subscription' | 'one-time';
553
559
  foundingDeadline?: string;
560
+ /** Rendered below each plan's CTA button (e.g. a "Get notified" link). */
561
+ renderPlanFooter?: (plan: PricingPlan) => React.ReactNode;
554
562
  }
555
- declare function PricingSection({ title, description, badge, plans, saveBadge, isAuthenticated, renderLink, footnote, mode, foundingDeadline, }: PricingSectionProps): react_jsx_runtime.JSX.Element;
563
+ declare function PricingSection({ title, description, badge, plans, saveBadge, isAuthenticated, renderLink, footnote, mode, foundingDeadline, renderPlanFooter, }: PricingSectionProps): react_jsx_runtime.JSX.Element;
556
564
 
557
565
  interface TestimonialsSectionProps {
558
566
  title?: string;
package/dist/index.js CHANGED
@@ -1455,7 +1455,9 @@ function PricingCard({
1455
1455
  cta,
1456
1456
  highlighted = false,
1457
1457
  disabled = false,
1458
+ ctaDisabled = false,
1458
1459
  badge,
1460
+ footer,
1459
1461
  onSelect,
1460
1462
  className,
1461
1463
  ...props
@@ -1488,10 +1490,11 @@ function PricingCard({
1488
1490
  variant: highlighted ? "default" : "outline",
1489
1491
  className: "mt-6 w-full",
1490
1492
  onClick: onSelect,
1491
- disabled,
1493
+ disabled: disabled || ctaDisabled,
1492
1494
  children: cta
1493
1495
  }
1494
1496
  ),
1497
+ footer && /* @__PURE__ */ jsx("div", { className: "mt-3 text-center text-sm", children: footer }),
1495
1498
  /* @__PURE__ */ jsx(Separator, { className: "my-6" }),
1496
1499
  /* @__PURE__ */ jsx("ul", { className: "space-y-3 text-sm", children: features.map((feat) => /* @__PURE__ */ jsx("li", { className: "flex items-center gap-2", children: feat.included ? /* @__PURE__ */ jsxs(Fragment, { children: [
1497
1500
  /* @__PURE__ */ jsx(Check, { className: "size-4 shrink-0 text-primary" }),
@@ -1583,7 +1586,8 @@ function PricingSection({
1583
1586
  renderLink = defaultRenderLink7,
1584
1587
  footnote,
1585
1588
  mode = "subscription",
1586
- foundingDeadline
1589
+ foundingDeadline,
1590
+ renderPlanFooter
1587
1591
  }) {
1588
1592
  const [annual, setAnnual] = React29.useState(false);
1589
1593
  const isOneTime = mode === "one-time";
@@ -1647,7 +1651,9 @@ function PricingSection({
1647
1651
  cta: plan.cta,
1648
1652
  highlighted: plan.highlighted,
1649
1653
  disabled: plan.disabled,
1650
- badge: badge2
1654
+ ctaDisabled: plan.ctaDisabled,
1655
+ badge: badge2,
1656
+ footer: renderPlanFooter?.(plan)
1651
1657
  },
1652
1658
  plan.name
1653
1659
  );