@zenpatient-org/healthspan-marketing-ui 0.2.26 → 0.2.28

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.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../Icon/constants.cjs.js"),a=require("../../src/components/HighlightCard/highlightCard.module.css"),s=require("../Typography/Typography.cjs.js"),d=require("../IconButton/IconButton.cjs.js"),m=({image:h,eyebrow:t,title:r,description:i,link:n})=>{const o=e.jsxs(e.Fragment,{children:[t&&e.jsx(s.Typography,{as:"p",defaultVariant:"labelSm",emphasis:!0,className:a.eyebrow,children:t}),e.jsxs("div",{className:a.bottomContainer,children:[e.jsxs("div",{className:a.titleContainer,children:[r&&e.jsx(s.Typography,{as:"p",defaultVariant:"headingXl",mobileVariant:"headingLg",className:a.title,children:r}),n&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:a.desktop,children:e.jsx(d.IconButton,{variant:"muted-invert",size:"lg",iconName:l.EIconName.ARROW_FORWARD})}),e.jsx("div",{className:a.mobile,children:e.jsx(d.IconButton,{variant:"muted-invert",size:"md",iconName:l.EIconName.ARROW_FORWARD})})]})]}),i&&e.jsx(s.Typography,{as:"p",defaultVariant:"bodySm",className:a.description,children:i})]})]}),c={backgroundImage:`url(${h})`,backgroundSize:"cover",backgroundPosition:"center"};return n?e.jsx("a",{href:n,className:a.highlightCard,style:c,children:o}):e.jsx("div",{className:a.highlightCard,style:c,children:o})};exports.HighlightCard=m;
@@ -0,0 +1,8 @@
1
+ export type HighlightCardProps = {
2
+ image: string;
3
+ eyebrow?: string;
4
+ title?: string;
5
+ description?: string;
6
+ link?: string;
7
+ };
8
+ export declare const HighlightCard: ({ image, eyebrow, title, description, link }: HighlightCardProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsxs as i, Fragment as d, jsx as e } from "react/jsx-runtime";
2
+ import { EIconName as m } from "../Icon/constants.es.js";
3
+ import a from "../../components/HighlightCard/highlightCard.module.css";
4
+ import { Typography as t } from "../Typography/Typography.es.js";
5
+ import { IconButton as h } from "../IconButton/IconButton.es.js";
6
+ const b = ({ image: g, eyebrow: n, title: s, description: l, link: r }) => {
7
+ const o = /* @__PURE__ */ i(d, { children: [
8
+ n && /* @__PURE__ */ e(t, { as: "p", defaultVariant: "labelSm", emphasis: !0, className: a.eyebrow, children: n }),
9
+ /* @__PURE__ */ i("div", { className: a.bottomContainer, children: [
10
+ /* @__PURE__ */ i("div", { className: a.titleContainer, children: [
11
+ s && /* @__PURE__ */ e(
12
+ t,
13
+ {
14
+ as: "p",
15
+ defaultVariant: "headingXl",
16
+ mobileVariant: "headingLg",
17
+ className: a.title,
18
+ children: s
19
+ }
20
+ ),
21
+ r && /* @__PURE__ */ i(d, { children: [
22
+ /* @__PURE__ */ e("div", { className: a.desktop, children: /* @__PURE__ */ e(h, { variant: "muted-invert", size: "lg", iconName: m.ARROW_FORWARD }) }),
23
+ /* @__PURE__ */ e("div", { className: a.mobile, children: /* @__PURE__ */ e(h, { variant: "muted-invert", size: "md", iconName: m.ARROW_FORWARD }) })
24
+ ] })
25
+ ] }),
26
+ l && /* @__PURE__ */ e(t, { as: "p", defaultVariant: "bodySm", className: a.description, children: l })
27
+ ] })
28
+ ] }), c = { backgroundImage: `url(${g})`, backgroundSize: "cover", backgroundPosition: "center" };
29
+ return r ? /* @__PURE__ */ e("a", { href: r, className: a.highlightCard, style: c, children: o }) : /* @__PURE__ */ e("div", { className: a.highlightCard, style: c, children: o });
30
+ };
31
+ export {
32
+ b as HighlightCard
33
+ };
@@ -0,0 +1,73 @@
1
+ .highlightCard {
2
+ display: flex;
3
+ flex-direction: column;
4
+ justify-content: space-between;
5
+ padding: 32px;
6
+ border-radius: var(--border-radius-lg);
7
+ height: 483px;
8
+ color: var(--color-text-primary-inverted);
9
+ text-decoration: none;
10
+ }
11
+
12
+ .eyebrow {
13
+ width: 100%;
14
+ color: var(--color-text-secondary-inverted);
15
+ align-self: flex-start;
16
+ }
17
+
18
+ .bottomContainer {
19
+ display: flex;
20
+ flex-direction: column;
21
+ align-items: flex-start;
22
+ gap: 12px;
23
+ margin-top: auto;
24
+ max-width: 325px;
25
+ }
26
+
27
+ .titleContainer {
28
+ display: flex;
29
+ width: 100%;
30
+ gap: 24px;
31
+ justify-content: space-between;
32
+ align-items: center;
33
+ min-height: 0;
34
+ }
35
+
36
+ .desktop {
37
+ display: block;
38
+ }
39
+
40
+ .mobile {
41
+ display: none;
42
+ }
43
+
44
+ @media (width <= 1200px) {
45
+ .highlightCard {
46
+ height: 477px;
47
+ padding: 24px;
48
+ }
49
+
50
+ .bottomContainer {
51
+ max-width: 321px;
52
+ gap: 8px;
53
+ }
54
+ }
55
+
56
+ @media (width <= 768px) {
57
+ .highlightCard {
58
+ height: 415.5px;
59
+ padding: 24px;
60
+ }
61
+
62
+ .bottomContainer {
63
+ max-width: 287px;
64
+ }
65
+
66
+ .desktop {
67
+ display: none;
68
+ }
69
+
70
+ .mobile {
71
+ display: block;
72
+ }
73
+ }
@@ -0,0 +1,2 @@
1
+ export { HighlightCard } from './HighlightCard';
2
+ export type { HighlightCardProps } from './HighlightCard';
@@ -36,7 +36,7 @@
36
36
  }
37
37
 
38
38
  .typeBadge[data-type='hormone'] {
39
- background-color: var(--color-lilac-300);
39
+ background-color: var(--color-bg-fill-brand-lilac);
40
40
  }
41
41
 
42
42
  .badgeIcon {
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("swiper/modules"),o=require("swiper/react"),_=require("../../utils/useSwiper/useSwiper.cjs.js"),s=require("../../src/modules/Highlight/highlight.module.css");;/* empty css */;/* empty css */const c=require("../../components/Typography/Typography.cjs.js"),d=require("../../components/HighlightCard/HighlightCard.cjs.js"),q=require("../../components/ProgressButton/ProgressButton.cjs.js"),P=[v.Navigation],k=({title:r,subtitle:t,highlightCards:n})=>{const h=_.useSwiper(),a=n.length===3,g=n.length>3,{isEnd:p,isBeginning:m,hideNav:u,handleSlideChange:w,handlePrevClick:x,handleNextClick:y,onSwiperInit:j,handleSwiperResize:S,handleReachEnd:N,handleReachBeginning:b}=h;return e.jsx("section",{className:s.root,children:e.jsxs("div",{className:s.container,children:[(r||t)&&e.jsxs("div",{className:s.textContent,children:[r&&e.jsx(c.Typography,{as:"h2",defaultVariant:"displayMd",mobileVariant:"headingLg",className:s.title,children:r}),t&&e.jsx(c.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:s.subtitle,children:t})]}),a&&e.jsx("div",{className:s.cardGrid,children:n.map((i,l)=>e.jsx("div",{className:s.cardGridItem,children:e.jsx(d.HighlightCard,{image:i.image,eyebrow:i.eyebrow,title:i.title,description:i.description,link:i.link})},`${i.title}_${l}`))}),!a&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:s.carouselArea,children:e.jsx(o.Swiper,{onSwiper:j,onResize:S,onSlideChange:w,onReachEnd:N,onReachBeginning:b,modules:P,spaceBetween:16,slidesPerView:3,breakpoints:{0:{slidesPerView:1},769:{slidesPerView:2},1201:{slidesPerView:3}},className:s.swiper,children:n.map((i,l)=>e.jsx(o.SwiperSlide,{className:s.swiperSlide,children:e.jsx(d.HighlightCard,{image:i.image,eyebrow:i.eyebrow,title:i.title,description:i.description,link:i.link})},`${i.title}_${l}`))})}),g&&!u&&e.jsx("div",{className:s.navigation,children:e.jsx(q.ProgressButton,{left:{disabled:m,onClick:x},right:{disabled:p,onClick:y}})})]})]})})};exports.Highlight=k;
@@ -0,0 +1,8 @@
1
+ import { HighlightCardProps } from '../../components/HighlightCard';
2
+
3
+ export type HighlightProps = {
4
+ title?: string;
5
+ subtitle?: string;
6
+ highlightCards: Array<HighlightCardProps>;
7
+ };
8
+ export declare const Highlight: ({ title, subtitle, highlightCards }: HighlightProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,112 @@
1
+ "use client";
2
+ import { jsx as i, jsxs as o, Fragment as V } from "react/jsx-runtime";
3
+ import { Navigation as u } from "swiper/modules";
4
+ import { Swiper as P, SwiperSlide as R } from "swiper/react";
5
+ import { useSwiper as x } from "../../utils/useSwiper/useSwiper.es.js";
6
+ import n from "../../modules/Highlight/highlight.module.css";
7
+ /* empty css */
8
+ /* empty css */
9
+ import { Typography as d } from "../../components/Typography/Typography.es.js";
10
+ import { HighlightCard as m } from "../../components/HighlightCard/HighlightCard.es.js";
11
+ import { ProgressButton as E } from "../../components/ProgressButton/ProgressButton.es.js";
12
+ const B = [u], T = ({ title: l, subtitle: r, highlightCards: s }) => {
13
+ const c = x(), t = s.length === 3, p = s.length > 3, {
14
+ isEnd: h,
15
+ isBeginning: g,
16
+ hideNav: w,
17
+ handleSlideChange: N,
18
+ handlePrevClick: S,
19
+ handleNextClick: f,
20
+ onSwiperInit: v,
21
+ handleSwiperResize: y,
22
+ handleReachEnd: b,
23
+ handleReachBeginning: k
24
+ } = c;
25
+ return /* @__PURE__ */ i("section", { className: n.root, children: /* @__PURE__ */ o("div", { className: n.container, children: [
26
+ (l || r) && /* @__PURE__ */ o("div", { className: n.textContent, children: [
27
+ l && /* @__PURE__ */ i(
28
+ d,
29
+ {
30
+ as: "h2",
31
+ defaultVariant: "displayMd",
32
+ mobileVariant: "headingLg",
33
+ className: n.title,
34
+ children: l
35
+ }
36
+ ),
37
+ r && /* @__PURE__ */ i(
38
+ d,
39
+ {
40
+ as: "p",
41
+ defaultVariant: "bodyLg",
42
+ mobileVariant: "bodyMd",
43
+ className: n.subtitle,
44
+ children: r
45
+ }
46
+ )
47
+ ] }),
48
+ t && /* @__PURE__ */ i("div", { className: n.cardGrid, children: s.map((e, a) => /* @__PURE__ */ i("div", { className: n.cardGridItem, children: /* @__PURE__ */ i(
49
+ m,
50
+ {
51
+ image: e.image,
52
+ eyebrow: e.eyebrow,
53
+ title: e.title,
54
+ description: e.description,
55
+ link: e.link
56
+ }
57
+ ) }, `${e.title}_${a}`)) }),
58
+ !t && /* @__PURE__ */ o(V, { children: [
59
+ /* @__PURE__ */ i("div", { className: n.carouselArea, children: /* @__PURE__ */ i(
60
+ P,
61
+ {
62
+ onSwiper: v,
63
+ onResize: y,
64
+ onSlideChange: N,
65
+ onReachEnd: b,
66
+ onReachBeginning: k,
67
+ modules: B,
68
+ spaceBetween: 16,
69
+ slidesPerView: 3,
70
+ breakpoints: {
71
+ 0: {
72
+ slidesPerView: 1
73
+ },
74
+ 769: {
75
+ slidesPerView: 2
76
+ },
77
+ 1201: {
78
+ slidesPerView: 3
79
+ }
80
+ },
81
+ className: n.swiper,
82
+ children: s.map((e, a) => /* @__PURE__ */ i(R, { className: n.swiperSlide, children: /* @__PURE__ */ i(
83
+ m,
84
+ {
85
+ image: e.image,
86
+ eyebrow: e.eyebrow,
87
+ title: e.title,
88
+ description: e.description,
89
+ link: e.link
90
+ }
91
+ ) }, `${e.title}_${a}`))
92
+ }
93
+ ) }),
94
+ p && !w && /* @__PURE__ */ i("div", { className: n.navigation, children: /* @__PURE__ */ i(
95
+ E,
96
+ {
97
+ left: {
98
+ disabled: g,
99
+ onClick: S
100
+ },
101
+ right: {
102
+ disabled: h,
103
+ onClick: f
104
+ }
105
+ }
106
+ ) })
107
+ ] })
108
+ ] }) });
109
+ };
110
+ export {
111
+ T as Highlight
112
+ };
@@ -0,0 +1,127 @@
1
+ .root {
2
+ width: 100%;
3
+ display: flex;
4
+ flex-direction: column;
5
+ align-items: center;
6
+ }
7
+
8
+ .container {
9
+ width: 100%;
10
+ max-width: var(--content-max-width);
11
+ display: flex;
12
+ flex-direction: column;
13
+ padding: 64px 0;
14
+ gap: 64px;
15
+ overflow: hidden;
16
+ }
17
+
18
+ .textContent {
19
+ display: flex;
20
+ flex-direction: column;
21
+ gap: 16px;
22
+ text-align: center;
23
+ align-items: center;
24
+ }
25
+
26
+ .title {
27
+ max-width: 692px;
28
+ }
29
+
30
+ .subtitle {
31
+ max-width: 648px;
32
+ }
33
+
34
+ .cardGrid {
35
+ display: flex;
36
+ justify-content: center;
37
+ gap: 16px;
38
+ width: 100%;
39
+ flex-direction: row;
40
+ }
41
+
42
+ .cardGridItem {
43
+ flex-shrink: 0;
44
+ }
45
+
46
+ .carouselArea {
47
+ width: 100%;
48
+ overflow: hidden;
49
+ display: flex;
50
+ justify-content: center;
51
+ }
52
+
53
+ .swiper {
54
+ max-width: calc((390px * 3) + (16px * 2));
55
+ /* max width of each card + gap between cards */
56
+ }
57
+
58
+ .swiperSlide {
59
+ max-width: 390px;
60
+ flex-shrink: 0;
61
+ position: relative;
62
+ }
63
+
64
+ .navigation {
65
+ display: flex;
66
+ width: 100%;
67
+ align-items: center;
68
+ justify-content: center;
69
+ margin-top: 32px;
70
+ }
71
+
72
+ .cardGridItem {
73
+ max-width: 389px;
74
+ width: 100%;
75
+ }
76
+
77
+ @media (min-width: 769px) and (max-width: 1200px) {
78
+ .cardGrid {
79
+ max-width: 100%;
80
+ }
81
+
82
+ .cardGridItem {
83
+ max-width: 335px;
84
+ width: 100%;
85
+ }
86
+
87
+ .title {
88
+ font-size: 56px;
89
+ letter-spacing: -2.24px;
90
+ }
91
+
92
+ .swiper {
93
+ max-width: calc((390px * 2) + 16px);
94
+ }
95
+
96
+ .container {
97
+ padding: 64px 17px;
98
+ gap: 32px;
99
+ }
100
+ }
101
+
102
+ @media (max-width: 979px) {
103
+ .cardGrid {
104
+ flex-direction: column;
105
+ align-items: center;
106
+ }
107
+ }
108
+
109
+ @media (max-width: 768px) {
110
+ .cardGridItem {
111
+ max-width: 335px;
112
+ width: 100%;
113
+ }
114
+ .container {
115
+ padding: 64px 20px 32px 20px;
116
+ }
117
+
118
+ .swiper {
119
+ max-width: 335px;
120
+ }
121
+ .navigation {
122
+ margin-top: 24px;
123
+ }
124
+ .subtitle {
125
+ max-width: 576px;
126
+ }
127
+ }
@@ -0,0 +1,2 @@
1
+ export { Highlight } from './Highlight';
2
+ export type { HighlightProps } from './Highlight';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.2.26",
3
+ "version": "0.2.28",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
@@ -371,6 +371,11 @@
371
371
  "import": "./dist/components/PlainFeaturesGroup/PlainFeaturesGroup.es.js",
372
372
  "require": "./dist/components/PlainFeaturesGroup/PlainFeaturesGroup.cjs.js"
373
373
  },
374
+ "./HighlightCard": {
375
+ "types": "./dist/components/HighlightCard/HighlightCard.d.ts",
376
+ "import": "./dist/components/HighlightCard/HighlightCard.es.js",
377
+ "require": "./dist/components/HighlightCard/HighlightCard.cjs.js"
378
+ },
374
379
  "./Claims": {
375
380
  "types": "./dist/modules/Claims/Claims.d.ts",
376
381
  "import": "./dist/modules/Claims/Claims.es.js",
@@ -601,6 +606,11 @@
601
606
  "import": "./dist/modules/HomepageHeroV2/HomepageHeroV2.es.js",
602
607
  "require": "./dist/modules/HomepageHeroV2/HomepageHeroV2.cjs.js"
603
608
  },
609
+ "./Highlight": {
610
+ "types": "./dist/modules/Highlight/Highlight.d.ts",
611
+ "import": "./dist/modules/Highlight/Highlight.es.js",
612
+ "require": "./dist/modules/Highlight/Highlight.cjs.js"
613
+ },
604
614
  "./Bubbles": {
605
615
  "types": "./dist/pageComponents/Bubbles/Bubbles.d.ts",
606
616
  "import": "./dist/pageComponents/Bubbles/Bubbles.es.js",