@zenpatient-org/healthspan-marketing-ui 0.1.43 → 0.1.45
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/AnchorLinks/AnchorLinks.cjs.js +1 -1
- package/dist/components/AnchorLinks/AnchorLinks.es.js +14 -6
- package/dist/components/AnchorLinks/types.d.ts +4 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.d.ts +5 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.es.js +57 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.es.js +24 -0
- package/dist/components/ComplexImageCarousel/ComplexCarousel/index.d.ts +1 -0
- package/dist/components/ComplexImageCarousel/ComplexImageCarousel.cjs.js +1 -1
- package/dist/components/ComplexImageCarousel/ComplexImageCarousel.d.ts +1 -1
- package/dist/components/ComplexImageCarousel/ComplexImageCarousel.es.js +5 -55
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.d.ts +5 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.es.js +76 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/index.d.ts +1 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/simpleImageCarousel.module.css.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/simpleImageCarousel.module.css.es.js +15 -0
- package/dist/components/ComplexTooltip/ComplexTooltip.cjs.js +1 -1
- package/dist/components/ComplexTooltip/ComplexTooltip.d.ts +5 -2
- package/dist/components/ComplexTooltip/ComplexTooltip.es.js +34 -29
- package/dist/components/FAQComponent/FAQComponent.cjs.js +1 -1
- package/dist/components/FAQComponent/FAQComponent.es.js +1 -1
- package/dist/components/FAQComponent/components/index.d.ts +1 -1
- package/dist/components/FAQComponentItem/FAQComponentItem.cjs.js +1 -0
- package/dist/components/{FAQComponent/components/FAQComponentItem → FAQComponentItem}/FAQComponentItem.es.js +4 -4
- package/dist/components/FAQComponentItem/faqComponentItem.module.css.cjs.js +1 -0
- package/dist/components/FAQComponentItem/faqComponentItem.module.css.es.js +27 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.cjs.js +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.es.js +61 -46
- package/dist/components/StudyGridCard/StudyGridCard.cjs.js +1 -1
- package/dist/components/StudyGridCard/StudyGridCard.d.ts +10 -2
- package/dist/components/StudyGridCard/StudyGridCard.es.js +115 -60
- package/dist/components/StudyGridCard/studyGridCard.module.css.cjs.js +1 -1
- package/dist/components/StudyGridCard/studyGridCard.module.css.es.js +24 -12
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/ExpandingDetails/ExpandingDetails.cjs.js +1 -0
- package/dist/modules/ExpandingDetails/ExpandingDetails.d.ts +3 -0
- package/dist/modules/ExpandingDetails/ExpandingDetails.es.js +157 -0
- package/dist/modules/ExpandingDetails/expandingDetails.module.css.cjs.js +1 -0
- package/dist/modules/ExpandingDetails/expandingDetails.module.css.es.js +47 -0
- package/dist/modules/ExpandingDetails/index.d.ts +1 -0
- package/dist/modules/ExpandingDetails/types.d.ts +13 -0
- package/dist/modules/IndividualProductCard/IndividualProductCard.d.ts +2 -2
- package/dist/modules/TextBlockAnimated/TextBlockAnimated.cjs.js +1 -0
- package/dist/modules/TextBlockAnimated/TextBlockAnimated.es.js +54 -0
- package/dist/modules/TextBlockAnimated/index.d.ts +1 -0
- package/dist/modules/TextBlockAnimated/textBlockAnimated.module.css.cjs.js +1 -0
- package/dist/modules/TextBlockAnimated/textBlockAnimated.module.css.es.js +21 -0
- package/dist/node_modules/gsap/SplitText.cjs.js +9 -0
- package/dist/node_modules/gsap/SplitText.es.js +148 -0
- package/package.json +16 -1
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.cjs.js +0 -1
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.es.js +0 -24
- package/dist/components/FAQComponent/components/FAQComponentItem/FAQComponentItem.cjs.js +0 -1
- package/dist/components/FAQComponent/components/FAQComponentItem/faqComponentItem.module.css.cjs.js +0 -1
- package/dist/components/FAQComponent/components/FAQComponentItem/faqComponentItem.module.css.es.js +0 -27
- /package/dist/components/{FAQComponent/components/FAQComponentItem → FAQComponentItem}/FAQComponentItem.d.ts +0 -0
- /package/dist/components/{FAQComponent/components/FAQComponentItem → FAQComponentItem}/index.d.ts +0 -0
- /package/dist/components/{FAQComponent/components/FAQComponentItem → FAQComponentItem}/types.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("../Typography/Typography.cjs.js"),p=require("../../utils/cn/cn.cjs.js"),e=require("./anchorLinks.module.css.cjs.js"),h=({links:n,activeId:s,onClick:r})=>t.jsx("div",{className:e.default.root,children:n.map(({label:c,id:a,href:l,type:o,variant:u,emphasis:i})=>t.jsx("a",{className:p.cn(e.default.linkButton,{[e.default.active]:s===a}),href:l,"data-type":o,onClick:()=>r==null?void 0:r(a),children:t.jsx(d.Typography,{className:e.default.linkLabel,defaultVariant:u||"labelLg",emphasis:i??!0,children:c})},a))});exports.AnchorLinks=h;
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { cn as
|
|
2
|
+
import { Typography as c } from "../Typography/Typography.es.js";
|
|
3
|
+
import { cn as h } from "../../utils/cn/cn.es.js";
|
|
4
4
|
import r from "./anchorLinks.module.css.es.js";
|
|
5
|
-
const
|
|
5
|
+
const L = ({ links: m, activeId: s, onClick: a }) => /* @__PURE__ */ e("div", { className: r.root, children: m.map(({ label: o, id: t, href: l, type: p, variant: i, emphasis: n }) => /* @__PURE__ */ e(
|
|
6
6
|
"a",
|
|
7
7
|
{
|
|
8
|
-
className:
|
|
8
|
+
className: h(r.linkButton, {
|
|
9
9
|
[r.active]: s === t
|
|
10
10
|
}),
|
|
11
11
|
href: l,
|
|
12
12
|
"data-type": p,
|
|
13
13
|
onClick: () => a == null ? void 0 : a(t),
|
|
14
|
-
children: /* @__PURE__ */ e(
|
|
14
|
+
children: /* @__PURE__ */ e(
|
|
15
|
+
c,
|
|
16
|
+
{
|
|
17
|
+
className: r.linkLabel,
|
|
18
|
+
defaultVariant: i || "labelLg",
|
|
19
|
+
emphasis: n ?? !0,
|
|
20
|
+
children: o
|
|
21
|
+
}
|
|
22
|
+
)
|
|
15
23
|
},
|
|
16
24
|
t
|
|
17
25
|
)) });
|
|
18
26
|
export {
|
|
19
|
-
|
|
27
|
+
L as AnchorLinks
|
|
20
28
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { TypographyVariant } from '../Typography';
|
|
2
|
+
|
|
1
3
|
export declare enum EAnchorLinksTypes {
|
|
2
4
|
ENERGY = "energy",
|
|
3
5
|
SENESCENCE = "senescence",
|
|
@@ -9,6 +11,8 @@ export type TAnchorLink = {
|
|
|
9
11
|
id: string;
|
|
10
12
|
href: string;
|
|
11
13
|
type: EAnchorLinksTypes;
|
|
14
|
+
variant?: TypographyVariant;
|
|
15
|
+
emphasis?: boolean;
|
|
12
16
|
};
|
|
13
17
|
export type TAnchorLinksProps = {
|
|
14
18
|
links: TAnchorLink[];
|
|
@@ -0,0 +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"),u=require("../../Typography/Typography.cjs.js"),v=require("../useComplexImageCarousel.cjs.js"),r=require("./complexImageCarousel.module.css.cjs.js"),b=({images:a})=>{const{containerRef:m,carouselRef:f,imageRefs:p,descriptionRef:g,descriptionItemRef:h,progressButtonContainerRef:C,visible:s,cardSizes:n,handleCustomPrevClick:x,handleCustomNextClick:y,current:j,mobileCardIndex:o,xLargeCardIndex:l}=v.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((d,t)=>e.jsx("div",{className:i.cn(r.default.slideContainer,r.default[`size-${n[t]}`]),ref:c=>{c&&(p.current[t]=c)},"data-flip-id":`slide-${(j+t)%a.length}`,"data-size":n[t],children:e.jsx("img",{src:d.image,alt:`Slide ${t+1}`,className:r.default.image})},d.name))}),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:"headingXxs",children:typeof window<"u"&&window.innerWidth<=768?s[o].title:s[l].title}),e.jsx(u.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:C,className:r.default.progressButtonContainer,children:e.jsx(N.ProgressButton,{left:{onClick:x},right:{onClick:y},className:i.cn("progress-buttons",r.default.progressButton)})})]})})};exports.ComplexCarousel=b;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "../../../utils/cn/cn.es.js";
|
|
3
|
+
import { ProgressButton as x } from "../../ProgressButton/ProgressButton.es.js";
|
|
4
|
+
import { Typography as f } from "../../Typography/Typography.es.js";
|
|
5
|
+
import { useComplexImageCarousel as y } from "../useComplexImageCarousel.es.js";
|
|
6
|
+
import e from "./complexImageCarousel.module.css.es.js";
|
|
7
|
+
const S = ({ images: o }) => {
|
|
8
|
+
const {
|
|
9
|
+
containerRef: p,
|
|
10
|
+
carouselRef: h,
|
|
11
|
+
imageRefs: u,
|
|
12
|
+
descriptionRef: g,
|
|
13
|
+
descriptionItemRef: C,
|
|
14
|
+
progressButtonContainerRef: N,
|
|
15
|
+
visible: r,
|
|
16
|
+
cardSizes: a,
|
|
17
|
+
handleCustomPrevClick: v,
|
|
18
|
+
handleCustomNextClick: w,
|
|
19
|
+
current: b,
|
|
20
|
+
mobileCardIndex: n,
|
|
21
|
+
xLargeCardIndex: d
|
|
22
|
+
} = y({ images: o });
|
|
23
|
+
return /* @__PURE__ */ i("div", { className: e.root, children: /* @__PURE__ */ m("div", { ref: p, className: e.container, children: [
|
|
24
|
+
/* @__PURE__ */ i("div", { ref: h, className: e.carouselArea, children: r.length > 0 && r.map((l, t) => /* @__PURE__ */ i(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: s(e.slideContainer, e[`size-${a[t]}`]),
|
|
28
|
+
ref: (c) => {
|
|
29
|
+
c && (u.current[t] = c);
|
|
30
|
+
},
|
|
31
|
+
"data-flip-id": `slide-${(b + t) % o.length}`,
|
|
32
|
+
"data-size": a[t],
|
|
33
|
+
children: /* @__PURE__ */ i("img", { src: l.image, alt: `Slide ${t + 1}`, className: e.image })
|
|
34
|
+
},
|
|
35
|
+
l.name
|
|
36
|
+
)) }),
|
|
37
|
+
/* @__PURE__ */ i("div", { ref: g, className: e.description, children: /* @__PURE__ */ m("div", { ref: C, className: s("description-item", e.descriptionItem), children: [
|
|
38
|
+
/* @__PURE__ */ i(f, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingXxs", children: typeof window < "u" && window.innerWidth <= 768 ? r[n].title : r[d].title }),
|
|
39
|
+
/* @__PURE__ */ i(f, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: e.text, children: typeof window < "u" && window.innerWidth <= 768 ? r[n].description : r[d].description })
|
|
40
|
+
] }) }),
|
|
41
|
+
/* @__PURE__ */ i("div", { ref: N, className: e.progressButtonContainer, children: /* @__PURE__ */ i(
|
|
42
|
+
x,
|
|
43
|
+
{
|
|
44
|
+
left: {
|
|
45
|
+
onClick: v
|
|
46
|
+
},
|
|
47
|
+
right: {
|
|
48
|
+
onClick: w
|
|
49
|
+
},
|
|
50
|
+
className: s("progress-buttons", e.progressButton)
|
|
51
|
+
}
|
|
52
|
+
) })
|
|
53
|
+
] }) });
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
S as ComplexCarousel
|
|
57
|
+
};
|
package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.cjs.js
ADDED
|
@@ -0,0 +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;
|
package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.es.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
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: _,
|
|
5
|
+
"size-atom": "complexImageCarousel-module__size-atom___8IEXO",
|
|
6
|
+
"size-small": "complexImageCarousel-module__size-small___8Sjr3",
|
|
7
|
+
"size-medium": "complexImageCarousel-module__size-medium___Fi4B0",
|
|
8
|
+
"size-large": "complexImageCarousel-module__size-large___Kz59p",
|
|
9
|
+
"size-x-large": "complexImageCarousel-module__size-x-large___IGMf2",
|
|
10
|
+
description: s,
|
|
11
|
+
descriptionItem: l,
|
|
12
|
+
progressButtonContainer: r,
|
|
13
|
+
progressButton: a
|
|
14
|
+
};
|
|
15
|
+
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
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComplexCarousel } from './ComplexCarousel';
|
|
@@ -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 r=require("react/jsx-runtime"),o=require("./ComplexCarousel/ComplexCarousel.cjs.js"),s=require("./SimpleImageCarousel/SimpleImageCarousel.cjs.js"),u=({view:l,images:e})=>l==="simple"?r.jsx(s.SimpleImageCarousel,{images:e}):r.jsx(o.ComplexCarousel,{images:e});exports.ComplexImageCarousel=u;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TComplexImageCarouselView } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const ComplexImageCarousel: ({ images }: TComplexImageCarouselView) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const ComplexImageCarousel: ({ view, images }: TComplexImageCarouselView) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import e from "./complexImageCarousel.module.css.es.js";
|
|
7
|
-
import { useComplexImageCarousel as y } from "./useComplexImageCarousel.es.js";
|
|
8
|
-
const S = ({ images: a }) => {
|
|
9
|
-
const {
|
|
10
|
-
containerRef: p,
|
|
11
|
-
carouselRef: h,
|
|
12
|
-
imageRefs: u,
|
|
13
|
-
descriptionRef: g,
|
|
14
|
-
descriptionItemRef: C,
|
|
15
|
-
progressButtonContainerRef: N,
|
|
16
|
-
visible: r,
|
|
17
|
-
cardSizes: n,
|
|
18
|
-
handleCustomPrevClick: v,
|
|
19
|
-
handleCustomNextClick: w,
|
|
20
|
-
current: b,
|
|
21
|
-
mobileCardIndex: o,
|
|
22
|
-
xLargeCardIndex: d
|
|
23
|
-
} = y({ images: a });
|
|
24
|
-
return /* @__PURE__ */ i("div", { className: e.root, children: /* @__PURE__ */ m("div", { ref: p, className: e.container, children: [
|
|
25
|
-
/* @__PURE__ */ i("div", { ref: h, className: e.carouselArea, children: r.length > 0 && r.map((l, t) => /* @__PURE__ */ i(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
className: s(e.slideContainer, e[`size-${n[t]}`]),
|
|
29
|
-
ref: (c) => {
|
|
30
|
-
c && (u.current[t] = c);
|
|
31
|
-
},
|
|
32
|
-
"data-flip-id": `slide-${(b + t) % a.length}`,
|
|
33
|
-
"data-size": n[t],
|
|
34
|
-
children: /* @__PURE__ */ i("img", { src: l.image, alt: `Slide ${t + 1}`, className: e.image })
|
|
35
|
-
},
|
|
36
|
-
l.name
|
|
37
|
-
)) }),
|
|
38
|
-
/* @__PURE__ */ i("div", { ref: g, className: e.description, children: /* @__PURE__ */ m("div", { ref: C, className: s("description-item", e.descriptionItem), children: [
|
|
39
|
-
/* @__PURE__ */ i(f, { as: "h3", defaultVariant: "headingLg", mobileVariant: "headingXxs", children: typeof window < "u" && window.innerWidth <= 768 ? r[o].title : r[d].title }),
|
|
40
|
-
/* @__PURE__ */ i(f, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: e.text, children: typeof window < "u" && window.innerWidth <= 768 ? r[o].description : r[d].description })
|
|
41
|
-
] }) }),
|
|
42
|
-
/* @__PURE__ */ i("div", { ref: N, className: e.progressButtonContainer, children: /* @__PURE__ */ i(
|
|
43
|
-
x,
|
|
44
|
-
{
|
|
45
|
-
left: {
|
|
46
|
-
onClick: v
|
|
47
|
-
},
|
|
48
|
-
right: {
|
|
49
|
-
onClick: w
|
|
50
|
-
},
|
|
51
|
-
className: s("progress-buttons", e.progressButton)
|
|
52
|
-
}
|
|
53
|
-
) })
|
|
54
|
-
] }) });
|
|
55
|
-
};
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { ComplexCarousel as m } from "./ComplexCarousel/ComplexCarousel.es.js";
|
|
4
|
+
import { SimpleImageCarousel as l } from "./SimpleImageCarousel/SimpleImageCarousel.es.js";
|
|
5
|
+
const i = ({ view: o, images: e }) => o === "simple" ? /* @__PURE__ */ r(l, { images: e }) : /* @__PURE__ */ r(m, { images: e });
|
|
56
6
|
export {
|
|
57
|
-
|
|
7
|
+
i as ComplexImageCarousel
|
|
58
8
|
};
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { useState as p } from "react";
|
|
4
|
+
import { ComplexTooltip as c } from "../../ComplexTooltip/ComplexTooltip.es.js";
|
|
5
|
+
import "../../Icon/Icon.es.js";
|
|
6
|
+
import { Typography as o } from "../../Typography/Typography.es.js";
|
|
7
|
+
import { InfiniteScroll as d } from "../../InfiniteScroll/InfiniteScroll.es.js";
|
|
8
|
+
import e from "./simpleImageCarousel.module.css.es.js";
|
|
9
|
+
const b = ({ images: m }) => {
|
|
10
|
+
const [t, s] = p(null);
|
|
11
|
+
return /* @__PURE__ */ l("div", { className: e.simpleContainer, children: /* @__PURE__ */ l(
|
|
12
|
+
d,
|
|
13
|
+
{
|
|
14
|
+
items: m,
|
|
15
|
+
renderItem: (i, a) => /* @__PURE__ */ n(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
className: e.simpleItem,
|
|
19
|
+
onMouseEnter: (r) => {
|
|
20
|
+
s({
|
|
21
|
+
x: r.clientX,
|
|
22
|
+
y: r.clientY
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
onMouseMove: (r) => {
|
|
26
|
+
s({
|
|
27
|
+
x: r.clientX,
|
|
28
|
+
y: r.clientY
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ l(
|
|
33
|
+
c,
|
|
34
|
+
{
|
|
35
|
+
trigger: "hover",
|
|
36
|
+
title: i.title || "",
|
|
37
|
+
description: i.description || "",
|
|
38
|
+
style: "light",
|
|
39
|
+
transformMode: "absolute",
|
|
40
|
+
transform: { top: (t == null ? void 0 : t.y) || 0, left: t == null ? void 0 : t.x },
|
|
41
|
+
children: /* @__PURE__ */ l("img", { src: i.image, alt: i.title, className: e.simpleImage })
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ l(
|
|
45
|
+
o,
|
|
46
|
+
{
|
|
47
|
+
as: "h4",
|
|
48
|
+
defaultVariant: "headingXs",
|
|
49
|
+
mobileVariant: "bodyLg",
|
|
50
|
+
className: e.simpleTitle,
|
|
51
|
+
children: i.title
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ l(
|
|
55
|
+
o,
|
|
56
|
+
{
|
|
57
|
+
as: "p",
|
|
58
|
+
defaultVariant: "bodyMd",
|
|
59
|
+
mobileVariant: "bodySm",
|
|
60
|
+
className: e.simpleDescription,
|
|
61
|
+
children: i.description
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
a
|
|
67
|
+
),
|
|
68
|
+
itemClassName: e.simpleItemWrapper,
|
|
69
|
+
contentClassName: e.simpleContent,
|
|
70
|
+
rootClassName: e.simpleRoot
|
|
71
|
+
}
|
|
72
|
+
) });
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
b as SimpleImageCarousel
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SimpleImageCarousel } from './SimpleImageCarousel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="simpleImageCarousel-module__simpleContainer___ic1jr",s="simpleImageCarousel-module__simpleContent___FGCNH",m="simpleImageCarousel-module__simpleItemWrapper___Z9nwO",i="simpleImageCarousel-module__simpleItem___91wGk",l="simpleImageCarousel-module__simpleDescription___dV2Sv",t={simpleContainer:e,simpleContent:s,simpleItemWrapper:m,simpleItem:i,simpleDescription:l};exports.default=t;exports.simpleContainer=e;exports.simpleContent=s;exports.simpleDescription=l;exports.simpleItem=i;exports.simpleItemWrapper=m;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const e = "simpleImageCarousel-module__simpleContainer___ic1jr", s = "simpleImageCarousel-module__simpleContent___FGCNH", m = "simpleImageCarousel-module__simpleItemWrapper___Z9nwO", l = "simpleImageCarousel-module__simpleItem___91wGk", i = "simpleImageCarousel-module__simpleDescription___dV2Sv", p = {
|
|
2
|
+
simpleContainer: e,
|
|
3
|
+
simpleContent: s,
|
|
4
|
+
simpleItemWrapper: m,
|
|
5
|
+
simpleItem: l,
|
|
6
|
+
simpleDescription: i
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
p as default,
|
|
10
|
+
e as simpleContainer,
|
|
11
|
+
s as simpleContent,
|
|
12
|
+
i as simpleDescription,
|
|
13
|
+
l as simpleItem,
|
|
14
|
+
m as simpleItemWrapper
|
|
15
|
+
};
|
|
@@ -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 i=require("react/jsx-runtime"),e=require("react"),q=require("../../_virtual/Popover.cjs.js"),k=require("../../utils/useIsMobile.cjs.js"),P=require("./components/ComplexTooltipContent/ComplexTooltipContent.cjs.js"),E=require("./complexTooltip.module.css.cjs.js"),O=({trigger:n,title:a,description:m,link:v,transformMode:u="relative",transform:b={top:0,left:0},style:f="light",isBlurred:C=!1,children:c,positions:T=["top","bottom","left","right"],onClose:r})=>{const[d,l]=e.useState(!1),o=e.useRef(null),s=e.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>l(!0),200)},[]),t=e.useCallback(()=>{o.current=setTimeout(()=>{l(!1),r==null||r()},200)},[r]),p=e.useCallback(()=>l(h=>!h),[]),x=e.useMemo(()=>n==="hover"?{onMouseEnter:s,onMouseLeave:t}:{onClick:p},[n,s,t,p]),M=e.useMemo(()=>n==="hover"?{onMouseEnter:s,onMouseLeave:t}:{},[n,s,t]);return e.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),k.useIsMobile()?c:i.jsx(q.PopoverExports.Popover,{isOpen:d,positions:T,padding:8,onClickOutside:t,containerClassName:E.default.popover,transformMode:u,transform:u==="absolute"?b:void 0,containerStyle:{pointerEvents:u==="absolute"?"none":"auto"},content:i.jsx(P.ComplexTooltipContent,{title:a,description:m,link:v,style:f,isBlurred:C,onClose:t,...M}),children:i.jsx("div",{...x,children:c})})};exports.ComplexTooltip=O;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { PopoverPosition } from 'react-tiny-popover';
|
|
2
|
+
import { PopoverPosition, PositionTransform } from 'react-tiny-popover';
|
|
3
3
|
import { CommonComplexTooltipProps } from './types';
|
|
4
4
|
|
|
5
5
|
type ComplexTooltipProps = {
|
|
6
6
|
children: ReactElement;
|
|
7
7
|
trigger: 'hover' | 'click';
|
|
8
8
|
positions?: Array<PopoverPosition>;
|
|
9
|
+
transformMode?: 'absolute' | 'relative';
|
|
10
|
+
transform?: PositionTransform;
|
|
11
|
+
onMouseEnter?: () => void;
|
|
9
12
|
} & CommonComplexTooltipProps;
|
|
10
|
-
export declare const ComplexTooltip: ({ trigger, title, description, link, style, isBlurred, children, positions, onClose, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const ComplexTooltip: ({ trigger, title, description, link, transformMode, transform, style, isBlurred, children, positions, onClose, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
export {};
|
|
@@ -1,62 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { P as
|
|
5
|
-
import { useIsMobile as
|
|
6
|
-
import { ComplexTooltipContent as
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useState as P, useRef as k, useCallback as l, useMemo as a, useEffect as O } from "react";
|
|
4
|
+
import { P as y } from "../../_virtual/Popover.es.js";
|
|
5
|
+
import { useIsMobile as L } from "../../utils/useIsMobile.es.js";
|
|
6
|
+
import { ComplexTooltipContent as S } from "./components/ComplexTooltipContent/ComplexTooltipContent.es.js";
|
|
7
7
|
import j from "./complexTooltip.module.css.es.js";
|
|
8
|
-
const
|
|
8
|
+
const B = ({
|
|
9
9
|
trigger: t,
|
|
10
10
|
title: m,
|
|
11
|
-
description:
|
|
12
|
-
link:
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
description: f,
|
|
12
|
+
link: v,
|
|
13
|
+
transformMode: s = "relative",
|
|
14
|
+
transform: b = { top: 0, left: 0 },
|
|
15
|
+
style: h = "light",
|
|
16
|
+
isBlurred: T = !1,
|
|
15
17
|
children: p,
|
|
16
18
|
positions: d = ["top", "bottom", "left", "right"],
|
|
17
19
|
onClose: r
|
|
18
20
|
}) => {
|
|
19
|
-
const [
|
|
20
|
-
e.current && clearTimeout(e.current), e.current = setTimeout(() =>
|
|
21
|
-
}, []), o =
|
|
21
|
+
const [C, i] = P(!1), e = k(null), n = l(() => {
|
|
22
|
+
e.current && clearTimeout(e.current), e.current = setTimeout(() => i(!0), 200);
|
|
23
|
+
}, []), o = l(() => {
|
|
22
24
|
e.current = setTimeout(() => {
|
|
23
|
-
|
|
25
|
+
i(!1), r == null || r();
|
|
24
26
|
}, 200);
|
|
25
|
-
}, [r]), c =
|
|
27
|
+
}, [r]), c = l(() => i((E) => !E), []), M = a(() => t === "hover" ? {
|
|
26
28
|
onMouseEnter: n,
|
|
27
29
|
onMouseLeave: o
|
|
28
30
|
} : {
|
|
29
31
|
onClick: c
|
|
30
|
-
}, [t, n, o, c]),
|
|
32
|
+
}, [t, n, o, c]), x = a(() => t === "hover" ? {
|
|
31
33
|
onMouseEnter: n,
|
|
32
34
|
onMouseLeave: o
|
|
33
35
|
} : {}, [t, n, o]);
|
|
34
|
-
return
|
|
36
|
+
return O(() => () => {
|
|
35
37
|
e.current && clearTimeout(e.current);
|
|
36
|
-
}, []),
|
|
37
|
-
|
|
38
|
+
}, []), L() ? p : /* @__PURE__ */ u(
|
|
39
|
+
y.Popover,
|
|
38
40
|
{
|
|
39
|
-
isOpen:
|
|
41
|
+
isOpen: C,
|
|
40
42
|
positions: d,
|
|
41
43
|
padding: 8,
|
|
42
44
|
onClickOutside: o,
|
|
43
45
|
containerClassName: j.popover,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
transformMode: s,
|
|
47
|
+
transform: s === "absolute" ? b : void 0,
|
|
48
|
+
containerStyle: { pointerEvents: s === "absolute" ? "none" : "auto" },
|
|
49
|
+
content: /* @__PURE__ */ u(
|
|
50
|
+
S,
|
|
46
51
|
{
|
|
47
52
|
title: m,
|
|
48
|
-
description:
|
|
49
|
-
link:
|
|
50
|
-
style:
|
|
51
|
-
isBlurred:
|
|
53
|
+
description: f,
|
|
54
|
+
link: v,
|
|
55
|
+
style: h,
|
|
56
|
+
isBlurred: T,
|
|
52
57
|
onClose: o,
|
|
53
|
-
...
|
|
58
|
+
...x
|
|
54
59
|
}
|
|
55
60
|
),
|
|
56
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ u("div", { ...M, children: p })
|
|
57
62
|
}
|
|
58
63
|
);
|
|
59
64
|
};
|
|
60
65
|
export {
|
|
61
|
-
|
|
66
|
+
B as ComplexTooltip
|
|
62
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),C=require("../FAQComponentItem/FAQComponentItem.cjs.js"),S=require("./faqComponent.module.css.cjs.js"),g=({items:c,mode:o="multiple",initialActiveIndex:r})=>{const[u,m]=l.useState(r??null),[i,a]=l.useState(new Set),p=e=>{o==="single"?m(t=>t===e?null:e):a(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},I=e=>o==="single"?u===e:i.has(e);return s.jsx("div",{className:S.default.root,children:c.map((e,t)=>s.jsx(C.FAQComponentItem,{title:e.title,content:e.content,isOpen:I(t),index:t,onClick:p},t))})};exports.FAQComponent=g;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import { useState as l } from "react";
|
|
4
|
-
import { FAQComponentItem as I } from "
|
|
4
|
+
import { FAQComponentItem as I } from "../FAQComponentItem/FAQComponentItem.es.js";
|
|
5
5
|
import g from "./faqComponent.module.css.es.js";
|
|
6
6
|
const A = ({ items: m, mode: o = "multiple", initialActiveIndex: r }) => {
|
|
7
7
|
const [c, p] = l(r ?? null), [i, a] = l(/* @__PURE__ */ new Set()), u = (t) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FAQComponentItem, type TFAQComponentItem } from '
|
|
1
|
+
export { FAQComponentItem, type TFAQComponentItem } from '../../FAQComponentItem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("../Typography/Typography.cjs.js"),o=require("../Icon/Icon.cjs.js"),t=require("../Icon/constants.cjs.js"),s=require("../../utils/cn/cn.cjs.js"),n=require("./faqComponentItem.module.css.cjs.js"),u=({title:r,content:d,isOpen:a,index:i,onClick:l})=>e.jsxs("div",{className:n.default.root,children:[e.jsxs("div",{onClick:()=>l(i??0),className:s.cn(n.default.header,{[n.default.headerSticky]:a}),children:[e.jsx(c.Typography,{defaultVariant:"headingMd",mobileVariant:"headingXxs",children:r}),e.jsxs("div",{className:n.default.closeButtonWrapper,children:[e.jsx(o.Icon,{name:t.EIconName.BRACKET_LEFT}),e.jsx("div",{className:s.cn(n.default.closeButton,{[n.default.closeButtonActive]:a}),children:e.jsx(o.Icon,{name:t.EIconName.PLUS_BOLD})}),e.jsx(o.Icon,{name:t.EIconName.BRACKET_RIGHT})]})]}),e.jsx("div",{className:s.cn(n.default.description,{[n.default.descriptionShow]:a}),children:e.jsx("div",{className:n.default.descriptionInner,children:e.jsx(c.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodyXs",children:d})})}),e.jsx("div",{className:n.default.leftBorder}),e.jsx("div",{className:n.default.rightBorder})]});exports.FAQComponentItem=u;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Typography as n } from "
|
|
3
|
-
import { Icon as a } from "
|
|
4
|
-
import { EIconName as t } from "
|
|
5
|
-
import { cn as d } from "
|
|
2
|
+
import { Typography as n } from "../Typography/Typography.es.js";
|
|
3
|
+
import { Icon as a } from "../Icon/Icon.es.js";
|
|
4
|
+
import { EIconName as t } from "../Icon/constants.es.js";
|
|
5
|
+
import { cn as d } from "../../utils/cn/cn.es.js";
|
|
6
6
|
import e from "./faqComponentItem.module.css.es.js";
|
|
7
7
|
const u = ({ title: c, content: s, isOpen: i, index: m, onClick: l }) => /* @__PURE__ */ o("div", { className: e.root, children: [
|
|
8
8
|
/* @__PURE__ */ o("div", { onClick: () => l(m ?? 0), className: d(e.header, { [e.headerSticky]: i }), children: [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="faqComponentItem-module__root___qscxM",o="faqComponentItem-module__header___dmHbo",t="faqComponentItem-module__closeButtonWrapper___FcDO8",n="faqComponentItem-module__closeButton___Va-zE",r="faqComponentItem-module__closeButtonActive___T7tO4",_="faqComponentItem-module__description___V8Qa3",c="faqComponentItem-module__descriptionInner___a-wWW",d="faqComponentItem-module__descriptionShow___nR-X1",s="faqComponentItem-module__leftBorder___lWokl",i="faqComponentItem-module__rightBorder___TGNNR",l="faqComponentItem-module__headerSticky___eQzFQ",m={root:e,header:o,closeButtonWrapper:t,closeButton:n,closeButtonActive:r,description:_,descriptionInner:c,descriptionShow:d,leftBorder:s,rightBorder:i,headerSticky:l};exports.closeButton=n;exports.closeButtonActive=r;exports.closeButtonWrapper=t;exports.default=m;exports.description=_;exports.descriptionInner=c;exports.descriptionShow=d;exports.header=o;exports.headerSticky=l;exports.leftBorder=s;exports.rightBorder=i;exports.root=e;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const o = "faqComponentItem-module__root___qscxM", e = "faqComponentItem-module__header___dmHbo", t = "faqComponentItem-module__closeButtonWrapper___FcDO8", n = "faqComponentItem-module__closeButton___Va-zE", _ = "faqComponentItem-module__closeButtonActive___T7tO4", r = "faqComponentItem-module__description___V8Qa3", c = "faqComponentItem-module__descriptionInner___a-wWW", d = "faqComponentItem-module__descriptionShow___nR-X1", m = "faqComponentItem-module__leftBorder___lWokl", s = "faqComponentItem-module__rightBorder___TGNNR", i = "faqComponentItem-module__headerSticky___eQzFQ", l = {
|
|
2
|
+
root: o,
|
|
3
|
+
header: e,
|
|
4
|
+
closeButtonWrapper: t,
|
|
5
|
+
closeButton: n,
|
|
6
|
+
closeButtonActive: _,
|
|
7
|
+
description: r,
|
|
8
|
+
descriptionInner: c,
|
|
9
|
+
descriptionShow: d,
|
|
10
|
+
leftBorder: m,
|
|
11
|
+
rightBorder: s,
|
|
12
|
+
headerSticky: i
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
n as closeButton,
|
|
16
|
+
_ as closeButtonActive,
|
|
17
|
+
t as closeButtonWrapper,
|
|
18
|
+
l as default,
|
|
19
|
+
r as description,
|
|
20
|
+
c as descriptionInner,
|
|
21
|
+
d as descriptionShow,
|
|
22
|
+
e as header,
|
|
23
|
+
i as headerSticky,
|
|
24
|
+
m as leftBorder,
|
|
25
|
+
s as rightBorder,
|
|
26
|
+
o as root
|
|
27
|
+
};
|
|
@@ -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 M=require("react/jsx-runtime"),e=require("react"),R=require("../../utils/cn/cn.cjs.js"),q=require("./infiniteScroll.module.css.cjs.js");function L({items:u,speed:d=50,direction:o="left",contentClassName:y,itemClassName:v,rootClassName:w,renderItem:b},A){const f=e.useRef(null),[i,p]=e.useState(0),[c,E]=e.useState(0),m=e.useRef(null),g=e.useRef(!1),h=e.useRef(performance.now()),[T,W]=e.useState(2);e.useEffect(()=>{f.current&&u.length>0&&setTimeout(()=>{var a,l,n;const r=((l=(a=f.current)==null?void 0:a.parentElement)==null?void 0:l.offsetWidth)||0,t=(((n=f.current)==null?void 0:n.scrollWidth)||0)/2,s=Math.ceil(r*2/t);W(Math.max(2,s%2===0?s:s+1)),E(t)},0)},[u]),e.useEffect(()=>{p(o==="right"?-c:0)},[c,o]);const S=e.useCallback(r=>{if(!g.current){const t=r??performance.now(),s=t-h.current||16.67;h.current=t,p(a=>{const l=o==="right"?-d:d,n=a-l*(s/1e3);if(o==="left"){if(n<=-c)return n+c}else if(o==="right"&&n>=0)return n-c;return n})}m.current=requestAnimationFrame(S)},[c,d,o]);e.useEffect(()=>(h.current=performance.now(),m.current=requestAnimationFrame(S),()=>{m.current&&cancelAnimationFrame(m.current)}),[S]);const F=e.useCallback(()=>{g.current=!0},[]),j=e.useCallback(()=>{g.current=!1,h.current=performance.now()},[]),C=e.useCallback((r,t=300)=>{const s=i,a=r-s,l=performance.now(),n=k=>{const I=k-l,x=Math.min(I/t,1),_=1-Math.pow(1-x,3);p(s+a*_),x<1&&requestAnimationFrame(n)};requestAnimationFrame(n)},[i]);return e.useImperativeHandle(A,()=>({scrollLeft:()=>{const r=i-200,t=Math.max(r,-c);C(t)},scrollRight:()=>{const r=i+200,t=Math.min(r,c);C(t)}})),M.jsx("div",{className:R.cn(q.default.root,w),onMouseEnter:F,onMouseLeave:j,children:M.jsx("div",{className:R.cn(q.default.content,y),style:{transform:`translate3D(${i}px, 0, 0)`},ref:f,children:Array.from({length:u.length*T},(r,t)=>M.jsx("div",{className:R.cn(q.default.item,v),children:b(u[t%u.length],t)},t))})})}const N=e.forwardRef(L);exports.InfiniteScroll=N;
|