@zenpatient-org/healthspan-marketing-ui 0.2.0 → 0.2.1

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.
@@ -2,6 +2,7 @@ type HowItWorksProps = {
2
2
  title: string;
3
3
  items: Array<{
4
4
  title: string;
5
+ subtitle?: string;
5
6
  description: string;
6
7
  image: string;
7
8
  }>;
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("swiper/modules"),r=require("swiper/react");;/* empty css */;/* empty css */;/* empty css */const i=require("../../../../src/modules/HowItWorks/components/Content/content.module.css"),l=require("../../../../components/Typography/Typography.cjs.js"),q=require("../../../../components/ProgressButton/ProgressButton.cjs.js"),w=[N.Navigation],C=({items:t,colorScheme:a,showBottomNav:d,swiper:o})=>{const{isEnd:c,isBeginning:h,hideNav:g,handleSlideChange:u,handlePrevClick:p,handleNextClick:m,onSwiperInit:j,handleSwiperResize:y,handleReachEnd:S,handleReachBeginning:x,handleSlideTo:v}=o;return e.jsxs("div",{className:i.root,children:[e.jsx("div",{className:i.carouselArea,"data-color-scheme":a,children:e.jsx(r.Swiper,{onSwiper:j,onResize:y,onSlideChange:u,onReachEnd:S,onReachBeginning:x,modules:w,spaceBetween:0,slidesPerView:"auto",className:i.swiper,children:t.map((n,s)=>e.jsx(r.SwiperSlide,{className:i.swiperSlide,"data-color-scheme":a,children:e.jsxs("div",{className:i.card,onClick:()=>v(s),children:[e.jsxs("div",{className:i.cardHeader,children:[e.jsx("img",{src:n.image,className:i.cardImage,alt:n.title}),e.jsx(l.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingXs",children:n.title})]}),e.jsx(l.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodySm",children:n.description})]})},`${n.title}_${s}`))})}),!g&&d&&e.jsx("div",{className:i.navigation,children:e.jsx(q.ProgressButton,{invert:a==="dark",left:{disabled:h,onClick:p},right:{disabled:c,onClick:m}})})]})};exports.Content=C;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("swiper/modules"),l=require("swiper/react");;/* empty css */;/* empty css */;/* empty css */const a=require("../../../../src/modules/HowItWorks/components/Content/content.module.css"),n=require("../../../../components/Typography/Typography.cjs.js"),v=require("../../../../components/ProgressButton/ProgressButton.cjs.js"),q=[N.Navigation],w=({items:t,colorScheme:i,showBottomNav:d,swiper:o})=>{const{isEnd:c,isBeginning:h,hideNav:u,handleSlideChange:g,handlePrevClick:p,handleNextClick:m,onSwiperInit:y,handleSwiperResize:b,handleReachEnd:j,handleReachBeginning:S,handleSlideTo:x}=o;return e.jsxs("div",{className:a.root,children:[e.jsx("div",{className:a.carouselArea,"data-color-scheme":i,children:e.jsx(l.Swiper,{onSwiper:y,onResize:b,onSlideChange:g,onReachEnd:j,onReachBeginning:S,modules:q,spaceBetween:0,slidesPerView:"auto",className:a.swiper,children:t.map((s,r)=>e.jsx(l.SwiperSlide,{className:a.swiperSlide,"data-color-scheme":i,children:e.jsxs("div",{className:a.card,onClick:()=>x(r),children:[e.jsxs("div",{className:a.cardHeader,children:[e.jsx("img",{src:s.image,className:a.cardImage,alt:s.title}),e.jsx(n.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingXs",className:a.title,children:s.title}),s.subtitle&&e.jsx(n.Typography,{as:"h4",defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,className:a.subtitle,children:s.subtitle})]}),e.jsx(n.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodySm",children:s.description})]})},`${s.title}_${r}`))})}),!u&&d&&e.jsx("div",{className:a.navigation,children:e.jsx(v.ProgressButton,{invert:i==="dark",left:{disabled:h,onClick:p},right:{disabled:c,onClick:m}})})]})};exports.Content=w;
@@ -3,6 +3,7 @@ import { BaseSwiperReturnProps } from '../../../../lib/useSwiper';
3
3
  type ContentProps = {
4
4
  items: Array<{
5
5
  title: string;
6
+ subtitle?: string;
6
7
  description: string;
7
8
  image: string;
8
9
  }>;
@@ -1,68 +1,88 @@
1
1
  "use client";
2
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
3
- import { Navigation as C } from "swiper/modules";
4
- import { Swiper as R, SwiperSlide as b } from "swiper/react";
2
+ import { jsxs as n, jsx as a } from "react/jsx-runtime";
3
+ import { Navigation as w } from "swiper/modules";
4
+ import { Swiper as C, SwiperSlide as R } from "swiper/react";
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  /* empty css */
8
- import i from "../../../../modules/HowItWorks/components/Content/content.module.css";
9
- import { Typography as d } from "../../../../components/Typography/Typography.es.js";
10
- import { ProgressButton as k } from "../../../../components/ProgressButton/ProgressButton.es.js";
11
- const y = [C], T = ({ items: s, colorScheme: n, showBottomNav: o, swiper: t }) => {
8
+ import e from "../../../../modules/HowItWorks/components/Content/content.module.css";
9
+ import { Typography as r } from "../../../../components/Typography/Typography.es.js";
10
+ import { ProgressButton as V } from "../../../../components/ProgressButton/ProgressButton.es.js";
11
+ const k = [w], T = ({ items: t, colorScheme: l, showBottomNav: d, swiper: o }) => {
12
12
  const {
13
13
  isEnd: c,
14
14
  isBeginning: h,
15
15
  hideNav: m,
16
16
  handleSlideChange: p,
17
17
  handlePrevClick: g,
18
- handleNextClick: N,
19
- onSwiperInit: S,
20
- handleSwiperResize: v,
21
- handleReachEnd: f,
22
- handleReachBeginning: w,
23
- handleSlideTo: u
24
- } = t;
25
- return /* @__PURE__ */ r("div", { className: i.root, children: [
26
- /* @__PURE__ */ e("div", { className: i.carouselArea, "data-color-scheme": n, children: /* @__PURE__ */ e(
27
- R,
18
+ handleNextClick: u,
19
+ onSwiperInit: N,
20
+ handleSwiperResize: b,
21
+ handleReachEnd: S,
22
+ handleReachBeginning: f,
23
+ handleSlideTo: v
24
+ } = o;
25
+ return /* @__PURE__ */ n("div", { className: e.root, children: [
26
+ /* @__PURE__ */ a("div", { className: e.carouselArea, "data-color-scheme": l, children: /* @__PURE__ */ a(
27
+ C,
28
28
  {
29
- onSwiper: S,
30
- onResize: v,
29
+ onSwiper: N,
30
+ onResize: b,
31
31
  onSlideChange: p,
32
- onReachEnd: f,
33
- onReachBeginning: w,
34
- modules: y,
32
+ onReachEnd: S,
33
+ onReachBeginning: f,
34
+ modules: k,
35
35
  spaceBetween: 0,
36
36
  slidesPerView: "auto",
37
- className: i.swiper,
38
- children: s.map((a, l) => /* @__PURE__ */ e(
39
- b,
37
+ className: e.swiper,
38
+ children: t.map((i, s) => /* @__PURE__ */ a(
39
+ R,
40
40
  {
41
- className: i.swiperSlide,
42
- "data-color-scheme": n,
43
- children: /* @__PURE__ */ r("div", { className: i.card, onClick: () => u(l), children: [
44
- /* @__PURE__ */ r("div", { className: i.cardHeader, children: [
45
- /* @__PURE__ */ e("img", { src: a.image, className: i.cardImage, alt: a.title }),
46
- /* @__PURE__ */ e(d, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingXs", children: a.title })
41
+ className: e.swiperSlide,
42
+ "data-color-scheme": l,
43
+ children: /* @__PURE__ */ n("div", { className: e.card, onClick: () => v(s), children: [
44
+ /* @__PURE__ */ n("div", { className: e.cardHeader, children: [
45
+ /* @__PURE__ */ a("img", { src: i.image, className: e.cardImage, alt: i.title }),
46
+ /* @__PURE__ */ a(
47
+ r,
48
+ {
49
+ as: "h3",
50
+ defaultVariant: "headingLg",
51
+ mobileVariant: "headingXs",
52
+ className: e.title,
53
+ children: i.title
54
+ }
55
+ ),
56
+ i.subtitle && /* @__PURE__ */ a(
57
+ r,
58
+ {
59
+ as: "h4",
60
+ defaultVariant: "labelSm",
61
+ mobileVariant: "labelXs",
62
+ emphasis: !0,
63
+ className: e.subtitle,
64
+ children: i.subtitle
65
+ }
66
+ )
47
67
  ] }),
48
- /* @__PURE__ */ e(d, { as: "p", defaultVariant: "bodyLg", mobileVariant: "bodySm", children: a.description })
68
+ /* @__PURE__ */ a(r, { as: "p", defaultVariant: "bodyLg", mobileVariant: "bodySm", children: i.description })
49
69
  ] })
50
70
  },
51
- `${a.title}_${l}`
71
+ `${i.title}_${s}`
52
72
  ))
53
73
  }
54
74
  ) }),
55
- !m && o && /* @__PURE__ */ e("div", { className: i.navigation, children: /* @__PURE__ */ e(
56
- k,
75
+ !m && d && /* @__PURE__ */ a("div", { className: e.navigation, children: /* @__PURE__ */ a(
76
+ V,
57
77
  {
58
- invert: n === "dark",
78
+ invert: l === "dark",
59
79
  left: {
60
80
  disabled: h,
61
81
  onClick: g
62
82
  },
63
83
  right: {
64
84
  disabled: c,
65
- onClick: N
85
+ onClick: u
66
86
  }
67
87
  }
68
88
  ) })
@@ -63,7 +63,9 @@
63
63
  }
64
64
 
65
65
  .cardHeader {
66
- display: flex;
66
+ display: grid;
67
+ grid-template-columns: 1fr 1fr;
68
+ grid-template-rows: 1fr 1fr;
67
69
  align-items: center;
68
70
  text-align: center;
69
71
  flex-wrap: nowrap;
@@ -71,6 +73,8 @@
71
73
  }
72
74
 
73
75
  .cardImage {
76
+ grid-column: 1 / 2;
77
+ grid-row: 1 / 3;
74
78
  width: 180px;
75
79
  min-width: 180px;
76
80
  height: 240px;
@@ -79,6 +83,18 @@
79
83
  object-fit: cover;
80
84
  }
81
85
 
86
+ .title {
87
+ grid-column: 2 / 3;
88
+ grid-row: 1 / 2;
89
+ align-self: end;
90
+ }
91
+
92
+ .subtitle {
93
+ grid-column: 2 / 3;
94
+ grid-row: 2 / 3;
95
+ align-self: start;
96
+ }
97
+
82
98
  .navigation {
83
99
  display: flex;
84
100
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenpatient-org/healthspan-marketing-ui",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",