@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
package/dist-es/empty-state.js
CHANGED
|
@@ -54,12 +54,12 @@ function _object_spread_props(target, source) {
|
|
|
54
54
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
55
55
|
import x from "classnames";
|
|
56
56
|
import { useIsInverseVariant as k } from "./theme-variant-context.js";
|
|
57
|
-
import { ButtonPrimary as
|
|
58
|
-
import { useTheme as
|
|
59
|
-
import
|
|
60
|
-
import { Text6 as
|
|
57
|
+
import { ButtonPrimary as B } from "./button.js";
|
|
58
|
+
import { useTheme as C } from "./hooks.js";
|
|
59
|
+
import n from "./stack.js";
|
|
60
|
+
import { Text6 as I, Text3 as N } from "./text.js";
|
|
61
61
|
import S from "./button-group.js";
|
|
62
|
-
import { container as E, inverseBorder as T, vars as V, contentVariants as
|
|
62
|
+
import { container as E, inverseBorder as T, vars as V, contentVariants as l, iconContainer as $, largeImageContainer as b, largeImage as j, smallImage as A } from "./empty-state.css-mistica.js";
|
|
63
63
|
import { vars as a } from "./skins/skin-contract.css-mistica.js";
|
|
64
64
|
import { AspectRatioContainer as D } from "./utils/aspect-ratio-support.js";
|
|
65
65
|
import { getPrefixedDataAttributes as P } from "./utils/dom.js";
|
|
@@ -67,11 +67,11 @@ import { sprinkles as R } from "./sprinkles.css-mistica.js";
|
|
|
67
67
|
import { applyCssVars as G } from "./utils/css.js";
|
|
68
68
|
const M = (param)=>{
|
|
69
69
|
let { title: c, titleAs: p = "h1", description: d, button: e, buttonLink: f, largeImageUrl: o, imageUrl: i, icon: m, "aria-label": g, dataAttributes: v } = param;
|
|
70
|
-
const { isDarkMode: h } =
|
|
70
|
+
const { isDarkMode: h } = C(), s = k(), u = i ? /* @__PURE__ */ r("img", {
|
|
71
71
|
className: A,
|
|
72
72
|
alt: "",
|
|
73
73
|
src: i
|
|
74
|
-
}) : void 0, y = _object_spread_props(_object_spread({}, (e == null ? void 0 : e.type) ===
|
|
74
|
+
}) : void 0, y = _object_spread_props(_object_spread({}, (e == null ? void 0 : e.type) === B ? {
|
|
75
75
|
primaryButton: e
|
|
76
76
|
} : {
|
|
77
77
|
secondaryButton: e
|
|
@@ -93,22 +93,22 @@ const M = (param)=>{
|
|
|
93
93
|
style: {
|
|
94
94
|
flex: 1
|
|
95
95
|
},
|
|
96
|
-
children: /* @__PURE__ */ t(
|
|
96
|
+
children: /* @__PURE__ */ t(n, {
|
|
97
97
|
space: 24,
|
|
98
|
-
className: o ?
|
|
98
|
+
className: o ? l.largeImage : l.default,
|
|
99
99
|
children: [
|
|
100
100
|
u !== null && u !== void 0 ? u : m && /* @__PURE__ */ r("div", {
|
|
101
101
|
className: $,
|
|
102
102
|
children: m
|
|
103
103
|
}),
|
|
104
|
-
/* @__PURE__ */ t(
|
|
104
|
+
/* @__PURE__ */ t(n, {
|
|
105
105
|
space: 16,
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */ r(
|
|
107
|
+
/* @__PURE__ */ r(I, {
|
|
108
108
|
as: p,
|
|
109
109
|
children: c
|
|
110
110
|
}),
|
|
111
|
-
/* @__PURE__ */ r(
|
|
111
|
+
/* @__PURE__ */ r(N, {
|
|
112
112
|
regular: !0,
|
|
113
113
|
as: "p",
|
|
114
114
|
color: s ? a.colors.inverse : a.colors.textSecondary,
|
package/dist-es/feedback.js
CHANGED
|
@@ -99,7 +99,7 @@ import p from "./stack.js";
|
|
|
99
99
|
import u from "classnames";
|
|
100
100
|
import re from "./button-group.js";
|
|
101
101
|
import { vars as s } from "./skins/skin-contract.css-mistica.js";
|
|
102
|
-
import { container as te, innerContainer as ce, innerContainerWithButtons as ne, backgroundBrand as ae, iconContainer as ie, feedbackData as se, feedbackTextAppearFast as de, feedbackTextAppearMedium as
|
|
102
|
+
import { container as te, innerContainer as ce, innerContainerWithButtons as ne, backgroundBrand as ae, iconContainer as ie, feedbackData as se, feedbackTextAppearFast as de, feedbackTextAppearMedium as I, feedbackTextAppearSlow as le, desktopContainer as me, desktopContent as ue, desktopImage as pe } from "./feedback.css-mistica.js";
|
|
103
103
|
import V from "./icons/icon-success-vivo-new.js";
|
|
104
104
|
const O = (r)=>!J(r), D = (param)=>{
|
|
105
105
|
let { primaryButton: r, secondaryButton: o } = param;
|
|
@@ -112,12 +112,12 @@ const O = (r)=>!J(r), D = (param)=>{
|
|
|
112
112
|
return /* @__PURE__ */ e("style", {
|
|
113
113
|
children: o
|
|
114
114
|
});
|
|
115
|
-
},
|
|
115
|
+
}, N = (r)=>{
|
|
116
116
|
U() && X(r).catch(()=>{});
|
|
117
117
|
}, E = (r)=>{
|
|
118
118
|
H.useEffect(()=>{
|
|
119
119
|
let o;
|
|
120
|
-
return r === "success" && (o = setTimeout(()=>
|
|
120
|
+
return r === "success" && (o = setTimeout(()=>N("success"), 700)), r === "error" && (o = setTimeout(()=>N("error"), 1e3)), ()=>{
|
|
121
121
|
clearTimeout(o);
|
|
122
122
|
};
|
|
123
123
|
}, [
|
|
@@ -150,7 +150,7 @@ const O = (r)=>!J(r), D = (param)=>{
|
|
|
150
150
|
})
|
|
151
151
|
}),
|
|
152
152
|
a && /* @__PURE__ */ e("div", {
|
|
153
|
-
className: u(n &&
|
|
153
|
+
className: u(n && I),
|
|
154
154
|
children: a && /* @__PURE__ */ e(Z, {
|
|
155
155
|
regular: !0,
|
|
156
156
|
color: s.colors.textSecondary,
|
|
@@ -158,7 +158,7 @@ const O = (r)=>!J(r), D = (param)=>{
|
|
|
158
158
|
})
|
|
159
159
|
}),
|
|
160
160
|
c && /* @__PURE__ */ e("div", {
|
|
161
|
-
className: u(n && (a ? le :
|
|
161
|
+
className: u(n && (a ? le : I)),
|
|
162
162
|
children: c
|
|
163
163
|
})
|
|
164
164
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./fixed-footer-layout.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var
|
|
3
|
+
var a = "p5j8j57", j = "p5j8j55", t = "p5j8j54", v = "p5j8j53 _1y2v1nfhx", e = {
|
|
4
4
|
footerHeight: "var(--p5j8j50)",
|
|
5
5
|
backgroundColor: "var(--p5j8j51)"
|
|
6
6
|
}, p = "_1y2v1nfh9";
|
|
7
|
-
export {
|
|
7
|
+
export { a as container, j as elevated, t as fixedFooter, v as footer, e as vars, p as withoutFooter };
|
|
@@ -51,73 +51,75 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
import { jsxs as L, Fragment as O, jsx as
|
|
55
|
-
import * as
|
|
54
|
+
import { jsxs as L, Fragment as O, jsx as l } from "react/jsx-runtime";
|
|
55
|
+
import * as m from "react";
|
|
56
56
|
import $ from "classnames";
|
|
57
57
|
import { debounce as k } from "./utils/helpers.js";
|
|
58
|
-
import { isRunningAcceptanceTest as
|
|
59
|
-
import { useScreenSize as
|
|
60
|
-
import { getScrollableParentElement as V, addPassiveEventListener as
|
|
58
|
+
import { isRunningAcceptanceTest as W } from "./utils/platform.js";
|
|
59
|
+
import { useScreenSize as z, useTheme as N, useElementDimensions as P, useIsWithinIFrame as j, useWindowHeight as B, useScreenHeight as _, useIsomorphicLayoutEffect as H } from "./hooks.js";
|
|
60
|
+
import { getScrollableParentElement as V, addPassiveEventListener as h, removePassiveEventListener as E, hasScroll as q, getScrollDistanceToBottom as G } from "./utils/dom.js";
|
|
61
61
|
import { vars as J } from "./skins/skin-contract.css-mistica.js";
|
|
62
|
-
import { container as K, vars as
|
|
63
|
-
import { applyCssVars as Y, safeAreaInsetBottom as
|
|
62
|
+
import { container as K, vars as x, footer as M, withoutFooter as Q, elevated as U, fixedFooter as X } from "./fixed-footer-layout.css-mistica.js";
|
|
63
|
+
import { applyCssVars as Y, safeAreaInsetBottom as S } from "./utils/css.js";
|
|
64
64
|
const Z = 2, C = (e)=>e === document.documentElement ? window : e, ee = (e)=>{
|
|
65
65
|
const n = setTimeout(e, 0);
|
|
66
66
|
return {
|
|
67
67
|
cancel: ()=>clearTimeout(n)
|
|
68
68
|
};
|
|
69
69
|
}, te = (param)=>{
|
|
70
|
-
let { isFooterVisible: e = !0, footer: n, footerHeight:
|
|
71
|
-
const [
|
|
70
|
+
let { isFooterVisible: e = !0, footer: n, footerHeight: T = "auto", footerBgColor: y = J.colors.background, containerBgColor: d, children: g, onChangeFooterHeight: o } = param;
|
|
71
|
+
const [w, F] = m.useState(!1), u = m.useRef(null), { isTabletOrSmaller: i } = z(), { platformOverrides: f } = N(), { height: s, ref: b } = P(), I = j(), p = B(), A = _(), a = p - s > (I ? p : A) / Z;
|
|
72
72
|
H(()=>{
|
|
73
73
|
o == null || o(s);
|
|
74
74
|
}, [
|
|
75
75
|
o,
|
|
76
76
|
s
|
|
77
|
-
]),
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
]), m.useEffect(()=>{
|
|
78
|
+
if (!i || W(f) || a) return;
|
|
79
|
+
const c = V(u.current), R = ()=>q(c) && G(c) > 1, t = k(()=>{
|
|
80
|
+
F(R());
|
|
80
81
|
}, 50, {
|
|
81
82
|
leading: !0,
|
|
82
83
|
maxWait: 200
|
|
83
|
-
}), D = ee(t), r = C(
|
|
84
|
-
return
|
|
85
|
-
t.cancel(),
|
|
84
|
+
}), D = ee(t), r = C(c);
|
|
85
|
+
return h(r, "resize", t), h(r, "scroll", t), ()=>{
|
|
86
|
+
t.cancel(), E(r, "scroll", t), E(r, "resize", t), D.cancel();
|
|
86
87
|
};
|
|
87
88
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
a,
|
|
90
|
+
f,
|
|
91
|
+
i
|
|
90
92
|
]);
|
|
91
|
-
const
|
|
93
|
+
const v = a;
|
|
92
94
|
return /* @__PURE__ */ L(O, {
|
|
93
95
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
ref:
|
|
96
|
+
/* @__PURE__ */ l("div", {
|
|
97
|
+
ref: u,
|
|
96
98
|
className: K,
|
|
97
|
-
style: Y(_object_spread_props(_object_spread({},
|
|
98
|
-
[
|
|
99
|
+
style: Y(_object_spread_props(_object_spread({}, d && {
|
|
100
|
+
[x.backgroundColor]: d
|
|
99
101
|
}), {
|
|
100
|
-
[
|
|
102
|
+
[x.footerHeight]: v ? `calc(${S} + ${s}px)` : "0px"
|
|
101
103
|
})),
|
|
102
|
-
children:
|
|
104
|
+
children: g
|
|
103
105
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ l("div", {
|
|
105
107
|
className: $(M, {
|
|
106
108
|
[Q]: !e,
|
|
107
|
-
[U]:
|
|
108
|
-
[X]:
|
|
109
|
+
[U]: w,
|
|
110
|
+
[X]: v
|
|
109
111
|
}),
|
|
110
112
|
style: {
|
|
111
|
-
background:
|
|
113
|
+
background: i ? y : void 0
|
|
112
114
|
},
|
|
113
115
|
"data-testid": `fixed-footer${e ? "-visible" : "-hidden"}`,
|
|
114
116
|
"data-position-fixed": "bottom",
|
|
115
|
-
children: e && /* @__PURE__ */
|
|
117
|
+
children: e && /* @__PURE__ */ l("aside", {
|
|
116
118
|
ref: b,
|
|
117
119
|
"data-component-name": "FixedFooter",
|
|
118
120
|
style: {
|
|
119
|
-
height:
|
|
120
|
-
marginBottom:
|
|
121
|
+
height: T,
|
|
122
|
+
marginBottom: S
|
|
121
123
|
},
|
|
122
124
|
children: n
|
|
123
125
|
})
|
package/dist-es/form.js
CHANGED
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
import { jsx as
|
|
54
|
+
import { jsx as N } from "react/jsx-runtime";
|
|
55
55
|
import * as n from "react";
|
|
56
56
|
import { useTheme as A, useAriaId as _ } from "./hooks.js";
|
|
57
57
|
import { FormContext as q } from "./form-context.js";
|
|
@@ -83,8 +83,8 @@ const W = (param)=>{
|
|
|
83
83
|
if (s.disabled) continue;
|
|
84
84
|
if (s.required && !((o = l[t]) != null && o.trim())) e[t] = g.formFieldErrorIsMandatory;
|
|
85
85
|
else {
|
|
86
|
-
const
|
|
87
|
-
|
|
86
|
+
const F = u == null ? void 0 : u(i[t], l[t]);
|
|
87
|
+
F && (e[t] = F);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
const r = Object.keys(e).map((t)=>{
|
|
@@ -120,14 +120,14 @@ const W = (param)=>{
|
|
|
120
120
|
}, 100);
|
|
121
121
|
}, [
|
|
122
122
|
h
|
|
123
|
-
]),
|
|
123
|
+
]), O = (e)=>[
|
|
124
124
|
...c.current.keys()
|
|
125
125
|
].reduce((r, o)=>{
|
|
126
126
|
var t, s;
|
|
127
127
|
return (s = (t = c.current.get(o)) == null ? void 0 : t.input) != null && s.disabled ? r : _object_spread_props(_object_spread({}, r), {
|
|
128
128
|
[o]: e[o]
|
|
129
129
|
});
|
|
130
|
-
}, {}),
|
|
130
|
+
}, {}), C = n.useCallback((e)=>(e == null || e.preventDefault(), m("sending"), Object.keys(p()).length > 0 ? (m("filling"), Promise.resolve()) : Promise.resolve(b(O(i), O(l))).finally(()=>{
|
|
131
131
|
f.current && m("filling");
|
|
132
132
|
})), [
|
|
133
133
|
b,
|
|
@@ -145,7 +145,7 @@ const W = (param)=>{
|
|
|
145
145
|
[e]: r
|
|
146
146
|
}));
|
|
147
147
|
}, []);
|
|
148
|
-
return /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ N(q.Provider, {
|
|
149
149
|
value: {
|
|
150
150
|
formStatus: w,
|
|
151
151
|
values: i,
|
|
@@ -157,12 +157,12 @@ const W = (param)=>{
|
|
|
157
157
|
register: j,
|
|
158
158
|
jumpToNext: T,
|
|
159
159
|
validate: p,
|
|
160
|
-
submit:
|
|
160
|
+
submit: C,
|
|
161
161
|
formId: v
|
|
162
162
|
},
|
|
163
|
-
children: /* @__PURE__ */
|
|
163
|
+
children: /* @__PURE__ */ N("form", {
|
|
164
164
|
id: v,
|
|
165
|
-
onSubmit:
|
|
165
|
+
onSubmit: C,
|
|
166
166
|
ref: d,
|
|
167
167
|
className: B(L({
|
|
168
168
|
width: "100%"
|
package/dist-es/grid.js
CHANGED
|
@@ -28,7 +28,7 @@ function _object_spread(target) {
|
|
|
28
28
|
}
|
|
29
29
|
import c from "classnames";
|
|
30
30
|
import * as d from "react";
|
|
31
|
-
import { grid as G, gridTemplateColumns as C, gridTemplateColumnsAutoRepeat as M, gridTemplateRows as T, gridTemplateRowsAutoRepeat as j, gridAutoFlow as v, gridJustifyItems as
|
|
31
|
+
import { grid as G, gridTemplateColumns as C, gridTemplateColumnsAutoRepeat as M, gridTemplateRows as T, gridTemplateRowsAutoRepeat as j, gridAutoFlow as v, gridJustifyItems as V, gridAlignItems as k, gridJustifyContent as E, gridAlignContent as J, fullColumns as N, spanColumns as h, fullRows as w, spanRows as D, columnStart as F, rowStart as I, justifySelf as P, alignSelf as q, vars as p } from "./grid.css-mistica.js";
|
|
32
32
|
import { applyCssVars as B } from "./utils/css.js";
|
|
33
33
|
import { getPrefixedDataAttributes as R } from "./utils/dom.js";
|
|
34
34
|
import { sprinkles as H } from "./sprinkles.css-mistica.js";
|
|
@@ -60,7 +60,7 @@ const K = (t, e)=>{
|
|
|
60
60
|
}
|
|
61
61
|
return /*#__PURE__*/ d.createElement(z, _object_spread({
|
|
62
62
|
ref: x,
|
|
63
|
-
className: c(G, g, e ? typeof e == "number" ? C[e] : M : "", t ? typeof t == "number" ? T[t] : j : "", f ? v[f] : "", o ?
|
|
63
|
+
className: c(G, g, e ? typeof e == "number" ? C[e] : M : "", t ? typeof t == "number" ? T[t] : j : "", f ? v[f] : "", o ? V[o] : "", r ? k[r] : "", l ? E[l] : "", n ? J[n] : ""),
|
|
64
64
|
style: _object_spread({
|
|
65
65
|
height: u,
|
|
66
66
|
minHeight: y
|
|
@@ -70,7 +70,7 @@ const K = (t, e)=>{
|
|
|
70
70
|
let { rowStart: t, rowSpan: e, columnStart: i, columnSpan: f, span: o, justifySelf: r, alignSelf: l, children: n, as: u = "div", dataAttributes: y } = param;
|
|
71
71
|
return o && (Array.isArray(o) ? (f = o[0], e = o[1]) : (f = o, e = o)), /*#__PURE__*/ d.createElement(u, _object_spread({
|
|
72
72
|
ref: s,
|
|
73
|
-
className: c(f ? f === "full" ?
|
|
73
|
+
className: c(f ? f === "full" ? N : h[f] : "", e ? e === "full" ? w : D[e] : "", i ? F[i] : "", t ? I[t] : "", r ? P[r] : "", l ? q[l] : "")
|
|
74
74
|
}, R(y)), n);
|
|
75
75
|
});
|
|
76
76
|
export { Y as Grid, Z as GridItem };
|
|
@@ -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
3
|
import "./hero.css.ts.vanilla.css-mistica.js";
|
|
4
|
-
var
|
|
4
|
+
var n = "_16rbpto7 _1y2v1nfha _1y2v1nfhw _1y2v1nfhq", o = "_16rbpto2 _1y2v1nfha", v = "_1y2v1nfhp _1y2v1nfie", i = "_16rbpto3", _ = "_1y2v1nfhg", e = "_16rbpto8", p = "_16rbpto9", h = {
|
|
5
5
|
height: "var(--_16rbpto0)"
|
|
6
6
|
};
|
|
7
|
-
export {
|
|
7
|
+
export { n as actions, o as container, v as containerDesktop, i as containerMinHeight, _ as containerMobile, e as layout, p as mediaContainer, h as vars };
|
package/dist-es/hero.js
CHANGED
|
@@ -78,173 +78,184 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as r, jsxs as
|
|
82
|
-
import * as
|
|
81
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
82
|
+
import * as T from "react";
|
|
83
83
|
import u from "classnames";
|
|
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 { useIsInsideSlideshowContext as
|
|
94
|
-
import { getPrefixedDataAttributes as
|
|
95
|
-
import { sprinkles as
|
|
96
|
-
import {
|
|
97
|
-
import { applyCssVars as
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
84
|
+
import { useScreenSize as j } from "./hooks.js";
|
|
85
|
+
import { Text3 as b, Text8 as G } from "./text.js";
|
|
86
|
+
import $ from "./grid-layout.js";
|
|
87
|
+
import m from "./box.js";
|
|
88
|
+
import N from "./stack.js";
|
|
89
|
+
import A 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, mediaContainer as z, layout as y, containerDesktop as B, actions as E, vars as R } from "./hero.css-mistica.js";
|
|
92
|
+
import { vars as S } from "./image.css-mistica.js";
|
|
93
|
+
import { useIsInsideSlideshowContext as K } from "./carousel.js";
|
|
94
|
+
import { getPrefixedDataAttributes as k } from "./utils/dom.js";
|
|
95
|
+
import { sprinkles as w } from "./sprinkles.css-mistica.js";
|
|
96
|
+
import { useIsInverseVariant as M } from "./theme-variant-context.js";
|
|
97
|
+
import { applyCssVars as h } from "./utils/css.js";
|
|
98
|
+
import { InternalResponsiveLayout as U } from "./responsive-layout.js";
|
|
99
|
+
const H = (param)=>{
|
|
100
|
+
let { children: o, isInverse: e, isInsideSlideShow: a } = param;
|
|
101
|
+
return /* @__PURE__ */ r(U, {
|
|
102
|
+
isInverse: e,
|
|
103
|
+
className: y,
|
|
104
|
+
innerDivClassName: y,
|
|
105
|
+
shouldExpandWhenNested: a ? "desktop" : !0,
|
|
106
|
+
backgroundColor: "transparent",
|
|
107
|
+
children: o
|
|
106
108
|
});
|
|
107
|
-
},
|
|
108
|
-
let { headline:
|
|
109
|
-
return /* @__PURE__ */
|
|
110
|
-
className:
|
|
109
|
+
}, g = (param)=>{
|
|
110
|
+
let { headline: o, title: e, titleAs: a = "h1", pretitle: s, description: l, descriptionLinesMax: n, extra: t, button: c, secondaryButton: f, buttonLink: d } = param;
|
|
111
|
+
return /* @__PURE__ */ p("section", {
|
|
112
|
+
className: w({
|
|
111
113
|
height: "100%",
|
|
112
114
|
display: "flex",
|
|
113
115
|
justifyContent: "space-between",
|
|
114
116
|
flexDirection: "column"
|
|
115
117
|
}),
|
|
116
118
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ p("div", {
|
|
118
120
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ p(N, {
|
|
120
122
|
space: 16,
|
|
121
123
|
children: [
|
|
122
|
-
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
+
o && o,
|
|
125
|
+
/* @__PURE__ */ p(N, {
|
|
124
126
|
space: 8,
|
|
125
127
|
children: [
|
|
126
|
-
|
|
128
|
+
s && /* @__PURE__ */ r(b, {
|
|
127
129
|
as: "p",
|
|
128
130
|
regular: !0,
|
|
129
|
-
children:
|
|
131
|
+
children: s
|
|
130
132
|
}),
|
|
131
|
-
|
|
132
|
-
as:
|
|
133
|
-
children:
|
|
133
|
+
e && /* @__PURE__ */ r(G, {
|
|
134
|
+
as: a,
|
|
135
|
+
children: e
|
|
134
136
|
})
|
|
135
137
|
]
|
|
136
138
|
}),
|
|
137
|
-
|
|
139
|
+
l && /* @__PURE__ */ r(b, {
|
|
138
140
|
as: "p",
|
|
139
141
|
regular: !0,
|
|
140
|
-
color:
|
|
141
|
-
truncate:
|
|
142
|
-
children:
|
|
142
|
+
color: i.colors.textSecondary,
|
|
143
|
+
truncate: n,
|
|
144
|
+
children: l
|
|
143
145
|
})
|
|
144
146
|
]
|
|
145
147
|
}),
|
|
146
|
-
|
|
147
|
-
children:
|
|
148
|
+
t && /* @__PURE__ */ r("div", {
|
|
149
|
+
children: t
|
|
148
150
|
})
|
|
149
151
|
]
|
|
150
152
|
}),
|
|
151
|
-
(
|
|
152
|
-
className:
|
|
153
|
-
children: /* @__PURE__ */ r(
|
|
154
|
-
primaryButton:
|
|
155
|
-
secondaryButton:
|
|
156
|
-
link:
|
|
153
|
+
(c || d) && /* @__PURE__ */ r("div", {
|
|
154
|
+
className: E,
|
|
155
|
+
children: /* @__PURE__ */ r(A, {
|
|
156
|
+
primaryButton: c,
|
|
157
|
+
secondaryButton: f,
|
|
158
|
+
link: d
|
|
157
159
|
})
|
|
158
160
|
})
|
|
159
161
|
]
|
|
160
162
|
});
|
|
161
|
-
},
|
|
162
|
-
default:
|
|
163
|
-
alternative:
|
|
164
|
-
brand:
|
|
165
|
-
"brand-secondary":
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
}, I = {
|
|
164
|
+
default: i.colors.background,
|
|
165
|
+
alternative: i.colors.backgroundAlternative,
|
|
166
|
+
brand: i.colors.backgroundBrand,
|
|
167
|
+
"brand-secondary": i.colors.backgroundBrandSecondary,
|
|
168
|
+
none: "transparent"
|
|
169
|
+
}, W = /*#__PURE__*/ T.forwardRef((_param, c)=>{
|
|
170
|
+
var { height: o, background: e = "default", media: a, desktopMediaPosition: s = "left", dataAttributes: l, noPaddingY: n } = _param, t = _object_without_properties(_param, [
|
|
168
171
|
"height",
|
|
169
172
|
"background",
|
|
170
173
|
"media",
|
|
171
174
|
"desktopMediaPosition",
|
|
172
|
-
"dataAttributes"
|
|
175
|
+
"dataAttributes",
|
|
176
|
+
"noPaddingY"
|
|
173
177
|
]);
|
|
174
|
-
const { isTabletOrSmaller:
|
|
175
|
-
if (
|
|
176
|
-
style:
|
|
177
|
-
[
|
|
178
|
+
const { isTabletOrSmaller: f } = j(), d = K(), D = M(), x = e === "none" ? D : e === "brand" || e === "brand-secondary";
|
|
179
|
+
if (f) return /* @__PURE__ */ r("div", {
|
|
180
|
+
style: h({
|
|
181
|
+
[S.mediaBorderRadius]: "0px"
|
|
178
182
|
}),
|
|
179
|
-
children: /* @__PURE__ */
|
|
183
|
+
children: /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, k(_object_spread({
|
|
180
184
|
"component-name": "Hero"
|
|
181
|
-
},
|
|
182
|
-
ref:
|
|
185
|
+
}, l))), {
|
|
186
|
+
ref: c,
|
|
183
187
|
style: _object_spread({
|
|
184
|
-
backgroundColor:
|
|
185
|
-
},
|
|
188
|
+
backgroundColor: I[e]
|
|
189
|
+
}, o === "100vh" ? {
|
|
186
190
|
maxHeight: "-webkit-fill-available"
|
|
187
|
-
} : {},
|
|
188
|
-
[
|
|
191
|
+
} : {}, h({
|
|
192
|
+
[R.height]: o !== null && o !== void 0 ? o : "100%"
|
|
189
193
|
})),
|
|
190
|
-
className: u(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
className: u(v, V, {
|
|
195
|
+
[C]: !n
|
|
196
|
+
}),
|
|
197
|
+
children: /* @__PURE__ */ p(H, {
|
|
198
|
+
isInverse: x,
|
|
199
|
+
isInsideSlideShow: d,
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ r("div", {
|
|
202
|
+
className: z,
|
|
203
|
+
children: a
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ r(m, {
|
|
196
206
|
paddingTop: 24,
|
|
197
|
-
paddingBottom:
|
|
198
|
-
|
|
207
|
+
paddingBottom: d ? 48 : n ? 0 : 24,
|
|
208
|
+
className: y,
|
|
209
|
+
children: /* @__PURE__ */ r(g, _object_spread({}, t))
|
|
199
210
|
})
|
|
200
|
-
|
|
201
|
-
|
|
211
|
+
]
|
|
212
|
+
})
|
|
202
213
|
}))
|
|
203
214
|
});
|
|
204
|
-
const
|
|
215
|
+
const O = s === "left" ? a : /* @__PURE__ */ r(m, {
|
|
205
216
|
paddingRight: 24,
|
|
206
|
-
children: /* @__PURE__ */ r(
|
|
207
|
-
}),
|
|
217
|
+
children: /* @__PURE__ */ r(g, _object_spread({}, t))
|
|
218
|
+
}), L = s === "right" ? a : /* @__PURE__ */ r(m, {
|
|
208
219
|
paddingLeft: 24,
|
|
209
|
-
children: /* @__PURE__ */ r(
|
|
220
|
+
children: /* @__PURE__ */ r(g, _object_spread({}, t))
|
|
210
221
|
});
|
|
211
222
|
return /* @__PURE__ */ r("div", {
|
|
212
|
-
style:
|
|
213
|
-
[
|
|
223
|
+
style: h({
|
|
224
|
+
[S.mediaBorderRadius]: i.borderRadii.container
|
|
214
225
|
}),
|
|
215
|
-
children: /* @__PURE__ */ r("div", _object_spread_props(_object_spread({},
|
|
226
|
+
children: /* @__PURE__ */ r("div", _object_spread_props(_object_spread({}, k(_object_spread({
|
|
216
227
|
"component-name": "Hero"
|
|
217
|
-
},
|
|
218
|
-
ref:
|
|
228
|
+
}, l))), {
|
|
229
|
+
ref: c,
|
|
219
230
|
style: _object_spread({
|
|
220
|
-
backgroundColor:
|
|
221
|
-
},
|
|
231
|
+
backgroundColor: I[e]
|
|
232
|
+
}, o === "100vh" ? {
|
|
222
233
|
maxHeight: "-webkit-fill-available"
|
|
223
|
-
} : {},
|
|
224
|
-
[
|
|
234
|
+
} : {}, h({
|
|
235
|
+
[R.height]: o !== null && o !== void 0 ? o : "100%"
|
|
225
236
|
})),
|
|
226
|
-
className:
|
|
227
|
-
height: "100%"
|
|
228
|
-
display: "flex",
|
|
229
|
-
alignItems: "center"
|
|
237
|
+
className: w({
|
|
238
|
+
height: "100%"
|
|
230
239
|
}),
|
|
231
|
-
children: /* @__PURE__ */ r(
|
|
232
|
-
isInverse:
|
|
233
|
-
children: /* @__PURE__ */ r(
|
|
240
|
+
children: /* @__PURE__ */ r(H, {
|
|
241
|
+
isInverse: x,
|
|
242
|
+
children: /* @__PURE__ */ r($, {
|
|
234
243
|
template: "6+6",
|
|
235
|
-
left: /* @__PURE__ */ r(
|
|
236
|
-
paddingY: 56,
|
|
237
|
-
className: u(
|
|
238
|
-
|
|
244
|
+
left: /* @__PURE__ */ r(m, {
|
|
245
|
+
paddingY: n ? 0 : 56,
|
|
246
|
+
className: u(v, B, {
|
|
247
|
+
[C]: !n
|
|
248
|
+
}),
|
|
249
|
+
children: O
|
|
239
250
|
}),
|
|
240
|
-
right: /* @__PURE__ */ r(
|
|
241
|
-
paddingY: 56,
|
|
242
|
-
className: u(
|
|
243
|
-
children:
|
|
251
|
+
right: /* @__PURE__ */ r(m, {
|
|
252
|
+
paddingY: n ? 0 : 56,
|
|
253
|
+
className: u(v, B),
|
|
254
|
+
children: L
|
|
244
255
|
})
|
|
245
256
|
})
|
|
246
257
|
})
|
|
247
258
|
}))
|
|
248
259
|
});
|
|
249
|
-
}),
|
|
250
|
-
export {
|
|
260
|
+
}), lr = W;
|
|
261
|
+
export { lr as default };
|
|
@@ -2,7 +2,7 @@ import { jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
import t from "classnames";
|
|
3
3
|
import * as s from "react";
|
|
4
4
|
import { scroll as c, noScrollbar as m } from "./horizontal-scroll.css-mistica.js";
|
|
5
|
-
const
|
|
5
|
+
const n = /*#__PURE__*/ s.forwardRef((param, l)=>{
|
|
6
6
|
let { children: o, noScrollbar: r } = param;
|
|
7
7
|
return /* @__PURE__ */ a("div", {
|
|
8
8
|
className: t(c, {
|
|
@@ -11,5 +11,5 @@ const e = /*#__PURE__*/ s.forwardRef((param, l)=>{
|
|
|
11
11
|
ref: l,
|
|
12
12
|
children: o
|
|
13
13
|
});
|
|
14
|
-
}), p =
|
|
14
|
+
}), p = n;
|
|
15
15
|
export { p as default };
|