@adamarant/designsystem 0.11.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.
- package/README.md +101 -0
- package/dist/designsystem.css +13494 -0
- package/dist/designsystem.js +67 -0
- package/dist/designsystem.min.css +2 -0
- package/package.json +111 -0
- package/src/base/index.css +2 -0
- package/src/base/reset.css +119 -0
- package/src/base/typography.css +172 -0
- package/src/components/accordion.css +166 -0
- package/src/components/admin-layout.css +371 -0
- package/src/components/alert.css +159 -0
- package/src/components/avatar.css +109 -0
- package/src/components/badge.css +80 -0
- package/src/components/bottom-nav.css +125 -0
- package/src/components/bottom-sheet.css +146 -0
- package/src/components/breadcrumb.css +102 -0
- package/src/components/button.css +250 -0
- package/src/components/card.css +117 -0
- package/src/components/chip.css +79 -0
- package/src/components/collapsible.css +112 -0
- package/src/components/color-picker.css +82 -0
- package/src/components/combobox.css +420 -0
- package/src/components/command.css +210 -0
- package/src/components/context-menu.css +162 -0
- package/src/components/copy-button.css +106 -0
- package/src/components/custom-select.css +446 -0
- package/src/components/datepicker.css +301 -0
- package/src/components/description-list.css +100 -0
- package/src/components/divider.css +66 -0
- package/src/components/drawer.css +234 -0
- package/src/components/drop-zone.css +166 -0
- package/src/components/dropdown.css +169 -0
- package/src/components/empty-state.css +75 -0
- package/src/components/field.css +112 -0
- package/src/components/gallery.css +257 -0
- package/src/components/hero.css +111 -0
- package/src/components/icon-btn.css +103 -0
- package/src/components/index.css +74 -0
- package/src/components/input.css +311 -0
- package/src/components/kbd.css +54 -0
- package/src/components/media-library.css +230 -0
- package/src/components/modal.css +136 -0
- package/src/components/nav.css +198 -0
- package/src/components/number-input.css +163 -0
- package/src/components/pagination.css +175 -0
- package/src/components/pin-input.css +136 -0
- package/src/components/popover.css +111 -0
- package/src/components/progress.css +217 -0
- package/src/components/prose.css +337 -0
- package/src/components/result.css +80 -0
- package/src/components/scroll-area.css +73 -0
- package/src/components/search.css +311 -0
- package/src/components/segmented-control.css +94 -0
- package/src/components/skeleton.css +100 -0
- package/src/components/slider.css +133 -0
- package/src/components/sortable.css +70 -0
- package/src/components/spinner.css +60 -0
- package/src/components/star-rating.css +121 -0
- package/src/components/stat-card.css +44 -0
- package/src/components/table.css +359 -0
- package/src/components/tabs.css +215 -0
- package/src/components/tag.css +188 -0
- package/src/components/timeline.css +130 -0
- package/src/components/toast.css +90 -0
- package/src/components/toggle.css +173 -0
- package/src/components/toolbar.css +206 -0
- package/src/components/tooltip.css +167 -0
- package/src/components/truncated-text.css +75 -0
- package/src/index.css +21 -0
- package/src/js/theme.js +67 -0
- package/src/tokens/colors.css +256 -0
- package/src/tokens/index.css +11 -0
- package/src/tokens/shadows.css +55 -0
- package/src/tokens/spacing.css +82 -0
- package/src/tokens/tokens.json +413 -0
- package/src/tokens/typography.css +90 -0
- package/src/utilities/a11y.css +102 -0
- package/src/utilities/index.css +7 -0
- package/src/utilities/interactive.css +121 -0
- package/src/utilities/layout.css +273 -0
- package/src/utilities/sizing.css +85 -0
- package/src/utilities/spacing.css +204 -0
- package/src/utilities/states.css +182 -0
- package/src/utilities/text.css +381 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Gallery
|
|
3
|
+
Image gallery with main image, thumbnail strip, and lightbox overlay.
|
|
4
|
+
|
|
5
|
+
ARIA requirements (consumer responsibility):
|
|
6
|
+
- Container: role="region", aria-label="Image gallery"
|
|
7
|
+
- Thumbnails: role="tablist", individual thumbnails role="tab"
|
|
8
|
+
- Main image: role="img", alt text required
|
|
9
|
+
- Lightbox: role="dialog", aria-label="Image viewer"
|
|
10
|
+
- Lightbox close: aria-label="Close"
|
|
11
|
+
- Navigation: aria-label="Previous image" / "Next image"
|
|
12
|
+
- Keyboard: ArrowLeft/Right for navigation, Escape to close lightbox
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
<div class="ds-gallery">
|
|
16
|
+
<div class="ds-gallery__main">
|
|
17
|
+
<img src="..." alt="..." />
|
|
18
|
+
</div>
|
|
19
|
+
<div class="ds-gallery__thumbs">
|
|
20
|
+
<button class="ds-gallery__thumb ds-gallery__thumb--active">
|
|
21
|
+
<img src="..." alt="Thumbnail 1" />
|
|
22
|
+
</button>
|
|
23
|
+
<button class="ds-gallery__thumb">
|
|
24
|
+
<img src="..." alt="Thumbnail 2" />
|
|
25
|
+
</button>
|
|
26
|
+
<button class="ds-gallery__thumb-more">+3</button>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
Lightbox overlay:
|
|
31
|
+
<div class="ds-lightbox ds-lightbox--open">
|
|
32
|
+
<button class="ds-lightbox__close" aria-label="Close">×</button>
|
|
33
|
+
<button class="ds-lightbox__prev" aria-label="Previous">‹</button>
|
|
34
|
+
<img class="ds-lightbox__image" src="..." alt="..." />
|
|
35
|
+
<button class="ds-lightbox__next" aria-label="Next">›</button>
|
|
36
|
+
<span class="ds-lightbox__counter">2 / 8</span>
|
|
37
|
+
</div>
|
|
38
|
+
========================================================================== */
|
|
39
|
+
|
|
40
|
+
/* ==========================================================================
|
|
41
|
+
Gallery (thumbnails)
|
|
42
|
+
========================================================================== */
|
|
43
|
+
|
|
44
|
+
.ds-gallery {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
gap: var(--ds-space-2);
|
|
48
|
+
|
|
49
|
+
/* --- Main image --- */
|
|
50
|
+
&__main {
|
|
51
|
+
position: relative;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
border-radius: var(--ds-radius-xl);
|
|
54
|
+
background-color: var(--ds-color-surface-muted);
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
|
|
57
|
+
& img {
|
|
58
|
+
display: block;
|
|
59
|
+
width: 100%;
|
|
60
|
+
height: auto;
|
|
61
|
+
object-fit: cover;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* --- Thumbnail strip --- */
|
|
66
|
+
&__thumbs {
|
|
67
|
+
display: flex;
|
|
68
|
+
gap: var(--ds-space-2);
|
|
69
|
+
overflow-x: auto;
|
|
70
|
+
scrollbar-width: none;
|
|
71
|
+
-ms-overflow-style: none;
|
|
72
|
+
|
|
73
|
+
&::-webkit-scrollbar {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* --- Individual thumbnail --- */
|
|
79
|
+
&__thumb {
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
width: 4rem;
|
|
82
|
+
height: 4rem;
|
|
83
|
+
padding: 0;
|
|
84
|
+
border: 2px solid transparent;
|
|
85
|
+
border-radius: var(--ds-radius-md);
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
background: var(--ds-color-surface-muted);
|
|
89
|
+
transition:
|
|
90
|
+
border-color var(--ds-duration-fast) var(--ds-ease-default),
|
|
91
|
+
opacity var(--ds-duration-fast) var(--ds-ease-default);
|
|
92
|
+
|
|
93
|
+
& img {
|
|
94
|
+
display: block;
|
|
95
|
+
width: 100%;
|
|
96
|
+
height: 100%;
|
|
97
|
+
object-fit: cover;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:hover {
|
|
101
|
+
border-color: var(--ds-color-border-hover);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:focus-visible {
|
|
105
|
+
outline: none;
|
|
106
|
+
box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
|
|
107
|
+
scroll-margin-block: var(--ds-space-16, 4rem);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&--active {
|
|
111
|
+
border-color: var(--ds-color-interactive);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* --- "+N more" button --- */
|
|
116
|
+
&__thumb-more {
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
width: 4rem;
|
|
122
|
+
height: 4rem;
|
|
123
|
+
border: 1px solid var(--ds-color-border);
|
|
124
|
+
border-radius: var(--ds-radius-md);
|
|
125
|
+
background-color: var(--ds-color-surface-muted);
|
|
126
|
+
color: var(--ds-color-text-secondary);
|
|
127
|
+
font-size: var(--ds-text-sm);
|
|
128
|
+
font-weight: var(--ds-weight-medium);
|
|
129
|
+
font-family: var(--ds-font-sans);
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
132
|
+
|
|
133
|
+
&:hover {
|
|
134
|
+
background-color: var(--ds-color-surface-hover);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* ==========================================================================
|
|
140
|
+
Lightbox (fullscreen overlay)
|
|
141
|
+
========================================================================== */
|
|
142
|
+
|
|
143
|
+
.ds-lightbox {
|
|
144
|
+
position: fixed;
|
|
145
|
+
inset: 0;
|
|
146
|
+
z-index: var(--ds-z-modal);
|
|
147
|
+
display: none;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
background-color: rgba(0, 0, 0, 0.9);
|
|
151
|
+
|
|
152
|
+
&--open {
|
|
153
|
+
display: flex;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* --- Image --- */
|
|
157
|
+
&__image {
|
|
158
|
+
max-width: 90vw;
|
|
159
|
+
max-height: 85vh;
|
|
160
|
+
object-fit: contain;
|
|
161
|
+
border-radius: var(--ds-radius-md);
|
|
162
|
+
user-select: none;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* --- Close button --- */
|
|
166
|
+
&__close {
|
|
167
|
+
position: absolute;
|
|
168
|
+
inset-block-start: var(--ds-space-4);
|
|
169
|
+
inset-inline-end: var(--ds-space-4);
|
|
170
|
+
display: flex;
|
|
171
|
+
align-items: center;
|
|
172
|
+
justify-content: center;
|
|
173
|
+
width: var(--ds-size-3);
|
|
174
|
+
height: var(--ds-size-3);
|
|
175
|
+
border: none;
|
|
176
|
+
border-radius: var(--ds-radius-full);
|
|
177
|
+
background-color: rgba(255, 255, 255, 0.15);
|
|
178
|
+
color: var(--ds-color-on-inverted);
|
|
179
|
+
font-size: var(--ds-text-xl);
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
182
|
+
|
|
183
|
+
&:hover {
|
|
184
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&:focus-visible {
|
|
188
|
+
outline: none;
|
|
189
|
+
box-shadow: 0 0 0 var(--ds-ring-width) rgba(255, 255, 255, 0.5);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* --- Prev/Next navigation --- */
|
|
194
|
+
&__prev,
|
|
195
|
+
&__next {
|
|
196
|
+
position: absolute;
|
|
197
|
+
inset-block-start: 50%;
|
|
198
|
+
transform: translateY(-50%);
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
width: var(--ds-size-4);
|
|
203
|
+
height: var(--ds-size-4);
|
|
204
|
+
border: none;
|
|
205
|
+
border-radius: var(--ds-radius-full);
|
|
206
|
+
background-color: rgba(255, 255, 255, 0.15);
|
|
207
|
+
color: var(--ds-color-on-inverted);
|
|
208
|
+
font-size: var(--ds-text-2xl);
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
|
|
211
|
+
|
|
212
|
+
&:hover {
|
|
213
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&:focus-visible {
|
|
217
|
+
outline: none;
|
|
218
|
+
box-shadow: 0 0 0 var(--ds-ring-width) rgba(255, 255, 255, 0.5);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&:disabled {
|
|
222
|
+
opacity: var(--ds-opacity-disabled);
|
|
223
|
+
pointer-events: none;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&__prev {
|
|
228
|
+
inset-inline-start: var(--ds-space-4);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&__next {
|
|
232
|
+
inset-inline-end: var(--ds-space-4);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* --- Counter --- */
|
|
236
|
+
&__counter {
|
|
237
|
+
position: absolute;
|
|
238
|
+
inset-block-end: var(--ds-space-4);
|
|
239
|
+
inset-inline-start: 50%;
|
|
240
|
+
transform: translateX(-50%);
|
|
241
|
+
padding: var(--ds-space-1) var(--ds-space-3);
|
|
242
|
+
border-radius: var(--ds-radius-full);
|
|
243
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
244
|
+
color: var(--ds-color-on-inverted);
|
|
245
|
+
font-size: var(--ds-text-sm);
|
|
246
|
+
font-family: var(--ds-font-sans);
|
|
247
|
+
font-variant-numeric: tabular-nums;
|
|
248
|
+
user-select: none;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* --- Reduced motion --- */
|
|
253
|
+
@media (prefers-reduced-motion: reduce) {
|
|
254
|
+
.ds-lightbox {
|
|
255
|
+
animation: none;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Component: Hero
|
|
3
|
+
Full-width hero section with background image, gradient overlay,
|
|
4
|
+
and optional frosted glass backdrop.
|
|
5
|
+
|
|
6
|
+
The overlay uses color-mix() with --ds-color-bg for theme-aware darkening.
|
|
7
|
+
Text color is NOT forced — use ds-text-always-white or ds-text-primary
|
|
8
|
+
depending on your background.
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
<section class="ds-hero" style="background-image: url(...)">
|
|
12
|
+
<div class="ds-hero__overlay"></div>
|
|
13
|
+
<div class="ds-hero__content ds-container">
|
|
14
|
+
<div class="ds-hero__backdrop">
|
|
15
|
+
<h1 class="ds-hero__title ds-hero-title ds-text-always-white">Heading</h1>
|
|
16
|
+
<p class="ds-hero__subtitle ds-text-always-white">Subheading</p>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</section>
|
|
20
|
+
|
|
21
|
+
Variants:
|
|
22
|
+
ds-hero--full Generous padding, auto height (no min-height)
|
|
23
|
+
ds-hero__overlay--subtle Lighter overlay, photo shows through more
|
|
24
|
+
|
|
25
|
+
ARIA: role="banner" or within <header>. Background images are decorative
|
|
26
|
+
— add meaningful content in the markup, not in CSS.
|
|
27
|
+
========================================================================== */
|
|
28
|
+
|
|
29
|
+
.ds-hero {
|
|
30
|
+
position: relative;
|
|
31
|
+
min-height: 28rem;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
text-align: center;
|
|
36
|
+
background-size: cover;
|
|
37
|
+
background-position: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* --- Full variant (generous padding, no min-height) --- */
|
|
41
|
+
.ds-hero--full {
|
|
42
|
+
min-height: auto;
|
|
43
|
+
padding-block: var(--ds-space-16);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media (min-width: 768px) {
|
|
47
|
+
.ds-hero--full {
|
|
48
|
+
padding-block: var(--ds-space-20);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* --- Gradient overlay (theme-aware darkening) --- */
|
|
53
|
+
.ds-hero__overlay {
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: 0;
|
|
56
|
+
background: linear-gradient(
|
|
57
|
+
to bottom,
|
|
58
|
+
color-mix(in srgb, var(--ds-color-bg) 70%, transparent),
|
|
59
|
+
color-mix(in srgb, var(--ds-color-bg) 92%, transparent)
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ds-hero__overlay--subtle {
|
|
64
|
+
background: linear-gradient(
|
|
65
|
+
to bottom,
|
|
66
|
+
color-mix(in srgb, var(--ds-color-bg) 20%, transparent),
|
|
67
|
+
color-mix(in srgb, var(--ds-color-bg) 40%, transparent)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
[data-theme="dark"] .ds-hero__overlay {
|
|
72
|
+
background: linear-gradient(
|
|
73
|
+
to bottom,
|
|
74
|
+
color-mix(in srgb, var(--ds-color-bg) 80%, transparent),
|
|
75
|
+
color-mix(in srgb, var(--ds-color-bg) 95%, transparent)
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-theme="dark"] .ds-hero__overlay--subtle {
|
|
80
|
+
background: linear-gradient(
|
|
81
|
+
to bottom,
|
|
82
|
+
color-mix(in srgb, var(--ds-color-bg) 30%, transparent),
|
|
83
|
+
color-mix(in srgb, var(--ds-color-bg) 50%, transparent)
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* --- Content wrapper (above overlay) --- */
|
|
88
|
+
.ds-hero__content {
|
|
89
|
+
position: relative;
|
|
90
|
+
z-index: 1;
|
|
91
|
+
width: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* --- Frosted glass backdrop --- */
|
|
95
|
+
.ds-hero__backdrop {
|
|
96
|
+
display: block;
|
|
97
|
+
padding: var(--ds-space-8);
|
|
98
|
+
border-radius: var(--ds-radius-2xl);
|
|
99
|
+
background: rgba(0, 0, 0, 0.35);
|
|
100
|
+
backdrop-filter: blur(32px) saturate(1.6);
|
|
101
|
+
-webkit-backdrop-filter: blur(32px) saturate(1.6);
|
|
102
|
+
max-width: 40rem;
|
|
103
|
+
margin-inline: auto;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* --- Title & subtitle (no forced color — use ds-text-always-white or
|
|
107
|
+
ds-text-primary depending on your overlay/backdrop) --- */
|
|
108
|
+
.ds-hero__title,
|
|
109
|
+
.ds-hero__subtitle {
|
|
110
|
+
color: inherit;
|
|
111
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 — 32px (var(--ds-size-2))
|
|
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: var(--ds-color-error-subtle); /* fallback for browsers without color-mix() */
|
|
90
|
+
background-color: color-mix(in srgb, var(--ds-color-error) 10%, transparent);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Ghost variant (color only, no bg) */
|
|
94
|
+
.ds-icon-btn--ghost {
|
|
95
|
+
padding: 0;
|
|
96
|
+
width: auto;
|
|
97
|
+
height: auto;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.ds-icon-btn--ghost:hover {
|
|
101
|
+
background: transparent;
|
|
102
|
+
color: var(--ds-color-text);
|
|
103
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* === Form — Inputs, selectors, and form controls === */
|
|
2
|
+
@import './input.css';
|
|
3
|
+
@import './field.css';
|
|
4
|
+
@import './toggle.css';
|
|
5
|
+
@import './custom-select.css';
|
|
6
|
+
@import './combobox.css';
|
|
7
|
+
@import './number-input.css';
|
|
8
|
+
@import './pin-input.css';
|
|
9
|
+
@import './datepicker.css';
|
|
10
|
+
@import './color-picker.css';
|
|
11
|
+
@import './slider.css';
|
|
12
|
+
@import './drop-zone.css';
|
|
13
|
+
@import './star-rating.css';
|
|
14
|
+
|
|
15
|
+
/* === Data Display — Present information and status === */
|
|
16
|
+
@import './badge.css';
|
|
17
|
+
@import './tag.css';
|
|
18
|
+
@import './chip.css';
|
|
19
|
+
@import './avatar.css';
|
|
20
|
+
@import './stat-card.css';
|
|
21
|
+
@import './table.css';
|
|
22
|
+
@import './description-list.css';
|
|
23
|
+
@import './timeline.css';
|
|
24
|
+
@import './progress.css';
|
|
25
|
+
@import './skeleton.css';
|
|
26
|
+
@import './result.css';
|
|
27
|
+
@import './truncated-text.css';
|
|
28
|
+
|
|
29
|
+
/* === Navigation — Wayfinding and page structure === */
|
|
30
|
+
@import './nav.css';
|
|
31
|
+
@import './breadcrumb.css';
|
|
32
|
+
@import './tabs.css';
|
|
33
|
+
@import './pagination.css';
|
|
34
|
+
@import './segmented-control.css';
|
|
35
|
+
@import './bottom-nav.css';
|
|
36
|
+
@import './toolbar.css';
|
|
37
|
+
|
|
38
|
+
/* === Feedback — Communicate status and system messages === */
|
|
39
|
+
@import './alert.css';
|
|
40
|
+
@import './toast.css';
|
|
41
|
+
@import './spinner.css';
|
|
42
|
+
@import './empty-state.css';
|
|
43
|
+
@import './tooltip.css';
|
|
44
|
+
|
|
45
|
+
/* === Overlay — Floating panels and dialogs === */
|
|
46
|
+
@import './modal.css';
|
|
47
|
+
@import './drawer.css';
|
|
48
|
+
@import './dropdown.css';
|
|
49
|
+
@import './popover.css';
|
|
50
|
+
@import './bottom-sheet.css';
|
|
51
|
+
@import './command.css';
|
|
52
|
+
@import './context-menu.css';
|
|
53
|
+
|
|
54
|
+
/* === Layout — Structure and organize content === */
|
|
55
|
+
@import './card.css';
|
|
56
|
+
@import './divider.css';
|
|
57
|
+
@import './accordion.css';
|
|
58
|
+
@import './collapsible.css';
|
|
59
|
+
@import './scroll-area.css';
|
|
60
|
+
@import './gallery.css';
|
|
61
|
+
@import './hero.css';
|
|
62
|
+
@import './admin-layout.css';
|
|
63
|
+
@import './media-library.css';
|
|
64
|
+
|
|
65
|
+
/* === Content — Rich text and prose === */
|
|
66
|
+
@import './prose.css';
|
|
67
|
+
|
|
68
|
+
/* === Action — Trigger operations and commands === */
|
|
69
|
+
@import './button.css';
|
|
70
|
+
@import './icon-btn.css';
|
|
71
|
+
@import './copy-button.css';
|
|
72
|
+
@import './kbd.css';
|
|
73
|
+
@import './search.css';
|
|
74
|
+
@import './sortable.css';
|