@zenpatient-org/healthspan-marketing-ui 0.1.129 → 0.1.131

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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../utils/cn/cn.cjs.js"),N=require("../../ProgressButton/ProgressButton.cjs.js"),c=require("../../Typography/Typography.cjs.js"),v=require("../useComplexImageCarousel.cjs.js"),r=require("./complexImageCarousel.module.css.cjs.js"),b=({images:a})=>{const{containerRef:u,carouselRef:m,imageRefs:f,descriptionRef:p,descriptionItemRef:g,progressButtonContainerRef:h,visible:s,cardSizes:n,handleCustomPrevClick:C,handleCustomNextClick:x,current:y,mobileCardIndex:o,xLargeCardIndex:l}=v.useComplexImageCarousel({images:a});return e.jsx("div",{className:r.default.root,children:e.jsxs("div",{ref:u,className:r.default.container,children:[e.jsx("div",{ref:m,className:r.default.carouselArea,children:s.length>0&&s.map((j,t)=>e.jsx("div",{className:i.cn(r.default.slideContainer,r.default[`size-${n[t]}`]),ref:d=>{d&&(f.current[t]=d)},"data-flip-id":`slide-${(y+t)%a.length}`,"data-size":n[t],children:e.jsx("img",{src:j.image,alt:`Slide ${t+1}`,className:r.default.image})},t+1))}),e.jsx("div",{ref:p,className:r.default.description,children:e.jsxs("div",{ref:g,className:i.cn("description-item",r.default.descriptionItem),children:[e.jsx(c.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingXxs",children:typeof window<"u"&&window.innerWidth<=768?s[o].title:s[l].title}),e.jsx(c.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:r.default.text,children:typeof window<"u"&&window.innerWidth<=768?s[o].description:s[l].description})]})}),e.jsx("div",{ref:h,className:r.default.progressButtonContainer,children:e.jsx(N.ProgressButton,{left:{onClick:C},right:{onClick:x},className:i.cn("progress-buttons",r.default.progressButton)})})]})})};exports.ComplexCarousel=b;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../../utils/cn/cn.cjs.js"),N=require("../../ProgressButton/ProgressButton.cjs.js"),c=require("../../Typography/Typography.cjs.js"),v=require("../useComplexImageCarousel.cjs.js"),r=require("./complexImageCarousel.module.css.cjs.js"),b=({images:a})=>{const{containerRef:u,carouselRef:m,imageRefs:f,descriptionRef:p,descriptionItemRef:g,progressButtonContainerRef:h,visible:s,cardSizes:n,handleCustomPrevClick:C,handleCustomNextClick:x,current:y,mobileCardIndex:o,xLargeCardIndex:l}=v.useComplexImageCarousel({images:a});return e.jsx("div",{className:r.default.root,children:e.jsxs("div",{ref:u,className:r.default.container,children:[e.jsx("div",{ref:m,className:r.default.carouselArea,children:s.length>0&&s.map((j,t)=>e.jsx("div",{className:i.cn(r.default.slideContainer,r.default[`size-${n[t]}`]),ref:d=>{d&&(f.current[t]=d)},"data-flip-id":`slide-${(y+t)%a.length}`,"data-size":n[t],children:e.jsx("img",{src:j.image,alt:`Slide ${t+1}`,className:r.default.image})},t+1))}),e.jsx("div",{ref:p,className:r.default.description,children:e.jsxs("div",{ref:g,className:i.cn("description-item",r.default.descriptionItem),children:[e.jsx(c.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingSm",children:typeof window<"u"&&window.innerWidth<=768?s[o].title:s[l].title}),e.jsx(c.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:r.default.text,children:typeof window<"u"&&window.innerWidth<=768?s[o].description:s[l].description})]})}),e.jsx("div",{ref:h,className:r.default.progressButtonContainer,children:e.jsx(N.ProgressButton,{left:{onClick:C},right:{onClick:x},className:i.cn("progress-buttons",r.default.progressButton)})})]})})};exports.ComplexCarousel=b;
@@ -3,9 +3,9 @@ import { jsx as i, jsxs as c } from "react/jsx-runtime";
3
3
  import { cn as s } from "../../../utils/cn/cn.es.js";
4
4
  import { ProgressButton as y } from "../../ProgressButton/ProgressButton.es.js";
5
5
  import { Typography as m } from "../../Typography/Typography.es.js";
6
- import { useComplexImageCarousel as x } from "../useComplexImageCarousel.es.js";
6
+ import { useComplexImageCarousel as R } from "../useComplexImageCarousel.es.js";
7
7
  import e from "./complexImageCarousel.module.css.es.js";
8
- const S = ({ images: o }) => {
8
+ const z = ({ images: o }) => {
9
9
  const {
10
10
  containerRef: f,
11
11
  carouselRef: p,
@@ -20,7 +20,7 @@ const S = ({ images: o }) => {
20
20
  current: w,
21
21
  mobileCardIndex: n,
22
22
  xLargeCardIndex: d
23
- } = x({ images: o });
23
+ } = R({ images: o });
24
24
  return /* @__PURE__ */ i("div", { className: e.root, children: /* @__PURE__ */ c("div", { ref: f, className: e.container, children: [
25
25
  /* @__PURE__ */ i("div", { ref: p, className: e.carouselArea, children: r.length > 0 && r.map((b, t) => /* @__PURE__ */ i(
26
26
  "div",
@@ -36,7 +36,7 @@ const S = ({ images: o }) => {
36
36
  t + 1
37
37
  )) }),
38
38
  /* @__PURE__ */ i("div", { ref: u, className: e.description, children: /* @__PURE__ */ c("div", { ref: g, className: s("description-item", e.descriptionItem), children: [
39
- /* @__PURE__ */ i(m, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingXxs", children: typeof window < "u" && window.innerWidth <= 768 ? r[n].title : r[d].title }),
39
+ /* @__PURE__ */ i(m, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingSm", children: typeof window < "u" && window.innerWidth <= 768 ? r[n].title : r[d].title }),
40
40
  /* @__PURE__ */ i(m, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: e.text, children: typeof window < "u" && window.innerWidth <= 768 ? r[n].description : r[d].description })
41
41
  ] }) }),
42
42
  /* @__PURE__ */ i("div", { ref: C, className: e.progressButtonContainer, children: /* @__PURE__ */ i(
@@ -54,5 +54,5 @@ const S = ({ images: o }) => {
54
54
  ] }) });
55
55
  };
56
56
  export {
57
- S as ComplexCarousel
57
+ z as ComplexCarousel
58
58
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("react"),p=require("../../ComplexTooltip/ComplexTooltip.cjs.js");require("../../Icon/Icon.cjs.js");const o=require("../../Typography/Typography.cjs.js"),m=require("../../InfiniteScroll/InfiniteScroll.cjs.js"),e=require("./simpleImageCarousel.module.css.cjs.js"),d=({images:a})=>{const[l,r]=c.useState(null);return t.jsx("div",{className:e.default.simpleContainer,children:t.jsx(m.InfiniteScroll,{items:a,renderItem:(s,n)=>t.jsxs("div",{className:e.default.simpleItem,onMouseEnter:i=>{r({x:i.clientX,y:i.clientY})},onMouseMove:i=>{r({x:i.clientX,y:i.clientY})},children:[t.jsx(p.ComplexTooltip,{trigger:"hover",title:s.title||"",description:s.description||"",style:"light",transformMode:"absolute",transform:{top:(l==null?void 0:l.y)||0,left:l==null?void 0:l.x},children:t.jsx("img",{src:s.image,alt:s.title,className:e.default.simpleImage})}),t.jsx(o.Typography,{as:"h4",defaultVariant:"headingXs",mobileVariant:"bodyLg",className:e.default.simpleTitle,children:s.title}),t.jsx(o.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:e.default.simpleDescription,children:s.description})]},n),itemClassName:e.default.simpleItemWrapper,contentClassName:e.default.simpleContent,rootClassName:e.default.simpleRoot})})};exports.SimpleImageCarousel=d;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("react"),p=require("../../ComplexTooltip/ComplexTooltip.cjs.js");require("../../Icon/Icon.cjs.js");const o=require("../../Typography/Typography.cjs.js"),m=require("../../InfiniteScroll/InfiniteScroll.cjs.js"),e=require("./simpleImageCarousel.module.css.cjs.js"),u=({images:a})=>{const[l,r]=c.useState(null);return t.jsx("div",{className:e.default.simpleContainer,children:t.jsx(m.InfiniteScroll,{items:a,renderItem:(s,n)=>t.jsxs("div",{className:e.default.simpleItem,onMouseEnter:i=>{r({x:i.clientX,y:i.clientY})},onMouseMove:i=>{r({x:i.clientX,y:i.clientY})},children:[t.jsx(p.ComplexTooltip,{trigger:"hover",title:s.title||"",description:s.description||"",style:"light",transformMode:"absolute",transform:{top:(l==null?void 0:l.y)||0,left:l==null?void 0:l.x},children:t.jsx("img",{src:s.image,alt:s.title,className:e.default.simpleImage})}),t.jsx(o.Typography,{as:"h4",defaultVariant:"headingXs",mobileVariant:"bodyLg",className:e.default.simpleTitle,children:s.title}),t.jsx(o.Typography,{as:"p",defaultVariant:"bodySm",mobileVariant:"bodyXs",className:e.default.simpleDescription,children:s.description})]},n),itemClassName:e.default.simpleItemWrapper,contentClassName:e.default.simpleContent,rootClassName:e.default.simpleRoot})})};exports.SimpleImageCarousel=u;
@@ -55,8 +55,8 @@ const b = ({ images: m }) => {
55
55
  o,
56
56
  {
57
57
  as: "p",
58
- defaultVariant: "bodyMd",
59
- mobileVariant: "bodySm",
58
+ defaultVariant: "bodySm",
59
+ mobileVariant: "bodyXs",
60
60
  className: e.simpleDescription,
61
61
  children: i.description
62
62
  }
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),j=require("../../node_modules/swiper/modules/navigation.cjs.js"),u=require("../../node_modules/swiper/swiper-react.cjs.js"),p=require("../../utils/cn/cn.cjs.js"),v=require("../../utils/useSwiper/useSwiper.cjs.js"),f=require("../ProgressButton/ProgressButton.cjs.js");;/* empty css */;/* empty css */;/* empty css */const e=require("./productGallery.module.css.cjs.js"),P=[j.default],N=({slides:i,header:h,isTabbed:l=!1})=>{const{swiper:s,activeIndex:t,isEnd:n,setIsEnd:w,hideNav:S,handleSlideChange:g,handlePrevClick:a,handleNextClick:o,onSwiperInit:m,handleSwiperResize:q,handleSlideTo:d}=v.useSwiper();return c.useEffect(()=>{s==null||s.setProgress(0,300)},[s]),c.useEffect(()=>{i.length&&d(0)},[i,d]),r.jsxs("div",{className:e.default.root,children:[r.jsxs("div",{className:p.cn(e.default.topRow,{[e.default.topRowTabbed]:l}),children:[r.jsx("div",{className:e.default.headerWrapper,children:h}),r.jsx("div",{className:p.cn(e.default.swiperControlsDesktop,{[e.default.swiperControlsHidden]:S,[e.default.swiperControlsTabbed]:l}),children:r.jsx(f.ProgressButton,{left:{disabled:t<=0,onClick:a},right:{disabled:n,onClick:o}})})]}),r.jsx("div",{className:e.default.carouselArea,children:r.jsx(u.Swiper,{onSwiper:m,onResize:q,onSlideChange:g,onReachEnd:()=>w(!0),modules:P,spaceBetween:0,slidesPerView:"auto",className:e.default.swiper,children:i.map((x,C)=>r.jsx(u.SwiperSlide,{className:e.default.swiperSlide,children:x},C))})}),r.jsx("div",{className:e.default.swiperControlsMobile,children:r.jsx(f.ProgressButton,{left:{disabled:t<=0,onClick:a},right:{disabled:n,onClick:o}})})]})};exports.ProductGallery=N;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),q=require("../../node_modules/swiper/modules/navigation.cjs.js"),p=require("../../node_modules/swiper/swiper-react.cjs.js"),f=require("../../utils/cn/cn.cjs.js"),x=require("../../utils/useSwiper/useSwiper.cjs.js"),h=require("../ProgressButton/ProgressButton.cjs.js"),j=require("../ProductGalleryCard/ProductGalleryCard.cjs.js");;/* empty css */;/* empty css */;/* empty css */const r=require("./productGallery.module.css.cjs.js"),b=[q.default],v=({slides:i,header:m,isTabbed:l=!1})=>{const{swiper:t,activeIndex:n,isEnd:a,setIsEnd:w,hideNav:S,handleSlideChange:g,handlePrevClick:o,handleNextClick:c,onSwiperInit:C,handleSwiperResize:P,handleSlideTo:d}=x.useSwiper();return u.useEffect(()=>{t==null||t.setProgress(0,300)},[t]),u.useEffect(()=>{i.length&&d(0)},[i,d]),e.jsxs("div",{className:r.default.root,children:[e.jsxs("div",{className:f.cn(r.default.topRow,{[r.default.topRowTabbed]:l}),children:[e.jsx("div",{className:r.default.headerWrapper,children:m}),e.jsx("div",{className:f.cn(r.default.swiperControlsDesktop,{[r.default.swiperControlsHidden]:S,[r.default.swiperControlsTabbed]:l}),children:e.jsx(h.ProgressButton,{left:{disabled:n<=0,onClick:o},right:{disabled:a,onClick:c}})})]}),e.jsx("div",{className:r.default.carouselArea,children:e.jsx(p.Swiper,{onSwiper:C,onResize:P,onSlideChange:g,onReachEnd:()=>w(!0),modules:b,spaceBetween:0,slidesPerView:"auto",className:r.default.swiper,children:i.map(s=>e.jsx(p.SwiperSlide,{className:r.default.swiperSlide,children:e.jsx(j.ProductGalleryCard,{name:s.name,price:s.price,image:s.image,link:s.link,buttons:s.buttons})},`${s.name}_${s.link}`))})}),e.jsx("div",{className:r.default.swiperControlsMobile,children:e.jsx(h.ProgressButton,{left:{disabled:n<=0,onClick:o},right:{disabled:a,onClick:c}})})]})};exports.ProductGallery=v;
@@ -1,8 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
+ import { TProductGalleryCardView } from '../ProductGalleryCard';
2
3
 
3
4
  export type TProductGalleryProps = {
4
5
  header: ReactNode;
5
- slides: ReactNode[];
6
+ slides: Array<TProductGalleryCardView>;
6
7
  isTabbed?: boolean;
7
8
  };
8
9
  export declare const ProductGallery: ({ slides, header, isTabbed }: TProductGalleryProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,59 +1,60 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
3
3
  import { useEffect as p } from "react";
4
- import b from "../../node_modules/swiper/modules/navigation.es.js";
5
- import { Swiper as k, SwiperSlide as E } from "../../node_modules/swiper/swiper-react.es.js";
6
- import { cn as m } from "../../utils/cn/cn.es.js";
4
+ import k from "../../node_modules/swiper/modules/navigation.es.js";
5
+ import { Swiper as v, SwiperSlide as b } from "../../node_modules/swiper/swiper-react.es.js";
6
+ import { cn as h } from "../../utils/cn/cn.es.js";
7
7
  import { useSwiper as P } from "../../utils/useSwiper/useSwiper.es.js";
8
- import { ProgressButton as h } from "../ProgressButton/ProgressButton.es.js";
8
+ import { ProgressButton as f } from "../ProgressButton/ProgressButton.es.js";
9
+ import { ProductGalleryCard as E } from "../ProductGalleryCard/ProductGalleryCard.es.js";
9
10
  /* empty css */
10
11
  /* empty css */
11
12
  /* empty css */
12
13
  import e from "./productGallery.module.css.es.js";
13
- const R = [b], G = ({ slides: o, header: w, isTabbed: s = !1 }) => {
14
+ const R = [k], $ = ({ slides: n, header: w, isTabbed: t = !1 }) => {
14
15
  const {
15
- swiper: r,
16
- activeIndex: l,
17
- isEnd: n,
18
- setIsEnd: f,
19
- hideNav: S,
20
- handleSlideChange: C,
21
- handlePrevClick: t,
22
- handleNextClick: a,
16
+ swiper: o,
17
+ activeIndex: a,
18
+ isEnd: l,
19
+ setIsEnd: u,
20
+ hideNav: C,
21
+ handleSlideChange: S,
22
+ handlePrevClick: s,
23
+ handleNextClick: d,
23
24
  onSwiperInit: N,
24
- handleSwiperResize: u,
25
- handleSlideTo: d
25
+ handleSwiperResize: g,
26
+ handleSlideTo: c
26
27
  } = P();
27
28
  return p(() => {
28
- r == null || r.setProgress(0, 300);
29
- }, [r]), p(() => {
30
- o.length && d(0);
31
- }, [o, d]), /* @__PURE__ */ c("div", { className: e.root, children: [
32
- /* @__PURE__ */ c(
29
+ o == null || o.setProgress(0, 300);
30
+ }, [o]), p(() => {
31
+ n.length && c(0);
32
+ }, [n, c]), /* @__PURE__ */ m("div", { className: e.root, children: [
33
+ /* @__PURE__ */ m(
33
34
  "div",
34
35
  {
35
- className: m(e.topRow, {
36
- [e.topRowTabbed]: s
36
+ className: h(e.topRow, {
37
+ [e.topRowTabbed]: t
37
38
  }),
38
39
  children: [
39
- /* @__PURE__ */ i("div", { className: e.headerWrapper, children: w }),
40
- /* @__PURE__ */ i(
40
+ /* @__PURE__ */ r("div", { className: e.headerWrapper, children: w }),
41
+ /* @__PURE__ */ r(
41
42
  "div",
42
43
  {
43
- className: m(e.swiperControlsDesktop, {
44
- [e.swiperControlsHidden]: S,
45
- [e.swiperControlsTabbed]: s
44
+ className: h(e.swiperControlsDesktop, {
45
+ [e.swiperControlsHidden]: C,
46
+ [e.swiperControlsTabbed]: t
46
47
  }),
47
- children: /* @__PURE__ */ i(
48
- h,
48
+ children: /* @__PURE__ */ r(
49
+ f,
49
50
  {
50
51
  left: {
51
- disabled: l <= 0,
52
- onClick: t
52
+ disabled: a <= 0,
53
+ onClick: s
53
54
  },
54
55
  right: {
55
- disabled: n,
56
- onClick: a
56
+ disabled: l,
57
+ onClick: d
57
58
  }
58
59
  }
59
60
  )
@@ -62,35 +63,44 @@ const R = [b], G = ({ slides: o, header: w, isTabbed: s = !1 }) => {
62
63
  ]
63
64
  }
64
65
  ),
65
- /* @__PURE__ */ i("div", { className: e.carouselArea, children: /* @__PURE__ */ i(
66
- k,
66
+ /* @__PURE__ */ r("div", { className: e.carouselArea, children: /* @__PURE__ */ r(
67
+ v,
67
68
  {
68
69
  onSwiper: N,
69
- onResize: u,
70
- onSlideChange: C,
71
- onReachEnd: () => f(!0),
70
+ onResize: g,
71
+ onSlideChange: S,
72
+ onReachEnd: () => u(!0),
72
73
  modules: R,
73
74
  spaceBetween: 0,
74
75
  slidesPerView: "auto",
75
76
  className: e.swiper,
76
- children: o.map((v, g) => /* @__PURE__ */ i(E, { className: e.swiperSlide, children: v }, g))
77
+ children: n.map((i) => /* @__PURE__ */ r(b, { className: e.swiperSlide, children: /* @__PURE__ */ r(
78
+ E,
79
+ {
80
+ name: i.name,
81
+ price: i.price,
82
+ image: i.image,
83
+ link: i.link,
84
+ buttons: i.buttons
85
+ }
86
+ ) }, `${i.name}_${i.link}`))
77
87
  }
78
88
  ) }),
79
- /* @__PURE__ */ i("div", { className: e.swiperControlsMobile, children: /* @__PURE__ */ i(
80
- h,
89
+ /* @__PURE__ */ r("div", { className: e.swiperControlsMobile, children: /* @__PURE__ */ r(
90
+ f,
81
91
  {
82
92
  left: {
83
- disabled: l <= 0,
84
- onClick: t
93
+ disabled: a <= 0,
94
+ onClick: s
85
95
  },
86
96
  right: {
87
- disabled: n,
88
- onClick: a
97
+ disabled: l,
98
+ onClick: d
89
99
  }
90
100
  }
91
101
  ) })
92
102
  ] });
93
103
  };
94
104
  export {
95
- G as ProductGallery
105
+ $ as ProductGallery
96
106
  };