hydrateless 0.9.0 → 0.10.1

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/alert.css CHANGED
@@ -1,8 +1,12 @@
1
1
  /**
2
2
  * Alert: `<div class="hl-alert" role="alert" data-hl-intent="...">` with an
3
- * optional icon, `.hl-alert-title`, and body content. Pure CSS; there is no
4
- * enhancer.
5
- * data-hl-intent: info (default) | success | warning | danger | neutral
3
+ * optional icon, `.hl-alert-title`, and body content. Add `data-hl-alert` and
4
+ * a `[data-hl-dismiss]` button for the dismiss enhancer, which fades the alert
5
+ * out (`data-hl-alert-closing`) before hiding it.
6
+ * data-hl-intent: info (default) | success | warning | danger | neutral
7
+ * data-hl-alert: opt in to the dismiss enhancer
8
+ * data-hl-dismiss: the dismiss button inside the alert
9
+ * data-hl-alert-closing: set by the enhancer during the exit transition
6
10
  */
7
11
  @layer components {
8
12
  .hl-alert {
@@ -20,6 +24,55 @@
20
24
  color: var(--_fg);
21
25
  font-size: var(--hl-text-sm);
22
26
  line-height: var(--hl-leading-normal);
27
+ transition:
28
+ opacity var(--hl-duration-base) var(--hl-ease-standard),
29
+ translate var(--hl-duration-base) var(--hl-ease-standard);
30
+ }
31
+
32
+ .hl-alert[data-hl-alert-closing] {
33
+ opacity: 0;
34
+ translate: 0 -0.25rem;
35
+ }
36
+
37
+ /* `display: flex` above would otherwise beat the user agent's `[hidden]`. */
38
+ .hl-alert[hidden] {
39
+ display: none;
40
+ }
41
+
42
+ .hl-alert [data-hl-dismiss] {
43
+ display: inline-flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ flex: none;
47
+ inline-size: 1.5rem;
48
+ block-size: 1.5rem;
49
+ margin-inline-start: auto;
50
+ margin-block-start: -0.125rem;
51
+ padding: 0;
52
+ border: 0;
53
+ border-radius: var(--hl-radius-sm);
54
+ background: transparent;
55
+ color: inherit;
56
+ font: inherit;
57
+ line-height: 1;
58
+ cursor: pointer;
59
+ opacity: 0.7;
60
+ }
61
+
62
+ .hl-alert [data-hl-dismiss]:hover {
63
+ opacity: 1;
64
+ background: color-mix(in oklab, currentcolor 10%, transparent);
65
+ }
66
+
67
+ .hl-alert [data-hl-dismiss]:focus-visible {
68
+ outline: var(--hl-focus-ring);
69
+ outline-offset: var(--hl-focus-offset);
70
+ opacity: 1;
71
+ }
72
+
73
+ .hl-alert [data-hl-dismiss]:empty::before {
74
+ content: '\00D7';
75
+ font-size: var(--hl-text-lg);
23
76
  }
24
77
 
25
78
  .hl-alert[data-hl-intent='success'] {
package/dist/avatar.css CHANGED
@@ -18,7 +18,7 @@
18
18
  border-radius: var(--hl-radius-full);
19
19
  overflow: hidden;
20
20
  background: var(--hl-surface-3);
21
- color: var(--hl-fg-muted);
21
+ color: var(--hl-fg);
22
22
  font-size: calc(var(--_size) * 0.4);
23
23
  font-weight: var(--hl-font-medium);
24
24
  line-height: 1;
package/dist/badge.css CHANGED
@@ -74,7 +74,7 @@
74
74
 
75
75
  .hl-badge[data-hl-variant='outline'] {
76
76
  background: transparent;
77
- color: var(--_accent);
77
+ color: var(--_soft-fg);
78
78
  border-color: currentcolor;
79
79
  }
80
80
 
package/dist/button.css CHANGED
@@ -138,7 +138,7 @@
138
138
 
139
139
  .hl-button[data-hl-variant='outline'] {
140
140
  background: transparent;
141
- color: var(--_accent);
141
+ color: var(--_soft-fg);
142
142
  border-color: var(--hl-border-strong);
143
143
  }
144
144
 
@@ -149,7 +149,7 @@
149
149
 
150
150
  .hl-button[data-hl-variant='ghost'] {
151
151
  background: transparent;
152
- color: var(--_accent);
152
+ color: var(--_soft-fg);
153
153
  }
154
154
 
155
155
  .hl-button[data-hl-variant='ghost']:hover {
@@ -160,7 +160,7 @@
160
160
  block-size: auto;
161
161
  padding: 0;
162
162
  background: transparent;
163
- color: var(--_accent);
163
+ color: var(--_soft-fg);
164
164
  border-color: transparent;
165
165
  text-decoration: underline;
166
166
  text-underline-offset: 0.2em;
package/dist/checkbox.css CHANGED
@@ -1,7 +1,12 @@
1
1
  /**
2
2
  * Checkbox: `<label class="hl-checkbox"><input type="checkbox"><span>...</span></label>`.
3
3
  * The native input is restyled (appearance: none) with a CSS checkmark, keeping
4
- * full keyboard and form semantics. Pure CSS; there is no enhancer.
4
+ * full keyboard and form semantics. A single checkbox needs no JavaScript; the
5
+ * `data-hl-checkbox-group` enhancer adds a `data-hl-checkbox-all` master box
6
+ * (checked/indeterminate follows the group) and `data-hl-indeterminate` for an
7
+ * initial mixed state, both styled here through `:indeterminate`.
8
+ * data-hl-checkbox-group: wrapper around related boxes for the enhancer
9
+ * data-hl-checkbox-all: the master "select all" box inside the group
5
10
  */
6
11
  @layer components {
7
12
  .hl-checkbox {
package/dist/combobox.css CHANGED
@@ -34,7 +34,16 @@
34
34
  /* Modern engines pin the listbox to the input via the anchor-name the
35
35
  enhancer sets, so it escapes overflow-clipping ancestors. */
36
36
  @supports (anchor-name: --x) {
37
+ [data-hl-combobox] {
38
+ anchor-scope: --hl-combobox-input;
39
+ }
40
+
41
+ [data-hl-combobox] > input {
42
+ anchor-name: --hl-combobox-input;
43
+ }
44
+
37
45
  [data-hl-combobox] [role='listbox'] {
46
+ position-anchor: --hl-combobox-input;
38
47
  position: fixed;
39
48
  inset: auto;
40
49
  inline-size: anchor-size(width);
@@ -65,7 +65,7 @@
65
65
  font-weight: var(--hl-font-semibold);
66
66
  text-transform: uppercase;
67
67
  letter-spacing: 0.04em;
68
- color: var(--hl-fg-subtle);
68
+ color: var(--hl-fg-muted);
69
69
  }
70
70
 
71
71
  [data-hl-command] [role='option'] {