@telefonica/mistica 16.37.5 → 16.39.0

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 (213) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.css-mistica.js +6 -6
  3. package/dist/align.css-mistica.js +1 -1
  4. package/dist/avatar.css-mistica.js +2 -2
  5. package/dist/badge.css-mistica.js +1 -1
  6. package/dist/box.css-mistica.js +13 -13
  7. package/dist/boxed.css-mistica.js +25 -25
  8. package/dist/button-group.css-mistica.js +1 -1
  9. package/dist/button-layout.css-mistica.js +13 -13
  10. package/dist/button.css-mistica.js +39 -29
  11. package/dist/button.css.d.ts +2 -0
  12. package/dist/button.js +44 -44
  13. package/dist/callout.css-mistica.js +5 -5
  14. package/dist/card-internal.css-mistica.js +15 -15
  15. package/dist/carousel.css-mistica.js +8 -8
  16. package/dist/carousel.d.ts +3 -1
  17. package/dist/carousel.js +263 -257
  18. package/dist/checkbox.css-mistica.js +7 -7
  19. package/dist/chip.css-mistica.js +12 -12
  20. package/dist/chip.js +10 -9
  21. package/dist/circle.css-mistica.js +1 -1
  22. package/dist/community/advanced-data-card.css-mistica.js +6 -6
  23. package/dist/community/blocks.css-mistica.js +3 -3
  24. package/dist/community/example-component.css-mistica.js +1 -1
  25. package/dist/counter.css-mistica.js +1 -1
  26. package/dist/cover-hero.css-mistica.js +3 -3
  27. package/dist/credit-card-number-field.css-mistica.js +3 -3
  28. package/dist/date-field.css-mistica.js +1 -1
  29. package/dist/date-time-picker.css-mistica.js +1 -1
  30. package/dist/dialog.css-mistica.js +4 -4
  31. package/dist/divider.css-mistica.js +2 -2
  32. package/dist/double-field.css-mistica.js +2 -2
  33. package/dist/drawer.css-mistica.js +1 -1
  34. package/dist/empty-state-card.css-mistica.js +1 -1
  35. package/dist/empty-state.css-mistica.js +7 -7
  36. package/dist/fade-in.css-mistica.js +1 -1
  37. package/dist/feedback.css-mistica.js +1 -1
  38. package/dist/fixed-footer-layout.css-mistica.js +4 -4
  39. package/dist/fixed-footer-layout.d.ts +2 -1
  40. package/dist/fixed-footer-layout.js +25 -24
  41. package/dist/form.css-mistica.js +1 -1
  42. package/dist/grid-layout.css-mistica.js +5 -5
  43. package/dist/grid.css-mistica.js +124 -124
  44. package/dist/grid.d.ts +3 -0
  45. package/dist/grid.js +33 -29
  46. package/dist/header.css-mistica.js +1 -1
  47. package/dist/hero.css-mistica.js +2 -2
  48. package/dist/horizontal-scroll.css-mistica.js +3 -3
  49. package/dist/icon-button.css-mistica.js +42 -42
  50. package/dist/icons/icon-chevron.css-mistica.js +2 -2
  51. package/dist/icons/icon-error.css-mistica.js +1 -1
  52. package/dist/image.css-mistica.js +3 -3
  53. package/dist/inline.css-mistica.js +13 -13
  54. package/dist/list.css-mistica.js +1 -1
  55. package/dist/loading-bar.css-mistica.js +1 -1
  56. package/dist/loading-screen.css-mistica.js +5 -5
  57. package/dist/logo.css-mistica.js +6 -6
  58. package/dist/menu.css-mistica.js +12 -12
  59. package/dist/mosaic.css-mistica.js +2 -2
  60. package/dist/mosaic.d.ts +8 -2
  61. package/dist/mosaic.js +85 -62
  62. package/dist/navigation-bar.css-mistica.js +16 -16
  63. package/dist/navigation-breadcrumbs.css-mistica.js +1 -1
  64. package/dist/package-version.js +1 -1
  65. package/dist/pin-field.css-mistica.js +1 -1
  66. package/dist/pin-field.js +21 -21
  67. package/dist/popover.css-mistica.js +1 -1
  68. package/dist/progress-bar.css-mistica.js +5 -5
  69. package/dist/progress-bar.js +4 -4
  70. package/dist/radio-button.css-mistica.js +14 -14
  71. package/dist/rating.css-mistica.js +2 -2
  72. package/dist/rating.js +25 -25
  73. package/dist/responsive-layout.css-mistica.js +8 -8
  74. package/dist/screen-reader-only.css-mistica.js +1 -1
  75. package/dist/select.css-mistica.js +15 -15
  76. package/dist/sheet-action-row.css-mistica.js +1 -1
  77. package/dist/sheet-common.css-mistica.js +1 -1
  78. package/dist/sheet-info.css-mistica.js +2 -2
  79. package/dist/skeletons.css-mistica.js +4 -4
  80. package/dist/skins/skin-contract.css-mistica.js +390 -390
  81. package/dist/skip-link.css-mistica.js +1 -1
  82. package/dist/slider.css-mistica.js +10 -10
  83. package/dist/snackbar.css-mistica.js +4 -4
  84. package/dist/spinner.css-mistica.js +1 -1
  85. package/dist/stack.css-mistica.js +7 -7
  86. package/dist/stacking-group.css-mistica.js +1 -1
  87. package/dist/stepper.css-mistica.js +2 -2
  88. package/dist/switch-component.css-mistica.js +26 -26
  89. package/dist/tab-focus.js +16 -14
  90. package/dist/table.css-mistica.js +8 -8
  91. package/dist/tabs.css-mistica.js +12 -12
  92. package/dist/tag.css-mistica.js +1 -1
  93. package/dist/text-field-base.css-mistica.js +1 -1
  94. package/dist/text-field-base.js +13 -13
  95. package/dist/text-field-components.css-mistica.js +18 -15
  96. package/dist/text-field-components.css.d.ts +1 -0
  97. package/dist/text-link.css-mistica.js +5 -5
  98. package/dist/text-tokens.d.ts +2 -0
  99. package/dist/text-tokens.js +97 -89
  100. package/dist/text.css-mistica.js +9 -9
  101. package/dist/theme-context-provider.js +40 -40
  102. package/dist/theme-context.css-mistica.js +1 -1
  103. package/dist/theme.d.ts +1 -1
  104. package/dist/timeline.css-mistica.js +10 -10
  105. package/dist/timer.css-mistica.js +6 -6
  106. package/dist/tooltip.css-mistica.js +1 -1
  107. package/dist/touchable.css-mistica.js +1 -1
  108. package/dist/utils/aspect-ratio-support.css-mistica.js +3 -3
  109. package/dist/video.css-mistica.js +2 -2
  110. package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +3 -3
  111. package/dist-es/accordion.css-mistica.js +6 -6
  112. package/dist-es/align.css-mistica.js +1 -1
  113. package/dist-es/avatar.css-mistica.js +2 -2
  114. package/dist-es/badge.css-mistica.js +1 -1
  115. package/dist-es/box.css-mistica.js +13 -13
  116. package/dist-es/boxed.css-mistica.js +24 -24
  117. package/dist-es/button-group.css-mistica.js +1 -1
  118. package/dist-es/button-layout.css-mistica.js +13 -13
  119. package/dist-es/button.css-mistica.js +27 -20
  120. package/dist-es/button.js +58 -58
  121. package/dist-es/callout.css-mistica.js +5 -5
  122. package/dist-es/card-internal.css-mistica.js +15 -15
  123. package/dist-es/carousel.css-mistica.js +8 -8
  124. package/dist-es/carousel.js +332 -326
  125. package/dist-es/checkbox.css-mistica.js +7 -7
  126. package/dist-es/chip.css-mistica.js +12 -12
  127. package/dist-es/chip.js +10 -9
  128. package/dist-es/circle.css-mistica.js +1 -1
  129. package/dist-es/community/advanced-data-card.css-mistica.js +6 -6
  130. package/dist-es/community/blocks.css-mistica.js +2 -2
  131. package/dist-es/community/example-component.css-mistica.js +1 -1
  132. package/dist-es/counter.css-mistica.js +1 -1
  133. package/dist-es/cover-hero.css-mistica.js +3 -3
  134. package/dist-es/credit-card-number-field.css-mistica.js +3 -3
  135. package/dist-es/date-field.css-mistica.js +1 -1
  136. package/dist-es/date-time-picker.css-mistica.js +1 -1
  137. package/dist-es/dialog.css-mistica.js +4 -4
  138. package/dist-es/divider.css-mistica.js +2 -2
  139. package/dist-es/double-field.css-mistica.js +2 -2
  140. package/dist-es/drawer.css-mistica.js +1 -1
  141. package/dist-es/empty-state-card.css-mistica.js +1 -1
  142. package/dist-es/empty-state.css-mistica.js +6 -6
  143. package/dist-es/fade-in.css-mistica.js +1 -1
  144. package/dist-es/feedback.css-mistica.js +1 -1
  145. package/dist-es/fixed-footer-layout.css-mistica.js +4 -4
  146. package/dist-es/fixed-footer-layout.js +49 -48
  147. package/dist-es/form.css-mistica.js +1 -1
  148. package/dist-es/grid-layout.css-mistica.js +4 -4
  149. package/dist-es/grid.css-mistica.js +124 -124
  150. package/dist-es/grid.js +40 -36
  151. package/dist-es/header.css-mistica.js +1 -1
  152. package/dist-es/hero.css-mistica.js +2 -2
  153. package/dist-es/horizontal-scroll.css-mistica.js +2 -2
  154. package/dist-es/icon-button.css-mistica.js +42 -42
  155. package/dist-es/icons/icon-chevron.css-mistica.js +2 -2
  156. package/dist-es/icons/icon-error.css-mistica.js +1 -1
  157. package/dist-es/image.css-mistica.js +3 -3
  158. package/dist-es/inline.css-mistica.js +11 -11
  159. package/dist-es/list.css-mistica.js +1 -1
  160. package/dist-es/loading-bar.css-mistica.js +1 -1
  161. package/dist-es/loading-screen.css-mistica.js +5 -5
  162. package/dist-es/logo.css-mistica.js +6 -6
  163. package/dist-es/menu.css-mistica.js +12 -12
  164. package/dist-es/mosaic.css-mistica.js +2 -2
  165. package/dist-es/mosaic.js +109 -86
  166. package/dist-es/navigation-bar.css-mistica.js +16 -16
  167. package/dist-es/navigation-breadcrumbs.css-mistica.js +1 -1
  168. package/dist-es/package-version.js +1 -1
  169. package/dist-es/pin-field.css-mistica.js +1 -1
  170. package/dist-es/pin-field.js +31 -31
  171. package/dist-es/popover.css-mistica.js +1 -1
  172. package/dist-es/progress-bar.css-mistica.js +5 -5
  173. package/dist-es/progress-bar.js +21 -21
  174. package/dist-es/radio-button.css-mistica.js +14 -14
  175. package/dist-es/rating.css-mistica.js +2 -2
  176. package/dist-es/rating.js +33 -33
  177. package/dist-es/responsive-layout.css-mistica.js +6 -6
  178. package/dist-es/screen-reader-only.css-mistica.js +1 -1
  179. package/dist-es/select.css-mistica.js +15 -15
  180. package/dist-es/sheet-action-row.css-mistica.js +1 -1
  181. package/dist-es/sheet-common.css-mistica.js +1 -1
  182. package/dist-es/sheet-info.css-mistica.js +2 -2
  183. package/dist-es/skeletons.css-mistica.js +4 -4
  184. package/dist-es/skins/skin-contract.css-mistica.js +390 -390
  185. package/dist-es/skip-link.css-mistica.js +1 -1
  186. package/dist-es/slider.css-mistica.js +10 -10
  187. package/dist-es/snackbar.css-mistica.js +4 -4
  188. package/dist-es/spinner.css-mistica.js +1 -1
  189. package/dist-es/stack.css-mistica.js +6 -6
  190. package/dist-es/stacking-group.css-mistica.js +1 -1
  191. package/dist-es/stepper.css-mistica.js +2 -2
  192. package/dist-es/style.css +1 -1
  193. package/dist-es/switch-component.css-mistica.js +26 -26
  194. package/dist-es/tab-focus.js +18 -16
  195. package/dist-es/table.css-mistica.js +8 -8
  196. package/dist-es/tabs.css-mistica.js +12 -12
  197. package/dist-es/tag.css-mistica.js +1 -1
  198. package/dist-es/text-field-base.css-mistica.js +1 -1
  199. package/dist-es/text-field-base.js +17 -17
  200. package/dist-es/text-field-components.css-mistica.js +4 -4
  201. package/dist-es/text-link.css-mistica.js +5 -5
  202. package/dist-es/text-tokens.js +50 -45
  203. package/dist-es/text.css-mistica.js +8 -8
  204. package/dist-es/theme-context-provider.js +46 -46
  205. package/dist-es/theme-context.css-mistica.js +1 -1
  206. package/dist-es/timeline.css-mistica.js +10 -10
  207. package/dist-es/timer.css-mistica.js +6 -6
  208. package/dist-es/tooltip.css-mistica.js +1 -1
  209. package/dist-es/touchable.css-mistica.js +1 -1
  210. package/dist-es/utils/aspect-ratio-support.css-mistica.js +3 -3
  211. package/dist-es/video.css-mistica.js +2 -2
  212. package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +2 -2
  213. package/package.json +1 -1
@@ -51,69 +51,69 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsx as a, jsxs as H } from "react/jsx-runtime";
54
+ import { jsx as c, jsxs as H } from "react/jsx-runtime";
55
55
  import * as o from "react";
56
- import { createElement as tt } from "react";
57
- import ot from "./generated/mistica-icons/icon-chevron-left-regular.js";
58
- import st from "./generated/mistica-icons/icon-chevron-right-regular.js";
59
- import { useScreenSize as We, useTheme as ce, useIsInViewport as lt } from "./hooks.js";
56
+ import { createElement as ot } from "react";
57
+ import st from "./generated/mistica-icons/icon-chevron-left-regular.js";
58
+ import lt from "./generated/mistica-icons/icon-chevron-right-regular.js";
59
+ import { useScreenSize as Ve, useTheme as ce, useIsInViewport as rt } from "./hooks.js";
60
60
  import Y from "./inline.js";
61
61
  import k from "classnames";
62
- import { useIsInverseOrMediaVariant as rt, useThemeVariant as nt, ThemeVariant as Le } from "./theme-variant-context.js";
63
- import { getPrefixedDataAttributes as me, listenResize as Ve } from "./utils/dom.js";
64
- import { isAndroid as De, isIos as at, isRunningAcceptanceTest as ct } from "./utils/platform.js";
65
- import { useDocumentVisibility as it } from "./utils/document-visibility.js";
66
- import { bulletsScrollableContainerBase as ut, bulletsScrollableContainer as ft, VISIBLE_BULLETS as z, scrollableBullet as dt, bulletButton as Ie, bulletVisibility as ht, bulletVisibilityMobile as pt, bulletVisibilityTablet as mt, bulletVisibilityDesktop as bt, slideshowBulletsContainer as gt, slideshowContainer as Ct, slideshowWithBullets as vt, slideshowControlsContainer as Re, slideshowControlsContainerSingleItem as Pt, slideshowAutoplayControlContainer as yt, slideshow as St, slideshowItem as Et, bulletActiveInverse as At, bulletInverse as Lt, bulletActive as It, bullet as Rt, bulletActiveSizing as Tt, bulletInactiveSizing as Te, bulletInactiveMediumSizing as Me, bulletInactiveSmallSizing as ke, vars as x, LARGE_BULLET_FULL_SIZE as Mt, SMALL_BULLET_FULL_SIZE as kt, carouselBullets as wt, noCarouselBulletsDesktop as xt, noCarouselBulletsTablet as Nt, noCarouselBulletsMobile as Bt, carouselComponentContainer as Wt, carouselControlsVisibility as Vt, carouselControlsVisibilityMobile as Dt, carouselControlsVisibilityTablet as Ot, carouselControlsVisibilityDesktop as zt, carouselControlsContainer as we, carouselAutoplayControlContainer as _t, carouselPagesControlsContainer as Gt, carouselContainer as Ft, carousel as Ut, centeredCarousel as $t, carouselWithScrollMobile as jt, carouselWithScrollTablet as Kt, carouselItem as Zt } from "./carousel.css-mistica.js";
67
- import { vars as Ht } from "./image.css-mistica.js";
68
- import { useDesktopContainerType as Yt } from "./desktop-container-type-context.js";
69
- import { VIVO_NEW_SKIN as qt } from "./skins/constants.js";
62
+ import { useIsInverseOrMediaVariant as nt, useThemeVariant as at, ThemeVariant as Le } from "./theme-variant-context.js";
63
+ import { getPrefixedDataAttributes as me, listenResize as De } from "./utils/dom.js";
64
+ import { isAndroid as Oe, isIos as ct, isRunningAcceptanceTest as it } from "./utils/platform.js";
65
+ import { useDocumentVisibility as ut } from "./utils/document-visibility.js";
66
+ import { bulletsScrollableContainerBase as ft, bulletsScrollableContainer as dt, VISIBLE_BULLETS as _, scrollableBullet as ht, bulletButton as Te, bulletVisibility as pt, bulletVisibilityMobile as mt, bulletVisibilityTablet as bt, bulletVisibilityDesktop as gt, slideshowBulletsContainer as Ct, slideshowContainer as vt, slideshowWithBullets as Pt, slideshowControlsContainer as Re, slideshowControlsContainerSingleItem as yt, slideshowAutoplayControlContainer as St, slideshow as Et, slideshowItem as At, bulletActiveInverse as Lt, bulletInverse as Tt, bulletActive as Rt, bullet as Mt, bulletActiveSizing as It, bulletInactiveSizing as Me, bulletInactiveMediumSizing as Ie, bulletInactiveSmallSizing as ke, vars as N, LARGE_BULLET_FULL_SIZE as kt, SMALL_BULLET_FULL_SIZE as xt, carouselBullets as Nt, noCarouselBulletsDesktop as wt, noCarouselBulletsTablet as Bt, noCarouselBulletsMobile as Wt, carouselComponentContainer as Vt, carouselControlsVisibility as Dt, carouselControlsVisibilityMobile as Ot, carouselControlsVisibilityTablet as zt, carouselControlsVisibilityDesktop as _t, carouselControlsContainer as xe, carouselAutoplayControlContainer as Gt, carouselPagesControlsContainer as Ft, carouselContainer as Ut, carousel as $t, centeredCarousel as jt, carouselWithScrollMobile as Kt, carouselWithScrollTablet as Zt, carouselItem as Ht } from "./carousel.css-mistica.js";
67
+ import { vars as Yt } from "./image.css-mistica.js";
68
+ import { useDesktopContainerType as qt } from "./desktop-container-type-context.js";
69
+ import { VIVO_NEW_SKIN as Jt } from "./skins/constants.js";
70
70
  import { applyCssVars as be } from "./utils/css.js";
71
- import { ResetResponsiveLayout as Jt } from "./responsive-layout.js";
72
- import { IconButton as xe, ToggleIconButton as Qt } from "./icon-button.js";
73
- import Xt from "./generated/mistica-icons/icon-pause-filled.js";
74
- import eo from "./generated/mistica-icons/icon-play-filled.js";
75
- import to from "./generated/mistica-icons/icon-reload-regular.js";
76
- import { carouselPrevButton as oo, carouselNextButton as so, carouselPauseAutoplay as lo, carouselReloadAutoplay as ro, carouselEnableAutoplay as no, carouselRegion as ao } from "./text-tokens.js";
77
- import { isClientSide as co } from "./utils/environment.js";
78
- const Oe = (e, t)=>{
79
- const r = co() ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1, [s, f] = o.useState(!!e && !r), i = it(), m = lt(t, !1);
71
+ import { ResetResponsiveLayout as Qt } from "./responsive-layout.js";
72
+ import { IconButton as Ne, ToggleIconButton as Xt } from "./icon-button.js";
73
+ import eo from "./generated/mistica-icons/icon-pause-filled.js";
74
+ import to from "./generated/mistica-icons/icon-play-filled.js";
75
+ import oo from "./generated/mistica-icons/icon-reload-regular.js";
76
+ import { carouselPageNumber as we, carouselPrevButton as so, carouselNextButton as lo, carouselPauseAutoplay as ro, carouselReloadAutoplay as no, carouselEnableAutoplay as ao, carouselRegion as co } from "./text-tokens.js";
77
+ import { isClientSide as io } from "./utils/environment.js";
78
+ const ze = (e, t)=>{
79
+ const r = io() ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1, [s, f] = o.useState(!!e && !r), i = ut(), p = rt(t, !1);
80
80
  return {
81
81
  isAutoplayEnabled: s && !!e,
82
- shouldAutoplay: m && i && !!e && s,
82
+ shouldAutoplay: p && i && !!e && s,
83
83
  setShouldAutoPlay: f
84
84
  };
85
- }, w = ()=>{
85
+ }, x = ()=>{
86
86
  throw new Error("You must wrap your component with a CarouselContextProvider to use CarouselContext");
87
- }, ze = {
87
+ }, _e = {
88
88
  currentIndex: 0,
89
89
  numPages: 0
90
- }, _e = {
90
+ }, Ge = {
91
91
  isAutoplayEnabled: !1,
92
92
  isAtLastPage: !1,
93
- onAutoplayChanged: w
94
- }, Ge = {
95
- setShouldAutoplay: w,
93
+ onAutoplayChanged: x
94
+ }, Fe = {
95
+ setShouldAutoplay: x,
96
96
  prevArrowEnabled: !1,
97
97
  nextArrowEnabled: !1
98
98
  }, ge = /*#__PURE__*/ o.createContext({
99
- goPrev: w,
100
- goNext: w,
101
- goToPage: w,
102
- bulletsProps: ze,
103
- autoplayControlProps: _e,
104
- pageControlsProps: Ge
105
- }), Ce = /*#__PURE__*/ o.createContext(null), Wo = (param)=>{
99
+ goPrev: x,
100
+ goNext: x,
101
+ goToPage: x,
102
+ bulletsProps: _e,
103
+ autoplayControlProps: Ge,
104
+ pageControlsProps: Fe
105
+ }), Ce = /*#__PURE__*/ o.createContext(null), Vo = (param)=>{
106
106
  let { children: e } = param;
107
- const [t, r] = o.useState(ze), [s, f] = o.useState(_e), [i, m] = o.useState(Ge), v = o.useRef(w), h = o.useRef(w), l = o.useRef(w), u = o.useRef(w), A = o.useMemo(()=>({
107
+ const [t, r] = o.useState(_e), [s, f] = o.useState(Ge), [i, p] = o.useState(Fe), g = o.useRef(x), h = o.useRef(x), l = o.useRef(x), n = o.useRef(x), P = o.useMemo(()=>({
108
108
  goPrev: ()=>{
109
- v.current();
109
+ g.current();
110
110
  },
111
111
  goNext: ()=>{
112
112
  h.current();
113
113
  },
114
114
  goToPage: function(d) {
115
- let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
116
- l.current(d, _);
115
+ let w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
116
+ l.current(d, w);
117
117
  },
118
118
  bulletsProps: t,
119
119
  autoplayControlProps: s,
@@ -123,12 +123,12 @@ const Oe = (e, t)=>{
123
123
  s,
124
124
  i
125
125
  ]);
126
- return /* @__PURE__ */ a(ge.Provider, {
127
- value: A,
128
- children: /* @__PURE__ */ a(Ce.Provider, {
126
+ return /* @__PURE__ */ c(ge.Provider, {
127
+ value: P,
128
+ children: /* @__PURE__ */ c(Ce.Provider, {
129
129
  value: {
130
130
  setGoPrev: (d)=>{
131
- v.current = d;
131
+ g.current = d;
132
132
  },
133
133
  setGoNext: (d)=>{
134
134
  h.current = d;
@@ -138,67 +138,68 @@ const Oe = (e, t)=>{
138
138
  },
139
139
  setBulletsProps: r,
140
140
  setAutoplayControlProps: f,
141
- setPageControlsProps: m,
141
+ setPageControlsProps: p,
142
142
  setIsAutoplayEnabledSetter: (d)=>{
143
- u.current = d;
143
+ n.current = d;
144
144
  }
145
145
  },
146
146
  children: e
147
147
  })
148
148
  });
149
- }, Vo = ()=>o.useContext(ge), Do = ge.Consumer, Fe = (param)=>{
149
+ }, Do = ()=>o.useContext(ge), Oo = ge.Consumer, Ue = (param)=>{
150
150
  let { currentIndex: e, numPages: t } = param;
151
151
  var _t_tablet;
152
- const r = rt(), { isTablet: s, isDesktopOrBigger: f } = We(), i = typeof t == "number" ? t : f ? t.desktop : s ? (_t_tablet = t.tablet) !== null && _t_tablet !== void 0 ? _t_tablet : t.mobile : t.mobile, m = (h)=>{
152
+ const r = nt(), { isTablet: s, isDesktopOrBigger: f } = Ve(), i = typeof t == "number" ? t : f ? t.desktop : s ? (_t_tablet = t.tablet) !== null && _t_tablet !== void 0 ? _t_tablet : t.mobile : t.mobile, p = (h)=>{
153
153
  const l = {};
154
- if (r ? l[e === h ? At : Lt] = !0 : l[e === h ? It : Rt] = !0, e === h) return l[Tt] = !0, l;
155
- const u = Math.abs(h - e);
156
- return i <= z || u === 1 ? (l[Te] = !0, l) : e === 0 || e === i - 1 ? (l[Te] = u === 2, l[Me] = u === 3, l[ke] = u > 3, l) : (l[Me] = u === 2, l[ke] = u > 2, l);
157
- }, v = (h)=>e + 2 < z ? h : i - e + 1 < z ? h - (i - z) : h - (e - 2);
158
- return /* @__PURE__ */ a("div", _object_spread_props(_object_spread({}, me({
159
- "component-name": "PageBullets"
154
+ if (r ? l[e === h ? Lt : Tt] = !0 : l[e === h ? Rt : Mt] = !0, e === h) return l[It] = !0, l;
155
+ const n = Math.abs(h - e);
156
+ return i <= _ || n === 1 ? (l[Me] = !0, l) : e === 0 || e === i - 1 ? (l[Me] = n === 2, l[Ie] = n === 3, l[ke] = n > 3, l) : (l[Ie] = n === 2, l[ke] = n > 2, l);
157
+ }, g = (h)=>e + 2 < _ ? h : i - e + 1 < _ ? h - (i - _) : h - (e - 2);
158
+ return /* @__PURE__ */ c("div", _object_spread_props(_object_spread({}, me({
159
+ "component-name": "PageBullets",
160
+ testid: "PageBullets"
160
161
  })), {
161
- className: k(ut, {
162
- [ft]: i > z
162
+ className: k(ft, {
163
+ [dt]: i > _
163
164
  }),
164
165
  children: Array.from({
165
166
  length: i
166
167
  }, (h, l)=>{
167
- const u = v(l);
168
+ const n = g(l);
168
169
  var _t_tablet;
169
- return /* @__PURE__ */ a("div", {
170
+ return /* @__PURE__ */ c("div", {
170
171
  className: k({
171
- [dt]: i > z
172
+ [ht]: i > _
172
173
  }, typeof t == "number" ? {
173
- [Ie]: !0,
174
- [ht]: l < t
174
+ [Te]: !0,
175
+ [pt]: l < t
175
176
  } : {
176
- [Ie]: !0,
177
- [pt]: l < t.mobile,
178
- [mt]: l < ((_t_tablet = t.tablet) !== null && _t_tablet !== void 0 ? _t_tablet : t.mobile),
179
- [bt]: l < t.desktop
177
+ [Te]: !0,
178
+ [mt]: l < t.mobile,
179
+ [bt]: l < ((_t_tablet = t.tablet) !== null && _t_tablet !== void 0 ? _t_tablet : t.mobile),
180
+ [gt]: l < t.desktop
180
181
  }),
181
182
  style: _object_spread({}, be({
182
- [x.desktopBulletLeftPosition]: `${u * Mt}px`,
183
- [x.mobileBulletLeftPosition]: `${u * kt}px`
183
+ [N.desktopBulletLeftPosition]: `${n * kt}px`,
184
+ [N.mobileBulletLeftPosition]: `${n * xt}px`
184
185
  })),
185
- children: /* @__PURE__ */ a("div", {
186
- className: k(m(l))
186
+ children: /* @__PURE__ */ c("div", {
187
+ className: k(p(l))
187
188
  })
188
189
  }, l);
189
190
  })
190
191
  }));
191
- }, Ue = (param)=>{
192
- let { bleedLeft: e, bleedRight: t, goPrev: r, goNext: s, setShouldAutoplay: f, prevArrowEnabled: i, nextArrowEnabled: m } = param;
193
- const { texts: v, t: h } = ce(), l = nt();
192
+ }, $e = (param)=>{
193
+ let { bleedLeft: e, bleedRight: t, goPrev: r, goNext: s, setShouldAutoplay: f, prevArrowEnabled: i, nextArrowEnabled: p, pagesCount: g, currentPageIndex: h } = param;
194
+ const { texts: l, t: n } = ce(), P = at(), d = i && g !== void 0 && h !== void 0 ? `, ${n(l.carouselPageNumber || we, h, g)}` : "", w = p && g !== void 0 && h !== void 0 ? `, ${n(l.carouselPageNumber || we, h + 2, g)}` : "";
194
195
  return /* @__PURE__ */ H(Y, {
195
- space: l === "media" ? 16 : 8,
196
+ space: P === "media" ? 16 : 8,
196
197
  children: [
197
- /* @__PURE__ */ a(xe, {
198
- Icon: ot,
199
- "aria-label": v.carouselPrevButton || h(oo),
198
+ /* @__PURE__ */ c(Ne, {
199
+ Icon: st,
200
+ "aria-label": (l.carouselPrevButton || n(so)) + d,
200
201
  type: "neutral",
201
- backgroundType: l === "media" ? "transparent" : "soft",
202
+ backgroundType: P === "media" ? "transparent" : "soft",
202
203
  small: !0,
203
204
  bleedLeft: e,
204
205
  onPress: ()=>{
@@ -206,33 +207,33 @@ const Oe = (e, t)=>{
206
207
  },
207
208
  disabled: !i
208
209
  }),
209
- /* @__PURE__ */ a(xe, {
210
- Icon: st,
211
- "aria-label": v.carouselNextButton || h(so),
210
+ /* @__PURE__ */ c(Ne, {
211
+ Icon: lt,
212
+ "aria-label": (l.carouselNextButton || n(lo)) + w,
212
213
  type: "neutral",
213
- backgroundType: l === "media" ? "transparent" : "soft",
214
+ backgroundType: P === "media" ? "transparent" : "soft",
214
215
  small: !0,
215
216
  bleedRight: t,
216
217
  onPress: ()=>{
217
218
  s(), f(!1);
218
219
  },
219
- disabled: !m
220
+ disabled: !p
220
221
  })
221
222
  ]
222
223
  });
223
- }, $e = (param)=>{
224
+ }, je = (param)=>{
224
225
  let { isAutoplayEnabled: e, isAtLastPage: t, onAutoplayChanged: r, bleedLeft: s = !1, bleedRight: f = !1 } = param;
225
- const { texts: i, t: m } = ce();
226
- return /* @__PURE__ */ a(Qt, {
226
+ const { texts: i, t: p } = ce();
227
+ return /* @__PURE__ */ c(Xt, {
227
228
  checkedProps: {
228
- Icon: Xt,
229
+ Icon: eo,
229
230
  type: "neutral",
230
- "aria-label": i.carouselPauseAutoplay || m(lo)
231
+ "aria-label": i.carouselPauseAutoplay || p(ro)
231
232
  },
232
233
  uncheckedProps: {
233
- Icon: t ? to : eo,
234
+ Icon: t ? oo : to,
234
235
  type: "neutral",
235
- "aria-label": t ? i.carouselReloadAutoplay || m(ro) : i.carouselEnableAutoplay || m(no)
236
+ "aria-label": t ? i.carouselReloadAutoplay || p(no) : i.carouselEnableAutoplay || p(ao)
236
237
  },
237
238
  small: !0,
238
239
  bleedLeft: s,
@@ -240,7 +241,7 @@ const Oe = (e, t)=>{
240
241
  onChange: r,
241
242
  checked: e
242
243
  });
243
- }, Ne = (e, t, r)=>r ? typeof r == "number" ? r : r[e] || t[e] : t[e], io = (e, t)=>{
244
+ }, Be = (e, t, r)=>r ? typeof r == "number" ? r : r[e] || t[e] : t[e], uo = (e, t)=>{
244
245
  const r = {
245
246
  mobile: 1,
246
247
  tablet: 2,
@@ -251,58 +252,58 @@ const Oe = (e, t)=>{
251
252
  }
252
253
  };
253
254
  if (!t) return _object_spread_props(_object_spread({}, r), {
254
- desktop: Ne(e, r.desktop)
255
+ desktop: Be(e, r.desktop)
255
256
  });
256
257
  if (typeof t == "number") return {
257
258
  mobile: t,
258
259
  tablet: t,
259
260
  desktop: t
260
261
  };
261
- const s = Ne(e, r.desktop, t.desktop);
262
+ const s = Be(e, r.desktop, t.desktop);
262
263
  return _object_spread_props(_object_spread({}, r, t), {
263
264
  desktop: s
264
265
  });
265
- }, Be = (e, t)=>{
266
+ }, We = (e, t)=>{
266
267
  if (e.length === 0) return [];
267
268
  const r = Math.ceil(e.length / t), s = [];
268
269
  for(let f = 0; f < e.length; f += r)s.push(e[f]);
269
270
  return s[s.length - 1] = e[e.length - r], s;
270
- }, uo = (e, t)=>{
271
+ }, fo = (e, t)=>{
271
272
  const r = [];
272
273
  for(let s = 0; s < t.length; s++)s === 0 ? r.push(t[0]) : r.push((t[s] + t[s - 1]) / 2);
273
274
  for(let s = r.length - 1; s >= 0; s--)if (e - r[s] >= -1) return s;
274
275
  return 0;
275
- }, je = 5e3, Ke = (param)=>{
276
- let { items: e, itemStyle: t, itemClassName: r, withBullets: s, renderBullets: f, initialActiveItem: i, itemsPerPage: m, itemsToScroll: v, mobilePageOffset: h, gap: l, free: u, centered: A, autoplay: d, withControls: _ = !0, onPageChange: G, dataAttributes: ie, "aria-label": N, "aria-labelledby": B } = param;
277
- const { platformOverrides: W, skinName: P, texts: ue, t: q } = ce(), D = Yt(), b = io(D || "large", m), { isDesktopOrBigger: V, isTablet: J } = We(), F = J ? b.tablet : b.mobile, T = Math.max(Math.floor(V ? b.desktop : F), 1), L = o.useRef(null), n = Math.ceil(e.length / Math.max(Math.floor(b.mobile), 1)), g = Math.ceil(e.length / Math.max(Math.floor(b.tablet), 1)), y = Math.ceil(e.length / Math.max(Math.floor(b.desktop), 1)), I = Math.ceil(e.length / T), [{ scrollLeft: Q, scrollRight: O }, fe] = o.useState({
276
+ }, Ke = 5e3, Ze = (param)=>{
277
+ let { items: e, itemStyle: t, itemClassName: r, withBullets: s, renderBullets: f, initialActiveItem: i, itemsPerPage: p, itemsToScroll: g, mobilePageOffset: h, gap: l, free: n, centered: P, autoplay: d, withControls: w = !0, onPageChange: G, dataAttributes: ie, "aria-label": B, "aria-labelledby": W } = param;
278
+ const { platformOverrides: V, skinName: y, texts: ue, t: q } = ce(), O = qt(), b = uo(O || "large", p), { isDesktopOrBigger: D, isTablet: J } = Ve(), F = J ? b.tablet : b.mobile, M = Math.max(Math.floor(D ? b.desktop : F), 1), T = o.useRef(null), a = Math.ceil(e.length / Math.max(Math.floor(b.mobile), 1)), C = Math.ceil(e.length / Math.max(Math.floor(b.tablet), 1)), E = Math.ceil(e.length / Math.max(Math.floor(b.desktop), 1)), A = Math.ceil(e.length / M), [{ scrollLeft: Q, scrollRight: z }, fe] = o.useState({
278
279
  scrollLeft: 0,
279
280
  scrollRight: 1
280
- }), [de, Ye] = o.useState([]), X = o.useMemo(()=>Be(de, I), [
281
+ }), [de, qe] = o.useState([]), X = o.useMemo(()=>We(de, A), [
281
282
  de,
282
- I
283
- ]), ee = v ? Be(de, Math.ceil(e.length / v)) : X, U = O !== 0, te = Q !== 0, { isAutoplayEnabled: oe, shouldAutoplay: ve, setShouldAutoPlay: E } = Oe(!!d, L);
283
+ A
284
+ ]), ee = g ? We(de, Math.ceil(e.length / g)) : X, U = z !== 0, te = Q !== 0, { isAutoplayEnabled: oe, shouldAutoplay: ve, setShouldAutoPlay: L } = ze(!!d, T);
284
285
  o.useEffect(()=>{
285
- if (L.current) {
286
- const c = L.current, p = ()=>{
287
- const { scrollWidth: re, clientWidth: Z } = c, ne = Math.round(c.scrollLeft), ae = Math.round(re - (ne + Z));
286
+ if (T.current) {
287
+ const u = T.current, m = ()=>{
288
+ const { scrollWidth: re, clientWidth: Z } = u, ne = Math.round(u.scrollLeft), ae = Math.round(re - (ne + Z));
288
289
  fe({
289
290
  scrollLeft: ne,
290
291
  scrollRight: ae
291
292
  });
292
- }, C = ()=>{
293
- const re = c.scrollWidth - c.clientWidth;
294
- Ye(Array.from(c.querySelectorAll("[data-item]")).map((Z, ne)=>{
293
+ }, v = ()=>{
294
+ const re = u.scrollWidth - u.clientWidth;
295
+ qe(Array.from(u.querySelectorAll("[data-item]")).map((Z, ne)=>{
295
296
  if (ne === e.length - 1) return re;
296
- const ae = Z.offsetLeft, Xe = parseInt(getComputedStyle(Z).scrollMargin), et = A && !V ? ae - Z.clientWidth / 2 : ae;
297
- return Math.min(et - Xe - c.offsetLeft, re);
297
+ const ae = Z.offsetLeft, et = parseInt(getComputedStyle(Z).scrollMargin), tt = P && !D ? ae - Z.clientWidth / 2 : ae;
298
+ return Math.min(tt - et - u.offsetLeft, re);
298
299
  }));
299
300
  };
300
- p(), C(), c.addEventListener("scroll", p);
301
- const R = Ve(c, ()=>{
302
- p(), C();
301
+ m(), v(), u.addEventListener("scroll", m);
302
+ const R = De(u, ()=>{
303
+ m(), v();
303
304
  });
304
305
  return ()=>{
305
- c.removeEventListener("scroll", p), R();
306
+ u.removeEventListener("scroll", m), R();
306
307
  };
307
308
  }
308
309
  return ()=>{};
@@ -310,43 +311,43 @@ const Oe = (e, t)=>{
310
311
  b.desktop,
311
312
  b.tablet,
312
313
  b.mobile,
313
- I,
314
- l,
315
314
  A,
316
- V,
315
+ l,
316
+ P,
317
+ D,
317
318
  e.length
318
319
  ]);
319
- const $ = o.useCallback(function(c) {
320
- let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
321
- const C = L.current;
322
- if (C) {
323
- const R = X[c];
324
- C.scrollTo({
320
+ const $ = o.useCallback(function(u) {
321
+ let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
322
+ const v = T.current;
323
+ if (v) {
324
+ const R = X[u];
325
+ v.scrollTo({
325
326
  left: R,
326
- behavior: p ? "smooth" : "auto"
327
+ behavior: m ? "smooth" : "auto"
327
328
  });
328
329
  }
329
330
  }, [
330
331
  X
331
332
  ]), he = o.useCallback(()=>{
332
- const c = L.current;
333
- if (c) {
334
- const { scrollLeft: p } = c, C = [
333
+ const u = T.current;
334
+ if (u) {
335
+ const { scrollLeft: m } = u, v = [
335
336
  ...ee
336
- ].reverse().find((R)=>R - p < -1);
337
- c.scrollTo({
338
- left: C,
337
+ ].reverse().find((R)=>R - m < -1);
338
+ u.scrollTo({
339
+ left: v,
339
340
  behavior: "smooth"
340
341
  });
341
342
  }
342
343
  }, [
343
344
  ee
344
345
  ]), j = o.useCallback(()=>{
345
- const c = L.current;
346
- if (c) {
347
- const { scrollLeft: p } = c, C = ee.find((R)=>R - p > 1);
348
- c.scrollTo({
349
- left: C,
346
+ const u = T.current;
347
+ if (u) {
348
+ const { scrollLeft: m } = u, v = ee.find((R)=>R - m > 1);
349
+ u.scrollTo({
350
+ left: v,
350
351
  behavior: "smooth"
351
352
  });
352
353
  }
@@ -354,11 +355,11 @@ const Oe = (e, t)=>{
354
355
  ee
355
356
  ]);
356
357
  o.useEffect(()=>{
357
- i !== void 0 && $(Math.floor(i / T), !1);
358
+ i !== void 0 && $(Math.floor(i / M), !1);
358
359
  }, [
359
360
  i,
360
361
  $,
361
- T
362
+ M
362
363
  ]);
363
364
  const se = typeof d == "object" && d.loop || !1, K = o.useRef({
364
365
  interacting: !1,
@@ -366,85 +367,85 @@ const Oe = (e, t)=>{
366
367
  });
367
368
  o.useEffect(()=>{
368
369
  if (ve && d) {
369
- const c = typeof d == "boolean" ? je : d.time, p = setInterval(()=>{
370
- var C;
371
- K.current.interacting || (O !== 0 ? j() : se && ((C = L.current) == null || C.scrollTo({
370
+ const u = typeof d == "boolean" ? Ke : d.time, m = setInterval(()=>{
371
+ var v;
372
+ K.current.interacting || (z !== 0 ? j() : se && ((v = T.current) == null || v.scrollTo({
372
373
  left: 0,
373
374
  behavior: "smooth"
374
375
  })));
375
- }, c);
376
- return ()=>clearInterval(p);
376
+ }, u);
377
+ return ()=>clearInterval(m);
377
378
  }
378
379
  }, [
379
380
  d,
380
381
  j,
381
- O,
382
+ z,
382
383
  ve,
383
384
  se
384
385
  ]);
385
- const S = uo(Q, X), qe = 20;
386
+ const S = fo(Q, X), Je = 20;
386
387
  o.useEffect(()=>{
387
- S === I - 1 && !se && E(!1);
388
+ S === A - 1 && !se && L(!1);
388
389
  }, [
389
390
  S,
390
- I,
391
- E,
391
+ A,
392
+ L,
392
393
  se
393
394
  ]);
394
395
  const Pe = o.useRef(!i), ye = o.useRef(0);
395
396
  o.useEffect(()=>{
396
397
  if (G) {
397
- const c = Math.min((S + 1) * T - 1, e.length - 1), p = [];
398
- for(let C = 0; C < T; C++){
399
- const R = c - C;
400
- R >= 0 && p.unshift(R);
398
+ const u = Math.min((S + 1) * M - 1, e.length - 1), m = [];
399
+ for(let v = 0; v < M; v++){
400
+ const R = u - v;
401
+ R >= 0 && m.unshift(R);
401
402
  }
402
403
  Pe.current ? ye.current !== S && G({
403
404
  pageIndex: S,
404
- shownItemIndexes: p
405
- }) : Pe.current = p.includes(i || 0), ye.current = S;
405
+ shownItemIndexes: m
406
+ }) : Pe.current = m.includes(i || 0), ye.current = S;
406
407
  }
407
408
  }, [
408
409
  S,
409
410
  e.length,
410
- T,
411
+ M,
411
412
  i,
412
413
  G
413
414
  ]);
414
- const M = o.useContext(Ce), pe = o.useMemo(()=>({
415
+ const I = o.useContext(Ce), pe = o.useMemo(()=>({
415
416
  currentIndex: S,
416
417
  numPages: {
417
- mobile: n,
418
- tablet: g,
419
- desktop: y
418
+ mobile: a,
419
+ tablet: C,
420
+ desktop: E
420
421
  }
421
422
  }), [
422
423
  S,
423
- y,
424
- n,
425
- g
424
+ E,
425
+ a,
426
+ C
426
427
  ]), Se = o.useMemo(()=>({
427
428
  isAutoplayEnabled: oe,
428
- isAtLastPage: S === I - 1,
429
- onAutoplayChanged: E
429
+ isAtLastPage: S === A - 1,
430
+ onAutoplayChanged: L
430
431
  }), [
431
432
  oe,
432
433
  S,
433
- I,
434
- E
434
+ A,
435
+ L
435
436
  ]), Ee = o.useMemo(()=>({
436
- setShouldAutoplay: E,
437
+ setShouldAutoplay: L,
437
438
  prevArrowEnabled: te,
438
439
  nextArrowEnabled: U
439
440
  }), [
440
- E,
441
+ L,
441
442
  te,
442
443
  U
443
444
  ]);
444
445
  o.useEffect(()=>{
445
- M && (M.setGoPrev(he), M.setGoNext(j), M.setGoToPage($), M.setBulletsProps(pe), M.setAutoplayControlProps(Se), M.setPageControlsProps(Ee), M.setIsAutoplayEnabledSetter(E));
446
+ I && (I.setGoPrev(he), I.setGoNext(j), I.setGoToPage($), I.setBulletsProps(pe), I.setAutoplayControlProps(Se), I.setPageControlsProps(Ee), I.setIsAutoplayEnabledSetter(L));
446
447
  }, [
447
- M,
448
+ I,
448
449
  j,
449
450
  he,
450
451
  pe,
@@ -455,121 +456,124 @@ const Oe = (e, t)=>{
455
456
  U,
456
457
  d,
457
458
  oe,
458
- E
459
+ L
459
460
  ]);
460
461
  let le = null;
461
462
  f ? le = f({
462
- numPages: I,
463
+ numPages: A,
463
464
  currentIndex: S
464
- }) : s && (le = /* @__PURE__ */ a(Fe, _object_spread({}, pe)));
465
- const Je = "64px", Qe = "36px", Ae = /* @__PURE__ */ a("div", {
466
- className: k(wt, // when renderBullets is provided, we let the consumer decide if the bullets should be hidden
465
+ }) : s && (le = /* @__PURE__ */ c(Ue, _object_spread({}, pe)));
466
+ const Qe = "64px", Xe = "36px", Ae = /* @__PURE__ */ c("div", {
467
+ className: k(Nt, // when renderBullets is provided, we let the consumer decide if the bullets should be hidden
467
468
  !f && {
468
- [xt]: y <= 1,
469
- [Nt]: g <= 1,
470
- [Bt]: n <= 1
469
+ [wt]: E <= 1,
470
+ [Bt]: C <= 1,
471
+ [Wt]: a <= 1
471
472
  }),
472
473
  children: le
473
474
  });
474
475
  return /* @__PURE__ */ H("div", _object_spread_props(_object_spread({}, me(_object_spread({
475
- "component-name": "Carousel"
476
+ "component-name": "Carousel",
477
+ testid: "Carousel"
476
478
  }, ie))), {
477
- className: Wt,
479
+ className: Vt,
478
480
  role: "region",
479
- "aria-label": N ? `${N}, ${ue.carouselRegion || q(ao)}` : void 0,
480
- "aria-labelledby": N ? void 0 : B,
481
+ "aria-label": B ? `${B}, ${ue.carouselRegion || q(co)}` : void 0,
482
+ "aria-labelledby": B ? void 0 : W,
481
483
  children: [
482
- /* @__PURE__ */ a("div", {
483
- className: k(Vt, {
484
- [Dt]: n > 1,
485
- [Ot]: g > 1,
486
- [zt]: y > 1
484
+ /* @__PURE__ */ c("div", {
485
+ className: k(Dt, {
486
+ [Ot]: a > 1,
487
+ [zt]: C > 1,
488
+ [_t]: E > 1
487
489
  }),
488
- children: _ ? /* @__PURE__ */ H(Y, {
490
+ children: w ? /* @__PURE__ */ H(Y, {
489
491
  space: "between",
490
492
  alignItems: "center",
491
- className: we,
493
+ className: xe,
492
494
  children: [
493
- !!d && /* @__PURE__ */ a("div", {
494
- className: _t,
495
- children: /* @__PURE__ */ a($e, {
495
+ !!d && /* @__PURE__ */ c("div", {
496
+ className: Gt,
497
+ children: /* @__PURE__ */ c(je, {
496
498
  isAutoplayEnabled: oe,
497
- isAtLastPage: S === I - 1,
498
- onAutoplayChanged: (c)=>{
499
- !U && c && $(0), E(c);
499
+ isAtLastPage: S === A - 1,
500
+ onAutoplayChanged: (u)=>{
501
+ !U && u && $(0), L(u);
500
502
  }
501
503
  })
502
504
  }),
503
505
  Ae,
504
- /* @__PURE__ */ a("div", {
505
- className: Gt,
506
- children: /* @__PURE__ */ a(Ue, {
506
+ /* @__PURE__ */ c("div", {
507
+ className: Ft,
508
+ children: /* @__PURE__ */ c($e, {
507
509
  goNext: j,
508
510
  goPrev: he,
509
- setShouldAutoplay: E,
511
+ setShouldAutoplay: L,
510
512
  prevArrowEnabled: te,
511
- nextArrowEnabled: U
513
+ nextArrowEnabled: U,
514
+ pagesCount: A,
515
+ currentPageIndex: S
512
516
  })
513
517
  })
514
518
  ]
515
- }) : le && /* @__PURE__ */ a(Y, {
519
+ }) : le && /* @__PURE__ */ c(Y, {
516
520
  space: "around",
517
- className: we,
521
+ className: xe,
518
522
  children: Ae
519
523
  })
520
524
  }),
521
- /* @__PURE__ */ a("div", {
522
- className: Ft,
523
- children: /* @__PURE__ */ a("div", {
524
- className: k(Ut, {
525
- [$t]: A,
526
- [jt]: n > 1,
527
- [Kt]: g > 1
525
+ /* @__PURE__ */ c("div", {
526
+ className: Ut,
527
+ children: /* @__PURE__ */ c("div", {
528
+ className: k($t, {
529
+ [jt]: P,
530
+ [Kt]: a > 1,
531
+ [Zt]: C > 1
528
532
  }),
529
533
  role: "list",
530
534
  style: _object_spread_props(_object_spread({}, be(_object_spread({
531
- [x.itemsPerPageDesktop]: String(b.desktop),
532
- [x.itemsPerPageTablet]: String(b.tablet),
533
- [x.itemsPerPageMobile]: String(b.mobile)
535
+ [N.itemsPerPageDesktop]: String(b.desktop),
536
+ [N.itemsPerPageTablet]: String(b.tablet),
537
+ [N.itemsPerPageMobile]: String(b.mobile)
534
538
  }, h === "large" ? {
535
- [x.mobilePageOffset]: Je
536
- } : P === qt ? {
537
- [x.mobilePageOffset]: Qe
539
+ [N.mobilePageOffset]: Qe
540
+ } : y === Jt ? {
541
+ [N.mobilePageOffset]: Xe
538
542
  } : {}, l !== void 0 ? {
539
- [x.gap]: String(l)
543
+ [N.gap]: String(l)
540
544
  } : {}))), {
541
- scrollSnapType: u ? "initial" : "x mandatory",
545
+ scrollSnapType: n ? "initial" : "x mandatory",
542
546
  // Hack to fix https://jira.tid.es/browse/NOVUMCC-8988
543
547
  // there is a webkit rendering bug that causes a half pixel white line to appear at
544
548
  // the bottom of the scrollable area in retina displays when it has a height with
545
549
  // decimals. This extra padding avoids that line to partially cover the carousel
546
550
  // slides border:
547
- paddingBottom: at(W) && !ct(W) ? 0.5 : void 0
551
+ paddingBottom: ct(V) && !it(V) ? 0.5 : void 0
548
552
  }),
549
- ref: L,
550
- onTouchStart: (c)=>{
551
- K.current.left = c.currentTarget.scrollLeft, K.current.interacting = !0;
553
+ ref: T,
554
+ onTouchStart: (u)=>{
555
+ K.current.left = u.currentTarget.scrollLeft, K.current.interacting = !0;
552
556
  },
553
- onTouchEnd: (c)=>{
554
- K.current.interacting = !1, Math.abs(c.currentTarget.scrollLeft - K.current.left) > qe && E(!1);
557
+ onTouchEnd: (u)=>{
558
+ K.current.interacting = !1, Math.abs(u.currentTarget.scrollLeft - K.current.left) > Je && L(!1);
555
559
  },
556
560
  onKeyDown: ()=>{
557
- E(!1);
561
+ L(!1);
558
562
  },
559
- children: e.map((c, p)=>/* @__PURE__ */ a("div", {
560
- className: k(Zt, r),
563
+ children: e.map((u, m)=>/* @__PURE__ */ c("div", {
564
+ className: k(Ht, r),
561
565
  style: _object_spread_props(_object_spread({}, t), {
562
- scrollSnapStop: De(W) ? "always" : "normal"
566
+ scrollSnapStop: Oe(V) ? "always" : "normal"
563
567
  }),
564
568
  role: "listitem",
565
569
  "data-item": !0,
566
- children: c
567
- }, p))
570
+ children: u
571
+ }, m))
568
572
  })
569
573
  })
570
574
  ]
571
575
  }));
572
- }, Ze = ()=>{
576
+ }, He = ()=>{
573
577
  const [e, t] = o.useState(1);
574
578
  return o.useEffect(()=>{
575
579
  const r = ()=>{
@@ -579,15 +583,15 @@ const Oe = (e, t)=>{
579
583
  window.removeEventListener("resize", r);
580
584
  };
581
585
  }, []), e;
582
- }, Oo = (e)=>{
583
- const t = Ze();
584
- return /* @__PURE__ */ /*#__PURE__*/ tt(Ke, _object_spread_props(_object_spread({}, e), {
586
+ }, zo = (e)=>{
587
+ const t = He();
588
+ return /* @__PURE__ */ /*#__PURE__*/ ot(Ze, _object_spread_props(_object_spread({}, e), {
585
589
  key: t
586
590
  }));
587
- }, zo = (param)=>{
588
- let { items: e, itemStyle: t, itemClassName: r, withBullets: s, renderBullets: f, withControls: i = !0, initialActiveItem: m, onPageChange: v, dataAttributes: h, "aria-label": l, "aria-labelledby": u } = param;
589
- const A = Ze();
590
- return /* @__PURE__ */ a(Ke, {
591
+ }, _o = (param)=>{
592
+ let { items: e, itemStyle: t, itemClassName: r, withBullets: s, renderBullets: f, withControls: i = !0, initialActiveItem: p, onPageChange: g, dataAttributes: h, "aria-label": l, "aria-labelledby": n } = param;
593
+ const P = He();
594
+ return /* @__PURE__ */ c(Ze, {
591
595
  items: e,
592
596
  itemStyle: t,
593
597
  itemClassName: r,
@@ -602,182 +606,184 @@ const Oe = (e, t)=>{
602
606
  withBullets: s,
603
607
  renderBullets: f,
604
608
  withControls: i,
605
- initialActiveItem: m,
606
- onPageChange: v,
609
+ initialActiveItem: p,
610
+ onPageChange: g,
607
611
  dataAttributes: h,
608
612
  "aria-label": l,
609
- "aria-labelledby": u
610
- }, A);
611
- }, He = /*#__PURE__*/ o.createContext(void 0), _o = ()=>o.useContext(He), Go = (param)=>{
612
- let { items: e, withBullets: t, withControls: r = !0, autoplay: s, initialPageIndex: f = 0, onPageChange: i, dataAttributes: m, inverseBullets: v = !0 } = param;
613
- const { platformOverrides: h } = ce(), l = o.useContext(Ce), u = o.useRef(null), [{ scrollLeft: A, scrollRight: d }, _] = o.useState({
613
+ "aria-labelledby": n
614
+ }, P);
615
+ }, Ye = /*#__PURE__*/ o.createContext(void 0), Go = ()=>o.useContext(Ye), Fo = (param)=>{
616
+ let { items: e, withBullets: t, withControls: r = !0, autoplay: s, initialPageIndex: f = 0, onPageChange: i, dataAttributes: p, inverseBullets: g = !0 } = param;
617
+ const { platformOverrides: h } = ce(), l = o.useContext(Ce), n = o.useRef(null), [{ scrollLeft: P, scrollRight: d }, w] = o.useState({
614
618
  scrollLeft: 0,
615
619
  scrollRight: 1
616
- }), G = d !== 0, ie = A !== 0, N = o.useCallback(()=>{
617
- const n = u.current;
618
- n && n.scrollBy({
619
- left: -n.clientWidth,
620
+ }), G = d !== 0, ie = P !== 0, B = o.useCallback(()=>{
621
+ const a = n.current;
622
+ a && a.scrollBy({
623
+ left: -a.clientWidth,
620
624
  behavior: "smooth"
621
625
  });
622
- }, []), B = o.useCallback(()=>{
623
- const n = u.current;
624
- n && n.scrollBy({
625
- left: n.clientWidth,
626
+ }, []), W = o.useCallback(()=>{
627
+ const a = n.current;
628
+ a && a.scrollBy({
629
+ left: a.clientWidth,
626
630
  behavior: "smooth"
627
631
  });
628
- }, []), W = o.useCallback(function(n) {
629
- let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
630
- const y = u.current;
631
- y && y.scrollTo({
632
- left: y.clientWidth * n,
633
- behavior: g ? "smooth" : "auto"
632
+ }, []), V = o.useCallback(function(a) {
633
+ let C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
634
+ const E = n.current;
635
+ E && E.scrollTo({
636
+ left: E.clientWidth * a,
637
+ behavior: C ? "smooth" : "auto"
634
638
  });
635
639
  }, [
636
- u
637
- ]), P = u.current ? Math.floor((A + u.current.clientWidth / 2) / u.current.clientWidth) : 0;
640
+ n
641
+ ]), y = n.current ? Math.floor((P + n.current.clientWidth / 2) / n.current.clientWidth) : 0;
638
642
  o.useLayoutEffect(()=>{
639
- const n = u.current;
640
- if (n) {
641
- const g = ()=>{
642
- const { scrollWidth: I, clientWidth: Q } = n, O = Math.round(n.scrollLeft), fe = Math.round(I - (O + Q));
643
- _({
644
- scrollLeft: O,
643
+ const a = n.current;
644
+ if (a) {
645
+ const C = ()=>{
646
+ const { scrollWidth: A, clientWidth: Q } = a, z = Math.round(a.scrollLeft), fe = Math.round(A - (z + Q));
647
+ w({
648
+ scrollLeft: z,
645
649
  scrollRight: fe
646
650
  });
647
651
  };
648
- g(), n.addEventListener("scroll", g);
649
- const y = Ve(n, g);
652
+ C(), a.addEventListener("scroll", C);
653
+ const E = De(a, C);
650
654
  return ()=>{
651
- n.removeEventListener("scroll", g), y();
655
+ a.removeEventListener("scroll", C), E();
652
656
  };
653
657
  }
654
658
  }, [
655
659
  e.length
656
660
  ]);
657
- const { isAutoplayEnabled: ue, shouldAutoplay: q, setShouldAutoPlay: D } = Oe(!!s, u), b = typeof s == "object" && s.loop || !1;
661
+ const { isAutoplayEnabled: ue, shouldAutoplay: q, setShouldAutoPlay: O } = ze(!!s, n), b = typeof s == "object" && s.loop || !1;
658
662
  o.useEffect(()=>{
659
663
  if (q && s) {
660
- const n = typeof s == "boolean" ? je : s.time, g = setInterval(()=>{
661
- var y;
662
- d !== 0 ? B() : b && ((y = u.current) == null || y.scrollTo({
664
+ const a = typeof s == "boolean" ? Ke : s.time, C = setInterval(()=>{
665
+ var E;
666
+ d !== 0 ? W() : b && ((E = n.current) == null || E.scrollTo({
663
667
  left: 0,
664
668
  behavior: "smooth"
665
669
  }));
666
- }, n);
667
- return ()=>clearInterval(g);
670
+ }, a);
671
+ return ()=>clearInterval(C);
668
672
  }
669
673
  }, [
670
674
  s,
671
- B,
675
+ W,
672
676
  d,
673
677
  q,
674
678
  b
675
679
  ]), o.useEffect(()=>{
676
- P === e.length - 1 && !b && D(!1);
680
+ y === e.length - 1 && !b && O(!1);
677
681
  }, [
678
- P,
682
+ y,
679
683
  e.length,
680
- D,
684
+ O,
681
685
  b
682
686
  ]);
683
- const V = o.useRef(!1), J = o.useRef(0);
687
+ const D = o.useRef(!1), J = o.useRef(0);
684
688
  o.useEffect(()=>{
685
- i && (V.current ? J.current !== P && i(P) : V.current = f === P), J.current = P;
689
+ i && (D.current ? J.current !== y && i(y) : D.current = f === y), J.current = y;
686
690
  }, [
687
- P,
691
+ y,
688
692
  f,
689
693
  i
690
694
  ]), o.useEffect(()=>{
691
- const n = u.current;
692
- f !== void 0 && n && !V.current && n.scrollTo({
693
- left: n.clientWidth * f
695
+ const a = n.current;
696
+ f !== void 0 && a && !D.current && a.scrollTo({
697
+ left: a.clientWidth * f
694
698
  });
695
699
  }, [
696
700
  f
697
701
  ]);
698
702
  const F = o.useMemo(()=>({
699
- currentIndex: P,
703
+ currentIndex: y,
700
704
  numPages: e.length
701
705
  }), [
702
- P,
706
+ y,
703
707
  e.length
704
708
  ]);
705
709
  o.useEffect(()=>{
706
- l && (l.setGoPrev(N), l.setGoNext(B), l.setGoToPage(W), l.setBulletsProps(F));
710
+ l && (l.setGoPrev(B), l.setGoNext(W), l.setGoToPage(V), l.setBulletsProps(F));
707
711
  }, [
708
712
  l,
713
+ W,
709
714
  B,
710
- N,
711
715
  F,
712
- W
716
+ V
713
717
  ]);
714
- const T = t && /* @__PURE__ */ a("div", {
715
- className: gt,
716
- children: /* @__PURE__ */ a(Le, {
717
- variant: v ? "inverse" : "default",
718
- children: /* @__PURE__ */ a(Fe, _object_spread({}, F))
718
+ const M = t && /* @__PURE__ */ c("div", {
719
+ className: Ct,
720
+ children: /* @__PURE__ */ c(Le, {
721
+ variant: g ? "inverse" : "default",
722
+ children: /* @__PURE__ */ c(Ue, _object_spread({}, F))
719
723
  })
720
- }), L = !t && !s;
721
- return /* @__PURE__ */ a(He.Provider, {
724
+ }), T = !t && !s;
725
+ return /* @__PURE__ */ c(Ye.Provider, {
722
726
  value: {
723
727
  withBullets: !!t
724
728
  },
725
- children: /* @__PURE__ */ a(Jt, {
729
+ children: /* @__PURE__ */ c(Qt, {
726
730
  skipDesktop: !0,
727
731
  children: /* @__PURE__ */ H("div", _object_spread_props(_object_spread({
728
- className: k(Ct, {
729
- [vt]: !!t
732
+ className: k(vt, {
733
+ [Pt]: !!t
730
734
  })
731
- }, me(m, "SlideShow")), {
735
+ }, me(p, "SlideShow")), {
732
736
  children: [
733
- e.length > 1 && (r ? /* @__PURE__ */ a(Le, {
737
+ e.length > 1 && (r ? /* @__PURE__ */ c(Le, {
734
738
  variant: "media",
735
739
  children: /* @__PURE__ */ H(Y, {
736
- space: L ? 0 : "between",
740
+ space: T ? 0 : "between",
737
741
  alignItems: "center",
738
742
  className: k(Re, {
739
- [Pt]: L
743
+ [yt]: T
740
744
  }),
741
745
  children: [
742
- !!s && /* @__PURE__ */ a("div", {
743
- className: yt,
744
- children: /* @__PURE__ */ a($e, {
746
+ !!s && /* @__PURE__ */ c("div", {
747
+ className: St,
748
+ children: /* @__PURE__ */ c(je, {
745
749
  isAutoplayEnabled: ue,
746
- isAtLastPage: P === e.length - 1,
747
- onAutoplayChanged: (n)=>{
748
- P === e.length - 1 && n && W(0), D(n);
750
+ isAtLastPage: y === e.length - 1,
751
+ onAutoplayChanged: (a)=>{
752
+ y === e.length - 1 && a && V(0), O(a);
749
753
  }
750
754
  })
751
755
  }),
752
- T,
753
- /* @__PURE__ */ a(Ue, {
754
- goNext: B,
755
- goPrev: N,
756
- setShouldAutoplay: D,
756
+ M,
757
+ /* @__PURE__ */ c($e, {
758
+ goNext: W,
759
+ goPrev: B,
760
+ setShouldAutoplay: O,
757
761
  prevArrowEnabled: ie,
758
- nextArrowEnabled: G
762
+ nextArrowEnabled: G,
763
+ pagesCount: e.length,
764
+ currentPageIndex: y
759
765
  })
760
766
  ]
761
767
  })
762
- }) : t && /* @__PURE__ */ a(Y, {
768
+ }) : t && /* @__PURE__ */ c(Y, {
763
769
  space: "around",
764
770
  className: Re,
765
- children: T
771
+ children: M
766
772
  })),
767
- /* @__PURE__ */ a("div", {
773
+ /* @__PURE__ */ c("div", {
768
774
  style: be({
769
- [Ht.mediaBorderRadius]: "0px"
775
+ [Yt.mediaBorderRadius]: "0px"
770
776
  }),
771
- children: /* @__PURE__ */ a("div", {
772
- className: St,
773
- ref: u,
774
- children: e.map((n, g)=>/* @__PURE__ */ a("div", {
775
- className: Et,
777
+ children: /* @__PURE__ */ c("div", {
778
+ className: Et,
779
+ ref: n,
780
+ children: e.map((a, C)=>/* @__PURE__ */ c("div", {
781
+ className: At,
776
782
  style: {
777
- scrollSnapStop: De(h) ? "always" : "normal"
783
+ scrollSnapStop: Oe(h) ? "always" : "normal"
778
784
  },
779
- children: n
780
- }, g))
785
+ children: a
786
+ }, C))
781
787
  })
782
788
  })
783
789
  ]
@@ -785,4 +791,4 @@ const Oe = (e, t)=>{
785
791
  })
786
792
  });
787
793
  };
788
- export { Oo as Carousel, $e as CarouselAutoplayControl, Do as CarouselContextConsumer, Wo as CarouselContextProvider, Ue as CarouselPageControls, zo as CenteredCarousel, Fe as PageBullets, Go as Slideshow, Vo as useCarouselContext, _o as useSlideshowContext };
794
+ export { zo as Carousel, je as CarouselAutoplayControl, Oo as CarouselContextConsumer, Vo as CarouselContextProvider, $e as CarouselPageControls, _o as CenteredCarousel, Ue as PageBullets, Fo as Slideshow, Do as useCarouselContext, Go as useSlideshowContext };