@telefonica/mistica 14.12.0 → 14.14.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.
Files changed (124) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/boxed.css-mistica.js +4 -4
  3. package/dist/boxed.css.d.ts +1 -1
  4. package/dist/boxed.js +12 -14
  5. package/dist/card.css-mistica.js +27 -12
  6. package/dist/card.css.d.ts +7 -0
  7. package/dist/card.d.ts +36 -34
  8. package/dist/card.js +611 -469
  9. package/dist/fixed-footer-layout.js +8 -7
  10. package/dist/generated/mistica-icons/icon-alert-filled.js +15 -5
  11. package/dist/generated/mistica-icons/icon-alert-light.js +24 -8
  12. package/dist/generated/mistica-icons/icon-alert-regular.js +30 -14
  13. package/dist/generated/mistica-icons/icon-bell-filled.js +19 -9
  14. package/dist/generated/mistica-icons/icon-bell-light.js +16 -6
  15. package/dist/generated/mistica-icons/icon-bell-regular.js +19 -9
  16. package/dist/generated/mistica-icons/icon-dollar-symbol-circle-light.js +28 -11
  17. package/dist/generated/mistica-icons/icon-dollar-symbol-circle-regular.js +20 -9
  18. package/dist/generated/mistica-icons/icon-edit-pencil-light.js +21 -10
  19. package/dist/generated/mistica-icons/icon-edit-pencil-regular.js +22 -12
  20. package/dist/generated/mistica-icons/icon-gift-filled.js +19 -9
  21. package/dist/generated/mistica-icons/icon-gift-light.js +20 -10
  22. package/dist/generated/mistica-icons/icon-gift-regular.js +19 -9
  23. package/dist/generated/mistica-icons/icon-heart-filled.js +16 -6
  24. package/dist/generated/mistica-icons/icon-heart-light.js +18 -8
  25. package/dist/generated/mistica-icons/icon-heart-regular.js +24 -14
  26. package/dist/generated/mistica-icons/icon-home-filled.js +23 -13
  27. package/dist/generated/mistica-icons/icon-home-light.js +24 -14
  28. package/dist/generated/mistica-icons/icon-home-regular.js +21 -11
  29. package/dist/generated/mistica-icons/icon-home-wifi-filled.js +24 -7
  30. package/dist/generated/mistica-icons/icon-home-wifi-light.js +25 -8
  31. package/dist/generated/mistica-icons/icon-home-wifi-regular.js +24 -7
  32. package/dist/generated/mistica-icons/icon-pause-regular.js +10 -12
  33. package/dist/generated/mistica-icons/icon-play-regular.js +14 -16
  34. package/dist/generated/mistica-icons/icon-reload-light.js +22 -12
  35. package/dist/generated/mistica-icons/icon-reload-regular.js +24 -14
  36. package/dist/generated/mistica-icons/icon-share-filled.js +20 -10
  37. package/dist/generated/mistica-icons/icon-share-light.js +21 -11
  38. package/dist/generated/mistica-icons/icon-share-regular.js +21 -11
  39. package/dist/generated/mistica-icons/icon-shopping-bag-filled.d.ts +4 -0
  40. package/dist/generated/mistica-icons/icon-shopping-bag-filled.js +110 -0
  41. package/dist/generated/mistica-icons/icon-shopping-bag-light.d.ts +4 -0
  42. package/dist/generated/mistica-icons/icon-shopping-bag-light.js +110 -0
  43. package/dist/generated/mistica-icons/icon-shopping-bag-regular.d.ts +4 -0
  44. package/dist/generated/mistica-icons/icon-shopping-bag-regular.js +110 -0
  45. package/dist/generated/mistica-icons/icon-tickets-filled.js +17 -7
  46. package/dist/generated/mistica-icons/icon-tickets-light.js +26 -10
  47. package/dist/generated/mistica-icons/icon-tickets-regular.js +35 -19
  48. package/dist/hooks.js +57 -56
  49. package/dist/index.d.ts +3 -0
  50. package/dist/index.js +14 -1
  51. package/dist/package-version.js +1 -1
  52. package/dist/skins/blau.js +14 -2
  53. package/dist/skins/defaults.js +12 -0
  54. package/dist/skins/movistar-legacy.js +15 -3
  55. package/dist/skins/movistar.js +12 -0
  56. package/dist/skins/o2.js +13 -1
  57. package/dist/skins/telefonica.js +12 -0
  58. package/dist/skins/types/index.d.ts +1 -1
  59. package/dist/skins/vivo-new.js +12 -0
  60. package/dist/skins/vivo.js +13 -1
  61. package/dist/theme-context-provider.js +34 -30
  62. package/dist/tooltip.js +35 -34
  63. package/dist/utils/dom.js +10 -10
  64. package/dist/utils/environment.d.ts +1 -0
  65. package/dist/utils/environment.js +12 -4
  66. package/dist-es/boxed.css-mistica.js +3 -3
  67. package/dist-es/boxed.js +16 -18
  68. package/dist-es/card.css-mistica.js +2 -2
  69. package/dist-es/card.js +652 -511
  70. package/dist-es/fixed-footer-layout.js +18 -17
  71. package/dist-es/generated/mistica-icons/icon-alert-filled.js +18 -8
  72. package/dist-es/generated/mistica-icons/icon-alert-light.js +30 -14
  73. package/dist-es/generated/mistica-icons/icon-alert-regular.js +36 -20
  74. package/dist-es/generated/mistica-icons/icon-bell-filled.js +26 -16
  75. package/dist-es/generated/mistica-icons/icon-bell-light.js +20 -10
  76. package/dist-es/generated/mistica-icons/icon-bell-regular.js +20 -10
  77. package/dist-es/generated/mistica-icons/icon-dollar-symbol-circle-light.js +33 -16
  78. package/dist-es/generated/mistica-icons/icon-dollar-symbol-circle-regular.js +25 -14
  79. package/dist-es/generated/mistica-icons/icon-edit-pencil-light.js +25 -14
  80. package/dist-es/generated/mistica-icons/icon-edit-pencil-regular.js +30 -20
  81. package/dist-es/generated/mistica-icons/icon-gift-filled.js +22 -12
  82. package/dist-es/generated/mistica-icons/icon-gift-light.js +23 -13
  83. package/dist-es/generated/mistica-icons/icon-gift-regular.js +22 -12
  84. package/dist-es/generated/mistica-icons/icon-heart-filled.js +18 -8
  85. package/dist-es/generated/mistica-icons/icon-heart-light.js +24 -14
  86. package/dist-es/generated/mistica-icons/icon-heart-regular.js +25 -15
  87. package/dist-es/generated/mistica-icons/icon-home-filled.js +30 -20
  88. package/dist-es/generated/mistica-icons/icon-home-light.js +27 -17
  89. package/dist-es/generated/mistica-icons/icon-home-regular.js +27 -17
  90. package/dist-es/generated/mistica-icons/icon-home-wifi-filled.js +28 -11
  91. package/dist-es/generated/mistica-icons/icon-home-wifi-light.js +29 -12
  92. package/dist-es/generated/mistica-icons/icon-home-wifi-regular.js +28 -11
  93. package/dist-es/generated/mistica-icons/icon-pause-regular.js +12 -14
  94. package/dist-es/generated/mistica-icons/icon-play-regular.js +19 -21
  95. package/dist-es/generated/mistica-icons/icon-reload-light.js +27 -17
  96. package/dist-es/generated/mistica-icons/icon-reload-regular.js +27 -17
  97. package/dist-es/generated/mistica-icons/icon-share-filled.js +25 -15
  98. package/dist-es/generated/mistica-icons/icon-share-light.js +28 -18
  99. package/dist-es/generated/mistica-icons/icon-share-regular.js +28 -18
  100. package/dist-es/generated/mistica-icons/icon-shopping-bag-filled.js +101 -0
  101. package/dist-es/generated/mistica-icons/icon-shopping-bag-light.js +101 -0
  102. package/dist-es/generated/mistica-icons/icon-shopping-bag-regular.js +101 -0
  103. package/dist-es/generated/mistica-icons/icon-tickets-filled.js +21 -11
  104. package/dist-es/generated/mistica-icons/icon-tickets-light.js +30 -14
  105. package/dist-es/generated/mistica-icons/icon-tickets-regular.js +43 -27
  106. package/dist-es/hooks.js +51 -50
  107. package/dist-es/index.js +1762 -1758
  108. package/dist-es/package-version.js +1 -1
  109. package/dist-es/skins/blau.js +14 -2
  110. package/dist-es/skins/defaults.js +12 -0
  111. package/dist-es/skins/movistar-legacy.js +15 -3
  112. package/dist-es/skins/movistar.js +12 -0
  113. package/dist-es/skins/o2.js +13 -1
  114. package/dist-es/skins/telefonica.js +12 -0
  115. package/dist-es/skins/vivo-new.js +12 -0
  116. package/dist-es/skins/vivo.js +13 -1
  117. package/dist-es/style.css +1 -1
  118. package/dist-es/theme-context-provider.js +72 -68
  119. package/dist-es/tooltip.js +37 -36
  120. package/dist-es/utils/dom.js +9 -9
  121. package/dist-es/utils/environment.js +2 -2
  122. package/package.json +1 -1
  123. package/dist/boxed.css.ts.vanilla.css-mistica.js +0 -11
  124. package/dist-es/boxed.css.ts.vanilla.css-mistica.js +0 -2
package/dist-es/card.js CHANGED
@@ -77,104 +77,108 @@ function _object_without_properties_loose(source, excluded) {
77
77
  }
78
78
  return target;
79
79
  }
80
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
81
- import * as C from "react";
82
- import ce from "./tag.js";
83
- import f from "./stack.js";
84
- import w from "./box.js";
85
- import { Text2 as b, Text6 as he, Text3 as pe, Text as J } from "./text.js";
86
- import { Boxed as j, InternalBoxed as K } from "./boxed.js";
87
- import V from "./button-group.js";
88
- import ue, { MediaBorderRadiusProvider as me } from "./image.js";
89
- import { BaseTouchable as ge } from "./touchable.js";
90
- import { vars as y } from "./skins/skin-contract.css-mistica.js";
91
- import { boxed as P, mediaCard as fe, mediaCardContent as ve, dataCard as ye, actions as Q, snapCardTouchableHover as Ce, snapCardTouchableHoverTransparent as Te, snapCard as xe, videoAction as _, displayCardContainer as U, displayCardBackground as Y, displayCardContent as Z, displayCardGradient as $, cardActionIconButton as q, cardAction as Ie, cardActionInverse as Se } from "./card.css-mistica.js";
92
- import { useTheme as G } from "./hooks.js";
93
- import { sprinkles as X } from "./sprinkles.css-mistica.js";
94
- import be from "./inline.js";
95
- import Ne from "./icon-button.js";
96
- import we from "./generated/mistica-icons/icon-close-regular.js";
97
- import Ae from "./generated/mistica-icons/icon-pause-filled.js";
98
- import Be from "./generated/mistica-icons/icon-play-filled.js";
99
- import { combineRefs as Re } from "./utils/common.js";
100
- import ze from "./spinner.js";
101
- import De from "./video.js";
102
- import { useIsInverseVariant as ee, ThemeVariant as re } from "./theme-variant-context.js";
103
- const ie = (param)=>/* @__PURE__ */ {
104
- let { actions: r , isInverse: i } = param;
105
- return e(be, {
106
- space: 0,
107
- children: r.map((param, a)=>{
108
- let { onPress: n , label: s , Icon: l , iconSize: o = 20 , iconColor: p = y.colors.neutralHigh , iconBackground: c = Ie , iconBackgroundInverse: d = Se } = param;
109
- return l ? /* @__PURE__ */ e(Ne, {
110
- size: 48,
111
- onPress: n,
112
- "aria-label": s,
113
- className: q,
114
- style: {
115
- display: "flex"
116
- },
117
- children: /* @__PURE__ */ e("div", {
118
- className: i ? d : c,
119
- children: /* @__PURE__ */ e(l, {
120
- color: p,
121
- size: o
122
- })
123
- })
124
- }, a) : /* @__PURE__ */ e("div", {
125
- className: q
126
- }, a);
127
- })
128
- });
129
- }, ne = (r, i)=>{
130
- const { texts: n } = G(), s = r ? [
80
+ import { jsxs as n, jsx as e, Fragment as Ne } from "react/jsx-runtime";
81
+ import * as T from "react";
82
+ import Te from "./tag.js";
83
+ import y from "./stack.js";
84
+ import D from "./box.js";
85
+ import { Text2 as I, Text6 as Se, Text3 as xe, Text as $ } from "./text.js";
86
+ import { Boxed as q, InternalBoxed as ee } from "./boxed.js";
87
+ import J from "./button-group.js";
88
+ import we, { MediaBorderRadiusProvider as Be } from "./image.js";
89
+ import { BaseTouchable as _ } from "./touchable.js";
90
+ import { vars as v } from "./skins/skin-contract.css-mistica.js";
91
+ import { touchableContainer as H, boxed as P, touchable as E, mediaCard as Ae, mediaCardContent as Ie, dataCard as be, actions as re, snapCard as Re, videoAction as k, displayCardContainer as ae, displayCardBackground as ie, displayCardContent as ne, displayCardGradient as te, cardActionIconButton as L, touchableMediaCardOverlay as De, touchableCardOverlay as K, touchableCardOverlayInverse as se, touchableCardOverlayMedia as oe, cardAction as Me, cardActionInverse as ze, cardActionMedia as Oe } from "./card.css-mistica.js";
92
+ import { useTheme as Q } from "./hooks.js";
93
+ import { sprinkles as U } from "./sprinkles.css-mistica.js";
94
+ import _e from "./icon-button.js";
95
+ import He from "./generated/mistica-icons/icon-close-regular.js";
96
+ import Pe from "./generated/mistica-icons/icon-pause-filled.js";
97
+ import Ee from "./generated/mistica-icons/icon-play-filled.js";
98
+ import { combineRefs as We } from "./utils/common.js";
99
+ import Ge from "./spinner.js";
100
+ import Xe from "./video.js";
101
+ import { useIsInverseVariant as le, ThemeVariant as de } from "./theme-variant-context.js";
102
+ const ce = (r, a)=>{
103
+ const { texts: i } = Q(), s = r ? [
131
104
  ...r
132
105
  ] : [];
133
- return i && s.push({
134
- label: n.closeButtonLabel,
135
- onPress: i,
136
- Icon: we
106
+ return a && s.push({
107
+ label: i.closeButtonLabel,
108
+ onPress: a,
109
+ Icon: He
137
110
  }), s;
138
- }, Pe = {
111
+ }, he = 48, V = (param)=>{
112
+ let { actions: r , onClose: a , type: i = "default" } = param;
113
+ const s = ce(r, a), l = s.length > 0, o = {
114
+ default: v.colors.neutralHigh,
115
+ inverse: v.colors.inverse,
116
+ media: "#000000"
117
+ }, u = {
118
+ default: Me,
119
+ inverse: ze,
120
+ media: Oe
121
+ };
122
+ return l ? /* @__PURE__ */ e("div", {
123
+ style: {
124
+ position: "absolute",
125
+ right: 8,
126
+ top: 8,
127
+ zIndex: 3
128
+ },
129
+ children: /* @__PURE__ */ e("div", {
130
+ className: U({
131
+ display: "flex"
132
+ }),
133
+ children: s.map((param, m)=>{
134
+ let { onPress: h , label: d , Icon: t , iconSize: p = 20 } = param;
135
+ return t ? /* @__PURE__ */ e(_e, {
136
+ size: he,
137
+ onPress: h,
138
+ "aria-label": d,
139
+ className: L,
140
+ style: {
141
+ display: "flex"
142
+ },
143
+ children: /* @__PURE__ */ e("div", {
144
+ className: u[i],
145
+ children: /* @__PURE__ */ e(t, {
146
+ color: o[i],
147
+ size: p
148
+ })
149
+ })
150
+ }, m) : /* @__PURE__ */ e("div", {
151
+ className: L
152
+ }, m);
153
+ })
154
+ })
155
+ }) : /* @__PURE__ */ e(Ne, {});
156
+ }, je = {
139
157
  "1:1": "1",
140
158
  "16:9": "16 / 9",
141
159
  "7:10": "7 / 10",
142
160
  "9:10": "9 / 10",
143
161
  auto: "auto"
144
- }, F = (param)=>{
145
- let { children: r , width: i = "100%" , height: n = "100%" , minWidth: s , minHeight: l , aspectRatio: o , actions: p , onClose: c , isInverse: d , "aria-label": a } = param;
146
- const h = ne(p, c), u = h.length > 0, m = o ? typeof o == "number" ? String(o) : Pe[o] : void 0;
147
- return /* @__PURE__ */ t("section", {
148
- "aria-label": a,
162
+ }, W = (param)=>{
163
+ let { children: r , width: a = "100%" , height: i = "100%" , minWidth: s , aspectRatio: l , className: o , "aria-label": u } = param;
164
+ const h = l ? typeof l == "number" ? String(l) : je[l] : void 0;
165
+ return /* @__PURE__ */ e("section", {
166
+ "aria-label": u,
167
+ className: o,
149
168
  style: {
150
- width: i,
151
- height: n,
169
+ width: a,
170
+ height: i,
152
171
  minWidth: s,
153
- minHeight: l,
154
- aspectRatio: m,
172
+ aspectRatio: h,
155
173
  position: "relative"
156
174
  },
157
- children: [
158
- r,
159
- u && /* @__PURE__ */ e("div", {
160
- style: {
161
- position: "absolute",
162
- right: 8,
163
- top: 8,
164
- zIndex: 2
165
- },
166
- children: /* @__PURE__ */ e(ie, {
167
- actions: h,
168
- isInverse: d
169
- })
170
- })
171
- ]
175
+ children: r
172
176
  });
173
- }, ae = (r)=>/* @__PURE__ */ e(ue, {
177
+ }, me = (r)=>/* @__PURE__ */ e(we, {
174
178
  width: "100%",
175
179
  height: "100%",
176
180
  src: r !== null && r !== void 0 ? r : "//:0"
177
- }), Me = {
181
+ }), Fe = {
178
182
  loading: {
179
183
  showSpinner: "loadingTimeout",
180
184
  play: "playing",
@@ -198,42 +202,42 @@ const ie = (param)=>/* @__PURE__ */ {
198
202
  error: {
199
203
  reset: "loading"
200
204
  }
201
- }, He = (r, i)=>Me[r][i] || r, oe = (r)=>{
205
+ }, ke = (r, a)=>Fe[r][a] || r, ue = (r)=>{
202
206
  switch(r){
203
207
  case "playing":
204
- return Ae;
208
+ return Pe;
205
209
  case "paused":
206
210
  case "loading":
207
- return Be;
211
+ return Ee;
208
212
  case "loadingTimeout":
209
- return ze;
213
+ return Ge;
210
214
  default:
211
215
  return;
212
216
  }
213
- }, te = (r, i, n)=>{
214
- const s = C.useRef(null), [l, o] = C.useReducer(He, "loading");
215
- return C.useEffect(()=>{
216
- var a;
217
+ }, pe = (r, a, i)=>{
218
+ const s = T.useRef(null), [l, o] = T.useReducer(ke, "loading");
219
+ return T.useEffect(()=>{
220
+ var t;
217
221
  const d = setTimeout(()=>o("showSpinner"), 2e3);
218
- return (a = s.current) == null || a.load(), ()=>{
222
+ return (t = s.current) == null || t.load(), ()=>{
219
223
  clearTimeout(d), o("reset");
220
224
  };
221
225
  }, [
222
226
  r
223
227
  ]), {
224
- video: C.useMemo(()=>r ? /* @__PURE__ */ e(De, {
225
- ref: Re(s, n),
228
+ video: T.useMemo(()=>r ? /* @__PURE__ */ e(Xe, {
229
+ ref: We(s, i),
226
230
  src: r,
227
231
  width: "100%",
228
232
  height: "100%",
229
- poster: i,
233
+ poster: a,
230
234
  onError: ()=>o("fail"),
231
235
  onPause: ()=>o("pause"),
232
236
  onPlay: ()=>o("play")
233
237
  }) : void 0, [
234
- n,
238
+ i,
235
239
  r,
236
- i
240
+ a
237
241
  ]),
238
242
  videoStatus: l,
239
243
  onVideoControlPress: ()=>{
@@ -241,53 +245,53 @@ const ie = (param)=>/* @__PURE__ */ {
241
245
  d && (l === "loading" ? o("showSpinner") : l === "paused" ? d.play() : l === "playing" && d.pause());
242
246
  }
243
247
  };
244
- }, se = (param)=>{
245
- let { headline: r , pretitle: i , pretitleLinesMax: n , title: s , titleLinesMax: l , subtitle: o , subtitleLinesMax: p , description: c , descriptionLinesMax: d , extra: a , button: h , buttonLink: u } = param;
246
- const { textPresets: m } = G(), v = ()=>r ? typeof r == "string" ? /* @__PURE__ */ e(ce, {
248
+ }, fe = (param)=>{
249
+ let { headline: r , pretitle: a , pretitleLinesMax: i , title: s , titleLinesMax: l , subtitle: o , subtitleLinesMax: u , description: h , descriptionLinesMax: d , extra: t , button: p , buttonLink: m } = param;
250
+ const { textPresets: f } = Q(), g = ()=>r ? typeof r == "string" ? /* @__PURE__ */ e(Te, {
247
251
  type: "promo",
248
252
  children: r
249
253
  }) : r : null;
250
- return /* @__PURE__ */ t("div", {
251
- className: X({
254
+ return /* @__PURE__ */ n("div", {
255
+ className: U({
252
256
  display: "flex",
253
257
  flex: 1,
254
258
  justifyContent: "space-between",
255
259
  flexDirection: "column"
256
260
  }),
257
261
  children: [
258
- /* @__PURE__ */ t("div", {
262
+ /* @__PURE__ */ n("div", {
259
263
  children: [
260
- /* @__PURE__ */ t(f, {
264
+ /* @__PURE__ */ n(y, {
261
265
  space: 8,
262
266
  children: [
263
- (r || i || s || o) && /* @__PURE__ */ e("header", {
264
- children: /* @__PURE__ */ t(f, {
267
+ (r || a || s || o) && /* @__PURE__ */ e("header", {
268
+ children: /* @__PURE__ */ n(y, {
265
269
  space: 8,
266
270
  children: [
267
- v(),
268
- /* @__PURE__ */ t(f, {
271
+ g(),
272
+ /* @__PURE__ */ n(y, {
269
273
  space: 4,
270
274
  children: [
271
- i && /* @__PURE__ */ e(b, {
272
- truncate: n,
275
+ a && /* @__PURE__ */ e(I, {
276
+ truncate: i,
273
277
  as: "div",
274
278
  regular: !0,
275
279
  hyphens: "auto",
276
- children: i
280
+ children: a
277
281
  }),
278
- /* @__PURE__ */ e(J, {
282
+ /* @__PURE__ */ e($, {
279
283
  mobileSize: 18,
280
284
  mobileLineHeight: "24px",
281
285
  desktopSize: 20,
282
286
  desktopLineHeight: "28px",
283
287
  truncate: l,
284
- weight: m.cardTitle.weight,
288
+ weight: f.cardTitle.weight,
285
289
  as: "h3",
286
290
  hyphens: "auto",
287
291
  children: s
288
292
  }),
289
- /* @__PURE__ */ e(b, {
290
- truncate: p,
293
+ /* @__PURE__ */ e(I, {
294
+ truncate: u,
291
295
  as: "div",
292
296
  regular: !0,
293
297
  hyphens: "auto",
@@ -298,150 +302,211 @@ const ie = (param)=>/* @__PURE__ */ {
298
302
  ]
299
303
  })
300
304
  }),
301
- c && /* @__PURE__ */ e(b, {
305
+ h && /* @__PURE__ */ e(I, {
302
306
  truncate: d,
303
307
  as: "p",
304
308
  regular: !0,
305
- color: y.colors.textSecondary,
309
+ color: v.colors.textSecondary,
306
310
  hyphens: "auto",
307
- children: c
311
+ children: h
308
312
  })
309
313
  ]
310
314
  }),
311
- a && /* @__PURE__ */ e("div", {
312
- children: a
315
+ t && /* @__PURE__ */ e("div", {
316
+ children: t
313
317
  })
314
318
  ]
315
319
  }),
316
- (h || u) && /* @__PURE__ */ e("div", {
317
- className: Q,
318
- children: /* @__PURE__ */ e(V, {
319
- primaryButton: h,
320
- link: u
320
+ (p || m) && /* @__PURE__ */ e("div", {
321
+ className: re,
322
+ children: /* @__PURE__ */ e(J, {
323
+ primaryButton: p,
324
+ link: m
321
325
  })
322
326
  })
323
327
  ]
324
328
  });
325
- }, or = /*#__PURE__*/ C.forwardRef((param, g)=>/* @__PURE__ */ {
326
- let { media: r , headline: i , pretitle: n , pretitleLinesMax: s , subtitle: l , subtitleLinesMax: o , title: p , titleLinesMax: c , description: d , descriptionLinesMax: a , extra: h , actions: u , button: m , buttonLink: v , dataAttributes: I , "aria-label": T , onClose: x } = param;
327
- return e(F, {
328
- onClose: x,
329
- actions: u,
330
- "aria-label": T,
331
- isInverse: !0,
332
- children: /* @__PURE__ */ e(j, {
333
- className: P,
334
- dataAttributes: _object_spread({
335
- "component-name": "MediaCard"
336
- }, I),
337
- ref: g,
338
- width: "100%",
339
- height: "100%",
340
- children: /* @__PURE__ */ t("div", {
341
- className: fe,
342
- children: [
343
- /* @__PURE__ */ e(me, {
344
- value: !1,
345
- children: r
346
- }),
347
- /* @__PURE__ */ e("div", {
348
- className: ve,
349
- children: /* @__PURE__ */ e(se, {
350
- headline: i,
351
- pretitle: n,
352
- pretitleLinesMax: s,
353
- title: p,
354
- titleLinesMax: c,
355
- subtitle: l,
356
- subtitleLinesMax: o,
357
- description: d,
358
- descriptionLinesMax: a,
359
- extra: h,
360
- button: m,
361
- buttonLink: v
329
+ }, ur = /*#__PURE__*/ T.forwardRef((_param, w)=>{
330
+ var { media: r , headline: a , pretitle: i , pretitleLinesMax: s , subtitle: l , subtitleLinesMax: o , title: u , titleLinesMax: h , description: d , descriptionLinesMax: t , extra: p , actions: m , button: f , buttonLink: g , dataAttributes: x , "aria-label": C , onClose: S } = _param, c = _object_without_properties(_param, [
331
+ "media",
332
+ "headline",
333
+ "pretitle",
334
+ "pretitleLinesMax",
335
+ "subtitle",
336
+ "subtitleLinesMax",
337
+ "title",
338
+ "titleLinesMax",
339
+ "description",
340
+ "descriptionLinesMax",
341
+ "extra",
342
+ "actions",
343
+ "button",
344
+ "buttonLink",
345
+ "dataAttributes",
346
+ "aria-label",
347
+ "onClose"
348
+ ]);
349
+ const N = c.href || c.to || c.onPress, b = De;
350
+ return /* @__PURE__ */ n(W, {
351
+ "aria-label": C,
352
+ className: H,
353
+ children: [
354
+ /* @__PURE__ */ e(q, {
355
+ className: P,
356
+ dataAttributes: _object_spread({
357
+ "component-name": "MediaCard"
358
+ }, x),
359
+ ref: w,
360
+ width: "100%",
361
+ height: "100%",
362
+ children: /* @__PURE__ */ n(_, _object_spread_props(_object_spread({
363
+ maybe: !0
364
+ }, c), {
365
+ className: E,
366
+ "aria-label": C,
367
+ children: [
368
+ N && /* @__PURE__ */ e("div", {
369
+ className: b
370
+ }),
371
+ /* @__PURE__ */ n("div", {
372
+ className: Ae,
373
+ children: [
374
+ /* @__PURE__ */ e(Be, {
375
+ value: !1,
376
+ children: r
377
+ }),
378
+ /* @__PURE__ */ e("div", {
379
+ className: Ie,
380
+ children: /* @__PURE__ */ e(fe, {
381
+ headline: a,
382
+ pretitle: i,
383
+ pretitleLinesMax: s,
384
+ title: u,
385
+ titleLinesMax: h,
386
+ subtitle: l,
387
+ subtitleLinesMax: o,
388
+ description: d,
389
+ descriptionLinesMax: t,
390
+ extra: p,
391
+ button: f,
392
+ buttonLink: g
393
+ })
394
+ })
395
+ ]
362
396
  })
363
- })
364
- ]
397
+ ]
398
+ }))
399
+ }),
400
+ /* @__PURE__ */ e(V, {
401
+ onClose: S,
402
+ actions: m,
403
+ type: "media"
365
404
  })
366
- })
405
+ ]
367
406
  });
368
- }), tr = /*#__PURE__*/ C.forwardRef((param, g)=>{
369
- let { icon: r , headline: i , pretitle: n , pretitleLinesMax: s , title: l , titleLinesMax: o , subtitle: p , subtitleLinesMax: c , description: d , descriptionLinesMax: a , extra: h , actions: u , button: m , buttonLink: v , dataAttributes: I , "aria-label": T , onClose: x } = param;
370
- const N = ne(u, x), z = N.length > 0, A = !!r, D = {
371
- position: "absolute",
372
- top: 8,
373
- right: 8,
374
- zIndex: 2
375
- }, B = {
376
- marginRight: -8,
377
- marginTop: -16
407
+ }), pr = /*#__PURE__*/ T.forwardRef((_param, w)=>{
408
+ var { icon: r , headline: a , pretitle: i , pretitleLinesMax: s , title: l , titleLinesMax: o , subtitle: u , subtitleLinesMax: h , description: d , descriptionLinesMax: t , extra: p , actions: m , button: f , buttonLink: g , dataAttributes: x , "aria-label": C , onClose: S } = _param, c = _object_without_properties(_param, [
409
+ "icon",
410
+ "headline",
411
+ "pretitle",
412
+ "pretitleLinesMax",
413
+ "title",
414
+ "titleLinesMax",
415
+ "subtitle",
416
+ "subtitleLinesMax",
417
+ "description",
418
+ "descriptionLinesMax",
419
+ "extra",
420
+ "actions",
421
+ "button",
422
+ "buttonLink",
423
+ "dataAttributes",
424
+ "aria-label",
425
+ "onClose"
426
+ ]);
427
+ const N = !!r, b = c.href || c.to || c.onPress, z = K, O = ce(m, S), R = {
428
+ marginRight: -16,
429
+ marginTop: -24,
430
+ width: he * O.length
378
431
  };
379
- return /* @__PURE__ */ e("section", {
380
- "aria-label": T,
381
- style: {
382
- height: "100%",
383
- position: "relative"
384
- },
385
- children: /* @__PURE__ */ e(j, {
386
- className: P,
387
- dataAttributes: _object_spread({
388
- "component-name": "DataCard"
389
- }, I),
390
- ref: g,
391
- width: "100%",
392
- height: "100%",
393
- children: /* @__PURE__ */ t("div", {
394
- className: ye,
395
- children: [
396
- /* @__PURE__ */ t("div", {
397
- className: X({
398
- display: "flex"
432
+ return /* @__PURE__ */ n(W, {
433
+ "aria-label": C,
434
+ className: H,
435
+ children: [
436
+ /* @__PURE__ */ e(q, {
437
+ className: P,
438
+ dataAttributes: _object_spread({
439
+ "component-name": "DataCard"
440
+ }, x),
441
+ ref: w,
442
+ width: "100%",
443
+ height: "100%",
444
+ children: /* @__PURE__ */ n(_, _object_spread_props(_object_spread({
445
+ maybe: !0
446
+ }, c), {
447
+ className: E,
448
+ "aria-label": C,
449
+ children: [
450
+ b && /* @__PURE__ */ e("div", {
451
+ className: z
399
452
  }),
400
- children: [
401
- /* @__PURE__ */ t(f, {
402
- space: 16,
403
- className: X({
404
- flex: 1
453
+ /* @__PURE__ */ n("div", {
454
+ className: be,
455
+ children: [
456
+ /* @__PURE__ */ n("div", {
457
+ className: U({
458
+ display: "flex"
459
+ }),
460
+ children: [
461
+ /* @__PURE__ */ n(y, {
462
+ space: 16,
463
+ className: U({
464
+ flex: 1
465
+ }),
466
+ children: [
467
+ N ? r : null,
468
+ /* @__PURE__ */ e(fe, {
469
+ headline: a,
470
+ pretitle: i,
471
+ pretitleLinesMax: s,
472
+ title: l,
473
+ titleLinesMax: o,
474
+ subtitle: u,
475
+ subtitleLinesMax: h,
476
+ description: d,
477
+ descriptionLinesMax: t
478
+ })
479
+ ]
480
+ }),
481
+ !N && /* @__PURE__ */ e("div", {
482
+ style: R
483
+ })
484
+ ]
405
485
  }),
406
- children: [
407
- A ? r : null,
408
- /* @__PURE__ */ e(se, {
409
- headline: i,
410
- pretitle: n,
411
- pretitleLinesMax: s,
412
- title: l,
413
- titleLinesMax: o,
414
- subtitle: p,
415
- subtitleLinesMax: c,
416
- description: d,
417
- descriptionLinesMax: a
486
+ p && /* @__PURE__ */ e("div", {
487
+ children: p
488
+ }),
489
+ (f || g) && /* @__PURE__ */ e("div", {
490
+ className: re,
491
+ children: /* @__PURE__ */ e(J, {
492
+ primaryButton: f,
493
+ link: g
418
494
  })
419
- ]
420
- }),
421
- z && /* @__PURE__ */ e("div", {
422
- style: A ? D : B,
423
- children: /* @__PURE__ */ e(ie, {
424
- actions: N
425
495
  })
426
- })
427
- ]
428
- }),
429
- h && /* @__PURE__ */ e("div", {
430
- children: h
431
- }),
432
- (m || v) && /* @__PURE__ */ e("div", {
433
- className: Q,
434
- children: /* @__PURE__ */ e(V, {
435
- primaryButton: m,
436
- link: v
496
+ ]
437
497
  })
438
- })
439
- ]
498
+ ]
499
+ }))
500
+ }),
501
+ /* @__PURE__ */ e(V, {
502
+ onClose: S,
503
+ actions: m,
504
+ type: "default"
440
505
  })
441
- })
506
+ ]
442
507
  });
443
- }), sr = /*#__PURE__*/ C.forwardRef((_param, h)=>{
444
- var { icon: r , title: i , titleLinesMax: n , subtitle: s , subtitleLinesMax: l , dataAttributes: o , "aria-label": p , extra: c , isInverse: d = !1 } = _param, a = _object_without_properties(_param, [
508
+ }), fr = /*#__PURE__*/ T.forwardRef((_param, p)=>{
509
+ var { icon: r , title: a , titleLinesMax: i , subtitle: s , subtitleLinesMax: l , dataAttributes: o , "aria-label": u , extra: h , isInverse: d = !1 } = _param, t = _object_without_properties(_param, [
445
510
  "icon",
446
511
  "title",
447
512
  "titleLinesMax",
@@ -452,335 +517,411 @@ const ie = (param)=>/* @__PURE__ */ {
452
517
  "extra",
453
518
  "isInverse"
454
519
  ]);
455
- const { isDarkMode: u } = G(), m = !!(a.to || a.href || a.onPress);
456
- return /* @__PURE__ */ e(j, {
457
- className: P,
458
- dataAttributes: _object_spread({
459
- "component-name": "SnapCard"
460
- }, o),
461
- ref: h,
462
- isInverse: d,
463
- width: "100%",
464
- height: "100%",
465
- children: /* @__PURE__ */ e(ge, _object_spread_props(_object_spread({
466
- maybe: !0
467
- }, a), {
468
- className: // @todo: define hover background color for inverse and for dark mode
469
- m && !d && !u ? Ce : Te,
470
- "aria-label": p,
471
- children: /* @__PURE__ */ t("section", {
472
- className: xe,
520
+ const m = t.href || t.to || t.onPress, f = d ? se : K;
521
+ return /* @__PURE__ */ e(W, {
522
+ className: H,
523
+ children: /* @__PURE__ */ e(q, {
524
+ className: P,
525
+ dataAttributes: _object_spread({
526
+ "component-name": "SnapCard"
527
+ }, o),
528
+ ref: p,
529
+ isInverse: d,
530
+ width: "100%",
531
+ height: "100%",
532
+ children: /* @__PURE__ */ n(_, _object_spread_props(_object_spread({
533
+ maybe: !0
534
+ }, t), {
535
+ className: E,
536
+ "aria-label": u,
473
537
  children: [
474
- /* @__PURE__ */ t("div", {
538
+ m && /* @__PURE__ */ e("div", {
539
+ className: f
540
+ }),
541
+ /* @__PURE__ */ n("section", {
542
+ className: Re,
475
543
  children: [
476
- r && /* @__PURE__ */ e(w, {
477
- paddingBottom: 16,
478
- children: r
479
- }),
480
- /* @__PURE__ */ t(f, {
481
- space: 4,
544
+ /* @__PURE__ */ n("div", {
482
545
  children: [
483
- i && /* @__PURE__ */ e(b, {
484
- truncate: n,
485
- as: "h3",
486
- regular: !0,
487
- hyphens: "auto",
488
- children: i
546
+ r && /* @__PURE__ */ e(D, {
547
+ paddingBottom: 16,
548
+ children: r
489
549
  }),
490
- s && /* @__PURE__ */ e(b, {
491
- truncate: l,
492
- regular: !0,
493
- color: y.colors.textSecondary,
494
- as: "p",
495
- hyphens: "auto",
496
- children: s
550
+ /* @__PURE__ */ n(y, {
551
+ space: 4,
552
+ children: [
553
+ a && /* @__PURE__ */ e(I, {
554
+ truncate: i,
555
+ as: "h3",
556
+ regular: !0,
557
+ hyphens: "auto",
558
+ children: a
559
+ }),
560
+ s && /* @__PURE__ */ e(I, {
561
+ truncate: l,
562
+ regular: !0,
563
+ color: v.colors.textSecondary,
564
+ as: "p",
565
+ hyphens: "auto",
566
+ children: s
567
+ })
568
+ ]
497
569
  })
498
570
  ]
571
+ }),
572
+ h && /* @__PURE__ */ e("div", {
573
+ children: h
499
574
  })
500
575
  ]
501
- }),
502
- c && /* @__PURE__ */ e("div", {
503
- children: c
504
576
  })
505
577
  ]
506
- })
507
- }))
578
+ }))
579
+ })
508
580
  });
509
- }), de = /*#__PURE__*/ C.forwardRef((param, M)=>{
510
- let { isInverse: r , backgroundImage: i , backgroundVideo: n , backgroundVideoRef: s , poster: l , icon: o , headline: p , pretitle: c , pretitleLinesMax: d , title: a , titleLinesMax: h , description: u , descriptionLinesMax: m , extra: v , button: I , secondaryButton: T , onClose: x , actions: g , buttonLink: N , dataAttributes: z , width: A , height: D , aspectRatio: B , "aria-label": W } = param;
511
- const S = ae(i), { video: H , videoStatus: E , onVideoControlPress: k } = te(n, l, s);
512
- n && (g = [
581
+ }), Ue = 264, ve = /*#__PURE__*/ T.forwardRef((_param, G)=>{
582
+ var { isInverse: r , backgroundImage: a , backgroundVideo: i , backgroundVideoRef: s , poster: l , icon: o , headline: u , pretitle: h , pretitleLinesMax: d , title: t , titleLinesMax: p , description: m , descriptionLinesMax: f , extra: g , button: x , secondaryButton: C , onClose: S , actions: c , buttonLink: w , dataAttributes: N , width: b , height: z , aspectRatio: O , "aria-label": R } = _param, M = _object_without_properties(_param, [
583
+ "isInverse",
584
+ "backgroundImage",
585
+ "backgroundVideo",
586
+ "backgroundVideoRef",
587
+ "poster",
588
+ "icon",
589
+ "headline",
590
+ "pretitle",
591
+ "pretitleLinesMax",
592
+ "title",
593
+ "titleLinesMax",
594
+ "description",
595
+ "descriptionLinesMax",
596
+ "extra",
597
+ "button",
598
+ "secondaryButton",
599
+ "onClose",
600
+ "actions",
601
+ "buttonLink",
602
+ "dataAttributes",
603
+ "width",
604
+ "height",
605
+ "aspectRatio",
606
+ "aria-label"
607
+ ]);
608
+ const B = me(a), { video: X , videoStatus: j , onVideoControlPress: Y } = pe(i, l, s);
609
+ i && (c = [
513
610
  {
514
- Icon: oe(E),
515
- onPress: k,
611
+ Icon: ue(j),
612
+ onPress: Y,
516
613
  label: "Video controls",
517
- iconSize: E === "loadingTimeout" ? 16 : 12,
518
- iconColor: y.colors.inverse,
519
- iconBackground: _,
520
- iconBackgroundInverse: _
614
+ iconSize: j === "loadingTimeout" ? 16 : 12,
615
+ iconColor: v.colors.inverse,
616
+ iconBackground: k,
617
+ iconBackgroundInverse: k
521
618
  }
522
619
  ]);
523
- const L = ee(), R = !!i || !!n, O = R ? "0 0 16px rgba(0,0,0,0.4)" : void 0, le = (g == null ? void 0 : g.length) || x;
524
- return /* @__PURE__ */ e(F, {
525
- width: A,
526
- height: D,
527
- aspectRatio: B,
528
- onClose: x,
529
- actions: g,
530
- "aria-label": W,
531
- isInverse: r,
532
- children: /* @__PURE__ */ e(K, {
533
- borderRadius: y.borderRadii.legacyDisplay,
534
- className: P,
535
- dataAttributes: z,
536
- ref: M,
537
- width: "100%",
538
- minHeight: "100%",
539
- isInverse: r,
540
- background: i || n ? L ? y.colors.backgroundContainerBrandOverInverse : y.colors.backgroundContainer : void 0,
541
- children: /* @__PURE__ */ t("div", {
542
- className: U,
543
- children: [
544
- /* @__PURE__ */ e(re, {
545
- isInverse: L,
546
- children: /* @__PURE__ */ e("div", {
547
- className: Y,
548
- style: {
549
- zIndex: 0
550
- },
551
- children: n ? H : i ? S : void 0
552
- })
553
- }),
554
- /* @__PURE__ */ t("div", {
555
- className: Z,
556
- style: {
557
- paddingTop: R && !o && !le ? 0 : 24,
558
- zIndex: 1
559
- },
560
- children: [
561
- o ? /* @__PURE__ */ e(w, {
562
- paddingBottom: R ? 0 : 40,
563
- paddingX: 24,
564
- children: o
565
- }) : /* @__PURE__ */ e(w, {
566
- paddingBottom: g != null && g.length || x ? R ? 24 : 64 : 0
567
- }),
568
- /* @__PURE__ */ e(w, {
569
- paddingX: 24,
570
- paddingTop: R ? 40 : 0,
571
- paddingBottom: 24,
572
- className: R ? $ : void 0,
573
- children: /* @__PURE__ */ t(f, {
574
- space: 24,
620
+ const F = le(), A = !!a || !!i, Z = A ? "0 0 16px rgba(0,0,0,0.4)" : void 0, ye = (c == null ? void 0 : c.length) || S, ge = M.href || M.to || M.onPress, Ce = a || i ? oe : r ? se : K;
621
+ return /* @__PURE__ */ n(W, {
622
+ width: b,
623
+ height: z,
624
+ aspectRatio: O,
625
+ "aria-label": R,
626
+ minWidth: Ue,
627
+ className: H,
628
+ children: [
629
+ /* @__PURE__ */ e(ee, {
630
+ borderRadius: v.borderRadii.legacyDisplay,
631
+ className: P,
632
+ dataAttributes: N,
633
+ ref: G,
634
+ width: "100%",
635
+ minHeight: "100%",
636
+ isInverse: r,
637
+ background: a || i ? F ? v.colors.backgroundContainerBrandOverInverse : v.colors.backgroundContainer : void 0,
638
+ children: /* @__PURE__ */ n(_, _object_spread_props(_object_spread({
639
+ maybe: !0
640
+ }, M), {
641
+ className: E,
642
+ "aria-label": R,
643
+ children: [
644
+ ge && /* @__PURE__ */ e("div", {
645
+ className: Ce
646
+ }),
647
+ /* @__PURE__ */ n("div", {
648
+ className: ae,
649
+ children: [
650
+ /* @__PURE__ */ e(de, {
651
+ isInverse: F,
652
+ children: /* @__PURE__ */ e("div", {
653
+ className: ie,
654
+ children: i ? X : a ? B : void 0
655
+ })
656
+ }),
657
+ /* @__PURE__ */ n("div", {
658
+ className: ne,
659
+ style: {
660
+ paddingTop: A && !o && !ye ? 0 : 24
661
+ },
575
662
  children: [
576
- /* @__PURE__ */ t("div", {
577
- children: [
578
- /* @__PURE__ */ t(f, {
579
- space: 8,
580
- children: [
581
- (p || c || a) && /* @__PURE__ */ e("header", {
582
- children: /* @__PURE__ */ t(f, {
583
- space: 16,
663
+ o ? /* @__PURE__ */ e(D, {
664
+ paddingBottom: A ? 0 : 40,
665
+ paddingX: 24,
666
+ children: o
667
+ }) : /* @__PURE__ */ e(D, {
668
+ paddingBottom: c != null && c.length || S ? A ? 24 : 64 : 0
669
+ }),
670
+ /* @__PURE__ */ e(D, {
671
+ paddingX: 24,
672
+ paddingTop: A ? 40 : 0,
673
+ paddingBottom: 24,
674
+ className: A ? te : void 0,
675
+ children: /* @__PURE__ */ n(y, {
676
+ space: 24,
677
+ children: [
678
+ /* @__PURE__ */ n("div", {
679
+ children: [
680
+ /* @__PURE__ */ n(y, {
681
+ space: 8,
584
682
  children: [
585
- p,
586
- /* @__PURE__ */ t(f, {
587
- space: 4,
588
- children: [
589
- c && /* @__PURE__ */ e(b, {
590
- forceMobileSizes: !0,
591
- truncate: d,
592
- as: "div",
593
- regular: !0,
594
- textShadow: O,
595
- children: c
596
- }),
597
- /* @__PURE__ */ e(he, {
598
- forceMobileSizes: !0,
599
- truncate: h,
600
- as: "h3",
601
- textShadow: O,
602
- hyphens: "auto",
603
- children: a
604
- })
605
- ]
683
+ (u || h || t) && /* @__PURE__ */ e("header", {
684
+ children: /* @__PURE__ */ n(y, {
685
+ space: 16,
686
+ children: [
687
+ u,
688
+ /* @__PURE__ */ n(y, {
689
+ space: 4,
690
+ children: [
691
+ h && /* @__PURE__ */ e(I, {
692
+ forceMobileSizes: !0,
693
+ truncate: d,
694
+ as: "div",
695
+ regular: !0,
696
+ textShadow: Z,
697
+ children: h
698
+ }),
699
+ /* @__PURE__ */ e(Se, {
700
+ forceMobileSizes: !0,
701
+ truncate: p,
702
+ as: "h3",
703
+ textShadow: Z,
704
+ hyphens: "auto",
705
+ children: t
706
+ })
707
+ ]
708
+ })
709
+ ]
710
+ })
711
+ }),
712
+ m && /* @__PURE__ */ e(xe, {
713
+ forceMobileSizes: !0,
714
+ truncate: f,
715
+ as: "p",
716
+ regular: !0,
717
+ color: v.colors.textSecondary,
718
+ textShadow: Z,
719
+ hyphens: "auto",
720
+ children: m
606
721
  })
607
722
  ]
608
- })
609
- }),
610
- u && /* @__PURE__ */ e(pe, {
611
- forceMobileSizes: !0,
612
- truncate: m,
613
- as: "p",
614
- regular: !0,
615
- color: y.colors.textSecondary,
616
- textShadow: O,
617
- hyphens: "auto",
618
- children: u
619
- })
620
- ]
621
- }),
622
- v
623
- ]
624
- }),
625
- (I || T || N) && /* @__PURE__ */ e(V, {
626
- primaryButton: I,
627
- secondaryButton: T,
628
- link: N
723
+ }),
724
+ g
725
+ ]
726
+ }),
727
+ (x || C || w) && /* @__PURE__ */ e(J, {
728
+ primaryButton: x,
729
+ secondaryButton: C,
730
+ link: w
731
+ })
732
+ ]
733
+ })
629
734
  })
630
735
  ]
631
736
  })
632
- })
633
- ]
634
- })
635
- ]
737
+ ]
738
+ })
739
+ ]
740
+ }))
741
+ }),
742
+ /* @__PURE__ */ e(V, {
743
+ onClose: S,
744
+ actions: c,
745
+ type: a || i ? "media" : r ? "inverse" : "default"
636
746
  })
637
- })
747
+ ]
638
748
  });
639
- }), dr = /*#__PURE__*/ C.forwardRef((_param, n)=>/* @__PURE__ */ {
640
- var { dataAttributes: r } = _param, i = _object_without_properties(_param, [
749
+ }), vr = /*#__PURE__*/ T.forwardRef((_param, i)=>/* @__PURE__ */ {
750
+ var { dataAttributes: r } = _param, a = _object_without_properties(_param, [
641
751
  "dataAttributes"
642
752
  ]);
643
- return e(de, _object_spread_props(_object_spread({}, i), {
644
- ref: n,
753
+ return e(ve, _object_spread_props(_object_spread({}, a), {
754
+ ref: i,
645
755
  isInverse: !0,
646
756
  dataAttributes: _object_spread_props(_object_spread({}, r), {
647
757
  "component-name": "DisplayMediaCard"
648
758
  })
649
759
  }));
650
- }), lr = /*#__PURE__*/ C.forwardRef((_param, n)=>/* @__PURE__ */ {
651
- var { dataAttributes: r } = _param, i = _object_without_properties(_param, [
760
+ }), yr = /*#__PURE__*/ T.forwardRef((_param, i)=>/* @__PURE__ */ {
761
+ var { dataAttributes: r } = _param, a = _object_without_properties(_param, [
652
762
  "dataAttributes"
653
763
  ]);
654
- return e(de, _object_spread_props(_object_spread({}, i), {
655
- ref: n,
764
+ return e(ve, _object_spread_props(_object_spread({}, a), {
765
+ ref: i,
656
766
  dataAttributes: _object_spread_props(_object_spread({}, r), {
657
767
  "component-name": "DisplayDataCard"
658
768
  })
659
769
  }));
660
- }), Ee = 140, _e = 112, cr = /*#__PURE__*/ C.forwardRef((param, z)=>{
661
- let { dataAttributes: r , backgroundImage: i , backgroundVideo: n , poster: s , backgroundVideoRef: l , width: o , height: p , aspectRatio: c = "7:10" , ariaLabel: d , actions: a , onClose: h , icon: u , headline: m , pretitle: v , pretitleLinesMax: I , title: T , titleLinesMax: x , description: g , descriptionLinesMax: N } = param;
662
- const A = ae(i), { video: D , videoStatus: B , onVideoControlPress: W } = te(n, s, l);
663
- n && (a = [
770
+ }), Ve = 140, gr = /*#__PURE__*/ T.forwardRef((_param, b)=>{
771
+ var { dataAttributes: r , backgroundImage: a , backgroundVideo: i , poster: s , backgroundVideoRef: l , width: o , height: u , aspectRatio: h = "7:10" , ariaLabel: d , actions: t , onClose: p , icon: m , headline: f , pretitle: g , pretitleLinesMax: x , title: C , titleLinesMax: S , description: c , descriptionLinesMax: w } = _param, N = _object_without_properties(_param, [
772
+ "dataAttributes",
773
+ "backgroundImage",
774
+ "backgroundVideo",
775
+ "poster",
776
+ "backgroundVideoRef",
777
+ "width",
778
+ "height",
779
+ "aspectRatio",
780
+ "ariaLabel",
781
+ "actions",
782
+ "onClose",
783
+ "icon",
784
+ "headline",
785
+ "pretitle",
786
+ "pretitleLinesMax",
787
+ "title",
788
+ "titleLinesMax",
789
+ "description",
790
+ "descriptionLinesMax"
791
+ ]);
792
+ const z = me(a), { video: O , videoStatus: R , onVideoControlPress: M } = pe(i, s, l);
793
+ i && (t = [
664
794
  {
665
- Icon: oe(B),
666
- onPress: W,
795
+ Icon: ue(R),
796
+ onPress: M,
667
797
  label: "Video controls",
668
- iconSize: B === "loadingTimeout" ? 16 : 12,
669
- iconColor: y.colors.inverse,
670
- iconBackground: _,
671
- iconBackgroundInverse: _
798
+ iconSize: R === "loadingTimeout" ? 16 : 12,
799
+ iconColor: v.colors.inverse,
800
+ iconBackground: k,
801
+ iconBackgroundInverse: k
672
802
  }
673
803
  ]);
674
- const M = ee(), S = !!i || !!n, H = S ? "0 0 16px rgba(0,0,0,0.4)" : void 0, E = (a == null ? void 0 : a.length) || h, { textPresets: k } = G();
675
- return /* @__PURE__ */ e(F, {
804
+ const G = le(), B = !!a || !!i, X = B ? "0 0 16px rgba(0,0,0,0.4)" : void 0, j = (t == null ? void 0 : t.length) || p, { textPresets: Y } = Q(), F = N.href || N.to || N.onPress, A = oe;
805
+ return /* @__PURE__ */ n(W, {
676
806
  width: o,
677
- height: p,
678
- minWidth: Ee,
679
- minHeight: _e,
680
- aspectRatio: c,
681
- onClose: h,
682
- actions: a,
807
+ height: u,
808
+ minWidth: Ve,
809
+ aspectRatio: h,
683
810
  "aria-label": d,
684
- isInverse: !0,
685
- children: /* @__PURE__ */ e(K, {
686
- borderRadius: y.borderRadii.legacyDisplay,
687
- className: P,
688
- dataAttributes: r,
689
- ref: z,
690
- width: "100%",
691
- minHeight: "100%",
692
- isInverse: !0,
693
- background: i || n ? M ? y.colors.backgroundContainerBrandOverInverse : y.colors.backgroundContainer : void 0,
694
- children: /* @__PURE__ */ t("div", {
695
- className: U,
696
- children: [
697
- /* @__PURE__ */ e(re, {
698
- isInverse: M,
699
- children: /* @__PURE__ */ e("div", {
700
- className: Y,
701
- style: {
702
- zIndex: 0
703
- },
704
- children: n ? D : i ? A : void 0
705
- })
706
- }),
707
- /* @__PURE__ */ t("div", {
708
- className: Z,
709
- style: {
710
- paddingTop: S && !u && !E ? 0 : 24,
711
- zIndex: 1
712
- },
713
- children: [
714
- u ? /* @__PURE__ */ e(w, {
715
- paddingBottom: S ? 0 : 40,
716
- paddingX: 24,
717
- children: u
718
- }) : /* @__PURE__ */ e(w, {
719
- paddingBottom: a != null && a.length || h ? S ? 24 : 64 : 0
720
- }),
721
- /* @__PURE__ */ e(w, {
722
- paddingX: 16,
723
- paddingTop: S ? 40 : 0,
724
- paddingBottom: 24,
725
- className: S ? $ : void 0,
726
- children: /* @__PURE__ */ e(f, {
727
- space: 24,
811
+ className: H,
812
+ children: [
813
+ /* @__PURE__ */ e(ee, {
814
+ borderRadius: v.borderRadii.legacyDisplay,
815
+ className: P,
816
+ dataAttributes: r,
817
+ ref: b,
818
+ width: "100%",
819
+ minHeight: "100%",
820
+ isInverse: !0,
821
+ background: a || i ? G ? v.colors.backgroundContainerBrandOverInverse : v.colors.backgroundContainer : void 0,
822
+ children: /* @__PURE__ */ n(_, _object_spread_props(_object_spread({
823
+ maybe: !0
824
+ }, N), {
825
+ className: E,
826
+ "aria-label": d,
827
+ children: [
828
+ F && /* @__PURE__ */ e("div", {
829
+ className: A
830
+ }),
831
+ /* @__PURE__ */ n("div", {
832
+ className: ae,
833
+ children: [
834
+ /* @__PURE__ */ e(de, {
835
+ isInverse: G,
728
836
  children: /* @__PURE__ */ e("div", {
729
- children: /* @__PURE__ */ t(f, {
730
- space: 8,
731
- children: [
732
- (m || v || T) && /* @__PURE__ */ e("header", {
733
- children: /* @__PURE__ */ t(f, {
734
- space: 16,
837
+ className: ie,
838
+ children: i ? O : a ? z : void 0
839
+ })
840
+ }),
841
+ /* @__PURE__ */ n("div", {
842
+ className: ne,
843
+ style: {
844
+ paddingTop: B && !m && !j ? 0 : 24
845
+ },
846
+ children: [
847
+ m ? /* @__PURE__ */ e(D, {
848
+ paddingBottom: B ? 0 : 40,
849
+ paddingX: 24,
850
+ children: m
851
+ }) : /* @__PURE__ */ e(D, {
852
+ paddingBottom: t != null && t.length || p ? B ? 24 : 64 : 0
853
+ }),
854
+ /* @__PURE__ */ e(D, {
855
+ paddingX: 16,
856
+ paddingTop: B ? 40 : 0,
857
+ paddingBottom: 24,
858
+ className: B ? te : void 0,
859
+ children: /* @__PURE__ */ e(y, {
860
+ space: 24,
861
+ children: /* @__PURE__ */ e("div", {
862
+ children: /* @__PURE__ */ n(y, {
863
+ space: 8,
735
864
  children: [
736
- m,
737
- /* @__PURE__ */ t(f, {
738
- space: 4,
739
- children: [
740
- v && /* @__PURE__ */ e(b, {
741
- forceMobileSizes: !0,
742
- truncate: I,
743
- as: "div",
744
- regular: !0,
745
- textShadow: H,
746
- hyphens: "auto",
747
- children: v
748
- }),
749
- /* @__PURE__ */ e(J, {
750
- desktopSize: 20,
751
- mobileSize: 18,
752
- mobileLineHeight: "24px",
753
- desktopLineHeight: "28px",
754
- truncate: x,
755
- weight: k.cardTitle.weight,
756
- as: "h3",
757
- hyphens: "auto",
758
- children: T
759
- })
760
- ]
865
+ (f || g || C) && /* @__PURE__ */ e("header", {
866
+ children: /* @__PURE__ */ n(y, {
867
+ space: 16,
868
+ children: [
869
+ f,
870
+ /* @__PURE__ */ n(y, {
871
+ space: 4,
872
+ children: [
873
+ g && /* @__PURE__ */ e(I, {
874
+ forceMobileSizes: !0,
875
+ truncate: x,
876
+ as: "div",
877
+ regular: !0,
878
+ textShadow: X,
879
+ hyphens: "auto",
880
+ children: g
881
+ }),
882
+ /* @__PURE__ */ e($, {
883
+ desktopSize: 20,
884
+ mobileSize: 18,
885
+ mobileLineHeight: "24px",
886
+ desktopLineHeight: "28px",
887
+ truncate: S,
888
+ weight: Y.cardTitle.weight,
889
+ as: "h3",
890
+ hyphens: "auto",
891
+ children: C
892
+ })
893
+ ]
894
+ })
895
+ ]
896
+ })
897
+ }),
898
+ c && /* @__PURE__ */ e(I, {
899
+ forceMobileSizes: !0,
900
+ truncate: w,
901
+ as: "p",
902
+ regular: !0,
903
+ textShadow: X,
904
+ hyphens: "auto",
905
+ children: c
761
906
  })
762
907
  ]
763
908
  })
764
- }),
765
- g && /* @__PURE__ */ e(b, {
766
- forceMobileSizes: !0,
767
- truncate: N,
768
- as: "p",
769
- regular: !0,
770
- textShadow: H,
771
- hyphens: "auto",
772
- children: g
773
909
  })
774
- ]
910
+ })
775
911
  })
776
- })
912
+ ]
777
913
  })
778
- })
779
- ]
780
- })
781
- ]
914
+ ]
915
+ })
916
+ ]
917
+ }))
918
+ }),
919
+ /* @__PURE__ */ e(V, {
920
+ onClose: p,
921
+ actions: t,
922
+ type: "media"
782
923
  })
783
- })
924
+ ]
784
925
  });
785
926
  });
786
- export { tr as DataCard, lr as DisplayDataCard, dr as DisplayMediaCard, or as MediaCard, cr as PosterCard, sr as SnapCard };
927
+ export { pr as DataCard, yr as DisplayDataCard, vr as DisplayMediaCard, ur as MediaCard, gr as PosterCard, fr as SnapCard };