@bonniernews/dn-design-system-web 21.1.0-beta.4 → 21.1.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 +14 -45
- 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/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
package/CHANGELOG.md
CHANGED
|
@@ -4,62 +4,38 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
## [21.1.0
|
|
8
|
-
|
|
9
|
-
## [21.1.0-beta.3](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.2...@bonniernews/dn-design-system-web@21.1.0-beta.3) (2024-11-06)
|
|
7
|
+
## [21.1.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.4...@bonniernews/dn-design-system-web@21.1.0) (2024-11-11)
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
### Features
|
|
13
11
|
|
|
14
|
-
* **web:**
|
|
15
|
-
* **web:**
|
|
16
|
-
* **web:** one level of bauta with background color ([9184544](https://github.com/BonnierNews/dn-design-system/commit/91845447403cb2ec5a787fd64c341d620861b148))
|
|
17
|
-
* **web:** one level of bauta with background color ([644acd6](https://github.com/BonnierNews/dn-design-system/commit/644acd6166d7385ac08c930fe725215a9e35fc80))
|
|
12
|
+
* **web:** one level of bauta with background color ([#1428](https://github.com/BonnierNews/dn-design-system/issues/1428)) ([c78c0a5](https://github.com/BonnierNews/dn-design-system/commit/c78c0a5e8a05a4ee4d31d7a58e5d23b1c39a7807))
|
|
13
|
+
* **web:** tsx component teaser on site ([#1479](https://github.com/BonnierNews/dn-design-system/issues/1479)) ([e10f001](https://github.com/BonnierNews/dn-design-system/commit/e10f001fc5300837c7bf7a98958a1d806c6f84db))
|
|
18
14
|
|
|
15
|
+
## [21.0.4](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.3...@bonniernews/dn-design-system-web@21.0.4) (2024-11-06)
|
|
19
16
|
|
|
20
|
-
### Bug Fixes
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
### Maintenance
|
|
19
|
+
|
|
20
|
+
* **foundations:** update tokens from Figma ([#1490](https://github.com/BonnierNews/dn-design-system/issues/1490)) ([aa7bcf3](https://github.com/BonnierNews/dn-design-system/commit/aa7bcf362f8f8f0495cbd6aa1ad12cc5c677ce24))
|
|
21
|
+
* prerelease packages ([92a0383](https://github.com/BonnierNews/dn-design-system/commit/92a038392e8bc9b4bfa8b3f2dc508b16ef1ff4cf))
|
|
22
|
+
|
|
23
|
+
## [21.0.3](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.2...@bonniernews/dn-design-system-web@21.0.3) (2024-11-04)
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
### Maintenance
|
|
27
27
|
|
|
28
28
|
* **deps-dev:** bump @babel/preset-env from 7.25.8 to 7.25.9 ([#1469](https://github.com/BonnierNews/dn-design-system/issues/1469)) ([b9a9884](https://github.com/BonnierNews/dn-design-system/commit/b9a988470f8862d4c010f27a097d9a65af115d2b))
|
|
29
29
|
* **deps-dev:** bump @testing-library/react-native from 12.7.2 to 12.8.0 ([#1477](https://github.com/BonnierNews/dn-design-system/issues/1477)) ([59e489f](https://github.com/BonnierNews/dn-design-system/commit/59e489f4227e83e1d6df43eb9acf6c1ea42db3e3))
|
|
30
|
+
* **deps-dev:** bump @testing-library/react-native from 12.8.0 to 12.8.1 ([#1487](https://github.com/BonnierNews/dn-design-system/issues/1487)) ([86b9369](https://github.com/BonnierNews/dn-design-system/commit/86b93691f2697715eb79a487ed92d953e5b36f83))
|
|
30
31
|
* **deps:** bump @react-native-community/slider from 4.5.4 to 4.5.5 ([#1475](https://github.com/BonnierNews/dn-design-system/issues/1475)) ([c321542](https://github.com/BonnierNews/dn-design-system/commit/c321542bdf60e16f86fc02cae937b301e649bb48))
|
|
32
|
+
* **deps:** bump elliptic from 6.5.7 to 6.6.0 ([#1483](https://github.com/BonnierNews/dn-design-system/issues/1483)) ([508f43d](https://github.com/BonnierNews/dn-design-system/commit/508f43dfac81353fe472079c406c8c7989bd36f4))
|
|
31
33
|
* **foundations:** update tokens from Figma ([#1467](https://github.com/BonnierNews/dn-design-system/issues/1467)) ([af2cd99](https://github.com/BonnierNews/dn-design-system/commit/af2cd99ce8ab17494a3e51e34588d25e24a9ef38))
|
|
34
|
+
* **foundations:** update tokens from Figma ([#1484](https://github.com/BonnierNews/dn-design-system/issues/1484)) ([41db5ef](https://github.com/BonnierNews/dn-design-system/commit/41db5ef5f44aa64adbd5d3eedd522274df273834))
|
|
35
|
+
* prerelease packages ([0658681](https://github.com/BonnierNews/dn-design-system/commit/065868135bd5c468f65dafa447f7cbc08928d375))
|
|
32
36
|
* prerelease packages ([974fe99](https://github.com/BonnierNews/dn-design-system/commit/974fe99363323771a4284b36a895757fd4c49630))
|
|
33
37
|
* prerelease packages ([3ebfd91](https://github.com/BonnierNews/dn-design-system/commit/3ebfd91c6780c6222c74b500eade9fd19cac88f3))
|
|
34
38
|
* **web:** change screenshot location ([#1482](https://github.com/BonnierNews/dn-design-system/issues/1482)) ([472d0df](https://github.com/BonnierNews/dn-design-system/commit/472d0df71292d72206f908b82b45148a3b79cb91))
|
|
35
|
-
* **web:** released version v21.1.0-beta.1 ([9d45c5a](https://github.com/BonnierNews/dn-design-system/commit/9d45c5a4bbcfe53698ca9dffe3e1771422fbcdac))
|
|
36
|
-
* **web:** released version v21.1.0-beta.2 ([49b9324](https://github.com/BonnierNews/dn-design-system/commit/49b9324c7074d6835aab2de9bb7d9e18649f58b6))
|
|
37
|
-
* **web:** visuella-toppar-update-tokens ([#1468](https://github.com/BonnierNews/dn-design-system/issues/1468)) ([943705a](https://github.com/BonnierNews/dn-design-system/commit/943705afb2922c4d32bb4e042cd746857cbd26cf))
|
|
38
|
-
|
|
39
|
-
## [21.1.0-beta.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.1.0-beta.1...@bonniernews/dn-design-system-web@21.1.0-beta.2) (2024-10-25)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Bug Fixes
|
|
43
|
-
|
|
44
|
-
* **web:** media box sizing border box ([#1473](https://github.com/BonnierNews/dn-design-system/issues/1473)) ([e132abf](https://github.com/BonnierNews/dn-design-system/commit/e132abf44fc8d525fed7ff565ebdcc3702941669))
|
|
45
|
-
|
|
46
|
-
## [21.1.0-beta.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.2...@bonniernews/dn-design-system-web@21.1.0-beta.1) (2024-10-25)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Features
|
|
50
|
-
|
|
51
|
-
* **web:** breaking aka nivå3puff till visuella toppar ([#1450](https://github.com/BonnierNews/dn-design-system/issues/1450)) ([602040c](https://github.com/BonnierNews/dn-design-system/commit/602040c5a0e8ef7a7bd996bc6508e97956229c1b))
|
|
52
|
-
* **web:** nivå1puff till visuella toppar ([#1460](https://github.com/BonnierNews/dn-design-system/issues/1460)) ([d8dcacf](https://github.com/BonnierNews/dn-design-system/commit/d8dcacf7c76b80aac7e48fbf602bc5079d3a1cd3))
|
|
53
|
-
* **web:** one level of bauta with background color ([8734216](https://github.com/BonnierNews/dn-design-system/commit/87342169eacf9d59f202f45424022c1bd733a74e))
|
|
54
|
-
* **web:** one level of bauta with background color ([5d448cf](https://github.com/BonnierNews/dn-design-system/commit/5d448cf2cc890623e67c509edbb0418a98a8bb4b))
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
### Maintenance
|
|
58
|
-
|
|
59
|
-
* **deps-dev:** bump @babel/preset-env from 7.25.8 to 7.25.9 ([#1469](https://github.com/BonnierNews/dn-design-system/issues/1469)) ([b9a9884](https://github.com/BonnierNews/dn-design-system/commit/b9a988470f8862d4c010f27a097d9a65af115d2b))
|
|
60
|
-
* **foundations:** update tokens from Figma ([#1467](https://github.com/BonnierNews/dn-design-system/issues/1467)) ([af2cd99](https://github.com/BonnierNews/dn-design-system/commit/af2cd99ce8ab17494a3e51e34588d25e24a9ef38))
|
|
61
|
-
* prerelease packages ([3ebfd91](https://github.com/BonnierNews/dn-design-system/commit/3ebfd91c6780c6222c74b500eade9fd19cac88f3))
|
|
62
|
-
* **web:** visuella-toppar-update-tokens ([#1468](https://github.com/BonnierNews/dn-design-system/issues/1468)) ([87277b4](https://github.com/BonnierNews/dn-design-system/commit/87277b487b6f663d4ca106a74cb878012e579a42))
|
|
63
39
|
|
|
64
40
|
## [21.0.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.1...@bonniernews/dn-design-system-web@21.0.2) (2024-10-24)
|
|
65
41
|
|
|
@@ -70,13 +46,6 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
70
46
|
## [21.1.0-beta.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.0...@bonniernews/dn-design-system-web@21.1.0-beta.0) (2024-10-18)
|
|
71
47
|
|
|
72
48
|
|
|
73
|
-
### Features
|
|
74
|
-
|
|
75
|
-
* **web:** one level of bauta with background color ([075ed25](https://github.com/BonnierNews/dn-design-system/commit/075ed259c6f3c50ed6018bd566fdc7b9b5c05c73))
|
|
76
|
-
|
|
77
|
-
## [21.1.0-beta.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.0...@bonniernews/dn-design-system-web@21.1.0-beta.0) (2024-10-18)
|
|
78
|
-
|
|
79
|
-
|
|
80
49
|
### Features
|
|
81
50
|
|
|
82
51
|
* **web:** one level of bauta with background color ([075ed25](https://github.com/BonnierNews/dn-design-system/commit/075ed259c6f3c50ed6018bd566fdc7b9b5c05c73))
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
|
|
2
|
+
|
|
1
3
|
export interface DividerProps {
|
|
2
4
|
variant?: 'soft' | 'medium' | 'hard';
|
|
3
5
|
classNames?: string;
|
|
@@ -5,13 +7,11 @@ export interface DividerProps {
|
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
export const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
componentClassName,
|
|
12
|
-
`${classNamePrefix}${variant}`,
|
|
10
|
+
const classes = formatClassString([
|
|
11
|
+
'ds-divider',
|
|
12
|
+
`ds-divider--${variant}`,
|
|
13
13
|
classNames
|
|
14
|
-
]
|
|
14
|
+
])
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<div className={classes} {...attributes}><hr /></div>
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
+
import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
|
|
2
|
+
|
|
1
3
|
export interface QuoteProps {
|
|
2
4
|
bodyHtml: string;
|
|
3
5
|
theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
|
|
4
6
|
classNames?: string;
|
|
7
|
+
/** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
|
|
5
8
|
attributes?: object;
|
|
6
9
|
forcePx?: boolean;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
export const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {
|
|
10
13
|
const componentClassName = 'ds-quote';
|
|
11
|
-
|
|
14
|
+
|
|
15
|
+
const classes = formatClassString([
|
|
12
16
|
componentClassName,
|
|
13
17
|
`ds-theme--${theme}`,
|
|
14
18
|
forcePx && 'ds-force-px',
|
|
15
|
-
classNames
|
|
16
|
-
]
|
|
19
|
+
classNames,
|
|
20
|
+
])
|
|
17
21
|
|
|
18
22
|
const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`
|
|
19
23
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
|
|
2
|
+
|
|
3
|
+
export interface TeaserCardsProps {
|
|
4
|
+
areaType?: 'right' | 'bauta' | 'bautaxl';
|
|
5
|
+
targetLink?: string;
|
|
6
|
+
theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
|
|
7
|
+
classes?: string;
|
|
8
|
+
/** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
|
|
9
|
+
attributes?: object;
|
|
10
|
+
children: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const TeaserCard = ({ areaType, targetLink, theme = 'nyheter', classes, attributes, children }: TeaserCardsProps) => {
|
|
14
|
+
const componentClassName = 'ds-teaser';
|
|
15
|
+
|
|
16
|
+
const classNames = formatClassString([
|
|
17
|
+
componentClassName,
|
|
18
|
+
areaType && `${componentClassName}--${areaType}`,
|
|
19
|
+
`ds-theme--${theme}`,
|
|
20
|
+
classes,
|
|
21
|
+
])
|
|
22
|
+
|
|
23
|
+
if (targetLink) {
|
|
24
|
+
return (
|
|
25
|
+
<a className={classNames} href={targetLink } {...attributes}>
|
|
26
|
+
{ children }
|
|
27
|
+
</a>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className={classNames}{...attributes}>
|
|
33
|
+
{ children }
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
@@ -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
|
|
@@ -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,21 +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-vip-badge {
|
|
117
|
-
top: ds-spacing($ds-s-100);
|
|
118
|
-
right: ds-spacing($ds-s-100);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.ds-teaser__media {
|
|
122
|
-
padding: ds-spacing($ds-s-100 $ds-s-100 0 $ds-s-100);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.ds-teaser-dot {
|
|
126
|
-
display: none;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
109
|
}
|
|
130
110
|
|
|
131
111
|
@include ds-mq-smallest-breakpoint(tablet) {
|
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
font-family: $ds-font--arial !important; /* stylelint-disable-line declaration-no-important */
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
&::after {
|
|
32
|
+
content: "";
|
|
33
|
+
display: block;
|
|
34
|
+
clear: both;
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
&.ds-teaser--native-right,
|
|
32
38
|
&.ds-teaser--native-large {
|
|
33
39
|
.ds-teaser__media {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TeaserCard } from "@bonniernews/dn-design-system-web/components/teaser-card/teaser-card.tsx";
|
|
2
|
+
import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
|
|
3
|
+
import { Body, Content, Media, Title } from "@bonniernews/dn-design-system-web/helpers/teaser.tsx";
|
|
4
|
+
export interface TeaserOnSiteProps {
|
|
5
|
+
areaType?: 'right' | 'bauta' | 'bautaxl';
|
|
6
|
+
targetLink?: string;
|
|
7
|
+
theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
|
|
8
|
+
classNames?: string;
|
|
9
|
+
/** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
|
|
10
|
+
attributes?: object;
|
|
11
|
+
mediaHtml?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
text?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const TeaserOnSite = ({ areaType, targetLink, theme = 'nyheter', classNames, attributes, mediaHtml, title, text }: TeaserOnSiteProps) => {
|
|
17
|
+
|
|
18
|
+
const classes = formatClassString([
|
|
19
|
+
"ds-teaser--onsite",
|
|
20
|
+
classNames,
|
|
21
|
+
])
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<TeaserCard { ...{ areaType, targetLink, theme, classes, attributes }}>
|
|
25
|
+
<Media { ...{ mediaHtml }} />
|
|
26
|
+
<Content>
|
|
27
|
+
<Title title={`PÅ PLATS | ${title}`} />
|
|
28
|
+
<Body { ...{ text }} />
|
|
29
|
+
</Content>
|
|
30
|
+
</TeaserCard>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -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
|
-
padding-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
|
}
|
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
padding: ds-spacing($ds-s-075 $ds-s-100 0);
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
|
|
9
|
-
.ds-teaser__vignette {
|
|
10
|
-
margin-top: ds-spacing($ds-s-025);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
.ds-teaser__title {
|
|
14
10
|
@include ds-typography($ds-typography-detailteaser-standard);
|
|
15
11
|
|
|
@@ -33,12 +29,17 @@
|
|
|
33
29
|
margin-bottom: ds-spacing($ds-s-100);
|
|
34
30
|
}
|
|
35
31
|
|
|
32
|
+
&::after {
|
|
33
|
+
content: "";
|
|
34
|
+
display: block;
|
|
35
|
+
clear: both;
|
|
36
|
+
}
|
|
37
|
+
|
|
36
38
|
.ds-teaser__content {
|
|
37
39
|
display: block;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
.ds-teaser__media {
|
|
41
|
-
margin-top: ds-spacing($ds-s-025);
|
|
42
43
|
margin-bottom: ds-spacing($ds-s-100);
|
|
43
44
|
margin-left: ds-spacing($ds-s-100);
|
|
44
45
|
float: right;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
|
|
2
|
+
|
|
1
3
|
export interface ThematicBreakProps {
|
|
2
4
|
classNames?: string;
|
|
3
5
|
attributes?: object;
|
|
4
6
|
}
|
|
5
7
|
|
|
6
8
|
export const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
componentClassName,
|
|
9
|
+
const classes = formatClassString([
|
|
10
|
+
'ds-thematic-break',
|
|
10
11
|
classNames
|
|
11
|
-
]
|
|
12
|
+
])
|
|
12
13
|
|
|
13
14
|
return (
|
|
14
15
|
<div className={classes} {...attributes}><hr /></div>
|
|
@@ -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);
|
|
@@ -1,88 +1,84 @@
|
|
|
1
|
-
$ds-hex-dark-text-primary: #
|
|
2
|
-
$ds-hex-dark-text-primary-02: #
|
|
1
|
+
$ds-hex-dark-text-primary: #EDEDED;
|
|
2
|
+
$ds-hex-dark-text-primary-02: #B8B8B8;
|
|
3
3
|
$ds-hex-dark-text-secondary: #050505;
|
|
4
|
-
$ds-hex-dark-text-critical: #
|
|
5
|
-
$ds-hex-dark-text-disabled: #
|
|
4
|
+
$ds-hex-dark-text-critical: #FD2330;
|
|
5
|
+
$ds-hex-dark-text-disabled: #B8B8B8;
|
|
6
6
|
$ds-hex-dark-text-on-brand: #ffffff;
|
|
7
7
|
$ds-hex-dark-text-on-business: #ffffff;
|
|
8
8
|
$ds-hex-dark-text-on-critical: #ffffff;
|
|
9
9
|
$ds-hex-dark-text-on-success: #ffffff;
|
|
10
|
-
$ds-hex-dark-text-brand: #
|
|
11
|
-
$ds-hex-dark-text-body-link: #
|
|
12
|
-
$ds-hex-dark-text-body-link-visited: #
|
|
13
|
-
$ds-hex-dark-text-positive: #
|
|
14
|
-
$ds-hex-dark-
|
|
15
|
-
$ds-hex-dark-icon-primary: #
|
|
16
|
-
$ds-hex-dark-icon-primary-02: #cfcfcf;
|
|
10
|
+
$ds-hex-dark-text-brand: #FD2330;
|
|
11
|
+
$ds-hex-dark-text-body-link: #65A0FC;
|
|
12
|
+
$ds-hex-dark-text-body-link-visited: #65A0FC;
|
|
13
|
+
$ds-hex-dark-text-positive: #3A8352;
|
|
14
|
+
$ds-hex-dark-icon-primary: #EDEDED;
|
|
15
|
+
$ds-hex-dark-icon-primary-02: #CFCFCF;
|
|
17
16
|
$ds-hex-dark-icon-secondary: #050505;
|
|
18
|
-
$ds-hex-dark-icon-critical: #
|
|
19
|
-
$ds-hex-dark-icon-disabled: #
|
|
17
|
+
$ds-hex-dark-icon-critical: #FD2330;
|
|
18
|
+
$ds-hex-dark-icon-disabled: #B8B8B8;
|
|
20
19
|
$ds-hex-dark-icon-on-brand: #141414;
|
|
21
20
|
$ds-hex-dark-icon-on-critical: #ffffff;
|
|
22
21
|
$ds-hex-dark-icon-on-success: #ffffff;
|
|
23
22
|
$ds-hex-dark-icon-on-business: #ffffff;
|
|
24
|
-
$ds-hex-dark-icon-brand: #
|
|
25
|
-
$ds-hex-dark-
|
|
26
|
-
$ds-hex-dark-component-
|
|
27
|
-
$ds-hex-dark-component-
|
|
28
|
-
$ds-hex-dark-component-primary: #
|
|
29
|
-
$ds-hex-dark-component-primary-overlay:
|
|
30
|
-
$ds-hex-dark-component-primary-overlay-02: #9e9e9e;
|
|
23
|
+
$ds-hex-dark-icon-brand: #FD2330;
|
|
24
|
+
$ds-hex-dark-component-brand: #FD2330;
|
|
25
|
+
$ds-hex-dark-component-business: #3A8352;
|
|
26
|
+
$ds-hex-dark-component-primary: #EDEDED;
|
|
27
|
+
$ds-hex-dark-component-primary-overlay: #ffffff21;
|
|
28
|
+
$ds-hex-dark-component-primary-overlay-02: #9E9E9E;
|
|
31
29
|
$ds-hex-dark-component-secondary: #050505;
|
|
32
|
-
$ds-hex-dark-component-secondary-overlay:
|
|
33
|
-
$ds-hex-dark-component-secondary-overlay-02:
|
|
34
|
-
$ds-hex-dark-component-critical: #
|
|
35
|
-
$ds-hex-dark-component-critical-overlay: #
|
|
30
|
+
$ds-hex-dark-component-secondary-overlay: #08080821;
|
|
31
|
+
$ds-hex-dark-component-secondary-overlay-02: #08080833;
|
|
32
|
+
$ds-hex-dark-component-critical: #EF7171;
|
|
33
|
+
$ds-hex-dark-component-critical-overlay: #A51D24;
|
|
36
34
|
$ds-hex-dark-component-static-white: #ffffff;
|
|
37
|
-
$ds-hex-dark-component-positive: #
|
|
38
|
-
$ds-hex-dark-component-primary-02: #
|
|
39
|
-
$ds-hex-dark-surface-below: #
|
|
35
|
+
$ds-hex-dark-component-positive: #3A8352;
|
|
36
|
+
$ds-hex-dark-component-primary-02: #CFCFCF;
|
|
37
|
+
$ds-hex-dark-surface-below: #262626;
|
|
40
38
|
$ds-hex-dark-surface-background: #050505;
|
|
41
|
-
$ds-hex-dark-surface-raised: #
|
|
42
|
-
$ds-hex-dark-surface-native-article: #
|
|
43
|
-
$ds-hex-dark-surface-elevated: #
|
|
39
|
+
$ds-hex-dark-surface-raised: #2B2B2B;
|
|
40
|
+
$ds-hex-dark-surface-native-article: #2B2B2B;
|
|
41
|
+
$ds-hex-dark-surface-elevated: #2B2B2B;
|
|
44
42
|
$ds-hex-dark-surface-inverted: #ffffff;
|
|
45
|
-
$ds-hex-dark-surface-overlay:
|
|
46
|
-
$ds-hex-dark-surface-quiz: #
|
|
47
|
-
$ds-hex-dark-surface-korsord: #
|
|
48
|
-
$ds-hex-dark-surface-sudoko: #
|
|
49
|
-
$ds-hex-dark-surface-brand: #
|
|
50
|
-
$ds-hex-dark-
|
|
51
|
-
$ds-hex-dark-border-primary:
|
|
52
|
-
$ds-hex-dark-border-primary-
|
|
53
|
-
$ds-hex-dark-border-primary-03: #ededed;
|
|
43
|
+
$ds-hex-dark-surface-overlay: #05050580;
|
|
44
|
+
$ds-hex-dark-surface-quiz: #EA3E3F;
|
|
45
|
+
$ds-hex-dark-surface-korsord: #8BB6E8;
|
|
46
|
+
$ds-hex-dark-surface-sudoko: #90D0BD;
|
|
47
|
+
$ds-hex-dark-surface-brand: #DA000D;
|
|
48
|
+
$ds-hex-dark-border-primary: #3B3B3B;
|
|
49
|
+
$ds-hex-dark-border-primary-02: #ffffff66;
|
|
50
|
+
$ds-hex-dark-border-primary-03: #EDEDED;
|
|
54
51
|
$ds-hex-dark-border-secondary: #141414;
|
|
55
|
-
$ds-hex-dark-border-business: #
|
|
56
|
-
$ds-hex-dark-border-critical: #
|
|
57
|
-
$ds-hex-dark-border-focus: #
|
|
52
|
+
$ds-hex-dark-border-business: #3A8352;
|
|
53
|
+
$ds-hex-dark-border-critical: #FD2330;
|
|
54
|
+
$ds-hex-dark-border-focus: #FD2330;
|
|
58
55
|
$ds-hex-dark-border-focus-02: #ffffff;
|
|
59
|
-
$ds-hex-dark-border-focus-03: #
|
|
60
|
-
$ds-hex-dark-border-focus-04: #
|
|
61
|
-
$ds-hex-dark-border-brand: #
|
|
62
|
-
$ds-hex-dark-border-culture: #4293d7;
|
|
56
|
+
$ds-hex-dark-border-focus-03: #FD2330;
|
|
57
|
+
$ds-hex-dark-border-focus-04: #3A8352;
|
|
58
|
+
$ds-hex-dark-border-brand: #DA000D;
|
|
63
59
|
$ds-hex-dark-background-primary: #141414;
|
|
64
60
|
$ds-hex-dark-gradient-content-fade-left: linear-gradient(90deg, #05050500 0%, #050505 100%);
|
|
65
61
|
$ds-hex-dark-gradient-content-fade-right: linear-gradient(-90deg, #05050500 0%, #050505 100%);
|
|
66
62
|
$ds-hex-dark-gradient-content-fade-up: linear-gradient(180deg, #05050500 0%, #050505 100%);
|
|
67
63
|
$ds-hex-dark-gradient-content-fade-up-down: linear-gradient(0deg, #05050500 0%, #050505 100%);
|
|
68
64
|
$ds-hex-dark-gradient-content-fade-down: linear-gradient(0deg, #05050500 0%, #050505 100%);
|
|
69
|
-
$ds-hex-dark-static-red-100: #
|
|
65
|
+
$ds-hex-dark-static-red-100: #FAD4D4;
|
|
70
66
|
$ds-hex-dark-static-black: #141414;
|
|
71
|
-
$ds-hex-dark-static-transparent-black:
|
|
67
|
+
$ds-hex-dark-static-transparent-black: #14141499;
|
|
72
68
|
$ds-hex-dark-static-white: #ffffff;
|
|
73
|
-
$ds-hex-dark-static-transparent-white:
|
|
74
|
-
$ds-hex-dark-static-green-100: #
|
|
75
|
-
$ds-hex-dark-static-red-300: #
|
|
76
|
-
$ds-hex-dark-static-transparent-white-10:
|
|
77
|
-
$ds-hex-dark-static-kultur: #
|
|
78
|
-
$ds-hex-dark-static-economy: #
|
|
79
|
-
$ds-hex-dark-static-sport: #
|
|
80
|
-
$ds-hex-dark-static-neutral-200: #
|
|
81
|
-
$ds-hex-dark-static-sthlm: #
|
|
82
|
-
$ds-hex-dark-static-ad-yellow: #
|
|
83
|
-
$ds-hex-dark-static-neutral-100: #
|
|
84
|
-
$ds-hex-dark-static-neutral-500: #
|
|
85
|
-
$ds-hex-dark-static-red-500: #
|
|
86
|
-
$ds-hex-dark-static-yellow: #
|
|
87
|
-
$ds-hex-dark-static-red-200: #
|
|
88
|
-
$ds-hex-dark-static-red-0: #
|
|
69
|
+
$ds-hex-dark-static-transparent-white: #ffffff80;
|
|
70
|
+
$ds-hex-dark-static-green-100: #CEE4D6;
|
|
71
|
+
$ds-hex-dark-static-red-300: #EF7171;
|
|
72
|
+
$ds-hex-dark-static-transparent-white-10: #ffffff21;
|
|
73
|
+
$ds-hex-dark-static-kultur: #568CBB;
|
|
74
|
+
$ds-hex-dark-static-economy: #60BCA1;
|
|
75
|
+
$ds-hex-dark-static-sport: #F58D2D;
|
|
76
|
+
$ds-hex-dark-static-neutral-200: #E0E0E0;
|
|
77
|
+
$ds-hex-dark-static-sthlm: #FF589B;
|
|
78
|
+
$ds-hex-dark-static-ad-yellow: #FFEAC2;
|
|
79
|
+
$ds-hex-dark-static-neutral-100: #EDEDED;
|
|
80
|
+
$ds-hex-dark-static-neutral-500: #9E9E9E;
|
|
81
|
+
$ds-hex-dark-static-red-500: #DA000D;
|
|
82
|
+
$ds-hex-dark-static-yellow: #FFE600;
|
|
83
|
+
$ds-hex-dark-static-red-200: #F6ACAD;
|
|
84
|
+
$ds-hex-dark-static-red-0: #FCE8E8;
|