@hussmartinez/ui 0.1.1 → 0.3.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/README.md +56 -4
- package/THIRD_PARTY_NOTICES.md +53 -0
- package/dist/index.d.ts +448 -0
- package/dist/index.js +1609 -0
- package/dist/index.js.map +1 -0
- package/dist/react.d.ts +1347 -0
- package/dist/react.js +1287 -0
- package/dist/react.js.map +1 -0
- package/dist/shared/pair-DLVFV6vU.js +43 -0
- package/dist/shared/pair-DLVFV6vU.js.map +1 -0
- package/dist/styles.css +1342 -0
- package/package.json +8 -5
package/dist/styles.css
ADDED
|
@@ -0,0 +1,1342 @@
|
|
|
1
|
+
|
|
2
|
+
@layer hm.tokens, hm.base, hm.components, hm.sdk;
|
|
3
|
+
@layer hm.tokens.default, hm.tokens.theme;
|
|
4
|
+
/*
|
|
5
|
+
* All styles of @hussmartinez/ui. Applications import this file once; library
|
|
6
|
+
* code never imports CSS (ADR 0004).
|
|
7
|
+
*
|
|
8
|
+
* The layer order comes first, so it holds whichever stylesheet loads first.
|
|
9
|
+
* ui writes into the first three layers, and SDKs write into hm.sdk. A host's
|
|
10
|
+
* unlayered CSS beats all of them without !important (ADR 0005).
|
|
11
|
+
*/
|
|
12
|
+
/*
|
|
13
|
+
* Custom themes from themeToCss and ThemeProvider beat the built-in themes,
|
|
14
|
+
* whatever order the stylesheets load in (docs/adr/0001).
|
|
15
|
+
*/
|
|
16
|
+
/* Generated by `pnpm --filter @hussmartinez/ui tokens` from src/tokens. Don't edit. */
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* The built-in light and dark themes. Without data-hm-theme, the page
|
|
20
|
+
* follows prefers-color-scheme in pure CSS, so nothing flashes (ADR 0007).
|
|
21
|
+
* data-hm-theme="light|dark|system" and data-hm-density="comfortable|compact"
|
|
22
|
+
* change any subtree.
|
|
23
|
+
*/
|
|
24
|
+
@layer hm.tokens.default {
|
|
25
|
+
:root {
|
|
26
|
+
--hm-gray-50: oklch(0.985 0.008 260);
|
|
27
|
+
--hm-gray-100: oklch(0.965 0.008 260);
|
|
28
|
+
--hm-gray-200: oklch(0.925 0.009 260);
|
|
29
|
+
--hm-gray-300: oklch(0.87 0.011 260);
|
|
30
|
+
--hm-gray-400: oklch(0.78 0.012 260);
|
|
31
|
+
--hm-gray-500: oklch(0.68 0.012 260);
|
|
32
|
+
--hm-gray-600: oklch(0.585 0.012 260);
|
|
33
|
+
--hm-gray-700: oklch(0.5 0.012 260);
|
|
34
|
+
--hm-gray-800: oklch(0.42 0.011 260);
|
|
35
|
+
--hm-gray-900: oklch(0.34 0.01 260);
|
|
36
|
+
--hm-gray-950: oklch(0.26 0.01 260);
|
|
37
|
+
--hm-blue-50: oklch(0.985 0.024 258);
|
|
38
|
+
--hm-blue-100: oklch(0.965 0.05 258);
|
|
39
|
+
--hm-blue-200: oklch(0.925 0.09 258);
|
|
40
|
+
--hm-blue-300: oklch(0.87 0.14 258);
|
|
41
|
+
--hm-blue-400: oklch(0.78 0.18 258);
|
|
42
|
+
--hm-blue-500: oklch(0.68 0.2 258);
|
|
43
|
+
--hm-blue-600: oklch(0.585 0.2 258);
|
|
44
|
+
--hm-blue-700: oklch(0.5 0.184 258);
|
|
45
|
+
--hm-blue-800: oklch(0.42 0.16 258);
|
|
46
|
+
--hm-blue-900: oklch(0.34 0.13 258);
|
|
47
|
+
--hm-blue-950: oklch(0.26 0.1 258);
|
|
48
|
+
--hm-red-50: oklch(0.985 0.025 25);
|
|
49
|
+
--hm-red-100: oklch(0.965 0.052 25);
|
|
50
|
+
--hm-red-200: oklch(0.925 0.095 25);
|
|
51
|
+
--hm-red-300: oklch(0.87 0.147 25);
|
|
52
|
+
--hm-red-400: oklch(0.78 0.189 25);
|
|
53
|
+
--hm-red-500: oklch(0.68 0.21 25);
|
|
54
|
+
--hm-red-600: oklch(0.585 0.21 25);
|
|
55
|
+
--hm-red-700: oklch(0.5 0.193 25);
|
|
56
|
+
--hm-red-800: oklch(0.42 0.168 25);
|
|
57
|
+
--hm-red-900: oklch(0.34 0.137 25);
|
|
58
|
+
--hm-red-950: oklch(0.26 0.105 25);
|
|
59
|
+
--hm-green-50: oklch(0.985 0.02 150);
|
|
60
|
+
--hm-green-100: oklch(0.965 0.043 150);
|
|
61
|
+
--hm-green-200: oklch(0.925 0.077 150);
|
|
62
|
+
--hm-green-300: oklch(0.87 0.119 150);
|
|
63
|
+
--hm-green-400: oklch(0.78 0.153 150);
|
|
64
|
+
--hm-green-500: oklch(0.68 0.17 150);
|
|
65
|
+
--hm-green-600: oklch(0.585 0.17 150);
|
|
66
|
+
--hm-green-700: oklch(0.5 0.156 150);
|
|
67
|
+
--hm-green-800: oklch(0.42 0.136 150);
|
|
68
|
+
--hm-green-900: oklch(0.34 0.111 150);
|
|
69
|
+
--hm-green-950: oklch(0.26 0.085 150);
|
|
70
|
+
--hm-amber-50: oklch(0.985 0.02 70);
|
|
71
|
+
--hm-amber-100: oklch(0.965 0.043 70);
|
|
72
|
+
--hm-amber-200: oklch(0.925 0.077 70);
|
|
73
|
+
--hm-amber-300: oklch(0.87 0.119 70);
|
|
74
|
+
--hm-amber-400: oklch(0.78 0.153 70);
|
|
75
|
+
--hm-amber-500: oklch(0.68 0.17 70);
|
|
76
|
+
--hm-amber-600: oklch(0.585 0.17 70);
|
|
77
|
+
--hm-amber-700: oklch(0.5 0.156 70);
|
|
78
|
+
--hm-amber-800: oklch(0.42 0.136 70);
|
|
79
|
+
--hm-amber-900: oklch(0.34 0.111 70);
|
|
80
|
+
--hm-amber-950: oklch(0.26 0.085 70);
|
|
81
|
+
--hm-white: oklch(1 0 0);
|
|
82
|
+
--hm-black: oklch(0 0 0);
|
|
83
|
+
--hm-space-1: 0.25rem;
|
|
84
|
+
--hm-space-2: 0.5rem;
|
|
85
|
+
--hm-space-3: 0.75rem;
|
|
86
|
+
--hm-space-4: 1rem;
|
|
87
|
+
--hm-space-5: 1.25rem;
|
|
88
|
+
--hm-space-6: 1.5rem;
|
|
89
|
+
--hm-space-7: 2rem;
|
|
90
|
+
--hm-space-8: 2.5rem;
|
|
91
|
+
--hm-space-9: 3rem;
|
|
92
|
+
--hm-space-10: 4rem;
|
|
93
|
+
--hm-space-11: 5rem;
|
|
94
|
+
--hm-space-12: 6rem;
|
|
95
|
+
--hm-radius-none: 0;
|
|
96
|
+
--hm-radius-sm: 0.25rem;
|
|
97
|
+
--hm-radius-md: 0.375rem;
|
|
98
|
+
--hm-radius-lg: 0.5rem;
|
|
99
|
+
--hm-radius-full: 9999px;
|
|
100
|
+
--hm-border-width-1: 1px;
|
|
101
|
+
--hm-border-width-2: 2px;
|
|
102
|
+
--hm-font-sans:
|
|
103
|
+
system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
104
|
+
--hm-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
105
|
+
--hm-font-size-1: 0.75rem;
|
|
106
|
+
--hm-font-size-2: 0.8125rem;
|
|
107
|
+
--hm-font-size-3: 0.875rem;
|
|
108
|
+
--hm-font-size-4: 1rem;
|
|
109
|
+
--hm-font-size-5: 1.125rem;
|
|
110
|
+
--hm-font-size-6: 1.25rem;
|
|
111
|
+
--hm-font-size-7: 1.5rem;
|
|
112
|
+
--hm-font-weight-400: 400;
|
|
113
|
+
--hm-font-weight-500: 500;
|
|
114
|
+
--hm-font-weight-600: 600;
|
|
115
|
+
--hm-font-weight-700: 700;
|
|
116
|
+
--hm-leading-tight: 1.25;
|
|
117
|
+
--hm-leading-normal: 1.5;
|
|
118
|
+
--hm-leading-relaxed: 1.75;
|
|
119
|
+
--hm-duration-fast: 100ms;
|
|
120
|
+
--hm-duration-normal: 200ms;
|
|
121
|
+
--hm-duration-slow: 300ms;
|
|
122
|
+
--hm-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
123
|
+
--hm-easing-decelerate: cubic-bezier(0, 0, 0, 1);
|
|
124
|
+
--hm-easing-accelerate: cubic-bezier(0.3, 0, 1, 1);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:root,
|
|
128
|
+
[data-hm-theme="light"],
|
|
129
|
+
[data-hm-theme="system"] {
|
|
130
|
+
--hm-color-scheme: light;
|
|
131
|
+
--hm-color-bg: var(--hm-white);
|
|
132
|
+
--hm-color-surface: var(--hm-gray-50);
|
|
133
|
+
--hm-color-surface-raised: var(--hm-white);
|
|
134
|
+
--hm-color-surface-sunken: var(--hm-gray-100);
|
|
135
|
+
--hm-color-overlay: oklch(0.26 0.01 260 / 0.5);
|
|
136
|
+
--hm-color-text: var(--hm-gray-900);
|
|
137
|
+
--hm-color-text-muted: var(--hm-gray-700);
|
|
138
|
+
--hm-color-text-disabled: var(--hm-gray-400);
|
|
139
|
+
--hm-color-border: var(--hm-gray-200);
|
|
140
|
+
--hm-color-border-strong: var(--hm-gray-600);
|
|
141
|
+
--hm-color-control: var(--hm-gray-100);
|
|
142
|
+
--hm-color-control-hover: var(--hm-gray-200);
|
|
143
|
+
--hm-color-control-active: var(--hm-gray-300);
|
|
144
|
+
--hm-color-accent: var(--hm-blue-700);
|
|
145
|
+
--hm-color-accent-hover: var(--hm-blue-800);
|
|
146
|
+
--hm-color-accent-active: var(--hm-blue-900);
|
|
147
|
+
--hm-color-on-accent: var(--hm-white);
|
|
148
|
+
--hm-color-accent-subtle: var(--hm-blue-100);
|
|
149
|
+
--hm-color-accent-text: var(--hm-blue-700);
|
|
150
|
+
--hm-color-danger: var(--hm-red-600);
|
|
151
|
+
--hm-color-danger-hover: var(--hm-red-700);
|
|
152
|
+
--hm-color-on-danger: var(--hm-white);
|
|
153
|
+
--hm-color-danger-subtle: var(--hm-red-100);
|
|
154
|
+
--hm-color-danger-text: var(--hm-red-700);
|
|
155
|
+
--hm-color-warning: var(--hm-amber-400);
|
|
156
|
+
--hm-color-on-warning: var(--hm-gray-950);
|
|
157
|
+
--hm-color-warning-subtle: var(--hm-amber-100);
|
|
158
|
+
--hm-color-warning-text: var(--hm-amber-800);
|
|
159
|
+
--hm-color-success: var(--hm-green-700);
|
|
160
|
+
--hm-color-on-success: var(--hm-white);
|
|
161
|
+
--hm-color-success-subtle: var(--hm-green-100);
|
|
162
|
+
--hm-color-success-text: var(--hm-green-700);
|
|
163
|
+
--hm-focus-ring-color: var(--hm-blue-700);
|
|
164
|
+
--hm-focus-ring-width: 2px;
|
|
165
|
+
--hm-focus-ring-offset: 2px;
|
|
166
|
+
--hm-focus-ring: var(--hm-focus-ring-width) solid var(--hm-focus-ring-color);
|
|
167
|
+
--hm-font-family: var(--hm-font-sans);
|
|
168
|
+
--hm-font-family-mono: var(--hm-font-mono);
|
|
169
|
+
--hm-font-size-small: var(--hm-font-size-2);
|
|
170
|
+
--hm-font-size-body: var(--hm-font-size-3);
|
|
171
|
+
--hm-font-size-title: var(--hm-font-size-6);
|
|
172
|
+
--hm-font-weight-regular: var(--hm-font-weight-400);
|
|
173
|
+
--hm-font-weight-strong: var(--hm-font-weight-600);
|
|
174
|
+
--hm-line-height-body: var(--hm-leading-normal);
|
|
175
|
+
--hm-line-height-tight: var(--hm-leading-tight);
|
|
176
|
+
--hm-letter-spacing: 0;
|
|
177
|
+
--hm-surface-width-small: 24rem;
|
|
178
|
+
--hm-surface-width-medium: 32rem;
|
|
179
|
+
--hm-surface-width-large: 48rem;
|
|
180
|
+
--hm-track-size: 0.375rem;
|
|
181
|
+
--hm-radius-control: var(--hm-radius-md);
|
|
182
|
+
--hm-radius-surface: var(--hm-radius-lg);
|
|
183
|
+
--hm-radius-round: var(--hm-radius-full);
|
|
184
|
+
--hm-border-width: var(--hm-border-width-1);
|
|
185
|
+
--hm-shadow-raised: 0 1px 2px oklch(0 0 0 / 0.06), 0 4px 12px oklch(0 0 0 / 0.08);
|
|
186
|
+
--hm-shadow-overlay: 0 8px 24px oklch(0 0 0 / 0.12), 0 24px 48px oklch(0 0 0 / 0.12);
|
|
187
|
+
--hm-motion-duration-feedback: var(--hm-duration-fast);
|
|
188
|
+
--hm-motion-duration-enter: var(--hm-duration-normal);
|
|
189
|
+
--hm-motion-duration-exit: var(--hm-duration-fast);
|
|
190
|
+
--hm-motion-easing-standard: var(--hm-easing-standard);
|
|
191
|
+
--hm-motion-easing-enter: var(--hm-easing-decelerate);
|
|
192
|
+
--hm-motion-easing-exit: var(--hm-easing-accelerate);
|
|
193
|
+
--hm-motion-duration-loop: 1s;
|
|
194
|
+
--hm-motion-easing-loop: linear;
|
|
195
|
+
--hm-z-raised: 1;
|
|
196
|
+
--hm-z-sticky: 10;
|
|
197
|
+
--hm-z-overlay: 100;
|
|
198
|
+
--hm-opacity-disabled: 0.5;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (prefers-color-scheme: dark) {
|
|
202
|
+
:root,
|
|
203
|
+
[data-hm-theme="system"] {
|
|
204
|
+
--hm-color-scheme: dark;
|
|
205
|
+
--hm-color-bg: var(--hm-gray-950);
|
|
206
|
+
--hm-color-surface: var(--hm-gray-900);
|
|
207
|
+
--hm-color-surface-raised: var(--hm-gray-800);
|
|
208
|
+
--hm-color-surface-sunken: var(--hm-black);
|
|
209
|
+
--hm-color-overlay: oklch(0 0 0 / 0.6);
|
|
210
|
+
--hm-color-text: var(--hm-gray-50);
|
|
211
|
+
--hm-color-text-muted: var(--hm-gray-300);
|
|
212
|
+
--hm-color-text-disabled: var(--hm-gray-600);
|
|
213
|
+
--hm-color-border: var(--hm-gray-800);
|
|
214
|
+
--hm-color-border-strong: var(--hm-gray-400);
|
|
215
|
+
--hm-color-control: var(--hm-gray-800);
|
|
216
|
+
--hm-color-control-hover: var(--hm-gray-700);
|
|
217
|
+
--hm-color-control-active: var(--hm-gray-900);
|
|
218
|
+
--hm-color-accent: var(--hm-blue-400);
|
|
219
|
+
--hm-color-accent-hover: var(--hm-blue-300);
|
|
220
|
+
--hm-color-accent-active: var(--hm-blue-200);
|
|
221
|
+
--hm-color-on-accent: var(--hm-gray-950);
|
|
222
|
+
--hm-color-accent-subtle: var(--hm-blue-900);
|
|
223
|
+
--hm-color-accent-text: var(--hm-blue-300);
|
|
224
|
+
--hm-color-danger: var(--hm-red-400);
|
|
225
|
+
--hm-color-danger-hover: var(--hm-red-300);
|
|
226
|
+
--hm-color-on-danger: var(--hm-gray-950);
|
|
227
|
+
--hm-color-danger-subtle: var(--hm-red-950);
|
|
228
|
+
--hm-color-danger-text: var(--hm-red-300);
|
|
229
|
+
--hm-color-warning: var(--hm-amber-400);
|
|
230
|
+
--hm-color-on-warning: var(--hm-gray-950);
|
|
231
|
+
--hm-color-warning-subtle: var(--hm-amber-950);
|
|
232
|
+
--hm-color-warning-text: var(--hm-amber-300);
|
|
233
|
+
--hm-color-success: var(--hm-green-400);
|
|
234
|
+
--hm-color-on-success: var(--hm-gray-950);
|
|
235
|
+
--hm-color-success-subtle: var(--hm-green-950);
|
|
236
|
+
--hm-color-success-text: var(--hm-green-300);
|
|
237
|
+
--hm-focus-ring-color: var(--hm-blue-400);
|
|
238
|
+
--hm-focus-ring-width: 2px;
|
|
239
|
+
--hm-focus-ring-offset: 2px;
|
|
240
|
+
--hm-focus-ring: var(--hm-focus-ring-width) solid var(--hm-focus-ring-color);
|
|
241
|
+
--hm-font-family: var(--hm-font-sans);
|
|
242
|
+
--hm-font-family-mono: var(--hm-font-mono);
|
|
243
|
+
--hm-font-size-small: var(--hm-font-size-2);
|
|
244
|
+
--hm-font-size-body: var(--hm-font-size-3);
|
|
245
|
+
--hm-font-size-title: var(--hm-font-size-6);
|
|
246
|
+
--hm-font-weight-regular: var(--hm-font-weight-400);
|
|
247
|
+
--hm-font-weight-strong: var(--hm-font-weight-600);
|
|
248
|
+
--hm-line-height-body: var(--hm-leading-normal);
|
|
249
|
+
--hm-line-height-tight: var(--hm-leading-tight);
|
|
250
|
+
--hm-letter-spacing: 0;
|
|
251
|
+
--hm-surface-width-small: 24rem;
|
|
252
|
+
--hm-surface-width-medium: 32rem;
|
|
253
|
+
--hm-surface-width-large: 48rem;
|
|
254
|
+
--hm-track-size: 0.375rem;
|
|
255
|
+
--hm-radius-control: var(--hm-radius-md);
|
|
256
|
+
--hm-radius-surface: var(--hm-radius-lg);
|
|
257
|
+
--hm-radius-round: var(--hm-radius-full);
|
|
258
|
+
--hm-border-width: var(--hm-border-width-1);
|
|
259
|
+
--hm-shadow-raised: 0 1px 2px oklch(0 0 0 / 0.4), 0 4px 12px oklch(0 0 0 / 0.4);
|
|
260
|
+
--hm-shadow-overlay: 0 8px 24px oklch(0 0 0 / 0.5), 0 24px 48px oklch(0 0 0 / 0.5);
|
|
261
|
+
--hm-motion-duration-feedback: var(--hm-duration-fast);
|
|
262
|
+
--hm-motion-duration-enter: var(--hm-duration-normal);
|
|
263
|
+
--hm-motion-duration-exit: var(--hm-duration-fast);
|
|
264
|
+
--hm-motion-easing-standard: var(--hm-easing-standard);
|
|
265
|
+
--hm-motion-easing-enter: var(--hm-easing-decelerate);
|
|
266
|
+
--hm-motion-easing-exit: var(--hm-easing-accelerate);
|
|
267
|
+
--hm-motion-duration-loop: 1s;
|
|
268
|
+
--hm-motion-easing-loop: linear;
|
|
269
|
+
--hm-z-raised: 1;
|
|
270
|
+
--hm-z-sticky: 10;
|
|
271
|
+
--hm-z-overlay: 100;
|
|
272
|
+
--hm-opacity-disabled: 0.5;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
:root[data-hm-theme="light"],
|
|
277
|
+
[data-hm-theme="light"] {
|
|
278
|
+
--hm-color-scheme: light;
|
|
279
|
+
--hm-color-bg: var(--hm-white);
|
|
280
|
+
--hm-color-surface: var(--hm-gray-50);
|
|
281
|
+
--hm-color-surface-raised: var(--hm-white);
|
|
282
|
+
--hm-color-surface-sunken: var(--hm-gray-100);
|
|
283
|
+
--hm-color-overlay: oklch(0.26 0.01 260 / 0.5);
|
|
284
|
+
--hm-color-text: var(--hm-gray-900);
|
|
285
|
+
--hm-color-text-muted: var(--hm-gray-700);
|
|
286
|
+
--hm-color-text-disabled: var(--hm-gray-400);
|
|
287
|
+
--hm-color-border: var(--hm-gray-200);
|
|
288
|
+
--hm-color-border-strong: var(--hm-gray-600);
|
|
289
|
+
--hm-color-control: var(--hm-gray-100);
|
|
290
|
+
--hm-color-control-hover: var(--hm-gray-200);
|
|
291
|
+
--hm-color-control-active: var(--hm-gray-300);
|
|
292
|
+
--hm-color-accent: var(--hm-blue-700);
|
|
293
|
+
--hm-color-accent-hover: var(--hm-blue-800);
|
|
294
|
+
--hm-color-accent-active: var(--hm-blue-900);
|
|
295
|
+
--hm-color-on-accent: var(--hm-white);
|
|
296
|
+
--hm-color-accent-subtle: var(--hm-blue-100);
|
|
297
|
+
--hm-color-accent-text: var(--hm-blue-700);
|
|
298
|
+
--hm-color-danger: var(--hm-red-600);
|
|
299
|
+
--hm-color-danger-hover: var(--hm-red-700);
|
|
300
|
+
--hm-color-on-danger: var(--hm-white);
|
|
301
|
+
--hm-color-danger-subtle: var(--hm-red-100);
|
|
302
|
+
--hm-color-danger-text: var(--hm-red-700);
|
|
303
|
+
--hm-color-warning: var(--hm-amber-400);
|
|
304
|
+
--hm-color-on-warning: var(--hm-gray-950);
|
|
305
|
+
--hm-color-warning-subtle: var(--hm-amber-100);
|
|
306
|
+
--hm-color-warning-text: var(--hm-amber-800);
|
|
307
|
+
--hm-color-success: var(--hm-green-700);
|
|
308
|
+
--hm-color-on-success: var(--hm-white);
|
|
309
|
+
--hm-color-success-subtle: var(--hm-green-100);
|
|
310
|
+
--hm-color-success-text: var(--hm-green-700);
|
|
311
|
+
--hm-focus-ring-color: var(--hm-blue-700);
|
|
312
|
+
--hm-focus-ring-width: 2px;
|
|
313
|
+
--hm-focus-ring-offset: 2px;
|
|
314
|
+
--hm-focus-ring: var(--hm-focus-ring-width) solid var(--hm-focus-ring-color);
|
|
315
|
+
--hm-font-family: var(--hm-font-sans);
|
|
316
|
+
--hm-font-family-mono: var(--hm-font-mono);
|
|
317
|
+
--hm-font-size-small: var(--hm-font-size-2);
|
|
318
|
+
--hm-font-size-body: var(--hm-font-size-3);
|
|
319
|
+
--hm-font-size-title: var(--hm-font-size-6);
|
|
320
|
+
--hm-font-weight-regular: var(--hm-font-weight-400);
|
|
321
|
+
--hm-font-weight-strong: var(--hm-font-weight-600);
|
|
322
|
+
--hm-line-height-body: var(--hm-leading-normal);
|
|
323
|
+
--hm-line-height-tight: var(--hm-leading-tight);
|
|
324
|
+
--hm-letter-spacing: 0;
|
|
325
|
+
--hm-surface-width-small: 24rem;
|
|
326
|
+
--hm-surface-width-medium: 32rem;
|
|
327
|
+
--hm-surface-width-large: 48rem;
|
|
328
|
+
--hm-track-size: 0.375rem;
|
|
329
|
+
--hm-radius-control: var(--hm-radius-md);
|
|
330
|
+
--hm-radius-surface: var(--hm-radius-lg);
|
|
331
|
+
--hm-radius-round: var(--hm-radius-full);
|
|
332
|
+
--hm-border-width: var(--hm-border-width-1);
|
|
333
|
+
--hm-shadow-raised: 0 1px 2px oklch(0 0 0 / 0.06), 0 4px 12px oklch(0 0 0 / 0.08);
|
|
334
|
+
--hm-shadow-overlay: 0 8px 24px oklch(0 0 0 / 0.12), 0 24px 48px oklch(0 0 0 / 0.12);
|
|
335
|
+
--hm-motion-duration-feedback: var(--hm-duration-fast);
|
|
336
|
+
--hm-motion-duration-enter: var(--hm-duration-normal);
|
|
337
|
+
--hm-motion-duration-exit: var(--hm-duration-fast);
|
|
338
|
+
--hm-motion-easing-standard: var(--hm-easing-standard);
|
|
339
|
+
--hm-motion-easing-enter: var(--hm-easing-decelerate);
|
|
340
|
+
--hm-motion-easing-exit: var(--hm-easing-accelerate);
|
|
341
|
+
--hm-motion-duration-loop: 1s;
|
|
342
|
+
--hm-motion-easing-loop: linear;
|
|
343
|
+
--hm-z-raised: 1;
|
|
344
|
+
--hm-z-sticky: 10;
|
|
345
|
+
--hm-z-overlay: 100;
|
|
346
|
+
--hm-opacity-disabled: 0.5;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
:root[data-hm-theme="dark"],
|
|
350
|
+
[data-hm-theme="dark"] {
|
|
351
|
+
--hm-color-scheme: dark;
|
|
352
|
+
--hm-color-bg: var(--hm-gray-950);
|
|
353
|
+
--hm-color-surface: var(--hm-gray-900);
|
|
354
|
+
--hm-color-surface-raised: var(--hm-gray-800);
|
|
355
|
+
--hm-color-surface-sunken: var(--hm-black);
|
|
356
|
+
--hm-color-overlay: oklch(0 0 0 / 0.6);
|
|
357
|
+
--hm-color-text: var(--hm-gray-50);
|
|
358
|
+
--hm-color-text-muted: var(--hm-gray-300);
|
|
359
|
+
--hm-color-text-disabled: var(--hm-gray-600);
|
|
360
|
+
--hm-color-border: var(--hm-gray-800);
|
|
361
|
+
--hm-color-border-strong: var(--hm-gray-400);
|
|
362
|
+
--hm-color-control: var(--hm-gray-800);
|
|
363
|
+
--hm-color-control-hover: var(--hm-gray-700);
|
|
364
|
+
--hm-color-control-active: var(--hm-gray-900);
|
|
365
|
+
--hm-color-accent: var(--hm-blue-400);
|
|
366
|
+
--hm-color-accent-hover: var(--hm-blue-300);
|
|
367
|
+
--hm-color-accent-active: var(--hm-blue-200);
|
|
368
|
+
--hm-color-on-accent: var(--hm-gray-950);
|
|
369
|
+
--hm-color-accent-subtle: var(--hm-blue-900);
|
|
370
|
+
--hm-color-accent-text: var(--hm-blue-300);
|
|
371
|
+
--hm-color-danger: var(--hm-red-400);
|
|
372
|
+
--hm-color-danger-hover: var(--hm-red-300);
|
|
373
|
+
--hm-color-on-danger: var(--hm-gray-950);
|
|
374
|
+
--hm-color-danger-subtle: var(--hm-red-950);
|
|
375
|
+
--hm-color-danger-text: var(--hm-red-300);
|
|
376
|
+
--hm-color-warning: var(--hm-amber-400);
|
|
377
|
+
--hm-color-on-warning: var(--hm-gray-950);
|
|
378
|
+
--hm-color-warning-subtle: var(--hm-amber-950);
|
|
379
|
+
--hm-color-warning-text: var(--hm-amber-300);
|
|
380
|
+
--hm-color-success: var(--hm-green-400);
|
|
381
|
+
--hm-color-on-success: var(--hm-gray-950);
|
|
382
|
+
--hm-color-success-subtle: var(--hm-green-950);
|
|
383
|
+
--hm-color-success-text: var(--hm-green-300);
|
|
384
|
+
--hm-focus-ring-color: var(--hm-blue-400);
|
|
385
|
+
--hm-focus-ring-width: 2px;
|
|
386
|
+
--hm-focus-ring-offset: 2px;
|
|
387
|
+
--hm-focus-ring: var(--hm-focus-ring-width) solid var(--hm-focus-ring-color);
|
|
388
|
+
--hm-font-family: var(--hm-font-sans);
|
|
389
|
+
--hm-font-family-mono: var(--hm-font-mono);
|
|
390
|
+
--hm-font-size-small: var(--hm-font-size-2);
|
|
391
|
+
--hm-font-size-body: var(--hm-font-size-3);
|
|
392
|
+
--hm-font-size-title: var(--hm-font-size-6);
|
|
393
|
+
--hm-font-weight-regular: var(--hm-font-weight-400);
|
|
394
|
+
--hm-font-weight-strong: var(--hm-font-weight-600);
|
|
395
|
+
--hm-line-height-body: var(--hm-leading-normal);
|
|
396
|
+
--hm-line-height-tight: var(--hm-leading-tight);
|
|
397
|
+
--hm-letter-spacing: 0;
|
|
398
|
+
--hm-surface-width-small: 24rem;
|
|
399
|
+
--hm-surface-width-medium: 32rem;
|
|
400
|
+
--hm-surface-width-large: 48rem;
|
|
401
|
+
--hm-track-size: 0.375rem;
|
|
402
|
+
--hm-radius-control: var(--hm-radius-md);
|
|
403
|
+
--hm-radius-surface: var(--hm-radius-lg);
|
|
404
|
+
--hm-radius-round: var(--hm-radius-full);
|
|
405
|
+
--hm-border-width: var(--hm-border-width-1);
|
|
406
|
+
--hm-shadow-raised: 0 1px 2px oklch(0 0 0 / 0.4), 0 4px 12px oklch(0 0 0 / 0.4);
|
|
407
|
+
--hm-shadow-overlay: 0 8px 24px oklch(0 0 0 / 0.5), 0 24px 48px oklch(0 0 0 / 0.5);
|
|
408
|
+
--hm-motion-duration-feedback: var(--hm-duration-fast);
|
|
409
|
+
--hm-motion-duration-enter: var(--hm-duration-normal);
|
|
410
|
+
--hm-motion-duration-exit: var(--hm-duration-fast);
|
|
411
|
+
--hm-motion-easing-standard: var(--hm-easing-standard);
|
|
412
|
+
--hm-motion-easing-enter: var(--hm-easing-decelerate);
|
|
413
|
+
--hm-motion-easing-exit: var(--hm-easing-accelerate);
|
|
414
|
+
--hm-motion-duration-loop: 1s;
|
|
415
|
+
--hm-motion-easing-loop: linear;
|
|
416
|
+
--hm-z-raised: 1;
|
|
417
|
+
--hm-z-sticky: 10;
|
|
418
|
+
--hm-z-overlay: 100;
|
|
419
|
+
--hm-opacity-disabled: 0.5;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
:root,
|
|
423
|
+
[data-hm-density="comfortable"] {
|
|
424
|
+
--hm-control-height: 2rem;
|
|
425
|
+
--hm-control-height-small: 1.5rem;
|
|
426
|
+
--hm-control-padding-x: var(--hm-space-3);
|
|
427
|
+
--hm-control-gap: var(--hm-space-2);
|
|
428
|
+
--hm-icon-size: 1.25rem;
|
|
429
|
+
--hm-target-size: 1.5rem;
|
|
430
|
+
--hm-gap-tight: var(--hm-space-1);
|
|
431
|
+
--hm-gap-normal: var(--hm-space-2);
|
|
432
|
+
--hm-gap-loose: var(--hm-space-4);
|
|
433
|
+
--hm-inset-tight: var(--hm-space-2);
|
|
434
|
+
--hm-inset-normal: var(--hm-space-3);
|
|
435
|
+
--hm-inset-loose: var(--hm-space-5);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
:root[data-hm-density="compact"],
|
|
439
|
+
[data-hm-density="compact"] {
|
|
440
|
+
--hm-control-height: 1.75rem;
|
|
441
|
+
--hm-control-padding-x: var(--hm-space-2);
|
|
442
|
+
--hm-control-gap: var(--hm-space-1);
|
|
443
|
+
--hm-icon-size: 1rem;
|
|
444
|
+
--hm-gap-tight: 0.125rem;
|
|
445
|
+
--hm-gap-normal: var(--hm-space-1);
|
|
446
|
+
--hm-gap-loose: var(--hm-space-3);
|
|
447
|
+
--hm-inset-tight: var(--hm-space-1);
|
|
448
|
+
--hm-inset-normal: var(--hm-space-2);
|
|
449
|
+
--hm-inset-loose: var(--hm-space-4);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
@media (pointer: coarse) {
|
|
453
|
+
:root,
|
|
454
|
+
:root[data-hm-density],
|
|
455
|
+
[data-hm-density] {
|
|
456
|
+
--hm-control-height: 2.75rem;
|
|
457
|
+
--hm-control-height-small: 2.75rem;
|
|
458
|
+
--hm-target-size: 2.75rem;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
/*
|
|
463
|
+
* Base styles. They only apply inside elements that opt in with an hm
|
|
464
|
+
* attribute or class, never to the host page (ADR 0005).
|
|
465
|
+
*/
|
|
466
|
+
@layer hm.base {
|
|
467
|
+
/*
|
|
468
|
+
* Native scrollbars and form controls follow the theme, and so does text.
|
|
469
|
+
* color is inherited as a computed value, so without this, text inside a
|
|
470
|
+
* themed subtree would keep the colour of the theme around it. It's in the
|
|
471
|
+
* lowest layer, so any host CSS still wins. Backgrounds stay the host's.
|
|
472
|
+
*/
|
|
473
|
+
[data-hm-theme],
|
|
474
|
+
[data-hm-theme-scope] {
|
|
475
|
+
color: var(--hm-color-text);
|
|
476
|
+
color-scheme: var(--hm-color-scheme);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/*
|
|
480
|
+
* ThemeProvider's wrapper. Custom properties still inherit through it,
|
|
481
|
+
* because inheritance follows the DOM tree, not boxes.
|
|
482
|
+
*/
|
|
483
|
+
[data-hm-theme-scope] {
|
|
484
|
+
display: contents;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
@layer hm.components {
|
|
488
|
+
/*
|
|
489
|
+
* The standard clip pattern: out of sight, but still in the accessibility
|
|
490
|
+
* tree and in the accessible name of its parent.
|
|
491
|
+
*/
|
|
492
|
+
.hm-visually-hidden {
|
|
493
|
+
/* stylelint-disable hm/no-literal-values -- the clip pattern needs a 1px box and no margin, border or padding, whatever the theme. */
|
|
494
|
+
block-size: 1px;
|
|
495
|
+
border: 0;
|
|
496
|
+
clip-path: inset(50%);
|
|
497
|
+
inline-size: 1px;
|
|
498
|
+
margin: -1px;
|
|
499
|
+
overflow: hidden;
|
|
500
|
+
padding: 0;
|
|
501
|
+
position: absolute;
|
|
502
|
+
white-space: nowrap;
|
|
503
|
+
/* stylelint-enable hm/no-literal-values */
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
@layer hm.components {
|
|
507
|
+
/*
|
|
508
|
+
* ui's icons (docs/adr/0005). They size to --hm-icon-size; inside a
|
|
509
|
+
* button's icon slot, the slot sets their size instead. Their colour is
|
|
510
|
+
* currentColor, so they follow the text.
|
|
511
|
+
*/
|
|
512
|
+
.hm-icon {
|
|
513
|
+
block-size: var(--hm-icon-size);
|
|
514
|
+
flex-shrink: 0;
|
|
515
|
+
inline-size: var(--hm-icon-size);
|
|
516
|
+
vertical-align: middle;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/* Icons that point along the reading direction, such as undo and redo. */
|
|
520
|
+
.hm-icon[data-hm-mirror]:dir(rtl) {
|
|
521
|
+
transform: scaleX(-1);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
@layer hm.components {
|
|
525
|
+
/*
|
|
526
|
+
* Layout, focus and target size: kept with unstyled, so the button stays
|
|
527
|
+
* usable and accessible.
|
|
528
|
+
*/
|
|
529
|
+
.hm-button {
|
|
530
|
+
align-items: center;
|
|
531
|
+
box-sizing: border-box;
|
|
532
|
+
cursor: pointer;
|
|
533
|
+
display: inline-flex;
|
|
534
|
+
flex-shrink: 0;
|
|
535
|
+
gap: var(--hm-button-gap, var(--hm-control-gap));
|
|
536
|
+
justify-content: center;
|
|
537
|
+
min-block-size: max(var(--hm-button-height, var(--hm-control-height)), var(--hm-target-size));
|
|
538
|
+
min-inline-size: var(--hm-target-size);
|
|
539
|
+
padding-block: 0;
|
|
540
|
+
padding-inline: var(--hm-button-padding-x, var(--hm-control-padding-x));
|
|
541
|
+
user-select: none;
|
|
542
|
+
white-space: nowrap;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.hm-button--small {
|
|
546
|
+
min-block-size: max(
|
|
547
|
+
var(--hm-button-small-height, var(--hm-control-height-small)),
|
|
548
|
+
var(--hm-target-size)
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.hm-button:focus-visible {
|
|
553
|
+
outline: var(--hm-focus-ring);
|
|
554
|
+
outline-offset: var(--hm-focus-ring-offset);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.hm-button:disabled,
|
|
558
|
+
.hm-button[aria-disabled="true"] {
|
|
559
|
+
cursor: not-allowed;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.hm-button-icon {
|
|
563
|
+
block-size: var(--hm-button-icon-size, var(--hm-icon-size));
|
|
564
|
+
display: inline-flex;
|
|
565
|
+
flex-shrink: 0;
|
|
566
|
+
inline-size: var(--hm-button-icon-size, var(--hm-icon-size));
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.hm-button-icon > svg {
|
|
570
|
+
block-size: inherit;
|
|
571
|
+
inline-size: inherit;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/* Square, with no label. */
|
|
575
|
+
.hm-icon-button {
|
|
576
|
+
min-inline-size: max(var(--hm-button-height, var(--hm-control-height)), var(--hm-target-size));
|
|
577
|
+
padding-inline: 0;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.hm-icon-button.hm-button--small {
|
|
581
|
+
min-inline-size: max(
|
|
582
|
+
var(--hm-button-small-height, var(--hm-control-height-small)),
|
|
583
|
+
var(--hm-target-size)
|
|
584
|
+
);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/* Visual styles, dropped with unstyled. */
|
|
588
|
+
.hm-button:not([data-hm-unstyled]) {
|
|
589
|
+
background: var(--hm-button-bg, var(--hm-color-control));
|
|
590
|
+
/*
|
|
591
|
+
* The border is transparent unless a variant colours it. It still takes
|
|
592
|
+
* space, so variants line up, and forced-colours mode draws it.
|
|
593
|
+
*/
|
|
594
|
+
border: var(--hm-border-width) solid transparent;
|
|
595
|
+
border-radius: var(--hm-button-radius, var(--hm-radius-control));
|
|
596
|
+
color: var(--hm-button-fg, var(--hm-color-text));
|
|
597
|
+
font-family: var(--hm-font-family);
|
|
598
|
+
font-size: var(--hm-font-size-body);
|
|
599
|
+
font-weight: var(--hm-button-font-weight, var(--hm-font-weight-strong));
|
|
600
|
+
letter-spacing: var(--hm-letter-spacing);
|
|
601
|
+
line-height: var(--hm-line-height-tight);
|
|
602
|
+
transition-duration: var(--hm-motion-duration-feedback);
|
|
603
|
+
transition-property: background-color, border-color, color;
|
|
604
|
+
transition-timing-function: var(--hm-motion-easing-standard);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.hm-button--secondary:not([data-hm-unstyled]) {
|
|
608
|
+
border-color: var(--hm-button-border-color, var(--hm-color-border-strong));
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.hm-button--primary:not([data-hm-unstyled]) {
|
|
612
|
+
background: var(--hm-button-primary-bg, var(--hm-color-accent));
|
|
613
|
+
color: var(--hm-button-primary-fg, var(--hm-color-on-accent));
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.hm-button--quiet:not([data-hm-unstyled]) {
|
|
617
|
+
background: transparent;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.hm-button--danger:not([data-hm-unstyled]) {
|
|
621
|
+
background: var(--hm-button-danger-bg, var(--hm-color-danger));
|
|
622
|
+
color: var(--hm-button-danger-fg, var(--hm-color-on-danger));
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.hm-button[aria-pressed="true"]:not([data-hm-unstyled]) {
|
|
626
|
+
background: var(--hm-button-pressed-bg, var(--hm-color-accent-subtle));
|
|
627
|
+
/*
|
|
628
|
+
* The border carries the state at 3:1 against the surface (WCAG 1.4.11),
|
|
629
|
+
* so it doesn't rest on the background colour alone.
|
|
630
|
+
*/
|
|
631
|
+
border-color: var(--hm-button-pressed-border-color, var(--hm-color-accent));
|
|
632
|
+
color: var(--hm-button-pressed-fg, var(--hm-color-text));
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/* Hover only where there's a real pointer, so touch doesn't leave it stuck. */
|
|
636
|
+
@media (hover: hover) {
|
|
637
|
+
.hm-button--secondary:not([data-hm-unstyled], :disabled, [aria-disabled="true"]):hover {
|
|
638
|
+
background: var(--hm-button-bg-hover, var(--hm-color-control-hover));
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.hm-button--primary:not([data-hm-unstyled], :disabled, [aria-disabled="true"]):hover {
|
|
642
|
+
background: var(--hm-button-primary-bg-hover, var(--hm-color-accent-hover));
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.hm-button--quiet:not([data-hm-unstyled], :disabled, [aria-disabled="true"]):hover {
|
|
646
|
+
background: var(--hm-button-quiet-bg-hover, var(--hm-color-control-hover));
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.hm-button--danger:not([data-hm-unstyled], :disabled, [aria-disabled="true"]):hover {
|
|
650
|
+
background: var(--hm-button-danger-bg-hover, var(--hm-color-danger-hover));
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.hm-button--secondary:not([data-hm-unstyled], :disabled, [aria-disabled="true"]):active {
|
|
655
|
+
background: var(--hm-button-bg-active, var(--hm-color-control-active));
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.hm-button--primary:not([data-hm-unstyled], :disabled, [aria-disabled="true"]):active {
|
|
659
|
+
background: var(--hm-button-primary-bg-active, var(--hm-color-accent-active));
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.hm-button--quiet:not([data-hm-unstyled], :disabled, [aria-disabled="true"]):active {
|
|
663
|
+
background: var(--hm-button-quiet-bg-active, var(--hm-color-control-active));
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.hm-button:not([data-hm-unstyled]):disabled,
|
|
667
|
+
.hm-button[aria-disabled="true"]:not([data-hm-unstyled]) {
|
|
668
|
+
opacity: var(--hm-opacity-disabled);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
@media (prefers-reduced-motion: reduce) {
|
|
672
|
+
.hm-button:not([data-hm-unstyled]) {
|
|
673
|
+
transition-duration: 0s;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
@layer hm.components {
|
|
678
|
+
.hm-toolbar {
|
|
679
|
+
align-items: center;
|
|
680
|
+
box-sizing: border-box;
|
|
681
|
+
display: flex;
|
|
682
|
+
flex-wrap: wrap;
|
|
683
|
+
gap: var(--hm-toolbar-gap, var(--hm-gap-tight));
|
|
684
|
+
padding: var(--hm-toolbar-padding, var(--hm-inset-tight));
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.hm-toolbar--vertical {
|
|
688
|
+
align-items: stretch;
|
|
689
|
+
flex-direction: column;
|
|
690
|
+
flex-wrap: nowrap;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.hm-toolbar-group {
|
|
694
|
+
align-items: center;
|
|
695
|
+
display: flex;
|
|
696
|
+
gap: var(--hm-toolbar-group-gap, var(--hm-gap-tight));
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.hm-toolbar--vertical .hm-toolbar-group {
|
|
700
|
+
align-items: stretch;
|
|
701
|
+
flex-direction: column;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.hm-toolbar-separator {
|
|
705
|
+
align-self: stretch;
|
|
706
|
+
border: 0;
|
|
707
|
+
margin: 0;
|
|
708
|
+
background: var(--hm-toolbar-separator-color, var(--hm-color-border));
|
|
709
|
+
flex-shrink: 0;
|
|
710
|
+
inline-size: var(--hm-border-width);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.hm-toolbar--vertical .hm-toolbar-separator {
|
|
714
|
+
block-size: var(--hm-border-width);
|
|
715
|
+
inline-size: auto;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.hm-toolbar:not([data-hm-unstyled]) {
|
|
719
|
+
background: var(--hm-toolbar-bg, var(--hm-color-surface));
|
|
720
|
+
border: var(--hm-border-width) solid var(--hm-toolbar-border-color, var(--hm-color-border));
|
|
721
|
+
border-radius: var(--hm-toolbar-radius, var(--hm-radius-surface));
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
@layer hm.components {
|
|
725
|
+
.hm-segmented-control {
|
|
726
|
+
box-sizing: border-box;
|
|
727
|
+
display: inline-flex;
|
|
728
|
+
gap: var(--hm-segmented-control-gap, var(--hm-gap-tight));
|
|
729
|
+
padding: var(--hm-segmented-control-padding, var(--hm-gap-tight));
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.hm-segmented-control-option {
|
|
733
|
+
align-items: center;
|
|
734
|
+
box-sizing: border-box;
|
|
735
|
+
cursor: pointer;
|
|
736
|
+
display: inline-flex;
|
|
737
|
+
gap: var(--hm-control-gap);
|
|
738
|
+
justify-content: center;
|
|
739
|
+
min-block-size: max(
|
|
740
|
+
var(--hm-segmented-control-height, var(--hm-control-height)),
|
|
741
|
+
var(--hm-target-size)
|
|
742
|
+
);
|
|
743
|
+
min-inline-size: var(--hm-target-size);
|
|
744
|
+
padding-block: 0;
|
|
745
|
+
padding-inline: var(--hm-segmented-control-option-padding-x, var(--hm-control-padding-x));
|
|
746
|
+
user-select: none;
|
|
747
|
+
white-space: nowrap;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.hm-segmented-control--small .hm-segmented-control-option {
|
|
751
|
+
min-block-size: max(
|
|
752
|
+
var(--hm-segmented-control-small-height, var(--hm-control-height-small)),
|
|
753
|
+
var(--hm-target-size)
|
|
754
|
+
);
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
.hm-segmented-control-option:focus-visible {
|
|
758
|
+
outline: var(--hm-focus-ring);
|
|
759
|
+
outline-offset: var(--hm-focus-ring-offset);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.hm-segmented-control-option:disabled {
|
|
763
|
+
cursor: not-allowed;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.hm-segmented-control-icon {
|
|
767
|
+
block-size: var(--hm-icon-size);
|
|
768
|
+
display: inline-flex;
|
|
769
|
+
flex-shrink: 0;
|
|
770
|
+
inline-size: var(--hm-icon-size);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.hm-segmented-control-icon > svg {
|
|
774
|
+
block-size: inherit;
|
|
775
|
+
inline-size: inherit;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.hm-segmented-control:not([data-hm-unstyled]) {
|
|
779
|
+
background: var(--hm-segmented-control-bg, var(--hm-color-surface-sunken));
|
|
780
|
+
border: var(--hm-border-width) solid
|
|
781
|
+
var(--hm-segmented-control-border-color, var(--hm-color-border-strong));
|
|
782
|
+
border-radius: var(--hm-segmented-control-radius, var(--hm-radius-control));
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.hm-segmented-control:not([data-hm-unstyled]) .hm-segmented-control-option {
|
|
786
|
+
background: transparent;
|
|
787
|
+
border: var(--hm-border-width) solid transparent;
|
|
788
|
+
border-radius: var(--hm-segmented-control-radius, var(--hm-radius-control));
|
|
789
|
+
color: var(--hm-segmented-control-option-fg, var(--hm-color-text));
|
|
790
|
+
font-family: var(--hm-font-family);
|
|
791
|
+
font-size: var(--hm-font-size-body);
|
|
792
|
+
font-weight: var(--hm-font-weight-regular);
|
|
793
|
+
letter-spacing: var(--hm-letter-spacing);
|
|
794
|
+
line-height: var(--hm-line-height-tight);
|
|
795
|
+
transition-duration: var(--hm-motion-duration-feedback);
|
|
796
|
+
transition-property: background-color, border-color, color;
|
|
797
|
+
transition-timing-function: var(--hm-motion-easing-standard);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.hm-segmented-control:not([data-hm-unstyled]) .hm-segmented-control-option[aria-checked="true"] {
|
|
801
|
+
background: var(--hm-segmented-control-option-checked-bg, var(--hm-color-surface-raised));
|
|
802
|
+
/* Selection shows as a boundary too, not only as a colour (WCAG 1.4.11). */
|
|
803
|
+
border-color: var(
|
|
804
|
+
--hm-segmented-control-option-checked-border-color,
|
|
805
|
+
var(--hm-color-border-strong)
|
|
806
|
+
);
|
|
807
|
+
color: var(--hm-segmented-control-option-checked-fg, var(--hm-color-text));
|
|
808
|
+
font-weight: var(--hm-font-weight-strong);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
@media (hover: hover) {
|
|
812
|
+
.hm-segmented-control:not([data-hm-unstyled])
|
|
813
|
+
.hm-segmented-control-option:not([aria-checked="true"], :disabled):hover {
|
|
814
|
+
background: var(--hm-segmented-control-option-bg-hover, var(--hm-color-control-hover));
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.hm-segmented-control:not([data-hm-unstyled]) .hm-segmented-control-option:disabled {
|
|
819
|
+
opacity: var(--hm-opacity-disabled);
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
@media (prefers-reduced-motion: reduce) {
|
|
823
|
+
.hm-segmented-control:not([data-hm-unstyled]) .hm-segmented-control-option {
|
|
824
|
+
transition-duration: 0s;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
@layer hm.components {
|
|
829
|
+
/*
|
|
830
|
+
* Layout. The browser's modal styles keep the dialog inside the viewport;
|
|
831
|
+
* these only set its width and arrange its parts.
|
|
832
|
+
*/
|
|
833
|
+
.hm-dialog {
|
|
834
|
+
box-sizing: border-box;
|
|
835
|
+
inline-size: var(--hm-dialog-width, var(--hm-surface-width-medium));
|
|
836
|
+
padding: 0;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.hm-dialog--small {
|
|
840
|
+
inline-size: var(--hm-dialog-small-width, var(--hm-surface-width-small));
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.hm-dialog--large {
|
|
844
|
+
inline-size: var(--hm-dialog-large-width, var(--hm-surface-width-large));
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.hm-dialog[open] {
|
|
848
|
+
display: flex;
|
|
849
|
+
flex-direction: column;
|
|
850
|
+
gap: var(--hm-dialog-gap, var(--hm-gap-loose));
|
|
851
|
+
overflow: hidden;
|
|
852
|
+
/* Scrolling past the dialog's end doesn't scroll the page behind. */
|
|
853
|
+
overscroll-behavior: contain;
|
|
854
|
+
padding: var(--hm-dialog-padding, var(--hm-inset-loose));
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
.hm-dialog-header {
|
|
858
|
+
align-items: flex-start;
|
|
859
|
+
display: flex;
|
|
860
|
+
gap: var(--hm-gap-normal);
|
|
861
|
+
justify-content: space-between;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.hm-dialog-title {
|
|
865
|
+
margin: 0;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
.hm-dialog-description {
|
|
869
|
+
margin: 0;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
/* The body scrolls when the content is long; the header and footer stay. */
|
|
873
|
+
.hm-dialog-body {
|
|
874
|
+
flex: 1 1 auto;
|
|
875
|
+
min-block-size: 0;
|
|
876
|
+
overflow: auto;
|
|
877
|
+
overscroll-behavior: contain;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.hm-dialog-body:focus-visible {
|
|
881
|
+
outline: var(--hm-focus-ring);
|
|
882
|
+
outline-offset: var(--hm-focus-ring-offset);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
.hm-dialog-footer {
|
|
886
|
+
display: flex;
|
|
887
|
+
flex-wrap: wrap;
|
|
888
|
+
gap: var(--hm-gap-normal);
|
|
889
|
+
justify-content: flex-end;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/* Visual styles, dropped with unstyled. */
|
|
893
|
+
.hm-dialog:not([data-hm-unstyled]) {
|
|
894
|
+
background: var(--hm-dialog-bg, var(--hm-color-surface-raised));
|
|
895
|
+
border: var(--hm-border-width) solid var(--hm-dialog-border-color, var(--hm-color-border));
|
|
896
|
+
border-radius: var(--hm-dialog-radius, var(--hm-radius-surface));
|
|
897
|
+
box-shadow: var(--hm-dialog-shadow, var(--hm-shadow-overlay));
|
|
898
|
+
color: var(--hm-dialog-fg, var(--hm-color-text));
|
|
899
|
+
font-family: var(--hm-font-family);
|
|
900
|
+
font-size: var(--hm-font-size-body);
|
|
901
|
+
letter-spacing: var(--hm-letter-spacing);
|
|
902
|
+
line-height: var(--hm-line-height-body);
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.hm-dialog:not([data-hm-unstyled])::backdrop {
|
|
906
|
+
background: var(--hm-dialog-backdrop, var(--hm-color-overlay));
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.hm-dialog:not([data-hm-unstyled]) .hm-dialog-title {
|
|
910
|
+
font-size: var(--hm-dialog-title-font-size, var(--hm-font-size-title));
|
|
911
|
+
font-weight: var(--hm-font-weight-strong);
|
|
912
|
+
line-height: var(--hm-line-height-tight);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.hm-dialog:not([data-hm-unstyled]) .hm-dialog-description {
|
|
916
|
+
color: var(--hm-color-text-muted);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/* Opening and closing fade and rise; reduced motion only fades. */
|
|
920
|
+
.hm-dialog:not([data-hm-unstyled]),
|
|
921
|
+
.hm-dialog:not([data-hm-unstyled])::backdrop {
|
|
922
|
+
transition-behavior: allow-discrete;
|
|
923
|
+
transition-duration: var(--hm-motion-duration-exit);
|
|
924
|
+
transition-property: display, overlay, opacity, translate;
|
|
925
|
+
transition-timing-function: var(--hm-motion-easing-exit);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
.hm-dialog[open]:not([data-hm-unstyled]),
|
|
929
|
+
.hm-dialog[open]:not([data-hm-unstyled])::backdrop {
|
|
930
|
+
transition-duration: var(--hm-motion-duration-enter);
|
|
931
|
+
transition-timing-function: var(--hm-motion-easing-enter);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
.hm-dialog:not([open], [data-hm-unstyled]),
|
|
935
|
+
.hm-dialog:not([open], [data-hm-unstyled])::backdrop {
|
|
936
|
+
opacity: 0;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
.hm-dialog:not([open], [data-hm-unstyled]) {
|
|
940
|
+
translate: 0 var(--hm-gap-normal);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
@starting-style {
|
|
944
|
+
.hm-dialog[open]:not([data-hm-unstyled]),
|
|
945
|
+
.hm-dialog[open]:not([data-hm-unstyled])::backdrop {
|
|
946
|
+
opacity: 0;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
.hm-dialog[open]:not([data-hm-unstyled]) {
|
|
950
|
+
translate: 0 var(--hm-gap-normal);
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
@media (prefers-reduced-motion: reduce) {
|
|
955
|
+
.hm-dialog:not([data-hm-unstyled]),
|
|
956
|
+
.hm-dialog[open]:not([data-hm-unstyled]) {
|
|
957
|
+
translate: none;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
@starting-style {
|
|
961
|
+
.hm-dialog[open]:not([data-hm-unstyled]) {
|
|
962
|
+
translate: none;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
@layer hm.components {
|
|
968
|
+
/* Layout: kept with unstyled. */
|
|
969
|
+
.hm-field {
|
|
970
|
+
display: grid;
|
|
971
|
+
gap: var(--hm-field-gap, var(--hm-gap-tight));
|
|
972
|
+
justify-items: start;
|
|
973
|
+
min-inline-size: 0;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
/* The control fills the field, except for those with their own size. */
|
|
977
|
+
.hm-field > :not(.hm-field-label, .hm-field-description, .hm-field-error) {
|
|
978
|
+
justify-self: stretch;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/* Visual styles, dropped with unstyled. */
|
|
982
|
+
.hm-field:not([data-hm-unstyled]) .hm-field-label {
|
|
983
|
+
color: var(--hm-field-label-fg, var(--hm-color-text));
|
|
984
|
+
font-family: var(--hm-font-family);
|
|
985
|
+
font-size: var(--hm-font-size-body);
|
|
986
|
+
font-weight: var(--hm-field-label-font-weight, var(--hm-font-weight-strong));
|
|
987
|
+
letter-spacing: var(--hm-letter-spacing);
|
|
988
|
+
line-height: var(--hm-line-height-body);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.hm-field:not([data-hm-unstyled]) .hm-field-description,
|
|
992
|
+
.hm-field:not([data-hm-unstyled]) .hm-field-error {
|
|
993
|
+
font-family: var(--hm-font-family);
|
|
994
|
+
font-size: var(--hm-field-message-font-size, var(--hm-font-size-small));
|
|
995
|
+
letter-spacing: var(--hm-letter-spacing);
|
|
996
|
+
line-height: var(--hm-line-height-body);
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
.hm-field:not([data-hm-unstyled]) .hm-field-description {
|
|
1000
|
+
color: var(--hm-field-description-fg, var(--hm-color-text-muted));
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
.hm-field:not([data-hm-unstyled]) .hm-field-error {
|
|
1004
|
+
color: var(--hm-field-error-fg, var(--hm-color-danger-text));
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
@layer hm.components {
|
|
1008
|
+
/* Layout: kept with unstyled. */
|
|
1009
|
+
.hm-file-drop-zone {
|
|
1010
|
+
align-items: center;
|
|
1011
|
+
box-sizing: border-box;
|
|
1012
|
+
display: flex;
|
|
1013
|
+
flex-direction: column;
|
|
1014
|
+
gap: var(--hm-file-drop-zone-gap, var(--hm-gap-normal));
|
|
1015
|
+
justify-content: center;
|
|
1016
|
+
padding: var(--hm-file-drop-zone-padding, var(--hm-inset-loose));
|
|
1017
|
+
text-align: center;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/*
|
|
1021
|
+
* Visual styles, dropped with unstyled. The border turns from dashed to
|
|
1022
|
+
* solid while files are over the zone, so the state isn't colour alone.
|
|
1023
|
+
*/
|
|
1024
|
+
.hm-file-drop-zone:not([data-hm-unstyled]) {
|
|
1025
|
+
border: var(--hm-border-width) dashed
|
|
1026
|
+
var(--hm-file-drop-zone-border-color, var(--hm-color-border-strong));
|
|
1027
|
+
border-radius: var(--hm-file-drop-zone-radius, var(--hm-radius-surface));
|
|
1028
|
+
color: var(--hm-color-text);
|
|
1029
|
+
font-family: var(--hm-font-family);
|
|
1030
|
+
font-size: var(--hm-font-size-body);
|
|
1031
|
+
line-height: var(--hm-line-height-body);
|
|
1032
|
+
transition-duration: var(--hm-motion-duration-feedback);
|
|
1033
|
+
transition-property: background-color, border-color;
|
|
1034
|
+
transition-timing-function: var(--hm-motion-easing-standard);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.hm-file-drop-zone[data-hm-dragging]:not([data-hm-unstyled]) {
|
|
1038
|
+
background: var(--hm-file-drop-zone-dragging-bg, var(--hm-color-accent-subtle));
|
|
1039
|
+
border-color: var(--hm-file-drop-zone-dragging-border-color, var(--hm-color-accent));
|
|
1040
|
+
border-style: solid;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.hm-file-drop-zone:not([data-hm-unstyled]) .hm-file-drop-zone-hint {
|
|
1044
|
+
color: var(--hm-file-drop-zone-hint-fg, var(--hm-color-text-muted));
|
|
1045
|
+
font-size: var(--hm-font-size-small);
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
/*
|
|
1049
|
+
* A disabled zone isn't dimmed: its content, such as a title or an error,
|
|
1050
|
+
* must stay readable. The disabled button shows the state.
|
|
1051
|
+
*/
|
|
1052
|
+
.hm-file-drop-zone[data-hm-disabled] {
|
|
1053
|
+
cursor: not-allowed;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1057
|
+
.hm-file-drop-zone:not([data-hm-unstyled]) {
|
|
1058
|
+
transition-duration: 0s;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
@layer hm.components {
|
|
1063
|
+
/*
|
|
1064
|
+
* Layout, focus and target size: kept with unstyled, so the field stays
|
|
1065
|
+
* usable and accessible.
|
|
1066
|
+
*/
|
|
1067
|
+
.hm-number-field {
|
|
1068
|
+
box-sizing: border-box;
|
|
1069
|
+
min-block-size: max(
|
|
1070
|
+
var(--hm-number-field-height, var(--hm-control-height)),
|
|
1071
|
+
var(--hm-target-size)
|
|
1072
|
+
);
|
|
1073
|
+
min-inline-size: var(--hm-target-size);
|
|
1074
|
+
padding-block: 0;
|
|
1075
|
+
padding-inline: var(--hm-number-field-padding-x, var(--hm-control-padding-x));
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.hm-number-field:focus-visible {
|
|
1079
|
+
outline: var(--hm-focus-ring);
|
|
1080
|
+
outline-offset: var(--hm-focus-ring-offset);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
.hm-number-field:disabled {
|
|
1084
|
+
cursor: not-allowed;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
/* Visual styles, dropped with unstyled. */
|
|
1088
|
+
.hm-number-field:not([data-hm-unstyled]) {
|
|
1089
|
+
background: var(--hm-number-field-bg, var(--hm-color-surface));
|
|
1090
|
+
border: var(--hm-border-width) solid
|
|
1091
|
+
var(--hm-number-field-border-color, var(--hm-color-border-strong));
|
|
1092
|
+
border-radius: var(--hm-number-field-radius, var(--hm-radius-control));
|
|
1093
|
+
color: var(--hm-number-field-fg, var(--hm-color-text));
|
|
1094
|
+
font-family: var(--hm-font-family);
|
|
1095
|
+
font-size: var(--hm-font-size-body);
|
|
1096
|
+
font-variant-numeric: tabular-nums;
|
|
1097
|
+
letter-spacing: var(--hm-letter-spacing);
|
|
1098
|
+
line-height: var(--hm-line-height-tight);
|
|
1099
|
+
transition: border-color var(--hm-motion-duration-feedback) var(--hm-motion-easing-standard);
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
.hm-number-field[aria-invalid="true"]:not([data-hm-unstyled]) {
|
|
1103
|
+
border-color: var(--hm-number-field-invalid-border-color, var(--hm-color-danger-text));
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
.hm-number-field:not([data-hm-unstyled]):disabled {
|
|
1107
|
+
opacity: var(--hm-opacity-disabled);
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1111
|
+
.hm-number-field:not([data-hm-unstyled]) {
|
|
1112
|
+
transition-duration: 0s;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
@layer hm.components {
|
|
1117
|
+
.hm-spinner {
|
|
1118
|
+
block-size: var(--hm-spinner-size, var(--hm-icon-size));
|
|
1119
|
+
box-sizing: border-box;
|
|
1120
|
+
display: inline-block;
|
|
1121
|
+
flex-shrink: 0;
|
|
1122
|
+
inline-size: var(--hm-spinner-size, var(--hm-icon-size));
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
.hm-spinner:not([data-hm-unstyled]) {
|
|
1126
|
+
animation: hm-spinner-turn var(--hm-spinner-duration, var(--hm-motion-duration-loop))
|
|
1127
|
+
var(--hm-motion-easing-loop) infinite;
|
|
1128
|
+
border: var(--hm-spinner-thickness, var(--hm-focus-ring-width)) solid
|
|
1129
|
+
var(--hm-spinner-track-color, var(--hm-color-border));
|
|
1130
|
+
border-block-start-color: var(--hm-spinner-color, var(--hm-color-accent));
|
|
1131
|
+
border-radius: var(--hm-radius-round);
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/* Reduced motion: a slow pulse instead of turning. */
|
|
1135
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1136
|
+
.hm-spinner:not([data-hm-unstyled]) {
|
|
1137
|
+
animation-name: hm-spinner-pulse;
|
|
1138
|
+
animation-direction: alternate;
|
|
1139
|
+
animation-timing-function: var(--hm-motion-easing-standard);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
@keyframes hm-spinner-turn {
|
|
1144
|
+
to {
|
|
1145
|
+
rotate: 1turn;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
@keyframes hm-spinner-pulse {
|
|
1150
|
+
to {
|
|
1151
|
+
opacity: var(--hm-opacity-disabled);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
@layer hm.components {
|
|
1156
|
+
.hm-progress-bar {
|
|
1157
|
+
block-size: var(--hm-progress-height, var(--hm-track-size));
|
|
1158
|
+
box-sizing: border-box;
|
|
1159
|
+
display: block;
|
|
1160
|
+
inline-size: 100%;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/* The native element, restyled through each engine's pseudo-elements. */
|
|
1164
|
+
.hm-progress-bar:not([data-hm-unstyled]) {
|
|
1165
|
+
appearance: none;
|
|
1166
|
+
background: var(--hm-progress-track-color, var(--hm-color-surface-sunken));
|
|
1167
|
+
border: 0;
|
|
1168
|
+
border-radius: var(--hm-progress-radius, var(--hm-radius-round));
|
|
1169
|
+
color: var(--hm-progress-fill-color, var(--hm-color-accent));
|
|
1170
|
+
overflow: hidden;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.hm-progress-bar:not([data-hm-unstyled])::-webkit-progress-bar {
|
|
1174
|
+
background: transparent;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
.hm-progress-bar:not([data-hm-unstyled])::-webkit-progress-value {
|
|
1178
|
+
background: var(--hm-progress-fill-color, var(--hm-color-accent));
|
|
1179
|
+
border-radius: var(--hm-progress-radius, var(--hm-radius-round));
|
|
1180
|
+
transition: inline-size var(--hm-motion-duration-feedback) var(--hm-motion-easing-standard);
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
.hm-progress-bar:not([data-hm-unstyled])::-moz-progress-bar {
|
|
1184
|
+
background: var(--hm-progress-fill-color, var(--hm-color-accent));
|
|
1185
|
+
border-radius: var(--hm-progress-radius, var(--hm-radius-round));
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
/* Unknown progress: the whole track pulses between track and fill. */
|
|
1189
|
+
.hm-progress-bar:not([data-hm-unstyled]):indeterminate {
|
|
1190
|
+
animation: hm-progress-pulse var(--hm-progress-duration, var(--hm-motion-duration-loop))
|
|
1191
|
+
var(--hm-motion-easing-standard) infinite alternate;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.hm-progress-bar:not([data-hm-unstyled]):indeterminate::-moz-progress-bar {
|
|
1195
|
+
background: transparent;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1199
|
+
.hm-progress-bar:not([data-hm-unstyled]):indeterminate {
|
|
1200
|
+
animation: none;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
.hm-progress-bar:not([data-hm-unstyled])::-webkit-progress-value {
|
|
1204
|
+
transition: none;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
@keyframes hm-progress-pulse {
|
|
1209
|
+
to {
|
|
1210
|
+
background-color: var(--hm-progress-fill-color, var(--hm-color-accent));
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
@layer hm.components {
|
|
1215
|
+
/*
|
|
1216
|
+
* Layout, focus and target size: kept with unstyled, so the native slider
|
|
1217
|
+
* stays usable and accessible.
|
|
1218
|
+
*/
|
|
1219
|
+
.hm-slider {
|
|
1220
|
+
block-size: max(var(--hm-slider-thumb-size, var(--hm-icon-size)), var(--hm-target-size));
|
|
1221
|
+
box-sizing: border-box;
|
|
1222
|
+
cursor: pointer;
|
|
1223
|
+
display: block;
|
|
1224
|
+
inline-size: 100%;
|
|
1225
|
+
margin: 0;
|
|
1226
|
+
min-inline-size: var(--hm-target-size);
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
.hm-slider:disabled {
|
|
1230
|
+
cursor: not-allowed;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
.hm-slider:focus-visible {
|
|
1234
|
+
outline: var(--hm-focus-ring);
|
|
1235
|
+
outline-offset: var(--hm-focus-ring-offset);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
/*
|
|
1239
|
+
* Visual styles, dropped with unstyled. The track and thumb are restyled
|
|
1240
|
+
* through each engine's pseudo-elements. Their borders are transparent,
|
|
1241
|
+
* so forced-colours mode draws them.
|
|
1242
|
+
*/
|
|
1243
|
+
.hm-slider:not([data-hm-unstyled]) {
|
|
1244
|
+
appearance: none;
|
|
1245
|
+
background: transparent;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
/* The focus ring goes round the thumb, where the keyboard acts. */
|
|
1249
|
+
.hm-slider:not([data-hm-unstyled]):focus-visible {
|
|
1250
|
+
outline: none;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
.hm-slider:not([data-hm-unstyled])::-webkit-slider-runnable-track {
|
|
1254
|
+
background: var(--hm-slider-track-color, var(--hm-color-border-strong));
|
|
1255
|
+
block-size: var(--hm-slider-track-size, var(--hm-track-size));
|
|
1256
|
+
border: var(--hm-border-width) solid transparent;
|
|
1257
|
+
border-radius: var(--hm-slider-radius, var(--hm-radius-round));
|
|
1258
|
+
box-sizing: border-box;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.hm-slider:not([data-hm-unstyled])::-moz-range-track {
|
|
1262
|
+
background: var(--hm-slider-track-color, var(--hm-color-border-strong));
|
|
1263
|
+
block-size: var(--hm-slider-track-size, var(--hm-track-size));
|
|
1264
|
+
border: var(--hm-border-width) solid transparent;
|
|
1265
|
+
border-radius: var(--hm-slider-radius, var(--hm-radius-round));
|
|
1266
|
+
box-sizing: border-box;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
.hm-slider:not([data-hm-unstyled])::-webkit-slider-thumb {
|
|
1270
|
+
appearance: none;
|
|
1271
|
+
background: var(--hm-slider-thumb-color, var(--hm-color-accent));
|
|
1272
|
+
block-size: var(--hm-slider-thumb-size, var(--hm-icon-size));
|
|
1273
|
+
border: var(--hm-border-width) solid transparent;
|
|
1274
|
+
border-radius: var(--hm-slider-radius, var(--hm-radius-round));
|
|
1275
|
+
box-sizing: border-box;
|
|
1276
|
+
inline-size: var(--hm-slider-thumb-size, var(--hm-icon-size));
|
|
1277
|
+
/* WebKit and Blink put the thumb at the top of the track's content box. */
|
|
1278
|
+
margin-block-start: calc(
|
|
1279
|
+
(
|
|
1280
|
+
var(--hm-slider-track-size, var(--hm-track-size)) -
|
|
1281
|
+
2 *
|
|
1282
|
+
var(--hm-border-width) -
|
|
1283
|
+
var(--hm-slider-thumb-size, var(--hm-icon-size))
|
|
1284
|
+
) /
|
|
1285
|
+
2
|
|
1286
|
+
);
|
|
1287
|
+
transition: background-color var(--hm-motion-duration-feedback) var(--hm-motion-easing-standard);
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.hm-slider:not([data-hm-unstyled])::-moz-range-thumb {
|
|
1291
|
+
background: var(--hm-slider-thumb-color, var(--hm-color-accent));
|
|
1292
|
+
block-size: var(--hm-slider-thumb-size, var(--hm-icon-size));
|
|
1293
|
+
border: var(--hm-border-width) solid transparent;
|
|
1294
|
+
border-radius: var(--hm-slider-radius, var(--hm-radius-round));
|
|
1295
|
+
box-sizing: border-box;
|
|
1296
|
+
inline-size: var(--hm-slider-thumb-size, var(--hm-icon-size));
|
|
1297
|
+
transition: background-color var(--hm-motion-duration-feedback) var(--hm-motion-easing-standard);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
.hm-slider:not([data-hm-unstyled]):focus-visible::-webkit-slider-thumb {
|
|
1301
|
+
outline: var(--hm-focus-ring);
|
|
1302
|
+
outline-offset: var(--hm-focus-ring-offset);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
.hm-slider:not([data-hm-unstyled]):focus-visible::-moz-range-thumb {
|
|
1306
|
+
outline: var(--hm-focus-ring);
|
|
1307
|
+
outline-offset: var(--hm-focus-ring-offset);
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
/* Hover only where there's a real pointer, so touch doesn't leave it stuck. */
|
|
1311
|
+
@media (hover: hover) {
|
|
1312
|
+
.hm-slider:not([data-hm-unstyled], :disabled):hover::-webkit-slider-thumb {
|
|
1313
|
+
background: var(--hm-slider-thumb-color-hover, var(--hm-color-accent-hover));
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
.hm-slider:not([data-hm-unstyled], :disabled):hover::-moz-range-thumb {
|
|
1317
|
+
background: var(--hm-slider-thumb-color-hover, var(--hm-color-accent-hover));
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
.hm-slider:not([data-hm-unstyled], :disabled):active::-webkit-slider-thumb {
|
|
1322
|
+
background: var(--hm-slider-thumb-color-active, var(--hm-color-accent-active));
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
.hm-slider:not([data-hm-unstyled], :disabled):active::-moz-range-thumb {
|
|
1326
|
+
background: var(--hm-slider-thumb-color-active, var(--hm-color-accent-active));
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
.hm-slider:not([data-hm-unstyled]):disabled {
|
|
1330
|
+
opacity: var(--hm-opacity-disabled);
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1334
|
+
.hm-slider:not([data-hm-unstyled])::-webkit-slider-thumb {
|
|
1335
|
+
transition: none;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
.hm-slider:not([data-hm-unstyled])::-moz-range-thumb {
|
|
1339
|
+
transition: none;
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|