@bonniernews/dn-design-system-web 32.7.43 → 32.7.44
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 +7 -0
- package/assets/types/teaser-props.ts +1 -1
- package/components/factbox/README.md +35 -0
- package/components/group-header/README-njk.md +2 -2
- package/components/group-header/README.md +1 -1
- package/components/list-item/README.md +70 -0
- package/components/teaser-card/{README-NJK.md → README-njk.md} +1 -1
- package/components/teaser-card/README.md +1 -1
- package/components/teaser-centered/README.md +1 -1
- package/components/teaser-counter/README.md +1 -1
- package/components/teaser-large/{README-NJK.md → README-njk.md} +1 -1
- package/components/teaser-large/README.md +1 -1
- package/components/teaser-list-swipe/README.md +1 -1
- package/components/teaser-list-vertical/README-njk.md +0 -1
- package/components/teaser-native/{README-NJK.md → README-njk.md} +1 -1
- package/components/teaser-native/README.md +1 -1
- package/components/teaser-onsite/{README-NJK.md → README-njk.md} +1 -1
- package/components/teaser-onsite/README.md +1 -1
- package/components/teaser-right-now/README.md +1 -1
- package/components/teaser-slideshow/{README-NJK.md → README-njk.md} +1 -1
- package/components/teaser-slideshow/README.md +2 -2
- package/components/teaser-split/README-container-njk.md +1 -1
- package/components/teaser-split/README-njk.md +2 -2
- package/components/teaser-standard/README-njk.md +1 -1
- package/components/teaser-standard/README.md +1 -1
- package/components/teaser-swipe-card/README.md +1 -1
- package/components/teaser-text-on-image/README.md +1 -1
- package/components/teaser-tipsa/{README-NJK.md → README-njk.md} +1 -1
- package/components/teaser-tipsa/README.md +1 -1
- package/components/tooltip/README.md +12 -4
- package/package.json +1 -1
- package/preact/assets/types/teaser-props.d.ts +1 -1
- package/preact/components/group-header/group-header.d.ts +2 -2
- package/preact/components/group-header/group-header.js +1 -0
- package/preact/components/group-header/group-header.js.map +2 -2
- package/preact/components/link-box/link-box.js +1 -0
- package/preact/components/link-box/link-box.js.map +2 -2
- package/preact/components/list-item/list-item.d.ts +19 -1
- package/preact/components/list-item/list-item.js.map +2 -2
- package/preact/components/teaser-card/teaser-card.d.ts +1 -1
- package/preact/components/teaser-card/teaser-card.js.map +1 -1
- package/preact/components/teaser-centered/teaser-centered.js.map +1 -1
- package/preact/components/teaser-counter/teaser-counter.js.map +1 -1
- package/preact/components/teaser-large/teaser-large.js.map +1 -1
- package/preact/components/teaser-list-swipe/teaser-list-swipe.d.ts +1 -1
- package/preact/components/teaser-list-swipe/teaser-list-swipe.js +1 -0
- package/preact/components/teaser-list-swipe/teaser-list-swipe.js.map +2 -2
- package/preact/components/teaser-list-vertical/teaser-list-vertical.js +1 -0
- package/preact/components/teaser-list-vertical/teaser-list-vertical.js.map +2 -2
- package/preact/components/teaser-longlife/teaser-longlife.js.map +1 -1
- package/preact/components/teaser-native/teaser-native.js.map +1 -1
- package/preact/components/teaser-onsite/teaser-onsite.js.map +1 -1
- package/preact/components/teaser-package/teaser-package.js +1 -0
- package/preact/components/teaser-package/teaser-package.js.map +2 -2
- package/preact/components/teaser-right-now/teaser-right-now.js.map +1 -1
- package/preact/components/teaser-slideshow/teaser-slideshow.js.map +1 -1
- package/preact/components/teaser-split/teaser-split.d.ts +2 -2
- package/preact/components/teaser-split/teaser-split.js.map +1 -1
- package/preact/components/teaser-standard/teaser-standard.js.map +1 -1
- package/preact/components/teaser-swipe-card/teaser-swipe-card.js.map +1 -1
- package/preact/components/teaser-text-on-image/teaser-text-on-image.js.map +1 -1
- package/preact/components/teaser-tipsa/teaser-tipsa.js.map +1 -1
- package/components/article-body-image/README-UXD.md +0 -0
- package/components/article-top-image/README-UXD.md +0 -0
- package/components/blocked-content/README-UXD.md +0 -0
- package/components/buddy-menu/README-UXD.md +0 -0
- package/components/byline/README-UXD.md +0 -0
- package/components/byline-list-item/README-UXD.md +0 -0
- package/components/checkbox/README-UXD.md +0 -0
- package/components/direkt-circle/README-UXD.md +0 -0
- package/components/divider/README-UXD.md +0 -0
- package/components/floating-button/README-UXD.md +0 -0
- package/components/footer/README-UXD.md +0 -0
- package/components/game-header/README-UXD.md +0 -0
- package/components/icon-sprite/README-UXD.md +0 -0
- package/components/icon-with-wrapper/README-UXD.md +0 -0
- package/components/image-caption/README-UXD.md +0 -0
- package/components/modal/README-UXD.md +0 -0
- package/components/profile-header/README-UXD.md +0 -0
- package/components/quote/README-UXD.md +0 -0
- package/components/radio-button/README-UXD.md +0 -0
- package/components/spinner/README-UXD.md +0 -0
- package/components/switch/README-UXD.md +0 -0
- package/components/teaser-card/README-UXD.md +0 -0
- package/components/teaser-footer/README-UXD.md +0 -0
- package/components/teaser-onsite/README-UXD.md +0 -0
- package/components/text-input/README-UXD.md +0 -0
- package/components/thematic-break/README-UXD.md +0 -0
- package/components/video-caption/README-UXD.md +0 -0
- package/foundations/helpers/README-UXD.md +0 -0
- package/foundations/typography/README-UXD.md +0 -0
- package/introduction/README-UXD.md +0 -1
- /package/components/article-body-image/{README-NJK.md → README-njk.md} +0 -0
- /package/components/blocked-content/{README-NJK.md → README-njk.md} +0 -0
- /package/components/buddy-menu/{README-NJK.md → README-njk.md} +0 -0
- /package/components/button/{README-NJK.md → README-njk.md} +0 -0
- /package/components/button-toggle/{README-NJK.md → README-njk.md} +0 -0
- /package/components/byline/{README-NJK.md → README-njk.md} +0 -0
- /package/components/checkbox/{README-NJK.md → README-njk.md} +0 -0
- /package/components/direkt-circle/{README-NJK.md → README-njk.md} +0 -0
- /package/components/divider/{README-NJK.md → README-njk.md} +0 -0
- /package/components/empty-state/{README-NJK.md → README-njk.md} +0 -0
- /package/components/factbox/{README-NJK.md → README-njk.md} +0 -0
- /package/components/footer/{README-NJK.md → README-njk.md} +0 -0
- /package/components/icon-sprite/{README-NJK.md → README-njk.md} +0 -0
- /package/components/image-caption/{README-NJK.md → README-njk.md} +0 -0
- /package/components/list-item/{README-NJK.md → README-njk.md} +0 -0
- /package/components/mask/{README-NJK.md → README-njk.md} +0 -0
- /package/components/modal/{README-NJK.md → README-njk.md} +0 -0
- /package/components/pagination/{README-NJK.md → README-njk.md} +0 -0
- /package/components/pictogram/{README-NJK.md → README-njk.md} +0 -0
- /package/components/quote/{README-NJK.md → README-njk.md} +0 -0
- /package/components/radio-button/{README-NJK.md → README-njk.md} +0 -0
- /package/components/spinner/{README-NJK.md → README-njk.md} +0 -0
- /package/components/switch/{README-NJK.md → README-njk.md} +0 -0
- /package/components/teaser-centered/{README-NJK.md → README-njk.md} +0 -0
- /package/components/teaser-dot/{README-NJK.md → README-njk.md} +0 -0
- /package/components/teaser-image/{README-NJK.md → README-njk.md} +0 -0
- /package/components/teaser-right-now/{README-NJK.md → README-njk.md} +0 -0
- /package/components/teaser-text-on-image/{README-NJK.md → README-njk.md} +0 -0
- /package/components/text-button/{README-NJK.md → README-njk.md} +0 -0
- /package/components/text-input/{README-NJK.md → README-njk.md} +0 -0
- /package/components/thematic-break/{README-NJK.md → README-njk.md} +0 -0
- /package/components/video-caption/{README-NJK.md → README-njk.md} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [32.7.44](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@32.7.43...@bonniernews/dn-design-system-web@32.7.44) (2025-08-05)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **web:** remove readme uxd ([#1852](https://github.com/BonnierNews/dn-design-system/issues/1852)) ([e3df108](https://github.com/BonnierNews/dn-design-system/commit/e3df108b74cb80f278d528b37569533030a243cf))
|
|
13
|
+
|
|
7
14
|
## [32.7.43](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@32.7.42...@bonniernews/dn-design-system-web@32.7.43) (2025-08-04)
|
|
8
15
|
|
|
9
16
|
|
|
@@ -9,7 +9,7 @@ export interface TeaserProps extends SharedProps {
|
|
|
9
9
|
/** Variant of the teaser */
|
|
10
10
|
variant?: "default" | "podcast" | "insandare" | "direkt";
|
|
11
11
|
/** The area where the column is rendered */
|
|
12
|
-
areaType?: "right" | "bauta"
|
|
12
|
+
areaType?: "right" | "bauta";
|
|
13
13
|
/** The theme-class to apply to the teaser */
|
|
14
14
|
theme?: "nyheter" | "kultur";
|
|
15
15
|
/** Teaser subtext */
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Factbox
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
* GitHub: [BonnierNews/dn-design-system/../web/src/components/factbox](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/factbox)
|
|
5
|
+
* Storybook: [Factbox](https://designsystem.dn.se/?path=/docs/basic-factbox--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/factbox/factbox.scss'`
|
|
8
|
+
|
|
9
|
+
| Name | Description | Default |
|
|
10
|
+
|:--- | :--- | :--- |
|
|
11
|
+
| title | string | \- |
|
|
12
|
+
| titleHighlight | string | \- |
|
|
13
|
+
| titleImage | ComponentChild | \- |
|
|
14
|
+
| bodyParts\* | BodyPart\[\] | \- |
|
|
15
|
+
| theme | "nyheter", "kultur", "default" | \- |
|
|
16
|
+
| forceExpand | boolean | false |
|
|
17
|
+
| classNames | Ex. "my-special-class"<br />string | \- |
|
|
18
|
+
| attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
|
|
19
|
+
|
|
20
|
+
```jsx
|
|
21
|
+
<Factbox
|
|
22
|
+
bodyParts={[
|
|
23
|
+
{
|
|
24
|
+
bodyHtml: '<p>• Minska andelen kött, och framför allt nötkött, i kosten. Nötkött, men även mejeriprodukter som ost, mjölk och smör, bidrar till stora utsläpp när de produceras. Testa att äta mer plantbaserad kost, eller byt ut nötköttet mot kyckling.</p>',
|
|
25
|
+
type: 'paragraph'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
bodyHtml: '<p>• Handla efter säsong. Sockerärtor som är flygfraktade över halva jordklotet ger en stor klimatpåverkan, samma sak med andra färska grönsaker som kräver flygfrakt i stället för båtfrakt. Naturskyddsföreningen har på sin hemsida <a href="https://www.naturskyddsforeningen.se/nyheter/valj-bland-sasongens-godsaker">en lista</a> över när svenska och europeiska frukt- och grönsaker är i säsong.</p>',
|
|
29
|
+
type: 'paragraph'
|
|
30
|
+
}
|
|
31
|
+
]}
|
|
32
|
+
title="Livsmedel du kan byta ut för att minska ditt klimatavtryck"
|
|
33
|
+
titleHighlight="Tips."
|
|
34
|
+
/>
|
|
35
|
+
```
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
13
13
|
|title | string | yes | | | The title text |
|
|
14
14
|
|type | string | no | icon, link, toggle, arrows | icon | The type of interactive element added to the header |
|
|
15
|
-
|variant | string | no | bauta,
|
|
15
|
+
|variant | string | no | bauta, default | | The design variant, if not bauta the group header will get the 'standard' design |
|
|
16
16
|
|mediaHtml | string | no | | | The image markup for the header |
|
|
17
17
|
|href | string | no | | | If given, the title is rendered as a link |
|
|
18
18
|
|linkText | string | no | | | The link text to render (only for types `link` and `direkt`) |
|
|
@@ -30,7 +30,7 @@ NB: The `arrows` type is only active in desktop environments. It is equivalent t
|
|
|
30
30
|
|
|
31
31
|
Depending on type, either the `toggle-*` or `linkText` parameters are allowed. In `icon` and `link` mode, the `href` parameter is required to show the ornament.
|
|
32
32
|
|
|
33
|
-
The type `toggle` is (currently) not allowed if variant is bauta
|
|
33
|
+
The type `toggle` is (currently) not allowed if variant is bauta.
|
|
34
34
|
|
|
35
35
|
## Minimum requirement example
|
|
36
36
|
|
|
@@ -10,7 +10,7 @@ The component will not include styling by itself. Make sure to include the right
|
|
|
10
10
|
|:--- | :--- | :--- |
|
|
11
11
|
| title\* | The title text<br />string | \- |
|
|
12
12
|
| type | The type of interactive element added to the header<br />"link", "icon", "toggle", "arrows" | "icon" |
|
|
13
|
-
| variant | The design variant, if not bauta
|
|
13
|
+
| variant | The design variant, if not bauta the group header will get the 'standard' design<br />"bauta", "default" | \- |
|
|
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 | \- |
|
|
16
16
|
| linkText | The link text to render (only for types `link` and `arrows`)<br />string | \- |
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
ListItem
|
|
2
|
+
========
|
|
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)
|
|
5
|
+
* Storybook: [ListItem](https://designsystem.dn.se/?path=/docs/basic-listitem--docs)
|
|
6
|
+
|
|
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.
|
|
8
|
+
|
|
9
|
+
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/list-item/list-item.scss'`
|
|
10
|
+
|
|
11
|
+
[](#javascript)Javascript
|
|
12
|
+
-------------------------
|
|
13
|
+
|
|
14
|
+
_The javascript is only needed for list items of type accordion or toggle_
|
|
15
|
+
|
|
16
|
+
```javascript
|
|
17
|
+
import dsListItem from '@bonniernews/dn-design-system-web/components/list-item/list-item.js'
|
|
18
|
+
const listElements = Array.from(document.getElementsByClassName("ds-list-item"));
|
|
19
|
+
dsListItem(listElements);
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
| Name | Description | Default |
|
|
23
|
+
|:--- | :--- | :--- |
|
|
24
|
+
| listItemType\* | "standard", "toggle", "image", "accordion", "checkbox", "radio", "switch" | \- |
|
|
25
|
+
| title | string | \- |
|
|
26
|
+
| subtitle | string | \- |
|
|
27
|
+
| meta | string | \- |
|
|
28
|
+
| border | boolean | \- |
|
|
29
|
+
| fontWeight | "bold", "regular", "semibold" | \- |
|
|
30
|
+
| attributes | { \[key: string\]: string; } | \- |
|
|
31
|
+
| forcePx | boolean | \- |
|
|
32
|
+
| classNames | string | \- |
|
|
33
|
+
| leadingIcon | "search", "link", "add", "arrow\_back", "arrow\_forward", "arrow\_outward", "arrow\_upward", "autoplay" | \- |
|
|
34
|
+
| accordionContent | any | \- |
|
|
35
|
+
| name | string | "ds-list-item" |
|
|
36
|
+
| href | string | \- |
|
|
37
|
+
| disabled | boolean | \- |
|
|
38
|
+
| checked | boolean | \- |
|
|
39
|
+
| stripLabel | boolean | \- |
|
|
40
|
+
| mediaHtml\* | string | \- |
|
|
41
|
+
| trailingIcon | "search", "link", "add", "arrow\_back", "arrow\_forward", "arrow\_outward", "arrow\_upward", "autoplay" | \- |
|
|
42
|
+
| selected | boolean | \- |
|
|
43
|
+
| id | string | "ds-list-item" |
|
|
44
|
+
| value | string | \- |
|
|
45
|
+
| showMeta | boolean | \- |
|
|
46
|
+
| metaOn | string | \- |
|
|
47
|
+
| metaOff | string | \- |
|
|
48
|
+
| componentClassName | string | \- |
|
|
49
|
+
| titleHref | string | \- |
|
|
50
|
+
| toggleText\* | string | \- |
|
|
51
|
+
| toggleSelectedText\* | string | \- |
|
|
52
|
+
| selectedText\* | string | \- |
|
|
53
|
+
| variant | Design variant<br />"primary", "staticWhite", "primaryBlack", "secondaryFilled", "secondaryOutline", "transparent" | \- |
|
|
54
|
+
| text | Note: only works on button-tag, not on a-tag<br />string | \- |
|
|
55
|
+
| iconName | add, arrow\_back, arrow\_forward etc | | For all available icons see: [https://designsystem.dn.se/?path=/story/foundations-icons--all-icons](https://designsystem.dn.se/?path=/story/foundations-icons--all-icons)<br />"search", "link", "add", "arrow\_back", "arrow\_forward", "arrow\_outward", "arrow\_upward", "autoplay" | \- |
|
|
56
|
+
| fullWidth | Button will be full width on both desktop and mobile<br />boolean | \- |
|
|
57
|
+
| size | "sm", "lg", "md", "xl" | \- |
|
|
58
|
+
| loading | boolean | \- |
|
|
59
|
+
| isIconButton | boolean | \- |
|
|
60
|
+
| selectedIconName | "search", "link", "add", "arrow\_back", "arrow\_forward", "arrow\_outward", "arrow\_upward", "autoplay" | \- |
|
|
61
|
+
| mobileFullWidth | Button will only full width on mobile<br />boolean | \- |
|
|
62
|
+
|
|
63
|
+
```jsx
|
|
64
|
+
<ListItem
|
|
65
|
+
leadingIcon="notifications"
|
|
66
|
+
listItemType="standard"
|
|
67
|
+
title="Standard list item"
|
|
68
|
+
trailingIcon="chevron_right"
|
|
69
|
+
/>
|
|
70
|
+
```
|
|
@@ -13,7 +13,7 @@ This component is the basis for all Teasers. While it does not render much itsel
|
|
|
13
13
|
|parameter | type | required | options | default | description |
|
|
14
14
|
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
15
15
|
|targetLink | String | no | | | If given, the card will render as a link |
|
|
16
|
-
|areaType | String | no | '', 'right', 'bauta',
|
|
16
|
+
|areaType | String | no | '', 'right', 'bauta', | '' | The area the teaser will be rendered in |
|
|
17
17
|
|theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to the teaser |
|
|
18
18
|
|classNames | String | no | | | Ex. "ds-teaser--large" |
|
|
19
19
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
@@ -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", "
|
|
11
|
+
| areaType | "right", "bauta", "main" | \- |
|
|
12
12
|
| targetLink | string | \- |
|
|
13
13
|
| theme | "nyheter", "kultur" | "nyheter" |
|
|
14
14
|
| classNames | Ex. "my-special-class"<br />string | \- |
|
|
@@ -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" | \- |
|
|
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 | \- |
|
|
@@ -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" | \- |
|
|
18
18
|
| title\* | Heading of the teaser<br />string | \- |
|
|
19
19
|
| media | Main image or other media<br />ComponentChild | \- |
|
|
20
20
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|title | String | yes | | | Heading of the teaser |
|
|
14
14
|
|targetLink | String | yes | | | Target URL for the teaser |
|
|
15
15
|
|variant | String | no | "default" or "podcast" | "default" | |
|
|
16
|
-
|areaType | String | no | "right" or "bauta"
|
|
16
|
+
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
17
17
|
|theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to the teaser |
|
|
18
18
|
|text | String | no | | | Teaser subtext |
|
|
19
19
|
|vignette | String | no | | | Top text in the teaser |
|
|
@@ -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" | \- |
|
|
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
|
|
|
@@ -10,7 +10,7 @@ The component will not include styling by itself. Make sure to include the right
|
|
|
10
10
|
|:--- | :--- | :--- |
|
|
11
11
|
| title\* | Heading of the teaser<br />string | \- |
|
|
12
12
|
| titleHref | Target URL for the header<br />string | \- |
|
|
13
|
-
| areaType | The area where the column is rendered<br />"right", "bauta", "
|
|
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
15
|
| theme | The theme-class to apply to the teaser<br />"nyheter", "kultur" | \- |
|
|
16
16
|
| teasers | A list of arguments to TeaserSwipeCard<br />TeaserSwipeCardProps\[\] | \[\] |
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
|listLink | Object | no | | | Ex. { text: "Alla nyheter", url: "#" } |
|
|
15
15
|
|flexible | bool | no | true, false | false | |
|
|
16
16
|
|teasers | Array | yes | | | 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 } ] |
|
|
17
|
-
|~areaType~ | String | no | "right" or "bauta" or "bautaxl" | | Not implemented |
|
|
18
17
|
|theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to _all_ teasers in the list. |
|
|
19
18
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
20
19
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|title | String | yes | | | Heading of the teaser |
|
|
14
14
|
|targetLink | String | yes | | | Target URL for the teaser |
|
|
15
15
|
|nativeVariant | String | no | "standard" or "large" or "right" | "standard" | |
|
|
16
|
-
|areaType | String | no | "right" or "bauta"
|
|
16
|
+
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
17
17
|
|text | String | no | | | Teaser subtext |
|
|
18
18
|
|vignette | String | no | | | Top text in the teaser |
|
|
19
19
|
|mediaHtml | HTML String | no | | | Main image or other media |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|title | String | yes | | | Heading of the teaser |
|
|
14
14
|
|targetLink | String | yes | | | Target URL for the teaser |
|
|
15
15
|
|nativeVariant | String | no | "standard" or "large" or "right" | "standard" | |
|
|
16
|
-
|areaType | String | no | "right" or "bauta"
|
|
16
|
+
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
17
17
|
|text | String | no | | | Teaser subtext |
|
|
18
18
|
|vignette | String | no | | | Top text in the teaser |
|
|
19
19
|
|mediaHtml | HTML String | no | | | Main image or other media |
|
|
@@ -16,7 +16,7 @@ In the CMS title will be set to a location like "Kiev, Ukraina" or "USA" and tex
|
|
|
16
16
|
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
17
17
|
|title | String | yes | | | Heading of the teaser |
|
|
18
18
|
|targetLink | String | yes | | | Target URL for the teaser |
|
|
19
|
-
|areaType | String | no | "right" or "bauta"
|
|
19
|
+
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
20
20
|
|theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to the teaser |
|
|
21
21
|
|text | String | no | | | Teaser subtext |
|
|
22
22
|
|mediaHtml | HTML String | no | | | Main image or other media |
|
|
@@ -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" | \- |
|
|
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 | \- |
|
|
@@ -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" | \- |
|
|
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
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
13
13
|
|title | String | yes | | | Heading of the teaser |
|
|
14
14
|
|text | String | no | | | Teaser subtext |
|
|
15
|
-
|areaType | String | no | "right" or "bauta"
|
|
15
|
+
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
16
16
|
|theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to the teaser |
|
|
17
17
|
|mediaHtml | HTML String | no | | | Gallery html |
|
|
18
18
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
@@ -10,9 +10,9 @@ The component will not include styling by itself. Make sure to include the right
|
|
|
10
10
|
|:--- | :--- | :--- |
|
|
11
11
|
| classNames | Ex. "my-special-class"<br />string | \- |
|
|
12
12
|
| attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
|
|
13
|
-
| areaType | "right", "bauta", "
|
|
13
|
+
| areaType | "right", "bauta", "main" | \- |
|
|
14
14
|
| targetLink | string | \- |
|
|
15
|
-
| theme | "
|
|
15
|
+
| theme | "nyheter", "kultur" | \- |
|
|
16
16
|
| title\* | Heading of the teaser<br />string | \- |
|
|
17
17
|
| text | Teaser subtext<br />string | \- |
|
|
18
18
|
| media | Main image or other media<br />ComponentChild | \- |
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|theme | String | no | nyheter, kultur | (empty) | The theme is applied to all teasers in the container |
|
|
15
15
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
16
16
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
17
|
-
|areaType | string | no | "right" or "bauta"
|
|
17
|
+
|areaType | string | no | "right" or "bauta" | | The area where the column is rendered |
|
|
18
18
|
|~forcePx~ | | | | | Not supported |
|
|
19
19
|
|
|
20
20
|
## Minimum requirement example
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
13
13
|
|title | String | yes | | | Heading of the teaser |
|
|
14
14
|
|targetLink | String | yes | | | Target URL for the teaser |
|
|
15
|
-
|
|
16
|
-
|areaType | String | no | "right" or "bauta"
|
|
15
|
+
|variant | String | no | "default" or "podcast" | "default" | |
|
|
16
|
+
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
17
17
|
|theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to the teaser |
|
|
18
18
|
|text | String | no | | | Teaser subtext |
|
|
19
19
|
|vignette | String | no | | | Top text in the teaser |
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|title | String | yes | | | Heading of the teaser |
|
|
14
14
|
|targetLink | String | yes | | | Target URL for the teaser |
|
|
15
15
|
|variant | String | no | "default" or "podcast" | "default" | |
|
|
16
|
-
|areaType | String | no | "right" or "bauta"
|
|
16
|
+
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
17
17
|
|theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to the teaser |
|
|
18
18
|
|text | String | no | | | Teaser subtext |
|
|
19
19
|
|vignette | String | no | | | Top text in the teaser |
|
|
@@ -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" | \- |
|
|
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 | \- |
|
|
@@ -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" | \- |
|
|
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 | \- |
|
|
@@ -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" | \- |
|
|
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 | \- |
|
|
@@ -15,7 +15,7 @@ It's quite common to include a dot in the title string, like "• This is a titl
|
|
|
15
15
|
|title | String | yes | | | Heading of the teaser |
|
|
16
16
|
|targetLink | String | yes | | | Target URL for the teaser |
|
|
17
17
|
|text | String | no | | | Teaser subtext |
|
|
18
|
-
|areaType | String | no | "right" or "bauta"
|
|
18
|
+
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
19
19
|
|theme | String | no | nyheter, kultur | (empty) | The theme-class to apply to the teaser |
|
|
20
20
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
21
21
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
@@ -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" | \- |
|
|
15
15
|
| title\* | Heading of the teaser<br />string | \- |
|
|
16
16
|
| text | Teaser subtext<br />string | \- |
|
|
17
17
|
|
|
@@ -19,8 +19,16 @@ The component will not include styling by itself. Make sure to include the right
|
|
|
19
19
|
| attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | { } |
|
|
20
20
|
|
|
21
21
|
```jsx
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
<Tooltip
|
|
23
|
+
arrowPosition="top"
|
|
24
|
+
closeButton
|
|
25
|
+
closeOnClickOutside
|
|
26
|
+
>
|
|
27
|
+
<React.Fragment key=".0">
|
|
28
|
+
<h2>
|
|
29
|
+
Senaste nytt </h2>
|
|
30
|
+
<p>
|
|
31
|
+
Här är en text om en ny liten funktion vi har. </p>
|
|
32
|
+
</React.Fragment>
|
|
33
|
+
</Tooltip>
|
|
26
34
|
```
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ export interface TeaserProps extends SharedProps {
|
|
|
8
8
|
/** Variant of the teaser */
|
|
9
9
|
variant?: "default" | "podcast" | "insandare" | "direkt";
|
|
10
10
|
/** The area where the column is rendered */
|
|
11
|
-
areaType?: "right" | "bauta"
|
|
11
|
+
areaType?: "right" | "bauta";
|
|
12
12
|
/** The theme-class to apply to the teaser */
|
|
13
13
|
theme?: "nyheter" | "kultur";
|
|
14
14
|
/** Teaser subtext */
|
|
@@ -6,8 +6,8 @@ export interface GroupHeaderProps extends SharedProps {
|
|
|
6
6
|
title: string;
|
|
7
7
|
/** The type of interactive element added to the header */
|
|
8
8
|
type?: GroupHeaderType;
|
|
9
|
-
/** The design variant, if not bauta
|
|
10
|
-
variant?: 'bauta' | '
|
|
9
|
+
/** The design variant, if not bauta the group header will get the 'standard' design */
|
|
10
|
+
variant?: 'bauta' | 'default';
|
|
11
11
|
/** The image element for the header */
|
|
12
12
|
media?: ComponentChild;
|
|
13
13
|
/** If given, the title is rendered as a link */
|
|
@@ -247,6 +247,7 @@ function GroupHeader({
|
|
|
247
247
|
attributes = {}
|
|
248
248
|
}) {
|
|
249
249
|
const componentClassName = "ds-group-header";
|
|
250
|
+
variant = variant !== "bauta" ? void 0 : variant;
|
|
250
251
|
const classes = formatClassString([
|
|
251
252
|
componentClassName,
|
|
252
253
|
type && `${componentClassName}--${type}`,
|