hydrateless 0.8.0 → 0.10.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 +120 -0
- package/dist/accordion.css +20 -8
- package/dist/alert.css +69 -8
- package/dist/avatar.css +8 -14
- package/dist/badge.css +9 -1
- package/dist/breadcrumb.css +7 -3
- package/dist/button.css +48 -28
- package/dist/card.css +8 -5
- package/dist/checkbox.css +36 -22
- package/dist/combobox.css +43 -15
- package/dist/command-palette.css +123 -0
- package/dist/components.css +1351 -571
- package/dist/disclosure.css +27 -29
- package/dist/drawer.css +76 -48
- package/dist/dropdown.css +138 -22
- package/dist/field.css +5 -4
- package/dist/hydrateless.css +1581 -1330
- package/dist/hydrateless.min.css +1 -1
- package/dist/input.css +20 -17
- package/dist/kbd.css +4 -3
- package/dist/menu.css +106 -45
- package/dist/modal.css +63 -14
- package/dist/pagination.css +20 -11
- package/dist/popover.css +34 -12
- package/dist/progress.css +23 -12
- package/dist/{radio.css → radio-group.css} +23 -16
- package/dist/reset.css +7 -2
- package/dist/{segmented.css → segmented-control.css} +24 -12
- package/dist/select.css +28 -22
- package/dist/separator.css +9 -9
- package/dist/skeleton.css +18 -10
- package/dist/skip-link.css +13 -8
- package/dist/slider.css +66 -25
- package/dist/spinner.css +17 -14
- package/dist/switch.css +55 -18
- package/dist/table.css +100 -15
- package/dist/tabs.css +35 -11
- package/dist/textarea.css +26 -12
- package/dist/theme.css +5 -24
- package/dist/toast.css +40 -36
- package/dist/toc.css +17 -4
- package/dist/tokens.css +208 -183
- package/dist/tooltip.css +74 -17
- package/package.json +4 -4
- package/dist/command.css +0 -102
package/dist/textarea.css
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Multi-line text input: `<textarea class="hl-textarea">`.
|
|
3
|
-
*
|
|
2
|
+
* Multi-line text input: `<textarea class="hl-textarea">`. Pure CSS; there is
|
|
3
|
+
* no enhancer.
|
|
4
|
+
* data-hl-invalid: error styling (pair with aria-invalid)
|
|
5
|
+
* data-hl-autosize: grows with its content where `field-sizing` is supported
|
|
4
6
|
*/
|
|
5
7
|
@layer components {
|
|
6
8
|
.hl-textarea {
|
|
7
9
|
display: block;
|
|
8
|
-
|
|
9
|
-
min-
|
|
10
|
+
inline-size: 100%;
|
|
11
|
+
min-block-size: calc(var(--hl-control-height-md) * 2);
|
|
10
12
|
padding: var(--hl-space-2) var(--hl-space-3);
|
|
11
13
|
border: var(--hl-border-width) solid var(--hl-border-strong);
|
|
12
14
|
border-radius: var(--hl-radius-md);
|
|
@@ -17,30 +19,27 @@
|
|
|
17
19
|
line-height: var(--hl-leading-normal);
|
|
18
20
|
resize: vertical;
|
|
19
21
|
transition:
|
|
20
|
-
border-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.hl-textarea::-moz-placeholder {
|
|
24
|
-
color: var(--hl-fg-subtle);
|
|
22
|
+
border-color var(--hl-duration-fast) var(--hl-ease-standard),
|
|
23
|
+
box-shadow var(--hl-duration-fast) var(--hl-ease-standard);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
.hl-textarea::placeholder {
|
|
28
27
|
color: var(--hl-fg-subtle);
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
.hl-textarea:hover:not(:disabled
|
|
30
|
+
.hl-textarea:hover:not(:disabled, :focus) {
|
|
32
31
|
border-color: var(--hl-fg-subtle);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
.hl-textarea:focus-visible {
|
|
36
35
|
outline: none;
|
|
37
36
|
border-color: var(--hl-ring);
|
|
38
|
-
box-shadow:
|
|
37
|
+
box-shadow: var(--hl-focus-shadow);
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
.hl-textarea:disabled {
|
|
42
41
|
cursor: not-allowed;
|
|
43
|
-
opacity:
|
|
42
|
+
opacity: var(--hl-disabled-opacity);
|
|
44
43
|
background: var(--hl-surface-2);
|
|
45
44
|
}
|
|
46
45
|
|
|
@@ -54,4 +53,19 @@
|
|
|
54
53
|
border-color: var(--hl-danger);
|
|
55
54
|
box-shadow: 0 0 0 3px color-mix(in oklab, var(--hl-danger) 30%, transparent);
|
|
56
55
|
}
|
|
56
|
+
|
|
57
|
+
/* Native autosize; engines without it keep the fixed minimum and a resizer. */
|
|
58
|
+
@supports (field-sizing: content) {
|
|
59
|
+
.hl-textarea[data-hl-autosize] {
|
|
60
|
+
field-sizing: content;
|
|
61
|
+
max-block-size: 60vb;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (forced-colors: active) {
|
|
66
|
+
.hl-textarea:focus-visible {
|
|
67
|
+
outline: var(--hl-focus-ring);
|
|
68
|
+
outline-offset: var(--hl-focus-offset);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
57
71
|
}
|
package/dist/theme.css
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme: document-level defaults built on the semantic tokens. `color-scheme`
|
|
3
|
+
* and the `[data-theme]` switches live in tokens/semantic.css so this file
|
|
4
|
+
* only has to apply the resolved colors and type to the page.
|
|
5
|
+
*/
|
|
1
6
|
@layer theme {
|
|
2
|
-
:root {
|
|
3
|
-
--csstools-color-scheme--light: initial;
|
|
4
|
-
color-scheme: light dark;
|
|
5
|
-
}
|
|
6
|
-
@media (prefers-color-scheme: dark) {
|
|
7
|
-
:root {
|
|
8
|
-
--csstools-color-scheme--light: ;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
[data-theme='light'] {
|
|
13
|
-
--csstools-color-scheme--light: initial;
|
|
14
|
-
color-scheme: light;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
[data-theme='dark'] {
|
|
18
|
-
--csstools-color-scheme--light: ;
|
|
19
|
-
color-scheme: dark;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
7
|
body {
|
|
23
8
|
background-color: var(--hl-bg);
|
|
24
9
|
color: var(--hl-fg);
|
|
@@ -28,10 +13,6 @@
|
|
|
28
13
|
-webkit-font-smoothing: antialiased;
|
|
29
14
|
}
|
|
30
15
|
|
|
31
|
-
::-moz-selection {
|
|
32
|
-
background-color: color-mix(in oklab, var(--hl-primary) 30%, transparent);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
16
|
::selection {
|
|
36
17
|
background-color: color-mix(in oklab, var(--hl-primary) 30%, transparent);
|
|
37
18
|
}
|
package/dist/toast.css
CHANGED
|
@@ -1,14 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast: a `[data-hl-toast-region]` live region fixed to the end corner of the
|
|
3
|
+
* viewport, holding `[data-hl-toast]` notifications with an optional
|
|
4
|
+
* `[data-hl-toast-close]` button.
|
|
5
|
+
*
|
|
6
|
+
* Toasts are inherently script-driven; with no JavaScript the region is simply
|
|
7
|
+
* empty. The enhancer creates the toasts and reads:
|
|
8
|
+
* data-hl-toast-region: the container
|
|
9
|
+
* data-hl-toast: one notification (created by the enhancer)
|
|
10
|
+
* data-hl-intent: info (default) | success | warning | danger, on a toast
|
|
11
|
+
* data-hl-toast-close: dismiss button inside a toast
|
|
12
|
+
* data-hl-toast-trigger, data-hl-toast-intent, data-hl-toast-duration:
|
|
13
|
+
* declarative trigger buttons anywhere in the page
|
|
14
|
+
*/
|
|
1
15
|
@layer components {
|
|
2
16
|
[data-hl-toast-region] {
|
|
3
17
|
position: fixed;
|
|
4
18
|
z-index: var(--hl-z-toast);
|
|
5
|
-
|
|
6
|
-
|
|
19
|
+
inset-block-end: var(--hl-space-4);
|
|
20
|
+
inset-inline-end: var(--hl-space-4);
|
|
7
21
|
display: flex;
|
|
8
22
|
flex-direction: column-reverse;
|
|
9
23
|
gap: var(--hl-space-2);
|
|
10
24
|
pointer-events: none;
|
|
11
|
-
max-
|
|
25
|
+
max-inline-size: min(90vi, 24rem);
|
|
12
26
|
}
|
|
13
27
|
|
|
14
28
|
[data-hl-toast] {
|
|
@@ -16,40 +30,48 @@
|
|
|
16
30
|
display: flex;
|
|
17
31
|
align-items: flex-start;
|
|
18
32
|
gap: var(--hl-space-3);
|
|
19
|
-
border:
|
|
33
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
20
34
|
border-radius: var(--hl-radius-lg);
|
|
21
35
|
padding: var(--hl-space-3) var(--hl-space-4);
|
|
22
36
|
background: var(--hl-surface);
|
|
23
37
|
box-shadow: var(--hl-overlay-shadow);
|
|
24
|
-
|
|
38
|
+
transition:
|
|
39
|
+
opacity var(--hl-duration-base) var(--hl-ease-standard),
|
|
40
|
+
translate var(--hl-duration-base) var(--hl-ease-standard);
|
|
25
41
|
}
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
/* Toasts are inserted by script, so the entry runs from @starting-style. */
|
|
44
|
+
@starting-style {
|
|
45
|
+
[data-hl-toast] {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
translate: 0 var(--hl-space-2);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-hl-toast][data-hl-intent='success'] {
|
|
52
|
+
border-inline-start: 3px solid var(--hl-success);
|
|
29
53
|
}
|
|
30
54
|
|
|
31
|
-
[data-hl-toast][data-hl-
|
|
32
|
-
border-
|
|
55
|
+
[data-hl-toast][data-hl-intent='warning'] {
|
|
56
|
+
border-inline-start: 3px solid var(--hl-warning);
|
|
33
57
|
}
|
|
34
58
|
|
|
35
|
-
[data-hl-toast][data-hl-
|
|
36
|
-
border-
|
|
59
|
+
[data-hl-toast][data-hl-intent='danger'] {
|
|
60
|
+
border-inline-start: 3px solid var(--hl-danger);
|
|
37
61
|
}
|
|
38
62
|
|
|
39
|
-
[data-hl-toast][data-hl-
|
|
40
|
-
border-
|
|
63
|
+
[data-hl-toast][data-hl-intent='info'] {
|
|
64
|
+
border-inline-start: 3px solid var(--hl-info);
|
|
41
65
|
}
|
|
42
66
|
|
|
43
67
|
[data-hl-toast-close] {
|
|
44
|
-
|
|
45
|
-
-moz-appearance: none;
|
|
46
|
-
appearance: none;
|
|
68
|
+
appearance: none;
|
|
47
69
|
border: none;
|
|
48
70
|
background: transparent;
|
|
49
71
|
cursor: pointer;
|
|
50
72
|
padding: var(--hl-space-1);
|
|
51
73
|
color: var(--hl-fg-muted);
|
|
52
|
-
margin-
|
|
74
|
+
margin-inline-start: auto;
|
|
53
75
|
flex-shrink: 0;
|
|
54
76
|
font: inherit;
|
|
55
77
|
}
|
|
@@ -60,25 +82,7 @@
|
|
|
60
82
|
|
|
61
83
|
[data-hl-toast-close]:focus-visible {
|
|
62
84
|
outline: var(--hl-focus-ring);
|
|
63
|
-
outline-offset:
|
|
85
|
+
outline-offset: var(--hl-focus-offset);
|
|
64
86
|
border-radius: var(--hl-radius-sm);
|
|
65
87
|
}
|
|
66
|
-
|
|
67
|
-
@keyframes hl-toast-in {
|
|
68
|
-
from {
|
|
69
|
-
opacity: 0;
|
|
70
|
-
transform: translateY(0.5rem);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
to {
|
|
74
|
-
opacity: 1;
|
|
75
|
-
transform: translateY(0);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media (prefers-reduced-motion: reduce) {
|
|
80
|
-
[data-hl-toast] {
|
|
81
|
-
animation: none;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
88
|
}
|
package/dist/toc.css
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table of contents: `<nav data-hl-toc>` with nested `<ul>` lists of anchor
|
|
3
|
+
* links. With no JavaScript it is a plain link list; the enhancer marks the
|
|
4
|
+
* link for the heading in view with `aria-current="true"`.
|
|
5
|
+
* data-hl-toc: the nav
|
|
6
|
+
* data-hl-content-selector: optional element whose headings are observed
|
|
7
|
+
*/
|
|
1
8
|
@layer components {
|
|
2
9
|
nav[data-hl-toc] {
|
|
3
|
-
border:
|
|
10
|
+
border: var(--hl-border-width) solid var(--hl-border);
|
|
4
11
|
border-radius: var(--hl-radius-lg);
|
|
5
12
|
padding: var(--hl-space-3);
|
|
6
13
|
}
|
|
@@ -21,13 +28,12 @@
|
|
|
21
28
|
padding: var(--hl-space-1) var(--hl-space-2);
|
|
22
29
|
border-radius: var(--hl-radius-sm);
|
|
23
30
|
color: inherit;
|
|
24
|
-
-webkit-text-decoration: none;
|
|
25
31
|
text-decoration: none;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
nav[data-hl-toc] a:focus-visible {
|
|
29
35
|
outline: var(--hl-focus-ring);
|
|
30
|
-
outline-offset: -
|
|
36
|
+
outline-offset: calc(var(--hl-focus-offset) * -1);
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
nav[data-hl-toc] a[aria-current='true'] {
|
|
@@ -35,6 +41,13 @@
|
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
nav[data-hl-toc] ul ul {
|
|
38
|
-
padding-
|
|
44
|
+
padding-inline-start: var(--hl-space-3);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (forced-colors: active) {
|
|
48
|
+
nav[data-hl-toc] a[aria-current='true'] {
|
|
49
|
+
background: Highlight;
|
|
50
|
+
color: HighlightText;
|
|
51
|
+
}
|
|
39
52
|
}
|
|
40
53
|
}
|