@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
|
@@ -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;
|
|
@@ -1,86 +1,82 @@
|
|
|
1
1
|
$ds-hex-text-primary: #050505;
|
|
2
2
|
$ds-hex-text-primary-02: #666666;
|
|
3
3
|
$ds-hex-text-secondary: #ffffff;
|
|
4
|
-
$ds-hex-text-critical: #
|
|
4
|
+
$ds-hex-text-critical: #DA000D;
|
|
5
5
|
$ds-hex-text-disabled: #666666;
|
|
6
6
|
$ds-hex-text-on-brand: #ffffff;
|
|
7
7
|
$ds-hex-text-on-business: #ffffff;
|
|
8
8
|
$ds-hex-text-on-critical: #ffffff;
|
|
9
9
|
$ds-hex-text-on-success: #ffffff;
|
|
10
|
-
$ds-hex-text-brand: #
|
|
11
|
-
$ds-hex-text-body-link: #
|
|
12
|
-
$ds-hex-text-body-link-visited: #
|
|
13
|
-
$ds-hex-text-positive: #
|
|
14
|
-
$ds-hex-text-culture: #227ac3;
|
|
10
|
+
$ds-hex-text-brand: #DA000D;
|
|
11
|
+
$ds-hex-text-body-link: #4373CE;
|
|
12
|
+
$ds-hex-text-body-link-visited: #4373CE;
|
|
13
|
+
$ds-hex-text-positive: #3A8352;
|
|
15
14
|
$ds-hex-icon-primary: #050505;
|
|
16
15
|
$ds-hex-icon-primary-02: #666666;
|
|
17
16
|
$ds-hex-icon-secondary: #ffffff;
|
|
18
|
-
$ds-hex-icon-critical: #
|
|
17
|
+
$ds-hex-icon-critical: #DA000D;
|
|
19
18
|
$ds-hex-icon-disabled: #666666;
|
|
20
19
|
$ds-hex-icon-on-brand: #ffffff;
|
|
21
20
|
$ds-hex-icon-on-business: #ffffff;
|
|
22
|
-
$ds-hex-icon-brand: #
|
|
21
|
+
$ds-hex-icon-brand: #DA000D;
|
|
23
22
|
$ds-hex-icon-on-critical: #ffffff;
|
|
24
23
|
$ds-hex-icon-on-success: #ffffff;
|
|
25
|
-
$ds-hex-
|
|
26
|
-
$ds-hex-component-
|
|
27
|
-
$ds-hex-component-business: #3a8352;
|
|
24
|
+
$ds-hex-component-brand: #DA000D;
|
|
25
|
+
$ds-hex-component-business: #3A8352;
|
|
28
26
|
$ds-hex-component-primary: #141414;
|
|
29
|
-
$ds-hex-component-primary-overlay:
|
|
30
|
-
$ds-hex-component-primary-overlay-02:
|
|
27
|
+
$ds-hex-component-primary-overlay: #08080821;
|
|
28
|
+
$ds-hex-component-primary-overlay-02: #08080833;
|
|
31
29
|
$ds-hex-component-secondary: #ffffff;
|
|
32
|
-
$ds-hex-component-secondary-overlay:
|
|
33
|
-
$ds-hex-component-secondary-overlay-02:
|
|
34
|
-
$ds-hex-component-critical: #
|
|
35
|
-
$ds-hex-component-critical-overlay: #
|
|
30
|
+
$ds-hex-component-secondary-overlay: #ffffff21;
|
|
31
|
+
$ds-hex-component-secondary-overlay-02: #ffffff33;
|
|
32
|
+
$ds-hex-component-critical: #EA3E3F;
|
|
33
|
+
$ds-hex-component-critical-overlay: #A51D24;
|
|
36
34
|
$ds-hex-component-static-white: #ffffff;
|
|
37
|
-
$ds-hex-component-positive: #
|
|
38
|
-
$ds-hex-component-primary-02: #
|
|
39
|
-
$ds-hex-surface-below: #
|
|
40
|
-
$ds-hex-surface-native-article: #
|
|
35
|
+
$ds-hex-component-positive: #3A8352;
|
|
36
|
+
$ds-hex-component-primary-02: #CFCFCF;
|
|
37
|
+
$ds-hex-surface-below: #EDEDED;
|
|
38
|
+
$ds-hex-surface-native-article: #EDEDED;
|
|
41
39
|
$ds-hex-surface-background: #ffffff;
|
|
42
|
-
$ds-hex-surface-raised: #
|
|
40
|
+
$ds-hex-surface-raised: #EDEDED;
|
|
43
41
|
$ds-hex-surface-elevated: #ffffff;
|
|
44
|
-
$ds-hex-surface-overlay:
|
|
45
|
-
$ds-hex-surface-quiz: #
|
|
46
|
-
$ds-hex-surface-korsord: #
|
|
47
|
-
$ds-hex-surface-sudoko: #
|
|
48
|
-
$ds-hex-surface-brand: #
|
|
42
|
+
$ds-hex-surface-overlay: #05050580;
|
|
43
|
+
$ds-hex-surface-quiz: #EA3E3F;
|
|
44
|
+
$ds-hex-surface-korsord: #8BB6E8;
|
|
45
|
+
$ds-hex-surface-sudoko: #90D0BD;
|
|
46
|
+
$ds-hex-surface-brand: #DA000D;
|
|
49
47
|
$ds-hex-surface-inverted: #141414;
|
|
50
|
-
$ds-hex-
|
|
51
|
-
$ds-hex-border-primary:
|
|
52
|
-
$ds-hex-border-primary-02: rgba(8, 8, 8, 0.4);
|
|
48
|
+
$ds-hex-border-primary: #08080821;
|
|
49
|
+
$ds-hex-border-primary-02: #08080866;
|
|
53
50
|
$ds-hex-border-primary-03: #050505;
|
|
54
51
|
$ds-hex-border-secondary: #ffffff;
|
|
55
|
-
$ds-hex-border-business: #
|
|
56
|
-
$ds-hex-border-critical: #
|
|
57
|
-
$ds-hex-border-focus: #
|
|
52
|
+
$ds-hex-border-business: #3A8352;
|
|
53
|
+
$ds-hex-border-critical: #DA000D;
|
|
54
|
+
$ds-hex-border-focus: #DA000D;
|
|
58
55
|
$ds-hex-border-focus-02: #141414;
|
|
59
|
-
$ds-hex-border-focus-03: #
|
|
60
|
-
$ds-hex-border-focus-04: #
|
|
61
|
-
$ds-hex-border-brand: #
|
|
62
|
-
$ds-hex-border-culture: #227ac3;
|
|
56
|
+
$ds-hex-border-focus-03: #DA000D;
|
|
57
|
+
$ds-hex-border-focus-04: #3A8352;
|
|
58
|
+
$ds-hex-border-brand: #DA000D;
|
|
63
59
|
$ds-hex-background-primary: #ffffff;
|
|
64
|
-
$ds-hex-static-red-100: #
|
|
60
|
+
$ds-hex-static-red-100: #FAD4D4;
|
|
65
61
|
$ds-hex-static-black: #141414;
|
|
66
|
-
$ds-hex-static-transparent-black:
|
|
62
|
+
$ds-hex-static-transparent-black: #14141499;
|
|
67
63
|
$ds-hex-static-white: #ffffff;
|
|
68
|
-
$ds-hex-static-transparent-white:
|
|
69
|
-
$ds-hex-static-green-100: #
|
|
70
|
-
$ds-hex-static-red-300: #
|
|
71
|
-
$ds-hex-static-transparent-white-10:
|
|
72
|
-
$ds-hex-static-kultur: #
|
|
73
|
-
$ds-hex-static-economy: #
|
|
74
|
-
$ds-hex-static-sport: #
|
|
75
|
-
$ds-hex-static-neutral-200: #
|
|
76
|
-
$ds-hex-static-sthlm: #
|
|
77
|
-
$ds-hex-static-ad-yellow: #
|
|
78
|
-
$ds-hex-static-neutral-100: #
|
|
79
|
-
$ds-hex-static-neutral-500: #
|
|
80
|
-
$ds-hex-static-red-500: #
|
|
81
|
-
$ds-hex-static-yellow: #
|
|
82
|
-
$ds-hex-static-red-200: #
|
|
83
|
-
$ds-hex-static-red-0: #
|
|
64
|
+
$ds-hex-static-transparent-white: #ffffff80;
|
|
65
|
+
$ds-hex-static-green-100: #CEE4D6;
|
|
66
|
+
$ds-hex-static-red-300: #EF7171;
|
|
67
|
+
$ds-hex-static-transparent-white-10: #ffffff21;
|
|
68
|
+
$ds-hex-static-kultur: #568CBB;
|
|
69
|
+
$ds-hex-static-economy: #60BCA1;
|
|
70
|
+
$ds-hex-static-sport: #F58D2D;
|
|
71
|
+
$ds-hex-static-neutral-200: #E0E0E0;
|
|
72
|
+
$ds-hex-static-sthlm: #FF589B;
|
|
73
|
+
$ds-hex-static-ad-yellow: #FFEAC2;
|
|
74
|
+
$ds-hex-static-neutral-100: #EDEDED;
|
|
75
|
+
$ds-hex-static-neutral-500: #9E9E9E;
|
|
76
|
+
$ds-hex-static-red-500: #DA000D;
|
|
77
|
+
$ds-hex-static-yellow: #FFE600;
|
|
78
|
+
$ds-hex-static-red-200: #F6ACAD;
|
|
79
|
+
$ds-hex-static-red-0: #FCE8E8;
|
|
84
80
|
$ds-hex-gradient-content-fade-left: linear-gradient(90deg, #ffffff00 0%, #ffffff 100%);
|
|
85
81
|
$ds-hex-gradient-content-fade-right: linear-gradient(-90deg, #ffffff00 0%, #ffffff 100%);
|
|
86
82
|
$ds-hex-gradient-content-fade-up: linear-gradient(180deg, #ffffff00 0%, #ffffff 100%);
|
|
@@ -15,7 +15,6 @@ $ds-typography-detaildirekt-header: 'detaildirekt-header';
|
|
|
15
15
|
$ds-typography-detailteaser-standard-compact: 'detailteaser-standard-compact';
|
|
16
16
|
$ds-typography-detailteaser-standard-compact-opinion: 'detailteaser-standard-compact-opinion';
|
|
17
17
|
$ds-typography-detailteaser-large: 'detailteaser-large';
|
|
18
|
-
$ds-typography-detailteaser-breaking: 'detailteaser-breaking';
|
|
19
18
|
$ds-typography-detailteaser-large-opinion: 'detailteaser-large-opinion';
|
|
20
19
|
$ds-typography-detailteaser-large-storRubrik: 'detailteaser-large-storRubrik';
|
|
21
20
|
$ds-typography-detailteaser-standard: 'detailteaser-standard';
|
|
@@ -54,22 +54,15 @@ $typographyTokensScreenExtraLarge: (
|
|
|
54
54
|
fontFamily: "DN Serif Display",
|
|
55
55
|
fontWeight: Bold,
|
|
56
56
|
lineHeight: 1.1,
|
|
57
|
-
fontSize:
|
|
58
|
-
letterSpacing: 0
|
|
59
|
-
),
|
|
60
|
-
detailteaser-breaking: (
|
|
61
|
-
fontFamily: "DN Serif Display",
|
|
62
|
-
fontWeight: ExtraBold,
|
|
63
|
-
lineHeight: 1.1,
|
|
64
|
-
fontSize: 64,
|
|
57
|
+
fontSize: 56,
|
|
65
58
|
letterSpacing: 0
|
|
66
59
|
),
|
|
67
60
|
detailteaser-standard: (
|
|
68
61
|
fontFamily: "DN Serif Headline",
|
|
62
|
+
fontSize: 36,
|
|
69
63
|
lineHeight: 1.1,
|
|
70
64
|
letterSpacing: 0,
|
|
71
|
-
fontWeight: Bold
|
|
72
|
-
fontSize: 28
|
|
65
|
+
fontWeight: Bold
|
|
73
66
|
),
|
|
74
67
|
detailteaser-standard-compact: (
|
|
75
68
|
fontFamily: "DN Serif Headline",
|
|
@@ -81,7 +74,7 @@ $typographyTokensScreenExtraLarge: (
|
|
|
81
74
|
detailteaser-large-compact: (
|
|
82
75
|
fontFamily: "DN Serif Display",
|
|
83
76
|
fontWeight: Bold,
|
|
84
|
-
fontSize:
|
|
77
|
+
fontSize: 40,
|
|
85
78
|
lineHeight: 1.1,
|
|
86
79
|
letterSpacing: 0
|
|
87
80
|
),
|
|
@@ -93,13 +93,6 @@ $typographyTokensScreenLarge: (
|
|
|
93
93
|
fontSize: 40,
|
|
94
94
|
letterSpacing: 0
|
|
95
95
|
),
|
|
96
|
-
detailteaser-breaking: (
|
|
97
|
-
fontFamily: "DN Serif Display",
|
|
98
|
-
fontWeight: ExtraBold,
|
|
99
|
-
lineHeight: 1.1,
|
|
100
|
-
fontSize: 64,
|
|
101
|
-
letterSpacing: 0
|
|
102
|
-
),
|
|
103
96
|
detailteaser-large-opinion: (
|
|
104
97
|
fontFamily: "DN Serif Display",
|
|
105
98
|
fontWeight: Regular,
|
|
@@ -117,10 +110,10 @@ $typographyTokensScreenLarge: (
|
|
|
117
110
|
),
|
|
118
111
|
detailteaser-standard: (
|
|
119
112
|
fontFamily: "DN Serif Headline",
|
|
113
|
+
fontSize: 26,
|
|
120
114
|
lineHeight: 1.1,
|
|
121
115
|
letterSpacing: 0,
|
|
122
|
-
fontWeight: Bold
|
|
123
|
-
fontSize: 28
|
|
116
|
+
fontWeight: Bold
|
|
124
117
|
),
|
|
125
118
|
detailteaser-standard-opinion: (
|
|
126
119
|
fontFamily: "DN Serif Headline",
|
|
@@ -140,7 +133,7 @@ $typographyTokensScreenLarge: (
|
|
|
140
133
|
detailteaser-large-compact: (
|
|
141
134
|
fontFamily: "DN Serif Display",
|
|
142
135
|
fontWeight: Bold,
|
|
143
|
-
fontSize:
|
|
136
|
+
fontSize: 40,
|
|
144
137
|
lineHeight: 1.1,
|
|
145
138
|
letterSpacing: 0
|
|
146
139
|
),
|
|
@@ -122,13 +122,6 @@ $typographyTokensScreenSmall: (
|
|
|
122
122
|
fontSize: 26,
|
|
123
123
|
letterSpacing: 0
|
|
124
124
|
),
|
|
125
|
-
detailteaser-breaking: (
|
|
126
|
-
fontFamily: "DN Serif Display",
|
|
127
|
-
fontWeight: ExtraBold,
|
|
128
|
-
lineHeight: 1.1,
|
|
129
|
-
fontSize: 36,
|
|
130
|
-
letterSpacing: 0
|
|
131
|
-
),
|
|
132
125
|
detailteaser-large-opinion: (
|
|
133
126
|
fontFamily: "DN Serif Headline",
|
|
134
127
|
fontWeight: Regular,
|
|
@@ -146,10 +139,10 @@ $typographyTokensScreenSmall: (
|
|
|
146
139
|
),
|
|
147
140
|
detailteaser-standard: (
|
|
148
141
|
fontFamily: "DN Serif Headline",
|
|
142
|
+
fontSize: 20,
|
|
149
143
|
lineHeight: 1.2,
|
|
150
144
|
letterSpacing: 0,
|
|
151
|
-
fontWeight: Bold
|
|
152
|
-
fontSize: 20
|
|
145
|
+
fontWeight: Bold
|
|
153
146
|
),
|
|
154
147
|
detailteaser-standard-opinion: (
|
|
155
148
|
fontFamily: "DN Serif Headline",
|
|
@@ -163,14 +156,14 @@ $typographyTokensScreenSmall: (
|
|
|
163
156
|
fontFamily: "DN Serif Text",
|
|
164
157
|
fontWeight: Bold,
|
|
165
158
|
lineHeight: 1.2,
|
|
166
|
-
fontSize:
|
|
159
|
+
fontSize: 17,
|
|
167
160
|
letterSpacing: 0
|
|
168
161
|
),
|
|
169
162
|
detailteaser-large-compact: (
|
|
170
163
|
fontFamily: "DN Serif Headline",
|
|
171
164
|
fontWeight: Bold,
|
|
172
|
-
fontSize:
|
|
173
|
-
lineHeight: 1.
|
|
165
|
+
fontSize: 26,
|
|
166
|
+
lineHeight: 1.1,
|
|
174
167
|
letterSpacing: 0
|
|
175
168
|
),
|
|
176
169
|
detailteaser-large-compact-opinion: (
|
|
@@ -212,7 +205,7 @@ $typographyTokensScreenSmall: (
|
|
|
212
205
|
detailteaser-tipsa: (
|
|
213
206
|
fontFamily: "DN Serif Text",
|
|
214
207
|
fontWeight: Bold,
|
|
215
|
-
fontSize:
|
|
208
|
+
fontSize: 17,
|
|
216
209
|
lineHeight: 1.2,
|
|
217
210
|
letterSpacing: 0
|
|
218
211
|
),
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
interface MediaProps {
|
|
2
|
+
mediaHtml?: string;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export const Media = ({ mediaHtml }: MediaProps) => {
|
|
6
|
+
return mediaHtml && (<div className="ds-teaser__media" dangerouslySetInnerHTML={{ __html: mediaHtml }} />)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface ContentProps {
|
|
10
|
+
children: any;
|
|
11
|
+
}
|
|
12
|
+
export const Content = ({ children }: ContentProps) => {
|
|
13
|
+
return (<div className="ds-teaser__content">
|
|
14
|
+
{children}
|
|
15
|
+
</div>)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface TitleProps {
|
|
19
|
+
title?: string;
|
|
20
|
+
}
|
|
21
|
+
export const Title = ({ title }: TitleProps) => {
|
|
22
|
+
return title && (<h2 className="ds-teaser__title">{title}</h2>)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface BodyProps {
|
|
26
|
+
text?: string;
|
|
27
|
+
}
|
|
28
|
+
export const Body = ({ text }: BodyProps) => {
|
|
29
|
+
return text && (<p className="ds-teaser__text">{text}</p>)
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bonniernews/dn-design-system-web",
|
|
3
|
-
"version": "21.1.
|
|
3
|
+
"version": "21.1.1",
|
|
4
4
|
"description": "DN design system for web.",
|
|
5
5
|
"main": "index.tsx",
|
|
6
6
|
"type": "module",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"./assets/*.scss": "./assets/*.scss",
|
|
31
31
|
"./components/*": "./components/*",
|
|
32
32
|
"./njk-helpers/*": "./njk-helpers/*",
|
|
33
|
+
"./helpers/*": "./helpers/*",
|
|
33
34
|
"./introduction/*.md": "./introduction/*.md",
|
|
34
35
|
"./foundations/*": "./foundations/*",
|
|
35
36
|
"./tokens/*.json": "./tokens/*.json",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface TeaserCardsProps {
|
|
2
|
+
areaType?: 'right' | 'bauta' | 'bautaxl';
|
|
3
|
+
targetLink?: string;
|
|
4
|
+
theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
|
|
5
|
+
classes?: string;
|
|
6
|
+
/** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
|
|
7
|
+
attributes?: object;
|
|
8
|
+
children: any;
|
|
9
|
+
}
|
|
10
|
+
export declare const TeaserCard: ({ areaType, targetLink, theme, classes, attributes, children }: TeaserCardsProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface TeaserOnSiteProps {
|
|
2
|
+
areaType?: 'right' | 'bauta' | 'bautaxl';
|
|
3
|
+
targetLink?: string;
|
|
4
|
+
theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
|
|
5
|
+
classNames?: string;
|
|
6
|
+
/** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
|
|
7
|
+
attributes?: object;
|
|
8
|
+
mediaHtml?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
text?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const TeaserOnSite: ({ areaType, targetLink, theme, classNames, attributes, mediaHtml, title, text }: TeaserOnSiteProps) => import("preact").JSX.Element;
|
package/preact/components.cjs
CHANGED
|
@@ -26,27 +26,29 @@ __export(src_exports, {
|
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(src_exports);
|
|
28
28
|
|
|
29
|
+
// ../src/helpers/formatClassString.ts
|
|
30
|
+
var formatClassString = (classesArray) => {
|
|
31
|
+
return classesArray.filter((x) => !!x).join(" ");
|
|
32
|
+
};
|
|
33
|
+
|
|
29
34
|
// ../src/components/divider/divider.tsx
|
|
30
35
|
var import_jsx_runtime = require("preact/jsx-runtime");
|
|
31
36
|
var Divider = ({ variant = "soft", classNames, attributes }) => {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
componentClassName,
|
|
36
|
-
`${classNamePrefix}${variant}`,
|
|
37
|
+
const classes = formatClassString([
|
|
38
|
+
"ds-divider",
|
|
39
|
+
`ds-divider--${variant}`,
|
|
37
40
|
classNames
|
|
38
|
-
]
|
|
41
|
+
]);
|
|
39
42
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("hr", {}) });
|
|
40
43
|
};
|
|
41
44
|
|
|
42
45
|
// ../src/components/thematic-break/thematic-break.tsx
|
|
43
46
|
var import_jsx_runtime2 = require("preact/jsx-runtime");
|
|
44
47
|
var ThematicBreak = ({ classNames, attributes }) => {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
componentClassName,
|
|
48
|
+
const classes = formatClassString([
|
|
49
|
+
"ds-thematic-break",
|
|
48
50
|
classNames
|
|
49
|
-
]
|
|
51
|
+
]);
|
|
50
52
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: classes, ...attributes, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("hr", {}) });
|
|
51
53
|
};
|
|
52
54
|
|
|
@@ -54,12 +56,12 @@ var ThematicBreak = ({ classNames, attributes }) => {
|
|
|
54
56
|
var import_jsx_runtime3 = require("preact/jsx-runtime");
|
|
55
57
|
var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
|
|
56
58
|
const componentClassName = "ds-quote";
|
|
57
|
-
const classes = [
|
|
59
|
+
const classes = formatClassString([
|
|
58
60
|
componentClassName,
|
|
59
61
|
`ds-theme--${theme}`,
|
|
60
62
|
forcePx && "ds-force-px",
|
|
61
63
|
classNames
|
|
62
|
-
]
|
|
64
|
+
]);
|
|
63
65
|
const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
|
|
64
66
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
|
|
65
67
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../index.tsx", "../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Divider } from \"./components/divider/divider\";\nexport { Divider };\n\nimport { ThematicBreak } from \"./components/thematic-break/thematic-break\";\nexport { ThematicBreak };\n\nimport { Quote } from \"./components/quote/quote\";\nexport { Quote };\n", "export interface DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;
|
|
3
|
+
"sources": ["../index.tsx", "../helpers/formatClassString.ts", "../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.tsx"],
|
|
4
|
+
"sourcesContent": ["import { Divider } from \"./components/divider/divider\";\nexport { Divider };\n\nimport { ThematicBreak } from \"./components/thematic-break/thematic-break\";\nexport { ThematicBreak };\n\nimport { Quote } from \"./components/quote/quote\";\nexport { Quote };\n", "export const formatClassString = (classesArray: (string|undefined|false)[]): string => {\n return classesArray.filter(x => !!x).join(' ');\n}\n", "import { formatClassString } from \"@bonniernews/dn-design-system-web/helpers/formatClassString.ts\";\n\nexport interface DividerProps {\n variant?: 'soft' | 'medium' | 'hard';\n classNames?: string;\n attributes?: object;\n}\n\nexport const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {\n const classes = formatClassString([\n 'ds-divider',\n `ds-divider--${variant}`,\n classNames\n ])\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\n", "import { formatClassString } from \"@bonniernews/dn-design-system-web/helpers/formatClassString.ts\";\n\nexport interface ThematicBreakProps {\n classNames?: string;\n attributes?: object;\n}\n\nexport const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {\n const classes = formatClassString([\n 'ds-thematic-break',\n classNames\n ])\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default ThematicBreak;\n", "import { formatClassString } from \"@bonniernews/dn-design-system-web/helpers/formatClassString.ts\";\n\nexport interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n /** Ex. { target: \"_blank\", \"data-test\": \"lorem ipsum\" } */\n attributes?: object;\n forcePx?: boolean;\n}\n\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n\n const classes = formatClassString([\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames,\n ])\n\n const quoteHtml = `<span class=\"${componentClassName}__border\"></span> ${bodyHtml}`\n\n return (\n <blockquote dangerouslySetInnerHTML={{ __html: quoteHtml }} className={classes} {...attributes} />\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,oBAAoB,CAAC,iBAAqD;AACrF,SAAO,aAAa,OAAO,OAAK,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG;AAC/C;;;ACc6C;AARtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,eAAe,OAAO;AAAA,IACtB;AAAA,EACF,CAAC;AAED,SACE,4CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,sDAAC,QAAG,GAAE;AAEnD;;;ACJ6C,IAAAA,sBAAA;AAPtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,6CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,uDAAC,QAAG,GAAE;AAEnD;;;ACQI,IAAAC,sBAAA;AAbG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAE3B,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,CAAC;AAED,QAAM,YAAY,gBAAgB,kBAAkB,qBAAqB,QAAQ;AAEjF,SACE,6CAAC,gBAAW,yBAAyB,EAAE,QAAQ,UAAU,GAAG,WAAW,SAAU,GAAG,YAAY;AAEpG;",
|
|
6
6
|
"names": ["import_jsx_runtime", "import_jsx_runtime"]
|
|
7
7
|
}
|