@bonniernews/dn-design-system-web 32.7.35 → 32.7.37
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.
- package/CHANGELOG.md +14 -0
- package/assets/types/teaser-props.ts +1 -1
- package/components/group-header/README.md +1 -1
- package/components/teaser-card/README.md +1 -1
- package/components/teaser-large/README.md +1 -1
- package/components/teaser-list-swipe/README.md +64 -47
- package/components/teaser-swipe-card/README.md +42 -40
- package/components/teaser-tipsa/README.md +1 -1
- package/components/text-input/README.md +1 -1
- package/package.json +1 -1
- package/preact/assets/types/teaser-props.d.ts +1 -1
- package/preact/components/factbox/factbox.d.ts +29 -0
- package/preact/components/factbox/factbox.js +505 -0
- package/preact/components/factbox/factbox.js.map +7 -0
- package/preact/components/group-header/group-header.d.ts +2 -1
- package/preact/components/group-header/group-header.js +1 -1
- package/preact/components/group-header/group-header.js.map +2 -2
- package/preact/components/link-box/link-box.js +1 -1
- package/preact/components/link-box/link-box.js.map +2 -2
- package/preact/components/teaser-card/teaser-card.d.ts +2 -2
- package/preact/components/teaser-card/teaser-card.js.map +2 -2
- package/preact/components/teaser-counter/teaser-counter.js.map +2 -2
- package/preact/components/teaser-large/teaser-large.js +1 -1
- package/preact/components/teaser-large/teaser-large.js.map +2 -2
- package/preact/components/teaser-list-swipe/teaser-list-swipe.d.ts +38 -0
- package/preact/components/teaser-list-swipe/teaser-list-swipe.js +447 -0
- package/preact/components/teaser-list-swipe/teaser-list-swipe.js.map +7 -0
- package/preact/components/teaser-list-vertical/teaser-list-vertical.js +1 -1
- package/preact/components/teaser-list-vertical/teaser-list-vertical.js.map +2 -2
- package/preact/components/teaser-longlife/teaser-longlife.js.map +2 -2
- package/preact/components/teaser-native/teaser-native.js.map +2 -2
- package/preact/components/teaser-onsite/teaser-onsite.js.map +2 -2
- package/preact/components/teaser-right-now/teaser-right-now.js.map +2 -2
- package/preact/components/teaser-slideshow/teaser-slideshow.js.map +2 -2
- package/preact/components/teaser-split/teaser-split.js.map +2 -2
- package/preact/components/teaser-swipe-card/teaser-swipe-card.d.ts +13 -0
- package/preact/components/teaser-swipe-card/teaser-swipe-card.js +95 -0
- package/preact/components/teaser-swipe-card/teaser-swipe-card.js.map +7 -0
- package/preact/components/teaser-tipsa/teaser-tipsa.js.map +2 -2
- package/preact/foundations/icons/grade-icon.d.ts +9 -0
- package/components/factbox/README-UXD.md +0 -0
- package/components/teaser-list-swipe/README-UXD.md +0 -0
- /package/components/factbox/{README.md → README-NJK.md} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [32.7.37](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@32.7.36...@bonniernews/dn-design-system-web@32.7.37) (2025-07-18)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **web:** tsx factbox ([#1835](https://github.com/BonnierNews/dn-design-system/issues/1835)) ([93ed96a](https://github.com/BonnierNews/dn-design-system/commit/93ed96a8cc7577641f35ccc14cd52870d347f511))
|
|
13
|
+
|
|
14
|
+
## [32.7.36](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@32.7.35...@bonniernews/dn-design-system-web@32.7.36) (2025-07-16)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **web:** teaser list swipe tsx ([#1836](https://github.com/BonnierNews/dn-design-system/issues/1836)) ([ee477a4](https://github.com/BonnierNews/dn-design-system/commit/ee477a413b90be8791e89f42ac1463003f1e2bac))
|
|
20
|
+
|
|
7
21
|
## [32.7.35](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@32.7.34...@bonniernews/dn-design-system-web@32.7.35) (2025-07-16)
|
|
8
22
|
|
|
9
23
|
|
|
@@ -7,7 +7,7 @@ export interface TeaserProps extends SharedProps {
|
|
|
7
7
|
/** Target URL for the teaser */
|
|
8
8
|
targetLink: string;
|
|
9
9
|
/** Variant of the teaser */
|
|
10
|
-
variant?: "default" | "podcast";
|
|
10
|
+
variant?: "default" | "podcast" | "insandare" | "direkt";
|
|
11
11
|
/** The area where the column is rendered */
|
|
12
12
|
areaType?: "right" | "bauta" | "bautaxl";
|
|
13
13
|
/** The theme-class to apply to the teaser */
|
|
@@ -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
|
| title\* | The title text<br />string | \- |
|
|
12
|
-
| type | The type of interactive element added to the header<br />"link", "
|
|
12
|
+
| type | The type of interactive element added to the header<br />"link", "icon", "toggle", "arrows" | "icon" |
|
|
13
13
|
| variant | The design variant, if not bauta or bautaxl the group header will get the 'standard' design<br />"bauta", "bauataxl" | \- |
|
|
14
14
|
| media | The image element for the header<br />ComponentChild | \- |
|
|
15
15
|
| href | If given, the title is rendered as a link<br />string | \- |
|
|
@@ -8,7 +8,7 @@ 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", "bautaxl" | \- |
|
|
11
|
+
| areaType | "main", "right", "bauta", "bautaxl" | \- |
|
|
12
12
|
| targetLink | string | \- |
|
|
13
13
|
| theme | "kultur", "nyheter" | "nyheter" |
|
|
14
14
|
| classNames | Ex. "my-special-class"<br />string | \- |
|
|
@@ -27,7 +27,7 @@ The component will not include styling by itself. Make sure to include the right
|
|
|
27
27
|
| text | Teaser subtext<br />string | \- |
|
|
28
28
|
| theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
|
|
29
29
|
| areaType | The area where the column is rendered<br />"right", "bauta", "bautaxl" | \- |
|
|
30
|
-
| variant | Variant of the teaser<br />"default", "podcast" | "default" |
|
|
30
|
+
| variant | Variant of the teaser<br />"default", "podcast", "insandare", "direkt" | "default" |
|
|
31
31
|
| targetLink\* | Target URL for the teaser<br />string | \- |
|
|
32
32
|
|
|
33
33
|
```jsx
|
|
@@ -1,51 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
- Storybook (Latest): [TeaserListSwipe](https://designsystem-latest.dn.se/?path=/docs/section-teaserlistswipe--docs)
|
|
1
|
+
TeaserListSwipe
|
|
2
|
+
===============
|
|
4
3
|
|
|
5
|
-
|
|
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
|
+
* 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'`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
| Name | Description | Default |
|
|
10
|
+
|:--- | :--- | :--- |
|
|
11
|
+
| title\* | Heading of the teaser<br />string | \- |
|
|
12
|
+
| titleHref | Target URL for the header<br />string | \- |
|
|
13
|
+
| areaType | The area where the column is rendered<br />"main", "right", "bauta", "bautaxl" | \- |
|
|
14
|
+
| arrowPosition | Determines where the scroll arrows are rendered<br />"floating", "header" | "header" |
|
|
15
|
+
| theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
|
|
16
|
+
| teasers | A list of arguments to TeaserSwipeCard<br />TeaserSwipeCardProps\[\] | \[\] |
|
|
17
|
+
| groupHeaderType | Type of group header<br />"link", "icon", "toggle", "arrows" | \- |
|
|
18
|
+
| groupHeaderToggleText | Text in toggle button<br />string | \- |
|
|
19
|
+
| groupHeaderToggleSelectedText | Text in toggle button when selected<br />string | \- |
|
|
20
|
+
| groupHeaderToggleSelected | Is toggle button selected or not<br />boolean | false |
|
|
21
|
+
| groupHeaderToggleClassNames | Class names for toggle button<br />string | \- |
|
|
22
|
+
| groupHeaderToggleAttributes | Attributes for toggle button. Ex. { "data-entity-id": "dn.epi.434" }<br />Record<string, string> | { } |
|
|
23
|
+
| classNames | Ex. "my-special-class"<br />string | \- |
|
|
24
|
+
| attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
|
|
10
25
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
26
|
+
```jsx
|
|
27
|
+
<TeaserListSwipe
|
|
28
|
+
teasers={[
|
|
29
|
+
{
|
|
30
|
+
highlight: 'Insändare:',
|
|
31
|
+
media: <TeaserImage byline="Foto: Paul Hansen" image={<ExamplePicture alt="Statsminister Magdalena Andersson (S) i en stridsvagn vid ett besök på en övning i nordnorska Narvik den 21 mars." className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C770:434&crop=770:h;center,top&output-quality=80 770w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1010:569&crop=1010:h;center,top&output-quality=80 1010w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1540:867&crop=1540:h;center,top&output-quality=60 1540w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C2020:1137&crop=2020:h;center,top&output-quality=60 2020w' sizes='(min-width: 1340px) 1010px, (min-width: 1100px) calc(100vw - 330px), 100vw" style={{aspectRatio: 1.7777777777777777}}/>}/>,
|
|
32
|
+
targetLink: '#',
|
|
33
|
+
time: '12:34',
|
|
34
|
+
title: 'Riktigt bra politik nu',
|
|
35
|
+
variant: 'insandare',
|
|
36
|
+
vignette: 'Sverige'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
highlight: 'Insändare:',
|
|
40
|
+
media: <TeaserImage byline="Foto: Paul Hansen" image={<ExamplePicture alt="Statsminister Magdalena Andersson (S) i en stridsvagn vid ett besök på en övning i nordnorska Narvik den 21 mars." className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C770:434&crop=770:h;center,top&output-quality=80 770w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1010:569&crop=1010:h;center,top&output-quality=80 1010w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1540:867&crop=1540:h;center,top&output-quality=60 1540w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C2020:1137&crop=2020:h;center,top&output-quality=60 2020w' sizes='(min-width: 1340px) 1010px, (min-width: 1100px) calc(100vw - 330px), 100vw" style={{aspectRatio: 1.7777777777777777}}/>}/>,
|
|
41
|
+
targetLink: '#',
|
|
42
|
+
time: '11:42',
|
|
43
|
+
title: 'Ska det vara så här nu?',
|
|
44
|
+
variant: 'insandare'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
highlight: 'Insändare:',
|
|
48
|
+
media: <TeaserImage byline="Foto: Paul Hansen" image={<ExamplePicture alt="Statsminister Magdalena Andersson (S) i en stridsvagn vid ett besök på en övning i nordnorska Narvik den 21 mars." className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C770:434&crop=770:h;center,top&output-quality=80 770w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1010:569&crop=1010:h;center,top&output-quality=80 1010w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1540:867&crop=1540:h;center,top&output-quality=60 1540w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C2020:1137&crop=2020:h;center,top&output-quality=60 2020w' sizes='(min-width: 1340px) 1010px, (min-width: 1100px) calc(100vw - 330px), 100vw" style={{aspectRatio: 1.7777777777777777}}/>}/>,
|
|
49
|
+
targetLink: '#',
|
|
50
|
+
time: '10:24',
|
|
51
|
+
title: 'Avskaffa något jag inte tycker om',
|
|
52
|
+
variant: 'insandare',
|
|
53
|
+
vignette: 'Världen'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
highlight: 'Insändare:',
|
|
57
|
+
media: <TeaserImage byline="Foto: Paul Hansen" image={<ExamplePicture alt="Statsminister Magdalena Andersson (S) i en stridsvagn vid ett besök på en övning i nordnorska Narvik den 21 mars." className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C770:434&crop=770:h;center,top&output-quality=80 770w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1010:569&crop=1010:h;center,top&output-quality=80 1010w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1540:867&crop=1540:h;center,top&output-quality=60 1540w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C2020:1137&crop=2020:h;center,top&output-quality=60 2020w' sizes='(min-width: 1340px) 1010px, (min-width: 1100px) calc(100vw - 330px), 100vw" style={{aspectRatio: 1.7777777777777777}}/>}/>,
|
|
58
|
+
targetLink: '#',
|
|
59
|
+
time: '09:58',
|
|
60
|
+
title: 'Man borde bitit hund på Kungsgatan',
|
|
61
|
+
variant: 'insandare',
|
|
62
|
+
vignette: 'Sverige'
|
|
63
|
+
}
|
|
64
|
+
]}
|
|
65
|
+
title="Insändare"
|
|
66
|
+
titleHref="#"
|
|
67
|
+
/>
|
|
68
|
+
```
|
|
@@ -1,40 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
TeaserSwipeCard
|
|
2
|
+
===============
|
|
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)
|
|
5
|
+
* Storybook: [TeaserSwipeCard](https://designsystem.dn.se/?path=/docs/section-teaserlistswipe-teaserswipecard--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-swipe-card/teaser-swipe-card.scss'`
|
|
8
|
+
|
|
9
|
+
| Name | Description | Default |
|
|
10
|
+
|:--- | :--- | :--- |
|
|
11
|
+
| bylinePicture | Image of the author<br />ComponentChild | \- |
|
|
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
|
+
| time | The timestamp text of the teaser<br />string | \- |
|
|
23
|
+
| media | Main image or other media<br />ComponentChild | \- |
|
|
24
|
+
| sticker | Red text before the text<br />string | \- |
|
|
25
|
+
| highlight | Text before the heading<br />string | \- |
|
|
26
|
+
| vignette | Top text in the teaser<br />string | \- |
|
|
27
|
+
| text | Teaser subtext<br />string | \- |
|
|
28
|
+
| theme | The theme-class to apply to the teaser<br />"kultur", "nyheter" | \- |
|
|
29
|
+
| areaType | The area where the column is rendered<br />"right", "bauta", "bautaxl" | \- |
|
|
30
|
+
| variant | Variant of the teaser<br />"default", "podcast", "insandare", "direkt" | \- |
|
|
31
|
+
| targetLink\* | Target URL for the teaser<br />string | \- |
|
|
32
|
+
| title\* | Heading of the teaser<br />string | \- |
|
|
33
|
+
|
|
34
|
+
```jsx
|
|
35
|
+
<TeaserSwipeCard
|
|
36
|
+
highlight="Live:"
|
|
37
|
+
media={<TeaserImage byline="Foto: Paul Hansen" image={<ExamplePicture alt="Statsminister Magdalena Andersson (S) i en stridsvagn vid ett besök på en övning i nordnorska Narvik den 21 mars." className="picture picture--placeholder" src="https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C770:434&crop=770:h;center,top&output-quality=80 770w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1010:569&crop=1010:h;center,top&output-quality=80 1010w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C1540:867&crop=1540:h;center,top&output-quality=60 1540w, https://cached-images.bonnier.news/gcs/bilder/dn-mly/752e4f6d-7c66-4d24-81b1-4b24b12771a9.jpeg?interpolation=lanczos-none&fit=around%7C2020:1137&crop=2020:h;center,top&output-quality=60 2020w' sizes='(min-width: 1340px) 1010px, (min-width: 1100px) calc(100vw - 330px), 100vw" style={{aspectRatio: 1.7777777777777777}}/>}/>}
|
|
38
|
+
time="13:45"
|
|
39
|
+
title="Man bet hund på Kungsgatan"
|
|
40
|
+
vignette="Sverige"
|
|
41
|
+
/>
|
|
42
|
+
```
|
|
@@ -12,7 +12,7 @@ The component will not include styling by itself. Make sure to include the right
|
|
|
12
12
|
| text | 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
|
-
| areaType | "right", "bauta", "bautaxl" | \- |
|
|
15
|
+
| areaType | "main", "right", "bauta", "bautaxl" | \- |
|
|
16
16
|
| targetLink | string | \- |
|
|
17
17
|
| theme | "kultur", "nyheter" | \- |
|
|
18
18
|
|
|
@@ -17,7 +17,7 @@ import textInput from '@bonniernews/dn-design-system-web/components/text-input/t
|
|
|
17
17
|
| Name | Description | Default |
|
|
18
18
|
|:--- | :--- | :--- |
|
|
19
19
|
| name\* | It's used as name and id<br />string | \- |
|
|
20
|
-
| type | text, password, email, etc<br />"number", "text", "search", "image", "color", "date", "datetime-local"
|
|
20
|
+
| type | text, password, email, etc<br />"number", "text", "search", "time", "image", "color", "date", "datetime-local" | "text" |
|
|
21
21
|
| label\* | A label for the input<br />string | \- |
|
|
22
22
|
| error | Used if error state shoud be set on load<br />boolean | \- |
|
|
23
23
|
| errorMessage | What error message that should be displayed<br />string | \- |
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export interface TeaserProps extends SharedProps {
|
|
|
6
6
|
/** Target URL for the teaser */
|
|
7
7
|
targetLink: string;
|
|
8
8
|
/** Variant of the teaser */
|
|
9
|
-
variant?: "default" | "podcast";
|
|
9
|
+
variant?: "default" | "podcast" | "insandare" | "direkt";
|
|
10
10
|
/** The area where the column is rendered */
|
|
11
11
|
areaType?: "right" | "bauta" | "bautaxl";
|
|
12
12
|
/** The theme-class to apply to the teaser */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SharedProps } from "@bonniernews/dn-design-system-web/assets/types/shared-props.ts";
|
|
2
|
+
import { GradeValue } from "../../foundations/icons/grade-icon";
|
|
3
|
+
import { ComponentChild } from "preact";
|
|
4
|
+
export interface FactboxProps extends SharedProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
titleHighlight?: string;
|
|
7
|
+
titleImage?: ComponentChild;
|
|
8
|
+
bodyParts: Array<BodyPart>;
|
|
9
|
+
theme?: 'default' | 'kultur' | 'nyheter';
|
|
10
|
+
forceExpand?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface BodyPart {
|
|
13
|
+
type: string;
|
|
14
|
+
bodyHtml?: string;
|
|
15
|
+
grade?: GradeValue;
|
|
16
|
+
media?: ComponentChild;
|
|
17
|
+
imageType?: string;
|
|
18
|
+
caption?: string;
|
|
19
|
+
author?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* - GitHub: [BonnierNews/dn-design-system/../web/src/components/factbox](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/factbox)
|
|
23
|
+
* - Storybook: [Factbox](https://designsystem.dn.se/?path=/docs/basic-factbox--docs)
|
|
24
|
+
*
|
|
25
|
+
* The component will not include styling by itself. Make sure to include the right styles for the component. See example below:
|
|
26
|
+
* `@use '@bonniernews/dn-design-system-web/components/factbox/factbox.scss'`
|
|
27
|
+
*/
|
|
28
|
+
export declare const Factbox: ({ title, titleHighlight, titleImage, bodyParts, theme, forceExpand, classNames, attributes }: FactboxProps) => import("preact").JSX.Element;
|
|
29
|
+
export default Factbox;
|