@zenpatient-org/healthspan-marketing-ui 0.1.153 → 0.1.155

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.
Files changed (33) hide show
  1. package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.cjs.js +1 -1
  2. package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.es.js +29 -27
  3. package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.cjs.js +1 -1
  4. package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.es.js +18 -16
  5. package/dist/components/ComplexImageCarousel/useComplexImageCarousel.cjs.js +1 -1
  6. package/dist/components/ComplexImageCarousel/useComplexImageCarousel.es.js +119 -148
  7. package/dist/components/ProductGalleryCard/ProductGalleryCard.cjs.js +1 -1
  8. package/dist/components/ProductGalleryCard/ProductGalleryCard.es.js +9 -9
  9. package/dist/healthspan-marketing-ui.css +1 -1
  10. package/dist/modules/LongevityPathways/longevityPathways.module.css.cjs.js +1 -1
  11. package/dist/modules/LongevityPathways/longevityPathways.module.css.es.js +9 -7
  12. package/dist/pageComponents/LabsHero/LabsHero.cjs.js +1 -1
  13. package/dist/pageComponents/LabsHero/LabsHero.d.ts +4 -1
  14. package/dist/pageComponents/LabsHero/LabsHero.es.js +28 -46
  15. package/dist/pageComponents/OurCompanyHero/assets/hero1.jpg.cjs.js +1 -1
  16. package/dist/pageComponents/OurCompanyHero/assets/hero1.jpg.es.js +2 -2
  17. package/dist/pageComponents/OurCompanyHero/assets/hero2.jpg.cjs.js +1 -1
  18. package/dist/pageComponents/OurCompanyHero/assets/hero2.jpg.es.js +1 -1
  19. package/dist/pageComponents/OurCompanyHero/assets/hero3.jpg.cjs.js +1 -1
  20. package/dist/pageComponents/OurCompanyHero/assets/hero3.jpg.es.js +1 -1
  21. package/dist/pageComponents/OurCompanyHero/assets/hero4.jpg.cjs.js +1 -1
  22. package/dist/pageComponents/OurCompanyHero/assets/hero4.jpg.es.js +2 -2
  23. package/dist/pageComponents/OurCompanyHero/assets/hero5.jpg.cjs.js +1 -1
  24. package/dist/pageComponents/OurCompanyHero/assets/hero5.jpg.es.js +1 -1
  25. package/dist/pageComponents/OurCompanyHero/assets/hero6.jpg.cjs.js +1 -1
  26. package/dist/pageComponents/OurCompanyHero/assets/hero6.jpg.es.js +2 -2
  27. package/dist/pageComponents/OurCompanyHero/assets/hero7.jpg.cjs.js +1 -1
  28. package/dist/pageComponents/OurCompanyHero/assets/hero7.jpg.es.js +1 -1
  29. package/dist/pageComponents/OurCompanyHero/assets/hero8.jpg.cjs.js +1 -1
  30. package/dist/pageComponents/OurCompanyHero/assets/hero8.jpg.es.js +1 -1
  31. package/dist/pageComponents/OurCompanyHero/assets/hero9.jpg.cjs.js +1 -1
  32. package/dist/pageComponents/OurCompanyHero/assets/hero9.jpg.es.js +1 -1
  33. package/package.json +1 -1
@@ -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"),v=require("../../ProgressButton/ProgressButton.cjs.js"),u=require("../../Typography/Typography.cjs.js"),b=require("../useComplexImageCarousel.cjs.js"),r=require("./complexImageCarousel.module.css.cjs.js"),I=({images:a})=>{const{MOBILE_BREAKPOINT:n,containerRef:m,carouselRef:f,imageRefs:p,descriptionRef:g,descriptionItemRef:h,progressButtonContainerRef:C,visible:s,cardSizes:o,handleCustomPrevClick:x,handleCustomNextClick:y,current:j,mobileCardIndex:l,xLargeCardIndex:d}=b.useComplexImageCarousel({images:a});return e.jsx("div",{className:r.default.root,children:e.jsxs("div",{ref:m,className:r.default.container,children:[e.jsx("div",{ref:f,className:r.default.carouselArea,children:s.length>0&&s.map((N,t)=>e.jsx("div",{className:i.cn(r.default.slideContainer,r.default[`size-${o[t]}`]),ref:c=>{c&&(p.current[t]=c)},"data-flip-id":`slide-${(j+t)%a.length}`,"data-size":o[t],children:e.jsx("img",{src:N.image,alt:`Slide ${t+1}`,className:r.default.image})},t+1))}),e.jsx("div",{ref:g,className:r.default.description,children:e.jsxs("div",{ref:h,className:i.cn("description-item",r.default.descriptionItem),children:[e.jsx(u.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingSm",children:typeof window<"u"&&window.innerWidth<=n?s[l].title:s[d].title}),e.jsx(u.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:r.default.text,children:typeof window<"u"&&window.innerWidth<=n?s[l].description:s[d].description})]})}),e.jsx("div",{ref:C,className:r.default.progressButtonContainer,children:e.jsx(v.ProgressButton,{left:{onClick:x},right:{onClick:y},className:i.cn("progress-buttons",r.default.progressButton)})})]})})};exports.ComplexCarousel=I;
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"),v=require("../../ProgressButton/ProgressButton.cjs.js"),u=require("../../Typography/Typography.cjs.js"),b=require("../useComplexImageCarousel.cjs.js"),r=require("./complexImageCarousel.module.css.cjs.js"),I=({images:a})=>{const{MOBILE_BREAKPOINT:n,containerRef:m,carouselRef:f,imageRefs:p,descriptionRef:g,descriptionItemRef:h,progressButtonContainerRef:C,visible:s,cardSizes:o,handleCustomPrevClick:x,handleCustomNextClick:y,current:j,mobileCardIndex:l,xLargeCardIndex:d}=b.useComplexImageCarousel({images:a});return e.jsxs("div",{className:r.default.root,children:[e.jsxs("div",{ref:m,className:r.default.container,children:[e.jsx("div",{ref:f,className:r.default.carouselArea,children:s.length>0&&s.map((N,t)=>e.jsx("div",{className:i.cn(r.default.slideContainer,r.default[`size-${o[t]}`]),ref:c=>{c&&(p.current[t]=c)},"data-flip-id":`slide-${(j+t)%a.length}`,"data-size":o[t],children:e.jsx("img",{src:N.image,alt:`Slide ${t+1}`,className:r.default.image})},t+1))}),e.jsx("div",{ref:g,className:r.default.description,children:e.jsxs("div",{ref:h,className:i.cn("description-item",r.default.descriptionItem),children:[e.jsx(u.Typography,{as:"h3",defaultVariant:"headingLg",mobileVariant:"headingSm",children:typeof window<"u"&&window.innerWidth<=n?s[l].title:s[d].title}),e.jsx(u.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:r.default.text,children:typeof window<"u"&&window.innerWidth<=n?s[l].description:s[d].description})]})})]}),e.jsx("div",{ref:C,className:r.default.progressButtonContainer,children:e.jsx(v.ProgressButton,{left:{onClick:x},right:{onClick:y},className:i.cn("progress-buttons",r.default.progressButton)})})]})};exports.ComplexCarousel=I;
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as m } from "react/jsx-runtime";
3
- import { cn as s } from "../../../utils/cn/cn.es.js";
2
+ import { jsxs as s, jsx as i } from "react/jsx-runtime";
3
+ import { cn as o } from "../../../utils/cn/cn.es.js";
4
4
  import { ProgressButton as I } from "../../ProgressButton/ProgressButton.es.js";
5
5
  import { Typography as f } from "../../Typography/Typography.es.js";
6
6
  import { useComplexImageCarousel as R } from "../useComplexImageCarousel.es.js";
7
7
  import e from "./complexImageCarousel.module.css.es.js";
8
- const L = ({ images: o }) => {
8
+ const L = ({ images: a }) => {
9
9
  const {
10
- MOBILE_BREAKPOINT: a,
10
+ MOBILE_BREAKPOINT: n,
11
11
  containerRef: p,
12
12
  carouselRef: h,
13
13
  imageRefs: u,
@@ -15,31 +15,33 @@ const L = ({ images: o }) => {
15
15
  descriptionItemRef: C,
16
16
  progressButtonContainerRef: N,
17
17
  visible: r,
18
- cardSizes: n,
18
+ cardSizes: d,
19
19
  handleCustomPrevClick: v,
20
20
  handleCustomNextClick: w,
21
21
  current: b,
22
- mobileCardIndex: d,
23
- xLargeCardIndex: l
24
- } = R({ images: o });
25
- return /* @__PURE__ */ i("div", { className: e.root, children: /* @__PURE__ */ m("div", { ref: p, className: e.container, children: [
26
- /* @__PURE__ */ i("div", { ref: h, className: e.carouselArea, children: r.length > 0 && r.map((y, t) => /* @__PURE__ */ i(
27
- "div",
28
- {
29
- className: s(e.slideContainer, e[`size-${n[t]}`]),
30
- ref: (c) => {
31
- c && (u.current[t] = c);
22
+ mobileCardIndex: l,
23
+ xLargeCardIndex: c
24
+ } = R({ images: a });
25
+ return /* @__PURE__ */ s("div", { className: e.root, children: [
26
+ /* @__PURE__ */ s("div", { ref: p, className: e.container, children: [
27
+ /* @__PURE__ */ i("div", { ref: h, className: e.carouselArea, children: r.length > 0 && r.map((y, t) => /* @__PURE__ */ i(
28
+ "div",
29
+ {
30
+ className: o(e.slideContainer, e[`size-${d[t]}`]),
31
+ ref: (m) => {
32
+ m && (u.current[t] = m);
33
+ },
34
+ "data-flip-id": `slide-${(b + t) % a.length}`,
35
+ "data-size": d[t],
36
+ children: /* @__PURE__ */ i("img", { src: y.image, alt: `Slide ${t + 1}`, className: e.image })
32
37
  },
33
- "data-flip-id": `slide-${(b + t) % o.length}`,
34
- "data-size": n[t],
35
- children: /* @__PURE__ */ i("img", { src: y.image, alt: `Slide ${t + 1}`, className: e.image })
36
- },
37
- t + 1
38
- )) }),
39
- /* @__PURE__ */ i("div", { ref: g, className: e.description, children: /* @__PURE__ */ m("div", { ref: C, className: s("description-item", e.descriptionItem), children: [
40
- /* @__PURE__ */ i(f, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingSm", children: typeof window < "u" && window.innerWidth <= a ? r[d].title : r[l].title }),
41
- /* @__PURE__ */ i(f, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: e.text, children: typeof window < "u" && window.innerWidth <= a ? r[d].description : r[l].description })
42
- ] }) }),
38
+ t + 1
39
+ )) }),
40
+ /* @__PURE__ */ i("div", { ref: g, className: e.description, children: /* @__PURE__ */ s("div", { ref: C, className: o("description-item", e.descriptionItem), children: [
41
+ /* @__PURE__ */ i(f, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingSm", children: typeof window < "u" && window.innerWidth <= n ? r[l].title : r[c].title }),
42
+ /* @__PURE__ */ i(f, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: e.text, children: typeof window < "u" && window.innerWidth <= n ? r[l].description : r[c].description })
43
+ ] }) })
44
+ ] }),
43
45
  /* @__PURE__ */ i("div", { ref: N, className: e.progressButtonContainer, children: /* @__PURE__ */ i(
44
46
  I,
45
47
  {
@@ -49,10 +51,10 @@ const L = ({ images: o }) => {
49
51
  right: {
50
52
  onClick: w
51
53
  },
52
- className: s("progress-buttons", e.progressButton)
54
+ className: o("progress-buttons", e.progressButton)
53
55
  }
54
56
  ) })
55
- ] }) });
57
+ ] });
56
58
  };
57
59
  export {
58
60
  L as ComplexCarousel
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="complexImageCarousel-module__container___kVKDY",o="complexImageCarousel-module__carouselArea___FSZ0C",s="complexImageCarousel-module__slideContainer___qYXXM",r="complexImageCarousel-module__description___QRpoA",_="complexImageCarousel-module__descriptionItem___X0E-4",l="complexImageCarousel-module__progressButtonContainer___XSlwf",t="complexImageCarousel-module__progressButton___G93Bn",a={container:e,carouselArea:o,slideContainer:s,"size-atom":"complexImageCarousel-module__size-atom___8IEXO","size-small":"complexImageCarousel-module__size-small___8Sjr3","size-medium":"complexImageCarousel-module__size-medium___Fi4B0","size-large":"complexImageCarousel-module__size-large___Kz59p","size-x-large":"complexImageCarousel-module__size-x-large___IGMf2",description:r,descriptionItem:_,progressButtonContainer:l,progressButton:t};exports.carouselArea=o;exports.container=e;exports.default=a;exports.description=r;exports.descriptionItem=_;exports.progressButton=t;exports.progressButtonContainer=l;exports.slideContainer=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="complexImageCarousel-module__root___3G7Bu",o="complexImageCarousel-module__container___kVKDY",s="complexImageCarousel-module__carouselArea___FSZ0C",r="complexImageCarousel-module__slideContainer___qYXXM",_="complexImageCarousel-module__description___QRpoA",t="complexImageCarousel-module__descriptionItem___X0E-4",l="complexImageCarousel-module__progressButtonContainer___XSlwf",a="complexImageCarousel-module__progressButton___G93Bn",m={root:e,container:o,carouselArea:s,slideContainer:r,"size-atom":"complexImageCarousel-module__size-atom___8IEXO","size-small":"complexImageCarousel-module__size-small___8Sjr3","size-medium":"complexImageCarousel-module__size-medium___Fi4B0","size-large":"complexImageCarousel-module__size-large___Kz59p","size-x-large":"complexImageCarousel-module__size-x-large___IGMf2",description:_,descriptionItem:t,progressButtonContainer:l,progressButton:a};exports.carouselArea=s;exports.container=o;exports.default=m;exports.description=_;exports.descriptionItem=t;exports.progressButton=a;exports.progressButtonContainer=l;exports.root=e;exports.slideContainer=r;
@@ -1,24 +1,26 @@
1
- const e = "complexImageCarousel-module__container___kVKDY", o = "complexImageCarousel-module__carouselArea___FSZ0C", _ = "complexImageCarousel-module__slideContainer___qYXXM", s = "complexImageCarousel-module__description___QRpoA", l = "complexImageCarousel-module__descriptionItem___X0E-4", r = "complexImageCarousel-module__progressButtonContainer___XSlwf", a = "complexImageCarousel-module__progressButton___G93Bn", m = {
2
- container: e,
3
- carouselArea: o,
4
- slideContainer: _,
1
+ const e = "complexImageCarousel-module__root___3G7Bu", o = "complexImageCarousel-module__container___kVKDY", _ = "complexImageCarousel-module__carouselArea___FSZ0C", s = "complexImageCarousel-module__slideContainer___qYXXM", l = "complexImageCarousel-module__description___QRpoA", r = "complexImageCarousel-module__descriptionItem___X0E-4", a = "complexImageCarousel-module__progressButtonContainer___XSlwf", m = "complexImageCarousel-module__progressButton___G93Bn", t = {
2
+ root: e,
3
+ container: o,
4
+ carouselArea: _,
5
+ slideContainer: s,
5
6
  "size-atom": "complexImageCarousel-module__size-atom___8IEXO",
6
7
  "size-small": "complexImageCarousel-module__size-small___8Sjr3",
7
8
  "size-medium": "complexImageCarousel-module__size-medium___Fi4B0",
8
9
  "size-large": "complexImageCarousel-module__size-large___Kz59p",
9
10
  "size-x-large": "complexImageCarousel-module__size-x-large___IGMf2",
10
- description: s,
11
- descriptionItem: l,
12
- progressButtonContainer: r,
13
- progressButton: a
11
+ description: l,
12
+ descriptionItem: r,
13
+ progressButtonContainer: a,
14
+ progressButton: m
14
15
  };
15
16
  export {
16
- o as carouselArea,
17
- e as container,
18
- m as default,
19
- s as description,
20
- l as descriptionItem,
21
- a as progressButton,
22
- r as progressButtonContainer,
23
- _ as slideContainer
17
+ _ as carouselArea,
18
+ o as container,
19
+ t as default,
20
+ l as description,
21
+ r as descriptionItem,
22
+ m as progressButton,
23
+ a as progressButtonContainer,
24
+ e as root,
25
+ s as slideContainer
24
26
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const re=require("../../node_modules/@gsap/react/src/index.cjs.js"),r=require("../../node_modules/gsap/index.cjs.js"),P=require("../../node_modules/gsap/Flip.cjs.js"),U=require("../../node_modules/gsap/Draggable.cjs.js"),c=require("react");r.gsap.registerPlugin(P.Flip);r.gsap.registerPlugin(U.Draggable);const F=12,ne=({images:i})=>{if(i.length>0&&i.length<F){const s=[...i];for(;i.length<F;)i.push(...s)}const[a,q]=c.useState(0),x=c.useRef(a);x.current=a;const[C,T]=c.useState(!1),j=c.useRef(null),t=c.useRef(null),R=c.useRef([]),I=c.useRef(null),N=c.useRef(null),S=c.useRef(null),L=c.useRef(null),u=["atom","small","medium","large","medium","small","atom"],_=["atom","small","medium","large","x-large","large","medium","small","atom"],[$,O]=c.useState(0),[g,G]=c.useState(typeof window<"u"&&window.innerWidth<=930?u:_),V=u.indexOf("large"),J=g.indexOf("x-large"),H=r.gsap.matchMedia(),h=c.useCallback(s=>{var p,K,v,D;if(!t.current)return;let o=0;if(window.innerWidth<=930){const l=t.current.querySelector('[data-size="large"]');o=l?l.offsetHeight:0}else{const l=t.current.querySelector('[data-size="x-large"]');o=l?l.offsetHeight:0,r.gsap.set(t.current,{x:0})}if(o>0&&(O(o),r.gsap.set(t.current,{height:o})),r.gsap.set((p=t.current)==null?void 0:p.querySelectorAll("[data-size]"),{y:0}),!R.current.length)return;const n=(K=t.current)==null?void 0:K.querySelector('[data-size="x-large"]'),e=n==null?void 0:n.getBoundingClientRect(),m=(v=t.current)==null?void 0:v.querySelector('[data-size="large"]'),d=m==null?void 0:m.getBoundingClientRect();H.add({isMobile:"(max-width: 930px)",isDesktop:"(min-width: 931px)"},l=>{var k,W;const{isDesktop:z,isMobile:ee}=l.conditions||{};if(O(((k=t.current)==null?void 0:k.offsetHeight)||0),r.gsap.set(t.current,{height:$||((W=t.current)==null?void 0:W.offsetHeight)||"auto"}),ee){if(!d)return;const f=window.innerWidth/2,E=d.right-d.width/2,M=f-E;if(r.gsap.set(t.current,{x:`+=${M}`}),!S.current)return;const A=S.current.querySelector(".progress-buttons");if(A){const w=A.getBoundingClientRect(),B=w.left+w.width/2,b=f-B;r.gsap.set(A,{x:`+=${b}`})}const te=f-d.width/2;r.gsap.set(I.current,{width:d.width,marginLeft:te}),R.current.forEach((w,B)=>{w&&B<u.length&&(u.forEach(b=>{w.classList.remove(`size-${b}`)}),w.classList.add(`size-${u[B]}`))})}z&&(r.gsap.set(I.current,{width:e?e.width:"auto",marginLeft:e?e.left:0}),R.current.forEach((f,E)=>{f&&E<g.length&&(g.forEach(M=>{f.classList.remove(`size-${M}`)}),f.classList.add(`size-${g[E]}`))}))}),(((D=I.current)==null?void 0:D.querySelectorAll(".description-item"))||[]).forEach((l,z)=>{l.style.zIndex=`${i.length-z}`}),T(!0),L.current=P.Flip.getState(R.current,{simple:!0}),q(s),r.gsap.delayedCall(0,()=>{P.Flip.from(L.current,{duration:.3,ease:"power3.out",absolute:!0,onComplete:()=>{T(!1)}}),r.gsap.fromTo(N.current,{opacity:0,y:20},{opacity:1,y:0,duration:.5,ease:"power3.out",onComplete:()=>{L.current=null}})})},[g,u,i.length,$]),Q=()=>{if(C)return;const s=(a-1+i.length)%i.length;h(s)},X=()=>{if(C)return;const s=(a+1)%i.length;h(s)};function Y(s,o){const n=[];if(typeof window<"u"&&window.innerWidth<=930)for(let e=0;e<u.length;e++)n.push(s[(o+e)%s.length]);else for(let e=0;e<g.length;e++)n.push(s[(o+e)%s.length]);return n}const Z=Y(i,a);return re.useGSAP(()=>{h(a);const s=()=>{G(window.innerWidth<=930?u:_),r.gsap.matchMediaRefresh(),q(0),r.gsap.delayedCall(0,()=>{if(!t.current)return;let n=0;if(window.innerWidth<=930){const e=t.current.querySelector('[data-size="large"]');n=e?e.offsetHeight:0}else{const e=t.current.querySelector('[data-size="x-large"]');n=e?e.offsetHeight:0,r.gsap.set(t.current,{x:0})}n>0&&(O(n),r.gsap.set(t.current,{height:n})),h(a)})};window.addEventListener("resize",s);const o=t.current;if(o)return H.add("(max-width: 930px)",()=>{const n={x:0},e=U.Draggable.create(o,{type:"x",onDragStart:()=>{C||(n.x=o.scrollLeft+o.getBoundingClientRect().left)},onDragEnd:()=>{const d=o.scrollLeft+o.getBoundingClientRect().left-n.x,y=20;if(d>y){if(C)return;const p=(x.current-1+i.length)%i.length;h(p)}else if(d<-y){if(C)return;const p=(x.current+1)%i.length;h(p)}}});return()=>{e[0]&&e[0].kill()}}),()=>{window.removeEventListener("resize",s)}},[]),{MOBILE_BREAKPOINT:930,containerRef:j,carouselRef:t,imageRefs:R,descriptionRef:I,descriptionItemRef:N,progressButtonContainerRef:S,visible:Z,cardSizes:g,handleCustomPrevClick:Q,handleCustomNextClick:X,current:a,mobileCardIndex:V,xLargeCardIndex:J}};exports.useComplexImageCarousel=ne;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ne=require("../../node_modules/@gsap/react/src/index.cjs.js"),o=require("../../node_modules/gsap/index.cjs.js"),y=require("../../node_modules/gsap/Flip.cjs.js"),F=require("../../node_modules/gsap/Draggable.cjs.js"),s=require("react");o.gsap.registerPlugin(y.Flip);o.gsap.registerPlugin(F.Draggable);const v=12,re=({images:n})=>{if(n.length>0&&n.length<v){const e=[...n];for(;n.length<v;)n.push(...e)}const[d,W]=s.useState(0),E=s.useRef(d);E.current=d;const[p,M]=s.useState(!1),U=s.useRef(null),t=s.useRef(null),C=s.useRef([]),R=s.useRef(null),b=s.useRef(null),j=s.useRef(null),x=s.useRef(null),a=["atom","small","medium","large","medium","small","atom"],z=["atom","small","medium","large","x-large","large","medium","small","atom"],[S,A]=s.useState(0),[g,P]=s.useState(typeof window<"u"&&window.innerWidth<=930?a:z),G=a.indexOf("large"),V=g.indexOf("x-large"),T=o.gsap.matchMedia(),I=s.useCallback(e=>{var q,N,_,$;if(!t.current)return;let i=0;if(window.innerWidth<=930){const l=t.current.querySelector('[data-size="large"]');i=l?l.offsetHeight:0}else{const l=t.current.querySelector('[data-size="x-large"]');i=l?l.offsetHeight:0,o.gsap.set(t.current,{x:0})}if(i>0&&(A(i),o.gsap.set(t.current,{height:i})),o.gsap.set((q=t.current)==null?void 0:q.querySelectorAll("[data-size]"),{y:0}),!C.current.length)return;const c=(N=t.current)==null?void 0:N.querySelector('[data-size="x-large"]'),r=c==null?void 0:c.getBoundingClientRect(),f=(_=t.current)==null?void 0:_.querySelector('[data-size="large"]'),u=f==null?void 0:f.getBoundingClientRect();T.add({isMobile:"(max-width: 930px)",isDesktop:"(min-width: 931px)"},l=>{var D,H,K;const{isDesktop:B,isMobile:Z}=l.conditions||{};if(A(((D=t.current)==null?void 0:D.offsetHeight)||0),Z){if(P(a),o.gsap.set(t.current,{height:S||((H=t.current)==null?void 0:H.offsetHeight)||"auto"}),!u)return;const h=window.innerWidth/2,w=u.right-u.width/2,L=h-w;o.gsap.set(t.current,{x:`+=${L}`});const ee=h-u.width/2;o.gsap.set(R.current,{width:u.width,marginLeft:ee}),C.current.forEach((O,k)=>{O&&k<a.length&&(a.forEach(te=>{O.classList.remove(`size-${te}`)}),O.classList.add(`size-${a[k]}`))})}B&&(P(z),o.gsap.set(t.current,{height:S||((K=t.current)==null?void 0:K.offsetHeight)||"auto"}),o.gsap.set(R.current,{width:r?r.width:"auto",marginLeft:r?r.left:0}),C.current.forEach((h,w)=>{h&&w<g.length&&(g.forEach(L=>{h.classList.remove(`size-${L}`)}),h.classList.add(`size-${g[w]}`))}))}),((($=R.current)==null?void 0:$.querySelectorAll(".description-item"))||[]).forEach((l,B)=>{l.style.zIndex=`${n.length-B}`}),M(!0),x.current=y.Flip.getState(C.current,{simple:!0}),W(e),o.gsap.delayedCall(0,()=>{y.Flip.from(x.current,{duration:.3,ease:"power3.out",absolute:!0,onComplete:()=>{M(!1)}}),o.gsap.fromTo(b.current,{opacity:0,y:20},{opacity:1,y:0,duration:.5,ease:"power3.out",onComplete:()=>{x.current=null}})})},[g,a,n.length,S]),J=()=>{if(p)return;const e=(d-1+n.length)%n.length;I(e)},Q=()=>{if(p)return;const e=(d+1)%n.length;I(e)};function X(e,i){const c=[];if(typeof window<"u"&&window.innerWidth<=930)for(let r=0;r<a.length;r++)c.push(e[(i+r)%e.length]);else for(let r=0;r<g.length;r++)c.push(e[(i+r)%e.length]);return c}const Y=X(n,d);return ne.useGSAP(()=>{I(d);const e=t.current;e&&T.add("(max-width: 930px)",()=>{const i={x:0},c=F.Draggable.create(e,{type:"x",onDragStart:()=>{p||(i.x=e.scrollLeft+e.getBoundingClientRect().left)},onDragEnd:()=>{const f=e.scrollLeft+e.getBoundingClientRect().left-i.x,u=20;if(f>u){if(p)return;const m=(E.current-1+n.length)%n.length;I(m)}else if(f<-u){if(p)return;const m=(E.current+1)%n.length;I(m)}}});return()=>{c[0]&&c[0].kill()}})},[]),{MOBILE_BREAKPOINT:930,containerRef:U,carouselRef:t,imageRefs:C,descriptionRef:R,descriptionItemRef:b,progressButtonContainerRef:j,visible:Y,cardSizes:g,handleCustomPrevClick:J,handleCustomNextClick:Q,current:d,mobileCardIndex:G,xLargeCardIndex:V}};exports.useComplexImageCarousel=re;
@@ -1,99 +1,92 @@
1
1
  "use client";
2
- import { useGSAP as ne } from "../../node_modules/@gsap/react/src/index.es.js";
3
- import { gsap as r } from "../../node_modules/gsap/index.es.js";
4
- import { Flip as N } from "../../node_modules/gsap/Flip.es.js";
5
- import { Draggable as G } from "../../node_modules/gsap/Draggable.es.js";
6
- import { useState as x, useRef as d, useCallback as se } from "react";
7
- r.registerPlugin(N);
8
- r.registerPlugin(G);
9
- const F = 12, de = ({ images: i }) => {
10
- if (i.length > 0 && i.length < F) {
11
- const s = [...i];
12
- for (; i.length < F; )
13
- i.push(...s);
2
+ import { useGSAP as nt } from "../../node_modules/@gsap/react/src/index.es.js";
3
+ import { gsap as o } from "../../node_modules/gsap/index.es.js";
4
+ import { Flip as M } from "../../node_modules/gsap/Flip.es.js";
5
+ import { Draggable as U } from "../../node_modules/gsap/Draggable.es.js";
6
+ import { useState as x, useRef as a, useCallback as ot } from "react";
7
+ o.registerPlugin(M);
8
+ o.registerPlugin(U);
9
+ const v = 12, dt = ({ images: r }) => {
10
+ if (r.length > 0 && r.length < v) {
11
+ const t = [...r];
12
+ for (; r.length < v; )
13
+ r.push(...t);
14
14
  }
15
- const [l, _] = x(0), L = d(l);
16
- L.current = l;
17
- const [w, b] = x(!1), V = d(null), t = d(null), C = d([]), I = d(null), H = d(null), O = d(null), S = d(null), u = ["atom", "small", "medium", "large", "medium", "small", "atom"], K = ["atom", "small", "medium", "large", "x-large", "large", "medium", "small", "atom"], [$, y] = x(0), [f, j] = x(
18
- typeof window < "u" && window.innerWidth <= 930 ? u : K
19
- ), J = u.indexOf("large"), Q = f.indexOf("x-large"), q = r.matchMedia(), h = se(
20
- (s) => {
21
- var p, k, v, W;
22
- if (!t.current) return;
23
- let o = 0;
15
+ const [d, F] = x(0), R = a(d);
16
+ R.current = d;
17
+ const [m, z] = x(!1), G = a(null), e = a(null), p = a([]), I = a(null), A = a(null), V = a(null), B = a(null), l = ["atom", "small", "medium", "large", "medium", "small", "atom"], P = ["atom", "small", "medium", "large", "x-large", "large", "medium", "small", "atom"], [L, T] = x(0), [f, b] = x(
18
+ typeof window < "u" && window.innerWidth <= 930 ? l : P
19
+ ), j = l.indexOf("large"), J = f.indexOf("x-large"), N = o.matchMedia(), C = ot(
20
+ (t) => {
21
+ var _, $, H, K;
22
+ if (!e.current) return;
23
+ let s = 0;
24
24
  if (window.innerWidth <= 930) {
25
- const c = t.current.querySelector('[data-size="large"]');
26
- o = c ? c.offsetHeight : 0;
25
+ const c = e.current.querySelector('[data-size="large"]');
26
+ s = c ? c.offsetHeight : 0;
27
27
  } else {
28
- const c = t.current.querySelector('[data-size="x-large"]');
29
- o = c ? c.offsetHeight : 0, r.set(t.current, {
28
+ const c = e.current.querySelector('[data-size="x-large"]');
29
+ s = c ? c.offsetHeight : 0, o.set(e.current, {
30
30
  x: 0
31
31
  });
32
32
  }
33
- if (o > 0 && (y(o), r.set(t.current, {
34
- height: o
35
- })), r.set((p = t.current) == null ? void 0 : p.querySelectorAll("[data-size]"), {
33
+ if (s > 0 && (T(s), o.set(e.current, {
34
+ height: s
35
+ })), o.set((_ = e.current) == null ? void 0 : _.querySelectorAll("[data-size]"), {
36
36
  y: 0
37
- }), !C.current.length) return;
38
- const n = (k = t.current) == null ? void 0 : k.querySelector('[data-size="x-large"]'), e = n == null ? void 0 : n.getBoundingClientRect(), E = (v = t.current) == null ? void 0 : v.querySelector('[data-size="large"]'), a = E == null ? void 0 : E.getBoundingClientRect();
39
- q.add(
37
+ }), !p.current.length) return;
38
+ const i = ($ = e.current) == null ? void 0 : $.querySelector('[data-size="x-large"]'), n = i == null ? void 0 : i.getBoundingClientRect(), g = (H = e.current) == null ? void 0 : H.querySelector('[data-size="large"]'), u = g == null ? void 0 : g.getBoundingClientRect();
39
+ N.add(
40
40
  {
41
41
  isMobile: "(max-width: 930px)",
42
42
  isDesktop: "(min-width: 931px)"
43
43
  },
44
44
  (c) => {
45
- var D, U;
46
- const { isDesktop: M, isMobile: te } = c.conditions || {};
47
- if (y(((D = t.current) == null ? void 0 : D.offsetHeight) || 0), r.set(t.current, {
48
- height: $ || ((U = t.current) == null ? void 0 : U.offsetHeight) || "auto"
49
- }), te) {
50
- if (!a) return;
51
- const g = window.innerWidth / 2, B = a.right - a.width / 2, A = g - B;
52
- if (r.set(t.current, {
53
- x: `+=${A}`
54
- }), !O.current) return;
55
- const P = O.current.querySelector(
56
- ".progress-buttons"
57
- );
58
- if (P) {
59
- const m = P.getBoundingClientRect(), R = m.left + m.width / 2, T = g - R;
60
- r.set(P, {
61
- x: `+=${T}`
62
- });
63
- }
64
- const re = g - a.width / 2;
65
- r.set(I.current, {
66
- width: a.width,
67
- marginLeft: re
68
- }), C.current.forEach((m, R) => {
69
- m && R < u.length && (u.forEach((T) => {
70
- m.classList.remove(`size-${T}`);
71
- }), m.classList.add(`size-${u[R]}`));
45
+ var k, q, D;
46
+ const { isDesktop: S, isMobile: tt } = c.conditions || {};
47
+ if (T(((k = e.current) == null ? void 0 : k.offsetHeight) || 0), tt) {
48
+ if (b(l), o.set(e.current, {
49
+ height: L || ((q = e.current) == null ? void 0 : q.offsetHeight) || "auto"
50
+ }), !u) return;
51
+ const h = window.innerWidth / 2, E = u.right - u.width / 2, O = h - E;
52
+ o.set(e.current, {
53
+ x: `+=${O}`
54
+ });
55
+ const et = h - u.width / 2;
56
+ o.set(I.current, {
57
+ width: u.width,
58
+ marginLeft: et
59
+ }), p.current.forEach((y, W) => {
60
+ y && W < l.length && (l.forEach((rt) => {
61
+ y.classList.remove(`size-${rt}`);
62
+ }), y.classList.add(`size-${l[W]}`));
72
63
  });
73
64
  }
74
- M && (r.set(I.current, {
75
- width: e ? e.width : "auto",
76
- marginLeft: e ? e.left : 0
77
- }), C.current.forEach((g, B) => {
78
- g && B < f.length && (f.forEach((A) => {
79
- g.classList.remove(`size-${A}`);
80
- }), g.classList.add(`size-${f[B]}`));
65
+ S && (b(P), o.set(e.current, {
66
+ height: L || ((D = e.current) == null ? void 0 : D.offsetHeight) || "auto"
67
+ }), o.set(I.current, {
68
+ width: n ? n.width : "auto",
69
+ marginLeft: n ? n.left : 0
70
+ }), p.current.forEach((h, E) => {
71
+ h && E < f.length && (f.forEach((O) => {
72
+ h.classList.remove(`size-${O}`);
73
+ }), h.classList.add(`size-${f[E]}`));
81
74
  }));
82
75
  }
83
- ), (((W = I.current) == null ? void 0 : W.querySelectorAll(".description-item")) || []).forEach((c, M) => {
84
- c.style.zIndex = `${i.length - M}`;
85
- }), b(!0), S.current = N.getState(C.current, {
76
+ ), (((K = I.current) == null ? void 0 : K.querySelectorAll(".description-item")) || []).forEach((c, S) => {
77
+ c.style.zIndex = `${r.length - S}`;
78
+ }), z(!0), B.current = M.getState(p.current, {
86
79
  simple: !0
87
- }), _(s), r.delayedCall(0, () => {
88
- N.from(S.current, {
80
+ }), F(t), o.delayedCall(0, () => {
81
+ M.from(B.current, {
89
82
  duration: 0.3,
90
83
  ease: "power3.out",
91
84
  absolute: !0,
92
85
  onComplete: () => {
93
- b(!1);
86
+ z(!1);
94
87
  }
95
- }), r.fromTo(
96
- H.current,
88
+ }), o.fromTo(
89
+ A.current,
97
90
  {
98
91
  opacity: 0,
99
92
  y: 20
@@ -104,98 +97,76 @@ const F = 12, de = ({ images: i }) => {
104
97
  duration: 0.5,
105
98
  ease: "power3.out",
106
99
  onComplete: () => {
107
- S.current = null;
100
+ B.current = null;
108
101
  }
109
102
  }
110
103
  );
111
104
  });
112
105
  },
113
- [f, u, i.length, $]
114
- ), X = () => {
115
- if (w) return;
116
- const s = (l - 1 + i.length) % i.length;
117
- h(s);
118
- }, Y = () => {
119
- if (w) return;
120
- const s = (l + 1) % i.length;
121
- h(s);
106
+ [f, l, r.length, L]
107
+ ), Q = () => {
108
+ if (m) return;
109
+ const t = (d - 1 + r.length) % r.length;
110
+ C(t);
111
+ }, X = () => {
112
+ if (m) return;
113
+ const t = (d + 1) % r.length;
114
+ C(t);
122
115
  };
123
- function Z(s, o) {
124
- const n = [];
116
+ function Y(t, s) {
117
+ const i = [];
125
118
  if (typeof window < "u" && window.innerWidth <= 930)
126
- for (let e = 0; e < u.length; e++)
127
- n.push(s[(o + e) % s.length]);
119
+ for (let n = 0; n < l.length; n++)
120
+ i.push(t[(s + n) % t.length]);
128
121
  else
129
- for (let e = 0; e < f.length; e++)
130
- n.push(s[(o + e) % s.length]);
131
- return n;
122
+ for (let n = 0; n < f.length; n++)
123
+ i.push(t[(s + n) % t.length]);
124
+ return i;
132
125
  }
133
- const ee = Z(i, l);
134
- return ne(() => {
135
- h(l);
136
- const s = () => {
137
- j(window.innerWidth <= 930 ? u : K), r.matchMediaRefresh(), _(0), r.delayedCall(0, () => {
138
- if (!t.current) return;
139
- let n = 0;
140
- if (window.innerWidth <= 930) {
141
- const e = t.current.querySelector('[data-size="large"]');
142
- n = e ? e.offsetHeight : 0;
143
- } else {
144
- const e = t.current.querySelector('[data-size="x-large"]');
145
- n = e ? e.offsetHeight : 0, r.set(t.current, {
146
- x: 0
147
- });
126
+ const Z = Y(r, d);
127
+ return nt(() => {
128
+ C(d);
129
+ const t = e.current;
130
+ t && N.add("(max-width: 930px)", () => {
131
+ const s = { x: 0 }, i = U.create(t, {
132
+ type: "x",
133
+ onDragStart: () => {
134
+ m || (s.x = t.scrollLeft + t.getBoundingClientRect().left);
135
+ },
136
+ onDragEnd: () => {
137
+ const g = t.scrollLeft + t.getBoundingClientRect().left - s.x, u = 20;
138
+ if (g > u) {
139
+ if (m) return;
140
+ const w = (R.current - 1 + r.length) % r.length;
141
+ C(w);
142
+ } else if (g < -u) {
143
+ if (m) return;
144
+ const w = (R.current + 1) % r.length;
145
+ C(w);
146
+ }
148
147
  }
149
- n > 0 && (y(n), r.set(t.current, {
150
- height: n
151
- })), h(l);
152
148
  });
153
- };
154
- window.addEventListener("resize", s);
155
- const o = t.current;
156
- if (o)
157
- return q.add("(max-width: 930px)", () => {
158
- const n = { x: 0 }, e = G.create(o, {
159
- type: "x",
160
- onDragStart: () => {
161
- w || (n.x = o.scrollLeft + o.getBoundingClientRect().left);
162
- },
163
- onDragEnd: () => {
164
- const a = o.scrollLeft + o.getBoundingClientRect().left - n.x, z = 20;
165
- if (a > z) {
166
- if (w) return;
167
- const p = (L.current - 1 + i.length) % i.length;
168
- h(p);
169
- } else if (a < -z) {
170
- if (w) return;
171
- const p = (L.current + 1) % i.length;
172
- h(p);
173
- }
174
- }
175
- });
176
- return () => {
177
- e[0] && e[0].kill();
178
- };
179
- }), () => {
180
- window.removeEventListener("resize", s);
149
+ return () => {
150
+ i[0] && i[0].kill();
181
151
  };
152
+ });
182
153
  }, []), {
183
154
  MOBILE_BREAKPOINT: 930,
184
- containerRef: V,
185
- carouselRef: t,
186
- imageRefs: C,
155
+ containerRef: G,
156
+ carouselRef: e,
157
+ imageRefs: p,
187
158
  descriptionRef: I,
188
- descriptionItemRef: H,
189
- progressButtonContainerRef: O,
190
- visible: ee,
159
+ descriptionItemRef: A,
160
+ progressButtonContainerRef: V,
161
+ visible: Z,
191
162
  cardSizes: f,
192
- handleCustomPrevClick: X,
193
- handleCustomNextClick: Y,
194
- current: l,
195
- mobileCardIndex: J,
196
- xLargeCardIndex: Q
163
+ handleCustomPrevClick: Q,
164
+ handleCustomNextClick: X,
165
+ current: d,
166
+ mobileCardIndex: j,
167
+ xLargeCardIndex: J
197
168
  };
198
169
  };
199
170
  export {
200
- de as useComplexImageCarousel
171
+ dt as useComplexImageCarousel
201
172
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../Button/Button.cjs.js"),s=require("../Typography/Typography.cjs.js"),c=require("../../utils/cn/cn.cjs.js"),a=require("./productGalleryCard.module.css.cjs.js"),m=({name:i,price:u,image:d,link:p,buttons:t,isHoverable:n=!0})=>e.jsxs("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:a.default.root,children:[e.jsxs("div",{className:a.default.productInfo,children:[e.jsx(s.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:a.default.title,children:i}),e.jsx(s.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:a.default.price,children:u})]}),e.jsx("img",{src:d,alt:"product image",className:a.default.productImage}),e.jsx("div",{className:c.cn(a.default.buttonContainerDesktop,n&&a.default.hoverableButtons),children:t.map((r,l)=>e.jsx(o.Button,{size:"sm",...r,children:r.label},l))}),e.jsx("div",{className:c.cn(a.default.buttonContainerMobile,n&&a.default.hoverableButtons),children:t.map((r,l)=>e.jsx(o.Button,{size:"xs",...r,children:r.label},l))})]});exports.ProductGalleryCard=m;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("../Button/Button.cjs.js"),s=require("../Typography/Typography.cjs.js"),c=require("../../utils/cn/cn.cjs.js"),a=require("./productGalleryCard.module.css.cjs.js"),m=({name:i,price:u,image:d,link:p,buttons:t,isHoverable:n=!0})=>e.jsxs("a",{href:p,rel:"noopener noreferrer",className:a.default.root,children:[e.jsxs("div",{className:a.default.productInfo,children:[e.jsx(s.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:a.default.title,children:i}),e.jsx(s.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:a.default.price,children:u})]}),e.jsx("img",{src:d,alt:"product image",className:a.default.productImage}),e.jsx("div",{className:c.cn(a.default.buttonContainerDesktop,n&&a.default.hoverableButtons),children:t.map((r,l)=>e.jsx(o.Button,{size:"sm",...r,children:r.label},l))}),e.jsx("div",{className:c.cn(a.default.buttonContainerMobile,n&&a.default.hoverableButtons),children:t.map((r,l)=>e.jsx(o.Button,{size:"xs",...r,children:r.label},l))})]});exports.ProductGalleryCard=m;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as i, jsx as r } from "react/jsx-runtime";
3
- import { Button as n } from "../Button/Button.es.js";
4
- import { Typography as s } from "../Typography/Typography.es.js";
3
+ import { Button as s } from "../Button/Button.es.js";
4
+ import { Typography as n } from "../Typography/Typography.es.js";
5
5
  import { cn as m } from "../../utils/cn/cn.es.js";
6
6
  import e from "./productGalleryCard.module.css.es.js";
7
7
  const v = ({
@@ -9,16 +9,16 @@ const v = ({
9
9
  price: d,
10
10
  image: p,
11
11
  link: h,
12
- buttons: t,
13
- isHoverable: o = !0
14
- }) => /* @__PURE__ */ i("a", { href: h, target: "_blank", rel: "noopener noreferrer", className: e.root, children: [
12
+ buttons: o,
13
+ isHoverable: t = !0
14
+ }) => /* @__PURE__ */ i("a", { href: h, rel: "noopener noreferrer", className: e.root, children: [
15
15
  /* @__PURE__ */ i("div", { className: e.productInfo, children: [
16
- /* @__PURE__ */ r(s, { defaultVariant: "labelXl", mobileVariant: "labelLg", className: e.title, children: c }),
17
- /* @__PURE__ */ r(s, { defaultVariant: "labelXl", mobileVariant: "labelLg", className: e.price, children: d })
16
+ /* @__PURE__ */ r(n, { defaultVariant: "labelXl", mobileVariant: "labelLg", className: e.title, children: c }),
17
+ /* @__PURE__ */ r(n, { defaultVariant: "labelXl", mobileVariant: "labelLg", className: e.price, children: d })
18
18
  ] }),
19
19
  /* @__PURE__ */ r("img", { src: p, alt: "product image", className: e.productImage }),
20
- /* @__PURE__ */ r("div", { className: m(e.buttonContainerDesktop, o && e.hoverableButtons), children: t.map((a, l) => /* @__PURE__ */ r(n, { size: "sm", ...a, children: a.label }, l)) }),
21
- /* @__PURE__ */ r("div", { className: m(e.buttonContainerMobile, o && e.hoverableButtons), children: t.map((a, l) => /* @__PURE__ */ r(n, { size: "xs", ...a, children: a.label }, l)) })
20
+ /* @__PURE__ */ r("div", { className: m(e.buttonContainerDesktop, t && e.hoverableButtons), children: o.map((a, l) => /* @__PURE__ */ r(s, { size: "sm", ...a, children: a.label }, l)) }),
21
+ /* @__PURE__ */ r("div", { className: m(e.buttonContainerMobile, t && e.hoverableButtons), children: o.map((a, l) => /* @__PURE__ */ r(s, { size: "xs", ...a, children: a.label }, l)) })
22
22
  ] });
23
23
  export {
24
24
  v as ProductGalleryCard