@telefonica/mistica 16.5.0 → 16.6.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/callout.js +27 -15
- package/dist/card.css-mistica.js +5 -5
- package/dist/card.d.ts +9 -1
- package/dist/card.js +611 -475
- package/dist/community/advanced-data-card.css-mistica.js +14 -11
- package/dist/community/advanced-data-card.css.d.ts +1 -0
- package/dist/community/advanced-data-card.d.ts +1 -1
- package/dist/community/advanced-data-card.js +172 -85
- package/dist/cover-hero.css-mistica.js +14 -11
- package/dist/cover-hero.css.d.ts +1 -0
- package/dist/cover-hero.d.ts +1 -0
- package/dist/cover-hero.js +101 -59
- package/dist/empty-state.js +24 -15
- package/dist/header.css-mistica.js +6 -3
- package/dist/header.css.d.ts +1 -0
- package/dist/header.d.ts +3 -2
- package/dist/header.js +148 -79
- package/dist/hero.css-mistica.js +11 -8
- package/dist/hero.css.d.ts +1 -0
- package/dist/hero.d.ts +2 -1
- package/dist/hero.js +102 -68
- package/dist/highlighted-card.js +32 -23
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/maybe-dismissable.js +8 -5
- package/dist/meter.d.ts +23 -0
- package/dist/meter.js +400 -0
- package/dist/package-version.js +1 -1
- package/dist/sheet-common.css-mistica.js +16 -10
- package/dist/sheet-common.css.d.ts +3 -1
- package/dist/sheet-common.js +78 -70
- package/dist/sheet-info.css-mistica.js +15 -4
- package/dist/sheet-info.css.d.ts +2 -0
- package/dist/sheet-info.d.ts +3 -0
- package/dist/sheet-info.js +61 -43
- package/dist/sheet-native.js +59 -48
- package/dist/sheet-types.d.ts +6 -1
- package/dist/sheet-web.js +6 -4
- package/dist/text-tokens.d.ts +10 -0
- package/dist/text-tokens.js +54 -38
- package/dist/theme-context-provider.js +60 -50
- package/dist/theme.d.ts +3 -2
- package/dist/utils/headings.d.ts +2 -0
- package/dist/utils/headings.js +11 -0
- package/dist/utils/types.d.ts +1 -0
- package/dist-es/callout.js +55 -43
- package/dist-es/card.css-mistica.js +2 -2
- package/dist-es/card.js +721 -588
- package/dist-es/community/advanced-data-card.css-mistica.js +3 -3
- package/dist-es/community/advanced-data-card.js +217 -130
- package/dist-es/cover-hero.css-mistica.js +3 -3
- package/dist-es/cover-hero.js +132 -90
- package/dist-es/empty-state.js +40 -31
- package/dist-es/header.css-mistica.js +2 -2
- package/dist-es/header.js +174 -104
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +150 -115
- package/dist-es/highlighted-card.js +36 -27
- package/dist-es/index.js +1839 -1838
- package/dist-es/maybe-dismissable.js +17 -14
- package/dist-es/meter.js +346 -0
- package/dist-es/package-version.js +1 -1
- package/dist-es/sheet-common.css-mistica.js +2 -2
- package/dist-es/sheet-common.js +124 -116
- package/dist-es/sheet-info.css-mistica.js +2 -2
- package/dist-es/sheet-info.js +74 -56
- package/dist-es/sheet-native.js +59 -48
- package/dist-es/sheet-web.js +10 -8
- package/dist-es/style.css +1 -1
- package/dist-es/text-tokens.js +30 -20
- package/dist-es/theme-context-provider.js +88 -78
- package/dist-es/utils/headings.js +2 -0
- package/package.json +2 -1
package/dist/card.js
CHANGED
|
@@ -11,40 +11,43 @@ function _export(target, all) {
|
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
13
|
CardActionIconButton: function() {
|
|
14
|
-
return
|
|
14
|
+
return xa;
|
|
15
15
|
},
|
|
16
16
|
CardActionSpinner: function() {
|
|
17
|
-
return
|
|
17
|
+
return ba;
|
|
18
18
|
},
|
|
19
19
|
CardActionsGroup: function() {
|
|
20
|
-
return
|
|
20
|
+
return de;
|
|
21
21
|
},
|
|
22
22
|
DataCard: function() {
|
|
23
|
-
return
|
|
23
|
+
return ir;
|
|
24
24
|
},
|
|
25
25
|
DisplayDataCard: function() {
|
|
26
|
-
return
|
|
26
|
+
return sr;
|
|
27
27
|
},
|
|
28
28
|
DisplayMediaCard: function() {
|
|
29
|
-
return
|
|
29
|
+
return or;
|
|
30
30
|
},
|
|
31
31
|
MediaCard: function() {
|
|
32
|
-
return
|
|
32
|
+
return rr;
|
|
33
33
|
},
|
|
34
34
|
NakedCard: function() {
|
|
35
|
-
return
|
|
35
|
+
return tr;
|
|
36
36
|
},
|
|
37
37
|
PosterCard: function() {
|
|
38
|
-
return
|
|
38
|
+
return lr;
|
|
39
39
|
},
|
|
40
40
|
SmallNakedCard: function() {
|
|
41
|
-
return
|
|
41
|
+
return dr;
|
|
42
42
|
},
|
|
43
43
|
SnapCard: function() {
|
|
44
|
-
return
|
|
44
|
+
return nr;
|
|
45
|
+
},
|
|
46
|
+
useInnerText: function() {
|
|
47
|
+
return O;
|
|
45
48
|
},
|
|
46
49
|
useVideoWithControls: function() {
|
|
47
|
-
return
|
|
50
|
+
return Fe;
|
|
48
51
|
}
|
|
49
52
|
});
|
|
50
53
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -76,6 +79,7 @@ const _dom = require("./utils/dom.js");
|
|
|
76
79
|
const _platform = require("./utils/platform.js");
|
|
77
80
|
const _css = require("./utils/css.js");
|
|
78
81
|
const _texttokens = require("./text-tokens.js");
|
|
82
|
+
const _headings = require("./utils/headings.js");
|
|
79
83
|
function _interop_require_default(obj) {
|
|
80
84
|
return obj && obj.__esModule ? obj : {
|
|
81
85
|
default: obj
|
|
@@ -201,25 +205,25 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
201
205
|
}
|
|
202
206
|
return target;
|
|
203
207
|
}
|
|
204
|
-
const
|
|
205
|
-
const [a,
|
|
206
|
-
|
|
208
|
+
const O = ()=>{
|
|
209
|
+
const [a, r] = _react.useState(""), t = _react.useCallback((n)=>{
|
|
210
|
+
n && r((process.env.NODE_ENV === "test" ? n.textContent : n.innerText) || "");
|
|
207
211
|
}, []);
|
|
208
212
|
return {
|
|
209
213
|
text: a,
|
|
210
|
-
ref:
|
|
214
|
+
ref: t
|
|
211
215
|
};
|
|
212
|
-
},
|
|
213
|
-
const { texts:
|
|
216
|
+
}, We = (a, r, t)=>{
|
|
217
|
+
const { texts: n, t: c } = (0, _hooks.useTheme)(), i = a ? [
|
|
214
218
|
...a
|
|
215
219
|
] : [];
|
|
216
|
-
return
|
|
217
|
-
label:
|
|
218
|
-
onPress:
|
|
220
|
+
return r && i.push({
|
|
221
|
+
label: t || n.closeButtonLabel || c(_texttokens.closeButtonLabel),
|
|
222
|
+
onPress: r,
|
|
219
223
|
Icon: _iconcloseregular.default
|
|
220
|
-
}),
|
|
221
|
-
},
|
|
222
|
-
const
|
|
224
|
+
}), i;
|
|
225
|
+
}, xa = (a)=>{
|
|
226
|
+
const r = (0, _themevariantcontext.useThemeVariant)();
|
|
223
227
|
return a.Icon ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.IconButton, _object_spread_props(_object_spread({}, a), {
|
|
224
228
|
"aria-label": a.label,
|
|
225
229
|
small: !0,
|
|
@@ -228,7 +232,7 @@ const M = ()=>{
|
|
|
228
232
|
})) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.ToggleIconButton, _object_spread_props(_object_spread({}, a), {
|
|
229
233
|
checkedProps: _object_spread_props(_object_spread({}, a.checkedProps), {
|
|
230
234
|
"aria-label": a.checkedProps.label,
|
|
231
|
-
type:
|
|
235
|
+
type: r === "media" ? "neutral" : "brand",
|
|
232
236
|
backgroundType: "solid"
|
|
233
237
|
}),
|
|
234
238
|
uncheckedProps: _object_spread_props(_object_spread({}, a.uncheckedProps), {
|
|
@@ -238,16 +242,16 @@ const M = ()=>{
|
|
|
238
242
|
}),
|
|
239
243
|
small: !0
|
|
240
244
|
}));
|
|
241
|
-
},
|
|
242
|
-
let { actions: a, padding:
|
|
243
|
-
const
|
|
244
|
-
return
|
|
245
|
-
variant:
|
|
245
|
+
}, de = (param)=>{
|
|
246
|
+
let { actions: a, padding: r = 16, onClose: t, variant: n = "default", closeButtonLabel: c } = param;
|
|
247
|
+
const i = We(a, t, c);
|
|
248
|
+
return i.length > 0 ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
|
|
249
|
+
variant: n,
|
|
246
250
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
247
251
|
style: {
|
|
248
252
|
position: "absolute",
|
|
249
|
-
right:
|
|
250
|
-
top:
|
|
253
|
+
right: r,
|
|
254
|
+
top: r,
|
|
251
255
|
zIndex: 3
|
|
252
256
|
},
|
|
253
257
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_inline.default, {
|
|
@@ -255,40 +259,40 @@ const M = ()=>{
|
|
|
255
259
|
dataAttributes: {
|
|
256
260
|
testid: "topActions"
|
|
257
261
|
},
|
|
258
|
-
children:
|
|
262
|
+
children: i.map((s, o)=>"Icon" in s || "checkedProps" in s ? /* @__PURE__ */ (0, _jsxruntime.jsx)(xa, _object_spread({}, s), o) : s)
|
|
259
263
|
})
|
|
260
264
|
})
|
|
261
265
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {});
|
|
262
|
-
},
|
|
266
|
+
}, Na = (a)=>a ? typeof a == "number" ? a : ({
|
|
263
267
|
"1:1": 1,
|
|
264
268
|
"16:9": 16 / 9,
|
|
265
269
|
"7:10": 7 / 10,
|
|
266
270
|
"9:10": 9 / 10,
|
|
267
271
|
auto: 0
|
|
268
|
-
})[a] : 0,
|
|
269
|
-
let { children: a, width:
|
|
270
|
-
const
|
|
271
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)("section", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(
|
|
272
|
-
ref:
|
|
273
|
-
"aria-label":
|
|
274
|
-
className: (0, _classnames.default)(
|
|
272
|
+
})[a] : 0, J = /*#__PURE__*/ _react.forwardRef((param, s)=>{
|
|
273
|
+
let { children: a, width: r, height: t, aspectRatio: n, dataAttributes: c, className: i, "aria-label": d } = param;
|
|
274
|
+
const o = r && t ? void 0 : Na(n);
|
|
275
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)("section", _object_spread_props(_object_spread({}, (0, _dom.getPrefixedDataAttributes)(c)), {
|
|
276
|
+
ref: s,
|
|
277
|
+
"aria-label": d,
|
|
278
|
+
className: (0, _classnames.default)(i, _cardcssmistica.cardContainer),
|
|
275
279
|
style: _object_spread({
|
|
276
|
-
width:
|
|
277
|
-
height:
|
|
278
|
-
},
|
|
279
|
-
[_cardcssmistica.vars.aspectRatio]: String(
|
|
280
|
+
width: r || "100%",
|
|
281
|
+
height: t || "100%"
|
|
282
|
+
}, o ? (0, _css.applyCssVars)({
|
|
283
|
+
[_cardcssmistica.vars.aspectRatio]: String(o)
|
|
280
284
|
}) : {}),
|
|
281
285
|
children: a
|
|
282
286
|
}));
|
|
283
|
-
}),
|
|
284
|
-
const
|
|
287
|
+
}), Ge = (a)=>{
|
|
288
|
+
const r = typeof a == "string" ? a : a == null ? void 0 : a.src, t = typeof a == "string" || a == null ? void 0 : a.srcSet;
|
|
285
289
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_image.default, {
|
|
286
290
|
width: "100%",
|
|
287
291
|
height: "100%",
|
|
288
|
-
src:
|
|
289
|
-
srcSet:
|
|
292
|
+
src: r || "",
|
|
293
|
+
srcSet: t
|
|
290
294
|
});
|
|
291
|
-
},
|
|
295
|
+
}, Ta = {
|
|
292
296
|
loading: {
|
|
293
297
|
showSpinner: "loadingTimeout",
|
|
294
298
|
play: "playing",
|
|
@@ -314,173 +318,222 @@ const M = ()=>{
|
|
|
314
318
|
error: {
|
|
315
319
|
reset: "loading"
|
|
316
320
|
}
|
|
317
|
-
},
|
|
321
|
+
}, Ba = (a, r)=>Ta[a][r] || a, ba = (param)=>{
|
|
318
322
|
let { color: a } = param;
|
|
319
323
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_spinner.default, {
|
|
320
324
|
color: a,
|
|
321
325
|
size: 16,
|
|
322
326
|
delay: "0"
|
|
323
327
|
});
|
|
324
|
-
},
|
|
328
|
+
}, Ra = (param)=>{
|
|
325
329
|
let { color: a } = param;
|
|
326
330
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconpausefilled.default, {
|
|
327
331
|
color: a,
|
|
328
332
|
size: 12
|
|
329
333
|
});
|
|
330
|
-
},
|
|
334
|
+
}, Sa = (param)=>{
|
|
331
335
|
let { color: a } = param;
|
|
332
336
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconplayfilled.default, {
|
|
333
337
|
color: a,
|
|
334
338
|
size: 12
|
|
335
339
|
});
|
|
336
|
-
},
|
|
337
|
-
const { texts:
|
|
340
|
+
}, Fe = (a, r, t)=>{
|
|
341
|
+
const { texts: n, t: c } = (0, _hooks.useTheme)(), i = _react.useRef(null), [d, s] = _react.useReducer(Ba, "loading");
|
|
338
342
|
_react.useEffect(()=>{
|
|
339
|
-
var
|
|
340
|
-
const h = setTimeout(()=>
|
|
341
|
-
return (
|
|
342
|
-
clearTimeout(h),
|
|
343
|
+
var y;
|
|
344
|
+
const h = setTimeout(()=>s("showSpinner"), 2e3);
|
|
345
|
+
return (y = i.current) == null || y.load(), ()=>{
|
|
346
|
+
clearTimeout(h), s("reset");
|
|
343
347
|
};
|
|
344
348
|
}, [
|
|
345
349
|
a
|
|
346
350
|
]);
|
|
347
|
-
const
|
|
348
|
-
ref: (0, _common.combineRefs)(
|
|
351
|
+
const o = _react.useMemo(()=>a !== void 0 ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_video.default, {
|
|
352
|
+
ref: (0, _common.combineRefs)(i, t),
|
|
349
353
|
src: a,
|
|
350
354
|
width: "100%",
|
|
351
355
|
height: "100%",
|
|
352
|
-
poster:
|
|
353
|
-
onError: ()=>
|
|
354
|
-
onPause: ()=>
|
|
355
|
-
onPlay: ()=>
|
|
356
|
+
poster: r,
|
|
357
|
+
onError: ()=>s("fail"),
|
|
358
|
+
onPause: ()=>s("pause"),
|
|
359
|
+
onPlay: ()=>s("play")
|
|
356
360
|
}) : void 0, [
|
|
357
|
-
|
|
361
|
+
t,
|
|
358
362
|
a,
|
|
359
|
-
|
|
360
|
-
]),
|
|
361
|
-
const h =
|
|
362
|
-
h && (
|
|
363
|
+
r
|
|
364
|
+
]), u = ()=>{
|
|
365
|
+
const h = i.current;
|
|
366
|
+
h && (d === "loading" ? s("showSpinner") : d === "paused" ? h.play() : d === "playing" && h.pause());
|
|
363
367
|
};
|
|
364
|
-
if (
|
|
365
|
-
video:
|
|
368
|
+
if (d === "error") return {
|
|
369
|
+
video: o
|
|
366
370
|
};
|
|
367
|
-
const
|
|
371
|
+
const m = o ? {
|
|
368
372
|
uncheckedProps: {
|
|
369
|
-
Icon:
|
|
370
|
-
label:
|
|
373
|
+
Icon: d === "loadingTimeout" && !(0, _platform.isRunningAcceptanceTest)() ? ba : Ra,
|
|
374
|
+
label: d === "loadingTimeout" ? "" : n.pauseIconButtonLabel || c(_texttokens.pauseIconButtonLabel)
|
|
371
375
|
},
|
|
372
376
|
checkedProps: {
|
|
373
|
-
Icon:
|
|
374
|
-
label:
|
|
377
|
+
Icon: Sa,
|
|
378
|
+
label: n.playIconButtonLabel || c(_texttokens.playIconButtonLabel)
|
|
375
379
|
},
|
|
376
|
-
onChange:
|
|
377
|
-
disabled:
|
|
378
|
-
checked:
|
|
380
|
+
onChange: u,
|
|
381
|
+
disabled: d === "loadingTimeout",
|
|
382
|
+
checked: d === "paused"
|
|
379
383
|
} : void 0;
|
|
380
384
|
return {
|
|
381
|
-
video:
|
|
382
|
-
videoAction:
|
|
385
|
+
video: o,
|
|
386
|
+
videoAction: m
|
|
383
387
|
};
|
|
384
|
-
},
|
|
385
|
-
let { headline: a, headlineRef:
|
|
386
|
-
const { textPresets:
|
|
388
|
+
}, Ne = (param)=>{
|
|
389
|
+
let { headline: a, headlineRef: r, pretitle: t, pretitleAs: n, pretitleLinesMax: c, title: i, titleAs: d = "h3", titleLinesMax: s, subtitle: o, subtitleLinesMax: u, description: m, descriptionLinesMax: h, extra: y, extraRef: v, button: p, buttonLink: x } = param;
|
|
390
|
+
const { textPresets: g } = (0, _hooks.useTheme)();
|
|
387
391
|
return /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
388
392
|
className: _cardcssmistica.cardContentContainer,
|
|
389
393
|
children: [
|
|
390
394
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
391
395
|
className: _cardcssmistica.flexColumn,
|
|
392
396
|
children: [
|
|
393
|
-
n
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
397
|
+
(0, _headings.isBiggerHeading)(d, n) ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
398
|
+
children: [
|
|
399
|
+
i && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
400
|
+
style: {
|
|
401
|
+
paddingBottom: o || m ? 4 : 0
|
|
402
|
+
},
|
|
403
|
+
"data-testid": "title",
|
|
404
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _textprops.text4), {
|
|
405
|
+
truncate: s,
|
|
406
|
+
weight: g.cardTitle.weight,
|
|
407
|
+
as: d,
|
|
408
|
+
hyphens: "auto",
|
|
409
|
+
children: i
|
|
410
|
+
}))
|
|
411
|
+
}),
|
|
412
|
+
a && // assuming that the headline will always be followed by one of: pretitle, title, subtitle, description
|
|
413
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
414
|
+
ref: r,
|
|
415
|
+
style: {
|
|
416
|
+
order: -2,
|
|
417
|
+
paddingBottom: 8
|
|
418
|
+
},
|
|
419
|
+
"data-testid": "headline",
|
|
420
|
+
children: typeof a == "string" ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_tag.default, {
|
|
421
|
+
type: "promo",
|
|
422
|
+
children: a
|
|
423
|
+
}) : a
|
|
424
|
+
}),
|
|
425
|
+
t && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
426
|
+
style: {
|
|
427
|
+
order: -1,
|
|
428
|
+
paddingBottom: 4
|
|
429
|
+
},
|
|
430
|
+
"data-testid": "pretitle",
|
|
431
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
432
|
+
truncate: c,
|
|
433
|
+
as: n,
|
|
434
|
+
regular: !0,
|
|
435
|
+
hyphens: "auto",
|
|
436
|
+
children: t
|
|
437
|
+
})
|
|
438
|
+
})
|
|
439
|
+
]
|
|
440
|
+
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {
|
|
441
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
442
|
+
children: [
|
|
443
|
+
t && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
444
|
+
style: {
|
|
445
|
+
paddingBottom: 4
|
|
446
|
+
},
|
|
447
|
+
"data-testid": "pretitle",
|
|
448
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
449
|
+
truncate: c,
|
|
450
|
+
as: n,
|
|
451
|
+
regular: !0,
|
|
452
|
+
hyphens: "auto",
|
|
453
|
+
children: t
|
|
454
|
+
})
|
|
455
|
+
}),
|
|
456
|
+
a && // assuming that the headline will always be followed by one of: pretitle, title, subtitle, description
|
|
457
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
458
|
+
ref: r,
|
|
459
|
+
style: {
|
|
460
|
+
order: -1,
|
|
461
|
+
paddingBottom: 8
|
|
462
|
+
},
|
|
463
|
+
"data-testid": "headline",
|
|
464
|
+
children: typeof a == "string" ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_tag.default, {
|
|
465
|
+
type: "promo",
|
|
466
|
+
children: a
|
|
467
|
+
}) : a
|
|
468
|
+
}),
|
|
469
|
+
i && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
470
|
+
style: {
|
|
471
|
+
paddingBottom: o || m ? 4 : 0
|
|
472
|
+
},
|
|
473
|
+
"data-testid": "title",
|
|
474
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _textprops.text4), {
|
|
475
|
+
truncate: s,
|
|
476
|
+
weight: g.cardTitle.weight,
|
|
477
|
+
as: d,
|
|
478
|
+
hyphens: "auto",
|
|
479
|
+
children: i
|
|
480
|
+
}))
|
|
481
|
+
})
|
|
482
|
+
]
|
|
431
483
|
})
|
|
432
484
|
}),
|
|
433
|
-
|
|
485
|
+
o && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
434
486
|
style: {
|
|
435
|
-
paddingBottom:
|
|
487
|
+
paddingBottom: m ? 4 : 0
|
|
436
488
|
},
|
|
437
489
|
"data-testid": "subtitle",
|
|
438
490
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
439
|
-
truncate:
|
|
491
|
+
truncate: u,
|
|
440
492
|
as: "div",
|
|
441
493
|
regular: !0,
|
|
442
494
|
hyphens: "auto",
|
|
443
|
-
children:
|
|
495
|
+
children: o
|
|
444
496
|
})
|
|
445
497
|
}),
|
|
446
|
-
|
|
498
|
+
m && // this is tricky, when headline exists, the 8px padding is added by it.
|
|
447
499
|
// Otherwise, only 4px are added by title|pretitle|subtitle, so we need to add 4px more
|
|
448
500
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
449
501
|
style: {
|
|
450
|
-
paddingTop:
|
|
502
|
+
paddingTop: t || i || o ? 4 : 0
|
|
451
503
|
},
|
|
452
504
|
"data-testid": "description",
|
|
453
505
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
454
|
-
truncate:
|
|
506
|
+
truncate: h,
|
|
455
507
|
as: "p",
|
|
456
508
|
regular: !0,
|
|
457
509
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
458
510
|
hyphens: "auto",
|
|
459
|
-
children:
|
|
511
|
+
children: m
|
|
460
512
|
})
|
|
461
513
|
}),
|
|
462
|
-
|
|
463
|
-
ref:
|
|
514
|
+
y && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
515
|
+
ref: v,
|
|
464
516
|
"data-testid": "slot",
|
|
465
|
-
children:
|
|
517
|
+
children: y
|
|
466
518
|
})
|
|
467
519
|
]
|
|
468
520
|
}),
|
|
469
|
-
(
|
|
521
|
+
(p || x) && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
470
522
|
className: _cardcssmistica.actions,
|
|
471
523
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttongroup.default, {
|
|
472
|
-
primaryButton:
|
|
473
|
-
link:
|
|
524
|
+
primaryButton: p,
|
|
525
|
+
link: x
|
|
474
526
|
})
|
|
475
527
|
})
|
|
476
528
|
]
|
|
477
529
|
});
|
|
478
|
-
},
|
|
479
|
-
var { media: a, asset:
|
|
530
|
+
}, rr = /*#__PURE__*/ _react.forwardRef((_param, I)=>{
|
|
531
|
+
var { media: a, asset: r, headline: t, pretitle: n, pretitleAs: c, pretitleLinesMax: i, subtitle: d, subtitleLinesMax: s, title: o, titleAs: u = "h3", titleLinesMax: m, description: h, descriptionLinesMax: y, extra: v, actions: p, button: x, buttonLink: g, dataAttributes: B, "aria-label": N, onClose: j, closeButtonLabel: b } = _param, T = _object_without_properties(_param, [
|
|
480
532
|
"media",
|
|
481
533
|
"asset",
|
|
482
534
|
"headline",
|
|
483
535
|
"pretitle",
|
|
536
|
+
"pretitleAs",
|
|
484
537
|
"pretitleLinesMax",
|
|
485
538
|
"subtitle",
|
|
486
539
|
"subtitleLinesMax",
|
|
@@ -498,21 +551,28 @@ const M = ()=>{
|
|
|
498
551
|
"onClose",
|
|
499
552
|
"closeButtonLabel"
|
|
500
553
|
]);
|
|
501
|
-
const R = !!(
|
|
502
|
-
|
|
503
|
-
|
|
554
|
+
const R = !!(T.href || T.to || T.onPress), { text: A, ref: V } = O(), { text: E, ref: w } = O(), D = N || ((0, _headings.isBiggerHeading)(u, c) ? [
|
|
555
|
+
o,
|
|
556
|
+
A,
|
|
557
|
+
n,
|
|
504
558
|
d,
|
|
559
|
+
h,
|
|
560
|
+
E
|
|
561
|
+
] : [
|
|
562
|
+
n,
|
|
563
|
+
A,
|
|
505
564
|
o,
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
565
|
+
d,
|
|
566
|
+
h,
|
|
567
|
+
E
|
|
568
|
+
]).filter(Boolean).join(" ");
|
|
569
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(J, {
|
|
510
570
|
dataAttributes: _object_spread({
|
|
511
571
|
"component-name": "MediaCard",
|
|
512
572
|
testid: "MediaCard"
|
|
513
|
-
},
|
|
514
|
-
ref:
|
|
515
|
-
"aria-label": R ? void 0 :
|
|
573
|
+
}, B),
|
|
574
|
+
ref: I,
|
|
575
|
+
"aria-label": R ? void 0 : N,
|
|
516
576
|
className: _cardcssmistica.touchableContainer,
|
|
517
577
|
children: [
|
|
518
578
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_boxed.Boxed, {
|
|
@@ -521,15 +581,16 @@ const M = ()=>{
|
|
|
521
581
|
height: "100%",
|
|
522
582
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
523
583
|
maybe: !0
|
|
524
|
-
},
|
|
584
|
+
}, T), {
|
|
525
585
|
className: _cardcssmistica.touchable,
|
|
526
|
-
"aria-label": R ?
|
|
586
|
+
"aria-label": R ? D : void 0,
|
|
527
587
|
children: [
|
|
528
588
|
R && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
529
589
|
className: _cardcssmistica.touchableMediaCardOverlay
|
|
530
590
|
}),
|
|
531
591
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
532
592
|
className: _cardcssmistica.mediaCard,
|
|
593
|
+
"aria-hidden": R,
|
|
533
594
|
children: [
|
|
534
595
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
535
596
|
style: (0, _css.applyCssVars)({
|
|
@@ -539,51 +600,53 @@ const M = ()=>{
|
|
|
539
600
|
}),
|
|
540
601
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
541
602
|
className: _cardcssmistica.mediaCardContent,
|
|
542
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
543
|
-
headline:
|
|
544
|
-
headlineRef:
|
|
545
|
-
pretitle:
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
603
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Ne, {
|
|
604
|
+
headline: t,
|
|
605
|
+
headlineRef: V,
|
|
606
|
+
pretitle: n,
|
|
607
|
+
pretitleAs: c,
|
|
608
|
+
pretitleLinesMax: i,
|
|
609
|
+
title: o,
|
|
610
|
+
titleAs: u,
|
|
611
|
+
titleLinesMax: m,
|
|
612
|
+
subtitle: d,
|
|
551
613
|
subtitleLinesMax: s,
|
|
552
|
-
description:
|
|
553
|
-
descriptionLinesMax:
|
|
554
|
-
extra:
|
|
555
|
-
extraRef:
|
|
556
|
-
button:
|
|
557
|
-
buttonLink:
|
|
614
|
+
description: h,
|
|
615
|
+
descriptionLinesMax: y,
|
|
616
|
+
extra: v,
|
|
617
|
+
extraRef: w,
|
|
618
|
+
button: x,
|
|
619
|
+
buttonLink: g
|
|
558
620
|
})
|
|
559
621
|
}),
|
|
560
|
-
|
|
622
|
+
r && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
561
623
|
className: _cardcssmistica.mediaCardAsset,
|
|
562
624
|
style: (0, _css.applyCssVars)({
|
|
563
625
|
[_imagecssmistica.vars.mediaBorderRadius]: _skincontractcssmistica.vars.borderRadii.mediaSmall
|
|
564
626
|
}),
|
|
565
627
|
"data-testid": "asset",
|
|
566
|
-
children:
|
|
628
|
+
children: r
|
|
567
629
|
})
|
|
568
630
|
]
|
|
569
631
|
})
|
|
570
632
|
]
|
|
571
633
|
}))
|
|
572
634
|
}),
|
|
573
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
574
|
-
onClose:
|
|
575
|
-
closeButtonLabel:
|
|
576
|
-
actions:
|
|
635
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(de, {
|
|
636
|
+
onClose: j,
|
|
637
|
+
closeButtonLabel: b,
|
|
638
|
+
actions: p,
|
|
577
639
|
variant: "media"
|
|
578
640
|
})
|
|
579
641
|
]
|
|
580
642
|
});
|
|
581
|
-
}),
|
|
582
|
-
var { media: a, asset:
|
|
643
|
+
}), tr = /*#__PURE__*/ _react.forwardRef((_param, I)=>{
|
|
644
|
+
var { media: a, asset: r, headline: t, pretitle: n, pretitleAs: c, pretitleLinesMax: i, subtitle: d, subtitleLinesMax: s, title: o, titleAs: u = "h3", titleLinesMax: m, description: h, descriptionLinesMax: y, extra: v, actions: p, button: x, buttonLink: g, dataAttributes: B, "aria-label": N, onClose: j, closeButtonLabel: b } = _param, T = _object_without_properties(_param, [
|
|
583
645
|
"media",
|
|
584
646
|
"asset",
|
|
585
647
|
"headline",
|
|
586
648
|
"pretitle",
|
|
649
|
+
"pretitleAs",
|
|
587
650
|
"pretitleLinesMax",
|
|
588
651
|
"subtitle",
|
|
589
652
|
"subtitleLinesMax",
|
|
@@ -601,30 +664,38 @@ const M = ()=>{
|
|
|
601
664
|
"onClose",
|
|
602
665
|
"closeButtonLabel"
|
|
603
666
|
]);
|
|
604
|
-
const R = !!(
|
|
605
|
-
|
|
606
|
-
|
|
667
|
+
const R = !!(T.href || T.to || T.onPress), A = a && a.type === _image.default && a.props.circular, { text: V, ref: E } = O(), { text: w, ref: D } = O(), M = N || ((0, _headings.isBiggerHeading)(u, c) ? [
|
|
668
|
+
o,
|
|
669
|
+
V,
|
|
670
|
+
n,
|
|
607
671
|
d,
|
|
672
|
+
h,
|
|
673
|
+
w
|
|
674
|
+
] : [
|
|
675
|
+
n,
|
|
676
|
+
V,
|
|
608
677
|
o,
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
678
|
+
d,
|
|
679
|
+
h,
|
|
680
|
+
w
|
|
681
|
+
]).filter(Boolean).join(" ");
|
|
682
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(J, {
|
|
683
|
+
ref: I,
|
|
614
684
|
dataAttributes: _object_spread({
|
|
615
685
|
"component-name": "NakedCard",
|
|
616
686
|
testid: "NakedCard"
|
|
617
|
-
},
|
|
618
|
-
"aria-label": R ? void 0 :
|
|
687
|
+
}, B),
|
|
688
|
+
"aria-label": R ? void 0 : N,
|
|
619
689
|
className: R ? _cardcssmistica.touchableContainer : void 0,
|
|
620
690
|
children: [
|
|
621
691
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
622
692
|
maybe: !0
|
|
623
|
-
},
|
|
693
|
+
}, T), {
|
|
624
694
|
className: _cardcssmistica.touchable,
|
|
625
|
-
"aria-label": R ?
|
|
695
|
+
"aria-label": R ? M : void 0,
|
|
626
696
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
627
697
|
className: _cardcssmistica.mediaCard,
|
|
698
|
+
"aria-hidden": R,
|
|
628
699
|
children: [
|
|
629
700
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
630
701
|
style: {
|
|
@@ -633,7 +704,7 @@ const M = ()=>{
|
|
|
633
704
|
children: [
|
|
634
705
|
R && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
635
706
|
className: (0, _classnames.default)(_cardcssmistica.touchableNakedMediaOverlay, {
|
|
636
|
-
[_cardcssmistica.circularMediaOverlay]:
|
|
707
|
+
[_cardcssmistica.circularMediaOverlay]: A
|
|
637
708
|
})
|
|
638
709
|
}),
|
|
639
710
|
a
|
|
@@ -641,45 +712,46 @@ const M = ()=>{
|
|
|
641
712
|
}),
|
|
642
713
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
643
714
|
className: _cardcssmistica.nakedCardContent,
|
|
644
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
645
|
-
headline:
|
|
646
|
-
headlineRef:
|
|
647
|
-
pretitle:
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
715
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Ne, {
|
|
716
|
+
headline: t,
|
|
717
|
+
headlineRef: E,
|
|
718
|
+
pretitle: n,
|
|
719
|
+
pretitleAs: c,
|
|
720
|
+
pretitleLinesMax: i,
|
|
721
|
+
title: o,
|
|
722
|
+
titleAs: u,
|
|
723
|
+
titleLinesMax: m,
|
|
724
|
+
subtitle: d,
|
|
653
725
|
subtitleLinesMax: s,
|
|
654
|
-
description:
|
|
655
|
-
descriptionLinesMax:
|
|
656
|
-
extra:
|
|
657
|
-
extraRef:
|
|
658
|
-
button:
|
|
659
|
-
buttonLink:
|
|
726
|
+
description: h,
|
|
727
|
+
descriptionLinesMax: y,
|
|
728
|
+
extra: v,
|
|
729
|
+
extraRef: D,
|
|
730
|
+
button: x,
|
|
731
|
+
buttonLink: g
|
|
660
732
|
})
|
|
661
733
|
}),
|
|
662
|
-
|
|
734
|
+
r && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
663
735
|
className: _cardcssmistica.mediaCardAsset,
|
|
664
736
|
style: (0, _css.applyCssVars)({
|
|
665
737
|
[_imagecssmistica.vars.mediaBorderRadius]: _skincontractcssmistica.vars.borderRadii.mediaSmall
|
|
666
738
|
}),
|
|
667
739
|
"data-testid": "asset",
|
|
668
|
-
children:
|
|
740
|
+
children: r
|
|
669
741
|
})
|
|
670
742
|
]
|
|
671
743
|
})
|
|
672
744
|
})),
|
|
673
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
674
|
-
onClose:
|
|
675
|
-
closeButtonLabel:
|
|
676
|
-
actions:
|
|
745
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(de, {
|
|
746
|
+
onClose: j,
|
|
747
|
+
closeButtonLabel: b,
|
|
748
|
+
actions: p,
|
|
677
749
|
variant: "media"
|
|
678
750
|
})
|
|
679
751
|
]
|
|
680
752
|
});
|
|
681
|
-
}),
|
|
682
|
-
var { media: a, title:
|
|
753
|
+
}), dr = /*#__PURE__*/ _react.forwardRef((_param, y)=>{
|
|
754
|
+
var { media: a, title: r, titleAs: t = "h3", titleLinesMax: n, subtitle: c, subtitleLinesMax: i, description: d, descriptionLinesMax: s, extra: o, dataAttributes: u, "aria-label": m } = _param, h = _object_without_properties(_param, [
|
|
683
755
|
"media",
|
|
684
756
|
"title",
|
|
685
757
|
"titleAs",
|
|
@@ -692,36 +764,37 @@ const M = ()=>{
|
|
|
692
764
|
"dataAttributes",
|
|
693
765
|
"aria-label"
|
|
694
766
|
]);
|
|
695
|
-
const
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
767
|
+
const v = !!(h.href || h.to || h.onPress), p = a && a.type === _image.default && a.props.circular, { textPresets: x } = (0, _hooks.useTheme)(), { text: g, ref: B } = O(), N = m || [
|
|
768
|
+
r,
|
|
769
|
+
c,
|
|
770
|
+
d,
|
|
771
|
+
g
|
|
700
772
|
].filter(Boolean).join(" ");
|
|
701
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
702
|
-
ref:
|
|
773
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(J, {
|
|
774
|
+
ref: y,
|
|
703
775
|
dataAttributes: _object_spread({
|
|
704
776
|
"component-name": "SmallNakedCard",
|
|
705
777
|
testid: "SmallNakedCard"
|
|
706
|
-
},
|
|
707
|
-
"aria-label":
|
|
708
|
-
className:
|
|
778
|
+
}, u),
|
|
779
|
+
"aria-label": v ? void 0 : m,
|
|
780
|
+
className: v ? _cardcssmistica.touchableContainer : void 0,
|
|
709
781
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
710
782
|
maybe: !0
|
|
711
783
|
}, h), {
|
|
712
784
|
className: _cardcssmistica.touchable,
|
|
713
|
-
"aria-label":
|
|
785
|
+
"aria-label": v ? N : void 0,
|
|
714
786
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
715
787
|
className: _cardcssmistica.mediaCard,
|
|
788
|
+
"aria-hidden": v,
|
|
716
789
|
children: [
|
|
717
790
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
718
791
|
style: {
|
|
719
792
|
position: "relative"
|
|
720
793
|
},
|
|
721
794
|
children: [
|
|
722
|
-
|
|
795
|
+
v && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
723
796
|
className: (0, _classnames.default)(_cardcssmistica.touchableNakedMediaOverlay, {
|
|
724
|
-
[_cardcssmistica.circularMediaOverlay]:
|
|
797
|
+
[_cardcssmistica.circularMediaOverlay]: p
|
|
725
798
|
})
|
|
726
799
|
}),
|
|
727
800
|
a
|
|
@@ -734,28 +807,28 @@ const M = ()=>{
|
|
|
734
807
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
|
|
735
808
|
space: 4,
|
|
736
809
|
children: [
|
|
737
|
-
|
|
738
|
-
truncate:
|
|
739
|
-
weight:
|
|
740
|
-
as:
|
|
810
|
+
r && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _textprops.text2), {
|
|
811
|
+
truncate: n,
|
|
812
|
+
weight: x.cardTitle.weight,
|
|
813
|
+
as: t,
|
|
741
814
|
hyphens: "auto",
|
|
742
815
|
dataAttributes: {
|
|
743
816
|
testid: "title"
|
|
744
817
|
},
|
|
745
|
-
children:
|
|
818
|
+
children: r
|
|
746
819
|
})),
|
|
747
|
-
|
|
748
|
-
truncate:
|
|
820
|
+
c && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
821
|
+
truncate: i,
|
|
749
822
|
regular: !0,
|
|
750
823
|
as: "p",
|
|
751
824
|
hyphens: "auto",
|
|
752
825
|
dataAttributes: {
|
|
753
826
|
testid: "subtitle"
|
|
754
827
|
},
|
|
755
|
-
children:
|
|
828
|
+
children: c
|
|
756
829
|
}),
|
|
757
|
-
|
|
758
|
-
truncate:
|
|
830
|
+
d && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
831
|
+
truncate: s,
|
|
759
832
|
regular: !0,
|
|
760
833
|
as: "p",
|
|
761
834
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
@@ -763,15 +836,15 @@ const M = ()=>{
|
|
|
763
836
|
dataAttributes: {
|
|
764
837
|
testid: "description"
|
|
765
838
|
},
|
|
766
|
-
children:
|
|
839
|
+
children: d
|
|
767
840
|
})
|
|
768
841
|
]
|
|
769
842
|
})
|
|
770
843
|
}),
|
|
771
|
-
|
|
772
|
-
ref:
|
|
844
|
+
o && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
845
|
+
ref: B,
|
|
773
846
|
"data-testid": "slot",
|
|
774
|
-
children:
|
|
847
|
+
children: o
|
|
775
848
|
})
|
|
776
849
|
]
|
|
777
850
|
})
|
|
@@ -779,11 +852,12 @@ const M = ()=>{
|
|
|
779
852
|
})
|
|
780
853
|
}))
|
|
781
854
|
});
|
|
782
|
-
}),
|
|
783
|
-
var { asset: a, headline:
|
|
855
|
+
}), ir = /*#__PURE__*/ _react.forwardRef((_param, I)=>{
|
|
856
|
+
var { asset: a, headline: r, pretitle: t, pretitleAs: n, pretitleLinesMax: c, title: i, titleAs: d = "h3", titleLinesMax: s, subtitle: o, subtitleLinesMax: u, description: m, descriptionLinesMax: h, extra: y, actions: v, button: p, buttonLink: x, dataAttributes: g, "aria-label": B, onClose: N, closeButtonLabel: j, aspectRatio: b } = _param, T = _object_without_properties(_param, [
|
|
784
857
|
"asset",
|
|
785
858
|
"headline",
|
|
786
859
|
"pretitle",
|
|
860
|
+
"pretitleAs",
|
|
787
861
|
"pretitleLinesMax",
|
|
788
862
|
"title",
|
|
789
863
|
"titleAs",
|
|
@@ -802,22 +876,30 @@ const M = ()=>{
|
|
|
802
876
|
"closeButtonLabel",
|
|
803
877
|
"aspectRatio"
|
|
804
878
|
]);
|
|
805
|
-
const R = !!a || !!
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
879
|
+
const R = !!a || !!r, A = !!(T.href || T.to || T.onPress), { text: V, ref: E } = O(), { text: w, ref: D } = O(), M = We(v, N), C = B || ((0, _headings.isBiggerHeading)(d, n) ? [
|
|
880
|
+
i,
|
|
881
|
+
V,
|
|
882
|
+
t,
|
|
883
|
+
o,
|
|
884
|
+
m,
|
|
885
|
+
w
|
|
886
|
+
] : [
|
|
887
|
+
t,
|
|
888
|
+
V,
|
|
889
|
+
i,
|
|
890
|
+
o,
|
|
891
|
+
m,
|
|
892
|
+
w
|
|
893
|
+
]).filter(Boolean).join(" ");
|
|
894
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(J, {
|
|
813
895
|
dataAttributes: _object_spread({
|
|
814
896
|
"component-name": "DataCard",
|
|
815
897
|
testid: "DataCard"
|
|
816
|
-
},
|
|
817
|
-
ref:
|
|
818
|
-
"aria-label":
|
|
898
|
+
}, g),
|
|
899
|
+
ref: I,
|
|
900
|
+
"aria-label": A ? void 0 : B,
|
|
819
901
|
className: _cardcssmistica.touchableContainer,
|
|
820
|
-
aspectRatio:
|
|
902
|
+
aspectRatio: b,
|
|
821
903
|
children: [
|
|
822
904
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_boxed.Boxed, {
|
|
823
905
|
className: _cardcssmistica.boxed,
|
|
@@ -825,15 +907,16 @@ const M = ()=>{
|
|
|
825
907
|
minHeight: "100%",
|
|
826
908
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
827
909
|
maybe: !0
|
|
828
|
-
},
|
|
910
|
+
}, T), {
|
|
829
911
|
className: _cardcssmistica.touchable,
|
|
830
|
-
"aria-label":
|
|
912
|
+
"aria-label": A ? C : void 0,
|
|
831
913
|
children: [
|
|
832
|
-
|
|
914
|
+
A && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
833
915
|
className: _cardcssmistica.touchableCardOverlay
|
|
834
916
|
}),
|
|
835
917
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
836
918
|
className: _cardcssmistica.dataCard,
|
|
919
|
+
"aria-hidden": A,
|
|
837
920
|
children: [
|
|
838
921
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)(_inline.default, {
|
|
839
922
|
space: 0,
|
|
@@ -848,39 +931,40 @@ const M = ()=>{
|
|
|
848
931
|
"data-testid": "asset",
|
|
849
932
|
children: a
|
|
850
933
|
}),
|
|
851
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
852
|
-
headline:
|
|
853
|
-
headlineRef:
|
|
854
|
-
pretitle:
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
934
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(Ne, {
|
|
935
|
+
headline: r,
|
|
936
|
+
headlineRef: E,
|
|
937
|
+
pretitle: t,
|
|
938
|
+
pretitleAs: n,
|
|
939
|
+
pretitleLinesMax: c,
|
|
940
|
+
title: i,
|
|
941
|
+
titleAs: d,
|
|
858
942
|
titleLinesMax: s,
|
|
859
|
-
subtitle:
|
|
860
|
-
subtitleLinesMax:
|
|
861
|
-
description:
|
|
862
|
-
descriptionLinesMax:
|
|
943
|
+
subtitle: o,
|
|
944
|
+
subtitleLinesMax: u,
|
|
945
|
+
description: m,
|
|
946
|
+
descriptionLinesMax: h
|
|
863
947
|
})
|
|
864
948
|
]
|
|
865
949
|
}),
|
|
866
950
|
!R && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
867
951
|
style: (0, _css.applyCssVars)({
|
|
868
|
-
[_cardcssmistica.vars.topActionsCount]: String(
|
|
952
|
+
[_cardcssmistica.vars.topActionsCount]: String(M.length)
|
|
869
953
|
}),
|
|
870
954
|
className: _cardcssmistica.dataCardTopActionsWithoutIcon
|
|
871
955
|
})
|
|
872
956
|
]
|
|
873
957
|
}),
|
|
874
|
-
|
|
875
|
-
ref:
|
|
958
|
+
y && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
959
|
+
ref: D,
|
|
876
960
|
"data-testid": "slot",
|
|
877
|
-
children:
|
|
961
|
+
children: y
|
|
878
962
|
}),
|
|
879
|
-
(
|
|
963
|
+
(p || x) && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
880
964
|
className: _cardcssmistica.actions,
|
|
881
965
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttongroup.default, {
|
|
882
|
-
primaryButton:
|
|
883
|
-
link:
|
|
966
|
+
primaryButton: p,
|
|
967
|
+
link: x
|
|
884
968
|
})
|
|
885
969
|
})
|
|
886
970
|
]
|
|
@@ -888,16 +972,16 @@ const M = ()=>{
|
|
|
888
972
|
]
|
|
889
973
|
}))
|
|
890
974
|
}),
|
|
891
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
892
|
-
onClose:
|
|
893
|
-
closeButtonLabel:
|
|
894
|
-
actions:
|
|
975
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(de, {
|
|
976
|
+
onClose: N,
|
|
977
|
+
closeButtonLabel: j,
|
|
978
|
+
actions: v,
|
|
895
979
|
variant: "default"
|
|
896
980
|
})
|
|
897
981
|
]
|
|
898
982
|
});
|
|
899
|
-
}),
|
|
900
|
-
var { asset: a, title:
|
|
983
|
+
}), nr = /*#__PURE__*/ _react.forwardRef((_param, p)=>{
|
|
984
|
+
var { asset: a, title: r, titleAs: t = "h3", titleLinesMax: n, subtitle: c, subtitleLinesMax: i, description: d, descriptionLinesMax: s, dataAttributes: o, "aria-label": u, extra: m, isInverse: h = !1, aspectRatio: y } = _param, v = _object_without_properties(_param, [
|
|
901
985
|
"asset",
|
|
902
986
|
"title",
|
|
903
987
|
"titleAs",
|
|
@@ -912,21 +996,21 @@ const M = ()=>{
|
|
|
912
996
|
"isInverse",
|
|
913
997
|
"aspectRatio"
|
|
914
998
|
]);
|
|
915
|
-
const { textPresets:
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
999
|
+
const { textPresets: x } = (0, _hooks.useTheme)(), g = !!(v.href || v.to || v.onPress), B = h ? _cardcssmistica.touchableCardOverlayInverse : _cardcssmistica.touchableCardOverlay, { text: N, ref: j } = O(), b = u || [
|
|
1000
|
+
r,
|
|
1001
|
+
c,
|
|
1002
|
+
d,
|
|
1003
|
+
N
|
|
920
1004
|
].filter(Boolean).join(" ");
|
|
921
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
1005
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(J, {
|
|
922
1006
|
dataAttributes: _object_spread({
|
|
923
1007
|
"component-name": "SnapCard",
|
|
924
1008
|
testid: "SnapCard"
|
|
925
|
-
},
|
|
926
|
-
ref:
|
|
1009
|
+
}, o),
|
|
1010
|
+
ref: p,
|
|
927
1011
|
className: _cardcssmistica.touchableContainer,
|
|
928
|
-
aspectRatio:
|
|
929
|
-
"aria-label":
|
|
1012
|
+
aspectRatio: y,
|
|
1013
|
+
"aria-label": g ? void 0 : u,
|
|
930
1014
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_boxed.Boxed, {
|
|
931
1015
|
className: _cardcssmistica.boxed,
|
|
932
1016
|
variant: h ? "inverse" : "default",
|
|
@@ -934,15 +1018,16 @@ const M = ()=>{
|
|
|
934
1018
|
minHeight: "100%",
|
|
935
1019
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
936
1020
|
maybe: !0
|
|
937
|
-
},
|
|
1021
|
+
}, v), {
|
|
938
1022
|
className: _cardcssmistica.touchable,
|
|
939
|
-
"aria-label":
|
|
1023
|
+
"aria-label": g ? b : void 0,
|
|
940
1024
|
children: [
|
|
941
|
-
|
|
942
|
-
className:
|
|
1025
|
+
g && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1026
|
+
className: B
|
|
943
1027
|
}),
|
|
944
1028
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("section", {
|
|
945
1029
|
className: _cardcssmistica.snapCard,
|
|
1030
|
+
"aria-hidden": g,
|
|
946
1031
|
children: [
|
|
947
1032
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
948
1033
|
children: [
|
|
@@ -959,18 +1044,18 @@ const M = ()=>{
|
|
|
959
1044
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
|
|
960
1045
|
space: 4,
|
|
961
1046
|
children: [
|
|
962
|
-
|
|
963
|
-
truncate:
|
|
964
|
-
weight:
|
|
965
|
-
as:
|
|
1047
|
+
r && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _textprops.text2), {
|
|
1048
|
+
truncate: n,
|
|
1049
|
+
weight: x.cardTitle.weight,
|
|
1050
|
+
as: t,
|
|
966
1051
|
hyphens: "auto",
|
|
967
1052
|
dataAttributes: {
|
|
968
1053
|
testid: "title"
|
|
969
1054
|
},
|
|
970
|
-
children:
|
|
1055
|
+
children: r
|
|
971
1056
|
})),
|
|
972
|
-
|
|
973
|
-
truncate:
|
|
1057
|
+
c && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
1058
|
+
truncate: i,
|
|
974
1059
|
regular: !0,
|
|
975
1060
|
color: _skincontractcssmistica.vars.colors.textPrimary,
|
|
976
1061
|
as: "p",
|
|
@@ -978,10 +1063,10 @@ const M = ()=>{
|
|
|
978
1063
|
dataAttributes: {
|
|
979
1064
|
testid: "subtitle"
|
|
980
1065
|
},
|
|
981
|
-
children:
|
|
1066
|
+
children: c
|
|
982
1067
|
}),
|
|
983
|
-
|
|
984
|
-
truncate:
|
|
1068
|
+
d && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
1069
|
+
truncate: s,
|
|
985
1070
|
regular: !0,
|
|
986
1071
|
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
987
1072
|
as: "p",
|
|
@@ -989,16 +1074,16 @@ const M = ()=>{
|
|
|
989
1074
|
dataAttributes: {
|
|
990
1075
|
testid: "description"
|
|
991
1076
|
},
|
|
992
|
-
children:
|
|
1077
|
+
children: d
|
|
993
1078
|
})
|
|
994
1079
|
]
|
|
995
1080
|
})
|
|
996
1081
|
]
|
|
997
1082
|
}),
|
|
998
|
-
|
|
999
|
-
ref:
|
|
1083
|
+
m && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1084
|
+
ref: j,
|
|
1000
1085
|
"data-testid": "slot",
|
|
1001
|
-
children:
|
|
1086
|
+
children: m
|
|
1002
1087
|
})
|
|
1003
1088
|
]
|
|
1004
1089
|
})
|
|
@@ -1006,61 +1091,92 @@ const M = ()=>{
|
|
|
1006
1091
|
}))
|
|
1007
1092
|
})
|
|
1008
1093
|
});
|
|
1009
|
-
}),
|
|
1010
|
-
let { title: a, headline: t, pretitle:
|
|
1094
|
+
}), Xe = (param)=>{
|
|
1095
|
+
let { title: a, titleAs: r = "h3", headline: t, pretitle: n, pretitleAs: c, subtitle: i, description: d, extra: s, headlineRef: o, extraRef: u } = param;
|
|
1011
1096
|
return /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
1012
1097
|
className: _cardcssmistica.flexColumn,
|
|
1013
1098
|
children: [
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1099
|
+
(0, _headings.isBiggerHeading)(r, c) ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
1100
|
+
children: [
|
|
1101
|
+
a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1102
|
+
style: {
|
|
1103
|
+
paddingBottom: i || d ? 4 : 0
|
|
1104
|
+
},
|
|
1105
|
+
"data-testid": "title",
|
|
1106
|
+
children: a
|
|
1107
|
+
}),
|
|
1108
|
+
t && // assuming that the headline will always be followed by one of: pretitle, title, subtitle, description
|
|
1109
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1110
|
+
ref: o,
|
|
1111
|
+
style: {
|
|
1112
|
+
order: -2,
|
|
1113
|
+
paddingBottom: 16
|
|
1114
|
+
},
|
|
1115
|
+
"data-testid": "headline",
|
|
1116
|
+
children: t
|
|
1117
|
+
}),
|
|
1118
|
+
n && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1119
|
+
style: {
|
|
1120
|
+
order: -1,
|
|
1121
|
+
paddingBottom: 4
|
|
1122
|
+
},
|
|
1123
|
+
"data-testid": "pretitle",
|
|
1124
|
+
children: n
|
|
1125
|
+
})
|
|
1126
|
+
]
|
|
1127
|
+
}) : /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
1128
|
+
children: [
|
|
1129
|
+
n && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1130
|
+
style: {
|
|
1131
|
+
paddingBottom: 4
|
|
1132
|
+
},
|
|
1133
|
+
"data-testid": "pretitle",
|
|
1134
|
+
children: n
|
|
1135
|
+
}),
|
|
1136
|
+
t && // assuming that the headline will always be followed by one of: pretitle, title, subtitle, description
|
|
1137
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1138
|
+
ref: o,
|
|
1139
|
+
style: {
|
|
1140
|
+
order: -1,
|
|
1141
|
+
paddingBottom: 16
|
|
1142
|
+
},
|
|
1143
|
+
"data-testid": "headline",
|
|
1144
|
+
children: t
|
|
1145
|
+
}),
|
|
1146
|
+
a && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1147
|
+
style: {
|
|
1148
|
+
paddingBottom: i || d ? 4 : 0
|
|
1149
|
+
},
|
|
1150
|
+
"data-testid": "title",
|
|
1151
|
+
children: a
|
|
1152
|
+
})
|
|
1153
|
+
]
|
|
1038
1154
|
}),
|
|
1039
|
-
|
|
1155
|
+
i && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1040
1156
|
style: {
|
|
1041
|
-
paddingBottom:
|
|
1157
|
+
paddingBottom: i ? 4 : 0
|
|
1042
1158
|
},
|
|
1043
1159
|
"data-testid": "subtitle",
|
|
1044
|
-
children:
|
|
1160
|
+
children: i
|
|
1045
1161
|
}),
|
|
1046
|
-
|
|
1162
|
+
d && // this is tricky, the padding between a headline and a description is 16px
|
|
1047
1163
|
// but the padding between a title|pretitle|subtitle and a description is 8px (4px + 4px)
|
|
1048
1164
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1049
1165
|
style: {
|
|
1050
|
-
paddingTop:
|
|
1166
|
+
paddingTop: n || a || i ? 4 : 0
|
|
1051
1167
|
},
|
|
1052
1168
|
"data-testid": "description",
|
|
1053
|
-
children:
|
|
1169
|
+
children: d
|
|
1054
1170
|
}),
|
|
1055
|
-
|
|
1056
|
-
ref:
|
|
1171
|
+
s && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1172
|
+
ref: u,
|
|
1057
1173
|
"data-testid": "slot",
|
|
1058
|
-
children:
|
|
1174
|
+
children: s
|
|
1059
1175
|
})
|
|
1060
1176
|
]
|
|
1061
1177
|
});
|
|
1062
|
-
},
|
|
1063
|
-
var { isInverse: a, backgroundImage:
|
|
1178
|
+
}, Le = /*#__PURE__*/ _react.forwardRef((_param, D)=>{
|
|
1179
|
+
var { isInverse: a, backgroundImage: r, backgroundVideo: t, backgroundVideoRef: n, poster: c, asset: i, headline: d, pretitle: s, pretitleAs: o, pretitleLinesMax: u, title: m, titleAs: h = "h3", titleLinesMax: y, description: v, descriptionLinesMax: p, extra: x, button: g, secondaryButton: B, onClose: N, closeButtonLabel: j, actions: b, buttonLink: T, dataAttributes: I, width: R, height: A, aspectRatio: V, "aria-label": E } = _param, w = _object_without_properties(_param, [
|
|
1064
1180
|
"isInverse",
|
|
1065
1181
|
"backgroundImage",
|
|
1066
1182
|
"backgroundVideo",
|
|
@@ -1069,6 +1185,7 @@ const M = ()=>{
|
|
|
1069
1185
|
"asset",
|
|
1070
1186
|
"headline",
|
|
1071
1187
|
"pretitle",
|
|
1188
|
+
"pretitleAs",
|
|
1072
1189
|
"pretitleLinesMax",
|
|
1073
1190
|
"title",
|
|
1074
1191
|
"titleAs",
|
|
@@ -1088,24 +1205,30 @@ const M = ()=>{
|
|
|
1088
1205
|
"aspectRatio",
|
|
1089
1206
|
"aria-label"
|
|
1090
1207
|
]);
|
|
1091
|
-
const
|
|
1092
|
-
C && (
|
|
1093
|
-
|
|
1208
|
+
const M = r !== void 0, C = t !== void 0, k = Ge(r), { video: me, videoAction: ie } = Fe(t, c, n), { text: P, ref: ne } = O(), { text: oe, ref: se } = O();
|
|
1209
|
+
C && (b = ie ? [
|
|
1210
|
+
ie
|
|
1094
1211
|
] : []);
|
|
1095
|
-
const
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
]
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1212
|
+
const le = (0, _themevariantcontext.useIsInverseVariant)(), H = M || C, W = H ? "0 0 16px rgba(0,0,0,0.4)" : void 0, K = (b == null ? void 0 : b.length) || N, F = !!(w.href || w.to || w.onPress), ue = M || C ? _cardcssmistica.touchableCardOverlayMedia : a ? _cardcssmistica.touchableCardOverlayInverse : _cardcssmistica.touchableCardOverlay, Q = E || ((0, _headings.isBiggerHeading)(h, o) ? [
|
|
1213
|
+
m,
|
|
1214
|
+
P,
|
|
1215
|
+
s,
|
|
1216
|
+
v,
|
|
1217
|
+
oe
|
|
1218
|
+
] : [
|
|
1219
|
+
s,
|
|
1220
|
+
P,
|
|
1221
|
+
m,
|
|
1222
|
+
v,
|
|
1223
|
+
oe
|
|
1224
|
+
]).filter(Boolean).join(" ");
|
|
1225
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(J, {
|
|
1226
|
+
dataAttributes: I,
|
|
1227
|
+
ref: D,
|
|
1105
1228
|
width: R,
|
|
1106
|
-
height:
|
|
1107
|
-
aspectRatio:
|
|
1108
|
-
"aria-label":
|
|
1229
|
+
height: A,
|
|
1230
|
+
aspectRatio: V,
|
|
1231
|
+
"aria-label": F ? void 0 : E,
|
|
1109
1232
|
className: _cardcssmistica.touchableContainer,
|
|
1110
1233
|
children: [
|
|
1111
1234
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_boxed.InternalBoxed, {
|
|
@@ -1113,89 +1236,92 @@ const M = ()=>{
|
|
|
1113
1236
|
className: _cardcssmistica.boxed,
|
|
1114
1237
|
width: "100%",
|
|
1115
1238
|
minHeight: "100%",
|
|
1116
|
-
background:
|
|
1117
|
-
variant:
|
|
1239
|
+
background: M || C ? le ? _skincontractcssmistica.vars.colors.backgroundContainerBrandOverInverse : _skincontractcssmistica.vars.colors.backgroundContainer : void 0,
|
|
1240
|
+
variant: M || C ? "media" : a ? "inverse" : "default",
|
|
1118
1241
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
1119
1242
|
maybe: !0
|
|
1120
|
-
},
|
|
1243
|
+
}, w), {
|
|
1121
1244
|
className: _cardcssmistica.touchable,
|
|
1122
|
-
"aria-label":
|
|
1245
|
+
"aria-label": F ? Q : void 0,
|
|
1123
1246
|
children: [
|
|
1124
|
-
|
|
1125
|
-
className:
|
|
1247
|
+
F && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1248
|
+
className: ue
|
|
1126
1249
|
}),
|
|
1127
1250
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
1128
1251
|
className: _cardcssmistica.displayCardContainer,
|
|
1252
|
+
"aria-hidden": F,
|
|
1129
1253
|
children: [
|
|
1130
|
-
(
|
|
1131
|
-
variant:
|
|
1254
|
+
(M || C) && /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
|
|
1255
|
+
variant: le ? "inverse" : "default",
|
|
1132
1256
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1133
1257
|
className: _cardcssmistica.displayCardBackground,
|
|
1134
|
-
children: C ?
|
|
1258
|
+
children: C ? me : k
|
|
1135
1259
|
})
|
|
1136
1260
|
}),
|
|
1137
1261
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
1138
1262
|
className: _cardcssmistica.displayCardContent,
|
|
1139
1263
|
style: {
|
|
1140
|
-
paddingTop:
|
|
1264
|
+
paddingTop: H && !i && !K && !C ? 0 : 24
|
|
1141
1265
|
},
|
|
1142
1266
|
children: [
|
|
1143
|
-
|
|
1267
|
+
i ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1144
1268
|
style: (0, _css.applyCssVars)({
|
|
1145
1269
|
[_imagecssmistica.vars.mediaBorderRadius]: _skincontractcssmistica.vars.borderRadii.mediaSmall
|
|
1146
1270
|
}),
|
|
1147
1271
|
"data-testid": "asset",
|
|
1148
1272
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
1149
|
-
paddingBottom:
|
|
1273
|
+
paddingBottom: H ? 0 : 40,
|
|
1150
1274
|
paddingX: 24,
|
|
1151
|
-
children:
|
|
1275
|
+
children: i
|
|
1152
1276
|
})
|
|
1153
1277
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
1154
|
-
paddingBottom:
|
|
1278
|
+
paddingBottom: K || C ? H ? 24 : 64 : 0
|
|
1155
1279
|
}),
|
|
1156
1280
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1157
1281
|
className: (0, _classnames.default)(_cardcssmistica.displayCardContentWrapper, {
|
|
1158
|
-
[_cardcssmistica.displayCardGradient]:
|
|
1282
|
+
[_cardcssmistica.displayCardGradient]: H
|
|
1159
1283
|
}),
|
|
1160
1284
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
|
|
1161
1285
|
space: 24,
|
|
1162
1286
|
children: [
|
|
1163
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
1164
|
-
title:
|
|
1287
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(Xe, {
|
|
1288
|
+
title: m ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text6, {
|
|
1165
1289
|
forceMobileSizes: !0,
|
|
1166
|
-
truncate:
|
|
1167
|
-
as:
|
|
1168
|
-
textShadow:
|
|
1290
|
+
truncate: y,
|
|
1291
|
+
as: h,
|
|
1292
|
+
textShadow: W,
|
|
1169
1293
|
hyphens: "auto",
|
|
1170
|
-
children:
|
|
1294
|
+
children: m
|
|
1171
1295
|
}) : void 0,
|
|
1172
|
-
|
|
1173
|
-
|
|
1296
|
+
titleAs: h,
|
|
1297
|
+
headline: d,
|
|
1298
|
+
pretitle: s ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
1174
1299
|
forceMobileSizes: !0,
|
|
1175
|
-
truncate:
|
|
1176
|
-
as:
|
|
1300
|
+
truncate: u,
|
|
1301
|
+
as: o,
|
|
1177
1302
|
regular: !0,
|
|
1178
|
-
textShadow:
|
|
1179
|
-
children:
|
|
1303
|
+
textShadow: W,
|
|
1304
|
+
children: s
|
|
1180
1305
|
}) : void 0,
|
|
1181
|
-
|
|
1306
|
+
pretitleAs: o,
|
|
1307
|
+
description: v ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
|
|
1182
1308
|
forceMobileSizes: !0,
|
|
1183
|
-
truncate:
|
|
1309
|
+
truncate: p,
|
|
1184
1310
|
as: "p",
|
|
1185
1311
|
regular: !0,
|
|
1186
|
-
color:
|
|
1187
|
-
textShadow:
|
|
1312
|
+
color: H ? _skincontractcssmistica.vars.colors.textPrimary : _skincontractcssmistica.vars.colors.textSecondary,
|
|
1313
|
+
textShadow: W,
|
|
1188
1314
|
hyphens: "auto",
|
|
1189
|
-
children:
|
|
1315
|
+
children: v
|
|
1190
1316
|
}) : void 0,
|
|
1191
|
-
extra:
|
|
1192
|
-
headlineRef:
|
|
1193
|
-
extraRef:
|
|
1317
|
+
extra: x,
|
|
1318
|
+
headlineRef: ne,
|
|
1319
|
+
extraRef: se
|
|
1194
1320
|
}),
|
|
1195
|
-
(
|
|
1196
|
-
primaryButton:
|
|
1197
|
-
secondaryButton:
|
|
1198
|
-
link:
|
|
1321
|
+
(g || B || T) && /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttongroup.default, {
|
|
1322
|
+
primaryButton: g,
|
|
1323
|
+
secondaryButton: B,
|
|
1324
|
+
link: T
|
|
1199
1325
|
})
|
|
1200
1326
|
]
|
|
1201
1327
|
})
|
|
@@ -1207,39 +1333,39 @@ const M = ()=>{
|
|
|
1207
1333
|
]
|
|
1208
1334
|
}))
|
|
1209
1335
|
}),
|
|
1210
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
1211
|
-
onClose:
|
|
1212
|
-
closeButtonLabel:
|
|
1213
|
-
actions:
|
|
1214
|
-
variant:
|
|
1336
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(de, {
|
|
1337
|
+
onClose: N,
|
|
1338
|
+
closeButtonLabel: j,
|
|
1339
|
+
actions: b,
|
|
1340
|
+
variant: M || C ? "media" : a ? "inverse" : "default"
|
|
1215
1341
|
})
|
|
1216
1342
|
]
|
|
1217
1343
|
});
|
|
1218
|
-
}),
|
|
1219
|
-
var { dataAttributes: a } = _param,
|
|
1344
|
+
}), or = /*#__PURE__*/ _react.forwardRef((_param, t)=>{
|
|
1345
|
+
var { dataAttributes: a } = _param, r = _object_without_properties(_param, [
|
|
1220
1346
|
"dataAttributes"
|
|
1221
1347
|
]);
|
|
1222
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
1223
|
-
ref:
|
|
1348
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(Le, _object_spread_props(_object_spread({}, r), {
|
|
1349
|
+
ref: t,
|
|
1224
1350
|
isInverse: !0,
|
|
1225
1351
|
dataAttributes: _object_spread({
|
|
1226
1352
|
"component-name": "DisplayMediaCard",
|
|
1227
1353
|
testid: "DisplayMediaCard"
|
|
1228
1354
|
}, a)
|
|
1229
1355
|
}));
|
|
1230
|
-
}),
|
|
1231
|
-
var { dataAttributes: a } = _param,
|
|
1356
|
+
}), sr = /*#__PURE__*/ _react.forwardRef((_param, t)=>{
|
|
1357
|
+
var { dataAttributes: a } = _param, r = _object_without_properties(_param, [
|
|
1232
1358
|
"dataAttributes"
|
|
1233
1359
|
]);
|
|
1234
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
1235
|
-
ref:
|
|
1360
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(Le, _object_spread_props(_object_spread({}, r), {
|
|
1361
|
+
ref: t,
|
|
1236
1362
|
dataAttributes: _object_spread({
|
|
1237
1363
|
"component-name": "DisplayDataCard",
|
|
1238
1364
|
testid: "DisplayDataCard"
|
|
1239
1365
|
}, a)
|
|
1240
1366
|
}));
|
|
1241
|
-
}),
|
|
1242
|
-
var { dataAttributes: a, backgroundImage:
|
|
1367
|
+
}), lr = /*#__PURE__*/ _react.forwardRef((_param, M)=>{
|
|
1368
|
+
var { dataAttributes: a, backgroundImage: r, backgroundVideo: t, poster: n, backgroundVideoRef: c, width: i, height: d, aspectRatio: s = "7:10", "aria-label": o, actions: u, onClose: m, closeButtonLabel: h, asset: y, headline: v, pretitle: p, pretitleAs: x, pretitleLinesMax: g, title: B, titleAs: N = "h3", titleLinesMax: j, subtitle: b, subtitleLinesMax: T, description: I, descriptionLinesMax: R, extra: A, variant: V, isInverse: E, backgroundColor: w } = _param, D = _object_without_properties(_param, [
|
|
1243
1369
|
"dataAttributes",
|
|
1244
1370
|
"backgroundImage",
|
|
1245
1371
|
"backgroundVideo",
|
|
@@ -1255,6 +1381,7 @@ const M = ()=>{
|
|
|
1255
1381
|
"asset",
|
|
1256
1382
|
"headline",
|
|
1257
1383
|
"pretitle",
|
|
1384
|
+
"pretitleAs",
|
|
1258
1385
|
"pretitleLinesMax",
|
|
1259
1386
|
"title",
|
|
1260
1387
|
"titleAs",
|
|
@@ -1268,120 +1395,129 @@ const M = ()=>{
|
|
|
1268
1395
|
"isInverse",
|
|
1269
1396
|
"backgroundColor"
|
|
1270
1397
|
]);
|
|
1271
|
-
const C =
|
|
1272
|
-
|
|
1273
|
-
|
|
1398
|
+
const C = r !== void 0, k = t !== void 0, me = Ge(r), { video: ie, videoAction: P } = Fe(t, n, c), { text: ne, ref: oe } = O(), { text: se, ref: le } = O();
|
|
1399
|
+
k && (u = P ? [
|
|
1400
|
+
P
|
|
1274
1401
|
] : []);
|
|
1275
|
-
const
|
|
1402
|
+
const H = (0, _themevariantcontext.useIsInverseVariant)(), W = C || k, K = W ? "0 0 16px rgba(0,0,0,0.4)" : void 0, F = (u == null ? void 0 : u.length) || m, { textPresets: ue } = (0, _hooks.useTheme)(), Q = !!(D.href || D.to || D.onPress), ee = V || (E ? "inverse" : "default"), _e = ()=>ee === "media" || C || k ? H ? _skincontractcssmistica.vars.colors.backgroundContainerBrandOverInverse : _skincontractcssmistica.vars.colors.backgroundContainer : w || ({
|
|
1276
1403
|
default: _skincontractcssmistica.vars.colors.backgroundContainer,
|
|
1277
|
-
inverse:
|
|
1404
|
+
inverse: H ? _skincontractcssmistica.vars.colors.backgroundContainerBrandOverInverse : _skincontractcssmistica.vars.colors.backgroundBrand,
|
|
1278
1405
|
alternative: _skincontractcssmistica.vars.colors.backgroundAlternative
|
|
1279
|
-
})[
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
]
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1406
|
+
})[ee], $e = C || k ? _cardcssmistica.touchableCardOverlayMedia : ee === "inverse" ? _cardcssmistica.touchableCardOverlayInverse : _cardcssmistica.touchableCardOverlay, qe = o || ((0, _headings.isBiggerHeading)(N, x) ? [
|
|
1407
|
+
B,
|
|
1408
|
+
ne,
|
|
1409
|
+
p,
|
|
1410
|
+
b,
|
|
1411
|
+
I,
|
|
1412
|
+
se
|
|
1413
|
+
] : [
|
|
1414
|
+
p,
|
|
1415
|
+
ne,
|
|
1416
|
+
B,
|
|
1417
|
+
b,
|
|
1418
|
+
I,
|
|
1419
|
+
se
|
|
1420
|
+
]).filter(Boolean).join(" ");
|
|
1421
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsxs)(J, {
|
|
1422
|
+
width: i,
|
|
1423
|
+
height: d,
|
|
1290
1424
|
dataAttributes: _object_spread({
|
|
1291
1425
|
"component-name": "PosterCard",
|
|
1292
1426
|
testid: "PosterCard"
|
|
1293
1427
|
}, a),
|
|
1294
|
-
ref:
|
|
1295
|
-
aspectRatio:
|
|
1428
|
+
ref: M,
|
|
1429
|
+
aspectRatio: s,
|
|
1296
1430
|
className: _cardcssmistica.touchableContainer,
|
|
1297
|
-
"aria-label":
|
|
1431
|
+
"aria-label": Q ? void 0 : o,
|
|
1298
1432
|
children: [
|
|
1299
1433
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_boxed.InternalBoxed, {
|
|
1300
1434
|
borderRadius: _skincontractcssmistica.vars.borderRadii.legacyDisplay,
|
|
1301
1435
|
className: _cardcssmistica.boxed,
|
|
1302
1436
|
width: "100%",
|
|
1303
1437
|
minHeight: "100%",
|
|
1304
|
-
background:
|
|
1305
|
-
variant: C ||
|
|
1438
|
+
background: _e(),
|
|
1439
|
+
variant: C || k ? "media" : C || k || ee === "inverse" ? "inverse" : "default",
|
|
1306
1440
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_touchable.BaseTouchable, _object_spread_props(_object_spread({
|
|
1307
1441
|
maybe: !0
|
|
1308
|
-
},
|
|
1442
|
+
}, D), {
|
|
1309
1443
|
className: _cardcssmistica.touchable,
|
|
1310
|
-
"aria-label":
|
|
1444
|
+
"aria-label": Q ? qe : void 0,
|
|
1311
1445
|
children: [
|
|
1312
|
-
|
|
1313
|
-
className:
|
|
1446
|
+
Q && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1447
|
+
className: $e
|
|
1314
1448
|
}),
|
|
1315
1449
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
1316
1450
|
className: _cardcssmistica.displayCardContainer,
|
|
1317
|
-
"aria-hidden":
|
|
1451
|
+
"aria-hidden": Q,
|
|
1318
1452
|
children: [
|
|
1319
|
-
(C ||
|
|
1320
|
-
variant:
|
|
1453
|
+
(C || k) && /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
|
|
1454
|
+
variant: H ? "inverse" : "default",
|
|
1321
1455
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1322
1456
|
className: _cardcssmistica.displayCardBackground,
|
|
1323
|
-
children:
|
|
1457
|
+
children: k ? ie : me
|
|
1324
1458
|
})
|
|
1325
1459
|
}),
|
|
1326
1460
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
1327
|
-
className: (0, _classnames.default)(_cardcssmistica.displayCardContent,
|
|
1461
|
+
className: (0, _classnames.default)(_cardcssmistica.displayCardContent, W && !y && !F && !k ? void 0 : y ? _cardcssmistica.displayCardContentWithAsset : _cardcssmistica.displayCardContentWithTopContent),
|
|
1328
1462
|
children: [
|
|
1329
|
-
|
|
1463
|
+
y ? /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1330
1464
|
style: (0, _css.applyCssVars)({
|
|
1331
1465
|
[_imagecssmistica.vars.mediaBorderRadius]: _skincontractcssmistica.vars.borderRadii.mediaSmall
|
|
1332
1466
|
}),
|
|
1333
1467
|
"data-testid": "asset",
|
|
1334
1468
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
1335
|
-
paddingBottom:
|
|
1469
|
+
paddingBottom: W ? 0 : 40,
|
|
1336
1470
|
paddingX: {
|
|
1337
1471
|
mobile: 16,
|
|
1338
1472
|
desktop: 24
|
|
1339
1473
|
},
|
|
1340
|
-
children:
|
|
1474
|
+
children: y
|
|
1341
1475
|
})
|
|
1342
1476
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
1343
|
-
paddingBottom:
|
|
1477
|
+
paddingBottom: F || k ? W ? 24 : 64 : 0
|
|
1344
1478
|
}),
|
|
1345
1479
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
1346
1480
|
className: (0, _classnames.default)(_cardcssmistica.posterCardContentWrapper, {
|
|
1347
|
-
[_cardcssmistica.displayCardGradient]:
|
|
1481
|
+
[_cardcssmistica.displayCardGradient]: W
|
|
1348
1482
|
}),
|
|
1349
|
-
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
1350
|
-
title:
|
|
1351
|
-
truncate:
|
|
1352
|
-
weight:
|
|
1353
|
-
as:
|
|
1354
|
-
children:
|
|
1483
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(Xe, {
|
|
1484
|
+
title: B ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text, _object_spread_props(_object_spread({}, _textprops.text4), {
|
|
1485
|
+
truncate: j,
|
|
1486
|
+
weight: ue.cardTitle.weight,
|
|
1487
|
+
as: N,
|
|
1488
|
+
children: B
|
|
1355
1489
|
})) : void 0,
|
|
1356
|
-
|
|
1357
|
-
|
|
1490
|
+
titleAs: N,
|
|
1491
|
+
headline: v,
|
|
1492
|
+
pretitle: p ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
1358
1493
|
forceMobileSizes: !0,
|
|
1359
|
-
truncate:
|
|
1360
|
-
as:
|
|
1494
|
+
truncate: g,
|
|
1495
|
+
as: x,
|
|
1361
1496
|
regular: !0,
|
|
1362
|
-
textShadow:
|
|
1363
|
-
children:
|
|
1497
|
+
textShadow: K,
|
|
1498
|
+
children: p
|
|
1364
1499
|
}) : void 0,
|
|
1365
|
-
|
|
1500
|
+
pretitleAs: x,
|
|
1501
|
+
subtitle: b ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
1366
1502
|
forceMobileSizes: !0,
|
|
1367
|
-
truncate:
|
|
1503
|
+
truncate: T,
|
|
1368
1504
|
as: "div",
|
|
1369
1505
|
regular: !0,
|
|
1370
|
-
textShadow:
|
|
1371
|
-
children:
|
|
1506
|
+
textShadow: K,
|
|
1507
|
+
children: b
|
|
1372
1508
|
}) : void 0,
|
|
1373
|
-
description:
|
|
1509
|
+
description: I ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
1374
1510
|
forceMobileSizes: !0,
|
|
1375
1511
|
truncate: R,
|
|
1376
1512
|
as: "p",
|
|
1377
1513
|
regular: !0,
|
|
1378
|
-
textShadow:
|
|
1379
|
-
color:
|
|
1380
|
-
children:
|
|
1514
|
+
textShadow: K,
|
|
1515
|
+
color: W ? _skincontractcssmistica.vars.colors.textPrimary : _skincontractcssmistica.vars.colors.textSecondary,
|
|
1516
|
+
children: I
|
|
1381
1517
|
}) : void 0,
|
|
1382
|
-
headlineRef:
|
|
1383
|
-
extra:
|
|
1384
|
-
extraRef:
|
|
1518
|
+
headlineRef: oe,
|
|
1519
|
+
extra: A,
|
|
1520
|
+
extraRef: le
|
|
1385
1521
|
})
|
|
1386
1522
|
})
|
|
1387
1523
|
]
|
|
@@ -1391,11 +1527,11 @@ const M = ()=>{
|
|
|
1391
1527
|
]
|
|
1392
1528
|
}))
|
|
1393
1529
|
}),
|
|
1394
|
-
/* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
1395
|
-
onClose:
|
|
1530
|
+
/* @__PURE__ */ (0, _jsxruntime.jsx)(de, {
|
|
1531
|
+
onClose: m,
|
|
1396
1532
|
closeButtonLabel: h,
|
|
1397
|
-
actions:
|
|
1398
|
-
variant: C ||
|
|
1533
|
+
actions: u,
|
|
1534
|
+
variant: C || k ? "media" : ee === "inverse" ? "inverse" : "default"
|
|
1399
1535
|
})
|
|
1400
1536
|
]
|
|
1401
1537
|
});
|