@bonniernews/dn-design-system-web 4.1.0-alpha.5 → 4.1.1
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
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.1.1 (2023-09-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **web:** package release from web folder ([#982](https://github.com/BonnierNews/dn-design-system/issues/982)) ([7e73340](https://github.com/BonnierNews/dn-design-system/commit/7e73340e7f9fd1403ff7634d0f132b8581312d1f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 4.1.0 (2023-09-05)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **web:** fix missing spacing and refactor text-button ([#976](https://github.com/BonnierNews/dn-design-system/issues/976)) ([f634b42](https://github.com/BonnierNews/dn-design-system/commit/f634b4235d2c6a939cf8ae9e47fcac242fe9f221))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [4.1.0-alpha.5](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@4.1.0-alpha.4...@bonniernews/dn-design-system-web@4.1.0-alpha.5) (2023-09-04)
|
|
7
25
|
|
|
8
26
|
**Note:** Version bump only for package @bonniernews/dn-design-system-web
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
{% endif %}
|
|
41
41
|
|
|
42
42
|
{% if params.vignette %}
|
|
43
|
-
<div class="ds-teaser__vignette">{{ params.vignette }}</div>
|
|
43
|
+
<div class="ds-teaser__vignette">{{- params.vignette -}}</div>
|
|
44
44
|
{% endif %}
|
|
45
45
|
|
|
46
46
|
<h2 class="{{ componentClassName + '__title'}}">
|
|
47
|
-
{{ params.title }}
|
|
47
|
+
{{- params.title -}}
|
|
48
48
|
</h2>
|
|
49
49
|
|
|
50
50
|
{% if params.text and nativeVariant !== "right" %}
|
|
51
51
|
<p class="{{ componentClassName + '__text' }}">
|
|
52
|
-
{{ TeaserDot() }}
|
|
53
|
-
{{ params.text }}
|
|
52
|
+
{{- TeaserDot() -}}
|
|
53
|
+
{{- params.text -}}
|
|
54
54
|
</p>
|
|
55
55
|
{% endif %}
|
|
56
56
|
</div>
|
|
@@ -4,19 +4,52 @@
|
|
|
4
4
|
|
|
5
5
|
$ds-text-btn__min-clickable-area: 0;
|
|
6
6
|
$ds-text-btn__underline-offset: 2px;
|
|
7
|
-
$ds-text-btn__icon-size: 24px;
|
|
8
|
-
$ds-text-btn__icon-size-small: 20px;
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
.ds-text-btn {
|
|
9
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x3)};
|
|
10
|
+
--ds-text-btn__icon-size: #{ds-px-to-rem(24px)};
|
|
11
|
+
|
|
12
|
+
&.ds-force-px {
|
|
13
|
+
--ds-text-btn__icon-size: 24px;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
&.ds-text-btn--icon-left {
|
|
17
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x3 $ds-sc-x3 $ds-sc-x3 $ds-sc-x2)};
|
|
18
|
+
--ds-text-btn__icon-margin: #{ds-spacing-component(0 $ds-sc-x2 0 0)};
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
|
|
21
|
+
&.ds-text-btn--icon-right {
|
|
22
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x3 $ds-sc-x2 $ds-sc-x3 $ds-sc-x3)};
|
|
23
|
+
--ds-text-btn__icon-margin: #{ds-spacing-component(0 0 0 $ds-sc-x2)};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.ds-text-btn--small {
|
|
27
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x2)};
|
|
28
|
+
--ds-text-btn__icon-size: #{ds-px-to-rem(20px)};
|
|
29
|
+
|
|
30
|
+
&.ds-force-px {
|
|
31
|
+
--ds-text-btn__icon-size: 20px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.ds-text-btn--icon-left {
|
|
35
|
+
--ds-text-btn__icon-margin: #{ds-spacing-component(0 $ds-sc-x1 0 0)};
|
|
36
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x2 $ds-sc-x2 $ds-sc-x2 $ds-sc-x1)};
|
|
37
|
+
&.ds-text-btn--condensed {
|
|
38
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x1 $ds-sc-x1 $ds-sc-x1 0)};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.ds-text-btn--icon-right {
|
|
43
|
+
--ds-text-btn__icon-margin: #{ds-spacing-component(0 0 0 $ds-sc-x1)};
|
|
44
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x2 $ds-sc-x1 $ds-sc-x2 $ds-sc-x2)};
|
|
45
|
+
&.ds-text-btn--condensed {
|
|
46
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x1 0 $ds-sc-x1 $ds-sc-x1)};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.ds-text-btn--condensed {
|
|
52
|
+
--ds-text-btn__inner-padding: #{ds-spacing-component($ds-sc-x1)};
|
|
20
53
|
}
|
|
21
54
|
}
|
|
22
55
|
|
|
@@ -53,7 +86,7 @@ $ds-text-btn__icon-size-small: 20px;
|
|
|
53
86
|
.ds-text-btn__inner {
|
|
54
87
|
background-color: transparent;
|
|
55
88
|
border-radius: ds-metrics-border-radius(x1);
|
|
56
|
-
padding: ds-
|
|
89
|
+
padding: var(--ds-text-btn__inner-padding);
|
|
57
90
|
position: relative;
|
|
58
91
|
&::before {
|
|
59
92
|
content: "";
|
|
@@ -65,16 +98,17 @@ $ds-text-btn__icon-size-small: 20px;
|
|
|
65
98
|
bottom: 0;
|
|
66
99
|
right: 0;
|
|
67
100
|
}
|
|
101
|
+
}
|
|
68
102
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
103
|
+
.ds-text-btn__text {
|
|
104
|
+
@include ds-typography-with-force-px($ds-typography-functional-body02regular);
|
|
105
|
+
text-decoration: underline;
|
|
106
|
+
text-underline-offset: $ds-text-btn__underline-offset;
|
|
107
|
+
color: $ds-color-text-primary;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&.ds-text-btn--small .ds-text-btn__text {
|
|
111
|
+
@include ds-typography-with-force-px($ds-typography-functional-body01regular);
|
|
78
112
|
}
|
|
79
113
|
|
|
80
114
|
@include ds-hover() {
|
|
@@ -87,7 +121,16 @@ $ds-text-btn__icon-size-small: 20px;
|
|
|
87
121
|
background-color: $ds-color-component-primary-overlay-02;
|
|
88
122
|
}
|
|
89
123
|
&:disabled:not(.ds-loading) .ds-text-btn__inner {
|
|
90
|
-
|
|
124
|
+
cursor: not-allowed;
|
|
125
|
+
&::before {
|
|
126
|
+
background-color: unset;
|
|
127
|
+
}
|
|
128
|
+
.ds-icon {
|
|
129
|
+
color: $ds-color-icon-disabled;
|
|
130
|
+
}
|
|
131
|
+
.ds-text-btn__text {
|
|
132
|
+
color: $ds-color-text-disabled;
|
|
133
|
+
}
|
|
91
134
|
}
|
|
92
135
|
|
|
93
136
|
@include ds-loading();
|
|
@@ -109,9 +152,9 @@ $ds-text-btn__icon-size-small: 20px;
|
|
|
109
152
|
|
|
110
153
|
.ds-icon {
|
|
111
154
|
display: flex;
|
|
112
|
-
height:
|
|
113
|
-
width:
|
|
114
|
-
margin: ds-
|
|
155
|
+
height: var(--ds-text-btn__icon-size);
|
|
156
|
+
width: var(--ds-text-btn__icon-size);
|
|
157
|
+
margin: var(--ds-text-btn__icon-margin);
|
|
115
158
|
color: $ds-color-icon-primary;
|
|
116
159
|
svg {
|
|
117
160
|
fill: currentColor;
|
|
@@ -123,76 +166,8 @@ $ds-text-btn__icon-size-small: 20px;
|
|
|
123
166
|
}
|
|
124
167
|
}
|
|
125
168
|
|
|
126
|
-
.ds-force-px {
|
|
127
|
-
&.ds-text-btn--icon-left .ds-text-btn__inner .ds-icon,
|
|
128
|
-
&.ds-text-btn--icon-right .ds-text-btn__inner .ds-icon {
|
|
129
|
-
height: $ds-text-btn__icon-size;
|
|
130
|
-
width: $ds-text-btn__icon-size;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
169
|
.ds-text-btn--icon-left .ds-text-btn__inner {
|
|
135
|
-
padding: ds-spacing-component($ds-sc-x3 $ds-sc-x3 $ds-sc-x3 $ds-sc-x2);
|
|
136
170
|
flex-direction: row-reverse;
|
|
137
|
-
.ds-icon {
|
|
138
|
-
margin: ds-spacing-component(0 $ds-sc-x2 0 0);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.ds-text-btn--icon-right .ds-text-btn__inner {
|
|
143
|
-
padding: ds-spacing-component($ds-sc-x3 $ds-sc-x2 $ds-sc-x3 $ds-sc-x3);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.ds-text-btn--small {
|
|
147
|
-
.ds-text-btn__inner {
|
|
148
|
-
padding: ds-spacing-component($ds-sc-x2);
|
|
149
|
-
|
|
150
|
-
.ds-text-btn__text {
|
|
151
|
-
@include ds-typography($ds-typography-functional-body01regular);
|
|
152
|
-
@at-root .ds-force-px#{&} {
|
|
153
|
-
@include ds-typography($ds-typography-functional-body01regular, true);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&.ds-text-btn--icon-left .ds-text-btn__inner,
|
|
159
|
-
&.ds-text-btn--icon-right .ds-text-btn__inner {
|
|
160
|
-
.ds-icon {
|
|
161
|
-
height: ds-px-to-rem($ds-text-btn__icon-size-small);
|
|
162
|
-
width: ds-px-to-rem($ds-text-btn__icon-size-small);
|
|
163
|
-
margin: ds-spacing-component(0 0 0 $ds-sc-x1);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&.ds-text-btn--icon-left .ds-text-btn__inner {
|
|
168
|
-
padding: ds-spacing-component($ds-sc-x2 $ds-sc-x2 $ds-sc-x2 $ds-sc-x1);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
&.ds-text-btn--icon-right .ds-text-btn__inner {
|
|
173
|
-
padding: ds-spacing-component($ds-sc-x2 $ds-sc-x1 $ds-sc-x2 $ds-sc-x2);
|
|
174
|
-
}
|
|
175
|
-
&.ds-text-btn--condensed {
|
|
176
|
-
&.ds-text-btn--icon-left .ds-text-btn__inner {
|
|
177
|
-
padding: ds-spacing-component($ds-sc-x1 $ds-sc-x1 $ds-sc-x1 0);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
&.ds-text-btn--icon-right .ds-text-btn__inner {
|
|
181
|
-
padding: ds-spacing-component($ds-sc-x1 0 $ds-sc-x1 $ds-sc-x1);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&.ds-force-px {
|
|
186
|
-
&.ds-text-btn--icon-left .ds-text-btn__inner .ds-icon,
|
|
187
|
-
&.ds-text-btn--icon-right .ds-text-btn__inner .ds-icon {
|
|
188
|
-
height: $ds-text-btn__icon-size-small;
|
|
189
|
-
width: $ds-text-btn__icon-size-small;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.ds-text-btn--condensed .ds-text-btn__inner {
|
|
195
|
-
padding: ds-spacing-component($ds-sc-x1);
|
|
196
171
|
}
|
|
197
172
|
|
|
198
173
|
@include ds-mq-only-breakpoint(mobile) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
- GitHub: [BonnierNews/dn-design-system/../web/src/foundations/helpers/spacing.scss](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/foundations/helpers/spacing.scss)
|
|
2
|
-
- Storybook:
|
|
2
|
+
- Storybook: [Spacing > Component](https://designsystem.dn.se/?path=/story/foundations-spacing--component)
|
|
3
|
+
- Storybook: [Spacing > Layout](https://designsystem.dn.se/?path=/story/foundations-spacing--layout)
|
|
3
4
|
|
|
4
5
|
----
|
|
5
6
|
|
|
@@ -10,7 +11,7 @@ To avoid silent breaking changes use sass variable instead of raw token name.
|
|
|
10
11
|
|
|
11
12
|
Ex: `margin: ds-spacing-component($ds-sc-x1 0 $ds-sc-x4)`
|
|
12
13
|
|
|
13
|
-
Ex: `@include ds-spacing-layout($ds-sl-page-horizontal auto, padding-top)`
|
|
14
|
+
Ex: `@include ds-spacing-layout($ds-sl-page-horizontal auto, padding-top)`
|
|
14
15
|
|
|
15
16
|
By using sass variables (instead of token name directly), if a spacing token used in scss is removed sass will not compile - which is a good thing!
|
|
16
17
|
|
|
@@ -191,3 +191,11 @@ $dsSerifWeights: (
|
|
|
191
191
|
letter-spacing: normal;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
+
|
|
195
|
+
@mixin ds-typography-with-force-px($token) {
|
|
196
|
+
@include ds-typography($token);
|
|
197
|
+
// If called from element without a wrapper class, ex. a it will generate incorrect selector .ds-force-pxa
|
|
198
|
+
@at-root .ds-force-px#{&} {
|
|
199
|
+
@include ds-typography($token, true);
|
|
200
|
+
}
|
|
201
|
+
}
|
package/package.json
CHANGED