@bonniernews/dn-design-system-web 11.1.0 → 11.1.1

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,13 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
+ ## [11.1.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@11.1.0...@bonniernews/dn-design-system-web@11.1.1) (2024-02-02)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **web:** correct height on byline toggle ([#1184](https://github.com/BonnierNews/dn-design-system/issues/1184)) ([2464ece](https://github.com/BonnierNews/dn-design-system/commit/2464ece0c6c0bacbf6f3a0b90787372bfd61c079))
13
+
7
14
  ## [11.1.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@11.0.4...@bonniernews/dn-design-system-web@11.1.0) (2024-02-01)
8
15
 
9
16
 
@@ -55,6 +55,7 @@ $ds-btn-toggle__icon-size-xsmall: 20px;
55
55
  display: inline-flex;
56
56
  align-items: center;
57
57
  justify-content: center;
58
+ flex-shrink: 0;
58
59
  border: $ds-btn-toggle-outlined__border-width solid var(--ds-btn-toggle__border-color);
59
60
  border-radius: 100px;
60
61
  position: relative;
@@ -21,6 +21,7 @@ The byline is a list item and should be wrapped in a list.
21
21
  |email | String | no | | | email will be displayed instead of role for variant:follow |
22
22
  |authorPageUrl | String | no | | | For variant:button an inner link can be used in combination with a button, for other variants an outer link is used |
23
23
  |followable | Boolean | no | true, false | true | If true the toggle button to follow will be shown when using variant:follow. |
24
+ |followed | Boolean | no | true, false | false | If true the toggle button will be in "selected" state. Depends on followable parameter. |
24
25
  |attributes | Object | no | | | Ex. { target: "_blank", "data-test": "lorem ipsum" } |
25
26
  |elementAttributes | Object | no | | | Sets attributes on actual toggle element and not byline list item. Same structure as attributes above, for accessability reasons it's important to send in "aria-label": "Följ " + byline.name |
26
27
  |classNames | String | no | | | Ex. "my-special-class" |
@@ -27,6 +27,7 @@
27
27
  {{ ButtonToggle({
28
28
  text: "Följ",
29
29
  selectedText: "Följer",
30
+ selected: params.followed,
30
31
  variant: "secondaryFilled",
31
32
  size: "xsmall",
32
33
  attributes: params.elementAttributes,
@@ -52,21 +52,6 @@ $ds-byline__image-size--direkt: 36px;
52
52
  bottom: 0;
53
53
  right: 0;
54
54
  }
55
-
56
- .ds-icon {
57
- position: relative;
58
- display: flex;
59
- height: ds-px-to-rem($ds-byline__icon-size);
60
- width: ds-px-to-rem($ds-byline__icon-size);
61
- margin: 0;
62
- @at-root .ds-force-px#{&} {
63
- height: $ds-byline__icon-size;
64
- width: $ds-byline__icon-size;
65
- }
66
- svg {
67
- fill: currentColor;
68
- }
69
- }
70
55
  }
71
56
 
72
57
  .ds-byline__content-wrapper {
@@ -122,11 +107,24 @@ $ds-byline__image-size--direkt: 36px;
122
107
  color: $ds-color-icon-primary;
123
108
  display: inline-flex;
124
109
  margin-left: ds-spacing($ds-s-100);
110
+
111
+ .ds-icon {
112
+ position: relative;
113
+ display: flex;
114
+ height: ds-px-to-rem($ds-byline__icon-size);
115
+ width: ds-px-to-rem($ds-byline__icon-size);
116
+ margin: 0;
117
+ @at-root .ds-force-px#{&} {
118
+ height: $ds-byline__icon-size;
119
+ width: $ds-byline__icon-size;
120
+ }
121
+ svg {
122
+ fill: currentColor;
123
+ }
124
+ }
125
125
  }
126
126
 
127
127
  .ds-byline__btn-toggle {
128
- min-height: $ds-byline__icon-size;
129
- min-width: 48px;
130
128
  margin-left: ds-spacing($ds-s-100);
131
129
  }
132
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "11.1.0",
3
+ "version": "11.1.1",
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",