@telefonica/mistica 14.28.1 → 14.30.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.
- package/css/mistica.css +1 -1
- package/dist/accordion.d.ts +3 -0
- package/dist/accordion.js +71 -70
- package/dist/button-layout.css-mistica.js +11 -19
- package/dist/button-layout.css.d.ts +1 -5
- package/dist/button-layout.js +19 -90
- package/dist/button.css-mistica.js +18 -21
- package/dist/card.d.ts +17 -7
- package/dist/card.js +275 -267
- package/dist/community/advanced-data-card.d.ts +1 -1
- package/dist/counter.css-mistica.js +48 -0
- package/dist/counter.css.d.ts +11 -0
- package/dist/counter.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/counter.d.ts +19 -0
- package/dist/counter.js +240 -0
- package/dist/generated/mistica-icons/icon-add-more-filled.js +1 -1
- package/dist/generated/mistica-icons/icon-add-more-light.js +1 -1
- package/dist/generated/mistica-icons/icon-add-more-regular.js +2 -2
- package/dist/generated/mistica-icons/icon-subtract-filled.d.ts +4 -0
- package/dist/generated/mistica-icons/icon-subtract-light.js +21 -10
- package/dist/generated/mistica-icons/icon-subtract-regular.js +29 -8
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -0
- package/dist/list.d.ts +3 -0
- package/dist/list.js +92 -92
- package/dist/loading-bar.js +5 -4
- package/dist/menu.js +11 -10
- package/dist/navigation-bar.js +27 -26
- package/dist/package-version.js +1 -1
- package/dist/snackbar.css-mistica.js +16 -13
- package/dist/snackbar.css.d.ts +3 -2
- package/dist/snackbar.d.ts +5 -1
- package/dist/snackbar.js +119 -64
- package/dist/theme.d.ts +6 -0
- package/dist/theme.js +52 -28
- package/dist-es/accordion.js +79 -78
- package/dist-es/button-layout.css-mistica.js +4 -6
- package/dist-es/button-layout.js +27 -98
- package/dist-es/button.css-mistica.js +3 -3
- package/dist-es/card.js +343 -338
- package/dist-es/counter.css-mistica.js +4 -0
- package/dist-es/counter.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/counter.js +187 -0
- package/dist-es/generated/mistica-icons/icon-add-more-filled.js +1 -1
- package/dist-es/generated/mistica-icons/icon-add-more-light.js +1 -1
- package/dist-es/generated/mistica-icons/icon-add-more-regular.js +2 -2
- package/dist-es/generated/mistica-icons/icon-subtract-light.js +24 -13
- package/dist-es/generated/mistica-icons/icon-subtract-regular.js +33 -12
- package/dist-es/index.js +1765 -1764
- package/dist-es/list.js +125 -125
- package/dist-es/loading-bar.js +12 -11
- package/dist-es/menu.js +9 -8
- package/dist-es/navigation-bar.js +26 -25
- package/dist-es/package-version.js +1 -1
- package/dist-es/snackbar.css-mistica.js +5 -2
- package/dist-es/snackbar.js +140 -85
- package/dist-es/style.css +1 -1
- package/dist-es/theme.js +56 -32
- package/package.json +1 -1
|
@@ -100,20 +100,21 @@ import de from "./grid-layout.js";
|
|
|
100
100
|
import { useSetModalState as me } from "./modal-context-provider.js";
|
|
101
101
|
import { Logo as j } from "./logo.js";
|
|
102
102
|
import { vars as H } from "./skins/skin-contract.css-mistica.js";
|
|
103
|
-
import { logoContainer as P, spacer as T, burgerMenu as ue, burgerMenuTransition as pe, spacerLarge as he, iconButtonVariants as ge, lineHeightFix as W, textWrapperVariants as F, burgerIconContainer as
|
|
103
|
+
import { logoContainer as P, spacer as T, burgerMenu as ue, burgerMenuTransition as pe, spacerLarge as he, iconButtonVariants as ge, lineHeightFix as W, textWrapperVariants as F, burgerIconContainer as fe, iconCloseOpen as Ne, iconCloseHidden as ve, iconMenuHidden as Be, iconMenuOpen as be, topFixed as Me, topFixedBottomRow as Ae, navigationBarContent as Te, navigationBarContentRight as Ie, section as Ce, selectedSectionVariantes as Se, navbarBorderColorVariants as C } from "./navigation-bar.css-mistica.js";
|
|
104
104
|
import { sprinkles as $ } from "./sprinkles.css-mistica.js";
|
|
105
105
|
import { getPrefixedDataAttributes as Oe } from "./utils/dom.js";
|
|
106
106
|
import Re from "./stack.js";
|
|
107
107
|
import xe from "./box.js";
|
|
108
|
-
|
|
108
|
+
import { isRunningAcceptanceTest as _e } from "./utils/platform.js";
|
|
109
|
+
const ke = (param)=>/* @__PURE__ */ {
|
|
109
110
|
let { isOpen: n } = param;
|
|
110
111
|
return i("div", {
|
|
111
|
-
className:
|
|
112
|
+
className: fe,
|
|
112
113
|
role: "presentation",
|
|
113
114
|
"data-component-name": "BurgerMenuIcon",
|
|
114
115
|
children: [
|
|
115
116
|
/* @__PURE__ */ e("div", {
|
|
116
|
-
className: n ?
|
|
117
|
+
className: n ? Ne : ve,
|
|
117
118
|
children: /* @__PURE__ */ e(te, {})
|
|
118
119
|
}),
|
|
119
120
|
/* @__PURE__ */ e("div", {
|
|
@@ -122,7 +123,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
122
123
|
})
|
|
123
124
|
]
|
|
124
125
|
});
|
|
125
|
-
},
|
|
126
|
+
}, Ee = 300, f = (param)=>{
|
|
126
127
|
let { children: n , topFixed: o , withBorder: t , isMenuOpen: r , isInverse: a , dataAttributes: c , isBottomRow: d = !1 } = param;
|
|
127
128
|
const { isDarkMode: s } = O();
|
|
128
129
|
return /* @__PURE__ */ e("header", _object_spread_props(_object_spread({
|
|
@@ -140,7 +141,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
140
141
|
}, Oe(c)), {
|
|
141
142
|
children: n
|
|
142
143
|
}));
|
|
143
|
-
},
|
|
144
|
+
}, Ge = 136, ye = 24, N = (param)=>{
|
|
144
145
|
let { right: n , children: o } = param;
|
|
145
146
|
const { isTabletOrSmaller: t } = R();
|
|
146
147
|
return /* @__PURE__ */ i("div", {
|
|
@@ -150,13 +151,13 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
150
151
|
n && /* @__PURE__ */ e("div", {
|
|
151
152
|
className: Ie,
|
|
152
153
|
style: {
|
|
153
|
-
marginLeft: t ?
|
|
154
|
+
marginLeft: t ? ye : Ge
|
|
154
155
|
},
|
|
155
156
|
children: n
|
|
156
157
|
})
|
|
157
158
|
]
|
|
158
159
|
});
|
|
159
|
-
},
|
|
160
|
+
}, dn = (param)=>{
|
|
160
161
|
let { sections: n , selectedIndex: o , right: t , isInverse: r = !1 , topFixed: a = !0 , withBorder: c = !0 , burgerMenuExtra: d , logo: s , large: p = !1 } = param;
|
|
161
162
|
const { texts: h , isDarkMode: q } = O(), [l, x] = S.useState(!1), [_, v] = S.useState("closed"), k = ne(), J = q ? 1 : 0.2, { isTabletOrSmaller: E } = R(), G = me();
|
|
162
163
|
if (s = s !== null && s !== void 0 ? s : /* @__PURE__ */ e(j, {
|
|
@@ -179,7 +180,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
179
180
|
children: [
|
|
180
181
|
/* @__PURE__ */ e(A, {
|
|
181
182
|
isInverse: r,
|
|
182
|
-
children: /* @__PURE__ */ e(
|
|
183
|
+
children: /* @__PURE__ */ e(f, {
|
|
183
184
|
topFixed: a,
|
|
184
185
|
withBorder: c,
|
|
185
186
|
isMenuOpen: l,
|
|
@@ -188,7 +189,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
188
189
|
"component-name": "MainNavigationBar"
|
|
189
190
|
},
|
|
190
191
|
children: /* @__PURE__ */ e(m, {
|
|
191
|
-
children: /* @__PURE__ */ e(
|
|
192
|
+
children: /* @__PURE__ */ e(N, {
|
|
192
193
|
right: t,
|
|
193
194
|
children: /* @__PURE__ */ i(u, {
|
|
194
195
|
space: 24,
|
|
@@ -200,7 +201,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
200
201
|
"aria-expanded": l,
|
|
201
202
|
"aria-controls": k,
|
|
202
203
|
onPress: l ? b : I,
|
|
203
|
-
children: /* @__PURE__ */ e(
|
|
204
|
+
children: /* @__PURE__ */ e(ke, {
|
|
204
205
|
isOpen: l
|
|
205
206
|
})
|
|
206
207
|
}),
|
|
@@ -237,7 +238,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
237
238
|
v("closed");
|
|
238
239
|
},
|
|
239
240
|
in: l,
|
|
240
|
-
timeout:
|
|
241
|
+
timeout: _e() ? 0 : Ee,
|
|
241
242
|
unmountOnExit: !0,
|
|
242
243
|
children: (K)=>/* @__PURE__ */ e(L, {
|
|
243
244
|
children: /* @__PURE__ */ e("nav", {
|
|
@@ -296,7 +297,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
296
297
|
return /* @__PURE__ */ i(A, {
|
|
297
298
|
isInverse: r,
|
|
298
299
|
children: [
|
|
299
|
-
/* @__PURE__ */ e(
|
|
300
|
+
/* @__PURE__ */ e(f, {
|
|
300
301
|
topFixed: a,
|
|
301
302
|
withBorder: c && !B,
|
|
302
303
|
isMenuOpen: l,
|
|
@@ -305,7 +306,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
305
306
|
"component-name": "MainNavigationBar"
|
|
306
307
|
},
|
|
307
308
|
children: /* @__PURE__ */ e(m, {
|
|
308
|
-
children: /* @__PURE__ */ e(
|
|
309
|
+
children: /* @__PURE__ */ e(N, {
|
|
309
310
|
right: t,
|
|
310
311
|
children: /* @__PURE__ */ i(u, {
|
|
311
312
|
space: 48,
|
|
@@ -321,7 +322,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
321
322
|
})
|
|
322
323
|
})
|
|
323
324
|
}),
|
|
324
|
-
B && /* @__PURE__ */ e(
|
|
325
|
+
B && /* @__PURE__ */ e(f, {
|
|
325
326
|
topFixed: a,
|
|
326
327
|
withBorder: c,
|
|
327
328
|
isBottomRow: !0,
|
|
@@ -331,7 +332,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
331
332
|
"component-name": "MainNavigationBar"
|
|
332
333
|
},
|
|
333
334
|
children: /* @__PURE__ */ e(m, {
|
|
334
|
-
children: /* @__PURE__ */ e(
|
|
335
|
+
children: /* @__PURE__ */ e(N, {
|
|
335
336
|
children: y()
|
|
336
337
|
})
|
|
337
338
|
})
|
|
@@ -341,9 +342,9 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
341
342
|
})
|
|
342
343
|
]
|
|
343
344
|
});
|
|
344
|
-
},
|
|
345
|
+
}, mn = (param)=>{
|
|
345
346
|
let { onBack: n , title: o , right: t , isInverse: r = !1 , topFixed: a = !0 , paddingX: c = 0 , withBorder: d = !0 } = param;
|
|
346
|
-
const { texts: s } = O(), p = /* @__PURE__ */ e(
|
|
347
|
+
const { texts: s } = O(), p = /* @__PURE__ */ e(N, {
|
|
347
348
|
right: t,
|
|
348
349
|
children: /* @__PURE__ */ i(u, {
|
|
349
350
|
space: 24,
|
|
@@ -368,7 +369,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
368
369
|
return /* @__PURE__ */ i(A, {
|
|
369
370
|
isInverse: r,
|
|
370
371
|
children: [
|
|
371
|
-
/* @__PURE__ */ e(
|
|
372
|
+
/* @__PURE__ */ e(f, {
|
|
372
373
|
topFixed: a,
|
|
373
374
|
withBorder: d,
|
|
374
375
|
isInverse: r,
|
|
@@ -392,7 +393,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
392
393
|
})
|
|
393
394
|
]
|
|
394
395
|
});
|
|
395
|
-
},
|
|
396
|
+
}, un = (param)=>{
|
|
396
397
|
let { logo: n , right: o , isInverse: t = !1 , topFixed: r = !0 , withBorder: a = !0 } = param;
|
|
397
398
|
const { isTabletOrSmaller: c } = R();
|
|
398
399
|
return n = n !== null && n !== void 0 ? n : /* @__PURE__ */ e(j, {
|
|
@@ -400,7 +401,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
400
401
|
}), /* @__PURE__ */ i(A, {
|
|
401
402
|
isInverse: t,
|
|
402
403
|
children: [
|
|
403
|
-
/* @__PURE__ */ e(
|
|
404
|
+
/* @__PURE__ */ e(f, {
|
|
404
405
|
topFixed: r,
|
|
405
406
|
withBorder: a,
|
|
406
407
|
isInverse: t,
|
|
@@ -410,7 +411,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
410
411
|
children: /* @__PURE__ */ e(m, {
|
|
411
412
|
children: /* @__PURE__ */ e(de, {
|
|
412
413
|
template: "10",
|
|
413
|
-
children: /* @__PURE__ */ e(
|
|
414
|
+
children: /* @__PURE__ */ e(N, {
|
|
414
415
|
right: o,
|
|
415
416
|
children: n
|
|
416
417
|
})
|
|
@@ -422,7 +423,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
422
423
|
})
|
|
423
424
|
]
|
|
424
425
|
});
|
|
425
|
-
},
|
|
426
|
+
}, pn = (param)=>/* @__PURE__ */ {
|
|
426
427
|
let { children: n } = param;
|
|
427
428
|
return e("div", {
|
|
428
429
|
className: W,
|
|
@@ -433,7 +434,7 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
433
434
|
children: n
|
|
434
435
|
})
|
|
435
436
|
});
|
|
436
|
-
},
|
|
437
|
+
}, hn = (_param)=>{
|
|
437
438
|
var { children: n } = _param, o = _object_without_properties(_param, [
|
|
438
439
|
"children"
|
|
439
440
|
]);
|
|
@@ -458,4 +459,4 @@ const _e = (param)=>/* @__PURE__ */ {
|
|
|
458
459
|
})
|
|
459
460
|
}));
|
|
460
461
|
};
|
|
461
|
-
export {
|
|
462
|
+
export { un as FunnelNavigationBar, dn as MainNavigationBar, mn as NavigationBar, hn as NavigationBarAction, pn as NavigationBarActionGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const o = "14.
|
|
1
|
+
const o = "14.30.0";
|
|
2
2
|
export { o as PACKAGE_VERSION };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./snackbar.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var
|
|
4
|
-
|
|
3
|
+
var b = 300, f = "o7bjb0a", _ = "_1y2v1nfb6 _1y2v1nfbi", r = {
|
|
4
|
+
centered: "o7bjb0e _1y2v1nfb6 _1y2v1nfb1 _1y2v1nfbl _1y2v1nfbf _1y2v1nff9",
|
|
5
|
+
topRight: "_1y2v1nfb6 _1y2v1nfb1 _1y2v1nfbl _1y2v1nfbf _1y2v1nff9 _1y2v1nfef"
|
|
6
|
+
}, y = "o7bjb0h _1y2v1nfc3 _1y2v1nfcj _1y2v1nfb6 _1y2v1nfbl _1y2v1nfbf _1y2v1nfdp", a = "o7bjb0b", o = "o7bjb01 _1y2v1nfbt _1y2v1nfb6 _1y2v1nfbf", t = "o7bjb02", p = "o7bjb04 _1y2v1nfb2 _1y2v1nfdz", e = "_1y2v1nf4g", i = "_1y2v1nf4h", j = "o7bjb07";
|
|
7
|
+
export { b as TRANSITION_TIME_IN_MS, f as button, _ as content, r as dismissButton, y as dismissIcon, a as longButton, o as snackbar, t as snackbarOpen, p as wrapper, e as wrapperCritical, i as wrapperInfo, j as wrapperOpen };
|
package/dist-es/snackbar.js
CHANGED
|
@@ -50,110 +50,165 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import { jsx as
|
|
54
|
-
import * as
|
|
55
|
-
import { BaseTouchable as
|
|
56
|
-
import
|
|
57
|
-
import { isWebViewBridgeAvailable as
|
|
58
|
-
import { useElementDimensions as
|
|
59
|
-
import { Text2 as
|
|
60
|
-
import { TRANSITION_TIME_IN_MS as
|
|
61
|
-
import { sprinkles as
|
|
62
|
-
import { vars as
|
|
63
|
-
import { getPrefixedDataAttributes as
|
|
64
|
-
import { Portal as
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
53
|
+
import { jsx as t, jsxs as S } from "react/jsx-runtime";
|
|
54
|
+
import * as a from "react";
|
|
55
|
+
import { BaseTouchable as b } from "./touchable.js";
|
|
56
|
+
import p from "classnames";
|
|
57
|
+
import { isWebViewBridgeAvailable as R, nativeMessage as k } from "@tef-novum/webview-bridge";
|
|
58
|
+
import { useTheme as E, useElementDimensions as D, useScreenSize as M } from "./hooks.js";
|
|
59
|
+
import { Text2 as U, Text3 as A } from "./text.js";
|
|
60
|
+
import { TRANSITION_TIME_IN_MS as _, snackbar as x, snackbarOpen as y, wrapper as L, wrapperCritical as w, wrapperInfo as W, wrapperOpen as P, content as z, button as C, longButton as j, dismissButton as F, dismissIcon as H } from "./snackbar.css-mistica.js";
|
|
61
|
+
import { sprinkles as g } from "./sprinkles.css-mistica.js";
|
|
62
|
+
import { vars as I } from "./skins/skin-contract.css-mistica.js";
|
|
63
|
+
import { getPrefixedDataAttributes as V } from "./utils/dom.js";
|
|
64
|
+
import { Portal as X } from "./portal.js";
|
|
65
|
+
import Y from "./generated/mistica-icons/icon-close-regular.js";
|
|
66
|
+
import $ from "./icon-button.js";
|
|
67
|
+
const q = 5e3, G = 1e4, J = (param)=>{
|
|
68
|
+
let { message: l , buttonText: o , duration: r , onClose: n , type: c , withDismiss: m = !1 , dataAttributes: f } = param;
|
|
69
|
+
const { texts: d } = E(), [i, e] = a.useState(!1), { width: N , ref: v } = D(), { isDesktopOrBigger: B } = M(), s = N > (B ? 160 : 128), T = r === 1 / 0 && !o || m, u = a.useCallback((h)=>{
|
|
70
|
+
e(!1), setTimeout(()=>{
|
|
71
|
+
n == null || n(h);
|
|
72
|
+
}, _);
|
|
71
73
|
}, [
|
|
72
74
|
n
|
|
73
75
|
]);
|
|
74
|
-
return
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
}, 50),
|
|
76
|
+
return a.useEffect(()=>{
|
|
77
|
+
const h = setTimeout(()=>{
|
|
78
|
+
e(!0);
|
|
79
|
+
}, 50), O = setTimeout(()=>{
|
|
80
|
+
u({
|
|
81
|
+
action: "TIMEOUT"
|
|
82
|
+
});
|
|
83
|
+
}, r);
|
|
78
84
|
return ()=>{
|
|
79
|
-
clearTimeout(
|
|
85
|
+
clearTimeout(h), clearTimeout(O);
|
|
80
86
|
};
|
|
81
87
|
}, [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
]), /* @__PURE__ */
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
className:
|
|
87
|
-
[
|
|
88
|
+
u,
|
|
89
|
+
r
|
|
90
|
+
]), /* @__PURE__ */ t(X, {
|
|
91
|
+
children: /* @__PURE__ */ t("div", {
|
|
92
|
+
className: p(x, {
|
|
93
|
+
[y]: i
|
|
88
94
|
}),
|
|
89
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ S("div", _object_spread_props(_object_spread({
|
|
90
96
|
role: "alert",
|
|
91
|
-
className:
|
|
92
|
-
[
|
|
97
|
+
className: p(L, c === "CRITICAL" ? w : W, {
|
|
98
|
+
[P]: i
|
|
93
99
|
})
|
|
94
|
-
},
|
|
95
|
-
children:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
100
|
+
}, V(f, "SnackBar")), {
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ S("div", {
|
|
103
|
+
className: p(z, g({
|
|
104
|
+
flexDirection: s ? "column" : "row",
|
|
105
|
+
alignItems: s ? void 0 : "center"
|
|
106
|
+
})),
|
|
107
|
+
style: T && !s ? {
|
|
108
|
+
paddingRight: 32
|
|
109
|
+
} : void 0,
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ t("div", {
|
|
112
|
+
style: T && s ? {
|
|
113
|
+
paddingRight: 32
|
|
114
|
+
} : void 0,
|
|
115
|
+
children: /* @__PURE__ */ t(U, {
|
|
116
|
+
regular: !0,
|
|
117
|
+
color: I.colors.textPrimaryInverse,
|
|
118
|
+
children: l
|
|
119
|
+
})
|
|
109
120
|
}),
|
|
110
|
-
|
|
111
|
-
className: p({
|
|
112
|
-
|
|
113
|
-
padding: 0,
|
|
114
|
-
background: "transparent",
|
|
115
|
-
color: "inherit"
|
|
121
|
+
o && /* @__PURE__ */ t("div", {
|
|
122
|
+
className: p(C, {
|
|
123
|
+
[j]: s
|
|
116
124
|
}),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
children: /* @__PURE__ */ t(b, {
|
|
126
|
+
className: g({
|
|
127
|
+
paddingY: 4,
|
|
128
|
+
paddingX: 8,
|
|
129
|
+
border: "none",
|
|
130
|
+
padding: 0,
|
|
131
|
+
background: "transparent"
|
|
132
|
+
}),
|
|
133
|
+
ref: v,
|
|
134
|
+
onPress: ()=>{
|
|
135
|
+
u({
|
|
136
|
+
action: "BUTTON"
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
children: /* @__PURE__ */ t(A, {
|
|
140
|
+
medium: !0,
|
|
141
|
+
forceMobileSizes: !0,
|
|
142
|
+
truncate: !0,
|
|
143
|
+
color: c === "CRITICAL" ? I.colors.textPrimaryInverse : I.colors.textLinkSnackbar,
|
|
144
|
+
children: o
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
}),
|
|
150
|
+
T ? /* @__PURE__ */ t($, {
|
|
151
|
+
size: 32,
|
|
152
|
+
onPress: ()=>{
|
|
153
|
+
u({
|
|
154
|
+
action: "DISMISS"
|
|
155
|
+
});
|
|
156
|
+
},
|
|
157
|
+
"aria-label": d.closeButtonLabel,
|
|
158
|
+
className: F[s ? "topRight" : "centered"],
|
|
159
|
+
style: {
|
|
160
|
+
display: "flex"
|
|
161
|
+
},
|
|
162
|
+
children: /* @__PURE__ */ t("div", {
|
|
163
|
+
className: H,
|
|
164
|
+
children: /* @__PURE__ */ t(Y, {
|
|
165
|
+
color: I.colors.inverse,
|
|
166
|
+
size: 20
|
|
124
167
|
})
|
|
125
168
|
})
|
|
126
|
-
|
|
127
|
-
|
|
169
|
+
}) : null
|
|
170
|
+
]
|
|
128
171
|
}))
|
|
129
172
|
})
|
|
130
173
|
});
|
|
131
|
-
},
|
|
132
|
-
let { message:
|
|
133
|
-
const
|
|
134
|
-
|
|
174
|
+
}, K = (param)=>{
|
|
175
|
+
let { message: l , buttonText: o , duration: r , onClose: n = ()=>{} , type: c = "INFORMATIVE" , withDismiss: m } = param;
|
|
176
|
+
const f = o ? G : q;
|
|
177
|
+
r = Math.max(r !== null && r !== void 0 ? r : f, f);
|
|
178
|
+
const d = R(), i = a.useRef(n);
|
|
179
|
+
return a.useEffect(()=>{
|
|
135
180
|
i.current = n;
|
|
136
181
|
}, [
|
|
137
182
|
n
|
|
138
|
-
]),
|
|
139
|
-
|
|
140
|
-
message:
|
|
141
|
-
duration
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
183
|
+
]), a.useEffect(()=>{
|
|
184
|
+
d && k({
|
|
185
|
+
message: l,
|
|
186
|
+
// @ts-expect-error duration can be 'PERSISTENT' in new webview-bridge lib versions, and old apps will ignore it
|
|
187
|
+
duration: r === 1 / 0 ? "PERSISTENT" : void 0,
|
|
188
|
+
buttonText: o,
|
|
189
|
+
type: c,
|
|
190
|
+
withDismiss: m
|
|
191
|
+
}).then((e)=>{
|
|
192
|
+
!e || typeof e != "object" || !("action" in e) || typeof e.action != "string" || e.action !== "DISMISS" && e.action !== "TIMEOUT" && e.action !== "BUTTON" ? i.current({
|
|
193
|
+
action: "DISMISS"
|
|
194
|
+
}) : i.current({
|
|
195
|
+
action: e.action
|
|
196
|
+
});
|
|
197
|
+
});
|
|
145
198
|
}, [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
199
|
+
o,
|
|
200
|
+
r,
|
|
201
|
+
l,
|
|
202
|
+
d,
|
|
149
203
|
c,
|
|
150
|
-
|
|
151
|
-
]),
|
|
152
|
-
message:
|
|
153
|
-
duration:
|
|
154
|
-
buttonText:
|
|
155
|
-
type:
|
|
156
|
-
onClose: i.current
|
|
204
|
+
m
|
|
205
|
+
]), d ? null : /* @__PURE__ */ t(J, {
|
|
206
|
+
message: l,
|
|
207
|
+
duration: r,
|
|
208
|
+
buttonText: o,
|
|
209
|
+
type: c,
|
|
210
|
+
onClose: i.current,
|
|
211
|
+
withDismiss: m
|
|
157
212
|
});
|
|
158
|
-
},
|
|
159
|
-
export {
|
|
213
|
+
}, fe = K;
|
|
214
|
+
export { fe as default };
|