@bonniernews/dn-design-system-web 20.2.0 → 20.3.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,6 +4,18 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
+ ## [20.3.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.2.0...@bonniernews/dn-design-system-web@20.3.0) (2024-09-12)
8
+
9
+
10
+ ### Features
11
+
12
+ * **web:** add articlecount to tagheader and profileheader ([#1395](https://github.com/BonnierNews/dn-design-system/issues/1395)) ([90eba4a](https://github.com/BonnierNews/dn-design-system/commit/90eba4a4e132c0748bf126d5e0f6bc1f733d4e76))
13
+
14
+
15
+ ### Maintenance
16
+
17
+ * **deps:** bump express from 4.19.2 to 4.20.0 in /web ([#1398](https://github.com/BonnierNews/dn-design-system/issues/1398)) ([67314ce](https://github.com/BonnierNews/dn-design-system/commit/67314ce6e2983cc8752650c95e2d199c1522ce67))
18
+
7
19
  ## [20.2.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@20.1.1...@bonniernews/dn-design-system-web@20.2.0) (2024-09-12)
8
20
 
9
21
 
@@ -13,6 +13,7 @@
13
13
  |title | String | yes | | | H1 Title |
14
14
  |mediaHtml | String | no | | | Main image |
15
15
  |descriptionHtml | String | no | | | Intended use is text, links |
16
+ |articleCount | int | no | | | Total articles on this list-page |
16
17
  |toggle | Bool | no | true, false | false | Show/hide toggle button |
17
18
  |toggleText | text | no | | | `text` parameter to ToggleButton (only if `toggle` is enabled) |
18
19
  |toggleSelectedText | text | no | | | `selectedText` parameter to ToggleButton (only if `toggle` is enabled) |
@@ -39,6 +39,9 @@
39
39
  {{ params.descriptionHtml | safe }}
40
40
  </div>
41
41
  {% endif %}
42
+ {% if params.articleCount %}
43
+ <p class="{{ componentClassName }}__article-count">{{ params.articleCount }} {% if params.articleCount === 1 %}artikel{% else %}artiklar{% endif %}</p>
44
+ {% endif %}
42
45
  </div>
43
46
  </div>
44
47
  {% endmacro %}
@@ -4,7 +4,7 @@
4
4
  .ds-profile-header {
5
5
  width: 100%;
6
6
  background-color: $ds-color-surface-background;
7
- padding: 0;
7
+ padding-bottom: ds-spacing($ds-s-100);
8
8
  display: flex;
9
9
 
10
10
  .ds-profile-header__content {
@@ -43,12 +43,18 @@
43
43
  margin: 0;
44
44
  }
45
45
 
46
+ .ds-profile-header__article-count {
47
+ margin: ds-spacing($ds-s-050 $ds-s-100 0);
48
+ @include ds-typography($ds-typography-functionalbody02);
49
+ color: $ds-color-text-primary-02;
50
+ }
51
+
46
52
  .ds-profile-header__description {
47
53
  @include ds-typography($ds-typography-functionalbody02);
48
54
  color: $ds-color-text-primary;
49
55
  margin: ds-spacing(0 $ds-s-100 0);
50
56
  border-top: ds-border-width(x1) solid $ds-color-border-primary;
51
- padding: ds-spacing($ds-s-100 0);
57
+ padding: ds-spacing($ds-s-100 0 0 0);
52
58
 
53
59
  a {
54
60
  @include ds-link($ds-link-article-body);
@@ -15,6 +15,7 @@
15
15
  |vignetteTargetUrl | String | no | | | Target URL for the vignette |
16
16
  |mediaHtml | String | no | | | Main image |
17
17
  |descriptionHtml | String | no | | | Intended use is text, links |
18
+ |articleCount | int | no | | | Total articles on this list-page |
18
19
  |theme | String | no | nyheter, kultur, ekonomi, sport, sthlm | (empty) | The theme-class to apply to the vignette |
19
20
  |toggle | Bool | no | true, false | false | Show/hide toggle button |
20
21
  |toggleText | text | no | | | `text` parameter to ToggleButton (only if `toggle` is enabled) |
@@ -47,6 +47,9 @@
47
47
  {{ params.descriptionHtml | safe }}
48
48
  </div>
49
49
  {% endif %}
50
+ {% if params.articleCount %}
51
+ <p class="{{ componentClassName }}__article-count">{{ params.articleCount }} {% if params.articleCount === 1 %}artikel{% else %}artiklar{% endif %}</p>
52
+ {% endif %}
50
53
  </div>
51
54
  </div>
52
55
  {% endmacro %}
@@ -70,6 +70,12 @@
70
70
  }
71
71
  }
72
72
 
73
+ .ds-tag-header__article-count {
74
+ margin: ds-spacing($ds-s-050 $ds-s-100 0);
75
+ @include ds-typography($ds-typography-functionalbody02);
76
+ color: $ds-color-text-primary-02;
77
+ }
78
+
73
79
  .ds-tag-header__description {
74
80
  @include ds-typography($ds-typography-functionalbody02);
75
81
  color: $ds-color-text-primary;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "20.2.0",
3
+ "version": "20.3.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",