@getaster/elements 0.0.0-stage → 0.1.0-preview.1
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/LICENSE +202 -0
- package/NOTICE +10 -0
- package/README.md +6 -2
- package/bin/aster-theme-check.js +317 -0
- package/dist/base/drag.d.ts +45 -0
- package/dist/base/drag.js +139 -0
- package/dist/base/element.d.ts +51 -0
- package/dist/base/element.js +133 -0
- package/dist/breadcrumbs/breadcrumbs.d.ts +23 -0
- package/dist/breadcrumbs/breadcrumbs.js +51 -0
- package/dist/button/button.d.ts +37 -0
- package/dist/button/button.js +108 -0
- package/dist/caret/caret-group.d.ts +14 -0
- package/dist/caret/caret-group.js +71 -0
- package/dist/carousel/carousel.d.ts +28 -0
- package/dist/carousel/carousel.js +134 -0
- package/dist/component/component.d.ts +73 -0
- package/dist/component/component.js +190 -0
- package/dist/component/echarts.d.ts +46 -0
- package/dist/component/echarts.js +95 -0
- package/dist/composition/authoring.d.ts +157 -0
- package/dist/composition/authoring.js +291 -0
- package/dist/composition/builtins.d.ts +1130 -0
- package/dist/composition/builtins.js +318 -0
- package/dist/composition/command-bar.d.ts +18 -0
- package/dist/composition/command-bar.js +34 -0
- package/dist/composition/commands.d.ts +14 -0
- package/dist/composition/commands.js +59 -0
- package/dist/composition/composite.d.ts +48 -0
- package/dist/composition/composite.js +409 -0
- package/dist/composition/contracts.d.ts +63 -0
- package/dist/composition/contracts.js +97 -0
- package/dist/composition/definition.d.ts +94 -0
- package/dist/composition/definition.js +291 -0
- package/dist/composition/element.d.ts +35 -0
- package/dist/composition/element.js +51 -0
- package/dist/composition/registry.d.ts +83 -0
- package/dist/composition/registry.js +99 -0
- package/dist/composition/schema.d.ts +9 -0
- package/dist/composition/schema.js +139 -0
- package/dist/composition/sessions.d.ts +15 -0
- package/dist/composition/sessions.js +61 -0
- package/dist/dashboard/dashboard.d.ts +26 -0
- package/dist/dashboard/dashboard.js +296 -0
- package/dist/dashboard/layout.d.ts +19 -0
- package/dist/dashboard/layout.js +48 -0
- package/dist/dashboard/widget.d.ts +42 -0
- package/dist/dashboard/widget.js +165 -0
- package/dist/date/calendar.d.ts +34 -0
- package/dist/date/calendar.js +137 -0
- package/dist/date/date-field.d.ts +18 -0
- package/dist/date/date-field.js +81 -0
- package/dist/date/dates.d.ts +22 -0
- package/dist/date/dates.js +80 -0
- package/dist/dialog/dialog.d.ts +23 -0
- package/dist/dialog/dialog.js +70 -0
- package/dist/field/bound-field.d.ts +55 -0
- package/dist/field/bound-field.js +139 -0
- package/dist/field/check.d.ts +11 -0
- package/dist/field/check.js +26 -0
- package/dist/field/composite-field.d.ts +35 -0
- package/dist/field/composite-field.js +88 -0
- package/dist/field/field.d.ts +29 -0
- package/dist/field/field.js +75 -0
- package/dist/field/input.d.ts +15 -0
- package/dist/field/input.js +18 -0
- package/dist/field/number-field.d.ts +33 -0
- package/dist/field/number-field.js +179 -0
- package/dist/field/numeric.d.ts +4 -0
- package/dist/field/numeric.js +57 -0
- package/dist/field/values.d.ts +14 -0
- package/dist/field/values.js +60 -0
- package/dist/filter/filter-builder.d.ts +18 -0
- package/dist/filter/filter-builder.js +305 -0
- package/dist/form/controls.d.ts +20 -0
- package/dist/form/controls.js +34 -0
- package/dist/form/form.d.ts +46 -0
- package/dist/form/form.js +85 -0
- package/dist/format.d.ts +10 -0
- package/dist/format.js +57 -0
- package/dist/grid/filters.d.ts +16 -0
- package/dist/grid/filters.js +66 -0
- package/dist/grid/grid.d.ts +209 -0
- package/dist/grid/grid.js +2587 -0
- package/dist/grid/rows.d.ts +32 -0
- package/dist/grid/rows.js +89 -0
- package/dist/grid/view.d.ts +69 -0
- package/dist/grid/view.js +172 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +61 -0
- package/dist/layout/stack.d.ts +112 -0
- package/dist/layout/stack.js +21 -0
- package/dist/list-edit/list-edit.d.ts +42 -0
- package/dist/list-edit/list-edit.js +220 -0
- package/dist/listbox/listbox.d.ts +45 -0
- package/dist/listbox/listbox.js +187 -0
- package/dist/menu/menu.d.ts +55 -0
- package/dist/menu/menu.js +286 -0
- package/dist/motion.d.ts +8 -0
- package/dist/motion.js +23 -0
- package/dist/overlay/anchor.d.ts +18 -0
- package/dist/overlay/anchor.js +41 -0
- package/dist/picker/options.d.ts +59 -0
- package/dist/picker/options.js +97 -0
- package/dist/picker/picker.d.ts +46 -0
- package/dist/picker/picker.js +492 -0
- package/dist/picker/tree-choices.d.ts +38 -0
- package/dist/picker/tree-choices.js +72 -0
- package/dist/picker/tree-picker.d.ts +29 -0
- package/dist/picker/tree-picker.js +282 -0
- package/dist/progress/policy.d.ts +5 -0
- package/dist/progress/policy.js +28 -0
- package/dist/progress/status.d.ts +20 -0
- package/dist/progress/status.js +38 -0
- package/dist/rule/operators.d.ts +8 -0
- package/dist/rule/operators.js +9 -0
- package/dist/rule/rule-editor.d.ts +57 -0
- package/dist/rule/rule-editor.js +290 -0
- package/dist/section/accordion.d.ts +24 -0
- package/dist/section/accordion.js +90 -0
- package/dist/section/section.d.ts +30 -0
- package/dist/section/section.js +99 -0
- package/dist/select/choice-element.d.ts +20 -0
- package/dist/select/choice-element.js +55 -0
- package/dist/select/choice.d.ts +34 -0
- package/dist/select/choice.js +122 -0
- package/dist/select/many.d.ts +13 -0
- package/dist/select/many.js +20 -0
- package/dist/select/select.d.ts +16 -0
- package/dist/select/select.js +40 -0
- package/dist/sidebar/sidebar.d.ts +47 -0
- package/dist/sidebar/sidebar.js +105 -0
- package/dist/slicer/slicer.d.ts +26 -0
- package/dist/slicer/slicer.js +140 -0
- package/dist/split/split.d.ts +41 -0
- package/dist/split/split.js +237 -0
- package/dist/styles/contract.d.ts +36 -0
- package/dist/styles/contract.js +39 -0
- package/dist/switch/switch.d.ts +22 -0
- package/dist/switch/switch.js +69 -0
- package/dist/tabs/tabs.d.ts +30 -0
- package/dist/tabs/tabs.js +202 -0
- package/dist/tile-grid/scroll.d.ts +9 -0
- package/dist/tile-grid/scroll.js +21 -0
- package/dist/tile-grid/tile-grid.d.ts +64 -0
- package/dist/tile-grid/tile-grid.js +734 -0
- package/dist/toast/toast.d.ts +25 -0
- package/dist/toast/toast.js +92 -0
- package/dist/tree/navigator.d.ts +41 -0
- package/dist/tree/navigator.js +228 -0
- package/dist/window/chrome.d.ts +3 -0
- package/dist/window/chrome.js +7 -0
- package/dist/window/window.d.ts +46 -0
- package/dist/window/window.js +347 -0
- package/dist/window/workspace.d.ts +29 -0
- package/dist/window/workspace.js +137 -0
- package/package.json +45 -4
- package/styles/aster-ui.css +1147 -0
- package/styles/base.css +88 -0
- package/styles/contract.ts +41 -0
- package/styles/elements.css +1058 -0
- package/styles/harbour.css +126 -0
- package/styles/lamplight.css +118 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type Collection, type Entity, type KeyText, type Selection } from "@getaster/data";
|
|
2
|
+
import { AsterElement, type View } from "../base/element.ts";
|
|
3
|
+
import { type MenuItem } from "../menu/menu.ts";
|
|
4
|
+
export interface TileState {
|
|
5
|
+
readonly key: KeyText;
|
|
6
|
+
/** Position in the collection, not in the subset of loaded tiles. */
|
|
7
|
+
readonly index: number;
|
|
8
|
+
readonly selected: boolean;
|
|
9
|
+
readonly focused: boolean;
|
|
10
|
+
readonly hidden: ReadonlySet<string>;
|
|
11
|
+
/** One-based pick order, only in ordered selection mode. */
|
|
12
|
+
readonly selectionOrder: number | undefined;
|
|
13
|
+
}
|
|
14
|
+
export interface TileContent {
|
|
15
|
+
readonly title: string;
|
|
16
|
+
readonly description?: string;
|
|
17
|
+
readonly image?: string;
|
|
18
|
+
readonly imageAlt?: string;
|
|
19
|
+
readonly icon?: View;
|
|
20
|
+
}
|
|
21
|
+
export type TileRenderer = (entity: Entity, state: TileState) => View;
|
|
22
|
+
export type TilePresenter = (entity: Entity, state: TileState) => TileContent;
|
|
23
|
+
export interface TileOpenDetail {
|
|
24
|
+
readonly key: KeyText;
|
|
25
|
+
}
|
|
26
|
+
/** A collection layout grid, with optional uniform-row windowing and paging. */
|
|
27
|
+
export declare class TileGrid extends AsterElement {
|
|
28
|
+
#private;
|
|
29
|
+
get collection(): Collection | undefined;
|
|
30
|
+
set collection(v: Collection | undefined);
|
|
31
|
+
get selection(): Selection | undefined;
|
|
32
|
+
/** Allows this view to change selection; borrowed selection state remains visible. */
|
|
33
|
+
get selectable(): boolean;
|
|
34
|
+
set selectable(value: boolean);
|
|
35
|
+
set selection(v: Selection | undefined);
|
|
36
|
+
get label(): string;
|
|
37
|
+
set label(v: string);
|
|
38
|
+
get publish(): string;
|
|
39
|
+
set publish(v: string);
|
|
40
|
+
get presentTile(): TilePresenter | undefined;
|
|
41
|
+
set presentTile(v: TilePresenter | undefined);
|
|
42
|
+
get renderTile(): TileRenderer | undefined;
|
|
43
|
+
set renderTile(v: TileRenderer | undefined);
|
|
44
|
+
get actions(): ((entity: Entity, state: TileState) => readonly MenuItem[]) | undefined;
|
|
45
|
+
set actions(v: ((entity: Entity, state: TileState) => readonly MenuItem[]) | undefined);
|
|
46
|
+
get empty(): View;
|
|
47
|
+
set empty(v: View);
|
|
48
|
+
get layout(): "uniform" | "content";
|
|
49
|
+
set layout(v: "uniform" | "content");
|
|
50
|
+
/** Window uniform rows and load their pages. Content layout remains owner-loaded. */
|
|
51
|
+
get virtualized(): boolean;
|
|
52
|
+
set virtualized(v: boolean);
|
|
53
|
+
get activeKey(): KeyText | undefined;
|
|
54
|
+
connectedCallback(): void;
|
|
55
|
+
disconnectedCallback(): void;
|
|
56
|
+
focus(options?: FocusOptions): void;
|
|
57
|
+
tileFor(key: KeyText | undefined): HTMLElement | undefined;
|
|
58
|
+
/** Reveals a loaded key, even when its tile is outside the current window. */
|
|
59
|
+
focusTile(key: KeyText): void;
|
|
60
|
+
/** Loads and focuses a logical position. Returns false on failure or stale navigation. */
|
|
61
|
+
focusIndex(index: number): Promise<boolean>;
|
|
62
|
+
protected render(): View;
|
|
63
|
+
protected updated(): void;
|
|
64
|
+
}
|