@telefonica/mistica 16.36.0 → 16.37.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 (333) hide show
  1. package/css/blau.css +96 -24
  2. package/css/esimflag.css +93 -21
  3. package/css/mistica-common.css +9 -4
  4. package/css/mistica.css +1 -1
  5. package/css/movistar.css +101 -29
  6. package/css/o2-new.css +99 -28
  7. package/css/o2.css +93 -21
  8. package/css/telefonica.css +96 -24
  9. package/css/tu.css +96 -24
  10. package/css/vivo-new.css +96 -24
  11. package/css/vivo.css +96 -24
  12. package/dist/accordion.css-mistica.js +10 -10
  13. package/dist/align.css-mistica.js +1 -1
  14. package/dist/avatar.css-mistica.js +2 -2
  15. package/dist/badge.css-mistica.js +2 -2
  16. package/dist/box.css-mistica.js +13 -13
  17. package/dist/box.js +5 -5
  18. package/dist/boxed.css-mistica.js +24 -24
  19. package/dist/boxed.d.ts +2 -1
  20. package/dist/boxed.js +10 -9
  21. package/dist/button-group.css-mistica.js +4 -4
  22. package/dist/button-group.js +2 -2
  23. package/dist/button-layout.css-mistica.js +18 -18
  24. package/dist/button.css-mistica.js +35 -35
  25. package/dist/callout.css-mistica.js +5 -5
  26. package/dist/card-cover.d.ts +126 -0
  27. package/dist/card-cover.js +185 -0
  28. package/dist/card-data.d.ts +63 -0
  29. package/dist/card-data.js +171 -0
  30. package/dist/card-internal.css-mistica.js +78 -0
  31. package/dist/card-internal.css.d.ts +17 -0
  32. package/dist/card-internal.d.ts +166 -0
  33. package/dist/card-internal.js +1063 -0
  34. package/dist/card-media.d.ts +78 -0
  35. package/dist/card-media.js +163 -0
  36. package/dist/card-naked.d.ts +11 -0
  37. package/dist/card-naked.js +154 -0
  38. package/dist/carousel.css-mistica.js +25 -25
  39. package/dist/checkbox.css-mistica.js +9 -9
  40. package/dist/checkbox.js +2 -2
  41. package/dist/chip.css-mistica.js +15 -15
  42. package/dist/circle.css-mistica.js +1 -1
  43. package/dist/community/advanced-data-card.css-mistica.js +24 -24
  44. package/dist/community/advanced-data-card.d.ts +1 -1
  45. package/dist/community/advanced-data-card.js +7 -7
  46. package/dist/community/blocks.css-mistica.js +1 -1
  47. package/dist/community/example-component.css-mistica.js +1 -1
  48. package/dist/counter.css-mistica.js +9 -9
  49. package/dist/counter.js +8 -8
  50. package/dist/cover-hero-media.js +9 -9
  51. package/dist/cover-hero.css-mistica.js +15 -15
  52. package/dist/credit-card-number-field.css-mistica.js +3 -3
  53. package/dist/date-field.css-mistica.js +1 -1
  54. package/dist/date-time-picker.css-mistica.js +1 -1
  55. package/dist/dialog.css-mistica.js +12 -12
  56. package/dist/dialog.js +14 -14
  57. package/dist/divider.css-mistica.js +2 -2
  58. package/dist/double-field.css-mistica.js +4 -4
  59. package/dist/drawer.css-mistica.js +2 -2
  60. package/dist/empty-state-card.css-mistica.js +1 -1
  61. package/dist/empty-state.css-mistica.js +6 -6
  62. package/dist/fade-in.css-mistica.js +1 -1
  63. package/dist/feedback.css-mistica.js +4 -4
  64. package/dist/fixed-footer-layout.css-mistica.js +10 -10
  65. package/dist/fixed-footer-layout.js +5 -5
  66. package/dist/form.css-mistica.js +1 -1
  67. package/dist/form.js +5 -5
  68. package/dist/grid-layout.css-mistica.js +3 -3
  69. package/dist/grid.css-mistica.js +122 -122
  70. package/dist/header.css-mistica.js +3 -3
  71. package/dist/hero.css-mistica.js +6 -6
  72. package/dist/hooks.d.ts +4 -0
  73. package/dist/hooks.js +94 -83
  74. package/dist/horizontal-scroll.css-mistica.js +1 -1
  75. package/dist/horizontal-scroll.js +2 -2
  76. package/dist/icon-button.css-mistica.js +47 -47
  77. package/dist/icon-button.js +3 -3
  78. package/dist/icons/icon-chevron.css-mistica.js +2 -2
  79. package/dist/icons/icon-error.css-mistica.js +1 -1
  80. package/dist/image.css-mistica.js +5 -5
  81. package/dist/image.d.ts +2 -0
  82. package/dist/image.js +24 -20
  83. package/dist/index.d.ts +18 -3
  84. package/dist/index.js +28 -13
  85. package/dist/inline.css-mistica.js +10 -10
  86. package/dist/list.css-mistica.js +30 -15
  87. package/dist/list.css.d.ts +5 -0
  88. package/dist/list.d.ts +16 -1
  89. package/dist/list.js +158 -99
  90. package/dist/loading-bar.css-mistica.js +1 -1
  91. package/dist/loading-bar.js +2 -2
  92. package/dist/loading-screen.css-mistica.js +9 -9
  93. package/dist/loading-screen.js +3 -3
  94. package/dist/logo.css-mistica.js +5 -5
  95. package/dist/menu.css-mistica.js +14 -14
  96. package/dist/menu.js +7 -7
  97. package/dist/mosaic.css-mistica.js +1 -1
  98. package/dist/navigation-bar.css-mistica.js +32 -32
  99. package/dist/navigation-breadcrumbs.css-mistica.js +3 -3
  100. package/dist/package-version.js +1 -1
  101. package/dist/pin-field.css-mistica.js +9 -9
  102. package/dist/pin-field.js +2 -2
  103. package/dist/popover.css-mistica.js +1 -1
  104. package/dist/progress-bar.css-mistica.js +4 -4
  105. package/dist/progress-bar.js +2 -2
  106. package/dist/radio-button.css-mistica.js +18 -18
  107. package/dist/radio-button.js +5 -5
  108. package/dist/rating.css-mistica.js +4 -4
  109. package/dist/rating.js +8 -8
  110. package/dist/responsive-layout.css-mistica.js +5 -5
  111. package/dist/responsive-layout.js +6 -6
  112. package/dist/screen-reader-only.css-mistica.js +1 -1
  113. package/dist/select.css-mistica.js +18 -18
  114. package/dist/select.js +9 -9
  115. package/dist/sheet-action-row.css-mistica.js +1 -1
  116. package/dist/sheet-common.css-mistica.js +12 -12
  117. package/dist/sheet-info.css-mistica.js +1 -1
  118. package/dist/skeletons.css-mistica.js +6 -6
  119. package/dist/skins/blau.js +50 -14
  120. package/dist/skins/esimflag.js +49 -13
  121. package/dist/skins/movistar.js +54 -18
  122. package/dist/skins/o2-new.js +49 -13
  123. package/dist/skins/o2.js +49 -13
  124. package/dist/skins/skin-contract.css-mistica.js +390 -354
  125. package/dist/skins/skin-contract.css.d.ts +48 -12
  126. package/dist/skins/telefonica.js +50 -14
  127. package/dist/skins/tu.js +50 -14
  128. package/dist/skins/types/colors.d.ts +24 -6
  129. package/dist/skins/vivo-new.js +50 -14
  130. package/dist/skins/vivo.js +50 -14
  131. package/dist/skip-link.css-mistica.js +2 -2
  132. package/dist/slider.css-mistica.js +13 -13
  133. package/dist/slider.js +9 -9
  134. package/dist/snackbar.css-mistica.js +7 -7
  135. package/dist/spinner.css-mistica.js +1 -1
  136. package/dist/stack.css-mistica.js +5 -5
  137. package/dist/stacking-group.css-mistica.js +1 -1
  138. package/dist/stepper.css-mistica.js +8 -8
  139. package/dist/stepper.js +3 -3
  140. package/dist/switch-component.css-mistica.js +37 -37
  141. package/dist/table.css-mistica.js +8 -8
  142. package/dist/table.d.ts +1 -1
  143. package/dist/table.js +8 -8
  144. package/dist/tabs.css-mistica.js +17 -17
  145. package/dist/tag.css-mistica.js +1 -1
  146. package/dist/tag.js +10 -10
  147. package/dist/text-field-base.css-mistica.js +10 -10
  148. package/dist/text-field-base.js +8 -8
  149. package/dist/text-field-components.css-mistica.js +18 -18
  150. package/dist/text-field-components.js +2 -2
  151. package/dist/text-link.css-mistica.js +5 -5
  152. package/dist/text.css-mistica.js +7 -7
  153. package/dist/text.js +7 -7
  154. package/dist/theme-context.css-mistica.js +430 -394
  155. package/dist/theme-context.css.d.ts +48 -12
  156. package/dist/timeline.css-mistica.js +12 -12
  157. package/dist/timer.css-mistica.js +8 -8
  158. package/dist/tooltip.css-mistica.js +7 -7
  159. package/dist/touchable.css-mistica.js +1 -1
  160. package/dist/utils/aspect-ratio-support.css-mistica.js +5 -5
  161. package/dist/utils/aspect-ratio-support.d.ts +5 -0
  162. package/dist/utils/aspect-ratio-support.js +26 -15
  163. package/dist/utils/color.d.ts +11 -0
  164. package/dist/utils/color.js +27 -6
  165. package/dist/utils/headings.d.ts +3 -0
  166. package/dist/video.css-mistica.js +1 -1
  167. package/dist/video.js +2 -2
  168. package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +1 -1
  169. package/dist-es/accordion.css-mistica.js +7 -7
  170. package/dist-es/align.css-mistica.js +1 -1
  171. package/dist-es/avatar.css-mistica.js +2 -2
  172. package/dist-es/badge.css-mistica.js +2 -2
  173. package/dist-es/box.css-mistica.js +13 -13
  174. package/dist-es/box.js +9 -9
  175. package/dist-es/boxed.css-mistica.js +23 -23
  176. package/dist-es/boxed.js +20 -19
  177. package/dist-es/button-group.css-mistica.js +2 -2
  178. package/dist-es/button-group.js +4 -4
  179. package/dist-es/button-layout.css-mistica.js +15 -15
  180. package/dist-es/button.css-mistica.js +22 -22
  181. package/dist-es/callout.css-mistica.js +5 -5
  182. package/dist-es/callout.js +5 -5
  183. package/dist-es/card-cover.js +125 -0
  184. package/dist-es/card-data.js +110 -0
  185. package/dist-es/card-internal.css-mistica.js +22 -0
  186. package/dist-es/card-internal.js +992 -0
  187. package/dist-es/card-media.js +105 -0
  188. package/dist-es/card-naked.js +96 -0
  189. package/dist-es/carousel.css-mistica.js +9 -9
  190. package/dist-es/checkbox.css-mistica.js +8 -8
  191. package/dist-es/checkbox.js +6 -6
  192. package/dist-es/chip.css-mistica.js +13 -13
  193. package/dist-es/circle.css-mistica.js +1 -1
  194. package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
  195. package/dist-es/community/advanced-data-card.js +29 -29
  196. package/dist-es/community/blocks.css-mistica.js +1 -1
  197. package/dist-es/community/example-component.css-mistica.js +1 -1
  198. package/dist-es/counter.css-mistica.js +2 -2
  199. package/dist-es/counter.js +8 -8
  200. package/dist-es/cover-hero-media.js +9 -9
  201. package/dist-es/cover-hero.css-mistica.js +4 -4
  202. package/dist-es/credit-card-number-field.css-mistica.js +3 -3
  203. package/dist-es/date-field.css-mistica.js +1 -1
  204. package/dist-es/date-time-picker.css-mistica.js +1 -1
  205. package/dist-es/dialog.css-mistica.js +5 -5
  206. package/dist-es/dialog.js +31 -31
  207. package/dist-es/divider.css-mistica.js +2 -2
  208. package/dist-es/double-field.css-mistica.js +4 -4
  209. package/dist-es/drawer.css-mistica.js +2 -2
  210. package/dist-es/empty-state-card.css-mistica.js +1 -1
  211. package/dist-es/empty-state.css-mistica.js +6 -6
  212. package/dist-es/empty-state.js +7 -7
  213. package/dist-es/fade-in.css-mistica.js +1 -1
  214. package/dist-es/feedback.css-mistica.js +2 -2
  215. package/dist-es/fixed-footer-layout.css-mistica.js +5 -5
  216. package/dist-es/fixed-footer-layout.js +5 -5
  217. package/dist-es/form.css-mistica.js +1 -1
  218. package/dist-es/form.js +5 -5
  219. package/dist-es/grid-layout.css-mistica.js +3 -3
  220. package/dist-es/grid.css-mistica.js +122 -122
  221. package/dist-es/grid.js +2 -2
  222. package/dist-es/header.css-mistica.js +2 -2
  223. package/dist-es/hero.css-mistica.js +3 -3
  224. package/dist-es/hooks.js +86 -78
  225. package/dist-es/horizontal-scroll.css-mistica.js +1 -1
  226. package/dist-es/horizontal-scroll.js +2 -2
  227. package/dist-es/icon-button.css-mistica.js +45 -45
  228. package/dist-es/icon-button.js +3 -3
  229. package/dist-es/icons/icon-chevron.css-mistica.js +2 -2
  230. package/dist-es/icons/icon-error.css-mistica.js +1 -1
  231. package/dist-es/image.css-mistica.js +4 -4
  232. package/dist-es/image.js +42 -38
  233. package/dist-es/index.js +1887 -1884
  234. package/dist-es/inline.css-mistica.js +10 -10
  235. package/dist-es/list.css-mistica.js +2 -2
  236. package/dist-es/list.js +226 -174
  237. package/dist-es/loading-bar.css-mistica.js +1 -1
  238. package/dist-es/loading-bar.js +6 -6
  239. package/dist-es/loading-screen.css-mistica.js +5 -5
  240. package/dist-es/loading-screen.js +8 -8
  241. package/dist-es/logo.css-mistica.js +5 -5
  242. package/dist-es/menu.css-mistica.js +13 -13
  243. package/dist-es/menu.js +7 -7
  244. package/dist-es/mosaic.css-mistica.js +1 -1
  245. package/dist-es/navigation-bar.css-mistica.js +17 -17
  246. package/dist-es/navigation-breadcrumbs.css-mistica.js +2 -2
  247. package/dist-es/package-version.js +1 -1
  248. package/dist-es/pin-field.css-mistica.js +2 -2
  249. package/dist-es/pin-field.js +8 -8
  250. package/dist-es/popover.css-mistica.js +1 -1
  251. package/dist-es/progress-bar.css-mistica.js +4 -4
  252. package/dist-es/progress-bar.js +10 -10
  253. package/dist-es/radio-button.css-mistica.js +16 -16
  254. package/dist-es/radio-button.js +5 -5
  255. package/dist-es/rating.css-mistica.js +3 -3
  256. package/dist-es/rating.js +12 -12
  257. package/dist-es/responsive-layout.css-mistica.js +5 -5
  258. package/dist-es/responsive-layout.js +15 -15
  259. package/dist-es/screen-reader-only.css-mistica.js +1 -1
  260. package/dist-es/select.css-mistica.js +17 -17
  261. package/dist-es/select.js +15 -15
  262. package/dist-es/sheet-action-row.css-mistica.js +1 -1
  263. package/dist-es/sheet-common.css-mistica.js +2 -2
  264. package/dist-es/sheet-info.css-mistica.js +1 -1
  265. package/dist-es/skeletons.css-mistica.js +5 -5
  266. package/dist-es/skins/blau.js +50 -14
  267. package/dist-es/skins/esimflag.js +49 -13
  268. package/dist-es/skins/movistar.js +54 -18
  269. package/dist-es/skins/o2-new.js +49 -13
  270. package/dist-es/skins/o2.js +49 -13
  271. package/dist-es/skins/skin-contract.css-mistica.js +390 -354
  272. package/dist-es/skins/telefonica.js +50 -14
  273. package/dist-es/skins/tu.js +52 -16
  274. package/dist-es/skins/vivo-new.js +52 -16
  275. package/dist-es/skins/vivo.js +52 -16
  276. package/dist-es/skip-link.css-mistica.js +2 -2
  277. package/dist-es/slider.css-mistica.js +11 -11
  278. package/dist-es/slider.js +9 -9
  279. package/dist-es/snackbar.css-mistica.js +5 -5
  280. package/dist-es/spinner.css-mistica.js +1 -1
  281. package/dist-es/stack.css-mistica.js +5 -5
  282. package/dist-es/stacking-group.css-mistica.js +1 -1
  283. package/dist-es/stepper.css-mistica.js +3 -3
  284. package/dist-es/stepper.js +3 -3
  285. package/dist-es/style.css +1 -1
  286. package/dist-es/switch-component.css-mistica.js +29 -29
  287. package/dist-es/table.css-mistica.js +8 -8
  288. package/dist-es/table.js +12 -12
  289. package/dist-es/tabs.css-mistica.js +14 -14
  290. package/dist-es/tag.css-mistica.js +1 -1
  291. package/dist-es/tag.js +17 -17
  292. package/dist-es/text-field-base.css-mistica.js +2 -2
  293. package/dist-es/text-field-base.js +16 -16
  294. package/dist-es/text-field-components.css-mistica.js +5 -5
  295. package/dist-es/text-field-components.js +4 -4
  296. package/dist-es/text-link.css-mistica.js +5 -5
  297. package/dist-es/text.css-mistica.js +7 -7
  298. package/dist-es/text.js +6 -6
  299. package/dist-es/theme-context.css-mistica.js +430 -394
  300. package/dist-es/timeline.css-mistica.js +11 -11
  301. package/dist-es/timeline.js +4 -4
  302. package/dist-es/timer.css-mistica.js +7 -7
  303. package/dist-es/tooltip.css-mistica.js +2 -2
  304. package/dist-es/touchable.css-mistica.js +1 -1
  305. package/dist-es/utils/aspect-ratio-support.css-mistica.js +4 -4
  306. package/dist-es/utils/aspect-ratio-support.js +31 -23
  307. package/dist-es/utils/color.js +23 -5
  308. package/dist-es/video.css-mistica.js +1 -1
  309. package/dist-es/video.js +5 -5
  310. package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +1 -1
  311. package/package.json +1 -1
  312. package/dist/card.css-mistica.js +0 -106
  313. package/dist/card.css.d.ts +0 -33
  314. package/dist/card.d.ts +0 -299
  315. package/dist/card.js +0 -1694
  316. package/dist/highlighted-card.css-mistica.js +0 -30
  317. package/dist/highlighted-card.css.d.ts +0 -7
  318. package/dist/highlighted-card.css.ts.vanilla.css-mistica.js +0 -11
  319. package/dist/highlighted-card.d.ts +0 -34
  320. package/dist/highlighted-card.js +0 -253
  321. package/dist/maybe-dismissable.css-mistica.js +0 -21
  322. package/dist/maybe-dismissable.css.ts.vanilla.css-mistica.js +0 -11
  323. package/dist/maybe-dismissable.js +0 -108
  324. package/dist-es/card.css-mistica.js +0 -8
  325. package/dist-es/card.js +0 -1599
  326. package/dist-es/highlighted-card.css-mistica.js +0 -7
  327. package/dist-es/highlighted-card.css.ts.vanilla.css-mistica.js +0 -2
  328. package/dist-es/highlighted-card.js +0 -198
  329. package/dist-es/maybe-dismissable.css-mistica.js +0 -4
  330. package/dist-es/maybe-dismissable.css.ts.vanilla.css-mistica.js +0 -2
  331. package/dist-es/maybe-dismissable.js +0 -45
  332. /package/dist/{card.css.ts.vanilla.css-mistica.js → card-internal.css.ts.vanilla.css-mistica.js} +0 -0
  333. /package/dist-es/{card.css.ts.vanilla.css-mistica.js → card-internal.css.ts.vanilla.css-mistica.js} +0 -0
package/dist-es/card.js DELETED
@@ -1,1599 +0,0 @@
1
- "use client";
2
- function _define_property(obj, key, value) {
3
- if (key in obj) {
4
- Object.defineProperty(obj, key, {
5
- value: value,
6
- enumerable: true,
7
- configurable: true,
8
- writable: true
9
- });
10
- } else {
11
- obj[key] = value;
12
- }
13
- return obj;
14
- }
15
- function _object_spread(target) {
16
- for(var i = 1; i < arguments.length; i++){
17
- var source = arguments[i] != null ? arguments[i] : {};
18
- var ownKeys = Object.keys(source);
19
- if (typeof Object.getOwnPropertySymbols === "function") {
20
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
21
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
22
- }));
23
- }
24
- ownKeys.forEach(function(key) {
25
- _define_property(target, key, source[key]);
26
- });
27
- }
28
- return target;
29
- }
30
- function ownKeys(object, enumerableOnly) {
31
- var keys = Object.keys(object);
32
- if (Object.getOwnPropertySymbols) {
33
- var symbols = Object.getOwnPropertySymbols(object);
34
- if (enumerableOnly) {
35
- symbols = symbols.filter(function(sym) {
36
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
37
- });
38
- }
39
- keys.push.apply(keys, symbols);
40
- }
41
- return keys;
42
- }
43
- function _object_spread_props(target, source) {
44
- source = source != null ? source : {};
45
- if (Object.getOwnPropertyDescriptors) {
46
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
47
- } else {
48
- ownKeys(Object(source)).forEach(function(key) {
49
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
50
- });
51
- }
52
- return target;
53
- }
54
- function _object_without_properties(source, excluded) {
55
- if (source == null) return {};
56
- var target = _object_without_properties_loose(source, excluded);
57
- var key, i;
58
- if (Object.getOwnPropertySymbols) {
59
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
60
- for(i = 0; i < sourceSymbolKeys.length; i++){
61
- key = sourceSymbolKeys[i];
62
- if (excluded.indexOf(key) >= 0) continue;
63
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
64
- target[key] = source[key];
65
- }
66
- }
67
- return target;
68
- }
69
- function _object_without_properties_loose(source, excluded) {
70
- if (source == null) return {};
71
- var target = {};
72
- var sourceKeys = Object.keys(source);
73
- var key, i;
74
- for(i = 0; i < sourceKeys.length; i++){
75
- key = sourceKeys[i];
76
- if (excluded.indexOf(key) >= 0) continue;
77
- target[key] = source[key];
78
- }
79
- return target;
80
- }
81
- import { jsx as e, jsxs as s, Fragment as J } from "react/jsx-runtime";
82
- import * as I from "react";
83
- import we from "./tag.js";
84
- import me from "./stack.js";
85
- import ie from "./box.js";
86
- import { Text as te, Text2 as F, Text6 as Ye, Text3 as Ze } from "./text.js";
87
- import { text2 as Se, text4 as be } from "./text-props.js";
88
- import { Boxed as pe, InternalBoxed as Be } from "./boxed.js";
89
- import xe from "./button-group.js";
90
- import ge from "./image.js";
91
- import { BaseTouchable as Q } from "./touchable.js";
92
- import { vars as p } from "./skins/skin-contract.css-mistica.js";
93
- import { cardContainer as Le, touchableContainer as U, touchable as Y, boxed as ne, touchableMediaCardOverlay as Pe, mediaCard as Ce, mediaCardContent as ea, mediaCardAsset as ke, touchableNakedMediaOverlay as Ie, circularMediaOverlay as Me, nakedCardContent as Ge, touchableCardOverlay as ue, dataCard as aa, vars as ze, dataCardTopActionsWithoutIcon as da, actions as Oe, snapCard as ra, displayCardContainer as Ae, displayCardBackground as je, displayCardContent as Ve, displayCardContentWrapper as ia, displayCardGradient as De, displayCardContentWithAsset as ta, displayCardContentWithTopContent as na, posterCardContentWrapper as oa, cardContentContainer as sa, flexColumn as Ee, touchableCardOverlayInverse as Ne, touchableCardOverlayMedia as We } from "./card.css-mistica.js";
94
- import { vars as K } from "./image.css-mistica.js";
95
- import { useTheme as ae } from "./hooks.js";
96
- import { IconButton as la, ToggleIconButton as ca } from "./icon-button.js";
97
- import ha from "./generated/mistica-icons/icon-close-regular.js";
98
- import va from "./generated/mistica-icons/icon-pause-filled.js";
99
- import ma from "./generated/mistica-icons/icon-play-filled.js";
100
- import { combineRefs as ua } from "./utils/common.js";
101
- import ya from "./spinner.js";
102
- import fa from "./video.js";
103
- import { useThemeVariant as ba, useIsInverseVariant as Fe, ThemeVariant as Te } from "./theme-variant-context.js";
104
- import ee from "classnames";
105
- import He from "./inline.js";
106
- import { getPrefixedDataAttributes as pa } from "./utils/dom.js";
107
- import { isRunningAcceptanceTest as xa } from "./utils/platform.js";
108
- import { applyCssVars as q } from "./utils/css.js";
109
- import { closeButtonLabel as ga, pauseIconButtonLabel as Ca, playIconButtonLabel as Na } from "./text-tokens.js";
110
- import { isBiggerHeading as Z } from "./utils/headings.js";
111
- const H = ()=>{
112
- const [a, d] = I.useState(""), r = I.useCallback((n)=>{
113
- n && d((process.env.NODE_ENV === "test" ? n.textContent : n.innerText) || "");
114
- }, []);
115
- return {
116
- text: a,
117
- ref: r
118
- };
119
- }, Xe = (a, d, r)=>{
120
- const { texts: n, t: v } = ae(), t = a ? [
121
- ...a
122
- ] : [];
123
- return d && t.push({
124
- label: r || n.closeButtonLabel || v(ga),
125
- onPress: d,
126
- Icon: ha
127
- }), t;
128
- }, Ta = (a)=>{
129
- const d = ba();
130
- return a.Icon ? /* @__PURE__ */ e(la, _object_spread_props(_object_spread({}, a), {
131
- "aria-label": a.label,
132
- small: !0,
133
- type: "neutral",
134
- backgroundType: "transparent"
135
- })) : /* @__PURE__ */ e(ca, _object_spread_props(_object_spread({}, a), {
136
- checkedProps: _object_spread_props(_object_spread({}, a.checkedProps), {
137
- "aria-label": a.checkedProps.label,
138
- type: d === "media" ? "neutral" : "brand",
139
- backgroundType: "solid"
140
- }),
141
- uncheckedProps: _object_spread_props(_object_spread({}, a.uncheckedProps), {
142
- "aria-label": a.uncheckedProps.label,
143
- type: "neutral",
144
- backgroundType: "transparent"
145
- }),
146
- small: !0
147
- }));
148
- }, oe = (param)=>{
149
- let { actions: a, padding: d = 16, onClose: r, variant: n = "default", closeButtonLabel: v } = param;
150
- const t = Xe(a, r, v);
151
- return t.length > 0 ? /* @__PURE__ */ e(Te, {
152
- variant: n,
153
- children: /* @__PURE__ */ e("div", {
154
- style: {
155
- position: "absolute",
156
- right: d,
157
- top: d,
158
- zIndex: 3
159
- },
160
- children: /* @__PURE__ */ e(He, {
161
- space: 16,
162
- dataAttributes: {
163
- testid: "topActions"
164
- },
165
- children: t.map((l, o)=>"Icon" in l || "checkedProps" in l ? /* @__PURE__ */ e(Ta, _object_spread({}, l), o) : l)
166
- })
167
- })
168
- }) : /* @__PURE__ */ e(J, {});
169
- }, Ra = (a)=>a ? typeof a == "number" ? a : ({
170
- "1:1": 1,
171
- "16:9": 16 / 9,
172
- "7:10": 7 / 10,
173
- "9:10": 9 / 10,
174
- auto: 0
175
- })[a] : 0, L = /*#__PURE__*/ I.forwardRef((param, m)=>{
176
- let { children: a, width: d, height: r, aspectRatio: n, dataAttributes: v, className: t, "aria-label": i, "aria-labelledby": l, "aria-description": o, "aria-describedby": b } = param;
177
- const c = d && r ? void 0 : Ra(n);
178
- return(// aria-description should be vaild, but this eslint rule is complaining about it
179
- // eslint-disable-next-line jsx-a11y/role-supports-aria-props
180
- /* @__PURE__ */ e("section", _object_spread_props(_object_spread({}, pa(v)), {
181
- ref: m,
182
- "aria-label": i,
183
- "aria-labelledby": l,
184
- "aria-description": o,
185
- "aria-describedby": b,
186
- className: ee(t, Le),
187
- style: _object_spread({
188
- width: d || "100%",
189
- height: r || "100%"
190
- }, c ? q({
191
- [ze.aspectRatio]: String(c)
192
- }) : {}),
193
- children: a
194
- })));
195
- }), _e = (a)=>{
196
- const d = typeof a == "string" ? a : a == null ? void 0 : a.src, r = typeof a == "string" || a == null ? void 0 : a.srcSet;
197
- return /* @__PURE__ */ e(ge, {
198
- width: "100%",
199
- height: "100%",
200
- src: d || "",
201
- srcSet: r
202
- });
203
- }, wa = {
204
- loading: {
205
- showSpinner: "loadingTimeout",
206
- play: "playing",
207
- pause: "paused",
208
- fail: "error"
209
- },
210
- loadingTimeout: {
211
- play: "playing",
212
- pause: "paused",
213
- fail: "error",
214
- reset: "loading"
215
- },
216
- playing: {
217
- pause: "paused",
218
- reset: "loading",
219
- fail: "error"
220
- },
221
- paused: {
222
- play: "playing",
223
- reset: "loading",
224
- fail: "error"
225
- },
226
- error: {
227
- reset: "loading"
228
- }
229
- }, Sa = (a, d)=>wa[a][d] || a, Ba = (param)=>{
230
- let { color: a } = param;
231
- return /* @__PURE__ */ e(ya, {
232
- color: a,
233
- size: 16,
234
- delay: "0"
235
- });
236
- }, ka = (param)=>{
237
- let { color: a } = param;
238
- return /* @__PURE__ */ e(va, {
239
- color: a,
240
- size: 12
241
- });
242
- }, Ia = (param)=>{
243
- let { color: a } = param;
244
- return /* @__PURE__ */ e(ma, {
245
- color: a,
246
- size: 12
247
- });
248
- }, $e = (a, d, r)=>{
249
- const { texts: n, t: v } = ae(), t = I.useRef(null), [i, l] = I.useReducer(Sa, "loading");
250
- I.useEffect(()=>{
251
- var f;
252
- const c = setTimeout(()=>l("showSpinner"), 2e3);
253
- return (f = t.current) == null || f.load(), ()=>{
254
- clearTimeout(c), l("reset");
255
- };
256
- }, [
257
- a
258
- ]);
259
- const o = I.useMemo(()=>a !== void 0 ? /* @__PURE__ */ e(fa, {
260
- ref: ua(t, r),
261
- src: a,
262
- width: "100%",
263
- height: "100%",
264
- poster: d,
265
- onError: ()=>l("fail"),
266
- onPause: ()=>l("pause"),
267
- onPlay: ()=>l("play")
268
- }) : void 0, [
269
- r,
270
- a,
271
- d
272
- ]), b = ()=>{
273
- const c = t.current;
274
- c && (i === "loading" ? l("showSpinner") : i === "paused" ? c.play() : i === "playing" && c.pause());
275
- };
276
- if (i === "error") return {
277
- video: o
278
- };
279
- const m = o ? {
280
- uncheckedProps: {
281
- Icon: i === "loadingTimeout" && !xa() ? Ba : ka,
282
- label: i === "loadingTimeout" ? "" : n.pauseIconButtonLabel || v(Ca)
283
- },
284
- checkedProps: {
285
- Icon: Ia,
286
- label: n.playIconButtonLabel || v(Na)
287
- },
288
- onChange: b,
289
- disabled: i === "loadingTimeout",
290
- checked: i === "paused"
291
- } : void 0;
292
- return {
293
- video: o,
294
- videoAction: m
295
- };
296
- }, Re = (param)=>{
297
- let { headline: a, headlineRef: d, pretitle: r, pretitleAs: n, pretitleLinesMax: v, title: t, titleAs: i = "h3", titleLinesMax: l, subtitle: o, subtitleLinesMax: b, description: m, descriptionLinesMax: c, extra: f, extraRef: g, button: T, buttonLink: x, slotAlignment: C } = param;
298
- const { textPresets: h } = ae();
299
- return /* @__PURE__ */ s("div", {
300
- className: sa,
301
- children: [
302
- /* @__PURE__ */ s("div", {
303
- className: Ee,
304
- style: C ? {
305
- height: "100%"
306
- } : void 0,
307
- children: [
308
- Z(i, n) ? /* @__PURE__ */ s(J, {
309
- children: [
310
- t && /* @__PURE__ */ e("div", {
311
- style: {
312
- paddingBottom: o || m ? 4 : 0
313
- },
314
- "data-testid": "title",
315
- children: /* @__PURE__ */ e(te, _object_spread_props(_object_spread({}, be), {
316
- truncate: l,
317
- weight: h.cardTitle.weight,
318
- as: i,
319
- hyphens: "auto",
320
- children: t
321
- }))
322
- }),
323
- a && /* @__PURE__ */ e("div", {
324
- ref: d,
325
- style: {
326
- order: -2,
327
- paddingBottom: r || t || o || m ? 8 : 0
328
- },
329
- "data-testid": "headline",
330
- children: typeof a == "string" ? /* @__PURE__ */ e(we, {
331
- type: "promo",
332
- children: a
333
- }) : a
334
- }),
335
- r && /* @__PURE__ */ e("div", {
336
- style: {
337
- order: -1,
338
- paddingBottom: 4
339
- },
340
- "data-testid": "pretitle",
341
- children: /* @__PURE__ */ e(F, {
342
- truncate: v,
343
- as: n,
344
- regular: !0,
345
- hyphens: "auto",
346
- children: r
347
- })
348
- })
349
- ]
350
- }) : /* @__PURE__ */ e(J, {
351
- children: /* @__PURE__ */ s(J, {
352
- children: [
353
- r && /* @__PURE__ */ e("div", {
354
- style: {
355
- paddingBottom: 4
356
- },
357
- "data-testid": "pretitle",
358
- children: /* @__PURE__ */ e(F, {
359
- truncate: v,
360
- as: n,
361
- regular: !0,
362
- hyphens: "auto",
363
- children: r
364
- })
365
- }),
366
- a && /* @__PURE__ */ e("div", {
367
- ref: d,
368
- style: {
369
- order: -1,
370
- paddingBottom: r || t || o || m ? 8 : 0
371
- },
372
- "data-testid": "headline",
373
- children: typeof a == "string" ? /* @__PURE__ */ e(we, {
374
- type: "promo",
375
- children: a
376
- }) : a
377
- }),
378
- t && /* @__PURE__ */ e("div", {
379
- style: {
380
- paddingBottom: o || m ? 4 : 0
381
- },
382
- "data-testid": "title",
383
- children: /* @__PURE__ */ e(te, _object_spread_props(_object_spread({}, be), {
384
- truncate: l,
385
- weight: h.cardTitle.weight,
386
- as: i,
387
- hyphens: "auto",
388
- children: t
389
- }))
390
- })
391
- ]
392
- })
393
- }),
394
- o && /* @__PURE__ */ e("div", {
395
- style: {
396
- paddingBottom: m ? 4 : 0
397
- },
398
- "data-testid": "subtitle",
399
- children: /* @__PURE__ */ e(F, {
400
- truncate: b,
401
- as: "div",
402
- regular: !0,
403
- hyphens: "auto",
404
- children: o
405
- })
406
- }),
407
- m && // this is tricky, when headline exists, the 8px padding is added by it.
408
- // Otherwise, only 4px are added by title|pretitle|subtitle, so we need to add 4px more
409
- /* @__PURE__ */ e("div", {
410
- style: {
411
- paddingTop: r || t || o ? 4 : 0
412
- },
413
- "data-testid": "description",
414
- children: /* @__PURE__ */ e(F, {
415
- truncate: c,
416
- as: "p",
417
- regular: !0,
418
- color: p.colors.textSecondary,
419
- hyphens: "auto",
420
- children: m
421
- })
422
- }),
423
- f && /* @__PURE__ */ s("div", {
424
- ref: g,
425
- style: C ? {
426
- display: "flex",
427
- flexDirection: "column",
428
- height: "100%"
429
- } : void 0,
430
- "data-testid": "slot",
431
- children: [
432
- C === "bottom" && /* @__PURE__ */ e("div", {
433
- style: {
434
- flexGrow: 1
435
- }
436
- }),
437
- f,
438
- C === "content" && /* @__PURE__ */ e("div", {
439
- style: {
440
- flexGrow: 1
441
- }
442
- })
443
- ]
444
- })
445
- ]
446
- }),
447
- (T || x) && /* @__PURE__ */ e("div", {
448
- className: Oe,
449
- children: /* @__PURE__ */ e(xe, {
450
- primaryButton: T,
451
- link: x
452
- })
453
- })
454
- ]
455
- });
456
- }, td = /*#__PURE__*/ I.forwardRef((_param, X)=>{
457
- var { media: a, asset: d, headline: r, pretitle: n, pretitleAs: v, pretitleLinesMax: t, subtitle: i, subtitleLinesMax: l, title: o, titleAs: b = "h3", titleLinesMax: m, description: c, descriptionLinesMax: f, extra: g, actions: T, button: x, buttonLink: C, dataAttributes: h, "aria-label": w, "aria-labelledby": k, "aria-description": u, "aria-describedby": B, onClose: V, closeButtonLabel: G, slotAlignment: z } = _param, R = _object_without_properties(_param, [
458
- "media",
459
- "asset",
460
- "headline",
461
- "pretitle",
462
- "pretitleAs",
463
- "pretitleLinesMax",
464
- "subtitle",
465
- "subtitleLinesMax",
466
- "title",
467
- "titleAs",
468
- "titleLinesMax",
469
- "description",
470
- "descriptionLinesMax",
471
- "extra",
472
- "actions",
473
- "button",
474
- "buttonLink",
475
- "dataAttributes",
476
- "aria-label",
477
- "aria-labelledby",
478
- "aria-description",
479
- "aria-describedby",
480
- "onClose",
481
- "closeButtonLabel",
482
- "slotAlignment"
483
- ]);
484
- const y = !!(R.href || R.to || R.onPress), { text: S, ref: E } = H(), { text: O, ref: A } = H(), j = w || (k ? void 0 : (Z(b, v) ? [
485
- o,
486
- S,
487
- n,
488
- i,
489
- c,
490
- O
491
- ] : [
492
- n,
493
- S,
494
- o,
495
- i,
496
- c,
497
- O
498
- ]).filter(Boolean).join(" "));
499
- return /* @__PURE__ */ s(L, {
500
- dataAttributes: _object_spread({
501
- "component-name": "MediaCard",
502
- testid: "MediaCard"
503
- }, h),
504
- ref: X,
505
- "aria-label": y ? void 0 : w,
506
- "aria-labelledby": y ? void 0 : k,
507
- "aria-description": y ? void 0 : u,
508
- "aria-describedby": y ? void 0 : B,
509
- className: U,
510
- children: [
511
- /* @__PURE__ */ e(Q, _object_spread_props(_object_spread({
512
- maybe: !0
513
- }, R), {
514
- className: Y,
515
- "aria-label": y ? j : void 0,
516
- "aria-labelledby": y ? k : void 0,
517
- "aria-description": y ? u : void 0,
518
- "aria-describedby": y ? B : void 0,
519
- children: /* @__PURE__ */ s(pe, {
520
- className: ne,
521
- width: "100%",
522
- height: "100%",
523
- children: [
524
- y && /* @__PURE__ */ e("div", {
525
- className: Pe
526
- }),
527
- /* @__PURE__ */ s("div", {
528
- className: Ce,
529
- "aria-hidden": y,
530
- children: [
531
- /* @__PURE__ */ e("div", {
532
- style: q({
533
- [K.mediaBorderRadius]: "0px"
534
- }),
535
- children: a
536
- }),
537
- /* @__PURE__ */ e("div", {
538
- className: ea,
539
- children: /* @__PURE__ */ e(Re, {
540
- headline: r,
541
- headlineRef: E,
542
- pretitle: n,
543
- pretitleAs: v,
544
- pretitleLinesMax: t,
545
- title: o,
546
- titleAs: b,
547
- titleLinesMax: m,
548
- subtitle: i,
549
- subtitleLinesMax: l,
550
- description: c,
551
- descriptionLinesMax: f,
552
- extra: g,
553
- extraRef: A,
554
- button: x,
555
- buttonLink: C,
556
- slotAlignment: z
557
- })
558
- }),
559
- d && /* @__PURE__ */ e("div", {
560
- className: ke,
561
- style: q({
562
- [K.mediaBorderRadius]: p.borderRadii.mediaSmall
563
- }),
564
- "data-testid": "asset",
565
- children: d
566
- })
567
- ]
568
- })
569
- ]
570
- })
571
- })),
572
- /* @__PURE__ */ e(oe, {
573
- onClose: V,
574
- closeButtonLabel: G,
575
- actions: T,
576
- variant: "media"
577
- })
578
- ]
579
- });
580
- }), nd = /*#__PURE__*/ I.forwardRef((_param, X)=>{
581
- var { media: a, asset: d, headline: r, pretitle: n, pretitleAs: v, pretitleLinesMax: t, subtitle: i, subtitleLinesMax: l, title: o, titleAs: b = "h3", titleLinesMax: m, description: c, descriptionLinesMax: f, extra: g, actions: T, button: x, buttonLink: C, dataAttributes: h, "aria-label": w, "aria-labelledby": k, "aria-description": u, "aria-describedby": B, onClose: V, closeButtonLabel: G, slotAlignment: z } = _param, R = _object_without_properties(_param, [
582
- "media",
583
- "asset",
584
- "headline",
585
- "pretitle",
586
- "pretitleAs",
587
- "pretitleLinesMax",
588
- "subtitle",
589
- "subtitleLinesMax",
590
- "title",
591
- "titleAs",
592
- "titleLinesMax",
593
- "description",
594
- "descriptionLinesMax",
595
- "extra",
596
- "actions",
597
- "button",
598
- "buttonLink",
599
- "dataAttributes",
600
- "aria-label",
601
- "aria-labelledby",
602
- "aria-description",
603
- "aria-describedby",
604
- "onClose",
605
- "closeButtonLabel",
606
- "slotAlignment"
607
- ]);
608
- const y = !!(R.href || R.to || R.onPress), S = a && a.type === ge && a.props.circular, { text: E, ref: O } = H(), { text: A, ref: j } = H(), N = w || (k ? void 0 : (Z(b, v) ? [
609
- o,
610
- E,
611
- n,
612
- i,
613
- c,
614
- A
615
- ] : [
616
- n,
617
- E,
618
- o,
619
- i,
620
- c,
621
- A
622
- ]).filter(Boolean).join(" "));
623
- return /* @__PURE__ */ s(L, {
624
- ref: X,
625
- dataAttributes: _object_spread({
626
- "component-name": "NakedCard",
627
- testid: "NakedCard"
628
- }, h),
629
- "aria-label": y ? void 0 : w,
630
- "aria-labelledby": y ? void 0 : k,
631
- "aria-description": y ? void 0 : u,
632
- "aria-describedby": y ? void 0 : B,
633
- className: y ? U : void 0,
634
- children: [
635
- /* @__PURE__ */ e(Q, _object_spread_props(_object_spread({
636
- maybe: !0
637
- }, R), {
638
- className: Y,
639
- "aria-label": y ? N : void 0,
640
- "aria-labelledby": y ? k : void 0,
641
- "aria-description": y ? u : void 0,
642
- "aria-describedby": y ? B : void 0,
643
- children: /* @__PURE__ */ s("div", {
644
- className: Ce,
645
- "aria-hidden": y,
646
- children: [
647
- /* @__PURE__ */ s("div", {
648
- style: {
649
- position: "relative"
650
- },
651
- children: [
652
- y && /* @__PURE__ */ e("div", {
653
- className: ee(Ie, {
654
- [Me]: S
655
- })
656
- }),
657
- a
658
- ]
659
- }),
660
- /* @__PURE__ */ e("div", {
661
- className: Ge,
662
- style: {
663
- paddingTop: a ? 16 : 0
664
- },
665
- children: /* @__PURE__ */ e(Re, {
666
- headline: r,
667
- headlineRef: O,
668
- pretitle: n,
669
- pretitleAs: v,
670
- pretitleLinesMax: t,
671
- title: o,
672
- titleAs: b,
673
- titleLinesMax: m,
674
- subtitle: i,
675
- subtitleLinesMax: l,
676
- description: c,
677
- descriptionLinesMax: f,
678
- extra: g,
679
- extraRef: j,
680
- button: x,
681
- buttonLink: C,
682
- slotAlignment: z
683
- })
684
- }),
685
- d && /* @__PURE__ */ e("div", {
686
- className: ke,
687
- style: q({
688
- [K.mediaBorderRadius]: p.borderRadii.mediaSmall
689
- }),
690
- "data-testid": "asset",
691
- children: d
692
- })
693
- ]
694
- })
695
- })),
696
- /* @__PURE__ */ e(oe, {
697
- onClose: V,
698
- closeButtonLabel: G,
699
- actions: T,
700
- variant: "media"
701
- })
702
- ]
703
- });
704
- }), od = /*#__PURE__*/ I.forwardRef((_param, C)=>{
705
- var { media: a, title: d, titleAs: r = "h3", titleLinesMax: n, subtitle: v, subtitleLinesMax: t, description: i, descriptionLinesMax: l, extra: o, dataAttributes: b, "aria-label": m, "aria-labelledby": c, "aria-description": f, "aria-describedby": g, slotAlignment: T } = _param, x = _object_without_properties(_param, [
706
- "media",
707
- "title",
708
- "titleAs",
709
- "titleLinesMax",
710
- "subtitle",
711
- "subtitleLinesMax",
712
- "description",
713
- "descriptionLinesMax",
714
- "extra",
715
- "dataAttributes",
716
- "aria-label",
717
- "aria-labelledby",
718
- "aria-description",
719
- "aria-describedby",
720
- "slotAlignment"
721
- ]);
722
- const h = !!(x.href || x.to || x.onPress), w = a && a.type === ge && a.props.circular, { textPresets: k } = ae(), { text: u, ref: B } = H(), V = m || (c ? void 0 : [
723
- d,
724
- v,
725
- i,
726
- u
727
- ].filter(Boolean).join(" "));
728
- return /* @__PURE__ */ e(L, {
729
- ref: C,
730
- dataAttributes: _object_spread({
731
- "component-name": "SmallNakedCard",
732
- testid: "SmallNakedCard"
733
- }, b),
734
- "aria-label": h ? void 0 : m,
735
- "aria-labelledby": h ? void 0 : c,
736
- "aria-description": h ? void 0 : f,
737
- "aria-describedby": h ? void 0 : g,
738
- className: h ? U : void 0,
739
- children: /* @__PURE__ */ e(Q, _object_spread_props(_object_spread({
740
- maybe: !0
741
- }, x), {
742
- className: Y,
743
- "aria-label": h ? V : void 0,
744
- "aria-labelledby": h ? c : void 0,
745
- "aria-description": h ? f : void 0,
746
- "aria-describedby": h ? g : void 0,
747
- children: /* @__PURE__ */ s("div", {
748
- className: Ce,
749
- "aria-hidden": h,
750
- children: [
751
- a && /* @__PURE__ */ s("div", {
752
- style: {
753
- position: "relative"
754
- },
755
- children: [
756
- h && /* @__PURE__ */ e("div", {
757
- className: ee(Ie, {
758
- [Me]: w
759
- })
760
- }),
761
- a
762
- ]
763
- }),
764
- /* @__PURE__ */ s("div", {
765
- className: Ge,
766
- style: {
767
- paddingTop: a ? 16 : 0,
768
- height: T ? "100%" : void 0
769
- },
770
- children: [
771
- /* @__PURE__ */ e("div", {
772
- children: /* @__PURE__ */ s(me, {
773
- space: 4,
774
- children: [
775
- d && /* @__PURE__ */ e(te, _object_spread_props(_object_spread({}, Se), {
776
- truncate: n,
777
- weight: k.cardTitle.weight,
778
- as: r,
779
- hyphens: "auto",
780
- dataAttributes: {
781
- testid: "title"
782
- },
783
- children: d
784
- })),
785
- v && /* @__PURE__ */ e(F, {
786
- truncate: t,
787
- regular: !0,
788
- as: "p",
789
- hyphens: "auto",
790
- dataAttributes: {
791
- testid: "subtitle"
792
- },
793
- children: v
794
- }),
795
- i && /* @__PURE__ */ e(F, {
796
- truncate: l,
797
- regular: !0,
798
- as: "p",
799
- color: p.colors.textSecondary,
800
- hyphens: "auto",
801
- dataAttributes: {
802
- testid: "description"
803
- },
804
- children: i
805
- })
806
- ]
807
- })
808
- }),
809
- o && /* @__PURE__ */ s("div", {
810
- ref: B,
811
- "data-testid": "slot",
812
- style: T ? {
813
- display: "flex",
814
- flexDirection: "column",
815
- height: "100%"
816
- } : void 0,
817
- children: [
818
- T === "bottom" && /* @__PURE__ */ e("div", {
819
- style: {
820
- flexGrow: 1
821
- }
822
- }),
823
- o,
824
- T === "content" && /* @__PURE__ */ e("div", {
825
- style: {
826
- flexGrow: 1
827
- }
828
- })
829
- ]
830
- })
831
- ]
832
- })
833
- ]
834
- })
835
- }))
836
- });
837
- }), sd = /*#__PURE__*/ I.forwardRef((_param, X)=>{
838
- var { asset: a, headline: d, pretitle: r, pretitleAs: n, pretitleLinesMax: v, title: t, titleAs: i = "h3", titleLinesMax: l, subtitle: o, subtitleLinesMax: b, description: m, descriptionLinesMax: c, extra: f, actions: g, button: T, buttonLink: x, dataAttributes: C, "aria-label": h, "aria-labelledby": w, "aria-description": k, "aria-describedby": u, onClose: B, closeButtonLabel: V, aspectRatio: G, slotAlignment: z } = _param, R = _object_without_properties(_param, [
839
- "asset",
840
- "headline",
841
- "pretitle",
842
- "pretitleAs",
843
- "pretitleLinesMax",
844
- "title",
845
- "titleAs",
846
- "titleLinesMax",
847
- "subtitle",
848
- "subtitleLinesMax",
849
- "description",
850
- "descriptionLinesMax",
851
- "extra",
852
- "actions",
853
- "button",
854
- "buttonLink",
855
- "dataAttributes",
856
- "aria-label",
857
- "aria-labelledby",
858
- "aria-description",
859
- "aria-describedby",
860
- "onClose",
861
- "closeButtonLabel",
862
- "aspectRatio",
863
- "slotAlignment"
864
- ]);
865
- const y = !!a || !!d, S = !!(R.href || R.to || R.onPress), { text: E, ref: O } = H(), { text: A, ref: j } = H(), N = Xe(g, B), M = h || (w ? void 0 : (Z(i, n) ? [
866
- t,
867
- E,
868
- r,
869
- o,
870
- m,
871
- A
872
- ] : [
873
- r,
874
- E,
875
- t,
876
- o,
877
- m,
878
- A
879
- ]).filter(Boolean).join(" "));
880
- return /* @__PURE__ */ s(L, {
881
- dataAttributes: _object_spread({
882
- "component-name": "DataCard",
883
- testid: "DataCard"
884
- }, C),
885
- ref: X,
886
- "aria-label": S ? void 0 : h,
887
- "aria-labelledby": S ? void 0 : w,
888
- "aria-description": S ? void 0 : k,
889
- "aria-describedby": S ? void 0 : u,
890
- className: U,
891
- aspectRatio: G,
892
- children: [
893
- /* @__PURE__ */ e(Q, _object_spread_props(_object_spread({
894
- maybe: !0
895
- }, R), {
896
- className: Y,
897
- "aria-label": S ? M : void 0,
898
- "aria-labelledby": S ? w : void 0,
899
- "aria-description": S ? k : void 0,
900
- "aria-describedby": S ? u : void 0,
901
- children: /* @__PURE__ */ s(pe, {
902
- className: ne,
903
- width: "100%",
904
- height: "100%",
905
- children: [
906
- S && /* @__PURE__ */ e("div", {
907
- className: ue
908
- }),
909
- /* @__PURE__ */ s("div", {
910
- className: aa,
911
- "aria-hidden": S,
912
- style: z ? {
913
- height: "100%"
914
- } : void 0,
915
- children: [
916
- /* @__PURE__ */ s(He, {
917
- space: 0,
918
- children: [
919
- /* @__PURE__ */ s(me, {
920
- space: 16,
921
- children: [
922
- a && /* @__PURE__ */ e("div", {
923
- style: q({
924
- [K.mediaBorderRadius]: p.borderRadii.mediaSmall
925
- }),
926
- "data-testid": "asset",
927
- children: a
928
- }),
929
- /* @__PURE__ */ e(Re, {
930
- headline: d,
931
- headlineRef: O,
932
- pretitle: r,
933
- pretitleAs: n,
934
- pretitleLinesMax: v,
935
- title: t,
936
- titleAs: i,
937
- titleLinesMax: l,
938
- subtitle: o,
939
- subtitleLinesMax: b,
940
- description: m,
941
- descriptionLinesMax: c
942
- })
943
- ]
944
- }),
945
- !y && /* @__PURE__ */ e("div", {
946
- style: q({
947
- [ze.topActionsCount]: String(N.length)
948
- }),
949
- className: da
950
- })
951
- ]
952
- }),
953
- f && /* @__PURE__ */ e(J, {
954
- children: /* @__PURE__ */ s("div", {
955
- ref: j,
956
- "data-testid": "slot",
957
- style: z ? {
958
- display: "flex",
959
- flexDirection: "column",
960
- height: "100%"
961
- } : void 0,
962
- children: [
963
- z === "bottom" && /* @__PURE__ */ e("div", {
964
- style: {
965
- flexGrow: 1
966
- }
967
- }),
968
- f,
969
- z === "content" && /* @__PURE__ */ e("div", {
970
- style: {
971
- flexGrow: 1
972
- }
973
- })
974
- ]
975
- })
976
- }),
977
- (T || x) && /* @__PURE__ */ e("div", {
978
- className: Oe,
979
- children: /* @__PURE__ */ e(xe, {
980
- primaryButton: T,
981
- link: x
982
- })
983
- })
984
- ]
985
- })
986
- ]
987
- })
988
- })),
989
- /* @__PURE__ */ e(oe, {
990
- onClose: B,
991
- closeButtonLabel: V,
992
- actions: g,
993
- variant: "default"
994
- })
995
- ]
996
- });
997
- }), ld = /*#__PURE__*/ I.forwardRef((_param, w)=>{
998
- var { asset: a, title: d, titleAs: r = "h3", titleLinesMax: n, subtitle: v, subtitleLinesMax: t, description: i, descriptionLinesMax: l, dataAttributes: o, "aria-label": b, "aria-labelledby": m, "aria-description": c, "aria-describedby": f, extra: g, isInverse: T = !1, aspectRatio: x, slotAlignment: C } = _param, h = _object_without_properties(_param, [
999
- "asset",
1000
- "title",
1001
- "titleAs",
1002
- "titleLinesMax",
1003
- "subtitle",
1004
- "subtitleLinesMax",
1005
- "description",
1006
- "descriptionLinesMax",
1007
- "dataAttributes",
1008
- "aria-label",
1009
- "aria-labelledby",
1010
- "aria-description",
1011
- "aria-describedby",
1012
- "extra",
1013
- "isInverse",
1014
- "aspectRatio",
1015
- "slotAlignment"
1016
- ]);
1017
- const { textPresets: k } = ae(), u = !!(h.href || h.to || h.onPress), B = T ? Ne : ue, { text: V, ref: G } = H(), z = b || (f ? void 0 : [
1018
- d,
1019
- v,
1020
- i,
1021
- V
1022
- ].filter(Boolean).join(" "));
1023
- return /* @__PURE__ */ e(L, {
1024
- dataAttributes: _object_spread({
1025
- "component-name": "SnapCard",
1026
- testid: "SnapCard"
1027
- }, o),
1028
- ref: w,
1029
- className: U,
1030
- aspectRatio: x,
1031
- "aria-label": u ? void 0 : b,
1032
- "aria-labelledby": u ? void 0 : m,
1033
- "aria-description": u ? void 0 : c,
1034
- "aria-describedby": u ? void 0 : f,
1035
- children: /* @__PURE__ */ e(Q, _object_spread_props(_object_spread({
1036
- maybe: !0
1037
- }, h), {
1038
- className: Y,
1039
- "aria-label": u ? z : void 0,
1040
- "aria-labelledby": u ? m : void 0,
1041
- "aria-description": u ? c : void 0,
1042
- "aria-describedby": u ? f : void 0,
1043
- children: /* @__PURE__ */ s(pe, {
1044
- className: ne,
1045
- variant: T ? "inverse" : "default",
1046
- width: "100%",
1047
- height: "100%",
1048
- children: [
1049
- u && /* @__PURE__ */ e("div", {
1050
- className: B
1051
- }),
1052
- /* @__PURE__ */ s("section", {
1053
- className: ra,
1054
- "aria-hidden": u,
1055
- style: C ? {
1056
- height: "100%"
1057
- } : void 0,
1058
- children: [
1059
- /* @__PURE__ */ s("div", {
1060
- children: [
1061
- a && /* @__PURE__ */ e("div", {
1062
- style: q({
1063
- [K.mediaBorderRadius]: p.borderRadii.mediaSmall
1064
- }),
1065
- "data-testid": "asset",
1066
- children: /* @__PURE__ */ e(ie, {
1067
- paddingBottom: 16,
1068
- children: a
1069
- })
1070
- }),
1071
- /* @__PURE__ */ s(me, {
1072
- space: 4,
1073
- children: [
1074
- d && /* @__PURE__ */ e(te, _object_spread_props(_object_spread({}, Se), {
1075
- truncate: n,
1076
- weight: k.cardTitle.weight,
1077
- as: r,
1078
- hyphens: "auto",
1079
- dataAttributes: {
1080
- testid: "title"
1081
- },
1082
- children: d
1083
- })),
1084
- v && /* @__PURE__ */ e(F, {
1085
- truncate: t,
1086
- regular: !0,
1087
- color: p.colors.textPrimary,
1088
- as: "p",
1089
- hyphens: "auto",
1090
- dataAttributes: {
1091
- testid: "subtitle"
1092
- },
1093
- children: v
1094
- }),
1095
- i && /* @__PURE__ */ e(F, {
1096
- truncate: l,
1097
- regular: !0,
1098
- color: p.colors.textSecondary,
1099
- as: "p",
1100
- hyphens: "auto",
1101
- dataAttributes: {
1102
- testid: "description"
1103
- },
1104
- children: i
1105
- })
1106
- ]
1107
- })
1108
- ]
1109
- }),
1110
- g && /* @__PURE__ */ s("div", {
1111
- ref: G,
1112
- "data-testid": "slot",
1113
- style: C ? {
1114
- display: "flex",
1115
- flexDirection: "column",
1116
- height: "100%"
1117
- } : void 0,
1118
- children: [
1119
- C === "bottom" && /* @__PURE__ */ e("div", {
1120
- style: {
1121
- flexGrow: 1
1122
- }
1123
- }),
1124
- g,
1125
- C === "content" && /* @__PURE__ */ e("div", {
1126
- style: {
1127
- flexGrow: 1
1128
- }
1129
- })
1130
- ]
1131
- })
1132
- ]
1133
- })
1134
- ]
1135
- })
1136
- }))
1137
- });
1138
- }), qe = (param)=>{
1139
- let { title: a, titleAs: d = "h3", headline: r, pretitle: n, pretitleAs: v, subtitle: t, description: i, extra: l, headlineRef: o, extraRef: b } = param;
1140
- return /* @__PURE__ */ s("div", {
1141
- className: Ee,
1142
- children: [
1143
- Z(d, v) ? /* @__PURE__ */ s(J, {
1144
- children: [
1145
- a && /* @__PURE__ */ e("div", {
1146
- style: {
1147
- paddingBottom: t || i ? 4 : 0
1148
- },
1149
- "data-testid": "title",
1150
- children: a
1151
- }),
1152
- r && /* @__PURE__ */ e("div", {
1153
- ref: o,
1154
- style: {
1155
- order: -2,
1156
- paddingBottom: n || a || t || i ? 16 : 0
1157
- },
1158
- "data-testid": "headline",
1159
- children: r
1160
- }),
1161
- n && /* @__PURE__ */ e("div", {
1162
- style: {
1163
- order: -1,
1164
- paddingBottom: 4
1165
- },
1166
- "data-testid": "pretitle",
1167
- children: n
1168
- })
1169
- ]
1170
- }) : /* @__PURE__ */ s(J, {
1171
- children: [
1172
- n && /* @__PURE__ */ e("div", {
1173
- style: {
1174
- paddingBottom: 4
1175
- },
1176
- "data-testid": "pretitle",
1177
- children: n
1178
- }),
1179
- r && /* @__PURE__ */ e("div", {
1180
- ref: o,
1181
- style: {
1182
- order: -1,
1183
- paddingBottom: n || a || t || i ? 16 : 0
1184
- },
1185
- "data-testid": "headline",
1186
- children: r
1187
- }),
1188
- a && /* @__PURE__ */ e("div", {
1189
- style: {
1190
- paddingBottom: t || i ? 4 : 0
1191
- },
1192
- "data-testid": "title",
1193
- children: a
1194
- })
1195
- ]
1196
- }),
1197
- t && /* @__PURE__ */ e("div", {
1198
- style: {
1199
- paddingBottom: i ? 4 : 0
1200
- },
1201
- "data-testid": "subtitle",
1202
- children: t
1203
- }),
1204
- i && // this is tricky, the padding between a headline and a description is 16px
1205
- // but the padding between a title|pretitle|subtitle and a description is 8px (4px + 4px)
1206
- /* @__PURE__ */ e("div", {
1207
- style: {
1208
- paddingTop: n || a || t ? 4 : 0
1209
- },
1210
- "data-testid": "description",
1211
- children: i
1212
- }),
1213
- l && /* @__PURE__ */ e("div", {
1214
- ref: b,
1215
- "data-testid": "slot",
1216
- children: l
1217
- })
1218
- ]
1219
- });
1220
- }, Je = /*#__PURE__*/ I.forwardRef((_param, A)=>{
1221
- var { isInverse: a, backgroundImage: d, backgroundVideo: r, backgroundVideoRef: n, poster: v, asset: t, headline: i, pretitle: l, pretitleAs: o, pretitleLinesMax: b, title: m, titleAs: c = "h3", titleLinesMax: f, description: g, descriptionLinesMax: T, extra: x, button: C, secondaryButton: h, onClose: w, closeButtonLabel: k, actions: u, buttonLink: B, dataAttributes: V, width: G, height: z, aspectRatio: R, "aria-label": X, "aria-labelledby": y, "aria-description": S, "aria-describedby": E } = _param, O = _object_without_properties(_param, [
1222
- "isInverse",
1223
- "backgroundImage",
1224
- "backgroundVideo",
1225
- "backgroundVideoRef",
1226
- "poster",
1227
- "asset",
1228
- "headline",
1229
- "pretitle",
1230
- "pretitleAs",
1231
- "pretitleLinesMax",
1232
- "title",
1233
- "titleAs",
1234
- "titleLinesMax",
1235
- "description",
1236
- "descriptionLinesMax",
1237
- "extra",
1238
- "button",
1239
- "secondaryButton",
1240
- "onClose",
1241
- "closeButtonLabel",
1242
- "actions",
1243
- "buttonLink",
1244
- "dataAttributes",
1245
- "width",
1246
- "height",
1247
- "aspectRatio",
1248
- "aria-label",
1249
- "aria-labelledby",
1250
- "aria-description",
1251
- "aria-describedby"
1252
- ]);
1253
- const j = d !== void 0, N = r !== void 0, M = _e(d), { video: ye, videoAction: se } = $e(r, v, n), { text: de, ref: le } = H(), { text: ce, ref: he } = H();
1254
- N && (u = se ? [
1255
- se
1256
- ] : []);
1257
- const ve = Fe(), _ = j || N, $ = _ ? "0 0 16px rgba(0,0,0,0.4)" : void 0, P = (u == null ? void 0 : u.length) || w, D = !!(O.href || O.to || O.onPress), fe = j || N ? We : a ? Ne : ue, W = X || (y ? void 0 : (Z(c, o) ? [
1258
- m,
1259
- de,
1260
- l,
1261
- g,
1262
- ce
1263
- ] : [
1264
- l,
1265
- de,
1266
- m,
1267
- g,
1268
- ce
1269
- ]).filter(Boolean).join(" "));
1270
- return /* @__PURE__ */ s(L, {
1271
- dataAttributes: V,
1272
- ref: A,
1273
- width: G,
1274
- height: z,
1275
- aspectRatio: R,
1276
- "aria-label": D ? void 0 : X,
1277
- "aria-labelledby": D ? void 0 : y,
1278
- "aria-description": D ? void 0 : S,
1279
- "aria-describedby": D ? void 0 : E,
1280
- className: U,
1281
- children: [
1282
- /* @__PURE__ */ e(Q, _object_spread_props(_object_spread({
1283
- maybe: !0
1284
- }, O), {
1285
- className: Y,
1286
- "aria-label": D ? W : void 0,
1287
- "aria-labelledby": D ? y : void 0,
1288
- "aria-description": D ? S : void 0,
1289
- "aria-describedby": D ? E : void 0,
1290
- children: /* @__PURE__ */ s(Be, {
1291
- borderRadius: p.borderRadii.legacyDisplay,
1292
- className: ne,
1293
- width: "100%",
1294
- height: "100%",
1295
- background: j || N ? ve ? p.colors.backgroundContainerBrandOverInverse : p.colors.backgroundContainer : void 0,
1296
- variant: j || N ? "media" : a ? "inverse" : "default",
1297
- children: [
1298
- D && /* @__PURE__ */ e("div", {
1299
- className: fe
1300
- }),
1301
- /* @__PURE__ */ s("div", {
1302
- className: Ae,
1303
- "aria-hidden": D,
1304
- children: [
1305
- (j || N) && /* @__PURE__ */ e(Te, {
1306
- variant: ve ? "inverse" : "default",
1307
- children: /* @__PURE__ */ e("div", {
1308
- className: je,
1309
- children: N ? ye : M
1310
- })
1311
- }),
1312
- /* @__PURE__ */ s("div", {
1313
- className: Ve,
1314
- style: {
1315
- paddingTop: _ && !t && !P && !N ? 0 : 24
1316
- },
1317
- children: [
1318
- t ? /* @__PURE__ */ e("div", {
1319
- style: q({
1320
- [K.mediaBorderRadius]: p.borderRadii.mediaSmall
1321
- }),
1322
- "data-testid": "asset",
1323
- children: /* @__PURE__ */ e(ie, {
1324
- paddingBottom: _ ? 0 : 40,
1325
- paddingX: 24,
1326
- children: t
1327
- })
1328
- }) : /* @__PURE__ */ e(ie, {
1329
- paddingBottom: P || N ? _ ? 24 : 64 : 0
1330
- }),
1331
- /* @__PURE__ */ e("div", {
1332
- className: ee(ia, {
1333
- [De]: _
1334
- }),
1335
- children: /* @__PURE__ */ s(me, {
1336
- space: 24,
1337
- children: [
1338
- /* @__PURE__ */ e(qe, {
1339
- title: m ? /* @__PURE__ */ e(Ye, {
1340
- forceMobileSizes: !0,
1341
- truncate: f,
1342
- as: c,
1343
- textShadow: $,
1344
- hyphens: "auto",
1345
- children: m
1346
- }) : void 0,
1347
- titleAs: c,
1348
- headline: i,
1349
- pretitle: l ? /* @__PURE__ */ e(F, {
1350
- forceMobileSizes: !0,
1351
- truncate: b,
1352
- as: o,
1353
- regular: !0,
1354
- textShadow: $,
1355
- children: l
1356
- }) : void 0,
1357
- pretitleAs: o,
1358
- description: g ? /* @__PURE__ */ e(Ze, {
1359
- forceMobileSizes: !0,
1360
- truncate: T,
1361
- as: "p",
1362
- regular: !0,
1363
- color: _ ? p.colors.textPrimary : p.colors.textSecondary,
1364
- textShadow: $,
1365
- hyphens: "auto",
1366
- children: g
1367
- }) : void 0,
1368
- extra: x,
1369
- headlineRef: le,
1370
- extraRef: he
1371
- }),
1372
- (C || h || B) && /* @__PURE__ */ e(xe, {
1373
- primaryButton: C,
1374
- secondaryButton: h,
1375
- link: B
1376
- })
1377
- ]
1378
- })
1379
- })
1380
- ]
1381
- })
1382
- ]
1383
- })
1384
- ]
1385
- })
1386
- })),
1387
- /* @__PURE__ */ e(oe, {
1388
- onClose: w,
1389
- closeButtonLabel: k,
1390
- actions: u,
1391
- variant: j || N ? "media" : a ? "inverse" : "default"
1392
- })
1393
- ]
1394
- });
1395
- }), cd = /*#__PURE__*/ I.forwardRef((_param, r)=>{
1396
- var { dataAttributes: a } = _param, d = _object_without_properties(_param, [
1397
- "dataAttributes"
1398
- ]);
1399
- return /* @__PURE__ */ e(Je, _object_spread_props(_object_spread({}, d), {
1400
- ref: r,
1401
- isInverse: !0,
1402
- dataAttributes: _object_spread({
1403
- "component-name": "DisplayMediaCard",
1404
- testid: "DisplayMediaCard"
1405
- }, a)
1406
- }));
1407
- }), hd = /*#__PURE__*/ I.forwardRef((_param, r)=>{
1408
- var { dataAttributes: a } = _param, d = _object_without_properties(_param, [
1409
- "dataAttributes"
1410
- ]);
1411
- return /* @__PURE__ */ e(Je, _object_spread_props(_object_spread({}, d), {
1412
- ref: r,
1413
- dataAttributes: _object_spread({
1414
- "component-name": "DisplayDataCard",
1415
- testid: "DisplayDataCard"
1416
- }, a)
1417
- }));
1418
- }), vd = /*#__PURE__*/ I.forwardRef((_param, j)=>{
1419
- var { dataAttributes: a, backgroundImage: d, backgroundVideo: r, poster: n, backgroundVideoRef: v, width: t, height: i, aspectRatio: l = "7:10", "aria-label": o, "aria-labelledby": b, "aria-description": m, "aria-describedby": c, actions: f, onClose: g, closeButtonLabel: T, asset: x, headline: C, pretitle: h, pretitleAs: w, pretitleLinesMax: k, title: u, titleAs: B = "h3", titleLinesMax: V, subtitle: G, subtitleLinesMax: z, description: R, descriptionLinesMax: X, extra: y, variant: S, isInverse: E, backgroundColor: O } = _param, A = _object_without_properties(_param, [
1420
- "dataAttributes",
1421
- "backgroundImage",
1422
- "backgroundVideo",
1423
- "poster",
1424
- "backgroundVideoRef",
1425
- "width",
1426
- "height",
1427
- "aspectRatio",
1428
- "aria-label",
1429
- "aria-labelledby",
1430
- "aria-description",
1431
- "aria-describedby",
1432
- "actions",
1433
- "onClose",
1434
- "closeButtonLabel",
1435
- "asset",
1436
- "headline",
1437
- "pretitle",
1438
- "pretitleAs",
1439
- "pretitleLinesMax",
1440
- "title",
1441
- "titleAs",
1442
- "titleLinesMax",
1443
- "subtitle",
1444
- "subtitleLinesMax",
1445
- "description",
1446
- "descriptionLinesMax",
1447
- "extra",
1448
- "variant",
1449
- "isInverse",
1450
- "backgroundColor"
1451
- ]);
1452
- const N = d !== void 0, M = r !== void 0, ye = _e(d), { video: se, videoAction: de } = $e(r, n, v), { text: le, ref: ce } = H(), { text: he, ref: ve } = H();
1453
- M && (f = de ? [
1454
- de
1455
- ] : []);
1456
- const _ = Fe(), $ = N || M, P = $ ? "0 0 16px rgba(0,0,0,0.4)" : void 0, D = (f == null ? void 0 : f.length) || g, { textPresets: fe } = ae(), W = !!(A.href || A.to || A.onPress), re = S || (E ? "inverse" : "default"), Ke = ()=>re === "media" || N || M ? _ ? p.colors.backgroundContainerBrandOverInverse : p.colors.backgroundContainer : O || ({
1457
- default: p.colors.backgroundContainer,
1458
- inverse: _ ? p.colors.backgroundContainerBrandOverInverse : p.colors.backgroundBrand,
1459
- alternative: p.colors.backgroundAlternative
1460
- })[re], Qe = N || M ? We : re === "inverse" ? Ne : ue, Ue = o || (b ? void 0 : (Z(B, w) ? [
1461
- u,
1462
- le,
1463
- h,
1464
- G,
1465
- R,
1466
- he
1467
- ] : [
1468
- h,
1469
- le,
1470
- u,
1471
- G,
1472
- R,
1473
- he
1474
- ]).filter(Boolean).join(" "));
1475
- return /* @__PURE__ */ s(L, {
1476
- width: t,
1477
- height: i,
1478
- dataAttributes: _object_spread({
1479
- "component-name": "PosterCard",
1480
- testid: "PosterCard"
1481
- }, a),
1482
- ref: j,
1483
- aspectRatio: l,
1484
- className: U,
1485
- "aria-label": W ? void 0 : o,
1486
- "aria-labelledby": W ? void 0 : b,
1487
- "aria-description": W ? void 0 : m,
1488
- "aria-describedby": W ? void 0 : c,
1489
- children: [
1490
- /* @__PURE__ */ e(Q, _object_spread_props(_object_spread({
1491
- maybe: !0
1492
- }, A), {
1493
- className: Y,
1494
- "aria-label": W ? Ue : void 0,
1495
- "aria-labelledby": W ? b : void 0,
1496
- "aria-description": W ? m : void 0,
1497
- "aria-describedby": W ? c : void 0,
1498
- children: /* @__PURE__ */ s(Be, {
1499
- borderRadius: p.borderRadii.legacyDisplay,
1500
- className: ne,
1501
- width: "100%",
1502
- height: "100%",
1503
- background: Ke(),
1504
- variant: N || M ? "media" : N || M || re === "inverse" ? "inverse" : "default",
1505
- children: [
1506
- W && /* @__PURE__ */ e("div", {
1507
- className: Qe
1508
- }),
1509
- /* @__PURE__ */ s("div", {
1510
- className: Ae,
1511
- "aria-hidden": W,
1512
- children: [
1513
- (N || M) && /* @__PURE__ */ e(Te, {
1514
- variant: _ ? "inverse" : "default",
1515
- children: /* @__PURE__ */ e("div", {
1516
- className: je,
1517
- children: M ? se : ye
1518
- })
1519
- }),
1520
- /* @__PURE__ */ s("div", {
1521
- className: ee(Ve, $ && !x && !D && !M ? void 0 : x ? ta : na),
1522
- children: [
1523
- x ? /* @__PURE__ */ e("div", {
1524
- style: q({
1525
- [K.mediaBorderRadius]: p.borderRadii.mediaSmall
1526
- }),
1527
- "data-testid": "asset",
1528
- children: /* @__PURE__ */ e(ie, {
1529
- paddingBottom: $ ? 0 : 40,
1530
- paddingX: {
1531
- mobile: 16,
1532
- desktop: 24
1533
- },
1534
- children: x
1535
- })
1536
- }) : /* @__PURE__ */ e(ie, {
1537
- paddingBottom: D || M ? $ ? 24 : 64 : 0
1538
- }),
1539
- /* @__PURE__ */ e("div", {
1540
- className: ee(oa, {
1541
- [De]: $
1542
- }),
1543
- children: /* @__PURE__ */ e(qe, {
1544
- title: u ? /* @__PURE__ */ e(te, _object_spread_props(_object_spread({}, be), {
1545
- truncate: V,
1546
- weight: fe.cardTitle.weight,
1547
- as: B,
1548
- children: u
1549
- })) : void 0,
1550
- titleAs: B,
1551
- headline: C,
1552
- pretitle: h ? /* @__PURE__ */ e(F, {
1553
- forceMobileSizes: !0,
1554
- truncate: k,
1555
- as: w,
1556
- regular: !0,
1557
- textShadow: P,
1558
- children: h
1559
- }) : void 0,
1560
- pretitleAs: w,
1561
- subtitle: G ? /* @__PURE__ */ e(F, {
1562
- forceMobileSizes: !0,
1563
- truncate: z,
1564
- as: "div",
1565
- regular: !0,
1566
- textShadow: P,
1567
- children: G
1568
- }) : void 0,
1569
- description: R ? /* @__PURE__ */ e(F, {
1570
- forceMobileSizes: !0,
1571
- truncate: X,
1572
- as: "p",
1573
- regular: !0,
1574
- textShadow: P,
1575
- color: $ ? p.colors.textPrimary : p.colors.textSecondary,
1576
- children: R
1577
- }) : void 0,
1578
- headlineRef: ce,
1579
- extra: y,
1580
- extraRef: ve
1581
- })
1582
- })
1583
- ]
1584
- })
1585
- ]
1586
- })
1587
- ]
1588
- })
1589
- })),
1590
- /* @__PURE__ */ e(oe, {
1591
- onClose: g,
1592
- closeButtonLabel: T,
1593
- actions: f,
1594
- variant: N || M ? "media" : re === "inverse" ? "inverse" : "default"
1595
- })
1596
- ]
1597
- });
1598
- });
1599
- export { Ta as CardActionIconButton, Ba as CardActionSpinner, oe as CardActionsGroup, sd as DataCard, hd as DisplayDataCard, cd as DisplayMediaCard, td as MediaCard, nd as NakedCard, vd as PosterCard, od as SmallNakedCard, ld as SnapCard, H as useInnerText, $e as useVideoWithControls };