@telefonica/mistica 15.18.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 (44) 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/logo-blau.d.ts +4 -0
  7. package/dist/logo-blau.js +74 -0
  8. package/dist/logo-common.d.ts +9 -0
  9. package/dist/logo-common.js +21 -0
  10. package/dist/logo-movistar.d.ts +4 -0
  11. package/dist/logo-movistar.js +99 -0
  12. package/dist/logo-o2-new.d.ts +4 -0
  13. package/dist/logo-o2-new.js +29 -0
  14. package/dist/logo-o2.d.ts +4 -0
  15. package/dist/logo-o2.js +29 -0
  16. package/dist/logo-telefonica.d.ts +4 -0
  17. package/dist/logo-telefonica.js +197 -0
  18. package/dist/logo-tu.d.ts +4 -0
  19. package/dist/logo-tu.js +28 -0
  20. package/dist/logo-vivo.d.ts +4 -0
  21. package/dist/logo-vivo.js +81 -0
  22. package/dist/logo.d.ts +10 -10
  23. package/dist/logo.js +174 -534
  24. package/dist/navigation-bar.d.ts +7 -0
  25. package/dist/navigation-bar.js +99 -91
  26. package/dist/package-version.js +1 -1
  27. package/dist/text.d.ts +1 -0
  28. package/dist/text.js +133 -109
  29. package/dist-es/button.css-mistica.js +36 -18
  30. package/dist-es/button.js +219 -268
  31. package/dist-es/logo-blau.js +65 -0
  32. package/dist-es/logo-common.js +12 -0
  33. package/dist-es/logo-movistar.js +90 -0
  34. package/dist-es/logo-o2-new.js +20 -0
  35. package/dist-es/logo-o2.js +20 -0
  36. package/dist-es/logo-telefonica.js +188 -0
  37. package/dist-es/logo-tu.js +19 -0
  38. package/dist-es/logo-vivo.js +72 -0
  39. package/dist-es/logo.js +132 -533
  40. package/dist-es/navigation-bar.js +163 -155
  41. package/dist-es/package-version.js +1 -1
  42. package/dist-es/style.css +1 -1
  43. package/dist-es/text.js +143 -119
  44. package/package.json +1 -1
package/dist/button.js CHANGED
@@ -11,19 +11,19 @@ function _export(target, all) {
11
11
  }
12
12
  _export(exports, {
13
13
  ButtonDanger: function() {
14
- return De;
14
+ return ze;
15
15
  },
16
16
  ButtonLink: function() {
17
- return Re;
17
+ return Pe;
18
18
  },
19
19
  ButtonLinkDanger: function() {
20
- return Be;
20
+ return Ne;
21
21
  },
22
22
  ButtonPrimary: function() {
23
- return Te;
23
+ return Se;
24
24
  },
25
25
  ButtonSecondary: function() {
26
- return Ae;
26
+ return Ve;
27
27
  }
28
28
  });
29
29
  const _jsxruntime = require("react/jsx-runtime");
@@ -167,35 +167,34 @@ function _object_without_properties_loose(source, excluded) {
167
167
  }
168
168
  return target;
169
169
  }
170
- const k = (param)=>{
171
- let { content: e, defaultIconSize: t, renderText: i } = param;
172
- const l = (0, _utils.flattenChildren)(e), u = l.length, c = [];
173
- let s = [];
174
- const f = ()=>{
175
- c.push(/* @__PURE__ */ (0, _jsxruntime.jsx)(_react.Fragment, {
176
- children: i(s)
177
- }, c.length)), s = [];
170
+ const A = (param)=>{
171
+ let { small: e, content: i, defaultIconSize: n, TextContentRenderer: r } = param;
172
+ const f = (0, _utils.flattenChildren)(i), g = f.length, l = [];
173
+ let c = [];
174
+ const m = ()=>{
175
+ l.push(/* @__PURE__ */ (0, _jsxruntime.jsx)(_react.Fragment, {
176
+ children: r(c, e)
177
+ }, l.length)), c = [];
178
178
  };
179
- return l.forEach((d, m)=>{
180
- const h = m === 0, o = m === u - 1;
181
- if (/*#__PURE__*/ _react.isValidElement(d)) {
182
- s.length && f();
183
- var _d_props_size;
184
- const v = (_d_props_size = d.props.size) !== null && _d_props_size !== void 0 ? _d_props_size : t;
185
- c.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
179
+ return f.forEach((s, d)=>{
180
+ const u = d === 0, o = d === g - 1;
181
+ if (/*#__PURE__*/ _react.isValidElement(s)) {
182
+ c.length && m();
183
+ const y = s.props.size !== void 0 ? (0, _css.pxToRem)(s.props.size) : n;
184
+ l.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
186
185
  style: {
187
186
  display: "flex",
188
187
  alignItems: "center",
189
- marginLeft: h ? 0 : _buttoncssmistica.ICON_MARGIN_PX,
190
- marginRight: o ? 0 : _buttoncssmistica.ICON_MARGIN_PX
188
+ marginLeft: u ? 0 : _buttoncssmistica.iconMargin,
189
+ marginRight: o ? 0 : _buttoncssmistica.iconMargin
191
190
  },
192
- children: /*#__PURE__*/ _react.cloneElement(d, {
193
- size: (0, _css.pxToRem)(v)
191
+ children: /*#__PURE__*/ _react.cloneElement(s, {
192
+ size: y
194
193
  })
195
- }, c.length));
196
- } else s.push(d), o && f();
197
- }), c;
198
- }, he = ()=>{
194
+ }, l.length));
195
+ } else c.push(s), o && m();
196
+ }), l;
197
+ }, me = ()=>{
199
198
  const { skinName: e } = (0, _hooks.useTheme)();
200
199
  return e === _constants.VIVO_NEW_SKIN ? /* @__PURE__ */ (0, _jsxruntime.jsx)("svg", {
201
200
  width: "0.5em",
@@ -215,23 +214,33 @@ const k = (param)=>{
215
214
  fill: "currentColor"
216
215
  })
217
216
  });
218
- }, X = (param)=>{
219
- let { showSpinner: e, children: t, small: i, loadingText: l, shouldRenderSpinner: u, setShouldRenderSpinner: c, renderText: s, textContentStyle: f, StartIcon: d, EndIcon: m, withChevron: h } = param;
220
- const o = i ? _buttoncssmistica.SMALL_ICON_SIZE : _buttoncssmistica.ICON_SIZE, r = (0, _css.pxToRem)(i ? _buttoncssmistica.SMALL_SPINNER_SIZE : _buttoncssmistica.SPINNER_SIZE);
217
+ }, fe = (param)=>{
218
+ let { showSpinner: e, children: i, small: n, loadingText: r, shouldRenderSpinner: f, setShouldRenderSpinner: g, TextContentRenderer: l, StartIcon: c, EndIcon: m, withChevron: s } = param;
219
+ const d = n ? _buttoncssmistica.iconSize.small : _buttoncssmistica.iconSize.default, u = n ? _buttoncssmistica.spinnerSize.small : _buttoncssmistica.spinnerSize.default, o = A({
220
+ small: n,
221
+ content: i,
222
+ defaultIconSize: d,
223
+ TextContentRenderer: l
224
+ }), C = A({
225
+ small: n,
226
+ content: r,
227
+ defaultIconSize: d,
228
+ TextContentRenderer: l
229
+ });
221
230
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
222
231
  children: [
223
232
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
224
233
  "aria-hidden": e ? !0 : void 0,
225
- className: f,
234
+ className: _buttoncssmistica.textContent,
226
235
  children: [
227
- d && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
236
+ c && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
228
237
  style: {
229
238
  display: "flex",
230
239
  alignItems: "center",
231
- marginRight: _buttoncssmistica.ICON_MARGIN_PX
240
+ marginRight: _buttoncssmistica.iconMargin
232
241
  },
233
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(d, {
234
- size: (0, _css.pxToRem)(o),
242
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(c, {
243
+ size: d,
235
244
  color: "currentColor"
236
245
  })
237
246
  }),
@@ -241,29 +250,25 @@ const k = (param)=>{
241
250
  alignItems: "baseline"
242
251
  },
243
252
  children: [
244
- k({
245
- content: t,
246
- defaultIconSize: o,
247
- renderText: s
248
- }),
249
- h && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
253
+ o,
254
+ s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
250
255
  style: {
251
256
  display: "flex",
252
257
  alignItems: "center",
253
- marginLeft: _buttoncssmistica.CHEVRON_MARGIN_LEFT_LINK
258
+ marginLeft: _buttoncssmistica.chevronMarginLeft
254
259
  },
255
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(he, {})
260
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(me, {})
256
261
  })
257
262
  ]
258
263
  }),
259
- m && !h && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
264
+ m && !s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
260
265
  style: {
261
266
  display: "flex",
262
267
  alignItems: "center",
263
- marginLeft: _buttoncssmistica.ICON_MARGIN_PX
268
+ marginLeft: _buttoncssmistica.iconMargin
264
269
  },
265
270
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(m, {
266
- size: (0, _css.pxToRem)(o),
271
+ size: d,
267
272
  color: "currentColor"
268
273
  })
269
274
  })
@@ -272,135 +277,137 @@ const k = (param)=>{
272
277
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
273
278
  className: _buttoncssmistica.loadingFiller,
274
279
  "aria-hidden": !0,
275
- style: l ? {
276
- paddingLeft: r,
277
- paddingRight: _buttoncssmistica.ICON_MARGIN_PX + 2 * (i ? _buttoncssmistica.X_SMALL_PADDING_PX : _buttoncssmistica.X_PADDING_PX)
280
+ style: r ? {
281
+ paddingLeft: u,
282
+ paddingRight: `calc(${_buttoncssmistica.iconMargin} + 2 * ${n ? _buttoncssmistica.buttonPaddingX.small : _buttoncssmistica.buttonPaddingX.default})`
278
283
  } : void 0,
279
- children: k({
280
- content: l,
281
- defaultIconSize: o,
282
- renderText: s
283
- })
284
+ children: C
284
285
  }),
285
286
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
286
287
  "aria-hidden": e ? void 0 : !0,
287
288
  className: _buttoncssmistica.loadingContent,
288
289
  onTransitionEnd: ()=>{
289
- e !== u && c(e);
290
+ e !== f && g(e);
290
291
  },
291
292
  children: [
292
- u ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_spinner.default, {
293
- rolePresentation: !!l,
293
+ f ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_spinner.default, {
294
+ rolePresentation: !!r,
294
295
  color: "currentcolor",
295
296
  delay: "0s",
296
- size: r
297
+ size: u
297
298
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
298
299
  style: {
299
300
  display: "inline-block",
300
- width: r,
301
- height: r
301
+ width: u,
302
+ height: u
302
303
  }
303
304
  }),
304
- l ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
305
+ r ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
305
306
  paddingLeft: 8,
306
- children: k({
307
- content: l,
308
- defaultIconSize: o,
309
- renderText: s
310
- })
307
+ children: C
311
308
  }) : null
312
309
  ]
313
310
  })
314
311
  ]
315
312
  });
316
- }, R = /*#__PURE__*/ _react.forwardRef((e, t)=>{
317
- const { textPresets: i } = (0, _hooks.useTheme)(), { eventFormat: l } = (0, _analytics.useTrackingConfig)(), { formStatus: u, formId: c } = (0, _formcontext.useForm)(), s = (0, _themevariantcontext.useIsInverseVariant)(), { loadingText: f } = e, d = !!e.submit, m = u === "sending", [h, o] = _react.useState(!1), r = e.showSpinner || m && d || h, [v, L] = _react.useState(!!r);
313
+ }, x = /*#__PURE__*/ _react.forwardRef((e, i)=>{
314
+ var _e_withChevron;
315
+ const { eventFormat: n } = (0, _analytics.useTrackingConfig)(), { formStatus: r, formId: f } = (0, _formcontext.useForm)(), g = (0, _themevariantcontext.useIsInverseVariant)(), { loadingText: l } = e, c = !!e.submit, m = r === "sending", { isDarkMode: s } = (0, _hooks.useTheme)(), [d, u] = _react.useState(!1), o = e.showSpinner || m && c || d, C = (_e_withChevron = e.withChevron) !== null && _e_withChevron !== void 0 ? _e_withChevron : e.buttonType.startsWith("link") && (!!e.href || !!e.to), [y, P] = _react.useState(!!o);
318
316
  _react.useEffect(()=>{
319
- r && !v && L(!0);
317
+ o && !y && P(!0);
320
318
  }, [
321
- r,
322
- v,
323
- u
319
+ o,
320
+ y,
321
+ r
324
322
  ]);
325
323
  var _e_trackingEvent;
326
- const N = ()=>l === "google-analytics-4" ? {
324
+ const W = ()=>{
325
+ let b, h;
326
+ switch(e.buttonType){
327
+ case "link":
328
+ b = "link", h = _analytics.eventActions.linkTapped;
329
+ break;
330
+ case "linkDanger":
331
+ b = "danger_link", h = _analytics.eventActions.linkTapped;
332
+ break;
333
+ default:
334
+ b = `${e.buttonType}_button`, h = `${e.buttonType}_button_tapped`;
335
+ break;
336
+ }
337
+ return n === "google-analytics-4" ? {
327
338
  name: _analytics.eventNames.userInteraction,
328
- component_type: `${e.type}_button`,
339
+ component_type: b,
329
340
  component_copy: (0, _common.getTextFromChildren)(e.children)
330
341
  } : {
331
342
  category: _analytics.eventCategories.userInteraction,
332
- action: `${e.type}_button_tapped`,
343
+ action: h,
333
344
  label: (0, _common.getTextFromChildren)(e.children)
334
- }, _ = (I)=>e.small ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
335
- size: 14,
336
- lineHeight: 20,
337
- weight: i.button.weight,
338
- truncate: 1,
339
- color: "inherit",
340
- as: "div",
341
- children: I
342
- }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
343
- weight: i.button.weight,
344
- truncate: 1,
345
- color: "inherit",
346
- as: "div",
347
- children: I
348
- }), b = {
349
- ref: t,
350
- className: (0, _classnames.default)(s ? _buttoncssmistica.inverseButtonVariants[e.type] : _buttoncssmistica.buttonVariants[e.type], e.className, {
345
+ };
346
+ }, N = e.buttonType.startsWith("link") ? _buttoncssmistica.linkMinWidth : _buttoncssmistica.buttonMinWidth, S = e.buttonType === "linkDanger" && s && g ? "linkDangerDark" : e.buttonType, T = {
347
+ ref: i,
348
+ className: (0, _classnames.default)(g ? _buttoncssmistica.inverseButtonVariants[S] : _buttoncssmistica.buttonVariants[S], e.className, {
351
349
  [_buttoncssmistica.small]: e.small,
352
- [_buttoncssmistica.isLoading]: r
350
+ [_buttoncssmistica.isLoading]: o
353
351
  }),
354
- style: _object_spread({
352
+ style: _object_spread(_object_spread_props(_object_spread({}, (0, _css.applyCssVars)({
353
+ [_buttoncssmistica.buttonVars.minWidth]: e.small ? N.small : N.default
354
+ }), e.bleedLeft ? {
355
+ marginLeft: `calc(-1 * (${_buttoncssmistica.borderSize} + ${e.small ? _buttoncssmistica.buttonPaddingX.small : _buttoncssmistica.buttonPaddingX.default}))`
356
+ } : void 0, e.bleedRight ? {
357
+ marginRight: `calc(-1 * (${_buttoncssmistica.borderSize} + ${e.small ? _buttoncssmistica.buttonPaddingX.small : _buttoncssmistica.buttonPaddingX.default}))`
358
+ } : void 0, e.bleedY ? {
359
+ marginTop: `calc(-1 * (${_buttoncssmistica.borderSize} + ${e.small ? _buttoncssmistica.buttonPaddingY.small : _buttoncssmistica.buttonPaddingY.default}))`,
360
+ marginBottom: `calc(-1 * (${_buttoncssmistica.borderSize} + ${e.small ? _buttoncssmistica.buttonPaddingY.small : _buttoncssmistica.buttonPaddingY.default}))`
361
+ } : void 0), {
355
362
  cursor: e.fake ? "pointer" : void 0
356
- }, e.style),
357
- trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? N() : void 0,
363
+ }), e.style),
364
+ trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? W() : void 0,
358
365
  dataAttributes: e.dataAttributes,
359
366
  "aria-label": e["aria-label"],
360
367
  "aria-controls": e["aria-controls"],
361
368
  "aria-expanded": e["aria-expanded"],
362
369
  "aria-haspopup": e["aria-haspopup"],
363
370
  tabIndex: e.tabIndex,
364
- children: X({
365
- showSpinner: r,
366
- shouldRenderSpinner: v,
367
- setShouldRenderSpinner: L,
371
+ children: fe({
372
+ showSpinner: o,
373
+ shouldRenderSpinner: y,
374
+ setShouldRenderSpinner: P,
368
375
  children: e.children,
369
- loadingText: f,
376
+ loadingText: l,
370
377
  small: e.small,
371
- renderText: _,
372
- textContentStyle: _buttoncssmistica.textContent,
378
+ TextContentRenderer: e.TextContentRenderer,
373
379
  StartIcon: e.StartIcon,
374
- EndIcon: e.EndIcon
380
+ EndIcon: e.EndIcon,
381
+ withChevron: C
375
382
  }),
376
- disabled: e.disabled || r || m,
383
+ disabled: e.disabled || o || m,
377
384
  role: e.role
378
385
  };
379
386
  if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
380
387
  if (e.fake) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
381
388
  maybe: !0
382
- }, b), {
389
+ }, T), {
383
390
  role: "presentation",
384
391
  "aria-hidden": "true"
385
392
  }));
386
393
  if (e.submit) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread({
387
394
  type: "submit",
388
- formId: c,
395
+ formId: f,
389
396
  onPress: ()=>{}
390
- }, b));
391
- if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, b), {
392
- onPress: (I)=>{
393
- const y = e.onPress(I);
394
- y && (o(!0), y.finally(()=>o(!1)));
397
+ }, T));
398
+ if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, T), {
399
+ onPress: (b)=>{
400
+ const h = e.onPress(b);
401
+ h && (u(!0), h.finally(()=>u(!1)));
395
402
  }
396
403
  }));
397
- if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, b), {
404
+ if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, T), {
398
405
  to: e.to,
399
406
  newTab: e.newTab,
400
407
  fullPageOnWebView: e.fullPageOnWebView,
401
408
  onNavigate: e.onNavigate
402
409
  }));
403
- if (e.href || e.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, b), {
410
+ if (e.href || e.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, T), {
404
411
  href: e.href,
405
412
  newTab: e.newTab,
406
413
  loadOnTop: e.loadOnTop,
@@ -408,155 +415,99 @@ const k = (param)=>{
408
415
  }));
409
416
  if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
410
417
  return null;
411
- }), Z = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
412
- var { type: e } = _param, t = _object_without_properties(_param, [
413
- "type"
414
- ]);
415
- var _t_withChevron;
416
- const { formStatus: l } = (0, _formcontext.useForm)(), u = (0, _themevariantcontext.useIsInverseVariant)(), { textPresets: c } = (0, _hooks.useTheme)(), { eventFormat: s } = (0, _analytics.useTrackingConfig)(), { isDarkMode: f } = (0, _hooks.useTheme)(), { loadingText: d } = t, m = l === "sending", [h, o] = _react.useState(!1), r = t.showSpinner || h, v = (_t_withChevron = t.withChevron) !== null && _t_withChevron !== void 0 ? _t_withChevron : !!t.href || !!t.to, [L, N] = _react.useState(!!r);
417
- _react.useEffect(()=>{
418
- r && !L && N(!0);
419
- }, [
420
- r,
421
- L,
422
- l
423
- ]);
424
- var _t_trackingEvent;
425
- const _ = ()=>s === "google-analytics-4" ? {
426
- name: _analytics.eventNames.userInteraction,
427
- component_type: e === "danger" ? "danger_link" : "link",
428
- component_copy: (0, _common.getTextFromChildren)(t.children)
429
- } : {
430
- category: _analytics.eventCategories.userInteraction,
431
- action: _analytics.eventActions.linkTapped,
432
- label: (0, _common.getTextFromChildren)(t.children)
433
- }, b = (x)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
434
- weight: c.button.weight,
435
- truncate: 1,
436
- color: "inherit",
437
- children: x
438
- }), I = e === "danger" && f && u ? "dangerDark" : e, y = {
439
- className: (0, _classnames.default)(u ? _buttoncssmistica.inverseLinkVariants[I] : _buttoncssmistica.linkVariants[I], {
440
- [_buttoncssmistica.isLoading]: r
441
- }),
442
- /**
443
- * Setting bleed classes with style to override the margin:0 set by the Touchable component.
444
- * If we set it using className, it may not work depending on the order in which the styles are applied.
445
- */ style: _object_spread({}, t.bleedLeft ? {
446
- marginLeft: -_buttoncssmistica.PADDING_X_LINK
447
- } : void 0, t.bleedRight ? {
448
- marginRight: -_buttoncssmistica.PADDING_X_LINK
449
- } : void 0, t.bleedY ? {
450
- marginTop: -_buttoncssmistica.PADDING_Y_LINK,
451
- marginBottom: -_buttoncssmistica.PADDING_Y_LINK
452
- } : void 0),
453
- trackingEvent: (_t_trackingEvent = t.trackingEvent) !== null && _t_trackingEvent !== void 0 ? _t_trackingEvent : t.trackEvent ? _() : void 0,
454
- dataAttributes: t.dataAttributes,
455
- "aria-label": t["aria-label"],
456
- "aria-controls": t["aria-controls"],
457
- "aria-expanded": t["aria-expanded"],
458
- "aria-haspopup": t["aria-haspopup"],
459
- children: X({
460
- showSpinner: r,
461
- shouldRenderSpinner: L,
462
- setShouldRenderSpinner: N,
463
- children: t.children,
464
- loadingText: d,
465
- small: !0,
466
- renderText: b,
467
- textContentStyle: _buttoncssmistica.textContentLink,
468
- StartIcon: t.StartIcon,
469
- EndIcon: t.EndIcon,
470
- withChevron: v
471
- }),
472
- disabled: t.disabled || r || m,
473
- role: t.role
474
- };
475
- if (process.env.NODE_ENV !== "production" && (t.to === "" || t.href === "")) throw Error("to or href props are empty strings");
476
- if (t.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
477
- ref: i
478
- }, y), {
479
- onPress: (x)=>{
480
- const B = t.onPress(x);
481
- B && (o(!0), B.finally(()=>o(!1)));
482
- }
483
- }));
484
- if (t.to || t.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
485
- ref: i
486
- }, y), {
487
- to: t.to,
488
- newTab: t.newTab,
489
- fullPageOnWebView: t.fullPageOnWebView,
490
- onNavigate: t.onNavigate
491
- }));
492
- if (t.href || t.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
493
- ref: i
494
- }, y), {
495
- href: t.href,
496
- newTab: t.newTab,
497
- onNavigate: t.onNavigate
498
- }));
499
- if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
500
- return null;
501
- }), Re = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
502
- var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
503
- "dataAttributes"
418
+ }), I = (e, i)=>{
419
+ const { textPresets: n } = (0, _hooks.useTheme)();
420
+ return i ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
421
+ size: 14,
422
+ lineHeight: 20,
423
+ weight: n.button.weight,
424
+ truncate: 1,
425
+ color: "inherit",
426
+ as: "div",
427
+ children: e
428
+ }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
429
+ weight: n.button.weight,
430
+ truncate: 1,
431
+ color: "inherit",
432
+ as: "div",
433
+ children: e
434
+ });
435
+ }, O = (e, i)=>{
436
+ const { textPresets: n } = (0, _hooks.useTheme)();
437
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(i ? _text.Text2 : _text.Text3, {
438
+ weight: n.button.weight,
439
+ truncate: 1,
440
+ color: "inherit",
441
+ children: e
442
+ });
443
+ }, Pe = /*#__PURE__*/ _react.forwardRef((_param, r)=>{
444
+ var { dataAttributes: e, small: i } = _param, n = _object_without_properties(_param, [
445
+ "dataAttributes",
446
+ "small"
504
447
  ]);
505
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(Z, _object_spread_props(_object_spread({
448
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
506
449
  dataAttributes: _object_spread({
507
450
  "component-name": "ButtonLink"
508
451
  }, e)
509
- }, t), {
510
- ref: i,
511
- type: "default"
452
+ }, n), {
453
+ small: !0,
454
+ ref: r,
455
+ buttonType: "link",
456
+ TextContentRenderer: O
512
457
  }));
513
- }), Be = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
514
- var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
515
- "dataAttributes"
458
+ }), Ne = /*#__PURE__*/ _react.forwardRef((_param, r)=>{
459
+ var { dataAttributes: e, small: i } = _param, n = _object_without_properties(_param, [
460
+ "dataAttributes",
461
+ "small"
516
462
  ]);
517
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(Z, _object_spread_props(_object_spread({
463
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
518
464
  dataAttributes: _object_spread({
519
465
  "component-name": "ButtonLinkDanger"
520
466
  }, e)
521
- }, t), {
467
+ }, n), {
522
468
  withChevron: !1,
523
- ref: i,
524
- type: "danger"
469
+ small: !0,
470
+ ref: r,
471
+ buttonType: "linkDanger",
472
+ TextContentRenderer: O
525
473
  }));
526
- }), Te = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
527
- var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
474
+ }), Se = /*#__PURE__*/ _react.forwardRef((_param, n)=>{
475
+ var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
528
476
  "dataAttributes"
529
477
  ]);
530
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(R, _object_spread_props(_object_spread({
478
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
531
479
  dataAttributes: _object_spread({
532
480
  "component-name": "ButtonPrimary"
533
481
  }, e)
534
- }, t), {
535
- ref: i,
536
- type: "primary"
482
+ }, i), {
483
+ ref: n,
484
+ buttonType: "primary",
485
+ TextContentRenderer: I
537
486
  }));
538
- }), Ae = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
539
- var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
487
+ }), Ve = /*#__PURE__*/ _react.forwardRef((_param, n)=>{
488
+ var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
540
489
  "dataAttributes"
541
490
  ]);
542
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(R, _object_spread_props(_object_spread({
491
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
543
492
  dataAttributes: _object_spread({
544
493
  "component-name": "ButtonSecondary"
545
494
  }, e)
546
- }, t), {
547
- ref: i,
548
- type: "secondary"
495
+ }, i), {
496
+ ref: n,
497
+ buttonType: "secondary",
498
+ TextContentRenderer: I
549
499
  }));
550
- }), De = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
551
- var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
500
+ }), ze = /*#__PURE__*/ _react.forwardRef((_param, n)=>{
501
+ var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
552
502
  "dataAttributes"
553
503
  ]);
554
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(R, _object_spread_props(_object_spread({
504
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(x, _object_spread_props(_object_spread({
555
505
  dataAttributes: _object_spread({
556
506
  "component-name": "ButtonDanger"
557
507
  }, e)
558
- }, t), {
559
- ref: i,
560
- type: "danger"
508
+ }, i), {
509
+ ref: n,
510
+ buttonType: "danger",
511
+ TextContentRenderer: I
561
512
  }));
562
513
  });
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { LogoImageProps } from './logo-common';
3
+ declare const BlauLogoImage: ({ size, type, isDarkMode, isInverse }: LogoImageProps) => JSX.Element;
4
+ export default BlauLogoImage;