@telefonica/mistica 16.5.0 → 16.6.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/callout.js +27 -15
- package/dist/card.css-mistica.js +5 -5
- package/dist/card.d.ts +9 -1
- package/dist/card.js +611 -475
- package/dist/community/advanced-data-card.css-mistica.js +14 -11
- package/dist/community/advanced-data-card.css.d.ts +1 -0
- package/dist/community/advanced-data-card.d.ts +1 -1
- package/dist/community/advanced-data-card.js +172 -85
- package/dist/cover-hero.css-mistica.js +14 -11
- package/dist/cover-hero.css.d.ts +1 -0
- package/dist/cover-hero.d.ts +1 -0
- package/dist/cover-hero.js +101 -59
- package/dist/empty-state.js +24 -15
- package/dist/header.css-mistica.js +6 -3
- package/dist/header.css.d.ts +1 -0
- package/dist/header.d.ts +3 -2
- package/dist/header.js +148 -79
- package/dist/hero.css-mistica.js +11 -8
- package/dist/hero.css.d.ts +1 -0
- package/dist/hero.d.ts +2 -1
- package/dist/hero.js +102 -68
- package/dist/highlighted-card.js +32 -23
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/maybe-dismissable.js +8 -5
- package/dist/meter.d.ts +23 -0
- package/dist/meter.js +400 -0
- package/dist/package-version.js +1 -1
- package/dist/sheet-common.css-mistica.js +16 -10
- package/dist/sheet-common.css.d.ts +3 -1
- package/dist/sheet-common.js +78 -70
- package/dist/sheet-info.css-mistica.js +15 -4
- package/dist/sheet-info.css.d.ts +2 -0
- package/dist/sheet-info.d.ts +3 -0
- package/dist/sheet-info.js +61 -43
- package/dist/sheet-native.js +59 -48
- package/dist/sheet-types.d.ts +6 -1
- package/dist/sheet-web.js +6 -4
- package/dist/text-tokens.d.ts +10 -0
- package/dist/text-tokens.js +54 -38
- package/dist/theme-context-provider.js +60 -50
- package/dist/theme.d.ts +3 -2
- package/dist/utils/headings.d.ts +2 -0
- package/dist/utils/headings.js +11 -0
- package/dist/utils/types.d.ts +1 -0
- package/dist-es/callout.js +55 -43
- package/dist-es/card.css-mistica.js +2 -2
- package/dist-es/card.js +721 -588
- package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
- package/dist-es/community/advanced-data-card.js +217 -130
- package/dist-es/cover-hero.css-mistica.js +3 -3
- package/dist-es/cover-hero.js +132 -90
- package/dist-es/empty-state.js +40 -31
- package/dist-es/header.css-mistica.js +2 -2
- package/dist-es/header.js +174 -104
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +150 -115
- package/dist-es/highlighted-card.js +36 -27
- package/dist-es/index.js +1839 -1838
- package/dist-es/maybe-dismissable.js +17 -14
- package/dist-es/meter.js +346 -0
- package/dist-es/package-version.js +1 -1
- package/dist-es/sheet-common.css-mistica.js +2 -2
- package/dist-es/sheet-common.js +124 -116
- package/dist-es/sheet-info.css-mistica.js +2 -2
- package/dist-es/sheet-info.js +74 -56
- package/dist-es/sheet-native.js +59 -48
- package/dist-es/sheet-web.js +10 -8
- package/dist-es/style.css +1 -1
- package/dist-es/text-tokens.js +30 -20
- package/dist-es/theme-context-provider.js +88 -78
- package/dist-es/utils/headings.js +2 -0
- package/package.json +2 -1
package/dist/callout.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 at;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -84,22 +84,25 @@ function _object_spread_props(target, source) {
|
|
|
84
84
|
return target;
|
|
85
85
|
}
|
|
86
86
|
const W = (param)=>{
|
|
87
|
-
let { title:
|
|
88
|
-
const b = (0, _themevariantcontext.useThemeVariant)(), { texts: x, t:
|
|
87
|
+
let { title: a, titleAs: c = "h2", description: d, asset: o, onClose: r, closeButtonLabel: u, button: i, secondaryButton: s, buttonLink: l, "aria-label": p, dataAttributes: f, role: h } = param;
|
|
88
|
+
const b = (0, _themevariantcontext.useThemeVariant)(), { texts: x, t: B } = (0, _hooks.useTheme)();
|
|
89
89
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)("section", _object_spread_props(_object_spread({
|
|
90
90
|
className: (0, _classnames.default)(_calloutcssmistica.container, _calloutcssmistica.background[b]),
|
|
91
91
|
style: (0, _css.applyCssVars)({
|
|
92
92
|
[_imagecssmistica.vars.mediaBorderRadius]: _skincontractcssmistica.vars.borderRadii.mediaSmall
|
|
93
93
|
}),
|
|
94
|
-
"aria-label":
|
|
94
|
+
"aria-label": p !== null && p !== void 0 ? p : a,
|
|
95
95
|
role: h
|
|
96
96
|
}, (0, _dom.getPrefixedDataAttributes)(f, "Callout")), {
|
|
97
97
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_themevariantcontext.ThemeVariant, {
|
|
98
98
|
isInverse: !1,
|
|
99
99
|
children: [
|
|
100
|
-
|
|
100
|
+
o && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
101
101
|
paddingRight: 16,
|
|
102
|
-
|
|
102
|
+
dataAttributes: {
|
|
103
|
+
testid: "asset"
|
|
104
|
+
},
|
|
105
|
+
children: o
|
|
103
106
|
}),
|
|
104
107
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
105
108
|
className: _calloutcssmistica.content,
|
|
@@ -118,39 +121,48 @@ const W = (param)=>{
|
|
|
118
121
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
|
|
119
122
|
as: c,
|
|
120
123
|
regular: !0,
|
|
121
|
-
|
|
124
|
+
dataAttributes: {
|
|
125
|
+
testid: "title"
|
|
126
|
+
},
|
|
127
|
+
children: a
|
|
122
128
|
}),
|
|
123
129
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
124
130
|
as: "p",
|
|
125
131
|
regular: !0,
|
|
126
132
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
133
|
+
dataAttributes: {
|
|
134
|
+
testid: "description"
|
|
135
|
+
},
|
|
127
136
|
children: d
|
|
128
137
|
})
|
|
129
138
|
]
|
|
130
139
|
}),
|
|
131
|
-
|
|
140
|
+
r && // Create empty div in order to fill space that iconButton occupies.
|
|
132
141
|
// Without this, the content's vertical alignment can be affected
|
|
133
142
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
134
143
|
className: _calloutcssmistica.closeButtonContainerSize
|
|
135
144
|
})
|
|
136
145
|
]
|
|
137
146
|
}),
|
|
138
|
-
(i ||
|
|
147
|
+
(i || s || l) && /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttongroup.default, {
|
|
139
148
|
primaryButton: i,
|
|
140
|
-
secondaryButton:
|
|
141
|
-
link:
|
|
149
|
+
secondaryButton: s,
|
|
150
|
+
link: l
|
|
142
151
|
})
|
|
143
152
|
]
|
|
144
153
|
}),
|
|
145
|
-
|
|
154
|
+
r && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
146
155
|
className: _calloutcssmistica.closeButtonContainer,
|
|
147
156
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, {
|
|
157
|
+
dataAttributes: {
|
|
158
|
+
testid: "closeButton"
|
|
159
|
+
},
|
|
148
160
|
small: !0,
|
|
149
161
|
bleedY: !0,
|
|
150
162
|
bleedRight: !0,
|
|
151
163
|
Icon: _iconcloseregular.default,
|
|
152
|
-
onPress:
|
|
153
|
-
"aria-label":
|
|
164
|
+
onPress: r,
|
|
165
|
+
"aria-label": u || x.closeButtonLabel || B(_texttokens.closeButtonLabel)
|
|
154
166
|
})
|
|
155
167
|
})
|
|
156
168
|
]
|
|
@@ -158,4 +170,4 @@ const W = (param)=>{
|
|
|
158
170
|
]
|
|
159
171
|
})
|
|
160
172
|
}));
|
|
161
|
-
},
|
|
173
|
+
}, at = W;
|
package/dist/card.css-mistica.js
CHANGED
|
@@ -28,10 +28,10 @@ _export(exports, {
|
|
|
28
28
|
return i;
|
|
29
29
|
},
|
|
30
30
|
dataCardTopActionsWithoutIcon: function() {
|
|
31
|
-
return
|
|
31
|
+
return t;
|
|
32
32
|
},
|
|
33
33
|
displayCardBackground: function() {
|
|
34
|
-
return
|
|
34
|
+
return s;
|
|
35
35
|
},
|
|
36
36
|
displayCardContainer: function() {
|
|
37
37
|
return o;
|
|
@@ -55,10 +55,10 @@ _export(exports, {
|
|
|
55
55
|
return p;
|
|
56
56
|
},
|
|
57
57
|
mediaCard: function() {
|
|
58
|
-
return
|
|
58
|
+
return u;
|
|
59
59
|
},
|
|
60
60
|
mediaCardAsset: function() {
|
|
61
|
-
return
|
|
61
|
+
return c;
|
|
62
62
|
},
|
|
63
63
|
mediaCardContent: function() {
|
|
64
64
|
return m;
|
|
@@ -100,7 +100,7 @@ _export(exports, {
|
|
|
100
100
|
require("./sprinkles.css.ts.vanilla.css-mistica.js");
|
|
101
101
|
require("./icon-button.css.ts.vanilla.css-mistica.js");
|
|
102
102
|
require("./card.css.ts.vanilla.css-mistica.js");
|
|
103
|
-
var _ = "_15e54s91 _1y2v1nfho _1y2v1nfia _1y2v1nfi4", y = "_15e54s93 _1y2v1nfho _1y2v1nfhi", e = "_15e54s912", r = "_1y2v1nfho _1y2v1nfia _1y2v1nfi0 _1y2v1nfhu", f = "_15e54s99", i = "_15e54s9m _1y2v1nfae _1y2v1nfbn _1y2v1nf82 _1y2v1nf9b _1y2v1nfho _1y2v1nfia _1y2v1nfhi _1y2v1nfhu _1y2v1nfib",
|
|
103
|
+
var _ = "_15e54s91 _1y2v1nfho _1y2v1nfia _1y2v1nfi4", y = "_15e54s93 _1y2v1nfho _1y2v1nfhi", e = "_15e54s912", r = "_1y2v1nfho _1y2v1nfia _1y2v1nfi0 _1y2v1nfhu", f = "_15e54s99", i = "_15e54s9m _1y2v1nfae _1y2v1nfbn _1y2v1nf82 _1y2v1nf9b _1y2v1nfho _1y2v1nfia _1y2v1nfhi _1y2v1nfhu _1y2v1nfib", t = "_15e54s913", s = "_15e54s9v", o = "_1y2v1nfib _1y2v1nfis _1y2v1nfho _1y2v1nfhi", d = "_15e54s9s", C = "_1y2v1nf7w _1y2v1nf84", h = "_1y2v1nf82", b = "_1y2v1nfak _1y2v1nfbt _1y2v1nf9b", l = "_15e54s9y _1y2v1nf88", p = "_1y2v1nfho _1y2v1nfhu", u = "_1y2v1nfho _1y2v1nfhu _1y2v1nfis _1y2v1nfib _1y2v1nfia", c = "_15e54s9i _1y2v1nfae _1y2v1nfam _1y2v1nf7w _1y2v1nf84", m = "_15e54s9g _1y2v1nfae _1y2v1nfbn _1y2v1nfho _1y2v1nfia _1y2v1nfhi _1y2v1nf7w _1y2v1nf9b _1y2v1nfhu _1y2v1nfi0", O = "_15e54s9k _1y2v1nfho _1y2v1nfia _1y2v1nfhi _1y2v1nfhu _1y2v1nfi0 _1y2v1nf7w _1y2v1nfbn", k = "_1y2v1nfae _1y2v1nfam _1y2v1nfbn _1y2v1nfbv _1y2v1nf9b", w = "_15e54s9o _1y2v1nf7w _1y2v1nf95 _1y2v1nfae _1y2v1nfbn _1y2v1nfho _1y2v1nfhi _1y2v1nfis _1y2v1nfhu _1y2v1nfi0 _1y2v1nfib _1y2v1nfia", W = "_15e54s96", A = "_15e54s9b _15e54s97", M = "_15e54s9c _15e54s97", x = "_15e54s9d _15e54s97", g = "_15e54s95", I = "_15e54s98 _15e54s97", T = "_15e54s9a _15e54s97", B = {
|
|
104
104
|
aspectRatio: "var(--_15e54s910)",
|
|
105
105
|
topActionsCount: "var(--_15e54s911)"
|
|
106
106
|
};
|
package/dist/card.d.ts
CHANGED
|
@@ -2,12 +2,16 @@ 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 DataAttributes, type HeadingType, type IconProps, type RendersElement, type RendersNullableElement, type TrackingEvent } from './utils/types';
|
|
5
6
|
import type { Variant } from './theme-variant-context';
|
|
6
7
|
import type { PressHandler } from './touchable';
|
|
7
8
|
import type { VideoElement, VideoSource } from './video';
|
|
8
9
|
import type { ButtonLink, ButtonPrimary, ButtonSecondary } from './button';
|
|
9
10
|
import type { ExclusifyUnion } from './utils/utility-types';
|
|
10
|
-
|
|
11
|
+
export declare const useInnerText: () => {
|
|
12
|
+
text: string;
|
|
13
|
+
ref: (instance: HTMLElement | null) => void;
|
|
14
|
+
};
|
|
11
15
|
type BaseIconButtonAction = {
|
|
12
16
|
Icon: (props: IconProps) => JSX.Element;
|
|
13
17
|
label: string;
|
|
@@ -73,6 +77,7 @@ interface MediaCardBaseProps {
|
|
|
73
77
|
asset?: React.ReactElement;
|
|
74
78
|
headline?: string | RendersNullableElement<typeof Tag>;
|
|
75
79
|
pretitle?: string;
|
|
80
|
+
pretitleAs?: HeadingType;
|
|
76
81
|
pretitleLinesMax?: number;
|
|
77
82
|
title?: string;
|
|
78
83
|
titleAs?: HeadingType;
|
|
@@ -116,6 +121,7 @@ interface DataCardBaseProps {
|
|
|
116
121
|
asset?: React.ReactElement;
|
|
117
122
|
headline?: string | RendersNullableElement<typeof Tag>;
|
|
118
123
|
pretitle?: string;
|
|
124
|
+
pretitleAs?: HeadingType;
|
|
119
125
|
pretitleLinesMax?: number;
|
|
120
126
|
title?: string;
|
|
121
127
|
titleAs?: HeadingType;
|
|
@@ -168,6 +174,7 @@ interface CommonDisplayCardProps {
|
|
|
168
174
|
dataAttributes?: DataAttributes;
|
|
169
175
|
headline?: React.ReactComponentElement<typeof Tag>;
|
|
170
176
|
pretitle?: string;
|
|
177
|
+
pretitleAs?: HeadingType;
|
|
171
178
|
pretitleLinesMax?: number;
|
|
172
179
|
title: string;
|
|
173
180
|
titleAs?: HeadingType;
|
|
@@ -222,6 +229,7 @@ interface PosterCardBaseProps {
|
|
|
222
229
|
dataAttributes?: DataAttributes;
|
|
223
230
|
headline?: string | RendersNullableElement<typeof Tag>;
|
|
224
231
|
pretitle?: string;
|
|
232
|
+
pretitleAs?: HeadingType;
|
|
225
233
|
pretitleLinesMax?: number;
|
|
226
234
|
title?: string;
|
|
227
235
|
titleAs?: HeadingType;
|