@molecule/app-billing-react 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/dist/PricingPage.js +10 -13
  2. package/package.json +7 -6
@@ -181,21 +181,18 @@ function TierCard({ tier, period, cm, t, renderLimits, onUpgrade, starting, popu
181
181
  zIndex: 1,
182
182
  }, "data-mol-id": `pricing-tier-${tier.key}-popular-badge`, children: t('billing.pricing.mostPopular', undefined, { defaultValue: 'Most popular' }) })), _jsxs("header", { className: cm.cardHeader, children: [!popular && (_jsx("p", { className: cm.cn(cm.textSize('xs'), cm.textSubtle, cm.fontWeight('semibold'), cm.uppercase, cm.trackingWide, cm.sp('mb', 2)), "data-mol-id": `pricing-tier-${tier.key}-eyebrow`, children: t('billing.pricing.tierEyebrow', undefined, { defaultValue: 'Tier' }) })), _jsx("h2", { className: cm.cn(cm.textSize('2xl'), cm.italic, cm.fontWeight('semibold'), cm.sp('mb', 4)), style: headlineStyle, children: tier.name }), _jsxs("p", { children: [_jsx("span", { className: cm.cn(cm.textSize('5xl'), cm.fontWeight('bold'), popular && cm.textPrimary), style: headlineStyle, children: price?.price ?? '—' }), tier.perSeat && (_jsxs("span", { className: cm.cn(cm.textSize('sm'), cm.textMuted, cm.fontWeight('normal')), children: [' ', t('billing.pricing.perSeat', undefined, { defaultValue: 'per seat' })] }))] }), _jsxs("p", { className: cm.cn(cm.textSize('xs'), cm.textSubtle, cm.fontWeight('semibold'), cm.uppercase, cm.trackingWide, cm.sp('mt', 2)), children: [t(`billing.pricing.billed.${price?.period ?? 'month'}`, undefined, {
183
183
  defaultValue: price?.period === 'year' ? 'Billed annually' : 'Billed monthly',
184
- }), price?.savings && (_jsxs(_Fragment, { children: [' · ', _jsx("span", { className: cm.textSuccess, children: price.savings.toUpperCase() })] }))] })] }), _jsx("div", { className: cm.cn(cm.cardContent, cm.flex1), children: renderLimits ? (renderLimits(tier.limits)) : (_jsx(DefaultLimits, { limits: tier.limits, cm: cm })) }), _jsx("footer", { className: cm.cardFooter, children: _jsx("button", { type: "button", className: cm.cn(cm.button({
184
+ }), price?.savings && (_jsxs(_Fragment, { children: [' · ', _jsx("span", { className: cm.textSuccess, children: price.savings.toUpperCase() })] }))] })] }), _jsx("div", { className: cm.cn(cm.cardContent, cm.flex1), children: renderLimits ? (renderLimits(tier.limits)) : (_jsx(DefaultLimits, { limits: tier.limits, cm: cm })) }), _jsx("footer", { className: cm.cardFooter, children: _jsx("button", { type: "button",
185
+ // A page-level CTA takes the design system's largest tier. It used
186
+ // to hand-override height and padding inline, which silently beat
187
+ // whatever the ClassMap resolved (AGENTS.md anti-pattern 12) and
188
+ // made this button a different size from every other Upgrade CTA
189
+ // in the fleet — `pricing-page-react`'s identical action included.
190
+ className: cm.cn(cm.button({
185
191
  variant: popular ? 'solid' : 'outline',
186
- size: 'md',
192
+ color: popular ? 'primary' : undefined,
193
+ size: 'lg',
187
194
  fullWidth: true,
188
- }), popular && cm.gradientPrimary, cm.uppercase, cm.trackingWide, cm.fontWeight('semibold'), cm.textSize('sm')),
189
- // Override the cramped default size — `cm.button({size: 'md'})`
190
- // gives `h-[30px] px-2.5` which feels like a tag, not a CTA.
191
- // Real button padding: ~14px vertical, ~20px horizontal.
192
- style: {
193
- height: 'auto',
194
- paddingTop: '0.875rem',
195
- paddingBottom: '0.875rem',
196
- paddingLeft: '1.25rem',
197
- paddingRight: '1.25rem',
198
- }, disabled: !price?.stripePriceId || starting, onClick: () => onUpgrade(price?.stripePriceId ?? null), "data-mol-id": `pricing-cta-${tier.key}`, children: price?.stripePriceId
195
+ }), popular && cm.gradientPrimary, cm.uppercase, cm.trackingWide, cm.fontWeight('semibold'), cm.touchTargetCompact), disabled: !price?.stripePriceId || starting, onClick: () => onUpgrade(price?.stripePriceId ?? null), "data-mol-id": `pricing-cta-${tier.key}`, children: price?.stripePriceId
199
196
  ? t('billing.pricing.upgradeCta', { tierName: tier.name }, { defaultValue: 'Upgrade to {{tierName}}' })
200
197
  : t('billing.pricing.currentCta', undefined, { defaultValue: 'Current plan' }) }) })] }) }));
201
198
  }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@molecule/app-billing-react",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "React pricing page + checkout flow that consumes /api/billing/* (provided by @molecule/api-entitlements + @molecule/api-payments-stripe)",
5
+ "homepage": "https://www.molecule.dev/packages/app-billing-react",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
7
8
  "types": "dist/index.d.ts",
@@ -41,14 +42,14 @@
41
42
  "react": "^18.0.0 || ^19.0.0"
42
43
  },
43
44
  "devDependencies": {
44
- "@molecule/app-http": "1.0.1",
45
- "@molecule/app-react": "1.0.1",
46
- "@molecule/app-ui": "1.0.1",
47
- "@molecule/app-ui-react": "1.0.1",
45
+ "@molecule/app-http": "1.0.2",
46
+ "@molecule/app-react": "1.6.0",
47
+ "@molecule/app-ui": "1.1.1",
48
+ "@molecule/app-ui-react": "1.0.2",
48
49
  "@types/node": "26.1.2",
49
50
  "@types/react": "19.2.17",
50
51
  "react": "19.2.8",
51
52
  "typescript": "6.0.3",
52
- "vitest": "4.1.10"
53
+ "vitest": "4.1.11"
53
54
  }
54
55
  }