@bunnyapp/components 1.5.0-beta.8 → 1.5.0-beta.9
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/cjs/index.js
CHANGED
|
@@ -154,7 +154,7 @@ var BrandContext = react.createContext({
|
|
|
154
154
|
});
|
|
155
155
|
|
|
156
156
|
// This will be replaced at build time by rollup-plugin-replace
|
|
157
|
-
var PACKAGE_VERSION = '1.5.0-beta.
|
|
157
|
+
var PACKAGE_VERSION = '1.5.0-beta.8';
|
|
158
158
|
var createRequestHeaders = function (token) {
|
|
159
159
|
var headers = createClientDevHeaders({ token: token });
|
|
160
160
|
// Add the components version header
|
|
@@ -22058,7 +22058,7 @@ var getSubscriptionStatusText = function (subscription) {
|
|
|
22058
22058
|
case 'ACTIVATE':
|
|
22059
22059
|
return "Activates on ".concat(common.formatDate(endDate));
|
|
22060
22060
|
case 'CANCEL':
|
|
22061
|
-
return "Trial
|
|
22061
|
+
return "Trial expires on ".concat(common.formatDate(trialEndDate));
|
|
22062
22062
|
}
|
|
22063
22063
|
}
|
|
22064
22064
|
if (evergreen) {
|
|
@@ -22078,7 +22078,7 @@ var SubscriptionCardHeader = function (_a) {
|
|
|
22078
22078
|
var isTrial = isSubscriptionTrial(subscription);
|
|
22079
22079
|
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between", style: {
|
|
22080
22080
|
backgroundColor: darkMode ? 'var(--row-background-dark)' : '',
|
|
22081
|
-
} }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [((_b = subscription === null || subscription === void 0 ? void 0 : subscription.product) === null || _b === void 0 ? void 0 : _b.name) && (jsxRuntime.jsx(Text$a, __assign({ style: __assign({ fontSize: '11px', fontWeight: 500, color: brandColor }, subscriptionProductNameStyle) }, { children: (_c = subscription.product.name) === null || _c === void 0 ? void 0 : _c.toUpperCase() }))), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-grow bunny-items-center bunny-gap-2" }, { children: [((_d = subscription === null || subscription === void 0 ? void 0 : subscription.plan) === null || _d === void 0 ? void 0 : _d.name) && (jsxRuntime.jsx(Text$a, __assign({ className: "bunny-text-lg" }, { children: subscription.plan.name }))), jsxRuntime.jsxs(CustomizedTag, __assign({ color: TAG_COLORS[(_e = subscription.state) === null || _e === void 0 ? void 0 : _e.toUpperCase()] }, { children: [lodashExports.capitalize(subscription.state.toLowerCase().replace(/_/g, ' ')), isTrial ? " (".concat(trialDaysLeft
|
|
22081
|
+
} }, { children: [jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [((_b = subscription === null || subscription === void 0 ? void 0 : subscription.product) === null || _b === void 0 ? void 0 : _b.name) && (jsxRuntime.jsx(Text$a, __assign({ style: __assign({ fontSize: '11px', fontWeight: 500, color: brandColor }, subscriptionProductNameStyle) }, { children: (_c = subscription.product.name) === null || _c === void 0 ? void 0 : _c.toUpperCase() }))), jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-grow bunny-items-center bunny-gap-2" }, { children: [((_d = subscription === null || subscription === void 0 ? void 0 : subscription.plan) === null || _d === void 0 ? void 0 : _d.name) && (jsxRuntime.jsx(Text$a, __assign({ className: "bunny-text-lg" }, { children: subscription.plan.name }))), jsxRuntime.jsxs(CustomizedTag, __assign({ color: TAG_COLORS[(_e = subscription.state) === null || _e === void 0 ? void 0 : _e.toUpperCase()] }, { children: [lodashExports.capitalize(subscription.state.toLowerCase().replace(/_/g, ' ')), isTrial ? " (".concat(trialDaysLeft !== null && trialDaysLeft !== void 0 ? trialDaysLeft : 'N/A', " days left)") : ''] }))] }))] })), jsxRuntime.jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-6" }, { children: jsxRuntime.jsx(SubscriptionStatusAndActions, { onChangePlanClick: onChangePlanClick, onCancelSubscriptionClick: onCancelSubscriptionClick, subscription: subscription }) }))] })));
|
|
22082
22082
|
};
|
|
22083
22083
|
function SubscriptionStatusAndActions(_a) {
|
|
22084
22084
|
var onChangePlanClick = _a.onChangePlanClick, onCancelSubscriptionClick = _a.onCancelSubscriptionClick, subscription = _a.subscription;
|
|
@@ -1,93 +1,13 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import Quote from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Quote from './Quote';
|
|
3
3
|
declare const meta: Meta<typeof Quote>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
className?: any;
|
|
11
|
-
backButtonName?: any;
|
|
12
|
-
onBackButtonClick?: any;
|
|
13
|
-
shadow?: any;
|
|
14
|
-
hideDownloadButton?: any;
|
|
15
|
-
id?: any;
|
|
16
|
-
onPaymentSuccess?: any;
|
|
17
|
-
invoiceQuoteViewComponent?: any;
|
|
18
|
-
onInvoiceDownloadError?: any;
|
|
19
|
-
hidePaymentForm?: any;
|
|
20
|
-
onInvoiceLoaded?: any;
|
|
21
|
-
onQuoteLoaded?: any;
|
|
22
|
-
}>;
|
|
23
|
-
export declare const NoShadow: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
|
|
24
|
-
[x: string]: any;
|
|
25
|
-
}, {
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
className?: any;
|
|
28
|
-
backButtonName?: any;
|
|
29
|
-
onBackButtonClick?: any;
|
|
30
|
-
shadow?: any;
|
|
31
|
-
hideDownloadButton?: any;
|
|
32
|
-
id?: any;
|
|
33
|
-
onPaymentSuccess?: any;
|
|
34
|
-
invoiceQuoteViewComponent?: any;
|
|
35
|
-
onInvoiceDownloadError?: any;
|
|
36
|
-
hidePaymentForm?: any;
|
|
37
|
-
onInvoiceLoaded?: any;
|
|
38
|
-
onQuoteLoaded?: any;
|
|
39
|
-
}>;
|
|
40
|
-
export declare const Mobile: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
|
|
41
|
-
[x: string]: any;
|
|
42
|
-
}, {
|
|
43
|
-
[x: string]: any;
|
|
44
|
-
className?: any;
|
|
45
|
-
backButtonName?: any;
|
|
46
|
-
onBackButtonClick?: any;
|
|
47
|
-
shadow?: any;
|
|
48
|
-
hideDownloadButton?: any;
|
|
49
|
-
id?: any;
|
|
50
|
-
onPaymentSuccess?: any;
|
|
51
|
-
invoiceQuoteViewComponent?: any;
|
|
52
|
-
onInvoiceDownloadError?: any;
|
|
53
|
-
hidePaymentForm?: any;
|
|
54
|
-
onInvoiceLoaded?: any;
|
|
55
|
-
onQuoteLoaded?: any;
|
|
56
|
-
}>;
|
|
57
|
-
export declare const CustomClassName: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
|
|
58
|
-
[x: string]: any;
|
|
59
|
-
}, {
|
|
60
|
-
[x: string]: any;
|
|
61
|
-
className?: any;
|
|
62
|
-
backButtonName?: any;
|
|
63
|
-
onBackButtonClick?: any;
|
|
64
|
-
shadow?: any;
|
|
65
|
-
hideDownloadButton?: any;
|
|
66
|
-
id?: any;
|
|
67
|
-
onPaymentSuccess?: any;
|
|
68
|
-
invoiceQuoteViewComponent?: any;
|
|
69
|
-
onInvoiceDownloadError?: any;
|
|
70
|
-
hidePaymentForm?: any;
|
|
71
|
-
onInvoiceLoaded?: any;
|
|
72
|
-
onQuoteLoaded?: any;
|
|
73
|
-
}>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const NoShadow: Story;
|
|
8
|
+
export declare const Mobile: Story;
|
|
9
|
+
export declare const CustomClassName: Story;
|
|
74
10
|
export declare const HideDownloadButton: Story;
|
|
75
11
|
export declare const AcceptedQuote: Story;
|
|
76
12
|
export declare const AcceptedQuoteDarkMode: Story;
|
|
77
|
-
export declare const DarkMode:
|
|
78
|
-
[x: string]: any;
|
|
79
|
-
}, {
|
|
80
|
-
[x: string]: any;
|
|
81
|
-
className?: any;
|
|
82
|
-
backButtonName?: any;
|
|
83
|
-
onBackButtonClick?: any;
|
|
84
|
-
shadow?: any;
|
|
85
|
-
hideDownloadButton?: any;
|
|
86
|
-
id?: any;
|
|
87
|
-
onPaymentSuccess?: any;
|
|
88
|
-
invoiceQuoteViewComponent?: any;
|
|
89
|
-
onInvoiceDownloadError?: any;
|
|
90
|
-
hidePaymentForm?: any;
|
|
91
|
-
onInvoiceLoaded?: any;
|
|
92
|
-
onQuoteLoaded?: any;
|
|
93
|
-
}>;
|
|
13
|
+
export declare const DarkMode: Story;
|
package/dist/esm/index.js
CHANGED
|
@@ -143,7 +143,7 @@ var BrandContext = createContext({
|
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
// This will be replaced at build time by rollup-plugin-replace
|
|
146
|
-
var PACKAGE_VERSION = '1.5.0-beta.
|
|
146
|
+
var PACKAGE_VERSION = '1.5.0-beta.8';
|
|
147
147
|
var createRequestHeaders = function (token) {
|
|
148
148
|
var headers = createClientDevHeaders({ token: token });
|
|
149
149
|
// Add the components version header
|
|
@@ -22047,7 +22047,7 @@ var getSubscriptionStatusText = function (subscription) {
|
|
|
22047
22047
|
case 'ACTIVATE':
|
|
22048
22048
|
return "Activates on ".concat(formatDate(endDate));
|
|
22049
22049
|
case 'CANCEL':
|
|
22050
|
-
return "Trial
|
|
22050
|
+
return "Trial expires on ".concat(formatDate(trialEndDate));
|
|
22051
22051
|
}
|
|
22052
22052
|
}
|
|
22053
22053
|
if (evergreen) {
|
|
@@ -22067,7 +22067,7 @@ var SubscriptionCardHeader = function (_a) {
|
|
|
22067
22067
|
var isTrial = isSubscriptionTrial(subscription);
|
|
22068
22068
|
return (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between", style: {
|
|
22069
22069
|
backgroundColor: darkMode ? 'var(--row-background-dark)' : '',
|
|
22070
|
-
} }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [((_b = subscription === null || subscription === void 0 ? void 0 : subscription.product) === null || _b === void 0 ? void 0 : _b.name) && (jsx(Text$a, __assign({ style: __assign({ fontSize: '11px', fontWeight: 500, color: brandColor }, subscriptionProductNameStyle) }, { children: (_c = subscription.product.name) === null || _c === void 0 ? void 0 : _c.toUpperCase() }))), jsxs("div", __assign({ className: "bunny-flex bunny-grow bunny-items-center bunny-gap-2" }, { children: [((_d = subscription === null || subscription === void 0 ? void 0 : subscription.plan) === null || _d === void 0 ? void 0 : _d.name) && (jsx(Text$a, __assign({ className: "bunny-text-lg" }, { children: subscription.plan.name }))), jsxs(CustomizedTag, __assign({ color: TAG_COLORS[(_e = subscription.state) === null || _e === void 0 ? void 0 : _e.toUpperCase()] }, { children: [lodashExports.capitalize(subscription.state.toLowerCase().replace(/_/g, ' ')), isTrial ? " (".concat(trialDaysLeft
|
|
22070
|
+
} }, { children: [jsxs("div", __assign({ className: "bunny-flex bunny-flex-col bunny-gap-2" }, { children: [((_b = subscription === null || subscription === void 0 ? void 0 : subscription.product) === null || _b === void 0 ? void 0 : _b.name) && (jsx(Text$a, __assign({ style: __assign({ fontSize: '11px', fontWeight: 500, color: brandColor }, subscriptionProductNameStyle) }, { children: (_c = subscription.product.name) === null || _c === void 0 ? void 0 : _c.toUpperCase() }))), jsxs("div", __assign({ className: "bunny-flex bunny-grow bunny-items-center bunny-gap-2" }, { children: [((_d = subscription === null || subscription === void 0 ? void 0 : subscription.plan) === null || _d === void 0 ? void 0 : _d.name) && (jsx(Text$a, __assign({ className: "bunny-text-lg" }, { children: subscription.plan.name }))), jsxs(CustomizedTag, __assign({ color: TAG_COLORS[(_e = subscription.state) === null || _e === void 0 ? void 0 : _e.toUpperCase()] }, { children: [lodashExports.capitalize(subscription.state.toLowerCase().replace(/_/g, ' ')), isTrial ? " (".concat(trialDaysLeft !== null && trialDaysLeft !== void 0 ? trialDaysLeft : 'N/A', " days left)") : ''] }))] }))] })), jsx("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-6" }, { children: jsx(SubscriptionStatusAndActions, { onChangePlanClick: onChangePlanClick, onCancelSubscriptionClick: onCancelSubscriptionClick, subscription: subscription }) }))] })));
|
|
22071
22071
|
};
|
|
22072
22072
|
function SubscriptionStatusAndActions(_a) {
|
|
22073
22073
|
var onChangePlanClick = _a.onChangePlanClick, onCancelSubscriptionClick = _a.onCancelSubscriptionClick, subscription = _a.subscription;
|
|
@@ -1,93 +1,13 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import Quote from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Quote from './Quote';
|
|
3
3
|
declare const meta: Meta<typeof Quote>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
|
-
export declare const Default:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
className?: any;
|
|
11
|
-
backButtonName?: any;
|
|
12
|
-
onBackButtonClick?: any;
|
|
13
|
-
shadow?: any;
|
|
14
|
-
hideDownloadButton?: any;
|
|
15
|
-
id?: any;
|
|
16
|
-
onPaymentSuccess?: any;
|
|
17
|
-
invoiceQuoteViewComponent?: any;
|
|
18
|
-
onInvoiceDownloadError?: any;
|
|
19
|
-
hidePaymentForm?: any;
|
|
20
|
-
onInvoiceLoaded?: any;
|
|
21
|
-
onQuoteLoaded?: any;
|
|
22
|
-
}>;
|
|
23
|
-
export declare const NoShadow: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
|
|
24
|
-
[x: string]: any;
|
|
25
|
-
}, {
|
|
26
|
-
[x: string]: any;
|
|
27
|
-
className?: any;
|
|
28
|
-
backButtonName?: any;
|
|
29
|
-
onBackButtonClick?: any;
|
|
30
|
-
shadow?: any;
|
|
31
|
-
hideDownloadButton?: any;
|
|
32
|
-
id?: any;
|
|
33
|
-
onPaymentSuccess?: any;
|
|
34
|
-
invoiceQuoteViewComponent?: any;
|
|
35
|
-
onInvoiceDownloadError?: any;
|
|
36
|
-
hidePaymentForm?: any;
|
|
37
|
-
onInvoiceLoaded?: any;
|
|
38
|
-
onQuoteLoaded?: any;
|
|
39
|
-
}>;
|
|
40
|
-
export declare const Mobile: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
|
|
41
|
-
[x: string]: any;
|
|
42
|
-
}, {
|
|
43
|
-
[x: string]: any;
|
|
44
|
-
className?: any;
|
|
45
|
-
backButtonName?: any;
|
|
46
|
-
onBackButtonClick?: any;
|
|
47
|
-
shadow?: any;
|
|
48
|
-
hideDownloadButton?: any;
|
|
49
|
-
id?: any;
|
|
50
|
-
onPaymentSuccess?: any;
|
|
51
|
-
invoiceQuoteViewComponent?: any;
|
|
52
|
-
onInvoiceDownloadError?: any;
|
|
53
|
-
hidePaymentForm?: any;
|
|
54
|
-
onInvoiceLoaded?: any;
|
|
55
|
-
onQuoteLoaded?: any;
|
|
56
|
-
}>;
|
|
57
|
-
export declare const CustomClassName: import("@storybook/core/csf").StoryAnnotations<import("@storybook/react/dist/types-5617c98e").R, {
|
|
58
|
-
[x: string]: any;
|
|
59
|
-
}, {
|
|
60
|
-
[x: string]: any;
|
|
61
|
-
className?: any;
|
|
62
|
-
backButtonName?: any;
|
|
63
|
-
onBackButtonClick?: any;
|
|
64
|
-
shadow?: any;
|
|
65
|
-
hideDownloadButton?: any;
|
|
66
|
-
id?: any;
|
|
67
|
-
onPaymentSuccess?: any;
|
|
68
|
-
invoiceQuoteViewComponent?: any;
|
|
69
|
-
onInvoiceDownloadError?: any;
|
|
70
|
-
hidePaymentForm?: any;
|
|
71
|
-
onInvoiceLoaded?: any;
|
|
72
|
-
onQuoteLoaded?: any;
|
|
73
|
-
}>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const NoShadow: Story;
|
|
8
|
+
export declare const Mobile: Story;
|
|
9
|
+
export declare const CustomClassName: Story;
|
|
74
10
|
export declare const HideDownloadButton: Story;
|
|
75
11
|
export declare const AcceptedQuote: Story;
|
|
76
12
|
export declare const AcceptedQuoteDarkMode: Story;
|
|
77
|
-
export declare const DarkMode:
|
|
78
|
-
[x: string]: any;
|
|
79
|
-
}, {
|
|
80
|
-
[x: string]: any;
|
|
81
|
-
className?: any;
|
|
82
|
-
backButtonName?: any;
|
|
83
|
-
onBackButtonClick?: any;
|
|
84
|
-
shadow?: any;
|
|
85
|
-
hideDownloadButton?: any;
|
|
86
|
-
id?: any;
|
|
87
|
-
onPaymentSuccess?: any;
|
|
88
|
-
invoiceQuoteViewComponent?: any;
|
|
89
|
-
onInvoiceDownloadError?: any;
|
|
90
|
-
hidePaymentForm?: any;
|
|
91
|
-
onInvoiceLoaded?: any;
|
|
92
|
-
onQuoteLoaded?: any;
|
|
93
|
-
}>;
|
|
13
|
+
export declare const DarkMode: Story;
|
package/package.json
CHANGED