@telefonica/mistica 14.19.0 → 14.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/button.js +17 -17
  3. package/dist/card.css-mistica.js +6 -6
  4. package/dist/card.css.d.ts +0 -1
  5. package/dist/card.d.ts +15 -4
  6. package/dist/card.js +298 -264
  7. package/dist/community/advanced-data-card.css-mistica.js +18 -21
  8. package/dist/community/advanced-data-card.css.d.ts +2 -3
  9. package/dist/community/advanced-data-card.js +171 -158
  10. package/dist/generated/mistica-icons/icon-subtract-circle-filled.d.ts +4 -0
  11. package/dist/generated/mistica-icons/icon-subtract-circle-filled.js +110 -0
  12. package/dist/generated/mistica-icons/icon-subtract-circle-light.d.ts +4 -0
  13. package/dist/generated/mistica-icons/icon-subtract-circle-light.js +116 -0
  14. package/dist/generated/mistica-icons/icon-subtract-circle-regular.d.ts +4 -0
  15. package/dist/generated/mistica-icons/icon-subtract-circle-regular.js +116 -0
  16. package/dist/generated/mistica-icons/icon-subtract-light.d.ts +4 -0
  17. package/dist/generated/mistica-icons/icon-subtract-light.js +110 -0
  18. package/dist/generated/mistica-icons/icon-subtract-regular.d.ts +4 -0
  19. package/dist/generated/mistica-icons/icon-subtract-regular.js +110 -0
  20. package/dist/header.js +27 -29
  21. package/dist/index.d.ts +9 -1
  22. package/dist/index.js +50 -0
  23. package/dist/list.css-mistica.js +17 -14
  24. package/dist/list.css.d.ts +2 -1
  25. package/dist/list.js +170 -163
  26. package/dist/package-version.js +1 -1
  27. package/dist/skins/blau.js +14 -0
  28. package/dist/skins/defaults.js +14 -0
  29. package/dist/skins/movistar-legacy.js +14 -0
  30. package/dist/skins/movistar.js +14 -0
  31. package/dist/skins/o2.js +14 -0
  32. package/dist/skins/telefonica.js +16 -2
  33. package/dist/skins/types/index.d.ts +12 -0
  34. package/dist/skins/vivo-new.js +15 -1
  35. package/dist/skins/vivo.js +14 -0
  36. package/dist/tabs.css-mistica.js +10 -14
  37. package/dist/tabs.css.d.ts +1 -2
  38. package/dist/tabs.js +39 -33
  39. package/dist/theme-context-provider.js +29 -27
  40. package/dist/title.d.ts +1 -0
  41. package/dist/title.js +91 -29
  42. package/dist-es/button.js +17 -17
  43. package/dist-es/card.css-mistica.js +3 -3
  44. package/dist-es/card.js +409 -378
  45. package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
  46. package/dist-es/community/advanced-data-card.js +195 -182
  47. package/dist-es/generated/mistica-icons/icon-subtract-circle-filled.js +101 -0
  48. package/dist-es/generated/mistica-icons/icon-subtract-circle-light.js +107 -0
  49. package/dist-es/generated/mistica-icons/icon-subtract-circle-regular.js +107 -0
  50. package/dist-es/generated/mistica-icons/icon-subtract-light.js +101 -0
  51. package/dist-es/generated/mistica-icons/icon-subtract-regular.js +101 -0
  52. package/dist-es/header.js +46 -48
  53. package/dist-es/index.js +1755 -1747
  54. package/dist-es/list.css-mistica.js +2 -2
  55. package/dist-es/list.js +242 -235
  56. package/dist-es/package-version.js +1 -1
  57. package/dist-es/skins/blau.js +14 -0
  58. package/dist-es/skins/defaults.js +14 -0
  59. package/dist-es/skins/movistar-legacy.js +14 -0
  60. package/dist-es/skins/movistar.js +14 -0
  61. package/dist-es/skins/o2.js +14 -0
  62. package/dist-es/skins/telefonica.js +16 -2
  63. package/dist-es/skins/vivo-new.js +15 -1
  64. package/dist-es/skins/vivo.js +14 -0
  65. package/dist-es/style.css +1 -1
  66. package/dist-es/tabs.css-mistica.js +8 -9
  67. package/dist-es/tabs.js +49 -43
  68. package/dist-es/theme-context-provider.js +63 -61
  69. package/dist-es/title.js +58 -38
  70. package/package.json +5 -2
package/dist-es/tabs.js CHANGED
@@ -50,95 +50,101 @@ function _object_spread_props(target, source) {
50
50
  }
51
51
  return target;
52
52
  }
53
- import { jsx as s, jsxs as g } from "react/jsx-runtime";
53
+ import { jsx as t, jsxs as g } from "react/jsx-runtime";
54
54
  import * as m from "react";
55
55
  import S from "classnames";
56
56
  import { BaseTouchable as $ } from "./touchable.js";
57
57
  import v from "./responsive-layout.js";
58
- import { useTheme as R, useAriaId as w, useElementDimensions as x } from "./hooks.js";
59
- import { Text as k } from "./text.js";
58
+ import { useTheme as R, useAriaId as w, useElementDimensions as k } from "./hooks.js";
59
+ import { Text as x } from "./text.js";
60
60
  import { isRunningAcceptanceTest as I } from "./utils/platform.js";
61
61
  import { getPrefixedDataAttributes as z } from "./utils/dom.js";
62
- import { outerBorder as H, outer as P, inner as W, tabsContainer as B, tabVariants as D, tabSelectionVariants as f, tabWithIcon as V, icon as _, animatedLine as j } from "./tabs.css-mistica.js";
62
+ import { outerBorder as H, outer as P, inner as W, tabsContainer as B, tabVariants as D, tabSelectionVariants as f, icon as V, animatedLine as _ } from "./tabs.css-mistica.js";
63
+ import j from "./inline.js";
63
64
  const d = I() ? 0 : 300, q = (i)=>{
64
65
  switch(i){
66
+ case 1:
65
67
  case 2:
66
- return "tabs2";
67
68
  case 3:
68
- return "tabs3";
69
+ return "fullWidth";
69
70
  default:
70
71
  return "default";
71
72
  }
72
73
  }, C = (param)=>{
73
- let { selectedIndex: i , onChange: y , tabs: b , dataAttributes: T } = param;
74
- const { textPresets: r } = R(), n = w(), { ref: A } = x(), u = m.useRef(null), h = m.useRef(null), [p, L] = m.useState(!1), N = (l, c)=>{
75
- const t = document.querySelector(`[id='${n}'] [data-tabindex="${l}"]`), o = document.querySelector(`[id='${n}'] [data-tabindex="${c}"]`), e = u.current, a = h.current;
76
- t && o && e && a && (L(!0), e.style.display = "block", e.style.width = `${t.offsetWidth}px`, e.style.transform = `translate(${t.offsetLeft - a.scrollLeft}px, 0)`, Promise.resolve().then(()=>{
77
- e.style.width = `${o.offsetWidth}px`, e.style.transform = `translate(${o.offsetLeft - a.scrollLeft}px, 0)`, e.style.transition = `transform ${d}ms, width ${d}ms`;
74
+ let { selectedIndex: i , onChange: y , tabs: u , dataAttributes: T } = param;
75
+ const { textPresets: r } = R(), l = w(), { ref: A } = k(), b = m.useRef(null), h = m.useRef(null), [p, L] = m.useState(!1), N = (o, c)=>{
76
+ const s = document.querySelector(`[id='${l}'] [data-tabindex="${o}"]`), n = document.querySelector(`[id='${l}'] [data-tabindex="${c}"]`), e = b.current, a = h.current;
77
+ s && n && e && a && (L(!0), e.style.display = "block", e.style.width = `${s.offsetWidth}px`, e.style.transform = `translate(${s.offsetLeft - a.scrollLeft}px, 0)`, Promise.resolve().then(()=>{
78
+ e.style.transition = `transform ${d}ms, width ${d}ms`, e.style.width = `${n.offsetWidth}px`, e.style.transform = `translate(${n.offsetLeft - a.scrollLeft}px, 0)`;
78
79
  }), setTimeout(()=>{
79
80
  e.style.transition = "", e.style.display = "none", L(!1);
80
81
  }, d));
81
82
  };
82
- return /* @__PURE__ */ s("div", _object_spread_props(_object_spread({
83
- id: n,
83
+ return /* @__PURE__ */ t("div", _object_spread_props(_object_spread({
84
+ id: l,
84
85
  role: "tablist",
85
86
  ref: A,
86
87
  className: H
87
88
  }, z(T, "Tabs")), {
88
- children: /* @__PURE__ */ s(v, {
89
+ children: /* @__PURE__ */ t(v, {
89
90
  fullWidth: !0,
90
91
  children: /* @__PURE__ */ g("div", {
91
92
  className: P,
92
93
  children: [
93
- /* @__PURE__ */ s("div", {
94
+ /* @__PURE__ */ t("div", {
94
95
  ref: h,
95
96
  className: W,
96
- children: /* @__PURE__ */ s("div", {
97
+ children: /* @__PURE__ */ t("div", {
97
98
  className: B,
98
- children: b.map((param, e)=>{
99
- let { text: l , trackingEvent: c , icon: t , "aria-controls": o } = param;
99
+ children: u.map((param, e)=>{
100
+ let { text: o , trackingEvent: c , icon: s , "aria-controls": n } = param;
100
101
  const a = e === i;
101
- return /* @__PURE__ */ g($, {
102
+ return /* @__PURE__ */ t($, {
102
103
  dataAttributes: {
103
104
  "component-name": "Tab",
104
105
  tabindex: e
105
106
  },
106
- className: S(D[q(b.length)], a ? p ? f.selectedAnimating : f.selected : f.noSelected, t && V),
107
+ className: S(D[q(u.length)], a ? p ? f.selectedAnimating : f.selected : f.noSelected),
107
108
  onPress: ()=>{
108
109
  !p && i !== e && (y(e), N(i, e));
109
110
  },
110
111
  trackingEvent: c,
111
112
  role: "tab",
112
- "aria-controls": o,
113
+ "aria-controls": n,
113
114
  "aria-selected": a ? "true" : "false",
114
- children: [
115
- t && /* @__PURE__ */ s("div", {
116
- className: _,
117
- children: t
118
- }),
119
- /* @__PURE__ */ s(k, {
120
- desktopSize: r.tabsLabel.size.desktop,
121
- mobileSize: r.tabsLabel.size.mobile,
122
- desktopLineHeight: r.tabsLabel.lineHeight.desktop,
123
- mobileLineHeight: r.tabsLabel.lineHeight.mobile,
124
- weight: r.tabsLabel.weight,
125
- color: "inherit",
126
- wordBreak: !1,
127
- textAlign: "center",
128
- children: l
129
- })
130
- ]
115
+ children: /* @__PURE__ */ g(j, {
116
+ space: s && o ? 8 : 0,
117
+ alignItems: "center",
118
+ children: [
119
+ s && /* @__PURE__ */ t("div", {
120
+ className: V,
121
+ children: s
122
+ }),
123
+ /* @__PURE__ */ t(x, {
124
+ desktopSize: r.tabsLabel.size.desktop,
125
+ mobileSize: r.tabsLabel.size.mobile,
126
+ desktopLineHeight: r.tabsLabel.lineHeight.desktop,
127
+ mobileLineHeight: r.tabsLabel.lineHeight.mobile,
128
+ weight: r.tabsLabel.weight,
129
+ color: "inherit",
130
+ wordBreak: !1,
131
+ textAlign: "center",
132
+ hyphens: "auto",
133
+ children: o
134
+ })
135
+ ]
136
+ })
131
137
  }, e);
132
138
  })
133
139
  })
134
140
  }),
135
- /* @__PURE__ */ s("div", {
136
- ref: u,
137
- className: j
141
+ /* @__PURE__ */ t("div", {
142
+ ref: b,
143
+ className: _
138
144
  })
139
145
  ]
140
146
  })
141
147
  })
142
148
  }));
143
- }, X = C;
144
- export { X as default };
149
+ }, Y = C;
150
+ export { Y as default };
@@ -26,113 +26,115 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
- import { jsx as r, jsxs as y, Fragment as A } from "react/jsx-runtime";
29
+ import { jsx as r, jsxs as N, Fragment as O } from "react/jsx-runtime";
30
30
  import * as a from "react";
31
- import { assignInlineVars as N } from "@vanilla-extract/dynamic";
32
- import O from "./dialog.js";
33
- import w from "./screen-size-context-provider.js";
34
- import F from "./aria-id-getter-context.js";
35
- import { getTexts as $, dimensions as V, getMisticaLinkComponent as j, NAVBAR_HEIGHT_MOBILE as _ } from "./theme.js";
36
- import { getPlatform as I, isInsideNovumNativeApp as h } from "./utils/platform.js";
37
- import B from "./theme-context.js";
38
- import { useIsomorphicLayoutEffect as z } from "./hooks.js";
39
- import G from "./tab-focus.js";
40
- import q from "./modal-context-provider.js";
41
- import { DocumentVisibilityProvider as W } from "./utils/document-visibility.js";
42
- import { AspectRatioSupportProvider as J } from "./utils/aspect-ratio-support.js";
43
- import { TrackingConfig as K } from "./utils/analytics.js";
44
- import { vars as Q } from "./skins/skin-contract.css-mistica.js";
45
- import { fromHexToRgb as U } from "./utils/color.js";
46
- import { defaultTextPresetsConfig as e, defaultBorderRadiiConfig as X } from "./skins/defaults.js";
47
- const Y = "(prefers-color-scheme: dark)", Z = ()=>{
31
+ import { assignInlineVars as w } from "@vanilla-extract/dynamic";
32
+ import B from "./dialog.js";
33
+ import F from "./screen-size-context-provider.js";
34
+ import $ from "./aria-id-getter-context.js";
35
+ import { getTexts as V, dimensions as j, getMisticaLinkComponent as _, NAVBAR_HEIGHT_MOBILE as z } from "./theme.js";
36
+ import { getPlatform as L, isInsideNovumNativeApp as G } from "./utils/platform.js";
37
+ import h from "./theme-context.js";
38
+ import { useIsomorphicLayoutEffect as q } from "./hooks.js";
39
+ import W from "./tab-focus.js";
40
+ import J from "./modal-context-provider.js";
41
+ import { DocumentVisibilityProvider as K } from "./utils/document-visibility.js";
42
+ import { AspectRatioSupportProvider as Q } from "./utils/aspect-ratio-support.js";
43
+ import { TrackingConfig as U } from "./utils/analytics.js";
44
+ import { vars as X } from "./skins/skin-contract.css-mistica.js";
45
+ import { fromHexToRgb as Y } from "./utils/color.js";
46
+ import { defaultTextPresetsConfig as e, defaultBorderRadiiConfig as Z } from "./skins/defaults.js";
47
+ const tt = "(prefers-color-scheme: dark)", et = ()=>{
48
48
  const [t, c] = a.useState(!1);
49
- return z(()=>{
49
+ return q(()=>{
50
50
  if (!window.matchMedia) return;
51
- const o = window.matchMedia(Y), s = ()=>{
51
+ const o = window.matchMedia(tt), i = ()=>{
52
52
  c(o.matches);
53
53
  };
54
- return o.addListener(s), s(), ()=>o.removeListener(s);
54
+ return o.addListener(i), i(), ()=>o.removeListener(i);
55
55
  }, []), t;
56
- }, tt = ()=>(t)=>t, et = (t)=>({
57
- headerMobileHeight: (t == null ? void 0 : t.headerMobileHeight) === "mistica" ? _ : t == null ? void 0 : t.headerMobileHeight
58
- }), rt = (param)=>{
56
+ }, rt = ()=>(t)=>t, ot = (t)=>({
57
+ headerMobileHeight: (t == null ? void 0 : t.headerMobileHeight) === "mistica" ? z : t == null ? void 0 : t.headerMobileHeight
58
+ }), it = (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), E = a.useCallback(()=>`aria-id-hook-${s.current++}`, []), L = Z(), k = (_t_colorScheme = t.colorScheme) !== null && _t_colorScheme !== void 0 ? _t_colorScheme : "auto", R = t.skin.colors, H = _object_spread({}, t.skin.colors, t.skin.darkModeColors), u = k === "auto" && L || k === "dark", m = u ? H : R, p = a.useMemo(()=>{
62
- var i, n, d, x, f, v, P, g, M, C, T, D;
61
+ const i = a.useRef(1), R = a.useCallback(()=>`aria-id-hook-${i.current++}`, []), H = et(), u = (_t_colorScheme = t.colorScheme) !== null && _t_colorScheme !== void 0 ? _t_colorScheme : "auto", S = t.skin.colors, y = _object_spread({}, t.skin.colors, t.skin.darkModeColors), k = u === "auto" && H || u === "dark", m = k ? y : S, p = a.useMemo(()=>{
62
+ var s, n, d, x, f, b, P, g, M, C, T, D, I, E;
63
63
  const l = _object_spread({
64
- platform: I(),
65
- insideNovumNativeApp: h()
64
+ platform: L(),
65
+ insideNovumNativeApp: G()
66
66
  }, t.platformOverrides);
67
67
  var _t_useHrefDecorator;
68
68
  return {
69
69
  skinName: t.skin.name,
70
70
  i18n: t.i18n,
71
71
  platformOverrides: l,
72
- texts: _object_spread({}, $(t.i18n.locale), t.texts),
72
+ texts: _object_spread({}, V(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({}, V, et(t.dimensions)),
77
+ dimensions: _object_spread({}, j, ot(t.dimensions)),
78
78
  textPresets: {
79
- text5: _object_spread({}, e.text5, (i = t.skin.textPresets) == null ? void 0 : i.text5),
79
+ text5: _object_spread({}, e.text5, (s = t.skin.textPresets) == null ? void 0 : s.text5),
80
80
  text6: _object_spread({}, e.text6, (n = t.skin.textPresets) == null ? void 0 : n.text6),
81
81
  text7: _object_spread({}, e.text7, (d = t.skin.textPresets) == null ? void 0 : d.text7),
82
82
  text8: _object_spread({}, e.text8, (x = t.skin.textPresets) == null ? void 0 : x.text8),
83
83
  text9: _object_spread({}, e.text9, (f = t.skin.textPresets) == null ? void 0 : f.text9),
84
- text10: _object_spread({}, e.text10, (v = t.skin.textPresets) == null ? void 0 : v.text10),
84
+ text10: _object_spread({}, e.text10, (b = t.skin.textPresets) == null ? void 0 : b.text10),
85
85
  cardTitle: _object_spread({}, e.cardTitle, (P = t.skin.textPresets) == null ? void 0 : P.cardTitle),
86
86
  button: _object_spread({}, e.button, (g = t.skin.textPresets) == null ? void 0 : g.button),
87
87
  link: _object_spread({}, e.link, (M = t.skin.textPresets) == null ? void 0 : M.link),
88
88
  title1: _object_spread({}, e.title1, (C = t.skin.textPresets) == null ? void 0 : C.title1),
89
- indicator: _object_spread({}, e.indicator, (T = t.skin.textPresets) == null ? void 0 : T.indicator),
90
- tabsLabel: _object_spread({}, e.tabsLabel, (D = t.skin.textPresets) == null ? void 0 : D.tabsLabel)
89
+ title2: _object_spread({}, e.title2, (T = t.skin.textPresets) == null ? void 0 : T.title2),
90
+ navigationBar: _object_spread({}, e.navigationBar, (D = t.skin.textPresets) == null ? void 0 : D.navigationBar),
91
+ indicator: _object_spread({}, e.indicator, (I = t.skin.textPresets) == null ? void 0 : I.indicator),
92
+ tabsLabel: _object_spread({}, e.tabsLabel, (E = t.skin.textPresets) == null ? void 0 : E.tabsLabel)
91
93
  },
92
- Link: j(t.Link),
93
- isDarkMode: u,
94
- isIos: I(l) === "ios",
95
- useHrefDecorator: (_t_useHrefDecorator = t.useHrefDecorator) !== null && _t_useHrefDecorator !== void 0 ? _t_useHrefDecorator : tt,
94
+ Link: _(t.Link),
95
+ isDarkMode: k,
96
+ isIos: L(l) === "ios",
97
+ useHrefDecorator: (_t_useHrefDecorator = t.useHrefDecorator) !== null && _t_useHrefDecorator !== void 0 ? _t_useHrefDecorator : rt,
96
98
  useId: t.useId
97
99
  };
98
100
  }, [
99
101
  t,
100
- u
101
- ]), S = Object.fromEntries(Object.entries(m).map((param)=>{
102
- let [l, i] = param;
102
+ k
103
+ ]), A = Object.fromEntries(Object.entries(m).map((param)=>{
104
+ let [l, s] = param;
103
105
  let n = "";
104
- if (i.startsWith("#")) {
105
- const [d, x, f] = U(i);
106
+ if (s.startsWith("#")) {
107
+ const [d, x, f] = Y(s);
106
108
  n = `${d}, ${x}, ${f}`;
107
109
  }
108
110
  return [
109
111
  l,
110
112
  n
111
113
  ];
112
- })), b = N(Q, {
114
+ })), v = w(X, {
113
115
  colors: m,
114
- rawColors: S,
115
- borderRadii: (_t_skin_borderRadii = t.skin.borderRadii) !== null && _t_skin_borderRadii !== void 0 ? _t_skin_borderRadii : X
116
+ rawColors: A,
117
+ borderRadii: (_t_skin_borderRadii = t.skin.borderRadii) !== null && _t_skin_borderRadii !== void 0 ? _t_skin_borderRadii : Z
116
118
  });
117
- return /* @__PURE__ */ r(G, {
119
+ return /* @__PURE__ */ r(W, {
118
120
  disabled: !t.enableTabFocus,
119
- children: /* @__PURE__ */ r(q, {
120
- children: /* @__PURE__ */ r(B.Provider, {
121
+ children: /* @__PURE__ */ r(J, {
122
+ children: /* @__PURE__ */ r(h.Provider, {
121
123
  value: p,
122
- children: /* @__PURE__ */ r(K, {
124
+ children: /* @__PURE__ */ r(U, {
123
125
  eventFormat: p.analytics.eventFormat,
124
- children: /* @__PURE__ */ r(J, {
125
- children: /* @__PURE__ */ r(W, {
126
- children: /* @__PURE__ */ r(F.Provider, {
127
- value: E,
128
- children: /* @__PURE__ */ r(w, {
129
- children: /* @__PURE__ */ r(O, {
126
+ children: /* @__PURE__ */ r(Q, {
127
+ children: /* @__PURE__ */ r(K, {
128
+ children: /* @__PURE__ */ r($.Provider, {
129
+ value: R,
130
+ children: /* @__PURE__ */ r(F, {
131
+ children: /* @__PURE__ */ r(B, {
130
132
  children: o ? /*#__PURE__*/ a.createElement(o, {
131
- style: b
132
- }, c) : /* @__PURE__ */ y(A, {
133
+ style: v
134
+ }, c) : /* @__PURE__ */ N(O, {
133
135
  children: [
134
136
  (process.env.NODE_ENV !== "test" || process.env.SSR_TEST) && /* @__PURE__ */ r("style", {
135
- children: `:root {${b}}`
137
+ children: `:root {${v}}`
136
138
  }),
137
139
  c
138
140
  ]
@@ -146,5 +148,5 @@ const Y = "(prefers-color-scheme: dark)", Z = ()=>{
146
148
  })
147
149
  })
148
150
  });
149
- }, gt = rt;
150
- export { gt as default, Z as useIsOsDarkModeEnabled };
151
+ }, Ct = it;
152
+ export { Ct as default, et as useIsOsDarkModeEnabled };
package/dist-es/title.js CHANGED
@@ -26,59 +26,79 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
- import { jsx as r, jsxs as l } from "react/jsx-runtime";
30
- import { Text1 as c, Text5 as p, Text2 as f } from "./text.js";
29
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
30
+ import c, { Text1 as p, Text6 as h, Text2 as d } from "./text.js";
31
31
  import x from "./inline.js";
32
- import d from "./box.js";
33
- import { vars as h } from "./skins/skin-contract.css-mistica.js";
34
- import { useTheme as s } from "./hooks.js";
32
+ import T from "./box.js";
33
+ import { vars as g } from "./skins/skin-contract.css-mistica.js";
34
+ import { useTheme as l } from "./hooks.js";
35
35
  const m = (param)=>{
36
- let { title: t , right: e } = param;
37
- const { textPresets: o } = s();
38
- return e ? /* @__PURE__ */ l(x, {
36
+ let { title: e , right: t , dataAttributes: o } = param;
37
+ const { textPresets: r } = l();
38
+ return t ? /* @__PURE__ */ a(x, {
39
39
  space: "between",
40
40
  alignItems: "baseline",
41
+ dataAttributes: o,
41
42
  children: [
42
- t,
43
- /* @__PURE__ */ r(d, {
43
+ e,
44
+ /* @__PURE__ */ i(T, {
44
45
  paddingLeft: 16,
45
- children: /* @__PURE__ */ r(f, {
46
- weight: o.link.weight,
47
- children: e
46
+ children: /* @__PURE__ */ i(d, {
47
+ weight: r.link.weight,
48
+ children: t
48
49
  })
49
50
  })
50
51
  ]
51
- }) : t;
52
- }, k = (param)=>{
53
- let { children: t , as: e = "h3" , id: o , right: i , dataAttributes: n } = param;
54
- const { textPresets: a } = s();
55
- return /* @__PURE__ */ r(m, {
56
- title: /* @__PURE__ */ r(c, {
57
- color: h.colors.textSecondary,
52
+ }) : e;
53
+ }, H = (param)=>{
54
+ let { children: e , as: t = "h3" , id: o , right: r , dataAttributes: s } = param;
55
+ const { textPresets: n } = l();
56
+ return /* @__PURE__ */ i(m, {
57
+ title: /* @__PURE__ */ i(p, {
58
+ color: g.colors.textSecondary,
58
59
  transform: "uppercase",
59
- weight: a.title1.weight,
60
- as: e,
60
+ weight: n.title1.weight,
61
+ as: t,
61
62
  id: o,
62
- dataAttributes: _object_spread({
63
- "component-name": "Title1"
64
- }, n),
65
63
  wordBreak: !1,
66
- children: t
64
+ children: e
67
65
  }),
68
- right: i
66
+ right: r,
67
+ dataAttributes: _object_spread({
68
+ "component-name": "Title1"
69
+ }, s)
69
70
  });
70
- }, y = (param)=>/* @__PURE__ */ {
71
- let { children: t , as: e = "h3" , id: o , right: i , dataAttributes: n } = param;
72
- return r(m, {
73
- title: /* @__PURE__ */ r(p, {
74
- as: e,
71
+ }, L = (param)=>{
72
+ let { children: e , as: t = "h3" , id: o , right: r , dataAttributes: s } = param;
73
+ const { textPresets: n } = l();
74
+ return /* @__PURE__ */ i(m, {
75
+ title: /* @__PURE__ */ i(c, {
76
+ as: t,
75
77
  id: o,
76
- dataAttributes: _object_spread({
77
- "component-name": "Title2"
78
- }, n),
79
- children: t
78
+ mobileSize: n.title2.size.mobile,
79
+ desktopSize: n.title2.size.desktop,
80
+ weight: n.title2.weight,
81
+ mobileLineHeight: n.title2.lineHeight.mobile,
82
+ desktopLineHeight: n.title2.lineHeight.desktop,
83
+ children: e
80
84
  }),
81
- right: i
85
+ right: r,
86
+ dataAttributes: _object_spread({
87
+ "component-name": "Title2"
88
+ }, s)
89
+ });
90
+ }, A = (param)=>/* @__PURE__ */ {
91
+ let { children: e , as: t = "h3" , id: o , right: r , dataAttributes: s } = param;
92
+ return i(m, {
93
+ title: /* @__PURE__ */ i(h, {
94
+ as: t,
95
+ id: o,
96
+ children: e
97
+ }),
98
+ right: r,
99
+ dataAttributes: _object_spread({
100
+ "component-name": "Title3"
101
+ }, s)
82
102
  });
83
103
  };
84
- export { k as Title1, y as Title2 };
104
+ export { H as Title1, L as Title2, A as Title3 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/mistica",
3
- "version": "14.19.0",
3
+ "version": "14.20.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -200,5 +200,8 @@
200
200
  "@types/react-dom": "^18.0.10",
201
201
  "@testing-library/dom": "^8.19.1"
202
202
  },
203
- "packageManager": "yarn@3.6.1"
203
+ "packageManager": "yarn@3.6.1",
204
+ "engines": {
205
+ "node": "^18.0.0"
206
+ }
204
207
  }