@navikt/ds-css 8.10.5 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-css",
3
- "version": "8.10.5",
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.5",
35
+ "@navikt/ds-tokens": "^8.10.6",
36
36
  "browserslist": "^4.25.0",
37
- "esbuild": "^0.27.4",
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-12) var(--ax-space-16);
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"] & > .aksel-base-alert__icon {
225
- margin-top: 0;
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
  }
@@ -35,14 +35,23 @@
35
35
  min-width: 100%;
36
36
  }
37
37
 
38
- --__axc-data-table-density: var(--ax-space-16);
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
- & > div {
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
- &::before {
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] &::before {
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
- &::after {
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-selectable="true"] {
297
+ &[data-cell-type="action"] {
288
298
  padding: 0;
289
299
 
290
- & > div {
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-selectable="true"]) > div {
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
- &.aksel-data-table__th-resize-handle-indicator--start {
469
+ &:first-child {
445
470
  right: 12px;
446
471
  }
447
472
 
448
- &.aksel-data-table__th-resize-handle-indicator--end {
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-selectable="true"] {
521
+ &[data-cell-type="action"] {
497
522
  padding: 0;
498
523
 
499
- & > div {
524
+ & > .aksel-data-table__cell-content {
500
525
  display: grid;
501
526
  place-content: center;
502
527
  }
@@ -545,21 +570,11 @@
545
570
  background-color: var(--ax-bg-default);
546
571
  }
547
572
 
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
573
  &[data-drop-target="true"]:not([data-overlay="true"]) {
558
574
  background: var(--ax-bg-neutral-moderate);
559
575
  }
560
576
  }
561
577
 
562
- .aksel-data-drag-and-drop__drag-handler__legacy,
563
578
  .aksel-data-drag-and-drop__drag-handler {
564
579
  position: relative;
565
580
  height: 1.5rem;