@zenpatient-org/healthspan-marketing-ui 0.2.38 → 0.2.40
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),i=require("../../utils/cn/cn.cjs.js"),u=require("./components/CtaFeaturedIn.cjs.js"),a=require("../../src/modules/FeaturedIn/featuredIn.module.css"),l=require("../../components/Typography/Typography.cjs.js"),d=require("../../components/InfiniteScroll/InfiniteScroll.cjs.js");function m({media:r}){return e.jsx("div",{className:a.mediaFeaturedInBlock,children:r.filter(t=>!!t.logo).map(({logo:t,url:s},o)=>{const n=s?"a":"div";return e.jsx(n,{href:s,target:"_blank",rel:"noopener noreferrer",className:a.mediaFeaturedInImageContainer,children:e.jsx("div",{className:a.mediaFeaturedInImage,style:{backgroundImage:`url(${t})`}})},`${s}_${o}`)})})}function p({quote:r,source:t}){return e.jsxs("div",{className:a.quoteFeaturedInBlock,children:[e.jsxs(l.Typography,{as:"p",defaultVariant:"headingSm",mobileVariant:"headingXxs",className:a.quoteFeaturedInText,children:["“",r,"”"]}),t&&e.jsxs(l.Typography,{as:"p",defaultVariant:"labelXs",emphasis:!0,className:a.quoteFeaturedInSource,children:["— ",t]})]})}function h({label:r,title:t,content:s,colorScheme:o="light"}){return e.jsxs("section",{className:i.cn(a.container,a[o]),children:[e.jsx(l.Typography,{as:"p",defaultVariant:"labelMd",mobileVariant:"labelSm",emphasis:!0,className:a.label,children:r}),t&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:i.cn(a.title,a.customTitle),children:t}),e.jsx(l.Typography,{as:"p",defaultVariant:"displayMd",className:i.cn(a.title,a.defaultTitle),children:t})]}),e.jsx(d.InfiniteScroll,{items:s,contentClassName:a.content,itemClassName:a.item,rootClassName:a.scrollRoot,renderItem:n=>e.jsxs(c.Fragment,{children:[n.type==="media"&&e.jsx(m,{media:n.media}),n.type==="quote"&&e.jsx(p,{quote:n.quote,source:n.source}),n.type==="cta"&&e.jsx(u.CtaFeaturedIn,{button_label:n.button_label})]},n.type)})]})}exports.FeaturedIn=h;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { TColorScheme } from '../../types/common';
|
|
2
|
+
|
|
1
3
|
type TMediaView = {
|
|
2
4
|
type: 'media';
|
|
3
5
|
media: Array<{
|
|
@@ -8,6 +10,7 @@ type TMediaView = {
|
|
|
8
10
|
type TFeaturedQuoteView = {
|
|
9
11
|
type: 'quote';
|
|
10
12
|
quote: string;
|
|
13
|
+
source?: string;
|
|
11
14
|
};
|
|
12
15
|
type TFeaturedButtonView = {
|
|
13
16
|
type: 'cta';
|
|
@@ -15,7 +18,9 @@ type TFeaturedButtonView = {
|
|
|
15
18
|
};
|
|
16
19
|
export type FeaturedInProps = {
|
|
17
20
|
label: string;
|
|
21
|
+
title?: string;
|
|
18
22
|
content: Array<TMediaView | TFeaturedQuoteView | TFeaturedButtonView>;
|
|
23
|
+
colorScheme?: TColorScheme;
|
|
19
24
|
};
|
|
20
|
-
export declare function FeaturedIn({ label, content }: FeaturedInProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function FeaturedIn({ label, title, content, colorScheme }: FeaturedInProps): import("react/jsx-runtime").JSX.Element;
|
|
21
26
|
export {};
|
|
@@ -1,60 +1,68 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsxs as n, jsx as t, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment as c } from "react";
|
|
3
|
+
import { cn as m } from "../../utils/cn/cn.es.js";
|
|
4
|
+
import { CtaFeaturedIn as u } from "./components/CtaFeaturedIn.es.js";
|
|
4
5
|
import e from "../../modules/FeaturedIn/featuredIn.module.css";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
a ? "a" : "div",
|
|
6
|
+
import { Typography as i } from "../../components/Typography/Typography.es.js";
|
|
7
|
+
import { InfiniteScroll as p } from "../../components/InfiniteScroll/InfiniteScroll.es.js";
|
|
8
|
+
function f({ media: l }) {
|
|
9
|
+
return /* @__PURE__ */ t("div", { className: e.mediaFeaturedInBlock, children: l.filter((a) => !!a.logo).map(({ logo: a, url: o }, s) => /* @__PURE__ */ t(
|
|
10
|
+
o ? "a" : "div",
|
|
11
11
|
{
|
|
12
|
-
href:
|
|
12
|
+
href: o,
|
|
13
13
|
target: "_blank",
|
|
14
14
|
rel: "noopener noreferrer",
|
|
15
15
|
className: e.mediaFeaturedInImageContainer,
|
|
16
|
-
children: /* @__PURE__ */ t("div", { className: e.mediaFeaturedInImage, style: { backgroundImage: `url(${
|
|
16
|
+
children: /* @__PURE__ */ t("div", { className: e.mediaFeaturedInImage, style: { backgroundImage: `url(${a})` } })
|
|
17
17
|
},
|
|
18
|
-
`${
|
|
18
|
+
`${o}_${s}`
|
|
19
19
|
)) });
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
function h({ quote: l, source: a }) {
|
|
22
|
+
return /* @__PURE__ */ n("div", { className: e.quoteFeaturedInBlock, children: [
|
|
23
|
+
/* @__PURE__ */ n(
|
|
24
|
+
i,
|
|
25
|
+
{
|
|
26
|
+
as: "p",
|
|
27
|
+
defaultVariant: "headingSm",
|
|
28
|
+
mobileVariant: "headingXxs",
|
|
29
|
+
className: e.quoteFeaturedInText,
|
|
30
|
+
children: [
|
|
31
|
+
"“",
|
|
32
|
+
l,
|
|
33
|
+
"”"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
a && /* @__PURE__ */ n(i, { as: "p", defaultVariant: "labelXs", emphasis: !0, className: e.quoteFeaturedInSource, children: [
|
|
38
|
+
"— ",
|
|
39
|
+
a
|
|
40
|
+
] })
|
|
41
|
+
] });
|
|
36
42
|
}
|
|
37
|
-
function
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */ t("p",
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
43
|
+
function V({ label: l, title: a, content: o, colorScheme: s = "light" }) {
|
|
44
|
+
return /* @__PURE__ */ n("section", { className: m(e.container, e[s]), children: [
|
|
45
|
+
/* @__PURE__ */ t(i, { as: "p", defaultVariant: "labelMd", mobileVariant: "labelSm", emphasis: !0, className: e.label, children: l }),
|
|
46
|
+
a && /* @__PURE__ */ n(d, { children: [
|
|
47
|
+
/* @__PURE__ */ t("p", { className: m(e.title, e.customTitle), children: a }),
|
|
48
|
+
/* @__PURE__ */ t(i, { as: "p", defaultVariant: "displayMd", className: m(e.title, e.defaultTitle), children: a })
|
|
49
|
+
] }),
|
|
42
50
|
/* @__PURE__ */ t(
|
|
43
|
-
|
|
51
|
+
p,
|
|
44
52
|
{
|
|
45
|
-
items:
|
|
53
|
+
items: o,
|
|
46
54
|
contentClassName: e.content,
|
|
47
55
|
itemClassName: e.item,
|
|
48
56
|
rootClassName: e.scrollRoot,
|
|
49
|
-
renderItem: (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
] },
|
|
57
|
+
renderItem: (r) => /* @__PURE__ */ n(c, { children: [
|
|
58
|
+
r.type === "media" && /* @__PURE__ */ t(f, { media: r.media }),
|
|
59
|
+
r.type === "quote" && /* @__PURE__ */ t(h, { quote: r.quote, source: r.source }),
|
|
60
|
+
r.type === "cta" && /* @__PURE__ */ t(u, { button_label: r.button_label })
|
|
61
|
+
] }, r.type)
|
|
54
62
|
}
|
|
55
63
|
)
|
|
56
64
|
] });
|
|
57
65
|
}
|
|
58
66
|
export {
|
|
59
|
-
|
|
67
|
+
V as FeaturedIn
|
|
60
68
|
};
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
+
gap: var(--spacing-24, 24px);
|
|
5
6
|
padding: var(--spacing-120) 0;
|
|
6
7
|
position: relative;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
.
|
|
10
|
-
|
|
10
|
+
.container.dark {
|
|
11
|
+
background-color: var(--color-bg-fill-alpha-black-5);
|
|
12
|
+
color: var(--color-text-primary-inverted);
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
+
.label {
|
|
16
|
+
text-align: center;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.label + .scrollRoot {
|
|
@@ -25,15 +27,21 @@
|
|
|
25
27
|
border-right: var(--border-width-sm) solid var(--color-bg-fill-alpha-black-10);
|
|
26
28
|
}
|
|
27
29
|
|
|
30
|
+
.container.dark .item {
|
|
31
|
+
border-color: var(--color-bg-fill-alpha-white-20);
|
|
32
|
+
}
|
|
33
|
+
|
|
28
34
|
.title {
|
|
29
|
-
position: absolute;
|
|
30
35
|
color: var(--color-text-primary);
|
|
31
36
|
text-align: center;
|
|
32
37
|
opacity: 0.2;
|
|
33
|
-
margin-top: 48px;
|
|
34
38
|
width: 100%;
|
|
35
39
|
}
|
|
36
40
|
|
|
41
|
+
.container.dark .title {
|
|
42
|
+
color: var(--color-text-primary-inverted);
|
|
43
|
+
}
|
|
44
|
+
|
|
37
45
|
.customTitle {
|
|
38
46
|
font-family: var(--font-default);
|
|
39
47
|
font-size: 144px;
|
|
@@ -55,6 +63,10 @@
|
|
|
55
63
|
border-top: var(--border-width-sm) solid var(--color-bg-fill-alpha-black-10);
|
|
56
64
|
}
|
|
57
65
|
|
|
66
|
+
.container.dark .content {
|
|
67
|
+
border-color: var(--color-bg-fill-alpha-white-20);
|
|
68
|
+
}
|
|
69
|
+
|
|
58
70
|
.mediaFeaturedInBlock {
|
|
59
71
|
display: flex;
|
|
60
72
|
align-items: center;
|
|
@@ -76,6 +88,10 @@
|
|
|
76
88
|
padding: 25px;
|
|
77
89
|
}
|
|
78
90
|
|
|
91
|
+
.container.dark .mediaFeaturedInImageContainer {
|
|
92
|
+
background: var(--background-fill-alpha-white-20, rgba(255, 255, 255, 0.20))
|
|
93
|
+
}
|
|
94
|
+
|
|
79
95
|
.mediaFeaturedInImage {
|
|
80
96
|
height: 100%;
|
|
81
97
|
width: 100%;
|
|
@@ -86,10 +102,28 @@
|
|
|
86
102
|
|
|
87
103
|
.quoteFeaturedInBlock {
|
|
88
104
|
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
106
|
+
gap: var(--spacing-24, 24px);
|
|
89
107
|
align-items: center;
|
|
90
108
|
width: 320px;
|
|
91
109
|
}
|
|
92
110
|
|
|
111
|
+
.quoteFeaturedInSource {
|
|
112
|
+
width: 100%;
|
|
113
|
+
text-align: center;
|
|
114
|
+
color: var(--color-text-secondary-disabled);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.container.dark .quoteFeaturedInSource {
|
|
118
|
+
color: var(--color-text-secondary-inverted);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.container.dark {
|
|
122
|
+
.label, .quoteFeaturedInBlock {
|
|
123
|
+
color: var(--color-text-primary-brand-solar);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
93
127
|
.quoteFeaturedInText {
|
|
94
128
|
white-space: normal;
|
|
95
129
|
text-align: center;
|