@motifx-community/ui 0.1.0-beta.1 → 0.1.0-beta.3

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.

Potentially problematic release.


This version of @motifx-community/ui might be problematic. Click here for more details.

Files changed (259) hide show
  1. package/CHANGELOG.md +147 -8
  2. package/README.md +19 -13
  3. package/dist/components/accordion/Accordion.d.ts +3 -3
  4. package/dist/components/accordion/AccordionItem.d.ts +1 -1
  5. package/dist/components/calendar/Calendar.d.ts +12 -0
  6. package/dist/components/calendar/calendar-props.d.ts +5 -0
  7. package/dist/components/card/Card.d.ts +1 -1
  8. package/dist/components/contextmenu/ContextMenu.d.ts +1 -1
  9. package/dist/components/datagrid/DataGrid.d.ts +5 -5
  10. package/dist/components/datagrid/data-grid-props.d.ts +2 -2
  11. package/dist/components/datagrid/grid-adaptive-row-expanded-event-args.d.ts +1 -1
  12. package/dist/components/datagrid/grid-adaptive-row-expanding-event-args.d.ts +1 -1
  13. package/dist/components/datagrid/grid-grouping-changed-event-args.d.ts +1 -1
  14. package/dist/components/datagrid/grid-grouping-changing-event-args.d.ts +2 -2
  15. package/dist/components/datagrid/grid-master-detail.d.ts +1 -1
  16. package/dist/components/datagrid/grid-row-expanded-event-args.d.ts +1 -1
  17. package/dist/components/datagrid/grid-row-expanding-event-args.d.ts +1 -1
  18. package/dist/components/datagrid/grid-search-text-changed-event-args.d.ts +1 -1
  19. package/dist/components/datagrid/grid-search-text-changing-event-args.d.ts +1 -1
  20. package/dist/components/datagrid/grid-sort-changing-event-args.d.ts +1 -1
  21. package/dist/components/datagrid/model/GridSearch.d.ts +1 -1
  22. package/dist/components/daterangebox/DateRangeBox.d.ts +121 -0
  23. package/dist/components/daterangebox/date-range-box-props.d.ts +35 -0
  24. package/dist/components/daterangebox/date-range-preset.d.ts +6 -0
  25. package/dist/components/daterangebox/date-range.d.ts +2 -0
  26. package/dist/components/daterangebox/index.d.ts +4 -0
  27. package/dist/components/draggable/Draggable.d.ts +99 -0
  28. package/dist/components/draggable/DropTarget.d.ts +38 -0
  29. package/dist/components/draggable/draggable-event-args.d.ts +17 -0
  30. package/dist/components/draggable/draggable-props.d.ts +37 -0
  31. package/dist/components/draggable/drop-event-args.d.ts +11 -0
  32. package/dist/components/draggable/drop-target-props.d.ts +13 -0
  33. package/dist/components/draggable/index.d.ts +6 -0
  34. package/dist/components/fileuploader/FileUploader.d.ts +133 -0
  35. package/dist/components/fileuploader/file-uploader-props.d.ts +46 -0
  36. package/dist/components/fileuploader/files-added-event-args.d.ts +9 -0
  37. package/dist/components/fileuploader/index.d.ts +7 -0
  38. package/dist/components/fileuploader/upload-event-args.d.ts +10 -0
  39. package/dist/components/fileuploader/upload-item.d.ts +12 -0
  40. package/dist/components/fileuploader/upload-mode.d.ts +2 -0
  41. package/dist/components/fileuploader/upload-status.d.ts +2 -0
  42. package/dist/components/filterbuilder/FilterBuilder.d.ts +1 -1
  43. package/dist/components/gallery/Gallery.d.ts +132 -0
  44. package/dist/components/gallery/gallery-item-click-event-args.d.ts +9 -0
  45. package/dist/components/gallery/gallery-item.d.ts +18 -0
  46. package/dist/components/gallery/gallery-props.d.ts +38 -0
  47. package/dist/components/gallery/index.d.ts +6 -0
  48. package/dist/components/gallery/slide-changed-event-args.d.ts +11 -0
  49. package/dist/components/gallery/slide-changing-event-args.d.ts +14 -0
  50. package/dist/components/layout/ChildSettings.d.ts +1 -1
  51. package/dist/components/layout/DockPanel.d.ts +2 -2
  52. package/dist/components/layout/Grid.d.ts +1 -1
  53. package/dist/components/layout/SplitContainer.d.ts +1 -1
  54. package/dist/components/layout/Stack.d.ts +1 -1
  55. package/dist/components/loadpanel/LoadPanel.d.ts +70 -0
  56. package/dist/components/loadpanel/index.d.ts +3 -0
  57. package/dist/components/loadpanel/load-panel-props.d.ts +29 -0
  58. package/dist/components/loadpanel/load-panel-target.d.ts +3 -0
  59. package/dist/components/multiview/MultiView.d.ts +87 -0
  60. package/dist/components/multiview/View.d.ts +41 -0
  61. package/dist/components/multiview/index.d.ts +6 -0
  62. package/dist/components/multiview/multi-view-props.d.ts +24 -0
  63. package/dist/components/multiview/view-props.d.ts +15 -0
  64. package/dist/components/multiview/view-selecting-event-args.d.ts +15 -0
  65. package/dist/components/multiview/view-selection-changed-event-args.d.ts +12 -0
  66. package/dist/components/numberbox/number-box-props.d.ts +1 -1
  67. package/dist/components/popover/Popover.d.ts +98 -0
  68. package/dist/components/popover/index.d.ts +5 -0
  69. package/dist/components/popover/popover-close-reason.d.ts +2 -0
  70. package/dist/components/popover/popover-closing-event-args.d.ts +8 -0
  71. package/dist/components/popover/popover-props.d.ts +39 -0
  72. package/dist/components/popover/popover-show-on.d.ts +2 -0
  73. package/dist/components/resizable/Resizable.d.ts +84 -0
  74. package/dist/components/resizable/index.d.ts +3 -0
  75. package/dist/components/resizable/resizable-props.d.ts +41 -0
  76. package/dist/components/resizable/resize-event-args.d.ts +13 -0
  77. package/dist/components/scheduler/AppointmentEditor.d.ts +1 -1
  78. package/dist/components/scheduler/scheduler-props.d.ts +1 -1
  79. package/dist/components/scrollview/ScrollView.d.ts +109 -0
  80. package/dist/components/scrollview/index.d.ts +7 -0
  81. package/dist/components/scrollview/pull-down-event-args.d.ts +9 -0
  82. package/dist/components/scrollview/reach-bottom-event-args.d.ts +9 -0
  83. package/dist/components/scrollview/scroll-event-args.d.ts +7 -0
  84. package/dist/components/scrollview/scroll-view-bars.d.ts +2 -0
  85. package/dist/components/scrollview/scroll-view-direction.d.ts +2 -0
  86. package/dist/components/scrollview/scroll-view-props.d.ts +31 -0
  87. package/dist/components/skeleton/Skeleton.d.ts +1 -1
  88. package/dist/components/sortable/Sortable.d.ts +106 -0
  89. package/dist/components/sortable/index.d.ts +5 -0
  90. package/dist/components/sortable/sortable-drag-event-args.d.ts +15 -0
  91. package/dist/components/sortable/sortable-drop-event-args.d.ts +11 -0
  92. package/dist/components/sortable/sortable-orientation.d.ts +2 -0
  93. package/dist/components/sortable/sortable-props.d.ts +34 -0
  94. package/dist/components/speeddial/SpeedDial.d.ts +129 -0
  95. package/dist/components/speeddial/index.d.ts +6 -0
  96. package/dist/components/speeddial/speed-dial-action-click-event-args.d.ts +9 -0
  97. package/dist/components/speeddial/speed-dial-action.d.ts +25 -0
  98. package/dist/components/speeddial/speed-dial-event-args.d.ts +8 -0
  99. package/dist/components/speeddial/speed-dial-props.d.ts +49 -0
  100. package/dist/components/speeddial/speed-dial-tooltip.d.ts +3 -0
  101. package/dist/components/splitter/SplitPane.d.ts +45 -0
  102. package/dist/components/splitter/Splitter.d.ts +116 -0
  103. package/dist/components/splitter/index.d.ts +6 -0
  104. package/dist/components/splitter/split-pane-props.d.ts +21 -0
  105. package/dist/components/splitter/splitter-collapse-event-args.d.ts +13 -0
  106. package/dist/components/splitter/splitter-props.d.ts +25 -0
  107. package/dist/components/splitter/splitter-resize-event-args.d.ts +10 -0
  108. package/dist/components/stepper/Stepper.d.ts +121 -0
  109. package/dist/components/stepper/Wizard.d.ts +112 -0
  110. package/dist/components/stepper/WizardStep.d.ts +44 -0
  111. package/dist/components/stepper/index.d.ts +13 -0
  112. package/dist/components/stepper/step-changed-event-args.d.ts +11 -0
  113. package/dist/components/stepper/step-changing-event-args.d.ts +18 -0
  114. package/dist/components/stepper/stepper-item.d.ts +20 -0
  115. package/dist/components/stepper/stepper-label-position.d.ts +2 -0
  116. package/dist/components/stepper/stepper-orientation.d.ts +1 -0
  117. package/dist/components/stepper/stepper-props.d.ts +32 -0
  118. package/dist/components/stepper/stepper-status.d.ts +2 -0
  119. package/dist/components/stepper/wizard-finishing-event-args.d.ts +7 -0
  120. package/dist/components/stepper/wizard-props.d.ts +48 -0
  121. package/dist/components/stepper/wizard-step-props.d.ts +32 -0
  122. package/dist/components/tabdocs/TabDocumentManager.d.ts +1 -1
  123. package/dist/components/tabs/Tabs.d.ts +2 -2
  124. package/dist/components/tileview/TileView.d.ts +128 -0
  125. package/dist/components/tileview/index.d.ts +6 -0
  126. package/dist/components/tileview/tile-click-event-args.d.ts +9 -0
  127. package/dist/components/tileview/tile-reorder-event-args.d.ts +11 -0
  128. package/dist/components/tileview/tile-selection-changed-event-args.d.ts +11 -0
  129. package/dist/components/tileview/tile-view-item.d.ts +18 -0
  130. package/dist/components/tileview/tile-view-props.d.ts +38 -0
  131. package/dist/components/timeline/Timeline.d.ts +113 -0
  132. package/dist/components/timeline/index.d.ts +5 -0
  133. package/dist/components/timeline/timeline-item-click-event-args.d.ts +9 -0
  134. package/dist/components/timeline/timeline-item.d.ts +24 -0
  135. package/dist/components/timeline/timeline-props.d.ts +30 -0
  136. package/dist/components/timeline/timeline-selection-changed-event-args.d.ts +11 -0
  137. package/dist/components/tooltip/Tooltip.d.ts +1 -1
  138. package/dist/components/treeview/TreeView.d.ts +1 -1
  139. package/dist/components/validationsummary/ValidationSummary.d.ts +56 -0
  140. package/dist/components/validationsummary/index.d.ts +3 -0
  141. package/dist/components/validationsummary/summary-item-click-event-args.d.ts +11 -0
  142. package/dist/components/validationsummary/validation-summary-props.d.ts +17 -0
  143. package/dist/core/control.d.ts +4 -4
  144. package/dist/core/flow-home.d.ts +6 -0
  145. package/dist/core/fold-text.d.ts +6 -0
  146. package/dist/core/ui-locale.d.ts +0 -2
  147. package/dist/core/ui-strings.d.ts +67 -0
  148. package/dist/generated/tokens.d.ts +7270 -4490
  149. package/dist/index.d.ts +17 -1
  150. package/dist/index.js +27131 -20490
  151. package/dist/index.js.map +1 -1
  152. package/dist/locales/en.json +59 -1
  153. package/dist/locales/tr.json +59 -1
  154. package/dist/parts/slide/slide-track-host.d.ts +19 -0
  155. package/dist/parts/slide/slide-track.d.ts +45 -0
  156. package/dist/styles.css +4916 -206
  157. package/dist/tokens/index.d.ts +7270 -4490
  158. package/dist/tokens/index.js +7270 -4490
  159. package/dist/tokens/index.js.map +1 -1
  160. package/dist/tr-C5IXRzAH.js +1233 -0
  161. package/dist/tr-C5IXRzAH.js.map +1 -0
  162. package/docs/accordion.md +9 -9
  163. package/docs/actionsheet.md +2 -2
  164. package/docs/avatar.md +5 -5
  165. package/docs/badge.md +6 -6
  166. package/docs/bottomsheet.md +6 -6
  167. package/docs/breadcrumb.md +4 -4
  168. package/docs/button.md +10 -10
  169. package/docs/buttongroup.md +5 -5
  170. package/docs/calendar.md +6 -6
  171. package/docs/card.md +6 -6
  172. package/docs/checkbox.md +9 -9
  173. package/docs/chip.md +5 -5
  174. package/docs/colorbox.md +3 -3
  175. package/docs/combobox.md +7 -7
  176. package/docs/control.md +12 -12
  177. package/docs/datagrid-api.md +7 -7
  178. package/docs/datagrid-bands.md +1 -1
  179. package/docs/datagrid-drag-select.md +2 -2
  180. package/docs/datagrid-drag.md +1 -1
  181. package/docs/datagrid-editing.md +2 -2
  182. package/docs/datagrid-filtering.md +3 -3
  183. package/docs/datagrid-forms.md +1 -1
  184. package/docs/datagrid-grouping.md +1 -1
  185. package/docs/datagrid-layout.md +4 -4
  186. package/docs/datagrid-lookups.md +1 -1
  187. package/docs/datagrid-master-detail.md +3 -3
  188. package/docs/datagrid-scrolling.md +1 -1
  189. package/docs/datagrid-selection.md +3 -3
  190. package/docs/datagrid.md +8 -8
  191. package/docs/datebox.md +8 -8
  192. package/docs/daterangebox.md +192 -0
  193. package/docs/draggable.md +194 -0
  194. package/docs/drawer.md +1 -1
  195. package/docs/dropdown.md +10 -10
  196. package/docs/fileuploader.md +201 -0
  197. package/docs/filterbuilder.md +9 -9
  198. package/docs/formlayout.md +1 -1
  199. package/docs/gallery.md +244 -0
  200. package/docs/home.md +11 -7
  201. package/docs/keyboard.md +1 -1
  202. package/docs/language.md +229 -0
  203. package/docs/layout.md +15 -15
  204. package/docs/listbox.md +10 -10
  205. package/docs/loadpanel.md +184 -0
  206. package/docs/lookup.md +1 -1
  207. package/docs/menus.md +2 -2
  208. package/docs/multiview.md +202 -0
  209. package/docs/numberbox.md +9 -9
  210. package/docs/pagination.md +4 -4
  211. package/docs/popover.md +221 -0
  212. package/docs/progress.md +9 -9
  213. package/docs/radiogroup.md +7 -7
  214. package/docs/rating.md +4 -4
  215. package/docs/resizable.md +139 -0
  216. package/docs/scheduler-agenda.md +1 -1
  217. package/docs/scheduler-big-data.md +1 -1
  218. package/docs/scheduler-editing.md +5 -5
  219. package/docs/scheduler-form.md +1 -1
  220. package/docs/scheduler-icalendar.md +1 -1
  221. package/docs/scheduler-mobile.md +1 -1
  222. package/docs/scheduler-recurrence.md +2 -2
  223. package/docs/scheduler-resources.md +1 -1
  224. package/docs/scheduler-timeline.md +1 -1
  225. package/docs/scheduler.md +4 -4
  226. package/docs/scrollview.md +185 -0
  227. package/docs/showcase.md +1 -1
  228. package/docs/skeleton.md +2 -2
  229. package/docs/slider.md +9 -9
  230. package/docs/sortable.md +213 -0
  231. package/docs/speeddial.md +290 -0
  232. package/docs/splitter.md +204 -0
  233. package/docs/stepper.md +238 -0
  234. package/docs/switch.md +7 -7
  235. package/docs/tabdocs-dock.md +3 -3
  236. package/docs/tabdocs-drag.md +1 -1
  237. package/docs/tabdocs-menus.md +1 -1
  238. package/docs/tabdocs-mobile.md +1 -1
  239. package/docs/tabdocs-tabs.md +1 -1
  240. package/docs/tabdocs-windows.md +1 -1
  241. package/docs/tabdocs-workspace.md +1 -1
  242. package/docs/tabdocs.md +5 -5
  243. package/docs/tabs.md +11 -11
  244. package/docs/tagbox.md +10 -10
  245. package/docs/textarea.md +9 -9
  246. package/docs/textbox.md +10 -10
  247. package/docs/tileview.md +206 -0
  248. package/docs/timeline.md +174 -0
  249. package/docs/toast.md +7 -7
  250. package/docs/tokens.md +678 -122
  251. package/docs/toolbar.md +8 -8
  252. package/docs/tooltip.md +12 -12
  253. package/docs/treeview.md +11 -11
  254. package/docs/validationsummary.md +115 -0
  255. package/docs/window.md +7 -7
  256. package/docs/wizard.md +240 -0
  257. package/llms-full.txt +4813 -492
  258. package/llms.txt +21 -3
  259. package/package.json +9 -3
@@ -0,0 +1,121 @@
1
+ import { Component, Emitter, type Bind, type ComponentBase, type Event as MotifEvent, type IBaseProp } from "@motifx/core";
2
+ import { Control } from "../../core/control";
3
+ import type { ControlSize } from "../../core/control-size";
4
+ import type { IconSource } from "../../core/icon-source";
5
+ import type { StepChangedEventArgs } from "./step-changed-event-args";
6
+ import type { StepChangingEventArgs } from "./step-changing-event-args";
7
+ import type { StepperItem } from "./stepper-item";
8
+ import type { StepperLabelPosition } from "./stepper-label-position";
9
+ import type { StepperOrientation } from "./stepper-orientation";
10
+ import type { StepperProps } from "./stepper-props";
11
+ import type { StepperStatus } from "./stepper-status";
12
+ interface Look {
13
+ item: unknown;
14
+ key: string | null;
15
+ text: string;
16
+ description: string;
17
+ icon: IconSource | null;
18
+ status: 'done' | 'error' | 'pending' | null;
19
+ optional: boolean;
20
+ enabled: boolean;
21
+ }
22
+ interface Step {
23
+ li: Component<HTMLLIElement>;
24
+ face: Component<HTMLElement>;
25
+ indicator: Component<HTMLSpanElement>;
26
+ number: Component<HTMLSpanElement>;
27
+ mark: Component<HTMLSpanElement>;
28
+ icon: ComponentBase | null;
29
+ position: Component<HTMLSpanElement>;
30
+ label: Component<HTMLSpanElement>;
31
+ description: Component<HTMLSpanElement>;
32
+ note: Component<HTMLSpanElement>;
33
+ state: Component<HTMLSpanElement>;
34
+ line: Component<HTMLSpanElement>;
35
+ }
36
+ /**
37
+ * The steps of a longer task and where the user stands in them: a numbered indicator and a text per step, a line
38
+ * between them, the steps before the current one completed. A step is a button (`clickable`); in linear order a
39
+ * press reaches a completed step or the one right after the last completed, and `onStepChanging` may refuse or
40
+ * wait. One Tab stop: the arrow keys move between the steps, Enter and Space choose. The `Wizard` adds a page and
41
+ * the buttons to each step.
42
+ *
43
+ * @example
44
+ * <Stepper items={['Account', 'Address', 'Payment']} x-model={() => this.order.step} />
45
+ * <Stepper orientation="vertical" items={[{ text: 'Details', description: 'Name and e-mail' }, { text: 'Review', optional: true }]} />
46
+ */
47
+ export declare class Stepper extends Control<HTMLElement, StepperProps> {
48
+ changing: Emitter<StepChangingEventArgs>;
49
+ changed: Emitter<StepChangedEventArgs>;
50
+ list: Component<HTMLOListElement>;
51
+ steps: Step[];
52
+ looks: Look[];
53
+ stopItems: (() => void) | null;
54
+ focusedAt: number;
55
+ byUser: boolean;
56
+ ready: boolean;
57
+ guard: ((e: {
58
+ from: number;
59
+ to: number;
60
+ byUser: boolean;
61
+ }) => boolean | Promise<boolean>) | null;
62
+ constructor(props?: IBaseProp<StepperProps>);
63
+ previousIndex: number;
64
+ get items(): readonly (StepperItem | string)[];
65
+ set items(value: Bind<readonly (StepperItem | string)[]>);
66
+ get value(): string | number | null;
67
+ set value(value: Bind<string | number | null>);
68
+ get linear(): boolean;
69
+ set linear(value: Bind<boolean>);
70
+ get orientation(): StepperOrientation;
71
+ set orientation(value: Bind<StepperOrientation>);
72
+ get labelPosition(): StepperLabelPosition;
73
+ set labelPosition(value: Bind<StepperLabelPosition>);
74
+ get size(): ControlSize;
75
+ set size(value: Bind<ControlSize>);
76
+ get clickable(): boolean;
77
+ set clickable(value: Bind<boolean>);
78
+ get showNumbers(): boolean;
79
+ set showNumbers(value: Bind<boolean>);
80
+ get label(): string;
81
+ set label(value: Bind<string>);
82
+ /** The current step is about to change (`from`, `to`, `byUser`); `cancel` keeps it, `promise` waits. */
83
+ get onStepChanging(): MotifEvent<StepChangingEventArgs>;
84
+ /** The current step changed, by the user or programmatically (`byUser`). */
85
+ get onStepChanged(): MotifEvent<StepChangedEventArgs>;
86
+ /** The index of the current step; -1 when there is none. */
87
+ get selectedIndex(): number;
88
+ /** How many steps there are. */
89
+ get count(): number;
90
+ /** A step after the current one can be gone to with `next()`. */
91
+ get canGoNext(): boolean;
92
+ /** A step before the current one can be gone to with `previous()`. */
93
+ get canGoPrevious(): boolean;
94
+ /** The status of the step at `index`, as drawn. */
95
+ statusOf(index: number): StepperStatus;
96
+ /** Whether a press may reach the step at `index`: enabled, and in linear order with every step before it done or optional. */
97
+ canReach(index: number): boolean;
98
+ /** Goes to the step after the current one (the next enabled); `false` when there is none or the change was refused. */
99
+ next(): Promise<boolean>;
100
+ /** Goes to the step before the current one (the previous enabled). */
101
+ previous(): Promise<boolean>;
102
+ /** Goes to a step by index or key, whatever the order; `onStepChanging` is asked first. */
103
+ goTo(step: number | string): Promise<boolean>;
104
+ /** Reads the items again after they were changed in place. */
105
+ refresh(): void;
106
+ /** The index a value names: a key, else an index in range; -1 for none. */
107
+ indexOf(value: string | number | null | undefined): number;
108
+ /** The value that names the step at `index`: its key when it has one, else the index. */
109
+ valueAt(index: number): string | number;
110
+ renderName(): void;
111
+ renderItems(): void;
112
+ lookOf(item: unknown): Look;
113
+ drawSteps(): void;
114
+ makeStep(index: number, clickable: boolean): Step;
115
+ drawStates(): void;
116
+ drawStops(): void;
117
+ nextIndex(direction: 1 | -1): number;
118
+ go(to: number, byUser: boolean, event?: Event): Promise<boolean>;
119
+ keyDown(e: KeyboardEvent): void;
120
+ }
121
+ export {};
@@ -0,0 +1,112 @@
1
+ import { Component, Emitter, type Bind, type Event as MotifEvent, type IBaseProp } from "@motifx/core";
2
+ import { Control } from "../../core/control";
3
+ import type { ControlSize } from "../../core/control-size";
4
+ import { Button } from "../button/Button";
5
+ import type { StepChangedEventArgs } from "./step-changed-event-args";
6
+ import type { StepChangingEventArgs } from "./step-changing-event-args";
7
+ import { Stepper } from "./Stepper";
8
+ import type { StepperLabelPosition } from "./stepper-label-position";
9
+ import type { StepperOrientation } from "./stepper-orientation";
10
+ import type { WizardFinishingEventArgs } from "./wizard-finishing-event-args";
11
+ import type { WizardProps } from "./wizard-props";
12
+ import { WizardStep } from "./WizardStep";
13
+ /**
14
+ * A task in steps: a `Stepper` above (or beside) one page per step, and the Back and Next buttons under them. Next
15
+ * validates the page first: the kit's fields on it, then the step's own `validate`; a page that fails keeps the
16
+ * wizard and marks its step. On the last step Next finishes (`onFinishing`, `onFinished`). The steps are
17
+ * `WizardStep`s, from JSX or from `steps`, and the current one is `value` (`x-model`).
18
+ *
19
+ * @example
20
+ * <Wizard onFinished={() => this.save()}>
21
+ * <WizardStep title="Account"><TextBox label="E-mail" required /></WizardStep>
22
+ * <WizardStep title="Address"><TextBox label="City" required /></WizardStep>
23
+ * <WizardStep title="Review"><p>All set.</p></WizardStep>
24
+ * </Wizard>
25
+ *
26
+ * new Wizard({ steps: [{ title: 'Account', content: () => new AccountPage() }, { title: 'Done', content: () => new DonePage() }] });
27
+ */
28
+ export declare class Wizard extends Control<HTMLDivElement, WizardProps> {
29
+ stepper: Stepper;
30
+ pages: Component<HTMLDivElement>;
31
+ bar: Component<HTMLDivElement>;
32
+ previousButton: Button;
33
+ nextButton: Button;
34
+ steps: WizardStep[];
35
+ finishing: Emitter<WizardFinishingEventArgs>;
36
+ finished: Emitter<{
37
+ source: Wizard;
38
+ }>;
39
+ done: boolean;
40
+ shownStep: WizardStep | null;
41
+ ready: boolean;
42
+ constructor(props?: IBaseProp<WizardProps>);
43
+ get value(): string | number | null;
44
+ set value(value: Bind<string | number | null>);
45
+ get linear(): boolean;
46
+ set linear(value: Bind<boolean>);
47
+ get orientation(): StepperOrientation;
48
+ set orientation(value: Bind<StepperOrientation>);
49
+ get labelPosition(): StepperLabelPosition;
50
+ set labelPosition(value: Bind<StepperLabelPosition>);
51
+ get size(): ControlSize;
52
+ set size(value: Bind<ControlSize>);
53
+ get showStepper(): boolean;
54
+ set showStepper(value: Bind<boolean>);
55
+ get clickable(): boolean;
56
+ set clickable(value: Bind<boolean>);
57
+ get showNavigation(): boolean;
58
+ set showNavigation(value: Bind<boolean>);
59
+ get lazy(): boolean;
60
+ set lazy(value: Bind<boolean>);
61
+ get keepAlive(): boolean;
62
+ set keepAlive(value: Bind<boolean>);
63
+ get previousText(): string;
64
+ set previousText(value: Bind<string>);
65
+ get nextText(): string;
66
+ set nextText(value: Bind<string>);
67
+ get finishText(): string;
68
+ set finishText(value: Bind<string>);
69
+ get label(): string;
70
+ set label(value: Bind<string>);
71
+ /** The current step is about to change (the stepper's event); `cancel` keeps it, `promise` waits. */
72
+ get onStepChanging(): MotifEvent<StepChangingEventArgs>;
73
+ /** The current step changed (the stepper's event). */
74
+ get onStepChanged(): MotifEvent<StepChangedEventArgs>;
75
+ /** The last page passed and the wizard is about to finish; `cancel` keeps it open, `promise` waits. */
76
+ get onFinishing(): MotifEvent<WizardFinishingEventArgs>;
77
+ /** The wizard finished. */
78
+ get onFinished(): MotifEvent<{
79
+ source: Wizard;
80
+ }>;
81
+ /** The step of the current page; `null` when there is none. */
82
+ get currentStep(): WizardStep | null;
83
+ /** The index of the current step; -1 when there is none. */
84
+ get selectedIndex(): number;
85
+ /** The current step is the last one that can be gone to: Next finishes. */
86
+ get isLast(): boolean;
87
+ /** The wizard finished (`finish()` passed). */
88
+ get isFinished(): boolean;
89
+ /** Adds a step at the end. */
90
+ add(step: WizardStep): WizardStep;
91
+ /** Adds a step at `index`. */
92
+ insert(index: number, step: WizardStep): WizardStep;
93
+ /** Takes a step out and disposes it. */
94
+ remove(step: WizardStep): boolean;
95
+ /** Validates the page, then goes to the next step; on the last one, finishes. */
96
+ next(): Promise<boolean>;
97
+ /** Goes back a step; nothing is validated. */
98
+ previous(): Promise<boolean>;
99
+ /** Goes to a step by index or key; going forward validates the page. */
100
+ goTo(step: number | string): Promise<boolean>;
101
+ /** Validates the page, asks `onFinishing`, then finishes: every step is drawn done and `onFinished` is raised. */
102
+ finish(): Promise<boolean>;
103
+ /** Validates the current page the way Next does: the kit's fields on it, then the step's own `validate`. The step is marked when it fails. */
104
+ leaveCheck(): Promise<boolean>;
105
+ /** The stepper's items are made again from the steps: a step changed, came or went. */
106
+ stepsChanged(): void;
107
+ stepChanged(e: StepChangedEventArgs): void;
108
+ showPage(): void;
109
+ drawBar(): void;
110
+ lazyOf(step: WizardStep): boolean;
111
+ keepAliveOf(step: WizardStep): boolean;
112
+ }
@@ -0,0 +1,44 @@
1
+ import { type Bind, type IBaseProp } from "@motifx/core";
2
+ import { Control } from "../../core/control";
3
+ import type { IconSource } from "../../core/icon-source";
4
+ import { PanelContent } from "../tabs/PanelContent";
5
+ import type { Wizard } from "./Wizard";
6
+ import type { WizardStepProps } from "./wizard-step-props";
7
+ /**
8
+ * One step of a {@link Wizard}: its entry in the stepper and its page. The JSX children are the page, built when
9
+ * the step is first shown (see `lazy`); `content` makes it programmatically.
10
+ *
11
+ * @example
12
+ * <Wizard>
13
+ * <WizardStep title="Account"><TextBox label="E-mail" required /></WizardStep>
14
+ * <WizardStep title="Done" content={() => new Summary()} />
15
+ * </Wizard>
16
+ */
17
+ export declare class WizardStep extends Control<HTMLDivElement, WizardStepProps> {
18
+ content: PanelContent;
19
+ validate: (() => boolean | Promise<boolean>) | null;
20
+ owner: Wizard | null;
21
+ constructor(props?: IBaseProp<WizardStepProps>);
22
+ get title(): string;
23
+ set title(value: Bind<string>);
24
+ get description(): string;
25
+ set description(value: Bind<string>);
26
+ get key(): string | undefined;
27
+ set key(value: Bind<string>);
28
+ get icon(): IconSource | null;
29
+ set icon(value: Bind<IconSource | null | undefined>);
30
+ get optional(): boolean;
31
+ set optional(value: Bind<boolean>);
32
+ get error(): boolean;
33
+ set error(value: Bind<boolean>);
34
+ get lazy(): boolean | undefined;
35
+ set lazy(value: Bind<boolean | undefined>);
36
+ get keepAlive(): boolean | undefined;
37
+ set keepAlive(value: Bind<boolean | undefined>);
38
+ get validateFields(): boolean;
39
+ set validateFields(value: Bind<boolean>);
40
+ /** Whether this is the wizard's current step. */
41
+ get isCurrent(): boolean;
42
+ /** The wizard the step is in. */
43
+ get wizard(): Wizard | null;
44
+ }
@@ -0,0 +1,13 @@
1
+ export { Stepper } from './Stepper';
2
+ export { Wizard } from './Wizard';
3
+ export { WizardStep } from './WizardStep';
4
+ export type { StepperItem } from './stepper-item';
5
+ export type { StepperProps } from './stepper-props';
6
+ export type { StepperStatus } from './stepper-status';
7
+ export type { StepperOrientation } from './stepper-orientation';
8
+ export type { StepperLabelPosition } from './stepper-label-position';
9
+ export type { StepChangingEventArgs } from './step-changing-event-args';
10
+ export type { StepChangedEventArgs } from './step-changed-event-args';
11
+ export type { WizardProps } from './wizard-props';
12
+ export type { WizardStepProps } from './wizard-step-props';
13
+ export type { WizardFinishingEventArgs } from './wizard-finishing-event-args';
@@ -0,0 +1,11 @@
1
+ import type { Stepper } from './Stepper';
2
+ /** The current step changed. */
3
+ export interface StepChangedEventArgs {
4
+ index: number;
5
+ /** The item as given; `null` when there is no current step. */
6
+ item: unknown;
7
+ previous: number;
8
+ /** By a press on a step, else programmatically. */
9
+ byUser: boolean;
10
+ source: Stepper;
11
+ }
@@ -0,0 +1,18 @@
1
+ import type { EventArgs } from '@motifx/core';
2
+ import type { Stepper } from './Stepper';
3
+ /**
4
+ * The current step is about to change. `cancel = true` keeps it; `promise` may be set to wait (a validation, a
5
+ * server): the step changes when it resolves to `true`.
6
+ */
7
+ export interface StepChangingEventArgs extends EventArgs {
8
+ from: number;
9
+ to: number;
10
+ /** The items as given; `null` when there is none (no current step). */
11
+ fromItem: unknown;
12
+ toItem: unknown;
13
+ /** By a press on a step, else programmatically. */
14
+ byUser: boolean;
15
+ promise?: Promise<boolean>;
16
+ source: Stepper;
17
+ event?: Event;
18
+ }
@@ -0,0 +1,20 @@
1
+ import type { Bind } from '@motifx/core';
2
+ import type { IconSource } from '../../core/icon-source';
3
+ /** One step of a `Stepper`. Its fields may be functions of reactive state: the stepper follows them. */
4
+ export interface StepperItem {
5
+ text: Bind<string>;
6
+ /** A second line under the text. */
7
+ description?: Bind<string>;
8
+ /** Names the step in `value`; without it the step's index does. */
9
+ key?: string;
10
+ /** Drawn in the indicator in place of the number. */
11
+ icon?: Bind<IconSource | null>;
12
+ /** `done` or `error` whatever the current step is; left out, the steps before the current one are done. */
13
+ status?: Bind<'done' | 'error' | 'pending' | null>;
14
+ /** May be skipped in linear order; says so under the text. */
15
+ optional?: Bind<boolean>;
16
+ /** `false` keeps it from being chosen. Default `true`. */
17
+ enabled?: Bind<boolean>;
18
+ /** The app's own value for the step. */
19
+ data?: unknown;
20
+ }
@@ -0,0 +1,2 @@
1
+ /** Where a step's texts sit next to its indicator: after it, or under it (horizontal steppers only). */
2
+ export type StepperLabelPosition = 'end' | 'bottom';
@@ -0,0 +1 @@
1
+ export type StepperOrientation = 'horizontal' | 'vertical';
@@ -0,0 +1,32 @@
1
+ import type { Bind } from '@motifx/core';
2
+ import type { ControlProps } from '../../core/control';
3
+ import type { ControlSize } from '../../core/control-size';
4
+ import type { StepChangedEventArgs } from './step-changed-event-args';
5
+ import type { StepChangingEventArgs } from './step-changing-event-args';
6
+ import type { StepperItem } from './stepper-item';
7
+ import type { StepperLabelPosition } from './stepper-label-position';
8
+ import type { StepperOrientation } from './stepper-orientation';
9
+ /** Props of `Stepper`. Each one is also a settable property; a function is followed. */
10
+ export interface StepperProps extends ControlProps {
11
+ /** The steps in order: `StepperItem`s or plain texts. */
12
+ items?: Bind<readonly (StepperItem | string)[]>;
13
+ /** The current step: its `key`, else its index. `x-model` binds it two-way. Default `0`; `null` for none. */
14
+ value?: Bind<string | number | null>;
15
+ /** The steps are taken in order: a press reaches a completed step, or the one right after the last completed. Default `true`. */
16
+ linear?: Bind<boolean>;
17
+ /** Default `'horizontal'`. */
18
+ orientation?: Bind<StepperOrientation>;
19
+ /** Where the texts sit next to the indicator in a horizontal stepper. Default `'bottom'`. */
20
+ labelPosition?: Bind<StepperLabelPosition>;
21
+ /** Default `'md'`. */
22
+ size?: Bind<ControlSize>;
23
+ /** The steps can be pressed. `false` shows the way only. Default `true`. */
24
+ clickable?: Bind<boolean>;
25
+ /** The indicator of a step to come shows its number. Default `true`. */
26
+ showNumbers?: Bind<boolean>;
27
+ /** What screen readers call it. Default: the kit's "Steps". */
28
+ label?: Bind<string>;
29
+ /** The current step is about to change; cancelable, may wait on `promise`. */
30
+ onStepChanging?: (e: StepChangingEventArgs) => void;
31
+ onStepChanged?: (e: StepChangedEventArgs) => void;
32
+ }
@@ -0,0 +1,2 @@
1
+ /** Where a step stands: still to come, the one in hand, completed, or with an error. */
2
+ export type StepperStatus = 'pending' | 'current' | 'done' | 'error';
@@ -0,0 +1,7 @@
1
+ import type { EventArgs } from '@motifx/core';
2
+ import type { Wizard } from './Wizard';
3
+ /** The wizard is about to finish (after the last page validated). `cancel = true` keeps it open; `promise` may be set to wait: it finishes when it resolves to `true`. */
4
+ export interface WizardFinishingEventArgs extends EventArgs {
5
+ promise?: Promise<boolean>;
6
+ source: Wizard;
7
+ }
@@ -0,0 +1,48 @@
1
+ import type { Bind } from '@motifx/core';
2
+ import type { ControlProps } from '../../core/control';
3
+ import type { ControlSize } from '../../core/control-size';
4
+ import type { StepChangedEventArgs } from './step-changed-event-args';
5
+ import type { StepChangingEventArgs } from './step-changing-event-args';
6
+ import type { StepperLabelPosition } from './stepper-label-position';
7
+ import type { StepperOrientation } from './stepper-orientation';
8
+ import type { WizardFinishingEventArgs } from './wizard-finishing-event-args';
9
+ import type { WizardStepProps } from './wizard-step-props';
10
+ /** Props of `Wizard`. Each one is also a settable property; a function is followed. */
11
+ export interface WizardProps extends ControlProps {
12
+ /** Steps made programmatically, each as the props of a `WizardStep` (`title`, `content`, …); the JSX `WizardStep` children come first. */
13
+ steps?: readonly WizardStepProps[];
14
+ /** The current step: its `key`, else its index. `x-model` binds it two-way. Default `0`. */
15
+ value?: Bind<string | number | null>;
16
+ /** The steps are taken in order: a step is reached only after the ones before it. Default `true`. */
17
+ linear?: Bind<boolean>;
18
+ /** `horizontal`: the stepper above the pages; `vertical`: beside them. Default `'horizontal'`. */
19
+ orientation?: Bind<StepperOrientation>;
20
+ /** Where the stepper's texts sit, horizontal only. Default `'bottom'`. */
21
+ labelPosition?: Bind<StepperLabelPosition>;
22
+ /** The stepper's size. Default `'md'`. */
23
+ size?: Bind<ControlSize>;
24
+ /** The stepper is shown. Default `true`. */
25
+ showStepper?: Bind<boolean>;
26
+ /** The steps of the stepper can be pressed. Default `true`. */
27
+ clickable?: Bind<boolean>;
28
+ /** The bar with the Back and Next buttons. Default `true`. */
29
+ showNavigation?: Bind<boolean>;
30
+ /** A page is built when first shown, then kept (a step's own `lazy` wins). Default `true`. */
31
+ lazy?: Bind<boolean>;
32
+ /** `false`: content made by a step's `content` is disposed while hidden (a step's own `keepAlive` wins). Default `true`. */
33
+ keepAlive?: Bind<boolean>;
34
+ /** The buttons' texts; the kit's “Back”, “Next” and “Finish” when not given. */
35
+ previousText?: Bind<string>;
36
+ nextText?: Bind<string>;
37
+ finishText?: Bind<string>;
38
+ /** What screen readers call the stepper. Default: the kit's "Steps". */
39
+ label?: Bind<string>;
40
+ /** The current step is about to change; cancelable, may wait on `promise`. */
41
+ onStepChanging?: (e: StepChangingEventArgs) => void;
42
+ onStepChanged?: (e: StepChangedEventArgs) => void;
43
+ /** The last page validated and the wizard is about to finish; cancelable, may wait on `promise`. */
44
+ onFinishing?: (e: WizardFinishingEventArgs) => void;
45
+ onFinished?: (e: {
46
+ source: unknown;
47
+ }) => void;
48
+ }
@@ -0,0 +1,32 @@
1
+ import type { Bind } from '@motifx/core';
2
+ import type { ControlProps } from '../../core/control';
3
+ import type { IconSource } from '../../core/icon-source';
4
+ import type { ContentFactory } from '../tabs/PanelContent';
5
+ /**
6
+ * Props of `WizardStep`: one step of a `Wizard`, its JSX children the page. Each one is also a settable property.
7
+ * `lazy` and `keepAlive` left unset follow the `Wizard`.
8
+ */
9
+ export interface WizardStepProps extends ControlProps {
10
+ /** The step's text in the stepper. The same property as `text`. */
11
+ title?: Bind<string>;
12
+ /** A second line under the title. */
13
+ description?: Bind<string>;
14
+ /** Names the step in `Wizard.value`; without it the step's index does. */
15
+ key?: Bind<string>;
16
+ /** Drawn in the indicator in place of the number. */
17
+ icon?: Bind<IconSource | null | undefined>;
18
+ /** May be skipped; says so under the title. */
19
+ optional?: Bind<boolean>;
20
+ /** `true` draws the step with an error; the wizard sets it when the page does not validate. */
21
+ error?: Bind<boolean>;
22
+ /** Builds the page when it is first shown. */
23
+ lazy?: Bind<boolean | undefined>;
24
+ /** `false`: what `content` made is disposed while the page is hidden and made again when it shows. */
25
+ keepAlive?: Bind<boolean | undefined>;
26
+ /** The kit's fields on the page are validated before the wizard moves on from it. Default `true`. */
27
+ validateFields?: Bind<boolean>;
28
+ /** Asked before the wizard moves on from the page; `false` (or a promise of it) keeps the page and marks the step. */
29
+ validate?: () => boolean | Promise<boolean>;
30
+ /** Makes the page content, called when the page is built (instead of, or after, the JSX children). */
31
+ content?: ContentFactory;
32
+ }
@@ -937,7 +937,7 @@ export declare class TabDocumentManager extends FocusContainer<HTMLDivElement, T
937
937
  * active one staying active. A window left empty closes.
938
938
  */
939
939
  private mainWindowBy;
940
- /** Closes a new window from code or a menu: its documents go back, or close (those that stay keep it open). */
940
+ /** Closes a new window programmatically or a menu: its documents go back, or close (those that stay keep it open). */
941
941
  private closeBrowserBy;
942
942
  /** The floating windows a layout saved as new windows: each one opens as a new window again, if the browser lets it. */
943
943
  private reopenWindowsBy;
@@ -11,7 +11,7 @@ import type { TabsProps } from './tabs-props';
11
11
  import type { TabsVariant } from './tabs-variant';
12
12
  /**
13
13
  * Tabs: a strip of tabs and the panel of the selected one, following the ARIA tabs pattern.
14
- * Tabs come as `<Tab>` children or from code (`add`, `insert`, `remove`); `value` (two-way with
14
+ * Tabs come as `<Tab>` children or programmatically (`add`, `insert`, `remove`); `value` (two-way with
15
15
  * `x-model`) is the selected tab's `key`, else its index. Arrow keys move along the strip (and
16
16
  * select, with `activation="auto"`), Home and End go to the ends, Delete closes a closable tab,
17
17
  * a tab's `&` key selects it. Panels are built when first shown (`lazy`).
@@ -68,7 +68,7 @@ export declare class Tabs extends Control<HTMLDivElement, TabsProps> {
68
68
  insert(index: number, tab: Tab): Tab;
69
69
  /** Removes a tab and disposes it; the selection moves to a neighbour. No `onClose`. */
70
70
  remove(tab: Tab): boolean;
71
- /** Selects a tab (or the tab at an index) from code; `false` when it is hidden or not here. */
71
+ /** Selects a tab (or the tab at an index) programmatically; `false` when it is hidden or not here. */
72
72
  select(tab: Tab | number): boolean;
73
73
  /** Closes a tab as the user would: `onClose` can cancel it. */
74
74
  close(tab: Tab, byUser?: boolean, event?: Event): boolean;
@@ -0,0 +1,128 @@
1
+ import { Component, Emitter, type Bind, type ComponentBase, type Event as MotifEvent, type IBaseProp } from "@motifx/core";
2
+ import { Control } from "../../core/control";
3
+ import { DragGhost } from "../../parts/drag/DragGhost";
4
+ import type { TileClickEventArgs } from "./tile-click-event-args";
5
+ import type { TileReorderEventArgs } from "./tile-reorder-event-args";
6
+ import type { TileSelectionChangedEventArgs } from "./tile-selection-changed-event-args";
7
+ import type { TileViewItem } from "./tile-view-item";
8
+ import type { TileViewDirection, TileViewProps, TileViewSelectionMode } from "./tile-view-props";
9
+ interface Look {
10
+ item: unknown;
11
+ key: string | null;
12
+ text: string;
13
+ widthRatio: number;
14
+ heightRatio: number;
15
+ content: (() => ComponentBase) | null;
16
+ enabled: boolean;
17
+ }
18
+ interface Tile {
19
+ item: unknown;
20
+ el: Component<HTMLDivElement>;
21
+ text: Component<HTMLSpanElement>;
22
+ content: ComponentBase | null;
23
+ }
24
+ interface Session {
25
+ pointerId: number;
26
+ touch: boolean;
27
+ startX: number;
28
+ startY: number;
29
+ x: number;
30
+ y: number;
31
+ fromIndex: number;
32
+ element: HTMLElement;
33
+ started: boolean;
34
+ toIndex: number;
35
+ timer: ReturnType<typeof setTimeout> | null;
36
+ frame: number;
37
+ }
38
+ /**
39
+ * Tiles of different sizes packed on a grid of base cells: a tile is `widthRatio` × `heightRatio` cells. They
40
+ * fill the height in columns and the view scrolls sideways (`horizontal`), or fill the width in rows
41
+ * (`vertical`). Tiles can be chosen (`selectionMode`) and put in another order by dragging or with Ctrl and an
42
+ * arrow key (`allowReorder`); a drop tells `onReordered` with the indexes, your data is yours to reorder.
43
+ *
44
+ * @example
45
+ * <TileView height={320} items={[{ text: 'Sales', widthRatio: 2 }, { text: 'Stock' }, { text: 'Staff', heightRatio: 2 }]} />
46
+ * <TileView direction="vertical" selectionMode="multiple" x-model={() => this.chosen} items={() => this.tiles} />
47
+ */
48
+ export declare class TileView extends Control<HTMLDivElement, TileViewProps> {
49
+ itemClick: Emitter<TileClickEventArgs>;
50
+ selectionChanged: Emitter<TileSelectionChangedEventArgs>;
51
+ reordering: Emitter<TileReorderEventArgs>;
52
+ reordered: Emitter<TileReorderEventArgs>;
53
+ grid: Component<HTMLDivElement>;
54
+ live: Component<HTMLSpanElement>;
55
+ ghost: DragGhost;
56
+ tiles: Map<unknown, Tile>;
57
+ looks: Look[];
58
+ stopItems: (() => void) | null;
59
+ stops: (() => void)[];
60
+ session: Session | null;
61
+ focusedAt: number;
62
+ byUser: boolean;
63
+ ready: boolean;
64
+ lastSelection: string;
65
+ constructor(props?: IBaseProp<TileViewProps>);
66
+ get items(): readonly (TileViewItem | string)[];
67
+ set items(value: Bind<readonly (TileViewItem | string)[]>);
68
+ get baseItemWidth(): number;
69
+ set baseItemWidth(value: Bind<number>);
70
+ get baseItemHeight(): number;
71
+ set baseItemHeight(value: Bind<number>);
72
+ get direction(): TileViewDirection;
73
+ set direction(value: Bind<TileViewDirection>);
74
+ get selectionMode(): TileViewSelectionMode;
75
+ set selectionMode(value: Bind<TileViewSelectionMode>);
76
+ get value(): string | number | null | readonly (string | number)[];
77
+ set value(value: Bind<string | number | null | readonly (string | number)[]>);
78
+ get allowReorder(): boolean;
79
+ set allowReorder(value: Bind<boolean>);
80
+ get height(): string | number | null;
81
+ set height(value: Bind<string | number | null>);
82
+ get label(): string;
83
+ set label(value: Bind<string>);
84
+ /** A press on a tile that was not a drag. */
85
+ get onItemClick(): MotifEvent<TileClickEventArgs>;
86
+ /** The chosen tiles changed (`indexes`, `items`, `byUser`). */
87
+ get onSelectionChanged(): MotifEvent<TileSelectionChangedEventArgs>;
88
+ /** A tile is about to be dragged or moved with the keys; `cancel` keeps it where it is. */
89
+ get onReordering(): MotifEvent<TileReorderEventArgs>;
90
+ /** A tile was moved to another place (`fromIndex`, `toIndex`). */
91
+ get onReordered(): MotifEvent<TileReorderEventArgs>;
92
+ /** The chosen tiles' indexes, in tile order. */
93
+ get selectedIndexes(): number[];
94
+ /** How many tiles there are. */
95
+ get count(): number;
96
+ /** Whether a tile is being dragged. */
97
+ get isDragging(): boolean;
98
+ /** The index a value names: a key, else an index in range; -1 for none. */
99
+ indexOf(value: string | number | null | undefined): number;
100
+ /** The value that names the tile at `index`: its key when it has one, else the index. */
101
+ valueAt(index: number): string | number;
102
+ /** Chooses a tile programmatically: the only one (`single`), or one more (`multiple`). */
103
+ select(index: number): void;
104
+ /** Reads the items again after they were changed in place. */
105
+ refresh(): void;
106
+ renderName(): void;
107
+ renderItems(): void;
108
+ lookOf(item: unknown): Look;
109
+ drawTiles(): void;
110
+ makeTile(look: Look): Tile;
111
+ tileElements(): HTMLElement[];
112
+ drawRole(): void;
113
+ drawStates(): void;
114
+ drawStops(): void;
115
+ choose(index: number, byUser: boolean, how: 'only' | 'add' | 'toggle'): void;
116
+ click(e: MouseEvent): void;
117
+ neighbour(from: number, dx: number, dy: number): number;
118
+ keyDown(e: KeyboardEvent): void;
119
+ move(from: number, to: number, event: Event | undefined, ask: boolean): boolean;
120
+ pointerDown(e: PointerEvent): void;
121
+ pointerMove(e: PointerEvent): void;
122
+ pointerUp(e: PointerEvent): void;
123
+ start(e: PointerEvent): boolean;
124
+ track(): void;
125
+ autoScroll(): void;
126
+ end(e: Event | null, drop: boolean): void;
127
+ }
128
+ export {};
@@ -0,0 +1,6 @@
1
+ export { TileView } from './TileView';
2
+ export type { TileViewItem } from './tile-view-item';
3
+ export type { TileViewProps, TileViewDirection, TileViewSelectionMode } from './tile-view-props';
4
+ export type { TileClickEventArgs } from './tile-click-event-args';
5
+ export type { TileSelectionChangedEventArgs } from './tile-selection-changed-event-args';
6
+ export type { TileReorderEventArgs } from './tile-reorder-event-args';