@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.
- package/css/mistica.css +1 -1
- package/dist/accordion.d.ts +2 -2
- package/dist/avatar.d.ts +2 -2
- package/dist/badge.d.ts +1 -1
- package/dist/button-fixed-footer-layout.d.ts +1 -1
- package/dist/button-group.d.ts +2 -2
- package/dist/button-layout.d.ts +2 -2
- package/dist/button.d.ts +2 -2
- package/dist/callout.d.ts +1 -1
- package/dist/card.d.ts +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/chip.d.ts +3 -3
- package/dist/circle.d.ts +1 -1
- package/dist/community/blocks.d.ts +7 -7
- package/dist/counter.d.ts +2 -2
- package/dist/credit-card-expiration-field.d.ts +2 -2
- package/dist/credit-card-fields.d.ts +2 -2
- package/dist/credit-card-number-field.d.ts +2 -2
- package/dist/cvv-field.d.ts +2 -2
- package/dist/date-field.d.ts +2 -2
- package/dist/date-time-field.d.ts +2 -2
- package/dist/date-time-picker.d.ts +2 -2
- package/dist/decimal-field.d.ts +2 -2
- package/dist/dialog.js +72 -70
- package/dist/divider.d.ts +2 -4
- package/dist/double-field.d.ts +2 -2
- package/dist/email-field.d.ts +2 -2
- package/dist/empty-state-card.d.ts +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/fade-in.d.ts +1 -1
- package/dist/feedback.d.ts +6 -6
- package/dist/fixed-to-top.d.ts +1 -1
- package/dist/focus-trap.d.ts +1 -1
- package/dist/form.d.ts +1 -1
- package/dist/grid-layout.d.ts +1 -1
- package/dist/header.d.ts +4 -4
- package/dist/iban-field.d.ts +2 -2
- package/dist/icon-button.d.ts +2 -2
- package/dist/icons/icon-amex.d.ts +2 -2
- package/dist/icons/icon-chevron.d.ts +1 -1
- package/dist/icons/icon-cvv-amex.d.ts +2 -2
- package/dist/icons/icon-cvv-visa-mc.d.ts +2 -2
- package/dist/icons/icon-mastercard.d.ts +2 -2
- package/dist/icons/icon-visa.d.ts +2 -2
- package/dist/inline.d.ts +1 -1
- package/dist/integer-field.d.ts +1 -1
- package/dist/list.d.ts +3 -3
- package/dist/loading-bar.d.ts +2 -2
- package/dist/master-detail-layout.d.ts +1 -1
- package/dist/menu.d.ts +4 -4
- package/dist/month-field.d.ts +2 -2
- package/dist/mosaic.d.ts +3 -3
- package/dist/navigation-bar.d.ts +5 -5
- package/dist/navigation-breadcrumbs.d.ts +3 -2
- package/dist/navigation-breadcrumbs.js +8 -7
- package/dist/negative-box.d.ts +1 -1
- package/dist/nestable-context.d.ts +5 -5
- package/dist/overlay.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/password-field.d.ts +2 -2
- package/dist/phone-number-field.d.ts +2 -2
- package/dist/placeholder.d.ts +2 -2
- package/dist/popover.d.ts +1 -1
- package/dist/portal.d.ts +1 -1
- package/dist/progress-bar.d.ts +2 -2
- package/dist/radio-button.d.ts +2 -2
- package/dist/responsive-layout.d.ts +5 -5
- package/dist/screen-reader-only.d.ts +1 -1
- package/dist/screen-size-context-provider.d.ts +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/snackbar.js +18 -20
- package/dist/spinner.d.ts +1 -1
- package/dist/stack.d.ts +1 -1
- package/dist/stacking-group.d.ts +1 -1
- package/dist/stepper.d.ts +2 -2
- package/dist/switch-component.d.ts +1 -1
- package/dist/tab-focus.d.ts +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/tag.d.ts +3 -3
- package/dist/text-field-base.d.ts +4 -4
- package/dist/text-field-components.d.ts +3 -3
- package/dist/text-link.d.ts +1 -1
- package/dist/text.d.ts +11 -11
- package/dist/theme-context-provider.d.ts +1 -1
- package/dist/theme-variant-context.d.ts +1 -1
- package/dist/timer.d.ts +3 -3
- package/dist/tooltip.d.ts +2 -2
- package/dist/utils/aspect-ratio-support.d.ts +1 -1
- package/dist/utils/document-visibility.d.ts +1 -1
- package/dist-es/dialog.js +72 -70
- package/dist-es/navigation-breadcrumbs.js +18 -17
- package/dist-es/package-version.js +1 -1
- package/dist-es/snackbar.js +21 -23
- package/dist-es/style.css +1 -1
- 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
|
|
57
|
-
import
|
|
58
|
-
import { useIsInverseVariant as
|
|
59
|
-
import { list as
|
|
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
|
|
61
|
+
const b = " / ", B = (param)=>{
|
|
62
62
|
let { title: s, breadcrumbs: n, dataAttributes: c, "aria-label": m = "Breadcrumb" } = param;
|
|
63
|
-
const i =
|
|
63
|
+
const i = v();
|
|
64
64
|
return /* @__PURE__ */ r("nav", _object_spread_props(_object_spread({
|
|
65
65
|
"aria-label": m
|
|
66
|
-
},
|
|
66
|
+
}, f(c, "NavigationBreadcrumbs")), {
|
|
67
67
|
children: /* @__PURE__ */ o("ol", {
|
|
68
|
-
className:
|
|
68
|
+
className: x,
|
|
69
69
|
children: [
|
|
70
|
-
n.map((param,
|
|
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(
|
|
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:
|
|
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:
|
|
91
|
+
children: b
|
|
91
92
|
})
|
|
92
93
|
})
|
|
93
94
|
]
|
|
94
|
-
},
|
|
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:
|
|
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
|
-
},
|
|
116
|
-
export {
|
|
116
|
+
}, S = B;
|
|
117
|
+
export { S as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const o = "15.
|
|
1
|
+
const o = "15.20.1";
|
|
2
2
|
export { o as PACKAGE_VERSION };
|
package/dist-es/snackbar.js
CHANGED
|
@@ -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
|
|
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:
|
|
74
|
-
const { texts: T } = w(), [a, s] = e.useState(!1), { width:
|
|
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((
|
|
80
|
+
const f = e.useCallback((B)=>{
|
|
81
81
|
s(!1), setTimeout(()=>{
|
|
82
82
|
var S;
|
|
83
|
-
(S = h.current) == null || S.call(h,
|
|
84
|
-
}, process.env.NODE_ENV === "test" ? 0 :
|
|
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({},
|
|
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
|
|
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(
|
|
97
|
+
clearTimeout(B), clearTimeout(S);
|
|
98
98
|
};
|
|
99
99
|
}, [
|
|
100
100
|
f,
|
|
101
101
|
t
|
|
102
102
|
]), /* @__PURE__ */ r(Q, {
|
|
103
|
-
className:
|
|
103
|
+
className: P,
|
|
104
104
|
children: /* @__PURE__ */ r("div", {
|
|
105
|
-
ref:
|
|
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":
|
|
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:
|
|
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),
|
|
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 && !
|
|
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:
|
|
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
|
-
|
|
215
|
+
p.current = !1;
|
|
218
216
|
}));
|
|
219
217
|
}, [
|
|
220
218
|
u,
|
|
221
|
-
|
|
219
|
+
I,
|
|
222
220
|
n,
|
|
223
221
|
t,
|
|
224
222
|
m,
|
|
225
223
|
a,
|
|
226
224
|
c,
|
|
227
|
-
|
|
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:
|
|
232
|
+
closeButtonLabel: I,
|
|
235
233
|
type: c,
|
|
236
234
|
onClose: s.current,
|
|
237
|
-
withDismiss:
|
|
235
|
+
withDismiss: d,
|
|
238
236
|
dataAttributes: R
|
|
239
237
|
});
|
|
240
238
|
}), Se = oe;
|