@zenpatient-org/healthspan-marketing-ui 0.1.21 → 0.1.22
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/ComplexTooltip/ComplexTooltip.cjs.js +1 -1
- package/dist/components/ComplexTooltip/ComplexTooltip.d.ts +5 -13
- package/dist/components/ComplexTooltip/ComplexTooltip.es.js +49 -59
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.cjs.js +1 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.d.ts +10 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.es.js +50 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/complexTooltipContent.module.css.cjs.js +1 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/complexTooltipContent.module.css.es.js +15 -0
- package/dist/components/ComplexTooltip/components/ComplexTooltipContent/index.d.ts +1 -0
- package/dist/components/ComplexTooltip/index.d.ts +1 -0
- package/dist/components/ComplexTooltip/types.d.ts +13 -0
- package/dist/components/ProductGalleryCard/ProductGalleryCard.cjs.js +1 -1
- package/dist/components/ProductGalleryCard/ProductGalleryCard.d.ts +5 -1
- package/dist/components/ProductGalleryCard/ProductGalleryCard.es.js +16 -15
- package/dist/components/ProductGalleryCard/productGalleryCard.module.css.cjs.js +1 -1
- package/dist/components/ProductGalleryCard/productGalleryCard.module.css.es.js +14 -12
- package/dist/components/ProductPairs/ProductPairs.cjs.js +1 -0
- package/dist/components/ProductPairs/ProductPairs.d.ts +7 -0
- package/dist/components/ProductPairs/ProductPairs.es.js +55 -0
- package/dist/components/ProductPairs/index.d.ts +1 -0
- package/dist/components/ProductPairs/productPairs.module.css.cjs.js +1 -0
- package/dist/components/ProductPairs/productPairs.module.css.es.js +17 -0
- package/dist/components/StepsCarousel/StepsCarousel.cjs.js +1 -1
- package/dist/components/StepsCarousel/StepsCarousel.es.js +76 -56
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/modules/Benefits/Benefits.cjs.js +1 -0
- package/dist/modules/Benefits/Benefits.d.ts +14 -0
- package/dist/modules/Benefits/Benefits.es.js +53 -0
- package/dist/modules/Benefits/benefits.module.css.cjs.js +1 -0
- package/dist/modules/Benefits/benefits.module.css.es.js +25 -0
- package/dist/modules/Benefits/components/BenefitItem/BenefitItem.cjs.js +1 -0
- package/dist/modules/Benefits/components/BenefitItem/BenefitItem.d.ts +7 -0
- package/dist/modules/Benefits/components/BenefitItem/BenefitItem.es.js +37 -0
- package/dist/modules/Benefits/components/BenefitItem/benefitItem.module.css.cjs.js +1 -0
- package/dist/modules/Benefits/components/BenefitItem/benefitItem.module.css.es.js +11 -0
- package/dist/modules/Benefits/components/BenefitItem/index.d.ts +1 -0
- package/dist/modules/Benefits/components/BenefitTag/BenefitTag.cjs.js +1 -0
- package/dist/modules/Benefits/components/BenefitTag/BenefitTag.d.ts +6 -0
- package/dist/modules/Benefits/components/BenefitTag/BenefitTag.es.js +17 -0
- package/dist/modules/Benefits/components/BenefitTag/benefitTag.module.css.cjs.js +1 -0
- package/dist/modules/Benefits/components/BenefitTag/benefitTag.module.css.es.js +9 -0
- package/dist/modules/Benefits/components/BenefitTag/index.d.ts +1 -0
- package/dist/modules/Benefits/components/index.d.ts +2 -0
- package/dist/modules/Benefits/index.d.ts +1 -0
- package/dist/modules/PairedProducts/PairedProducts.cjs.js +1 -0
- package/dist/modules/PairedProducts/PairedProducts.d.ts +12 -0
- package/dist/modules/PairedProducts/PairedProducts.es.js +17 -0
- package/dist/modules/PairedProducts/index.d.ts +1 -0
- package/dist/modules/PairedProducts/pairedProducts.module.css.cjs.js +1 -0
- package/dist/modules/PairedProducts/pairedProducts.module.css.es.js +17 -0
- package/dist/modules/ProductsDisplay/ProductsDisplay.cjs.js +1 -1
- package/dist/modules/ProductsDisplay/ProductsDisplay.d.ts +1 -1
- package/dist/modules/ProductsDisplay/ProductsDisplay.es.js +1 -1
- package/dist/modules/ProductsDisplay/types.d.ts +1 -1
- package/dist/modules/TypesOfTests/TypesOfTests.cjs.js +1 -0
- package/dist/modules/TypesOfTests/TypesOfTests.d.ts +10 -0
- package/dist/modules/TypesOfTests/TypesOfTests.es.js +67 -0
- package/dist/modules/TypesOfTests/index.d.ts +1 -0
- package/dist/modules/TypesOfTests/types.d.ts +4 -0
- package/dist/modules/TypesOfTests/typesOfTests.module.css.cjs.js +1 -0
- package/dist/modules/TypesOfTests/typesOfTests.module.css.es.js +29 -0
- package/dist/utils/useIsMobile.cjs.js +1 -0
- package/dist/utils/useIsMobile.d.ts +1 -0
- package/dist/utils/useIsMobile.es.js +12 -0
- package/package.json +6 -1
- package/dist/components/ComplexTooltip/complexTooltip.module.css.cjs.js +0 -1
- package/dist/components/ComplexTooltip/complexTooltip.module.css.es.js +0 -17
|
@@ -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"),x=require("../../_virtual/Popover.cjs.js"),h=require("../../utils/useIsMobile.cjs.js"),k=require("./components/ComplexTooltipContent/ComplexTooltipContent.cjs.js"),q=({trigger:n,title:p,description:a,link:m,style:f="light",isBlurred:M=!1,children:c,positions:b=["top","bottom","left","right"],onClose:r})=>{const[v,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),r==null||r()},200)},[r]),l=e.useCallback(()=>u(d=>!d),[]),C=e.useMemo(()=>n==="hover"?{onMouseEnter:s,onMouseLeave:t}:{onClick:l},[n,s,t,l]),T=e.useMemo(()=>n==="hover"?{onMouseEnter:s,onMouseLeave:t}:{},[n,s,t]);return e.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]),h.useIsMobile()?c:i.jsx(x.PopoverExports.Popover,{isOpen:v,positions:b,padding:8,onClickOutside:t,content:i.jsx(k.ComplexTooltipContent,{title:p,description:a,link:m,style:f,isBlurred:M,onClose:t,...T}),children:i.jsx("div",{...C,children:c})})};exports.ComplexTooltip=q;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
2
|
import { PopoverPosition } from 'react-tiny-popover';
|
|
3
|
-
import {
|
|
3
|
+
import { CommonComplexTooltipProps } from './types';
|
|
4
4
|
|
|
5
5
|
type ComplexTooltipProps = {
|
|
6
|
+
children: ReactElement;
|
|
6
7
|
trigger: 'hover' | 'click';
|
|
7
|
-
title: string;
|
|
8
|
-
description: string;
|
|
9
|
-
link?: {
|
|
10
|
-
label: string;
|
|
11
|
-
url: string;
|
|
12
|
-
};
|
|
13
|
-
children: React.ReactElement;
|
|
14
|
-
style: Omit<TColorScheme, 'custom'>;
|
|
15
8
|
positions?: Array<PopoverPosition>;
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
export declare const ComplexTooltip: ({ trigger, title, description, link, style, isBlurred, children, positions, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
} & CommonComplexTooltipProps;
|
|
10
|
+
export declare const ComplexTooltip: ({ trigger, title, description, link, style, isBlurred, children, positions, onClose, }: ComplexTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
11
|
export {};
|
|
@@ -1,70 +1,60 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { P as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
isBlurred: l = !1,
|
|
18
|
-
children: x,
|
|
19
|
-
positions: O = ["top", "bottom", "left", "right"]
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useState as C, useRef as P, useCallback as i, 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
|
+
const y = ({
|
|
8
|
+
trigger: t,
|
|
9
|
+
title: m,
|
|
10
|
+
description: a,
|
|
11
|
+
link: f,
|
|
12
|
+
style: v = "light",
|
|
13
|
+
isBlurred: M = !1,
|
|
14
|
+
children: c,
|
|
15
|
+
positions: d = ["top", "bottom", "left", "right"],
|
|
16
|
+
onClose: r
|
|
20
17
|
}) => {
|
|
21
|
-
const [
|
|
22
|
-
|
|
23
|
-
}, []),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
const [h, s] = C(!1), e = P(null), n = i(() => {
|
|
19
|
+
e.current && clearTimeout(e.current), e.current = setTimeout(() => s(!0), 200);
|
|
20
|
+
}, []), o = i(() => {
|
|
21
|
+
e.current = setTimeout(() => {
|
|
22
|
+
s(!1), r == null || r();
|
|
23
|
+
}, 200);
|
|
24
|
+
}, [r]), p = i(() => s((x) => !x), []), T = l(() => t === "hover" ? {
|
|
25
|
+
onMouseEnter: n,
|
|
26
|
+
onMouseLeave: o
|
|
28
27
|
} : {
|
|
29
28
|
onClick: p
|
|
30
|
-
}, [
|
|
31
|
-
onMouseEnter:
|
|
32
|
-
onMouseLeave:
|
|
33
|
-
} : {}, [
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
}, []), /* @__PURE__ */
|
|
37
|
-
|
|
29
|
+
}, [t, n, o, p]), b = l(() => t === "hover" ? {
|
|
30
|
+
onMouseEnter: n,
|
|
31
|
+
onMouseLeave: o
|
|
32
|
+
} : {}, [t, n, o]);
|
|
33
|
+
return k(() => () => {
|
|
34
|
+
e.current && clearTimeout(e.current);
|
|
35
|
+
}, []), O() ? c : /* @__PURE__ */ u(
|
|
36
|
+
E.Popover,
|
|
38
37
|
{
|
|
39
|
-
isOpen:
|
|
40
|
-
positions:
|
|
38
|
+
isOpen: h,
|
|
39
|
+
positions: d,
|
|
41
40
|
padding: 8,
|
|
42
|
-
onClickOutside:
|
|
43
|
-
content: /* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
suffixIcon: f.ARROW_FORWARD,
|
|
57
|
-
as: "a",
|
|
58
|
-
href: a.url,
|
|
59
|
-
inverted: c === "dark" && !l || c === "light" && l,
|
|
60
|
-
children: a.label
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
] }),
|
|
64
|
-
children: /* @__PURE__ */ o("div", { className: t.trigger, ...E, children: x })
|
|
41
|
+
onClickOutside: o,
|
|
42
|
+
content: /* @__PURE__ */ u(
|
|
43
|
+
L,
|
|
44
|
+
{
|
|
45
|
+
title: m,
|
|
46
|
+
description: a,
|
|
47
|
+
link: f,
|
|
48
|
+
style: v,
|
|
49
|
+
isBlurred: M,
|
|
50
|
+
onClose: o,
|
|
51
|
+
...b
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
children: /* @__PURE__ */ u("div", { ...T, children: c })
|
|
65
55
|
}
|
|
66
56
|
);
|
|
67
57
|
};
|
|
68
58
|
export {
|
|
69
|
-
|
|
59
|
+
y as ComplexTooltip
|
|
70
60
|
};
|
package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.cjs.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../../Icon/Icon.cjs.js"),r=require("../../../Icon/constants.cjs.js"),h=require("../../../TextButton/TextButton.cjs.js"),s=require("../../../Typography/Typography.cjs.js"),x=require("../../../../utils/cn/cn.cjs.js"),t=require("./complexTooltipContent.module.css.cjs.js"),_=({style:n,title:l,description:u,link:o,isBlurred:c,className:i,onMouseEnter:d,onMouseLeave:p,onClose:a})=>e.jsxs("div",{className:x.cn(t.default.content,c&&t.default.blurred,i),"data-style":n,onMouseEnter:d,onMouseLeave:p,children:[e.jsxs("div",{className:t.default.contentHeader,children:[e.jsx(s.Typography,{as:"h4",defaultVariant:"headingSm",children:l}),a&&e.jsxs("button",{className:t.default.closeButton,onClick:a,children:["(",e.jsx(m.Icon,{name:r.EIconName.CLOSE,className:t.default.closeIcon}),")"]})]}),e.jsx(s.Typography,{as:"p",defaultVariant:"bodySm",children:u}),o&&e.jsx(h.TextButton,{suffixIcon:r.EIconName.ARROW_FORWARD,as:"a",href:o.url,inverted:n==="dark"&&!c||n==="light"&&c,children:o.label})]});exports.ComplexTooltipContent=_;
|
package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonComplexTooltipProps } from '../../types';
|
|
2
|
+
|
|
3
|
+
type ComplexTooltipContentProps = {
|
|
4
|
+
className?: string;
|
|
5
|
+
onMouseEnter?: () => void;
|
|
6
|
+
onMouseLeave?: () => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
} & CommonComplexTooltipProps;
|
|
9
|
+
export declare const ComplexTooltipContent: ({ style, title, description, link, isBlurred, className, onMouseEnter, onMouseLeave, onClose, }: ComplexTooltipContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.es.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as h } from "../../../Icon/Icon.es.js";
|
|
3
|
+
import { EIconName as c } from "../../../Icon/constants.es.js";
|
|
4
|
+
import { TextButton as u } from "../../../TextButton/TextButton.es.js";
|
|
5
|
+
import { Typography as i } from "../../../Typography/Typography.es.js";
|
|
6
|
+
import { cn as x } from "../../../../utils/cn/cn.es.js";
|
|
7
|
+
import o from "./complexTooltipContent.module.css.es.js";
|
|
8
|
+
const C = ({
|
|
9
|
+
style: r,
|
|
10
|
+
title: l,
|
|
11
|
+
description: s,
|
|
12
|
+
link: e,
|
|
13
|
+
isBlurred: a,
|
|
14
|
+
className: d,
|
|
15
|
+
onMouseEnter: p,
|
|
16
|
+
onMouseLeave: f,
|
|
17
|
+
onClose: m
|
|
18
|
+
}) => /* @__PURE__ */ n(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: x(o.content, a && o.blurred, d),
|
|
22
|
+
"data-style": r,
|
|
23
|
+
onMouseEnter: p,
|
|
24
|
+
onMouseLeave: f,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ n("div", { className: o.contentHeader, children: [
|
|
27
|
+
/* @__PURE__ */ t(i, { as: "h4", defaultVariant: "headingSm", children: l }),
|
|
28
|
+
m && /* @__PURE__ */ n("button", { className: o.closeButton, onClick: m, children: [
|
|
29
|
+
"(",
|
|
30
|
+
/* @__PURE__ */ t(h, { name: c.CLOSE, className: o.closeIcon }),
|
|
31
|
+
")"
|
|
32
|
+
] })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ t(i, { as: "p", defaultVariant: "bodySm", children: s }),
|
|
35
|
+
e && /* @__PURE__ */ t(
|
|
36
|
+
u,
|
|
37
|
+
{
|
|
38
|
+
suffixIcon: c.ARROW_FORWARD,
|
|
39
|
+
as: "a",
|
|
40
|
+
href: e.url,
|
|
41
|
+
inverted: r === "dark" && !a || r === "light" && a,
|
|
42
|
+
children: e.label
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
export {
|
|
49
|
+
C as ComplexTooltipContent
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="complexTooltipContent-module__content___gGk3B",e="complexTooltipContent-module__blurred___5ZgFB",t="complexTooltipContent-module__contentHeader___zWu-A",n="complexTooltipContent-module__closeButton___LvHd5",l="complexTooltipContent-module__closeIcon___8Nx3Z",c={content:o,blurred:e,contentHeader:t,closeButton:n,closeIcon:l};exports.blurred=e;exports.closeButton=n;exports.closeIcon=l;exports.content=o;exports.contentHeader=t;exports.default=c;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const o = "complexTooltipContent-module__content___gGk3B", t = "complexTooltipContent-module__blurred___5ZgFB", e = "complexTooltipContent-module__contentHeader___zWu-A", n = "complexTooltipContent-module__closeButton___LvHd5", c = "complexTooltipContent-module__closeIcon___8Nx3Z", l = {
|
|
2
|
+
content: o,
|
|
3
|
+
blurred: t,
|
|
4
|
+
contentHeader: e,
|
|
5
|
+
closeButton: n,
|
|
6
|
+
closeIcon: c
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
t as blurred,
|
|
10
|
+
n as closeButton,
|
|
11
|
+
c as closeIcon,
|
|
12
|
+
o as content,
|
|
13
|
+
e as contentHeader,
|
|
14
|
+
l as default
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ComplexTooltipContent } from './ComplexTooltipContent';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TColorScheme } from '../../types/common';
|
|
2
|
+
|
|
3
|
+
export type CommonComplexTooltipProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
link?: {
|
|
7
|
+
label: string;
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
style: Omit<TColorScheme, 'custom'>;
|
|
11
|
+
isBlurred?: boolean;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("../Button/Button.cjs.js"),c=require("../Typography/Typography.cjs.js"),i=require("../../utils/cn/cn.cjs.js"),a=require("./productGalleryCard.module.css.cjs.js"),f=({name:u,price:d,image:p,link:m,buttons:r,isHoverable:n=!0})=>{const o=t=>{t.preventDefault(),t.stopPropagation()};return e.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:a.default.root,children:[e.jsxs("div",{className:a.default.productInfo,children:[e.jsx(c.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:a.default.title,children:u}),e.jsx(c.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:a.default.price,children:d})]}),e.jsx("img",{src:p,alt:"product image",className:a.default.productImage}),e.jsx("div",{onClick:o,className:i.cn(a.default.buttonContainerDesktop,n&&a.default.hoverableButtons),children:r.map((t,l)=>e.jsx(s.Button,{size:"sm",...t,children:t.label},l))}),e.jsx("div",{onClick:o,className:i.cn(a.default.buttonContainerMobile,n&&a.default.hoverableButtons),children:r.map((t,l)=>e.jsx(s.Button,{size:"xs",...t,children:t.label},l))})]})};exports.ProductGalleryCard=f;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { TProductGalleryCardView } from './types';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
type ProductGalleryCardProps = {
|
|
4
|
+
isHoverable?: boolean;
|
|
5
|
+
} & TProductGalleryCardView;
|
|
6
|
+
export declare const ProductGalleryCard: ({ name, price, image, link, buttons, isHoverable }: ProductGalleryCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { Typography as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Button as s } from "../Button/Button.es.js";
|
|
3
|
+
import { Typography as c } from "../Typography/Typography.es.js";
|
|
4
|
+
import { cn as m } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import e from "./productGalleryCard.module.css.es.js";
|
|
6
|
+
const k = ({ name: d, price: p, image: h, link: u, buttons: t, isHoverable: o = !0 }) => {
|
|
7
|
+
const i = (r) => {
|
|
8
|
+
r.preventDefault(), r.stopPropagation();
|
|
8
9
|
};
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
/* @__PURE__ */ a(
|
|
12
|
-
/* @__PURE__ */ a(
|
|
10
|
+
return /* @__PURE__ */ n("a", { href: u, target: "_blank", rel: "noopener noreferrer", className: e.root, children: [
|
|
11
|
+
/* @__PURE__ */ n("div", { className: e.productInfo, children: [
|
|
12
|
+
/* @__PURE__ */ a(c, { defaultVariant: "labelXl", mobileVariant: "labelLg", className: e.title, children: d }),
|
|
13
|
+
/* @__PURE__ */ a(c, { defaultVariant: "labelXl", mobileVariant: "labelLg", className: e.price, children: p })
|
|
13
14
|
] }),
|
|
14
|
-
/* @__PURE__ */ a("img", { src:
|
|
15
|
-
/* @__PURE__ */ a("div", { onClick:
|
|
16
|
-
/* @__PURE__ */ a("div", { onClick:
|
|
15
|
+
/* @__PURE__ */ a("img", { src: h, alt: "product image", className: e.productImage }),
|
|
16
|
+
/* @__PURE__ */ a("div", { onClick: i, className: m(e.buttonContainerDesktop, o && e.hoverableButtons), children: t.map((r, l) => /* @__PURE__ */ a(s, { size: "sm", ...r, children: r.label }, l)) }),
|
|
17
|
+
/* @__PURE__ */ a("div", { onClick: i, className: m(e.buttonContainerMobile, o && e.hoverableButtons), children: t.map((r, l) => /* @__PURE__ */ a(s, { size: "xs", ...r, children: r.label }, l)) })
|
|
17
18
|
] });
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
k as ProductGalleryCard
|
|
21
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="productGalleryCard-module__root___oGJjs",t="productGalleryCard-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="productGalleryCard-module__root___oGJjs",t="productGalleryCard-module__productInfo___IZeoL",e="productGalleryCard-module__title___dnRaF",r="productGalleryCard-module__price___dNy0O",l="productGalleryCard-module__buttonContainerDesktop___A9g0U",n="productGalleryCard-module__hoverableButtons___9AE80",u="productGalleryCard-module__buttonContainerMobile___molmH",_="productGalleryCard-module__productImage___uSNso",d={root:o,productInfo:t,title:e,price:r,buttonContainerDesktop:l,hoverableButtons:n,buttonContainerMobile:u,productImage:_};exports.buttonContainerDesktop=l;exports.buttonContainerMobile=u;exports.default=d;exports.hoverableButtons=n;exports.price=r;exports.productImage=_;exports.productInfo=t;exports.root=o;exports.title=e;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
const o = "productGalleryCard-module__root___oGJjs", t = "productGalleryCard-
|
|
1
|
+
const o = "productGalleryCard-module__root___oGJjs", t = "productGalleryCard-module__productInfo___IZeoL", e = "productGalleryCard-module__title___dnRaF", r = "productGalleryCard-module__price___dNy0O", _ = "productGalleryCard-module__buttonContainerDesktop___A9g0U", l = "productGalleryCard-module__hoverableButtons___9AE80", n = "productGalleryCard-module__buttonContainerMobile___molmH", d = "productGalleryCard-module__productImage___uSNso", u = {
|
|
2
2
|
root: o,
|
|
3
|
-
|
|
4
|
-
productInfo: r,
|
|
3
|
+
productInfo: t,
|
|
5
4
|
title: e,
|
|
6
|
-
price:
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
price: r,
|
|
6
|
+
buttonContainerDesktop: _,
|
|
7
|
+
hoverableButtons: l,
|
|
8
|
+
buttonContainerMobile: n,
|
|
9
|
+
productImage: d
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
_ as buttonContainerDesktop,
|
|
13
|
+
n as buttonContainerMobile,
|
|
14
|
+
u as default,
|
|
15
|
+
l as hoverableButtons,
|
|
16
|
+
r as price,
|
|
17
|
+
d as productImage,
|
|
18
|
+
t as productInfo,
|
|
17
19
|
o as root,
|
|
18
20
|
e as title
|
|
19
21
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("../../node_modules/swiper/modules/navigation.cjs.js"),s=require("../../node_modules/swiper/swiper-react.cjs.js"),h=require("../../utils/useSwiper/useSwiper.cjs.js"),w=require("../ProgressButton/ProgressButton.cjs.js"),m=require("../ProductGalleryCard/ProductGalleryCard.cjs.js");;/* empty css */;/* empty css */;/* empty css */const r=require("./productPairs.module.css.cjs.js"),g=[P.default],q=({productCards:i})=>{const{isBeginning:l,isEnd:t,setIsEnd:n,handleSlideChange:a,handlePrevClick:o,handleNextClick:d,onSwiperInit:c,handleSwiperResize:u}=h.useSwiper();return e.jsxs("div",{className:r.default.root,children:[e.jsx("div",{className:r.default.carouselArea,children:e.jsx(s.Swiper,{onSwiper:c,onResize:u,onSlideChange:a,onReachEnd:()=>n(!0),modules:g,spaceBetween:0,slidesPerView:"auto",className:r.default.swiper,children:i.slice(0,2).map((p,S)=>e.jsx(s.SwiperSlide,{className:r.default.swiperSlide,children:e.jsx("div",{className:r.default.card,children:e.jsx(m.ProductGalleryCard,{...p,isHoverable:!1})})},S))})}),e.jsx("div",{className:r.default.swiperControlsMobile,children:e.jsx(w.ProgressButton,{left:{disabled:l,onClick:o},right:{disabled:t,onClick:d}})})]})};exports.ProductPairs=q;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TProductGalleryCardView } from '../ProductGalleryCard';
|
|
2
|
+
|
|
3
|
+
type ProductPairsProps = {
|
|
4
|
+
productCards: Array<TProductGalleryCardView>;
|
|
5
|
+
};
|
|
6
|
+
export declare const ProductPairs: ({ productCards }: ProductPairsProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import S from "../../node_modules/swiper/modules/navigation.es.js";
|
|
4
|
+
import { Swiper as w, SwiperSlide as u } from "../../node_modules/swiper/swiper-react.es.js";
|
|
5
|
+
import { useSwiper as f } from "../../utils/useSwiper/useSwiper.es.js";
|
|
6
|
+
import { ProgressButton as C } from "../ProgressButton/ProgressButton.es.js";
|
|
7
|
+
import { ProductGalleryCard as N } from "../ProductGalleryCard/ProductGalleryCard.es.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
import i from "./productPairs.module.css.es.js";
|
|
12
|
+
const g = [S], y = ({ productCards: r }) => {
|
|
13
|
+
const {
|
|
14
|
+
isBeginning: s,
|
|
15
|
+
isEnd: o,
|
|
16
|
+
setIsEnd: l,
|
|
17
|
+
handleSlideChange: n,
|
|
18
|
+
handlePrevClick: a,
|
|
19
|
+
handleNextClick: t,
|
|
20
|
+
onSwiperInit: d,
|
|
21
|
+
handleSwiperResize: c
|
|
22
|
+
} = f();
|
|
23
|
+
return /* @__PURE__ */ h("div", { className: i.root, children: [
|
|
24
|
+
/* @__PURE__ */ e("div", { className: i.carouselArea, children: /* @__PURE__ */ e(
|
|
25
|
+
w,
|
|
26
|
+
{
|
|
27
|
+
onSwiper: d,
|
|
28
|
+
onResize: c,
|
|
29
|
+
onSlideChange: n,
|
|
30
|
+
onReachEnd: () => l(!0),
|
|
31
|
+
modules: g,
|
|
32
|
+
spaceBetween: 0,
|
|
33
|
+
slidesPerView: "auto",
|
|
34
|
+
className: i.swiper,
|
|
35
|
+
children: r.slice(0, 2).map((m, p) => /* @__PURE__ */ e(u, { className: i.swiperSlide, children: /* @__PURE__ */ e("div", { className: i.card, children: /* @__PURE__ */ e(N, { ...m, isHoverable: !1 }) }) }, p))
|
|
36
|
+
}
|
|
37
|
+
) }),
|
|
38
|
+
/* @__PURE__ */ e("div", { className: i.swiperControlsMobile, children: /* @__PURE__ */ e(
|
|
39
|
+
C,
|
|
40
|
+
{
|
|
41
|
+
left: {
|
|
42
|
+
disabled: s,
|
|
43
|
+
onClick: a
|
|
44
|
+
},
|
|
45
|
+
right: {
|
|
46
|
+
disabled: o,
|
|
47
|
+
onClick: t
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
) })
|
|
51
|
+
] });
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
y as ProductPairs
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ProductPairs } from './ProductPairs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r="productPairs-module__root___TubBM",e="productPairs-module__carouselArea___ukTIF",o="productPairs-module__swiper___uuzGb",s="productPairs-module__swiperControlsMobile___ar7DY",_="productPairs-module__swiperSlide___fblEe",i="productPairs-module__card___n47uN",l={root:r,carouselArea:e,swiper:o,swiperControlsMobile:s,swiperSlide:_,card:i};exports.card=i;exports.carouselArea=e;exports.default=l;exports.root=r;exports.swiper=o;exports.swiperControlsMobile=s;exports.swiperSlide=_;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const o = "productPairs-module__root___TubBM", r = "productPairs-module__carouselArea___ukTIF", e = "productPairs-module__swiper___uuzGb", s = "productPairs-module__swiperControlsMobile___ar7DY", _ = "productPairs-module__swiperSlide___fblEe", t = "productPairs-module__card___n47uN", i = {
|
|
2
|
+
root: o,
|
|
3
|
+
carouselArea: r,
|
|
4
|
+
swiper: e,
|
|
5
|
+
swiperControlsMobile: s,
|
|
6
|
+
swiperSlide: _,
|
|
7
|
+
card: t
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
t as card,
|
|
11
|
+
r as carouselArea,
|
|
12
|
+
i as default,
|
|
13
|
+
o as root,
|
|
14
|
+
e as swiper,
|
|
15
|
+
s as swiperControlsMobile,
|
|
16
|
+
_ as swiperSlide
|
|
17
|
+
};
|
|
@@ -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 t=require("react/jsx-runtime"),l=require("react"),f=require("../../utils/cn/cn.cjs.js"),p=require("../Label/Label.cjs.js"),k=require("../ProgressButton/ProgressButton.cjs.js"),m=require("../Typography/Typography.cjs.js"),a=require("./stepsCarousel.module.css.cjs.js"),T=({steps:i,colorScheme:c})=>{const[n,o]=l.useState(0),h=l.useRef([]),u=l.useRef(null),d=l.useRef(null),g=l.useCallback(e=>{u.current=e.touches[0].clientX},[]),j=l.useCallback(e=>{d.current=e.touches[0].clientX},[]),y=l.useCallback(()=>{if(u.current!==null&&d.current!==null){const e=d.current-u.current,s=50;o(r=>e>s&&r>0?r-1:e<-s&&r<i.length-1?r+1:r)}u.current=null,d.current=null},[i.length]);return l.useEffect(()=>{var e;h.current[n]&&((e=h.current[n])==null||e.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}))},[n]),t.jsxs("div",{className:a.default.root,"data-scheme":c,children:[t.jsx("div",{className:a.default.stepsContainer,"data-scheme":c,onTouchStart:g,onTouchMove:j,onTouchEnd:y,children:i.map((e,s)=>{const r=n===s;return t.jsxs("button",{ref:b=>{b&&(h.current[s]=b)},className:f.cn(a.default.card,r&&a.default.cardActive),onClick:()=>o(s),type:"button",children:[t.jsx("div",{className:f.cn(a.default.imageWrapper,r&&a.default.imageWrapperActive),children:t.jsx("img",{src:e.image,alt:e.title,className:a.default.image})}),t.jsx("div",{className:a.default.stepLabel,children:r?t.jsxs(t.Fragment,{children:[t.jsxs(p.Label,{size:"lg",className:a.default.desktop,color:c==="dark"?"white":"black",children:["Step ",s+1]}),t.jsxs(p.Label,{size:"sm",className:a.default.mobile,color:c==="dark"?"white":"black",children:["Step ",s+1]})]}):t.jsxs(m.Typography,{defaultVariant:"labelSm",mobileVariant:"labelXs",emphasis:!0,className:a.default.labelText,children:["Step ",s+1]})}),t.jsxs("div",{className:a.default.textContainer,children:[t.jsx(m.Typography,{as:"h3",defaultVariant:"headingXs",mobileVariant:"headingXxs",children:e.title}),e.description&&t.jsx(m.Typography,{as:"p",defaultVariant:"bodyMd",mobileVariant:"bodySm",className:a.default.cardDescription,children:e.description})]})]},`step-${s}`)})}),t.jsx("div",{className:f.cn(a.default.mobile,a.default.progressButtonContainer),children:t.jsx(k.ProgressButton,{invert:c==="dark",left:{disabled:n<=0,onClick:()=>o(e=>e-1)},right:{disabled:n>=i.length-1,onClick:()=>o(e=>e+1)}})})]})};exports.StepsCarousel=T;
|