@bonniernews/dn-design-system-web 32.7.43 → 32.7.45

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 (337) hide show
  1. package/.prettierignore +10 -0
  2. package/.prettierrc +20 -1
  3. package/CHANGELOG.md +14 -0
  4. package/assets/types/shared-props.ts +6 -6
  5. package/assets/types/teaser-props.ts +20 -20
  6. package/components/article-body-image/README.md +1 -1
  7. package/components/article-top-image/README.md +1 -1
  8. package/components/blocked-content/README.md +1 -1
  9. package/components/blocked-content/blocked-content.js +16 -19
  10. package/components/buddy-menu/README.md +1 -1
  11. package/components/button/README.md +3 -4
  12. package/components/button/button-interactions.js +11 -14
  13. package/components/button/button-types.ts +29 -36
  14. package/components/button-toggle/README.md +1 -1
  15. package/components/byline/README.md +1 -1
  16. package/components/byline/byline-interaction.js +5 -5
  17. package/components/byline-list/README.md +1 -1
  18. package/components/byline-list/byline-list.js +3 -6
  19. package/components/checkbox/README.md +1 -1
  20. package/components/direkt-circle/README.md +1 -1
  21. package/components/direkt-header/README.md +1 -1
  22. package/components/disclaimer/README.md +1 -1
  23. package/components/divider/README.md +1 -1
  24. package/components/empty-state/README.md +1 -1
  25. package/components/factbox/README.md +35 -0
  26. package/components/factbox/factbox.js +6 -9
  27. package/components/footer/README.md +1 -1
  28. package/components/game-header/README.md +1 -1
  29. package/components/group-header/README-njk.md +2 -2
  30. package/components/group-header/README.md +2 -2
  31. package/components/image-caption/README.md +1 -1
  32. package/components/link-box/README.md +1 -1
  33. package/components/list-item/README.md +70 -0
  34. package/components/list-item/list-item-types.ts +4 -3
  35. package/components/list-item/list-item.js +5 -8
  36. package/components/mask/README.md +1 -1
  37. package/components/modal/README.md +1 -1
  38. package/components/modal/modal.js +20 -24
  39. package/components/pagination/README.md +1 -1
  40. package/components/pictogram/README.md +1 -1
  41. package/components/pill/README.md +1 -1
  42. package/components/profile-header/README.md +1 -1
  43. package/components/quote/README.md +1 -1
  44. package/components/radio-button/README.md +1 -1
  45. package/components/spinner/README.md +1 -1
  46. package/components/switch/README.md +1 -1
  47. package/components/tag-header/README.md +1 -1
  48. package/components/teaser-card/{README-NJK.md → README-njk.md} +1 -1
  49. package/components/teaser-card/README.md +2 -2
  50. package/components/teaser-centered/README.md +2 -2
  51. package/components/teaser-counter/README.md +2 -2
  52. package/components/teaser-dot/README.md +1 -1
  53. package/components/teaser-footer/README.md +1 -1
  54. package/components/teaser-image/README.md +1 -1
  55. package/components/teaser-large/{README-NJK.md → README-njk.md} +1 -1
  56. package/components/teaser-large/README.md +2 -2
  57. package/components/teaser-list-swipe/README.md +2 -2
  58. package/components/teaser-list-vertical/README-njk.md +0 -1
  59. package/components/teaser-list-vertical/README.md +1 -1
  60. package/components/teaser-list-vertical/teaser-list-vertical.js +7 -10
  61. package/components/teaser-longlife/README.md +1 -1
  62. package/components/teaser-native/{README-NJK.md → README-njk.md} +1 -1
  63. package/components/teaser-native/README.md +1 -1
  64. package/components/teaser-onsite/{README-NJK.md → README-njk.md} +1 -1
  65. package/components/teaser-onsite/README.md +2 -2
  66. package/components/teaser-package/README.md +1 -1
  67. package/components/teaser-right-now/README.md +2 -2
  68. package/components/teaser-slideshow/{README-NJK.md → README-njk.md} +1 -1
  69. package/components/teaser-slideshow/README.md +3 -3
  70. package/components/teaser-split/README-container-njk.md +1 -1
  71. package/components/teaser-split/README-njk.md +2 -2
  72. package/components/teaser-standard/README-njk.md +1 -1
  73. package/components/teaser-standard/README.md +2 -2
  74. package/components/teaser-standard/teaser-standard.js +11 -14
  75. package/components/teaser-swipe-card/README.md +2 -2
  76. package/components/teaser-text-on-image/README.md +2 -2
  77. package/components/teaser-tipsa/{README-NJK.md → README-njk.md} +1 -1
  78. package/components/teaser-tipsa/README.md +2 -2
  79. package/components/text-button/README.md +1 -1
  80. package/components/text-button-toggle/README.md +1 -1
  81. package/components/text-button-toggle/text-button-toggle.js +7 -10
  82. package/components/text-input/README.md +1 -1
  83. package/components/text-input/text-input-interactions.js +16 -16
  84. package/components/text-input/text-input.js +10 -10
  85. package/components/thematic-break/README.md +1 -1
  86. package/components/tooltip/README.md +13 -5
  87. package/components/tooltip/tooltip.js +11 -17
  88. package/components/video-caption/README.md +1 -1
  89. package/helpers/formatClassString.ts +2 -2
  90. package/index.d.ts +1 -1
  91. package/package.json +5 -1
  92. package/preact/assets/article-image/article-image.d.ts +1 -1
  93. package/preact/assets/form-field/form-field.d.ts +2 -2
  94. package/preact/components/article-body-image/article-body-image.d.ts +2 -2
  95. package/preact/components/article-body-image/article-body-image.js +1 -5
  96. package/preact/components/article-body-image/article-body-image.js.map +2 -2
  97. package/preact/components/article-top-image/article-top-image.d.ts +2 -2
  98. package/preact/components/article-top-image/article-top-image.js +10 -6
  99. package/preact/components/article-top-image/article-top-image.js.map +2 -2
  100. package/preact/components/blocked-content/blocked-content.d.ts +2 -2
  101. package/preact/components/blocked-content/blocked-content.js +23 -22
  102. package/preact/components/blocked-content/blocked-content.js.map +2 -2
  103. package/preact/components/buddy-menu/buddy-menu.d.ts +2 -2
  104. package/preact/components/buddy-menu/buddy-menu.js +22 -17
  105. package/preact/components/buddy-menu/buddy-menu.js.map +2 -2
  106. package/preact/components/button/button-base.js.map +2 -2
  107. package/preact/components/button/button.d.ts +4 -4
  108. package/preact/components/button/button.js +22 -17
  109. package/preact/components/button/button.js.map +2 -2
  110. package/preact/components/button-toggle/button-toggle.d.ts +2 -2
  111. package/preact/components/button-toggle/button-toggle.js.map +2 -2
  112. package/preact/components/byline/byline.d.ts +2 -2
  113. package/preact/components/byline/byline.js +185 -170
  114. package/preact/components/byline/byline.js.map +3 -3
  115. package/preact/components/byline-list/byline-list.d.ts +4 -4
  116. package/preact/components/byline-list/byline-list.js +32 -21
  117. package/preact/components/byline-list/byline-list.js.map +2 -2
  118. package/preact/components/checkbox/checkbox.d.ts +2 -2
  119. package/preact/components/checkbox/checkbox.js +9 -1
  120. package/preact/components/checkbox/checkbox.js.map +2 -2
  121. package/preact/components/direkt-circle/direkt-circle.d.ts +2 -2
  122. package/preact/components/direkt-circle/direkt-circle.js.map +2 -2
  123. package/preact/components/direkt-header/direkt-header.d.ts +2 -2
  124. package/preact/components/direkt-header/direkt-header.js.map +2 -2
  125. package/preact/components/disclaimer/disclaimer.d.ts +3 -3
  126. package/preact/components/disclaimer/disclaimer.js.map +2 -2
  127. package/preact/components/divider/divider.d.ts +2 -2
  128. package/preact/components/divider/divider.js +1 -5
  129. package/preact/components/divider/divider.js.map +2 -2
  130. package/preact/components/empty-state/empty-state.d.ts +2 -2
  131. package/preact/components/empty-state/empty-state.js +31 -23
  132. package/preact/components/empty-state/empty-state.js.map +2 -2
  133. package/preact/components/factbox/factbox.d.ts +5 -5
  134. package/preact/components/factbox/factbox.js +448 -293
  135. package/preact/components/factbox/factbox.js.map +4 -4
  136. package/preact/components/footer/footer.d.ts +2 -2
  137. package/preact/components/footer/footer.js +18 -9
  138. package/preact/components/footer/footer.js.map +2 -2
  139. package/preact/components/game-header/game-header.d.ts +3 -3
  140. package/preact/components/game-header/game-header.js +17 -6
  141. package/preact/components/game-header/game-header.js.map +2 -2
  142. package/preact/components/group-header/group-header.d.ts +4 -4
  143. package/preact/components/group-header/group-header.js +23 -17
  144. package/preact/components/group-header/group-header.js.map +2 -2
  145. package/preact/components/icon-sprite/icon-sprite.d.ts +2 -2
  146. package/preact/components/icon-sprite/icon-sprite.js +5 -5
  147. package/preact/components/icon-sprite/icon-sprite.js.map +3 -3
  148. package/preact/components/icon-with-wrapper/icon-with-wrapper.d.ts +3 -3
  149. package/preact/components/icon-with-wrapper/icon-with-wrapper.js +13 -6
  150. package/preact/components/icon-with-wrapper/icon-with-wrapper.js.map +3 -3
  151. package/preact/components/image-caption/image-caption.d.ts +2 -2
  152. package/preact/components/image-caption/image-caption.js +1 -5
  153. package/preact/components/image-caption/image-caption.js.map +2 -2
  154. package/preact/components/link-box/link-box-item.d.ts +1 -1
  155. package/preact/components/link-box/link-box-item.js.map +2 -2
  156. package/preact/components/link-box/link-box.d.ts +3 -3
  157. package/preact/components/link-box/link-box.js +24 -21
  158. package/preact/components/link-box/link-box.js.map +2 -2
  159. package/preact/components/list-item/list-item-types.d.ts +3 -3
  160. package/preact/components/list-item/list-item.d.ts +19 -1
  161. package/preact/components/list-item/list-item.js +208 -206
  162. package/preact/components/list-item/list-item.js.map +4 -4
  163. package/preact/components/mask/mask.d.ts +3 -3
  164. package/preact/components/mask/mask.js.map +2 -2
  165. package/preact/components/modal/modal.d.ts +2 -2
  166. package/preact/components/modal/modal.js +22 -17
  167. package/preact/components/modal/modal.js.map +2 -2
  168. package/preact/components/pagination/pagination.d.ts +1 -1
  169. package/preact/components/pagination/pagination.js +3 -20
  170. package/preact/components/pagination/pagination.js.map +2 -2
  171. package/preact/components/pictogram/pictogram.d.ts +2 -2
  172. package/preact/components/pictogram/pictogram.js +8 -1
  173. package/preact/components/pictogram/pictogram.js.map +2 -2
  174. package/preact/components/pill/pill.d.ts +3 -3
  175. package/preact/components/pill/pill.js +1 -8
  176. package/preact/components/pill/pill.js.map +2 -2
  177. package/preact/components/profile-header/profile-header.d.ts +3 -3
  178. package/preact/components/profile-header/profile-header.js.map +2 -2
  179. package/preact/components/quote/quote.d.ts +2 -2
  180. package/preact/components/quote/quote.js +1 -6
  181. package/preact/components/quote/quote.js.map +2 -2
  182. package/preact/components/radio-button/radio-button.d.ts +2 -2
  183. package/preact/components/radio-button/radio-button.js +9 -1
  184. package/preact/components/radio-button/radio-button.js.map +2 -2
  185. package/preact/components/spinner/spinner.d.ts +2 -2
  186. package/preact/components/spinner/spinner.js.map +2 -2
  187. package/preact/components/switch/switch.d.ts +2 -2
  188. package/preact/components/switch/switch.js.map +2 -2
  189. package/preact/components/tag-header/tag-header.d.ts +2 -2
  190. package/preact/components/tag-header/tag-header.js.map +2 -2
  191. package/preact/components/teaser-card/teaser-card.d.ts +5 -5
  192. package/preact/components/teaser-card/teaser-card.js +9 -2
  193. package/preact/components/teaser-card/teaser-card.js.map +2 -2
  194. package/preact/components/teaser-centered/teaser-centered.d.ts +4 -4
  195. package/preact/components/teaser-centered/teaser-centered.js +48 -40
  196. package/preact/components/teaser-centered/teaser-centered.js.map +4 -4
  197. package/preact/components/teaser-counter/teaser-counter.d.ts +2 -2
  198. package/preact/components/teaser-counter/teaser-counter.js +31 -24
  199. package/preact/components/teaser-counter/teaser-counter.js.map +4 -4
  200. package/preact/components/teaser-dot/teaser-dot.d.ts +3 -3
  201. package/preact/components/teaser-dot/teaser-dot.js +1 -6
  202. package/preact/components/teaser-dot/teaser-dot.js.map +2 -2
  203. package/preact/components/teaser-footer/teaser-footer.d.ts +2 -2
  204. package/preact/components/teaser-footer/teaser-footer.js.map +2 -2
  205. package/preact/components/teaser-image/teaser-image.d.ts +3 -3
  206. package/preact/components/teaser-image/teaser-image.js +1 -5
  207. package/preact/components/teaser-image/teaser-image.js.map +2 -2
  208. package/preact/components/teaser-large/teaser-large.d.ts +3 -3
  209. package/preact/components/teaser-large/teaser-large.js +72 -73
  210. package/preact/components/teaser-large/teaser-large.js.map +4 -4
  211. package/preact/components/teaser-list-swipe/teaser-list-swipe.d.ts +2 -2
  212. package/preact/components/teaser-list-swipe/teaser-list-swipe.js +60 -48
  213. package/preact/components/teaser-list-swipe/teaser-list-swipe.js.map +4 -4
  214. package/preact/components/teaser-list-vertical/teaser-list-vertical.d.ts +2 -2
  215. package/preact/components/teaser-list-vertical/teaser-list-vertical.js +23 -17
  216. package/preact/components/teaser-list-vertical/teaser-list-vertical.js.map +2 -2
  217. package/preact/components/teaser-longlife/teaser-longlife.d.ts +1 -1
  218. package/preact/components/teaser-longlife/teaser-longlife.js +33 -27
  219. package/preact/components/teaser-longlife/teaser-longlife.js.map +4 -4
  220. package/preact/components/teaser-native/teaser-native.d.ts +2 -2
  221. package/preact/components/teaser-native/teaser-native.js +36 -35
  222. package/preact/components/teaser-native/teaser-native.js.map +4 -4
  223. package/preact/components/teaser-onsite/teaser-onsite.d.ts +4 -4
  224. package/preact/components/teaser-onsite/teaser-onsite.js +44 -37
  225. package/preact/components/teaser-onsite/teaser-onsite.js.map +4 -4
  226. package/preact/components/teaser-package/teaser-package.d.ts +2 -2
  227. package/preact/components/teaser-package/teaser-package.js +33 -18
  228. package/preact/components/teaser-package/teaser-package.js.map +2 -2
  229. package/preact/components/teaser-right-now/teaser-right-now.d.ts +4 -4
  230. package/preact/components/teaser-right-now/teaser-right-now.js +37 -28
  231. package/preact/components/teaser-right-now/teaser-right-now.js.map +4 -4
  232. package/preact/components/teaser-slideshow/teaser-slideshow.d.ts +3 -3
  233. package/preact/components/teaser-slideshow/teaser-slideshow.js +43 -34
  234. package/preact/components/teaser-slideshow/teaser-slideshow.js.map +4 -4
  235. package/preact/components/teaser-split/teaser-split.d.ts +4 -4
  236. package/preact/components/teaser-split/teaser-split.js +10 -9
  237. package/preact/components/teaser-split/teaser-split.js.map +2 -2
  238. package/preact/components/teaser-standard/teaser-standard.d.ts +1 -1
  239. package/preact/components/teaser-standard/teaser-standard.js +10 -9
  240. package/preact/components/teaser-standard/teaser-standard.js.map +2 -2
  241. package/preact/components/teaser-swipe-card/teaser-swipe-card.d.ts +1 -1
  242. package/preact/components/teaser-swipe-card/teaser-swipe-card.js +30 -24
  243. package/preact/components/teaser-swipe-card/teaser-swipe-card.js.map +4 -4
  244. package/preact/components/teaser-text-on-image/teaser-text-on-image.d.ts +4 -4
  245. package/preact/components/teaser-text-on-image/teaser-text-on-image.js +45 -37
  246. package/preact/components/teaser-text-on-image/teaser-text-on-image.js.map +4 -4
  247. package/preact/components/teaser-tipsa/teaser-tipsa.d.ts +2 -2
  248. package/preact/components/teaser-tipsa/teaser-tipsa.js +33 -32
  249. package/preact/components/teaser-tipsa/teaser-tipsa.js.map +4 -4
  250. package/preact/components/text-button/text-button.d.ts +2 -2
  251. package/preact/components/text-button/text-button.js +4 -4
  252. package/preact/components/text-button/text-button.js.map +3 -3
  253. package/preact/components/text-button-toggle/text-button-toggle.d.ts +3 -3
  254. package/preact/components/text-button-toggle/text-button-toggle.js.map +2 -2
  255. package/preact/components/text-input/text-input.d.ts +2 -2
  256. package/preact/components/text-input/text-input.js +9 -1
  257. package/preact/components/text-input/text-input.js.map +2 -2
  258. package/preact/components/thematic-break/thematic-break.d.ts +2 -2
  259. package/preact/components/thematic-break/thematic-break.js +1 -4
  260. package/preact/components/thematic-break/thematic-break.js.map +2 -2
  261. package/preact/components/tooltip/tooltip.d.ts +2 -2
  262. package/preact/components/tooltip/tooltip.js +22 -17
  263. package/preact/components/tooltip/tooltip.js.map +2 -2
  264. package/preact/components/video-caption/video-caption.d.ts +2 -2
  265. package/preact/components/video-caption/video-caption.js +6 -10
  266. package/preact/components/video-caption/video-caption.js.map +3 -3
  267. package/types-lib/ds-color.d.ts +95 -95
  268. package/types-lib/ds-icon.d.ts +98 -98
  269. package/components/article-body-image/README-UXD.md +0 -0
  270. package/components/article-top-image/README-UXD.md +0 -0
  271. package/components/blocked-content/README-UXD.md +0 -0
  272. package/components/buddy-menu/README-UXD.md +0 -0
  273. package/components/byline/README-UXD.md +0 -0
  274. package/components/byline-list-item/README-UXD.md +0 -0
  275. package/components/checkbox/README-UXD.md +0 -0
  276. package/components/direkt-circle/README-UXD.md +0 -0
  277. package/components/divider/README-UXD.md +0 -0
  278. package/components/floating-button/README-UXD.md +0 -0
  279. package/components/footer/README-UXD.md +0 -0
  280. package/components/game-header/README-UXD.md +0 -0
  281. package/components/icon-sprite/README-UXD.md +0 -0
  282. package/components/icon-with-wrapper/README-UXD.md +0 -0
  283. package/components/image-caption/README-UXD.md +0 -0
  284. package/components/modal/README-UXD.md +0 -0
  285. package/components/profile-header/README-UXD.md +0 -0
  286. package/components/quote/README-UXD.md +0 -0
  287. package/components/radio-button/README-UXD.md +0 -0
  288. package/components/spinner/README-UXD.md +0 -0
  289. package/components/switch/README-UXD.md +0 -0
  290. package/components/teaser-card/README-UXD.md +0 -0
  291. package/components/teaser-footer/README-UXD.md +0 -0
  292. package/components/teaser-onsite/README-UXD.md +0 -0
  293. package/components/text-input/README-UXD.md +0 -0
  294. package/components/thematic-break/README-UXD.md +0 -0
  295. package/components/video-caption/README-UXD.md +0 -0
  296. package/foundations/helpers/README-UXD.md +0 -0
  297. package/foundations/typography/README-UXD.md +0 -0
  298. package/introduction/README-UXD.md +0 -1
  299. package/preact/assets/types/shared-props.d.ts +0 -6
  300. package/preact/assets/types/teaser-props.d.ts +0 -44
  301. package/preact/foundations/a11y/visually-hidden.d.ts +0 -4
  302. package/preact/foundations/icons/grade-icon.d.ts +0 -9
  303. package/preact/helpers/formatClassString.d.ts +0 -1
  304. package/preact/helpers/stringToHtml.d.ts +0 -6
  305. package/preact/helpers/teaser.d.ts +0 -21
  306. /package/components/article-body-image/{README-NJK.md → README-njk.md} +0 -0
  307. /package/components/blocked-content/{README-NJK.md → README-njk.md} +0 -0
  308. /package/components/buddy-menu/{README-NJK.md → README-njk.md} +0 -0
  309. /package/components/button/{README-NJK.md → README-njk.md} +0 -0
  310. /package/components/button-toggle/{README-NJK.md → README-njk.md} +0 -0
  311. /package/components/byline/{README-NJK.md → README-njk.md} +0 -0
  312. /package/components/checkbox/{README-NJK.md → README-njk.md} +0 -0
  313. /package/components/direkt-circle/{README-NJK.md → README-njk.md} +0 -0
  314. /package/components/divider/{README-NJK.md → README-njk.md} +0 -0
  315. /package/components/empty-state/{README-NJK.md → README-njk.md} +0 -0
  316. /package/components/factbox/{README-NJK.md → README-njk.md} +0 -0
  317. /package/components/footer/{README-NJK.md → README-njk.md} +0 -0
  318. /package/components/icon-sprite/{README-NJK.md → README-njk.md} +0 -0
  319. /package/components/image-caption/{README-NJK.md → README-njk.md} +0 -0
  320. /package/components/list-item/{README-NJK.md → README-njk.md} +0 -0
  321. /package/components/mask/{README-NJK.md → README-njk.md} +0 -0
  322. /package/components/modal/{README-NJK.md → README-njk.md} +0 -0
  323. /package/components/pagination/{README-NJK.md → README-njk.md} +0 -0
  324. /package/components/pictogram/{README-NJK.md → README-njk.md} +0 -0
  325. /package/components/quote/{README-NJK.md → README-njk.md} +0 -0
  326. /package/components/radio-button/{README-NJK.md → README-njk.md} +0 -0
  327. /package/components/spinner/{README-NJK.md → README-njk.md} +0 -0
  328. /package/components/switch/{README-NJK.md → README-njk.md} +0 -0
  329. /package/components/teaser-centered/{README-NJK.md → README-njk.md} +0 -0
  330. /package/components/teaser-dot/{README-NJK.md → README-njk.md} +0 -0
  331. /package/components/teaser-image/{README-NJK.md → README-njk.md} +0 -0
  332. /package/components/teaser-right-now/{README-NJK.md → README-njk.md} +0 -0
  333. /package/components/teaser-text-on-image/{README-NJK.md → README-njk.md} +0 -0
  334. /package/components/text-button/{README-NJK.md → README-njk.md} +0 -0
  335. /package/components/text-input/{README-NJK.md → README-njk.md} +0 -0
  336. /package/components/thematic-break/{README-NJK.md → README-njk.md} +0 -0
  337. /package/components/video-caption/{README-NJK.md → README-njk.md} +0 -0
@@ -6,11 +6,7 @@ var formatClassString = (classesArray) => {
6
6
  // ../src/components/image-caption/image-caption.tsx
7
7
  import { jsx, jsxs } from "preact/jsx-runtime";
8
8
  var ImageCaption = ({ caption, author, imageType, classNames, attributes, forcePx }) => {
9
- const classes = formatClassString([
10
- "ds-image-caption",
11
- forcePx && "ds-force-px",
12
- classNames
13
- ]);
9
+ const classes = formatClassString(["ds-image-caption", forcePx && "ds-force-px", classNames]);
14
10
  const authorText = imageType && author ? `${imageType.charAt(0).toUpperCase() + imageType.slice(1)}: ${author}` : author;
15
11
  const authorClasses = [
16
12
  "ds-article-image__credits",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../helpers/formatClassString.ts", "../../../components/image-caption/image-caption.tsx", "../../../assets/article-image/article-image.tsx", "../../../components/article-body-image/article-body-image.tsx"],
4
- "sourcesContent": ["export const formatClassString = (classesArray: (string|undefined|false)[]): string => {\n return classesArray.filter(x => !!x).join(' ');\n}\n", "import type { SharedProps } from \"@bonniernews/dn-design-system-web/assets/types/shared-props.ts\";\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts';\n\nexport interface ImageCaptionProps extends SharedProps {\n /** Ex \"Detta \u00E4r en bildtext\" */\n caption?: string;\n /** Ex \"Paul Hansen\" */\n author?: string;\n /** Type of image. Ex \"Foto\" or \"Illustration\" */\n imageType?: string;\n /** Fixed pixel value is used for typography to prevent scaling based on html font-size */\n forcePx?: boolean;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/image-caption](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/image-caption)\n * - Storybook: [ImageCaption](https://designsystem.dn.se/?path=/docs/article-image-caption--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/image-caption/image-caption.scss'`\n */\nexport const ImageCaption = ({caption, author, imageType, classNames, attributes, forcePx}: ImageCaptionProps) => {\n const classes = formatClassString([\n 'ds-image-caption',\n forcePx && 'ds-force-px',\n classNames,\n ]);\n\n const authorText = imageType && author ? `${imageType.charAt(0).toUpperCase() + imageType.slice(1)}: ${author}` : author;\n\n const authorClasses = [\n 'ds-article-image__credits',\n authorText && authorText.length >= 27 && authorText.length < 60 // Low estimate of how much will fit on tablet/desktop\n ? 'ds-article-image__credits--nowrap-bigscreen' : authorText && authorText.length < 27 // Low estimate of how much will fit on 320px mobile\n ? 'ds-article-image__credits--nowrap' : null,\n ].filter(Boolean).join(' ');\n\n return (\n <figcaption className={classes} aria-hidden='true' {...attributes} >\n {/* This needs to be on the same line to maintain a space between the caption-span and author-span */}\n {caption && <span>{caption}</span>} {authorText && <span className={authorClasses}>{authorText}</span>}\n </figcaption>\n );\n};\n", "import { ComponentChild } from 'preact'\nimport type { SharedProps } from \"@bonniernews/dn-design-system-web/assets/types/shared-props.ts\";\nimport { ImageCaption } from '@bonniernews/dn-design-system-web/components/image-caption/image-caption.tsx'\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\n\nexport interface ArticleImageProps extends SharedProps {\n image: ComponentChild\n caption?: string\n author?: string\n imageType?: string\n fullWidth?: boolean\n forcePx?: boolean\n}\n\nexport const ArticleImage = ({\n image,\n caption = '',\n author = '',\n imageType = '',\n fullWidth,\n forcePx,\n classNames,\n attributes,\n}: ArticleImageProps) => {\n const componentClassName = 'ds-article-image'\n const classes = formatClassString([componentClassName, forcePx && 'ds-force-px', classNames])\n const showCaption = !!caption || !!author\n\n return (\n <figure className={classes} {...attributes}>\n {fullWidth ? (\n <div className='ds-full-width-element'>{image}</div>\n ) : (\n image\n )}\n {showCaption && <ImageCaption caption={caption} author={author} imageType={imageType} forcePx={forcePx} />}\n </figure>\n )\n}\n", "import { ArticleImage, ArticleImageProps } from '../../assets/article-image/article-image'\nimport { formatClassString } from '../../helpers/formatClassString'\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/article-body-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/article-body-image)\n * - Storybook: [ArticleBodyImage](https://designsystem.dn.se/?path=/docs/article-articlebodyimage--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/article-body-image/article-body-image.scss'`\n */\nexport const ArticleBodyImage = ({\n image,\n caption = '',\n author = '',\n imageType = '',\n fullWidth,\n forcePx,\n classNames,\n attributes,\n}: ArticleImageProps) => {\n const componentClassName = 'ds-article-image--body'\n const classes = formatClassString([componentClassName, classNames])\n\n return (\n <ArticleImage\n image={image}\n caption={caption}\n author={author}\n imageType={imageType}\n fullWidth={fullWidth}\n forcePx={forcePx}\n classNames={classes}\n attributes={attributes}\n />\n )\n}\n"],
5
- "mappings": ";AAAO,IAAM,oBAAoB,CAAC,iBAAqD;AACrF,SAAO,aAAa,OAAO,OAAK,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG;AAC/C;;;ACoCI,SAEc,KAFd;AAjBG,IAAM,eAAe,CAAC,EAAC,SAAS,QAAQ,WAAW,YAAY,YAAY,QAAO,MAAyB;AAChH,QAAM,UAAU,kBAAkB;AA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AAM,qBAAqB;AAC3B,QAAM,UAAU,kBAAkB,CAAC,oBAAoB,UAAU,CAAC;AAElE,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ;AAAA;AAAA,EACF;AAEJ;",
4
+ "sourcesContent": ["export const formatClassString = (classesArray: (string | undefined | false)[]): string => {\n return classesArray.filter((x) => !!x).join(' ')\n}\n", "import type { SharedProps } from '@bonniernews/dn-design-system-web/assets/types/shared-props.ts'\n\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\n\nexport interface ImageCaptionProps extends SharedProps {\n /** Ex \"Detta \u00E4r en bildtext\" */\n caption?: string\n /** Ex \"Paul Hansen\" */\n author?: string\n /** Type of image. Ex \"Foto\" or \"Illustration\" */\n imageType?: string\n /** Fixed pixel value is used for typography to prevent scaling based on html font-size */\n forcePx?: boolean\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/web/src/components/image-caption](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/image-caption)\n * - Storybook: [ImageCaption](https://designsystem.dn.se/?path=/docs/article-image-caption--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/image-caption/image-caption.scss'`\n */\nexport const ImageCaption = ({ caption, author, imageType, classNames, attributes, forcePx }: ImageCaptionProps) => {\n const classes = formatClassString(['ds-image-caption', forcePx && 'ds-force-px', classNames])\n\n const authorText =\n imageType && author ? `${imageType.charAt(0).toUpperCase() + imageType.slice(1)}: ${author}` : author\n\n const authorClasses = [\n 'ds-article-image__credits',\n authorText && authorText.length >= 27 && authorText.length < 60 // Low estimate of how much will fit on tablet/desktop\n ? 'ds-article-image__credits--nowrap-bigscreen'\n : authorText && authorText.length < 27 // Low estimate of how much will fit on 320px mobile\n ? 'ds-article-image__credits--nowrap'\n : null,\n ]\n .filter(Boolean)\n .join(' ')\n\n return (\n <figcaption className={classes} aria-hidden='true' {...attributes}>\n {/* This needs to be on the same line to maintain a space between the caption-span and author-span */}\n {caption && <span>{caption}</span>} {authorText && <span className={authorClasses}>{authorText}</span>}\n </figcaption>\n )\n}\n", "import { ComponentChild } from 'preact'\n\nimport type { SharedProps } from '@bonniernews/dn-design-system-web/assets/types/shared-props.ts'\n\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\n\nimport { ImageCaption } from '@bonniernews/dn-design-system-web/components/image-caption/image-caption.tsx'\n\nexport interface ArticleImageProps extends SharedProps {\n image: ComponentChild\n caption?: string\n author?: string\n imageType?: string\n fullWidth?: boolean\n forcePx?: boolean\n}\n\nexport const ArticleImage = ({\n image,\n caption = '',\n author = '',\n imageType = '',\n fullWidth,\n forcePx,\n classNames,\n attributes,\n}: ArticleImageProps) => {\n const componentClassName = 'ds-article-image'\n const classes = formatClassString([componentClassName, forcePx && 'ds-force-px', classNames])\n const showCaption = !!caption || !!author\n\n return (\n <figure className={classes} {...attributes}>\n {fullWidth ? <div className='ds-full-width-element'>{image}</div> : image}\n {showCaption && <ImageCaption caption={caption} author={author} imageType={imageType} forcePx={forcePx} />}\n </figure>\n )\n}\n", "import {\n ArticleImage,\n ArticleImageProps,\n} from '@bonniernews/dn-design-system-web/assets/article-image/article-image.tsx'\n\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/web/src/components/article-body-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/article-body-image)\n * - Storybook: [ArticleBodyImage](https://designsystem.dn.se/?path=/docs/article-articlebodyimage--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/article-body-image/article-body-image.scss'`\n */\nexport const ArticleBodyImage = ({\n image,\n caption = '',\n author = '',\n imageType = '',\n fullWidth,\n forcePx,\n classNames,\n attributes,\n}: ArticleImageProps) => {\n const componentClassName = 'ds-article-image--body'\n const classes = formatClassString([componentClassName, classNames])\n\n return (\n <ArticleImage\n image={image}\n caption={caption}\n author={author}\n imageType={imageType}\n fullWidth={fullWidth}\n forcePx={forcePx}\n classNames={classes}\n attributes={attributes}\n />\n )\n}\n"],
5
+ "mappings": ";AAAO,IAAM,oBAAoB,CAAC,iBAAyD;AACzF,SAAO,aAAa,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG;AACjD;;;ACsCI,SAEc,KAFd;AAlBG,IAAM,eAAe,CAAC,EAAE,SAAS,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAyB;AAClH,QAAM,UAAU,kBAAkB,CAAC,oBAAoB,WAAW,eAAe,UAAU,CAAC;AAE5F,QAAM,aACJ,aAAa,SAAS,GAAG,UAAU,OAAO,CAAC,EAAE,YAAY,IAAI,UAAU,MAAM,CAAC,CAAC,KAAK,MAAM,KAAK;AAEjG,QAAM,gBAAgB;AAAA,IACpB;AAAA,IACA,cAAc,WAAW,UAAU,MAAM,WAAW,SAAS,KACzD,gDACA,cAAc,WAAW,SAAS,KAChC,sCACA;AAAA,EACR,EACG,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,qBAAC,gBAAW,WAAW,SAAS,eAAY,QAAQ,GAAG,YAEpD;AAAA,eAAW,oBAAC,UAAM,mBAAQ;AAAA,IAAQ;AAAA,IAAE,cAAc,oBAAC,UAAK,WAAW,eAAgB,sBAAW;AAAA,KACjG;AAEJ;;;ACbI,SACe,OAAAA,MADf,QAAAC,aAAA;AAfG,IAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyB;AACvB,QAAM,qBAAqB;AAC3B,QAAM,UAAU,kBAAkB,CAAC,oBAAoB,WAAW,eAAe,UAAU,CAAC;AAC5F,QAAM,cAAc,CAAC,CAAC,WAAW,CAAC,CAAC;AAEnC,SACE,gBAAAA,MAAC,YAAO,WAAW,SAAU,GAAG,YAC7B;AAAA,gBAAY,gBAAAD,KAAC,SAAI,WAAU,yBAAyB,iBAAM,IAAS;AAAA,IACnE,eAAe,gBAAAA,KAAC,gBAAa,SAAkB,QAAgB,WAAsB,SAAkB;AAAA,KAC1G;AAEJ;;;ACTI,gBAAAE,YAAA;AAdG,IAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyB;AACvB,QAAM,qBAAqB;AAC3B,QAAM,UAAU,kBAAkB,CAAC,oBAAoB,UAAU,CAAC;AAElE,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": ["jsx", "jsxs", "jsx"]
7
7
  }
@@ -1,9 +1,9 @@
1
1
  import { ArticleImageProps } from '@bonniernews/dn-design-system-web/assets/article-image/article-image.tsx';
2
2
  /**
3
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/article-top-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/article-top-image)
3
+ * - GitHub: [BonnierNews/dn-design-system/web/src/components/article-top-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/article-top-image)
4
4
  * - Storybook: [ArticleTopImage](https://designsystem.dn.se/?path=/docs/article-articletopimage--docs)
5
5
  *
6
6
  * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
7
7
  * `@use '@bonniernews/dn-design-system-web/components/article-top-image/article-top-image.scss'`
8
8
  */
9
- export declare const ArticleTopImage: ({ caption, imageType, author, image, forcePx, classNames, attributes }: ArticleImageProps) => import("preact").JSX.Element;
9
+ export declare const ArticleTopImage: ({ caption, imageType, author, image, forcePx, classNames, attributes, }: ArticleImageProps) => import("preact").JSX.Element;
@@ -6,11 +6,7 @@ var formatClassString = (classesArray) => {
6
6
  // ../src/components/image-caption/image-caption.tsx
7
7
  import { jsx, jsxs } from "preact/jsx-runtime";
8
8
  var ImageCaption = ({ caption, author, imageType, classNames, attributes, forcePx }) => {
9
- const classes = formatClassString([
10
- "ds-image-caption",
11
- forcePx && "ds-force-px",
12
- classNames
13
- ]);
9
+ const classes = formatClassString(["ds-image-caption", forcePx && "ds-force-px", classNames]);
14
10
  const authorText = imageType && author ? `${imageType.charAt(0).toUpperCase() + imageType.slice(1)}: ${author}` : author;
15
11
  const authorClasses = [
16
12
  "ds-article-image__credits",
@@ -46,7 +42,15 @@ var ArticleImage = ({
46
42
 
47
43
  // ../src/components/article-top-image/article-top-image.tsx
48
44
  import { jsx as jsx3 } from "preact/jsx-runtime";
49
- var ArticleTopImage = ({ caption, imageType, author, image, forcePx, classNames, attributes }) => {
45
+ var ArticleTopImage = ({
46
+ caption,
47
+ imageType,
48
+ author,
49
+ image,
50
+ forcePx,
51
+ classNames,
52
+ attributes
53
+ }) => {
50
54
  const classes = formatClassString(["ds-article-image--top", classNames]);
51
55
  const imageParams = {
52
56
  fullWidth: true,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../helpers/formatClassString.ts", "../../../components/image-caption/image-caption.tsx", "../../../assets/article-image/article-image.tsx", "../../../components/article-top-image/article-top-image.tsx"],
4
- "sourcesContent": ["export const formatClassString = (classesArray: (string|undefined|false)[]): string => {\n return classesArray.filter(x => !!x).join(' ');\n}\n", "import type { SharedProps } from \"@bonniernews/dn-design-system-web/assets/types/shared-props.ts\";\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts';\n\nexport interface ImageCaptionProps extends SharedProps {\n /** Ex \"Detta \u00E4r en bildtext\" */\n caption?: string;\n /** Ex \"Paul Hansen\" */\n author?: string;\n /** Type of image. Ex \"Foto\" or \"Illustration\" */\n imageType?: string;\n /** Fixed pixel value is used for typography to prevent scaling based on html font-size */\n forcePx?: boolean;\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/image-caption](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/image-caption)\n * - Storybook: [ImageCaption](https://designsystem.dn.se/?path=/docs/article-image-caption--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/image-caption/image-caption.scss'`\n */\nexport const ImageCaption = ({caption, author, imageType, classNames, attributes, forcePx}: ImageCaptionProps) => {\n const classes = formatClassString([\n 'ds-image-caption',\n forcePx && 'ds-force-px',\n classNames,\n ]);\n\n const authorText = imageType && author ? `${imageType.charAt(0).toUpperCase() + imageType.slice(1)}: ${author}` : author;\n\n const authorClasses = [\n 'ds-article-image__credits',\n authorText && authorText.length >= 27 && authorText.length < 60 // Low estimate of how much will fit on tablet/desktop\n ? 'ds-article-image__credits--nowrap-bigscreen' : authorText && authorText.length < 27 // Low estimate of how much will fit on 320px mobile\n ? 'ds-article-image__credits--nowrap' : null,\n ].filter(Boolean).join(' ');\n\n return (\n <figcaption className={classes} aria-hidden='true' {...attributes} >\n {/* This needs to be on the same line to maintain a space between the caption-span and author-span */}\n {caption && <span>{caption}</span>} {authorText && <span className={authorClasses}>{authorText}</span>}\n </figcaption>\n );\n};\n", "import { ComponentChild } from 'preact'\nimport type { SharedProps } from \"@bonniernews/dn-design-system-web/assets/types/shared-props.ts\";\nimport { ImageCaption } from '@bonniernews/dn-design-system-web/components/image-caption/image-caption.tsx'\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\n\nexport interface ArticleImageProps extends SharedProps {\n image: ComponentChild\n caption?: string\n author?: string\n imageType?: string\n fullWidth?: boolean\n forcePx?: boolean\n}\n\nexport const ArticleImage = ({\n image,\n caption = '',\n author = '',\n imageType = '',\n fullWidth,\n forcePx,\n classNames,\n attributes,\n}: ArticleImageProps) => {\n const componentClassName = 'ds-article-image'\n const classes = formatClassString([componentClassName, forcePx && 'ds-force-px', classNames])\n const showCaption = !!caption || !!author\n\n return (\n <figure className={classes} {...attributes}>\n {fullWidth ? (\n <div className='ds-full-width-element'>{image}</div>\n ) : (\n image\n )}\n {showCaption && <ImageCaption caption={caption} author={author} imageType={imageType} forcePx={forcePx} />}\n </figure>\n )\n}\n", "import { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\nimport { ArticleImage, ArticleImageProps } from '@bonniernews/dn-design-system-web/assets/article-image/article-image.tsx'\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/../web/src/components/article-top-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/article-top-image)\n * - Storybook: [ArticleTopImage](https://designsystem.dn.se/?path=/docs/article-articletopimage--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/article-top-image/article-top-image.scss'`\n */\nexport const ArticleTopImage = ({ caption, imageType, author, image, forcePx, classNames, attributes }: ArticleImageProps) => {\n const classes = formatClassString(['ds-article-image--top', classNames])\n\n const imageParams = {\n fullWidth: true,\n caption,\n imageType,\n author,\n image,\n forcePx,\n classNames: classes,\n attributes,\n }\n\n return (\n <ArticleImage {...imageParams} />\n )\n}\n"],
5
- "mappings": ";AAAO,IAAM,oBAAoB,CAAC,iBAAqD;AACrF,SAAO,aAAa,OAAO,OAAK,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG;AAC/C;;;ACoCI,SAEc,KAFd;AAjBG,IAAM,eAAe,CAAC,EAAC,SAAS,QAAQ,WAAW,YAAY,YAAY,QAAO,MAAyB;AAChH,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,WAAW;AAAA,IACX;AAAA,EACF,CAAC;AAED,QAAM,aAAa,aAAa,SAAS,GAAG,UAAU,OAAO,CAAC,EAAE,YAAY,IAAI,UAAU,MAAM,CAAC,CA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,GAAG,aAAa;AAEnC;",
4
+ "sourcesContent": ["export const formatClassString = (classesArray: (string | undefined | false)[]): string => {\n return classesArray.filter((x) => !!x).join(' ')\n}\n", "import type { SharedProps } from '@bonniernews/dn-design-system-web/assets/types/shared-props.ts'\n\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\n\nexport interface ImageCaptionProps extends SharedProps {\n /** Ex \"Detta \u00E4r en bildtext\" */\n caption?: string\n /** Ex \"Paul Hansen\" */\n author?: string\n /** Type of image. Ex \"Foto\" or \"Illustration\" */\n imageType?: string\n /** Fixed pixel value is used for typography to prevent scaling based on html font-size */\n forcePx?: boolean\n}\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/web/src/components/image-caption](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/image-caption)\n * - Storybook: [ImageCaption](https://designsystem.dn.se/?path=/docs/article-image-caption--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/image-caption/image-caption.scss'`\n */\nexport const ImageCaption = ({ caption, author, imageType, classNames, attributes, forcePx }: ImageCaptionProps) => {\n const classes = formatClassString(['ds-image-caption', forcePx && 'ds-force-px', classNames])\n\n const authorText =\n imageType && author ? `${imageType.charAt(0).toUpperCase() + imageType.slice(1)}: ${author}` : author\n\n const authorClasses = [\n 'ds-article-image__credits',\n authorText && authorText.length >= 27 && authorText.length < 60 // Low estimate of how much will fit on tablet/desktop\n ? 'ds-article-image__credits--nowrap-bigscreen'\n : authorText && authorText.length < 27 // Low estimate of how much will fit on 320px mobile\n ? 'ds-article-image__credits--nowrap'\n : null,\n ]\n .filter(Boolean)\n .join(' ')\n\n return (\n <figcaption className={classes} aria-hidden='true' {...attributes}>\n {/* This needs to be on the same line to maintain a space between the caption-span and author-span */}\n {caption && <span>{caption}</span>} {authorText && <span className={authorClasses}>{authorText}</span>}\n </figcaption>\n )\n}\n", "import { ComponentChild } from 'preact'\n\nimport type { SharedProps } from '@bonniernews/dn-design-system-web/assets/types/shared-props.ts'\n\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\n\nimport { ImageCaption } from '@bonniernews/dn-design-system-web/components/image-caption/image-caption.tsx'\n\nexport interface ArticleImageProps extends SharedProps {\n image: ComponentChild\n caption?: string\n author?: string\n imageType?: string\n fullWidth?: boolean\n forcePx?: boolean\n}\n\nexport const ArticleImage = ({\n image,\n caption = '',\n author = '',\n imageType = '',\n fullWidth,\n forcePx,\n classNames,\n attributes,\n}: ArticleImageProps) => {\n const componentClassName = 'ds-article-image'\n const classes = formatClassString([componentClassName, forcePx && 'ds-force-px', classNames])\n const showCaption = !!caption || !!author\n\n return (\n <figure className={classes} {...attributes}>\n {fullWidth ? <div className='ds-full-width-element'>{image}</div> : image}\n {showCaption && <ImageCaption caption={caption} author={author} imageType={imageType} forcePx={forcePx} />}\n </figure>\n )\n}\n", "import {\n ArticleImage,\n ArticleImageProps,\n} from '@bonniernews/dn-design-system-web/assets/article-image/article-image.tsx'\n\nimport { formatClassString } from '@bonniernews/dn-design-system-web/helpers/formatClassString.ts'\n\n/**\n * - GitHub: [BonnierNews/dn-design-system/web/src/components/article-top-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/article-top-image)\n * - Storybook: [ArticleTopImage](https://designsystem.dn.se/?path=/docs/article-articletopimage--docs)\n *\n * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:\n * `@use '@bonniernews/dn-design-system-web/components/article-top-image/article-top-image.scss'`\n */\nexport const ArticleTopImage = ({\n caption,\n imageType,\n author,\n image,\n forcePx,\n classNames,\n attributes,\n}: ArticleImageProps) => {\n const classes = formatClassString(['ds-article-image--top', classNames])\n\n const imageParams = {\n fullWidth: true,\n caption,\n imageType,\n author,\n image,\n forcePx,\n classNames: classes,\n attributes,\n }\n\n return <ArticleImage {...imageParams} />\n}\n"],
5
+ "mappings": ";AAAO,IAAM,oBAAoB,CAAC,iBAAyD;AACzF,SAAO,aAA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E,YAAA;AAtBF,IAAM,kBAAkB,CAAC;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAyB;AACvB,QAAM,UAAU,kBAAkB,CAAC,yBAAyB,UAAU,CAAC;AAEvE,QAAM,cAAc;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACF;AAEA,SAAO,gBAAAA,KAAC,gBAAc,GAAG,aAAa;AACxC;",
6
6
  "names": ["jsx", "jsxs", "jsx"]
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { SharedProps } from "@bonniernews/dn-design-system-web/assets/types/shared-props.ts";
1
+ import type { SharedProps } from '@bonniernews/dn-design-system-web/assets/types/shared-props.ts';
2
2
  export interface BlockedContentProps extends SharedProps {
3
3
  title: string;
4
4
  body: string;
@@ -9,7 +9,7 @@ export interface BlockedContentProps extends SharedProps {
9
9
  };
10
10
  }
11
11
  /**
12
- * - GitHub: [BonnierNews/dn-design-system/../web/src/components/blocked-content](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/blocked-content)
12
+ * - GitHub: [BonnierNews/dn-design-system/web/src/components/blocked-content](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/blocked-content)
13
13
  * - Storybook: [BlockedContent](https://designsystem.dn.se/?path=/docs/article-blockedcontent--docs)
14
14
  *
15
15
  * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
@@ -161,23 +161,28 @@ var Button = ({
161
161
  attributes,
162
162
  forcePx = false
163
163
  }) => {
164
- return /* @__PURE__ */ jsx5(ButtonBase, { ...{
165
- text,
166
- disabled,
167
- variant,
168
- size,
169
- fullWidth,
170
- mobileFullWidth,
171
- iconPosition,
172
- iconName,
173
- loading,
174
- type,
175
- href,
176
- isIconButton,
177
- classNames,
178
- attributes,
179
- forcePx
180
- } });
164
+ return /* @__PURE__ */ jsx5(
165
+ ButtonBase,
166
+ {
167
+ ...{
168
+ text,
169
+ disabled,
170
+ variant,
171
+ size,
172
+ fullWidth,
173
+ mobileFullWidth,
174
+ iconPosition,
175
+ iconName,
176
+ loading,
177
+ type,
178
+ href,
179
+ isIconButton,
180
+ classNames,
181
+ attributes,
182
+ forcePx
183
+ }
184
+ }
185
+ );
181
186
  };
182
187
 
183
188
  // ../src/components/blocked-content/blocked-content.tsx
@@ -192,11 +197,7 @@ var BlockedContent = ({
192
197
  elementAttributes = {}
193
198
  }) => {
194
199
  const componentClassName = "ds-blocked-content";
195
- const classes = [
196
- componentClassName,
197
- forcePx ? "ds-force-px" : "",
198
- classNames
199
- ].filter(Boolean).join(" ");
200
+ const classes = formatClassString([componentClassName, forcePx ? "ds-force-px" : "", classNames]);
200
201
  return /* @__PURE__ */ jsx6("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsxs3("div", { className: `${componentClassName}__inner`, children: [
201
202
  /* @__PURE__ */ jsxs3("div", { className: `${componentClassName}__content`, children: [
202
203
  /* @__PURE__ */ jsx6("h2", { className: `${componentClassName}__title`, children: title }),