@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/react/components.cjs.map
CHANGED
|
@@ -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
|
}
|
package/react/components.esm.js
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
+
// ../src/helpers/formatClassString.ts
|
|
2
|
+
var formatClassString = (classesArray) => {
|
|
3
|
+
return classesArray.filter((x) => !!x).join(" ");
|
|
4
|
+
};
|
|
5
|
+
|
|
1
6
|
// ../src/components/divider/divider.tsx
|
|
2
7
|
import { jsx } from "react/jsx-runtime";
|
|
3
8
|
var Divider = ({ variant = "soft", classNames, attributes }) => {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
componentClassName,
|
|
8
|
-
`${classNamePrefix}${variant}`,
|
|
9
|
+
const classes = formatClassString([
|
|
10
|
+
"ds-divider",
|
|
11
|
+
`ds-divider--${variant}`,
|
|
9
12
|
classNames
|
|
10
|
-
]
|
|
13
|
+
]);
|
|
11
14
|
return /* @__PURE__ */ jsx("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx("hr", {}) });
|
|
12
15
|
};
|
|
13
16
|
|
|
14
17
|
// ../src/components/thematic-break/thematic-break.tsx
|
|
15
18
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
16
19
|
var ThematicBreak = ({ classNames, attributes }) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
componentClassName,
|
|
20
|
+
const classes = formatClassString([
|
|
21
|
+
"ds-thematic-break",
|
|
20
22
|
classNames
|
|
21
|
-
]
|
|
23
|
+
]);
|
|
22
24
|
return /* @__PURE__ */ jsx2("div", { className: classes, ...attributes, children: /* @__PURE__ */ jsx2("hr", {}) });
|
|
23
25
|
};
|
|
24
26
|
|
|
@@ -26,12 +28,12 @@ var ThematicBreak = ({ classNames, attributes }) => {
|
|
|
26
28
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
27
29
|
var Quote = ({ bodyHtml, theme = "nyheter", classNames, attributes, forcePx }) => {
|
|
28
30
|
const componentClassName = "ds-quote";
|
|
29
|
-
const classes = [
|
|
31
|
+
const classes = formatClassString([
|
|
30
32
|
componentClassName,
|
|
31
33
|
`ds-theme--${theme}`,
|
|
32
34
|
forcePx && "ds-force-px",
|
|
33
35
|
classNames
|
|
34
|
-
]
|
|
36
|
+
]);
|
|
35
37
|
const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`;
|
|
36
38
|
return /* @__PURE__ */ jsx3("blockquote", { dangerouslySetInnerHTML: { __html: quoteHtml }, className: classes, ...attributes });
|
|
37
39
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.tsx"],
|
|
4
|
-
"sourcesContent": ["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": ";
|
|
3
|
+
"sources": ["../helpers/formatClassString.ts", "../components/divider/divider.tsx", "../components/thematic-break/thematic-break.tsx", "../components/quote/quote.tsx"],
|
|
4
|
+
"sourcesContent": ["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": ";AAAO,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,oBAAC,SAAI,WAAW,SAAU,GAAG,YAAY,8BAAC,QAAG,GAAE;AAEnD;;;ACJ6C,gBAAAA,YAAA;AAPtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,UAAU,kBAAkB;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE,gBAAAA,KAAC,SAAI,WAAW,SAAU,GAAG,YAAY,0BAAAA,KAAC,QAAG,GAAE;AAEnD;;;ACQI,gBAAAC,YAAA;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,gBAAAA,KAAC,gBAAW,yBAAyB,EAAE,QAAQ,UAAU,GAAG,WAAW,SAAU,GAAG,YAAY;AAEpG;",
|
|
6
6
|
"names": ["jsx", "jsx"]
|
|
7
7
|
}
|
|
@@ -12,7 +12,6 @@
|
|
|
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)",
|
|
16
15
|
"icon-primary": "var(--ds-color-icon-primary)",
|
|
17
16
|
"icon-primary-02": "var(--ds-color-icon-primary-02)",
|
|
18
17
|
"icon-secondary": "var(--ds-color-icon-secondary)",
|
|
@@ -23,7 +22,6 @@
|
|
|
23
22
|
"icon-brand": "var(--ds-color-icon-brand)",
|
|
24
23
|
"icon-on-critical": "var(--ds-color-icon-on-critical)",
|
|
25
24
|
"icon-on-success": "var(--ds-color-icon-on-success)",
|
|
26
|
-
"icon-culture": "var(--ds-color-icon-culture)",
|
|
27
25
|
"component-brand": "var(--ds-color-component-brand)",
|
|
28
26
|
"component-business": "var(--ds-color-component-business)",
|
|
29
27
|
"component-primary": "var(--ds-color-component-primary)",
|
|
@@ -48,7 +46,6 @@
|
|
|
48
46
|
"surface-sudoko": "var(--ds-color-surface-sudoko)",
|
|
49
47
|
"surface-brand": "var(--ds-color-surface-brand)",
|
|
50
48
|
"surface-inverted": "var(--ds-color-surface-inverted)",
|
|
51
|
-
"surface-breaking": "var(--ds-color-surface-breaking)",
|
|
52
49
|
"border-primary": "var(--ds-color-border-primary)",
|
|
53
50
|
"border-primary-02": "var(--ds-color-border-primary-02)",
|
|
54
51
|
"border-primary-03": "var(--ds-color-border-primary-03)",
|
|
@@ -60,7 +57,6 @@
|
|
|
60
57
|
"border-focus-03": "var(--ds-color-border-focus-03)",
|
|
61
58
|
"border-focus-04": "var(--ds-color-border-focus-04)",
|
|
62
59
|
"border-brand": "var(--ds-color-border-brand)",
|
|
63
|
-
"border-culture": "var(--ds-color-border-culture)",
|
|
64
60
|
"background-primary": "var(--ds-color-background-primary)",
|
|
65
61
|
"static-red-100": "var(--ds-color-static-red-100)",
|
|
66
62
|
"static-black": "var(--ds-color-static-black)",
|
|
@@ -86,4 +82,4 @@
|
|
|
86
82
|
"gradient-content-fade-right": "var(--ds-color-gradient-content-fade-right)",
|
|
87
83
|
"gradient-content-fade-up": "var(--ds-color-gradient-content-fade-up)",
|
|
88
84
|
"gradient-content-fade-down": "var(--ds-color-gradient-content-fade-down)"
|
|
89
|
-
}
|
|
85
|
+
}
|
|
@@ -1,75 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"text": {
|
|
3
|
-
"primary": "#
|
|
4
|
-
"primary-02": "#
|
|
3
|
+
"primary": "#EDEDED",
|
|
4
|
+
"primary-02": "#B8B8B8",
|
|
5
5
|
"secondary": "#050505",
|
|
6
|
-
"critical": "#
|
|
7
|
-
"disabled": "#
|
|
6
|
+
"critical": "#FD2330",
|
|
7
|
+
"disabled": "#B8B8B8",
|
|
8
8
|
"on-brand": "#ffffff",
|
|
9
9
|
"on-business": "#ffffff",
|
|
10
10
|
"on-critical": "#ffffff",
|
|
11
11
|
"on-success": "#ffffff",
|
|
12
|
-
"brand": "#
|
|
13
|
-
"body-link": "#
|
|
14
|
-
"body-link-visited": "#
|
|
15
|
-
"positive": "#
|
|
16
|
-
"culture": "#4293d7"
|
|
12
|
+
"brand": "#FD2330",
|
|
13
|
+
"body-link": "#65A0FC",
|
|
14
|
+
"body-link-visited": "#65A0FC",
|
|
15
|
+
"positive": "#3A8352"
|
|
17
16
|
},
|
|
18
17
|
"icon": {
|
|
19
|
-
"primary": "#
|
|
20
|
-
"primary-02": "#
|
|
18
|
+
"primary": "#EDEDED",
|
|
19
|
+
"primary-02": "#CFCFCF",
|
|
21
20
|
"secondary": "#050505",
|
|
22
|
-
"critical": "#
|
|
23
|
-
"disabled": "#
|
|
21
|
+
"critical": "#FD2330",
|
|
22
|
+
"disabled": "#B8B8B8",
|
|
24
23
|
"on-brand": "#141414",
|
|
25
24
|
"on-critical": "#ffffff",
|
|
26
25
|
"on-success": "#ffffff",
|
|
27
26
|
"on-business": "#ffffff",
|
|
28
|
-
"brand": "#
|
|
29
|
-
"culture": "#4293d7"
|
|
27
|
+
"brand": "#FD2330"
|
|
30
28
|
},
|
|
31
29
|
"component": {
|
|
32
|
-
"brand": "#
|
|
33
|
-
"business": "#
|
|
34
|
-
"primary": "#
|
|
35
|
-
"primary-overlay": "
|
|
36
|
-
"primary-overlay-02": "#
|
|
30
|
+
"brand": "#FD2330",
|
|
31
|
+
"business": "#3A8352",
|
|
32
|
+
"primary": "#EDEDED",
|
|
33
|
+
"primary-overlay": "#ffffff21",
|
|
34
|
+
"primary-overlay-02": "#9E9E9E",
|
|
37
35
|
"secondary": "#050505",
|
|
38
|
-
"secondary-overlay": "
|
|
39
|
-
"secondary-overlay-02": "
|
|
40
|
-
"critical": "#
|
|
41
|
-
"critical-overlay": "#
|
|
36
|
+
"secondary-overlay": "#08080821",
|
|
37
|
+
"secondary-overlay-02": "#08080833",
|
|
38
|
+
"critical": "#EF7171",
|
|
39
|
+
"critical-overlay": "#A51D24",
|
|
42
40
|
"static-white": "#ffffff",
|
|
43
|
-
"positive": "#
|
|
44
|
-
"primary-02": "#
|
|
41
|
+
"positive": "#3A8352",
|
|
42
|
+
"primary-02": "#CFCFCF"
|
|
45
43
|
},
|
|
46
44
|
"surface": {
|
|
47
|
-
"below": "#
|
|
45
|
+
"below": "#262626",
|
|
48
46
|
"background": "#050505",
|
|
49
|
-
"raised": "#
|
|
50
|
-
"native-article": "#
|
|
51
|
-
"elevated": "#
|
|
47
|
+
"raised": "#2B2B2B",
|
|
48
|
+
"native-article": "#2B2B2B",
|
|
49
|
+
"elevated": "#2B2B2B",
|
|
52
50
|
"inverted": "#ffffff",
|
|
53
|
-
"overlay": "
|
|
54
|
-
"quiz": "#
|
|
55
|
-
"korsord": "#
|
|
56
|
-
"sudoko": "#
|
|
57
|
-
"brand": "#
|
|
58
|
-
"breaking": "#300407"
|
|
51
|
+
"overlay": "#05050580",
|
|
52
|
+
"quiz": "#EA3E3F",
|
|
53
|
+
"korsord": "#8BB6E8",
|
|
54
|
+
"sudoko": "#90D0BD",
|
|
55
|
+
"brand": "#DA000D"
|
|
59
56
|
},
|
|
60
57
|
"border": {
|
|
61
|
-
"primary": "
|
|
62
|
-
"primary-02": "
|
|
63
|
-
"primary-03": "#
|
|
58
|
+
"primary": "#3B3B3B",
|
|
59
|
+
"primary-02": "#ffffff66",
|
|
60
|
+
"primary-03": "#EDEDED",
|
|
64
61
|
"secondary": "#141414",
|
|
65
|
-
"business": "#
|
|
66
|
-
"critical": "#
|
|
67
|
-
"focus": "#
|
|
62
|
+
"business": "#3A8352",
|
|
63
|
+
"critical": "#FD2330",
|
|
64
|
+
"focus": "#FD2330",
|
|
68
65
|
"focus-02": "#ffffff",
|
|
69
|
-
"focus-03": "#
|
|
70
|
-
"focus-04": "#
|
|
71
|
-
"brand": "#
|
|
72
|
-
"culture": "#4293d7"
|
|
66
|
+
"focus-03": "#FD2330",
|
|
67
|
+
"focus-04": "#3A8352",
|
|
68
|
+
"brand": "#DA000D"
|
|
73
69
|
},
|
|
74
70
|
"background": {
|
|
75
71
|
"primary": "#141414"
|
|
@@ -82,25 +78,25 @@
|
|
|
82
78
|
"content-fade-down": "linear-gradient(0deg, #05050500 0%, #050505 100%)"
|
|
83
79
|
},
|
|
84
80
|
"static": {
|
|
85
|
-
"red-100": "#
|
|
81
|
+
"red-100": "#FAD4D4",
|
|
86
82
|
"black": "#141414",
|
|
87
|
-
"transparent-black": "
|
|
83
|
+
"transparent-black": "#14141499",
|
|
88
84
|
"white": "#ffffff",
|
|
89
|
-
"transparent-white": "
|
|
90
|
-
"green-100": "#
|
|
91
|
-
"red-300": "#
|
|
92
|
-
"transparent-white-10": "
|
|
93
|
-
"kultur": "#
|
|
94
|
-
"economy": "#
|
|
95
|
-
"sport": "#
|
|
96
|
-
"neutral-200": "#
|
|
97
|
-
"sthlm": "#
|
|
98
|
-
"ad-yellow": "#
|
|
99
|
-
"neutral-100": "#
|
|
100
|
-
"neutral-500": "#
|
|
101
|
-
"red-500": "#
|
|
102
|
-
"yellow": "#
|
|
103
|
-
"red-200": "#
|
|
104
|
-
"red-0": "#
|
|
85
|
+
"transparent-white": "#ffffff80",
|
|
86
|
+
"green-100": "#CEE4D6",
|
|
87
|
+
"red-300": "#EF7171",
|
|
88
|
+
"transparent-white-10": "#ffffff21",
|
|
89
|
+
"kultur": "#568CBB",
|
|
90
|
+
"economy": "#60BCA1",
|
|
91
|
+
"sport": "#F58D2D",
|
|
92
|
+
"neutral-200": "#E0E0E0",
|
|
93
|
+
"sthlm": "#FF589B",
|
|
94
|
+
"ad-yellow": "#FFEAC2",
|
|
95
|
+
"neutral-100": "#EDEDED",
|
|
96
|
+
"neutral-500": "#9E9E9E",
|
|
97
|
+
"red-500": "#DA000D",
|
|
98
|
+
"yellow": "#FFE600",
|
|
99
|
+
"red-200": "#F6ACAD",
|
|
100
|
+
"red-0": "#FCE8E8"
|
|
105
101
|
}
|
|
106
102
|
}
|
|
@@ -3,98 +3,94 @@
|
|
|
3
3
|
"primary": "#050505",
|
|
4
4
|
"primary-02": "#666666",
|
|
5
5
|
"secondary": "#ffffff",
|
|
6
|
-
"critical": "#
|
|
6
|
+
"critical": "#DA000D",
|
|
7
7
|
"disabled": "#666666",
|
|
8
8
|
"on-brand": "#ffffff",
|
|
9
9
|
"on-business": "#ffffff",
|
|
10
10
|
"on-critical": "#ffffff",
|
|
11
11
|
"on-success": "#ffffff",
|
|
12
|
-
"brand": "#
|
|
13
|
-
"body-link": "#
|
|
14
|
-
"body-link-visited": "#
|
|
15
|
-
"positive": "#
|
|
16
|
-
"culture": "#227ac3"
|
|
12
|
+
"brand": "#DA000D",
|
|
13
|
+
"body-link": "#4373CE",
|
|
14
|
+
"body-link-visited": "#4373CE",
|
|
15
|
+
"positive": "#3A8352"
|
|
17
16
|
},
|
|
18
17
|
"icon": {
|
|
19
18
|
"primary": "#050505",
|
|
20
19
|
"primary-02": "#666666",
|
|
21
20
|
"secondary": "#ffffff",
|
|
22
|
-
"critical": "#
|
|
21
|
+
"critical": "#DA000D",
|
|
23
22
|
"disabled": "#666666",
|
|
24
23
|
"on-brand": "#ffffff",
|
|
25
24
|
"on-business": "#ffffff",
|
|
26
|
-
"brand": "#
|
|
25
|
+
"brand": "#DA000D",
|
|
27
26
|
"on-critical": "#ffffff",
|
|
28
|
-
"on-success": "#ffffff"
|
|
29
|
-
"culture": "#227ac3"
|
|
27
|
+
"on-success": "#ffffff"
|
|
30
28
|
},
|
|
31
29
|
"component": {
|
|
32
|
-
"brand": "#
|
|
33
|
-
"business": "#
|
|
30
|
+
"brand": "#DA000D",
|
|
31
|
+
"business": "#3A8352",
|
|
34
32
|
"primary": "#141414",
|
|
35
|
-
"primary-overlay": "
|
|
36
|
-
"primary-overlay-02": "
|
|
33
|
+
"primary-overlay": "#08080821",
|
|
34
|
+
"primary-overlay-02": "#08080833",
|
|
37
35
|
"secondary": "#ffffff",
|
|
38
|
-
"secondary-overlay": "
|
|
39
|
-
"secondary-overlay-02": "
|
|
40
|
-
"critical": "#
|
|
41
|
-
"critical-overlay": "#
|
|
36
|
+
"secondary-overlay": "#ffffff21",
|
|
37
|
+
"secondary-overlay-02": "#ffffff33",
|
|
38
|
+
"critical": "#EA3E3F",
|
|
39
|
+
"critical-overlay": "#A51D24",
|
|
42
40
|
"static-white": "#ffffff",
|
|
43
|
-
"positive": "#
|
|
44
|
-
"primary-02": "#
|
|
41
|
+
"positive": "#3A8352",
|
|
42
|
+
"primary-02": "#CFCFCF"
|
|
45
43
|
},
|
|
46
44
|
"surface": {
|
|
47
|
-
"below": "#
|
|
48
|
-
"native-article": "#
|
|
45
|
+
"below": "#EDEDED",
|
|
46
|
+
"native-article": "#EDEDED",
|
|
49
47
|
"background": "#ffffff",
|
|
50
|
-
"raised": "#
|
|
48
|
+
"raised": "#EDEDED",
|
|
51
49
|
"elevated": "#ffffff",
|
|
52
|
-
"overlay": "
|
|
53
|
-
"quiz": "#
|
|
54
|
-
"korsord": "#
|
|
55
|
-
"sudoko": "#
|
|
56
|
-
"brand": "#
|
|
57
|
-
"inverted": "#141414"
|
|
58
|
-
"breaking": "#300407"
|
|
50
|
+
"overlay": "#05050580",
|
|
51
|
+
"quiz": "#EA3E3F",
|
|
52
|
+
"korsord": "#8BB6E8",
|
|
53
|
+
"sudoko": "#90D0BD",
|
|
54
|
+
"brand": "#DA000D",
|
|
55
|
+
"inverted": "#141414"
|
|
59
56
|
},
|
|
60
57
|
"border": {
|
|
61
|
-
"primary": "
|
|
62
|
-
"primary-02": "
|
|
58
|
+
"primary": "#08080821",
|
|
59
|
+
"primary-02": "#08080866",
|
|
63
60
|
"primary-03": "#050505",
|
|
64
61
|
"secondary": "#ffffff",
|
|
65
|
-
"business": "#
|
|
66
|
-
"critical": "#
|
|
67
|
-
"focus": "#
|
|
62
|
+
"business": "#3A8352",
|
|
63
|
+
"critical": "#DA000D",
|
|
64
|
+
"focus": "#DA000D",
|
|
68
65
|
"focus-02": "#141414",
|
|
69
|
-
"focus-03": "#
|
|
70
|
-
"focus-04": "#
|
|
71
|
-
"brand": "#
|
|
72
|
-
"culture": "#227ac3"
|
|
66
|
+
"focus-03": "#DA000D",
|
|
67
|
+
"focus-04": "#3A8352",
|
|
68
|
+
"brand": "#DA000D"
|
|
73
69
|
},
|
|
74
70
|
"background": {
|
|
75
71
|
"primary": "#ffffff"
|
|
76
72
|
},
|
|
77
73
|
"static": {
|
|
78
|
-
"red-100": "#
|
|
74
|
+
"red-100": "#FAD4D4",
|
|
79
75
|
"black": "#141414",
|
|
80
|
-
"transparent-black": "
|
|
76
|
+
"transparent-black": "#14141499",
|
|
81
77
|
"white": "#ffffff",
|
|
82
|
-
"transparent-white": "
|
|
83
|
-
"green-100": "#
|
|
84
|
-
"red-300": "#
|
|
85
|
-
"transparent-white-10": "
|
|
86
|
-
"kultur": "#
|
|
87
|
-
"economy": "#
|
|
88
|
-
"sport": "#
|
|
89
|
-
"neutral-200": "#
|
|
90
|
-
"sthlm": "#
|
|
91
|
-
"ad-yellow": "#
|
|
92
|
-
"neutral-100": "#
|
|
93
|
-
"neutral-500": "#
|
|
94
|
-
"red-500": "#
|
|
95
|
-
"yellow": "#
|
|
96
|
-
"red-200": "#
|
|
97
|
-
"red-0": "#
|
|
78
|
+
"transparent-white": "#ffffff80",
|
|
79
|
+
"green-100": "#CEE4D6",
|
|
80
|
+
"red-300": "#EF7171",
|
|
81
|
+
"transparent-white-10": "#ffffff21",
|
|
82
|
+
"kultur": "#568CBB",
|
|
83
|
+
"economy": "#60BCA1",
|
|
84
|
+
"sport": "#F58D2D",
|
|
85
|
+
"neutral-200": "#E0E0E0",
|
|
86
|
+
"sthlm": "#FF589B",
|
|
87
|
+
"ad-yellow": "#FFEAC2",
|
|
88
|
+
"neutral-100": "#EDEDED",
|
|
89
|
+
"neutral-500": "#9E9E9E",
|
|
90
|
+
"red-500": "#DA000D",
|
|
91
|
+
"yellow": "#FFE600",
|
|
92
|
+
"red-200": "#F6ACAD",
|
|
93
|
+
"red-0": "#FCE8E8"
|
|
98
94
|
},
|
|
99
95
|
"gradient": {
|
|
100
96
|
"content-fade-left": "linear-gradient(90deg, #ffffff00 0%, #ffffff 100%)",
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
"detailteaser-standard-compact": "'detailteaser-standard-compact'",
|
|
17
17
|
"detailteaser-standard-compact-opinion": "'detailteaser-standard-compact-opinion'",
|
|
18
18
|
"detailteaser-large": "'detailteaser-large'",
|
|
19
|
-
"detailteaser-breaking": "'detailteaser-breaking'",
|
|
20
19
|
"detailteaser-large-opinion": "'detailteaser-large-opinion'",
|
|
21
20
|
"detailteaser-large-storRubrik": "'detailteaser-large-storRubrik'",
|
|
22
21
|
"detailteaser-standard": "'detailteaser-standard'",
|
|
@@ -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
|
-
}
|