@neowhale/storefront 0.2.58 → 0.2.60
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/landing.global.js +28 -2
- package/dist/react/index.cjs +28 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +28 -2
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/landing.global.js
CHANGED
|
@@ -567,6 +567,8 @@ var WhaleStorefront = (function (exports) {
|
|
|
567
567
|
onSubmit: handleSubmit,
|
|
568
568
|
successHeading: c.inline_form.success_heading || "you're in.",
|
|
569
569
|
successMessage: c.inline_form.success_message || "check your inbox.",
|
|
570
|
+
successCtaText: c.inline_form.success_cta_text,
|
|
571
|
+
successCtaUrl: c.inline_form.success_cta_url,
|
|
570
572
|
submitText: c.inline_form.button_text || "send my code",
|
|
571
573
|
theme,
|
|
572
574
|
onEvent,
|
|
@@ -598,12 +600,36 @@ var WhaleStorefront = (function (exports) {
|
|
|
598
600
|
] })
|
|
599
601
|
] });
|
|
600
602
|
}
|
|
601
|
-
function HeroInlineForm({ ctaText, formOpen, setFormOpen, firstName, setFirstName, email, setEmail, status, errorMsg, onSubmit, successHeading, successMessage, submitText, theme, onEvent, tracking }) {
|
|
603
|
+
function HeroInlineForm({ ctaText, formOpen, setFormOpen, firstName, setFirstName, email, setEmail, status, errorMsg, onSubmit, successHeading, successMessage, successCtaText, successCtaUrl, submitText, theme, onEvent, tracking }) {
|
|
602
604
|
const formMaxW = "min(480px, 90vw)";
|
|
603
605
|
if (status === "success") {
|
|
604
606
|
return /* @__PURE__ */ jsx("div", { style: { maxWidth: formMaxW, margin: "0 auto", padding: "1.5rem 2rem", background: `${theme.fg}06`, border: `1px solid ${theme.fg}10` }, children: [
|
|
605
607
|
/* @__PURE__ */ jsx("p", { style: { fontSize: "clamp(1rem, 3vw, 1.25rem)", fontWeight: 300, color: theme.fg, margin: "0 0 0.375rem", fontFamily: theme.fontDisplay || "inherit" }, children: successHeading }),
|
|
606
|
-
/* @__PURE__ */ jsx("p", { style: { fontSize: "0.85rem", color: `${theme.fg}70`, margin: 0, lineHeight: 1.5 }, children: successMessage })
|
|
608
|
+
/* @__PURE__ */ jsx("p", { style: { fontSize: "0.85rem", color: `${theme.fg}70`, margin: 0, lineHeight: 1.5 }, children: successMessage }),
|
|
609
|
+
successCtaUrl && /* @__PURE__ */ jsx(
|
|
610
|
+
"button",
|
|
611
|
+
{
|
|
612
|
+
onClick: () => {
|
|
613
|
+
window.location.href = successCtaUrl;
|
|
614
|
+
onEvent?.("cta_click", { label: successCtaText || "shop now", url: successCtaUrl });
|
|
615
|
+
},
|
|
616
|
+
style: {
|
|
617
|
+
marginTop: "1rem",
|
|
618
|
+
width: "100%",
|
|
619
|
+
padding: "0.875rem",
|
|
620
|
+
background: theme.fg,
|
|
621
|
+
color: theme.bg,
|
|
622
|
+
border: "none",
|
|
623
|
+
fontSize: "0.85rem",
|
|
624
|
+
fontWeight: 500,
|
|
625
|
+
cursor: "pointer",
|
|
626
|
+
letterSpacing: "0.08em",
|
|
627
|
+
textTransform: "uppercase",
|
|
628
|
+
fontFamily: "inherit"
|
|
629
|
+
},
|
|
630
|
+
children: successCtaText || "shop now"
|
|
631
|
+
}
|
|
632
|
+
)
|
|
607
633
|
] });
|
|
608
634
|
}
|
|
609
635
|
if (!formOpen) {
|
package/dist/react/index.cjs
CHANGED
|
@@ -2306,6 +2306,8 @@ function HeroSection({ section, theme, tracking, onEvent, data }) {
|
|
|
2306
2306
|
onSubmit: handleSubmit,
|
|
2307
2307
|
successHeading: c.inline_form.success_heading || "you're in.",
|
|
2308
2308
|
successMessage: c.inline_form.success_message || "check your inbox.",
|
|
2309
|
+
successCtaText: c.inline_form.success_cta_text,
|
|
2310
|
+
successCtaUrl: c.inline_form.success_cta_url,
|
|
2309
2311
|
submitText: c.inline_form.button_text || "send my code",
|
|
2310
2312
|
theme,
|
|
2311
2313
|
onEvent,
|
|
@@ -2337,12 +2339,36 @@ function HeroSection({ section, theme, tracking, onEvent, data }) {
|
|
|
2337
2339
|
] })
|
|
2338
2340
|
] });
|
|
2339
2341
|
}
|
|
2340
|
-
function HeroInlineForm({ ctaText, formOpen, setFormOpen, firstName, setFirstName, email, setEmail, status, errorMsg, onSubmit, successHeading, successMessage, submitText, theme, onEvent, tracking }) {
|
|
2342
|
+
function HeroInlineForm({ ctaText, formOpen, setFormOpen, firstName, setFirstName, email, setEmail, status, errorMsg, onSubmit, successHeading, successMessage, successCtaText, successCtaUrl, submitText, theme, onEvent, tracking }) {
|
|
2341
2343
|
const formMaxW = "min(480px, 90vw)";
|
|
2342
2344
|
if (status === "success") {
|
|
2343
2345
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { maxWidth: formMaxW, margin: "0 auto", padding: "1.5rem 2rem", background: `${theme.fg}06`, border: `1px solid ${theme.fg}10` }, children: [
|
|
2344
2346
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "clamp(1rem, 3vw, 1.25rem)", fontWeight: 300, color: theme.fg, margin: "0 0 0.375rem", fontFamily: theme.fontDisplay || "inherit" }, children: successHeading }),
|
|
2345
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.85rem", color: `${theme.fg}70`, margin: 0, lineHeight: 1.5 }, children: successMessage })
|
|
2347
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "0.85rem", color: `${theme.fg}70`, margin: 0, lineHeight: 1.5 }, children: successMessage }),
|
|
2348
|
+
successCtaUrl && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2349
|
+
"button",
|
|
2350
|
+
{
|
|
2351
|
+
onClick: () => {
|
|
2352
|
+
window.location.href = successCtaUrl;
|
|
2353
|
+
onEvent?.("cta_click", { label: successCtaText || "shop now", url: successCtaUrl });
|
|
2354
|
+
},
|
|
2355
|
+
style: {
|
|
2356
|
+
marginTop: "1rem",
|
|
2357
|
+
width: "100%",
|
|
2358
|
+
padding: "0.875rem",
|
|
2359
|
+
background: theme.fg,
|
|
2360
|
+
color: theme.bg,
|
|
2361
|
+
border: "none",
|
|
2362
|
+
fontSize: "0.85rem",
|
|
2363
|
+
fontWeight: 500,
|
|
2364
|
+
cursor: "pointer",
|
|
2365
|
+
letterSpacing: "0.08em",
|
|
2366
|
+
textTransform: "uppercase",
|
|
2367
|
+
fontFamily: "inherit"
|
|
2368
|
+
},
|
|
2369
|
+
children: successCtaText || "shop now"
|
|
2370
|
+
}
|
|
2371
|
+
)
|
|
2346
2372
|
] });
|
|
2347
2373
|
}
|
|
2348
2374
|
if (!formOpen) {
|