@bonniernews/dn-design-system-web 4.4.0 → 4.5.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/components/teaser-card/teaser-card.njk +1 -1
- package/components/teaser-dot/README.md +6 -0
- package/components/teaser-dot/teaser-dot.scss +48 -17
- package/components/teaser-native/teaser-native.scss +1 -1
- package/components/teaser-package/teaser-package.scss +1 -1
- 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
|
+
## 4.5.0 (2023-09-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **web:** implement the app's teaser dot animation ([#990](https://github.com/BonnierNews/dn-design-system/issues/990)) ([3147f94](https://github.com/BonnierNews/dn-design-system/commit/3147f942cb5ff276c2c788e8549e43fa7ba14830))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 4.4.1 (2023-09-08)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **web:** teaser card href ([#991](https://github.com/BonnierNews/dn-design-system/issues/991)) ([b1fe442](https://github.com/BonnierNews/dn-design-system/commit/b1fe44295a12a3d035072c9f4c495c444135458f))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## 4.4.0 (2023-09-08)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
{% set classes = componentClassName + " " + variant | join(" ") %}
|
|
22
22
|
|
|
23
23
|
{% if params.targetLink %}
|
|
24
|
-
<a class="{{ classes }}" {{- attributes | safe }}>
|
|
24
|
+
<a class="{{ classes }}" href="{{ params.targetLink }}" {{- attributes | safe }}>
|
|
25
25
|
{{ caller() }}
|
|
26
26
|
</a>
|
|
27
27
|
{% else %}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|forcePx | bool | no | true, false | false | Fixed pixel value is used for typography to prevent scaling based on html font-size |
|
|
16
16
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
17
17
|
|
|
18
|
+
|
|
18
19
|
## Minimum requirement example
|
|
19
20
|
|
|
20
21
|
### Nunjucks
|
|
@@ -32,4 +33,9 @@ These are copy paste friendly examples to quickliy get started using a component
|
|
|
32
33
|
### SCSS
|
|
33
34
|
```scss
|
|
34
35
|
@use "@bonniernews/dn-design-system-web/components/teaser-dot/teaser-dot";
|
|
36
|
+
|
|
37
|
+
.ds-teaser-dot {
|
|
38
|
+
// use css variable to optionally override size
|
|
39
|
+
--ds-teaser-dot-size: 10px;
|
|
40
|
+
}
|
|
35
41
|
```
|
|
@@ -1,39 +1,70 @@
|
|
|
1
1
|
@use "../../foundations/helpers/forward.helpers.scss" as *;
|
|
2
2
|
|
|
3
|
-
$ds-teaser-dot-size: 10px;
|
|
4
|
-
|
|
5
3
|
.ds-teaser-dot {
|
|
6
|
-
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
background-color: $ds-theme-color;
|
|
9
|
-
border-radius: 50%;
|
|
10
|
-
height: ds-px-to-rem($ds-teaser-dot-size);
|
|
11
|
-
width: ds-px-to-rem($ds-teaser-dot-size);
|
|
12
|
-
margin-right: ds-px-to-rem(1px);
|
|
4
|
+
--ds-teaser-dot-size: #{ds-px-to-rem(10px)};
|
|
13
5
|
|
|
14
6
|
@at-root .ds-force-px#{&} {
|
|
15
|
-
|
|
16
|
-
width: $ds-teaser-dot-size;
|
|
17
|
-
margin-right: 1px;
|
|
7
|
+
--ds-teaser-dot-size: 10px;
|
|
18
8
|
}
|
|
19
9
|
|
|
10
|
+
display: inline-block;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
position: relative;
|
|
13
|
+
height: var(--ds-teaser-dot-size);
|
|
14
|
+
width: var(--ds-teaser-dot-size);
|
|
15
|
+
margin-right: calc(var(--ds-teaser-dot-size) * 0.1);
|
|
16
|
+
color: $ds-theme-color;
|
|
17
|
+
|
|
20
18
|
@media (prefers-reduced-motion: no-preference) {
|
|
21
19
|
&.ds-teaser-dot--flashing {
|
|
22
|
-
animation: pulse
|
|
20
|
+
animation: dot-pulse 2s ease infinite;
|
|
21
|
+
}
|
|
22
|
+
&.ds-teaser-dot--flashing::after {
|
|
23
|
+
animation: ripple-pulse 2s linear infinite;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
26
|
+
|
|
27
|
+
&::after,
|
|
28
|
+
&.ds-teaser-dot--flashing::before {
|
|
29
|
+
content: '';
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 0;
|
|
32
|
+
bottom: 0;
|
|
33
|
+
left: 0;
|
|
34
|
+
right: 0;
|
|
35
|
+
transform-origin: 50% 50%;
|
|
36
|
+
background-color: currentColor;
|
|
37
|
+
border-radius: 50%;
|
|
38
|
+
}
|
|
25
39
|
}
|
|
26
40
|
|
|
27
|
-
@keyframes pulse {
|
|
41
|
+
@keyframes dot-pulse {
|
|
28
42
|
0% {
|
|
29
|
-
|
|
43
|
+
transform: scale(.95);
|
|
30
44
|
}
|
|
31
45
|
|
|
32
|
-
|
|
33
|
-
|
|
46
|
+
70% {
|
|
47
|
+
transform: scale(1);
|
|
34
48
|
}
|
|
35
49
|
|
|
36
50
|
100% {
|
|
51
|
+
transform: scale(0.95);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes ripple-pulse {
|
|
56
|
+
0% {
|
|
57
|
+
transform: scale(.95);
|
|
58
|
+
opacity: 0.4;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
70% {
|
|
62
|
+
transform: scale(2);
|
|
37
63
|
opacity: 0;
|
|
38
64
|
}
|
|
65
|
+
|
|
66
|
+
100% {
|
|
67
|
+
transform: scale(.95);
|
|
68
|
+
opacity: 0
|
|
69
|
+
}
|
|
39
70
|
}
|
package/package.json
CHANGED