@abuzareal/contour-ui 0.3.0 → 0.5.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/CHANGELOG.md +23 -0
- package/COMPOSITION.md +28 -28
- package/CONTRACTS.md +9 -3
- package/FORMS.md +94 -0
- package/NEXTJS.md +6 -2
- package/OVERLAYS.md +52 -0
- package/PUBLIC-API.md +181 -162
- package/README.md +44 -28
- package/RELEASING.md +1 -1
- package/SIZE.md +45 -0
- package/STYLING.md +68 -0
- package/dist/actions.css +7 -0
- package/dist/components/hero/Sculpture.js +2 -1
- package/dist/components/three/ObjectStudy.js +2 -1
- package/dist/components/ui/Alert.d.ts +2 -1
- package/dist/components/ui/Alert.js +3 -3
- package/dist/components/ui/Avatar.d.ts +3 -1
- package/dist/components/ui/Avatar.js +3 -3
- package/dist/components/ui/Badge.js +2 -2
- package/dist/components/ui/BrandMark.js +2 -1
- package/dist/components/ui/Breadcrumbs.d.ts +2 -1
- package/dist/components/ui/Breadcrumbs.js +3 -2
- package/dist/components/ui/Button.d.ts +2 -0
- package/dist/components/ui/Button.js +3 -2
- package/dist/components/ui/Card.js +2 -2
- package/dist/components/ui/Checkbox.d.ts +2 -2
- package/dist/components/ui/Checkbox.js +14 -5
- package/dist/components/ui/CountUp.d.ts +2 -1
- package/dist/components/ui/CountUp.js +6 -3
- package/dist/components/ui/DataTable.d.ts +1 -0
- package/dist/components/ui/DataTable.js +12 -8
- package/dist/components/ui/DepthButton.js +2 -2
- package/dist/components/ui/Dialog.d.ts +5 -1
- package/dist/components/ui/Dialog.js +49 -18
- package/dist/components/ui/Disclosure.js +2 -1
- package/dist/components/ui/Divider.js +3 -2
- package/dist/components/ui/DropdownMenu.d.ts +11 -4
- package/dist/components/ui/DropdownMenu.js +109 -66
- package/dist/components/ui/EmptyState.js +2 -1
- package/dist/components/ui/Field.js +2 -2
- package/dist/components/ui/FlipCard.js +2 -2
- package/dist/components/ui/FloatingPortal.d.ts +10 -0
- package/dist/components/ui/FloatingPortal.js +51 -0
- package/dist/components/ui/IconButton.js +2 -2
- package/dist/components/ui/Kbd.js +2 -1
- package/dist/components/ui/Magnetic.js +2 -1
- package/dist/components/ui/Marquee.js +3 -2
- package/dist/components/ui/OverlayTrigger.d.ts +11 -0
- package/dist/components/ui/OverlayTrigger.js +5 -0
- package/dist/components/ui/Pagination.d.ts +5 -1
- package/dist/components/ui/Pagination.js +3 -2
- package/dist/components/ui/Popover.d.ts +18 -8
- package/dist/components/ui/Popover.js +58 -17
- package/dist/components/ui/ProgressBar.js +2 -2
- package/dist/components/ui/RadioGroup.d.ts +13 -5
- package/dist/components/ui/RadioGroup.js +36 -9
- package/dist/components/ui/Reveal.d.ts +0 -1
- package/dist/components/ui/Reveal.js +4 -3
- package/dist/components/ui/RevealHeading.js +2 -1
- package/dist/components/ui/ScrollProgress.js +2 -1
- package/dist/components/ui/SectionLabel.js +2 -1
- package/dist/components/ui/SegmentedControl.js +6 -3
- package/dist/components/ui/SelectField.js +18 -3
- package/dist/components/ui/Skeleton.js +2 -2
- package/dist/components/ui/Slider.d.ts +23 -7
- package/dist/components/ui/Slider.js +43 -6
- package/dist/components/ui/Spinner.js +2 -2
- package/dist/components/ui/Stat.js +2 -1
- package/dist/components/ui/Stepper.js +3 -3
- package/dist/components/ui/Switch.d.ts +27 -5
- package/dist/components/ui/Switch.js +51 -5
- package/dist/components/ui/Tabs.js +7 -5
- package/dist/components/ui/Tag.d.ts +2 -1
- package/dist/components/ui/Tag.js +4 -3
- package/dist/components/ui/TextArea.js +4 -1
- package/dist/components/ui/TextField.js +8 -3
- package/dist/components/ui/ThemeScope.d.ts +13 -0
- package/dist/components/ui/ThemeScope.js +10 -0
- package/dist/components/ui/ThemeToggle.d.ts +3 -0
- package/dist/components/ui/ThemeToggle.js +4 -3
- package/dist/components/ui/TiltCard.js +3 -2
- package/dist/components/ui/Timeline.js +2 -2
- package/dist/components/ui/ToastProvider.d.ts +5 -2
- package/dist/components/ui/ToastProvider.js +5 -5
- package/dist/components/ui/Tooltip.d.ts +4 -4
- package/dist/components/ui/Tooltip.js +70 -10
- package/dist/data-display.css +5 -0
- package/dist/effects.css +6 -0
- package/dist/feedback.css +5 -0
- package/dist/fonts-latin.css +10 -4
- package/dist/fonts.css +8 -0
- package/dist/forms.css +5 -0
- package/dist/hooks/useDismiss.d.ts +12 -3
- package/dist/hooks/useDismiss.js +5 -21
- package/dist/hooks/useFloatingPanel.d.ts +14 -0
- package/dist/hooks/useFloatingPanel.js +157 -0
- package/dist/hooks/useFormReset.d.ts +1 -1
- package/dist/hooks/useLayerDismiss.d.ts +4 -0
- package/dist/hooks/useLayerDismiss.js +48 -0
- package/dist/hooks/useMobileMenu.d.ts +0 -1
- package/dist/hooks/useMobileMenu.js +11 -16
- package/dist/hooks/usePanelFocus.d.ts +10 -0
- package/dist/hooks/usePanelFocus.js +60 -0
- package/dist/hooks/useTheme.d.ts +1 -0
- package/dist/hooks/useTheme.js +18 -5
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/kit/forms.css +11 -2
- package/dist/kit/navigation.css +4 -0
- package/dist/kit/overlays.css +8 -4
- package/dist/lib/classNames.d.ts +2 -0
- package/dist/lib/classNames.js +16 -1
- package/dist/lib/componentClasses.d.ts +1 -0
- package/dist/lib/componentClasses.js +2 -0
- package/dist/lib/keyboard.d.ts +1 -1
- package/dist/lib/keyboard.js +5 -2
- package/dist/lib/layers.d.ts +18 -0
- package/dist/lib/layers.js +128 -0
- package/dist/lib/themeScope.d.ts +5 -0
- package/dist/lib/themeScope.js +3 -0
- package/dist/minimal-reset.css +6 -0
- package/dist/navigation.css +5 -0
- package/dist/overlays.css +5 -0
- package/dist/scoped/base.css +183 -0
- package/dist/scoped/kit/actions.css +209 -0
- package/dist/scoped/kit/data-display.css +492 -0
- package/dist/scoped/kit/effects.css +140 -0
- package/dist/scoped/kit/feedback.css +309 -0
- package/dist/scoped/kit/forms.css +370 -0
- package/dist/scoped/kit/navigation.css +266 -0
- package/dist/scoped/kit/overlays.css +299 -0
- package/dist/scoped/marquee.css +58 -0
- package/dist/scoped/spinner.css +20 -0
- package/dist/scoped/theme-toggle.css +38 -0
- package/dist/scoped/tokens.css +119 -0
- package/dist/scoped/ui.css +127 -0
- package/dist/scoped/utilities.css +17 -0
- package/dist/scoped-tokens.css +1 -0
- package/dist/scoped.css +12 -0
- package/dist/theme-toggle.css +2 -2
- package/dist/tokens.json +710 -0
- package/examples/forms/HookFormSettingsForm.tsx +176 -0
- package/examples/forms/ManualSettingsForm-0.3.0.tsx +102 -0
- package/examples/forms/NativeSettingsForm.tsx +119 -0
- package/examples/forms/settings.ts +61 -0
- package/examples/forms/useSubmission.ts +77 -0
- package/package.json +30 -6
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/* Kit — feedback: alerts, toasts, progress, spinner, and skeletons. */
|
|
2
|
+
|
|
3
|
+
.contour-alert {
|
|
4
|
+
--contour-alert-accent: var(--contour-fg);
|
|
5
|
+
--contour-alert-bg: var(--contour-surface);
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
gap: 14px;
|
|
9
|
+
padding: 18px 20px;
|
|
10
|
+
border-inline-start: 3px solid var(--contour-alert-accent);
|
|
11
|
+
background: var(--contour-alert-bg);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.contour-alert-accent {
|
|
15
|
+
--contour-alert-accent: var(--contour-olive);
|
|
16
|
+
--contour-alert-bg: color-mix(in srgb, var(--contour-acid) 22%, var(--contour-surface));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.contour-alert-success {
|
|
20
|
+
--contour-alert-accent: var(--contour-success);
|
|
21
|
+
--contour-alert-bg: var(--contour-success-soft);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.contour-alert-info {
|
|
25
|
+
--contour-alert-accent: var(--contour-info);
|
|
26
|
+
--contour-alert-bg: var(--contour-info-soft);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.contour-alert-warning {
|
|
30
|
+
--contour-alert-accent: var(--contour-warning);
|
|
31
|
+
--contour-alert-bg: var(--contour-warning-soft);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.contour-alert-danger {
|
|
35
|
+
--contour-alert-accent: var(--contour-danger);
|
|
36
|
+
--contour-alert-bg: var(--contour-danger-soft);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.contour-alert-icon {
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
margin-top: 1px;
|
|
42
|
+
color: var(--contour-alert-accent);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.contour-alert-content {
|
|
46
|
+
display: grid;
|
|
47
|
+
flex: 1;
|
|
48
|
+
gap: 4px;
|
|
49
|
+
min-width: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.contour-alert-title {
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
font-weight: 600;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.contour-alert-body {
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
line-height: 1.6;
|
|
60
|
+
color: color-mix(in srgb, var(--contour-fg) 80%, transparent);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.contour-alert-action {
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
align-self: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.contour-alert-dismiss {
|
|
69
|
+
display: grid;
|
|
70
|
+
place-items: center;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
width: 28px;
|
|
73
|
+
height: 28px;
|
|
74
|
+
margin: -4px -6px 0 0;
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
color: var(--contour-muted);
|
|
77
|
+
transition:
|
|
78
|
+
background var(--contour-duration-fast),
|
|
79
|
+
color var(--contour-duration-fast);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.contour-alert-dismiss:hover {
|
|
83
|
+
background: var(--contour-acid);
|
|
84
|
+
color: var(--contour-ink);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Banner: one-line announcement strip on the inverted surface. */
|
|
88
|
+
.contour-alert-banner {
|
|
89
|
+
--contour-alert-accent: var(--contour-inverse-accent);
|
|
90
|
+
--contour-alert-bg: var(--contour-invert-bg);
|
|
91
|
+
align-items: center;
|
|
92
|
+
border-inline-start: 0;
|
|
93
|
+
color: var(--contour-invert-fg);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.contour-alert-banner .contour-alert-content {
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-wrap: wrap;
|
|
99
|
+
align-items: baseline;
|
|
100
|
+
gap: 4px 12px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.contour-alert-banner .contour-alert-body,
|
|
104
|
+
.contour-alert-banner .contour-alert-dismiss {
|
|
105
|
+
color: color-mix(in srgb, var(--contour-invert-fg) 72%, transparent);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.contour-toast-viewport {
|
|
109
|
+
position: fixed;
|
|
110
|
+
right: 24px;
|
|
111
|
+
bottom: 24px;
|
|
112
|
+
z-index: 80;
|
|
113
|
+
display: grid;
|
|
114
|
+
gap: 10px;
|
|
115
|
+
width: min(380px, calc(100vw - 32px));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.contour-toast {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: flex-start;
|
|
121
|
+
gap: 14px;
|
|
122
|
+
padding: 16px 16px 16px 0;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
background: var(--contour-ink);
|
|
125
|
+
color: var(--contour-paper);
|
|
126
|
+
box-shadow: var(--contour-shadow-floating);
|
|
127
|
+
animation: contour-toast-in var(--contour-duration-slow) var(--contour-ease) both;
|
|
128
|
+
border: 1px solid var(--contour-floating-outline);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.contour-toast-bar {
|
|
132
|
+
align-self: stretch;
|
|
133
|
+
width: 3px;
|
|
134
|
+
margin-block: -16px;
|
|
135
|
+
background: var(--contour-acid);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.contour-toast-success .contour-toast-bar {
|
|
139
|
+
background: #b5d33f;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.contour-toast-info .contour-toast-bar {
|
|
143
|
+
background: #8fc0d6;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.contour-toast-warning .contour-toast-bar {
|
|
147
|
+
background: #f0c063;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.contour-toast-danger .contour-toast-bar {
|
|
151
|
+
background: #ff8a70;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.contour-toast-content {
|
|
155
|
+
display: grid;
|
|
156
|
+
flex: 1;
|
|
157
|
+
gap: 4px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.contour-toast-content strong {
|
|
161
|
+
font-size: 14px;
|
|
162
|
+
font-weight: 600;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.contour-toast-content p {
|
|
166
|
+
font-size: 13px;
|
|
167
|
+
line-height: 1.55;
|
|
168
|
+
color: #c0c5b8;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.contour-toast-close {
|
|
172
|
+
display: grid;
|
|
173
|
+
place-items: center;
|
|
174
|
+
width: 28px;
|
|
175
|
+
height: 28px;
|
|
176
|
+
margin-top: -4px;
|
|
177
|
+
border-radius: 50%;
|
|
178
|
+
color: #c0c5b8;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.contour-toast-close:hover {
|
|
182
|
+
background: var(--contour-acid);
|
|
183
|
+
color: var(--contour-ink);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@keyframes contour-toast-in {
|
|
187
|
+
from {
|
|
188
|
+
opacity: 0;
|
|
189
|
+
transform: translateY(16px) scale(0.98);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.contour-progress {
|
|
194
|
+
display: grid;
|
|
195
|
+
gap: 10px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.contour-progress-header {
|
|
199
|
+
display: flex;
|
|
200
|
+
justify-content: space-between;
|
|
201
|
+
color: var(--contour-muted);
|
|
202
|
+
text-transform: uppercase;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.contour-progress-track {
|
|
206
|
+
position: relative;
|
|
207
|
+
height: 2px;
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
background: var(--contour-line);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.contour-progress-fill {
|
|
213
|
+
position: absolute;
|
|
214
|
+
inset: 0 auto 0 0;
|
|
215
|
+
width: var(--contour-progress, var(--progress));
|
|
216
|
+
background: var(--contour-fg);
|
|
217
|
+
transition: width var(--contour-duration-slow) var(--contour-ease);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.contour-progress-accent .contour-progress-fill {
|
|
221
|
+
background: var(--contour-olive);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.contour-progress-success .contour-progress-fill {
|
|
225
|
+
background: var(--contour-success);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.contour-progress-danger .contour-progress-fill {
|
|
229
|
+
background: var(--contour-danger);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.contour-progress-indeterminate .contour-progress-fill {
|
|
233
|
+
width: 35%;
|
|
234
|
+
animation: contour-progress-sweep 1.3s var(--contour-ease) infinite;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@keyframes contour-progress-sweep {
|
|
238
|
+
from {
|
|
239
|
+
transform: translateX(-100%);
|
|
240
|
+
}
|
|
241
|
+
to {
|
|
242
|
+
transform: translateX(300%);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.contour-spinner {
|
|
247
|
+
display: inline-grid;
|
|
248
|
+
place-items: center;
|
|
249
|
+
color: var(--contour-olive);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.contour-spinner svg {
|
|
253
|
+
animation: contour-spin 1.1s linear infinite;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.contour-button .contour-spinner {
|
|
257
|
+
color: inherit;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
@keyframes contour-spin {
|
|
261
|
+
to {
|
|
262
|
+
transform: rotate(360deg);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.contour-skeleton {
|
|
267
|
+
display: block;
|
|
268
|
+
background: linear-gradient(
|
|
269
|
+
100deg,
|
|
270
|
+
transparent 30%,
|
|
271
|
+
color-mix(in srgb, var(--contour-bg) 70%, transparent) 50%,
|
|
272
|
+
transparent 70%
|
|
273
|
+
)
|
|
274
|
+
var(--contour-surface-sunken);
|
|
275
|
+
background-size: 220% 100%;
|
|
276
|
+
animation: contour-shimmer 1.6s linear infinite;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.contour-skeleton-line {
|
|
280
|
+
width: 100%;
|
|
281
|
+
height: 12px;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.contour-skeleton-block {
|
|
285
|
+
width: 100%;
|
|
286
|
+
height: 120px;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.contour-skeleton-circle {
|
|
290
|
+
width: 44px;
|
|
291
|
+
height: 44px;
|
|
292
|
+
border-radius: 50%;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
@keyframes contour-shimmer {
|
|
296
|
+
from {
|
|
297
|
+
background-position: 120% 0;
|
|
298
|
+
}
|
|
299
|
+
to {
|
|
300
|
+
background-position: -120% 0;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
@media (max-width: 767px) {
|
|
305
|
+
.contour-toast-viewport {
|
|
306
|
+
right: 16px;
|
|
307
|
+
bottom: 16px;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/* Kit — forms: underlined fields, checkboxes, radios, switches, and sliders. */
|
|
2
|
+
|
|
3
|
+
.contour-field-control input, .contour-field-control select, .contour-field-control textarea {
|
|
4
|
+
font: inherit;
|
|
5
|
+
color: inherit;
|
|
6
|
+
margin: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.contour-field {
|
|
10
|
+
display: grid;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.contour-field-label {
|
|
16
|
+
color: var(--contour-muted);
|
|
17
|
+
text-transform: uppercase;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.contour-field-required {
|
|
21
|
+
margin-inline-start: 4px;
|
|
22
|
+
color: var(--contour-olive);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.contour-field-control {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: 12px;
|
|
29
|
+
border-bottom: 1px solid var(--contour-line-strong);
|
|
30
|
+
transition:
|
|
31
|
+
border-color var(--contour-duration-fast),
|
|
32
|
+
box-shadow var(--contour-duration-fast);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.contour-field-control:hover {
|
|
36
|
+
border-color: var(--contour-muted);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.contour-field-control:focus-within {
|
|
40
|
+
border-color: var(--contour-fg);
|
|
41
|
+
box-shadow: inset 0 -1px 0 var(--contour-fg);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.contour-field-control:has(:focus-visible) {
|
|
45
|
+
outline: 2px solid var(--contour-fg);
|
|
46
|
+
outline-offset: 3px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.contour-field-control input,
|
|
50
|
+
.contour-field-control select,
|
|
51
|
+
.contour-field-control textarea {
|
|
52
|
+
flex: 1;
|
|
53
|
+
min-width: 0;
|
|
54
|
+
padding: 10px 0;
|
|
55
|
+
border: 0;
|
|
56
|
+
background: transparent;
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
outline: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.contour-field-control textarea {
|
|
62
|
+
resize: vertical;
|
|
63
|
+
line-height: 1.6;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.contour-field-control textarea[data-auto-resize] {
|
|
67
|
+
resize: none;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.contour-field-control ::placeholder {
|
|
72
|
+
color: var(--contour-muted);
|
|
73
|
+
opacity: 0.8;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.contour-field-icon,
|
|
77
|
+
.contour-field-trailing {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
color: var(--contour-muted);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.contour-field-select select {
|
|
84
|
+
appearance: none;
|
|
85
|
+
padding-inline-end: 24px;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.contour-field-select select option {
|
|
90
|
+
background: var(--contour-surface);
|
|
91
|
+
color: var(--contour-fg);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.contour-field-chevron {
|
|
95
|
+
margin-inline-start: -28px;
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
color: var(--contour-muted);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.contour-field-footer {
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: space-between;
|
|
103
|
+
gap: 16px;
|
|
104
|
+
color: var(--contour-muted);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.contour-field-counter {
|
|
108
|
+
margin-inline-start: auto;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.contour-field-invalid .contour-field-control {
|
|
112
|
+
border-color: var(--contour-danger);
|
|
113
|
+
box-shadow: inset 0 -1px 0 var(--contour-danger);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.contour-field-error {
|
|
117
|
+
display: inline-flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
gap: 6px;
|
|
120
|
+
color: var(--contour-danger);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.contour-field-disabled {
|
|
124
|
+
opacity: 0.5;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.contour-field-disabled .contour-field-control {
|
|
128
|
+
border-bottom-style: dashed;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Choice: checkbox and radio share the control, label, and description layout. */
|
|
132
|
+
.contour-choice {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: flex-start;
|
|
135
|
+
gap: 12px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.contour-choice-control {
|
|
139
|
+
position: relative;
|
|
140
|
+
display: grid;
|
|
141
|
+
flex-shrink: 0;
|
|
142
|
+
width: 20px;
|
|
143
|
+
height: 20px;
|
|
144
|
+
margin-top: 1px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.contour-choice-input {
|
|
148
|
+
position: absolute;
|
|
149
|
+
inset: 0;
|
|
150
|
+
width: 100%;
|
|
151
|
+
height: 100%;
|
|
152
|
+
margin: 0;
|
|
153
|
+
opacity: 0;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.contour-choice-box {
|
|
158
|
+
display: grid;
|
|
159
|
+
place-items: center;
|
|
160
|
+
border: 1px solid var(--contour-line-strong);
|
|
161
|
+
color: transparent;
|
|
162
|
+
pointer-events: none;
|
|
163
|
+
transition:
|
|
164
|
+
background var(--contour-duration-fast),
|
|
165
|
+
border-color var(--contour-duration-fast),
|
|
166
|
+
color var(--contour-duration-fast);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.contour-choice-input:hover + .contour-choice-box {
|
|
170
|
+
border-color: var(--contour-fg);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.contour-choice-input:checked + .contour-choice-box,
|
|
174
|
+
.contour-choice-input:indeterminate + .contour-choice-box {
|
|
175
|
+
background: var(--contour-acid);
|
|
176
|
+
border-color: var(--contour-acid);
|
|
177
|
+
color: var(--contour-ink);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.contour-choice-input:focus-visible + .contour-choice-box {
|
|
181
|
+
outline: 2px solid var(--contour-fg);
|
|
182
|
+
outline-offset: 3px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.contour-choice-input:disabled,
|
|
186
|
+
.contour-choice-input:disabled + .contour-choice-box {
|
|
187
|
+
cursor: default;
|
|
188
|
+
opacity: 0.45;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.contour-choice-text {
|
|
192
|
+
display: grid;
|
|
193
|
+
gap: 2px;
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.contour-choice-label {
|
|
198
|
+
font-size: 14px;
|
|
199
|
+
line-height: 1.5;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.contour-choice-description {
|
|
203
|
+
font-size: 13px;
|
|
204
|
+
line-height: 1.55;
|
|
205
|
+
color: var(--contour-muted);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.contour-choice-error {
|
|
209
|
+
color: var(--contour-danger);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.contour-choice-invalid .contour-choice-box {
|
|
213
|
+
border-color: var(--contour-danger);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.contour-choice-radio .contour-choice-box {
|
|
217
|
+
border-radius: 50%;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.contour-choice-radio .contour-choice-input:checked + .contour-choice-box {
|
|
221
|
+
background: transparent;
|
|
222
|
+
border-color: var(--contour-fg);
|
|
223
|
+
box-shadow: inset 0 0 0 5px var(--contour-acid);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.contour-radio-group {
|
|
227
|
+
display: grid;
|
|
228
|
+
gap: 14px;
|
|
229
|
+
margin: 0;
|
|
230
|
+
padding: 0;
|
|
231
|
+
border: 0;
|
|
232
|
+
min-width: 0;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.contour-radio-group legend {
|
|
236
|
+
margin-bottom: 14px;
|
|
237
|
+
padding: 0;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@media (min-width: 640px) {
|
|
241
|
+
.contour-radio-group-inline {
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-wrap: wrap;
|
|
244
|
+
gap: 14px 32px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.contour-radio-group-inline legend {
|
|
248
|
+
width: 100%;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.contour-switch {
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: flex-start;
|
|
255
|
+
gap: 14px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.contour-switch-track {
|
|
259
|
+
position: relative;
|
|
260
|
+
flex-shrink: 0;
|
|
261
|
+
width: 44px;
|
|
262
|
+
height: 24px;
|
|
263
|
+
border: 1px solid var(--contour-line-strong);
|
|
264
|
+
border-radius: var(--contour-radius-pill);
|
|
265
|
+
transition:
|
|
266
|
+
background var(--contour-duration-base) var(--contour-ease),
|
|
267
|
+
border-color var(--contour-duration-base);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.contour-switch-thumb {
|
|
271
|
+
position: absolute;
|
|
272
|
+
top: 3px;
|
|
273
|
+
inset-inline-start: 3px;
|
|
274
|
+
width: 16px;
|
|
275
|
+
height: 16px;
|
|
276
|
+
border-radius: 50%;
|
|
277
|
+
background: var(--contour-fg);
|
|
278
|
+
transition: transform var(--contour-duration-base) var(--contour-ease);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.contour-switch-track[aria-checked="true"] {
|
|
282
|
+
background: var(--contour-acid);
|
|
283
|
+
border-color: var(--contour-acid);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.contour-switch-track[aria-checked="true"] .contour-switch-thumb {
|
|
287
|
+
background: var(--contour-ink);
|
|
288
|
+
inset-inline-start: 23px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.contour-switch-track:disabled {
|
|
292
|
+
opacity: 0.45;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.contour-slider {
|
|
296
|
+
display: grid;
|
|
297
|
+
gap: 12px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.contour-slider-header {
|
|
301
|
+
display: flex;
|
|
302
|
+
justify-content: space-between;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.contour-slider output {
|
|
306
|
+
color: var(--contour-fg);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.contour-slider input[type="range"] {
|
|
310
|
+
width: 100%;
|
|
311
|
+
height: 22px;
|
|
312
|
+
appearance: none;
|
|
313
|
+
background: transparent;
|
|
314
|
+
cursor: pointer;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.contour-slider input[type="range"]::-webkit-slider-runnable-track {
|
|
318
|
+
height: 2px;
|
|
319
|
+
background: linear-gradient(
|
|
320
|
+
to right,
|
|
321
|
+
var(--contour-fg) var(--contour-progress, var(--progress)),
|
|
322
|
+
var(--contour-line-strong) var(--contour-progress, var(--progress))
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.contour-slider input[type="range"]::-moz-range-track {
|
|
327
|
+
height: 2px;
|
|
328
|
+
background: linear-gradient(
|
|
329
|
+
to right,
|
|
330
|
+
var(--contour-fg) var(--contour-progress, var(--progress)),
|
|
331
|
+
var(--contour-line-strong) var(--contour-progress, var(--progress))
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.contour-slider input[type="range"]::-webkit-slider-thumb {
|
|
336
|
+
appearance: none;
|
|
337
|
+
width: 20px;
|
|
338
|
+
height: 20px;
|
|
339
|
+
margin-top: -9px;
|
|
340
|
+
border: 2px solid var(--contour-fg);
|
|
341
|
+
border-radius: 50%;
|
|
342
|
+
background: var(--contour-acid);
|
|
343
|
+
transition: transform var(--contour-duration-fast);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.contour-slider input[type="range"]::-moz-range-thumb {
|
|
347
|
+
width: 16px;
|
|
348
|
+
height: 16px;
|
|
349
|
+
border: 2px solid var(--contour-fg);
|
|
350
|
+
border-radius: 50%;
|
|
351
|
+
background: var(--contour-acid);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.contour-slider input[type="range"]:hover::-webkit-slider-thumb {
|
|
355
|
+
transform: scale(1.15);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.contour-slider input[type="range"]:focus-visible {
|
|
359
|
+
outline: 2px solid var(--contour-fg);
|
|
360
|
+
outline-offset: 6px;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
:dir(rtl) .contour-slider input[type="range"]::-webkit-slider-runnable-track,
|
|
364
|
+
:dir(rtl) .contour-slider input[type="range"]::-moz-range-track {
|
|
365
|
+
background: linear-gradient(
|
|
366
|
+
to left,
|
|
367
|
+
var(--contour-fg) var(--contour-progress, var(--progress)),
|
|
368
|
+
var(--contour-line-strong) var(--contour-progress, var(--progress))
|
|
369
|
+
);
|
|
370
|
+
}
|