@churnkey/react 0.6.2 → 0.6.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.
- package/dist/{chunk-KS2T4QBH.js → chunk-4WYZSTRI.js} +11 -5
- package/dist/chunk-4WYZSTRI.js.map +1 -0
- package/dist/{chunk-ZIH7TTIZ.js → chunk-OC5H64F4.js} +3 -3
- package/dist/{chunk-ZIH7TTIZ.js.map → chunk-OC5H64F4.js.map} +1 -1
- package/dist/{chunk-J6BBPG6T.cjs → chunk-WGS432VT.cjs} +11 -5
- package/dist/chunk-WGS432VT.cjs.map +1 -0
- package/dist/{chunk-224XOEYJ.cjs → chunk-WTFB6T53.cjs} +6 -6
- package/dist/{chunk-224XOEYJ.cjs.map → chunk-WTFB6T53.cjs.map} +1 -1
- package/dist/core.cjs +10 -10
- package/dist/core.d.cts +2 -1
- package/dist/core.d.ts +2 -1
- package/dist/core.js +1 -1
- package/dist/headless.cjs +3 -3
- package/dist/headless.js +2 -2
- package/dist/index.cjs +95 -95
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-J6BBPG6T.cjs.map +0 -1
- package/dist/chunk-KS2T4QBH.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWTFB6T53_cjs = require('./chunk-WTFB6T53.cjs');
|
|
4
4
|
var chunkWVSNF3TN_cjs = require('./chunk-WVSNF3TN.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkWGS432VT_cjs = require('./chunk-WGS432VT.cjs');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
|
|
@@ -30,13 +30,13 @@ function DefaultConfirm({
|
|
|
30
30
|
classNames
|
|
31
31
|
}) {
|
|
32
32
|
const hasLosses = Array.isArray(losses) && losses.length > 0;
|
|
33
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
34
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
35
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: description, className:
|
|
36
|
-
hasLosses && /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
37
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
38
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ck-loss-list", children: losses.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className:
|
|
39
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className:
|
|
33
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-confirm", classNames?.root), children: [
|
|
34
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: title }),
|
|
35
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: description, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
36
|
+
hasLosses && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-loss-block", classNames?.lossList), children: [
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkWGS432VT_cjs.cn("ck-loss-label", classNames?.lossLabel), children: lossesLabel ?? "You'll lose access to:" }),
|
|
38
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ck-loss-list", children: losses.map((item) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: chunkWGS432VT_cjs.cn("ck-loss-item", classNames?.lossItem), children: [
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: chunkWGS432VT_cjs.cn("ck-loss-bullet", classNames?.lossBullet), children: "\u25CF" }),
|
|
40
40
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: item })
|
|
41
41
|
] }, item)) })
|
|
42
42
|
] }),
|
|
@@ -44,13 +44,13 @@ function DefaultConfirm({
|
|
|
44
44
|
"button",
|
|
45
45
|
{
|
|
46
46
|
type: "button",
|
|
47
|
-
className:
|
|
47
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-danger", classNames?.confirmButton),
|
|
48
48
|
onClick: onConfirm,
|
|
49
49
|
disabled: isProcessing,
|
|
50
50
|
children: isProcessing ? "Processing..." : confirmLabel
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
53
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button-link", classNames?.goBackButton), onClick: onGoBack, children: goBackLabel })
|
|
54
54
|
] });
|
|
55
55
|
}
|
|
56
56
|
function DefaultFeedback({
|
|
@@ -69,13 +69,13 @@ function DefaultFeedback({
|
|
|
69
69
|
const isUnderMin = hasMin && value.length > 0 && value.length < minLength;
|
|
70
70
|
const isValid = !required || value.length >= minLength;
|
|
71
71
|
const placeholderText = placeholder ?? (hasMin ? `At least ${minLength} characters\u2026` : "Type your thoughts\u2026");
|
|
72
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
73
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
74
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: description, className:
|
|
72
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-feedback", classNames?.root), children: [
|
|
73
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: title }),
|
|
74
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: description, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
75
75
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
78
|
-
className:
|
|
78
|
+
className: chunkWGS432VT_cjs.cn(
|
|
79
79
|
"ck-feedback-field",
|
|
80
80
|
focused && "ck-feedback-field--focused",
|
|
81
81
|
isUnderMin && "ck-feedback-field--invalid"
|
|
@@ -84,7 +84,7 @@ function DefaultFeedback({
|
|
|
84
84
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
85
85
|
"textarea",
|
|
86
86
|
{
|
|
87
|
-
className:
|
|
87
|
+
className: chunkWGS432VT_cjs.cn("ck-textarea", classNames?.textarea),
|
|
88
88
|
placeholder: placeholderText,
|
|
89
89
|
value,
|
|
90
90
|
onChange: (e) => onChange(e.target.value),
|
|
@@ -96,7 +96,7 @@ function DefaultFeedback({
|
|
|
96
96
|
hasMin && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
|
-
className:
|
|
99
|
+
className: chunkWGS432VT_cjs.cn(
|
|
100
100
|
"ck-character-count",
|
|
101
101
|
isUnderMin && "ck-character-count--invalid",
|
|
102
102
|
classNames?.characterCount
|
|
@@ -115,7 +115,7 @@ function DefaultFeedback({
|
|
|
115
115
|
"button",
|
|
116
116
|
{
|
|
117
117
|
type: "button",
|
|
118
|
-
className:
|
|
118
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.submitButton),
|
|
119
119
|
onClick: onSubmit,
|
|
120
120
|
disabled: !isValid,
|
|
121
121
|
children: "Continue"
|
|
@@ -134,21 +134,21 @@ function DefaultContactOffer({
|
|
|
134
134
|
}) {
|
|
135
135
|
const headline = title ?? offer.copy.headline;
|
|
136
136
|
const body = description ?? offer.copy.body;
|
|
137
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
138
|
-
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
139
|
-
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className:
|
|
140
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
137
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-offer", classNames?.root), children: [
|
|
138
|
+
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: headline }),
|
|
139
|
+
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
140
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-offer-card", classNames?.card), children: [
|
|
141
141
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
142
142
|
"button",
|
|
143
143
|
{
|
|
144
144
|
type: "button",
|
|
145
|
-
className:
|
|
145
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.acceptButton),
|
|
146
146
|
onClick: () => onAccept(),
|
|
147
147
|
disabled: isProcessing,
|
|
148
148
|
children: isProcessing ? "Processing..." : offer.copy.cta
|
|
149
149
|
}
|
|
150
150
|
),
|
|
151
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
151
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button-link", classNames?.declineButton), onClick: onDecline, children: offer.copy.declineCta })
|
|
152
152
|
] })
|
|
153
153
|
] });
|
|
154
154
|
}
|
|
@@ -165,10 +165,10 @@ function DefaultDiscountOffer({
|
|
|
165
165
|
const headline = title ?? offer.copy.headline;
|
|
166
166
|
const body = description ?? offer.copy.body;
|
|
167
167
|
const phrase = chunkWVSNF3TN_cjs.discountPhrase(o);
|
|
168
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
169
|
-
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
170
|
-
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className:
|
|
171
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
168
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-offer", classNames?.root), children: [
|
|
169
|
+
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: headline }),
|
|
170
|
+
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
171
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-offer-card", classNames?.card), children: [
|
|
172
172
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ck-offer-details ck-offer-discount", children: [
|
|
173
173
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ck-offer-discount-eyebrow", children: "Limited-time offer" }),
|
|
174
174
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ck-offer-discount-phrase", children: phrase })
|
|
@@ -177,13 +177,13 @@ function DefaultDiscountOffer({
|
|
|
177
177
|
"button",
|
|
178
178
|
{
|
|
179
179
|
type: "button",
|
|
180
|
-
className:
|
|
180
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.acceptButton),
|
|
181
181
|
onClick: () => onAccept(),
|
|
182
182
|
disabled: isProcessing,
|
|
183
183
|
children: isProcessing ? "Processing..." : offer.copy.cta
|
|
184
184
|
}
|
|
185
185
|
),
|
|
186
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
186
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button-link", classNames?.declineButton), onClick: onDecline, children: offer.copy.declineCta })
|
|
187
187
|
] })
|
|
188
188
|
] });
|
|
189
189
|
}
|
|
@@ -204,18 +204,18 @@ function DefaultPauseOffer({
|
|
|
204
204
|
const resume = /* @__PURE__ */ new Date();
|
|
205
205
|
resume.setMonth(resume.getMonth() + months);
|
|
206
206
|
const resumeDate = chunkWVSNF3TN_cjs.formatMonthDayLong(resume);
|
|
207
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
208
|
-
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
209
|
-
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className:
|
|
210
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
207
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-offer", classNames?.root), children: [
|
|
208
|
+
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: headline }),
|
|
209
|
+
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
210
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-offer-card ck-pause-card", classNames?.card), children: [
|
|
211
211
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ck-pause-eyebrow", children: "We'll see you back on" }),
|
|
212
212
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ck-pause-date", children: resumeDate }),
|
|
213
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
213
|
+
max > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkWGS432VT_cjs.cn("ck-pause-chips", classNames?.pauseSlider), children: Array.from({ length: max }, (_, i) => i + 1).map((m) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
214
214
|
"button",
|
|
215
215
|
{
|
|
216
216
|
type: "button",
|
|
217
217
|
onClick: () => setMonths(m),
|
|
218
|
-
className:
|
|
218
|
+
className: chunkWGS432VT_cjs.cn("ck-pause-chip", m === months && "ck-pause-chip--selected"),
|
|
219
219
|
"aria-pressed": m === months,
|
|
220
220
|
children: [
|
|
221
221
|
m,
|
|
@@ -230,13 +230,13 @@ function DefaultPauseOffer({
|
|
|
230
230
|
"button",
|
|
231
231
|
{
|
|
232
232
|
type: "button",
|
|
233
|
-
className:
|
|
233
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.acceptButton),
|
|
234
234
|
onClick: () => onAccept({ months }),
|
|
235
235
|
disabled: isProcessing,
|
|
236
236
|
children: isProcessing ? "Processing..." : offer.copy.cta
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
239
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button-link", classNames?.declineButton), onClick: onDecline, children: offer.copy.declineCta })
|
|
240
240
|
] });
|
|
241
241
|
}
|
|
242
242
|
function Checkmark({ color = "currentColor", size = 14 }) {
|
|
@@ -261,10 +261,10 @@ function DefaultPlanChangeOffer({
|
|
|
261
261
|
const headline = title ?? offer.copy.headline;
|
|
262
262
|
const body = description ?? offer.copy.body;
|
|
263
263
|
const ctaLabel = isProcessing ? "Processing..." : selectedPlan?.name ? `Switch to ${selectedPlan.name}` : offer.copy.cta;
|
|
264
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
265
|
-
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
266
|
-
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className:
|
|
267
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
264
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-offer", classNames?.root), children: [
|
|
265
|
+
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: headline }),
|
|
266
|
+
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
267
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-offer-card", classNames?.card), children: [
|
|
268
268
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ck-offer-details ck-plan-grid", children: plans.map((plan) => {
|
|
269
269
|
const interval = plan.duration?.interval ?? "month";
|
|
270
270
|
const currency = plan.amount.currency ?? "USD";
|
|
@@ -276,7 +276,7 @@ function DefaultPlanChangeOffer({
|
|
|
276
276
|
type: "button",
|
|
277
277
|
onClick: () => setSelectedPlanId(plan.id),
|
|
278
278
|
disabled: isCurrent,
|
|
279
|
-
className:
|
|
279
|
+
className: chunkWGS432VT_cjs.cn(
|
|
280
280
|
"ck-plan-card",
|
|
281
281
|
isSelected && "ck-plan-card--selected",
|
|
282
282
|
isCurrent && "ck-plan-card--current"
|
|
@@ -309,13 +309,13 @@ function DefaultPlanChangeOffer({
|
|
|
309
309
|
"button",
|
|
310
310
|
{
|
|
311
311
|
type: "button",
|
|
312
|
-
className:
|
|
312
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.acceptButton),
|
|
313
313
|
onClick: () => selectedPlanId && onAccept({ planId: selectedPlanId }),
|
|
314
314
|
disabled: isProcessing || !selectedPlanId,
|
|
315
315
|
children: ctaLabel
|
|
316
316
|
}
|
|
317
317
|
),
|
|
318
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
318
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button-link", classNames?.declineButton), onClick: onDecline, children: offer.copy.declineCta })
|
|
319
319
|
] })
|
|
320
320
|
] });
|
|
321
321
|
}
|
|
@@ -335,10 +335,10 @@ function DefaultRebateOffer({
|
|
|
335
335
|
const amount = o.amountMinor ?? 0;
|
|
336
336
|
const refund = o.amountPaidMinor != null && o.netAfterRebateMinor != null ? o.amountPaidMinor - o.netAfterRebateMinor : amount;
|
|
337
337
|
const taxRefunded = refund - amount;
|
|
338
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
339
|
-
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
340
|
-
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className:
|
|
341
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
338
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-offer", classNames?.root), children: [
|
|
339
|
+
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: headline }),
|
|
340
|
+
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
341
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-offer-card", classNames?.card), children: [
|
|
342
342
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ck-offer-rebate", children: [
|
|
343
343
|
o.amountPaidMinor != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ck-offer-rebate-row", children: [
|
|
344
344
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "You paid this period" }),
|
|
@@ -367,13 +367,13 @@ function DefaultRebateOffer({
|
|
|
367
367
|
"button",
|
|
368
368
|
{
|
|
369
369
|
type: "button",
|
|
370
|
-
className:
|
|
370
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.acceptButton),
|
|
371
371
|
onClick: () => onAccept(),
|
|
372
372
|
disabled: isProcessing,
|
|
373
373
|
children: isProcessing ? "Processing..." : offer.copy.cta
|
|
374
374
|
}
|
|
375
375
|
),
|
|
376
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
376
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button-link", classNames?.declineButton), onClick: onDecline, children: offer.copy.declineCta })
|
|
377
377
|
] })
|
|
378
378
|
] });
|
|
379
379
|
}
|
|
@@ -381,15 +381,15 @@ function DefaultRedirectOffer({ title, description, offer, onDecline, classNames
|
|
|
381
381
|
const url = offer.url;
|
|
382
382
|
const headline = title ?? offer.copy.headline;
|
|
383
383
|
const body = description ?? offer.copy.body;
|
|
384
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
385
|
-
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
386
|
-
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className:
|
|
387
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
384
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-offer", classNames?.root), children: [
|
|
385
|
+
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: headline }),
|
|
386
|
+
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
387
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-offer-card", classNames?.card), children: [
|
|
388
388
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ck-offer-details", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "ck-redirect-link", children: [
|
|
389
389
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: offer.copy.cta }),
|
|
390
390
|
/* @__PURE__ */ jsxRuntime.jsx(ExternalIcon, {})
|
|
391
391
|
] }) }),
|
|
392
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
392
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button-link", classNames?.declineButton), onClick: onDecline, children: offer.copy.declineCta })
|
|
393
393
|
] })
|
|
394
394
|
] });
|
|
395
395
|
}
|
|
@@ -430,10 +430,10 @@ function DefaultTrialExtensionOffer({
|
|
|
430
430
|
const end = /* @__PURE__ */ new Date();
|
|
431
431
|
end.setDate(end.getDate() + o.days);
|
|
432
432
|
const newEnd = chunkWVSNF3TN_cjs.formatMonthDay(end);
|
|
433
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
434
|
-
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
435
|
-
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className:
|
|
436
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
433
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-offer", classNames?.root), children: [
|
|
434
|
+
headline && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: headline }),
|
|
435
|
+
body && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: body, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
436
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-offer-card", classNames?.card), children: [
|
|
437
437
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ck-offer-details ck-trial-block", children: [
|
|
438
438
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ck-trial-badge", children: [
|
|
439
439
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ck-trial-days", children: [
|
|
@@ -451,13 +451,13 @@ function DefaultTrialExtensionOffer({
|
|
|
451
451
|
"button",
|
|
452
452
|
{
|
|
453
453
|
type: "button",
|
|
454
|
-
className:
|
|
454
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.acceptButton),
|
|
455
455
|
onClick: () => onAccept(),
|
|
456
456
|
disabled: isProcessing,
|
|
457
457
|
children: isProcessing ? "Processing..." : offer.copy.cta
|
|
458
458
|
}
|
|
459
459
|
),
|
|
460
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
460
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button-link", classNames?.declineButton), onClick: onDecline, children: offer.copy.declineCta })
|
|
461
461
|
] })
|
|
462
462
|
] });
|
|
463
463
|
}
|
|
@@ -494,11 +494,11 @@ function pickOfferComponent(type, components) {
|
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
function DefaultSuccess({ title, description, onClose, classNames }) {
|
|
497
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
498
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
499
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
500
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: description, className:
|
|
501
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ck-success-actions", children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
497
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-success", classNames?.root), children: [
|
|
498
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkWGS432VT_cjs.cn("ck-success-icon", classNames?.icon), children: /* @__PURE__ */ jsxRuntime.jsx(Checkmark, { color: "currentColor", size: 26 }) }),
|
|
499
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: title }),
|
|
500
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: description, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
501
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ck-success-actions", children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.closeButton), onClick: onClose, children: "Done" }) })
|
|
502
502
|
] });
|
|
503
503
|
}
|
|
504
504
|
function DefaultReasonButton({ reason, index, isSelected, onSelect }) {
|
|
@@ -510,7 +510,7 @@ function DefaultReasonButton({ reason, index, isSelected, onSelect }) {
|
|
|
510
510
|
role: "radio",
|
|
511
511
|
"aria-checked": isSelected,
|
|
512
512
|
onClick: () => onSelect(reason.id),
|
|
513
|
-
className:
|
|
513
|
+
className: chunkWGS432VT_cjs.cn("ck-reason-button", isSelected && "ck-reason-button--selected"),
|
|
514
514
|
children: [
|
|
515
515
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "ck-reason-badge", children: isSelected ? /* @__PURE__ */ jsxRuntime.jsx(Checkmark, { color: "#fff", size: 12 }) : letter }),
|
|
516
516
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ck-reason-label", children: reason.label })
|
|
@@ -533,10 +533,10 @@ function DefaultSurvey({
|
|
|
533
533
|
const ReasonButton = components?.ReasonButton ?? DefaultReasonButton;
|
|
534
534
|
const selected = reasons.find((r) => r.id === selectedReason);
|
|
535
535
|
const showFollowup = selected?.freeform === true;
|
|
536
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
537
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className:
|
|
538
|
-
description && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: description, className:
|
|
539
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
536
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWGS432VT_cjs.cn("ck-step ck-step-survey", classNames?.root), children: [
|
|
537
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: chunkWGS432VT_cjs.cn("ck-step-title", classNames?.title), children: title }),
|
|
538
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(RichText, { html: description, className: chunkWGS432VT_cjs.cn("ck-step-description", classNames?.description) }),
|
|
539
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkWGS432VT_cjs.cn("ck-reason-list", classNames?.reasonList), role: "radiogroup", "aria-label": title, children: reasons.map((reason, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
540
540
|
ReasonButton,
|
|
541
541
|
{
|
|
542
542
|
reason,
|
|
@@ -549,7 +549,7 @@ function DefaultSurvey({
|
|
|
549
549
|
showFollowup && /* @__PURE__ */ jsxRuntime.jsx(
|
|
550
550
|
"textarea",
|
|
551
551
|
{
|
|
552
|
-
className:
|
|
552
|
+
className: chunkWGS432VT_cjs.cn("ck-reason-followup", classNames?.followupInput),
|
|
553
553
|
placeholder: "Tell us more (optional)",
|
|
554
554
|
rows: 3,
|
|
555
555
|
value: followupResponse,
|
|
@@ -561,7 +561,7 @@ function DefaultSurvey({
|
|
|
561
561
|
"button",
|
|
562
562
|
{
|
|
563
563
|
type: "button",
|
|
564
|
-
className:
|
|
564
|
+
className: chunkWGS432VT_cjs.cn("ck-button ck-button-primary", classNames?.continueButton),
|
|
565
565
|
onClick: onNext,
|
|
566
566
|
disabled: !selectedReason,
|
|
567
567
|
children: "Continue"
|
|
@@ -570,7 +570,7 @@ function DefaultSurvey({
|
|
|
570
570
|
] });
|
|
571
571
|
}
|
|
572
572
|
function DefaultBackButton({ onBack, className }) {
|
|
573
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className:
|
|
573
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-back-button", className), onClick: onBack, children: [
|
|
574
574
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
575
575
|
"path",
|
|
576
576
|
{
|
|
@@ -585,7 +585,7 @@ function DefaultBackButton({ onBack, className }) {
|
|
|
585
585
|
] });
|
|
586
586
|
}
|
|
587
587
|
function DefaultCloseButton({ onClose, className }) {
|
|
588
|
-
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className:
|
|
588
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunkWGS432VT_cjs.cn("ck-close-button", className), onClick: onClose, "aria-label": "Close", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5L5 15M5 5l10 10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }) });
|
|
589
589
|
}
|
|
590
590
|
function trapFocus(container) {
|
|
591
591
|
const focusableSelector = [
|
|
@@ -645,7 +645,7 @@ function DefaultModal({ open, onClose, children, className, overlayClassName })
|
|
|
645
645
|
"div",
|
|
646
646
|
{
|
|
647
647
|
ref: overlayRef,
|
|
648
|
-
className:
|
|
648
|
+
className: chunkWGS432VT_cjs.cn("ck-overlay", overlayClassName),
|
|
649
649
|
onClick: (e) => {
|
|
650
650
|
if (e.target === overlayRef.current) onClose();
|
|
651
651
|
},
|
|
@@ -657,7 +657,7 @@ function DefaultModal({ open, onClose, children, className, overlayClassName })
|
|
|
657
657
|
"aria-modal": "true",
|
|
658
658
|
"aria-labelledby": "ck-dialog-title",
|
|
659
659
|
tabIndex: -1,
|
|
660
|
-
className:
|
|
660
|
+
className: chunkWGS432VT_cjs.cn("ck-modal", className),
|
|
661
661
|
children
|
|
662
662
|
}
|
|
663
663
|
)
|
|
@@ -683,7 +683,7 @@ function useColorScheme(preference) {
|
|
|
683
683
|
return system;
|
|
684
684
|
}
|
|
685
685
|
function CancelFlow(props) {
|
|
686
|
-
const { machine, state, isLoading, loadError, retry } =
|
|
686
|
+
const { machine, state, isLoading, loadError, retry } = chunkWTFB6T53_cjs.useCancelFlowMachine(props);
|
|
687
687
|
if (isLoading || loadError) {
|
|
688
688
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
689
689
|
LoadStatus,
|
|
@@ -720,7 +720,7 @@ function LoadStatus({
|
|
|
720
720
|
onRetry
|
|
721
721
|
}) {
|
|
722
722
|
const scheme = useColorScheme(appearance?.colorScheme);
|
|
723
|
-
const appearanceStyle =
|
|
723
|
+
const appearanceStyle = chunkWGS432VT_cjs.appearanceToStyle(appearance);
|
|
724
724
|
const Modal = components?.Modal ?? DefaultModal;
|
|
725
725
|
const CloseButton = components?.CloseButton ?? DefaultCloseButton;
|
|
726
726
|
const handleClose = onClose ?? (() => {
|
|
@@ -773,7 +773,7 @@ function LoadStatus({
|
|
|
773
773
|
}
|
|
774
774
|
function FlowShell({ machine, state, appearance, classNames, components, customComponents }) {
|
|
775
775
|
const scheme = useColorScheme(appearance?.colorScheme);
|
|
776
|
-
const appearanceStyle =
|
|
776
|
+
const appearanceStyle = chunkWGS432VT_cjs.appearanceToStyle(appearance);
|
|
777
777
|
const Modal = components?.Modal ?? DefaultModal;
|
|
778
778
|
const CloseButton = components?.CloseButton ?? DefaultCloseButton;
|
|
779
779
|
const BackButton = components?.BackButton ?? DefaultBackButton;
|
|
@@ -800,7 +800,7 @@ function StepRenderer({
|
|
|
800
800
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
801
801
|
Survey,
|
|
802
802
|
{
|
|
803
|
-
title: config?.title ??
|
|
803
|
+
title: config?.title ?? chunkWGS432VT_cjs.defaultTitles.survey,
|
|
804
804
|
description: config?.description,
|
|
805
805
|
customer: state.customer,
|
|
806
806
|
subscriptions: state.subscriptions,
|
|
@@ -832,7 +832,7 @@ function StepRenderer({
|
|
|
832
832
|
}
|
|
833
833
|
);
|
|
834
834
|
}
|
|
835
|
-
if (!
|
|
835
|
+
if (!chunkWGS432VT_cjs.BUILT_IN_OFFER_TYPES.includes(offer.type)) {
|
|
836
836
|
return /* @__PURE__ */ jsxRuntime.jsx(UnregisteredOfferFallback, { offerType: offer.type, onSkip: machine.decline });
|
|
837
837
|
}
|
|
838
838
|
const Offer = components?.Offer ?? DefaultOffer;
|
|
@@ -859,7 +859,7 @@ function StepRenderer({
|
|
|
859
859
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
860
860
|
Feedback,
|
|
861
861
|
{
|
|
862
|
-
title: config?.title ??
|
|
862
|
+
title: config?.title ?? chunkWGS432VT_cjs.defaultTitles.feedback,
|
|
863
863
|
description: config?.description,
|
|
864
864
|
customer: state.customer,
|
|
865
865
|
subscriptions: state.subscriptions,
|
|
@@ -879,7 +879,7 @@ function StepRenderer({
|
|
|
879
879
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
880
880
|
Confirm,
|
|
881
881
|
{
|
|
882
|
-
title: config?.title ??
|
|
882
|
+
title: config?.title ?? chunkWGS432VT_cjs.defaultTitles.confirm,
|
|
883
883
|
description: config?.description,
|
|
884
884
|
customer: state.customer,
|
|
885
885
|
subscriptions: state.subscriptions,
|
|
@@ -953,7 +953,7 @@ function UnregisteredOfferFallback({ offerType, onSkip }) {
|
|
|
953
953
|
|
|
954
954
|
Object.defineProperty(exports, "useCancelFlow", {
|
|
955
955
|
enumerable: true,
|
|
956
|
-
get: function () { return
|
|
956
|
+
get: function () { return chunkWTFB6T53_cjs.useCancelFlow; }
|
|
957
957
|
});
|
|
958
958
|
Object.defineProperty(exports, "calculateDiscountedPrice", {
|
|
959
959
|
enumerable: true,
|
|
@@ -969,39 +969,39 @@ Object.defineProperty(exports, "formatPrice", {
|
|
|
969
969
|
});
|
|
970
970
|
Object.defineProperty(exports, "AnalyticsClient", {
|
|
971
971
|
enumerable: true,
|
|
972
|
-
get: function () { return
|
|
972
|
+
get: function () { return chunkWGS432VT_cjs.AnalyticsClient; }
|
|
973
973
|
});
|
|
974
974
|
Object.defineProperty(exports, "BUILT_IN_OFFER_TYPES", {
|
|
975
975
|
enumerable: true,
|
|
976
|
-
get: function () { return
|
|
976
|
+
get: function () { return chunkWGS432VT_cjs.BUILT_IN_OFFER_TYPES; }
|
|
977
977
|
});
|
|
978
978
|
Object.defineProperty(exports, "BUILT_IN_STEP_TYPES", {
|
|
979
979
|
enumerable: true,
|
|
980
|
-
get: function () { return
|
|
980
|
+
get: function () { return chunkWGS432VT_cjs.BUILT_IN_STEP_TYPES; }
|
|
981
981
|
});
|
|
982
982
|
Object.defineProperty(exports, "CancelFlowMachine", {
|
|
983
983
|
enumerable: true,
|
|
984
|
-
get: function () { return
|
|
984
|
+
get: function () { return chunkWGS432VT_cjs.CancelFlowMachine; }
|
|
985
985
|
});
|
|
986
986
|
Object.defineProperty(exports, "ChurnkeyApi", {
|
|
987
987
|
enumerable: true,
|
|
988
|
-
get: function () { return
|
|
988
|
+
get: function () { return chunkWGS432VT_cjs.ChurnkeyApi; }
|
|
989
989
|
});
|
|
990
990
|
Object.defineProperty(exports, "appearanceToStyle", {
|
|
991
991
|
enumerable: true,
|
|
992
|
-
get: function () { return
|
|
992
|
+
get: function () { return chunkWGS432VT_cjs.appearanceToStyle; }
|
|
993
993
|
});
|
|
994
994
|
Object.defineProperty(exports, "cn", {
|
|
995
995
|
enumerable: true,
|
|
996
|
-
get: function () { return
|
|
996
|
+
get: function () { return chunkWGS432VT_cjs.cn; }
|
|
997
997
|
});
|
|
998
998
|
Object.defineProperty(exports, "decodeSessionToken", {
|
|
999
999
|
enumerable: true,
|
|
1000
|
-
get: function () { return
|
|
1000
|
+
get: function () { return chunkWGS432VT_cjs.decodeSessionToken; }
|
|
1001
1001
|
});
|
|
1002
1002
|
Object.defineProperty(exports, "defaultTitles", {
|
|
1003
1003
|
enumerable: true,
|
|
1004
|
-
get: function () { return
|
|
1004
|
+
get: function () { return chunkWGS432VT_cjs.defaultTitles; }
|
|
1005
1005
|
});
|
|
1006
1006
|
exports.CancelFlow = CancelFlow;
|
|
1007
1007
|
exports.DefaultBackButton = DefaultBackButton;
|