@navikt/ds-css 7.5.2 → 7.6.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/darkside/action-menu.darkside.css +1 -6
  3. package/darkside/button.darkside.css +128 -141
  4. package/darkside/chips.darkside.css +6 -0
  5. package/darkside/expansioncard.darkside.css +2 -9
  6. package/darkside/form/combobox.darkside.css +255 -217
  7. package/darkside/form/file-upload.darkside.css +9 -9
  8. package/darkside/form/form-summary.darkside.css +1 -0
  9. package/darkside/form/index.css +14 -16
  10. package/darkside/form/select.darkside.css +74 -68
  11. package/darkside/form/switch.darkside.css +125 -132
  12. package/darkside/form/text-field.darkside.css +1 -1
  13. package/darkside/form/textarea.darkside.css +36 -78
  14. package/darkside/help-text.darkside.css +0 -6
  15. package/darkside/index.css +24 -12
  16. package/darkside/internalheader.darkside.css +45 -49
  17. package/darkside/modal.darkside.css +1 -4
  18. package/darkside/popover.darkside.css +1 -4
  19. package/darkside/primitives/index.css +30 -34
  20. package/darkside/read-more.darkside.css +68 -57
  21. package/darkside/skeleton.darkside.css +21 -24
  22. package/darkside/stepper.darkside.css +181 -221
  23. package/darkside/tabs.darkside.css +67 -74
  24. package/dist/component/form.css +22 -18
  25. package/dist/component/form.min.css +2 -2
  26. package/dist/component/index.css +40 -22
  27. package/dist/component/index.min.css +3 -3
  28. package/dist/component/modal.css +8 -0
  29. package/dist/component/modal.min.css +1 -1
  30. package/dist/component/readmore.css +4 -0
  31. package/dist/component/readmore.min.css +1 -1
  32. package/dist/components.css +40 -22
  33. package/dist/components.min.css +3 -3
  34. package/dist/global/tokens.css +1 -1
  35. package/dist/global/tokens.min.css +1 -1
  36. package/dist/index.css +40 -22
  37. package/dist/index.min.css +3 -3
  38. package/form/combobox.css +9 -2
  39. package/form/file-upload.css +7 -9
  40. package/form/select.css +2 -9
  41. package/form/switch.css +8 -0
  42. package/modal.css +8 -0
  43. package/package.json +2 -2
  44. package/read-more.css +4 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @navikt/ds-css
2
2
 
3
+ ## 7.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ReadMore: Added size 'large'. ([#3372](https://github.com/navikt/aksel/pull/3372))
8
+
9
+ ### Patch Changes
10
+
11
+ - Select: Now shows focus-outline when ':focus' is set trough pointer or label in all browsers. Chrome and Firefox handles `:focus-visible` differently for 'select', previously causing outline-border not to show in Firefox. ([#3415](https://github.com/navikt/aksel/pull/3415))
12
+
13
+ - Modal: Don't add scroll shadow when polyfilled ([#3408](https://github.com/navikt/aksel/pull/3408))
14
+
15
+ - Modal: Now shows up while screensharing with Vergic ([#3407](https://github.com/navikt/aksel/pull/3407))
16
+
17
+ - FileUpload: Remove browser styling from FileUpload.Item when used in list. ([#3413](https://github.com/navikt/aksel/pull/3413))
18
+
19
+ - Combobox: Single-select now shows cursor closer to selected item. ([#3384](https://github.com/navikt/aksel/pull/3384))
20
+
21
+ ## 7.5.3
22
+
3
23
  ## 7.5.2
4
24
 
5
25
  ### Patch Changes
@@ -3,12 +3,7 @@
3
3
  overflow: hidden;
4
4
  border-radius: var(--ax-border-radius-large);
5
5
  border: 1px solid var(--ax-border-subtleA);
6
-
7
- /* TODO: Use token here when added */
8
- box-shadow:
9
- 0 0 1px 0 rgb(7 9 13/ 0.02),
10
- 0 2px 5px 0 rgb(7 9 13/ 0.1),
11
- 0 10px 16px 0 rgb(7 9 13/ 0.12);
6
+ box-shadow: var(--ax-shadow-dialog);
12
7
  transition: transform 250ms cubic-bezier(0, 0, 0, 1) allow-discrete;
13
8
 
14
9
  &[data-state="open"] {
@@ -1,4 +1,9 @@
1
1
  .navds-button {
2
+ --__axc-button-icon-size: 1.5rem;
3
+ --__axc-button-icon-margin: -4px;
4
+ --__axc-button-border-color: transparent;
5
+ --__axc-button-border-width: 2px;
6
+
2
7
  padding: var(--ax-spacing-3) var(--ax-spacing-5);
3
8
  border-radius: var(--ax-border-radius-medium);
4
9
  display: inline-flex;
@@ -9,6 +14,18 @@
9
14
  align-items: center;
10
15
  justify-content: center;
11
16
  gap: var(--ax-spacing-2);
17
+ box-shadow: inset 0 0 0 var(--__axc-button-border-width) var(--__axc-button-border-color);
18
+
19
+ &:focus-visible {
20
+ outline: 2px solid var(--ax-border-focus);
21
+ outline-offset: 2px;
22
+ }
23
+ }
24
+
25
+ .navds-button--small,
26
+ .navds-button--xsmall {
27
+ --__axc-button-icon-margin: -2px;
28
+ --__axc-button-icon-size: 1.25rem;
12
29
  }
13
30
 
14
31
  .navds-button--small {
@@ -24,19 +41,14 @@
24
41
 
25
42
  .navds-button--icon-only {
26
43
  padding: var(--ax-spacing-3);
27
- }
28
44
 
29
- .navds-button--small.navds-button--icon-only {
30
- padding: var(--ax-spacing-1);
31
- }
32
-
33
- .navds-button--xsmall.navds-button--icon-only {
34
- padding: var(--ax-spacing-05);
35
- }
45
+ &.navds-button--small {
46
+ padding: var(--ax-spacing-1);
47
+ }
36
48
 
37
- .navds-button:focus-visible {
38
- outline: 2px solid var(--ax-border-focus);
39
- outline-offset: 2px;
49
+ &.navds-button--xsmall {
50
+ padding: var(--ax-spacing-05);
51
+ }
40
52
  }
41
53
 
42
54
  @supports not selector(:focus-visible) {
@@ -46,37 +58,40 @@
46
58
  }
47
59
 
48
60
  .navds-button__icon {
49
- font-size: 1.5rem;
61
+ font-size: var(--__axc-button-icon-size);
50
62
  display: flex;
51
63
 
52
- --__axc-button-icon-margin: -4px;
53
- }
54
-
55
- .navds-button__icon:first-child {
56
- margin-left: var(--__axc-button-icon-margin);
57
- }
58
-
59
- .navds-button__icon:last-child {
60
- margin-right: var(--__axc-button-icon-margin);
61
- }
62
-
63
- :where(.navds-button--xsmall, .navds-button--small) .navds-button__icon {
64
- --__axc-button-icon-margin: -2px;
64
+ &:first-child {
65
+ margin-left: var(--__axc-button-icon-margin);
66
+ }
65
67
 
66
- font-size: 1.25rem;
67
- }
68
+ &:last-child {
69
+ margin-right: var(--__axc-button-icon-margin);
70
+ }
68
71
 
69
- .navds-button__icon:only-child {
70
- margin: 0;
72
+ &:only-child {
73
+ margin: 0;
74
+ }
71
75
  }
72
76
 
73
77
  /*************************
74
78
  * .navds-button--primary *
75
79
  *************************/
76
-
77
80
  .navds-button--primary {
78
81
  background-color: var(--ax-bg-accent-strong);
79
82
  color: var(--ax-text-accent-contrast);
83
+
84
+ &:hover {
85
+ background-color: var(--ax-bg-accent-strong-hover);
86
+ }
87
+
88
+ &:active {
89
+ background-color: var(--ax-bg-accent-strong-pressed);
90
+ }
91
+
92
+ &:is(:disabled, .navds-button--disabled) {
93
+ background-color: var(--ax-bg-accent-strong);
94
+ }
80
95
  }
81
96
 
82
97
  @media (forced-colors: active) {
@@ -90,180 +105,152 @@
90
105
  }
91
106
  }
92
107
 
93
- .navds-button--primary:hover {
94
- background-color: var(--ax-bg-accent-strong-hover);
95
- }
96
-
97
- .navds-button--primary:active {
98
- background-color: var(--ax-bg-accent-strong-pressed);
99
- }
100
-
101
- .navds-button--primary:hover:where(:disabled, .navds-button--disabled),
102
- .navds-button--primary:active:where(:disabled, .navds-button--disabled) {
103
- background-color: var(--ax-bg-accent-strong);
104
- }
105
-
106
108
  /*************************
107
109
  * .navds-button--primary-neutral *
108
110
  *************************/
109
-
110
111
  .navds-button--primary-neutral {
111
112
  background-color: var(--ax-bg-neutral-strong);
112
113
  color: var(--ax-text-neutral-contrast);
113
- }
114
114
 
115
- .navds-button--primary-neutral:hover {
116
- background-color: var(--ax-bg-neutral-strong-hover);
117
- }
115
+ &:hover {
116
+ background-color: var(--ax-bg-neutral-strong-hover);
117
+ }
118
118
 
119
- .navds-button--primary-neutral:active {
120
- background-color: var(--ax-bg-neutral-strong-pressed);
121
- }
119
+ &:active {
120
+ background-color: var(--ax-bg-neutral-strong-pressed);
121
+ }
122
122
 
123
- .navds-button--primary-neutral:hover:where(:disabled, .navds-button--disabled),
124
- .navds-button--primary-neutral:active:where(:disabled, .navds-button--disabled) {
125
- background-color: var(--ax-bg-neutral-strong);
123
+ &:is(:disabled, .navds-button--disabled) {
124
+ background-color: var(--ax-bg-neutral-strong);
125
+ }
126
126
  }
127
127
 
128
128
  /**************************
129
129
  * .navds-button--secondary *
130
130
  **************************/
131
-
132
131
  .navds-button--secondary {
132
+ --__axc-button-border-color: var(--ax-border-accent);
133
+
133
134
  background-color: transparent;
134
135
  color: var(--ax-text-accent);
135
- box-shadow: inset 0 0 0 2px var(--ax-border-accent);
136
- }
137
136
 
138
- .navds-button--secondary:hover {
139
- background-color: var(--ax-bg-accent-moderate-hoverA);
140
- color: var(--ax-text-accent-strong);
141
- box-shadow: inset 0 0 0 2px var(--ax-bg-accent-strong-hover);
142
- }
137
+ &:hover {
138
+ --__axc-button-border-color: var(--ax-border-accent-strong);
143
139
 
144
- .navds-button--secondary:active {
145
- background-color: var(--ax-bg-accent-strong-pressed);
146
- color: var(--ax-text-accent-contrast);
147
- box-shadow: none;
148
- }
140
+ background-color: var(--ax-bg-accent-moderate-hoverA);
141
+ color: var(--ax-text-accent-strong);
142
+ }
149
143
 
150
- .navds-button--secondary:where(:disabled, .navds-button--disabled),
151
- .navds-button--secondary:hover:where(:disabled, .navds-button--disabled) {
152
- background-color: transparent;
153
- color: var(--ax-text-accent);
144
+ &:active {
145
+ --__axc-button-border-color: transparent;
146
+
147
+ background-color: var(--ax-bg-accent-strong-pressed);
148
+ color: var(--ax-text-accent-contrast);
149
+ }
150
+
151
+ &:is(:disabled, .navds-button--disabled) {
152
+ --__axc-button-border-color: var(--ax-border-accent);
153
+
154
+ background-color: transparent;
155
+ color: var(--ax-text-accent);
156
+ }
154
157
  }
155
158
 
156
159
  /**************************
157
160
  * .navds-button--secondary-neutral *
158
161
  **************************/
159
-
160
162
  .navds-button--secondary-neutral {
163
+ --__axc-button-border-color: var(--ax-border-default);
164
+
161
165
  background-color: transparent;
162
166
  color: var(--ax-text-neutral);
163
- box-shadow: inset 0 0 0 2px var(--ax-border-neutral);
164
- }
165
167
 
166
- .navds-button--secondary-neutral:hover {
167
- background-color: var(--ax-bg-neutral-moderate-hoverA);
168
- color: var(--ax-text-neutral-strong);
169
- }
168
+ &:hover {
169
+ --__axc-button-border-color: var(--ax-border-strong);
170
170
 
171
- .navds-button--secondary-neutral:active {
172
- color: var(--ax-text-neutral-contrast);
173
- background-color: var(--ax-bg-neutral-strong-pressed);
174
- box-shadow: none;
175
- }
171
+ background-color: var(--ax-bg-neutral-moderate-hoverA);
172
+ color: var(--ax-text-neutral-strong);
173
+ }
176
174
 
177
- .navds-button--secondary-neutral:where(:disabled, .navds-button--disabled),
178
- .navds-button--secondary-neutral:hover:where(:disabled, .navds-button--disabled) {
179
- color: var(--ax-text-default);
180
- background-color: transparent;
181
- box-shadow: inset 0 0 0 2px var(--ax-border-strong);
175
+ &:active {
176
+ --__axc-button-border-color: transparent;
177
+
178
+ color: var(--ax-text-neutral-contrast);
179
+ background-color: var(--ax-bg-neutral-strong-pressed);
180
+ }
181
+
182
+ &:is(:disabled, .navds-button--disabled) {
183
+ --__axc-button-border-color: var(--ax-border-neutral);
184
+
185
+ color: var(--ax-text-default);
186
+ background-color: transparent;
187
+ }
182
188
  }
183
189
 
184
190
  /****************************
185
191
  * .navds-button--tertiary *
186
192
  ****************************/
187
-
188
193
  .navds-button--tertiary {
189
194
  background-color: transparent;
190
195
  color: var(--ax-text-accent);
191
- }
192
196
 
193
- .navds-button--tertiary:hover {
194
- background-color: var(--ax-bg-accent-hoverA);
195
- color: var(--ax-text-accent-strong);
196
- }
197
-
198
- .navds-button--tertiary:active {
199
- background-color: var(--ax-bg-accent-strong-pressed);
200
- color: var(--ax-text-accent-contrast);
201
- }
197
+ &:hover {
198
+ background-color: var(--ax-bg-accent-moderate-hoverA);
199
+ color: var(--ax-text-accent-strong);
200
+ }
202
201
 
203
- .navds-button--tertiary:active:hover {
204
- background-color: var(--ax-bg-accent-strong-pressed);
205
- }
202
+ &:active {
203
+ background-color: var(--ax-bg-accent-strong-pressed);
204
+ color: var(--ax-text-accent-contrast);
205
+ }
206
206
 
207
- .navds-button--tertiary:where(:disabled, .navds-button--disabled),
208
- .navds-button--tertiary:hover:where(:disabled, .navds-button--disabled),
209
- .navds-button--tertiary:active:where(:disabled, .navds-button--disabled),
210
- .navds-button--tertiary:active:hover:where(:disabled, .navds-button--disabled) {
211
- color: var(--ax-text-accent);
212
- background: none;
213
- box-shadow: none;
207
+ &:is(:disabled, .navds-button--disabled) {
208
+ color: var(--ax-text-accent);
209
+ background-color: transparent;
210
+ }
214
211
  }
215
212
 
216
213
  /****************************
217
214
  * .navds-button--tertiary-neutral *
218
215
  ****************************/
219
-
220
216
  .navds-button--tertiary-neutral {
217
+ background-color: transparent;
221
218
  color: var(--ax-text-neutral);
222
- }
223
219
 
224
- .navds-button--tertiary-neutral:hover {
225
- background-color: var(--ax-bg-neutral-hoverA);
226
- color: var(--ax-text-neutral-strong);
227
- }
228
-
229
- .navds-button--tertiary-neutral:active {
230
- background-color: var(--ax-bg-neutral-strong-pressed);
231
- color: var(--ax-text-neutral-contrast);
232
- }
220
+ &:hover {
221
+ background-color: var(--ax-bg-neutral-moderate-hoverA);
222
+ color: var(--ax-text-neutral-strong);
223
+ }
233
224
 
234
- .navds-button--tertiary-neutral:active:hover {
235
- background-color: var(--ax-bg-neutral-strong-pressed);
236
- }
225
+ &:active {
226
+ background-color: var(--ax-bg-neutral-strong-pressed);
227
+ color: var(--ax-text-neutral-contrast);
228
+ }
237
229
 
238
- .navds-button--tertiary-neutral:where(:disabled, .navds-button--disabled),
239
- .navds-button--tertiary-neutral:hover:where(:disabled, .navds-button--disabled),
240
- .navds-button--tertiary-neutral:active:where(:disabled, .navds-button--disabled),
241
- .navds-button--tertiary-neutral:active:hover:where(:disabled, .navds-button--disabled) {
242
- color: var(--ax-text-default);
243
- background: none;
244
- box-shadow: none;
230
+ &:is(:disabled, .navds-button--disabled) {
231
+ color: var(--ax-text-default);
232
+ background-color: transparent;
233
+ }
245
234
  }
246
235
 
247
236
  /*************************
248
237
  * .navds-button--danger *
249
238
  *************************/
250
-
251
239
  .navds-button--danger {
252
240
  background-color: var(--ax-bg-danger-strong);
253
241
  color: var(--ax-text-danger-contrast);
254
- }
255
242
 
256
- .navds-button--danger:hover {
257
- background-color: var(--ax-bg-danger-strong-hover);
258
- }
243
+ &:hover {
244
+ background-color: var(--ax-bg-danger-strong-hover);
245
+ }
259
246
 
260
- .navds-button--danger:active {
261
- background-color: var(--ax-bg-danger-strong-pressed);
262
- }
247
+ &:active {
248
+ background-color: var(--ax-bg-danger-strong-pressed);
249
+ }
263
250
 
264
- .navds-button--danger:active:where(:disabled, .navds-button--disabled),
265
- .navds-button--danger:hover:where(:disabled, .navds-button--disabled) {
266
- background-color: var(--ax-bg-danger-strong);
251
+ &:is(:disabled, .navds-button--disabled) {
252
+ background-color: var(--ax-bg-danger-strong);
253
+ }
267
254
  }
268
255
 
269
256
  /**************************
@@ -33,6 +33,12 @@
33
33
  }
34
34
  }
35
35
 
36
+ .navds-chips--readonly {
37
+ .navds-chips__chip {
38
+ background-color: var(--ax-bg-neutral-moderateA);
39
+ }
40
+ }
41
+
36
42
  .navds-chips--small {
37
43
  .navds-chips__chip {
38
44
  min-height: 1.5rem;
@@ -1,7 +1,7 @@
1
1
  .navds-expansioncard {
2
2
  --__axc-expansioncard-border-radius: calc(var(--ax-border-radius-xlarge) - 1px);
3
3
  --__axc-expansioncard-padding-block: var(--ax-spacing-4);
4
- --__axc-expansioncard-padding-inline: var(--ax-spacing-6);
4
+ --__axc-expansioncard-padding-inline: var(--ax-spacing-5);
5
5
 
6
6
  border-radius: var(--ax-border-radius-xlarge);
7
7
  background-color: var(--ax-bg-raised);
@@ -16,7 +16,6 @@
16
16
 
17
17
  /* ------------------------ ExpansionCard Small-size ------------------------ */
18
18
  .navds-expansioncard--small {
19
- --__axc-expansioncard-padding-block: var(--ax-spacing-3);
20
19
  --__axc-expansioncard-padding-inline: var(--ax-spacing-4);
21
20
 
22
21
  & > .navds-expansioncard__header .navds-expansioncard__title--small {
@@ -31,10 +30,6 @@
31
30
  min-height: 2rem;
32
31
  min-width: 2rem;
33
32
  }
34
-
35
- & .navds-expansioncard__content {
36
- --__axc-expansioncard-padding-block: var(--ax-spacing-4);
37
- }
38
33
  }
39
34
 
40
35
  /* -------------------------- ExpansionCard Header -------------------------- */
@@ -144,8 +139,6 @@
144
139
 
145
140
  /* -------------------------- ExpansionCard Content ------------------------- */
146
141
  .navds-expansioncard__content {
147
- --__axc-expansioncard-padding-block: var(--ax-spacing-5);
148
-
149
142
  border-end-end-radius: var(--__axc-expansioncard-border-radius);
150
143
  border-end-start-radius: var(--__axc-expansioncard-border-radius);
151
144
  padding-inline: var(--__axc-expansioncard-padding-inline);
@@ -161,7 +154,7 @@
161
154
  &[data-open="true"] {
162
155
  grid-template-rows: 1fr;
163
156
  visibility: visible;
164
- padding-block: var(--__axc-expansioncard-padding-block) var(--__axc-expansioncard-padding-inline);
157
+ padding-block: var(--__axc-expansioncard-padding-block);
165
158
 
166
159
  & .navds-expansioncard__content-inner {
167
160
  opacity: 1;