@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.
Files changed (51) hide show
  1. package/CHANGELOG.md +14 -45
  2. package/assets/teaser/teaser.scss +0 -1
  3. package/components/divider/divider.tsx +6 -6
  4. package/components/group-header/group-header.scss +1 -1
  5. package/components/quote/quote.tsx +7 -3
  6. package/components/teaser-card/teaser-card.tsx +36 -0
  7. package/components/teaser-image/teaser-image.scss +1 -1
  8. package/components/teaser-large/teaser-large.njk +1 -7
  9. package/components/teaser-large/teaser-large.scss +0 -20
  10. package/components/teaser-native/teaser-native.scss +6 -0
  11. package/components/teaser-onsite/teaser-onsite.tsx +32 -0
  12. package/components/teaser-package/teaser-package.scss +6 -17
  13. package/components/teaser-split/teaser-split.scss +0 -2
  14. package/components/teaser-standard/teaser-standard.scss +6 -5
  15. package/components/thematic-break/thematic-break.tsx +5 -4
  16. package/foundations/helpers/colors.scss +6 -1
  17. package/foundations/variables/colorsCssVariables.scss +0 -4
  18. package/foundations/variables/colorsDnDarkTokens.scss +60 -64
  19. package/foundations/variables/colorsDnLightTokens.scss +51 -55
  20. package/foundations/variables/metrics.scss +1 -2
  21. package/foundations/variables/typographyFontWeight.scss +0 -1
  22. package/foundations/variables/typographyTokensList.scss +0 -1
  23. package/foundations/variables/typographyTokensScreenExtraLarge.scss +4 -11
  24. package/foundations/variables/typographyTokensScreenLarge.scss +3 -10
  25. package/foundations/variables/typographyTokensScreenSmall.scss +6 -13
  26. package/helpers/formatClassString.ts +3 -0
  27. package/helpers/teaser.tsx +30 -0
  28. package/package.json +2 -1
  29. package/preact/components/quote/quote.d.ts +1 -0
  30. package/preact/components/teaser-card/teaser-card.d.ts +10 -0
  31. package/preact/components/teaser-onsite/teaser-onsite.d.ts +12 -0
  32. package/preact/components.cjs +14 -12
  33. package/preact/components.cjs.map +3 -3
  34. package/preact/components.esm.js +14 -12
  35. package/preact/components.esm.js.map +3 -3
  36. package/react/components/quote/quote.d.ts +1 -0
  37. package/react/components/teaser-card/teaser-card.d.ts +10 -0
  38. package/react/components/teaser-onsite/teaser-onsite.d.ts +12 -0
  39. package/react/components.cjs +14 -12
  40. package/react/components.cjs.map +3 -3
  41. package/react/components.esm.js +14 -12
  42. package/react/components.esm.js.map +3 -3
  43. package/tokens/colors-css-variables.json +1 -5
  44. package/tokens/colors-dark-mode.json +60 -64
  45. package/tokens/colors-light-mode.json +53 -57
  46. package/tokens/typography-list.json +0 -1
  47. package/tokens-tmp/colors-css-variables.json +3 -0
  48. package/components/teaser-breaking/README-UXD.md +0 -0
  49. package/components/teaser-breaking/README.md +0 -46
  50. package/components/teaser-breaking/teaser-breaking.njk +0 -46
  51. package/components/teaser-breaking/teaser-breaking.scss +0 -52
@@ -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 componentClassName = 'ds-divider';\n const classNamePrefix = `${componentClassName}--`;\n const classes = [\n componentClassName,\n `${classNamePrefix}${variant}`,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\n", "export interface ThematicBreakProps {\n classNames?: string;\n attributes?: object;\n}\n\nexport const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {\n const componentClassName = 'ds-thematic-break';\n const classes = [\n componentClassName,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default ThematicBreak;\n", "export interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n attributes?: object;\n forcePx?: boolean;\n}\n\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n const classes = [\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames\n ].filter(Boolean).join(' ');\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;;;ACgB6C;AAVtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,qBAAqB;AAC3B,QAAM,kBAAkB,GAAG,kBAAkB;AAC7C,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAG,eAAe,GAAG,OAAO;AAAA,IAC5B;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,4CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,sDAAC,QAAG,GAAE;AAEnD;;;ACL6C,IAAAA,sBAAA;AARtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,6CAAC,SAAI,WAAW,SAAU,GAAG,YAAY,uDAAC,QAAG,GAAE;AAEnD;;;ACKI,IAAAC,sBAAA;AAZG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,QAAM,YAAY,gBAAgB,kBAAkB,qBAAqB,QAAQ;AAEjF,SACE,6CAAC,gBAAW,yBAAyB,EAAE,QAAQ,UAAU,GAAG,WAAW,SAAU,GAAG,YAAY;AAEpG;",
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
  }
@@ -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 componentClassName = "ds-divider";
5
- const classNamePrefix = `${componentClassName}--`;
6
- const classes = [
7
- componentClassName,
8
- `${classNamePrefix}${variant}`,
9
+ const classes = formatClassString([
10
+ "ds-divider",
11
+ `ds-divider--${variant}`,
9
12
  classNames
10
- ].filter(Boolean).join(" ");
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 componentClassName = "ds-thematic-break";
18
- const classes = [
19
- componentClassName,
20
+ const classes = formatClassString([
21
+ "ds-thematic-break",
20
22
  classNames
21
- ].filter(Boolean).join(" ");
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
- ].filter(Boolean).join(" ");
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 componentClassName = 'ds-divider';\n const classNamePrefix = `${componentClassName}--`;\n const classes = [\n componentClassName,\n `${classNamePrefix}${variant}`,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default Divider;\n", "export interface ThematicBreakProps {\n classNames?: string;\n attributes?: object;\n}\n\nexport const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {\n const componentClassName = 'ds-thematic-break';\n const classes = [\n componentClassName,\n classNames\n ].filter(Boolean).join(' ');\n\n return (\n <div className={classes} {...attributes}><hr /></div>\n );\n};\n\nexport default ThematicBreak;\n", "export interface QuoteProps {\n bodyHtml: string;\n theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';\n classNames?: string;\n attributes?: object;\n forcePx?: boolean;\n}\n\nexport const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {\n const componentClassName = 'ds-quote';\n const classes = [\n componentClassName,\n `ds-theme--${theme}`,\n forcePx && 'ds-force-px',\n classNames\n ].filter(Boolean).join(' ');\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": ";AAgB6C;AAVtC,IAAM,UAAU,CAAC,EAAE,UAAU,QAAQ,YAAY,WAAW,MAAoB;AACrF,QAAM,qBAAqB;AAC3B,QAAM,kBAAkB,GAAG,kBAAkB;AAC7C,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAG,eAAe,GAAG,OAAO;AAAA,IAC5B;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,oBAAC,SAAI,WAAW,SAAU,GAAG,YAAY,8BAAC,QAAG,GAAE;AAEnD;;;ACL6C,gBAAAA,YAAA;AARtC,IAAM,gBAAgB,CAAC,EAAE,YAAY,WAAW,MAA0B;AAC/E,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,SACE,gBAAAA,KAAC,SAAI,WAAW,SAAU,GAAG,YAAY,0BAAAA,KAAC,QAAG,GAAE;AAEnD;;;ACKI,gBAAAC,YAAA;AAZG,IAAM,QAAQ,CAAC,EAAE,UAAU,QAAQ,WAAW,YAAY,YAAY,QAAQ,MAAkB;AACrG,QAAM,qBAAqB;AAC3B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,aAAa,KAAK;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,EACF,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE1B,QAAM,YAAY,gBAAgB,kBAAkB,qBAAqB,QAAQ;AAEjF,SACE,gBAAAA,KAAC,gBAAW,yBAAyB,EAAE,QAAQ,UAAU,GAAG,WAAW,SAAU,GAAG,YAAY;AAEpG;",
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": "#ededed",
4
- "primary-02": "#b8b8b8",
3
+ "primary": "#EDEDED",
4
+ "primary-02": "#B8B8B8",
5
5
  "secondary": "#050505",
6
- "critical": "#fd2330",
7
- "disabled": "#b8b8b8",
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": "#fd2330",
13
- "body-link": "#65a0fc",
14
- "body-link-visited": "#65a0fc",
15
- "positive": "#3a8352",
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": "#ededed",
20
- "primary-02": "#cfcfcf",
18
+ "primary": "#EDEDED",
19
+ "primary-02": "#CFCFCF",
21
20
  "secondary": "#050505",
22
- "critical": "#fd2330",
23
- "disabled": "#b8b8b8",
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": "#fd2330",
29
- "culture": "#4293d7"
27
+ "brand": "#FD2330"
30
28
  },
31
29
  "component": {
32
- "brand": "#fd2330",
33
- "business": "#3a8352",
34
- "primary": "#ededed",
35
- "primary-overlay": "rgba(255, 255, 255, 0.13)",
36
- "primary-overlay-02": "#9e9e9e",
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": "rgba(8, 8, 8, 0.13)",
39
- "secondary-overlay-02": "rgba(8, 8, 8, 0.2)",
40
- "critical": "#ef7171",
41
- "critical-overlay": "#a51d24",
36
+ "secondary-overlay": "#08080821",
37
+ "secondary-overlay-02": "#08080833",
38
+ "critical": "#EF7171",
39
+ "critical-overlay": "#A51D24",
42
40
  "static-white": "#ffffff",
43
- "positive": "#3a8352",
44
- "primary-02": "#cfcfcf"
41
+ "positive": "#3A8352",
42
+ "primary-02": "#CFCFCF"
45
43
  },
46
44
  "surface": {
47
- "below": "#171717",
45
+ "below": "#262626",
48
46
  "background": "#050505",
49
- "raised": "#2b2b2b",
50
- "native-article": "#2b2b2b",
51
- "elevated": "#2b2b2b",
47
+ "raised": "#2B2B2B",
48
+ "native-article": "#2B2B2B",
49
+ "elevated": "#2B2B2B",
52
50
  "inverted": "#ffffff",
53
- "overlay": "rgba(5, 5, 5, 0.5)",
54
- "quiz": "#ea3e3f",
55
- "korsord": "#8bb6e8",
56
- "sudoko": "#90d0bd",
57
- "brand": "#da000d",
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": "rgba(255, 255, 255, 0.19)",
62
- "primary-02": "rgba(255, 255, 255, 0.4)",
63
- "primary-03": "#ededed",
58
+ "primary": "#3B3B3B",
59
+ "primary-02": "#ffffff66",
60
+ "primary-03": "#EDEDED",
64
61
  "secondary": "#141414",
65
- "business": "#3a8352",
66
- "critical": "#fd2330",
67
- "focus": "#fd2330",
62
+ "business": "#3A8352",
63
+ "critical": "#FD2330",
64
+ "focus": "#FD2330",
68
65
  "focus-02": "#ffffff",
69
- "focus-03": "#fd2330",
70
- "focus-04": "#3a8352",
71
- "brand": "#fd2330",
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": "#fad4d4",
81
+ "red-100": "#FAD4D4",
86
82
  "black": "#141414",
87
- "transparent-black": "rgba(20, 20, 20, 0.6)",
83
+ "transparent-black": "#14141499",
88
84
  "white": "#ffffff",
89
- "transparent-white": "rgba(255, 255, 255, 0.5)",
90
- "green-100": "#cee4d6",
91
- "red-300": "#ef7171",
92
- "transparent-white-10": "rgba(255, 255, 255, 0.13)",
93
- "kultur": "#568cbb",
94
- "economy": "#60bca1",
95
- "sport": "#f58d2d",
96
- "neutral-200": "#e0e0e0",
97
- "sthlm": "#ff589b",
98
- "ad-yellow": "#ffeac2",
99
- "neutral-100": "#ededed",
100
- "neutral-500": "#9e9e9e",
101
- "red-500": "#da000d",
102
- "yellow": "#ffe600",
103
- "red-200": "#f6acad",
104
- "red-0": "#fce8e8"
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": "#da000d",
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": "#da000d",
13
- "body-link": "#4373ce",
14
- "body-link-visited": "#4373ce",
15
- "positive": "#3a8352",
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": "#da000d",
21
+ "critical": "#DA000D",
23
22
  "disabled": "#666666",
24
23
  "on-brand": "#ffffff",
25
24
  "on-business": "#ffffff",
26
- "brand": "#da000d",
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": "#da000d",
33
- "business": "#3a8352",
30
+ "brand": "#DA000D",
31
+ "business": "#3A8352",
34
32
  "primary": "#141414",
35
- "primary-overlay": "rgba(8, 8, 8, 0.13)",
36
- "primary-overlay-02": "rgba(8, 8, 8, 0.2)",
33
+ "primary-overlay": "#08080821",
34
+ "primary-overlay-02": "#08080833",
37
35
  "secondary": "#ffffff",
38
- "secondary-overlay": "rgba(255, 255, 255, 0.13)",
39
- "secondary-overlay-02": "rgba(255, 255, 255, 0.2)",
40
- "critical": "#ea3e3f",
41
- "critical-overlay": "#a51d24",
36
+ "secondary-overlay": "#ffffff21",
37
+ "secondary-overlay-02": "#ffffff33",
38
+ "critical": "#EA3E3F",
39
+ "critical-overlay": "#A51D24",
42
40
  "static-white": "#ffffff",
43
- "positive": "#3a8352",
44
- "primary-02": "#cfcfcf"
41
+ "positive": "#3A8352",
42
+ "primary-02": "#CFCFCF"
45
43
  },
46
44
  "surface": {
47
- "below": "#f2f2f2",
48
- "native-article": "#ededed",
45
+ "below": "#EDEDED",
46
+ "native-article": "#EDEDED",
49
47
  "background": "#ffffff",
50
- "raised": "#ededed",
48
+ "raised": "#EDEDED",
51
49
  "elevated": "#ffffff",
52
- "overlay": "rgba(5, 5, 5, 0.5)",
53
- "quiz": "#ea3e3f",
54
- "korsord": "#8bb6e8",
55
- "sudoko": "#90d0bd",
56
- "brand": "#da000d",
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": "rgba(5, 5, 5, 0.13)",
62
- "primary-02": "rgba(8, 8, 8, 0.4)",
58
+ "primary": "#08080821",
59
+ "primary-02": "#08080866",
63
60
  "primary-03": "#050505",
64
61
  "secondary": "#ffffff",
65
- "business": "#3a8352",
66
- "critical": "#da000d",
67
- "focus": "#da000d",
62
+ "business": "#3A8352",
63
+ "critical": "#DA000D",
64
+ "focus": "#DA000D",
68
65
  "focus-02": "#141414",
69
- "focus-03": "#da000d",
70
- "focus-04": "#3a8352",
71
- "brand": "#da000d",
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": "#fad4d4",
74
+ "red-100": "#FAD4D4",
79
75
  "black": "#141414",
80
- "transparent-black": "rgba(20, 20, 20, 0.6)",
76
+ "transparent-black": "#14141499",
81
77
  "white": "#ffffff",
82
- "transparent-white": "rgba(255, 255, 255, 0.5)",
83
- "green-100": "#cee4d6",
84
- "red-300": "#ef7171",
85
- "transparent-white-10": "rgba(255, 255, 255, 0.13)",
86
- "kultur": "#568cbb",
87
- "economy": "#60bca1",
88
- "sport": "#f58d2d",
89
- "neutral-200": "#e0e0e0",
90
- "sthlm": "#ff589b",
91
- "ad-yellow": "#ffeac2",
92
- "neutral-100": "#ededed",
93
- "neutral-500": "#9e9e9e",
94
- "red-500": "#da000d",
95
- "yellow": "#ffe600",
96
- "red-200": "#f6acad",
97
- "red-0": "#fce8e8"
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
- }