hydrateless 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.css +8 -12
- package/dist/alert.css +1 -1
- package/dist/avatar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/breadcrumb.css +7 -11
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/combobox.css +19 -1
- package/dist/command.css +1 -1
- package/dist/components.css +403 -222
- package/dist/disclosure.css +14 -18
- package/dist/drawer.css +34 -20
- package/dist/dropdown.css +35 -28
- package/dist/field.css +1 -1
- package/dist/hydrateless.css +457 -303
- package/dist/hydrateless.min.css +1 -1
- package/dist/input.css +1 -1
- package/dist/kbd.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/modal.css +17 -19
- package/dist/pagination.css +1 -1
- package/dist/popover.css +40 -9
- package/dist/progress.css +1 -1
- package/dist/radio.css +1 -1
- package/dist/segmented.css +1 -1
- package/dist/select.css +1 -1
- package/dist/separator.css +1 -1
- package/dist/skeleton.css +1 -1
- package/dist/skip-link.css +7 -10
- package/dist/slider.css +1 -1
- package/dist/spinner.css +1 -1
- package/dist/switch.css +20 -6
- package/dist/table.css +1 -1
- package/dist/tabs.css +96 -17
- package/dist/textarea.css +1 -1
- package/dist/toast.css +32 -25
- package/dist/toc.css +12 -12
- package/dist/tokens.css +2 -15
- package/dist/tooltip.css +40 -12
- package/package.json +2 -2
package/dist/components.css
CHANGED
|
@@ -1,101 +1,175 @@
|
|
|
1
1
|
/* Disclosure & layout */
|
|
2
2
|
@layer components {
|
|
3
|
-
details.
|
|
4
|
-
border: 1px solid
|
|
5
|
-
border-radius:
|
|
6
|
-
|
|
7
|
-
background: var(--hl-color-bg);
|
|
3
|
+
details.hl-disclosure {
|
|
4
|
+
border: 1px solid var(--hl-border);
|
|
5
|
+
border-radius: var(--hl-radius-lg);
|
|
6
|
+
background: var(--hl-surface);
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
details.
|
|
9
|
+
details.hl-disclosure > summary {
|
|
11
10
|
list-style: none;
|
|
12
11
|
cursor: pointer;
|
|
13
|
-
padding:
|
|
14
|
-
padding: var(--hl-spacing-3, 0.75rem) var(--hl-spacing-4, 1rem);
|
|
12
|
+
padding: var(--hl-space-3) var(--hl-space-4);
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
details.
|
|
15
|
+
details.hl-disclosure > summary::-webkit-details-marker {
|
|
18
16
|
display: none;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
|
-
details.
|
|
22
|
-
outline:
|
|
23
|
-
outline: var(--hl-focus-ring, 2px solid #1f6feb);
|
|
19
|
+
details.hl-disclosure > summary:focus-visible {
|
|
20
|
+
outline: var(--hl-focus-ring);
|
|
24
21
|
outline-offset: 2px;
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
details.
|
|
24
|
+
details.hl-disclosure > summary::after {
|
|
28
25
|
content: '\25B8';
|
|
29
26
|
float: right;
|
|
30
|
-
transition: transform
|
|
27
|
+
transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
|
|
31
28
|
}
|
|
32
29
|
|
|
33
|
-
details.
|
|
30
|
+
details.hl-disclosure[open] > summary::after {
|
|
34
31
|
transform: rotate(90deg);
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
details.
|
|
38
|
-
padding:
|
|
39
|
-
padding: var(--hl-spacing-3, 0.75rem) var(--hl-spacing-4, 1rem) var(--hl-spacing-4, 1rem);
|
|
34
|
+
details.hl-disclosure > .hl-disclosure-panel {
|
|
35
|
+
padding: var(--hl-space-3) var(--hl-space-4) var(--hl-space-4);
|
|
40
36
|
}
|
|
41
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Tabs. Two markups are supported and styled together:
|
|
40
|
+
*
|
|
41
|
+
* - CSS-only baseline: `.hl-tablist` of `<label class="hl-tab">` wrapping a
|
|
42
|
+
* radio, then a `.hl-tabpanels` of `.hl-tabpanel`s. `:has(input:checked)`
|
|
43
|
+
* switches panels with no JavaScript (up to 8 tabs).
|
|
44
|
+
* - Enhanced: the enhancer adds `role="tab"`/`tabpanel`, roving focus, and
|
|
45
|
+
* `aria-selected`, toggles `[hidden]` on panels, and marks the root
|
|
46
|
+
* `data-hl-ready`, at which point the no-JS rules below stand down.
|
|
47
|
+
*/
|
|
42
48
|
@layer components {
|
|
43
49
|
[data-hl-tabs] {
|
|
44
|
-
border:
|
|
45
|
-
border-radius:
|
|
46
|
-
border-radius: var(--hl-radius-3, 0.5rem);
|
|
50
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
51
|
+
border-radius: var(--hl-radius-lg);
|
|
47
52
|
}
|
|
48
53
|
|
|
54
|
+
.hl-tablist,
|
|
49
55
|
[data-hl-tabs] [role='tablist'] {
|
|
50
56
|
display: flex;
|
|
51
|
-
gap:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
padding: var(--hl-spacing-2, 0.5rem);
|
|
55
|
-
border-bottom: 1px solid color-mix(in oklab, var(--hl-color-fg) 12%, transparent);
|
|
57
|
+
gap: var(--hl-space-2);
|
|
58
|
+
padding: var(--hl-space-2);
|
|
59
|
+
border-bottom: var(--hl-border-width) solid var(--hl-border);
|
|
56
60
|
}
|
|
57
61
|
|
|
62
|
+
.hl-tab,
|
|
58
63
|
[data-hl-tabs] [role='tab'] {
|
|
64
|
+
position: relative;
|
|
59
65
|
-webkit-appearance: none;
|
|
60
66
|
-moz-appearance: none;
|
|
61
67
|
appearance: none;
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
62
70
|
background: transparent;
|
|
63
71
|
border: 0;
|
|
64
|
-
border-radius:
|
|
65
|
-
|
|
66
|
-
padding: 0.5rem 0.75rem;
|
|
67
|
-
padding: var(--hl-spacing-2, 0.5rem) var(--hl-spacing-3, 0.75rem);
|
|
72
|
+
border-radius: var(--hl-radius-sm);
|
|
73
|
+
padding: var(--hl-space-2) var(--hl-space-3);
|
|
68
74
|
color: inherit;
|
|
75
|
+
font: inherit;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* The baseline keeps selection in a visually hidden radio per tab label. */
|
|
80
|
+
.hl-tab > input[type='radio'] {
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
right: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
left: 0;
|
|
86
|
+
margin: 0;
|
|
87
|
+
opacity: 0;
|
|
88
|
+
cursor: pointer;
|
|
69
89
|
}
|
|
70
90
|
|
|
91
|
+
.hl-tab:has(input:checked),
|
|
71
92
|
[data-hl-tabs] [role='tab'][aria-selected='true'] {
|
|
72
|
-
background: var(--hl-
|
|
93
|
+
background: var(--hl-surface-2);
|
|
73
94
|
}
|
|
74
95
|
|
|
96
|
+
.hl-tab:has(input:focus-visible),
|
|
75
97
|
[data-hl-tabs] [role='tab']:focus-visible {
|
|
76
|
-
outline:
|
|
77
|
-
outline: var(--hl-focus-ring, 2px solid #1f6feb);
|
|
98
|
+
outline: var(--hl-focus-ring);
|
|
78
99
|
outline-offset: 2px;
|
|
79
100
|
}
|
|
80
101
|
|
|
102
|
+
.hl-tab:has(input:disabled),
|
|
103
|
+
[data-hl-tabs] [role='tab'][disabled],
|
|
104
|
+
[data-hl-tabs] [role='tab'][aria-disabled='true'] {
|
|
105
|
+
opacity: 0.5;
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.hl-tabpanel,
|
|
81
110
|
[data-hl-tabs] [role='tabpanel'] {
|
|
82
|
-
padding:
|
|
83
|
-
padding: var(--hl-spacing-4, 1rem);
|
|
111
|
+
padding: var(--hl-space-4);
|
|
84
112
|
}
|
|
85
113
|
|
|
114
|
+
.hl-tabpanel[hidden],
|
|
86
115
|
[role='tabpanel'][hidden] {
|
|
87
116
|
display: none;
|
|
88
117
|
}
|
|
118
|
+
|
|
119
|
+
/* No-JS baseline: reveal the panel whose tab radio is checked, by position.
|
|
120
|
+
These stand down once the enhancer sets data-hl-ready and owns [hidden]. */
|
|
121
|
+
[data-hl-tabs]:not([data-hl-ready]) .hl-tabpanels > .hl-tabpanel {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
126
|
+
.hl-tablist:has(.hl-tab:nth-of-type(1) input:checked)
|
|
127
|
+
~ .hl-tabpanels
|
|
128
|
+
> .hl-tabpanel:nth-of-type(1),
|
|
129
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
130
|
+
.hl-tablist:has(.hl-tab:nth-of-type(2) input:checked)
|
|
131
|
+
~ .hl-tabpanels
|
|
132
|
+
> .hl-tabpanel:nth-of-type(2),
|
|
133
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
134
|
+
.hl-tablist:has(.hl-tab:nth-of-type(3) input:checked)
|
|
135
|
+
~ .hl-tabpanels
|
|
136
|
+
> .hl-tabpanel:nth-of-type(3),
|
|
137
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
138
|
+
.hl-tablist:has(.hl-tab:nth-of-type(4) input:checked)
|
|
139
|
+
~ .hl-tabpanels
|
|
140
|
+
> .hl-tabpanel:nth-of-type(4),
|
|
141
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
142
|
+
.hl-tablist:has(.hl-tab:nth-of-type(5) input:checked)
|
|
143
|
+
~ .hl-tabpanels
|
|
144
|
+
> .hl-tabpanel:nth-of-type(5),
|
|
145
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
146
|
+
.hl-tablist:has(.hl-tab:nth-of-type(6) input:checked)
|
|
147
|
+
~ .hl-tabpanels
|
|
148
|
+
> .hl-tabpanel:nth-of-type(6),
|
|
149
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
150
|
+
.hl-tablist:has(.hl-tab:nth-of-type(7) input:checked)
|
|
151
|
+
~ .hl-tabpanels
|
|
152
|
+
> .hl-tabpanel:nth-of-type(7),
|
|
153
|
+
[data-hl-tabs]:not([data-hl-ready])
|
|
154
|
+
.hl-tablist:has(.hl-tab:nth-of-type(8) input:checked)
|
|
155
|
+
~ .hl-tabpanels
|
|
156
|
+
> .hl-tabpanel:nth-of-type(8) {
|
|
157
|
+
display: block;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Role-only markup (no radios) before JS: degrade to showing the first panel. */
|
|
161
|
+
[data-hl-tabs]:not([data-hl-ready]) [role='tabpanel'] ~ [role='tabpanel'] {
|
|
162
|
+
display: none;
|
|
163
|
+
}
|
|
89
164
|
}
|
|
90
165
|
@layer components {
|
|
91
166
|
[data-hl-accordion] {
|
|
92
|
-
border: 1px solid
|
|
93
|
-
border-radius:
|
|
94
|
-
border-radius: var(--hl-radius-3, 0.5rem);
|
|
167
|
+
border: 1px solid var(--hl-border);
|
|
168
|
+
border-radius: var(--hl-radius-lg);
|
|
95
169
|
}
|
|
96
170
|
|
|
97
171
|
[data-hl-accordion] > details {
|
|
98
|
-
border-top: 1px solid
|
|
172
|
+
border-top: 1px solid var(--hl-border);
|
|
99
173
|
}
|
|
100
174
|
|
|
101
175
|
[data-hl-accordion] > details:first-child {
|
|
@@ -105,8 +179,7 @@
|
|
|
105
179
|
[data-hl-accordion] > details > summary {
|
|
106
180
|
list-style: none;
|
|
107
181
|
cursor: pointer;
|
|
108
|
-
padding:
|
|
109
|
-
padding: var(--hl-spacing-3, 0.75rem) var(--hl-spacing-4, 1rem);
|
|
182
|
+
padding: var(--hl-space-3) var(--hl-space-4);
|
|
110
183
|
}
|
|
111
184
|
|
|
112
185
|
[data-hl-accordion] > details > summary::-webkit-details-marker {
|
|
@@ -114,8 +187,7 @@
|
|
|
114
187
|
}
|
|
115
188
|
|
|
116
189
|
[data-hl-accordion] > details > summary:focus-visible {
|
|
117
|
-
outline:
|
|
118
|
-
outline: var(--hl-focus-ring, 2px solid #1f6feb);
|
|
190
|
+
outline: var(--hl-focus-ring);
|
|
119
191
|
outline-offset: 2px;
|
|
120
192
|
}
|
|
121
193
|
|
|
@@ -123,25 +195,22 @@
|
|
|
123
195
|
content: '\25BE';
|
|
124
196
|
float: right;
|
|
125
197
|
transform: rotate(0deg);
|
|
126
|
-
transition: transform
|
|
198
|
+
transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
|
|
127
199
|
}
|
|
128
200
|
|
|
129
201
|
[data-hl-accordion] > details[open] > summary::after {
|
|
130
202
|
transform: rotate(180deg);
|
|
131
203
|
}
|
|
132
204
|
|
|
133
|
-
[data-hl-accordion] > details > .accordion-panel {
|
|
134
|
-
padding:
|
|
135
|
-
padding: var(--hl-spacing-3, 0.75rem) var(--hl-spacing-4, 1rem) var(--hl-spacing-4, 1rem);
|
|
205
|
+
[data-hl-accordion] > details > .hl-accordion-panel {
|
|
206
|
+
padding: var(--hl-space-3) var(--hl-space-4) var(--hl-space-4);
|
|
136
207
|
}
|
|
137
208
|
}
|
|
138
209
|
@layer components {
|
|
139
210
|
nav[data-hl-toc] {
|
|
140
|
-
border: 1px solid
|
|
141
|
-
border-radius:
|
|
142
|
-
|
|
143
|
-
padding: 0.75rem;
|
|
144
|
-
padding: var(--hl-spacing-3, 0.75rem);
|
|
211
|
+
border: 1px solid var(--hl-border);
|
|
212
|
+
border-radius: var(--hl-radius-lg);
|
|
213
|
+
padding: var(--hl-space-3);
|
|
145
214
|
}
|
|
146
215
|
|
|
147
216
|
nav[data-hl-toc] ul {
|
|
@@ -157,22 +226,24 @@
|
|
|
157
226
|
|
|
158
227
|
nav[data-hl-toc] a {
|
|
159
228
|
display: block;
|
|
160
|
-
padding:
|
|
161
|
-
|
|
162
|
-
border-radius: 0.25rem;
|
|
163
|
-
border-radius: var(--hl-radius-2, 0.25rem);
|
|
229
|
+
padding: var(--hl-space-1) var(--hl-space-2);
|
|
230
|
+
border-radius: var(--hl-radius-sm);
|
|
164
231
|
color: inherit;
|
|
165
232
|
-webkit-text-decoration: none;
|
|
166
233
|
text-decoration: none;
|
|
167
234
|
}
|
|
168
235
|
|
|
236
|
+
nav[data-hl-toc] a:focus-visible {
|
|
237
|
+
outline: var(--hl-focus-ring);
|
|
238
|
+
outline-offset: -2px;
|
|
239
|
+
}
|
|
240
|
+
|
|
169
241
|
nav[data-hl-toc] a[aria-current='true'] {
|
|
170
|
-
background: var(--hl-
|
|
242
|
+
background: var(--hl-surface-2);
|
|
171
243
|
}
|
|
172
244
|
|
|
173
245
|
nav[data-hl-toc] ul ul {
|
|
174
|
-
padding-left:
|
|
175
|
-
padding-left: var(--hl-spacing-3, 0.75rem);
|
|
246
|
+
padding-left: var(--hl-space-3);
|
|
176
247
|
}
|
|
177
248
|
}
|
|
178
249
|
@layer components {
|
|
@@ -183,28 +254,25 @@
|
|
|
183
254
|
list-style: none;
|
|
184
255
|
margin: 0;
|
|
185
256
|
padding: 0;
|
|
186
|
-
gap:
|
|
187
|
-
gap: var(--hl-spacing-1, 0.25rem);
|
|
257
|
+
gap: var(--hl-space-1);
|
|
188
258
|
}
|
|
189
259
|
|
|
190
260
|
nav[data-hl-breadcrumb] li {
|
|
191
261
|
display: flex;
|
|
192
262
|
align-items: center;
|
|
193
|
-
gap:
|
|
194
|
-
gap: var(--hl-spacing-1, 0.25rem);
|
|
263
|
+
gap: var(--hl-space-1);
|
|
195
264
|
}
|
|
196
265
|
|
|
197
266
|
nav[data-hl-breadcrumb] li + li::before {
|
|
198
267
|
content: '/';
|
|
199
|
-
color:
|
|
268
|
+
color: var(--hl-fg-subtle);
|
|
200
269
|
}
|
|
201
270
|
|
|
202
271
|
nav[data-hl-breadcrumb] a {
|
|
203
|
-
color: var(--hl-
|
|
272
|
+
color: var(--hl-primary);
|
|
204
273
|
-webkit-text-decoration: none;
|
|
205
274
|
text-decoration: none;
|
|
206
|
-
border-radius:
|
|
207
|
-
border-radius: var(--hl-radius-2, 0.25rem);
|
|
275
|
+
border-radius: var(--hl-radius-sm);
|
|
208
276
|
}
|
|
209
277
|
|
|
210
278
|
nav[data-hl-breadcrumb] a:hover {
|
|
@@ -213,17 +281,16 @@
|
|
|
213
281
|
}
|
|
214
282
|
|
|
215
283
|
nav[data-hl-breadcrumb] a:focus-visible {
|
|
216
|
-
outline:
|
|
217
|
-
outline: var(--hl-focus-ring, 2px solid #1f6feb);
|
|
284
|
+
outline: var(--hl-focus-ring);
|
|
218
285
|
outline-offset: 2px;
|
|
219
286
|
}
|
|
220
287
|
|
|
221
288
|
nav[data-hl-breadcrumb] [aria-current='page'] {
|
|
222
|
-
color: var(--hl-
|
|
289
|
+
color: var(--hl-fg);
|
|
223
290
|
}
|
|
224
291
|
}
|
|
225
292
|
/**
|
|
226
|
-
* Pagination
|
|
293
|
+
* Pagination: `<nav class="hl-pagination" aria-label="Pagination">` wrapping a
|
|
227
294
|
* list of `.hl-pagination-item` links/buttons; mark the active page with
|
|
228
295
|
* `aria-current="page"` and use `.hl-pagination-ellipsis` for gaps.
|
|
229
296
|
*/
|
|
@@ -293,7 +360,7 @@
|
|
|
293
360
|
}
|
|
294
361
|
}
|
|
295
362
|
/**
|
|
296
|
-
* Separator
|
|
363
|
+
* Separator: `<hr class="hl-separator">` or
|
|
297
364
|
* `<div class="hl-separator" role="separator" aria-orientation="vertical">`.
|
|
298
365
|
*/
|
|
299
366
|
@layer components {
|
|
@@ -321,62 +388,61 @@
|
|
|
321
388
|
}
|
|
322
389
|
/* Overlays */
|
|
323
390
|
@layer components {
|
|
324
|
-
.
|
|
391
|
+
.hl-modal {
|
|
325
392
|
border: none;
|
|
326
|
-
border-radius:
|
|
327
|
-
border-radius: var(--hl-radius-3, 0.5rem);
|
|
393
|
+
border-radius: var(--hl-radius-lg);
|
|
328
394
|
padding: 0;
|
|
329
395
|
max-width: min(90vw, 640px);
|
|
330
396
|
width: 100%;
|
|
331
|
-
background: var(--hl-
|
|
332
|
-
color: var(--hl-
|
|
397
|
+
background: var(--hl-surface);
|
|
398
|
+
color: var(--hl-fg);
|
|
399
|
+
box-shadow: var(--hl-overlay-shadow);
|
|
333
400
|
}
|
|
334
401
|
|
|
335
|
-
.
|
|
336
|
-
background:
|
|
402
|
+
.hl-modal::backdrop {
|
|
403
|
+
background: var(--hl-scrim);
|
|
337
404
|
}
|
|
338
405
|
|
|
339
|
-
.
|
|
340
|
-
.
|
|
341
|
-
.
|
|
342
|
-
padding:
|
|
343
|
-
padding: var(--hl-spacing-4, 1rem);
|
|
406
|
+
.hl-modal .hl-modal-header,
|
|
407
|
+
.hl-modal .hl-modal-body,
|
|
408
|
+
.hl-modal .hl-modal-footer {
|
|
409
|
+
padding: var(--hl-space-4);
|
|
344
410
|
}
|
|
345
411
|
|
|
346
|
-
.
|
|
347
|
-
border-bottom: 1px solid
|
|
412
|
+
.hl-modal .hl-modal-header {
|
|
413
|
+
border-bottom: 1px solid var(--hl-border);
|
|
348
414
|
}
|
|
349
415
|
|
|
350
|
-
.
|
|
351
|
-
border-top: 1px solid
|
|
416
|
+
.hl-modal .hl-modal-footer {
|
|
417
|
+
border-top: 1px solid var(--hl-border);
|
|
352
418
|
}
|
|
353
419
|
|
|
354
|
-
.
|
|
355
|
-
outline:
|
|
356
|
-
outline: var(--hl-focus-ring, 2px solid #1f6feb);
|
|
420
|
+
.hl-modal [command='close']:focus-visible {
|
|
421
|
+
outline: var(--hl-focus-ring);
|
|
357
422
|
outline-offset: 2px;
|
|
358
423
|
}
|
|
359
424
|
}
|
|
360
425
|
@layer components {
|
|
361
|
-
dialog.
|
|
426
|
+
dialog.hl-drawer {
|
|
362
427
|
border: none;
|
|
363
428
|
padding: 0;
|
|
364
429
|
width: min(90vw, 360px);
|
|
365
430
|
max-height: 100dvh;
|
|
366
431
|
margin: 0;
|
|
367
|
-
background: var(--hl-
|
|
368
|
-
color: var(--hl-
|
|
432
|
+
background: var(--hl-surface);
|
|
433
|
+
color: var(--hl-fg);
|
|
434
|
+
box-shadow: var(--hl-overlay-shadow);
|
|
369
435
|
}
|
|
370
436
|
|
|
371
|
-
dialog.
|
|
372
|
-
background:
|
|
437
|
+
dialog.hl-drawer::backdrop {
|
|
438
|
+
background: var(--hl-scrim);
|
|
373
439
|
}
|
|
374
440
|
|
|
375
|
-
.
|
|
376
|
-
animation: hl-drawer-in
|
|
441
|
+
.hl-drawer[open] {
|
|
442
|
+
animation: hl-drawer-in-right var(--hl-duration-base) var(--hl-ease-standard);
|
|
377
443
|
}
|
|
378
444
|
|
|
379
|
-
@keyframes hl-drawer-in {
|
|
445
|
+
@keyframes hl-drawer-in-right {
|
|
380
446
|
from {
|
|
381
447
|
transform: translateX(100%);
|
|
382
448
|
}
|
|
@@ -386,13 +452,23 @@
|
|
|
386
452
|
}
|
|
387
453
|
}
|
|
388
454
|
|
|
455
|
+
@keyframes hl-drawer-in-left {
|
|
456
|
+
from {
|
|
457
|
+
transform: translateX(-100%);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
to {
|
|
461
|
+
transform: translateX(0%);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
389
465
|
@media (prefers-reduced-motion: reduce) {
|
|
390
|
-
.
|
|
466
|
+
.hl-drawer[open] {
|
|
391
467
|
animation: none;
|
|
392
468
|
}
|
|
393
469
|
}
|
|
394
470
|
|
|
395
|
-
.
|
|
471
|
+
.hl-drawer[data-side='left'] {
|
|
396
472
|
width: auto;
|
|
397
473
|
top: 0;
|
|
398
474
|
right: auto;
|
|
@@ -400,7 +476,11 @@
|
|
|
400
476
|
left: 0;
|
|
401
477
|
}
|
|
402
478
|
|
|
403
|
-
.
|
|
479
|
+
.hl-drawer[data-side='left'][open] {
|
|
480
|
+
animation-name: hl-drawer-in-left;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.hl-drawer[data-side='right'] {
|
|
404
484
|
width: auto;
|
|
405
485
|
top: 0;
|
|
406
486
|
right: 0;
|
|
@@ -408,99 +488,166 @@
|
|
|
408
488
|
left: auto;
|
|
409
489
|
}
|
|
410
490
|
|
|
411
|
-
.
|
|
412
|
-
.
|
|
413
|
-
.
|
|
414
|
-
padding:
|
|
415
|
-
padding: var(--hl-spacing-4, 1rem);
|
|
491
|
+
.hl-drawer .hl-drawer-header,
|
|
492
|
+
.hl-drawer .hl-drawer-body,
|
|
493
|
+
.hl-drawer .hl-drawer-footer {
|
|
494
|
+
padding: var(--hl-space-4);
|
|
416
495
|
}
|
|
417
496
|
|
|
418
|
-
.
|
|
419
|
-
border-bottom: 1px solid
|
|
497
|
+
.hl-drawer .hl-drawer-header {
|
|
498
|
+
border-bottom: 1px solid var(--hl-border);
|
|
420
499
|
}
|
|
421
500
|
|
|
422
|
-
.
|
|
423
|
-
border-top: 1px solid
|
|
501
|
+
.hl-drawer .hl-drawer-footer {
|
|
502
|
+
border-top: 1px solid var(--hl-border);
|
|
424
503
|
}
|
|
425
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* Popover: a `[popover] [data-hl-popover]` surface opened by a
|
|
507
|
+
* `<button popovertarget="…">` (or `command="toggle-popover"`). The browser
|
|
508
|
+
* owns the top layer, light-dismiss, and Escape with no JavaScript; the
|
|
509
|
+
* enhancer only mirrors `aria-expanded`, adds optional hover, and runs the JS
|
|
510
|
+
* positioning fallback on engines without CSS anchor positioning.
|
|
511
|
+
*/
|
|
426
512
|
@layer components {
|
|
427
|
-
[popover],
|
|
428
513
|
[data-hl-popover] {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
514
|
+
margin: 0;
|
|
515
|
+
width: -moz-max-content;
|
|
516
|
+
width: max-content;
|
|
517
|
+
max-width: min(92vw, 22rem);
|
|
518
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
519
|
+
border-radius: var(--hl-radius-lg);
|
|
520
|
+
padding: var(--hl-space-3);
|
|
521
|
+
background: var(--hl-surface);
|
|
522
|
+
color: var(--hl-fg);
|
|
523
|
+
box-shadow: var(--hl-overlay-shadow);
|
|
436
524
|
}
|
|
437
525
|
|
|
438
|
-
|
|
526
|
+
/* Until the `popover` attribute is present (author omitted it and JS hasn't
|
|
527
|
+
upgraded the element yet), keep the surface out of the flow. */
|
|
528
|
+
[data-hl-popover]:not([popover]) {
|
|
439
529
|
display: none;
|
|
440
530
|
}
|
|
531
|
+
|
|
532
|
+
/* Engines without the Popover API can't promote it to the top layer, so the
|
|
533
|
+
JS fallback positions it; give it a stacking context to land above content. */
|
|
534
|
+
[data-hl-popover]:not(:popover-open) {
|
|
535
|
+
z-index: var(--hl-z-popover);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/* Modern placement: anchor to the invoking control (the popover's implicit
|
|
539
|
+
anchor) and flip when there isn't room. Older engines use the JS fallback,
|
|
540
|
+
which writes inline position/inset and wins over these rules. */
|
|
541
|
+
@supports (position-area: block-end) {
|
|
542
|
+
[data-hl-popover] {
|
|
543
|
+
position: fixed;
|
|
544
|
+
inset-area: block-end;
|
|
545
|
+
position-area: block-end;
|
|
546
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
547
|
+
margin-top: var(--hl-space-1);
|
|
548
|
+
margin-bottom: var(--hl-space-1);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
441
551
|
}
|
|
552
|
+
/**
|
|
553
|
+
* Tooltip: a `[role="tooltip"]` element described by a `[data-hl-tooltip]`
|
|
554
|
+
* trigger. With no JavaScript it shows on the trigger's `:hover`/`:focus-visible`
|
|
555
|
+
* (the tip must be the trigger's next sibling). When the enhancer runs it marks
|
|
556
|
+
* the trigger `data-hl-tooltip-managed` and drives visibility through
|
|
557
|
+
* `data-hl-tooltip-open` instead, adding show/hide delays, a grace period, and
|
|
558
|
+
* Escape-to-dismiss.
|
|
559
|
+
*/
|
|
442
560
|
@layer components {
|
|
443
561
|
[role='tooltip'] {
|
|
562
|
+
/* Fallback placement: the JS positioner writes inline position/inset on
|
|
563
|
+
engines without CSS anchor positioning. */
|
|
444
564
|
position: absolute;
|
|
445
|
-
z-index:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
color: var(--hl-color-bg);
|
|
456
|
-
font-size: 0.875rem;
|
|
565
|
+
z-index: var(--hl-z-tooltip);
|
|
566
|
+
width: -moz-max-content;
|
|
567
|
+
width: max-content;
|
|
568
|
+
max-width: 32ch;
|
|
569
|
+
margin: 0;
|
|
570
|
+
padding: var(--hl-space-1) var(--hl-space-2);
|
|
571
|
+
border-radius: var(--hl-radius-sm);
|
|
572
|
+
background: var(--hl-fg);
|
|
573
|
+
color: var(--hl-surface);
|
|
574
|
+
font-size: var(--hl-text-sm);
|
|
457
575
|
}
|
|
458
576
|
|
|
459
577
|
[role='tooltip'][hidden] {
|
|
460
578
|
display: none;
|
|
461
579
|
}
|
|
580
|
+
|
|
581
|
+
/* No-JS baseline: reveal while the adjacent trigger is hovered or focused.
|
|
582
|
+
Suppressed once the enhancer takes over (trigger gains -managed). */
|
|
583
|
+
[data-hl-tooltip]:not([data-hl-tooltip-managed]):hover + [role='tooltip'],
|
|
584
|
+
[data-hl-tooltip]:not([data-hl-tooltip-managed]):focus-visible + [role='tooltip'] {
|
|
585
|
+
display: block;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/* Modern placement: pin above the trigger via the anchor-name the enhancer
|
|
589
|
+
sets, flipping below when there's no room. */
|
|
590
|
+
@supports (anchor-name: --x) {
|
|
591
|
+
[role='tooltip'] {
|
|
592
|
+
position: fixed;
|
|
593
|
+
inset-area: block-start;
|
|
594
|
+
position-area: block-start;
|
|
595
|
+
position-try-fallbacks: flip-block;
|
|
596
|
+
margin-top: var(--hl-space-1);
|
|
597
|
+
margin-bottom: var(--hl-space-1);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
462
600
|
}
|
|
601
|
+
/**
|
|
602
|
+
* Dropdown menu button: `<div data-hl-dropdown>` wrapping a
|
|
603
|
+
* `[data-hl-dropdown-trigger]` button and a `[data-hl-dropdown-menu]` list. The
|
|
604
|
+
* enhancer turns the menu into a native `popover` the trigger controls through
|
|
605
|
+
* `popovertarget`, so opening, Escape, and light-dismiss need no JavaScript;
|
|
606
|
+
* the menu lives in the top layer and is placed with CSS anchor positioning.
|
|
607
|
+
*/
|
|
463
608
|
@layer components {
|
|
464
609
|
[data-hl-dropdown] {
|
|
465
|
-
position: relative;
|
|
466
610
|
display: inline-block;
|
|
467
611
|
}
|
|
468
612
|
|
|
469
613
|
[data-hl-dropdown-menu] {
|
|
470
|
-
|
|
471
|
-
z-index: 100;
|
|
614
|
+
margin: 0;
|
|
472
615
|
min-width: 10rem;
|
|
473
|
-
border:
|
|
474
|
-
border-radius:
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
padding: 0.25rem;
|
|
479
|
-
padding: var(--hl-spacing-1, 0.25rem);
|
|
616
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
617
|
+
border-radius: var(--hl-radius-lg);
|
|
618
|
+
background: var(--hl-surface);
|
|
619
|
+
box-shadow: var(--hl-overlay-shadow);
|
|
620
|
+
padding: var(--hl-space-1);
|
|
480
621
|
list-style: none;
|
|
481
|
-
margin: 0.25rem 0 0;
|
|
482
|
-
margin: var(--hl-spacing-1, 0.25rem) 0 0;
|
|
483
622
|
}
|
|
484
623
|
|
|
485
|
-
|
|
624
|
+
/* Before the menu is promoted to a popover (JS not yet loaded), hide it. */
|
|
625
|
+
[data-hl-dropdown-menu]:not([popover]) {
|
|
486
626
|
display: none;
|
|
487
627
|
}
|
|
488
628
|
|
|
489
|
-
[data-hl-dropdown-menu]
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
629
|
+
[data-hl-dropdown-menu]:not(:popover-open) {
|
|
630
|
+
z-index: var(--hl-z-dropdown);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/* Open below the trigger, start-aligned, flipping when cramped. */
|
|
634
|
+
@supports (position-area: block-end) {
|
|
635
|
+
[data-hl-dropdown-menu] {
|
|
636
|
+
position: fixed;
|
|
637
|
+
inset-area: block-end span-inline-end;
|
|
638
|
+
position-area: block-end span-inline-end;
|
|
639
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
640
|
+
margin-top: var(--hl-space-1);
|
|
641
|
+
margin-bottom: var(--hl-space-1);
|
|
642
|
+
}
|
|
494
643
|
}
|
|
495
644
|
|
|
496
645
|
[data-hl-dropdown-menu] [role='menuitem'] {
|
|
497
646
|
display: block;
|
|
498
647
|
width: 100%;
|
|
499
|
-
padding:
|
|
500
|
-
padding: var(--hl-spacing-2, 0.5rem) var(--hl-spacing-3, 0.75rem);
|
|
648
|
+
padding: var(--hl-space-2) var(--hl-space-3);
|
|
501
649
|
border: none;
|
|
502
|
-
border-radius:
|
|
503
|
-
border-radius: var(--hl-radius-2, 0.25rem);
|
|
650
|
+
border-radius: var(--hl-radius-sm);
|
|
504
651
|
background: transparent;
|
|
505
652
|
text-align: left;
|
|
506
653
|
cursor: pointer;
|
|
@@ -510,25 +657,23 @@
|
|
|
510
657
|
|
|
511
658
|
[data-hl-dropdown-menu] [role='menuitem']:hover,
|
|
512
659
|
[data-hl-dropdown-menu] [role='menuitem'][data-hl-active] {
|
|
513
|
-
background: var(--hl-
|
|
660
|
+
background: var(--hl-surface-2);
|
|
514
661
|
}
|
|
515
662
|
|
|
516
663
|
[data-hl-dropdown-menu] [role='menuitem']:focus-visible {
|
|
517
|
-
outline:
|
|
518
|
-
outline: var(--hl-focus-ring, 2px solid #1f6feb);
|
|
664
|
+
outline: var(--hl-focus-ring);
|
|
519
665
|
outline-offset: -2px;
|
|
520
666
|
}
|
|
521
667
|
|
|
522
668
|
[data-hl-dropdown-menu] [role='separator'] {
|
|
523
669
|
height: 1px;
|
|
524
|
-
margin:
|
|
525
|
-
|
|
526
|
-
background: color-mix(in oklab, var(--hl-color-fg) 12%, transparent);
|
|
670
|
+
margin: var(--hl-space-1) 0;
|
|
671
|
+
background: var(--hl-border);
|
|
527
672
|
border: none;
|
|
528
673
|
}
|
|
529
674
|
}
|
|
530
675
|
/**
|
|
531
|
-
* Menubar / navigation menu
|
|
676
|
+
* Menubar / navigation menu: `<ul data-hl-menu role="menubar">` with optional
|
|
532
677
|
* single-level submenus (`<ul role="menu" data-hl-menu-submenu>`). The enhancer
|
|
533
678
|
* handles roving focus, arrow navigation, and open/close.
|
|
534
679
|
*/
|
|
@@ -628,15 +773,12 @@
|
|
|
628
773
|
@layer components {
|
|
629
774
|
[data-hl-toast-region] {
|
|
630
775
|
position: fixed;
|
|
631
|
-
z-index:
|
|
632
|
-
bottom:
|
|
633
|
-
|
|
634
|
-
right: 1rem;
|
|
635
|
-
right: var(--hl-spacing-4, 1rem);
|
|
776
|
+
z-index: var(--hl-z-toast);
|
|
777
|
+
bottom: var(--hl-space-4);
|
|
778
|
+
right: var(--hl-space-4);
|
|
636
779
|
display: flex;
|
|
637
780
|
flex-direction: column-reverse;
|
|
638
|
-
gap:
|
|
639
|
-
gap: var(--hl-spacing-2, 0.5rem);
|
|
781
|
+
gap: var(--hl-space-2);
|
|
640
782
|
pointer-events: none;
|
|
641
783
|
max-width: min(90vw, 24rem);
|
|
642
784
|
}
|
|
@@ -645,16 +787,29 @@
|
|
|
645
787
|
pointer-events: auto;
|
|
646
788
|
display: flex;
|
|
647
789
|
align-items: flex-start;
|
|
648
|
-
gap:
|
|
649
|
-
|
|
650
|
-
border:
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
790
|
+
gap: var(--hl-space-3);
|
|
791
|
+
border: 1px solid var(--hl-border);
|
|
792
|
+
border-radius: var(--hl-radius-lg);
|
|
793
|
+
padding: var(--hl-space-3) var(--hl-space-4);
|
|
794
|
+
background: var(--hl-surface);
|
|
795
|
+
box-shadow: var(--hl-overlay-shadow);
|
|
796
|
+
animation: hl-toast-in var(--hl-duration-base) var(--hl-ease-standard);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
[data-hl-toast][data-hl-variant='success'] {
|
|
800
|
+
border-left: 3px solid var(--hl-success);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
[data-hl-toast][data-hl-variant='warning'] {
|
|
804
|
+
border-left: 3px solid var(--hl-warning);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
[data-hl-toast][data-hl-variant='danger'] {
|
|
808
|
+
border-left: 3px solid var(--hl-danger);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
[data-hl-toast][data-hl-variant='info'] {
|
|
812
|
+
border-left: 3px solid var(--hl-info);
|
|
658
813
|
}
|
|
659
814
|
|
|
660
815
|
[data-hl-toast-close] {
|
|
@@ -664,24 +819,21 @@
|
|
|
664
819
|
border: none;
|
|
665
820
|
background: transparent;
|
|
666
821
|
cursor: pointer;
|
|
667
|
-
padding:
|
|
668
|
-
|
|
669
|
-
color: color-mix(in oklab, var(--hl-color-fg) 50%, transparent);
|
|
822
|
+
padding: var(--hl-space-1);
|
|
823
|
+
color: var(--hl-fg-muted);
|
|
670
824
|
margin-left: auto;
|
|
671
825
|
flex-shrink: 0;
|
|
672
826
|
font: inherit;
|
|
673
827
|
}
|
|
674
828
|
|
|
675
829
|
[data-hl-toast-close]:hover {
|
|
676
|
-
color: var(--hl-
|
|
830
|
+
color: var(--hl-fg);
|
|
677
831
|
}
|
|
678
832
|
|
|
679
833
|
[data-hl-toast-close]:focus-visible {
|
|
680
|
-
outline:
|
|
681
|
-
outline: var(--hl-focus-ring, 2px solid #1f6feb);
|
|
834
|
+
outline: var(--hl-focus-ring);
|
|
682
835
|
outline-offset: 2px;
|
|
683
|
-
border-radius:
|
|
684
|
-
border-radius: var(--hl-radius-2, 0.25rem);
|
|
836
|
+
border-radius: var(--hl-radius-sm);
|
|
685
837
|
}
|
|
686
838
|
|
|
687
839
|
@keyframes hl-toast-in {
|
|
@@ -703,7 +855,7 @@
|
|
|
703
855
|
}
|
|
704
856
|
}
|
|
705
857
|
/**
|
|
706
|
-
* Command palette
|
|
858
|
+
* Command palette: `<div data-hl-command>` containing a search input
|
|
707
859
|
* (`[data-hl-command-input]`), an empty state (`[data-hl-command-empty]`), and a
|
|
708
860
|
* `[data-hl-command-list] role="listbox"` of grouped `[role="option"]` items.
|
|
709
861
|
* Often placed inside a `<dialog class="hl-modal">`.
|
|
@@ -806,7 +958,7 @@
|
|
|
806
958
|
}
|
|
807
959
|
/* Forms */
|
|
808
960
|
/**
|
|
809
|
-
* Button
|
|
961
|
+
* Button: `<button class="hl-button">` (works on `<a>`/`<input>` too).
|
|
810
962
|
*
|
|
811
963
|
* Color is driven by a small set of local custom properties so the
|
|
812
964
|
* intent × variant matrix stays DRY: `data-hl-intent` swaps the accent set,
|
|
@@ -1061,7 +1213,7 @@
|
|
|
1061
1213
|
}
|
|
1062
1214
|
}
|
|
1063
1215
|
/**
|
|
1064
|
-
* Text input
|
|
1216
|
+
* Text input: `<input class="hl-input">`.
|
|
1065
1217
|
* data-hl-size: sm | md (default) | lg
|
|
1066
1218
|
* data-hl-invalid: error styling (pair with aria-invalid)
|
|
1067
1219
|
*/
|
|
@@ -1147,7 +1299,7 @@
|
|
|
1147
1299
|
}
|
|
1148
1300
|
}
|
|
1149
1301
|
/**
|
|
1150
|
-
* Multi-line text input
|
|
1302
|
+
* Multi-line text input: `<textarea class="hl-textarea">`.
|
|
1151
1303
|
* data-hl-invalid: error styling (pair with aria-invalid)
|
|
1152
1304
|
*/
|
|
1153
1305
|
@layer components {
|
|
@@ -1204,7 +1356,7 @@
|
|
|
1204
1356
|
}
|
|
1205
1357
|
}
|
|
1206
1358
|
/**
|
|
1207
|
-
* Native select
|
|
1359
|
+
* Native select: `<span class="hl-select-wrapper"><select class="hl-select">`.
|
|
1208
1360
|
* The wrapper draws a custom caret while the native control keeps full
|
|
1209
1361
|
* keyboard/mobile behavior.
|
|
1210
1362
|
* data-hl-size: sm | md (default) | lg
|
|
@@ -1289,7 +1441,7 @@
|
|
|
1289
1441
|
}
|
|
1290
1442
|
}
|
|
1291
1443
|
/**
|
|
1292
|
-
* Checkbox
|
|
1444
|
+
* Checkbox: `<label class="hl-checkbox"><input type="checkbox"><span>…</span></label>`.
|
|
1293
1445
|
* The native input is restyled (appearance:none) with a CSS checkmark, keeping
|
|
1294
1446
|
* full keyboard + form semantics.
|
|
1295
1447
|
*/
|
|
@@ -1368,7 +1520,7 @@
|
|
|
1368
1520
|
}
|
|
1369
1521
|
}
|
|
1370
1522
|
/**
|
|
1371
|
-
* Radio
|
|
1523
|
+
* Radio: `<label class="hl-radio"><input type="radio"><span>…</span></label>`,
|
|
1372
1524
|
* grouped in `<div class="hl-radio-group" role="radiogroup">`.
|
|
1373
1525
|
*/
|
|
1374
1526
|
@layer components {
|
|
@@ -1449,8 +1601,7 @@
|
|
|
1449
1601
|
[data-hl-switch] {
|
|
1450
1602
|
display: inline-flex;
|
|
1451
1603
|
align-items: center;
|
|
1452
|
-
gap:
|
|
1453
|
-
gap: var(--hl-spacing-2, 0.5rem);
|
|
1604
|
+
gap: var(--hl-space-2);
|
|
1454
1605
|
}
|
|
1455
1606
|
|
|
1456
1607
|
[data-hl-switch] input[type='checkbox'] {
|
|
@@ -1460,9 +1611,10 @@
|
|
|
1460
1611
|
width: 2.25rem;
|
|
1461
1612
|
height: 1.25rem;
|
|
1462
1613
|
border-radius: 1.25rem;
|
|
1463
|
-
background:
|
|
1614
|
+
background: var(--hl-border-strong);
|
|
1464
1615
|
position: relative;
|
|
1465
1616
|
outline-offset: 2px;
|
|
1617
|
+
transition: background-color var(--hl-duration-fast) var(--hl-ease-standard);
|
|
1466
1618
|
}
|
|
1467
1619
|
|
|
1468
1620
|
[data-hl-switch] input[type='checkbox']::after {
|
|
@@ -1475,8 +1627,8 @@
|
|
|
1475
1627
|
width: calc(1.25rem - 4px);
|
|
1476
1628
|
height: calc(1.25rem - 4px);
|
|
1477
1629
|
border-radius: 50%;
|
|
1478
|
-
background: var(--hl-
|
|
1479
|
-
transition: transform
|
|
1630
|
+
background: var(--hl-surface);
|
|
1631
|
+
transition: transform var(--hl-duration-fast) var(--hl-ease-standard);
|
|
1480
1632
|
}
|
|
1481
1633
|
|
|
1482
1634
|
[data-hl-switch] input[type='checkbox']:checked::after {
|
|
@@ -1484,11 +1636,25 @@
|
|
|
1484
1636
|
}
|
|
1485
1637
|
|
|
1486
1638
|
[data-hl-switch] input[type='checkbox']:checked {
|
|
1487
|
-
background: var(--hl-
|
|
1639
|
+
background: var(--hl-primary);
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
[data-hl-switch] input[type='checkbox']:focus-visible {
|
|
1643
|
+
outline: var(--hl-focus-ring);
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
[data-hl-switch] input[type='checkbox']:disabled {
|
|
1647
|
+
opacity: 0.5;
|
|
1648
|
+
cursor: not-allowed;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
[data-hl-switch]:has(input[type='checkbox']:disabled) {
|
|
1652
|
+
opacity: 0.7;
|
|
1653
|
+
cursor: not-allowed;
|
|
1488
1654
|
}
|
|
1489
1655
|
}
|
|
1490
1656
|
/**
|
|
1491
|
-
* Field
|
|
1657
|
+
* Field, accessible form-control layout: `.hl-field` stacks a `.hl-label`,
|
|
1492
1658
|
* the control, `.hl-help`, and `.hl-error`. `.hl-fieldset` + `.hl-legend`
|
|
1493
1659
|
* group related fields.
|
|
1494
1660
|
*/
|
|
@@ -1547,7 +1713,7 @@
|
|
|
1547
1713
|
}
|
|
1548
1714
|
}
|
|
1549
1715
|
/**
|
|
1550
|
-
* Combobox
|
|
1716
|
+
* Combobox: `<div data-hl-combobox>` wrapping an `<input>` and a
|
|
1551
1717
|
* `<ul role="listbox">` of `<li role="option">`. The enhancer toggles the
|
|
1552
1718
|
* listbox and manages `aria-activedescendant`.
|
|
1553
1719
|
*/
|
|
@@ -1574,6 +1740,24 @@
|
|
|
1574
1740
|
box-shadow: var(--hl-overlay-shadow);
|
|
1575
1741
|
}
|
|
1576
1742
|
|
|
1743
|
+
/* Modern engines pin the listbox to the input via the anchor-name the
|
|
1744
|
+
enhancer sets, so it escapes overflow-clipping ancestors. */
|
|
1745
|
+
@supports (anchor-name: --x) {
|
|
1746
|
+
[data-hl-combobox] [role='listbox'] {
|
|
1747
|
+
position: fixed;
|
|
1748
|
+
top: auto;
|
|
1749
|
+
right: auto;
|
|
1750
|
+
bottom: auto;
|
|
1751
|
+
left: auto;
|
|
1752
|
+
width: anchor-size(width);
|
|
1753
|
+
inset-area: block-end;
|
|
1754
|
+
position-area: block-end;
|
|
1755
|
+
position-try-fallbacks: flip-block;
|
|
1756
|
+
margin-top: var(--hl-space-1);
|
|
1757
|
+
margin-bottom: var(--hl-space-1);
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1577
1761
|
[data-hl-combobox] [role='listbox'][hidden] {
|
|
1578
1762
|
display: none;
|
|
1579
1763
|
}
|
|
@@ -1605,7 +1789,7 @@
|
|
|
1605
1789
|
}
|
|
1606
1790
|
}
|
|
1607
1791
|
/**
|
|
1608
|
-
* Segmented control
|
|
1792
|
+
* Segmented control: `<div class="hl-segmented" role="radiogroup">` of
|
|
1609
1793
|
* `<label class="hl-segmented-item"><input type="radio">…</label>` segments.
|
|
1610
1794
|
* Radio inputs give free keyboard navigation; the checked segment is raised.
|
|
1611
1795
|
* A button variant using `aria-pressed="true"` is also supported.
|
|
@@ -1690,7 +1874,7 @@
|
|
|
1690
1874
|
}
|
|
1691
1875
|
}
|
|
1692
1876
|
/**
|
|
1693
|
-
* Slider
|
|
1877
|
+
* Slider: native `<input type="range" class="hl-slider">`. Restyled track and
|
|
1694
1878
|
* thumb across WebKit/Blink and Firefox while keeping native keyboard support.
|
|
1695
1879
|
*/
|
|
1696
1880
|
@layer components {
|
|
@@ -1775,7 +1959,7 @@
|
|
|
1775
1959
|
}
|
|
1776
1960
|
/* Feedback & data display */
|
|
1777
1961
|
/**
|
|
1778
|
-
* Alert
|
|
1962
|
+
* Alert: `<div class="hl-alert" role="alert" data-hl-intent="…">` with an
|
|
1779
1963
|
* optional icon, `.hl-alert-title`, and body content.
|
|
1780
1964
|
* data-hl-intent: info (default) | success | warning | danger | neutral
|
|
1781
1965
|
*/
|
|
@@ -1847,7 +2031,7 @@
|
|
|
1847
2031
|
}
|
|
1848
2032
|
}
|
|
1849
2033
|
/**
|
|
1850
|
-
* Badge
|
|
2034
|
+
* Badge: `<span class="hl-badge" data-hl-intent="…" data-hl-variant="…">`.
|
|
1851
2035
|
* data-hl-intent: neutral (default) | primary | danger | success | warning | info
|
|
1852
2036
|
* data-hl-variant: soft (default) | solid | outline
|
|
1853
2037
|
* data-hl-size: sm | md (default)
|
|
@@ -1931,7 +2115,7 @@
|
|
|
1931
2115
|
}
|
|
1932
2116
|
}
|
|
1933
2117
|
/**
|
|
1934
|
-
* Card
|
|
2118
|
+
* Card: `<div class="hl-card">` with optional `.hl-card-header`,
|
|
1935
2119
|
* `.hl-card-body`, `.hl-card-footer`, `.hl-card-title`, `.hl-card-description`.
|
|
1936
2120
|
* data-hl-interactive: hover/active elevation for clickable cards
|
|
1937
2121
|
*/
|
|
@@ -2002,7 +2186,7 @@
|
|
|
2002
2186
|
}
|
|
2003
2187
|
}
|
|
2004
2188
|
/**
|
|
2005
|
-
* Avatar
|
|
2189
|
+
* Avatar: `<span class="hl-avatar">` containing an `<img>` or fallback
|
|
2006
2190
|
* initials/icon. Stack with `<div class="hl-avatar-group">`.
|
|
2007
2191
|
* data-hl-size: xs | sm | md (default) | lg | xl
|
|
2008
2192
|
* data-hl-shape: square
|
|
@@ -2076,7 +2260,7 @@
|
|
|
2076
2260
|
}
|
|
2077
2261
|
}
|
|
2078
2262
|
/**
|
|
2079
|
-
* Progress
|
|
2263
|
+
* Progress: native `<progress class="hl-progress" value max>`. Omit `value`
|
|
2080
2264
|
* for an indeterminate bar.
|
|
2081
2265
|
* data-hl-intent: primary (default) | success | warning | danger | info
|
|
2082
2266
|
* data-hl-size: sm | md (default) | lg
|
|
@@ -2170,7 +2354,7 @@
|
|
|
2170
2354
|
}
|
|
2171
2355
|
}
|
|
2172
2356
|
/**
|
|
2173
|
-
* Spinner
|
|
2357
|
+
* Spinner: `<span class="hl-spinner" role="status" aria-label="Loading">`.
|
|
2174
2358
|
* Inherits `currentColor`, so set `color` to theme it.
|
|
2175
2359
|
* data-hl-size: sm | md (default) | lg | xl
|
|
2176
2360
|
*/
|
|
@@ -2224,7 +2408,7 @@
|
|
|
2224
2408
|
}
|
|
2225
2409
|
}
|
|
2226
2410
|
/**
|
|
2227
|
-
* Skeleton
|
|
2411
|
+
* Skeleton: `<span class="hl-skeleton" data-hl-variant="…" aria-hidden="true">`
|
|
2228
2412
|
* placeholder shown while content loads.
|
|
2229
2413
|
* data-hl-variant: rect (default) | text | circle
|
|
2230
2414
|
*/
|
|
@@ -2273,7 +2457,7 @@
|
|
|
2273
2457
|
}
|
|
2274
2458
|
}
|
|
2275
2459
|
/**
|
|
2276
|
-
* Keyboard key
|
|
2460
|
+
* Keyboard key: `<kbd class="hl-kbd">⌘</kbd>`. Combine inline, e.g.
|
|
2277
2461
|
* `<kbd class="hl-kbd">⌘</kbd><kbd class="hl-kbd">K</kbd>`.
|
|
2278
2462
|
*/
|
|
2279
2463
|
@layer components {
|
|
@@ -2295,7 +2479,7 @@
|
|
|
2295
2479
|
}
|
|
2296
2480
|
}
|
|
2297
2481
|
/**
|
|
2298
|
-
* Table
|
|
2482
|
+
* Table: `<table class="hl-table">`. Semantic table styling with optional
|
|
2299
2483
|
* zebra striping and hover.
|
|
2300
2484
|
* data-hl-striped: zebra rows
|
|
2301
2485
|
* data-hl-hover: highlight row on hover
|
|
@@ -2358,7 +2542,7 @@
|
|
|
2358
2542
|
}
|
|
2359
2543
|
/* Navigation utilities */
|
|
2360
2544
|
@layer components {
|
|
2361
|
-
.
|
|
2545
|
+
.hl-skip-link {
|
|
2362
2546
|
position: absolute;
|
|
2363
2547
|
left: -9999px;
|
|
2364
2548
|
top: auto;
|
|
@@ -2367,18 +2551,15 @@
|
|
|
2367
2551
|
overflow: hidden;
|
|
2368
2552
|
}
|
|
2369
2553
|
|
|
2370
|
-
.
|
|
2554
|
+
.hl-skip-link:focus-visible {
|
|
2371
2555
|
left: 0;
|
|
2372
2556
|
top: 0;
|
|
2373
2557
|
width: auto;
|
|
2374
2558
|
height: auto;
|
|
2375
|
-
padding:
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
border-radius: var(--hl-radius-2, 0.25rem);
|
|
2381
|
-
outline: 2px solid #1f6feb;
|
|
2382
|
-
outline: var(--hl-focus-ring, 2px solid #1f6feb);
|
|
2559
|
+
padding: var(--hl-space-2) var(--hl-space-3);
|
|
2560
|
+
background: var(--hl-fg);
|
|
2561
|
+
color: var(--hl-surface);
|
|
2562
|
+
border-radius: var(--hl-radius-sm);
|
|
2563
|
+
outline: var(--hl-focus-ring);
|
|
2383
2564
|
}
|
|
2384
2565
|
}
|