@navikt/ds-css 8.10.4 → 8.10.6
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/button.css +19 -4
- package/dist/component/button.min.css +1 -1
- package/dist/components.css +24 -5
- 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 +25 -6
- package/dist/index.min.css +1 -1
- package/package.json +3 -3
- package/src/alert.css +7 -3
- package/src/button.css +31 -6
- package/src/data-table.css +52 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-css",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.6",
|
|
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.10.
|
|
35
|
+
"@navikt/ds-tokens": "^8.10.6",
|
|
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
|
}
|
package/src/button.css
CHANGED
|
@@ -42,14 +42,22 @@
|
|
|
42
42
|
--__axc-button-border-color: var(--ax-border-default);
|
|
43
43
|
|
|
44
44
|
background-color: transparent;
|
|
45
|
-
color: var(--ax-text-subtle);
|
|
46
45
|
|
|
46
|
+
/* secondary + neutral should use "default" text color.
|
|
47
|
+
Check for data-color=neutral on both the button itself and the parents. */
|
|
47
48
|
&[data-color="neutral"],
|
|
48
|
-
[data-color="neutral"]
|
|
49
|
-
[data-color="neutral"] :not([data-color]) &:not([data-color]) {
|
|
49
|
+
[data-color="neutral"] &:not([data-color]) {
|
|
50
50
|
color: var(--ax-text-default);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/* secondary + NOT neutral should use "subtle" text color.
|
|
54
|
+
We need to explicitly target cases where a parent has data-color=neutral but
|
|
55
|
+
a closer parent has a different data-color (overriding the selector above). */
|
|
56
|
+
&,
|
|
57
|
+
[data-color="neutral"] [data-color]:not([data-color="neutral"]) & {
|
|
58
|
+
color: var(--ax-text-subtle);
|
|
59
|
+
}
|
|
60
|
+
|
|
53
61
|
&:hover {
|
|
54
62
|
--__axc-button-border-color: var(--ax-border-strong);
|
|
55
63
|
|
|
@@ -73,14 +81,22 @@
|
|
|
73
81
|
|
|
74
82
|
&[data-variant="tertiary"] {
|
|
75
83
|
background-color: transparent;
|
|
76
|
-
color: var(--ax-text-subtle);
|
|
77
84
|
|
|
85
|
+
/* tertiary + neutral should use "default" text color.
|
|
86
|
+
Check for data-color=neutral on both the button itself and the parents. */
|
|
78
87
|
&[data-color="neutral"],
|
|
79
|
-
[data-color="neutral"]
|
|
80
|
-
[data-color="neutral"] :not([data-color]) &:not([data-color], [data-pressed="true"]) {
|
|
88
|
+
[data-color="neutral"] &:not([data-color], [data-pressed="true"]) {
|
|
81
89
|
color: var(--ax-text-default);
|
|
82
90
|
}
|
|
83
91
|
|
|
92
|
+
/* tertiary + NOT neutral should use "subtle" text color.
|
|
93
|
+
We need to explicitly target cases where a parent has data-color=neutral but
|
|
94
|
+
a closer parent has a different data-color (overriding the selector above). */
|
|
95
|
+
&,
|
|
96
|
+
[data-color="neutral"] [data-color]:not([data-color="neutral"]) &:not([data-pressed="true"]) {
|
|
97
|
+
color: var(--ax-text-subtle);
|
|
98
|
+
}
|
|
99
|
+
|
|
84
100
|
&:hover {
|
|
85
101
|
background-color: var(--ax-bg-moderate-hoverA);
|
|
86
102
|
}
|
|
@@ -231,6 +247,15 @@
|
|
|
231
247
|
color: highlight;
|
|
232
248
|
box-shadow: none;
|
|
233
249
|
}
|
|
250
|
+
|
|
251
|
+
&[data-variant="tertiary"][data-pressed="true"] {
|
|
252
|
+
background-color: selecteditem;
|
|
253
|
+
color: selecteditemtext;
|
|
254
|
+
|
|
255
|
+
& span {
|
|
256
|
+
forced-color-adjust: none;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
234
259
|
}
|
|
235
260
|
|
|
236
261
|
.aksel-button:not(:disabled):hover span {
|
package/src/data-table.css
CHANGED
|
@@ -35,14 +35,23 @@
|
|
|
35
35
|
min-width: 100%;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
--
|
|
38
|
+
/* Default font size is prop "medium", which is variable --ax-font-size-large */
|
|
39
|
+
--__axc-data-table-text-size: var(--ax-font-size-large);
|
|
40
|
+
--__axc-data-table-density-base: var(--ax-space-16);
|
|
41
|
+
--__axc-data-table-density-scale: 1;
|
|
42
|
+
--__axc-data-table-density: calc(var(--__axc-data-table-density-base) * var(--__axc-data-table-density-scale));
|
|
43
|
+
|
|
44
|
+
&[data-text-size="small"] {
|
|
45
|
+
--__axc-data-table-text-size: var(--ax-font-size-medium);
|
|
46
|
+
--__axc-data-table-density-scale: 0.8889; /* 16/18 */
|
|
47
|
+
}
|
|
39
48
|
|
|
40
49
|
&[data-density="condensed"] {
|
|
41
|
-
--__axc-data-table-density: var(--ax-space-8);
|
|
50
|
+
--__axc-data-table-density-base: var(--ax-space-8);
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
&[data-density="spacious"] {
|
|
45
|
-
--__axc-data-table-density: var(--ax-space-32);
|
|
54
|
+
--__axc-data-table-density-base: var(--ax-space-32);
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
&[data-zebra-stripes="true"] {
|
|
@@ -177,11 +186,12 @@
|
|
|
177
186
|
vertical-align: middle;
|
|
178
187
|
scroll-margin: var(--ax-space-0);
|
|
179
188
|
padding: 0;
|
|
189
|
+
font-size: var(--__axc-data-table-text-size);
|
|
180
190
|
|
|
181
191
|
&[data-nested="true"] {
|
|
182
192
|
position: relative;
|
|
183
193
|
|
|
184
|
-
& >
|
|
194
|
+
& > .aksel-data-table__cell-content {
|
|
185
195
|
margin-inline-start: calc(32px + 8px + calc(var(--__axc-data-table-nested-depth) * var(--ax-space-16)));
|
|
186
196
|
}
|
|
187
197
|
}
|
|
@@ -219,7 +229,7 @@
|
|
|
219
229
|
&[data-sticky="start"] {
|
|
220
230
|
left: 0;
|
|
221
231
|
|
|
222
|
-
|
|
232
|
+
&[data-sticky-last]::before {
|
|
223
233
|
content: "";
|
|
224
234
|
position: absolute;
|
|
225
235
|
inset: 0;
|
|
@@ -231,13 +241,13 @@
|
|
|
231
241
|
opacity: 0;
|
|
232
242
|
}
|
|
233
243
|
|
|
234
|
-
.aksel-data-table[data-scroll]
|
|
244
|
+
.aksel-data-table[data-scroll] &[data-sticky-last]::before {
|
|
235
245
|
opacity: 1;
|
|
236
246
|
animation: scroll-shadow-fade-start 1s linear;
|
|
237
247
|
animation-timeline: --horizontal-table-scroll;
|
|
238
248
|
}
|
|
239
249
|
|
|
240
|
-
|
|
250
|
+
&[data-sticky-last]::after {
|
|
241
251
|
inset-inline: 0 -1px;
|
|
242
252
|
border-right-width: 1px;
|
|
243
253
|
}
|
|
@@ -284,10 +294,10 @@
|
|
|
284
294
|
outline-offset: -4px;
|
|
285
295
|
}
|
|
286
296
|
|
|
287
|
-
&[data-
|
|
297
|
+
&[data-cell-type="action"] {
|
|
288
298
|
padding: 0;
|
|
289
299
|
|
|
290
|
-
& >
|
|
300
|
+
& > .aksel-data-table__cell-content {
|
|
291
301
|
display: grid;
|
|
292
302
|
place-content: center;
|
|
293
303
|
}
|
|
@@ -295,7 +305,7 @@
|
|
|
295
305
|
|
|
296
306
|
--__axc-data-table-pi-cell: var(--ax-space-16);
|
|
297
307
|
|
|
298
|
-
&:not([data-
|
|
308
|
+
&:not([data-cell-type="action"]) > .aksel-data-table__cell-content {
|
|
299
309
|
padding-block: var(--__axc-data-table-density);
|
|
300
310
|
padding-inline: var(--__axc-data-table-pi-cell);
|
|
301
311
|
overflow: hidden;
|
|
@@ -303,6 +313,21 @@
|
|
|
303
313
|
.aksel-data-table[data-truncate-content="true"] & {
|
|
304
314
|
text-overflow: ellipsis;
|
|
305
315
|
white-space: nowrap;
|
|
316
|
+
|
|
317
|
+
/* TODO: Too magical? Consider prop instead */
|
|
318
|
+
> :is(.aksel-tag, .aksel-button) {
|
|
319
|
+
vertical-align: top;
|
|
320
|
+
|
|
321
|
+
&:not(:last-child) {
|
|
322
|
+
margin-right: var(--ax-space-8);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.aksel-data-table[data-truncate-content="false"] &:has(.aksel-tag, .aksel-button) {
|
|
328
|
+
display: flex;
|
|
329
|
+
gap: var(--ax-space-8);
|
|
330
|
+
flex-wrap: wrap;
|
|
306
331
|
}
|
|
307
332
|
}
|
|
308
333
|
}
|
|
@@ -441,11 +466,11 @@
|
|
|
441
466
|
transform: translateY(-50%);
|
|
442
467
|
height: 1.5rem;
|
|
443
468
|
|
|
444
|
-
|
|
469
|
+
&:first-child {
|
|
445
470
|
right: 12px;
|
|
446
471
|
}
|
|
447
472
|
|
|
448
|
-
|
|
473
|
+
&:last-child {
|
|
449
474
|
left: 12px;
|
|
450
475
|
}
|
|
451
476
|
}
|
|
@@ -493,10 +518,10 @@
|
|
|
493
518
|
outline-offset: -4px;
|
|
494
519
|
}
|
|
495
520
|
|
|
496
|
-
&[data-
|
|
521
|
+
&[data-cell-type="action"] {
|
|
497
522
|
padding: 0;
|
|
498
523
|
|
|
499
|
-
& >
|
|
524
|
+
& > .aksel-data-table__cell-content {
|
|
500
525
|
display: grid;
|
|
501
526
|
place-content: center;
|
|
502
527
|
}
|
|
@@ -513,6 +538,11 @@
|
|
|
513
538
|
width: auto;
|
|
514
539
|
}
|
|
515
540
|
|
|
541
|
+
.aksel-data-table__drag-and-drop-root {
|
|
542
|
+
padding: 0;
|
|
543
|
+
margin: 0;
|
|
544
|
+
}
|
|
545
|
+
|
|
516
546
|
.aksel-data-drag-and-drop__drag-handler__button {
|
|
517
547
|
height: 1.5rem;
|
|
518
548
|
position: relative;
|
|
@@ -533,21 +563,11 @@
|
|
|
533
563
|
}
|
|
534
564
|
|
|
535
565
|
.aksel-data-table__drag-and-drop-item {
|
|
536
|
-
background-color: var(--ax-bg-default);
|
|
537
|
-
|
|
538
566
|
&[data-overlay="true"] {
|
|
539
567
|
width: 100%;
|
|
540
568
|
opacity: 0.8;
|
|
541
569
|
box-shadow: var(--ax-shadow-dialog);
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
/* TODO - might be removable */
|
|
545
|
-
&[data-keyboard-dragging="true"] {
|
|
546
|
-
.aksel-data-drag-and-drop__drag-handler__button {
|
|
547
|
-
outline: 2px solid var(--ax-border-focus);
|
|
548
|
-
outline-offset: -1px;
|
|
549
|
-
border-radius: var(--ax-radius-8);
|
|
550
|
-
}
|
|
570
|
+
background-color: var(--ax-bg-default);
|
|
551
571
|
}
|
|
552
572
|
|
|
553
573
|
&[data-drop-target="true"]:not([data-overlay="true"]) {
|
|
@@ -555,7 +575,6 @@
|
|
|
555
575
|
}
|
|
556
576
|
}
|
|
557
577
|
|
|
558
|
-
.aksel-data-drag-and-drop__drag-handler__alt,
|
|
559
578
|
.aksel-data-drag-and-drop__drag-handler {
|
|
560
579
|
position: relative;
|
|
561
580
|
height: 1.5rem;
|
|
@@ -661,3 +680,10 @@ html[data-dragging-cursor="true"] *::after {
|
|
|
661
680
|
.aksel-data-table__details-panel-row {
|
|
662
681
|
box-shadow: inset 1px 1px 0 0 var(--ax-border-neutral-subtle);
|
|
663
682
|
}
|
|
683
|
+
|
|
684
|
+
.aksel-data-table__details-panel-row-cell {
|
|
685
|
+
&:focus-visible {
|
|
686
|
+
outline: 2px solid var(--ax-border-focus);
|
|
687
|
+
outline-offset: -4px;
|
|
688
|
+
}
|
|
689
|
+
}
|