@zenpatient-org/healthspan-marketing-ui 0.1.45 → 0.1.46
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 +6 -14
- package/dist/components/AnchorLinks/types.d.ts +0 -4
- package/dist/components/Button/Button.d.ts +1 -1
- 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 +55 -5
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.cjs.js +1 -0
- package/dist/components/ComplexImageCarousel/complexImageCarousel.module.css.es.js +24 -0
- package/dist/components/ComplexTooltip/ComplexTooltip.cjs.js +1 -1
- package/dist/components/ComplexTooltip/ComplexTooltip.d.ts +2 -5
- package/dist/components/ComplexTooltip/ComplexTooltip.es.js +29 -34
- package/dist/components/FAQComponent/FAQComponent.cjs.js +1 -1
- package/dist/components/FAQComponent/FAQComponent.es.js +1 -1
- package/dist/components/FAQComponent/components/FAQComponentItem/FAQComponentItem.cjs.js +1 -0
- package/dist/components/{FAQComponentItem → FAQComponent/components/FAQComponentItem}/FAQComponentItem.es.js +4 -4
- package/dist/components/FAQComponent/components/FAQComponentItem/faqComponentItem.module.css.cjs.js +1 -0
- package/dist/components/FAQComponent/components/FAQComponentItem/faqComponentItem.module.css.es.js +27 -0
- package/dist/components/FAQComponent/components/index.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.cjs.js +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +0 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.es.js +46 -61
- package/dist/components/Label/index.d.ts +1 -1
- package/dist/components/Label/types.d.ts +3 -1
- package/dist/components/StepsCarousel/StepsCarousel.cjs.js +1 -1
- package/dist/components/StepsCarousel/StepsCarousel.es.js +35 -29
- package/dist/components/StudyGridCard/StudyGridCard.cjs.js +1 -1
- package/dist/components/StudyGridCard/StudyGridCard.d.ts +2 -10
- package/dist/components/StudyGridCard/StudyGridCard.es.js +60 -115
- package/dist/components/StudyGridCard/studyGridCard.module.css.cjs.js +1 -1
- package/dist/components/StudyGridCard/studyGridCard.module.css.es.js +12 -24
- package/dist/components/Tag/Tag.cjs.js +1 -1
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/Tag/Tag.es.js +11 -11
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/FollowTheScience/FollowTheScience.cjs.js +1 -1
- package/dist/modules/FollowTheScience/FollowTheScience.d.ts +0 -1
- package/dist/modules/FollowTheScience/FollowTheScience.es.js +14 -13
- package/dist/modules/IndividualProductCard/IndividualProductCard.d.ts +2 -2
- package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.cjs.js +1 -1
- package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.es.js +6 -6
- package/dist/modules/IngredientHighlight/components/Ingredient/types.d.ts +1 -1
- package/dist/modules/IngredientHighlight/types.d.ts +1 -1
- package/dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.cjs.js +1 -1
- package/dist/modules/ResearchEssentialReadings/ResearchEssentialReadings.es.js +13 -13
- package/dist/modules/ResearchEssentialReadings/index.d.ts +0 -2
- package/dist/modules/ResearchFeatured/ResearchFeatured.cjs.js +1 -1
- package/dist/modules/ResearchFeatured/ResearchFeatured.es.js +9 -9
- package/dist/modules/ResearchFeatured/index.d.ts +0 -1
- package/dist/modules/ResearchFilters/ResearchFilters.cjs.js +1 -1
- package/dist/modules/ResearchFilters/ResearchFilters.d.ts +1 -3
- package/dist/modules/ResearchFilters/ResearchFilters.es.js +24 -18
- package/dist/modules/ResearchStudies/ResearchStudies.cjs.js +1 -1
- package/dist/modules/ResearchStudies/ResearchStudies.d.ts +2 -8
- package/dist/modules/ResearchStudies/ResearchStudies.es.js +11 -10
- package/dist/modules/ResearchStudies/components/StudyCard/StudyCard.d.ts +1 -1
- package/dist/modules/ResearchStudies/components/StudyCard/index.d.ts +1 -0
- package/dist/modules/ResearchStudies/components/StudyCard/types.d.ts +10 -0
- package/dist/modules/ResearchStudies/components/index.d.ts +2 -0
- package/dist/modules/ResearchStudies/index.d.ts +0 -1
- package/dist/modules/ResearchStudies/types.d.ts +3 -8
- package/package.json +6 -1
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.cjs.js +0 -1
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.d.ts +0 -5
- package/dist/components/ComplexImageCarousel/ComplexCarousel/ComplexCarousel.es.js +0 -57
- package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.cjs.js +0 -1
- package/dist/components/ComplexImageCarousel/ComplexCarousel/complexImageCarousel.module.css.es.js +0 -24
- package/dist/components/ComplexImageCarousel/ComplexCarousel/index.d.ts +0 -1
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.cjs.js +0 -1
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.d.ts +0 -5
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/SimpleImageCarousel.es.js +0 -76
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/index.d.ts +0 -1
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/simpleImageCarousel.module.css.cjs.js +0 -1
- package/dist/components/ComplexImageCarousel/SimpleImageCarousel/simpleImageCarousel.module.css.es.js +0 -15
- package/dist/components/FAQComponentItem/FAQComponentItem.cjs.js +0 -1
- package/dist/components/FAQComponentItem/faqComponentItem.module.css.cjs.js +0 -1
- package/dist/components/FAQComponentItem/faqComponentItem.module.css.es.js +0 -27
- package/dist/modules/ExpandingDetails/ExpandingDetails.cjs.js +0 -1
- package/dist/modules/ExpandingDetails/ExpandingDetails.d.ts +0 -3
- package/dist/modules/ExpandingDetails/ExpandingDetails.es.js +0 -157
- package/dist/modules/ExpandingDetails/expandingDetails.module.css.cjs.js +0 -1
- package/dist/modules/ExpandingDetails/expandingDetails.module.css.es.js +0 -47
- package/dist/modules/ExpandingDetails/index.d.ts +0 -1
- package/dist/modules/ExpandingDetails/types.d.ts +0 -13
- package/dist/modules/TextBlockAnimated/TextBlockAnimated.cjs.js +0 -1
- package/dist/modules/TextBlockAnimated/TextBlockAnimated.d.ts +0 -6
- package/dist/modules/TextBlockAnimated/TextBlockAnimated.es.js +0 -54
- package/dist/modules/TextBlockAnimated/index.d.ts +0 -1
- package/dist/modules/TextBlockAnimated/textBlockAnimated.module.css.cjs.js +0 -1
- package/dist/modules/TextBlockAnimated/textBlockAnimated.module.css.es.js +0 -21
- package/dist/node_modules/gsap/SplitText.cjs.js +0 -9
- package/dist/node_modules/gsap/SplitText.es.js +0 -148
- package/dist/pageComponents/HowItWorksHero/HowItWorksHero.d.ts +0 -1
- package/dist/pageComponents/HowItWorksHero/assets/Container.png.cjs.js +0 -1
- package/dist/pageComponents/HowItWorksHero/assets/Container.png.es.js +0 -4
- package/dist/pageComponents/HowItWorksHero/assets/people.png.cjs.js +0 -1
- package/dist/pageComponents/HowItWorksHero/assets/people.png.es.js +0 -4
- package/dist/pageComponents/HowItWorksHero/howItWorksHero.module.css.cjs.js +0 -1
- package/dist/pageComponents/HowItWorksHero/howItWorksHero.module.css.es.js +0 -17
- package/dist/pageComponents/HowItWorksHero/index.d.ts +0 -1
- package/dist/pageComponents/HowItWorksHero.cjs.js +0 -1
- package/dist/pageComponents/HowItWorksHero.es.js +0 -14
- /package/dist/components/{FAQComponentItem → FAQComponent/components/FAQComponentItem}/FAQComponentItem.d.ts +0 -0
- /package/dist/components/{FAQComponentItem → FAQComponent/components/FAQComponentItem}/index.d.ts +0 -0
- /package/dist/components/{FAQComponentItem → FAQComponent/components/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"),u=require("../Typography/Typography.cjs.js"),i=require("../../utils/cn/cn.cjs.js"),e=require("./anchorLinks.module.css.cjs.js"),d=({links:n,activeId:s,onClick:r})=>t.jsx("div",{className:e.default.root,children:n.map(({label:c,id:a,href:l,type:o})=>t.jsx("a",{className:i.cn(e.default.linkButton,{[e.default.active]:s===a}),href:l,"data-type":o,onClick:()=>r==null?void 0:r(a),children:t.jsx(u.Typography,{className:e.default.linkLabel,defaultVariant:"labelLg",emphasis:!0,children:c})},a))});exports.AnchorLinks=d;
|
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { cn as
|
|
2
|
+
import { Typography as i } from "../Typography/Typography.es.js";
|
|
3
|
+
import { cn as n } from "../../utils/cn/cn.es.js";
|
|
4
4
|
import r from "./anchorLinks.module.css.es.js";
|
|
5
|
-
const
|
|
5
|
+
const u = ({ links: m, activeId: s, onClick: a }) => /* @__PURE__ */ e("div", { className: r.root, children: m.map(({ label: o, id: t, href: l, type: p }) => /* @__PURE__ */ e(
|
|
6
6
|
"a",
|
|
7
7
|
{
|
|
8
|
-
className:
|
|
8
|
+
className: n(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(
|
|
15
|
-
c,
|
|
16
|
-
{
|
|
17
|
-
className: r.linkLabel,
|
|
18
|
-
defaultVariant: i || "labelLg",
|
|
19
|
-
emphasis: n ?? !0,
|
|
20
|
-
children: o
|
|
21
|
-
}
|
|
22
|
-
)
|
|
14
|
+
children: /* @__PURE__ */ e(i, { className: r.linkLabel, defaultVariant: "labelLg", emphasis: !0, children: o })
|
|
23
15
|
},
|
|
24
16
|
t
|
|
25
17
|
)) });
|
|
26
18
|
export {
|
|
27
|
-
|
|
19
|
+
u as AnchorLinks
|
|
28
20
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { TypographyVariant } from '../Typography';
|
|
2
|
-
|
|
3
1
|
export declare enum EAnchorLinksTypes {
|
|
4
2
|
ENERGY = "energy",
|
|
5
3
|
SENESCENCE = "senescence",
|
|
@@ -11,8 +9,6 @@ export type TAnchorLink = {
|
|
|
11
9
|
id: string;
|
|
12
10
|
href: string;
|
|
13
11
|
type: EAnchorLinksTypes;
|
|
14
|
-
variant?: TypographyVariant;
|
|
15
|
-
emphasis?: boolean;
|
|
16
12
|
};
|
|
17
13
|
export type TAnchorLinksProps = {
|
|
18
14
|
links: TAnchorLink[];
|
|
@@ -11,5 +11,5 @@ interface BaseButtonProps {
|
|
|
11
11
|
suffixIcon?: EIconName;
|
|
12
12
|
}
|
|
13
13
|
export type ButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
14
|
-
export declare const Button: React.ForwardRefExoticComponent<
|
|
14
|
+
export declare const Button: React.ForwardRefExoticComponent<BaseButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLElement>>;
|
|
15
15
|
export {};
|
|
@@ -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 e=require("react/jsx-runtime"),a=require("../../utils/cn/cn.cjs.js"),N=require("../ProgressButton/ProgressButton.cjs.js"),u=require("../Typography/Typography.cjs.js"),r=require("./complexImageCarousel.module.css.cjs.js"),v=require("./useComplexImageCarousel.cjs.js"),b=({images:i})=>{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:i});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:a.cn(r.default.slideContainer,r.default[`size-${n[t]}`]),ref:c=>{c&&(p.current[t]=c)},"data-flip-id":`slide-${(j+t)%i.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:a.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:a.cn("progress-buttons",r.default.progressButton)})})]})})};exports.ComplexImageCarousel=b;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TComplexImageCarouselView } from './types';
|
|
2
2
|
|
|
3
|
-
export declare const ComplexImageCarousel: ({
|
|
3
|
+
export declare const ComplexImageCarousel: ({ images }: TComplexImageCarouselView) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
3
|
+
import { cn as s } from "../../utils/cn/cn.es.js";
|
|
4
|
+
import { ProgressButton as x } from "../ProgressButton/ProgressButton.es.js";
|
|
5
|
+
import { Typography as f } from "../Typography/Typography.es.js";
|
|
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
|
+
};
|
|
6
56
|
export {
|
|
7
|
-
|
|
57
|
+
S as ComplexImageCarousel
|
|
8
58
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="complexImageCarousel-module__container___uoYKj",o="complexImageCarousel-module__carouselArea___dqNWo",s="complexImageCarousel-module__slideContainer___H-r26",r="complexImageCarousel-module__description___R8XsG",t="complexImageCarousel-module__descriptionItem___SAPt8",_="complexImageCarousel-module__progressButtonContainer___l3Qih",l="complexImageCarousel-module__progressButton___b78tE",a={container:e,carouselArea:o,slideContainer:s,"size-atom":"complexImageCarousel-module__size-atom___t7PmI","size-small":"complexImageCarousel-module__size-small___mjSZM","size-medium":"complexImageCarousel-module__size-medium___M-0BQ","size-large":"complexImageCarousel-module__size-large___GITeg","size-x-large":"complexImageCarousel-module__size-x-large___e-BOY",description:r,descriptionItem:t,progressButtonContainer:_,progressButton:l};exports.carouselArea=o;exports.container=e;exports.default=a;exports.description=r;exports.descriptionItem=t;exports.progressButton=l;exports.progressButtonContainer=_;exports.slideContainer=s;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const e = "complexImageCarousel-module__container___uoYKj", o = "complexImageCarousel-module__carouselArea___dqNWo", s = "complexImageCarousel-module__slideContainer___H-r26", _ = "complexImageCarousel-module__description___R8XsG", l = "complexImageCarousel-module__descriptionItem___SAPt8", r = "complexImageCarousel-module__progressButtonContainer___l3Qih", a = "complexImageCarousel-module__progressButton___b78tE", m = {
|
|
2
|
+
container: e,
|
|
3
|
+
carouselArea: o,
|
|
4
|
+
slideContainer: s,
|
|
5
|
+
"size-atom": "complexImageCarousel-module__size-atom___t7PmI",
|
|
6
|
+
"size-small": "complexImageCarousel-module__size-small___mjSZM",
|
|
7
|
+
"size-medium": "complexImageCarousel-module__size-medium___M-0BQ",
|
|
8
|
+
"size-large": "complexImageCarousel-module__size-large___GITeg",
|
|
9
|
+
"size-x-large": "complexImageCarousel-module__size-x-large___e-BOY",
|
|
10
|
+
description: _,
|
|
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
|
+
_ as description,
|
|
20
|
+
l as descriptionItem,
|
|
21
|
+
a as progressButton,
|
|
22
|
+
r as progressButtonContainer,
|
|
23
|
+
s as slideContainer
|
|
24
|
+
};
|
|
@@ -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 l=require("react/jsx-runtime"),e=require("react"),x=require("../../_virtual/Popover.cjs.js"),h=require("../../utils/useIsMobile.cjs.js"),q=require("./components/ComplexTooltipContent/ComplexTooltipContent.cjs.js"),k=require("./complexTooltip.module.css.cjs.js"),P=({trigger:r,title:p,description:a,link:m,style:f="light",isBlurred:d=!1,children:i,positions:v=["top","bottom","left","right"],onClose:n})=>{const[C,u]=e.useState(!1),o=e.useRef(null),s=e.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>u(!0),200)},[]),t=e.useCallback(()=>{o.current=setTimeout(()=>{u(!1),n==null||n()},200)},[n]),c=e.useCallback(()=>u(b=>!b),[]),M=e.useMemo(()=>r==="hover"?{onMouseEnter:s,onMouseLeave:t}:{onClick:c},[r,s,t,c]),T=e.useMemo(()=>r==="hover"?{onMouseEnter:s,onMouseLeave:t}:{},[r,s,t]);return e.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),h.useIsMobile()?i:l.jsx(x.PopoverExports.Popover,{isOpen:C,positions:v,padding:8,onClickOutside:t,containerClassName:k.default.popover,content:l.jsx(q.ComplexTooltipContent,{title:p,description:a,link:m,style:f,isBlurred:d,onClose:t,...T}),children:l.jsx("div",{...M,children:i})})};exports.ComplexTooltip=P;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { PopoverPosition
|
|
2
|
+
import { PopoverPosition } 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;
|
|
12
9
|
} & CommonComplexTooltipProps;
|
|
13
|
-
export declare const ComplexTooltip: ({ trigger, title, description, link,
|
|
10
|
+
export declare const ComplexTooltip: ({ trigger, title, description, link, style, isBlurred, children, positions, onClose, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
11
|
export {};
|
|
@@ -1,67 +1,62 @@
|
|
|
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 i } from "react/jsx-runtime";
|
|
3
|
+
import { useState as x, useRef as P, useCallback as u, useMemo as l, useEffect as k } from "react";
|
|
4
|
+
import { P as E } from "../../_virtual/Popover.es.js";
|
|
5
|
+
import { useIsMobile as O } from "../../utils/useIsMobile.es.js";
|
|
6
|
+
import { ComplexTooltipContent as L } from "./components/ComplexTooltipContent/ComplexTooltipContent.es.js";
|
|
7
7
|
import j from "./complexTooltip.module.css.es.js";
|
|
8
|
-
const
|
|
8
|
+
const z = ({
|
|
9
9
|
trigger: t,
|
|
10
10
|
title: m,
|
|
11
|
-
description:
|
|
12
|
-
link:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
style: h = "light",
|
|
16
|
-
isBlurred: T = !1,
|
|
11
|
+
description: a,
|
|
12
|
+
link: f,
|
|
13
|
+
style: v = "light",
|
|
14
|
+
isBlurred: M = !1,
|
|
17
15
|
children: p,
|
|
18
16
|
positions: d = ["top", "bottom", "left", "right"],
|
|
19
17
|
onClose: r
|
|
20
18
|
}) => {
|
|
21
|
-
const [
|
|
22
|
-
e.current && clearTimeout(e.current), e.current = setTimeout(() =>
|
|
23
|
-
}, []), o =
|
|
19
|
+
const [h, s] = x(!1), e = P(null), n = u(() => {
|
|
20
|
+
e.current && clearTimeout(e.current), e.current = setTimeout(() => s(!0), 200);
|
|
21
|
+
}, []), o = u(() => {
|
|
24
22
|
e.current = setTimeout(() => {
|
|
25
|
-
|
|
23
|
+
s(!1), r == null || r();
|
|
26
24
|
}, 200);
|
|
27
|
-
}, [r]), c =
|
|
25
|
+
}, [r]), c = u(() => s((b) => !b), []), T = l(() => t === "hover" ? {
|
|
28
26
|
onMouseEnter: n,
|
|
29
27
|
onMouseLeave: o
|
|
30
28
|
} : {
|
|
31
29
|
onClick: c
|
|
32
|
-
}, [t, n, o, c]),
|
|
30
|
+
}, [t, n, o, c]), C = l(() => t === "hover" ? {
|
|
33
31
|
onMouseEnter: n,
|
|
34
32
|
onMouseLeave: o
|
|
35
33
|
} : {}, [t, n, o]);
|
|
36
|
-
return
|
|
34
|
+
return k(() => () => {
|
|
37
35
|
e.current && clearTimeout(e.current);
|
|
38
|
-
}, []),
|
|
39
|
-
|
|
36
|
+
}, []), O() ? p : /* @__PURE__ */ i(
|
|
37
|
+
E.Popover,
|
|
40
38
|
{
|
|
41
|
-
isOpen:
|
|
39
|
+
isOpen: h,
|
|
42
40
|
positions: d,
|
|
43
41
|
padding: 8,
|
|
44
42
|
onClickOutside: o,
|
|
45
43
|
containerClassName: j.popover,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
containerStyle: { pointerEvents: s === "absolute" ? "none" : "auto" },
|
|
49
|
-
content: /* @__PURE__ */ u(
|
|
50
|
-
S,
|
|
44
|
+
content: /* @__PURE__ */ i(
|
|
45
|
+
L,
|
|
51
46
|
{
|
|
52
47
|
title: m,
|
|
53
|
-
description:
|
|
54
|
-
link:
|
|
55
|
-
style:
|
|
56
|
-
isBlurred:
|
|
48
|
+
description: a,
|
|
49
|
+
link: f,
|
|
50
|
+
style: v,
|
|
51
|
+
isBlurred: M,
|
|
57
52
|
onClose: o,
|
|
58
|
-
...
|
|
53
|
+
...C
|
|
59
54
|
}
|
|
60
55
|
),
|
|
61
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ i("div", { ...T, children: p })
|
|
62
57
|
}
|
|
63
58
|
);
|
|
64
59
|
};
|
|
65
60
|
export {
|
|
66
|
-
|
|
61
|
+
z as ComplexTooltip
|
|
67
62
|
};
|
|
@@ -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"),S=require("./components/FAQComponentItem/FAQComponentItem.cjs.js"),g=require("./faqComponent.module.css.cjs.js"),q=({items:c,mode:o="multiple",initialActiveIndex:r})=>{const[u,i]=l.useState(r??null),[a,m]=l.useState(new Set),p=e=>{o==="single"?i(t=>t===e?null:e):m(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},I=e=>o==="single"?u===e:a.has(e);return s.jsx("div",{className:g.default.root,children:c.map((e,t)=>s.jsx(S.FAQComponentItem,{title:e.title,content:e.content,isOpen:I(t),index:t,onClick:p},t))})};exports.FAQComponent=q;
|
|
@@ -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 "./components/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) => {
|
|
@@ -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: [
|
package/dist/components/FAQComponent/components/FAQComponentItem/faqComponentItem.module.css.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="faqComponentItem-module__root___zTwix",o="faqComponentItem-module__header___LxS2t",t="faqComponentItem-module__closeButtonWrapper___FMjQq",n="faqComponentItem-module__closeButton___yWXnz",r="faqComponentItem-module__closeButtonActive___eqfRz",_="faqComponentItem-module__description___UQs0o",c="faqComponentItem-module__descriptionInner___aC4CL",d="faqComponentItem-module__descriptionShow___DZNFQ",s="faqComponentItem-module__leftBorder___7tMoB",i="faqComponentItem-module__rightBorder___xiCjz",l="faqComponentItem-module__headerSticky___nPXFL",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;
|
package/dist/components/FAQComponent/components/FAQComponentItem/faqComponentItem.module.css.es.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const o = "faqComponentItem-module__root___zTwix", e = "faqComponentItem-module__header___LxS2t", t = "faqComponentItem-module__closeButtonWrapper___FMjQq", n = "faqComponentItem-module__closeButton___yWXnz", _ = "faqComponentItem-module__closeButtonActive___eqfRz", r = "faqComponentItem-module__description___UQs0o", c = "faqComponentItem-module__descriptionInner___aC4CL", s = "faqComponentItem-module__descriptionShow___DZNFQ", d = "faqComponentItem-module__leftBorder___7tMoB", m = "faqComponentItem-module__rightBorder___xiCjz", i = "faqComponentItem-module__headerSticky___nPXFL", p = {
|
|
2
|
+
root: o,
|
|
3
|
+
header: e,
|
|
4
|
+
closeButtonWrapper: t,
|
|
5
|
+
closeButton: n,
|
|
6
|
+
closeButtonActive: _,
|
|
7
|
+
description: r,
|
|
8
|
+
descriptionInner: c,
|
|
9
|
+
descriptionShow: s,
|
|
10
|
+
leftBorder: d,
|
|
11
|
+
rightBorder: m,
|
|
12
|
+
headerSticky: i
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
n as closeButton,
|
|
16
|
+
_ as closeButtonActive,
|
|
17
|
+
t as closeButtonWrapper,
|
|
18
|
+
p as default,
|
|
19
|
+
r as description,
|
|
20
|
+
c as descriptionInner,
|
|
21
|
+
s as descriptionShow,
|
|
22
|
+
e as header,
|
|
23
|
+
i as headerSticky,
|
|
24
|
+
d as leftBorder,
|
|
25
|
+
m as rightBorder,
|
|
26
|
+
o as root
|
|
27
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FAQComponentItem, type TFAQComponentItem } from '
|
|
1
|
+
export { FAQComponentItem, type TFAQComponentItem } from './FAQComponentItem';
|
|
@@ -10,5 +10,5 @@ interface BaseButtonProps {
|
|
|
10
10
|
as?: ElementType;
|
|
11
11
|
}
|
|
12
12
|
export type ButtonProps = BaseButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
13
|
-
export declare const IconButton: ({ iconName, variant, size, as: Component, disabled, ...props }: Omit<ButtonProps, "children"
|
|
13
|
+
export declare const IconButton: ({ iconName, variant, size, as: Component, disabled, ...props }: Omit<ButtonProps, "children">) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -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 p=require("react/jsx-runtime"),t=require("react"),M=require("../../utils/cn/cn.cjs.js"),R=require("./infiniteScroll.module.css.cjs.js");function _({items:s,speed:S=50,contentClassName:x,itemClassName:y,rootClassName:b,renderItem:v},w){const u=t.useRef(null),[a,q]=t.useState(0),[i,A]=t.useState(0),f=t.useRef(null),h=t.useRef(!1),m=t.useRef(performance.now()),[T,W]=t.useState(2);t.useEffect(()=>{u.current&&s.length>0&&setTimeout(()=>{var o,c,l;const n=((c=(o=u.current)==null?void 0:o.parentElement)==null?void 0:c.offsetWidth)||0,e=(((l=u.current)==null?void 0:l.scrollWidth)||0)/2,r=Math.ceil(n*2/e);W(Math.max(2,r%2===0?r:r+1)),A(e)},0)},[s]);const d=t.useCallback(n=>{if(!h.current){const e=n??performance.now(),r=e-m.current||16.67;m.current=e,q(o=>{const c=o-S*(r/1e3);return Math.abs(c)>=i?c+i:c})}f.current=requestAnimationFrame(d)},[i,S]);t.useEffect(()=>(m.current=performance.now(),f.current=requestAnimationFrame(d),()=>{f.current&&cancelAnimationFrame(f.current)}),[d]);const E=t.useCallback(()=>{h.current=!0},[]),F=t.useCallback(()=>{h.current=!1,m.current=performance.now()},[]),C=t.useCallback((n,e=300)=>{const r=a,o=n-r,c=performance.now(),l=j=>{const k=j-c,g=Math.min(k/e,1),I=1-Math.pow(1-g,3);q(r+o*I),g<1&&requestAnimationFrame(l)};requestAnimationFrame(l)},[a]);return t.useImperativeHandle(w,()=>({scrollLeft:()=>{const n=a-200,e=Math.max(n,-i);C(e)},scrollRight:()=>{const n=a+200,e=Math.min(n,0);C(e)}})),p.jsx("div",{className:M.cn(R.default.root,b),onMouseEnter:E,onMouseLeave:F,children:p.jsx("div",{className:M.cn(R.default.content,x),style:{transform:`translate3D(${a}px, 0, 0)`},ref:u,children:Array.from({length:s.length*T},(n,e)=>p.jsx("div",{className:M.cn(R.default.item,y),children:v(s[e%s.length],e)},e))})})}const L=t.forwardRef(_);exports.InfiniteScroll=L;
|
|
@@ -1,82 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
renderItem: T
|
|
14
|
-
}, E) {
|
|
15
|
-
const i = h(null), [u, g] = y(0), [r, I] = y(0), m = h(null), M = h(!1), f = h(performance.now()), [L, N] = y(2);
|
|
16
|
-
C(() => {
|
|
17
|
-
i.current && l.length > 0 && setTimeout(() => {
|
|
18
|
-
var s, a, e;
|
|
19
|
-
const n = ((a = (s = i.current) == null ? void 0 : s.parentElement) == null ? void 0 : a.offsetWidth) || 0, t = (((e = i.current) == null ? void 0 : e.scrollWidth) || 0) / 2, o = Math.ceil(n * 2 / t);
|
|
20
|
-
N(Math.max(2, o % 2 === 0 ? o : o + 1)), I(t);
|
|
2
|
+
import { jsx as M } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as D, useRef as f, useState as g, useEffect as A, useCallback as h, useImperativeHandle as H } from "react";
|
|
4
|
+
import { cn as w } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import x from "./infiniteScroll.module.css.es.js";
|
|
6
|
+
function P({ items: c, speed: y = 50, contentClassName: W, itemClassName: q, rootClassName: F, renderItem: S }, T) {
|
|
7
|
+
const l = f(null), [s, C] = g(0), [i, E] = g(0), m = f(null), d = f(!1), u = f(performance.now()), [I, L] = g(2);
|
|
8
|
+
A(() => {
|
|
9
|
+
l.current && c.length > 0 && setTimeout(() => {
|
|
10
|
+
var o, r, a;
|
|
11
|
+
const t = ((r = (o = l.current) == null ? void 0 : o.parentElement) == null ? void 0 : r.offsetWidth) || 0, e = (((a = l.current) == null ? void 0 : a.scrollWidth) || 0) / 2, n = Math.ceil(t * 2 / e);
|
|
12
|
+
L(Math.max(2, n % 2 === 0 ? n : n + 1)), E(e);
|
|
21
13
|
}, 0);
|
|
22
|
-
}, [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const a = c === "right" ? -d : d, e = s - a * (o / 1e3);
|
|
31
|
-
if (c === "left") {
|
|
32
|
-
if (e <= -r)
|
|
33
|
-
return e + r;
|
|
34
|
-
} else if (c === "right" && e >= 0)
|
|
35
|
-
return e - r;
|
|
36
|
-
return e;
|
|
14
|
+
}, [c]);
|
|
15
|
+
const p = h(
|
|
16
|
+
(t) => {
|
|
17
|
+
if (!d.current) {
|
|
18
|
+
const e = t ?? performance.now(), n = e - u.current || 16.67;
|
|
19
|
+
u.current = e, C((o) => {
|
|
20
|
+
const r = o - y * (n / 1e3);
|
|
21
|
+
return Math.abs(r) >= i ? r + i : r;
|
|
37
22
|
});
|
|
38
23
|
}
|
|
39
|
-
m.current = requestAnimationFrame(
|
|
24
|
+
m.current = requestAnimationFrame(p);
|
|
40
25
|
},
|
|
41
|
-
[
|
|
26
|
+
[i, y]
|
|
42
27
|
);
|
|
43
|
-
|
|
28
|
+
A(() => (u.current = performance.now(), m.current = requestAnimationFrame(p), () => {
|
|
44
29
|
m.current && cancelAnimationFrame(m.current);
|
|
45
|
-
}), [
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
}, []),
|
|
49
|
-
|
|
50
|
-
}, []),
|
|
51
|
-
(
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
|
|
30
|
+
}), [p]);
|
|
31
|
+
const N = h(() => {
|
|
32
|
+
d.current = !0;
|
|
33
|
+
}, []), X = h(() => {
|
|
34
|
+
d.current = !1, u.current = performance.now();
|
|
35
|
+
}, []), R = h(
|
|
36
|
+
(t, e = 300) => {
|
|
37
|
+
const n = s, o = t - n, r = performance.now(), a = (b) => {
|
|
38
|
+
const j = b - r, v = Math.min(j / e, 1), k = 1 - Math.pow(1 - v, 3);
|
|
39
|
+
C(n + o * k), v < 1 && requestAnimationFrame(a);
|
|
55
40
|
};
|
|
56
|
-
requestAnimationFrame(
|
|
41
|
+
requestAnimationFrame(a);
|
|
57
42
|
},
|
|
58
|
-
[
|
|
43
|
+
[s]
|
|
59
44
|
);
|
|
60
|
-
return
|
|
45
|
+
return H(T, () => ({
|
|
61
46
|
scrollLeft: () => {
|
|
62
|
-
const
|
|
63
|
-
|
|
47
|
+
const t = s - 200, e = Math.max(t, -i);
|
|
48
|
+
R(e);
|
|
64
49
|
},
|
|
65
50
|
scrollRight: () => {
|
|
66
|
-
const
|
|
67
|
-
|
|
51
|
+
const t = s + 200, e = Math.min(t, 0);
|
|
52
|
+
R(e);
|
|
68
53
|
}
|
|
69
|
-
})), /* @__PURE__ */
|
|
54
|
+
})), /* @__PURE__ */ M("div", { className: w(x.root, F), onMouseEnter: N, onMouseLeave: X, children: /* @__PURE__ */ M(
|
|
70
55
|
"div",
|
|
71
56
|
{
|
|
72
|
-
className:
|
|
73
|
-
style: { transform: `translate3D(${
|
|
74
|
-
ref:
|
|
75
|
-
children: Array.from({ length:
|
|
57
|
+
className: w(x.content, W),
|
|
58
|
+
style: { transform: `translate3D(${s}px, 0, 0)` },
|
|
59
|
+
ref: l,
|
|
60
|
+
children: Array.from({ length: c.length * I }, (t, e) => /* @__PURE__ */ M("div", { className: w(x.item, q), children: S(c[e % c.length], e) }, e))
|
|
76
61
|
}
|
|
77
62
|
) });
|
|
78
63
|
}
|
|
79
|
-
const
|
|
64
|
+
const G = D(P);
|
|
80
65
|
export {
|
|
81
|
-
|
|
66
|
+
G as InfiniteScroll
|
|
82
67
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Label } from './Label';
|
|
2
|
-
export type { LabelColor, LabelProps
|
|
2
|
+
export type { LabelColor, LabelProps } from './types';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
1
3
|
export type LabelSize = 'sm' | 'lg';
|
|
2
4
|
export type LabelColor = 'black' | 'grey' | 'white' | 'solar' | 'indigo' | 'orchre' | 'alpha-white';
|
|
3
5
|
export type LabelProps = {
|
|
4
|
-
children:
|
|
6
|
+
children: ReactNode;
|
|
5
7
|
color: LabelColor;
|
|
6
8
|
size?: LabelSize;
|
|
7
9
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),h=require("../../utils/cn/cn.cjs.js"),g=require("../Label/Label.cjs.js"),C=require("../ProgressButton/ProgressButton.cjs.js"),m=require("../Typography/Typography.cjs.js"),a=require("./stepsCarousel.module.css.cjs.js"),T=({steps:o,colorScheme:n})=>{const[c,b]=r.useState(0),f=r.useRef([]),i=r.useRef(null),u=r.useRef(null),j=r.useCallback(t=>{i.current=t.touches[0].clientX},[]),y=r.useCallback(t=>{u.current=t.touches[0].clientX},[]),d=r.useCallback(t=>{var s;b(t),(s=f.current[t])==null||s.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[]),k=r.useCallback(()=>{if(i.current!==null&&u.current!==null){const t=u.current-i.current,s=50;b(l=>t>s&&l>0?l-1:t<-s&&l<o.length-1?l+1:l)}i.current=null,u.current=null},[o.length]);return e.jsxs("div",{className:a.default.root,"data-scheme":n,children:[e.jsx("div",{className:a.default.stepsContainer,"data-scheme":n,onTouchStart:j,onTouchMove:y,onTouchEnd:k,children:o.map((t,s)=>{const l=c===s;return e.jsxs("button",{ref:p=>{p&&(f.current[s]=p)},className:h.cn(a.default.card,l&&a.default.cardActive),onClick:()=>d(s),type:"button",children:[e.jsx("div",{className:h.cn(a.default.imageWrapper,l&&a.default.imageWrapperActive),children:e.jsx("img",{src:t.image,alt:t.title,className:a.default.image})}),e.jsx("div",{className:a.default.stepLabel,children:l?e.jsxs(e.Fragment,{children:[e.
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),h=require("../../utils/cn/cn.cjs.js"),g=require("../Label/Label.cjs.js"),C=require("../ProgressButton/ProgressButton.cjs.js"),m=require("../Typography/Typography.cjs.js"),a=require("./stepsCarousel.module.css.cjs.js"),T=({steps:o,colorScheme:n})=>{const[c,b]=r.useState(0),f=r.useRef([]),i=r.useRef(null),u=r.useRef(null),j=r.useCallback(t=>{i.current=t.touches[0].clientX},[]),y=r.useCallback(t=>{u.current=t.touches[0].clientX},[]),d=r.useCallback(t=>{var s;b(t),(s=f.current[t])==null||s.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[]),k=r.useCallback(()=>{if(i.current!==null&&u.current!==null){const t=u.current-i.current,s=50;b(l=>t>s&&l>0?l-1:t<-s&&l<o.length-1?l+1:l)}i.current=null,u.current=null},[o.length]);return e.jsxs("div",{className:a.default.root,"data-scheme":n,children:[e.jsx("div",{className:a.default.stepsContainer,"data-scheme":n,onTouchStart:j,onTouchMove:y,onTouchEnd:k,children:o.map((t,s)=>{const l=c===s;return e.jsxs("button",{ref:p=>{p&&(f.current[s]=p)},className:h.cn(a.default.card,l&&a.default.cardActive),onClick:()=>d(s),type:"button",children:[e.jsx("div",{className:h.cn(a.default.imageWrapper,l&&a.default.imageWrapperActive),children:e.jsx("img",{src:t.image,alt:t.title,className:a.default.image})}),e.jsx("div",{className:a.default.stepLabel,children:l?e.jsxs(e.Fragment,{children:[e.jsxs(g.Label,{size:"lg",className:a.default.desktop,color:n==="dark"?"white":"black",children:["Step ",s+1]}),e.jsxs(g.Label,{size:"sm",className:a.default.mobile,color:n==="dark"?"white":"black",children:["Step ",s+1]})]}):e.jsxs(m.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,className:a.default.labelText,children:["Step ",s+1]})}),e.jsxs("div",{className:a.default.textContainer,children:[e.jsx(m.Typography,{as:"h3",defaultVariant:"headingXs",mobileVariant:"headingXxs",children:t.title}),t.description&&e.jsx(m.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:a.default.cardDescription,children:t.description})]})]},`step-${s}`)})}),e.jsx("div",{className:h.cn(a.default.mobile,a.default.progressButtonContainer),children:e.jsx(C.ProgressButton,{invert:n==="dark",left:{disabled:c<=0,onClick:()=>d(c-1)},right:{disabled:c>=o.length-1,onClick:()=>d(c+1)}})})]})};exports.StepsCarousel=T;
|