@motifx-community/ui 0.1.0-beta.11 → 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 (198) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/dist/components/combobox/ComboBox.d.ts +5 -0
  3. package/dist/components/combobox/combo-box-props.d.ts +6 -0
  4. package/dist/components/datagrid/DataGrid.d.ts +4 -1
  5. package/dist/components/datagrid/grid-lookup.d.ts +8 -0
  6. package/dist/components/datagrid/model/FilterModel.d.ts +5 -0
  7. package/dist/components/datagrid/model/LookupTexts.d.ts +2 -0
  8. package/dist/components/datagrid/model/LookupValues.d.ts +4 -0
  9. package/dist/components/datagrid/view/ActionWidths.d.ts +13 -3
  10. package/dist/components/datagrid/view/ColumnStyles.d.ts +3 -1
  11. package/dist/components/datagrid/view/GridRow.d.ts +1 -1
  12. package/dist/components/dropdown/DropDown.d.ts +5 -0
  13. package/dist/components/dropdown/drop-down-props.d.ts +11 -2
  14. package/dist/components/filterbuilder/filter-builder-lookup.d.ts +3 -0
  15. package/dist/components/listbox/ListBox.d.ts +5 -0
  16. package/dist/components/listbox/item-template.d.ts +4 -0
  17. package/dist/components/listbox/list-box-props.d.ts +6 -0
  18. package/dist/components/listbox/select-all-state.d.ts +1 -1
  19. package/dist/components/ribbonmenu/RibbonKeyHints.d.ts +1 -0
  20. package/dist/components/tabdocs/DocumentTab.d.ts +0 -1
  21. package/dist/components/tabdocs/PhoneBar.d.ts +0 -1
  22. package/dist/components/tagbox/TagBox.d.ts +5 -0
  23. package/dist/components/tagbox/tag-box-props.d.ts +6 -0
  24. package/dist/components/toolbar/Toolbar.d.ts +8 -0
  25. package/dist/components/treeview/TreeView.d.ts +8 -4
  26. package/dist/components/treeview/tree-view-item-template.d.ts +4 -0
  27. package/dist/core/measure/after-frame.d.ts +7 -0
  28. package/dist/core/measure/drawn.d.ts +7 -0
  29. package/dist/core/measure/index.d.ts +1 -1
  30. package/dist/core/show-icon.d.ts +3 -3
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.js +652 -312
  33. package/dist/index.js.map +1 -1
  34. package/dist/parts/data/DataItems.d.ts +24 -0
  35. package/dist/parts/data/KeyedItems.d.ts +31 -5
  36. package/dist/parts/data/normalize-key.d.ts +7 -0
  37. package/dist/parts/list/OptionList.d.ts +4 -3
  38. package/dist/parts/list/option-parts.d.ts +1 -1
  39. package/dist/styles.css +74 -23
  40. package/docs/accordion.md +1 -1
  41. package/docs/actionsheet.md +1 -1
  42. package/docs/appbar.md +1 -1
  43. package/docs/appmenu-api.md +1 -1
  44. package/docs/appmenu-programmatic.md +1 -1
  45. package/docs/appmenu-search.md +1 -1
  46. package/docs/appmenu.md +1 -1
  47. package/docs/avatar.md +1 -1
  48. package/docs/badge.md +1 -1
  49. package/docs/bar-gauge-angles.md +1 -1
  50. package/docs/bar-gauge-data.md +1 -1
  51. package/docs/bar-gauge-labels.md +1 -1
  52. package/docs/bar-gauge.md +1 -1
  53. package/docs/barcode.md +1 -1
  54. package/docs/bottomnavigation.md +1 -1
  55. package/docs/bottomsheet.md +1 -1
  56. package/docs/breadcrumb.md +1 -1
  57. package/docs/button.md +1 -1
  58. package/docs/buttongroup.md +1 -1
  59. package/docs/buttons.md +1 -1
  60. package/docs/calendar.md +1 -1
  61. package/docs/card.md +1 -1
  62. package/docs/chart-bars.md +1 -1
  63. package/docs/chart-candles.md +1 -1
  64. package/docs/chart-funnel.md +1 -1
  65. package/docs/chart-heatmap.md +1 -1
  66. package/docs/chart-lines.md +1 -1
  67. package/docs/chart-live.md +1 -1
  68. package/docs/chart-pie.md +1 -1
  69. package/docs/chart-radar.md +1 -1
  70. package/docs/chart-ranges.md +1 -1
  71. package/docs/chart-references.md +1 -1
  72. package/docs/chart-scatter.md +1 -1
  73. package/docs/chart-waterfall.md +1 -1
  74. package/docs/chart-zoom.md +1 -1
  75. package/docs/chart.md +1 -1
  76. package/docs/checkbox.md +1 -1
  77. package/docs/chip.md +1 -1
  78. package/docs/choice.md +1 -1
  79. package/docs/colorbox.md +1 -1
  80. package/docs/combobox.md +2 -1
  81. package/docs/commands.md +1 -1
  82. package/docs/control.md +1 -1
  83. package/docs/data.md +1 -1
  84. package/docs/datagrid-api.md +1 -1
  85. package/docs/datagrid-bands.md +1 -1
  86. package/docs/datagrid-drag-select.md +1 -1
  87. package/docs/datagrid-drag.md +1 -1
  88. package/docs/datagrid-editing.md +1 -1
  89. package/docs/datagrid-filtering.md +1 -1
  90. package/docs/datagrid-forms.md +1 -1
  91. package/docs/datagrid-grouping.md +1 -1
  92. package/docs/datagrid-layout.md +1 -1
  93. package/docs/datagrid-lookups.md +4 -1
  94. package/docs/datagrid-master-detail.md +1 -1
  95. package/docs/datagrid-scrolling.md +1 -1
  96. package/docs/datagrid-selection.md +1 -1
  97. package/docs/datagrid.md +1 -1
  98. package/docs/datebox.md +1 -1
  99. package/docs/daterangebox.md +1 -1
  100. package/docs/display.md +1 -1
  101. package/docs/draggable.md +1 -1
  102. package/docs/drawer.md +1 -1
  103. package/docs/dropdown.md +4 -3
  104. package/docs/editors.md +1 -1
  105. package/docs/feedback.md +1 -1
  106. package/docs/fileuploader.md +1 -1
  107. package/docs/filterbuilder.md +1 -1
  108. package/docs/formlayout.md +1 -1
  109. package/docs/foundations.md +1 -1
  110. package/docs/gallery.md +1 -1
  111. package/docs/gauge-base.md +1 -1
  112. package/docs/gauge-circular.md +1 -1
  113. package/docs/gauge-dashboards.md +1 -1
  114. package/docs/gauge-linear.md +1 -1
  115. package/docs/gauge-markers.md +1 -1
  116. package/docs/gauge-marks.md +1 -1
  117. package/docs/gauge-ranges.md +1 -1
  118. package/docs/gauge-scales.md +1 -1
  119. package/docs/gauge.md +1 -1
  120. package/docs/home.md +1 -1
  121. package/docs/keyboard.md +1 -1
  122. package/docs/language.md +1 -1
  123. package/docs/layout.md +1 -1
  124. package/docs/listbox.md +4 -3
  125. package/docs/loadpanel.md +1 -1
  126. package/docs/lookup.md +1 -1
  127. package/docs/menus-api.md +1 -1
  128. package/docs/menus-context.md +1 -1
  129. package/docs/menus-customization.md +1 -1
  130. package/docs/menus-merging.md +1 -1
  131. package/docs/menus-programmatic.md +1 -1
  132. package/docs/menus.md +1 -1
  133. package/docs/multiview.md +1 -1
  134. package/docs/navigation.md +1 -1
  135. package/docs/numberbox.md +1 -1
  136. package/docs/otpinput.md +1 -1
  137. package/docs/pagination.md +1 -1
  138. package/docs/popover.md +1 -1
  139. package/docs/progress.md +1 -1
  140. package/docs/qrcode.md +1 -1
  141. package/docs/radiogroup.md +1 -1
  142. package/docs/rating.md +1 -1
  143. package/docs/resizable.md +1 -1
  144. package/docs/ribbonmenu-api.md +1 -1
  145. package/docs/ribbonmenu-commands.md +1 -1
  146. package/docs/ribbonmenu-customization.md +1 -1
  147. package/docs/ribbonmenu-display.md +3 -3
  148. package/docs/ribbonmenu-layouts.md +1 -1
  149. package/docs/ribbonmenu-programmatic.md +1 -1
  150. package/docs/ribbonmenu.md +1 -1
  151. package/docs/scheduler-agenda.md +1 -1
  152. package/docs/scheduler-big-data.md +1 -1
  153. package/docs/scheduler-editing.md +1 -1
  154. package/docs/scheduler-form.md +1 -1
  155. package/docs/scheduler-icalendar.md +1 -1
  156. package/docs/scheduler-mobile.md +1 -1
  157. package/docs/scheduler-recurrence.md +1 -1
  158. package/docs/scheduler-resources.md +1 -1
  159. package/docs/scheduler-timeline.md +1 -1
  160. package/docs/scheduler.md +1 -1
  161. package/docs/scrollview.md +1 -1
  162. package/docs/shortcuteditor.md +1 -1
  163. package/docs/showcase-home.md +1 -1
  164. package/docs/showcase.md +1 -1
  165. package/docs/signature.md +1 -1
  166. package/docs/skeleton.md +1 -1
  167. package/docs/slider.md +1 -1
  168. package/docs/sortable.md +1 -1
  169. package/docs/sparkline.md +1 -1
  170. package/docs/speeddial.md +1 -1
  171. package/docs/splitter.md +1 -1
  172. package/docs/stepper.md +1 -1
  173. package/docs/switch.md +1 -1
  174. package/docs/tabdocs-dock.md +1 -1
  175. package/docs/tabdocs-drag.md +1 -1
  176. package/docs/tabdocs-menus.md +1 -1
  177. package/docs/tabdocs-mobile.md +1 -1
  178. package/docs/tabdocs-tabs.md +1 -1
  179. package/docs/tabdocs-windows.md +1 -1
  180. package/docs/tabdocs-workspace.md +1 -1
  181. package/docs/tabdocs.md +1 -1
  182. package/docs/tabs.md +1 -1
  183. package/docs/tagbox.md +4 -3
  184. package/docs/textarea.md +1 -1
  185. package/docs/textbox.md +1 -1
  186. package/docs/tileview.md +1 -1
  187. package/docs/timeline.md +1 -1
  188. package/docs/toast.md +1 -1
  189. package/docs/tokens.md +1 -1
  190. package/docs/toolbar.md +1 -1
  191. package/docs/tooltip.md +1 -1
  192. package/docs/treeview.md +3 -3
  193. package/docs/validationsummary.md +1 -1
  194. package/docs/window.md +1 -1
  195. package/docs/wizard.md +1 -1
  196. package/llms-full.txt +174 -167
  197. package/llms.txt +1 -1
  198. package/package.json +4 -4
@@ -19,6 +19,11 @@ export declare class DataItems<T> implements ItemSource<T>, IDisposable {
19
19
  textOf: (item: T) => string;
20
20
  /** The field of an item that holds its value, when it is not the source's key. It is used to request unloaded values. */
21
21
  valueField: string | undefined;
22
+ /**
23
+ * Values equal once normalized are one value (`KeyedItems.normalizeKey`): the rule of keys a source compares its own
24
+ * way, for items in memory and to spare the source the requests that find it out.
25
+ */
26
+ normalizeKey: ((key: unknown) => unknown) | undefined;
22
27
  searchMode: 'contains' | 'startswith';
23
28
  readonly onChanged: MotifEvent<void>;
24
29
  /** Sets items in memory, read as they are now. The search runs over them here. Call it again after they change. */
@@ -45,10 +50,29 @@ export declare class DataItems<T> implements ItemSource<T>, IDisposable {
45
50
  */
46
51
  find(value: unknown, valueOf: (item: T) => unknown, same?: (a: unknown, b: unknown) => boolean): Promise<T | undefined>;
47
52
  findLoaded(value: unknown, valueOf: (item: T) => unknown, same?: (a: unknown, b: unknown) => boolean): T | undefined;
53
+ /**
54
+ * Whether `item` is the item of `value`: its value is the same, the same once normalized (`normalizeKey`), or the
55
+ * data source matched `value` to it (a key it compares its own way, such as `'A '` for `'A'`).
56
+ */
57
+ holds(item: T, value: unknown, valueOf: (item: T) => unknown, same?: (a: unknown, b: unknown) => boolean): boolean;
58
+ /** The test of `holds` for one value, with what is known of it read once: for many items. */
59
+ matcher(value: unknown, valueOf: (item: T) => unknown, same?: (a: unknown, b: unknown) => boolean): (item: T) => boolean;
60
+ /**
61
+ * Whether two values stand for the same item: they are the same, the same once normalized (`normalizeKey`), or the
62
+ * data source matched them to one item (`'A '` and `'A'` where it disregards trailing spaces).
63
+ */
64
+ sameItem(a: unknown, b: unknown): boolean;
65
+ /** Of `values` (the chosen ones), the one that stands for the same item as `value` (`sameItem`); `null` when none does. */
66
+ heldIn(values: ReadonlySet<unknown>, value: unknown): {
67
+ value: unknown;
68
+ } | null;
48
69
  /** What is known of the item `find` requested from the data source: loading, found, or not in the source. */
49
70
  known(value: unknown): KeyedItem<T> | undefined;
50
71
  /** Requests the item of `value` from the data source again after its request failed. */
51
72
  retry(value: unknown): Promise<T | undefined>;
73
+ /** The cache of the data source, shared by every list and grid that reads it with the same value field and rule. */
74
+ private keyed;
75
+ private keyStringOf;
52
76
  reload(): Promise<void>;
53
77
  dispose(): void;
54
78
  private detach;
@@ -8,10 +8,17 @@ type Source = data.DataSource<any, any> | readonly unknown[];
8
8
  * drop-down's field or a filter list needs to turn a key into its item. Keys are requested when they
9
9
  * are needed and only once. Keys requested at the same moment go out together, in one request
10
10
  * per `batchSize` keys (`valueField in [...]`), or in one request per key for a service that only returns
11
- * one item by key (`resolve: 'byKey'`). There is one cache per source and value field, shared by
12
- * every grid, column and list that uses it (`KeyedItems.of`). Requests go through the source's
11
+ * one item by key (`resolve: 'byKey'`). There is one cache per source, value field and `normalizeKey`,
12
+ * shared by every grid, column and list that uses it (`KeyedItems.of`). Requests go through the source's
13
13
  * adapter, so the source's own query (filter, page, search) never changes.
14
14
  *
15
+ * Which item a key stands for is the source's decision: a source may compare keys its own way (a
16
+ * database that disregards trailing spaces, case or accents, or reads `'007'` as `7`). The items of a
17
+ * batch are matched to the keys asked for; when keys are left over while the source returned items no
18
+ * key matched here, or items that differ from a key only in such a way, those keys are asked for one
19
+ * by one, and what the source returns for a key is that key's item. `normalizeKey` tells the cache the
20
+ * rule itself: keys equal once normalized are one key, also in an array, where no source decides.
21
+ *
15
22
  * @example
16
23
  * const customers = KeyedItems.of(customerSource, 'id');
17
24
  * customers.onResolved(() => redraw());
@@ -21,6 +28,8 @@ type Source = data.DataSource<any, any> | readonly unknown[];
21
28
  export declare class KeyedItems<T = unknown> {
22
29
  private readonly source;
23
30
  readonly valueField?: string | undefined;
31
+ /** Keys equal once normalized are one key (`(k) => typeof k === 'string' ? k.trimEnd() : k`). */
32
+ readonly normalizeKey?: ((key: unknown) => unknown) | undefined;
24
33
  /**
25
34
  * `'batch'` sends the keys of a moment in one request per `batchSize`, and `'byKey'` sends one request per key.
26
35
  * The default is `'batch'` when the service filters, otherwise `'byKey'`.
@@ -44,14 +53,26 @@ export declare class KeyedItems<T = unknown> {
44
53
  readonly onResolved: MotifEvent<readonly string[] | null>;
45
54
  /** The same string for equal keys, as the cache stores them (`1` and `'1'` are one key). */
46
55
  static keyString(key: unknown): string;
47
- /** The shared cache of a source and value field. Every data source over the same adapter shares it. */
48
- static of<T = unknown>(source: data.DataSource<any, any> | readonly T[], valueField?: string): KeyedItems<T>;
49
- constructor(source: Source, valueField?: string | undefined);
56
+ /**
57
+ * The shared cache of a source, value field and `normalizeKey`. Every data source over the same adapter shares it; give
58
+ * the same `normalizeKey` function wherever the source is used, so they share one cache.
59
+ */
60
+ static of<T = unknown>(source: data.DataSource<any, any> | readonly T[], valueField?: string, normalizeKey?: ((key: unknown) => unknown) | null): KeyedItems<T>;
61
+ constructor(source: Source, valueField?: string | undefined,
62
+ /** Keys equal once normalized are one key (`(k) => typeof k === 'string' ? k.trimEnd() : k`). */
63
+ normalizeKey?: ((key: unknown) => unknown) | undefined);
50
64
  /** Indicates whether the items are an array in memory, where every key is known immediately. */
51
65
  get inMemory(): boolean;
52
66
  /** The value of an item: its `valueField`, otherwise the adapter's key (for an array, `item.value` or the item itself). */
53
67
  valueOf(item: T): unknown;
68
+ /** The string the cache keeps a key under: equal for keys it counts as one (`normalizeKey`). */
69
+ keyStringOf(key: unknown): string;
54
70
  sameKey(a: unknown, b: unknown): boolean;
71
+ /**
72
+ * The item a key stands for, as a string: equal for keys the source matched to the same item (`'A'` and `'A '`
73
+ * where it disregards trailing spaces). A key not found yet stands for itself.
74
+ */
75
+ itemKeyOf(key: unknown): string;
55
76
  /** What is known of a key now, or `undefined` if it was never requested (an array knows every key). */
56
77
  get(key: unknown): KeyedItem<T> | undefined;
57
78
  /** Requests the keys that are not known yet, and resolves once each one is found or missing. */
@@ -86,7 +107,12 @@ export declare class KeyedItems<T = unknown> {
86
107
  /** The field a batch filters on: `valueField`, else the adapter's key when it is one field. */
87
108
  private batchField;
88
109
  private flush;
110
+ /** Runs the jobs `parallelRequests` at a time. */
111
+ private inTurns;
89
112
  private loadMany;
113
+ /** Whether an item differs from one of `keys` only in what databases often disregard (`looseKey`). */
114
+ private looselyIn;
115
+ /** One key asked for alone: by the adapter's key, or by `field` when the value is not the key. What comes is that key's. */
90
116
  private loadOne;
91
117
  /** Items a search brought: their keys are known from now on. */
92
118
  private keep;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Turns a key into the form in which keys are compared: keys equal once normalized are one key. For keys a source
3
+ * compares its own way, said here so that items in memory follow the same rule and the source is spared the requests
4
+ * that find it out: `(k) => (typeof k === 'string' ? k.trimEnd() : k)` for codes padded with spaces, `toLowerCase()` for
5
+ * ids written in either case. Give one function wherever the same source is read, so they share one cache.
6
+ */
7
+ export type NormalizeKey = (key: unknown) => unknown;
@@ -20,7 +20,8 @@ export declare class OptionList<T = unknown> extends Component<HTMLDivElement> {
20
20
  groupOf: ((item: T) => string | undefined) | null;
21
21
  /**
22
22
  * Draws an option's content instead of its text, into `host`. `option` holds the option's parts, for an owner that
23
- * marks the option itself. It can return a cleanup function.
23
+ * marks the option itself. `host` (`option.text`) is made for each drawing and goes when the option is drawn again
24
+ * or goes; a cleanup function returned is given to it and runs then.
24
25
  */
25
26
  draw: ((item: T, host: ComponentBase<HTMLElement>, option: OptionParts) => (() => void) | void) | null;
26
27
  isSelected: (item: T) => boolean;
@@ -132,9 +133,9 @@ export declare class OptionList<T = unknown> extends Component<HTMLDivElement> {
132
133
  private makeOption;
133
134
  /**
134
135
  * Binds an option's text to `read`, read again when the items are given again or refreshed, and written in place.
135
- * For a `draw` that writes the text itself; the release it gives back stops the binding.
136
+ * For a `draw` that writes the text itself; the binding goes with the text part it writes.
136
137
  */
137
- bindText(option: OptionParts, read: () => string): () => void;
138
+ bindText(option: OptionParts, read: () => string): void;
138
139
  /** The index of the option an event started in, asked of the options drawn; -1 for none. */
139
140
  private indexOf;
140
141
  /** "Could not load. Retry": a row or a list that failed, which a press loads again. */
@@ -3,7 +3,7 @@ import type { ComponentBase } from '@motifx/core';
3
3
  export interface OptionParts {
4
4
  /** The option (`role="option"`). */
5
5
  readonly row: ComponentBase<HTMLElement>;
6
- /** Where the option's text or the owner's template goes. */
6
+ /** Where the option's text or the owner's template goes: a new part each time the drawing changes. */
7
7
  readonly text: ComponentBase<HTMLElement>;
8
8
  /** In a list of several choices the check mark's glyph (`data-icon="check"`), else `null`. */
9
9
  readonly check: ComponentBase<HTMLElement> | null;
package/dist/styles.css CHANGED
@@ -16741,10 +16741,16 @@
16741
16741
  min-inline-size: 0;
16742
16742
  }
16743
16743
 
16744
+ /* The actions keep to the end: room the bar holds for its parts in the "more" menu stays before them. */
16744
16745
  .mx-app-bar__actions > .mx-toolbar {
16746
+ justify-content: flex-end;
16745
16747
  min-inline-size: 0;
16746
16748
  }
16747
16749
 
16750
+ .mx-app-bar__actions > .mx-toolbar > .mx-toolbar__more {
16751
+ margin-inline-start: 0;
16752
+ }
16753
+
16748
16754
  /* A back arrow points to where the page came from. */
16749
16755
  .mx-app-bar__navigation[data-back]:dir(rtl) .mx-glyph {
16750
16756
  scale: -1 1;
@@ -20458,6 +20464,27 @@
20458
20464
  margin-inline-start: auto;
20459
20465
  }
20460
20466
 
20467
+ /* Holds the room of the parts in the "more" menu in the bar's own size (Toolbar.keepRoom): as long as they are, yet
20468
+ grows by a millionth of the room to spare from nothing, so it takes no room on the bar; its margin takes back the
20469
+ gap before it. */
20470
+ .mx-toolbar > .mx-toolbar__reserve {
20471
+ flex: 0.000001 0 0;
20472
+ min-inline-size: 0;
20473
+ min-block-size: 0;
20474
+ inline-size: var(--_reserve, 0);
20475
+ block-size: 0;
20476
+ margin-inline-start: calc(-1 * var(--_reserve-gap, 0px));
20477
+ visibility: hidden;
20478
+ pointer-events: none;
20479
+ }
20480
+
20481
+ .mx-toolbar[data-orientation='vertical'] > .mx-toolbar__reserve {
20482
+ inline-size: 0;
20483
+ block-size: var(--_reserve, 0);
20484
+ margin-inline-start: 0;
20485
+ margin-block-start: calc(-1 * var(--_reserve-gap, 0px));
20486
+ }
20487
+
20461
20488
  .mx-toolbar[data-orientation='vertical'] > .mx-toolbar__more {
20462
20489
  margin-inline-start: 0;
20463
20490
  margin-block-start: auto;
@@ -22656,7 +22683,12 @@
22656
22683
  chips carry data-dir and data-dragging, the panel and the header row data-drop while something
22657
22684
  can be dropped on them. Only the layout is here, with the tints over a row (shared by its cells), the
22658
22685
  cell ranges and the lines a search draws under its marks: every piece's look is a unit of the grid's
22659
- schema (`$units`), painted by units.css from the language's tokens. */
22686
+ schema (`$units`), painted by units.css from the language's tokens.
22687
+
22688
+ A grid can hold another grid (in a row's details, in a cell). A rule that depends on a state, of the
22689
+ grid or of one of its rows or cells, goes on from there by child combinators only, so it stops at the
22690
+ grid's own parts; the steps between are in `:where()` and add no weight. A descendant combinator after
22691
+ a state would reach the same parts of the grid inside. */
22660
22692
  @layer mx.components {
22661
22693
  .mx-data-grid {
22662
22694
  --_row-height: calc(var(--_datagrid-record-height) + var(--_datagrid-row-space));
@@ -22668,6 +22700,14 @@
22668
22700
  --_z-head: 3;
22669
22701
  --_z-drop: 4;
22670
22702
  --_z-ghost: 5;
22703
+ /* A grid inside a cell of a range starts without that cell's edges and fill. */
22704
+ --_edge-top: initial;
22705
+ --_edge-bottom: initial;
22706
+ --_edge-start: initial;
22707
+ --_edge-end: initial;
22708
+ --_range: initial;
22709
+ /* The tint of the odd rows: none, or the stripe (`striped`). On the root, so a grid inside reads its own. */
22710
+ --_stripe-tint: transparent;
22671
22711
 
22672
22712
  position: relative;
22673
22713
  display: flex;
@@ -22680,7 +22720,7 @@
22680
22720
  }
22681
22721
 
22682
22722
  /* Until the grid's own sheet is in the page, its rows are not shown half laid out. */
22683
- .mx-data-grid[data-settling] .mx-data-grid__viewport {
22723
+ .mx-data-grid[data-settling] > :where(.mx-data-grid__main) > .mx-data-grid__viewport {
22684
22724
  visibility: hidden;
22685
22725
  }
22686
22726
 
@@ -22736,9 +22776,15 @@
22736
22776
  will-change: transform;
22737
22777
  }
22738
22778
 
22739
- /* A selected row's fill stands for the stripe and the new-row tint. */
22740
- .mx-data-grid[data-striped] .mx-data-grid__body > .mx-data-grid__row[data-odd]:not([data-selected]) {
22741
- --_tint: var(--_datagrid-stripe-tint);
22779
+ .mx-data-grid[data-striped] {
22780
+ --_stripe-tint: var(--_datagrid-stripe-tint);
22781
+ }
22782
+
22783
+ /* The stripe comes first and weighs no more than the tints after it (`:where()` adds no weight), so a striped
22784
+ row shows the pointer, the active row and a new row like any other. A selected row's fill stands for the
22785
+ stripe and the new-row tint. */
22786
+ .mx-data-grid__body > .mx-data-grid__row[data-odd]:where(:not([data-selected])) {
22787
+ --_tint: var(--_stripe-tint);
22742
22788
  }
22743
22789
 
22744
22790
  .mx-data-grid__body > .mx-data-grid__row[data-status='new']:not([data-selected]) {
@@ -22754,7 +22800,7 @@
22754
22800
  }
22755
22801
 
22756
22802
  /* With selection on, the active row has only the hover tint, over the selection fill too. */
22757
- .mx-data-grid[data-selection] .mx-data-grid__body > .mx-data-grid__row[data-active] {
22803
+ .mx-data-grid[data-selection] > :where(.mx-data-grid__main) > :where(.mx-data-grid__viewport) > .mx-data-grid__body > .mx-data-grid__row[data-active] {
22758
22804
  --_tint: var(--_datagrid-hover-tint);
22759
22805
  }
22760
22806
 
@@ -22822,7 +22868,7 @@
22822
22868
  auto;
22823
22869
  }
22824
22870
 
22825
- .mx-data-grid:dir(rtl) .mx-data-grid__cell:is([data-range], [data-run]) {
22871
+ .mx-data-grid__cell:dir(rtl):is([data-range], [data-run]) {
22826
22872
  background-position: top, bottom, right, left, 0 0, 0 0;
22827
22873
  }
22828
22874
 
@@ -22885,7 +22931,7 @@
22885
22931
  user-select: none;
22886
22932
  }
22887
22933
 
22888
- .mx-data-grid[data-drag-selecting='cells'] .mx-data-grid__body {
22934
+ .mx-data-grid[data-drag-selecting='cells'] > :where(.mx-data-grid__main) > :where(.mx-data-grid__viewport) > .mx-data-grid__body {
22889
22935
  cursor: cell;
22890
22936
  }
22891
22937
 
@@ -22907,7 +22953,7 @@
22907
22953
  }
22908
22954
 
22909
22955
  /* Rows still loading, and a lookup cell whose key is still asked for: a soft bar in each cell (`placeholder`). */
22910
- .mx-data-grid__row[data-loading] .mx-data-grid__cell::after,
22956
+ .mx-data-grid__row[data-loading] > .mx-data-grid__cell::after,
22911
22957
  .mx-data-grid__cell[data-lookup='loading']::after {
22912
22958
  content: '';
22913
22959
  position: absolute;
@@ -22992,7 +23038,7 @@
22992
23038
  scale: -1 1;
22993
23039
  }
22994
23040
 
22995
- .mx-data-grid__group-row[data-expanded] .mx-data-grid__group-toggle > .mx-glyph {
23041
+ .mx-data-grid__group-row[data-expanded] > :where(.mx-data-grid__group-cell) > :where(.mx-data-grid__group-content) > .mx-data-grid__group-toggle > .mx-glyph {
22996
23042
  rotate: var(--_datagrid-group-toggle-rotate-open);
22997
23043
  }
22998
23044
 
@@ -23139,6 +23185,11 @@
23139
23185
  flex: none;
23140
23186
  }
23141
23187
 
23188
+ /* The buttons wait out of sight, in their place, until their widths are measured (a frame after the rows show). */
23189
+ .mx-data-grid[data-measuring-actions] > :where(.mx-data-grid__main) > :where(.mx-data-grid__viewport) > :where(.mx-data-grid__body) > .mx-data-grid__row > .mx-data-grid__actions > * {
23190
+ visibility: hidden;
23191
+ }
23192
+
23142
23193
  /* Hidden cell where the action buttons are measured once. */
23143
23194
  .mx-data-grid__measure {
23144
23195
  position: absolute;
@@ -23223,7 +23274,7 @@
23223
23274
  touch-action: none;
23224
23275
  }
23225
23276
 
23226
- .mx-data-grid__row[data-draggable] .mx-data-grid__drag-handle {
23277
+ .mx-data-grid__row[data-draggable] > :where(.mx-data-grid__drag) > .mx-data-grid__drag-handle {
23227
23278
  display: inline-flex;
23228
23279
  }
23229
23280
 
@@ -23232,7 +23283,7 @@
23232
23283
  user-select: none;
23233
23284
  }
23234
23285
 
23235
- .mx-data-grid[data-row-dragging] .mx-data-grid__body > :is(.mx-data-grid__row, .mx-data-grid__group-row, .mx-data-grid__group-footer) {
23286
+ .mx-data-grid[data-row-dragging] > :where(.mx-data-grid__main) > :where(.mx-data-grid__viewport) > .mx-data-grid__body > :is(.mx-data-grid__row, .mx-data-grid__group-row, .mx-data-grid__group-footer) {
23236
23287
  transition: translate var(--mx-motion-duration-fast) var(--mx-motion-easing-standard);
23237
23288
  }
23238
23289
 
@@ -23395,8 +23446,8 @@
23395
23446
  display: none;
23396
23447
  }
23397
23448
 
23398
- .mx-data-grid__header-cell[data-sort='asc'] .mx-data-grid__sort-up,
23399
- .mx-data-grid__header-cell[data-sort='desc'] .mx-data-grid__sort-down {
23449
+ .mx-data-grid__header-cell[data-sort='asc'] > :where(.mx-data-grid__sort) > .mx-data-grid__sort-up,
23450
+ .mx-data-grid__header-cell[data-sort='desc'] > :where(.mx-data-grid__sort) > .mx-data-grid__sort-down {
23400
23451
  display: block;
23401
23452
  }
23402
23453
 
@@ -23535,7 +23586,7 @@
23535
23586
  }
23536
23587
 
23537
23588
  .mx-data-grid__resize:hover::after,
23538
- .mx-data-grid__header-cell[data-resizing] .mx-data-grid__resize::after {
23589
+ .mx-data-grid__header-cell[data-resizing] > .mx-data-grid__resize::after {
23539
23590
  inset-block: 0;
23540
23591
  }
23541
23592
 
@@ -23547,7 +23598,7 @@
23547
23598
  }
23548
23599
 
23549
23600
  /* No rows to show: the body keeps room for the message, also in a grid without a height. */
23550
- .mx-data-grid:is([data-state='empty'], [data-state='loading'], [data-state='error']) .mx-data-grid__body {
23601
+ .mx-data-grid:is([data-state='empty'], [data-state='loading'], [data-state='error']) > :where(.mx-data-grid__main) > :where(.mx-data-grid__viewport) > .mx-data-grid__body {
23551
23602
  min-block-size: calc(var(--_row-height) * var(--_empty-rows, 3));
23552
23603
  }
23553
23604
 
@@ -27701,12 +27752,12 @@
27701
27752
  text-decoration-line: var(--_datagrid-cell-missing-text-decoration, none);
27702
27753
  }
27703
27754
 
27704
- .mx-data-grid__row[data-status='removed'] .mx-data-grid__cell:not(.mx-data-grid__status) {
27755
+ .mx-data-grid__row[data-status='removed'] > .mx-data-grid__cell:not(.mx-data-grid__status) {
27705
27756
  color: var(--_datagrid-cell-removed-color, inherit);
27706
27757
  text-decoration-line: var(--_datagrid-cell-removed-text-decoration, none);
27707
27758
  }
27708
27759
 
27709
- .mx-data-grid__row[data-status='saving'] .mx-data-grid__cell:not(.mx-data-grid__status) {
27760
+ .mx-data-grid__row[data-status='saving'] > .mx-data-grid__cell:not(.mx-data-grid__status) {
27710
27761
  color: var(--_datagrid-cell-saving-color, inherit);
27711
27762
  }
27712
27763
 
@@ -27734,7 +27785,7 @@
27734
27785
  border-inline-start-color: var(--_datagrid-invalid-border-color, currentcolor);
27735
27786
  }
27736
27787
 
27737
- :is(.mx-data-grid__row[data-loading] .mx-data-grid__cell, .mx-data-grid__cell[data-lookup='loading'])::after {
27788
+ :is(.mx-data-grid__row[data-loading] > .mx-data-grid__cell, .mx-data-grid__cell[data-lookup='loading'])::after {
27738
27789
  background-color: var(--_datagrid-placeholder-bg, transparent);
27739
27790
  border-start-start-radius: var(--_datagrid-placeholder-radius, 0px);
27740
27791
  border-start-end-radius: var(--_datagrid-placeholder-radius, 0px);
@@ -27822,7 +27873,7 @@
27822
27873
  background-color: var(--_datagrid-head-button-hover-bg, transparent);
27823
27874
  }
27824
27875
 
27825
- .mx-data-grid__header-cell:is(:hover, :focus-within) :is(.mx-data-grid__menu-button, .mx-data-grid__filter-button), :is(.mx-data-grid__menu-button, .mx-data-grid__filter-button):focus-visible, .mx-data-grid[data-header-buttons='always'] :is(.mx-data-grid__menu-button, .mx-data-grid__filter-button) {
27876
+ .mx-data-grid__header-cell:is(:hover, :focus-within) > :is(.mx-data-grid__menu-button, .mx-data-grid__filter-button), :is(.mx-data-grid__menu-button, .mx-data-grid__filter-button):focus-visible, .mx-data-grid[data-header-buttons='always'] > :where(.mx-data-grid__main) > :where(.mx-data-grid__viewport) > :where(.mx-data-grid__head) > :where(.mx-data-grid__row) > :where(.mx-data-grid__header-cell) > :is(.mx-data-grid__menu-button, .mx-data-grid__filter-button) {
27826
27877
  opacity: var(--_datagrid-head-button-shown-opacity, var(--_datagrid-head-button-opacity, 1));
27827
27878
  }
27828
27879
 
@@ -27841,7 +27892,7 @@
27841
27892
  background-color: var(--_datagrid-resize-bg, transparent);
27842
27893
  }
27843
27894
 
27844
- .mx-data-grid__resize:hover::after, .mx-data-grid__header-cell[data-resizing] .mx-data-grid__resize::after {
27895
+ .mx-data-grid__resize:hover::after, .mx-data-grid__header-cell[data-resizing] > .mx-data-grid__resize::after {
27845
27896
  inline-size: var(--_datagrid-resize-active-width, var(--_datagrid-resize-width, auto));
27846
27897
  background-color: var(--_datagrid-resize-active-bg, var(--_datagrid-resize-bg, transparent));
27847
27898
  }
@@ -27922,7 +27973,7 @@
27922
27973
  background-color: var(--_datagrid-group-toggle-hover-bg, transparent);
27923
27974
  }
27924
27975
 
27925
- .mx-data-grid__group-row[data-locked] .mx-data-grid__group-toggle {
27976
+ .mx-data-grid__group-row[data-locked] > :where(.mx-data-grid__group-cell) > :where(.mx-data-grid__group-content) > .mx-data-grid__group-toggle {
27926
27977
  cursor: var(--_datagrid-group-toggle-locked-cursor, pointer);
27927
27978
  }
27928
27979
 
@@ -28177,7 +28228,7 @@
28177
28228
  color: var(--_datagrid-drag-handle-color, inherit);
28178
28229
  }
28179
28230
 
28180
- .mx-data-grid__row[data-draggable] .mx-data-grid__drag-handle:hover {
28231
+ .mx-data-grid__row[data-draggable] > :where(.mx-data-grid__drag) > .mx-data-grid__drag-handle:hover {
28181
28232
  background-color: var(--_datagrid-drag-handle-hover-bg, transparent);
28182
28233
  }
28183
28234
 
package/docs/accordion.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Accordion
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.10
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  An accordion expands and collapses sections under their headers. It supports one or several open sections, sections that stay open, icons, three appearances and sections that are created when first opened.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # ActionSheet
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.10
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A list of commands that slides up from the bottom of the screen, built from the kit's menu items and sized for touch. It supports a title, a message and a separate Cancel button. A context menu uses it on touch screens.
6
6
 
package/docs/appbar.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AppBar
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.10
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  The top bar of an application, with a navigation button, a logo, a title, a control and commands. The commands are a `Toolbar`, so those that do not fit move into a menu.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # AppMenu: API reference
2
2
 
3
- > AppMenu · @motifx-community/ui 0.1.0-beta.10
3
+ > AppMenu · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Everything `AppMenu` takes, offers and reports. Every prop is also a settable property, and a function is followed.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # AppMenu: Programmatic changes
2
2
 
3
- > AppMenu · @motifx-community/ui 0.1.0-beta.10
3
+ > AppMenu · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Items can be added, removed, moved and changed at any time, by their keys. Items that stay keep their place, and pages that were opened keep their state.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # AppMenu: Slots and search
2
2
 
3
- > AppMenu · @motifx-community/ui 0.1.0-beta.10
3
+ > AppMenu · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  The list can hold the app’s own content above and under its items, such as the user’s name or the version, and a search that narrows a long list as the user types.
6
6
 
package/docs/appmenu.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # AppMenu
2
2
 
3
- > AppMenu · @motifx-community/ui 0.1.0-beta.10
3
+ > AppMenu · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  The main menu of an application. It slides in from the start edge with a list of items, and each item shows its own page beside the list or runs a command. The menu holds nothing of its own: the items, the pages and the commands are given by the application.
6
6
 
package/docs/avatar.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Avatar and AvatarGroup
2
2
 
3
- > Display · @motifx-community/ui 0.1.0-beta.10
3
+ > Display · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Represents a person with a picture, initials or an icon, with an optional presence indicator on its corner. A group stacks or spreads avatars and counts the ones it does not show.
6
6
 
package/docs/badge.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Badge
2
2
 
3
- > Display · @motifx-community/ui 0.1.0-beta.10
3
+ > Display · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A short text, count or dot, shown inline or on the corner of a button, avatar or icon. A count above its maximum displays as “99+”, and a count of zero is hidden.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # BarGauge: Angles and size
2
2
 
3
- > Gauges · @motifx-community/ui 0.1.0-beta.10
3
+ > Gauges · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  How far the bars go round and which way they face fit a bar gauge to the room it has.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # BarGauge: Data
2
2
 
3
- > Gauges · @motifx-community/ui 0.1.0-beta.10
3
+ > Gauges · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A bar gauge reads numbers, or rows through their fields, and follows them as they change.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # BarGauge: Labels and legend
2
2
 
3
- > Gauges · @motifx-community/ui 0.1.0-beta.10
3
+ > Gauges · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Each value can be written at the end of its bar, named in a legend, and shown with its name under the pointer.
6
6
 
package/docs/bar-gauge.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # BarGauge
2
2
 
3
- > Gauges · @motifx-community/ui 0.1.0-beta.10
3
+ > Gauges · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Shows several values side by side as bars bent round one middle, each against the same scale. It compares a few values at a glance, in little room.
6
6
 
package/docs/barcode.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Barcode
2
2
 
3
- > Display · @motifx-community/ui 0.1.0-beta.10
3
+ > Display · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A linear barcode, drawn as vectors: Code 128, Code 39, EAN-13, EAN-8, UPC-A or Interleaved 2 of 5. It has no dependencies, works out check digits and refuses a value the format cannot hold.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # BottomNavigation
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.10
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  The destinations of an application at the bottom of the screen, each an icon with a label. The bar is one Tab stop, marks the selected item for screen readers and keeps clear of the home indicator of a phone.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # BottomSheet
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.10
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A panel that slides up from the bottom of the page or a container and stops at set heights: peek, half, full, the height of its content, or custom values. Users can drag it by its handle and title, flick it, and swipe down to close it. It can be modal or non-modal, and the back button closes it on phones.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Breadcrumb
2
2
 
3
- > Navigation · @motifx-community/ui 0.1.0-beta.10
3
+ > Navigation · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Shows the path to the current page. Each step is a link or button, and the current page comes last. Steps that do not fit move into a menu after the first step.
6
6
 
package/docs/button.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Button
2
2
 
3
- > Buttons · @motifx-community/ui 0.1.0-beta.10
3
+ > Buttons · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A native `<button>` styled with design tokens. It comes in three variants, three tones and three sizes, and supports an icon and an `&` access key. A button can act as a toggle, indicate that work is in progress, and open a menu or any other content, either from the whole button or from an arrow next to it with `split`, so the button keeps its own action.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # ButtonGroup
2
2
 
3
- > Buttons · @motifx-community/ui 0.1.0-beta.10
3
+ > Buttons · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A set of related buttons, used as a segmented selection of one or more options or as a row of actions. The buttons are standard kit buttons and are attached by default.
6
6
 
package/docs/buttons.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Buttons
2
2
 
3
- > Buttons · @motifx-community/ui 0.1.0-beta.10
3
+ > Buttons · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Buttons start commands. The group covers single buttons, groups of them and a floating button for the main action of a screen. Toolbars and menus, which hold the many commands of an application, are in [Navigation](navigation.md).
6
6
 
package/docs/calendar.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Calendar
2
2
 
3
- > Editors · @motifx-community/ui 0.1.0-beta.10
3
+ > Editors · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A month view for selecting a date, with year and decade views for quick navigation. It serves as the DateBox picker and can also be used on its own.
6
6
 
package/docs/card.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Card
2
2
 
3
- > Display · @motifx-community/ui 0.1.0-beta.10
3
+ > Display · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  A surface for a single subject, with an optional image, a header with an avatar and titles, content and a row of actions. Empty parts are not rendered.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chart: Bars
2
2
 
3
- > Charts · @motifx-community/ui 0.1.0-beta.10
3
+ > Charts · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Bars compare amounts. They stand on a common baseline, so lengths compare exactly, side by side, stacked, or on their side for long names.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Chart: Candles
2
2
 
3
- > Charts · @motifx-community/ui 0.1.0-beta.10
3
+ > Charts · @motifx-community/ui 0.1.0-beta.13
4
4
 
5
5
  Candles show the first, highest, lowest and last price for each position.
6
6