@navikt/ds-css 8.9.0 → 8.9.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.9.0",
3
+ "version": "8.9.1",
4
4
  "description": "CSS for Nav Designsystem",
5
5
  "author": "Aksel | Nav designsystem team",
6
6
  "keywords": [
@@ -30,7 +30,7 @@
30
30
  "css:get-version": "node config/get-version.js"
31
31
  },
32
32
  "devDependencies": {
33
- "@navikt/ds-tokens": "^8.9.0",
33
+ "@navikt/ds-tokens": "^8.9.1",
34
34
  "browserslist": "^4.25.0",
35
35
  "esbuild": "^0.27.4",
36
36
  "fast-glob": "3.3.3",
package/src/button.css CHANGED
@@ -44,7 +44,9 @@
44
44
  background-color: transparent;
45
45
  color: var(--ax-text-subtle);
46
46
 
47
- &[data-color="neutral"] {
47
+ &[data-color="neutral"],
48
+ [data-color="neutral"] > &:not([data-color]),
49
+ [data-color="neutral"] :not([data-color]) &:not([data-color]) {
48
50
  color: var(--ax-text-default);
49
51
  }
50
52
 
@@ -62,7 +64,8 @@
62
64
  color: var(--ax-text-subtle);
63
65
  background-color: transparent;
64
66
 
65
- &[data-color="neutral"] {
67
+ &[data-color="neutral"],
68
+ [data-color="neutral"] > &:not([data-color]) {
66
69
  color: var(--ax-text-default);
67
70
  }
68
71
  }
@@ -72,7 +75,9 @@
72
75
  background-color: transparent;
73
76
  color: var(--ax-text-subtle);
74
77
 
75
- &[data-color="neutral"] {
78
+ &[data-color="neutral"],
79
+ [data-color="neutral"] > &:not([data-color], [data-pressed="true"]),
80
+ [data-color="neutral"] :not([data-color]) &:not([data-color], [data-pressed="true"]) {
76
81
  color: var(--ax-text-default);
77
82
  }
78
83
 
@@ -93,7 +98,8 @@
93
98
  color: var(--ax-text-subtle);
94
99
  background-color: transparent;
95
100
 
96
- &[data-color="neutral"] {
101
+ &[data-color="neutral"],
102
+ [data-color="neutral"] > &:not([data-color]) {
97
103
  color: var(--ax-text-default);
98
104
  }
99
105
  }
@@ -50,7 +50,7 @@
50
50
  }
51
51
 
52
52
  &[data-truncate-content="true"] {
53
- .aksel-data-table__td > div {
53
+ .aksel-data-table__td:not(.aksel-data-table--UNSAFE_isSelection) > div {
54
54
  text-overflow: ellipsis;
55
55
  white-space: nowrap;
56
56
  overflow: hidden;
@@ -306,7 +306,7 @@
306
306
  vertical-align: middle;
307
307
  color: var(--ax-text-neutral-subtle);
308
308
 
309
- > div {
309
+ &:not(.aksel-data-table--UNSAFE_isSelection) > div {
310
310
  padding-block: var(--__axc-data-table-density);
311
311
  padding-inline: 1rem;
312
312
  }
@@ -323,6 +323,11 @@
323
323
  outline: 2px solid var(--ax-border-focus);
324
324
  outline-offset: -4px;
325
325
  }
326
+
327
+ &.aksel-data-table--UNSAFE_isSelection > div {
328
+ display: grid;
329
+ place-content: center;
330
+ }
326
331
  }
327
332
 
328
333
  .aksel-data-table__tfoot {
@@ -1,3 +1,8 @@
1
+ /* .aksel-property-filter {
2
+ flex: 1 1 fit-content;
3
+ max-inline-size: 100%;
4
+ } */
5
+
1
6
  .aksel-property-filter__popup {
2
7
  overflow: hidden;
3
8
  border-radius: var(--ax-radius-8);
@@ -29,3 +34,72 @@
29
34
  /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
30
35
  max-height: calc(var(--__axc-floating-available-height) - 4px);
31
36
  }
37
+
38
+ .aksel-property-filter__input {
39
+ max-inline-size: 640px;
40
+ }
41
+
42
+ .aksel-property-filter__chips {
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+ gap: var(--ax-space-8);
46
+ margin: 0;
47
+ margin-block-start: var(--ax-space-12);
48
+ padding: 0;
49
+ font-size: var(--ax-font-size-medium);
50
+ }
51
+
52
+ .aksel-property-filter__chip {
53
+ display: flex;
54
+ gap: var(--ax-space-1);
55
+ }
56
+
57
+ .aksel-property-filter__chip-button {
58
+ display: flex;
59
+ align-items: center;
60
+ gap: var(--ax-space-4);
61
+ padding: var(--ax-space-4) var(--ax-space-8);
62
+ background-color: var(--ax-bg-strong);
63
+ color: var(--ax-text-contrast);
64
+ border: none;
65
+ cursor: pointer;
66
+
67
+ &:hover {
68
+ background-color: var(--ax-bg-strong-hover);
69
+ }
70
+
71
+ &:active {
72
+ background-color: var(--ax-bg-strong-pressed);
73
+ }
74
+
75
+ &:focus-visible {
76
+ outline: 3px solid var(--ax-border-focus);
77
+ outline-offset: 2px;
78
+ z-index: 1;
79
+ }
80
+
81
+ &:first-of-type {
82
+ border-start-start-radius: var(--ax-radius-8);
83
+ border-end-start-radius: var(--ax-radius-8);
84
+ }
85
+
86
+ &:last-child {
87
+ border-start-end-radius: var(--ax-radius-8);
88
+ border-end-end-radius: var(--ax-radius-8);
89
+ }
90
+
91
+ &[data-type="operation"] {
92
+ /* background-color: var(--ax-bg-default);
93
+ box-shadow: inset 0 0 0 1px var(--ax-bg-strong);
94
+ color: var(--ax-text-default); */
95
+ color: var(--ax-text-neutral);
96
+ background-color: var(--ax-bg-neutral-moderate-pressed);
97
+ }
98
+
99
+ /* &[data-type="value"] {
100
+ } */
101
+
102
+ &[data-type="remove"] {
103
+ padding-inline: var(--ax-space-4);
104
+ }
105
+ }
@@ -1,9 +1,8 @@
1
1
  .aksel-data-toolbar {
2
2
  display: flex;
3
3
  flex-wrap: wrap;
4
- align-items: center;
4
+ align-items: flex-end;
5
5
  gap: var(--ax-space-8);
6
- grid-template-columns: 1fr 1fr;
7
6
  }
8
7
 
9
8
  .aksel-data-toolbar__actions {
@@ -19,8 +18,8 @@
19
18
  }
20
19
 
21
20
  .aksel-data-toolbar__input {
22
- max-inline-size: 600px;
23
- width: 100%;
21
+ flex: 1 1 fit-content;
22
+ max-inline-size: 100%;
24
23
  }
25
24
 
26
25
  .aksel-data-toolbar__pagination {
package/src/date.css CHANGED
@@ -224,6 +224,7 @@
224
224
 
225
225
  border-start-start-radius: 0;
226
226
  border-end-start-radius: 0;
227
+ position: relative;
227
228
 
228
229
  &:focus-visible {
229
230
  outline: 3px solid var(--ax-border-focus);
@@ -256,6 +257,16 @@
256
257
  background-color: var(--ax-bg-neutral-moderate);
257
258
  color: var(--ax-text-neutral-subtle);
258
259
  }
260
+
261
+ /* Syncs button-bg with input while respecting hover/active states */
262
+ &::before {
263
+ content: "";
264
+ position: absolute;
265
+ inset: 0;
266
+ border-radius: inherit;
267
+ background-color: var(--ax-bg-input);
268
+ z-index: -1;
269
+ }
259
270
  }
260
271
 
261
272
  .aksel-date__field-wrapper {
@@ -263,6 +274,9 @@
263
274
  width: fit-content;
264
275
  border-radius: var(--ax-radius-8);
265
276
 
277
+ /* Initializes stacking context to allow z-index: -1 on button to work. */
278
+ z-index: 0;
279
+
266
280
  &:has(.aksel-date__field-input:focus-visible) {
267
281
  outline: 3px solid var(--ax-border-focus);
268
282
  outline-offset: 3px;
@@ -18,7 +18,8 @@
18
18
  }
19
19
 
20
20
  /* Applied when hideLegend is applied to fieldset */
21
- .aksel-fieldset > .aksel-sr-only + :not(:first-child, :empty) {
21
+ .aksel-fieldset > .aksel-sr-only + :not(:first-child, :empty),
22
+ .aksel-fieldset > .aksel-typo--visually-hidden + :not(:first-child, :empty) {
22
23
  margin-top: 0;
23
24
  }
24
25
 
@@ -1,8 +1,5 @@
1
1
  .aksel-checkbox,
2
2
  .aksel-radio {
3
- --__axc-radio-checkbox-marker-size: 1.5rem;
4
- --__axc-radio-checkbox-marker-target: 2.75rem; /* We want the click area to be a bit larger than the visible radio/checkbox */
5
-
6
3
  position: relative;
7
4
  width: fit-content;
8
5
  display: grid;
@@ -25,9 +22,6 @@
25
22
  /* Small */
26
23
  .aksel-checkbox--small,
27
24
  .aksel-radio--small {
28
- --__axc-radio-checkbox-marker-size: 1.25rem;
29
- --__axc-radio-checkbox-marker-target: 2rem;
30
-
31
25
  padding: var(--ax-space-6) 0;
32
26
 
33
27
  /* Focus outline */
@@ -58,8 +52,29 @@
58
52
 
59
53
  /* Checkbox has a wrapper around input and checkmark svg (consider creating the checkmark with css in the future) */
60
54
  .aksel-checkbox__input-wrapper {
55
+ --__axc-radio-checkbox-marker-size: 1.5rem;
56
+ --__axc-radio-checkbox-marker-target: 2.75rem; /* We want the click area to be a bit larger than the visible radio/checkbox */
57
+
61
58
  position: relative;
62
59
  height: var(--__axc-radio-checkbox-marker-size);
60
+
61
+ .aksel-checkbox--small & {
62
+ --__axc-radio-checkbox-marker-size: 1.25rem;
63
+ --__axc-radio-checkbox-marker-target: 2rem;
64
+ }
65
+
66
+ &[data-standalone="true"] {
67
+ margin: calc(calc(var(--__axc-radio-checkbox-marker-target) - var(--__axc-radio-checkbox-marker-size)) / 2);
68
+ }
69
+
70
+ &[data-standalone="true"] > .aksel-checkbox__input:focus-visible {
71
+ outline: 3px solid var(--ax-border-focus);
72
+ outline-offset: 3px;
73
+ }
74
+
75
+ &[data-compact="true"] {
76
+ --__axc-radio-checkbox-marker-target: 2rem;
77
+ }
63
78
  }
64
79
 
65
80
  /* The input acts as a container for the marker (since the click area should be larger than the visible marker) */
@@ -93,9 +108,30 @@
93
108
  );
94
109
  }
95
110
 
96
- /* Radio marker should be round */
111
+ /* Radio marker */
97
112
  .aksel-radio__input {
113
+ --__axc-radio-checkbox-marker-size: 1.5rem;
114
+ --__axc-radio-checkbox-marker-target: 2.75rem; /* We want the click area to be a bit larger than the visible radio/checkbox */
115
+
116
+ .aksel-radio--small & {
117
+ --__axc-radio-checkbox-marker-size: 1.25rem;
118
+ --__axc-radio-checkbox-marker-target: 2rem;
119
+ }
120
+
98
121
  border-radius: var(--ax-radius-full);
122
+
123
+ &[data-standalone="true"] {
124
+ margin: calc(calc(var(--__axc-radio-checkbox-marker-target) - var(--__axc-radio-checkbox-marker-size)) / 2);
125
+
126
+ &:focus-visible {
127
+ outline: 3px solid var(--ax-border-focus);
128
+ outline-offset: 3px;
129
+ }
130
+ }
131
+
132
+ &[data-compact="true"] {
133
+ --__axc-radio-checkbox-marker-target: 2rem;
134
+ }
99
135
  }
100
136
 
101
137
  /* Checkbox indeterminate: Center the icon */