@helsenorge/designsystem-react 10.2.0 → 10.3.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 (78) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/components/AnchorLink/styles.module.scss +8 -9
  3. package/components/Avatar/styles.module.scss +9 -9
  4. package/components/Badge/styles.module.scss +9 -9
  5. package/components/Button/styles.module.scss +65 -59
  6. package/components/Checkbox/styles.module.scss +103 -103
  7. package/components/Chip/styles.module.scss +22 -22
  8. package/components/Close/styles.module.scss +4 -4
  9. package/components/DictionaryTrigger/styles.module.scss +5 -5
  10. package/components/Drawer/styles.module.scss +16 -16
  11. package/components/Dropdown/styles.module.scss +51 -51
  12. package/components/Duolist/index.js +2 -1
  13. package/components/Duolist/index.js.map +1 -1
  14. package/components/Duolist/styles.module.scss +57 -35
  15. package/components/Duolist/styles.module.scss.d.ts +1 -0
  16. package/components/EmptyState/styles.module.scss +12 -12
  17. package/components/ErrorWrapper/styles.module.scss +11 -21
  18. package/components/ErrorWrapper/styles.module.scss.d.ts +0 -1
  19. package/components/Expander/styles.module.scss +46 -46
  20. package/components/ExpanderHierarchy/expander.module.scss +29 -29
  21. package/components/ExpanderHierarchy/styles.module.scss +4 -5
  22. package/components/ExpanderList/styles.module.scss +30 -30
  23. package/components/EyebrowHeader/styles.module.scss +0 -2
  24. package/components/FormGroup/styles.module.scss +9 -9
  25. package/components/FormLayout/styles.module.scss +4 -5
  26. package/components/HelpBubble/styles.module.scss +13 -13
  27. package/components/HelpPanel/styles.module.scss +2 -2
  28. package/components/HelpQuestion/styles.module.scss +19 -19
  29. package/components/HighlightPanel/styles.module.scss +20 -20
  30. package/components/HorizontalScroll/styles.module.scss +4 -3
  31. package/components/Input/styles.module.scss +12 -12
  32. package/components/Label/styles.module.scss +15 -15
  33. package/components/LinkList/styles.module.scss +33 -33
  34. package/components/ListHeader/styles.module.scss +8 -8
  35. package/components/Loader/styles.module.scss +14 -14
  36. package/components/MaxCharacters/styles.module.scss +11 -11
  37. package/components/Modal/styles.module.scss +34 -34
  38. package/components/NotificationPanel/styles.module.scss +33 -33
  39. package/components/Panel/styles.module.scss +45 -45
  40. package/components/PanelList/styles.module.scss +5 -5
  41. package/components/PopMenu/styles.module.scss +15 -15
  42. package/components/PopOver/styles.module.scss +13 -14
  43. package/components/PopOver/styles.module.scss.d.ts +0 -3
  44. package/components/Progressbar/styles.module.scss +4 -4
  45. package/components/PromoPanel/styles.module.scss +22 -22
  46. package/components/RadioButton/styles.module.scss +99 -99
  47. package/components/Select/styles.module.scss +21 -21
  48. package/components/ServiceMessage/styles.module.scss +49 -49
  49. package/components/SharingStatus/styles.module.scss +13 -13
  50. package/components/Slider/styles.module.scss +24 -24
  51. package/components/Spacer/styles.module.scss +14 -14
  52. package/components/StatusDot/styles.module.scss +22 -22
  53. package/components/Step/styles.module.scss +3 -3
  54. package/components/StepButtons/styles.module.scss +9 -9
  55. package/components/Stepper/styles.module.scss +23 -15
  56. package/components/StickyNote/styles.module.scss +3 -3
  57. package/components/Table/styles.module.scss +32 -32
  58. package/components/Tabs/TabList/styles.module.scss +1 -1
  59. package/components/Tabs/TabPanel/styles.module.scss +5 -5
  60. package/components/Tabs/styles.module.scss +1 -1
  61. package/components/Tag/styles.module.scss +16 -16
  62. package/components/TagList/styles.module.scss +4 -4
  63. package/components/Textarea/styles.module.scss +9 -9
  64. package/components/Tile/styles.module.scss +25 -25
  65. package/components/Title/styles.module.scss +8 -8
  66. package/components/Toggle/styles.module.scss +14 -14
  67. package/components/Tooltip/TooltipWord/styles.module.scss +4 -4
  68. package/components/Trigger/styles.module.scss +21 -21
  69. package/components/Validation/styles.module.scss +10 -10
  70. package/package.json +1 -1
  71. package/scss/_body.scss +5 -6
  72. package/scss/_breakpoints.scss +2 -2
  73. package/scss/_font-mixins.scss +2 -2
  74. package/scss/_fonts.scss +0 -2
  75. package/scss/_input.scss +53 -50
  76. package/scss/_print.scss +2 -2
  77. package/scss/layout.module.scss +2 -2
  78. package/scss/typography.module.scss +44 -43
@@ -1,24 +1,24 @@
1
1
  @use 'sass:map';
2
2
  @use 'sass:meta';
3
3
  @use 'sass:string';
4
- @import '../../scss/spacers';
5
- @import '../../scss/breakpoints';
6
- @import '../../scss/palette';
7
- @import '../../scss/font-settings';
4
+ @use '../../scss/spacers' as spacers;
5
+ @use '../../scss/palette' as palette;
6
+ @use '../../scss/font-settings' as font-settings;
7
+ @use '../../scss/breakpoints' as *;
8
8
 
9
9
  @mixin dashed-border() {
10
10
  box-shadow: none;
11
11
 
12
- $encoded-color: string.slice(meta.inspect($neutral600), 2);
12
+ $encoded-color: string.slice(meta.inspect(palette.$neutral600), 2);
13
13
 
14
14
  background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='100' ry='100' stroke='%23" + $encoded-color + "' stroke-width='4' stroke-dasharray='0.5, 7' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
15
15
  border-radius: 100px;
16
16
  }
17
17
 
18
18
  .radio-button-errors {
19
- font-size: $font-size-sm;
19
+ font-size: font-settings.$font-size-sm;
20
20
  font-weight: 600;
21
- color: $cherry600;
21
+ color: palette.$cherry600;
22
22
  margin-top: 0;
23
23
  }
24
24
 
@@ -26,21 +26,21 @@
26
26
  cursor: pointer;
27
27
 
28
28
  &__large {
29
- margin: getSpacer(2xs) 0;
29
+ margin: spacers.getSpacer(2xs) 0;
30
30
 
31
31
  &--focused {
32
- box-shadow: 0 0 0 getSpacer(3xs);
33
- color: $neutral500;
32
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
33
+ color: palette.$neutral500;
34
34
  }
35
35
  &--focused#{&}--on-blueberry {
36
- color: $blueberry500;
36
+ color: palette.$blueberry500;
37
37
  }
38
38
 
39
39
  &--focused#{&}--selected {
40
- color: $blueberry900;
40
+ color: palette.$blueberry900;
41
41
  }
42
42
  &--focused#{&}--invalid {
43
- color: $cherry400;
43
+ color: palette.$cherry400;
44
44
  }
45
45
  }
46
46
  }
@@ -49,123 +49,123 @@
49
49
  display: flex;
50
50
  align-items: flex-start;
51
51
  cursor: pointer;
52
- line-height: $lineheight-size-sm;
53
- color: $black;
52
+ line-height: font-settings.$lineheight-size-sm;
53
+ color: palette.$black;
54
54
 
55
55
  &--on-dark {
56
- color: $white;
56
+ color: palette.$white;
57
57
  }
58
58
 
59
59
  &--invalid {
60
- color: $black;
60
+ color: palette.$black;
61
61
  }
62
62
 
63
63
  &--disabled {
64
64
  cursor: default;
65
- color: $neutral700;
65
+ color: palette.$neutral700;
66
66
  }
67
67
 
68
68
  &__large {
69
- padding: getSpacer(s);
70
- background-color: $neutral50;
69
+ padding: spacers.getSpacer(s);
70
+ background-color: palette.$neutral50;
71
71
 
72
72
  &:hover {
73
- background-color: $neutral100;
73
+ background-color: palette.$neutral100;
74
74
  }
75
75
 
76
76
  &--on-blueberry {
77
- background-color: $white;
77
+ background-color: palette.$white;
78
78
 
79
79
  &:focus {
80
- background-color: $white;
80
+ background-color: palette.$white;
81
81
  }
82
82
 
83
83
  &:hover {
84
- background-color: $blueberry100;
84
+ background-color: palette.$blueberry100;
85
85
  }
86
86
  }
87
87
 
88
88
  &--on-grey {
89
- background-color: $white;
89
+ background-color: palette.$white;
90
90
 
91
91
  &:hover {
92
- background-color: $neutral100;
92
+ background-color: palette.$neutral100;
93
93
  }
94
94
 
95
95
  &:focus {
96
- background-color: $white;
96
+ background-color: palette.$white;
97
97
  }
98
98
  }
99
99
  }
100
100
 
101
101
  &__large#{&}--on-dark {
102
- background-color: $blueberry800;
102
+ background-color: palette.$blueberry800;
103
103
  }
104
104
  &__large#{&}--invalid {
105
- background-color: $white;
105
+ background-color: palette.$white;
106
106
 
107
107
  &:hover {
108
- background-color: $cherry100;
108
+ background-color: palette.$cherry100;
109
109
  }
110
110
  }
111
111
  &__large#{&}__large--selected-invalid {
112
- background-color: $cherry100;
113
- color: $black;
112
+ background-color: palette.$cherry100;
113
+ color: palette.$black;
114
114
 
115
115
  &:hover {
116
- background-color: $cherry200;
116
+ background-color: palette.$cherry200;
117
117
  }
118
118
  }
119
119
 
120
120
  &__large#{&}__large--on-grey {
121
- background-color: $white;
121
+ background-color: palette.$white;
122
122
 
123
123
  &:hover {
124
- background-color: $neutral100;
124
+ background-color: palette.$neutral100;
125
125
  }
126
126
 
127
127
  &:focus {
128
- background-color: $white;
128
+ background-color: palette.$white;
129
129
  }
130
130
  }
131
131
 
132
132
  &__large#{&}__large--on-blueberry {
133
- background-color: $white;
133
+ background-color: palette.$white;
134
134
 
135
135
  &:hover {
136
- background-color: $blueberry100;
136
+ background-color: palette.$blueberry100;
137
137
  }
138
138
 
139
139
  &:focus {
140
- background-color: $white;
140
+ background-color: palette.$white;
141
141
  }
142
142
  }
143
143
 
144
144
  &__large--selected {
145
- background-color: $blueberry500;
146
- color: $white;
145
+ background-color: palette.$blueberry500;
146
+ color: palette.$white;
147
147
 
148
148
  &:hover {
149
- background-color: $blueberry600;
149
+ background-color: palette.$blueberry600;
150
150
  }
151
151
  }
152
152
 
153
153
  &__large#{&}__large--disabled {
154
- color: $neutral700;
155
- background-color: $neutral50;
154
+ color: palette.$neutral700;
155
+ background-color: palette.$neutral50;
156
156
 
157
157
  &:hover {
158
- background-color: $neutral50;
158
+ background-color: palette.$neutral50;
159
159
  }
160
160
 
161
161
  &:focus {
162
- background-color: $neutral50;
162
+ background-color: palette.$neutral50;
163
163
  }
164
164
  }
165
165
 
166
166
  @media (min-width: map.get($grid-breakpoints, md)) {
167
167
  &__large {
168
- padding: 1.68rem getSpacer(l);
168
+ padding: 1.68rem spacers.getSpacer(l);
169
169
  }
170
170
  }
171
171
  }
@@ -177,102 +177,102 @@
177
177
  justify-content: center;
178
178
  align-items: center;
179
179
  border-radius: 10rem;
180
- margin: 0 getSpacer(s) 0 0;
180
+ margin: 0 spacers.getSpacer(s) 0 0;
181
181
  height: 1.5rem;
182
182
  width: 1.5rem;
183
183
  min-height: 1.5rem;
184
184
  min-width: 1.5rem;
185
- color: $neutral700;
186
- box-shadow: 0 0 0 getSpacer(4xs);
185
+ color: palette.$neutral700;
186
+ box-shadow: 0 0 0 spacers.getSpacer(4xs);
187
187
  outline: none;
188
188
 
189
189
  &:focus {
190
- box-shadow: 0 0 0 getSpacer(3xs);
191
- color: $black;
190
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
191
+ color: palette.$black;
192
192
  }
193
193
 
194
194
  &:hover {
195
- box-shadow: 0 0 0 getSpacer(3xs);
196
- background-color: $neutral100;
195
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
196
+ background-color: palette.$neutral100;
197
197
  }
198
198
 
199
199
  :active > & {
200
- box-shadow: 0 0 0 getSpacer(3xs);
201
- color: $black;
200
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
201
+ color: palette.$black;
202
202
  }
203
203
 
204
204
  &:checked {
205
- color: $blueberry500;
205
+ color: palette.$blueberry500;
206
206
 
207
207
  &:hover {
208
- box-shadow: 0 0 0 getSpacer(4xs);
209
- background-color: $blueberry50;
208
+ box-shadow: 0 0 0 spacers.getSpacer(4xs);
209
+ background-color: palette.$blueberry50;
210
210
  }
211
211
 
212
212
  &:focus {
213
- box-shadow: 0 0 0 getSpacer(3xs);
214
- color: $black;
213
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
214
+ color: palette.$black;
215
215
  }
216
216
  }
217
217
 
218
218
  &--on-blueberry {
219
- color: $blueberry500;
219
+ color: palette.$blueberry500;
220
220
 
221
221
  :hover > & {
222
- background-color: $blueberry100;
222
+ background-color: palette.$blueberry100;
223
223
  }
224
224
  }
225
225
 
226
226
  &--on-dark {
227
- color: $neutral200;
227
+ color: palette.$neutral200;
228
228
 
229
229
  &:hover {
230
- background-color: $inverted-hover-old;
231
- box-shadow: 0 0 0 getSpacer(3xs);
230
+ background-color: palette.$inverted-hover-old;
231
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
232
232
  }
233
233
 
234
234
  &:focus {
235
- color: $white;
235
+ color: palette.$white;
236
236
  }
237
237
 
238
238
  :active > & {
239
- box-shadow: 0 0 0 getSpacer(3xs);
240
- color: $white;
239
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
240
+ color: palette.$white;
241
241
  }
242
242
 
243
243
  &:checked {
244
- color: $blueberry200;
244
+ color: palette.$blueberry200;
245
245
 
246
246
  &:hover {
247
- background-color: $inverted-hover-old;
247
+ background-color: palette.$inverted-hover-old;
248
248
  }
249
249
 
250
250
  &:focus {
251
- color: $white;
251
+ color: palette.$white;
252
252
  }
253
253
  }
254
254
  }
255
255
 
256
256
  &--invalid {
257
- color: $cherry600;
257
+ color: palette.$cherry600;
258
258
 
259
259
  &:hover {
260
- background-color: $cherry100;
260
+ background-color: palette.$cherry100;
261
261
  }
262
262
 
263
263
  &:active {
264
- color: $black;
264
+ color: palette.$black;
265
265
  }
266
266
 
267
267
  &:focus {
268
- color: $black;
268
+ color: palette.$black;
269
269
  }
270
270
 
271
271
  &:checked {
272
- color: $cherry600;
272
+ color: palette.$cherry600;
273
273
 
274
274
  &:hover {
275
- background-color: $cherry100;
275
+ background-color: palette.$cherry100;
276
276
  }
277
277
  }
278
278
  }
@@ -294,15 +294,15 @@
294
294
  }
295
295
 
296
296
  &:active {
297
- color: $neutral600;
297
+ color: palette.$neutral600;
298
298
  }
299
299
 
300
300
  &:checked {
301
- color: $neutral600;
301
+ color: palette.$neutral600;
302
302
 
303
303
  &:hover {
304
- box-shadow: 0 0 0 getSpacer(4xs);
305
- background-color: $neutral50;
304
+ box-shadow: 0 0 0 spacers.getSpacer(4xs);
305
+ background-color: palette.$neutral50;
306
306
  }
307
307
  }
308
308
  }
@@ -311,7 +311,7 @@
311
311
  &:checked::before {
312
312
  content: '';
313
313
  display: flex;
314
- background-color: $blueberry500;
314
+ background-color: palette.$blueberry500;
315
315
  width: 0.875rem;
316
316
  height: 0.875rem;
317
317
  border-radius: 10rem;
@@ -324,11 +324,11 @@
324
324
  }
325
325
 
326
326
  &--on-dark:checked::before {
327
- background-color: $blueberry200;
327
+ background-color: palette.$blueberry200;
328
328
  }
329
329
 
330
330
  &--invalid:checked::before {
331
- background-color: $cherry600;
331
+ background-color: palette.$cherry600;
332
332
  }
333
333
 
334
334
  &--disabled:checked::before {
@@ -338,43 +338,43 @@
338
338
  &__large {
339
339
  &:checked {
340
340
  outline: none;
341
- color: $blueberry100;
341
+ color: palette.$blueberry100;
342
342
  }
343
343
 
344
344
  &:hover {
345
- box-shadow: 0 0 0 getSpacer(3xs);
345
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
346
346
  }
347
347
 
348
348
  &:focus {
349
- box-shadow: 0 0 0 getSpacer(3xs);
350
- color: $black;
349
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
350
+ color: palette.$black;
351
351
  }
352
352
 
353
353
  &:focus:checked {
354
- color: $white;
354
+ color: palette.$white;
355
355
  }
356
356
 
357
357
  &:checked::before {
358
- background-color: $blueberry100;
358
+ background-color: palette.$blueberry100;
359
359
  }
360
360
 
361
361
  &:checked:hover {
362
- box-shadow: 0 0 0 getSpacer(4xs);
362
+ box-shadow: 0 0 0 spacers.getSpacer(4xs);
363
363
  background-color: unset;
364
364
  }
365
365
 
366
366
  &:checked:hover:focus {
367
- box-shadow: 0 0 0 getSpacer(3xs);
368
- color: $white;
367
+ box-shadow: 0 0 0 spacers.getSpacer(3xs);
368
+ color: palette.$white;
369
369
  }
370
370
 
371
371
  &--invalid {
372
372
  &:checked {
373
- color: $cherry500;
373
+ color: palette.$cherry500;
374
374
  }
375
375
 
376
376
  &:checked::before {
377
- background-color: $cherry500;
377
+ background-color: palette.$cherry500;
378
378
  }
379
379
 
380
380
  &:checked:hover {
@@ -382,11 +382,11 @@
382
382
  }
383
383
 
384
384
  &:checked:focus {
385
- color: $black;
385
+ color: palette.$black;
386
386
  }
387
387
 
388
388
  &:checked:focus:hover {
389
- color: $black;
389
+ color: palette.$black;
390
390
  }
391
391
  }
392
392
 
@@ -398,7 +398,7 @@
398
398
  }
399
399
 
400
400
  &:checked::before {
401
- background-color: $neutral600;
401
+ background-color: palette.$neutral600;
402
402
  }
403
403
  }
404
404
  }
@@ -1,8 +1,8 @@
1
1
  @use 'sass:map';
2
- @import '../../scss/spacers';
3
- @import '../../scss/breakpoints';
4
- @import '../../scss/palette';
5
- @import '../../scss/font-settings';
2
+ @use '../../scss/spacers' as spacers;
3
+ @use '../../scss/palette' as palette;
4
+ @use '../../scss/font-settings' as font-settings;
5
+ @use '../../scss/breakpoints' as *;
6
6
 
7
7
  .select-wrapper {
8
8
  display: flex;
@@ -12,7 +12,7 @@
12
12
  .select-inner-wrapper {
13
13
  // Grid brukes til å kunne plassere custom ikon fritt over select elementet
14
14
  display: inline-grid;
15
- background-color: $white;
15
+ background-color: palette.$white;
16
16
  align-items: center;
17
17
 
18
18
  // Andre kolonne her styrer plassering av select ikonet
@@ -23,23 +23,23 @@
23
23
  }
24
24
 
25
25
  &:hover {
26
- background: $neutral50;
26
+ background: palette.$neutral50;
27
27
  }
28
28
 
29
29
  &--on-blueberry {
30
30
  &:hover {
31
- background-color: $blueberry50;
31
+ background-color: palette.$blueberry50;
32
32
  }
33
33
  }
34
34
 
35
35
  &--invalid {
36
36
  &:hover {
37
- background-color: $cherry50;
37
+ background-color: palette.$cherry50;
38
38
  }
39
39
  }
40
40
 
41
41
  &--disabled {
42
- color: $neutral700;
42
+ color: palette.$neutral700;
43
43
  background: transparent;
44
44
 
45
45
  &:hover {
@@ -56,26 +56,26 @@
56
56
  background-color: transparent;
57
57
  grid-column: 1 / 3;
58
58
  grid-row: 1;
59
- padding-left: getSpacer(xs);
59
+ padding-left: spacers.getSpacer(xs);
60
60
  border: none;
61
- outline: $neutral700 solid 2px;
61
+ outline: palette.$neutral700 solid 2px;
62
62
  outline-offset: -2px;
63
63
  font-family: inherit;
64
- font-size: $font-size-sm;
65
- line-height: $lineheight-size-sm;
64
+ font-size: font-settings.$font-size-sm;
65
+ line-height: font-settings.$lineheight-size-sm;
66
66
  border-radius: 0;
67
67
 
68
68
  @media (min-width: map.get($grid-breakpoints, md)) {
69
69
  height: 3.125rem;
70
- font-size: $font-size-md;
70
+ font-size: font-settings.$font-size-md;
71
71
  }
72
72
 
73
73
  &--on-blueberry {
74
- outline-color: $blueberry500;
74
+ outline-color: palette.$blueberry500;
75
75
  }
76
76
 
77
77
  &--invalid {
78
- outline-color: $cherry600;
78
+ outline-color: palette.$cherry600;
79
79
  }
80
80
 
81
81
  :hover > & {
@@ -84,22 +84,22 @@
84
84
  }
85
85
 
86
86
  &:focus {
87
- outline: $black solid 4px;
87
+ outline: palette.$black solid 4px;
88
88
  outline-offset: -2px;
89
89
  }
90
90
 
91
91
  &:disabled {
92
- outline: $neutral600 dashed 2px;
92
+ outline: palette.$neutral600 dashed 2px;
93
93
  outline-offset: -2px;
94
94
  }
95
95
 
96
96
  & > option {
97
- background: $white;
97
+ background: palette.$white;
98
98
  font-family: inherit;
99
- font-size: $font-size-sm;
99
+ font-size: font-settings.$font-size-sm;
100
100
 
101
101
  @media (min-width: map.get($grid-breakpoints, md)) {
102
- font-size: $font-size-md;
102
+ font-size: font-settings.$font-size-md;
103
103
  }
104
104
  }
105
105
  }