@arbeidstilsynet/design-css 0.11.0 → 0.12.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.
@@ -5,6 +5,7 @@
5
5
  .at-lightdarkimage-dark {
6
6
  display: none;
7
7
  }
8
+
8
9
  @media (prefers-color-scheme: dark) {
9
10
  .at-lightdarkimage-light {
10
11
  display: none;
@@ -13,6 +14,7 @@
13
14
  display: revert;
14
15
  }
15
16
  }
17
+
16
18
  /* Explicit light mode */
17
19
  [data-color-scheme="light"] .at-lightdarkimage-light {
18
20
  display: revert;
@@ -20,6 +22,7 @@
20
22
  [data-color-scheme="light"] .at-lightdarkimage-dark {
21
23
  display: none;
22
24
  }
25
+
23
26
  /* Explicit dark mode */
24
27
  [data-color-scheme="dark"] .at-lightdarkimage-light {
25
28
  display: none;
@@ -27,6 +30,7 @@
27
30
  [data-color-scheme="dark"] .at-lightdarkimage-dark {
28
31
  display: revert;
29
32
  }
33
+
30
34
  /* Auto mode - follows system preference */
31
35
  [data-color-scheme="auto"] .at-lightdarkimage-light {
32
36
  display: revert;
@@ -34,6 +38,7 @@
34
38
  [data-color-scheme="auto"] .at-lightdarkimage-dark {
35
39
  display: none;
36
40
  }
41
+
37
42
  @media (prefers-color-scheme: dark) {
38
43
  [data-color-scheme="auto"] .at-lightdarkimage-light {
39
44
  display: none;
@@ -26,7 +26,6 @@
26
26
  padding: 0;
27
27
  text-align: center;
28
28
  }
29
-
30
29
  .at-steps:not([hidden]) {
31
30
  display: flex;
32
31
  gap: var(--at-steps-gap);
@@ -51,7 +50,6 @@
51
50
  /*
52
51
  * Line
53
52
  */
54
-
55
53
  .at-steps__step::before,
56
54
  .at-steps__step::after {
57
55
  content: "";
@@ -61,11 +59,9 @@
61
59
  position: absolute;
62
60
  translate: 0 -50%;
63
61
  }
64
-
65
62
  .at-steps__step::before {
66
63
  background: linear-gradient(to right, transparent, var(--dot-before));
67
64
  }
68
-
69
65
  .at-steps__step::after {
70
66
  background: linear-gradient(to right, var(--dot-after), transparent);
71
67
  inset-inline: 50% -50%;
@@ -74,7 +70,6 @@
74
70
  .at-steps__step:first-child::before {
75
71
  left: 0;
76
72
  }
77
-
78
73
  .at-steps__step:last-child::after {
79
74
  right: 0;
80
75
  }
@@ -82,7 +77,6 @@
82
77
  /*
83
78
  * Dot
84
79
  */
85
-
86
80
  .at-steps__step-mark {
87
81
  background: var(--dot-fill);
88
82
  border-radius: var(--ds-border-radius-full);
@@ -98,11 +92,9 @@
98
92
  width: var(--at-steps-dot-size);
99
93
  z-index: 2; /* Place above line */
100
94
  }
101
-
102
95
  .at-steps__step-mark:not([hidden]) {
103
96
  display: grid;
104
97
  }
105
-
106
98
  .at-steps__step-mark > svg,
107
99
  .at-steps__step-mark:empty::before {
108
100
  display: block;
@@ -116,7 +108,6 @@
116
108
  width: calc(var(--at-steps-dot-size) * 18 / 28);
117
109
  height: calc(var(--at-steps-dot-size) * 18 / 28);
118
110
  }
119
-
120
111
  .at-steps__step-mark:empty::before {
121
112
  background: currentColor;
122
113
  content: "";
@@ -127,7 +118,6 @@
127
118
  /*
128
119
  * Interaction
129
120
  */
130
-
131
121
  .at-steps__step > :is(a, button):not([hidden]):only-child {
132
122
  background: none;
133
123
  border-radius: inherit;
@@ -143,14 +133,12 @@
143
133
  text-decoration: none;
144
134
  width: 100%;
145
135
  }
146
-
147
136
  .at-steps__step > :is(a, button):only-child:focus-visible {
148
137
  background: var(--ds-color-surface-tinted);
149
138
  box-shadow: var(--dsc-focus-boxShadow);
150
139
  outline: var(--dsc-focus-outline);
151
140
  outline-offset: var(--ds-border-width-focus);
152
141
  }
153
-
154
142
  .at-steps__step
155
143
  > :is(a, button):only-child:hover:not(:active)
156
144
  .at-steps__step-mark {
@@ -160,11 +148,9 @@
160
148
  /*
161
149
  * States
162
150
  */
163
-
164
151
  .at-steps:not([data-direction="up"]) > .at-steps__step[aria-current="step"] {
165
152
  z-index: 1; /* Let lines from other steps enter the current one */
166
153
  }
167
-
168
154
  .at-steps:not([data-direction="up"]) > .at-steps__step[aria-current="step"],
169
155
  .at-steps:not([data-direction="up"])
170
156
  > .at-steps__step:has(~ .at-steps__step[aria-current="step"]),
@@ -173,7 +159,6 @@
173
159
  .at-steps[data-state="complete"] > .at-steps__step {
174
160
  --dot-before: var(--at-steps-line-active);
175
161
  }
176
-
177
162
  .at-steps:not([data-direction="up"])
178
163
  > .at-steps__step:has(~ .at-steps__step[aria-current="step"]),
179
164
  .at-steps[data-direction="up"]
@@ -184,7 +169,6 @@
184
169
  .at-steps[data-state="complete"] > .at-steps__step {
185
170
  --dot-after: var(--at-steps-line-active);
186
171
  }
187
-
188
172
  /*
189
173
  * The current step's mark gets an extra ring detached from the dot by a
190
174
  * genuinely transparent gap. `outline` + `outline-offset` draws the ring
@@ -192,7 +176,6 @@
192
176
  * background shows through (unlike a box-shadow gap, which can only fake it
193
177
  * with a solid color).
194
178
  */
195
-
196
179
  .at-steps__step[aria-current="step"] .at-steps__step-mark {
197
180
  outline: var(--at-steps-stroke-size) solid var(--dot-fill);
198
181
  outline-offset: var(--at-steps-stroke-size);
@@ -203,7 +186,6 @@
203
186
  * outer edge of the ring instead of letting them run under the transparent gap
204
187
  * to the dot. Horizontal layouts — vertical is handled in the direction section.
205
188
  */
206
-
207
189
  .at-steps:not([data-direction]) > .at-steps__step[aria-current="step"]::before,
208
190
  .at-steps[data-direction="right"]
209
191
  > .at-steps__step[aria-current="step"]::before {
@@ -211,7 +193,6 @@
211
193
  var(--at-steps-dot-size) / 2 + var(--at-steps-stroke-size) * 2
212
194
  );
213
195
  }
214
-
215
196
  .at-steps:not([data-direction]) > .at-steps__step[aria-current="step"]::after,
216
197
  .at-steps[data-direction="right"]
217
198
  > .at-steps__step[aria-current="step"]::after {
@@ -241,12 +222,10 @@
241
222
  --dot-text: var(--ds-color-base-contrast-default);
242
223
  --dot-fill: var(--ds-color-base-default);
243
224
  }
244
-
245
225
  .at-steps__step-mark[data-color="danger"],
246
226
  .at-steps__step-mark[data-color="warning"] {
247
227
  --dot-icon: var(--at-steps-icon-close);
248
228
  }
249
-
250
229
  .at-steps__step-mark[data-color="info"] {
251
230
  --dot-icon: var(--at-steps-icon-info);
252
231
  }
@@ -256,7 +235,6 @@
256
235
  * The four [data-state] attribute selectors give (0,5,0), matching the
257
236
  * :has()-based auto-complete rule; placement after it wins by cascade order.
258
237
  */
259
-
260
238
  .at-steps__step[data-state][data-state][data-state][data-state="incomplete"] {
261
239
  --dot-before: var(--at-steps-line-faint);
262
240
  --dot-after: var(--at-steps-line-faint);
@@ -268,7 +246,6 @@
268
246
  /*
269
247
  * Fade
270
248
  */
271
-
272
249
  .at-steps:is(
273
250
  :not([data-fade]),
274
251
  [data-fade="none"],
@@ -278,7 +255,6 @@
278
255
  > .at-steps__step:first-child::before {
279
256
  display: none;
280
257
  }
281
-
282
258
  .at-steps:is(
283
259
  :not([data-fade]),
284
260
  [data-fade="none"],
@@ -292,7 +268,6 @@
292
268
  /*
293
269
  * Vertical
294
270
  */
295
-
296
271
  .at-steps[data-direction]:not([data-direction="right"]) {
297
272
  flex-wrap: wrap;
298
273
  text-align: left;
@@ -300,7 +275,6 @@
300
275
  --at-steps-gap: var(--ds-size-5);
301
276
  gap: var(--at-steps-gap);
302
277
  }
303
-
304
278
  .at-steps[data-direction]:not([data-direction="right"]) > .at-steps__step {
305
279
  flex: 1 0 100%;
306
280
  min-height: calc(var(--at-steps-dot-size) * 2);
@@ -310,7 +284,6 @@
310
284
  )
311
285
  var(--at-steps-padding);
312
286
  }
313
-
314
287
  .at-steps[data-direction]:not([data-direction="right"])
315
288
  > .at-steps__step
316
289
  .at-steps__step-mark {
@@ -318,7 +291,6 @@
318
291
  margin: 0;
319
292
  position: absolute;
320
293
  }
321
-
322
294
  .at-steps[data-direction]:not([data-direction="right"])
323
295
  > .at-steps__step::before,
324
296
  .at-steps[data-direction]:not([data-direction="right"])
@@ -330,7 +302,6 @@
330
302
  inset: calc(var(--at-steps-dot-size) * -1) var(--at-steps-padding) 100%;
331
303
  translate: -50% var(--at-steps-padding);
332
304
  }
333
-
334
305
  .at-steps[data-direction]:not([data-direction="right"])
335
306
  > .at-steps__step::after {
336
307
  inset-block: var(--at-steps-dot-size) calc(var(--at-steps-gap) * -1);
@@ -340,7 +311,6 @@
340
311
  transparent
341
312
  );
342
313
  }
343
-
344
314
  .at-steps[data-direction]:not([data-direction="right"])
345
315
  > .at-steps__step:last-child::after {
346
316
  background: linear-gradient(var(--dot-after), transparent);
@@ -352,12 +322,10 @@
352
322
  * connector lines back to the outer edge of the ring so the see-through gap
353
323
  * stays clean above and below the dot.
354
324
  */
355
-
356
325
  .at-steps[data-direction]:not([data-direction="right"])
357
326
  > .at-steps__step[aria-current="step"]::before {
358
327
  inset-block-end: calc(100% + var(--at-steps-stroke-size) * 2);
359
328
  }
360
-
361
329
  .at-steps[data-direction]:not([data-direction="right"])
362
330
  > .at-steps__step[aria-current="step"]::after {
363
331
  inset-block-start: calc(
@@ -386,7 +354,6 @@
386
354
  /*
387
355
  * Disabled
388
356
  */
389
-
390
357
  .at-steps__step:has(> button:disabled:only-child, > a[disabled]:only-child) {
391
358
  opacity: 0.4;
392
359
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbeidstilsynet/design-css",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "CSS for Designsystemet",
5
5
  "license": "MIT",
6
6
  "author": "Arbeidstilsynet",
@@ -25,18 +25,18 @@
25
25
  "access": "public"
26
26
  },
27
27
  "dependencies": {
28
- "@digdir/designsystemet-css": "1.16.1"
28
+ "@digdir/designsystemet-css": "1.21.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/node": "24.13.1",
32
- "autoprefixer": "10.5.0",
33
- "cssnano": "8.0.2",
31
+ "@types/node": "24.13.3",
32
+ "autoprefixer": "10.5.5",
33
+ "cssnano": "8.0.10",
34
34
  "del-cli": "7.0.0",
35
- "postcss": "8.5.15",
36
- "postcss-cli": "11.0.1",
37
- "postcss-import": "16.1.1",
38
- "postcss-nesting": "14.0.0",
39
- "tsx": "4.22.4"
35
+ "postcss": "8.5.28",
36
+ "postcss-cli": "12.0.0",
37
+ "postcss-import": "17.0.0",
38
+ "postcss-nesting": "14.0.1",
39
+ "tsx": "4.23.13"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "postcss ./src/*.css --base . --dir ./dist --watch",