@telefonica/mistica 14.36.1 → 14.37.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 (186) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.css-mistica.js +5 -5
  3. package/dist/avatar.css-mistica.js +1 -1
  4. package/dist/badge.css-mistica.js +3 -3
  5. package/dist/boxed.css-mistica.js +1 -1
  6. package/dist/button-group.css-mistica.js +1 -1
  7. package/dist/button-layout.css-mistica.js +10 -10
  8. package/dist/button.css-mistica.js +40 -32
  9. package/dist/button.css.d.ts +7 -4
  10. package/dist/button.d.ts +4 -2
  11. package/dist/button.js +176 -148
  12. package/dist/callout.css-mistica.js +1 -1
  13. package/dist/card.css-mistica.js +22 -22
  14. package/dist/card.js +10 -10
  15. package/dist/carousel.css-mistica.js +18 -18
  16. package/dist/checkbox.css-mistica.js +10 -10
  17. package/dist/chip.css-mistica.js +8 -8
  18. package/dist/circle.css-mistica.js +2 -2
  19. package/dist/community/advanced-data-card.css-mistica.js +13 -13
  20. package/dist/community/blocks.css-mistica.js +1 -1
  21. package/dist/counter.css-mistica.js +7 -7
  22. package/dist/credit-card-number-field.css-mistica.js +3 -3
  23. package/dist/dialog.css-mistica.js +11 -11
  24. package/dist/double-field.css-mistica.js +4 -4
  25. package/dist/empty-state-card.css-mistica.js +2 -2
  26. package/dist/empty-state.css-mistica.js +6 -6
  27. package/dist/feedback.css-mistica.js +6 -6
  28. package/dist/fixed-footer-layout.css-mistica.js +2 -2
  29. package/dist/grid.css-mistica.js +118 -120
  30. package/dist/grid.css.d.ts +0 -2
  31. package/dist/grid.d.ts +2 -2
  32. package/dist/grid.js +41 -26
  33. package/dist/header.css-mistica.js +1 -1
  34. package/dist/hero.css-mistica.js +5 -5
  35. package/dist/highlighted-card.css-mistica.js +7 -7
  36. package/dist/horizontal-scroll.css-mistica.js +3 -3
  37. package/dist/icon-button.css-mistica.js +2 -2
  38. package/dist/image.css-mistica.js +3 -3
  39. package/dist/image.d.ts +1 -1
  40. package/dist/image.js +21 -21
  41. package/dist/index.d.ts +2 -1
  42. package/dist/index.js +10 -0
  43. package/dist/list.css-mistica.js +16 -16
  44. package/dist/loading-bar.css-mistica.js +7 -7
  45. package/dist/maybe-dismissable.css-mistica.js +1 -1
  46. package/dist/menu.css-mistica.js +1 -1
  47. package/dist/mosaic.css-mistica.js +23 -0
  48. package/dist/mosaic.css.d.ts +6 -0
  49. package/dist/mosaic.css.ts.vanilla.css-mistica.js +11 -0
  50. package/dist/mosaic.d.ts +15 -0
  51. package/dist/mosaic.js +206 -0
  52. package/dist/navigation-bar.css-mistica.js +24 -24
  53. package/dist/navigation-breadcrumbs.css-mistica.js +5 -5
  54. package/dist/package-version.js +1 -1
  55. package/dist/password-field.css-mistica.js +1 -1
  56. package/dist/pin-field.css-mistica.js +6 -6
  57. package/dist/popover.css-mistica.js +10 -10
  58. package/dist/progress-bar.css-mistica.js +5 -5
  59. package/dist/radio-button.css-mistica.js +11 -11
  60. package/dist/responsive-layout.css-mistica.js +3 -3
  61. package/dist/screen-reader-only.css-mistica.js +2 -2
  62. package/dist/select.css-mistica.js +14 -14
  63. package/dist/sheet.css-mistica.js +11 -11
  64. package/dist/sheet.js +8 -8
  65. package/dist/skeletons.css-mistica.js +3 -3
  66. package/dist/skins/blau.js +8 -2
  67. package/dist/skins/movistar-legacy.js +6 -0
  68. package/dist/skins/movistar.js +6 -0
  69. package/dist/skins/o2-classic.js +6 -0
  70. package/dist/skins/o2.js +6 -0
  71. package/dist/skins/skin-contract.css-mistica.js +205 -199
  72. package/dist/skins/skin-contract.css.d.ts +6 -0
  73. package/dist/skins/telefonica.js +6 -0
  74. package/dist/skins/types/colors.d.ts +3 -0
  75. package/dist/skins/vivo-new.js +6 -0
  76. package/dist/skins/vivo.js +6 -0
  77. package/dist/slider.css-mistica.js +7 -7
  78. package/dist/snackbar.css-mistica.js +14 -14
  79. package/dist/spinner.css-mistica.js +1 -1
  80. package/dist/sprinkles.css-mistica.js +921 -407
  81. package/dist/sprinkles.css.d.ts +21 -1
  82. package/dist/stacking-group.css-mistica.js +2 -2
  83. package/dist/stepper.css-mistica.js +9 -9
  84. package/dist/switch-component.css-mistica.js +23 -23
  85. package/dist/tabs.css-mistica.js +12 -12
  86. package/dist/tag.css-mistica.js +1 -1
  87. package/dist/text-field-base.css-mistica.js +9 -9
  88. package/dist/text-field-components.css-mistica.js +11 -11
  89. package/dist/text-field-components.js +30 -26
  90. package/dist/text-link.css-mistica.js +3 -3
  91. package/dist/theme.d.ts +1 -1
  92. package/dist/theme.js +1 -0
  93. package/dist/tooltip.css-mistica.js +6 -6
  94. package/dist/touchable.css-mistica.js +3 -3
  95. package/dist/utils/aspect-ratio-support.css-mistica.js +4 -4
  96. package/dist/utils/aspect-ratio-support.d.ts +1 -1
  97. package/dist/utils/aspect-ratio-support.js +2 -1
  98. package/dist/video.css-mistica.js +2 -2
  99. package/dist/video.js +22 -22
  100. package/dist-es/accordion.css-mistica.js +3 -3
  101. package/dist-es/avatar.css-mistica.js +1 -1
  102. package/dist-es/badge.css-mistica.js +2 -2
  103. package/dist-es/boxed.css-mistica.js +1 -1
  104. package/dist-es/button-group.css-mistica.js +1 -1
  105. package/dist-es/button-layout.css-mistica.js +7 -7
  106. package/dist-es/button.css-mistica.js +18 -10
  107. package/dist-es/button.js +213 -188
  108. package/dist-es/callout.css-mistica.js +1 -1
  109. package/dist-es/card.css-mistica.js +2 -2
  110. package/dist-es/card.js +10 -10
  111. package/dist-es/carousel.css-mistica.js +2 -2
  112. package/dist-es/checkbox.css-mistica.js +6 -6
  113. package/dist-es/chip.css-mistica.js +7 -7
  114. package/dist-es/circle.css-mistica.js +2 -2
  115. package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
  116. package/dist-es/community/blocks.css-mistica.js +1 -1
  117. package/dist-es/counter.css-mistica.js +2 -2
  118. package/dist-es/credit-card-number-field.css-mistica.js +3 -3
  119. package/dist-es/dialog.css-mistica.js +5 -5
  120. package/dist-es/double-field.css-mistica.js +4 -4
  121. package/dist-es/empty-state-card.css-mistica.js +2 -2
  122. package/dist-es/empty-state.css-mistica.js +3 -3
  123. package/dist-es/feedback.css-mistica.js +2 -2
  124. package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
  125. package/dist-es/grid.css-mistica.js +117 -119
  126. package/dist-es/grid.js +44 -29
  127. package/dist-es/header.css-mistica.js +1 -1
  128. package/dist-es/hero.css-mistica.js +2 -2
  129. package/dist-es/highlighted-card.css-mistica.js +5 -5
  130. package/dist-es/horizontal-scroll.css-mistica.js +2 -2
  131. package/dist-es/icon-button.css-mistica.js +2 -2
  132. package/dist-es/image.css-mistica.js +2 -2
  133. package/dist-es/image.js +37 -37
  134. package/dist-es/index.js +1794 -1793
  135. package/dist-es/list.css-mistica.js +2 -2
  136. package/dist-es/loading-bar.css-mistica.js +2 -2
  137. package/dist-es/maybe-dismissable.css-mistica.js +1 -1
  138. package/dist-es/menu.css-mistica.js +1 -1
  139. package/dist-es/mosaic.css-mistica.js +3 -0
  140. package/dist-es/mosaic.css.ts.vanilla.css-mistica.js +2 -0
  141. package/dist-es/mosaic.js +189 -0
  142. package/dist-es/navigation-bar.css-mistica.js +12 -12
  143. package/dist-es/navigation-breadcrumbs.css-mistica.js +2 -2
  144. package/dist-es/package-version.js +1 -1
  145. package/dist-es/password-field.css-mistica.js +1 -1
  146. package/dist-es/pin-field.css-mistica.js +2 -2
  147. package/dist-es/popover.css-mistica.js +2 -2
  148. package/dist-es/progress-bar.css-mistica.js +2 -2
  149. package/dist-es/radio-button.css-mistica.js +6 -6
  150. package/dist-es/responsive-layout.css-mistica.js +3 -3
  151. package/dist-es/screen-reader-only.css-mistica.js +2 -2
  152. package/dist-es/select.css-mistica.js +11 -11
  153. package/dist-es/sheet.css-mistica.js +2 -2
  154. package/dist-es/sheet.js +8 -8
  155. package/dist-es/skeletons.css-mistica.js +2 -2
  156. package/dist-es/skins/blau.js +8 -2
  157. package/dist-es/skins/movistar-legacy.js +8 -2
  158. package/dist-es/skins/movistar.js +6 -0
  159. package/dist-es/skins/o2-classic.js +6 -0
  160. package/dist-es/skins/o2.js +6 -0
  161. package/dist-es/skins/skin-contract.css-mistica.js +205 -199
  162. package/dist-es/skins/telefonica.js +6 -0
  163. package/dist-es/skins/vivo-new.js +6 -0
  164. package/dist-es/skins/vivo.js +6 -0
  165. package/dist-es/slider.css-mistica.js +2 -2
  166. package/dist-es/snackbar.css-mistica.js +5 -5
  167. package/dist-es/spinner.css-mistica.js +1 -1
  168. package/dist-es/sprinkles.css-mistica.js +921 -407
  169. package/dist-es/stacking-group.css-mistica.js +2 -2
  170. package/dist-es/stepper.css-mistica.js +2 -2
  171. package/dist-es/style.css +1 -1
  172. package/dist-es/switch-component.css-mistica.js +18 -18
  173. package/dist-es/tabs.css-mistica.js +7 -7
  174. package/dist-es/tag.css-mistica.js +1 -1
  175. package/dist-es/text-field-base.css-mistica.js +2 -2
  176. package/dist-es/text-field-components.css-mistica.js +2 -2
  177. package/dist-es/text-field-components.js +49 -44
  178. package/dist-es/text-link.css-mistica.js +3 -3
  179. package/dist-es/theme.js +1 -0
  180. package/dist-es/tooltip.css-mistica.js +2 -2
  181. package/dist-es/touchable.css-mistica.js +2 -2
  182. package/dist-es/utils/aspect-ratio-support.css-mistica.js +3 -3
  183. package/dist-es/utils/aspect-ratio-support.js +2 -1
  184. package/dist-es/video.css-mistica.js +2 -2
  185. package/dist-es/video.js +22 -22
  186. package/package.json +1 -1
@@ -51,93 +51,98 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsxs as c, jsx as t, Fragment as g } from "react/jsx-runtime";
55
- import * as u from "react";
54
+ import { jsxs as d, jsx as s, Fragment as y } from "react/jsx-runtime";
55
+ import * as p from "react";
56
56
  import a from "classnames";
57
- import { useIsInverseVariant as y } from "./theme-variant-context.js";
57
+ import { useIsInverseVariant as N } from "./theme-variant-context.js";
58
58
  import { useTheme as C } from "./hooks.js";
59
- import { Text1 as h } from "./text.js";
60
- import { labelContainer as S, shrinked as k, labelText as I, helperText as p, leftText as F, rightText as E, fieldContainer as L, fullWidth as W, normalWidth as j, disabled as w, field as O, fieldMulti as P, fieldSingle as V, helperContainer as A } from "./text-field-components.css-mistica.js";
61
- import { sprinkles as x } from "./sprinkles.css-mistica.js";
59
+ import { Text1 as x } from "./text.js";
60
+ import { labelContainer as S, shrinked as k, labelText as I, helperText as v, leftText as F, rightText as E, fieldContainer as L, fullWidth as W, normalWidth as j, disabled as w, field as O, fieldMulti as P, fieldSingle as V, helperContainer as q } from "./text-field-components.css-mistica.js";
61
+ import { sprinkles as T } from "./sprinkles.css-mistica.js";
62
62
  import { vars as e } from "./skins/skin-contract.css-mistica.js";
63
63
  const G = (param)=>{
64
- let { shrinkLabel: l, forId: s, inputState: r, error: o, children: i, style: n, optional: d } = param;
65
- const m = l || r === "focused" || r === "filled", [v, b] = u.useState("initial"), { texts: N } = C();
66
- u.useEffect(()=>{
67
- const T = setTimeout(()=>{
68
- process.env.NODE_ENV !== "test" && b("transform 150ms, width 150ms");
64
+ let { shrinkLabel: o, forId: l, inputState: r, error: t, children: i, style: n, optional: m } = param;
65
+ const f = o || r === "focused" || r === "filled", [u, c] = p.useState("initial"), { texts: b } = C();
66
+ p.useEffect(()=>{
67
+ const g = setTimeout(()=>{
68
+ process.env.NODE_ENV !== "test" && c("transform 150ms, width 150ms");
69
69
  });
70
70
  return ()=>{
71
- clearTimeout(T);
71
+ clearTimeout(g);
72
72
  };
73
73
  }, []);
74
- let f = e.colors.textSecondary;
75
- return o && r !== "default" ? f = e.colors.error : r === "focused" && (f = e.colors.controlActivated), /* @__PURE__ */ c("label", {
74
+ let h = e.colors.textSecondary;
75
+ return t && r !== "default" ? h = e.colors.error : r === "focused" && (h = e.colors.controlActivated), /* @__PURE__ */ d("label", {
76
76
  className: a(S, {
77
- [k]: m
78
- }, x({
79
- color: f
77
+ [k]: f
78
+ }, T({
79
+ color: h
80
80
  })),
81
- htmlFor: s,
81
+ htmlFor: l,
82
82
  style: _object_spread_props(_object_spread({}, n), {
83
- transition: v
83
+ transition: u
84
84
  }),
85
85
  children: [
86
- /* @__PURE__ */ t("span", {
86
+ /* @__PURE__ */ s("span", {
87
87
  className: I,
88
88
  children: i
89
89
  }),
90
- d ? /* @__PURE__ */ c("span", {
90
+ m ? /* @__PURE__ */ d("span", {
91
91
  children: [
92
92
  "\xa0(",
93
- N.formFieldOptionalLabelSuffix,
93
+ b.formFieldOptionalLabelSuffix,
94
94
  ")"
95
95
  ]
96
96
  }) : null
97
97
  ]
98
98
  });
99
99
  }, J = (param)=>{
100
- let { leftText: l, rightText: s, error: r } = param;
101
- const o = y(), i = o ? e.colors.textPrimaryInverse : r ? e.colors.error : e.colors.textSecondary, n = o ? e.colors.textPrimaryInverse : e.colors.textSecondary;
102
- return /* @__PURE__ */ c(g, {
100
+ let { leftText: o, rightText: l, error: r } = param;
101
+ const t = N(), i = t ? e.colors.textPrimaryInverse : r ? e.colors.error : e.colors.textSecondary, n = t ? e.colors.textPrimaryInverse : e.colors.textSecondary;
102
+ return /* @__PURE__ */ d(y, {
103
103
  children: [
104
- l && /* @__PURE__ */ t("div", {
105
- className: a(p, F),
106
- children: /* @__PURE__ */ t(h, {
104
+ o && /* @__PURE__ */ s("div", {
105
+ className: a(v, F),
106
+ children: /* @__PURE__ */ s(x, {
107
107
  color: i,
108
108
  regular: !0,
109
109
  as: "p",
110
- children: l
110
+ children: o
111
111
  })
112
112
  }),
113
- s && /* @__PURE__ */ t("div", {
114
- className: a(p, E),
115
- children: /* @__PURE__ */ t(h, {
113
+ l && /* @__PURE__ */ s("div", {
114
+ className: a(v, E),
115
+ children: /* @__PURE__ */ s(x, {
116
116
  color: n,
117
117
  regular: !0,
118
118
  as: "p",
119
- children: s
119
+ children: l
120
120
  })
121
121
  })
122
122
  ]
123
123
  });
124
- }, K = (param)=>/* @__PURE__ */ {
125
- let { multiline: l, disabled: s, children: r, helperText: o, className: i, fieldRef: n, fullWidth: d, readOnly: m } = param;
126
- return c("div", {
127
- className: a(L, d ? W : j, {
128
- [w]: s
124
+ }, K = (param)=>// eslint-disable-next-line jsx-a11y/no-static-element-interactions
125
+ /* @__PURE__ */ {
126
+ let { multiline: o, disabled: l, children: r, helperText: t, className: i, fieldRef: n, fullWidth: m, readOnly: f } = param;
127
+ return d("div", {
128
+ className: a(L, m ? W : j, {
129
+ [w]: l
129
130
  }),
131
+ onClick: (u)=>{
132
+ var c;
133
+ o && ((c = u.currentTarget.querySelector("textarea")) == null || c.focus());
134
+ },
130
135
  children: [
131
- /* @__PURE__ */ t("div", {
132
- className: a(O, l ? P : V, x({
133
- background: m ? e.colors.neutralLow : e.colors.backgroundContainer
136
+ /* @__PURE__ */ s("div", {
137
+ className: a(O, o ? P : V, T({
138
+ background: f ? e.colors.neutralLow : e.colors.backgroundContainer
134
139
  }), i),
135
140
  ref: n,
136
141
  children: r
137
142
  }),
138
- o && /* @__PURE__ */ t("div", {
139
- className: A,
140
- children: o
143
+ t && /* @__PURE__ */ s("div", {
144
+ className: q,
145
+ children: t
141
146
  })
142
147
  ]
143
148
  });
@@ -1,8 +1,8 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./text-link.css.ts.vanilla.css-mistica.js";
3
3
  var v = {
4
- default: "_1m1n0pr1 _1y2v1nfby _1y2v1nfbd _1y2v1nfea _1y2v1nf29",
5
- inverseLight: "_1m1n0pr6 _1m1n0pr1 _1y2v1nfby _1y2v1nfbd _1y2v1nfea _1y2v1nf2a",
6
- inverseDark: "_1m1n0pr7 _1m1n0pr1 _1y2v1nfby _1y2v1nfbd _1y2v1nfea _1y2v1nf29"
4
+ default: "_1m1n0pr1 _1y2v1nfh4 _1y2v1nfgj _1y2v1nfjg _1y2v1nf2c",
5
+ inverseLight: "_1m1n0pr6 _1m1n0pr1 _1y2v1nfh4 _1y2v1nfgj _1y2v1nfjg _1y2v1nf2d",
6
+ inverseDark: "_1m1n0pr7 _1m1n0pr1 _1y2v1nfh4 _1y2v1nfgj _1y2v1nfjg _1y2v1nf2c"
7
7
  };
8
8
  export { v as variants };
package/dist-es/theme.js CHANGED
@@ -321,6 +321,7 @@ const l = {
321
321
  case "Next12":
322
322
  return p(e.Component);
323
323
  case "Next13":
324
+ case "Next14":
324
325
  return b(e.Component);
325
326
  default:
326
327
  const r = e.type;
@@ -1,6 +1,6 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./tooltip.css.ts.vanilla.css-mistica.js";
3
- var v = "_1xhatbpa _1y2v1nfc3 _1y2v1nfcj _1y2v1nfb5 _1y2v1nfeh _1y2v1nf33", a = "_1xhatbp8 _1y2v1nfb5 _1y2v1nfc5 _1y2v1nfeb", _ = "_1xhatbp1 _1y2v1nfb5", y = "_1xhatbp5 _1y2v1nfb4 _1y2v1nfd4 _1y2v1nfeb", e = "_1xhatbp3 _1y2v1nfb4 _1y2v1nfe3 _1y2v1nf33", o = "_1y2v1nfba _1y2v1nfbg _1y2v1nfbp", r = {
3
+ var a = "_1xhatbpa _1y2v1nfh9 _1y2v1nfhp _1y2v1nfgb _1y2v1nfjn _1y2v1nf36", v = "_1xhatbp8 _1y2v1nfgb _1y2v1nfhb _1y2v1nfjh", _ = "_1xhatbp1 _1y2v1nfgb", y = "_1xhatbp5 _1y2v1nfga _1y2v1nfia _1y2v1nfjh", o = "_1xhatbp3 _1y2v1nfga _1y2v1nfj9 _1y2v1nf36", r = "_1y2v1nfgg _1y2v1nfgm _1y2v1nfgv", f = {
4
4
  entering: {
5
5
  opacity: 1
6
6
  },
@@ -15,4 +15,4 @@ var v = "_1xhatbpa _1y2v1nfc3 _1y2v1nfcj _1y2v1nfb5 _1y2v1nfeh _1y2v1nf33", a =
15
15
  },
16
16
  unmounted: {}
17
17
  };
18
- export { v as arrow, a as arrowContainer, _ as container, y as content, e as tooltip, o as tooltipCenter, r as tooltipTransitionClasses };
18
+ export { a as arrow, v as arrowContainer, _ as container, y as content, o as tooltip, r as tooltipCenter, f as tooltipTransitionClasses };
@@ -1,4 +1,4 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./touchable.css.ts.vanilla.css-mistica.js";
3
- var f = "mhti6u1 _1y2v1nfea", y = "mhti6u4", _ = "mhti6u1 _1y2v1nfea _1y2v1nf63 _1y2v1nf7c _1y2v1nf8l _1y2v1nf9u _1y2v1nfbc _1y2v1nfds _1y2v1nfbx _1y2v1nf30 _1y2v1nf62 _1y2v1nfec";
4
- export { f as base, y as notTouchable, _ as touchable };
3
+ var y = "mhti6u1 _1y2v1nfjg", f = "mhti6u4", _ = "mhti6u1 _1y2v1nfjg _1y2v1nf69 _1y2v1nf7i _1y2v1nf8r _1y2v1nfa0 _1y2v1nfgi _1y2v1nfiy _1y2v1nfh3 _1y2v1nf33 _1y2v1nf68 _1y2v1nfji";
4
+ export { y as base, f as notTouchable, _ as touchable };
@@ -1,6 +1,6 @@
1
1
  import "../sprinkles.css.ts.vanilla.css-mistica.js";
2
2
  import "./aspect-ratio-support.css.ts.vanilla.css-mistica.js";
3
- var a = "yqswj62", n = "_1y2v1nfbx _1y2v1nfce _1y2v1nfeh _1y2v1nfew", e = {
3
+ var a = "yqswj62", n = "_1y2v1nfh3 _1y2v1nfhk _1y2v1nfjn _1y2v1nfk2", y = {
4
4
  aspectRatio: "var(--yqswj60)"
5
- }, y = "_1y2v1nfeb _1y2v1nfdp _1y2v1nfdq _1y2v1nfb4";
6
- export { a as container, n as containerWithWrapper, e as vars, y as wrapper };
5
+ }, f = "_1y2v1nfjh _1y2v1nfiv _1y2v1nfiw _1y2v1nfga";
6
+ export { a as container, n as containerWithWrapper, y as vars, f as wrapper };
@@ -73,7 +73,8 @@ const u = /*#__PURE__*/ n.createContext(!0), x = (param)=>{
73
73
  }, N = ()=>n.useContext(u), W = (t)=>{
74
74
  const o = N(), s = typeof t.width != "number" && typeof t.height != "number" && t.aspectRatio !== 0, e = s ? t.aspectRatio : void 0;
75
75
  let i = t.width, a = t.height;
76
- t.width !== void 0 && t.height !== void 0 ? (i = t.width, a = t.height) : typeof t.width == "number" ? a = t.aspectRatio !== 0 ? t.width / t.aspectRatio : void 0 : typeof t.height == "number" ? i = t.aspectRatio !== 0 ? t.height * t.aspectRatio : void 0 : i = t.width || "100%";
76
+ var _t_aspectRatio, _t_aspectRatio1;
77
+ t.width !== void 0 && t.height !== void 0 ? (i = t.width, a = t.height) : typeof t.width == "number" ? a = t.aspectRatio !== 0 ? t.width / ((_t_aspectRatio = t.aspectRatio) !== null && _t_aspectRatio !== void 0 ? _t_aspectRatio : 1) : void 0 : typeof t.height == "number" ? i = t.aspectRatio !== 0 ? t.height * ((_t_aspectRatio1 = t.aspectRatio) !== null && _t_aspectRatio1 !== void 0 ? _t_aspectRatio1 : 1) : void 0 : i = t.width || "100%";
77
78
  var _t_as;
78
79
  const c = s && !o, r = /*#__PURE__*/ n.createElement((_t_as = t.as) !== null && _t_as !== void 0 ? _t_as : "div", _object_spread({
79
80
  className: m(t.className, f, {
@@ -1,3 +1,3 @@
1
1
  import "./sprinkles.css.ts.vanilla.css-mistica.js";
2
- var f = "_1y2v1nfeh _1y2v1nfew _1y2v1nfbc _1y2v1nf62 _1y2v1nfdp _1y2v1nfdq _1y2v1nfg5";
3
- export { f as video };
2
+ var n = "_1y2v1nfjn _1y2v1nfk2 _1y2v1nfgi _1y2v1nf68 _1y2v1nfiv _1y2v1nfiw _1y2v1nflb";
3
+ export { n as video };
package/dist-es/video.js CHANGED
@@ -68,7 +68,7 @@ const K = {
68
68
  "16:9": 16 / 9,
69
69
  "4:3": 4 / 3
70
70
  }, z = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", H = /*#__PURE__*/ n.forwardRef((_param, A)=>{
71
- var { src: r, poster: u, autoPlay: p = "when-loaded", muted: k = !0, loop: N = !0, preload: x = "none", loadingTimeout: T = 1e4, onLoad: y, onError: h, onPause: v, onPlay: R, aspectRatio: c = "1:1", dataAttributes: U } = _param, o = _object_without_properties(_param, [
71
+ var { src: r, poster: u, autoPlay: p = "when-loaded", muted: k = !0, loop: N = !0, preload: x = "none", loadingTimeout: T = 1e4, onLoad: y, onError: h, onPause: v, onPlay: w, aspectRatio: c = "1:1", dataAttributes: U } = _param, s = _object_without_properties(_param, [
72
72
  "src",
73
73
  "poster",
74
74
  "autoPlay",
@@ -83,7 +83,7 @@ const K = {
83
83
  "aspectRatio",
84
84
  "dataAttributes"
85
85
  ]);
86
- const [a, d] = n.useReducer(M, "loading"), s = n.useRef(null), C = n.useRef(), f = n.useRef(null), b = D(X.mediaBorderRadius, q.borderRadii.container), m = typeof c == "number" ? c : _[c], w = n.useCallback(()=>{
86
+ const [a, d] = n.useReducer(M, "loading"), o = n.useRef(null), C = n.useRef(), f = n.useRef(null), R = D(X.mediaBorderRadius, q.borderRadii.container), m = s.width && s.height ? void 0 : typeof c == "number" ? c : _[c], b = n.useCallback(()=>{
87
87
  a === "loading" && (d("fail"), h == null || h());
88
88
  }, [
89
89
  h,
@@ -93,25 +93,25 @@ const K = {
93
93
  var e;
94
94
  if (C.current !== r) {
95
95
  let t;
96
- return C.current = r, d("reset"), r ? (t = setTimeout(w, T), (e = s.current) == null || e.load()) : d("fail"), ()=>{
96
+ return C.current = r, d("reset"), r ? (t = setTimeout(b, T), (e = o.current) == null || e.load()) : d("fail"), ()=>{
97
97
  clearTimeout(t);
98
98
  };
99
99
  }
100
100
  }, [
101
101
  r,
102
102
  T,
103
- w
103
+ b
104
104
  ]);
105
105
  const I = ()=>{
106
106
  y == null || y();
107
- const e = s.current, t = p && !P();
107
+ const e = o.current, t = p && !P();
108
108
  d("finishLoad"), e && t && e.paused && e.play();
109
109
  }, V = (Array.isArray(r) ? r : [
110
110
  r
111
111
  ]).map((e)=>typeof e == "string" ? {
112
112
  src: e
113
113
  } : e), g = a === "error" || a === "loading" || a === "loaded", j = /* @__PURE__ */ l("video", {
114
- ref: s,
114
+ ref: o,
115
115
  playsInline: !0,
116
116
  disablePictureInPicture: !0,
117
117
  disableRemotePlayback: !0,
@@ -119,13 +119,13 @@ const K = {
119
119
  loop: N,
120
120
  className: Q,
121
121
  preload: x,
122
- onError: w,
122
+ onError: b,
123
123
  onPause: ()=>{
124
124
  v == null || v(), d("pause");
125
125
  },
126
126
  onTimeUpdate: ()=>{
127
127
  var e;
128
- a !== "playing" && ((e = s.current) == null ? void 0 : e.currentTime) !== 0 && (R == null || R(), d("play"));
128
+ a !== "playing" && ((e = o.current) == null ? void 0 : e.currentTime) !== 0 && (w == null || w(), d("play"));
129
129
  },
130
130
  onCanPlay: ()=>{
131
131
  p === "streaming" && I();
@@ -136,7 +136,7 @@ const K = {
136
136
  poster: z,
137
137
  style: {
138
138
  // For some reason adding this style with classnames doesn't add the border radius in safari
139
- borderRadius: b,
139
+ borderRadius: R,
140
140
  visibility: g ? "hidden" : "visible",
141
141
  position: g || m !== 0 ? "absolute" : "static",
142
142
  width: "100%",
@@ -149,10 +149,10 @@ const K = {
149
149
  type: t
150
150
  }, i);
151
151
  })
152
- }), E = !!(m !== 0 || o.width && o.height), S = a === "error", B = n.useMemo(()=>u ? /* @__PURE__ */ l($, {
152
+ }), E = !!(m !== 0 || s.width && s.height), S = a === "error", B = n.useMemo(()=>u ? /* @__PURE__ */ l($, {
153
153
  aspectRatio: c,
154
- width: o.width,
155
- height: o.height,
154
+ width: s.width,
155
+ height: s.height,
156
156
  src: u
157
157
  }) : E ? /* @__PURE__ */ l("div", {
158
158
  style: {
@@ -161,14 +161,14 @@ const K = {
161
161
  height: "100%"
162
162
  },
163
163
  children: /* @__PURE__ */ l(J, {
164
- borderRadius: b,
164
+ borderRadius: R,
165
165
  withIcon: S
166
166
  })
167
167
  }) : void 0, [
168
168
  c,
169
- o.height,
170
- o.width,
171
- b,
169
+ s.height,
170
+ s.width,
171
+ R,
172
172
  S,
173
173
  u,
174
174
  E
@@ -178,8 +178,8 @@ const K = {
178
178
  position: "relative"
179
179
  },
180
180
  aspectRatio: m,
181
- width: o.width,
182
- height: o.height,
181
+ width: s.width,
182
+ height: s.height,
183
183
  dataAttributes: Y(U, "Video"),
184
184
  children: [
185
185
  /* @__PURE__ */ l("div", {
@@ -192,18 +192,18 @@ const K = {
192
192
  const t = e || null;
193
193
  t && (t.play = ()=>{
194
194
  var i;
195
- return ((i = s.current) == null ? void 0 : i.play()) || Promise.resolve();
195
+ return ((i = o.current) == null ? void 0 : i.play()) || Promise.resolve();
196
196
  }, t.pause = ()=>{
197
197
  var i;
198
- return (i = s.current) == null ? void 0 : i.pause();
198
+ return (i = o.current) == null ? void 0 : i.pause();
199
199
  }, t.load = ()=>{
200
200
  var i;
201
201
  (i = f.current) != null && i.style && (f.current.style.width = "100%", f.current.style.height = "100%"), setTimeout(()=>{
202
202
  var F;
203
- d("reset"), (F = s.current) == null || F.load();
203
+ d("reset"), (F = o.current) == null || F.load();
204
204
  }, 100);
205
205
  }, t.setCurrentTime = (i)=>{
206
- s.current && (s.current.currentTime = i);
206
+ o.current && (o.current.currentTime = i);
207
207
  }), typeof A == "function" ? A(t) : A && (A.current = t);
208
208
  }
209
209
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "14.36.1",
3
+ "version": "14.37.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",