@telefonica/mistica 14.17.0 → 14.17.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-es/list.js CHANGED
@@ -77,11 +77,11 @@ function _object_without_properties_loose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import { jsx as t, jsxs as C } from "react/jsx-runtime";
81
- import * as R from "react";
80
+ import { jsx as t, jsxs as R } from "react/jsx-runtime";
81
+ import * as C from "react";
82
82
  import o from "classnames";
83
83
  import { BaseTouchable as L } from "./touchable.js";
84
- import { Text1 as p, Text3 as ee, Text2 as W } from "./text.js";
84
+ import { Text1 as p, Text3 as ee, Text2 as j } from "./text.js";
85
85
  import m from "./box.js";
86
86
  import P from "./stack.js";
87
87
  import z from "./badge.js";
@@ -94,7 +94,7 @@ import ae from "./checkbox.js";
94
94
  import { Boxed as oe } from "./boxed.js";
95
95
  import ce from "./divider.js";
96
96
  import { getPrefixedDataAttributes as de } from "./utils/dom.js";
97
- import { rowContent as N, hoverBackground as w, pointer as A, dualActionContainer as H, dualActionLeft as J, dualActionDivider as K, dualActionRight as se, content as le, center as D, disabled as k, asset as he, rowBody as me, right as ue, detail as fe, detailRight as Q, badge as ge } from "./list.css-mistica.js";
97
+ import { rowContent as N, hoverBackground as w, pointer as A, dualActionContainer as H, dualActionLeft as J, dualActionDivider as K, dualActionRight as se, content as le, center as D, disabled as k, asset as he, rowBody as me, right as ue, rightRestrictedWidth as fe, detail as ge, detailRight as Q, badge as ve } from "./list.css-mistica.js";
98
98
  import { vars as y } from "./skins/skin-contract.css-mistica.js";
99
99
  const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
100
100
  centerY: r
@@ -105,18 +105,18 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
105
105
  height: "100%"
106
106
  },
107
107
  children: e
108
- }) : e, ve = (param)=>{
109
- let { withChevron: e , headline: r , title: i , titleLinesMax: a , subtitle: d , subtitleLinesMax: b , description: l , descriptionLinesMax: B , detail: s , asset: T , type: f = "basic" , badge: I , right: S , extra: V , labelId: h , disabled: g } = param;
108
+ }) : e, be = (param)=>{
109
+ let { withChevron: e , headline: r , title: i , titleLinesMax: a , subtitle: s , subtitleLinesMax: b , description: l , descriptionLinesMax: B , detail: c , asset: T , type: f = "basic" , badge: I , right: S , extra: V , labelId: h , disabled: g } = param;
110
110
  const u = Z(), n = [
111
111
  r,
112
112
  i,
113
- d,
113
+ s,
114
114
  l,
115
115
  V
116
116
  ].filter(Boolean).length === 1, E = ()=>I ? /* @__PURE__ */ t(m, {
117
117
  paddingLeft: 16,
118
118
  children: /* @__PURE__ */ t("div", {
119
- className: o(D, ge, {
119
+ className: o(D, ve, {
120
120
  [k]: g
121
121
  }),
122
122
  children: I === !0 ? /* @__PURE__ */ t(z, {}) : /* @__PURE__ */ t(z, {
@@ -124,7 +124,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
124
124
  })
125
125
  })
126
126
  }) : null;
127
- return /* @__PURE__ */ C(m, {
127
+ return /* @__PURE__ */ R(m, {
128
128
  paddingY: 16,
129
129
  className: le,
130
130
  children: [
@@ -146,7 +146,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
146
146
  style: {
147
147
  justifyContent: n ? "center" : "flex-start"
148
148
  },
149
- children: /* @__PURE__ */ C(P, {
149
+ children: /* @__PURE__ */ R(P, {
150
150
  space: 4,
151
151
  children: [
152
152
  r && /* @__PURE__ */ t(p, {
@@ -155,7 +155,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
155
155
  hyphens: "auto",
156
156
  children: r
157
157
  }),
158
- /* @__PURE__ */ C(P, {
158
+ /* @__PURE__ */ R(P, {
159
159
  space: 2,
160
160
  children: [
161
161
  /* @__PURE__ */ t(ee, {
@@ -166,14 +166,14 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
166
166
  hyphens: "auto",
167
167
  children: i
168
168
  }),
169
- d && /* @__PURE__ */ t(W, {
169
+ s && /* @__PURE__ */ t(j, {
170
170
  regular: !0,
171
171
  color: y.colors.textSecondary,
172
172
  truncate: b,
173
173
  hyphens: "auto",
174
- children: d
174
+ children: s
175
175
  }),
176
- l && /* @__PURE__ */ t(W, {
176
+ l && /* @__PURE__ */ t(j, {
177
177
  regular: !0,
178
178
  color: y.colors.textSecondary,
179
179
  truncate: B,
@@ -187,37 +187,38 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
187
187
  })
188
188
  }),
189
189
  E(),
190
- /* @__PURE__ */ C("div", {
190
+ /* @__PURE__ */ R("div", {
191
191
  className: o({
192
- [ue]: !!s || f !== "basic"
192
+ [ue]: !!c || f !== "basic",
193
+ [fe]: !!c
193
194
  }),
194
195
  children: [
195
- s && /* @__PURE__ */ t("div", {
196
- className: o(D, fe, {
196
+ c && /* @__PURE__ */ t("div", {
197
+ className: o(D, ge, {
197
198
  [k]: g
198
199
  }),
199
- children: /* @__PURE__ */ t(W, {
200
+ children: /* @__PURE__ */ t(j, {
200
201
  regular: !0,
201
202
  color: y.colors.textSecondary,
202
203
  hyphens: "auto",
203
- children: s
204
+ children: c
204
205
  })
205
206
  }),
206
207
  f === "control" && /* @__PURE__ */ t("div", {
207
208
  className: o({
208
- [Q]: !!s
209
+ [Q]: !!c
209
210
  }),
210
211
  children: U(S, n)
211
212
  }),
212
213
  f === "custom" && /* @__PURE__ */ t("div", {
213
214
  className: o({
214
- [Q]: !!s,
215
+ [Q]: !!c,
215
216
  [k]: g
216
217
  }),
217
218
  children: U(S, n)
218
219
  }),
219
220
  (f === "chevron" || f === "custom" && e) && /* @__PURE__ */ t(m, {
220
- paddingLeft: s || f === "custom" ? 4 : 0,
221
+ paddingLeft: c || f === "custom" ? 4 : 0,
221
222
  className: o(D, {
222
223
  [k]: g
223
224
  }),
@@ -230,51 +231,51 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
230
231
  })
231
232
  ]
232
233
  });
233
- }, be = (param)=>{
234
+ }, xe = (param)=>{
234
235
  let { value: e , defaultValue: r , onChange: i } = param;
235
- const a = e !== void 0, [d, b] = R.useState(!!r), l = ()=>{
236
- a || b(!d), i && i(a ? !e : !d);
236
+ const a = e !== void 0, [s, b] = C.useState(!!r), l = ()=>{
237
+ a || b(!s), i && i(a ? !e : !s);
237
238
  };
238
239
  return a ? [
239
240
  !!e,
240
241
  l
241
242
  ] : [
242
- d,
243
+ s,
243
244
  l
244
245
  ];
245
- }, xe = (e)=>e.switch !== void 0, we = (e)=>e.checkbox !== void 0, ye = (e)=>e.radioValue !== void 0, _ = /*#__PURE__*/ R.forwardRef((e, r)=>{
246
- const i = te(), a = Z(), { asset: d , headline: b , title: l , titleLinesMax: B , subtitle: s , subtitleLinesMax: T , description: f , descriptionLinesMax: I , detail: S , badge: V , role: h , extra: g , dataAttributes: u } = e, O = ie(), n = e.disabled || e.radioValue !== void 0 && O.disabled, [E, F] = be(e.switch || e.checkbox || {}), x = (param)=>/* @__PURE__ */ {
247
- let { type: c , right: v , labelId: X } = param;
248
- return t(ve, {
249
- asset: d,
246
+ }, we = (e)=>e.switch !== void 0, ye = (e)=>e.checkbox !== void 0, Re = (e)=>e.radioValue !== void 0, _ = /*#__PURE__*/ C.forwardRef((e, r)=>{
247
+ const i = te(), a = Z(), { asset: s , headline: b , title: l , titleLinesMax: B , subtitle: c , subtitleLinesMax: T , description: f , descriptionLinesMax: I , detail: S , badge: V , role: h , extra: g , dataAttributes: u } = e, O = ie(), n = e.disabled || e.radioValue !== void 0 && O.disabled, [E, F] = xe(e.switch || e.checkbox || {}), x = (param)=>/* @__PURE__ */ {
248
+ let { type: d , right: v , labelId: X } = param;
249
+ return t(be, {
250
+ asset: s,
250
251
  headline: b,
251
252
  title: l,
252
- subtitle: s,
253
+ subtitle: c,
253
254
  description: f,
254
255
  badge: V,
255
256
  titleLinesMax: B,
256
257
  subtitleLinesMax: T,
257
258
  descriptionLinesMax: I,
258
259
  detail: S,
259
- type: c,
260
+ type: d,
260
261
  right: v,
261
262
  extra: g,
262
263
  labelId: X,
263
264
  disabled: n,
264
265
  withChevron: !!e.onPress || !!e.href || !!e.to
265
266
  });
266
- }, M = (c)=>{
267
+ }, M = (d)=>{
267
268
  let v = "chevron";
268
- return c.right === null && (v = "basic"), c.right && (v = "custom"), /* @__PURE__ */ t(m, {
269
+ return d.right === null && (v = "basic"), d.right && (v = "custom"), /* @__PURE__ */ t(m, {
269
270
  paddingX: 16,
270
271
  ref: r,
271
272
  children: x({
272
273
  type: v,
273
- right: c.right
274
+ right: d.right
274
275
  })
275
276
  });
276
277
  };
277
- if (e.onPress && !xe(e) && !we(e) && !ye(e)) return /* @__PURE__ */ t(L, {
278
+ if (e.onPress && !we(e) && !ye(e) && !Re(e)) return /* @__PURE__ */ t(L, {
278
279
  ref: r,
279
280
  className: o(N, {
280
281
  [w]: !(n || a),
@@ -313,11 +314,11 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
313
314
  disabled: n,
314
315
  children: M(e)
315
316
  });
316
- const Y = (c)=>{
317
+ const Y = (d)=>{
317
318
  var X, q;
318
319
  var _ref, _ref1;
319
320
  const v = (_ref1 = (_ref = (X = e.switch) == null ? void 0 : X.name) !== null && _ref !== void 0 ? _ref : (q = e.checkbox) == null ? void 0 : q.name) !== null && _ref1 !== void 0 ? _ref1 : i;
320
- return e.onPress ? /* @__PURE__ */ C("div", {
321
+ return e.onPress ? /* @__PURE__ */ R("div", {
321
322
  className: H,
322
323
  children: [
323
324
  /* @__PURE__ */ t(L, {
@@ -336,17 +337,17 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
336
337
  /* @__PURE__ */ t("div", {
337
338
  className: K
338
339
  }),
339
- /* @__PURE__ */ t(c, {
340
+ /* @__PURE__ */ t(d, {
340
341
  disabled: n,
341
342
  name: v,
342
343
  checked: E,
343
344
  "aria-labelledby": i,
344
345
  onChange: F,
345
346
  render: (param)=>/* @__PURE__ */ {
346
- let { controlElement: j } = param;
347
+ let { controlElement: W } = param;
347
348
  return t("div", {
348
349
  className: se,
349
- children: j
350
+ children: W
350
351
  });
351
352
  }
352
353
  })
@@ -356,14 +357,14 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
356
357
  [w]: !(n || a),
357
358
  [A]: !n
358
359
  }),
359
- children: /* @__PURE__ */ t(c, {
360
+ children: /* @__PURE__ */ t(d, {
360
361
  disabled: n,
361
362
  dataAttributes: u,
362
363
  name: v,
363
364
  checked: E,
364
365
  onChange: F,
365
366
  render: (param)=>/* @__PURE__ */ {
366
- let { controlElement: j , labelId: $ } = param;
367
+ let { controlElement: W , labelId: $ } = param;
367
368
  return t(m, {
368
369
  paddingX: 16,
369
370
  role: h,
@@ -372,7 +373,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
372
373
  type: "control",
373
374
  right: ()=>/* @__PURE__ */ t(P, {
374
375
  space: "around",
375
- children: j
376
+ children: W
376
377
  })
377
378
  })
378
379
  });
@@ -380,7 +381,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
380
381
  })
381
382
  });
382
383
  };
383
- return e.switch ? Y(re) : e.checkbox ? Y(ae) : e.radioValue ? e.onPress ? /* @__PURE__ */ C("div", {
384
+ return e.switch ? Y(re) : e.checkbox ? Y(ae) : e.radioValue ? e.onPress ? /* @__PURE__ */ R("div", {
384
385
  className: H,
385
386
  children: [
386
387
  /* @__PURE__ */ t(L, {
@@ -403,12 +404,12 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
403
404
  value: e.radioValue,
404
405
  "aria-labelledby": i,
405
406
  render: (param)=>/* @__PURE__ */ {
406
- let { controlElement: c } = param;
407
+ let { controlElement: d } = param;
407
408
  return t(P, {
408
409
  space: "around",
409
410
  children: /* @__PURE__ */ t(m, {
410
411
  paddingX: 16,
411
- children: c
412
+ children: d
412
413
  })
413
414
  });
414
415
  }
@@ -426,7 +427,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
426
427
  value: e.radioValue,
427
428
  "aria-labelledby": i,
428
429
  render: (param)=>/* @__PURE__ */ {
429
- let { controlElement: c } = param;
430
+ let { controlElement: d } = param;
430
431
  return t(m, {
431
432
  paddingX: 16,
432
433
  children: x({
@@ -434,7 +435,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
434
435
  type: "control",
435
436
  right: ()=>/* @__PURE__ */ t(P, {
436
437
  space: "around",
437
- children: c
438
+ children: d
438
439
  })
439
440
  })
440
441
  });
@@ -451,7 +452,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
451
452
  type: "basic"
452
453
  })
453
454
  });
454
- }), Oe = /*#__PURE__*/ R.forwardRef((_param, i)=>/* @__PURE__ */ {
455
+ }), Fe = /*#__PURE__*/ C.forwardRef((_param, i)=>/* @__PURE__ */ {
455
456
  var { dataAttributes: e } = _param, r = _object_without_properties(_param, [
456
457
  "dataAttributes"
457
458
  ]);
@@ -461,24 +462,24 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
461
462
  "component-name": "Row"
462
463
  }, e)
463
464
  }));
464
- }), Fe = (param)=>{
465
- let { children: e , ariaLabelledby: r , role: i , dataAttributes: a , noLastDivider: d } = param;
466
- const b = R.Children.count(e) - 1, l = !d;
465
+ }), Ye = (param)=>{
466
+ let { children: e , ariaLabelledby: r , role: i , dataAttributes: a , noLastDivider: s } = param;
467
+ const b = C.Children.count(e) - 1, l = !s;
467
468
  return /* @__PURE__ */ t("div", _object_spread_props(_object_spread({
468
469
  role: i,
469
470
  "aria-labelledby": r
470
471
  }, de(a, "RowList")), {
471
- children: R.Children.toArray(e).filter(Boolean).map((B, s)=>/* @__PURE__ */ C(R.Fragment, {
472
+ children: C.Children.toArray(e).filter(Boolean).map((B, c)=>/* @__PURE__ */ R(C.Fragment, {
472
473
  children: [
473
474
  B,
474
- (s < b || l) && /* @__PURE__ */ t(m, {
475
+ (c < b || l) && /* @__PURE__ */ t(m, {
475
476
  paddingX: 16,
476
477
  children: /* @__PURE__ */ t(ce, {})
477
478
  })
478
479
  ]
479
- }, s))
480
+ }, c))
480
481
  }));
481
- }, Ye = /*#__PURE__*/ R.forwardRef((_param, i)=>/* @__PURE__ */ {
482
+ }, qe = /*#__PURE__*/ C.forwardRef((_param, i)=>/* @__PURE__ */ {
482
483
  var { dataAttributes: e } = _param, r = _object_without_properties(_param, [
483
484
  "dataAttributes"
484
485
  ]);
@@ -490,7 +491,7 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
490
491
  }, e),
491
492
  children: /* @__PURE__ */ t(_, _object_spread({}, r))
492
493
  });
493
- }), qe = (param)=>/* @__PURE__ */ {
494
+ }), ze = (param)=>/* @__PURE__ */ {
494
495
  let { children: e , ariaLabelledby: r , role: i , dataAttributes: a } = param;
495
496
  return t(P, {
496
497
  space: 16,
@@ -502,4 +503,4 @@ const U = (e, r)=>typeof e == "function" ? e == null ? void 0 : e({
502
503
  children: e
503
504
  });
504
505
  };
505
- export { Ye as BoxedRow, qe as BoxedRowList, Oe as Row, Fe as RowList };
506
+ export { qe as BoxedRow, ze as BoxedRowList, Fe as Row, Ye as RowList };
@@ -1,2 +1,2 @@
1
- const o = "14.17.0";
1
+ const o = "14.17.1";
2
2
  export { o as PACKAGE_VERSION };