@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.
- package/CHANGELOG.md +35 -0
- package/dist/components/datagrid/view/ColumnStyles.d.ts +3 -1
- package/dist/components/dropdown/drop-down-props.d.ts +5 -2
- package/dist/components/listbox/item-template.d.ts +4 -0
- package/dist/components/tabdocs/DocumentTab.d.ts +0 -1
- package/dist/components/tabdocs/PhoneBar.d.ts +0 -1
- package/dist/components/treeview/TreeView.d.ts +8 -4
- package/dist/components/treeview/tree-view-item-template.d.ts +4 -0
- package/dist/core/show-icon.d.ts +3 -3
- package/dist/index.js +99 -176
- package/dist/index.js.map +1 -1
- package/dist/parts/list/OptionList.d.ts +4 -3
- package/dist/parts/list/option-parts.d.ts +1 -1
- package/dist/styles.css +43 -24
- package/docs/accordion.md +1 -1
- package/docs/actionsheet.md +1 -1
- package/docs/appbar.md +1 -1
- package/docs/appmenu-api.md +1 -1
- package/docs/appmenu-programmatic.md +1 -1
- package/docs/appmenu-search.md +1 -1
- package/docs/appmenu.md +1 -1
- package/docs/avatar.md +1 -1
- package/docs/badge.md +1 -1
- package/docs/bar-gauge-angles.md +1 -1
- package/docs/bar-gauge-data.md +1 -1
- package/docs/bar-gauge-labels.md +1 -1
- package/docs/bar-gauge.md +1 -1
- package/docs/barcode.md +1 -1
- package/docs/bottomnavigation.md +1 -1
- package/docs/bottomsheet.md +1 -1
- package/docs/breadcrumb.md +1 -1
- package/docs/button.md +1 -1
- package/docs/buttongroup.md +1 -1
- package/docs/buttons.md +1 -1
- package/docs/calendar.md +1 -1
- package/docs/card.md +1 -1
- package/docs/chart-bars.md +1 -1
- package/docs/chart-candles.md +1 -1
- package/docs/chart-funnel.md +1 -1
- package/docs/chart-heatmap.md +1 -1
- package/docs/chart-lines.md +1 -1
- package/docs/chart-live.md +1 -1
- package/docs/chart-pie.md +1 -1
- package/docs/chart-radar.md +1 -1
- package/docs/chart-ranges.md +1 -1
- package/docs/chart-references.md +1 -1
- package/docs/chart-scatter.md +1 -1
- package/docs/chart-waterfall.md +1 -1
- package/docs/chart-zoom.md +1 -1
- package/docs/chart.md +1 -1
- package/docs/checkbox.md +1 -1
- package/docs/chip.md +1 -1
- package/docs/choice.md +1 -1
- package/docs/colorbox.md +1 -1
- package/docs/combobox.md +2 -1
- package/docs/commands.md +1 -1
- package/docs/control.md +1 -1
- package/docs/data.md +1 -1
- package/docs/datagrid-api.md +1 -1
- package/docs/datagrid-bands.md +1 -1
- package/docs/datagrid-drag-select.md +1 -1
- package/docs/datagrid-drag.md +1 -1
- package/docs/datagrid-editing.md +1 -1
- package/docs/datagrid-filtering.md +1 -1
- package/docs/datagrid-forms.md +1 -1
- package/docs/datagrid-grouping.md +1 -1
- package/docs/datagrid-layout.md +1 -1
- package/docs/datagrid-lookups.md +4 -1
- package/docs/datagrid-master-detail.md +1 -1
- package/docs/datagrid-scrolling.md +1 -1
- package/docs/datagrid-selection.md +1 -1
- package/docs/datagrid.md +1 -1
- package/docs/datebox.md +1 -1
- package/docs/daterangebox.md +1 -1
- package/docs/display.md +1 -1
- package/docs/draggable.md +1 -1
- package/docs/drawer.md +1 -1
- package/docs/dropdown.md +4 -3
- package/docs/editors.md +1 -1
- package/docs/feedback.md +1 -1
- package/docs/fileuploader.md +1 -1
- package/docs/filterbuilder.md +1 -1
- package/docs/formlayout.md +1 -1
- package/docs/foundations.md +1 -1
- package/docs/gallery.md +1 -1
- package/docs/gauge-base.md +1 -1
- package/docs/gauge-circular.md +1 -1
- package/docs/gauge-dashboards.md +1 -1
- package/docs/gauge-linear.md +1 -1
- package/docs/gauge-markers.md +1 -1
- package/docs/gauge-marks.md +1 -1
- package/docs/gauge-ranges.md +1 -1
- package/docs/gauge-scales.md +1 -1
- package/docs/gauge.md +1 -1
- package/docs/home.md +1 -1
- package/docs/keyboard.md +1 -1
- package/docs/language.md +1 -1
- package/docs/layout.md +1 -1
- package/docs/listbox.md +4 -3
- package/docs/loadpanel.md +1 -1
- package/docs/lookup.md +1 -1
- package/docs/menus-api.md +1 -1
- package/docs/menus-context.md +1 -1
- package/docs/menus-customization.md +1 -1
- package/docs/menus-merging.md +1 -1
- package/docs/menus-programmatic.md +1 -1
- package/docs/menus.md +1 -1
- package/docs/multiview.md +1 -1
- package/docs/navigation.md +1 -1
- package/docs/numberbox.md +1 -1
- package/docs/otpinput.md +1 -1
- package/docs/pagination.md +1 -1
- package/docs/popover.md +1 -1
- package/docs/progress.md +1 -1
- package/docs/qrcode.md +1 -1
- package/docs/radiogroup.md +1 -1
- package/docs/rating.md +1 -1
- package/docs/resizable.md +1 -1
- package/docs/ribbonmenu-api.md +1 -1
- package/docs/ribbonmenu-commands.md +1 -1
- package/docs/ribbonmenu-customization.md +1 -1
- package/docs/ribbonmenu-display.md +3 -3
- package/docs/ribbonmenu-layouts.md +1 -1
- package/docs/ribbonmenu-programmatic.md +1 -1
- package/docs/ribbonmenu.md +1 -1
- package/docs/scheduler-agenda.md +1 -1
- package/docs/scheduler-big-data.md +1 -1
- package/docs/scheduler-editing.md +1 -1
- package/docs/scheduler-form.md +1 -1
- package/docs/scheduler-icalendar.md +1 -1
- package/docs/scheduler-mobile.md +1 -1
- package/docs/scheduler-recurrence.md +1 -1
- package/docs/scheduler-resources.md +1 -1
- package/docs/scheduler-timeline.md +1 -1
- package/docs/scheduler.md +1 -1
- package/docs/scrollview.md +1 -1
- package/docs/shortcuteditor.md +1 -1
- package/docs/showcase-home.md +1 -1
- package/docs/showcase.md +1 -1
- package/docs/signature.md +1 -1
- package/docs/skeleton.md +1 -1
- package/docs/slider.md +1 -1
- package/docs/sortable.md +1 -1
- package/docs/sparkline.md +1 -1
- package/docs/speeddial.md +1 -1
- package/docs/splitter.md +1 -1
- package/docs/stepper.md +1 -1
- package/docs/switch.md +1 -1
- package/docs/tabdocs-dock.md +1 -1
- package/docs/tabdocs-drag.md +1 -1
- package/docs/tabdocs-menus.md +1 -1
- package/docs/tabdocs-mobile.md +1 -1
- package/docs/tabdocs-tabs.md +1 -1
- package/docs/tabdocs-windows.md +1 -1
- package/docs/tabdocs-workspace.md +1 -1
- package/docs/tabdocs.md +1 -1
- package/docs/tabs.md +1 -1
- package/docs/tagbox.md +4 -3
- package/docs/textarea.md +1 -1
- package/docs/textbox.md +1 -1
- package/docs/tileview.md +1 -1
- package/docs/timeline.md +1 -1
- package/docs/toast.md +1 -1
- package/docs/tokens.md +1 -1
- package/docs/toolbar.md +1 -1
- package/docs/tooltip.md +1 -1
- package/docs/treeview.md +3 -3
- package/docs/validationsummary.md +1 -1
- package/docs/window.md +1 -1
- package/docs/wizard.md +1 -1
- package/llms-full.txt +174 -167
- package/llms.txt +1 -1
- 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
|
|
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
|
-
/**
|
|
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;
|
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
|
|
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;
|
package/dist/core/show-icon.d.ts
CHANGED
|
@@ -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.
|
|
5
|
-
* it
|
|
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):
|
|
7
|
+
export declare function showIcon(source: IconSource, into: ComponentBase): void;
|