@slyxup/ui 2.5.3 → 3.0.0
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/README.md +33 -10
- package/dist/components/BillingPortal/BillingPortal.d.ts +2 -1
- package/dist/components/BillingPortal/BillingPortal.d.ts.map +1 -1
- package/dist/components/BillingPortal/BillingPortal.js +2 -2
- package/dist/components/BillingPortal/BillingPortal.js.map +1 -1
- package/dist/components/CurrentPlanCard/CurrentPlanCard.d.ts +19 -3
- package/dist/components/CurrentPlanCard/CurrentPlanCard.d.ts.map +1 -1
- package/dist/components/CurrentPlanCard/CurrentPlanCard.js +129 -23
- package/dist/components/CurrentPlanCard/CurrentPlanCard.js.map +1 -1
- package/dist/components/InvoicesTable/InvoicesTable.d.ts +4 -2
- package/dist/components/InvoicesTable/InvoicesTable.d.ts.map +1 -1
- package/dist/components/InvoicesTable/InvoicesTable.js +23 -19
- package/dist/components/InvoicesTable/InvoicesTable.js.map +1 -1
- package/dist/components/PlanCard/PlanCard.js +1 -1
- package/dist/components/PlanCard/PlanCard.js.map +1 -1
- package/dist/components/PricingTable/PricingTable.d.ts +2 -2
- package/dist/components/PricingTable/PricingTable.d.ts.map +1 -1
- package/dist/components/PricingTable/PricingTable.js +8 -1
- package/dist/components/PricingTable/PricingTable.js.map +1 -1
- package/dist/components/SignIn/SignIn.d.ts.map +1 -1
- package/dist/components/SignIn/SignIn.js +43 -14
- package/dist/components/SignIn/SignIn.js.map +1 -1
- package/dist/components/SignUp/SignUp.d.ts.map +1 -1
- package/dist/components/SignUp/SignUp.js +15 -5
- package/dist/components/SignUp/SignUp.js.map +1 -1
- package/dist/components/SocialButtons/SocialButtons.d.ts.map +1 -1
- package/dist/components/SocialButtons/SocialButtons.js +16 -7
- package/dist/components/SocialButtons/SocialButtons.js.map +1 -1
- package/dist/components/SubscriptionStatus/SubscriptionStatus.d.ts.map +1 -1
- package/dist/components/SubscriptionStatus/SubscriptionStatus.js +14 -0
- package/dist/components/SubscriptionStatus/SubscriptionStatus.js.map +1 -1
- package/dist/react/context/auth-context.d.ts +4 -0
- package/dist/react/context/auth-context.d.ts.map +1 -1
- package/dist/react/context/auth-context.js.map +1 -1
- package/dist/react/hooks/useAuth.d.ts +2 -0
- package/dist/react/hooks/useAuth.d.ts.map +1 -1
- package/dist/react/hooks/useAuth.js +3 -0
- package/dist/react/hooks/useAuth.js.map +1 -1
- package/dist/react/hooks/useBilling.d.ts +2 -0
- package/dist/react/hooks/useBilling.d.ts.map +1 -1
- package/dist/react/hooks/useBilling.js +56 -13
- package/dist/react/hooks/useBilling.js.map +1 -1
- package/dist/react/provider/SlyxUpProvider.d.ts +4 -1
- package/dist/react/provider/SlyxUpProvider.d.ts.map +1 -1
- package/dist/react/provider/SlyxUpProvider.js +19 -4
- package/dist/react/provider/SlyxUpProvider.js.map +1 -1
- package/dist/styles.d.ts +2 -2
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +22 -8
- package/dist/styles.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,20 +12,27 @@ npm install @slyxup/ui @slyxup/core
|
|
|
12
12
|
|
|
13
13
|
## Setup
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Wrap auth and billing UI in a provider at your app root:
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
|
-
import {
|
|
19
|
-
import { SlyxUpStyles } from '@slyxup/ui';
|
|
20
|
-
|
|
21
|
-
const client = new SlyxupClient({ publishableKey: 'pk_test_xxx', apiUrl: '...' });
|
|
18
|
+
import { SlyxUpProvider, SlyxUpStyles } from '@slyxup/ui';
|
|
22
19
|
|
|
23
|
-
<
|
|
24
|
-
|
|
20
|
+
<SlyxUpProvider
|
|
21
|
+
publishableKey="pk_test_your_project_key"
|
|
22
|
+
apiUrl="https://auth.slyxup.online"
|
|
23
|
+
billingApiUrl="https://billing.slyxup.online"
|
|
24
|
+
>
|
|
25
|
+
<SlyxUpStyles />
|
|
26
|
+
<App />
|
|
27
|
+
</SlyxUpProvider>
|
|
25
28
|
```
|
|
26
29
|
|
|
27
30
|
(Components also auto-inject on first mount if you skip this.)
|
|
28
31
|
|
|
32
|
+
The default stylesheet inherits host typography and does not load external fonts. Webfonts are loaded only when you explicitly select a font theme that has a stylesheet URL.
|
|
33
|
+
|
|
34
|
+
Pass configuration explicitly (`import.meta.env.VITE_*` in Vite or `process.env.NEXT_PUBLIC_*` in a Next.js client boundary). Tokens are memory-only by default. Client-only SPAs can opt into `tokenStorage="sessionStorage"` for same-tab reload persistence, scoped by auth URL and project key. This remains script-readable; a same-origin server with HttpOnly cookies is the preferred sensitive-app integration. Billing hooks inherit the provider's key, current token, and `billingApiUrl`; they no longer use a global localStorage token. `useInvoices()` returns `{ invoices, loading, error, reload }`, so failures can be shown with a retry action instead of an empty invoice history.
|
|
35
|
+
|
|
29
36
|
## Components
|
|
30
37
|
|
|
31
38
|
### `<SignIn />` / `<SignUp />`
|
|
@@ -44,8 +51,8 @@ import { SignIn, SignUp } from '@slyxup/ui';
|
|
|
44
51
|
```
|
|
45
52
|
|
|
46
53
|
Notes:
|
|
47
|
-
- `SignIn` accepts **either an email or a username**
|
|
48
|
-
- When the account has 2FA enabled, `SignIn`
|
|
54
|
+
- `SignIn username` accepts **either an email or a username** and sends the corresponding field. Without this prop the field validates an email address.
|
|
55
|
+
- When the account has 2FA enabled, `SignIn` swaps to an authenticator-code step with a **Use a recovery code** alternative. Errors remain visible until the next attempt. Each instance has unique input IDs for accessible labels.
|
|
49
56
|
- `SignUp` includes an optional **username** field (used for password sign-in as an alternative to email).
|
|
50
57
|
|
|
51
58
|
### `<UserButton />` — avatar + dropdown
|
|
@@ -112,6 +119,10 @@ Requires the endpoints shipped in the auth worker (`POST /v1/user/password`, `GE
|
|
|
112
119
|
|
|
113
120
|
Redirects to the hosted OAuth flow.
|
|
114
121
|
|
|
122
|
+
**Release update:** project-scoped OAuth is now implemented. SignIn/SignUp call `client.auth.startOAuth`; the provider exchanges the callback code using the initiating tab's verifier. `useAuth()` exposes `oauthChallenge` and `authError`; SignIn displays the second-factor step when OAuth requires it. Register the return hostname on the project; test projects also allow localhost. Use the current SDK flow rather than hand-built OAuth links.
|
|
123
|
+
|
|
124
|
+
`SocialButtons` uses the same proof-key flow and displays start errors. For custom servers configure the provider `apiUrl`; a conflicting legacy `basePath` is rejected rather than bypassing the callback exchange.
|
|
125
|
+
|
|
115
126
|
### `<PricingTable />` — billing plans grid
|
|
116
127
|
|
|
117
128
|
```tsx
|
|
@@ -162,10 +173,11 @@ const client = new SlyxupClient({ publishableKey: 'pk_test_xxx', apiUrl: '...' }
|
|
|
162
173
|
subscription={subscription}
|
|
163
174
|
invoices={invoices}
|
|
164
175
|
onCancel={cancelSubscription}
|
|
176
|
+
onResume={resumeSubscription}
|
|
165
177
|
/>
|
|
166
178
|
```
|
|
167
179
|
|
|
168
|
-
Shows current plan, status, renewal date, invoice history, and
|
|
180
|
+
Shows current plan, status, renewal date, invoice history, and optional cancel/resume actions. Invoice amounts use currency-aware formatting; totals are grouped by currency rather than adding unrelated currencies together.
|
|
169
181
|
|
|
170
182
|
### Granular billing parts — compose your own layouts
|
|
171
183
|
|
|
@@ -184,9 +196,20 @@ import {
|
|
|
184
196
|
<CurrentPlanCard
|
|
185
197
|
subscription={subscription} // null = free tier empty state
|
|
186
198
|
onCancel={cancelSubscription}
|
|
199
|
+
onResume={resumeSubscription} // shown when cancellation is scheduled
|
|
187
200
|
theme={{ accent: 'emerald' }}
|
|
188
201
|
/>
|
|
189
202
|
|
|
203
|
+
// subscription display fields (status required, rest optional):
|
|
204
|
+
// { planName?, status, currentPeriodEnd, currentPeriodStart?,
|
|
205
|
+
// cancelAtPeriodEnd, amount? (cents), currency?, interval?,
|
|
206
|
+
// paymentMethod? ("Visa •••• 4242") }
|
|
207
|
+
// → price line, days-left progress, renew/billed meta, trial note,
|
|
208
|
+
// scheduled-cancellation warning + Resume render automatically.
|
|
209
|
+
|
|
210
|
+
// Invoices with paid total + status pills:
|
|
211
|
+
<InvoicesTable invoices={invoices} showTotal /> // null when empty
|
|
212
|
+
|
|
190
213
|
// Fully custom pricing section:
|
|
191
214
|
{plans.map((p) => (
|
|
192
215
|
<PlanCard
|
|
@@ -10,6 +10,7 @@ export interface BillingPortalProps {
|
|
|
10
10
|
subscription: PortalSubscription | null;
|
|
11
11
|
invoices: InvoiceRow[];
|
|
12
12
|
onCancel?: () => void;
|
|
13
|
+
onResume?: () => void;
|
|
13
14
|
/** Per-component theme (accent, mode, radius…) — scoped, never global. */
|
|
14
15
|
theme?: SlyxUpTheme;
|
|
15
16
|
style?: CSSProperties;
|
|
@@ -20,5 +21,5 @@ export interface BillingPortalProps {
|
|
|
20
21
|
* Composes CurrentPlanCard + InvoicesTable — use those directly for
|
|
21
22
|
* finer-grained layouts.
|
|
22
23
|
*/
|
|
23
|
-
export declare function BillingPortal({ subscription, invoices, onCancel, theme, style, className, }: BillingPortalProps): import("react").JSX.Element;
|
|
24
|
+
export declare function BillingPortal({ subscription, invoices, onCancel, onResume, theme, style, className, }: BillingPortalProps): import("react").JSX.Element;
|
|
24
25
|
//# sourceMappingURL=BillingPortal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingPortal.d.ts","sourceRoot":"","sources":["../../../src/components/BillingPortal/BillingPortal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,UAAU,EAAiB,MAAM,gCAAgC,CAAC;AAEhF,MAAM,WAAW,kBAAmB,SAAQ,uBAAuB;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,kBAAkB,GAA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AK,EACL,SAAS,GACV,EAAE,kBAAkB,+BAgBpB"}
|
|
@@ -8,8 +8,8 @@ import { InvoicesTable } from '../InvoicesTable/InvoicesTable';
|
|
|
8
8
|
* Composes CurrentPlanCard + InvoicesTable — use those directly for
|
|
9
9
|
* finer-grained layouts.
|
|
10
10
|
*/
|
|
11
|
-
export function BillingPortal({ subscription, invoices, onCancel, theme, style, className, }) {
|
|
11
|
+
export function BillingPortal({ subscription, invoices, onCancel, onResume, theme, style, className, }) {
|
|
12
12
|
injectStyles();
|
|
13
|
-
return (_jsxs("div", { className: className, style: { display: 'flex', flexDirection: 'column', gap: 18, ...style }, children: [_jsx(CurrentPlanCard, { subscription: subscription, onCancel: onCancel, theme: theme }), _jsx(InvoicesTable, { invoices: invoices, theme: theme })] }));
|
|
13
|
+
return (_jsxs("div", { className: className, style: { display: 'flex', flexDirection: 'column', gap: 18, ...style }, children: [_jsx(CurrentPlanCard, { subscription: subscription, onCancel: onCancel, onResume: onResume, theme: theme }), _jsx(InvoicesTable, { invoices: invoices, theme: theme })] }));
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=BillingPortal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingPortal.js","sourceRoot":"","sources":["../../../src/components/BillingPortal/BillingPortal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EACL,eAAe,GAEhB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAmB,aAAa,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"BillingPortal.js","sourceRoot":"","sources":["../../../src/components/BillingPortal/BillingPortal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EACL,eAAe,GAEhB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAmB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAkBhF;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,KAAK,EACL,SAAS,GACU;IACnB,YAAY,EAAE,CAAC;IACf,OAAO,CACL,eACE,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,aAEtE,KAAC,eAAe,IACd,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,GACZ,EACF,KAAC,aAAa,IAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,GAAI,IAC/C,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -4,11 +4,25 @@ export interface CurrentPlanSubscription {
|
|
|
4
4
|
planName?: string | null;
|
|
5
5
|
status: string;
|
|
6
6
|
currentPeriodEnd: string | null;
|
|
7
|
+
/** Period start — enables the "days left" progress bar. */
|
|
8
|
+
currentPeriodStart?: string | null;
|
|
7
9
|
cancelAtPeriodEnd: boolean;
|
|
10
|
+
/** Minor units (cents). Shows the price line when present. */
|
|
11
|
+
amount?: number | null;
|
|
12
|
+
currency?: string | null;
|
|
13
|
+
interval?: 'month' | 'year' | string | null;
|
|
14
|
+
/** Rendered under the price, e.g. "Visa •••• 4242". */
|
|
15
|
+
paymentMethod?: string | null;
|
|
8
16
|
}
|
|
9
17
|
export interface CurrentPlanCardLabels {
|
|
10
18
|
title?: string;
|
|
11
19
|
cancel?: string;
|
|
20
|
+
resume?: string;
|
|
21
|
+
renews?: string;
|
|
22
|
+
billed?: string;
|
|
23
|
+
daysLeft?: string;
|
|
24
|
+
cancelTitle?: string;
|
|
25
|
+
cancelText?: string;
|
|
12
26
|
emptyTitle?: string;
|
|
13
27
|
emptyText?: string;
|
|
14
28
|
}
|
|
@@ -16,6 +30,7 @@ export interface CurrentPlanCardProps {
|
|
|
16
30
|
/** Null = free tier / no subscription (renders the empty state). */
|
|
17
31
|
subscription: CurrentPlanSubscription | null;
|
|
18
32
|
onCancel?: () => void;
|
|
33
|
+
onResume?: () => void;
|
|
19
34
|
labels?: CurrentPlanCardLabels;
|
|
20
35
|
/** Per-component theme (accent, mode, radius…) — scoped, never global. */
|
|
21
36
|
theme?: SlyxUpTheme;
|
|
@@ -23,8 +38,9 @@ export interface CurrentPlanCardProps {
|
|
|
23
38
|
className?: string;
|
|
24
39
|
}
|
|
25
40
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
41
|
+
* Rich "your plan" card — price, status, period progress, renewal meta,
|
|
42
|
+
* cancel/resume actions and a scheduled-cancellation warning. Drop it
|
|
43
|
+
* anywhere without mounting a full profile/portal.
|
|
28
44
|
*/
|
|
29
|
-
export declare function CurrentPlanCard({ subscription, onCancel, labels, theme, style, className, }: CurrentPlanCardProps): import("react").JSX.Element;
|
|
45
|
+
export declare function CurrentPlanCard({ subscription, onCancel, onResume, labels, theme, style, className, }: CurrentPlanCardProps): import("react").JSX.Element;
|
|
30
46
|
//# sourceMappingURL=CurrentPlanCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrentPlanCard.d.ts","sourceRoot":"","sources":["../../../src/components/CurrentPlanCard/CurrentPlanCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,iBAAiB,EAAE,OAAO,CAAC;
|
|
1
|
+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AAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkCD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,KAAK,EACL,SAAS,GACV,EAAE,oBAAoB,+BAyQtB"}
|
|
@@ -3,36 +3,142 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useScopedTheme } from '../../lib/scoped-theme';
|
|
4
4
|
import { injectStyles } from '../../styles';
|
|
5
5
|
import { SubscriptionStatus } from '../SubscriptionStatus/SubscriptionStatus';
|
|
6
|
+
const DAY_MS = 86_400_000;
|
|
7
|
+
function daysLeft(endIso) {
|
|
8
|
+
if (!endIso)
|
|
9
|
+
return null;
|
|
10
|
+
const ms = new Date(endIso).getTime() - Date.now();
|
|
11
|
+
if (Number.isNaN(ms))
|
|
12
|
+
return null;
|
|
13
|
+
return Math.max(0, Math.ceil(ms / DAY_MS));
|
|
14
|
+
}
|
|
15
|
+
function periodProgress(startIso, endIso) {
|
|
16
|
+
if (!startIso || !endIso)
|
|
17
|
+
return null;
|
|
18
|
+
const start = new Date(startIso).getTime();
|
|
19
|
+
const end = new Date(endIso).getTime();
|
|
20
|
+
if (Number.isNaN(start) || Number.isNaN(end) || end <= start)
|
|
21
|
+
return null;
|
|
22
|
+
const pct = ((Date.now() - start) / (end - start)) * 100;
|
|
23
|
+
return Math.min(100, Math.max(0, Math.round(pct)));
|
|
24
|
+
}
|
|
25
|
+
function formatDate(iso) {
|
|
26
|
+
const d = new Date(iso);
|
|
27
|
+
return Number.isNaN(d.getTime())
|
|
28
|
+
? iso
|
|
29
|
+
: d.toLocaleDateString(undefined, {
|
|
30
|
+
month: 'short',
|
|
31
|
+
day: 'numeric',
|
|
32
|
+
year: 'numeric',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
6
35
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
36
|
+
* Rich "your plan" card — price, status, period progress, renewal meta,
|
|
37
|
+
* cancel/resume actions and a scheduled-cancellation warning. Drop it
|
|
38
|
+
* anywhere without mounting a full profile/portal.
|
|
9
39
|
*/
|
|
10
|
-
export function CurrentPlanCard({ subscription, onCancel, labels, theme, style, className, }) {
|
|
40
|
+
export function CurrentPlanCard({ subscription, onCancel, onResume, labels, theme, style, className, }) {
|
|
11
41
|
injectStyles();
|
|
12
42
|
const ref = useScopedTheme(theme);
|
|
13
43
|
if (!subscription) {
|
|
14
44
|
return (_jsxs("div", { ref: ref, className: `slx-card ${className ?? ''}`, style: style, children: [_jsx("h3", { style: { fontSize: 16, fontWeight: 600 }, children: labels?.emptyTitle ?? 'No active subscription' }), _jsx("p", { style: { fontSize: 13.5, color: 'var(--slx-muted)', marginTop: 6 }, children: labels?.emptyText ??
|
|
15
45
|
"You don't have a subscription yet. Choose a plan to get started." })] }));
|
|
16
46
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
47
|
+
const left = daysLeft(subscription.currentPeriodEnd);
|
|
48
|
+
const progress = periodProgress(subscription.currentPeriodStart, subscription.currentPeriodEnd);
|
|
49
|
+
const showPrice = typeof subscription.amount === 'number' && subscription.amount >= 0;
|
|
50
|
+
const scheduled = subscription.cancelAtPeriodEnd;
|
|
51
|
+
const trialing = subscription.status === 'trialing';
|
|
52
|
+
return (_jsxs("div", { ref: ref, className: `slx-card ${className ?? ''}`, style: style, children: [_jsxs("div", { style: {
|
|
53
|
+
display: 'flex',
|
|
54
|
+
justifyContent: 'space-between',
|
|
55
|
+
alignItems: 'flex-start',
|
|
56
|
+
gap: 12,
|
|
57
|
+
}, children: [_jsxs("div", { children: [_jsx("p", { style: {
|
|
58
|
+
fontSize: 11.5,
|
|
59
|
+
fontWeight: 700,
|
|
60
|
+
letterSpacing: '.08em',
|
|
61
|
+
textTransform: 'uppercase',
|
|
62
|
+
color: 'var(--slx-muted)',
|
|
63
|
+
margin: '0 0 4px',
|
|
64
|
+
}, children: labels?.title ?? 'Current plan' }), _jsx("h3", { style: {
|
|
65
|
+
fontSize: 22,
|
|
66
|
+
fontWeight: 750,
|
|
67
|
+
letterSpacing: '-0.02em',
|
|
68
|
+
fontFamily: 'var(--slx-display)',
|
|
69
|
+
margin: 0,
|
|
70
|
+
}, children: subscription.planName ?? 'Subscription' })] }), _jsx(SubscriptionStatus, { status: subscription.status })] }), showPrice && (_jsxs("div", { style: { marginTop: 10 }, children: [_jsxs("span", { className: "slx-price", style: { fontSize: 30 }, children: ["$", (subscription.amount / 100).toFixed(subscription.amount % 100 === 0 ? 0 : 2)] }), ' ', _jsxs("span", { style: { fontSize: 13, color: 'var(--slx-muted)' }, children: [subscription.currency ?? '', "/", subscription.interval === 'year' ? 'year' : 'month'] }), subscription.paymentMethod && (_jsx("p", { style: {
|
|
71
|
+
fontSize: 12.5,
|
|
72
|
+
color: 'var(--slx-muted)',
|
|
73
|
+
margin: '4px 0 0',
|
|
74
|
+
}, children: subscription.paymentMethod }))] })), progress !== null && left !== null && (_jsxs("div", { style: { marginTop: 16 }, children: [_jsx("div", { style: {
|
|
75
|
+
height: 6,
|
|
76
|
+
borderRadius: 999,
|
|
77
|
+
background: 'color-mix(in srgb, var(--slx-ink) 8%, transparent)',
|
|
78
|
+
overflow: 'hidden',
|
|
79
|
+
}, children: _jsx("div", { style: {
|
|
80
|
+
height: '100%',
|
|
81
|
+
width: `${progress}%`,
|
|
82
|
+
borderRadius: 999,
|
|
83
|
+
background: 'linear-gradient(90deg, var(--slx-accent), var(--slx-accent-2))',
|
|
84
|
+
transition: 'width .4s ease',
|
|
85
|
+
} }) }), _jsx("p", { style: {
|
|
86
|
+
fontSize: 12,
|
|
87
|
+
color: 'var(--slx-muted)',
|
|
88
|
+
margin: '6px 0 0',
|
|
89
|
+
}, children: left === 0
|
|
90
|
+
? 'Renews today'
|
|
91
|
+
: `${left} day${left === 1 ? '' : 's'} left in this period` })] })), _jsxs("div", { style: {
|
|
92
|
+
display: 'flex',
|
|
93
|
+
flexWrap: 'wrap',
|
|
94
|
+
gap: '8px 24px',
|
|
95
|
+
marginTop: 16,
|
|
96
|
+
paddingTop: 14,
|
|
97
|
+
borderTop: '1px solid var(--slx-border)',
|
|
98
|
+
}, children: [subscription.currentPeriodEnd && (_jsxs("div", { children: [_jsx("p", { style: {
|
|
99
|
+
fontSize: 11,
|
|
100
|
+
fontWeight: 600,
|
|
101
|
+
textTransform: 'uppercase',
|
|
102
|
+
letterSpacing: '.06em',
|
|
103
|
+
color: 'var(--slx-muted)',
|
|
104
|
+
margin: '0 0 2px',
|
|
105
|
+
}, children: scheduled ? 'Ends' : (labels?.renews ?? 'Renews') }), _jsx("p", { style: { fontSize: 13.5, fontWeight: 600, margin: 0 }, children: formatDate(subscription.currentPeriodEnd) })] })), subscription.interval && (_jsxs("div", { children: [_jsx("p", { style: {
|
|
106
|
+
fontSize: 11,
|
|
107
|
+
fontWeight: 600,
|
|
108
|
+
textTransform: 'uppercase',
|
|
109
|
+
letterSpacing: '.06em',
|
|
110
|
+
color: 'var(--slx-muted)',
|
|
111
|
+
margin: '0 0 2px',
|
|
112
|
+
}, children: labels?.billed ?? 'Billed' }), _jsx("p", { style: {
|
|
113
|
+
fontSize: 13.5,
|
|
114
|
+
fontWeight: 600,
|
|
115
|
+
margin: 0,
|
|
116
|
+
textTransform: 'capitalize',
|
|
117
|
+
}, children: subscription.interval === 'year' ? 'Yearly' : 'Monthly' })] })), trialing && (_jsxs("div", { children: [_jsx("p", { style: {
|
|
118
|
+
fontSize: 11,
|
|
119
|
+
fontWeight: 600,
|
|
120
|
+
textTransform: 'uppercase',
|
|
121
|
+
letterSpacing: '.06em',
|
|
122
|
+
color: 'var(--slx-muted)',
|
|
123
|
+
margin: '0 0 2px',
|
|
124
|
+
}, children: "Trial" }), _jsx("p", { style: { fontSize: 13.5, fontWeight: 600, margin: 0 }, children: "Convert to paid on renewal" })] }))] }), scheduled && (_jsxs("div", { style: {
|
|
125
|
+
marginTop: 14,
|
|
126
|
+
borderRadius: 'var(--slx-radius)',
|
|
127
|
+
border: '1px solid color-mix(in srgb, var(--slx-danger) 30%, transparent)',
|
|
128
|
+
background: 'color-mix(in srgb, var(--slx-danger) 7%, transparent)',
|
|
129
|
+
padding: '10px 12px',
|
|
130
|
+
fontSize: 12.5,
|
|
131
|
+
lineHeight: 1.5,
|
|
132
|
+
}, children: [_jsx("strong", { children: labels?.cancelTitle ?? 'Cancellation scheduled' }), _jsx("br", {}), _jsx("span", { style: { color: 'var(--slx-muted)' }, children: labels?.cancelText ??
|
|
133
|
+
'You keep access until the end date above, then move to the free tier.' })] })), (onResume && scheduled) || (onCancel && !scheduled) ? (_jsxs("div", { style: { display: 'flex', gap: 8, marginTop: 14 }, children: [onResume && scheduled && (_jsx("button", { type: "button", onClick: onResume, className: "slx-btn", style: { width: 'auto', flex: 1 }, children: labels?.resume ?? 'Resume plan' })), onCancel && !scheduled && (_jsx("button", { type: "button", onClick: onCancel, style: {
|
|
134
|
+
fontSize: 13,
|
|
135
|
+
fontWeight: 550,
|
|
136
|
+
background: 'transparent',
|
|
137
|
+
border: '1px solid var(--slx-border)',
|
|
138
|
+
borderRadius: 'var(--slx-radius)',
|
|
139
|
+
padding: '8px 14px',
|
|
140
|
+
cursor: 'pointer',
|
|
141
|
+
color: 'var(--slx-danger)',
|
|
142
|
+
}, children: labels?.cancel ?? 'Cancel' }))] })) : null] }));
|
|
37
143
|
}
|
|
38
144
|
//# sourceMappingURL=CurrentPlanCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrentPlanCard.js","sourceRoot":"","sources":["../../../src/components/CurrentPlanCard/CurrentPlanCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"CurrentPlanCard.js","sourceRoot":"","sources":["../../../src/components/CurrentPlanCard/CurrentPlanCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AA0C9E,MAAM,MAAM,GAAG,UAAU,CAAC;AAE1B,SAAS,QAAQ,CAAC,MAAqB;IACrC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACnD,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,cAAc,CACrB,QAAmC,EACnC,MAAqB;IAErB,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,O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EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,aACnD,QAAQ,IAAI,SAAS,IAAI,CACxB,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,YAEhC,MAAM,EAAE,MAAM,IAAI,aAAa,GACzB,CACV,EACA,QAAQ,IAAI,CAAC,SAAS,IAAI,CACzB,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE;4BACL,QAAQ,EAAE,EAAE;4BACZ,UAAU,EAAE,GAAG;4BACf,UAAU,EAAE,aAAa;4BACzB,MAAM,EAAE,6BAA6B;4BACrC,YAAY,EAAE,mBAAmB;4BACjC,OAAO,EAAE,UAAU;4BACnB,MAAM,EAAE,SAAS;4BACjB,KAAK,EAAE,mBAAmB;yBAC3B,YAEA,MAAM,EAAE,MAAM,IAAI,QAAQ,GACpB,CACV,IACG,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -10,11 +10,13 @@ export interface InvoiceRow {
|
|
|
10
10
|
export interface InvoicesTableProps {
|
|
11
11
|
invoices: InvoiceRow[];
|
|
12
12
|
title?: string;
|
|
13
|
+
/** Show a "Total paid" footer row. Default true. */
|
|
14
|
+
showTotal?: boolean;
|
|
13
15
|
/** Per-component theme (accent, mode, radius…) — scoped, never global. */
|
|
14
16
|
theme?: SlyxUpTheme;
|
|
15
17
|
style?: CSSProperties;
|
|
16
18
|
className?: string;
|
|
17
19
|
}
|
|
18
|
-
/** Invoice history table. Renders nothing when
|
|
19
|
-
export declare function InvoicesTable({ invoices, title, theme, style, className, }: InvoicesTableProps): import("react").JSX.Element | null;
|
|
20
|
+
/** Invoice history table with status pills + paid total. Renders nothing when empty. */
|
|
21
|
+
export declare function InvoicesTable({ invoices, title, showTotal, theme, style, className, }: InvoicesTableProps): import("react").JSX.Element | null;
|
|
20
22
|
//# sourceMappingURL=InvoicesTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvoicesTable.d.ts","sourceRoot":"","sources":["../../../src/components/InvoicesTable/InvoicesTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"InvoicesTable.d.ts","sourceRoot":"","sources":["../../../src/components/InvoicesTable/InvoicesTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IACpD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAkB,EAClB,SAAgB,EAChB,KAAK,EACL,KAAK,EACL,SAAS,GACV,EAAE,kBAAkB,sCA4FpB"}
|
|
@@ -2,32 +2,36 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useScopedTheme } from '../../lib/scoped-theme';
|
|
4
4
|
import { injectStyles } from '../../styles';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { SubscriptionStatus } from '../SubscriptionStatus/SubscriptionStatus';
|
|
6
|
+
/** Invoice history table with status pills + paid total. Renders nothing when empty. */
|
|
7
|
+
export function InvoicesTable({ invoices, title = 'Invoices', showTotal = true, theme, style, className, }) {
|
|
7
8
|
injectStyles();
|
|
8
9
|
const ref = useScopedTheme(theme);
|
|
9
10
|
if (invoices.length === 0)
|
|
10
11
|
return null;
|
|
11
|
-
|
|
12
|
+
const totals = new Map();
|
|
13
|
+
for (const invoice of invoices) {
|
|
14
|
+
if (invoice.status === 'paid')
|
|
15
|
+
totals.set(invoice.currency, (totals.get(invoice.currency) ?? 0) + invoice.amount);
|
|
16
|
+
}
|
|
17
|
+
const money = (amount, currency) => new Intl.NumberFormat(undefined, { style: 'currency', currency }).format(amount / 100);
|
|
18
|
+
return (_jsxs("div", { ref: ref, className: `slx-card ${className ?? ''}`, style: style, children: [_jsx("h3", { style: { fontSize: 15, fontWeight: 600, marginBottom: 12 }, children: title }), _jsxs("table", { "aria-label": title, style: { width: '100%', fontSize: 13, borderCollapse: 'collapse' }, children: [_jsx("thead", { children: _jsxs("tr", { style: {
|
|
12
19
|
borderBottom: '1px solid var(--slx-border)',
|
|
13
20
|
textAlign: 'left',
|
|
14
21
|
}, children: [_jsx("th", { style: { padding: '6px 0', fontWeight: 550 }, children: "Date" }), _jsx("th", { style: { padding: '6px 0', fontWeight: 550 }, children: "Amount" }), _jsx("th", { style: { padding: '6px 0', fontWeight: 550 }, children: "Status" })] }) }), _jsx("tbody", { children: invoices.map((inv) => (_jsxs("tr", { className: "slx-row-hover", style: { borderBottom: '1px solid var(--slx-border)' }, children: [_jsx("td", { style: { padding: '8px 0' }, children: inv.billedAt
|
|
15
22
|
? new Date(inv.billedAt).toLocaleDateString()
|
|
16
|
-
: '—' }), _jsxs("td", { style: { padding: '8px 0' }, children: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
? 'var(--slx-danger)'
|
|
30
|
-
: 'var(--slx-accent)',
|
|
31
|
-
}, children: inv.status }) })] }, inv.id))) })] })] }));
|
|
23
|
+
: '—' }), _jsxs("td", { style: { padding: '8px 0' }, children: [money(inv.amount, inv.currency), " ", inv.currency] }), _jsx("td", { style: { padding: '8px 0' }, children: _jsx(SubscriptionStatus, { status: inv.status }) })] }, inv.id))) }), showTotal && totals.size > 0 && (_jsx("tfoot", { children: Array.from(totals, ([currency, paidTotal]) => (_jsxs("tr", { children: [_jsx("td", { colSpan: 2, style: {
|
|
24
|
+
padding: '10px 0 2px',
|
|
25
|
+
fontSize: 12,
|
|
26
|
+
fontWeight: 600,
|
|
27
|
+
textTransform: 'uppercase',
|
|
28
|
+
letterSpacing: '.06em',
|
|
29
|
+
color: 'var(--slx-muted)',
|
|
30
|
+
}, children: "Total paid" }), _jsxs("td", { style: {
|
|
31
|
+
padding: '10px 0 2px',
|
|
32
|
+
fontSize: 14,
|
|
33
|
+
fontWeight: 750,
|
|
34
|
+
fontFamily: 'var(--slx-display)',
|
|
35
|
+
}, children: [money(paidTotal, currency), " ", currency] })] }, currency))) }))] })] }));
|
|
32
36
|
}
|
|
33
37
|
//# sourceMappingURL=InvoicesTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvoicesTable.js","sourceRoot":"","sources":["../../../src/components/InvoicesTable/InvoicesTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"InvoicesTable.js","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AAC,IAAI,CAC/B,0BACG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAC7C,yBACE,aACE,OAAO,EAAE,CAAC,EACV,KAAK,EAAE;wCACL,OAAO,EAAE,YAAY;wCACrB,QAAQ,EAAE,EAAE;wCACZ,UAAU,EAAE,GAAG;wCACf,aAAa,EAAE,WAAW;wCAC1B,aAAa,EAAE,OAAO;wCACtB,KAAK,EAAE,kBAAkB;qCAC1B,2BAGE,EACL,cACE,KAAK,EAAE;wCACL,OAAO,EAAE,YAAY;wCACrB,QAAQ,EAAE,EAAE;wCACZ,UAAU,EAAE,GAAG;wCACf,UAAU,EAAE,oBAAoB;qCACjC,aAEA,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,OAAG,QAAQ,IACnC,KAvBE,QAAQ,CAwBZ,CACN,CAAC,GACI,CACT,IACK,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -25,6 +25,6 @@ export function PlanCard({ plan, current = false, currentLabel = 'Current plan',
|
|
|
25
25
|
left: 0,
|
|
26
26
|
color: '#34d399',
|
|
27
27
|
fontWeight: 700,
|
|
28
|
-
}, children: "\u2713" }), ' ', f] }, f))) }), _jsx("button", { type: "button", className:
|
|
28
|
+
}, children: "\u2713" }), ' ', f] }, f))) }), _jsx("button", { type: "button", className: current ? 'slx-btn-current' : 'slx-btn', onClick: () => (current ? undefined : onSelect?.(plan)), disabled: loading || current, style: current ? { opacity: 1, cursor: 'default' } : undefined, children: current ? currentLabel : ctaLabel })] }));
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=PlanCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlanCard.js","sourceRoot":"","sources":["../../../src/components/PlanCard/PlanCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAA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disabled instead of "Get started". Pass the active
|
|
11
11
|
* subscription's planId, or the $0 plan's id when on the free tier. */
|
|
12
12
|
currentPlanId?: string | null;
|
|
13
|
-
currentLabel?: string;
|
|
14
|
-
ctaLabel?: string;
|
|
13
|
+
currentLabel?: string | ((plan: PricingPlan) => string);
|
|
14
|
+
ctaLabel?: string | ((plan: PricingPlan) => string);
|
|
15
15
|
/** Per-component theme (accent, mode, radius…) — scoped, never global. */
|
|
16
16
|
theme?: SlyxUpTheme;
|
|
17
17
|
style?: CSSProperties;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PricingTable.d.ts","sourceRoot":"","sources":["../../../src/components/PricingTable/PricingTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC;AAQvC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;4EAEwE;IACxE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PricingTable.d.ts","sourceRoot":"","sources":["../../../src/components/PricingTable/PricingTable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC;AAQvC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;4EAEwE;IACxE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC,CAAC;IACpD,0EAA0E;IAC1E,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,aAAoB,EACpB,YAA6B,EAC7B,QAAwB,EACxB,KAAK,EACL,KAAK,EACL,SAAS,GACV,EAAE,iBAAiB,+BAwEnB"}
|
|
@@ -18,6 +18,13 @@ export function PricingTable({ plans, onSelect, loading, currentPlanId = null, c
|
|
|
18
18
|
if (loading) {
|
|
19
19
|
return (_jsxs(_Fragment, { children: [_jsx("style", { children: PRICING_GRID_CSS }), _jsx("div", { ref: ref, className: gridClass, style: style, "aria-busy": "true", children: [1, 2, 3].map((i) => (_jsxs("div", { className: "slx-card", style: { minHeight: 320 }, children: [_jsx("div", { className: "slx-skeleton", style: { height: 18, width: '45%' } }), _jsx("div", { className: "slx-skeleton", style: { height: 40, width: '60%', marginTop: 14 } }), _jsx("div", { className: "slx-skeleton", style: { height: 12, width: '80%', marginTop: 18 } }), _jsx("div", { className: "slx-skeleton", style: { height: 12, width: '70%', marginTop: 10 } }), _jsx("div", { className: "slx-skeleton", style: { height: 12, width: '75%', marginTop: 10 } }), _jsx("div", { className: "slx-skeleton", style: { height: 40, marginTop: 26 } })] }, i))) })] }));
|
|
20
20
|
}
|
|
21
|
-
return (_jsxs(_Fragment, { children: [_jsx("style", { children: PRICING_GRID_CSS }), _jsx("div", { ref: ref, className: gridClass, style: style, children: plans.map((plan, i) =>
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsx("style", { children: PRICING_GRID_CSS }), _jsx("div", { ref: ref, className: gridClass, style: style, children: plans.map((plan, i) => {
|
|
22
|
+
const isCurrent = currentPlanId != null && plan.id === currentPlanId;
|
|
23
|
+
const resolvedCurrentLabel = typeof currentLabel === 'function'
|
|
24
|
+
? currentLabel(plan)
|
|
25
|
+
: currentLabel;
|
|
26
|
+
const resolvedCtaLabel = typeof ctaLabel === 'function' ? ctaLabel(plan) : ctaLabel;
|
|
27
|
+
return (_jsx(PlanCard, { plan: plan, current: isCurrent, currentLabel: resolvedCurrentLabel, ctaLabel: resolvedCtaLabel, onSelect: onSelect, loading: loading, className: i < 3 ? `slx-rise-${i + 1}` : undefined }, plan.id));
|
|
28
|
+
}) })] }));
|
|
22
29
|
}
|
|
23
30
|
//# sourceMappingURL=PricingTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PricingTable.js","sourceRoot":"","sources":["../../../src/components/PricingTable/PricingTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AAInE,MAAM,gBAAgB,GAAG;IACvB,oEAAoE;IACpE,qJAAqJ;IACrJ,gHAAgH;CACjH,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAkBX,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,aAAa,GAAG,IAAI,EACpB,YAA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EAAC,cAAc,EACxB,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,GAClD,EACF,cACE,SAAS,EAAC,cAAc,EACxB,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,GACpC,KAxBM,CAAC,CAyBL,CACP,CAAC,GACE,IACL,CACJ,CAAC;IACJ,CAAC;IAED,OAAO,CACL,8BACE,0BAAQ,gBAAgB,GAAS,EACjC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,YAC9C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"PricingTable.js","sourceRoot":"","sources":["../../../src/components/PricingTable/PricingTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AAInE,MAAM,gBAAgB,GAAG;IACvB,oEAAoE;IACpE,qJAAqJ;IACrJ,gHAAgH;CACjH,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAkBX,yEAAyE;AACzE,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,aAAa,GAAG,IAAI,EACpB,YAAY,GAAG,cAAc,EAC7B,QAAQ,GAAG,aAAa,EACxB,KAAK,EACL,KAAK,EACL,SAAS,GACS;IAClB,YAAY,EAAE,CAAC;IACf,MAAM,GAAG,GAAG,cAAc,CAAiB,KAAK,CAAC,CAAC;IAClD,uEAAuE;IACvE,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,E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