@digiko-npm/designsystem 0.5.0 → 0.7.2

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.
Files changed (55) hide show
  1. package/README.md +7 -7
  2. package/dist/designsystem.css +1284 -474
  3. package/dist/designsystem.min.css +2 -2
  4. package/package.json +6 -1
  5. package/src/base/typography.css +8 -8
  6. package/src/components/accordion.css +21 -14
  7. package/src/components/alert.css +25 -19
  8. package/src/components/avatar.css +16 -16
  9. package/src/components/bottom-nav.css +27 -21
  10. package/src/components/breadcrumb.css +7 -0
  11. package/src/components/button.css +10 -2
  12. package/src/components/card.css +6 -42
  13. package/src/components/chip.css +10 -3
  14. package/src/components/collapsible.css +116 -0
  15. package/src/components/command.css +17 -7
  16. package/src/components/custom-select.css +123 -7
  17. package/src/components/datepicker.css +9 -9
  18. package/src/components/description-list.css +98 -0
  19. package/src/components/divider.css +1 -1
  20. package/src/components/drawer.css +28 -19
  21. package/src/components/drop-zone.css +10 -3
  22. package/src/components/dropdown.css +17 -8
  23. package/src/components/empty-state.css +3 -3
  24. package/src/components/field.css +77 -0
  25. package/src/components/icon-btn.css +12 -6
  26. package/src/components/index.css +5 -0
  27. package/src/components/input.css +26 -16
  28. package/src/components/kbd.css +1 -1
  29. package/src/components/modal.css +13 -4
  30. package/src/components/nav.css +22 -11
  31. package/src/components/pagination.css +9 -0
  32. package/src/components/popover.css +10 -10
  33. package/src/components/progress.css +2 -2
  34. package/src/components/result.css +84 -0
  35. package/src/components/search.css +24 -26
  36. package/src/components/skeleton.css +4 -4
  37. package/src/components/slider.css +13 -6
  38. package/src/components/sortable.css +9 -0
  39. package/src/components/stat-card.css +41 -0
  40. package/src/components/table.css +3 -3
  41. package/src/components/tabs.css +26 -18
  42. package/src/components/tag.css +11 -3
  43. package/src/components/timeline.css +14 -14
  44. package/src/components/toast.css +19 -7
  45. package/src/components/toggle.css +10 -2
  46. package/src/components/toolbar.css +1 -1
  47. package/src/components/tooltip.css +34 -28
  48. package/src/index.css +6 -4
  49. package/src/tokens/colors.css +18 -6
  50. package/src/tokens/spacing.css +7 -0
  51. package/src/utilities/a11y.css +102 -0
  52. package/src/utilities/index.css +1 -0
  53. package/src/utilities/layout.css +26 -26
  54. package/src/utilities/spacing.css +52 -52
  55. package/src/utilities/text.css +8 -8
@@ -0,0 +1,116 @@
1
+ /* ==========================================================================
2
+ Component: Collapsible
3
+ Single collapsible section — a simplified, standalone accordion item.
4
+
5
+ ARIA requirements (consumer responsibility):
6
+ - Trigger: <button> with aria-expanded="true|false"
7
+ - Trigger: aria-controls="[content-panel-id]"
8
+ - Content: id matching aria-controls
9
+ ========================================================================== */
10
+
11
+ /* ---------------------------------------------------------------------------
12
+ Container
13
+ --------------------------------------------------------------------------- */
14
+
15
+ .ds-collapsible {
16
+ border: 1px solid var(--ds-color-border);
17
+ border-radius: var(--ds-radius-xl);
18
+ overflow: hidden;
19
+ }
20
+
21
+ /* ---------------------------------------------------------------------------
22
+ Trigger (button)
23
+ --------------------------------------------------------------------------- */
24
+
25
+ .ds-collapsible__trigger {
26
+ display: flex;
27
+ flex-direction: row;
28
+ justify-content: space-between;
29
+ align-items: center;
30
+ width: 100%;
31
+ padding: var(--ds-space-4);
32
+ text-align: start;
33
+ font-family: var(--ds-font-sans);
34
+ font-size: var(--ds-text-sm);
35
+ font-weight: var(--ds-weight-medium);
36
+ color: var(--ds-color-text);
37
+ background: transparent;
38
+ border: 0;
39
+ cursor: pointer;
40
+ transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
41
+ }
42
+
43
+ .ds-collapsible__trigger:hover {
44
+ background-color: var(--ds-color-overlay);
45
+ }
46
+
47
+ .ds-collapsible__trigger:focus-visible {
48
+ outline: none;
49
+ box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
50
+ scroll-margin-block: var(--ds-space-16, 4rem);
51
+ }
52
+
53
+ /* ---------------------------------------------------------------------------
54
+ Chevron icon (CSS border-arrow)
55
+ --------------------------------------------------------------------------- */
56
+
57
+ .ds-collapsible__icon {
58
+ flex-shrink: 0;
59
+ width: 0.5rem;
60
+ height: 0.5rem;
61
+ border-inline-end: 2px solid var(--ds-color-text-secondary);
62
+ border-block-end: 2px solid var(--ds-color-text-secondary);
63
+ transform: rotate(45deg);
64
+ margin-inline-start: var(--ds-space-3);
65
+ transition: transform var(--ds-duration-fast) var(--ds-ease-default);
66
+ }
67
+
68
+ .ds-collapsible--open .ds-collapsible__icon {
69
+ transform: rotate(225deg);
70
+ }
71
+
72
+ /* ---------------------------------------------------------------------------
73
+ Collapsible content
74
+ --------------------------------------------------------------------------- */
75
+
76
+ .ds-collapsible__content {
77
+ max-height: 0;
78
+ overflow: hidden;
79
+ transition:
80
+ max-height var(--ds-duration-normal) var(--ds-ease-default),
81
+ padding var(--ds-duration-normal) var(--ds-ease-default);
82
+ }
83
+
84
+ .ds-collapsible--open .ds-collapsible__content {
85
+ max-height: 80rem;
86
+ }
87
+
88
+ /* ---------------------------------------------------------------------------
89
+ Inner body
90
+ --------------------------------------------------------------------------- */
91
+
92
+ .ds-collapsible__body {
93
+ padding: var(--ds-space-4);
94
+ padding-block-start: 0;
95
+ font-size: var(--ds-text-sm);
96
+ color: var(--ds-color-text-secondary);
97
+ line-height: var(--ds-leading-relaxed);
98
+ }
99
+
100
+ /* ---------------------------------------------------------------------------
101
+ Variant: Flush (no border, no radius)
102
+ --------------------------------------------------------------------------- */
103
+
104
+ .ds-collapsible--flush {
105
+ border: 0;
106
+ border-radius: 0;
107
+ }
108
+
109
+ /* ---------------------------------------------------------------------------
110
+ Variant: Ghost (no border, transparent bg)
111
+ --------------------------------------------------------------------------- */
112
+
113
+ .ds-collapsible--ghost {
114
+ border: 0;
115
+ background: transparent;
116
+ }
@@ -5,17 +5,26 @@
5
5
  full-screen overlay with a centered search dialog, grouped results,
6
6
  keyboard-navigable items, and a footer with shortcut hints.
7
7
 
8
+ ARIA requirements (consumer responsibility):
9
+ - Input: role="combobox", aria-expanded="true", aria-controls="[list-id]"
10
+ - Input: aria-activedescendant="[active-item-id]" for keyboard nav
11
+ - List: role="listbox", id matching aria-controls
12
+ - Items: role="option", id for aria-activedescendant
13
+ - Groups: role="group", aria-labelledby="[heading-id]"
14
+ - Overlay: role="dialog", aria-modal="true", aria-label="Command palette"
15
+ - Keyboard: ArrowUp/Down to navigate, Enter to select, Escape to close
16
+
8
17
  Usage:
9
- <div class="ds-command ds-command--open">
18
+ <div class="ds-command ds-command--open" role="dialog" aria-modal="true" aria-label="Command palette">
10
19
  <div class="ds-command__content">
11
20
  <div class="ds-command__input-wrapper">
12
21
  <span class="ds-command__input-icon">...</span>
13
- <input class="ds-command__input" placeholder="Search..." />
22
+ <input class="ds-command__input" role="combobox" placeholder="Search..." />
14
23
  </div>
15
- <div class="ds-command__list">
24
+ <div class="ds-command__list" role="listbox">
16
25
  <div class="ds-command__group">
17
26
  <div class="ds-command__group-heading">Results</div>
18
- <div class="ds-command__item ds-command__item--active">
27
+ <div class="ds-command__item ds-command__item--active" role="option">
19
28
  <span class="ds-command__item-icon">...</span>
20
29
  <span class="ds-command__item-label">Item</span>
21
30
  <span class="ds-command__item-shortcut">Ctrl+N</span>
@@ -39,7 +48,7 @@
39
48
  display: flex;
40
49
  align-items: flex-start;
41
50
  justify-content: center;
42
- padding-top: 20vh;
51
+ padding-block-start: 20vh;
43
52
  background-color: var(--ds-color-overlay);
44
53
  opacity: 0;
45
54
  visibility: hidden;
@@ -78,7 +87,7 @@
78
87
  align-items: center;
79
88
  gap: var(--ds-space-3);
80
89
  padding: var(--ds-space-3) var(--ds-space-4);
81
- border-bottom: 1px solid var(--ds-color-border);
90
+ border-block-end: 1px solid var(--ds-color-border);
82
91
  }
83
92
 
84
93
  /* Search icon */
@@ -148,6 +157,7 @@
148
157
  .ds-command__item:focus-visible {
149
158
  outline: none;
150
159
  box-shadow: inset 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
160
+ scroll-margin-block: var(--ds-space-16, 4rem);
151
161
  }
152
162
 
153
163
  /* Item icon */
@@ -182,7 +192,7 @@
182
192
  align-items: center;
183
193
  gap: var(--ds-space-4);
184
194
  padding: var(--ds-space-2) var(--ds-space-3);
185
- border-top: 1px solid var(--ds-color-border);
195
+ border-block-start: 1px solid var(--ds-color-border);
186
196
  font-size: var(--ds-text-xs);
187
197
  color: var(--ds-color-text-tertiary);
188
198
  }
@@ -3,6 +3,14 @@
3
3
  Replaces native <select> with styled dropdown panel.
4
4
  Desktop: absolute positioned panel below trigger.
5
5
  Mobile: fullscreen overlay with header + search.
6
+
7
+ ARIA requirements (consumer responsibility):
8
+ - Trigger: role="combobox", aria-expanded="true|false", aria-haspopup="listbox"
9
+ - Trigger: aria-controls="[panel-list-id]", aria-labelledby="[label-id]"
10
+ - Panel list: role="listbox", id matching aria-controls
11
+ - Option: role="option", aria-selected="true|false"
12
+ - Multi-select: add aria-multiselectable="true" on listbox
13
+ - Keyboard: ArrowUp/Down to navigate, Enter/Space to select, Escape to close
6
14
  ========================================================================== */
7
15
 
8
16
  /* --- Wrapper --- */
@@ -29,7 +37,7 @@
29
37
  border: 1px solid var(--ds-color-border);
30
38
  border-radius: var(--ds-radius-lg);
31
39
  cursor: pointer;
32
- text-align: left;
40
+ text-align: start;
33
41
  transition: all var(--ds-duration-fast) var(--ds-ease-default);
34
42
  }
35
43
 
@@ -41,6 +49,7 @@
41
49
  border-color: var(--ds-color-border-active);
42
50
  outline: none;
43
51
  box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
52
+ scroll-margin-block: var(--ds-space-16, 4rem);
44
53
  }
45
54
 
46
55
  .ds-custom-select__trigger--open {
@@ -70,7 +79,7 @@
70
79
  flex-shrink: 0;
71
80
  width: 1rem;
72
81
  height: 1rem;
73
- margin-left: var(--ds-space-2);
82
+ margin-inline-start: var(--ds-space-2);
74
83
  color: var(--ds-color-text-tertiary);
75
84
  transition: transform var(--ds-duration-fast) var(--ds-ease-default);
76
85
  }
@@ -145,13 +154,13 @@
145
154
  .ds-custom-select__search {
146
155
  position: relative;
147
156
  padding: var(--ds-space-2) var(--ds-space-3);
148
- border-bottom: 1px solid var(--ds-color-border);
157
+ border-block-end: 1px solid var(--ds-color-border);
149
158
  }
150
159
 
151
160
  .ds-custom-select__search-icon {
152
161
  position: absolute;
153
- left: calc(var(--ds-space-3) + var(--ds-space-2-5));
154
- top: 50%;
162
+ inset-inline-start: calc(var(--ds-space-3) + var(--ds-space-2-5));
163
+ inset-block-start: 50%;
155
164
  transform: translateY(-50%);
156
165
  width: 1rem;
157
166
  height: 1rem;
@@ -255,7 +264,7 @@
255
264
  .ds-custom-select__panel {
256
265
  position: fixed;
257
266
  inset: 0;
258
- top: auto;
267
+ inset-block-start: auto;
259
268
  z-index: var(--ds-z-modal);
260
269
  max-height: 85dvh;
261
270
  border-radius: var(--ds-radius-xl) var(--ds-radius-xl) 0 0;
@@ -279,7 +288,7 @@
279
288
  align-items: center;
280
289
  justify-content: space-between;
281
290
  padding: var(--ds-space-4) var(--ds-space-4);
282
- border-bottom: 1px solid var(--ds-color-border);
291
+ border-block-end: 1px solid var(--ds-color-border);
283
292
  }
284
293
 
285
294
  .ds-custom-select__header-title {
@@ -319,6 +328,113 @@
319
328
  }
320
329
  }
321
330
 
331
+ /* ==========================================================================
332
+ Multi-select mode
333
+ ========================================================================== */
334
+
335
+ /* --- Multi trigger: tags inside trigger --- */
336
+
337
+ .ds-custom-select--multi .ds-custom-select__trigger {
338
+ height: auto;
339
+ min-height: var(--ds-size-3);
340
+ flex-wrap: wrap;
341
+ padding: var(--ds-space-1) var(--ds-space-4) var(--ds-space-1) var(--ds-space-2);
342
+ gap: var(--ds-space-1);
343
+ }
344
+
345
+ /* --- Tags container --- */
346
+
347
+ .ds-custom-select__tags {
348
+ display: flex;
349
+ flex-wrap: wrap;
350
+ gap: var(--ds-space-1);
351
+ flex: 1;
352
+ min-width: 0;
353
+ }
354
+
355
+ /* --- Single tag (based on ds-tag styling) --- */
356
+
357
+ .ds-custom-select__tag {
358
+ display: inline-flex;
359
+ align-items: center;
360
+ gap: var(--ds-space-1);
361
+ padding: var(--ds-space-0-5) var(--ds-space-1) var(--ds-space-0-5) var(--ds-space-2);
362
+ font-size: var(--ds-text-xs);
363
+ font-weight: var(--ds-weight-medium);
364
+ font-family: var(--ds-font-sans);
365
+ line-height: var(--ds-leading-none);
366
+ border-radius: var(--ds-radius-full);
367
+ background-color: var(--ds-color-bg-elevated);
368
+ border: 1px solid var(--ds-color-border);
369
+ color: var(--ds-color-text-secondary);
370
+ white-space: nowrap;
371
+ }
372
+
373
+ .ds-custom-select__tag-remove {
374
+ display: inline-flex;
375
+ align-items: center;
376
+ justify-content: center;
377
+ width: 1rem;
378
+ height: 1rem;
379
+ min-width: 1.5rem; /* WCAG 2.5.8: minimum 24px target */
380
+ min-height: 1.5rem;
381
+ padding: 0;
382
+ border: none;
383
+ border-radius: var(--ds-radius-full);
384
+ background: transparent;
385
+ color: currentColor;
386
+ font-size: inherit;
387
+ line-height: var(--ds-leading-none);
388
+ opacity: 0.6;
389
+ cursor: pointer;
390
+ transition: opacity var(--ds-duration-fast) var(--ds-ease-out);
391
+ -webkit-appearance: none;
392
+ appearance: none;
393
+ }
394
+
395
+ .ds-custom-select__tag-remove:hover {
396
+ opacity: 1;
397
+ }
398
+
399
+ /* --- Multi option: checkbox style indicator --- */
400
+
401
+ .ds-custom-select--multi .ds-custom-select__option-check {
402
+ width: 1rem;
403
+ height: 1rem;
404
+ border: 1px solid var(--ds-color-border);
405
+ border-radius: var(--ds-radius-sm);
406
+ flex-shrink: 0;
407
+ display: flex;
408
+ align-items: center;
409
+ justify-content: center;
410
+ transition:
411
+ background-color var(--ds-duration-fast) var(--ds-ease-default),
412
+ border-color var(--ds-duration-fast) var(--ds-ease-default);
413
+ }
414
+
415
+ .ds-custom-select--multi .ds-custom-select__option--selected .ds-custom-select__option-check {
416
+ background-color: var(--ds-color-interactive);
417
+ border-color: var(--ds-color-interactive);
418
+ color: var(--ds-color-on-inverted);
419
+ }
420
+
421
+ /* --- Multi size variants --- */
422
+
423
+ .ds-custom-select--xs.ds-custom-select--multi .ds-custom-select__trigger {
424
+ min-height: var(--ds-size-1);
425
+ padding: var(--ds-space-0-5) var(--ds-space-1-5) var(--ds-space-0-5) var(--ds-space-1);
426
+ }
427
+
428
+ .ds-custom-select--sm.ds-custom-select--multi .ds-custom-select__trigger {
429
+ min-height: var(--ds-size-2);
430
+ padding: var(--ds-space-0-5) var(--ds-space-2) var(--ds-space-0-5) var(--ds-space-1-5);
431
+ }
432
+
433
+ .ds-custom-select--lg.ds-custom-select--multi .ds-custom-select__trigger {
434
+ min-height: var(--ds-size-4);
435
+ padding: var(--ds-space-1) var(--ds-space-4) var(--ds-space-1) var(--ds-space-2);
436
+ }
437
+
322
438
  @media (prefers-reduced-motion: reduce) {
323
439
  .ds-custom-select__panel {
324
440
  animation: none;
@@ -66,8 +66,8 @@
66
66
  .ds-datepicker__panel {
67
67
  position: absolute;
68
68
  z-index: var(--ds-z-dropdown);
69
- top: calc(100% + var(--ds-offset-sm));
70
- left: 0;
69
+ inset-block-start: calc(100% + var(--ds-offset-sm));
70
+ inset-inline-start: 0;
71
71
  background-color: var(--ds-color-surface);
72
72
  border: 1px solid var(--ds-color-border);
73
73
  border-radius: var(--ds-radius-xl);
@@ -95,7 +95,7 @@
95
95
  display: flex;
96
96
  align-items: center;
97
97
  justify-content: space-between;
98
- margin-bottom: var(--ds-space-2);
98
+ margin-block-end: var(--ds-space-2);
99
99
  }
100
100
 
101
101
  .ds-datepicker__title {
@@ -133,7 +133,7 @@
133
133
  .ds-datepicker__weekdays {
134
134
  display: grid;
135
135
  grid-template-columns: repeat(7, 1fr);
136
- margin-bottom: var(--ds-space-1);
136
+ margin-block-end: var(--ds-space-1);
137
137
  }
138
138
 
139
139
  .ds-datepicker__weekday {
@@ -206,9 +206,9 @@
206
206
  .ds-datepicker__footer {
207
207
  display: flex;
208
208
  justify-content: center;
209
- margin-top: var(--ds-space-2);
210
- padding-top: var(--ds-space-2);
211
- border-top: 1px solid var(--ds-color-border);
209
+ margin-block-start: var(--ds-space-2);
210
+ padding-block-start: var(--ds-space-2);
211
+ border-block-start: 1px solid var(--ds-color-border);
212
212
  }
213
213
 
214
214
  .ds-datepicker__today {
@@ -290,6 +290,6 @@
290
290
  }
291
291
 
292
292
  .ds-datepicker--compact .ds-datepicker__footer {
293
- margin-top: var(--ds-space-1);
294
- padding-top: var(--ds-space-1);
293
+ margin-block-start: var(--ds-space-1);
294
+ padding-block-start: var(--ds-space-1);
295
295
  }
@@ -0,0 +1,98 @@
1
+ /* ==========================================================================
2
+ Component: Description List
3
+ Key-value pairs display with horizontal and vertical layouts.
4
+ ========================================================================== */
5
+
6
+ /* ---------------------------------------------------------------------------
7
+ Container
8
+ --------------------------------------------------------------------------- */
9
+
10
+ .ds-description-list {
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: 0;
14
+ }
15
+
16
+ /* ---------------------------------------------------------------------------
17
+ Item
18
+ --------------------------------------------------------------------------- */
19
+
20
+ .ds-description-list__item {
21
+ display: flex;
22
+ flex-direction: column;
23
+ gap: var(--ds-space-1);
24
+ padding: var(--ds-space-3) 0;
25
+ }
26
+
27
+ .ds-description-list__item:first-child {
28
+ padding-block-start: 0;
29
+ }
30
+
31
+ .ds-description-list__item:last-child {
32
+ padding-block-end: 0;
33
+ }
34
+
35
+ /* ---------------------------------------------------------------------------
36
+ Term (key)
37
+ --------------------------------------------------------------------------- */
38
+
39
+ .ds-description-list__term {
40
+ font-family: var(--ds-font-sans);
41
+ font-size: var(--ds-text-sm);
42
+ font-weight: var(--ds-weight-medium);
43
+ color: var(--ds-color-text-secondary);
44
+ line-height: var(--ds-leading-normal);
45
+ }
46
+
47
+ /* ---------------------------------------------------------------------------
48
+ Detail (value)
49
+ --------------------------------------------------------------------------- */
50
+
51
+ .ds-description-list__detail {
52
+ font-family: var(--ds-font-sans);
53
+ font-size: var(--ds-text-sm);
54
+ color: var(--ds-color-text);
55
+ line-height: var(--ds-leading-normal);
56
+ }
57
+
58
+ /* ---------------------------------------------------------------------------
59
+ Variant: Horizontal (term and detail on same row)
60
+ --------------------------------------------------------------------------- */
61
+
62
+ .ds-description-list--horizontal .ds-description-list__item {
63
+ flex-direction: row;
64
+ align-items: flex-start;
65
+ gap: var(--ds-space-4);
66
+ }
67
+
68
+ .ds-description-list--horizontal .ds-description-list__term {
69
+ flex-shrink: 0;
70
+ min-width: 10rem;
71
+ }
72
+
73
+ .ds-description-list--horizontal .ds-description-list__detail {
74
+ flex: 1;
75
+ min-width: 0;
76
+ }
77
+
78
+ /* ---------------------------------------------------------------------------
79
+ Variant: Bordered (separator between items)
80
+ --------------------------------------------------------------------------- */
81
+
82
+ .ds-description-list--bordered .ds-description-list__item {
83
+ border-block-end: 1px solid var(--ds-color-border);
84
+ }
85
+
86
+ .ds-description-list--bordered .ds-description-list__item:last-child {
87
+ border-block-end: 0;
88
+ }
89
+
90
+ /* ---------------------------------------------------------------------------
91
+ Variant: Striped (alternating background)
92
+ --------------------------------------------------------------------------- */
93
+
94
+ .ds-description-list--striped .ds-description-list__item:nth-child(odd) {
95
+ background-color: var(--ds-color-bg-subtle);
96
+ padding-inline: var(--ds-space-3);
97
+ border-radius: var(--ds-radius-md);
98
+ }
@@ -14,7 +14,7 @@
14
14
 
15
15
  .ds-divider--vertical {
16
16
  border-top: none;
17
- border-left: 1px solid var(--ds-color-border);
17
+ border-inline-start: 1px solid var(--ds-color-border);
18
18
  display: inline-block;
19
19
  width: auto;
20
20
  height: auto;
@@ -5,13 +5,21 @@
5
5
  Default direction is right; use `--left` or `--bottom` modifiers
6
6
  to change the slide origin.
7
7
 
8
+ ARIA requirements (consumer responsibility):
9
+ - Container: role="dialog", aria-modal="true", aria-labelledby="[title-id]"
10
+ - Close button: aria-label="Close"
11
+ - Focus: trap focus inside drawer when open
12
+ - Keyboard: Escape closes drawer
13
+ - On open: move focus to first focusable element or close button
14
+ - On close: return focus to the element that triggered the drawer
15
+
8
16
  Sizes:
9
17
  --sm 18 rem
10
18
  (default) 24 rem
11
19
  --lg 36 rem
12
20
 
13
21
  Usage:
14
- <div class="ds-drawer ds-drawer--right ds-drawer--open">
22
+ <div class="ds-drawer ds-drawer--right ds-drawer--open" role="dialog" aria-modal="true">
15
23
  <div class="ds-drawer__content">
16
24
  <div class="ds-drawer__header">
17
25
  <h3>Title</h3>
@@ -64,12 +72,12 @@
64
72
 
65
73
  .ds-drawer__content,
66
74
  .ds-drawer--right .ds-drawer__content {
67
- top: 0;
68
- right: 0;
69
- bottom: 0;
75
+ inset-block-start: 0;
76
+ inset-inline-end: 0;
77
+ inset-block-end: 0;
70
78
  width: 24rem;
71
79
  max-width: 90vw;
72
- border-left: 1px solid var(--ds-color-border);
80
+ border-inline-start: 1px solid var(--ds-color-border);
73
81
  transform: translateX(100%);
74
82
  }
75
83
 
@@ -83,14 +91,14 @@
83
91
  * ========================================================================== */
84
92
 
85
93
  .ds-drawer--left .ds-drawer__content {
86
- left: 0;
87
- top: 0;
88
- bottom: 0;
89
- right: auto;
94
+ inset-inline-start: 0;
95
+ inset-block-start: 0;
96
+ inset-block-end: 0;
97
+ inset-inline-end: auto;
90
98
  width: 24rem;
91
99
  max-width: 90vw;
92
- border-left: 0;
93
- border-right: 1px solid var(--ds-color-border);
100
+ border-inline-start: 0;
101
+ border-inline-end: 1px solid var(--ds-color-border);
94
102
  transform: translateX(-100%);
95
103
  }
96
104
 
@@ -103,14 +111,14 @@
103
111
  * ========================================================================== */
104
112
 
105
113
  .ds-drawer--bottom .ds-drawer__content {
106
- bottom: 0;
107
- left: 0;
108
- right: 0;
109
- top: auto;
114
+ inset-block-end: 0;
115
+ inset-inline-start: 0;
116
+ inset-inline-end: 0;
117
+ inset-block-start: auto;
110
118
  width: auto;
111
119
  max-height: 90dvh;
112
- border-left: 0;
113
- border-top: 1px solid var(--ds-color-border);
120
+ border-inline-start: 0;
121
+ border-block-start: 1px solid var(--ds-color-border);
114
122
  border-radius: var(--ds-radius-xl) var(--ds-radius-xl) 0 0;
115
123
  transform: translateY(100%);
116
124
  }
@@ -146,7 +154,7 @@
146
154
  justify-content: space-between;
147
155
  align-items: flex-start;
148
156
  padding: var(--ds-space-4) var(--ds-space-5);
149
- border-bottom: 1px solid var(--ds-color-border);
157
+ border-block-end: 1px solid var(--ds-color-border);
150
158
  }
151
159
 
152
160
  .ds-drawer__header h3 {
@@ -188,6 +196,7 @@
188
196
  .ds-drawer__close:focus-visible {
189
197
  outline: none;
190
198
  box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
199
+ scroll-margin-block: var(--ds-space-16, 4rem);
191
200
  }
192
201
 
193
202
  /* ==========================================================================
@@ -206,7 +215,7 @@
206
215
 
207
216
  .ds-drawer__footer {
208
217
  padding: var(--ds-space-4) var(--ds-space-5);
209
- border-top: 1px solid var(--ds-color-border);
218
+ border-block-start: 1px solid var(--ds-color-border);
210
219
  display: flex;
211
220
  align-items: center;
212
221
  justify-content: flex-end;
@@ -1,6 +1,12 @@
1
1
  /* ==========================================================================
2
2
  Component: Drop Zone
3
3
  Dashed-border upload area with icon, label, hint, and progress states.
4
+
5
+ ARIA requirements (consumer responsibility):
6
+ - Container: role="button" if clickable, tabindex="0" for keyboard access
7
+ - Label: aria-label="Upload files" or visible label via aria-labelledby
8
+ - Drag state: announce via aria-live="polite" region
9
+ - Progress: use aria-busy="true" during upload, aria-valuenow for progress
4
10
  ==========================================================================
5
11
 
6
12
  Usage:
@@ -42,6 +48,7 @@
42
48
  .ds-drop-zone:focus-visible {
43
49
  outline: none;
44
50
  box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
51
+ scroll-margin-block: var(--ds-space-16, 4rem);
45
52
  }
46
53
 
47
54
  :root:not(.dark) .ds-drop-zone {
@@ -78,7 +85,7 @@
78
85
  }
79
86
 
80
87
  .ds-drop-zone:hover .ds-drop-zone__icon {
81
- color: var(--ds-color-text-primary);
88
+ color: var(--ds-color-text);
82
89
  }
83
90
 
84
91
  /* ---------------------------------------------------------------------------
@@ -88,13 +95,13 @@
88
95
  .ds-drop-zone__label {
89
96
  font-size: var(--ds-text-sm);
90
97
  font-weight: var(--ds-weight-medium);
91
- color: var(--ds-color-text-primary);
98
+ color: var(--ds-color-text);
92
99
  }
93
100
 
94
101
  .ds-drop-zone__hint {
95
102
  font-size: var(--ds-text-xs);
96
103
  color: var(--ds-color-text-tertiary);
97
- margin-top: calc(-1 * var(--ds-space-1));
104
+ margin-block-start: calc(-1 * var(--ds-space-1));
98
105
  }
99
106
 
100
107
  /* ---------------------------------------------------------------------------