@telefonica/mistica 14.18.2 → 14.20.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 (74) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/button.css-mistica.js +28 -22
  3. package/dist/button.css.d.ts +3 -1
  4. package/dist/button.d.ts +6 -0
  5. package/dist/button.js +60 -58
  6. package/dist/card.css-mistica.js +18 -18
  7. package/dist/card.css.d.ts +1 -2
  8. package/dist/card.d.ts +17 -8
  9. package/dist/card.js +331 -277
  10. package/dist/community/advanced-data-card.css-mistica.js +18 -21
  11. package/dist/community/advanced-data-card.css.d.ts +2 -3
  12. package/dist/community/advanced-data-card.js +171 -158
  13. package/dist/generated/mistica-icons/icon-subtract-circle-filled.d.ts +4 -0
  14. package/dist/generated/mistica-icons/icon-subtract-circle-filled.js +110 -0
  15. package/dist/generated/mistica-icons/icon-subtract-circle-light.d.ts +4 -0
  16. package/dist/generated/mistica-icons/icon-subtract-circle-light.js +116 -0
  17. package/dist/generated/mistica-icons/icon-subtract-circle-regular.d.ts +4 -0
  18. package/dist/generated/mistica-icons/icon-subtract-circle-regular.js +116 -0
  19. package/dist/generated/mistica-icons/icon-subtract-light.d.ts +4 -0
  20. package/dist/generated/mistica-icons/icon-subtract-light.js +110 -0
  21. package/dist/generated/mistica-icons/icon-subtract-regular.d.ts +4 -0
  22. package/dist/generated/mistica-icons/icon-subtract-regular.js +110 -0
  23. package/dist/header.js +27 -29
  24. package/dist/index.d.ts +7 -2
  25. package/dist/index.js +26 -0
  26. package/dist/list.css-mistica.js +17 -14
  27. package/dist/list.css.d.ts +2 -1
  28. package/dist/list.js +170 -163
  29. package/dist/package-version.js +1 -1
  30. package/dist/skins/blau.js +14 -0
  31. package/dist/skins/defaults.js +14 -0
  32. package/dist/skins/movistar-legacy.js +14 -0
  33. package/dist/skins/movistar.js +14 -0
  34. package/dist/skins/o2.js +14 -0
  35. package/dist/skins/telefonica.js +16 -2
  36. package/dist/skins/types/index.d.ts +12 -0
  37. package/dist/skins/vivo-new.js +15 -1
  38. package/dist/skins/vivo.js +14 -0
  39. package/dist/tabs.css-mistica.js +10 -14
  40. package/dist/tabs.css.d.ts +1 -2
  41. package/dist/tabs.js +39 -33
  42. package/dist/theme-context-provider.js +29 -27
  43. package/dist/title.d.ts +1 -0
  44. package/dist/title.js +91 -29
  45. package/dist-es/button.css-mistica.js +9 -9
  46. package/dist-es/button.js +75 -73
  47. package/dist-es/card.css-mistica.js +4 -4
  48. package/dist-es/card.js +449 -401
  49. package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
  50. package/dist-es/community/advanced-data-card.js +195 -182
  51. package/dist-es/generated/mistica-icons/icon-subtract-circle-filled.js +101 -0
  52. package/dist-es/generated/mistica-icons/icon-subtract-circle-light.js +107 -0
  53. package/dist-es/generated/mistica-icons/icon-subtract-circle-regular.js +107 -0
  54. package/dist-es/generated/mistica-icons/icon-subtract-light.js +101 -0
  55. package/dist-es/generated/mistica-icons/icon-subtract-regular.js +101 -0
  56. package/dist-es/header.js +46 -48
  57. package/dist-es/index.js +1729 -1724
  58. package/dist-es/list.css-mistica.js +2 -2
  59. package/dist-es/list.js +242 -235
  60. package/dist-es/package-version.js +1 -1
  61. package/dist-es/skins/blau.js +14 -0
  62. package/dist-es/skins/defaults.js +14 -0
  63. package/dist-es/skins/movistar-legacy.js +14 -0
  64. package/dist-es/skins/movistar.js +14 -0
  65. package/dist-es/skins/o2.js +14 -0
  66. package/dist-es/skins/telefonica.js +16 -2
  67. package/dist-es/skins/vivo-new.js +15 -1
  68. package/dist-es/skins/vivo.js +14 -0
  69. package/dist-es/style.css +1 -1
  70. package/dist-es/tabs.css-mistica.js +8 -9
  71. package/dist-es/tabs.js +49 -43
  72. package/dist-es/theme-context-provider.js +63 -61
  73. package/dist-es/title.js +58 -38
  74. package/package.json +1 -1
package/dist/button.js CHANGED
@@ -10,16 +10,16 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  ButtonDanger: function() {
13
- return _e;
13
+ return xe;
14
14
  },
15
15
  ButtonLink: function() {
16
- return Ce;
16
+ return Ne;
17
17
  },
18
18
  ButtonPrimary: function() {
19
- return we;
19
+ return _e;
20
20
  },
21
21
  ButtonSecondary: function() {
22
- return Ne;
22
+ return Re;
23
23
  }
24
24
  });
25
25
  const _jsxruntime = require("react/jsx-runtime");
@@ -161,7 +161,7 @@ function _object_without_properties_loose(source, excluded) {
161
161
  return target;
162
162
  }
163
163
  const w = (param)=>{
164
- let { content: e , defaultIconSize: i , renderText: n } = param;
164
+ let { content: e , defaultIconSize: r , renderText: n } = param;
165
165
  const c = (0, _utils.flattenChildren)(e), f = c.length, d = [];
166
166
  let l = [];
167
167
  const g = ()=>{
@@ -174,7 +174,7 @@ const w = (param)=>{
174
174
  if (/*#__PURE__*/ _react.isValidElement(u)) {
175
175
  l.length && g();
176
176
  var _u_props_size;
177
- const v = (_u_props_size = u.props.size) !== null && _u_props_size !== void 0 ? _u_props_size : i;
177
+ const v = (_u_props_size = u.props.size) !== null && _u_props_size !== void 0 ? _u_props_size : r;
178
178
  d.push(/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
179
179
  style: {
180
180
  display: "flex",
@@ -188,17 +188,17 @@ const w = (param)=>{
188
188
  }, d.length));
189
189
  } else l.push(u), s && g();
190
190
  }), d;
191
- }, le = ()=>/* @__PURE__ */ (0, _jsxruntime.jsx)("svg", {
192
- width: "8",
193
- height: "20",
191
+ }, ue = ()=>/* @__PURE__ */ (0, _jsxruntime.jsx)("svg", {
192
+ width: "0.5em",
193
+ height: "1.25em",
194
194
  viewBox: "0 0 8 20",
195
195
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("path", {
196
196
  d: "M6.32595 11.0107L3.03801 7.7086L3.03292 7.70375L3.032 7.70291L3.02931 7.70047L3.02848 7.69974L3.02248 7.69436C2.88533 7.57121 2.71386 7.53733 2.56343 7.55395C2.41648 7.57018 2.27272 7.63567 2.16886 7.73711C2.06893 7.83185 2.01209 7.97816 2.00175 8.11707C1.99083 8.26377 2.02925 8.43959 2.16869 8.57393L5.24446 11.5515L2.15859 14.512L2.15375 14.5171L2.1529 14.518L2.15046 14.5207L2.14974 14.5215L2.14435 14.5275C2.02121 14.6647 1.98733 14.8361 2.00394 14.9866C2.02017 15.1335 2.08567 15.2773 2.18711 15.3811C2.28184 15.4811 2.42816 15.5379 2.56706 15.5483C2.71377 15.5592 2.88958 15.5208 3.02392 15.3813L6.32595 12.0922C6.6246 11.7936 6.6246 11.3094 6.32595 11.0107Z",
197
197
  fill: "currentColor"
198
198
  })
199
- }), V = (param)=>{
200
- let { showSpinner: e , children: i , small: n , loadingText: c , shouldRenderSpinner: f , setShouldRenderSpinner: d , renderText: l , textContentStyle: g , StartIcon: u , EndIcon: m , withChevron: a } = param;
201
- const s = n ? _buttoncssmistica.SMALL_ICON_SIZE : _buttoncssmistica.ICON_SIZE, r = (0, _css.pxToRem)(n ? _buttoncssmistica.SMALL_SPINNER_SIZE : _buttoncssmistica.SPINNER_SIZE);
199
+ }), D = (param)=>{
200
+ let { showSpinner: e , children: r , small: n , loadingText: c , shouldRenderSpinner: f , setShouldRenderSpinner: d , renderText: l , textContentStyle: g , StartIcon: u , EndIcon: m , withChevron: a } = param;
201
+ const s = n ? _buttoncssmistica.SMALL_ICON_SIZE : _buttoncssmistica.ICON_SIZE, i = (0, _css.pxToRem)(n ? _buttoncssmistica.SMALL_SPINNER_SIZE : _buttoncssmistica.SPINNER_SIZE);
202
202
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
203
203
  children: [
204
204
  /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
@@ -217,7 +217,7 @@ const w = (param)=>{
217
217
  })
218
218
  }),
219
219
  w({
220
- content: i,
220
+ content: r,
221
221
  defaultIconSize: s,
222
222
  renderText: l
223
223
  }),
@@ -238,7 +238,7 @@ const w = (param)=>{
238
238
  alignItems: "center",
239
239
  marginLeft: _buttoncssmistica.CHEVRON_MARGIN_LEFT_LINK
240
240
  },
241
- children: /* @__PURE__ */ (0, _jsxruntime.jsx)(le, {})
241
+ children: /* @__PURE__ */ (0, _jsxruntime.jsx)(ue, {})
242
242
  })
243
243
  ]
244
244
  }),
@@ -246,7 +246,7 @@ const w = (param)=>{
246
246
  className: _buttoncssmistica.loadingFiller,
247
247
  "aria-hidden": !0,
248
248
  style: c ? {
249
- paddingLeft: r,
249
+ paddingLeft: i,
250
250
  paddingRight: _buttoncssmistica.ICON_MARGIN_PX + 2 * (n ? _buttoncssmistica.X_SMALL_PADDING_PX : _buttoncssmistica.X_PADDING_PX)
251
251
  } : void 0,
252
252
  children: w({
@@ -266,12 +266,12 @@ const w = (param)=>{
266
266
  rolePresentation: !!c,
267
267
  color: "currentcolor",
268
268
  delay: "0s",
269
- size: r
269
+ size: i
270
270
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
271
271
  style: {
272
272
  display: "inline-block",
273
- width: r,
274
- height: r
273
+ width: i,
274
+ height: i
275
275
  }
276
276
  }),
277
277
  c ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
@@ -286,12 +286,12 @@ const w = (param)=>{
286
286
  })
287
287
  ]
288
288
  });
289
- }, N = /*#__PURE__*/ _react.forwardRef((e, i)=>{
290
- const { textPresets: n } = (0, _hooks.useTheme)(), { eventFormat: c } = (0, _analytics.useTrackingConfig)(), { formStatus: f , formId: d } = (0, _formcontext.useForm)(), l = (0, _themevariantcontext.useIsInverseVariant)(), { loadingText: g } = e, u = !!e.submit, m = f === "sending", [a, s] = _react.useState(!1), r = e.showSpinner || m && u || a, [v, L] = _react.useState(!!r);
289
+ }, N = /*#__PURE__*/ _react.forwardRef((e, r)=>{
290
+ const { textPresets: n } = (0, _hooks.useTheme)(), { eventFormat: c } = (0, _analytics.useTrackingConfig)(), { formStatus: f , formId: d } = (0, _formcontext.useForm)(), l = (0, _themevariantcontext.useIsInverseVariant)(), { loadingText: g } = e, u = !!e.submit, m = f === "sending", [a, s] = _react.useState(!1), i = e.showSpinner || m && u || a, [v, L] = _react.useState(!!i);
291
291
  _react.useEffect(()=>{
292
- r && !v && L(!0);
292
+ i && !v && L(!0);
293
293
  }, [
294
- r,
294
+ i,
295
295
  v,
296
296
  f
297
297
  ]);
@@ -304,25 +304,25 @@ const w = (param)=>{
304
304
  category: _analytics.eventCategories.userInteraction,
305
305
  action: `${e.type}_button_tapped`,
306
306
  label: (0, _common.getTextFromChildren)(e.children)
307
- }, E = (I)=>e.small ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
307
+ }, I = (b)=>e.small ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, {
308
308
  size: 14,
309
309
  lineHeight: 20,
310
310
  weight: n.button.weight,
311
311
  truncate: 1,
312
312
  color: "inherit",
313
313
  as: "div",
314
- children: I
314
+ children: b
315
315
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
316
316
  weight: n.button.weight,
317
317
  truncate: 1,
318
318
  color: "inherit",
319
319
  as: "div",
320
- children: I
320
+ children: b
321
321
  }), h = {
322
- ref: i,
322
+ ref: r,
323
323
  className: (0, _classnames.default)(l ? _buttoncssmistica.inverseVariants[e.type] : _buttoncssmistica.variants[e.type], e.className, {
324
324
  [_buttoncssmistica.small]: e.small,
325
- [_buttoncssmistica.isLoading]: r
325
+ [_buttoncssmistica.isLoading]: i
326
326
  }),
327
327
  style: _object_spread({
328
328
  cursor: e.fake ? "pointer" : void 0
@@ -332,19 +332,19 @@ const w = (param)=>{
332
332
  "aria-controls": e["aria-controls"],
333
333
  "aria-expanded": e["aria-expanded"],
334
334
  tabIndex: e.tabIndex,
335
- children: V({
336
- showSpinner: r,
335
+ children: D({
336
+ showSpinner: i,
337
337
  shouldRenderSpinner: v,
338
338
  setShouldRenderSpinner: L,
339
339
  children: e.children,
340
340
  loadingText: g,
341
341
  small: e.small,
342
- renderText: E,
342
+ renderText: I,
343
343
  textContentStyle: _buttoncssmistica.textContent,
344
344
  StartIcon: e.StartIcon,
345
345
  EndIcon: e.EndIcon
346
346
  }),
347
- disabled: e.disabled || r || m,
347
+ disabled: e.disabled || i || m,
348
348
  role: "button"
349
349
  };
350
350
  if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
@@ -360,8 +360,8 @@ const w = (param)=>{
360
360
  onPress: ()=>{}
361
361
  }, h));
362
362
  if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, h), {
363
- onPress: (I)=>{
364
- const _ = e.onPress(I);
363
+ onPress: (b)=>{
364
+ const _ = e.onPress(b);
365
365
  _ && (s(!0), _.finally(()=>s(!1)));
366
366
  }
367
367
  }));
@@ -376,14 +376,14 @@ const w = (param)=>{
376
376
  }));
377
377
  if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
378
378
  return null;
379
- }), Ce = /*#__PURE__*/ _react.forwardRef((e, i)=>{
379
+ }), Ne = /*#__PURE__*/ _react.forwardRef((e, r)=>{
380
380
  var _e_withChevron;
381
- const { formStatus: n } = (0, _formcontext.useForm)(), c = (0, _themevariantcontext.useIsInverseVariant)(), { analytics: f , textPresets: d } = (0, _hooks.useTheme)(), { loadingText: l } = e, g = n === "sending", [u, m] = _react.useState(!1), a = e.showSpinner || u, s = (_e_withChevron = e.withChevron) !== null && _e_withChevron !== void 0 ? _e_withChevron : !!e.href || !!e.to, [r, v] = _react.useState(!!a);
381
+ const { formStatus: n } = (0, _formcontext.useForm)(), c = (0, _themevariantcontext.useIsInverseVariant)(), { analytics: f , textPresets: d } = (0, _hooks.useTheme)(), { loadingText: l } = e, g = n === "sending", [u, m] = _react.useState(!1), a = e.showSpinner || u, s = (_e_withChevron = e.withChevron) !== null && _e_withChevron !== void 0 ? _e_withChevron : !!e.href || !!e.to, [i, v] = _react.useState(!!a);
382
382
  _react.useEffect(()=>{
383
- a && !r && v(!0);
383
+ a && !i && v(!0);
384
384
  }, [
385
385
  a,
386
- r,
386
+ i,
387
387
  n
388
388
  ]);
389
389
  var _e_trackingEvent;
@@ -400,19 +400,21 @@ const w = (param)=>{
400
400
  truncate: 1,
401
401
  color: "inherit",
402
402
  children: h
403
- }), E = {
403
+ }), I = {
404
404
  className: (0, _classnames.default)(_buttoncssmistica.link, {
405
405
  [_buttoncssmistica.inverseLink]: c,
406
- [_buttoncssmistica.alignedLink]: e.aligned,
406
+ [_buttoncssmistica.alignedLeftLink]: !!e.bleedLeft || !!e.aligned,
407
+ [_buttoncssmistica.alignedRightLink]: !!e.bleedRight,
408
+ [_buttoncssmistica.alignedVerticalLink]: !!e.bleedY,
407
409
  [_buttoncssmistica.isLoading]: a
408
410
  }),
409
411
  trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? L() : void 0,
410
412
  dataAttributes: _object_spread({
411
413
  "component-name": "ButtonLink"
412
414
  }, e.dataAttributes),
413
- children: V({
415
+ children: D({
414
416
  showSpinner: a,
415
- shouldRenderSpinner: r,
417
+ shouldRenderSpinner: i,
416
418
  setShouldRenderSpinner: v,
417
419
  children: e.children,
418
420
  loadingText: l,
@@ -427,60 +429,60 @@ const w = (param)=>{
427
429
  };
428
430
  if (process.env.NODE_ENV !== "production" && (e.to === "" || e.href === "")) throw Error("to or href props are empty strings");
429
431
  if (e.onPress) return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
430
- ref: i
431
- }, E), {
432
+ ref: r
433
+ }, I), {
432
434
  onPress: (h)=>{
433
- const I = e.onPress(h);
434
- I && (m(!0), I.finally(()=>m(!1)));
435
+ const b = e.onPress(h);
436
+ b && (m(!0), b.finally(()=>m(!1)));
435
437
  }
436
438
  }));
437
439
  if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
438
- ref: i
439
- }, E), {
440
+ ref: r
441
+ }, I), {
440
442
  to: e.to,
441
443
  fullPageOnWebView: e.fullPageOnWebView
442
444
  }));
443
445
  if (e.href || e.href === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
444
- ref: i
445
- }, E), {
446
+ ref: r
447
+ }, I), {
446
448
  href: e.href,
447
449
  newTab: e.newTab
448
450
  }));
449
451
  if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
450
452
  return null;
451
- }), we = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
452
- var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
453
+ }), _e = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
454
+ var { dataAttributes: e } = _param, r = _object_without_properties(_param, [
453
455
  "dataAttributes"
454
456
  ]);
455
457
  return (0, _jsxruntime.jsx)(N, _object_spread_props(_object_spread({
456
458
  dataAttributes: _object_spread({
457
459
  "component-name": "ButtonPrimary"
458
460
  }, e)
459
- }, i), {
461
+ }, r), {
460
462
  ref: n,
461
463
  type: "primary"
462
464
  }));
463
- }), Ne = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
464
- var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
465
+ }), Re = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
466
+ var { dataAttributes: e } = _param, r = _object_without_properties(_param, [
465
467
  "dataAttributes"
466
468
  ]);
467
469
  return (0, _jsxruntime.jsx)(N, _object_spread_props(_object_spread({
468
470
  dataAttributes: _object_spread({
469
471
  "component-name": "ButtonSecondary"
470
472
  }, e)
471
- }, i), {
473
+ }, r), {
472
474
  ref: n,
473
475
  type: "secondary"
474
476
  }));
475
- }), _e = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
476
- var { dataAttributes: e } = _param, i = _object_without_properties(_param, [
477
+ }), xe = /*#__PURE__*/ _react.forwardRef((_param, n)=>/* @__PURE__ */ {
478
+ var { dataAttributes: e } = _param, r = _object_without_properties(_param, [
477
479
  "dataAttributes"
478
480
  ]);
479
481
  return (0, _jsxruntime.jsx)(N, _object_spread_props(_object_spread({
480
482
  dataAttributes: _object_spread({
481
483
  "component-name": "ButtonDanger"
482
484
  }, e)
483
- }, i), {
485
+ }, r), {
484
486
  ref: n,
485
487
  type: "danger"
486
488
  }));
@@ -10,10 +10,10 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  actions: function() {
13
- return _;
13
+ return a;
14
14
  },
15
15
  boxed: function() {
16
- return a;
16
+ return _;
17
17
  },
18
18
  cardAction: function() {
19
19
  return y;
@@ -49,47 +49,47 @@ _export(exports, {
49
49
  return i;
50
50
  },
51
51
  mediaCard: function() {
52
- return l;
52
+ return C;
53
53
  },
54
54
  mediaCardContent: function() {
55
- return C;
55
+ return l;
56
56
  },
57
- nakedCardContent: function() {
57
+ mediaCardIcon: function() {
58
58
  return h;
59
59
  },
60
- snapCard: function() {
60
+ nakedCardContent: function() {
61
61
  return u;
62
62
  },
63
- touchable: function() {
63
+ snapCard: function() {
64
64
  return p;
65
65
  },
66
+ touchable: function() {
67
+ return q;
68
+ },
66
69
  touchableCardOverlay: function() {
67
- return j;
70
+ return z;
68
71
  },
69
72
  touchableCardOverlayInverse: function() {
70
- return q;
73
+ return k;
71
74
  },
72
75
  touchableCardOverlayMedia: function() {
73
- return z;
76
+ return m;
74
77
  },
75
78
  touchableContainer: function() {
76
79
  return O;
77
80
  },
78
81
  touchableMediaCardOverlay: function() {
79
- return k;
82
+ return g;
80
83
  },
81
84
  touchableNakedMediaOverlay: function() {
82
- return A;
85
+ return j;
83
86
  },
84
87
  vars: function() {
85
88
  return M;
86
- },
87
- videoAction: function() {
88
- return g;
89
89
  }
90
90
  });
91
91
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
92
92
  require("./card.css.ts.vanilla.css-mistica.js");
93
- var _ = "_15e54s91 _1y2v1nfb4 _1y2v1nfbq _1y2v1nfbk", a = "_15e54s93 _1y2v1nfb4 _1y2v1nfaz", y = "_15e54s9v _1y2v1nfc1 _1y2v1nfch _1y2v1nfb4 _1y2v1nfbj _1y2v1nfbd _1y2v1nfdn", f = "_1y2v1nfb4 _1y2v1nfc3 _1y2v1nfcj _1y2v1nfbj _1y2v1nfbd", r = "_15e54s9w _1y2v1nfc1 _1y2v1nfch _1y2v1nfb4 _1y2v1nfbj _1y2v1nfbd _1y2v1nfdn", e = "_15e54s9x _1y2v1nfc1 _1y2v1nfch _1y2v1nfb4 _1y2v1nfbj _1y2v1nfbd _1y2v1nfdn", b = "_15e54s910", d = "_15e54s98", s = "_15e54s9j _1y2v1nf8w _1y2v1nfa5 _1y2v1nf6k _1y2v1nf7t _1y2v1nfb4 _1y2v1nfbq _1y2v1nfaz _1y2v1nfba _1y2v1nfbr", c = "_15e54s9r", t = "_1y2v1nfbr _1y2v1nfc8 _1y2v1nfb4 _1y2v1nfaz", o = "_15e54s9q", i = "_15e54s9s", l = "_1y2v1nfb4 _1y2v1nfba _1y2v1nfc8 _1y2v1nfbr _1y2v1nfbq", C = "_15e54s9f _1y2v1nf8w _1y2v1nfa5 _1y2v1nfb4 _1y2v1nfbq _1y2v1nfaz _1y2v1nf6e _1y2v1nf7t _1y2v1nfba _1y2v1nfbg", h = "_15e54s9h _1y2v1nfb4 _1y2v1nfbq _1y2v1nfaz _1y2v1nfba _1y2v1nfbg _1y2v1nf6e", u = "_15e54s9l _1y2v1nf6e _1y2v1nf7n _1y2v1nf8w _1y2v1nfa5 _1y2v1nfb4 _1y2v1nfaz _1y2v1nfc8 _1y2v1nfba _1y2v1nfbg _1y2v1nfbr _1y2v1nfbq", p = "_15e54s95", j = "_15e54s9a _15e54s96", q = "_15e54s9b _15e54s96", z = "_15e54s9c _15e54s96", O = "_15e54s94", k = "_15e54s97 _15e54s96", A = "_15e54s99 _15e54s96", M = {
94
- aspectRatio: "var(--_15e54s9z)"
95
- }, g = "_15e54s9y _1y2v1nfc1 _1y2v1nfch _1y2v1nfb4 _1y2v1nfbj _1y2v1nfbd _1y2v1nfdn";
93
+ var a = "_15e54s91 _1y2v1nfb4 _1y2v1nfbq _1y2v1nfbk", _ = "_15e54s93 _1y2v1nfb4 _1y2v1nfaz", y = "_15e54s9v _1y2v1nfc1 _1y2v1nfch _1y2v1nfb4 _1y2v1nfbj _1y2v1nfbd _1y2v1nfdn", f = "_1y2v1nfb4 _1y2v1nfc3 _1y2v1nfcj _1y2v1nfbj _1y2v1nfbd", r = "_15e54s9w _1y2v1nfc1 _1y2v1nfch _1y2v1nfb4 _1y2v1nfbj _1y2v1nfbd _1y2v1nfdn", e = "_15e54s9x _1y2v1nfc1 _1y2v1nfch _1y2v1nfb4 _1y2v1nfbj _1y2v1nfbd _1y2v1nfdn", b = "_15e54s9z", d = "_15e54s98", s = "_15e54s9k _1y2v1nf8w _1y2v1nfa5 _1y2v1nf6k _1y2v1nf7t _1y2v1nfb4 _1y2v1nfbq _1y2v1nfaz _1y2v1nfba _1y2v1nfbr", c = "_15e54s9r", t = "_1y2v1nfbr _1y2v1nfc8 _1y2v1nfb4 _1y2v1nfaz", o = "_15e54s9q", i = "_15e54s9s", C = "_1y2v1nfb4 _1y2v1nfba _1y2v1nfc8 _1y2v1nfbr _1y2v1nfbq", l = "_15e54s9f _1y2v1nf8w _1y2v1nfa5 _1y2v1nfb4 _1y2v1nfbq _1y2v1nfaz _1y2v1nf6e _1y2v1nf7t _1y2v1nfba _1y2v1nfbg", h = "_15e54s9g", u = "_15e54s9i _1y2v1nfb4 _1y2v1nfbq _1y2v1nfaz _1y2v1nfba _1y2v1nfbg _1y2v1nf6e", p = "_15e54s9m _1y2v1nf6e _1y2v1nf7n _1y2v1nf8w _1y2v1nfa5 _1y2v1nfb4 _1y2v1nfaz _1y2v1nfc8 _1y2v1nfba _1y2v1nfbg _1y2v1nfbr _1y2v1nfbq", q = "_15e54s95", z = "_15e54s9a _15e54s96", k = "_15e54s9b _15e54s96", m = "_15e54s9c _15e54s96", O = "_15e54s94", g = "_15e54s97 _15e54s96", j = "_15e54s99 _15e54s96", M = {
94
+ aspectRatio: "var(--_15e54s9y)"
95
+ };
@@ -10,11 +10,11 @@ export declare const touchableCardOverlayInverse: string;
10
10
  export declare const touchableCardOverlayMedia: string;
11
11
  export declare const mediaCard: string;
12
12
  export declare const mediaCardContent: string;
13
+ export declare const mediaCardIcon: string;
13
14
  export declare const nakedCardContent: string;
14
15
  export declare const dataCard: string;
15
16
  export declare const snapCard: string;
16
17
  export declare const snapCardTouchableHover: string;
17
- export declare const snapCardTouchableHoverTransparent: string;
18
18
  export declare const displayCardContainer: string;
19
19
  export declare const displayCardContent: string;
20
20
  export declare const displayCardBackground: string;
@@ -23,7 +23,6 @@ export declare const cardActionIconButton: string;
23
23
  export declare const cardAction: string;
24
24
  export declare const cardActionInverse: string;
25
25
  export declare const cardActionMedia: string;
26
- export declare const videoAction: string;
27
26
  export declare const vars: {
28
27
  aspectRatio: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
29
28
  };
package/dist/card.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import Tag from './tag';
3
3
  import Image from './image';
4
4
  import Video from './video';
5
+ import type { Variant } from './theme-variant-context';
5
6
  import type { PressHandler } from './touchable';
6
7
  import type { VideoElement, VideoSource } from './video';
7
8
  import type { ButtonLink, ButtonPrimary, ButtonSecondary } from './button';
@@ -10,11 +11,7 @@ import type { DataAttributes, IconProps, RendersElement, RendersNullableElement,
10
11
  export type CardAction = {
11
12
  label: string;
12
13
  onPress: () => void;
13
- Icon?: React.FC<IconProps>;
14
- iconSize?: number;
15
- iconColor?: string;
16
- iconBackground?: string;
17
- iconBackgroundInverse?: string;
14
+ Icon: React.FC<IconProps>;
18
15
  disabled?: boolean;
19
16
  };
20
17
  type CardActionsGroupProps = {
@@ -22,8 +19,10 @@ type CardActionsGroupProps = {
22
19
  onClose?: () => void;
23
20
  type?: 'default' | 'inverse' | 'media';
24
21
  };
22
+ export declare const TOP_ACTION_BUTTON_SIZE = 48;
25
23
  export declare const CardActionsGroup: ({ actions, onClose, type, }: CardActionsGroupProps) => JSX.Element;
26
- type AspectRatio = '1:1' | '16:9' | '7:10' | '9:10' | 'auto';
24
+ export type AspectRatio = '1:1' | '16:9' | '7:10' | '9:10' | 'auto';
25
+ export declare const CardActionSpinner: ({ color }: IconProps) => React.ReactElement;
27
26
  type TouchableProps = {
28
27
  trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
29
28
  } & ExclusifyUnion<{
@@ -39,6 +38,7 @@ type TouchableCard<T> = T & TouchableProps;
39
38
  type MaybeTouchableCard<T> = ExclusifyUnion<TouchableCard<T> | T>;
40
39
  interface MediaCardBaseProps {
41
40
  media: RendersElement<typeof Image> | RendersElement<typeof Video>;
41
+ icon?: React.ReactElement;
42
42
  headline?: string | RendersNullableElement<typeof Tag>;
43
43
  pretitle?: string;
44
44
  pretitleLinesMax?: number;
@@ -90,6 +90,7 @@ interface DataCardBaseProps {
90
90
  descriptionLinesMax?: number;
91
91
  extra?: React.ReactNode;
92
92
  actions?: Array<CardAction>;
93
+ aspectRatio?: AspectRatio | number;
93
94
  children?: void;
94
95
  /** "data-" prefix is automatically added. For example, use "testid" instead of "data-testid" */
95
96
  dataAttributes?: DataAttributes;
@@ -112,6 +113,7 @@ type SnapCardProps = MaybeTouchableCard<{
112
113
  'aria-label'?: string;
113
114
  extra?: React.ReactNode;
114
115
  isInverse?: boolean;
116
+ aspectRatio?: AspectRatio | number;
115
117
  children?: void;
116
118
  }>;
117
119
  export declare const SnapCard: React.ForwardRefExoticComponent<SnapCardProps & React.RefAttributes<HTMLDivElement>>;
@@ -131,9 +133,9 @@ interface CommonDisplayCardProps {
131
133
  description?: string;
132
134
  descriptionLinesMax?: number;
133
135
  'aria-label'?: string;
136
+ aspectRatio?: AspectRatio | number;
134
137
  }
135
138
  type DisplayMediaCardBaseProps = {
136
- aspectRatio?: AspectRatio | number;
137
139
  width?: number | string;
138
140
  height?: number | string;
139
141
  };
@@ -185,6 +187,13 @@ type PosterCardWithVideoProps = Omit<PosterCardBaseProps, 'actions' | 'onClose'>
185
187
  poster?: string;
186
188
  backgroundVideoRef?: React.RefObject<VideoElement>;
187
189
  };
188
- type PosterCardProps = MaybeTouchableCard<ExclusifyUnion<PosterCardWithImageProps | PosterCardWithVideoProps>>;
190
+ type PosterCardWithBackgroundColorProps = PosterCardBaseProps & {
191
+ backgroundColor?: string;
192
+ } & ExclusifyUnion<{
193
+ variant: Variant;
194
+ } | {
195
+ isInverse: boolean;
196
+ }>;
197
+ type PosterCardProps = MaybeTouchableCard<ExclusifyUnion<PosterCardWithImageProps | PosterCardWithVideoProps | PosterCardWithBackgroundColorProps>>;
189
198
  export declare const PosterCard: React.ForwardRefExoticComponent<PosterCardProps & React.RefAttributes<HTMLDivElement>>;
190
199
  export {};