@glasshome/ui 1.25.0 → 1.26.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/SPEC.md +2 -0
- package/dist/solid/index.js +1 -1
- package/package.json +1 -1
- package/src/solid/data-table.tsx +1 -1
- package/src/styles/globals.css +32 -9
package/SPEC.md
CHANGED
|
@@ -15,6 +15,8 @@ implementations. Never hand-roll `backdrop-blur` + translucent `bg-*` panels.
|
|
|
15
15
|
.glass neutral pane: card fill, border edge, lit rim, no tint
|
|
16
16
|
.glass-tint + tinted look driven by --glass-tone (badge/alert/button/chip)
|
|
17
17
|
.glass-sink rim flipped concave: the surface reads dug-out (fields)
|
|
18
|
+
.glass-halo the outer glow as its own layer over a sibling surface's box, so it
|
|
19
|
+
lies over neighbouring surfaces; that surface sets --glass-halo: 1
|
|
18
20
|
```
|
|
19
21
|
|
|
20
22
|
Knobs (typed `@property`, `inherits: false` — a knob set on a parent never
|
package/dist/solid/index.js
CHANGED
|
@@ -14037,7 +14037,7 @@ function Px(e) {
|
|
|
14037
14037
|
},
|
|
14038
14038
|
"data-slot": "table-sort-header",
|
|
14039
14039
|
get class() {
|
|
14040
|
-
return O("text-muted-foreground hover:text-foreground h-auto gap-1 px-1.5 py-0.5 text-xs font-medium", e.align === "end"
|
|
14040
|
+
return O("text-muted-foreground hover:text-foreground h-auto gap-1 px-1.5 py-0.5 text-xs font-medium", e.align === "end" ? "justify-end" : "justify-start", e.class);
|
|
14041
14041
|
},
|
|
14042
14042
|
get "aria-label"() {
|
|
14043
14043
|
return `Sort by ${e.label}`;
|
package/package.json
CHANGED
package/src/solid/data-table.tsx
CHANGED
|
@@ -209,7 +209,7 @@ export function TableSortHeader(props: {
|
|
|
209
209
|
data-slot="table-sort-header"
|
|
210
210
|
class={cn(
|
|
211
211
|
"text-muted-foreground hover:text-foreground h-auto gap-1 px-1.5 py-0.5 text-xs font-medium",
|
|
212
|
-
props.align === "end"
|
|
212
|
+
props.align === "end" ? "justify-end" : "justify-start",
|
|
213
213
|
props.class,
|
|
214
214
|
)}
|
|
215
215
|
aria-label={`Sort by ${props.label}`}
|
package/src/styles/globals.css
CHANGED
|
@@ -55,6 +55,12 @@
|
|
|
55
55
|
inherits: false;
|
|
56
56
|
initial-value: 0;
|
|
57
57
|
}
|
|
58
|
+
/* 1 when a .glass-halo beside the surface draws its outer glow instead. */
|
|
59
|
+
@property --glass-halo {
|
|
60
|
+
syntax: "<number>";
|
|
61
|
+
inherits: false;
|
|
62
|
+
initial-value: 0;
|
|
63
|
+
}
|
|
58
64
|
@property --glass-text {
|
|
59
65
|
syntax: "<percentage>";
|
|
60
66
|
inherits: false;
|
|
@@ -320,6 +326,28 @@
|
|
|
320
326
|
}
|
|
321
327
|
}
|
|
322
328
|
|
|
329
|
+
:where(.glass, .glass-halo) {
|
|
330
|
+
/* The surface's own hue, opaque: its tone when it has one, the accent otherwise
|
|
331
|
+
* (a transparent tone mixes to the accent at low alpha; the /1 restores it). */
|
|
332
|
+
--material-hue: oklch(
|
|
333
|
+
from color-mix(in srgb, var(--glass-tone) 99%, var(--material-accent)) l c h / 1
|
|
334
|
+
);
|
|
335
|
+
/* Glow scales with --glass-lift, the knob that already says how big a surface
|
|
336
|
+
* floats: a card (0.45) takes the full bloom, a chip or button (0) about a third. */
|
|
337
|
+
--material-reach: calc(0.35 + var(--glass-lift) * 1.45);
|
|
338
|
+
--_glass-bloom: calc(var(--material-glow) * var(--material-reach) * var(--_material-glow-out));
|
|
339
|
+
}
|
|
340
|
+
/* A surface's outer glow as its own layer, laid over the surface's box with the
|
|
341
|
+
* same tone and lift. Its z-index lifts the glow over neighbouring surfaces;
|
|
342
|
+
* the surface itself sets --glass-halo: 1 so the glow is not drawn twice. */
|
|
343
|
+
:where(.glass-halo) {
|
|
344
|
+
position: absolute;
|
|
345
|
+
inset: 0;
|
|
346
|
+
z-index: 1;
|
|
347
|
+
pointer-events: none;
|
|
348
|
+
box-shadow: 0 0 var(--_glass-bloom) oklch(from var(--material-hue) l c h / 0.65);
|
|
349
|
+
}
|
|
350
|
+
|
|
323
351
|
/* The ONE glass formula. Neutral by default (--glass-tone transparent makes
|
|
324
352
|
* every tone term inert); add .glass-tint for the tinted badge/alert look and
|
|
325
353
|
* .glass-sink for a recessed field. Tone mixes are srgb: oklch drags a tone
|
|
@@ -342,11 +370,6 @@
|
|
|
342
370
|
--glass-wash-2: calc(var(--glass-wash) / var(--_material-wash-split));
|
|
343
371
|
--glass-wash-angle: var(--_material-wash-angle);
|
|
344
372
|
--surface-wash: calc(var(--glass-wash) * var(--material-tint));
|
|
345
|
-
/* The surface's own hue, opaque: its tone when it has one, the accent otherwise
|
|
346
|
-
* (a transparent tone mixes to the accent at low alpha; the /1 restores it). */
|
|
347
|
-
--material-hue: oklch(
|
|
348
|
-
from color-mix(in srgb, var(--glass-tone) 99%, var(--material-accent)) l c h / 1
|
|
349
|
-
);
|
|
350
373
|
border: var(--material-edge-width) solid
|
|
351
374
|
color-mix(
|
|
352
375
|
in srgb,
|
|
@@ -396,16 +419,13 @@
|
|
|
396
419
|
)
|
|
397
420
|
),
|
|
398
421
|
linear-gradient(var(--glass-base), var(--glass-base)), var(--glass-frost, none);
|
|
399
|
-
/* Glow scales with --glass-lift, the knob that already says how big a surface
|
|
400
|
-
* floats: a card (0.45) takes the full bloom, a chip or button (0) about a third. */
|
|
401
|
-
--material-reach: calc(0.35 + var(--glass-lift) * 1.45);
|
|
402
422
|
box-shadow:
|
|
403
423
|
var(--glass-rim-shine, 0 0 #0000),
|
|
404
424
|
inset 0 -2px 4px color-mix(in srgb, var(--glass-tone) var(--glass-glow), transparent),
|
|
405
425
|
0 1px 3px color-mix(in srgb, var(--glass-tone) var(--glass-drop), transparent),
|
|
406
426
|
calc(-10px * var(--_material-light-sin)) calc(10px * var(--_material-light-cos)) 30px -16px
|
|
407
427
|
oklch(0 0 0 / calc(var(--glass-lift) * var(--_material-shadow))),
|
|
408
|
-
0 0 calc(var(--
|
|
428
|
+
0 0 calc(var(--_glass-bloom) * (1 - var(--glass-halo)))
|
|
409
429
|
oklch(from var(--material-hue) l c h / 0.65),
|
|
410
430
|
inset 0 0 calc(var(--material-glow) * 0.9 * var(--_material-glow-in))
|
|
411
431
|
oklch(from var(--material-hue) l c h / calc(0.65 * var(--_material-glow-in))),
|
|
@@ -526,6 +546,9 @@
|
|
|
526
546
|
* paints above its parent's own background and border; contain: layout anchors
|
|
527
547
|
* them and makes the stacking context without repositioning the surface. */
|
|
528
548
|
@container not style(--material-ink-level: 0) {
|
|
549
|
+
:where(.glass-halo) {
|
|
550
|
+
box-shadow: none;
|
|
551
|
+
}
|
|
529
552
|
:where(.glass) {
|
|
530
553
|
--ink-r: var(--radius);
|
|
531
554
|
--ink-line: color-mix(
|