@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.
Files changed (52) hide show
  1. package/CHANGELOG.md +16 -47
  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/link-box/link-box.scss +2 -1
  6. package/components/quote/quote.tsx +7 -3
  7. package/components/teaser-card/teaser-card.tsx +36 -0
  8. package/components/teaser-image/teaser-image.scss +1 -1
  9. package/components/teaser-large/teaser-large.njk +1 -7
  10. package/components/teaser-large/teaser-large.scss +0 -20
  11. package/components/teaser-native/teaser-native.scss +6 -0
  12. package/components/teaser-onsite/teaser-onsite.tsx +32 -0
  13. package/components/teaser-package/teaser-package.scss +6 -17
  14. package/components/teaser-split/teaser-split.scss +0 -2
  15. package/components/teaser-standard/teaser-standard.scss +6 -5
  16. package/components/thematic-break/thematic-break.tsx +5 -4
  17. package/foundations/helpers/colors.scss +6 -1
  18. package/foundations/variables/colorsCssVariables.scss +0 -4
  19. package/foundations/variables/colorsDnDarkTokens.scss +60 -64
  20. package/foundations/variables/colorsDnLightTokens.scss +51 -55
  21. package/foundations/variables/metrics.scss +1 -2
  22. package/foundations/variables/typographyFontWeight.scss +0 -1
  23. package/foundations/variables/typographyTokensList.scss +0 -1
  24. package/foundations/variables/typographyTokensScreenExtraLarge.scss +4 -11
  25. package/foundations/variables/typographyTokensScreenLarge.scss +3 -10
  26. package/foundations/variables/typographyTokensScreenSmall.scss +6 -13
  27. package/helpers/formatClassString.ts +3 -0
  28. package/helpers/teaser.tsx +30 -0
  29. package/package.json +2 -1
  30. package/preact/components/quote/quote.d.ts +1 -0
  31. package/preact/components/teaser-card/teaser-card.d.ts +10 -0
  32. package/preact/components/teaser-onsite/teaser-onsite.d.ts +12 -0
  33. package/preact/components.cjs +14 -12
  34. package/preact/components.cjs.map +3 -3
  35. package/preact/components.esm.js +14 -12
  36. package/preact/components.esm.js.map +3 -3
  37. package/react/components/quote/quote.d.ts +1 -0
  38. package/react/components/teaser-card/teaser-card.d.ts +10 -0
  39. package/react/components/teaser-onsite/teaser-onsite.d.ts +12 -0
  40. package/react/components.cjs +14 -12
  41. package/react/components.cjs.map +3 -3
  42. package/react/components.esm.js +14 -12
  43. package/react/components.esm.js.map +3 -3
  44. package/tokens/colors-css-variables.json +1 -5
  45. package/tokens/colors-dark-mode.json +60 -64
  46. package/tokens/colors-light-mode.json +53 -57
  47. package/tokens/typography-list.json +0 -1
  48. package/tokens-tmp/colors-css-variables.json +3 -0
  49. package/components/teaser-breaking/README-UXD.md +0 -0
  50. package/components/teaser-breaking/README.md +0 -46
  51. package/components/teaser-breaking/teaser-breaking.njk +0 -46
  52. package/components/teaser-breaking/teaser-breaking.scss +0 -52
package/CHANGELOG.md CHANGED
@@ -4,69 +4,45 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
- ## [21.1.0-beta.5](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.1.0-beta.4...@bonniernews/dn-design-system-web@21.1.0-beta.5) (2024-11-08)
7
+ ## [21.1.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.1.0...@bonniernews/dn-design-system-web@21.1.1) (2024-11-15)
8
8
 
9
9
 
10
10
  ### Bug Fixes
11
11
 
12
- * **web:** support breaking no image ([#1492](https://github.com/BonnierNews/dn-design-system/issues/1492)) ([dbf30ca](https://github.com/BonnierNews/dn-design-system/commit/dbf30ca9420bd8bc173de127499c0260abc3990a))
12
+ * **web:** correct spacing in linkbox ([#1497](https://github.com/BonnierNews/dn-design-system/issues/1497)) ([54e78f2](https://github.com/BonnierNews/dn-design-system/commit/54e78f28880ef7b1a735b8f528bfcb55b545e11a))
13
13
 
14
- ## [21.1.0-beta.4](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.1.0-beta.3...@bonniernews/dn-design-system-web@21.1.0-beta.4) (2024-11-06)
15
-
16
- ## [21.1.0-beta.3](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.2...@bonniernews/dn-design-system-web@21.1.0-beta.3) (2024-11-06)
14
+ ## [21.1.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.4...@bonniernews/dn-design-system-web@21.1.0) (2024-11-11)
17
15
 
18
16
 
19
17
  ### Features
20
18
 
21
- * **web:** breaking aka nivå3puff till visuella toppar ([#1450](https://github.com/BonnierNews/dn-design-system/issues/1450)) ([5adacb9](https://github.com/BonnierNews/dn-design-system/commit/5adacb9d8b1fadecd615278e63139627f3b88cb7))
22
- * **web:** nivå1puff till visuella toppar ([#1460](https://github.com/BonnierNews/dn-design-system/issues/1460)) ([7743c3b](https://github.com/BonnierNews/dn-design-system/commit/7743c3bfad040b46921e934570808b33083401ce))
23
- * **web:** one level of bauta with background color ([9184544](https://github.com/BonnierNews/dn-design-system/commit/91845447403cb2ec5a787fd64c341d620861b148))
24
- * **web:** one level of bauta with background color ([644acd6](https://github.com/BonnierNews/dn-design-system/commit/644acd6166d7385ac08c930fe725215a9e35fc80))
19
+ * **web:** one level of bauta with background color ([#1428](https://github.com/BonnierNews/dn-design-system/issues/1428)) ([c78c0a5](https://github.com/BonnierNews/dn-design-system/commit/c78c0a5e8a05a4ee4d31d7a58e5d23b1c39a7807))
20
+ * **web:** tsx component teaser on site ([#1479](https://github.com/BonnierNews/dn-design-system/issues/1479)) ([e10f001](https://github.com/BonnierNews/dn-design-system/commit/e10f001fc5300837c7bf7a98958a1d806c6f84db))
25
21
 
22
+ ## [21.0.4](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.3...@bonniernews/dn-design-system-web@21.0.4) (2024-11-06)
26
23
 
27
- ### Bug Fixes
28
24
 
29
- * **web:** correct spacing teasers ([#1491](https://github.com/BonnierNews/dn-design-system/issues/1491)) ([b2624b8](https://github.com/BonnierNews/dn-design-system/commit/b2624b8311384d38971f82eb84e73560244a4b18))
30
- * **web:** media box sizing border box ([#1473](https://github.com/BonnierNews/dn-design-system/issues/1473)) ([48aeeca](https://github.com/BonnierNews/dn-design-system/commit/48aeecac1be293bbcb8ece678d562c26c0ec59d6))
25
+ ### Maintenance
26
+
27
+ * **foundations:** update tokens from Figma ([#1490](https://github.com/BonnierNews/dn-design-system/issues/1490)) ([aa7bcf3](https://github.com/BonnierNews/dn-design-system/commit/aa7bcf362f8f8f0495cbd6aa1ad12cc5c677ce24))
28
+ * prerelease packages ([92a0383](https://github.com/BonnierNews/dn-design-system/commit/92a038392e8bc9b4bfa8b3f2dc508b16ef1ff4cf))
29
+
30
+ ## [21.0.3](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.2...@bonniernews/dn-design-system-web@21.0.3) (2024-11-04)
31
31
 
32
32
 
33
33
  ### Maintenance
34
34
 
35
35
  * **deps-dev:** bump @babel/preset-env from 7.25.8 to 7.25.9 ([#1469](https://github.com/BonnierNews/dn-design-system/issues/1469)) ([b9a9884](https://github.com/BonnierNews/dn-design-system/commit/b9a988470f8862d4c010f27a097d9a65af115d2b))
36
36
  * **deps-dev:** bump @testing-library/react-native from 12.7.2 to 12.8.0 ([#1477](https://github.com/BonnierNews/dn-design-system/issues/1477)) ([59e489f](https://github.com/BonnierNews/dn-design-system/commit/59e489f4227e83e1d6df43eb9acf6c1ea42db3e3))
37
+ * **deps-dev:** bump @testing-library/react-native from 12.8.0 to 12.8.1 ([#1487](https://github.com/BonnierNews/dn-design-system/issues/1487)) ([86b9369](https://github.com/BonnierNews/dn-design-system/commit/86b93691f2697715eb79a487ed92d953e5b36f83))
37
38
  * **deps:** bump @react-native-community/slider from 4.5.4 to 4.5.5 ([#1475](https://github.com/BonnierNews/dn-design-system/issues/1475)) ([c321542](https://github.com/BonnierNews/dn-design-system/commit/c321542bdf60e16f86fc02cae937b301e649bb48))
39
+ * **deps:** bump elliptic from 6.5.7 to 6.6.0 ([#1483](https://github.com/BonnierNews/dn-design-system/issues/1483)) ([508f43d](https://github.com/BonnierNews/dn-design-system/commit/508f43dfac81353fe472079c406c8c7989bd36f4))
38
40
  * **foundations:** update tokens from Figma ([#1467](https://github.com/BonnierNews/dn-design-system/issues/1467)) ([af2cd99](https://github.com/BonnierNews/dn-design-system/commit/af2cd99ce8ab17494a3e51e34588d25e24a9ef38))
41
+ * **foundations:** update tokens from Figma ([#1484](https://github.com/BonnierNews/dn-design-system/issues/1484)) ([41db5ef](https://github.com/BonnierNews/dn-design-system/commit/41db5ef5f44aa64adbd5d3eedd522274df273834))
42
+ * prerelease packages ([0658681](https://github.com/BonnierNews/dn-design-system/commit/065868135bd5c468f65dafa447f7cbc08928d375))
39
43
  * prerelease packages ([974fe99](https://github.com/BonnierNews/dn-design-system/commit/974fe99363323771a4284b36a895757fd4c49630))
40
44
  * prerelease packages ([3ebfd91](https://github.com/BonnierNews/dn-design-system/commit/3ebfd91c6780c6222c74b500eade9fd19cac88f3))
41
45
  * **web:** change screenshot location ([#1482](https://github.com/BonnierNews/dn-design-system/issues/1482)) ([472d0df](https://github.com/BonnierNews/dn-design-system/commit/472d0df71292d72206f908b82b45148a3b79cb91))
42
- * **web:** released version v21.1.0-beta.1 ([9d45c5a](https://github.com/BonnierNews/dn-design-system/commit/9d45c5a4bbcfe53698ca9dffe3e1771422fbcdac))
43
- * **web:** released version v21.1.0-beta.2 ([49b9324](https://github.com/BonnierNews/dn-design-system/commit/49b9324c7074d6835aab2de9bb7d9e18649f58b6))
44
- * **web:** visuella-toppar-update-tokens ([#1468](https://github.com/BonnierNews/dn-design-system/issues/1468)) ([943705a](https://github.com/BonnierNews/dn-design-system/commit/943705afb2922c4d32bb4e042cd746857cbd26cf))
45
-
46
- ## [21.1.0-beta.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.1.0-beta.1...@bonniernews/dn-design-system-web@21.1.0-beta.2) (2024-10-25)
47
-
48
-
49
- ### Bug Fixes
50
-
51
- * **web:** media box sizing border box ([#1473](https://github.com/BonnierNews/dn-design-system/issues/1473)) ([e132abf](https://github.com/BonnierNews/dn-design-system/commit/e132abf44fc8d525fed7ff565ebdcc3702941669))
52
-
53
- ## [21.1.0-beta.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.2...@bonniernews/dn-design-system-web@21.1.0-beta.1) (2024-10-25)
54
-
55
-
56
- ### Features
57
-
58
- * **web:** breaking aka nivå3puff till visuella toppar ([#1450](https://github.com/BonnierNews/dn-design-system/issues/1450)) ([602040c](https://github.com/BonnierNews/dn-design-system/commit/602040c5a0e8ef7a7bd996bc6508e97956229c1b))
59
- * **web:** nivå1puff till visuella toppar ([#1460](https://github.com/BonnierNews/dn-design-system/issues/1460)) ([d8dcacf](https://github.com/BonnierNews/dn-design-system/commit/d8dcacf7c76b80aac7e48fbf602bc5079d3a1cd3))
60
- * **web:** one level of bauta with background color ([8734216](https://github.com/BonnierNews/dn-design-system/commit/87342169eacf9d59f202f45424022c1bd733a74e))
61
- * **web:** one level of bauta with background color ([5d448cf](https://github.com/BonnierNews/dn-design-system/commit/5d448cf2cc890623e67c509edbb0418a98a8bb4b))
62
-
63
-
64
- ### Maintenance
65
-
66
- * **deps-dev:** bump @babel/preset-env from 7.25.8 to 7.25.9 ([#1469](https://github.com/BonnierNews/dn-design-system/issues/1469)) ([b9a9884](https://github.com/BonnierNews/dn-design-system/commit/b9a988470f8862d4c010f27a097d9a65af115d2b))
67
- * **foundations:** update tokens from Figma ([#1467](https://github.com/BonnierNews/dn-design-system/issues/1467)) ([af2cd99](https://github.com/BonnierNews/dn-design-system/commit/af2cd99ce8ab17494a3e51e34588d25e24a9ef38))
68
- * prerelease packages ([3ebfd91](https://github.com/BonnierNews/dn-design-system/commit/3ebfd91c6780c6222c74b500eade9fd19cac88f3))
69
- * **web:** visuella-toppar-update-tokens ([#1468](https://github.com/BonnierNews/dn-design-system/issues/1468)) ([87277b4](https://github.com/BonnierNews/dn-design-system/commit/87277b487b6f663d4ca106a74cb878012e579a42))
70
46
 
71
47
  ## [21.0.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.1...@bonniernews/dn-design-system-web@21.0.2) (2024-10-24)
72
48
 
@@ -77,13 +53,6 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
77
53
  ## [21.1.0-beta.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.0...@bonniernews/dn-design-system-web@21.1.0-beta.0) (2024-10-18)
78
54
 
79
55
 
80
- ### Features
81
-
82
- * **web:** one level of bauta with background color ([075ed25](https://github.com/BonnierNews/dn-design-system/commit/075ed259c6f3c50ed6018bd566fdc7b9b5c05c73))
83
-
84
- ## [21.1.0-beta.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@21.0.0...@bonniernews/dn-design-system-web@21.1.0-beta.0) (2024-10-18)
85
-
86
-
87
56
  ### Features
88
57
 
89
58
  * **web:** one level of bauta with background color ([075ed25](https://github.com/BonnierNews/dn-design-system/commit/075ed259c6f3c50ed6018bd566fdc7b9b5c05c73))
@@ -97,7 +97,6 @@ $grade-size: ds-px-to-rem(34px);
97
97
  .ds-teaser__media {
98
98
  width: 100%;
99
99
  position: relative;
100
- box-sizing: border-box;
101
100
  }
102
101
 
103
102
  .ds-vip-badge {
@@ -1,3 +1,5 @@
1
+ import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
2
+
1
3
  export interface DividerProps {
2
4
  variant?: 'soft' | 'medium' | 'hard';
3
5
  classNames?: string;
@@ -5,13 +7,11 @@ export interface DividerProps {
5
7
  }
6
8
 
7
9
  export const Divider = ({ variant = 'soft', classNames, attributes }: DividerProps) => {
8
- const componentClassName = 'ds-divider';
9
- const classNamePrefix = `${componentClassName}--`;
10
- const classes = [
11
- componentClassName,
12
- `${classNamePrefix}${variant}`,
10
+ const classes = formatClassString([
11
+ 'ds-divider',
12
+ `ds-divider--${variant}`,
13
13
  classNames
14
- ].filter(Boolean).join(' ');
14
+ ])
15
15
 
16
16
  return (
17
17
  <div className={classes} {...attributes}><hr /></div>
@@ -23,7 +23,7 @@ $ds-group-header__icon-size: 24px;
23
23
  }
24
24
 
25
25
  &--bauta {
26
- --group-header-background: #{$ds-color-surface-breaking};
26
+ --group-header-background: #{$bauta-surface-color};
27
27
  }
28
28
 
29
29
  &--toggle,
@@ -8,7 +8,8 @@
8
8
  .ds-link-box__grid {
9
9
  padding: ds-spacing($ds-s-100);
10
10
  display: grid;
11
- gap: ds-spacing($ds-s-100);
11
+ column-gap: ds-spacing($ds-s-050);
12
+ row-gap: ds-spacing($ds-s-100);
12
13
 
13
14
  @include ds-mq-only-breakpoint(mobile) {
14
15
  grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -1,19 +1,23 @@
1
+ import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
2
+
1
3
  export interface QuoteProps {
2
4
  bodyHtml: string;
3
5
  theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
4
6
  classNames?: string;
7
+ /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
5
8
  attributes?: object;
6
9
  forcePx?: boolean;
7
10
  }
8
11
 
9
12
  export const Quote = ({ bodyHtml, theme = 'nyheter', classNames, attributes, forcePx }: QuoteProps) => {
10
13
  const componentClassName = 'ds-quote';
11
- const classes = [
14
+
15
+ const classes = formatClassString([
12
16
  componentClassName,
13
17
  `ds-theme--${theme}`,
14
18
  forcePx && 'ds-force-px',
15
- classNames
16
- ].filter(Boolean).join(' ');
19
+ classNames,
20
+ ])
17
21
 
18
22
  const quoteHtml = `<span class="${componentClassName}__border"></span> ${bodyHtml}`
19
23
 
@@ -0,0 +1,36 @@
1
+ import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
2
+
3
+ export interface TeaserCardsProps {
4
+ areaType?: 'right' | 'bauta' | 'bautaxl';
5
+ targetLink?: string;
6
+ theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
7
+ classes?: string;
8
+ /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
9
+ attributes?: object;
10
+ children: any;
11
+ }
12
+
13
+ export const TeaserCard = ({ areaType, targetLink, theme = 'nyheter', classes, attributes, children }: TeaserCardsProps) => {
14
+ const componentClassName = 'ds-teaser';
15
+
16
+ const classNames = formatClassString([
17
+ componentClassName,
18
+ areaType && `${componentClassName}--${areaType}`,
19
+ `ds-theme--${theme}`,
20
+ classes,
21
+ ])
22
+
23
+ if (targetLink) {
24
+ return (
25
+ <a className={classNames} href={targetLink } {...attributes}>
26
+ { children }
27
+ </a>
28
+ );
29
+ }
30
+
31
+ return (
32
+ <div className={classNames}{...attributes}>
33
+ { children }
34
+ </div>
35
+ );
36
+ };
@@ -30,7 +30,7 @@
30
30
  }
31
31
  }
32
32
 
33
- .ds-teaser--large &--mask {
33
+ .ds-teaser--top-img &--mask {
34
34
  padding: ds-spacing($ds-s-100 $ds-s-100 0);
35
35
  box-sizing: border-box;
36
36
  }
@@ -13,17 +13,11 @@
13
13
  {% set italicsClass = "ds-teaser--large-big-italic" if params.isLargeHeadline and params.areaType !== "right" else "ds-teaser--large-italic" %}
14
14
  {% endif %}
15
15
 
16
- {# Hide top border if there is media and it's not a compact version. Compact is overruled by italic, if italic we must hide border because we shouldn't change anything related to åsikt #}
17
- {% set hideTopBorder = false %}
18
- {% if params.mediaHtml and (params.isItalicHeadline or not params.isCompact) %}
19
- {% set hideTopBorder = true %}
20
- {% endif %}
21
-
22
16
  {% set extraClasses = [
23
17
  "ds-teaser--large",
24
18
  classNamePrefix + params.variant if params.variant,
25
19
  classNamePrefix + "quote-badge" if isQuoteBadge,
26
- classNamePrefix + 'hide-top-border' if hideTopBorder,
20
+ classNamePrefix + 'top-img' if params.mediaHtml,
27
21
  italicsClass if italicsClass,
28
22
  classNamePrefix + "compact" if params.isCompact,
29
23
  params.classNames if params.classNames
@@ -32,10 +32,6 @@
32
32
  }
33
33
  }
34
34
 
35
- .ds-teaser__vignette {
36
- margin-top: ds-spacing($ds-s-025);
37
- }
38
-
39
35
  .ds-teaser__title {
40
36
  @include ds-typography($ds-typography-detailteaser-large);
41
37
  }
@@ -69,7 +65,6 @@
69
65
  position: relative;
70
66
  margin-left: ds-spacing($ds-s-100);
71
67
  margin-bottom: ds-spacing($ds-s-100, "px", true);
72
- margin-top: ds-spacing($ds-s-025);
73
68
 
74
69
  .picture {
75
70
  position: absolute;
@@ -111,21 +106,6 @@
111
106
  &.ds-teaser--large-big-italic .ds-teaser__title {
112
107
  @include ds-typography($ds-typography-detailteaser-large-compact-opinion);
113
108
  }
114
-
115
- &:not(.ds-teaser--large-italic):not(.ds-teaser--large-big-italic) {
116
- .ds-vip-badge {
117
- top: ds-spacing($ds-s-100);
118
- right: ds-spacing($ds-s-100);
119
- }
120
-
121
- .ds-teaser__media {
122
- padding: ds-spacing($ds-s-100 $ds-s-100 0 $ds-s-100);
123
- }
124
-
125
- .ds-teaser-dot {
126
- display: none;
127
- }
128
- }
129
109
  }
130
110
 
131
111
  @include ds-mq-smallest-breakpoint(tablet) {
@@ -28,6 +28,12 @@
28
28
  font-family: $ds-font--arial !important; /* stylelint-disable-line declaration-no-important */
29
29
  }
30
30
 
31
+ &::after {
32
+ content: "";
33
+ display: block;
34
+ clear: both;
35
+ }
36
+
31
37
  &.ds-teaser--native-right,
32
38
  &.ds-teaser--native-large {
33
39
  .ds-teaser__media {
@@ -0,0 +1,32 @@
1
+ import { TeaserCard } from "@bonniernews/dn-design-system-web/components/teaser-card/teaser-card.tsx";
2
+ import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
3
+ import { Body, Content, Media, Title } from "@bonniernews/dn-design-system-web/helpers/teaser.tsx";
4
+ export interface TeaserOnSiteProps {
5
+ areaType?: 'right' | 'bauta' | 'bautaxl';
6
+ targetLink?: string;
7
+ theme?: 'kultur' | 'nyheter' | 'sport' | 'ekonomi' | 'sthlm';
8
+ classNames?: string;
9
+ /** Ex. { target: "_blank", "data-test": "lorem ipsum" } */
10
+ attributes?: object;
11
+ mediaHtml?: string;
12
+ title?: string;
13
+ text?: string;
14
+ }
15
+
16
+ export const TeaserOnSite = ({ areaType, targetLink, theme = 'nyheter', classNames, attributes, mediaHtml, title, text }: TeaserOnSiteProps) => {
17
+
18
+ const classes = formatClassString([
19
+ "ds-teaser--onsite",
20
+ classNames,
21
+ ])
22
+
23
+ return (
24
+ <TeaserCard { ...{ areaType, targetLink, theme, classes, attributes }}>
25
+ <Media { ...{ mediaHtml }} />
26
+ <Content>
27
+ <Title title={`PÅ PLATS | ${title}`} />
28
+ <Body { ...{ text }} />
29
+ </Content>
30
+ </TeaserCard>
31
+ );
32
+ };
@@ -17,7 +17,6 @@
17
17
  background-color: $ds-color-border-primary;
18
18
  position: absolute;
19
19
  display: block;
20
- clear: both; // Clears floating media in standard-teaser
21
20
  top: 0;
22
21
  left: 0;
23
22
  right: 0;
@@ -27,22 +26,12 @@
27
26
  }
28
27
 
29
28
  // first-child only triggers if there is no vignette
30
- .ds-teaser--hide-top-border::after,
29
+ .ds-teaser--top-img::after,
31
30
  > .ds-split-container:first-child::after,
32
31
  > .ds-teaser:first-child::after {
33
32
  display: none;
34
33
  }
35
34
 
36
- .ds-teaser--breaking + .ds-teaser--hide-top-border {
37
- &::after {
38
- display: block; // Override `display:none to make border visible
39
- }
40
-
41
- .ds-teaser__media {
42
- margin-top: ds-spacing($ds-s-100);
43
- }
44
- }
45
-
46
35
  &::after {
47
36
  content: "";
48
37
  position: absolute;
@@ -58,22 +47,22 @@
58
47
  }
59
48
 
60
49
  &.ds-teaser-package--bauta {
61
- background-color: $ds-color-surface-breaking;
50
+ background-color: $bauta-surface-color;
62
51
 
63
52
  & .ds-teaser,
64
53
  & .ds-teaser--slideshow {
65
- background-color: $ds-color-surface-breaking;
54
+ background-color: $bauta-surface-color;
66
55
  }
67
56
 
68
57
  .ds-split-container {
69
- background-color: $ds-color-surface-breaking;
58
+ background-color: $bauta-surface-color;
70
59
  &::after {
71
- background-color: $ds-color-border-primary;
60
+ background-color: $updated-color-border-primary;
72
61
  }
73
62
  }
74
63
 
75
64
  & > .ds-teaser::after {
76
- background-color: $ds-color-border-primary;
65
+ background-color: $updated-color-border-primary;
77
66
  }
78
67
  }
79
68
  }
@@ -70,8 +70,6 @@
70
70
  }
71
71
 
72
72
  .ds-teaser__media {
73
- margin-top: ds-spacing($ds-s-025);
74
-
75
73
  .ds-teaser-image__byline {
76
74
  @include ds-typography($ds-typography-functionalmeta01, $forcePx: true, $lineHeight: $ds-lineheight-l);
77
75
  }
@@ -6,10 +6,6 @@
6
6
  padding: ds-spacing($ds-s-075 $ds-s-100 0);
7
7
  overflow: hidden;
8
8
 
9
- .ds-teaser__vignette {
10
- margin-top: ds-spacing($ds-s-025);
11
- }
12
-
13
9
  .ds-teaser__title {
14
10
  @include ds-typography($ds-typography-detailteaser-standard);
15
11
 
@@ -33,12 +29,17 @@
33
29
  margin-bottom: ds-spacing($ds-s-100);
34
30
  }
35
31
 
32
+ &::after {
33
+ content: "";
34
+ display: block;
35
+ clear: both;
36
+ }
37
+
36
38
  .ds-teaser__content {
37
39
  display: block;
38
40
  }
39
41
 
40
42
  .ds-teaser__media {
41
- margin-top: ds-spacing($ds-s-025);
42
43
  margin-bottom: ds-spacing($ds-s-100);
43
44
  margin-left: ds-spacing($ds-s-100);
44
45
  float: right;
@@ -1,14 +1,15 @@
1
+ import { formatClassString } from "@bonniernews/dn-design-system-web/helpers/formatClassString.ts";
2
+
1
3
  export interface ThematicBreakProps {
2
4
  classNames?: string;
3
5
  attributes?: object;
4
6
  }
5
7
 
6
8
  export const ThematicBreak = ({ classNames, attributes }: ThematicBreakProps) => {
7
- const componentClassName = 'ds-thematic-break';
8
- const classes = [
9
- componentClassName,
9
+ const classes = formatClassString([
10
+ 'ds-thematic-break',
10
11
  classNames
11
- ].filter(Boolean).join(' ');
12
+ ])
12
13
 
13
14
  return (
14
15
  <div className={classes} {...attributes}><hr /></div>
@@ -6,6 +6,11 @@
6
6
  @use "../variables/colorsDnLightTokens";
7
7
  @use "../variables/colorsDnDarkTokens";
8
8
 
9
+ // Temporary variables before we update tokens
10
+ $bauta-surface-color: #360003;
11
+ $updated-color-border-primary: #ffffff19;
12
+ // end of temporary variables
13
+
9
14
  $ds-theme-color: var(--ds-theme-color);
10
15
 
11
16
  @mixin get-dark-color-scheme() {
@@ -17,7 +22,7 @@ $ds-theme-color: var(--ds-theme-color);
17
22
  --ds-theme-color: #{$ds-color-component-brand};
18
23
 
19
24
  .ds-theme--nyheter {
20
- --ds-theme-color: #{$ds-color-border-brand};
25
+ --ds-theme-color: #{$ds-color-component-brand};
21
26
  }
22
27
 
23
28
  .ds-theme--ekonomi {
@@ -11,7 +11,6 @@ $ds-color-text-brand: var(--ds-color-text-brand);
11
11
  $ds-color-text-body-link: var(--ds-color-text-body-link);
12
12
  $ds-color-text-body-link-visited: var(--ds-color-text-body-link-visited);
13
13
  $ds-color-text-positive: var(--ds-color-text-positive);
14
- $ds-color-text-culture: var(--ds-color-text-culture);
15
14
  $ds-color-icon-primary: var(--ds-color-icon-primary);
16
15
  $ds-color-icon-primary-02: var(--ds-color-icon-primary-02);
17
16
  $ds-color-icon-secondary: var(--ds-color-icon-secondary);
@@ -22,7 +21,6 @@ $ds-color-icon-on-business: var(--ds-color-icon-on-business);
22
21
  $ds-color-icon-brand: var(--ds-color-icon-brand);
23
22
  $ds-color-icon-on-critical: var(--ds-color-icon-on-critical);
24
23
  $ds-color-icon-on-success: var(--ds-color-icon-on-success);
25
- $ds-color-icon-culture: var(--ds-color-icon-culture);
26
24
  $ds-color-component-brand: var(--ds-color-component-brand);
27
25
  $ds-color-component-business: var(--ds-color-component-business);
28
26
  $ds-color-component-primary: var(--ds-color-component-primary);
@@ -47,7 +45,6 @@ $ds-color-surface-korsord: var(--ds-color-surface-korsord);
47
45
  $ds-color-surface-sudoko: var(--ds-color-surface-sudoko);
48
46
  $ds-color-surface-brand: var(--ds-color-surface-brand);
49
47
  $ds-color-surface-inverted: var(--ds-color-surface-inverted);
50
- $ds-color-surface-breaking: var(--ds-color-surface-breaking);
51
48
  $ds-color-border-primary: var(--ds-color-border-primary);
52
49
  $ds-color-border-primary-02: var(--ds-color-border-primary-02);
53
50
  $ds-color-border-primary-03: var(--ds-color-border-primary-03);
@@ -59,7 +56,6 @@ $ds-color-border-focus-02: var(--ds-color-border-focus-02);
59
56
  $ds-color-border-focus-03: var(--ds-color-border-focus-03);
60
57
  $ds-color-border-focus-04: var(--ds-color-border-focus-04);
61
58
  $ds-color-border-brand: var(--ds-color-border-brand);
62
- $ds-color-border-culture: var(--ds-color-border-culture);
63
59
  $ds-color-background-primary: var(--ds-color-background-primary);
64
60
  $ds-color-static-red-100: var(--ds-color-static-red-100);
65
61
  $ds-color-static-black: var(--ds-color-static-black);