@bonniernews/dn-design-system-web 4.8.4 → 5.0.1
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
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 5.0.1 (2023-09-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @bonniernews/dn-design-system-web
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 5.0.0 (2023-09-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### ⚠ BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* **web:** use teaser arg instead of caller() (#1010)
|
|
20
|
+
|
|
21
|
+
### Code Refactoring
|
|
22
|
+
|
|
23
|
+
* **web:** use teaser arg instead of caller() ([#1010](https://github.com/BonnierNews/dn-design-system/issues/1010)) ([db62049](https://github.com/BonnierNews/dn-design-system/commit/db62049748fe3a6058e742c3411c29c1b115e782))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
6
27
|
## 4.8.4 (2023-09-21)
|
|
7
28
|
|
|
8
29
|
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|areaType | String | no | "main", "right", "bauta", "bautaxl" | | The area where the column is rendered |
|
|
16
16
|
|scrollType | String | no | "arrows", "header" | "arrows" | Where to render the scroll arrows |
|
|
17
17
|
|theme | String | no | nyheter, kultur, ekonomi, sport, sthlm | (empty) | The theme-class to apply to the teaser |
|
|
18
|
+
|teasers | Object | yes | | | A list of arguments to TeaserSwipeCard |
|
|
18
19
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
19
20
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
20
21
|
|~forcePx~ | | | | | Not supported |
|
|
@@ -28,14 +29,11 @@ These are copy paste friendly examples to quickly get started using a component.
|
|
|
28
29
|
```html
|
|
29
30
|
{% from '@bonniernews/dn-design-system-web/components/teaser-list-swipe/teaser-list-swipe.njk' import TeaserListSwipe %}
|
|
30
31
|
|
|
31
|
-
{
|
|
32
|
+
{{ TeaserListSwipe({
|
|
32
33
|
title: 'DN Direkt',
|
|
33
34
|
targetLink: '/direkt/'
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
(render teasers)
|
|
37
|
-
{% endfor %}
|
|
38
|
-
{% endcall}
|
|
35
|
+
teasers: [{...}, {...}]
|
|
36
|
+
}) }}
|
|
39
37
|
```
|
|
40
38
|
|
|
41
39
|
### SCSS
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{% from '@bonniernews/dn-design-system-web/njk-helpers/attributes.njk' import getAttributes %}
|
|
2
2
|
{% from '@bonniernews/dn-design-system-web/components/icon-button/icon-button.njk' import IconButton %}
|
|
3
3
|
{% from '@bonniernews/dn-design-system-web/components/group-header/group-header.njk' import GroupHeader %}
|
|
4
|
+
{% from '@bonniernews/dn-design-system-web/components/teaser-swipe-card/teaser-swipe-card.njk' import TeaserSwipeCard %}
|
|
4
5
|
|
|
5
6
|
{% macro TeaserListSwipe(params) %}
|
|
6
7
|
{% set componentClassName = "ds-teaser" %}
|
|
@@ -20,7 +21,9 @@
|
|
|
20
21
|
variant: 'arrows' if params.scrollType == 'header'
|
|
21
22
|
}) }}
|
|
22
23
|
<div class="{{ componentClassName + '__carousel'}}">
|
|
23
|
-
{
|
|
24
|
+
{% for teaser in params.teasers %}
|
|
25
|
+
{{ TeaserSwipeCard(teaser) }}
|
|
26
|
+
{% endfor %}
|
|
24
27
|
</div>
|
|
25
28
|
|
|
26
29
|
{% if params.scrollType != 'header' %}
|
package/package.json
CHANGED