@telefonica/mistica 15.1.0 → 15.2.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.
package/dist/theme.js CHANGED
@@ -10,10 +10,10 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  NAVBAR_HEIGHT_DESKTOP: function() {
13
- return u;
13
+ return c;
14
14
  },
15
15
  NAVBAR_HEIGHT_MOBILE: function() {
16
- return c;
16
+ return u;
17
17
  },
18
18
  dimensions: function() {
19
19
  return V;
@@ -111,6 +111,7 @@ const l = {
111
111
  disablePasswordVisibility: "Ocultar contrase\xf1a",
112
112
  loading: "Cargando",
113
113
  linkOpensInNewTab: "Se abre en ventana nueva",
114
+ linkOpensInCurrentPage: "P\xe1gina actual",
114
115
  modalClose: "Cerrar",
115
116
  dialogCancelButton: "Cancelar",
116
117
  dialogAcceptButton: "Aceptar",
@@ -156,6 +157,7 @@ const l = {
156
157
  disablePasswordVisibility: "Hide password",
157
158
  loading: "Loading",
158
159
  linkOpensInNewTab: "Opens in a new window",
160
+ linkOpensInCurrentPage: "Current page",
159
161
  modalClose: "Close",
160
162
  dialogCancelButton: "Cancel",
161
163
  dialogAcceptButton: "Accept",
@@ -201,6 +203,7 @@ const l = {
201
203
  disablePasswordVisibility: "Passwort verbergen",
202
204
  loading: "Wird gespeichert",
203
205
  linkOpensInNewTab: "Wird in neuem Fenster ge\xf6ffnet",
206
+ linkOpensInCurrentPage: "Aktuelle Seite",
204
207
  modalClose: "Schlie\xdfen",
205
208
  dialogCancelButton: "Abbrechen",
206
209
  dialogAcceptButton: "Akzeptieren",
@@ -246,6 +249,7 @@ const l = {
246
249
  disablePasswordVisibility: "esconder a senha",
247
250
  loading: "Carregando",
248
251
  linkOpensInNewTab: "Abre em nova janela",
252
+ linkOpensInCurrentPage: "P\xe1gina atual",
249
253
  modalClose: "Fechar",
250
254
  dialogCancelButton: "Cancelar",
251
255
  dialogAcceptButton: "Aceitar",
@@ -298,9 +302,9 @@ const l = {
298
302
  default:
299
303
  return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${e}`), i;
300
304
  }
301
- }, c = 56, u = 80, V = {
302
- headerMobileHeight: c,
303
- headerDesktopHeight: u
305
+ }, u = 56, c = 80, V = {
306
+ headerMobileHeight: u,
307
+ headerDesktopHeight: c
304
308
  }, m = (_param)=>{
305
309
  var { to: e, innerRef: r } = _param, a = _object_without_properties(_param, [
306
310
  "to",
@@ -312,14 +316,14 @@ const l = {
312
316
  }, a), {
313
317
  children: a.children
314
318
  }));
315
- }, C = (e)=>e, f = (e)=>(_param)=>{
319
+ }, C = (e)=>e, p = (e)=>(_param)=>{
316
320
  var { innerRef: r } = _param, a = _object_without_properties(_param, [
317
321
  "innerRef"
318
322
  ]);
319
323
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(e, _object_spread({
320
324
  ref: r
321
325
  }, a));
322
- }, p = (e)=>(_param)=>{
326
+ }, f = (e)=>(_param)=>{
323
327
  var { to: r, innerRef: a, children: t } = _param, n = _object_without_properties(_param, [
324
328
  "to",
325
329
  "innerRef",
@@ -352,9 +356,9 @@ const l = {
352
356
  case "ReactRouter5":
353
357
  return C(e.Component);
354
358
  case "ReactRouter6":
355
- return f(e.Component);
356
- case "Next12":
357
359
  return p(e.Component);
360
+ case "Next12":
361
+ return f(e.Component);
358
362
  case "Next13":
359
363
  case "Next14":
360
364
  return b(e.Component);
package/dist/touchable.js CHANGED
@@ -11,10 +11,10 @@ function _export(target, all) {
11
11
  }
12
12
  _export(exports, {
13
13
  BaseTouchable: function() {
14
- return p;
14
+ return ae;
15
15
  },
16
16
  default: function() {
17
- return ee;
17
+ return te;
18
18
  }
19
19
  });
20
20
  const _jsxruntime = require("react/jsx-runtime");
@@ -152,13 +152,14 @@ function _object_without_properties_loose(source, excluded) {
152
152
  }
153
153
  return target;
154
154
  }
155
- const P = /*#__PURE__*/ _react.forwardRef((e, t)=>{
156
- const { texts: f, analytics: w, platformOverrides: E, Link: R, useHrefDecorator: x } = (0, _hooks.useTheme)(), O = x(), u = _react.useRef(!1);
155
+ const E = /*#__PURE__*/ _react.forwardRef((e, t)=>{
156
+ var P;
157
+ const { texts: o, analytics: C, platformOverrides: O, Link: R, useHrefDecorator: x } = (0, _hooks.useTheme)(), I = x(), u = _react.useRef(!1);
157
158
  let l = [];
158
159
  e.trackingEvent && (Array.isArray(e.trackingEvent) ? l = e.trackingEvent : l = [
159
160
  e.trackingEvent
160
161
  ]);
161
- const o = e.children, n = _object_spread({
162
+ const d = e.children, i = _object_spread({
162
163
  className: e.className,
163
164
  disabled: e.disabled,
164
165
  style: e.style,
@@ -172,39 +173,39 @@ const P = /*#__PURE__*/ _react.forwardRef((e, t)=>{
172
173
  "aria-selected": e["aria-selected"],
173
174
  "aria-live": e["aria-live"],
174
175
  tabIndex: e.tabIndex
175
- }, (0, _dom.getPrefixedDataAttributes)(e.dataAttributes, "Touchable")), s = e.type ? e.type : "button", r = !!e.href && !!e.newTab, h = !r && !!e.href && !!e.loadOnTop, b = (a)=>{
176
+ }, (0, _dom.getPrefixedDataAttributes)(e.dataAttributes, "Touchable")), s = e.type ? e.type : "button", r = !!e.href && !!e.newTab, D = (P = e.href) == null ? void 0 : P.startsWith("#"), h = !r && !!e.href && !!e.loadOnTop, b = (a)=>{
176
177
  e.stopPropagation && a.stopPropagation();
177
178
  }, g = (a)=>{
178
179
  e.onPress && e.onPress(a);
179
180
  }, y = ()=>{
180
181
  var _e_to_pathname;
181
- return e.href ? O(e.href) : e.to && e.fullPageOnWebView ? typeof e.to == "string" ? e.to : (_e_to_pathname = e.to.pathname) !== null && _e_to_pathname !== void 0 ? _e_to_pathname : "" : "";
182
- }, k = ()=>Promise.all(l.map((a)=>w.logEvent(a))), v = (a)=>{
182
+ return e.href ? I(e.href) : e.to && e.fullPageOnWebView ? typeof e.to == "string" ? e.to : (_e_to_pathname = e.to.pathname) !== null && _e_to_pathname !== void 0 ? _e_to_pathname : "" : "";
183
+ }, k = ()=>Promise.all(l.map((a)=>C.logEvent(a))), v = (a)=>{
183
184
  u.current || (u.current = !0, k().finally(()=>{
184
185
  u.current = !1, a();
185
186
  }));
186
- }, C = (a)=>{
187
+ }, A = (a)=>{
187
188
  if (b(a), !l.length) {
188
189
  g(a);
189
190
  return;
190
191
  }
191
192
  v(()=>g(a));
192
- }, D = (a)=>{
193
+ }, H = (a)=>{
193
194
  var T;
194
195
  b(a);
195
- const d = !!(e.href && e.onNavigate);
196
- !l.length && !d || (a.preventDefault(), Promise.resolve(d ? (T = e.onNavigate) == null ? void 0 : T.call(e) : void 0).finally(()=>{
196
+ const f = !!(e.href && e.onNavigate);
197
+ !l.length && !f || (a.preventDefault(), Promise.resolve(f ? (T = e.onNavigate) == null ? void 0 : T.call(e) : void 0).finally(()=>{
197
198
  v(()=>(0, _browser.redirect)(y(), r, h));
198
199
  }));
199
- }, I = (a)=>{
200
+ }, K = (a)=>{
200
201
  b(a), e.to && e.onNavigate && e.onNavigate(), k();
201
202
  }, N = (a)=>{
202
203
  (a.key === _keys.ENTER || a.key === _keys.SPACE) && (a.preventDefault(), a.currentTarget.click());
203
204
  };
204
- if (e.href || e.to && e.fullPageOnWebView && (0, _platform.isInsideNovumNativeApp)(E)) return /* @__PURE__ */ (0, _jsxruntime.jsxs)("a", _object_spread_props(_object_spread({}, n), {
205
+ if (e.href || e.to && e.fullPageOnWebView && (0, _platform.isInsideNovumNativeApp)(O)) return /* @__PURE__ */ (0, _jsxruntime.jsxs)("a", _object_spread_props(_object_spread({}, i), {
205
206
  "aria-label": e["aria-label"],
206
207
  "aria-labelledby": e["aria-labelledby"],
207
- onClick: D,
208
+ onClick: H,
208
209
  onKeyDown: N,
209
210
  href: e.disabled ? void 0 : y(),
210
211
  target: (()=>{
@@ -214,29 +215,33 @@ const P = /*#__PURE__*/ _react.forwardRef((e, t)=>{
214
215
  rel: r ? "noopener noreferrer" : void 0,
215
216
  ref: t,
216
217
  children: [
217
- o,
218
- r && /* @__PURE__ */ (0, _jsxruntime.jsx)(_screenreaderonly.default, {
218
+ d,
219
+ r ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_screenreaderonly.default, {
219
220
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
220
- children: f.linkOpensInNewTab
221
+ children: o.linkOpensInNewTab
221
222
  })
222
- })
223
+ }) : D ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_screenreaderonly.default, {
224
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)("span", {
225
+ children: o.linkOpensInCurrentPage
226
+ })
227
+ }) : null
223
228
  ]
224
229
  }));
225
- if (e.to) return /* @__PURE__ */ (0, _jsxruntime.jsx)(R, _object_spread_props(_object_spread({}, n), {
230
+ if (e.to) return /* @__PURE__ */ (0, _jsxruntime.jsx)(R, _object_spread_props(_object_spread({}, i), {
226
231
  "aria-label": e["aria-label"],
227
232
  "aria-labelledby": e["aria-labelledby"],
228
233
  innerRef: t,
229
234
  to: e.disabled ? "" : e.to,
230
235
  replace: e.replace,
231
- onClick: I,
236
+ onClick: K,
232
237
  onKeyDown: N,
233
- children: o
238
+ children: d
234
239
  }));
235
240
  if (e.onPress) {
236
- var _e_as, _n_role;
237
- const a = (_e_as = e.as) !== null && _e_as !== void 0 ? _e_as : "button", d = (_n_role = n.role) !== null && _n_role !== void 0 ? _n_role : e.as === "a" ? "button" : void 0;
238
- return /*#__PURE__*/ _react.createElement(a, _object_spread_props(_object_spread({}, n), {
239
- role: d,
241
+ var _e_as, _i_role;
242
+ const a = (_e_as = e.as) !== null && _e_as !== void 0 ? _e_as : "button", f = (_i_role = i.role) !== null && _i_role !== void 0 ? _i_role : e.as === "a" ? "button" : void 0;
243
+ return /*#__PURE__*/ _react.createElement(a, _object_spread_props(_object_spread({}, i), {
244
+ role: f,
240
245
  // this "form" attribute is useful when the form's submit button
241
246
  // is located outside the <form> element, for example if you use
242
247
  // a ButtonFixedFooter layout inside a form with the submit
@@ -246,26 +251,26 @@ const P = /*#__PURE__*/ _react.forwardRef((e, t)=>{
246
251
  "aria-labelledby": e["aria-labelledby"],
247
252
  type: s,
248
253
  ref: t,
249
- onClick: C,
250
- children: o
254
+ onClick: A,
255
+ children: d
251
256
  }));
252
257
  }
253
- return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({}, n), {
258
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({}, i), {
254
259
  ref: t,
255
- className: (0, _classnames.default)(n.className, _touchablecssmistica.notTouchable),
256
- children: o
260
+ className: (0, _classnames.default)(i.className, _touchablecssmistica.notTouchable),
261
+ children: d
257
262
  }));
258
- }), z = /*#__PURE__*/ _react.forwardRef((e, t)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(P, _object_spread_props(_object_spread({}, e), {
263
+ }), G = /*#__PURE__*/ _react.forwardRef((e, t)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(E, _object_spread_props(_object_spread({}, e), {
259
264
  className: (0, _classnames.default)(_touchablecssmistica.touchable, e.className),
260
265
  ref: t
261
- }))), p = /*#__PURE__*/ _react.forwardRef((_param, f)=>{
266
+ }))), ae = /*#__PURE__*/ _react.forwardRef((_param, o)=>{
262
267
  var { resetMargin: e = !0 } = _param, t = _object_without_properties(_param, [
263
268
  "resetMargin"
264
269
  ]);
265
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(P, _object_spread_props(_object_spread({}, t), {
270
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(E, _object_spread_props(_object_spread({}, t), {
266
271
  className: (0, _classnames.default)(_touchablecssmistica.base, t.className, {
267
272
  [_touchablecssmistica.marginReset]: e
268
273
  }),
269
- ref: f
274
+ ref: o
270
275
  }));
271
- }), ee = z;
276
+ }), te = G;
package/dist-es/list.js CHANGED
@@ -100,6 +100,7 @@ import { vars as Ne } from "./image.css-mistica.js";
100
100
  import { vars as N } from "./skins/skin-contract.css-mistica.js";
101
101
  import { applyCssVars as Re } from "./utils/css.js";
102
102
  import { IconButton as $, ToggleIconButton as p } from "./icon-button.js";
103
+ import { sprinkles as Ce } from "./sprinkles.css-mistica.js";
103
104
  const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
104
105
  centerY: n
105
106
  }) : n ? /* @__PURE__ */ t("div", {
@@ -109,7 +110,7 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
109
110
  height: "100%"
110
111
  },
111
112
  children: e
112
- }) : e, Ce = (param)=>{
113
+ }) : e, ke = (param)=>{
113
114
  let { withChevron: e, headline: n, title: r, titleAs: c, titleLinesMax: m, subtitle: g, subtitleLinesMax: v, description: A, descriptionLinesMax: M, detail: f, asset: S, type: x = "basic", badge: E, right: V, extra: l, labelId: W, disabled: o } = param;
114
115
  const j = te(), d = [
115
116
  n,
@@ -239,7 +240,7 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
239
240
  })
240
241
  ]
241
242
  });
242
- }, ke = (param)=>{
243
+ }, Ie = (param)=>{
243
244
  let { value: e, defaultValue: n, onChange: r } = param;
244
245
  const c = e !== void 0, [m, g] = I.useState(!!n), v = ()=>{
245
246
  c || g(!m), r && r(c ? !e : !m);
@@ -251,10 +252,10 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
251
252
  m,
252
253
  v
253
254
  ];
254
- }, Ie = (e)=>e.switch !== void 0, Pe = (e)=>e.checkbox !== void 0, Le = (e)=>e.radioValue !== void 0, Ae = (e)=>e.iconButton !== void 0, ne = /*#__PURE__*/ I.forwardRef((e, n)=>{
255
- const r = oe(), c = te(), { asset: m, headline: g, title: v, titleLinesMax: A, subtitle: M, subtitleLinesMax: f, description: S, descriptionLinesMax: x, detail: E, badge: V, role: l, extra: W, dataAttributes: o } = e, j = le(), i = e.disabled || e.radioValue !== void 0 && j.disabled, d = !i && !c, u = !i && c, [G, J] = ke(e.switch || e.checkbox || {}), b = (param)=>{
255
+ }, Pe = (e)=>e.switch !== void 0, Le = (e)=>e.checkbox !== void 0, Ae = (e)=>e.radioValue !== void 0, Ee = (e)=>e.iconButton !== void 0, ne = /*#__PURE__*/ I.forwardRef((e, n)=>{
256
+ const r = oe(), c = te(), { asset: m, headline: g, title: v, titleLinesMax: A, subtitle: M, subtitleLinesMax: f, description: S, descriptionLinesMax: x, detail: E, badge: V, role: l, extra: W, dataAttributes: o } = e, j = le(), i = e.disabled || e.radioValue !== void 0 && j.disabled, d = !i && !c, u = !i && c, [G, J] = Ie(e.switch || e.checkbox || {}), b = (param)=>{
256
257
  let { type: s, right: w, labelId: X } = param;
257
- return /* @__PURE__ */ t(Ce, {
258
+ return /* @__PURE__ */ t(ke, {
258
259
  asset: m,
259
260
  headline: g,
260
261
  title: v,
@@ -283,7 +284,7 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
283
284
  })
284
285
  });
285
286
  };
286
- if (e.onPress && !Ie(e) && !Pe(e) && !Le(e) && !Ae(e)) return /* @__PURE__ */ t(P, {
287
+ if (e.onPress && !Pe(e) && !Le(e) && !Ae(e) && !Ee(e)) return /* @__PURE__ */ t(P, {
287
288
  ref: n,
288
289
  className: a(k, {
289
290
  [y]: d,
@@ -523,13 +524,16 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
523
524
  type: "basic"
524
525
  })
525
526
  });
526
- }), _e = /*#__PURE__*/ I.forwardRef((_param, c)=>{
527
+ }), pe = /*#__PURE__*/ I.forwardRef((_param, c)=>{
527
528
  var { dataAttributes: e, role: n = "listitem" } = _param, r = _object_without_properties(_param, [
528
529
  "dataAttributes",
529
530
  "role"
530
531
  ]);
531
532
  return /* @__PURE__ */ t("div", {
532
533
  role: n,
534
+ className: Ce({
535
+ width: "100%"
536
+ }),
533
537
  children: /* @__PURE__ */ t(ne, _object_spread_props(_object_spread({}, r), {
534
538
  ref: c,
535
539
  dataAttributes: _object_spread({
@@ -537,7 +541,7 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
537
541
  }, e)
538
542
  }))
539
543
  });
540
- }), $e = (param)=>{
544
+ }), et = (param)=>{
541
545
  let { children: e, ariaLabelledby: n, role: r = "list", dataAttributes: c } = param;
542
546
  const m = I.Children.count(e) - 1;
543
547
  return /* @__PURE__ */ t("div", _object_spread_props(_object_spread({
@@ -554,7 +558,7 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
554
558
  ]
555
559
  }, v))
556
560
  }));
557
- }, pe = /*#__PURE__*/ I.forwardRef((_param, r)=>{
561
+ }, tt = /*#__PURE__*/ I.forwardRef((_param, r)=>{
558
562
  var { dataAttributes: e } = _param, n = _object_without_properties(_param, [
559
563
  "dataAttributes"
560
564
  ]);
@@ -566,7 +570,7 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
566
570
  }, e),
567
571
  children: /* @__PURE__ */ t(ne, _object_spread({}, n))
568
572
  });
569
- }), et = (param)=>{
573
+ }), nt = (param)=>{
570
574
  let { children: e, ariaLabelledby: n, role: r = "list", dataAttributes: c } = param;
571
575
  return /* @__PURE__ */ t(R, {
572
576
  space: 16,
@@ -578,4 +582,4 @@ const ee = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
578
582
  children: e
579
583
  });
580
584
  };
581
- export { pe as BoxedRow, et as BoxedRowList, Ce as Content, _e as Row, $e as RowList };
585
+ export { tt as BoxedRow, nt as BoxedRowList, ke as Content, pe as Row, et as RowList };
@@ -1,2 +1,2 @@
1
- const o = "15.1.0";
1
+ const o = "15.2.1";
2
2
  export { o as PACKAGE_VERSION };