@bonniernews/dn-design-system-web 9.1.0 → 10.0.0-beta.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 +4 -4
- package/components/blocked-content/blocked-content.js +1 -1
- package/components/blocked-content/blocked-content.njk +0 -1
- package/components/buddy-menu/buddy-menu.scss +2 -2
- package/components/button/README.md +0 -1
- package/components/button/button.njk +6 -11
- package/components/button/button.scss +141 -216
- package/components/button-toggle/README.md +0 -1
- package/components/button-toggle/button-toggle.njk +5 -8
- package/components/button-toggle/button-toggle.scss +115 -144
- package/components/byline/byline.njk +1 -2
- package/components/factbox/factbox.njk +2 -4
- package/components/factbox/factbox.scss +2 -2
- package/components/floating-button/floating-button.njk +5 -9
- package/components/floating-button/floating-button.scss +46 -53
- package/components/group-header/group-header.scss +18 -6
- package/components/icon-button/icon-button.njk +6 -8
- package/components/icon-button/icon-button.scss +93 -111
- package/components/icon-button-toggle/icon-button-toggle.scss +3 -5
- package/components/list-item/list-item.njk +0 -1
- package/components/pictogram/pictogram.njk +1 -1
- package/components/teaser-list-swipe/teaser-list-swipe.scss +2 -2
- package/components/text-button/README.md +0 -1
- package/components/text-button/text-button.njk +7 -12
- package/components/text-button/text-button.scss +45 -61
- package/components/text-button-toggle/README.md +0 -1
- package/components/text-button-toggle/text-button-toggle.njk +7 -10
- package/components/text-button-toggle/text-button-toggle.scss +50 -60
- package/foundations/colors.scss +0 -1
- package/foundations/helpers/metrics.scss +1 -0
- package/package.json +1 -1
- package/components/modal/README.md +0 -52
- package/components/modal/modal.js +0 -59
- package/components/modal/modal.njk +0 -66
- package/components/modal/modal.scss +0 -115
|
@@ -4,37 +4,97 @@
|
|
|
4
4
|
@use "../spinner/spinner.scss" as *;
|
|
5
5
|
|
|
6
6
|
$ds-btn-toggle-outlined__border-width: ds-metrics-border-width(x1);
|
|
7
|
-
$ds-btn-toggle__min-clickable-area: 48px;
|
|
8
7
|
$ds-btn-toggle__icon-size: 24px;
|
|
9
8
|
$ds-btn-toggle__icon-size-xsmall: 20px;
|
|
10
9
|
|
|
11
10
|
.ds-btn-toggle {
|
|
11
|
+
--ds-btn-toggle__background-color: transparent;
|
|
12
|
+
--ds-btn-toggle__background-color-hover: #{$ds-color-component-primary-overlay};
|
|
13
|
+
--ds-btn-toggle__background-color-active: #{$ds-color-component-primary-overlay-02};
|
|
14
|
+
--ds-btn-toggle__border-color: #{$ds-color-border-primary-03};
|
|
15
|
+
--ds-btn-toggle__outline-color: #{$ds-color-border-focus-02};
|
|
16
|
+
--ds-btn-toggle__color: #{$ds-color-text-primary};
|
|
17
|
+
|
|
18
|
+
&--brand:not(.ds-btn-toggle--selected) {
|
|
19
|
+
--ds-btn-toggle__background-color: #{$ds-color-component-brand};
|
|
20
|
+
--ds-btn-toggle__border-color: transparent;
|
|
21
|
+
--ds-btn-toggle__outline-color: #{$ds-color-border-focus};
|
|
22
|
+
--ds-btn-toggle__color: #{$ds-color-text-on-brand};
|
|
23
|
+
&:not(.ds-loading):disabled {
|
|
24
|
+
opacity: $ds-opacity-component-disabled;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--secondaryFilled:not(.ds-btn-toggle--selected) {
|
|
29
|
+
--ds-btn-toggle__border-color: transparent;
|
|
30
|
+
--ds-btn-toggle__outline-color: #{$ds-color-border-focus-02};
|
|
31
|
+
--ds-btn-toggle__background-color: #{$ds-color-component-primary-overlay};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&--secondaryFilled,
|
|
35
|
+
&--selected {
|
|
36
|
+
&:not(.ds-loading):disabled {
|
|
37
|
+
--ds-btn-toggle__border-color: transparent;
|
|
38
|
+
--ds-btn-toggle__color: #{$ds-color-text-disabled};
|
|
39
|
+
&::before {
|
|
40
|
+
--ds-btn-toggle__background-color: unset;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:not(.ds-loading):disabled {
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@include ds-typography($ds-typography-detailstandard-button);
|
|
12
50
|
cursor: pointer;
|
|
13
|
-
|
|
14
|
-
|
|
51
|
+
color: var(--ds-btn-toggle__color);
|
|
52
|
+
background-color: var(--ds-btn-toggle__background-color);
|
|
15
53
|
min-width: 0;
|
|
16
54
|
min-height: 0;
|
|
17
55
|
display: inline-flex;
|
|
18
56
|
align-items: center;
|
|
19
57
|
justify-content: center;
|
|
20
|
-
|
|
58
|
+
border: $ds-btn-toggle-outlined__border-width solid var(--ds-btn-toggle__border-color);
|
|
59
|
+
border-radius: 100px;
|
|
21
60
|
position: relative;
|
|
61
|
+
padding: ds-spacing($ds-s-075, rem) - ds-px-to-rem($ds-btn-toggle-outlined__border-width) ds-spacing($ds-s-150, rem) - ds-px-to-rem(
|
|
62
|
+
$ds-btn-toggle-outlined__border-width
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
&::before {
|
|
66
|
+
content: "";
|
|
67
|
+
border-radius: inherit;
|
|
68
|
+
pointer-events: none;
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: -$ds-btn-toggle-outlined__border-width;
|
|
71
|
+
left: -$ds-btn-toggle-outlined__border-width;
|
|
72
|
+
bottom: -$ds-btn-toggle-outlined__border-width;
|
|
73
|
+
right: -$ds-btn-toggle-outlined__border-width;
|
|
74
|
+
}
|
|
75
|
+
span,
|
|
76
|
+
i {
|
|
77
|
+
position: relative;
|
|
78
|
+
}
|
|
79
|
+
.ds-btn-toggle__on {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
22
82
|
|
|
23
83
|
span {
|
|
24
84
|
pointer-events: none;
|
|
25
85
|
}
|
|
26
86
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
87
|
+
&::after {
|
|
88
|
+
content: "";
|
|
89
|
+
position: absolute;
|
|
90
|
+
min-width: $ds-btn__min-clickable-area;
|
|
91
|
+
min-height: $ds-btn__min-clickable-area;
|
|
92
|
+
width: 100%;
|
|
30
93
|
}
|
|
31
94
|
|
|
32
95
|
&:focus-visible {
|
|
33
|
-
outline:
|
|
34
|
-
|
|
35
|
-
outline: ds-metrics-border-width(x2) solid;
|
|
36
|
-
outline-offset: 2px;
|
|
37
|
-
}
|
|
96
|
+
outline: ds-metrics-border-width(x2) solid var(--ds-btn-toggle__outline-color);
|
|
97
|
+
outline-offset: 2px;
|
|
38
98
|
}
|
|
39
99
|
|
|
40
100
|
@at-root a#{&} {
|
|
@@ -43,59 +103,29 @@ $ds-btn-toggle__icon-size-xsmall: 20px;
|
|
|
43
103
|
text-decoration: none;
|
|
44
104
|
}
|
|
45
105
|
|
|
46
|
-
.ds-btn-toggle__inner {
|
|
47
|
-
@include ds-typography($ds-typography-detailstandard-button);
|
|
48
|
-
border: $ds-btn-toggle-outlined__border-width solid;
|
|
49
|
-
border-radius: 100px;
|
|
50
|
-
padding: ds-spacing($ds-s-075, rem) - ds-px-to-rem($ds-btn-toggle-outlined__border-width) ds-spacing($ds-s-150, rem) - ds-px-to-rem(
|
|
51
|
-
$ds-btn-toggle-outlined__border-width
|
|
52
|
-
);
|
|
53
|
-
position: relative;
|
|
54
|
-
&::before {
|
|
55
|
-
content: "";
|
|
56
|
-
border-radius: inherit;
|
|
57
|
-
pointer-events: none;
|
|
58
|
-
position: absolute;
|
|
59
|
-
top: -$ds-btn-toggle-outlined__border-width;
|
|
60
|
-
left: -$ds-btn-toggle-outlined__border-width;
|
|
61
|
-
bottom: -$ds-btn-toggle-outlined__border-width;
|
|
62
|
-
right: -$ds-btn-toggle-outlined__border-width;
|
|
63
|
-
}
|
|
64
|
-
span,
|
|
65
|
-
i {
|
|
66
|
-
position: relative;
|
|
67
|
-
}
|
|
68
|
-
.ds-btn-toggle__on {
|
|
69
|
-
display: none;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
106
|
@include ds-hover() {
|
|
74
|
-
&:hover:not(:disabled):not(.ds-loading)
|
|
75
|
-
background-color:
|
|
107
|
+
&:hover:not(:disabled):not(.ds-loading)::before {
|
|
108
|
+
background-color: var(--ds-btn-toggle__background-color-hover);
|
|
76
109
|
}
|
|
77
110
|
}
|
|
78
|
-
&:active:not(:disabled):not(.ds-loading)
|
|
79
|
-
background-color:
|
|
111
|
+
&:active:not(:disabled):not(.ds-loading)::before {
|
|
112
|
+
background-color: var(--ds-btn-toggle__background-color-active);
|
|
80
113
|
}
|
|
81
114
|
|
|
82
115
|
@include ds-loading();
|
|
83
116
|
}
|
|
84
117
|
|
|
85
118
|
.ds-btn-toggle--full-width {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
width: 100%;
|
|
89
|
-
box-sizing: border-box;
|
|
90
|
-
}
|
|
119
|
+
width: 100%;
|
|
120
|
+
box-sizing: border-box;
|
|
91
121
|
}
|
|
92
122
|
|
|
93
|
-
.ds-btn-toggle--small
|
|
123
|
+
.ds-btn-toggle--small {
|
|
94
124
|
padding: ds-px-to-rem(ds-spacing($ds-s-050) - $ds-btn-toggle-outlined__border-width)
|
|
95
125
|
ds-px-to-rem(ds-spacing($ds-s-125) - $ds-btn-toggle-outlined__border-width);
|
|
96
126
|
}
|
|
97
127
|
|
|
98
|
-
.ds-btn-toggle--xsmall
|
|
128
|
+
.ds-btn-toggle--xsmall {
|
|
99
129
|
@include ds-typography($ds-typography-detailstandard-button-small);
|
|
100
130
|
padding: ds-px-to-rem(ds-spacing($ds-s-025) - $ds-btn-toggle-outlined__border-width)
|
|
101
131
|
ds-px-to-rem(ds-spacing($ds-s-075) - $ds-btn-toggle-outlined__border-width);
|
|
@@ -103,89 +133,38 @@ $ds-btn-toggle__icon-size-xsmall: 20px;
|
|
|
103
133
|
|
|
104
134
|
@include ds-mq-only-breakpoint(mobile) {
|
|
105
135
|
.ds-btn-toggle--mobile-full-width {
|
|
106
|
-
|
|
107
|
-
& .ds-btn-toggle__inner {
|
|
108
|
-
width: 100%;
|
|
109
|
-
}
|
|
136
|
+
width: 100%;
|
|
110
137
|
}
|
|
111
138
|
}
|
|
112
139
|
|
|
113
|
-
.ds-btn-toggle--
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
&:focus-visible .ds-btn-toggle__inner {
|
|
120
|
-
outline-color: $ds-color-border-focus;
|
|
121
|
-
}
|
|
122
|
-
&:not(.ds-btn-toggle--selected) {
|
|
123
|
-
&:not(.ds-loading):disabled {
|
|
124
|
-
opacity: $ds-opacity-component-disabled;
|
|
125
|
-
.ds-btn-toggle__inner {
|
|
126
|
-
cursor: not-allowed;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
140
|
+
.ds-btn-toggle--selected {
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
padding-left: ds-px-to-rem(ds-spacing($ds-s-125) - $ds-btn-toggle-outlined__border-width);
|
|
131
145
|
|
|
132
|
-
.ds-btn-
|
|
133
|
-
|
|
134
|
-
border-color: transparent;
|
|
135
|
-
background-color: $ds-color-component-primary-overlay;
|
|
136
|
-
color: $ds-color-text-primary;
|
|
146
|
+
.ds-btn-toggle__on {
|
|
147
|
+
display: flex;
|
|
137
148
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.ds-btn-toggle--secondaryFilled,
|
|
144
|
-
.ds-btn-toggle--selected {
|
|
145
|
-
&:not(.ds-loading):disabled .ds-btn-toggle__inner {
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
background-color: $ds-color-component-primary-overlay;
|
|
148
|
-
border-color: transparent;
|
|
149
|
-
color: $ds-color-text-disabled;
|
|
150
|
-
&::before {
|
|
151
|
-
background-color: unset;
|
|
152
|
-
}
|
|
149
|
+
.ds-btn-toggle__off {
|
|
150
|
+
display: none;
|
|
153
151
|
}
|
|
154
|
-
}
|
|
155
152
|
|
|
156
|
-
.ds-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
color: $ds-color-text-primary;
|
|
164
|
-
padding-left: ds-px-to-rem(ds-spacing($ds-s-125) - $ds-btn-toggle-outlined__border-width);
|
|
165
|
-
|
|
166
|
-
.ds-btn-toggle__on {
|
|
167
|
-
display: flex;
|
|
168
|
-
}
|
|
169
|
-
.ds-btn-toggle__off {
|
|
170
|
-
display: none;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.ds-icon {
|
|
174
|
-
display: flex;
|
|
175
|
-
height: ds-px-to-rem($ds-btn-toggle__icon-size);
|
|
176
|
-
width: ds-px-to-rem($ds-btn-toggle__icon-size);
|
|
177
|
-
margin: ds-spacing(0 $ds-s-050 0 0, rem);
|
|
178
|
-
svg {
|
|
179
|
-
fill: currentColor;
|
|
180
|
-
}
|
|
153
|
+
.ds-icon {
|
|
154
|
+
display: flex;
|
|
155
|
+
height: ds-px-to-rem($ds-btn-toggle__icon-size);
|
|
156
|
+
width: ds-px-to-rem($ds-btn-toggle__icon-size);
|
|
157
|
+
margin: ds-spacing(0 $ds-s-050 0 0, rem);
|
|
158
|
+
svg {
|
|
159
|
+
fill: currentColor;
|
|
181
160
|
}
|
|
182
161
|
}
|
|
183
162
|
|
|
184
|
-
&.ds-btn-toggle--small
|
|
163
|
+
&.ds-btn-toggle--small {
|
|
185
164
|
padding-left: ds-px-to-rem(ds-spacing($ds-s-100) - $ds-btn-toggle-outlined__border-width);
|
|
186
165
|
}
|
|
187
166
|
|
|
188
|
-
&.ds-btn-toggle--xsmall
|
|
167
|
+
&.ds-btn-toggle--xsmall {
|
|
189
168
|
padding-left: ds-px-to-rem(ds-spacing($ds-s-050) - $ds-btn-toggle-outlined__border-width);
|
|
190
169
|
.ds-icon {
|
|
191
170
|
height: ds-px-to-rem($ds-btn-toggle__icon-size-xsmall);
|
|
@@ -194,10 +173,6 @@ $ds-btn-toggle__icon-size-xsmall: 20px;
|
|
|
194
173
|
}
|
|
195
174
|
}
|
|
196
175
|
|
|
197
|
-
&:focus-visible .ds-btn-toggle__inner {
|
|
198
|
-
outline-color: $ds-color-border-focus-02;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
176
|
// we have to override spinner styling since spinner variant is based on "off" button variant
|
|
202
177
|
&.ds-loading {
|
|
203
178
|
.ds-spinner__inner {
|
|
@@ -210,13 +185,12 @@ $ds-btn-toggle__icon-size-xsmall: 20px;
|
|
|
210
185
|
}
|
|
211
186
|
|
|
212
187
|
.ds-btn-toggle.ds-force-px {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
&.ds-btn-toggle--selected .ds-btn-toggle__inner {
|
|
188
|
+
/* stylelint-disable-next-line */
|
|
189
|
+
padding: ds-spacing($ds-s-075) - $ds-btn-toggle-outlined__border-width ds-spacing($ds-s-150) -
|
|
190
|
+
$ds-btn-toggle-outlined__border-width;
|
|
191
|
+
@include ds-typography($ds-typography-detailstandard-button, true);
|
|
192
|
+
|
|
193
|
+
&.ds-btn-toggle--selected {
|
|
220
194
|
padding-left: ds-spacing($ds-s-125)-$ds-btn-toggle-outlined__border-width;
|
|
221
195
|
.ds-icon {
|
|
222
196
|
margin: ds-spacing(0 $ds-s-050 0 0);
|
|
@@ -225,24 +199,21 @@ $ds-btn-toggle__icon-size-xsmall: 20px;
|
|
|
225
199
|
}
|
|
226
200
|
}
|
|
227
201
|
&.ds-btn-toggle--small {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
&.ds-btn-toggle--selected .ds-btn-toggle__inner {
|
|
202
|
+
padding: ds-spacing($ds-s-050)-$ds-btn-toggle-outlined__border-width ds-spacing($ds-s-125)-$ds-btn-toggle-outlined__border-width;
|
|
203
|
+
|
|
204
|
+
&.ds-btn-toggle--selected {
|
|
232
205
|
padding-left: ds-spacing($ds-s-100)-$ds-btn-toggle-outlined__border-width;
|
|
233
206
|
}
|
|
234
207
|
}
|
|
235
208
|
&.ds-btn-toggle--xsmall {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
width: $ds-btn-toggle__icon-size-xsmall;
|
|
243
|
-
}
|
|
209
|
+
@include ds-typography($ds-typography-detailstandard-button-small, true);
|
|
210
|
+
padding: ds-spacing($ds-s-025)-$ds-btn-toggle-outlined__border-width ds-spacing($ds-s-075)-$ds-btn-toggle-outlined__border-width;
|
|
211
|
+
.ds-icon {
|
|
212
|
+
margin: ds-spacing(0 $ds-s-025 0 0);
|
|
213
|
+
height: $ds-btn-toggle__icon-size-xsmall;
|
|
214
|
+
width: $ds-btn-toggle__icon-size-xsmall;
|
|
244
215
|
}
|
|
245
|
-
&.ds-btn-toggle--selected
|
|
216
|
+
&.ds-btn-toggle--selected {
|
|
246
217
|
padding-left: ds-spacing($ds-s-050)-$ds-btn-toggle-outlined__border-width;
|
|
247
218
|
}
|
|
248
219
|
}
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
iconName: 'expand_more',
|
|
36
36
|
classNames: 'ds-factbox__expand-more',
|
|
37
37
|
mobile: { fullWidth: true },
|
|
38
|
-
forcePx: params.forcePx
|
|
39
|
-
condensed: true
|
|
38
|
+
forcePx: params.forcePx
|
|
40
39
|
})}}
|
|
41
40
|
{{ Button({
|
|
42
41
|
text: 'Visa mindre',
|
|
@@ -46,8 +45,7 @@
|
|
|
46
45
|
iconName: 'expand_less',
|
|
47
46
|
classNames: 'ds-factbox__expand-less',
|
|
48
47
|
mobile: { fullWidth: true },
|
|
49
|
-
forcePx: params.forcePx
|
|
50
|
-
condensed: true
|
|
48
|
+
forcePx: params.forcePx
|
|
51
49
|
})}}
|
|
52
50
|
</div>
|
|
53
51
|
</div>
|
|
@@ -110,13 +110,13 @@ $ds-factbox__max-height: 500px; // includes top/bottom spacing
|
|
|
110
110
|
}
|
|
111
111
|
.ds-factbox__show-more--collapsable {
|
|
112
112
|
background-color: $ds-color-surface-background;
|
|
113
|
+
display: block;
|
|
113
114
|
button {
|
|
114
115
|
margin: ds-spacing($ds-s-100 0 0);
|
|
115
116
|
}
|
|
116
|
-
&,
|
|
117
117
|
&:not([data-factbox-expanded]) .ds-factbox__expand-more,
|
|
118
118
|
&[data-factbox-expanded] .ds-factbox__expand-less {
|
|
119
|
-
display:
|
|
119
|
+
display: flex;
|
|
120
120
|
}
|
|
121
121
|
&:not([data-factbox-expanded]) .ds-factbox__expand-less,
|
|
122
122
|
&[data-factbox-expanded] .ds-factbox__expand-more,
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{% endset %}
|
|
15
15
|
|
|
16
16
|
{%- if params.iconName and params.iconPosition and params.iconPosition != "none" %}
|
|
17
|
-
{% set iconSvg = IconUse({ icon: params.iconName }) %}
|
|
17
|
+
{% set iconSvg = IconUse({ icon: params.iconName, attributes: { "aria-hidden": "true" } }) %}
|
|
18
18
|
{% endif %}
|
|
19
19
|
|
|
20
20
|
{%- set classes = [
|
|
@@ -29,17 +29,13 @@
|
|
|
29
29
|
|
|
30
30
|
{%- if params.href %}
|
|
31
31
|
<a href="{{ params.href | default('#', true) }}" {{ ariaLabel | safe }} class="{{ classes }}" {{- attributes | safe}}>
|
|
32
|
-
<span
|
|
33
|
-
|
|
34
|
-
{{- iconSvg | safe if iconSvg -}} {{ loadingHtml | safe }}
|
|
35
|
-
</span>
|
|
32
|
+
<span aria-hidden="true">{{ text }}</span>
|
|
33
|
+
{{- iconSvg | safe if iconSvg -}} {{ loadingHtml | safe }}
|
|
36
34
|
</a>
|
|
37
35
|
{% else %}
|
|
38
36
|
<button {{ ariaLabel | safe }} class="{{ classes }}" {{ "disabled" if params.disabled }} {{- attributes | safe}}>
|
|
39
|
-
<span
|
|
40
|
-
|
|
41
|
-
{{- iconSvg | safe if iconSvg -}} {{ loadingHtml | safe }}
|
|
42
|
-
</span>
|
|
37
|
+
<span aria-hidden="true">{{ text }}</span>
|
|
38
|
+
{{- iconSvg | safe if iconSvg -}} {{ loadingHtml | safe }}
|
|
43
39
|
</button>
|
|
44
40
|
{% endif %}
|
|
45
41
|
{% endmacro %}
|
|
@@ -4,76 +4,78 @@
|
|
|
4
4
|
@use "../spinner/spinner.scss" as *;
|
|
5
5
|
|
|
6
6
|
.ds-floating-btn {
|
|
7
|
-
--ds-floating-
|
|
7
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-075 $ds-s-125, rem)};
|
|
8
8
|
--ds-floating-btn__icon-size: #{ds-px-to-rem(24px)};
|
|
9
9
|
|
|
10
10
|
&.ds-force-px {
|
|
11
|
-
--ds-floating-
|
|
11
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-075 $ds-s-125)};
|
|
12
12
|
--ds-floating-btn__icon-size: 24px;
|
|
13
|
+
@include ds-typography($ds-typography-detailstandard-button, true);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
&.ds-floating-btn--icon-left {
|
|
16
|
-
--ds-floating-
|
|
17
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-075 $ds-s-125 $ds-s-075 $ds-s-100, rem)};
|
|
17
18
|
--ds-floating-btn__icon-margin: #{ds-spacing(0 $ds-s-050 0 0)};
|
|
18
19
|
|
|
19
20
|
&.ds-force-px {
|
|
20
|
-
--ds-floating-
|
|
21
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-075 $ds-s-125 $ds-s-075 $ds-s-100)};
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
&.ds-floating-btn--icon-right {
|
|
25
|
-
--ds-floating-
|
|
26
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-075 $ds-s-100 $ds-s-075 $ds-s-125, rem)};
|
|
26
27
|
--ds-floating-btn__icon-margin: #{ds-spacing(0 0 0 $ds-s-050)};
|
|
27
28
|
|
|
28
29
|
&.ds-force-px {
|
|
29
|
-
--ds-floating-
|
|
30
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-075 $ds-s-100 $ds-s-075 $ds-s-125)};
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
&.ds-floating-btn--small {
|
|
34
|
-
--ds-floating-
|
|
35
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-050 $ds-s-125, rem)};
|
|
35
36
|
|
|
36
37
|
&.ds-force-px {
|
|
37
|
-
--ds-floating-
|
|
38
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-050 $ds-s-125)};
|
|
38
39
|
|
|
39
40
|
&.ds-floating-btn--icon-left {
|
|
40
|
-
--ds-floating-
|
|
41
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-050 $ds-s-125 $ds-s-050 $ds-s-100)};
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
&.ds-floating-btn--icon-right {
|
|
44
|
-
--ds-floating-
|
|
45
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-050 $ds-s-100 $ds-s-050 $ds-s-125)};
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
&.ds-floating-btn--icon-left {
|
|
49
|
-
--ds-floating-
|
|
50
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-050 $ds-s-125 $ds-s-050 $ds-s-100, rem)};
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
&.ds-floating-btn--icon-right {
|
|
53
|
-
--ds-floating-
|
|
54
|
+
--ds-floating-btn__padding: #{ds-spacing($ds-s-050 $ds-s-100 $ds-s-050 $ds-s-125, rem)};
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
cursor: pointer;
|
|
58
|
-
|
|
59
|
+
@include ds-typography($ds-typography-detailstandard-button);
|
|
60
|
+
color: $ds-color-text-secondary;
|
|
61
|
+
background-color: $ds-color-component-primary;
|
|
62
|
+
border-radius: 100px;
|
|
63
|
+
padding: var(--ds-floating-btn__padding);
|
|
64
|
+
position: relative;
|
|
65
|
+
box-shadow: ds-shadow-get-box-shadow($ds-shadow-drop-shadow-b);
|
|
59
66
|
border: none;
|
|
60
67
|
display: inline-flex;
|
|
61
68
|
align-items: center;
|
|
62
69
|
justify-content: center;
|
|
63
|
-
padding: 0;
|
|
64
70
|
|
|
65
71
|
span {
|
|
66
72
|
pointer-events: none;
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
&:focus-visible {
|
|
70
|
-
outline:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
outline: ds-metrics-border-width(x2) solid;
|
|
74
|
-
outline-offset: 2px;
|
|
75
|
-
outline-color: $ds-color-border-focus-02;
|
|
76
|
-
}
|
|
76
|
+
outline: ds-metrics-border-width(x2) solid;
|
|
77
|
+
outline-offset: 2px;
|
|
78
|
+
outline-color: $ds-color-border-focus-02;
|
|
77
79
|
}
|
|
78
80
|
|
|
79
81
|
@at-root a#{&} {
|
|
@@ -82,34 +84,32 @@
|
|
|
82
84
|
text-decoration: none;
|
|
83
85
|
}
|
|
84
86
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
&::before {
|
|
88
|
+
content: "";
|
|
89
|
+
border-radius: inherit;
|
|
90
|
+
pointer-events: none;
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 0;
|
|
93
|
+
bottom: 0;
|
|
94
|
+
left: 0;
|
|
95
|
+
right: 0;
|
|
96
|
+
}
|
|
93
97
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
bottom: 0;
|
|
101
|
-
left: 0;
|
|
102
|
-
right: 0;
|
|
103
|
-
}
|
|
98
|
+
&::after {
|
|
99
|
+
content: "";
|
|
100
|
+
position: absolute;
|
|
101
|
+
min-width: $ds-btn__min-clickable-area;
|
|
102
|
+
min-height: $ds-btn__min-clickable-area;
|
|
103
|
+
width: 100%;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
@include ds-hover() {
|
|
107
|
-
&:hover:not(:disabled):not(.ds-loading)
|
|
107
|
+
&:hover:not(:disabled):not(.ds-loading)::before {
|
|
108
108
|
background-color: $ds-color-component-secondary-overlay;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
&:active:not(:disabled):not(.ds-loading)
|
|
112
|
+
&:active:not(:disabled):not(.ds-loading)::before {
|
|
113
113
|
background-color: $ds-color-component-secondary-overlay-02;
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -120,19 +120,16 @@
|
|
|
120
120
|
|
|
121
121
|
// we have to override spinner styling since spinner variant is based on "off" button variant
|
|
122
122
|
&.ds-loading {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
&::before {
|
|
127
|
-
border-color: $ds-color-icon-secondary;
|
|
128
|
-
}
|
|
123
|
+
border-top-color: $ds-color-icon-secondary;
|
|
124
|
+
&::before {
|
|
125
|
+
border-color: $ds-color-icon-secondary;
|
|
129
126
|
}
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
@include ds-loading();
|
|
133
130
|
}
|
|
134
131
|
|
|
135
|
-
.ds-floating-btn--icon
|
|
132
|
+
.ds-floating-btn--icon {
|
|
136
133
|
display: inline-flex;
|
|
137
134
|
align-items: center;
|
|
138
135
|
justify-content: center;
|
|
@@ -149,10 +146,6 @@
|
|
|
149
146
|
}
|
|
150
147
|
}
|
|
151
148
|
|
|
152
|
-
.ds-floating-btn--icon-left
|
|
149
|
+
.ds-floating-btn--icon-left {
|
|
153
150
|
flex-direction: row-reverse;
|
|
154
151
|
}
|
|
155
|
-
|
|
156
|
-
.ds-floating-btn.ds-force-px .ds-floating-btn__inner {
|
|
157
|
-
@include ds-typography($ds-typography-detailstandard-button, true);
|
|
158
|
-
}
|
|
@@ -35,23 +35,34 @@
|
|
|
35
35
|
overflow: hidden;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
&--toggle,
|
|
39
|
+
&--arrows,
|
|
40
|
+
&--direkt {
|
|
41
|
+
align-items: center;
|
|
42
|
+
padding-right: ds-spacing($ds-s-100);
|
|
43
|
+
}
|
|
44
|
+
|
|
38
45
|
.ds-group-header__right-link,
|
|
39
46
|
.ds-group-header__icon,
|
|
40
47
|
.ds-btn-toggle {
|
|
41
48
|
flex-shrink: 0;
|
|
42
|
-
margin-right: ds-spacing($ds-s-100);
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
.ds-group-header__arrows {
|
|
46
52
|
display: flex;
|
|
47
53
|
flex-shrink: 0;
|
|
48
|
-
|
|
54
|
+
align-items: center;
|
|
55
|
+
|
|
56
|
+
.ds-icon-btn {
|
|
57
|
+
margin: ds-spacing(0 $ds-s-050);
|
|
58
|
+
+ .ds-icon-btn {
|
|
59
|
+
margin: ds-spacing(0 0 0 $ds-s-075);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
49
62
|
}
|
|
50
63
|
|
|
51
|
-
.ds-btn-toggle
|
|
52
|
-
|
|
53
|
-
margin-top: 2px; // special case due to design margin extending from the component's visual size, not its clickable area
|
|
54
|
-
margin-bottom: 2px;
|
|
64
|
+
.ds-btn-toggle {
|
|
65
|
+
align-self: center;
|
|
55
66
|
}
|
|
56
67
|
|
|
57
68
|
.ds-group-header__right-link {
|
|
@@ -82,6 +93,7 @@
|
|
|
82
93
|
align-items: center;
|
|
83
94
|
justify-content: space-between;
|
|
84
95
|
flex: 1;
|
|
96
|
+
padding-right: ds-spacing($ds-s-100);
|
|
85
97
|
|
|
86
98
|
@include ds-focus(-2px);
|
|
87
99
|
|