@glasshome/ui 1.10.0 → 1.11.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 +7 -0
- package/dist/index.js +1 -1
- package/dist/lib/menu-classes.d.ts +2 -2
- package/dist/solid/icon.d.ts +18 -12
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.js +3692 -3490
- package/dist/{utils-CIwpbaOd.js → utils-CdUh67Y9.js} +1 -1
- package/package.json +7 -3
- package/scripts/check-pack.ts +32 -0
- package/src/index.ts +111 -0
- package/src/lib/menu-classes.ts +1 -1
- package/src/solid/accordion.tsx +60 -0
- package/src/solid/alert-dialog.tsx +148 -0
- package/src/solid/alert.tsx +118 -0
- package/src/solid/area-picker.tsx +225 -0
- package/src/solid/aspect-ratio.tsx +21 -0
- package/src/solid/avatar.tsx +41 -0
- package/src/solid/badge.tsx +74 -0
- package/src/solid/bottom-sheet/arbitration.ts +40 -0
- package/src/solid/bottom-sheet/bottom-sheet.tsx +457 -0
- package/src/solid/bottom-sheet/constants.ts +8 -0
- package/src/solid/bottom-sheet/drag-controller.ts +221 -0
- package/src/solid/bottom-sheet/focus-trap.ts +56 -0
- package/src/solid/bottom-sheet/index.ts +14 -0
- package/src/solid/bottom-sheet/keyboard.ts +35 -0
- package/src/solid/bottom-sheet/scroll-lock.ts +64 -0
- package/src/solid/bottom-sheet/state-machine.ts +40 -0
- package/src/solid/bottom-sheet/velocity.ts +42 -0
- package/src/solid/breadcrumb.tsx +105 -0
- package/src/solid/button-group.tsx +66 -0
- package/src/solid/button.tsx +20 -0
- package/src/solid/card.tsx +101 -0
- package/src/solid/carousel.tsx +302 -0
- package/src/solid/charts.tsx +338 -0
- package/src/solid/checkbox.tsx +70 -0
- package/src/solid/collapsible.tsx +38 -0
- package/src/solid/color-slider.tsx +98 -0
- package/src/solid/color-wheel.tsx +77 -0
- package/src/solid/context-menu.tsx +109 -0
- package/src/solid/copy-button.tsx +46 -0
- package/src/solid/count-pill.tsx +24 -0
- package/src/solid/data-table.tsx +248 -0
- package/src/solid/dialog-parts.tsx +242 -0
- package/src/solid/dialog.tsx +121 -0
- package/src/solid/dock.tsx +186 -0
- package/src/solid/dropdown-menu.tsx +130 -0
- package/src/solid/empty.tsx +99 -0
- package/src/solid/entity-data.ts +78 -0
- package/src/solid/entity-selector.tsx +697 -0
- package/src/solid/field.tsx +253 -0
- package/src/solid/form.tsx +231 -0
- package/src/solid/hero-action.tsx +117 -0
- package/src/solid/hover-card.tsx +26 -0
- package/src/solid/icon-picker.tsx +432 -0
- package/src/solid/icon.tsx +126 -0
- package/src/solid/image-picker.tsx +380 -0
- package/src/solid/index.ts +413 -0
- package/src/solid/input-group.tsx +170 -0
- package/src/solid/input-otp.tsx +175 -0
- package/src/solid/input.tsx +12 -0
- package/src/solid/item.tsx +179 -0
- package/src/solid/kbd.tsx +30 -0
- package/src/solid/label.tsx +19 -0
- package/src/solid/list-reorder.ts +148 -0
- package/src/solid/logo.tsx +79 -0
- package/src/solid/media-copy.ts +37 -0
- package/src/solid/media-store.ts +110 -0
- package/src/solid/media-tile.tsx +100 -0
- package/src/solid/menu-parts.tsx +248 -0
- package/src/solid/number-field.tsx +72 -0
- package/src/solid/option-card.tsx +218 -0
- package/src/solid/ornament.tsx +53 -0
- package/src/solid/overlay.tsx +16 -0
- package/src/solid/page-header.tsx +102 -0
- package/src/solid/pagination.tsx +111 -0
- package/src/solid/password-input.tsx +69 -0
- package/src/solid/picker-row.tsx +102 -0
- package/src/solid/picker-search.tsx +78 -0
- package/src/solid/popover.tsx +103 -0
- package/src/solid/progress.tsx +31 -0
- package/src/solid/radio-group.tsx +60 -0
- package/src/solid/resizable.tsx +149 -0
- package/src/solid/responsive-dialog.tsx +180 -0
- package/src/solid/schema-form.tsx +830 -0
- package/src/solid/scope-indicator.tsx +13 -0
- package/src/solid/scroll-area.tsx +27 -0
- package/src/solid/section-card.tsx +358 -0
- package/src/solid/select.tsx +139 -0
- package/src/solid/separator.tsx +35 -0
- package/src/solid/settings-row.tsx +159 -0
- package/src/solid/sheet.tsx +157 -0
- package/src/solid/skeleton.tsx +15 -0
- package/src/solid/slider.tsx +148 -0
- package/src/solid/sliding-indicator.tsx +294 -0
- package/src/solid/sonner.tsx +217 -0
- package/src/solid/spinner.tsx +20 -0
- package/src/solid/step-indicator.tsx +30 -0
- package/src/solid/switch.tsx +62 -0
- package/src/solid/table.tsx +98 -0
- package/src/solid/tabs.tsx +86 -0
- package/src/solid/textarea.tsx +16 -0
- package/src/solid/toggle-group.tsx +102 -0
- package/src/solid/toggle.tsx +57 -0
- package/src/solid/tooltip.tsx +38 -0
- package/src/solid/widget-card.tsx +117 -0
- package/src/solid/widget-identity.tsx +135 -0
- package/src/solid/widget-trust-badge.tsx +37 -0
- package/src/styles/globals.css +7 -0
- package/src/styles/theme.css +8 -0
- package/src/tokens/hex.ts +50 -0
- package/src/tokens/index.ts +8 -0
- package/src/tokens/presets.ts +192 -0
- package/src/tokens/theme-colors.ts +147 -0
package/SPEC.md
CHANGED
|
@@ -107,6 +107,7 @@ role clears 4.5:1 against `--background`/`--card`/`--popover`/`--muted` (3:1 for
|
|
|
107
107
|
| an avatar or icon beside a modal title | `<Header media={…}>` | a hand-rolled row inside the header |
|
|
108
108
|
| a tab row in a modal header | `<Tabs layout="split">` around the parts, `<Header wrap action={<TabsList class="w-auto">…}>` | `class="contents"` on `Tabs` and `flex-wrap` by hand |
|
|
109
109
|
| a form inside a modal | `<Body as="form" id="…">` + a footer button with `form="…"` | a `display: contents` form wrapper inside the Body |
|
|
110
|
+
| a glyph | `<Icon icon="lucide:plus" width={16}>` (inline svg from the host's `provideIcons` source) | `<iconify-icon>`, `@iconify-icon/solid` |
|
|
110
111
|
| a status chip | `<Badge tone="var(--success)">` | `rounded-full bg-green-500/10` |
|
|
111
112
|
| a callout | `<Alert tone="warning">` | `border-amber-500/30 bg-amber-500/10` |
|
|
112
113
|
| a labelled group inside a card | `<SectionGroup icon label count action>` | a hand-rolled `SectionIcon` + `SectionSubtitle` header row |
|
|
@@ -144,6 +145,12 @@ Motion is one system, not per-component flair. Four rules, all held by
|
|
|
144
145
|
read top to bottom as it opens. Mount-only: live re-renders never re-stagger.
|
|
145
146
|
4. **Leaving is the same path, faster.** Contract on `--ease-contract` at half
|
|
146
147
|
the arrival time. Pressables dip (`PRESS_DIP`).
|
|
148
|
+
5. **Ambient motion is an event.** A wallpaper or decorative loop runs for a
|
|
149
|
+
window after mount or a touch, then freezes mid-phase; an idle screen
|
|
150
|
+
animates nothing. The host holds `html[data-motion="live"]` for the window
|
|
151
|
+
(dash: `createMotionWindow`, 30 s); light-DOM loops gate on that attribute,
|
|
152
|
+
widget shadow roots on the inherited `--motion-ambient` (1 live, else 0).
|
|
153
|
+
A wrapper with `data-motion="still"` opts out: thumbnails are stills.
|
|
147
154
|
|
|
148
155
|
A new component with an open, pick or reveal state uses these doors before it
|
|
149
156
|
gets any motion of its own; a motion need none of them covers is added to
|
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-
|
|
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
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,5 +1,5 @@
|
|
|
1
|
-
export declare const MENU_ITEM_BASE = "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&:not([data-tone])_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&>
|
|
1
|
+
export declare const MENU_ITEM_BASE = "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&:not([data-tone])_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&>[data-slot=icon]]:shrink-0 [&>[data-slot=icon]]:text-[16px]";
|
|
2
2
|
export declare const MENU_ITEM_X = "px-2";
|
|
3
|
-
export declare const MENU_ITEM = "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&:not([data-tone])_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&>
|
|
3
|
+
export declare const MENU_ITEM = "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&:not([data-tone])_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&>[data-slot=icon]]:shrink-0 [&>[data-slot=icon]]:text-[16px] px-2";
|
|
4
4
|
export declare const MENU_LABEL = "px-2 py-1.5 font-medium text-muted-foreground text-xs";
|
|
5
5
|
export declare const MENU_SEPARATOR = "-mx-1 my-1 h-px bg-border";
|
package/dist/solid/icon.d.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import "iconify
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
import type { IconifyIcon } from "@iconify/types";
|
|
2
|
+
import { type JSX } from "solid-js";
|
|
3
|
+
export type IconData = IconifyIcon;
|
|
4
|
+
export interface IconSource {
|
|
5
|
+
/** Icons known at build time, keyed `prefix:name`. */
|
|
6
|
+
bundled: Record<string, IconData>;
|
|
7
|
+
/** Resolves the rest in one batch; a name the source does not have maps to null. */
|
|
8
|
+
load?: (names: string[]) => Promise<Record<string, IconData | null>>;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
/** Host apps call this once at startup; every mounted Icon re-resolves. */
|
|
11
|
+
export declare function provideIcons(next: IconSource): void;
|
|
12
|
+
export interface IconProps extends Omit<JSX.SvgSVGAttributes<SVGSVGElement>, "width" | "height" | "children"> {
|
|
13
|
+
/** `prefix:name`, e.g. `lucide:plus`. */
|
|
14
|
+
icon: string;
|
|
15
|
+
/** Unitless = px; both omitted = 1em, one omitted = the icon's own ratio. */
|
|
16
|
+
width?: number | string;
|
|
17
|
+
height?: number | string;
|
|
18
|
+
}
|
|
19
|
+
/** One inline `<svg>` per icon: no shadow root, no observer, rendered once and kept. */
|
|
14
20
|
export declare function Icon(props: IconProps): JSX.Element;
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLab
|
|
|
37
37
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, } from "./form.js";
|
|
38
38
|
export { HeroAction } from "./hero-action.js";
|
|
39
39
|
export { HoverCard, HoverCardContent, HoverCardTrigger, } from "./hover-card.js";
|
|
40
|
+
export { Icon, type IconData, type IconProps, type IconSource, provideIcons } from "./icon.js";
|
|
40
41
|
export { IconPicker, type IconPickerProps } from "./icon-picker.js";
|
|
41
42
|
export { ImagePicker, type ImagePickerProps } from "./image-picker.js";
|
|
42
43
|
export { Input } from "./input.js";
|