@digiko-npm/designsystem 0.7.2 → 0.8.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/dist/designsystem.css +6682 -4515
- package/dist/designsystem.min.css +2 -2
- package/package.json +18 -3
- package/src/components/accordion.css +129 -128
- package/src/components/alert.css +137 -134
- package/src/components/avatar.css +77 -77
- package/src/components/badge.css +52 -52
- package/src/components/bottom-nav.css +71 -71
- package/src/components/bottom-sheet.css +146 -0
- package/src/components/breadcrumb.css +61 -61
- package/src/components/button.css +162 -154
- package/src/components/card.css +94 -72
- package/src/components/chip.css +38 -38
- package/src/components/collapsible.css +96 -100
- package/src/components/color-picker.css +82 -0
- package/src/components/combobox.css +418 -0
- package/src/components/command.css +141 -140
- package/src/components/copy-button.css +106 -0
- package/src/components/datepicker.css +257 -251
- package/src/components/description-list.css +89 -87
- package/src/components/divider.css +45 -45
- package/src/components/drawer.css +185 -174
- package/src/components/drop-zone.css +85 -84
- package/src/components/dropdown.css +148 -140
- package/src/components/empty-state.css +50 -50
- package/src/components/field.css +35 -0
- package/src/components/gallery.css +257 -0
- package/src/components/icon-btn.css +2 -1
- package/src/components/index.css +14 -3
- package/src/components/input.css +205 -146
- package/src/components/kbd.css +10 -10
- package/src/components/modal.css +92 -90
- package/src/components/nav.css +140 -138
- package/src/components/number-input.css +163 -0
- package/src/components/pagination.css +152 -139
- package/src/components/pin-input.css +136 -0
- package/src/components/popover.css +72 -72
- package/src/components/progress.css +128 -129
- package/src/components/result.css +53 -57
- package/src/components/scroll-area.css +73 -0
- package/src/components/search.css +10 -4
- package/src/components/segmented-control.css +93 -0
- package/src/components/skeleton.css +58 -58
- package/src/components/slider.css +102 -100
- package/src/components/sortable.css +44 -45
- package/src/components/spinner.css +27 -27
- package/src/components/star-rating.css +121 -0
- package/src/components/stat-card.css +38 -25
- package/src/components/table.css +288 -3
- package/src/components/tabs.css +121 -121
- package/src/components/tag.css +124 -124
- package/src/components/timeline.css +99 -99
- package/src/components/toast.css +37 -38
- package/src/components/toggle.css +88 -88
- package/src/components/toolbar.css +137 -121
- package/src/components/tooltip.css +150 -150
- package/src/components/truncated-text.css +75 -0
- package/src/tokens/tokens.json +413 -0
|
@@ -53,47 +53,47 @@
|
|
|
53
53
|
background-color: var(--ds-color-bg-muted);
|
|
54
54
|
border-radius: var(--ds-radius-full);
|
|
55
55
|
overflow: hidden;
|
|
56
|
-
}
|
|
57
56
|
|
|
58
|
-
/* Fill */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
57
|
+
/* Fill */
|
|
58
|
+
&__bar {
|
|
59
|
+
height: 100%;
|
|
60
|
+
min-width: 0.25rem;
|
|
61
|
+
background-color: var(--ds-color-inverted);
|
|
62
|
+
border-radius: var(--ds-radius-full);
|
|
63
|
+
transition: width var(--ds-duration-normal) var(--ds-ease-default);
|
|
64
|
+
}
|
|
66
65
|
|
|
67
|
-
/* ---------------------------------------------------------------------------
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
/* ---------------------------------------------------------------------------
|
|
67
|
+
Sizes
|
|
68
|
+
--------------------------------------------------------------------------- */
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
70
|
+
&--sm {
|
|
71
|
+
height: 0.25rem;
|
|
72
|
+
}
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
74
|
+
&--lg {
|
|
75
|
+
height: 0.75rem;
|
|
76
|
+
}
|
|
78
77
|
|
|
79
|
-
/* ---------------------------------------------------------------------------
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
/* ---------------------------------------------------------------------------
|
|
79
|
+
Status colours
|
|
80
|
+
--------------------------------------------------------------------------- */
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
82
|
+
&--success .ds-progress__bar {
|
|
83
|
+
background-color: var(--ds-color-success);
|
|
84
|
+
}
|
|
86
85
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
86
|
+
&--warning .ds-progress__bar {
|
|
87
|
+
background-color: var(--ds-color-warning);
|
|
88
|
+
}
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
90
|
+
&--error .ds-progress__bar {
|
|
91
|
+
background-color: var(--ds-color-error);
|
|
92
|
+
}
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
&--info .ds-progress__bar {
|
|
95
|
+
background-color: var(--ds-color-info);
|
|
96
|
+
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/* ==========================================================================
|
|
@@ -106,12 +106,27 @@
|
|
|
106
106
|
flex-direction: row;
|
|
107
107
|
align-items: center;
|
|
108
108
|
gap: 0;
|
|
109
|
-
}
|
|
110
109
|
|
|
111
|
-
/* Vertical variant */
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
/* Vertical variant */
|
|
111
|
+
&--vertical {
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
align-items: flex-start;
|
|
114
|
+
|
|
115
|
+
& .ds-step__connector {
|
|
116
|
+
flex: none;
|
|
117
|
+
width: 2px;
|
|
118
|
+
height: 2rem;
|
|
119
|
+
min-width: auto;
|
|
120
|
+
margin-inline: 0;
|
|
121
|
+
margin-inline-start: calc(1rem - 1px); /* center under the 2 rem indicator */
|
|
122
|
+
margin-block: var(--ds-space-1);
|
|
123
|
+
background-color: var(--ds-color-border-subtle);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
& .ds-step--completed + .ds-step__connector {
|
|
127
|
+
background-color: var(--ds-color-inverted);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
115
130
|
}
|
|
116
131
|
|
|
117
132
|
/* ---------------------------------------------------------------------------
|
|
@@ -122,97 +137,81 @@
|
|
|
122
137
|
display: flex;
|
|
123
138
|
align-items: center;
|
|
124
139
|
gap: var(--ds-space-3);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/* Circle indicator */
|
|
128
|
-
.ds-step__indicator {
|
|
129
|
-
display: flex;
|
|
130
|
-
align-items: center;
|
|
131
|
-
justify-content: center;
|
|
132
|
-
width: 2rem;
|
|
133
|
-
height: 2rem;
|
|
134
|
-
border-radius: var(--ds-radius-full);
|
|
135
|
-
border: 2px solid var(--ds-color-border);
|
|
136
|
-
font-size: var(--ds-text-xs);
|
|
137
|
-
font-weight: var(--ds-weight-medium);
|
|
138
|
-
color: var(--ds-color-text-tertiary);
|
|
139
|
-
background-color: var(--ds-color-surface);
|
|
140
|
-
flex-shrink: 0;
|
|
141
|
-
transition:
|
|
142
|
-
background-color var(--ds-duration-fast) var(--ds-ease-default),
|
|
143
|
-
border-color var(--ds-duration-fast) var(--ds-ease-default),
|
|
144
|
-
color var(--ds-duration-fast) var(--ds-ease-default);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/* Completed step */
|
|
148
|
-
.ds-step--completed .ds-step__indicator {
|
|
149
|
-
background-color: var(--ds-color-inverted);
|
|
150
|
-
border-color: var(--ds-color-inverted);
|
|
151
|
-
color: var(--ds-color-on-inverted);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/* Current step */
|
|
155
|
-
.ds-step--current .ds-step__indicator {
|
|
156
|
-
border-color: var(--ds-color-interactive);
|
|
157
|
-
color: var(--ds-color-text);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/* Error step */
|
|
161
|
-
.ds-step--error .ds-step__indicator {
|
|
162
|
-
border-color: var(--ds-color-error);
|
|
163
|
-
color: var(--ds-color-error);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/* ---------------------------------------------------------------------------
|
|
167
|
-
Step content
|
|
168
|
-
--------------------------------------------------------------------------- */
|
|
169
|
-
|
|
170
|
-
.ds-step__content {
|
|
171
|
-
display: flex;
|
|
172
|
-
flex-direction: column;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.ds-step__title {
|
|
176
|
-
font-size: var(--ds-text-sm);
|
|
177
|
-
font-weight: var(--ds-weight-medium);
|
|
178
|
-
color: var(--ds-color-text);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.ds-step__description {
|
|
182
|
-
font-size: var(--ds-text-xs);
|
|
183
|
-
color: var(--ds-color-text-tertiary);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/* ---------------------------------------------------------------------------
|
|
187
|
-
Connector (line between steps)
|
|
188
|
-
--------------------------------------------------------------------------- */
|
|
189
|
-
|
|
190
|
-
/* Horizontal connector */
|
|
191
|
-
.ds-step__connector {
|
|
192
|
-
flex: 1;
|
|
193
|
-
height: 2px;
|
|
194
|
-
min-width: var(--ds-space-4);
|
|
195
|
-
background-color: var(--ds-color-border);
|
|
196
|
-
margin-inline: var(--ds-space-2);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/* Filled connector after a completed step */
|
|
200
|
-
.ds-step--completed + .ds-step__connector {
|
|
201
|
-
background-color: var(--ds-color-inverted);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/* Vertical connector */
|
|
205
|
-
.ds-steps--vertical .ds-step__connector {
|
|
206
|
-
flex: none;
|
|
207
|
-
width: 2px;
|
|
208
|
-
height: 2rem;
|
|
209
|
-
min-width: auto;
|
|
210
|
-
margin-inline: 0;
|
|
211
|
-
margin-inline-start: calc(1rem - 1px); /* center under the 2 rem indicator */
|
|
212
|
-
margin-block: var(--ds-space-1);
|
|
213
|
-
background-color: var(--ds-color-border-subtle);
|
|
214
|
-
}
|
|
215
140
|
|
|
216
|
-
|
|
217
|
-
|
|
141
|
+
/* Circle indicator */
|
|
142
|
+
&__indicator {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
width: 2rem;
|
|
147
|
+
height: 2rem;
|
|
148
|
+
border-radius: var(--ds-radius-full);
|
|
149
|
+
border: 2px solid var(--ds-color-border);
|
|
150
|
+
font-size: var(--ds-text-xs);
|
|
151
|
+
font-weight: var(--ds-weight-medium);
|
|
152
|
+
color: var(--ds-color-text-tertiary);
|
|
153
|
+
background-color: var(--ds-color-surface);
|
|
154
|
+
flex-shrink: 0;
|
|
155
|
+
transition:
|
|
156
|
+
background-color var(--ds-duration-fast) var(--ds-ease-default),
|
|
157
|
+
border-color var(--ds-duration-fast) var(--ds-ease-default),
|
|
158
|
+
color var(--ds-duration-fast) var(--ds-ease-default);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Completed step */
|
|
162
|
+
&--completed &__indicator {
|
|
163
|
+
background-color: var(--ds-color-inverted);
|
|
164
|
+
border-color: var(--ds-color-inverted);
|
|
165
|
+
color: var(--ds-color-on-inverted);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Current step */
|
|
169
|
+
&--current &__indicator {
|
|
170
|
+
border-color: var(--ds-color-interactive);
|
|
171
|
+
color: var(--ds-color-text);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Error step */
|
|
175
|
+
&--error &__indicator {
|
|
176
|
+
border-color: var(--ds-color-error);
|
|
177
|
+
color: var(--ds-color-error);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* ---------------------------------------------------------------------------
|
|
181
|
+
Step content
|
|
182
|
+
--------------------------------------------------------------------------- */
|
|
183
|
+
|
|
184
|
+
&__content {
|
|
185
|
+
display: flex;
|
|
186
|
+
flex-direction: column;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&__title {
|
|
190
|
+
font-size: var(--ds-text-sm);
|
|
191
|
+
font-weight: var(--ds-weight-medium);
|
|
192
|
+
color: var(--ds-color-text);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&__description {
|
|
196
|
+
font-size: var(--ds-text-xs);
|
|
197
|
+
color: var(--ds-color-text-tertiary);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* ---------------------------------------------------------------------------
|
|
201
|
+
Connector (line between steps)
|
|
202
|
+
--------------------------------------------------------------------------- */
|
|
203
|
+
|
|
204
|
+
/* Horizontal connector */
|
|
205
|
+
&__connector {
|
|
206
|
+
flex: 1;
|
|
207
|
+
height: 2px;
|
|
208
|
+
min-width: var(--ds-space-4);
|
|
209
|
+
background-color: var(--ds-color-border);
|
|
210
|
+
margin-inline: var(--ds-space-2);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Filled connector after a completed step */
|
|
214
|
+
&--completed + &__connector {
|
|
215
|
+
background-color: var(--ds-color-inverted);
|
|
216
|
+
}
|
|
218
217
|
}
|
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
Feedback page for success, error, 404, empty, etc.
|
|
4
4
|
========================================================================== */
|
|
5
5
|
|
|
6
|
-
/* ---------------------------------------------------------------------------
|
|
7
|
-
Container
|
|
8
|
-
--------------------------------------------------------------------------- */
|
|
9
|
-
|
|
10
6
|
.ds-result {
|
|
11
7
|
display: flex;
|
|
12
8
|
flex-direction: column;
|
|
@@ -15,70 +11,70 @@
|
|
|
15
11
|
padding: var(--ds-space-12) var(--ds-space-6);
|
|
16
12
|
max-width: 28rem;
|
|
17
13
|
margin-inline: auto;
|
|
18
|
-
}
|
|
19
14
|
|
|
20
|
-
/* ---------------------------------------------------------------------------
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
/* ---------------------------------------------------------------------------
|
|
16
|
+
Icon
|
|
17
|
+
--------------------------------------------------------------------------- */
|
|
23
18
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
19
|
+
&__icon {
|
|
20
|
+
width: 3rem;
|
|
21
|
+
height: 3rem;
|
|
22
|
+
margin-block-end: var(--ds-space-4);
|
|
23
|
+
color: var(--ds-color-text-secondary);
|
|
24
|
+
}
|
|
30
25
|
|
|
31
|
-
/* ---------------------------------------------------------------------------
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
/* ---------------------------------------------------------------------------
|
|
27
|
+
Title
|
|
28
|
+
--------------------------------------------------------------------------- */
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
30
|
+
&__title {
|
|
31
|
+
font-family: var(--ds-font-display);
|
|
32
|
+
font-weight: var(--ds-weight-semibold);
|
|
33
|
+
font-size: var(--ds-text-xl);
|
|
34
|
+
color: var(--ds-color-text);
|
|
35
|
+
line-height: var(--ds-leading-tight);
|
|
36
|
+
}
|
|
42
37
|
|
|
43
|
-
/* ---------------------------------------------------------------------------
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
/* ---------------------------------------------------------------------------
|
|
39
|
+
Description
|
|
40
|
+
--------------------------------------------------------------------------- */
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
42
|
+
&__description {
|
|
43
|
+
font-size: var(--ds-text-sm);
|
|
44
|
+
color: var(--ds-color-text-secondary);
|
|
45
|
+
line-height: var(--ds-leading-relaxed);
|
|
46
|
+
margin-block-start: var(--ds-space-2);
|
|
47
|
+
}
|
|
53
48
|
|
|
54
|
-
/* ---------------------------------------------------------------------------
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
/* ---------------------------------------------------------------------------
|
|
50
|
+
Actions
|
|
51
|
+
--------------------------------------------------------------------------- */
|
|
57
52
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
53
|
+
&__actions {
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
gap: var(--ds-space-3);
|
|
58
|
+
margin-block-start: var(--ds-space-6);
|
|
59
|
+
}
|
|
65
60
|
|
|
66
|
-
/* ---------------------------------------------------------------------------
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
/* ---------------------------------------------------------------------------
|
|
62
|
+
Semantic variants — icon color
|
|
63
|
+
--------------------------------------------------------------------------- */
|
|
69
64
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
65
|
+
&--success &__icon {
|
|
66
|
+
color: var(--ds-color-success);
|
|
67
|
+
}
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
69
|
+
&--warning &__icon {
|
|
70
|
+
color: var(--ds-color-warning);
|
|
71
|
+
}
|
|
77
72
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
73
|
+
&--error &__icon {
|
|
74
|
+
color: var(--ds-color-error);
|
|
75
|
+
}
|
|
81
76
|
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
&--info &__icon {
|
|
78
|
+
color: var(--ds-color-info);
|
|
79
|
+
}
|
|
84
80
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Scroll Area
|
|
3
|
+
Custom-styled scrollbar for overflow containers. Cross-browser.
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
<div class="ds-scroll-area" style="max-height: 20rem;">
|
|
7
|
+
...long content...
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
Modifiers:
|
|
11
|
+
.ds-scroll-area--horizontal — Horizontal scroll
|
|
12
|
+
.ds-scroll-area--both — Both directions
|
|
13
|
+
.ds-scroll-area--thin — Thinner scrollbar
|
|
14
|
+
========================================================================== */
|
|
15
|
+
|
|
16
|
+
.ds-scroll-area {
|
|
17
|
+
overflow-y: auto;
|
|
18
|
+
overscroll-behavior: contain;
|
|
19
|
+
|
|
20
|
+
/* Firefox */
|
|
21
|
+
scrollbar-width: thin;
|
|
22
|
+
scrollbar-color: var(--ds-scrollbar-thumb) transparent;
|
|
23
|
+
|
|
24
|
+
/* WebKit (Chrome, Safari, Edge) */
|
|
25
|
+
&::-webkit-scrollbar {
|
|
26
|
+
width: 8px;
|
|
27
|
+
height: 8px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::-webkit-scrollbar-track {
|
|
31
|
+
background: transparent;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&::-webkit-scrollbar-thumb {
|
|
35
|
+
background-color: var(--ds-scrollbar-thumb);
|
|
36
|
+
border-radius: var(--ds-radius-full);
|
|
37
|
+
border: 2px solid transparent;
|
|
38
|
+
background-clip: padding-box;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
42
|
+
background-color: var(--ds-scrollbar-thumb-hover);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&::-webkit-scrollbar-corner {
|
|
46
|
+
background: transparent;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* --- Horizontal --- */
|
|
50
|
+
&--horizontal {
|
|
51
|
+
overflow-y: hidden;
|
|
52
|
+
overflow-x: auto;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* --- Both directions --- */
|
|
56
|
+
&--both {
|
|
57
|
+
overflow: auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* --- Thin variant --- */
|
|
61
|
+
&--thin {
|
|
62
|
+
scrollbar-width: thin;
|
|
63
|
+
|
|
64
|
+
&::-webkit-scrollbar {
|
|
65
|
+
width: 4px;
|
|
66
|
+
height: 4px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::-webkit-scrollbar-thumb {
|
|
70
|
+
border: 1px solid transparent;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
transition:
|
|
42
42
|
border-color var(--ds-duration-fast) var(--ds-ease-default),
|
|
43
43
|
box-shadow var(--ds-duration-fast) var(--ds-ease-default);
|
|
44
|
+
container-type: inline-size;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Container query: hide shortcut hint when search is narrow */
|
|
48
|
+
@container (max-width: 240px) {
|
|
49
|
+
.ds-search__shortcut { display: none; }
|
|
44
50
|
}
|
|
45
51
|
|
|
46
52
|
.ds-search:focus-within {
|
|
@@ -275,8 +281,8 @@
|
|
|
275
281
|
border-radius: 0;
|
|
276
282
|
padding: 0 var(--ds-space-3);
|
|
277
283
|
background: var(--ds-color-nav-bg);
|
|
278
|
-
backdrop-filter: blur(
|
|
279
|
-
-webkit-backdrop-filter: blur(
|
|
284
|
+
backdrop-filter: blur(var(--ds-blur-lg)) saturate(1.5);
|
|
285
|
+
-webkit-backdrop-filter: blur(var(--ds-blur-lg)) saturate(1.5);
|
|
280
286
|
}
|
|
281
287
|
|
|
282
288
|
.ds-search__dropdown--mobile {
|
|
@@ -288,7 +294,7 @@
|
|
|
288
294
|
border-inline-end: none;
|
|
289
295
|
max-height: calc(100dvh - var(--ds-search-bar-height, 3.5rem));
|
|
290
296
|
background: var(--ds-color-surface);
|
|
291
|
-
backdrop-filter: blur(
|
|
292
|
-
-webkit-backdrop-filter: blur(
|
|
297
|
+
backdrop-filter: blur(var(--ds-blur-lg)) saturate(1.5);
|
|
298
|
+
-webkit-backdrop-filter: blur(var(--ds-blur-lg)) saturate(1.5);
|
|
293
299
|
}
|
|
294
300
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Segmented Control
|
|
3
|
+
Toggle between 2-5 mutually exclusive options. Compact alternative to tabs.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Container: role="radiogroup", aria-label="[description]"
|
|
7
|
+
- Each segment: role="radio", aria-checked="true|false"
|
|
8
|
+
- Keyboard: ArrowLeft/Right to navigate, Space/Enter to select
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
<div class="ds-segmented" role="radiogroup" aria-label="View">
|
|
12
|
+
<button class="ds-segmented__item ds-segmented__item--active" role="radio" aria-checked="true">Grid</button>
|
|
13
|
+
<button class="ds-segmented__item" role="radio" aria-checked="false">List</button>
|
|
14
|
+
<button class="ds-segmented__item" role="radio" aria-checked="false">Board</button>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
Modifiers:
|
|
18
|
+
.ds-segmented--sm — Smaller size
|
|
19
|
+
.ds-segmented--full — Full width (items stretch equally)
|
|
20
|
+
========================================================================== */
|
|
21
|
+
|
|
22
|
+
.ds-segmented {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
gap: var(--ds-space-0-5);
|
|
26
|
+
padding: var(--ds-space-0-5);
|
|
27
|
+
background-color: var(--ds-color-bg-elevated);
|
|
28
|
+
border-radius: var(--ds-radius-lg);
|
|
29
|
+
border: 1px solid var(--ds-color-border-subtle);
|
|
30
|
+
|
|
31
|
+
&__item {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
gap: var(--ds-space-1-5);
|
|
36
|
+
padding: var(--ds-space-1-5) var(--ds-space-3);
|
|
37
|
+
font-family: var(--ds-font-sans);
|
|
38
|
+
font-size: var(--ds-text-sm);
|
|
39
|
+
font-weight: var(--ds-weight-medium);
|
|
40
|
+
line-height: var(--ds-leading-none);
|
|
41
|
+
color: var(--ds-color-text-secondary);
|
|
42
|
+
background: transparent;
|
|
43
|
+
border: none;
|
|
44
|
+
border-radius: var(--ds-radius-md);
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
transition: all var(--ds-duration-fast) var(--ds-ease-default);
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
color: var(--ds-color-text);
|
|
51
|
+
background-color: var(--ds-color-overlay-hover);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
outline: none;
|
|
56
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
57
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--active {
|
|
61
|
+
background-color: var(--ds-color-surface);
|
|
62
|
+
color: var(--ds-color-text);
|
|
63
|
+
box-shadow: var(--ds-shadow-sm);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:disabled,
|
|
67
|
+
&[aria-disabled="true"] {
|
|
68
|
+
opacity: var(--ds-opacity-disabled);
|
|
69
|
+
cursor: not-allowed;
|
|
70
|
+
pointer-events: none;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* --- Small variant --- */
|
|
75
|
+
&--sm {
|
|
76
|
+
padding: 2px;
|
|
77
|
+
|
|
78
|
+
& .ds-segmented__item {
|
|
79
|
+
padding: var(--ds-space-1) var(--ds-space-2);
|
|
80
|
+
font-size: var(--ds-text-xs);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* --- Full width --- */
|
|
85
|
+
&--full {
|
|
86
|
+
display: flex;
|
|
87
|
+
width: 100%;
|
|
88
|
+
|
|
89
|
+
& .ds-segmented__item {
|
|
90
|
+
flex: 1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|