@navikt/ds-css 8.10.6 → 8.11.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-css",
3
- "version": "8.10.6",
3
+ "version": "8.11.1",
4
4
  "description": "CSS for Nav Designsystem",
5
5
  "author": "Aksel | Nav designsystem team",
6
6
  "keywords": [
@@ -32,7 +32,7 @@
32
32
  "css:get-version": "node config/get-version.js"
33
33
  },
34
34
  "devDependencies": {
35
- "@navikt/ds-tokens": "^8.10.6",
35
+ "@navikt/ds-tokens": "^8.11.1",
36
36
  "browserslist": "^4.25.0",
37
37
  "esbuild": "^0.28.0",
38
38
  "fast-glob": "3.3.3",
@@ -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;
@@ -37,21 +45,18 @@
37
45
 
38
46
  /* Default font size is prop "medium", which is variable --ax-font-size-large */
39
47
  --__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));
48
+ --__axc-data-table-density: var(--ax-space-12);
43
49
 
44
50
  &[data-text-size="small"] {
45
51
  --__axc-data-table-text-size: var(--ax-font-size-medium);
46
- --__axc-data-table-density-scale: 0.8889; /* 16/18 */
47
52
  }
48
53
 
49
- &[data-density="condensed"] {
50
- --__axc-data-table-density-base: var(--ax-space-8);
54
+ &[data-density="tight"] {
55
+ --__axc-data-table-density: var(--ax-space-6);
51
56
  }
52
57
 
53
- &[data-density="spacious"] {
54
- --__axc-data-table-density-base: var(--ax-space-32);
58
+ &[data-density="loose"] {
59
+ --__axc-data-table-density: var(--ax-space-20);
55
60
  }
56
61
 
57
62
  &[data-zebra-stripes="true"] {
@@ -63,16 +68,23 @@
63
68
 
64
69
  .aksel-data-table__thead {
65
70
  background-color: var(--ax-bg-raised);
71
+ position: relative; /* Shadow ends up behind loading/empty-state without, consider after-element instead like with sticky */
72
+ box-shadow: 0 1px 0 0 var(--ax-border-neutral-subtle);
66
73
 
67
74
  .aksel-data-table[data-loading="true"] &::after {
68
75
  content: "";
69
76
  position: absolute;
70
77
  block-size: 2px;
71
- inset-block-end: -2px;
72
78
  background-color: var(--ax-bg-strong);
73
79
  animation: animateDataTableLoading 1s linear infinite;
74
80
  z-index: 11;
75
81
  }
82
+
83
+ &[data-sticky="true"] {
84
+ position: sticky;
85
+ top: 0;
86
+ z-index: 3;
87
+ }
76
88
  }
77
89
 
78
90
  .aksel-data-table__tbody {
@@ -80,12 +92,7 @@
80
92
  position: relative;
81
93
 
82
94
  &[inert] {
83
- transition: opacity 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
84
95
  opacity: var(--ax-opacity-disabled);
85
-
86
- @starting-style {
87
- opacity: 0.001;
88
- }
89
96
  }
90
97
 
91
98
  &[inert]::after {
@@ -93,15 +100,8 @@
93
100
  position: absolute;
94
101
  inset: 0;
95
102
  background-color: var(--ax-bg-overlay);
96
- transition: opacity 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
97
- z-index: 10;
103
+ z-index: 2;
98
104
  opacity: 0.2;
99
-
100
- /* iOS 26+: Ensure the backdrop covers the entire visible viewport. */
101
-
102
- @starting-style {
103
- opacity: 0.001;
104
- }
105
105
  }
106
106
  }
107
107
 
@@ -109,23 +109,6 @@
109
109
  &[data-selected="true"] {
110
110
  background-color: var(--ax-bg-softA);
111
111
  }
112
-
113
- .aksel-data-table__thead &[data-sticky="true"] {
114
- position: sticky;
115
- top: 0;
116
- z-index: 3;
117
- box-shadow: 1px 1px 0 0 var(--ax-border-neutral-subtle);
118
-
119
- /* This breaks filler-cells ⬇️. Trying box-shadow instead ⬆️ */
120
- /* &::after {
121
- content: "";
122
- position: absolute;
123
- inset-inline: 0;
124
- bottom: -1px;
125
- pointer-events: none;
126
- border-bottom: 1px solid var(--ax-border-neutral-subtle);
127
- } */
128
- }
129
112
  }
130
113
 
131
114
  /* BORDER STYLING START */
@@ -153,11 +136,6 @@
153
136
  border-bottom: 1px solid var(--ax-border-neutral-subtle);
154
137
  }
155
138
 
156
- .aksel-data-table__thead {
157
- position: relative; /* Shadow ends up behind loading/empty-state without, consider after-element instead like with sticky */
158
- box-shadow: 0 1px 0 0 var(--ax-border-neutral-subtle);
159
- }
160
-
161
139
  @keyframes scroll-shadow-fade-start {
162
140
  0% {
163
141
  opacity: 0;
@@ -188,6 +166,10 @@
188
166
  padding: 0;
189
167
  font-size: var(--__axc-data-table-text-size);
190
168
 
169
+ &:not(.aksel-data-table__column-header) {
170
+ overflow: hidden; /* Needed for cases where left margin is added to cell-content (nested rows) */
171
+ }
172
+
191
173
  &[data-nested="true"] {
192
174
  position: relative;
193
175
 
@@ -313,21 +295,6 @@
313
295
  .aksel-data-table[data-truncate-content="true"] & {
314
296
  text-overflow: ellipsis;
315
297
  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;
331
298
  }
332
299
  }
333
300
  }
@@ -341,11 +308,11 @@
341
308
  position: relative;
342
309
  font-weight: var(--ax-font-weight-bold);
343
310
 
344
- &:has(.aksel-data-table__th-sort-button:hover) {
311
+ &:has(.aksel-data-table__th-sort-button:hover:not(:disabled)) {
345
312
  background-color: var(--ax-bg-neutral-moderate-hover);
346
313
  }
347
314
 
348
- &:has(.aksel-data-table__th-sort-button:active) {
315
+ &:has(.aksel-data-table__th-sort-button:active:not(:disabled)) {
349
316
  background-color: var(--ax-bg-neutral-moderate-pressed);
350
317
  }
351
318
 
@@ -371,6 +338,11 @@
371
338
  &:focus-visible {
372
339
  outline: none;
373
340
  }
341
+
342
+ &:disabled {
343
+ color: inherit;
344
+ cursor: default;
345
+ }
374
346
  }
375
347
 
376
348
  .aksel-data-table__th-sort-icon {
@@ -381,7 +353,7 @@
381
353
  visibility: hidden;
382
354
  }
383
355
 
384
- .aksel-data-table__th-sort-button:is(:hover, :focus-visible, :focus-within) & {
356
+ .aksel-data-table__th-sort-button:is(:hover, :focus-visible, :focus-within):not(:disabled) & {
385
357
  visibility: visible;
386
358
  }
387
359
 
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);