@bonniernews/dn-design-system-web 4.1.0-alpha.3 → 4.1.0-alpha.4

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
@@ -3,6 +3,21 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 4.1.0-alpha.4 (2023-09-04)
7
+
8
+
9
+ ### Features
10
+
11
+ * **web:** small version of text button ([#969](https://github.com/BonnierNews/dn-design-system/issues/969)) ([7774e0a](https://github.com/BonnierNews/dn-design-system/commit/7774e0aeaf9cc836a5775665259fcc7003dc0f7a))
12
+ * **web:** update typography for native puff ([#972](https://github.com/BonnierNews/dn-design-system/issues/972)) ([2ac880f](https://github.com/BonnierNews/dn-design-system/commit/2ac880f3394a8fba4bec6d97a5033181807e6a9a))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **web:** remove unused props from floating-button readme example ([#971](https://github.com/BonnierNews/dn-design-system/issues/971)) ([9f53f46](https://github.com/BonnierNews/dn-design-system/commit/9f53f460e041d385d6869e1acaa4126f8952a69d))
18
+
19
+
20
+
6
21
  ## 4.1.0-alpha.3 (2023-08-31)
7
22
 
8
23
 
@@ -30,8 +30,7 @@ These are copy paste friendly examples to quickliy get started using a component
30
30
 
31
31
  {{ FloatingButton({
32
32
  text: 'With icon',
33
- iconPosition: 'left',
34
- iconName: 'arrow_forward',
33
+ iconName: 'arrow_forward'
35
34
  })}}
36
35
  ```
37
36
 
@@ -18,16 +18,8 @@
18
18
  }
19
19
 
20
20
  .ds-teaser__title {
21
- font-family: $ds-font--arial;
22
- font-weight: 700;
23
- @include ds-mq-only-breakpoint(mobile) {
24
- font-size: ds-px-to-rem(20px);
25
- line-height: ds-px-to-rem(24px);
26
- }
27
- @include ds-mq-smallest-breakpoint(tablet) {
28
- font-size: ds-px-to-rem(32px);
29
- line-height: ds-px-to-rem(36px);
30
- }
21
+ @include ds-typography($ds-typography-expressive-heading02bold);
22
+ font-family: $ds-font--arial !important;
31
23
  }
32
24
 
33
25
  &::after {
@@ -47,6 +39,12 @@
47
39
  }
48
40
  }
49
41
 
42
+ &.ds-teaser--native-large {
43
+ .ds-teaser__title {
44
+ @include ds-typography($ds-typography-expressive-heading04bold);
45
+ }
46
+ }
47
+
50
48
  &.ds-teaser--native-right {
51
49
  @include ds-mq-smallest-breakpoint(tablet) {
52
50
  .ds-teaser__title {
@@ -57,6 +55,10 @@
57
55
  }
58
56
 
59
57
  &.ds-teaser--native-standard {
58
+ .ds-teaser__title {
59
+ @include ds-typography($ds-typography-expressive-heading03bold);
60
+ }
61
+
60
62
  .ds-teaser__media {
61
63
  margin-left: ds-spacing-component($ds-sc-x4);
62
64
  float: right;
@@ -11,6 +11,7 @@
11
11
  |parameter | type | required | options | default | description |
12
12
  |:--- | :--- | :--- | :--- | :--- | :--- |
13
13
  |text | String | yes | | | |
14
+ |size| String | no | default, small | default | |
14
15
  |disabled | bool | no | true, false | false | Note: only works on button-tag, not on a-tag |
15
16
  |fullWidth | bool | no | true, false | false | Button will be full width on both desktop and mobile |
16
17
  |mobile.fullWidth | bool | no | true, false | false | Ex mobile: { fullWidth: true } |
@@ -14,6 +14,10 @@
14
14
  {% set additionalClasses = (additionalClasses.push("ds-force-px"), additionalClasses) %}
15
15
  {% endif %}
16
16
 
17
+ {%- if params.size and params.size != "default" %}
18
+ {% set additionalClasses = (additionalClasses.push(classNamePrefix + params.size), additionalClasses) %}
19
+ {% endif %}
20
+
17
21
  {%- if params.fullWidth %}
18
22
  {% set additionalClasses = (additionalClasses.push(classNamePrefix + "full-width"), additionalClasses) %}
19
23
  {% endif %}
@@ -32,7 +36,11 @@
32
36
  {% endif %}
33
37
 
34
38
  {%- set loadingHtml %}
35
- {{ Spinner({ size: "small", variant: "primary", forcePx: params.forcePx }) }}
39
+ {% if (params.size == 'small') %}
40
+ {{ Spinner({ size: "xsmall", variant: "primary", forcePx: params.forcePx }) }}
41
+ {% else %}
42
+ {{ Spinner({ size: "small", variant: "primary", forcePx: params.forcePx }) }}
43
+ {% endif %}
36
44
  {% endset %}
37
45
 
38
46
  {%- if params.loading %}
@@ -5,6 +5,7 @@
5
5
  $ds-text-btn__min-clickable-area: 0;
6
6
  $ds-text-btn__underline-offset: 2px;
7
7
  $ds-text-btn__icon-size: 24px;
8
+ $ds-text-btn__icon-size-small: 20px;
8
9
 
9
10
  @mixin ds-text-btn-disabled() {
10
11
  cursor: not-allowed;
@@ -142,6 +143,54 @@ $ds-text-btn__icon-size: 24px;
142
143
  padding: ds-spacing-component($ds-sc-x3 $ds-sc-x2 $ds-sc-x3 $ds-sc-x3);
143
144
  }
144
145
 
146
+ .ds-text-btn--small {
147
+ .ds-text-btn__inner {
148
+ padding: ds-spacing-component($ds-sc-x2);
149
+
150
+ .ds-text-btn__text {
151
+ @include ds-typography($ds-typography-functional-body01regular);
152
+ @at-root .ds-force-px#{&} {
153
+ @include ds-typography($ds-typography-functional-body01regular, true);
154
+ }
155
+ }
156
+ }
157
+
158
+ &.ds-text-btn--icon-left .ds-text-btn__inner,
159
+ &.ds-text-btn--icon-right .ds-text-btn__inner {
160
+ .ds-icon {
161
+ height: ds-px-to-rem($ds-text-btn__icon-size-small);
162
+ width: ds-px-to-rem($ds-text-btn__icon-size-small);
163
+ margin: ds-spacing-component(0 0 0 $ds-sc-x1);
164
+ }
165
+ }
166
+
167
+ &.ds-text-btn--icon-left .ds-text-btn__inner {
168
+ padding: ds-spacing-component($ds-sc-x2 $ds-sc-x2 $ds-sc-x2 $ds-sc-x1);
169
+ }
170
+
171
+
172
+ &.ds-text-btn--icon-right .ds-text-btn__inner {
173
+ padding: ds-spacing-component($ds-sc-x2 $ds-sc-x1 $ds-sc-x2 $ds-sc-x2);
174
+ }
175
+ &.ds-text-btn--condensed {
176
+ &.ds-text-btn--icon-left .ds-text-btn__inner {
177
+ padding: ds-spacing-component($ds-sc-x1 $ds-sc-x1 $ds-sc-x1 0);
178
+ }
179
+
180
+ &.ds-text-btn--icon-right .ds-text-btn__inner {
181
+ padding: ds-spacing-component($ds-sc-x1 0 $ds-sc-x1 $ds-sc-x1);
182
+ }
183
+ }
184
+
185
+ &.ds-force-px {
186
+ &.ds-text-btn--icon-left .ds-text-btn__inner .ds-icon,
187
+ &.ds-text-btn--icon-right .ds-text-btn__inner .ds-icon {
188
+ height: $ds-text-btn__icon-size-small;
189
+ width: $ds-text-btn__icon-size-small;
190
+ }
191
+ }
192
+ }
193
+
145
194
  .ds-text-btn--condensed .ds-text-btn__inner {
146
195
  padding: ds-spacing-component($ds-sc-x1);
147
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "4.1.0-alpha.3",
3
+ "version": "4.1.0-alpha.4",
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",