@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,72 +1,92 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Label as
|
|
6
|
-
import { ProgressButton as
|
|
7
|
-
import { Typography as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
const [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { jsxs as l, jsx as n, Fragment as T } from "react/jsx-runtime";
|
|
3
|
+
import { useState as X, useRef as h, useCallback as b, useEffect as V } from "react";
|
|
4
|
+
import { cn as f } from "../../utils/cn/cn.es.js";
|
|
5
|
+
import { Label as N } from "../Label/Label.es.js";
|
|
6
|
+
import { ProgressButton as y } from "../ProgressButton/ProgressButton.es.js";
|
|
7
|
+
import { Typography as p } from "../Typography/Typography.es.js";
|
|
8
|
+
import t from "./stepsCarousel.module.css.es.js";
|
|
9
|
+
const B = ({ steps: s, colorScheme: i }) => {
|
|
10
|
+
const [c, o] = X(0), m = h([]), u = h(null), d = h(null), k = b((e) => {
|
|
11
|
+
u.current = e.touches[0].clientX;
|
|
12
|
+
}, []), v = b((e) => {
|
|
13
|
+
d.current = e.touches[0].clientX;
|
|
14
|
+
}, []), C = b(() => {
|
|
15
|
+
if (u.current !== null && d.current !== null) {
|
|
16
|
+
const e = d.current - u.current, r = 50;
|
|
17
|
+
o((a) => e > r && a > 0 ? a - 1 : e < -r && a < s.length - 1 ? a + 1 : a);
|
|
18
|
+
}
|
|
19
|
+
u.current = null, d.current = null;
|
|
20
|
+
}, [s.length]);
|
|
21
|
+
return V(() => {
|
|
22
|
+
var e;
|
|
23
|
+
m.current[c] && ((e = m.current[c]) == null || e.scrollIntoView({
|
|
14
24
|
behavior: "smooth",
|
|
15
25
|
inline: "center",
|
|
16
26
|
block: "nearest"
|
|
17
27
|
}));
|
|
18
|
-
}, [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
28
|
+
}, [c]), /* @__PURE__ */ l("div", { className: t.root, "data-scheme": i, children: [
|
|
29
|
+
/* @__PURE__ */ n(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: t.stepsContainer,
|
|
33
|
+
"data-scheme": i,
|
|
34
|
+
onTouchStart: k,
|
|
35
|
+
onTouchMove: v,
|
|
36
|
+
onTouchEnd: C,
|
|
37
|
+
children: s.map((e, r) => {
|
|
38
|
+
const a = c === r;
|
|
39
|
+
return /* @__PURE__ */ l(
|
|
40
|
+
"button",
|
|
41
|
+
{
|
|
42
|
+
ref: (g) => {
|
|
43
|
+
g && (m.current[r] = g);
|
|
44
|
+
},
|
|
45
|
+
className: f(t.card, a && t.cardActive),
|
|
46
|
+
onClick: () => o(r),
|
|
47
|
+
type: "button",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ n("div", { className: f(t.imageWrapper, a && t.imageWrapperActive), children: /* @__PURE__ */ n("img", { src: e.image, alt: e.title, className: t.image }) }),
|
|
50
|
+
/* @__PURE__ */ n("div", { className: t.stepLabel, children: a ? /* @__PURE__ */ l(T, { children: [
|
|
51
|
+
/* @__PURE__ */ l(N, { size: "lg", className: t.desktop, color: i === "dark" ? "white" : "black", children: [
|
|
52
|
+
"Step ",
|
|
53
|
+
r + 1
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ l(N, { size: "sm", className: t.mobile, color: i === "dark" ? "white" : "black", children: [
|
|
56
|
+
"Step ",
|
|
57
|
+
r + 1
|
|
58
|
+
] })
|
|
59
|
+
] }) : /* @__PURE__ */ l(p, { defaultVariant: "labelSm", mobileVariant: "labelXs", emphasis: !0, className: t.labelText, children: [
|
|
60
|
+
"Step ",
|
|
61
|
+
r + 1
|
|
62
|
+
] }) }),
|
|
63
|
+
/* @__PURE__ */ l("div", { className: t.textContainer, children: [
|
|
64
|
+
/* @__PURE__ */ n(p, { as: "h3", defaultVariant: "headingXs", mobileVariant: "headingXxs", children: e.title }),
|
|
65
|
+
e.description && /* @__PURE__ */ n(p, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: t.cardDescription, children: e.description })
|
|
66
|
+
] })
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
`step-${r}`
|
|
70
|
+
);
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ n("div", { className: f(t.mobile, t.progressButtonContainer), children: /* @__PURE__ */ n(
|
|
75
|
+
y,
|
|
56
76
|
{
|
|
57
|
-
invert:
|
|
77
|
+
invert: i === "dark",
|
|
58
78
|
left: {
|
|
59
|
-
disabled:
|
|
60
|
-
onClick: () =>
|
|
79
|
+
disabled: c <= 0,
|
|
80
|
+
onClick: () => o((e) => e - 1)
|
|
61
81
|
},
|
|
62
82
|
right: {
|
|
63
|
-
disabled:
|
|
64
|
-
onClick: () =>
|
|
83
|
+
disabled: c >= s.length - 1,
|
|
84
|
+
onClick: () => o((e) => e + 1)
|
|
65
85
|
}
|
|
66
86
|
}
|
|
67
87
|
) })
|
|
68
88
|
] });
|
|
69
89
|
};
|
|
70
90
|
export {
|
|
71
|
-
|
|
91
|
+
B as StepsCarousel
|
|
72
92
|
};
|