@threadlabs/looma 0.46.5 → 0.47.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/components/ui-button/ui-button.html +29 -8
- package/components/ui-checkbox/ui-checkbox.html +20 -2
- package/components/ui-icon-button/ui-icon-button.html +32 -8
- package/components/ui-radio/ui-radio.html +23 -1
- package/components/ui-switch/ui-switch.html +22 -0
- package/dist/index.js +1 -1
- package/docs/README.md +6 -4
- package/docs/catalog.json +228 -32
- package/docs/theme.mjs +74 -22
- package/package.json +2 -2
- package/styles/ui-button.css +30 -9
- package/styles/ui-checkbox.css +23 -2
- package/styles/ui-icon-button.css +32 -8
- package/styles/ui-radio.css +26 -1
- package/styles/ui-switch.css +25 -0
- package/theme-system.css +2 -0
- package/tokens.css +45 -18
- package/vue/UiButton.vue +29 -14
- package/vue/UiCheckbox.vue +21 -2
- package/vue/UiIconButton.vue +32 -20
- package/vue/UiRadio.vue +24 -1
- package/vue/UiSwitch.vue +23 -0
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/components.css +205 -58
package/tokens.css
CHANGED
|
@@ -117,10 +117,11 @@
|
|
|
117
117
|
color: var(--ui-text-primary);
|
|
118
118
|
/* Neutral is a quiet filled surface, never the text colour inverted. */
|
|
119
119
|
--ui-neutral-surface: light-dark(color-mix(in oklab, var(--ui-text) 6%, var(--ui-surface-raised)), color-mix(in oklab, var(--ui-text) 13.5%, var(--ui-surface-raised)));
|
|
120
|
-
--ui-neutral-hover: light-dark(
|
|
120
|
+
--ui-neutral-hover: light-dark(oklch(from var(--ui-neutral-surface) calc(l - 0.035) c h), oklch(from var(--ui-neutral-surface) calc(l + 0.035) c h));
|
|
121
121
|
--ui-neutral-active: light-dark(color-mix(in oklab, var(--ui-text) 14%, var(--ui-surface-raised)), color-mix(in oklab, var(--ui-text) 31.5%, var(--ui-surface-raised)));
|
|
122
122
|
/* Quiet neutral shadows complement the shared action and field boundary. */
|
|
123
123
|
--ui-neutral-shadow: var(--ui-shadow-xs);
|
|
124
|
+
--ui-choice-hover-surface: oklch(from var(--ui-accent-solid) calc(l + clamp(-1, (0.5 - l) * 1000, 1) * 0.04) c h);
|
|
124
125
|
--ui-accent-line-width: var(--ui-border-width);
|
|
125
126
|
|
|
126
127
|
/* Type scale, from the base size. */
|
|
@@ -191,18 +192,44 @@
|
|
|
191
192
|
--ui-border-strong: color-mix(in oklab, var(--ui-text) 25%, var(--ui-surface));
|
|
192
193
|
--ui-control-border: light-dark(color-mix(in oklab, var(--ui-text) 30%, var(--ui-surface)), color-mix(in oklab, var(--ui-text) 40%, var(--ui-surface-raised)));
|
|
193
194
|
|
|
194
|
-
/*
|
|
195
|
-
|
|
196
|
-
--ui-accent-hover:
|
|
195
|
+
/* Shared action steps change lightness without washing pigment toward black or white.
|
|
196
|
+
Generated themes also resolve label contrast and move their material stops. */
|
|
197
|
+
--ui-accent-hover: oklch(from var(--ui-accent) calc(l + clamp(-1, (0.5 - l) * 1000, 1) * (0.035 + 0.08 * max(0, 1 - l / 0.5))) c h);
|
|
197
198
|
--ui-accent-active: color-mix(in oklab, var(--ui-accent) 74%, var(--ui-text));
|
|
198
199
|
--ui-accent-subtle: color-mix(in oklab, var(--ui-accent) 12%, var(--ui-surface));
|
|
199
|
-
--ui-danger-hover:
|
|
200
|
+
--ui-danger-hover: oklch(from var(--ui-danger) calc(l + clamp(-1, (0.5 - l) * 1000, 1) * (0.035 + 0.08 * max(0, 1 - l / 0.5))) c h);
|
|
200
201
|
--ui-danger-active: color-mix(in oklab, var(--ui-danger) 74%, var(--ui-text));
|
|
201
202
|
--ui-success-active: color-mix(in oklab, var(--ui-success) 74%, var(--ui-text));
|
|
202
203
|
--ui-warning-active: color-mix(in oklab, var(--ui-warning) 74%, #ffffff);
|
|
203
204
|
--ui-info-active: color-mix(in oklab, var(--ui-info) 74%, var(--ui-text));
|
|
204
|
-
--ui-warning-hover:
|
|
205
|
-
--ui-info-hover:
|
|
205
|
+
--ui-warning-hover: oklch(from var(--ui-warning) calc(l + clamp(-1, (0.5 - l) * 1000, 1) * (0.035 + 0.08 * max(0, 1 - l / 0.5))) c h);
|
|
206
|
+
--ui-info-hover: oklch(from var(--ui-info) calc(l + clamp(-1, (0.5 - l) * 1000, 1) * (0.035 + 0.08 * max(0, 1 - l / 0.5))) c h);
|
|
207
|
+
|
|
208
|
+
/* Quiet action paint lifts pigment before compositing, so dark accents retain
|
|
209
|
+
color. Generated themes calibrate these shared roles against their plates. */
|
|
210
|
+
--ui-accent-wash: light-dark(oklch(from var(--ui-accent) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.16), oklch(from var(--ui-accent) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.08));
|
|
211
|
+
--ui-accent-wash-hover: light-dark(oklch(from var(--ui-accent) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.25), oklch(from var(--ui-accent) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.14));
|
|
212
|
+
--ui-accent-ghost-hover: light-dark(oklch(from var(--ui-accent) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-accent) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.04));
|
|
213
|
+
--ui-accent-secondary-wash: light-dark(oklch(from var(--ui-accent-secondary) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.16), oklch(from var(--ui-accent-secondary) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.08));
|
|
214
|
+
--ui-accent-secondary-wash-hover: light-dark(oklch(from var(--ui-accent-secondary) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.25), oklch(from var(--ui-accent-secondary) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.14));
|
|
215
|
+
--ui-accent-secondary-ghost-hover: light-dark(oklch(from var(--ui-accent-secondary) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-accent-secondary) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.04));
|
|
216
|
+
--ui-accent-tertiary-wash: light-dark(oklch(from var(--ui-accent-tertiary) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.16), oklch(from var(--ui-accent-tertiary) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.08));
|
|
217
|
+
--ui-accent-tertiary-wash-hover: light-dark(oklch(from var(--ui-accent-tertiary) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.25), oklch(from var(--ui-accent-tertiary) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.14));
|
|
218
|
+
--ui-accent-tertiary-ghost-hover: light-dark(oklch(from var(--ui-accent-tertiary) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-accent-tertiary) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.04));
|
|
219
|
+
--ui-danger-wash: light-dark(oklch(from var(--ui-danger) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.16), oklch(from var(--ui-danger) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.08));
|
|
220
|
+
--ui-danger-wash-hover: light-dark(oklch(from var(--ui-danger) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.25), oklch(from var(--ui-danger) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.14));
|
|
221
|
+
--ui-danger-ghost-hover: light-dark(oklch(from var(--ui-danger) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-danger) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.04));
|
|
222
|
+
--ui-success-wash: light-dark(oklch(from var(--ui-success) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.16), oklch(from var(--ui-success) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.08));
|
|
223
|
+
--ui-success-wash-hover: light-dark(oklch(from var(--ui-success) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.25), oklch(from var(--ui-success) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.14));
|
|
224
|
+
--ui-success-ghost-hover: light-dark(oklch(from var(--ui-success) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-success) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.04));
|
|
225
|
+
--ui-warning-wash: light-dark(oklch(from var(--ui-warning) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.16), oklch(from var(--ui-warning) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.08));
|
|
226
|
+
--ui-warning-wash-hover: light-dark(oklch(from var(--ui-warning) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.25), oklch(from var(--ui-warning) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.14));
|
|
227
|
+
--ui-warning-ghost-hover: light-dark(oklch(from var(--ui-warning) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-warning) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.04));
|
|
228
|
+
--ui-info-wash: light-dark(oklch(from var(--ui-info) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.16), oklch(from var(--ui-info) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.08));
|
|
229
|
+
--ui-info-wash-hover: light-dark(oklch(from var(--ui-info) 0.72 calc(c * 0.74 * 0.72 / max(0.001, l)) h / 0.25), oklch(from var(--ui-info) 0.65 calc(c * 0.74 * 0.65 / max(0.001, l)) h / 0.14));
|
|
230
|
+
--ui-info-ghost-hover: light-dark(oklch(from var(--ui-info) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-info) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.04));
|
|
231
|
+
--ui-neutral-wash-hover: light-dark(oklch(from var(--ui-text) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-text) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.06));
|
|
232
|
+
--ui-neutral-ghost-hover: light-dark(oklch(from var(--ui-text) 0.72 calc(c * 0.72 / max(0.001, l)) h / 0.1), oklch(from var(--ui-text) 0.65 calc(c * 0.65 / max(0.001, l)) h / 0.04));
|
|
206
233
|
|
|
207
234
|
/* Disabled is one decision, not a per-component one: the sunken surface and a pale ink, at
|
|
208
235
|
full opacity, so a disabled control reads as unavailable rather than as a faded variant.
|
|
@@ -230,10 +257,10 @@
|
|
|
230
257
|
/* Optional brand accents use the primary identity until explicitly supplied. */
|
|
231
258
|
--ui-accent-secondary: var(--ui-accent);
|
|
232
259
|
--ui-on-accent-secondary: var(--ui-on-accent);
|
|
233
|
-
--ui-accent-secondary-hover:
|
|
260
|
+
--ui-accent-secondary-hover: oklch(from var(--ui-accent-secondary) calc(l + clamp(-1, (0.5 - l) * 1000, 1) * (0.035 + 0.08 * max(0, 1 - l / 0.5))) c h);
|
|
234
261
|
--ui-accent-secondary-active: color-mix(in oklab, var(--ui-accent-secondary) 74%, var(--ui-text));
|
|
235
262
|
--ui-accent-secondary-subtle-text: light-dark(oklch(from var(--ui-accent-secondary) min(l, 0.50) min(c, 0.18) h), oklch(from var(--ui-accent-secondary) max(l, 0.80) min(c, 0.16) h));
|
|
236
|
-
--ui-accent-secondary-soft: light-dark(oklch(from var(--ui-accent-secondary) 96% min(c, 0.02) h), oklch(from var(--ui-accent-secondary) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) h));
|
|
263
|
+
--ui-accent-secondary-soft: light-dark(oklch(from var(--ui-accent-secondary) 96% calc(min(c, 0.02) * 0.74) h), oklch(from var(--ui-accent-secondary) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) calc(min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) * 0.74) h));
|
|
237
264
|
--ui-accent-secondary-soft-border: color-mix(in srgb, var(--ui-accent-secondary-soft) 75%, var(--ui-accent-secondary-subtle-text));
|
|
238
265
|
--ui-accent-secondary-solid: var(--ui-accent-secondary);
|
|
239
266
|
--ui-accent-secondary-strong-surface: var(--ui-accent-secondary);
|
|
@@ -243,10 +270,10 @@
|
|
|
243
270
|
--ui-accent-secondary-active-border: var(--ui-accent-secondary-active);
|
|
244
271
|
--ui-accent-tertiary: var(--ui-accent);
|
|
245
272
|
--ui-on-accent-tertiary: var(--ui-on-accent);
|
|
246
|
-
--ui-accent-tertiary-hover:
|
|
273
|
+
--ui-accent-tertiary-hover: oklch(from var(--ui-accent-tertiary) calc(l + clamp(-1, (0.5 - l) * 1000, 1) * (0.035 + 0.08 * max(0, 1 - l / 0.5))) c h);
|
|
247
274
|
--ui-accent-tertiary-active: color-mix(in oklab, var(--ui-accent-tertiary) 74%, var(--ui-text));
|
|
248
275
|
--ui-accent-tertiary-subtle-text: light-dark(oklch(from var(--ui-accent-tertiary) min(l, 0.50) min(c, 0.18) h), oklch(from var(--ui-accent-tertiary) max(l, 0.80) min(c, 0.16) h));
|
|
249
|
-
--ui-accent-tertiary-soft: light-dark(oklch(from var(--ui-accent-tertiary) 96% min(c, 0.02) h), oklch(from var(--ui-accent-tertiary) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) h));
|
|
276
|
+
--ui-accent-tertiary-soft: light-dark(oklch(from var(--ui-accent-tertiary) 96% calc(min(c, 0.02) * 0.74) h), oklch(from var(--ui-accent-tertiary) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) calc(min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) * 0.74) h));
|
|
250
277
|
--ui-accent-tertiary-soft-border: color-mix(in srgb, var(--ui-accent-tertiary-soft) 75%, var(--ui-accent-tertiary-subtle-text));
|
|
251
278
|
--ui-accent-tertiary-solid: var(--ui-accent-tertiary);
|
|
252
279
|
--ui-accent-tertiary-strong-surface: var(--ui-accent-tertiary);
|
|
@@ -274,27 +301,27 @@
|
|
|
274
301
|
--ui-nav-compact-min-block-size: var(--ui-control-size-sm);
|
|
275
302
|
--ui-nav-hover-surface: var(--ui-surface-hover);
|
|
276
303
|
|
|
277
|
-
--ui-accent-soft: light-dark(oklch(from var(--ui-accent) 96% min(c, 0.02) h), oklch(from var(--ui-accent) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) h));
|
|
304
|
+
--ui-accent-soft: light-dark(oklch(from var(--ui-accent) 96% calc(min(c, 0.02) * 0.74) h), oklch(from var(--ui-accent) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) calc(min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) * 0.74) h));
|
|
278
305
|
--ui-accent-soft-border: color-mix(in srgb, var(--ui-accent-soft) 75%, var(--ui-accent-subtle-text));
|
|
279
306
|
--ui-accent-contrast: var(--ui-on-accent);
|
|
280
307
|
--ui-accent-strong-surface: var(--ui-accent);
|
|
281
308
|
--ui-accent-on-strong: var(--ui-on-accent);
|
|
282
309
|
--ui-accent-subtle-text: light-dark(oklch(from var(--ui-accent) min(l, 0.50) min(c, 0.18) h), oklch(from var(--ui-accent) max(l, 0.80) min(c, 0.16) h));
|
|
283
310
|
--ui-danger-solid: var(--ui-danger);
|
|
284
|
-
--ui-danger-soft: light-dark(oklch(from var(--ui-danger) 96% min(c, 0.02) h), oklch(from var(--ui-danger) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) h));
|
|
311
|
+
--ui-danger-soft: light-dark(oklch(from var(--ui-danger) 96% calc(min(c, 0.02) * 0.74) h), oklch(from var(--ui-danger) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) calc(min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) * 0.74) h));
|
|
285
312
|
--ui-danger-soft-border: color-mix(in srgb, var(--ui-danger-soft) 75%, var(--ui-danger-subtle-text));
|
|
286
313
|
--ui-danger-strong-surface: var(--ui-danger);
|
|
287
314
|
--ui-danger-on-strong: var(--ui-on-danger);
|
|
288
315
|
--ui-danger-subtle-text: light-dark(oklch(from var(--ui-danger) min(l, 0.50) min(c, 0.12) h), oklch(from var(--ui-danger) max(l, 0.80) min(c, 0.12) h));
|
|
289
316
|
--ui-success-solid: var(--ui-success);
|
|
290
|
-
--ui-success-hover:
|
|
291
|
-
--ui-success-soft: light-dark(oklch(from var(--ui-success) 96% min(c, 0.02) h), oklch(from var(--ui-success) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) h));
|
|
317
|
+
--ui-success-hover: oklch(from var(--ui-success) calc(l + clamp(-1, (0.5 - l) * 1000, 1) * (0.035 + 0.08 * max(0, 1 - l / 0.5))) c h);
|
|
318
|
+
--ui-success-soft: light-dark(oklch(from var(--ui-success) 96% calc(min(c, 0.02) * 0.74) h), oklch(from var(--ui-success) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) calc(min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) * 0.74) h));
|
|
292
319
|
--ui-success-soft-border: color-mix(in srgb, var(--ui-success-soft) 75%, var(--ui-success-subtle-text));
|
|
293
320
|
--ui-success-strong-surface: var(--ui-success);
|
|
294
321
|
--ui-success-on-strong: var(--ui-on-accent);
|
|
295
322
|
--ui-success-subtle-text: light-dark(oklch(from var(--ui-success) min(l, 0.50) min(c, 0.12) h), oklch(from var(--ui-success) max(l, 0.80) min(c, 0.12) h));
|
|
296
323
|
--ui-warning-solid: var(--ui-warning);
|
|
297
|
-
--ui-warning-soft: light-dark(oklch(from var(--ui-warning) 96% min(c, 0.02) h), oklch(from var(--ui-warning) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) h));
|
|
324
|
+
--ui-warning-soft: light-dark(oklch(from var(--ui-warning) 96% calc(min(c, 0.02) * 0.74) h), oklch(from var(--ui-warning) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) calc(min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) * 0.74) h));
|
|
298
325
|
--ui-warning-soft-border: color-mix(in srgb, var(--ui-warning-soft) 75%, var(--ui-warning-subtle-text));
|
|
299
326
|
--ui-warning-strong-surface: var(--ui-warning);
|
|
300
327
|
/* Amber needs dark ink; the deeper high-contrast seed selects light ink. */
|
|
@@ -303,7 +330,7 @@
|
|
|
303
330
|
/* Amber is the lightest intent: it takes more ink than the others to read at 4.5:1, even from a bright seed. */
|
|
304
331
|
--ui-warning-subtle-text: light-dark(oklch(from var(--ui-warning) min(l, 0.50) min(c, 0.12) h), oklch(from var(--ui-warning) max(l, 0.80) min(c, 0.12) h));
|
|
305
332
|
--ui-info-solid: var(--ui-info);
|
|
306
|
-
--ui-info-soft: light-dark(oklch(from var(--ui-info) 96% min(c, 0.02) h), oklch(from var(--ui-info) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) h));
|
|
333
|
+
--ui-info-soft: light-dark(oklch(from var(--ui-info) 96% calc(min(c, 0.02) * 0.74) h), oklch(from var(--ui-info) calc(clamp(0.34, l, 0.38) + 0.04 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2)) calc(min(c, calc(0.035 + 0.015 * pow(max(0, calc(1 - max(calc(h - 70), calc(70 - h)) / 35)), 2))) * 0.74) h));
|
|
307
334
|
--ui-info-soft-border: color-mix(in srgb, var(--ui-info-soft) 75%, var(--ui-info-subtle-text));
|
|
308
335
|
--ui-info-strong-surface: var(--ui-info);
|
|
309
336
|
--ui-info-on-strong: var(--ui-on-accent);
|
|
@@ -318,7 +345,7 @@
|
|
|
318
345
|
--ui-action-secondary-text: var(--ui-text);
|
|
319
346
|
--ui-control-surface: var(--ui-surface);
|
|
320
347
|
--ui-control-surface-disabled: var(--ui-surface-muted);
|
|
321
|
-
--ui-control-border-hover: light-dark(color-mix(in oklab, var(--ui-text)
|
|
348
|
+
--ui-control-border-hover: light-dark(color-mix(in oklab, var(--ui-text) 38%, var(--ui-surface)), color-mix(in oklab, var(--ui-text) 57%, var(--ui-surface-raised)));
|
|
322
349
|
--ui-control-placeholder: color-mix(in oklab, var(--ui-text) 58%, var(--ui-control-surface));
|
|
323
350
|
--ui-control-focus: var(--ui-focus-ring);
|
|
324
351
|
/* Derived from the ring, not a near-white tint, so the halo shows on any surface. */
|
package/vue/UiButton.vue
CHANGED
|
@@ -983,7 +983,7 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
983
983
|
|
|
984
984
|
/* A value picker is a field, with Select's quiet edge and resting lift. */
|
|
985
985
|
|
|
986
|
-
/*
|
|
986
|
+
/* Shared translucent paint keeps text and icon action feedback coordinated. */
|
|
987
987
|
|
|
988
988
|
/* A soft halo that transitions in with the other box-shadow changes, layered on the raised shadow. */
|
|
989
989
|
|
|
@@ -1030,6 +1030,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1030
1030
|
--_tone-highlight: var(--ui-accent-highlight, none);
|
|
1031
1031
|
--_tone-hover-highlight: var(--ui-accent-hover-highlight, none);
|
|
1032
1032
|
--_tone-outline-border: var(--ui-accent-outline-border, var(--ui-accent-subtle-text));
|
|
1033
|
+
--_tone-wash: var(--ui-accent-wash);
|
|
1034
|
+
--_tone-wash-hover: var(--ui-accent-wash-hover);
|
|
1035
|
+
--_tone-ghost-hover: var(--ui-accent-ghost-hover);
|
|
1033
1036
|
--_tone-glow: var(--ui-accent-glow, 0 0 transparent);
|
|
1034
1037
|
--_hue: var(--ui-accent);
|
|
1035
1038
|
--_hue-hover: var(--ui-accent-hover);
|
|
@@ -1206,7 +1209,7 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1206
1209
|
|
|
1207
1210
|
:global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):where([data-hn-ui-button])) {
|
|
1208
1211
|
--_outline-highlight: var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
1209
|
-
--_outline-wash:
|
|
1212
|
+
--_outline-wash: var(--_tone-wash);
|
|
1210
1213
|
border-color: var(--ui-button-border, var(--_tone-outline-border, var(--_tone-text)));
|
|
1211
1214
|
background-color: var(--ui-button-surface, transparent);
|
|
1212
1215
|
box-shadow: var(--ui-button-shadow, var(--ui-neutral-shadow));
|
|
@@ -1216,11 +1219,7 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1216
1219
|
}
|
|
1217
1220
|
|
|
1218
1221
|
:global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
|
|
1219
|
-
--_outline-
|
|
1220
|
-
--ui-neutral-highlight,
|
|
1221
|
-
var(--ui-surface-highlight, linear-gradient(transparent, transparent))
|
|
1222
|
-
);
|
|
1223
|
-
--_outline-wash: oklch(from var(--_tone) l c h / calc(12% * var(--ui-tonal-opacity, 1)));
|
|
1222
|
+
--_outline-wash: var(--_tone-wash-hover);
|
|
1224
1223
|
background-color: var(--ui-button-hover-surface, transparent);
|
|
1225
1224
|
border-color: var(--ui-button-hover-border, var(--_tone-outline-border));
|
|
1226
1225
|
}
|
|
@@ -1293,6 +1292,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1293
1292
|
--ui-accent-secondary-outline-border,
|
|
1294
1293
|
var(--ui-accent-secondary-subtle-text)
|
|
1295
1294
|
);
|
|
1295
|
+
--_tone-wash: var(--ui-accent-secondary-wash);
|
|
1296
|
+
--_tone-wash-hover: var(--ui-accent-secondary-wash-hover);
|
|
1297
|
+
--_tone-ghost-hover: var(--ui-accent-secondary-ghost-hover);
|
|
1296
1298
|
--_tone-glow: var(--ui-accent-secondary-glow, 0 0 transparent);
|
|
1297
1299
|
--_hue: var(--ui-accent-secondary);
|
|
1298
1300
|
--_hue-hover: var(--ui-accent-secondary-hover);
|
|
@@ -1314,6 +1316,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1314
1316
|
--ui-accent-tertiary-outline-border,
|
|
1315
1317
|
var(--ui-accent-tertiary-subtle-text)
|
|
1316
1318
|
);
|
|
1319
|
+
--_tone-wash: var(--ui-accent-tertiary-wash);
|
|
1320
|
+
--_tone-wash-hover: var(--ui-accent-tertiary-wash-hover);
|
|
1321
|
+
--_tone-ghost-hover: var(--ui-accent-tertiary-ghost-hover);
|
|
1317
1322
|
--_tone-glow: var(--ui-accent-tertiary-glow, 0 0 transparent);
|
|
1318
1323
|
--_hue: var(--ui-accent-tertiary);
|
|
1319
1324
|
--_hue-hover: var(--ui-accent-tertiary-hover);
|
|
@@ -1327,8 +1332,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1327
1332
|
--_tone-hover-border: var(--ui-control-border-hover, var(--ui-neutral-hover));
|
|
1328
1333
|
--_tone-active-border: var(--ui-control-border-hover, var(--ui-neutral-active));
|
|
1329
1334
|
--_tone-highlight: var(--ui-neutral-highlight, none);
|
|
1330
|
-
--_tone-hover-highlight: var(--ui-neutral-highlight, var(--_tone-highlight));
|
|
1335
|
+
--_tone-hover-highlight: var(--ui-neutral-hover-highlight, var(--_tone-highlight));
|
|
1331
1336
|
--_tone-outline-border: var(--ui-control-border);
|
|
1337
|
+
--_tone-ghost-hover: var(--ui-neutral-ghost-hover);
|
|
1332
1338
|
--_tone-glow: var(--ui-neutral-glow, 0 0 transparent);
|
|
1333
1339
|
--_hue: var(--ui-text);
|
|
1334
1340
|
--_hue-hover: var(--ui-text);
|
|
@@ -1350,8 +1356,8 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1350
1356
|
}
|
|
1351
1357
|
:global(:scope[data-tone="neutral"][data-appearance="outline"]:hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
|
|
1352
1358
|
border-color: var(--ui-button-hover-border, var(--ui-control-border-hover));
|
|
1353
|
-
background-color: var(--ui-button-hover-surface,
|
|
1354
|
-
--_outline-wash:
|
|
1359
|
+
background-color: var(--ui-button-hover-surface, transparent);
|
|
1360
|
+
--_outline-wash: var(--ui-neutral-wash-hover);
|
|
1355
1361
|
background-image:
|
|
1356
1362
|
linear-gradient(var(--_outline-wash), var(--_outline-wash)),
|
|
1357
1363
|
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
@@ -1378,6 +1384,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1378
1384
|
--_tone-highlight: var(--ui-danger-highlight, none);
|
|
1379
1385
|
--_tone-hover-highlight: var(--ui-danger-hover-highlight, none);
|
|
1380
1386
|
--_tone-outline-border: var(--ui-danger-outline-border, var(--ui-danger-subtle-text));
|
|
1387
|
+
--_tone-wash: var(--ui-danger-wash);
|
|
1388
|
+
--_tone-wash-hover: var(--ui-danger-wash-hover);
|
|
1389
|
+
--_tone-ghost-hover: var(--ui-danger-ghost-hover);
|
|
1381
1390
|
--_tone-glow: var(--ui-danger-glow, 0 0 transparent);
|
|
1382
1391
|
--_hue: var(--ui-danger);
|
|
1383
1392
|
--_hue-hover: var(--ui-danger-hover);
|
|
@@ -1393,6 +1402,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1393
1402
|
--_tone-highlight: var(--ui-success-highlight, none);
|
|
1394
1403
|
--_tone-hover-highlight: var(--ui-success-hover-highlight, none);
|
|
1395
1404
|
--_tone-outline-border: var(--ui-success-outline-border, var(--ui-success-subtle-text));
|
|
1405
|
+
--_tone-wash: var(--ui-success-wash);
|
|
1406
|
+
--_tone-wash-hover: var(--ui-success-wash-hover);
|
|
1407
|
+
--_tone-ghost-hover: var(--ui-success-ghost-hover);
|
|
1396
1408
|
--_tone-glow: var(--ui-success-glow, 0 0 transparent);
|
|
1397
1409
|
--_hue: var(--ui-success);
|
|
1398
1410
|
--_hue-hover: var(--ui-success-hover);
|
|
@@ -1408,6 +1420,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1408
1420
|
--_tone-highlight: var(--ui-warning-highlight, none);
|
|
1409
1421
|
--_tone-hover-highlight: var(--ui-warning-hover-highlight, none);
|
|
1410
1422
|
--_tone-outline-border: var(--ui-warning-outline-border, var(--ui-warning-subtle-text));
|
|
1423
|
+
--_tone-wash: var(--ui-warning-wash);
|
|
1424
|
+
--_tone-wash-hover: var(--ui-warning-wash-hover);
|
|
1425
|
+
--_tone-ghost-hover: var(--ui-warning-ghost-hover);
|
|
1411
1426
|
--_tone-glow: var(--ui-warning-glow, 0 0 transparent);
|
|
1412
1427
|
--_hue: var(--ui-warning);
|
|
1413
1428
|
--_hue-hover: var(--ui-warning-hover);
|
|
@@ -1423,6 +1438,9 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1423
1438
|
--_tone-highlight: var(--ui-info-highlight, none);
|
|
1424
1439
|
--_tone-hover-highlight: var(--ui-info-hover-highlight, none);
|
|
1425
1440
|
--_tone-outline-border: var(--ui-info-outline-border, var(--ui-info-subtle-text));
|
|
1441
|
+
--_tone-wash: var(--ui-info-wash);
|
|
1442
|
+
--_tone-wash-hover: var(--ui-info-wash-hover);
|
|
1443
|
+
--_tone-ghost-hover: var(--ui-info-ghost-hover);
|
|
1426
1444
|
--_tone-glow: var(--ui-info-glow, 0 0 transparent);
|
|
1427
1445
|
--_hue: var(--ui-info);
|
|
1428
1446
|
--_hue-hover: var(--ui-info-hover);
|
|
@@ -1472,10 +1490,7 @@ useComponentHost(() => import('../components/ui-button/ui-button.js'), {
|
|
|
1472
1490
|
color: var(--ui-button-ghost-text, var(--_tone-text));
|
|
1473
1491
|
}
|
|
1474
1492
|
:global(:scope[data-appearance="ghost"]:hover:not(:disabled, [aria-disabled="true"]):where([data-hn-ui-button])) {
|
|
1475
|
-
background-color: var(
|
|
1476
|
-
--ui-button-ghost-hover-surface,
|
|
1477
|
-
oklch(from var(--_tone) l c h / calc(10% * var(--ui-tonal-opacity, 1)))
|
|
1478
|
-
);
|
|
1493
|
+
background-color: var(--ui-button-ghost-hover-surface, var(--_tone-ghost-hover));
|
|
1479
1494
|
border-color: transparent;
|
|
1480
1495
|
}
|
|
1481
1496
|
|
package/vue/UiCheckbox.vue
CHANGED
|
@@ -530,8 +530,27 @@ useComponentHost(() => import('../components/ui-checkbox/ui-checkbox.js'), {
|
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
@media (hover: hover) and (forced-colors: none) {
|
|
534
|
+
:global(:scope:hover input:enabled:where([data-hn-ui-checkbox])) {
|
|
535
|
+
--_choice-hover-wash: var(--ui-neutral-wash-hover);
|
|
536
|
+
background-image:
|
|
537
|
+
linear-gradient(var(--_choice-hover-wash), var(--_choice-hover-wash)),
|
|
538
|
+
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
:global(:scope:hover input:enabled:not([aria-invalid="true"]):where([data-hn-ui-checkbox])) {
|
|
542
|
+
border-color: var(--ui-control-border-hover, var(--ui-border-strong));
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
:global(:scope:hover input:enabled:is(:checked, :indeterminate):where([data-hn-ui-checkbox])) {
|
|
546
|
+
background-color: var(--ui-choice-hover-surface);
|
|
547
|
+
background-image: var(--ui-choice-hover-highlight, none);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
:global(:scope:hover
|
|
551
|
+
input:enabled:is(:checked, :indeterminate):not([aria-invalid="true"]):where([data-hn-ui-checkbox])) {
|
|
552
|
+
border-color: var(--ui-choice-hover-surface);
|
|
553
|
+
}
|
|
535
554
|
}
|
|
536
555
|
|
|
537
556
|
:global(input:focus-visible:where([data-hn-ui-checkbox])) {
|
package/vue/UiIconButton.vue
CHANGED
|
@@ -533,6 +533,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
533
533
|
--_tone-highlight: var(--ui-accent-highlight, none);
|
|
534
534
|
--_tone-hover-highlight: var(--ui-accent-hover-highlight, none);
|
|
535
535
|
--_tone-outline-border: var(--ui-accent-outline-border, var(--ui-accent-subtle-text));
|
|
536
|
+
--_tone-wash: var(--ui-accent-wash);
|
|
537
|
+
--_tone-wash-hover: var(--ui-accent-wash-hover);
|
|
538
|
+
--_tone-ghost-hover: var(--ui-accent-ghost-hover);
|
|
536
539
|
--_tone-glow: var(--ui-accent-glow, 0 0 transparent);
|
|
537
540
|
--_ui-action-start: 1px;
|
|
538
541
|
--_ui-action-edge: var(
|
|
@@ -576,6 +579,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
576
579
|
--ui-accent-secondary-outline-border,
|
|
577
580
|
var(--ui-accent-secondary-subtle-text)
|
|
578
581
|
);
|
|
582
|
+
--_tone-wash: var(--ui-accent-secondary-wash);
|
|
583
|
+
--_tone-wash-hover: var(--ui-accent-secondary-wash-hover);
|
|
584
|
+
--_tone-ghost-hover: var(--ui-accent-secondary-ghost-hover);
|
|
579
585
|
--_tone-glow: var(--ui-accent-secondary-glow, 0 0 transparent);
|
|
580
586
|
--_icon-button-border: var(--ui-accent-secondary-subtle-text);
|
|
581
587
|
--_icon-button-hover-border: var(--ui-accent-secondary-subtle-text);
|
|
@@ -604,6 +610,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
604
610
|
--ui-accent-tertiary-outline-border,
|
|
605
611
|
var(--ui-accent-tertiary-subtle-text)
|
|
606
612
|
);
|
|
613
|
+
--_tone-wash: var(--ui-accent-tertiary-wash);
|
|
614
|
+
--_tone-wash-hover: var(--ui-accent-tertiary-wash-hover);
|
|
615
|
+
--_tone-ghost-hover: var(--ui-accent-tertiary-ghost-hover);
|
|
607
616
|
--_tone-glow: var(--ui-accent-tertiary-glow, 0 0 transparent);
|
|
608
617
|
--_icon-button-border: var(--ui-accent-tertiary-subtle-text);
|
|
609
618
|
--_icon-button-hover-border: var(--ui-accent-tertiary-subtle-text);
|
|
@@ -626,6 +635,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
626
635
|
--_tone-highlight: var(--ui-accent-highlight, none);
|
|
627
636
|
--_tone-hover-highlight: var(--ui-accent-hover-highlight, none);
|
|
628
637
|
--_tone-outline-border: var(--ui-accent-outline-border, var(--ui-accent-subtle-text));
|
|
638
|
+
--_tone-wash: var(--ui-accent-wash);
|
|
639
|
+
--_tone-wash-hover: var(--ui-accent-wash-hover);
|
|
640
|
+
--_tone-ghost-hover: var(--ui-accent-ghost-hover);
|
|
629
641
|
--_tone-glow: var(--ui-accent-glow, 0 0 transparent);
|
|
630
642
|
--_icon-button-border: var(--ui-accent-subtle-text);
|
|
631
643
|
--_icon-button-hover-border: var(--ui-accent-subtle-text);
|
|
@@ -645,6 +657,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
645
657
|
--_tone-highlight: var(--ui-danger-highlight, none);
|
|
646
658
|
--_tone-hover-highlight: var(--ui-danger-hover-highlight, none);
|
|
647
659
|
--_tone-outline-border: var(--ui-danger-outline-border, var(--ui-danger-subtle-text));
|
|
660
|
+
--_tone-wash: var(--ui-danger-wash);
|
|
661
|
+
--_tone-wash-hover: var(--ui-danger-wash-hover);
|
|
662
|
+
--_tone-ghost-hover: var(--ui-danger-ghost-hover);
|
|
648
663
|
--_tone-glow: var(--ui-danger-glow, 0 0 transparent);
|
|
649
664
|
--_icon-button-border: var(--ui-danger-subtle-text);
|
|
650
665
|
--_icon-button-hover-border: var(--ui-danger-subtle-text);
|
|
@@ -667,6 +682,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
667
682
|
--_tone-highlight: var(--ui-success-highlight, none);
|
|
668
683
|
--_tone-hover-highlight: var(--ui-success-hover-highlight, none);
|
|
669
684
|
--_tone-outline-border: var(--ui-success-outline-border, var(--ui-success-subtle-text));
|
|
685
|
+
--_tone-wash: var(--ui-success-wash);
|
|
686
|
+
--_tone-wash-hover: var(--ui-success-wash-hover);
|
|
687
|
+
--_tone-ghost-hover: var(--ui-success-ghost-hover);
|
|
670
688
|
--_tone-glow: var(--ui-success-glow, 0 0 transparent);
|
|
671
689
|
--_icon-button-border: var(--ui-success-subtle-text);
|
|
672
690
|
--_icon-button-hover-border: var(--ui-success-subtle-text);
|
|
@@ -689,6 +707,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
689
707
|
--_tone-highlight: var(--ui-warning-highlight, none);
|
|
690
708
|
--_tone-hover-highlight: var(--ui-warning-hover-highlight, none);
|
|
691
709
|
--_tone-outline-border: var(--ui-warning-outline-border, var(--ui-warning-subtle-text));
|
|
710
|
+
--_tone-wash: var(--ui-warning-wash);
|
|
711
|
+
--_tone-wash-hover: var(--ui-warning-wash-hover);
|
|
712
|
+
--_tone-ghost-hover: var(--ui-warning-ghost-hover);
|
|
692
713
|
--_tone-glow: var(--ui-warning-glow, 0 0 transparent);
|
|
693
714
|
--_icon-button-border: var(--ui-warning-subtle-text);
|
|
694
715
|
--_icon-button-hover-border: var(--ui-warning-subtle-text);
|
|
@@ -711,6 +732,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
711
732
|
--_tone-highlight: var(--ui-info-highlight, none);
|
|
712
733
|
--_tone-hover-highlight: var(--ui-info-hover-highlight, none);
|
|
713
734
|
--_tone-outline-border: var(--ui-info-outline-border, var(--ui-info-subtle-text));
|
|
735
|
+
--_tone-wash: var(--ui-info-wash);
|
|
736
|
+
--_tone-wash-hover: var(--ui-info-wash-hover);
|
|
737
|
+
--_tone-ghost-hover: var(--ui-info-ghost-hover);
|
|
714
738
|
--_tone-glow: var(--ui-info-glow, 0 0 transparent);
|
|
715
739
|
--_icon-button-border: var(--ui-info-subtle-text);
|
|
716
740
|
--_icon-button-hover-border: var(--ui-info-subtle-text);
|
|
@@ -731,8 +755,9 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
731
755
|
--_solid-active-border: var(--ui-control-border-hover, var(--ui-neutral-active));
|
|
732
756
|
--_solid-active-surface: var(--ui-neutral-active, var(--ui-neutral-hover));
|
|
733
757
|
--_tone-highlight: var(--ui-neutral-highlight, none);
|
|
734
|
-
--_tone-hover-highlight: var(--ui-neutral-highlight, var(--_tone-highlight));
|
|
758
|
+
--_tone-hover-highlight: var(--ui-neutral-hover-highlight, var(--_tone-highlight));
|
|
735
759
|
--_tone-outline-border: var(--ui-control-border);
|
|
760
|
+
--_tone-ghost-hover: var(--ui-neutral-ghost-hover);
|
|
736
761
|
--_tone-glow: var(--ui-neutral-glow, 0 0 transparent);
|
|
737
762
|
--_icon-button-outline-surface: transparent;
|
|
738
763
|
--_icon-button-border: var(--ui-control-border);
|
|
@@ -931,20 +956,14 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
931
956
|
}
|
|
932
957
|
|
|
933
958
|
:global(:scope:hover:enabled:not([aria-disabled="true"]):where([data-hn-ui-icon-button])) {
|
|
934
|
-
/*
|
|
935
|
-
background-color: var(
|
|
936
|
-
--ui-icon-button-hover-surface,
|
|
937
|
-
color-mix(in srgb, currentColor 8%, transparent)
|
|
938
|
-
);
|
|
959
|
+
/* Shared translucent paint keeps text and icon action feedback coordinated. */
|
|
960
|
+
background-color: var(--ui-icon-button-hover-surface, var(--_tone-ghost-hover));
|
|
939
961
|
color: var(--ui-icon-button-hover-text, var(--_icon-button-text, var(--ui-text-primary)));
|
|
940
962
|
}
|
|
941
963
|
|
|
942
964
|
:global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):where([data-hn-ui-icon-button])) {
|
|
943
965
|
--_outline-highlight: var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
944
|
-
--_outline-wash:
|
|
945
|
-
from var(--_icon-button-solid-surface, var(--ui-accent))
|
|
946
|
-
l c h / calc(8% * var(--ui-tonal-opacity, 1))
|
|
947
|
-
);
|
|
966
|
+
--_outline-wash: var(--_tone-wash);
|
|
948
967
|
border-color: var(--ui-icon-button-border, var(--_tone-outline-border));
|
|
949
968
|
background-color: var(--ui-icon-button-outline-surface, transparent);
|
|
950
969
|
background-image:
|
|
@@ -953,14 +972,7 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
953
972
|
}
|
|
954
973
|
|
|
955
974
|
:global(:scope[data-appearance="outline"]:not([data-tone="neutral"]):hover:enabled:not([aria-disabled="true"]):where([data-hn-ui-icon-button])) {
|
|
956
|
-
--_outline-
|
|
957
|
-
--ui-neutral-highlight,
|
|
958
|
-
var(--ui-surface-highlight, linear-gradient(transparent, transparent))
|
|
959
|
-
);
|
|
960
|
-
--_outline-wash: oklch(
|
|
961
|
-
from var(--_icon-button-solid-surface, var(--ui-accent))
|
|
962
|
-
l c h / calc(12% * var(--ui-tonal-opacity, 1))
|
|
963
|
-
);
|
|
975
|
+
--_outline-wash: var(--_tone-wash-hover);
|
|
964
976
|
background-color: var(--ui-icon-button-hover-surface, transparent);
|
|
965
977
|
border-color: var(--ui-icon-button-hover-border, var(--_tone-outline-border));
|
|
966
978
|
}
|
|
@@ -972,8 +984,8 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
|
|
|
972
984
|
);
|
|
973
985
|
}
|
|
974
986
|
:global(:scope[data-tone="neutral"][data-appearance="outline"]:hover:enabled:not([aria-disabled="true"]):where([data-hn-ui-icon-button])) {
|
|
975
|
-
background-color: var(--ui-icon-button-hover-surface,
|
|
976
|
-
--_outline-wash:
|
|
987
|
+
background-color: var(--ui-icon-button-hover-surface, transparent);
|
|
988
|
+
--_outline-wash: var(--ui-neutral-wash-hover);
|
|
977
989
|
background-image:
|
|
978
990
|
linear-gradient(var(--_outline-wash), var(--_outline-wash)),
|
|
979
991
|
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
package/vue/UiRadio.vue
CHANGED
|
@@ -376,7 +376,7 @@ useComponentHost(() => import('../components/ui-radio/ui-radio.js'), {
|
|
|
376
376
|
|
|
377
377
|
:global(input:checked:where([data-hn-ui-radio])) {
|
|
378
378
|
background-color: var(--ui-accent-solid);
|
|
379
|
-
background-image:
|
|
379
|
+
background-image: none;
|
|
380
380
|
border-color: var(--ui-accent-solid);
|
|
381
381
|
box-shadow: none;
|
|
382
382
|
}
|
|
@@ -385,6 +385,29 @@ useComponentHost(() => import('../components/ui-radio/ui-radio.js'), {
|
|
|
385
385
|
opacity: 1;
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
+
@media (hover: hover) and (forced-colors: none) {
|
|
389
|
+
:global(:scope:hover input:enabled:where([data-hn-ui-radio])) {
|
|
390
|
+
--_choice-hover-wash: var(--ui-neutral-wash-hover);
|
|
391
|
+
background-image:
|
|
392
|
+
linear-gradient(var(--_choice-hover-wash), var(--_choice-hover-wash)),
|
|
393
|
+
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
:global(:scope:hover input:enabled:not([aria-invalid="true"]):where([data-hn-ui-radio])) {
|
|
397
|
+
border-color: var(--ui-control-border-hover, var(--ui-border-strong));
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
:global(:scope:hover input:enabled:checked:where([data-hn-ui-radio])) {
|
|
401
|
+
background-color: var(--ui-choice-hover-surface);
|
|
402
|
+
background-image: none;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
:global(:scope:hover
|
|
406
|
+
input:enabled:checked:not([aria-invalid="true"]):where([data-hn-ui-radio])) {
|
|
407
|
+
border-color: var(--ui-choice-hover-surface);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
388
411
|
:global(input:focus-visible:where([data-hn-ui-radio])) {
|
|
389
412
|
outline: var(--ui-focus-width) solid var(--ui-focus-ring, var(--ui-accent-solid));
|
|
390
413
|
outline-offset: var(--ui-focus-width);
|
package/vue/UiSwitch.vue
CHANGED
|
@@ -398,6 +398,29 @@ useComponentHost(() => import('../components/ui-switch/ui-switch.js'), {
|
|
|
398
398
|
background-image: var(--ui-knob-on-accent-highlight, none);
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
+
@media (hover: hover) and (forced-colors: none) {
|
|
402
|
+
:global(:scope:hover input:enabled:where([data-hn-ui-switch])) {
|
|
403
|
+
--_choice-hover-wash: var(--ui-neutral-wash-hover);
|
|
404
|
+
background-image:
|
|
405
|
+
linear-gradient(var(--_choice-hover-wash), var(--_choice-hover-wash)),
|
|
406
|
+
var(--ui-surface-highlight, linear-gradient(transparent, transparent));
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
:global(:scope:hover input:enabled:not([aria-invalid="true"]):where([data-hn-ui-switch])) {
|
|
410
|
+
border-color: var(--ui-control-border-hover, var(--ui-border-strong));
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
:global(:scope:hover input:enabled:checked:where([data-hn-ui-switch])) {
|
|
414
|
+
background-color: var(--ui-choice-hover-surface);
|
|
415
|
+
background-image: var(--ui-choice-hover-highlight, none);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
:global(:scope:hover
|
|
419
|
+
input:enabled:checked:not([aria-invalid="true"]):where([data-hn-ui-switch])) {
|
|
420
|
+
border-color: var(--ui-choice-hover-surface);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
401
424
|
:global(input:focus-visible:where([data-hn-ui-switch])) {
|
|
402
425
|
outline: var(--ui-focus-width) solid var(--ui-focus-ring, var(--ui-accent-solid));
|
|
403
426
|
outline-offset: var(--ui-focus-width);
|
package/vue/chunks/UiButton.js
CHANGED
package/vue/chunks/UiCheckbox.js
CHANGED
package/vue/chunks/UiRadio.js
CHANGED
package/vue/chunks/UiSwitch.js
CHANGED