@molecule/app-billing-react 1.0.3 → 1.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"PricingPage.d.ts","sourceRoot":"","sources":["../src/PricingPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,OAAO,KAAK,EAAoB,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAEpE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAOpF;AAED,gCAAgC;AAChC,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,QAAQ,EAAE,SAAS,CAAA;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,CAmB7F;AAwBD,mCAAmC;AACnC,MAAM,WAAW,gBAAgB,CAAC,OAAO,GAAG,OAAO;IACjD;;;;OAIG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IAEnC;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAA;IAEnD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,mFAAmF;IACnF,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IA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,CAAA;IAEnB,mFAAmF;IACnF,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,4CAA4C;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;OAKG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEvC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE9B;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACnC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,OAAO,GAAG,OAAO,EAC3C,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAC/B,KAAK,CAAC,YAAY,CAuJpB"}
@@ -118,7 +118,7 @@ export function PricingPage(props) {
118
118
  window.location.reload();
119
119
  }
120
120
  };
121
- return (_jsxs("section", { className: cm.cn(cm.maxW('6xl'), cm.mxAuto, cm.sp('px', 6), cm.sp('py', 12), className), "data-mol-id": "pricing-page", children: [_jsxs("header", { className: cm.cn(cm.textCenter, cm.sp('mb', 10)), children: [_jsx("h1", { className: cm.cn(cm.textSize('4xl'), cm.fontWeight('bold'), cm.sp('mb', 3)), style: headlineStyle, "data-mol-id": "pricing-page-heading", children: t(headingKey, undefined, { defaultValue: headingDefault }) }), subheadingKey !== null && (_jsx("p", { className: cm.cn(cm.textSize('lg'), cm.textMuted, cm.maxW('2xl'), cm.mxAuto), "data-mol-id": "pricing-page-subheading", children: t(subheadingKey, undefined, { defaultValue: subheadingDefault }) }))] }), _jsx("div", { className: cm.flex({
121
+ return (_jsxs("section", { className: cm.cn(cm.maxW('6xl'), cm.mxAuto, cm.sp('px', 6), cm.sp('py', 12), className), "data-mol-id": "pricing-page", children: [_jsxs("section", { className: cm.cn(cm.textCenter, cm.sp('mb', 10)), children: [_jsx("h1", { className: cm.cn(cm.textSize('4xl'), cm.fontWeight('bold'), cm.sp('mb', 3)), style: headlineStyle, "data-mol-id": "pricing-page-heading", children: t(headingKey, undefined, { defaultValue: headingDefault }) }), subheadingKey !== null && (_jsx("p", { className: cm.cn(cm.textSize('lg'), cm.textMuted, cm.maxW('2xl'), cm.mxAuto), "data-mol-id": "pricing-page-subheading", children: t(subheadingKey, undefined, { defaultValue: subheadingDefault }) }))] }), _jsx("div", { className: cm.flex({
122
122
  direction: 'row',
123
123
  wrap: 'wrap',
124
124
  gap: 'lg',
@@ -179,7 +179,7 @@ function TierCard({ tier, period, cm, t, renderLimits, onUpgrade, starting, popu
179
179
  borderRadius: '999px',
180
180
  lineHeight: 1.2,
181
181
  zIndex: 1,
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, {
182
+ }, "data-mol-id": `pricing-tier-${tier.key}-popular-badge`, children: t('billing.pricing.mostPopular', undefined, { defaultValue: 'Most popular' }) })), _jsxs("div", { 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
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
185
  // A page-level CTA takes the design system's largest tier. It used
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-billing-react",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
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",
@@ -44,8 +44,8 @@
44
44
  "devDependencies": {
45
45
  "@molecule/app-http": "1.0.2",
46
46
  "@molecule/app-react": "1.6.0",
47
- "@molecule/app-ui": "1.1.1",
48
- "@molecule/app-ui-react": "1.0.2",
47
+ "@molecule/app-ui": "1.2.1",
48
+ "@molecule/app-ui-react": "1.2.1",
49
49
  "@types/node": "26.1.2",
50
50
  "@types/react": "19.2.17",
51
51
  "react": "19.2.8",