@navikt/ds-css 5.15.1 → 5.16.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.
- package/CHANGELOG.md +6 -0
- package/dist/component/form.css +49 -19
- package/dist/component/form.min.css +1 -1
- package/dist/component/index.css +50 -20
- package/dist/component/index.min.css +1 -1
- package/dist/components.css +55 -19
- package/dist/components.min.css +1 -1
- package/dist/global/tokens.css +1 -1
- package/dist/index.css +50 -20
- package/dist/index.min.css +1 -1
- package/form/combobox.css +55 -19
- package/package.json +2 -2
- package/tokens.json +2 -0
package/form/combobox.css
CHANGED
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.navds-combobox__input {
|
|
77
|
-
z-index: 1;
|
|
78
77
|
flex: 1;
|
|
79
78
|
border: none;
|
|
80
79
|
padding: 0;
|
|
@@ -208,7 +207,7 @@
|
|
|
208
207
|
height: 1.25rem;
|
|
209
208
|
}
|
|
210
209
|
|
|
211
|
-
/* dropdown
|
|
210
|
+
/* dropdown & non selectable dropdown items */
|
|
212
211
|
|
|
213
212
|
.navds-combobox__list {
|
|
214
213
|
max-height: 290px;
|
|
@@ -216,20 +215,16 @@
|
|
|
216
215
|
position: absolute;
|
|
217
216
|
left: 0;
|
|
218
217
|
right: 0;
|
|
219
|
-
z-index:
|
|
218
|
+
z-index: var(--a-z-index-popover);
|
|
220
219
|
top: calc(100% + var(--a-spacing-2));
|
|
221
|
-
list-style: none;
|
|
222
|
-
margin: 0;
|
|
223
220
|
border: 1px solid var(--ac-combobox-list-border-color, var(--a-border-divider));
|
|
224
221
|
display: flex;
|
|
225
222
|
flex-direction: column;
|
|
226
|
-
align-items: flex-start;
|
|
227
|
-
padding: 0;
|
|
228
223
|
box-shadow: var(--a-shadow-small);
|
|
229
224
|
border-radius: var(--a-border-radius-medium);
|
|
230
|
-
gap: var(--a-spacing-1) 0;
|
|
231
225
|
background-color: var(--ac-combobox-list-bg, var(--a-surface-default));
|
|
232
226
|
color: var(--ac-combobox-list-text, var(--a-text-default));
|
|
227
|
+
gap: var(--a-spacing-1) 0;
|
|
233
228
|
}
|
|
234
229
|
|
|
235
230
|
.navds-combobox__list--closed {
|
|
@@ -241,34 +236,70 @@
|
|
|
241
236
|
width: 1.5rem;
|
|
242
237
|
}
|
|
243
238
|
|
|
239
|
+
.navds-combobox__list_non-selectables {
|
|
240
|
+
position: sticky;
|
|
241
|
+
top: 0;
|
|
242
|
+
left: 0;
|
|
243
|
+
right: 0;
|
|
244
|
+
z-index: 1;
|
|
245
|
+
}
|
|
246
|
+
|
|
244
247
|
.navds-combobox__list-item,
|
|
245
|
-
.navds-combobox__list-
|
|
246
|
-
.navds-combobox__list-
|
|
248
|
+
.navds-combobox__list-item--loading,
|
|
249
|
+
.navds-combobox__list-item--no-options,
|
|
250
|
+
.navds-combobox__list-item--new-option,
|
|
251
|
+
.navds-combobox__list-item--max-selected {
|
|
247
252
|
display: flex;
|
|
248
253
|
flex-direction: row;
|
|
249
254
|
justify-content: space-between;
|
|
250
|
-
align-items: center;
|
|
251
255
|
padding: var(--a-spacing-3);
|
|
252
256
|
width: 100%;
|
|
253
257
|
background-color: var(--ac-combobox-list-item-bg, var(--a-surface-default));
|
|
258
|
+
scroll-margin-top: 50px;
|
|
254
259
|
}
|
|
255
260
|
|
|
256
261
|
.navds-form-field--small .navds-combobox__list-item,
|
|
257
|
-
.navds-form-field--small .navds-combobox__list-
|
|
258
|
-
.navds-form-field--small .navds-combobox__list-
|
|
262
|
+
.navds-form-field--small .navds-combobox__list-item--loading,
|
|
263
|
+
.navds-form-field--small .navds-combobox__list-item--no-options,
|
|
264
|
+
.navds-form-field--small .navds-combobox__list-item--new-option,
|
|
265
|
+
.navds-form-field--small .navds-combobox__list-item--max-selected {
|
|
259
266
|
padding: calc(var(--a-spacing-3) / 2) var(--a-spacing-2);
|
|
260
267
|
}
|
|
261
268
|
|
|
262
269
|
.navds-combobox__list-item--loading {
|
|
263
|
-
display: flex;
|
|
264
270
|
justify-content: center;
|
|
265
|
-
padding: var(--a-spacing-3);
|
|
266
271
|
background-color: var(--ac-combobox-list-item-loading-bg, var(--a-surface-default));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.navds-combobox__list-item--max-selected {
|
|
275
|
+
background: var(--ac-combobox-list-item-max-selected-bg, var(--a-surface-info-subtle));
|
|
276
|
+
border-start-start-radius: calc(var(--a-border-radius-medium) - 1px);
|
|
277
|
+
border-start-end-radius: calc(var(--a-border-radius-medium) - 1px);
|
|
278
|
+
border: 1px solid var(--ac-combobox-list-item-max-selected-border, var(--a-border-info));
|
|
279
|
+
margin-bottom: calc(var(--a-spacing-1) * -1);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.navds-combobox__list_non-selectables:hover {
|
|
283
|
+
cursor: default;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/* ul-list and selectable li-items */
|
|
287
|
+
|
|
288
|
+
.navds-combobox__list-options {
|
|
289
|
+
list-style: none;
|
|
290
|
+
margin: 0;
|
|
291
|
+
padding: 0;
|
|
267
292
|
width: 100%;
|
|
293
|
+
display: inherit;
|
|
294
|
+
flex-direction: inherit;
|
|
295
|
+
gap: inherit;
|
|
296
|
+
background-color: inherit;
|
|
297
|
+
align-items: flex-start;
|
|
268
298
|
}
|
|
269
299
|
|
|
270
300
|
.navds-combobox__list-item--focus,
|
|
271
|
-
.navds-combobox__list--with-hover
|
|
301
|
+
.navds-combobox__list--with-hover
|
|
302
|
+
.navds-combobox__list-item:not([data-no-focus="true"], .navds-combobox__list-item--new-option):hover {
|
|
272
303
|
background-color: var(--ac-combobox-list-item-hover-bg, var(--a-surface-hover));
|
|
273
304
|
cursor: pointer;
|
|
274
305
|
border-left: 4px solid var(--ac-combobox-list-item-hover-border-left, var(--a-border-strong));
|
|
@@ -280,6 +311,11 @@
|
|
|
280
311
|
padding-left: calc(var(--a-spacing-2) - 4px);
|
|
281
312
|
}
|
|
282
313
|
|
|
314
|
+
.navds-combobox__list-item[data-no-focus="true"] {
|
|
315
|
+
cursor: not-allowed;
|
|
316
|
+
opacity: 0.4;
|
|
317
|
+
}
|
|
318
|
+
|
|
283
319
|
.navds-combobox__list-item--selected {
|
|
284
320
|
background-color: var(--ac-combobox-list-item-selected-bg, var(--a-surface-selected));
|
|
285
321
|
}
|
|
@@ -295,7 +331,7 @@
|
|
|
295
331
|
padding-left: calc(var(--a-spacing-3) - 4px);
|
|
296
332
|
}
|
|
297
333
|
|
|
298
|
-
.navds-combobox__list-
|
|
334
|
+
.navds-combobox__list-item--new-option {
|
|
299
335
|
border-bottom: 1px solid var(--a-border-divider);
|
|
300
336
|
background: var(--a-surface-neutral-subtle);
|
|
301
337
|
cursor: pointer;
|
|
@@ -303,12 +339,12 @@
|
|
|
303
339
|
gap: 0.25rem;
|
|
304
340
|
}
|
|
305
341
|
|
|
306
|
-
.navds-combobox__list--with-hover .navds-combobox__list-
|
|
342
|
+
.navds-combobox__list--with-hover .navds-combobox__list-item--new-option:hover {
|
|
307
343
|
border-bottom: 1px solid var(--a-border-divider);
|
|
308
344
|
background: var(--a-surface-neutral-subtle-hover);
|
|
309
345
|
}
|
|
310
346
|
|
|
311
|
-
.navds-combobox__list-
|
|
347
|
+
.navds-combobox__list-item--new-option--focus {
|
|
312
348
|
box-shadow:
|
|
313
349
|
var(--a-shadow-focus) inset,
|
|
314
350
|
var(--a-border-action) 0 0 0 5px inset;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-css",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.0",
|
|
4
4
|
"description": "CSS for NAV Designsystem",
|
|
5
5
|
"author": "Aksel | NAV designsystem team",
|
|
6
6
|
"keywords": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"css:get-version": "node config/get-version.js"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@navikt/ds-tokens": "^5.
|
|
30
|
+
"@navikt/ds-tokens": "^5.16.0",
|
|
31
31
|
"cssnano": "6.0.0",
|
|
32
32
|
"fast-glob": "3.2.11",
|
|
33
33
|
"lodash": "4.17.21",
|
package/tokens.json
CHANGED
|
@@ -392,6 +392,8 @@
|
|
|
392
392
|
"--ac-combobox-list-item-loading-bg": "--a-surface-default",
|
|
393
393
|
"--ac-combobox-list-item-hover-border-left": "--a-border-strong",
|
|
394
394
|
"--ac-combobox-list-item-selected-hover-border-left": "--a-border-focus",
|
|
395
|
+
"--ac-combobox-list-item-max-selected-bg": "--a-surface-info-subtle",
|
|
396
|
+
"--ac-combobox-list-item-max-selected-border": "--a-border-info",
|
|
395
397
|
"--ac-combobox-error-border": "--a-border-danger"
|
|
396
398
|
},
|
|
397
399
|
"select": {
|