@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.
- package/css/mistica.css +1 -1
- package/dist/boxed.css-mistica.js +35 -2
- package/dist/boxed.css.d.ts +29 -0
- package/dist/boxed.d.ts +6 -4
- package/dist/boxed.js +30 -24
- package/dist/button-group.css-mistica.js +14 -5
- package/dist/button-group.css.d.ts +3 -0
- package/dist/button-group.d.ts +2 -1
- package/dist/button-group.js +29 -16
- package/dist/button-layout.css-mistica.js +7 -7
- package/dist/button-layout.css.d.ts +1 -1
- package/dist/button-layout.js +9 -9
- package/dist/button.d.ts +4 -24
- package/dist/button.js +6 -4
- package/dist/card.d.ts +8 -1
- package/dist/card.js +567 -501
- package/dist/carousel.css-mistica.js +19 -16
- package/dist/carousel.css.d.ts +1 -0
- package/dist/carousel.js +41 -39
- package/dist/chip.js +37 -44
- package/dist/circle.d.ts +11 -4
- package/dist/circle.js +10 -11
- package/dist/community/advanced-data-card.css-mistica.js +24 -21
- package/dist/community/advanced-data-card.css.d.ts +1 -0
- package/dist/community/advanced-data-card.d.ts +1 -0
- package/dist/community/advanced-data-card.js +20 -17
- package/dist/counter.js +26 -22
- package/dist/cover-hero-media.d.ts +12 -0
- package/dist/cover-hero-media.js +44 -0
- package/dist/cover-hero.css-mistica.js +56 -0
- package/dist/cover-hero.css.d.ts +14 -0
- package/dist/cover-hero.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/cover-hero.d.ts +38 -0
- package/dist/cover-hero.js +296 -0
- package/dist/empty-state.js +6 -6
- package/dist/grid-layout.css-mistica.js +11 -8
- package/dist/grid-layout.css.d.ts +1 -0
- package/dist/grid-layout.d.ts +12 -22
- package/dist/grid-layout.js +63 -49
- package/dist/header.js +18 -18
- package/dist/highlighted-card.d.ts +1 -0
- package/dist/highlighted-card.js +22 -18
- package/dist/icon-button.d.ts +7 -6
- package/dist/image.js +69 -48
- package/dist/index.d.ts +4 -1
- package/dist/index.js +15 -0
- package/dist/list.d.ts +1 -0
- package/dist/navigation-bar.d.ts +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/package-version.js +1 -1
- package/dist/select.js +16 -12
- package/dist/skins/movistar.d.ts +13 -0
- package/dist/skins/movistar.js +112 -99
- package/dist/spinner.js +19 -18
- package/dist/table.css-mistica.js +58 -0
- package/dist/table.css.d.ts +13 -0
- package/dist/table.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/table.d.ts +39 -0
- package/dist/table.js +269 -0
- package/dist/text.d.ts +1 -1
- package/dist/theme.d.ts +20 -0
- package/dist/theme.js +80 -20
- package/dist/timer.css-mistica.js +39 -0
- package/dist/timer.css.d.ts +8 -0
- package/dist/timer.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/timer.d.ts +27 -0
- package/dist/timer.js +370 -0
- package/dist/tooltip.js +13 -13
- package/dist/touchable.d.ts +2 -0
- package/dist/touchable.js +35 -31
- package/dist/utils/helpers.js +32 -32
- package/dist-es/boxed.css-mistica.js +29 -2
- package/dist-es/boxed.js +37 -31
- package/dist-es/button-group.css-mistica.js +2 -2
- package/dist-es/button-group.js +37 -24
- package/dist-es/button-layout.css-mistica.js +2 -2
- package/dist-es/button-layout.js +16 -16
- package/dist-es/button.js +24 -22
- package/dist-es/card.js +681 -618
- package/dist-es/carousel.css-mistica.js +7 -7
- package/dist-es/carousel.js +75 -73
- package/dist-es/chip.js +57 -64
- package/dist-es/circle.js +15 -16
- package/dist-es/community/advanced-data-card.css-mistica.js +4 -4
- package/dist-es/community/advanced-data-card.js +59 -56
- package/dist-es/counter.js +62 -58
- package/dist-es/cover-hero-media.js +30 -0
- package/dist-es/cover-hero.css-mistica.js +9 -0
- package/dist-es/cover-hero.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/cover-hero.js +241 -0
- package/dist-es/empty-state.js +13 -13
- package/dist-es/grid-layout.css-mistica.js +3 -3
- package/dist-es/grid-layout.js +80 -66
- package/dist-es/header.js +37 -37
- package/dist-es/highlighted-card.js +35 -31
- package/dist-es/image.js +88 -67
- package/dist-es/index.js +1817 -1814
- package/dist-es/navigation-bar.js +1 -1
- package/dist-es/package-version.js +1 -1
- package/dist-es/select.js +23 -18
- package/dist-es/skins/movistar.js +112 -99
- package/dist-es/spinner.js +38 -37
- package/dist-es/style.css +1 -1
- package/dist-es/table.css-mistica.js +14 -0
- package/dist-es/table.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/table.js +214 -0
- package/dist-es/theme.js +77 -17
- package/dist-es/timer.css-mistica.js +4 -0
- package/dist-es/timer.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/timer.js +307 -0
- package/dist-es/tooltip.js +16 -16
- package/dist-es/touchable.js +47 -43
- package/dist-es/utils/helpers.js +31 -31
- 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
|
|
14
|
+
return J;
|
|
15
15
|
},
|
|
16
16
|
InternalBoxed: function() {
|
|
17
|
-
return
|
|
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
|
|
127
|
+
const z = (o, r)=>o || r ? (0, _sprinklescssmistica.sprinkles)({
|
|
127
128
|
border: "none"
|
|
128
|
-
}) : _boxedcssmistica.boxBorder,
|
|
129
|
-
|
|
130
|
-
|
|
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:
|
|
133
|
-
style: {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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: (
|
|
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]:
|
|
151
|
+
[_boxedcssmistica.desktopOnly]: C
|
|
146
152
|
}),
|
|
147
|
-
role:
|
|
148
|
-
"aria-label":
|
|
149
|
-
"aria-labelledby":
|
|
150
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
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:
|
|
159
|
+
children: o
|
|
154
160
|
})
|
|
155
161
|
}));
|
|
156
|
-
}),
|
|
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
|
|
13
|
+
return r;
|
|
14
14
|
},
|
|
15
15
|
buttons: function() {
|
|
16
|
-
return
|
|
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
|
|
28
|
+
return _;
|
|
20
29
|
},
|
|
21
30
|
inline: function() {
|
|
22
|
-
return
|
|
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
|
|
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;
|
package/dist/button-group.d.ts
CHANGED
|
@@ -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;
|
package/dist/button-group.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: function() {
|
|
8
|
-
return
|
|
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
|
|
73
|
-
let { primaryButton:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
(
|
|
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
|
-
|
|
105
|
+
s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
93
106
|
className: _buttongroupcssmistica.buttonChild,
|
|
94
107
|
style: {
|
|
95
|
-
width:
|
|
108
|
+
width: a ? "100%" : "auto"
|
|
96
109
|
},
|
|
97
|
-
children:
|
|
110
|
+
children: s
|
|
98
111
|
})
|
|
99
112
|
]
|
|
100
113
|
})) : null;
|
|
101
|
-
},
|
|
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
|
-
|
|
18
|
+
containerWithTwoButtons: function() {
|
|
22
19
|
return i;
|
|
23
20
|
},
|
|
24
|
-
|
|
21
|
+
link: function() {
|
|
25
22
|
return k;
|
|
26
23
|
},
|
|
27
|
-
|
|
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
|
-
},
|
|
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
|
|
6
|
+
export declare const linkInNewLine: string;
|
package/dist/button-layout.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function() {
|
|
9
|
-
return
|
|
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),
|
|
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
|
-
}),
|
|
136
|
-
className: (0, _classnames.default)(i
|
|
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
|
-
|
|
147
|
-
|
|
146
|
+
m,
|
|
147
|
+
u
|
|
148
148
|
]
|
|
149
149
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
150
150
|
children: [
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
},
|
|
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
|
|
23
|
+
return Te;
|
|
24
24
|
},
|
|
25
25
|
ButtonSecondary: function() {
|
|
26
|
-
return
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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;
|