@motifx-community/ui 0.1.0-beta.12 → 0.1.0-beta.13

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 (173) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/components/datagrid/view/ColumnStyles.d.ts +3 -1
  3. package/dist/components/dropdown/drop-down-props.d.ts +5 -2
  4. package/dist/components/listbox/item-template.d.ts +4 -0
  5. package/dist/components/tabdocs/DocumentTab.d.ts +0 -1
  6. package/dist/components/tabdocs/PhoneBar.d.ts +0 -1
  7. package/dist/components/treeview/TreeView.d.ts +8 -4
  8. package/dist/components/treeview/tree-view-item-template.d.ts +4 -0
  9. package/dist/core/show-icon.d.ts +3 -3
  10. package/dist/index.js +99 -176
  11. package/dist/index.js.map +1 -1
  12. package/dist/parts/list/OptionList.d.ts +4 -3
  13. package/dist/parts/list/option-parts.d.ts +1 -1
  14. package/dist/styles.css +43 -24
  15. package/docs/accordion.md +1 -1
  16. package/docs/actionsheet.md +1 -1
  17. package/docs/appbar.md +1 -1
  18. package/docs/appmenu-api.md +1 -1
  19. package/docs/appmenu-programmatic.md +1 -1
  20. package/docs/appmenu-search.md +1 -1
  21. package/docs/appmenu.md +1 -1
  22. package/docs/avatar.md +1 -1
  23. package/docs/badge.md +1 -1
  24. package/docs/bar-gauge-angles.md +1 -1
  25. package/docs/bar-gauge-data.md +1 -1
  26. package/docs/bar-gauge-labels.md +1 -1
  27. package/docs/bar-gauge.md +1 -1
  28. package/docs/barcode.md +1 -1
  29. package/docs/bottomnavigation.md +1 -1
  30. package/docs/bottomsheet.md +1 -1
  31. package/docs/breadcrumb.md +1 -1
  32. package/docs/button.md +1 -1
  33. package/docs/buttongroup.md +1 -1
  34. package/docs/buttons.md +1 -1
  35. package/docs/calendar.md +1 -1
  36. package/docs/card.md +1 -1
  37. package/docs/chart-bars.md +1 -1
  38. package/docs/chart-candles.md +1 -1
  39. package/docs/chart-funnel.md +1 -1
  40. package/docs/chart-heatmap.md +1 -1
  41. package/docs/chart-lines.md +1 -1
  42. package/docs/chart-live.md +1 -1
  43. package/docs/chart-pie.md +1 -1
  44. package/docs/chart-radar.md +1 -1
  45. package/docs/chart-ranges.md +1 -1
  46. package/docs/chart-references.md +1 -1
  47. package/docs/chart-scatter.md +1 -1
  48. package/docs/chart-waterfall.md +1 -1
  49. package/docs/chart-zoom.md +1 -1
  50. package/docs/chart.md +1 -1
  51. package/docs/checkbox.md +1 -1
  52. package/docs/chip.md +1 -1
  53. package/docs/choice.md +1 -1
  54. package/docs/colorbox.md +1 -1
  55. package/docs/combobox.md +2 -1
  56. package/docs/commands.md +1 -1
  57. package/docs/control.md +1 -1
  58. package/docs/data.md +1 -1
  59. package/docs/datagrid-api.md +1 -1
  60. package/docs/datagrid-bands.md +1 -1
  61. package/docs/datagrid-drag-select.md +1 -1
  62. package/docs/datagrid-drag.md +1 -1
  63. package/docs/datagrid-editing.md +1 -1
  64. package/docs/datagrid-filtering.md +1 -1
  65. package/docs/datagrid-forms.md +1 -1
  66. package/docs/datagrid-grouping.md +1 -1
  67. package/docs/datagrid-layout.md +1 -1
  68. package/docs/datagrid-lookups.md +4 -1
  69. package/docs/datagrid-master-detail.md +1 -1
  70. package/docs/datagrid-scrolling.md +1 -1
  71. package/docs/datagrid-selection.md +1 -1
  72. package/docs/datagrid.md +1 -1
  73. package/docs/datebox.md +1 -1
  74. package/docs/daterangebox.md +1 -1
  75. package/docs/display.md +1 -1
  76. package/docs/draggable.md +1 -1
  77. package/docs/drawer.md +1 -1
  78. package/docs/dropdown.md +4 -3
  79. package/docs/editors.md +1 -1
  80. package/docs/feedback.md +1 -1
  81. package/docs/fileuploader.md +1 -1
  82. package/docs/filterbuilder.md +1 -1
  83. package/docs/formlayout.md +1 -1
  84. package/docs/foundations.md +1 -1
  85. package/docs/gallery.md +1 -1
  86. package/docs/gauge-base.md +1 -1
  87. package/docs/gauge-circular.md +1 -1
  88. package/docs/gauge-dashboards.md +1 -1
  89. package/docs/gauge-linear.md +1 -1
  90. package/docs/gauge-markers.md +1 -1
  91. package/docs/gauge-marks.md +1 -1
  92. package/docs/gauge-ranges.md +1 -1
  93. package/docs/gauge-scales.md +1 -1
  94. package/docs/gauge.md +1 -1
  95. package/docs/home.md +1 -1
  96. package/docs/keyboard.md +1 -1
  97. package/docs/language.md +1 -1
  98. package/docs/layout.md +1 -1
  99. package/docs/listbox.md +4 -3
  100. package/docs/loadpanel.md +1 -1
  101. package/docs/lookup.md +1 -1
  102. package/docs/menus-api.md +1 -1
  103. package/docs/menus-context.md +1 -1
  104. package/docs/menus-customization.md +1 -1
  105. package/docs/menus-merging.md +1 -1
  106. package/docs/menus-programmatic.md +1 -1
  107. package/docs/menus.md +1 -1
  108. package/docs/multiview.md +1 -1
  109. package/docs/navigation.md +1 -1
  110. package/docs/numberbox.md +1 -1
  111. package/docs/otpinput.md +1 -1
  112. package/docs/pagination.md +1 -1
  113. package/docs/popover.md +1 -1
  114. package/docs/progress.md +1 -1
  115. package/docs/qrcode.md +1 -1
  116. package/docs/radiogroup.md +1 -1
  117. package/docs/rating.md +1 -1
  118. package/docs/resizable.md +1 -1
  119. package/docs/ribbonmenu-api.md +1 -1
  120. package/docs/ribbonmenu-commands.md +1 -1
  121. package/docs/ribbonmenu-customization.md +1 -1
  122. package/docs/ribbonmenu-display.md +3 -3
  123. package/docs/ribbonmenu-layouts.md +1 -1
  124. package/docs/ribbonmenu-programmatic.md +1 -1
  125. package/docs/ribbonmenu.md +1 -1
  126. package/docs/scheduler-agenda.md +1 -1
  127. package/docs/scheduler-big-data.md +1 -1
  128. package/docs/scheduler-editing.md +1 -1
  129. package/docs/scheduler-form.md +1 -1
  130. package/docs/scheduler-icalendar.md +1 -1
  131. package/docs/scheduler-mobile.md +1 -1
  132. package/docs/scheduler-recurrence.md +1 -1
  133. package/docs/scheduler-resources.md +1 -1
  134. package/docs/scheduler-timeline.md +1 -1
  135. package/docs/scheduler.md +1 -1
  136. package/docs/scrollview.md +1 -1
  137. package/docs/shortcuteditor.md +1 -1
  138. package/docs/showcase-home.md +1 -1
  139. package/docs/showcase.md +1 -1
  140. package/docs/signature.md +1 -1
  141. package/docs/skeleton.md +1 -1
  142. package/docs/slider.md +1 -1
  143. package/docs/sortable.md +1 -1
  144. package/docs/sparkline.md +1 -1
  145. package/docs/speeddial.md +1 -1
  146. package/docs/splitter.md +1 -1
  147. package/docs/stepper.md +1 -1
  148. package/docs/switch.md +1 -1
  149. package/docs/tabdocs-dock.md +1 -1
  150. package/docs/tabdocs-drag.md +1 -1
  151. package/docs/tabdocs-menus.md +1 -1
  152. package/docs/tabdocs-mobile.md +1 -1
  153. package/docs/tabdocs-tabs.md +1 -1
  154. package/docs/tabdocs-windows.md +1 -1
  155. package/docs/tabdocs-workspace.md +1 -1
  156. package/docs/tabdocs.md +1 -1
  157. package/docs/tabs.md +1 -1
  158. package/docs/tagbox.md +4 -3
  159. package/docs/textarea.md +1 -1
  160. package/docs/textbox.md +1 -1
  161. package/docs/tileview.md +1 -1
  162. package/docs/timeline.md +1 -1
  163. package/docs/toast.md +1 -1
  164. package/docs/tokens.md +1 -1
  165. package/docs/toolbar.md +1 -1
  166. package/docs/tooltip.md +1 -1
  167. package/docs/treeview.md +3 -3
  168. package/docs/validationsummary.md +1 -1
  169. package/docs/window.md +1 -1
  170. package/docs/wizard.md +1 -1
  171. package/llms-full.txt +174 -167
  172. package/llms.txt +1 -1
  173. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -6,6 +6,41 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.0-beta.13] - 2026-11-17
10
+
11
+ Needs `@motifx/core` 1.2.0-rc.31.
12
+
13
+ ### Fixed
14
+
15
+ - A template's cleanup runs with its host whole, when the item is drawn again and when its control goes (#3). The
16
+ cleanup an `itemTemplate` (`ListBox`, `ComboBox`, `DropDown`, `Lookup`, `TagBox`, `TreeView`), a `fieldTemplate`
17
+ (`DropDown`, `Lookup`) or a `tagTemplate` (`TagBox`) returns was kept by the control and called by hand: on a redraw
18
+ with the host alive, and when the control, its owner or the tab holding it went, after the host was already
19
+ disposed, so a cleanup that touched the host threw once per drawn row. Every drawing now has a host of its own, the
20
+ cleanup is given to that host, and it runs as the host goes, the same way in both cases. A template that only adds
21
+ components to its host needs no cleanup: they go with the host.
22
+ - `DropDown` and `Lookup` draw the value once as they are built: the field was drawn, then drawn again for the data
23
+ source given (none included), so a `fieldTemplate` ran twice and its cleanup once in between. With a data source,
24
+ the first drawing wrote the key itself before the source was there.
25
+ - A `DataGrid` inside another `DataGrid` (in a row's details, in a cell) keeps its own columns and its own look (#4).
26
+ A grid wrote the rules of its columns, and its stylesheet the rules for its states, with descendant selectors, so
27
+ they reached the rows of a grid inside it too. A column the outer grid does not show (its own selection column
28
+ among them) was hidden inside as well, and the cells after it moved into the wrong tracks; a column's alignment,
29
+ its pinning and, with virtual columns, its track went to the same field inside; and the outer grid's `striped`,
30
+ `selection`, `headerButtons: 'always'` and its loading or empty state showed on the rows, the headers and the body
31
+ inside. The column rules now find the rows through the parts that hold them (`data-grid-id` is on the head, the
32
+ body and the foot, no longer on `.mx-data-grid`), and a rule that depends on a state of the grid, a row or a cell
33
+ goes on by child combinators only. A grid that holds no grid looks as it did.
34
+ - A `striped` `DataGrid` shows the row under the pointer, the active row and a new row on its odd rows too. The
35
+ stripe's rule outweighed theirs, so every second row kept its stripe under the pointer and as the active row. The
36
+ stripe now comes first and weighs no more than they do; the even rows, a selected row and a grid without stripes
37
+ look as they did.
38
+
39
+ ### Changed
40
+
41
+ - `OptionParts.text` is a new part each time an option's drawing changes, and `OptionList.bindText` returns nothing:
42
+ the binding goes with the text part it writes.
43
+
9
44
  ## [0.1.0-beta.12] - 2026-11-14
10
45
 
11
46
  Needs `@motifx/core` 1.2.0-rc.30.
@@ -4,7 +4,9 @@ import type { StickyOffset } from '../model/sticky-offset';
4
4
  /**
5
5
  * Per-column CSS of one grid: columns not shown, alignment and sticky offsets, written as rules keyed
6
6
  * by `data-field` (a pinned band's header by `data-band`, at the offset of its columns). Changing a width or pinning a column rewrites this sheet only; no cell gets a
7
- * binding of its own and no row is touched. A constructable stylesheet adopted by the document (or
7
+ * binding of its own and no row is touched. A rule finds the rows through the parts that hold them (the head, the body,
8
+ * the foot, the copy of a dragged row), which carry the grid's id, and goes on by child combinators only: the rows of a
9
+ * grid inside this one (in a row's details, in a cell) are that grid's. A constructable stylesheet adopted by the document (or
8
10
  * shadow root) where there is one, which also works under a strict Content Security Policy; else a
9
11
  * `<style>` element inside the grid.
10
12
  */
@@ -39,9 +39,12 @@ export interface DropDownProps<T, V> extends FieldProps<V | null> {
39
39
  /** The default is `'contains'`. */
40
40
  searchMode?: Bind<'contains' | 'startswith'>;
41
41
  clearButton?: Bind<boolean>;
42
- /** Customizes how an option is drawn. It can return a cleanup function. */
42
+ /** Customizes how an option is drawn. It can return a cleanup function, run as `host` goes (see `ItemTemplate`). */
43
43
  itemTemplate?: Bind<((item: T, host: ComponentBase<HTMLElement>) => (() => void) | void) | null>;
44
- /** Customizes how the selected item is drawn in the field. It can return a cleanup function. */
44
+ /**
45
+ * Customizes how the selected item is drawn in the field, into a `host` made for each drawing. It can return a
46
+ * cleanup function, run as `host` goes: the value drawn again or the box gone (see `ItemTemplate`).
47
+ */
45
48
  fieldTemplate?: Bind<((item: T, host: ComponentBase<HTMLElement>) => (() => void) | void) | null>;
46
49
  /** The list is at least as wide as the field. The default is `true`. */
47
50
  matchWidth?: Bind<boolean>;
@@ -2,6 +2,10 @@ import type { ComponentBase } from '@motifx/core';
2
2
  /**
3
3
  * Draws an item instead of its text. It can return a cleanup function.
4
4
  *
5
+ * The host is the drawing's own: it goes when the item is drawn again or its list goes, with what was added to it,
6
+ * so a template that only adds components needs no cleanup. The cleanup is for what lives outside the host (a
7
+ * subscription, a timer); it is given to the host and runs once as the host goes, after what the host held.
8
+ *
5
9
  * @param host The place the item goes in: add your components to its `controls`, or give it a text.
6
10
  */
7
11
  export type ItemTemplate<T> = (item: T, host: ComponentBase<HTMLElement>) => (() => void) | void;
@@ -25,7 +25,6 @@ export declare class DocumentTab {
25
25
  private readonly status;
26
26
  private description;
27
27
  private icon;
28
- private releaseIcon;
29
28
  private badge;
30
29
  private tooltip;
31
30
  private tipHolder;
@@ -16,7 +16,6 @@ export declare class PhoneBar {
16
16
  private readonly unsaved;
17
17
  private readonly close;
18
18
  private readonly count;
19
- private releaseIcon;
20
19
  private shown;
21
20
  private swipe;
22
21
  constructor(manager: TabDocumentManager, presenter: TabPresenter);
@@ -195,7 +195,7 @@ export declare class TreeView<T = unknown> extends Control<HTMLDivElement, TreeV
195
195
  private takeRows;
196
196
  /** The row drawn before for `row`'s key, kept for its new node when what it was drawn with stays; null otherwise. */
197
197
  private keepRow;
198
- /** Lets go of the rows drawn before that were not kept. */
198
+ /** Lets go of the rows drawn before that were not kept: each goes with what it holds, its template's cleanup too. */
199
199
  private dropRows;
200
200
  private addGroup;
201
201
  /**
@@ -214,7 +214,10 @@ export declare class TreeView<T = unknown> extends Control<HTMLDivElement, TreeV
214
214
  private space;
215
215
  private measure;
216
216
  private itemPart;
217
- /** The parts of a row, not kept by the tree yet; what takes its icon and template away again goes to `releases`. */
217
+ /**
218
+ * The parts of a row, not kept by the tree yet. The icon and what the template drew go with the row; the template's
219
+ * cleanup, given to the text part it drew in, runs as the core disposes the row.
220
+ */
218
221
  private rowParts;
219
222
  /** A row's states: level and place, open, selected, checked, enabled, loading. */
220
223
  private renderItem;
@@ -227,9 +230,10 @@ export declare class TreeView<T = unknown> extends Control<HTMLDivElement, TreeV
227
230
  private renderRoving;
228
231
  private renderLook;
229
232
  private renderSearch;
230
- /** Lets go of the row drawn for `node`: what its icon and template hold is released, and the tree keeps it no longer. */
233
+ /** The tree keeps the row drawn for `node` no longer; the row goes with what it holds when it is taken out. */
231
234
  private forget;
232
- private releaseAll;
235
+ /** The tree keeps no row drawn so far, the hidden ones included; they go when the rows are taken out. */
236
+ private forgetAll;
233
237
  private scrollToRow;
234
238
  private focusRow;
235
239
  private listen;
@@ -2,6 +2,10 @@ import type { ComponentBase } from '@motifx/core';
2
2
  /**
3
3
  * Draws the content of a row instead of its text. It can return a cleanup function.
4
4
  *
5
+ * The host goes with its row (drawn again, or the tree gone; a closed row's rows stay drawn), with what was added to
6
+ * it, so a template that only adds components needs no cleanup. The cleanup is for what lives outside the host (a
7
+ * subscription, a timer); it is given to the host and runs once as the host goes, after what the host held.
8
+ *
5
9
  * @param host The place the content goes in: add your components to its `controls`, or give it a text.
6
10
  */
7
11
  export type TreeViewItemTemplate<T> = (item: T, host: ComponentBase<HTMLElement>) => (() => void) | void;
@@ -1,7 +1,7 @@
1
1
  import type { ComponentBase } from '@motifx/core';
2
2
  import type { IconSource } from './icon-source';
3
3
  /**
4
- * Shows an icon in `into`, a part of the kit: an `<img>` for an address, or the app's component. Returns what takes
5
- * it away again (removed and disposed).
4
+ * Shows an icon in `into`, a part of the kit: an `<img>` for an address, or the app's component. It goes with `into`;
5
+ * `clearParts(into)` takes it out for another one.
6
6
  */
7
- export declare function showIcon(source: IconSource, into: ComponentBase): () => void;
7
+ export declare function showIcon(source: IconSource, into: ComponentBase): void;