@bonniernews/dn-design-system-web 15.2.9 → 15.2.11

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,27 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
+ ## [15.2.11](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@15.2.10...@bonniernews/dn-design-system-web@15.2.11) (2024-06-04)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **web:** add image to bauta ([#1315](https://github.com/BonnierNews/dn-design-system/issues/1315)) ([23e1091](https://github.com/BonnierNews/dn-design-system/commit/23e1091c4dbddf7ca206732a0fc0cb6f95e95bf5))
13
+
14
+
15
+ ### Maintenance
16
+
17
+ * **app:** change pressable onpress type ([#1313](https://github.com/BonnierNews/dn-design-system/issues/1313)) ([3ce69ee](https://github.com/BonnierNews/dn-design-system/commit/3ce69ee7fb7323ac62b35716d247a2d6f50e5b45))
18
+ * prerelease packages ([09c0dea](https://github.com/BonnierNews/dn-design-system/commit/09c0dea5706d48f1769d392eef3357b653a90928))
19
+
20
+ ## [15.2.10](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@15.2.9...@bonniernews/dn-design-system-web@15.2.10) (2024-05-20)
21
+
22
+
23
+ ### Maintenance
24
+
25
+ * **foundations:** update tokens from Figma ([#1311](https://github.com/BonnierNews/dn-design-system/issues/1311)) ([cf67eea](https://github.com/BonnierNews/dn-design-system/commit/cf67eea4dbc8f3d137a808c818a30d184403ea0b))
26
+ * prerelease packages ([72b6db2](https://github.com/BonnierNews/dn-design-system/commit/72b6db204a1ac626fb785893adeb7027ef8a0478))
27
+
7
28
  ## [15.2.9](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@15.2.8...@bonniernews/dn-design-system-web@15.2.9) (2024-05-16)
8
29
 
9
30
 
@@ -11,22 +11,26 @@
11
11
  |parameter | type | required | options | default | description |
12
12
  |:--- | :--- | :--- | :--- | :--- | :--- |
13
13
  |title | string | yes | | | The title text |
14
- |variant | string | no | icon, link, toggle, arrows, image, bauta, bauataxl, image | icon | The variant to render |
14
+ |type | string | no | icon, link, toggle, arrows | icon | The type of interactive element added to the header |
15
+ |variant | string | no | bauta, bauataxl | | The design variant, if not bauta or bautaxl the group header will get the 'standard' design |
16
+ |mediaHtml | string | no | | | The image markup for the header |
15
17
  |href | string | no | | | If given, the title is rendered as a link |
16
- |linkText | string | no | | | The link text to render (only for variants `link` and `direkt`) |
18
+ |linkText | string | no | | | The link text to render (only for types `link` and `direkt`) |
17
19
  |showBottomBorder | boolean | no | | | If true there will be a bottom border |
18
- |toggleText | text | no | | | `text` parameter to ToggleButton (only for variant `toggle`) |
19
- |toggleSelectedText | text | no | | | `selectedText` parameter to ToggleButton (only for variant `toggle`) |
20
- |toggleSelected | boolean | no | | | `selected` parameter to ToggleButton (only for variant `toggle`) |
21
- |toggleLoading | boolean | no | | | `loading` parameter to ToggleButton (only for variant `toggle`) |
22
- |toggleClassNames | text | no | | | `classNames` parameter to ToggleButton (only for variant `toggle`) |
23
- |toggleAttributes | text | no | | | `attributes` parameter to ToggleButton (only for variant `toggle`) |
20
+ |toggleText | text | no | | | `text` parameter to ToggleButton (only for type `toggle`) |
21
+ |toggleSelectedText | text | no | | | `selectedText` parameter to ToggleButton (only for type `toggle`) |
22
+ |toggleSelected | boolean | no | | | `selected` parameter to ToggleButton (only for type `toggle`) |
23
+ |toggleLoading | boolean | no | | | `loading` parameter to ToggleButton (only for type `toggle`) |
24
+ |toggleClassNames | text | no | | | `classNames` parameter to ToggleButton (only for type `toggle`) |
25
+ |toggleAttributes | text | no | | | `attributes` parameter to ToggleButton (only for type `toggle`) |
24
26
  |classNames | String | no | | | Ex. "my-special-class" |
25
27
  |attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
26
28
 
27
- NB: The `arrows` variant is only active in desktop environments. It is equivalent to `link` or `icon` in non-desktop environments, depending on if the `linkText` parameter is also given.
29
+ NB: The `arrows` type is only active in desktop environments. It is equivalent to `link` or `icon` in non-desktop environments, depending on if the `linkText` parameter is also given.
28
30
 
29
- Depending on variant, either the `toggle-*` or `linkText` parameters are allowed. In `icon` and `link` mode, the `href` parameter is required to show the ornament.
31
+ Depending on type, either the `toggle-*` or `linkText` parameters are allowed. In `icon` and `link` mode, the `href` parameter is required to show the ornament.
32
+
33
+ The type `toggle` is (currently) not allowed if variant is bauta or bautaxl.
30
34
 
31
35
  ## Minimum requirement example
32
36
 
@@ -49,4 +53,4 @@ These are copy paste friendly examples to quickliy get started using a component
49
53
  ```
50
54
 
51
55
  ### JS
52
- If you use the `toggle` variant, you might need to initiate that component, [as per the documentation](https://designsystem.dn.se/?path=/readmetab/basic-buttons-buttontoggle--docs).
56
+ If you use the `toggle` type, you might need to initiate that component, [as per the documentation](https://designsystem.dn.se/?path=/readmetab/basic-buttons-buttontoggle--docs).
@@ -10,28 +10,29 @@
10
10
 
11
11
  {%- set classes = [
12
12
  componentClassName,
13
- classNamePrefix + (params.variant or "icon"),
13
+ classNamePrefix + (params.type or "icon"),
14
+ classNamePrefix + params.variant if params.variant,
14
15
  classNamePrefix + 'bottom-border' if params.showBottomBorder,
15
16
  params.classNames if params.classNames
16
17
  ] | join(" ") %}
17
18
 
18
19
  {% set groupHeaderInner %}
19
- {% if params.variant == 'image' %}
20
+ {% if params.mediaHtml %}
20
21
  <div class="{{ componentClassName + '__image'}}">{{ params.mediaHtml | safe }}</div>
21
22
  {% endif %}
22
23
  <h2 class="{{ componentClassName + '__title'}}">{{ params.title }}</h2>
23
24
 
24
- {% if params.variant == 'link' and params.linkText and params.href %}
25
+ {% if params.type == 'link' and params.linkText and params.href %}
25
26
  <span class="{{ componentClassName + '__right-link' }}">
26
27
  {{ params.linkText }}
27
28
  </span>
28
- {% elif (params.variant == 'icon' or params.variant == 'bauta' or params.variant == 'image' or not params.variant) and params.href %}
29
+ {% elif (params.type == 'icon' or not params.type) and params.href %}
29
30
  {{ IconUse({ icon: "arrow_forward", classNames: componentClassName + '__icon' }) }}
30
- {% elif (params.variant == 'arrows') and params.href and params.linkText %}
31
+ {% elif (params.type == 'arrows') and params.href and params.linkText %}
31
32
  <span class="{{ componentClassName + '__right-link' }} hidden-desktop">
32
33
  {{ params.linkText }}
33
34
  </span>
34
- {% elif (params.variant == 'arrows') and params.href %}
35
+ {% elif (params.type == 'arrows') and params.href %}
35
36
  {{ IconUse({ icon: "arrow_forward", classNames: componentClassName + '__icon hidden-desktop' }) }}
36
37
  {% endif %}
37
38
  {% endset %}
@@ -44,9 +45,10 @@
44
45
  {% else %}
45
46
  {{ groupHeaderInner | safe }}
46
47
  {% endif %}
47
- {% if params.variant == 'toggle' %}
48
+ {# there is no static-white toggle btn so it is disabled for bauta/xl for now #}
49
+ {% if params.type == 'toggle' and not params.variant %}
48
50
  {{ ButtonToggle({
49
- variant: 'brand',
51
+ variant: "brand",
50
52
  size: 'small',
51
53
  text: params.toggleText,
52
54
  selectedText: params.toggleSelectedText,
@@ -55,10 +57,11 @@
55
57
  classNames: params.toggleClassNames,
56
58
  attributes: params.toggleAttributes
57
59
  }) }}
58
- {% elif (params.variant == 'arrows') %}
60
+ {% elif (params.type == 'arrows') %}
61
+ {% set buttonVariant = "staticWhite" if params.variant else "primary" %}
59
62
  <div class="{{ componentClassName + '__arrows' }} hidden-mobile hidden-tablet">
60
63
  {{ IconButton({
61
- variant: "primary",
64
+ variant: buttonVariant,
62
65
  emphasis: "outline",
63
66
  size: "small",
64
67
  iconName: "arrow_back",
@@ -66,7 +69,7 @@
66
69
  attributes: {"aria-label": "Föregående"}
67
70
  }) }}
68
71
  {{ IconButton({
69
- variant: "primary",
72
+ variant: buttonVariant,
70
73
  emphasis: "outline",
71
74
  size: "small",
72
75
  iconName: "arrow_forward",
@@ -28,6 +28,7 @@ $ds-group-header__icon-size: 24px;
28
28
  &--bautaxl {
29
29
  --group-header-background: #{$ds-color-static-black};
30
30
  --group-header-color: #{$ds-color-static-yellow};
31
+ --group-header-icon-color: #{$ds-color-icon-on-brand};
31
32
  }
32
33
 
33
34
  &--toggle,
@@ -42,11 +43,6 @@ $ds-group-header__icon-size: 24px;
42
43
  }
43
44
  }
44
45
 
45
- &--image {
46
- display: flex;
47
- align-items: center;
48
- }
49
-
50
46
  .ds-group-header__right-link,
51
47
  .ds-group-header__icon,
52
48
  .ds-btn--toggle {
@@ -73,6 +69,7 @@ $ds-group-header__icon-size: 24px;
73
69
  .ds-group-header__right-link {
74
70
  @include ds-typography($ds-typography-functional-body01regular);
75
71
  @include ds-link($ds-link-paragraph);
72
+ color: var(--group-header-icon-color);
76
73
  }
77
74
 
78
75
  .ds-group-header__icon {
@@ -122,6 +119,7 @@ $ds-group-header__icon-size: 24px;
122
119
 
123
120
  .ds-group-header__image {
124
121
  margin-left: ds-spacing($ds-s-100);
122
+ align-self: center;
125
123
 
126
124
  .picture,
127
125
  img {
@@ -13,12 +13,12 @@
13
13
  params.classNames if params.classNames
14
14
  ] | join(" ") %}
15
15
 
16
- {% if params.groupHeaderVariant %}
17
- {% set variant = params.groupHeaderVariant %}
16
+ {% if params.groupHeaderType %}
17
+ {% set type = params.groupHeaderType %}
18
18
  {% elif arrowPosition === 'header' %}
19
- {% set variant = 'arrows' %}
19
+ {% set type = 'arrows' %}
20
20
  {% else %}
21
- {% set variant = 'link' %}
21
+ {% set type = 'link' %}
22
22
  {% endif %}
23
23
 
24
24
  {%- call TeaserCard({
@@ -30,7 +30,7 @@
30
30
  {{ GroupHeader({
31
31
  title: params.title,
32
32
  href: params.titleHref,
33
- variant: variant,
33
+ type: type,
34
34
  linkText: 'Visa alla'
35
35
  }) }}
36
36
  <div class="{{ componentClassName + '__carousel'}}">
@@ -12,18 +12,12 @@
12
12
  ] | join(" ") %}
13
13
  {%- set attributes = getAttributes(params.attributes) %}
14
14
 
15
- {% if params.vignetteIconHtml %}
16
- {% set variant = 'image' %}
17
- {% elif params.areaType === 'bauta' or params.areaType === 'bautaxl'%}
18
- {% set variant = params.areaType %}
19
- {% endif %}
20
-
21
15
  <div class="{{ classes }}">
22
16
  {% if params.vignetteText %}
23
17
  {{ GroupHeader({
24
18
  title: params.vignetteText,
25
19
  href: params.vignetteTargetUrl,
26
- variant: variant,
20
+ variant: params.areaType if params.areaType,
27
21
  mediaHtml: params.vignetteIconHtml if params.vignetteIconHtml
28
22
  }) }}
29
23
  {% endif %}
@@ -1,27 +1,27 @@
1
1
  $ds-hex-dark-text-primary: #EDEDED;
2
2
  $ds-hex-dark-text-primary-02: #B8B8B8;
3
3
  $ds-hex-dark-text-secondary: #050505;
4
- $ds-hex-dark-text-critical: #EF7171;
4
+ $ds-hex-dark-text-critical: #FD2330;
5
5
  $ds-hex-dark-text-disabled: #B8B8B8;
6
6
  $ds-hex-dark-text-on-brand: #141414;
7
7
  $ds-hex-dark-text-on-business: #ffffff;
8
8
  $ds-hex-dark-text-on-critical: #ffffff;
9
9
  $ds-hex-dark-text-on-success: #ffffff;
10
- $ds-hex-dark-text-brand: #EF7171;
10
+ $ds-hex-dark-text-brand: #FD2330;
11
11
  $ds-hex-dark-text-body-link: #65A0FC;
12
12
  $ds-hex-dark-text-body-link-visited: #65A0FC;
13
13
  $ds-hex-dark-text-positive: #3A8352;
14
14
  $ds-hex-dark-icon-primary: #EDEDED;
15
15
  $ds-hex-dark-icon-primary-02: #CFCFCF;
16
16
  $ds-hex-dark-icon-secondary: #050505;
17
- $ds-hex-dark-icon-critical: #EF7171;
17
+ $ds-hex-dark-icon-critical: #FD2330;
18
18
  $ds-hex-dark-icon-disabled: #B8B8B8;
19
19
  $ds-hex-dark-icon-on-brand: #141414;
20
20
  $ds-hex-dark-icon-on-critical: #ffffff;
21
21
  $ds-hex-dark-icon-on-success: #ffffff;
22
22
  $ds-hex-dark-icon-on-business: #ffffff;
23
- $ds-hex-dark-icon-brand: #EF7171;
24
- $ds-hex-dark-component-brand: #EF7171;
23
+ $ds-hex-dark-icon-brand: #FD2330;
24
+ $ds-hex-dark-component-brand: #FD2330;
25
25
  $ds-hex-dark-component-business: #3A8352;
26
26
  $ds-hex-dark-component-primary: #EDEDED;
27
27
  $ds-hex-dark-component-primary-overlay: #ffffff21;
@@ -34,8 +34,8 @@ $ds-hex-dark-component-critical-overlay: #A51D24;
34
34
  $ds-hex-dark-component-static-white: #ffffff;
35
35
  $ds-hex-dark-component-positive: #3A8352;
36
36
  $ds-hex-dark-component-primary-02: #CFCFCF;
37
- $ds-hex-dark-surface-below: #050505;
38
- $ds-hex-dark-surface-background: #141414;
37
+ $ds-hex-dark-surface-below: #262626;
38
+ $ds-hex-dark-surface-background: #050505;
39
39
  $ds-hex-dark-surface-raised: #2B2B2B;
40
40
  $ds-hex-dark-surface-native-article: #2B2B2B;
41
41
  $ds-hex-dark-surface-elevated: #2B2B2B;
@@ -43,22 +43,22 @@ $ds-hex-dark-surface-overlay: #05050580;
43
43
  $ds-hex-dark-surface-quiz: #EA3E3F;
44
44
  $ds-hex-dark-surface-korsord: #8BB6E8;
45
45
  $ds-hex-dark-surface-sudoko: #90D0BD;
46
- $ds-hex-dark-border-primary: #ffffff21;
46
+ $ds-hex-dark-border-primary: #3B3B3B;
47
47
  $ds-hex-dark-border-primary-02: #ffffff66;
48
48
  $ds-hex-dark-border-primary-03: #EDEDED;
49
49
  $ds-hex-dark-border-secondary: #141414;
50
50
  $ds-hex-dark-border-business: #3A8352;
51
- $ds-hex-dark-border-critical: #EF7171;
52
- $ds-hex-dark-border-focus: #EF7171;
51
+ $ds-hex-dark-border-critical: #FD2330;
52
+ $ds-hex-dark-border-focus: #FD2330;
53
53
  $ds-hex-dark-border-focus-02: #ffffff;
54
- $ds-hex-dark-border-focus-03: #EF7171;
54
+ $ds-hex-dark-border-focus-03: #FD2330;
55
55
  $ds-hex-dark-border-focus-04: #3A8352;
56
56
  $ds-hex-dark-background-primary: #141414;
57
- $ds-hex-dark-gradient-content-fade-left: linear-gradient(90deg, #14141400 0%, #141414 100%);
58
- $ds-hex-dark-gradient-content-fade-right: linear-gradient(-90deg, #14141400 0%, #141414 100%);
59
- $ds-hex-dark-gradient-content-fade-up: linear-gradient(180deg, #14141400 0%, #141414 100%);
60
- $ds-hex-dark-gradient-content-fade-up-down: linear-gradient(0deg, #14141400 0%, #141414 100%);
61
- $ds-hex-dark-gradient-content-fade-down: linear-gradient(0deg, #14141400 0%, #141414 100%);
57
+ $ds-hex-dark-gradient-content-fade-left: linear-gradient(90deg, #05050500 0%, #050505 100%);
58
+ $ds-hex-dark-gradient-content-fade-right: linear-gradient(-90deg, #05050500 0%, #050505 100%);
59
+ $ds-hex-dark-gradient-content-fade-up: linear-gradient(180deg, #05050500 0%, #050505 100%);
60
+ $ds-hex-dark-gradient-content-fade-up-down: linear-gradient(0deg, #05050500 0%, #050505 100%);
61
+ $ds-hex-dark-gradient-content-fade-down: linear-gradient(0deg, #05050500 0%, #050505 100%);
62
62
  $ds-hex-dark-static-red-100: #FAD4D4;
63
63
  $ds-hex-dark-static-black: #141414;
64
64
  $ds-hex-dark-static-transparent-black: #14141499;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "15.2.9",
3
+ "version": "15.2.11",
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",
@@ -3,13 +3,13 @@
3
3
  "primary": "#EDEDED",
4
4
  "primary-02": "#B8B8B8",
5
5
  "secondary": "#050505",
6
- "critical": "#EF7171",
6
+ "critical": "#FD2330",
7
7
  "disabled": "#B8B8B8",
8
8
  "on-brand": "#141414",
9
9
  "on-business": "#ffffff",
10
10
  "on-critical": "#ffffff",
11
11
  "on-success": "#ffffff",
12
- "brand": "#EF7171",
12
+ "brand": "#FD2330",
13
13
  "body-link": "#65A0FC",
14
14
  "body-link-visited": "#65A0FC",
15
15
  "positive": "#3A8352"
@@ -18,16 +18,16 @@
18
18
  "primary": "#EDEDED",
19
19
  "primary-02": "#CFCFCF",
20
20
  "secondary": "#050505",
21
- "critical": "#EF7171",
21
+ "critical": "#FD2330",
22
22
  "disabled": "#B8B8B8",
23
23
  "on-brand": "#141414",
24
24
  "on-critical": "#ffffff",
25
25
  "on-success": "#ffffff",
26
26
  "on-business": "#ffffff",
27
- "brand": "#EF7171"
27
+ "brand": "#FD2330"
28
28
  },
29
29
  "component": {
30
- "brand": "#EF7171",
30
+ "brand": "#FD2330",
31
31
  "business": "#3A8352",
32
32
  "primary": "#EDEDED",
33
33
  "primary-overlay": "#ffffff21",
@@ -42,8 +42,8 @@
42
42
  "primary-02": "#CFCFCF"
43
43
  },
44
44
  "surface": {
45
- "below": "#050505",
46
- "background": "#141414",
45
+ "below": "#262626",
46
+ "background": "#050505",
47
47
  "raised": "#2B2B2B",
48
48
  "native-article": "#2B2B2B",
49
49
  "elevated": "#2B2B2B",
@@ -53,26 +53,26 @@
53
53
  "sudoko": "#90D0BD"
54
54
  },
55
55
  "border": {
56
- "primary": "#ffffff21",
56
+ "primary": "#3B3B3B",
57
57
  "primary-02": "#ffffff66",
58
58
  "primary-03": "#EDEDED",
59
59
  "secondary": "#141414",
60
60
  "business": "#3A8352",
61
- "critical": "#EF7171",
62
- "focus": "#EF7171",
61
+ "critical": "#FD2330",
62
+ "focus": "#FD2330",
63
63
  "focus-02": "#ffffff",
64
- "focus-03": "#EF7171",
64
+ "focus-03": "#FD2330",
65
65
  "focus-04": "#3A8352"
66
66
  },
67
67
  "background": {
68
68
  "primary": "#141414"
69
69
  },
70
70
  "gradient": {
71
- "content-fade-left": "linear-gradient(90deg, #14141400 0%, #141414 100%)",
72
- "content-fade-right": "linear-gradient(-90deg, #14141400 0%, #141414 100%)",
73
- "content-fade-up": "linear-gradient(180deg, #14141400 0%, #141414 100%)",
74
- "content-fade-up-down": "linear-gradient(0deg, #14141400 0%, #141414 100%)",
75
- "content-fade-down": "linear-gradient(0deg, #14141400 0%, #141414 100%)"
71
+ "content-fade-left": "linear-gradient(90deg, #05050500 0%, #050505 100%)",
72
+ "content-fade-right": "linear-gradient(-90deg, #05050500 0%, #050505 100%)",
73
+ "content-fade-up": "linear-gradient(180deg, #05050500 0%, #050505 100%)",
74
+ "content-fade-up-down": "linear-gradient(0deg, #05050500 0%, #050505 100%)",
75
+ "content-fade-down": "linear-gradient(0deg, #05050500 0%, #050505 100%)"
76
76
  },
77
77
  "static": {
78
78
  "red-100": "#FAD4D4",