@telefonica/mistica 15.7.0 → 15.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 (39) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.d.ts +4 -6
  3. package/dist/accordion.js +99 -92
  4. package/dist/community/blocks.js +1 -0
  5. package/dist/empty-state.js +7 -6
  6. package/dist/icon-button.d.ts +17 -16
  7. package/dist/icon-button.js +51 -49
  8. package/dist/icons/icon-chevron.css-mistica.js +25 -0
  9. package/dist/icons/icon-chevron.css.d.ts +5 -0
  10. package/dist/icons/icon-chevron.css.ts.vanilla.css-mistica.js +11 -0
  11. package/dist/icons/icon-chevron.js +27 -20
  12. package/dist/image.js +13 -12
  13. package/dist/list.css-mistica.js +11 -11
  14. package/dist/list.css.d.ts +1 -3
  15. package/dist/list.d.ts +8 -16
  16. package/dist/list.js +275 -383
  17. package/dist/package-version.js +1 -1
  18. package/dist/progress-bar.d.ts +2 -0
  19. package/dist/progress-bar.js +44 -35
  20. package/dist/stacking-group.js +7 -7
  21. package/dist/text-field-components.js +4 -4
  22. package/dist/utils/aspect-ratio-support.js +18 -18
  23. package/dist-es/accordion.js +131 -121
  24. package/dist-es/community/blocks.js +1 -0
  25. package/dist-es/empty-state.js +9 -8
  26. package/dist-es/icon-button.js +64 -62
  27. package/dist-es/icons/icon-chevron.css-mistica.js +5 -0
  28. package/dist-es/icons/icon-chevron.css.ts.vanilla.css-mistica.js +2 -0
  29. package/dist-es/icons/icon-chevron.js +26 -24
  30. package/dist-es/image.js +19 -18
  31. package/dist-es/list.css-mistica.js +2 -2
  32. package/dist-es/list.js +321 -429
  33. package/dist-es/package-version.js +1 -1
  34. package/dist-es/progress-bar.js +54 -45
  35. package/dist-es/stacking-group.js +14 -14
  36. package/dist-es/style.css +1 -1
  37. package/dist-es/text-field-components.js +11 -11
  38. package/dist-es/utils/aspect-ratio-support.js +22 -22
  39. package/package.json +1 -1
package/dist/list.js CHANGED
@@ -11,19 +11,19 @@ function _export(target, all) {
11
11
  }
12
12
  _export(exports, {
13
13
  BoxedRow: function() {
14
- return dt;
14
+ return ut;
15
15
  },
16
16
  BoxedRowList: function() {
17
- return st;
17
+ return ft;
18
18
  },
19
19
  Content: function() {
20
- return Ve;
20
+ return He;
21
21
  },
22
22
  Row: function() {
23
- return ct;
23
+ return ht;
24
24
  },
25
25
  RowList: function() {
26
- return lt;
26
+ return mt;
27
27
  }
28
28
  });
29
29
  const _jsxruntime = require("react/jsx-runtime");
@@ -174,71 +174,63 @@ function _object_without_properties_loose(source, excluded) {
174
174
  }
175
175
  return target;
176
176
  }
177
- const ce = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
178
- centerY: n
179
- }) : n ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
177
+ const Oe = (e, a)=>typeof e == "function" ? e == null ? void 0 : e({
178
+ centerY: a
179
+ }) : a ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
180
180
  style: {
181
181
  display: "flex",
182
182
  alignItems: "center",
183
183
  height: "100%"
184
184
  },
185
- children: e
186
- }) : e, Ve = (param)=>{
187
- let { withChevron: e, headline: n, headlineRef: r, extraRef: l, title: h, titleAs: P, titleLinesMax: b, subtitle: x, subtitleLinesMax: Y, description: E, descriptionLinesMax: q, detail: u, asset: H, danger: j, type: y = "basic", badge: D, right: s, extra: M, labelId: m, disabled: a } = param;
188
- const O = (0, _themevariantcontext.useIsInverseVariant)(), A = [
189
- n,
190
- h,
191
- x,
192
- E,
193
- M
194
- ].filter(Boolean).length === 1, z = ()=>D ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
195
- paddingLeft: 16,
196
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
197
- className: (0, _classnames.default)(_listcssmistica.center, _listcssmistica.badge, {
198
- [_listcssmistica.disabled]: a
199
- }),
200
- children: D === !0 ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {
201
- value: D
202
- })
203
- })
204
- }) : null;
185
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
186
+ children: e
187
+ })
188
+ }) : e, He = (param)=>{
189
+ let { withChevron: e, headline: a, headlineRef: r, extraRef: o, title: c, titleAs: g, titleLinesMax: y, subtitle: f, subtitleLinesMax: E, description: B, descriptionLinesMax: P, detail: h, asset: X, danger: T, badge: k, right: w, extra: s, labelId: D, disabled: b, control: v } = param;
190
+ const L = (0, _themevariantcontext.useIsInverseVariant)(), A = [
191
+ a,
192
+ c,
193
+ f,
194
+ B,
195
+ s
196
+ ].filter(Boolean).length === 1;
205
197
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_box.default, {
206
198
  paddingY: 16,
207
199
  className: _listcssmistica.content,
208
200
  children: [
209
- H && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
201
+ X && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
210
202
  paddingRight: 16,
211
203
  className: (0, _classnames.default)({
212
204
  [_listcssmistica.center]: A,
213
- [_listcssmistica.disabled]: a
205
+ [_listcssmistica.disabled]: b
214
206
  }),
215
207
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
216
208
  className: _listcssmistica.asset,
217
209
  style: (0, _css.applyCssVars)({
218
- color: j ? O ? _skincontractcssmistica.vars.colors.textErrorInverse : _skincontractcssmistica.vars.colors.textError : O ? _skincontractcssmistica.vars.colors.textPrimaryInverse : _skincontractcssmistica.vars.colors.textPrimary,
210
+ color: T ? L ? _skincontractcssmistica.vars.colors.textErrorInverse : _skincontractcssmistica.vars.colors.textError : L ? _skincontractcssmistica.vars.colors.textPrimaryInverse : _skincontractcssmistica.vars.colors.textPrimary,
219
211
  [_imagecssmistica.vars.mediaBorderRadius]: _skincontractcssmistica.vars.borderRadii.mediaSmall
220
212
  }),
221
- children: H
213
+ children: X
222
214
  })
223
215
  }),
224
216
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
225
217
  className: (0, _classnames.default)(_listcssmistica.rowBody, {
226
- [_listcssmistica.disabled]: a
218
+ [_listcssmistica.disabled]: b
227
219
  }),
228
220
  style: {
229
221
  justifyContent: A ? "center" : "flex-start"
230
222
  },
231
- id: m,
223
+ id: D,
232
224
  children: [
233
225
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
234
226
  regular: !0,
235
- color: j ? _skincontractcssmistica.vars.colors.textError : _skincontractcssmistica.vars.colors.textPrimary,
236
- truncate: b,
227
+ color: T ? _skincontractcssmistica.vars.colors.textError : _skincontractcssmistica.vars.colors.textPrimary,
228
+ truncate: y,
237
229
  hyphens: "auto",
238
- as: P,
239
- children: h
230
+ as: g,
231
+ children: c
240
232
  }),
241
- n && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
233
+ a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
242
234
  ref: r,
243
235
  style: {
244
236
  order: -1,
@@ -248,459 +240,359 @@ const ce = (e, n)=>typeof e == "function" ? e == null ? void 0 : e({
248
240
  regular: !0,
249
241
  color: _skincontractcssmistica.vars.colors.textPrimary,
250
242
  hyphens: "auto",
251
- children: n
243
+ children: a
252
244
  })
253
245
  }),
254
- x && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
246
+ f && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
255
247
  paddingTop: 2,
256
248
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
257
249
  regular: !0,
258
250
  color: _skincontractcssmistica.vars.colors.textPrimary,
259
- truncate: Y,
251
+ truncate: E,
260
252
  hyphens: "auto",
261
- children: x
253
+ children: f
262
254
  })
263
255
  }),
264
- E && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
256
+ B && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
265
257
  paddingTop: 2,
266
258
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
267
259
  regular: !0,
268
260
  color: _skincontractcssmistica.vars.colors.textSecondary,
269
- truncate: q,
261
+ truncate: P,
270
262
  hyphens: "auto",
271
- children: E
263
+ children: B
272
264
  })
273
265
  }),
274
- M && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
275
- ref: l,
266
+ s && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
267
+ ref: o,
276
268
  paddingTop: 2,
277
- children: M
269
+ children: s
278
270
  })
279
271
  ]
280
272
  }),
281
- z(),
282
- /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
283
- className: (0, _classnames.default)({
284
- [_listcssmistica.right]: !!u || y !== "basic",
285
- [_listcssmistica.rightRestrictedWidth]: !!u
273
+ k && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
274
+ paddingLeft: 16,
275
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
276
+ className: (0, _classnames.default)(_listcssmistica.badge, {
277
+ [_listcssmistica.disabled]: b
278
+ }),
279
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_badge.default, {
280
+ value: k === !0 ? void 0 : k
281
+ })
282
+ })
283
+ }),
284
+ (h || w || e || v) && /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
285
+ className: (0, _classnames.default)(_listcssmistica.rightContent, {
286
+ [_listcssmistica.rightRestrictedWidth]: !!h
286
287
  }),
287
288
  children: [
288
- u && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
289
- className: (0, _classnames.default)(_listcssmistica.center, _listcssmistica.detail, {
290
- [_listcssmistica.disabled]: a
289
+ h && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
290
+ className: (0, _classnames.default)(_listcssmistica.detail, {
291
+ [_listcssmistica.disabled]: b
291
292
  }),
292
293
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
293
294
  regular: !0,
294
295
  color: _skincontractcssmistica.vars.colors.textSecondary,
295
296
  hyphens: "auto",
296
- children: u
297
+ children: h
297
298
  })
298
299
  }),
299
- y === "control" && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
300
+ w && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
300
301
  className: (0, _classnames.default)({
301
- [_listcssmistica.detailRight]: !!u
302
+ [_listcssmistica.detailRight]: !!h,
303
+ [_listcssmistica.disabled]: b
302
304
  }),
303
- children: ce(s, A)
305
+ children: Oe(w, A)
304
306
  }),
305
- y === "custom" && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
306
- className: (0, _classnames.default)({
307
- [_listcssmistica.detailRight]: !!u,
308
- [_listcssmistica.disabled]: a
309
- }),
310
- children: ce(s, A)
311
- }),
312
- (y === "chevron" || y === "custom" && e) && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
313
- paddingLeft: u || y === "custom" ? 4 : 0,
307
+ e && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
308
+ paddingLeft: h || w ? 4 : 0,
314
309
  className: (0, _classnames.default)(_listcssmistica.center, {
315
- [_listcssmistica.disabled]: a
310
+ [_listcssmistica.disabled]: b
316
311
  }),
317
312
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconchevron.default, {
318
- color: O ? _skincontractcssmistica.vars.colors.inverse : _skincontractcssmistica.vars.colors.neutralMedium,
313
+ color: L ? _skincontractcssmistica.vars.colors.inverse : _skincontractcssmistica.vars.colors.neutralMedium,
319
314
  direction: "right"
320
315
  })
316
+ }),
317
+ v && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
318
+ paddingLeft: h || w ? 8 : 0,
319
+ className: _listcssmistica.center,
320
+ children: v
321
321
  })
322
322
  ]
323
323
  })
324
324
  ]
325
325
  });
326
- }, Xe = (param)=>{
327
- let { value: e, defaultValue: n, onChange: r } = param;
328
- const l = e !== void 0, [h, P] = _react.useState(!!n), b = ()=>{
329
- l || P(!h), r && r(l ? !e : !h);
330
- };
331
- return l ? [
332
- !!e,
333
- b
334
- ] : [
335
- h,
336
- b
326
+ }, Fe = (param)=>{
327
+ let { value: e, defaultValue: a, onChange: r } = param;
328
+ const o = e !== void 0, [c, g] = _react.useState(!!a);
329
+ return [
330
+ o ? !!e : c,
331
+ ()=>{
332
+ o || g(!c), r == null || r(o ? !e : !c);
333
+ }
337
334
  ];
338
- }, je = (e)=>e.switch !== void 0, De = (e)=>e.checkbox !== void 0, Me = (e)=>e.radioValue !== void 0, Oe = (e)=>e.iconButton !== void 0, de = /*#__PURE__*/ _react.forwardRef((e, n)=>{
339
- const r = (0, _hooks.useAriaId)(), l = (0, _themevariantcontext.useIsInverseVariant)(), { asset: h, headline: P, title: b, titleAs: x, titleLinesMax: Y, subtitle: E, subtitleLinesMax: q, description: u, descriptionLinesMax: H, detail: j, danger: y, badge: D, role: s, extra: M, dataAttributes: m, "aria-label": a } = e, [O, _] = _react.useState(""), [A, z] = _react.useState(""), $ = [
340
- b,
341
- O,
342
- E,
343
- u,
335
+ }, Ye = (e)=>[
336
+ "switch",
337
+ "checkbox",
338
+ "radioValue",
339
+ "iconButton"
340
+ ].some((a)=>e[a] !== void 0), oe = /*#__PURE__*/ _react.forwardRef((e, a)=>{
341
+ var $, p;
342
+ const r = (0, _hooks.useAriaId)(), o = (0, _themevariantcontext.useIsInverseVariant)(), { asset: c, headline: g, title: y, titleAs: f, titleLinesMax: E, subtitle: B, subtitleLinesMax: P, description: h, descriptionLinesMax: X, detail: T, danger: k, badge: w, role: s, extra: D, withChevron: b, dataAttributes: v, right: L, "aria-label": K } = e, [A, le] = _react.useState(""), [de, ce] = _react.useState(""), se = [
343
+ y,
344
344
  A,
345
- j
346
- ].filter(Boolean).join(" "), se = (0, _radiobutton.useRadioContext)(), o = e.disabled || e.radioValue !== void 0 && se.disabled, N = !o && !l, w = !o && l, [p, ee] = Xe(e.switch || e.checkbox || {}), v = (param)=>{
347
- let { type: g, right: B, labelId: R } = param;
348
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(Ve, {
349
- asset: h,
350
- headline: P,
351
- headlineRef: (f)=>{
352
- f && _(f.textContent || "");
345
+ B,
346
+ h,
347
+ de,
348
+ T
349
+ ].filter(Boolean).join(" "), R = K !== null && K !== void 0 ? K : e.href || e.to ? se : void 0, he = (0, _radiobutton.useRadioContext)(), u = e.disabled || e.radioValue !== void 0 && he.disabled, W = !u && !o, j = !u && o, Q = Ye(e), S = !!e.onPress || !!e.href || !!e.to, me = Q ? !1 : b !== null && b !== void 0 ? b : S, U = {
350
+ href: e.href,
351
+ newTab: e.newTab,
352
+ loadOnTop: e.loadOnTop,
353
+ to: e.to,
354
+ fullPageOnWebView: e.fullPageOnWebView,
355
+ replace: e.replace,
356
+ onNavigate: e.onNavigate,
357
+ onPress: e.onPress,
358
+ trackingEvent: e.trackingEvent
359
+ }, [Z, _] = Fe(e.switch || e.checkbox || {}), I = (n)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(He, {
360
+ asset: c,
361
+ headline: g,
362
+ headlineRef: (l)=>{
363
+ l && le(l.textContent || "");
353
364
  },
354
- title: b,
355
- titleAs: x,
356
- subtitle: E,
357
- description: u,
358
- badge: D,
359
- titleLinesMax: Y,
360
- subtitleLinesMax: q,
361
- descriptionLinesMax: H,
362
- detail: j,
363
- danger: y,
364
- type: g,
365
- right: B,
366
- extra: M,
367
- extraRef: (f)=>{
368
- f && z(f.innerText || f.textContent || "");
365
+ title: y,
366
+ titleAs: f,
367
+ subtitle: B,
368
+ description: h,
369
+ badge: w,
370
+ titleLinesMax: E,
371
+ subtitleLinesMax: P,
372
+ descriptionLinesMax: X,
373
+ detail: T,
374
+ danger: k,
375
+ right: L,
376
+ control: n == null ? void 0 : n.control,
377
+ extra: D,
378
+ extraRef: (l)=>{
379
+ l && ce(l.innerText || l.textContent || "");
369
380
  },
370
- labelId: R,
371
- disabled: o,
372
- withChevron: !!e.onPress || !!e.href || !!e.to
381
+ labelId: n == null ? void 0 : n.labelId,
382
+ disabled: u,
383
+ withChevron: me
373
384
  });
374
- }, G = function() {
375
- let { hidden: g, right: B } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
376
- let R = "chevron";
377
- return B === null && (R = "basic"), B && (R = "custom"), /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
378
- paddingX: 16,
379
- "aria-hidden": g || void 0,
380
- children: v({
381
- type: R,
382
- right: B
383
- })
384
- });
385
- };
386
- if (e.onPress && !je(e) && !De(e) && !Me(e) && !Oe(e)) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
387
- ref: n,
388
- className: (0, _classnames.default)(_listcssmistica.rowContent, {
389
- [_listcssmistica.touchableBackground]: N,
390
- [_listcssmistica.touchableBackgroundInverse]: w,
391
- [_listcssmistica.pointer]: !o
392
- }),
393
- trackingEvent: e.trackingEvent,
394
- onPress: e.onPress,
395
- role: s,
396
- dataAttributes: m,
397
- disabled: o,
398
- "aria-label": a,
399
- children: G({
400
- right: e.right
401
- })
402
- });
403
- if (e.to) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
404
- ref: n,
385
+ if (S && !Q) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
386
+ ref: a,
405
387
  className: (0, _classnames.default)(_listcssmistica.rowContent, {
406
- [_listcssmistica.touchableBackground]: N,
407
- [_listcssmistica.touchableBackgroundInverse]: w,
408
- [_listcssmistica.pointer]: !o
409
- }),
410
- trackingEvent: e.trackingEvent,
411
- to: e.to,
412
- fullPageOnWebView: e.fullPageOnWebView,
413
- onNavigate: e.onNavigate,
414
- role: s,
415
- dataAttributes: m,
416
- disabled: o,
417
- "aria-label": a !== null && a !== void 0 ? a : $,
418
- children: G({
419
- right: e.right,
420
- hidden: !0
388
+ [_listcssmistica.touchableBackground]: W,
389
+ [_listcssmistica.touchableBackgroundInverse]: j,
390
+ [_listcssmistica.pointer]: !u
421
391
  })
422
- });
423
- if (e.href) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
424
- ref: n,
425
- className: (0, _classnames.default)(_listcssmistica.rowContent, {
426
- [_listcssmistica.touchableBackground]: N,
427
- [_listcssmistica.touchableBackgroundInverse]: w,
428
- [_listcssmistica.pointer]: !o
429
- }),
430
- trackingEvent: e.trackingEvent,
431
- href: e.href,
432
- newTab: e.newTab,
433
- onNavigate: e.onNavigate,
434
- loadOnTop: e.loadOnTop,
392
+ }, U), {
435
393
  role: s,
436
- dataAttributes: m,
437
- disabled: o,
438
- "aria-label": a !== null && a !== void 0 ? a : $,
439
- children: G({
440
- right: e.right,
441
- hidden: !0
394
+ dataAttributes: v,
395
+ disabled: u,
396
+ "aria-label": R,
397
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
398
+ paddingX: 16,
399
+ "aria-hidden": !!e.to || !!e.href || void 0,
400
+ children: I()
442
401
  })
443
- });
444
- const te = (g)=>{
445
- var R, f;
446
- var _ref, _ref1;
447
- const B = (_ref1 = (_ref = (R = e.switch) == null ? void 0 : R.name) !== null && _ref !== void 0 ? _ref : (f = e.checkbox) == null ? void 0 : f.name) !== null && _ref1 !== void 0 ? _ref1 : r;
448
- return e.onPress ? /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
402
+ }));
403
+ const M = (n)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
449
404
  className: _listcssmistica.dualActionContainer,
405
+ ref: a
406
+ }, (0, _dom.getPrefixedDataAttributes)(v)), {
450
407
  children: [
451
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
452
- dataAttributes: m,
453
- disabled: o,
454
- onPress: e.onPress,
455
- trackingEvent: e.trackingEvent,
408
+ /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
409
+ disabled: u
410
+ }, U), {
456
411
  role: s,
457
412
  className: (0, _classnames.default)(_listcssmistica.dualActionLeft, {
458
- [_listcssmistica.touchableBackground]: N,
459
- [_listcssmistica.touchableBackgroundInverse]: w
413
+ [_listcssmistica.touchableBackground]: W,
414
+ [_listcssmistica.touchableBackgroundInverse]: j
460
415
  }),
461
- "aria-label": a,
462
- children: v({
463
- type: "basic",
416
+ "aria-label": R,
417
+ children: I({
464
418
  labelId: r
465
419
  })
466
- }),
420
+ })),
467
421
  /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
468
422
  className: _listcssmistica.dualActionDivider
469
423
  }),
470
- /* @__PURE__ */ (0, _jsxruntime.jsx)(g, {
471
- disabled: o,
472
- name: B,
473
- checked: p,
474
- "aria-label": a,
475
- "aria-labelledby": r,
476
- onChange: ee,
477
- render: (param)=>{
478
- let { controlElement: J } = param;
479
- return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
480
- className: _listcssmistica.dualActionRight,
481
- children: J
482
- });
483
- }
484
- })
424
+ n
485
425
  ]
486
- }) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
426
+ })), O = (n, l)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
487
427
  className: (0, _classnames.default)(_listcssmistica.rowContent, {
488
- [_listcssmistica.touchableBackground]: N,
489
- [_listcssmistica.touchableBackgroundInverse]: w,
490
- [_listcssmistica.pointer]: !o
491
- }),
492
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(g, {
493
- disabled: o,
494
- dataAttributes: m,
495
- name: B,
496
- checked: p,
497
- onChange: ee,
498
- "aria-label": a,
499
- render: (param)=>{
500
- let { controlElement: J, labelId: he } = param;
501
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
502
- paddingX: 16,
503
- role: s,
504
- children: v({
505
- labelId: he,
506
- type: "control",
507
- right: ()=>/* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
508
- space: "around",
509
- children: J
510
- })
511
- })
512
- });
513
- }
514
- })
515
- });
516
- };
517
- return e.switch ? te(_switchcomponent.default) : e.checkbox ? te(_checkbox.default) : e.iconButton ? e.onPress ? /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
518
- className: _listcssmistica.dualActionContainer,
519
- children: [
520
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
521
- dataAttributes: m,
522
- disabled: o,
523
- onPress: e.onPress,
524
- trackingEvent: e.trackingEvent,
525
- role: s,
526
- className: (0, _classnames.default)(_listcssmistica.dualActionLeft, {
527
- [_listcssmistica.touchableBackground]: N,
528
- [_listcssmistica.touchableBackgroundInverse]: w
529
- }),
530
- "aria-label": a,
531
- children: v({
532
- type: "basic",
533
- labelId: r
534
- })
535
- }),
536
- /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
537
- className: _listcssmistica.dualActionDivider
538
- }),
539
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
540
- padding: 16,
541
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
542
- space: "around",
543
- children: e.iconButton.Icon ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, _object_spread_props(_object_spread({}, e.iconButton), {
544
- disabled: e.disabled,
545
- ref: n
546
- })) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.ToggleIconButton, _object_spread_props(_object_spread({}, e.iconButton), {
547
- disabled: e.disabled,
548
- ref: n
549
- }))
550
- })
551
- })
552
- ]
553
- }) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
554
- className: (0, _classnames.default)(_listcssmistica.rowContent),
555
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
556
- paddingX: 16,
557
- children: v({
558
- labelId: r,
559
- type: "control",
560
- right: /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
561
- space: "around",
562
- children: e.iconButton.Icon ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, _object_spread_props(_object_spread({}, e.iconButton), {
563
- disabled: e.disabled,
564
- ref: n
565
- })) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.ToggleIconButton, _object_spread_props(_object_spread({}, e.iconButton), {
566
- disabled: e.disabled,
567
- ref: n
568
- }))
569
- })
570
- })
571
- })
572
- }) : e.radioValue ? e.onPress ? /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
573
- className: _listcssmistica.dualActionContainer,
574
- children: [
575
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, {
576
- disabled: o,
577
- onPress: e.onPress,
578
- role: s,
579
- className: (0, _classnames.default)(_listcssmistica.dualActionLeft, {
580
- [_listcssmistica.touchableBackground]: N,
581
- [_listcssmistica.touchableBackgroundInverse]: w
582
- }),
583
- "aria-label": a,
584
- children: v({
585
- type: "basic",
586
- labelId: r
587
- })
428
+ [_listcssmistica.touchableBackground]: W && l,
429
+ [_listcssmistica.touchableBackgroundInverse]: j && l,
430
+ [_listcssmistica.pointer]: !u && l
588
431
  }),
589
- /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
590
- className: _listcssmistica.dualActionDivider
591
- }),
592
- /* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.default, {
593
- dataAttributes: m,
594
- value: e.radioValue,
595
- "aria-labelledby": r,
596
- "aria-label": a,
597
- render: (param)=>{
598
- let { controlElement: g } = param;
599
- return /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
600
- space: "around",
601
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
602
- paddingX: 16,
603
- children: g
604
- })
605
- });
606
- }
607
- })
608
- ]
609
- }) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
610
- className: (0, _classnames.default)(_listcssmistica.rowContent, {
611
- [_listcssmistica.touchableBackground]: N,
612
- [_listcssmistica.touchableBackgroundInverse]: w,
613
- [_listcssmistica.pointer]: !o
614
- }),
615
- role: s,
616
- ref: n,
617
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.default, {
618
- dataAttributes: m,
619
- value: e.radioValue,
432
+ ref: a
433
+ }, (0, _dom.getPrefixedDataAttributes)(v)), {
434
+ children: n
435
+ }));
436
+ if (e.switch || e.checkbox) {
437
+ var _ref, _ref1;
438
+ const n = e.switch ? _switchcomponent.default : _checkbox.default, l = (_ref1 = (_ref = ($ = e.switch) == null ? void 0 : $.name) !== null && _ref !== void 0 ? _ref : (p = e.checkbox) == null ? void 0 : p.name) !== null && _ref1 !== void 0 ? _ref1 : r;
439
+ return S ? M(/* @__PURE__ */ (0, _jsxruntime.jsx)(n, {
440
+ disabled: u,
441
+ name: l,
442
+ checked: Z,
443
+ "aria-label": R,
444
+ "aria-labelledby": r,
445
+ onChange: _,
446
+ render: (param)=>{
447
+ let { controlElement: H } = param;
448
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
449
+ className: _listcssmistica.dualActionRight,
450
+ children: H
451
+ });
452
+ }
453
+ })) : O(/* @__PURE__ */ (0, _jsxruntime.jsx)(n, {
454
+ disabled: u,
455
+ name: l,
456
+ checked: Z,
457
+ "aria-label": R,
620
458
  "aria-labelledby": r,
621
- "aria-label": a,
459
+ onChange: _,
622
460
  render: (param)=>{
623
- let { controlElement: g } = param;
461
+ let { controlElement: H, labelId: ue } = param;
624
462
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
625
463
  paddingX: 16,
626
- children: v({
627
- labelId: r,
628
- type: "control",
629
- right: ()=>/* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
630
- space: "around",
631
- children: g
632
- })
464
+ role: s,
465
+ children: I({
466
+ labelId: ue,
467
+ control: /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
468
+ space: "around",
469
+ children: H
470
+ })
633
471
  })
634
472
  });
635
473
  }
474
+ }), !0);
475
+ }
476
+ return e.radioValue ? S ? M(/* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.default, {
477
+ value: e.radioValue,
478
+ "aria-label": R,
479
+ "aria-labelledby": r,
480
+ render: (param)=>{
481
+ let { controlElement: n } = param;
482
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
483
+ space: "around",
484
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
485
+ paddingX: 16,
486
+ children: n
487
+ })
488
+ });
489
+ }
490
+ })) : O(/* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.default, {
491
+ value: e.radioValue,
492
+ "aria-label": R,
493
+ "aria-labelledby": r,
494
+ render: (param)=>{
495
+ let { controlElement: n } = param;
496
+ return /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
497
+ paddingX: 16,
498
+ role: s,
499
+ children: I({
500
+ labelId: r,
501
+ control: /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
502
+ space: "around",
503
+ children: n
504
+ })
505
+ })
506
+ });
507
+ }
508
+ }), !0) : e.iconButton ? S ? M(/* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
509
+ padding: 16,
510
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
511
+ space: "around",
512
+ children: e.iconButton.Icon ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, _object_spread_props(_object_spread({}, e.iconButton), {
513
+ disabled: e.disabled
514
+ })) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.ToggleIconButton, _object_spread_props(_object_spread({}, e.iconButton), {
515
+ disabled: e.disabled
516
+ }))
636
517
  })
637
- }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
518
+ })) : O(/* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
519
+ paddingX: 16,
520
+ children: I({
521
+ labelId: r,
522
+ control: /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
523
+ space: "around",
524
+ children: e.iconButton.Icon ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, _object_spread_props(_object_spread({}, e.iconButton), {
525
+ disabled: e.disabled,
526
+ role: s
527
+ })) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.ToggleIconButton, _object_spread_props(_object_spread({}, e.iconButton), {
528
+ disabled: e.disabled,
529
+ role: s
530
+ }))
531
+ })
532
+ })
533
+ })) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
638
534
  paddingX: 16,
639
535
  className: _listcssmistica.rowContent,
640
536
  role: s,
641
- dataAttributes: m,
642
- children: e.right ? v({
643
- type: "custom",
644
- right: e.right
645
- }) : v({
646
- type: "basic"
647
- })
537
+ dataAttributes: v,
538
+ ref: a,
539
+ children: I()
648
540
  });
649
- }), ct = /*#__PURE__*/ _react.forwardRef((_param, l)=>{
650
- var { dataAttributes: e, role: n = "listitem" } = _param, r = _object_without_properties(_param, [
541
+ }), ht = /*#__PURE__*/ _react.forwardRef((_param, o)=>{
542
+ var { dataAttributes: e, role: a = "listitem" } = _param, r = _object_without_properties(_param, [
651
543
  "dataAttributes",
652
544
  "role"
653
545
  ]);
654
546
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
655
- role: n,
547
+ role: a,
656
548
  className: (0, _sprinklescssmistica.sprinkles)({
657
549
  width: "100%"
658
550
  }),
659
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(de, _object_spread_props(_object_spread({}, r), {
660
- ref: l,
551
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(oe, _object_spread_props(_object_spread({}, r), {
552
+ ref: o,
661
553
  dataAttributes: _object_spread({
662
554
  "component-name": "Row"
663
555
  }, e)
664
556
  }))
665
557
  });
666
- }), lt = (param)=>{
667
- let { children: e, ariaLabelledby: n, role: r = "list", dataAttributes: l } = param;
668
- const h = _react.Children.toArray(e).filter(Boolean), P = h.length - 1;
558
+ }), mt = (param)=>{
559
+ let { children: e, ariaLabelledby: a, role: r = "list", dataAttributes: o } = param;
560
+ const c = _react.Children.toArray(e).filter(Boolean), g = c.length - 1;
669
561
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
670
562
  role: r,
671
- "aria-labelledby": n
672
- }, (0, _dom.getPrefixedDataAttributes)(l, "RowList")), {
673
- children: h.map((b, x)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_react.Fragment, {
563
+ "aria-labelledby": a
564
+ }, (0, _dom.getPrefixedDataAttributes)(o, "RowList")), {
565
+ children: c.map((y, f)=>/* @__PURE__ */ (0, _jsxruntime.jsxs)(_react.Fragment, {
674
566
  children: [
675
- b,
676
- x < P && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
567
+ y,
568
+ f < g && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
677
569
  paddingX: 16,
678
570
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_divider.default, {})
679
571
  })
680
572
  ]
681
- }, x))
573
+ }, f))
682
574
  }));
683
- }, dt = /*#__PURE__*/ _react.forwardRef((_param, r)=>{
684
- var { dataAttributes: e } = _param, n = _object_without_properties(_param, [
575
+ }, ut = /*#__PURE__*/ _react.forwardRef((_param, r)=>{
576
+ var { dataAttributes: e } = _param, a = _object_without_properties(_param, [
685
577
  "dataAttributes"
686
578
  ]);
687
579
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_boxed.Boxed, {
688
- isInverse: n.isInverse,
580
+ isInverse: a.isInverse,
689
581
  ref: r,
690
582
  dataAttributes: _object_spread({
691
583
  "component-name": "BoxedRow"
692
584
  }, e),
693
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(de, _object_spread({}, n))
585
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(oe, _object_spread({}, a))
694
586
  });
695
- }), st = (param)=>{
696
- let { children: e, ariaLabelledby: n, role: r = "list", dataAttributes: l } = param;
587
+ }), ft = (param)=>{
588
+ let { children: e, ariaLabelledby: a, role: r = "list", dataAttributes: o } = param;
697
589
  return /* @__PURE__ */ (0, _jsxruntime.jsx)(_stack.default, {
698
590
  space: 16,
699
591
  role: r,
700
- "aria-labelledby": n,
592
+ "aria-labelledby": a,
701
593
  dataAttributes: _object_spread({
702
594
  "component-name": "BoxedRowList"
703
- }, l),
595
+ }, o),
704
596
  children: e
705
597
  });
706
598
  };