@bonniernews/dn-design-system-web 18.0.0-beta.2 → 18.0.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 CHANGED
@@ -4,20 +4,60 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
- ## [18.0.0-beta.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@18.0.0-beta.1...@bonniernews/dn-design-system-web@18.0.0-beta.2) (2024-08-14)
8
-
9
- ## [18.0.0-beta.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@18.0.0-beta.0...@bonniernews/dn-design-system-web@18.0.0-beta.1) (2024-08-13)
10
-
11
- ## [18.0.0-beta.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@17.0.0...@bonniernews/dn-design-system-web@18.0.0-beta.0) (2024-08-13)
7
+ ## [18.0.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@17.0.2...@bonniernews/dn-design-system-web@18.0.0) (2024-08-15)
12
8
 
13
9
 
14
10
  ### ⚠ BREAKING CHANGES
15
11
 
16
- * list item design updates
12
+ * **web:** list item design updates and byline refactoring (#1346)
17
13
 
18
14
  ### Features
19
15
 
20
- * list item design updates ([b281389](https://github.com/BonnierNews/dn-design-system/commit/b2813893022fc7d95ac070a85ee53db81a60b6a9))
16
+ * **web:** list item design updates and byline refactoring ([#1346](https://github.com/BonnierNews/dn-design-system/issues/1346)) ([83bfbeb](https://github.com/BonnierNews/dn-design-system/commit/83bfbeb7a45492c8e648f9b8422ecc44b229ee37))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **web:** improve storybook css for ArticleBodyImage on mobile ([#1355](https://github.com/BonnierNews/dn-design-system/issues/1355)) ([0090088](https://github.com/BonnierNews/dn-design-system/commit/00900886f091d0e5126786e84bbb920dbc45df74))
22
+
23
+
24
+ ### Maintenance
25
+
26
+ * **web:** update incorrect action comment ([#1361](https://github.com/BonnierNews/dn-design-system/issues/1361)) ([dd454bf](https://github.com/BonnierNews/dn-design-system/commit/dd454bf1a1befca6566ce9cdf1b46a737f6a5b7b))
27
+
28
+ ## [17.0.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@17.0.1...@bonniernews/dn-design-system-web@17.0.2) (2024-08-15)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **web:** adjust byline teaser spacing ([#1360](https://github.com/BonnierNews/dn-design-system/issues/1360)) ([29ce4b4](https://github.com/BonnierNews/dn-design-system/commit/29ce4b464b96c5ed60099a72a234d48f59ebec1f))
34
+
35
+
36
+ ### Maintenance
37
+
38
+ * **deps-dev:** bump axios from 1.6.0 to 1.7.4 ([#1358](https://github.com/BonnierNews/dn-design-system/issues/1358)) ([1d251eb](https://github.com/BonnierNews/dn-design-system/commit/1d251eb829624c1edbbbcb3d07eed0a6eb890c08))
39
+ * **deps-dev:** bump axios from 1.6.0 to 1.7.4 in /scripts ([#1357](https://github.com/BonnierNews/dn-design-system/issues/1357)) ([ae75566](https://github.com/BonnierNews/dn-design-system/commit/ae75566b2ed63ed4ee6e31ac145909d0d2e59d89))
40
+
41
+ ## [17.0.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@17.0.0...@bonniernews/dn-design-system-web@17.0.1) (2024-08-14)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * **web:** adjust text color on brand btn ([#1356](https://github.com/BonnierNews/dn-design-system/issues/1356)) ([55db3cc](https://github.com/BonnierNews/dn-design-system/commit/55db3cc0e36d1acce67225c106e8e8fde18d50c6))
47
+
48
+
49
+ ### Maintenance
50
+
51
+ * **deps-dev:** bump axios from 1.4.0 to 1.6.0 in /scripts ([#1312](https://github.com/BonnierNews/dn-design-system/issues/1312)) ([b600333](https://github.com/BonnierNews/dn-design-system/commit/b600333a4c77ea5149f7bd423ff2da65dad83900))
52
+ * **deps:** bump @babel/core from 7.22.11 to 7.25.2 ([#1350](https://github.com/BonnierNews/dn-design-system/issues/1350)) ([034de0e](https://github.com/BonnierNews/dn-design-system/commit/034de0e93504bf6ba806b6dc6f0c3bce13615f17))
53
+ * **deps:** bump @figspec/components from 1.0.2 to 1.0.3 ([#1330](https://github.com/BonnierNews/dn-design-system/issues/1330)) ([79bef36](https://github.com/BonnierNews/dn-design-system/commit/79bef36d2b9ef0c40cf2a8519638dff12e8c33d2))
54
+ * **deps:** bump @tsconfig/react-native from 3.0.2 to 3.0.5 ([#1352](https://github.com/BonnierNews/dn-design-system/issues/1352)) ([f1be5c9](https://github.com/BonnierNews/dn-design-system/commit/f1be5c9eebba40f1c1ac5c2aa35c6d54a341d311))
55
+ * **deps:** bump braces from 3.0.2 to 3.0.3 in /web ([#1348](https://github.com/BonnierNews/dn-design-system/issues/1348)) ([49e3ad6](https://github.com/BonnierNews/dn-design-system/commit/49e3ad61dd411e16cbc2bc9dae82b11029834f2b))
56
+ * **deps:** bump express from 4.17.2 to 4.19.2 in /server ([#1264](https://github.com/BonnierNews/dn-design-system/issues/1264)) ([75ceb81](https://github.com/BonnierNews/dn-design-system/commit/75ceb81978e64daad3c8e55d316839db1b3e8a1f))
57
+ * **deps:** bump fast-loops from 1.1.3 to 1.1.4 ([#1334](https://github.com/BonnierNews/dn-design-system/issues/1334)) ([67341de](https://github.com/BonnierNews/dn-design-system/commit/67341de5cbe6c1e22b6658242f43b610acc07a31))
58
+ * **deps:** bump fast-xml-parser from 4.2.7 to 4.4.1 ([#1344](https://github.com/BonnierNews/dn-design-system/issues/1344)) ([81dea97](https://github.com/BonnierNews/dn-design-system/commit/81dea9741edc52845be435858055b58782e773cd))
59
+ * **deps:** bump react-native-web from 0.17.7 to 0.19.12 ([#1314](https://github.com/BonnierNews/dn-design-system/issues/1314)) ([7b346f1](https://github.com/BonnierNews/dn-design-system/commit/7b346f10860757896a2754c171263a05bba57a04))
60
+ * **deps:** bump typescript from 4.8.4 to 4.9.5 ([#1309](https://github.com/BonnierNews/dn-design-system/issues/1309)) ([e4a166e](https://github.com/BonnierNews/dn-design-system/commit/e4a166ec56ea82b5ddc05e427ba20439f194000f))
21
61
 
22
62
  ## [17.0.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@16.2.1...@bonniernews/dn-design-system-web@17.0.0) (2024-07-19)
23
63
 
@@ -54,7 +54,7 @@ $ds-btn-outlined__border-width: ds-border-width(x1);
54
54
  &.ds-btn--default,
55
55
  &.ds-btn--elevated {
56
56
  --ds-btn__background-color: #{$ds-color-component-brand};
57
- --ds-btn__color: #{$ds-color-text-secondary};
57
+ --ds-btn__color: #{$ds-color-static-white};
58
58
  }
59
59
  &.ds-btn--outline {
60
60
  --ds-btn__border-color: #{$ds-color-component-brand};
@@ -28,7 +28,8 @@
28
28
  href: params.authorPageUrl if useOuterAnchorElement,
29
29
  titleHref: params.authorPageUrl if not useOuterAnchorElement,
30
30
  linkAttributes: params.linkAttributes,
31
- border: true,
31
+ border: params.variant !== 'direkt',
32
+ fontWeight: 'semibold',
32
33
  elementAttributes: params.elementAttributes,
33
34
  elementClassNames: params.elementClassNames,
34
35
  forcePx: params.forcePx,
@@ -16,6 +16,7 @@
16
16
  |meta | String | no | | | |
17
17
  |disabled | bool | no | true, false | false | Note: only works on button-tag, not on a-tag |
18
18
  |border | bool | no | true, false | false | |
19
+ |fontWeight | string | no | 'regular', 'semibold', 'bold' | 'regular' | only affects the title |
19
20
  |leadingIcon | String | no | add, arrow_back, arrow_forward etc | | For all available icons see: https://designsystem.dn.se/?path=/story/foundations-icons--all-icons |
20
21
  |trailingIcon | String | no | add, arrow_back, arrow_forward etc | | For all available icons see: https://designsystem.dn.se/?path=/story/foundations-icons--all-icons |
21
22
  |href | String | no | | | If href is set the list item will be rendered as an a-tag |
@@ -20,12 +20,13 @@
20
20
  <div class="{{ componentClassName + '__portrait'}}">{{ params.mediaHtml }}</div>
21
21
  {% endif %}
22
22
  {% if params.title %}
23
+ {% set titleClasses = [componentClassName + '__title', componentClassName + '__title--' + (params.fontWeight or 'regular')] | join(" ") %}
23
24
  <div class="{{ componentClassName + '__titles'}}">
24
25
  {% if params.titleHref and not params.disabled %}
25
26
  {% set linkAttributes = getAttributes(params.linkAttributes) %}
26
- <a class="{{ componentClassName + '__title'}}" href="{{ params.titleHref }}" {{ linkAttributes | safe }}>{{ params.title }}</a>
27
+ <a class="{{ titleClasses }}" href="{{ params.titleHref }}" {{ linkAttributes | safe }}>{{ params.title }}</a>
27
28
  {% else %}
28
- <span class="{{ componentClassName + '__title'}}">{{ params.title }}</span>
29
+ <span class="{{ titleClasses }}">{{ params.title }}</span>
29
30
  {% endif %}
30
31
  {%- if params.subtitle %}
31
32
  <span class="{{ componentClassName + '__subtitle'}}">{{ params.subtitle }}</span>
@@ -21,7 +21,7 @@ $ds-list-item__portrait-size--small: 36px;
21
21
  line-height: 0;
22
22
  position: relative;
23
23
 
24
- &.ds-list-item--border:not(:last-of-type)::after {
24
+ &.ds-list-item--border::after {
25
25
  content: "";
26
26
  width: 100%;
27
27
  height: ds-border-width(x1);
@@ -89,12 +89,47 @@ $ds-list-item__portrait-size--small: 36px;
89
89
  overflow-wrap: anywhere;
90
90
 
91
91
  .ds-list-item__title {
92
- @include ds-typography($ds-typography-functionalbody02);
92
+ @include ds-typography($ds-typography-functionalbody02, $lineHeight: $ds-lineheight-m);
93
93
  @at-root .ds-force-px#{&} {
94
- @include ds-typography($ds-typography-functionalbody02, true);
94
+ @include ds-typography($ds-typography-functionalbody02, $lineHeight: $ds-lineheight-m, $forcePx: true);
95
95
  }
96
+
96
97
  color: $ds-color-text-primary;
97
98
  text-align: left;
99
+
100
+ &.ds-list-item__title--semibold {
101
+ @include ds-typography(
102
+ $ds-typography-functionalbody02,
103
+ $lineHeight: $ds-lineheight-m,
104
+ $fontWeight: $ds-fontweight-semibold
105
+ );
106
+
107
+ @at-root .ds-force-px#{&} {
108
+ @include ds-typography(
109
+ $ds-typography-functionalbody02,
110
+ $lineHeight: $ds-lineheight-m,
111
+ $forcePx: true,
112
+ $fontWeight: $ds-fontweight-semibold
113
+ );
114
+ }
115
+ }
116
+
117
+ &.ds-list-item__title--bold {
118
+ @include ds-typography(
119
+ $ds-typography-functionalbody02,
120
+ $lineHeight: $ds-lineheight-m,
121
+ $fontWeight: $ds-fontweight-bold
122
+ );
123
+
124
+ @at-root .ds-force-px#{&} {
125
+ @include ds-typography(
126
+ $ds-typography-functionalbody02,
127
+ $lineHeight: $ds-lineheight-m,
128
+ $forcePx: true,
129
+ $fontWeight: $ds-fontweight-bold
130
+ );
131
+ }
132
+ }
98
133
  }
99
134
 
100
135
  a.ds-list-item__title {
@@ -145,16 +180,6 @@ $ds-list-item__portrait-size--small: 36px;
145
180
  figure {
146
181
  margin: 0;
147
182
  }
148
-
149
- + .ds-list-item__titles {
150
- .ds-list-item__title {
151
- @include ds-typography($ds-typography-functionalbody02, $fontWeight: $ds-fontweight-semibold);
152
-
153
- @at-root .ds-force-px#{&} {
154
- @include ds-typography($ds-typography-functionalbody02, $forcePx: true, $fontWeight: $ds-fontweight-semibold);
155
- }
156
- }
157
- }
158
183
  }
159
184
 
160
185
  .ds-list-item__portrait {
@@ -247,24 +272,6 @@ $ds-list-item__portrait-size--small: 36px;
247
272
  }
248
273
 
249
274
  .ds-list-item--byline {
250
- .ds-list-item__titles {
251
- .ds-list-item__title {
252
- @include ds-typography(
253
- $ds-typography-functionalheading01,
254
- $lineHeight: $ds-lineheight-m,
255
- $fontWeight: $ds-fontweight-semibold
256
- );
257
- @at-root .ds-force-px#{&} {
258
- @include ds-typography(
259
- $ds-typography-functionalheading01,
260
- $forcePx: true,
261
- $lineHeight: $ds-lineheight-m,
262
- $fontWeight: $ds-fontweight-semibold
263
- );
264
- }
265
- }
266
- }
267
-
268
275
  &.ds-byline--direkt {
269
276
  padding: ds-spacing($ds-s-075 0);
270
277
 
@@ -64,14 +64,7 @@
64
64
  overflow: hidden;
65
65
  position: relative;
66
66
  margin-left: ds-spacing($ds-s-100);
67
-
68
- // margin-bottom needs to be the negative value of padding-bottom on .ds-teaser__content
69
- @include ds-mq-only-breakpoint(mobile) {
70
- margin-bottom: ds-spacing($ds-s-075, "px", true);
71
- }
72
- @include ds-mq-smallest-breakpoint(tablet) {
73
- margin-bottom: ds-spacing($ds-s-100, "px", true);
74
- }
67
+ margin-bottom: ds-spacing($ds-s-100, "px", true);
75
68
 
76
69
  .picture {
77
70
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "18.0.0-beta.2",
3
+ "version": "18.0.0",
4
4
  "description": "DN design system for web.",
5
5
  "main": "index.js",
6
6
  "homepage": "https://github.com/BonnierNews/dn-design-system/tree/main/web/src#readme",