@telefonica/mistica 15.9.0 → 15.11.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 (114) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/boxed.css-mistica.js +35 -2
  3. package/dist/boxed.css.d.ts +29 -0
  4. package/dist/boxed.d.ts +6 -4
  5. package/dist/boxed.js +30 -24
  6. package/dist/button-group.css-mistica.js +14 -5
  7. package/dist/button-group.css.d.ts +3 -0
  8. package/dist/button-group.d.ts +2 -1
  9. package/dist/button-group.js +29 -16
  10. package/dist/button-layout.css-mistica.js +7 -7
  11. package/dist/button-layout.css.d.ts +1 -1
  12. package/dist/button-layout.js +9 -9
  13. package/dist/button.d.ts +4 -24
  14. package/dist/button.js +6 -4
  15. package/dist/card.d.ts +8 -1
  16. package/dist/card.js +567 -501
  17. package/dist/carousel.css-mistica.js +19 -16
  18. package/dist/carousel.css.d.ts +1 -0
  19. package/dist/carousel.js +41 -39
  20. package/dist/chip.js +37 -44
  21. package/dist/circle.d.ts +11 -4
  22. package/dist/circle.js +10 -11
  23. package/dist/community/advanced-data-card.css-mistica.js +24 -21
  24. package/dist/community/advanced-data-card.css.d.ts +1 -0
  25. package/dist/community/advanced-data-card.d.ts +1 -0
  26. package/dist/community/advanced-data-card.js +20 -17
  27. package/dist/counter.js +26 -22
  28. package/dist/cover-hero-media.d.ts +12 -0
  29. package/dist/cover-hero-media.js +44 -0
  30. package/dist/cover-hero.css-mistica.js +56 -0
  31. package/dist/cover-hero.css.d.ts +14 -0
  32. package/dist/cover-hero.css.ts.vanilla.css-mistica.js +11 -0
  33. package/dist/cover-hero.d.ts +38 -0
  34. package/dist/cover-hero.js +296 -0
  35. package/dist/empty-state.js +6 -6
  36. package/dist/grid-layout.css-mistica.js +11 -8
  37. package/dist/grid-layout.css.d.ts +1 -0
  38. package/dist/grid-layout.d.ts +12 -22
  39. package/dist/grid-layout.js +63 -49
  40. package/dist/header.js +18 -18
  41. package/dist/highlighted-card.d.ts +1 -0
  42. package/dist/highlighted-card.js +22 -18
  43. package/dist/icon-button.d.ts +7 -6
  44. package/dist/image.js +69 -48
  45. package/dist/index.d.ts +4 -1
  46. package/dist/index.js +15 -0
  47. package/dist/list.d.ts +1 -0
  48. package/dist/navigation-bar.d.ts +1 -1
  49. package/dist/navigation-bar.js +1 -1
  50. package/dist/package-version.js +1 -1
  51. package/dist/select.js +16 -12
  52. package/dist/skins/movistar.d.ts +13 -0
  53. package/dist/skins/movistar.js +112 -99
  54. package/dist/spinner.js +19 -18
  55. package/dist/table.css-mistica.js +58 -0
  56. package/dist/table.css.d.ts +13 -0
  57. package/dist/table.css.ts.vanilla.css-mistica.js +11 -0
  58. package/dist/table.d.ts +39 -0
  59. package/dist/table.js +269 -0
  60. package/dist/text.d.ts +1 -1
  61. package/dist/theme.d.ts +20 -0
  62. package/dist/theme.js +80 -20
  63. package/dist/timer.css-mistica.js +39 -0
  64. package/dist/timer.css.d.ts +8 -0
  65. package/dist/timer.css.ts.vanilla.css-mistica.js +11 -0
  66. package/dist/timer.d.ts +27 -0
  67. package/dist/timer.js +370 -0
  68. package/dist/tooltip.js +13 -13
  69. package/dist/touchable.d.ts +2 -0
  70. package/dist/touchable.js +35 -31
  71. package/dist/utils/helpers.js +32 -32
  72. package/dist-es/boxed.css-mistica.js +29 -2
  73. package/dist-es/boxed.js +37 -31
  74. package/dist-es/button-group.css-mistica.js +2 -2
  75. package/dist-es/button-group.js +37 -24
  76. package/dist-es/button-layout.css-mistica.js +2 -2
  77. package/dist-es/button-layout.js +16 -16
  78. package/dist-es/button.js +24 -22
  79. package/dist-es/card.js +681 -618
  80. package/dist-es/carousel.css-mistica.js +7 -7
  81. package/dist-es/carousel.js +75 -73
  82. package/dist-es/chip.js +57 -64
  83. package/dist-es/circle.js +15 -16
  84. package/dist-es/community/advanced-data-card.css-mistica.js +4 -4
  85. package/dist-es/community/advanced-data-card.js +59 -56
  86. package/dist-es/counter.js +62 -58
  87. package/dist-es/cover-hero-media.js +30 -0
  88. package/dist-es/cover-hero.css-mistica.js +9 -0
  89. package/dist-es/cover-hero.css.ts.vanilla.css-mistica.js +2 -0
  90. package/dist-es/cover-hero.js +241 -0
  91. package/dist-es/empty-state.js +13 -13
  92. package/dist-es/grid-layout.css-mistica.js +3 -3
  93. package/dist-es/grid-layout.js +80 -66
  94. package/dist-es/header.js +37 -37
  95. package/dist-es/highlighted-card.js +35 -31
  96. package/dist-es/image.js +88 -67
  97. package/dist-es/index.js +1817 -1814
  98. package/dist-es/navigation-bar.js +1 -1
  99. package/dist-es/package-version.js +1 -1
  100. package/dist-es/select.js +23 -18
  101. package/dist-es/skins/movistar.js +112 -99
  102. package/dist-es/spinner.js +38 -37
  103. package/dist-es/style.css +1 -1
  104. package/dist-es/table.css-mistica.js +14 -0
  105. package/dist-es/table.css.ts.vanilla.css-mistica.js +2 -0
  106. package/dist-es/table.js +214 -0
  107. package/dist-es/theme.js +77 -17
  108. package/dist-es/timer.css-mistica.js +4 -0
  109. package/dist-es/timer.css.ts.vanilla.css-mistica.js +2 -0
  110. package/dist-es/timer.js +307 -0
  111. package/dist-es/tooltip.js +16 -16
  112. package/dist-es/touchable.js +47 -43
  113. package/dist-es/utils/helpers.js +31 -31
  114. package/package.json +1 -1
package/dist/boxed.js CHANGED
@@ -11,10 +11,10 @@ function _export(target, all) {
11
11
  }
12
12
  _export(exports, {
13
13
  Boxed: function() {
14
- return N;
14
+ return J;
15
15
  },
16
16
  InternalBoxed: function() {
17
- return C;
17
+ return A;
18
18
  }
19
19
  });
20
20
  const _jsxruntime = require("react/jsx-runtime");
@@ -25,6 +25,7 @@ const _dom = require("./utils/dom.js");
25
25
  const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
26
26
  const _boxedcssmistica = require("./boxed.css-mistica.js");
27
27
  const _sprinklescssmistica = require("./sprinkles.css-mistica.js");
28
+ const _css = require("./utils/css.js");
28
29
  function _interop_require_default(obj) {
29
30
  return obj && obj.__esModule ? obj : {
30
31
  default: obj
@@ -123,36 +124,41 @@ function _object_spread_props(target, source) {
123
124
  }
124
125
  return target;
125
126
  }
126
- const w = (e, r)=>e || r ? (0, _sprinklescssmistica.sprinkles)({
127
+ const z = (o, r)=>o || r ? (0, _sprinklescssmistica.sprinkles)({
127
128
  border: "none"
128
- }) : _boxedcssmistica.boxBorder, C = /*#__PURE__*/ _react.forwardRef((param, g)=>{
129
- let { children: e, isInverse: r = !1, className: l, role: d, dataAttributes: m, "aria-label": b, "aria-labelledby": f, width: c, height: p, minHeight: u, borderRadius: x = _skincontractcssmistica.vars.borderRadii.container, background: t, desktopOnly: v } = param;
130
- const n = (0, _themevariantcontext.useIsInverseVariant)();
129
+ }) : _boxedcssmistica.boxBorder, s = (o)=>typeof o == "number" ? `${o}px` : o !== null && o !== void 0 ? o : "initial", e = (o, r)=>{
130
+ if (typeof r == "number" || typeof r == "string" || typeof r > "u") return {
131
+ [_boxedcssmistica.vars[o]]: s(r)
132
+ };
133
+ const t = {
134
+ [_boxedcssmistica.vars.mobile[o]]: s(r.mobile),
135
+ [_boxedcssmistica.vars.desktop[o]]: s(r.desktop)
136
+ };
137
+ return r.tablet && (t[_boxedcssmistica.vars.tablet[o]] = s(r.tablet)), t;
138
+ }, A = /*#__PURE__*/ _react.forwardRef((param, w)=>{
139
+ let { children: o, isInverse: r = !1, className: t, role: p, dataAttributes: b, "aria-label": c, "aria-labelledby": y, width: h, maxWidth: x, minWidth: g, height: k, minHeight: u, borderRadius: B = _skincontractcssmistica.vars.borderRadii.container, background: d, desktopOnly: C } = param;
140
+ const m = (0, _themevariantcontext.useIsInverseVariant)();
131
141
  return /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
132
- ref: g,
133
- style: {
134
- width: c,
135
- height: p,
136
- minHeight: u,
137
- boxSizing: "border-box",
138
- background: t
139
- },
140
- className: (0, _classnames.default)(l, w(n, r), (0, _sprinklescssmistica.sprinkles)({
141
- borderRadius: x,
142
+ ref: w,
143
+ style: _object_spread_props(_object_spread({}, (0, _css.applyCssVars)(_object_spread({}, e("width", h), e("maxWidth", x), e("minWidth", g), e("height", k), e("minHeight", u)))), {
144
+ background: d
145
+ }),
146
+ className: (0, _classnames.default)(t, _boxedcssmistica.boxed, z(m, r), (0, _sprinklescssmistica.sprinkles)({
147
+ borderRadius: B,
142
148
  overflow: "hidden",
143
- background: (t !== null && t !== void 0 ? t : r) ? n ? _skincontractcssmistica.vars.colors.backgroundContainerBrandOverInverse : _skincontractcssmistica.vars.colors.backgroundContainerBrand : _skincontractcssmistica.vars.colors.backgroundContainer
149
+ background: (d !== null && d !== void 0 ? d : r) ? m ? _skincontractcssmistica.vars.colors.backgroundContainerBrandOverInverse : _skincontractcssmistica.vars.colors.backgroundContainerBrand : _skincontractcssmistica.vars.colors.backgroundContainer
144
150
  }), {
145
- [_boxedcssmistica.desktopOnly]: v
151
+ [_boxedcssmistica.desktopOnly]: C
146
152
  }),
147
- role: d,
148
- "aria-label": b,
149
- "aria-labelledby": f
150
- }, (0, _dom.getPrefixedDataAttributes)(m)), {
153
+ role: p,
154
+ "aria-label": c,
155
+ "aria-labelledby": y
156
+ }, (0, _dom.getPrefixedDataAttributes)(b)), {
151
157
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
152
158
  isInverse: r,
153
- children: e
159
+ children: o
154
160
  })
155
161
  }));
156
- }), N = /*#__PURE__*/ _react.forwardRef((e, r)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(C, _object_spread_props(_object_spread({}, e), {
162
+ }), J = /*#__PURE__*/ _react.forwardRef((o, r)=>/* @__PURE__ */ (0, _jsxruntime.jsx)(A, _object_spread_props(_object_spread({}, o), {
157
163
  ref: r
158
164
  })));
@@ -10,18 +10,27 @@ function _export(target, all) {
10
10
  }
11
11
  _export(exports, {
12
12
  buttonChild: function() {
13
- return h;
13
+ return r;
14
14
  },
15
15
  buttons: function() {
16
- return r;
16
+ return t;
17
+ },
18
+ centerInDesktop: function() {
19
+ return e;
20
+ },
21
+ centerInMobile: function() {
22
+ return h;
23
+ },
24
+ centerInTablet: function() {
25
+ return v;
17
26
  },
18
27
  container: function() {
19
- return t;
28
+ return _;
20
29
  },
21
30
  inline: function() {
22
- return v;
31
+ return a;
23
32
  }
24
33
  });
25
34
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
26
35
  require("./button-group.css.ts.vanilla.css-mistica.js");
27
- var h = "_1xdd1h64", r = "_1xdd1h63", t = "_1xdd1h62", v = "_1xdd1h61 _1y2v1nfhl _1y2v1nfhz _1y2v1nfhp";
36
+ var r = "_1xdd1h67", t = "_1xdd1h66", e = "_1xdd1h64", h = "_1xdd1h62", v = "_1xdd1h63", _ = "_1xdd1h65", a = "_1xdd1h61 _1y2v1nfhl _1y2v1nfhz _1y2v1nfhp";
@@ -1,4 +1,7 @@
1
1
  export declare const inline: string;
2
+ export declare const centerInMobile: string;
3
+ export declare const centerInTablet: string;
4
+ export declare const centerInDesktop: string;
2
5
  export declare const container: string;
3
6
  export declare const buttons: string;
4
7
  export declare const buttonChild: string;
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import type { ButtonLink, ButtonPrimary, ButtonSecondary } from './button';
3
- import type { DataAttributes, RendersNullableElement } from './utils/types';
3
+ import type { ByBreakpoint, DataAttributes, RendersNullableElement } from './utils/types';
4
4
  export interface ButtonGroupProps {
5
5
  primaryButton?: RendersNullableElement<typeof ButtonPrimary>;
6
6
  secondaryButton?: RendersNullableElement<typeof ButtonSecondary>;
7
7
  link?: RendersNullableElement<typeof ButtonLink>;
8
8
  dataAttributes?: DataAttributes;
9
+ align?: ByBreakpoint<'center' | 'left'>;
9
10
  }
10
11
  declare const ButtonGroup: React.FC<ButtonGroupProps>;
11
12
  export default ButtonGroup;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
7
  get: function() {
8
- return x;
8
+ return A;
9
9
  }
10
10
  });
11
11
  const _jsxruntime = require("react/jsx-runtime");
@@ -69,33 +69,46 @@ function _object_spread_props(target, source) {
69
69
  }
70
70
  return target;
71
71
  }
72
- const u = (param)=>{
73
- let { primaryButton: s, secondaryButton: t, link: e, dataAttributes: d } = param;
74
- const m = !!s || !!t || !!e, n = !!s && !!t;
75
- return m ? /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
76
- className: (0, _classnames.default)(_buttongroupcssmistica.inline, _buttongroupcssmistica.container)
77
- }, (0, _dom.getPrefixedDataAttributes)(d, "ButtonGroup")), {
72
+ const k = (param)=>{
73
+ let { primaryButton: t, secondaryButton: o, link: s, align: e = "left", dataAttributes: m } = param;
74
+ var _e_mobile, _e_tablet, _ref, _e_desktop;
75
+ const d = !!t || !!o || !!s, a = !!t && !!o, l = typeof e == "string" ? {
76
+ mobile: e,
77
+ tablet: e,
78
+ desktop: e
79
+ } : {
80
+ mobile: (_e_mobile = e.mobile) !== null && _e_mobile !== void 0 ? _e_mobile : "left",
81
+ tablet: (_ref = (_e_tablet = e.tablet) !== null && _e_tablet !== void 0 ? _e_tablet : e.mobile) !== null && _ref !== void 0 ? _ref : "left",
82
+ desktop: (_e_desktop = e.desktop) !== null && _e_desktop !== void 0 ? _e_desktop : "left"
83
+ };
84
+ return d ? /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", _object_spread_props(_object_spread({
85
+ className: (0, _classnames.default)(_buttongroupcssmistica.inline, _buttongroupcssmistica.container, {
86
+ [_buttongroupcssmistica.centerInDesktop]: l.desktop === "center",
87
+ [_buttongroupcssmistica.centerInTablet]: l.tablet === "center",
88
+ [_buttongroupcssmistica.centerInMobile]: l.mobile === "center"
89
+ })
90
+ }, (0, _dom.getPrefixedDataAttributes)(m, "ButtonGroup")), {
78
91
  children: [
79
- (s || t) && /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
92
+ (t || o) && /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
80
93
  className: (0, _classnames.default)(_buttongroupcssmistica.inline, _buttongroupcssmistica.buttons),
81
94
  children: [
82
- s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
83
- className: _buttongroupcssmistica.buttonChild,
84
- children: s
85
- }),
86
95
  t && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
87
96
  className: _buttongroupcssmistica.buttonChild,
88
97
  children: t
98
+ }),
99
+ o && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
100
+ className: _buttongroupcssmistica.buttonChild,
101
+ children: o
89
102
  })
90
103
  ]
91
104
  }),
92
- e && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
105
+ s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
93
106
  className: _buttongroupcssmistica.buttonChild,
94
107
  style: {
95
- width: n ? "100%" : "auto"
108
+ width: a ? "100%" : "auto"
96
109
  },
97
- children: e
110
+ children: s
98
111
  })
99
112
  ]
100
113
  })) : null;
101
- }, x = u;
114
+ }, A = k;
@@ -13,19 +13,19 @@ _export(exports, {
13
13
  return y;
14
14
  },
15
15
  container: function() {
16
- return t;
17
- },
18
- containerWithTwoButtons: function() {
19
16
  return l;
20
17
  },
21
- link: function() {
18
+ containerWithTwoButtons: function() {
22
19
  return i;
23
20
  },
24
- linkWithTwoButtons: function() {
21
+ link: function() {
25
22
  return k;
26
23
  },
27
- margins: function() {
24
+ linkInNewLine: function() {
28
25
  return r;
26
+ },
27
+ margins: function() {
28
+ return t;
29
29
  }
30
30
  });
31
31
  require("./sprinkles.css.ts.vanilla.css-mistica.js");
@@ -36,4 +36,4 @@ var y = {
36
36
  left: "kfxylh9 _1y2v1nfhs",
37
37
  center: "kfxylha _1y2v1nfht",
38
38
  "full-width": "kfxylhb _1y2v1nfht"
39
- }, t = "kfxylh2 _1y2v1nfhk _1y2v1nfhz", l = "kfxylh3", i = "kfxylhe kfxylhd _1y2v1nfhk _1y2v1nfi7", k = "kfxylhf kfxylhd _1y2v1nfhk _1y2v1nfi7", r = "kfxylh0";
39
+ }, l = "kfxylh2 _1y2v1nfhk _1y2v1nfhz", i = "kfxylh3", k = "kfxylhe kfxylhd _1y2v1nfhk _1y2v1nfi7", r = "kfxylhf kfxylhd _1y2v1nfhk _1y2v1nfi7", t = "kfxylh0";
@@ -3,4 +3,4 @@ export declare const container: string;
3
3
  export declare const containerWithTwoButtons: string;
4
4
  export declare const alignVariant: Record<"left" | "right" | "center" | "full-width", string>;
5
5
  export declare const link: string;
6
- export declare const linkWithTwoButtons: string;
6
+ export declare const linkInNewLine: string;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function() {
9
- return q;
9
+ return W;
10
10
  }
11
11
  });
12
12
  const _jsxruntime = require("react/jsx-runtime");
@@ -122,7 +122,7 @@ const p = [
122
122
  const l = _react.Children.toArray(r).sort((b, k)=>{
123
123
  const f = p.indexOf(b.type), h = p.indexOf(k.type);
124
124
  return t === "right" ? h - f : f - h;
125
- }), i = r ? l.length : (e ? 1 : 0) + (s ? 1 : 0), u = r ? l : t === "right" ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
125
+ }), i = r ? l.length : (e ? 1 : 0) + (s ? 1 : 0), m = r ? l : t === "right" ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
126
126
  children: [
127
127
  s,
128
128
  e
@@ -132,8 +132,8 @@ const p = [
132
132
  e,
133
133
  s
134
134
  ]
135
- }), m = c ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
136
- className: (0, _classnames.default)(i > 1 ? _buttonlayoutcssmistica.linkWithTwoButtons : _buttonlayoutcssmistica.link),
135
+ }), u = c ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
136
+ className: (0, _classnames.default)(i !== 1 ? _buttonlayoutcssmistica.linkInNewLine : _buttonlayoutcssmistica.link),
137
137
  "data-link": "true",
138
138
  children: c
139
139
  }) : null, d = /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
@@ -143,13 +143,13 @@ const p = [
143
143
  }, (0, _dom.getPrefixedDataAttributes)(B, "ButtonLayout")), {
144
144
  children: t !== "right" || i > 1 ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
145
145
  children: [
146
- u,
147
- m
146
+ m,
147
+ u
148
148
  ]
149
149
  }) : /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
150
150
  children: [
151
- m,
152
- u
151
+ u,
152
+ m
153
153
  ]
154
154
  })
155
155
  }));
@@ -157,4 +157,4 @@ const p = [
157
157
  className: _buttonlayoutcssmistica.margins,
158
158
  children: d
159
159
  }) : d;
160
- }, q = R;
160
+ }, W = R;
package/dist/button.d.ts CHANGED
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import type { TouchableElement } from './touchable';
3
3
  import type { DataAttributes, IconProps, RendersElement, RendersNullableElement, TrackingEvent } from './utils/types';
4
4
  import type { Location } from 'history';
5
+ import type { ExclusifyUnion } from './utils/utility-types';
5
6
  interface CommonProps {
6
7
  children: React.ReactNode;
7
8
  className?: string;
@@ -26,48 +27,26 @@ interface CommonProps {
26
27
  }
27
28
  export interface ToButtonProps extends CommonProps {
28
29
  to: string | Location;
30
+ newTab?: boolean;
29
31
  fullPageOnWebView?: boolean;
30
- submit?: undefined;
31
- fake?: undefined;
32
- onPress?: undefined;
33
- href?: undefined;
34
32
  onNavigate?: () => void | Promise<void>;
35
33
  }
36
34
  export interface OnPressButtonProps extends CommonProps {
37
35
  onPress: (event: React.MouseEvent<HTMLElement>) => void | undefined | Promise<void>;
38
- submit?: undefined;
39
- fake?: undefined;
40
- to?: undefined;
41
- href?: undefined;
42
- onNavigate?: undefined;
43
36
  }
44
37
  export interface HrefButtonProps extends CommonProps {
45
38
  href: string;
46
39
  newTab?: boolean;
47
40
  loadOnTop?: boolean;
48
- submit?: undefined;
49
- fake?: undefined;
50
- onPress?: undefined;
51
- to?: undefined;
52
41
  onNavigate?: () => void | Promise<void>;
53
42
  }
54
43
  export interface FakeButtonProps extends CommonProps {
55
44
  fake: true;
56
- submit?: undefined;
57
- onPress?: undefined;
58
- to?: undefined;
59
- href?: undefined;
60
- onNavigate?: undefined;
61
45
  }
62
46
  export interface SubmitButtonProps extends CommonProps {
63
47
  submit: true;
64
- to?: undefined;
65
- fake?: undefined;
66
- onPress?: undefined;
67
- href?: undefined;
68
- onNavigate?: undefined;
69
48
  }
70
- export type ButtonProps = FakeButtonProps | SubmitButtonProps | ToButtonProps | OnPressButtonProps | HrefButtonProps;
49
+ export type ButtonProps = ExclusifyUnion<FakeButtonProps | SubmitButtonProps | ToButtonProps | OnPressButtonProps | HrefButtonProps>;
71
50
  interface ButtonLinkCommonProps {
72
51
  children: React.ReactNode;
73
52
  disabled?: boolean;
@@ -104,6 +83,7 @@ interface ButtonLinkHrefProps extends ButtonLinkCommonProps {
104
83
  }
105
84
  interface ButtonLinkToProps extends ButtonLinkCommonProps {
106
85
  to: string;
86
+ newTab?: boolean;
107
87
  fullPageOnWebView?: boolean;
108
88
  onPress?: undefined;
109
89
  href?: undefined;
package/dist/button.js CHANGED
@@ -20,10 +20,10 @@ _export(exports, {
20
20
  return Be;
21
21
  },
22
22
  ButtonPrimary: function() {
23
- return Ae;
23
+ return Te;
24
24
  },
25
25
  ButtonSecondary: function() {
26
- return Te;
26
+ return Ae;
27
27
  }
28
28
  });
29
29
  const _jsxruntime = require("react/jsx-runtime");
@@ -396,6 +396,7 @@ const k = (param)=>{
396
396
  }));
397
397
  if (e.to || e.to === "") return /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({}, b), {
398
398
  to: e.to,
399
+ newTab: e.newTab,
399
400
  fullPageOnWebView: e.fullPageOnWebView,
400
401
  onNavigate: e.onNavigate
401
402
  }));
@@ -484,6 +485,7 @@ const k = (param)=>{
484
485
  ref: i
485
486
  }, y), {
486
487
  to: t.to,
488
+ newTab: t.newTab,
487
489
  fullPageOnWebView: t.fullPageOnWebView,
488
490
  onNavigate: t.onNavigate
489
491
  }));
@@ -521,7 +523,7 @@ const k = (param)=>{
521
523
  ref: i,
522
524
  type: "danger"
523
525
  }));
524
- }), Ae = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
526
+ }), Te = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
525
527
  var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
526
528
  "dataAttributes"
527
529
  ]);
@@ -533,7 +535,7 @@ const k = (param)=>{
533
535
  ref: i,
534
536
  type: "primary"
535
537
  }));
536
- }), Te = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
538
+ }), Ae = /*#__PURE__*/ _react.forwardRef((_param, i)=>{
537
539
  var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
538
540
  "dataAttributes"
539
541
  ]);
package/dist/card.d.ts CHANGED
@@ -17,6 +17,7 @@ type IconButtonAction = BaseIconButtonAction & ExclusifyUnion<{
17
17
  newTab?: boolean;
18
18
  } | {
19
19
  to: string;
20
+ newTab?: boolean;
20
21
  fullPageOnWebView?: boolean;
21
22
  replace?: boolean;
22
23
  } | {
@@ -43,6 +44,10 @@ export declare const CardActionIconButton: (props: CardAction) => JSX.Element;
43
44
  export declare const CardActionsGroup: ({ actions, padding, onClose, type, }: CardActionsGroupProps) => JSX.Element;
44
45
  export type AspectRatio = '1:1' | '16:9' | '7:10' | '9:10' | 'auto';
45
46
  export declare const CardActionSpinner: ({ color }: IconProps) => React.ReactElement;
47
+ export declare const useVideoWithControls: (videoSrc?: VideoSource, poster?: string, videoRef?: React.RefObject<VideoElement>) => {
48
+ video?: React.ReactNode;
49
+ videoAction?: CardAction | undefined;
50
+ };
46
51
  type TouchableProps = {
47
52
  trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
48
53
  } & ExclusifyUnion<{
@@ -52,6 +57,7 @@ type TouchableProps = {
52
57
  onNavigate?: () => void | Promise<void>;
53
58
  } | {
54
59
  to: string | undefined;
60
+ newTab?: boolean;
55
61
  fullPageOnWebView?: boolean;
56
62
  replace?: boolean;
57
63
  onNavigate?: () => void | Promise<void>;
@@ -165,6 +171,7 @@ interface CommonDisplayCardProps {
165
171
  descriptionLinesMax?: number;
166
172
  'aria-label'?: string;
167
173
  aspectRatio?: AspectRatio | number;
174
+ extra?: React.ReactNode;
168
175
  }
169
176
  type DisplayMediaCardBaseProps = {
170
177
  width?: number | string;
@@ -184,7 +191,6 @@ type DisplayMediaCardProps = DisplayMediaCardBaseProps & ExclusifyUnion<DisplayM
184
191
  buttonLink?: React.ReactComponentElement<typeof ButtonLink>;
185
192
  }>;
186
193
  type DisplayDataCardProps = CommonDisplayCardProps & {
187
- extra?: React.ReactNode;
188
194
  isInverse?: boolean;
189
195
  } & ExclusifyUnion<TouchableProps | {
190
196
  button?: React.ReactComponentElement<typeof ButtonPrimary>;
@@ -214,6 +220,7 @@ interface PosterCardBaseProps {
214
220
  subtitleLinesMax?: number;
215
221
  description?: string;
216
222
  descriptionLinesMax?: number;
223
+ extra?: React.ReactNode;
217
224
  }
218
225
  interface PosterCardWithImageProps extends PosterCardBaseProps {
219
226
  backgroundImage: string;