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