@telefonica/mistica 14.12.0 → 14.14.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 (124) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/boxed.css-mistica.js +4 -4
  3. package/dist/boxed.css.d.ts +1 -1
  4. package/dist/boxed.js +12 -14
  5. package/dist/card.css-mistica.js +27 -12
  6. package/dist/card.css.d.ts +7 -0
  7. package/dist/card.d.ts +36 -34
  8. package/dist/card.js +611 -469
  9. package/dist/fixed-footer-layout.js +8 -7
  10. package/dist/generated/mistica-icons/icon-alert-filled.js +15 -5
  11. package/dist/generated/mistica-icons/icon-alert-light.js +24 -8
  12. package/dist/generated/mistica-icons/icon-alert-regular.js +30 -14
  13. package/dist/generated/mistica-icons/icon-bell-filled.js +19 -9
  14. package/dist/generated/mistica-icons/icon-bell-light.js +16 -6
  15. package/dist/generated/mistica-icons/icon-bell-regular.js +19 -9
  16. package/dist/generated/mistica-icons/icon-dollar-symbol-circle-light.js +28 -11
  17. package/dist/generated/mistica-icons/icon-dollar-symbol-circle-regular.js +20 -9
  18. package/dist/generated/mistica-icons/icon-edit-pencil-light.js +21 -10
  19. package/dist/generated/mistica-icons/icon-edit-pencil-regular.js +22 -12
  20. package/dist/generated/mistica-icons/icon-gift-filled.js +19 -9
  21. package/dist/generated/mistica-icons/icon-gift-light.js +20 -10
  22. package/dist/generated/mistica-icons/icon-gift-regular.js +19 -9
  23. package/dist/generated/mistica-icons/icon-heart-filled.js +16 -6
  24. package/dist/generated/mistica-icons/icon-heart-light.js +18 -8
  25. package/dist/generated/mistica-icons/icon-heart-regular.js +24 -14
  26. package/dist/generated/mistica-icons/icon-home-filled.js +23 -13
  27. package/dist/generated/mistica-icons/icon-home-light.js +24 -14
  28. package/dist/generated/mistica-icons/icon-home-regular.js +21 -11
  29. package/dist/generated/mistica-icons/icon-home-wifi-filled.js +24 -7
  30. package/dist/generated/mistica-icons/icon-home-wifi-light.js +25 -8
  31. package/dist/generated/mistica-icons/icon-home-wifi-regular.js +24 -7
  32. package/dist/generated/mistica-icons/icon-pause-regular.js +10 -12
  33. package/dist/generated/mistica-icons/icon-play-regular.js +14 -16
  34. package/dist/generated/mistica-icons/icon-reload-light.js +22 -12
  35. package/dist/generated/mistica-icons/icon-reload-regular.js +24 -14
  36. package/dist/generated/mistica-icons/icon-share-filled.js +20 -10
  37. package/dist/generated/mistica-icons/icon-share-light.js +21 -11
  38. package/dist/generated/mistica-icons/icon-share-regular.js +21 -11
  39. package/dist/generated/mistica-icons/icon-shopping-bag-filled.d.ts +4 -0
  40. package/dist/generated/mistica-icons/icon-shopping-bag-filled.js +110 -0
  41. package/dist/generated/mistica-icons/icon-shopping-bag-light.d.ts +4 -0
  42. package/dist/generated/mistica-icons/icon-shopping-bag-light.js +110 -0
  43. package/dist/generated/mistica-icons/icon-shopping-bag-regular.d.ts +4 -0
  44. package/dist/generated/mistica-icons/icon-shopping-bag-regular.js +110 -0
  45. package/dist/generated/mistica-icons/icon-tickets-filled.js +17 -7
  46. package/dist/generated/mistica-icons/icon-tickets-light.js +26 -10
  47. package/dist/generated/mistica-icons/icon-tickets-regular.js +35 -19
  48. package/dist/hooks.js +57 -56
  49. package/dist/index.d.ts +3 -0
  50. package/dist/index.js +14 -1
  51. package/dist/package-version.js +1 -1
  52. package/dist/skins/blau.js +14 -2
  53. package/dist/skins/defaults.js +12 -0
  54. package/dist/skins/movistar-legacy.js +15 -3
  55. package/dist/skins/movistar.js +12 -0
  56. package/dist/skins/o2.js +13 -1
  57. package/dist/skins/telefonica.js +12 -0
  58. package/dist/skins/types/index.d.ts +1 -1
  59. package/dist/skins/vivo-new.js +12 -0
  60. package/dist/skins/vivo.js +13 -1
  61. package/dist/theme-context-provider.js +34 -30
  62. package/dist/tooltip.js +35 -34
  63. package/dist/utils/dom.js +10 -10
  64. package/dist/utils/environment.d.ts +1 -0
  65. package/dist/utils/environment.js +12 -4
  66. package/dist-es/boxed.css-mistica.js +3 -3
  67. package/dist-es/boxed.js +16 -18
  68. package/dist-es/card.css-mistica.js +2 -2
  69. package/dist-es/card.js +652 -511
  70. package/dist-es/fixed-footer-layout.js +18 -17
  71. package/dist-es/generated/mistica-icons/icon-alert-filled.js +18 -8
  72. package/dist-es/generated/mistica-icons/icon-alert-light.js +30 -14
  73. package/dist-es/generated/mistica-icons/icon-alert-regular.js +36 -20
  74. package/dist-es/generated/mistica-icons/icon-bell-filled.js +26 -16
  75. package/dist-es/generated/mistica-icons/icon-bell-light.js +20 -10
  76. package/dist-es/generated/mistica-icons/icon-bell-regular.js +20 -10
  77. package/dist-es/generated/mistica-icons/icon-dollar-symbol-circle-light.js +33 -16
  78. package/dist-es/generated/mistica-icons/icon-dollar-symbol-circle-regular.js +25 -14
  79. package/dist-es/generated/mistica-icons/icon-edit-pencil-light.js +25 -14
  80. package/dist-es/generated/mistica-icons/icon-edit-pencil-regular.js +30 -20
  81. package/dist-es/generated/mistica-icons/icon-gift-filled.js +22 -12
  82. package/dist-es/generated/mistica-icons/icon-gift-light.js +23 -13
  83. package/dist-es/generated/mistica-icons/icon-gift-regular.js +22 -12
  84. package/dist-es/generated/mistica-icons/icon-heart-filled.js +18 -8
  85. package/dist-es/generated/mistica-icons/icon-heart-light.js +24 -14
  86. package/dist-es/generated/mistica-icons/icon-heart-regular.js +25 -15
  87. package/dist-es/generated/mistica-icons/icon-home-filled.js +30 -20
  88. package/dist-es/generated/mistica-icons/icon-home-light.js +27 -17
  89. package/dist-es/generated/mistica-icons/icon-home-regular.js +27 -17
  90. package/dist-es/generated/mistica-icons/icon-home-wifi-filled.js +28 -11
  91. package/dist-es/generated/mistica-icons/icon-home-wifi-light.js +29 -12
  92. package/dist-es/generated/mistica-icons/icon-home-wifi-regular.js +28 -11
  93. package/dist-es/generated/mistica-icons/icon-pause-regular.js +12 -14
  94. package/dist-es/generated/mistica-icons/icon-play-regular.js +19 -21
  95. package/dist-es/generated/mistica-icons/icon-reload-light.js +27 -17
  96. package/dist-es/generated/mistica-icons/icon-reload-regular.js +27 -17
  97. package/dist-es/generated/mistica-icons/icon-share-filled.js +25 -15
  98. package/dist-es/generated/mistica-icons/icon-share-light.js +28 -18
  99. package/dist-es/generated/mistica-icons/icon-share-regular.js +28 -18
  100. package/dist-es/generated/mistica-icons/icon-shopping-bag-filled.js +101 -0
  101. package/dist-es/generated/mistica-icons/icon-shopping-bag-light.js +101 -0
  102. package/dist-es/generated/mistica-icons/icon-shopping-bag-regular.js +101 -0
  103. package/dist-es/generated/mistica-icons/icon-tickets-filled.js +21 -11
  104. package/dist-es/generated/mistica-icons/icon-tickets-light.js +30 -14
  105. package/dist-es/generated/mistica-icons/icon-tickets-regular.js +43 -27
  106. package/dist-es/hooks.js +51 -50
  107. package/dist-es/index.js +1762 -1758
  108. package/dist-es/package-version.js +1 -1
  109. package/dist-es/skins/blau.js +14 -2
  110. package/dist-es/skins/defaults.js +12 -0
  111. package/dist-es/skins/movistar-legacy.js +15 -3
  112. package/dist-es/skins/movistar.js +12 -0
  113. package/dist-es/skins/o2.js +13 -1
  114. package/dist-es/skins/telefonica.js +12 -0
  115. package/dist-es/skins/vivo-new.js +12 -0
  116. package/dist-es/skins/vivo.js +13 -1
  117. package/dist-es/style.css +1 -1
  118. package/dist-es/theme-context-provider.js +72 -68
  119. package/dist-es/tooltip.js +37 -36
  120. package/dist-es/utils/dom.js +9 -9
  121. package/dist-es/utils/environment.js +2 -2
  122. package/package.json +1 -1
  123. package/dist/boxed.css.ts.vanilla.css-mistica.js +0 -11
  124. package/dist-es/boxed.css.ts.vanilla.css-mistica.js +0 -2
@@ -26,107 +26,111 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
- import { jsx as e, jsxs as E, Fragment as R } from "react/jsx-runtime";
29
+ import { jsx as r, jsxs as S, Fragment as y } from "react/jsx-runtime";
30
30
  import * as a from "react";
31
- import { assignInlineVars as h } from "@vanilla-extract/dynamic";
32
- import A from "./dialog.js";
33
- import H from "./screen-size-context-provider.js";
34
- import S from "./aria-id-getter-context.js";
35
- import { getTexts as y, dimensions as N, AnchorLink as O, NAVBAR_HEIGHT_MOBILE as L } from "./theme.js";
36
- import { getPlatform as g, isInsideNovumNativeApp as w } from "./utils/platform.js";
37
- import F from "./theme-context.js";
38
- import { useIsomorphicLayoutEffect as $ } from "./hooks.js";
39
- import V from "./tab-focus.js";
40
- import j from "./modal-context-provider.js";
41
- import { DocumentVisibilityProvider as _ } from "./utils/document-visibility.js";
42
- import { AspectRatioSupportProvider as B } from "./utils/aspect-ratio-support.js";
43
- import { TrackingConfig as z } from "./utils/analytics.js";
44
- import { vars as G } from "./skins/skin-contract.css-mistica.js";
45
- import { fromHexToRgb as q } from "./utils/color.js";
46
- import { defaultTextPresetsConfig as r, defaultBorderRadiiConfig as W } from "./skins/defaults.js";
47
- const J = "(prefers-color-scheme: dark)", K = ()=>{
31
+ import { assignInlineVars as N } from "@vanilla-extract/dynamic";
32
+ import O from "./dialog.js";
33
+ import L from "./screen-size-context-provider.js";
34
+ import w from "./aria-id-getter-context.js";
35
+ import { getTexts as F, dimensions as $, AnchorLink as h, NAVBAR_HEIGHT_MOBILE as V } from "./theme.js";
36
+ import { getPlatform as D, isInsideNovumNativeApp as j } from "./utils/platform.js";
37
+ import _ from "./theme-context.js";
38
+ import { useIsomorphicLayoutEffect as B } from "./hooks.js";
39
+ import z from "./tab-focus.js";
40
+ import G from "./modal-context-provider.js";
41
+ import { DocumentVisibilityProvider as q } from "./utils/document-visibility.js";
42
+ import { AspectRatioSupportProvider as W } from "./utils/aspect-ratio-support.js";
43
+ import { TrackingConfig as J } from "./utils/analytics.js";
44
+ import { vars as K } from "./skins/skin-contract.css-mistica.js";
45
+ import { fromHexToRgb as Q } from "./utils/color.js";
46
+ import { defaultTextPresetsConfig as e, defaultBorderRadiiConfig as U } from "./skins/defaults.js";
47
+ const X = "(prefers-color-scheme: dark)", Y = ()=>{
48
48
  const [t, c] = a.useState(!1);
49
- return $(()=>{
49
+ return B(()=>{
50
50
  if (!window.matchMedia) return;
51
- const o = window.matchMedia(J), s = ()=>{
51
+ const o = window.matchMedia(X), s = ()=>{
52
52
  c(o.matches);
53
53
  };
54
54
  return o.addListener(s), s(), ()=>o.removeListener(s);
55
55
  }, []), t;
56
- }, Q = ()=>(t)=>t, U = (t)=>({
57
- headerMobileHeight: (t == null ? void 0 : t.headerMobileHeight) === "mistica" ? L : t == null ? void 0 : t.headerMobileHeight
58
- }), X = (param)=>{
56
+ }, Z = ()=>(t)=>t, tt = (t)=>({
57
+ headerMobileHeight: (t == null ? void 0 : t.headerMobileHeight) === "mistica" ? V : t == null ? void 0 : t.headerMobileHeight
58
+ }), et = (param)=>{
59
59
  let { theme: t , children: c , as: o } = param;
60
60
  var _t_colorScheme, _t_skin_borderRadii;
61
- const s = a.useRef(1), M = a.useCallback(()=>`aria-id-hook-${s.current++}`, []), T = K(), u = (_t_colorScheme = t.colorScheme) !== null && _t_colorScheme !== void 0 ? _t_colorScheme : "auto", C = t.skin.colors, D = _object_spread({}, t.skin.colors, t.skin.darkModeColors), f = u === "auto" && T || u === "dark", p = f ? D : C, k = a.useMemo(()=>{
62
- var i, n, l, m, x, P, b;
63
- const d = _object_spread({
64
- platform: g(),
65
- insideNovumNativeApp: w()
61
+ const s = a.useRef(1), I = a.useCallback(()=>`aria-id-hook-${s.current++}`, []), E = Y(), m = (_t_colorScheme = t.colorScheme) !== null && _t_colorScheme !== void 0 ? _t_colorScheme : "auto", R = t.skin.colors, A = _object_spread({}, t.skin.colors, t.skin.darkModeColors), u = m === "auto" && E || m === "dark", k = u ? A : R, p = a.useMemo(()=>{
62
+ var i, n, d, x, f, P, b, g, M, T, C;
63
+ const l = _object_spread({
64
+ platform: D(),
65
+ insideNovumNativeApp: j()
66
66
  }, t.platformOverrides);
67
67
  var _t_Link, _t_useHrefDecorator;
68
68
  return {
69
69
  skinName: t.skin.name,
70
70
  i18n: t.i18n,
71
- platformOverrides: d,
72
- texts: _object_spread({}, y(t.i18n.locale), t.texts),
71
+ platformOverrides: l,
72
+ texts: _object_spread({}, F(t.i18n.locale), t.texts),
73
73
  analytics: _object_spread({
74
74
  logEvent: ()=>Promise.resolve(),
75
75
  eventFormat: "universal-analytics"
76
76
  }, t.analytics),
77
- dimensions: _object_spread({}, N, U(t.dimensions)),
77
+ dimensions: _object_spread({}, $, tt(t.dimensions)),
78
78
  textPresets: {
79
- text5: _object_spread({}, r.text5, (i = t.skin.textPresets) == null ? void 0 : i.text5),
80
- text6: _object_spread({}, r.text6, (n = t.skin.textPresets) == null ? void 0 : n.text6),
81
- text7: _object_spread({}, r.text7, (l = t.skin.textPresets) == null ? void 0 : l.text7),
82
- text8: _object_spread({}, r.text8, (m = t.skin.textPresets) == null ? void 0 : m.text8),
83
- text9: _object_spread({}, r.text9, (x = t.skin.textPresets) == null ? void 0 : x.text9),
84
- text10: _object_spread({}, r.text10, (P = t.skin.textPresets) == null ? void 0 : P.text10),
85
- cardTitle: _object_spread({}, r.cardTitle, (b = t.skin.textPresets) == null ? void 0 : b.cardTitle)
79
+ text5: _object_spread({}, e.text5, (i = t.skin.textPresets) == null ? void 0 : i.text5),
80
+ text6: _object_spread({}, e.text6, (n = t.skin.textPresets) == null ? void 0 : n.text6),
81
+ text7: _object_spread({}, e.text7, (d = t.skin.textPresets) == null ? void 0 : d.text7),
82
+ text8: _object_spread({}, e.text8, (x = t.skin.textPresets) == null ? void 0 : x.text8),
83
+ text9: _object_spread({}, e.text9, (f = t.skin.textPresets) == null ? void 0 : f.text9),
84
+ text10: _object_spread({}, e.text10, (P = t.skin.textPresets) == null ? void 0 : P.text10),
85
+ cardTitle: _object_spread({}, e.cardTitle, (b = t.skin.textPresets) == null ? void 0 : b.cardTitle),
86
+ button: _object_spread({}, e.button, (g = t.skin.textPresets) == null ? void 0 : g.button),
87
+ link: _object_spread({}, e.link, (M = t.skin.textPresets) == null ? void 0 : M.link),
88
+ title1: _object_spread({}, e.title1, (T = t.skin.textPresets) == null ? void 0 : T.title1),
89
+ indicator: _object_spread({}, e.indicator, (C = t.skin.textPresets) == null ? void 0 : C.indicator)
86
90
  },
87
- Link: (_t_Link = t.Link) !== null && _t_Link !== void 0 ? _t_Link : O,
88
- isDarkMode: f,
89
- isIos: g(d) === "ios",
90
- useHrefDecorator: (_t_useHrefDecorator = t.useHrefDecorator) !== null && _t_useHrefDecorator !== void 0 ? _t_useHrefDecorator : Q,
91
+ Link: (_t_Link = t.Link) !== null && _t_Link !== void 0 ? _t_Link : h,
92
+ isDarkMode: u,
93
+ isIos: D(l) === "ios",
94
+ useHrefDecorator: (_t_useHrefDecorator = t.useHrefDecorator) !== null && _t_useHrefDecorator !== void 0 ? _t_useHrefDecorator : Z,
91
95
  useId: t.useId
92
96
  };
93
97
  }, [
94
98
  t,
95
- f
96
- ]), I = Object.fromEntries(Object.entries(p).map((param)=>{
97
- let [d, i] = param;
99
+ u
100
+ ]), H = Object.fromEntries(Object.entries(k).map((param)=>{
101
+ let [l, i] = param;
98
102
  let n = "";
99
103
  if (i.startsWith("#")) {
100
- const [l, m, x] = q(i);
101
- n = `${l}, ${m}, ${x}`;
104
+ const [d, x, f] = Q(i);
105
+ n = `${d}, ${x}, ${f}`;
102
106
  }
103
107
  return [
104
- d,
108
+ l,
105
109
  n
106
110
  ];
107
- })), v = h(G, {
108
- colors: p,
109
- rawColors: I,
110
- borderRadii: (_t_skin_borderRadii = t.skin.borderRadii) !== null && _t_skin_borderRadii !== void 0 ? _t_skin_borderRadii : W
111
+ })), v = N(K, {
112
+ colors: k,
113
+ rawColors: H,
114
+ borderRadii: (_t_skin_borderRadii = t.skin.borderRadii) !== null && _t_skin_borderRadii !== void 0 ? _t_skin_borderRadii : U
111
115
  });
112
- return /* @__PURE__ */ e(V, {
116
+ return /* @__PURE__ */ r(z, {
113
117
  disabled: !t.enableTabFocus,
114
- children: /* @__PURE__ */ e(j, {
115
- children: /* @__PURE__ */ e(F.Provider, {
116
- value: k,
117
- children: /* @__PURE__ */ e(z, {
118
- eventFormat: k.analytics.eventFormat,
119
- children: /* @__PURE__ */ e(B, {
120
- children: /* @__PURE__ */ e(_, {
121
- children: /* @__PURE__ */ e(S.Provider, {
122
- value: M,
123
- children: /* @__PURE__ */ e(H, {
124
- children: /* @__PURE__ */ e(A, {
118
+ children: /* @__PURE__ */ r(G, {
119
+ children: /* @__PURE__ */ r(_.Provider, {
120
+ value: p,
121
+ children: /* @__PURE__ */ r(J, {
122
+ eventFormat: p.analytics.eventFormat,
123
+ children: /* @__PURE__ */ r(W, {
124
+ children: /* @__PURE__ */ r(q, {
125
+ children: /* @__PURE__ */ r(w.Provider, {
126
+ value: I,
127
+ children: /* @__PURE__ */ r(L, {
128
+ children: /* @__PURE__ */ r(O, {
125
129
  children: o ? /*#__PURE__*/ a.createElement(o, {
126
130
  style: v
127
- }, c) : /* @__PURE__ */ E(R, {
131
+ }, c) : /* @__PURE__ */ S(y, {
128
132
  children: [
129
- (process.env.NODE_ENV !== "test" || process.env.SSR_TEST) && /* @__PURE__ */ e("style", {
133
+ (process.env.NODE_ENV !== "test" || process.env.SSR_TEST) && /* @__PURE__ */ r("style", {
130
134
  children: `:root {${v}}`
131
135
  }),
132
136
  c
@@ -141,5 +145,5 @@ const J = "(prefers-color-scheme: dark)", K = ()=>{
141
145
  })
142
146
  })
143
147
  });
144
- }, pt = X;
145
- export { pt as default, K as useIsOsDarkModeEnabled };
148
+ }, bt = et;
149
+ export { bt as default, Y as useIsOsDarkModeEnabled };
@@ -84,14 +84,15 @@ import { CSSTransition as V } from "react-transition-group";
84
84
  import { useTheme as j, useScreenSize as q, useAriaId as G } from "./hooks.js";
85
85
  import { Portal as H } from "./portal.js";
86
86
  import J from "./overlay.js";
87
- import { Text2 as S } from "./text.js";
87
+ import { Text2 as O } from "./text.js";
88
88
  import { TAB as Q } from "./utils/key-codes.js";
89
89
  import U from "./stack.js";
90
90
  import { vars as n, wrapper as Z, enter as _, enterActive as tt, enterDone as et, exit as rt, exitActive as nt, container as ot, arrowWrapper as at, arrow as it, fadeInTopKeyframes as st, fadeInBottomKeyframes as ct, fadeInXKeyframes as lt, arrowTop as ut, arrowBottom as ft, arrowLeft as mt, arrowRight as dt } from "./tooltip.css-mistica.js";
91
91
  import { assignInlineVars as pt } from "@vanilla-extract/dynamic";
92
92
  import { getPrefixedDataAttributes as ht } from "./utils/dom.js";
93
- const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500, d = 12, vt = 500, R = ()=>{}, At = (t)=>t || Tt, Yt = (t)=>t === "bottom" ? `translateY(${d}px)` : t === "top" ? `translateY(calc(-100% - ${d}px))` : t === "right" ? `translateX(${d}px) translateY(-50%)` : t === "left" ? `translateX(-${d}px) translateY(-50%)` : `translateY(-${d}px)`, yt = (t)=>t === "top" ? "translateY(-100%)" : t === "bottom" ? "translateY(0)" : "translateY(-50%)", Pt = (t)=>t === "bottom" ? "translateY(0)" : t === "top" ? "translateY(-100%)" : t === "right" || t === "left" ? "translateX(0px) translateY(-50%)" : "translateY(0px)", Dt = (t)=>t === "top" ? st : t === "bottom" ? ct : lt, Ot = (t)=>t ? "1" : "0.2", St = (t)=>t === "top" ? `2px 2px 4px 0 rgba(0, 0, 0, ${n.shadowAlpha})` : t === "right" ? `0 0 4px 0 rgba(0, 0, 0, ${n.shadowAlpha})` : t === "left" ? `0 0 4px 0 rgba(0, 0, 0, ${n.shadowAlpha})` : t === "bottom" ? `-1px -1px 4px 0 rgba(0, 0, 0, ${n.shadowAlpha})` : "", Rt = (_param)=>{
94
- var { children: t , extra: $ , description: g , target: I , title: x , targetLabel: B , delay: C = !0 , dataAttributes: E } = _param, Y = _object_without_properties(_param, [
93
+ import { isClientSide as gt, isServerSide as wt } from "./utils/environment.js";
94
+ const xt = "bottom", Tt = "top", bt = 12, h = 4 + bt, g = 16, vt = 340, At = 500, d = 12, Yt = 500, R = ()=>{}, Pt = (t)=>t || vt, St = (t)=>t === "bottom" ? `translateY(${d}px)` : t === "top" ? `translateY(calc(-100% - ${d}px))` : t === "right" ? `translateX(${d}px) translateY(-50%)` : t === "left" ? `translateX(-${d}px) translateY(-50%)` : `translateY(-${d}px)`, yt = (t)=>t === "top" ? "translateY(-100%)" : t === "bottom" ? "translateY(0)" : "translateY(-50%)", Dt = (t)=>t === "bottom" ? "translateY(0)" : t === "top" ? "translateY(-100%)" : t === "right" || t === "left" ? "translateX(0px) translateY(-50%)" : "translateY(0px)", Ot = (t)=>t === "top" ? st : t === "bottom" ? ct : lt, Rt = (t)=>t ? "1" : "0.2", $t = (t)=>t === "top" ? `2px 2px 4px 0 rgba(0, 0, 0, ${n.shadowAlpha})` : t === "right" ? `0 0 4px 0 rgba(0, 0, 0, ${n.shadowAlpha})` : t === "left" ? `0 0 4px 0 rgba(0, 0, 0, ${n.shadowAlpha})` : t === "bottom" ? `-1px -1px 4px 0 rgba(0, 0, 0, ${n.shadowAlpha})` : "", It = (_param)=>{
95
+ var { children: t , extra: $ , description: w , target: I , title: x , targetLabel: C , delay: B = !0 , dataAttributes: E } = _param, Y = _object_without_properties(_param, [
95
96
  "children",
96
97
  "extra",
97
98
  "description",
@@ -101,7 +102,7 @@ const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500
101
102
  "delay",
102
103
  "dataAttributes"
103
104
  ]);
104
- const { isDarkMode: M } = j(), [l, T] = c.useState(!1), { isTabletOrSmaller: u } = q(), y = G(), o = c.useRef(!1), r = c.useRef(null), f = c.useRef(null), b = c.useRef(null), e = c.useRef({
105
+ const { isDarkMode: M } = j(), [l, T] = c.useState(!1), { isTabletOrSmaller: u } = q(), P = G(), o = c.useRef(!1), r = c.useRef(null), f = c.useRef(null), b = c.useRef(null), e = c.useRef({
105
106
  top: 0,
106
107
  right: 0,
107
108
  left: 0,
@@ -109,23 +110,23 @@ const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500
109
110
  width: 0,
110
111
  height: 0
111
112
  }), a = function() {
112
- let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : wt;
113
- return u && (i === "left" || i === "right") ? gt : i;
114
- }(Y.position), v = typeof window < "u" ? window.matchMedia("(pointer: coarse)").matches : !1, P = ()=>{
113
+ let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : xt;
114
+ return u && (i === "left" || i === "right") ? Tt : i;
115
+ }(Y.position), v = gt() ? window.matchMedia("(pointer: coarse)").matches : !1, S = ()=>{
115
116
  l && T(!1);
116
117
  };
117
- c.useEffect(()=>(window.addEventListener("resize", P), ()=>{
118
- window.removeEventListener("resize", P);
118
+ c.useEffect(()=>(window.addEventListener("resize", S), ()=>{
119
+ window.removeEventListener("resize", S);
119
120
  }));
120
- const D = ()=>{
121
+ const y = ()=>{
121
122
  T(!1);
122
123
  }, m = ()=>{
123
124
  b.current && (e.current = b.current.getBoundingClientRect(), T(!l));
124
125
  }, N = ()=>{
125
126
  l || m();
126
127
  }, k = (i)=>{
127
- i.keyCode === Q && D();
128
- }, X = (i, A)=>typeof window > "u" ? {} : ({
128
+ i.keyCode === Q && y();
129
+ }, X = (i, A)=>wt() ? {} : ({
129
130
  right: {
130
131
  left: e.current.right + h,
131
132
  top: window.pageYOffset + e.current.top + e.current.height / 2
@@ -136,26 +137,26 @@ const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500
136
137
  },
137
138
  top: {
138
139
  top: window.pageYOffset + e.current.top - h,
139
- left: u ? w : window.pageXOffset + e.current.left + e.current.width / 2 - A / 2
140
+ left: u ? g : window.pageXOffset + e.current.left + e.current.width / 2 - A / 2
140
141
  },
141
142
  bottom: {
142
143
  top: window.pageYOffset + e.current.bottom + h,
143
- left: u ? w : window.pageXOffset + e.current.left + e.current.width / 2 - A / 2
144
+ left: u ? g : window.pageXOffset + e.current.left + e.current.width / 2 - A / 2
144
145
  }
145
146
  })[i], L = ()=>u ? {
146
- left: e.current.left + e.current.width / 2 - w
147
- } : {}, O = (()=>u ? window.innerWidth - w * 2 : At(Y.width))(), K = {
147
+ left: e.current.left + e.current.width / 2 - g
148
+ } : {}, D = (()=>u ? window.innerWidth - g * 2 : Pt(Y.width))(), K = {
148
149
  top: ut,
149
150
  bottom: ft,
150
151
  left: mt,
151
152
  right: dt
152
153
  }, W = pt({
153
- [n.enterTransform]: Yt(a),
154
- [n.exitTransform]: Pt(a),
155
- [n.enterActiveAnimationName]: Dt(a),
154
+ [n.enterTransform]: St(a),
155
+ [n.exitTransform]: Dt(a),
156
+ [n.enterActiveAnimationName]: Ot(a),
156
157
  [n.enterDoneTransform]: yt(a),
157
- [n.shadowAlpha]: Ot(M),
158
- [n.arrowBoxShadow]: St(a)
158
+ [n.shadowAlpha]: Rt(M),
159
+ [n.arrowBoxShadow]: $t(a)
159
160
  });
160
161
  return /* @__PURE__ */ p(z, {
161
162
  children: [
@@ -163,9 +164,9 @@ const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500
163
164
  ref: b,
164
165
  className: Z,
165
166
  onPointerOver: ()=>{
166
- r.current && (clearTimeout(r.current), r.current = null), !o.current && (o.current = !0, C ? f.current = setTimeout(()=>{
167
+ r.current && (clearTimeout(r.current), r.current = null), !o.current && (o.current = !0, B ? f.current = setTimeout(()=>{
167
168
  f.current = null, m();
168
- }, vt) : m());
169
+ }, Yt) : m());
169
170
  },
170
171
  onPointerLeave: v ? R : ()=>{
171
172
  if (f.current) {
@@ -181,19 +182,19 @@ const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500
181
182
  "touch-action": "auto",
182
183
  role: "button",
183
184
  tabIndex: 0,
184
- "aria-describedby": y,
185
+ "aria-describedby": P,
185
186
  "aria-expanded": l,
186
- "aria-label": B,
187
+ "aria-label": C,
187
188
  children: I
188
189
  }),
189
190
  /* @__PURE__ */ p(H, {
190
191
  children: [
191
192
  l && v && /* @__PURE__ */ s(J, {
192
- onPress: D
193
+ onPress: y
193
194
  }),
194
195
  /* @__PURE__ */ s(V, {
195
196
  in: l,
196
- timeout: bt,
197
+ timeout: At,
197
198
  classNames: {
198
199
  enter: _,
199
200
  enterActive: tt,
@@ -204,11 +205,11 @@ const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500
204
205
  unmountOnExit: !0,
205
206
  children: /* @__PURE__ */ p("div", _object_spread_props(_object_spread({}, ht(E, "Tooltip")), {
206
207
  role: "tooltip",
207
- id: y,
208
+ id: P,
208
209
  className: ot,
209
210
  style: _object_spread({
210
- width: O
211
- }, X(a, O), W),
211
+ width: D
212
+ }, X(a, D), W),
212
213
  onPointerOver: ()=>{
213
214
  r.current && (clearTimeout(r.current), r.current = null);
214
215
  },
@@ -225,16 +226,16 @@ const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500
225
226
  className: it
226
227
  })
227
228
  }),
228
- (x || g) && /* @__PURE__ */ p(U, {
229
+ (x || w) && /* @__PURE__ */ p(U, {
229
230
  space: 4,
230
231
  children: [
231
- x && /* @__PURE__ */ s(S, {
232
+ x && /* @__PURE__ */ s(O, {
232
233
  medium: !0,
233
234
  children: x
234
235
  }),
235
- g && /* @__PURE__ */ s(S, {
236
+ w && /* @__PURE__ */ s(O, {
236
237
  regular: !0,
237
- children: g
238
+ children: w
238
239
  })
239
240
  ]
240
241
  }),
@@ -246,5 +247,5 @@ const wt = "bottom", gt = "top", xt = 12, h = 4 + xt, w = 16, Tt = 340, bt = 500
246
247
  })
247
248
  ]
248
249
  });
249
- }, jt = Rt;
250
- export { jt as default };
250
+ }, Ht = It;
251
+ export { Ht as default };
@@ -50,9 +50,9 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { isServerSide as l } from "./environment.js";
53
+ import { isServerSide as i } from "./environment.js";
54
54
  const u = (e)=>{
55
- if (l()) return !1;
55
+ if (i()) return !1;
56
56
  const n = document.createElement("input");
57
57
  return n.setAttribute("type", e), n.type === e;
58
58
  }, v = (e)=>{
@@ -64,16 +64,16 @@ const u = (e)=>{
64
64
  currentTarget: e
65
65
  });
66
66
  };
67
- let i = !1;
67
+ let l = !1;
68
68
  try {
69
69
  const e = Object.defineProperty({}, "passive", {
70
70
  get () {
71
- i = !0;
71
+ l = !0;
72
72
  }
73
73
  });
74
74
  window.addEventListener("test", ()=>{}, e);
75
75
  } catch (e) {}
76
- const p = (e, n, t)=>e.addEventListener(n, t, i ? {
76
+ const p = (e, n, t)=>e.addEventListener(n, t, l ? {
77
77
  passive: !0
78
78
  } : !1), f = (e, n, t)=>e.removeEventListener(n, t, !1), m = (e, n)=>{
79
79
  const t = n ? {
@@ -89,13 +89,13 @@ const p = (e, n, t)=>e.addEventListener(n, t, i ? {
89
89
  "scroll",
90
90
  "overlay"
91
91
  ].includes(r);
92
- }, w = function(e) {
92
+ }, E = function(e) {
93
93
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Y";
94
94
  let t = e == null ? void 0 : e.parentElement;
95
95
  for(; t && !c(t, n);)t = t.parentElement;
96
96
  return t || document.documentElement;
97
- }, E = (e)=>e.scrollHeight - e.scrollTop - e.clientHeight, g = (e)=>e.scrollHeight > e.clientHeight, h = (e, n)=>{
98
- const t = ()=>typeof window > "u" ? Promise.resolve(null) : window.ResizeObserver ? Promise.resolve(ResizeObserver) : import(/* webpackChunkName: "@juggle/resize-observer" */ "@juggle/resize-observer").then((o)=>o.ResizeObserver);
97
+ }, g = (e)=>e.scrollHeight - e.scrollTop - e.clientHeight, h = (e)=>e.scrollHeight > e.clientHeight, w = (e, n)=>{
98
+ const t = ()=>i() ? Promise.resolve(null) : window.ResizeObserver ? Promise.resolve(ResizeObserver) : import(/* webpackChunkName: "@juggle/resize-observer" */ "@juggle/resize-observer").then((o)=>o.ResizeObserver);
99
99
  let r = !1, s = null;
100
100
  return t().then((o)=>{
101
101
  !r && o && (s = new o(n), s.observe(e));
@@ -103,4 +103,4 @@ const p = (e, n, t)=>e.addEventListener(n, t, i ? {
103
103
  r = !0, s && s.disconnect();
104
104
  };
105
105
  };
106
- export { p as addPassiveEventListener, v as cancelEvent, d as createChangeEvent, m as getPrefixedDataAttributes, E as getScrollDistanceToBottom, w as getScrollableParentElement, g as hasScroll, u as isInputTypeSupported, h as listenResize, f as removePassiveEventListener };
106
+ export { p as addPassiveEventListener, v as cancelEvent, d as createChangeEvent, m as getPrefixedDataAttributes, g as getScrollDistanceToBottom, E as getScrollableParentElement, h as hasScroll, u as isInputTypeSupported, w as listenResize, f as removePassiveEventListener };
@@ -1,2 +1,2 @@
1
- const e = ()=>typeof window > "u";
2
- export { e as isServerSide };
1
+ const e = ()=>typeof window > "u", i = ()=>!e();
2
+ export { i as isClientSide, e as isServerSide };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "14.12.0",
3
+ "version": "14.14.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
7
- get: function() {
8
- return s;
9
- }
10
- });
11
- const s = "";
@@ -1,2 +0,0 @@
1
- const s = "";
2
- export { s as default };