@bonniernews/dn-design-system-web 32.7.44 → 32.7.46-beta.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 (263) hide show
  1. package/.prettierignore +10 -0
  2. package/.prettierrc +20 -1
  3. package/CHANGELOG.md +7 -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 +1 -1
  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.md +1 -1
  30. package/components/image-caption/README.md +1 -1
  31. package/components/link-box/README.md +1 -1
  32. package/components/list-item/README.md +1 -1
  33. package/components/list-item/list-item-types.ts +4 -3
  34. package/components/list-item/list-item.js +5 -8
  35. package/components/mask/README.md +1 -1
  36. package/components/modal/README.md +1 -1
  37. package/components/modal/modal.js +20 -24
  38. package/components/pagination/README.md +1 -1
  39. package/components/pictogram/README.md +1 -1
  40. package/components/pill/README.md +1 -1
  41. package/components/profile-header/README.md +1 -1
  42. package/components/quote/README.md +1 -1
  43. package/components/radio-button/README.md +1 -1
  44. package/components/spinner/README.md +1 -1
  45. package/components/switch/README.md +1 -1
  46. package/components/tag-header/README.md +1 -1
  47. package/components/teaser-card/README.md +1 -1
  48. package/components/teaser-centered/README.md +2 -2
  49. package/components/teaser-counter/README.md +2 -2
  50. package/components/teaser-dot/README.md +1 -1
  51. package/components/teaser-footer/README.md +1 -1
  52. package/components/teaser-image/README.md +1 -1
  53. package/components/teaser-large/README.md +2 -2
  54. package/components/teaser-list-swipe/README.md +1 -1
  55. package/components/teaser-list-vertical/README.md +1 -1
  56. package/components/teaser-list-vertical/teaser-list-vertical.js +7 -10
  57. package/components/teaser-longlife/README.md +1 -1
  58. package/components/teaser-onsite/README.md +2 -2
  59. package/components/teaser-package/README.md +1 -1
  60. package/components/teaser-right-now/README.md +2 -2
  61. package/components/teaser-slideshow/README.md +1 -1
  62. package/components/teaser-standard/README.md +2 -2
  63. package/components/teaser-standard/teaser-standard.js +11 -14
  64. package/components/teaser-swipe-card/README.md +2 -2
  65. package/components/teaser-text-on-image/README.md +2 -2
  66. package/components/teaser-tipsa/README.md +2 -2
  67. package/components/text-button/README.md +1 -1
  68. package/components/text-button-toggle/README.md +1 -1
  69. package/components/text-button-toggle/text-button-toggle.js +7 -10
  70. package/components/text-input/README.md +1 -1
  71. package/components/text-input/text-input-interactions.js +16 -16
  72. package/components/text-input/text-input.js +10 -10
  73. package/components/thematic-break/README.md +1 -1
  74. package/components/tooltip/README.md +1 -1
  75. package/components/tooltip/tooltip.js +11 -17
  76. package/components/video-caption/README.md +1 -1
  77. package/helpers/formatClassString.ts +2 -2
  78. package/index.d.ts +1 -1
  79. package/package.json +5 -1
  80. package/preact/assets/article-image/article-image.d.ts +1 -1
  81. package/preact/assets/form-field/form-field.d.ts +2 -2
  82. package/preact/components/article-body-image/article-body-image.d.ts +2 -2
  83. package/preact/components/article-body-image/article-body-image.js +1 -5
  84. package/preact/components/article-body-image/article-body-image.js.map +2 -2
  85. package/preact/components/article-top-image/article-top-image.d.ts +2 -2
  86. package/preact/components/article-top-image/article-top-image.js +10 -6
  87. package/preact/components/article-top-image/article-top-image.js.map +2 -2
  88. package/preact/components/blocked-content/blocked-content.d.ts +2 -2
  89. package/preact/components/blocked-content/blocked-content.js +23 -22
  90. package/preact/components/blocked-content/blocked-content.js.map +2 -2
  91. package/preact/components/buddy-menu/buddy-menu.d.ts +2 -2
  92. package/preact/components/buddy-menu/buddy-menu.js +22 -17
  93. package/preact/components/buddy-menu/buddy-menu.js.map +2 -2
  94. package/preact/components/button/button-base.js.map +2 -2
  95. package/preact/components/button/button.d.ts +4 -4
  96. package/preact/components/button/button.js +22 -17
  97. package/preact/components/button/button.js.map +2 -2
  98. package/preact/components/button-toggle/button-toggle.d.ts +2 -2
  99. package/preact/components/button-toggle/button-toggle.js.map +2 -2
  100. package/preact/components/byline/byline.d.ts +2 -2
  101. package/preact/components/byline/byline.js +185 -170
  102. package/preact/components/byline/byline.js.map +3 -3
  103. package/preact/components/byline-list/byline-list.d.ts +4 -4
  104. package/preact/components/byline-list/byline-list.js +32 -21
  105. package/preact/components/byline-list/byline-list.js.map +2 -2
  106. package/preact/components/checkbox/checkbox.d.ts +2 -2
  107. package/preact/components/checkbox/checkbox.js +9 -1
  108. package/preact/components/checkbox/checkbox.js.map +2 -2
  109. package/preact/components/direkt-circle/direkt-circle.d.ts +2 -2
  110. package/preact/components/direkt-circle/direkt-circle.js.map +2 -2
  111. package/preact/components/direkt-header/direkt-header.d.ts +2 -2
  112. package/preact/components/direkt-header/direkt-header.js.map +2 -2
  113. package/preact/components/disclaimer/disclaimer.d.ts +3 -3
  114. package/preact/components/disclaimer/disclaimer.js.map +2 -2
  115. package/preact/components/divider/divider.d.ts +2 -2
  116. package/preact/components/divider/divider.js +1 -5
  117. package/preact/components/divider/divider.js.map +2 -2
  118. package/preact/components/empty-state/empty-state.d.ts +2 -2
  119. package/preact/components/empty-state/empty-state.js +31 -23
  120. package/preact/components/empty-state/empty-state.js.map +2 -2
  121. package/preact/components/factbox/factbox.d.ts +5 -5
  122. package/preact/components/factbox/factbox.js +448 -293
  123. package/preact/components/factbox/factbox.js.map +4 -4
  124. package/preact/components/footer/footer.d.ts +2 -2
  125. package/preact/components/footer/footer.js +18 -9
  126. package/preact/components/footer/footer.js.map +2 -2
  127. package/preact/components/game-header/game-header.d.ts +3 -3
  128. package/preact/components/game-header/game-header.js +17 -6
  129. package/preact/components/game-header/game-header.js.map +2 -2
  130. package/preact/components/group-header/group-header.d.ts +2 -2
  131. package/preact/components/group-header/group-header.js +22 -17
  132. package/preact/components/group-header/group-header.js.map +2 -2
  133. package/preact/components/icon-sprite/icon-sprite.d.ts +2 -2
  134. package/preact/components/icon-sprite/icon-sprite.js +5 -5
  135. package/preact/components/icon-sprite/icon-sprite.js.map +3 -3
  136. package/preact/components/icon-with-wrapper/icon-with-wrapper.d.ts +3 -3
  137. package/preact/components/icon-with-wrapper/icon-with-wrapper.js +13 -6
  138. package/preact/components/icon-with-wrapper/icon-with-wrapper.js.map +3 -3
  139. package/preact/components/image-caption/image-caption.d.ts +2 -2
  140. package/preact/components/image-caption/image-caption.js +1 -5
  141. package/preact/components/image-caption/image-caption.js.map +2 -2
  142. package/preact/components/link-box/link-box-item.d.ts +1 -1
  143. package/preact/components/link-box/link-box-item.js.map +2 -2
  144. package/preact/components/link-box/link-box.d.ts +3 -3
  145. package/preact/components/link-box/link-box.js +23 -21
  146. package/preact/components/link-box/link-box.js.map +2 -2
  147. package/preact/components/list-item/list-item-types.d.ts +3 -3
  148. package/preact/components/list-item/list-item.d.ts +1 -1
  149. package/preact/components/list-item/list-item.js +208 -206
  150. package/preact/components/list-item/list-item.js.map +4 -4
  151. package/preact/components/mask/mask.d.ts +3 -3
  152. package/preact/components/mask/mask.js.map +2 -2
  153. package/preact/components/modal/modal.d.ts +2 -2
  154. package/preact/components/modal/modal.js +22 -17
  155. package/preact/components/modal/modal.js.map +2 -2
  156. package/preact/components/pagination/pagination.d.ts +1 -1
  157. package/preact/components/pagination/pagination.js +3 -20
  158. package/preact/components/pagination/pagination.js.map +2 -2
  159. package/preact/components/pictogram/pictogram.d.ts +2 -2
  160. package/preact/components/pictogram/pictogram.js +8 -1
  161. package/preact/components/pictogram/pictogram.js.map +2 -2
  162. package/preact/components/pill/pill.d.ts +3 -3
  163. package/preact/components/pill/pill.js +1 -8
  164. package/preact/components/pill/pill.js.map +2 -2
  165. package/preact/components/profile-header/profile-header.d.ts +3 -3
  166. package/preact/components/profile-header/profile-header.js.map +2 -2
  167. package/preact/components/quote/quote.d.ts +2 -2
  168. package/preact/components/quote/quote.js +1 -6
  169. package/preact/components/quote/quote.js.map +2 -2
  170. package/preact/components/radio-button/radio-button.d.ts +2 -2
  171. package/preact/components/radio-button/radio-button.js +9 -1
  172. package/preact/components/radio-button/radio-button.js.map +2 -2
  173. package/preact/components/spinner/spinner.d.ts +2 -2
  174. package/preact/components/spinner/spinner.js.map +2 -2
  175. package/preact/components/switch/switch.d.ts +2 -2
  176. package/preact/components/switch/switch.js.map +2 -2
  177. package/preact/components/tag-header/tag-header.d.ts +2 -2
  178. package/preact/components/tag-header/tag-header.js.map +2 -2
  179. package/preact/components/teaser-card/teaser-card.d.ts +4 -4
  180. package/preact/components/teaser-card/teaser-card.js +9 -2
  181. package/preact/components/teaser-card/teaser-card.js.map +2 -2
  182. package/preact/components/teaser-centered/teaser-centered.d.ts +4 -4
  183. package/preact/components/teaser-centered/teaser-centered.js +48 -40
  184. package/preact/components/teaser-centered/teaser-centered.js.map +4 -4
  185. package/preact/components/teaser-counter/teaser-counter.d.ts +2 -2
  186. package/preact/components/teaser-counter/teaser-counter.js +31 -24
  187. package/preact/components/teaser-counter/teaser-counter.js.map +4 -4
  188. package/preact/components/teaser-dot/teaser-dot.d.ts +3 -3
  189. package/preact/components/teaser-dot/teaser-dot.js +1 -6
  190. package/preact/components/teaser-dot/teaser-dot.js.map +2 -2
  191. package/preact/components/teaser-footer/teaser-footer.d.ts +2 -2
  192. package/preact/components/teaser-footer/teaser-footer.js.map +2 -2
  193. package/preact/components/teaser-image/teaser-image.d.ts +3 -3
  194. package/preact/components/teaser-image/teaser-image.js +1 -5
  195. package/preact/components/teaser-image/teaser-image.js.map +2 -2
  196. package/preact/components/teaser-large/teaser-large.d.ts +3 -3
  197. package/preact/components/teaser-large/teaser-large.js +72 -73
  198. package/preact/components/teaser-large/teaser-large.js.map +4 -4
  199. package/preact/components/teaser-list-swipe/teaser-list-swipe.d.ts +1 -1
  200. package/preact/components/teaser-list-swipe/teaser-list-swipe.js +59 -48
  201. package/preact/components/teaser-list-swipe/teaser-list-swipe.js.map +4 -4
  202. package/preact/components/teaser-list-vertical/teaser-list-vertical.d.ts +2 -2
  203. package/preact/components/teaser-list-vertical/teaser-list-vertical.js +22 -17
  204. package/preact/components/teaser-list-vertical/teaser-list-vertical.js.map +2 -2
  205. package/preact/components/teaser-longlife/teaser-longlife.d.ts +1 -1
  206. package/preact/components/teaser-longlife/teaser-longlife.js +33 -27
  207. package/preact/components/teaser-longlife/teaser-longlife.js.map +4 -4
  208. package/preact/components/teaser-native/teaser-native.d.ts +2 -2
  209. package/preact/components/teaser-native/teaser-native.js +36 -35
  210. package/preact/components/teaser-native/teaser-native.js.map +4 -4
  211. package/preact/components/teaser-onsite/teaser-onsite.d.ts +4 -4
  212. package/preact/components/teaser-onsite/teaser-onsite.js +44 -37
  213. package/preact/components/teaser-onsite/teaser-onsite.js.map +4 -4
  214. package/preact/components/teaser-package/teaser-package.d.ts +2 -2
  215. package/preact/components/teaser-package/teaser-package.js +32 -18
  216. package/preact/components/teaser-package/teaser-package.js.map +2 -2
  217. package/preact/components/teaser-right-now/teaser-right-now.d.ts +4 -4
  218. package/preact/components/teaser-right-now/teaser-right-now.js +37 -28
  219. package/preact/components/teaser-right-now/teaser-right-now.js.map +4 -4
  220. package/preact/components/teaser-slideshow/teaser-slideshow.d.ts +3 -3
  221. package/preact/components/teaser-slideshow/teaser-slideshow.js +43 -34
  222. package/preact/components/teaser-slideshow/teaser-slideshow.js.map +4 -4
  223. package/preact/components/teaser-split/teaser-split.d.ts +3 -3
  224. package/preact/components/teaser-split/teaser-split.js +10 -9
  225. package/preact/components/teaser-split/teaser-split.js.map +2 -2
  226. package/preact/components/teaser-standard/teaser-standard.d.ts +1 -1
  227. package/preact/components/teaser-standard/teaser-standard.js +10 -9
  228. package/preact/components/teaser-standard/teaser-standard.js.map +2 -2
  229. package/preact/components/teaser-swipe-card/teaser-swipe-card.d.ts +1 -1
  230. package/preact/components/teaser-swipe-card/teaser-swipe-card.js +30 -24
  231. package/preact/components/teaser-swipe-card/teaser-swipe-card.js.map +4 -4
  232. package/preact/components/teaser-text-on-image/teaser-text-on-image.d.ts +4 -4
  233. package/preact/components/teaser-text-on-image/teaser-text-on-image.js +45 -37
  234. package/preact/components/teaser-text-on-image/teaser-text-on-image.js.map +4 -4
  235. package/preact/components/teaser-tipsa/teaser-tipsa.d.ts +2 -2
  236. package/preact/components/teaser-tipsa/teaser-tipsa.js +33 -32
  237. package/preact/components/teaser-tipsa/teaser-tipsa.js.map +4 -4
  238. package/preact/components/text-button/text-button.d.ts +2 -2
  239. package/preact/components/text-button/text-button.js +4 -4
  240. package/preact/components/text-button/text-button.js.map +3 -3
  241. package/preact/components/text-button-toggle/text-button-toggle.d.ts +3 -3
  242. package/preact/components/text-button-toggle/text-button-toggle.js.map +2 -2
  243. package/preact/components/text-input/text-input.d.ts +2 -2
  244. package/preact/components/text-input/text-input.js +9 -1
  245. package/preact/components/text-input/text-input.js.map +2 -2
  246. package/preact/components/thematic-break/thematic-break.d.ts +2 -2
  247. package/preact/components/thematic-break/thematic-break.js +1 -4
  248. package/preact/components/thematic-break/thematic-break.js.map +2 -2
  249. package/preact/components/tooltip/tooltip.d.ts +2 -2
  250. package/preact/components/tooltip/tooltip.js +22 -17
  251. package/preact/components/tooltip/tooltip.js.map +2 -2
  252. package/preact/components/video-caption/video-caption.d.ts +2 -2
  253. package/preact/components/video-caption/video-caption.js +6 -10
  254. package/preact/components/video-caption/video-caption.js.map +3 -3
  255. package/types-lib/ds-color.d.ts +95 -95
  256. package/types-lib/ds-icon.d.ts +98 -98
  257. package/preact/assets/types/shared-props.d.ts +0 -6
  258. package/preact/assets/types/teaser-props.d.ts +0 -44
  259. package/preact/foundations/a11y/visually-hidden.d.ts +0 -4
  260. package/preact/foundations/icons/grade-icon.d.ts +0 -9
  261. package/preact/helpers/formatClassString.d.ts +0 -1
  262. package/preact/helpers/stringToHtml.d.ts +0 -6
  263. package/preact/helpers/teaser.d.ts +0 -21
@@ -1,7 +1,7 @@
1
1
  GroupHeader
2
2
  ===========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/group-header](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/group-header)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/group-header](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/group-header)
5
5
  * Storybook: [GroupHeader](https://designsystem.dn.se/?path=/docs/basic-groupheader--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/group-header/group-header.scss'`
@@ -1,7 +1,7 @@
1
1
  ImageCaption
2
2
  ============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/image-caption](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/image-caption)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/image-caption](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/image-caption)
5
5
  * Storybook: [ImageCaption](https://designsystem.dn.se/?path=/docs/article-image-caption--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/image-caption/image-caption.scss'`
@@ -1,7 +1,7 @@
1
1
  LinkBox
2
2
  =======
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/link-box](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/link-box)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/link-box](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/link-box)
5
5
  * Storybook: [LinkBox](https://designsystem.dn.se/?path=/docs/section-linkbox--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/link-box/link-box.scss'`
@@ -1,7 +1,7 @@
1
1
  ListItem
2
2
  ========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/list-item](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/list-item)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/list-item](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/list-item)
5
5
  * Storybook: [ListItem](https://designsystem.dn.se/?path=/docs/basic-listitem--docs)
6
6
 
7
7
  This component is used to render a list item with different types of content. This lists all possible properties. Some are restricted to certain list item types. Check the list item types for more information.
@@ -1,9 +1,10 @@
1
- import { ComponentChildren } from "preact";
1
+ import { ComponentChildren } from 'preact'
2
2
 
3
- import { ButtonProps } from '../radio-button/radio-button'
4
3
  import type { DsIcon } from '@bonniernews/dn-design-system-web/types-lib/ds-icon.d.ts'
5
- import { SwitchInnerProps } from '../switch/switch'
4
+
6
5
  import { ButtonToggleStandardProps } from '../button/button-types'
6
+ import { ButtonProps } from '../radio-button/radio-button'
7
+ import { SwitchInnerProps } from '../switch/switch'
7
8
 
8
9
  export interface ListItemSharedProps {
9
10
  title?: string
@@ -1,9 +1,6 @@
1
1
  import { dsButtonToggle } from '@bonniernews/dn-design-system-web/components/button/button-interactions.js';
2
2
 
3
- export {
4
- dsListItem,
5
- dsListItemAll
6
- };
3
+ export { dsListItem, dsListItemAll };
7
4
 
8
5
  function dsListItem(listElements = []) {
9
6
  if (!listElements.length) return;
@@ -17,17 +14,17 @@ function dsListItem(listElements = []) {
17
14
  }
18
15
 
19
16
  function dsListItemAccordion(accordionEl) {
20
- accordionEl.addEventListener("click", () => {
21
- accordionEl.classList.toggle("ds-list-item--accordion-active");
17
+ accordionEl.addEventListener('click', () => {
18
+ accordionEl.classList.toggle('ds-list-item--accordion-active');
22
19
  });
23
20
  }
24
21
 
25
22
  function dsListItemToggle(toggleEl) {
26
- const toggleElements = Array.from(toggleEl.getElementsByClassName("ds-btn--toggle"));
23
+ const toggleElements = Array.from(toggleEl.getElementsByClassName('ds-btn--toggle'));
27
24
  dsButtonToggle(toggleElements);
28
25
  }
29
26
 
30
27
  function dsListItemAll() {
31
- const listElements = Array.from(document.getElementsByClassName("ds-list-item__content"));
28
+ const listElements = Array.from(document.getElementsByClassName('ds-list-item__content'));
32
29
  dsListItem(listElements);
33
30
  }
@@ -1,7 +1,7 @@
1
1
  Mask
2
2
  ====
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/mask](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/mask)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/mask](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/mask)
5
5
  * Storybook: [Mask](https://designsystem.dn.se/?path=/docs/section-subcomponents-mask--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/mask/mask.scss'`
@@ -1,7 +1,7 @@
1
1
  Modal
2
2
  =====
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/Modal](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/modal)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/Modal](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/modal)
5
5
  * Storybook: [Modal](https://designsystem.dn.se/?path=/docs/basic-modal--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/modal/modal.scss'`
@@ -1,62 +1,58 @@
1
- export {
2
- initModal,
3
- openModal,
4
- initModalStorybook
5
- }
1
+ export { initModal, openModal, initModalStorybook };
6
2
 
7
3
  function initModal(modalEl) {
8
- const isDialogSupported = typeof HTMLDialogElement === "function";
9
- let modalWrapper = modalEl.querySelector(".ds-modal__inner");
4
+ const isDialogSupported = typeof HTMLDialogElement === 'function';
5
+ let modalWrapper = modalEl.querySelector('.ds-modal__inner');
10
6
  if (!isDialogSupported) {
11
7
  modalWrapper = modalEl;
12
- const modalElInner = modalEl.querySelector(".ds-modal__inner");
8
+ const modalElInner = modalEl.querySelector('.ds-modal__inner');
13
9
  const modalAttributes = Array.from(modalElInner.attributes);
14
- const fallbackDiv = document.createElement("div");
15
- modalEl.classList.add("ds-modal--hidden", "ds-modal--fallback");
10
+ const fallbackDiv = document.createElement('div');
11
+ modalEl.classList.add('ds-modal--hidden', 'ds-modal--fallback');
16
12
  modalAttributes.forEach((attr) => {
17
13
  fallbackDiv.setAttribute(attr.name, attr.value);
18
14
  });
19
- fallbackDiv.setAttribute("role", "dialog");
20
- fallbackDiv.setAttribute("aria-modal", "true");
15
+ fallbackDiv.setAttribute('role', 'dialog');
16
+ fallbackDiv.setAttribute('aria-modal', 'true');
21
17
  fallbackDiv.innerHTML = modalElInner.innerHTML;
22
18
  modalEl.replaceChild(fallbackDiv, modalElInner);
23
19
  }
24
20
 
25
- modalEl.addEventListener("click", (e) => {
26
- if (e.target === modalEl.querySelector(".ds-modal__inner")) closeModal(modalEl, isDialogSupported);
21
+ modalEl.addEventListener('click', (e) => {
22
+ if (e.target === modalEl.querySelector('.ds-modal__inner')) closeModal(modalEl, isDialogSupported);
27
23
  });
28
24
 
29
- const closeButtons = Array.from(modalEl.getElementsByClassName("ds-modal__close"));
25
+ const closeButtons = Array.from(modalEl.getElementsByClassName('ds-modal__close'));
30
26
  closeButtons.forEach((button) => {
31
- button.addEventListener("click", () => {
27
+ button.addEventListener('click', () => {
32
28
  closeModal(modalEl, isDialogSupported);
33
29
  });
34
30
  });
35
31
  }
36
32
 
37
33
  function openModal(modalEl) {
38
- if (typeof HTMLDialogElement === "function") {
39
- const modalElInner = modalEl.querySelector(".ds-modal__inner");
34
+ if (typeof HTMLDialogElement === 'function') {
35
+ const modalElInner = modalEl.querySelector('.ds-modal__inner');
40
36
  modalElInner.showModal();
41
37
  modalElInner.focus(); // Ensure the modal is focused when opened and not a button/link within it
42
38
  } else {
43
- modalEl.classList.remove("ds-modal--hidden");
44
- document.body.classList.add("no-scroll");
39
+ modalEl.classList.remove('ds-modal--hidden');
40
+ document.body.classList.add('no-scroll');
45
41
  }
46
42
  }
47
43
 
48
44
  function closeModal(modalEl, isDialogSupported) {
49
45
  if (isDialogSupported) {
50
- const modalElInner = modalEl.querySelector(".ds-modal__inner");
46
+ const modalElInner = modalEl.querySelector('.ds-modal__inner');
51
47
  modalElInner.close();
52
48
  } else {
53
- modalEl.classList.add("ds-modal--hidden");
54
- document.body.classList.remove("no-scroll");
49
+ modalEl.classList.add('ds-modal--hidden');
50
+ document.body.classList.remove('no-scroll');
55
51
  }
56
52
  }
57
53
 
58
54
  function initModalStorybook() {
59
- const modalEl = document.querySelector(".ds-modal");
55
+ const modalEl = document.querySelector('.ds-modal');
60
56
  initModal(modalEl);
61
57
  openModal(modalEl);
62
58
  }
@@ -1,7 +1,7 @@
1
1
  Pagination
2
2
  ==========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/commponents/pagination](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/pagination)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/commponents/pagination](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/pagination)
5
5
  * Storybook: [Pagination](https://designsystem.dn.se/?path=/docs/basic-pagination--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/pagination/pagination.scss'`
@@ -1,7 +1,7 @@
1
1
  Pictogram
2
2
  =========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/Pictogram](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/pictogram)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/Pictogram](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/pictogram)
5
5
  * Storybook: [Pictogram](https://designsystem.dn.se/?path=/docs/article-Pictogram--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/pictogram/pictogram.scss'`
@@ -1,7 +1,7 @@
1
1
  Pill
2
2
  ====
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/pill](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/pill)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/pill](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/pill)
5
5
  * Storybook: [Pill](https://designsystem.dn.se/?path=/docs/basic-pill--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/pill/pill.scss'`
@@ -1,7 +1,7 @@
1
1
  ProfileHeader
2
2
  =============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/profile-header](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/profile-header)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/profile-header](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/profile-header)
5
5
  * Storybook: [ProfileHeader](https://designsystem.dn.se/?path=/docs/section-profileheader--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/profile-header/profile-header.scss'`
@@ -1,7 +1,7 @@
1
1
  Quote
2
2
  =====
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/quote](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/quote)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/quote](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/quote)
5
5
  * Storybook: [Quote](https://designsystem.dn.se/?path=/docs/article-quote--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/quote/quote.scss'`
@@ -1,7 +1,7 @@
1
1
  RadioButton
2
2
  ===========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/radio-button](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/radio-button)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/radio-button](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/radio-button)
5
5
  * Storybook: [Checkbox](https://designsystem.dn.se/?path=/docs/basic-form-radiobutton--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/radio-button/radio-button.scss`
@@ -1,7 +1,7 @@
1
1
  Spinner
2
2
  =======
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/spinner](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/spinner)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/spinner](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/spinner)
5
5
  * Storybook: [Spinner](https://designsystem.dn.se/?path=/docs/basic-spinner--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/spinner/spinner.scss'`
@@ -1,7 +1,7 @@
1
1
  Switch
2
2
  ======
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/switch](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/switch)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/switch](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/switch)
5
5
  * Storybook: [Checkbox](https://designsystem.dn.se/?path=/docs/basic-form-switch--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/switch/switch.scss`
@@ -1,7 +1,7 @@
1
1
  TagHeader
2
2
  =========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/tag-header](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/tag-header)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/tag-header](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/tag-header)
5
5
  * Storybook: [TagHeader](https://designsystem.dn.se/?path=/docs/section-tagheader--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/tag-header/tag-header.scss'`
@@ -1,7 +1,7 @@
1
1
  TeaserCard
2
2
  ==========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-card](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-card)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-card](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-card)
5
5
  * Storybook: [Subcomponents > TeaserCard](https://designsystem.dn.se/?path=/docs/section-subcomponents-teaserdot--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/assets/teaser/teaser.scss'`
@@ -1,7 +1,7 @@
1
1
  TeaserCentered
2
2
  ==============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-centered](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-centered)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-centered](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-centered)
5
5
  * Storybook: [Teasercentered](https://designsystem.dn.se/?path=/docs/section-teasercentered--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-centered/teaser-centered.scss'`
@@ -11,7 +11,7 @@ The component will not include styling by itself. Make sure to include the right
11
11
  | classNames | Ex. "my-special-class"<br />string | \- |
12
12
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
13
13
  | targetLink\* | Target URL for the teaser<br />string | \- |
14
- | areaType | The area where the column is rendered<br />"right", "bauta" | \- |
14
+ | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
15
15
  | title\* | Heading of the teaser<br />string | \- |
16
16
  | text | Teaser subtext<br />string | \- |
17
17
  | vignette | Top text in the teaser<br />string | \- |
@@ -1,7 +1,7 @@
1
1
  TeaserCounter
2
2
  =============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-onsite](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-counter)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-onsite](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-counter)
5
5
  * Storybook: [TeaserCounter](https://designsystem.dn.se/?path=/docs/section-teaser-counter--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-counter/teaser-counter.scss'`
@@ -14,7 +14,7 @@ The component will not include styling by itself. Make sure to include the right
14
14
  | classNames | Ex. "my-special-class"<br />string | \- |
15
15
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
16
16
  | targetLink\* | Target URL for the teaser<br />string | \- |
17
- | areaType | The area where the column is rendered<br />"right", "bauta" | \- |
17
+ | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
18
18
  | title\* | Heading of the teaser<br />string | \- |
19
19
  | media | Main image or other media<br />ComponentChild | \- |
20
20
 
@@ -1,7 +1,7 @@
1
1
  TeaserDot
2
2
  =========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-dot](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-dot)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-dot](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-dot)
5
5
  * Storybook: [TeaserDot](https://designsystem.dn.se/?path=/docs/section-teaser-dot--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-dot/teaser-dot.scss'`
@@ -1,7 +1,7 @@
1
1
  TeaserFooter
2
2
  ============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-footer](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-footer)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-footer](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-footer)
5
5
  * Storybook: [Subcomponents > TeaserFooter](https://designsystem.dn.se/?path=/docs/section-subcomponents-teaserfooter--docs)
6
6
 
7
7
  | Name | Description | Default |
@@ -1,7 +1,7 @@
1
1
  TeaserImage
2
2
  ===========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-image)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-image](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-image)
5
5
  * Storybook: [TeaserImage](https://designsystem.dn.se/?path=/docs/section-subcomponents-teaserimage--docs)
6
6
 
7
7
  Image caption will never scale (forcePx is always true)
@@ -1,7 +1,7 @@
1
1
  TeaserLarge
2
2
  ===========
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-large](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-large)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-large](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-large)
5
5
  * Storybook: [TeaserLarge](https://designsystem.dn.se/?path=/docs/section-teaserlarge--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-large/teaser-large.scss'`
@@ -27,7 +27,7 @@ The component will not include styling by itself. Make sure to include the right
27
27
  | vignette | Top text in the teaser<br />string | \- |
28
28
  | text | Teaser subtext<br />string | \- |
29
29
  | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | \- |
30
- | areaType | The area where the column is rendered<br />"right", "bauta" | \- |
30
+ | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
31
31
  | variant | Variant of the teaser<br />"default", "podcast", "insandare", "direkt" | "default" |
32
32
  | targetLink\* | Target URL for the teaser<br />string | \- |
33
33
 
@@ -1,7 +1,7 @@
1
1
  TeaserListSwipe
2
2
  ===============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-list-swipe](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-list-swipe)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-list-swipe](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-list-swipe)
5
5
  * Storybook: [TeaserListSwipe](https://designsystem.dn.se/?path=/docs/section-teaserlistswipe--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-list-swipe/teaser-list-swipe.scss'`
@@ -1,7 +1,7 @@
1
1
  TeaserListVertical
2
2
  ==================
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-list-vertical](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-list-vertical)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-list-vertical](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-list-vertical)
5
5
  * Storybook: [TeaserListVertical](https://designsystem.dn.se/?path=/docs/section-teaserlistvertical--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-list-vertical/teaser-list-vertical.scss'`
@@ -1,22 +1,19 @@
1
- export {
2
- dsTeaserListVertical,
3
- dsTeaserListVerticalStory
4
- }
1
+ export { dsTeaserListVertical, dsTeaserListVerticalStory };
5
2
 
6
3
  function dsTeaserListVertical(teaserListVerticalWrappers = []) {
7
4
  teaserListVerticalWrappers.forEach((wrapper) => {
8
- const teaserListGroupHeader = wrapper.querySelector(".ds-group-header--bottom-border");
9
- teaserListGroupHeader?.classList.remove("ds-group-header--bottom-border");
5
+ const teaserListGroupHeader = wrapper.querySelector('.ds-group-header--bottom-border');
6
+ teaserListGroupHeader?.classList.remove('ds-group-header--bottom-border');
10
7
 
11
- const teaserListVerticalContentContainer = wrapper.querySelector(".ds-teaser-list-vertical__content");
12
- teaserListVerticalContentContainer.addEventListener("scroll", () => {
8
+ const teaserListVerticalContentContainer = wrapper.querySelector('.ds-teaser-list-vertical__content');
9
+ teaserListVerticalContentContainer.addEventListener('scroll', () => {
13
10
  const scrolledToTop = teaserListVerticalContentContainer.scrollTop === 0;
14
- teaserListGroupHeader.classList.toggle("ds-group-header--bottom-border", !scrolledToTop);
11
+ teaserListGroupHeader.classList.toggle('ds-group-header--bottom-border', !scrolledToTop);
15
12
  });
16
13
  });
17
14
  }
18
15
 
19
16
  function dsTeaserListVerticalStory() {
20
- const teaserListVerticalWrappers = Array.from(document.getElementsByClassName("ds-teaser-list-vertical--flexible"));
17
+ const teaserListVerticalWrappers = Array.from(document.getElementsByClassName('ds-teaser-list-vertical--flexible'));
21
18
  dsTeaserListVertical(teaserListVerticalWrappers);
22
19
  }
@@ -1,7 +1,7 @@
1
1
  TeaserLonglife
2
2
  ==============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-longlife](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-longlife)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-longlife](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-longlife)
5
5
  * Storybook: [TeaserLonglife](https://designsystem.dn.se/?path=/docs/section-teaserlonglife--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-longlife/teaser-longlife.scss'`
@@ -5,7 +5,7 @@ Also known as "På Plats-puffen".
5
5
 
6
6
  In the CMS title will be set to a location like "Kiev, Ukraina" or "USA" and text is usually set to some author names like "Jan Banan och Kalle Kula"
7
7
 
8
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-onsite](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-onsite)
8
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-onsite](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-onsite)
9
9
  * Storybook: [TeaserOnSite](https://designsystem.dn.se/?path=/docs/section-teaseronsite--docs)
10
10
 
11
11
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-onsite/teaser-onsite.scss'`
@@ -15,7 +15,7 @@ The component will not include styling by itself. Make sure to include the right
15
15
  | classNames | Ex. "my-special-class"<br />string | \- |
16
16
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
17
17
  | targetLink\* | Target URL for the teaser<br />string | \- |
18
- | areaType | The area where the column is rendered<br />"right", "bauta" | \- |
18
+ | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
19
19
  | title\* | Heading of the teaser<br />string | \- |
20
20
  | text | Teaser subtext<br />string | \- |
21
21
  | media | Main image or other media<br />ComponentChild | \- |
@@ -1,7 +1,7 @@
1
1
  TeaserPackage
2
2
  =============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-package](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-package)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-package](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-package)
5
5
  * Storybook: [TeaserPackage](https://designsystem.dn.se/?path=/docs/section-teaserpackage--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
@@ -1,7 +1,7 @@
1
1
  TeaserRightNow
2
2
  ==============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-right-now](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-right-now)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-right-now](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-right-now)
5
5
  * Storybook: [TeaserRightNow](https://designsystem.dn.se/?path=/docs/section-teaserrightnow--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-right-now)/teaser-right-now.scss'`
@@ -11,7 +11,7 @@ The component will not include styling by itself. Make sure to include the right
11
11
  | classNames | Ex. "my-special-class"<br />string | \- |
12
12
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
13
13
  | targetLink\* | Target URL for the teaser<br />string | \- |
14
- | areaType | The area where the column is rendered<br />"right", "bauta" | \- |
14
+ | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
15
15
  | title\* | Heading of the teaser<br />string | \- |
16
16
  | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | "nyheter" |
17
17
 
@@ -1,7 +1,7 @@
1
1
  TeaserSlideshow
2
2
  ===============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-slideshow](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-slideshow)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-slideshow](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-slideshow)
5
5
  * Storybook: [TeaserSlideshow](https://designsystem.dn.se/?path=/docs/section-teaserslideshow--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-slideshow/teaser-slideshow.scss'`
@@ -1,7 +1,7 @@
1
1
  TeaserStandard
2
2
  ==============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-standard](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-standard)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-standard](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-standard)
5
5
  * Storybook: [TeaserStandard](https://designsystem.dn.se/?path=/docs/section-teaserstandard--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-standard/teaser-standard.scss'`
@@ -44,7 +44,7 @@ const teaserStandardHtml = dsTeaserStandard(parameters);
44
44
  | vignette | Top text in the teaser<br />string | \- |
45
45
  | text | Teaser subtext<br />string | \- |
46
46
  | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | \- |
47
- | areaType | The area where the column is rendered<br />"right", "bauta" | \- |
47
+ | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
48
48
  | variant | Variant of the teaser<br />"default", "podcast", "insandare", "direkt" | \- |
49
49
  | targetLink\* | Target URL for the teaser<br />string | \- |
50
50
  | title\* | Heading of the teaser<br />string | \- |
@@ -1,10 +1,7 @@
1
- export {
2
- dsTeaserStandard,
3
- dsTeaserStandardStory
4
- };
1
+ export { dsTeaserStandard, dsTeaserStandardStory };
5
2
 
6
3
  function dsTeaserStandard(params = {}) {
7
- const teaser = document.createElement("a");
4
+ const teaser = document.createElement('a');
8
5
  // NOTE: this should match output of teaser-standard.tsx for a subset of the parameters
9
6
  teaser.innerHTML = `
10
7
  <div class="ds-teaser__content">
@@ -13,22 +10,22 @@ function dsTeaserStandard(params = {}) {
13
10
  <p class="ds-teaser__text"></p>
14
11
  </div>
15
12
  </div>`;
16
- teaser.classList.add("ds-teaser");
17
- teaser.classList.add("ds-teaser--standard");
18
- teaser.classList.add("ds-teaser--standard-without-byline");
13
+ teaser.classList.add('ds-teaser');
14
+ teaser.classList.add('ds-teaser--standard');
15
+ teaser.classList.add('ds-teaser--standard-without-byline');
19
16
 
20
17
  if (params.targetLink) {
21
- teaser.setAttribute("href", params.targetLink)
18
+ teaser.setAttribute('href', params.targetLink);
22
19
  }
23
20
 
24
21
  if (params.title) {
25
- const titleEl = teaser.getElementsByClassName("ds-teaser__title")[0];
22
+ const titleEl = teaser.getElementsByClassName('ds-teaser__title')[0];
26
23
  titleEl.textContent = params.title;
27
24
  }
28
25
 
29
26
  if (params.text) {
30
- const textEl = teaser.getElementsByClassName("ds-teaser__text")[0];
31
- textEl.appendChild(document.createTextNode(params.text))
27
+ const textEl = teaser.getElementsByClassName('ds-teaser__text')[0];
28
+ textEl.appendChild(document.createTextNode(params.text));
32
29
  }
33
30
 
34
31
  if (params.classNames) {
@@ -46,9 +43,9 @@ function dsTeaserStandard(params = {}) {
46
43
 
47
44
  /** only use in storybook */
48
45
  function dsTeaserStandardStory() {
49
- const jsTeasers = Array.from(document.getElementsByClassName("js-ds-teaser-standard-story"));
46
+ const jsTeasers = Array.from(document.getElementsByClassName('js-ds-teaser-standard-story'));
50
47
  jsTeasers.forEach((teaserEl) => {
51
- const params = JSON.parse(teaserEl.getAttribute("data-params"));
48
+ const params = JSON.parse(teaserEl.getAttribute('data-params'));
52
49
  teaserEl.replaceWith(dsTeaserStandard(params));
53
50
  });
54
51
  }
@@ -1,7 +1,7 @@
1
1
  TeaserSwipeCard
2
2
  ===============
3
3
 
4
- * GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-swipe-card](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-swipe-card)
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-swipe-card](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-swipe-card)
5
5
  * Storybook: [TeaserSwipeCard](https://designsystem.dn.se/?path=/docs/section-teaserlistswipe-teaserswipecard--docs)
6
6
 
7
7
  The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-swipe-card/teaser-swipe-card.scss'`
@@ -27,7 +27,7 @@ The component will not include styling by itself. Make sure to include the right
27
27
  | vignette | Top text in the teaser<br />string | \- |
28
28
  | text | Teaser subtext<br />string | \- |
29
29
  | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | \- |
30
- | areaType | The area where the column is rendered<br />"right", "bauta" | \- |
30
+ | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
31
31
  | variant | Variant of the teaser<br />"default", "podcast", "insandare", "direkt" | \- |
32
32
  | targetLink\* | Target URL for the teaser<br />string | \- |
33
33
  | title\* | Heading of the teaser<br />string | \- |