@glasshome/ui 1.35.4 → 1.37.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.d.ts +2 -1
- package/dist/index.js +3 -3
- package/dist/lib/balance-rows.d.ts +7 -0
- package/dist/lib/dock-slot-classes.d.ts +1 -0
- package/dist/lib/hold.d.ts +33 -1
- package/dist/lib/motion-classes.d.ts +2 -0
- package/dist/solid/dock-edit.d.ts +28 -0
- package/dist/solid/dock-paging.d.ts +13 -0
- package/dist/solid/dock.d.ts +18 -1
- package/dist/solid/face-toggle.d.ts +17 -0
- package/dist/solid/glyph-tile.d.ts +18 -0
- package/dist/solid/icon-picker.d.ts +4 -0
- package/dist/solid/index.d.ts +8 -4
- package/dist/solid/index.js +5894 -5224
- package/dist/solid/media-store.d.ts +14 -3
- package/dist/solid/preview-tile.d.ts +14 -0
- package/dist/solid/slot-button.d.ts +9 -0
- package/dist/{utils-BhU5YZKh.js → utils-Duqv3Sgo.js} +680 -624
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/src/lib/balance-rows.ts +62 -0
- package/src/lib/dock-slot-classes.ts +4 -0
- package/src/lib/hold.ts +154 -3
- package/src/lib/motion-classes.ts +11 -0
- package/src/solid/dashboard-preview.tsx +21 -4
- package/src/solid/dock-edit.tsx +267 -0
- package/src/solid/dock-paging.ts +37 -0
- package/src/solid/dock.tsx +254 -73
- package/src/solid/face-toggle.tsx +93 -0
- package/src/solid/glyph-tile.tsx +77 -0
- package/src/solid/icon-picker.tsx +40 -21
- package/src/solid/image-picker.tsx +39 -15
- package/src/solid/index.ts +10 -3
- package/src/solid/media-store.ts +28 -8
- package/src/solid/preview-tile.tsx +75 -4
- package/src/solid/schema-form.tsx +4 -6
- package/src/solid/slot-button.tsx +45 -0
- package/src/solid/toggle-group.tsx +14 -6
- package/src/styles/theme.css +31 -0
package/SPEC.md
CHANGED
|
@@ -190,8 +190,11 @@ role clears 4.5:1 against `--background`/`--card`/`--popover`/`--muted` (3:1 for
|
|
|
190
190
|
| a titled group of form rows | `<FieldSet>` + `<FieldLegend>` (+ `<FieldDescription>`) | a tracked uppercase `SectionLabel` eyebrow |
|
|
191
191
|
| rows that belong to the row above them | `<FieldSubGroup>` | a bare `<Separator>` and a left pad |
|
|
192
192
|
| picking one of a few described choices | `<OptionCardGroup>` + `<OptionCard>` | a hand-rolled `role="radio"` card list |
|
|
193
|
-
| picking one of a few results you can see (pictures, shapes, previews) | `<PreviewTileGroup>` + `<PreviewTile>` | a grid of `aria-pressed` buttons by hand |
|
|
193
|
+
| picking one of a few results you can see (pictures, shapes, previews) | `<PreviewTileGroup>` + `<PreviewTile>`; `scroll` makes a phone row that is a grid from `sm`, `dashed` is the empty choice, `<PreviewTileAction>` the way to more (a glyph on a dashed face, or children as a picture on a solid one) | a grid of `aria-pressed` buttons by hand, a "More" tile that is a radio |
|
|
194
194
|
| where a catalog item comes from (official, community, built in) | `<SourceMarks official builtIn>`, in a tile through `<PreviewTile marks>` | a `badge-check` icon or a "Built in" byline by hand |
|
|
195
|
+
| the icon a dock item will wear, or an empty place in the dock | `<IconPicker variant="slot">`, `<SlotButton dashed label>`: the dock's own slot shape (`DOCK_SLOT_SHAPE`) | a round or square button sized by hand beside an input |
|
|
196
|
+
| picking one of a short row of places or kinds, a glyph over a name, tap again to clear | `<GlyphTileGroup>` + `<GlyphTile badge>`: a row on a phone, wrapping from `sm`. `<AreaPicker>` stays the searchable popover for a long list | a `ToggleGroup` of chips with an icon inside each segment |
|
|
197
|
+
| turning people and screens on or off, some always on (who sees it) | `<FaceToggleGroup lockedIds>` + `<FaceToggle kind>`: an avatar over a name, a locked face reads on and says it always sees it | a `Switch` per person in a list |
|
|
195
198
|
| one colour out of a few | `<SwatchPicker>` (+ a picker as its child) | round buttons by hand |
|
|
196
199
|
| an editor that leaves the page live behind it | `<DockedPanel>` + its Header, Body, Footer | a `<Sheet>` with its scrim hidden |
|
|
197
200
|
| tabs above a stack of toggle groups | `<TabsTrigger icon>` | an `<Icon>` placed inside the trigger by hand |
|
|
@@ -202,8 +205,11 @@ role clears 4.5:1 against `--background`/`--card`/`--popover`/`--muted` (3:1 for
|
|
|
202
205
|
| tinted text alone | `glassToneText(tone)` | ad-hoc color-mix |
|
|
203
206
|
| a metallic tier chip | `<TierBadge>` | gradients by hand |
|
|
204
207
|
| the ambient motion window | `startMotionWindow()` | an app-local timer writing `data-motion` |
|
|
208
|
+
| a press-and-hold | `createHold({ onHold, onArm, onDisarm })`, its `down`, `move`, `up`, `cancel` on the pointer handlers (it spends the press and its release) | a `setTimeout` beside a `pointerdown`; `HOLD_MS` or `spendLongPress` by hand |
|
|
205
209
|
| copying text or an image | `<CopyButton>`, `useCopyText()`, `copyText()` / `copyImage()` (from the click; text still loading goes in as a promise) | `navigator.clipboard`, `document.execCommand("copy")` |
|
|
206
210
|
| a built-in wallpaper | `GEOMETRIC_HOUSES_SVG` from `@glasshome/ui/backgrounds` | an app's own copy of the SVG |
|
|
211
|
+
| the app's navigation dock on any viewport edge, with paging and an arrival glow for newcomers | `<Dock placement="bottom\|left\|right" arrivedIds>`; a side edge pages vertically with the dots on the inner edge | a second dock component for the side, a glow keyframe in the app |
|
|
212
|
+
| editing the dock in place: remove badges, an add slot, drag to reorder, carry the dock to another edge | `<Dock editing onRemove onAdd onReorder onMovePlacement>` and `DockItem.removable`; reorder reports the full id order once on release (Alt+arrows move the focused item) | a separate edit screen, drag handlers or a jiggle keyframe in the app |
|
|
207
213
|
| pointing at a control while the user operates it | `<Spotlight>` (`blocking` on a targetless veil so the action inside the bubble is the only press that lands; a target taller than half the viewport places the bubble inside it, near the top, instead of above or below; the bubble carries a tail toward its `anchor`, which defaults to `target` and may point at a different element than the hole) | a hand-rolled fixed overlay with a cutout |
|
|
208
214
|
|
|
209
215
|
Server-run `.astro` markup imports `@glasshome/ui/solid` too: the `solid`
|
|
@@ -276,6 +282,10 @@ Motion is one system, not per-component flair. Four rules, all held by
|
|
|
276
282
|
|
|
277
283
|
`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).
|
|
278
284
|
|
|
285
|
+
`DOCK_ARRIVE_MOTION`: a newcomer in the dock glows in the accent once and leaves nothing behind (`--duration-arrive`, zeroed under reduced motion).
|
|
286
|
+
|
|
287
|
+
`DOCK_EDIT_MOTION`: in dock edit mode every item sways a hair, neighbours out of step, rotate only; the item under a finger stands still (`--duration-jiggle`, zeroed under reduced motion, where the remove badges and the dashed add slot still mark the mode).
|
|
288
|
+
|
|
279
289
|
`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.
|
|
280
290
|
|
|
281
291
|
`TRAVEL_MOTION`: a mounted surface that follows its subject from place to place, transitioning translate and clip-path (the spotlight's hole and bubble as the target changes).
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export { Z, Z_CLASS } from "./lib/layers.js";
|
|
|
9
9
|
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";
|
|
10
10
|
export { MENU_ITEM, MENU_ITEM_BASE, MENU_ITEM_X, MENU_LABEL, MENU_SEPARATOR, } from "./lib/menu-classes.js";
|
|
11
11
|
export { FIELD_MOTION, MODAL_MOTION, MORPH_MOTION, OVERLAY_MOTION, PRESS_DIP, SCRIM_MOTION, SETTLE_MOTION, STAGGER, } from "./lib/motion-classes.js";
|
|
12
|
-
export { HOLD_GRACE_MS, HOLD_MS, spendLongPress } from "./lib/hold.js";
|
|
12
|
+
export { createHold, HOLD_GRACE_MS, HOLD_MS, spendLongPress } from "./lib/hold.js";
|
|
13
|
+
export type { Hold, HoldOptions, HoldPress } from "./lib/hold.js";
|
|
13
14
|
export { MOTION_WINDOW_MS, startMotionWindow } from "./lib/motion-window.js";
|
|
14
15
|
export { anchorToTriggerTop, FLOATING_PANEL, OVERLAY_BLUR, OVERLAY_SURFACE, OVERLAY_SURFACE_BASE, OVERLAY_SURFACE_OPAQUE, SCRIM_CLASS, } from "./lib/overlay-classes.js";
|
|
15
16
|
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, At as r, B as i, Bt as a, C as ee, D as te,
|
|
1
|
+
import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as ee, D as te, Dt as ne, E as o, Et as s, F as c, Ft as l, G as u, H as d, Ht as f, I as p, J as m, Jt as h, K as g, Kt as _, L as v, Lt as y, M as b, N as x, O as S, P as C, Q as w, Qt as T, R as E, Rt as D, S as O, Tt as k, U as A, Ut as j, V as M, W as N, Wt as P, X as F, Xt as I, Yt as L, _ as R, an as z, at as B, b as V, c as H, cn as U, ct as W, d as G, dt as K, en as q, et as J, f as Y, ft as X, g as Z, gt as re, h as ie, ht as ae, i as oe, it as se, j as ce, jt as le, k as ue, l as de, ln as fe, lt as pe, m as me, mt as he, n as ge, nn as _e, nt as ve, o as ye, on as be, ot as xe, p as Se, pt as Ce, q as we, qt as Te, r as Ee, rn as De, rt as Oe, s as ke, sn as Ae, st as je, t as Me, tn as Ne, tt as Pe, u as Fe, un as Q, ut as Ie, v as Le, vt as Re, w as ze, x as Be, y as Ve, z as He, zt as Ue } from "./utils-Duqv3Sgo.js";
|
|
2
2
|
//#region src/lib/motion-window.ts
|
|
3
3
|
var $ = 3e4;
|
|
4
|
-
function
|
|
4
|
+
function We(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 Ue(e = $) {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
|
-
export {
|
|
20
|
+
export { T as ALERT_CLASS, t as ALERT_CONTENT_CLASS, q as ALERT_DESCRIPTION_CLASS, Ne as ALERT_ICON_BG_CLASS, _e as ALERT_ICON_CLASS, De as ALERT_ICON_PATHS, z as ALERT_TITLE_CLASS, be as ALERT_TONES, _ as BUTTON_DEFAULT_CLASS, Te as BUTTON_OUTLINE_CLASS, Re as CARD_BLUR, k as CARD_SURFACE, s as CARD_SURFACE_BASE, ne as CARD_SURFACE_OPAQUE, e as CAROUSEL_DOTS, J as CAROUSEL_VIEWPORT, me as CHIP, xe as CONTROL_H, R as CONTROL_H_TOUCH, je as CONTROL_ON, W as FIELD_CHROME, pe as FIELD_CONTROL, l as FIELD_MOTION, Ie as FIELD_TEXT, V as FLOATING_PANEL, K as FOCUS_RING, S as HOLD_GRACE_MS, ue as HOLD_MS, h as ICON_BUTTON_CLASS, ie as ICON_PILL, Z as ICON_PILL_TINT, X as INPUT_CLASS, Ce as INPUT_SURFACE, he as INVALID_RING, v as LOGO_DEFAULT_SIZE, E as LOGO_DEFAULT_SRC, He as LOGO_DEFAULT_SUB, i as LOGO_MARK_CLASS, M as LOGO_MARK_PX, d as LOGO_NAME_CLASS, A as LOGO_ROOT_CLASS, N as LOGO_SIZES, u as LOGO_STACK_CLASS, g as LOGO_SUB_CLASS, b as MENU_ITEM, x as MENU_ITEM_BASE, C as MENU_ITEM_X, c as MENU_LABEL, p as MENU_SEPARATOR, ge as MOBILE_BREAKPOINT, y as MODAL_MOTION, D as MORPH_MOTION, $ as MOTION_WINDOW_MS, L as OUTLINE_SURFACE, Be as OVERLAY_BLUR, Ue as OVERLAY_MOTION, O as OVERLAY_SURFACE, ee as OVERLAY_SURFACE_BASE, ze as OVERLAY_SURFACE_OPAQUE, Le as PICKER_LIST, Ve as PICKER_TRIGGER, se as POSITION_BAR, B as POSITION_BAR_LIT, a as PRESS_DIP, o as SCRIM_CLASS, f as SCRIM_MOTION, Fe as SECTION_INNER_RADIUS, G as SECTION_OUTER_RADIUS, Y as SECTION_PADDING, Se as SECTION_ROW_CLASS, r as SECTION_ROW_SURFACE, de as SEGMENT_ITEM, j as SETTLE_MOTION, P as STAGGER, oe as THUMB_CLASS, ye as THUMB_RAIL_BLEED, ke as THUMB_RAIL_PAD, H as THUMB_SIZE, le as TRACK_SURFACE, we as Z, m as Z_CLASS, Ae as alertBorder, U as alertFill, fe as alertIconBgStyle, Q as alertIconFill, te as anchorToTriggerTop, I as buttonVariants, Pe as carouselDot, ve as carouselItem, Oe as carouselTrack, Me as cn, ae as copyImage, re as copyText, n as createHold, Ee as createIsMobile, F as glassToneText, ce as spendLongPress, We as startMotionWindow, w as toneTextMix };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Classes for the element holding the items: one row, then the balanced grid once `data-wrapped` is set. */
|
|
2
|
+
export declare const BALANCED_ROWS = "grid grid-flow-col auto-cols-[minmax(max-content,1fr)] data-[wrapped]:grid-flow-row data-[wrapped]:grid-cols-[repeat(var(--balance-columns),minmax(max-content,1fr))]";
|
|
3
|
+
/**
|
|
4
|
+
* Lays `items` out in `BALANCED_ROWS`. `sizer` is the element that fills its line once wrapped
|
|
5
|
+
* (it takes `data-wrapped` too); `item` selects the items among `items`' children.
|
|
6
|
+
*/
|
|
7
|
+
export declare function balanceRows(sizer: HTMLElement, items: HTMLElement, item: string): () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DOCK_SLOT_SHAPE = "flex size-11 touch-manipulation items-center justify-center rounded-lg sm:size-12";
|
package/dist/lib/hold.d.ts
CHANGED
|
@@ -5,5 +5,37 @@ export declare const HOLD_MS = 350;
|
|
|
5
5
|
* --duration-hold, which is HOLD_MS - HOLD_GRACE_MS. */
|
|
6
6
|
export declare const HOLD_GRACE_MS = 100;
|
|
7
7
|
/** A fired hold spends the press: the browser's own long press (text selection, context menu)
|
|
8
|
-
* must not land on what the hold opened under the finger. Lasts until the release.
|
|
8
|
+
* must not land on what the hold opened under the finger. Lasts until the release.
|
|
9
|
+
* @deprecated use createHold, which also spends the release. */
|
|
9
10
|
export declare function spendLongPress(): void;
|
|
11
|
+
/** What a hold reads from a press: a PointerEvent fits, and so does a touch or a recorded point. */
|
|
12
|
+
export interface HoldPress {
|
|
13
|
+
clientX: number;
|
|
14
|
+
clientY: number;
|
|
15
|
+
pointerId?: number;
|
|
16
|
+
target?: EventTarget | null;
|
|
17
|
+
}
|
|
18
|
+
export interface HoldOptions {
|
|
19
|
+
onHold: () => void;
|
|
20
|
+
delayMs?: number;
|
|
21
|
+
slopPx?: number;
|
|
22
|
+
/** The press outlasted a tap: show the hold fill from where it started. */
|
|
23
|
+
onArm?: (at: {
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
}) => void;
|
|
27
|
+
/** The armed press ended, fired or not, or moved away. */
|
|
28
|
+
onDisarm?: () => void;
|
|
29
|
+
}
|
|
30
|
+
export interface Hold {
|
|
31
|
+
down: (press: HoldPress) => void;
|
|
32
|
+
move: (press: HoldPress) => void;
|
|
33
|
+
up: () => void;
|
|
34
|
+
cancel: () => void;
|
|
35
|
+
/** The current press, or the last one, became a hold. */
|
|
36
|
+
fired: () => boolean;
|
|
37
|
+
}
|
|
38
|
+
/** The one hold door: a press held still for `delayMs` calls `onHold`, after it spends the
|
|
39
|
+
* press and its release so neither lands on what the hold opened. One press at a time; the
|
|
40
|
+
* release is watched on the window too, so a release off the pressed node still ends it. */
|
|
41
|
+
export declare function createHold(opts: HoldOptions): Hold;
|
|
@@ -8,5 +8,7 @@ export declare const SCRIM_MOTION = "data-[expanded]:animate-in data-[expanded]:
|
|
|
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
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
|
+
export declare const DOCK_ARRIVE_MOTION = "pointer-events-none absolute inset-0 rounded-[inherit] opacity-0 ring-2 ring-primary shadow-[0_0_14px_var(--primary)] group-data-[arrived]:animate-dock-arrive";
|
|
12
|
+
export declare const DOCK_EDIT_MOTION = "data-[editing]:animate-dock-jiggle data-[editing]:nth-even:[animation-direction:alternate-reverse] data-[dragging]:animate-none";
|
|
11
13
|
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
14
|
export declare const TRAVEL_MOTION = "transition-[translate,clip-path] duration-(--duration-morph) ease-(--ease-expand)";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type EdgeZone } from "./dock-paging.js";
|
|
2
|
+
interface ReorderOptions {
|
|
3
|
+
bar: () => HTMLElement | undefined;
|
|
4
|
+
vertical: () => boolean;
|
|
5
|
+
ids: () => string[];
|
|
6
|
+
enabled: () => boolean;
|
|
7
|
+
onReorder: (ids: string[]) => void;
|
|
8
|
+
}
|
|
9
|
+
/** Pointer reorder for the dock strip: the dragged cell follows the pointer along the axis, the others take their preview slots through flex order, and the new order is reported once on release. */
|
|
10
|
+
export declare function createDockReorder(options: ReorderOptions): {
|
|
11
|
+
dragId: import("solid-js").Accessor<string | null>;
|
|
12
|
+
preview: import("solid-js").Accessor<string[] | null>;
|
|
13
|
+
lift: import("solid-js").Accessor<number>;
|
|
14
|
+
point: import("solid-js").Accessor<{
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
} | null>;
|
|
18
|
+
begin: (id: string, down: PointerEvent) => void;
|
|
19
|
+
nudge: (id: string, step: -1 | 1) => void;
|
|
20
|
+
onMouseDown: (e: MouseEvent) => void;
|
|
21
|
+
onClickCapture: (e: MouseEvent) => void;
|
|
22
|
+
};
|
|
23
|
+
/** The grip on a dock's outer edge: carry it toward a screen edge and the three landing zones light up. */
|
|
24
|
+
export declare function DockMoveGrip(props: {
|
|
25
|
+
placement: EdgeZone;
|
|
26
|
+
onMove: (placement: EdgeZone) => void;
|
|
27
|
+
}): import("solid-js").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -8,3 +8,16 @@ export declare function pageOf(scrollLeft: number, viewport: number): number;
|
|
|
8
8
|
export declare function pageOffset(page: number, viewport: number, scrollWidth: number): number;
|
|
9
9
|
/** The strip shows whole items: a half-drawn icon at the edge reads as damage, not as a hint. */
|
|
10
10
|
export declare function stripWidth(available: number, itemWidth: number, gap: number): number;
|
|
11
|
+
/** Where a dragged item lands: the slot whose midpoint is nearest the pointer. */
|
|
12
|
+
export declare function slotAt(mids: readonly number[], pointer: number): number;
|
|
13
|
+
/** The ids with one moved to a slot; the others keep their order. */
|
|
14
|
+
export declare function moveId(ids: readonly string[], id: string, to: number): string[];
|
|
15
|
+
export type EdgeZone = "left" | "right" | "bottom";
|
|
16
|
+
/** The viewport edge a pointer is closest to for a dock being carried: outer quarters are the sides, the lower part of the middle is the bottom, the rest is no edge. */
|
|
17
|
+
export declare function edgeZone(point: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
}, viewport: {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
}): EdgeZone | null;
|
package/dist/solid/dock.d.ts
CHANGED
|
@@ -11,10 +11,17 @@ interface DockItem {
|
|
|
11
11
|
badge?: number;
|
|
12
12
|
/** Something dragged is held over this item and will land here on release. */
|
|
13
13
|
isDropTarget?: boolean;
|
|
14
|
+
/** Shows the remove badge while editing; false for an item that cannot leave (default true). */
|
|
15
|
+
removable?: boolean;
|
|
14
16
|
}
|
|
17
|
+
type DockPlacement = "bottom" | "left" | "right";
|
|
15
18
|
interface DockProps extends ComponentProps<"div"> {
|
|
16
19
|
items: DockItem[];
|
|
17
20
|
dockMode?: "floating" | "docked";
|
|
21
|
+
/** The viewport edge the dock sits on; a side edge pages its strip vertically. */
|
|
22
|
+
placement?: DockPlacement;
|
|
23
|
+
/** Items that just landed: each glows once, and the dock turns to the first one's page. */
|
|
24
|
+
arrivedIds?: string[];
|
|
18
25
|
/** Where a hold started, relative to the surface; `fired` once it has triggered. */
|
|
19
26
|
hold?: {
|
|
20
27
|
x: number;
|
|
@@ -28,6 +35,14 @@ interface DockProps extends ComponentProps<"div"> {
|
|
|
28
35
|
x: number;
|
|
29
36
|
y: number;
|
|
30
37
|
} | null;
|
|
38
|
+
/** Edit mode: items sway and carry a remove badge, a dashed add slot ends the strip, items drag to reorder. */
|
|
39
|
+
editing?: boolean;
|
|
40
|
+
onRemove?: (id: string) => void;
|
|
41
|
+
onAdd?: () => void;
|
|
42
|
+
/** The full id order after a drag or an Alt+arrow move. */
|
|
43
|
+
onReorder?: (ids: string[]) => void;
|
|
44
|
+
/** While editing, a grip on the outer edge carries the whole dock to a screen edge; fires once on release over one. */
|
|
45
|
+
onMovePlacement?: (placement: DockPlacement) => void;
|
|
31
46
|
}
|
|
32
47
|
interface DockIconButtonProps extends ComponentProps<"button"> {
|
|
33
48
|
icon: Component<{
|
|
@@ -38,7 +53,9 @@ interface DockIconButtonProps extends ComponentProps<"button"> {
|
|
|
38
53
|
/** Wears the selection highlight: the active item, or the one a drag would land on. */
|
|
39
54
|
lit?: boolean;
|
|
40
55
|
badge?: number;
|
|
56
|
+
/** Plays the arrival glow once. */
|
|
57
|
+
arrived?: boolean;
|
|
41
58
|
}
|
|
42
59
|
declare const Dock: Component<DockProps>;
|
|
43
|
-
export type { DockIconButtonProps, DockItem, DockProps };
|
|
60
|
+
export type { DockIconButtonProps, DockItem, DockPlacement, DockProps };
|
|
44
61
|
export { Dock };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/** People and screens to turn on or off. Faces in `lockedIds` always count: shown on, never reported in `onChange`. */
|
|
3
|
+
export declare function FaceToggleGroup(props: {
|
|
4
|
+
/** The faces turned on by choice; locked ones are on without being listed. */
|
|
5
|
+
value: string[];
|
|
6
|
+
onChange: (value: string[]) => void;
|
|
7
|
+
lockedIds?: readonly string[];
|
|
8
|
+
"aria-label": string;
|
|
9
|
+
class?: string;
|
|
10
|
+
children: JSX.Element;
|
|
11
|
+
}): JSX.Element;
|
|
12
|
+
export declare function FaceToggle(props: {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
kind: "person" | "screen";
|
|
16
|
+
class?: string;
|
|
17
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/** Tiles that scroll sideways below `sm` and wrap from `sm` up. Tapping the picked tile again clears the pick. */
|
|
3
|
+
export declare function GlyphTileGroup(props: {
|
|
4
|
+
value: string | null;
|
|
5
|
+
onChange: (value: string | null) => void;
|
|
6
|
+
"aria-label": string;
|
|
7
|
+
class?: string;
|
|
8
|
+
children: JSX.Element;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
/** A glyph over a name: a room, a kind, a place. A `badge` icon marks it while picked. */
|
|
11
|
+
export declare function GlyphTile(props: {
|
|
12
|
+
value: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
label: string;
|
|
15
|
+
/** Shown in the corner only while this tile is picked. */
|
|
16
|
+
badge?: string;
|
|
17
|
+
class?: string;
|
|
18
|
+
}): JSX.Element;
|
|
@@ -3,7 +3,11 @@ export interface IconPickerProps {
|
|
|
3
3
|
value: string;
|
|
4
4
|
onChange: (value: string) => void;
|
|
5
5
|
placeholder?: string;
|
|
6
|
+
/** `slot` is a dock-shaped button showing the icon, for a form that is picking what a dock item will wear. */
|
|
7
|
+
variant?: "field" | "slot";
|
|
6
8
|
class?: string;
|
|
9
|
+
/** Names a `slot` trigger, which shows no text of its own. */
|
|
10
|
+
"aria-label"?: string;
|
|
7
11
|
/** @deprecated Pass `search` to `provideIcons` once; removed in 2.0.0. */
|
|
8
12
|
searchIcons?: (query: string, prefix: string) => Promise<string[]>;
|
|
9
13
|
/** Id of the element naming the trigger, for forms that label it outside. */
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { type Color, parseColor } from "@kobalte/core/colors";
|
|
2
2
|
export { SECTION_ROW_SURFACE } from "../lib/card-classes.js";
|
|
3
3
|
export { copyImage, copyText } from "../lib/clipboard.js";
|
|
4
|
-
export { HOLD_GRACE_MS, HOLD_MS, spendLongPress } from "../lib/hold.js";
|
|
4
|
+
export { createHold, HOLD_GRACE_MS, HOLD_MS, spendLongPress } from "../lib/hold.js";
|
|
5
|
+
export type { Hold, HoldOptions, HoldPress } from "../lib/hold.js";
|
|
5
6
|
export { RISE_MOTION, SETTLE_MOTION, TRAVEL_MOTION } from "../lib/motion-classes.js";
|
|
6
7
|
export { OVERLAY_SURFACE } from "../lib/overlay-classes.js";
|
|
7
8
|
export { SECTION_INNER_RADIUS, SECTION_OUTER_RADIUS, SECTION_PADDING, SECTION_ROW_CLASS, } from "../lib/section-tokens.js";
|
|
@@ -33,7 +34,7 @@ export { DashboardPreview, type DashboardPreviewTile } from "./dashboard-preview
|
|
|
33
34
|
export { DataTableHead, DataTableRow, type SortDirection, TABLE_BLEED, TABLE_CELL_X, TABLE_HEAD_CELL_CLASS, TABLE_HEAD_CLASS, TABLE_HEAD_LABEL_CLASS, TABLE_NUM_CELL_CLASS, TABLE_ROW_CLASS, TABLE_SCROLL_CLASS, TableBulkBar, TableEmpty, TableError, TableFilterSelect, TableLoadMore, TableSearchInput, TableSkeleton, TableSortHeader, createTableWindow, } from "./data-table.js";
|
|
34
35
|
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from "./dialog.js";
|
|
35
36
|
export type { ModalSize } from "./dialog-parts.js";
|
|
36
|
-
export type { DockIconButtonProps, DockItem, DockProps } from "./dock.js";
|
|
37
|
+
export type { DockIconButtonProps, DockItem, DockPlacement, DockProps } from "./dock.js";
|
|
37
38
|
export { Dock } from "./dock.js";
|
|
38
39
|
export { DockedPanel, DockedPanelBody, DockedPanelFooter, DockedPanelHeader, } from "./docked-panel.js";
|
|
39
40
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./dropdown-menu.js";
|
|
@@ -56,7 +57,7 @@ export { Label } from "./label.js";
|
|
|
56
57
|
export { createListReorder, dragTargetIndex, type ListReorder, type ListReorderOptions, } from "./list-reorder.js";
|
|
57
58
|
export { Logo } from "./logo.js";
|
|
58
59
|
export { mediaIndexErrorCopy, mediaStoreErrorCopy, toMediaStoreError } from "./media-copy.js";
|
|
59
|
-
export { type BrokenMedia, createBrokenMedia, type ImagePreset, imagePreset, imageUrl, isMediaImage, MEDIA_PAGE_SIZE, type MediaIndex, type MediaQuotaUsage, type MediaStore, MediaStoreContext, MediaStoreError, type MediaStoreErrorKind, type MediaVariant, mediaUrl, presetValue, provideMediaStore, type StoredMedia, sortMediaForClearing, useMediaStore, } from "./media-store.js";
|
|
60
|
+
export { type BrokenMedia, createBrokenMedia, type ImagePreset, imagePreset, imageUrl, isMediaImage, MEDIA_PAGE_SIZE, type MediaIndex, type MediaQuotaUsage, type MediaStore, MediaStoreContext, MediaStoreError, type MediaStoreErrorKind, type MediaUrls, MediaUrlsContext, type MediaVariant, mediaUrl, presetValue, provideMediaStore, provideMediaUrls, type StoredMedia, sortMediaForClearing, useMediaStore, } from "./media-store.js";
|
|
60
61
|
export { MediaTile, type MediaTileProps } from "./media-tile.js";
|
|
61
62
|
export { NumberField } from "./number-field.js";
|
|
62
63
|
export { HeroOption, OptionCard, OptionCardGroup, OptionChoice } from "./option-card.js";
|
|
@@ -69,7 +70,7 @@ export { PickerSearch, type PickerSearchProps } from "./picker-search.js";
|
|
|
69
70
|
export { PickerTrigger, type PickerTriggerProps } from "./picker-trigger.js";
|
|
70
71
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
71
72
|
export { PortalMountContext, usePortalMount } from "./portal-mount.js";
|
|
72
|
-
export { PreviewTile, PreviewTileGroup } from "./preview-tile.js";
|
|
73
|
+
export { PreviewTile, PreviewTileAction, PreviewTileGroup } from "./preview-tile.js";
|
|
73
74
|
export { Progress } from "./progress.js";
|
|
74
75
|
export { RadioGroup, RadioGroupItem } from "./radio-group.js";
|
|
75
76
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./resizable.js";
|
|
@@ -83,10 +84,13 @@ export { Separator } from "./separator.js";
|
|
|
83
84
|
export { LabeledField, LabeledIconPicker, LabeledInput, RowActions, SectionAddButton, SectionEmpty, SwitchRow, } from "./settings-row.js";
|
|
84
85
|
export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, } from "./sheet.js";
|
|
85
86
|
export { Skeleton } from "./skeleton.js";
|
|
87
|
+
export { SlotButton, type SlotButtonProps } from "./slot-button.js";
|
|
86
88
|
export { Slider } from "./slider.js";
|
|
87
89
|
export { SelectionHighlight, type SelectionMarker, SelectionScope } from "./selection.js";
|
|
88
90
|
export { SlidingIndicator } from "./sliding-indicator.js";
|
|
89
91
|
export { GlassToast, Toaster, toast } from "./sonner.js";
|
|
92
|
+
export { FaceToggle, FaceToggleGroup } from "./face-toggle.js";
|
|
93
|
+
export { GlyphTile, GlyphTileGroup } from "./glyph-tile.js";
|
|
90
94
|
export { Spinner } from "./spinner.js";
|
|
91
95
|
export { Spotlight } from "./spotlight.js";
|
|
92
96
|
export { StepIndicator } from "./step-indicator.js";
|