@bonniernews/dn-design-system-web 21.1.0-beta.5 → 21.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -47
- package/assets/teaser/teaser.scss +0 -1
- package/components/divider/divider.tsx +6 -6
- package/components/group-header/group-header.scss +1 -1
- package/components/link-box/link-box.scss +2 -1
- package/components/quote/quote.tsx +7 -3
- package/components/teaser-card/teaser-card.tsx +36 -0
- package/components/teaser-image/teaser-image.scss +1 -1
- package/components/teaser-large/teaser-large.njk +1 -7
- package/components/teaser-large/teaser-large.scss +0 -20
- package/components/teaser-native/teaser-native.scss +6 -0
- package/components/teaser-onsite/teaser-onsite.tsx +32 -0
- package/components/teaser-package/teaser-package.scss +6 -17
- package/components/teaser-split/teaser-split.scss +0 -2
- package/components/teaser-standard/teaser-standard.scss +6 -5
- package/components/thematic-break/thematic-break.tsx +5 -4
- 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/helpers/formatClassString.ts +3 -0
- package/helpers/teaser.tsx +30 -0
- package/package.json +2 -1
- package/preact/components/quote/quote.d.ts +1 -0
- package/preact/components/teaser-card/teaser-card.d.ts +10 -0
- package/preact/components/teaser-onsite/teaser-onsite.d.ts +12 -0
- package/preact/components.cjs +14 -12
- package/preact/components.cjs.map +3 -3
- package/preact/components.esm.js +14 -12
- package/preact/components.esm.js.map +3 -3
- package/react/components/quote/quote.d.ts +1 -0
- package/react/components/teaser-card/teaser-card.d.ts +10 -0
- package/react/components/teaser-onsite/teaser-onsite.d.ts +12 -0
- package/react/components.cjs +14 -12
- package/react/components.cjs.map +3 -3
- package/react/components.esm.js +14 -12
- package/react/components.esm.js.map +3 -3
- 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/tokens-tmp/colors-css-variables.json +3 -0
- 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
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"text-body-link": "var(--ds-color-text-body-link)",
|
|
13
13
|
"text-body-link-visited": "var(--ds-color-text-body-link-visited)",
|
|
14
14
|
"text-positive": "var(--ds-color-text-positive)",
|
|
15
|
+
"text-culture": "var(--ds-color-text-culture)",
|
|
15
16
|
"icon-primary": "var(--ds-color-icon-primary)",
|
|
16
17
|
"icon-primary-02": "var(--ds-color-icon-primary-02)",
|
|
17
18
|
"icon-secondary": "var(--ds-color-icon-secondary)",
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
"icon-brand": "var(--ds-color-icon-brand)",
|
|
23
24
|
"icon-on-critical": "var(--ds-color-icon-on-critical)",
|
|
24
25
|
"icon-on-success": "var(--ds-color-icon-on-success)",
|
|
26
|
+
"icon-culture": "var(--ds-color-icon-culture)",
|
|
25
27
|
"component-brand": "var(--ds-color-component-brand)",
|
|
26
28
|
"component-business": "var(--ds-color-component-business)",
|
|
27
29
|
"component-primary": "var(--ds-color-component-primary)",
|
|
@@ -58,6 +60,7 @@
|
|
|
58
60
|
"border-focus-03": "var(--ds-color-border-focus-03)",
|
|
59
61
|
"border-focus-04": "var(--ds-color-border-focus-04)",
|
|
60
62
|
"border-brand": "var(--ds-color-border-brand)",
|
|
63
|
+
"border-culture": "var(--ds-color-border-culture)",
|
|
61
64
|
"background-primary": "var(--ds-color-background-primary)",
|
|
62
65
|
"static-red-100": "var(--ds-color-static-red-100)",
|
|
63
66
|
"static-black": "var(--ds-color-static-black)",
|
|
File without changes
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
- GitHub: [BonnierNews/dn-design-system/../web/src/components/teaser-breaking](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/teaser-breaking)
|
|
2
|
-
- Storybook: [TeaserBreaking](https://designsystem.dn.se/?path=/docs/section-teaserbreaking--docs)
|
|
3
|
-
- Storybook (Latest): [TeaserBreaking](https://designsystem-latest.dn.se/?path=/docs/section-teaserbreaking--docs)
|
|
4
|
-
|
|
5
|
-
----
|
|
6
|
-
|
|
7
|
-
# teaser-breaking
|
|
8
|
-
|
|
9
|
-
This teaser never has a lock-symbol/vip-badge
|
|
10
|
-
|
|
11
|
-
## Parameters
|
|
12
|
-
|
|
13
|
-
|parameter | type | required | options | default | description |
|
|
14
|
-
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
15
|
-
|title | String | yes | | | Heading of the teaser |
|
|
16
|
-
|targetLink | String | yes | | | Target URL for the teaser |
|
|
17
|
-
|areaType | String | no | "right" or "bauta" | | The area where the column is rendered |
|
|
18
|
-
|theme | String | no | nyheter, kultur, ekonomi, sport, sthlm | (empty) | The theme-class to apply to the teaser |
|
|
19
|
-
|text | String | no | | | Teaser subtext |
|
|
20
|
-
|vignette | String | no | | | Top text in the teaser |
|
|
21
|
-
|highlight | String | no | | | Text before the heading |
|
|
22
|
-
|mediaHtml | HTML String | no | | | Main image or other media |
|
|
23
|
-
|attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
|
|
24
|
-
|classNames | String | no | | | Ex. "my-special-class" |
|
|
25
|
-
|~forcePx~ | | | | | Not supported |
|
|
26
|
-
|
|
27
|
-
## Minimum requirement example
|
|
28
|
-
|
|
29
|
-
### Nunjucks
|
|
30
|
-
|
|
31
|
-
These are copy paste friendly examples to quickliy get started using a component.
|
|
32
|
-
|
|
33
|
-
```html
|
|
34
|
-
{% from '@bonniernews/dn-design-system-web/components/teaser-breaking/teaser-breaking.njk' import TeaserBreaking %}
|
|
35
|
-
|
|
36
|
-
{{ TeaserBreaking({
|
|
37
|
-
title: "Upp på börsen",
|
|
38
|
-
text: "Det ser ganska normalt ut på Stockholmsbörsen.",
|
|
39
|
-
highlight: "Ekonominytt:"
|
|
40
|
-
})}}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### SCSS
|
|
44
|
-
```scss
|
|
45
|
-
@use "@bonniernews/dn-design-system-web/components/teaser-breaking/teaser-breaking" as *;
|
|
46
|
-
```
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{% from '@bonniernews/dn-design-system-web/components/teaser-card/teaser-card.njk' import TeaserCard %}
|
|
2
|
-
|
|
3
|
-
{% macro TeaserBreaking(params) %}
|
|
4
|
-
{% set componentClassName = "ds-teaser" %}
|
|
5
|
-
{% set classNamePrefix = componentClassName + "--" %}
|
|
6
|
-
|
|
7
|
-
{% set extraClasses = [
|
|
8
|
-
"ds-teaser--breaking",
|
|
9
|
-
params.classNames if params.classNames
|
|
10
|
-
] | join(" ") %}
|
|
11
|
-
|
|
12
|
-
{% call TeaserCard({
|
|
13
|
-
targetLink: params.targetLink,
|
|
14
|
-
areaType: params.areaType,
|
|
15
|
-
theme: params.theme,
|
|
16
|
-
attributes: params.attributes,
|
|
17
|
-
classNames: extraClasses
|
|
18
|
-
}) %}
|
|
19
|
-
<div class="{{ componentClassName + '__content'}}">
|
|
20
|
-
<div class="ds-teaser__content-inner">
|
|
21
|
-
{% if params.vignette %}
|
|
22
|
-
<div class="ds-teaser__vignette">
|
|
23
|
-
{{ params.vignette }}
|
|
24
|
-
</div>
|
|
25
|
-
{% endif %}
|
|
26
|
-
<h2 class="ds-teaser__title">
|
|
27
|
-
{% if params.highlight %}
|
|
28
|
-
<span class="{{ componentClassName + '__highlight'}}">{{ params.highlight }}</span>
|
|
29
|
-
{% endif %}
|
|
30
|
-
{{ params.title }}
|
|
31
|
-
</h2>
|
|
32
|
-
|
|
33
|
-
{% if params.text %}
|
|
34
|
-
<p class="{{ componentClassName + '__text' }}">
|
|
35
|
-
{{ params.text }}
|
|
36
|
-
</p>
|
|
37
|
-
{% endif %}
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
{% if params.mediaHtml %}
|
|
41
|
-
<div class="{{ componentClassName + '__media'}}">
|
|
42
|
-
{{ params.mediaHtml }}
|
|
43
|
-
</div>
|
|
44
|
-
{% endif %}
|
|
45
|
-
{% endcall %}
|
|
46
|
-
{% endmacro %}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
@use "../../foundations/helpers/forward.helpers.scss" as *;
|
|
2
|
-
@use "../../assets/teaser/teaser.scss" as *;
|
|
3
|
-
|
|
4
|
-
.ds-teaser.ds-teaser--breaking {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
position: relative;
|
|
8
|
-
|
|
9
|
-
.ds-teaser__media {
|
|
10
|
-
padding: ds-spacing(0 0 $ds-s-100);
|
|
11
|
-
|
|
12
|
-
video {
|
|
13
|
-
max-width: 100%;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ds-teaser__content {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: row;
|
|
20
|
-
padding: ds-spacing($ds-s-075 $ds-s-100 $ds-s-100);
|
|
21
|
-
text-align: center;
|
|
22
|
-
|
|
23
|
-
.ds-teaser__content-inner {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
flex: 1;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&:focus-visible {
|
|
31
|
-
outline: none !important; /* stylelint-disable-line declaration-no-important */
|
|
32
|
-
|
|
33
|
-
.ds-teaser__content {
|
|
34
|
-
@include ds-teaser-focus(-8px, false);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.ds-teaser__vignette {
|
|
39
|
-
margin-top: ds-spacing($ds-s-025);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.ds-teaser__title {
|
|
43
|
-
@include ds-typography($ds-typography-detailteaser-breaking);
|
|
44
|
-
text-align: center;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@include ds-hover(true) {
|
|
48
|
-
.ds-teaser__title {
|
|
49
|
-
@include ds-underline(3px);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|