@bonniernews/dn-design-system-web 6.0.3 → 6.0.5
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 +18 -0
- package/components/group-header/README.md +1 -1
- package/components/group-header/group-header.njk +4 -0
- package/components/group-header/group-header.scss +7 -0
- package/components/spinner/spinner.njk +1 -1
- package/components/teaser-list-swipe/README.md +1 -1
- package/components/teaser-list-swipe/teaser-list-swipe.njk +2 -2
- package/components/teaser-swipe-card/teaser-swipe-card.scss +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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
|
+
## 6.0.5 (2023-10-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **web:** further updates to TeaserSwipeCard ([#1046](https://github.com/BonnierNews/dn-design-system/issues/1046)) ([307f6e7](https://github.com/BonnierNews/dn-design-system/commit/307f6e7025be770e068f78241b1dbccc7898cb03))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 6.0.4 (2023-10-03)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **web:** update teaserlistswipe after design feedback ([#1026](https://github.com/BonnierNews/dn-design-system/issues/1026)) ([4d0bd68](https://github.com/BonnierNews/dn-design-system/commit/4d0bd682a2e5a0f35a5eb75dc7e3ddb99a7b67a9))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## 6.0.3 (2023-10-02)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @bonniernews/dn-design-system-web
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
25
25
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
26
26
|
|
|
27
|
-
NB: The `arrows` variant is only active in desktop environments. It is equivalent to `icon` in non-desktop environments.
|
|
27
|
+
NB: The `arrows` variant is only active in desktop environments. It is equivalent to `link` or `icon` in non-desktop environments, depending on if the `linkText` parameter is also given.
|
|
28
28
|
|
|
29
29
|
Depending on variant, either the `toggle-*` or `linkText` parameters are allowed. In `icon` and `link` mode, the `href` parameter is required to show the ornament.
|
|
30
30
|
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
</span>
|
|
25
25
|
{% elif (params.variant == 'icon' or not params.variant) and params.href %}
|
|
26
26
|
{{ IconUse({ icon: "arrow_forward", classNames: componentClassName + '__icon' }) }}
|
|
27
|
+
{% elif (params.variant == 'arrows') and params.href and params.linkText %}
|
|
28
|
+
<span class="{{ componentClassName + '__right-link' }} hidden-desktop">
|
|
29
|
+
{{ params.linkText }}
|
|
30
|
+
</span>
|
|
27
31
|
{% elif (params.variant == 'arrows') and params.href %}
|
|
28
32
|
{{ IconUse({ icon: "arrow_forward", classNames: componentClassName + '__icon hidden-desktop' }) }}
|
|
29
33
|
{% endif %}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
justify-content: space-between;
|
|
9
|
+
align-items: stretch;
|
|
9
10
|
background: $ds-color-background-primary;
|
|
10
11
|
color: $ds-color-text-primary;
|
|
11
12
|
@include ds-typography($ds-typography-functional-body02regular);
|
|
@@ -22,10 +23,16 @@
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
.ds-group-header__arrows {
|
|
26
|
+
display: flex;
|
|
25
27
|
flex-shrink: 0;
|
|
26
28
|
padding-right: ds-spacing-component($ds-sc-x2);
|
|
27
29
|
}
|
|
28
30
|
|
|
31
|
+
.ds-btn-toggle, .ds-group-header__arrows {
|
|
32
|
+
margin-top: 2px; // special case due to design margin extending from the component's visual size, not its clickable area
|
|
33
|
+
margin-bottom: 2px;
|
|
34
|
+
}
|
|
35
|
+
|
|
29
36
|
.ds-group-header__right-link {
|
|
30
37
|
@include ds-link($ds-link-paragraph);
|
|
31
38
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
classNamePrefix + size,
|
|
13
13
|
classNamePrefix + (params.variant or "primary"),
|
|
14
14
|
params.classNames if params.classNames
|
|
15
|
-
] %}
|
|
15
|
+
] | join(" ") %}
|
|
16
16
|
|
|
17
17
|
<span class="{{ classes }}" {{- attributes | safe }}>
|
|
18
18
|
<span class="{{ componentClassName + '__inner'}}"></span>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|title | String | yes | | | Heading of the teaser |
|
|
14
14
|
|titleHref | String | no | | | Target URL for the header |
|
|
15
15
|
|areaType | String | no | "main", "right", "bauta", "bautaxl" | | The area where the column is rendered |
|
|
16
|
-
|arrowPosition | String | no | "floating", "header" | "
|
|
16
|
+
|arrowPosition | String | no | "floating", "header" | "header" | Determines where the scroll arrows are rendered |
|
|
17
17
|
|theme | String | no | nyheter, kultur, ekonomi, sport, sthlm | (empty) | The theme-class to apply to the teaser |
|
|
18
18
|
|teasers | Object | yes | | | A list of arguments to TeaserSwipeCard |
|
|
19
19
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
{% macro TeaserListSwipe(params) %}
|
|
8
8
|
{% set componentClassName = "ds-teaser" %}
|
|
9
9
|
{% set classNamePrefix = componentClassName + "--" %}
|
|
10
|
-
{% set arrowPosition = params.arrowPosition or '
|
|
10
|
+
{% set arrowPosition = params.arrowPosition or 'header' %}
|
|
11
11
|
{%- set classes = [
|
|
12
12
|
"ds-teaser--list-swipe",
|
|
13
13
|
params.classNames if params.classNames
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
title: params.title,
|
|
24
24
|
href: params.titleHref,
|
|
25
25
|
variant: 'arrows' if arrowPosition === 'header' else 'link',
|
|
26
|
-
linkText: 'Visa alla'
|
|
26
|
+
linkText: 'Visa alla'
|
|
27
27
|
}) }}
|
|
28
28
|
<div class="{{ componentClassName + '__carousel'}}">
|
|
29
29
|
{% for teaser in params.teasers %}
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
.ds-teaser.ds-teaser-swipe-card {
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
|
-
width:
|
|
10
|
-
max-width:
|
|
9
|
+
width: 248px;
|
|
10
|
+
max-width: 66vw; // ensure low-width devices see atleast part of a second teaser
|
|
11
11
|
color: $ds-color-text-primary;
|
|
12
12
|
text-decoration: none;
|
|
13
13
|
|
|
14
14
|
border: ds-metrics-border-width(x1) solid $ds-color-border-primary;
|
|
15
|
-
border-radius: ds-metrics-border-radius(
|
|
15
|
+
border-radius: ds-metrics-border-radius(x1);
|
|
16
16
|
overflow: hidden; // ensure media doesn't overflow the border-radius
|
|
17
17
|
margin-bottom: 0;
|
|
18
18
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
.ds-teaser__text {
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: column;
|
|
24
|
-
padding: ds-spacing-component($ds-sc-x3
|
|
24
|
+
padding: ds-spacing-component($ds-sc-x3);
|
|
25
25
|
margin: 0;
|
|
26
26
|
flex: 1;
|
|
27
27
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
.ds-teaser__title {
|
|
35
35
|
@include ds-typography($ds-typography-expressive-heading01bold);
|
|
36
|
-
margin-bottom: ds-spacing-component($ds-sc-
|
|
36
|
+
margin-bottom: ds-spacing-component($ds-sc-x2);
|
|
37
37
|
flex: 1;
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
&.ds-teaser-swipe-card--insandare {
|
|
47
47
|
.ds-teaser__title {
|
|
48
|
-
@include ds-typography($ds-typography-expressive-
|
|
48
|
+
@include ds-typography($ds-typography-expressive-heading01italicregular);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
package/package.json
CHANGED