@telefonica/mistica 15.17.0 → 15.19.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 (74) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/button.css-mistica.js +61 -52
  3. package/dist/button.css.d.ts +33 -17
  4. package/dist/button.d.ts +9 -46
  5. package/dist/button.js +188 -237
  6. package/dist/callout.d.ts +1 -0
  7. package/dist/callout.js +10 -10
  8. package/dist/card.d.ts +6 -1
  9. package/dist/card.js +375 -365
  10. package/dist/chip.d.ts +1 -0
  11. package/dist/chip.js +15 -15
  12. package/dist/dialog.d.ts +1 -0
  13. package/dist/dialog.js +18 -17
  14. package/dist/feedback.js +58 -52
  15. package/dist/inline.css-mistica.js +11 -8
  16. package/dist/inline.css.d.ts +1 -0
  17. package/dist/inline.js +12 -12
  18. package/dist/logo-blau.d.ts +4 -0
  19. package/dist/logo-blau.js +74 -0
  20. package/dist/logo-common.d.ts +9 -0
  21. package/dist/logo-common.js +21 -0
  22. package/dist/logo-movistar.d.ts +4 -0
  23. package/dist/logo-movistar.js +99 -0
  24. package/dist/logo-o2-new.d.ts +4 -0
  25. package/dist/logo-o2-new.js +29 -0
  26. package/dist/logo-o2.d.ts +4 -0
  27. package/dist/logo-o2.js +29 -0
  28. package/dist/logo-telefonica.d.ts +4 -0
  29. package/dist/logo-telefonica.js +197 -0
  30. package/dist/logo-tu.d.ts +4 -0
  31. package/dist/logo-tu.js +28 -0
  32. package/dist/logo-vivo.d.ts +4 -0
  33. package/dist/logo-vivo.js +81 -0
  34. package/dist/logo.d.ts +10 -10
  35. package/dist/logo.js +174 -534
  36. package/dist/navigation-bar.d.ts +7 -0
  37. package/dist/navigation-bar.js +99 -91
  38. package/dist/package-version.js +1 -1
  39. package/dist/popover.d.ts +1 -0
  40. package/dist/popover.js +9 -7
  41. package/dist/snackbar-context.js +23 -22
  42. package/dist/snackbar.d.ts +1 -0
  43. package/dist/snackbar.js +51 -47
  44. package/dist/text.d.ts +1 -0
  45. package/dist/text.js +133 -109
  46. package/dist/tooltip.d.ts +1 -0
  47. package/dist/tooltip.js +110 -110
  48. package/dist-es/button.css-mistica.js +36 -18
  49. package/dist-es/button.js +219 -268
  50. package/dist-es/callout.js +38 -38
  51. package/dist-es/card.js +492 -482
  52. package/dist-es/chip.js +25 -25
  53. package/dist-es/dialog.js +22 -21
  54. package/dist-es/feedback.js +96 -89
  55. package/dist-es/inline.css-mistica.js +3 -3
  56. package/dist-es/inline.js +23 -23
  57. package/dist-es/logo-blau.js +65 -0
  58. package/dist-es/logo-common.js +12 -0
  59. package/dist-es/logo-movistar.js +90 -0
  60. package/dist-es/logo-o2-new.js +20 -0
  61. package/dist-es/logo-o2.js +20 -0
  62. package/dist-es/logo-telefonica.js +188 -0
  63. package/dist-es/logo-tu.js +19 -0
  64. package/dist-es/logo-vivo.js +72 -0
  65. package/dist-es/logo.js +132 -533
  66. package/dist-es/navigation-bar.js +163 -155
  67. package/dist-es/package-version.js +1 -1
  68. package/dist-es/popover.js +26 -24
  69. package/dist-es/snackbar-context.js +25 -24
  70. package/dist-es/snackbar.js +81 -77
  71. package/dist-es/style.css +1 -1
  72. package/dist-es/text.js +143 -119
  73. package/dist-es/tooltip.js +149 -149
  74. package/package.json +1 -1
package/dist/snackbar.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function() {
9
- return he;
9
+ return Se;
10
10
  }
11
11
  });
12
12
  const _jsxruntime = require("react/jsx-runtime");
@@ -120,37 +120,37 @@ function _object_spread_props(target, source) {
120
120
  }
121
121
  return target;
122
122
  }
123
- const Z = [
123
+ const ee = [
124
124
  "DISMISS",
125
125
  "TIMEOUT",
126
126
  "CONSECUTIVE",
127
127
  "BUTTON"
128
- ], ee = 5e3, re = 1e4, te = /*#__PURE__*/ _react.forwardRef((param, I)=>{
129
- let { message: m, buttonText: n, buttonAccessibilityLabel: u, duration: t, onClose: o, type: i, withDismiss: d = !1, dataAttributes: O } = param;
130
- const { texts: p } = (0, _hooks.useTheme)(), [s, a] = _react.useState(!1), { width: R, ref: c } = (0, _hooks.useElementDimensions)(), { isDesktopOrBigger: D } = (0, _hooks.useScreenSize)(), l = R > (D ? 160 : 128), E = _react.useRef(null), g = t === 1 / 0 && !n || d, T = _react.useRef(o);
128
+ ], re = 5e3, te = 1e4, ne = /*#__PURE__*/ _react.forwardRef((param, g)=>{
129
+ let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: d, duration: t, onClose: o, type: c, withDismiss: p = !1, dataAttributes: R } = param;
130
+ const { texts: T } = (0, _hooks.useTheme)(), [a, s] = _react.useState(!1), { width: I, ref: v } = (0, _hooks.useElementDimensions)(), { isDesktopOrBigger: i } = (0, _hooks.useScreenSize)(), l = I > (i ? 160 : 128), B = _react.useRef(null), E = t === 1 / 0 && !n || p, h = _react.useRef(o);
131
131
  _react.useEffect(()=>{
132
- T.current = o;
132
+ h.current = o;
133
133
  }, [
134
134
  o
135
135
  ]);
136
- const f = _react.useCallback((v)=>{
137
- a(!1), setTimeout(()=>{
138
- var h;
139
- (h = T.current) == null || h.call(T, v);
136
+ const f = _react.useCallback((k)=>{
137
+ s(!1), setTimeout(()=>{
138
+ var S;
139
+ (S = h.current) == null || S.call(h, k);
140
140
  }, process.env.NODE_ENV === "test" ? 0 : _snackbarcssmistica.TRANSITION_TIME_IN_MS);
141
141
  }, []);
142
- return _react.useImperativeHandle(I, ()=>_object_spread_props(_object_spread({}, E), {
142
+ return _react.useImperativeHandle(g, ()=>_object_spread_props(_object_spread({}, B), {
143
143
  close: f
144
144
  }), [
145
145
  f
146
146
  ]), _react.useEffect(()=>{
147
- const v = setTimeout(()=>{
148
- a(!0);
149
- }, 50), h = t !== 1 / 0 ? setTimeout(()=>f({
147
+ const k = setTimeout(()=>{
148
+ s(!0);
149
+ }, 50), S = t !== 1 / 0 ? setTimeout(()=>f({
150
150
  action: "TIMEOUT"
151
151
  }), t) : void 0;
152
152
  return ()=>{
153
- clearTimeout(v), clearTimeout(h);
153
+ clearTimeout(k), clearTimeout(S);
154
154
  };
155
155
  }, [
156
156
  f,
@@ -158,28 +158,28 @@ const Z = [
158
158
  ]), /* @__PURE__ */ (0, _jsxruntime.jsx)(_portal.Portal, {
159
159
  className: _snackbarcssmistica.snackbarContainer,
160
160
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
161
- ref: E,
161
+ ref: B,
162
162
  className: (0, _classnames.default)(_snackbarcssmistica.snackbar, {
163
- [_snackbarcssmistica.snackbarOpen]: s
163
+ [_snackbarcssmistica.snackbarOpen]: a
164
164
  }),
165
165
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
166
166
  role: "alert",
167
- className: (0, _classnames.default)(_snackbarcssmistica.wrapper, i === "CRITICAL" ? _snackbarcssmistica.wrapperCritical : _snackbarcssmistica.wrapperInfo, {
168
- [_snackbarcssmistica.wrapperOpen]: s
167
+ className: (0, _classnames.default)(_snackbarcssmistica.wrapper, c === "CRITICAL" ? _snackbarcssmistica.wrapperCritical : _snackbarcssmistica.wrapperInfo, {
168
+ [_snackbarcssmistica.wrapperOpen]: a
169
169
  })
170
- }, (0, _dom.getPrefixedDataAttributes)(O, "SnackBar")), {
170
+ }, (0, _dom.getPrefixedDataAttributes)(R, "SnackBar")), {
171
171
  children: [
172
172
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
173
173
  className: (0, _classnames.default)(_snackbarcssmistica.content, (0, _sprinklescssmistica.sprinkles)({
174
174
  flexDirection: l ? "column" : "row",
175
175
  alignItems: l ? void 0 : "center"
176
176
  })),
177
- style: g && !l ? {
177
+ style: E && !l ? {
178
178
  paddingRight: 32
179
179
  } : void 0,
180
180
  children: [
181
181
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
182
- style: g && l ? {
182
+ style: E && l ? {
183
183
  paddingRight: 32
184
184
  } : void 0,
185
185
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
@@ -200,7 +200,7 @@ const Z = [
200
200
  padding: 0,
201
201
  background: "transparent"
202
202
  }),
203
- ref: c,
203
+ ref: v,
204
204
  onPress: ()=>{
205
205
  f({
206
206
  action: "BUTTON"
@@ -211,20 +211,20 @@ const Z = [
211
211
  medium: !0,
212
212
  forceMobileSizes: !0,
213
213
  truncate: !0,
214
- color: i === "CRITICAL" ? _skincontractcssmistica.vars.colors.textPrimaryInverse : _skincontractcssmistica.vars.colors.textLinkSnackbar,
214
+ color: c === "CRITICAL" ? _skincontractcssmistica.vars.colors.textPrimaryInverse : _skincontractcssmistica.vars.colors.textLinkSnackbar,
215
215
  children: n
216
216
  })
217
217
  })
218
218
  })
219
219
  ]
220
220
  }),
221
- g ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.default, {
221
+ E ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.default, {
222
222
  onPress: ()=>{
223
223
  f({
224
224
  action: "DISMISS"
225
225
  });
226
226
  },
227
- "aria-label": p.closeButtonLabel,
227
+ "aria-label": d !== null && d !== void 0 ? d : T.closeButtonLabel,
228
228
  className: _snackbarcssmistica.dismissButton[l ? "topRight" : "centered"],
229
229
  style: {
230
230
  display: "flex",
@@ -243,50 +243,54 @@ const Z = [
243
243
  }))
244
244
  })
245
245
  });
246
- }), ne = /*#__PURE__*/ _react.forwardRef((param, O)=>{
247
- let { message: m, buttonText: n, buttonAccessibilityLabel: u, duration: t, onClose: o = ()=>{}, type: i = "INFORMATIVE", withDismiss: d } = param;
248
- const I = n ? re : ee;
249
- t = Math.max(t !== null && t !== void 0 ? t : I, I);
250
- const p = (0, _webviewbridge.isWebViewBridgeAvailable)(), s = _react.useRef(o), a = _react.useRef(!1);
246
+ }), oe = /*#__PURE__*/ _react.forwardRef((param, g)=>{
247
+ let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: d, duration: t, onClose: o = ()=>{}, type: c = "INFORMATIVE", withDismiss: p, dataAttributes: R } = param;
248
+ const T = n ? te : re;
249
+ t = Math.max(t !== null && t !== void 0 ? t : T, T);
250
+ const a = (0, _webviewbridge.isWebViewBridgeAvailable)(), s = _react.useRef(o), I = _react.useRef(!1);
251
251
  return _react.useEffect(()=>{
252
252
  s.current = o;
253
253
  }, [
254
254
  o
255
255
  ]), _react.useEffect(()=>{
256
- p && !a.current && (a.current = !0, (0, _webviewbridge.nativeMessage)({
256
+ a && !I.current && (I.current = !0, (0, _webviewbridge.nativeMessage)({
257
257
  message: m,
258
258
  // @ts-expect-error duration can be 'PERSISTENT' in new webview-bridge lib versions, and old apps will ignore it
259
259
  duration: t === 1 / 0 ? "PERSISTENT" : void 0,
260
260
  buttonText: n,
261
261
  buttonAccessibilityLabel: u,
262
- type: i,
263
- withDismiss: d
264
- }).then((R)=>{
265
- const c = R;
266
- c != null && c.action && Z.includes(c.action) ? s.current({
267
- action: c.action
262
+ closeButtonLabel: d,
263
+ type: c,
264
+ withDismiss: p
265
+ }).then((v)=>{
266
+ const i = v;
267
+ i != null && i.action && ee.includes(i.action) ? s.current({
268
+ action: i.action
268
269
  }) : s.current({
269
270
  action: "DISMISS"
270
271
  });
271
272
  }).finally(()=>{
272
- a.current = !1;
273
+ I.current = !1;
273
274
  }));
274
275
  }, [
275
276
  u,
277
+ d,
276
278
  n,
277
279
  t,
278
280
  m,
279
- p,
280
- i,
281
- d
282
- ]), p ? null : /* @__PURE__ */ (0, _jsxruntime.jsx)(te, {
283
- ref: O,
281
+ a,
282
+ c,
283
+ p
284
+ ]), a ? null : /* @__PURE__ */ (0, _jsxruntime.jsx)(ne, {
285
+ ref: g,
284
286
  message: m,
285
287
  duration: t,
286
288
  buttonText: n,
287
289
  buttonAccessibilityLabel: u,
288
- type: i,
290
+ closeButtonLabel: d,
291
+ type: c,
289
292
  onClose: s.current,
290
- withDismiss: d
293
+ withDismiss: p,
294
+ dataAttributes: R
291
295
  });
292
- }), he = ne;
296
+ }), Se = oe;
package/dist/text.d.ts CHANGED
@@ -21,6 +21,7 @@ export interface TextPresetProps {
21
21
  as?: React.ComponentType<any> | string;
22
22
  role?: string;
23
23
  'aria-level'?: number;
24
+ 'aria-label'?: string;
24
25
  dataAttributes?: DataAttributes;
25
26
  forceMobileSizes?: boolean;
26
27
  textShadow?: string;
package/dist/text.js CHANGED
@@ -17,13 +17,13 @@ _export(exports, {
17
17
  return He;
18
18
  },
19
19
  Text10: function() {
20
- return he;
20
+ return ge;
21
21
  },
22
22
  Text2: function() {
23
- return ke;
23
+ return we;
24
24
  },
25
25
  Text3: function() {
26
- return fe;
26
+ return ke;
27
27
  },
28
28
  Text4: function() {
29
29
  return Se;
@@ -32,25 +32,25 @@ _export(exports, {
32
32
  return Te;
33
33
  },
34
34
  Text6: function() {
35
- return be;
35
+ return fe;
36
36
  },
37
37
  Text7: function() {
38
- return de;
38
+ return be;
39
39
  },
40
40
  Text8: function() {
41
- return ue;
41
+ return de;
42
42
  },
43
43
  Text9: function() {
44
- return ge;
44
+ return ue;
45
45
  },
46
46
  default: function() {
47
- return Le;
47
+ return ze;
48
48
  },
49
49
  mapToWeight: function() {
50
- return $;
50
+ return ee;
51
51
  },
52
52
  textProps: function() {
53
- return x;
53
+ return a;
54
54
  }
55
55
  });
56
56
  const _jsxruntime = require("react/jsx-runtime");
@@ -189,16 +189,16 @@ function _object_without_properties_loose(source, excluded) {
189
189
  }
190
190
  return target;
191
191
  }
192
- const $ = {
192
+ const ee = {
193
193
  light: 300,
194
194
  regular: 400,
195
195
  medium: 500,
196
196
  bold: 700
197
- }, ee = (e)=>e === !0 ? 1 : e || "initial", d = "Ħ", te = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
197
+ }, te = (e)=>e === !0 ? 1 : e || "initial", g = "Ħ", ie = /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
198
198
  children: [
199
199
  /* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
200
200
  "aria-hidden": !0,
201
- children: d
201
+ children: g
202
202
  }),
203
203
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_screenreaderonly.default, {
204
204
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
@@ -206,72 +206,96 @@ const $ = {
206
206
  })
207
207
  })
208
208
  ]
209
- }), ie = (e)=>_react.Children.map(e, (t)=>typeof t != "string" || !t.includes(d) ? t : /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
210
- children: t.split(d).map((i, r)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_react.Fragment, {
211
- children: [
212
- r > 0 && te,
213
- i
214
- ]
215
- }, r))
216
- })), o = (param)=>{
217
- let { weight: e, color: t = _skincontractcssmistica.vars.colors.textPrimary, decoration: i, truncate: r, transform: g, wordBreak: b = !0, hyphens: T = "auto", as: S = "span", children: l, size: f, mobileSize: k = f, desktopSize: H = f, lineHeight: L, mobileLineHeight: w = L, desktopLineHeight: z = L, letterSpacing: P, textAlign: V, textShadow: y, id: C, role: W, "aria-level": R, dataAttributes: N } = param;
218
- const { skinName: E } = (0, _hooks.useTheme)(), F = (0, _themevariantcontext.useIsInverseVariant)(), O = ee(r), _ = {
209
+ }), re = (param)=>{
210
+ let { children: e, ariaLabel: i, as: t } = param;
211
+ return typeof t == "string" && [
212
+ "h1",
213
+ "h2",
214
+ "h3",
215
+ "h4",
216
+ "h5",
217
+ "h6"
218
+ ].includes(t) && typeof e == "string" && e.includes(g) ? {
219
+ ariaLabel: e.replace(new RegExp(g, "g"), "Vivo"),
220
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
221
+ "aria-hidden": !0,
222
+ children: e
223
+ })
224
+ } : {
225
+ children: _react.Children.map(e, (r)=>typeof r != "string" || !r.includes(g) ? r : /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
226
+ children: r.split(g).map((p, l)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_react.Fragment, {
227
+ children: [
228
+ l > 0 && ie,
229
+ p
230
+ ]
231
+ }, l))
232
+ })),
233
+ ariaLabel: i
234
+ };
235
+ }, o = (param)=>{
236
+ let { weight: e, color: i = _skincontractcssmistica.vars.colors.textPrimary, decoration: t, truncate: r, transform: p, wordBreak: l = !0, hyphens: S = "auto", as: b = "span", children: h, size: k, mobileSize: w = k, desktopSize: H = k, lineHeight: z, mobileLineHeight: L = z, desktopLineHeight: v = z, letterSpacing: I, textAlign: P, textShadow: C, id: R, role: W, "aria-level": E, "aria-label": f, dataAttributes: N } = param;
237
+ const { skinName: F } = (0, _hooks.useTheme)(), O = (0, _themevariantcontext.useIsInverseVariant)(), _ = te(r), j = {
219
238
  [_skincontractcssmistica.vars.colors.textPrimary]: _skincontractcssmistica.vars.colors.textPrimaryInverse,
220
239
  [_skincontractcssmistica.vars.colors.textSecondary]: _skincontractcssmistica.vars.colors.textSecondaryInverse,
221
240
  [_skincontractcssmistica.vars.colors.textLink]: _skincontractcssmistica.vars.colors.textLinkInverse,
222
241
  [_skincontractcssmistica.vars.colors.textError]: _skincontractcssmistica.vars.colors.textErrorInverse
223
242
  };
224
- if (!l && l !== 0) return null;
225
- const j = (0, _classnames.default)(_textcssmistica.text, b ? _textcssmistica.withWordBreak : _textcssmistica.withoutWordBreak, {
243
+ if (!h && h !== 0) return null;
244
+ const D = (0, _classnames.default)(_textcssmistica.text, l ? _textcssmistica.withWordBreak : _textcssmistica.withoutWordBreak, {
226
245
  [_textcssmistica.truncate]: r,
227
246
  [_textcssmistica.truncateToOneLine]: r === 1 || r === !0
228
- }), D = (0, _css.applyCssVars)({
229
- [_textcssmistica.vars.mobileSize]: k ? (0, _css.pxToRem)(k) : "inherit",
230
- [_textcssmistica.vars.mobileLineHeight]: w ? (0, _css.pxToRem)(w) : "inherit",
247
+ }), B = (0, _css.applyCssVars)({
248
+ [_textcssmistica.vars.mobileSize]: w ? (0, _css.pxToRem)(w) : "inherit",
249
+ [_textcssmistica.vars.mobileLineHeight]: L ? (0, _css.pxToRem)(L) : "inherit",
231
250
  [_textcssmistica.vars.desktopSize]: H ? (0, _css.pxToRem)(H) : "inherit",
232
- [_textcssmistica.vars.desktopLineHeight]: z ? (0, _css.pxToRem)(z) : "inherit"
233
- }), B = r ? (0, _css.applyCssVars)({
234
- [_textcssmistica.vars.lineClamp]: String(O)
251
+ [_textcssmistica.vars.desktopLineHeight]: v ? (0, _css.pxToRem)(v) : "inherit"
252
+ }), K = r ? (0, _css.applyCssVars)({
253
+ [_textcssmistica.vars.lineClamp]: String(_)
235
254
  }) : {};
236
- var __t;
237
- return /*#__PURE__*/ _react.createElement(S, _object_spread_props(_object_spread({
238
- className: j,
239
- id: C,
255
+ var _j_i;
256
+ return F === _constants.VIVO_NEW_SKIN && ({ ariaLabel: f, children: h } = re({
257
+ children: h,
258
+ ariaLabel: f,
259
+ as: b
260
+ })), /*#__PURE__*/ _react.createElement(b, _object_spread_props(_object_spread({
261
+ className: D,
262
+ id: R,
240
263
  role: W,
241
- "aria-level": R
264
+ "aria-level": E,
265
+ "aria-label": f
242
266
  }, (0, _dom.getPrefixedDataAttributes)(N, "Text")), {
243
- style: _object_spread_props(_object_spread({}, D, B), {
244
- hyphens: T,
245
- WebkitHyphens: T,
246
- letterSpacing: P,
247
- fontWeight: e ? $[e] : "inherit",
248
- textTransform: g || "inherit",
249
- textDecoration: i !== null && i !== void 0 ? i : "inherit",
250
- overflowWrap: b ? "anywhere" : "inherit",
251
- color: F ? (__t = _[t]) !== null && __t !== void 0 ? __t : t : t,
252
- textAlign: V,
253
- textShadow: y,
267
+ style: _object_spread_props(_object_spread({}, B, K), {
268
+ hyphens: S,
269
+ WebkitHyphens: S,
270
+ letterSpacing: I,
271
+ fontWeight: e ? ee[e] : "inherit",
272
+ textTransform: p || "inherit",
273
+ textDecoration: t !== null && t !== void 0 ? t : "inherit",
274
+ overflowWrap: l ? "anywhere" : "inherit",
275
+ color: O ? (_j_i = j[i]) !== null && _j_i !== void 0 ? _j_i : i : i,
276
+ textAlign: P,
277
+ textShadow: C,
254
278
  // When rendering as <pre/>, spaces are preserved and we don't want to remove them
255
- whiteSpace: S === "pre" ? void 0 : "pre-line"
279
+ whiteSpace: b === "pre" ? void 0 : "pre-line"
256
280
  })
257
- }), E === _constants.VIVO_NEW_SKIN ? ie(l) : l);
258
- }, h = (e)=>{
281
+ }), h);
282
+ }, d = (e)=>{
259
283
  if (e.light) return "light";
260
284
  if (e.regular) return "regular";
261
285
  if (e.medium) return "medium";
262
286
  if (e.weight) return e.weight;
263
287
  }, s = (param)=>{
264
- let { forceMobileSizes: e, mobileSize: t, mobileLineHeight: i, desktopSize: r, desktopLineHeight: g } = param;
288
+ let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize: r, desktopLineHeight: p } = param;
265
289
  return e ? {
266
- size: t,
267
- lineHeight: i
290
+ size: i,
291
+ lineHeight: t
268
292
  } : {
269
- mobileSize: t,
270
- mobileLineHeight: i,
293
+ mobileSize: i,
294
+ mobileLineHeight: t,
271
295
  desktopSize: r,
272
- desktopLineHeight: g
296
+ desktopLineHeight: p
273
297
  };
274
- }, x = {
298
+ }, a = {
275
299
  text1: {
276
300
  mobileSize: 12,
277
301
  mobileLineHeight: "16px",
@@ -332,140 +356,140 @@ const $ = {
332
356
  desktopSize: 64,
333
357
  desktopLineHeight: "72px"
334
358
  }
335
- }, he = (_param)=>{
336
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
359
+ }, ge = (_param)=>{
360
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
337
361
  "dataAttributes",
338
362
  "forceMobileSizes"
339
363
  ]);
340
364
  const { textPresets: r } = (0, _hooks.useTheme)();
341
365
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
342
- forceMobileSizes: t
343
- }, x.text10))), {
366
+ forceMobileSizes: i
367
+ }, a.text10))), {
344
368
  weight: r.text10.weight,
345
369
  dataAttributes: _object_spread({
346
370
  "component-name": "Text10"
347
371
  }, e)
348
- }), i));
349
- }, ge = (_param)=>{
350
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
372
+ }), t));
373
+ }, ue = (_param)=>{
374
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
351
375
  "dataAttributes",
352
376
  "forceMobileSizes"
353
377
  ]);
354
378
  const { textPresets: r } = (0, _hooks.useTheme)();
355
379
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
356
- forceMobileSizes: t
357
- }, x.text9))), {
380
+ forceMobileSizes: i
381
+ }, a.text9))), {
358
382
  weight: r.text9.weight,
359
383
  dataAttributes: _object_spread({
360
384
  "component-name": "Text9"
361
385
  }, e)
362
- }), i));
363
- }, ue = (_param)=>{
364
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
386
+ }), t));
387
+ }, de = (_param)=>{
388
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
365
389
  "dataAttributes",
366
390
  "forceMobileSizes"
367
391
  ]);
368
392
  const { textPresets: r } = (0, _hooks.useTheme)();
369
393
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
370
- forceMobileSizes: t
371
- }, x.text8))), {
394
+ forceMobileSizes: i
395
+ }, a.text8))), {
372
396
  weight: r.text8.weight,
373
397
  dataAttributes: _object_spread({
374
398
  "component-name": "Text8"
375
399
  }, e)
376
- }), i));
377
- }, de = (_param)=>{
378
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
400
+ }), t));
401
+ }, be = (_param)=>{
402
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
379
403
  "dataAttributes",
380
404
  "forceMobileSizes"
381
405
  ]);
382
406
  const { textPresets: r } = (0, _hooks.useTheme)();
383
407
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
384
- forceMobileSizes: t
385
- }, x.text7))), {
408
+ forceMobileSizes: i
409
+ }, a.text7))), {
386
410
  weight: r.text7.weight,
387
411
  dataAttributes: _object_spread({
388
412
  "component-name": "Text7"
389
413
  }, e)
390
- }), i));
391
- }, be = (_param)=>{
392
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
414
+ }), t));
415
+ }, fe = (_param)=>{
416
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
393
417
  "dataAttributes",
394
418
  "forceMobileSizes"
395
419
  ]);
396
420
  const { textPresets: r } = (0, _hooks.useTheme)();
397
421
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
398
- forceMobileSizes: t
399
- }, x.text6))), {
422
+ forceMobileSizes: i
423
+ }, a.text6))), {
400
424
  weight: r.text6.weight,
401
425
  dataAttributes: _object_spread({
402
426
  "component-name": "Text6"
403
427
  }, e)
404
- }), i));
428
+ }), t));
405
429
  }, Te = (_param)=>{
406
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
430
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
407
431
  "dataAttributes",
408
432
  "forceMobileSizes"
409
433
  ]);
410
434
  const { textPresets: r } = (0, _hooks.useTheme)();
411
435
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
412
- forceMobileSizes: t
413
- }, x.text5))), {
436
+ forceMobileSizes: i
437
+ }, a.text5))), {
414
438
  weight: r.text5.weight,
415
439
  dataAttributes: _object_spread({
416
440
  "component-name": "Text5"
417
441
  }, e)
418
- }), i));
442
+ }), t));
419
443
  }, Se = (_param)=>{
420
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
444
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
421
445
  "dataAttributes",
422
446
  "forceMobileSizes"
423
447
  ]);
424
448
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
425
- forceMobileSizes: t
426
- }, x.text4))), {
427
- weight: h(i),
449
+ forceMobileSizes: i
450
+ }, a.text4))), {
451
+ weight: d(t),
428
452
  dataAttributes: _object_spread({
429
453
  "component-name": "Text4"
430
454
  }, e)
431
- }), i));
432
- }, fe = (_param)=>{
433
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
455
+ }), t));
456
+ }, ke = (_param)=>{
457
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
434
458
  "dataAttributes",
435
459
  "forceMobileSizes"
436
460
  ]);
437
461
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
438
- forceMobileSizes: t
439
- }, x.text3))), {
440
- weight: h(i),
462
+ forceMobileSizes: i
463
+ }, a.text3))), {
464
+ weight: d(t),
441
465
  dataAttributes: _object_spread({
442
466
  "component-name": "Text3"
443
467
  }, e)
444
- }), i));
445
- }, ke = (_param)=>{
446
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
468
+ }), t));
469
+ }, we = (_param)=>{
470
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
447
471
  "dataAttributes",
448
472
  "forceMobileSizes"
449
473
  ]);
450
474
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
451
- forceMobileSizes: t
452
- }, x.text2))), {
453
- weight: h(i),
475
+ forceMobileSizes: i
476
+ }, a.text2))), {
477
+ weight: d(t),
454
478
  dataAttributes: _object_spread({
455
479
  "component-name": "Text2"
456
480
  }, e)
457
- }), i));
481
+ }), t));
458
482
  }, He = (_param)=>{
459
- var { dataAttributes: e, forceMobileSizes: t } = _param, i = _object_without_properties(_param, [
483
+ var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
460
484
  "dataAttributes",
461
485
  "forceMobileSizes"
462
486
  ]);
463
487
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(o, _object_spread(_object_spread_props(_object_spread({}, s(_object_spread({
464
- forceMobileSizes: t
465
- }, x.text1))), {
466
- weight: h(i),
488
+ forceMobileSizes: i
489
+ }, a.text1))), {
490
+ weight: d(t),
467
491
  dataAttributes: _object_spread({
468
492
  "component-name": "Text1"
469
493
  }, e)
470
- }), i));
471
- }, Le = o;
494
+ }), t));
495
+ }, ze = o;
package/dist/tooltip.d.ts CHANGED
@@ -25,6 +25,7 @@ type BaseTooltipProps = {
25
25
  open?: boolean;
26
26
  hasPointerInteractionOnly?: boolean;
27
27
  onClose?: () => void;
28
+ closeButtonLabel?: string;
28
29
  trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
29
30
  };
30
31
  export declare const BaseTooltip: React.FC<BaseTooltipProps>;