@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.
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,9 @@
1
+ import type { TileView } from './TileView';
2
+ /** A press on a tile that was not a drag. */
3
+ export interface TileClickEventArgs {
4
+ index: number;
5
+ /** The item as given. */
6
+ item: unknown;
7
+ source: TileView;
8
+ event: Event;
9
+ }
@@ -0,0 +1,11 @@
1
+ import type { EventArgs } from '@motifx/core';
2
+ import type { TileView } from './TileView';
3
+ /** A tile is about to be moved (`onReordering`, `cancel = true` keeps it) or was moved (`onReordered`): from one index to another. */
4
+ export interface TileReorderEventArgs extends EventArgs {
5
+ /** The item as given. */
6
+ item: unknown;
7
+ fromIndex: number;
8
+ toIndex: number;
9
+ source: TileView;
10
+ event?: Event;
11
+ }
@@ -0,0 +1,11 @@
1
+ import type { TileView } from './TileView';
2
+ /** The chosen tiles changed. */
3
+ export interface TileSelectionChangedEventArgs {
4
+ /** The chosen tiles' indexes, in tile order. */
5
+ indexes: number[];
6
+ /** Their items as given. */
7
+ items: unknown[];
8
+ /** By a press or a key, else programmatically. */
9
+ byUser: boolean;
10
+ source: TileView;
11
+ }
@@ -0,0 +1,18 @@
1
+ import type { Bind, ComponentBase } from '@motifx/core';
2
+ /** A tile of the `TileView`: a text, or any content, on a tile of so many base cells. Each field may be a function of your state. */
3
+ export interface TileViewItem {
4
+ /** Names the tile in `value`; without one its index does. */
5
+ key?: string;
6
+ /** The tile's text. */
7
+ text?: Bind<string>;
8
+ /** How many base cells wide the tile is. Default `1`. */
9
+ widthRatio?: Bind<number>;
10
+ /** How many base cells tall the tile is. Default `1`. */
11
+ heightRatio?: Bind<number>;
12
+ /** Any content in place of the text, made when the tile is. */
13
+ content?: () => ComponentBase;
14
+ /** A tile that cannot be chosen or moved. Default `true`. */
15
+ enabled?: Bind<boolean>;
16
+ /** Anything of your own; the item comes back as given in the events. */
17
+ data?: unknown;
18
+ }
@@ -0,0 +1,38 @@
1
+ import type { Bind } from '@motifx/core';
2
+ import type { ControlProps } from '../../core/control';
3
+ import type { TileClickEventArgs } from './tile-click-event-args';
4
+ import type { TileReorderEventArgs } from './tile-reorder-event-args';
5
+ import type { TileSelectionChangedEventArgs } from './tile-selection-changed-event-args';
6
+ import type { TileViewItem } from './tile-view-item';
7
+ /** Tiles flow down the columns (`horizontal`, the view scrolls sideways) or along the rows (`vertical`). */
8
+ export type TileViewDirection = 'horizontal' | 'vertical';
9
+ /** `none`: nothing is chosen; `single`: one tile; `multiple`: any number. */
10
+ export type TileViewSelectionMode = 'none' | 'single' | 'multiple';
11
+ /** Props of `TileView`. Each one is also a settable property; a function is followed. */
12
+ export interface TileViewProps extends ControlProps {
13
+ /** The tiles in order: `TileViewItem`s or plain texts. */
14
+ items?: Bind<readonly (TileViewItem | string)[]>;
15
+ /** A base cell's width in pixels; a tile is `widthRatio` of them. Default `100`. */
16
+ baseItemWidth?: Bind<number>;
17
+ /** A base cell's height in pixels; a tile is `heightRatio` of them. Default `100`. */
18
+ baseItemHeight?: Bind<number>;
19
+ /** Default `'horizontal'`: the tiles fill the height in columns, the view scrolls sideways; give it a `height`. */
20
+ direction?: Bind<TileViewDirection>;
21
+ /** Default `'none'`. */
22
+ selectionMode?: Bind<TileViewSelectionMode>;
23
+ /** The chosen tile (`single`): its `key`, else its index; the chosen tiles (`multiple`) as a list. `x-model` binds it two-way. */
24
+ value?: Bind<string | number | null | readonly (string | number)[]>;
25
+ /** The tiles can be put in another order by dragging, or with Ctrl and an arrow key. Default `false`. */
26
+ allowReorder?: Bind<boolean>;
27
+ /** The view's height, a CSS length or pixels. */
28
+ height?: Bind<string | number | null>;
29
+ /** What screen readers call it. Default: the kit's "Tiles". */
30
+ label?: Bind<string>;
31
+ /** A press on a tile that was not a drag. */
32
+ onItemClick?: (e: TileClickEventArgs) => void;
33
+ onSelectionChanged?: (e: TileSelectionChangedEventArgs) => void;
34
+ /** A tile is about to be dragged; cancelable. */
35
+ onReordering?: (e: TileReorderEventArgs) => void;
36
+ /** A tile was dropped or moved with the keys to a new place: your data is yours to reorder. */
37
+ onReordered?: (e: TileReorderEventArgs) => void;
38
+ }
@@ -0,0 +1,113 @@
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 { IconSource } from "../../core/icon-source";
4
+ import type { TimelineItem, TimelineTone } from "./timeline-item";
5
+ import type { TimelineItemClickEventArgs } from "./timeline-item-click-event-args";
6
+ import type { TimelineDateFormat, TimelineOrientation, TimelineProps } from "./timeline-props";
7
+ import type { TimelineSelectionChangedEventArgs } from "./timeline-selection-changed-event-args";
8
+ interface Look {
9
+ item: unknown;
10
+ key: string | null;
11
+ date: Date | null;
12
+ title: string;
13
+ description: string;
14
+ glyph: string;
15
+ icon: IconSource | null;
16
+ tone: TimelineTone;
17
+ content: (() => ComponentBase) | null;
18
+ }
19
+ interface Entry {
20
+ item: unknown;
21
+ li: Component<HTMLLIElement>;
22
+ dot: Component<HTMLSpanElement>;
23
+ dotGlyph: Component<HTMLSpanElement>;
24
+ dotIcon: ComponentBase | null;
25
+ face: Component<HTMLElement>;
26
+ date: Component<HTMLTimeElement>;
27
+ title: Component<HTMLSpanElement>;
28
+ description: Component<HTMLDivElement> | null;
29
+ content: ComponentBase | null;
30
+ }
31
+ /**
32
+ * Events in time order: down the page, each a card beside a line with a dot (the cards taking turns on either side
33
+ * when `alternate`, folded until pressed when `collapsible`); or along a line of dates (`horizontal`), where a
34
+ * press on a date, or the arrow keys, shows that event's card under the line. The dates are written in the kit's
35
+ * language.
36
+ *
37
+ * @example
38
+ * <Timeline items={[{ date: '2026-03-01', title: 'Kick-off', description: 'The plan agreed' }, { date: '2026-05-14', title: 'Beta', tone: 'accent' }]} />
39
+ * <Timeline orientation="horizontal" items={() => this.milestones} x-model={() => this.shown} />
40
+ */
41
+ export declare class Timeline extends Control<HTMLDivElement, TimelineProps> {
42
+ itemClick: Emitter<TimelineItemClickEventArgs>;
43
+ selectionChanged: Emitter<TimelineSelectionChangedEventArgs>;
44
+ track: Component<HTMLDivElement>;
45
+ list: Component<HTMLOListElement>;
46
+ previousButton: Component<HTMLButtonElement>;
47
+ nextButton: Component<HTMLButtonElement>;
48
+ detail: Component<HTMLDivElement>;
49
+ detailDate: Component<HTMLTimeElement>;
50
+ detailTitle: Component<HTMLSpanElement>;
51
+ detailDescription: Component<HTMLDivElement>;
52
+ detailContent: Component<HTMLDivElement>;
53
+ entries: Entry[];
54
+ looks: Look[];
55
+ expanded: Set<unknown>;
56
+ stopItems: (() => void) | null;
57
+ drawnAs: TimelineOrientation | null;
58
+ previousIndex: number;
59
+ byUser: boolean;
60
+ ready: boolean;
61
+ constructor(props?: IBaseProp<TimelineProps>);
62
+ get items(): readonly TimelineItem[];
63
+ set items(value: Bind<readonly TimelineItem[]>);
64
+ get orientation(): TimelineOrientation;
65
+ set orientation(value: Bind<TimelineOrientation>);
66
+ get alternate(): boolean;
67
+ set alternate(value: Bind<boolean>);
68
+ get collapsible(): boolean;
69
+ set collapsible(value: Bind<boolean>);
70
+ get dateFormat(): TimelineDateFormat;
71
+ set dateFormat(value: Bind<TimelineDateFormat>);
72
+ get value(): string | number | null;
73
+ set value(value: Bind<string | number | null>);
74
+ get label(): string;
75
+ set label(value: Bind<string>);
76
+ /** A press on an event's card or flag (`index`, `item`). */
77
+ get onItemClick(): MotifEvent<TimelineItemClickEventArgs>;
78
+ /** Horizontal: the shown event changed (`index`, `item`, `previous`, `byUser`). */
79
+ get onSelectionChanged(): MotifEvent<TimelineSelectionChangedEventArgs>;
80
+ /** Horizontal: the index of the shown event; -1 when there is none. */
81
+ get selectedIndex(): number;
82
+ /** How many events there are. */
83
+ get count(): number;
84
+ get horizontal(): boolean;
85
+ /** Horizontal: shows an event, by index or key. Vertical: unfolds its card. */
86
+ goTo(event: number | string): boolean;
87
+ /** Vertical, `collapsible`: unfolds or folds an event's card. */
88
+ unfold(event: number | string, on?: boolean): void;
89
+ /** Whether an event's card is unfolded. */
90
+ isUnfolded(event: number | string): boolean;
91
+ /** Reads the items again after they were changed in place. */
92
+ refresh(): void;
93
+ /** The index a value names: a key, else an index in range; -1 for none. */
94
+ indexOf(value: string | number | null | undefined): number;
95
+ valueAt(index: number): string | number;
96
+ /** A date as the kit's language writes it with `dateFormat`. */
97
+ formatDate(date: Date | null): string;
98
+ renderName(): void;
99
+ renderItems(): void;
100
+ lookOf(item: unknown): Look;
101
+ drawEntries(): void;
102
+ pressable(): boolean;
103
+ makeEntry(look: Look, as: TimelineOrientation): Entry;
104
+ drawTexts(): void;
105
+ drawStates(): void;
106
+ drawDetail(index: number): void;
107
+ drawNav(): void;
108
+ makeNav(direction: 'previous' | 'next'): Component<HTMLButtonElement>;
109
+ select(index: number, byUser: boolean, event?: Event): boolean;
110
+ click(e: MouseEvent): void;
111
+ keyDown(e: KeyboardEvent): void;
112
+ }
113
+ export {};
@@ -0,0 +1,5 @@
1
+ export { Timeline } from './Timeline';
2
+ export type { TimelineItem, TimelineTone } from './timeline-item';
3
+ export type { TimelineProps, TimelineOrientation, TimelineDateFormat } from './timeline-props';
4
+ export type { TimelineItemClickEventArgs } from './timeline-item-click-event-args';
5
+ export type { TimelineSelectionChangedEventArgs } from './timeline-selection-changed-event-args';
@@ -0,0 +1,9 @@
1
+ import type { Timeline } from './Timeline';
2
+ /** A press on an event's card (vertical) or flag (horizontal). */
3
+ export interface TimelineItemClickEventArgs {
4
+ index: number;
5
+ /** The item as given. */
6
+ item: unknown;
7
+ source: Timeline;
8
+ event: Event;
9
+ }
@@ -0,0 +1,24 @@
1
+ import type { Bind, ComponentBase } from '@motifx/core';
2
+ import type { IconSource } from '../../core/icon-source';
3
+ /** The colour of an event's dot and flag. */
4
+ export type TimelineTone = 'default' | 'accent' | 'success' | 'caution' | 'danger' | 'info';
5
+ /** One event on the `Timeline`. Each field may be a function of your state. */
6
+ export interface TimelineItem {
7
+ /** Names the event in `value` and the events; without one its index does. */
8
+ key?: string;
9
+ /** When: a `Date`, an ISO text, or milliseconds. */
10
+ date: Bind<Date | string | number>;
11
+ title: Bind<string>;
12
+ /** The text under the title; folded until the card is pressed when the timeline is `collapsible`. */
13
+ description?: Bind<string>;
14
+ /** A glyph of the kit's set in the dot. */
15
+ glyph?: Bind<string>;
16
+ /** An icon of your own in the dot, in place of the glyph. */
17
+ icon?: IconSource;
18
+ /** Default `'default'`. */
19
+ tone?: Bind<TimelineTone>;
20
+ /** Any content in the card, made when the card is. */
21
+ content?: () => ComponentBase;
22
+ /** Anything of your own; the item comes back as given in the events. */
23
+ data?: unknown;
24
+ }
@@ -0,0 +1,30 @@
1
+ import type { Bind } from '@motifx/core';
2
+ import type { ControlProps } from '../../core/control';
3
+ import type { TimelineItem } from './timeline-item';
4
+ import type { TimelineItemClickEventArgs } from './timeline-item-click-event-args';
5
+ import type { TimelineSelectionChangedEventArgs } from './timeline-selection-changed-event-args';
6
+ /** Down the page with a card per event, or along a line of dates with the chosen event's card under it. */
7
+ export type TimelineOrientation = 'vertical' | 'horizontal';
8
+ /** How a date is written: a preset, or the options of `Intl.DateTimeFormat`. */
9
+ export type TimelineDateFormat = 'short' | 'medium' | 'long' | Intl.DateTimeFormatOptions;
10
+ /** Props of `Timeline`. Each one is also a settable property; a function is followed. */
11
+ export interface TimelineProps extends ControlProps {
12
+ /** The events, in order. */
13
+ items?: Bind<readonly TimelineItem[]>;
14
+ /** Default `'vertical'`. */
15
+ orientation?: Bind<TimelineOrientation>;
16
+ /** Vertical: the cards take turns on either side of the line. Default `false`. */
17
+ alternate?: Bind<boolean>;
18
+ /** Vertical: a card shows its description only when pressed. Default `false`. */
19
+ collapsible?: Bind<boolean>;
20
+ /** How the dates are written, in the kit's language. Default `'medium'`. */
21
+ dateFormat?: Bind<TimelineDateFormat>;
22
+ /** Horizontal: the event whose card is shown, its `key` else its index. `x-model` binds it two-way. Default `0`. */
23
+ value?: Bind<string | number | null>;
24
+ /** What screen readers call it. Default: the kit's "Timeline". */
25
+ label?: Bind<string>;
26
+ /** A press on an event's card or flag. */
27
+ onItemClick?: (e: TimelineItemClickEventArgs) => void;
28
+ /** Horizontal: the shown event changed. */
29
+ onSelectionChanged?: (e: TimelineSelectionChangedEventArgs) => void;
30
+ }
@@ -0,0 +1,11 @@
1
+ import type { Timeline } from './Timeline';
2
+ /** Horizontal: the event whose card is shown changed. */
3
+ export interface TimelineSelectionChangedEventArgs {
4
+ index: number;
5
+ /** The item as given; `null` when there is none. */
6
+ item: unknown;
7
+ previous: number;
8
+ /** By a press or a key, else from code. */
9
+ byUser: boolean;
10
+ source: Timeline;
11
+ }
@@ -6,7 +6,7 @@ import type { TooltipShowOn } from './tooltip-show-on';
6
6
  import type { TooltipTarget } from './tooltip-target';
7
7
  /**
8
8
  * A short description shown next to an element: after the pointer rests on it, when it gets
9
- * keyboard focus, or from code. The pointer can move onto the tooltip without closing it; Escape,
9
+ * keyboard focus, or programmatically. The pointer can move onto the tooltip without closing it; Escape,
10
10
  * a press, leaving focus and scrolling close it. One tooltip is open at a time on the page, and
11
11
  * all of them share one set of document listeners. It never takes focus and holds nothing
12
12
  * interactive; the target is described by it (`aria-describedby`) while it is shown.
@@ -103,7 +103,7 @@ export declare class TreeView<T = unknown> extends Control<HTMLDivElement, TreeV
103
103
  /** Opens every row whose children are known (children not loaded yet are not loaded). */
104
104
  expandAll(): void;
105
105
  collapseAll(): void;
106
- /** Selects a row from code (`multiple`: adds it to the selection). */
106
+ /** Selects a row programmatically (`multiple`: adds it to the selection). */
107
107
  select(key: unknown): void;
108
108
  unselect(key: unknown): void;
109
109
  /** With `multiple`: every known row that can be selected. */
@@ -0,0 +1,56 @@
1
+ import { Component, Emitter, type Bind, type Event as MotifEvent, type IBaseProp } from "@motifx/core";
2
+ import { Control } from "../../core/control";
3
+ import type { ValidationGroup } from "../../parts/validation/ValidationGroup";
4
+ import type { ValidationTarget } from "../../parts/validation/validation-target";
5
+ import type { SummaryItemClickEventArgs } from "./summary-item-click-event-args";
6
+ import type { ValidationSummaryProps } from "./validation-summary-props";
7
+ interface Row {
8
+ target: ValidationTarget;
9
+ text: string;
10
+ li: Component<HTMLLIElement>;
11
+ button: Component<HTMLButtonElement>;
12
+ }
13
+ /**
14
+ * The failed fields of a `ValidationGroup`, one line each with the field's label and its message, under a header;
15
+ * a press on a line focuses the field. It draws itself again whenever a field of the group is checked, and stays
16
+ * out of sight while nothing has failed.
17
+ *
18
+ * @example
19
+ * const group = new ValidationGroup();
20
+ * <ValidationSummary group={group} />
21
+ * <TextBox label="Name" required validationGroup={group} />
22
+ * <Button text="Save" onclick={() => group.validate()} />
23
+ */
24
+ export declare class ValidationSummary extends Control<HTMLDivElement, ValidationSummaryProps> {
25
+ itemClick: Emitter<SummaryItemClickEventArgs>;
26
+ head: Component<HTMLParagraphElement>;
27
+ headText: Component<HTMLSpanElement>;
28
+ list: Component<HTMLUListElement>;
29
+ rows: Row[];
30
+ targets: readonly ValidationTarget[];
31
+ stopTargets: (() => void) | null;
32
+ constructor(props?: IBaseProp<ValidationSummaryProps>);
33
+ get group(): ValidationGroup | null;
34
+ set group(value: Bind<ValidationGroup | null>);
35
+ get header(): string;
36
+ set header(value: Bind<string>);
37
+ get showHeader(): boolean;
38
+ set showHeader(value: Bind<boolean>);
39
+ get focusOnClick(): boolean;
40
+ set focusOnClick(value: Bind<boolean>);
41
+ /** A line was pressed (`target`, `text`). */
42
+ get onItemClick(): MotifEvent<SummaryItemClickEventArgs>;
43
+ /** The failed targets listed now, in the group's order. */
44
+ get failed(): readonly ValidationTarget[];
45
+ /** How many lines there are. */
46
+ get count(): number;
47
+ /** Draws the lines again from the fields as they are now. */
48
+ refresh(): void;
49
+ renderTargets(): void;
50
+ messageOf(target: ValidationTarget): string;
51
+ textOf(target: ValidationTarget): string;
52
+ draw(): void;
53
+ drawHeader(): void;
54
+ click(e: MouseEvent): void;
55
+ }
56
+ export {};
@@ -0,0 +1,3 @@
1
+ export { ValidationSummary } from './ValidationSummary';
2
+ export type { ValidationSummaryProps } from './validation-summary-props';
3
+ export type { SummaryItemClickEventArgs } from './summary-item-click-event-args';
@@ -0,0 +1,11 @@
1
+ import type { ValidationTarget } from '../../parts/validation/validation-target';
2
+ import type { ValidationSummary } from './ValidationSummary';
3
+ /** A line of the summary was pressed. */
4
+ export interface SummaryItemClickEventArgs {
5
+ /** The field (or other target) the line stands for. */
6
+ target: ValidationTarget;
7
+ /** The line's text. */
8
+ text: string;
9
+ source: ValidationSummary;
10
+ event: Event;
11
+ }
@@ -0,0 +1,17 @@
1
+ import type { Bind } from '@motifx/core';
2
+ import type { ControlProps } from '../../core/control';
3
+ import type { ValidationGroup } from '../../parts/validation/ValidationGroup';
4
+ import type { SummaryItemClickEventArgs } from './summary-item-click-event-args';
5
+ /** Props of `ValidationSummary`. Each one is also a settable property; a function is followed. */
6
+ export interface ValidationSummaryProps extends ControlProps {
7
+ /** The group whose failed fields are listed. */
8
+ group?: Bind<ValidationGroup | null>;
9
+ /** The line above the list. Default: the kit's "Please correct the following". */
10
+ header?: Bind<string>;
11
+ /** Default `true`. */
12
+ showHeader?: Bind<boolean>;
13
+ /** A press on a line focuses its field. Default `true`. */
14
+ focusOnClick?: Bind<boolean>;
15
+ /** A line was pressed. */
16
+ onItemClick?: (e: SummaryItemClickEventArgs) => void;
17
+ }
@@ -22,11 +22,11 @@ export interface ControlProps {
22
22
  /**
23
23
  * The base of every `@motifx-community/ui` control: the shared properties
24
24
  * (`text`, `enabled`, `visible`, `tabStop`) work the same whether the control
25
- * is written in JSX or created with `new` and changed from code.
25
+ * is written in JSX or created with `new` and changed programmatically.
26
26
  *
27
27
  * - A prop can be a value or a getter (`enabled={() => !state.busy}`); a
28
28
  * getter keeps the property in sync with the state.
29
- * - Every property can be set from code, with a value (`ctrl.enabled = false`:
29
+ * - Every property can be set programmatically, with a value (`ctrl.enabled = false`:
30
30
  * it replaces a getter given before, the code owns the value from then on) or
31
31
  * with a function (`ctrl.enabled = () => !state.busy`: bound and followed; over plain data, read again on
32
32
  * `reState()`).
@@ -116,7 +116,7 @@ export declare class Control<TElement extends HTMLElement = HTMLElement, TProps
116
116
  protected setAccessKey(key: string | null): void;
117
117
  /** Reads a property, tracked: reactive readers update when it changes. */
118
118
  protected getProperty<T>(name: string): T;
119
- /** Sets a property from code: replaces a getter prop bound to it, then stores and renders. */
119
+ /** Sets a property programmatically: replaces a getter prop bound to it, then stores and renders. */
120
120
  protected setProperty(name: string, value: unknown): void;
121
121
  /** Stores a value the user entered; a bound getter is kept. */
122
122
  protected changeProperty(name: string, value: unknown): void;
@@ -135,7 +135,7 @@ export declare class Control<TElement extends HTMLElement = HTMLElement, TProps
135
135
  /**
136
136
  * Renders a property without an effect: `apply` runs now with the current
137
137
  * value and again on every change, whether it comes from a getter prop or
138
- * from code. E.g. `this.observeProperty('text', (t) => (label.data = t))`.
138
+ * programmatically. E.g. `this.observeProperty('text', (t) => (label.data = t))`.
139
139
  */
140
140
  protected observeProperty<T>(name: string, apply: (value: T) => void): void;
141
141
  private slot;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Where a surface made programmatically goes for an anchor: the nearest container that may hold a `<div>` and is not named
3
+ * by its content (a button would read the surface as part of its name). Near the anchor, it stays in the anchor's
4
+ * landmark and window (a modal window makes the rest inert).
5
+ */
6
+ export declare function homeOf(anchor: Element): Element;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Text the way a search compares it: lower case by the kit's language, accents and dots taken off, so
3
+ * `iz` finds `İzmir` and `ecole` finds `École` whatever the machine's own locale is. A search with a locale of
4
+ * its own gives it.
5
+ */
6
+ export declare function foldText(text: string, locale?: string): string;
@@ -2,8 +2,6 @@ import { UiLocale } from './UiLocale';
2
2
  import type { UiStrings } from './ui-strings';
3
3
  /** The kit's built-in texts (English): what a language pack leaves out is shown in them. */
4
4
  export declare const enStrings: UiStrings;
5
- /** The Turkish pack. `uiLocale.use('tr')` loads it by itself; this is for code that assigns `uiLocale.strings`. */
6
- export declare const trStrings: UiStrings;
7
5
  /**
8
6
  * The language of the kit's controls. It starts with the page's and loads its pack; `uiLocale.use('tr-TR')`
9
7
  * switches, and every control draws its texts, dates and numbers again. Packs ship as
@@ -572,4 +572,71 @@ export interface UiStrings {
572
572
  recurrenceSummaryCount: string;
573
573
  recurrenceSummaryUntil: string;
574
574
  recurrenceSummaryCustom: string;
575
+ /** The stepper and the wizard. */
576
+ steps: string;
577
+ stepOf: string;
578
+ stepOptional: string;
579
+ stepDone: string;
580
+ stepError: string;
581
+ wizardNext: string;
582
+ wizardPrevious: string;
583
+ wizardFinish: string;
584
+ /** The date range box. */
585
+ rangeStart: string;
586
+ rangeEnd: string;
587
+ rangeOrder: string;
588
+ rangeTooShort: string;
589
+ rangeTooLong: string;
590
+ rangeToday: string;
591
+ rangeYesterday: string;
592
+ rangeLast7: string;
593
+ rangeLast30: string;
594
+ rangeThisMonth: string;
595
+ rangeLastMonth: string;
596
+ /** The file uploader. */
597
+ fileSelect: string;
598
+ fileSelectOne: string;
599
+ fileDrop: string;
600
+ fileDropOne: string;
601
+ fileUpload: string;
602
+ fileTooLarge: string;
603
+ fileTooSmall: string;
604
+ fileWrongType: string;
605
+ fileTooMany: string;
606
+ fileUploading: string;
607
+ fileUploaded: string;
608
+ fileFailed: string;
609
+ fileAborted: string;
610
+ fileAbort: string;
611
+ /** The gallery and the multi-view. */
612
+ gallery: string;
613
+ gallerySlides: string;
614
+ gallerySlideOf: string;
615
+ galleryPrevious: string;
616
+ galleryNext: string;
617
+ galleryChoose: string;
618
+ galleryPlay: string;
619
+ galleryPause: string;
620
+ multiView: string;
621
+ multiViewPageOf: string;
622
+ /** The splitter and the tile view. */
623
+ splitterCollapse: string;
624
+ splitterExpand: string;
625
+ tiles: string;
626
+ /** The resizable and the draggable. */
627
+ move: string;
628
+ sizeNow: string;
629
+ positionNow: string;
630
+ /** The speed dial and the validation summary. */
631
+ actions: string;
632
+ validationSummary: string;
633
+ /** The timeline. */
634
+ timeline: string;
635
+ timelineEarlier: string;
636
+ timelineLater: string;
637
+ /** The sortable and the scroll view. */
638
+ sortableMoved: string;
639
+ scrollPullDown: string;
640
+ scrollRelease: string;
641
+ scrollRefreshing: string;
575
642
  }