@telefonica/mistica 14.8.0 → 14.9.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 (32) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/circle.d.ts +1 -0
  3. package/dist/circle.js +9 -6
  4. package/dist/form.d.ts +1 -1
  5. package/dist/generated/mistica-icons/icon-chevron-left-light.js +11 -11
  6. package/dist/generated/mistica-icons/icon-chevron-left-regular.js +11 -11
  7. package/dist/generated/mistica-icons/icon-chevron-right-light.js +2 -2
  8. package/dist/generated/mistica-icons/icon-chevron-right-regular.js +2 -2
  9. package/dist/horizontal-scroll.css-mistica.js +18 -0
  10. package/dist/horizontal-scroll.css.d.ts +2 -0
  11. package/dist/horizontal-scroll.css.ts.vanilla.js +9 -0
  12. package/dist/horizontal-scroll.d.ts +7 -0
  13. package/dist/horizontal-scroll.js +66 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.js +2 -0
  16. package/dist/list.js +56 -56
  17. package/dist/package-version.js +1 -1
  18. package/dist/tabs.js +14 -15
  19. package/dist-es/circle.js +12 -9
  20. package/dist-es/generated/mistica-icons/icon-chevron-left-light.js +12 -12
  21. package/dist-es/generated/mistica-icons/icon-chevron-left-regular.js +11 -11
  22. package/dist-es/generated/mistica-icons/icon-chevron-right-light.js +2 -2
  23. package/dist-es/generated/mistica-icons/icon-chevron-right-regular.js +2 -2
  24. package/dist-es/horizontal-scroll.css-mistica.js +5 -0
  25. package/dist-es/horizontal-scroll.css.ts.vanilla.js +2 -0
  26. package/dist-es/horizontal-scroll.js +15 -0
  27. package/dist-es/index.js +1708 -1707
  28. package/dist-es/list.js +75 -75
  29. package/dist-es/package-version.js +1 -1
  30. package/dist-es/style.css +1 -1
  31. package/dist-es/tabs.js +22 -23
  32. package/package.json +1 -1
package/dist-es/list.js CHANGED
@@ -80,25 +80,25 @@ function _objectWithoutPropertiesLoose(source, excluded) {
80
80
  import * as R from "react";
81
81
  import o from "classnames";
82
82
  import { BaseTouchable as y } from "./touchable.js";
83
- import { Text1 as te, Text3 as ne, Text2 as z } from "./text.js";
84
- import d from "./box.js";
83
+ import { Text1 as te, Text3 as re, Text2 as z } from "./text.js";
84
+ import l from "./box.js";
85
85
  import k from "./stack.js";
86
86
  import G from "./badge.js";
87
- import { useAriaId as re } from "./hooks.js";
87
+ import { useAriaId as ne } from "./hooks.js";
88
88
  import { useIsInverseVariant as $ } from "./theme-variant-context.js";
89
89
  import H from "./icons/icon-chevron.js";
90
90
  import ie from "./switch-component.js";
91
91
  import J, { useRadioContext as ae } from "./radio-button.js";
92
92
  import oe from "./checkbox.js";
93
93
  import { Boxed as ce } from "./boxed.js";
94
- import le from "./divider.js";
95
- import { getPrefixedDataAttributes as de } from "./utils/dom.js";
94
+ import de from "./divider.js";
95
+ import { getPrefixedDataAttributes as le } from "./utils/dom.js";
96
96
  import { rowContent as N, hoverBackground as w, pointer as A, dualActionContainer as K, dualActionLeft as Q, dualActionDivider as U, dualActionRight as se, content as me, center as X, disabled as P, asset as he, rowBody as ue, right as Z, badge as fe } from "./list.css-mistica.js";
97
97
  import { vars as g } from "./skins/skin-contract.css-mistica.js";
98
98
  import { jsx as t, jsxs as C, Fragment as ge } from "./_virtual/jsx-runtime.js";
99
- const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
100
- centerY: r
101
- }) : r ? /* @__PURE__ */ t("div", {
99
+ const _ = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
100
+ centerY: n
101
+ }) : n ? /* @__PURE__ */ t("div", {
102
102
  style: {
103
103
  display: "flex",
104
104
  alignItems: "center",
@@ -106,14 +106,14 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
106
106
  },
107
107
  children: e
108
108
  }) : e, ve = (param)=>{
109
- let { withChevron: e , headline: r , title: i , titleLinesMax: a , subtitle: l , subtitleLinesMax: v , description: s , descriptionLinesMax: B , asset: b , type: I = "basic" , badge: L , right: T , extra: V , labelId: m , disabled: u } = param;
110
- const h = $(), n = [
111
- r,
109
+ let { withChevron: e , headline: n , title: i , titleLinesMax: a , subtitle: d , subtitleLinesMax: v , description: s , descriptionLinesMax: B , asset: b , type: I = "basic" , badge: L , right: T , extra: V , labelId: m , disabled: u } = param;
110
+ const h = $(), r = [
111
+ n,
112
112
  i,
113
- l,
113
+ d,
114
114
  s,
115
115
  V
116
- ].filter(Boolean).length === 1, S = ()=>L ? /* @__PURE__ */ t(d, {
116
+ ].filter(Boolean).length === 1, S = ()=>L ? /* @__PURE__ */ t(l, {
117
117
  paddingLeft: 16,
118
118
  children: /* @__PURE__ */ t("div", {
119
119
  className: o(X, fe, {
@@ -124,14 +124,14 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
124
124
  })
125
125
  })
126
126
  }) : null;
127
- return /* @__PURE__ */ C(d, {
127
+ return /* @__PURE__ */ C(l, {
128
128
  paddingY: 16,
129
129
  className: me,
130
130
  children: [
131
- b && /* @__PURE__ */ t(d, {
131
+ b && /* @__PURE__ */ t(l, {
132
132
  paddingRight: 16,
133
133
  className: o({
134
- [X]: n,
134
+ [X]: r,
135
135
  [P]: u
136
136
  }),
137
137
  children: /* @__PURE__ */ t("div", {
@@ -144,31 +144,31 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
144
144
  [P]: u
145
145
  }),
146
146
  style: {
147
- justifyContent: n ? "center" : "flex-start"
147
+ justifyContent: r ? "center" : "flex-start"
148
148
  },
149
149
  children: /* @__PURE__ */ C(k, {
150
150
  space: 4,
151
151
  children: [
152
- r && /* @__PURE__ */ t(te, {
152
+ n && /* @__PURE__ */ t(te, {
153
153
  regular: !0,
154
154
  color: g.colors.textPrimary,
155
- children: r
155
+ children: n
156
156
  }),
157
157
  /* @__PURE__ */ C(k, {
158
158
  space: 2,
159
159
  children: [
160
- /* @__PURE__ */ t(ne, {
160
+ /* @__PURE__ */ t(re, {
161
161
  regular: !0,
162
162
  color: g.colors.textPrimary,
163
163
  truncate: a,
164
164
  id: m,
165
165
  children: i
166
166
  }),
167
- l && /* @__PURE__ */ t(z, {
167
+ d && /* @__PURE__ */ t(z, {
168
168
  regular: !0,
169
169
  color: g.colors.textSecondary,
170
170
  truncate: v,
171
- children: l
171
+ children: d
172
172
  }),
173
173
  s && /* @__PURE__ */ t(z, {
174
174
  regular: !0,
@@ -183,7 +183,7 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
183
183
  })
184
184
  }),
185
185
  S(),
186
- I === "chevron" && /* @__PURE__ */ t(d, {
186
+ I === "chevron" && /* @__PURE__ */ t(l, {
187
187
  paddingLeft: 16,
188
188
  className: o(X, {
189
189
  [P]: u
@@ -195,7 +195,7 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
195
195
  }),
196
196
  I === "control" && /* @__PURE__ */ t("div", {
197
197
  className: Z,
198
- children: _(T, n)
198
+ children: _(T, r)
199
199
  }),
200
200
  I === "custom" && /* @__PURE__ */ C(ge, {
201
201
  children: [
@@ -203,9 +203,9 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
203
203
  className: o(Z, {
204
204
  [P]: u
205
205
  }),
206
- children: _(T, n)
206
+ children: _(T, r)
207
207
  }),
208
- e && /* @__PURE__ */ t(d, {
208
+ e && /* @__PURE__ */ t(l, {
209
209
  paddingLeft: 4,
210
210
  className: o(X, {
211
211
  [P]: u
@@ -220,22 +220,22 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
220
220
  ]
221
221
  });
222
222
  }, be = (param)=>{
223
- let { value: e , defaultValue: r , onChange: i } = param;
224
- const a = e !== void 0, [l, v] = R.useState(!!r), s = ()=>{
225
- a || v(!l), i && i(a ? !e : !l);
223
+ let { value: e , defaultValue: n , onChange: i } = param;
224
+ const a = e !== void 0, [d, v] = R.useState(!!n), s = ()=>{
225
+ a || v(!d), i && i(a ? !e : !d);
226
226
  };
227
227
  return a ? [
228
228
  !!e,
229
229
  s
230
230
  ] : [
231
- l,
231
+ d,
232
232
  s
233
233
  ];
234
- }, xe = (e)=>"switch" in e, we = (e)=>"checkbox" in e, Ce = (e)=>"radioValue" in e, p = /*#__PURE__*/ R.forwardRef((e, r)=>{
235
- const i = re(), a = $(), { asset: l , headline: v , title: s , titleLinesMax: B , subtitle: b , subtitleLinesMax: I , description: L , descriptionLinesMax: T , badge: V , role: m , extra: u , dataAttributes: h } = e, j = ae(), n = e.disabled || e.radioValue !== void 0 && j.disabled, [S, W] = be(e.switch || e.checkbox || {}), x = (param)=>/* @__PURE__ */ {
234
+ }, xe = (e)=>e.switch !== void 0, we = (e)=>e.checkbox !== void 0, Ce = (e)=>e.radioValue !== void 0, p = /*#__PURE__*/ R.forwardRef((e, n)=>{
235
+ const i = ne(), a = $(), { asset: d , headline: v , title: s , titleLinesMax: B , subtitle: b , subtitleLinesMax: I , description: L , descriptionLinesMax: T , badge: V , role: m , extra: u , dataAttributes: h } = e, j = ae(), r = e.disabled || e.radioValue !== void 0 && j.disabled, [S, W] = be(e.switch || e.checkbox || {}), x = (param)=>/* @__PURE__ */ {
236
236
  let { type: c , right: f , labelId: E } = param;
237
237
  return t(ve, {
238
- asset: l,
238
+ asset: d,
239
239
  headline: v,
240
240
  title: s,
241
241
  subtitle: b,
@@ -248,14 +248,14 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
248
248
  right: f,
249
249
  extra: u,
250
250
  labelId: E,
251
- disabled: n,
251
+ disabled: r,
252
252
  withChevron: !!e.onPress || !!e.href || !!e.to
253
253
  });
254
254
  }, M = (c)=>{
255
255
  let f = "chevron";
256
- return c.right === null && (f = "basic"), c.right && (f = "custom"), /* @__PURE__ */ t(d, {
256
+ return c.right === null && (f = "basic"), c.right && (f = "custom"), /* @__PURE__ */ t(l, {
257
257
  paddingX: 16,
258
- ref: r,
258
+ ref: n,
259
259
  children: x({
260
260
  type: f,
261
261
  right: c.right
@@ -263,42 +263,42 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
263
263
  });
264
264
  };
265
265
  if (e.onPress && !xe(e) && !we(e) && !Ce(e)) return /* @__PURE__ */ t(y, {
266
- ref: r,
266
+ ref: n,
267
267
  className: o(N, {
268
- [w]: !(n || a),
269
- [A]: !n
268
+ [w]: !(r || a),
269
+ [A]: !r
270
270
  }),
271
271
  trackingEvent: e.trackingEvent,
272
272
  onPress: e.onPress,
273
273
  role: m,
274
274
  dataAttributes: h,
275
- disabled: n,
275
+ disabled: r,
276
276
  children: M(e)
277
277
  });
278
278
  if (e.to) return /* @__PURE__ */ t(y, {
279
279
  className: o(N, {
280
- [w]: !(n || a),
281
- [A]: !n
280
+ [w]: !(r || a),
281
+ [A]: !r
282
282
  }),
283
283
  trackingEvent: e.trackingEvent,
284
284
  to: e.to,
285
285
  fullPageOnWebView: e.fullPageOnWebView,
286
286
  role: m,
287
287
  dataAttributes: h,
288
- disabled: n,
288
+ disabled: r,
289
289
  children: M(e)
290
290
  });
291
291
  if (e.href) return /* @__PURE__ */ t(y, {
292
292
  className: o(N, {
293
- [w]: !(n || a),
294
- [A]: !n
293
+ [w]: !(r || a),
294
+ [A]: !r
295
295
  }),
296
296
  trackingEvent: e.trackingEvent,
297
297
  href: e.href,
298
298
  newTab: e.newTab,
299
299
  role: m,
300
300
  dataAttributes: h,
301
- disabled: n,
301
+ disabled: r,
302
302
  children: M(e)
303
303
  });
304
304
  const F = (c)=>{
@@ -308,11 +308,11 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
308
308
  className: K,
309
309
  children: [
310
310
  /* @__PURE__ */ t(y, {
311
- disabled: n,
311
+ disabled: r,
312
312
  onPress: e.onPress,
313
313
  role: m,
314
314
  className: o(Q, {
315
- [w]: !(n || a)
315
+ [w]: !(r || a)
316
316
  }),
317
317
  children: x({
318
318
  type: "basic",
@@ -323,12 +323,12 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
323
323
  className: U
324
324
  }),
325
325
  /* @__PURE__ */ t(y, {
326
- disabled: n,
326
+ disabled: r,
327
327
  className: se,
328
328
  onPress: W,
329
329
  dataAttributes: h,
330
330
  children: /* @__PURE__ */ t(c, {
331
- disabled: n,
331
+ disabled: r,
332
332
  name: f,
333
333
  checked: S,
334
334
  "aria-labelledby": i,
@@ -341,18 +341,18 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
341
341
  ]
342
342
  }) : /* @__PURE__ */ t("div", {
343
343
  className: o(N, {
344
- [w]: !(n || a),
345
- [A]: !n
344
+ [w]: !(r || a),
345
+ [A]: !r
346
346
  }),
347
347
  children: /* @__PURE__ */ t(c, {
348
- disabled: n,
348
+ disabled: r,
349
349
  dataAttributes: h,
350
350
  name: f,
351
351
  checked: S,
352
352
  onChange: W,
353
353
  render: (param)=>/* @__PURE__ */ {
354
354
  let { controlElement: D , labelId: ee } = param;
355
- return t(d, {
355
+ return t(l, {
356
356
  paddingX: 16,
357
357
  role: m,
358
358
  children: x({
@@ -372,11 +372,11 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
372
372
  className: K,
373
373
  children: [
374
374
  /* @__PURE__ */ t(y, {
375
- disabled: n,
375
+ disabled: r,
376
376
  onPress: e.onPress,
377
377
  role: m,
378
378
  className: o(Q, {
379
- [w]: !(n || a)
379
+ [w]: !(r || a)
380
380
  }),
381
381
  children: x({
382
382
  type: "basic",
@@ -394,7 +394,7 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
394
394
  let { controlElement: c } = param;
395
395
  return t(k, {
396
396
  space: "around",
397
- children: /* @__PURE__ */ t(d, {
397
+ children: /* @__PURE__ */ t(l, {
398
398
  paddingX: 16,
399
399
  children: c
400
400
  })
@@ -404,18 +404,18 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
404
404
  ]
405
405
  }) : /* @__PURE__ */ t("div", {
406
406
  className: o(N, {
407
- [w]: !(n || a),
408
- [A]: !n
407
+ [w]: !(r || a),
408
+ [A]: !r
409
409
  }),
410
410
  role: m,
411
- ref: r,
411
+ ref: n,
412
412
  children: /* @__PURE__ */ t(J, {
413
413
  dataAttributes: h,
414
414
  value: e.radioValue,
415
415
  "aria-labelledby": i,
416
416
  render: (param)=>/* @__PURE__ */ {
417
417
  let { controlElement: c } = param;
418
- return t(d, {
418
+ return t(l, {
419
419
  paddingX: 16,
420
420
  children: x({
421
421
  labelId: i,
@@ -428,7 +428,7 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
428
428
  });
429
429
  }
430
430
  })
431
- }) : /* @__PURE__ */ t(d, {
431
+ }) : /* @__PURE__ */ t(l, {
432
432
  paddingX: 16,
433
433
  className: N,
434
434
  role: m,
@@ -440,50 +440,50 @@ const _ = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
440
440
  })
441
441
  });
442
442
  }), Fe = /*#__PURE__*/ R.forwardRef((_param, i)=>/* @__PURE__ */ {
443
- var { dataAttributes: e } = _param, r = _objectWithoutProperties(_param, [
443
+ var { dataAttributes: e } = _param, n = _objectWithoutProperties(_param, [
444
444
  "dataAttributes"
445
445
  ]);
446
- return t(p, _objectSpreadProps(_objectSpread({}, r), {
446
+ return t(p, _objectSpreadProps(_objectSpread({}, n), {
447
447
  ref: i,
448
448
  dataAttributes: _objectSpread({
449
449
  "component-name": "Row"
450
450
  }, e)
451
451
  }));
452
452
  }), Oe = (param)=>{
453
- let { children: e , ariaLabelledby: r , role: i , dataAttributes: a , noLastDivider: l } = param;
454
- const v = R.Children.count(e) - 1, s = !l;
453
+ let { children: e , ariaLabelledby: n , role: i , dataAttributes: a , noLastDivider: d } = param;
454
+ const v = R.Children.count(e) - 1, s = !d;
455
455
  return /* @__PURE__ */ t("div", _objectSpreadProps(_objectSpread({
456
456
  role: i,
457
- "aria-labelledby": r
458
- }, de(a, "RowList")), {
457
+ "aria-labelledby": n
458
+ }, le(a, "RowList")), {
459
459
  children: R.Children.toArray(e).filter(Boolean).map((B, b)=>/* @__PURE__ */ C(R.Fragment, {
460
460
  children: [
461
461
  B,
462
- (b < v || s) && /* @__PURE__ */ t(d, {
462
+ (b < v || s) && /* @__PURE__ */ t(l, {
463
463
  paddingX: 16,
464
- children: /* @__PURE__ */ t(le, {})
464
+ children: /* @__PURE__ */ t(de, {})
465
465
  })
466
466
  ]
467
467
  }, b))
468
468
  }));
469
469
  }, Ye = /*#__PURE__*/ R.forwardRef((_param, i)=>/* @__PURE__ */ {
470
- var { dataAttributes: e } = _param, r = _objectWithoutProperties(_param, [
470
+ var { dataAttributes: e } = _param, n = _objectWithoutProperties(_param, [
471
471
  "dataAttributes"
472
472
  ]);
473
473
  return t(ce, {
474
- isInverse: r.isInverse,
474
+ isInverse: n.isInverse,
475
475
  ref: i,
476
476
  dataAttributes: _objectSpread({
477
477
  "component-name": "BoxedRow"
478
478
  }, e),
479
- children: /* @__PURE__ */ t(p, _objectSpread({}, r))
479
+ children: /* @__PURE__ */ t(p, _objectSpread({}, n))
480
480
  });
481
481
  }), qe = (param)=>/* @__PURE__ */ {
482
- let { children: e , ariaLabelledby: r , role: i , dataAttributes: a } = param;
482
+ let { children: e , ariaLabelledby: n , role: i , dataAttributes: a } = param;
483
483
  return t(k, {
484
484
  space: 16,
485
485
  role: i,
486
- "aria-labelledby": r,
486
+ "aria-labelledby": n,
487
487
  dataAttributes: _objectSpread({
488
488
  "component-name": "BoxedRowList"
489
489
  }, a),
@@ -1,2 +1,2 @@
1
- const o = "14.8.0";
1
+ const o = "14.9.0";
2
2
  export { o as PACKAGE_VERSION };