@telefonica/mistica 15.2.0 → 15.3.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 (83) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/box.js +3 -3
  3. package/dist/boxed.js +2 -2
  4. package/dist/button-group.js +2 -2
  5. package/dist/button.js +5 -5
  6. package/dist/carousel.js +29 -29
  7. package/dist/chip.js +2 -2
  8. package/dist/community/advanced-data-card.d.ts +6 -2
  9. package/dist/community/advanced-data-card.js +4 -4
  10. package/dist/counter.js +7 -7
  11. package/dist/feedback.js +2 -2
  12. package/dist/fixed-footer-layout.css-mistica.js +5 -5
  13. package/dist/fixed-footer-layout.js +19 -17
  14. package/dist/form.js +6 -6
  15. package/dist/hero.css-mistica.js +12 -6
  16. package/dist/hero.css.d.ts +2 -0
  17. package/dist/hero.d.ts +2 -1
  18. package/dist/hero.js +80 -69
  19. package/dist/horizontal-scroll.js +2 -2
  20. package/dist/image.js +9 -7
  21. package/dist/list.js +19 -15
  22. package/dist/loading-bar.js +2 -2
  23. package/dist/loading-screen.js +3 -3
  24. package/dist/package-version.js +1 -1
  25. package/dist/pin-field.js +2 -2
  26. package/dist/progress-bar.js +4 -4
  27. package/dist/radio-button.js +3 -3
  28. package/dist/responsive-layout.css-mistica.js +18 -9
  29. package/dist/responsive-layout.d.ts +1 -0
  30. package/dist/responsive-layout.js +15 -15
  31. package/dist/select.js +16 -16
  32. package/dist/sheet.js +82 -81
  33. package/dist/slider.js +8 -8
  34. package/dist/tag.js +2 -2
  35. package/dist/text-field-base.js +3 -3
  36. package/dist/text-field-components.js +2 -2
  37. package/dist/text.js +105 -84
  38. package/dist/utils/aspect-ratio-support.js +8 -8
  39. package/dist/utils/browser.js +1 -1
  40. package/dist/video.js +2 -2
  41. package/dist-es/box.js +7 -7
  42. package/dist-es/boxed.js +2 -2
  43. package/dist-es/button-group.js +4 -4
  44. package/dist-es/button-layout.js +5 -5
  45. package/dist-es/button.js +11 -11
  46. package/dist-es/callout.js +8 -8
  47. package/dist-es/carousel.js +29 -29
  48. package/dist-es/checkbox.js +7 -7
  49. package/dist-es/chip.js +4 -4
  50. package/dist-es/community/advanced-data-card.js +14 -14
  51. package/dist-es/counter.js +21 -21
  52. package/dist-es/empty-state.js +12 -12
  53. package/dist-es/feedback.js +5 -5
  54. package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
  55. package/dist-es/fixed-footer-layout.js +33 -31
  56. package/dist-es/form.js +9 -9
  57. package/dist-es/grid.js +3 -3
  58. package/dist-es/hero.css-mistica.js +2 -2
  59. package/dist-es/hero.js +119 -108
  60. package/dist-es/horizontal-scroll.js +2 -2
  61. package/dist-es/image.js +15 -13
  62. package/dist-es/list.js +15 -11
  63. package/dist-es/loading-bar.js +6 -6
  64. package/dist-es/loading-screen.js +8 -8
  65. package/dist-es/package-version.js +1 -1
  66. package/dist-es/pin-field.js +10 -10
  67. package/dist-es/progress-bar.js +9 -9
  68. package/dist-es/radio-button.js +9 -9
  69. package/dist-es/responsive-layout.css-mistica.js +3 -3
  70. package/dist-es/responsive-layout.js +21 -21
  71. package/dist-es/select.js +22 -22
  72. package/dist-es/sheet.js +124 -123
  73. package/dist-es/slider.js +8 -8
  74. package/dist-es/style.css +1 -1
  75. package/dist-es/tag.js +4 -4
  76. package/dist-es/text-field-base.js +11 -11
  77. package/dist-es/text-field-components.js +9 -9
  78. package/dist-es/text-link.js +5 -5
  79. package/dist-es/text.js +103 -82
  80. package/dist-es/utils/aspect-ratio-support.js +14 -14
  81. package/dist-es/utils/browser.js +1 -1
  82. package/dist-es/video.js +5 -5
  83. package/package.json +1 -1
@@ -82,14 +82,14 @@ import { jsx as n, jsxs as ie } from "react/jsx-runtime";
82
82
  import * as d from "react";
83
83
  import { FieldContainer as ne, HelperText as ae, Label as re } from "./text-field-components.js";
84
84
  import { LABEL_SCALE_MOBILE as le, LABEL_SCALE_DESKTOP as oe } from "./text-field-components.css-mistica.js";
85
- import { Text3 as N } from "./text.js";
85
+ import { Text3 as F } from "./text.js";
86
86
  import { isFirefox as de, isRunningAcceptanceTest as se } from "./utils/platform.js";
87
87
  import { useAriaId as L, useScreenSize as ce, useIsomorphicLayoutEffect as fe, useTheme as ue } from "./hooks.js";
88
88
  import v from "classnames";
89
89
  import { combineRefs as k } from "./utils/common.js";
90
90
  import { startIcon as me, prefix as he, inputWithLabel as _, inputWithoutLabel as G, fullWidth as ge, fieldRightPadding as j, fieldLeftPadding as T, textArea as pe, textAreaWithLabel as Se, textAreaWithoutLabel as xe, input as be, inputFirefoxStyles as ye, hiddenDatePlaceholder as Ce, emptyDateValue as Ee, endIconContainer as Ie, menuItem as Re, menuItemSelected as Te, suggestionsContainer as ve, fieldEndIconContainer as Le, fieldElementsGap as Ae, iconButtonSize as $e, fieldEndIconGap as We } from "./text-field-base.css-mistica.js";
91
- import { vars as Ne } from "./skins/skin-contract.css-mistica.js";
92
- import { InternalToggleIconButton as Fe, InternalIconButton as we } from "./icon-button.js";
91
+ import { vars as Fe } from "./skins/skin-contract.css-mistica.js";
92
+ import { InternalToggleIconButton as Ne, InternalIconButton as we } from "./icon-button.js";
93
93
  import { ThemeVariant as Pe } from "./theme-variant-context.js";
94
94
  import { iconSize as Oe } from "./icon-button.css-mistica.js";
95
95
  const Be = (o, f)=>{
@@ -100,7 +100,7 @@ const Be = (o, f)=>{
100
100
  let { hasBackgroundColor: o = !0, onPress: f, onChange: i, disabled: m, Icon: g, checkedProps: r, uncheckedProps: a, "aria-label": h } = param;
101
101
  return /* @__PURE__ */ n("div", {
102
102
  className: Le,
103
- children: r ? /* @__PURE__ */ n(Fe, {
103
+ children: r ? /* @__PURE__ */ n(Ne, {
104
104
  checkedProps: _object_spread_props(_object_spread({}, r), {
105
105
  "aria-label": r["aria-label"] || ""
106
106
  }),
@@ -119,7 +119,7 @@ const Be = (o, f)=>{
119
119
  })
120
120
  });
121
121
  }, W = /*#__PURE__*/ d.forwardRef((_param, U)=>{
122
- var { error: o, helperText: f, label: i, inputProps: m, inputRef: g, defaultValue: r, value: a, onFocus: h, onBlur: x, inputComponent: p, prefix: b, startIcon: t, endIcon: u, endIconOverlay: S, shrinkLabel: F, multiline: R = !1, focus: y, fieldRef: H, maxLength: C, id: K, autoComplete: M, fullWidth: J, dataAttributes: Q } = _param, l = _object_without_properties(_param, [
122
+ var { error: o, helperText: f, label: i, inputProps: m, inputRef: g, defaultValue: r, value: a, onFocus: h, onBlur: x, inputComponent: p, prefix: b, startIcon: t, endIcon: u, endIconOverlay: S, shrinkLabel: N, multiline: R = !1, focus: y, fieldRef: H, maxLength: C, id: K, autoComplete: M, fullWidth: J, dataAttributes: Q } = _param, l = _object_without_properties(_param, [
123
123
  "error",
124
124
  "helperText",
125
125
  "label",
@@ -167,7 +167,7 @@ const Be = (o, f)=>{
167
167
  }, I = _object_spread(_object_spread_props(_object_spread({}, l), {
168
168
  maxLength: C,
169
169
  autoComplete: M
170
- }), m), $ = `calc(${Oe.default} + ${Ae}px)`, q = `calc(${$e} + ${We}px)`, V = F || s === "focused" || s === "filled" ? X ? le : oe : 1, ee = {
170
+ }), m), $ = `calc(${Oe.default} + ${Ae}px)`, q = `calc(${$e} + ${We}px)`, V = N || s === "focused" || s === "filled" ? X ? le : oe : 1, ee = {
171
171
  left: `calc(${T}px + ${t ? $ : "0px"})`,
172
172
  // shrinking means applying a scale transformation, so width will be proportionally reduced.
173
173
  // Let's keep the original width.
@@ -198,8 +198,8 @@ const Be = (o, f)=>{
198
198
  style: {
199
199
  opacity: s === "default" ? 0 : 1
200
200
  },
201
- children: /* @__PURE__ */ n(N, {
202
- color: Ne.colors.textSecondary,
201
+ children: /* @__PURE__ */ n(F, {
202
+ color: Fe.colors.textSecondary,
203
203
  regular: !0,
204
204
  wordBreak: !1,
205
205
  children: b
@@ -207,7 +207,7 @@ const Be = (o, f)=>{
207
207
  }),
208
208
  /* @__PURE__ */ n("div", {
209
209
  className: ge,
210
- children: /* @__PURE__ */ n(N, {
210
+ children: /* @__PURE__ */ n(F, {
211
211
  as: "div",
212
212
  regular: !0,
213
213
  children: /*#__PURE__*/ d.createElement(p || Y, _object_spread(_object_spread_props(_object_spread({}, Z, I), {
@@ -249,7 +249,7 @@ const Be = (o, f)=>{
249
249
  error: o,
250
250
  forId: w,
251
251
  inputState: s,
252
- shrinkLabel: F,
252
+ shrinkLabel: N,
253
253
  optional: !l.required,
254
254
  children: i
255
255
  }),
@@ -308,7 +308,7 @@ const Be = (o, f)=>{
308
308
  className: v(Re, {
309
309
  [Te]: u
310
310
  }),
311
- children: /* @__PURE__ */ n(N, {
311
+ children: /* @__PURE__ */ n(F, {
312
312
  regular: !0,
313
313
  children: t
314
314
  })
@@ -51,32 +51,32 @@ function _object_spread_props(target, source) {
51
51
  }
52
52
  return target;
53
53
  }
54
- import { jsxs as m, jsx as o, Fragment as g } from "react/jsx-runtime";
54
+ import { jsxs as m, jsx as o, Fragment as y } from "react/jsx-runtime";
55
55
  import * as x from "react";
56
56
  import c 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
59
  import { Text1 as v } from "./text.js";
60
60
  import { labelContainer as k, shrinked as S, labelText as I, helperText as b, leftText as F, rightText as E, fieldContainer as L, fullWidth as P, normalWidth as W, disabled as j, field as w, helperContainer as A } from "./text-field-components.css-mistica.js";
61
- import { sprinkles as N } from "./sprinkles.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
  import { getPrefixedDataAttributes as D } from "./utils/dom.js";
64
64
  const J = (param)=>{
65
65
  let { shrinkLabel: t, forId: s, inputState: r, error: l, children: i, style: n, optional: a } = param;
66
66
  const f = t || r === "focused" || r === "filled", [u, h] = x.useState("initial"), { texts: d } = C();
67
67
  x.useEffect(()=>{
68
- const T = setTimeout(()=>{
68
+ const g = setTimeout(()=>{
69
69
  process.env.NODE_ENV !== "test" && h("transform 150ms, width 150ms");
70
70
  });
71
71
  return ()=>{
72
- clearTimeout(T);
72
+ clearTimeout(g);
73
73
  };
74
74
  }, []);
75
75
  let p = e.colors.textSecondary;
76
76
  return l && r !== "default" ? p = e.colors.error : r === "focused" && (p = e.colors.controlActivated), /* @__PURE__ */ m("label", {
77
77
  className: c(k, {
78
78
  [S]: f
79
- }, N({
79
+ }, T({
80
80
  color: p
81
81
  })),
82
82
  htmlFor: s,
@@ -99,8 +99,8 @@ const J = (param)=>{
99
99
  });
100
100
  }, K = (param)=>{
101
101
  let { leftText: t, rightText: s, error: r, id: l } = param;
102
- const i = y(), n = i ? e.colors.textPrimaryInverse : r ? e.colors.error : e.colors.textSecondary, a = i ? e.colors.textPrimaryInverse : e.colors.textSecondary;
103
- return /* @__PURE__ */ m(g, {
102
+ const i = N(), n = i ? e.colors.textPrimaryInverse : r ? e.colors.error : e.colors.textSecondary, a = i ? e.colors.textPrimaryInverse : e.colors.textSecondary;
103
+ return /* @__PURE__ */ m(y, {
104
104
  children: [
105
105
  t && /* @__PURE__ */ o("div", {
106
106
  className: c(b, F),
@@ -137,7 +137,7 @@ const J = (param)=>{
137
137
  }, D(u)), {
138
138
  children: [
139
139
  /* @__PURE__ */ o("div", {
140
- className: c(w, N({
140
+ className: c(w, T({
141
141
  background: f ? e.colors.neutralLow : e.colors.backgroundContainer
142
142
  }), i),
143
143
  ref: n,
@@ -84,9 +84,9 @@ import l from "classnames";
84
84
  import { useTheme as p } from "./hooks.js";
85
85
  import { useIsInverseVariant as k } from "./theme-variant-context.js";
86
86
  import { useForm as d } from "./form-context.js";
87
- import { getTextFromChildren as n } from "./utils/common.js";
87
+ import { getTextFromChildren as o } from "./utils/common.js";
88
88
  import { useTrackingConfig as T, eventNames as x, eventCategories as I, eventActions as y } from "./utils/analytics.js";
89
- import { variants as o } from "./text-link.css-mistica.js";
89
+ import { variants as n } from "./text-link.css-mistica.js";
90
90
  const E = (_param)=>{
91
91
  var { children: t, className: r = "", disabled: a, style: s } = _param, e = _object_without_properties(_param, [
92
92
  "children",
@@ -97,11 +97,11 @@ const E = (_param)=>{
97
97
  const i = k(), { isDarkMode: m } = p(), { formStatus: c } = d(), { eventFormat: f } = T(), u = ()=>f === "google-analytics-4" ? {
98
98
  name: x.userInteraction,
99
99
  component_type: "link",
100
- component_copy: n(t)
100
+ component_copy: o(t)
101
101
  } : {
102
102
  category: I.userInteraction,
103
103
  action: y.linkTapped,
104
- label: n(t)
104
+ label: o(t)
105
105
  };
106
106
  var _e_trackingEvent;
107
107
  return /* @__PURE__ */ v(g, _object_spread_props(_object_spread({}, e), {
@@ -109,7 +109,7 @@ const E = (_param)=>{
109
109
  as: e.onPress ? "a" : void 0,
110
110
  trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? u() : void 0,
111
111
  disabled: a || c === "sending",
112
- className: l(i ? m ? o.inverseDark : o.inverseLight : o.default, r),
112
+ className: l(i ? m ? n.inverseDark : n.inverseLight : n.default, r),
113
113
  style: s,
114
114
  children: t
115
115
  }));
package/dist-es/text.js CHANGED
@@ -78,250 +78,271 @@ function _object_without_properties_loose(source, excluded) {
78
78
  }
79
79
  return target;
80
80
  }
81
- import { jsx as r } from "react/jsx-runtime";
82
- import * as j from "react";
81
+ import { jsx as r, Fragment as z, jsxs as w } from "react/jsx-runtime";
82
+ import * as v from "react";
83
83
  import B from "classnames";
84
- import { useIsInverseVariant as E } from "./theme-variant-context.js";
84
+ import { useIsInverseVariant as K } from "./theme-variant-context.js";
85
85
  import { applyCssVars as L, pxToRem as p } from "./utils/css.js";
86
86
  import { getPrefixedDataAttributes as M } from "./utils/dom.js";
87
- import { useTheme as a } from "./hooks.js";
88
- import { vars as m } from "./skins/skin-contract.css-mistica.js";
89
- import { text as O, withWordBreak as q, withoutWordBreak as F, truncate as G, truncateToOneLine as J, vars as x } from "./text.css-mistica.js";
90
- const K = {
87
+ import { useTheme as m } from "./hooks.js";
88
+ import { vars as a } from "./skins/skin-contract.css-mistica.js";
89
+ import { text as q, withWordBreak as G, withoutWordBreak as J, truncate as Q, truncateToOneLine as U, vars as l } from "./text.css-mistica.js";
90
+ import { VIVO_NEW_SKIN as X } from "./skins/constants.js";
91
+ import Y from "./screen-reader-only.js";
92
+ const Z = {
91
93
  light: 300,
92
94
  regular: 400,
93
95
  medium: 500,
94
96
  bold: 700
95
- }, Q = (e)=>e === !0 ? 1 : e || "initial", n = (param)=>{
96
- let { weight: e, color: i = m.colors.textPrimary, decoration: t, truncate: o, transform: h, wordBreak: c = !0, hyphens: u = "auto", as: z = "span", children: g, size: d, mobileSize: b = d, desktopSize: T = d, lineHeight: k, mobileLineHeight: S = k, desktopLineHeight: f = k, letterSpacing: w, textAlign: H, textShadow: v, id: A, role: P, "aria-level": y, dataAttributes: W } = param;
97
- const I = E(), C = Q(o), V = {
98
- [m.colors.textPrimary]: m.colors.textPrimaryInverse,
99
- [m.colors.textSecondary]: m.colors.textSecondaryInverse,
100
- [m.colors.textLink]: m.colors.textLinkInverse
97
+ }, $ = (e)=>e === !0 ? 1 : e || "initial", g = "Ħ", ee = /* @__PURE__ */ w(z, {
98
+ children: [
99
+ /* @__PURE__ */ r("span", {
100
+ "aria-hidden": !0,
101
+ children: g
102
+ }),
103
+ /* @__PURE__ */ r(Y, {
104
+ children: /* @__PURE__ */ r("span", {
105
+ children: "Vivo"
106
+ })
107
+ })
108
+ ]
109
+ }), te = (e)=>e.includes(g) ? /* @__PURE__ */ r(z, {
110
+ children: e.split(g).map((i, t)=>/* @__PURE__ */ w(v.Fragment, {
111
+ children: [
112
+ t > 0 && ee,
113
+ i
114
+ ]
115
+ }, t))
116
+ }) : e, o = (param)=>{
117
+ let { weight: e, color: i = a.colors.textPrimary, decoration: t, truncate: n, transform: c, wordBreak: d = !0, hyphens: u = "auto", as: A = "span", children: x, size: b, mobileSize: T = b, desktopSize: S = b, lineHeight: f, mobileLineHeight: k = f, desktopLineHeight: H = f, letterSpacing: V, textAlign: y, textShadow: I, id: P, role: W, "aria-level": C, dataAttributes: R } = param;
118
+ const { skinName: N } = m(), F = K(), O = $(n), _ = {
119
+ [a.colors.textPrimary]: a.colors.textPrimaryInverse,
120
+ [a.colors.textSecondary]: a.colors.textSecondaryInverse,
121
+ [a.colors.textLink]: a.colors.textLinkInverse
101
122
  };
102
- if (!g && g !== 0) return null;
103
- const D = B(O, c ? q : F, {
104
- [G]: o,
105
- [J]: o === 1 || o === !0
106
- }), N = L({
107
- [x.mobileSize]: b ? p(b) : "inherit",
108
- [x.mobileLineHeight]: S ? p(S) : "inherit",
109
- [x.desktopSize]: T ? p(T) : "inherit",
110
- [x.desktopLineHeight]: f ? p(f) : "inherit"
111
- }), R = o ? L({
112
- [x.lineClamp]: String(C)
123
+ if (!x && x !== 0) return null;
124
+ const j = B(q, d ? G : J, {
125
+ [Q]: n,
126
+ [U]: n === 1 || n === !0
127
+ }), D = L({
128
+ [l.mobileSize]: T ? p(T) : "inherit",
129
+ [l.mobileLineHeight]: k ? p(k) : "inherit",
130
+ [l.desktopSize]: S ? p(S) : "inherit",
131
+ [l.desktopLineHeight]: H ? p(H) : "inherit"
132
+ }), E = n ? L({
133
+ [l.lineClamp]: String(O)
113
134
  }) : {};
114
- var _V_i;
115
- return /*#__PURE__*/ j.createElement(z, _object_spread_props(_object_spread({
116
- className: D,
117
- id: A,
118
- role: P,
119
- "aria-level": y
120
- }, M(W, "Text")), {
121
- style: _object_spread_props(_object_spread({}, N, R), {
135
+ var __i;
136
+ return /*#__PURE__*/ v.createElement(A, _object_spread_props(_object_spread({
137
+ className: j,
138
+ id: P,
139
+ role: W,
140
+ "aria-level": C
141
+ }, M(R, "Text")), {
142
+ style: _object_spread_props(_object_spread({}, D, E), {
122
143
  hyphens: u,
123
144
  WebkitHyphens: u,
124
- letterSpacing: w,
125
- fontWeight: e ? K[e] : "inherit",
126
- textTransform: h || "inherit",
145
+ letterSpacing: V,
146
+ fontWeight: e ? Z[e] : "inherit",
147
+ textTransform: c || "inherit",
127
148
  textDecoration: t !== null && t !== void 0 ? t : "inherit",
128
- overflowWrap: c ? "anywhere" : "inherit",
129
- color: I ? (_V_i = V[i]) !== null && _V_i !== void 0 ? _V_i : i : i,
130
- textAlign: H,
131
- textShadow: v
149
+ overflowWrap: d ? "anywhere" : "inherit",
150
+ color: F ? (__i = _[i]) !== null && __i !== void 0 ? __i : i : i,
151
+ textAlign: y,
152
+ textShadow: I
132
153
  })
133
- }), g);
134
- }, l = (e)=>{
154
+ }), typeof x == "string" && N === X ? te(x) : x);
155
+ }, h = (e)=>{
135
156
  if (e.light) return "light";
136
157
  if (e.regular) return "regular";
137
158
  if (e.medium) return "medium";
138
159
  if (e.weight) return e.weight;
139
160
  }, s = (param)=>{
140
- let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize: o, desktopLineHeight: h } = param;
161
+ let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize: n, desktopLineHeight: c } = param;
141
162
  return e ? {
142
163
  size: i,
143
164
  lineHeight: t
144
165
  } : {
145
166
  mobileSize: i,
146
167
  mobileLineHeight: t,
147
- desktopSize: o,
148
- desktopLineHeight: h
168
+ desktopSize: n,
169
+ desktopLineHeight: c
149
170
  };
150
- }, ie = (_param)=>{
171
+ }, he = (_param)=>{
151
172
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
152
173
  "dataAttributes",
153
174
  "forceMobileSizes"
154
175
  ]);
155
- const { textPresets: o } = a();
156
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
176
+ const { textPresets: n } = m();
177
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
157
178
  forceMobileSizes: i,
158
179
  mobileSize: 48,
159
180
  mobileLineHeight: "56px",
160
181
  desktopSize: 64,
161
182
  desktopLineHeight: "72px"
162
183
  })), {
163
- weight: o.text10.weight,
184
+ weight: n.text10.weight,
164
185
  dataAttributes: _object_spread({
165
186
  "component-name": "Text10"
166
187
  }, e)
167
188
  }), t));
168
- }, oe = (_param)=>{
189
+ }, ce = (_param)=>{
169
190
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
170
191
  "dataAttributes",
171
192
  "forceMobileSizes"
172
193
  ]);
173
- const { textPresets: o } = a();
174
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
194
+ const { textPresets: n } = m();
195
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
175
196
  forceMobileSizes: i,
176
197
  mobileSize: 40,
177
198
  mobileLineHeight: "48px",
178
199
  desktopSize: 56,
179
200
  desktopLineHeight: "64px"
180
201
  })), {
181
- weight: o.text9.weight,
202
+ weight: n.text9.weight,
182
203
  dataAttributes: _object_spread({
183
204
  "component-name": "Text9"
184
205
  }, e)
185
206
  }), t));
186
- }, ne = (_param)=>{
207
+ }, ge = (_param)=>{
187
208
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
188
209
  "dataAttributes",
189
210
  "forceMobileSizes"
190
211
  ]);
191
- const { textPresets: o } = a();
192
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
212
+ const { textPresets: n } = m();
213
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
193
214
  forceMobileSizes: i,
194
215
  mobileSize: 32,
195
216
  mobileLineHeight: "40px",
196
217
  desktopSize: 48,
197
218
  desktopLineHeight: "56px"
198
219
  })), {
199
- weight: o.text8.weight,
220
+ weight: n.text8.weight,
200
221
  dataAttributes: _object_spread({
201
222
  "component-name": "Text8"
202
223
  }, e)
203
224
  }), t));
204
- }, re = (_param)=>{
225
+ }, de = (_param)=>{
205
226
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
206
227
  "dataAttributes",
207
228
  "forceMobileSizes"
208
229
  ]);
209
- const { textPresets: o } = a();
210
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
230
+ const { textPresets: n } = m();
231
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
211
232
  forceMobileSizes: i,
212
233
  mobileSize: 28,
213
234
  mobileLineHeight: "32px",
214
235
  desktopSize: 40,
215
236
  desktopLineHeight: "48px"
216
237
  })), {
217
- weight: o.text7.weight,
238
+ weight: n.text7.weight,
218
239
  dataAttributes: _object_spread({
219
240
  "component-name": "Text7"
220
241
  }, e)
221
242
  }), t));
222
- }, se = (_param)=>{
243
+ }, ue = (_param)=>{
223
244
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
224
245
  "dataAttributes",
225
246
  "forceMobileSizes"
226
247
  ]);
227
- const { textPresets: o } = a();
228
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
248
+ const { textPresets: n } = m();
249
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
229
250
  forceMobileSizes: i,
230
251
  mobileSize: 24,
231
252
  mobileLineHeight: "32px",
232
253
  desktopSize: 32,
233
254
  desktopLineHeight: "40px"
234
255
  })), {
235
- weight: o.text6.weight,
256
+ weight: n.text6.weight,
236
257
  dataAttributes: _object_spread({
237
258
  "component-name": "Text6"
238
259
  }, e)
239
260
  }), t));
240
- }, me = (_param)=>{
261
+ }, be = (_param)=>{
241
262
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
242
263
  "dataAttributes",
243
264
  "forceMobileSizes"
244
265
  ]);
245
- const { textPresets: o } = a();
246
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
266
+ const { textPresets: n } = m();
267
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
247
268
  forceMobileSizes: i,
248
269
  mobileSize: 20,
249
270
  mobileLineHeight: "24px",
250
271
  desktopSize: 28,
251
272
  desktopLineHeight: "32px"
252
273
  })), {
253
- weight: o.text5.weight,
274
+ weight: n.text5.weight,
254
275
  dataAttributes: _object_spread({
255
276
  "component-name": "Text5"
256
277
  }, e)
257
278
  }), t));
258
- }, ae = (_param)=>{
279
+ }, Te = (_param)=>{
259
280
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
260
281
  "dataAttributes",
261
282
  "forceMobileSizes"
262
283
  ]);
263
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
284
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
264
285
  forceMobileSizes: i,
265
286
  mobileSize: 18,
266
287
  mobileLineHeight: "24px",
267
288
  desktopSize: 20,
268
289
  desktopLineHeight: "28px"
269
290
  })), {
270
- weight: l(t),
291
+ weight: h(t),
271
292
  dataAttributes: _object_spread({
272
293
  "component-name": "Text4"
273
294
  }, e)
274
295
  }), t));
275
- }, xe = (_param)=>{
296
+ }, Se = (_param)=>{
276
297
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
277
298
  "dataAttributes",
278
299
  "forceMobileSizes"
279
300
  ]);
280
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
301
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
281
302
  forceMobileSizes: i,
282
303
  mobileSize: 16,
283
304
  mobileLineHeight: "24px",
284
305
  desktopSize: 18,
285
306
  desktopLineHeight: "24px"
286
307
  })), {
287
- weight: l(t),
308
+ weight: h(t),
288
309
  dataAttributes: _object_spread({
289
310
  "component-name": "Text3"
290
311
  }, e)
291
312
  }), t));
292
- }, pe = (_param)=>{
313
+ }, fe = (_param)=>{
293
314
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
294
315
  "dataAttributes",
295
316
  "forceMobileSizes"
296
317
  ]);
297
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
318
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
298
319
  forceMobileSizes: i,
299
320
  mobileSize: 14,
300
321
  mobileLineHeight: "20px",
301
322
  desktopSize: 16,
302
323
  desktopLineHeight: "24px"
303
324
  })), {
304
- weight: l(t),
325
+ weight: h(t),
305
326
  dataAttributes: _object_spread({
306
327
  "component-name": "Text2"
307
328
  }, e)
308
329
  }), t));
309
- }, le = (_param)=>{
330
+ }, ke = (_param)=>{
310
331
  var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
311
332
  "dataAttributes",
312
333
  "forceMobileSizes"
313
334
  ]);
314
- return /* @__PURE__ */ r(n, _object_spread(_object_spread_props(_object_spread({}, s({
335
+ return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
315
336
  forceMobileSizes: i,
316
337
  mobileSize: 12,
317
338
  mobileLineHeight: "16px",
318
339
  desktopSize: 14,
319
340
  desktopLineHeight: "20px"
320
341
  })), {
321
- weight: l(t),
342
+ weight: h(t),
322
343
  dataAttributes: _object_spread({
323
344
  "component-name": "Text1"
324
345
  }, e)
325
346
  }), t));
326
- }, he = n;
327
- export { n as Text, le as Text1, ie as Text10, pe as Text2, xe as Text3, ae as Text4, me as Text5, se as Text6, re as Text7, ne as Text8, oe as Text9, he as default };
347
+ }, He = o;
348
+ export { o as Text, ke as Text1, he as Text10, fe as Text2, Se as Text3, Te as Text4, be as Text5, ue as Text6, de as Text7, ge as Text8, ce as Text9, He as default };
@@ -53,13 +53,13 @@ function _object_spread_props(target, source) {
53
53
  }
54
54
  import { jsx as h } from "react/jsx-runtime";
55
55
  import m from "classnames";
56
- import * as o from "react";
56
+ import * as n from "react";
57
57
  import { useIsomorphicLayoutEffect as l } from "../hooks.js";
58
- import { container as f, containerWithWrapper as w, vars as R, wrapper as N } from "./aspect-ratio-support.css-mistica.js";
59
- import { applyCssVars as b } from "./css.js";
60
- const u = /*#__PURE__*/ o.createContext(!0), x = (param)=>{
58
+ import { container as f, containerWithWrapper as w, vars as R, wrapper as b } from "./aspect-ratio-support.css-mistica.js";
59
+ import { applyCssVars as y } from "./css.js";
60
+ const u = /*#__PURE__*/ n.createContext(!0), x = (param)=>{
61
61
  let { children: t } = param;
62
- const [r, s] = o.useState(!0);
62
+ const [o, s] = n.useState(!0);
63
63
  return l(()=>{
64
64
  try {
65
65
  CSS.supports("aspect-ratio", "1 / 1") || s(!1);
@@ -67,16 +67,16 @@ const u = /*#__PURE__*/ o.createContext(!0), x = (param)=>{
67
67
  s(!1);
68
68
  }
69
69
  }, []), /* @__PURE__ */ h(u.Provider, {
70
- value: r,
70
+ value: o,
71
71
  children: t
72
72
  });
73
- }, y = ()=>o.useContext(u), W = (t)=>{
74
- const r = y(), s = typeof t.width != "number" && typeof t.height != "number" && t.aspectRatio !== 0, e = s ? t.aspectRatio : void 0;
73
+ }, N = ()=>n.useContext(u), W = (t)=>{
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
76
  var _t_aspectRatio, _t_aspectRatio1;
77
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%";
78
78
  var _t_as;
79
- const c = s && !r, n = /*#__PURE__*/ o.createElement((_t_as = t.as) !== null && _t_as !== void 0 ? _t_as : "div", _object_spread({
79
+ const c = s && !o, r = /*#__PURE__*/ n.createElement((_t_as = t.as) !== null && _t_as !== void 0 ? _t_as : "div", _object_spread({
80
80
  className: m(t.className, f, {
81
81
  [w]: c
82
82
  }),
@@ -86,7 +86,7 @@ const u = /*#__PURE__*/ o.createContext(!0), x = (param)=>{
86
86
  }) : _object_spread_props(_object_spread({}, t.style), {
87
87
  width: isNaN(Number(i)) ? i : Number(i),
88
88
  height: isNaN(Number(a)) ? a : Number(a)
89
- }), b({
89
+ }), y({
90
90
  [R.aspectRatio]: e ? String(e) : "unset"
91
91
  }))
92
92
  }, !c && t.dataAttributes), t.children);
@@ -98,10 +98,10 @@ const u = /*#__PURE__*/ o.createContext(!0), x = (param)=>{
98
98
  height: a,
99
99
  paddingTop: d
100
100
  },
101
- className: N
101
+ className: b
102
102
  }, t.dataAttributes), {
103
- children: n
103
+ children: r
104
104
  }));
105
- } else return n;
105
+ } else return r;
106
106
  };
107
- export { W as AspectRatioContainer, x as AspectRatioSupportProvider, y as useSupportsAspectRatio };
107
+ export { W as AspectRatioContainer, x as AspectRatioSupportProvider, N as useSupportsAspectRatio };
@@ -1,5 +1,5 @@
1
1
  const i = function(e) {
2
2
  let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
3
- o ? window.open(e, "_blank") : n ? window.open(e, "_top") : document.location.href = e;
3
+ o ? window.open(e, "_blank") : n ? window.open(e, "_top") : window.location.assign(e);
4
4
  };
5
5
  export { i as redirect };
package/dist-es/video.js CHANGED
@@ -32,7 +32,7 @@ import { ImageContent as J, ImageError as O } from "./image.js";
32
32
  import { AspectRatioContainer as P } from "./utils/aspect-ratio-support.js";
33
33
  import { isRunningAcceptanceTest as Q } from "./utils/platform.js";
34
34
  import { video as X } from "./video.css-mistica.js";
35
- import { defaultBorderRadius as N } from "./image.css-mistica.js";
35
+ import { defaultBorderRadius as S } from "./image.css-mistica.js";
36
36
  import { getPrefixedDataAttributes as Y } from "./utils/dom.js";
37
37
  import $ from "classnames";
38
38
  const q = {
@@ -73,7 +73,7 @@ const q = {
73
73
  "16:9": 16 / 9,
74
74
  "4:3": 4 / 3
75
75
  }, M = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", _ = /*#__PURE__*/ a.forwardRef((_param, A)=>{
76
- var { src: s, poster: u, autoPlay: g = "when-loaded", muted: S = !0, loop: k = !0, preload: x = "none", loadingTimeout: b = 1e4, onLoad: y, onError: h, onPause: w, onPlay: v, aspectRatio: c = "1:1", dataAttributes: U } = _param, n = _object_without_properties(_param, [
76
+ var { src: s, poster: u, autoPlay: g = "when-loaded", muted: N = !0, loop: k = !0, preload: x = "none", loadingTimeout: b = 1e4, onLoad: y, onError: h, onPause: w, onPlay: v, aspectRatio: c = "1:1", dataAttributes: U } = _param, n = _object_without_properties(_param, [
77
77
  "src",
78
78
  "poster",
79
79
  "autoPlay",
@@ -125,9 +125,9 @@ const q = {
125
125
  playsInline: !0,
126
126
  disablePictureInPicture: !0,
127
127
  disableRemotePlayback: !0,
128
- muted: S,
128
+ muted: N,
129
129
  loop: k,
130
- className: $(X, N),
130
+ className: $(X, S),
131
131
  preload: x,
132
132
  onError: R,
133
133
  onPause: ()=>{
@@ -169,7 +169,7 @@ const q = {
169
169
  height: "100%"
170
170
  },
171
171
  children: /* @__PURE__ */ d(O, {
172
- className: N,
172
+ className: S,
173
173
  withIcon: E
174
174
  })
175
175
  }) : void 0, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "15.2.0",
3
+ "version": "15.3.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",