@telefonica/mistica 15.16.4 → 15.18.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.
Files changed (114) hide show
  1. package/css/mistica.css +1 -1
  2. package/css/roboto.css +102 -34
  3. package/dist/box.d.ts +1 -0
  4. package/dist/box.js +11 -10
  5. package/dist/callout.d.ts +1 -0
  6. package/dist/callout.js +10 -10
  7. package/dist/card.d.ts +6 -1
  8. package/dist/card.js +375 -365
  9. package/dist/chip.d.ts +1 -0
  10. package/dist/chip.js +25 -26
  11. package/dist/dialog.d.ts +1 -0
  12. package/dist/dialog.js +65 -62
  13. package/dist/feedback.js +58 -52
  14. package/dist/generated/mistica-icons/icon-box-star-filled.d.ts +4 -0
  15. package/dist/generated/mistica-icons/icon-box-star-filled.js +121 -0
  16. package/dist/generated/mistica-icons/icon-box-star-light.d.ts +4 -0
  17. package/dist/generated/mistica-icons/icon-box-star-light.js +117 -0
  18. package/dist/generated/mistica-icons/icon-box-star-regular.d.ts +4 -0
  19. package/dist/generated/mistica-icons/icon-box-star-regular.js +117 -0
  20. package/dist/generated/mistica-icons/icon-high-priority-filled.d.ts +4 -0
  21. package/dist/generated/mistica-icons/icon-high-priority-filled.js +111 -0
  22. package/dist/generated/mistica-icons/icon-high-priority-light.d.ts +4 -0
  23. package/dist/generated/mistica-icons/icon-high-priority-light.js +111 -0
  24. package/dist/generated/mistica-icons/icon-high-priority-regular.d.ts +4 -0
  25. package/dist/generated/mistica-icons/icon-high-priority-regular.js +111 -0
  26. package/dist/generated/mistica-icons/icon-mms-filled.d.ts +4 -0
  27. package/dist/generated/mistica-icons/icon-mms-filled.js +122 -0
  28. package/dist/generated/mistica-icons/icon-mms-light.d.ts +4 -0
  29. package/dist/generated/mistica-icons/icon-mms-light.js +134 -0
  30. package/dist/generated/mistica-icons/icon-mms-regular.d.ts +4 -0
  31. package/dist/generated/mistica-icons/icon-mms-regular.js +134 -0
  32. package/dist/generated/mistica-icons/icon-vivo-valoriza-filled.d.ts +4 -0
  33. package/dist/generated/mistica-icons/icon-vivo-valoriza-filled.js +111 -0
  34. package/dist/generated/mistica-icons/icon-vivo-valoriza-light.d.ts +4 -0
  35. package/dist/generated/mistica-icons/icon-vivo-valoriza-light.js +117 -0
  36. package/dist/generated/mistica-icons/icon-vivo-valoriza-regular.d.ts +4 -0
  37. package/dist/generated/mistica-icons/icon-vivo-valoriza-regular.js +117 -0
  38. package/dist/generated/mistica-icons/icons-keywords.js +31 -0
  39. package/dist/index.d.ts +12 -0
  40. package/dist/index.js +48 -0
  41. package/dist/inline.css-mistica.js +11 -8
  42. package/dist/inline.css.d.ts +1 -0
  43. package/dist/inline.js +12 -12
  44. package/dist/list.d.ts +1 -0
  45. package/dist/list.js +163 -157
  46. package/dist/package-version.js +1 -1
  47. package/dist/popover.d.ts +1 -0
  48. package/dist/popover.js +9 -7
  49. package/dist/select.js +103 -95
  50. package/dist/skins/blau.js +96 -8
  51. package/dist/skins/defaults.js +98 -10
  52. package/dist/skins/movistar.js +94 -6
  53. package/dist/skins/o2-new.js +95 -7
  54. package/dist/skins/o2.js +94 -6
  55. package/dist/skins/skin-contract.css-mistica.js +42 -10
  56. package/dist/skins/skin-contract.css.d.ts +32 -0
  57. package/dist/skins/telefonica.js +96 -8
  58. package/dist/skins/tu.js +94 -6
  59. package/dist/skins/types/index.d.ts +36 -28
  60. package/dist/skins/vivo-new.js +95 -7
  61. package/dist/skins/vivo.js +94 -6
  62. package/dist/snackbar-context.js +23 -22
  63. package/dist/snackbar.d.ts +1 -0
  64. package/dist/snackbar.js +63 -57
  65. package/dist/theme-context-provider.js +91 -63
  66. package/dist/theme-context.css-mistica.js +452 -0
  67. package/dist/theme-context.css.d.ts +432 -0
  68. package/dist/theme-context.css.ts.vanilla.css-mistica.js +11 -0
  69. package/dist/tooltip.d.ts +1 -0
  70. package/dist/tooltip.js +110 -110
  71. package/dist-es/box.js +17 -16
  72. package/dist-es/callout.js +38 -38
  73. package/dist-es/card.js +492 -482
  74. package/dist-es/chip.js +49 -50
  75. package/dist-es/dialog.js +78 -75
  76. package/dist-es/feedback.js +96 -89
  77. package/dist-es/generated/mistica-icons/icon-box-star-filled.js +112 -0
  78. package/dist-es/generated/mistica-icons/icon-box-star-light.js +108 -0
  79. package/dist-es/generated/mistica-icons/icon-box-star-regular.js +108 -0
  80. package/dist-es/generated/mistica-icons/icon-high-priority-filled.js +102 -0
  81. package/dist-es/generated/mistica-icons/icon-high-priority-light.js +102 -0
  82. package/dist-es/generated/mistica-icons/icon-high-priority-regular.js +102 -0
  83. package/dist-es/generated/mistica-icons/icon-mms-filled.js +113 -0
  84. package/dist-es/generated/mistica-icons/icon-mms-light.js +125 -0
  85. package/dist-es/generated/mistica-icons/icon-mms-regular.js +125 -0
  86. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-filled.js +102 -0
  87. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-light.js +108 -0
  88. package/dist-es/generated/mistica-icons/icon-vivo-valoriza-regular.js +108 -0
  89. package/dist-es/generated/mistica-icons/icons-keywords.js +31 -0
  90. package/dist-es/index.js +1563 -1551
  91. package/dist-es/inline.css-mistica.js +3 -3
  92. package/dist-es/inline.js +23 -23
  93. package/dist-es/list.js +225 -219
  94. package/dist-es/package-version.js +1 -1
  95. package/dist-es/popover.js +26 -24
  96. package/dist-es/select.js +146 -138
  97. package/dist-es/skins/blau.js +96 -8
  98. package/dist-es/skins/defaults.js +97 -9
  99. package/dist-es/skins/movistar.js +94 -6
  100. package/dist-es/skins/o2-new.js +95 -7
  101. package/dist-es/skins/o2.js +94 -6
  102. package/dist-es/skins/skin-contract.css-mistica.js +42 -10
  103. package/dist-es/skins/telefonica.js +98 -10
  104. package/dist-es/skins/tu.js +94 -6
  105. package/dist-es/skins/vivo-new.js +95 -7
  106. package/dist-es/skins/vivo.js +94 -6
  107. package/dist-es/snackbar-context.js +25 -24
  108. package/dist-es/snackbar.js +91 -85
  109. package/dist-es/style.css +1 -1
  110. package/dist-es/theme-context-provider.js +133 -105
  111. package/dist-es/theme-context.css-mistica.js +432 -0
  112. package/dist-es/theme-context.css.ts.vanilla.css-mistica.js +2 -0
  113. package/dist-es/tooltip.js +149 -149
  114. package/package.json +2 -3
package/dist/chip.d.ts CHANGED
@@ -11,6 +11,7 @@ interface SimpleChipProps {
11
11
  }
12
12
  interface ClosableChipProps extends SimpleChipProps {
13
13
  onClose: () => void;
14
+ closeButtonLabel?: string;
14
15
  }
15
16
  interface ToggleChipProps extends SimpleChipProps {
16
17
  active: boolean;
package/dist/chip.js CHANGED
@@ -19,7 +19,6 @@ const _iconcloseregular = /*#__PURE__*/ _interop_require_default(require("./gene
19
19
  const _css = require("./utils/css.js");
20
20
  const _chipcssmistica = require("./chip.css-mistica.js");
21
21
  const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
22
- const _dom = require("./utils/dom.js");
23
22
  const _themevariantcontext = require("./theme-variant-context.js");
24
23
  const _touchable = /*#__PURE__*/ _interop_require_wildcard(require("./touchable.js"));
25
24
  function _interop_require_default(obj) {
@@ -121,13 +120,13 @@ function _object_spread_props(target, source) {
121
120
  return target;
122
121
  }
123
122
  const J = (e)=>{
124
- const { Icon: n, children: R, id: T, dataAttributes: p, active: a, badge: r, onClose: s } = e, { texts: k, isDarkMode: I, textPresets: B } = (0, _hooks.useTheme)(), u = (0, _themevariantcontext.useThemeVariant)() === "alternative", f = n ? {
123
+ const { Icon: n, children: A, id: R, dataAttributes: T, active: a, badge: r, onClose: s, closeButtonLabel: k } = e, { texts: B, isDarkMode: I, textPresets: w } = (0, _hooks.useTheme)(), p = (0, _themevariantcontext.useThemeVariant)() === "alternative", f = n ? {
125
124
  mobile: 16,
126
125
  desktop: 8
127
126
  } : {
128
127
  mobile: 20,
129
128
  desktop: 12
130
- }, w = {
129
+ }, y = {
131
130
  mobile: 20,
132
131
  desktop: 12
133
132
  }, g = {
@@ -146,20 +145,22 @@ const J = (e)=>{
146
145
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
147
146
  paddingRight: r ? 8 : s ? 4 : 0,
148
147
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
149
- id: T,
150
- weight: B.indicator.weight,
148
+ id: R,
149
+ weight: w.indicator.weight,
151
150
  truncate: 1,
152
151
  color: "currentColor",
153
- children: R
152
+ children: A
154
153
  })
155
154
  })
156
155
  ]
157
- });
158
- if (s) return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_box.default, _object_spread_props(_object_spread({
159
- className: (0, _classnames.default)(u ? _chipcssmistica.chipVariants.overAlternative : _chipcssmistica.chipVariants.default, _chipcssmistica.chipWrapper),
156
+ }), c = _object_spread({
157
+ "component-name": "Chip"
158
+ }, T);
159
+ if (s) return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_box.default, {
160
+ className: (0, _classnames.default)(p ? _chipcssmistica.chipVariants.overAlternative : _chipcssmistica.chipVariants.default, _chipcssmistica.chipWrapper),
160
161
  paddingLeft: f,
161
- paddingRight: g
162
- }, (0, _dom.getPrefixedDataAttributes)(p, "Chip")), {
162
+ paddingRight: g,
163
+ dataAttributes: c,
163
164
  children: [
164
165
  b,
165
166
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.default, {
@@ -170,7 +171,7 @@ const J = (e)=>{
170
171
  width: (0, _css.pxToRem)(24),
171
172
  height: (0, _css.pxToRem)(24)
172
173
  },
173
- "aria-label": k.closeButtonLabel,
174
+ "aria-label": k !== null && k !== void 0 ? k : B.closeButtonLabel,
174
175
  onPress: ()=>s(),
175
176
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconcloseregular.default, {
176
177
  size: (0, _css.pxToRem)(16),
@@ -178,28 +179,26 @@ const J = (e)=>{
178
179
  })
179
180
  })
180
181
  ]
181
- }));
182
- const c = e.href || e.onPress || e.to, y = a !== void 0 || c, v = _object_spread({
183
- "component-name": "Chip"
184
- }, p), N = ()=>r ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
182
+ });
183
+ const l = e.href || e.onPress || e.to, N = a !== void 0 || l, j = ()=>r ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
185
184
  children: r === !0 ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {
186
185
  value: r
187
186
  })
188
- }) : null, C = (P)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_box.default, {
189
- className: (0, _classnames.default)(_chipcssmistica.chipVariants[a ? "active" : u ? "overAlternative" : "default"], c ? _chipcssmistica.wrappedContent : _chipcssmistica.chipWrapper, {
190
- [_chipcssmistica.chipInteractiveVariants[I ? "dark" : "light"]]: y
187
+ }) : null, v = (L)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_box.default, {
188
+ className: (0, _classnames.default)(_chipcssmistica.chipVariants[a ? "active" : p ? "overAlternative" : "default"], l ? _chipcssmistica.wrappedContent : _chipcssmistica.chipWrapper, {
189
+ [_chipcssmistica.chipInteractiveVariants[I ? "dark" : "light"]]: N
191
190
  }),
192
191
  paddingLeft: f,
193
- paddingRight: r ? g : w,
194
- dataAttributes: P,
192
+ paddingRight: r ? g : y,
193
+ dataAttributes: L,
195
194
  children: [
196
195
  b,
197
- N()
196
+ j()
198
197
  ]
199
198
  });
200
- return c ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, e), {
199
+ return l ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, e), {
201
200
  className: (0, _classnames.default)(_chipcssmistica.chipWrapper, _chipcssmistica.button),
202
- dataAttributes: v,
203
- children: C()
204
- })) : C(v);
201
+ dataAttributes: c,
202
+ children: v()
203
+ })) : v(c);
205
204
  }, ot = J;
package/dist/dialog.d.ts CHANGED
@@ -9,6 +9,7 @@ interface BaseDialogProps {
9
9
  acceptText?: string;
10
10
  onAccept?: () => void;
11
11
  destructive?: boolean;
12
+ closeButtonLabel?: string;
12
13
  /** @deprecated this does nothing */
13
14
  forceWeb?: boolean;
14
15
  /** @deprecated this does nothing */
package/dist/dialog.js CHANGED
@@ -153,30 +153,30 @@ function _object_without_properties_loose(source, excluded) {
153
153
  }
154
154
  return target;
155
155
  }
156
- const ce = ()=>process.env.NODE_ENV !== "test" && !(0, _platform.isRunningAcceptanceTest)(), de = (t)=>{
157
- const { texts: i } = (0, _hooks.useTheme)(), { className: d, title: r, message: m, icon: n, extra: c, showCancelButton: s, showAcceptButton: l, cancelText: f = i.dialogCancelButton, acceptText: b = i.dialogAcceptButton, onCancel: g, onAccept: v, destructive: B = !1 } = t, u = t.type === "dialog", h = u && !!t.link || l || s, C = {
158
- onPress: v || (()=>{}),
159
- children: b,
156
+ const ce = ()=>process.env.NODE_ENV !== "test" && !(0, _platform.isRunningAcceptanceTest)(), ue = (t)=>{
157
+ const { texts: i } = (0, _hooks.useTheme)(), { className: u, title: r, message: f, icon: o, extra: c, showCancelButton: s, showAcceptButton: l, cancelText: g = i.dialogCancelButton, acceptText: m = i.dialogAcceptButton, onCancel: h, onAccept: C, destructive: B = !1 } = t, d = t.type === "dialog", p = d && !!t.link || l || s, y = {
158
+ onPress: C || (()=>{}),
159
+ children: m,
160
160
  // @deprecated - testid should be removed but many webapp tests depend on this
161
161
  dataAttributes: {
162
162
  testid: "dialog-accept-button"
163
163
  }
164
164
  };
165
165
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
166
- className: (0, _classnames.default)(_dialogcssmistica.variants[u ? "dialog" : "default"], d),
166
+ className: (0, _classnames.default)(_dialogcssmistica.variants[d ? "dialog" : "default"], u),
167
167
  children: [
168
- n && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
168
+ o && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
169
169
  paddingBottom: 24,
170
170
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
171
171
  className: _dialogcssmistica.iconContainer,
172
- children: /*#__PURE__*/ _react.cloneElement(n, {
172
+ children: /*#__PURE__*/ _react.cloneElement(o, {
173
173
  size: "100%"
174
174
  })
175
175
  })
176
176
  }),
177
177
  r && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
178
178
  paddingBottom: 16,
179
- children: u ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text5, {
179
+ children: d ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text5, {
180
180
  as: "h2",
181
181
  children: r
182
182
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text4, {
@@ -201,134 +201,137 @@ const ce = ()=>process.env.NODE_ENV !== "test" && !(0, _platform.isRunningAccept
201
201
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
202
202
  color: _skincontractcssmistica.vars.colors.textSecondary,
203
203
  regular: !0,
204
- children: m
204
+ children: f
205
205
  }),
206
206
  c
207
207
  ]
208
208
  })
209
209
  }),
210
- h && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
210
+ p && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
211
211
  className: _dialogcssmistica.dialogActions,
212
212
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttonlayout.default, {
213
- link: u ? t.link : void 0,
213
+ link: d ? t.link : void 0,
214
214
  primaryButton: l ? B ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonDanger, _object_spread({
215
215
  tabIndex: 1
216
- }, C)) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonPrimary, _object_spread({
216
+ }, y)) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonPrimary, _object_spread({
217
217
  tabIndex: 1
218
- }, C)) : void 0,
218
+ }, y)) : void 0,
219
219
  secondaryButton: s ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonSecondary, {
220
220
  tabIndex: 2,
221
- onPress: g || (()=>{}),
221
+ onPress: h || (()=>{}),
222
222
  dataAttributes: {
223
223
  testid: "dialog-cancel-button"
224
224
  },
225
- children: f
225
+ children: g
226
226
  }) : void 0
227
227
  })
228
228
  })
229
229
  ]
230
230
  });
231
- }, ue = (param)=>{
232
- let { type: t, message: i, title: d, acceptText: r, cancelText: m, onAccept: n, onCancel: c, onDestroy: s } = param;
231
+ }, de = (param)=>{
232
+ let { type: t, message: i, title: u, acceptText: r, cancelText: f, onAccept: o, onCancel: c, onDestroy: s } = param;
233
233
  return t === "confirm" ? (0, _webviewbridge.nativeConfirm)({
234
234
  message: i,
235
- title: d,
236
- cancelText: m,
235
+ title: u,
236
+ cancelText: f,
237
237
  acceptText: r
238
238
  }).then((l)=>{
239
- l ? n == null || n() : c == null || c(), s();
239
+ l ? o == null || o() : c == null || c(), s();
240
240
  }) : (0, _webviewbridge.nativeAlert)({
241
241
  message: i,
242
- title: d,
242
+ title: u,
243
243
  buttonText: r
244
244
  }).then(()=>{
245
- n == null || n(), s();
245
+ o == null || o(), s();
246
246
  });
247
247
  }, me = (param)=>{
248
- let { type: t, onAccept: i, onCancel: d, onDestroy: r, acceptText: m, cancelText: n, message: c, title: s } = param;
249
- const { texts: l } = (0, _hooks.useTheme)(), f = _react.useRef({
248
+ let { type: t, onAccept: i, onCancel: u, onDestroy: r, acceptText: f, cancelText: o, message: c, title: s } = param;
249
+ const { texts: l } = (0, _hooks.useTheme)(), g = _react.useRef({
250
250
  type: t,
251
251
  onAccept: i,
252
- onCancel: d,
252
+ onCancel: u,
253
253
  onDestroy: r,
254
- acceptText: m || l.dialogAcceptButton,
255
- cancelText: n || l.dialogCancelButton,
254
+ acceptText: f || l.dialogAcceptButton,
255
+ cancelText: o || l.dialogCancelButton,
256
256
  message: c,
257
257
  title: s
258
- });
258
+ }), m = _react.useRef(!1);
259
259
  return _react.useEffect(()=>{
260
- ue(f.current);
260
+ m.current || (m.current = !0, de(g.current).finally(()=>{
261
+ m.current = !1;
262
+ }));
261
263
  }, []), /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {});
262
264
  }, Ie = (t)=>{
263
265
  (0, _modalcontextprovider.useSetModalStateEffect)();
264
- const i = _react.useRef(null), { texts: d } = (0, _hooks.useTheme)(), [r, m] = _react.useState(!1), n = _react.useRef(!1), c = _react.useRef(!1), [s, l] = _react.useState(!1), f = _react.useRef(!1), b = _react.useRef(ce() ? _dialogcssmistica.ANIMATION_DURATION_MS : 0), g = t.type !== "dialog" && (0, _webviewbridge.isWebViewBridgeAvailable)(), v = t.type === "dialog", B = t.type === "alert", { onAccept: u, onCancel: h, onDestroy: C } = t, I = _object_without_properties(t, [
266
+ const i = _react.useRef(null), { texts: u } = (0, _hooks.useTheme)(), [r, f] = _react.useState(!1), o = _react.useRef(!1), c = _react.useRef(!1), [s, l] = _react.useState(!1), g = _react.useRef(!1), m = _react.useRef(ce() ? _dialogcssmistica.ANIMATION_DURATION_MS : 0), h = t.type !== "dialog" && (0, _webviewbridge.isWebViewBridgeAvailable)(), C = t.type === "dialog", B = t.type === "alert", { onAccept: d, onCancel: p, onDestroy: y } = t, I = _object_without_properties(t, [
265
267
  "onAccept",
266
268
  "onCancel",
267
269
  "onDestroy"
268
270
  ]);
269
271
  _react.useEffect(()=>{
270
272
  const a = setTimeout(()=>{
271
- n.current || l(!0);
272
- }, b.current);
273
+ o.current || l(!0);
274
+ }, m.current);
273
275
  return ()=>{
274
276
  clearTimeout(a);
275
277
  };
276
278
  }, []);
277
279
  const x = _react.useCallback(()=>{
278
- c.current || (c.current = !0, f.current ? u == null || u() : h == null || h(), C());
280
+ c.current || (c.current = !0, g.current ? d == null || d() : p == null || p(), y());
279
281
  }, [
280
- u,
281
- h,
282
- C
282
+ d,
283
+ p,
284
+ y
283
285
  ]), R = _react.useCallback(()=>{
284
286
  let a;
285
- return !n.current && s && (n.current = !0, l(!1), m(!0), a = setTimeout(x, b.current)), ()=>{
287
+ return !o.current && s && (o.current = !0, l(!1), f(!0), a = setTimeout(x, m.current)), ()=>{
286
288
  a && clearTimeout(a);
287
289
  };
288
290
  }, [
289
291
  x,
290
292
  s
291
293
  ]), N = _react.useCallback(()=>{
292
- f.current = !0, R();
294
+ g.current = !0, R();
293
295
  }, [
294
296
  R
295
- ]), y = _react.useCallback(()=>{
296
- f.current = !1, R();
297
+ ]), b = _react.useCallback(()=>{
298
+ g.current = !1, R();
297
299
  }, [
298
300
  R
299
- ]), p = _react.useCallback(()=>{
300
- n.current || (B ? N() : y());
301
+ ]), v = _react.useCallback(()=>{
302
+ o.current || (B ? N() : b());
301
303
  }, [
302
304
  N,
303
- y,
305
+ b,
304
306
  B
305
307
  ]), T = _react.useCallback((a)=>{
306
- a.key === _keys.ESC && (a.stopPropagation(), a.preventDefault(), p());
308
+ a.key === _keys.ESC && (a.stopPropagation(), a.preventDefault(), v());
307
309
  }, [
308
- p
310
+ v
309
311
  ]);
310
312
  _react.useEffect(()=>{
311
- if (!g) return document.addEventListener("keydown", T), ()=>{
313
+ if (!h) return document.addEventListener("keydown", T), ()=>{
312
314
  document.removeEventListener("keydown", T);
313
315
  };
314
316
  }, [
315
317
  T,
316
- g
318
+ h
317
319
  ]), _react.useEffect(()=>{
318
- if (!g) return window.addEventListener("popstate", p), ()=>{
319
- window.removeEventListener("popstate", p);
320
+ if (!h) return window.addEventListener("popstate", v), ()=>{
321
+ window.removeEventListener("popstate", v);
320
322
  };
321
323
  }, [
322
- p,
323
- g
324
+ v,
325
+ h
324
326
  ]);
325
327
  const P = _react.useCallback((a)=>{
326
- a.stopPropagation(), v && y();
328
+ a.stopPropagation(), C && b();
327
329
  }, [
328
- v,
329
- y
330
+ C,
331
+ b
330
332
  ]);
331
- return g ? /* @__PURE__ */ (0, _jsxruntime.jsx)(me, _object_spread({}, t)) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_portal.Portal, {
333
+ var _t_closeButtonLabel;
334
+ return h ? /* @__PURE__ */ (0, _jsxruntime.jsx)(me, _object_spread({}, t)) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_portal.Portal, {
332
335
  className: _dialogcssmistica.wrapper,
333
336
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_focustrap.default, {
334
337
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
@@ -345,30 +348,30 @@ const ce = ()=>process.env.NODE_ENV !== "test" && !(0, _platform.isRunningAccept
345
348
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
346
349
  ref: i,
347
350
  onAnimationEnd: (a)=>{
348
- a.target === i.current && (n.current || l(!0));
351
+ a.target === i.current && (o.current || l(!0));
349
352
  },
350
353
  onTransitionEnd: (a)=>{
351
- a.target === i.current && n.current && x();
354
+ a.target === i.current && o.current && x();
352
355
  },
353
356
  className: (0, _classnames.default)(_dialogcssmistica.modalContent, {
354
357
  [_dialogcssmistica.closedModalContent]: r
355
358
  }),
356
359
  children: [
357
- v && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
360
+ C && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
358
361
  className: _dialogcssmistica.modalCloseButtonContainer,
359
362
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.InternalIconButton, {
360
- onPress: p,
361
- "aria-label": d.modalClose || d.closeButtonLabel,
363
+ onPress: v,
364
+ "aria-label": (_t_closeButtonLabel = t.closeButtonLabel) !== null && _t_closeButtonLabel !== void 0 ? _t_closeButtonLabel : u.modalClose || u.closeButtonLabel,
362
365
  bleedLeft: !0,
363
366
  bleedRight: !0,
364
367
  bleedY: !0,
365
368
  Icon: _iconcloseregular.default
366
369
  })
367
370
  }),
368
- /* @__PURE__ */ (0, _jsxruntime.jsx)(de, _object_spread_props(_object_spread({}, I), {
371
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(ue, _object_spread_props(_object_spread({}, I), {
369
372
  showAcceptButton: t.type !== "dialog" || !!t.onAccept,
370
373
  showCancelButton: t.type === "confirm" || t.type === "dialog" && !!t.onCancel,
371
- onCancel: y,
374
+ onCancel: b,
372
375
  onAccept: N
373
376
  }))
374
377
  ]
package/dist/feedback.js CHANGED
@@ -11,19 +11,19 @@ function _export(target, all) {
11
11
  }
12
12
  _export(exports, {
13
13
  ErrorFeedbackScreen: function() {
14
- return We;
14
+ return _e;
15
15
  },
16
16
  FeedbackScreen: function() {
17
17
  return F;
18
18
  },
19
19
  InfoFeedbackScreen: function() {
20
- return _e;
20
+ return qe;
21
21
  },
22
22
  SuccessFeedback: function() {
23
- return qe;
23
+ return we;
24
24
  },
25
25
  SuccessFeedbackScreen: function() {
26
- return Re;
26
+ return We;
27
27
  }
28
28
  });
29
29
  const _jsxruntime = require("react/jsx-runtime");
@@ -41,7 +41,7 @@ const _platform = require("./utils/platform.js");
41
41
  const _text = require("./text.js");
42
42
  const _box = /*#__PURE__*/ _interop_require_default(require("./box.js"));
43
43
  const _boxed = require("./boxed.js");
44
- const _responsivelayout = /*#__PURE__*/ _interop_require_default(require("./responsive-layout.js"));
44
+ const _responsivelayout = /*#__PURE__*/ _interop_require_wildcard(require("./responsive-layout.js"));
45
45
  const _stack = /*#__PURE__*/ _interop_require_default(require("./stack.js"));
46
46
  const _classnames = /*#__PURE__*/ _interop_require_default(require("classnames"));
47
47
  const _buttongroup = /*#__PURE__*/ _interop_require_default(require("./button-group.js"));
@@ -173,26 +173,26 @@ function _object_without_properties_loose(source, excluded) {
173
173
  }
174
174
  return target;
175
175
  }
176
- const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
176
+ const R = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
177
177
  let { primaryButton: o, secondaryButton: r } = param;
178
178
  return !!o || !!r;
179
- }, T = (o)=>{
179
+ }, B = (o)=>{
180
180
  (0, _webviewbridge.isWebViewBridgeAvailable)() && (0, _webviewbridge.requestVibration)(o).catch(()=>{});
181
181
  }, E = (o)=>{
182
182
  _react.useEffect(()=>{
183
183
  let r;
184
- return o === "success" && (r = setTimeout(()=>T("success"), 700)), o === "error" && (r = setTimeout(()=>T("error"), 1e3)), ()=>{
184
+ return o === "success" && (r = setTimeout(()=>B("success"), 700)), o === "error" && (r = setTimeout(()=>B("error"), 1e3)), ()=>{
185
185
  clearTimeout(r);
186
186
  };
187
187
  }, [
188
188
  o
189
189
  ]);
190
- }, R = (param, n)=>{
190
+ }, W = (param, n)=>{
191
191
  let { icon: o, title: r, description: t, extra: c } = param;
192
192
  const i = t && Array.isArray(t) ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
193
193
  space: 16,
194
- children: t.map((a, m)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("p", {
195
- children: a
194
+ children: t.map((s, m)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("p", {
195
+ children: s
196
196
  }, m))
197
197
  }) : t;
198
198
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
@@ -229,7 +229,7 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
229
229
  })
230
230
  ]
231
231
  });
232
- }, W = (o, r)=>{
232
+ }, _ = (o, r)=>{
233
233
  const t = D(r);
234
234
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
235
235
  space: {
@@ -241,7 +241,7 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
241
241
  t && /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttongroup.default, _object_spread({}, r))
242
242
  ]
243
243
  });
244
- }, _ = (param)=>{
244
+ }, q = (param)=>{
245
245
  let { isInverse: o, body: r, imageFit: t, imageUrl: c, dataAttributes: n } = param;
246
246
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_boxed.InternalBoxed, {
247
247
  borderRadius: _skincontractcssmistica.vars.borderRadii.legacyDisplay,
@@ -276,54 +276,60 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
276
276
  ]
277
277
  })
278
278
  });
279
- }, pe = ()=>((0, _overscrollcolorcontext.useSetOverscrollColor)({
279
+ }, be = ()=>((0, _overscrollcolorcontext.useSetOverscrollColor)({
280
280
  topColor: _skincontractcssmistica.vars.colors.backgroundBrandTop,
281
281
  bottomColor: "transparent"
282
282
  }), null), F = (param)=>{
283
- let { title: o, description: r, children: t, extra: c, primaryButton: n, secondaryButton: i, link: a, hapticFeedback: m, icon: f, animateText: k = !1, isInverse: s = !1, unstable_inlineInDesktop: h, imageUrl: x, imageFit: g, dataAttributes: S } = param;
283
+ let { title: o, description: r, children: t, extra: c, primaryButton: n, secondaryButton: i, link: s, hapticFeedback: m, icon: k, animateText: f = !1, isInverse: a = !1, unstable_inlineInDesktop: h, imageUrl: x, imageFit: g, dataAttributes: S } = param;
284
284
  E(m);
285
- const { platformOverrides: q, isDarkMode: w } = (0, _hooks.useTheme)(), { isTabletOrSmaller: j } = (0, _hooks.useScreenSize)(), H = D({
285
+ const { platformOverrides: w, isDarkMode: L } = (0, _hooks.useTheme)(), { isTabletOrSmaller: j } = (0, _hooks.useScreenSize)(), H = D({
286
286
  primaryButton: n,
287
287
  secondaryButton: i,
288
- link: a
289
- }), I = R({
290
- icon: f,
288
+ link: s
289
+ }), I = W({
290
+ icon: k,
291
291
  title: o,
292
292
  description: r,
293
293
  extra: c !== null && c !== void 0 ? c : t
294
- }, k && O(q));
295
- return !j && h ? W(I, {
294
+ }, f && R(w));
295
+ return !j && h ? _(I, {
296
296
  primaryButton: n,
297
297
  secondaryButton: i,
298
- link: a
298
+ link: s
299
299
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
300
300
  style: {
301
301
  position: "relative"
302
302
  },
303
303
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_responsivelayout.default, {
304
304
  children: [
305
- s && /* @__PURE__ */ (0, _jsxruntime.jsx)(pe, {}),
305
+ a && /* @__PURE__ */ (0, _jsxruntime.jsx)(be, {}),
306
306
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
307
307
  paddingTop: {
308
308
  desktop: 64,
309
309
  mobile: 0
310
310
  },
311
- children: _({
312
- isInverse: s,
313
- body: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttonfixedfooterlayout.default, {
314
- isFooterVisible: H,
315
- button: n,
316
- secondaryButton: i,
317
- link: a,
318
- footerBgColor: s && !w ? _skincontractcssmistica.vars.colors.backgroundBrandBottom : void 0,
319
- containerBgColor: s ? _skincontractcssmistica.vars.colors.backgroundBrand : _skincontractcssmistica.vars.colors.background,
320
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
321
- className: _feedbackcssmistica.container,
322
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
323
- className: (0, _classnames.default)(_feedbackcssmistica.innerContainer, {
324
- [_feedbackcssmistica.innerContainerWithButtons]: n || i || a
325
- }),
326
- children: I
311
+ children: q({
312
+ isInverse: a,
313
+ body: // doesn't expand when nested in mobile. This can cause double margin when footer is not fixed
314
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_responsivelayout.ResetResponsiveLayout, {
315
+ skipDesktop: !0,
316
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttonfixedfooterlayout.default, {
317
+ isFooterVisible: H,
318
+ button: n,
319
+ secondaryButton: i,
320
+ link: s,
321
+ footerBgColor: a && !L ? _skincontractcssmistica.vars.colors.backgroundBrandBottom : void 0,
322
+ containerBgColor: a ? _skincontractcssmistica.vars.colors.backgroundBrand : _skincontractcssmistica.vars.colors.background,
323
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_responsivelayout.default, {
324
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
325
+ className: _feedbackcssmistica.container,
326
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
327
+ className: (0, _classnames.default)(_feedbackcssmistica.innerContainer, {
328
+ [_feedbackcssmistica.innerContainerWithButtons]: n || i || s
329
+ }),
330
+ children: I
331
+ })
332
+ })
327
333
  })
328
334
  })
329
335
  }),
@@ -335,7 +341,7 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
335
341
  ]
336
342
  })
337
343
  });
338
- }, Re = (_param)=>{
344
+ }, We = (_param)=>{
339
345
  var { dataAttributes: o } = _param, r = _object_without_properties(_param, [
340
346
  "dataAttributes"
341
347
  ]);
@@ -357,7 +363,7 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
357
363
  "component-name": "SuccessFeedbackScreen"
358
364
  }, o)
359
365
  }));
360
- }, We = (_param)=>{
366
+ }, _e = (_param)=>{
361
367
  var { children: o, errorReference: r, dataAttributes: t } = _param, c = _object_without_properties(_param, [
362
368
  "children",
363
369
  "errorReference",
@@ -384,7 +390,7 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
384
390
  ]
385
391
  })
386
392
  }));
387
- }, _e = (_param)=>{
393
+ }, qe = (_param)=>{
388
394
  var { dataAttributes: o, Icon: r = _iconinfo.default } = _param, t = _object_without_properties(_param, [
389
395
  "dataAttributes",
390
396
  "Icon"
@@ -397,13 +403,13 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
397
403
  size: "100%"
398
404
  })
399
405
  }, t));
400
- }, qe = (param)=>{
401
- let { title: o, description: r, children: t, extra: c, primaryButton: n, secondaryButton: i, link: a, imageUrl: m, imageFit: f, dataAttributes: k } = param;
406
+ }, we = (param)=>{
407
+ let { title: o, description: r, children: t, extra: c, primaryButton: n, secondaryButton: i, link: s, imageUrl: m, imageFit: k, dataAttributes: f } = param;
402
408
  E("success");
403
- const { skinName: s, platformOverrides: h } = (0, _hooks.useTheme)(), g = R({
404
- icon: s === _constants.VIVO_SKIN ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconsuccessvivo.default, {
409
+ const { skinName: a, platformOverrides: h } = (0, _hooks.useTheme)(), g = W({
410
+ icon: a === _constants.VIVO_SKIN ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconsuccessvivo.default, {
405
411
  size: "100%"
406
- }) : s === _constants.VIVO_NEW_SKIN ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconsuccessvivonew.default, {
412
+ }) : a === _constants.VIVO_NEW_SKIN ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconsuccessvivonew.default, {
407
413
  size: "100%"
408
414
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconsuccess.default, {
409
415
  size: "100%"
@@ -411,12 +417,12 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
411
417
  title: o,
412
418
  description: r,
413
419
  extra: c !== null && c !== void 0 ? c : t
414
- }, O(h)), S = W(g, {
420
+ }, R(h)), S = _(g, {
415
421
  primaryButton: n,
416
422
  secondaryButton: i,
417
- link: a
423
+ link: s
418
424
  });
419
- return _({
425
+ return q({
420
426
  isInverse: !0,
421
427
  body: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
422
428
  className: _feedbackcssmistica.backgroundBrand,
@@ -436,10 +442,10 @@ const O = (o)=>!(0, _platform.isRunningAcceptanceTest)(o), D = (param)=>{
436
442
  })
437
443
  })
438
444
  }),
439
- imageFit: f,
445
+ imageFit: k,
440
446
  imageUrl: m,
441
447
  dataAttributes: _object_spread({
442
448
  "component-name": "SuccessFeedback"
443
- }, k)
449
+ }, f)
444
450
  });
445
451
  };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { IconProps } from '../../utils/types';
3
+ declare const IconBoxStarFilled: ({ color, size, ...rest }: IconProps) => JSX.Element;
4
+ export default IconBoxStarFilled;