@bonniernews/dn-design-system-web 32.7.48 → 33.0.1-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 (82) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/assets/types/teaser-props.ts +45 -26
  3. package/components/factbox/README.md +1 -1
  4. package/components/quote/README.md +1 -1
  5. package/components/tag-header/README.md +1 -1
  6. package/components/teaser-card/README.md +3 -3
  7. package/components/teaser-centered/README.md +6 -6
  8. package/components/teaser-counter/README.md +3 -3
  9. package/components/teaser-footer/README.md +5 -5
  10. package/components/teaser-list-swipe/README.md +2 -3
  11. package/components/teaser-list-vertical/README.md +1 -1
  12. package/components/teaser-longlife/README.md +3 -4
  13. package/components/teaser-onsite/README.md +5 -5
  14. package/components/teaser-package/README.md +2 -2
  15. package/components/teaser-right-now/README.md +5 -4
  16. package/components/teaser-slideshow/README.md +5 -5
  17. package/components/teaser-split/README.md +37 -0
  18. package/components/teaser-split/teaser-split.scss +2 -2
  19. package/components/teaser-split-container/README.md +44 -0
  20. package/components/teaser-standard/README.md +13 -16
  21. package/components/teaser-swipe-card/README.md +8 -20
  22. package/components/teaser-text-on-image/README.md +4 -5
  23. package/components/teaser-text-on-image/teaser-text-on-image.njk +1 -1
  24. package/components/teaser-text-on-image/teaser-text-on-image.scss +0 -4
  25. package/components/teaser-tipsa/README.md +3 -3
  26. package/package.json +1 -1
  27. package/preact/components/teaser-card/teaser-card.d.ts +5 -2
  28. package/preact/components/teaser-card/teaser-card.js.map +2 -2
  29. package/preact/components/teaser-centered/teaser-centered.d.ts +3 -4
  30. package/preact/components/teaser-centered/teaser-centered.js +5 -5
  31. package/preact/components/teaser-centered/teaser-centered.js.map +2 -2
  32. package/preact/components/teaser-counter/teaser-counter.d.ts +3 -3
  33. package/preact/components/teaser-counter/teaser-counter.js +2 -2
  34. package/preact/components/teaser-counter/teaser-counter.js.map +2 -2
  35. package/preact/components/teaser-footer/teaser-footer.d.ts +5 -9
  36. package/preact/components/teaser-footer/teaser-footer.js +5 -5
  37. package/preact/components/teaser-footer/teaser-footer.js.map +2 -2
  38. package/preact/components/teaser-large/teaser-large.d.ts +7 -2
  39. package/preact/components/teaser-large/teaser-large.js +20 -12
  40. package/preact/components/teaser-large/teaser-large.js.map +2 -2
  41. package/preact/components/teaser-list-swipe/teaser-list-swipe.d.ts +5 -8
  42. package/preact/components/teaser-list-swipe/teaser-list-swipe.js +1 -2
  43. package/preact/components/teaser-list-swipe/teaser-list-swipe.js.map +2 -2
  44. package/preact/components/teaser-list-vertical/teaser-list-vertical.d.ts +3 -2
  45. package/preact/components/teaser-list-vertical/teaser-list-vertical.js +6 -6
  46. package/preact/components/teaser-list-vertical/teaser-list-vertical.js.map +2 -2
  47. package/preact/components/teaser-longlife/teaser-longlife.d.ts +2 -2
  48. package/preact/components/teaser-longlife/teaser-longlife.js +2 -2
  49. package/preact/components/teaser-longlife/teaser-longlife.js.map +2 -2
  50. package/preact/components/teaser-native/teaser-native.d.ts +2 -3
  51. package/preact/components/teaser-native/teaser-native.js +5 -11
  52. package/preact/components/teaser-native/teaser-native.js.map +2 -2
  53. package/preact/components/teaser-onsite/teaser-onsite.d.ts +2 -3
  54. package/preact/components/teaser-onsite/teaser-onsite.js +3 -3
  55. package/preact/components/teaser-onsite/teaser-onsite.js.map +2 -2
  56. package/preact/components/teaser-package/teaser-package.d.ts +3 -3
  57. package/preact/components/teaser-package/teaser-package.js +9 -7
  58. package/preact/components/teaser-package/teaser-package.js.map +2 -2
  59. package/preact/components/teaser-right-now/teaser-right-now.d.ts +2 -3
  60. package/preact/components/teaser-right-now/teaser-right-now.js +1 -1
  61. package/preact/components/teaser-right-now/teaser-right-now.js.map +2 -2
  62. package/preact/components/teaser-slideshow/teaser-slideshow.d.ts +2 -4
  63. package/preact/components/teaser-slideshow/teaser-slideshow.js +3 -9
  64. package/preact/components/teaser-slideshow/teaser-slideshow.js.map +2 -2
  65. package/preact/components/teaser-split/teaser-split.d.ts +7 -11
  66. package/preact/components/teaser-split/teaser-split.js +10 -27
  67. package/preact/components/teaser-split/teaser-split.js.map +2 -2
  68. package/preact/components/teaser-split-container/teaser-split-container.d.ts +12 -0
  69. package/preact/components/teaser-split-container/teaser-split-container.js +186 -0
  70. package/preact/components/teaser-split-container/teaser-split-container.js.map +7 -0
  71. package/preact/components/teaser-standard/teaser-standard.d.ts +5 -2
  72. package/preact/components/teaser-standard/teaser-standard.js +20 -12
  73. package/preact/components/teaser-standard/teaser-standard.js.map +2 -2
  74. package/preact/components/teaser-swipe-card/teaser-swipe-card.d.ts +3 -2
  75. package/preact/components/teaser-swipe-card/teaser-swipe-card.js.map +2 -2
  76. package/preact/components/teaser-text-on-image/teaser-text-on-image.d.ts +3 -4
  77. package/preact/components/teaser-text-on-image/teaser-text-on-image.js +5 -6
  78. package/preact/components/teaser-text-on-image/teaser-text-on-image.js.map +2 -2
  79. package/preact/components/teaser-tipsa/teaser-tipsa.d.ts +2 -4
  80. package/preact/components/teaser-tipsa/teaser-tipsa.js +3 -10
  81. package/preact/components/teaser-tipsa/teaser-tipsa.js.map +2 -2
  82. /package/components/{teaser-split → teaser-split-container}/README-container-njk.md +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
+ ## [33.0.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@32.7.48...@bonniernews/dn-design-system-web@33.0.0) (2025-08-20)
8
+
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+
12
+ * **web:** teaser-props-cleanup (#1866)
13
+
14
+ ### Maintenance
15
+
16
+ * **web:** teaser-props-cleanup ([#1866](https://github.com/BonnierNews/dn-design-system/issues/1866)) ([6eecff4](https://github.com/BonnierNews/dn-design-system/commit/6eecff413b68c40ff0d530e6ddd7eb5fe67d0d49))
17
+
7
18
  ## [32.7.48](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@32.7.47...@bonniernews/dn-design-system-web@32.7.48) (2025-08-18)
8
19
 
9
20
 
@@ -2,45 +2,64 @@ import { ComponentChild } from 'preact'
2
2
 
3
3
  import type { SharedProps } from '@bonniernews/dn-design-system-web/assets/types/shared-props.ts'
4
4
 
5
- export interface TeaserProps extends SharedProps {
5
+ import type { TeaserCardProps } from '@bonniernews/dn-design-system-web/components/teaser-card/teaser-card.tsx'
6
+
7
+ export interface TeaserBaseProps extends TeaserTitleProps, Omit<TeaserCardProps, 'children' | 'theme'> {}
8
+
9
+ export interface TeaserTitleProps {
6
10
  /** Heading of the teaser */
7
11
  title: string
8
- /** Target URL for the teaser */
9
- targetLink: string
10
- /** Variant of the teaser */
11
- variant?: 'default' | 'podcast' | 'insandare' | 'direkt'
12
- /** The area where the column is rendered */
13
- areaType?: 'right' | 'bauta' | 'main'
14
- /** The theme-class to apply to the teaser */
15
- theme?: 'nyheter' | 'kultur'
16
- /** Teaser subtext */
17
- text?: string
18
- /** Top text in the teaser */
19
- vignette?: string
12
+ }
13
+
14
+ export interface TeaserThemeProps extends Pick<TeaserCardProps, 'theme'> {}
15
+
16
+ export interface TeaserHighlightProps {
20
17
  /** Text before the heading */
21
18
  highlight?: string
22
- /** Red text before the text */
23
- sticker?: string
19
+ }
20
+
21
+ export interface TeaserItalicHeadlineProps {
22
+ /** If the headline should be italic */
23
+ isItalicHeadline?: boolean
24
+ }
25
+
26
+ export interface TeaserVignetteProps {
27
+ /** Top text in the teaser */
28
+ vignette?: string
29
+ }
30
+
31
+ export interface TeaserVariantProps {
32
+ /** Variant of the teaser */
33
+ variant?: 'default' | 'podcast' | 'direkt' | 'insandare'
34
+ }
35
+
36
+ export interface TeaserMediaProps {
24
37
  /** Main image or other media */
25
38
  media?: ComponentChild
26
- /** Flag so we can handle square teaser images */
27
- isSquareImage?: boolean
28
- /** Image of the author */
39
+ }
40
+
41
+ export interface TeaserBylineProps {
42
+ /** Byline image */
29
43
  bylinePicture?: ComponentChild
30
- /** If the headline should be italic */
31
- isItalicHeadline?: boolean
32
- /** If the headline should be large (only if `isItalicHeadline` is true) */
33
- isLargeHeadline?: boolean
44
+ }
45
+
46
+ export interface TeaserTextProps {
47
+ /** Teaser subtext */
48
+ text?: string
49
+ }
50
+
51
+ export interface TeaserBodyDecoratorsProps {
52
+ /** Red text before the text */
53
+ sticker?: string
34
54
  /** If there should be a flashing ball before the text */
35
55
  isFlashingDot?: boolean
56
+ }
57
+
58
+ export interface TeaserFooterProps extends SharedProps {
36
59
  /** Publication time text */
37
60
  publicationTime?: string
38
61
  /** Duration of podcast */
39
62
  duration?: string
40
- /** Byline aspect ratio */
41
- bylineAspectRatio?: string
42
- /** Byline HTML */
43
- bylineHtml?: string
44
63
  /** Shows in teaser footer */
45
64
  sectionName?: string
46
65
  }
@@ -12,7 +12,7 @@ The component will not include styling by itself. Make sure to include the right
12
12
  | titleHighlight | string | \- |
13
13
  | titleImage | ComponentChild | \- |
14
14
  | bodyParts\* | BodyPart\[\] | \- |
15
- | theme | "nyheter", "kultur", "default" | \- |
15
+ | theme | "kultur", "nyheter", "default" | \- |
16
16
  | forceExpand | boolean | false |
17
17
  | classNames | Ex. "my-special-class"<br />string | \- |
18
18
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
@@ -9,7 +9,7 @@ The component will not include styling by itself. Make sure to include the right
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
11
  | bodyHtml\* | string | \- |
12
- | theme | "nyheter", "kultur" | "nyheter" |
12
+ | theme | "kultur", "nyheter" | "nyheter" |
13
13
  | forcePx | boolean | \- |
14
14
  | classNames | Ex. "my-special-class"<br />string | \- |
15
15
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
@@ -14,7 +14,7 @@ The component will not include styling by itself. Make sure to include the right
14
14
  | media | Main image<br />ComponentChild | \- |
15
15
  | descriptionHtml | Intended use is text, links<br />string | \- |
16
16
  | articleCount | Total articles on this list-page<br />number | \- |
17
- | theme | The theme-class to apply to the vignette<br />"nyheter", "kultur" | \- |
17
+ | theme | The theme-class to apply to the vignette<br />"kultur", "nyheter" | \- |
18
18
  | toggle | Show/hide toggle button<br />boolean | false |
19
19
  | toggleText | `text` parameter to ToggleButton (only if `toggle` is enabled)<br />string | \- |
20
20
  | toggleSelectedText | `selectedText` parameter to ToggleButton (only if `toggle` is enabled)<br />string | \- |
@@ -8,9 +8,9 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
- | areaType | "right", "bauta", "main" | \- |
12
- | targetLink | string | \- |
13
- | theme | "nyheter", "kultur" | "nyheter" |
11
+ | areaType | The area where the column is rendered<br />"main", "right", "bauta" | \- |
12
+ | targetLink | Target URL for the teaser<br />string | \- |
13
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | "nyheter" |
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
 
@@ -8,16 +8,16 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
+ | areaType | The area where the column is rendered<br />"main", "bauta" | \- |
12
+ | title\* | Heading of the teaser<br />string | \- |
13
+ | targetLink | Target URL for the teaser<br />string | \- |
11
14
  | classNames | Ex. "my-special-class"<br />string | \- |
12
15
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
13
- | targetLink\* | Target URL for the teaser<br />string | \- |
14
- | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
15
- | title\* | Heading of the teaser<br />string | \- |
16
- | text | Teaser subtext<br />string | \- |
16
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | "nyheter" |
17
+ | highlight | Text before the heading<br />string | \- |
17
18
  | vignette | Top text in the teaser<br />string | \- |
18
19
  | media | Main image or other media<br />ComponentChild | \- |
19
- | highlight | Text before the heading<br />string | \- |
20
- | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | "nyheter" |
20
+ | text | Teaser subtext<br />string | \- |
21
21
 
22
22
  ```jsx
23
23
  <TeaserCentered
@@ -8,14 +8,14 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
+ | areaType | The area where the column is rendered<br />"main", "bauta" | \- |
11
12
  | counterText\* | string | \- |
12
13
  | counterNumber\* | number | \- |
13
14
  | subtitle | string | \- |
15
+ | title\* | Heading of the teaser<br />string | \- |
16
+ | targetLink | Target URL for the teaser<br />string | \- |
14
17
  | classNames | Ex. "my-special-class"<br />string | \- |
15
18
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
16
- | targetLink\* | Target URL for the teaser<br />string | \- |
17
- | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
18
- | title\* | Heading of the teaser<br />string | \- |
19
19
  | media | Main image or other media<br />ComponentChild | \- |
20
20
 
21
21
  ```jsx
@@ -6,17 +6,17 @@ TeaserFooter
6
6
 
7
7
  | Name | Description | Default |
8
8
  |:--- | :--- | :--- |
9
- | variant\* | "default", "podcast", "informationText" | \- |
10
- | publicationTime | string | \- |
11
- | sectionName | Name of section the teaser is connected to<br />string | \- |
12
- | duration | The length of the podcast<br />string | \- |
9
+ | footerVariant | "default", "podcast", "informationText" | \- |
10
+ | publicationTime | Publication time text<br />string | \- |
11
+ | duration | Duration of podcast<br />string | \- |
12
+ | sectionName | Shows in teaser footer<br />string | \- |
13
13
  | classNames | Ex. "my-special-class"<br />string | \- |
14
14
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
15
15
 
16
16
  ```jsx
17
17
  <TeaserFooter
18
+ footerVariant="informationText"
18
19
  publicationTime="10:15"
19
20
  sectionName="Nyheter"
20
- variant="informationText"
21
21
  />
22
22
  ```
@@ -8,11 +8,10 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
- | title\* | Heading of the teaser<br />string | \- |
11
+ | title\* | The header of the teaser list<br />string | \- |
12
+ | areaType | The area where the column is rendered<br />"main", "bauta" | \- |
12
13
  | titleHref | Target URL for the header<br />string | \- |
13
- | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
14
14
  | arrowPosition | Determines where the scroll arrows are rendered<br />"floating", "header" | "header" |
15
- | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | \- |
16
15
  | teasers | A list of arguments to TeaserSwipeCard<br />TeaserSwipeCardProps\[\] | \[\] |
17
16
  | groupHeaderType | Type of group header<br />"link", "icon", "toggle", "arrows" | \- |
18
17
  | groupHeaderToggleText | Text in toggle button<br />string | \- |
@@ -12,7 +12,7 @@ The component will not include styling by itself. Make sure to include the right
12
12
  | listLink | Ex. { text: "Alla nyheter", url: "#" }<br />ListLink | \- |
13
13
  | flexible | If true, the list will be flexible<br />boolean | false |
14
14
  | teasers\* | Array with teaser objects. Ex. \[ { title: 'Malmö var det enda rimliga valet för Eurovision', targetLink: '#', highlight: 'Hanna Fahl:', publicationTime: 'I GÅR 12:28', sectionName: 'Kultur', attributes: { "data-test": "list-item-test-data" }, showPlayButton: false } \]<br />ListTeaser\[\] | \- |
15
- | theme | The theme-class to apply to _all_ teasers in the list.<br />"nyheter", "kultur" | \- |
15
+ | theme | The theme-class to apply to _all_ teasers in the list.<br />"kultur", "nyheter" | \- |
16
16
  | classNames | Ex. "my-special-class"<br />string | \- |
17
17
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
18
18
 
@@ -8,13 +8,12 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
- | targetLink\* | Target URL for the teaser<br />string | \- |
12
- | title\* | Heading of the teaser<br />string | \- |
11
+ | targetLink | Target URL for the teaser<br />string | \- |
13
12
  | classNames | Ex. "my-special-class"<br />string | \- |
14
13
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
15
- | vignette | Top text in the teaser<br />string | \- |
14
+ | title\* | Heading of the teaser<br />string | \- |
16
15
  | media | Main image or other media<br />ComponentChild | \- |
17
- | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | \- |
16
+ | vignette | Top text in the teaser<br />string | \- |
18
17
 
19
18
  ```jsx
20
19
  <TeaserLonglife
@@ -12,14 +12,14 @@ The component will not include styling by itself. Make sure to include the right
12
12
 
13
13
  | Name | Description | Default |
14
14
  |:--- | :--- | :--- |
15
+ | title\* | Heading of the teaser<br />string | \- |
16
+ | targetLink | Target URL for the teaser<br />string | \- |
17
+ | areaType | The area where the column is rendered<br />"main", "right", "bauta" | \- |
15
18
  | classNames | Ex. "my-special-class"<br />string | \- |
16
19
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
17
- | targetLink\* | Target URL for the teaser<br />string | \- |
18
- | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
19
- | title\* | Heading of the teaser<br />string | \- |
20
- | text | Teaser subtext<br />string | \- |
20
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | "nyheter" |
21
21
  | media | Main image or other media<br />ComponentChild | \- |
22
- | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | "nyheter" |
22
+ | text | Teaser subtext<br />string | \- |
23
23
 
24
24
  ```jsx
25
25
  <TeaserOnSite
@@ -16,14 +16,14 @@ If you **only** want to include the styles for the teaser package, you can do so
16
16
 
17
17
  | Name | Description | Default |
18
18
  |:--- | :--- | :--- |
19
- | areaType | "bauta", "default" | \- |
19
+ | areaType | The area where the column is rendered<br />"main", "bauta" | \- |
20
20
  | vignetteText | string | \- |
21
21
  | vignetteTargetUrl | string | \- |
22
22
  | vignetteIcon | ComponentChild | \- |
23
23
  | teasers | ComponentChild | \- |
24
24
  | classNames | Ex. "my-special-class"<br />string | \- |
25
25
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
26
- | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | \- |
26
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
27
27
 
28
28
  ```jsx
29
29
  <TeaserPackage
@@ -8,12 +8,13 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
+ | title\* | Heading of the teaser<br />string | \- |
12
+ | targetLink | Target URL for the teaser<br />string | \- |
13
+ | areaType | The area where the column is rendered<br />"main", "right", "bauta" | \- |
11
14
  | classNames | Ex. "my-special-class"<br />string | \- |
12
15
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
13
- | targetLink\* | Target URL for the teaser<br />string | \- |
14
- | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
15
- | title\* | Heading of the teaser<br />string | \- |
16
- | theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | "nyheter" |
16
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | "nyheter" |
17
+ | highlight | Text before the heading<br />string | \- |
17
18
 
18
19
  ```jsx
19
20
  <TeaserRightNow
@@ -8,14 +8,14 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
+ | title\* | Heading of the teaser<br />string | \- |
12
+ | targetLink | Target URL for the teaser<br />string | \- |
13
+ | areaType | The area where the column is rendered<br />"main", "right", "bauta" | \- |
11
14
  | classNames | Ex. "my-special-class"<br />string | \- |
12
15
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
13
- | areaType | "right", "bauta", "main" | \- |
14
- | targetLink | string | \- |
15
- | theme | "nyheter", "kultur" | \- |
16
- | title\* | Heading of the teaser<br />string | \- |
17
- | text | Teaser subtext<br />string | \- |
16
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
18
17
  | media | Main image or other media<br />ComponentChild | \- |
18
+ | text | Teaser subtext<br />string | \- |
19
19
 
20
20
  ```jsx
21
21
  <TeaserSlideshow
@@ -0,0 +1,37 @@
1
+ TeaserSplit
2
+ ===========
3
+
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-split](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-split)
5
+ * Storybook: [TeaserSplit](https://designsystem.dn.se/?path=/docs/section-teasersplit--docs)
6
+
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-split/teaser-split.scss'`
8
+
9
+ | Name | Description | Default |
10
+ |:--- | :--- | :--- |
11
+ | title\* | Heading of the teaser<br />string | \- |
12
+ | areaType | The area where the column is rendered<br />"main", "bauta" | \- |
13
+ | variant | Variant of the teaser<br />"default", "podcast" | \- |
14
+ | targetLink | Target URL for the teaser<br />string | \- |
15
+ | classNames | Ex. "my-special-class"<br />string | \- |
16
+ | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
17
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
18
+ | highlight | Text before the heading<br />string | \- |
19
+ | vignette | Top text in the teaser<br />string | \- |
20
+ | media | Main image or other media<br />ComponentChild | \- |
21
+ | text | Teaser subtext<br />string | \- |
22
+ | sticker | Red text before the text<br />string | \- |
23
+ | isFlashingDot | If there should be a flashing ball before the text<br />boolean | \- |
24
+ | publicationTime | Publication time text<br />string | \- |
25
+ | duration | Duration of podcast<br />string | \- |
26
+ | sectionName | Shows in teaser footer<br />string | \- |
27
+
28
+ ```jsx
29
+ <TeaserSplit
30
+ isFlashingDot
31
+ media={<TeaserImage byline="Foto: Pavel Bednyakov/Sputnik/AFP" image={<ExamplePicture alt="" className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder-lab/dn-mly/fd0abe35-9282-46ed-addc-8af0e471db74.jpeg" style={{aspectRatio: '16 / 9'}}/>}/>}
32
+ sticker="Live"
33
+ targetLink="https://www.dn.se/sverige/ryska-militarflyg-over-ostersjon/"
34
+ text="Flög utan transpondrar • Upptäcktes av tyska flygvapnet."
35
+ title="Ryska militärflyg över Östersjön"
36
+ />
37
+ ```
@@ -25,8 +25,9 @@
25
25
  &.ds-split-container--bauta {
26
26
  background-color: $ds-color-surface-breaking;
27
27
  }
28
+ }
28
29
 
29
- .ds-teaser--split {
30
+ .ds-teaser--split {
30
31
  box-sizing: content-box;
31
32
  display: block;
32
33
  position: relative;
@@ -99,4 +100,3 @@
99
100
  }
100
101
  }
101
102
  }
102
- }
@@ -0,0 +1,44 @@
1
+ TeaserSplitContainer
2
+ ====================
3
+
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/teaser-split](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-split-container)
5
+ * Storybook: [TeaserSplit](https://designsystem.dn.se/?path=/docs/section-teasersplit-teasersplitcontainer--docs)
6
+
7
+ | Name | Description | Default |
8
+ |:--- | :--- | :--- |
9
+ | areaType | The area where the column is rendered<br />"main", "bauta" | \- |
10
+ | teasers\* | TeaserSplitProps\[\] | \- |
11
+ | targetLink | Target URL for the teaser<br />string | \- |
12
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
13
+ | classNames | Ex. "my-special-class"<br />string | \- |
14
+ | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
15
+
16
+ ```jsx
17
+ <TeaserSplitContainer
18
+ teasers={[
19
+ {
20
+ highlight: undefined,
21
+ media: <TeaserImage byline="Foto: Lars Schröder/TT" image={<ExamplePicture alt="" className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder-lab/dn-mly/9371897d-7150-4343-bc53-e6d37e25774a.jpeg" style={{aspectRatio: '16 / 9'}}/>}/>,
22
+ sticker: undefined,
23
+ targetLink: 'https://www.dn.se/kultur/omar-souleyman-far-dansgolvet-att-koka/',
24
+ text: 'Hans gubbtafatta dansrörelser är minst sagt älskvärda, skriver Saga Cavallin.',
25
+ theme: 'kultur',
26
+ title: 'Omar Souleyman får dansgolvet på Kulturhuset att koka',
27
+ variant: undefined,
28
+ vignette: 'MUSIK | RECENSION'
29
+ },
30
+ {
31
+ highlight: undefined,
32
+ isFlashingDot: true,
33
+ media: <TeaserImage byline="Foto: Pavel Bednyakov/Sputnik/AFP" image={<ExamplePicture alt="" className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder-lab/dn-mly/fd0abe35-9282-46ed-addc-8af0e471db74.jpeg" style={{aspectRatio: '16 / 9'}}/>}/>,
34
+ sticker: 'Live',
35
+ targetLink: 'https://www.dn.se/sverige/ryska-militarflyg-over-ostersjon/',
36
+ text: 'Flög utan transpondrar • Upptäcktes av tyska flygvapnet.',
37
+ theme: undefined,
38
+ title: 'Ryska militärflyg över Östersjön',
39
+ variant: undefined,
40
+ vignette: undefined
41
+ }
42
+ ]}
43
+ />
44
+ ```
@@ -25,29 +25,26 @@ const teaserStandardHtml = dsTeaserStandard(parameters);
25
25
 
26
26
  | Name | Description | Default |
27
27
  |:--- | :--- | :--- |
28
- | isSquareImage | Flag so we can handle square teaser images<br />boolean | false |
29
- | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
30
- | classNames | Ex. "my-special-class"<br />string | \- |
28
+ | isItalicHeadline | If the headline should be italic<br />boolean | \- |
31
29
  | sectionName | Shows in teaser footer<br />string | \- |
32
- | bylineHtml | Byline HTML<br />string | \- |
33
- | bylineAspectRatio | Byline aspect ratio<br />string | \- |
34
30
  | duration | Duration of podcast<br />string | \- |
35
31
  | publicationTime | Publication time text<br />string | \- |
36
32
  | isFlashingDot | If there should be a flashing ball before the text<br />boolean | false |
37
- | isLargeHeadline | If the headline should be large (only if `isItalicHeadline` is true)<br />boolean | \- |
38
- | isItalicHeadline | If the headline should be italic<br />boolean | \- |
39
- | bylinePicture | Image of the author<br />ComponentChild | \- |
40
- | isCompact | If the teaser should be compact<br />boolean | \- |
41
- | media | Main image or other media<br />ComponentChild | \- |
42
33
  | sticker | Red text before the text<br />string | \- |
43
- | highlight | Text before the heading<br />string | \- |
44
- | vignette | Top text in the teaser<br />string | \- |
45
34
  | text | Teaser subtext<br />string | \- |
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", "main" | \- |
48
- | variant | Variant of the teaser<br />"default", "podcast", "insandare", "direkt" | \- |
49
- | targetLink\* | Target URL for the teaser<br />string | \- |
35
+ | bylinePicture | Byline image<br />ComponentChild | \- |
36
+ | media | Main image or other media<br />ComponentChild | \- |
37
+ | vignette | Top text in the teaser<br />string | \- |
38
+ | isCompact | If the teaser should be compact<br />boolean | \- |
39
+ | highlight | Text before the heading<br />string | \- |
40
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
41
+ | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
42
+ | classNames | Ex. "my-special-class"<br />string | \- |
43
+ | areaType | The area where the column is rendered<br />"main", "right", "bauta" | \- |
44
+ | targetLink | Target URL for the teaser<br />string | \- |
50
45
  | title\* | Heading of the teaser<br />string | \- |
46
+ | isSquareImage | Flag so we can handle square teaser images<br />boolean | false |
47
+ | variant | Variant of the teaser<br />"default", "podcast" | \- |
51
48
 
52
49
  ```jsx
53
50
  <TeaserStandard
@@ -8,29 +8,17 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
- | isSquareImage | Flag so we can handle square teaser images<br />boolean | \- |
12
- | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
13
- | classNames | Ex. "my-special-class"<br />string | \- |
14
- | sectionName | Shows in teaser footer<br />string | \- |
15
- | bylineHtml | Byline HTML<br />string | \- |
16
- | bylineAspectRatio | Byline aspect ratio<br />string | \- |
17
- | duration | Duration of podcast<br />string | \- |
18
- | publicationTime | Publication time text<br />string | \- |
19
- | isFlashingDot | If there should be a flashing ball before the text<br />boolean | \- |
20
- | isLargeHeadline | If the headline should be large (only if `isItalicHeadline` is true)<br />boolean | \- |
21
- | isItalicHeadline | If the headline should be italic<br />boolean | \- |
22
- | bylinePicture | Image of the author<br />ComponentChild | \- |
11
+ | variant | Variant of the teaser<br />"default", "insandare", "direkt" | \- |
23
12
  | time | The timestamp text of the teaser<br />string | \- |
24
- | media | Main image or other media<br />ComponentChild | \- |
25
- | sticker | Red text before the text<br />string | \- |
13
+ | title\* | Heading of the teaser<br />string | \- |
14
+ | targetLink | Target URL for the teaser<br />string | \- |
15
+ | areaType | The area where the column is rendered<br />"main", "right", "bauta" | \- |
16
+ | classNames | Ex. "my-special-class"<br />string | \- |
17
+ | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
18
+ | theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
26
19
  | highlight | Text before the heading<br />string | \- |
20
+ | media | Main image or other media<br />ComponentChild | \- |
27
21
  | vignette | Top text in the teaser<br />string | \- |
28
- | text | Teaser subtext<br />string | \- |
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", "main" | \- |
31
- | variant | Variant of the teaser<br />"default", "podcast", "insandare", "direkt" | \- |
32
- | targetLink\* | Target URL for the teaser<br />string | \- |
33
- | title\* | Heading of the teaser<br />string | \- |
34
22
 
35
23
  ```jsx
36
24
  <TeaserSwipeCard
@@ -8,15 +8,14 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
+ | title\* | Heading of the teaser<br />string | \- |
12
+ | targetLink | Target URL for the teaser<br />string | \- |
13
+ | areaType | The area where the column is rendered<br />"main", "right", "bauta" | \- |
11
14
  | classNames | Ex. "my-special-class"<br />string | \- |
12
15
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
13
- | targetLink\* | Target URL for the teaser<br />string | \- |
14
- | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
15
- | title\* | Heading of the teaser<br />string | \- |
16
- | text | Teaser subtext<br />string | \- |
17
16
  | vignette | Top text in the teaser<br />string | \- |
18
17
  | media | Main image or other media<br />ComponentChild | \- |
19
- | isItalicHeadline | If the headline should be italic<br />boolean | \- |
18
+ | text | Teaser subtext<br />string | \- |
20
19
 
21
20
  ```jsx
22
21
  <TeaserTextOnImage
@@ -26,7 +26,7 @@
26
26
  </p>
27
27
  {% endif %}
28
28
 
29
- <h2 class="{{ componentClassName + '__title'}} {{ componentClassName + '__title--italic' if params.isItalicHeadline}}">
29
+ <h2 class="{{ componentClassName + '__title'}}">
30
30
  {{ params.title }}
31
31
  </h2>
32
32
 
@@ -38,10 +38,6 @@
38
38
  margin-top: ds-spacing($ds-s-050);
39
39
 
40
40
  @include ds-typography($ds-typography-detail-teaser-text-i-bild, $forcePx: true);
41
-
42
- &--italic {
43
- @include ds-typography($ds-typography-detail-medryckare);
44
- }
45
41
  }
46
42
 
47
43
  .ds-teaser-image__byline,
@@ -8,11 +8,11 @@ The component will not include styling by itself. Make sure to include the right
8
8
 
9
9
  | Name | Description | Default |
10
10
  |:--- | :--- | :--- |
11
+ | title\* | Heading of the teaser<br />string | \- |
12
+ | targetLink | Target URL for the teaser<br />string | \- |
13
+ | areaType | The area where the column is rendered<br />"main", "right", "bauta" | \- |
11
14
  | classNames | Ex. "my-special-class"<br />string | \- |
12
15
  | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
13
- | targetLink\* | Target URL for the teaser<br />string | \- |
14
- | areaType | The area where the column is rendered<br />"right", "bauta", "main" | \- |
15
- | title\* | Heading of the teaser<br />string | \- |
16
16
  | text | Teaser subtext<br />string | \- |
17
17
 
18
18
  ```jsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "32.7.48",
3
+ "version": "33.0.1-beta.0",
4
4
  "description": "DN design system for web.",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/BonnierNews/dn-design-system/tree/main/web/src#readme",
@@ -1,8 +1,11 @@
1
1
  import { ComponentChildren } from 'preact';
2
2
  import type { SharedProps } from '@bonniernews/dn-design-system-web/assets/types/shared-props.ts';
3
- export interface TeaserCardsProps extends SharedProps {
3
+ export interface TeaserCardProps extends SharedProps {
4
+ /** The area where the column is rendered */
4
5
  areaType?: 'main' | 'right' | 'bauta';
6
+ /** Target URL for the teaser */
5
7
  targetLink?: string;
8
+ /** The theme-class to apply to the teaser */
6
9
  theme?: 'kultur' | 'nyheter';
7
10
  children?: ComponentChildren;
8
11
  }
@@ -13,4 +16,4 @@ export interface TeaserCardsProps extends SharedProps {
13
16
  * The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
14
17
  * `@use '@bonniernews/dn-design-system-web/assets/teaser/teaser.scss'`
15
18
  */
16
- export declare const TeaserCard: ({ areaType, targetLink, theme, classNames, attributes, children, }: TeaserCardsProps) => import("preact").JSX.Element;
19
+ export declare const TeaserCard: ({ areaType, targetLink, theme, classNames, attributes, children, }: TeaserCardProps) => import("preact").JSX.Element;