@telefonica/mistica 14.2.0 → 14.4.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/card.css-mistica.js +3 -3
- package/dist/card.d.ts +8 -6
- package/dist/card.js +208 -179
- package/dist/date-time-picker.js +14 -14
- package/dist/empty-state-card.js +24 -20
- package/dist/header.d.ts +1 -0
- package/dist/header.js +94 -86
- package/dist/highlighted-card.js +18 -12
- package/dist/icon-button.js +8 -6
- package/dist/inline.css-mistica.js +7 -6
- package/dist/inline.css.d.ts +1 -0
- package/dist/inline.d.ts +2 -1
- package/dist/inline.js +8 -8
- package/dist/package-version.js +1 -1
- package/dist/popover.js +11 -11
- package/dist/text-link.js +5 -4
- package/dist/touchable.d.ts +1 -0
- package/dist/touchable.js +31 -27
- package/dist-es/card.css-mistica.js +2 -2
- package/dist-es/card.js +268 -239
- package/dist-es/date-time-picker.js +17 -17
- package/dist-es/empty-state-card.js +42 -38
- package/dist-es/header.js +115 -107
- package/dist-es/highlighted-card.js +35 -29
- package/dist-es/icon-button.js +24 -22
- package/dist-es/inline.css-mistica.js +6 -6
- package/dist-es/inline.js +16 -16
- package/dist-es/package-version.js +1 -1
- package/dist-es/popover.js +34 -34
- package/dist-es/style.css +1 -1
- package/dist-es/text-link.js +15 -14
- package/dist-es/touchable.js +44 -40
- package/package.json +1 -1
|
@@ -83,14 +83,14 @@ import R from "./generated/mistica-icons/icon-calendar-regular.js";
|
|
|
83
83
|
import H from "react-datetime";
|
|
84
84
|
import S from "./overlay.js";
|
|
85
85
|
import { DEFAULT_WIDTH as I } from "./text-field-components.css-mistica.js";
|
|
86
|
-
import
|
|
86
|
+
import h from "./icon-button.js";
|
|
87
87
|
import { cancelEvent as B, createChangeEvent as E } from "./utils/dom.js";
|
|
88
88
|
import { useTheme as F, useElementDimensions as L } from "./hooks.js";
|
|
89
89
|
import T from "./generated/mistica-icons/icon-close-regular.js";
|
|
90
90
|
import { reactDatePicker as V } from "./date-time-picker.css-mistica.js";
|
|
91
91
|
import { jsxs as Y, Fragment as j, jsx as r } from "./_virtual/jsx-runtime.js";
|
|
92
|
-
const
|
|
93
|
-
import(/* webpackChunkName: "moment-locale" */ `moment/locale/${
|
|
92
|
+
const g = navigator.language.toLocaleLowerCase().split("-")[0];
|
|
93
|
+
import(/* webpackChunkName: "moment-locale" */ `moment/locale/${g}`).finally(()=>{});
|
|
94
94
|
const Q = (_param)=>{
|
|
95
95
|
var { withTime: s , mode: l , isValidDate: y , optional: u } = _param, t = _objectWithoutProperties(_param, [
|
|
96
96
|
"withTime",
|
|
@@ -98,15 +98,15 @@ const Q = (_param)=>{
|
|
|
98
98
|
"isValidDate",
|
|
99
99
|
"optional"
|
|
100
100
|
]);
|
|
101
|
-
const [m, x] = d.useState(!1), { texts: b } = F(), n = d.useRef(null), { height: k , ref: v } = L(),
|
|
101
|
+
const [m, x] = d.useState(!1), { texts: b } = F(), n = d.useRef(null), { height: k , ref: v } = L(), i = (e)=>{
|
|
102
102
|
t.disabled || x(e);
|
|
103
103
|
}, w = ()=>{
|
|
104
104
|
var p;
|
|
105
|
-
const { top: e = 0 , bottom: o = 0 , left:
|
|
105
|
+
const { top: e = 0 , bottom: o = 0 , left: a = 0 } = ((p = n.current) == null ? void 0 : p.getBoundingClientRect()) || {}, P = 260 + o < window.innerHeight;
|
|
106
106
|
return {
|
|
107
107
|
width: I,
|
|
108
108
|
top: P ? o : e - k,
|
|
109
|
-
left:
|
|
109
|
+
left: a,
|
|
110
110
|
position: "absolute",
|
|
111
111
|
borderRadius: 8,
|
|
112
112
|
overflow: "hidden",
|
|
@@ -117,21 +117,21 @@ const Q = (_param)=>{
|
|
|
117
117
|
const e = (o = n.current) == null ? void 0 : o.value;
|
|
118
118
|
return e ? new Date(e) : void 0;
|
|
119
119
|
}, C = (e)=>s ? e.format("yyyy-MM-DD HH:mm") : l === "year-month" ? e.format("yyyy-MM") : e.format("yyyy-MM-DD"), f = (e)=>{
|
|
120
|
-
var
|
|
120
|
+
var a;
|
|
121
121
|
const o = typeof e == "string" ? e : C(e);
|
|
122
|
-
n.current && (n.current.focus(), (
|
|
123
|
-
}, D = ()=>c() && u ? /* @__PURE__ */ r(
|
|
122
|
+
n.current && (n.current.focus(), (a = t.onChange) == null || a.call(t, E(n.current, o)));
|
|
123
|
+
}, D = ()=>c() && u ? /* @__PURE__ */ r(h, {
|
|
124
124
|
"aria-label": b.clearButton,
|
|
125
125
|
size: 32,
|
|
126
|
-
onPress: (
|
|
127
|
-
|
|
126
|
+
onPress: ()=>{
|
|
127
|
+
f("");
|
|
128
128
|
},
|
|
129
129
|
children: /* @__PURE__ */ r(T, {})
|
|
130
|
-
}) : /* @__PURE__ */ r(
|
|
130
|
+
}) : /* @__PURE__ */ r(h, {
|
|
131
131
|
disabled: t.disabled,
|
|
132
132
|
"aria-label": "",
|
|
133
133
|
size: 32,
|
|
134
|
-
onPress: ()=>
|
|
134
|
+
onPress: ()=>i(!m),
|
|
135
135
|
children: /* @__PURE__ */ r(R, {})
|
|
136
136
|
});
|
|
137
137
|
return /* @__PURE__ */ Y(j, {
|
|
@@ -150,14 +150,14 @@ const Q = (_param)=>{
|
|
|
150
150
|
(o = t == null ? void 0 : t.inputRef) == null || o.call(t, e), n.current = e;
|
|
151
151
|
},
|
|
152
152
|
readOnly: !0,
|
|
153
|
-
onKeyDown: ()=>
|
|
153
|
+
onKeyDown: ()=>i(!0),
|
|
154
154
|
onClick: ()=>{
|
|
155
|
-
|
|
155
|
+
i(!0);
|
|
156
156
|
}
|
|
157
157
|
})),
|
|
158
158
|
m && /* @__PURE__ */ r(S, {
|
|
159
159
|
onPress: (e)=>{
|
|
160
|
-
B(e),
|
|
160
|
+
B(e), i(!1);
|
|
161
161
|
},
|
|
162
162
|
disableScroll: !0,
|
|
163
163
|
children: /* @__PURE__ */ r("div", {
|
|
@@ -169,7 +169,7 @@ const Q = (_param)=>{
|
|
|
169
169
|
dateFormat: l === "year-month" ? "YYYY-MM" : void 0,
|
|
170
170
|
timeFormat: s ? "HH:mm" : !1,
|
|
171
171
|
initialValue: c(),
|
|
172
|
-
locale:
|
|
172
|
+
locale: g,
|
|
173
173
|
input: !1,
|
|
174
174
|
onChange: f,
|
|
175
175
|
isValidDate: y
|
|
@@ -1,56 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Boxed as
|
|
3
|
-
import { useScreenSize as u } from "./hooks.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { container as
|
|
8
|
-
import { vars as
|
|
9
|
-
import { jsx as
|
|
10
|
-
const
|
|
11
|
-
let { title: n , description:
|
|
12
|
-
var
|
|
13
|
-
const { isTabletOrSmaller:
|
|
14
|
-
let
|
|
15
|
-
return
|
|
1
|
+
import p from "./box.js";
|
|
2
|
+
import { Boxed as g } from "./boxed.js";
|
|
3
|
+
import { useScreenSize as u, useTheme as N } from "./hooks.js";
|
|
4
|
+
import c from "./stack.js";
|
|
5
|
+
import { Text as T, Text2 as y } from "./text.js";
|
|
6
|
+
import B from "./button-group.js";
|
|
7
|
+
import { container as E, iconContainer as k, image as v } from "./empty-state-card.css-mistica.js";
|
|
8
|
+
import { vars as z } from "./skins/skin-contract.css-mistica.js";
|
|
9
|
+
import { jsx as e, jsxs as d } from "./_virtual/jsx-runtime.js";
|
|
10
|
+
const V = (param)=>{
|
|
11
|
+
let { title: n , description: h , button: r , secondaryButton: o , buttonLink: t , icon: a , imageUrl: l , "aria-label": f , dataAttributes: x } = param;
|
|
12
|
+
var m;
|
|
13
|
+
const { isTabletOrSmaller: s } = u(), { textPresets: S } = N();
|
|
14
|
+
let i;
|
|
15
|
+
return l && (i = /* @__PURE__ */ e("img", {
|
|
16
16
|
className: v,
|
|
17
17
|
alt: "",
|
|
18
|
-
src:
|
|
19
|
-
})), process.env.NODE_ENV !== "production" &&
|
|
18
|
+
src: l
|
|
19
|
+
})), process.env.NODE_ENV !== "production" && r && !((m = r == null ? void 0 : r.props) != null && m.small) && console.error("button property in EmptyStateCard must be a a small Button. Set small prop to true"), /* @__PURE__ */ e(g, {
|
|
20
20
|
dataAttributes: x,
|
|
21
|
-
children: /* @__PURE__ */
|
|
22
|
-
paddingY:
|
|
23
|
-
paddingX:
|
|
24
|
-
children: /* @__PURE__ */
|
|
25
|
-
className:
|
|
26
|
-
"aria-label":
|
|
27
|
-
children: /* @__PURE__ */ d(
|
|
21
|
+
children: /* @__PURE__ */ e(p, {
|
|
22
|
+
paddingY: s ? 24 : 40,
|
|
23
|
+
paddingX: s ? 16 : 40,
|
|
24
|
+
children: /* @__PURE__ */ e("section", {
|
|
25
|
+
className: E,
|
|
26
|
+
"aria-label": f,
|
|
27
|
+
children: /* @__PURE__ */ d(c, {
|
|
28
28
|
space: 16,
|
|
29
29
|
children: [
|
|
30
|
-
|
|
31
|
-
className:
|
|
32
|
-
children:
|
|
30
|
+
i != null ? i : a && /* @__PURE__ */ e("div", {
|
|
31
|
+
className: k,
|
|
32
|
+
children: a
|
|
33
33
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
children: /* @__PURE__ */ d(
|
|
34
|
+
/* @__PURE__ */ e(p, {
|
|
35
|
+
children: /* @__PURE__ */ d(c, {
|
|
36
36
|
space: 8,
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
|
|
38
|
+
/* @__PURE__ */ e(T, {
|
|
39
|
+
mobileSize: 18,
|
|
40
|
+
mobileLineHeight: "24px",
|
|
41
|
+
desktopSize: 20,
|
|
42
|
+
desktopLineHeight: "28px",
|
|
43
|
+
weight: S.cardTitle.weight,
|
|
40
44
|
children: n
|
|
41
45
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ e(y, {
|
|
43
47
|
regular: !0,
|
|
44
|
-
color:
|
|
45
|
-
children:
|
|
48
|
+
color: z.colors.textSecondary,
|
|
49
|
+
children: h
|
|
46
50
|
})
|
|
47
51
|
]
|
|
48
52
|
})
|
|
49
53
|
}),
|
|
50
|
-
(
|
|
51
|
-
primaryButton:
|
|
54
|
+
(r || o || t) && /* @__PURE__ */ e(B, {
|
|
55
|
+
primaryButton: r,
|
|
52
56
|
secondaryButton: o,
|
|
53
|
-
link:
|
|
57
|
+
link: t
|
|
54
58
|
})
|
|
55
59
|
]
|
|
56
60
|
})
|
|
@@ -58,4 +62,4 @@ const Y = (param)=>{
|
|
|
58
62
|
})
|
|
59
63
|
});
|
|
60
64
|
};
|
|
61
|
-
export {
|
|
65
|
+
export { V as default };
|
package/dist-es/header.js
CHANGED
|
@@ -77,172 +77,180 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
-
import
|
|
81
|
-
import
|
|
80
|
+
import p from "./box.js";
|
|
81
|
+
import n from "./stack.js";
|
|
82
82
|
import { useIsInverseVariant as P } from "./theme-variant-context.js";
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import { useScreenSize as
|
|
86
|
-
import
|
|
87
|
-
import { Text6 as
|
|
88
|
-
import
|
|
89
|
-
import { vars as
|
|
90
|
-
import { jsxs as
|
|
91
|
-
const
|
|
92
|
-
let { pretitle:
|
|
93
|
-
const { isTabletOrSmaller: L } =
|
|
94
|
-
if (typeof
|
|
83
|
+
import x from "./responsive-layout.js";
|
|
84
|
+
import v from "./grid-layout.js";
|
|
85
|
+
import { useScreenSize as f } from "./hooks.js";
|
|
86
|
+
import B from "./overscroll-color-context.js";
|
|
87
|
+
import { Text6 as H, Text3 as T, Text8 as R, Text7 as j } from "./text.js";
|
|
88
|
+
import A from "./button-group.js";
|
|
89
|
+
import { vars as d } from "./skins/skin-contract.css-mistica.js";
|
|
90
|
+
import { jsxs as o, jsx as r, Fragment as C } from "./_virtual/jsx-runtime.js";
|
|
91
|
+
const N = (param)=>{
|
|
92
|
+
let { pretitle: l , title: e , description: t , dataAttributes: i , preamount: c , amount: m , button: h , subtitle: a , isErrorAmount: s , secondaryButton: y } = param;
|
|
93
|
+
const { isTabletOrSmaller: L } = f(), O = P(), u = (g, S)=>{
|
|
94
|
+
if (typeof g == "string") return /* @__PURE__ */ r(T, _objectSpreadProps(_objectSpread({
|
|
95
95
|
regular: !0
|
|
96
|
-
},
|
|
97
|
-
children:
|
|
96
|
+
}, S), {
|
|
97
|
+
children: g
|
|
98
98
|
}));
|
|
99
|
-
const { text:
|
|
99
|
+
const { text: G } = g, k = _objectWithoutProperties(g, [
|
|
100
100
|
"text"
|
|
101
101
|
]);
|
|
102
|
-
return /* @__PURE__ */ r(
|
|
102
|
+
return /* @__PURE__ */ r(T, _objectSpreadProps(_objectSpread({
|
|
103
103
|
regular: !0
|
|
104
|
-
},
|
|
105
|
-
children:
|
|
104
|
+
}, S, k), {
|
|
105
|
+
children: g.text
|
|
106
106
|
}));
|
|
107
107
|
};
|
|
108
|
-
return /* @__PURE__ */
|
|
108
|
+
return /* @__PURE__ */ o(n, {
|
|
109
109
|
space: L ? 24 : 32,
|
|
110
|
-
dataAttributes:
|
|
110
|
+
dataAttributes: i,
|
|
111
111
|
children: [
|
|
112
|
-
(e ||
|
|
112
|
+
(e || l || t) && /* @__PURE__ */ r(p, {
|
|
113
113
|
paddingRight: 16,
|
|
114
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ o(n, {
|
|
115
115
|
space: 8,
|
|
116
116
|
children: [
|
|
117
|
-
|
|
118
|
-
color:
|
|
117
|
+
l && u(l, {
|
|
118
|
+
color: d.colors.textPrimary
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */ r(
|
|
120
|
+
/* @__PURE__ */ r(H, {
|
|
121
121
|
role: "heading",
|
|
122
122
|
"aria-level": 2,
|
|
123
123
|
children: e
|
|
124
124
|
}),
|
|
125
|
-
|
|
125
|
+
t && /* @__PURE__ */ r(T, {
|
|
126
126
|
regular: !0,
|
|
127
|
-
color:
|
|
128
|
-
children:
|
|
127
|
+
color: d.colors.textSecondary,
|
|
128
|
+
children: t
|
|
129
129
|
})
|
|
130
130
|
]
|
|
131
131
|
})
|
|
132
132
|
}),
|
|
133
|
-
(c ||
|
|
133
|
+
(c || m || h || a) && /* @__PURE__ */ o(n, {
|
|
134
134
|
space: 16,
|
|
135
135
|
children: [
|
|
136
|
-
(c ||
|
|
136
|
+
(c || m) && /* @__PURE__ */ o(n, {
|
|
137
137
|
space: 8,
|
|
138
138
|
children: [
|
|
139
|
-
c &&
|
|
140
|
-
color:
|
|
139
|
+
c && u(c, {
|
|
140
|
+
color: d.colors.textPrimary
|
|
141
141
|
}),
|
|
142
142
|
/* @__PURE__ */ r(R, {
|
|
143
|
-
color:
|
|
144
|
-
children:
|
|
143
|
+
color: s && !O ? d.colors.highlight : d.colors.textPrimary,
|
|
144
|
+
children: m
|
|
145
145
|
})
|
|
146
146
|
]
|
|
147
147
|
}),
|
|
148
|
-
(
|
|
149
|
-
primaryButton:
|
|
150
|
-
secondaryButton:
|
|
148
|
+
(h || y) && /* @__PURE__ */ r(A, {
|
|
149
|
+
primaryButton: h,
|
|
150
|
+
secondaryButton: y
|
|
151
151
|
}),
|
|
152
|
-
|
|
152
|
+
a && u(a, {})
|
|
153
153
|
]
|
|
154
154
|
})
|
|
155
155
|
]
|
|
156
156
|
});
|
|
157
|
-
},
|
|
158
|
-
let { title:
|
|
159
|
-
const { isTabletOrSmaller:
|
|
160
|
-
return /* @__PURE__ */
|
|
157
|
+
}, Q = (param)=>{
|
|
158
|
+
let { title: l , description: e , button: t } = param;
|
|
159
|
+
const { isTabletOrSmaller: i } = f();
|
|
160
|
+
return /* @__PURE__ */ o(n, {
|
|
161
161
|
space: 32,
|
|
162
162
|
children: [
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
space:
|
|
163
|
+
/* @__PURE__ */ o(n, {
|
|
164
|
+
space: i ? 12 : 16,
|
|
165
165
|
children: [
|
|
166
|
-
|
|
166
|
+
l && /* @__PURE__ */ r(j, {
|
|
167
167
|
role: "heading",
|
|
168
168
|
"aria-level": 1,
|
|
169
|
-
children:
|
|
169
|
+
children: l
|
|
170
170
|
}),
|
|
171
|
-
e && /* @__PURE__ */ r(
|
|
171
|
+
e && /* @__PURE__ */ r(H, {
|
|
172
172
|
children: e
|
|
173
173
|
})
|
|
174
174
|
]
|
|
175
175
|
}),
|
|
176
|
-
|
|
176
|
+
t
|
|
177
177
|
]
|
|
178
178
|
});
|
|
179
|
-
},
|
|
180
|
-
let { isInverse:
|
|
181
|
-
const { isTabletOrSmaller: a } =
|
|
182
|
-
return /* @__PURE__ */
|
|
183
|
-
isInverse: i,
|
|
184
|
-
dataAttributes: _objectSpread({
|
|
185
|
-
"component-name": "HeaderLayout"
|
|
186
|
-
}, s),
|
|
179
|
+
}, U = (param)=>{
|
|
180
|
+
let { isInverse: l = !0 , breadcrumbs: e , header: t , extra: i , sideBySideExtraOnDesktop: c = !1 , dataAttributes: m , bleed: h = !1 } = param;
|
|
181
|
+
const { isTabletOrSmaller: a } = f(), s = h && l;
|
|
182
|
+
return /* @__PURE__ */ o(C, {
|
|
187
183
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
paddingTop: e ? 16 : 48,
|
|
201
|
-
paddingBottom: 48,
|
|
202
|
-
children: /* @__PURE__ */ r(T, {
|
|
203
|
-
template: "6+6",
|
|
204
|
-
left: /* @__PURE__ */ t(l, {
|
|
205
|
-
space: 32,
|
|
206
|
-
children: [
|
|
207
|
-
e,
|
|
208
|
-
o
|
|
209
|
-
]
|
|
210
|
-
}),
|
|
211
|
-
right: n
|
|
212
|
-
})
|
|
213
|
-
}) : /* @__PURE__ */ r(d, {
|
|
214
|
-
paddingTop: e ? 16 : 48,
|
|
215
|
-
paddingBottom: 48,
|
|
216
|
-
children: /* @__PURE__ */ t(l, {
|
|
217
|
-
space: a ? 24 : 32,
|
|
218
|
-
children: [
|
|
219
|
-
/* @__PURE__ */ t(l, {
|
|
220
|
-
space: 32,
|
|
184
|
+
/* @__PURE__ */ o(x, {
|
|
185
|
+
isInverse: l,
|
|
186
|
+
dataAttributes: _objectSpread({
|
|
187
|
+
"component-name": "HeaderLayout"
|
|
188
|
+
}, m),
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ r(B, {}),
|
|
191
|
+
a ? /* @__PURE__ */ r(p, {
|
|
192
|
+
paddingTop: t ? 32 : 0,
|
|
193
|
+
paddingBottom: 24,
|
|
194
|
+
children: /* @__PURE__ */ o(n, {
|
|
195
|
+
space: 24,
|
|
221
196
|
children: [
|
|
222
|
-
|
|
223
|
-
|
|
197
|
+
t,
|
|
198
|
+
!s && i
|
|
224
199
|
]
|
|
225
|
-
})
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
200
|
+
})
|
|
201
|
+
}) : c ? /* @__PURE__ */ r(p, {
|
|
202
|
+
paddingTop: e ? 16 : 48,
|
|
203
|
+
paddingBottom: 48,
|
|
204
|
+
children: /* @__PURE__ */ r(v, {
|
|
205
|
+
template: "6+6",
|
|
206
|
+
left: /* @__PURE__ */ o(n, {
|
|
207
|
+
space: 32,
|
|
208
|
+
children: [
|
|
209
|
+
e,
|
|
210
|
+
t
|
|
211
|
+
]
|
|
212
|
+
}),
|
|
213
|
+
right: i
|
|
214
|
+
})
|
|
215
|
+
}) : /* @__PURE__ */ r(p, {
|
|
216
|
+
paddingTop: e ? 16 : 48,
|
|
217
|
+
paddingBottom: s ? 32 : 48,
|
|
218
|
+
children: /* @__PURE__ */ o(n, {
|
|
219
|
+
space: a ? 24 : 32,
|
|
220
|
+
children: [
|
|
221
|
+
/* @__PURE__ */ o(n, {
|
|
222
|
+
space: 32,
|
|
223
|
+
children: [
|
|
224
|
+
e,
|
|
225
|
+
t
|
|
226
|
+
]
|
|
227
|
+
}),
|
|
228
|
+
!s && i
|
|
229
|
+
]
|
|
230
|
+
})
|
|
231
|
+
})
|
|
232
|
+
]
|
|
233
|
+
}),
|
|
234
|
+
s && i && (a || !c) && /* @__PURE__ */ r(x, {
|
|
235
|
+
backgroundColor: `linear-gradient(to bottom, ${d.colors.backgroundBrand} 40px, ${d.colors.background} 0%)`,
|
|
236
|
+
children: i
|
|
229
237
|
})
|
|
230
238
|
]
|
|
231
239
|
});
|
|
232
|
-
},
|
|
233
|
-
let { isInverse:
|
|
234
|
-
const { isTabletOrSmaller:
|
|
235
|
-
return /* @__PURE__ */
|
|
236
|
-
isInverse:
|
|
240
|
+
}, W = (param)=>{
|
|
241
|
+
let { isInverse: l = !0 , children: e } = param;
|
|
242
|
+
const { isTabletOrSmaller: t } = f();
|
|
243
|
+
return /* @__PURE__ */ o(x, {
|
|
244
|
+
isInverse: l,
|
|
237
245
|
children: [
|
|
238
|
-
/* @__PURE__ */ r(
|
|
239
|
-
|
|
246
|
+
/* @__PURE__ */ r(B, {}),
|
|
247
|
+
t ? /* @__PURE__ */ r(p, {
|
|
240
248
|
paddingTop: 12,
|
|
241
249
|
paddingBottom: 24,
|
|
242
250
|
children: e
|
|
243
|
-
}) : /* @__PURE__ */ r(
|
|
251
|
+
}) : /* @__PURE__ */ r(v, {
|
|
244
252
|
template: "6+6",
|
|
245
|
-
left: /* @__PURE__ */ r(
|
|
253
|
+
left: /* @__PURE__ */ r(p, {
|
|
246
254
|
paddingY: 48,
|
|
247
255
|
children: e
|
|
248
256
|
}),
|
|
@@ -251,4 +259,4 @@ const J = (param)=>{
|
|
|
251
259
|
]
|
|
252
260
|
});
|
|
253
261
|
};
|
|
254
|
-
export {
|
|
262
|
+
export { N as Header, U as HeaderLayout, Q as MainSectionHeader, W as MainSectionHeaderLayout };
|
|
@@ -77,49 +77,54 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
77
77
|
}
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
|
-
import * as
|
|
81
|
-
import { useIsInverseVariant as
|
|
82
|
-
import
|
|
80
|
+
import * as g from "react";
|
|
81
|
+
import { useIsInverseVariant as v } from "./theme-variant-context.js";
|
|
82
|
+
import w from "./box.js";
|
|
83
83
|
import { BaseTouchable as c } from "./touchable.js";
|
|
84
|
-
import {
|
|
85
|
-
import { Boxed as
|
|
86
|
-
import C, { useIsDismissable as
|
|
87
|
-
import { container as
|
|
88
|
-
import { vars as
|
|
89
|
-
import {
|
|
90
|
-
|
|
84
|
+
import { Text as x, Text2 as k } from "./text.js";
|
|
85
|
+
import { Boxed as I } from "./boxed.js";
|
|
86
|
+
import C, { useIsDismissable as T } from "./maybe-dismissable.js";
|
|
87
|
+
import { container as P, textContainerVariant as E, imageContent as N, touchableContainer as s } from "./highlighted-card.css-mistica.js";
|
|
88
|
+
import { vars as H } from "./skins/skin-contract.css-mistica.js";
|
|
89
|
+
import { useTheme as y } from "./hooks.js";
|
|
90
|
+
import { jsxs as m, jsx as t, Fragment as R } from "./_virtual/jsx-runtime.js";
|
|
91
|
+
const S = /*#__PURE__*/ g.forwardRef((e, i)=>{
|
|
91
92
|
var h;
|
|
92
|
-
const { title: a , description: r , imageUrl: o , imageFit: l } = e,
|
|
93
|
+
const { title: a , description: r , imageUrl: o , imageFit: l } = e, u = v(), f = (h = e.isInverse) != null ? h : u, d = T(), { textPresets: b } = y(), n = /* @__PURE__ */ m(I, {
|
|
93
94
|
ref: i,
|
|
94
|
-
isInverse:
|
|
95
|
-
className:
|
|
95
|
+
isInverse: f,
|
|
96
|
+
className: P,
|
|
96
97
|
dataAttributes: _objectSpread({
|
|
97
98
|
"component-name": "HighlightedCard"
|
|
98
99
|
}, e.dataAttributes),
|
|
99
100
|
width: e.width ? `${e.width}px` : "100%",
|
|
100
101
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
role:
|
|
103
|
-
className:
|
|
104
|
-
"aria-label":
|
|
102
|
+
/* @__PURE__ */ m("div", {
|
|
103
|
+
role: d ? void 0 : "region",
|
|
104
|
+
className: E[o ? "withImage" : "withoutImage"],
|
|
105
|
+
"aria-label": d ? void 0 : e["aria-label"],
|
|
105
106
|
children: [
|
|
106
|
-
/* @__PURE__ */ t(
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
/* @__PURE__ */ t(x, {
|
|
108
|
+
mobileSize: 18,
|
|
109
|
+
mobileLineHeight: "24px",
|
|
110
|
+
desktopSize: 20,
|
|
111
|
+
desktopLineHeight: "28px",
|
|
109
112
|
truncate: e.titleLinesMax,
|
|
113
|
+
weight: b.cardTitle.weight,
|
|
114
|
+
as: "h3",
|
|
110
115
|
children: a
|
|
111
116
|
}),
|
|
112
|
-
/* @__PURE__ */ t(
|
|
117
|
+
/* @__PURE__ */ t(w, {
|
|
113
118
|
paddingTop: 8,
|
|
114
|
-
children: /* @__PURE__ */ t(
|
|
119
|
+
children: /* @__PURE__ */ t(k, {
|
|
115
120
|
regular: !0,
|
|
116
|
-
color:
|
|
121
|
+
color: H.colors.textSecondary,
|
|
117
122
|
truncate: e.descriptionLinesMax,
|
|
118
123
|
as: "p",
|
|
119
124
|
children: r
|
|
120
125
|
})
|
|
121
126
|
}),
|
|
122
|
-
e.button && /* @__PURE__ */
|
|
127
|
+
e.button && /* @__PURE__ */ m(R, {
|
|
123
128
|
children: [
|
|
124
129
|
/* @__PURE__ */ t("div", {
|
|
125
130
|
style: {
|
|
@@ -133,9 +138,10 @@ const V = /*#__PURE__*/ u.forwardRef((e, i)=>{
|
|
|
133
138
|
]
|
|
134
139
|
}),
|
|
135
140
|
o && /* @__PURE__ */ t("div", {
|
|
136
|
-
className:
|
|
141
|
+
className: N,
|
|
137
142
|
style: {
|
|
138
|
-
|
|
143
|
+
backgroundImage: `url(${o})`,
|
|
144
|
+
backgroundRepeat: "no-repeat",
|
|
139
145
|
backgroundSize: l === "fit" ? "contain" : "cover",
|
|
140
146
|
backgroundPosition: l === "fit" ? "bottom right" : `center ${l === "fill-center" ? "center" : "right"}`
|
|
141
147
|
}
|
|
@@ -160,7 +166,7 @@ const V = /*#__PURE__*/ u.forwardRef((e, i)=>{
|
|
|
160
166
|
className: s,
|
|
161
167
|
children: n
|
|
162
168
|
}) : n;
|
|
163
|
-
}),
|
|
169
|
+
}), W = /*#__PURE__*/ g.forwardRef((_param, a)=>{
|
|
164
170
|
var { "aria-label": e } = _param, i = _objectWithoutProperties(_param, [
|
|
165
171
|
"aria-label"
|
|
166
172
|
]);
|
|
@@ -169,10 +175,10 @@ const V = /*#__PURE__*/ u.forwardRef((e, i)=>{
|
|
|
169
175
|
onClose: i.onClose,
|
|
170
176
|
"aria-label": r,
|
|
171
177
|
width: i.width,
|
|
172
|
-
children: /* @__PURE__ */ t(
|
|
178
|
+
children: /* @__PURE__ */ t(S, _objectSpreadProps(_objectSpread({}, i), {
|
|
173
179
|
"aria-label": r,
|
|
174
180
|
ref: a
|
|
175
181
|
}))
|
|
176
182
|
});
|
|
177
183
|
});
|
|
178
|
-
export {
|
|
184
|
+
export { W as default };
|