@telefonica/mistica 14.25.0 → 14.26.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 (78) 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/text-field-base.css.d.ts +2 -0
  43. package/dist/text-field-base.d.ts +1 -0
  44. package/dist/text-field-components.js +28 -26
  45. package/dist/text-field.d.ts +1 -0
  46. package/dist/theme.d.ts +3 -0
  47. package/dist/theme.js +24 -12
  48. package/dist/touchable.js +5 -4
  49. package/dist/video.js +8 -9
  50. package/dist-es/accordion.css-mistica.js +9 -0
  51. package/dist-es/accordion.css.ts.vanilla.css-mistica.js +2 -0
  52. package/dist-es/accordion.js +280 -0
  53. package/dist-es/boxed.js +25 -24
  54. package/dist-es/card.js +475 -475
  55. package/dist-es/carousel.js +95 -89
  56. package/dist-es/checkbox.js +42 -41
  57. package/dist-es/community/blocks.js +2 -1
  58. package/dist-es/icons/icon-chevron.js +25 -22
  59. package/dist-es/index.js +1768 -1766
  60. package/dist-es/integer-field.js +14 -13
  61. package/dist-es/list.js +9 -9
  62. package/dist-es/menu.css-mistica.js +10 -4
  63. package/dist-es/menu.js +262 -93
  64. package/dist-es/overlay.js +18 -20
  65. package/dist-es/overscroll-color-context.js +30 -18
  66. package/dist-es/package-version.js +1 -1
  67. package/dist-es/pin-field.css-mistica.js +5 -0
  68. package/dist-es/pin-field.css.ts.vanilla.css-mistica.js +2 -0
  69. package/dist-es/pin-field.js +217 -0
  70. package/dist-es/progress-bar.css-mistica.js +2 -2
  71. package/dist-es/progress-bar.js +67 -18
  72. package/dist-es/stepper.js +61 -54
  73. package/dist-es/style.css +1 -1
  74. package/dist-es/text-field-components.js +38 -36
  75. package/dist-es/theme.js +24 -12
  76. package/dist-es/touchable.js +9 -8
  77. package/dist-es/video.js +16 -17
  78. package/package.json +1 -1
@@ -52,7 +52,7 @@ function _object_spread_props(target, source) {
52
52
  }
53
53
  import { jsxs as I, jsx as l } from "react/jsx-runtime";
54
54
  import * as c from "react";
55
- import b from "classnames";
55
+ import s from "classnames";
56
56
  import A from "./screen-reader-only.js";
57
57
  import { notTouchable as _, touchable as H, base as K } from "./touchable.css-mistica.js";
58
58
  import { useTheme as j } from "./hooks.js";
@@ -75,13 +75,14 @@ const L = function(e) {
75
75
  style: e.style,
76
76
  role: e.role,
77
77
  "aria-checked": e["aria-checked"],
78
+ "aria-disabled": e.disabled ? !0 : void 0,
78
79
  "aria-controls": e["aria-controls"],
79
80
  "aria-expanded": e["aria-expanded"],
80
81
  "aria-hidden": e["aria-hidden"],
81
82
  "aria-selected": e["aria-selected"],
82
83
  "aria-live": e["aria-live"],
83
84
  tabIndex: e.tabIndex
84
- }, W(e.dataAttributes, "Touchable")), u = e.type ? e.type : "button", r = !!e.href && !!e.newTab, m = !r && !!e.href && !!e.loadOnTop, s = (a)=>{
85
+ }, W(e.dataAttributes, "Touchable")), u = e.type ? e.type : "button", r = !!e.href && !!e.newTab, m = !r && !!e.href && !!e.loadOnTop, b = (a)=>{
85
86
  e.stopPropagation && a.stopPropagation();
86
87
  }, h = (a)=>{
87
88
  e.onPress && e.onPress(a);
@@ -90,15 +91,15 @@ const L = function(e) {
90
91
  f.current = !1, a();
91
92
  }));
92
93
  }, x = (a)=>{
93
- if (s(a), !i.length) {
94
+ if (b(a), !i.length) {
94
95
  h(a);
95
96
  return;
96
97
  }
97
98
  g(()=>h(a));
98
99
  }, R = (a)=>{
99
- s(a), i.length && (a.preventDefault(), g(()=>L(k(), r, m)));
100
+ b(a), i.length && (a.preventDefault(), g(()=>L(k(), r, m)));
100
101
  }, D = (a)=>{
101
- s(a), y();
102
+ b(a), y();
102
103
  }, w = (a)=>{
103
104
  (a.keyCode === S || a.keyCode === V) && (a.preventDefault(), a.currentTarget.click());
104
105
  };
@@ -153,14 +154,14 @@ const L = function(e) {
153
154
  }
154
155
  return /* @__PURE__ */ l("div", _object_spread_props(_object_spread({}, n), {
155
156
  ref: t,
156
- className: b(n.className, _),
157
+ className: s(n.className, _),
157
158
  children: o
158
159
  }));
159
160
  }), $ = /*#__PURE__*/ c.forwardRef((e, t)=>/* @__PURE__ */ l(T, _object_spread_props(_object_spread({}, e), {
160
- className: b(H, e.className),
161
+ className: s(H, e.className),
161
162
  ref: t
162
163
  }))), X = /*#__PURE__*/ c.forwardRef((e, t)=>/* @__PURE__ */ l(T, _object_spread_props(_object_spread({}, e), {
163
- className: b(K, e.className),
164
+ className: s(K, e.className),
164
165
  ref: t
165
166
  }))), Y = $;
166
167
  export { X as BaseTouchable, Y as default };
package/dist-es/video.js CHANGED
@@ -25,7 +25,7 @@ function _object_without_properties_loose(source, excluded) {
25
25
  }
26
26
  return target;
27
27
  }
28
- import { jsx as d, jsxs as G } from "react/jsx-runtime";
28
+ import { jsx as l, jsxs as G } from "react/jsx-runtime";
29
29
  import * as n from "react";
30
30
  import { useMediaBorderRadius as J, ImageContent as M, ImageError as O } from "./image.js";
31
31
  import { AspectRatioContainer as P } from "./utils/aspect-ratio-support.js";
@@ -80,8 +80,8 @@ const q = {
80
80
  "aspectRatio",
81
81
  "dataAttributes"
82
82
  ]);
83
- const [a, l] = n.useReducer(D, "loading"), s = n.useRef(null), C = n.useRef(), f = n.useRef(null), w = J(), g = typeof c == "number" ? c : K[c], v = n.useCallback(()=>{
84
- a === "loading" && (l("fail"), h == null || h());
83
+ const [a, d] = n.useReducer(D, "loading"), s = n.useRef(null), C = n.useRef(), f = n.useRef(null), w = J(), g = typeof c == "number" ? c : K[c], v = n.useCallback(()=>{
84
+ a === "loading" && (d("fail"), h == null || h());
85
85
  }, [
86
86
  h,
87
87
  a
@@ -89,9 +89,8 @@ const q = {
89
89
  n.useEffect(()=>{
90
90
  var e;
91
91
  if (C.current !== r) {
92
- C.current = r;
93
- const t = setTimeout(v, T);
94
- return l("reset"), (e = s.current) == null || e.load(), ()=>{
92
+ let t;
93
+ return C.current = r, d("reset"), r ? (t = setTimeout(v, T), (e = s.current) == null || e.load()) : d("fail"), ()=>{
95
94
  clearTimeout(t);
96
95
  };
97
96
  }
@@ -103,12 +102,12 @@ const q = {
103
102
  const I = ()=>{
104
103
  y == null || y();
105
104
  const e = s.current, t = p && !Q();
106
- l("finishLoad"), e && t && e.paused && e.play();
105
+ d("finishLoad"), e && t && e.paused && e.play();
107
106
  }, U = (Array.isArray(r) ? r : [
108
107
  r
109
108
  ]).map((e)=>typeof e == "string" ? {
110
109
  src: e
111
- } : e), m = a === "error" || a === "loading" || a === "loaded", V = /* @__PURE__ */ d("video", {
110
+ } : e), m = a === "error" || a === "loading" || a === "loaded", V = /* @__PURE__ */ l("video", {
112
111
  ref: s,
113
112
  playsInline: !0,
114
113
  disablePictureInPicture: !0,
@@ -119,11 +118,11 @@ const q = {
119
118
  preload: k,
120
119
  onError: v,
121
120
  onPause: ()=>{
122
- R == null || R(), l("pause");
121
+ R == null || R(), d("pause");
123
122
  },
124
123
  onTimeUpdate: ()=>{
125
124
  var e;
126
- a !== "playing" && ((e = s.current) == null ? void 0 : e.currentTime) !== 0 && (b == null || b(), l("play"));
125
+ a !== "playing" && ((e = s.current) == null ? void 0 : e.currentTime) !== 0 && (b == null || b(), d("play"));
127
126
  },
128
127
  onCanPlay: ()=>{
129
128
  p === "streaming" && I();
@@ -142,23 +141,23 @@ const q = {
142
141
  },
143
142
  children: U.map((param, i)=>/* @__PURE__ */ {
144
143
  let { src: e , type: t } = param;
145
- return d("source", {
144
+ return l("source", {
146
145
  src: e,
147
146
  type: t
148
147
  }, i);
149
148
  })
150
- }), E = !!(g !== 0 || o.width && o.height), F = a === "error", j = n.useMemo(()=>u ? /* @__PURE__ */ d(M, {
149
+ }), E = !!(g !== 0 || o.width && o.height), F = a === "error", j = n.useMemo(()=>u ? /* @__PURE__ */ l(M, {
151
150
  aspectRatio: c,
152
151
  width: o.width,
153
152
  height: o.height,
154
153
  src: u
155
- }) : E ? /* @__PURE__ */ d("div", {
154
+ }) : E ? /* @__PURE__ */ l("div", {
156
155
  style: {
157
156
  position: "absolute",
158
157
  width: "100%",
159
158
  height: "100%"
160
159
  },
161
- children: /* @__PURE__ */ d(O, {
160
+ children: /* @__PURE__ */ l(O, {
162
161
  noBorderRadius: !w,
163
162
  withIcon: F
164
163
  })
@@ -180,7 +179,7 @@ const q = {
180
179
  height: o.height,
181
180
  dataAttributes: $(B, "Video"),
182
181
  children: [
183
- /* @__PURE__ */ d("div", {
182
+ /* @__PURE__ */ l("div", {
184
183
  style: {
185
184
  position: "absolute",
186
185
  width: "100%",
@@ -198,7 +197,7 @@ const q = {
198
197
  var i;
199
198
  (i = f.current) != null && i.style && (f.current.style.width = "100%", f.current.style.height = "100%"), setTimeout(()=>{
200
199
  var S;
201
- l("reset"), (S = s.current) == null || S.load();
200
+ d("reset"), (S = s.current) == null || S.load();
202
201
  }, 100);
203
202
  }, t.setCurrentTime = (i)=>{
204
203
  s.current && (s.current.currentTime = i);
@@ -206,7 +205,7 @@ const q = {
206
205
  }
207
206
  }),
208
207
  V,
209
- /* @__PURE__ */ d("div", {
208
+ /* @__PURE__ */ l("div", {
210
209
  ref: f,
211
210
  style: {
212
211
  position: g !== 0 ? "absolute" : "static",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "14.25.0",
3
+ "version": "14.26.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",