@glasshome/ui 1.22.1 → 1.24.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/index.d.ts +1 -0
- package/dist/index.js +3 -3
- package/dist/lib/alert-tones.d.ts +1 -0
- package/dist/lib/anchor-placement.d.ts +3 -4
- package/dist/lib/hold.d.ts +6 -0
- package/dist/lib/motion-classes.d.ts +1 -1
- package/dist/solid/alert.d.ts +2 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.js +4128 -4093
- package/dist/solid/toggle-group.d.ts +2 -0
- package/dist/{utils-BfU9dJev.js → utils-rZf2Zpkw.js} +463 -463
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/lib/alert-tones.ts +1 -0
- package/src/lib/anchor-placement.ts +38 -15
- package/src/lib/hold.ts +7 -0
- package/src/lib/motion-classes.ts +1 -1
- package/src/solid/alert.tsx +19 -2
- package/src/solid/dialog-parts.tsx +4 -3
- package/src/solid/dialog.tsx +16 -1
- package/src/solid/index.ts +1 -0
- package/src/solid/preview-tile.tsx +6 -4
- package/src/solid/toggle-group.tsx +11 -2
- package/src/styles/globals.css +8 -0
- package/src/styles/theme.css +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { Z, Z_CLASS } from "./lib/layers.js";
|
|
|
8
8
|
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";
|
|
9
9
|
export { MENU_ITEM, MENU_ITEM_BASE, MENU_ITEM_X, MENU_LABEL, MENU_SEPARATOR, } from "./lib/menu-classes.js";
|
|
10
10
|
export { FIELD_MOTION, MODAL_MOTION, MORPH_MOTION, OVERLAY_MOTION, PRESS_DIP, SCRIM_MOTION, SETTLE_MOTION, STAGGER, } from "./lib/motion-classes.js";
|
|
11
|
+
export { HOLD_GRACE_MS, HOLD_MS } from "./lib/hold.js";
|
|
11
12
|
export { MOTION_WINDOW_MS, startMotionWindow } from "./lib/motion-window.js";
|
|
12
13
|
export { anchorToTriggerTop, FLOATING_PANEL, OVERLAY_BLUR, OVERLAY_SURFACE, OVERLAY_SURFACE_BASE, OVERLAY_SURFACE_OPAQUE, SCRIM_CLASS, } from "./lib/overlay-classes.js";
|
|
13
14
|
export { CONTROL_H_TOUCH, PICKER_LIST, PICKER_TRIGGER } from "./lib/picker-classes.js";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as e, $t as t, A as n,
|
|
1
|
+
import { $ as e, $t as t, A as n, B as r, Bt as i, C as a, Ct as ee, D as te, Dt as o, Et as s, F as c, G as l, H as u, Ht as d, I as f, It as p, Jt as m, K as h, Kt as g, L as _, Lt as v, M as y, Mt as b, N as x, Nt as S, O as C, P as w, Pt as T, Q as E, R as D, Rt as O, S as k, St as A, T as j, U as M, Ut as N, V as P, Vt as F, W as I, Wt as L, Xt as R, Y as z, Yt as B, Z as V, Zt as H, _ as U, at as W, b as G, c as K, ct as q, d as J, dt as Y, en as ne, et as X, f as Z, ft as re, g as ie, h as ae, i as oe, in as se, it as ce, j as le, jt as ue, k as de, kt as fe, l as pe, lt as me, m as he, mt as ge, n as _e, nn as ve, nt as ye, ot as be, p as xe, q as Se, qt as Ce, r as we, rn as Te, rt as Ee, s as De, st as Oe, t as Q, tn as ke, tt as Ae, u as je, ut as Me, v as Ne, w as Pe, x as Fe, xt as Ie, y as Le, z as Re } from "./utils-rZf2Zpkw.js";
|
|
2
2
|
//#region src/lib/motion-window.ts
|
|
3
3
|
var $ = 3e4;
|
|
4
|
-
function
|
|
4
|
+
function ze(e = $) {
|
|
5
5
|
let t, n = document.documentElement, r = () => {
|
|
6
6
|
clearTimeout(t), t = void 0, delete n.dataset.motion;
|
|
7
7
|
}, i = () => {
|
|
@@ -17,4 +17,4 @@ function Le(e = $) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
|
-
export {
|
|
20
|
+
export { g as ALERT_CLASS, Ce as ALERT_CONTENT_CLASS, m as ALERT_DESCRIPTION_CLASS, B as ALERT_ICON_BG_CLASS, R as ALERT_ICON_CLASS, H as ALERT_ICON_PATHS, t as ALERT_TITLE_CLASS, ne as ALERT_TONES, i as BUTTON_DEFAULT_CLASS, F as BUTTON_OUTLINE_CLASS, ge as CARD_BLUR, Ie as CARD_SURFACE, A as CARD_SURFACE_BASE, ee as CARD_SURFACE_OPAQUE, E as CAROUSEL_DOTS, e as CAROUSEL_VIEWPORT, ae as CHIP, W as CONTROL_H, Ne as CONTROL_H_TOUCH, be as FIELD_CHROME, Oe as FIELD_CONTROL, fe as FIELD_MOTION, q as FIELD_TEXT, Fe as FLOATING_PANEL, me as FOCUS_RING, de as HOLD_GRACE_MS, n as HOLD_MS, d as ICON_BUTTON_CLASS, ie as ICON_PILL, U as ICON_PILL_TINT, Me as INPUT_CLASS, Y as INPUT_SURFACE, re as INVALID_RING, f as LOGO_DEFAULT_SIZE, _ as LOGO_DEFAULT_SRC, D as LOGO_DEFAULT_SUB, Re as LOGO_MARK_CLASS, r as LOGO_MARK_PX, P as LOGO_NAME_CLASS, u as LOGO_ROOT_CLASS, M as LOGO_SIZES, I as LOGO_STACK_CLASS, l as LOGO_SUB_CLASS, le as MENU_ITEM, y as MENU_ITEM_BASE, x as MENU_ITEM_X, w as MENU_LABEL, c as MENU_SEPARATOR, _e as MOBILE_BREAKPOINT, ue as MODAL_MOTION, b as MORPH_MOTION, $ as MOTION_WINDOW_MS, N as OUTLINE_SURFACE, k as OVERLAY_BLUR, S as OVERLAY_MOTION, a as OVERLAY_SURFACE, Pe as OVERLAY_SURFACE_BASE, j as OVERLAY_SURFACE_OPAQUE, Le as PICKER_LIST, G as PICKER_TRIGGER, Ee as POSITION_BAR, ce as POSITION_BAR_LIT, T as PRESS_DIP, te as SCRIM_CLASS, p as SCRIM_MOTION, J as SECTION_INNER_RADIUS, Z as SECTION_OUTER_RADIUS, xe as SECTION_PADDING, he as SECTION_ROW_CLASS, s as SECTION_ROW_SURFACE, je as SEGMENT_ITEM, v as SETTLE_MOTION, O as STAGGER, oe as THUMB_CLASS, De as THUMB_RAIL_BLEED, K as THUMB_RAIL_PAD, pe as THUMB_SIZE, o as TRACK_SURFACE, h as Z, Se as Z_CLASS, ke as alertBorder, ve as alertFill, Te as alertIconBgStyle, se as alertIconFill, C as anchorToTriggerTop, L as buttonVariants, X as carouselDot, Ae as carouselItem, ye as carouselTrack, Q as cn, we as createIsMobile, z as glassToneText, ze as startMotionWindow, V as toneTextMix };
|
|
@@ -14,6 +14,7 @@ export declare const ALERT_ICON_CLASS = "gh-alert-icon flex size-8 shrink-0 item
|
|
|
14
14
|
export declare const ALERT_ICON_BG_CLASS = "gh-alert-icon-bg pointer-events-none absolute -right-3 -bottom-4";
|
|
15
15
|
export declare function iconBgMaskStyle(color: string): Record<string, string>;
|
|
16
16
|
export declare function alertIconBgStyle(color: string): Record<string, string>;
|
|
17
|
+
export declare const ALERT_SM_CLASS = "items-center gap-2 py-1.5 pr-1.5 pl-3";
|
|
17
18
|
export declare const ALERT_CONTENT_CLASS = "relative z-10 min-w-0 flex-1";
|
|
18
19
|
export declare const ALERT_TITLE_CLASS = "font-semibold text-base leading-snug";
|
|
19
20
|
export declare const ALERT_DESCRIPTION_CLASS = "gh-alert-desc text-foreground/80 text-sm leading-snug";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { JSX } from "solid-js";
|
|
2
|
-
/** A panel that grows out of the element that opened it
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
export declare function overAnchor(anchor: HTMLElement, width: number): JSX.CSSProperties;
|
|
2
|
+
/** A panel that grows out of the element that opened it. The --morph-* values start the panel
|
|
3
|
+
* clipped to the element's box (MORPH_MOTION's keyframes), so it unrolls out of it. */
|
|
4
|
+
export declare function overAnchor(anchor: HTMLElement, width: number, height?: number): JSX.CSSProperties;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** A press held this long, without moving, is a hold. Matches Android's long-press timeout, so the
|
|
2
|
+
* browser's own long press never wins the race. */
|
|
3
|
+
export declare const HOLD_MS = 350;
|
|
4
|
+
/** A tap ends inside this window, so it never shows the hold fill. The fill then grows on
|
|
5
|
+
* --duration-hold, which is HOLD_MS - HOLD_GRACE_MS. */
|
|
6
|
+
export declare const HOLD_GRACE_MS = 100;
|
|
@@ -7,6 +7,6 @@ export declare const MODAL_MOTION = "data-[expanded]:animate-in data-[expanded]:
|
|
|
7
7
|
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";
|
|
8
8
|
export declare const SETTLE_MOTION = "animate-in fade-in-0 slide-in-from-bottom-1 duration-(--duration-state) ease-(--ease-expand)";
|
|
9
9
|
export declare const PRESS_DIP = "active:scale-[0.97]";
|
|
10
|
-
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-
|
|
10
|
+
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-hold) data-[hold]:ease-linear data-[fired]:scale-100 data-[fired]:opacity-0";
|
|
11
11
|
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";
|
|
12
12
|
export declare const TRAVEL_MOTION = "transition-[translate,clip-path] duration-(--duration-morph) ease-(--ease-expand)";
|
package/dist/solid/alert.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ type AlertProps = ComponentProps<"div"> & {
|
|
|
6
6
|
icon?: JSX.Element;
|
|
7
7
|
title?: JSX.Element;
|
|
8
8
|
action?: JSX.Element;
|
|
9
|
+
/** `sm`: a one-line note inside a list, with tighter padding and smaller text. */
|
|
10
|
+
size?: "default" | "sm";
|
|
9
11
|
};
|
|
10
12
|
declare const Alert: Component<AlertProps>;
|
|
11
13
|
declare const AlertTitle: Component<ComponentProps<"div">>;
|
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 { HOLD_GRACE_MS, HOLD_MS } from "../lib/hold.js";
|
|
3
4
|
export { RISE_MOTION, SETTLE_MOTION, TRAVEL_MOTION } from "../lib/motion-classes.js";
|
|
4
5
|
export { OVERLAY_SURFACE } from "../lib/overlay-classes.js";
|
|
5
6
|
export { SECTION_INNER_RADIUS, SECTION_OUTER_RADIUS, SECTION_PADDING, SECTION_ROW_CLASS, } from "../lib/section-tokens.js";
|