@zenpatient-org/healthspan-marketing-ui 0.1.27 → 0.1.29

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 (161) hide show
  1. package/dist/components/ComplexTooltip/ComplexTooltip.cjs.js +1 -1
  2. package/dist/components/ComplexTooltip/ComplexTooltip.es.js +16 -14
  3. package/dist/components/ComplexTooltip/complexTooltip.module.css.cjs.js +1 -0
  4. package/dist/components/ComplexTooltip/complexTooltip.module.css.es.js +7 -0
  5. package/dist/components/FAQComponent/FAQComponent.cjs.js +1 -0
  6. package/dist/components/FAQComponent/FAQComponent.d.ts +3 -0
  7. package/dist/components/FAQComponent/FAQComponent.es.js +27 -0
  8. package/dist/components/FAQComponent/components/FAQComponentItem/FAQComponentItem.cjs.js +1 -0
  9. package/dist/components/FAQComponent/components/FAQComponentItem/FAQComponentItem.d.ts +3 -0
  10. package/dist/components/{Accordion/components/AccordionItem/AccordionItem.es.js → FAQComponent/components/FAQComponentItem/FAQComponentItem.es.js} +6 -7
  11. package/dist/components/FAQComponent/components/FAQComponentItem/faqComponentItem.module.css.cjs.js +1 -0
  12. package/dist/components/FAQComponent/components/FAQComponentItem/faqComponentItem.module.css.es.js +25 -0
  13. package/dist/components/FAQComponent/components/FAQComponentItem/index.d.ts +2 -0
  14. package/dist/components/FAQComponent/components/FAQComponentItem/types.d.ts +9 -0
  15. package/dist/components/FAQComponent/components/index.d.ts +1 -0
  16. package/dist/components/FAQComponent/faqComponent.module.css.cjs.js +1 -0
  17. package/dist/components/FAQComponent/faqComponent.module.css.es.js +7 -0
  18. package/dist/components/FAQComponent/index.d.ts +1 -0
  19. package/dist/components/FAQComponent/types.d.ts +10 -0
  20. package/dist/components/Icon/constants.cjs.js +1 -1
  21. package/dist/components/Icon/constants.d.ts +5 -1
  22. package/dist/components/Icon/constants.es.js +6 -2
  23. package/dist/components/Icon/iconsMap.cjs.js +1 -1
  24. package/dist/components/Icon/iconsMap.es.js +65 -57
  25. package/dist/components/IconBracket/IconBracket.cjs.js +1 -1
  26. package/dist/components/IconBracket/IconBracket.d.ts +1 -1
  27. package/dist/components/IconBracket/IconBracket.es.js +13 -12
  28. package/dist/components/IconBracket/iconBracket.module.css.cjs.js +1 -1
  29. package/dist/components/IconBracket/iconBracket.module.css.es.js +11 -5
  30. package/dist/components/IconBracket/types.d.ts +3 -2
  31. package/dist/components/Pagination/Pagination.cjs.js +1 -0
  32. package/dist/components/Pagination/Pagination.d.ts +9 -0
  33. package/dist/components/Pagination/Pagination.es.js +55 -0
  34. package/dist/components/Pagination/Pagination.module.css.cjs.js +1 -0
  35. package/dist/components/Pagination/Pagination.module.css.es.js +19 -0
  36. package/dist/components/Pagination/index.d.ts +1 -0
  37. package/dist/components/RatingStars/RatingStars.cjs.js +1 -1
  38. package/dist/components/RatingStars/RatingStars.d.ts +2 -1
  39. package/dist/components/RatingStars/RatingStars.es.js +13 -13
  40. package/dist/components/StepsCarousel/StepsCarousel.cjs.js +1 -1
  41. package/dist/components/StepsCarousel/StepsCarousel.es.js +38 -42
  42. package/dist/healthspan-marketing-ui.css +1 -1
  43. package/dist/icons/action/bracket-left.svg.cjs.js +1 -1
  44. package/dist/icons/action/bracket-left.svg.es.js +2 -2
  45. package/dist/icons/action/bracket-right.svg.cjs.js +1 -1
  46. package/dist/icons/action/bracket-right.svg.es.js +2 -2
  47. package/dist/icons/bold/arrow-bold.svg.cjs.js +1 -0
  48. package/dist/icons/bold/arrow-bold.svg.es.js +5 -0
  49. package/dist/icons/bold/close-bold.svg.cjs.js +1 -0
  50. package/dist/icons/bold/close-bold.svg.es.js +5 -0
  51. package/dist/icons/bold/dot-bold.svg.cjs.js +1 -0
  52. package/dist/icons/bold/dot-bold.svg.es.js +5 -0
  53. package/dist/icons/bold/plus-bold.svg.cjs.js +1 -0
  54. package/dist/icons/bold/plus-bold.svg.es.js +5 -0
  55. package/dist/modules/FAQModule/FAQModule.cjs.js +1 -0
  56. package/dist/modules/FAQModule/FAQModule.d.ts +3 -0
  57. package/dist/modules/FAQModule/FAQModule.es.js +17 -0
  58. package/dist/modules/FAQModule/faqModule.module.css.cjs.js +1 -0
  59. package/dist/modules/FAQModule/faqModule.module.css.es.js +19 -0
  60. package/dist/modules/FAQModule/index.d.ts +1 -0
  61. package/dist/modules/HighestStandards/HighestStandards.cjs.js +1 -0
  62. package/dist/modules/HighestStandards/HighestStandards.d.ts +3 -0
  63. package/dist/modules/HighestStandards/HighestStandards.es.js +26 -0
  64. package/dist/modules/HighestStandards/components/TabsMenu/TabsMenu.cjs.js +1 -0
  65. package/dist/modules/HighestStandards/components/TabsMenu/TabsMenu.d.ts +3 -0
  66. package/dist/modules/HighestStandards/components/TabsMenu/TabsMenu.es.js +24 -0
  67. package/dist/modules/HighestStandards/components/TabsMenu/components/TabsMenutem/TabsMenuItem.cjs.js +1 -0
  68. package/dist/modules/HighestStandards/components/TabsMenu/components/TabsMenutem/TabsMenuItem.d.ts +3 -0
  69. package/dist/modules/HighestStandards/components/TabsMenu/components/TabsMenutem/TabsMenuItem.es.js +31 -0
  70. package/dist/modules/HighestStandards/components/TabsMenu/components/TabsMenutem/index.d.ts +2 -0
  71. package/dist/modules/HighestStandards/components/TabsMenu/components/TabsMenutem/tabsMenuItem.module.css.cjs.js +1 -0
  72. package/dist/modules/HighestStandards/components/TabsMenu/components/TabsMenutem/tabsMenuItem.module.css.es.js +23 -0
  73. package/dist/modules/HighestStandards/components/TabsMenu/components/TabsMenutem/types.d.ts +9 -0
  74. package/dist/modules/HighestStandards/components/TabsMenu/components/index.d.ts +1 -0
  75. package/dist/modules/HighestStandards/components/TabsMenu/index.d.ts +1 -0
  76. package/dist/modules/HighestStandards/components/TabsMenu/tabsMenu.module.css.cjs.js +1 -0
  77. package/dist/{components/Accordion/accordion.module.css.es.js → modules/HighestStandards/components/TabsMenu/tabsMenu.module.css.es.js} +1 -1
  78. package/dist/modules/HighestStandards/components/TabsMenu/types.d.ts +6 -0
  79. package/dist/modules/HighestStandards/components/index.d.ts +1 -0
  80. package/dist/modules/HighestStandards/highestStandards.module.css.cjs.js +1 -0
  81. package/dist/modules/HighestStandards/highestStandards.module.css.es.js +23 -0
  82. package/dist/modules/HighestStandards/index.d.ts +1 -0
  83. package/dist/modules/HighestStandards/types.d.ts +11 -0
  84. package/dist/modules/ImageWithText/ImageWithText.cjs.js +1 -1
  85. package/dist/modules/ImageWithText/ImageWithText.d.ts +1 -1
  86. package/dist/modules/ImageWithText/ImageWithText.es.js +17 -17
  87. package/dist/modules/ImageWithText/types.d.ts +4 -3
  88. package/dist/modules/IngredientHighlight/IngredientHighlight.cjs.js +1 -0
  89. package/dist/modules/IngredientHighlight/IngredientHighlight.d.ts +3 -0
  90. package/dist/modules/IngredientHighlight/IngredientHighlight.es.js +26 -0
  91. package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.cjs.js +1 -0
  92. package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.d.ts +3 -0
  93. package/dist/modules/IngredientHighlight/components/Ingredient/Ingredient.es.js +11 -0
  94. package/dist/modules/IngredientHighlight/components/Ingredient/index.d.ts +2 -0
  95. package/dist/modules/IngredientHighlight/components/Ingredient/ingredient.module.css.cjs.js +1 -0
  96. package/dist/modules/IngredientHighlight/components/Ingredient/ingredient.module.css.es.js +15 -0
  97. package/dist/modules/IngredientHighlight/components/Ingredient/types.d.ts +7 -0
  98. package/dist/modules/IngredientHighlight/components/index.d.ts +1 -0
  99. package/dist/modules/IngredientHighlight/index.d.ts +2 -0
  100. package/dist/modules/IngredientHighlight/ingredientHighlight.module.css.cjs.js +1 -0
  101. package/dist/modules/IngredientHighlight/ingredientHighlight.module.css.es.js +15 -0
  102. package/dist/modules/IngredientHighlight/types.d.ts +7 -0
  103. package/dist/modules/Reviews/Reviews.cjs.js +1 -0
  104. package/dist/modules/Reviews/Reviews.d.ts +15 -0
  105. package/dist/modules/Reviews/Reviews.es.js +42 -0
  106. package/dist/modules/Reviews/components/ReviewCard/ReviewCard.cjs.js +1 -0
  107. package/dist/modules/Reviews/components/ReviewCard/ReviewCard.d.ts +3 -0
  108. package/dist/modules/Reviews/components/ReviewCard/ReviewCard.es.js +17 -0
  109. package/dist/modules/Reviews/components/ReviewCard/index.d.ts +1 -0
  110. package/dist/modules/Reviews/components/ReviewCard/reviewCard.module.css.cjs.js +1 -0
  111. package/dist/modules/Reviews/components/ReviewCard/reviewCard.module.css.es.js +13 -0
  112. package/dist/modules/Reviews/components/ReviewList/ReviewList.cjs.js +1 -0
  113. package/dist/modules/Reviews/components/ReviewList/ReviewList.d.ts +10 -0
  114. package/dist/modules/Reviews/components/ReviewList/ReviewList.es.js +21 -0
  115. package/dist/modules/Reviews/components/ReviewList/index.d.ts +1 -0
  116. package/dist/modules/Reviews/components/ReviewList/reviewList.module.css.cjs.js +1 -0
  117. package/dist/modules/Reviews/components/ReviewList/reviewList.module.css.es.js +7 -0
  118. package/dist/modules/Reviews/index.d.ts +1 -0
  119. package/dist/modules/Reviews/reviews.module.css.cjs.js +1 -0
  120. package/dist/modules/Reviews/reviews.module.css.es.js +21 -0
  121. package/dist/modules/Reviews/types.d.ts +8 -0
  122. package/dist/modules/SlidingTabsGallery/SlidingTabsGallery.cjs.js +1 -1
  123. package/dist/modules/SlidingTabsGallery/SlidingTabsGallery.es.js +24 -25
  124. package/dist/modules/SlidingTabsGallery/SlidingTabsGallery.module.css.cjs.js +1 -1
  125. package/dist/modules/SlidingTabsGallery/SlidingTabsGallery.module.css.es.js +24 -20
  126. package/dist/modules/Testimonial/Testimonial.cjs.js +1 -1
  127. package/dist/modules/Testimonial/Testimonial.es.js +58 -40
  128. package/dist/modules/Testimonial/components/TextCard/TextCard.cjs.js +1 -1
  129. package/dist/modules/Testimonial/components/TextCard/TextCard.es.js +1 -1
  130. package/dist/modules/Testimonial/components/VideoCard/VideoCard.cjs.js +1 -1
  131. package/dist/modules/Testimonial/components/VideoCard/VideoCard.d.ts +2 -1
  132. package/dist/modules/Testimonial/components/VideoCard/VideoCard.es.js +32 -30
  133. package/dist/modules/Testimonial/testimonial.module.css.cjs.js +1 -1
  134. package/dist/modules/Testimonial/testimonial.module.css.es.js +15 -13
  135. package/dist/modules/TrackProgress/components/TimelineContent/TimelineContent.cjs.js +1 -1
  136. package/dist/modules/TrackProgress/components/TimelineContent/TimelineContent.es.js +45 -36
  137. package/dist/modules/TrackProgress/components/TimelineContent/timelineContent.module.css.cjs.js +1 -1
  138. package/dist/modules/TrackProgress/components/TimelineContent/timelineContent.module.css.es.js +22 -20
  139. package/dist/pageComponents/Bubbles/Bubbles.cjs.js +1 -1
  140. package/dist/pageComponents/Bubbles/Bubbles.es.js +12 -20
  141. package/package.json +30 -5
  142. package/dist/components/Accordion/Accordion.cjs.js +0 -1
  143. package/dist/components/Accordion/Accordion.d.ts +0 -8
  144. package/dist/components/Accordion/Accordion.es.js +0 -27
  145. package/dist/components/Accordion/accordion.module.css.cjs.js +0 -1
  146. package/dist/components/Accordion/components/AccordionItem/AccordionItem.cjs.js +0 -1
  147. package/dist/components/Accordion/components/AccordionItem/AccordionItem.d.ts +0 -3
  148. package/dist/components/Accordion/components/AccordionItem/accordionItem.module.css.cjs.js +0 -1
  149. package/dist/components/Accordion/components/AccordionItem/accordionItem.module.css.es.js +0 -25
  150. package/dist/components/Accordion/components/AccordionItem/index.d.ts +0 -2
  151. package/dist/components/Accordion/components/AccordionItem/types.d.ts +0 -9
  152. package/dist/components/Accordion/components/index.d.ts +0 -1
  153. package/dist/components/Accordion/index.d.ts +0 -1
  154. package/dist/components/Accordion/types.d.ts +0 -6
  155. package/dist/modules/FAQ/FAQ.cjs.js +0 -1
  156. package/dist/modules/FAQ/FAQ.d.ts +0 -3
  157. package/dist/modules/FAQ/FAQ.es.js +0 -17
  158. package/dist/modules/FAQ/faq.module.css.cjs.js +0 -1
  159. package/dist/modules/FAQ/faq.module.css.es.js +0 -19
  160. package/dist/modules/FAQ/index.d.ts +0 -1
  161. /package/dist/modules/{FAQ → FAQModule}/types.d.ts +0 -0
@@ -0,0 +1,9 @@
1
+ type PaginationProps = {
2
+ page: number;
3
+ pagesCount: number;
4
+ visiblePagesLimit: number;
5
+ disabled?: boolean;
6
+ onPageChange: (page: number) => void;
7
+ };
8
+ export declare const Pagination: ({ page, pagesCount, visiblePagesLimit, disabled, onPageChange }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
3
+ import { useMemo as d } from "react";
4
+ import { cn as s } from "../../utils/cn/cn.es.js";
5
+ import { Icon as N } from "../Icon/Icon.es.js";
6
+ import { EIconName as h } from "../Icon/constants.es.js";
7
+ import { Typography as x } from "../Typography/Typography.es.js";
8
+ import o from "./Pagination.module.css.es.js";
9
+ const A = (r, t, a) => {
10
+ if (t <= a)
11
+ return Array.from({ length: t }, (l, f) => f + 1);
12
+ const m = Math.floor(a / 2);
13
+ let c = Math.max(1, r - m), n = c + a - 1;
14
+ return n > t && (n = t, c = n - a + 1), Array.from({ length: a }, (l, f) => c + f);
15
+ }, M = ({ page: r, pagesCount: t, visiblePagesLimit: a, disabled: m, onPageChange: c }) => {
16
+ const n = d(
17
+ () => A(r, t, a),
18
+ [r, t, a]
19
+ );
20
+ return /* @__PURE__ */ i("div", { className: o.root, children: [
21
+ r > 1 && /* @__PURE__ */ e(
22
+ "button",
23
+ {
24
+ className: s(o.arrow, o.arrowPrev),
25
+ onClick: () => c(r - 1),
26
+ disabled: m,
27
+ "aria-label": "Previous page",
28
+ children: /* @__PURE__ */ e(N, { name: h.ARROW_BACK, className: o.icon })
29
+ }
30
+ ),
31
+ n.map((l) => /* @__PURE__ */ e(
32
+ "button",
33
+ {
34
+ className: s(o.page, l === r && o.activePage),
35
+ onClick: () => c(l),
36
+ disabled: l === r || m,
37
+ children: /* @__PURE__ */ e(x, { defaultVariant: "labelXl", weight: "regular", children: l.toString().padStart(2, "0") })
38
+ },
39
+ l
40
+ )),
41
+ r < t && /* @__PURE__ */ e(
42
+ "button",
43
+ {
44
+ className: s(o.arrow, o.arrowNext),
45
+ onClick: () => c(r + 1),
46
+ disabled: m,
47
+ "aria-label": "Next page",
48
+ children: /* @__PURE__ */ e(N, { name: h.ARROW_FORWARD, className: o.icon })
49
+ }
50
+ )
51
+ ] });
52
+ };
53
+ export {
54
+ M as Pagination
55
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="Pagination-module__root___ITRjt",a="Pagination-module__page___WjG0l",e="Pagination-module__activePage___dbxZJ",r="Pagination-module__arrow___rGon0",t="Pagination-module__arrowPrev___WPfYK",_="Pagination-module__arrowNext___ownTb",n="Pagination-module__icon___2iCyv",i={root:o,page:a,activePage:e,arrow:r,arrowPrev:t,arrowNext:_,icon:n};exports.activePage=e;exports.arrow=r;exports.arrowNext=_;exports.arrowPrev=t;exports.default=i;exports.icon=n;exports.page=a;exports.root=o;
@@ -0,0 +1,19 @@
1
+ const o = "Pagination-module__root___ITRjt", _ = "Pagination-module__page___WjG0l", a = "Pagination-module__activePage___dbxZJ", t = "Pagination-module__arrow___rGon0", n = "Pagination-module__arrowPrev___WPfYK", r = "Pagination-module__arrowNext___ownTb", e = "Pagination-module__icon___2iCyv", i = {
2
+ root: o,
3
+ page: _,
4
+ activePage: a,
5
+ arrow: t,
6
+ arrowPrev: n,
7
+ arrowNext: r,
8
+ icon: e
9
+ };
10
+ export {
11
+ a as activePage,
12
+ t as arrow,
13
+ r as arrowNext,
14
+ n as arrowPrev,
15
+ i as default,
16
+ e as icon,
17
+ _ as page,
18
+ o as root
19
+ };
@@ -0,0 +1 @@
1
+ export { Pagination } from './Pagination';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../utils/cn/cn.cjs.js"),o=require("../Icon/Icon.cjs.js"),n=require("../Icon/constants.cjs.js"),a=require("./ratingStars.module.css.cjs.js"),u=(t,s)=>{const r=s<Math.floor(t),c=!r&&s<t;return r?n.EIconName.STAR_FILL:c?n.EIconName.STAR_HALF:n.EIconName.STAR_OUTLINE},i=({rating:t,className:s})=>e.jsx("div",{className:m.cn(a.default.stars,s),children:Array.from({length:5}).map((r,c)=>{const l=u(t,c);return e.jsx("div",{className:a.default.starContainer,children:l===n.EIconName.STAR_HALF?e.jsxs(e.Fragment,{children:[e.jsx(o.Icon,{name:n.EIconName.STAR_OUTLINE,className:a.default.starIcon}),e.jsx(o.Icon,{name:n.EIconName.STAR_HALF,className:a.default.starIconHalf})]}):e.jsx(o.Icon,{name:l,className:a.default.starIcon})},c)})});exports.RatingStars=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("../../utils/cn/cn.cjs.js"),r=require("../Icon/Icon.cjs.js"),n=require("../Icon/constants.cjs.js"),a=require("./ratingStars.module.css.cjs.js"),i=(t,s)=>{const c=s<Math.floor(t),o=!c&&s<t;return c?n.EIconName.STAR_FILL:o?n.EIconName.STAR_HALF:n.EIconName.STAR_OUTLINE},I=({rating:t,className:s,size:c})=>e.jsx("div",{className:u.cn(a.default.stars,s),"data-size":c,children:Array.from({length:5}).map((o,l)=>{const m=i(t,l);return e.jsx("div",{className:a.default.starContainer,children:m===n.EIconName.STAR_HALF?e.jsxs(e.Fragment,{children:[e.jsx(r.Icon,{name:n.EIconName.STAR_OUTLINE,className:a.default.starIcon}),e.jsx(r.Icon,{name:n.EIconName.STAR_HALF,className:a.default.starIconHalf})]}):e.jsx(r.Icon,{name:m,className:a.default.starIcon})},l)})});exports.RatingStars=I;
@@ -1,6 +1,7 @@
1
1
  type RatingStarsProps = {
2
2
  rating: number;
3
+ size: 'sm' | 'md' | 'lg';
3
4
  className?: string;
4
5
  };
5
- export declare const RatingStars: ({ rating, className }: RatingStarsProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const RatingStars: ({ rating, className, size }: RatingStarsProps) => import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -1,18 +1,18 @@
1
- import { jsx as a, jsxs as l, Fragment as f } from "react/jsx-runtime";
2
- import { cn as i } from "../../utils/cn/cn.es.js";
3
- import { Icon as m } from "../Icon/Icon.es.js";
1
+ import { jsx as a, jsxs as i, Fragment as f } from "react/jsx-runtime";
2
+ import { cn as A } from "../../utils/cn/cn.es.js";
3
+ import { Icon as n } from "../Icon/Icon.es.js";
4
4
  import { EIconName as r } from "../Icon/constants.es.js";
5
5
  import s from "./ratingStars.module.css.es.js";
6
- const A = (t, o) => {
7
- const e = o < Math.floor(t), n = !e && o < t;
8
- return e ? r.STAR_FILL : n ? r.STAR_HALF : r.STAR_OUTLINE;
9
- }, R = ({ rating: t, className: o }) => /* @__PURE__ */ a("div", { className: i(s.stars, o), children: Array.from({ length: 5 }).map((e, n) => {
10
- const c = A(t, n);
11
- return /* @__PURE__ */ a("div", { className: s.starContainer, children: c === r.STAR_HALF ? /* @__PURE__ */ l(f, { children: [
12
- /* @__PURE__ */ a(m, { name: r.STAR_OUTLINE, className: s.starIcon }),
13
- /* @__PURE__ */ a(m, { name: r.STAR_HALF, className: s.starIconHalf })
14
- ] }) : /* @__PURE__ */ a(m, { name: c, className: s.starIcon }) }, n);
6
+ const N = (t, o) => {
7
+ const e = o < Math.floor(t), m = !e && o < t;
8
+ return e ? r.STAR_FILL : m ? r.STAR_HALF : r.STAR_OUTLINE;
9
+ }, S = ({ rating: t, className: o, size: e }) => /* @__PURE__ */ a("div", { className: A(s.stars, o), "data-size": e, children: Array.from({ length: 5 }).map((m, c) => {
10
+ const l = N(t, c);
11
+ return /* @__PURE__ */ a("div", { className: s.starContainer, children: l === r.STAR_HALF ? /* @__PURE__ */ i(f, { children: [
12
+ /* @__PURE__ */ a(n, { name: r.STAR_OUTLINE, className: s.starIcon }),
13
+ /* @__PURE__ */ a(n, { name: r.STAR_HALF, className: s.starIconHalf })
14
+ ] }) : /* @__PURE__ */ a(n, { name: l, className: s.starIcon }) }, c);
15
15
  }) });
16
16
  export {
17
- R as RatingStars
17
+ S as RatingStars
18
18
  };
@@ -1 +1 @@
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;
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;
@@ -1,59 +1,55 @@
1
1
  "use client";
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";
2
+ import { jsxs as l, jsx as n, Fragment as X } from "react/jsx-runtime";
3
+ import { useState as V, useRef as m, useCallback as u } from "react";
4
+ import { cn as b } from "../../utils/cn/cn.es.js";
5
+ import { Label as k } from "../Label/Label.es.js";
6
6
  import { ProgressButton as y } from "../ProgressButton/ProgressButton.es.js";
7
7
  import { Typography as p } from "../Typography/Typography.es.js";
8
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) => {
9
+ const B = ({ steps: s, colorScheme: c }) => {
10
+ const [i, f] = V(0), g = m([]), o = m(null), d = m(null), v = u((e) => {
11
+ o.current = e.touches[0].clientX;
12
+ }, []), C = u((e) => {
13
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);
14
+ }, []), h = u((e) => {
15
+ var r;
16
+ f(e), (r = g.current[e]) == null || r.scrollIntoView({ behavior: "smooth", inline: "center", block: "nearest" });
17
+ }, []), T = u(() => {
18
+ if (o.current !== null && d.current !== null) {
19
+ const e = d.current - o.current, r = 50;
20
+ f((a) => e > r && a > 0 ? a - 1 : e < -r && a < s.length - 1 ? a + 1 : a);
18
21
  }
19
- u.current = null, d.current = null;
22
+ o.current = null, d.current = null;
20
23
  }, [s.length]);
21
- return V(() => {
22
- var e;
23
- m.current[c] && ((e = m.current[c]) == null || e.scrollIntoView({
24
- behavior: "smooth",
25
- inline: "center",
26
- block: "nearest"
27
- }));
28
- }, [c]), /* @__PURE__ */ l("div", { className: t.root, "data-scheme": i, children: [
24
+ return /* @__PURE__ */ l("div", { className: t.root, "data-scheme": c, children: [
29
25
  /* @__PURE__ */ n(
30
26
  "div",
31
27
  {
32
28
  className: t.stepsContainer,
33
- "data-scheme": i,
34
- onTouchStart: k,
35
- onTouchMove: v,
36
- onTouchEnd: C,
29
+ "data-scheme": c,
30
+ onTouchStart: v,
31
+ onTouchMove: C,
32
+ onTouchEnd: T,
37
33
  children: s.map((e, r) => {
38
- const a = c === r;
34
+ const a = i === r;
39
35
  return /* @__PURE__ */ l(
40
36
  "button",
41
37
  {
42
- ref: (g) => {
43
- g && (m.current[r] = g);
38
+ ref: (N) => {
39
+ N && (g.current[r] = N);
44
40
  },
45
- className: f(t.card, a && t.cardActive),
46
- onClick: () => o(r),
41
+ className: b(t.card, a && t.cardActive),
42
+ onClick: () => h(r),
47
43
  type: "button",
48
44
  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: [
45
+ /* @__PURE__ */ n("div", { className: b(t.imageWrapper, a && t.imageWrapperActive), children: /* @__PURE__ */ n("img", { src: e.image, alt: e.title, className: t.image }) }),
46
+ /* @__PURE__ */ n("div", { className: t.stepLabel, children: a ? /* @__PURE__ */ l(X, { children: [
51
47
  /* @__PURE__ */ l(
52
- N,
48
+ k,
53
49
  {
54
50
  size: "lg",
55
51
  className: t.desktop,
56
- color: i === "dark" ? "white" : "black",
52
+ color: c === "dark" ? "white" : "black",
57
53
  children: [
58
54
  "Step ",
59
55
  r + 1
@@ -61,11 +57,11 @@ const B = ({ steps: s, colorScheme: i }) => {
61
57
  }
62
58
  ),
63
59
  /* @__PURE__ */ l(
64
- N,
60
+ k,
65
61
  {
66
62
  size: "sm",
67
63
  className: t.mobile,
68
- color: i === "dark" ? "white" : "black",
64
+ color: c === "dark" ? "white" : "black",
69
65
  children: [
70
66
  "Step ",
71
67
  r + 1
@@ -105,17 +101,17 @@ const B = ({ steps: s, colorScheme: i }) => {
105
101
  })
106
102
  }
107
103
  ),
108
- /* @__PURE__ */ n("div", { className: f(t.mobile, t.progressButtonContainer), children: /* @__PURE__ */ n(
104
+ /* @__PURE__ */ n("div", { className: b(t.mobile, t.progressButtonContainer), children: /* @__PURE__ */ n(
109
105
  y,
110
106
  {
111
- invert: i === "dark",
107
+ invert: c === "dark",
112
108
  left: {
113
- disabled: c <= 0,
114
- onClick: () => o((e) => e - 1)
109
+ disabled: i <= 0,
110
+ onClick: () => h(i - 1)
115
111
  },
116
112
  right: {
117
- disabled: c >= s.length - 1,
118
- onClick: () => o((e) => e + 1)
113
+ disabled: i >= s.length - 1,
114
+ onClick: () => h(i + 1)
119
115
  }
120
116
  }
121
117
  ) })