@navikt/ds-css 8.10.6 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-css",
3
- "version": "8.10.6",
3
+ "version": "8.11.0",
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.0",
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"] {
@@ -188,6 +193,10 @@
188
193
  padding: 0;
189
194
  font-size: var(--__axc-data-table-text-size);
190
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
+ }
199
+
191
200
  &[data-nested="true"] {
192
201
  position: relative;
193
202
 
@@ -313,21 +322,6 @@
313
322
  .aksel-data-table[data-truncate-content="true"] & {
314
323
  text-overflow: ellipsis;
315
324
  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
325
  }
332
326
  }
333
327
  }
@@ -341,11 +335,11 @@
341
335
  position: relative;
342
336
  font-weight: var(--ax-font-weight-bold);
343
337
 
344
- &:has(.aksel-data-table__th-sort-button:hover) {
338
+ &:has(.aksel-data-table__th-sort-button:hover:not(:disabled)) {
345
339
  background-color: var(--ax-bg-neutral-moderate-hover);
346
340
  }
347
341
 
348
- &:has(.aksel-data-table__th-sort-button:active) {
342
+ &:has(.aksel-data-table__th-sort-button:active:not(:disabled)) {
349
343
  background-color: var(--ax-bg-neutral-moderate-pressed);
350
344
  }
351
345
 
@@ -371,6 +365,11 @@
371
365
  &:focus-visible {
372
366
  outline: none;
373
367
  }
368
+
369
+ &:disabled {
370
+ color: inherit;
371
+ cursor: default;
372
+ }
374
373
  }
375
374
 
376
375
  .aksel-data-table__th-sort-icon {
@@ -381,7 +380,7 @@
381
380
  visibility: hidden;
382
381
  }
383
382
 
384
- .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) & {
385
384
  visibility: visible;
386
385
  }
387
386
 
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);