@telefonica/mistica 15.4.0 → 15.5.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/carousel.js +102 -98
- package/dist/hero.css-mistica.js +7 -23
- package/dist/hero.css.d.ts +0 -3
- package/dist/hero.js +85 -73
- package/dist/package-version.js +1 -1
- package/dist/responsive-layout.css-mistica.js +26 -11
- package/dist/responsive-layout.css.d.ts +8 -3
- package/dist/responsive-layout.d.ts +5 -0
- package/dist/responsive-layout.js +36 -17
- package/dist/theme-context-provider.d.ts +1 -0
- package/dist/theme-context-provider.js +21 -21
- package/dist-es/carousel.js +102 -98
- package/dist-es/hero.css-mistica.js +2 -9
- package/dist-es/hero.js +122 -110
- package/dist-es/package-version.js +1 -1
- package/dist-es/responsive-layout.css-mistica.js +3 -3
- package/dist-es/responsive-layout.js +41 -25
- package/dist-es/style.css +1 -1
- package/dist-es/theme-context-provider.js +68 -68
- package/package.json +1 -1
package/dist-es/hero.js
CHANGED
|
@@ -78,90 +78,96 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as
|
|
82
|
-
import * as
|
|
83
|
-
import
|
|
84
|
-
import { useScreenSize as
|
|
85
|
-
import { Text3 as
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import { vars as
|
|
91
|
-
import { container as
|
|
92
|
-
import { vars as
|
|
93
|
-
import { useSlideshowContext as
|
|
94
|
-
import { getPrefixedDataAttributes as
|
|
95
|
-
import { sprinkles as
|
|
96
|
-
import { useIsInverseVariant as
|
|
97
|
-
import { applyCssVars as
|
|
98
|
-
import { InternalResponsiveLayout as
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
81
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
82
|
+
import * as $ from "react";
|
|
83
|
+
import h from "classnames";
|
|
84
|
+
import { useScreenSize as j } from "./hooks.js";
|
|
85
|
+
import { Text3 as g, Text8 as G } from "./text.js";
|
|
86
|
+
import A from "./grid-layout.js";
|
|
87
|
+
import m from "./box.js";
|
|
88
|
+
import R from "./stack.js";
|
|
89
|
+
import E from "./button-group.js";
|
|
90
|
+
import { vars as i } from "./skins/skin-contract.css-mistica.js";
|
|
91
|
+
import { container as v, containerMobile as V, containerMinHeight as C, expandedContent as _, layout as B, vars as H, containerDesktop as S, actions as z } from "./hero.css-mistica.js";
|
|
92
|
+
import { vars as y } from "./image.css-mistica.js";
|
|
93
|
+
import { useSlideshowContext as K } from "./carousel.js";
|
|
94
|
+
import { getPrefixedDataAttributes as T } from "./utils/dom.js";
|
|
95
|
+
import { sprinkles as O } from "./sprinkles.css-mistica.js";
|
|
96
|
+
import { useIsInverseVariant as M } from "./theme-variant-context.js";
|
|
97
|
+
import { applyCssVars as x } from "./utils/css.js";
|
|
98
|
+
import { ResetResponsiveLayout as U, InternalResponsiveLayout as W } from "./responsive-layout.js";
|
|
99
|
+
const k = {
|
|
100
|
+
default: i.colors.background,
|
|
101
|
+
alternative: i.colors.backgroundAlternative,
|
|
102
|
+
brand: i.colors.backgroundBrand,
|
|
103
|
+
"brand-secondary": i.colors.backgroundBrandSecondary,
|
|
104
|
+
none: "transparent"
|
|
105
|
+
}, w = (param)=>{
|
|
106
|
+
let { children: e, isInverse: o, backgroundColor: a } = param;
|
|
107
|
+
return /* @__PURE__ */ r(W, {
|
|
108
|
+
isInverse: o,
|
|
109
|
+
className: B,
|
|
110
|
+
innerDivClassName: B,
|
|
111
|
+
shouldExpandWhenNested: !0,
|
|
112
|
+
backgroundColor: a !== null && a !== void 0 ? a : "transparent",
|
|
113
|
+
children: e
|
|
108
114
|
});
|
|
109
|
-
},
|
|
110
|
-
let { headline:
|
|
111
|
-
return /* @__PURE__ */
|
|
112
|
-
className:
|
|
115
|
+
}, b = (param)=>{
|
|
116
|
+
let { headline: e, title: o, titleAs: a = "h1", pretitle: l, description: c, descriptionLinesMax: t, extra: n, button: d, secondaryButton: f, buttonLink: s } = param;
|
|
117
|
+
return /* @__PURE__ */ p("section", {
|
|
118
|
+
className: O({
|
|
113
119
|
height: "100%",
|
|
114
120
|
display: "flex",
|
|
115
121
|
justifyContent: "space-between",
|
|
116
122
|
flexDirection: "column"
|
|
117
123
|
}),
|
|
118
124
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ p("div", {
|
|
120
126
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ p(R, {
|
|
122
128
|
space: 16,
|
|
123
129
|
children: [
|
|
124
|
-
|
|
125
|
-
/* @__PURE__ */
|
|
130
|
+
e && e,
|
|
131
|
+
/* @__PURE__ */ p(R, {
|
|
126
132
|
space: 8,
|
|
127
133
|
children: [
|
|
128
|
-
|
|
134
|
+
l && /* @__PURE__ */ r(g, {
|
|
129
135
|
as: "p",
|
|
130
136
|
regular: !0,
|
|
131
|
-
children:
|
|
137
|
+
children: l
|
|
132
138
|
}),
|
|
133
|
-
|
|
134
|
-
as:
|
|
135
|
-
children:
|
|
139
|
+
o && /* @__PURE__ */ r(G, {
|
|
140
|
+
as: a,
|
|
141
|
+
children: o
|
|
136
142
|
})
|
|
137
143
|
]
|
|
138
144
|
}),
|
|
139
|
-
|
|
145
|
+
c && /* @__PURE__ */ r(g, {
|
|
140
146
|
as: "p",
|
|
141
147
|
regular: !0,
|
|
142
|
-
color:
|
|
143
|
-
truncate:
|
|
144
|
-
children:
|
|
148
|
+
color: i.colors.textSecondary,
|
|
149
|
+
truncate: t,
|
|
150
|
+
children: c
|
|
145
151
|
})
|
|
146
152
|
]
|
|
147
153
|
}),
|
|
148
|
-
|
|
149
|
-
children:
|
|
154
|
+
n && /* @__PURE__ */ r("div", {
|
|
155
|
+
children: n
|
|
150
156
|
})
|
|
151
157
|
]
|
|
152
158
|
}),
|
|
153
|
-
(
|
|
154
|
-
className:
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
primaryButton:
|
|
159
|
+
(d || s) && /* @__PURE__ */ r("div", {
|
|
160
|
+
className: z,
|
|
161
|
+
children: /* @__PURE__ */ r(E, {
|
|
162
|
+
primaryButton: d,
|
|
157
163
|
secondaryButton: f,
|
|
158
|
-
link:
|
|
164
|
+
link: s
|
|
159
165
|
})
|
|
160
166
|
})
|
|
161
167
|
]
|
|
162
168
|
});
|
|
163
|
-
},
|
|
164
|
-
var { height:
|
|
169
|
+
}, q = /*#__PURE__*/ $.forwardRef((_param, d)=>{
|
|
170
|
+
var { height: e, background: o = "default", media: a, desktopMediaPosition: l = "left", dataAttributes: c, noPaddingY: t } = _param, n = _object_without_properties(_param, [
|
|
165
171
|
"height",
|
|
166
172
|
"background",
|
|
167
173
|
"media",
|
|
@@ -169,80 +175,86 @@ const T = (param)=>{
|
|
|
169
175
|
"dataAttributes",
|
|
170
176
|
"noPaddingY"
|
|
171
177
|
]);
|
|
172
|
-
const { isTabletOrSmaller: f } =
|
|
173
|
-
if (f) return /* @__PURE__ */
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
178
|
+
const { isTabletOrSmaller: f } = j(), s = K(), u = !!(s != null && s.withBullets), D = M(), N = o === "none" ? D : o === "brand" || o === "brand-secondary";
|
|
179
|
+
if (f) return /* @__PURE__ */ r(U, {
|
|
180
|
+
children: /* @__PURE__ */ r("div", {
|
|
181
|
+
style: x({
|
|
182
|
+
[y.mediaBorderRadius]: "0px"
|
|
183
|
+
}),
|
|
184
|
+
children: /* @__PURE__ */ p("div", _object_spread_props(_object_spread({}, T(_object_spread({
|
|
185
|
+
"component-name": "Hero"
|
|
186
|
+
}, c))), {
|
|
187
|
+
ref: d,
|
|
188
|
+
style: _object_spread({}, e === "100vh" ? {
|
|
189
|
+
maxHeight: "-webkit-fill-available"
|
|
190
|
+
} : {}, x({
|
|
191
|
+
[H.height]: typeof e == "number" ? `${e}px` : e !== null && e !== void 0 ? e : "100%",
|
|
192
|
+
[y.mediaBorderRadius]: "0px"
|
|
193
|
+
})),
|
|
194
|
+
className: h(v, V, {
|
|
195
|
+
[C]: !t
|
|
196
|
+
}),
|
|
191
197
|
children: [
|
|
192
|
-
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
a,
|
|
199
|
+
/* @__PURE__ */ r(w, {
|
|
200
|
+
isInverse: N,
|
|
201
|
+
backgroundColor: k[o],
|
|
202
|
+
children: /* @__PURE__ */ r("div", {
|
|
203
|
+
className: _,
|
|
204
|
+
children: /* @__PURE__ */ r(m, {
|
|
205
|
+
paddingTop: 24,
|
|
206
|
+
paddingBottom: u ? 48 : t ? 0 : 24,
|
|
207
|
+
className: B,
|
|
208
|
+
children: /* @__PURE__ */ r(b, _object_spread({}, n))
|
|
209
|
+
})
|
|
200
210
|
})
|
|
201
211
|
})
|
|
202
212
|
]
|
|
203
|
-
})
|
|
213
|
+
}))
|
|
204
214
|
})
|
|
205
|
-
})
|
|
206
|
-
const
|
|
215
|
+
});
|
|
216
|
+
const I = l === "left" ? a : /* @__PURE__ */ r(m, {
|
|
207
217
|
paddingRight: 24,
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
-
}), L =
|
|
218
|
+
children: /* @__PURE__ */ r(b, _object_spread({}, n))
|
|
219
|
+
}), L = l === "right" ? a : /* @__PURE__ */ r(m, {
|
|
210
220
|
paddingLeft: 24,
|
|
211
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ r(b, _object_spread({}, n))
|
|
212
222
|
});
|
|
213
|
-
return /* @__PURE__ */
|
|
223
|
+
return /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, T(_object_spread({
|
|
214
224
|
"component-name": "Hero"
|
|
215
|
-
},
|
|
216
|
-
ref:
|
|
217
|
-
style: _object_spread({},
|
|
225
|
+
}, c))), {
|
|
226
|
+
ref: d,
|
|
227
|
+
style: _object_spread_props(_object_spread({}, e === "100vh" ? {
|
|
218
228
|
maxHeight: "-webkit-fill-available"
|
|
219
|
-
} : {},
|
|
220
|
-
[H.height]: typeof
|
|
221
|
-
[
|
|
222
|
-
})),
|
|
223
|
-
|
|
229
|
+
} : {}, x({
|
|
230
|
+
[H.height]: typeof e == "number" ? `${e}px` : e !== null && e !== void 0 ? e : "100%",
|
|
231
|
+
[y.mediaBorderRadius]: i.borderRadii.container
|
|
232
|
+
})), {
|
|
233
|
+
background: k[o]
|
|
234
|
+
}),
|
|
235
|
+
className: O({
|
|
224
236
|
height: "100%"
|
|
225
|
-
}),
|
|
226
|
-
children: /* @__PURE__ */
|
|
237
|
+
}),
|
|
238
|
+
children: /* @__PURE__ */ r(w, {
|
|
227
239
|
isInverse: N,
|
|
228
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ r(A, {
|
|
229
241
|
template: "6+6",
|
|
230
|
-
left: /* @__PURE__ */
|
|
231
|
-
paddingTop:
|
|
232
|
-
paddingBottom:
|
|
233
|
-
className:
|
|
234
|
-
[C]: !
|
|
242
|
+
left: /* @__PURE__ */ r(m, {
|
|
243
|
+
paddingTop: t ? 0 : 56,
|
|
244
|
+
paddingBottom: t && !u ? 0 : 56,
|
|
245
|
+
className: h(v, S, {
|
|
246
|
+
[C]: !t
|
|
235
247
|
}),
|
|
236
|
-
children:
|
|
248
|
+
children: I
|
|
237
249
|
}),
|
|
238
|
-
right: /* @__PURE__ */
|
|
239
|
-
paddingTop:
|
|
240
|
-
paddingBottom:
|
|
241
|
-
className:
|
|
250
|
+
right: /* @__PURE__ */ r(m, {
|
|
251
|
+
paddingTop: t ? 0 : 56,
|
|
252
|
+
paddingBottom: t && !u ? 0 : 56,
|
|
253
|
+
className: h(v, S),
|
|
242
254
|
children: L
|
|
243
255
|
})
|
|
244
256
|
})
|
|
245
257
|
})
|
|
246
258
|
}));
|
|
247
|
-
}),
|
|
248
|
-
export {
|
|
259
|
+
}), dr = q;
|
|
260
|
+
export { dr as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const o = "15.
|
|
1
|
+
const o = "15.5.0";
|
|
2
2
|
export { o as PACKAGE_VERSION };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./responsive-layout.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var e = 16,
|
|
3
|
+
var e = 16, a = 40, n = 32, t = {
|
|
4
4
|
inverse: "_1y2v1nf3z",
|
|
5
5
|
alternative: "_1y2v1nf44"
|
|
6
|
-
}, i = "
|
|
7
|
-
export { e as MOBILE_SIDE_MARGIN,
|
|
6
|
+
}, i = "_17lofg77", v = "_17lofg78", _ = "_17lofg7a", f = "_17lofg7f _1y2v1nfi7", l = "_17lofg79", g = "_17lofg73", s = "_17lofg72", M = "_17lofg75", p = "_17lofg74", C = "_17lofg7d", D = "_17lofg76";
|
|
7
|
+
export { e as MOBILE_SIDE_MARGIN, a as SMALL_DESKTOP_SIDE_MARGIN, n as TABLET_SIDE_MARGIN, t as backgroundVariant, i as desktopContainer, v as forcedMarginDesktopContainer, _ as forcedMarginMobileContainer, f as fullWidth, l as mobileContainer, g as resetContainerDesktop, s as resetContainerMobile, M as resetDesktop, p as resetMobile, C as responsiveLayout, D as responsiveLayoutContainer };
|
|
@@ -78,38 +78,54 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as
|
|
82
|
-
import
|
|
83
|
-
import { getPrefixedDataAttributes as
|
|
84
|
-
import {
|
|
85
|
-
import { useThemeVariant as
|
|
86
|
-
const
|
|
87
|
-
let { children:
|
|
88
|
-
const
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
variant:
|
|
91
|
-
children: /* @__PURE__ */
|
|
92
|
-
className:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
81
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
82
|
+
import o from "classnames";
|
|
83
|
+
import { getPrefixedDataAttributes as f } from "./utils/dom.js";
|
|
84
|
+
import { backgroundVariant as v, desktopContainer as p, forcedMarginDesktopContainer as y, mobileContainer as h, forcedMarginMobileContainer as C, responsiveLayoutContainer as L, fullWidth as b, responsiveLayout as R, resetContainerMobile as V, resetContainerDesktop as g, resetMobile as M, resetDesktop as N } from "./responsive-layout.css-mistica.js";
|
|
85
|
+
import { useThemeVariant as x, ThemeVariant as D } from "./theme-variant-context.js";
|
|
86
|
+
const k = (param)=>{
|
|
87
|
+
let { children: a, isInverse: e = !1, variant: r, backgroundColor: s, className: d, fullWidth: i, dataAttributes: m, shouldExpandWhenNested: l = !1, innerDivClassName: c } = param;
|
|
88
|
+
const u = x(), n = r || e && "inverse" || void 0;
|
|
89
|
+
return /* @__PURE__ */ t(D, {
|
|
90
|
+
variant: n !== null && n !== void 0 ? n : u,
|
|
91
|
+
children: /* @__PURE__ */ t("div", _object_spread_props(_object_spread({
|
|
92
|
+
className: o(d, n && n !== "default" && v[n], ...i ? [] : [
|
|
93
|
+
l ? p : y,
|
|
94
|
+
l === !0 ? h : C,
|
|
95
|
+
L
|
|
96
|
+
]),
|
|
96
97
|
style: s ? {
|
|
97
98
|
background: s
|
|
98
99
|
} : void 0
|
|
99
|
-
},
|
|
100
|
-
children: /* @__PURE__ */
|
|
101
|
-
className:
|
|
102
|
-
children:
|
|
100
|
+
}, f(m)), {
|
|
101
|
+
children: /* @__PURE__ */ t("div", {
|
|
102
|
+
className: o(i ? b : R, c),
|
|
103
|
+
children: a
|
|
103
104
|
})
|
|
104
105
|
}))
|
|
105
106
|
});
|
|
106
|
-
},
|
|
107
|
-
var { children:
|
|
107
|
+
}, T = (_param)=>{
|
|
108
|
+
var { children: a } = _param, e = _object_without_properties(_param, [
|
|
108
109
|
"children"
|
|
109
110
|
]);
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
+
return /* @__PURE__ */ t(k, _object_spread_props(_object_spread({}, e), {
|
|
111
112
|
shouldExpandWhenNested: !0,
|
|
112
|
-
children:
|
|
113
|
+
children: a
|
|
113
114
|
}));
|
|
114
|
-
},
|
|
115
|
-
|
|
115
|
+
}, q = (param)=>{
|
|
116
|
+
let { children: a, skipMobile: e = !1, skipDesktop: r = !1 } = param;
|
|
117
|
+
return /* @__PURE__ */ t("div", {
|
|
118
|
+
className: o({
|
|
119
|
+
[V]: !e,
|
|
120
|
+
[g]: !r
|
|
121
|
+
}),
|
|
122
|
+
children: /* @__PURE__ */ t("div", {
|
|
123
|
+
className: o({
|
|
124
|
+
[M]: !e,
|
|
125
|
+
[N]: !r
|
|
126
|
+
}),
|
|
127
|
+
children: a
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
}, w = T;
|
|
131
|
+
export { k as InternalResponsiveLayout, q as ResetResponsiveLayout, w as default };
|