@digiko-npm/designsystem 0.4.0 → 0.7.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/README.md +7 -7
- package/dist/designsystem.css +2559 -777
- package/dist/designsystem.min.css +2 -2
- package/package.json +12 -1
- package/src/base/typography.css +8 -8
- package/src/components/accordion.css +21 -14
- package/src/components/alert.css +25 -19
- package/src/components/avatar.css +16 -16
- package/src/components/bottom-nav.css +125 -0
- package/src/components/breadcrumb.css +7 -0
- package/src/components/button.css +10 -2
- package/src/components/card.css +6 -42
- package/src/components/chip.css +79 -0
- package/src/components/collapsible.css +116 -0
- package/src/components/command.css +17 -7
- package/src/components/custom-select.css +123 -7
- package/src/components/datepicker.css +9 -9
- package/src/components/description-list.css +98 -0
- package/src/components/divider.css +1 -1
- package/src/components/drawer.css +28 -19
- package/src/components/drop-zone.css +10 -3
- package/src/components/dropdown.css +17 -8
- package/src/components/empty-state.css +3 -3
- package/src/components/field.css +77 -0
- package/src/components/icon-btn.css +102 -0
- package/src/components/index.css +11 -0
- package/src/components/input.css +26 -16
- package/src/components/kbd.css +1 -1
- package/src/components/modal.css +30 -3
- package/src/components/nav.css +20 -10
- package/src/components/pagination.css +9 -0
- package/src/components/popover.css +10 -10
- package/src/components/progress.css +2 -2
- package/src/components/result.css +84 -0
- package/src/components/search.css +294 -0
- package/src/components/skeleton.css +4 -4
- package/src/components/slider.css +13 -6
- package/src/components/sortable.css +9 -0
- package/src/components/spinner.css +60 -0
- package/src/components/stat-card.css +41 -0
- package/src/components/table.css +3 -3
- package/src/components/tabs.css +26 -18
- package/src/components/tag.css +11 -3
- package/src/components/timeline.css +14 -14
- package/src/components/toast.css +19 -7
- package/src/components/toggle.css +10 -2
- package/src/components/toolbar.css +189 -0
- package/src/components/tooltip.css +34 -28
- package/src/index.css +6 -4
- package/src/tokens/colors.css +18 -6
- package/src/tokens/spacing.css +7 -0
- package/src/utilities/a11y.css +102 -0
- package/src/utilities/index.css +2 -0
- package/src/utilities/interactive.css +116 -0
- package/src/utilities/layout.css +26 -26
- package/src/utilities/spacing.css +52 -52
- package/src/utilities/text.css +8 -8
|
@@ -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
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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-
|
|
93
|
-
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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-
|
|
113
|
-
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-
|
|
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-
|
|
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
|
|
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
|
|
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-
|
|
104
|
+
margin-block-start: calc(-1 * var(--ds-space-1));
|
|
98
105
|
}
|
|
99
106
|
|
|
100
107
|
/* ---------------------------------------------------------------------------
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
2
|
Component: Dropdown
|
|
3
3
|
Floating menu with surface bg, scale transition, keyboard-friendly items.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Trigger: aria-haspopup="true", aria-expanded="true|false"
|
|
7
|
+
- Menu: role="menu"
|
|
8
|
+
- Items: role="menuitem"
|
|
9
|
+
- Keyboard: ArrowUp/Down to navigate, Enter to select, Escape to close
|
|
10
|
+
- On open: move focus to first menu item
|
|
11
|
+
- On close: return focus to trigger
|
|
4
12
|
========================================================================== */
|
|
5
13
|
|
|
6
14
|
.ds-dropdown {
|
|
@@ -17,8 +25,8 @@
|
|
|
17
25
|
|
|
18
26
|
.ds-dropdown__menu {
|
|
19
27
|
position: absolute;
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
inset-block-start: calc(100% + var(--ds-space-1));
|
|
29
|
+
inset-inline-start: 0;
|
|
22
30
|
z-index: var(--ds-z-dropdown);
|
|
23
31
|
min-width: 12rem;
|
|
24
32
|
padding-block: var(--ds-space-1-5);
|
|
@@ -48,14 +56,14 @@
|
|
|
48
56
|
/* --- Alignment variants --- */
|
|
49
57
|
|
|
50
58
|
.ds-dropdown__menu--right {
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
inset-inline-start: auto;
|
|
60
|
+
inset-inline-end: 0;
|
|
53
61
|
transform-origin: top right;
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
.ds-dropdown__menu--up {
|
|
57
|
-
|
|
58
|
-
|
|
65
|
+
inset-block-start: auto;
|
|
66
|
+
inset-block-end: calc(100% + var(--ds-space-1));
|
|
59
67
|
transform-origin: bottom left;
|
|
60
68
|
}
|
|
61
69
|
|
|
@@ -93,6 +101,7 @@
|
|
|
93
101
|
.ds-dropdown__item:focus-visible {
|
|
94
102
|
outline: none;
|
|
95
103
|
box-shadow: inset 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
104
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
96
105
|
}
|
|
97
106
|
|
|
98
107
|
.ds-dropdown__item--active {
|
|
@@ -122,7 +131,7 @@
|
|
|
122
131
|
}
|
|
123
132
|
|
|
124
133
|
.ds-dropdown__item-shortcut {
|
|
125
|
-
margin-
|
|
134
|
+
margin-inline-start: auto;
|
|
126
135
|
font-size: var(--ds-text-xs);
|
|
127
136
|
color: var(--ds-color-text-tertiary);
|
|
128
137
|
}
|
|
@@ -132,7 +141,7 @@
|
|
|
132
141
|
.ds-dropdown__divider {
|
|
133
142
|
margin-block: var(--ds-space-1);
|
|
134
143
|
border: 0;
|
|
135
|
-
border-
|
|
144
|
+
border-block-start: 1px solid var(--ds-color-border);
|
|
136
145
|
}
|
|
137
146
|
|
|
138
147
|
/* --- Section header --- */
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
width: 3rem;
|
|
18
18
|
height: 3rem;
|
|
19
19
|
color: var(--ds-color-text-tertiary);
|
|
20
|
-
margin-
|
|
20
|
+
margin-block-end: var(--ds-space-2);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.ds-empty-state__title {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
align-items: center;
|
|
43
43
|
justify-content: center;
|
|
44
44
|
gap: var(--ds-space-3);
|
|
45
|
-
margin-
|
|
45
|
+
margin-block-start: var(--ds-space-2);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/* --- Compact variant --- */
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
/* --- Left-aligned variant --- */
|
|
72
72
|
.ds-empty-state--left {
|
|
73
73
|
align-items: flex-start;
|
|
74
|
-
text-align:
|
|
74
|
+
text-align: start;
|
|
75
75
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Field
|
|
3
|
+
Unified wrapper for form fields — label + input + hint + error.
|
|
4
|
+
========================================================================== */
|
|
5
|
+
|
|
6
|
+
/* ---------------------------------------------------------------------------
|
|
7
|
+
Container
|
|
8
|
+
--------------------------------------------------------------------------- */
|
|
9
|
+
|
|
10
|
+
.ds-field {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--ds-space-1-5);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ---------------------------------------------------------------------------
|
|
17
|
+
Label
|
|
18
|
+
--------------------------------------------------------------------------- */
|
|
19
|
+
|
|
20
|
+
.ds-field__label {
|
|
21
|
+
font-family: var(--ds-font-sans);
|
|
22
|
+
font-size: var(--ds-text-sm);
|
|
23
|
+
font-weight: var(--ds-weight-medium);
|
|
24
|
+
color: var(--ds-color-text);
|
|
25
|
+
line-height: var(--ds-leading-normal);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Required asterisk */
|
|
29
|
+
.ds-field--required .ds-field__label::after {
|
|
30
|
+
content: " *";
|
|
31
|
+
color: var(--ds-color-error);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ---------------------------------------------------------------------------
|
|
35
|
+
Hint (help text below input)
|
|
36
|
+
--------------------------------------------------------------------------- */
|
|
37
|
+
|
|
38
|
+
.ds-field__hint {
|
|
39
|
+
font-size: var(--ds-text-xs);
|
|
40
|
+
color: var(--ds-color-text-tertiary);
|
|
41
|
+
line-height: var(--ds-leading-normal);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ---------------------------------------------------------------------------
|
|
45
|
+
Error message
|
|
46
|
+
--------------------------------------------------------------------------- */
|
|
47
|
+
|
|
48
|
+
.ds-field__error {
|
|
49
|
+
font-size: var(--ds-text-xs);
|
|
50
|
+
color: var(--ds-color-error);
|
|
51
|
+
line-height: var(--ds-leading-normal);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ---------------------------------------------------------------------------
|
|
55
|
+
Modifier: Horizontal layout (label left, input right)
|
|
56
|
+
--------------------------------------------------------------------------- */
|
|
57
|
+
|
|
58
|
+
.ds-field--horizontal {
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
align-items: flex-start;
|
|
61
|
+
gap: var(--ds-space-4);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ds-field--horizontal .ds-field__label {
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
min-width: 8rem;
|
|
67
|
+
padding-block-start: var(--ds-space-2);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* ---------------------------------------------------------------------------
|
|
71
|
+
Modifier: Disabled
|
|
72
|
+
--------------------------------------------------------------------------- */
|
|
73
|
+
|
|
74
|
+
.ds-field--disabled {
|
|
75
|
+
opacity: var(--ds-opacity-disabled);
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Icon Button
|
|
3
|
+
Standalone icon button for actions, toolbar items, and table rows.
|
|
4
|
+
A minimal interactive element that wraps a single icon.
|
|
5
|
+
|
|
6
|
+
ARIA requirements (consumer responsibility):
|
|
7
|
+
- Always add aria-label="[action]" (e.g., aria-label="Delete")
|
|
8
|
+
- Disabled: add aria-disabled="true"
|
|
9
|
+
- Toggle: use aria-pressed="true|false" for toggle icon buttons
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
<button class="ds-icon-btn" aria-label="Delete">
|
|
13
|
+
<svg>...</svg>
|
|
14
|
+
</button>
|
|
15
|
+
<button class="ds-icon-btn ds-icon-btn--sm" aria-label="Edit">...</button>
|
|
16
|
+
<button class="ds-icon-btn ds-icon-btn--danger" aria-label="Remove">...</button>
|
|
17
|
+
|
|
18
|
+
Sizes:
|
|
19
|
+
.ds-icon-btn--xs — 24px (var(--ds-size-1))
|
|
20
|
+
.ds-icon-btn--sm — 28px
|
|
21
|
+
(default) — 32px (var(--ds-size-2))
|
|
22
|
+
.ds-icon-btn--lg — 40px (var(--ds-size-3))
|
|
23
|
+
|
|
24
|
+
Modifiers:
|
|
25
|
+
.ds-icon-btn--danger — Error color on hover
|
|
26
|
+
.ds-icon-btn--ghost — No background change, color-only transition
|
|
27
|
+
========================================================================== */
|
|
28
|
+
|
|
29
|
+
.ds-icon-btn {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
width: var(--ds-size-2);
|
|
34
|
+
height: var(--ds-size-2);
|
|
35
|
+
padding: var(--ds-space-1-5);
|
|
36
|
+
border: none;
|
|
37
|
+
border-radius: var(--ds-radius-lg);
|
|
38
|
+
background: transparent;
|
|
39
|
+
color: var(--ds-color-text-tertiary);
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
flex-shrink: 0;
|
|
42
|
+
transition:
|
|
43
|
+
color var(--ds-duration-fast) var(--ds-ease-default),
|
|
44
|
+
background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ds-icon-btn:hover {
|
|
48
|
+
background-color: var(--ds-color-surface-hover);
|
|
49
|
+
color: var(--ds-color-text-secondary);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ds-icon-btn:focus-visible {
|
|
53
|
+
outline: none;
|
|
54
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
55
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ds-icon-btn:disabled,
|
|
59
|
+
.ds-icon-btn[aria-disabled="true"] {
|
|
60
|
+
opacity: var(--ds-opacity-disabled);
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Sizes */
|
|
66
|
+
.ds-icon-btn--xs {
|
|
67
|
+
width: var(--ds-size-1);
|
|
68
|
+
height: var(--ds-size-1);
|
|
69
|
+
padding: var(--ds-space-0-5);
|
|
70
|
+
border-radius: var(--ds-radius-md);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ds-icon-btn--sm {
|
|
74
|
+
width: var(--ds-size-2);
|
|
75
|
+
height: var(--ds-size-2);
|
|
76
|
+
padding: var(--ds-space-1-5);
|
|
77
|
+
border-radius: var(--ds-radius-md);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ds-icon-btn--lg {
|
|
81
|
+
width: var(--ds-size-3);
|
|
82
|
+
height: var(--ds-size-3);
|
|
83
|
+
padding: var(--ds-space-2);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Danger variant */
|
|
87
|
+
.ds-icon-btn--danger:hover {
|
|
88
|
+
color: var(--ds-color-error);
|
|
89
|
+
background-color: color-mix(in srgb, var(--ds-color-error) 10%, transparent);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Ghost variant (color only, no bg) */
|
|
93
|
+
.ds-icon-btn--ghost {
|
|
94
|
+
padding: 0;
|
|
95
|
+
width: auto;
|
|
96
|
+
height: auto;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ds-icon-btn--ghost:hover {
|
|
100
|
+
background: transparent;
|
|
101
|
+
color: var(--ds-color-text);
|
|
102
|
+
}
|
package/src/components/index.css
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/* === Core === */
|
|
2
2
|
@import './button.css';
|
|
3
3
|
@import './card.css';
|
|
4
|
+
@import './stat-card.css';
|
|
4
5
|
@import './input.css';
|
|
6
|
+
@import './field.css';
|
|
5
7
|
@import './badge.css';
|
|
6
8
|
@import './nav.css';
|
|
7
9
|
@import './modal.css';
|
|
@@ -29,6 +31,9 @@
|
|
|
29
31
|
@import './progress.css';
|
|
30
32
|
@import './drop-zone.css';
|
|
31
33
|
@import './custom-select.css';
|
|
34
|
+
@import './collapsible.css';
|
|
35
|
+
@import './description-list.css';
|
|
36
|
+
@import './result.css';
|
|
32
37
|
@import './sortable.css';
|
|
33
38
|
|
|
34
39
|
/* === Tier 3 — Advanced === */
|
|
@@ -37,3 +42,9 @@
|
|
|
37
42
|
@import './timeline.css';
|
|
38
43
|
@import './kbd.css';
|
|
39
44
|
@import './command.css';
|
|
45
|
+
@import './search.css';
|
|
46
|
+
@import './toolbar.css';
|
|
47
|
+
@import './chip.css';
|
|
48
|
+
@import './icon-btn.css';
|
|
49
|
+
@import './bottom-nav.css';
|
|
50
|
+
@import './spinner.css';
|
package/src/components/input.css
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
2
|
Component: Form Inputs
|
|
3
3
|
Surface bg, clean borders, focus ring.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Input: associate with <label for="id"> or aria-label
|
|
7
|
+
- Error state: add aria-invalid="true" + aria-describedby pointing to error msg
|
|
8
|
+
- Required: add aria-required="true" or HTML required attribute
|
|
9
|
+
- Input group: icon is decorative (pointer-events: none), no ARIA needed
|
|
10
|
+
- Checkbox/radio: use native <input type="checkbox|radio"> inside <label>
|
|
4
11
|
========================================================================== */
|
|
5
12
|
|
|
6
13
|
.ds-label {
|
|
@@ -8,7 +15,7 @@
|
|
|
8
15
|
font-size: var(--ds-text-sm);
|
|
9
16
|
font-weight: var(--ds-weight-medium);
|
|
10
17
|
color: var(--ds-color-text-secondary);
|
|
11
|
-
margin-
|
|
18
|
+
margin-block-end: var(--ds-space-1-5);
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
.ds-input,
|
|
@@ -55,6 +62,7 @@
|
|
|
55
62
|
.ds-select:focus-visible {
|
|
56
63
|
border-color: var(--ds-ring-color);
|
|
57
64
|
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
65
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
58
66
|
}
|
|
59
67
|
|
|
60
68
|
.ds-input::placeholder,
|
|
@@ -114,7 +122,7 @@
|
|
|
114
122
|
}
|
|
115
123
|
|
|
116
124
|
.ds-select--lg {
|
|
117
|
-
padding-
|
|
125
|
+
padding-inline-end: var(--ds-space-8);
|
|
118
126
|
}
|
|
119
127
|
|
|
120
128
|
/* Textarea */
|
|
@@ -131,7 +139,7 @@
|
|
|
131
139
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
|
|
132
140
|
background-repeat: no-repeat;
|
|
133
141
|
background-position: right var(--ds-space-3) center;
|
|
134
|
-
padding-
|
|
142
|
+
padding-inline-end: var(--ds-space-8);
|
|
135
143
|
}
|
|
136
144
|
|
|
137
145
|
/* --- Layout Modifiers ---
|
|
@@ -170,35 +178,35 @@
|
|
|
170
178
|
/* --- Input Group: icon-right ---
|
|
171
179
|
Move icon to the right side, flip input padding. */
|
|
172
180
|
.ds-input-group--icon-right .ds-input-group__icon {
|
|
173
|
-
|
|
174
|
-
|
|
181
|
+
inset-inline-start: auto;
|
|
182
|
+
inset-inline-end: var(--ds-space-3);
|
|
175
183
|
}
|
|
176
184
|
.ds-input-group--icon-right .ds-input {
|
|
177
|
-
padding-
|
|
178
|
-
padding-
|
|
185
|
+
padding-inline-start: var(--ds-space-4);
|
|
186
|
+
padding-inline-end: calc(var(--ds-space-3) + 1rem + var(--ds-space-2));
|
|
179
187
|
}
|
|
180
188
|
|
|
181
189
|
/* Help text */
|
|
182
190
|
.ds-help {
|
|
183
191
|
font-size: var(--ds-text-xs);
|
|
184
192
|
color: var(--ds-color-text-tertiary);
|
|
185
|
-
margin-
|
|
193
|
+
margin-block-start: var(--ds-space-1-5);
|
|
186
194
|
}
|
|
187
195
|
.ds-help--error { color: var(--ds-color-error); }
|
|
188
196
|
|
|
189
197
|
/* Form Group (legacy — prefer ds-form) */
|
|
190
|
-
.ds-form-group { margin-
|
|
198
|
+
.ds-form-group { margin-block-end: var(--ds-space-4); }
|
|
191
199
|
|
|
192
200
|
/* --- Form Stack ---
|
|
193
201
|
Vertical form layout: comfortable spacing between fields (24px),
|
|
194
202
|
extra breathing room before the action area (32px).
|
|
195
203
|
Use ds-form__actions on the button/submit wrapper. */
|
|
196
204
|
.ds-form > * + * {
|
|
197
|
-
margin-
|
|
205
|
+
margin-block-start: var(--ds-space-6);
|
|
198
206
|
}
|
|
199
207
|
|
|
200
208
|
.ds-form__actions {
|
|
201
|
-
margin-
|
|
209
|
+
margin-block-start: var(--ds-space-8);
|
|
202
210
|
}
|
|
203
211
|
|
|
204
212
|
/* --- Input Group ---
|
|
@@ -210,8 +218,8 @@
|
|
|
210
218
|
|
|
211
219
|
.ds-input-group__icon {
|
|
212
220
|
position: absolute;
|
|
213
|
-
|
|
214
|
-
|
|
221
|
+
inset-inline-start: var(--ds-space-3);
|
|
222
|
+
inset-block-start: 50%;
|
|
215
223
|
transform: translateY(-50%);
|
|
216
224
|
display: flex;
|
|
217
225
|
align-items: center;
|
|
@@ -221,7 +229,7 @@
|
|
|
221
229
|
}
|
|
222
230
|
|
|
223
231
|
.ds-input-group .ds-input {
|
|
224
|
-
padding-
|
|
232
|
+
padding-inline-start: calc(var(--ds-space-3) + 1rem + var(--ds-space-2));
|
|
225
233
|
}
|
|
226
234
|
|
|
227
235
|
/* Checkbox / Radio */
|
|
@@ -237,6 +245,8 @@
|
|
|
237
245
|
.ds-checkbox input,
|
|
238
246
|
.ds-radio input {
|
|
239
247
|
accent-color: var(--ds-color-interactive);
|
|
240
|
-
width:
|
|
241
|
-
height:
|
|
248
|
+
width: 1rem;
|
|
249
|
+
height: 1rem;
|
|
250
|
+
min-width: 1.5rem; /* WCAG 2.5.8: minimum 24px target */
|
|
251
|
+
min-height: 1.5rem;
|
|
242
252
|
}
|
package/src/components/kbd.css
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
font-size: var(--ds-text-xs);
|
|
28
28
|
background-color: var(--ds-color-bg-elevated);
|
|
29
29
|
border: 1px solid var(--ds-color-border);
|
|
30
|
-
border-
|
|
30
|
+
border-block-end-width: 2px;
|
|
31
31
|
border-radius: var(--ds-radius-sm);
|
|
32
32
|
color: var(--ds-color-text-secondary);
|
|
33
33
|
line-height: 1;
|
package/src/components/modal.css
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
2
|
Component: Modal
|
|
3
3
|
Backdrop blur, shadow-2xl, rounded-xl. Smooth scale transition.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Container: role="dialog", aria-modal="true", aria-labelledby="[title-id]"
|
|
7
|
+
- Close button: aria-label="Close"
|
|
8
|
+
- Focus: trap focus inside modal when open
|
|
9
|
+
- Keyboard: Escape closes modal
|
|
10
|
+
- On open: move focus to first focusable element or close button
|
|
11
|
+
- On close: return focus to the element that triggered the modal
|
|
4
12
|
========================================================================== */
|
|
5
13
|
|
|
6
14
|
.ds-modal {
|
|
@@ -52,7 +60,7 @@
|
|
|
52
60
|
align-items: flex-start;
|
|
53
61
|
justify-content: space-between;
|
|
54
62
|
padding: var(--ds-space-4) var(--ds-space-5);
|
|
55
|
-
border-
|
|
63
|
+
border-block-end: 1px solid var(--ds-color-border);
|
|
56
64
|
}
|
|
57
65
|
|
|
58
66
|
.ds-modal__header h3 {
|
|
@@ -65,7 +73,7 @@
|
|
|
65
73
|
.ds-modal__header p {
|
|
66
74
|
font-size: var(--ds-text-sm);
|
|
67
75
|
color: var(--ds-color-text-tertiary);
|
|
68
|
-
margin-
|
|
76
|
+
margin-block-start: var(--ds-space-1);
|
|
69
77
|
}
|
|
70
78
|
|
|
71
79
|
.ds-modal__close {
|
|
@@ -85,6 +93,7 @@
|
|
|
85
93
|
.ds-modal__close:focus-visible {
|
|
86
94
|
outline: none;
|
|
87
95
|
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
96
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
88
97
|
}
|
|
89
98
|
|
|
90
99
|
.ds-modal__body {
|
|
@@ -99,9 +108,27 @@
|
|
|
99
108
|
justify-content: flex-end;
|
|
100
109
|
gap: var(--ds-space-2);
|
|
101
110
|
padding: var(--ds-space-4) var(--ds-space-5);
|
|
102
|
-
border-
|
|
111
|
+
border-block-start: 1px solid var(--ds-color-border);
|
|
103
112
|
}
|
|
104
113
|
|
|
105
114
|
/* Size variants */
|
|
106
115
|
.ds-modal--md .ds-modal__content { max-width: var(--ds-container-md); }
|
|
107
116
|
.ds-modal--lg .ds-modal__content { max-width: var(--ds-container-lg); }
|
|
117
|
+
|
|
118
|
+
/* Fullscreen on mobile */
|
|
119
|
+
@media (max-width: 1023px) /* below --ds-breakpoint-lg */ {
|
|
120
|
+
.ds-modal--fullscreen-mobile .ds-modal__content {
|
|
121
|
+
max-width: none;
|
|
122
|
+
max-height: none;
|
|
123
|
+
width: 100%;
|
|
124
|
+
height: 100dvh;
|
|
125
|
+
margin: 0;
|
|
126
|
+
border-radius: 0;
|
|
127
|
+
border: none;
|
|
128
|
+
box-shadow: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ds-modal--fullscreen-mobile {
|
|
132
|
+
padding: 0;
|
|
133
|
+
}
|
|
134
|
+
}
|