@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
package/dist/carousel.js CHANGED
@@ -11,34 +11,34 @@ function _export(target, all) {
11
11
  }
12
12
  _export(exports, {
13
13
  Carousel: function() {
14
- return Oo;
14
+ return zo;
15
15
  },
16
16
  CarouselAutoplayControl: function() {
17
- return $e;
17
+ return je;
18
18
  },
19
19
  CarouselContextConsumer: function() {
20
- return Do;
20
+ return Oo;
21
21
  },
22
22
  CarouselContextProvider: function() {
23
- return Wo;
23
+ return Vo;
24
24
  },
25
25
  CarouselPageControls: function() {
26
- return Ue;
26
+ return $e;
27
27
  },
28
28
  CenteredCarousel: function() {
29
- return zo;
29
+ return _o;
30
30
  },
31
31
  PageBullets: function() {
32
- return Fe;
32
+ return Ue;
33
33
  },
34
34
  Slideshow: function() {
35
- return Go;
35
+ return Fo;
36
36
  },
37
37
  useCarouselContext: function() {
38
- return Vo;
38
+ return Do;
39
39
  },
40
40
  useSlideshowContext: function() {
41
- return _o;
41
+ return Go;
42
42
  }
43
43
  });
44
44
  const _jsxruntime = require("react/jsx-runtime");
@@ -162,45 +162,45 @@ function _object_spread_props(target, source) {
162
162
  }
163
163
  return target;
164
164
  }
165
- const Oe = (e, t)=>{
166
- const r = (0, _environment.isClientSide)() ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1, [s, f] = _react.useState(!!e && !r), i = (0, _documentvisibility.useDocumentVisibility)(), m = (0, _hooks.useIsInViewport)(t, !1);
165
+ const ze = (e, t)=>{
166
+ const r = (0, _environment.isClientSide)() ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : !1, [s, f] = _react.useState(!!e && !r), i = (0, _documentvisibility.useDocumentVisibility)(), p = (0, _hooks.useIsInViewport)(t, !1);
167
167
  return {
168
168
  isAutoplayEnabled: s && !!e,
169
- shouldAutoplay: m && i && !!e && s,
169
+ shouldAutoplay: p && i && !!e && s,
170
170
  setShouldAutoPlay: f
171
171
  };
172
- }, w = ()=>{
172
+ }, x = ()=>{
173
173
  throw new Error("You must wrap your component with a CarouselContextProvider to use CarouselContext");
174
- }, ze = {
174
+ }, _e = {
175
175
  currentIndex: 0,
176
176
  numPages: 0
177
- }, _e = {
177
+ }, Ge = {
178
178
  isAutoplayEnabled: !1,
179
179
  isAtLastPage: !1,
180
- onAutoplayChanged: w
181
- }, Ge = {
182
- setShouldAutoplay: w,
180
+ onAutoplayChanged: x
181
+ }, Fe = {
182
+ setShouldAutoplay: x,
183
183
  prevArrowEnabled: !1,
184
184
  nextArrowEnabled: !1
185
185
  }, ge = /*#__PURE__*/ _react.createContext({
186
- goPrev: w,
187
- goNext: w,
188
- goToPage: w,
189
- bulletsProps: ze,
190
- autoplayControlProps: _e,
191
- pageControlsProps: Ge
192
- }), Ce = /*#__PURE__*/ _react.createContext(null), Wo = (param)=>{
186
+ goPrev: x,
187
+ goNext: x,
188
+ goToPage: x,
189
+ bulletsProps: _e,
190
+ autoplayControlProps: Ge,
191
+ pageControlsProps: Fe
192
+ }), Ce = /*#__PURE__*/ _react.createContext(null), Vo = (param)=>{
193
193
  let { children: e } = param;
194
- const [t, r] = _react.useState(ze), [s, f] = _react.useState(_e), [i, m] = _react.useState(Ge), v = _react.useRef(w), h = _react.useRef(w), l = _react.useRef(w), u = _react.useRef(w), A = _react.useMemo(()=>({
194
+ const [t, r] = _react.useState(_e), [s, f] = _react.useState(Ge), [i, p] = _react.useState(Fe), g = _react.useRef(x), h = _react.useRef(x), l = _react.useRef(x), n = _react.useRef(x), P = _react.useMemo(()=>({
195
195
  goPrev: ()=>{
196
- v.current();
196
+ g.current();
197
197
  },
198
198
  goNext: ()=>{
199
199
  h.current();
200
200
  },
201
201
  goToPage: function(d) {
202
- let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
203
- l.current(d, _);
202
+ let w = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
203
+ l.current(d, w);
204
204
  },
205
205
  bulletsProps: t,
206
206
  autoplayControlProps: s,
@@ -211,11 +211,11 @@ const Oe = (e, t)=>{
211
211
  i
212
212
  ]);
213
213
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(ge.Provider, {
214
- value: A,
214
+ value: P,
215
215
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Ce.Provider, {
216
216
  value: {
217
217
  setGoPrev: (d)=>{
218
- v.current = d;
218
+ g.current = d;
219
219
  },
220
220
  setGoNext: (d)=>{
221
221
  h.current = d;
@@ -225,25 +225,26 @@ const Oe = (e, t)=>{
225
225
  },
226
226
  setBulletsProps: r,
227
227
  setAutoplayControlProps: f,
228
- setPageControlsProps: m,
228
+ setPageControlsProps: p,
229
229
  setIsAutoplayEnabledSetter: (d)=>{
230
- u.current = d;
230
+ n.current = d;
231
231
  }
232
232
  },
233
233
  children: e
234
234
  })
235
235
  });
236
- }, Vo = ()=>_react.useContext(ge), Do = ge.Consumer, Fe = (param)=>{
236
+ }, Do = ()=>_react.useContext(ge), Oo = ge.Consumer, Ue = (param)=>{
237
237
  let { currentIndex: e, numPages: t } = param;
238
238
  var _t_tablet;
239
- const r = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), { isTablet: s, isDesktopOrBigger: f } = (0, _hooks.useScreenSize)(), 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)=>{
239
+ const r = (0, _themevariantcontext.useIsInverseOrMediaVariant)(), { isTablet: s, isDesktopOrBigger: f } = (0, _hooks.useScreenSize)(), 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)=>{
240
240
  const l = {};
241
241
  if (r ? l[e === h ? _carouselcssmistica.bulletActiveInverse : _carouselcssmistica.bulletInverse] = !0 : l[e === h ? _carouselcssmistica.bulletActive : _carouselcssmistica.bullet] = !0, e === h) return l[_carouselcssmistica.bulletActiveSizing] = !0, l;
242
- const u = Math.abs(h - e);
243
- return i <= _carouselcssmistica.VISIBLE_BULLETS || u === 1 ? (l[_carouselcssmistica.bulletInactiveSizing] = !0, l) : e === 0 || e === i - 1 ? (l[_carouselcssmistica.bulletInactiveSizing] = u === 2, l[_carouselcssmistica.bulletInactiveMediumSizing] = u === 3, l[_carouselcssmistica.bulletInactiveSmallSizing] = u > 3, l) : (l[_carouselcssmistica.bulletInactiveMediumSizing] = u === 2, l[_carouselcssmistica.bulletInactiveSmallSizing] = u > 2, l);
244
- }, v = (h)=>e + 2 < _carouselcssmistica.VISIBLE_BULLETS ? h : i - e + 1 < _carouselcssmistica.VISIBLE_BULLETS ? h - (i - _carouselcssmistica.VISIBLE_BULLETS) : h - (e - 2);
242
+ const n = Math.abs(h - e);
243
+ return i <= _carouselcssmistica.VISIBLE_BULLETS || n === 1 ? (l[_carouselcssmistica.bulletInactiveSizing] = !0, l) : e === 0 || e === i - 1 ? (l[_carouselcssmistica.bulletInactiveSizing] = n === 2, l[_carouselcssmistica.bulletInactiveMediumSizing] = n === 3, l[_carouselcssmistica.bulletInactiveSmallSizing] = n > 3, l) : (l[_carouselcssmistica.bulletInactiveMediumSizing] = n === 2, l[_carouselcssmistica.bulletInactiveSmallSizing] = n > 2, l);
244
+ }, g = (h)=>e + 2 < _carouselcssmistica.VISIBLE_BULLETS ? h : i - e + 1 < _carouselcssmistica.VISIBLE_BULLETS ? h - (i - _carouselcssmistica.VISIBLE_BULLETS) : h - (e - 2);
245
245
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)({
246
- "component-name": "PageBullets"
246
+ "component-name": "PageBullets",
247
+ testid: "PageBullets"
247
248
  })), {
248
249
  className: (0, _classnames.default)(_carouselcssmistica.bulletsScrollableContainerBase, {
249
250
  [_carouselcssmistica.bulletsScrollableContainer]: i > _carouselcssmistica.VISIBLE_BULLETS
@@ -251,7 +252,7 @@ const Oe = (e, t)=>{
251
252
  children: Array.from({
252
253
  length: i
253
254
  }, (h, l)=>{
254
- const u = v(l);
255
+ const n = g(l);
255
256
  var _t_tablet;
256
257
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
257
258
  className: (0, _classnames.default)({
@@ -266,26 +267,26 @@ const Oe = (e, t)=>{
266
267
  [_carouselcssmistica.bulletVisibilityDesktop]: l < t.desktop
267
268
  }),
268
269
  style: _object_spread({}, (0, _css.applyCssVars)({
269
- [_carouselcssmistica.vars.desktopBulletLeftPosition]: `${u * _carouselcssmistica.LARGE_BULLET_FULL_SIZE}px`,
270
- [_carouselcssmistica.vars.mobileBulletLeftPosition]: `${u * _carouselcssmistica.SMALL_BULLET_FULL_SIZE}px`
270
+ [_carouselcssmistica.vars.desktopBulletLeftPosition]: `${n * _carouselcssmistica.LARGE_BULLET_FULL_SIZE}px`,
271
+ [_carouselcssmistica.vars.mobileBulletLeftPosition]: `${n * _carouselcssmistica.SMALL_BULLET_FULL_SIZE}px`
271
272
  })),
272
273
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
273
- className: (0, _classnames.default)(m(l))
274
+ className: (0, _classnames.default)(p(l))
274
275
  })
275
276
  }, l);
276
277
  })
277
278
  }));
278
- }, Ue = (param)=>{
279
- let { bleedLeft: e, bleedRight: t, goPrev: r, goNext: s, setShouldAutoplay: f, prevArrowEnabled: i, nextArrowEnabled: m } = param;
280
- const { texts: v, t: h } = (0, _hooks.useTheme)(), l = (0, _themevariantcontext.useThemeVariant)();
279
+ }, $e = (param)=>{
280
+ let { bleedLeft: e, bleedRight: t, goPrev: r, goNext: s, setShouldAutoplay: f, prevArrowEnabled: i, nextArrowEnabled: p, pagesCount: g, currentPageIndex: h } = param;
281
+ const { texts: l, t: n } = (0, _hooks.useTheme)(), P = (0, _themevariantcontext.useThemeVariant)(), d = i && g !== void 0 && h !== void 0 ? `, ${n(l.carouselPageNumber || _texttokens.carouselPageNumber, h, g)}` : "", w = p && g !== void 0 && h !== void 0 ? `, ${n(l.carouselPageNumber || _texttokens.carouselPageNumber, h + 2, g)}` : "";
281
282
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
282
- space: l === "media" ? 16 : 8,
283
+ space: P === "media" ? 16 : 8,
283
284
  children: [
284
285
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, {
285
286
  Icon: _iconchevronleftregular.default,
286
- "aria-label": v.carouselPrevButton || h(_texttokens.carouselPrevButton),
287
+ "aria-label": (l.carouselPrevButton || n(_texttokens.carouselPrevButton)) + d,
287
288
  type: "neutral",
288
- backgroundType: l === "media" ? "transparent" : "soft",
289
+ backgroundType: P === "media" ? "transparent" : "soft",
289
290
  small: !0,
290
291
  bleedLeft: e,
291
292
  onPress: ()=>{
@@ -295,31 +296,31 @@ const Oe = (e, t)=>{
295
296
  }),
296
297
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, {
297
298
  Icon: _iconchevronrightregular.default,
298
- "aria-label": v.carouselNextButton || h(_texttokens.carouselNextButton),
299
+ "aria-label": (l.carouselNextButton || n(_texttokens.carouselNextButton)) + w,
299
300
  type: "neutral",
300
- backgroundType: l === "media" ? "transparent" : "soft",
301
+ backgroundType: P === "media" ? "transparent" : "soft",
301
302
  small: !0,
302
303
  bleedRight: t,
303
304
  onPress: ()=>{
304
305
  s(), f(!1);
305
306
  },
306
- disabled: !m
307
+ disabled: !p
307
308
  })
308
309
  ]
309
310
  });
310
- }, $e = (param)=>{
311
+ }, je = (param)=>{
311
312
  let { isAutoplayEnabled: e, isAtLastPage: t, onAutoplayChanged: r, bleedLeft: s = !1, bleedRight: f = !1 } = param;
312
- const { texts: i, t: m } = (0, _hooks.useTheme)();
313
+ const { texts: i, t: p } = (0, _hooks.useTheme)();
313
314
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.ToggleIconButton, {
314
315
  checkedProps: {
315
316
  Icon: _iconpausefilled.default,
316
317
  type: "neutral",
317
- "aria-label": i.carouselPauseAutoplay || m(_texttokens.carouselPauseAutoplay)
318
+ "aria-label": i.carouselPauseAutoplay || p(_texttokens.carouselPauseAutoplay)
318
319
  },
319
320
  uncheckedProps: {
320
321
  Icon: t ? _iconreloadregular.default : _iconplayfilled.default,
321
322
  type: "neutral",
322
- "aria-label": t ? i.carouselReloadAutoplay || m(_texttokens.carouselReloadAutoplay) : i.carouselEnableAutoplay || m(_texttokens.carouselEnableAutoplay)
323
+ "aria-label": t ? i.carouselReloadAutoplay || p(_texttokens.carouselReloadAutoplay) : i.carouselEnableAutoplay || p(_texttokens.carouselEnableAutoplay)
323
324
  },
324
325
  small: !0,
325
326
  bleedLeft: s,
@@ -327,7 +328,7 @@ const Oe = (e, t)=>{
327
328
  onChange: r,
328
329
  checked: e
329
330
  });
330
- }, Ne = (e, t, r)=>r ? typeof r == "number" ? r : r[e] || t[e] : t[e], io = (e, t)=>{
331
+ }, Be = (e, t, r)=>r ? typeof r == "number" ? r : r[e] || t[e] : t[e], uo = (e, t)=>{
331
332
  const r = {
332
333
  mobile: 1,
333
334
  tablet: 2,
@@ -338,58 +339,58 @@ const Oe = (e, t)=>{
338
339
  }
339
340
  };
340
341
  if (!t) return _object_spread_props(_object_spread({}, r), {
341
- desktop: Ne(e, r.desktop)
342
+ desktop: Be(e, r.desktop)
342
343
  });
343
344
  if (typeof t == "number") return {
344
345
  mobile: t,
345
346
  tablet: t,
346
347
  desktop: t
347
348
  };
348
- const s = Ne(e, r.desktop, t.desktop);
349
+ const s = Be(e, r.desktop, t.desktop);
349
350
  return _object_spread_props(_object_spread({}, r, t), {
350
351
  desktop: s
351
352
  });
352
- }, Be = (e, t)=>{
353
+ }, We = (e, t)=>{
353
354
  if (e.length === 0) return [];
354
355
  const r = Math.ceil(e.length / t), s = [];
355
356
  for(let f = 0; f < e.length; f += r)s.push(e[f]);
356
357
  return s[s.length - 1] = e[e.length - r], s;
357
- }, uo = (e, t)=>{
358
+ }, fo = (e, t)=>{
358
359
  const r = [];
359
360
  for(let s = 0; s < t.length; s++)s === 0 ? r.push(t[0]) : r.push((t[s] + t[s - 1]) / 2);
360
361
  for(let s = r.length - 1; s >= 0; s--)if (e - r[s] >= -1) return s;
361
362
  return 0;
362
- }, je = 5e3, Ke = (param)=>{
363
- 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;
364
- const { platformOverrides: W, skinName: P, texts: ue, t: q } = (0, _hooks.useTheme)(), D = (0, _desktopcontainertypecontext.useDesktopContainerType)(), b = io(D || "large", m), { isDesktopOrBigger: V, isTablet: J } = (0, _hooks.useScreenSize)(), F = J ? b.tablet : b.mobile, T = Math.max(Math.floor(V ? b.desktop : F), 1), L = _react.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] = _react.useState({
363
+ }, Ke = 5e3, Ze = (param)=>{
364
+ 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;
365
+ const { platformOverrides: V, skinName: y, texts: ue, t: q } = (0, _hooks.useTheme)(), O = (0, _desktopcontainertypecontext.useDesktopContainerType)(), b = uo(O || "large", p), { isDesktopOrBigger: D, isTablet: J } = (0, _hooks.useScreenSize)(), F = J ? b.tablet : b.mobile, M = Math.max(Math.floor(D ? b.desktop : F), 1), T = _react.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] = _react.useState({
365
366
  scrollLeft: 0,
366
367
  scrollRight: 1
367
- }), [de, Ye] = _react.useState([]), X = _react.useMemo(()=>Be(de, I), [
368
+ }), [de, qe] = _react.useState([]), X = _react.useMemo(()=>We(de, A), [
368
369
  de,
369
- I
370
- ]), 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);
370
+ A
371
+ ]), 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);
371
372
  _react.useEffect(()=>{
372
- if (L.current) {
373
- const c = L.current, p = ()=>{
374
- const { scrollWidth: re, clientWidth: Z } = c, ne = Math.round(c.scrollLeft), ae = Math.round(re - (ne + Z));
373
+ if (T.current) {
374
+ const u = T.current, m = ()=>{
375
+ const { scrollWidth: re, clientWidth: Z } = u, ne = Math.round(u.scrollLeft), ae = Math.round(re - (ne + Z));
375
376
  fe({
376
377
  scrollLeft: ne,
377
378
  scrollRight: ae
378
379
  });
379
- }, C = ()=>{
380
- const re = c.scrollWidth - c.clientWidth;
381
- Ye(Array.from(c.querySelectorAll("[data-item]")).map((Z, ne)=>{
380
+ }, v = ()=>{
381
+ const re = u.scrollWidth - u.clientWidth;
382
+ qe(Array.from(u.querySelectorAll("[data-item]")).map((Z, ne)=>{
382
383
  if (ne === e.length - 1) return re;
383
- const ae = Z.offsetLeft, Xe = parseInt(getComputedStyle(Z).scrollMargin), et = A && !V ? ae - Z.clientWidth / 2 : ae;
384
- return Math.min(et - Xe - c.offsetLeft, re);
384
+ const ae = Z.offsetLeft, et = parseInt(getComputedStyle(Z).scrollMargin), tt = P && !D ? ae - Z.clientWidth / 2 : ae;
385
+ return Math.min(tt - et - u.offsetLeft, re);
385
386
  }));
386
387
  };
387
- p(), C(), c.addEventListener("scroll", p);
388
- const R = (0, _dom.listenResize)(c, ()=>{
389
- p(), C();
388
+ m(), v(), u.addEventListener("scroll", m);
389
+ const R = (0, _dom.listenResize)(u, ()=>{
390
+ m(), v();
390
391
  });
391
392
  return ()=>{
392
- c.removeEventListener("scroll", p), R();
393
+ u.removeEventListener("scroll", m), R();
393
394
  };
394
395
  }
395
396
  return ()=>{};
@@ -397,43 +398,43 @@ const Oe = (e, t)=>{
397
398
  b.desktop,
398
399
  b.tablet,
399
400
  b.mobile,
400
- I,
401
- l,
402
401
  A,
403
- V,
402
+ l,
403
+ P,
404
+ D,
404
405
  e.length
405
406
  ]);
406
- const $ = _react.useCallback(function(c) {
407
- let p = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
408
- const C = L.current;
409
- if (C) {
410
- const R = X[c];
411
- C.scrollTo({
407
+ const $ = _react.useCallback(function(u) {
408
+ let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
409
+ const v = T.current;
410
+ if (v) {
411
+ const R = X[u];
412
+ v.scrollTo({
412
413
  left: R,
413
- behavior: p ? "smooth" : "auto"
414
+ behavior: m ? "smooth" : "auto"
414
415
  });
415
416
  }
416
417
  }, [
417
418
  X
418
419
  ]), he = _react.useCallback(()=>{
419
- const c = L.current;
420
- if (c) {
421
- const { scrollLeft: p } = c, C = [
420
+ const u = T.current;
421
+ if (u) {
422
+ const { scrollLeft: m } = u, v = [
422
423
  ...ee
423
- ].reverse().find((R)=>R - p < -1);
424
- c.scrollTo({
425
- left: C,
424
+ ].reverse().find((R)=>R - m < -1);
425
+ u.scrollTo({
426
+ left: v,
426
427
  behavior: "smooth"
427
428
  });
428
429
  }
429
430
  }, [
430
431
  ee
431
432
  ]), j = _react.useCallback(()=>{
432
- const c = L.current;
433
- if (c) {
434
- const { scrollLeft: p } = c, C = ee.find((R)=>R - p > 1);
435
- c.scrollTo({
436
- left: C,
433
+ const u = T.current;
434
+ if (u) {
435
+ const { scrollLeft: m } = u, v = ee.find((R)=>R - m > 1);
436
+ u.scrollTo({
437
+ left: v,
437
438
  behavior: "smooth"
438
439
  });
439
440
  }
@@ -441,11 +442,11 @@ const Oe = (e, t)=>{
441
442
  ee
442
443
  ]);
443
444
  _react.useEffect(()=>{
444
- i !== void 0 && $(Math.floor(i / T), !1);
445
+ i !== void 0 && $(Math.floor(i / M), !1);
445
446
  }, [
446
447
  i,
447
448
  $,
448
- T
449
+ M
449
450
  ]);
450
451
  const se = typeof d == "object" && d.loop || !1, K = _react.useRef({
451
452
  interacting: !1,
@@ -453,85 +454,85 @@ const Oe = (e, t)=>{
453
454
  });
454
455
  _react.useEffect(()=>{
455
456
  if (ve && d) {
456
- const c = typeof d == "boolean" ? je : d.time, p = setInterval(()=>{
457
- var C;
458
- K.current.interacting || (O !== 0 ? j() : se && ((C = L.current) == null || C.scrollTo({
457
+ const u = typeof d == "boolean" ? Ke : d.time, m = setInterval(()=>{
458
+ var v;
459
+ K.current.interacting || (z !== 0 ? j() : se && ((v = T.current) == null || v.scrollTo({
459
460
  left: 0,
460
461
  behavior: "smooth"
461
462
  })));
462
- }, c);
463
- return ()=>clearInterval(p);
463
+ }, u);
464
+ return ()=>clearInterval(m);
464
465
  }
465
466
  }, [
466
467
  d,
467
468
  j,
468
- O,
469
+ z,
469
470
  ve,
470
471
  se
471
472
  ]);
472
- const S = uo(Q, X), qe = 20;
473
+ const S = fo(Q, X), Je = 20;
473
474
  _react.useEffect(()=>{
474
- S === I - 1 && !se && E(!1);
475
+ S === A - 1 && !se && L(!1);
475
476
  }, [
476
477
  S,
477
- I,
478
- E,
478
+ A,
479
+ L,
479
480
  se
480
481
  ]);
481
482
  const Pe = _react.useRef(!i), ye = _react.useRef(0);
482
483
  _react.useEffect(()=>{
483
484
  if (G) {
484
- const c = Math.min((S + 1) * T - 1, e.length - 1), p = [];
485
- for(let C = 0; C < T; C++){
486
- const R = c - C;
487
- R >= 0 && p.unshift(R);
485
+ const u = Math.min((S + 1) * M - 1, e.length - 1), m = [];
486
+ for(let v = 0; v < M; v++){
487
+ const R = u - v;
488
+ R >= 0 && m.unshift(R);
488
489
  }
489
490
  Pe.current ? ye.current !== S && G({
490
491
  pageIndex: S,
491
- shownItemIndexes: p
492
- }) : Pe.current = p.includes(i || 0), ye.current = S;
492
+ shownItemIndexes: m
493
+ }) : Pe.current = m.includes(i || 0), ye.current = S;
493
494
  }
494
495
  }, [
495
496
  S,
496
497
  e.length,
497
- T,
498
+ M,
498
499
  i,
499
500
  G
500
501
  ]);
501
- const M = _react.useContext(Ce), pe = _react.useMemo(()=>({
502
+ const I = _react.useContext(Ce), pe = _react.useMemo(()=>({
502
503
  currentIndex: S,
503
504
  numPages: {
504
- mobile: n,
505
- tablet: g,
506
- desktop: y
505
+ mobile: a,
506
+ tablet: C,
507
+ desktop: E
507
508
  }
508
509
  }), [
509
510
  S,
510
- y,
511
- n,
512
- g
511
+ E,
512
+ a,
513
+ C
513
514
  ]), Se = _react.useMemo(()=>({
514
515
  isAutoplayEnabled: oe,
515
- isAtLastPage: S === I - 1,
516
- onAutoplayChanged: E
516
+ isAtLastPage: S === A - 1,
517
+ onAutoplayChanged: L
517
518
  }), [
518
519
  oe,
519
520
  S,
520
- I,
521
- E
521
+ A,
522
+ L
522
523
  ]), Ee = _react.useMemo(()=>({
523
- setShouldAutoplay: E,
524
+ setShouldAutoplay: L,
524
525
  prevArrowEnabled: te,
525
526
  nextArrowEnabled: U
526
527
  }), [
527
- E,
528
+ L,
528
529
  te,
529
530
  U
530
531
  ]);
531
532
  _react.useEffect(()=>{
532
- M && (M.setGoPrev(he), M.setGoNext(j), M.setGoToPage($), M.setBulletsProps(pe), M.setAutoplayControlProps(Se), M.setPageControlsProps(Ee), M.setIsAutoplayEnabledSetter(E));
533
+ I && (I.setGoPrev(he), I.setGoNext(j), I.setGoToPage($), I.setBulletsProps(pe), I.setAutoplayControlProps(Se), I.setPageControlsProps(Ee), I.setIsAutoplayEnabledSetter(L));
533
534
  }, [
534
- M,
535
+ I,
535
536
  j,
536
537
  he,
537
538
  pe,
@@ -542,59 +543,62 @@ const Oe = (e, t)=>{
542
543
  U,
543
544
  d,
544
545
  oe,
545
- E
546
+ L
546
547
  ]);
547
548
  let le = null;
548
549
  f ? le = f({
549
- numPages: I,
550
+ numPages: A,
550
551
  currentIndex: S
551
- }) : s && (le = /* @__PURE__ */ (0, _jsxruntime.jsx)(Fe, _object_spread({}, pe)));
552
- const Je = "64px", Qe = "36px", Ae = /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
552
+ }) : s && (le = /* @__PURE__ */ (0, _jsxruntime.jsx)(Ue, _object_spread({}, pe)));
553
+ const Qe = "64px", Xe = "36px", Ae = /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
553
554
  className: (0, _classnames.default)(_carouselcssmistica.carouselBullets, !f && {
554
- [_carouselcssmistica.noCarouselBulletsDesktop]: y <= 1,
555
- [_carouselcssmistica.noCarouselBulletsTablet]: g <= 1,
556
- [_carouselcssmistica.noCarouselBulletsMobile]: n <= 1
555
+ [_carouselcssmistica.noCarouselBulletsDesktop]: E <= 1,
556
+ [_carouselcssmistica.noCarouselBulletsTablet]: C <= 1,
557
+ [_carouselcssmistica.noCarouselBulletsMobile]: a <= 1
557
558
  }),
558
559
  children: le
559
560
  });
560
561
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(_object_spread({
561
- "component-name": "Carousel"
562
+ "component-name": "Carousel",
563
+ testid: "Carousel"
562
564
  }, ie))), {
563
565
  className: _carouselcssmistica.carouselComponentContainer,
564
566
  role: "region",
565
- "aria-label": N ? `${N}, ${ue.carouselRegion || q(_texttokens.carouselRegion)}` : void 0,
566
- "aria-labelledby": N ? void 0 : B,
567
+ "aria-label": B ? `${B}, ${ue.carouselRegion || q(_texttokens.carouselRegion)}` : void 0,
568
+ "aria-labelledby": B ? void 0 : W,
567
569
  children: [
568
570
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
569
571
  className: (0, _classnames.default)(_carouselcssmistica.carouselControlsVisibility, {
570
- [_carouselcssmistica.carouselControlsVisibilityMobile]: n > 1,
571
- [_carouselcssmistica.carouselControlsVisibilityTablet]: g > 1,
572
- [_carouselcssmistica.carouselControlsVisibilityDesktop]: y > 1
572
+ [_carouselcssmistica.carouselControlsVisibilityMobile]: a > 1,
573
+ [_carouselcssmistica.carouselControlsVisibilityTablet]: C > 1,
574
+ [_carouselcssmistica.carouselControlsVisibilityDesktop]: E > 1
573
575
  }),
574
- children: _ ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
576
+ children: w ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
575
577
  space: "between",
576
578
  alignItems: "center",
577
579
  className: _carouselcssmistica.carouselControlsContainer,
578
580
  children: [
579
581
  !!d && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
580
582
  className: _carouselcssmistica.carouselAutoplayControlContainer,
581
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)($e, {
583
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(je, {
582
584
  isAutoplayEnabled: oe,
583
- isAtLastPage: S === I - 1,
584
- onAutoplayChanged: (c)=>{
585
- !U && c && $(0), E(c);
585
+ isAtLastPage: S === A - 1,
586
+ onAutoplayChanged: (u)=>{
587
+ !U && u && $(0), L(u);
586
588
  }
587
589
  })
588
590
  }),
589
591
  Ae,
590
592
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
591
593
  className: _carouselcssmistica.carouselPagesControlsContainer,
592
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Ue, {
594
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)($e, {
593
595
  goNext: j,
594
596
  goPrev: he,
595
- setShouldAutoplay: E,
597
+ setShouldAutoplay: L,
596
598
  prevArrowEnabled: te,
597
- nextArrowEnabled: U
599
+ nextArrowEnabled: U,
600
+ pagesCount: A,
601
+ currentPageIndex: S
598
602
  })
599
603
  })
600
604
  ]
@@ -608,9 +612,9 @@ const Oe = (e, t)=>{
608
612
  className: _carouselcssmistica.carouselContainer,
609
613
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
610
614
  className: (0, _classnames.default)(_carouselcssmistica.carousel, {
611
- [_carouselcssmistica.centeredCarousel]: A,
612
- [_carouselcssmistica.carouselWithScrollMobile]: n > 1,
613
- [_carouselcssmistica.carouselWithScrollTablet]: g > 1
615
+ [_carouselcssmistica.centeredCarousel]: P,
616
+ [_carouselcssmistica.carouselWithScrollMobile]: a > 1,
617
+ [_carouselcssmistica.carouselWithScrollTablet]: C > 1
614
618
  }),
615
619
  role: "list",
616
620
  style: _object_spread_props(_object_spread({}, (0, _css.applyCssVars)(_object_spread({
@@ -618,44 +622,44 @@ const Oe = (e, t)=>{
618
622
  [_carouselcssmistica.vars.itemsPerPageTablet]: String(b.tablet),
619
623
  [_carouselcssmistica.vars.itemsPerPageMobile]: String(b.mobile)
620
624
  }, h === "large" ? {
621
- [_carouselcssmistica.vars.mobilePageOffset]: Je
622
- } : P === _constants.VIVO_NEW_SKIN ? {
623
625
  [_carouselcssmistica.vars.mobilePageOffset]: Qe
626
+ } : y === _constants.VIVO_NEW_SKIN ? {
627
+ [_carouselcssmistica.vars.mobilePageOffset]: Xe
624
628
  } : {}, l !== void 0 ? {
625
629
  [_carouselcssmistica.vars.gap]: String(l)
626
630
  } : {}))), {
627
- scrollSnapType: u ? "initial" : "x mandatory",
631
+ scrollSnapType: n ? "initial" : "x mandatory",
628
632
  // Hack to fix https://jira.tid.es/browse/NOVUMCC-8988
629
633
  // there is a webkit rendering bug that causes a half pixel white line to appear at
630
634
  // the bottom of the scrollable area in retina displays when it has a height with
631
635
  // decimals. This extra padding avoids that line to partially cover the carousel
632
636
  // slides border:
633
- paddingBottom: (0, _platform.isIos)(W) && !(0, _platform.isRunningAcceptanceTest)(W) ? 0.5 : void 0
637
+ paddingBottom: (0, _platform.isIos)(V) && !(0, _platform.isRunningAcceptanceTest)(V) ? 0.5 : void 0
634
638
  }),
635
- ref: L,
636
- onTouchStart: (c)=>{
637
- K.current.left = c.currentTarget.scrollLeft, K.current.interacting = !0;
639
+ ref: T,
640
+ onTouchStart: (u)=>{
641
+ K.current.left = u.currentTarget.scrollLeft, K.current.interacting = !0;
638
642
  },
639
- onTouchEnd: (c)=>{
640
- K.current.interacting = !1, Math.abs(c.currentTarget.scrollLeft - K.current.left) > qe && E(!1);
643
+ onTouchEnd: (u)=>{
644
+ K.current.interacting = !1, Math.abs(u.currentTarget.scrollLeft - K.current.left) > Je && L(!1);
641
645
  },
642
646
  onKeyDown: ()=>{
643
- E(!1);
647
+ L(!1);
644
648
  },
645
- children: e.map((c, p)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
649
+ children: e.map((u, m)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
646
650
  className: (0, _classnames.default)(_carouselcssmistica.carouselItem, r),
647
651
  style: _object_spread_props(_object_spread({}, t), {
648
- scrollSnapStop: (0, _platform.isAndroid)(W) ? "always" : "normal"
652
+ scrollSnapStop: (0, _platform.isAndroid)(V) ? "always" : "normal"
649
653
  }),
650
654
  role: "listitem",
651
655
  "data-item": !0,
652
- children: c
653
- }, p))
656
+ children: u
657
+ }, m))
654
658
  })
655
659
  })
656
660
  ]
657
661
  }));
658
- }, Ze = ()=>{
662
+ }, He = ()=>{
659
663
  const [e, t] = _react.useState(1);
660
664
  return _react.useEffect(()=>{
661
665
  const r = ()=>{
@@ -665,15 +669,15 @@ const Oe = (e, t)=>{
665
669
  window.removeEventListener("resize", r);
666
670
  };
667
671
  }, []), e;
668
- }, Oo = (e)=>{
669
- const t = Ze();
670
- return /* @__PURE__ */ /*#__PURE__*/ (0, _react.createElement)(Ke, _object_spread_props(_object_spread({}, e), {
672
+ }, zo = (e)=>{
673
+ const t = He();
674
+ return /* @__PURE__ */ /*#__PURE__*/ (0, _react.createElement)(Ze, _object_spread_props(_object_spread({}, e), {
671
675
  key: t
672
676
  }));
673
- }, zo = (param)=>{
674
- 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;
675
- const A = Ze();
676
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(Ke, {
677
+ }, _o = (param)=>{
678
+ 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;
679
+ const P = He();
680
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(Ze, {
677
681
  items: e,
678
682
  itemStyle: t,
679
683
  itemClassName: r,
@@ -688,123 +692,123 @@ const Oe = (e, t)=>{
688
692
  withBullets: s,
689
693
  renderBullets: f,
690
694
  withControls: i,
691
- initialActiveItem: m,
692
- onPageChange: v,
695
+ initialActiveItem: p,
696
+ onPageChange: g,
693
697
  dataAttributes: h,
694
698
  "aria-label": l,
695
- "aria-labelledby": u
696
- }, A);
697
- }, He = /*#__PURE__*/ _react.createContext(void 0), _o = ()=>_react.useContext(He), Go = (param)=>{
698
- let { items: e, withBullets: t, withControls: r = !0, autoplay: s, initialPageIndex: f = 0, onPageChange: i, dataAttributes: m, inverseBullets: v = !0 } = param;
699
- const { platformOverrides: h } = (0, _hooks.useTheme)(), l = _react.useContext(Ce), u = _react.useRef(null), [{ scrollLeft: A, scrollRight: d }, _] = _react.useState({
699
+ "aria-labelledby": n
700
+ }, P);
701
+ }, Ye = /*#__PURE__*/ _react.createContext(void 0), Go = ()=>_react.useContext(Ye), Fo = (param)=>{
702
+ let { items: e, withBullets: t, withControls: r = !0, autoplay: s, initialPageIndex: f = 0, onPageChange: i, dataAttributes: p, inverseBullets: g = !0 } = param;
703
+ const { platformOverrides: h } = (0, _hooks.useTheme)(), l = _react.useContext(Ce), n = _react.useRef(null), [{ scrollLeft: P, scrollRight: d }, w] = _react.useState({
700
704
  scrollLeft: 0,
701
705
  scrollRight: 1
702
- }), G = d !== 0, ie = A !== 0, N = _react.useCallback(()=>{
703
- const n = u.current;
704
- n && n.scrollBy({
705
- left: -n.clientWidth,
706
+ }), G = d !== 0, ie = P !== 0, B = _react.useCallback(()=>{
707
+ const a = n.current;
708
+ a && a.scrollBy({
709
+ left: -a.clientWidth,
706
710
  behavior: "smooth"
707
711
  });
708
- }, []), B = _react.useCallback(()=>{
709
- const n = u.current;
710
- n && n.scrollBy({
711
- left: n.clientWidth,
712
+ }, []), W = _react.useCallback(()=>{
713
+ const a = n.current;
714
+ a && a.scrollBy({
715
+ left: a.clientWidth,
712
716
  behavior: "smooth"
713
717
  });
714
- }, []), W = _react.useCallback(function(n) {
715
- let g = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
716
- const y = u.current;
717
- y && y.scrollTo({
718
- left: y.clientWidth * n,
719
- behavior: g ? "smooth" : "auto"
718
+ }, []), V = _react.useCallback(function(a) {
719
+ let C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
720
+ const E = n.current;
721
+ E && E.scrollTo({
722
+ left: E.clientWidth * a,
723
+ behavior: C ? "smooth" : "auto"
720
724
  });
721
725
  }, [
722
- u
723
- ]), P = u.current ? Math.floor((A + u.current.clientWidth / 2) / u.current.clientWidth) : 0;
726
+ n
727
+ ]), y = n.current ? Math.floor((P + n.current.clientWidth / 2) / n.current.clientWidth) : 0;
724
728
  _react.useLayoutEffect(()=>{
725
- const n = u.current;
726
- if (n) {
727
- const g = ()=>{
728
- const { scrollWidth: I, clientWidth: Q } = n, O = Math.round(n.scrollLeft), fe = Math.round(I - (O + Q));
729
- _({
730
- scrollLeft: O,
729
+ const a = n.current;
730
+ if (a) {
731
+ const C = ()=>{
732
+ const { scrollWidth: A, clientWidth: Q } = a, z = Math.round(a.scrollLeft), fe = Math.round(A - (z + Q));
733
+ w({
734
+ scrollLeft: z,
731
735
  scrollRight: fe
732
736
  });
733
737
  };
734
- g(), n.addEventListener("scroll", g);
735
- const y = (0, _dom.listenResize)(n, g);
738
+ C(), a.addEventListener("scroll", C);
739
+ const E = (0, _dom.listenResize)(a, C);
736
740
  return ()=>{
737
- n.removeEventListener("scroll", g), y();
741
+ a.removeEventListener("scroll", C), E();
738
742
  };
739
743
  }
740
744
  }, [
741
745
  e.length
742
746
  ]);
743
- const { isAutoplayEnabled: ue, shouldAutoplay: q, setShouldAutoPlay: D } = Oe(!!s, u), b = typeof s == "object" && s.loop || !1;
747
+ const { isAutoplayEnabled: ue, shouldAutoplay: q, setShouldAutoPlay: O } = ze(!!s, n), b = typeof s == "object" && s.loop || !1;
744
748
  _react.useEffect(()=>{
745
749
  if (q && s) {
746
- const n = typeof s == "boolean" ? je : s.time, g = setInterval(()=>{
747
- var y;
748
- d !== 0 ? B() : b && ((y = u.current) == null || y.scrollTo({
750
+ const a = typeof s == "boolean" ? Ke : s.time, C = setInterval(()=>{
751
+ var E;
752
+ d !== 0 ? W() : b && ((E = n.current) == null || E.scrollTo({
749
753
  left: 0,
750
754
  behavior: "smooth"
751
755
  }));
752
- }, n);
753
- return ()=>clearInterval(g);
756
+ }, a);
757
+ return ()=>clearInterval(C);
754
758
  }
755
759
  }, [
756
760
  s,
757
- B,
761
+ W,
758
762
  d,
759
763
  q,
760
764
  b
761
765
  ]), _react.useEffect(()=>{
762
- P === e.length - 1 && !b && D(!1);
766
+ y === e.length - 1 && !b && O(!1);
763
767
  }, [
764
- P,
768
+ y,
765
769
  e.length,
766
- D,
770
+ O,
767
771
  b
768
772
  ]);
769
- const V = _react.useRef(!1), J = _react.useRef(0);
773
+ const D = _react.useRef(!1), J = _react.useRef(0);
770
774
  _react.useEffect(()=>{
771
- i && (V.current ? J.current !== P && i(P) : V.current = f === P), J.current = P;
775
+ i && (D.current ? J.current !== y && i(y) : D.current = f === y), J.current = y;
772
776
  }, [
773
- P,
777
+ y,
774
778
  f,
775
779
  i
776
780
  ]), _react.useEffect(()=>{
777
- const n = u.current;
778
- f !== void 0 && n && !V.current && n.scrollTo({
779
- left: n.clientWidth * f
781
+ const a = n.current;
782
+ f !== void 0 && a && !D.current && a.scrollTo({
783
+ left: a.clientWidth * f
780
784
  });
781
785
  }, [
782
786
  f
783
787
  ]);
784
788
  const F = _react.useMemo(()=>({
785
- currentIndex: P,
789
+ currentIndex: y,
786
790
  numPages: e.length
787
791
  }), [
788
- P,
792
+ y,
789
793
  e.length
790
794
  ]);
791
795
  _react.useEffect(()=>{
792
- l && (l.setGoPrev(N), l.setGoNext(B), l.setGoToPage(W), l.setBulletsProps(F));
796
+ l && (l.setGoPrev(B), l.setGoNext(W), l.setGoToPage(V), l.setBulletsProps(F));
793
797
  }, [
794
798
  l,
799
+ W,
795
800
  B,
796
- N,
797
801
  F,
798
- W
802
+ V
799
803
  ]);
800
- const T = t && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
804
+ const M = t && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
801
805
  className: _carouselcssmistica.slideshowBulletsContainer,
802
806
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
803
- variant: v ? "inverse" : "default",
804
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Fe, _object_spread({}, F))
807
+ variant: g ? "inverse" : "default",
808
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Ue, _object_spread({}, F))
805
809
  })
806
- }), L = !t && !s;
807
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(He.Provider, {
810
+ }), T = !t && !s;
811
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(Ye.Provider, {
808
812
  value: {
809
813
  withBullets: !!t
810
814
  },
@@ -814,41 +818,43 @@ const Oe = (e, t)=>{
814
818
  className: (0, _classnames.default)(_carouselcssmistica.slideshowContainer, {
815
819
  [_carouselcssmistica.slideshowWithBullets]: !!t
816
820
  })
817
- }, (0, _dom.getPrefixedDataAttributes)(m, "SlideShow")), {
821
+ }, (0, _dom.getPrefixedDataAttributes)(p, "SlideShow")), {
818
822
  children: [
819
823
  e.length > 1 && (r ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
820
824
  variant: "media",
821
825
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
822
- space: L ? 0 : "between",
826
+ space: T ? 0 : "between",
823
827
  alignItems: "center",
824
828
  className: (0, _classnames.default)(_carouselcssmistica.slideshowControlsContainer, {
825
- [_carouselcssmistica.slideshowControlsContainerSingleItem]: L
829
+ [_carouselcssmistica.slideshowControlsContainerSingleItem]: T
826
830
  }),
827
831
  children: [
828
832
  !!s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
829
833
  className: _carouselcssmistica.slideshowAutoplayControlContainer,
830
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)($e, {
834
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(je, {
831
835
  isAutoplayEnabled: ue,
832
- isAtLastPage: P === e.length - 1,
833
- onAutoplayChanged: (n)=>{
834
- P === e.length - 1 && n && W(0), D(n);
836
+ isAtLastPage: y === e.length - 1,
837
+ onAutoplayChanged: (a)=>{
838
+ y === e.length - 1 && a && V(0), O(a);
835
839
  }
836
840
  })
837
841
  }),
838
- T,
839
- /* @__PURE__ */ (0, _jsxruntime.jsx)(Ue, {
840
- goNext: B,
841
- goPrev: N,
842
- setShouldAutoplay: D,
842
+ M,
843
+ /* @__PURE__ */ (0, _jsxruntime.jsx)($e, {
844
+ goNext: W,
845
+ goPrev: B,
846
+ setShouldAutoplay: O,
843
847
  prevArrowEnabled: ie,
844
- nextArrowEnabled: G
848
+ nextArrowEnabled: G,
849
+ pagesCount: e.length,
850
+ currentPageIndex: y
845
851
  })
846
852
  ]
847
853
  })
848
854
  }) : t && /* @__PURE__ */ (0, _jsxruntime.jsx)(_inline.default, {
849
855
  space: "around",
850
856
  className: _carouselcssmistica.slideshowControlsContainer,
851
- children: T
857
+ children: M
852
858
  })),
853
859
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
854
860
  style: (0, _css.applyCssVars)({
@@ -856,14 +862,14 @@ const Oe = (e, t)=>{
856
862
  }),
857
863
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
858
864
  className: _carouselcssmistica.slideshow,
859
- ref: u,
860
- children: e.map((n, g)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
865
+ ref: n,
866
+ children: e.map((a, C)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
861
867
  className: _carouselcssmistica.slideshowItem,
862
868
  style: {
863
869
  scrollSnapStop: (0, _platform.isAndroid)(h) ? "always" : "normal"
864
870
  },
865
- children: n
866
- }, g))
871
+ children: a
872
+ }, C))
867
873
  })
868
874
  })
869
875
  ]