@bonniernews/dn-design-system-web 16.1.0 → 16.1.2
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 +14 -0
- package/components/badge/badge.scss +1 -1
- package/components/byline/byline.scss +3 -3
- package/components/disclaimer/disclaimer.scss +1 -1
- package/components/divider/divider.scss +1 -1
- package/components/factbox/factbox.scss +2 -2
- package/components/footer/footer.scss +2 -2
- package/components/group-header/group-header.scss +2 -2
- package/components/list-item/list-item.scss +2 -2
- package/components/profile-header/profile-header.scss +1 -1
- package/components/switch/switch.scss +1 -1
- package/components/tag-header/tag-header.scss +1 -1
- package/components/teaser-list-vertical/teaser-list-vertical.scss +2 -2
- package/components/teaser-package/teaser-package.scss +1 -1
- package/components/teaser-split/teaser-split.scss +2 -2
- package/foundations/helpers/README-spacing.md +0 -6
- package/foundations/helpers/hover.scss +1 -1
- package/foundations/helpers/metrics.scss +0 -10
- package/foundations/helpers/spacing.scss +0 -3
- package/package.json +1 -1
- package/foundations/helpers/spacing-deprecated.scss +0 -63
- package/foundations/variables/deprecated/spacingComponent.scss +0 -12
- package/foundations/variables/deprecated/spacingComponentList.scss +0 -10
- package/foundations/variables/deprecated/spacingLayout.scss +0 -17
- package/foundations/variables/deprecated/spacingLayoutLargeScreen.scss +0 -17
- package/foundations/variables/deprecated/spacingLayoutList.scss +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [16.1.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@16.1.1...@bonniernews/dn-design-system-web@16.1.2) (2024-07-16)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Maintenance
|
|
11
|
+
|
|
12
|
+
* **web:** remove deprecated spacing ([#1337](https://github.com/BonnierNews/dn-design-system/issues/1337)) ([82823ad](https://github.com/BonnierNews/dn-design-system/commit/82823ad8bb5ad3591bcad1d9916ee25267bb62b6))
|
|
13
|
+
|
|
14
|
+
## [16.1.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@16.1.0...@bonniernews/dn-design-system-web@16.1.1) (2024-07-16)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Maintenance
|
|
18
|
+
|
|
19
|
+
* **web:** use correct metric helpers ([#1338](https://github.com/BonnierNews/dn-design-system/issues/1338)) ([ca0bec0](https://github.com/BonnierNews/dn-design-system/commit/ca0bec05a2c2b272b45600ec5a8a94e35c22ff05))
|
|
20
|
+
|
|
7
21
|
## [16.1.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@16.0.7...@bonniernews/dn-design-system-web@16.1.0) (2024-07-15)
|
|
8
22
|
|
|
9
23
|
|
|
@@ -10,7 +10,7 @@ $ds-badge__min-size: 8px;
|
|
|
10
10
|
@include ds-typography($ds-typography-functionalmeta02, $lineHeight: 0, $fontWeight: $ds-fontweight-semibold);
|
|
11
11
|
color: $ds-color-static-white;
|
|
12
12
|
background-color: $ds-color-component-brand;
|
|
13
|
-
border: $ds-color-border-secondary ds-
|
|
13
|
+
border: $ds-color-border-secondary ds-border-width(x2) solid;
|
|
14
14
|
border-radius: 100px;
|
|
15
15
|
display: inline-flex;
|
|
16
16
|
align-items: center;
|
|
@@ -23,7 +23,7 @@ $ds-byline__image-size--direkt: 36px;
|
|
|
23
23
|
|
|
24
24
|
&::after {
|
|
25
25
|
content: "";
|
|
26
|
-
height: ds-
|
|
26
|
+
height: ds-border-width(x1);
|
|
27
27
|
width: calc(100% - ds-spacing($ds-s-200));
|
|
28
28
|
background-color: $ds-color-border-primary;
|
|
29
29
|
position: absolute;
|
|
@@ -62,7 +62,7 @@ $ds-byline__image-size--direkt: 36px;
|
|
|
62
62
|
text-decoration: none;
|
|
63
63
|
|
|
64
64
|
&:focus-visible {
|
|
65
|
-
outline: ds-
|
|
65
|
+
outline: ds-border-width(x2) solid $ds-color-border-focus-02;
|
|
66
66
|
outline-offset: 2px;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -174,7 +174,7 @@ $ds-byline__image-size--direkt: 36px;
|
|
|
174
174
|
&:focus-visible {
|
|
175
175
|
outline: none;
|
|
176
176
|
.ds-byline__inner {
|
|
177
|
-
outline: ds-
|
|
177
|
+
outline: ds-border-width(x2) solid $ds-color-border-focus-02;
|
|
178
178
|
outline-offset: -2px;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
@@ -15,14 +15,14 @@ $ds-factbox__max-height: 500px; // includes top/bottom spacing
|
|
|
15
15
|
padding: ds-spacing($ds-s-100 0 $ds-s-200);
|
|
16
16
|
|
|
17
17
|
.ds-factbox__inner {
|
|
18
|
-
border-top: ds-
|
|
18
|
+
border-top: ds-border-width(x1) solid $ds-color-border-primary;
|
|
19
19
|
border-left: $ds-factbox-border-width solid $ds-theme-color;
|
|
20
20
|
max-height: ds-px-to-rem($ds-factbox__max-height);
|
|
21
21
|
overflow: hidden;
|
|
22
22
|
position: relative;
|
|
23
23
|
padding: $ds-factbox__padding;
|
|
24
24
|
padding-left: $ds-factbox__padding-left;
|
|
25
|
-
padding-top: $ds-factbox__padding - ds-
|
|
25
|
+
padding-top: $ds-factbox__padding - ds-border-width(x1);
|
|
26
26
|
|
|
27
27
|
@at-root .ds-force-px#{&} {
|
|
28
28
|
max-height: $ds-factbox__max-height;
|
|
@@ -37,7 +37,7 @@ $ds-footer-column-gap: ds-spacing($ds-s-400);
|
|
|
37
37
|
&__rudolf,
|
|
38
38
|
&__editors,
|
|
39
39
|
&__channels {
|
|
40
|
-
border-top-width: ds-
|
|
40
|
+
border-top-width: ds-border-width(x1);
|
|
41
41
|
border-top-style: solid;
|
|
42
42
|
border-color: $ds-color-static-transparent-white-10;
|
|
43
43
|
}
|
|
@@ -50,7 +50,7 @@ $ds-footer-column-gap: ds-spacing($ds-s-400);
|
|
|
50
50
|
|
|
51
51
|
&__link-grid {
|
|
52
52
|
border-bottom-style: solid;
|
|
53
|
-
border-bottom-width: ds-
|
|
53
|
+
border-bottom-width: ds-border-width(x1);
|
|
54
54
|
border-color: $ds-color-static-transparent-white-10;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -16,7 +16,7 @@ $ds-group-header__icon-size: 24px;
|
|
|
16
16
|
@include ds-typography($ds-typography-functionalbody02);
|
|
17
17
|
|
|
18
18
|
&--bottom-border {
|
|
19
|
-
border-bottom: ds-
|
|
19
|
+
border-bottom: ds-border-width(x1) solid $ds-color-border-primary;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&--bauta {
|
|
@@ -110,7 +110,7 @@ $ds-group-header__icon-size: 24px;
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
&--bottom-border .ds-group-header__title {
|
|
113
|
-
padding-bottom: ds-spacing($ds-s-075) - ds-
|
|
113
|
+
padding-bottom: ds-spacing($ds-s-075) - ds-border-width(x1);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
&--bautaxl .ds-group-header__title {
|
|
@@ -153,7 +153,7 @@ $ds-list-item__icon-size: 24px;
|
|
|
153
153
|
&:focus-visible {
|
|
154
154
|
outline: none;
|
|
155
155
|
.ds-list-item__inner {
|
|
156
|
-
outline: ds-
|
|
156
|
+
outline: ds-border-width(x2) solid $ds-color-border-focus-02;
|
|
157
157
|
outline-offset: -2px;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
@@ -171,7 +171,7 @@ $ds-list-item__icon-size: 24px;
|
|
|
171
171
|
&::after,
|
|
172
172
|
&.ds-list-item--accordion-active + .ds-list-item__accordion-inner::after {
|
|
173
173
|
content: "";
|
|
174
|
-
height: ds-
|
|
174
|
+
height: ds-border-width(x1);
|
|
175
175
|
width: calc(100% - (ds-spacing($ds-s-100) * 2));
|
|
176
176
|
background-color: $ds-color-border-primary;
|
|
177
177
|
position: absolute;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
@include ds-typography($ds-typography-functionalbody02);
|
|
48
48
|
color: $ds-color-text-primary;
|
|
49
49
|
margin: ds-spacing(0 $ds-s-100 0);
|
|
50
|
-
border-top: ds-
|
|
50
|
+
border-top: ds-border-width(x1) solid $ds-color-border-primary;
|
|
51
51
|
padding: ds-spacing($ds-s-100 0);
|
|
52
52
|
|
|
53
53
|
a {
|
|
@@ -101,7 +101,7 @@ $ds-switch__container-width: 44px;
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
&:focus-visible + .ds-switch__inner .ds-switch__box {
|
|
104
|
-
outline: ds-
|
|
104
|
+
outline: ds-border-width(x2) solid $ds-color-border-focus-02;
|
|
105
105
|
outline-offset: 2px;
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
@include ds-typography($ds-typography-functionalbody02);
|
|
75
75
|
color: $ds-color-text-primary;
|
|
76
76
|
margin: ds-spacing($ds-s-100 $ds-s-100 0);
|
|
77
|
-
border-top: ds-
|
|
77
|
+
border-top: ds-border-width(x1) solid $ds-color-border-primary;
|
|
78
78
|
padding-top: ds-spacing($ds-s-100);
|
|
79
79
|
|
|
80
80
|
a {
|
|
@@ -35,7 +35,7 @@ $ds-teaser-list-vertical-media-icon-size: 20px;
|
|
|
35
35
|
top: 0;
|
|
36
36
|
left: 0;
|
|
37
37
|
right: 0;
|
|
38
|
-
height: ds-
|
|
38
|
+
height: ds-border-width(x1);
|
|
39
39
|
background-color: $ds-color-border-primary;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -51,7 +51,7 @@ $ds-teaser-list-vertical-media-icon-size: 20px;
|
|
|
51
51
|
content: "";
|
|
52
52
|
position: absolute;
|
|
53
53
|
bottom: 0;
|
|
54
|
-
height: ds-
|
|
54
|
+
height: ds-border-width(x1);
|
|
55
55
|
width: calc(100% - ds-spacing($ds-s-200));
|
|
56
56
|
background-color: $ds-color-border-primary;
|
|
57
57
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@at-root .ds-teaser-package > & + & {
|
|
13
13
|
&:before {
|
|
14
14
|
content: "";
|
|
15
|
-
height: ds-
|
|
15
|
+
height: ds-border-width(x1);
|
|
16
16
|
background-color: $ds-color-border-primary;
|
|
17
17
|
left: 0;
|
|
18
18
|
right: 0;
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
content: "";
|
|
53
53
|
margin-top: ds-spacing($ds-s-100);
|
|
54
54
|
padding-top: ds-spacing($ds-s-075);
|
|
55
|
-
border-top: ds-
|
|
55
|
+
border-top: ds-border-width(x1) solid $ds-color-border-primary;
|
|
56
56
|
|
|
57
57
|
@include ds-mq-smallest-breakpoint(tablet) {
|
|
58
58
|
margin-top: 0;
|
|
@@ -50,9 +50,3 @@ By using sass variables for spacing tokens you will see which tokens are availab
|
|
|
50
50
|
padding: 1.25rem 0.875rem;
|
|
51
51
|
}
|
|
52
52
|
```
|
|
53
|
-
|
|
54
|
-
## ⚠️ Deprecated functions and mixins
|
|
55
|
-
|
|
56
|
-
The function `ds-spacing-component()` is deprecated.
|
|
57
|
-
|
|
58
|
-
The mixin `@include ds-spacing-layout()` is deprecated.
|
|
@@ -41,13 +41,3 @@ $dsBorderWidth: map.get($metrics, "border-width");
|
|
|
41
41
|
|
|
42
42
|
@return $values;
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
// deprecated
|
|
46
|
-
@function ds-metrics-border-radius($units: null) {
|
|
47
|
-
@return ds-border-radius($units);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// deprecated
|
|
51
|
-
@function ds-metrics-border-width($units: null) {
|
|
52
|
-
@return ds-border-width($units);
|
|
53
|
-
}
|
|
@@ -8,9 +8,6 @@
|
|
|
8
8
|
@use "../variables/spacingDetailScreenLarge.scss" as *;
|
|
9
9
|
@forward "../variables/spacingDetailList.scss";
|
|
10
10
|
|
|
11
|
-
// @todo remove when possible
|
|
12
|
-
@forward "spacing-deprecated.scss";
|
|
13
|
-
|
|
14
11
|
@function ds-spacing($units: null, $sizeUnit: "px", $negative: false) {
|
|
15
12
|
@if $units {
|
|
16
13
|
$values: ();
|
package/package.json
CHANGED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
@use "sass:list";
|
|
2
|
-
@use "sass:math";
|
|
3
|
-
@use "sass:map";
|
|
4
|
-
@use "mediaQueries.scss" as *;
|
|
5
|
-
@use "../variables/deprecated/spacingComponent.scss" as *;
|
|
6
|
-
@use "../variables/deprecated/spacingLayout.scss" as *;
|
|
7
|
-
@use "../variables/deprecated/spacingLayoutLargeScreen.scss" as *;
|
|
8
|
-
@forward "../variables/deprecated/spacingComponentList.scss";
|
|
9
|
-
@forward "../variables/deprecated/spacingLayoutList.scss";
|
|
10
|
-
|
|
11
|
-
@function ds-spacing-component($units: null, $sizeUnit: "px", $negative: false) {
|
|
12
|
-
@if $units {
|
|
13
|
-
@return _ds-get-spacings-deprecated($spacingComponent, $units, $sizeUnit, $negative);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@return null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@mixin ds-spacing-layout($units: null, $property: padding, $sizeUnit: "px", $negative: false) {
|
|
20
|
-
@if $units {
|
|
21
|
-
$values: _ds-get-spacings-deprecated($spacingLayout, $units, $sizeUnit, $negative);
|
|
22
|
-
@include ds-mq-largest-breakpoint(mobile) {
|
|
23
|
-
#{$property}: $values;
|
|
24
|
-
}
|
|
25
|
-
$valuesLargeScreen: _ds-get-spacings-deprecated($spacingLayoutLargeScreen, $units, $sizeUnit, $negative);
|
|
26
|
-
@include ds-mq-smallest-breakpoint(tablet) {
|
|
27
|
-
#{$property}: $valuesLargeScreen;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@function _ds-get-spacings-deprecated($map, $units, $sizeUnit: "px", $negative: false) {
|
|
33
|
-
$values: ();
|
|
34
|
-
|
|
35
|
-
@each $unit in $units {
|
|
36
|
-
$value: map.get($map, $unit);
|
|
37
|
-
@if ($unit == "auto") {
|
|
38
|
-
$value: auto;
|
|
39
|
-
} @else if ($unit == 0) {
|
|
40
|
-
$value: 0 * 1;
|
|
41
|
-
} @else if ($value and type-of($value) == "number") {
|
|
42
|
-
@if ($sizeUnit == "rem") {
|
|
43
|
-
$value: (math.div($value, 16)) * 1rem;
|
|
44
|
-
} @else if ($sizeUnit == "em") {
|
|
45
|
-
$value: (math.div($value, 16)) * 1em;
|
|
46
|
-
} @else {
|
|
47
|
-
$value: $value * 1px;
|
|
48
|
-
}
|
|
49
|
-
@if $negative {
|
|
50
|
-
$value: $value * -1;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
@if (type-of($value) == "number" or $value == "auto") {
|
|
54
|
-
$values: list.append($values, $value);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@if length($values) == 1 {
|
|
59
|
-
@return list.nth($values, 1);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@return $values;
|
|
63
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
$spacingLayout: (
|
|
2
|
-
page-horizontal: 16,
|
|
3
|
-
page-top-small: 16,
|
|
4
|
-
page-top-large: 48,
|
|
5
|
-
page-bottom: 16,
|
|
6
|
-
gap-vertical-static-medium: 16,
|
|
7
|
-
gap-vertical-medium: 16,
|
|
8
|
-
gap-vertical-static-large: 32,
|
|
9
|
-
gap-horizontal-static-small: 8,
|
|
10
|
-
gap-vertical-static-small: 8,
|
|
11
|
-
page-top-xsmall: 4,
|
|
12
|
-
teaser-vertical-small: 8,
|
|
13
|
-
teaser-horizontal: 16,
|
|
14
|
-
gap-vertical-xsmall: 4,
|
|
15
|
-
teaser-vertical-medium: 12,
|
|
16
|
-
direkt-header-bottom: 48
|
|
17
|
-
);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
$spacingLayoutLargeScreen: (
|
|
2
|
-
page-top-small: 32,
|
|
3
|
-
page-top-large: 48,
|
|
4
|
-
page-bottom: 32,
|
|
5
|
-
page-horizontal: 32,
|
|
6
|
-
gap-vertical-medium: 32,
|
|
7
|
-
page-top-xsmall: 8,
|
|
8
|
-
teaser-vertical-small: 12,
|
|
9
|
-
teaser-horizontal: 16,
|
|
10
|
-
gap-vertical-xsmall: 8,
|
|
11
|
-
teaser-vertical-medium: 16,
|
|
12
|
-
direkt-header-bottom: 64,
|
|
13
|
-
gap-vertical-static-medium: 16,
|
|
14
|
-
gap-vertical-static-large: 32,
|
|
15
|
-
gap-horizontal-static-small: 8,
|
|
16
|
-
gap-vertical-static-small: 8
|
|
17
|
-
);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
$ds-sl-page-horizontal: page-horizontal;
|
|
2
|
-
$ds-sl-page-top-small: page-top-small;
|
|
3
|
-
$ds-sl-page-top-large: page-top-large;
|
|
4
|
-
$ds-sl-page-bottom: page-bottom;
|
|
5
|
-
$ds-sl-gap-vertical-static-medium: gap-vertical-static-medium;
|
|
6
|
-
$ds-sl-gap-vertical-medium: gap-vertical-medium;
|
|
7
|
-
$ds-sl-gap-vertical-static-large: gap-vertical-static-large;
|
|
8
|
-
$ds-sl-gap-horizontal-static-small: gap-horizontal-static-small;
|
|
9
|
-
$ds-sl-gap-vertical-static-small: gap-vertical-static-small;
|
|
10
|
-
$ds-sl-page-top-xsmall: page-top-xsmall;
|
|
11
|
-
$ds-sl-teaser-vertical-small: teaser-vertical-small;
|
|
12
|
-
$ds-sl-teaser-horizontal: teaser-horizontal;
|
|
13
|
-
$ds-sl-gap-vertical-xsmall: gap-vertical-xsmall;
|
|
14
|
-
$ds-sl-teaser-vertical-medium: teaser-vertical-medium;
|
|
15
|
-
$ds-sl-direkt-header-bottom: direkt-header-bottom;
|