@navikt/ds-css 8.10.5 → 8.11.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/dist/component/alert.css +5 -1
- package/dist/component/alert.min.css +1 -1
- package/dist/component/datagridpreview.css +632 -0
- package/dist/component/datagridpreview.min.css +1 -0
- package/dist/components.css +632 -1
- package/dist/components.min.css +1 -1
- package/dist/global/tokens.css +1 -1
- package/dist/global/tokens.min.css +1 -1
- package/dist/index.css +633 -2
- package/dist/index.min.css +1 -1
- package/package.json +3 -3
- package/src/alert.css +7 -3
- package/src/{data-table.css → data-grid-preview.css} +43 -29
- package/src/index.css +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-css",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.0",
|
|
4
4
|
"description": "CSS for Nav Designsystem",
|
|
5
5
|
"author": "Aksel | Nav designsystem team",
|
|
6
6
|
"keywords": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"css:get-version": "node config/get-version.js"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@navikt/ds-tokens": "^8.
|
|
35
|
+
"@navikt/ds-tokens": "^8.11.0",
|
|
36
36
|
"browserslist": "^4.25.0",
|
|
37
|
-
"esbuild": "^0.
|
|
37
|
+
"esbuild": "^0.28.0",
|
|
38
38
|
"fast-glob": "3.3.3",
|
|
39
39
|
"lightningcss": "^1.30.1",
|
|
40
40
|
"normalize.css": "^8.0.1",
|
package/src/alert.css
CHANGED
|
@@ -215,13 +215,17 @@
|
|
|
215
215
|
display: flex;
|
|
216
216
|
align-items: flex-start;
|
|
217
217
|
gap: var(--ax-space-8);
|
|
218
|
-
padding: var(--ax-space-
|
|
218
|
+
padding: var(--ax-space-16) var(--ax-space-20);
|
|
219
219
|
|
|
220
220
|
& > .aksel-base-alert__icon {
|
|
221
221
|
margin-top: var(--ax-space-2);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
.aksel-base-alert[data-size="small"] &
|
|
225
|
-
|
|
224
|
+
.aksel-base-alert[data-size="small"] & {
|
|
225
|
+
padding: var(--ax-space-12) var(--ax-space-16);
|
|
226
|
+
|
|
227
|
+
& > .aksel-base-alert__icon {
|
|
228
|
+
margin-top: 0;
|
|
229
|
+
}
|
|
226
230
|
}
|
|
227
231
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/* stylelint-disable csstools/value-no-unknown-custom-properties */
|
|
2
2
|
/* stylelint-disable no-duplicate-selectors */
|
|
3
3
|
|
|
4
|
+
.aksel-data-grid {
|
|
5
|
+
flex-grow: 1;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
width: 100%;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
4
12
|
.aksel-data-table__border-wrapper {
|
|
5
13
|
/* display:flex and max-height:100% is needed for a "no page scroll" layout */
|
|
6
14
|
display: flex;
|
|
@@ -35,14 +43,20 @@
|
|
|
35
43
|
min-width: 100%;
|
|
36
44
|
}
|
|
37
45
|
|
|
38
|
-
--
|
|
46
|
+
/* Default font size is prop "medium", which is variable --ax-font-size-large */
|
|
47
|
+
--__axc-data-table-text-size: var(--ax-font-size-large);
|
|
48
|
+
--__axc-data-table-density: var(--ax-space-12);
|
|
49
|
+
|
|
50
|
+
&[data-text-size="small"] {
|
|
51
|
+
--__axc-data-table-text-size: var(--ax-font-size-medium);
|
|
52
|
+
}
|
|
39
53
|
|
|
40
|
-
&[data-density="
|
|
41
|
-
--__axc-data-table-density: var(--ax-space-
|
|
54
|
+
&[data-density="tight"] {
|
|
55
|
+
--__axc-data-table-density: var(--ax-space-6);
|
|
42
56
|
}
|
|
43
57
|
|
|
44
|
-
&[data-density="
|
|
45
|
-
--__axc-data-table-density: var(--ax-space-
|
|
58
|
+
&[data-density="loose"] {
|
|
59
|
+
--__axc-data-table-density: var(--ax-space-20);
|
|
46
60
|
}
|
|
47
61
|
|
|
48
62
|
&[data-zebra-stripes="true"] {
|
|
@@ -177,11 +191,16 @@
|
|
|
177
191
|
vertical-align: middle;
|
|
178
192
|
scroll-margin: var(--ax-space-0);
|
|
179
193
|
padding: 0;
|
|
194
|
+
font-size: var(--__axc-data-table-text-size);
|
|
195
|
+
|
|
196
|
+
&:not(.aksel-data-table__column-header) {
|
|
197
|
+
overflow: hidden; /* Needed for cases where left margin is added to cell-content (nested rows) */
|
|
198
|
+
}
|
|
180
199
|
|
|
181
200
|
&[data-nested="true"] {
|
|
182
201
|
position: relative;
|
|
183
202
|
|
|
184
|
-
& >
|
|
203
|
+
& > .aksel-data-table__cell-content {
|
|
185
204
|
margin-inline-start: calc(32px + 8px + calc(var(--__axc-data-table-nested-depth) * var(--ax-space-16)));
|
|
186
205
|
}
|
|
187
206
|
}
|
|
@@ -219,7 +238,7 @@
|
|
|
219
238
|
&[data-sticky="start"] {
|
|
220
239
|
left: 0;
|
|
221
240
|
|
|
222
|
-
|
|
241
|
+
&[data-sticky-last]::before {
|
|
223
242
|
content: "";
|
|
224
243
|
position: absolute;
|
|
225
244
|
inset: 0;
|
|
@@ -231,13 +250,13 @@
|
|
|
231
250
|
opacity: 0;
|
|
232
251
|
}
|
|
233
252
|
|
|
234
|
-
.aksel-data-table[data-scroll]
|
|
253
|
+
.aksel-data-table[data-scroll] &[data-sticky-last]::before {
|
|
235
254
|
opacity: 1;
|
|
236
255
|
animation: scroll-shadow-fade-start 1s linear;
|
|
237
256
|
animation-timeline: --horizontal-table-scroll;
|
|
238
257
|
}
|
|
239
258
|
|
|
240
|
-
|
|
259
|
+
&[data-sticky-last]::after {
|
|
241
260
|
inset-inline: 0 -1px;
|
|
242
261
|
border-right-width: 1px;
|
|
243
262
|
}
|
|
@@ -284,10 +303,10 @@
|
|
|
284
303
|
outline-offset: -4px;
|
|
285
304
|
}
|
|
286
305
|
|
|
287
|
-
&[data-
|
|
306
|
+
&[data-cell-type="action"] {
|
|
288
307
|
padding: 0;
|
|
289
308
|
|
|
290
|
-
& >
|
|
309
|
+
& > .aksel-data-table__cell-content {
|
|
291
310
|
display: grid;
|
|
292
311
|
place-content: center;
|
|
293
312
|
}
|
|
@@ -295,7 +314,7 @@
|
|
|
295
314
|
|
|
296
315
|
--__axc-data-table-pi-cell: var(--ax-space-16);
|
|
297
316
|
|
|
298
|
-
&:not([data-
|
|
317
|
+
&:not([data-cell-type="action"]) > .aksel-data-table__cell-content {
|
|
299
318
|
padding-block: var(--__axc-data-table-density);
|
|
300
319
|
padding-inline: var(--__axc-data-table-pi-cell);
|
|
301
320
|
overflow: hidden;
|
|
@@ -316,11 +335,11 @@
|
|
|
316
335
|
position: relative;
|
|
317
336
|
font-weight: var(--ax-font-weight-bold);
|
|
318
337
|
|
|
319
|
-
&:has(.aksel-data-table__th-sort-button:hover) {
|
|
338
|
+
&:has(.aksel-data-table__th-sort-button:hover:not(:disabled)) {
|
|
320
339
|
background-color: var(--ax-bg-neutral-moderate-hover);
|
|
321
340
|
}
|
|
322
341
|
|
|
323
|
-
&:has(.aksel-data-table__th-sort-button:active) {
|
|
342
|
+
&:has(.aksel-data-table__th-sort-button:active:not(:disabled)) {
|
|
324
343
|
background-color: var(--ax-bg-neutral-moderate-pressed);
|
|
325
344
|
}
|
|
326
345
|
|
|
@@ -346,6 +365,11 @@
|
|
|
346
365
|
&:focus-visible {
|
|
347
366
|
outline: none;
|
|
348
367
|
}
|
|
368
|
+
|
|
369
|
+
&:disabled {
|
|
370
|
+
color: inherit;
|
|
371
|
+
cursor: default;
|
|
372
|
+
}
|
|
349
373
|
}
|
|
350
374
|
|
|
351
375
|
.aksel-data-table__th-sort-icon {
|
|
@@ -356,7 +380,7 @@
|
|
|
356
380
|
visibility: hidden;
|
|
357
381
|
}
|
|
358
382
|
|
|
359
|
-
.aksel-data-table__th-sort-button:is(:hover, :focus-visible, :focus-within) & {
|
|
383
|
+
.aksel-data-table__th-sort-button:is(:hover, :focus-visible, :focus-within):not(:disabled) & {
|
|
360
384
|
visibility: visible;
|
|
361
385
|
}
|
|
362
386
|
|
|
@@ -441,11 +465,11 @@
|
|
|
441
465
|
transform: translateY(-50%);
|
|
442
466
|
height: 1.5rem;
|
|
443
467
|
|
|
444
|
-
|
|
468
|
+
&:first-child {
|
|
445
469
|
right: 12px;
|
|
446
470
|
}
|
|
447
471
|
|
|
448
|
-
|
|
472
|
+
&:last-child {
|
|
449
473
|
left: 12px;
|
|
450
474
|
}
|
|
451
475
|
}
|
|
@@ -493,10 +517,10 @@
|
|
|
493
517
|
outline-offset: -4px;
|
|
494
518
|
}
|
|
495
519
|
|
|
496
|
-
&[data-
|
|
520
|
+
&[data-cell-type="action"] {
|
|
497
521
|
padding: 0;
|
|
498
522
|
|
|
499
|
-
& >
|
|
523
|
+
& > .aksel-data-table__cell-content {
|
|
500
524
|
display: grid;
|
|
501
525
|
place-content: center;
|
|
502
526
|
}
|
|
@@ -545,21 +569,11 @@
|
|
|
545
569
|
background-color: var(--ax-bg-default);
|
|
546
570
|
}
|
|
547
571
|
|
|
548
|
-
/* TODO - might be removable */
|
|
549
|
-
&[data-keyboard-dragging="true"] {
|
|
550
|
-
.aksel-data-drag-and-drop__drag-handler__button {
|
|
551
|
-
outline: 2px solid var(--ax-border-focus);
|
|
552
|
-
outline-offset: -1px;
|
|
553
|
-
border-radius: var(--ax-radius-8);
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
572
|
&[data-drop-target="true"]:not([data-overlay="true"]) {
|
|
558
573
|
background: var(--ax-bg-neutral-moderate);
|
|
559
574
|
}
|
|
560
575
|
}
|
|
561
576
|
|
|
562
|
-
.aksel-data-drag-and-drop__drag-handler__legacy,
|
|
563
577
|
.aksel-data-drag-and-drop__drag-handler {
|
|
564
578
|
position: relative;
|
|
565
579
|
height: 1.5rem;
|
package/src/index.css
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
@import "./chat.css" layer(aksel.components.modules);
|
|
32
32
|
@import "./copybutton.css" layer(aksel.components.modules);
|
|
33
33
|
@import "./date.css" layer(aksel.components.modules);
|
|
34
|
+
@import "./data-grid-preview.css" layer(aksel.components.modules);
|
|
34
35
|
@import "./dialog.css" layer(aksel.components.modules);
|
|
35
36
|
@import "./dropdown.css" layer(aksel.components.modules);
|
|
36
37
|
@import "./action-menu.css" layer(aksel.components.modules);
|