@glasshome/ui 1.12.0 → 1.14.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 +11 -1
- package/dist/index.js +2 -2
- package/dist/lib/motion-classes.d.ts +2 -0
- package/dist/solid/area-picker.d.ts +1 -0
- package/dist/solid/dock-paging.d.ts +8 -0
- package/dist/solid/dock.d.ts +8 -0
- package/dist/solid/form.d.ts +1 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.js +4801 -4646
- package/dist/solid/schema-form.d.ts +1 -1
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +25 -1
- package/dist/tokens/theme-css.d.ts +4 -0
- package/dist/{utils-CdUh67Y9.js → utils-DMaksjvy.js} +511 -511
- package/package.json +6 -2
- package/scripts/check-gallery.ts +190 -0
- package/scripts/check-tokens.ts +2 -13
- package/src/lib/motion-classes.ts +11 -0
- package/src/solid/area-picker.tsx +1 -0
- package/src/solid/card.tsx +1 -0
- package/src/solid/dock-paging.ts +24 -0
- package/src/solid/dock.tsx +172 -22
- package/src/solid/form.tsx +1 -0
- package/src/solid/index.ts +1 -0
- package/src/solid/schema-form.tsx +58 -18
- package/src/solid/section-card.tsx +1 -0
- package/src/solid/widget-card.tsx +1 -0
- package/src/styles/globals.css +40 -0
- package/src/tokens/index.ts +1 -0
- package/src/tokens/theme-css.ts +34 -0
package/SPEC.md
CHANGED
|
@@ -152,7 +152,13 @@ Motion is one system, not per-component flair. Four rules, all held by
|
|
|
152
152
|
widget shadow roots on the inherited `--motion-ambient` (1 live, else 0)
|
|
153
153
|
or, for a loop that can only pause, `--motion-play` (`running` live, else
|
|
154
154
|
`paused`). A wrapper with `data-motion="still"` opts out: thumbnails are
|
|
155
|
-
stills.
|
|
155
|
+
stills. A mode indicator is not decoration: it may loop for as long
|
|
156
|
+
as its mode is on, provided the mode itself is bounded (dash leaves edit mode
|
|
157
|
+
after three idle minutes). `.glass-edge-orbit` is that rim.
|
|
158
|
+
|
|
159
|
+
`HOLD_MOTION`: hold progress. A fill grows out of the touch while held, dissolves once the hold fires, and drains back faster if let go early (holding the dock to change modes).
|
|
160
|
+
|
|
161
|
+
`RISE_MOTION`: `MODAL_MOTION`'s twin for a surface that stays mounted; its closed state is a resting style, since a mount door's exit ends and leaves the element showing.
|
|
156
162
|
|
|
157
163
|
A new component with an open, pick or reveal state uses these doors before it
|
|
158
164
|
gets any motion of its own; a motion need none of them covers is added to
|
|
@@ -171,6 +177,10 @@ gets any motion of its own; a motion need none of them covers is added to
|
|
|
171
177
|
slots).
|
|
172
178
|
- All color comes from theme vars (`var(--primary)` etc.). No hex/oklch
|
|
173
179
|
literals in components except neutral black/white shadow alphas.
|
|
180
|
+
- Text chrome (`Badge`, `CountPill`, `SectionMeta`, `SectionCard.subtitleClass`)
|
|
181
|
+
merges the caller's classes through `cn`, so `class="text-sm"` is the
|
|
182
|
+
sanctioned size door for a desk-distance surface. The default register stays
|
|
183
|
+
`text-xs`; no component grows a `size` prop for this.
|
|
174
184
|
|
|
175
185
|
## Extending the system
|
|
176
186
|
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as e, A as t,
|
|
2
|
-
export {
|
|
1
|
+
import { $ as e, A as t, B as n, Bt as r, C as i, Ct as a, D as o, Dt as s, E as c, Et as l, F as u, Ft as d, G as f, Gt as p, H as m, Ht as h, I as g, It as _, J as v, Jt as y, Kt as b, L as x, Lt as S, M as C, Mt as w, N as T, Nt as E, O as D, Ot as O, P as k, Pt as A, Q as j, R as M, Rt as N, S as P, St as F, T as I, U as L, Ut as R, V as z, Vt as B, Wt as V, X as H, Xt as U, Y as W, Yt as G, Z as K, Zt as q, _ as J, _t as Y, at as X, b as Z, c as Q, ct as $, d as ee, et as te, f as ne, g as re, h as ie, i as ae, it as oe, j as se, jt as ce, k as le, kt as ue, l as de, m as fe, n as pe, nt as me, o as he, ot as ge, p as _e, q as ve, qt as ye, r as be, rt as xe, s as Se, st as Ce, t as we, tt as Te, u as Ee, ut as De, v as Oe, vt as ke, w as Ae, wt as je, x as Me, y as Ne, yt as Pe, z as Fe } from "./utils-DMaksjvy.js";
|
|
2
|
+
export { r as ALERT_CLASS, B as ALERT_CONTENT_CLASS, h as ALERT_DESCRIPTION_CLASS, R as ALERT_ICON_BG_CLASS, V as ALERT_ICON_CLASS, p as ALERT_ICON_PATHS, b as ALERT_TITLE_CLASS, ye as ALERT_TONES, A as BUTTON_DEFAULT_CLASS, d as BUTTON_OUTLINE_CLASS, De as CARD_BLUR, Y as CARD_SURFACE, ke as CARD_SURFACE_BASE, Pe as CARD_SURFACE_OPAQUE, v as CAROUSEL_DOTS, W as CAROUSEL_VIEWPORT, fe as CHIP, Te as CONTROL_H, J as CONTROL_H_TOUCH, me as FIELD_CHROME, xe as FIELD_CONTROL, je as FIELD_MOTION, oe as FIELD_TEXT, Z as FLOATING_PANEL, X as FOCUS_RING, _ as ICON_BUTTON_CLASS, ie as ICON_PILL, re as ICON_PILL_TINT, ge as INPUT_CLASS, Ce as INPUT_SURFACE, $ as INVALID_RING, C as LOGO_DEFAULT_SIZE, T as LOGO_DEFAULT_SRC, k as LOGO_DEFAULT_SUB, u as LOGO_MARK_CLASS, g as LOGO_MARK_PX, x as LOGO_NAME_CLASS, M as LOGO_ROOT_CLASS, Fe as LOGO_SIZES, n as LOGO_STACK_CLASS, z as LOGO_SUB_CLASS, o as MENU_ITEM, D as MENU_ITEM_BASE, le as MENU_ITEM_X, t as MENU_LABEL, se as MENU_SEPARATOR, pe as MOBILE_BREAKPOINT, l as MODAL_MOTION, s as MORPH_MOTION, S as OUTLINE_SURFACE, Me as OVERLAY_BLUR, O as OVERLAY_MOTION, P as OVERLAY_SURFACE, i as OVERLAY_SURFACE_BASE, Ae as OVERLAY_SURFACE_OPAQUE, Oe as PICKER_LIST, Ne as PICKER_TRIGGER, e as POSITION_BAR, te as POSITION_BAR_LIT, ue as PRESS_DIP, I as SCRIM_CLASS, ce as SCRIM_MOTION, Ee as SECTION_INNER_RADIUS, ee as SECTION_OUTER_RADIUS, ne as SECTION_PADDING, _e as SECTION_ROW_CLASS, F as SECTION_ROW_SURFACE, de as SEGMENT_ITEM, w as SETTLE_MOTION, E as STAGGER, ae as THUMB_CLASS, he as THUMB_RAIL_BLEED, Se as THUMB_RAIL_PAD, Q as THUMB_SIZE, a as TRACK_SURFACE, m as Z, L as Z_CLASS, y as alertBorder, G as alertFill, U as alertIconBgStyle, q as alertIconFill, c as anchorToTriggerTop, N as buttonVariants, H as carouselDot, K as carouselItem, j as carouselTrack, we as cn, be as createIsMobile, f as glassToneText, ve as toneTextMix };
|
|
@@ -6,3 +6,5 @@ export declare const MODAL_MOTION = "data-[expanded]:animate-in data-[expanded]:
|
|
|
6
6
|
export declare const SCRIM_MOTION = "data-[expanded]:animate-in data-[expanded]:duration-(--duration-expand) data-[expanded]:ease-(--ease-expand) data-[expanded]:fade-in-0 data-[closed]:animate-out data-[closed]:duration-(--duration-micro) data-[closed]:ease-(--ease-contract) data-[closed]:fade-out-0";
|
|
7
7
|
export declare const SETTLE_MOTION = "animate-in fade-in-0 slide-in-from-bottom-1 duration-(--duration-state) ease-(--ease-expand)";
|
|
8
8
|
export declare const PRESS_DIP = "active:scale-[0.97]";
|
|
9
|
+
export declare const HOLD_MOTION = "scale-0 opacity-0 transition-[scale,opacity] duration-(--duration-state) ease-(--ease-contract) data-[hold]:scale-100 data-[hold]:opacity-100 data-[hold]:duration-(--duration-morph) data-[hold]:ease-linear data-[fired]:scale-100 data-[fired]:opacity-0";
|
|
10
|
+
export declare const RISE_MOTION = "origin-bottom transition-[opacity,scale,translate] data-[expanded]:duration-(--duration-expand) data-[expanded]:ease-(--ease-expand) data-[closed]:duration-(--duration-micro) data-[closed]:ease-(--ease-contract) data-[closed]:pointer-events-none data-[closed]:translate-y-2 data-[closed]:scale-95 data-[closed]:opacity-0";
|
|
@@ -3,6 +3,7 @@ interface AreaPickerBaseProps {
|
|
|
3
3
|
class?: string;
|
|
4
4
|
/** false: a re-tap on the picked area keeps it instead of clearing. */
|
|
5
5
|
allowClear?: boolean;
|
|
6
|
+
/** A read-only caller renders the real picker dimmed, never a plain text line. */
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
/** Id of the element naming the trigger, for forms that label it outside. */
|
|
8
9
|
"aria-labelledby"?: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** A page is one strip-width of items. The last one is whatever is left. */
|
|
2
|
+
export declare function pageCount(scrollWidth: number, viewport: number): number;
|
|
3
|
+
/** The page a scroll position sits on, counting a half-page as turned. */
|
|
4
|
+
export declare function pageOf(scrollLeft: number, viewport: number): number;
|
|
5
|
+
/** Where to scroll for a page, clamped to the end of the strip. */
|
|
6
|
+
export declare function pageOffset(page: number, viewport: number, scrollWidth: number): number;
|
|
7
|
+
/** The strip shows whole items: a half-drawn icon at the edge reads as damage, not as a hint. */
|
|
8
|
+
export declare function stripWidth(available: number, itemWidth: number, gap: number): number;
|
package/dist/solid/dock.d.ts
CHANGED
|
@@ -13,6 +13,14 @@ interface DockItem {
|
|
|
13
13
|
interface DockProps extends ComponentProps<"div"> {
|
|
14
14
|
items: DockItem[];
|
|
15
15
|
dockMode?: "floating" | "docked";
|
|
16
|
+
/** Where a hold started, relative to the surface; `fired` once it has triggered. */
|
|
17
|
+
hold?: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
fired: boolean;
|
|
21
|
+
} | null;
|
|
22
|
+
/** A rim light that orbits for as long as a mode is on. */
|
|
23
|
+
glow?: boolean;
|
|
16
24
|
}
|
|
17
25
|
interface DockIconButtonProps extends ComponentProps<"button"> {
|
|
18
26
|
icon: Component<{
|
package/dist/solid/form.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { type Component, type ComponentProps, type JSX, type ParentComponent, ty
|
|
|
2
2
|
import { Field, FieldDescription, FieldError, FieldLabel } from "./field.js";
|
|
3
3
|
import { Input } from "./input.js";
|
|
4
4
|
declare const Form: ParentComponent<ComponentProps<"form"> & {
|
|
5
|
+
/** Headless: the parent's validation lib owns these; label, control aria-invalid and message all react to them. */
|
|
5
6
|
errors?: Record<string, string>;
|
|
6
7
|
onSetError?: (name: string, error: string) => void;
|
|
7
8
|
onClearError?: (name: string) => void;
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { type Color, parseColor } from "@kobalte/core/colors";
|
|
2
2
|
export { SECTION_ROW_SURFACE } from "../lib/card-classes.js";
|
|
3
|
+
export { RISE_MOTION } from "../lib/motion-classes.js";
|
|
3
4
|
export { OVERLAY_SURFACE } from "../lib/overlay-classes.js";
|
|
4
5
|
export { SECTION_INNER_RADIUS, SECTION_OUTER_RADIUS, SECTION_PADDING, SECTION_ROW_CLASS, } from "../lib/section-tokens.js";
|
|
5
6
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./accordion.js";
|