@zenpatient-org/healthspan-marketing-ui 0.1.163 → 0.1.165
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/components/StudyGridCard/StudyGridCard.cjs.js +1 -1
- package/dist/components/StudyGridCard/StudyGridCard.d.ts +5 -0
- package/dist/components/StudyGridCard/StudyGridCard.es.js +62 -42
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/Curiosity/Curiosity.cjs.js +1 -1
- package/dist/modules/Curiosity/Curiosity.d.ts +4 -1
- package/dist/modules/Curiosity/Curiosity.es.js +32 -14
- package/dist/modules/FeaturedIn/FeaturedIn.cjs.js +1 -1
- package/dist/modules/FeaturedIn/FeaturedIn.es.js +7 -8
- package/dist/modules/FeaturedIn/featuredIn.module.css.cjs.js +1 -1
- package/dist/modules/FeaturedIn/featuredIn.module.css.es.js +10 -12
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.cjs.js +1 -1
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.d.ts +1 -1
- package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.es.js +13 -9
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js +1 -1
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.d.ts +5 -1
- package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.es.js +79 -58
- package/dist/modules/HSModal/types.d.ts +4 -0
- package/dist/modules/IndividualProductCard/IndividualProductCard.cjs.js +1 -1
- package/dist/modules/IndividualProductCard/IndividualProductCard.d.ts +4 -1
- package/dist/modules/IndividualProductCard/IndividualProductCard.es.js +74 -56
- package/dist/modules/ResearchFeatured/ResearchFeatured.cjs.js +1 -1
- package/dist/modules/ResearchFeatured/ResearchFeatured.d.ts +4 -1
- package/dist/modules/ResearchFeatured/ResearchFeatured.es.js +21 -8
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/FeaturedArticle.cjs.js +1 -1
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/FeaturedArticle.d.ts +1 -1
- package/dist/modules/ResearchFeatured/components/FeaturedArticle/FeaturedArticle.es.js +58 -33
- package/dist/modules/ResearchFilters/ResearchFilters.cjs.js +1 -1
- package/dist/modules/ResearchFilters/ResearchFilters.d.ts +4 -1
- package/dist/modules/ResearchFilters/ResearchFilters.es.js +40 -17
- package/dist/modules/ResearchStudies/ResearchStudies.cjs.js +1 -1
- package/dist/modules/ResearchStudies/ResearchStudies.d.ts +4 -1
- package/dist/modules/ResearchStudies/ResearchStudies.es.js +11 -9
- package/dist/modules/ResearchStudies/components/StudyCard/StudyCard.cjs.js +1 -1
- package/dist/modules/ResearchStudies/components/StudyCard/StudyCard.d.ts +1 -1
- package/dist/modules/ResearchStudies/components/StudyCard/StudyCard.es.js +38 -14
- package/dist/modules/Studies/Studies.cjs.js +1 -1
- package/dist/modules/Studies/Studies.d.ts +4 -1
- package/dist/modules/Studies/Studies.es.js +26 -11
- package/dist/pageComponents/Footer/Footer.cjs.js +1 -1
- package/dist/pageComponents/Footer/Footer.d.ts +5 -1
- package/dist/pageComponents/Footer/Footer.es.js +46 -26
- package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.cjs.js +1 -1
- package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.d.ts +3 -1
- package/dist/pageComponents/Footer/components/NewsLetter/NewsLetter.es.js +39 -30
- package/dist/types/analytics/analytics.cjs.js +1 -0
- package/dist/types/analytics/analytics.es.js +5 -0
- package/dist/types/analytics.d.ts +81 -0
- package/dist/types/articles.d.ts +4 -0
- package/package.json +7 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("../../utils/formatDate.cjs.js");require("../Icon/Icon.cjs.js");const r=require("../Icon/constants.cjs.js"),g=require("../Label/Label.cjs.js"),d=require("../TextButton/TextButton.cjs.js"),i=require("../Typography/Typography.cjs.js"),o=require("../../utils/cn/cn.cjs.js"),b=require("../../types/analytics/analytics.cjs.js"),a=require("./studyGridCard.module.css.cjs.js");function x(t){const n=()=>{var s;if(t.trackingEvent){const l={event:t.trackingEvent,location:t.trackingLocation||"",type:b.EAnalyticsEventType.interaction,payload:{scienceCardTitle:t.title}};(s=window.eventBus)==null||s.emit("analytics",l)}};if(t.compressed===!0){const{title:s,link:l,image:c}=t;return e.jsxs("div",{className:o.cn(a.default.study,a.default.studyCompressed),children:[e.jsx("div",{className:o.cn(a.default.imagePart,a.default.imagePartCompressed),style:{backgroundImage:`url(${c})`}}),e.jsxs("div",{className:o.cn(a.default.dataPart,a.default.dataPartCompressed),children:[e.jsx(i.Typography,{className:o.cn(a.default.title,a.default.titleCompressed),defaultVariant:"headingSm",mobileVariant:"bodySm",as:"h6",children:s}),e.jsxs("div",{className:a.default.button,children:[e.jsx(d.TextButton,{hideOn:"desktop",className:a.default.mobileButton,size:"sm",as:"a",href:l,suffixIcon:r.EIconName.ARROW_FORWARD,onClick:n,children:"READ MORE"}),e.jsx(d.TextButton,{hideOn:"mobile",className:a.default.desktopButton,size:"lg",as:"a",href:l,suffixIcon:r.EIconName.ARROW_FORWARD,onClick:n,children:"READ MORE"})]})]}),e.jsx("div",{className:a.default.borderLeft}),e.jsx("div",{className:a.default.borderRight})]})}else{const{title:s,link:l,image:c,inverted:h,date:u,label:m,readTime:y}=t;return e.jsxs("div",{className:a.default.study,"data-inverted":h,children:[e.jsx("div",{className:a.default.imagePart,style:{backgroundImage:`url(${c})`},children:m&&e.jsx(g.Label,{...m})}),e.jsxs("div",{className:a.default.dataPart,children:[e.jsxs("div",{className:a.default.info,children:[e.jsx(i.Typography,{className:a.default.date,defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:f.formatDate(u)}),e.jsx(i.Typography,{className:a.default.mobileDate,defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:f.formatDate(u,{year:"2-digit"}).replaceAll(" / ","/")}),e.jsxs(e.Fragment,{children:[e.jsx(i.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",align:"center",children:"•"}),e.jsxs(i.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",children:[y," MIN READ"]})]})]}),e.jsx(i.Typography,{className:a.default.title,defaultVariant:"headingSm",mobileVariant:"bodySm",as:"h6",children:s}),e.jsxs("div",{className:a.default.button,children:[e.jsx(d.TextButton,{hideOn:"desktop",className:a.default.mobileButton,size:"sm",as:"a",href:l,suffixIcon:r.EIconName.ARROW_FORWARD,onClick:n,children:"READ MORE"}),e.jsx(d.TextButton,{hideOn:"mobile",className:a.default.desktopButton,size:"lg",as:"a",href:l,suffixIcon:r.EIconName.ARROW_FORWARD,onClick:n,children:"READ MORE"})]})]})]})}}exports.StudyGridCard=x;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { LabelProps } from '../Label';
|
|
2
|
+
import { EAnalyticsEvent } from '../../types/analytics';
|
|
2
3
|
|
|
3
4
|
export type CompressedStudyCardProps = {
|
|
4
5
|
compressed: true;
|
|
5
6
|
title: string;
|
|
6
7
|
link: string;
|
|
7
8
|
image: string;
|
|
9
|
+
trackingEvent?: EAnalyticsEvent.scienceCardClicked;
|
|
10
|
+
trackingLocation?: string;
|
|
8
11
|
};
|
|
9
12
|
export type CompleteStudyCardProps = {
|
|
10
13
|
compressed?: false;
|
|
@@ -15,6 +18,8 @@ export type CompleteStudyCardProps = {
|
|
|
15
18
|
label?: LabelProps;
|
|
16
19
|
readTime: number;
|
|
17
20
|
link: string;
|
|
21
|
+
trackingEvent?: EAnalyticsEvent.scienceCardClicked;
|
|
22
|
+
trackingLocation?: string;
|
|
18
23
|
};
|
|
19
24
|
export type StudyGridCardProps = CompressedStudyCardProps | CompleteStudyCardProps;
|
|
20
25
|
export declare function StudyGridCard(props: StudyGridCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,56 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as i, jsx as a, Fragment as g } from "react/jsx-runtime";
|
|
3
|
+
import { formatDate as f } from "../../utils/formatDate.es.js";
|
|
3
4
|
import "../Icon/Icon.es.js";
|
|
4
|
-
import { EIconName as
|
|
5
|
-
import { Label as
|
|
6
|
-
import { TextButton as
|
|
7
|
-
import { Typography as
|
|
8
|
-
import { cn as
|
|
5
|
+
import { EIconName as m } from "../Icon/constants.es.js";
|
|
6
|
+
import { Label as N } from "../Label/Label.es.js";
|
|
7
|
+
import { TextButton as o } from "../TextButton/TextButton.es.js";
|
|
8
|
+
import { Typography as n } from "../Typography/Typography.es.js";
|
|
9
|
+
import { cn as d } from "../../utils/cn/cn.es.js";
|
|
10
|
+
import { EAnalyticsEventType as v } from "../../types/analytics/analytics.es.js";
|
|
9
11
|
import e from "./studyGridCard.module.css.es.js";
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
function x(t) {
|
|
13
|
+
const s = () => {
|
|
14
|
+
var r;
|
|
15
|
+
if (t.trackingEvent) {
|
|
16
|
+
const l = {
|
|
17
|
+
event: t.trackingEvent,
|
|
18
|
+
location: t.trackingLocation || "",
|
|
19
|
+
type: v.interaction,
|
|
20
|
+
payload: {
|
|
21
|
+
scienceCardTitle: t.title
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
(r = window.eventBus) == null || r.emit("analytics", l);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
if (t.compressed === !0) {
|
|
28
|
+
const { title: r, link: l, image: c } = t;
|
|
29
|
+
return /* @__PURE__ */ i("div", { className: d(e.study, e.studyCompressed), children: [
|
|
14
30
|
/* @__PURE__ */ a(
|
|
15
31
|
"div",
|
|
16
32
|
{
|
|
17
|
-
className:
|
|
18
|
-
style: { backgroundImage: `url(${
|
|
33
|
+
className: d(e.imagePart, e.imagePartCompressed),
|
|
34
|
+
style: { backgroundImage: `url(${c})` }
|
|
19
35
|
}
|
|
20
36
|
),
|
|
21
|
-
/* @__PURE__ */ i("div", { className:
|
|
37
|
+
/* @__PURE__ */ i("div", { className: d(e.dataPart, e.dataPartCompressed), children: [
|
|
22
38
|
/* @__PURE__ */ a(
|
|
23
|
-
|
|
39
|
+
n,
|
|
24
40
|
{
|
|
25
|
-
className:
|
|
41
|
+
className: d(e.title, e.titleCompressed),
|
|
26
42
|
defaultVariant: "headingSm",
|
|
27
43
|
mobileVariant: "bodySm",
|
|
28
44
|
as: "h6",
|
|
29
|
-
children:
|
|
45
|
+
children: r
|
|
30
46
|
}
|
|
31
47
|
),
|
|
32
48
|
/* @__PURE__ */ i("div", { className: e.button, children: [
|
|
33
49
|
/* @__PURE__ */ a(
|
|
34
|
-
|
|
50
|
+
o,
|
|
35
51
|
{
|
|
36
52
|
hideOn: "desktop",
|
|
37
53
|
className: e.mobileButton,
|
|
38
54
|
size: "sm",
|
|
39
55
|
as: "a",
|
|
40
|
-
href:
|
|
41
|
-
suffixIcon:
|
|
56
|
+
href: l,
|
|
57
|
+
suffixIcon: m.ARROW_FORWARD,
|
|
58
|
+
onClick: s,
|
|
42
59
|
children: "READ MORE"
|
|
43
60
|
}
|
|
44
61
|
),
|
|
45
62
|
/* @__PURE__ */ a(
|
|
46
|
-
|
|
63
|
+
o,
|
|
47
64
|
{
|
|
48
65
|
hideOn: "mobile",
|
|
49
66
|
className: e.desktopButton,
|
|
50
67
|
size: "lg",
|
|
51
68
|
as: "a",
|
|
52
|
-
href:
|
|
53
|
-
suffixIcon:
|
|
69
|
+
href: l,
|
|
70
|
+
suffixIcon: m.ARROW_FORWARD,
|
|
71
|
+
onClick: s,
|
|
54
72
|
children: "READ MORE"
|
|
55
73
|
}
|
|
56
74
|
)
|
|
@@ -60,13 +78,13 @@ function S(d) {
|
|
|
60
78
|
/* @__PURE__ */ a("div", { className: e.borderRight })
|
|
61
79
|
] });
|
|
62
80
|
} else {
|
|
63
|
-
const { title:
|
|
64
|
-
return /* @__PURE__ */ i("div", { className: e.study, "data-inverted":
|
|
65
|
-
/* @__PURE__ */ a("div", { className: e.imagePart, style: { backgroundImage: `url(${
|
|
81
|
+
const { title: r, link: l, image: c, inverted: b, date: u, label: h, readTime: R } = t;
|
|
82
|
+
return /* @__PURE__ */ i("div", { className: e.study, "data-inverted": b, children: [
|
|
83
|
+
/* @__PURE__ */ a("div", { className: e.imagePart, style: { backgroundImage: `url(${c})` }, children: h && /* @__PURE__ */ a(N, { ...h }) }),
|
|
66
84
|
/* @__PURE__ */ i("div", { className: e.dataPart, children: [
|
|
67
85
|
/* @__PURE__ */ i("div", { className: e.info, children: [
|
|
68
86
|
/* @__PURE__ */ a(
|
|
69
|
-
|
|
87
|
+
n,
|
|
70
88
|
{
|
|
71
89
|
className: e.date,
|
|
72
90
|
defaultVariant: "labelSm",
|
|
@@ -74,11 +92,11 @@ function S(d) {
|
|
|
74
92
|
emphasis: !0,
|
|
75
93
|
weight: "medium",
|
|
76
94
|
color: "color-neutral-500",
|
|
77
|
-
children: u
|
|
95
|
+
children: f(u)
|
|
78
96
|
}
|
|
79
97
|
),
|
|
80
98
|
/* @__PURE__ */ a(
|
|
81
|
-
|
|
99
|
+
n,
|
|
82
100
|
{
|
|
83
101
|
className: e.mobileDate,
|
|
84
102
|
defaultVariant: "labelSm",
|
|
@@ -86,12 +104,12 @@ function S(d) {
|
|
|
86
104
|
emphasis: !0,
|
|
87
105
|
weight: "medium",
|
|
88
106
|
color: "color-neutral-500",
|
|
89
|
-
children: u
|
|
107
|
+
children: f(u, { year: "2-digit" }).replaceAll(" / ", "/")
|
|
90
108
|
}
|
|
91
109
|
),
|
|
92
|
-
/* @__PURE__ */ i(
|
|
110
|
+
/* @__PURE__ */ i(g, { children: [
|
|
93
111
|
/* @__PURE__ */ a(
|
|
94
|
-
|
|
112
|
+
n,
|
|
95
113
|
{
|
|
96
114
|
defaultVariant: "labelSm",
|
|
97
115
|
mobileVariant: "labelXs",
|
|
@@ -103,7 +121,7 @@ function S(d) {
|
|
|
103
121
|
}
|
|
104
122
|
),
|
|
105
123
|
/* @__PURE__ */ i(
|
|
106
|
-
|
|
124
|
+
n,
|
|
107
125
|
{
|
|
108
126
|
defaultVariant: "labelSm",
|
|
109
127
|
mobileVariant: "labelXs",
|
|
@@ -111,36 +129,38 @@ function S(d) {
|
|
|
111
129
|
weight: "medium",
|
|
112
130
|
color: "color-neutral-500",
|
|
113
131
|
children: [
|
|
114
|
-
|
|
132
|
+
R,
|
|
115
133
|
" MIN READ"
|
|
116
134
|
]
|
|
117
135
|
}
|
|
118
136
|
)
|
|
119
137
|
] })
|
|
120
138
|
] }),
|
|
121
|
-
/* @__PURE__ */ a(
|
|
139
|
+
/* @__PURE__ */ a(n, { className: e.title, defaultVariant: "headingSm", mobileVariant: "bodySm", as: "h6", children: r }),
|
|
122
140
|
/* @__PURE__ */ i("div", { className: e.button, children: [
|
|
123
141
|
/* @__PURE__ */ a(
|
|
124
|
-
|
|
142
|
+
o,
|
|
125
143
|
{
|
|
126
144
|
hideOn: "desktop",
|
|
127
145
|
className: e.mobileButton,
|
|
128
146
|
size: "sm",
|
|
129
147
|
as: "a",
|
|
130
|
-
href:
|
|
131
|
-
suffixIcon:
|
|
148
|
+
href: l,
|
|
149
|
+
suffixIcon: m.ARROW_FORWARD,
|
|
150
|
+
onClick: s,
|
|
132
151
|
children: "READ MORE"
|
|
133
152
|
}
|
|
134
153
|
),
|
|
135
154
|
/* @__PURE__ */ a(
|
|
136
|
-
|
|
155
|
+
o,
|
|
137
156
|
{
|
|
138
157
|
hideOn: "mobile",
|
|
139
158
|
className: e.desktopButton,
|
|
140
159
|
size: "lg",
|
|
141
160
|
as: "a",
|
|
142
|
-
href:
|
|
143
|
-
suffixIcon:
|
|
161
|
+
href: l,
|
|
162
|
+
suffixIcon: m.ARROW_FORWARD,
|
|
163
|
+
onClick: s,
|
|
144
164
|
children: "READ MORE"
|
|
145
165
|
}
|
|
146
166
|
)
|
|
@@ -150,5 +170,5 @@ function S(d) {
|
|
|
150
170
|
}
|
|
151
171
|
}
|
|
152
172
|
export {
|
|
153
|
-
|
|
173
|
+
x as StudyGridCard
|
|
154
174
|
};
|