@telefonica/mistica 15.2.0 → 15.3.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/box.js +3 -3
- package/dist/boxed.js +2 -2
- package/dist/button-group.js +2 -2
- package/dist/button.js +5 -5
- package/dist/carousel.js +29 -29
- package/dist/chip.js +2 -2
- package/dist/community/advanced-data-card.d.ts +6 -2
- package/dist/community/advanced-data-card.js +4 -4
- package/dist/counter.js +7 -7
- package/dist/feedback.js +2 -2
- package/dist/fixed-footer-layout.css-mistica.js +5 -5
- package/dist/fixed-footer-layout.js +19 -17
- package/dist/form.js +6 -6
- package/dist/hero.css-mistica.js +12 -6
- package/dist/hero.css.d.ts +2 -0
- package/dist/hero.d.ts +2 -1
- package/dist/hero.js +80 -69
- package/dist/horizontal-scroll.js +2 -2
- package/dist/image.js +9 -7
- package/dist/list.js +19 -15
- package/dist/loading-bar.js +2 -2
- package/dist/loading-screen.js +3 -3
- package/dist/package-version.js +1 -1
- package/dist/pin-field.js +2 -2
- package/dist/progress-bar.js +4 -4
- package/dist/radio-button.js +3 -3
- package/dist/responsive-layout.css-mistica.js +18 -9
- package/dist/responsive-layout.d.ts +1 -0
- package/dist/responsive-layout.js +15 -15
- package/dist/select.js +16 -16
- package/dist/sheet.js +82 -81
- package/dist/slider.js +8 -8
- package/dist/tag.js +2 -2
- package/dist/text-field-base.js +3 -3
- package/dist/text-field-components.js +2 -2
- package/dist/text.js +105 -84
- package/dist/utils/aspect-ratio-support.js +8 -8
- package/dist/utils/browser.js +1 -1
- package/dist/video.js +2 -2
- package/dist-es/box.js +7 -7
- package/dist-es/boxed.js +2 -2
- package/dist-es/button-group.js +4 -4
- package/dist-es/button-layout.js +5 -5
- package/dist-es/button.js +11 -11
- package/dist-es/callout.js +8 -8
- package/dist-es/carousel.js +29 -29
- package/dist-es/checkbox.js +7 -7
- package/dist-es/chip.js +4 -4
- package/dist-es/community/advanced-data-card.js +14 -14
- package/dist-es/counter.js +21 -21
- package/dist-es/empty-state.js +12 -12
- package/dist-es/feedback.js +5 -5
- package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
- package/dist-es/fixed-footer-layout.js +33 -31
- package/dist-es/form.js +9 -9
- package/dist-es/grid.js +3 -3
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +119 -108
- package/dist-es/horizontal-scroll.js +2 -2
- package/dist-es/image.js +15 -13
- package/dist-es/list.js +15 -11
- package/dist-es/loading-bar.js +6 -6
- package/dist-es/loading-screen.js +8 -8
- package/dist-es/package-version.js +1 -1
- package/dist-es/pin-field.js +10 -10
- package/dist-es/progress-bar.js +9 -9
- package/dist-es/radio-button.js +9 -9
- package/dist-es/responsive-layout.css-mistica.js +3 -3
- package/dist-es/responsive-layout.js +21 -21
- package/dist-es/select.js +22 -22
- package/dist-es/sheet.js +124 -123
- package/dist-es/slider.js +8 -8
- package/dist-es/style.css +1 -1
- package/dist-es/tag.js +4 -4
- package/dist-es/text-field-base.js +11 -11
- package/dist-es/text-field-components.js +9 -9
- package/dist-es/text-link.js +5 -5
- package/dist-es/text.js +103 -82
- package/dist-es/utils/aspect-ratio-support.js +14 -14
- package/dist-es/utils/browser.js +1 -1
- package/dist-es/video.js +5 -5
- package/package.json +1 -1
|
@@ -82,14 +82,14 @@ import { jsx as n, jsxs as ie } from "react/jsx-runtime";
|
|
|
82
82
|
import * as d from "react";
|
|
83
83
|
import { FieldContainer as ne, HelperText as ae, Label as re } from "./text-field-components.js";
|
|
84
84
|
import { LABEL_SCALE_MOBILE as le, LABEL_SCALE_DESKTOP as oe } from "./text-field-components.css-mistica.js";
|
|
85
|
-
import { Text3 as
|
|
85
|
+
import { Text3 as F } from "./text.js";
|
|
86
86
|
import { isFirefox as de, isRunningAcceptanceTest as se } from "./utils/platform.js";
|
|
87
87
|
import { useAriaId as L, useScreenSize as ce, useIsomorphicLayoutEffect as fe, useTheme as ue } from "./hooks.js";
|
|
88
88
|
import v from "classnames";
|
|
89
89
|
import { combineRefs as k } from "./utils/common.js";
|
|
90
90
|
import { startIcon as me, prefix as he, inputWithLabel as _, inputWithoutLabel as G, fullWidth as ge, fieldRightPadding as j, fieldLeftPadding as T, textArea as pe, textAreaWithLabel as Se, textAreaWithoutLabel as xe, input as be, inputFirefoxStyles as ye, hiddenDatePlaceholder as Ce, emptyDateValue as Ee, endIconContainer as Ie, menuItem as Re, menuItemSelected as Te, suggestionsContainer as ve, fieldEndIconContainer as Le, fieldElementsGap as Ae, iconButtonSize as $e, fieldEndIconGap as We } from "./text-field-base.css-mistica.js";
|
|
91
|
-
import { vars as
|
|
92
|
-
import { InternalToggleIconButton as
|
|
91
|
+
import { vars as Fe } from "./skins/skin-contract.css-mistica.js";
|
|
92
|
+
import { InternalToggleIconButton as Ne, InternalIconButton as we } from "./icon-button.js";
|
|
93
93
|
import { ThemeVariant as Pe } from "./theme-variant-context.js";
|
|
94
94
|
import { iconSize as Oe } from "./icon-button.css-mistica.js";
|
|
95
95
|
const Be = (o, f)=>{
|
|
@@ -100,7 +100,7 @@ const Be = (o, f)=>{
|
|
|
100
100
|
let { hasBackgroundColor: o = !0, onPress: f, onChange: i, disabled: m, Icon: g, checkedProps: r, uncheckedProps: a, "aria-label": h } = param;
|
|
101
101
|
return /* @__PURE__ */ n("div", {
|
|
102
102
|
className: Le,
|
|
103
|
-
children: r ? /* @__PURE__ */ n(
|
|
103
|
+
children: r ? /* @__PURE__ */ n(Ne, {
|
|
104
104
|
checkedProps: _object_spread_props(_object_spread({}, r), {
|
|
105
105
|
"aria-label": r["aria-label"] || ""
|
|
106
106
|
}),
|
|
@@ -119,7 +119,7 @@ const Be = (o, f)=>{
|
|
|
119
119
|
})
|
|
120
120
|
});
|
|
121
121
|
}, W = /*#__PURE__*/ d.forwardRef((_param, U)=>{
|
|
122
|
-
var { error: o, helperText: f, label: i, inputProps: m, inputRef: g, defaultValue: r, value: a, onFocus: h, onBlur: x, inputComponent: p, prefix: b, startIcon: t, endIcon: u, endIconOverlay: S, shrinkLabel:
|
|
122
|
+
var { error: o, helperText: f, label: i, inputProps: m, inputRef: g, defaultValue: r, value: a, onFocus: h, onBlur: x, inputComponent: p, prefix: b, startIcon: t, endIcon: u, endIconOverlay: S, shrinkLabel: N, multiline: R = !1, focus: y, fieldRef: H, maxLength: C, id: K, autoComplete: M, fullWidth: J, dataAttributes: Q } = _param, l = _object_without_properties(_param, [
|
|
123
123
|
"error",
|
|
124
124
|
"helperText",
|
|
125
125
|
"label",
|
|
@@ -167,7 +167,7 @@ const Be = (o, f)=>{
|
|
|
167
167
|
}, I = _object_spread(_object_spread_props(_object_spread({}, l), {
|
|
168
168
|
maxLength: C,
|
|
169
169
|
autoComplete: M
|
|
170
|
-
}), m), $ = `calc(${Oe.default} + ${Ae}px)`, q = `calc(${$e} + ${We}px)`, V =
|
|
170
|
+
}), m), $ = `calc(${Oe.default} + ${Ae}px)`, q = `calc(${$e} + ${We}px)`, V = N || s === "focused" || s === "filled" ? X ? le : oe : 1, ee = {
|
|
171
171
|
left: `calc(${T}px + ${t ? $ : "0px"})`,
|
|
172
172
|
// shrinking means applying a scale transformation, so width will be proportionally reduced.
|
|
173
173
|
// Let's keep the original width.
|
|
@@ -198,8 +198,8 @@ const Be = (o, f)=>{
|
|
|
198
198
|
style: {
|
|
199
199
|
opacity: s === "default" ? 0 : 1
|
|
200
200
|
},
|
|
201
|
-
children: /* @__PURE__ */ n(
|
|
202
|
-
color:
|
|
201
|
+
children: /* @__PURE__ */ n(F, {
|
|
202
|
+
color: Fe.colors.textSecondary,
|
|
203
203
|
regular: !0,
|
|
204
204
|
wordBreak: !1,
|
|
205
205
|
children: b
|
|
@@ -207,7 +207,7 @@ const Be = (o, f)=>{
|
|
|
207
207
|
}),
|
|
208
208
|
/* @__PURE__ */ n("div", {
|
|
209
209
|
className: ge,
|
|
210
|
-
children: /* @__PURE__ */ n(
|
|
210
|
+
children: /* @__PURE__ */ n(F, {
|
|
211
211
|
as: "div",
|
|
212
212
|
regular: !0,
|
|
213
213
|
children: /*#__PURE__*/ d.createElement(p || Y, _object_spread(_object_spread_props(_object_spread({}, Z, I), {
|
|
@@ -249,7 +249,7 @@ const Be = (o, f)=>{
|
|
|
249
249
|
error: o,
|
|
250
250
|
forId: w,
|
|
251
251
|
inputState: s,
|
|
252
|
-
shrinkLabel:
|
|
252
|
+
shrinkLabel: N,
|
|
253
253
|
optional: !l.required,
|
|
254
254
|
children: i
|
|
255
255
|
}),
|
|
@@ -308,7 +308,7 @@ const Be = (o, f)=>{
|
|
|
308
308
|
className: v(Re, {
|
|
309
309
|
[Te]: u
|
|
310
310
|
}),
|
|
311
|
-
children: /* @__PURE__ */ n(
|
|
311
|
+
children: /* @__PURE__ */ n(F, {
|
|
312
312
|
regular: !0,
|
|
313
313
|
children: t
|
|
314
314
|
})
|
|
@@ -51,32 +51,32 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
import { jsxs as m, jsx as o, Fragment as
|
|
54
|
+
import { jsxs as m, jsx as o, Fragment as y } from "react/jsx-runtime";
|
|
55
55
|
import * as x from "react";
|
|
56
56
|
import c from "classnames";
|
|
57
|
-
import { useIsInverseVariant as
|
|
57
|
+
import { useIsInverseVariant as N } from "./theme-variant-context.js";
|
|
58
58
|
import { useTheme as C } from "./hooks.js";
|
|
59
59
|
import { Text1 as v } from "./text.js";
|
|
60
60
|
import { labelContainer as k, shrinked as S, labelText as I, helperText as b, leftText as F, rightText as E, fieldContainer as L, fullWidth as P, normalWidth as W, disabled as j, field as w, helperContainer as A } from "./text-field-components.css-mistica.js";
|
|
61
|
-
import { sprinkles as
|
|
61
|
+
import { sprinkles as T } from "./sprinkles.css-mistica.js";
|
|
62
62
|
import { vars as e } from "./skins/skin-contract.css-mistica.js";
|
|
63
63
|
import { getPrefixedDataAttributes as D } from "./utils/dom.js";
|
|
64
64
|
const J = (param)=>{
|
|
65
65
|
let { shrinkLabel: t, forId: s, inputState: r, error: l, children: i, style: n, optional: a } = param;
|
|
66
66
|
const f = t || r === "focused" || r === "filled", [u, h] = x.useState("initial"), { texts: d } = C();
|
|
67
67
|
x.useEffect(()=>{
|
|
68
|
-
const
|
|
68
|
+
const g = setTimeout(()=>{
|
|
69
69
|
process.env.NODE_ENV !== "test" && h("transform 150ms, width 150ms");
|
|
70
70
|
});
|
|
71
71
|
return ()=>{
|
|
72
|
-
clearTimeout(
|
|
72
|
+
clearTimeout(g);
|
|
73
73
|
};
|
|
74
74
|
}, []);
|
|
75
75
|
let p = e.colors.textSecondary;
|
|
76
76
|
return l && r !== "default" ? p = e.colors.error : r === "focused" && (p = e.colors.controlActivated), /* @__PURE__ */ m("label", {
|
|
77
77
|
className: c(k, {
|
|
78
78
|
[S]: f
|
|
79
|
-
},
|
|
79
|
+
}, T({
|
|
80
80
|
color: p
|
|
81
81
|
})),
|
|
82
82
|
htmlFor: s,
|
|
@@ -99,8 +99,8 @@ const J = (param)=>{
|
|
|
99
99
|
});
|
|
100
100
|
}, K = (param)=>{
|
|
101
101
|
let { leftText: t, rightText: s, error: r, id: l } = param;
|
|
102
|
-
const i =
|
|
103
|
-
return /* @__PURE__ */ m(
|
|
102
|
+
const i = N(), n = i ? e.colors.textPrimaryInverse : r ? e.colors.error : e.colors.textSecondary, a = i ? e.colors.textPrimaryInverse : e.colors.textSecondary;
|
|
103
|
+
return /* @__PURE__ */ m(y, {
|
|
104
104
|
children: [
|
|
105
105
|
t && /* @__PURE__ */ o("div", {
|
|
106
106
|
className: c(b, F),
|
|
@@ -137,7 +137,7 @@ const J = (param)=>{
|
|
|
137
137
|
}, D(u)), {
|
|
138
138
|
children: [
|
|
139
139
|
/* @__PURE__ */ o("div", {
|
|
140
|
-
className: c(w,
|
|
140
|
+
className: c(w, T({
|
|
141
141
|
background: f ? e.colors.neutralLow : e.colors.backgroundContainer
|
|
142
142
|
}), i),
|
|
143
143
|
ref: n,
|
package/dist-es/text-link.js
CHANGED
|
@@ -84,9 +84,9 @@ import l from "classnames";
|
|
|
84
84
|
import { useTheme as p } from "./hooks.js";
|
|
85
85
|
import { useIsInverseVariant as k } from "./theme-variant-context.js";
|
|
86
86
|
import { useForm as d } from "./form-context.js";
|
|
87
|
-
import { getTextFromChildren as
|
|
87
|
+
import { getTextFromChildren as o } from "./utils/common.js";
|
|
88
88
|
import { useTrackingConfig as T, eventNames as x, eventCategories as I, eventActions as y } from "./utils/analytics.js";
|
|
89
|
-
import { variants as
|
|
89
|
+
import { variants as n } from "./text-link.css-mistica.js";
|
|
90
90
|
const E = (_param)=>{
|
|
91
91
|
var { children: t, className: r = "", disabled: a, style: s } = _param, e = _object_without_properties(_param, [
|
|
92
92
|
"children",
|
|
@@ -97,11 +97,11 @@ const E = (_param)=>{
|
|
|
97
97
|
const i = k(), { isDarkMode: m } = p(), { formStatus: c } = d(), { eventFormat: f } = T(), u = ()=>f === "google-analytics-4" ? {
|
|
98
98
|
name: x.userInteraction,
|
|
99
99
|
component_type: "link",
|
|
100
|
-
component_copy:
|
|
100
|
+
component_copy: o(t)
|
|
101
101
|
} : {
|
|
102
102
|
category: I.userInteraction,
|
|
103
103
|
action: y.linkTapped,
|
|
104
|
-
label:
|
|
104
|
+
label: o(t)
|
|
105
105
|
};
|
|
106
106
|
var _e_trackingEvent;
|
|
107
107
|
return /* @__PURE__ */ v(g, _object_spread_props(_object_spread({}, e), {
|
|
@@ -109,7 +109,7 @@ const E = (_param)=>{
|
|
|
109
109
|
as: e.onPress ? "a" : void 0,
|
|
110
110
|
trackingEvent: (_e_trackingEvent = e.trackingEvent) !== null && _e_trackingEvent !== void 0 ? _e_trackingEvent : e.trackEvent ? u() : void 0,
|
|
111
111
|
disabled: a || c === "sending",
|
|
112
|
-
className: l(i ? m ?
|
|
112
|
+
className: l(i ? m ? n.inverseDark : n.inverseLight : n.default, r),
|
|
113
113
|
style: s,
|
|
114
114
|
children: t
|
|
115
115
|
}));
|
package/dist-es/text.js
CHANGED
|
@@ -78,250 +78,271 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
82
|
-
import * as
|
|
81
|
+
import { jsx as r, Fragment as z, jsxs as w } from "react/jsx-runtime";
|
|
82
|
+
import * as v from "react";
|
|
83
83
|
import B from "classnames";
|
|
84
|
-
import { useIsInverseVariant as
|
|
84
|
+
import { useIsInverseVariant as K } from "./theme-variant-context.js";
|
|
85
85
|
import { applyCssVars as L, pxToRem as p } from "./utils/css.js";
|
|
86
86
|
import { getPrefixedDataAttributes as M } from "./utils/dom.js";
|
|
87
|
-
import { useTheme as
|
|
88
|
-
import { vars as
|
|
89
|
-
import { text as
|
|
90
|
-
|
|
87
|
+
import { useTheme as m } from "./hooks.js";
|
|
88
|
+
import { vars as a } from "./skins/skin-contract.css-mistica.js";
|
|
89
|
+
import { text as q, withWordBreak as G, withoutWordBreak as J, truncate as Q, truncateToOneLine as U, vars as l } from "./text.css-mistica.js";
|
|
90
|
+
import { VIVO_NEW_SKIN as X } from "./skins/constants.js";
|
|
91
|
+
import Y from "./screen-reader-only.js";
|
|
92
|
+
const Z = {
|
|
91
93
|
light: 300,
|
|
92
94
|
regular: 400,
|
|
93
95
|
medium: 500,
|
|
94
96
|
bold: 700
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
}, $ = (e)=>e === !0 ? 1 : e || "initial", g = "Ħ", ee = /* @__PURE__ */ w(z, {
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ r("span", {
|
|
100
|
+
"aria-hidden": !0,
|
|
101
|
+
children: g
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ r(Y, {
|
|
104
|
+
children: /* @__PURE__ */ r("span", {
|
|
105
|
+
children: "Vivo"
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
}), te = (e)=>e.includes(g) ? /* @__PURE__ */ r(z, {
|
|
110
|
+
children: e.split(g).map((i, t)=>/* @__PURE__ */ w(v.Fragment, {
|
|
111
|
+
children: [
|
|
112
|
+
t > 0 && ee,
|
|
113
|
+
i
|
|
114
|
+
]
|
|
115
|
+
}, t))
|
|
116
|
+
}) : e, o = (param)=>{
|
|
117
|
+
let { weight: e, color: i = a.colors.textPrimary, decoration: t, truncate: n, transform: c, wordBreak: d = !0, hyphens: u = "auto", as: A = "span", children: x, size: b, mobileSize: T = b, desktopSize: S = b, lineHeight: f, mobileLineHeight: k = f, desktopLineHeight: H = f, letterSpacing: V, textAlign: y, textShadow: I, id: P, role: W, "aria-level": C, dataAttributes: R } = param;
|
|
118
|
+
const { skinName: N } = m(), F = K(), O = $(n), _ = {
|
|
119
|
+
[a.colors.textPrimary]: a.colors.textPrimaryInverse,
|
|
120
|
+
[a.colors.textSecondary]: a.colors.textSecondaryInverse,
|
|
121
|
+
[a.colors.textLink]: a.colors.textLinkInverse
|
|
101
122
|
};
|
|
102
|
-
if (!
|
|
103
|
-
const
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
}),
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
}),
|
|
112
|
-
[
|
|
123
|
+
if (!x && x !== 0) return null;
|
|
124
|
+
const j = B(q, d ? G : J, {
|
|
125
|
+
[Q]: n,
|
|
126
|
+
[U]: n === 1 || n === !0
|
|
127
|
+
}), D = L({
|
|
128
|
+
[l.mobileSize]: T ? p(T) : "inherit",
|
|
129
|
+
[l.mobileLineHeight]: k ? p(k) : "inherit",
|
|
130
|
+
[l.desktopSize]: S ? p(S) : "inherit",
|
|
131
|
+
[l.desktopLineHeight]: H ? p(H) : "inherit"
|
|
132
|
+
}), E = n ? L({
|
|
133
|
+
[l.lineClamp]: String(O)
|
|
113
134
|
}) : {};
|
|
114
|
-
var
|
|
115
|
-
return /*#__PURE__*/
|
|
116
|
-
className:
|
|
117
|
-
id:
|
|
118
|
-
role:
|
|
119
|
-
"aria-level":
|
|
120
|
-
}, M(
|
|
121
|
-
style: _object_spread_props(_object_spread({},
|
|
135
|
+
var __i;
|
|
136
|
+
return /*#__PURE__*/ v.createElement(A, _object_spread_props(_object_spread({
|
|
137
|
+
className: j,
|
|
138
|
+
id: P,
|
|
139
|
+
role: W,
|
|
140
|
+
"aria-level": C
|
|
141
|
+
}, M(R, "Text")), {
|
|
142
|
+
style: _object_spread_props(_object_spread({}, D, E), {
|
|
122
143
|
hyphens: u,
|
|
123
144
|
WebkitHyphens: u,
|
|
124
|
-
letterSpacing:
|
|
125
|
-
fontWeight: e ?
|
|
126
|
-
textTransform:
|
|
145
|
+
letterSpacing: V,
|
|
146
|
+
fontWeight: e ? Z[e] : "inherit",
|
|
147
|
+
textTransform: c || "inherit",
|
|
127
148
|
textDecoration: t !== null && t !== void 0 ? t : "inherit",
|
|
128
|
-
overflowWrap:
|
|
129
|
-
color:
|
|
130
|
-
textAlign:
|
|
131
|
-
textShadow:
|
|
149
|
+
overflowWrap: d ? "anywhere" : "inherit",
|
|
150
|
+
color: F ? (__i = _[i]) !== null && __i !== void 0 ? __i : i : i,
|
|
151
|
+
textAlign: y,
|
|
152
|
+
textShadow: I
|
|
132
153
|
})
|
|
133
|
-
}),
|
|
134
|
-
},
|
|
154
|
+
}), typeof x == "string" && N === X ? te(x) : x);
|
|
155
|
+
}, h = (e)=>{
|
|
135
156
|
if (e.light) return "light";
|
|
136
157
|
if (e.regular) return "regular";
|
|
137
158
|
if (e.medium) return "medium";
|
|
138
159
|
if (e.weight) return e.weight;
|
|
139
160
|
}, s = (param)=>{
|
|
140
|
-
let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize:
|
|
161
|
+
let { forceMobileSizes: e, mobileSize: i, mobileLineHeight: t, desktopSize: n, desktopLineHeight: c } = param;
|
|
141
162
|
return e ? {
|
|
142
163
|
size: i,
|
|
143
164
|
lineHeight: t
|
|
144
165
|
} : {
|
|
145
166
|
mobileSize: i,
|
|
146
167
|
mobileLineHeight: t,
|
|
147
|
-
desktopSize:
|
|
148
|
-
desktopLineHeight:
|
|
168
|
+
desktopSize: n,
|
|
169
|
+
desktopLineHeight: c
|
|
149
170
|
};
|
|
150
|
-
},
|
|
171
|
+
}, he = (_param)=>{
|
|
151
172
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
152
173
|
"dataAttributes",
|
|
153
174
|
"forceMobileSizes"
|
|
154
175
|
]);
|
|
155
|
-
const { textPresets:
|
|
156
|
-
return /* @__PURE__ */ r(
|
|
176
|
+
const { textPresets: n } = m();
|
|
177
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
157
178
|
forceMobileSizes: i,
|
|
158
179
|
mobileSize: 48,
|
|
159
180
|
mobileLineHeight: "56px",
|
|
160
181
|
desktopSize: 64,
|
|
161
182
|
desktopLineHeight: "72px"
|
|
162
183
|
})), {
|
|
163
|
-
weight:
|
|
184
|
+
weight: n.text10.weight,
|
|
164
185
|
dataAttributes: _object_spread({
|
|
165
186
|
"component-name": "Text10"
|
|
166
187
|
}, e)
|
|
167
188
|
}), t));
|
|
168
|
-
},
|
|
189
|
+
}, ce = (_param)=>{
|
|
169
190
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
170
191
|
"dataAttributes",
|
|
171
192
|
"forceMobileSizes"
|
|
172
193
|
]);
|
|
173
|
-
const { textPresets:
|
|
174
|
-
return /* @__PURE__ */ r(
|
|
194
|
+
const { textPresets: n } = m();
|
|
195
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
175
196
|
forceMobileSizes: i,
|
|
176
197
|
mobileSize: 40,
|
|
177
198
|
mobileLineHeight: "48px",
|
|
178
199
|
desktopSize: 56,
|
|
179
200
|
desktopLineHeight: "64px"
|
|
180
201
|
})), {
|
|
181
|
-
weight:
|
|
202
|
+
weight: n.text9.weight,
|
|
182
203
|
dataAttributes: _object_spread({
|
|
183
204
|
"component-name": "Text9"
|
|
184
205
|
}, e)
|
|
185
206
|
}), t));
|
|
186
|
-
},
|
|
207
|
+
}, ge = (_param)=>{
|
|
187
208
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
188
209
|
"dataAttributes",
|
|
189
210
|
"forceMobileSizes"
|
|
190
211
|
]);
|
|
191
|
-
const { textPresets:
|
|
192
|
-
return /* @__PURE__ */ r(
|
|
212
|
+
const { textPresets: n } = m();
|
|
213
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
193
214
|
forceMobileSizes: i,
|
|
194
215
|
mobileSize: 32,
|
|
195
216
|
mobileLineHeight: "40px",
|
|
196
217
|
desktopSize: 48,
|
|
197
218
|
desktopLineHeight: "56px"
|
|
198
219
|
})), {
|
|
199
|
-
weight:
|
|
220
|
+
weight: n.text8.weight,
|
|
200
221
|
dataAttributes: _object_spread({
|
|
201
222
|
"component-name": "Text8"
|
|
202
223
|
}, e)
|
|
203
224
|
}), t));
|
|
204
|
-
},
|
|
225
|
+
}, de = (_param)=>{
|
|
205
226
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
206
227
|
"dataAttributes",
|
|
207
228
|
"forceMobileSizes"
|
|
208
229
|
]);
|
|
209
|
-
const { textPresets:
|
|
210
|
-
return /* @__PURE__ */ r(
|
|
230
|
+
const { textPresets: n } = m();
|
|
231
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
211
232
|
forceMobileSizes: i,
|
|
212
233
|
mobileSize: 28,
|
|
213
234
|
mobileLineHeight: "32px",
|
|
214
235
|
desktopSize: 40,
|
|
215
236
|
desktopLineHeight: "48px"
|
|
216
237
|
})), {
|
|
217
|
-
weight:
|
|
238
|
+
weight: n.text7.weight,
|
|
218
239
|
dataAttributes: _object_spread({
|
|
219
240
|
"component-name": "Text7"
|
|
220
241
|
}, e)
|
|
221
242
|
}), t));
|
|
222
|
-
},
|
|
243
|
+
}, ue = (_param)=>{
|
|
223
244
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
224
245
|
"dataAttributes",
|
|
225
246
|
"forceMobileSizes"
|
|
226
247
|
]);
|
|
227
|
-
const { textPresets:
|
|
228
|
-
return /* @__PURE__ */ r(
|
|
248
|
+
const { textPresets: n } = m();
|
|
249
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
229
250
|
forceMobileSizes: i,
|
|
230
251
|
mobileSize: 24,
|
|
231
252
|
mobileLineHeight: "32px",
|
|
232
253
|
desktopSize: 32,
|
|
233
254
|
desktopLineHeight: "40px"
|
|
234
255
|
})), {
|
|
235
|
-
weight:
|
|
256
|
+
weight: n.text6.weight,
|
|
236
257
|
dataAttributes: _object_spread({
|
|
237
258
|
"component-name": "Text6"
|
|
238
259
|
}, e)
|
|
239
260
|
}), t));
|
|
240
|
-
},
|
|
261
|
+
}, be = (_param)=>{
|
|
241
262
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
242
263
|
"dataAttributes",
|
|
243
264
|
"forceMobileSizes"
|
|
244
265
|
]);
|
|
245
|
-
const { textPresets:
|
|
246
|
-
return /* @__PURE__ */ r(
|
|
266
|
+
const { textPresets: n } = m();
|
|
267
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
247
268
|
forceMobileSizes: i,
|
|
248
269
|
mobileSize: 20,
|
|
249
270
|
mobileLineHeight: "24px",
|
|
250
271
|
desktopSize: 28,
|
|
251
272
|
desktopLineHeight: "32px"
|
|
252
273
|
})), {
|
|
253
|
-
weight:
|
|
274
|
+
weight: n.text5.weight,
|
|
254
275
|
dataAttributes: _object_spread({
|
|
255
276
|
"component-name": "Text5"
|
|
256
277
|
}, e)
|
|
257
278
|
}), t));
|
|
258
|
-
},
|
|
279
|
+
}, Te = (_param)=>{
|
|
259
280
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
260
281
|
"dataAttributes",
|
|
261
282
|
"forceMobileSizes"
|
|
262
283
|
]);
|
|
263
|
-
return /* @__PURE__ */ r(
|
|
284
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
264
285
|
forceMobileSizes: i,
|
|
265
286
|
mobileSize: 18,
|
|
266
287
|
mobileLineHeight: "24px",
|
|
267
288
|
desktopSize: 20,
|
|
268
289
|
desktopLineHeight: "28px"
|
|
269
290
|
})), {
|
|
270
|
-
weight:
|
|
291
|
+
weight: h(t),
|
|
271
292
|
dataAttributes: _object_spread({
|
|
272
293
|
"component-name": "Text4"
|
|
273
294
|
}, e)
|
|
274
295
|
}), t));
|
|
275
|
-
},
|
|
296
|
+
}, Se = (_param)=>{
|
|
276
297
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
277
298
|
"dataAttributes",
|
|
278
299
|
"forceMobileSizes"
|
|
279
300
|
]);
|
|
280
|
-
return /* @__PURE__ */ r(
|
|
301
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
281
302
|
forceMobileSizes: i,
|
|
282
303
|
mobileSize: 16,
|
|
283
304
|
mobileLineHeight: "24px",
|
|
284
305
|
desktopSize: 18,
|
|
285
306
|
desktopLineHeight: "24px"
|
|
286
307
|
})), {
|
|
287
|
-
weight:
|
|
308
|
+
weight: h(t),
|
|
288
309
|
dataAttributes: _object_spread({
|
|
289
310
|
"component-name": "Text3"
|
|
290
311
|
}, e)
|
|
291
312
|
}), t));
|
|
292
|
-
},
|
|
313
|
+
}, fe = (_param)=>{
|
|
293
314
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
294
315
|
"dataAttributes",
|
|
295
316
|
"forceMobileSizes"
|
|
296
317
|
]);
|
|
297
|
-
return /* @__PURE__ */ r(
|
|
318
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
298
319
|
forceMobileSizes: i,
|
|
299
320
|
mobileSize: 14,
|
|
300
321
|
mobileLineHeight: "20px",
|
|
301
322
|
desktopSize: 16,
|
|
302
323
|
desktopLineHeight: "24px"
|
|
303
324
|
})), {
|
|
304
|
-
weight:
|
|
325
|
+
weight: h(t),
|
|
305
326
|
dataAttributes: _object_spread({
|
|
306
327
|
"component-name": "Text2"
|
|
307
328
|
}, e)
|
|
308
329
|
}), t));
|
|
309
|
-
},
|
|
330
|
+
}, ke = (_param)=>{
|
|
310
331
|
var { dataAttributes: e, forceMobileSizes: i } = _param, t = _object_without_properties(_param, [
|
|
311
332
|
"dataAttributes",
|
|
312
333
|
"forceMobileSizes"
|
|
313
334
|
]);
|
|
314
|
-
return /* @__PURE__ */ r(
|
|
335
|
+
return /* @__PURE__ */ r(o, _object_spread(_object_spread_props(_object_spread({}, s({
|
|
315
336
|
forceMobileSizes: i,
|
|
316
337
|
mobileSize: 12,
|
|
317
338
|
mobileLineHeight: "16px",
|
|
318
339
|
desktopSize: 14,
|
|
319
340
|
desktopLineHeight: "20px"
|
|
320
341
|
})), {
|
|
321
|
-
weight:
|
|
342
|
+
weight: h(t),
|
|
322
343
|
dataAttributes: _object_spread({
|
|
323
344
|
"component-name": "Text1"
|
|
324
345
|
}, e)
|
|
325
346
|
}), t));
|
|
326
|
-
},
|
|
327
|
-
export {
|
|
347
|
+
}, He = o;
|
|
348
|
+
export { o as Text, ke as Text1, he as Text10, fe as Text2, Se as Text3, Te as Text4, be as Text5, ue as Text6, de as Text7, ge as Text8, ce as Text9, He as default };
|
|
@@ -53,13 +53,13 @@ function _object_spread_props(target, source) {
|
|
|
53
53
|
}
|
|
54
54
|
import { jsx as h } from "react/jsx-runtime";
|
|
55
55
|
import m from "classnames";
|
|
56
|
-
import * as
|
|
56
|
+
import * as n from "react";
|
|
57
57
|
import { useIsomorphicLayoutEffect as l } from "../hooks.js";
|
|
58
|
-
import { container as f, containerWithWrapper as w, vars as R, wrapper as
|
|
59
|
-
import { applyCssVars as
|
|
60
|
-
const u = /*#__PURE__*/
|
|
58
|
+
import { container as f, containerWithWrapper as w, vars as R, wrapper as b } from "./aspect-ratio-support.css-mistica.js";
|
|
59
|
+
import { applyCssVars as y } from "./css.js";
|
|
60
|
+
const u = /*#__PURE__*/ n.createContext(!0), x = (param)=>{
|
|
61
61
|
let { children: t } = param;
|
|
62
|
-
const [
|
|
62
|
+
const [o, s] = n.useState(!0);
|
|
63
63
|
return l(()=>{
|
|
64
64
|
try {
|
|
65
65
|
CSS.supports("aspect-ratio", "1 / 1") || s(!1);
|
|
@@ -67,16 +67,16 @@ const u = /*#__PURE__*/ o.createContext(!0), x = (param)=>{
|
|
|
67
67
|
s(!1);
|
|
68
68
|
}
|
|
69
69
|
}, []), /* @__PURE__ */ h(u.Provider, {
|
|
70
|
-
value:
|
|
70
|
+
value: o,
|
|
71
71
|
children: t
|
|
72
72
|
});
|
|
73
|
-
},
|
|
74
|
-
const
|
|
73
|
+
}, N = ()=>n.useContext(u), W = (t)=>{
|
|
74
|
+
const o = N(), s = typeof t.width != "number" && typeof t.height != "number" && t.aspectRatio !== 0, e = s ? t.aspectRatio : void 0;
|
|
75
75
|
let i = t.width, a = t.height;
|
|
76
76
|
var _t_aspectRatio, _t_aspectRatio1;
|
|
77
77
|
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 = t.aspectRatio) !== null && _t_aspectRatio !== void 0 ? _t_aspectRatio : 1) : void 0 : typeof t.height == "number" ? i = t.aspectRatio !== 0 ? t.height * ((_t_aspectRatio1 = t.aspectRatio) !== null && _t_aspectRatio1 !== void 0 ? _t_aspectRatio1 : 1) : void 0 : i = t.width || "100%";
|
|
78
78
|
var _t_as;
|
|
79
|
-
const c = s && !
|
|
79
|
+
const c = s && !o, r = /*#__PURE__*/ n.createElement((_t_as = t.as) !== null && _t_as !== void 0 ? _t_as : "div", _object_spread({
|
|
80
80
|
className: m(t.className, f, {
|
|
81
81
|
[w]: c
|
|
82
82
|
}),
|
|
@@ -86,7 +86,7 @@ const u = /*#__PURE__*/ o.createContext(!0), x = (param)=>{
|
|
|
86
86
|
}) : _object_spread_props(_object_spread({}, t.style), {
|
|
87
87
|
width: isNaN(Number(i)) ? i : Number(i),
|
|
88
88
|
height: isNaN(Number(a)) ? a : Number(a)
|
|
89
|
-
}),
|
|
89
|
+
}), y({
|
|
90
90
|
[R.aspectRatio]: e ? String(e) : "unset"
|
|
91
91
|
}))
|
|
92
92
|
}, !c && t.dataAttributes), t.children);
|
|
@@ -98,10 +98,10 @@ const u = /*#__PURE__*/ o.createContext(!0), x = (param)=>{
|
|
|
98
98
|
height: a,
|
|
99
99
|
paddingTop: d
|
|
100
100
|
},
|
|
101
|
-
className:
|
|
101
|
+
className: b
|
|
102
102
|
}, t.dataAttributes), {
|
|
103
|
-
children:
|
|
103
|
+
children: r
|
|
104
104
|
}));
|
|
105
|
-
} else return
|
|
105
|
+
} else return r;
|
|
106
106
|
};
|
|
107
|
-
export { W as AspectRatioContainer, x as AspectRatioSupportProvider,
|
|
107
|
+
export { W as AspectRatioContainer, x as AspectRatioSupportProvider, N as useSupportsAspectRatio };
|
package/dist-es/utils/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const i = function(e) {
|
|
2
2
|
let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
3
|
-
o ? window.open(e, "_blank") : n ? window.open(e, "_top") :
|
|
3
|
+
o ? window.open(e, "_blank") : n ? window.open(e, "_top") : window.location.assign(e);
|
|
4
4
|
};
|
|
5
5
|
export { i as redirect };
|
package/dist-es/video.js
CHANGED
|
@@ -32,7 +32,7 @@ import { ImageContent as J, ImageError as O } from "./image.js";
|
|
|
32
32
|
import { AspectRatioContainer as P } from "./utils/aspect-ratio-support.js";
|
|
33
33
|
import { isRunningAcceptanceTest as Q } from "./utils/platform.js";
|
|
34
34
|
import { video as X } from "./video.css-mistica.js";
|
|
35
|
-
import { defaultBorderRadius as
|
|
35
|
+
import { defaultBorderRadius as S } from "./image.css-mistica.js";
|
|
36
36
|
import { getPrefixedDataAttributes as Y } from "./utils/dom.js";
|
|
37
37
|
import $ from "classnames";
|
|
38
38
|
const q = {
|
|
@@ -73,7 +73,7 @@ const q = {
|
|
|
73
73
|
"16:9": 16 / 9,
|
|
74
74
|
"4:3": 4 / 3
|
|
75
75
|
}, M = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAAtJREFUGFdjYAACAAAFAAGq1chRAAAAAElFTkSuQmCC", _ = /*#__PURE__*/ a.forwardRef((_param, A)=>{
|
|
76
|
-
var { src: s, poster: u, autoPlay: g = "when-loaded", muted:
|
|
76
|
+
var { src: s, poster: u, autoPlay: g = "when-loaded", muted: N = !0, loop: k = !0, preload: x = "none", loadingTimeout: b = 1e4, onLoad: y, onError: h, onPause: w, onPlay: v, aspectRatio: c = "1:1", dataAttributes: U } = _param, n = _object_without_properties(_param, [
|
|
77
77
|
"src",
|
|
78
78
|
"poster",
|
|
79
79
|
"autoPlay",
|
|
@@ -125,9 +125,9 @@ const q = {
|
|
|
125
125
|
playsInline: !0,
|
|
126
126
|
disablePictureInPicture: !0,
|
|
127
127
|
disableRemotePlayback: !0,
|
|
128
|
-
muted:
|
|
128
|
+
muted: N,
|
|
129
129
|
loop: k,
|
|
130
|
-
className: $(X,
|
|
130
|
+
className: $(X, S),
|
|
131
131
|
preload: x,
|
|
132
132
|
onError: R,
|
|
133
133
|
onPause: ()=>{
|
|
@@ -169,7 +169,7 @@ const q = {
|
|
|
169
169
|
height: "100%"
|
|
170
170
|
},
|
|
171
171
|
children: /* @__PURE__ */ d(O, {
|
|
172
|
-
className:
|
|
172
|
+
className: S,
|
|
173
173
|
withIcon: E
|
|
174
174
|
})
|
|
175
175
|
}) : void 0, [
|