@mkbabb/glass-ui 3.5.1 → 3.6.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/{DataTable-DyKc_26a.js → DataTable-BGVXx0Ww.js} +1 -1
- package/dist/{NumberFieldContent-jO-zGOHf.js → NumberFieldContent-Bhhmk95p.js} +1 -1
- package/dist/animated-digit.js +1 -1
- package/dist/api/index.d.ts +2 -1
- package/dist/api.js +1 -1
- package/dist/aurora.js +259 -81
- package/dist/{button-i8Ek5vvg.js → button-BcMzVrqs.js} +2 -2
- package/dist/button.js +1 -1
- package/dist/carousel.js +1 -1
- package/dist/color.js +1 -1
- package/dist/components/custom/aurora/composables/color.d.ts +35 -2
- package/dist/components/custom/aurora/composables/glSetup.d.ts +1 -1
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +6 -0
- package/dist/components/custom/aurora/constants/presets.d.ts +9 -0
- package/dist/components/custom/aurora/constants/shaders/composition.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/index.d.ts +3 -2
- package/dist/components/custom/constellation/Constellation.vue.d.ts +45 -0
- package/dist/components/custom/constellation/constellationField.d.ts +85 -0
- package/dist/components/custom/constellation/index.d.ts +3 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +34 -3
- package/dist/composables/glass/canvas2d/index.d.ts +2 -0
- package/dist/composables/glass/canvas2d/useCanvas2D.d.ts +48 -0
- package/dist/composables/glass/index.d.ts +2 -0
- package/dist/confirm-dialog.js +1 -1
- package/dist/constellation.d.ts +1 -0
- package/dist/constellation.js +182 -0
- package/dist/controls.js +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/dock.js +121 -102
- package/dist/expandable-container.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +79 -78
- package/dist/goo-blob.js +3 -3
- package/dist/icon-tooltip.js +1 -1
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +2 -2
- package/dist/motion-core.js +3 -3
- package/dist/motion.js +2 -2
- package/dist/number-field.js +1 -1
- package/dist/responsive-tabs.js +1 -1
- package/dist/search.js +1 -1
- package/dist/sortable-list.js +1 -1
- package/dist/styles/dock.css +185 -1
- package/dist/styles/glass-refract.css +60 -0
- package/dist/styles/glass-specular-track.css +43 -130
- package/dist/styles/glass.css +243 -27
- package/dist/styles/index.css +1 -0
- package/dist/styles/theme.css +6 -0
- package/dist/styles/tokens.css +33 -0
- package/dist/tabs.js +2 -2
- package/dist/{useAnimatedNumber-BF6r64lA.js → useAnimatedNumber-DfVgP4te.js} +1 -1
- package/dist/useCanvas2D-BeNJqqIS.js +95 -0
- package/dist/watercolor-dot.js +1 -1
- package/package.json +21 -1
- package/src/styles/dock.css +185 -1
- package/src/styles/glass-refract.css +60 -0
- package/src/styles/glass-specular-track.css +43 -130
- package/src/styles/glass.css +243 -27
- package/src/styles/index.css +1 -0
- package/src/styles/theme.css +6 -0
- package/src/styles/tokens.css +33 -0
- /package/dist/{IconTooltip-BTyYn4mr.js → IconTooltip-DZlCkU-0.js} +0 -0
- /package/dist/{Input-CU9CNKmo.js → Input-CRJ2owjN.js} +0 -0
- /package/dist/{UnderlineTabs-Cq_AD03t.js → UnderlineTabs-CuIK16JI.js} +0 -0
- /package/dist/{color-rkK4RMx2.js → color-DS-iLRVM.js} +0 -0
- /package/dist/{compile-DVgAxagk.js → compile-C62K_FpC.js} +0 -0
- /package/dist/{constants-DsCdlK9I.js → constants-C8NMonuo.js} +0 -0
- /package/dist/{presets-1OhFpaIC.js → presets-Dyv9Zl7W.js} +0 -0
- /package/dist/{prng-Bz_1Tydc.js → prng-CjVgzjQT.js} +0 -0
- /package/dist/{useGlobalDark-CWiaCoEw.js → useGlobalDark-D7R9OypB.js} +0 -0
- /package/dist/{useIntersectionPause-DAdVPVp4.js → useIntersectionPause-DsQYGc8V.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BQfnAHHW.js → useKeyboardShortcuts-i8tHd5WO.js} +0 -0
- /package/dist/{useSortable-DnyGXKKY.js → useSortable-muI29agz.js} +0 -0
- /package/dist/{useViewTransition-CJnqg6wl.js → useViewTransition-DI0Rs2rV.js} +0 -0
package/src/styles/glass.css
CHANGED
|
@@ -29,6 +29,150 @@
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
@layer components {
|
|
32
|
+
/* ── The unified glass material (AW.W22) ──────────────────────────────
|
|
33
|
+
ONE source for the three material atoms that AV.W15 scattered onto
|
|
34
|
+
opt-in classes + single tiers:
|
|
35
|
+
(a) the moving-specular `::before` catch-light (folded here from
|
|
36
|
+
glass-specular-track.css — that file now keeps only the thin
|
|
37
|
+
`.glass-specular-track` ALIAS + the brackets that point HERE),
|
|
38
|
+
(b) the `--glass-edge-light` full-perimeter rim (moved off the
|
|
39
|
+
floating-only block so EVERY rung carries it),
|
|
40
|
+
(c) the pointer interaction-light hooks (the `--specular-*`
|
|
41
|
+
`@property` channel mapped from the consumer's --mouse-x/--mouse-y
|
|
42
|
+
write).
|
|
43
|
+
The five ladder rungs + `.glass-card` + the `.dock-icon-button` CONTROL
|
|
44
|
+
compose `.glass-material`, so a Switch thumb, a glass Button, a Dialog,
|
|
45
|
+
and a Sheet all read as the SAME material without per-component wiring.
|
|
46
|
+
|
|
47
|
+
The `.glass-dock` SHELL is OUT of this group BY DESIGN — it hand-rolls a
|
|
48
|
+
parallel surface (its own `--glass-*-dock` family + a local rim + an
|
|
49
|
+
instrument-strip `::before`) the dock arm owns; the dock's catch-light
|
|
50
|
+
lives on its CONTROL (`.dock-icon-button`, listed below), not the shell.
|
|
51
|
+
|
|
52
|
+
The selector GROUP is the single source. Adding a surface to the band
|
|
53
|
+
material is one comma-entry here, not a new opt-in class string. */
|
|
54
|
+
.glass-material,
|
|
55
|
+
.glass-wash,
|
|
56
|
+
.glass-quiet,
|
|
57
|
+
.glass-resting,
|
|
58
|
+
.glass-floating,
|
|
59
|
+
.glass-overlay,
|
|
60
|
+
.glass-card,
|
|
61
|
+
.glass-specular-track,
|
|
62
|
+
.dock-icon-button {
|
|
63
|
+
position: relative;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* (b) The rim — UNIFORM across all rungs (ONE `--glass-edge-light` token,
|
|
67
|
+
not a per-rung family). The floating/overlay tiers previously wired it
|
|
68
|
+
into their box-shadow stack; it now rides the material group as a
|
|
69
|
+
dedicated `::after` inset ring so it composes alongside (not inside) each
|
|
70
|
+
tier's own shadow recipe. The `::after` grain overlay already claims the
|
|
71
|
+
five rungs' `::after`; the rim is folded INTO that same overlay's
|
|
72
|
+
box-shadow below (the grain `::after` gets the rim inset ring) so no
|
|
73
|
+
pseudo-element collides. */
|
|
74
|
+
|
|
75
|
+
/* (a)+(c) The moving-specular `::before` catch-light — the iOS-26
|
|
76
|
+
illuminate-from-within behaviour. A masked radial-gradient glow rides the
|
|
77
|
+
surface at the pointer position (--mouse-x/--mouse-y → the typed
|
|
78
|
+
--specular-* channel). Folded VERBATIM from glass-specular-track.css so
|
|
79
|
+
there is exactly ONE specular source. */
|
|
80
|
+
.glass-material::before,
|
|
81
|
+
.glass-wash::before,
|
|
82
|
+
.glass-quiet::before,
|
|
83
|
+
.glass-resting::before,
|
|
84
|
+
.glass-floating::before,
|
|
85
|
+
.glass-overlay::before,
|
|
86
|
+
.glass-card::before,
|
|
87
|
+
.glass-specular-track::before,
|
|
88
|
+
.dock-icon-button::before {
|
|
89
|
+
content: "";
|
|
90
|
+
position: absolute;
|
|
91
|
+
inset: 0;
|
|
92
|
+
border-radius: inherit;
|
|
93
|
+
pointer-events: none;
|
|
94
|
+
z-index: 1;
|
|
95
|
+
/* Map the consumer's pointer write onto the typed properties, ON THE
|
|
96
|
+
PSEUDO. The `--mouse-x/--mouse-y` write lands on the HOST (inline
|
|
97
|
+
style) as UNREGISTERED props that inherit down to this `::before`;
|
|
98
|
+
the registered `--specular-*` props are `inherits: false`, so the
|
|
99
|
+
mapping is declared HERE where the pseudo owns its typed value. The
|
|
100
|
+
`var(--mouse-x, 50%)` floor is the centred fallback. */
|
|
101
|
+
--specular-x: var(--mouse-x, 50%);
|
|
102
|
+
--specular-y: var(--mouse-y, 50%);
|
|
103
|
+
/* The catch-light intensity floor at rest; hover/active lift it (the
|
|
104
|
+
interaction-light state machine below). */
|
|
105
|
+
--specular-intensity: 0.35;
|
|
106
|
+
/* The travelling catch-light — a soft warm-white circular glow centred
|
|
107
|
+
on the tracked pointer position (NOT iOS blue; keeps the warm-cream
|
|
108
|
+
identity). The `--specular-intensity` multiplier drives the layer
|
|
109
|
+
`opacity`, not a per-stop alpha (a registered-`@property` var() nested
|
|
110
|
+
in an hsl() alpha computes to 0 in Chromium). */
|
|
111
|
+
background: radial-gradient(
|
|
112
|
+
circle at var(--specular-x, 50%) var(--specular-y, 50%),
|
|
113
|
+
hsl(40 30% 100% / 0.55) 0%,
|
|
114
|
+
hsl(40 30% 100% / 0.22) 22%,
|
|
115
|
+
transparent 55%
|
|
116
|
+
);
|
|
117
|
+
opacity: var(--specular-intensity, 0.35);
|
|
118
|
+
/* Clip the glow to the plate so it rides the surface. `mask-image`
|
|
119
|
+
Baseline 2023-12-07; a non-supporting engine ignores it and the
|
|
120
|
+
`inset: 0` + radius-inherit already bound the glow. */
|
|
121
|
+
mask-image: radial-gradient(
|
|
122
|
+
circle at var(--specular-x, 50%) var(--specular-y, 50%),
|
|
123
|
+
black 0%,
|
|
124
|
+
black 55%,
|
|
125
|
+
transparent 75%
|
|
126
|
+
);
|
|
127
|
+
mix-blend-mode: screen;
|
|
128
|
+
/* Smooth the position + intensity between pointer samples (the typed
|
|
129
|
+
@property regs make the percentage stops interpolable). */
|
|
130
|
+
transition:
|
|
131
|
+
--specular-x var(--duration-fast, 150ms) var(--ease-standard, ease-out),
|
|
132
|
+
--specular-y var(--duration-fast, 150ms) var(--ease-standard, ease-out),
|
|
133
|
+
opacity var(--duration-normal, 240ms) var(--ease-standard, ease-out);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.dark .glass-material::before,
|
|
137
|
+
.dark .glass-wash::before,
|
|
138
|
+
.dark .glass-quiet::before,
|
|
139
|
+
.dark .glass-resting::before,
|
|
140
|
+
.dark .glass-floating::before,
|
|
141
|
+
.dark .glass-overlay::before,
|
|
142
|
+
.dark .glass-card::before,
|
|
143
|
+
.dark .glass-specular-track::before,
|
|
144
|
+
.dark .dock-icon-button::before {
|
|
145
|
+
/* Softer over the deep canvas — the screen blend lifts harder on dark. */
|
|
146
|
+
--specular-intensity: 0.22;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* (c) Interaction-light lockstep — hover/active lift the intensity in the
|
|
150
|
+
SAME rungs the scale-press squish keys off, so material-light fires in
|
|
151
|
+
lockstep with the press across every glass surface. Settles back on leave
|
|
152
|
+
via the opacity transition above. */
|
|
153
|
+
.glass-material:hover::before,
|
|
154
|
+
.glass-wash:hover::before,
|
|
155
|
+
.glass-quiet:hover::before,
|
|
156
|
+
.glass-resting:hover::before,
|
|
157
|
+
.glass-floating:hover::before,
|
|
158
|
+
.glass-overlay:hover::before,
|
|
159
|
+
.glass-card:hover::before,
|
|
160
|
+
.glass-specular-track:hover::before,
|
|
161
|
+
.dock-icon-button:hover::before {
|
|
162
|
+
--specular-intensity: 0.6;
|
|
163
|
+
}
|
|
164
|
+
.glass-material:active::before,
|
|
165
|
+
.glass-wash:active::before,
|
|
166
|
+
.glass-quiet:active::before,
|
|
167
|
+
.glass-resting:active::before,
|
|
168
|
+
.glass-floating:active::before,
|
|
169
|
+
.glass-overlay:active::before,
|
|
170
|
+
.glass-card:active::before,
|
|
171
|
+
.glass-specular-track:active::before,
|
|
172
|
+
.dock-icon-button:active::before {
|
|
173
|
+
--specular-intensity: 0.85;
|
|
174
|
+
}
|
|
175
|
+
|
|
32
176
|
/* ── Five-tier surface ladder (v0.8.0; visual only, no geometry) ──
|
|
33
177
|
Tier semantics, alpha-monotonic per R3-spec §A:
|
|
34
178
|
wash ~0.30α + light blur (was `subtle`)
|
|
@@ -45,12 +189,19 @@
|
|
|
45
189
|
which modern Chromium then dropped from the CSSOM (the prefixed
|
|
46
190
|
alias is parser-rejected post-Chrome 113). Single-source-of-truth
|
|
47
191
|
authorship lets the build pipeline deliver the right matrix. */
|
|
192
|
+
/* AW.W23 — every rung's background composes the adaptive-tint recipe
|
|
193
|
+
(`color-mix(in oklab, <rung bg>, var(--glass-tint-source) var(--glass-tint-
|
|
194
|
+
strength))`). With the default `--glass-tint-strength: 0%` the mix is a
|
|
195
|
+
no-op = byte-identical to the un-tinted rung; a consumer biases the surface
|
|
196
|
+
toward a sampled backdrop hue by setting `--glass-tint-source` + a
|
|
197
|
+
strength ≤30%. oklab is the mwg-preferred tint space (NEVER an
|
|
198
|
+
`oklch(from …)` lightness-shift — browsers don't gamut-map yet). */
|
|
48
199
|
.glass-wash {
|
|
49
200
|
position: relative;
|
|
50
|
-
background: var(--glass-bg-wash);
|
|
201
|
+
background: color-mix(in oklab, var(--glass-bg-wash), var(--glass-tint-source) var(--glass-tint-strength));
|
|
51
202
|
backdrop-filter: var(--glass-blur-wash);
|
|
52
203
|
border: 1px solid var(--glass-border-wash);
|
|
53
|
-
box-shadow: var(--glass-shadow-wash);
|
|
204
|
+
box-shadow: var(--glass-material-rim), var(--glass-shadow-wash);
|
|
54
205
|
}
|
|
55
206
|
|
|
56
207
|
/* AL-W10 SLIM under-shadow wiring (tokens.css §AL-W10 SLIM —
|
|
@@ -67,42 +218,48 @@
|
|
|
67
218
|
Spine tier wires its own rung at instrument-chassis.css. */
|
|
68
219
|
.glass-quiet {
|
|
69
220
|
position: relative;
|
|
70
|
-
background: var(--glass-bg-quiet);
|
|
221
|
+
background: color-mix(in oklab, var(--glass-bg-quiet), var(--glass-tint-source) var(--glass-tint-strength));
|
|
71
222
|
backdrop-filter: var(--glass-blur-quiet);
|
|
72
223
|
border: 1px solid var(--glass-border-quiet);
|
|
73
|
-
box-shadow:
|
|
224
|
+
box-shadow:
|
|
225
|
+
var(--glass-material-rim),
|
|
226
|
+
var(--glass-under-shadow-quiet),
|
|
227
|
+
var(--glass-shadow-quiet);
|
|
74
228
|
}
|
|
75
229
|
|
|
76
230
|
.glass-resting {
|
|
77
231
|
position: relative;
|
|
78
|
-
background: var(--glass-bg-resting);
|
|
232
|
+
background: color-mix(in oklab, var(--glass-bg-resting), var(--glass-tint-source) var(--glass-tint-strength));
|
|
79
233
|
backdrop-filter: var(--glass-blur-resting);
|
|
80
234
|
border: 1px solid var(--glass-border-resting);
|
|
81
|
-
box-shadow:
|
|
235
|
+
box-shadow:
|
|
236
|
+
var(--glass-material-rim),
|
|
237
|
+
var(--glass-under-shadow-default),
|
|
238
|
+
var(--glass-shadow-resting);
|
|
82
239
|
}
|
|
83
240
|
|
|
84
|
-
/* AV.W15 M3 — the floating tier
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
so it composes with the under-shadow floor
|
|
241
|
+
/* AV.W15 M3 / AW.W22 — the floating tier carries the full-perimeter rim (the
|
|
242
|
+
catch-light that "defines the silhouette", WWDC25 sess. 219). The rim now
|
|
243
|
+
comes from the unified `--glass-material-rim` (= `--glass-edge-light`) so
|
|
244
|
+
it shares ONE source with the rest of the ladder; it rides INSIDE the
|
|
245
|
+
box-shadow stack so it composes with the under-shadow floor + the lift. */
|
|
89
246
|
.glass-floating {
|
|
90
247
|
position: relative;
|
|
91
|
-
background: var(--glass-bg-floating);
|
|
248
|
+
background: color-mix(in oklab, var(--glass-bg-floating), var(--glass-tint-source) var(--glass-tint-strength));
|
|
92
249
|
backdrop-filter: var(--glass-blur-floating);
|
|
93
250
|
border: 1px solid var(--glass-border-floating);
|
|
94
251
|
box-shadow:
|
|
95
|
-
var(--glass-
|
|
252
|
+
var(--glass-material-rim),
|
|
96
253
|
var(--glass-under-shadow-vivid),
|
|
97
254
|
var(--glass-shadow-floating);
|
|
98
255
|
}
|
|
99
256
|
|
|
100
257
|
.glass-overlay {
|
|
101
258
|
position: relative;
|
|
102
|
-
background: var(--glass-bg-overlay);
|
|
259
|
+
background: color-mix(in oklab, var(--glass-bg-overlay), var(--glass-tint-source) var(--glass-tint-strength));
|
|
103
260
|
backdrop-filter: var(--glass-blur-overlay);
|
|
104
261
|
border: 1px solid var(--glass-border-overlay);
|
|
105
|
-
box-shadow: var(--glass-shadow-overlay);
|
|
262
|
+
box-shadow: var(--glass-material-rim), var(--glass-shadow-overlay);
|
|
106
263
|
}
|
|
107
264
|
|
|
108
265
|
/* ── Content-aware under-shadow modifier (AV.W15 M4) ──────────────
|
|
@@ -136,7 +293,7 @@
|
|
|
136
293
|
}
|
|
137
294
|
.glass-floating[data-over-content="solid"] {
|
|
138
295
|
box-shadow:
|
|
139
|
-
var(--glass-
|
|
296
|
+
var(--glass-material-rim),
|
|
140
297
|
var(--glass-under-shadow-default),
|
|
141
298
|
var(--glass-shadow-floating);
|
|
142
299
|
}
|
|
@@ -159,6 +316,28 @@
|
|
|
159
316
|
mix-blend-mode: overlay;
|
|
160
317
|
}
|
|
161
318
|
|
|
319
|
+
/* (b) The unified rim — `--glass-edge-light` full-perimeter inset ring on
|
|
320
|
+
EVERY material surface (AW.W22). Previously the rim was wired only into
|
|
321
|
+
the floating/overlay tiers' box-shadow stack; promoting it to the material
|
|
322
|
+
group makes wash/quiet/resting/card/dock-control all carry the same
|
|
323
|
+
silhouette catch-light from ONE token. The rim is its OWN `box-shadow`
|
|
324
|
+
declaration on the material group so it composes uniformly without
|
|
325
|
+
perturbing each tier's elevation recipe (the floating/overlay tiers drop
|
|
326
|
+
their now-redundant inline `--glass-edge-light` layer below). The alpha is
|
|
327
|
+
deliberately low so the rim never eats AA legibility over a busy
|
|
328
|
+
backdrop. */
|
|
329
|
+
.glass-material,
|
|
330
|
+
.glass-wash,
|
|
331
|
+
.glass-quiet,
|
|
332
|
+
.glass-resting,
|
|
333
|
+
.glass-floating,
|
|
334
|
+
.glass-overlay,
|
|
335
|
+
.glass-card,
|
|
336
|
+
.glass-specular-track,
|
|
337
|
+
.dock-icon-button {
|
|
338
|
+
--glass-material-rim: var(--glass-edge-light);
|
|
339
|
+
}
|
|
340
|
+
|
|
162
341
|
.dark .glass-wash::after,
|
|
163
342
|
.dark .glass-quiet::after,
|
|
164
343
|
.dark .glass-resting::after,
|
|
@@ -179,11 +358,11 @@
|
|
|
179
358
|
--card-focus-shadow: var(--shadow-card);
|
|
180
359
|
--card-focus-border: var(--glass-border-quiet);
|
|
181
360
|
position: relative;
|
|
182
|
-
background: var(--glass-bg-quiet);
|
|
361
|
+
background: color-mix(in oklab, var(--glass-bg-quiet), var(--glass-tint-source) var(--glass-tint-strength));
|
|
183
362
|
backdrop-filter: var(--glass-blur-quiet);
|
|
184
363
|
border: 1px solid var(--card-focus-border);
|
|
185
364
|
border-radius: var(--radius-card);
|
|
186
|
-
box-shadow: var(--card-focus-shadow);
|
|
365
|
+
box-shadow: var(--glass-material-rim), var(--card-focus-shadow);
|
|
187
366
|
contain: layout style;
|
|
188
367
|
transition:
|
|
189
368
|
box-shadow var(--duration-fast) var(--ease-standard),
|
|
@@ -322,16 +501,22 @@
|
|
|
322
501
|
}
|
|
323
502
|
|
|
324
503
|
/* AQ.W4 §W4.1 — validity vocabulary on `.input-pill` (Input + Textarea).
|
|
325
|
-
The forgiving `:where(:user-invalid, .user-invalid-fallback
|
|
326
|
-
ONE rule covering
|
|
327
|
-
|
|
328
|
-
without `:user-invalid`
|
|
329
|
-
|
|
504
|
+
The forgiving `:where(:user-invalid, .user-invalid-fallback,
|
|
505
|
+
[aria-invalid="true"])` group is ONE rule covering THREE trigger surfaces:
|
|
506
|
+
native constraint-validation (`:user-invalid`), the `useUserInvalidAria`
|
|
507
|
+
fallback class for engines without `:user-invalid` (css §3.2; NOT a
|
|
508
|
+
live+dead alias — the class is the SOLE fallback), AND (AW.W18) the
|
|
509
|
+
imperative `[aria-invalid="true"]` attribute. The `[aria-invalid]` arm
|
|
510
|
+
serves APP-DRIVEN validity — a custom key match, an async server check —
|
|
511
|
+
where there is no native constraint to trip `:user-invalid`, so the app
|
|
512
|
+
sets the ARIA attribute and the library's own ring paints with no
|
|
513
|
+
`:deep()` re-paint at the consumer. The destructive/success tints reuse
|
|
514
|
+
the semantic tokens via `color-mix` per the house pattern (W2). Non-color
|
|
330
515
|
reinforcement is the error TEXT (W4.5 `error` slot) + the `required`
|
|
331
516
|
asterisk — the border/bg shift is the supplementary cue, never the sole
|
|
332
517
|
one. `:user-valid` is intentionally subtle (border only, no bg fill) so
|
|
333
518
|
a long valid form is not a wall of green. */
|
|
334
|
-
.input-pill:where(:user-invalid, .user-invalid-fallback) {
|
|
519
|
+
.input-pill:where(:user-invalid, .user-invalid-fallback, [aria-invalid="true"]) {
|
|
335
520
|
border-color: var(--destructive);
|
|
336
521
|
background: color-mix(in srgb, var(--destructive) 8%, var(--glass-bg-quiet));
|
|
337
522
|
}
|
|
@@ -339,9 +524,10 @@
|
|
|
339
524
|
border-color: var(--success);
|
|
340
525
|
}
|
|
341
526
|
/* Invalid + keyboard-focused → destructive ring (overrides the accent
|
|
342
|
-
`:focus-visible` ring above by order + the extra
|
|
343
|
-
|
|
344
|
-
|
|
527
|
+
`:focus-visible` ring above by order + the extra invalid compound). The
|
|
528
|
+
`[aria-invalid]` arm rides the same widened group so an app-driven
|
|
529
|
+
invalid field shows the destructive ring on focus too. */
|
|
530
|
+
.input-pill:where(:user-invalid, .user-invalid-fallback, [aria-invalid="true"]):focus-visible {
|
|
345
531
|
border-color: var(--destructive);
|
|
346
532
|
box-shadow: 0 0 0 var(--focus-ring-width)
|
|
347
533
|
color-mix(in srgb, var(--destructive) 35%, transparent);
|
|
@@ -404,6 +590,36 @@
|
|
|
404
590
|
var(--progress-rail-glow-x, 4px) 0 var(--progress-rail-glow-blur, 8px)
|
|
405
591
|
color-mix(in srgb, var(--progress-rail-fill, var(--primary)) var(--progress-rail-glow-strength, 55%), transparent);
|
|
406
592
|
}
|
|
593
|
+
|
|
594
|
+
/* ── AW.W23 — chromatic edge dispersion (the polished-glass rim fringe) ──
|
|
595
|
+
An opt-in `.glass-chromatic` composes the warm/cool oklab fringe OVER the
|
|
596
|
+
W22 uniform rim (it does NOT replace it — the rim still rides each rung's
|
|
597
|
+
box-shadow). The fringe is a transparency garnish, so it composes ONLY
|
|
598
|
+
under `prefers-reduced-transparency: no-preference` and drops under
|
|
599
|
+
`reduce` (handled by the bracket below). The fringe lands as a dedicated
|
|
600
|
+
inset box-shadow pair on the material surface so it adds onto the rim. */
|
|
601
|
+
@media (prefers-reduced-transparency: no-preference) {
|
|
602
|
+
.glass-chromatic {
|
|
603
|
+
box-shadow: var(--glass-edge-dispersion), var(--glass-material-rim);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/* ── AW.W23 — corner-shape: squircle PE (Chrome 139+) ───────────────────────
|
|
609
|
+
The literal iOS-26 superellipse corner geometry that `backdrop-filter`,
|
|
610
|
+
borders, and shadows follow. `@supports (corner-shape: squircle)`-gated over
|
|
611
|
+
the un-gated `border-radius` round, which stays the fallback at zero cost on
|
|
612
|
+
every other engine (Safari/Firefox). The `corner-shape` decl sits ONLY inside
|
|
613
|
+
the `@supports` block — a leak onto the un-gated base would break the round
|
|
614
|
+
fallback on a partial-support engine. */
|
|
615
|
+
@supports (corner-shape: squircle) {
|
|
616
|
+
@layer components {
|
|
617
|
+
.glass-card,
|
|
618
|
+
.glass-btn,
|
|
619
|
+
.btn-pill {
|
|
620
|
+
corner-shape: squircle;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
407
623
|
}
|
|
408
624
|
|
|
409
625
|
/* ── Accessibility: reduced transparency ────────── */
|
package/src/styles/index.css
CHANGED
package/src/styles/theme.css
CHANGED
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
--radius-md: 6px;
|
|
33
33
|
--radius-xl: 12px;
|
|
34
34
|
--radius-2xl: 1rem;
|
|
35
|
+
/* AW.W3b — a finite radius rung above --radius-2xl (16px), below
|
|
36
|
+
--radius-pill (the stadium). The big-dock card shell's corner geometry. */
|
|
37
|
+
--radius-3xl: 1.5rem;
|
|
35
38
|
--radius-pill: 9999px;
|
|
36
39
|
|
|
37
40
|
/* Semantic radius aliases — plain @theme (not inline; see header note).
|
|
@@ -46,6 +49,9 @@
|
|
|
46
49
|
--radius-button: var(--radius);
|
|
47
50
|
--radius-badge: var(--radius-pill);
|
|
48
51
|
--radius-dock: var(--radius-pill);
|
|
52
|
+
/* AW.W3b — the big-dock card shell's default (comfortable-density) radius.
|
|
53
|
+
The density-scaled --dock-card-radius (dock.css) resolves through this. */
|
|
54
|
+
--radius-dock-card: var(--radius-3xl);
|
|
49
55
|
--radius-tooltip: var(--radius-lg);
|
|
50
56
|
}
|
|
51
57
|
|
package/src/styles/tokens.css
CHANGED
|
@@ -700,6 +700,32 @@
|
|
|
700
700
|
--glass-edge-light: inset 0 0 0 0.75px hsl(0 0% 100% / 0.18);
|
|
701
701
|
--glass-edge-light-dark: inset 0 0 0 0.75px hsl(0 0% 100% / 0.10);
|
|
702
702
|
|
|
703
|
+
/* AW.W23 — content-aware adaptive tint (the Baseline-2025 "tint informed by
|
|
704
|
+
surrounding content" axis, WWDC25 sess. 219). A surface can tint toward a
|
|
705
|
+
consumer-provided dominant backdrop color via a `color-mix(in oklab, …)`
|
|
706
|
+
recipe (oklab is the mwg-preferred space for tint generation; NEVER a
|
|
707
|
+
lightness-shift in `oklch(from …)` — browsers don't gamut-map yet).
|
|
708
|
+
|
|
709
|
+
DEFAULT is zero delta: `--glass-tint-source` is the warm-white card itself
|
|
710
|
+
and `--glass-tint-strength` is 0%, so the rung background mixes 0% toward
|
|
711
|
+
the source = byte-identical to today. A consumer sets `--glass-tint-source`
|
|
712
|
+
to a sampled aurora hue + a strength ≤30% to bias the surface. Alpha-safe:
|
|
713
|
+
the mix is bounded ≤30% and never re-points the card's own alpha. */
|
|
714
|
+
--glass-tint-source: var(--card);
|
|
715
|
+
--glass-tint-strength: 0%;
|
|
716
|
+
|
|
717
|
+
/* AW.W23 — chromatic edge dispersion (the "polished glass" rim fringe Apple
|
|
718
|
+
shows). A warm fringe on one edge + a cool fringe on the other, low-alpha,
|
|
719
|
+
biased warm-cream/NCSU-red (NOT iOS-blue). Composed OVER the W22 uniform
|
|
720
|
+
rim under `prefers-reduced-transparency: no-preference`; dropped under
|
|
721
|
+
`reduce` (it is a transparency garnish). The two directional inset rings
|
|
722
|
+
read as light refracting through the glass edge. */
|
|
723
|
+
--glass-fringe-warm: oklch(0.92 0.06 40 / 0.22);
|
|
724
|
+
--glass-fringe-cool: oklch(0.90 0.05 230 / 0.16);
|
|
725
|
+
--glass-edge-dispersion:
|
|
726
|
+
inset 0.75px 0 0 0 var(--glass-fringe-warm),
|
|
727
|
+
inset -0.75px 0 0 0 var(--glass-fringe-cool);
|
|
728
|
+
|
|
703
729
|
/* Chassis curvature illusion — a subtle radial gradient at the chassis
|
|
704
730
|
top centre that lifts the surface without committing to literal 3D.
|
|
705
731
|
Composed into <InstrumentChassis>'s background stack. */
|
|
@@ -1586,6 +1612,13 @@
|
|
|
1586
1612
|
`.dark` (mirroring the `--glass-specular` remap above). The lit token
|
|
1587
1613
|
resolves to the `-dark` alpha on the deeper canvas. */
|
|
1588
1614
|
--glass-edge-light: var(--glass-edge-light-dark);
|
|
1615
|
+
|
|
1616
|
+
/* AW.W23 — the chromatic-fringe + adaptive-tint dark arm. The fringe drops
|
|
1617
|
+
to a lower-luminance warm/cool pair on the deep canvas; `--glass-tint-
|
|
1618
|
+
source` auto-flips with `--card` (no override needed — the default already
|
|
1619
|
+
resolves the dark card). */
|
|
1620
|
+
--glass-fringe-warm: oklch(0.78 0.07 40 / 0.18);
|
|
1621
|
+
--glass-fringe-cool: oklch(0.74 0.06 230 / 0.14);
|
|
1589
1622
|
--glass-curvature-overlay: radial-gradient(
|
|
1590
1623
|
ellipse at 50% -20%,
|
|
1591
1624
|
hsl(0 0% 100% / 0.06),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|