@bonniernews/dn-design-system-web 3.0.0-alpha.72 → 3.0.0-alpha.74
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 +2 -0
- package/components/image-caption/image-caption.njk +13 -2
- package/components/image-caption/image-caption.scss +10 -0
- package/components/teaser-large/teaser-large.scss +8 -0
- package/components/teaser-package/teaser-package.scss +2 -0
- package/components/teaser-split/teaser-split.scss +13 -5
- package/foundations/helpers/hover.scss +14 -0
- package/foundations/helpers/links.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
|
+
## 3.0.0-alpha.74 (2023-05-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **web:** set focus outline offset for teasers ([#845](https://github.com/BonnierNews/dn-design-system/issues/845)) ([9691be5](https://github.com/BonnierNews/dn-design-system/commit/9691be5118ee2a0335bfaaeb28db30521eb92f97))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [3.0.0-alpha.73](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@3.0.0-alpha.72...@bonniernews/dn-design-system-web@3.0.0-alpha.73) (2023-05-30)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **web:** imageCredit nowrap unless superwide ([#828](https://github.com/BonnierNews/dn-design-system/issues/828)) ([e6b780e](https://github.com/BonnierNews/dn-design-system/commit/e6b780e86bcd62632b1c5c83d70e913050a9655c))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [3.0.0-alpha.72](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@3.0.0-alpha.71...@bonniernews/dn-design-system-web@3.0.0-alpha.72) (2023-05-30)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -17,8 +17,19 @@
|
|
|
17
17
|
<span aria-hidden="true">{{ params.caption | safe }}</span>
|
|
18
18
|
{% endif %}
|
|
19
19
|
{% if params.author %}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
{% set authorText = ((params.imageType | capitalize) + ": " + params.author) if params.imageType else params.author %}
|
|
21
|
+
|
|
22
|
+
{% set authorClasses = [ "ds-article-image__credits" ] %}
|
|
23
|
+
{# Low estimate of how much will fit on tablet/desktop #}
|
|
24
|
+
{% if (authorText | length) >= 27 and (authorText | length) < 60 %}
|
|
25
|
+
{% set authorClasses = (authorClasses.push("ds-article-image__credits--nowrap-bigscreen"), authorClasses) %}
|
|
26
|
+
{# Low estimate of how much will fit on iphone4 #}
|
|
27
|
+
{% elif (authorText | length) < 27 %}
|
|
28
|
+
{% set authorClasses = (authorClasses.push("ds-article-image__credits--nowrap"), authorClasses) %}
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
31
|
+
<span class="{{ authorClasses | join(" ") }}">
|
|
32
|
+
{{- authorText -}}
|
|
22
33
|
</span>
|
|
23
34
|
{% endif %}
|
|
24
35
|
</figcaption>
|
|
@@ -11,5 +11,15 @@
|
|
|
11
11
|
|
|
12
12
|
> .ds-article-image__credits {
|
|
13
13
|
color: $ds-color-text-primary-02;
|
|
14
|
+
|
|
15
|
+
&.ds-article-image__credits--nowrap {
|
|
16
|
+
white-space: nowrap;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.ds-article-image__credits--nowrap-bigscreen {
|
|
20
|
+
@include ds-mq-smallest-breakpoint(tablet) {
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
14
24
|
}
|
|
15
25
|
}
|
|
@@ -26,11 +26,13 @@
|
|
|
26
26
|
display: block;
|
|
27
27
|
position: relative;
|
|
28
28
|
flex: 1;
|
|
29
|
-
|
|
29
|
+
margin-right: ds-spacing-component($ds-sc-x4);
|
|
30
30
|
&:last-child {
|
|
31
|
-
|
|
31
|
+
margin-right: 0;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
@include ds-teaser-focus(4px);
|
|
35
|
+
|
|
34
36
|
@include ds-mq-largest-breakpoint(mobile) {
|
|
35
37
|
width: calc(50% - ds-spacing-component($ds-sc-x4) / 2);
|
|
36
38
|
flex: auto;
|
|
@@ -39,12 +41,14 @@
|
|
|
39
41
|
flex: 1;
|
|
40
42
|
}
|
|
41
43
|
&:nth-child(2) {
|
|
42
|
-
|
|
44
|
+
margin-right: 0;
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
|
|
46
|
-
&:nth-child(3),
|
|
47
|
-
&:nth-child(4) {
|
|
48
|
+
&:nth-child(3)::before,
|
|
49
|
+
&:nth-child(4)::before {
|
|
50
|
+
display: block;
|
|
51
|
+
content: "";
|
|
48
52
|
@include ds-spacing-layout($ds-sl-teaser-vertical, margin-top);
|
|
49
53
|
@include ds-spacing-layout($ds-sl-teaser-vertical, padding-top);
|
|
50
54
|
border-top: ds-metrics-border-width(x1) solid $ds-color-border-primary;
|
|
@@ -56,6 +60,10 @@
|
|
|
56
60
|
}
|
|
57
61
|
}
|
|
58
62
|
|
|
63
|
+
&:nth-child(3):not(:last-child)::before {
|
|
64
|
+
margin-right: ds-spacing-component($ds-sc-x4, "px", true);
|
|
65
|
+
}
|
|
66
|
+
|
|
59
67
|
.ds-teaser__title {
|
|
60
68
|
@include ds-typography($ds-typography-expressive-heading02bold);
|
|
61
69
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
@use "mediaQueries.scss" as *;
|
|
2
|
+
@use "colors.scss" as *;
|
|
3
|
+
@use "metrics.scss" as *;
|
|
2
4
|
|
|
3
5
|
@mixin ds-hover($includeSelector: false) {
|
|
4
6
|
@include ds-mq-smallest-breakpoint(desktop, "and (hover: hover)") {
|
|
@@ -11,3 +13,15 @@
|
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
}
|
|
16
|
+
|
|
17
|
+
@mixin ds-teaser-focus($offset: 2px, $includeSelector: true) {
|
|
18
|
+
@if $includeSelector {
|
|
19
|
+
&:focus-visible {
|
|
20
|
+
outline: ds-metrics-border-width(x2) solid $ds-color-border-focus-02;
|
|
21
|
+
outline-offset: $offset;
|
|
22
|
+
}
|
|
23
|
+
} @else {
|
|
24
|
+
outline: ds-metrics-border-width(x2) solid $ds-color-border-focus-02;
|
|
25
|
+
outline-offset: $offset;
|
|
26
|
+
}
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonniernews/dn-design-system-web",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.74",
|
|
4
4
|
"description": "DN design system for web.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"homepage": "https://github.com/BonnierNews/dn-design-system/tree/main/web/src#readme",
|