@telefonica/mistica 14.25.0 → 14.26.1

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 (80) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.css-mistica.js +41 -0
  3. package/dist/accordion.css.d.ts +12 -0
  4. package/dist/accordion.css.ts.vanilla.css-mistica.js +11 -0
  5. package/dist/accordion.d.ts +47 -0
  6. package/dist/accordion.js +350 -0
  7. package/dist/boxed.d.ts +1 -0
  8. package/dist/boxed.js +17 -16
  9. package/dist/card.js +345 -345
  10. package/dist/carousel.js +58 -52
  11. package/dist/checkbox.css.d.ts +1 -1
  12. package/dist/checkbox.d.ts +3 -1
  13. package/dist/checkbox.js +23 -22
  14. package/dist/community/blocks.js +3 -2
  15. package/dist/form-context.d.ts +9 -9
  16. package/dist/generated/mistica-icons/icons-keywords.d.ts +4 -0
  17. package/dist/icons/icon-chevron.d.ts +1 -0
  18. package/dist/icons/icon-chevron.js +21 -18
  19. package/dist/index.d.ts +4 -2
  20. package/dist/index.js +30 -4
  21. package/dist/integer-field.d.ts +5 -1
  22. package/dist/integer-field.js +12 -11
  23. package/dist/list.d.ts +8 -0
  24. package/dist/list.js +3 -0
  25. package/dist/menu.css-mistica.js +30 -6
  26. package/dist/menu.css.d.ts +14 -2
  27. package/dist/menu.d.ts +25 -3
  28. package/dist/menu.js +264 -84
  29. package/dist/overlay.js +11 -52
  30. package/dist/overscroll-color-context.js +23 -11
  31. package/dist/package-version.js +1 -1
  32. package/dist/pin-field.css-mistica.js +37 -0
  33. package/dist/pin-field.css.d.ts +7 -0
  34. package/dist/pin-field.css.ts.vanilla.css-mistica.js +11 -0
  35. package/dist/pin-field.d.ts +25 -0
  36. package/dist/pin-field.js +269 -0
  37. package/dist/progress-bar.css-mistica.js +7 -4
  38. package/dist/progress-bar.css.d.ts +1 -0
  39. package/dist/progress-bar.d.ts +12 -3
  40. package/dist/progress-bar.js +109 -13
  41. package/dist/stepper.js +34 -27
  42. package/dist/tabs.js +4 -3
  43. package/dist/text-field-base.css.d.ts +2 -0
  44. package/dist/text-field-base.d.ts +1 -0
  45. package/dist/text-field-components.js +28 -26
  46. package/dist/text-field.d.ts +1 -0
  47. package/dist/theme.d.ts +3 -0
  48. package/dist/theme.js +24 -12
  49. package/dist/touchable.js +5 -4
  50. package/dist/video.js +8 -9
  51. package/dist-es/accordion.css-mistica.js +9 -0
  52. package/dist-es/accordion.css.ts.vanilla.css-mistica.js +2 -0
  53. package/dist-es/accordion.js +280 -0
  54. package/dist-es/boxed.js +25 -24
  55. package/dist-es/card.js +475 -475
  56. package/dist-es/carousel.js +95 -89
  57. package/dist-es/checkbox.js +42 -41
  58. package/dist-es/community/blocks.js +2 -1
  59. package/dist-es/icons/icon-chevron.js +25 -22
  60. package/dist-es/index.js +1768 -1766
  61. package/dist-es/integer-field.js +14 -13
  62. package/dist-es/list.js +9 -9
  63. package/dist-es/menu.css-mistica.js +10 -4
  64. package/dist-es/menu.js +262 -93
  65. package/dist-es/overlay.js +18 -20
  66. package/dist-es/overscroll-color-context.js +30 -18
  67. package/dist-es/package-version.js +1 -1
  68. package/dist-es/pin-field.css-mistica.js +5 -0
  69. package/dist-es/pin-field.css.ts.vanilla.css-mistica.js +2 -0
  70. package/dist-es/pin-field.js +217 -0
  71. package/dist-es/progress-bar.css-mistica.js +2 -2
  72. package/dist-es/progress-bar.js +67 -18
  73. package/dist-es/stepper.js +61 -54
  74. package/dist-es/style.css +1 -1
  75. package/dist-es/tabs.js +11 -10
  76. package/dist-es/text-field-components.js +38 -36
  77. package/dist-es/theme.js +24 -12
  78. package/dist-es/touchable.js +9 -8
  79. package/dist-es/video.js +16 -17
  80. package/package.json +1 -1
package/dist/carousel.js CHANGED
@@ -10,22 +10,22 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  Carousel: function() {
13
- return vt;
13
+ return Pt;
14
14
  },
15
15
  CenteredCarousel: function() {
16
- return It;
16
+ return xt;
17
17
  },
18
18
  IsInsideSlideshowProvider: function() {
19
- return $e;
19
+ return tt;
20
20
  },
21
21
  PageBullets: function() {
22
22
  return ie;
23
23
  },
24
24
  Slideshow: function() {
25
- return xt;
25
+ return St;
26
26
  },
27
27
  useIsInsideSlideshowContext: function() {
28
- return Pt;
28
+ return wt;
29
29
  }
30
30
  });
31
31
  const _jsxruntime = require("react/jsx-runtime");
@@ -174,7 +174,7 @@ const ce = (e, r)=>{
174
174
  })
175
175
  }, d))
176
176
  });
177
- }, $ = (e, r, t)=>t ? typeof t == "number" ? t : t[e] || r[e] : r[e], Xe = (e, r)=>{
177
+ }, $ = (e, r, t)=>t ? typeof t == "number" ? t : t[e] || r[e] : r[e], $e = (e, r)=>{
178
178
  const t = {
179
179
  mobile: 1,
180
180
  tablet: 2,
@@ -201,33 +201,33 @@ const ce = (e, r)=>{
201
201
  const t = Math.ceil(e.length / r), o = [];
202
202
  for(let f = 0; f < e.length; f += t)o.push(e[f]);
203
203
  return o[o.length - 1] = e[e.length - t], o;
204
- }, Ze = (e, r)=>{
204
+ }, et = (e, r)=>{
205
205
  const t = [];
206
206
  for(let o = 0; o < r.length; o++)o === 0 ? t.push(r[0]) : t.push((r[o] + r[o - 1]) / 2);
207
207
  for(let o = t.length - 1; o >= 0; o--)if (e - t[o] >= -1) return o;
208
208
  return 0;
209
209
  }, ae = 5e3, ue = (param)=>{
210
- let { items: e , itemStyle: r , itemClassName: t , withBullets: o , renderBullets: f , initialActiveItem: m , itemsPerPage: b , itemsToScroll: d , mobilePageOffset: g , gap: k , free: C , centered: R , autoplay: v , onPageChange: P , dataAttributes: F } = param;
211
- const { texts: T , platformOverrides: M , skinName: y } = (0, _hooks.useTheme)(), c = (0, _desktopcontainertypecontext.useDesktopContainerType)(), i = Xe(c || "large", b), { isDesktopOrBigger: x , isTablet: N } = (0, _hooks.useScreenSize)(), U = N ? i.tablet : i.mobile, I = Math.max(Math.floor(x ? i.desktop : U), 1), p = _react.useRef(null), w = Math.ceil(e.length / I), [{ scrollLeft: H , scrollRight: q }, de] = _react.useState({
210
+ let { items: e , itemStyle: r , itemClassName: t , withBullets: o , renderBullets: f , initialActiveItem: m , itemsPerPage: b , itemsToScroll: d , mobilePageOffset: g , gap: N , free: R , centered: A , autoplay: v , onPageChange: P , dataAttributes: F } = param;
211
+ const { texts: T , platformOverrides: x , skinName: y } = (0, _hooks.useTheme)(), c = (0, _desktopcontainertypecontext.useDesktopContainerType)(), i = $e(c || "large", b), { isDesktopOrBigger: w , isTablet: L } = (0, _hooks.useScreenSize)(), U = L ? i.tablet : i.mobile, I = Math.max(Math.floor(w ? i.desktop : U), 1), p = _react.useRef(null), S = Math.ceil(e.length / I), [{ scrollLeft: H , scrollRight: q }, de] = _react.useState({
212
212
  scrollLeft: 0,
213
213
  scrollRight: 0
214
- }), [K, he] = _react.useState([]), W = _react.useMemo(()=>ee(K, w), [
214
+ }), [K, he] = _react.useState([]), W = _react.useMemo(()=>ee(K, S), [
215
215
  K,
216
- w
216
+ S
217
217
  ]), O = d ? ee(K, Math.ceil(e.length / d)) : W, me = q !== 0, ge = H !== 0;
218
218
  (0, _hooks.useIsomorphicLayoutEffect)(()=>{
219
219
  if (p.current) {
220
220
  const l = p.current, a = ()=>{
221
- const { scrollWidth: z , clientWidth: A } = l, _ = Math.round(l.scrollLeft), j = Math.round(z - (_ + A));
221
+ const { scrollWidth: z , clientWidth: M } = l, _ = Math.round(l.scrollLeft), j = Math.round(z - (_ + M));
222
222
  de({
223
223
  scrollLeft: _,
224
224
  scrollRight: j
225
225
  });
226
226
  }, u = ()=>{
227
227
  const z = l.scrollWidth - l.clientWidth;
228
- he(Array.from(l.querySelectorAll("[data-item]")).map((A, _)=>{
228
+ he(Array.from(l.querySelectorAll("[data-item]")).map((M, _)=>{
229
229
  if (_ === e.length - 1) return z;
230
- const j = A.offsetLeft, Ie = parseInt(getComputedStyle(A).scrollMargin), Pe = R && !x ? j - A.clientWidth / 2 : j;
230
+ const j = M.offsetLeft, Ie = parseInt(getComputedStyle(M).scrollMargin), Pe = A && !w ? j - M.clientWidth / 2 : j;
231
231
  return Math.min(Pe - Ie - l.offsetLeft, z);
232
232
  }));
233
233
  };
@@ -244,10 +244,10 @@ const ce = (e, r)=>{
244
244
  i.desktop,
245
245
  i.tablet,
246
246
  i.mobile,
247
+ S,
248
+ N,
249
+ A,
247
250
  w,
248
- k,
249
- R,
250
- x,
251
251
  e.length
252
252
  ]);
253
253
  const D = _react.useCallback(function(l) {
@@ -310,21 +310,21 @@ const ce = (e, r)=>{
310
310
  q,
311
311
  J
312
312
  ]);
313
- const S = Ze(H, W), Q = _react.useRef(!m), X = _react.useRef(0);
313
+ const k = et(H, W), Q = _react.useRef(!m), X = _react.useRef(0);
314
314
  _react.useEffect(()=>{
315
315
  if (P) {
316
- const l = Math.min((S + 1) * I - 1, e.length - 1), a = [];
316
+ const l = Math.min((k + 1) * I - 1, e.length - 1), a = [];
317
317
  for(let u = 0; u < I; u++){
318
318
  const h = l - u;
319
319
  h >= 0 && a.unshift(h);
320
320
  }
321
- Q.current ? X.current !== S && P({
322
- pageIndex: S,
321
+ Q.current ? X.current !== k && P({
322
+ pageIndex: k,
323
323
  shownItemIndexes: a
324
- }) : Q.current = a.includes(m || 0), X.current = S;
324
+ }) : Q.current = a.includes(m || 0), X.current = k;
325
325
  }
326
326
  }, [
327
- S,
327
+ k,
328
328
  e.length,
329
329
  I,
330
330
  m,
@@ -332,12 +332,12 @@ const ce = (e, r)=>{
332
332
  ]);
333
333
  let V = null;
334
334
  f ? V = f({
335
- numPages: w,
336
- currentIndex: S,
335
+ numPages: S,
336
+ currentIndex: k,
337
337
  onPress: D
338
- }) : o && (V = w > 1 && /* @__PURE__ */ (0, _jsxruntime.jsx)(ie, {
339
- numPages: w,
340
- currentIndex: S,
338
+ }) : o && (V = S > 1 && /* @__PURE__ */ (0, _jsxruntime.jsx)(ie, {
339
+ numPages: S,
340
+ currentIndex: k,
341
341
  onPress: D
342
342
  }));
343
343
  const be = "64px", ve = "36px";
@@ -362,8 +362,8 @@ const ce = (e, r)=>{
362
362
  }),
363
363
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
364
364
  className: (0, _classnames.default)(_carouselcssmistica.carousel, {
365
- [_carouselcssmistica.centeredCarousel]: R,
366
- [_carouselcssmistica.carouselWithScroll]: w > 1
365
+ [_carouselcssmistica.centeredCarousel]: A,
366
+ [_carouselcssmistica.carouselWithScroll]: S > 1
367
367
  }),
368
368
  style: _object_spread_props(_object_spread({}, (0, _dynamic.assignInlineVars)(_object_spread({
369
369
  [_carouselcssmistica.vars.itemsPerPageDesktop]: String(i.desktop),
@@ -373,16 +373,22 @@ const ce = (e, r)=>{
373
373
  [_carouselcssmistica.vars.mobilePageOffset]: be
374
374
  } : y === _constants.VIVO_NEW_SKIN ? {
375
375
  [_carouselcssmistica.vars.mobilePageOffset]: ve
376
- } : {}, k !== void 0 ? {
377
- [_carouselcssmistica.vars.gap]: String(k)
376
+ } : {}, N !== void 0 ? {
377
+ [_carouselcssmistica.vars.gap]: String(N)
378
378
  } : {}))), {
379
- scrollSnapType: C ? "initial" : "x mandatory"
379
+ scrollSnapType: R ? "initial" : "x mandatory",
380
+ // Hack to fix https://jira.tid.es/browse/NOVUMCC-8988
381
+ // there is a webkit rendering bug that causes a half pixel white line to appear at
382
+ // the bottom of the scrollable area in retina displays when it has a height with
383
+ // decimals. This extra padding avoids that line to partially cover the carousel
384
+ // slides border:
385
+ paddingBottom: (0, _platform.isIos)(x) && !(0, _platform.isRunningAcceptanceTest)(x) ? 0.5 : void 0
380
386
  }),
381
387
  ref: p,
382
388
  children: e.map((l, a)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
383
389
  className: (0, _classnames.default)(_carouselcssmistica.carouselItem, t),
384
390
  style: _object_spread_props(_object_spread({}, r), {
385
- scrollSnapStop: (0, _platform.isAndroid)(M) ? "always" : "normal"
391
+ scrollSnapStop: (0, _platform.isAndroid)(x) ? "always" : "normal"
386
392
  }),
387
393
  "data-item": !0,
388
394
  children: l
@@ -406,7 +412,7 @@ const ce = (e, r)=>{
406
412
  })
407
413
  ]
408
414
  });
409
- }, vt = (e)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(ue, _object_spread({}, e)), It = (param)=>/* @__PURE__ */ {
415
+ }, Pt = (e)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(ue, _object_spread({}, e)), xt = (param)=>/* @__PURE__ */ {
410
416
  let { items: e , itemStyle: r , itemClassName: t , withBullets: o , renderBullets: f , initialActiveItem: m , onPageChange: b , dataAttributes: d } = param;
411
417
  return (0, _jsxruntime.jsx)(ue, {
412
418
  items: e,
@@ -426,15 +432,15 @@ const ce = (e, r)=>{
426
432
  onPageChange: b,
427
433
  dataAttributes: d
428
434
  });
429
- }, fe = /*#__PURE__*/ _react.createContext(!1), Pt = ()=>_react.useContext(fe), $e = (param)=>/* @__PURE__ */ {
435
+ }, fe = /*#__PURE__*/ _react.createContext(!1), wt = ()=>_react.useContext(fe), tt = (param)=>/* @__PURE__ */ {
430
436
  let { children: e } = param;
431
437
  return (0, _jsxruntime.jsx)(fe.Provider, {
432
438
  value: !0,
433
439
  children: e
434
440
  });
435
- }, xt = (param)=>{
441
+ }, St = (param)=>{
436
442
  let { items: e , withBullets: r , autoplay: t , onPageChange: o , dataAttributes: f , inverseBullets: m = !0 } = param;
437
- const { texts: b , platformOverrides: d } = (0, _hooks.useTheme)(), g = _react.useRef(null), [{ scrollLeft: k , scrollRight: C }, R] = _react.useState({
443
+ const { texts: b , platformOverrides: d } = (0, _hooks.useTheme)(), g = _react.useRef(null), [{ scrollLeft: N , scrollRight: R }, A] = _react.useState({
438
444
  scrollLeft: 0,
439
445
  scrollRight: 0
440
446
  }), v = _react.useCallback(()=>{
@@ -449,21 +455,21 @@ const ce = (e, r)=>{
449
455
  left: c.clientWidth,
450
456
  behavior: "smooth"
451
457
  });
452
- }, []), F = C !== 0, T = k !== 0, M = g.current ? Math.floor((k + g.current.clientWidth / 2) / g.current.clientWidth) : 0;
458
+ }, []), F = R !== 0, T = N !== 0, x = g.current ? Math.floor((N + g.current.clientWidth / 2) / g.current.clientWidth) : 0;
453
459
  _react.useLayoutEffect(()=>{
454
460
  const c = g.current;
455
461
  if (c) {
456
462
  const i = ()=>{
457
- const { scrollWidth: N , clientWidth: U } = c, I = Math.round(c.scrollLeft), p = Math.round(N - (I + U));
458
- R({
463
+ const { scrollWidth: L , clientWidth: U } = c, I = Math.round(c.scrollLeft), p = Math.round(L - (I + U));
464
+ A({
459
465
  scrollLeft: I,
460
466
  scrollRight: p
461
467
  });
462
468
  };
463
469
  i(), c.addEventListener("scroll", i);
464
- const x = (0, _dom.listenResize)(c, i);
470
+ const w = (0, _dom.listenResize)(c, i);
465
471
  return ()=>{
466
- c.removeEventListener("scroll", i), x();
472
+ c.removeEventListener("scroll", i), w();
467
473
  };
468
474
  }
469
475
  }, [
@@ -472,26 +478,26 @@ const ce = (e, r)=>{
472
478
  const y = ce(!!t, g);
473
479
  return _react.useEffect(()=>{
474
480
  if (y && t) {
475
- const c = typeof t == "boolean" ? ae : t.time, i = typeof t == "object" && t.loop, x = setInterval(()=>{
476
- var N;
477
- C !== 0 ? P() : i && ((N = g.current) == null || N.scrollTo({
481
+ const c = typeof t == "boolean" ? ae : t.time, i = typeof t == "object" && t.loop, w = setInterval(()=>{
482
+ var L;
483
+ R !== 0 ? P() : i && ((L = g.current) == null || L.scrollTo({
478
484
  left: 0,
479
485
  behavior: "smooth"
480
486
  }));
481
487
  }, c);
482
- return ()=>clearInterval(x);
488
+ return ()=>clearInterval(w);
483
489
  }
484
490
  }, [
485
491
  t,
486
492
  P,
487
- C,
493
+ R,
488
494
  y
489
495
  ]), _react.useEffect(()=>{
490
- o && o(M);
496
+ o && o(x);
491
497
  }, [
492
- M,
498
+ x,
493
499
  o
494
- ]), /* @__PURE__ */ (0, _jsxruntime.jsx)($e, {
500
+ ]), /* @__PURE__ */ (0, _jsxruntime.jsx)(tt, {
495
501
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
496
502
  className: _carouselcssmistica.slideshowContainer
497
503
  }, (0, _dom.getPrefixedDataAttributes)(f, "SlideShow")), {
@@ -536,7 +542,7 @@ const ce = (e, r)=>{
536
542
  className: _carouselcssmistica.slideshowBullets,
537
543
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(ie, {
538
544
  numPages: e.length,
539
- currentIndex: M
545
+ currentIndex: x
540
546
  })
541
547
  })
542
548
  })
@@ -1,6 +1,6 @@
1
1
  export declare const checkboxContainer: string;
2
2
  export declare const checkboxContainerDisabled: string;
3
- export declare const boxVariant: Record<"ios" | "rest" | "checked", string>;
3
+ export declare const boxVariant: Record<"ios" | "checked" | "rest", string>;
4
4
  export declare const check: string;
5
5
  export declare const checkChecked: string;
6
6
  export declare const disabled: string;
@@ -16,6 +16,7 @@ type RenderProps = {
16
16
  disabled?: boolean;
17
17
  'aria-labelledby'?: string;
18
18
  'aria-label'?: string;
19
+ role?: 'checkbox' | 'menuitemcheckbox';
19
20
  dataAttributes?: DataAttributes;
20
21
  };
21
22
  type ChildrenProps = {
@@ -29,7 +30,8 @@ type ChildrenProps = {
29
30
  disabled?: boolean;
30
31
  'aria-label'?: string;
31
32
  'aria-labelledby'?: string;
33
+ role?: 'checkbox' | 'menuitemcheckbox';
32
34
  dataAttributes?: DataAttributes;
33
35
  };
34
- declare const Checkbox: React.FC<RenderProps | ChildrenProps>;
36
+ declare const Checkbox: React.ForwardRefExoticComponent<(RenderProps | ChildrenProps) & React.RefAttributes<HTMLDivElement>>;
35
37
  export default Checkbox;
package/dist/checkbox.js CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return O;
8
+ return W;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
@@ -19,6 +19,7 @@ const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames")
19
19
  const _dom = require("./utils/dom.js");
20
20
  const _checkboxcssmistica = require("./checkbox.css-mistica.js");
21
21
  const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
22
+ const _common = require("./utils/common.js");
22
23
  function _interop_require_default(obj) {
23
24
  return obj && obj.__esModule ? obj : {
24
25
  default: obj
@@ -115,9 +116,9 @@ function _object_spread_props(target, source) {
115
116
  }
116
117
  return target;
117
118
  }
118
- const z = (param)=>{
119
- let { isChecked: e , disabled: o } = param;
120
- const { isIos: l } = (0, _hooks.useTheme)(), r = l ? /* @__PURE__ */ (0, _jsxruntime.jsx)("svg", {
119
+ const B = (param)=>{
120
+ let { isChecked: e , disabled: c } = param;
121
+ const { isIos: o } = (0, _hooks.useTheme)(), l = o ? /* @__PURE__ */ (0, _jsxruntime.jsx)("svg", {
121
122
  viewBox: "0 0 10 8",
122
123
  width: "10",
123
124
  height: "8",
@@ -141,37 +142,37 @@ const z = (param)=>{
141
142
  })
142
143
  });
143
144
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
144
- className: (0, _classnames.default)(_checkboxcssmistica.boxVariant[e ? "checked" : l ? "ios" : "rest"], {
145
- [_checkboxcssmistica.disabled]: o
145
+ className: (0, _classnames.default)(_checkboxcssmistica.boxVariant[e ? "checked" : o ? "ios" : "rest"], {
146
+ [_checkboxcssmistica.disabled]: c
146
147
  }),
147
- children: r
148
+ children: l
148
149
  });
149
- }, B = (e)=>{
150
- const o = (0, _hooks.useAriaId)(e["aria-labelledby"]), l = e["aria-label"], r = l || e["aria-labelledby"], { defaultValue: x , value: t , onChange: s , focusableRef: C , disabled: i } = (0, _formcontext.useControlProps)({
150
+ }, K = /*#__PURE__*/ _react.forwardRef((e, c)=>{
151
+ const o = (0, _hooks.useAriaId)(e["aria-labelledby"]), l = e["aria-label"], C = l || e["aria-labelledby"], { defaultValue: g , value: t , onChange: s , focusableRef: w , disabled: i } = (0, _formcontext.useControlProps)({
151
152
  name: e.name,
152
153
  value: e.checked,
153
154
  defaultValue: e.defaultChecked,
154
155
  onChange: e.onChange,
155
156
  disabled: e.disabled
156
- }), [d, g] = _react.useState(!!x), h = ()=>{
157
- t === void 0 ? (g(!d), s(!d)) : s(!t);
158
- }, y = (c)=>{
159
- c.keyCode === _keycodes.SPACE && (c.preventDefault(), c.stopPropagation(), h());
160
- }, b = /* @__PURE__ */ (0, _jsxruntime.jsx)(z, {
157
+ }), [d, y] = _react.useState(!!g), h = ()=>{
158
+ t === void 0 ? (y(!d), s(!d)) : s(!t);
159
+ }, I = (r)=>{
160
+ r.keyCode === _keycodes.SPACE && (r.preventDefault(), r.stopPropagation(), h());
161
+ }, b = /* @__PURE__ */ (0, _jsxruntime.jsx)(B, {
161
162
  disabled: i,
162
163
  isChecked: t !== null && t !== void 0 ? t : d
163
164
  });
164
- return(// eslint-disable-next-line jsx-a11y/interactive-supports-focus
165
+ return(// eslint-disable-next-line jsx-a11y/no-static-element-interactions
165
166
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
166
167
  id: e.id,
167
- role: "checkbox",
168
+ role: e.role || "checkbox",
168
169
  "aria-checked": t !== null && t !== void 0 ? t : d,
169
- onKeyDown: i ? void 0 : y,
170
- onClick: (c)=>{
171
- c.stopPropagation(), i || h();
170
+ onKeyDown: i ? void 0 : I,
171
+ onClick: (r)=>{
172
+ r.stopPropagation(), i || h();
172
173
  },
173
174
  tabIndex: i ? void 0 : 0,
174
- ref: C,
175
+ ref: (0, _common.combineRefs)(c, w),
175
176
  className: i ? _checkboxcssmistica.checkboxContainerDisabled : _checkboxcssmistica.checkboxContainer,
176
177
  "aria-label": l,
177
178
  "aria-labelledby": l ? void 0 : o,
@@ -200,7 +201,7 @@ const z = (param)=>{
200
201
  regular: !0,
201
202
  as: "div",
202
203
  id: o,
203
- role: r ? "presentation" : void 0,
204
+ role: C ? "presentation" : void 0,
204
205
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
205
206
  className: i ? _checkboxcssmistica.disabled : "",
206
207
  children: e.children
@@ -209,4 +210,4 @@ const z = (param)=>{
209
210
  ]
210
211
  })
211
212
  })));
212
- }, O = B;
213
+ }), W = K;
@@ -35,7 +35,7 @@ const _text = require("../text.js");
35
35
  const _skincontractcssmistica = require("../skins/skin-contract.css-mistica.js");
36
36
  const _inline = /*#__PURE__*/ _interop_require_default(require("../inline.js"));
37
37
  const _box = /*#__PURE__*/ _interop_require_default(require("../box.js"));
38
- const _progressbar = /*#__PURE__*/ _interop_require_default(require("../progress-bar.js"));
38
+ const _progressbar = require("../progress-bar.js");
39
39
  const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
40
40
  function _interop_require_default(obj) {
41
41
  return obj && obj.__esModule ? obj : {
@@ -120,6 +120,7 @@ const g = (param)=>{
120
120
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
121
121
  regular: !0,
122
122
  color: _skincontractcssmistica.vars.colors.textSecondary,
123
+ decoration: "line-through",
123
124
  children: l
124
125
  }),
125
126
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text5, {
@@ -228,7 +229,7 @@ const g = (param)=>{
228
229
  e
229
230
  ]
230
231
  }),
231
- l !== void 0 && /* @__PURE__ */ (0, _jsxruntime.jsx)(_progressbar.default, {
232
+ l !== void 0 && /* @__PURE__ */ (0, _jsxruntime.jsx)(_progressbar.ProgressBar, {
232
233
  progressPercent: l,
233
234
  reverse: t
234
235
  }),
@@ -54,17 +54,17 @@ export declare const useControlProps: <T>({ name, value, defaultValue, onChange,
54
54
  };
55
55
  export declare const useFieldProps: ({ name, value, defaultValue, processValue, helperText, optional, error, disabled, onBlur, validate, onChange, onChangeValue, }: {
56
56
  name: string;
57
- value: string | undefined;
58
- defaultValue: string | undefined;
57
+ value?: string | undefined;
58
+ defaultValue?: string | undefined;
59
59
  processValue: (value: string) => unknown;
60
- helperText: string | undefined;
61
- optional: boolean | undefined;
62
- error: boolean | undefined;
63
- disabled: boolean | undefined;
60
+ helperText?: string | undefined;
61
+ optional?: boolean | undefined;
62
+ error?: boolean | undefined;
63
+ disabled?: boolean | undefined;
64
64
  onBlur?: React.FocusEventHandler<Element> | undefined;
65
- validate: ((value: any, rawValue: string) => string | undefined) | undefined;
66
- onChange: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
67
- onChangeValue: ((value: any, rawValue: string) => void) | undefined;
65
+ validate?: ((value: any, rawValue: string) => string | undefined) | undefined;
66
+ onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
67
+ onChangeValue?: ((value: any, rawValue: string) => void) | undefined;
68
68
  }) => {
69
69
  value?: string | undefined;
70
70
  defaultValue?: string | undefined;
@@ -0,0 +1,4 @@
1
+ declare const iconKeywords: {
2
+ [key: string]: Array<string>;
3
+ };
4
+ export default iconKeywords;
@@ -6,6 +6,7 @@ type Props = {
6
6
  className?: string;
7
7
  style?: React.CSSProperties;
8
8
  direction?: Direction;
9
+ transitionDuration?: number;
9
10
  };
10
11
  declare const IconChevron: React.FC<Props>;
11
12
  export default IconChevron;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return v;
8
+ return p;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
@@ -38,38 +38,41 @@ function _object_spread(target) {
38
38
  }
39
39
  return target;
40
40
  }
41
- const c = (param)=>/* @__PURE__ */ {
42
- let { size: o , color: t , transform: r , className: n , style: e } = param;
41
+ const h = (param)=>/* @__PURE__ */ {
42
+ let { size: o , color: r , transform: n , transitionDuration: t , className: e , style: l } = param;
43
43
  return (0, _jsxruntime.jsx)("svg", {
44
44
  role: "presentation",
45
45
  width: o,
46
46
  height: o,
47
47
  viewBox: "0 0 24 24",
48
- className: n,
49
- style: e,
48
+ className: e,
49
+ style: _object_spread({
50
+ transform: n,
51
+ transition: `transform ${t}ms`
52
+ }, l),
50
53
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("path", {
51
54
  style: {
52
- transition: "transform 0.3s"
55
+ transition: `fill ${t}ms`
53
56
  },
54
- fill: t,
57
+ fill: r,
55
58
  fillRule: "evenodd",
56
- d: "M14.338 11.478a.75.75 0 0 1 0 1.044l-3.837 3.997a.75.75 0 1 1-1.082-1.038L12.76 12 9.42 8.52a.75.75 0 0 1 1.082-1.04l3.837 3.998z",
57
- transform: r
59
+ d: "M14.338 11.478a.75.75 0 0 1 0 1.044l-3.837 3.997a.75.75 0 1 1-1.082-1.038L12.76 12 9.42 8.52a.75.75 0 0 1 1.082-1.04l3.837 3.998z"
58
60
  })
59
61
  });
60
- }, h = {
62
+ }, f = {
61
63
  up: -90,
62
64
  down: 90,
63
65
  left: 180,
64
66
  right: 0
65
- }, f = (param)=>{
66
- let { size: o = 24 , color: t , className: r , style: n , direction: e = "right" } = param;
67
- const i = t || _skincontractcssmistica.vars.colors.neutralHigh, s = {
67
+ }, g = (param)=>{
68
+ let { size: o = 24 , color: r , className: n , style: t , transitionDuration: e = 300 , direction: l = "right" } = param;
69
+ const i = r || _skincontractcssmistica.vars.colors.neutralHigh, a = {
68
70
  size: o,
69
71
  color: i,
70
- transform: `rotate(${h[e]} 12 12)`,
71
- className: r,
72
- style: n
72
+ transform: `rotate(${f[l]}deg)`,
73
+ className: n,
74
+ transitionDuration: e,
75
+ style: t
73
76
  };
74
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(c, _object_spread({}, s));
75
- }, v = f;
77
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(h, _object_spread({}, a));
78
+ }, p = g;
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export { default as Touchable } from './touchable';
7
7
  export type { TouchableElement } from './touchable';
8
8
  export { default as Spinner } from './spinner';
9
9
  export { default as FadeIn } from './fade-in';
10
+ export { AccordionItem, BoxedAccordionItem, Accordion, BoxedAccordion } from './accordion';
10
11
  export { ButtonPrimary, ButtonSecondary, ButtonDanger, ButtonLink } from './button';
11
12
  export { default as ButtonLayout } from './button-layout';
12
13
  export { default as FixedFooterLayout } from './fixed-footer-layout';
@@ -50,11 +51,11 @@ export { default as Inline } from './inline';
50
51
  export { default as HorizontalScroll } from './horizontal-scroll';
51
52
  export { default as HighlightedCard } from './highlighted-card';
52
53
  export { default as Stepper } from './stepper';
53
- export { default as ProgressBar } from './progress-bar';
54
+ export { ProgressBar, ProgressBarStepped } from './progress-bar';
54
55
  export { MediaCard, DataCard, SnapCard, DisplayDataCard, DisplayMediaCard, PosterCard, NakedCard, SmallNakedCard, CardActionSpinner, } from './card';
55
56
  export { default as Hero } from './hero';
56
57
  export { default as Divider } from './divider';
57
- export { default as Menu } from './menu';
58
+ export { Menu, MenuItem, MenuSection } from './menu';
58
59
  export { default as EmptyState } from './empty-state';
59
60
  export { default as EmptyStateCard } from './empty-state-card';
60
61
  export { default as Callout } from './callout';
@@ -80,6 +81,7 @@ export { default as StackingGroup } from './stacking-group';
80
81
  export { default as Form } from './form';
81
82
  export { default as Select } from './select';
82
83
  export { default as TextField } from './text-field';
84
+ export { default as PinField } from './pin-field';
83
85
  export { TextFieldBase } from './text-field-base';
84
86
  export { default as SearchField } from './search-field';
85
87
  export { default as EmailField } from './email-field';