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/tokens.css CHANGED
@@ -170,11 +170,7 @@
170
170
  --hl-focus-offset: 2px;
171
171
 
172
172
  /* Z-index scale */
173
- --hl-z-base: 0;
174
173
  --hl-z-dropdown: 1000;
175
- --hl-z-sticky: 1100;
176
- --hl-z-drawer: 1200;
177
- --hl-z-modal: 1300;
178
174
  --hl-z-popover: 1400;
179
175
  --hl-z-toast: 1500;
180
176
  --hl-z-tooltip: 1600;
@@ -268,8 +264,8 @@
268
264
  --hl-danger-subtle-fg: light-dark(var(--hl-red-700), var(--hl-red-200));
269
265
 
270
266
  /* Intent: success */
271
- --hl-success: var(--hl-green-600);
272
- --hl-success-hover: var(--hl-green-700);
267
+ --hl-success: var(--hl-green-700);
268
+ --hl-success-hover: var(--hl-green-800);
273
269
  --hl-success-fg: hsl(0deg 0% 100%);
274
270
  --hl-success-subtle: light-dark(var(--hl-green-50), hsl(144deg 61% 20% / 0.35));
275
271
  --hl-success-subtle-fg: light-dark(var(--hl-green-700), var(--hl-green-200));
@@ -282,8 +278,8 @@
282
278
  --hl-warning-subtle-fg: light-dark(var(--hl-amber-800), var(--hl-amber-200));
283
279
 
284
280
  /* Intent: info */
285
- --hl-info: var(--hl-sky-600);
286
- --hl-info-hover: var(--hl-sky-700);
281
+ --hl-info: var(--hl-sky-700);
282
+ --hl-info-hover: var(--hl-sky-800);
287
283
  --hl-info-fg: hsl(0deg 0% 100%);
288
284
  --hl-info-subtle: light-dark(var(--hl-sky-50), hsl(202deg 80% 24% / 0.35));
289
285
  --hl-info-subtle-fg: light-dark(var(--hl-sky-700), var(--hl-sky-200));
package/dist/tooltip.css CHANGED
@@ -9,12 +9,16 @@
9
9
  * `hidden`), and drives visibility through `data-hl-tooltip-open` with show
10
10
  * and hide delays, a grace period, and Escape to dismiss.
11
11
  * data-hl-tooltip: the trigger
12
- * data-hl-placement: top (default) | bottom | left | right, on the trigger
12
+ * data-hl-placement: top (default) | bottom | start | end, on the trigger
13
+ * data-hl-side: the resolved side, set on the tip by the enhancer
13
14
  * data-hl-tooltip-managed: set on the trigger by the enhancer
14
15
  * data-hl-tooltip-open: set on the tip while shown
15
16
  */
16
17
  @layer components {
17
18
  [role='tooltip'] {
19
+ /* Closed baseline tips must not intercept input or remain exposed to AT. */
20
+ display: none;
21
+
18
22
  /* Fallback placement: the JS positioner writes inline position/inset on
19
23
  engines without CSS anchor positioning. */
20
24
  position: absolute;
@@ -58,16 +62,51 @@
58
62
  }
59
63
  }
60
64
 
61
- /* Modern placement: pin above the trigger via the anchor-name the enhancer
62
- sets, flipping below when there's no room. */
65
+ /* Modern placement: pin to the requested side of the trigger via the
66
+ anchor-name the enhancer sets, flipping when there's no room. The side
67
+ comes from `data-hl-side` on the tip (enhanced) or `data-hl-placement` on
68
+ the preceding trigger (no-JS baseline). */
63
69
  @supports (anchor-name: --x) {
70
+ :has(> [data-hl-tooltip]) {
71
+ anchor-scope: --hl-tooltip-trigger;
72
+ }
73
+
74
+ [data-hl-tooltip] {
75
+ anchor-name: --hl-tooltip-trigger;
76
+ }
77
+
64
78
  [role='tooltip'] {
79
+ position-anchor: --hl-tooltip-trigger;
65
80
  position: fixed;
66
81
  inset: auto;
67
82
  position-area: block-start;
68
83
  position-try-fallbacks: flip-block;
69
84
  margin-block: var(--hl-space-1);
70
85
  }
86
+
87
+ [role='tooltip'][data-hl-side='bottom'],
88
+ [data-hl-tooltip][data-hl-placement^='bottom'] + [role='tooltip'] {
89
+ position-area: block-end;
90
+ }
91
+
92
+ [role='tooltip']:is([data-hl-side='start'], [data-hl-side='end']),
93
+ [data-hl-tooltip]:is([data-hl-placement^='start'], [data-hl-placement^='end'])
94
+ + [role='tooltip'] {
95
+ position-try-fallbacks: flip-inline;
96
+ margin-block: 0;
97
+ margin-inline: var(--hl-space-1);
98
+ translate: 0 0;
99
+ }
100
+
101
+ [role='tooltip'][data-hl-side='start'],
102
+ [data-hl-tooltip][data-hl-placement^='start'] + [role='tooltip'] {
103
+ position-area: inline-start;
104
+ }
105
+
106
+ [role='tooltip'][data-hl-side='end'],
107
+ [data-hl-tooltip][data-hl-placement^='end'] + [role='tooltip'] {
108
+ position-area: inline-end;
109
+ }
71
110
  }
72
111
 
73
112
  /* Inverted colors flatten away; keep a visible edge on the system canvas. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hydrateless",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "Accessible, themeable UI primitives: semantic HTML and modern CSS first, optional JS enhancers.",
5
5
  "license": "MIT",
6
6
  "repository": {