@molecule/app-billing-react 1.0.2 → 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.
- package/dist/PricingPage.js +10 -13
- package/package.json +2 -2
package/dist/PricingPage.js
CHANGED
|
@@ -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",
|
|
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
|
-
|
|
192
|
+
color: popular ? 'primary' : undefined,
|
|
193
|
+
size: 'lg',
|
|
187
194
|
fullWidth: true,
|
|
188
|
-
}), popular && cm.gradientPrimary, cm.uppercase, cm.trackingWide, cm.fontWeight('semibold'), cm.
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-billing-react",
|
|
3
|
-
"version": "1.0.
|
|
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
5
|
"homepage": "https://www.molecule.dev/packages/app-billing-react",
|
|
6
6
|
"type": "module",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@molecule/app-http": "1.0.2",
|
|
46
|
-
"@molecule/app-react": "1.
|
|
46
|
+
"@molecule/app-react": "1.6.0",
|
|
47
47
|
"@molecule/app-ui": "1.1.1",
|
|
48
48
|
"@molecule/app-ui-react": "1.0.2",
|
|
49
49
|
"@types/node": "26.1.2",
|