@zenpatient-org/healthspan-marketing-ui 0.1.152 → 0.1.154
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.
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.es.js +29 -27
- package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.es.js +18 -16
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.es.js +119 -148
- package/dist/components/ProductGalleryCard/ProductGalleryCard.cjs.js +1 -1
- package/dist/components/ProductGalleryCard/ProductGalleryCard.es.js +9 -9
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/LongevityPathways/longevityPathways.module.css.cjs.js +1 -1
- package/dist/modules/LongevityPathways/longevityPathways.module.css.es.js +9 -7
- package/dist/pageComponents/CallToActionDefault/CallToActionDefault.cjs.js +1 -1
- package/dist/pageComponents/CallToActionDefault/CallToActionDefault.es.js +1 -1
- package/dist/pageComponents/LabsHero/LabsHero.cjs.js +1 -1
- package/dist/pageComponents/LabsHero/LabsHero.d.ts +4 -1
- package/dist/pageComponents/LabsHero/LabsHero.es.js +28 -46
- 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.
|
|
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 {
|
|
3
|
-
import { cn as
|
|
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:
|
|
8
|
+
const L = ({ images: a }) => {
|
|
9
9
|
const {
|
|
10
|
-
MOBILE_BREAKPOINT:
|
|
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:
|
|
18
|
+
cardSizes: d,
|
|
19
19
|
handleCustomPrevClick: v,
|
|
20
20
|
handleCustomNextClick: w,
|
|
21
21
|
current: b,
|
|
22
|
-
mobileCardIndex:
|
|
23
|
-
xLargeCardIndex:
|
|
24
|
-
} = R({ images:
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
"div",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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:
|
|
54
|
+
className: o("progress-buttons", e.progressButton)
|
|
53
55
|
}
|
|
54
56
|
) })
|
|
55
|
-
] })
|
|
57
|
+
] });
|
|
56
58
|
};
|
|
57
59
|
export {
|
|
58
60
|
L as ComplexCarousel
|
package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="complexImageCarousel-
|
|
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;
|
package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.es.js
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
const e = "complexImageCarousel-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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:
|
|
11
|
-
descriptionItem:
|
|
12
|
-
progressButtonContainer:
|
|
13
|
-
progressButton:
|
|
11
|
+
description: l,
|
|
12
|
+
descriptionItem: r,
|
|
13
|
+
progressButtonContainer: a,
|
|
14
|
+
progressButton: m
|
|
14
15
|
};
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
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
|
|
3
|
-
import { gsap as
|
|
4
|
-
import { Flip as
|
|
5
|
-
import { Draggable as
|
|
6
|
-
import { useState as x, useRef as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
for (;
|
|
13
|
-
|
|
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 [
|
|
16
|
-
|
|
17
|
-
const [
|
|
18
|
-
typeof window < "u" && window.innerWidth <= 930 ?
|
|
19
|
-
),
|
|
20
|
-
(
|
|
21
|
-
var
|
|
22
|
-
if (!
|
|
23
|
-
let
|
|
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 =
|
|
26
|
-
|
|
25
|
+
const c = e.current.querySelector('[data-size="large"]');
|
|
26
|
+
s = c ? c.offsetHeight : 0;
|
|
27
27
|
} else {
|
|
28
|
-
const c =
|
|
29
|
-
|
|
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 (
|
|
34
|
-
height:
|
|
35
|
-
})),
|
|
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
|
-
}), !
|
|
38
|
-
const
|
|
39
|
-
|
|
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
|
|
46
|
-
const { isDesktop:
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
x: `+=${
|
|
54
|
-
})
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
), (((
|
|
84
|
-
c.style.zIndex = `${
|
|
85
|
-
}),
|
|
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
|
-
}),
|
|
88
|
-
|
|
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
|
-
|
|
86
|
+
z(!1);
|
|
94
87
|
}
|
|
95
|
-
}),
|
|
96
|
-
|
|
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
|
-
|
|
100
|
+
B.current = null;
|
|
108
101
|
}
|
|
109
102
|
}
|
|
110
103
|
);
|
|
111
104
|
});
|
|
112
105
|
},
|
|
113
|
-
[f,
|
|
114
|
-
),
|
|
115
|
-
if (
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
if (
|
|
120
|
-
const
|
|
121
|
-
|
|
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
|
|
124
|
-
const
|
|
116
|
+
function Y(t, s) {
|
|
117
|
+
const i = [];
|
|
125
118
|
if (typeof window < "u" && window.innerWidth <= 930)
|
|
126
|
-
for (let
|
|
127
|
-
|
|
119
|
+
for (let n = 0; n < l.length; n++)
|
|
120
|
+
i.push(t[(s + n) % t.length]);
|
|
128
121
|
else
|
|
129
|
-
for (let
|
|
130
|
-
|
|
131
|
-
return
|
|
122
|
+
for (let n = 0; n < f.length; n++)
|
|
123
|
+
i.push(t[(s + n) % t.length]);
|
|
124
|
+
return i;
|
|
132
125
|
}
|
|
133
|
-
const
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
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:
|
|
185
|
-
carouselRef:
|
|
186
|
-
imageRefs:
|
|
155
|
+
containerRef: G,
|
|
156
|
+
carouselRef: e,
|
|
157
|
+
imageRefs: p,
|
|
187
158
|
descriptionRef: I,
|
|
188
|
-
descriptionItemRef:
|
|
189
|
-
progressButtonContainerRef:
|
|
190
|
-
visible:
|
|
159
|
+
descriptionItemRef: A,
|
|
160
|
+
progressButtonContainerRef: V,
|
|
161
|
+
visible: Z,
|
|
191
162
|
cardSizes: f,
|
|
192
|
-
handleCustomPrevClick:
|
|
193
|
-
handleCustomNextClick:
|
|
194
|
-
current:
|
|
195
|
-
mobileCardIndex:
|
|
196
|
-
xLargeCardIndex:
|
|
163
|
+
handleCustomPrevClick: Q,
|
|
164
|
+
handleCustomNextClick: X,
|
|
165
|
+
current: d,
|
|
166
|
+
mobileCardIndex: j,
|
|
167
|
+
xLargeCardIndex: J
|
|
197
168
|
};
|
|
198
169
|
};
|
|
199
170
|
export {
|
|
200
|
-
|
|
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,
|
|
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
|
|
4
|
-
import { Typography as
|
|
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:
|
|
13
|
-
isHoverable:
|
|
14
|
-
}) => /* @__PURE__ */ i("a", { href: h,
|
|
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(
|
|
17
|
-
/* @__PURE__ */ r(
|
|
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,
|
|
21
|
-
/* @__PURE__ */ r("div", { className: m(e.buttonContainerMobile,
|
|
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
|