@bonniernews/dn-design-system-web 37.1.0 → 37.2.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,40 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
4
4
 
5
5
 
6
6
 
7
+ ## [37.2.1](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@37.2.0...@bonniernews/dn-design-system-web@37.2.1) (2026-01-21)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * only run setup node in token/icon changes script if paths filter is true ([#2000](https://github.com/BonnierNews/dn-design-system/issues/2000)) ([bb5eb88](https://github.com/BonnierNews/dn-design-system/commit/bb5eb88342a4b5b59d29b49fe2a5c5b46f48db8c))
13
+ * remove create-app-android-font from scripts ([#2005](https://github.com/BonnierNews/dn-design-system/issues/2005)) ([3beba40](https://github.com/BonnierNews/dn-design-system/commit/3beba40d3b02fb96f1f3ee9215322df82248a637))
14
+
15
+
16
+ ### Maintenance
17
+
18
+ * add missing conventional-changelog-conventionalcommits dev dep ([#2002](https://github.com/BonnierNews/dn-design-system/issues/2002)) ([f27a423](https://github.com/BonnierNews/dn-design-system/commit/f27a4233c324561bc9d81a4579229dea3d293ed8))
19
+ * **deps:** bump the npm_and_yarn group across 1 directory with 5 updates ([#2003](https://github.com/BonnierNews/dn-design-system/issues/2003)) ([8e301e7](https://github.com/BonnierNews/dn-design-system/commit/8e301e7f26c68ad6d68792065b1e2a2607875bae))
20
+ * **deps:** bump the npm_and_yarn group across 1 directory with 6 updates ([#1999](https://github.com/BonnierNews/dn-design-system/issues/1999)) ([b2a38de](https://github.com/BonnierNews/dn-design-system/commit/b2a38de6d89252a44b477dc10dffd074654cd373))
21
+ * **foundations:** update variables from Figma ([#1996](https://github.com/BonnierNews/dn-design-system/issues/1996)) ([1f72be5](https://github.com/BonnierNews/dn-design-system/commit/1f72be5b478828f56c17a1b468653531c9ba3390))
22
+ * prerelease packages ([224c25a](https://github.com/BonnierNews/dn-design-system/commit/224c25add1640aead67f695ade7deab604f18fd3))
23
+
24
+ ## [37.2.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@37.1.0...@bonniernews/dn-design-system-web@37.2.0) (2026-01-19)
25
+
26
+
27
+ ### Features
28
+
29
+ * **web:** select component ([#1995](https://github.com/BonnierNews/dn-design-system/issues/1995)) ([9457fab](https://github.com/BonnierNews/dn-design-system/commit/9457fab0b3dbf8c35d396d3efd3fc97273b9832c))
30
+
31
+
32
+ ### Bug Fixes
33
+
34
+ * **web:** avoid rendering zero in tagheader ([#1914](https://github.com/BonnierNews/dn-design-system/issues/1914)) ([1c80836](https://github.com/BonnierNews/dn-design-system/commit/1c80836159b6ee244c833f14c247bc978ecb49ea))
35
+
36
+
37
+ ### Maintenance
38
+
39
+ * **app:** expo storybook ([#1997](https://github.com/BonnierNews/dn-design-system/issues/1997)) ([19c0814](https://github.com/BonnierNews/dn-design-system/commit/19c081472e71642f29d96ad6f7e09cc8311f3c90))
40
+
7
41
  ## [37.1.0](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@37.0.2...@bonniernews/dn-design-system-web@37.1.0) (2026-01-13)
8
42
 
9
43
 
@@ -0,0 +1,44 @@
1
+ Select
2
+ ======
3
+
4
+ * GitHub: [BonnierNews/dn-design-system/web/src/components/select](https://github.com/BonnierNews/dn-design-system/tree/main/web/src/components/select)
5
+ * Storybook: [Form > Select](https://designsystem.dn.se/?path=/docs/basic-form-select--docs)
6
+
7
+ The component will not include styling by itself. Make sure to include the right styles for the component. See example below: `@use "@bonniernews/dn-design-system-web/components/select/select";`
8
+
9
+ | Name | Description | Default |
10
+ |:--- | :--- | :--- |
11
+ | name\* | It's used as name and id<br />string | \- |
12
+ | label\* | A label for the input<br />string | \- |
13
+ | error | Used if error state shoud be set on load<br />boolean | \- |
14
+ | errorMessage | What error message that should be displayed<br />string | \- |
15
+ | required | boolean | \- |
16
+ | disabled | Set to true if the field should be disabled<br />boolean | \- |
17
+ | validation | To use with the sites validation, some example values for dn-web: required, password, email<br />string | \- |
18
+ | helpText | A helptext for the field if needed<br />string | \- |
19
+ | forcePx | Fixed pixel value is used for typography to prevent scaling based on html font-size<br />boolean | \- |
20
+ | autofocus | Set to true if field should have focus when loaded<br />boolean | \- |
21
+ | options | Ex. { data-prop: value }<br />{ value: string; label: string; }\[\] | \- |
22
+ | classNames | Ex. "my-special-class"<br />string | ", " |
23
+ | attributes | Ex. { target: "\_blank", "data-test": "lorem ipsum" }<br />Record<string, unknown> | \- |
24
+
25
+ ```jsx
26
+ <Select
27
+ label="Välj en måltid"
28
+ name="select-meal"
29
+ options={[
30
+ {
31
+ label: 'Lasagne',
32
+ value: 'option1'
33
+ },
34
+ {
35
+ label: 'Pizza',
36
+ value: 'option2'
37
+ },
38
+ {
39
+ label: 'Skagenröra',
40
+ value: 'option3'
41
+ }
42
+ ]}
43
+ />
44
+ ```
@@ -0,0 +1,85 @@
1
+ @use "../../foundations/helpers/forward.helpers.scss" as *;
2
+ @use "../../assets/form-field/form-field.scss";
3
+
4
+ .ds-select {
5
+ $ds-select__icon-size: 24px;
6
+ color: $ds-color-text-primary;
7
+ position: relative;
8
+ padding-top: ds-spacing($ds-s-050, rem);
9
+
10
+ .ds-select__inner {
11
+ position: relative;
12
+ }
13
+
14
+ .ds-icon {
15
+ pointer-events: none;
16
+ position: absolute;
17
+ width: $ds-select__icon-size;
18
+ right: ds-spacing($ds-s-075);
19
+
20
+ svg {
21
+ width: $ds-select__icon-size;
22
+ }
23
+ }
24
+
25
+ .ds-select__input {
26
+ // Remove default styling of select arrow
27
+ -moz-appearance:none; /* Firefox */
28
+ -webkit-appearance:none; /* Safari and Chrome */
29
+ appearance:none;
30
+
31
+ color: transparent;
32
+ box-sizing: border-box;
33
+ cursor: pointer;
34
+ width: 100%;
35
+ background-color: $ds-color-surface-primary;
36
+ padding: ds-px-to-rem(ds-spacing($ds-s-100) - ds-border-width(xxs)) ds-spacing($ds-s-100) - ds-border-width(xxs);
37
+ padding-right: ds-spacing($ds-s-250);
38
+ border: solid ds-border-width(xxs) $ds-color-border-primary-strong;
39
+ border-radius: ds-border-radius(025);
40
+ margin: 0;
41
+ @include ds-typography($ds-typography-functional-body-md);
42
+
43
+ &:disabled {
44
+ cursor: not-allowed;
45
+
46
+ + .ds-select__label {
47
+ color: $ds-color-text-primary-disabled;
48
+ cursor: not-allowed;
49
+ }
50
+ }
51
+
52
+ &:focus-visible {
53
+ outline: ds-border-width(xs) solid #{$ds-color-border-primary-strongest};
54
+ outline-offset: 2px;
55
+ }
56
+ }
57
+
58
+ .ds-select__label {
59
+ position: absolute;
60
+ top: ds-spacing($ds-s-075);
61
+ left: ds-spacing($ds-s-075);
62
+ padding: ds-spacing($ds-s-025);
63
+ z-index: 1;
64
+ pointer-events: none;
65
+ opacity: 1;
66
+ transition: opacity 0.1s ease-in, top 0.1s ease-in;
67
+ max-width: calc(100% - ds-spacing($ds-s-250));
68
+ width: 100%;
69
+ white-space: nowrap;
70
+ overflow: hidden;
71
+ text-overflow: ellipsis;
72
+ @include ds-typography($ds-typography-functional-body-md);
73
+ }
74
+
75
+ &:has(select option:checked:not([value=""])) .ds-select__label {
76
+ background-color: $ds-color-surface-primary;
77
+ opacity: 1;
78
+ top: -#{ds-spacing($ds-s-100)};
79
+ width: auto;
80
+ }
81
+
82
+ &:has(select option:checked:not([value=""])) .ds-select__input {
83
+ color: $ds-color-text-primary;
84
+ }
85
+ }
@@ -1,10 +1,12 @@
1
1
  $ds-color-surface-primary: var(--ds-color-surface-primary);
2
2
  $ds-color-surface-highlight: var(--ds-color-surface-highlight);
3
+ $ds-color-surface-highlight-text: var(--ds-color-surface-highlight-text);
3
4
  $ds-color-surface-primary-raised-soft: var(--ds-color-surface-primary-raised-soft);
4
5
  $ds-color-surface-primary-raised-strong: var(--ds-color-surface-primary-raised-strong);
5
6
  $ds-color-surface-primary-elevated: var(--ds-color-surface-primary-elevated);
6
7
  $ds-color-surface-primaryinvert: var(--ds-color-surface-primaryinvert);
7
8
  $ds-color-surface-foreground: var(--ds-color-surface-foreground);
9
+ $ds-color-surface-foreground-native: var(--ds-color-surface-foreground-native);
8
10
  $ds-color-surface-primaryinvert-raised-soft: var(--ds-color-surface-primaryinvert-raised-soft);
9
11
  $ds-color-surface-primaryinvert-elevated: var(--ds-color-surface-primaryinvert-elevated);
10
12
  $ds-color-surface-brand: var(--ds-color-surface-brand);
@@ -1,10 +1,12 @@
1
1
  $ds-hex-dark-surface-primary: #171717;
2
2
  $ds-hex-dark-surface-highlight: #24221e;
3
+ $ds-hex-dark-surface-highlight-text: #41402c;
3
4
  $ds-hex-dark-surface-primary-raised-soft: #242424;
4
5
  $ds-hex-dark-surface-primary-raised-strong: #333333;
5
6
  $ds-hex-dark-surface-primary-elevated: #333333;
6
7
  $ds-hex-dark-surface-primaryinvert: #ffffff;
7
8
  $ds-hex-dark-surface-foreground: #0d0d0d;
9
+ $ds-hex-dark-surface-foreground-native: #0d0d0d;
8
10
  $ds-hex-dark-surface-primaryinvert-raised-soft: rgba(5, 5, 5, 0.05);
9
11
  $ds-hex-dark-surface-primaryinvert-elevated: #ffffff;
10
12
  $ds-hex-dark-surface-brand: #da000d;
@@ -1,10 +1,12 @@
1
1
  $ds-hex-surface-primary: #ffffff;
2
2
  $ds-hex-surface-highlight: #f8f5ef;
3
+ $ds-hex-surface-highlight-text: #fff9a8;
3
4
  $ds-hex-surface-primary-raised-soft: #f2f2f2;
4
5
  $ds-hex-surface-primary-raised-strong: #e5e5e5;
5
6
  $ds-hex-surface-primary-elevated: #ffffff;
6
7
  $ds-hex-surface-primaryinvert: #0d0d0d;
7
8
  $ds-hex-surface-foreground: #f2f2f2;
9
+ $ds-hex-surface-foreground-native: #f2f2f2;
8
10
  $ds-hex-surface-primaryinvert-raised-soft: #ffffff0d;
9
11
  $ds-hex-surface-primaryinvert-elevated: #242424;
10
12
  $ds-hex-surface-brand: #da000d;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonniernews/dn-design-system-web",
3
- "version": "37.1.0",
3
+ "version": "37.2.1",
4
4
  "description": "DN design system for web.",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/BonnierNews/dn-design-system/tree/main/web/src#readme",
@@ -7,11 +7,13 @@ var formatClassString = (classesArray) => {
7
7
  var colors_css_variables_default = {
8
8
  "surface-primary": "var(--ds-color-surface-primary)",
9
9
  "surface-highlight": "var(--ds-color-surface-highlight)",
10
+ "surface-highlight-text": "var(--ds-color-surface-highlight-text)",
10
11
  "surface-primary-raised-soft": "var(--ds-color-surface-primary-raised-soft)",
11
12
  "surface-primary-raised-strong": "var(--ds-color-surface-primary-raised-strong)",
12
13
  "surface-primary-elevated": "var(--ds-color-surface-primary-elevated)",
13
14
  "surface-primaryinvert": "var(--ds-color-surface-primaryinvert)",
14
15
  "surface-foreground": "var(--ds-color-surface-foreground)",
16
+ "surface-foreground-native": "var(--ds-color-surface-foreground-native)",
15
17
  "surface-primaryinvert-raised-soft": "var(--ds-color-surface-primaryinvert-raised-soft)",
16
18
  "surface-primaryinvert-elevated": "var(--ds-color-surface-primaryinvert-elevated)",
17
19
  "surface-brand": "var(--ds-color-surface-brand)",