@bonniernews/dn-design-system-web 21.2.1-beta.0 → 22.0.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 +77 -29
- package/assets/teaser/teaser.scss +1 -32
- package/components/footer/README-NJK.md +75 -0
- package/components/footer/README.md +184 -71
- package/components/game-header/README.md +12 -36
- package/components/group-header/group-header.scss +1 -1
- package/components/spinner/README-NJK.md +37 -0
- package/components/spinner/README.md +10 -33
- package/components/teaser-image/teaser-image.scss +1 -1
- package/components/teaser-large/README.md +0 -1
- package/components/teaser-large/teaser-large.njk +4 -14
- package/components/teaser-large/teaser-large.scss +0 -16
- package/components/teaser-list-vertical/teaser-list-vertical.njk +1 -0
- package/components/teaser-native/teaser-native.njk +3 -5
- package/components/teaser-native/teaser-native.scss +6 -0
- package/components/teaser-onsite/README.md +8 -1
- package/components/teaser-onsite/teaser-onsite.njk +1 -5
- package/components/teaser-package/teaser-package.scss +6 -17
- package/components/teaser-slideshow/teaser-slideshow.scss +1 -1
- package/components/teaser-split/README.md +0 -1
- package/components/teaser-split/teaser-split.njk +3 -7
- package/components/teaser-split/teaser-split.scss +1 -3
- package/components/teaser-standard/README.md +0 -1
- package/components/teaser-standard/teaser-standard.njk +4 -8
- package/components/teaser-standard/teaser-standard.scss +6 -5
- package/foundations/helpers/colors.scss +6 -1
- package/foundations/variables/colorsCssVariables.scss +0 -4
- package/foundations/variables/colorsDnDarkTokens.scss +60 -64
- package/foundations/variables/colorsDnLightTokens.scss +51 -55
- package/foundations/variables/metrics.scss +1 -2
- package/foundations/variables/typographyFontWeight.scss +0 -1
- package/foundations/variables/typographyTokensList.scss +0 -1
- package/foundations/variables/typographyTokensScreenExtraLarge.scss +4 -11
- package/foundations/variables/typographyTokensScreenLarge.scss +3 -10
- package/foundations/variables/typographyTokensScreenSmall.scss +6 -13
- package/index.d.ts +4 -0
- package/package.json +4 -22
- package/preact/components/divider/divider.js +21 -0
- package/preact/components/divider/divider.js.map +7 -0
- package/preact/components/footer/footer.d.ts +33 -0
- package/preact/components/footer/footer.js +68 -0
- package/preact/components/footer/footer.js.map +7 -0
- package/preact/components/footer/logoWithPayoff.d.ts +1 -0
- package/preact/components/footer/logoWithPayoff.js +15 -0
- package/preact/components/footer/logoWithPayoff.js.map +7 -0
- package/preact/components/game-header/game-header.d.ts +18 -0
- package/preact/components/game-header/game-header.js +29 -0
- package/preact/components/game-header/game-header.js.map +7 -0
- package/preact/components/icon-sprite/icon-sprite.d.ts +18 -0
- package/preact/components/icon-sprite/icon-sprite.js +132 -0
- package/preact/components/icon-sprite/icon-sprite.js.map +7 -0
- package/preact/components/icon-with-wrapper/icon-with-wrapper.d.ts +23 -0
- package/{tokens-tmp/colors-css-variables.json → preact/components/icon-with-wrapper/icon-with-wrapper.js} +50 -6
- package/preact/components/icon-with-wrapper/icon-with-wrapper.js.map +7 -0
- package/preact/components/pictogram/pictogram.d.ts +17 -0
- package/preact/components/pictogram/pictogram.js +39 -0
- package/preact/components/pictogram/pictogram.js.map +7 -0
- package/preact/components/quote/quote.js +22 -0
- package/preact/components/quote/quote.js.map +7 -0
- package/preact/components/spinner/spinner.d.ts +16 -0
- package/preact/components/spinner/spinner.js +24 -0
- package/preact/components/spinner/spinner.js.map +7 -0
- package/preact/components/teaser-card/teaser-card.js +25 -0
- package/preact/components/teaser-card/teaser-card.js.map +7 -0
- package/preact/components/teaser-onsite/teaser-onsite.js +56 -0
- package/preact/components/teaser-onsite/teaser-onsite.js.map +7 -0
- package/preact/components/thematic-break/thematic-break.js +20 -0
- package/preact/components/thematic-break/thematic-break.js.map +7 -0
- package/preact/helpers/formatClassString.d.ts +1 -0
- package/tokens/colors-css-variables.json +1 -5
- package/tokens/colors-dark-mode.json +60 -64
- package/tokens/colors-light-mode.json +53 -57
- package/tokens/typography-list.json +0 -1
- package/tsconfig.json +3 -2
- package/types-lib/ds-color.d.ts +100 -0
- package/types-lib/ds-icon.d.ts +96 -0
- package/variables/colors-css-variables.json +18 -27
- package/.release-it-beta.cjs +0 -25
- package/.release-it.cjs +0 -39
- package/components/divider/divider.tsx +0 -28
- package/components/quote/quote.tsx +0 -34
- package/components/teaser-breaking/README-UXD.md +0 -0
- package/components/teaser-breaking/README.md +0 -46
- package/components/teaser-breaking/teaser-breaking.njk +0 -46
- package/components/teaser-breaking/teaser-breaking.scss +0 -52
- package/components/teaser-card/teaser-card.tsx +0 -44
- package/components/teaser-onsite/teaser-onsite.tsx +0 -43
- package/components/thematic-break/thematic-break.tsx +0 -27
- package/helpers/teaser.tsx +0 -32
- package/index.tsx +0 -8
- package/preact/components.cjs +0 -68
- package/preact/components.cjs.map +0 -7
- package/preact/components.esm.js +0 -45
- package/preact/components.esm.js.map +0 -7
- package/preact/index.d.ts +0 -6
- package/react/components/divider/divider.d.ts +0 -14
- package/react/components/quote/quote.d.ts +0 -16
- package/react/components/teaser-card/teaser-card.d.ts +0 -17
- package/react/components/teaser-onsite/teaser-onsite.d.ts +0 -23
- package/react/components/thematic-break/thematic-break.d.ts +0 -13
- package/react/components.cjs +0 -68
- package/react/components.cjs.map +0 -7
- package/react/components.esm.js +0 -45
- package/react/components.esm.js.map +0 -7
- package/react/index.d.ts +0 -6
- package/tokens-tmp/shadows-css-variables.json +0 -6
- package/tokens-tmp/spacing-base-list.json +0 -14
- package/tokens-tmp/spacing-detail-list.json +0 -18
- package/tsconfig-preact.json +0 -12
- package/tsconfig-react.json +0 -11
- /package/components/icon-sprite/{README.md → README-NJK.md} +0 -0
- /package/components/pictogram/{README.md → README-NJK.md} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
- GitHub: [BonnierNews/dn-design-system/../web/src/components/spinner](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/spinner)
|
|
2
|
+
- Storybook: [Spinner](https://designsystem.dn.se/?path=/docs/basic-spinner--docs)
|
|
3
|
+
- Storybook (Latest): [Spinner](https://designsystem-latest.dn.se/?path=/docs/basic-spinner--docs)
|
|
4
|
+
----
|
|
5
|
+
|
|
6
|
+
# Spinner
|
|
7
|
+
|
|
8
|
+
## Parameters
|
|
9
|
+
|
|
10
|
+
|parameter | type | required | options | default | description |
|
|
11
|
+
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
12
|
+
|variant | String | no | brand, onBrand, onBusiness, primary, secondary, staticBlack, staticWhite | primary | Design variant |
|
|
13
|
+
|size| String | no | large, small, xsmall | large | |
|
|
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/spinner/spinner.njk' import Spinner %}
|
|
26
|
+
|
|
27
|
+
{{ Spinner({
|
|
28
|
+
variant: "primary",
|
|
29
|
+
size: "small",
|
|
30
|
+
classNames: "my-spinner-class"
|
|
31
|
+
})}}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### SCSS
|
|
35
|
+
```scss
|
|
36
|
+
@use "@bonniernews/dn-design-system-web/components/spinner/spinner";
|
|
37
|
+
```
|
|
@@ -1,37 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
- Storybook (Latest): [Spinner](https://designsystem-latest.dn.se/?path=/docs/basic-spinner--docs)
|
|
4
|
-
----
|
|
1
|
+
Spinner
|
|
2
|
+
=======
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
* GitHub: [BonnierNews/dn-design-system/../web/src/components/spinner](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/spinner)
|
|
5
|
+
* Storybook: [Spinner](https://designsystem.dn.se/?path=/docs/basic-spinner--docs)
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/spinner/spinner.scss'`
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
12
|
-
|variant | String | no | brand, onBrand, onBusiness, primary, secondary, staticBlack, staticWhite | primary | Design variant |
|
|
13
|
-
|size| String | no | large, small, xsmall | large | |
|
|
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 |
|
|
9
|
+
<table class="docblock-argstable sb-unstyled css-v2ifgj"><thead class="docblock-argstable-head"><tr><th><span>Name</span></th><th><span>Description</span></th><th><span>Default</span></th></tr></thead><tbody class="docblock-argstable-body"><tr><td class="css-4lbn0a"><span class="css-in3yi3">variant</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">"brand"</span><span class="css-o1d7ko">"secondary"</span><span class="css-o1d7ko">"primary"</span><span class="css-o1d7ko">"onBrand"</span><span class="css-o1d7ko">"onBusiness"</span><span class="css-o1d7ko">"staticBlack"</span><span class="css-o1d7ko">"staticWhite"</span></div></div></td><td><div class="css-13nzt7e"><span class="css-o1d7ko">"primary"</span></div></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">size</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">"large"</span><span class="css-o1d7ko">"small"</span><span class="css-o1d7ko">"xsmall"</span></div></div></td><td><div class="css-13nzt7e"><span class="css-o1d7ko">"large"</span></div></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">forcePx</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">boolean</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">classNames</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">attributes</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">object</span></div></div></td><td><span>-</span></td></tr></tbody></table>
|
|
17
10
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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/spinner/spinner.njk' import Spinner %}
|
|
26
|
-
|
|
27
|
-
{{ Spinner({
|
|
28
|
-
variant: "primary",
|
|
29
|
-
size: "small",
|
|
30
|
-
classNames: "my-spinner-class"
|
|
31
|
-
})}}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### SCSS
|
|
35
|
-
```scss
|
|
36
|
-
@use "@bonniernews/dn-design-system-web/components/spinner/spinner";
|
|
37
|
-
```
|
|
11
|
+
<pre class="prismjs css-4zr3vl"><div class="language-jsx css-zye6j" style="white-space: pre;"><span class="token tag punctuation"><</span><span class="token tag class-name">Spinner</span><span class="token tag">
|
|
12
|
+
</span><span class="token tag"> </span><span class="token tag attr-name">size</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value punctuation">"</span><span class="token tag attr-value">large</span><span class="token tag attr-value punctuation">"</span><span class="token tag">
|
|
13
|
+
</span><span class="token tag"> </span><span class="token tag attr-name">variant</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value punctuation">"</span><span class="token tag attr-value">primary</span><span class="token tag attr-value punctuation">"</span><span class="token tag">
|
|
14
|
+
</span><span class="token tag"></span><span class="token tag punctuation">/></span></div></pre>
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
|vignette | String | no | | | Top text in the teaser |
|
|
20
20
|
|highlight | String | no | | | Text before the heading |
|
|
21
21
|
|sticker | String | no | | | Red text before the text |
|
|
22
|
-
|grade | String | no | | | zero, one, two, three, four, five, none |
|
|
23
22
|
|mediaHtml | HTML String | no | | | Main image or other media |
|
|
24
23
|
|bylineHtml | HTML String | no | | | Side image of the author |
|
|
25
24
|
|isItalicHeadline | bool | no | true, false | false | If the headline should be italic |
|
|
@@ -13,17 +13,11 @@
|
|
|
13
13
|
{% set italicsClass = "ds-teaser--large-big-italic" if params.isLargeHeadline and params.areaType !== "right" else "ds-teaser--large-italic" %}
|
|
14
14
|
{% endif %}
|
|
15
15
|
|
|
16
|
-
{# Hide top border if there is media and it's not a compact version. Compact is overruled by italic, if italic we must hide border because we shouldn't change anything related to åsikt #}
|
|
17
|
-
{% set hideTopBorder = false %}
|
|
18
|
-
{% if params.mediaHtml and (params.isItalicHeadline or not params.isCompact) %}
|
|
19
|
-
{% set hideTopBorder = true %}
|
|
20
|
-
{% endif %}
|
|
21
|
-
|
|
22
16
|
{% set extraClasses = [
|
|
23
17
|
"ds-teaser--large",
|
|
24
18
|
classNamePrefix + params.variant if params.variant,
|
|
25
19
|
classNamePrefix + "quote-badge" if isQuoteBadge,
|
|
26
|
-
classNamePrefix + '
|
|
20
|
+
classNamePrefix + 'top-img' if params.mediaHtml,
|
|
27
21
|
italicsClass if italicsClass,
|
|
28
22
|
classNamePrefix + "compact" if params.isCompact,
|
|
29
23
|
params.classNames if params.classNames
|
|
@@ -37,11 +31,7 @@
|
|
|
37
31
|
classNames: extraClasses
|
|
38
32
|
}) %}
|
|
39
33
|
{% if params.mediaHtml %}
|
|
40
|
-
{
|
|
41
|
-
componentClassName + '__media',
|
|
42
|
-
componentClassName + '__media--rounded' if params.isCompact and not params.isItalicHeadline
|
|
43
|
-
] | join(" ") %}
|
|
44
|
-
<div class="{{ mediaClass }}">
|
|
34
|
+
<div class="{{ componentClassName + '__media'}}">
|
|
45
35
|
{{ params.mediaHtml }}
|
|
46
36
|
{% if params.isLocked %}
|
|
47
37
|
{{ VipBadge({
|
|
@@ -73,9 +63,9 @@
|
|
|
73
63
|
</h2>
|
|
74
64
|
|
|
75
65
|
{% if params.text and params.areaType !== "right" %}
|
|
76
|
-
<p class="{{ componentClassName + '__text' }}
|
|
66
|
+
<p class="{{ componentClassName + '__text' }}">
|
|
67
|
+
{{ TeaserDot({ flashing: params.isFlashingDot }) }}
|
|
77
68
|
{% if params.sticker %}
|
|
78
|
-
{{ TeaserDot({ flashing: params.isFlashingDot }) }}
|
|
79
69
|
<span class="ds-teaser__sticker">
|
|
80
70
|
{{ params.sticker }}
|
|
81
71
|
</span>
|
|
@@ -32,10 +32,6 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.ds-teaser__vignette {
|
|
36
|
-
margin-top: ds-spacing($ds-s-025);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
35
|
.ds-teaser__title {
|
|
40
36
|
@include ds-typography($ds-typography-detailteaser-large);
|
|
41
37
|
}
|
|
@@ -69,7 +65,6 @@
|
|
|
69
65
|
position: relative;
|
|
70
66
|
margin-left: ds-spacing($ds-s-100);
|
|
71
67
|
margin-bottom: ds-spacing($ds-s-100, "px", true);
|
|
72
|
-
margin-top: ds-spacing($ds-s-025);
|
|
73
68
|
|
|
74
69
|
.picture {
|
|
75
70
|
position: absolute;
|
|
@@ -111,17 +106,6 @@
|
|
|
111
106
|
&.ds-teaser--large-big-italic .ds-teaser__title {
|
|
112
107
|
@include ds-typography($ds-typography-detailteaser-large-compact-opinion);
|
|
113
108
|
}
|
|
114
|
-
|
|
115
|
-
&:not(.ds-teaser--large-italic):not(.ds-teaser--large-big-italic) {
|
|
116
|
-
.ds-teaser__media {
|
|
117
|
-
margin: ds-spacing($ds-s-100 $ds-s-100 0 $ds-s-100);
|
|
118
|
-
width: calc(100% - ds-spacing($ds-s-200));
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.ds-teaser-dot {
|
|
122
|
-
display: none;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
109
|
}
|
|
126
110
|
|
|
127
111
|
@include ds-mq-smallest-breakpoint(tablet) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{% from '@bonniernews/dn-design-system-web/njk-helpers/attributes.njk' import getAttributes %}
|
|
2
2
|
{% from '@bonniernews/dn-design-system-web/components/button/button.njk' import Button %}
|
|
3
3
|
{% from '@bonniernews/dn-design-system-web/components/group-header/group-header.njk' import GroupHeader %}
|
|
4
|
+
{% from '@bonniernews/dn-design-system-web/components/teaser-dot/teaser-dot.njk' import TeaserDot %}
|
|
4
5
|
{% from '@bonniernews/dn-design-system-web/components/icon-sprite/icon-sprite.njk' import IconUse %}
|
|
5
6
|
{% from '@bonniernews/dn-design-system-web/components/teaser-footer/teaser-footer.njk' import TeaserFooter %}
|
|
6
7
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{% from '@bonniernews/dn-design-system-web/components/teaser-card/teaser-card.njk' import TeaserCard %}
|
|
2
|
+
{% from '@bonniernews/dn-design-system-web/components/teaser-dot/teaser-dot.njk' import TeaserDot %}
|
|
2
3
|
|
|
3
4
|
{% macro TeaserNative(params) %}
|
|
4
5
|
{% set componentClassName = "ds-teaser" %}
|
|
@@ -28,11 +29,7 @@
|
|
|
28
29
|
|
|
29
30
|
<div class="{{ componentClassName + '__content'}}">
|
|
30
31
|
{% if params.mediaHtml and nativeVariant == "standard" %}
|
|
31
|
-
{
|
|
32
|
-
componentClassName + '__media',
|
|
33
|
-
componentClassName + '__media--rounded'
|
|
34
|
-
] | join(" ") %}
|
|
35
|
-
<div class="{{ mediaClass }}">
|
|
32
|
+
<div class="{{ componentClassName + '__media'}}">
|
|
36
33
|
{{ params.mediaHtml }}
|
|
37
34
|
</div>
|
|
38
35
|
{% endif %}
|
|
@@ -47,6 +44,7 @@
|
|
|
47
44
|
|
|
48
45
|
{% if params.text and nativeVariant !== "right" %}
|
|
49
46
|
<p class="{{ componentClassName + '__text' }}">
|
|
47
|
+
{{- TeaserDot() -}}
|
|
50
48
|
{{- params.text -}}
|
|
51
49
|
</p>
|
|
52
50
|
{% endif %}
|
|
@@ -10,4 +10,11 @@ In the CMS title will be set to a location like "Kiev, Ukraina" or "USA" and tex
|
|
|
10
10
|
|
|
11
11
|
The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use '@bonniernews/dn-design-system-web/components/teaser-onsite/teaser-onsite.scss'`
|
|
12
12
|
|
|
13
|
-
<table class="docblock-argstable sb-unstyled css-v2ifgj"><thead class="docblock-argstable-head"><tr><th><span>Name</span></th><th><span>Description</span></th><th><span>Default</span></th></tr></thead><tbody class="docblock-argstable-body"><tr><td class="css-4lbn0a"><span class="css-in3yi3">areaType</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">"right"</span><span class="css-o1d7ko">"bauta"</span><span class="css-o1d7ko">"bautaxl"</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">targetLink</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">theme</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">"kultur"</span><span class="css-o1d7ko">"nyheter"</span><span class="css-o1d7ko">"sport"</span><span class="css-o1d7ko">"ekonomi"</span><span class="css-o1d7ko">"sthlm"</span></div></div></td><td><div class="css-13nzt7e"><span class="css-o1d7ko">"nyheter"</span></div></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">classNames</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">attributes</span></td><td><div class="css-18pz2h2"><span>Ex. { target: "_blank", "data-test": "lorem ipsum" }</span></div><div class="css-1ije3e2"><div class="css-13nzt7e"><span class="css-o1d7ko">object</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">mediaHtml</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">title</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">text</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr></tbody></table>
|
|
13
|
+
<table class="docblock-argstable sb-unstyled css-v2ifgj"><thead class="docblock-argstable-head"><tr><th><span>Name</span></th><th><span>Description</span></th><th><span>Default</span></th></tr></thead><tbody class="docblock-argstable-body"><tr><td class="css-4lbn0a"><span class="css-in3yi3">areaType</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">"right"</span><span class="css-o1d7ko">"bauta"</span><span class="css-o1d7ko">"bautaxl"</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">targetLink</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">theme</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">"kultur"</span><span class="css-o1d7ko">"nyheter"</span><span class="css-o1d7ko">"sport"</span><span class="css-o1d7ko">"ekonomi"</span><span class="css-o1d7ko">"sthlm"</span></div></div></td><td><div class="css-13nzt7e"><span class="css-o1d7ko">"nyheter"</span></div></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">classNames</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">attributes</span></td><td><div class="css-18pz2h2"><span>Ex. { target: "_blank", "data-test": "lorem ipsum" }</span></div><div class="css-1ije3e2"><div class="css-13nzt7e"><span class="css-o1d7ko">object</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">mediaHtml</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">title</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr><tr><td class="css-4lbn0a"><span class="css-in3yi3">text</span></td><td><div class="css-1f9domv"><div class="css-13nzt7e"><span class="css-o1d7ko">string</span></div></div></td><td><span>-</span></td></tr></tbody></table>
|
|
14
|
+
|
|
15
|
+
<pre class="prismjs css-4zr3vl"><div class="language-jsx css-zye6j" style="white-space: pre;"><span class="token tag punctuation"><</span><span class="token tag class-name">TeaserOnSite</span><span class="token tag">
|
|
16
|
+
</span><span class="token tag"> </span><span class="token tag attr-name">mediaHtml="<figure</span><span class="token tag"> </span><span class="token tag attr-name">class</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag attr-value">ds-teaser-image</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag punctuation">></span><span class="token tag attr-name"><div</span><span class="token tag"> </span><span class="token tag attr-name">class</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag attr-value">picture</span><span class="token tag"> </span><span class="token tag attr-name">picture--placeholder&quot;</span><span class="token tag"> </span><span class="token tag special-attr attr-name">style</span><span class="token tag special-attr attr-value punctuation attr-equals">=</span><span class="token tag special-attr attr-value value css language-css">&quot</span><span class="token tag special-attr attr-value value css language-css punctuation">;</span><span class="token tag special-attr attr-value value css language-css property">aspect-ratio</span><span class="token tag special-attr attr-value value css language-css punctuation">:</span><span class="token tag"> </span><span class="token tag attr-name">1</span><span class="token tag"> / </span><span class="token tag attr-name">1;&quot;</span><span class="token tag punctuation">></span><span class="token tag attr-name"><img</span><span class="token tag"> </span><span class="token tag attr-name">class</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag attr-value">picture__img</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag"> </span><span class="token tag attr-name">src</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag attr-value">https://cached-images.bonnier.news/gcs/bilder-lab/dn-mly/d5e4cd87-61a5-40fc-8060-c4ad5019a9f3.jpeg?interpolation=lanczos-none</span><span class="token tag attr-value entity named-entity">&amp;</span><span class="token tag attr-value">fit=around%7C56:56</span><span class="token tag attr-value entity named-entity">&amp;</span><span class="token tag attr-value">crop=56:h;center,top</span><span class="token tag attr-value entity named-entity">&amp;</span><span class="token tag attr-value">output-quality=80</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag"> </span><span class="token tag attr-name">alt</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag"> </span><span class="token tag attr-name">aria-hidden</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag attr-value">true</span><span class="token tag attr-value entity named-entity">&quot;</span><span class="token tag punctuation">></span><span class="token tag attr-name"><</span><span class="token tag">/</span><span class="token tag attr-name">div</span><span class="token tag punctuation">></span><span class="token tag attr-name"><</span><span class="token tag">/</span><span class="token tag attr-name">figure</span><span class="token tag punctuation">></span><span class="token tag attr-name">"</span><span class="token tag">
|
|
17
|
+
</span><span class="token tag"> </span><span class="token tag attr-name">targetLink</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value punctuation">"</span><span class="token tag attr-value">https://www.dn.se/varlden/har-forvarades-atombomber-under-kalla-kriget-nu-ar-flygbasen-pa-azorerna-ater-het-for-stormakterna/</span><span class="token tag attr-value punctuation">"</span><span class="token tag">
|
|
18
|
+
</span><span class="token tag"> </span><span class="token tag attr-name">text</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value punctuation">"</span><span class="token tag attr-value">Henrik Brandão Jönsson och Eduardo Leal</span><span class="token tag attr-value punctuation">"</span><span class="token tag">
|
|
19
|
+
</span><span class="token tag"> </span><span class="token tag attr-name">title</span><span class="token tag attr-value punctuation attr-equals">=</span><span class="token tag attr-value punctuation">"</span><span class="token tag attr-value">Azorerna</span><span class="token tag attr-value punctuation">"</span><span class="token tag">
|
|
20
|
+
</span><span class="token tag"></span><span class="token tag punctuation">/></span></div></pre>
|
|
@@ -14,11 +14,7 @@
|
|
|
14
14
|
classNames: classes
|
|
15
15
|
}) %}
|
|
16
16
|
{% if params.mediaHtml %}
|
|
17
|
-
{
|
|
18
|
-
componentClassName + '__media',
|
|
19
|
-
componentClassName + '__media--rounded'
|
|
20
|
-
] | join(" ") %}
|
|
21
|
-
<div class="{{ mediaClass }}">
|
|
17
|
+
<div class="{{ componentClassName + '__media'}}">
|
|
22
18
|
{{ params.mediaHtml }}
|
|
23
19
|
</div>
|
|
24
20
|
{% endif %}
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
background-color: $ds-color-border-primary;
|
|
18
18
|
position: absolute;
|
|
19
19
|
display: block;
|
|
20
|
-
clear: both; // Clears floating media in standard-teaser
|
|
21
20
|
top: 0;
|
|
22
21
|
left: 0;
|
|
23
22
|
right: 0;
|
|
@@ -27,22 +26,12 @@
|
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
// first-child only triggers if there is no vignette
|
|
30
|
-
.ds-teaser--
|
|
29
|
+
.ds-teaser--top-img::after,
|
|
31
30
|
> .ds-split-container:first-child::after,
|
|
32
31
|
> .ds-teaser:first-child::after {
|
|
33
32
|
display: none;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
.ds-teaser--breaking + .ds-teaser--hide-top-border {
|
|
37
|
-
&::after {
|
|
38
|
-
display: block; // Override `display:none to make border visible
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.ds-teaser__media {
|
|
42
|
-
margin-top: ds-spacing($ds-s-100);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
35
|
&::after {
|
|
47
36
|
content: "";
|
|
48
37
|
position: absolute;
|
|
@@ -58,22 +47,22 @@
|
|
|
58
47
|
}
|
|
59
48
|
|
|
60
49
|
&.ds-teaser-package--bauta {
|
|
61
|
-
background-color: $
|
|
50
|
+
background-color: $bauta-surface-color;
|
|
62
51
|
|
|
63
52
|
& .ds-teaser,
|
|
64
53
|
& .ds-teaser--slideshow {
|
|
65
|
-
background-color: $
|
|
54
|
+
background-color: $bauta-surface-color;
|
|
66
55
|
}
|
|
67
56
|
|
|
68
57
|
.ds-split-container {
|
|
69
|
-
background-color: $
|
|
58
|
+
background-color: $bauta-surface-color;
|
|
70
59
|
&::after {
|
|
71
|
-
background-color: $
|
|
60
|
+
background-color: $updated-color-border-primary;
|
|
72
61
|
}
|
|
73
62
|
}
|
|
74
63
|
|
|
75
64
|
& > .ds-teaser::after {
|
|
76
|
-
background-color: $
|
|
65
|
+
background-color: $updated-color-border-primary;
|
|
77
66
|
}
|
|
78
67
|
}
|
|
79
68
|
}
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
|vignette | String | no | | | Top text in the teaser |
|
|
20
20
|
|highlight | String | no | | | Text before the heading |
|
|
21
21
|
|sticker | String | no | | | Red text before the text |
|
|
22
|
-
|grade | String | no | | | zero, one, two, three, four, five, none |
|
|
23
22
|
|mediaHtml | HTML String | no | | | Main image or other media |
|
|
24
23
|
|isFlashingDot | bool | no | true, false | false | If there should be a flashing ball before the text |
|
|
25
24
|
|isLocked | bool | no | true, false | false | If the paywall indicator should be shown. It is only shown if the teaser has an image. |
|
|
@@ -23,11 +23,7 @@
|
|
|
23
23
|
classNames: extraClasses
|
|
24
24
|
}) %}
|
|
25
25
|
{% if params.mediaHtml %}
|
|
26
|
-
{
|
|
27
|
-
componentClassName + '__media',
|
|
28
|
-
componentClassName + '__media--rounded'
|
|
29
|
-
] | join(" ") %}
|
|
30
|
-
<div class="{{ mediaClass }}">
|
|
26
|
+
<div class="{{ componentClassName + '__media'}}">
|
|
31
27
|
{{ params.mediaHtml }}
|
|
32
28
|
{% if params.isLocked %}
|
|
33
29
|
{{ VipBadge({
|
|
@@ -55,9 +51,9 @@
|
|
|
55
51
|
</h2>
|
|
56
52
|
|
|
57
53
|
{% if params.text %}
|
|
58
|
-
<p class="{{ componentClassName + '__text' }}
|
|
54
|
+
<p class="{{ componentClassName + '__text' }}">
|
|
55
|
+
{{ TeaserDot({ flashing: params.isFlashingDot }) }}
|
|
59
56
|
{% if params.sticker %}
|
|
60
|
-
{{ TeaserDot({ flashing: params.isFlashingDot }) }}
|
|
61
57
|
<span class="ds-teaser__sticker">
|
|
62
58
|
{{ params.sticker }}
|
|
63
59
|
</span>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&.ds-split-container--bauta {
|
|
26
|
-
background-color: $
|
|
26
|
+
background-color: $bauta-surface-color;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.ds-teaser--split {
|
|
@@ -74,8 +74,6 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.ds-teaser__media {
|
|
77
|
-
margin-top: ds-spacing($ds-s-025);
|
|
78
|
-
|
|
79
77
|
.ds-teaser-image__byline {
|
|
80
78
|
@include ds-typography($ds-typography-functionalmeta01, $forcePx: true, $lineHeight: $ds-lineheight-l);
|
|
81
79
|
}
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
|vignette | String | no | | | Top text in the teaser |
|
|
20
20
|
|highlight | String | no | | | Text before the heading |
|
|
21
21
|
|sticker | String | no | | | Red text before the text |
|
|
22
|
-
|grade | String | no | | | zero, one, two, three, four, five, none |
|
|
23
22
|
|mediaHtml | HTML String | no | | | Main image or other media |
|
|
24
23
|
|isItalicHeadline | bool | no | true, false | false | If the headline should be italic |
|
|
25
24
|
|isCompact | bool | no | true, false | false | If the headline should be compact |
|
|
@@ -33,12 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
<div class="{{ componentClassName + '__content'}}">
|
|
35
35
|
{% if params.mediaHtml %}
|
|
36
|
-
{
|
|
37
|
-
componentClassName + '__media',
|
|
38
|
-
componentClassName + '__media--rounded' if not params.isItalicHeadline,
|
|
39
|
-
componentClassName + '__media--square-image' if params.isSquareImage
|
|
40
|
-
] | join(" ") %}
|
|
41
|
-
<div class="{{ mediaClass }}">
|
|
36
|
+
<div class="{{ componentClassName + '__media'}} {{ componentClassName + '__media--square-image' if params.isSquareImage}}">
|
|
42
37
|
{{ params.mediaHtml }}
|
|
43
38
|
{% if params.isLocked %}
|
|
44
39
|
{{ VipBadge({
|
|
@@ -65,9 +60,10 @@
|
|
|
65
60
|
</h2>
|
|
66
61
|
|
|
67
62
|
{% if params.text and params.areaType !== "right" %}
|
|
68
|
-
<p class="{{ componentClassName + '__text' }}
|
|
63
|
+
<p class="{{ componentClassName + '__text' }}">
|
|
64
|
+
{{ TeaserDot({ flashing: params.isFlashingDot }) }}
|
|
65
|
+
|
|
69
66
|
{% if params.sticker %}
|
|
70
|
-
{{ TeaserDot({ flashing: params.isFlashingDot }) }}
|
|
71
67
|
<span class="ds-teaser__sticker">
|
|
72
68
|
{{ params.sticker }}
|
|
73
69
|
</span>
|
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
padding: ds-spacing($ds-s-075 $ds-s-100 0);
|
|
6
6
|
overflow: hidden;
|
|
7
7
|
|
|
8
|
-
.ds-teaser__vignette {
|
|
9
|
-
margin-top: ds-spacing($ds-s-025);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
8
|
.ds-teaser__title {
|
|
13
9
|
@include ds-typography($ds-typography-detailteaser-standard);
|
|
14
10
|
|
|
@@ -32,12 +28,17 @@
|
|
|
32
28
|
margin-bottom: ds-spacing($ds-s-100);
|
|
33
29
|
}
|
|
34
30
|
|
|
31
|
+
&::after {
|
|
32
|
+
content: "";
|
|
33
|
+
display: block;
|
|
34
|
+
clear: both;
|
|
35
|
+
}
|
|
36
|
+
|
|
35
37
|
.ds-teaser__content {
|
|
36
38
|
display: block;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
.ds-teaser__media {
|
|
40
|
-
margin-top: ds-spacing($ds-s-025);
|
|
41
42
|
margin-bottom: ds-spacing($ds-s-100);
|
|
42
43
|
margin-left: ds-spacing($ds-s-100);
|
|
43
44
|
float: right;
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
@use "../variables/colorsDnLightTokens";
|
|
7
7
|
@use "../variables/colorsDnDarkTokens";
|
|
8
8
|
|
|
9
|
+
// Temporary variables before we update tokens
|
|
10
|
+
$bauta-surface-color: #360003;
|
|
11
|
+
$updated-color-border-primary: #ffffff19;
|
|
12
|
+
// end of temporary variables
|
|
13
|
+
|
|
9
14
|
$ds-theme-color: var(--ds-theme-color);
|
|
10
15
|
|
|
11
16
|
@mixin get-dark-color-scheme() {
|
|
@@ -17,7 +22,7 @@ $ds-theme-color: var(--ds-theme-color);
|
|
|
17
22
|
--ds-theme-color: #{$ds-color-component-brand};
|
|
18
23
|
|
|
19
24
|
.ds-theme--nyheter {
|
|
20
|
-
--ds-theme-color: #{$ds-color-
|
|
25
|
+
--ds-theme-color: #{$ds-color-component-brand};
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
.ds-theme--ekonomi {
|
|
@@ -11,7 +11,6 @@ $ds-color-text-brand: var(--ds-color-text-brand);
|
|
|
11
11
|
$ds-color-text-body-link: var(--ds-color-text-body-link);
|
|
12
12
|
$ds-color-text-body-link-visited: var(--ds-color-text-body-link-visited);
|
|
13
13
|
$ds-color-text-positive: var(--ds-color-text-positive);
|
|
14
|
-
$ds-color-text-culture: var(--ds-color-text-culture);
|
|
15
14
|
$ds-color-icon-primary: var(--ds-color-icon-primary);
|
|
16
15
|
$ds-color-icon-primary-02: var(--ds-color-icon-primary-02);
|
|
17
16
|
$ds-color-icon-secondary: var(--ds-color-icon-secondary);
|
|
@@ -22,7 +21,6 @@ $ds-color-icon-on-business: var(--ds-color-icon-on-business);
|
|
|
22
21
|
$ds-color-icon-brand: var(--ds-color-icon-brand);
|
|
23
22
|
$ds-color-icon-on-critical: var(--ds-color-icon-on-critical);
|
|
24
23
|
$ds-color-icon-on-success: var(--ds-color-icon-on-success);
|
|
25
|
-
$ds-color-icon-culture: var(--ds-color-icon-culture);
|
|
26
24
|
$ds-color-component-brand: var(--ds-color-component-brand);
|
|
27
25
|
$ds-color-component-business: var(--ds-color-component-business);
|
|
28
26
|
$ds-color-component-primary: var(--ds-color-component-primary);
|
|
@@ -47,7 +45,6 @@ $ds-color-surface-korsord: var(--ds-color-surface-korsord);
|
|
|
47
45
|
$ds-color-surface-sudoko: var(--ds-color-surface-sudoko);
|
|
48
46
|
$ds-color-surface-brand: var(--ds-color-surface-brand);
|
|
49
47
|
$ds-color-surface-inverted: var(--ds-color-surface-inverted);
|
|
50
|
-
$ds-color-surface-breaking: var(--ds-color-surface-breaking);
|
|
51
48
|
$ds-color-border-primary: var(--ds-color-border-primary);
|
|
52
49
|
$ds-color-border-primary-02: var(--ds-color-border-primary-02);
|
|
53
50
|
$ds-color-border-primary-03: var(--ds-color-border-primary-03);
|
|
@@ -59,7 +56,6 @@ $ds-color-border-focus-02: var(--ds-color-border-focus-02);
|
|
|
59
56
|
$ds-color-border-focus-03: var(--ds-color-border-focus-03);
|
|
60
57
|
$ds-color-border-focus-04: var(--ds-color-border-focus-04);
|
|
61
58
|
$ds-color-border-brand: var(--ds-color-border-brand);
|
|
62
|
-
$ds-color-border-culture: var(--ds-color-border-culture);
|
|
63
59
|
$ds-color-background-primary: var(--ds-color-background-primary);
|
|
64
60
|
$ds-color-static-red-100: var(--ds-color-static-red-100);
|
|
65
61
|
$ds-color-static-black: var(--ds-color-static-black);
|