@bonniernews/dn-design-system-web 10.0.0-beta.2 → 10.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,6 +4,17 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
+ ## [10.0.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@9.1.3...@bonniernews/dn-design-system-web@10.0.0) (2024-01-12)
8
+
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+
12
+ * **web:** changed min-width and min-height for buttons
13
+
14
+ ### Bug Fixes
15
+
16
+ * **web:** refactor all buttons ([#1149](https://github.com/BonnierNews/dn-design-system/issues/1149)) ([4e61922](https://github.com/BonnierNews/dn-design-system/commit/4e619226e4c1c4e7a946cb86af6ac3585622b755))
17
+
7
18
  ## [10.0.0-beta.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@10.0.0-beta.1...@bonniernews/dn-design-system-web@10.0.0-beta.2) (2024-01-10)
8
19
 
9
20
  ## [10.0.0-beta.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@9.1.1...@bonniernews/dn-design-system-web@10.0.0-beta.1) (2024-01-10)
@@ -33,6 +44,20 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
33
44
 
34
45
  * **web:** refactor all buttons ([7f89354](https://github.com/BonnierNews/dn-design-system/commit/7f893549c25b585bbd9de2f5fc95e33164b8bd75))
35
46
 
47
+ ## [9.1.3](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@9.1.2...@bonniernews/dn-design-system-web@9.1.3) (2024-01-12)
48
+
49
+
50
+ ### Maintenance
51
+
52
+ * **web:** change bodyText to bodyHtml in modal ([#1163](https://github.com/BonnierNews/dn-design-system/issues/1163)) ([e5b55e3](https://github.com/BonnierNews/dn-design-system/commit/e5b55e3366de257231974c4732e8a80cd025098e))
53
+
54
+ ## [9.1.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@9.1.1...@bonniernews/dn-design-system-web@9.1.2) (2024-01-12)
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * **web:** style modal backdrop in after element instead of backdrop ([#1164](https://github.com/BonnierNews/dn-design-system/issues/1164)) ([e031696](https://github.com/BonnierNews/dn-design-system/commit/e031696fe8974777f4260f54d2fb73046eec6537))
60
+
36
61
  ## [9.1.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@9.1.0...@bonniernews/dn-design-system-web@9.1.1) (2024-01-09)
37
62
 
38
63
 
@@ -11,8 +11,7 @@
11
11
 
12
12
  |parameter | type | required | options | default | description |
13
13
  |:--- | :--- | :--- | :--- | :--- | :--- |
14
- | title | String | yes | | | Title in modal |
15
- | bodyText | String | yes | text | | Text in modal |
14
+ | title | String | no | | | Title in modal |
16
15
  | primaryButton | Object | no | text | | Object with text, href (optional), classNames (optional) and attributes (optional) |
17
16
  | secondaryButton | Object | no | text | | Object with text, href (optional), classNames (optional) and attributes (optional). Set isCloseButton to true if you wanna close modal with this button |
18
17
  | classNames | String | no | | | Ex. "my-special-class" |
@@ -28,12 +27,9 @@ These are copy paste friendly examples to quickliy get started using a component
28
27
  ```javascript
29
28
  {% from '@bonniernews/dn-design-system-web/components/modal/modal.njk' import Modal %}
30
29
 
31
- {{ Modal({
32
- title: "Rubrik",
33
- bodyText: "Text i modalen",
34
- primaryButton: "Text i knapp",
35
- secondaryButton: "Text i knapp",
36
- })}}
30
+ {% call Modal({title: "Rubrik", primaryButton: { text: "Text i knapp", href: "ww.url.se" }, secondaryButton: { text: "Text i knapp", isCloseButton: true } }) %}
31
+ <p>Text i modalen</p>
32
+ {% endcall %}
37
33
  ```
38
34
 
39
35
  ### Scss
@@ -22,8 +22,12 @@
22
22
  iconName: "close",
23
23
  classNames: "ds-modal__close"
24
24
  })}}
25
- <h2>{{ params.title }}</h2>
26
- <p>{{ params.bodyText }}</p>
25
+
26
+ {% if params.title %}
27
+ <h2>{{ params.title }}</h2>
28
+ {% endif %}
29
+
30
+ {{ caller() if caller }}
27
31
 
28
32
  {% if params.primaryButton or params.secondaryButton %}
29
33
  <div class="ds-modal__buttons">
@@ -16,7 +16,6 @@
16
16
  right: 0;
17
17
  left: 0;
18
18
  z-index: 999;
19
- background-color: $ds-color-surface-overlay;
20
19
 
21
20
  @include ds-mq-only-breakpoint(mobile) {
22
21
  align-items: flex-end;
@@ -57,13 +56,27 @@
57
56
  }
58
57
 
59
58
  &::backdrop {
59
+ background-color: transparent;
60
+ }
61
+
62
+ &::after {
63
+ content: "";
64
+ display: block;
65
+ position: fixed;
66
+ top: 0;
67
+ left: 0;
68
+ width: 100vw;
69
+ height: 100vh;
60
70
  background-color: $ds-color-surface-overlay;
71
+ z-index: 10;
61
72
  }
62
73
  }
63
74
 
64
75
  .ds-modal__content {
65
76
  padding: ds-spacing($ds-s-400 $ds-s-300 $ds-s-300);
66
77
  background-color: $ds-color-surface-background;
78
+ position: relative;
79
+ z-index: 15;
67
80
 
68
81
  .ds-icon-btn.ds-modal__close {
69
82
  position: absolute;
@@ -5,7 +5,6 @@
5
5
  @use "./helpers/colors.scss" as *;
6
6
 
7
7
  html,
8
- ::backdrop, //backdrop can't handle variables in html element. It needs to be defined here
9
8
  .ds-light {
10
9
  @each $name, $value in meta.module-variables("colorsDnLightTokens") {
11
10
  --ds-color-#{string.slice($name, 8)}: #{$value};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "10.0.0-beta.2",
3
+ "version": "10.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",