@zenpatient-org/healthspan-marketing-ui 0.1.126 → 0.1.128
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 -28
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/useComplexImageCarousel.es.js +121 -91
- package/dist/components/HighlightedTitle/HighlightedTitle.cjs.js +1 -1
- package/dist/components/HighlightedTitle/HighlightedTitle.es.js +14 -14
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/LongevityPathways/LongevityPathways.cjs.js +1 -1
- package/dist/modules/LongevityPathways/LongevityPathways.es.js +24 -14
- package/dist/modules/LongevityPathways/longevityPathways.module.css.cjs.js +1 -1
- package/dist/modules/LongevityPathways/longevityPathways.module.css.es.js +5 -3
- package/dist/modules/ScienceHero/ScienceHero.cjs.js +1 -0
- package/dist/modules/ScienceHero/ScienceHero.d.ts +10 -0
- package/dist/modules/ScienceHero/ScienceHero.es.js +79 -0
- package/dist/modules/ScienceHero/ScienceHeroCursor.cjs.js +1 -0
- package/dist/modules/ScienceHero/ScienceHeroCursor.d.ts +9 -0
- package/dist/modules/ScienceHero/ScienceHeroCursor.es.js +84 -0
- package/dist/modules/ScienceHero/index.d.ts +1 -0
- package/dist/modules/ScienceHero/scienceHero.module.css.cjs.js +1 -0
- package/dist/modules/ScienceHero/scienceHero.module.css.es.js +41 -0
- package/dist/node_modules/gsap/Draggable.cjs.js +1 -0
- package/dist/node_modules/gsap/Draggable.es.js +605 -0
- package/dist/pageComponents/StillHaveQuestions/StillHaveQuestions.cjs.js +1 -1
- package/dist/pageComponents/StillHaveQuestions/StillHaveQuestions.es.js +7 -7
- package/package.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"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"),
|
|
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,51 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i, jsxs as c } from "react/jsx-runtime";
|
|
2
3
|
import { cn as s } from "../../../utils/cn/cn.es.js";
|
|
3
|
-
import { ProgressButton as
|
|
4
|
-
import { Typography as
|
|
5
|
-
import { useComplexImageCarousel as
|
|
4
|
+
import { ProgressButton as y } from "../../ProgressButton/ProgressButton.es.js";
|
|
5
|
+
import { Typography as m } from "../../Typography/Typography.es.js";
|
|
6
|
+
import { useComplexImageCarousel as x } from "../useComplexImageCarousel.es.js";
|
|
6
7
|
import e from "./complexImageCarousel.module.css.es.js";
|
|
7
8
|
const S = ({ images: o }) => {
|
|
8
9
|
const {
|
|
9
|
-
containerRef:
|
|
10
|
-
carouselRef:
|
|
11
|
-
imageRefs:
|
|
12
|
-
descriptionRef:
|
|
13
|
-
descriptionItemRef:
|
|
14
|
-
progressButtonContainerRef:
|
|
10
|
+
containerRef: f,
|
|
11
|
+
carouselRef: p,
|
|
12
|
+
imageRefs: h,
|
|
13
|
+
descriptionRef: u,
|
|
14
|
+
descriptionItemRef: g,
|
|
15
|
+
progressButtonContainerRef: C,
|
|
15
16
|
visible: r,
|
|
16
17
|
cardSizes: a,
|
|
17
|
-
handleCustomPrevClick:
|
|
18
|
-
handleCustomNextClick:
|
|
19
|
-
current:
|
|
18
|
+
handleCustomPrevClick: N,
|
|
19
|
+
handleCustomNextClick: v,
|
|
20
|
+
current: w,
|
|
20
21
|
mobileCardIndex: n,
|
|
21
22
|
xLargeCardIndex: d
|
|
22
|
-
} =
|
|
23
|
-
return /* @__PURE__ */ i("div", { className: e.root, children: /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */ i("div", { ref:
|
|
23
|
+
} = x({ images: o });
|
|
24
|
+
return /* @__PURE__ */ i("div", { className: e.root, children: /* @__PURE__ */ c("div", { ref: f, className: e.container, children: [
|
|
25
|
+
/* @__PURE__ */ i("div", { ref: p, className: e.carouselArea, children: r.length > 0 && r.map((b, t) => /* @__PURE__ */ i(
|
|
25
26
|
"div",
|
|
26
27
|
{
|
|
27
28
|
className: s(e.slideContainer, e[`size-${a[t]}`]),
|
|
28
|
-
ref: (
|
|
29
|
-
|
|
29
|
+
ref: (l) => {
|
|
30
|
+
l && (h.current[t] = l);
|
|
30
31
|
},
|
|
31
|
-
"data-flip-id": `slide-${(
|
|
32
|
+
"data-flip-id": `slide-${(w + t) % o.length}`,
|
|
32
33
|
"data-size": a[t],
|
|
33
|
-
children: /* @__PURE__ */ i("img", { src:
|
|
34
|
+
children: /* @__PURE__ */ i("img", { src: b.image, alt: `Slide ${t + 1}`, className: e.image })
|
|
34
35
|
},
|
|
35
|
-
|
|
36
|
+
t + 1
|
|
36
37
|
)) }),
|
|
37
|
-
/* @__PURE__ */ i("div", { ref:
|
|
38
|
-
/* @__PURE__ */ i(
|
|
39
|
-
/* @__PURE__ */ i(
|
|
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 }),
|
|
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 })
|
|
40
41
|
] }) }),
|
|
41
|
-
/* @__PURE__ */ i("div", { ref:
|
|
42
|
-
|
|
42
|
+
/* @__PURE__ */ i("div", { ref: C, className: e.progressButtonContainer, children: /* @__PURE__ */ i(
|
|
43
|
+
y,
|
|
43
44
|
{
|
|
44
45
|
left: {
|
|
45
|
-
onClick:
|
|
46
|
+
onClick: N
|
|
46
47
|
},
|
|
47
48
|
right: {
|
|
48
|
-
onClick:
|
|
49
|
+
onClick: v
|
|
49
50
|
},
|
|
50
51
|
className: s("progress-buttons", e.progressButton)
|
|
51
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("../../node_modules/@gsap/react/src/index.cjs.js"),i=require("../../node_modules/gsap/index.cjs.js"),H=require("../../node_modules/gsap/Flip.cjs.js"),T=require("../../node_modules/gsap/Draggable.cjs.js"),s=require("react");i.gsap.registerPlugin(H.Flip);i.gsap.registerPlugin(T.Draggable);const Y=({images:c})=>{const[u,M]=s.useState(0),b=s.useRef(u);b.current=u;const[R,P]=s.useState(!1),[L,I]=s.useState(0),j=s.useRef(null),t=s.useRef(null),g=s.useRef([]),y=s.useRef(null),k=s.useRef(null),q=s.useRef(null),B=s.useRef(null),a=["atom","small","medium","large","medium","small","atom"],A=["atom","small","medium","large","x-large","large","medium","small","atom"],[d,G]=s.useState(typeof window<"u"&&window.innerWidth<=768?a:A),N=a.indexOf("large"),V=d.indexOf("x-large"),E=i.gsap.matchMedia(),f=s.useCallback(r=>{var x,p,F,O;if(!g.current.length)return;I(((x=t.current)==null?void 0:x.offsetHeight)||0);const n=(p=t.current)==null?void 0:p.querySelector('[data-size="x-large"]'),o=n==null?void 0:n.getBoundingClientRect(),e=(F=t.current)==null?void 0:F.querySelector('[data-size="large"]'),h=e==null?void 0:e.getBoundingClientRect();E.add("(max-width: 768px",()=>{var W;if(i.gsap.set(t.current,{height:L||((W=t.current)==null?void 0:W.offsetHeight)||"auto"}),!h)return;const l=window.innerWidth/2,m=h.right-h.width/2,S=l-m;if(i.gsap.set(t.current,{x:`+=${S}`}),!q.current)return;const w=q.current.querySelector(".progress-buttons");if(w){const C=w.getBoundingClientRect(),z=C.left+C.width/2,D=l-z;i.gsap.set(w,{x:`+=${D}`})}const $=l-h.width/2;i.gsap.set(y.current,{width:h.width,marginLeft:$}),g.current.forEach((C,z)=>{C&&z<a.length&&(a.forEach(D=>{C.classList.remove(`size-${D}`)}),C.classList.add(`size-${a[z]}`))})}),E.add("(min-width: 769px",()=>{var l,m;I(((l=t.current)==null?void 0:l.offsetHeight)||0),i.gsap.set(t.current,{height:L||((m=t.current)==null?void 0:m.offsetHeight)||"auto"}),i.gsap.set(y.current,{width:o?o.width:"auto",marginLeft:o?o.left:0}),g.current.forEach((S,w)=>{S&&w<d.length&&(d.forEach($=>{S.classList.remove(`size-${$}`)}),S.classList.add(`size-${d[w]}`))})}),(((O=y.current)==null?void 0:O.querySelectorAll(".description-item"))||[]).forEach((l,m)=>{l.style.zIndex=`${c.length-m}`}),P(!0),B.current=H.Flip.getState(g.current,{props:"width,height",simple:!0}),M(r),requestAnimationFrame(()=>{H.Flip.from(B.current,{duration:.5,ease:"power3.out",targets:g.current,scale:!1,nested:!0,onComplete:()=>{P(!1)}}),i.gsap.fromTo(k.current,{opacity:0,y:20},{opacity:1,y:0,duration:.5,ease:"power3.out",onComplete:()=>{B.current=null}})})},[d,a,c.length,L]),J=()=>{if(R)return;const r=(u-1+c.length)%c.length;f(r)},K=()=>{if(R)return;const r=(u+1)%c.length;f(r)};function Q(r,n){const o=[];if(typeof window<"u"&&window.innerWidth<=768)for(let e=0;e<a.length;e++)o.push(r[(n+e)%r.length]);else for(let e=0;e<d.length;e++)o.push(r[(n+e)%r.length]);return o}const U=Q(c,u);return X.useGSAP(()=>{f(u),t.current&&i.gsap.set(t.current,{clearProps:"all"});const r=()=>{G(window.innerWidth<=768?a:A),I(0),f(u)};window.addEventListener("resize",r);const n=t.current;if(n)return E.add("(max-width: 768px)",()=>{const o={x:0},e=T.Draggable.create(n,{type:"x",onDragStart:()=>{R||(o.x=n.scrollLeft+n.getBoundingClientRect().left)},onDragEnd:()=>{const v=n.scrollLeft+n.getBoundingClientRect().left-o.x,x=20;if(v>x){if(R)return;const p=(b.current-1+c.length)%c.length;f(p)}else if(v<-x){if(R)return;const p=(b.current+1)%c.length;f(p)}}});return()=>{e[0]&&e[0].kill()}}),()=>{window.removeEventListener("resize",r)}},[]),{containerRef:j,carouselRef:t,imageRefs:g,descriptionRef:y,descriptionItemRef:k,progressButtonContainerRef:q,visible:U,cardSizes:d,handleCustomPrevClick:J,handleCustomNextClick:K,current:u,mobileCardIndex:N,xLargeCardIndex:V}};exports.useComplexImageCarousel=Y;
|
|
@@ -1,72 +1,77 @@
|
|
|
1
|
-
import { useGSAP as
|
|
2
|
-
import { gsap as
|
|
3
|
-
import { Flip as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { useGSAP as Y } from "../../node_modules/@gsap/react/src/index.es.js";
|
|
2
|
+
import { gsap as o } from "../../node_modules/gsap/index.es.js";
|
|
3
|
+
import { Flip as A } from "../../node_modules/gsap/Flip.es.js";
|
|
4
|
+
import { Draggable as G } from "../../node_modules/gsap/Draggable.es.js";
|
|
5
|
+
import { useState as L, useRef as a, useCallback as Z } from "react";
|
|
6
|
+
o.registerPlugin(A);
|
|
7
|
+
o.registerPlugin(G);
|
|
8
|
+
const st = ({ images: i }) => {
|
|
9
|
+
const [c, M] = L(0), B = a(c);
|
|
10
|
+
B.current = c;
|
|
11
|
+
const [x, P] = L(!1), [E, I] = L(0), N = a(null), e = a(null), f = a([]), z = a(null), W = a(null), b = a(null), v = a(null), l = ["atom", "small", "medium", "large", "medium", "small", "atom"], D = ["atom", "small", "medium", "large", "x-large", "large", "medium", "small", "atom"], [d, V] = L(
|
|
12
|
+
typeof window < "u" && window.innerWidth <= 768 ? l : D
|
|
13
|
+
), j = l.indexOf("large"), J = d.indexOf("x-large"), $ = o.matchMedia(), g = Z(
|
|
14
|
+
(r) => {
|
|
15
|
+
var R, m, O, F;
|
|
13
16
|
if (!f.current.length) return;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
I(((R = e.current) == null ? void 0 : R.offsetHeight) || 0);
|
|
18
|
+
const n = (m = e.current) == null ? void 0 : m.querySelector('[data-size="x-large"]'), s = n == null ? void 0 : n.getBoundingClientRect(), t = (O = e.current) == null ? void 0 : O.querySelector('[data-size="large"]'), h = t == null ? void 0 : t.getBoundingClientRect();
|
|
19
|
+
$.add("(max-width: 768px", () => {
|
|
20
|
+
var T;
|
|
21
|
+
if (o.set(e.current, {
|
|
22
|
+
height: E || ((T = e.current) == null ? void 0 : T.offsetHeight) || "auto"
|
|
23
|
+
}), !h) return;
|
|
24
|
+
const u = window.innerWidth / 2, p = h.right - h.width / 2, S = u - p;
|
|
25
|
+
if (o.set(e.current, {
|
|
26
|
+
x: `+=${S}`
|
|
27
|
+
}), !b.current) return;
|
|
28
|
+
const w = b.current.querySelector(
|
|
25
29
|
".progress-buttons"
|
|
26
30
|
);
|
|
27
|
-
if (
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
x: `+=${
|
|
31
|
+
if (w) {
|
|
32
|
+
const C = w.getBoundingClientRect(), y = C.left + C.width / 2, q = u - y;
|
|
33
|
+
o.set(w, {
|
|
34
|
+
x: `+=${q}`
|
|
31
35
|
});
|
|
32
36
|
}
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
width:
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
const k = u - h.width / 2;
|
|
38
|
+
o.set(z.current, {
|
|
39
|
+
width: h.width,
|
|
40
|
+
marginLeft: k
|
|
41
|
+
}), f.current.forEach((C, y) => {
|
|
42
|
+
C && y < l.length && (l.forEach((q) => {
|
|
43
|
+
C.classList.remove(`size-${q}`);
|
|
44
|
+
}), C.classList.add(`size-${l[y]}`));
|
|
38
45
|
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
height: "auto"
|
|
43
|
-
|
|
46
|
+
}), $.add("(min-width: 769px", () => {
|
|
47
|
+
var u, p;
|
|
48
|
+
I(((u = e.current) == null ? void 0 : u.offsetHeight) || 0), o.set(e.current, {
|
|
49
|
+
height: E || ((p = e.current) == null ? void 0 : p.offsetHeight) || "auto"
|
|
50
|
+
}), o.set(z.current, {
|
|
51
|
+
width: s ? s.width : "auto",
|
|
52
|
+
marginLeft: s ? s.left : 0
|
|
53
|
+
}), f.current.forEach((S, w) => {
|
|
54
|
+
S && w < d.length && (d.forEach((k) => {
|
|
55
|
+
S.classList.remove(`size-${k}`);
|
|
56
|
+
}), S.classList.add(`size-${d[w]}`));
|
|
44
57
|
});
|
|
45
|
-
(((
|
|
46
|
-
|
|
47
|
-
}),
|
|
58
|
+
}), (((F = z.current) == null ? void 0 : F.querySelectorAll(".description-item")) || []).forEach((u, p) => {
|
|
59
|
+
u.style.zIndex = `${i.length - p}`;
|
|
60
|
+
}), P(!0), v.current = A.getState(f.current, {
|
|
48
61
|
props: "width,height",
|
|
49
62
|
simple: !0
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
t.classList.remove(`size-${g}`);
|
|
53
|
-
}), t.classList.add(`size-${o[r]}`));
|
|
54
|
-
}) : f.current.forEach((t, r) => {
|
|
55
|
-
t && r < u.length && (u.forEach((g) => {
|
|
56
|
-
t.classList.remove(`size-${g}`);
|
|
57
|
-
}), t.classList.add(`size-${u[r]}`));
|
|
58
|
-
}), requestAnimationFrame(() => {
|
|
59
|
-
x.from(z.current, {
|
|
63
|
+
}), M(r), requestAnimationFrame(() => {
|
|
64
|
+
A.from(v.current, {
|
|
60
65
|
duration: 0.5,
|
|
61
66
|
ease: "power3.out",
|
|
62
67
|
targets: f.current,
|
|
63
68
|
scale: !1,
|
|
64
69
|
nested: !0,
|
|
65
70
|
onComplete: () => {
|
|
66
|
-
|
|
71
|
+
P(!1);
|
|
67
72
|
}
|
|
68
|
-
}),
|
|
69
|
-
|
|
73
|
+
}), o.fromTo(
|
|
74
|
+
W.current,
|
|
70
75
|
{
|
|
71
76
|
opacity: 0,
|
|
72
77
|
y: 20
|
|
@@ -77,57 +82,82 @@ const _ = ({ images: a }) => {
|
|
|
77
82
|
duration: 0.5,
|
|
78
83
|
ease: "power3.out",
|
|
79
84
|
onComplete: () => {
|
|
80
|
-
|
|
85
|
+
v.current = null;
|
|
81
86
|
}
|
|
82
87
|
}
|
|
83
88
|
);
|
|
84
89
|
});
|
|
85
90
|
},
|
|
86
|
-
[
|
|
87
|
-
),
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
if (
|
|
93
|
-
const
|
|
94
|
-
|
|
91
|
+
[d, l, i.length, E]
|
|
92
|
+
), K = () => {
|
|
93
|
+
if (x) return;
|
|
94
|
+
const r = (c - 1 + i.length) % i.length;
|
|
95
|
+
g(r);
|
|
96
|
+
}, Q = () => {
|
|
97
|
+
if (x) return;
|
|
98
|
+
const r = (c + 1) % i.length;
|
|
99
|
+
g(r);
|
|
95
100
|
};
|
|
96
|
-
function
|
|
97
|
-
const
|
|
101
|
+
function U(r, n) {
|
|
102
|
+
const s = [];
|
|
98
103
|
if (typeof window < "u" && window.innerWidth <= 768)
|
|
99
|
-
for (let
|
|
100
|
-
|
|
104
|
+
for (let t = 0; t < l.length; t++)
|
|
105
|
+
s.push(r[(n + t) % r.length]);
|
|
101
106
|
else
|
|
102
|
-
for (let
|
|
103
|
-
|
|
104
|
-
return
|
|
107
|
+
for (let t = 0; t < d.length; t++)
|
|
108
|
+
s.push(r[(n + t) % r.length]);
|
|
109
|
+
return s;
|
|
105
110
|
}
|
|
106
|
-
const
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
}, 600);
|
|
112
|
-
return window.addEventListener("resize", e), () => {
|
|
113
|
-
window.removeEventListener("resize", e);
|
|
111
|
+
const X = U(i, c);
|
|
112
|
+
return Y(() => {
|
|
113
|
+
g(c), e.current && o.set(e.current, { clearProps: "all" });
|
|
114
|
+
const r = () => {
|
|
115
|
+
V(window.innerWidth <= 768 ? l : D), I(0), g(c);
|
|
114
116
|
};
|
|
117
|
+
window.addEventListener("resize", r);
|
|
118
|
+
const n = e.current;
|
|
119
|
+
if (n)
|
|
120
|
+
return $.add("(max-width: 768px)", () => {
|
|
121
|
+
const s = { x: 0 }, t = G.create(n, {
|
|
122
|
+
type: "x",
|
|
123
|
+
onDragStart: () => {
|
|
124
|
+
x || (s.x = n.scrollLeft + n.getBoundingClientRect().left);
|
|
125
|
+
},
|
|
126
|
+
onDragEnd: () => {
|
|
127
|
+
const H = n.scrollLeft + n.getBoundingClientRect().left - s.x, R = 20;
|
|
128
|
+
if (H > R) {
|
|
129
|
+
if (x) return;
|
|
130
|
+
const m = (B.current - 1 + i.length) % i.length;
|
|
131
|
+
g(m);
|
|
132
|
+
} else if (H < -R) {
|
|
133
|
+
if (x) return;
|
|
134
|
+
const m = (B.current + 1) % i.length;
|
|
135
|
+
g(m);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
return () => {
|
|
140
|
+
t[0] && t[0].kill();
|
|
141
|
+
};
|
|
142
|
+
}), () => {
|
|
143
|
+
window.removeEventListener("resize", r);
|
|
144
|
+
};
|
|
115
145
|
}, []), {
|
|
116
|
-
containerRef:
|
|
117
|
-
carouselRef:
|
|
146
|
+
containerRef: N,
|
|
147
|
+
carouselRef: e,
|
|
118
148
|
imageRefs: f,
|
|
119
|
-
descriptionRef:
|
|
120
|
-
descriptionItemRef:
|
|
121
|
-
progressButtonContainerRef:
|
|
122
|
-
visible:
|
|
123
|
-
cardSizes:
|
|
124
|
-
handleCustomPrevClick:
|
|
125
|
-
handleCustomNextClick:
|
|
126
|
-
current:
|
|
127
|
-
mobileCardIndex:
|
|
128
|
-
xLargeCardIndex:
|
|
149
|
+
descriptionRef: z,
|
|
150
|
+
descriptionItemRef: W,
|
|
151
|
+
progressButtonContainerRef: b,
|
|
152
|
+
visible: X,
|
|
153
|
+
cardSizes: d,
|
|
154
|
+
handleCustomPrevClick: K,
|
|
155
|
+
handleCustomNextClick: Q,
|
|
156
|
+
current: c,
|
|
157
|
+
mobileCardIndex: j,
|
|
158
|
+
xLargeCardIndex: J
|
|
129
159
|
};
|
|
130
160
|
};
|
|
131
161
|
export {
|
|
132
|
-
|
|
162
|
+
st as useComplexImageCarousel
|
|
133
163
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../Typography/Typography.cjs.js"),s=require("../../utils/cn/cn.cjs.js"),t=require("./highlightedTitle.module.css.cjs.js"),h=({title:i,label:r,className:l,defaultVariant:n="displayMd",as:d="h2",mobileVariant:o="headingLg",colorScheme:c="light"})=>e.jsxs("div",{"data-scheme":c,className:s.cn(t.default.root,l),children:[r&&e.jsx(a.Typography,{as:"p",defaultVariant:"labelSm",emphasis:!0,className:t.default.tag,children:r}),e.jsx(a.Typography,{as:d,defaultVariant:n,mobileVariant:o,className:s.cn(t.default.title,{[t.default.taggedTitle]:!!r}),children:typeof i=="string"?e.jsx("p",{children:i}):i})]});exports.HighlightedTitle=h;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsxs as p, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { Typography as i } from "../Typography/Typography.es.js";
|
|
3
|
-
import { cn as
|
|
4
|
-
import
|
|
3
|
+
import { cn as s } from "../../utils/cn/cn.es.js";
|
|
4
|
+
import e from "./highlightedTitle.module.css.es.js";
|
|
5
5
|
const y = ({
|
|
6
|
-
title:
|
|
7
|
-
label:
|
|
6
|
+
title: r,
|
|
7
|
+
label: t,
|
|
8
8
|
className: o,
|
|
9
9
|
defaultVariant: m = "displayMd",
|
|
10
|
-
as:
|
|
11
|
-
mobileVariant:
|
|
12
|
-
colorScheme:
|
|
13
|
-
}) => /* @__PURE__ */ p("div", { "data-scheme":
|
|
14
|
-
|
|
10
|
+
as: d = "h2",
|
|
11
|
+
mobileVariant: h = "headingLg",
|
|
12
|
+
colorScheme: l = "light"
|
|
13
|
+
}) => /* @__PURE__ */ p("div", { "data-scheme": l, className: s(e.root, o), children: [
|
|
14
|
+
t && /* @__PURE__ */ a(i, { as: "p", defaultVariant: "labelSm", emphasis: !0, className: e.tag, children: t }),
|
|
15
15
|
/* @__PURE__ */ a(
|
|
16
16
|
i,
|
|
17
17
|
{
|
|
18
|
-
as:
|
|
18
|
+
as: d,
|
|
19
19
|
defaultVariant: m,
|
|
20
|
-
mobileVariant:
|
|
21
|
-
className:
|
|
22
|
-
[
|
|
20
|
+
mobileVariant: h,
|
|
21
|
+
className: s(e.title, {
|
|
22
|
+
[e.taggedTitle]: !!t
|
|
23
23
|
}),
|
|
24
|
-
children:
|
|
24
|
+
children: typeof r == "string" ? /* @__PURE__ */ a("p", { children: r }) : r
|
|
25
25
|
}
|
|
26
26
|
)
|
|
27
27
|
] });
|