@glasshome/ui 1.2.0 → 1.4.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/SPEC.md CHANGED
@@ -34,11 +34,12 @@ Two-tone surfaces add `.glass-edge-gradient`: border-color cannot gradient, so
34
34
  the class swaps the border for a masked 1px ring running tone-1→tone-2 at the
35
35
  `.glass-tint` edge alpha (element must be positioned).
36
36
  | `--glass-light` | number | 0.05 | top-left white sheen (`.glass-tint` raises to 0.16) |
37
+ | `--glass-sheen` | `<x> <y>` | 120% 120% | sheen ellipse size; pin lengths on edge-anchored panels, where a percentage stretches into a blob over a flat field (side sheets use `600px 300px`) |
37
38
  | `--glass-shade` | number | 0 | bottom-right dark shade (light-theme depth) |
38
39
  | `--glass-glow` | % | 16% | inner tone glow |
39
40
  | `--glass-drop` | % | 20% | tone drop shadow |
40
- | `--glass-lift` | number | 0 | elevation shadow (cards 0.45, overlays 0.55) |
41
- | `--glass-rim` | number | 1 | bevel strength 0..1 (cards/overlays 0.3) |
41
+ | `--glass-lift` | number | 0 | elevation shadow (cards 0.45, overlays 0.6) |
42
+ | `--glass-rim` | number | 1 | bevel strength 0..1 (cards 0.3, overlays 1) |
42
43
  | `--glass-text` | % | 65% | tinted text mix, used by `.glass-tint` only |
43
44
 
44
45
  `.glass` also publishes `--surface-tone`, an ordinary **inheriting** property
@@ -52,9 +53,12 @@ The `.glass` formula is deliberately **unlayered**, so it owns
52
53
  border/background/box-shadow on the element: `bg-*`, `border-*`, and `shadow-*`
53
54
  utilities on a glass element are no-ops. Tune via knobs instead.
54
55
 
55
- `backdrop-blur` is not part of the formula. Cards add `CARD_BLUR`
56
- (`--glass-blur` px knob); toasts and other transform-animated surfaces must not
57
- blur (Chromium renders black mid-animation).
56
+ `backdrop-blur` is not part of the formula. Cards add `CARD_BLUR` and overlays
57
+ `OVERLAY_BLUR` (both read the `--glass-blur` px knob); toasts and other
58
+ transform-animated surfaces must not blur (Chromium renders black
59
+ mid-animation), and a surface that skips the blur takes an opaque fill
60
+ (`CARD_SURFACE_OPAQUE`, `OVERLAY_SURFACE_OPAQUE`) — a translucent fill with
61
+ nothing blurred behind it is just see-through.
58
62
 
59
63
  Mixing rules: tone washes mix in **srgb** (oklch drags a tone mixed toward
60
64
  transparent down to mud); tinted text mixes in **oklab** (no hue channel, so a
@@ -67,6 +71,8 @@ tone desaturates without swinging yellow — `glassToneText()`).
67
71
  | `CARD_SURFACE` / `CARD_SURFACE_OPAQUE` | lib/card-classes.ts | panels; via `<Card>` |
68
72
  | `CARD_SURFACE_BASE` + `CARD_BLUR` | lib/card-classes.ts | perf-blur gating (dash SectionCard) |
69
73
  | `OVERLAY_SURFACE` | lib/overlay-classes.ts | anything floating: menus, dialogs, sheets, tooltips |
74
+ | `OVERLAY_SURFACE_BASE` + `OVERLAY_BLUR` | lib/overlay-classes.ts | perf-blur gating, same split as the card recipe |
75
+ | `OVERLAY_SURFACE_OPAQUE` | lib/overlay-classes.ts | drag-animated overlays that cannot blur (BottomSheet) |
70
76
  | `SCRIM_CLASS` | lib/overlay-classes.ts | modal backdrop (BottomSheet keeps its unblurred scrim for mobile perf) |
71
77
  | `INPUT_SURFACE` / `INPUT_CLASS` | lib/input-classes.ts | text fields + pickers (concave) |
72
78
  | `FIELD_CHROME` | lib/input-classes.ts | toggle chrome and rails (checkbox box, radio ring, switch track, slider rail, chart wells) |
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { CAROUSEL_DOTS, CAROUSEL_VIEWPORT, type CarouselTransition, carouselDot,
5
5
  export { glassToneText, toneTextMix } from "./lib/glass-tone.js";
6
6
  export { FIELD_CHROME, INPUT_CLASS, INPUT_SURFACE } from "./lib/input-classes.js";
7
7
  export { LOGO_DEFAULT_SIZE, LOGO_DEFAULT_SRC, LOGO_DEFAULT_SUB, LOGO_MARK_CLASS, LOGO_MARK_PX, LOGO_NAME_CLASS, LOGO_ROOT_CLASS, LOGO_SIZES, LOGO_STACK_CLASS, LOGO_SUB_CLASS, type LogoSize, } from "./lib/logo-lockup.js";
8
- export { OVERLAY_SURFACE, SCRIM_CLASS } from "./lib/overlay-classes.js";
8
+ export { OVERLAY_BLUR, OVERLAY_SURFACE, OVERLAY_SURFACE_BASE, OVERLAY_SURFACE_OPAQUE, SCRIM_CLASS, } from "./lib/overlay-classes.js";
9
9
  export { SECTION_INNER_RADIUS, SECTION_OUTER_RADIUS, SECTION_PADDING, SECTION_ROW_CLASS, } from "./lib/section-tokens.js";
10
10
  export { createIsMobile } from "./lib/use-is-mobile.js";
11
11
  export { cn } from "./lib/utils.js";
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { $ as e, B as t, C as n, D as r, E as i, H as a, I as o, J as s, K as c, L as l, Q as u, R as d, S as f, T as p, U as m, V as h, W as g, X as _, Y as v, Z as y, _ as b, a as x, b as S, c as C, d as w, et as T, f as E, g as D, h as O, i as k, k as A, l as j, m as M, n as N, nt as P, o as F, p as I, q as L, r as R, rt as z, s as B, t as V, tt as H, u as U, v as W, w as G, x as K, y as q } from "./utils-C2Qf83PT.js";
2
- import { createSignal as J, onCleanup as Y, onMount as X } from "solid-js";
1
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, G as o, K as s, M as c, O as l, Q as u, S as d, T as f, U as p, V as m, W as h, X as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, d as w, et as T, f as E, g as D, h as O, i as ee, it as k, k as A, l as j, m as M, n as N, nt as P, o as F, ot as I, p as L, q as R, r as z, rt as B, s as V, t as H, tt as U, u as W, v as G, w as K, x as q, y as J, z as Y } from "./utils-B020EZLJ.js";
2
+ import { createSignal as X, onCleanup as Z, onMount as Q } from "solid-js";
3
3
  //#region src/lib/use-is-mobile.ts
4
- var Z = 768;
5
- function Q() {
6
- let [e, t] = J(void 0);
7
- return X(() => {
8
- let e = window.matchMedia(`(max-width: ${Z - 1}px)`), n = () => t(window.innerWidth < Z);
9
- e.addEventListener("change", n), t(window.innerWidth < Z), Y(() => e.removeEventListener("change", n));
4
+ var $ = 768;
5
+ function te() {
6
+ let [e, t] = X(void 0);
7
+ return Q(() => {
8
+ let e = window.matchMedia(`(max-width: ${$ - 1}px)`), n = () => t(window.innerWidth < $);
9
+ e.addEventListener("change", n), t(window.innerWidth < $), Z(() => e.removeEventListener("change", n));
10
10
  }), e;
11
11
  }
12
12
  //#endregion
13
- export { c as ALERT_CLASS, L as ALERT_CONTENT_CLASS, s as ALERT_DESCRIPTION_CLASS, v as ALERT_ICON_BG_CLASS, _ as ALERT_ICON_CLASS, y as ALERT_ICON_PATHS, u as ALERT_TITLE_CLASS, e as ALERT_TONES, h as BUTTON_DEFAULT_CLASS, a as BUTTON_OUTLINE_CLASS, A as CARD_BLUR, o as CARD_SURFACE, l as CARD_SURFACE_BASE, d as CARD_SURFACE_OPAQUE, n as CAROUSEL_DOTS, G as CAROUSEL_VIEWPORT, W as FIELD_CHROME, m as ICON_BUTTON_CLASS, q as INPUT_CLASS, S as INPUT_SURFACE, C as LOGO_DEFAULT_SIZE, j as LOGO_DEFAULT_SRC, U as LOGO_DEFAULT_SUB, w as LOGO_MARK_CLASS, E as LOGO_MARK_PX, I as LOGO_NAME_CLASS, M as LOGO_ROOT_CLASS, O as LOGO_SIZES, D as LOGO_STACK_CLASS, b as LOGO_SUB_CLASS, F as OVERLAY_SURFACE, B as SCRIM_CLASS, N as SECTION_INNER_RADIUS, R as SECTION_OUTER_RADIUS, k as SECTION_PADDING, x as SECTION_ROW_CLASS, t as TRACK_SURFACE, T as alertBorder, H as alertFill, P as alertIconBgStyle, z as alertIconFill, g as buttonVariants, p as carouselDot, i as carouselItem, r as carouselTrack, V as cn, Q as createIsMobile, K as glassToneText, f as toneTextMix };
13
+ export { _ as ALERT_CLASS, g as ALERT_CONTENT_CLASS, v as ALERT_DESCRIPTION_CLASS, u as ALERT_ICON_BG_CLASS, e as ALERT_ICON_CLASS, T as ALERT_ICON_PATHS, U as ALERT_TITLE_CLASS, P as ALERT_TONES, h as BUTTON_DEFAULT_CLASS, o as BUTTON_OUTLINE_CLASS, c as CARD_BLUR, Y as CARD_SURFACE, n as CARD_SURFACE_BASE, m as CARD_SURFACE_OPAQUE, a as CAROUSEL_DOTS, i as CAROUSEL_VIEWPORT, q as FIELD_CHROME, s as ICON_BUTTON_CLASS, d as INPUT_CLASS, r as INPUT_SURFACE, w as LOGO_DEFAULT_SIZE, E as LOGO_DEFAULT_SRC, L as LOGO_DEFAULT_SUB, M as LOGO_MARK_CLASS, O as LOGO_MARK_PX, D as LOGO_NAME_CLASS, y as LOGO_ROOT_CLASS, G as LOGO_SIZES, J as LOGO_STACK_CLASS, S as LOGO_SUB_CLASS, F as OVERLAY_BLUR, V as OVERLAY_SURFACE, C as OVERLAY_SURFACE_BASE, j as OVERLAY_SURFACE_OPAQUE, W as SCRIM_CLASS, N as SECTION_INNER_RADIUS, z as SECTION_OUTER_RADIUS, ee as SECTION_PADDING, b as SECTION_ROW_CLASS, p as TRACK_SURFACE, B as alertBorder, k as alertFill, x as alertIconBgStyle, I as alertIconFill, R as buttonVariants, l as carouselDot, A as carouselItem, t as carouselTrack, H as cn, te as createIsMobile, K as glassToneText, f as toneTextMix };
@@ -39,7 +39,7 @@ export declare const buttonVariants: import("cva").CVAComponent<Omit<{
39
39
  none: string;
40
40
  };
41
41
  };
42
- defaultVariants: Omit<{}, "variant" | "size"> & {
42
+ defaultVariants: Omit<{}, "size" | "variant"> & {
43
43
  variant: "default";
44
44
  size: "default";
45
45
  };
@@ -1,2 +1,5 @@
1
- export declare const OVERLAY_SURFACE = "glass [--glass-base:var(--popover)] [--glass-rim:0.3] [--glass-lift:0.55]";
2
- export declare const SCRIM_CLASS = "bg-background/70 backdrop-blur-sm";
1
+ export declare const OVERLAY_BLUR = "backdrop-blur-[var(--glass-blur,20px)] backdrop-saturate-[1.6]";
2
+ export declare const OVERLAY_SURFACE_BASE = "glass [--glass-rim:1] [--glass-lift:0.6] [--glass-light:0.05] [--glass-edge:color-mix(in_srgb,var(--border)_90%,transparent)] [--glass-base:color-mix(in_srgb,var(--popover)_75%,transparent)]";
3
+ export declare const OVERLAY_SURFACE = "glass [--glass-rim:1] [--glass-lift:0.6] [--glass-light:0.05] [--glass-edge:color-mix(in_srgb,var(--border)_90%,transparent)] [--glass-base:color-mix(in_srgb,var(--popover)_75%,transparent)] backdrop-blur-[var(--glass-blur,20px)] backdrop-saturate-[1.6]";
4
+ export declare const OVERLAY_SURFACE_OPAQUE = "glass [--glass-rim:1] [--glass-lift:0.6] [--glass-light:0.05] [--glass-edge:color-mix(in_srgb,var(--border)_90%,transparent)] [--glass-base:var(--popover)]";
5
+ export declare const SCRIM_CLASS = "bg-background/70 backdrop-blur-md";
@@ -21,6 +21,6 @@ declare const AlertDialogDescription: Component<ComponentProps<typeof AlertDialo
21
21
  * buttonVariants() call through `class` cannot work, because the variants
22
22
  * carry tone as arbitrary custom properties that tailwind-merge keeps side by
23
23
  * side, leaving the later stylesheet rule to win. */
24
- declare const AlertDialogAction: Component<ComponentProps<typeof AlertDialogPrimitive.CloseButton> & Pick<VariantProps<typeof buttonVariants>, "variant" | "size">>;
24
+ declare const AlertDialogAction: Component<ComponentProps<typeof AlertDialogPrimitive.CloseButton> & Partial<Pick<VariantProps<typeof buttonVariants>, "variant" | "size">>>;
25
25
  declare const AlertDialogCancel: Component<ComponentProps<typeof AlertDialogPrimitive.CloseButton>>;
26
26
  export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, };