@telefonica/mistica 14.42.0 → 14.43.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 +0 -2
- package/dist/carousel.d.ts +5 -5
- package/dist/carousel.js +169 -153
- package/dist/cvv-field.js +85 -40
- package/dist/dialog.js +66 -65
- package/dist/feedback.css-mistica.js +14 -8
- package/dist/feedback.css.d.ts +2 -0
- package/dist/feedback.js +56 -49
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -1
- package/dist/package-version.js +1 -1
- package/dist/popover.css-mistica.js +4 -43
- package/dist/popover.css.d.ts +1 -12
- package/dist/popover.d.ts +6 -2
- package/dist/popover.js +71 -226
- package/dist/select.js +176 -172
- package/dist/text.css-mistica.js +7 -7
- package/dist/text.css.d.ts +0 -1
- package/dist/text.js +24 -24
- package/dist/theme.d.ts +2 -1
- package/dist/theme.js +17 -13
- package/dist/tooltip.css-mistica.js +15 -6
- package/dist/tooltip.css.d.ts +3 -0
- package/dist/tooltip.d.ts +15 -1
- package/dist/tooltip.js +213 -140
- package/dist-es/carousel.js +193 -176
- package/dist-es/cvv-field.js +73 -69
- package/dist-es/dialog.js +126 -125
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/feedback.js +90 -83
- package/dist-es/index.js +1734 -1734
- package/dist-es/package-version.js +1 -1
- package/dist-es/popover.css-mistica.js +2 -3
- package/dist-es/popover.js +75 -191
- package/dist-es/select.js +182 -178
- package/dist-es/style.css +1 -1
- package/dist-es/text.css-mistica.js +3 -3
- package/dist-es/text.js +32 -32
- package/dist-es/theme.js +16 -12
- package/dist-es/tooltip.css-mistica.js +2 -2
- package/dist-es/tooltip.js +234 -169
- package/package.json +4 -4
package/dist-es/feedback.js
CHANGED
|
@@ -79,95 +79,96 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
81
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
82
|
-
import * as
|
|
83
|
-
import { useTheme as
|
|
82
|
+
import * as v from "react";
|
|
83
|
+
import { useTheme as F, useWindowHeight as Q, useScreenSize as O, useIsomorphicLayoutEffect as Y } from "./hooks.js";
|
|
84
84
|
import { tabletOrSmaller as Z } from "./media-queries.css-mistica.js";
|
|
85
85
|
import ee from "./button-fixed-footer-layout.js";
|
|
86
86
|
import oe from "./overscroll-color-context.js";
|
|
87
|
-
import { O2_CLASSIC_SKIN as C, VIVO_SKIN as
|
|
88
|
-
import
|
|
89
|
-
import
|
|
87
|
+
import { O2_CLASSIC_SKIN as C, VIVO_SKIN as H, VIVO_NEW_SKIN as $ } from "./skins/constants.js";
|
|
88
|
+
import w from "./icons/icon-success.js";
|
|
89
|
+
import E from "./icons/icon-success-vivo.js";
|
|
90
90
|
import re from "./icons/icon-error.js";
|
|
91
91
|
import te from "./icons/icon-info.js";
|
|
92
92
|
import { isWebViewBridgeAvailable as ce, requestVibration as ne } from "@tef-novum/webview-bridge";
|
|
93
93
|
import { isRunningAcceptanceTest as ie } from "./utils/platform.js";
|
|
94
|
-
import { Text2 as
|
|
94
|
+
import { Text2 as ae, Text6 as se, Text3 as de } from "./text.js";
|
|
95
95
|
import b from "./box.js";
|
|
96
96
|
import { InternalBoxed as le } from "./boxed.js";
|
|
97
97
|
import me from "./responsive-layout.js";
|
|
98
|
-
import
|
|
99
|
-
import
|
|
98
|
+
import p from "./stack.js";
|
|
99
|
+
import u from "classnames";
|
|
100
100
|
import ue from "./button-group.js";
|
|
101
|
-
import { vars as
|
|
102
|
-
import {
|
|
103
|
-
import
|
|
104
|
-
|
|
101
|
+
import { vars as d } from "./skins/skin-contract.css-mistica.js";
|
|
102
|
+
import { feedbackScreenInverse as pe, container as be, innerContainer as fe, innerContainerWithButtons as he, backgroundBrand as ke, iconContainer as ge, feedbackData as Se, feedbackTextAppearFast as ve, feedbackTextAppearMedium as V, feedbackTextAppearSlow as Fe, desktopContainer as xe, desktopContent as Ie, desktopImage as Ne } from "./feedback.css-mistica.js";
|
|
103
|
+
import _ from "./icons/icon-success-vivo-new.js";
|
|
104
|
+
import { ThemeVariant as Te } from "./theme-variant-context.js";
|
|
105
|
+
const D = (r)=>!ie(r), R = (param)=>{
|
|
105
106
|
let { primaryButton: r, secondaryButton: o } = param;
|
|
106
107
|
return !!r || !!o;
|
|
107
|
-
},
|
|
108
|
+
}, Be = (param)=>{
|
|
108
109
|
let { isInverse: r } = param;
|
|
109
110
|
const o = `@media ${Z} {
|
|
110
|
-
body {background:${r ?
|
|
111
|
+
body {background:${r ? d.colors.backgroundBrand : d.colors.background}; background-attachment: fixed;}
|
|
111
112
|
}`;
|
|
112
113
|
return /* @__PURE__ */ e("style", {
|
|
113
114
|
children: o
|
|
114
115
|
});
|
|
115
|
-
},
|
|
116
|
+
}, z = (r)=>{
|
|
116
117
|
ce() && ne(r).catch(()=>{});
|
|
117
118
|
}, W = (r)=>{
|
|
118
|
-
|
|
119
|
+
v.useEffect(()=>{
|
|
119
120
|
let o;
|
|
120
|
-
return r === "success" && (o = setTimeout(()=>
|
|
121
|
+
return r === "success" && (o = setTimeout(()=>z("success"), 700)), r === "error" && (o = setTimeout(()=>z("error"), 1e3)), ()=>{
|
|
121
122
|
clearTimeout(o);
|
|
122
123
|
};
|
|
123
124
|
}, [
|
|
124
125
|
r
|
|
125
126
|
]);
|
|
126
|
-
},
|
|
127
|
+
}, L = (param, n)=>{
|
|
127
128
|
let { icon: r, title: o, description: t, extra: c } = param;
|
|
128
|
-
const i = t && Array.isArray(t) ? /* @__PURE__ */ e(
|
|
129
|
+
const i = t && Array.isArray(t) ? /* @__PURE__ */ e(p, {
|
|
129
130
|
space: 16,
|
|
130
|
-
children: t.map((
|
|
131
|
-
children:
|
|
131
|
+
children: t.map((s, m)=>/* @__PURE__ */ e("p", {
|
|
132
|
+
children: s
|
|
132
133
|
}, m))
|
|
133
134
|
}) : t;
|
|
134
|
-
return /* @__PURE__ */ l(
|
|
135
|
+
return /* @__PURE__ */ l(p, {
|
|
135
136
|
space: 24,
|
|
136
137
|
children: [
|
|
137
138
|
/* @__PURE__ */ e("div", {
|
|
138
|
-
className:
|
|
139
|
+
className: ge,
|
|
139
140
|
children: r
|
|
140
141
|
}),
|
|
141
|
-
/* @__PURE__ */ l(
|
|
142
|
+
/* @__PURE__ */ l(p, {
|
|
142
143
|
space: 16,
|
|
143
|
-
className:
|
|
144
|
+
className: u(Se),
|
|
144
145
|
children: [
|
|
145
146
|
/* @__PURE__ */ e("div", {
|
|
146
|
-
className:
|
|
147
|
-
children: /* @__PURE__ */ e(
|
|
147
|
+
className: u(n && ve),
|
|
148
|
+
children: /* @__PURE__ */ e(se, {
|
|
148
149
|
as: "h1",
|
|
149
150
|
children: o
|
|
150
151
|
})
|
|
151
152
|
}),
|
|
152
153
|
i && /* @__PURE__ */ e("div", {
|
|
153
|
-
className:
|
|
154
|
+
className: u(n && V),
|
|
154
155
|
children: i && /* @__PURE__ */ e(de, {
|
|
155
156
|
regular: !0,
|
|
156
|
-
color:
|
|
157
|
+
color: d.colors.textSecondary,
|
|
157
158
|
children: i
|
|
158
159
|
})
|
|
159
160
|
}),
|
|
160
161
|
c && /* @__PURE__ */ e("div", {
|
|
161
|
-
className:
|
|
162
|
+
className: u(n && (i ? Fe : V)),
|
|
162
163
|
children: c
|
|
163
164
|
})
|
|
164
165
|
]
|
|
165
166
|
})
|
|
166
167
|
]
|
|
167
168
|
});
|
|
168
|
-
},
|
|
169
|
-
const t =
|
|
170
|
-
return /* @__PURE__ */ l(
|
|
169
|
+
}, q = (r, o)=>{
|
|
170
|
+
const t = R(o);
|
|
171
|
+
return /* @__PURE__ */ l(p, {
|
|
171
172
|
space: {
|
|
172
173
|
desktop: 40,
|
|
173
174
|
mobile: 24
|
|
@@ -177,18 +178,18 @@ const R = (r)=>!ie(r), L = (param)=>{
|
|
|
177
178
|
t && /* @__PURE__ */ e(ue, _object_spread({}, o))
|
|
178
179
|
]
|
|
179
180
|
});
|
|
180
|
-
},
|
|
181
|
+
}, K = (param)=>{
|
|
181
182
|
let { isInverse: r, body: o, imageFit: t, imageUrl: c, dataAttributes: n } = param;
|
|
182
183
|
return /* @__PURE__ */ e(le, {
|
|
183
|
-
borderRadius:
|
|
184
|
+
borderRadius: d.borderRadii.legacyDisplay,
|
|
184
185
|
desktopOnly: !0,
|
|
185
186
|
isInverse: r,
|
|
186
187
|
dataAttributes: n,
|
|
187
188
|
children: /* @__PURE__ */ l("div", {
|
|
188
|
-
className:
|
|
189
|
+
className: xe,
|
|
189
190
|
children: [
|
|
190
191
|
/* @__PURE__ */ e("div", {
|
|
191
|
-
className:
|
|
192
|
+
className: Ie,
|
|
192
193
|
children: /* @__PURE__ */ e(b, {
|
|
193
194
|
padding: {
|
|
194
195
|
desktop: 64,
|
|
@@ -199,7 +200,7 @@ const R = (r)=>!ie(r), L = (param)=>{
|
|
|
199
200
|
})
|
|
200
201
|
}),
|
|
201
202
|
c && /* @__PURE__ */ e("div", {
|
|
202
|
-
className:
|
|
203
|
+
className: Ne,
|
|
203
204
|
style: {
|
|
204
205
|
backgroundImage: `url(${c})`,
|
|
205
206
|
backgroundPosition: t === "fit" ? "bottom right" : "center right",
|
|
@@ -213,53 +214,59 @@ const R = (r)=>!ie(r), L = (param)=>{
|
|
|
213
214
|
})
|
|
214
215
|
});
|
|
215
216
|
}, x = (param)=>{
|
|
216
|
-
let { title: r, description: o, children: t, extra: c, primaryButton: n, secondaryButton: i, link:
|
|
217
|
+
let { title: r, description: o, children: t, extra: c, primaryButton: n, secondaryButton: i, link: s, hapticFeedback: m, icon: f, animateText: h = !1, isInverse: a = !1, unstable_inlineInDesktop: k, imageUrl: I, imageFit: g, dataAttributes: S } = param;
|
|
217
218
|
W(m);
|
|
218
|
-
const { platformOverrides:
|
|
219
|
+
const { platformOverrides: j, isDarkMode: M, skinName: N } = F(), G = Q(), { isTabletOrSmaller: P } = O(), [U, X] = v.useState(typeof self < "u"), [T, J] = v.useState(0), B = U ? "100vh" : `${G - T}px`, y = R({
|
|
219
220
|
primaryButton: n,
|
|
220
221
|
secondaryButton: i,
|
|
221
|
-
link:
|
|
222
|
+
link: s
|
|
222
223
|
});
|
|
223
224
|
Y(()=>{
|
|
224
225
|
X(!1);
|
|
225
226
|
}, []);
|
|
226
|
-
const
|
|
227
|
+
const A = L({
|
|
227
228
|
icon: f,
|
|
228
229
|
title: r,
|
|
229
230
|
description: o,
|
|
230
231
|
extra: c !== null && c !== void 0 ? c : t
|
|
231
|
-
},
|
|
232
|
-
return !P &&
|
|
232
|
+
}, h && D(j));
|
|
233
|
+
return !P && k ? q(A, {
|
|
233
234
|
primaryButton: n,
|
|
234
235
|
secondaryButton: i,
|
|
235
|
-
link:
|
|
236
|
+
link: s
|
|
236
237
|
}) : /* @__PURE__ */ l("div", {
|
|
237
238
|
style: {
|
|
238
239
|
position: "relative"
|
|
239
240
|
},
|
|
241
|
+
className: a ? pe : void 0,
|
|
240
242
|
children: [
|
|
241
|
-
|
|
243
|
+
a && /* @__PURE__ */ e(Te, {
|
|
244
|
+
isInverse: !0,
|
|
245
|
+
children: /* @__PURE__ */ e(oe, {})
|
|
246
|
+
}),
|
|
242
247
|
/* @__PURE__ */ e(me, {
|
|
243
248
|
children: /* @__PURE__ */ e(b, {
|
|
244
249
|
paddingTop: {
|
|
245
250
|
desktop: 64,
|
|
246
251
|
mobile: 0
|
|
247
252
|
},
|
|
248
|
-
children:
|
|
249
|
-
isInverse:
|
|
253
|
+
children: K({
|
|
254
|
+
isInverse: a,
|
|
250
255
|
body: /* @__PURE__ */ e(ee, {
|
|
251
|
-
isFooterVisible:
|
|
256
|
+
isFooterVisible: y,
|
|
252
257
|
button: n,
|
|
253
258
|
secondaryButton: i,
|
|
254
|
-
link:
|
|
255
|
-
footerBgColor:
|
|
256
|
-
containerBgColor:
|
|
259
|
+
link: s,
|
|
260
|
+
footerBgColor: a && !M ? d.colors.backgroundFeedbackBottom : void 0,
|
|
261
|
+
containerBgColor: "transparent",
|
|
257
262
|
onChangeFooterHeight: J,
|
|
258
263
|
children: /* @__PURE__ */ e("div", {
|
|
259
|
-
className:
|
|
264
|
+
className: be,
|
|
260
265
|
children: /* @__PURE__ */ e("div", {
|
|
261
|
-
className:
|
|
262
|
-
|
|
266
|
+
className: u(fe, {
|
|
267
|
+
[he]: n || i || s
|
|
268
|
+
}),
|
|
269
|
+
children: A
|
|
263
270
|
})
|
|
264
271
|
})
|
|
265
272
|
}),
|
|
@@ -269,37 +276,37 @@ const R = (r)=>!ie(r), L = (param)=>{
|
|
|
269
276
|
})
|
|
270
277
|
})
|
|
271
278
|
}),
|
|
272
|
-
|
|
279
|
+
N === C && /* @__PURE__ */ e("div", {
|
|
273
280
|
style: {
|
|
274
281
|
position: "absolute",
|
|
275
|
-
bottom:
|
|
282
|
+
bottom: T,
|
|
276
283
|
top: 0,
|
|
277
284
|
left: 0,
|
|
278
285
|
right: 0,
|
|
279
286
|
// This extra height is a workaround to make sure the background div is displayed *under* the fixed footer.
|
|
280
287
|
// Otherwise in some devices (Galaxy S20+) the background and the fixed footer are rendered with some distance between them
|
|
281
|
-
height:
|
|
282
|
-
background:
|
|
288
|
+
height: y ? `calc(${B} + 1px)` : `calc(${B})`,
|
|
289
|
+
background: a ? d.colors.backgroundBrand : d.colors.background
|
|
283
290
|
}
|
|
284
291
|
}),
|
|
285
|
-
|
|
286
|
-
isInverse:
|
|
292
|
+
N !== C && /* @__PURE__ */ e(Be, {
|
|
293
|
+
isInverse: a
|
|
287
294
|
})
|
|
288
295
|
]
|
|
289
296
|
});
|
|
290
|
-
},
|
|
297
|
+
}, Je = (_param)=>{
|
|
291
298
|
var { dataAttributes: r } = _param, o = _object_without_properties(_param, [
|
|
292
299
|
"dataAttributes"
|
|
293
300
|
]);
|
|
294
|
-
const { isTabletOrSmaller: t } =
|
|
301
|
+
const { isTabletOrSmaller: t } = O(), { skinName: c } = F();
|
|
295
302
|
return /* @__PURE__ */ e(x, _object_spread_props(_object_spread({}, o), {
|
|
296
303
|
isInverse: !o.unstable_inlineInDesktop || t,
|
|
297
304
|
hapticFeedback: "success",
|
|
298
|
-
icon: c ===
|
|
305
|
+
icon: c === H ? /* @__PURE__ */ e(E, {
|
|
299
306
|
size: "100%"
|
|
300
|
-
}) : c ===
|
|
307
|
+
}) : c === $ ? /* @__PURE__ */ e(_, {
|
|
301
308
|
size: "100%"
|
|
302
|
-
}) : /* @__PURE__ */ e(
|
|
309
|
+
}) : /* @__PURE__ */ e(w, {
|
|
303
310
|
size: "100%"
|
|
304
311
|
}),
|
|
305
312
|
animateText: !0,
|
|
@@ -309,7 +316,7 @@ const R = (r)=>!ie(r), L = (param)=>{
|
|
|
309
316
|
"component-name": "SuccessFeedbackScreen"
|
|
310
317
|
}, r)
|
|
311
318
|
}));
|
|
312
|
-
},
|
|
319
|
+
}, Qe = (_param)=>{
|
|
313
320
|
var { children: r, errorReference: o, dataAttributes: t } = _param, c = _object_without_properties(_param, [
|
|
314
321
|
"children",
|
|
315
322
|
"errorReference",
|
|
@@ -324,19 +331,19 @@ const R = (r)=>!ie(r), L = (param)=>{
|
|
|
324
331
|
dataAttributes: _object_spread({
|
|
325
332
|
"component-name": "ErrorFeedbackScreen"
|
|
326
333
|
}, t),
|
|
327
|
-
extra: /* @__PURE__ */ l(
|
|
334
|
+
extra: /* @__PURE__ */ l(p, {
|
|
328
335
|
space: 16,
|
|
329
336
|
children: [
|
|
330
337
|
r,
|
|
331
|
-
o && /* @__PURE__ */ e(
|
|
332
|
-
color:
|
|
338
|
+
o && /* @__PURE__ */ e(ae, {
|
|
339
|
+
color: d.colors.textSecondary,
|
|
333
340
|
regular: !0,
|
|
334
341
|
children: o
|
|
335
342
|
})
|
|
336
343
|
]
|
|
337
344
|
})
|
|
338
345
|
}));
|
|
339
|
-
},
|
|
346
|
+
}, Ye = (_param)=>{
|
|
340
347
|
var { dataAttributes: r, Icon: o = te } = _param, t = _object_without_properties(_param, [
|
|
341
348
|
"dataAttributes",
|
|
342
349
|
"Icon"
|
|
@@ -349,29 +356,29 @@ const R = (r)=>!ie(r), L = (param)=>{
|
|
|
349
356
|
size: "100%"
|
|
350
357
|
})
|
|
351
358
|
}, t));
|
|
352
|
-
},
|
|
353
|
-
let { title: r, description: o, children: t, extra: c, primaryButton: n, secondaryButton: i, link:
|
|
359
|
+
}, Ze = (param)=>{
|
|
360
|
+
let { title: r, description: o, children: t, extra: c, primaryButton: n, secondaryButton: i, link: s, imageUrl: m, imageFit: f, dataAttributes: h } = param;
|
|
354
361
|
W("success");
|
|
355
|
-
const { skinName:
|
|
356
|
-
icon:
|
|
362
|
+
const { skinName: a, platformOverrides: k } = F(), g = L({
|
|
363
|
+
icon: a === H ? /* @__PURE__ */ e(E, {
|
|
357
364
|
size: "100%"
|
|
358
|
-
}) :
|
|
365
|
+
}) : a === $ ? /* @__PURE__ */ e(_, {
|
|
359
366
|
size: "100%"
|
|
360
|
-
}) : /* @__PURE__ */ e(
|
|
367
|
+
}) : /* @__PURE__ */ e(w, {
|
|
361
368
|
size: "100%"
|
|
362
369
|
}),
|
|
363
370
|
title: r,
|
|
364
371
|
description: o,
|
|
365
372
|
extra: c !== null && c !== void 0 ? c : t
|
|
366
|
-
},
|
|
373
|
+
}, D(k)), S = q(g, {
|
|
367
374
|
primaryButton: n,
|
|
368
375
|
secondaryButton: i,
|
|
369
|
-
link:
|
|
376
|
+
link: s
|
|
370
377
|
});
|
|
371
|
-
return
|
|
378
|
+
return K({
|
|
372
379
|
isInverse: !0,
|
|
373
380
|
body: /* @__PURE__ */ e("div", {
|
|
374
|
-
className:
|
|
381
|
+
className: ke,
|
|
375
382
|
children: /* @__PURE__ */ e(b, {
|
|
376
383
|
paddingX: {
|
|
377
384
|
mobile: 16,
|
|
@@ -392,7 +399,7 @@ const R = (r)=>!ie(r), L = (param)=>{
|
|
|
392
399
|
imageUrl: m,
|
|
393
400
|
dataAttributes: _object_spread({
|
|
394
401
|
"component-name": "SuccessFeedback"
|
|
395
|
-
},
|
|
402
|
+
}, h)
|
|
396
403
|
});
|
|
397
404
|
};
|
|
398
|
-
export {
|
|
405
|
+
export { Qe as ErrorFeedbackScreen, x as FeedbackScreen, Ye as InfoFeedbackScreen, Ze as SuccessFeedback, Je as SuccessFeedbackScreen };
|