@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.
Files changed (67) hide show
  1. package/dist/components/ComplexTooltip/ComplexTooltip.cjs.js +1 -1
  2. package/dist/components/ComplexTooltip/ComplexTooltip.d.ts +5 -13
  3. package/dist/components/ComplexTooltip/ComplexTooltip.es.js +49 -59
  4. package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.cjs.js +1 -0
  5. package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.d.ts +10 -0
  6. package/dist/components/ComplexTooltip/components/ComplexTooltipContent/ComplexTooltipContent.es.js +50 -0
  7. package/dist/components/ComplexTooltip/components/ComplexTooltipContent/complexTooltipContent.module.css.cjs.js +1 -0
  8. package/dist/components/ComplexTooltip/components/ComplexTooltipContent/complexTooltipContent.module.css.es.js +15 -0
  9. package/dist/components/ComplexTooltip/components/ComplexTooltipContent/index.d.ts +1 -0
  10. package/dist/components/ComplexTooltip/index.d.ts +1 -0
  11. package/dist/components/ComplexTooltip/types.d.ts +13 -0
  12. package/dist/components/ProductGalleryCard/ProductGalleryCard.cjs.js +1 -1
  13. package/dist/components/ProductGalleryCard/ProductGalleryCard.d.ts +5 -1
  14. package/dist/components/ProductGalleryCard/ProductGalleryCard.es.js +16 -15
  15. package/dist/components/ProductGalleryCard/productGalleryCard.module.css.cjs.js +1 -1
  16. package/dist/components/ProductGalleryCard/productGalleryCard.module.css.es.js +14 -12
  17. package/dist/components/ProductPairs/ProductPairs.cjs.js +1 -0
  18. package/dist/components/ProductPairs/ProductPairs.d.ts +7 -0
  19. package/dist/components/ProductPairs/ProductPairs.es.js +55 -0
  20. package/dist/components/ProductPairs/index.d.ts +1 -0
  21. package/dist/components/ProductPairs/productPairs.module.css.cjs.js +1 -0
  22. package/dist/components/ProductPairs/productPairs.module.css.es.js +17 -0
  23. package/dist/components/StepsCarousel/StepsCarousel.cjs.js +1 -1
  24. package/dist/components/StepsCarousel/StepsCarousel.es.js +76 -56
  25. package/dist/healthspan-marketing-ui.css +1 -1
  26. package/dist/modules/Benefits/Benefits.cjs.js +1 -0
  27. package/dist/modules/Benefits/Benefits.d.ts +14 -0
  28. package/dist/modules/Benefits/Benefits.es.js +53 -0
  29. package/dist/modules/Benefits/benefits.module.css.cjs.js +1 -0
  30. package/dist/modules/Benefits/benefits.module.css.es.js +25 -0
  31. package/dist/modules/Benefits/components/BenefitItem/BenefitItem.cjs.js +1 -0
  32. package/dist/modules/Benefits/components/BenefitItem/BenefitItem.d.ts +7 -0
  33. package/dist/modules/Benefits/components/BenefitItem/BenefitItem.es.js +37 -0
  34. package/dist/modules/Benefits/components/BenefitItem/benefitItem.module.css.cjs.js +1 -0
  35. package/dist/modules/Benefits/components/BenefitItem/benefitItem.module.css.es.js +11 -0
  36. package/dist/modules/Benefits/components/BenefitItem/index.d.ts +1 -0
  37. package/dist/modules/Benefits/components/BenefitTag/BenefitTag.cjs.js +1 -0
  38. package/dist/modules/Benefits/components/BenefitTag/BenefitTag.d.ts +6 -0
  39. package/dist/modules/Benefits/components/BenefitTag/BenefitTag.es.js +17 -0
  40. package/dist/modules/Benefits/components/BenefitTag/benefitTag.module.css.cjs.js +1 -0
  41. package/dist/modules/Benefits/components/BenefitTag/benefitTag.module.css.es.js +9 -0
  42. package/dist/modules/Benefits/components/BenefitTag/index.d.ts +1 -0
  43. package/dist/modules/Benefits/components/index.d.ts +2 -0
  44. package/dist/modules/Benefits/index.d.ts +1 -0
  45. package/dist/modules/PairedProducts/PairedProducts.cjs.js +1 -0
  46. package/dist/modules/PairedProducts/PairedProducts.d.ts +12 -0
  47. package/dist/modules/PairedProducts/PairedProducts.es.js +17 -0
  48. package/dist/modules/PairedProducts/index.d.ts +1 -0
  49. package/dist/modules/PairedProducts/pairedProducts.module.css.cjs.js +1 -0
  50. package/dist/modules/PairedProducts/pairedProducts.module.css.es.js +17 -0
  51. package/dist/modules/ProductsDisplay/ProductsDisplay.cjs.js +1 -1
  52. package/dist/modules/ProductsDisplay/ProductsDisplay.d.ts +1 -1
  53. package/dist/modules/ProductsDisplay/ProductsDisplay.es.js +1 -1
  54. package/dist/modules/ProductsDisplay/types.d.ts +1 -1
  55. package/dist/modules/TypesOfTests/TypesOfTests.cjs.js +1 -0
  56. package/dist/modules/TypesOfTests/TypesOfTests.d.ts +10 -0
  57. package/dist/modules/TypesOfTests/TypesOfTests.es.js +67 -0
  58. package/dist/modules/TypesOfTests/index.d.ts +1 -0
  59. package/dist/modules/TypesOfTests/types.d.ts +4 -0
  60. package/dist/modules/TypesOfTests/typesOfTests.module.css.cjs.js +1 -0
  61. package/dist/modules/TypesOfTests/typesOfTests.module.css.es.js +29 -0
  62. package/dist/utils/useIsMobile.cjs.js +1 -0
  63. package/dist/utils/useIsMobile.d.ts +1 -0
  64. package/dist/utils/useIsMobile.es.js +12 -0
  65. package/package.json +6 -1
  66. package/dist/components/ComplexTooltip/complexTooltip.module.css.cjs.js +0 -1
  67. package/dist/components/ComplexTooltip/complexTooltip.module.css.es.js +0 -17
@@ -1,72 +1,92 @@
1
1
  "use client";
2
- import { jsxs as i, jsx as t, Fragment as u } from "react/jsx-runtime";
3
- import { useState as f, useRef as g, useEffect as v } from "react";
4
- import { cn as m } from "../../utils/cn/cn.es.js";
5
- import { Label as h } from "../Label/Label.es.js";
6
- import { ProgressButton as N } from "../ProgressButton/ProgressButton.es.js";
7
- import { Typography as d } from "../Typography/Typography.es.js";
8
- import e from "./stepsCarousel.module.css.es.js";
9
- const X = ({ steps: p, colorScheme: l }) => {
10
- const [s, c] = f(0), n = g([]);
11
- return v(() => {
12
- var a;
13
- n.current[s] && ((a = n.current[s]) == null || a.scrollIntoView({
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
- }, [s]), /* @__PURE__ */ i("div", { className: e.root, "data-scheme": l, children: [
19
- /* @__PURE__ */ t("div", { className: e.stepsContainer, "data-scheme": l, children: p.map((a, r) => {
20
- const o = s === r;
21
- return /* @__PURE__ */ i(
22
- "button",
23
- {
24
- ref: (b) => {
25
- n.current.splice(r, 1, b);
26
- },
27
- className: m(e.card, o && e.cardActive),
28
- onClick: () => c(r),
29
- type: "button",
30
- children: [
31
- /* @__PURE__ */ t("div", { className: m(e.imageWrapper, o && e.imageWrapperActive), children: /* @__PURE__ */ t("img", { src: a.image, alt: a.title, className: e.image }) }),
32
- /* @__PURE__ */ t("div", { className: e.stepLabel, children: o ? /* @__PURE__ */ i(u, { children: [
33
- /* @__PURE__ */ i(h, { size: "lg", className: e.desktop, color: l === "dark" ? "white" : "black", children: [
34
- "Step ",
35
- r + 1
36
- ] }),
37
- /* @__PURE__ */ i(h, { size: "sm", className: e.mobile, color: l === "dark" ? "white" : "black", children: [
38
- "Step ",
39
- r + 1
40
- ] })
41
- ] }) : /* @__PURE__ */ i(d, { defaultVariant: "labelSm", mobileVariant: "labelXs", emphasis: !0, className: e.labelText, children: [
42
- "Step ",
43
- r + 1
44
- ] }) }),
45
- /* @__PURE__ */ i("div", { className: e.textContainer, children: [
46
- /* @__PURE__ */ t(d, { as: "h3", defaultVariant: "headingXs", mobileVariant: "headingXxs", children: a.title }),
47
- a.description && /* @__PURE__ */ t(d, { as: "p", defaultVariant: "bodyMd", mobileVariant: "bodySm", className: e.cardDescription, children: a.description })
48
- ] })
49
- ]
50
- },
51
- `step-${r}`
52
- );
53
- }) }),
54
- /* @__PURE__ */ t("div", { className: m(e.mobile, e.progressButtonContainer), children: /* @__PURE__ */ t(
55
- N,
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: l === "dark",
77
+ invert: i === "dark",
58
78
  left: {
59
- disabled: s <= 0,
60
- onClick: () => c((a) => a - 1)
79
+ disabled: c <= 0,
80
+ onClick: () => o((e) => e - 1)
61
81
  },
62
82
  right: {
63
- disabled: s >= p.length - 1,
64
- onClick: () => c((a) => a + 1)
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
- X as StepsCarousel
91
+ B as StepsCarousel
72
92
  };