@zenpatient-org/healthspan-marketing-ui 0.1.164 → 0.1.166
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,80 +1,98 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { TextButton as
|
|
5
|
-
import { ImageGallery as
|
|
6
|
-
import { Typography as
|
|
7
|
-
import { SmartCallout as
|
|
8
|
-
import { RatingStars as
|
|
9
|
-
import { Features as
|
|
10
|
-
import { PlanCard as
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsx as i, jsxs as a, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { cn as F } from "../../utils/cn/cn.es.js";
|
|
3
|
+
import { Button as v } from "../../components/Button/Button.es.js";
|
|
4
|
+
import { TextButton as g } from "../../components/TextButton/TextButton.es.js";
|
|
5
|
+
import { ImageGallery as R } from "../../components/ImageGallery/ImageGallery.es.js";
|
|
6
|
+
import { Typography as t } from "../../components/Typography/Typography.es.js";
|
|
7
|
+
import { SmartCallout as T } from "../../components/SmartCallout/SmartCallout.es.js";
|
|
8
|
+
import { RatingStars as j } from "../../components/RatingStars/RatingStars.es.js";
|
|
9
|
+
import { Features as D } from "./components/Features/Features.es.js";
|
|
10
|
+
import { PlanCard as E } from "./components/PlanCard/PlanCard.es.js";
|
|
11
|
+
import { EAnalyticsEventType as H } from "../../types/analytics/analytics.es.js";
|
|
12
|
+
import r from "./individualProductCard.module.css.es.js";
|
|
13
|
+
const W = ({
|
|
14
|
+
name: y,
|
|
15
|
+
description: h,
|
|
16
|
+
features: u,
|
|
17
|
+
images: N,
|
|
18
|
+
label: b,
|
|
19
|
+
rating: o,
|
|
20
|
+
plans: s,
|
|
21
|
+
button: c,
|
|
22
|
+
textButton: l,
|
|
23
|
+
selectedPlanId: w,
|
|
24
|
+
onSelectPlan: d,
|
|
25
|
+
trackingEvent: f,
|
|
26
|
+
trackingLocation: S
|
|
24
27
|
}) => {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const n = s && s.length > 0 && d, C = (e) => {
|
|
29
|
+
var p;
|
|
30
|
+
if (d == null || d(e), f) {
|
|
31
|
+
const m = s == null ? void 0 : s.find((A) => A.id === e), V = {
|
|
32
|
+
event: f,
|
|
33
|
+
location: S || "",
|
|
34
|
+
type: H.interaction,
|
|
35
|
+
payload: {
|
|
36
|
+
planId: e,
|
|
37
|
+
planPrice: m == null ? void 0 : m.price,
|
|
38
|
+
planDuration: m == null ? void 0 : m.duration
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
(p = window.eventBus) == null || p.emit("analytics", V);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return /* @__PURE__ */ i("section", { className: r.root, children: /* @__PURE__ */ a("div", { className: F(r.container, !n && r.noPlans), children: [
|
|
45
|
+
/* @__PURE__ */ a("div", { className: r.info, children: [
|
|
46
|
+
/* @__PURE__ */ a("div", { className: r.infoHeader, children: [
|
|
47
|
+
/* @__PURE__ */ i(t, { as: "h3", defaultVariant: "displayXs", mobileVariant: "headingLg", weight: "regular", children: y }),
|
|
48
|
+
!!h && /* @__PURE__ */ i(
|
|
49
|
+
t,
|
|
32
50
|
{
|
|
33
51
|
as: "p",
|
|
34
52
|
defaultVariant: "bodySm",
|
|
35
|
-
className:
|
|
53
|
+
className: r.infoDescription,
|
|
36
54
|
weight: "regular",
|
|
37
|
-
children:
|
|
55
|
+
children: h
|
|
38
56
|
}
|
|
39
57
|
),
|
|
40
|
-
|
|
41
|
-
!!
|
|
42
|
-
!!
|
|
43
|
-
|
|
58
|
+
o && /* @__PURE__ */ a("div", { className: r.ratingContainer, children: [
|
|
59
|
+
!!o.stars && /* @__PURE__ */ i(j, { rating: o.stars, size: "sm" }),
|
|
60
|
+
!!o.totalReviews && /* @__PURE__ */ a(t, { as: "p", defaultVariant: "labelSm", emphasis: !0, children: [
|
|
61
|
+
o.totalReviews,
|
|
44
62
|
" reviews"
|
|
45
63
|
] })
|
|
46
64
|
] })
|
|
47
65
|
] }),
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
!
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
66
|
+
/* @__PURE__ */ i(D, { features: u }),
|
|
67
|
+
/* @__PURE__ */ a("div", { className: r.actions, children: [
|
|
68
|
+
/* @__PURE__ */ i(T, { label: "HSA/FSA Eligible" }),
|
|
69
|
+
!n && /* @__PURE__ */ a(z, { children: [
|
|
70
|
+
/* @__PURE__ */ i(v, { variant: "primary", size: "lg", ...c, children: c.label }),
|
|
71
|
+
l && /* @__PURE__ */ i(g, { ...l, children: l.label })
|
|
54
72
|
] })
|
|
55
73
|
] })
|
|
56
74
|
] }),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
|
|
75
|
+
/* @__PURE__ */ i(R, { className: r.gallery, images: N, label: b }),
|
|
76
|
+
n && /* @__PURE__ */ a("div", { className: r.plansSection, children: [
|
|
77
|
+
/* @__PURE__ */ a("div", { className: r.plans, children: [
|
|
78
|
+
/* @__PURE__ */ i(t, { as: "h4", defaultVariant: "labelSm", emphasis: !0, weight: "regular", children: "Subscribe & Save" }),
|
|
79
|
+
s.map((e) => /* @__PURE__ */ i(
|
|
80
|
+
E,
|
|
63
81
|
{
|
|
64
|
-
plan:
|
|
65
|
-
onSelect:
|
|
66
|
-
isActive:
|
|
82
|
+
plan: e,
|
|
83
|
+
onSelect: C,
|
|
84
|
+
isActive: w === e.id
|
|
67
85
|
},
|
|
68
|
-
|
|
86
|
+
e.id
|
|
69
87
|
))
|
|
70
88
|
] }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
|
|
89
|
+
/* @__PURE__ */ a("div", { className: r.actions, children: [
|
|
90
|
+
/* @__PURE__ */ i(v, { variant: "primary", size: "lg", ...c, children: c.label }),
|
|
91
|
+
l && /* @__PURE__ */ i(g, { ...l, children: l.label })
|
|
74
92
|
] })
|
|
75
93
|
] })
|
|
76
94
|
] }) });
|
|
77
95
|
};
|
|
78
96
|
export {
|
|
79
|
-
|
|
97
|
+
W as IndividualProductCard
|
|
80
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../../components/Typography/Typography.cjs.js"),n=require("./components/HighlightedArticle/HighlightedArticle.cjs.js"),u=require("./components/FeaturedArticle/FeaturedArticle.cjs.js"),r=require("./researchFeatured.module.css.cjs.js"),o=({highlightedArticle:t,articles:a,trackingEvent:i,trackingLocation:s})=>e.jsx("div",{className:r.default.root,children:e.jsxs("div",{className:r.default.container,children:[e.jsx("div",{className:r.default.divider}),e.jsx(n.HighlightedArticle,{...t}),a.length>0&&e.jsxs("div",{className:r.default.featuredArticles,children:[e.jsx(c.Typography,{defaultVariant:"headingLg",mobileVariant:"headingSm",children:"Featured"}),e.jsx("div",{className:r.default.articlesContainer,children:a.map((d,l)=>e.jsx(u.FeaturedArticle,{...d,trackingEvent:i,trackingLocation:s},l))})]})]})});exports.ResearchFeatured=o;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { TResearchArticleView } from '../../types/articles';
|
|
2
|
+
import { EAnalyticsEvent } from '../../types/analytics';
|
|
2
3
|
|
|
3
4
|
type TResearchFeatured = {
|
|
4
5
|
highlightedArticle: TResearchArticleView;
|
|
5
6
|
articles: Array<TResearchArticleView>;
|
|
7
|
+
trackingEvent?: EAnalyticsEvent.featuredArticleClicked;
|
|
8
|
+
trackingLocation?: string;
|
|
6
9
|
};
|
|
7
|
-
export declare const ResearchFeatured: ({ highlightedArticle, articles }: TResearchFeatured) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const ResearchFeatured: ({ highlightedArticle, articles, trackingEvent, trackingLocation, }: TResearchFeatured) => import("react/jsx-runtime").JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { HighlightedArticle as
|
|
4
|
-
import { FeaturedArticle as
|
|
2
|
+
import { Typography as s } from "../../components/Typography/Typography.es.js";
|
|
3
|
+
import { HighlightedArticle as c } from "./components/HighlightedArticle/HighlightedArticle.es.js";
|
|
4
|
+
import { FeaturedArticle as n } from "./components/FeaturedArticle/FeaturedArticle.es.js";
|
|
5
5
|
import r from "./researchFeatured.module.css.es.js";
|
|
6
|
-
const
|
|
6
|
+
const v = ({
|
|
7
|
+
highlightedArticle: t,
|
|
8
|
+
articles: i,
|
|
9
|
+
trackingEvent: d,
|
|
10
|
+
trackingLocation: l
|
|
11
|
+
}) => /* @__PURE__ */ e("div", { className: r.root, children: /* @__PURE__ */ a("div", { className: r.container, children: [
|
|
7
12
|
/* @__PURE__ */ e("div", { className: r.divider }),
|
|
8
|
-
/* @__PURE__ */ e(
|
|
13
|
+
/* @__PURE__ */ e(c, { ...t }),
|
|
9
14
|
i.length > 0 && /* @__PURE__ */ a("div", { className: r.featuredArticles, children: [
|
|
10
|
-
/* @__PURE__ */ e(
|
|
11
|
-
/* @__PURE__ */ e("div", { className: r.articlesContainer, children: i.map((
|
|
15
|
+
/* @__PURE__ */ e(s, { defaultVariant: "headingLg", mobileVariant: "headingSm", children: "Featured" }),
|
|
16
|
+
/* @__PURE__ */ e("div", { className: r.articlesContainer, children: i.map((m, o) => /* @__PURE__ */ e(
|
|
17
|
+
n,
|
|
18
|
+
{
|
|
19
|
+
...m,
|
|
20
|
+
trackingEvent: d,
|
|
21
|
+
trackingLocation: l
|
|
22
|
+
},
|
|
23
|
+
o
|
|
24
|
+
)) })
|
|
12
25
|
] })
|
|
13
26
|
] }) });
|
|
14
27
|
export {
|
|
15
|
-
|
|
28
|
+
v as ResearchFeatured
|
|
16
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("../../../../utils/formatDate.cjs.js"),r=require("../../../../components/Typography/Typography.cjs.js"),y=require("../../../../types/analytics/analytics.cjs.js"),a=require("./featuredArticle.module.css.cjs.js"),f=({image:i,date:n,readTime:t,title:c,link:o,trackingEvent:l,trackingLocation:d})=>{const u=()=>{var s;if(l){const m={event:l,location:d||"",type:y.EAnalyticsEventType.interaction,payload:{articleTitle:document.title}};(s=window.eventBus)==null||s.emit("analytics",m)}};return e.jsxs("a",{href:o,className:a.default.root,onClick:u,children:[e.jsx("img",{src:i,alt:"article image",className:a.default.image}),e.jsxs("div",{className:a.default.content,children:[e.jsxs(r.Typography,{as:"p",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,weight:"medium",color:"color-neutral-500",className:a.default.info,children:[e.jsx("span",{children:p.formatDate(n)}),!!t&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"•"}),e.jsxs("span",{children:[t," MIN READ"]})]})]}),e.jsx(r.Typography,{defaultVariant:"bodySm",className:a.default.title,children:c})]}),e.jsx("div",{className:a.default.borderLeft}),e.jsx("div",{className:a.default.borderRight})]})};exports.FeaturedArticle=f;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TResearchArticleView } from '../../../../types/articles';
|
|
2
2
|
|
|
3
|
-
export declare const FeaturedArticle: ({ image, date, readTime, title, link }: TResearchArticleView) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const FeaturedArticle: ({ image, date, readTime, title, link, trackingEvent, trackingLocation, }: TResearchArticleView) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,37 +1,62 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { formatDate as
|
|
3
|
-
import { Typography as
|
|
1
|
+
import { jsxs as t, jsx as a, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { formatDate as u } from "../../../../utils/formatDate.es.js";
|
|
3
|
+
import { Typography as o } from "../../../../components/Typography/Typography.es.js";
|
|
4
|
+
import { EAnalyticsEventType as y } from "../../../../types/analytics/analytics.es.js";
|
|
4
5
|
import e from "./featuredArticle.module.css.es.js";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
const x = ({
|
|
7
|
+
image: n,
|
|
8
|
+
date: s,
|
|
9
|
+
readTime: i,
|
|
10
|
+
title: c,
|
|
11
|
+
link: m,
|
|
12
|
+
trackingEvent: l,
|
|
13
|
+
trackingLocation: d
|
|
14
|
+
}) => {
|
|
15
|
+
const p = () => {
|
|
16
|
+
var r;
|
|
17
|
+
if (l) {
|
|
18
|
+
const h = {
|
|
19
|
+
event: l,
|
|
20
|
+
location: d || "",
|
|
21
|
+
type: y.interaction,
|
|
22
|
+
payload: {
|
|
23
|
+
articleTitle: document.title
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
(r = window.eventBus) == null || r.emit("analytics", h);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ t("a", { href: m, className: e.root, onClick: p, children: [
|
|
30
|
+
/* @__PURE__ */ a("img", { src: n, alt: "article image", className: e.image }),
|
|
31
|
+
/* @__PURE__ */ t("div", { className: e.content, children: [
|
|
32
|
+
/* @__PURE__ */ t(
|
|
33
|
+
o,
|
|
34
|
+
{
|
|
35
|
+
as: "p",
|
|
36
|
+
defaultVariant: "labelSm",
|
|
37
|
+
mobileVariant: "labelXs",
|
|
38
|
+
emphasis: !0,
|
|
39
|
+
weight: "medium",
|
|
40
|
+
color: "color-neutral-500",
|
|
41
|
+
className: e.info,
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ a("span", { children: u(s) }),
|
|
44
|
+
!!i && /* @__PURE__ */ t(f, { children: [
|
|
45
|
+
/* @__PURE__ */ a("span", { children: "•" }),
|
|
46
|
+
/* @__PURE__ */ t("span", { children: [
|
|
47
|
+
i,
|
|
48
|
+
" MIN READ"
|
|
49
|
+
] })
|
|
25
50
|
] })
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ a(o, { defaultVariant: "bodySm", className: e.title, children: c })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ a("div", { className: e.borderLeft }),
|
|
57
|
+
/* @__PURE__ */ a("div", { className: e.borderRight })
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
35
60
|
export {
|
|
36
|
-
|
|
61
|
+
x as FeaturedArticle
|
|
37
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("../../components/Typography/Typography.cjs.js");require("../../components/Tabs/Tabs.cjs.js");const p=require("../../components/Tabs/TabsWithFade.cjs.js"),u=require("../../types/analytics/analytics.cjs.js"),a=require("./researchFilters.module.css.cjs.js"),h=({tabs:r,activeTab:n,onTabChange:c,trackingEvent:s,trackingLocation:l})=>{const o=t=>{var i;if(c(t),s){const d={event:s,location:l||"",type:u.EAnalyticsEventType.appearance,payload:{category:t}};(i=window.eventBus)==null||i.emit("analytics",d)}};return e.jsx("section",{className:a.default.root,children:e.jsxs("div",{className:a.default.container,children:[e.jsx(y.Typography,{defaultVariant:"displayMd",mobileVariant:"displayXs",children:"Research"}),e.jsx("div",{className:a.default.filters,children:e.jsx("div",{className:a.default.tabsWrapper,children:e.jsx(p.TabsWithFade,{activeTab:n,tabs:r,size:"md",activeLinePosition:"bottom",onTabClick:o})})})]})})};exports.ResearchFilters=h;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { TTab } from '../../components/Tabs';
|
|
2
|
+
import { EAnalyticsEvent } from '../../types/analytics';
|
|
2
3
|
|
|
3
4
|
export type TResearchFilters = {
|
|
4
5
|
tabs: Array<TTab<string>>;
|
|
5
6
|
activeTab: string;
|
|
6
7
|
onTabChange: (value: string) => void;
|
|
8
|
+
trackingEvent?: EAnalyticsEvent.articleCategoryClicked;
|
|
9
|
+
trackingLocation?: string;
|
|
7
10
|
};
|
|
8
|
-
export declare const ResearchFilters: ({ tabs, activeTab, onTabChange }: TResearchFilters) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const ResearchFilters: ({ tabs, activeTab, onTabChange, trackingEvent, trackingLocation, }: TResearchFilters) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Typography as
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as d } from "../../components/Typography/Typography.es.js";
|
|
3
3
|
import "../../components/Tabs/Tabs.es.js";
|
|
4
|
-
import { TabsWithFade as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
import { TabsWithFade as y } from "../../components/Tabs/TabsWithFade.es.js";
|
|
5
|
+
import { EAnalyticsEventType as h } from "../../types/analytics/analytics.es.js";
|
|
6
|
+
import i from "./researchFilters.module.css.es.js";
|
|
7
|
+
const j = ({
|
|
8
|
+
tabs: r,
|
|
9
|
+
activeTab: s,
|
|
10
|
+
onTabChange: n,
|
|
11
|
+
trackingEvent: a,
|
|
12
|
+
trackingLocation: c
|
|
13
|
+
}) => {
|
|
14
|
+
const l = (t) => {
|
|
15
|
+
var o;
|
|
16
|
+
if (n(t), a) {
|
|
17
|
+
const m = {
|
|
18
|
+
event: a,
|
|
19
|
+
location: c || "",
|
|
20
|
+
type: h.appearance,
|
|
21
|
+
payload: {
|
|
22
|
+
category: t
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
(o = window.eventBus) == null || o.emit("analytics", m);
|
|
16
26
|
}
|
|
17
|
-
|
|
18
|
-
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ e("section", { className: i.root, children: /* @__PURE__ */ p("div", { className: i.container, children: [
|
|
29
|
+
/* @__PURE__ */ e(d, { defaultVariant: "displayMd", mobileVariant: "displayXs", children: "Research" }),
|
|
30
|
+
/* @__PURE__ */ e("div", { className: i.filters, children: /* @__PURE__ */ e("div", { className: i.tabsWrapper, children: /* @__PURE__ */ e(
|
|
31
|
+
y,
|
|
32
|
+
{
|
|
33
|
+
activeTab: s,
|
|
34
|
+
tabs: r,
|
|
35
|
+
size: "md",
|
|
36
|
+
activeLinePosition: "bottom",
|
|
37
|
+
onTabClick: l
|
|
38
|
+
}
|
|
39
|
+
) }) })
|
|
40
|
+
] }) });
|
|
41
|
+
};
|
|
19
42
|
export {
|
|
20
|
-
|
|
43
|
+
j as ResearchFilters
|
|
21
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../components/Button/Button.cjs.js");require("../../components/Icon/Icon.cjs.js");const n=require("../../components/Icon/constants.cjs.js"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../components/Button/Button.cjs.js");require("../../components/Icon/Icon.cjs.js");const n=require("../../components/Icon/constants.cjs.js"),f=require("../../components/Typography/Typography.cjs.js"),p=require("./components/StudyCard/StudyCard.cjs.js"),x=require("./components/StudiesSkeleton/StudiesSkeleton.cjs.js"),s=require("./researchStudies.module.css.cjs.js"),j=6,S=({studies:d,hasMoreButton:l,title:o,backButton:r,loading:c,onClickShowMore:u,trackingEvent:h,trackingLocation:m})=>e.jsx("div",{className:s.default.root,children:e.jsxs("div",{className:s.default.container,children:[e.jsxs("div",{className:s.default.header,children:[r&&e.jsx("div",{className:s.default.backButton,children:e.jsx(t.Button,{as:"a",href:r.href,size:"xs",prefixIcon:n.EIconName.ARROW_BACK,variant:"ghost",children:r==null?void 0:r.label})}),e.jsx(f.Typography,{defaultVariant:"displayXs",mobileVariant:"headingLg",children:o})]}),e.jsxs("div",{className:s.default.studies,children:[d.map(a=>e.jsx("div",{className:s.default.studyCard,children:e.jsx(p.StudyCard,{...a,trackingEvent:h,trackingLocation:m})},`${a.title}_${a.link}`)),c&&Array.from({length:j}).map((a,i)=>e.jsx("div",{className:s.default.studyCard,children:e.jsx(x.StudiesSkeleton,{},i)},i))]}),l&&e.jsx("div",{className:s.default.buttonContainer,children:e.jsx(t.Button,{size:"lg",variant:"muted",prefixIcon:n.EIconName.PLUS,onClick:u,children:"show more"})})]})});exports.ResearchStudies=S;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TResearchArticleView } from '../../types/articles';
|
|
2
|
+
import { EAnalyticsEvent } from '../../types/analytics';
|
|
2
3
|
|
|
3
4
|
type ResearchStudiesProps = {
|
|
4
5
|
title: string;
|
|
@@ -10,6 +11,8 @@ type ResearchStudiesProps = {
|
|
|
10
11
|
hasMoreButton: boolean;
|
|
11
12
|
loading?: boolean;
|
|
12
13
|
onClickShowMore: () => void;
|
|
14
|
+
trackingEvent?: EAnalyticsEvent.featuredArticleClicked;
|
|
15
|
+
trackingLocation?: string;
|
|
13
16
|
};
|
|
14
|
-
export declare const ResearchStudies: ({ studies, hasMoreButton, title, backButton, loading, onClickShowMore, }: ResearchStudiesProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const ResearchStudies: ({ studies, hasMoreButton, title, backButton, loading, onClickShowMore, trackingEvent, trackingLocation, }: ResearchStudiesProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
export {};
|
|
@@ -3,17 +3,19 @@ import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
|
3
3
|
import { Button as d } from "../../components/Button/Button.es.js";
|
|
4
4
|
import "../../components/Icon/Icon.es.js";
|
|
5
5
|
import { EIconName as m } from "../../components/Icon/constants.es.js";
|
|
6
|
-
import { Typography as
|
|
7
|
-
import { StudyCard as
|
|
8
|
-
import { StudiesSkeleton as
|
|
6
|
+
import { Typography as N } from "../../components/Typography/Typography.es.js";
|
|
7
|
+
import { StudyCard as v } from "./components/StudyCard/StudyCard.es.js";
|
|
8
|
+
import { StudiesSkeleton as C } from "./components/StudiesSkeleton/StudiesSkeleton.es.js";
|
|
9
9
|
import e from "./researchStudies.module.css.es.js";
|
|
10
|
-
const
|
|
10
|
+
const S = 6, I = ({
|
|
11
11
|
studies: o,
|
|
12
12
|
hasMoreButton: n,
|
|
13
13
|
title: t,
|
|
14
14
|
backButton: i,
|
|
15
15
|
loading: c,
|
|
16
|
-
onClickShowMore: h
|
|
16
|
+
onClickShowMore: h,
|
|
17
|
+
trackingEvent: p,
|
|
18
|
+
trackingLocation: f
|
|
17
19
|
}) => /* @__PURE__ */ r("div", { className: e.root, children: /* @__PURE__ */ s("div", { className: e.container, children: [
|
|
18
20
|
/* @__PURE__ */ s("div", { className: e.header, children: [
|
|
19
21
|
i && /* @__PURE__ */ r("div", { className: e.backButton, children: /* @__PURE__ */ r(
|
|
@@ -27,14 +29,14 @@ const v = 6, R = ({
|
|
|
27
29
|
children: i == null ? void 0 : i.label
|
|
28
30
|
}
|
|
29
31
|
) }),
|
|
30
|
-
/* @__PURE__ */ r(
|
|
32
|
+
/* @__PURE__ */ r(N, { defaultVariant: "displayXs", mobileVariant: "headingLg", children: t })
|
|
31
33
|
] }),
|
|
32
34
|
/* @__PURE__ */ s("div", { className: e.studies, children: [
|
|
33
|
-
o.map((a) => /* @__PURE__ */ r("div", { className: e.studyCard, children: /* @__PURE__ */ r(
|
|
34
|
-
c && Array.from({ length:
|
|
35
|
+
o.map((a) => /* @__PURE__ */ r("div", { className: e.studyCard, children: /* @__PURE__ */ r(v, { ...a, trackingEvent: p, trackingLocation: f }) }, `${a.title}_${a.link}`)),
|
|
36
|
+
c && Array.from({ length: S }).map((a, l) => /* @__PURE__ */ r("div", { className: e.studyCard, children: /* @__PURE__ */ r(C, {}, l) }, l))
|
|
35
37
|
] }),
|
|
36
38
|
n && /* @__PURE__ */ r("div", { className: e.buttonContainer, children: /* @__PURE__ */ r(d, { size: "lg", variant: "muted", prefixIcon: m.PLUS, onClick: h, children: "show more" }) })
|
|
37
39
|
] }) });
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
I as ResearchStudies
|
|
40
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("../../../../utils/formatDate.cjs.js"),p=require("../../../../components/Label/Label.cjs.js"),t=require("../../../../components/Typography/Typography.cjs.js"),f=require("../../../../types/analytics/analytics.cjs.js"),a=require("./studyCard.module.css.cjs.js");function g({title:r,link:o,image:d,date:c,label:l,readTime:i,trackingEvent:s,trackingLocation:u}){const h=()=>{var n;if(s){const m={event:s,location:u||"",type:f.EAnalyticsEventType.interaction,payload:{articleTitle:r}};(n=window.eventBus)==null||n.emit("analytics",m)}};return e.jsx("a",{href:o,className:a.default.root,onClick:h,children:e.jsxs("div",{className:a.default.content,children:[e.jsx("div",{className:a.default.imagePart,style:{backgroundImage:`url(${d})`},children:l&&e.jsx(p.Label,{color:"white",size:"lg",children:l})}),e.jsxs("div",{className:a.default.dataPart,children:[e.jsxs("div",{className:a.default.info,children:[e.jsx(t.Typography,{defaultVariant:"labelSm",emphasis:!0,weight:"medium",color:"color-neutral-500",children:y.formatDate(c)}),!!i&&e.jsxs(e.Fragment,{children:[e.jsx(t.Typography,{defaultVariant:"labelSm",emphasis:!0,weight:"medium",color:"color-neutral-500",children:"•"}),e.jsxs(t.Typography,{defaultVariant:"labelSm",emphasis:!0,weight:"medium",color:"color-neutral-500",children:[i," MIN READ"]})]})]}),e.jsx(t.Typography,{className:a.default.title,defaultVariant:"headingXs",children:r})]}),e.jsx("div",{className:a.default.borderLeft,"data-line":"left"}),e.jsx("div",{className:a.default.borderRight,"data-line":"right"})]})})}exports.StudyCard=g;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TResearchArticleView } from '../../../../types/articles';
|
|
2
2
|
|
|
3
|
-
export declare function StudyCard({ title, link, image, date, label, readTime }: TResearchArticleView): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function StudyCard({ title, link, image, date, label, readTime, trackingEvent, trackingLocation, }: TResearchArticleView): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,28 +1,52 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
2
|
-
import { formatDate as
|
|
3
|
-
import { Label as
|
|
4
|
-
import { Typography as
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { formatDate as g } from "../../../../utils/formatDate.es.js";
|
|
3
|
+
import { Label as y } from "../../../../components/Label/Label.es.js";
|
|
4
|
+
import { Typography as t } from "../../../../components/Typography/Typography.es.js";
|
|
5
|
+
import { EAnalyticsEventType as v } from "../../../../types/analytics/analytics.es.js";
|
|
5
6
|
import a from "./studyCard.module.css.es.js";
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
function C({
|
|
8
|
+
title: i,
|
|
9
|
+
link: m,
|
|
10
|
+
image: d,
|
|
11
|
+
date: s,
|
|
12
|
+
label: l,
|
|
13
|
+
readTime: o,
|
|
14
|
+
trackingEvent: n,
|
|
15
|
+
trackingLocation: h
|
|
16
|
+
}) {
|
|
17
|
+
const u = () => {
|
|
18
|
+
var c;
|
|
19
|
+
if (n) {
|
|
20
|
+
const f = {
|
|
21
|
+
event: n,
|
|
22
|
+
location: h || "",
|
|
23
|
+
type: v.interaction,
|
|
24
|
+
payload: {
|
|
25
|
+
articleTitle: i
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
(c = window.eventBus) == null || c.emit("analytics", f);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ e("a", { href: m, className: a.root, onClick: u, children: /* @__PURE__ */ r("div", { className: a.content, children: [
|
|
32
|
+
/* @__PURE__ */ e("div", { className: a.imagePart, style: { backgroundImage: `url(${d})` }, children: l && /* @__PURE__ */ e(y, { color: "white", size: "lg", children: l }) }),
|
|
9
33
|
/* @__PURE__ */ r("div", { className: a.dataPart, children: [
|
|
10
34
|
/* @__PURE__ */ r("div", { className: a.info, children: [
|
|
11
|
-
/* @__PURE__ */ e(
|
|
12
|
-
!!
|
|
13
|
-
/* @__PURE__ */ e(
|
|
14
|
-
/* @__PURE__ */ r(
|
|
15
|
-
|
|
35
|
+
/* @__PURE__ */ e(t, { defaultVariant: "labelSm", emphasis: !0, weight: "medium", color: "color-neutral-500", children: g(s) }),
|
|
36
|
+
!!o && /* @__PURE__ */ r(p, { children: [
|
|
37
|
+
/* @__PURE__ */ e(t, { defaultVariant: "labelSm", emphasis: !0, weight: "medium", color: "color-neutral-500", children: "•" }),
|
|
38
|
+
/* @__PURE__ */ r(t, { defaultVariant: "labelSm", emphasis: !0, weight: "medium", color: "color-neutral-500", children: [
|
|
39
|
+
o,
|
|
16
40
|
" MIN READ"
|
|
17
41
|
] })
|
|
18
42
|
] })
|
|
19
43
|
] }),
|
|
20
|
-
/* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(t, { className: a.title, defaultVariant: "headingXs", children: i })
|
|
21
45
|
] }),
|
|
22
46
|
/* @__PURE__ */ e("div", { className: a.borderLeft, "data-line": "left" }),
|
|
23
47
|
/* @__PURE__ */ e("div", { className: a.borderRight, "data-line": "right" })
|
|
24
48
|
] }) });
|
|
25
49
|
}
|
|
26
50
|
export {
|
|
27
|
-
|
|
51
|
+
C as StudyCard
|
|
28
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../../components/Button/Button.cjs.js"),p=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),g=require("../../components/StudyGridCard/StudyGridCard.cjs.js"),m=require("../../components/Typography/Typography.cjs.js"),s=require("./studies.module.css.cjs.js");function y({title:o,description:d,articles:l,allStudiesLink:n,trackingEvent:a,trackingLocation:u}){const c=l.reduce((t,i)=>{const r=t[t.length-1];return r.length<2?r.push(i):t.push([i]),t},[[]]);return e.jsx("section",{className:s.default.root,children:e.jsxs("div",{className:s.default.container,children:[e.jsxs("div",{className:s.default.header,children:[e.jsx(p.HighlightedTitle,{title:o}),d&&e.jsx(m.Typography,{as:"p",defaultVariant:"bodyLg",className:s.default.description,children:d}),n&&e.jsx("div",{children:e.jsx(h.Button,{as:"a",variant:"muted",size:"lg",href:n,children:"view all studies"})})]}),e.jsx("div",{className:s.default.articles,children:c.map((t,i)=>e.jsx("div",{className:s.default.row,children:t.map(r=>e.jsx(g.StudyGridCard,{...r,trackingEvent:a,trackingLocation:u},r.title))},i))})]})})}exports.Studies=y;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { StudyGridCardProps } from '../../components/StudyGridCard/StudyGridCard';
|
|
3
|
+
import { EAnalyticsEvent } from '../../types/analytics';
|
|
3
4
|
|
|
4
5
|
export type StudiesProps = {
|
|
5
6
|
title: ReactNode;
|
|
6
7
|
description?: string;
|
|
7
8
|
articles: Array<StudyGridCardProps>;
|
|
8
9
|
allStudiesLink?: string;
|
|
10
|
+
trackingEvent?: EAnalyticsEvent.scienceCardClicked;
|
|
11
|
+
trackingLocation?: string;
|
|
9
12
|
};
|
|
10
|
-
export declare function Studies({ title, description, articles, allStudiesLink }: StudiesProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function Studies({ title, description, articles, allStudiesLink, trackingEvent, trackingLocation, }: StudiesProps): import("react/jsx-runtime").JSX.Element;
|