@telefonica/mistica 15.19.0 → 15.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 (95) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.d.ts +2 -2
  3. package/dist/avatar.d.ts +2 -2
  4. package/dist/badge.d.ts +1 -1
  5. package/dist/button-fixed-footer-layout.d.ts +1 -1
  6. package/dist/button-group.d.ts +2 -2
  7. package/dist/button-layout.d.ts +2 -2
  8. package/dist/button.d.ts +2 -2
  9. package/dist/callout.d.ts +1 -1
  10. package/dist/card.d.ts +1 -1
  11. package/dist/checkbox.d.ts +1 -1
  12. package/dist/chip.d.ts +3 -3
  13. package/dist/circle.d.ts +1 -1
  14. package/dist/community/blocks.d.ts +7 -7
  15. package/dist/counter.d.ts +2 -2
  16. package/dist/credit-card-expiration-field.d.ts +2 -2
  17. package/dist/credit-card-fields.d.ts +2 -2
  18. package/dist/credit-card-number-field.d.ts +2 -2
  19. package/dist/cvv-field.d.ts +2 -2
  20. package/dist/date-field.d.ts +2 -2
  21. package/dist/date-time-field.d.ts +2 -2
  22. package/dist/date-time-picker.d.ts +2 -2
  23. package/dist/decimal-field.d.ts +2 -2
  24. package/dist/dialog.js +72 -70
  25. package/dist/divider.d.ts +2 -4
  26. package/dist/double-field.d.ts +2 -2
  27. package/dist/email-field.d.ts +2 -2
  28. package/dist/empty-state-card.d.ts +1 -1
  29. package/dist/empty-state.d.ts +1 -1
  30. package/dist/fade-in.d.ts +1 -1
  31. package/dist/feedback.d.ts +6 -6
  32. package/dist/fixed-to-top.d.ts +1 -1
  33. package/dist/focus-trap.d.ts +1 -1
  34. package/dist/form.d.ts +1 -1
  35. package/dist/grid-layout.d.ts +1 -1
  36. package/dist/header.d.ts +4 -4
  37. package/dist/iban-field.d.ts +2 -2
  38. package/dist/icon-button.d.ts +2 -2
  39. package/dist/icons/icon-amex.d.ts +2 -2
  40. package/dist/icons/icon-chevron.d.ts +1 -1
  41. package/dist/icons/icon-cvv-amex.d.ts +2 -2
  42. package/dist/icons/icon-cvv-visa-mc.d.ts +2 -2
  43. package/dist/icons/icon-mastercard.d.ts +2 -2
  44. package/dist/icons/icon-visa.d.ts +2 -2
  45. package/dist/inline.d.ts +1 -1
  46. package/dist/integer-field.d.ts +1 -1
  47. package/dist/list.d.ts +3 -3
  48. package/dist/loading-bar.d.ts +2 -2
  49. package/dist/master-detail-layout.d.ts +1 -1
  50. package/dist/menu.d.ts +4 -4
  51. package/dist/month-field.d.ts +2 -2
  52. package/dist/mosaic.d.ts +3 -3
  53. package/dist/navigation-bar.d.ts +5 -5
  54. package/dist/navigation-breadcrumbs.d.ts +3 -2
  55. package/dist/navigation-breadcrumbs.js +8 -7
  56. package/dist/negative-box.d.ts +1 -1
  57. package/dist/nestable-context.d.ts +5 -5
  58. package/dist/overlay.d.ts +1 -1
  59. package/dist/package-version.js +1 -1
  60. package/dist/password-field.d.ts +2 -2
  61. package/dist/phone-number-field.d.ts +2 -2
  62. package/dist/placeholder.d.ts +2 -2
  63. package/dist/popover.d.ts +1 -1
  64. package/dist/portal.d.ts +1 -1
  65. package/dist/progress-bar.d.ts +2 -2
  66. package/dist/radio-button.d.ts +2 -2
  67. package/dist/responsive-layout.d.ts +5 -5
  68. package/dist/screen-reader-only.d.ts +1 -1
  69. package/dist/screen-size-context-provider.d.ts +1 -1
  70. package/dist/select.d.ts +1 -1
  71. package/dist/snackbar.js +18 -20
  72. package/dist/spinner.d.ts +1 -1
  73. package/dist/stack.d.ts +1 -1
  74. package/dist/stacking-group.d.ts +1 -1
  75. package/dist/stepper.d.ts +2 -2
  76. package/dist/switch-component.d.ts +1 -1
  77. package/dist/tab-focus.d.ts +1 -1
  78. package/dist/tabs.d.ts +1 -1
  79. package/dist/tag.d.ts +3 -3
  80. package/dist/text-field-base.d.ts +4 -4
  81. package/dist/text-field-components.d.ts +3 -3
  82. package/dist/text-link.d.ts +1 -1
  83. package/dist/text.d.ts +11 -11
  84. package/dist/theme-context-provider.d.ts +1 -1
  85. package/dist/theme-variant-context.d.ts +1 -1
  86. package/dist/timer.d.ts +3 -3
  87. package/dist/tooltip.d.ts +2 -2
  88. package/dist/utils/aspect-ratio-support.d.ts +1 -1
  89. package/dist/utils/document-visibility.d.ts +1 -1
  90. package/dist-es/dialog.js +72 -70
  91. package/dist-es/navigation-breadcrumbs.js +18 -17
  92. package/dist-es/package-version.js +1 -1
  93. package/dist-es/snackbar.js +21 -23
  94. package/dist-es/style.css +1 -1
  95. package/package.json +3 -3
@@ -53,33 +53,34 @@ function _object_spread_props(target, source) {
53
53
  }
54
54
  import { jsx as r, jsxs as o } from "react/jsx-runtime";
55
55
  import { Text1 as t } from "./text.js";
56
- import { getPrefixedDataAttributes as p } from "./utils/dom.js";
57
- import f from "./text-link.js";
58
- import { useIsInverseVariant as h } from "./theme-variant-context.js";
59
- import { list as v, listItem as l, link as x, current as g } from "./navigation-breadcrumbs.css-mistica.js";
56
+ import { getPrefixedDataAttributes as f } from "./utils/dom.js";
57
+ import h from "./text-link.js";
58
+ import { useIsInverseVariant as v } from "./theme-variant-context.js";
59
+ import { list as x, listItem as l, link as g, current as N } from "./navigation-breadcrumbs.css-mistica.js";
60
60
  import { vars as e } from "./skins/skin-contract.css-mistica.js";
61
- const N = " / ", b = (param)=>{
61
+ const b = " / ", B = (param)=>{
62
62
  let { title: s, breadcrumbs: n, dataAttributes: c, "aria-label": m = "Breadcrumb" } = param;
63
- const i = h();
63
+ const i = v();
64
64
  return /* @__PURE__ */ r("nav", _object_spread_props(_object_spread({
65
65
  "aria-label": m
66
- }, p(c, "NavigationBreadcrumbs")), {
66
+ }, f(c, "NavigationBreadcrumbs")), {
67
67
  children: /* @__PURE__ */ o("ol", {
68
- className: v,
68
+ className: x,
69
69
  children: [
70
- n.map((param, u)=>{
71
- let { title: a, url: d } = param;
70
+ n.map((param, p)=>{
71
+ let { title: a, url: d, onNavigate: u } = param;
72
72
  return /* @__PURE__ */ o("li", {
73
73
  className: l,
74
74
  children: [
75
75
  /* @__PURE__ */ r(t, {
76
76
  regular: !0,
77
- children: /* @__PURE__ */ r(f, {
77
+ children: /* @__PURE__ */ r(h, {
78
78
  to: d,
79
79
  style: {
80
80
  color: i ? e.colors.textPrimaryInverse : e.colors.textPrimary
81
81
  },
82
- className: x,
82
+ className: g,
83
+ onNavigate: u,
83
84
  children: a
84
85
  })
85
86
  }),
@@ -87,18 +88,18 @@ const N = " / ", b = (param)=>{
87
88
  role: "presentation",
88
89
  children: /* @__PURE__ */ r(t, {
89
90
  regular: !0,
90
- children: N
91
+ children: b
91
92
  })
92
93
  })
93
94
  ]
94
- }, u);
95
+ }, p);
95
96
  }),
96
97
  /* @__PURE__ */ r("li", {
97
98
  className: l,
98
99
  children: /* @__PURE__ */ r("a", {
99
100
  "aria-current": "page",
100
101
  href: "#",
101
- className: g,
102
+ className: N,
102
103
  onClick: (a)=>{
103
104
  a.preventDefault();
104
105
  },
@@ -112,5 +113,5 @@ const N = " / ", b = (param)=>{
112
113
  ]
113
114
  })
114
115
  }));
115
- }, D = b;
116
- export { D as default };
116
+ }, S = B;
117
+ export { S as default };
@@ -1,2 +1,2 @@
1
- const o = "15.19.0";
1
+ const o = "15.20.1";
2
2
  export { o as PACKAGE_VERSION };
@@ -58,7 +58,7 @@ import N from "classnames";
58
58
  import { isWebViewBridgeAvailable as _, nativeMessage as b } from "@tef-novum/webview-bridge";
59
59
  import { useTheme as w, useElementDimensions as A, useScreenSize as x } from "./hooks.js";
60
60
  import { Text2 as W, Text3 as y } from "./text.js";
61
- import { TRANSITION_TIME_IN_MS as P, snackbarContainer as L, snackbar as V, snackbarOpen as z, wrapper as F, wrapperCritical as H, wrapperInfo as j, wrapperOpen as X, content as Y, button as $, longButton as q, dismissButton as G, dismissIcon as J } from "./snackbar.css-mistica.js";
61
+ import { TRANSITION_TIME_IN_MS as L, snackbarContainer as P, snackbar as V, snackbarOpen as z, wrapper as F, wrapperCritical as H, wrapperInfo as j, wrapperOpen as X, content as Y, button as $, longButton as q, dismissButton as G, dismissIcon as J } from "./snackbar.css-mistica.js";
62
62
  import { sprinkles as U } from "./sprinkles.css-mistica.js";
63
63
  import { vars as O } from "./skins/skin-contract.css-mistica.js";
64
64
  import { getPrefixedDataAttributes as K } from "./utils/dom.js";
@@ -70,39 +70,39 @@ const ee = [
70
70
  "CONSECUTIVE",
71
71
  "BUTTON"
72
72
  ], re = 5e3, te = 1e4, ne = /*#__PURE__*/ e.forwardRef((param, g)=>{
73
- let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: d, duration: t, onClose: o, type: c, withDismiss: p = !1, dataAttributes: R } = param;
74
- const { texts: T } = w(), [a, s] = e.useState(!1), { width: I, ref: v } = A(), { isDesktopOrBigger: i } = x(), l = I > (i ? 160 : 128), B = e.useRef(null), E = t === 1 / 0 && !n || p, h = e.useRef(o);
73
+ let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: I, duration: t, onClose: o, type: c, withDismiss: d = !1, dataAttributes: R } = param;
74
+ const { texts: T } = w(), [a, s] = e.useState(!1), { width: p, ref: v } = A(), { isDesktopOrBigger: i } = x(), l = p > (i ? 160 : 128), k = e.useRef(null), E = t === 1 / 0 && !n || d, h = e.useRef(o);
75
75
  e.useEffect(()=>{
76
76
  h.current = o;
77
77
  }, [
78
78
  o
79
79
  ]);
80
- const f = e.useCallback((k)=>{
80
+ const f = e.useCallback((B)=>{
81
81
  s(!1), setTimeout(()=>{
82
82
  var S;
83
- (S = h.current) == null || S.call(h, k);
84
- }, process.env.NODE_ENV === "test" ? 0 : P);
83
+ (S = h.current) == null || S.call(h, B);
84
+ }, process.env.NODE_ENV === "test" ? 0 : L);
85
85
  }, []);
86
- return e.useImperativeHandle(g, ()=>_object_spread_props(_object_spread({}, B), {
86
+ return e.useImperativeHandle(g, ()=>_object_spread_props(_object_spread({}, k), {
87
87
  close: f
88
88
  }), [
89
89
  f
90
90
  ]), e.useEffect(()=>{
91
- const k = setTimeout(()=>{
91
+ const B = setTimeout(()=>{
92
92
  s(!0);
93
93
  }, 50), S = t !== 1 / 0 ? setTimeout(()=>f({
94
94
  action: "TIMEOUT"
95
95
  }), t) : void 0;
96
96
  return ()=>{
97
- clearTimeout(k), clearTimeout(S);
97
+ clearTimeout(B), clearTimeout(S);
98
98
  };
99
99
  }, [
100
100
  f,
101
101
  t
102
102
  ]), /* @__PURE__ */ r(Q, {
103
- className: L,
103
+ className: P,
104
104
  children: /* @__PURE__ */ r("div", {
105
- ref: B,
105
+ ref: k,
106
106
  className: N(V, {
107
107
  [z]: a
108
108
  }),
@@ -168,7 +168,7 @@ const ee = [
168
168
  action: "DISMISS"
169
169
  });
170
170
  },
171
- "aria-label": d !== null && d !== void 0 ? d : T.closeButtonLabel,
171
+ "aria-label": I !== null && I !== void 0 ? I : T.closeButtonLabel,
172
172
  className: G[l ? "topRight" : "centered"],
173
173
  style: {
174
174
  display: "flex",
@@ -188,24 +188,22 @@ const ee = [
188
188
  })
189
189
  });
190
190
  }), oe = /*#__PURE__*/ e.forwardRef((param, g)=>{
191
- let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: d, duration: t, onClose: o = ()=>{}, type: c = "INFORMATIVE", withDismiss: p, dataAttributes: R } = param;
191
+ let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: I, duration: t, onClose: o = ()=>{}, type: c = "INFORMATIVE", withDismiss: d, dataAttributes: R } = param;
192
192
  const T = n ? te : re;
193
193
  t = Math.max(t !== null && t !== void 0 ? t : T, T);
194
- const a = _(), s = e.useRef(o), I = e.useRef(!1);
194
+ const a = _(), s = e.useRef(o), p = e.useRef(!1);
195
195
  return e.useEffect(()=>{
196
196
  s.current = o;
197
197
  }, [
198
198
  o
199
199
  ]), e.useEffect(()=>{
200
- a && !I.current && (I.current = !0, b({
200
+ a && !p.current && (p.current = !0, b({
201
201
  message: m,
202
- // @ts-expect-error duration can be 'PERSISTENT' in new webview-bridge lib versions, and old apps will ignore it
203
202
  duration: t === 1 / 0 ? "PERSISTENT" : void 0,
204
203
  buttonText: n,
205
204
  buttonAccessibilityLabel: u,
206
- closeButtonLabel: d,
207
205
  type: c,
208
- withDismiss: p
206
+ withDismiss: d
209
207
  }).then((v)=>{
210
208
  const i = v;
211
209
  i != null && i.action && ee.includes(i.action) ? s.current({
@@ -214,27 +212,27 @@ const ee = [
214
212
  action: "DISMISS"
215
213
  });
216
214
  }).finally(()=>{
217
- I.current = !1;
215
+ p.current = !1;
218
216
  }));
219
217
  }, [
220
218
  u,
221
- d,
219
+ I,
222
220
  n,
223
221
  t,
224
222
  m,
225
223
  a,
226
224
  c,
227
- p
225
+ d
228
226
  ]), a ? null : /* @__PURE__ */ r(ne, {
229
227
  ref: g,
230
228
  message: m,
231
229
  duration: t,
232
230
  buttonText: n,
233
231
  buttonAccessibilityLabel: u,
234
- closeButtonLabel: d,
232
+ closeButtonLabel: I,
235
233
  type: c,
236
234
  onClose: s.current,
237
- withDismiss: p,
235
+ withDismiss: d,
238
236
  dataAttributes: R
239
237
  });
240
238
  }), Se = oe;