@telefonica/mistica 14.42.0 → 14.42.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.
@@ -79,43 +79,44 @@ 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 F from "react";
83
- import { useTheme as v, useWindowHeight as Q, useScreenSize as H, useIsomorphicLayoutEffect as Y } from "./hooks.js";
82
+ import * as v from "react";
83
+ import { useTheme as F, useWindowHeight as Q, useScreenSize as H, 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 $, VIVO_NEW_SKIN as w } from "./skins/constants.js";
87
+ import { O2_CLASSIC_SKIN as V, VIVO_SKIN as $, VIVO_NEW_SKIN as w } from "./skins/constants.js";
88
88
  import E from "./icons/icon-success.js";
89
89
  import _ 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 se, Text6 as ae, Text3 as de } from "./text.js";
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 u from "./stack.js";
99
- import p from "classnames";
98
+ import p from "./stack.js";
99
+ import u from "classnames";
100
100
  import ue from "./button-group.js";
101
- import { vars as a } from "./skins/skin-contract.css-mistica.js";
102
- import { container as pe, innerContainer as be, backgroundBrand as fe, iconContainer as ke, feedbackData as he, feedbackTextAppearFast as ge, feedbackTextAppearMedium as V, feedbackTextAppearSlow as Se, desktopContainer as Fe, desktopContent as ve, desktopImage as xe } from "./feedback.css-mistica.js";
101
+ import { vars as s } 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 z, feedbackTextAppearSlow as Fe, desktopContainer as xe, desktopContent as Ie, desktopImage as Ne } from "./feedback.css-mistica.js";
103
103
  import D from "./icons/icon-success-vivo-new.js";
104
- const R = (r)=>!ie(r), L = (param)=>{
104
+ import { ThemeVariant as Be } from "./theme-variant-context.js";
105
+ const R = (r)=>!ie(r), W = (param)=>{
105
106
  let { primaryButton: r, secondaryButton: o } = param;
106
107
  return !!r || !!o;
107
- }, Ie = (param)=>{
108
+ }, Te = (param)=>{
108
109
  let { isInverse: r } = param;
109
110
  const o = `@media ${Z} {
110
- body {background:${r ? a.colors.backgroundBrand : a.colors.background}}
111
+ body {background:${r ? s.colors.backgroundBrand : s.colors.background}}
111
112
  }`;
112
113
  return /* @__PURE__ */ e("style", {
113
114
  children: o
114
115
  });
115
116
  }, O = (r)=>{
116
117
  ce() && ne(r).catch(()=>{});
117
- }, W = (r)=>{
118
- F.useEffect(()=>{
118
+ }, L = (r)=>{
119
+ v.useEffect(()=>{
119
120
  let o;
120
121
  return r === "success" && (o = setTimeout(()=>O("success"), 700)), r === "error" && (o = setTimeout(()=>O("error"), 1e3)), ()=>{
121
122
  clearTimeout(o);
@@ -125,40 +126,40 @@ const R = (r)=>!ie(r), L = (param)=>{
125
126
  ]);
126
127
  }, q = (param, n)=>{
127
128
  let { icon: r, title: o, description: t, extra: c } = param;
128
- const i = t && Array.isArray(t) ? /* @__PURE__ */ e(u, {
129
+ const i = t && Array.isArray(t) ? /* @__PURE__ */ e(p, {
129
130
  space: 16,
130
131
  children: t.map((d, m)=>/* @__PURE__ */ e("p", {
131
132
  children: d
132
133
  }, m))
133
134
  }) : t;
134
- return /* @__PURE__ */ l(u, {
135
+ return /* @__PURE__ */ l(p, {
135
136
  space: 24,
136
137
  children: [
137
138
  /* @__PURE__ */ e("div", {
138
- className: ke,
139
+ className: ge,
139
140
  children: r
140
141
  }),
141
- /* @__PURE__ */ l(u, {
142
+ /* @__PURE__ */ l(p, {
142
143
  space: 16,
143
- className: p(he),
144
+ className: u(Se),
144
145
  children: [
145
146
  /* @__PURE__ */ e("div", {
146
- className: p(n && ge),
147
- children: /* @__PURE__ */ e(ae, {
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: p(n && V),
154
+ className: u(n && z),
154
155
  children: i && /* @__PURE__ */ e(de, {
155
156
  regular: !0,
156
- color: a.colors.textSecondary,
157
+ color: s.colors.textSecondary,
157
158
  children: i
158
159
  })
159
160
  }),
160
161
  c && /* @__PURE__ */ e("div", {
161
- className: p(n && (i ? Se : V)),
162
+ className: u(n && (i ? Fe : z)),
162
163
  children: c
163
164
  })
164
165
  ]
@@ -166,8 +167,8 @@ const R = (r)=>!ie(r), L = (param)=>{
166
167
  ]
167
168
  });
168
169
  }, K = (r, o)=>{
169
- const t = L(o);
170
- return /* @__PURE__ */ l(u, {
170
+ const t = W(o);
171
+ return /* @__PURE__ */ l(p, {
171
172
  space: {
172
173
  desktop: 40,
173
174
  mobile: 24
@@ -180,15 +181,15 @@ const R = (r)=>!ie(r), L = (param)=>{
180
181
  }, j = (param)=>{
181
182
  let { isInverse: r, body: o, imageFit: t, imageUrl: c, dataAttributes: n } = param;
182
183
  return /* @__PURE__ */ e(le, {
183
- borderRadius: a.borderRadii.legacyDisplay,
184
+ borderRadius: s.borderRadii.legacyDisplay,
184
185
  desktopOnly: !0,
185
186
  isInverse: r,
186
187
  dataAttributes: n,
187
188
  children: /* @__PURE__ */ l("div", {
188
- className: Fe,
189
+ className: xe,
189
190
  children: [
190
191
  /* @__PURE__ */ e("div", {
191
- className: ve,
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: xe,
203
+ className: Ne,
203
204
  style: {
204
205
  backgroundImage: `url(${c})`,
205
206
  backgroundPosition: t === "fit" ? "bottom right" : "center right",
@@ -213,9 +214,9 @@ 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: d, hapticFeedback: m, icon: f, animateText: k = !1, isInverse: s = !1, unstable_inlineInDesktop: h, imageUrl: I, imageFit: g, dataAttributes: S } = param;
217
- W(m);
218
- const { platformOverrides: M, isDarkMode: N, skinName: B } = v(), G = Q(), { isTabletOrSmaller: P } = H(), [U, X] = F.useState(typeof self < "u"), [y, J] = F.useState(0), T = U ? "100vh" : `${G - y}px`, A = L({
217
+ let { title: r, description: o, children: t, extra: c, primaryButton: n, secondaryButton: i, link: d, hapticFeedback: m, icon: f, animateText: h = !1, isInverse: a = !1, unstable_inlineInDesktop: k, imageUrl: I, imageFit: g, dataAttributes: S } = param;
218
+ L(m);
219
+ const { platformOverrides: M, isDarkMode: N, skinName: B } = F(), G = Q(), { isTabletOrSmaller: P } = H(), [U, X] = v.useState(typeof self < "u"), [T, J] = v.useState(0), y = U ? "100vh" : `${G - T}px`, A = W({
219
220
  primaryButton: n,
220
221
  secondaryButton: i,
221
222
  link: d
@@ -223,13 +224,13 @@ const R = (r)=>!ie(r), L = (param)=>{
223
224
  Y(()=>{
224
225
  X(!1);
225
226
  }, []);
226
- const z = q({
227
+ const C = q({
227
228
  icon: f,
228
229
  title: r,
229
230
  description: o,
230
231
  extra: c !== null && c !== void 0 ? c : t
231
- }, k && R(M));
232
- return !P && h ? K(z, {
232
+ }, h && R(M));
233
+ return !P && k ? K(C, {
233
234
  primaryButton: n,
234
235
  secondaryButton: i,
235
236
  link: d
@@ -237,8 +238,12 @@ const R = (r)=>!ie(r), L = (param)=>{
237
238
  style: {
238
239
  position: "relative"
239
240
  },
241
+ className: a ? pe : void 0,
240
242
  children: [
241
- s && /* @__PURE__ */ e(oe, {}),
243
+ a && /* @__PURE__ */ e(Be, {
244
+ isInverse: !0,
245
+ children: /* @__PURE__ */ e(oe, {})
246
+ }),
242
247
  /* @__PURE__ */ e(me, {
243
248
  children: /* @__PURE__ */ e(b, {
244
249
  paddingTop: {
@@ -246,20 +251,22 @@ const R = (r)=>!ie(r), L = (param)=>{
246
251
  mobile: 0
247
252
  },
248
253
  children: j({
249
- isInverse: s,
254
+ isInverse: a,
250
255
  body: /* @__PURE__ */ e(ee, {
251
256
  isFooterVisible: A,
252
257
  button: n,
253
258
  secondaryButton: i,
254
259
  link: d,
255
- footerBgColor: s && !N ? a.colors.backgroundFeedbackBottom : void 0,
256
- containerBgColor: s && !N ? a.colors.backgroundFeedbackBottom : void 0,
260
+ footerBgColor: a && !N ? s.colors.backgroundFeedbackBottom : void 0,
261
+ containerBgColor: a && !N ? s.colors.backgroundFeedbackBottom : void 0,
257
262
  onChangeFooterHeight: J,
258
263
  children: /* @__PURE__ */ e("div", {
259
- className: pe,
264
+ className: be,
260
265
  children: /* @__PURE__ */ e("div", {
261
- className: be,
262
- children: z
266
+ className: u(fe, {
267
+ [he]: n || i || d
268
+ }),
269
+ children: C
263
270
  })
264
271
  })
265
272
  }),
@@ -269,29 +276,29 @@ const R = (r)=>!ie(r), L = (param)=>{
269
276
  })
270
277
  })
271
278
  }),
272
- B === C && /* @__PURE__ */ e("div", {
279
+ B === V && /* @__PURE__ */ e("div", {
273
280
  style: {
274
281
  position: "absolute",
275
- bottom: y,
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: A ? `calc(${T} + 1px)` : `calc(${T})`,
282
- background: s ? a.colors.backgroundBrand : a.colors.background
288
+ height: A ? `calc(${y} + 1px)` : `calc(${y})`,
289
+ background: a ? s.colors.backgroundBrand : s.colors.background
283
290
  }
284
291
  }),
285
- B !== C && /* @__PURE__ */ e(Ie, {
286
- isInverse: s
292
+ B !== V && /* @__PURE__ */ e(Te, {
293
+ isInverse: a
287
294
  })
288
295
  ]
289
296
  });
290
- }, Ge = (_param)=>{
297
+ }, Je = (_param)=>{
291
298
  var { dataAttributes: r } = _param, o = _object_without_properties(_param, [
292
299
  "dataAttributes"
293
300
  ]);
294
- const { isTabletOrSmaller: t } = H(), { skinName: c } = v();
301
+ const { isTabletOrSmaller: t } = H(), { 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",
@@ -309,7 +316,7 @@ const R = (r)=>!ie(r), L = (param)=>{
309
316
  "component-name": "SuccessFeedbackScreen"
310
317
  }, r)
311
318
  }));
312
- }, Pe = (_param)=>{
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(u, {
334
+ extra: /* @__PURE__ */ l(p, {
328
335
  space: 16,
329
336
  children: [
330
337
  r,
331
- o && /* @__PURE__ */ e(se, {
332
- color: a.colors.textSecondary,
338
+ o && /* @__PURE__ */ e(ae, {
339
+ color: s.colors.textSecondary,
333
340
  regular: !0,
334
341
  children: o
335
342
  })
336
343
  ]
337
344
  })
338
345
  }));
339
- }, Ue = (_param)=>{
346
+ }, Ye = (_param)=>{
340
347
  var { dataAttributes: r, Icon: o = te } = _param, t = _object_without_properties(_param, [
341
348
  "dataAttributes",
342
349
  "Icon"
@@ -349,13 +356,13 @@ const R = (r)=>!ie(r), L = (param)=>{
349
356
  size: "100%"
350
357
  })
351
358
  }, t));
352
- }, Xe = (param)=>{
353
- let { title: r, description: o, children: t, extra: c, primaryButton: n, secondaryButton: i, link: d, imageUrl: m, imageFit: f, dataAttributes: k } = param;
354
- W("success");
355
- const { skinName: s, platformOverrides: h } = v(), g = q({
356
- icon: s === $ ? /* @__PURE__ */ e(_, {
359
+ }, Ze = (param)=>{
360
+ let { title: r, description: o, children: t, extra: c, primaryButton: n, secondaryButton: i, link: d, imageUrl: m, imageFit: f, dataAttributes: h } = param;
361
+ L("success");
362
+ const { skinName: a, platformOverrides: k } = F(), g = q({
363
+ icon: a === $ ? /* @__PURE__ */ e(_, {
357
364
  size: "100%"
358
- }) : s === w ? /* @__PURE__ */ e(D, {
365
+ }) : a === w ? /* @__PURE__ */ e(D, {
359
366
  size: "100%"
360
367
  }) : /* @__PURE__ */ e(E, {
361
368
  size: "100%"
@@ -363,7 +370,7 @@ const R = (r)=>!ie(r), L = (param)=>{
363
370
  title: r,
364
371
  description: o,
365
372
  extra: c !== null && c !== void 0 ? c : t
366
- }, R(h)), S = K(g, {
373
+ }, R(k)), S = K(g, {
367
374
  primaryButton: n,
368
375
  secondaryButton: i,
369
376
  link: d
@@ -371,7 +378,7 @@ const R = (r)=>!ie(r), L = (param)=>{
371
378
  return j({
372
379
  isInverse: !0,
373
380
  body: /* @__PURE__ */ e("div", {
374
- className: fe,
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
- }, k)
402
+ }, h)
396
403
  });
397
404
  };
398
- export { Pe as ErrorFeedbackScreen, x as FeedbackScreen, Ue as InfoFeedbackScreen, Xe as SuccessFeedback, Ge as SuccessFeedbackScreen };
405
+ export { Qe as ErrorFeedbackScreen, x as FeedbackScreen, Ye as InfoFeedbackScreen, Ze as SuccessFeedback, Je as SuccessFeedbackScreen };
@@ -1,2 +1,2 @@
1
- const o = "14.42.0";
1
+ const o = "14.42.1";
2
2
  export { o as PACKAGE_VERSION };