@zenpatient-org/healthspan-marketing-ui 0.2.32 → 0.2.34
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/modules/Citation/Citation.cjs.js +1 -1
- package/dist/modules/Citation/Citation.d.ts +0 -1
- package/dist/modules/Citation/Citation.es.js +9 -9
- package/dist/modules/ComparisonV2/comparisonV2.module.css +4 -5
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js +1 -1
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.es.js +67 -92
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../src/modules/Citation/citation.module.css"),u=require("../../utils/cn/cn.cjs.js"),i=require("../../components/Typography/Typography.cjs.js");function l({orderPadding:e,items:t,className:a}){const o=isNaN(Number(e))?0:e;return!t||t.length===0?null:r.jsx("section",{className:u.cn(s.root,a),children:t==null?void 0:t.map((c,n)=>r.jsxs(i.Typography,{as:"p",className:s.text,defaultVariant:"bodySm",mobileVariant:"bodyXs",children:[r.jsx("sup",{children:o?o+n:n+1})," ",c.item]},n))})}exports.Citation=l;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsx as n, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import l from "../../modules/Citation/citation.module.css";
|
|
3
|
+
import { cn as m } from "../../utils/cn/cn.es.js";
|
|
4
4
|
import { Typography as e } from "../../components/Typography/Typography.es.js";
|
|
5
|
-
function y({ orderPadding:
|
|
6
|
-
const
|
|
7
|
-
return !r || r.length === 0 ? null : /* @__PURE__ */
|
|
8
|
-
/* @__PURE__ */
|
|
5
|
+
function y({ orderPadding: t, items: r, className: p }) {
|
|
6
|
+
const a = isNaN(Number(t)) ? 0 : t;
|
|
7
|
+
return !r || r.length === 0 ? null : /* @__PURE__ */ n("section", { className: m(l.root, p), children: r == null ? void 0 : r.map((s, o) => /* @__PURE__ */ c(e, { as: "p", className: l.text, defaultVariant: "bodySm", mobileVariant: "bodyXs", children: [
|
|
8
|
+
/* @__PURE__ */ n("sup", { children: a ? a + o : o + 1 }),
|
|
9
9
|
" ",
|
|
10
|
-
|
|
11
|
-
] },
|
|
10
|
+
s.item
|
|
11
|
+
] }, o)) });
|
|
12
12
|
}
|
|
13
13
|
export {
|
|
14
14
|
y as Citation
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.dot {
|
|
37
|
-
height:
|
|
38
|
-
width:
|
|
37
|
+
height: var(--spacing-16, 16px);
|
|
38
|
+
width: var(--spacing-16, 16px);
|
|
39
39
|
color: var(--color-text-primary-disabled);
|
|
40
40
|
border-radius: 50%;
|
|
41
41
|
display: inline-block;
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.alternativeContent, .featuredContent {
|
|
96
|
-
cursor: pointer;
|
|
97
96
|
width: 100%;
|
|
98
97
|
display: grid;
|
|
99
98
|
grid-template-columns: 1fr;
|
|
@@ -258,8 +257,8 @@
|
|
|
258
257
|
}
|
|
259
258
|
|
|
260
259
|
.closeIcon {
|
|
261
|
-
width:
|
|
262
|
-
height:
|
|
260
|
+
width: var(--spacing-28, 28px);
|
|
261
|
+
height: var(--spacing-28, 28px);
|
|
263
262
|
padding-inline: 8px;
|
|
264
263
|
color: inherit;
|
|
265
264
|
}
|
package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("react"),O=require("../../../../../../utils/isValidEmail.cjs.js"),I=require("../../../../../../types/analytics/analytics.cjs.js"),h=require("../../../../../../src/modules/HSModal/components/MailchimpModal/components/Newsletter/newsletter.module.css"),V=require("../../../../../../components/TextInput/TextInput.cjs.js"),f=require("../../../../../../components/Button/Button.cjs.js"),M="https://hook.us2.make.com/1pdxfhs8945s62ritw768u66p2weqoq6",R=({buttonText:g,colorScheme:l,onCloseCallback:a,cancelButtonText:v,tags:S,onClickCallback:c,placeholder:x,trackingEvent:d,trackingLocation:T})=>{const[s,m]=i.useState(""),[p,t]=i.useState(!1),[q,e]=i.useState(""),[j,y]=i.useState(!1),[E,o]=i.useState(null),w=n=>{m(n.target.value),p&&(t(!1),e("")),y(n.target.value.length>0)},P=async()=>{var n;if(!s){t(!0),e("Please enter your email address");return}if(!O.isValidEmail(s)){t(!0),e("Please enter a valid email address");return}t(!1),e(""),o("sending");try{const u=S.split(",").map(N=>({name:N,status:"active"}));(await fetch(M,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:s,tags:u})})).ok?(o("success"),m(""),t(!1),e(""),y(!1),a==null||a()):(o("error"),t(!0),e("Subscription failed. Please try again."))}catch{o("error"),t(!0),e("Subscription failed. Please try again.")}if(c==null||c(),d){const u={event:d,location:T||"",type:I.EAnalyticsEventType.interaction,payload:{email:s,component:"HSModal",element:"MailchimpCustomForm",pageTitle:document.title}};(n=window.eventBus)==null||n.emit("analytics",u)}},_=l==="light"?"primary":"primary-invert",B=l==="light"?"primary":"primary-invert";return r.jsxs("div",{className:h.interface,children:[r.jsx(V.TextInput,{placeholder:x||"Email",variant:_,value:s,handleChange:w,error:p,errorText:q,active:j}),r.jsxs("div",{className:h.buttonContainer,children:[r.jsx(f.Button,{size:"md",variant:B,onClick:P,children:E==="sending"?"submitting…":g}),r.jsx(f.Button,{size:"md",variant:"ghost",onClick:a,children:v})]})]})};exports.Newsletter=R;
|
package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.es.js
CHANGED
|
@@ -1,112 +1,87 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useState as
|
|
4
|
-
import z from "
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
placeholder: h,
|
|
20
|
-
trackingEvent: u,
|
|
21
|
-
trackingLocation: v
|
|
2
|
+
import { jsxs as h, jsx as p } from "react/jsx-runtime";
|
|
3
|
+
import { useState as s } from "react";
|
|
4
|
+
import { isValidEmail as z } from "../../../../../../utils/isValidEmail.es.js";
|
|
5
|
+
import { EAnalyticsEventType as A } from "../../../../../../types/analytics/analytics.es.js";
|
|
6
|
+
import y from "../../../../../../modules/HSModal/components/MailchimpModal/components/Newsletter/newsletter.module.css";
|
|
7
|
+
import { TextInput as H } from "../../../../../../components/TextInput/TextInput.es.js";
|
|
8
|
+
import { Button as v } from "../../../../../../components/Button/Button.es.js";
|
|
9
|
+
const I = "https://hook.us2.make.com/1pdxfhs8945s62ritw768u66p2weqoq6", _ = ({
|
|
10
|
+
buttonText: g,
|
|
11
|
+
colorScheme: u,
|
|
12
|
+
onCloseCallback: n,
|
|
13
|
+
cancelButtonText: x,
|
|
14
|
+
tags: E,
|
|
15
|
+
onClickCallback: m,
|
|
16
|
+
placeholder: S,
|
|
17
|
+
trackingEvent: d,
|
|
18
|
+
trackingLocation: T
|
|
22
19
|
}) => {
|
|
23
|
-
const [
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
var
|
|
27
|
-
if (!
|
|
28
|
-
|
|
20
|
+
const [r, c] = s(""), [l, t] = s(!1), [w, e] = s(""), [P, f] = s(!1), [N, a] = s(null), O = (i) => {
|
|
21
|
+
c(i.target.value), l && (t(!1), e("")), f(i.target.value.length > 0);
|
|
22
|
+
}, j = async () => {
|
|
23
|
+
var i;
|
|
24
|
+
if (!r) {
|
|
25
|
+
t(!0), e("Please enter your email address");
|
|
29
26
|
return;
|
|
30
27
|
}
|
|
31
|
-
if (!
|
|
32
|
-
|
|
28
|
+
if (!z(r)) {
|
|
29
|
+
t(!0), e("Please enter a valid email address");
|
|
33
30
|
return;
|
|
34
31
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
t(!1), e(""), a("sending");
|
|
33
|
+
try {
|
|
34
|
+
const o = E.split(",").map((q) => ({
|
|
35
|
+
name: q,
|
|
36
|
+
status: "active"
|
|
37
|
+
}));
|
|
38
|
+
(await fetch(I, {
|
|
39
|
+
method: "POST",
|
|
40
|
+
headers: {
|
|
41
|
+
"Content-Type": "application/json"
|
|
42
|
+
},
|
|
43
|
+
body: JSON.stringify({
|
|
44
|
+
email: r,
|
|
45
|
+
tags: o
|
|
46
|
+
})
|
|
47
|
+
})).ok ? (a("success"), c(""), t(!1), e(""), f(!1), n == null || n()) : (a("error"), t(!0), e("Subscription failed. Please try again."));
|
|
48
|
+
} catch {
|
|
49
|
+
a("error"), t(!0), e("Subscription failed. Please try again.");
|
|
50
|
+
}
|
|
51
|
+
if (m == null || m(), d) {
|
|
52
|
+
const o = {
|
|
53
|
+
event: d,
|
|
54
|
+
location: T || "",
|
|
55
|
+
type: A.interaction,
|
|
42
56
|
payload: {
|
|
43
|
-
email:
|
|
57
|
+
email: r,
|
|
44
58
|
component: "HSModal",
|
|
45
59
|
element: "MailchimpCustomForm",
|
|
46
60
|
pageTitle: document.title
|
|
47
61
|
}
|
|
48
62
|
};
|
|
49
|
-
(
|
|
63
|
+
(i = window.eventBus) == null || i.emit("analytics", o);
|
|
50
64
|
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const N = p === "light" ? "primary" : "primary-invert", P = p === "light" ? "primary" : "primary-invert";
|
|
56
|
-
return /* @__PURE__ */ x("div", { className: M.interface, children: [
|
|
57
|
-
/* @__PURE__ */ m(
|
|
58
|
-
b,
|
|
65
|
+
}, B = u === "light" ? "primary" : "primary-invert", V = u === "light" ? "primary" : "primary-invert";
|
|
66
|
+
return /* @__PURE__ */ h("div", { className: y.interface, children: [
|
|
67
|
+
/* @__PURE__ */ p(
|
|
68
|
+
H,
|
|
59
69
|
{
|
|
60
|
-
placeholder:
|
|
61
|
-
variant:
|
|
62
|
-
value:
|
|
63
|
-
handleChange:
|
|
64
|
-
error:
|
|
65
|
-
errorText:
|
|
66
|
-
active:
|
|
70
|
+
placeholder: S || "Email",
|
|
71
|
+
variant: B,
|
|
72
|
+
value: r,
|
|
73
|
+
handleChange: O,
|
|
74
|
+
error: l,
|
|
75
|
+
errorText: w,
|
|
76
|
+
active: P
|
|
67
77
|
}
|
|
68
78
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ h("div", { className: y.buttonContainer, children: [
|
|
80
|
+
/* @__PURE__ */ p(v, { size: "md", variant: V, onClick: j, children: N === "sending" ? "submitting…" : g }),
|
|
81
|
+
/* @__PURE__ */ p(v, { size: "md", variant: "ghost", onClick: n, children: x })
|
|
72
82
|
] })
|
|
73
83
|
] });
|
|
74
|
-
}
|
|
75
|
-
buttonText: e,
|
|
76
|
-
colorScheme: o,
|
|
77
|
-
onCloseCallback: c,
|
|
78
|
-
cancelButtonText: f,
|
|
79
|
-
tags: p,
|
|
80
|
-
onClickCallback: r,
|
|
81
|
-
placeholder: l,
|
|
82
|
-
trackingEvent: a,
|
|
83
|
-
trackingLocation: h
|
|
84
|
-
}) => /* @__PURE__ */ m(
|
|
85
|
-
z,
|
|
86
|
-
{
|
|
87
|
-
url: H(p),
|
|
88
|
-
render: ({
|
|
89
|
-
subscribe: u,
|
|
90
|
-
status: v,
|
|
91
|
-
message: t
|
|
92
|
-
}) => /* @__PURE__ */ m(
|
|
93
|
-
L,
|
|
94
|
-
{
|
|
95
|
-
status: v,
|
|
96
|
-
message: t,
|
|
97
|
-
subscribe: u,
|
|
98
|
-
buttonText: e,
|
|
99
|
-
colorScheme: o,
|
|
100
|
-
onCloseCallback: c,
|
|
101
|
-
onClickCallback: r,
|
|
102
|
-
cancelButtonText: f,
|
|
103
|
-
placeholder: l,
|
|
104
|
-
trackingEvent: a,
|
|
105
|
-
trackingLocation: h
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
);
|
|
84
|
+
};
|
|
110
85
|
export {
|
|
111
|
-
|
|
86
|
+
_ as Newsletter
|
|
112
87
|
};
|