@navikt/ds-css 8.8.0 → 8.9.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.8.0",
3
+ "version": "8.9.0",
4
4
  "description": "CSS for Nav Designsystem",
5
5
  "author": "Aksel | Nav designsystem team",
6
6
  "keywords": [
@@ -30,9 +30,9 @@
30
30
  "css:get-version": "node config/get-version.js"
31
31
  },
32
32
  "devDependencies": {
33
- "@navikt/ds-tokens": "^8.8.0",
33
+ "@navikt/ds-tokens": "^8.9.0",
34
34
  "browserslist": "^4.25.0",
35
- "esbuild": "^0.27.2",
35
+ "esbuild": "^0.27.4",
36
36
  "fast-glob": "3.3.3",
37
37
  "lightningcss": "^1.30.1",
38
38
  "normalize.css": "^8.0.1",
package/src/chips.css CHANGED
@@ -95,8 +95,6 @@
95
95
  padding-left: var(--ax-space-6);
96
96
  }
97
97
 
98
- /* -------------------------- start old CSS -------------------------- */
99
-
100
98
  /* ----------------------------- Chips removable ---------------------------- */
101
99
  .aksel-chips__removable {
102
100
  gap: 0;
@@ -335,15 +335,35 @@
335
335
  padding: 0;
336
336
  }
337
337
 
338
- .aksel-data-table__drag-and-drop-item {
339
- &[data-dragging="true"] {
340
- background: var(--ax-bg-default);
338
+ .aksel-data-drag-and-drop__drag-handler__button {
339
+ height: 1.5rem;
340
+ position: relative;
341
+ background: transparent;
342
+ border: none;
343
+ padding: 0;
344
+
345
+ &:hover {
346
+ cursor: grab;
341
347
  }
342
348
 
343
- &[data-mouse-dragging="true"]:not(:active) {
349
+ &:focus-visible,
350
+ &[data-drag-handler-active="true"] {
351
+ outline: 2px solid var(--ax-border-focus);
352
+ outline-offset: -1px;
353
+ border-radius: var(--ax-radius-8);
354
+ }
355
+ }
356
+
357
+ .aksel-data-table__drag-and-drop-item {
358
+ background-color: var(--ax-bg-default);
359
+
360
+ &[data-overlay="true"] {
361
+ width: 100%;
344
362
  opacity: 0.8;
363
+ box-shadow: var(--ax-shadow-dialog);
345
364
  }
346
365
 
366
+ /* TODO - might be removable */
347
367
  &[data-keyboard-dragging="true"] {
348
368
  .aksel-data-drag-and-drop__drag-handler__button {
349
369
  outline: 2px solid var(--ax-border-focus);
@@ -352,32 +372,19 @@
352
372
  }
353
373
  }
354
374
 
355
- &[data-drop-target="true"] {
375
+ &[data-drop-target="true"]:not([data-overlay="true"]) {
356
376
  background: var(--ax-bg-neutral-moderate);
357
377
  }
358
378
  }
359
379
 
360
- .aksel-data-drag-and-drop__drag-handler__button {
361
- cursor: grab;
362
- height: 1.5rem;
363
- position: relative;
364
- background: transparent;
365
- border: none;
366
- padding: 0;
367
-
368
- &:focus-visible {
369
- outline: 2px solid var(--ax-border-focus);
370
- outline-offset: -1px;
371
- border-radius: var(--ax-radius-8);
372
- }
373
- }
374
-
375
380
  .aksel-data-drag-and-drop__drag-handler__arrow {
376
381
  height: 1.2rem;
377
382
  }
378
383
 
379
- .aksel-data-drag-and-drop__drag-handler__alt {
384
+ .aksel-data-drag-and-drop__drag-handler__alt,
385
+ .aksel-data-drag-and-drop__drag-handler {
380
386
  position: relative;
387
+ height: 1.5rem;
381
388
 
382
389
  .aksel-data-drag-and-drop__drag-handler__arrow {
383
390
  position: absolute;
@@ -455,3 +462,13 @@
455
462
  .aksel-data-table tr .aksel-checkbox:focus-within::after {
456
463
  inset: 0;
457
464
  }
465
+
466
+ /* TODO -
467
+ * This is needed to prevent the cursor from changing back to default when dragging over interactive elements in the row.
468
+ * Not sure if this is the best approach or breaks styling elsewhere */
469
+ html[data-dragging="true"],
470
+ html[data-dragging="true"] *,
471
+ html[data-dragging="true"] *::before,
472
+ html[data-dragging="true"] *::after {
473
+ cursor: grabbing !important;
474
+ }
@@ -1,35 +1,30 @@
1
1
  .aksel-property-filter__popup {
2
2
  overflow: hidden;
3
- border-radius: var(--ax-radius-12);
3
+ border-radius: var(--ax-radius-8);
4
4
  border: 1px solid var(--ax-border-neutral-subtleA);
5
5
  box-shadow: var(--ax-shadow-dialog);
6
6
  /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
7
7
  transform-origin: var(--__axc-floating-transform-origin);
8
- transition:
9
- transform 150ms ease allow-discrete,
10
- opacity 150ms ease allow-discrete;
8
+ transition: opacity 150ms ease allow-discrete;
11
9
 
12
10
  @starting-style {
13
- opacity: 0.8;
14
- transform: scale3d(0.94, 0.94, 0.94);
11
+ opacity: 0.6;
15
12
  }
16
13
 
17
14
  min-width: 260px;
18
15
  }
19
16
 
20
17
  .aksel-property-filter__popup-inner {
21
- --__axc-token-filter-content-p: var(--ax-space-8);
22
18
  --__axc-token-filter-item-pr: var(--ax-space-8);
23
19
  --__axc-token-filter-item-pl: var(--ax-space-8);
24
20
  --__axc-token-filter-item-height: 2rem;
25
21
 
26
- border-radius: var(--ax-radius-12);
22
+ border-radius: var(--ax-radius-8);
27
23
  background-color: var(--ax-bg-raised);
28
24
  min-width: 128px;
29
25
  max-width: min(95vw, 640px);
30
26
  animation-duration: 160ms;
31
27
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
32
- padding: var(--__axc-token-filter-content-p);
33
28
  overflow: auto;
34
29
  /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
35
30
  max-height: calc(var(--__axc-floating-available-height) - 4px);
@@ -1,18 +1,30 @@
1
1
  .aksel-data-toolbar {
2
- padding: var(--ax-space-12);
3
2
  display: flex;
3
+ flex-wrap: wrap;
4
4
  align-items: center;
5
5
  gap: var(--ax-space-8);
6
- border: 1px solid var(--ax-border-neutral);
7
- border-radius: var(--ax-radius-12);
8
- background-color: var(--ax-bg-raised);
6
+ grid-template-columns: 1fr 1fr;
9
7
  }
10
8
 
11
- .aksel-data-toolbar__toggle-button {
12
- &[aria-pressed="true"] {
13
- --__axc-button-border-width: 0px; /* ??? */
9
+ .aksel-data-toolbar__actions {
10
+ margin-inline-start: auto;
11
+ display: flex;
12
+ align-items: center;
14
13
 
15
- color: var(--ax-text-contrast);
16
- background-color: var(--ax-bg-strong-pressed);
14
+ > :not(:last-child) {
15
+ border-right: 1px solid var(--ax-border-neutral-subtle);
16
+ margin-inline-end: var(--ax-space-4);
17
+ padding-inline-end: var(--ax-space-4);
17
18
  }
18
19
  }
20
+
21
+ .aksel-data-toolbar__input {
22
+ max-inline-size: 600px;
23
+ width: 100%;
24
+ }
25
+
26
+ .aksel-data-toolbar__pagination {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: var(--ax-space-8);
30
+ }
package/src/date.css CHANGED
@@ -203,36 +203,41 @@
203
203
  }
204
204
 
205
205
  .aksel-date__field-input {
206
- &.aksel-text-field__input {
207
- padding-right: var(--ax-space-48);
206
+ border-top-right-radius: 0;
207
+ border-bottom-right-radius: 0;
208
+ border-right: none;
209
+
210
+ &:focus-visible {
211
+ outline: none;
208
212
  }
209
213
 
210
- .aksel-form-field--small & {
211
- padding-right: var(--ax-space-32);
214
+ .aksel-date__field--error &:not(:disabled) {
215
+ box-shadow:
216
+ inset -2px 0 0 0 var(--ax-border-danger-strong),
217
+ inset 0 0 0 1px var(--ax-border-danger-strong);
212
218
  }
213
219
  }
214
220
 
215
221
  .aksel-date__field-button {
216
- position: absolute;
217
- right: 0.0625rem;
218
- top: 50%;
219
- transform: translateY(-50%);
220
- color: var(--ax-text-neutral);
221
- display: inline-flex;
222
- cursor: pointer;
223
- margin: 0;
224
- text-decoration: none;
225
- border: none;
226
- background: none;
227
- border-radius: calc(var(--ax-radius-8) - 1px);
228
- padding: var(--ax-space-12);
229
- align-items: center;
230
- justify-content: center;
231
- font-size: 1.5rem;
232
- height: calc(100% - 0.125rem);
222
+ --__axc-button-border-width: 1px;
223
+ --__axc-button-border-color: var(--ax-border-neutral);
224
+
233
225
  border-start-start-radius: 0;
234
226
  border-end-start-radius: 0;
235
227
 
228
+ &:focus-visible {
229
+ outline: 3px solid var(--ax-border-focus);
230
+ outline-offset: 3px;
231
+ }
232
+
233
+ .aksel-date__field:not(.aksel-date__field--readonly):has(.aksel-date__field-input:not(:disabled)) &:hover,
234
+ .aksel-date__field:not(.aksel-date__field--readonly, .aksel-date__field--error):has(
235
+ .aksel-date__field-input:is(:focus-visible, :hover):not(:disabled)
236
+ )
237
+ & {
238
+ --__axc-button-border-color: var(--ax-border-strong);
239
+ }
240
+
236
241
  .aksel-form-field--small & {
237
242
  padding: var(--ax-space-4);
238
243
  }
@@ -244,19 +249,24 @@
244
249
 
245
250
  /* Readonly */
246
251
  .aksel-date__field--readonly & {
247
- cursor: default;
248
- }
252
+ --__axc-button-border-color: var(--ax-border-neutral-subtleA);
249
253
 
250
- &:focus-visible {
251
- outline-color: var(--ax-border-focus);
254
+ cursor: default;
255
+ opacity: 1;
256
+ background-color: var(--ax-bg-neutral-moderate);
257
+ color: var(--ax-text-neutral-subtle);
252
258
  }
253
259
  }
254
260
 
255
261
  .aksel-date__field-wrapper {
256
262
  display: inline-flex;
257
- align-items: center;
258
- position: relative;
259
263
  width: fit-content;
264
+ border-radius: var(--ax-radius-8);
265
+
266
+ &:has(.aksel-date__field-input:focus-visible) {
267
+ outline: 3px solid var(--ax-border-focus);
268
+ outline-offset: 3px;
269
+ }
260
270
  }
261
271
 
262
272
  .aksel-date__week-row {
@@ -67,10 +67,28 @@
67
67
  gap: var(--ax-space-8);
68
68
  border-left: 1px solid var(--ax-border-neutral-subtleA);
69
69
  color: var(--ax-text-neutral);
70
+ text-decoration: none;
71
+ position: relative;
70
72
 
71
73
  &:hover {
72
74
  background: var(--ax-bg-neutral-moderate-hoverA);
73
75
  }
76
+
77
+ &[data-active="true"] {
78
+ &::after {
79
+ content: "";
80
+ position: absolute;
81
+ width: 100%;
82
+ height: 6px;
83
+ bottom: -1px;
84
+ left: 0;
85
+ background-color: var(--ax-border-strong);
86
+
87
+ @media (forced-colors: active) {
88
+ background-color: Highlight;
89
+ }
90
+ }
91
+ }
74
92
  }
75
93
 
76
94
  @media (forced-colors: active) {
package/src/list.css CHANGED
@@ -39,7 +39,6 @@
39
39
 
40
40
  /* SAFARI HACK START */
41
41
 
42
- /* biome-ignore lint/a11y/useGenericFontNames: Hack for targeting Safari */
43
42
  @supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none) {
44
43
  .aksel-list ol {
45
44
  padding-left: 2.1rem;
package/src/listbox.css CHANGED
@@ -1,14 +1,52 @@
1
- .aksel-listbox__options {
2
- padding: var(--ax-space-4);
3
- }
1
+ /* .aksel-listbox__options {} */
4
2
 
5
3
  .aksel-listbox__option {
4
+ position: relative;
6
5
  cursor: default;
7
- border-radius: var(--ax-radius-8);
8
- padding: var(--ax-space-4) var(--ax-space-2);
6
+ padding: var(--ax-space-6) var(--ax-space-4);
9
7
  scroll-margin-block: 4px;
8
+ border-radius: var(--ax-radius-8);
9
+ margin-top: 1px;
10
10
 
11
11
  &[data-virtual-focus="true"] {
12
12
  outline: 2px solid var(--ax-border-focus);
13
+ outline-offset: -2px;
14
+ background-color: var(--ax-bg-neutral-soft);
15
+ }
16
+
17
+ .aksel-listbox__group & {
18
+ padding-inline: var(--ax-space-24);
19
+ }
20
+
21
+ ::before {
22
+ content: "";
23
+ position: absolute;
24
+ top: -1px;
25
+ left: 0;
26
+ width: 100%;
27
+ height: 1px;
28
+ background-color: var(--ax-border-neutral-subtle);
13
29
  }
14
30
  }
31
+
32
+ .aksel-listbox__group-label {
33
+ padding: var(--ax-space-6) var(--ax-space-8);
34
+ position: relative;
35
+
36
+ &:not(:first-of-type)::before {
37
+ content: "";
38
+ position: absolute;
39
+ top: 0;
40
+ left: 0;
41
+ width: 100%;
42
+ height: 1px;
43
+ background-color: var(--ax-border-neutral-subtle);
44
+ }
45
+ }
46
+
47
+ .aksel-listbox__highlight {
48
+ /* background-color: var(--ax-bg-sunken); */
49
+ background: transparent;
50
+ color: var(--ax-text-accent-subtle);
51
+ font-weight: 700;
52
+ }