@metrifox/react-sdk 0.0.20-beta.9 → 2.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/dist/index.cjs +32 -32
- package/dist/index.d.ts +44 -1
- package/dist/index.js +28 -28
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,8 +13,21 @@ interface PricingTableTheme {
|
|
|
13
13
|
};
|
|
14
14
|
plans?: PricingTablePlansTheme;
|
|
15
15
|
tabs?: TabsTheme;
|
|
16
|
+
select?: SelectTheme;
|
|
16
17
|
checkoutBar?: CheckoutBarTheme;
|
|
17
18
|
}
|
|
19
|
+
interface SelectTheme {
|
|
20
|
+
background?: string;
|
|
21
|
+
borderColor?: string;
|
|
22
|
+
textColor?: string;
|
|
23
|
+
placeholderColor?: string;
|
|
24
|
+
/** Color of the dropdown arrow (caret) icon */
|
|
25
|
+
caretColor?: string;
|
|
26
|
+
dropdownBackground?: string;
|
|
27
|
+
dropdownBorderColor?: string;
|
|
28
|
+
optionTextColor?: string;
|
|
29
|
+
optionHoverBackground?: string;
|
|
30
|
+
}
|
|
18
31
|
interface PricingTablePlansTheme {
|
|
19
32
|
currentPlanCard?: CurrentSubscriptionCard;
|
|
20
33
|
planCards?: CardTheme;
|
|
@@ -111,6 +124,17 @@ type CustomerPortalTheme = {
|
|
|
111
124
|
activeTabTextColor?: string;
|
|
112
125
|
inactiveTabTextColor?: string;
|
|
113
126
|
};
|
|
127
|
+
select?: {
|
|
128
|
+
background?: string;
|
|
129
|
+
borderColor?: string;
|
|
130
|
+
textColor?: string;
|
|
131
|
+
/** Color of the dropdown arrow (caret) icon */
|
|
132
|
+
caretColor?: string;
|
|
133
|
+
dropdownBackground?: string;
|
|
134
|
+
dropdownBorderColor?: string;
|
|
135
|
+
optionTextColor?: string;
|
|
136
|
+
optionHoverBackground?: string;
|
|
137
|
+
};
|
|
114
138
|
sections?: {
|
|
115
139
|
background?: string;
|
|
116
140
|
padding?: string;
|
|
@@ -355,6 +379,16 @@ type CustomerPortalTheme = {
|
|
|
355
379
|
freeTrialText?: string;
|
|
356
380
|
};
|
|
357
381
|
};
|
|
382
|
+
/** Banner variants (e.g. info banner for scheduled change / undo cancellation). */
|
|
383
|
+
banners?: {
|
|
384
|
+
info?: {
|
|
385
|
+
background?: string;
|
|
386
|
+
textColor?: string;
|
|
387
|
+
borderRadius?: string;
|
|
388
|
+
buttonBorderColor?: string;
|
|
389
|
+
buttonTextColor?: string;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
358
392
|
/** Used by e.g. subscription line-item actions. Not set in default theme; pass to override. */
|
|
359
393
|
popover?: {
|
|
360
394
|
trigger?: {
|
|
@@ -367,7 +401,8 @@ type CustomerPortalTheme = {
|
|
|
367
401
|
background?: string;
|
|
368
402
|
borderColor?: string;
|
|
369
403
|
borderRadius?: string;
|
|
370
|
-
|
|
404
|
+
/** Padding applied to each menu item (e.g. "0.25rem 1rem"). */
|
|
405
|
+
itemPadding?: string;
|
|
371
406
|
itemHoverBackground?: string;
|
|
372
407
|
itemDividerColor?: string;
|
|
373
408
|
typography?: {
|
|
@@ -438,6 +473,11 @@ declare enum OneOffType {
|
|
|
438
473
|
FLAT = "flat",
|
|
439
474
|
PERCENTAGE = "percentage"
|
|
440
475
|
}
|
|
476
|
+
declare enum ScheduledChangeType {
|
|
477
|
+
UPGRADE = "upgrade",
|
|
478
|
+
DOWNGRADE = "downgrade",
|
|
479
|
+
ADDON_REMOVE = "addon_remove"
|
|
480
|
+
}
|
|
441
481
|
|
|
442
482
|
type SectionKey = "upcomingInvoice" | "subscription" | "creditBalance" | "entitlementUsage" | "paymentOverview" | "billingHistory" | "plan";
|
|
443
483
|
interface CustomerPortalProps {
|
|
@@ -502,6 +542,7 @@ interface SubscriptionProps {
|
|
|
502
542
|
subscription_items: ISubscriptionItems[];
|
|
503
543
|
upcoming_invoice: IUpcomingInvoice | null;
|
|
504
544
|
can_update_quantities: boolean;
|
|
545
|
+
scheduled_change?: ScheduledChangeType | null;
|
|
505
546
|
}
|
|
506
547
|
interface ISubscriptionItems {
|
|
507
548
|
price_option_id: string;
|
|
@@ -584,6 +625,8 @@ interface Offering {
|
|
|
584
625
|
base_entitlements_plan_name: string;
|
|
585
626
|
version_id: string;
|
|
586
627
|
is_invoiceable: boolean;
|
|
628
|
+
product_key?: string;
|
|
629
|
+
product_currency_code?: string;
|
|
587
630
|
}
|
|
588
631
|
interface PriceOption {
|
|
589
632
|
metadata: Record<string, string>;
|