@navikt/ds-css 8.9.0 → 8.10.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/CHANGELOG.md +30 -0
- package/dist/component/alert.css +9 -0
- package/dist/component/alert.min.css +1 -1
- package/dist/component/button.css +32 -0
- package/dist/component/button.min.css +1 -1
- package/dist/component/date.css +50 -31
- package/dist/component/date.min.css +1 -1
- package/dist/component/form.css +54 -5
- package/dist/component/form.min.css +1 -1
- package/dist/component/skeleton.css +1 -3
- package/dist/component/skeleton.min.css +1 -1
- package/dist/component/table.css +8 -0
- package/dist/component/table.min.css +1 -1
- package/dist/component/timeline.css +20 -2
- package/dist/component/timeline.min.css +1 -1
- package/dist/components.css +174 -41
- package/dist/components.min.css +1 -1
- package/dist/global/tokens.css +1 -1
- package/dist/global/tokens.min.css +1 -1
- package/dist/index.css +175 -42
- package/dist/index.min.css +1 -1
- package/package.json +2 -2
- package/src/alert.css +12 -0
- package/src/button.css +10 -4
- package/src/data-table.css +166 -67
- package/src/data-token-filter.css +74 -0
- package/src/data-toolbar.css +3 -4
- package/src/date.css +54 -27
- package/src/form/fieldset.css +2 -1
- package/src/form/radio-checkbox.css +49 -7
- package/src/primitives/page.css +2 -0
- package/src/skeleton.css +1 -3
- package/src/table.css +6 -0
- package/src/timeline.css +20 -2
package/src/date.css
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
padding: var(--ax-space-16);
|
|
5
5
|
|
|
6
6
|
.rdp-table {
|
|
7
|
-
border-collapse:
|
|
7
|
+
border-collapse: collapse;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.rdp-cell {
|
|
11
|
-
padding:
|
|
11
|
+
padding: 0;
|
|
12
12
|
|
|
13
13
|
&[data-outside="true"] {
|
|
14
14
|
width: var(--__axc-date-button-size);
|
|
@@ -23,18 +23,22 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.rdp-day_range_middle {
|
|
26
|
-
&.rdp-day_disabled {
|
|
26
|
+
&.rdp-day_disabled .rdp-day__inner {
|
|
27
27
|
color: var(--ax-text-neutral);
|
|
28
28
|
background: var(--ax-bg-neutral-moderateA);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
&.rdp-day_selected {
|
|
31
|
+
&.rdp-day_selected .rdp-day__inner {
|
|
32
32
|
background-color: var(--ax-bg-moderate-pressedA);
|
|
33
33
|
box-shadow: inset 0 0 0 1px var(--ax-border-subtleA);
|
|
34
34
|
color: var(--ax-text-neutral);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
.rdp-button.rdp-day__range-hover-middle .rdp-day__inner {
|
|
39
|
+
background-color: var(--ax-bg-moderate-hoverA);
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
.rdp-month,
|
|
39
43
|
&.rdp-month {
|
|
40
44
|
display: grid;
|
|
@@ -52,22 +56,30 @@
|
|
|
52
56
|
|
|
53
57
|
.rdp-button {
|
|
54
58
|
all: unset;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
padding: var(--ax-space-2);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
|
|
62
|
+
& .rdp-day__inner {
|
|
63
|
+
width: var(--__axc-date-button-size);
|
|
64
|
+
height: var(--__axc-date-button-size);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.rdp-day__inner {
|
|
69
|
+
display: grid;
|
|
70
|
+
place-items: center;
|
|
59
71
|
border-radius: var(--ax-radius-8);
|
|
60
72
|
}
|
|
61
73
|
|
|
62
|
-
.rdp-day_range_start {
|
|
74
|
+
.rdp-day_range_start .rdp-day__inner {
|
|
63
75
|
border-radius: 100% var(--ax-radius-12) var(--ax-radius-12) 100%;
|
|
64
76
|
}
|
|
65
77
|
|
|
66
|
-
.rdp-day_range_end:not(.rdp-day_range_start) {
|
|
78
|
+
.rdp-day_range_end:not(.rdp-day_range_start) .rdp-day__inner {
|
|
67
79
|
border-radius: var(--ax-radius-8) 100% 100% var(--ax-radius-8);
|
|
68
80
|
}
|
|
69
81
|
|
|
70
|
-
.rdp-day_range_start.rdp-day_range_end {
|
|
82
|
+
.rdp-day_range_start.rdp-day_range_end .rdp-day__inner {
|
|
71
83
|
border-radius: var(--ax-radius-8);
|
|
72
84
|
}
|
|
73
85
|
|
|
@@ -78,24 +90,23 @@
|
|
|
78
90
|
position: relative;
|
|
79
91
|
}
|
|
80
92
|
|
|
81
|
-
.rdp-day_selected
|
|
82
|
-
.aksel-monthpicker__month--selected {
|
|
93
|
+
.rdp-day_selected .rdp-day__inner {
|
|
83
94
|
color: var(--ax-text-contrast);
|
|
84
95
|
background: var(--ax-bg-strong-pressed);
|
|
85
|
-
cursor: pointer;
|
|
86
96
|
}
|
|
87
97
|
|
|
88
|
-
.rdp-day_disabled {
|
|
98
|
+
.rdp-day_disabled .rdp-day__inner {
|
|
89
99
|
cursor: not-allowed;
|
|
90
|
-
text-decoration: line-through;
|
|
91
100
|
background-color: var(--ax-bg-neutral-moderateA);
|
|
92
101
|
color: var(--ax-text-neutral-subtle);
|
|
102
|
+
opacity: var(--ax-opacity-disabled);
|
|
93
103
|
}
|
|
94
104
|
|
|
95
105
|
.rdp-button:where(:not(.rdp-day_selected, [disabled])):hover,
|
|
96
106
|
.aksel-date__month-button:where(:not(.rdp-day_selected, [disabled])):hover {
|
|
97
|
-
|
|
98
|
-
|
|
107
|
+
.rdp-day__inner {
|
|
108
|
+
background: var(--ax-bg-moderate-hoverA);
|
|
109
|
+
}
|
|
99
110
|
}
|
|
100
111
|
|
|
101
112
|
.rdp-day_today {
|
|
@@ -154,7 +165,7 @@
|
|
|
154
165
|
justify-content: space-between;
|
|
155
166
|
align-items: center;
|
|
156
167
|
gap: var(--ax-space-4);
|
|
157
|
-
padding-inline: var(--ax-space-
|
|
168
|
+
padding-inline: var(--ax-space-2);
|
|
158
169
|
}
|
|
159
170
|
|
|
160
171
|
.aksel-date__caption-button {
|
|
@@ -167,15 +178,17 @@
|
|
|
167
178
|
text-transform: capitalize;
|
|
168
179
|
}
|
|
169
180
|
|
|
170
|
-
/*
|
|
181
|
+
/* MonthPicker */
|
|
171
182
|
.aksel-date__month-button {
|
|
172
183
|
all: unset;
|
|
173
|
-
|
|
174
|
-
width: 3rem;
|
|
175
|
-
height: 3rem;
|
|
176
|
-
text-transform: capitalize;
|
|
177
|
-
border-radius: var(--ax-radius-8);
|
|
184
|
+
padding: var(--ax-space-2);
|
|
178
185
|
cursor: pointer;
|
|
186
|
+
|
|
187
|
+
& .rdp-day__inner {
|
|
188
|
+
width: 3rem;
|
|
189
|
+
height: 3rem;
|
|
190
|
+
text-transform: capitalize;
|
|
191
|
+
}
|
|
179
192
|
}
|
|
180
193
|
|
|
181
194
|
.aksel-date__year-label {
|
|
@@ -190,12 +203,12 @@
|
|
|
190
203
|
|
|
191
204
|
.rdp-cell > button.rdp-day,
|
|
192
205
|
button.aksel-date__month-button {
|
|
193
|
-
&:focus-visible {
|
|
206
|
+
&:focus-visible .rdp-day__inner {
|
|
194
207
|
outline: 3px solid var(--ax-border-focus);
|
|
195
208
|
outline-offset: 3px;
|
|
196
209
|
}
|
|
197
210
|
|
|
198
|
-
&:active:not(:disabled) {
|
|
211
|
+
&:active:not(:disabled) .rdp-day__inner {
|
|
199
212
|
color: var(--ax-text-contrast);
|
|
200
213
|
background-color: var(--ax-bg-strong-pressed);
|
|
201
214
|
}
|
|
@@ -224,6 +237,7 @@
|
|
|
224
237
|
|
|
225
238
|
border-start-start-radius: 0;
|
|
226
239
|
border-end-start-radius: 0;
|
|
240
|
+
position: relative;
|
|
227
241
|
|
|
228
242
|
&:focus-visible {
|
|
229
243
|
outline: 3px solid var(--ax-border-focus);
|
|
@@ -256,6 +270,16 @@
|
|
|
256
270
|
background-color: var(--ax-bg-neutral-moderate);
|
|
257
271
|
color: var(--ax-text-neutral-subtle);
|
|
258
272
|
}
|
|
273
|
+
|
|
274
|
+
/* Syncs button-bg with input while respecting hover/active states */
|
|
275
|
+
&::before {
|
|
276
|
+
content: "";
|
|
277
|
+
position: absolute;
|
|
278
|
+
inset: 0;
|
|
279
|
+
border-radius: inherit;
|
|
280
|
+
background-color: var(--ax-bg-input);
|
|
281
|
+
z-index: -1;
|
|
282
|
+
}
|
|
259
283
|
}
|
|
260
284
|
|
|
261
285
|
.aksel-date__field-wrapper {
|
|
@@ -263,6 +287,9 @@
|
|
|
263
287
|
width: fit-content;
|
|
264
288
|
border-radius: var(--ax-radius-8);
|
|
265
289
|
|
|
290
|
+
/* Initializes stacking context to allow z-index: -1 on button to work. */
|
|
291
|
+
z-index: 0;
|
|
292
|
+
|
|
266
293
|
&:has(.aksel-date__field-input:focus-visible) {
|
|
267
294
|
outline: 3px solid var(--ax-border-focus);
|
|
268
295
|
outline-offset: 3px;
|
package/src/form/fieldset.css
CHANGED
|
@@ -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) */
|
|
@@ -77,6 +92,12 @@
|
|
|
77
92
|
border: var(--__axc-radio-checkbox-marker-border) solid var(--ax-border-neutral);
|
|
78
93
|
border-radius: var(--ax-radius-4);
|
|
79
94
|
position: relative;
|
|
95
|
+
|
|
96
|
+
&[data-standalone="true"]:disabled,
|
|
97
|
+
.aksel-checkbox__input-wrapper[data-standalone="true"] > &:disabled {
|
|
98
|
+
opacity: var(--ax-opacity-disabled);
|
|
99
|
+
cursor: not-allowed;
|
|
100
|
+
}
|
|
80
101
|
}
|
|
81
102
|
|
|
82
103
|
/* Visible marker */
|
|
@@ -93,9 +114,30 @@
|
|
|
93
114
|
);
|
|
94
115
|
}
|
|
95
116
|
|
|
96
|
-
/* Radio marker
|
|
117
|
+
/* Radio marker */
|
|
97
118
|
.aksel-radio__input {
|
|
119
|
+
--__axc-radio-checkbox-marker-size: 1.5rem;
|
|
120
|
+
--__axc-radio-checkbox-marker-target: 2.75rem; /* We want the click area to be a bit larger than the visible radio/checkbox */
|
|
121
|
+
|
|
122
|
+
.aksel-radio--small & {
|
|
123
|
+
--__axc-radio-checkbox-marker-size: 1.25rem;
|
|
124
|
+
--__axc-radio-checkbox-marker-target: 2rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
98
127
|
border-radius: var(--ax-radius-full);
|
|
128
|
+
|
|
129
|
+
&[data-standalone="true"] {
|
|
130
|
+
margin: calc(calc(var(--__axc-radio-checkbox-marker-target) - var(--__axc-radio-checkbox-marker-size)) / 2);
|
|
131
|
+
|
|
132
|
+
&:focus-visible {
|
|
133
|
+
outline: 3px solid var(--ax-border-focus);
|
|
134
|
+
outline-offset: 3px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&[data-compact="true"] {
|
|
139
|
+
--__axc-radio-checkbox-marker-target: 2rem;
|
|
140
|
+
}
|
|
99
141
|
}
|
|
100
142
|
|
|
101
143
|
/* Checkbox indeterminate: Center the icon */
|
package/src/primitives/page.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
min-height: 100vh;
|
|
5
|
+
/* biome-ignore lint/suspicious/noDuplicateProperties: vh is fallback for browsers that do not support lvh */
|
|
5
6
|
min-height: 100lvh;
|
|
6
7
|
}
|
|
7
8
|
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
|
|
20
21
|
.aksel-page__content--fullheight {
|
|
21
22
|
min-height: 100vh;
|
|
23
|
+
/* biome-ignore lint/suspicious/noDuplicateProperties: vh is fallback for browsers that do not support lvh */
|
|
22
24
|
min-height: 100lvh;
|
|
23
25
|
}
|
|
24
26
|
|
package/src/skeleton.css
CHANGED
package/src/table.css
CHANGED
|
@@ -278,6 +278,12 @@
|
|
|
278
278
|
border-bottom: 1px solid var(--ax-border-neutral-subtleA);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
+
.aksel-table__expandable-row {
|
|
282
|
+
&:has(+ .aksel-table__expanded-row[data-state="closed"] + .aksel-table__row--selected) > :is(th, td) {
|
|
283
|
+
border-color: var(--ax-border-default);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
281
287
|
.aksel-table__expanded-row {
|
|
282
288
|
&:has(+ .aksel-table__row--selected) {
|
|
283
289
|
& .aksel-table__expanded-row-collapse {
|
package/src/timeline.css
CHANGED
|
@@ -41,6 +41,17 @@
|
|
|
41
41
|
background: var(--ax-bg-neutral-softA);
|
|
42
42
|
margin: var(--ax-space-16) 0;
|
|
43
43
|
grid-column: 2;
|
|
44
|
+
|
|
45
|
+
&:focus {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (forced-colors: active) {
|
|
50
|
+
&:focus {
|
|
51
|
+
outline: 1px solid highlight;
|
|
52
|
+
outline-offset: -1px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
44
55
|
}
|
|
45
56
|
|
|
46
57
|
.aksel-timeline__row--active {
|
|
@@ -73,6 +84,7 @@
|
|
|
73
84
|
}
|
|
74
85
|
|
|
75
86
|
.aksel-timeline__period {
|
|
87
|
+
container-type: inline-size;
|
|
76
88
|
height: 100%;
|
|
77
89
|
border-radius: var(--ax-radius-full);
|
|
78
90
|
position: absolute;
|
|
@@ -98,7 +110,7 @@
|
|
|
98
110
|
}
|
|
99
111
|
|
|
100
112
|
.aksel-timeline__period--inner {
|
|
101
|
-
margin: 0 var(--ax-space-8);
|
|
113
|
+
margin: 0 clamp(var(--ax-space-4), 17cqi, var(--ax-space-8));
|
|
102
114
|
overflow: hidden;
|
|
103
115
|
white-space: nowrap;
|
|
104
116
|
text-overflow: clip;
|
|
@@ -108,7 +120,13 @@
|
|
|
108
120
|
}
|
|
109
121
|
|
|
110
122
|
.aksel-timeline__period--inner svg {
|
|
111
|
-
flex-shrink:
|
|
123
|
+
flex-shrink: 1;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@container (inline-size < 1.4rem) {
|
|
127
|
+
.aksel-timeline__period--inner {
|
|
128
|
+
margin: 0 10cqi;
|
|
129
|
+
}
|
|
112
130
|
}
|
|
113
131
|
|
|
114
132
|
.aksel-timeline__period--clickable {
|