@zeyos/zx 4.4.0 → 5.2.0

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 (252) hide show
  1. package/CHANGELOG.md +447 -0
  2. package/README.md +44 -11
  3. package/dist/types/components/account-menu/account-menu.d.ts +8 -0
  4. package/dist/types/components/activity-list/activity-list.d.ts +31 -1
  5. package/dist/types/components/app-icon/app-icon.d.ts +14 -2
  6. package/dist/types/components/app-sidebar/app-sidebar.d.ts +293 -17
  7. package/dist/types/components/avatar/avatar.d.ts +46 -7
  8. package/dist/types/components/badge/badge.d.ts +21 -1
  9. package/dist/types/components/button/button.d.ts +15 -0
  10. package/dist/types/components/calendar/calendar.d.ts +67 -5
  11. package/dist/types/components/card-view/card-view.d.ts +7 -4
  12. package/dist/types/components/card-view/record-card.d.ts +11 -0
  13. package/dist/types/components/chart/chart.d.ts +10 -0
  14. package/dist/types/components/checklist/checklist.d.ts +9 -0
  15. package/dist/types/components/code-editor/code-editor.d.ts +6 -17
  16. package/dist/types/components/context-menu/context-menu.d.ts +6 -2
  17. package/dist/types/components/data-filter/data-filter.d.ts +4 -4
  18. package/dist/types/components/datebox/date-range-box.d.ts +5 -1
  19. package/dist/types/components/datebox/datebox.d.ts +7 -2
  20. package/dist/types/components/dialog/dialog.d.ts +46 -6
  21. package/dist/types/components/dropdown/dropdown.d.ts +24 -9
  22. package/dist/types/components/entity-ref/entity-ref.d.ts +2 -2
  23. package/dist/types/components/field/field.d.ts +54 -2
  24. package/dist/types/components/fieldset/external-adapter.d.ts +83 -0
  25. package/dist/types/components/fieldset/fieldset.d.ts +26 -1
  26. package/dist/types/components/file-item/file-item.d.ts +34 -6
  27. package/dist/types/components/file-list/file-list.d.ts +35 -3
  28. package/dist/types/components/filter/filter.d.ts +127 -3
  29. package/dist/types/components/filter-panel/filter-panel.d.ts +36 -7
  30. package/dist/types/components/form/form.d.ts +12 -1
  31. package/dist/types/components/kanban-view/kanban-card.d.ts +8 -0
  32. package/dist/types/components/launcher/launcher.d.ts +268 -15
  33. package/dist/types/components/list-toolbar/list-toolbar.d.ts +16 -7
  34. package/dist/types/components/menu-button/menu-button.d.ts +39 -5
  35. package/dist/types/components/message/message.d.ts +132 -17
  36. package/dist/types/components/modal/modal.d.ts +43 -2
  37. package/dist/types/components/module-bar/module-bar.d.ts +395 -0
  38. package/dist/types/components/pagination/pagination.d.ts +17 -3
  39. package/dist/types/components/select/color.d.ts +12 -0
  40. package/dist/types/components/select/glyphs.d.ts +124 -0
  41. package/dist/types/components/select/select.d.ts +17 -3
  42. package/dist/types/components/sheet/sheet.d.ts +15 -0
  43. package/dist/types/components/stat-tile/stat-tile.d.ts +16 -5
  44. package/dist/types/components/tabbox/tabbox.d.ts +9 -0
  45. package/dist/types/components/table/table.d.ts +311 -18
  46. package/dist/types/components/tag-picker/tag-picker.d.ts +21 -4
  47. package/dist/types/components/tree/tree.d.ts +13 -0
  48. package/dist/types/components/view/record-view.d.ts +59 -2
  49. package/dist/types/components/view-settings/view-settings.d.ts +879 -0
  50. package/dist/types/components/workspace-switcher/workspace-switcher.d.ts +327 -0
  51. package/dist/types/core/breakpoint.d.ts +1 -1
  52. package/dist/types/core/component.d.ts +12 -2
  53. package/dist/types/core/i18n.d.ts +27 -3
  54. package/dist/types/core/icons.d.ts +23 -25
  55. package/dist/types/core/keyboard.d.ts +98 -1
  56. package/dist/types/core/messages.d.ts +382 -0
  57. package/dist/types/core/motion.d.ts +59 -0
  58. package/dist/types/core/overlay-host.d.ts +42 -1
  59. package/dist/types/core/overlay-stack.d.ts +260 -0
  60. package/dist/types/index.d.ts +10 -5
  61. package/dist/types/internal/app-rail.d.ts +38 -0
  62. package/dist/types/internal/menu-items.d.ts +71 -3
  63. package/dist/types/zeyos/connect.d.ts +6 -0
  64. package/dist/types/zeyos/form.d.ts +50 -9
  65. package/dist/types/zeyos/index.d.ts +2 -1
  66. package/dist/types/zeyos/launcher.d.ts +9 -0
  67. package/dist/types/zeyos/module-bar.d.ts +176 -0
  68. package/dist/types/zeyos/query.d.ts +110 -5
  69. package/dist/types/zeyos/schema.d.ts +24 -1
  70. package/dist/types/zeyos/table.d.ts +345 -22
  71. package/dist/types/zeyos/view.d.ts +26 -2
  72. package/dist/zx-zeyos.esm.js +6178 -1008
  73. package/dist/zx-zeyos.esm.min.js +53 -5
  74. package/dist/zx.css +2861 -827
  75. package/dist/zx.esm.js +8909 -1480
  76. package/dist/zx.esm.min.js +55 -7
  77. package/dist/zx.global.js +8911 -1482
  78. package/dist/zx.global.min.js +55 -7
  79. package/dist/zx.min.css +1 -1
  80. package/docs/api.json +1079 -117
  81. package/docs/llms.md +956 -154
  82. package/docs/llms.txt +9 -5
  83. package/package.json +1 -1
  84. package/src/components/account-menu/account-menu.css +35 -10
  85. package/src/components/account-menu/account-menu.js +12 -0
  86. package/src/components/activity-item/activity-item.css +1 -1
  87. package/src/components/activity-item/activity-item.js +3 -0
  88. package/src/components/activity-list/activity-list.css +38 -3
  89. package/src/components/activity-list/activity-list.js +61 -1
  90. package/src/components/app-icon/app-icon.css +14 -3
  91. package/src/components/app-icon/app-icon.js +11 -1
  92. package/src/components/app-rail/app-rail.css +59 -79
  93. package/src/components/app-sidebar/app-sidebar.css +304 -168
  94. package/src/components/app-sidebar/app-sidebar.js +667 -46
  95. package/src/components/aurora/aurora.css +5 -3
  96. package/src/components/avatar/avatar.css +32 -7
  97. package/src/components/avatar/avatar.js +72 -8
  98. package/src/components/badge/badge.css +54 -2
  99. package/src/components/badge/badge.js +29 -2
  100. package/src/components/breadcrumb/breadcrumb.css +1 -1
  101. package/src/components/button/button.css +67 -9
  102. package/src/components/button/button.js +38 -0
  103. package/src/components/calendar/calendar.css +47 -47
  104. package/src/components/calendar/calendar.js +26 -52
  105. package/src/components/card/card.css +4 -4
  106. package/src/components/card-view/card-view.css +14 -12
  107. package/src/components/card-view/card-view.js +13 -9
  108. package/src/components/card-view/record-card.js +14 -3
  109. package/src/components/chart/chart.css +4 -1
  110. package/src/components/chart/chart.js +12 -0
  111. package/src/components/check-button/check-button.css +10 -2
  112. package/src/components/checklist/checklist.css +9 -2
  113. package/src/components/checklist/checklist.js +11 -5
  114. package/src/components/checklist/field-adapter.js +3 -1
  115. package/src/components/code-editor/code-editor.css +7 -6
  116. package/src/components/code-editor/code-editor.js +19 -1
  117. package/src/components/code-editor/field-adapter.js +9 -2
  118. package/src/components/context-menu/context-menu.css +9 -4
  119. package/src/components/context-menu/context-menu.js +8 -2
  120. package/src/components/copy/copy-button.css +6 -0
  121. package/src/components/copy/copy-input.css +9 -4
  122. package/src/components/data-filter/data-filter.css +5 -4
  123. package/src/components/data-filter/data-filter.js +2 -2
  124. package/src/components/date-picker/date-picker.css +6 -6
  125. package/src/components/date-picker/date-range-picker.css +3 -3
  126. package/src/components/date-picker/time-picker.css +3 -3
  127. package/src/components/datebox/date-range-box.css +79 -2
  128. package/src/components/datebox/date-range-box.js +13 -2
  129. package/src/components/datebox/datebox.css +79 -2
  130. package/src/components/datebox/datebox.js +13 -2
  131. package/src/components/dialog/dialog.css +26 -0
  132. package/src/components/dialog/dialog.js +99 -17
  133. package/src/components/dock/dock.css +5 -4
  134. package/src/components/dropdown/dropdown.css +1 -1
  135. package/src/components/dropdown/dropdown.js +159 -72
  136. package/src/components/empty-state/empty-state.css +2 -2
  137. package/src/components/entity-ref/entity-ref.css +1 -1
  138. package/src/components/entity-ref/entity-ref.js +1 -1
  139. package/src/components/field/field.css +28 -9
  140. package/src/components/field/field.js +101 -29
  141. package/src/components/field-upload/field-upload.css +1 -1
  142. package/src/components/fieldset/external-adapter.js +363 -0
  143. package/src/components/fieldset/fieldset.css +5 -3
  144. package/src/components/fieldset/fieldset.js +38 -64
  145. package/src/components/file-item/file-item.js +144 -10
  146. package/src/components/file-list/file-list.js +144 -21
  147. package/src/components/filter/filter.css +86 -2
  148. package/src/components/filter/filter.js +307 -11
  149. package/src/components/filter-panel/filter-panel.css +1 -1
  150. package/src/components/filter-panel/filter-panel.js +149 -32
  151. package/src/components/finder/finder.css +16 -14
  152. package/src/components/form/form.css +5 -4
  153. package/src/components/form/form.js +11 -2
  154. package/src/components/grid/grid.css +1 -1
  155. package/src/components/groupbox/groupbox.css +1 -1
  156. package/src/components/kanban-view/kanban-card.js +11 -3
  157. package/src/components/kanban-view/kanban-view.css +42 -18
  158. package/src/components/kanban-view/kanban-view.js +9 -6
  159. package/src/components/launcher/launcher.css +108 -26
  160. package/src/components/launcher/launcher.js +530 -42
  161. package/src/components/list-toolbar/list-toolbar.css +13 -8
  162. package/src/components/list-toolbar/list-toolbar.js +40 -14
  163. package/src/components/master-panel/master-panel.css +2 -0
  164. package/src/components/master-panel/master-panel.js +0 -1
  165. package/src/components/menu-button/menu-button.css +72 -4
  166. package/src/components/menu-button/menu-button.js +160 -18
  167. package/src/components/message/message.css +33 -3
  168. package/src/components/message/message.js +264 -22
  169. package/src/components/modal/modal.css +1 -1
  170. package/src/components/modal/modal.js +83 -15
  171. package/src/components/module-bar/module-bar.css +486 -0
  172. package/src/components/module-bar/module-bar.js +1074 -0
  173. package/src/components/multi-value-editor/multi-value-editor.css +1 -1
  174. package/src/components/navigation-bar/navigation-bar.css +18 -9
  175. package/src/components/number-field/field-adapter.js +3 -1
  176. package/src/components/number-field/number-field.css +70 -0
  177. package/src/components/number-field/number-field.js +2 -0
  178. package/src/components/pagination/pagination.css +13 -11
  179. package/src/components/pagination/pagination.js +20 -4
  180. package/src/components/panel/panel.css +4 -3
  181. package/src/components/questionnaire/questionnaire.css +4 -4
  182. package/src/components/rating/field-adapter.js +2 -1
  183. package/src/components/rating/rating.css +8 -1
  184. package/src/components/search/search.css +4 -1
  185. package/src/components/select/color.js +22 -0
  186. package/src/components/select/field-adapter.js +2 -0
  187. package/src/components/select/glyphs.js +165 -0
  188. package/src/components/select/select.css +138 -45
  189. package/src/components/select/select.js +92 -47
  190. package/src/components/sheet/sheet.css +12 -9
  191. package/src/components/sheet/sheet.js +74 -32
  192. package/src/components/slider/field-adapter.js +6 -1
  193. package/src/components/slider/slider.css +18 -4
  194. package/src/components/slider/slider.js +1 -1
  195. package/src/components/sort-control/sort-control.css +4 -1
  196. package/src/components/split-view/split-view.css +1 -1
  197. package/src/components/stat-tile/stat-tile.css +42 -47
  198. package/src/components/stat-tile/stat-tile.js +17 -6
  199. package/src/components/stepper/stepper.css +1 -1
  200. package/src/components/tabbox/tabbox.css +41 -32
  201. package/src/components/tabbox/tabbox.js +5 -1
  202. package/src/components/table/table.css +187 -37
  203. package/src/components/table/table.js +718 -73
  204. package/src/components/tag-picker/field-adapter.js +2 -1
  205. package/src/components/tag-picker/tag-picker.css +83 -5
  206. package/src/components/tag-picker/tag-picker.js +25 -8
  207. package/src/components/timebox/timebox.css +22 -2
  208. package/src/components/toggle/toggle.css +12 -1
  209. package/src/components/toolbar/toolbar.js +2 -2
  210. package/src/components/tooltip/tooltip.css +4 -0
  211. package/src/components/tooltip/tooltip.js +44 -19
  212. package/src/components/tree/tree.css +26 -17
  213. package/src/components/tree/tree.js +31 -0
  214. package/src/components/value-list/value-list.css +3 -3
  215. package/src/components/view/record-view.css +1 -1
  216. package/src/components/view/record-view.js +178 -18
  217. package/src/components/view-settings/view-settings.css +285 -0
  218. package/src/components/view-settings/view-settings.js +1830 -0
  219. package/src/components/workspace-switcher/workspace-switcher.css +188 -0
  220. package/src/components/workspace-switcher/workspace-switcher.js +463 -0
  221. package/src/core/breakpoint.js +1 -1
  222. package/src/core/component.js +88 -17
  223. package/src/core/fontawesome.js +5 -1
  224. package/src/core/i18n.js +47 -4
  225. package/src/core/icons.js +204 -61
  226. package/src/core/keyboard.js +206 -11
  227. package/src/core/messages.js +427 -0
  228. package/src/core/motion.js +147 -0
  229. package/src/core/overlay-host.js +77 -3
  230. package/src/core/overlay-stack.js +487 -0
  231. package/src/core/position.js +22 -3
  232. package/src/index.js +10 -5
  233. package/src/internal/app-rail.js +135 -55
  234. package/src/internal/menu-items.js +61 -3
  235. package/src/zeyos/connect.js +6 -2
  236. package/src/zeyos/form.js +69 -27
  237. package/src/zeyos/index.js +4 -1
  238. package/src/zeyos/launcher.js +8 -3
  239. package/src/zeyos/module-bar.js +181 -0
  240. package/src/zeyos/query.js +197 -13
  241. package/src/zeyos/schema.js +144 -27
  242. package/src/zeyos/table.js +287 -84
  243. package/src/zeyos/view.js +49 -93
  244. package/styles/base.css +72 -1
  245. package/styles/icons.css +11 -1
  246. package/styles/print.css +1 -1
  247. package/styles/tokens/dark.css +117 -37
  248. package/styles/tokens/global.css +121 -27
  249. package/styles/tokens/semantic.css +140 -43
  250. package/styles/tokens/themes.css +7 -6
  251. package/styles/zx.css +3 -1
  252. package/styles/tokens/density.css +0 -9
@@ -31,6 +31,10 @@ export type StatTileNameParts = {
31
31
  * The formatted value.
32
32
  */
33
33
  value?: string;
34
+ /**
35
+ * The context line under the value, e.g. `'of 13,184'`.
36
+ */
37
+ caption?: string;
34
38
  /**
35
39
  * The change, already worded for speech (`'up 2'`, not `'+2'`).
36
40
  */
@@ -58,6 +62,11 @@ export type StatTileOptions = {
58
62
  * ISO 4217 code used by `format: 'currency'`.
59
63
  */
60
64
  currency?: string | null;
65
+ /**
66
+ * A muted context line under the value — what the number is out
67
+ * of or measured in, e.g. `'of 13,184'` or `'open tickets'`. Part of the accessible name.
68
+ */
69
+ caption?: string;
61
70
  /**
62
71
  * BCP 47 tag for every formatter; defaults to the active language.
63
72
  */
@@ -87,12 +96,13 @@ export type StatTileOptions = {
87
96
  */
88
97
  trend?: number[];
89
98
  /**
90
- * Icon name from `icons.js`, shown beside the label.
99
+ * Icon name from `icons.js`, shown muted beside the label —
100
+ * a glyph, not a coloured chip.
91
101
  */
92
102
  icon?: string | null;
93
103
  /**
94
- * Semantic intent. It tints the icon and the sparkline
95
- * and never the value, which stays at full text contrast whatever intent a record carries.
104
+ * Semantic intent. It tints the sparkline and never the
105
+ * value, which stays at full text contrast whatever intent a record carries.
96
106
  */
97
107
  kind?: StatTileKind;
98
108
  /**
@@ -245,10 +255,11 @@ export declare function statTileTag(options?: {
245
255
  onclick?: unknown;
246
256
  }): 'a' | 'button' | 'div';
247
257
  /**
248
- * Composes the tile's accessible name: label, then value, then how it changed.
258
+ * Composes the tile's accessible name: label, then value with its caption, then how it changed.
249
259
  *
250
260
  * The sparkline is decoration and contributes nothing, and the delta arrives already worded —
251
- * `'up 2'` rather than `'+2'` — because a screen reader should not have to interpret a glyph.
261
+ * `'up 2'` rather than `'+2'` — because a screen reader should not have to interpret a glyph. The
262
+ * caption is read with the value it qualifies (`'2,184 of 13,184'`), not as a separate clause.
252
263
  *
253
264
  * @param {StatTileNameParts} [parts={}] The pieces, already formatted and translated.
254
265
  * @returns {string} The name, with empty pieces dropped rather than left as stray punctuation.
@@ -53,6 +53,12 @@ export type TabboxOptions = {
53
53
  * Keep inactive panel elements mounted.
54
54
  */
55
55
  keepAlive?: boolean;
56
+ /**
57
+ * Accessible name of the tab list — what the tabs switch between
58
+ * ("Record sections"). A tab list needs one whenever the page has more than one, and screen
59
+ * readers announce it on entry.
60
+ */
61
+ label?: string;
56
62
  /**
57
63
  * Change callback.
58
64
  */
@@ -107,6 +113,9 @@ export type TabRecord = {
107
113
  * the active tab across a full-width rule; `segmented` renders a compact group that reads as one
108
114
  * control, for a toolbar or card header.
109
115
  * @property {boolean} [keepAlive=true] Keep inactive panel elements mounted.
116
+ * @property {string} [label] Accessible name of the tab list — what the tabs switch between
117
+ * ("Record sections"). A tab list needs one whenever the page has more than one, and screen
118
+ * readers announce it on entry.
110
119
  * @property {(event: CustomEvent<{name: string, previous: string|null}>) => void} [onchange] Change callback.
111
120
  * @property {(event: CustomEvent<{name: string}>) => void} [onclose] Close callback, fired when the
112
121
  * user dismisses a closable tab.
@@ -3,6 +3,7 @@ export type TableRow = Record<string, any>;
3
3
  export type TableSortDirection = 'asc' | 'desc';
4
4
  export type TableSelectionMode = false | 'single' | 'multi';
5
5
  export type TableEditMode = false | 'cell' | 'row';
6
+ export type TableVariant = 'default' | 'plain';
6
7
  export type TableEditorType = 'text' | 'number' | 'select' | 'date' | 'checkbox' | 'textarea' | 'custom';
7
8
  export type TableColumnType = 'text' | 'number' | 'currency' | 'percent' | 'unit';
8
9
  export type TableEditorOption = {
@@ -76,9 +77,16 @@ export type TableColumn = {
76
77
  */
77
78
  id: string;
78
79
  /**
79
- * Visible header label.
80
+ * Visible header label. An empty label leaves the header blank — an
81
+ * icon or actions column — and the header is then named by `ariaLabel`, or by the id.
80
82
  */
81
83
  label: string;
84
+ /**
85
+ * Accessible name of the column header, and the name the column
86
+ * chooser and the cell editors use. Needed when `label` is empty or terse (`'#'`); include the
87
+ * visible label's words in it when there is one.
88
+ */
89
+ ariaLabel?: string;
82
90
  /**
83
91
  * Whether the header changes the active sort.
84
92
  */
@@ -249,6 +257,12 @@ export type TableOptions = {
249
257
  * Whether alternate rows use the zebra background.
250
258
  */
251
259
  zebra?: boolean;
260
+ /**
261
+ * Frame treatment. `'default'` draws the table's own
262
+ * bordered box; `'plain'` is for a table inside a card or panel that already draws one — no outer
263
+ * frame, no header band, no zebra, hairline row dividers. Reflected as `data-variant` on the root.
264
+ */
265
+ variant?: TableVariant;
252
266
  /**
253
267
  * Inline editing mode. `'cell'` edits one cell, `'row'`
254
268
  * opens every editable cell of the row together and commits them as a unit. Editing is completely
@@ -281,6 +295,24 @@ export type TableOptions = {
281
295
  * expandable treegrid. Row data and mutation APIs remain flat.
282
296
  */
283
297
  hierarchy?: false | TableHierarchyOptions;
298
+ /**
299
+ * Makes the table an APG grid — row focus, Enter firing
300
+ * `rowclick` — even without selection, editing, or hierarchy, which already imply it. Attaching a
301
+ * `rowclick` or `rowdblclick` listener through `on()` or an `on…` option sets it too; pass it when
302
+ * the host listens for the bubbling `zx-rowclick` DOM event instead.
303
+ */
304
+ interactive?: boolean;
305
+ /**
306
+ * Accessible name of the table. A grid must have one; null
307
+ * resolves the `table.label` message (English "Table") for a grid and leaves a plain table unnamed,
308
+ * so name it after what it lists.
309
+ */
310
+ label?: string | null;
311
+ /**
312
+ * Id of an element that names the grid — the heading
313
+ * above it, say. Wins over `label`.
314
+ */
315
+ labelledBy?: string | null;
284
316
  onrowclick?: (event: CustomEvent<TableRowClickDetail>) => void;
285
317
  onrowdblclick?: (event: CustomEvent<TableRowClickDetail>) => void;
286
318
  onsort?: (event: CustomEvent<TableSortDetail>) => void;
@@ -503,6 +535,20 @@ export type TableEditorEntry = {
503
535
  /**
504
536
  * Semantic, sortable data table with optional single or checkbox-based multi-selection and
505
537
  * opt-in inline cell or row editing.
538
+ *
539
+ * An interactive table — one that is `selectable`, has `editMode` or `hierarchy`, sets
540
+ * `interactive: true`, or has a `rowclick`/`rowdblclick` listener attached through `on()` or an
541
+ * `on…` option — follows the WAI-ARIA APG Grid pattern (`role="grid"`), or the Treegrid pattern
542
+ * (`role="treegrid"`) with `hierarchy`. Any other table keeps plain `<table>` semantics and no
543
+ * keyboard model of its own. In a grid the rows are one Tab stop with a roving `tabindex`. Rows
544
+ * take focus by default; a table with `editMode` moves focus between cells instead, which the root
545
+ * reflects as `data-focus="row"|"cell"`. ArrowUp/ArrowDown move between rows, ArrowLeft/ArrowRight
546
+ * between cells (cell focus) or expand, collapse, and walk the tree (treegrid), Home/End and
547
+ * Ctrl+Home/End jump to the ends, PageUp/PageDown move by a visible page (10 rows when the table
548
+ * does not scroll). Enter activates the row exactly as a click does (`rowclick`), Space toggles the
549
+ * row's selection when `selectable` (and activates otherwise), Shift+Arrow extends a `multi`
550
+ * selection, and Ctrl/Cmd+A selects every rendered row. The focused row survives `setData`, sorting,
551
+ * expansion, and `updateRow`. Column headers keep their sort buttons in the Tab order.
506
552
  * @fires Table#rowclick
507
553
  * @fires Table#rowdblclick
508
554
  * @fires Table#sort
@@ -529,10 +575,11 @@ export declare class Table extends Component<TableOptions> {
529
575
  _rowKinds: Record<string, TableRowKind>;
530
576
  _spanning: boolean;
531
577
  _sortWarned: boolean;
532
- _selected: Set<any>;
533
- _selectionAnchorId: any;
578
+ _selected: Set<any> | Set<unknown>;
579
+ _selectionAnchorId: unknown;
534
580
  _sort: any;
535
581
  _rowMeta: WeakMap<object, any>;
582
+ _rowNames: WeakMap<object, any>;
536
583
  _rowElements: Map<any, any>;
537
584
  _restored: boolean;
538
585
  _editMode: TableEditMode;
@@ -550,12 +597,11 @@ export declare class Table extends Component<TableOptions> {
550
597
  _growStep: number;
551
598
  _rendered: number;
552
599
  _more: HTMLElement;
553
- _rovingKey: {
554
- id: unknown;
555
- columnId: string;
556
- };
557
- _rovingCell: any;
558
- _rovingMatched: boolean;
600
+ _focusMode: string;
601
+ _interactive: boolean;
602
+ _current: any;
603
+ _rovingEl: any;
604
+ _extendBase: Set<any>;
559
605
  _hierarchy: TableHierarchyOptions & {
560
606
  column: string;
561
607
  };
@@ -572,6 +618,7 @@ export declare class Table extends Component<TableOptions> {
572
618
  _scroll: HTMLElement;
573
619
  _rowMoveMessage: HTMLElement;
574
620
  _columnControls: HTMLElement;
621
+ _clickListened: boolean;
575
622
  _columnList: HTMLElement;
576
623
  _selectAll: HTMLElement;
577
624
  _headers: Map<any, any>;
@@ -924,12 +971,26 @@ export declare class Table extends Component<TableOptions> {
924
971
  * @fires Table#stackedchange
925
972
  */
926
973
  _setStacked(stacked: boolean): void;
974
+ /**
975
+ * Registers a listener, and turns the table into a grid when the listener is for a row click:
976
+ * a host that reacts to the row needs the row reachable by keyboard.
977
+ * @param {string} type Event name.
978
+ * @param {EventListenerOrEventListenerObject|null} listener Listener.
979
+ * @param {boolean|AddEventListenerOptions} [options] Listener options.
980
+ * @returns {void}
981
+ */
982
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
983
+ /** @returns {'grid'|'treegrid'|null} Role of the `<table>`, or null for plain table semantics. */
984
+ _gridRole(): 'grid' | 'treegrid' | null;
985
+ /** Writes the grid role, name, and focus mode — or their absence — onto the table. @returns {void} */
986
+ _syncGridRole(): void;
927
987
  /**
928
988
  * States the table roles explicitly while stacked, and removes them again on the way out.
929
989
  *
930
990
  * Stacking works by changing `display` on the table elements, and a table whose display is not
931
991
  * `table` loses its implicit ARIA roles — leaving a screen reader with a pile of generic blocks
932
- * where a table used to be. The roles are only asserted while the layout has taken them away.
992
+ * where a table used to be. The roles are only asserted while the layout has taken them away;
993
+ * a grid keeps its explicit grid or treegrid role in either mode.
933
994
  * @param {boolean} stacked Whether the roles should be present.
934
995
  * @returns {void}
935
996
  */
@@ -1034,6 +1095,14 @@ export declare class Table extends Component<TableOptions> {
1034
1095
  _createRow(row: TableRow, index: number, tree: TableHierarchyEntry & {
1035
1096
  visibleIndex: number;
1036
1097
  }): HTMLTableRowElement;
1098
+ /**
1099
+ * Names a row's own controls after the row's content rather than its position: "Select Acme
1100
+ * GmbH", not "Select row 3", which tells a screen reader user nothing and changes on every sort.
1101
+ * The position is the fallback for a row without any text.
1102
+ * @param {HTMLTableRowElement} tr Rendered row.
1103
+ * @returns {void}
1104
+ */
1105
+ _labelRowControls(tr: HTMLTableRowElement): void;
1037
1106
  /**
1038
1107
  * Fills a cell with the column's rendered value, replacing anything already in it.
1039
1108
  * @param {HTMLTableCellElement} cell Target cell.
@@ -1046,6 +1115,20 @@ export declare class Table extends Component<TableOptions> {
1046
1115
  _renderCellContent(cell: HTMLTableCellElement, column: TableColumn, row: TableRow, index: number, tree?: TableHierarchyEntry): void;
1047
1116
  /** @param {MouseEvent} event @returns {void} */
1048
1117
  _handleBodyClick(event: MouseEvent): void;
1118
+ /**
1119
+ * Activates a row: the click path, shared by Enter on a focused row or cell.
1120
+ * @param {{row: TableRow, id: unknown, index: number, visibleIndex?: number}} meta Row metadata.
1121
+ * @param {Event} event Originating click or keydown.
1122
+ * @returns {void}
1123
+ * @fires Table#rowclick
1124
+ * @fires Table#selectionchange
1125
+ */
1126
+ _activateRow(meta: {
1127
+ row: TableRow;
1128
+ id: unknown;
1129
+ index: number;
1130
+ visibleIndex?: number;
1131
+ }, event: Event): void;
1049
1132
  /** @param {MouseEvent} event @returns {void} @fires Table#editstart */
1050
1133
  _handleBodyDoubleClick(event: MouseEvent): void;
1051
1134
  /**
@@ -1116,20 +1199,127 @@ export declare class Table extends Component<TableOptions> {
1116
1199
  columnId: string;
1117
1200
  index: number;
1118
1201
  } | null;
1119
- /** @param {Event} event @returns {void} */
1120
- _handleEditFocusIn(event: Event): void;
1121
1202
  /** @param {Event} event @returns {void} @fires Table#editcommit */
1122
1203
  _handleDocumentPointerDown(event: Event): void;
1204
+ /** @returns {HTMLTableRowElement[]} Rendered body rows in display order, section rows included. */
1205
+ _navRows(): HTMLTableRowElement[];
1123
1206
  /**
1124
- * Keeps exactly one editable cell in the tab order, preferring the last focused one.
1125
- * @param {HTMLTableCellElement} cell Newly rendered editable cell.
1207
+ * Cells that take focus while the table moves focus by cell: the data cells, or the single cell of
1208
+ * a section row. The selection and reorder cells are not among them; their controls have keys of
1209
+ * their own on the row.
1210
+ * @param {HTMLTableRowElement} tr Body row.
1211
+ * @returns {HTMLTableCellElement[]}
1212
+ */
1213
+ _navCells(tr: HTMLTableRowElement): HTMLTableCellElement[];
1214
+ /**
1215
+ * The cell of a row that matches the current column: by id, else by position, so a section row
1216
+ * (one cell) or a hidden column still lands somewhere sensible.
1217
+ * @param {HTMLTableRowElement} tr Body row.
1218
+ * @returns {HTMLElement}
1219
+ */
1220
+ _cellFor(tr: HTMLTableRowElement): HTMLElement;
1221
+ /** @param {HTMLTableRowElement} tr @returns {HTMLElement} Element of a row that holds the Tab stop. */
1222
+ _rovingTarget(tr: HTMLTableRowElement): HTMLElement;
1223
+ /** @param {HTMLElement} element New roving Tab stop. @returns {void} */
1224
+ _setRoving(element: HTMLElement): void;
1225
+ /**
1226
+ * Records which part of a row holds focus before the body is rebuilt.
1227
+ * @returns {{part: 'row'|'cell'|'checkbox'|'toggle'|'handle'}|null} Null when focus is elsewhere.
1228
+ */
1229
+ _captureFocus(): {
1230
+ part: 'row' | 'cell' | 'checkbox' | 'toggle' | 'handle';
1231
+ } | null;
1232
+ /**
1233
+ * Puts the Tab stop back on the current row after a render — the same row by id; else, when a
1234
+ * collapsed ancestor hid it, that ancestor; else the row now at its old position — and gives it
1235
+ * focus again only when the body had focus before. The focus is restored without scrolling: a
1236
+ * table refreshed by polling must not pull the page back to itself.
1237
+ * @param {{part: string}|null} focus What `_captureFocus()` found before the render.
1238
+ * @returns {void}
1239
+ */
1240
+ _syncRoving(focus: {
1241
+ part: string;
1242
+ } | null): void;
1243
+ /**
1244
+ * The nearest ancestor of a row that is rendered — where focus goes when collapsing a branch
1245
+ * hid the focused row.
1126
1246
  * @param {unknown} id Row id.
1127
- * @param {string} columnId Column id.
1247
+ * @returns {HTMLTableRowElement|undefined}
1248
+ */
1249
+ _renderedAncestor(id: unknown): HTMLTableRowElement | undefined;
1250
+ /**
1251
+ * While the table has no rows to focus, its frame takes focus instead of letting it fall to the
1252
+ * document — and gives the Tab order its old shape back once rows return.
1253
+ * @param {boolean} hold Whether focus was in the body and there is now no row for it.
1254
+ * @returns {void}
1255
+ */
1256
+ _syncEmptyFocus(hold: boolean): void;
1257
+ /** @param {Event} event @returns {void} */
1258
+ _handleFocusIn(event: Event): void;
1259
+ /**
1260
+ * The APG grid and treegrid keyboard model on the focused row or cell. The row's own checkbox and
1261
+ * disclosure answer the navigation keys too, so a pointer user who clicked one can carry on by
1262
+ * keyboard; anything else inside a cell — a link, a button, an open editor — keeps its keys.
1263
+ * @param {KeyboardEvent} event Keydown event.
1128
1264
  * @returns {void}
1265
+ * @fires Table#rowclick
1266
+ * @fires Table#selectionchange
1267
+ * @fires Table#rowtoggle
1129
1268
  */
1130
- _offerRovingCell(cell: HTMLTableCellElement, id: unknown, columnId: string): void;
1131
- /** @param {HTMLTableCellElement} cell @param {unknown} id @param {string} columnId @returns {void} */
1132
- _setRovingCell(cell: HTMLTableCellElement, id: unknown, columnId: string): void;
1269
+ _handleGridKeydown(event: KeyboardEvent): void;
1270
+ /**
1271
+ * Carries out one treegrid arrow-key action on a row.
1272
+ * @param {{action: string, column?: number}} action What `treegridArrowAction()` decided.
1273
+ * @param {HTMLTableRowElement} tr Focused row.
1274
+ * @param {{id: unknown}} meta Row metadata.
1275
+ * @param {unknown} parentId Parent row id, or null at the root.
1276
+ * @returns {void}
1277
+ * @fires Table#rowtoggle
1278
+ */
1279
+ _applyTreeAction(action: {
1280
+ action: string;
1281
+ column?: number;
1282
+ }, tr: HTMLTableRowElement, meta: {
1283
+ id: unknown;
1284
+ }, parentId: unknown): void;
1285
+ /**
1286
+ * How many rows PageUp and PageDown move: what fits in the scroll region when the table scrolls
1287
+ * on its own, else ten.
1288
+ * @param {HTMLTableRowElement[]} rows Rendered rows.
1289
+ * @returns {number}
1290
+ */
1291
+ _pageSize(rows: HTMLTableRowElement[]): number;
1292
+ /**
1293
+ * Space on a row: toggles it in `multi`, and in `single` selects it or clears the selection.
1294
+ * @param {{row: TableRow, id: unknown, index: number, visibleIndex?: number}} meta Row metadata.
1295
+ * @returns {void}
1296
+ * @fires Table#selectionchange
1297
+ */
1298
+ _toggleRowSelection(meta: {
1299
+ row: TableRow;
1300
+ id: unknown;
1301
+ index: number;
1302
+ visibleIndex?: number;
1303
+ }): void;
1304
+ /**
1305
+ * Ctrl/Cmd+A: selects every rendered row that can hold a selection, as the header checkbox does.
1306
+ * @returns {void}
1307
+ * @fires Table#selectionchange
1308
+ */
1309
+ _selectAllRendered(): void;
1310
+ /**
1311
+ * Shift+Arrow: selects the rows between the anchor and the row focus moved to, on top of what was
1312
+ * selected before the extension began — moving back shrinks the range again.
1313
+ * @param {{id: unknown}} from Row focus moved from.
1314
+ * @param {{id: unknown}|undefined} to Row focus moved to.
1315
+ * @returns {void}
1316
+ * @fires Table#selectionchange
1317
+ */
1318
+ _extendSelection(from: {
1319
+ id: unknown;
1320
+ }, to: {
1321
+ id: unknown;
1322
+ } | undefined): void;
1133
1323
  /**
1134
1324
  * Resolves a message key with an English fallback for hosts without a translator.
1135
1325
  * @param {string} key Message key.
@@ -1212,6 +1402,78 @@ export declare class Table extends Component<TableOptions> {
1212
1402
  * @event Table#editinvalid
1213
1403
  * @type {CustomEvent<TableEditInvalidDetail>}
1214
1404
  */
1405
+ /**
1406
+ * Where a navigation key moves focus in the table body: the arithmetic of the APG grid keyboard
1407
+ * model, kept apart from the DOM. Positions are zero-based and every move is clamped — focus never
1408
+ * wraps, as the APG asks of a grid.
1409
+ *
1410
+ * With `cells` false (row focus) only the vertical keys move: ArrowUp/ArrowDown by one row,
1411
+ * PageUp/PageDown by `page`, Home/End (with or without Ctrl) to the first or last row. With `cells`
1412
+ * true ArrowLeft/ArrowRight move one cell, Home/End go to the first or last cell of the row, and
1413
+ * Ctrl+Home/Ctrl+End to the first cell of the first row or the last cell of the last row.
1414
+ * @param {{row: number, column?: number}} position Current position.
1415
+ * @param {string} key `KeyboardEvent.key`.
1416
+ * @param {{rows: number, columns?: number, page?: number, ctrl?: boolean, cells?: boolean}} grid
1417
+ * Row and column counts, the page size, whether Ctrl/Cmd is held, and whether focus is on cells.
1418
+ * @returns {{row: number, column: number}|null} New position, or null when the key is not a move.
1419
+ */
1420
+ export declare function tableGridTarget(position: {
1421
+ row: number;
1422
+ column?: number;
1423
+ }, key: string, grid: {
1424
+ rows: number;
1425
+ columns?: number;
1426
+ page?: number;
1427
+ ctrl?: boolean;
1428
+ cells?: boolean;
1429
+ }): {
1430
+ row: number;
1431
+ column: number;
1432
+ } | null;
1433
+ /**
1434
+ * How many rows a PageUp or PageDown moves: the rows that fit in the visible height, less one so
1435
+ * the row focus leaves stays in view as context. Falls back when either height is unknown.
1436
+ * @param {number} viewport Visible height of the scroll region, below any sticky header.
1437
+ * @param {number} rowHeight Height of one row.
1438
+ * @param {number} [fallback=10] Rows to move when the heights are unusable.
1439
+ * @returns {number} At least 1.
1440
+ */
1441
+ export declare function tablePageSize(viewport: number, rowHeight: number, fallback?: number): number;
1442
+ /**
1443
+ * ArrowLeft and ArrowRight in a treegrid, after the APG Treegrid pattern.
1444
+ *
1445
+ * Row focus (`focus: 'row'`): ArrowRight expands a collapsed branch; on an expanded branch it moves
1446
+ * into the first child — or, when cells take focus too (`cells`), onto the row's first cell, which
1447
+ * is also where it goes from a leaf. ArrowLeft collapses an expanded branch and otherwise moves to
1448
+ * the parent row. Cell focus: ArrowRight moves one cell right; ArrowLeft one cell left, and from the
1449
+ * first cell onto the row itself, where the branch can be expanded or collapsed.
1450
+ * @param {'ArrowLeft'|'ArrowRight'|string} key `KeyboardEvent.key`.
1451
+ * @param {{focus: 'row'|'cell', cells?: boolean, column?: number, columns?: number,
1452
+ * hasChildren?: boolean, expanded?: boolean, hasParent?: boolean}} state Focused row and cell.
1453
+ * @returns {{action: 'expand'|'collapse'|'child'|'parent'|'row'|'cell', column?: number}|null}
1454
+ * What to do, or null when focus stays where it is.
1455
+ */
1456
+ export declare function treegridArrowAction(key: 'ArrowLeft' | 'ArrowRight' | string, state: {
1457
+ focus: 'row' | 'cell';
1458
+ cells?: boolean;
1459
+ column?: number;
1460
+ columns?: number;
1461
+ hasChildren?: boolean;
1462
+ expanded?: boolean;
1463
+ hasParent?: boolean;
1464
+ }): {
1465
+ action: 'expand' | 'collapse' | 'child' | 'parent' | 'row' | 'cell';
1466
+ column?: number;
1467
+ } | null;
1468
+ /**
1469
+ * The name a row goes by in the labels of its own controls ("Select …", "Expand …"): the text of
1470
+ * its first cell that has any, whitespace collapsed and long text cut short. Null when no cell has
1471
+ * text, which is when the caller falls back to the row's position.
1472
+ * @param {Array<string|null|undefined>} texts Text of the row's cells, in display order.
1473
+ * @param {number} [max=80] Longest name returned before it is cut with an ellipsis.
1474
+ * @returns {string|null}
1475
+ */
1476
+ export declare function tableRowLabel(texts: Array<string | null | undefined>, max?: number): string | null;
1215
1477
  /**
1216
1478
  * Resolves a row's kind through the `rowKind` accessor and coerces it to the string `rowKinds` is
1217
1479
  * keyed by.
@@ -1392,12 +1654,43 @@ export declare function firstValidationError(values: Record<string, unknown>, co
1392
1654
  columnId: string;
1393
1655
  message: string;
1394
1656
  } | null;
1657
+ /**
1658
+ * Resolves the `variant` option to one the stylesheet knows; anything else is the default frame.
1659
+ * @param {unknown} value Requested variant.
1660
+ * @returns {TableVariant}
1661
+ */
1662
+ export declare function normalizeTableVariant(value: unknown): TableVariant;
1395
1663
  /**
1396
1664
  * Validates and shallow-clones table columns so stable-id APIs never mutate caller descriptors.
1397
1665
  * @param {unknown} columns Column descriptors.
1398
1666
  * @returns {TableColumn[]} Normalized descriptors.
1399
1667
  */
1400
1668
  export declare function normalizeTableColumns(columns: unknown): TableColumn[];
1669
+ /**
1670
+ * The name a column goes by wherever it is named rather than shown: its `ariaLabel`, else its
1671
+ * visible label, else its id. The column chooser lists columns by it and cell editors are labelled
1672
+ * with it, so a column with a blank header still has a name in both.
1673
+ * @param {Partial<TableColumn>|null|undefined} column Column descriptor.
1674
+ * @returns {string} Non-empty name, unless the column has no id either.
1675
+ */
1676
+ export declare function tableColumnName(column: Partial<TableColumn> | null | undefined): string;
1677
+ /**
1678
+ * The accessible name a column header needs on top of its content, or null when its visible label
1679
+ * already names it. That is the `ariaLabel` when one is given, and the column id when the label is
1680
+ * blank — an icon or actions column — so no header is announced as an empty column.
1681
+ * @param {Partial<TableColumn>|null|undefined} column Column descriptor.
1682
+ * @returns {string|null} Name to set as `aria-label`, or null.
1683
+ */
1684
+ export declare function tableHeaderName(column: Partial<TableColumn> | null | undefined): string | null;
1685
+ /**
1686
+ * Whether opening an editor of this type selects its content, so the first keystroke replaces the
1687
+ * value instead of being appended to it. True for the single-line text, number, and date editors;
1688
+ * a textarea keeps its caret, and a select, checkbox, or custom editor keeps its own focus
1689
+ * behaviour.
1690
+ * @param {TableEditorType|string} type Resolved editor type.
1691
+ * @returns {boolean}
1692
+ */
1693
+ export declare function editorSelectsOnEntry(type: TableEditorType | string): boolean;
1401
1694
  /**
1402
1695
  * Reconciles saved or partial column IDs with every current column.
1403
1696
  * @param {TableColumn[]} columns Current columns.
@@ -24,9 +24,17 @@ export type TagPickerOptions = {
24
24
  */
25
25
  iconKey?: TagValueReader;
26
26
  /**
27
- * Optional item colour property or reader.
27
+ * Optional item colour property or reader: a CSS colour
28
+ * or a token reference such as `var(--zx-color-tone-blue-fg)`.
28
29
  */
29
30
  colorKey?: TagValueReader;
31
+ /**
32
+ * Optional item tone property or reader: a categorical
33
+ * tone name from the Badge palette (`blue`, `teal`, `green`, `amber`, `orange`, `red`, `pink`,
34
+ * `violet`, `slate`). A toned tag takes the palette's fill and ink, as a Badge with that `tone`
35
+ * does; a tone wins over a colour, and unknown names are ignored.
36
+ */
37
+ toneKey?: TagValueReader;
30
38
  /**
31
39
  * Fields searched by local filtering.
32
40
  */
@@ -68,7 +76,8 @@ export type TagPickerOptions = {
68
76
  */
69
77
  disabled?: boolean;
70
78
  /**
71
- * Whether tags may be added or removed.
79
+ * When true the picker shows only its tags — no input, chevron, or
80
+ * remove buttons.
72
81
  */
73
82
  readonly?: boolean;
74
83
  /**
@@ -142,7 +151,12 @@ export type TagPickerOptions = {
142
151
  * @property {TagValueReader} [valueKey='ID'] Item ID property or reader.
143
152
  * @property {TagLabelReader} [labelKey='name'] Item label property or reader.
144
153
  * @property {TagValueReader} [iconKey='icon'] Optional item icon property or reader.
145
- * @property {TagValueReader} [colorKey='color'] Optional item colour property or reader.
154
+ * @property {TagValueReader} [colorKey='color'] Optional item colour property or reader: a CSS colour
155
+ * or a token reference such as `var(--zx-color-tone-blue-fg)`.
156
+ * @property {TagValueReader} [toneKey='tone'] Optional item tone property or reader: a categorical
157
+ * tone name from the Badge palette (`blue`, `teal`, `green`, `amber`, `orange`, `red`, `pink`,
158
+ * `violet`, `slate`). A toned tag takes the palette's fill and ink, as a Badge with that `tone`
159
+ * does; a tone wins over a colour, and unknown names are ignored.
146
160
  * @property {Array<TagValueReader>|null} [searchKeys=null] Fields searched by local filtering.
147
161
  * @property {'local'|((query: string) => Promise<TagItem[]>|TagItem[])} [filter='local'] Filtering mode.
148
162
  * @property {number} [minQuery=0] Minimum async query length.
@@ -153,7 +167,8 @@ export type TagPickerOptions = {
153
167
  * @property {string} [placeholder=''] Empty-state input text.
154
168
  * @property {number} [listHeight=260] Maximum list height in pixels.
155
169
  * @property {boolean} [disabled=false] Whether interaction is disabled.
156
- * @property {boolean} [readonly=false] Whether tags may be added or removed.
170
+ * @property {boolean} [readonly=false] When true the picker shows only its tags — no input, chevron, or
171
+ * remove buttons.
157
172
  * @property {((item: TagItem) => Node|string)|null} [renderItem=null] Option renderer.
158
173
  * @property {((item: TagItem) => Node|string)|null} [renderTag=null] Tag-label renderer.
159
174
  * @property {Record<string, string>|Record<string, Record<string, string>>} [msg] Localized messages.
@@ -373,6 +388,8 @@ export declare class TagPicker extends Component<TagPickerOptions> {
373
388
  _iconOf(item: unknown): Node | null;
374
389
  /** @param {unknown} item @returns {string|null} */
375
390
  _colorOf(item: unknown): string | null;
391
+ /** @param {unknown} item @returns {string|null} */
392
+ _toneOf(item: unknown): string | null;
376
393
  /** @param {unknown} item @param {unknown} reader @returns {unknown} */
377
394
  _readItem(item: unknown, reader: unknown): unknown;
378
395
  /** @returns {void} */
@@ -381,3 +381,16 @@ export declare class TreeView extends Component<TreeOptions> {
381
381
  /** Restores an enhanced target to the markup it had before the takeover. @returns {void} */
382
382
  destroy(): void;
383
383
  }
384
+ /**
385
+ * Whether a key press is one the type-ahead consumes: a single printable character, not a space
386
+ * (Space selects), with no Ctrl, Meta, or Alt (those are shortcuts). Shift is allowed, since it
387
+ * only changes the letter's case.
388
+ * @param {{key?: string, ctrlKey?: boolean, metaKey?: boolean, altKey?: boolean}} event Key event.
389
+ * @returns {boolean}
390
+ */
391
+ export declare function isTreeTypeaheadKey(event: {
392
+ key?: string;
393
+ ctrlKey?: boolean;
394
+ metaKey?: boolean;
395
+ altKey?: boolean;
396
+ }): boolean;