@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 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, At as n, B as r, Bt as i, C as a, Ct as o, D as s, Dt as c, E as l, Et as u, F as d, Ft as f, G as p, Gt as m, H as h, Ht as g, I as _, It as v, J as y, Jt as b, Kt as x, L 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, Tt as L, U as R, Ut as z, V as B, Vt as V, Wt as H, X as U, Y as W, Yt as G, Z as K, _ as q, _t as J, at as Y, b as X, c as Z, ct as Q, d as $, et as ee, f as te, g as ne, h as re, i as ie, it as ae, j as oe, jt as se, k as ce, kt as le, l as ue, m as de, n as fe, nt as pe, o as me, ot as he, p as ge, q as _e, qt as ve, r as ye, rt as be, s as xe, st as Se, t as Ce, tt as we, u as Te, ut as Ee, v as De, vt as Oe, w as ke, wt as Ae, x as je, y as Me, yt as Ne, z as Pe, zt as Fe } from "./utils-CdUh67Y9.js";
2
- export { N as ALERT_CLASS, Fe as ALERT_CONTENT_CLASS, i as ALERT_DESCRIPTION_CLASS, V as ALERT_ICON_BG_CLASS, g as ALERT_ICON_CLASS, z as ALERT_ICON_PATHS, H as ALERT_TITLE_CLASS, m as ALERT_TONES, w as BUTTON_DEFAULT_CLASS, E as BUTTON_OUTLINE_CLASS, Ee as CARD_BLUR, J as CARD_SURFACE, Oe as CARD_SURFACE_BASE, Ne as CARD_SURFACE_OPAQUE, y as CAROUSEL_DOTS, W as CAROUSEL_VIEWPORT, de as CHIP, we as CONTROL_H, q as CONTROL_H_TOUCH, pe as FIELD_CHROME, be as FIELD_CONTROL, Ae as FIELD_MOTION, ae as FIELD_TEXT, X as FLOATING_PANEL, Y as FOCUS_RING, A as ICON_BUTTON_CLASS, re as ICON_PILL, ne as ICON_PILL_TINT, he as INPUT_CLASS, Se as INPUT_SURFACE, Q as INVALID_RING, C as LOGO_DEFAULT_SIZE, T as LOGO_DEFAULT_SRC, k as LOGO_DEFAULT_SUB, d as LOGO_MARK_CLASS, _ as LOGO_MARK_PX, S as LOGO_NAME_CLASS, M as LOGO_ROOT_CLASS, Pe as LOGO_SIZES, r as LOGO_STACK_CLASS, B as LOGO_SUB_CLASS, s as MENU_ITEM, D as MENU_ITEM_BASE, ce as MENU_ITEM_X, t as MENU_LABEL, oe as MENU_SEPARATOR, fe as MOBILE_BREAKPOINT, L as MODAL_MOTION, u as MORPH_MOTION, f as OUTLINE_SURFACE, je as OVERLAY_BLUR, c as OVERLAY_MOTION, P as OVERLAY_SURFACE, a as OVERLAY_SURFACE_BASE, ke as OVERLAY_SURFACE_OPAQUE, De as PICKER_LIST, Me as PICKER_TRIGGER, e as POSITION_BAR, ee as POSITION_BAR_LIT, O as PRESS_DIP, I as SCRIM_CLASS, le as SCRIM_MOTION, Te as SECTION_INNER_RADIUS, $ as SECTION_OUTER_RADIUS, te as SECTION_PADDING, ge as SECTION_ROW_CLASS, F as SECTION_ROW_SURFACE, ue as SEGMENT_ITEM, n as SETTLE_MOTION, se as STAGGER, ie as THUMB_CLASS, me as THUMB_RAIL_BLEED, xe as THUMB_RAIL_PAD, Z as THUMB_SIZE, o as TRACK_SURFACE, h as Z, R as Z_CLASS, x as alertBorder, ve as alertFill, b as alertIconBgStyle, G as alertIconFill, l as anchorToTriggerTop, v as buttonVariants, U as carouselDot, K as carouselItem, j as carouselTrack, Ce as cn, ye as createIsMobile, p as glassToneText, _e as toneTextMix };
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;
@@ -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<{
@@ -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;
@@ -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";