@bonniernews/dn-design-system-web 15.0.0 → 15.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 CHANGED
@@ -4,6 +4,20 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
+ ## [15.1.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@15.0.1...@bonniernews/dn-design-system-web@15.1.0) (2024-04-29)
8
+
9
+
10
+ ### Features
11
+
12
+ * **web:** add isDarkColor arg to gameheader ([#1278](https://github.com/BonnierNews/dn-design-system/issues/1278)) ([a24dd15](https://github.com/BonnierNews/dn-design-system/commit/a24dd1531f8c9ff31d61df2cd860995e3dc764c9))
13
+
14
+ ## [15.0.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@15.0.0...@bonniernews/dn-design-system-web@15.0.1) (2024-04-04)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **web:** add href on iconButton ([#1269](https://github.com/BonnierNews/dn-design-system/issues/1269)) ([61ac7d9](https://github.com/BonnierNews/dn-design-system/commit/61ac7d9b0283afbb3579a709e909082cb73ad170))
20
+
7
21
  ## [15.0.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@14.3.11...@bonniernews/dn-design-system-web@15.0.0) (2024-03-26)
8
22
 
9
23
 
@@ -14,6 +14,7 @@
14
14
  |media | String | no | | | URL to icon displayed on the header |
15
15
  |descriptionHtml | String | no | | | Intended use is text, links and inlined icons |
16
16
  |backgroundColor | String | no | | | Hex code or supported color name |
17
+ |isDarkColor | bool | no | | false | If true, the text on the background color is forced into darkmode (light text). Otherwise it is forced into lightmode (dark text). |
17
18
  |classNames | String | no | | | Ex. "my-special-class" |
18
19
  |attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
19
20
 
@@ -10,13 +10,12 @@
10
10
  ] | join(" ") %}
11
11
 
12
12
  <div class="{{ classes }}" {{- attributes | safe }}>
13
- <div class="{{ componentClassName }}__top ds-light" style="background-color: {{params.backgroundColor}}">
13
+ <div class="{{ componentClassName }}__top {{ componentClassName + '--darkbg' if params.isDarkColor else componentClassName + '--lightbg' }}" style="background-color: {{params.backgroundColor}}">
14
14
  <div class="{{ componentClassName }}__top-content">
15
- <h1 class="{{ componentClassName }}__title">{{ params.title}}</h1>
16
-
15
+ <h1 class="{{ componentClassName }}__title">{{ params.title }}</h1>
17
16
  {% if params.media %}
18
17
  <div class="{{ componentClassName + '__media'}}">
19
- {{ params.media | safe }}
18
+ {{ params.media | safe }}
20
19
  </div>
21
20
  {% endif %}
22
21
  </div>
@@ -25,7 +24,7 @@
25
24
  {% if params.descriptionHtml %}
26
25
  <div class="{{ componentClassName }}__description">
27
26
  <div class="{{ componentClassName }}__description-content">
28
- {{ params.descriptionHtml | safe }}
27
+ {{ params.descriptionHtml | safe }}
29
28
  </div>
30
29
  </div>
31
30
  {% endif %}
@@ -25,9 +25,17 @@ $ds-game-header__icon-size: 105px;
25
25
 
26
26
  .ds-game-header__title {
27
27
  @include ds-typography($ds-typography-functional-heading03bold);
28
- color: $ds-color-text-primary;
29
28
  margin: 0;
30
29
  }
30
+
31
+ .ds-game-header--darkbg {
32
+ color: $ds-color-static-white;
33
+ }
34
+
35
+ .ds-game-header--lightbg {
36
+ color: $ds-color-static-black;
37
+ }
38
+
31
39
  .ds-game-header__media {
32
40
  margin-right: ds-spacing($ds-s-100);
33
41
  width: $ds-game-header__icon-size;
@@ -5,6 +5,7 @@
5
5
  isIconBtn: true,
6
6
  isToggle: params.isToggle,
7
7
  variant: params.variant,
8
+ href: params.href,
8
9
  emphasis: params.emphasis,
9
10
  disabled: params.disabled,
10
11
  size: params.size,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "15.0.0",
3
+ "version": "15.1.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",