@bonniernews/dn-design-system-web 2.1.0-alpha.2 → 2.1.0-alpha.21
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 +167 -0
- package/README.md +1 -1
- package/components/blocked-content/README.md +60 -0
- package/components/blocked-content/blocked-content.js +83 -0
- package/components/blocked-content/blocked-content.njk +38 -0
- package/components/blocked-content/blocked-content.scss +34 -0
- package/components/button/README.md +1 -0
- package/components/button/button.njk +4 -0
- package/components/button/button.scss +24 -19
- package/components/button-toggle/button-toggle.njk +2 -5
- package/components/button-toggle/button-toggle.scss +6 -10
- package/components/byline/README.md +64 -0
- package/components/byline/byline.njk +97 -0
- package/components/byline/byline.scss +160 -0
- package/components/checkbox/checkbox.njk +2 -5
- package/components/disclaimer/README.md +3 -1
- package/components/disclaimer/disclaimer.njk +7 -6
- package/components/disclaimer/disclaimer.scss +10 -0
- package/components/factbox/README.md +53 -0
- package/components/factbox/factbox.js +42 -0
- package/components/factbox/factbox.njk +78 -0
- package/components/factbox/factbox.scss +155 -0
- package/components/footer/footer.njk +5 -10
- package/components/list-item/README-checkbox.md +1 -0
- package/components/list-item/README-radio.md +1 -0
- package/components/list-item/README-switch.md +1 -0
- package/components/list-item/README-toggle.md +2 -1
- package/components/list-item/list-item.njk +10 -10
- package/components/list-item/list-item.scss +5 -7
- package/components/quote/README.md +36 -0
- package/components/quote/quote.njk +29 -0
- package/components/quote/quote.scss +36 -0
- package/components/switch/switch.scss +22 -15
- package/components/thematic-break/README.md +30 -0
- package/components/thematic-break/thematic-break.njk +14 -0
- package/components/thematic-break/thematic-break.scss +22 -0
- package/foundations/a11y/informative-svg.njk +23 -0
- package/foundations/helpers/typography.scss +4 -4
- package/foundations/icons/grade-icon.njk +22 -0
- package/foundations/variables/colorsCssVariables.scss +2 -0
- package/foundations/variables/colorsDnDarkTokens.scss +4 -2
- package/foundations/variables/colorsDnLightTokens.scss +3 -1
- package/njk-helpers/attributes.njk +5 -0
- package/package.json +1 -1
- package/tokens/colors-css-variables.json +2 -0
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
{%
|
|
2
|
-
{% macro _getAttributes(attributes) %}
|
|
3
|
-
{% for attribute, value in attributes %}
|
|
4
|
-
{{attribute}}="{{value}}"
|
|
5
|
-
{% endfor %}
|
|
6
|
-
{% endmacro %}
|
|
1
|
+
{% from '@bonniernews/dn-design-system-web/njk-helpers/attributes.njk' import getAttributes %}
|
|
7
2
|
|
|
3
|
+
{% macro Footer(params) %}
|
|
8
4
|
{% set componentClassName = "ds-footer" %}
|
|
9
5
|
{% set classNamePrefix = componentClassName + "--" %}
|
|
10
6
|
{% set variant = [] %}
|
|
@@ -23,11 +19,11 @@
|
|
|
23
19
|
<div class="{{ componentClassName + '__inner'}}">
|
|
24
20
|
<div class="{{ componentClassName + '__link-grid'}}">
|
|
25
21
|
{% for group in params.linkGroups %}
|
|
26
|
-
<div class="{{ componentClassName + '__link-group'}}" {{-
|
|
22
|
+
<div class="{{ componentClassName + '__link-group'}}" {{- getAttributes(group.attributes) | safe }}>
|
|
27
23
|
<h2>{{ group.title }}</h2>
|
|
28
24
|
<ul>
|
|
29
25
|
{% for link in group.links %}
|
|
30
|
-
<li><a href="{{ link.href }}" class="ds-footer__link {{ link.classNames }}" {{-
|
|
26
|
+
<li><a href="{{ link.href }}" class="ds-footer__link {{ link.classNames }}" {{- getAttributes(link.attributes) | safe }}>{{ link.text }}</a></li>
|
|
31
27
|
{% endfor %}
|
|
32
28
|
</ul>
|
|
33
29
|
</div>
|
|
@@ -51,11 +47,10 @@
|
|
|
51
47
|
{% if params.channels %}
|
|
52
48
|
<div class="{{ componentClassName + '__channels'}}">
|
|
53
49
|
{% for link in params.channels %}
|
|
54
|
-
<a href="{{ link.href }}" class="ds-footer__channel-link {{ link.classNames }}" {{-
|
|
50
|
+
<a href="{{ link.href }}" class="ds-footer__channel-link {{ link.classNames }}" {{- getAttributes(link.attributes) | safe }}>{{ link.text }}</a>
|
|
55
51
|
{% endfor %}
|
|
56
52
|
</div>
|
|
57
53
|
{% endif %}
|
|
58
54
|
</div>
|
|
59
55
|
</footer>
|
|
60
56
|
{% endmacro %}
|
|
61
|
-
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|disabled | bool | no | true, false | false | |
|
|
19
19
|
|border | bool | no | true, false | false | |
|
|
20
20
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
21
|
+
|elementAttributes | Object | no | | | Sets attributes on actual checkbox element and not list item. Same structure as attributes above |
|
|
21
22
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
22
23
|
|forcePx | bool | no | true, false | false | Fixed pixel value is used for typography to prevent scaling based on html font-size
|
|
23
24
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|disabled | bool | no | true, false | false | |
|
|
20
20
|
|border | bool | no | true, false | false | |
|
|
21
21
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
22
|
+
|elementAttributes | Object | no | | | Sets attributes on actual radio element and not list item. Same structure as attributes above |
|
|
22
23
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
23
24
|
|forcePx | bool | no | true, false | false | Fixed pixel value is used for typography to prevent scaling based on html font-size
|
|
24
25
|
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|border | bool | no | true, false | false | |
|
|
19
19
|
|leadingIcon | String | no | add, arrow_back, arrow_forward etc | | For all available icons see: https://designsystem.dn.se/?path=/story/foundations-icon-web--all |
|
|
20
20
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
21
|
+
|elementAttributes | Object | no | | | Sets attributes on actual switch element and not list item. Same structure as attributes above |
|
|
21
22
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
22
23
|
|forcePx | bool | no | true, false | false | Fixed pixel value is used for typography to prevent scaling based on html font-size
|
|
23
24
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|disabled | bool | no | true, false | false | |
|
|
20
20
|
|border | bool | no | true, false | false | |
|
|
21
21
|
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
22
|
+
|elementAttributes | Object | no | | | Sets attributes on actual toggle element and not list item. Same structure as attributes above |
|
|
22
23
|
|classNames | String | no | | | Ex. "my-special-class" |
|
|
23
24
|
|forcePx | bool | no | true, false | false | Fixed pixel value is used for typography to prevent scaling based on html font-size
|
|
24
25
|
|
|
@@ -34,7 +35,7 @@ These are copy paste friendly examples to quickliy get started using a component
|
|
|
34
35
|
{{ ListItem({
|
|
35
36
|
listItemType: 'toggle',
|
|
36
37
|
title: 'My toggle list item',
|
|
37
|
-
titleHref: '
|
|
38
|
+
titleHref: 'dn.se',
|
|
38
39
|
toggleText: 'Följ',
|
|
39
40
|
toggleSelectedText: 'Följer'
|
|
40
41
|
})}}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
{% from '@bonniernews/dn-design-system-web/components/checkbox/checkbox.njk' import Checkbox %}
|
|
4
4
|
{% from '@bonniernews/dn-design-system-web/components/radio-button/radio-button.njk' import RadioButton %}
|
|
5
5
|
{% from '@bonniernews/dn-design-system-web/components/button-toggle/button-toggle.njk' import ButtonToggle %}
|
|
6
|
+
{% from '@bonniernews/dn-design-system-web/njk-helpers/attributes.njk' import getAttributes %}
|
|
6
7
|
|
|
7
8
|
{% macro ListItem(params) %}
|
|
8
9
|
{% set componentClassName = "ds-list-item" %}
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
{% if params.title %}
|
|
17
18
|
<div class="{{ componentClassName + '__titles'}}">
|
|
18
19
|
{% if params.titleHref and not params.disabled %}
|
|
19
|
-
<a class="{{ componentClassName + '__title'}}" href="{{ params.
|
|
20
|
+
<a class="{{ componentClassName + '__title'}}" href="{{ params.titleHref }}">{{ params.title }}</a>
|
|
20
21
|
{% else %}
|
|
21
22
|
<span class="{{ componentClassName + '__title'}}">{{ params.title }}</span>
|
|
22
23
|
{% endif %}
|
|
@@ -43,11 +44,7 @@
|
|
|
43
44
|
{% macro ListItemInner(params, componentClassName) %}
|
|
44
45
|
{% set classNamePrefix = componentClassName + "--" %}
|
|
45
46
|
{% set variant = [] %}
|
|
46
|
-
{% set attributes %}
|
|
47
|
-
{% for attribute, value in params.attributes %}
|
|
48
|
-
{{attribute}}="{{value}}"
|
|
49
|
-
{% endfor %}
|
|
50
|
-
{% endset %}
|
|
47
|
+
{% set attributes = getAttributes(params.attributes) %}
|
|
51
48
|
|
|
52
49
|
{% if params.forcePx %}
|
|
53
50
|
{% set variant = (variant.push("ds-force-px"), variant) %}
|
|
@@ -101,7 +98,8 @@
|
|
|
101
98
|
condensed: true,
|
|
102
99
|
disabled: params.disabled,
|
|
103
100
|
forcePx: params.forcePx,
|
|
104
|
-
stripLabel: true
|
|
101
|
+
stripLabel: true,
|
|
102
|
+
attributes: params.elementAttributes
|
|
105
103
|
})}}
|
|
106
104
|
{% endset %}
|
|
107
105
|
{{ caller() if caller }}
|
|
@@ -115,7 +113,7 @@
|
|
|
115
113
|
condensed: true,
|
|
116
114
|
disabled: params.disabled,
|
|
117
115
|
forcePx: params.forcePx,
|
|
118
|
-
buttons: [{ id: params.id, checked: params.selected }]
|
|
116
|
+
buttons: [{ id: params.id, checked: params.selected, attributes: params.elementAttributes }]
|
|
119
117
|
})}}
|
|
120
118
|
{% endset %}
|
|
121
119
|
{{ caller() if caller }}
|
|
@@ -131,7 +129,8 @@
|
|
|
131
129
|
condensed: true,
|
|
132
130
|
disabled: params.disabled,
|
|
133
131
|
forcePx: params.forcePx,
|
|
134
|
-
stripLabel: true
|
|
132
|
+
stripLabel: true,
|
|
133
|
+
attributes: params.elementAttributes
|
|
135
134
|
})}}
|
|
136
135
|
{% endset %}
|
|
137
136
|
{{ caller() if caller }}
|
|
@@ -158,7 +157,8 @@
|
|
|
158
157
|
condensed: false,
|
|
159
158
|
disabled: params.disabled,
|
|
160
159
|
forcePx: params.forcePx,
|
|
161
|
-
size: "xsmall"
|
|
160
|
+
size: "xsmall",
|
|
161
|
+
attributes: params.elementAttributes
|
|
162
162
|
})}}
|
|
163
163
|
{% endset %}
|
|
164
164
|
{{ caller() if caller }}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
@use "../button-toggle/button-toggle.scss" as *;
|
|
7
7
|
|
|
8
8
|
$ds-list-item__icon-size: 24px;
|
|
9
|
-
$ds-list-item__padding: ds-spacing-component(x4);
|
|
10
9
|
|
|
11
10
|
.ds-list-item__outer {
|
|
12
11
|
list-style: none;
|
|
@@ -34,7 +33,7 @@ $ds-list-item__padding: ds-spacing-component(x4);
|
|
|
34
33
|
align-items: center;
|
|
35
34
|
justify-content: space-between;
|
|
36
35
|
position: relative;
|
|
37
|
-
padding:
|
|
36
|
+
padding: ds-spacing-component(x4 outer);
|
|
38
37
|
width: 100%;
|
|
39
38
|
|
|
40
39
|
&::before {
|
|
@@ -210,8 +209,7 @@ $ds-list-item__padding: ds-spacing-component(x4);
|
|
|
210
209
|
|
|
211
210
|
.ds-list-item--accordion .ds-checkbox__accordion,
|
|
212
211
|
.ds-list-item--radio .ds-radio-btn__inner,
|
|
213
|
-
.ds-list-item--checkbox .ds-checkbox__inner
|
|
214
|
-
.ds-list-item--switch .ds-switch__inner {
|
|
212
|
+
.ds-list-item--checkbox .ds-checkbox__inner {
|
|
215
213
|
&::before {
|
|
216
214
|
display: none;
|
|
217
215
|
}
|
|
@@ -242,13 +240,13 @@ $ds-list-item__padding: ds-spacing-component(x4);
|
|
|
242
240
|
cursor: default;
|
|
243
241
|
.ds-list-item__inner {
|
|
244
242
|
display: flex;
|
|
245
|
-
padding: 0 0 0
|
|
243
|
+
padding: 0 0 0 ds-spacing-component(outer);
|
|
246
244
|
}
|
|
247
245
|
.ds-list-item__titles {
|
|
248
|
-
padding:
|
|
246
|
+
padding: ds-spacing-component(x4) 0;
|
|
249
247
|
}
|
|
250
248
|
.ds-btn-toggle {
|
|
251
|
-
margin: 0
|
|
249
|
+
margin: 0 ds-spacing-component(outer) 0 ds-spacing-component(x4);
|
|
252
250
|
}
|
|
253
251
|
a {
|
|
254
252
|
@include ds-link($ds-link-list);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
- GitHub: [BonnierNews/dn-design-system/../web/src/components/quote](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/quote)
|
|
2
|
+
- Storybook: [Quote > Web](https://designsystem.dn.se/?path=/story/components-app-web-quote-web)
|
|
3
|
+
|
|
4
|
+
----
|
|
5
|
+
|
|
6
|
+
# Quote
|
|
7
|
+
|
|
8
|
+
## Parameters
|
|
9
|
+
|
|
10
|
+
|parameter | type | required | options | default | description |
|
|
11
|
+
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
12
|
+
|bodyHtml | HTML String | yes | | | |
|
|
13
|
+
|variant | String | no | standard, culture, sport, economy | standard | Design variant |
|
|
14
|
+
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
15
|
+
|classNames | String | no | | | Ex. "my-special-class" |
|
|
16
|
+
|forcePx | bool | no | true, false | false | Fixed pixel value is used for typography to prevent scaling based on html font-size |
|
|
17
|
+
|
|
18
|
+
## Minimum requirement example
|
|
19
|
+
|
|
20
|
+
### Nunjucks
|
|
21
|
+
|
|
22
|
+
These are copy paste friendly examples to quickliy get started using a component.
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
{% from '@bonniernews/dn-design-system-web/components/quote/quote.njk' import Quote %}
|
|
26
|
+
|
|
27
|
+
{{ Quote({
|
|
28
|
+
variant: "culture",
|
|
29
|
+
bodyHtml: ""
|
|
30
|
+
})}}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### SCSS
|
|
34
|
+
```scss
|
|
35
|
+
@use "@bonniernews/dn-design-system-web/components/quote/quote";
|
|
36
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{% from '@bonniernews/dn-design-system-web/njk-helpers/attributes.njk' import getAttributes %}
|
|
2
|
+
|
|
3
|
+
{% macro Quote(params) %}
|
|
4
|
+
{% set componentClassName = "ds-quote" %}
|
|
5
|
+
{% set classNamePrefix = componentClassName + "--" %}
|
|
6
|
+
{% set variant = [] %}
|
|
7
|
+
{% set attributes = getAttributes(params.attributes) %}
|
|
8
|
+
|
|
9
|
+
{% if params.forcePx %}
|
|
10
|
+
{% set variant = (variant.push("ds-force-px"), variant) %}
|
|
11
|
+
{% endif %}
|
|
12
|
+
|
|
13
|
+
{% if params.variant %}
|
|
14
|
+
{% set variant = (variant.push(classNamePrefix + params.variant), variant) %}
|
|
15
|
+
{% else %}
|
|
16
|
+
{% set variant = (variant.push(classNamePrefix + "standard"), variant) %}
|
|
17
|
+
{% endif %}
|
|
18
|
+
|
|
19
|
+
{% if params.classNames %}
|
|
20
|
+
{% set variant = (variant.push(params.classNames), variant) %}
|
|
21
|
+
{% endif%}
|
|
22
|
+
|
|
23
|
+
{% set classes = componentClassName + " " + variant | join(" ") %}
|
|
24
|
+
|
|
25
|
+
<blockquote class="{{ classes }}" {{- attributes | safe }}>
|
|
26
|
+
<span class="{{ componentClassName + '__border'}}"></span>
|
|
27
|
+
{{ params.bodyHtml | safe }}
|
|
28
|
+
</blockquote>
|
|
29
|
+
{% endmacro %}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@use "../../foundations/helpers/forward.helpers.scss" as *;
|
|
2
|
+
|
|
3
|
+
.ds-quote {
|
|
4
|
+
@include ds-typography($ds-typography-expressive-heading03bold);
|
|
5
|
+
color: $ds-color-text-primary;
|
|
6
|
+
margin: ds-spacing-layout(
|
|
7
|
+
gap-vertical-static-medium 0 gap-vertical-static-large
|
|
8
|
+
);
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
@at-root .ds-force-px#{&} {
|
|
12
|
+
@include ds-typography($ds-typography-expressive-heading03bold, true);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ds-quote__border {
|
|
16
|
+
display: block;
|
|
17
|
+
width: 40px;
|
|
18
|
+
height: 8px;
|
|
19
|
+
color: $ds-color-component-brand;
|
|
20
|
+
background: currentColor;
|
|
21
|
+
margin: ds-spacing-component(0 0 x2);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--culture .ds-quote__border {
|
|
25
|
+
color: $ds-color-static-kultur;
|
|
26
|
+
}
|
|
27
|
+
&--sport .ds-quote__border {
|
|
28
|
+
color: $ds-color-static-sport;
|
|
29
|
+
}
|
|
30
|
+
&--economy .ds-quote__border {
|
|
31
|
+
color: $ds-color-static-economy;
|
|
32
|
+
}
|
|
33
|
+
&--sthlm .ds-quote__border {
|
|
34
|
+
color: $ds-color-static-sthlm;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
@use "../../foundations/helpers/
|
|
2
|
-
@use "../../foundations/helpers/typography.scss" as *;
|
|
3
|
-
@use "../../foundations/helpers/mediaQueries.scss" as *;
|
|
4
|
-
@use "../../foundations/helpers/metrics.scss" as *;
|
|
5
|
-
@use "../../foundations/helpers/utilities.scss" as *;
|
|
6
|
-
@use "../../foundations/helpers/colors.scss" as *;
|
|
1
|
+
@use "../../foundations/helpers/forward.helpers.scss" as *;
|
|
7
2
|
|
|
8
3
|
$ds-switch__knob-size: 16px;
|
|
9
4
|
$ds-switch__knob-padding: 4px;
|
|
@@ -108,18 +103,30 @@ $ds-switch__container-width: 44px;
|
|
|
108
103
|
outline-color: $ds-color-border-focus;
|
|
109
104
|
}
|
|
110
105
|
}
|
|
106
|
+
}
|
|
111
107
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
input:not(:disabled)
|
|
119
|
-
|
|
120
|
-
|
|
108
|
+
@include ds-hover() {
|
|
109
|
+
.ds-switch
|
|
110
|
+
input:not(:disabled)
|
|
111
|
+
+ .ds-switch__inner:hover
|
|
112
|
+
.ds-switch__box::before,
|
|
113
|
+
.ds-list-item--switch:hover
|
|
114
|
+
input:not(:disabled)
|
|
115
|
+
+ .ds-switch__inner
|
|
116
|
+
.ds-switch__box::before {
|
|
117
|
+
background-color: $ds-color-component-primary-overlay;
|
|
121
118
|
}
|
|
122
119
|
}
|
|
120
|
+
.ds-switch
|
|
121
|
+
input:not(:disabled)
|
|
122
|
+
+ .ds-switch__inner:active
|
|
123
|
+
.ds-switch__box::before,
|
|
124
|
+
.ds-list-item--switch:active
|
|
125
|
+
input:not(:disabled)
|
|
126
|
+
+ .ds-switch__inner
|
|
127
|
+
.ds-switch__box::before {
|
|
128
|
+
background-color: $ds-color-component-primary-overlay-02;
|
|
129
|
+
}
|
|
123
130
|
|
|
124
131
|
.ds-switch--condensed .ds-switch__inner {
|
|
125
132
|
padding: 0;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
- GitHub: [BonnierNews/dn-design-system/../web/src/components/thematic-break](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/thematic-break)
|
|
2
|
+
- Storybook: [ThematicBreak > Web](https://designsystem.dn.se/?path=/story/components-app-web-article-components-thematicbreak-web--thematic-break)
|
|
3
|
+
|
|
4
|
+
----
|
|
5
|
+
|
|
6
|
+
# ThematicBreak
|
|
7
|
+
|
|
8
|
+
## Parameters
|
|
9
|
+
|
|
10
|
+
|parameter | type | required | options | default | description |
|
|
11
|
+
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
12
|
+
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
13
|
+
|classNames | String | no | | | Ex. "my-special-class" |
|
|
14
|
+
|
|
15
|
+
## Minimum requirement example
|
|
16
|
+
|
|
17
|
+
### Nunjucks
|
|
18
|
+
|
|
19
|
+
These are copy paste friendly examples to quickliy get started using a component.
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
{% from '@bonniernews/dn-design-system-web/components/thematic-break/thematic-break.njk' import ThematicBreak %}
|
|
23
|
+
|
|
24
|
+
{{ ThematicBreak() }}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### SCSS
|
|
28
|
+
```scss
|
|
29
|
+
@use "@bonniernews/dn-design-system-web/components/thematic-break/thematic-break";
|
|
30
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{% from '@bonniernews/dn-design-system-web/njk-helpers/attributes.njk' import getAttributes %}
|
|
2
|
+
|
|
3
|
+
{% macro ThematicBreak(params) %}
|
|
4
|
+
{% set componentClassName = "ds-thematic-break" %}
|
|
5
|
+
{% set additionalClasses = [] %}
|
|
6
|
+
{% set attributes = getAttributes(params.attributes) %}
|
|
7
|
+
|
|
8
|
+
{% if params.classNames %}
|
|
9
|
+
{% set additionalClasses = (additionalClasses.push(params.classNames), additionalClasses) %}
|
|
10
|
+
{% endif%}
|
|
11
|
+
|
|
12
|
+
{% set classes = componentClassName + " " + additionalClasses | join(" ") %}
|
|
13
|
+
<hr class="{{ classes }}" {{- attributes | safe }}>
|
|
14
|
+
{% endmacro %}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use "../../foundations/helpers/forward.helpers.scss" as *;
|
|
2
|
+
|
|
3
|
+
.ds-thematic-break {
|
|
4
|
+
height: 4px;
|
|
5
|
+
margin: ds-spacing-layout(
|
|
6
|
+
gap-vertical-static-medium 0 gap-vertical-static-large
|
|
7
|
+
);
|
|
8
|
+
border: none;
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
&::after {
|
|
13
|
+
content: "";
|
|
14
|
+
background-color: $ds-color-border-primary;
|
|
15
|
+
height: 100%;
|
|
16
|
+
width: 128px;
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 50%;
|
|
20
|
+
transform: translateX(-50%);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{#
|
|
2
|
+
example:
|
|
3
|
+
<svg {{ getSvgAttributes({ title: true, desc: true }) }}>{{ getInformativeElements({ title: 'A title', 'desc': 'A descriptive text' }) }}</svg>
|
|
4
|
+
#}
|
|
5
|
+
|
|
6
|
+
{% macro getSvgAttributes(params) %}
|
|
7
|
+
{% if params.title and params.desc %}
|
|
8
|
+
role="img" lang="sv" xml:lang="sv" aria-labelledby="title description"
|
|
9
|
+
{% elif params.title %}
|
|
10
|
+
role="img" lang="sv" xml:lang="sv" aria-labelledby="title"
|
|
11
|
+
{% elif params.desc %}
|
|
12
|
+
role="img" lang="sv" xml:lang="sv" aria-labelledby="description"
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% endmacro %}
|
|
15
|
+
|
|
16
|
+
{% macro getInformativeElements(params) %}
|
|
17
|
+
{% if params.title %}
|
|
18
|
+
<title id="title">{{ params.title }}</title>
|
|
19
|
+
{% endif %}
|
|
20
|
+
{% if params.desc %}
|
|
21
|
+
<desc id="description">{{ params.desc }}</desc>
|
|
22
|
+
{% endif %}
|
|
23
|
+
{% endmacro %}
|
|
@@ -74,7 +74,7 @@ $dsSerifWeights: (
|
|
|
74
74
|
$tmpMapScreenLarge: map.get($typographyTokensScreenLarge, $component);
|
|
75
75
|
|
|
76
76
|
@if $tmpMap {
|
|
77
|
-
@include ds-mq-largest-breakpoint(
|
|
77
|
+
@include ds-mq-largest-breakpoint(mobile) {
|
|
78
78
|
@include _ds-normalize-letter-spacing($tmpMap);
|
|
79
79
|
@each $key in map-keys($tmpMap) {
|
|
80
80
|
@include _ds-typography-get-property($tmpMap, $key, $forcePx);
|
|
@@ -83,7 +83,7 @@ $dsSerifWeights: (
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
@if $tmpMapScreenLarge {
|
|
86
|
-
@include ds-mq-smallest-breakpoint(
|
|
86
|
+
@include ds-mq-smallest-breakpoint(tablet) {
|
|
87
87
|
@include _ds-normalize-letter-spacing($tmpMapScreenLarge);
|
|
88
88
|
@each $key in map-keys($tmpMapScreenLarge) {
|
|
89
89
|
@include _ds-typography-get-property(
|
|
@@ -99,9 +99,9 @@ $dsSerifWeights: (
|
|
|
99
99
|
@mixin ds-typography-without-mq($component, $screen: false, $forcePx: false) {
|
|
100
100
|
$tmpMap: false;
|
|
101
101
|
|
|
102
|
-
@if $screen == mobile
|
|
102
|
+
@if $screen == mobile {
|
|
103
103
|
$tmpMap: map.get($typographyTokensScreenSmall, $component);
|
|
104
|
-
} @else if $screen == desktop {
|
|
104
|
+
} @else if $screen == tablet or $screen == desktop {
|
|
105
105
|
$tmpMap: map.get($typographyTokensScreenLarge, $component);
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{% from '@bonniernews/dn-design-system-web/foundations/a11y/informative-svg.njk' import getSvgAttributes, getInformativeElements %}
|
|
2
|
+
|
|
3
|
+
{% macro GradeIcon(params) %}
|
|
4
|
+
{% set iconName = params.icon | lower %}
|
|
5
|
+
{% set svgAccessibilityAttributes = getSvgAttributes({ title: params.title, desc: params.desc }) if params.title or params.desc else "" %}
|
|
6
|
+
{% set svgAccessibilityElements = getInformativeElements({ title: params.title, desc: params.desc }) if params.title or params.desc else "" %}
|
|
7
|
+
<i class="ds-icon ds-icon--grade-{{ iconName }}">
|
|
8
|
+
{% if iconName == "zero" %}
|
|
9
|
+
<svg xmlns="http://www.w3.org/2000/svg" {{- svgAccessibilityAttributes -}} fill="none" viewBox="0 0 194 44">{{- svgAccessibilityElements -}}<path d="M20.52 12C15.816 12 13 15.891 13 21.985 13 28.078 15.816 32 20.52 32c4.703 0 7.55-3.922 7.55-10.015 0-6.094-2.847-9.985-7.55-9.985Zm0 19.366c-.93 0-1.409-.603-1.409-1.78V14.414c0-1.176.48-1.75 1.409-1.75.958 0 1.438.574 1.438 1.75v15.174c0 1.176-.48 1.78-1.438 1.78ZM31.633 32C32.952 32 34 31.035 34 29.255c0-1.75-1.048-2.745-2.367-2.745-1.318 0-2.366.995-2.366 2.745 0 1.78 1.048 2.745 2.366 2.745Z"/><circle cx="22" cy="22" r="21" fill="none" stroke-width="2"/><g opacity=".5"><path d="M59.04 12C57.35 15.318 54 14.655 54 14.655v.512s1.69.151 2.577-.271v14.087c0 1.78-.43 1.991-.887 1.991h-1.26v.392h9.908v-.392h-1.26c-.487 0-.888-.21-.888-1.99V12h-3.15ZM67.738 32c1.26 0 2.262-.965 2.262-2.745 0-1.75-1.002-2.745-2.262-2.745s-2.262.995-2.262 2.745c0 1.78 1.002 2.745 2.262 2.745Z"/></g><g opacity=".5"><path d="M95.814 23.735c0 2.111-1.264 2.654-1.793 2.654h-6.348c2.704-1.327 8.465-4.464 8.465-8.507 0-3.046-2.264-5.882-7.76-5.882-3.527 0-5.76 2.474-5.76 4.766 0 2.233 1.498 3.258 2.997 3.258 2.851 0 2.91-2.685 2.91-2.835 0-.634-.44-2.625-2.998-2.625 0 0 .059-1.87 2.851-1.87.911 0 1.763.603 1.763 1.78v5.37c0 2.08-.793 3.197-1.028 3.559C87.143 26.269 82 31.035 82 31.035v.694h14.167v-7.994h-.353ZM99.678 32c1.293 0 2.322-.965 2.322-2.745 0-1.75-1.029-2.745-2.322-2.745-1.293 0-2.322.995-2.322 2.745 0 1.78 1.029 2.745 2.322 2.745Z"/></g><g opacity=".5"><path d="M122.896 20.507c1.516-.392 3.368-1.358 3.368-3.801 0-3.952-3.901-4.706-6.427-4.706-3.62.06-5.304 2.262-5.304 4.314 0 1.99 1.291 2.896 2.582 2.896 2.442 0 2.498-2.384 2.498-2.534 0-.573-.365-2.353-2.582-2.353 0 0-.14-1.69 2.89-1.69.786 0 1.516.544 1.516 1.6v2.322c0 1.508.112 3.801-1.487 3.801h-1.769v.633h1.74c.87 0 1.572.634 1.572 1.84v6.697c0 1.177-.814 1.78-1.684 1.78-3.367 0-3.003-1.87-3.003-1.87 2.442 0 2.835-1.991 2.835-2.655 0-.12-.028-2.805-2.75-2.805-1.432 0-2.891 1.026-2.891 3.258 0 2.292 1.74 4.766 5.809 4.766 5.248 0 7.409-3.047 7.409-6.093 0-2.354-1.179-4.525-4.322-5.4ZM129.783 32c1.235 0 2.217-.965 2.217-2.745 0-1.75-.982-2.745-2.217-2.745s-2.217.995-2.217 2.745c0 1.78.982 2.745 2.217 2.745Z"/></g><g opacity=".5"><path d="M156.935 31.336c-.455 0-.883-.18-.883-1.96v-1.931h2.308v-1.237h-2.308V12h-4.359L144 26.45v.995h6.468v1.93c0 1.78-.399 1.961-.884 1.961h-1.253v.393h9.858v-.393h-1.254Zm-12.08-5.128 5.613-10.679v10.68h-5.613ZM161.749 32c1.254 0 2.251-.965 2.251-2.745 0-1.75-.997-2.745-2.251-2.745s-2.251.995-2.251 2.745c0 1.78.997 2.745 2.251 2.745Z"/></g><g opacity=".5"><path d="M182.073 20.518c-1.888 0-3.392.884-3.392.884v-3.448h8.097l1.587-5.897-.356-.057s-.383 1.111-1.887 1.111h-8.043l-.027 9.202.437.2c1.532-1.453 3.174-1.396 3.475-1.396.848 0 1.504.598 1.504 1.738v6.837c0 1.111-.766 1.653-1.614 1.653-3.283 0-3.118-1.738-3.118-1.738 2.38 0 2.762-1.88 2.762-2.507 0-.143-.027-2.65-2.68-2.65-1.396 0-2.818.94-2.818 3.049 0 2.193 1.86 4.501 5.854 4.501 5.116 0 7.222-2.792 7.222-5.67 0-2.791-1.805-5.811-7.003-5.811ZM191.839 32c1.204 0 2.161-.912 2.161-2.593 0-1.652-.957-2.592-2.161-2.592-1.204 0-2.161.94-2.161 2.592 0 1.681.957 2.593 2.161 2.593Z"/></g></svg>
|
|
10
|
+
{% elif iconName == "one" %}
|
|
11
|
+
<svg xmlns="http://www.w3.org/2000/svg" {{- svgAccessibilityAttributes -}} fill="none" viewBox="0 0 197 44">{{- svgAccessibilityElements -}}<g opacity=".5"><path d="M7.52 12C2.816 12 0 15.891 0 21.985 0 28.078 2.816 32 7.52 32c4.703 0 7.55-3.922 7.55-10.015C15.07 15.89 12.222 12 7.52 12Zm0 19.366c-.93 0-1.408-.603-1.408-1.78V14.414c0-1.176.479-1.75 1.408-1.75.958 0 1.438.574 1.438 1.75v15.174c0 1.176-.48 1.78-1.438 1.78ZM18.633 32C19.952 32 21 31.035 21 29.255c0-1.75-1.049-2.745-2.367-2.745s-2.366.995-2.366 2.745c0 1.78 1.048 2.745 2.366 2.745Z"/></g><circle cx="53" cy="22" r="21" fill="none" stroke-width="2"/><path d="M52.04 12C50.35 15.318 47 14.655 47 14.655v.512s1.69.151 2.577-.271v14.087c0 1.78-.43 1.991-.887 1.991h-1.26v.392h9.907v-.392h-1.26c-.486 0-.887-.21-.887-1.99V12h-3.15ZM60.738 32c1.26 0 2.262-.965 2.262-2.745 0-1.75-1.002-2.745-2.262-2.745s-2.262.995-2.262 2.745c0 1.78 1.002 2.745 2.262 2.745Z"/><g opacity=".5"><path d="M98.814 23.735c0 2.111-1.264 2.654-1.793 2.654h-6.348c2.704-1.327 8.465-4.464 8.465-8.507 0-3.046-2.264-5.882-7.76-5.882-3.527 0-5.76 2.474-5.76 4.766 0 2.233 1.498 3.258 2.997 3.258 2.851 0 2.91-2.685 2.91-2.835 0-.634-.44-2.625-2.998-2.625 0 0 .059-1.87 2.851-1.87.911 0 1.763.603 1.763 1.78v5.37c0 2.08-.793 3.197-1.028 3.559C90.143 26.269 85 31.035 85 31.035v.694h14.167v-7.994h-.353ZM102.678 32c1.293 0 2.322-.965 2.322-2.745 0-1.75-1.029-2.745-2.322-2.745-1.293 0-2.322.995-2.322 2.745 0 1.78 1.029 2.745 2.322 2.745Z"/></g><g opacity=".5"><path d="M125.896 20.507c1.516-.392 3.368-1.358 3.368-3.801 0-3.952-3.901-4.706-6.427-4.706-3.62.06-5.304 2.262-5.304 4.314 0 1.99 1.291 2.896 2.582 2.896 2.442 0 2.498-2.384 2.498-2.534 0-.573-.365-2.353-2.582-2.353 0 0-.14-1.69 2.89-1.69.786 0 1.516.544 1.516 1.6v2.322c0 1.508.112 3.801-1.487 3.801h-1.769v.633h1.74c.87 0 1.572.634 1.572 1.84v6.697c0 1.177-.814 1.78-1.684 1.78-3.367 0-3.003-1.87-3.003-1.87 2.442 0 2.835-1.991 2.835-2.655 0-.12-.028-2.805-2.75-2.805-1.432 0-2.891 1.026-2.891 3.258 0 2.292 1.74 4.766 5.809 4.766 5.248 0 7.409-3.047 7.409-6.093 0-2.354-1.179-4.525-4.322-5.4ZM132.783 32c1.235 0 2.217-.965 2.217-2.745 0-1.75-.982-2.745-2.217-2.745s-2.217.995-2.217 2.745c0 1.78.982 2.745 2.217 2.745Z"/></g><g opacity=".5"><path d="M159.935 31.336c-.455 0-.883-.18-.883-1.96v-1.931h2.308v-1.237h-2.308V12h-4.359L147 26.45v.995h6.468v1.93c0 1.78-.399 1.961-.884 1.961h-1.253v.393h9.858v-.393h-1.254Zm-12.08-5.128 5.613-10.679v10.68h-5.613ZM164.749 32c1.254 0 2.251-.965 2.251-2.745 0-1.75-.997-2.745-2.251-2.745s-2.251.995-2.251 2.745c0 1.78.997 2.745 2.251 2.745Z"/></g><g opacity=".5"><path d="M185.073 20.518c-1.888 0-3.392.884-3.392.884v-3.448h8.097l1.587-5.897-.356-.057s-.383 1.111-1.887 1.111h-8.043l-.027 9.202.437.2c1.532-1.453 3.174-1.396 3.475-1.396.848 0 1.504.598 1.504 1.738v6.837c0 1.111-.766 1.653-1.614 1.653-3.283 0-3.118-1.738-3.118-1.738 2.38 0 2.762-1.88 2.762-2.507 0-.143-.027-2.65-2.68-2.65-1.396 0-2.818.94-2.818 3.049 0 2.193 1.86 4.501 5.854 4.501 5.116 0 7.222-2.792 7.222-5.67 0-2.791-1.805-5.811-7.003-5.811ZM194.839 32c1.204 0 2.161-.912 2.161-2.593 0-1.652-.957-2.592-2.161-2.592-1.204 0-2.161.94-2.161 2.592 0 1.681.957 2.593 2.161 2.593Z"/></g></svg>
|
|
12
|
+
{% elif iconName == "two" %}
|
|
13
|
+
<svg xmlns="http://www.w3.org/2000/svg" {{- svgAccessibilityAttributes -}} fill="none" viewBox="0 0 193 44">{{- svgAccessibilityElements -}}<g opacity=".5"><path d="M7.52 12C2.816 12 0 15.891 0 21.985 0 28.078 2.816 32 7.52 32c4.703 0 7.55-3.922 7.55-10.015C15.07 15.89 12.222 12 7.52 12Zm0 19.366c-.93 0-1.408-.603-1.408-1.78V14.414c0-1.176.479-1.75 1.408-1.75.958 0 1.438.574 1.438 1.75v15.174c0 1.176-.48 1.78-1.438 1.78ZM18.633 32C19.952 32 21 31.035 21 29.255c0-1.75-1.049-2.745-2.367-2.745s-2.366.995-2.366 2.745c0 1.78 1.048 2.745 2.366 2.745Z"/></g><g opacity=".5"><path d="M38.04 12C36.35 15.318 33 14.655 33 14.655v.512s1.69.151 2.577-.271v14.087c0 1.78-.43 1.991-.887 1.991h-1.26v.392h9.907v-.392h-1.26c-.486 0-.887-.21-.887-1.99V12h-3.15ZM46.738 32c1.26 0 2.262-.965 2.262-2.745 0-1.75-1.002-2.745-2.262-2.745s-2.262.995-2.262 2.745c0 1.78 1.002 2.745 2.262 2.745Z"/></g><circle cx="81" cy="22" r="21" fill="none" stroke-width="2"/><path d="M85.814 23.735c0 2.111-1.264 2.654-1.793 2.654h-6.348c2.704-1.327 8.465-4.464 8.465-8.507 0-3.046-2.264-5.882-7.76-5.882-3.527 0-5.76 2.474-5.76 4.766 0 2.233 1.498 3.258 2.997 3.258 2.851 0 2.91-2.685 2.91-2.835 0-.634-.44-2.625-2.998-2.625 0 0 .059-1.87 2.851-1.87.911 0 1.763.603 1.763 1.78v5.37c0 2.08-.793 3.197-1.028 3.559C77.143 26.269 72 31.035 72 31.035v.694h14.167v-7.994h-.353ZM89.678 32C90.971 32 92 31.035 92 29.255c0-1.75-1.029-2.745-2.322-2.745-1.293 0-2.322.995-2.322 2.745 0 1.78 1.029 2.745 2.322 2.745Z"/><g opacity=".5"><path d="M121.896 20.507c1.516-.392 3.368-1.358 3.368-3.801 0-3.952-3.901-4.706-6.427-4.706-3.62.06-5.304 2.262-5.304 4.314 0 1.99 1.291 2.896 2.582 2.896 2.442 0 2.498-2.384 2.498-2.534 0-.573-.365-2.353-2.582-2.353 0 0-.14-1.69 2.89-1.69.786 0 1.516.544 1.516 1.6v2.322c0 1.508.112 3.801-1.487 3.801h-1.769v.633h1.74c.87 0 1.572.634 1.572 1.84v6.697c0 1.177-.814 1.78-1.684 1.78-3.367 0-3.003-1.87-3.003-1.87 2.442 0 2.835-1.991 2.835-2.655 0-.12-.028-2.805-2.75-2.805-1.432 0-2.891 1.026-2.891 3.258 0 2.292 1.74 4.766 5.809 4.766 5.248 0 7.409-3.047 7.409-6.093 0-2.354-1.179-4.525-4.322-5.4ZM128.783 32c1.235 0 2.217-.965 2.217-2.745 0-1.75-.982-2.745-2.217-2.745s-2.217.995-2.217 2.745c0 1.78.982 2.745 2.217 2.745Z"/></g><g opacity=".5"><path d="M155.935 31.336c-.455 0-.883-.18-.883-1.96v-1.931h2.308v-1.237h-2.308V12h-4.359L143 26.45v.995h6.468v1.93c0 1.78-.399 1.961-.884 1.961h-1.253v.393h9.858v-.393h-1.254Zm-12.08-5.128 5.613-10.679v10.68h-5.613ZM160.749 32c1.254 0 2.251-.965 2.251-2.745 0-1.75-.997-2.745-2.251-2.745s-2.251.995-2.251 2.745c0 1.78.997 2.745 2.251 2.745Z"/></g><g opacity=".5"><path d="M181.073 20.518c-1.888 0-3.392.884-3.392.884v-3.448h8.097l1.587-5.897-.356-.057s-.383 1.111-1.887 1.111h-8.043l-.027 9.202.437.2c1.532-1.453 3.174-1.396 3.475-1.396.848 0 1.504.598 1.504 1.738v6.837c0 1.111-.766 1.653-1.614 1.653-3.283 0-3.118-1.738-3.118-1.738 2.38 0 2.762-1.88 2.762-2.507 0-.143-.027-2.65-2.68-2.65-1.396 0-2.818.94-2.818 3.049 0 2.193 1.86 4.501 5.854 4.501 5.116 0 7.222-2.792 7.222-5.67 0-2.791-1.805-5.811-7.003-5.811ZM190.839 32c1.204 0 2.161-.912 2.161-2.593 0-1.652-.957-2.592-2.161-2.592-1.204 0-2.161.94-2.161 2.592 0 1.681.957 2.593 2.161 2.593Z"/></g></svg>
|
|
14
|
+
{% elif iconName == "three" %}
|
|
15
|
+
<svg xmlns="http://www.w3.org/2000/svg" {{- svgAccessibilityAttributes -}} fill="none" viewBox="0 0 195 44">{{- svgAccessibilityElements -}}<g opacity=".5"><path d="M7.52 12C2.816 12 0 15.891 0 21.985 0 28.078 2.816 32 7.52 32c4.703 0 7.55-3.922 7.55-10.015C15.07 15.89 12.222 12 7.52 12Zm0 19.366c-.93 0-1.408-.603-1.408-1.78V14.414c0-1.176.479-1.75 1.408-1.75.958 0 1.438.574 1.438 1.75v15.174c0 1.176-.48 1.78-1.438 1.78ZM18.633 32C19.952 32 21 31.035 21 29.255c0-1.75-1.049-2.745-2.367-2.745s-2.366.995-2.366 2.745c0 1.78 1.048 2.745 2.366 2.745Z"/></g><g opacity=".5"><path d="M38.04 12C36.35 15.318 33 14.655 33 14.655v.512s1.69.151 2.577-.271v14.087c0 1.78-.43 1.991-.887 1.991h-1.26v.392h9.907v-.392h-1.26c-.486 0-.887-.21-.887-1.99V12h-3.15ZM46.738 32c1.26 0 2.262-.965 2.262-2.745 0-1.75-1.002-2.745-2.262-2.745s-2.262.995-2.262 2.745c0 1.78 1.002 2.745 2.262 2.745Z"/></g><g opacity=".5"><path d="M74.814 23.735c0 2.111-1.264 2.654-1.793 2.654h-6.348c2.704-1.327 8.465-4.464 8.465-8.507 0-3.046-2.264-5.882-7.76-5.882-3.527 0-5.76 2.474-5.76 4.766 0 2.233 1.498 3.258 2.997 3.258 2.851 0 2.91-2.685 2.91-2.835 0-.634-.44-2.625-2.998-2.625 0 0 .059-1.87 2.851-1.87.911 0 1.763.603 1.763 1.78v5.37c0 2.08-.793 3.197-1.028 3.559C66.143 26.269 61 31.035 61 31.035v.694h14.167v-7.994h-.353ZM78.678 32C79.971 32 81 31.035 81 29.255c0-1.75-1.029-2.745-2.322-2.745-1.293 0-2.322.995-2.322 2.745 0 1.78 1.029 2.745 2.322 2.745Z"/></g><path d="M113.896 20.507c1.516-.392 3.368-1.358 3.368-3.801 0-3.952-3.901-4.706-6.427-4.706-3.62.06-5.304 2.262-5.304 4.314 0 1.99 1.291 2.896 2.582 2.896 2.442 0 2.498-2.384 2.498-2.534 0-.573-.365-2.353-2.582-2.353 0 0-.14-1.69 2.89-1.69.786 0 1.516.544 1.516 1.6v2.322c0 1.508.112 3.801-1.487 3.801h-1.769v.633h1.74c.87 0 1.572.634 1.572 1.84v6.697c0 1.177-.814 1.78-1.684 1.78-3.367 0-3.003-1.87-3.003-1.87 2.442 0 2.835-1.991 2.835-2.655 0-.12-.028-2.805-2.75-2.805-1.432 0-2.891 1.026-2.891 3.258 0 2.292 1.74 4.766 5.809 4.766 5.248 0 7.409-3.047 7.409-6.093 0-2.354-1.179-4.525-4.322-5.4ZM120.783 32c1.235 0 2.217-.965 2.217-2.745 0-1.75-.982-2.745-2.217-2.745s-2.217.995-2.217 2.745c0 1.78.982 2.745 2.217 2.745Z"/><circle cx="113" cy="22" r="21" fill="none" stroke-width="2"/><g opacity=".5"><path d="M157.935 31.336c-.455 0-.883-.18-.883-1.96v-1.931h2.308v-1.237h-2.308V12h-4.359L145 26.45v.995h6.468v1.93c0 1.78-.399 1.961-.884 1.961h-1.253v.393h9.858v-.393h-1.254Zm-12.08-5.128 5.613-10.679v10.68h-5.613ZM162.749 32c1.254 0 2.251-.965 2.251-2.745 0-1.75-.997-2.745-2.251-2.745s-2.251.995-2.251 2.745c0 1.78.997 2.745 2.251 2.745Z"/></g><g opacity=".5"><path d="M183.073 20.518c-1.888 0-3.392.884-3.392.884v-3.448h8.097l1.587-5.897-.356-.057s-.383 1.111-1.887 1.111h-8.043l-.027 9.202.437.2c1.532-1.453 3.174-1.396 3.475-1.396.848 0 1.504.598 1.504 1.738v6.837c0 1.111-.766 1.653-1.614 1.653-3.283 0-3.118-1.738-3.118-1.738 2.38 0 2.762-1.88 2.762-2.507 0-.143-.027-2.65-2.68-2.65-1.396 0-2.818.94-2.818 3.049 0 2.193 1.86 4.501 5.854 4.501 5.116 0 7.222-2.792 7.222-5.67 0-2.791-1.805-5.811-7.003-5.811ZM192.839 32c1.204 0 2.161-.912 2.161-2.593 0-1.652-.957-2.592-2.161-2.592-1.204 0-2.161.94-2.161 2.592 0 1.681.957 2.593 2.161 2.593Z"/></g></svg>
|
|
16
|
+
{% elif iconName == "four" %}
|
|
17
|
+
<svg xmlns="http://www.w3.org/2000/svg" {{- svgAccessibilityAttributes -}} fill="none" viewBox="0 0 193 44">{{- svgAccessibilityElements -}}<g opacity=".5"><path d="M7.52 12C2.816 12 0 15.891 0 21.985 0 28.078 2.816 32 7.52 32c4.703 0 7.55-3.922 7.55-10.015C15.07 15.89 12.222 12 7.52 12Zm0 19.366c-.93 0-1.408-.603-1.408-1.78V14.414c0-1.176.479-1.75 1.408-1.75.958 0 1.438.574 1.438 1.75v15.174c0 1.176-.48 1.78-1.438 1.78ZM18.633 32C19.952 32 21 31.035 21 29.255c0-1.75-1.049-2.745-2.367-2.745s-2.366.995-2.366 2.745c0 1.78 1.048 2.745 2.366 2.745Z"/></g><g opacity=".5"><path d="M38.04 12C36.35 15.318 33 14.655 33 14.655v.512s1.69.151 2.577-.271v14.087c0 1.78-.43 1.991-.887 1.991h-1.26v.392h9.907v-.392h-1.26c-.486 0-.887-.21-.887-1.99V12h-3.15ZM46.738 32c1.26 0 2.262-.965 2.262-2.745 0-1.75-1.002-2.745-2.262-2.745s-2.262.995-2.262 2.745c0 1.78 1.002 2.745 2.262 2.745Z"/></g><g opacity=".5"><path d="M74.814 23.735c0 2.111-1.264 2.654-1.793 2.654h-6.348c2.704-1.327 8.465-4.464 8.465-8.507 0-3.046-2.264-5.882-7.76-5.882-3.527 0-5.76 2.474-5.76 4.766 0 2.233 1.498 3.258 2.997 3.258 2.851 0 2.91-2.685 2.91-2.835 0-.634-.44-2.625-2.998-2.625 0 0 .059-1.87 2.851-1.87.911 0 1.763.603 1.763 1.78v5.37c0 2.08-.793 3.197-1.028 3.559C66.143 26.269 61 31.035 61 31.035v.694h14.167v-7.994h-.353ZM78.678 32C79.971 32 81 31.035 81 29.255c0-1.75-1.029-2.745-2.322-2.745-1.293 0-2.322.995-2.322 2.745 0 1.78 1.029 2.745 2.322 2.745Z"/></g><g opacity=".5"><path d="M101.896 20.507c1.516-.392 3.368-1.358 3.368-3.801 0-3.952-3.901-4.706-6.427-4.706-3.62.06-5.304 2.262-5.304 4.314 0 1.99 1.291 2.896 2.582 2.896 2.442 0 2.498-2.384 2.498-2.534 0-.573-.365-2.353-2.582-2.353 0 0-.14-1.69 2.89-1.69.786 0 1.516.544 1.516 1.6v2.322c0 1.508.112 3.801-1.487 3.801H97.18v.633h1.74c.87 0 1.572.634 1.572 1.84v6.697c0 1.177-.814 1.78-1.684 1.78-3.367 0-3.003-1.87-3.003-1.87 2.442 0 2.835-1.991 2.835-2.655 0-.12-.028-2.805-2.75-2.805-1.432 0-2.891 1.026-2.891 3.258C93 29.526 94.74 32 98.81 32c5.247 0 7.408-3.047 7.408-6.093 0-2.354-1.179-4.525-4.322-5.4ZM108.783 32c1.235 0 2.217-.965 2.217-2.745 0-1.75-.982-2.745-2.217-2.745s-2.217.995-2.217 2.745c0 1.78.982 2.745 2.217 2.745Z"/></g><path d="M146.935 31.336c-.455 0-.883-.18-.883-1.96v-1.931h2.308v-1.237h-2.308V12h-4.359L134 26.45v.995h6.468v1.93c0 1.78-.399 1.961-.884 1.961h-1.253v.393h9.858v-.393h-1.254Zm-12.08-5.128 5.613-10.679v10.68h-5.613ZM151.749 32c1.254 0 2.251-.965 2.251-2.745 0-1.75-.997-2.745-2.251-2.745s-2.251.995-2.251 2.745c0 1.78.997 2.745 2.251 2.745Z"/><circle cx="143" cy="22" r="21" fill="none" stroke-width="2"/><g opacity=".5"><path d="M181.073 20.518c-1.888 0-3.392.884-3.392.884v-3.448h8.097l1.587-5.897-.356-.057s-.383 1.111-1.887 1.111h-8.043l-.027 9.202.437.2c1.532-1.453 3.174-1.396 3.475-1.396.848 0 1.504.598 1.504 1.738v6.837c0 1.111-.766 1.653-1.614 1.653-3.283 0-3.118-1.738-3.118-1.738 2.38 0 2.762-1.88 2.762-2.507 0-.143-.027-2.65-2.68-2.65-1.396 0-2.818.94-2.818 3.049 0 2.193 1.86 4.501 5.854 4.501 5.116 0 7.222-2.792 7.222-5.67 0-2.791-1.805-5.811-7.003-5.811ZM190.839 32c1.204 0 2.161-.912 2.161-2.593 0-1.652-.957-2.592-2.161-2.592-1.204 0-2.161.94-2.161 2.592 0 1.681.957 2.593 2.161 2.593Z"/></g></svg>
|
|
18
|
+
{% elif iconName == "five" %}
|
|
19
|
+
<svg xmlns="http://www.w3.org/2000/svg" {{- svgAccessibilityAttributes -}} fill="none" viewBox="0 0 197 44">{{- svgAccessibilityElements -}}<g opacity=".5"><path d="M7.52 12C2.816 12 0 15.891 0 21.985 0 28.078 2.816 32 7.52 32c4.703 0 7.55-3.922 7.55-10.015C15.07 15.89 12.222 12 7.52 12Zm0 19.366c-.93 0-1.408-.603-1.408-1.78V14.414c0-1.176.479-1.75 1.408-1.75.958 0 1.438.574 1.438 1.75v15.174c0 1.176-.48 1.78-1.438 1.78ZM18.633 32C19.952 32 21 31.035 21 29.255c0-1.75-1.049-2.745-2.367-2.745s-2.366.995-2.366 2.745c0 1.78 1.048 2.745 2.366 2.745Z"/></g><g opacity=".5"><path d="M38.04 12C36.35 15.318 33 14.655 33 14.655v.512s1.69.151 2.577-.271v14.087c0 1.78-.43 1.991-.887 1.991h-1.26v.392h9.907v-.392h-1.26c-.486 0-.887-.21-.887-1.99V12h-3.15ZM46.738 32c1.26 0 2.262-.965 2.262-2.745 0-1.75-1.002-2.745-2.262-2.745s-2.262.995-2.262 2.745c0 1.78 1.002 2.745 2.262 2.745Z"/></g><g opacity=".5"><path d="M74.814 23.735c0 2.111-1.264 2.654-1.793 2.654h-6.348c2.704-1.327 8.465-4.464 8.465-8.507 0-3.046-2.264-5.882-7.76-5.882-3.527 0-5.76 2.474-5.76 4.766 0 2.233 1.498 3.258 2.997 3.258 2.851 0 2.91-2.685 2.91-2.835 0-.634-.44-2.625-2.998-2.625 0 0 .059-1.87 2.851-1.87.911 0 1.763.603 1.763 1.78v5.37c0 2.08-.793 3.197-1.028 3.559C66.143 26.269 61 31.035 61 31.035v.694h14.167v-7.994h-.353ZM78.678 32C79.971 32 81 31.035 81 29.255c0-1.75-1.029-2.745-2.322-2.745-1.293 0-2.322.995-2.322 2.745 0 1.78 1.029 2.745 2.322 2.745Z"/></g><g opacity=".5"><path d="M101.896 20.507c1.516-.392 3.368-1.358 3.368-3.801 0-3.952-3.901-4.706-6.427-4.706-3.62.06-5.304 2.262-5.304 4.314 0 1.99 1.291 2.896 2.582 2.896 2.442 0 2.498-2.384 2.498-2.534 0-.573-.365-2.353-2.582-2.353 0 0-.14-1.69 2.89-1.69.786 0 1.516.544 1.516 1.6v2.322c0 1.508.112 3.801-1.487 3.801H97.18v.633h1.74c.87 0 1.572.634 1.572 1.84v6.697c0 1.177-.814 1.78-1.684 1.78-3.367 0-3.003-1.87-3.003-1.87 2.442 0 2.835-1.991 2.835-2.655 0-.12-.028-2.805-2.75-2.805-1.432 0-2.891 1.026-2.891 3.258C93 29.526 94.74 32 98.81 32c5.247 0 7.408-3.047 7.408-6.093 0-2.354-1.179-4.525-4.322-5.4ZM108.783 32c1.235 0 2.217-.965 2.217-2.745 0-1.75-.982-2.745-2.217-2.745s-2.217.995-2.217 2.745c0 1.78.982 2.745 2.217 2.745Z"/></g><g opacity=".5"><path d="M135.935 31.336c-.455 0-.883-.18-.883-1.96v-1.931h2.308v-1.237h-2.308V12h-4.359L123 26.45v.995h6.468v1.93c0 1.78-.399 1.961-.884 1.961h-1.253v.393h9.858v-.393h-1.254Zm-12.08-5.128 5.613-10.679v10.68h-5.613ZM140.749 32c1.254 0 2.251-.965 2.251-2.745 0-1.75-.997-2.745-2.251-2.745s-2.251.995-2.251 2.745c0 1.78.997 2.745 2.251 2.745Z"/></g><path d="M173.073 20.518c-1.888 0-3.392.884-3.392.884v-3.448h8.097l1.587-5.897-.356-.057s-.383 1.111-1.887 1.111h-8.043l-.027 9.202.437.2c1.532-1.453 3.174-1.396 3.475-1.396.848 0 1.504.598 1.504 1.738v6.837c0 1.111-.766 1.653-1.614 1.653-3.283 0-3.118-1.738-3.118-1.738 2.38 0 2.762-1.88 2.762-2.507 0-.143-.027-2.65-2.68-2.65-1.396 0-2.818.94-2.818 3.049 0 2.193 1.86 4.501 5.854 4.501 5.116 0 7.222-2.792 7.222-5.67 0-2.791-1.805-5.811-7.003-5.811ZM182.839 32c1.204 0 2.161-.912 2.161-2.593 0-1.652-.957-2.592-2.161-2.592-1.204 0-2.161.94-2.161 2.592 0 1.681.957 2.593 2.161 2.593Z"/><circle cx="175" cy="22" r="21" fill="none" stroke-width="2"/></svg>
|
|
20
|
+
{% endif %}
|
|
21
|
+
</i>
|
|
22
|
+
{% endmacro %}
|
|
@@ -59,6 +59,8 @@ $ds-color-static-kultur: var(--ds-color-static-kultur);
|
|
|
59
59
|
$ds-color-static-economy: var(--ds-color-static-economy);
|
|
60
60
|
$ds-color-static-sport: var(--ds-color-static-sport);
|
|
61
61
|
$ds-color-static-neutral-200: var(--ds-color-static-neutral-200);
|
|
62
|
+
$ds-color-static-sthlm: var(--ds-color-static-sthlm);
|
|
63
|
+
$ds-color-static-ad-yellow: var(--ds-color-static-ad-yellow);
|
|
62
64
|
$ds-color-gradient-content-fade-left: var(--ds-color-gradient-content-fade-left);
|
|
63
65
|
$ds-color-gradient-content-fade-right: var(--ds-color-gradient-content-fade-right);
|
|
64
66
|
$ds-color-gradient-content-fade-up: var(--ds-color-gradient-content-fade-up);
|
|
@@ -47,14 +47,14 @@ $ds-hex-dark-border-focus-02: #ffffff;
|
|
|
47
47
|
$ds-hex-dark-border-focus-03: #EF7171;
|
|
48
48
|
$ds-hex-dark-border-focus-04: #3A8352;
|
|
49
49
|
$ds-hex-dark-background-primary: #141414;
|
|
50
|
-
$ds-hex-dark-gradient-content-fade: linear-gradient(90deg, #14141400 0%, #141414 100%);
|
|
51
50
|
$ds-hex-dark-gradient-content-fade-left: linear-gradient(90deg, #14141400 0%, #141414 100%);
|
|
52
51
|
$ds-hex-dark-gradient-content-fade-right: linear-gradient(-90deg, #14141400 0%, #141414 100%);
|
|
53
52
|
$ds-hex-dark-gradient-content-fade-up: linear-gradient(180deg, #14141400 0%, #141414 100%);
|
|
53
|
+
$ds-hex-dark-gradient-content-fade-up-down: linear-gradient(0deg, #14141400 0%, #141414 100%);
|
|
54
54
|
$ds-hex-dark-gradient-content-fade-down: linear-gradient(0deg, #14141400 0%, #141414 100%);
|
|
55
55
|
$ds-hex-dark-static-red-200: #FAD4D4;
|
|
56
56
|
$ds-hex-dark-static-black: #141414;
|
|
57
|
-
$ds-hex-dark-static-transparent-black: #
|
|
57
|
+
$ds-hex-dark-static-transparent-black: #14141480;
|
|
58
58
|
$ds-hex-dark-static-white: #ffffff;
|
|
59
59
|
$ds-hex-dark-static-transparent-white: #ffffff80;
|
|
60
60
|
$ds-hex-dark-static-green-100: #CEE4D6;
|
|
@@ -64,3 +64,5 @@ $ds-hex-dark-static-kultur: #568CBB;
|
|
|
64
64
|
$ds-hex-dark-static-economy: #60BCA1;
|
|
65
65
|
$ds-hex-dark-static-sport: #F58D2D;
|
|
66
66
|
$ds-hex-dark-static-neutral-200: #E0E0E0;
|
|
67
|
+
$ds-hex-dark-static-sthlm: #FF589B;
|
|
68
|
+
$ds-hex-dark-static-ad-yellow: #FFEAC2;
|
|
@@ -49,7 +49,7 @@ $ds-hex-border-focus-04: #3A8352;
|
|
|
49
49
|
$ds-hex-background-primary: #ffffff;
|
|
50
50
|
$ds-hex-static-red-200: #FAD4D4;
|
|
51
51
|
$ds-hex-static-black: #141414;
|
|
52
|
-
$ds-hex-static-transparent-black: #
|
|
52
|
+
$ds-hex-static-transparent-black: #14141480;
|
|
53
53
|
$ds-hex-static-white: #ffffff;
|
|
54
54
|
$ds-hex-static-transparent-white: #ffffff80;
|
|
55
55
|
$ds-hex-static-green-100: #CEE4D6;
|
|
@@ -59,6 +59,8 @@ $ds-hex-static-kultur: #568CBB;
|
|
|
59
59
|
$ds-hex-static-economy: #60BCA1;
|
|
60
60
|
$ds-hex-static-sport: #F58D2D;
|
|
61
61
|
$ds-hex-static-neutral-200: #E0E0E0;
|
|
62
|
+
$ds-hex-static-sthlm: #FF589B;
|
|
63
|
+
$ds-hex-static-ad-yellow: #FFEAC2;
|
|
62
64
|
$ds-hex-gradient-content-fade-left: linear-gradient(90deg, #ffffff00 0%, #ffffff 100%);
|
|
63
65
|
$ds-hex-gradient-content-fade-right: linear-gradient(-90deg, #ffffff00 0%, #ffffff 100%);
|
|
64
66
|
$ds-hex-gradient-content-fade-up: linear-gradient(180deg, #ffffff00 0%, #ffffff 100%);
|
package/package.json
CHANGED
|
@@ -60,6 +60,8 @@
|
|
|
60
60
|
"static-economy": "var(--ds-color-static-economy)",
|
|
61
61
|
"static-sport": "var(--ds-color-static-sport)",
|
|
62
62
|
"static-neutral-200": "var(--ds-color-static-neutral-200)",
|
|
63
|
+
"static-sthlm": "var(--ds-color-static-sthlm)",
|
|
64
|
+
"static-ad-yellow": "var(--ds-color-static-ad-yellow)",
|
|
63
65
|
"gradient-content-fade-left": "var(--ds-color-gradient-content-fade-left)",
|
|
64
66
|
"gradient-content-fade-right": "var(--ds-color-gradient-content-fade-right)",
|
|
65
67
|
"gradient-content-fade-up": "var(--ds-color-gradient-content-fade-up)",
|