@navikt/ds-css 8.5.2 → 8.7.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 +14 -0
- package/dist/component/date.css +25 -4
- package/dist/component/date.min.css +1 -1
- package/dist/component/inlinemessage.css +2 -1
- package/dist/component/inlinemessage.min.css +1 -1
- package/dist/components.css +27 -5
- 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 +28 -6
- package/dist/index.min.css +1 -1
- package/package.json +2 -2
- package/src/data-table.css +136 -1
- package/src/data-token-filter.css +36 -0
- package/src/date.css +24 -3
- package/src/inline-message.css +2 -1
- package/src/listbox.css +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-css",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.0",
|
|
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.
|
|
33
|
+
"@navikt/ds-tokens": "^8.7.0",
|
|
34
34
|
"browserslist": "^4.25.0",
|
|
35
35
|
"esbuild": "^0.27.2",
|
|
36
36
|
"fast-glob": "3.3.3",
|
package/src/data-table.css
CHANGED
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
&[data-layout="fixed"] {
|
|
25
25
|
table-layout: fixed;
|
|
26
26
|
width: 1px; /* This is for some reason needed to make the browser respect the column width. TODO: Test in all browsers */
|
|
27
|
+
|
|
28
|
+
/* TODO: review side-effects from this hack */
|
|
29
|
+
min-width: 100%;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
&[data-layout="auto"] {
|
|
@@ -125,6 +128,49 @@
|
|
|
125
128
|
color: var(--ax-text-neutral);
|
|
126
129
|
padding: var(--ax-space-8) var(--ax-space-16);
|
|
127
130
|
text-align: start;
|
|
131
|
+
|
|
132
|
+
&[data-sortable="true"] {
|
|
133
|
+
padding: 0;
|
|
134
|
+
block-size: 2rem;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.aksel-data-table__th-sort-button {
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: var(--ax-space-2);
|
|
142
|
+
padding-inline-start: var(--ax-space-16);
|
|
143
|
+
block-size: 2rem;
|
|
144
|
+
width: 100%;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
text-align: start;
|
|
147
|
+
background-color: transparent;
|
|
148
|
+
border: none;
|
|
149
|
+
|
|
150
|
+
&:hover {
|
|
151
|
+
background-color: var(--ax-bg-neutral-moderate-hover);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&:active {
|
|
155
|
+
background-color: var(--ax-bg-neutral-moderate-pressed);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&:focus-visible {
|
|
159
|
+
outline: 2px solid var(--ax-border-focus);
|
|
160
|
+
outline-offset: -2px;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.aksel-data-table__th-sort-icon {
|
|
165
|
+
flex-shrink: 0;
|
|
166
|
+
|
|
167
|
+
&[data-sort-direction="none"] {
|
|
168
|
+
display: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.aksel-data-table__th-sort-button:is(:hover, :focus-visible, :focus-within) & {
|
|
172
|
+
display: block;
|
|
173
|
+
}
|
|
128
174
|
}
|
|
129
175
|
|
|
130
176
|
.aksel-data-table__th-content {
|
|
@@ -147,6 +193,12 @@
|
|
|
147
193
|
inset-inline-end: -10px;
|
|
148
194
|
width: 19px; /* TODO: Violation of WCAG SC 2.5.8 Target Size? https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html */
|
|
149
195
|
|
|
196
|
+
&:focus-visible {
|
|
197
|
+
outline: 3px solid var(--ax-border-focus);
|
|
198
|
+
outline-offset: -3px;
|
|
199
|
+
border-radius: var(--ax-radius-8);
|
|
200
|
+
}
|
|
201
|
+
|
|
150
202
|
&::after {
|
|
151
203
|
content: "";
|
|
152
204
|
position: absolute;
|
|
@@ -159,7 +211,8 @@
|
|
|
159
211
|
background: var(--ax-bg-strong);
|
|
160
212
|
}
|
|
161
213
|
|
|
162
|
-
&:active::after
|
|
214
|
+
&:active::after,
|
|
215
|
+
&:focus::after {
|
|
163
216
|
background: var(--ax-bg-strong-pressed);
|
|
164
217
|
}
|
|
165
218
|
|
|
@@ -171,6 +224,34 @@
|
|
|
171
224
|
inset-inline-end: 0;
|
|
172
225
|
}
|
|
173
226
|
}
|
|
227
|
+
|
|
228
|
+
&[data-active="true"] {
|
|
229
|
+
.aksel-data-table__th-resize-handle-indicator {
|
|
230
|
+
position: absolute;
|
|
231
|
+
top: 50%;
|
|
232
|
+
color: var(--ax-bg-strong);
|
|
233
|
+
transform: translateY(-50%);
|
|
234
|
+
height: 1.5rem;
|
|
235
|
+
|
|
236
|
+
&.aksel-data-table__th-resize-handle-indicator--start {
|
|
237
|
+
right: 12px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&.aksel-data-table__th-resize-handle-indicator--end {
|
|
241
|
+
left: 12px;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&::after {
|
|
246
|
+
background: var(--ax-bg-strong);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&:focus-visible,
|
|
250
|
+
&:focus,
|
|
251
|
+
&:active {
|
|
252
|
+
outline: none;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
174
255
|
}
|
|
175
256
|
|
|
176
257
|
.aksel-data-table__th-action-button {
|
|
@@ -218,3 +299,57 @@
|
|
|
218
299
|
.aksel-data-table__tfoot {
|
|
219
300
|
background-color: var(--ax-bg-raised);
|
|
220
301
|
}
|
|
302
|
+
|
|
303
|
+
.aksel-data-table__filler-cell {
|
|
304
|
+
width: auto;
|
|
305
|
+
display: table-cell;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.aksel-data-table__drag-and-drop-item {
|
|
309
|
+
&[data-dragging="true"] {
|
|
310
|
+
background: var(--ax-bg-default);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&[data-mouse-dragging="true"]:not(:active) {
|
|
314
|
+
opacity: 0.8;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
&[data-keyboard-dragging="true"] {
|
|
318
|
+
.aksel-data-table__drag-and-drop-item-drag-handler {
|
|
319
|
+
outline: 2px solid var(--ax-border-focus);
|
|
320
|
+
outline-offset: -1px;
|
|
321
|
+
border-radius: var(--ax-radius-8);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&[data-drop-target="true"] {
|
|
326
|
+
background: var(--ax-bg-neutral-moderate);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.aksel-data-table__drag-and-drop-item-drag-handler {
|
|
331
|
+
cursor: grab;
|
|
332
|
+
height: 1.5rem;
|
|
333
|
+
position: relative;
|
|
334
|
+
|
|
335
|
+
&:focus-visible {
|
|
336
|
+
outline: 2px solid var(--ax-border-focus);
|
|
337
|
+
outline-offset: -1px;
|
|
338
|
+
border-radius: var(--ax-radius-8);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.aksel-data-table__drag-and-drop-item-keyboard-drag-icon {
|
|
343
|
+
position: absolute;
|
|
344
|
+
left: 50%;
|
|
345
|
+
transform: translate(-50%, -50%);
|
|
346
|
+
height: 1.2rem;
|
|
347
|
+
|
|
348
|
+
&[data-direction="up"] {
|
|
349
|
+
top: -10px;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
&[data-direction="down"] {
|
|
353
|
+
bottom: -29px;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.aksel-property-filter__popup {
|
|
2
|
+
overflow: hidden;
|
|
3
|
+
border-radius: var(--ax-radius-12);
|
|
4
|
+
border: 1px solid var(--ax-border-neutral-subtleA);
|
|
5
|
+
box-shadow: var(--ax-shadow-dialog);
|
|
6
|
+
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
|
7
|
+
transform-origin: var(--__axc-floating-transform-origin);
|
|
8
|
+
transition:
|
|
9
|
+
transform 150ms ease allow-discrete,
|
|
10
|
+
opacity 150ms ease allow-discrete;
|
|
11
|
+
|
|
12
|
+
@starting-style {
|
|
13
|
+
opacity: 0.8;
|
|
14
|
+
transform: scale3d(0.94, 0.94, 0.94);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
min-width: 260px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.aksel-property-filter__popup-inner {
|
|
21
|
+
--__axc-token-filter-content-p: var(--ax-space-8);
|
|
22
|
+
--__axc-token-filter-item-pr: var(--ax-space-8);
|
|
23
|
+
--__axc-token-filter-item-pl: var(--ax-space-8);
|
|
24
|
+
--__axc-token-filter-item-height: 2rem;
|
|
25
|
+
|
|
26
|
+
border-radius: var(--ax-radius-12);
|
|
27
|
+
background-color: var(--ax-bg-raised);
|
|
28
|
+
min-width: 128px;
|
|
29
|
+
max-width: min(95vw, 640px);
|
|
30
|
+
animation-duration: 160ms;
|
|
31
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
32
|
+
padding: var(--__axc-token-filter-content-p);
|
|
33
|
+
overflow: auto;
|
|
34
|
+
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
|
|
35
|
+
max-height: calc(var(--__axc-floating-available-height) - 4px);
|
|
36
|
+
}
|
package/src/date.css
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
.aksel-date {
|
|
2
|
+
--__axc-date-button-size: 2.5rem;
|
|
3
|
+
|
|
2
4
|
padding: var(--ax-space-16);
|
|
3
5
|
|
|
4
6
|
.rdp-table {
|
|
@@ -7,6 +9,17 @@
|
|
|
7
9
|
|
|
8
10
|
.rdp-cell {
|
|
9
11
|
padding: 1px; /* Some CSS-resets sets padding:0 on all items */
|
|
12
|
+
|
|
13
|
+
&[data-outside="true"] {
|
|
14
|
+
width: var(--__axc-date-button-size);
|
|
15
|
+
height: var(--__axc-date-button-size);
|
|
16
|
+
|
|
17
|
+
/* Padding is ignored when element is empty */
|
|
18
|
+
&:empty {
|
|
19
|
+
width: calc(var(--__axc-date-button-size) + 2px);
|
|
20
|
+
height: calc(var(--__axc-date-button-size) + 2px);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
10
23
|
}
|
|
11
24
|
|
|
12
25
|
.rdp-day_range_middle {
|
|
@@ -40,8 +53,8 @@
|
|
|
40
53
|
.rdp-button {
|
|
41
54
|
all: unset;
|
|
42
55
|
display: block;
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
56
|
+
width: var(--__axc-date-button-size);
|
|
57
|
+
height: var(--__axc-date-button-size);
|
|
45
58
|
text-align: center;
|
|
46
59
|
border-radius: var(--ax-radius-8);
|
|
47
60
|
}
|
|
@@ -129,6 +142,13 @@
|
|
|
129
142
|
}
|
|
130
143
|
}
|
|
131
144
|
|
|
145
|
+
.aksel-date__popover {
|
|
146
|
+
&:focus-visible {
|
|
147
|
+
outline: 3px solid var(--ax-border-focus);
|
|
148
|
+
outline-offset: 3px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
132
152
|
.aksel-date__caption {
|
|
133
153
|
display: flex;
|
|
134
154
|
justify-content: space-between;
|
|
@@ -272,6 +292,8 @@
|
|
|
272
292
|
|
|
273
293
|
@media (min-width: 480px) {
|
|
274
294
|
.aksel-date {
|
|
295
|
+
--__axc-date-button-size: 3rem;
|
|
296
|
+
|
|
275
297
|
padding: var(--ax-space-20);
|
|
276
298
|
}
|
|
277
299
|
|
|
@@ -283,7 +305,6 @@
|
|
|
283
305
|
gap: var(--ax-space-8);
|
|
284
306
|
}
|
|
285
307
|
|
|
286
|
-
.aksel-date .rdp-button,
|
|
287
308
|
.aksel-date__caption-button {
|
|
288
309
|
width: 3rem;
|
|
289
310
|
height: 3rem;
|
package/src/inline-message.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.aksel-inline-message {
|
|
2
2
|
display: flex;
|
|
3
|
-
gap: var(--ax-space-
|
|
3
|
+
gap: var(--ax-space-8);
|
|
4
4
|
color: var(--ax-text-default);
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
color: var(--ax-text-subtle);
|
|
9
9
|
font-size: 1.5rem;
|
|
10
10
|
flex: 0 0 auto;
|
|
11
|
+
margin-block-start: var(--ax-space-2);
|
|
11
12
|
|
|
12
13
|
.aksel-inline-message[data-size="small"] & {
|
|
13
14
|
font-size: 1.25rem;
|
package/src/listbox.css
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.aksel-listbox__list {
|
|
2
|
+
padding: var(--ax-space-4);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.aksel-listbox__item {
|
|
6
|
+
cursor: default;
|
|
7
|
+
border-radius: var(--ax-radius-8);
|
|
8
|
+
padding: var(--ax-space-4) var(--ax-space-2);
|
|
9
|
+
scroll-margin-block: 4px;
|
|
10
|
+
|
|
11
|
+
&[data-virtual-focus="true"] {
|
|
12
|
+
outline: 2px solid var(--ax-border-focus);
|
|
13
|
+
}
|
|
14
|
+
}
|