@telefonica/mistica 14.15.0 → 14.16.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 (88) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/card.d.ts +3 -3
  3. package/dist/card.js +86 -90
  4. package/dist/checkbox.css-mistica.js +4 -4
  5. package/dist/checkbox.js +10 -9
  6. package/dist/credit-card-number-field.js +22 -19
  7. package/dist/cvv-field.js +60 -47
  8. package/dist/date-time-picker.d.ts +10 -0
  9. package/dist/date-time-picker.js +54 -35
  10. package/dist/hooks.d.ts +1 -1
  11. package/dist/icons/icon-cvv-amex.d.ts +1 -0
  12. package/dist/icons/icon-cvv-amex.js +5 -4
  13. package/dist/icons/icon-cvv-visa-mc.d.ts +1 -0
  14. package/dist/icons/icon-cvv-visa-mc.js +7 -6
  15. package/dist/index.d.ts +1 -0
  16. package/dist/list.css-mistica.js +1 -1
  17. package/dist/list.js +90 -91
  18. package/dist/package-version.js +1 -1
  19. package/dist/radio-button.css-mistica.js +12 -12
  20. package/dist/radio-button.js +34 -33
  21. package/dist/search-field.js +8 -8
  22. package/dist/select.css-mistica.js +6 -6
  23. package/dist/select.js +145 -142
  24. package/dist/skins/blau.js +10 -0
  25. package/dist/skins/defaults.js +10 -0
  26. package/dist/skins/movistar-legacy.js +10 -0
  27. package/dist/skins/movistar.js +10 -0
  28. package/dist/skins/o2.js +10 -0
  29. package/dist/skins/telefonica.js +12 -2
  30. package/dist/skins/types/index.d.ts +10 -0
  31. package/dist/skins/vivo-new.js +10 -0
  32. package/dist/skins/vivo.js +10 -0
  33. package/dist/switch-component.css-mistica.js +9 -9
  34. package/dist/switch-component.js +16 -15
  35. package/dist/tabs.js +32 -28
  36. package/dist/text-field-base.js +44 -44
  37. package/dist/theme-context-provider.js +25 -24
  38. package/dist/theme.d.ts +5 -2
  39. package/dist/theme.js +73 -24
  40. package/dist/video.d.ts +7 -1
  41. package/dist/video.js +116 -76
  42. package/dist-es/card.js +115 -119
  43. package/dist-es/checkbox.css-mistica.js +4 -4
  44. package/dist-es/checkbox.js +21 -20
  45. package/dist-es/credit-card-number-field.js +23 -20
  46. package/dist-es/cvv-field.js +74 -61
  47. package/dist-es/date-time-picker.js +66 -47
  48. package/dist-es/icons/icon-cvv-amex.js +5 -4
  49. package/dist-es/icons/icon-cvv-visa-mc.js +9 -8
  50. package/dist-es/list.css-mistica.js +1 -1
  51. package/dist-es/list.js +114 -115
  52. package/dist-es/package-version.js +1 -1
  53. package/dist-es/radio-button.css-mistica.js +6 -6
  54. package/dist-es/radio-button.js +38 -37
  55. package/dist-es/search-field.js +7 -7
  56. package/dist-es/select.css-mistica.js +5 -5
  57. package/dist-es/select.js +173 -170
  58. package/dist-es/skins/blau.js +10 -0
  59. package/dist-es/skins/defaults.js +10 -0
  60. package/dist-es/skins/movistar-legacy.js +10 -0
  61. package/dist-es/skins/movistar.js +10 -0
  62. package/dist-es/skins/o2.js +10 -0
  63. package/dist-es/skins/telefonica.js +12 -2
  64. package/dist-es/skins/vivo-new.js +10 -0
  65. package/dist-es/skins/vivo.js +10 -0
  66. package/dist-es/style.css +1 -1
  67. package/dist-es/switch-component.css-mistica.js +7 -7
  68. package/dist-es/switch-component.js +37 -36
  69. package/dist-es/tabs.js +49 -45
  70. package/dist-es/text-field-base.js +64 -64
  71. package/dist-es/theme-context-provider.js +56 -55
  72. package/dist-es/theme.js +69 -20
  73. package/dist-es/video.js +121 -81
  74. package/package.json +2 -2
  75. package/dist/cvv-field.css-mistica.js +0 -21
  76. package/dist/cvv-field.css.d.ts +0 -2
  77. package/dist/cvv-field.css.ts.vanilla.css-mistica.js +0 -11
  78. package/dist/icons/icon-creditcard.d.ts +0 -7
  79. package/dist/icons/icon-creditcard.js +0 -33
  80. package/dist/icons/icon-info-cvv.d.ts +0 -7
  81. package/dist/icons/icon-info-cvv.js +0 -26
  82. package/dist/icons/icon-search.d.ts +0 -7
  83. package/dist/icons/icon-search.js +0 -32
  84. package/dist-es/cvv-field.css-mistica.js +0 -4
  85. package/dist-es/cvv-field.css.ts.vanilla.css-mistica.js +0 -2
  86. package/dist-es/icons/icon-creditcard.js +0 -24
  87. package/dist-es/icons/icon-info-cvv.js +0 -17
  88. package/dist-es/icons/icon-search.js +0 -23
@@ -81,16 +81,16 @@ import { jsxs as te, jsx as i } from "react/jsx-runtime";
81
81
  import * as s from "react";
82
82
  import { FieldContainer as ie, HelperText as ne, Label as re } from "./text-field-components.js";
83
83
  import { LABEL_LEFT_POSITION as R, LABEL_SCALE_MOBILE as se, LABEL_SCALE_DESKTOP as le } from "./text-field-components.css-mistica.js";
84
- import { Text3 as O } from "./text.js";
85
- import { isSafari as oe, isIos as ae, isRunningAcceptanceTest as B, isFirefox as de } from "./utils/platform.js";
86
- import { useAriaId as W, useScreenSize as ce, useTheme as j, useIsomorphicLayoutEffect as fe } from "./hooks.js";
87
- import T from "classnames";
88
- import { combineRefs as z } from "./utils/common.js";
89
- import { startIcon as he, prefix as me, prefixWithLabel as ge, prefixWithoutLabel as ue, fullWidth as pe, textArea as Se, textAreaWithLabel as be, textAreaWithoutLabel as ye, input as xe, inputWithLabel as Le, inputWithoutLabel as Ce, inputFirefoxStyles as Te, endIcon as Ae, menuItem as Ee, menuItemSelected as Re, suggestionsContainer as Ie } from "./text-field-base.css-mistica.js";
90
- import { sprinkles as Oe } from "./sprinkles.css-mistica.js";
91
- import { vars as We } from "./skins/skin-contract.css-mistica.js";
92
- const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
93
- var { error: c , helperText: A , label: n , inputProps: g , inputRef: y , defaultValue: o , value: t , onFocus: u , onBlur: p , inputComponent: h , prefix: m , startIcon: e , endIcon: a , endIconOverlay: x , shrinkLabel: D , multiline: L = !1 , focus: C , fieldRef: H , maxLength: S , id: K , autoComplete: M , fullWidth: G } = _param, r = _object_without_properties(_param, [
84
+ import { Text3 as I } from "./text.js";
85
+ import { isSafari as oe, isRunningAcceptanceTest as q, isFirefox as ae } from "./utils/platform.js";
86
+ import { useAriaId as O, useScreenSize as de, useTheme as B, useIsomorphicLayoutEffect as ce } from "./hooks.js";
87
+ import A from "classnames";
88
+ import { combineRefs as j } from "./utils/common.js";
89
+ import { startIcon as fe, prefix as he, prefixWithLabel as ge, prefixWithoutLabel as me, fullWidth as ue, textArea as Se, textAreaWithLabel as pe, textAreaWithoutLabel as be, input as ye, inputWithLabel as Le, inputWithoutLabel as xe, inputFirefoxStyles as Ce, endIcon as Ae, menuItem as Te, menuItemSelected as Ee, suggestionsContainer as Re } from "./text-field-base.css-mistica.js";
90
+ import { sprinkles as We } from "./sprinkles.css-mistica.js";
91
+ import { vars as Ie } from "./skins/skin-contract.css-mistica.js";
92
+ const W = /*#__PURE__*/ s.forwardRef((_param, M)=>{
93
+ var { error: c , helperText: T , label: n , inputProps: m , inputRef: y , defaultValue: o , value: t , onFocus: u , onBlur: S , inputComponent: h , prefix: g , startIcon: e , endIcon: a , endIconOverlay: L , shrinkLabel: z , multiline: x = !1 , focus: C , fieldRef: D , maxLength: p , id: G , autoComplete: H , fullWidth: K } = _param, r = _object_without_properties(_param, [
94
94
  "error",
95
95
  "helperText",
96
96
  "label",
@@ -115,8 +115,8 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
115
115
  "fullWidth"
116
116
  ]);
117
117
  var _ref;
118
- const F = W(K), [f, d] = s.useState(o != null && o.length || t != null && t.length ? "filled" : "default"), { isTabletOrSmaller: Q } = ce(), [U, N] = s.useState((_ref = o == null ? void 0 : o.length) !== null && _ref !== void 0 ? _ref : 0), E = !!n || !r.required, w = j(), P = D || (r.type === "date" || r.type === "datetime-local" || r.type === "month") && !r.required, [X, Y] = s.useState("baseline");
119
- fe(()=>{
118
+ const F = O(G), [f, d] = s.useState(o != null && o.length || t != null && t.length ? "filled" : "default"), { isTabletOrSmaller: J } = de(), [Q, N] = s.useState((_ref = o == null ? void 0 : o.length) !== null && _ref !== void 0 ? _ref : 0), E = !!n || !r.required, U = B(), w = z || (r.type === "date" || r.type === "datetime-local" || r.type === "month") && !r.required, [X, Y] = s.useState("baseline");
119
+ ce(()=>{
120
120
  oe() && Y("initial");
121
121
  }, []), s.useEffect(()=>{
122
122
  f !== "focused" && t != null && t.length && (N(t.length), d("filled")), C && d("focused"), C === !1 && !(t != null && t.length) && d("default"), C === !1 && t != null && t.length && d("filled");
@@ -129,77 +129,77 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
129
129
  }, [
130
130
  r.autoFocus
131
131
  ]);
132
- const Z = L ? "textarea" : "input", v = h ? {
132
+ const Z = x ? "textarea" : "input", $ = h ? {
133
133
  inputRef: y
134
134
  } : {
135
- ref: z(J, y)
135
+ ref: j(M, y)
136
136
  }, b = _object_spread(_object_spread_props(_object_spread({}, r), {
137
- maxLength: S,
138
- autoComplete: M
139
- }), g), k = P || f === "focused" || f === "filled", $ = k ? Q ? se : le : 1, V = {
137
+ maxLength: p,
138
+ autoComplete: H
139
+ }), m), P = w || f === "focused" || f === "filled", v = P ? J ? se : le : 1, V = {
140
140
  left: e ? 48 : R,
141
141
  // shrinking means applying a scale transformation, so width will be proportionally reduced.
142
142
  // Let's keep the original width.
143
- width: `calc(((100% - ${R + (e ? 48 : R)}px)) / ${$})`,
144
- paddingRight: a && !k ? 36 : 0
145
- }, _ = Oe({
143
+ width: `calc(((100% - ${R + (e ? 48 : R)}px)) / ${v})`,
144
+ paddingRight: a && !P ? 36 : 0
145
+ }, k = We({
146
146
  paddingRight: a ? 0 : 16,
147
- paddingLeft: m ? 0 : e ? 48 : 12
148
- }), ee = r.type === "password" && ae(w.platformOverrides) && !B(w.platformOverrides) ? "arial" : "inherit";
147
+ paddingLeft: g ? 0 : e ? 48 : 12
148
+ }), ee = r.type === "password" && !q(U.platformOverrides) ? "Lucida Grande, Arial, sans-serif" : "inherit";
149
149
  return /* @__PURE__ */ te(ie, {
150
150
  disabled: r.disabled,
151
151
  helperText: /* @__PURE__ */ i(ne, {
152
152
  error: c,
153
- leftText: A,
154
- rightText: L && S ? `${U}/${S}` : void 0
153
+ leftText: T,
154
+ rightText: x && p ? `${Q}/${p}` : void 0
155
155
  }),
156
- multiline: L,
157
- fullWidth: G,
158
- fieldRef: H,
156
+ multiline: x,
157
+ fullWidth: K,
158
+ fieldRef: D,
159
159
  readOnly: r.readOnly,
160
160
  children: [
161
161
  e && /* @__PURE__ */ i("div", {
162
- className: he,
162
+ className: fe,
163
163
  children: e
164
164
  }),
165
- m && /* @__PURE__ */ i("div", {
166
- className: T(me, E ? ge : ue),
165
+ g && /* @__PURE__ */ i("div", {
166
+ className: A(he, E ? ge : me),
167
167
  style: {
168
168
  opacity: f === "default" ? 0 : 1,
169
169
  alignSelf: X
170
170
  },
171
- children: /* @__PURE__ */ i(O, {
172
- color: We.colors.textSecondary,
171
+ children: /* @__PURE__ */ i(I, {
172
+ color: Ie.colors.textSecondary,
173
173
  regular: !0,
174
174
  wordBreak: !1,
175
- children: m
175
+ children: g
176
176
  })
177
177
  }),
178
178
  /* @__PURE__ */ i("div", {
179
- className: pe,
179
+ className: ue,
180
180
  style: {
181
- alignSelf: m ? "baseline" : "initial"
181
+ alignSelf: g ? "baseline" : "initial"
182
182
  },
183
- children: /* @__PURE__ */ i(O, {
183
+ children: /* @__PURE__ */ i(I, {
184
184
  as: "div",
185
185
  regular: !0,
186
- children: /*#__PURE__*/ s.createElement(h || Z, _object_spread(_object_spread_props(_object_spread({}, v, b), {
186
+ children: /*#__PURE__*/ s.createElement(h || Z, _object_spread(_object_spread_props(_object_spread({}, $, b), {
187
187
  id: F,
188
188
  style: _object_spread_props(_object_spread({}, b.style), {
189
189
  fontFamily: ee
190
190
  }),
191
- className: L ? T(Se, E ? be : ye, _) : T(xe, E ? Le : Ce, _, {
192
- [Te]: de()
191
+ className: x ? A(Se, E ? pe : be, k) : A(ye, E ? Le : xe, k, {
192
+ [Ce]: ae()
193
193
  }),
194
194
  onFocus: (l)=>{
195
195
  d("focused"), u == null || u(l);
196
196
  },
197
197
  onBlur: (l)=>{
198
- l.target.value.length > 0 ? d("filled") : d("default"), p == null || p(l);
198
+ l.target.value.length > 0 ? d("filled") : d("default"), S == null || S(l);
199
199
  },
200
200
  onChange: (l)=>{
201
- var q;
202
- S === void 0 || l.target.value.length <= S ? (N(l.target.value.length), l.target.value.length > 0 && f !== "focused" && d("filled"), (q = b.onChange) == null || q.call(b, l)) : (l.stopPropagation(), l.preventDefault());
201
+ var _;
202
+ p === void 0 || l.target.value.length <= p ? (N(l.target.value.length), l.target.value.length > 0 && f !== "focused" && d("filled"), (_ = b.onChange) == null || _.call(b, l)) : (l.stopPropagation(), l.preventDefault());
203
203
  },
204
204
  defaultValue: o,
205
205
  value: t
@@ -213,7 +213,7 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
213
213
  error: c,
214
214
  forId: F,
215
215
  inputState: f,
216
- shrinkLabel: P,
216
+ shrinkLabel: w,
217
217
  optional: !r.required,
218
218
  children: n
219
219
  }),
@@ -221,41 +221,41 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
221
221
  className: Ae,
222
222
  children: a
223
223
  }),
224
- x
224
+ L
225
225
  ]
226
226
  });
227
- }), Fe = /*#__PURE__*/ s.lazy(()=>import(/* webpackChunkName: "react-autosuggest" */ "react-autosuggest")), Ke = /*#__PURE__*/ s.forwardRef((_param, g)=>{
228
- var { getSuggestions: c , id: A } = _param, n = _object_without_properties(_param, [
227
+ }), Oe = /*#__PURE__*/ s.lazy(()=>import(/* webpackChunkName: "react-autosuggest" */ "react-autosuggest")), Ge = /*#__PURE__*/ s.forwardRef((_param, m)=>{
228
+ var { getSuggestions: c , id: T } = _param, n = _object_without_properties(_param, [
229
229
  "getSuggestions",
230
230
  "id"
231
231
  ]);
232
- const [y, o] = s.useState([]), t = s.useRef(null), { platformOverrides: u , texts: p } = j(), h = W(A), m = W();
232
+ const [y, o] = s.useState([]), t = s.useRef(null), { platformOverrides: u , texts: S } = B(), h = O(T), g = O();
233
233
  if (c && (n.value === void 0 || n.defaultValue !== void 0)) throw Error("Fields with suggestions must be used in controlled mode");
234
234
  return c ? /* @__PURE__ */ i(s.Suspense, {
235
- fallback: /* @__PURE__ */ i(I, _object_spread_props(_object_spread({}, n), {
236
- label: B(u) ? "" : n.label,
235
+ fallback: /* @__PURE__ */ i(W, _object_spread_props(_object_spread({}, n), {
236
+ label: q(u) ? "" : n.label,
237
237
  autoComplete: "off",
238
- ref: g,
238
+ ref: m,
239
239
  id: h
240
240
  })),
241
- children: /* @__PURE__ */ i(Fe, {
242
- id: m,
241
+ children: /* @__PURE__ */ i(Oe, {
242
+ id: g,
243
243
  inputProps: _object_spread_props(_object_spread({}, n), {
244
244
  id: h,
245
245
  autoComplete: "off",
246
246
  // @ts-expect-error Autosuggest expects slightly different types
247
247
  onChange: (e, param)=>{
248
248
  let { newValue: a } = param;
249
- var x;
249
+ var L;
250
250
  e.target = _object_spread_props(_object_spread({}, e.target), {
251
251
  value: a
252
252
  }), e.currentTarget = _object_spread_props(_object_spread({}, e.currentTarget), {
253
253
  value: a
254
- }), (x = n.onChange) == null || x.call(n, e);
254
+ }), (L = n.onChange) == null || L.call(n, e);
255
255
  }
256
256
  }),
257
- renderInputComponent: (e)=>/* @__PURE__ */ i(I, _object_spread_props(_object_spread({}, e), {
258
- inputRef: z(t, n.inputRef, g)
257
+ renderInputComponent: (e)=>/* @__PURE__ */ i(W, _object_spread_props(_object_spread({}, e), {
258
+ inputRef: j(t, n.inputRef, m)
259
259
  })),
260
260
  suggestions: y,
261
261
  onSuggestionsFetchRequested: (param)=>{
@@ -268,10 +268,10 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
268
268
  let { isHighlighted: a } = param;
269
269
  return i("div", {
270
270
  role: "menuitem",
271
- className: T(Ee, {
272
- [Re]: a
271
+ className: A(Te, {
272
+ [Ee]: a
273
273
  }),
274
- children: /* @__PURE__ */ i(O, {
274
+ children: /* @__PURE__ */ i(I, {
275
275
  regular: !0,
276
276
  children: e
277
277
  })
@@ -281,14 +281,14 @@ const I = /*#__PURE__*/ s.forwardRef((_param, J)=>{
281
281
  style: {
282
282
  width: t.current ? t.current.clientWidth + 2 : 0
283
283
  },
284
- className: Ie,
285
- "aria-label": `${n.label} ${p.menuLabelSuffix}`,
284
+ className: Re,
285
+ "aria-label": `${n.label} ${S.menuLabelSuffix}`,
286
286
  children: e.children
287
287
  }))
288
288
  })
289
- }) : /* @__PURE__ */ i(I, _object_spread_props(_object_spread({}, n), {
289
+ }) : /* @__PURE__ */ i(W, _object_spread_props(_object_spread({}, n), {
290
290
  id: h,
291
- ref: g
291
+ ref: m
292
292
  }));
293
293
  });
294
- export { I as TextFieldBase, Ke as TextFieldBaseAutosuggest };
294
+ export { W as TextFieldBase, Ge as TextFieldBaseAutosuggest };
@@ -26,112 +26,113 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
- import { jsx as r, jsxs as S, Fragment as y } from "react/jsx-runtime";
29
+ import { jsx as r, jsxs as y, Fragment as A } from "react/jsx-runtime";
30
30
  import * as a from "react";
31
31
  import { assignInlineVars as N } from "@vanilla-extract/dynamic";
32
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 = ()=>{
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 = ()=>{
48
48
  const [t, c] = a.useState(!1);
49
- return B(()=>{
49
+ return z(()=>{
50
50
  if (!window.matchMedia) return;
51
- const o = window.matchMedia(X), s = ()=>{
51
+ const o = window.matchMedia(Y), s = ()=>{
52
52
  c(o.matches);
53
53
  };
54
54
  return o.addListener(s), s(), ()=>o.removeListener(s);
55
55
  }, []), t;
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)=>{
56
+ }, tt = ()=>(t)=>t, et = (t)=>({
57
+ headerMobileHeight: (t == null ? void 0 : t.headerMobileHeight) === "mistica" ? _ : t == null ? void 0 : t.headerMobileHeight
58
+ }), rt = (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), 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;
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;
63
63
  const l = _object_spread({
64
- platform: D(),
65
- insideNovumNativeApp: j()
64
+ platform: I(),
65
+ insideNovumNativeApp: h()
66
66
  }, t.platformOverrides);
67
- var _t_Link, _t_useHrefDecorator;
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({}, F(t.i18n.locale), t.texts),
72
+ texts: _object_spread({}, $(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({}, $, tt(t.dimensions)),
77
+ dimensions: _object_spread({}, V, et(t.dimensions)),
78
78
  textPresets: {
79
79
  text5: _object_spread({}, e.text5, (i = t.skin.textPresets) == null ? void 0 : i.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, (P = t.skin.textPresets) == null ? void 0 : P.text10),
85
- cardTitle: _object_spread({}, e.cardTitle, (b = t.skin.textPresets) == null ? void 0 : b.cardTitle),
84
+ text10: _object_spread({}, e.text10, (v = t.skin.textPresets) == null ? void 0 : v.text10),
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
- 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)
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)
90
91
  },
91
- Link: (_t_Link = t.Link) !== null && _t_Link !== void 0 ? _t_Link : h,
92
+ Link: j(t.Link),
92
93
  isDarkMode: u,
93
- isIos: D(l) === "ios",
94
- useHrefDecorator: (_t_useHrefDecorator = t.useHrefDecorator) !== null && _t_useHrefDecorator !== void 0 ? _t_useHrefDecorator : Z,
94
+ isIos: I(l) === "ios",
95
+ useHrefDecorator: (_t_useHrefDecorator = t.useHrefDecorator) !== null && _t_useHrefDecorator !== void 0 ? _t_useHrefDecorator : tt,
95
96
  useId: t.useId
96
97
  };
97
98
  }, [
98
99
  t,
99
100
  u
100
- ]), H = Object.fromEntries(Object.entries(k).map((param)=>{
101
+ ]), S = Object.fromEntries(Object.entries(m).map((param)=>{
101
102
  let [l, i] = param;
102
103
  let n = "";
103
104
  if (i.startsWith("#")) {
104
- const [d, x, f] = Q(i);
105
+ const [d, x, f] = U(i);
105
106
  n = `${d}, ${x}, ${f}`;
106
107
  }
107
108
  return [
108
109
  l,
109
110
  n
110
111
  ];
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
112
+ })), b = N(Q, {
113
+ colors: m,
114
+ rawColors: S,
115
+ borderRadii: (_t_skin_borderRadii = t.skin.borderRadii) !== null && _t_skin_borderRadii !== void 0 ? _t_skin_borderRadii : X
115
116
  });
116
- return /* @__PURE__ */ r(z, {
117
+ return /* @__PURE__ */ r(G, {
117
118
  disabled: !t.enableTabFocus,
118
- children: /* @__PURE__ */ r(G, {
119
- children: /* @__PURE__ */ r(_.Provider, {
119
+ children: /* @__PURE__ */ r(q, {
120
+ children: /* @__PURE__ */ r(B.Provider, {
120
121
  value: p,
121
- children: /* @__PURE__ */ r(J, {
122
+ children: /* @__PURE__ */ r(K, {
122
123
  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, {
124
+ children: /* @__PURE__ */ r(J, {
125
+ children: /* @__PURE__ */ r(W, {
126
+ children: /* @__PURE__ */ r(F.Provider, {
127
+ value: E,
128
+ children: /* @__PURE__ */ r(w, {
128
129
  children: /* @__PURE__ */ r(O, {
129
130
  children: o ? /*#__PURE__*/ a.createElement(o, {
130
- style: v
131
- }, c) : /* @__PURE__ */ S(y, {
131
+ style: b
132
+ }, c) : /* @__PURE__ */ y(A, {
132
133
  children: [
133
134
  (process.env.NODE_ENV !== "test" || process.env.SSR_TEST) && /* @__PURE__ */ r("style", {
134
- children: `:root {${v}}`
135
+ children: `:root {${b}}`
135
136
  }),
136
137
  c
137
138
  ]
@@ -145,5 +146,5 @@ const X = "(prefers-color-scheme: dark)", Y = ()=>{
145
146
  })
146
147
  })
147
148
  });
148
- }, bt = et;
149
- export { bt as default, Y as useIsOsDarkModeEnabled };
149
+ }, gt = rt;
150
+ export { gt as default, Z as useIsOsDarkModeEnabled };
package/dist-es/theme.js CHANGED
@@ -77,8 +77,8 @@ function _object_without_properties_loose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import { jsx as i } from "react/jsx-runtime";
81
- const t = {
80
+ import { jsx as a } from "react/jsx-runtime";
81
+ const l = {
82
82
  expirationDatePlaceholder: "MM/AA",
83
83
  togglePasswordVisibilityLabel: "Mostrar u ocultar contrase\xf1a",
84
84
  loading: "Cargando",
@@ -109,7 +109,7 @@ const t = {
109
109
  clearButton: "Borrar",
110
110
  carouselNextButton: "siguiente",
111
111
  carouselPrevButton: "anterior"
112
- }, o = {
112
+ }, n = {
113
113
  expirationDatePlaceholder: "MM/YY",
114
114
  togglePasswordVisibilityLabel: "Toggle password visibility",
115
115
  loading: "Loading",
@@ -140,7 +140,7 @@ const t = {
140
140
  clearButton: "Clear",
141
141
  carouselNextButton: "next",
142
142
  carouselPrevButton: "previous"
143
- }, n = {
143
+ }, d = {
144
144
  expirationDatePlaceholder: "MM/JJ",
145
145
  togglePasswordVisibilityLabel: "Passwort un-/sichtbar machen",
146
146
  loading: "Wird gespeichert",
@@ -171,7 +171,7 @@ const t = {
171
171
  clearButton: "L\xf6schen",
172
172
  carouselNextButton: "n\xe4chste",
173
173
  carouselPrevButton: "vorherige"
174
- }, l = {
174
+ }, s = {
175
175
  expirationDatePlaceholder: "MM/AA",
176
176
  togglePasswordVisibilityLabel: "Mostrar ou ocultar senha",
177
177
  loading: "Carregando",
@@ -202,32 +202,81 @@ const t = {
202
202
  clearButton: "Apagar",
203
203
  carouselNextButton: "pr\xf3ximo",
204
204
  carouselPrevButton: "anterior"
205
- }, C = (r)=>{
205
+ }, b = (r)=>{
206
206
  switch(r.toLocaleLowerCase().split(/[-_]/)[0]){
207
207
  case "es":
208
- return t;
209
- case "pt":
210
208
  return l;
209
+ case "pt":
210
+ return s;
211
211
  case "de":
212
- return n;
212
+ return d;
213
213
  case "en":
214
- return o;
214
+ return n;
215
215
  default:
216
- return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${r}`), o;
216
+ return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${r}`), n;
217
217
  }
218
- }, d = 56, s = 80, m = {
219
- headerMobileHeight: d,
220
- headerDesktopHeight: s
221
- }, u = (_param)=>/* @__PURE__ */ {
222
- var { to: r , innerRef: e } = _param, a = _object_without_properties(_param, [
218
+ }, c = 56, C = 80, E = {
219
+ headerMobileHeight: c,
220
+ headerDesktopHeight: C
221
+ }, m = (_param)=>/* @__PURE__ */ {
222
+ var { to: r , innerRef: e } = _param, o = _object_without_properties(_param, [
223
223
  "to",
224
224
  "innerRef"
225
225
  ]);
226
- return i("a", _object_spread_props(_object_spread({
226
+ return a("a", _object_spread_props(_object_spread({
227
227
  ref: e,
228
228
  href: typeof r == "string" ? r : r == null ? void 0 : r.pathname
229
- }, a), {
230
- children: a.children
229
+ }, o), {
230
+ children: o.children
231
231
  }));
232
+ }, u = (r)=>r, f = (r)=>(_param)=>/* @__PURE__ */ {
233
+ var { innerRef: e } = _param, o = _object_without_properties(_param, [
234
+ "innerRef"
235
+ ]);
236
+ return a(r, _object_spread({
237
+ ref: e
238
+ }, o));
239
+ }, v = (r)=>(_param)=>/* @__PURE__ */ {
240
+ var { to: e , innerRef: o , children: t } = _param, i = _object_without_properties(_param, [
241
+ "to",
242
+ "innerRef",
243
+ "children"
244
+ ]);
245
+ return a(r, {
246
+ href: e,
247
+ children: /* @__PURE__ */ a("a", _object_spread_props(_object_spread({
248
+ ref: o
249
+ }, i), {
250
+ children: t
251
+ }))
252
+ });
253
+ }, p = (r)=>(_param)=>/* @__PURE__ */ {
254
+ var { to: e , innerRef: o , children: t } = _param, i = _object_without_properties(_param, [
255
+ "to",
256
+ "innerRef",
257
+ "children"
258
+ ]);
259
+ return a(r, _object_spread_props(_object_spread({
260
+ href: e,
261
+ ref: o
262
+ }, i), {
263
+ children: t
264
+ }));
265
+ }, h = (r)=>{
266
+ if (!r) return m;
267
+ if (typeof r == "function" || r.$$typeof) return r;
268
+ switch(r.type){
269
+ case "ReactRouter5":
270
+ return u(r.Component);
271
+ case "ReactRouter6":
272
+ return f(r.Component);
273
+ case "Next12":
274
+ return v(r.Component);
275
+ case "Next13":
276
+ return p(r.Component);
277
+ default:
278
+ const e = r.type;
279
+ throw new Error(`Invalid Link type: ${e}`);
280
+ }
232
281
  };
233
- export { u as AnchorLink, s as NAVBAR_HEIGHT_DESKTOP, d as NAVBAR_HEIGHT_MOBILE, m as dimensions, C as getTexts };
282
+ export { C as NAVBAR_HEIGHT_DESKTOP, c as NAVBAR_HEIGHT_MOBILE, E as dimensions, h as getMisticaLinkComponent, b as getTexts };