@telefonica/mistica 14.15.0 → 14.16.1
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/card.d.ts +3 -3
- package/dist/card.js +86 -90
- package/dist/checkbox.css-mistica.js +4 -4
- package/dist/checkbox.js +10 -9
- package/dist/credit-card-number-field.js +22 -19
- package/dist/cvv-field.js +60 -47
- package/dist/date-time-picker.d.ts +10 -0
- package/dist/date-time-picker.js +54 -35
- package/dist/hooks.d.ts +1 -1
- package/dist/icons/icon-cvv-amex.d.ts +1 -0
- package/dist/icons/icon-cvv-amex.js +5 -4
- package/dist/icons/icon-cvv-visa-mc.d.ts +1 -0
- package/dist/icons/icon-cvv-visa-mc.js +7 -6
- package/dist/index.d.ts +1 -0
- package/dist/list.css-mistica.js +1 -1
- package/dist/list.js +90 -91
- package/dist/package-version.js +1 -1
- package/dist/radio-button.css-mistica.js +12 -12
- package/dist/radio-button.js +34 -33
- package/dist/search-field.js +8 -8
- package/dist/select.css-mistica.js +6 -6
- package/dist/select.js +145 -142
- package/dist/skins/blau.js +10 -0
- package/dist/skins/defaults.js +10 -0
- package/dist/skins/movistar-legacy.js +10 -0
- package/dist/skins/movistar.js +10 -0
- package/dist/skins/o2.js +10 -0
- package/dist/skins/telefonica.js +12 -2
- package/dist/skins/types/index.d.ts +10 -0
- package/dist/skins/vivo-new.js +10 -0
- package/dist/skins/vivo.js +10 -0
- package/dist/switch-component.css-mistica.js +9 -9
- package/dist/switch-component.js +16 -15
- package/dist/tabs.js +32 -28
- package/dist/text-field-base.js +44 -44
- package/dist/theme-context-provider.js +25 -24
- package/dist/theme.d.ts +5 -2
- package/dist/theme.js +73 -24
- package/dist/video.d.ts +7 -1
- package/dist/video.js +116 -76
- package/dist-es/card.js +115 -119
- package/dist-es/checkbox.css-mistica.js +4 -4
- package/dist-es/checkbox.js +21 -20
- package/dist-es/credit-card-number-field.js +23 -20
- package/dist-es/cvv-field.js +74 -61
- package/dist-es/date-time-picker.js +66 -47
- package/dist-es/icons/icon-cvv-amex.js +5 -4
- package/dist-es/icons/icon-cvv-visa-mc.js +9 -8
- package/dist-es/list.css-mistica.js +1 -1
- package/dist-es/list.js +114 -115
- package/dist-es/package-version.js +1 -1
- package/dist-es/radio-button.css-mistica.js +6 -6
- package/dist-es/radio-button.js +38 -37
- package/dist-es/search-field.js +7 -7
- package/dist-es/select.css-mistica.js +5 -5
- package/dist-es/select.js +173 -170
- package/dist-es/skins/blau.js +10 -0
- package/dist-es/skins/defaults.js +10 -0
- package/dist-es/skins/movistar-legacy.js +10 -0
- package/dist-es/skins/movistar.js +10 -0
- package/dist-es/skins/o2.js +10 -0
- package/dist-es/skins/telefonica.js +12 -2
- package/dist-es/skins/vivo-new.js +10 -0
- package/dist-es/skins/vivo.js +10 -0
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.css-mistica.js +7 -7
- package/dist-es/switch-component.js +37 -36
- package/dist-es/tabs.js +49 -45
- package/dist-es/text-field-base.js +64 -64
- package/dist-es/theme-context-provider.js +56 -55
- package/dist-es/theme.js +69 -20
- package/dist-es/video.js +121 -81
- package/package.json +2 -2
- package/dist/cvv-field.css-mistica.js +0 -21
- package/dist/cvv-field.css.d.ts +0 -2
- package/dist/cvv-field.css.ts.vanilla.css-mistica.js +0 -11
- package/dist/icons/icon-creditcard.d.ts +0 -7
- package/dist/icons/icon-creditcard.js +0 -33
- package/dist/icons/icon-info-cvv.d.ts +0 -7
- package/dist/icons/icon-info-cvv.js +0 -26
- package/dist/icons/icon-search.d.ts +0 -7
- package/dist/icons/icon-search.js +0 -32
- package/dist-es/cvv-field.css-mistica.js +0 -4
- package/dist-es/cvv-field.css.ts.vanilla.css-mistica.js +0 -2
- package/dist-es/icons/icon-creditcard.js +0 -24
- package/dist-es/icons/icon-info-cvv.js +0 -17
- package/dist-es/icons/icon-search.js +0 -23
package/dist/theme.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ type LinkComponent = React.ComponentType<{
|
|
|
69
69
|
onKeyDown?: React.KeyboardEventHandler<HTMLAnchorElement>;
|
|
70
70
|
children: React.ReactNode;
|
|
71
71
|
}>;
|
|
72
|
-
export declare const
|
|
72
|
+
export declare const getMisticaLinkComponent: (Link?: ThemeConfig['Link']) => LinkComponent;
|
|
73
73
|
export type ColorScheme = 'dark' | 'light' | 'auto';
|
|
74
74
|
export type EventFormat = 'universal-analytics' | 'google-analytics-4';
|
|
75
75
|
export type ThemeConfig = Readonly<{
|
|
@@ -92,7 +92,10 @@ export type ThemeConfig = Readonly<{
|
|
|
92
92
|
dimensions?: Readonly<{
|
|
93
93
|
headerMobileHeight: number | 'mistica';
|
|
94
94
|
}>;
|
|
95
|
-
Link?: LinkComponent
|
|
95
|
+
Link?: LinkComponent | {
|
|
96
|
+
type: 'ReactRouter5' | 'ReactRouter6' | 'Next12' | 'Next13';
|
|
97
|
+
Component: React.ComponentType<any>;
|
|
98
|
+
};
|
|
96
99
|
useHrefDecorator?: () => (href: string) => string;
|
|
97
100
|
useId?: () => string;
|
|
98
101
|
enableTabFocus?: boolean;
|
package/dist/theme.js
CHANGED
|
@@ -9,20 +9,20 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
AnchorLink: function() {
|
|
13
|
-
return u;
|
|
14
|
-
},
|
|
15
12
|
NAVBAR_HEIGHT_DESKTOP: function() {
|
|
16
|
-
return
|
|
13
|
+
return C;
|
|
17
14
|
},
|
|
18
15
|
NAVBAR_HEIGHT_MOBILE: function() {
|
|
19
|
-
return
|
|
16
|
+
return c;
|
|
20
17
|
},
|
|
21
18
|
dimensions: function() {
|
|
22
|
-
return
|
|
19
|
+
return E;
|
|
20
|
+
},
|
|
21
|
+
getMisticaLinkComponent: function() {
|
|
22
|
+
return h;
|
|
23
23
|
},
|
|
24
24
|
getTexts: function() {
|
|
25
|
-
return
|
|
25
|
+
return b;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -105,7 +105,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
105
105
|
}
|
|
106
106
|
return target;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const l = {
|
|
109
109
|
expirationDatePlaceholder: "MM/AA",
|
|
110
110
|
togglePasswordVisibilityLabel: "Mostrar u ocultar contrase\xf1a",
|
|
111
111
|
loading: "Cargando",
|
|
@@ -136,7 +136,7 @@ const t = {
|
|
|
136
136
|
clearButton: "Borrar",
|
|
137
137
|
carouselNextButton: "siguiente",
|
|
138
138
|
carouselPrevButton: "anterior"
|
|
139
|
-
},
|
|
139
|
+
}, n = {
|
|
140
140
|
expirationDatePlaceholder: "MM/YY",
|
|
141
141
|
togglePasswordVisibilityLabel: "Toggle password visibility",
|
|
142
142
|
loading: "Loading",
|
|
@@ -167,7 +167,7 @@ const t = {
|
|
|
167
167
|
clearButton: "Clear",
|
|
168
168
|
carouselNextButton: "next",
|
|
169
169
|
carouselPrevButton: "previous"
|
|
170
|
-
},
|
|
170
|
+
}, d = {
|
|
171
171
|
expirationDatePlaceholder: "MM/JJ",
|
|
172
172
|
togglePasswordVisibilityLabel: "Passwort un-/sichtbar machen",
|
|
173
173
|
loading: "Wird gespeichert",
|
|
@@ -198,7 +198,7 @@ const t = {
|
|
|
198
198
|
clearButton: "L\xf6schen",
|
|
199
199
|
carouselNextButton: "n\xe4chste",
|
|
200
200
|
carouselPrevButton: "vorherige"
|
|
201
|
-
},
|
|
201
|
+
}, s = {
|
|
202
202
|
expirationDatePlaceholder: "MM/AA",
|
|
203
203
|
togglePasswordVisibilityLabel: "Mostrar ou ocultar senha",
|
|
204
204
|
loading: "Carregando",
|
|
@@ -229,31 +229,80 @@ const t = {
|
|
|
229
229
|
clearButton: "Apagar",
|
|
230
230
|
carouselNextButton: "pr\xf3ximo",
|
|
231
231
|
carouselPrevButton: "anterior"
|
|
232
|
-
},
|
|
232
|
+
}, b = (r)=>{
|
|
233
233
|
switch(r.toLocaleLowerCase().split(/[-_]/)[0]){
|
|
234
234
|
case "es":
|
|
235
|
-
return t;
|
|
236
|
-
case "pt":
|
|
237
235
|
return l;
|
|
236
|
+
case "pt":
|
|
237
|
+
return s;
|
|
238
238
|
case "de":
|
|
239
|
-
return
|
|
239
|
+
return d;
|
|
240
240
|
case "en":
|
|
241
|
-
return
|
|
241
|
+
return n;
|
|
242
242
|
default:
|
|
243
|
-
return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${r}`),
|
|
243
|
+
return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${r}`), n;
|
|
244
244
|
}
|
|
245
|
-
},
|
|
246
|
-
headerMobileHeight:
|
|
247
|
-
headerDesktopHeight:
|
|
248
|
-
},
|
|
249
|
-
var { to: r , innerRef: e } = _param,
|
|
245
|
+
}, c = 56, C = 80, E = {
|
|
246
|
+
headerMobileHeight: c,
|
|
247
|
+
headerDesktopHeight: C
|
|
248
|
+
}, m = (_param)=>/* @__PURE__ */ {
|
|
249
|
+
var { to: r , innerRef: e } = _param, o = _object_without_properties(_param, [
|
|
250
250
|
"to",
|
|
251
251
|
"innerRef"
|
|
252
252
|
]);
|
|
253
253
|
return (0, _jsxruntime.jsx)("a", _object_spread_props(_object_spread({
|
|
254
254
|
ref: e,
|
|
255
255
|
href: typeof r == "string" ? r : r == null ? void 0 : r.pathname
|
|
256
|
-
},
|
|
257
|
-
children:
|
|
256
|
+
}, o), {
|
|
257
|
+
children: o.children
|
|
258
258
|
}));
|
|
259
|
+
}, u = (r)=>r, f = (r)=>(_param)=>/* @__PURE__ */ {
|
|
260
|
+
var { innerRef: e } = _param, o = _object_without_properties(_param, [
|
|
261
|
+
"innerRef"
|
|
262
|
+
]);
|
|
263
|
+
return (0, _jsxruntime.jsx)(r, _object_spread({
|
|
264
|
+
ref: e
|
|
265
|
+
}, o));
|
|
266
|
+
}, v = (r)=>(_param)=>/* @__PURE__ */ {
|
|
267
|
+
var { to: e , innerRef: o , children: t } = _param, i = _object_without_properties(_param, [
|
|
268
|
+
"to",
|
|
269
|
+
"innerRef",
|
|
270
|
+
"children"
|
|
271
|
+
]);
|
|
272
|
+
return (0, _jsxruntime.jsx)(r, {
|
|
273
|
+
href: e,
|
|
274
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("a", _object_spread_props(_object_spread({
|
|
275
|
+
ref: o
|
|
276
|
+
}, i), {
|
|
277
|
+
children: t
|
|
278
|
+
}))
|
|
279
|
+
});
|
|
280
|
+
}, p = (r)=>(_param)=>/* @__PURE__ */ {
|
|
281
|
+
var { to: e , innerRef: o , children: t } = _param, i = _object_without_properties(_param, [
|
|
282
|
+
"to",
|
|
283
|
+
"innerRef",
|
|
284
|
+
"children"
|
|
285
|
+
]);
|
|
286
|
+
return (0, _jsxruntime.jsx)(r, _object_spread_props(_object_spread({
|
|
287
|
+
href: e,
|
|
288
|
+
ref: o
|
|
289
|
+
}, i), {
|
|
290
|
+
children: t
|
|
291
|
+
}));
|
|
292
|
+
}, h = (r)=>{
|
|
293
|
+
if (!r) return m;
|
|
294
|
+
if (typeof r == "function" || r.$$typeof) return r;
|
|
295
|
+
switch(r.type){
|
|
296
|
+
case "ReactRouter5":
|
|
297
|
+
return u(r.Component);
|
|
298
|
+
case "ReactRouter6":
|
|
299
|
+
return f(r.Component);
|
|
300
|
+
case "Next12":
|
|
301
|
+
return v(r.Component);
|
|
302
|
+
case "Next13":
|
|
303
|
+
return p(r.Component);
|
|
304
|
+
default:
|
|
305
|
+
const e = r.type;
|
|
306
|
+
throw new Error(`Invalid Link type: ${e}`);
|
|
307
|
+
}
|
|
259
308
|
};
|
package/dist/video.d.ts
CHANGED
|
@@ -37,5 +37,11 @@ export type VideoProps = {
|
|
|
37
37
|
preload?: 'none' | 'metadata' | 'auto';
|
|
38
38
|
dataAttributes?: DataAttributes;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
export interface VideoElement extends HTMLDivElement {
|
|
41
|
+
play: () => Promise<void>;
|
|
42
|
+
pause: () => void;
|
|
43
|
+
load: () => void;
|
|
44
|
+
setCurrentTime: (time: number) => void;
|
|
45
|
+
}
|
|
46
|
+
declare const Video: React.ForwardRefExoticComponent<VideoProps & React.RefAttributes<VideoElement>>;
|
|
41
47
|
export default Video;
|
package/dist/video.js
CHANGED
|
@@ -10,22 +10,20 @@ function _export(target, all) {
|
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
12
|
RATIO: function() {
|
|
13
|
-
return
|
|
13
|
+
return K;
|
|
14
14
|
},
|
|
15
15
|
default: function() {
|
|
16
|
-
return
|
|
16
|
+
return re;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const _jsxruntime = require("react/jsx-runtime");
|
|
20
20
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
21
21
|
const _image = require("./image.js");
|
|
22
22
|
const _aspectratiosupport = require("./utils/aspect-ratio-support.js");
|
|
23
|
-
const _common = require("./utils/common.js");
|
|
24
23
|
const _dom = require("./utils/dom.js");
|
|
25
24
|
const _platform = require("./utils/platform.js");
|
|
26
25
|
const _videocssmistica = require("./video.css-mistica.js");
|
|
27
26
|
const _skincontractcssmistica = require("./skins/skin-contract.css-mistica.js");
|
|
28
|
-
const _hooks = require("./hooks.js");
|
|
29
27
|
function _getRequireWildcardCache(nodeInterop) {
|
|
30
28
|
if (typeof WeakMap !== "function") return null;
|
|
31
29
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -144,14 +142,18 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
144
142
|
}
|
|
145
143
|
return target;
|
|
146
144
|
}
|
|
147
|
-
const
|
|
145
|
+
const q = {
|
|
148
146
|
loading: {
|
|
149
147
|
play: "playing",
|
|
150
148
|
pause: "paused",
|
|
151
149
|
fail: "error",
|
|
152
150
|
finishLoad: "loaded"
|
|
153
151
|
},
|
|
154
|
-
|
|
152
|
+
/**
|
|
153
|
+
* This state represents the scenario when video.load() finishes, but the video isn't played yet. Some browsers don't actually load
|
|
154
|
+
* the video until someone plays it. In this case, we need to show the poster, because we may not have the first frame to display it.
|
|
155
|
+
* https://stackoverflow.com/questions/10235919/the-canplay-canplaythrough-events-for-an-html5-video-are-not-called-on-firefox/26430919#26430919
|
|
156
|
+
*/ loaded: {
|
|
155
157
|
play: "playing",
|
|
156
158
|
pause: "paused",
|
|
157
159
|
reset: "loading"
|
|
@@ -167,12 +169,12 @@ const K = {
|
|
|
167
169
|
error: {
|
|
168
170
|
reset: "loading"
|
|
169
171
|
}
|
|
170
|
-
},
|
|
172
|
+
}, D = (r, u)=>q[r][u] || r, K = {
|
|
171
173
|
"1:1": 1,
|
|
172
174
|
"16:9": 16 / 9,
|
|
173
175
|
"4:3": 4 / 3
|
|
174
|
-
},
|
|
175
|
-
var { src:
|
|
176
|
+
}, _ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", z = /*#__PURE__*/ _react.forwardRef((_param, A)=>{
|
|
177
|
+
var { src: r , poster: u , autoPlay: p = "when-loaded" , muted: x = !0 , loop: N = !0 , preload: k = "none" , loadingTimeout: T = 1e4 , onLoad: y , onError: h , onPause: R , onPlay: w , aspectRatio: c = "1:1" , dataAttributes: B } = _param, n = _object_without_properties(_param, [
|
|
176
178
|
"src",
|
|
177
179
|
"poster",
|
|
178
180
|
"autoPlay",
|
|
@@ -187,104 +189,142 @@ const K = {
|
|
|
187
189
|
"aspectRatio",
|
|
188
190
|
"dataAttributes"
|
|
189
191
|
]);
|
|
190
|
-
const [
|
|
191
|
-
|
|
192
|
+
const [a, l] = _react.useReducer(D, "loading"), s = _react.useRef(null), C = _react.useRef(), f = _react.useRef(null), b = (0, _image.useMediaBorderRadius)(), m = typeof c == "number" ? c : K[c], v = _react.useCallback(()=>{
|
|
193
|
+
a === "loading" && (l("fail"), h == null || h());
|
|
192
194
|
}, [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
+
h,
|
|
196
|
+
a
|
|
195
197
|
]);
|
|
196
198
|
_react.useEffect(()=>{
|
|
197
199
|
var e;
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
return (e =
|
|
202
|
-
clearTimeout(
|
|
200
|
+
if (C.current !== r) {
|
|
201
|
+
C.current = r;
|
|
202
|
+
const t = setTimeout(v, T);
|
|
203
|
+
return l("reset"), (e = s.current) == null || e.load(), ()=>{
|
|
204
|
+
clearTimeout(t);
|
|
203
205
|
};
|
|
204
206
|
}
|
|
205
207
|
}, [
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
r,
|
|
209
|
+
T,
|
|
210
|
+
v
|
|
209
211
|
]);
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
const e =
|
|
213
|
-
|
|
214
|
-
},
|
|
215
|
-
|
|
212
|
+
const I = ()=>{
|
|
213
|
+
y == null || y();
|
|
214
|
+
const e = s.current, t = p && !(0, _platform.isRunningAcceptanceTest)();
|
|
215
|
+
l("finishLoad"), e && t && e.paused && e.play();
|
|
216
|
+
}, U = (Array.isArray(r) ? r : [
|
|
217
|
+
r
|
|
216
218
|
]).map((e)=>typeof e == "string" ? {
|
|
217
219
|
src: e
|
|
218
|
-
} : e),
|
|
219
|
-
ref:
|
|
220
|
+
} : e), g = a === "error" || a === "loading" || a === "loaded", j = /* @__PURE__ */ (0, _jsxruntime.jsx)("video", _object_spread_props(_object_spread({
|
|
221
|
+
ref: s,
|
|
220
222
|
playsInline: !0,
|
|
221
223
|
disablePictureInPicture: !0,
|
|
222
224
|
disableRemotePlayback: !0,
|
|
223
|
-
muted:
|
|
224
|
-
loop:
|
|
225
|
+
muted: x,
|
|
226
|
+
loop: N,
|
|
225
227
|
className: _videocssmistica.video,
|
|
226
|
-
preload:
|
|
227
|
-
|
|
228
|
-
s("reset");
|
|
229
|
-
},
|
|
230
|
-
onError: R,
|
|
228
|
+
preload: k,
|
|
229
|
+
onError: v,
|
|
231
230
|
onPause: ()=>{
|
|
232
|
-
|
|
231
|
+
R == null || R(), l("pause");
|
|
233
232
|
},
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
onTimeUpdate: ()=>{
|
|
234
|
+
var e;
|
|
235
|
+
a !== "playing" && ((e = s.current) == null ? void 0 : e.currentTime) !== 0 && (w == null || w(), l("play"));
|
|
236
236
|
},
|
|
237
237
|
onCanPlay: ()=>{
|
|
238
|
-
|
|
238
|
+
p === "streaming" && I();
|
|
239
239
|
},
|
|
240
240
|
onCanPlayThrough: ()=>{
|
|
241
|
-
|
|
241
|
+
p !== "streaming" && I();
|
|
242
242
|
},
|
|
243
|
-
poster:
|
|
244
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
243
|
+
poster: _
|
|
244
|
+
}, (0, _dom.getPrefixedDataAttributes)(B)), {
|
|
245
245
|
style: {
|
|
246
246
|
// For some reason adding this style with classnames doesn't add the border radius in safari
|
|
247
|
-
borderRadius:
|
|
248
|
-
visibility:
|
|
249
|
-
position:
|
|
250
|
-
width: a ? N : "100%",
|
|
251
|
-
height: a ? k : "100%"
|
|
252
|
-
},
|
|
253
|
-
children: x.map((param, U)=>/* @__PURE__ */ {
|
|
254
|
-
let { src: e , type: n } = param;
|
|
255
|
-
return (0, _jsxruntime.jsx)("source", {
|
|
256
|
-
src: e,
|
|
257
|
-
type: n
|
|
258
|
-
}, U);
|
|
259
|
-
})
|
|
260
|
-
})), j = !!(p !== 0 || i.width && i.height), G = l ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_image.ImageContent, {
|
|
261
|
-
ref: I,
|
|
262
|
-
aspectRatio: A,
|
|
263
|
-
width: i.width,
|
|
264
|
-
height: i.height,
|
|
265
|
-
src: l
|
|
266
|
-
}) : j ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
267
|
-
style: {
|
|
268
|
-
position: "absolute",
|
|
247
|
+
borderRadius: b ? _skincontractcssmistica.vars.borderRadii.container : 0,
|
|
248
|
+
visibility: g ? "hidden" : "visible",
|
|
249
|
+
position: g || m !== 0 ? "absolute" : "static",
|
|
269
250
|
width: "100%",
|
|
270
251
|
height: "100%"
|
|
271
252
|
},
|
|
272
|
-
children:
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
253
|
+
children: U.map((param, i)=>/* @__PURE__ */ {
|
|
254
|
+
let { src: e , type: t } = param;
|
|
255
|
+
return (0, _jsxruntime.jsx)("source", {
|
|
256
|
+
src: e,
|
|
257
|
+
type: t
|
|
258
|
+
}, i);
|
|
276
259
|
})
|
|
277
|
-
})
|
|
260
|
+
})), E = !!(m !== 0 || n.width && n.height), F = a === "error", G = _react.useMemo(()=>u ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_image.ImageContent, {
|
|
261
|
+
aspectRatio: c,
|
|
262
|
+
width: n.width,
|
|
263
|
+
height: n.height,
|
|
264
|
+
src: u
|
|
265
|
+
}) : E ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
266
|
+
style: {
|
|
267
|
+
position: "absolute",
|
|
268
|
+
width: "100%",
|
|
269
|
+
height: "100%"
|
|
270
|
+
},
|
|
271
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_image.ImageError, {
|
|
272
|
+
noBorderRadius: !b,
|
|
273
|
+
withIcon: F
|
|
274
|
+
})
|
|
275
|
+
}) : void 0, [
|
|
276
|
+
c,
|
|
277
|
+
n.height,
|
|
278
|
+
n.width,
|
|
279
|
+
b,
|
|
280
|
+
F,
|
|
281
|
+
u,
|
|
282
|
+
E
|
|
283
|
+
]);
|
|
278
284
|
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(_aspectratiosupport.AspectRatioElement, {
|
|
279
285
|
style: {
|
|
280
286
|
position: "relative"
|
|
281
287
|
},
|
|
282
|
-
aspectRatio:
|
|
283
|
-
width:
|
|
284
|
-
height:
|
|
288
|
+
aspectRatio: m,
|
|
289
|
+
width: n.width,
|
|
290
|
+
height: n.height,
|
|
285
291
|
children: [
|
|
286
|
-
|
|
287
|
-
|
|
292
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
293
|
+
style: {
|
|
294
|
+
position: "absolute",
|
|
295
|
+
width: "100%",
|
|
296
|
+
height: "100%"
|
|
297
|
+
},
|
|
298
|
+
ref: (e)=>{
|
|
299
|
+
const t = e || null;
|
|
300
|
+
t && (t.play = ()=>{
|
|
301
|
+
var i;
|
|
302
|
+
return ((i = s.current) == null ? void 0 : i.play()) || Promise.resolve();
|
|
303
|
+
}, t.pause = ()=>{
|
|
304
|
+
var i;
|
|
305
|
+
return (i = s.current) == null ? void 0 : i.pause();
|
|
306
|
+
}, t.load = ()=>{
|
|
307
|
+
var i;
|
|
308
|
+
(i = f.current) != null && i.style && (f.current.style.width = "100%", f.current.style.height = "100%"), setTimeout(()=>{
|
|
309
|
+
var S;
|
|
310
|
+
l("reset"), (S = s.current) == null || S.load();
|
|
311
|
+
}, 100);
|
|
312
|
+
}, t.setCurrentTime = (i)=>{
|
|
313
|
+
s.current && (s.current.currentTime = i);
|
|
314
|
+
}), typeof A == "function" ? A(t) : A && (A.current = t);
|
|
315
|
+
}
|
|
316
|
+
}),
|
|
317
|
+
j,
|
|
318
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
319
|
+
ref: f,
|
|
320
|
+
style: {
|
|
321
|
+
position: m !== 0 ? "absolute" : "static",
|
|
322
|
+
width: g ? "100%" : 0,
|
|
323
|
+
height: g ? "100%" : 0,
|
|
324
|
+
overflow: "hidden"
|
|
325
|
+
},
|
|
326
|
+
children: G
|
|
327
|
+
})
|
|
288
328
|
]
|
|
289
329
|
});
|
|
290
|
-
}),
|
|
330
|
+
}), re = z;
|