@telefonica/mistica 14.17.1 → 14.18.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/avatar.css-mistica.js +3 -3
- package/dist/badge.css-mistica.js +3 -3
- package/dist/box.d.ts +8 -8
- package/dist/box.js +28 -21
- package/dist/boxed.css-mistica.js +1 -1
- package/dist/button-group.css-mistica.js +1 -1
- package/dist/button-layout.css-mistica.js +8 -8
- package/dist/button.css-mistica.js +19 -19
- package/dist/callout.css-mistica.js +1 -1
- package/dist/card.css-mistica.js +27 -18
- package/dist/card.css.d.ts +3 -0
- package/dist/card.d.ts +37 -14
- package/dist/card.js +442 -268
- package/dist/carousel.css-mistica.js +16 -16
- package/dist/checkbox.css-mistica.js +10 -10
- package/dist/chip.css-mistica.js +4 -4
- package/dist/circle.css-mistica.js +2 -2
- package/dist/circle.d.ts +2 -0
- package/dist/circle.js +61 -7
- package/dist/community/advanced-data-card.css-mistica.js +69 -0
- package/dist/community/advanced-data-card.css.d.ts +20 -0
- package/dist/community/advanced-data-card.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/community/advanced-data-card.d.ts +39 -0
- package/dist/community/advanced-data-card.js +317 -0
- package/dist/community/blocks.css-mistica.js +21 -0
- package/dist/community/blocks.css.d.ts +2 -0
- package/dist/community/blocks.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/community/blocks.d.ts +73 -0
- package/dist/community/blocks.js +258 -0
- package/dist/community/index.d.ts +2 -0
- package/dist/community/index.js +31 -3
- package/dist/credit-card-number-field.css-mistica.js +3 -3
- package/dist/dialog.css-mistica.js +9 -9
- package/dist/double-field.css-mistica.js +2 -2
- package/dist/empty-state-card.css-mistica.js +1 -1
- package/dist/empty-state.css-mistica.js +4 -4
- package/dist/empty-state.js +4 -4
- package/dist/feedback.css-mistica.js +3 -3
- package/dist/fixed-footer-layout.css-mistica.js +2 -2
- package/dist/grid.css.d.ts +6 -6
- package/dist/header.css-mistica.js +24 -0
- package/dist/header.css.d.ts +3 -0
- package/dist/header.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/header.d.ts +3 -0
- package/dist/header.js +121 -101
- package/dist/hero.css-mistica.js +4 -4
- package/dist/highlighted-card.css-mistica.js +5 -5
- package/dist/horizontal-scroll.css-mistica.js +1 -1
- package/dist/icon-button.css-mistica.js +1 -1
- package/dist/image.css-mistica.js +1 -1
- package/dist/image.d.ts +19 -6
- package/dist/image.js +64 -61
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -0
- package/dist/list.css-mistica.js +14 -14
- package/dist/list.js +11 -10
- package/dist/loading-bar.css-mistica.js +5 -5
- package/dist/maybe-dismissable.css-mistica.js +1 -1
- package/dist/menu.css-mistica.js +2 -2
- package/dist/navigation-bar.css-mistica.js +16 -16
- package/dist/navigation-breadcrumbs.css-mistica.js +1 -1
- package/dist/package-version.js +1 -1
- package/dist/password-field.css-mistica.js +2 -2
- package/dist/popover.css-mistica.js +11 -11
- package/dist/progress-bar.css-mistica.js +3 -3
- package/dist/radio-button.css-mistica.js +12 -12
- package/dist/responsive-layout.css-mistica.js +2 -2
- package/dist/screen-reader-only.css-mistica.js +1 -1
- package/dist/select.css-mistica.js +12 -12
- package/dist/skeletons.css-mistica.js +3 -3
- package/dist/snackbar.css-mistica.js +5 -5
- package/dist/spinner.css-mistica.js +1 -1
- package/dist/sprinkles.css-mistica.js +648 -336
- package/dist/sprinkles.css.d.ts +36 -7
- package/dist/stack.css-mistica.js +7 -4
- package/dist/stack.css.d.ts +3 -0
- package/dist/stack.d.ts +4 -2
- package/dist/stack.js +20 -13
- package/dist/stacking-group.css-mistica.js +1 -1
- package/dist/stepper.css-mistica.js +9 -9
- package/dist/switch-component.css-mistica.js +21 -21
- package/dist/tabs.css-mistica.js +11 -11
- package/dist/tag.css-mistica.js +1 -1
- package/dist/text-field-base.css-mistica.js +11 -11
- package/dist/text-field-components.css-mistica.js +15 -15
- package/dist/text-link.css-mistica.js +5 -5
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +49 -41
- package/dist/tooltip.css-mistica.js +9 -9
- package/dist/touchable.css-mistica.js +3 -3
- package/dist/utils/aspect-ratio-support.css-mistica.js +4 -4
- package/dist/utils/aspect-ratio-support.d.ts +4 -2
- package/dist/utils/aspect-ratio-support.js +17 -16
- package/dist/utils/types.d.ts +5 -0
- package/dist/utils/utility-types.d.ts +7 -0
- package/dist/video.css-mistica.js +2 -2
- package/dist/video.js +26 -78
- package/dist-es/avatar.css-mistica.js +2 -2
- package/dist-es/badge.css-mistica.js +2 -2
- package/dist-es/box.js +32 -25
- package/dist-es/boxed.css-mistica.js +1 -1
- package/dist-es/button-group.css-mistica.js +1 -1
- package/dist-es/button-layout.css-mistica.js +7 -7
- package/dist-es/button.css-mistica.js +9 -9
- package/dist-es/callout.css-mistica.js +1 -1
- package/dist-es/card.css-mistica.js +4 -4
- package/dist-es/card.js +549 -384
- package/dist-es/carousel.css-mistica.js +2 -2
- package/dist-es/checkbox.css-mistica.js +6 -6
- package/dist-es/chip.css-mistica.js +4 -4
- package/dist-es/circle.css-mistica.js +2 -2
- package/dist-es/circle.js +66 -12
- package/dist-es/community/advanced-data-card.css-mistica.js +7 -0
- package/dist-es/community/advanced-data-card.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/community/advanced-data-card.js +256 -0
- package/dist-es/community/blocks.css-mistica.js +4 -0
- package/dist-es/community/blocks.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/community/blocks.js +224 -0
- package/dist-es/community/index.js +4 -2
- package/dist-es/credit-card-number-field.css-mistica.js +3 -3
- package/dist-es/dialog.css-mistica.js +5 -5
- package/dist-es/double-field.css-mistica.js +2 -2
- package/dist-es/empty-state-card.css-mistica.js +1 -1
- package/dist-es/empty-state.css-mistica.js +3 -3
- package/dist-es/empty-state.js +11 -11
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
- package/dist-es/header.css-mistica.js +4 -0
- package/dist-es/header.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/header.js +141 -121
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/highlighted-card.css-mistica.js +5 -5
- package/dist-es/horizontal-scroll.css-mistica.js +1 -1
- package/dist-es/icon-button.css-mistica.js +1 -1
- package/dist-es/image.css-mistica.js +1 -1
- package/dist-es/image.js +76 -73
- package/dist-es/index.js +1710 -1710
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +22 -21
- package/dist-es/loading-bar.css-mistica.js +2 -2
- package/dist-es/maybe-dismissable.css-mistica.js +1 -1
- package/dist-es/menu.css-mistica.js +2 -2
- package/dist-es/navigation-bar.css-mistica.js +9 -9
- package/dist-es/navigation-breadcrumbs.css-mistica.js +1 -1
- package/dist-es/package-version.js +1 -1
- package/dist-es/password-field.css-mistica.js +2 -2
- package/dist-es/popover.css-mistica.js +2 -2
- package/dist-es/progress-bar.css-mistica.js +2 -2
- package/dist-es/radio-button.css-mistica.js +6 -6
- package/dist-es/responsive-layout.css-mistica.js +2 -2
- package/dist-es/screen-reader-only.css-mistica.js +1 -1
- package/dist-es/select.css-mistica.js +10 -10
- package/dist-es/skeletons.css-mistica.js +2 -2
- package/dist-es/snackbar.css-mistica.js +2 -2
- package/dist-es/spinner.css-mistica.js +1 -1
- package/dist-es/sprinkles.css-mistica.js +648 -336
- package/dist-es/stack.css-mistica.js +6 -3
- package/dist-es/stack.js +27 -20
- package/dist-es/stacking-group.css-mistica.js +1 -1
- package/dist-es/stepper.css-mistica.js +2 -2
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.css-mistica.js +18 -18
- package/dist-es/tabs.css-mistica.js +7 -7
- package/dist-es/tag.css-mistica.js +1 -1
- package/dist-es/text-field-base.css-mistica.js +2 -2
- package/dist-es/text-field-components.css-mistica.js +2 -2
- package/dist-es/text-link.css-mistica.js +5 -5
- package/dist-es/theme.js +52 -44
- package/dist-es/tooltip.css-mistica.js +3 -3
- package/dist-es/touchable.css-mistica.js +2 -2
- package/dist-es/utils/aspect-ratio-support.css-mistica.js +3 -3
- package/dist-es/utils/aspect-ratio-support.js +17 -16
- package/dist-es/video.css-mistica.js +2 -2
- package/dist-es/video.js +36 -88
- package/package.json +2 -2
package/dist-es/theme.js
CHANGED
|
@@ -77,7 +77,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
-
import { jsx as
|
|
80
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
81
81
|
const l = {
|
|
82
82
|
expirationDatePlaceholder: "MM/AA",
|
|
83
83
|
togglePasswordVisibilityLabel: "Mostrar u ocultar contrase\xf1a",
|
|
@@ -108,7 +108,9 @@ const l = {
|
|
|
108
108
|
backNavigationBar: "Atr\xe1s",
|
|
109
109
|
clearButton: "Borrar",
|
|
110
110
|
carouselNextButton: "siguiente",
|
|
111
|
-
carouselPrevButton: "anterior"
|
|
111
|
+
carouselPrevButton: "anterior",
|
|
112
|
+
playIconButtonLabel: "Reproducir",
|
|
113
|
+
pauseIconButtonLabel: "Pausar"
|
|
112
114
|
}, n = {
|
|
113
115
|
expirationDatePlaceholder: "MM/YY",
|
|
114
116
|
togglePasswordVisibilityLabel: "Toggle password visibility",
|
|
@@ -139,7 +141,9 @@ const l = {
|
|
|
139
141
|
backNavigationBar: "Back",
|
|
140
142
|
clearButton: "Clear",
|
|
141
143
|
carouselNextButton: "next",
|
|
142
|
-
carouselPrevButton: "previous"
|
|
144
|
+
carouselPrevButton: "previous",
|
|
145
|
+
playIconButtonLabel: "Play",
|
|
146
|
+
pauseIconButtonLabel: "Pause"
|
|
143
147
|
}, d = {
|
|
144
148
|
expirationDatePlaceholder: "MM/JJ",
|
|
145
149
|
togglePasswordVisibilityLabel: "Passwort un-/sichtbar machen",
|
|
@@ -170,7 +174,9 @@ const l = {
|
|
|
170
174
|
backNavigationBar: "Zur\xfcck",
|
|
171
175
|
clearButton: "L\xf6schen",
|
|
172
176
|
carouselNextButton: "n\xe4chste",
|
|
173
|
-
carouselPrevButton: "vorherige"
|
|
177
|
+
carouselPrevButton: "vorherige",
|
|
178
|
+
playIconButtonLabel: "Abspielen",
|
|
179
|
+
pauseIconButtonLabel: "Pausieren"
|
|
174
180
|
}, s = {
|
|
175
181
|
expirationDatePlaceholder: "MM/AA",
|
|
176
182
|
togglePasswordVisibilityLabel: "Mostrar ou ocultar senha",
|
|
@@ -201,9 +207,11 @@ const l = {
|
|
|
201
207
|
backNavigationBar: "Voltar",
|
|
202
208
|
clearButton: "Apagar",
|
|
203
209
|
carouselNextButton: "pr\xf3ximo",
|
|
204
|
-
carouselPrevButton: "anterior"
|
|
205
|
-
|
|
206
|
-
|
|
210
|
+
carouselPrevButton: "anterior",
|
|
211
|
+
playIconButtonLabel: "Reproduzir",
|
|
212
|
+
pauseIconButtonLabel: "Pausar"
|
|
213
|
+
}, b = (e)=>{
|
|
214
|
+
switch(e.toLocaleLowerCase().split(/[-_]/)[0]){
|
|
207
215
|
case "es":
|
|
208
216
|
return l;
|
|
209
217
|
case "pt":
|
|
@@ -213,70 +221,70 @@ const l = {
|
|
|
213
221
|
case "en":
|
|
214
222
|
return n;
|
|
215
223
|
default:
|
|
216
|
-
return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${
|
|
224
|
+
return process.env.NODE_ENV !== "production" && console.error(`Invalid locale: ${e}`), n;
|
|
217
225
|
}
|
|
218
|
-
}, c = 56,
|
|
226
|
+
}, c = 56, u = 80, E = {
|
|
219
227
|
headerMobileHeight: c,
|
|
220
|
-
headerDesktopHeight:
|
|
221
|
-
},
|
|
222
|
-
var { to:
|
|
228
|
+
headerDesktopHeight: u
|
|
229
|
+
}, C = (_param)=>/* @__PURE__ */ {
|
|
230
|
+
var { to: e , innerRef: r } = _param, a = _object_without_properties(_param, [
|
|
223
231
|
"to",
|
|
224
232
|
"innerRef"
|
|
225
233
|
]);
|
|
226
|
-
return
|
|
227
|
-
ref:
|
|
228
|
-
href: typeof
|
|
229
|
-
},
|
|
230
|
-
children:
|
|
234
|
+
return o("a", _object_spread_props(_object_spread({
|
|
235
|
+
ref: r,
|
|
236
|
+
href: typeof e == "string" ? e : e == null ? void 0 : e.pathname
|
|
237
|
+
}, a), {
|
|
238
|
+
children: a.children
|
|
231
239
|
}));
|
|
232
|
-
},
|
|
233
|
-
var { innerRef:
|
|
240
|
+
}, m = (e)=>e, f = (e)=>(_param)=>/* @__PURE__ */ {
|
|
241
|
+
var { innerRef: r } = _param, a = _object_without_properties(_param, [
|
|
234
242
|
"innerRef"
|
|
235
243
|
]);
|
|
236
|
-
return
|
|
237
|
-
ref:
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
var { to:
|
|
244
|
+
return o(e, _object_spread({
|
|
245
|
+
ref: r
|
|
246
|
+
}, a));
|
|
247
|
+
}, p = (e)=>(_param)=>/* @__PURE__ */ {
|
|
248
|
+
var { to: r , innerRef: a , children: t } = _param, i = _object_without_properties(_param, [
|
|
241
249
|
"to",
|
|
242
250
|
"innerRef",
|
|
243
251
|
"children"
|
|
244
252
|
]);
|
|
245
|
-
return
|
|
246
|
-
href:
|
|
247
|
-
children: /* @__PURE__ */
|
|
248
|
-
ref:
|
|
253
|
+
return o(e, {
|
|
254
|
+
href: r,
|
|
255
|
+
children: /* @__PURE__ */ o("a", _object_spread_props(_object_spread({
|
|
256
|
+
ref: a
|
|
249
257
|
}, i), {
|
|
250
258
|
children: t
|
|
251
259
|
}))
|
|
252
260
|
});
|
|
253
|
-
},
|
|
254
|
-
var { to:
|
|
261
|
+
}, v = (e)=>(_param)=>/* @__PURE__ */ {
|
|
262
|
+
var { to: r , innerRef: a , children: t } = _param, i = _object_without_properties(_param, [
|
|
255
263
|
"to",
|
|
256
264
|
"innerRef",
|
|
257
265
|
"children"
|
|
258
266
|
]);
|
|
259
|
-
return
|
|
260
|
-
href:
|
|
261
|
-
ref:
|
|
267
|
+
return o(e, _object_spread_props(_object_spread({
|
|
268
|
+
href: r,
|
|
269
|
+
ref: a
|
|
262
270
|
}, i), {
|
|
263
271
|
children: t
|
|
264
272
|
}));
|
|
265
|
-
}, h = (
|
|
266
|
-
if (!
|
|
267
|
-
if (typeof
|
|
268
|
-
switch(
|
|
273
|
+
}, h = (e)=>{
|
|
274
|
+
if (!e) return C;
|
|
275
|
+
if (typeof e == "function" || e.$$typeof) return e;
|
|
276
|
+
switch(e.type){
|
|
269
277
|
case "ReactRouter5":
|
|
270
|
-
return
|
|
278
|
+
return m(e.Component);
|
|
271
279
|
case "ReactRouter6":
|
|
272
|
-
return f(
|
|
280
|
+
return f(e.Component);
|
|
273
281
|
case "Next12":
|
|
274
|
-
return
|
|
282
|
+
return p(e.Component);
|
|
275
283
|
case "Next13":
|
|
276
|
-
return
|
|
284
|
+
return v(e.Component);
|
|
277
285
|
default:
|
|
278
|
-
const
|
|
279
|
-
throw new Error(`Invalid Link type: ${
|
|
286
|
+
const r = e.type;
|
|
287
|
+
throw new Error(`Invalid Link type: ${r}`);
|
|
280
288
|
}
|
|
281
289
|
};
|
|
282
|
-
export {
|
|
290
|
+
export { u as NAVBAR_HEIGHT_DESKTOP, c as NAVBAR_HEIGHT_MOBILE, E as dimensions, h as getMisticaLinkComponent, b as getTexts };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./tooltip.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var v = "_1xhatbpb
|
|
3
|
+
var v = "_1xhatbpb _1y2v1nfb0 _1y2v1nfe6 _1y2v1nfbx _1y2v1nfcd _1y2v1nfdo _1y2v1nf31 _1y2v1nfdl", t = "_1xhatbpe", _ = "_1xhatbpf", n = "_1xhatbpd", e = "_1xhatbpc", f = "_1y2v1nfb0 _1y2v1nfc0 _1y2v1nfcd _1y2v1nfe4 _1y2v1nf2", p = "_1xhatbpj _1y2v1nf68 _1y2v1nf7h _1y2v1nf8q _1y2v1nf9z _1y2v1nfb0 _1y2v1nfeq _1y2v1nfbs _1y2v1nfdx _1y2v1nfdl", o = "_1xhatbpk", b = "_1xhatbpl", x = "_1xhatbpm", h = "_1xhatbpn", y = "_1xhatbpo", m = "_1xhatbp6", d = "_1xhatbp7", i = "_1xhatbp8", w = {
|
|
4
4
|
shadowAlpha: "var(--_1xhatbp0)",
|
|
5
5
|
enterTransform: "var(--_1xhatbp1)",
|
|
6
6
|
enterDoneTransform: "var(--_1xhatbp2)",
|
|
7
7
|
exitTransform: "var(--_1xhatbp3)",
|
|
8
8
|
enterActiveAnimationName: "var(--_1xhatbp4)",
|
|
9
9
|
arrowBoxShadow: "var(--_1xhatbp5)"
|
|
10
|
-
},
|
|
11
|
-
export { v as arrow, t as arrowBottom, _ as arrowLeft, n as arrowRight, e as arrowTop, f as arrowWrapper, p as container, o as enter,
|
|
10
|
+
}, s = "_1y2v1nfb8";
|
|
11
|
+
export { v as arrow, t as arrowBottom, _ as arrowLeft, n as arrowRight, e as arrowTop, f as arrowWrapper, p as container, o as enter, b as enterActive, x as enterDone, h as exit, y as exitActive, m as fadeInBottomKeyframes, d as fadeInTopKeyframes, i as fadeInXKeyframes, w as vars, s as wrapper };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./touchable.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var
|
|
4
|
-
export {
|
|
3
|
+
var n = "mhti6u1 _1y2v1nfe3", f = "mhti6u4", _ = "mhti6u1 _1y2v1nfe3 _1y2v1nf5z _1y2v1nf78 _1y2v1nf8h _1y2v1nf9q _1y2v1nfb6 _1y2v1nfdm _1y2v1nfbr _1y2v1nf2y _1y2v1nf5y _1y2v1nfe5";
|
|
4
|
+
export { n as base, f as notTouchable, _ as touchable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./aspect-ratio-support.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var
|
|
3
|
+
var a = "yqswj62", n = "_1y2v1nfbr _1y2v1nfc8 _1y2v1nfe6 _1y2v1nfel", y = {
|
|
4
4
|
aspectRatio: "var(--yqswj60)"
|
|
5
|
-
},
|
|
6
|
-
export {
|
|
5
|
+
}, e = "_1y2v1nfe4 _1y2v1nfdj _1y2v1nfdk _1y2v1nfaz";
|
|
6
|
+
export { a as container, n as containerWithWrapper, y as vars, e as wrapper };
|
|
@@ -55,10 +55,10 @@ import { assignInlineVars as m } from "@vanilla-extract/dynamic";
|
|
|
55
55
|
import l from "classnames";
|
|
56
56
|
import * as c from "react";
|
|
57
57
|
import { useIsomorphicLayoutEffect as f } from "../hooks.js";
|
|
58
|
-
import { container as w, containerWithWrapper as R, vars as
|
|
59
|
-
const u = /*#__PURE__*/ c.createContext(!0),
|
|
58
|
+
import { container as w, containerWithWrapper as R, vars as b, wrapper as g } from "./aspect-ratio-support.css-mistica.js";
|
|
59
|
+
const u = /*#__PURE__*/ c.createContext(!0), x = (param)=>{
|
|
60
60
|
let { children: t } = param;
|
|
61
|
-
const [
|
|
61
|
+
const [o, s] = c.useState(!0);
|
|
62
62
|
return f(()=>{
|
|
63
63
|
try {
|
|
64
64
|
CSS.supports("aspect-ratio", "1 / 1") || s(!1);
|
|
@@ -66,39 +66,40 @@ const u = /*#__PURE__*/ c.createContext(!0), C = (param)=>{
|
|
|
66
66
|
s(!1);
|
|
67
67
|
}
|
|
68
68
|
}, []), /* @__PURE__ */ h(u.Provider, {
|
|
69
|
-
value:
|
|
69
|
+
value: o,
|
|
70
70
|
children: t
|
|
71
71
|
});
|
|
72
|
-
},
|
|
73
|
-
const
|
|
72
|
+
}, N = ()=>c.useContext(u), W = (t)=>{
|
|
73
|
+
const o = N(), s = typeof t.width != "number" && typeof t.height != "number" && t.aspectRatio !== 0, e = s ? t.aspectRatio : void 0;
|
|
74
74
|
let i = t.width, a = t.height;
|
|
75
75
|
t.width !== void 0 && t.height !== void 0 ? (i = t.width, a = t.height) : typeof t.width == "number" ? a = t.aspectRatio !== 0 ? t.width / t.aspectRatio : void 0 : typeof t.height == "number" ? i = t.aspectRatio !== 0 ? t.height * t.aspectRatio : void 0 : i = t.width || "100%";
|
|
76
76
|
var _t_as;
|
|
77
|
-
const
|
|
77
|
+
const n = s && !o, r = /*#__PURE__*/ c.createElement((_t_as = t.as) !== null && _t_as !== void 0 ? _t_as : "div", _object_spread({
|
|
78
78
|
className: l(t.className, w, {
|
|
79
|
-
[R]:
|
|
79
|
+
[R]: n
|
|
80
80
|
}),
|
|
81
|
-
style: _object_spread({},
|
|
81
|
+
style: _object_spread({}, n ? _object_spread_props(_object_spread({}, t.style), {
|
|
82
82
|
position: e ? "absolute" : "static",
|
|
83
83
|
width: "100%"
|
|
84
84
|
}) : _object_spread_props(_object_spread({}, t.style), {
|
|
85
85
|
width: isNaN(Number(i)) ? i : Number(i),
|
|
86
86
|
height: isNaN(Number(a)) ? a : Number(a)
|
|
87
87
|
}), m({
|
|
88
|
-
[
|
|
88
|
+
[b.aspectRatio]: e ? String(e) : "unset"
|
|
89
89
|
}))
|
|
90
|
-
}, t.children);
|
|
91
|
-
if (
|
|
90
|
+
}, !n && t.dataAttributes), t.children);
|
|
91
|
+
if (n) {
|
|
92
92
|
const d = (()=>e ? t.width && typeof t.width == "string" && t.width.endsWith("%") ? `${Number(t.width.replace("%", "")) / e}%` : `${100 / e}%` : 0)();
|
|
93
|
-
return /* @__PURE__ */ h("div", {
|
|
93
|
+
return /* @__PURE__ */ h("div", _object_spread_props(_object_spread({
|
|
94
94
|
style: {
|
|
95
95
|
width: i,
|
|
96
96
|
height: a,
|
|
97
97
|
paddingTop: d
|
|
98
98
|
},
|
|
99
|
-
className:
|
|
99
|
+
className: g
|
|
100
|
+
}, t.dataAttributes), {
|
|
100
101
|
children: r
|
|
101
|
-
});
|
|
102
|
+
}));
|
|
102
103
|
} else return r;
|
|
103
104
|
};
|
|
104
|
-
export { W as
|
|
105
|
+
export { W as AspectRatioContainer, x as AspectRatioSupportProvider, N as useSupportsAspectRatio };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
|
-
var
|
|
3
|
-
export {
|
|
2
|
+
var f = "_1y2v1nfe6 _1y2v1nfel _1y2v1nfb6 _1y2v1nf5y _1y2v1nfdj _1y2v1nfdk _1y2v1nffu";
|
|
3
|
+
export { f as video };
|
package/dist-es/video.js
CHANGED
|
@@ -1,55 +1,3 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
-
var ownKeys = Object.keys(source);
|
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ownKeys.forEach(function(key) {
|
|
24
|
-
_define_property(target, key, source[key]);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
}
|
|
29
|
-
function ownKeys(object, enumerableOnly) {
|
|
30
|
-
var keys = Object.keys(object);
|
|
31
|
-
if (Object.getOwnPropertySymbols) {
|
|
32
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
-
if (enumerableOnly) {
|
|
34
|
-
symbols = symbols.filter(function(sym) {
|
|
35
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
keys.push.apply(keys, symbols);
|
|
39
|
-
}
|
|
40
|
-
return keys;
|
|
41
|
-
}
|
|
42
|
-
function _object_spread_props(target, source) {
|
|
43
|
-
source = source != null ? source : {};
|
|
44
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
-
} else {
|
|
47
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
return target;
|
|
52
|
-
}
|
|
53
1
|
function _object_without_properties(source, excluded) {
|
|
54
2
|
if (source == null) return {};
|
|
55
3
|
var target = _object_without_properties_loose(source, excluded);
|
|
@@ -77,14 +25,14 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
77
25
|
}
|
|
78
26
|
return target;
|
|
79
27
|
}
|
|
80
|
-
import { jsx as d, jsxs as
|
|
81
|
-
import * as
|
|
28
|
+
import { jsx as d, jsxs as G } from "react/jsx-runtime";
|
|
29
|
+
import * as n from "react";
|
|
82
30
|
import { useMediaBorderRadius as J, ImageContent as M, ImageError as O } from "./image.js";
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
31
|
+
import { AspectRatioContainer as P } from "./utils/aspect-ratio-support.js";
|
|
32
|
+
import { isRunningAcceptanceTest as Q } from "./utils/platform.js";
|
|
33
|
+
import { video as X } from "./video.css-mistica.js";
|
|
34
|
+
import { vars as Y } from "./skins/skin-contract.css-mistica.js";
|
|
35
|
+
import { getPrefixedDataAttributes as $ } from "./utils/dom.js";
|
|
88
36
|
const q = {
|
|
89
37
|
loading: {
|
|
90
38
|
play: "playing",
|
|
@@ -116,8 +64,8 @@ const q = {
|
|
|
116
64
|
"1:1": 1,
|
|
117
65
|
"16:9": 16 / 9,
|
|
118
66
|
"4:3": 4 / 3
|
|
119
|
-
}, _ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", z = /*#__PURE__*/
|
|
120
|
-
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:
|
|
67
|
+
}, _ = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", z = /*#__PURE__*/ n.forwardRef((_param, A)=>{
|
|
68
|
+
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: b , aspectRatio: c = "1:1" , dataAttributes: B } = _param, o = _object_without_properties(_param, [
|
|
121
69
|
"src",
|
|
122
70
|
"poster",
|
|
123
71
|
"autoPlay",
|
|
@@ -132,13 +80,13 @@ const q = {
|
|
|
132
80
|
"aspectRatio",
|
|
133
81
|
"dataAttributes"
|
|
134
82
|
]);
|
|
135
|
-
const [a, l] =
|
|
83
|
+
const [a, l] = n.useReducer(D, "loading"), s = n.useRef(null), C = n.useRef(), f = n.useRef(null), w = J(), g = typeof c == "number" ? c : K[c], v = n.useCallback(()=>{
|
|
136
84
|
a === "loading" && (l("fail"), h == null || h());
|
|
137
85
|
}, [
|
|
138
86
|
h,
|
|
139
87
|
a
|
|
140
88
|
]);
|
|
141
|
-
|
|
89
|
+
n.useEffect(()=>{
|
|
142
90
|
var e;
|
|
143
91
|
if (C.current !== r) {
|
|
144
92
|
C.current = r;
|
|
@@ -154,20 +102,20 @@ const q = {
|
|
|
154
102
|
]);
|
|
155
103
|
const I = ()=>{
|
|
156
104
|
y == null || y();
|
|
157
|
-
const e = s.current, t = p && !
|
|
105
|
+
const e = s.current, t = p && !Q();
|
|
158
106
|
l("finishLoad"), e && t && e.paused && e.play();
|
|
159
107
|
}, U = (Array.isArray(r) ? r : [
|
|
160
108
|
r
|
|
161
109
|
]).map((e)=>typeof e == "string" ? {
|
|
162
110
|
src: e
|
|
163
|
-
} : e),
|
|
111
|
+
} : e), m = a === "error" || a === "loading" || a === "loaded", V = /* @__PURE__ */ d("video", {
|
|
164
112
|
ref: s,
|
|
165
113
|
playsInline: !0,
|
|
166
114
|
disablePictureInPicture: !0,
|
|
167
115
|
disableRemotePlayback: !0,
|
|
168
116
|
muted: x,
|
|
169
117
|
loop: N,
|
|
170
|
-
className:
|
|
118
|
+
className: X,
|
|
171
119
|
preload: k,
|
|
172
120
|
onError: v,
|
|
173
121
|
onPause: ()=>{
|
|
@@ -175,7 +123,7 @@ const q = {
|
|
|
175
123
|
},
|
|
176
124
|
onTimeUpdate: ()=>{
|
|
177
125
|
var e;
|
|
178
|
-
a !== "playing" && ((e = s.current) == null ? void 0 : e.currentTime) !== 0 && (
|
|
126
|
+
a !== "playing" && ((e = s.current) == null ? void 0 : e.currentTime) !== 0 && (b == null || b(), l("play"));
|
|
179
127
|
},
|
|
180
128
|
onCanPlay: ()=>{
|
|
181
129
|
p === "streaming" && I();
|
|
@@ -183,13 +131,12 @@ const q = {
|
|
|
183
131
|
onCanPlayThrough: ()=>{
|
|
184
132
|
p !== "streaming" && I();
|
|
185
133
|
},
|
|
186
|
-
poster: _
|
|
187
|
-
}, Q(B)), {
|
|
134
|
+
poster: _,
|
|
188
135
|
style: {
|
|
189
136
|
// For some reason adding this style with classnames doesn't add the border radius in safari
|
|
190
|
-
borderRadius:
|
|
191
|
-
visibility:
|
|
192
|
-
position:
|
|
137
|
+
borderRadius: w ? Y.borderRadii.container : 0,
|
|
138
|
+
visibility: m ? "hidden" : "visible",
|
|
139
|
+
position: m || g !== 0 ? "absolute" : "static",
|
|
193
140
|
width: "100%",
|
|
194
141
|
height: "100%"
|
|
195
142
|
},
|
|
@@ -200,10 +147,10 @@ const q = {
|
|
|
200
147
|
type: t
|
|
201
148
|
}, i);
|
|
202
149
|
})
|
|
203
|
-
})
|
|
150
|
+
}), E = !!(g !== 0 || o.width && o.height), F = a === "error", j = n.useMemo(()=>u ? /* @__PURE__ */ d(M, {
|
|
204
151
|
aspectRatio: c,
|
|
205
|
-
width:
|
|
206
|
-
height:
|
|
152
|
+
width: o.width,
|
|
153
|
+
height: o.height,
|
|
207
154
|
src: u
|
|
208
155
|
}) : E ? /* @__PURE__ */ d("div", {
|
|
209
156
|
style: {
|
|
@@ -212,25 +159,26 @@ const q = {
|
|
|
212
159
|
height: "100%"
|
|
213
160
|
},
|
|
214
161
|
children: /* @__PURE__ */ d(O, {
|
|
215
|
-
noBorderRadius: !
|
|
162
|
+
noBorderRadius: !w,
|
|
216
163
|
withIcon: F
|
|
217
164
|
})
|
|
218
165
|
}) : void 0, [
|
|
219
166
|
c,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
167
|
+
o.height,
|
|
168
|
+
o.width,
|
|
169
|
+
w,
|
|
223
170
|
F,
|
|
224
171
|
u,
|
|
225
172
|
E
|
|
226
173
|
]);
|
|
227
|
-
return /* @__PURE__ */
|
|
174
|
+
return /* @__PURE__ */ G(P, {
|
|
228
175
|
style: {
|
|
229
176
|
position: "relative"
|
|
230
177
|
},
|
|
231
|
-
aspectRatio:
|
|
232
|
-
width:
|
|
233
|
-
height:
|
|
178
|
+
aspectRatio: g,
|
|
179
|
+
width: o.width,
|
|
180
|
+
height: o.height,
|
|
181
|
+
dataAttributes: $(B, "Video"),
|
|
234
182
|
children: [
|
|
235
183
|
/* @__PURE__ */ d("div", {
|
|
236
184
|
style: {
|
|
@@ -257,16 +205,16 @@ const q = {
|
|
|
257
205
|
}), typeof A == "function" ? A(t) : A && (A.current = t);
|
|
258
206
|
}
|
|
259
207
|
}),
|
|
260
|
-
|
|
208
|
+
V,
|
|
261
209
|
/* @__PURE__ */ d("div", {
|
|
262
210
|
ref: f,
|
|
263
211
|
style: {
|
|
264
|
-
position:
|
|
265
|
-
width:
|
|
266
|
-
height:
|
|
212
|
+
position: g !== 0 ? "absolute" : "static",
|
|
213
|
+
width: m ? "100%" : 0,
|
|
214
|
+
height: m ? "100%" : 0,
|
|
267
215
|
overflow: "hidden"
|
|
268
216
|
},
|
|
269
|
-
children:
|
|
217
|
+
children: j
|
|
270
218
|
})
|
|
271
219
|
]
|
|
272
220
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telefonica/mistica",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.18.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -198,5 +198,5 @@
|
|
|
198
198
|
"@types/react-dom": "^18.0.10",
|
|
199
199
|
"@testing-library/dom": "^8.19.1"
|
|
200
200
|
},
|
|
201
|
-
"packageManager": "yarn@3.
|
|
201
|
+
"packageManager": "yarn@3.6.1"
|
|
202
202
|
}
|