@bonniernews/dn-design-system-web 8.1.0 → 8.2.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.
- package/CHANGELOG.md +18 -0
- package/assets/teaser/teaser.scss +15 -0
- package/components/footer/footer.scss +2 -0
- package/components/group-header/group-header.scss +1 -1
- package/components/teaser-large/README.md +1 -0
- package/components/teaser-large/teaser-large.njk +3 -0
- package/components/teaser-list-swipe/teaser-list-swipe.scss +1 -1
- package/components/teaser-list-vertical/teaser-list-vertical.scss +5 -0
- package/components/teaser-longlife/teaser-longlife.scss +9 -1
- package/components/teaser-native/teaser-native.scss +8 -0
- package/components/teaser-standard/README.md +1 -0
- package/components/teaser-standard/teaser-standard.njk +3 -0
- package/components/teaser-swipe-card/teaser-swipe-card.scss +1 -1
- package/foundations/helpers/hover.scss +17 -7
- 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
|
+
## 8.2.0 (2023-11-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **web:** add timestamps to TeaserStandard and TeaserLarge ([#1087](https://github.com/BonnierNews/dn-design-system/issues/1087)) ([0e90215](https://github.com/BonnierNews/dn-design-system/commit/0e90215a5e12f1be299e8eabb6d9a19bcb42c374))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 8.1.1 (2023-11-14)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **web:** improve focus outline ([#1092](https://github.com/BonnierNews/dn-design-system/issues/1092)) ([547ff35](https://github.com/BonnierNews/dn-design-system/commit/547ff3565bc529fa61630e594e1d131cdc87b137))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## 8.1.0 (2023-11-13)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -11,6 +11,10 @@ $ds-teaser-standard-image-width-desktop: 196px;
|
|
|
11
11
|
|
|
12
12
|
$grade-size: ds-px-to-rem(34px);
|
|
13
13
|
|
|
14
|
+
@mixin ds-teaser-focus($offset: 2px, $includeSelector: true) {
|
|
15
|
+
@include ds-focus($offset, $includeSelector);
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
.ds-teaser {
|
|
15
19
|
display: block;
|
|
16
20
|
background-color: $ds-color-surface-background;
|
|
@@ -64,6 +68,17 @@ $grade-size: ds-px-to-rem(34px);
|
|
|
64
68
|
}
|
|
65
69
|
}
|
|
66
70
|
|
|
71
|
+
.ds-teaser__publication-time {
|
|
72
|
+
display: block;
|
|
73
|
+
@include ds-typography($ds-typography-functional-meta02regular);
|
|
74
|
+
color: $ds-color-text-primary-02;
|
|
75
|
+
margin-top: ds-spacing($ds-s-050);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.ds-teaser__text + .ds-teaser__publication-time {
|
|
79
|
+
margin-top: ds-spacing($ds-s-075);
|
|
80
|
+
}
|
|
81
|
+
|
|
67
82
|
.ds-icon.ds-icon--grade {
|
|
68
83
|
color: $ds-color-icon-primary;
|
|
69
84
|
border-radius: 50%;
|
|
@@ -112,6 +112,7 @@ $ds-footer-column-gap: ds-spacing($ds-s-400);
|
|
|
112
112
|
|
|
113
113
|
a {
|
|
114
114
|
@include ds-link($ds-link-list);
|
|
115
|
+
@include ds-focus($offset: 2px, $color: $ds-color-static-white);
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
}
|
|
@@ -126,6 +127,7 @@ $ds-footer-column-gap: ds-spacing($ds-s-400);
|
|
|
126
127
|
|
|
127
128
|
a {
|
|
128
129
|
@include ds-link($ds-link-list);
|
|
130
|
+
@include ds-focus($offset: 2px, $color: $ds-color-static-white);
|
|
129
131
|
margin: ds-spacing($ds-s-100 $ds-s-100 0 0);
|
|
130
132
|
display: inline-block;
|
|
131
133
|
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
|isLargeHeadline | bool | no | true, false | false | If the headline should be large. Only has an effect if `isItalicHeadline` is true. |
|
|
27
27
|
|isFlashingDot | bool | no | true, false | false | If there should be a flashing ball before the text |
|
|
28
28
|
|isLocked | bool | no | true, false | false | If the paywall indicator should be shown. It is only shown if the teaser has an image. |
|
|
29
|
+
|publicationTime | string | no | | null | Publication time text. |
|
|
29
30
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
30
31
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
31
32
|
|~forcePx~ | | | | | Not supported |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "../../foundations/helpers/forward.helpers.scss" as *;
|
|
2
|
-
|
|
2
|
+
@use "../../assets/teaser/teaser.scss" as *;
|
|
3
3
|
@use "../../components/icon-button/icon-button";
|
|
4
4
|
@use "../../components/group-header/group-header";
|
|
5
5
|
@use "../../components/teaser-swipe-card/teaser-swipe-card";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use "../../foundations/helpers/forward.helpers.scss" as *;
|
|
2
2
|
@use "../button/button.scss" as *;
|
|
3
3
|
@use "../../components/group-header/group-header";
|
|
4
|
+
@use "../../assets/teaser/teaser.scss" as *;
|
|
4
5
|
@use "../../components/teaser-dot/teaser-dot.scss";
|
|
5
6
|
|
|
6
7
|
$ds-dot-size: ds-px-to-rem(10px);
|
|
@@ -20,6 +21,10 @@ $ds-teaser-list-vertical-media-icon-size: 20px;
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
.ds-teaser-list-vertical__content a {
|
|
25
|
+
@include ds-teaser-focus(-2px);
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
.ds-teaser-list-vertical__link {
|
|
24
29
|
position: relative;
|
|
25
30
|
padding: ds-spacing($ds-s-100, rem);
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
@use "../../foundations/helpers/forward.helpers.scss" as *;
|
|
2
|
-
@use "../../assets/teaser/teaser.scss"
|
|
2
|
+
@use "../../assets/teaser/teaser.scss" as *;
|
|
3
3
|
|
|
4
4
|
.ds-teaser.ds-teaser--longlife {
|
|
5
5
|
position: relative;
|
|
6
6
|
|
|
7
|
+
&:focus-visible {
|
|
8
|
+
outline: none;
|
|
9
|
+
|
|
10
|
+
.ds-teaser__content {
|
|
11
|
+
@include ds-focus($offset: -8px, $includeSelector: false, $color: $ds-color-static-white);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
.ds-teaser-image {
|
|
8
16
|
position: relative;
|
|
9
17
|
width: 100%;
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
overflow: hidden;
|
|
7
7
|
border-bottom: 4px solid $ds-color-static-ad-yellow;
|
|
8
8
|
|
|
9
|
+
&:focus-visible {
|
|
10
|
+
outline: none;
|
|
11
|
+
|
|
12
|
+
.ds-teaser__content {
|
|
13
|
+
@include ds-teaser-focus(-8px, false);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
.ds-teaser__media {
|
|
10
18
|
margin-bottom: ds-spacing($ds-s-teaser-vertical-medium);
|
|
11
19
|
}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
|isItalicHeadline | bool | no | true, false | false | If the headline should be italic |
|
|
25
25
|
|isFlashingDot | bool | no | true, false | false | If there should be a flashing ball before the text |
|
|
26
26
|
|isLocked | bool | no | true, false | false | If the paywall indicator should be shown. It is only shown if the teaser has an image. |
|
|
27
|
+
|publicationTime | string | no | | null | Publication time text. |
|
|
27
28
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
28
29
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
29
30
|
|~forcePx~ | | | | | Not supported |
|
|
@@ -14,14 +14,24 @@
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
@mixin
|
|
18
|
-
|
|
17
|
+
@mixin _ds-focus($offset, $width, $color) {
|
|
18
|
+
outline: $width solid $color;
|
|
19
|
+
@if $offset {
|
|
20
|
+
outline-offset: $offset;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@mixin ds-focus(
|
|
25
|
+
$offset: false,
|
|
26
|
+
$includeSelector: true,
|
|
27
|
+
$width: ds-metrics-border-width(x2),
|
|
28
|
+
$color: $ds-color-border-focus-02
|
|
29
|
+
) {
|
|
30
|
+
@if not $includeSelector {
|
|
31
|
+
@include _ds-focus($offset, $width, $color);
|
|
32
|
+
} @else {
|
|
19
33
|
&:focus-visible {
|
|
20
|
-
|
|
21
|
-
outline-offset: $offset;
|
|
34
|
+
@include _ds-focus($offset, $width, $color);
|
|
22
35
|
}
|
|
23
|
-
} @else {
|
|
24
|
-
outline: ds-metrics-border-width(x2) solid $ds-color-border-focus-02;
|
|
25
|
-
outline-offset: $offset;
|
|
26
36
|
}
|
|
27
37
|
}
|
package/package.json
CHANGED