viewkitjs 0.38.0 → 0.40.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 (309) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/MIGRATION.md +32 -0
  3. package/fields/dist/derived.d.ts +7 -0
  4. package/fields/dist/derived.js +4 -0
  5. package/fields/dist/index.d.ts +1 -1
  6. package/fields/dist/index.js +1 -1
  7. package/fields/dist/messages.d.ts +5 -1
  8. package/fields/dist/messages.js +3 -0
  9. package/fields/dist/query/evaluate.d.ts +7 -1
  10. package/fields/dist/query/evaluate.js +8 -5
  11. package/fields/dist/query/figure-kinds.d.ts +2 -2
  12. package/fields/dist/query/figure-kinds.js +3 -0
  13. package/fields/dist/query/figures.d.ts +5 -3
  14. package/fields/dist/query/figures.js +13 -0
  15. package/fields/dist/query/filter.d.ts +7 -0
  16. package/fields/dist/query/filter.js +7 -1
  17. package/fields/dist/query/kit.d.ts +3 -2
  18. package/fields/dist/query/kit.js +1 -1
  19. package/fields/dist/query/layer.d.ts +6 -0
  20. package/fields/dist/query/layer.js +3 -0
  21. package/fields/dist/query/number.d.ts +3 -2
  22. package/fields/dist/query/number.js +5 -3
  23. package/fields/dist/query/read-rule.d.ts +1 -1
  24. package/fields/dist/query/read-rule.js +3 -0
  25. package/fields/docs/guides/queries.md +28 -24
  26. package/fields/docs/reference/fields.md +1 -0
  27. package/fields/docs/reference/query.md +9 -7
  28. package/package.json +2 -4
  29. package/postgres/dist/check.js +3 -1
  30. package/postgres/dist/definitions/storage.d.ts +3 -1
  31. package/postgres/dist/definitions/storage.js +3 -1
  32. package/postgres/dist/definitions/stored.js +13 -2
  33. package/postgres/dist/map.d.ts +5 -1
  34. package/postgres/dist/map.js +4 -0
  35. package/postgres/dist/records.js +6 -1
  36. package/postgres/docs/guides/definitions.md +1 -1
  37. package/postgres/docs/guides/field-map.md +3 -3
  38. package/postgres/docs/reference/postgres.md +1 -1
  39. package/views/dist/atoms/HeaderChrome.d.ts +7 -0
  40. package/views/dist/atoms/HeaderChrome.js +15 -0
  41. package/views/dist/atoms/ToolbarButton.d.ts +1 -1
  42. package/views/dist/atoms/ToolbarButton.js +2 -2
  43. package/views/dist/atoms/defaults.js +4 -0
  44. package/views/dist/atoms/types.d.ts +39 -2
  45. package/views/dist/contract.d.ts +38 -9
  46. package/views/dist/contract.js +64 -6
  47. package/views/dist/controls/avatar.css +1 -1
  48. package/views/dist/controls/customize/map-customize-body.js +1 -1
  49. package/views/dist/controls/field/field.d.ts +2 -14
  50. package/views/dist/controls/field/field.js +4 -9
  51. package/views/dist/controls/field/looks.d.ts +1 -1
  52. package/views/dist/controls/field/looks.js +7 -3
  53. package/views/dist/controls/field/tokens.d.ts +4 -0
  54. package/views/dist/controls/field/tokens.js +1 -0
  55. package/views/dist/controls/field.css +33 -0
  56. package/views/dist/controls/filter-editor/block.d.ts +3 -1
  57. package/views/dist/controls/filter-editor/block.js +4 -3
  58. package/views/dist/controls/filter-editor/filter-editor.d.ts +15 -2
  59. package/views/dist/controls/filter-editor/filter-editor.js +49 -16
  60. package/views/dist/controls/filter-editor/how.d.ts +11 -1
  61. package/views/dist/controls/filter-editor/map-filter-body.d.ts +4 -2
  62. package/views/dist/controls/filter-editor/map-filter-body.js +21 -11
  63. package/views/dist/controls/filter-editor/map-rules.d.ts +6 -4
  64. package/views/dist/controls/filter-editor/map-rules.js +7 -4
  65. package/views/dist/controls/filter-editor/parts.d.ts +14 -1
  66. package/views/dist/controls/filter-editor/parts.js +14 -0
  67. package/views/dist/controls/filter-editor.css +4 -1
  68. package/views/dist/controls/index.d.ts +0 -3
  69. package/views/dist/controls/index.js +0 -3
  70. package/views/dist/controls/input.css +1 -1
  71. package/views/dist/controls/internal/menu-items.d.ts +2 -0
  72. package/views/dist/controls/internal/menu-items.js +1 -1
  73. package/views/dist/controls/internal/part-slot.d.ts +1 -1
  74. package/views/dist/controls/internal/part-slot.js +1 -1
  75. package/views/dist/controls/internal/row-actions.d.ts +33 -0
  76. package/views/dist/controls/internal/row-actions.js +28 -0
  77. package/views/dist/controls/menu/map-menu.js +1 -1
  78. package/views/dist/controls/menu-list.css +1 -1
  79. package/views/dist/controls/picker/looks.d.ts +1 -1
  80. package/views/dist/controls/picker.css +2 -2
  81. package/views/dist/controls/popover/map-popover.d.ts +1 -1
  82. package/views/dist/controls/popover/map-popover.js +2 -2
  83. package/views/dist/controls/press.css +0 -1
  84. package/views/dist/controls/radio/radio.d.ts +1 -1
  85. package/views/dist/controls/radio/radio.js +1 -16
  86. package/views/dist/controls/sheet/bottom-sheet.d.ts +2 -2
  87. package/views/dist/controls/sheet/bottom-sheet.js +31 -24
  88. package/views/dist/controls/sheet/map-sheet.js +9 -6
  89. package/views/dist/controls/sort-editor/map-sort-body.js +1 -0
  90. package/views/dist/controls/sort-editor/sort-editor.d.ts +5 -1
  91. package/views/dist/controls/sort-editor/sort-editor.js +41 -13
  92. package/views/dist/controls/text-editor.css +22 -0
  93. package/views/dist/controls/tokens.js +0 -6
  94. package/views/dist/controls/toolbar/toolbar.js +2 -2
  95. package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +1 -1
  96. package/views/dist/controls/toolbar-button/atom-toolbar-button.js +2 -2
  97. package/views/dist/editors/EditorPanel.js +1 -1
  98. package/views/dist/field-row/FieldRow.js +38 -16
  99. package/views/dist/field-row/editors/RowChipsEditor.js +3 -1
  100. package/views/dist/field-row/editors/RowDateEditor.js +3 -1
  101. package/views/dist/field-row/editors/RowNameEditor.js +3 -1
  102. package/views/dist/field-row/editors/RowPlaceEditor.js +4 -2
  103. package/views/dist/field-row/editors/RowRangeEditor.js +3 -1
  104. package/views/dist/field-row/editors/RowRelationEditor.js +5 -2
  105. package/views/dist/field-row/editors/RowSelectEditor.js +3 -1
  106. package/views/dist/field-row/editors/RowTextEditor.d.ts +7 -1
  107. package/views/dist/field-row/editors/RowTextEditor.js +28 -4
  108. package/views/dist/field-row/editors/RowValueListEditor.js +4 -4
  109. package/views/dist/field-row/editors/row-place.d.ts +33 -0
  110. package/views/dist/field-row/editors/row-place.js +141 -0
  111. package/views/dist/field-row/field-row-button.d.ts +9 -6
  112. package/views/dist/field-row/field-row-button.js +3 -3
  113. package/views/dist/field-row/row-target.d.ts +4 -1
  114. package/views/dist/field-row/row-target.js +1 -1
  115. package/views/dist/filters/duration-bound.d.ts +7 -0
  116. package/views/dist/filters/duration-bound.js +9 -0
  117. package/views/dist/filters/filter-model.d.ts +4 -0
  118. package/views/dist/filters/number-refused.d.ts +8 -0
  119. package/views/dist/filters/number-refused.js +4 -0
  120. package/views/dist/grid/chrome/GridAggregateMenu.d.ts +12 -11
  121. package/views/dist/grid/chrome/GridAggregateMenu.js +4 -3
  122. package/views/dist/grid/chrome/GridFooter.d.ts +12 -4
  123. package/views/dist/grid/chrome/GridFooter.js +11 -9
  124. package/views/dist/grid/chrome/GridHeader.js +4 -3
  125. package/views/dist/grid/chrome/GridResizeHandle.d.ts +7 -3
  126. package/views/dist/grid/chrome/GridResizeHandle.js +2 -3
  127. package/views/dist/grid/chrome/GridTable.js +1 -1
  128. package/views/dist/grid/chrome/GridTableSurface.js +1 -1
  129. package/views/dist/grid/chrome/grid-body-place.d.ts +2 -4
  130. package/views/dist/grid/chrome/grid-body-place.js +4 -5
  131. package/views/dist/grid/chrome/grid-figure-value.js +10 -4
  132. package/views/dist/grid/chrome/grid-table-props.d.ts +15 -4
  133. package/views/dist/grid/chrome/useGridTableInteractionModel.js +12 -2
  134. package/views/dist/grid/core/clipboard-model.js +42 -8
  135. package/views/dist/grid/core/commit-model.d.ts +3 -0
  136. package/views/dist/grid/core/editing-controller.d.ts +29 -1
  137. package/views/dist/grid/core/editing-controller.js +142 -12
  138. package/views/dist/grid/core/pending-reconciliation.d.ts +14 -0
  139. package/views/dist/grid/core/pending-reconciliation.js +20 -8
  140. package/views/dist/grid/core/save-path.d.ts +4 -2
  141. package/views/dist/grid/core/save-path.js +1 -1
  142. package/views/dist/grid/core/spreadsheet-operations.js +43 -5
  143. package/views/dist/grid/core/useGridEditing.d.ts +5 -1
  144. package/views/dist/grid/core/useGridEditing.js +4 -4
  145. package/views/dist/grid/core/written-alongside.d.ts +16 -0
  146. package/views/dist/grid/core/written-alongside.js +30 -0
  147. package/views/dist/grid/grid.css +8 -4
  148. package/views/dist/grid/index.d.ts +1 -1
  149. package/views/dist/grid/looks.d.ts +2 -2
  150. package/views/dist/internal/before-paint.d.ts +5 -0
  151. package/views/dist/internal/before-paint.js +17 -0
  152. package/views/dist/internal/field-rows.d.ts +0 -8
  153. package/views/dist/internal/field-rows.js +1 -3
  154. package/views/dist/internal/over-cell.d.ts +8 -0
  155. package/views/dist/internal/over-cell.js +5 -0
  156. package/views/dist/list/bar-keys.d.ts +8 -0
  157. package/views/dist/list/bar-keys.js +3 -0
  158. package/views/dist/list/bar-parts.d.ts +27 -0
  159. package/views/dist/list/bar-parts.js +38 -0
  160. package/views/dist/list/buttons/clear-save.d.ts +7 -0
  161. package/views/dist/list/buttons/clear-save.js +19 -0
  162. package/views/dist/list/buttons/customize.d.ts +28 -0
  163. package/views/dist/list/buttons/customize.js +31 -0
  164. package/views/dist/list/buttons/filter.d.ts +32 -0
  165. package/views/dist/list/buttons/filter.js +60 -0
  166. package/views/dist/list/buttons/new.d.ts +18 -0
  167. package/views/dist/list/buttons/new.js +21 -0
  168. package/views/dist/list/buttons/quick.d.ts +15 -0
  169. package/views/dist/list/buttons/quick.js +24 -0
  170. package/views/dist/list/buttons/search.d.ts +18 -0
  171. package/views/dist/list/buttons/search.js +17 -0
  172. package/views/dist/list/buttons/shared.d.ts +97 -0
  173. package/views/dist/list/buttons/shared.js +137 -0
  174. package/views/dist/list/buttons/sort-filter.d.ts +6 -0
  175. package/views/dist/list/buttons/sort-filter.js +16 -0
  176. package/views/dist/list/buttons/sort.d.ts +17 -0
  177. package/views/dist/list/buttons/sort.js +34 -0
  178. package/views/dist/list/buttons/views.d.ts +21 -0
  179. package/views/dist/list/buttons/views.js +38 -0
  180. package/views/dist/list/editor-menus.d.ts +13 -0
  181. package/views/dist/list/editor-menus.js +13 -0
  182. package/views/dist/list/edits.d.ts +3 -1
  183. package/views/dist/list/index.d.ts +41 -0
  184. package/views/dist/list/index.js +19 -0
  185. package/views/dist/list/layer.d.ts +13 -3
  186. package/views/dist/list/layer.js +13 -3
  187. package/views/dist/list/line.d.ts +58 -0
  188. package/views/dist/list/line.js +229 -0
  189. package/views/dist/list/list.d.ts +7 -1
  190. package/views/dist/list/list.js +2 -2
  191. package/views/dist/list/pane-box.d.ts +6 -0
  192. package/views/dist/list/pane-box.js +15 -0
  193. package/views/dist/list/panels/customize.d.ts +8 -0
  194. package/views/dist/list/panels/customize.js +23 -0
  195. package/views/dist/list/panels/filter-bar.d.ts +12 -0
  196. package/views/dist/list/panels/filter-bar.js +73 -0
  197. package/views/dist/list/panels/filter.d.ts +8 -0
  198. package/views/dist/list/panels/filter.js +23 -0
  199. package/views/dist/list/panels/quick.d.ts +7 -0
  200. package/views/dist/list/panels/quick.js +16 -0
  201. package/views/dist/list/panels/shared.d.ts +26 -0
  202. package/views/dist/list/panels/shared.js +36 -0
  203. package/views/dist/list/panels/sort.d.ts +8 -0
  204. package/views/dist/list/panels/sort.js +19 -0
  205. package/views/dist/list/panels/views.d.ts +13 -0
  206. package/views/dist/list/panels/views.js +27 -0
  207. package/views/dist/list/ready.d.ts +35 -0
  208. package/views/dist/list/ready.js +7 -0
  209. package/views/dist/list/root-base.d.ts +19 -1
  210. package/views/dist/list/root-base.js +13 -3
  211. package/views/dist/list/root.d.ts +1 -1
  212. package/views/dist/list/root.js +2 -2
  213. package/views/dist/list/store.d.ts +29 -0
  214. package/views/dist/list/store.js +48 -2
  215. package/views/dist/list/toolbar-model.d.ts +99 -0
  216. package/views/dist/list/toolbar-model.js +195 -0
  217. package/views/dist/list/toolbar.js +142 -329
  218. package/views/dist/list/views-axis.js +15 -4
  219. package/views/dist/list/views.d.ts +1 -1
  220. package/views/dist/list/views.js +4 -1
  221. package/views/dist/looks/index.d.ts +0 -1
  222. package/views/dist/looks/index.js +0 -1
  223. package/views/dist/looks/looks.d.ts +1 -1
  224. package/views/dist/looks/pieces.js +0 -2
  225. package/views/dist/model/aggregates.d.ts +18 -8
  226. package/views/dist/model/aggregates.js +16 -22
  227. package/views/dist/model/column-filters.js +10 -3
  228. package/views/dist/model/view-rules.js +1 -0
  229. package/views/dist/panels/filter/NumberFilterBody.js +6 -8
  230. package/views/dist/panels/labels.js +7 -2
  231. package/views/dist/panels/model.d.ts +3 -0
  232. package/views/dist/panels/react/filter/FilterEditor.d.ts +3 -1
  233. package/views/dist/panels/react/filter/FilterEditor.js +2 -2
  234. package/views/dist/panels/react/filter/filter-body.d.ts +3 -1
  235. package/views/dist/panels/react/filter/filter-body.js +7 -3
  236. package/views/dist/panels/react/sort/SortEditor.d.ts +3 -1
  237. package/views/dist/panels/react/sort/SortEditor.js +4 -4
  238. package/views/dist/panels/react/toolbar/Toolbar.d.ts +80 -3
  239. package/views/dist/panels/react/toolbar/Toolbar.js +85 -52
  240. package/views/dist/panels/react/toolbar/ToolbarBarSorts.d.ts +9 -0
  241. package/views/dist/panels/react/toolbar/ToolbarBarSorts.js +84 -0
  242. package/views/dist/panels/react/toolbar/ToolbarButton.d.ts +1 -1
  243. package/views/dist/panels/react/toolbar/ToolbarButton.js +5 -3
  244. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +4 -1
  245. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +2 -2
  246. package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +30 -0
  247. package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -1
  248. package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +5 -0
  249. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +6 -4
  250. package/views/dist/panels/react/toolbar/ToolbarViews.d.ts +7 -1
  251. package/views/dist/panels/react/toolbar/ToolbarViews.js +4 -4
  252. package/views/dist/panels/react/toolbar/context.d.ts +4 -0
  253. package/views/dist/panels/react/toolbar/context.js +1 -0
  254. package/views/dist/panels/react/toolbar/sheet-host.d.ts +3 -0
  255. package/views/dist/panels/react/toolbar/sheet-host.js +6 -0
  256. package/views/dist/panels/react/toolbar/use-give-way.d.ts +6 -0
  257. package/views/dist/panels/react/toolbar/use-give-way.js +10 -3
  258. package/views/dist/panels/react/views-row/ViewPicker.d.ts +8 -1
  259. package/views/dist/panels/react/views-row/ViewPicker.js +12 -7
  260. package/views/dist/panels/settings/filter-groups.js +12 -0
  261. package/views/dist/panels/settings/input.d.ts +11 -0
  262. package/views/dist/panels/settings/layout.js +26 -0
  263. package/views/dist/panels/settings/person.d.ts +15 -0
  264. package/views/dist/panels/settings/person.js +6 -0
  265. package/views/dist/panels/toolbar/page-resets.js +14 -3
  266. package/views/dist/provider/components.d.ts +47 -4
  267. package/views/dist/react.d.ts +1 -1
  268. package/views/dist/styles.css +116 -257
  269. package/views/dist/styles.unlayered.css +116 -257
  270. package/views/docs/contract.md +28 -18
  271. package/views/docs/controls/field.md +2 -1
  272. package/views/docs/controls/filter-editor.md +1 -1
  273. package/views/docs/controls/menu.md +1 -1
  274. package/views/docs/controls/sort-editor.md +1 -1
  275. package/views/docs/guides/atoms.md +1 -0
  276. package/views/docs/guides/looks.md +1 -1
  277. package/views/docs/guides/the-grid.md +6 -4
  278. package/views/docs/guides/toolbar-parts.md +337 -0
  279. package/views/docs/index.md +4 -0
  280. package/views/docs/reference/controls.md +6 -44
  281. package/views/docs/reference/field-row.md +1 -1
  282. package/views/docs/reference/grid.md +8 -7
  283. package/views/docs/reference/list.md +184 -11
  284. package/views/docs/reference/looks.md +13 -16
  285. package/views/docs/reference/panels-react.md +7 -7
  286. package/views/docs/reference/panels.md +1 -1
  287. package/views/docs/reference/react.md +14 -11
  288. package/views/docs/reference/views.md +9 -7
  289. package/views/skills/views/SKILL.md +2 -1
  290. package/views/dist/controls/setting-row/looks.d.ts +0 -10
  291. package/views/dist/controls/setting-row/looks.js +0 -22
  292. package/views/dist/controls/setting-row/setting-row.d.ts +0 -102
  293. package/views/dist/controls/setting-row/setting-row.js +0 -135
  294. package/views/dist/controls/setting-row/tokens.d.ts +0 -156
  295. package/views/dist/controls/setting-row/tokens.js +0 -41
  296. package/views/dist/controls/setting-row.css +0 -216
  297. package/views/dist/controls/switch-row/switch-row.d.ts +0 -1
  298. package/views/dist/controls/switch-row/switch-row.js +0 -1
  299. package/views/dist/controls/switch-row/tokens.d.ts +0 -39
  300. package/views/dist/controls/switch-row/tokens.js +0 -12
  301. package/views/dist/controls/switch-row.css +0 -35
  302. package/views/dist/controls/tag-field/tag-field.d.ts +0 -24
  303. package/views/dist/controls/tag-field/tag-field.js +0 -25
  304. package/views/dist/controls/tag-field/tokens.d.ts +0 -23
  305. package/views/dist/controls/tag-field/tokens.js +0 -8
  306. package/views/dist/controls/tag-field.css +0 -32
  307. package/views/docs/controls/setting-row.md +0 -44
  308. package/views/docs/controls/switch-row.md +0 -15
  309. package/views/docs/controls/tag-field.md +0 -11
@@ -32,7 +32,7 @@ The row of views over a list, and any row of pills: each pill is your `Pill` ato
32
32
  - `ViewTabs` — one axis as plain pills on a scroll rail.
33
33
  - `toPillOptions` — views turned into pill options: the label and count joined by `views.panels.view-count`, a slot's colours, the glyph by your `AppIcon`.
34
34
  - `FoldingViewRow` — the saved-views row that folds what doesn't fit into a "+N" chip, never folding the active view, and closes with the + when the axis grows. Handed `folded`, as a folding toolbar line hands it, it folds that many tabs and measures nothing of its own. Where the axis hands `verbs` and your map draws `ViewMenu`, its pills and each folded view's `⋮` in the "+N" list open the view's whole menu through it (VK-947), and its + opens New view's Modal through it, in place of the axis's `onCreate` (VK-971).
35
- - `ViewPicker` — the same axis as one chip naming the active view, opening your `ViewsListBody` (`CONTROLS.ViewsListBody` is ViewKit's own) in your `Popover` at the chip; on a phone (in a `Toolbar`, its phone form; elsewhere your provider's `desktopQuery`) in your `Sheet` (`snap: "auto"`, titled `views.panels.views-list`). The body is handed the views as data, a pick or an order is written once it fits the axis, its `onDone` closes the list, and on a phone it gets the ✕ (and Back on a step) as its `actions` only where your sheet's head doesn't draw it, and `onStepChange`, whose step's title and Back the sheet shows; the axis's `verbs`, where it hands them, reach it as they are ([the components map](../contract.md#the-components-map)). With no view yet it draws only the axis's +, which opens New view's Modal through your `ViewMenu` where the axis hands `verbs` and your map draws one, as the row's + does, and otherwise calls the axis's `onCreate`.
35
+ - `ViewPicker` — the same axis as one chip naming the active view, opening your `ViewsListBody` (`CONTROLS.ViewsListBody` is ViewKit's own) in your `Popover` at the chip; on a phone (in a `Toolbar`, its phone form; elsewhere your provider's `desktopQuery`) in your `Sheet` (`snap: "auto"`, titled `views.panels.views-list`). The body is handed the views as data, a pick or an order is written once it fits the axis, its `onDone` closes the list, and on a phone it gets the ✕ (and Back on a step) as its `actions` only where your sheet's head doesn't draw it, and `onStepChange`, whose step's title and Back the sheet shows; the axis's `verbs`, where it hands them, reach it as they are ([the components map](../contract.md#the-components-map)). With no view yet it draws only the axis's +, which opens New view's Modal through your `ViewMenu` where the axis hands `verbs` and your map draws one, as the row's + does, and otherwise calls the axis's `onCreate`. Handed `press` (`{ onPress, expanded, lit? }`: its list stands elsewhere, `ListViewsPanel`), the chip calls `onPress`, says `expanded` (`aria-expanded`, no `aria-haspopup`), lights only with `lit` and opens no list.
36
36
  - `ViewPickerRow` — one view as a row of a list, with the active view's `⋮`; handed `viewMenu`, every row's `⋮` opens the view's whole menu through your `ViewMenu`.
37
37
  - `ViewCreatePill` — the + that creates a view.
38
38
  - `ViewAxes` — an axis or several on one row: one axis at the row's size folds, peer axes share one rail, each in its own track. `folded` is handed on to the one axis's `FoldingViewRow`. The axis that grows closes the row with its +, which, as every views + does (the row's, the picker's), opens New view through your `ViewMenu` where the axis hands `verbs`, else calls its `onCreate`.
@@ -67,7 +67,7 @@ The frame that holds a list's controls, and the parts that need no list settings
67
67
  - `Toolbar` — the frame (one radio for its parts, or, inside a `ListRoot`, the root's). Takes `parts` (`ToolbarPart[]`), and optionally `phone`, `narrow`, `narrowBelow` (700 by default), `fold`, `more` (`ToolbarMore`, ⋯ as data: handed the folded parts' rows, each keyed by its part, and `{ line }`, `"row"` or `"bar"`, since each line folds into its own ⋯, it returns the rows ⋯ shows; a press on any of them closes ⋯ first), `overflow` (`ToolbarOverflow`, ⋯ as you draw it) and `className`. Each of its lines is a toolbar of its own (`role="toolbar"`): the filter bar (and the three forms' second line) named `views.panels.toolbar-bar` ("Sort and filters"), every other line `views.panels.toolbar-row` ("List tools"). With `fold` it draws the kit's arrangement (`/panels`' fold arrangement): the row and the filter bar under it, each a band with a line across under it (on a computer its padding, the room between its tools and the line are `--vk-toolbar-line-py`, `--vk-toolbar-line-gap` and `--vk-toolbar-line-w`, [Tokens](../contract.md)), or a phone's one line, with no narrow form; each line measures itself and gives way as it narrows (it contains its own inline size, so its width comes from where it stands and never from what its lines hold: in a holder sized from its content, a main beside a sidebar, it still gives way, with no wrapper of yours), a part's words turning to its icon (the `ToolbarButton` atom's `iconAlone`), the views folding tabs into "+N", a part's filters folding into "+N filters", then what may fold going behind ⋯ (`data-slot="vk-toolbar-overflow"`, your `Menu`, each row the folded part's `menu`). A folded part keeps its state, and what it opens hangs under ⋯; while ⋯'s menu, a folded part's panel, the views' "+N" list, a filter with a part open (`data-slot="vk-toolbar-filter-rule"` marked `data-open`), an open advanced filter (`data-slot="vk-toolbar-advanced-filter"` marked `data-open`) or "+N filters"' menu (the button in `data-slot="vk-toolbar-more-filters"`, `aria-expanded`) is open, the line holds still. The frame holds the search's open state: open, the line gives way around it, and on a phone the search takes the line beside the views.
68
68
  - `ToolbarPart` — a part as your app hands it: a `ToolbarPlacement` (its `key`, `side`, `line`, `role`, in the fold arrangement `shed`, `tabs`, `filters` and `fold`, and `words` and `foot`), its `node`, and for a part that may fold its `menu`: `{ label, icon?, onSelect }`, its row in ⋯. `words`: `"icon"` stands a `ToolbarButton` drawn in it as its icon alone, its words given up (a button with no icon keeps them); `"both"` gives the search's button, and the quick filters' button handed `word={null}`, their word, as the look's words say; `"word"` stands one with a word as its word alone, no icon (handed `icon: null`, its word as its `children`), never turning to its icon as the line narrows (a button handed `word={null}`, a +, and New at a phone's foot keep their glyph); absent, each its own. `foot: false` keeps New on a phone's folding line instead of at the list's foot.
69
69
  - `ToolbarSeparator` — the line between the sort and the filters on a filter bar (or Filter while there is none), placed with `role: "separator"`: drawn only while a part stands drawn on each side of it, and never on a phone's line.
70
- - `ToolbarViews` — the views row: `views` (`CollectionViewsInput`) and `viewsLayout`. On the row and in the narrow panel it draws `ViewAxes`, or with `as="picker"` and one axis alone its `ViewPicker`; placed again with `stacked` on the second line, it draws the axes a stacked layout pushes beneath, small. On the phone it draws a `ViewPicker` per axis, every axis, and nothing for `stacked`. With `showCounts` the toolbar owns Show counts (`withCounts`). Place it only when the list has views: the phone's search fills the row when nothing is placed at the start.
70
+ - `ToolbarViews` — the views row: `views` (`CollectionViewsInput`) and `viewsLayout`. On the row and in the narrow panel it draws `ViewAxes`, or with `as="picker"` and one axis alone its `ViewPicker`; placed again with `stacked` on the second line, it draws the axes a stacked layout pushes beneath, small. On the phone it draws a `ViewPicker` per axis, every axis, and nothing for `stacked`. With `showCounts` the toolbar owns Show counts (`withCounts`). Place it only when the list has views: the phone's search fills the row when nothing is placed at the start. `press` goes to its picker (one axis as `as="picker"`, on a computer).
71
71
  - `ToolbarSearch` — the search, placed with `role: "search"`: `value`, `onChange`, `placeholder` (`views.panels.search` by default) and `searching` (while true, a spinner, worded `views.panels.searching`, stands where its glass is, on the button and in the field, and the field, marked `aria-busy`, keeps its value and its typing; your app decides when it is true). On the row, and beside the phone's views, a button that opens an inline field; in the narrow panel, and on a phone with no views, a field that fills its line. A field that holds a value shows from the start. Escape and its ✕ clear it and close a field the button opened; a blur with nothing typed closes it. The field is your `Input`, or, handed `SearchField` in your components map, your whole search box: it stands in place of the glass, the field and the ✕, handed the value, the clear and its form, while the button, the open state, the caret on a press, Escape and a blur stay ViewKit's ([the components map](../contract.md#the-components-map)). Shut, its button is its glass alone, reading "Search" beside it only where its part is placed `words: "both"`, as the look's words say.
72
72
  - `ToolbarNew` — the +: `onAdd` (one way to add, the button fires it) or `items` (several, opened through your `Menu`, one of the toolbar's panels), `label` (`views.panels.toolbar-new` by default) and `icon` (your `add` glyph by default); its word for a dress is its label. With neither, the row draws it disabled, so its place never moves; the narrow panel and the phone draw nothing. In a folding `Toolbar` on a phone it stands at the list's foot instead (`data-at="foot"`): a round + (the atom's `foot`) fixed at the screen's bottom-end corner, over the list, lifted by `--vk-toolbar-foot`, and drawn into the document's body so a page that scrolls inside a transformed box can't carry it away; with no verb, nothing there.
73
73
  - `ToolbarButton` — the `ToolbarButton` atom at the size of the line it stands in, for a custom part's buttons.
@@ -133,9 +133,9 @@ Options, Sort and Filter each open their panel from their own button, and each t
133
133
 
134
134
  - `ToolbarOptions` — Customize behind its own button, named and worded `views.panels.toolbar-options`: the builder's `filters`, `sort`, `group` and `layout` (and its `filterTree`, with and/or groups: its count and default Clear then read the advanced filters), your `toggles`, `timeScopeConfig` and `dateRangeConfigs` (a `ViewOptionInputs`), and optionally `view` (a shared view: the drift dot on the button instead of a count, and the panel's footer), `fieldEditor`, `foldFilters` (true by default), `onClear` (the ✕ and the panel's Clear all; by default each active option cleared through its own `onChange`, the builder's filter rows adding up so every filter clears, or Reset on a shared view; for one change, `settingsCleared(…, "options")`), `widthClassName` (`w-75` by default: 300 px, the Pane Customize was designed in), `host`, and what your `CustomizeBody` draws only where you hand it: `viewName` with `onRenameView` (the view's name, renamed in place), `onCopyLink`, and `onExport` with `exportCount` (what it takes, in words). On a phone, while your body stands on a level of its own inside a section (`onStepChange`), the sheet's Escape goes back a level instead of closing. Its button counts the active options (`countActiveViewOptions`) with a ✕ that clears them. Draws nothing when there is nothing to customize. A `CustomizeBody` in your components map opens in place of the panel, in the same popover, `host` or phone `Sheet`.
135
135
  - `ToolbarSort` — the sort panel behind its own button, named `views.panels.sort`: the builder's `sort`, lit while the list sorts other than its default, or, handed `changed`, as that says (the ready toolbar hands it while the sort differs from the saved view). Draws nothing when nothing sorts. Handed `bar`, it is the one-rule sort on the filter bar, as a several-sorts list's pill reads there: "Sorted by **Name**" (`views.panels.sorted-by` and the sort's field), in the bar's sort place (`data-slot="vk-toolbar-sort-pill"`), opening the same panel. Handed the builder's `sorts` too (with `severalSorts`), it is Sort on the row's right as the kit draws it there: "Sort", counted once there are two rules, opening the fields (`SortFieldList`), a pick adding a rule at the end, ascending; at three it can't be used, saying why (`views.panels.sort-max`).
136
- - `ToolbarSortPill` — the sort as up to 3 rules, the kit's sort on its filter bar, in `data-slot="vk-toolbar-sort-pill"`: takes the builder's `sorts`, and optionally `open` and `onOpenChange` (to hold its state yourself), `host` and `addAfter` (default true). On a computer, "Sorted by" its first rule's field, in weight, with the rest counted (+1), opening the sort editor in your `Popover`; after it a + (`data-slot="vk-toolbar-sort-add"`, named `views.panels.sort-add-one`) while there are fewer than three, opening the fields, a pick adding a rule; with no rule, an empty place, "Sort", opening the fields. Handed `addAfter={false}` (the kit's bar), it draws no +, and its editor, or your `SortBody` (handed `addSort`), has Add sort at its foot. Handed `row`, it is Sort on a toolbar row (`data-slot="vk-toolbar-sort-row"`, as `ReadyToolbar`'s default stands it): its word "Sort", lit while a rule stands (handed `changed`, lit by it instead, on the row and as a pill: the ready toolbar hands it while the sort differs from the saved view) and counted from two; however it opens (a press, or ⋯ when it folded) it shows the sort editor, Add sort at its foot, while a rule or a set-aside sort stands, else the fields; it draws no + and `addAfter` means nothing to it. The fields are your `FieldsBody`. × on the editor's last rule closes it. On a phone, "Sort" with its rules counted, opening the sort editor in your `Sheet`, its ✕ taking back what changed since it opened and its ✓ keeping it; a swipe, the dim or Escape close it and keep the changes; while your `SortBody` stands on a step of its own (`onStepChange`), Escape goes back a step instead, and under `sheetActions: "head"` your sheet's head shows the step's title. Its popovers, or its sheet, are one of the toolbar's panels.
137
- - `SortEditorHost` — the host of your sort body alone, for a holder of your own (a popover; ViewKit's own body is `SortEditor`, on `viewkitjs/views/controls`): `sorts`, `form` (`"computer"` or `"phone"`), and optionally `open`, `onDone` and `addSort` (Add sort at a computer's body's foot, for a holder with no + of its own). It opens your `SortBody` (`CONTROLS.SortBody` is ViewKit's own), handed the rules as data, its whole list written once it fits the rules; every change goes out through `sorts.onChange` as it is made.
138
- - `useSortEditorHost` — the sort editor's state for a sheet's holder (`SortEditorOptions`: `sorts`, `form`, `open`, `onDone`, `addSort`): `{ body, head, title, escapeBack }`. `body(closeButton)` draws your `SortBody`, on a phone handed `head` as its `actions` when `closeButton` is true (no head of your sheet draws them: your provider's `sheetActions` is `bar`, or a host of yours holds it); `head` is the ✕ (named `views.panels.close`) and ✓ (`views.panels.sort-done`) for your sheet's head, as its `actions`. ✕ takes the rules back, in one change, to what they were when `open` last turned true; the body's `onDone` calls the `onDone` you hand ([the components map](../contract.md#the-components-map)). On a phone the body is also handed `onStepChange`: while it stands on a step of its own, `title` is the step's (your sheet's title in place of the sort's), `head` gains `back` (Back, for `close`'s place), and `escapeBack()` goes back a step and says it did, so your sheet's Escape calls it first and closes only when it returns false.
136
+ - `ToolbarSortPill` — the sort as up to 3 rules, the kit's sort on its filter bar, in `data-slot="vk-toolbar-sort-pill"`: takes the builder's `sorts`, and optionally `open` and `onOpenChange` (to hold its state yourself), `host` and `addAfter` (default true). On a computer, "Sorted by" its first rule's field, in weight, with the rest counted (+1), opening the sort editor in your `Popover`; after it a + (`data-slot="vk-toolbar-sort-add"`, named `views.panels.sort-add-one`) while there are fewer than three, opening the fields, a pick adding a rule; with no rule, an empty place, "Sort", opening the fields. Handed `addAfter={false}` (the kit's bar), it draws no +, and its editor, or your `SortBody` (handed `addSort`), has Add sort at its foot. Handed `row`, it is Sort on a toolbar row (`data-slot="vk-toolbar-sort-row"`, as `ReadyToolbar`'s default stands it): its word "Sort", lit while a rule stands (handed `changed`, lit by it instead, on the row and as a pill: the ready toolbar hands it while the sort differs from the saved view) and counted from two; however it opens (a press, or ⋯ when it folded) it shows the sort editor, Add sort at its foot, while a rule or a set-aside sort stands, else the fields; it draws no + and `addAfter` means nothing to it. On the row, `empty="editor"` shows the sort editor with nothing set too, saying so with Add sort (your `SortBody` handed `empty`), staying open as its last rule goes; `fieldsOnly` opens the fields every time, a sort standing or not (a placed `ListSort`'s `opens="bar"`). The fields are your `FieldsBody`. × on the editor's last rule closes it, unless the row was handed `empty="editor"`. On a phone, "Sort" with its rules counted, opening the sort editor in your `Sheet`, its ✕ taking back what changed since it opened and its ✓ keeping it; a swipe, the dim or Escape close it and keep the changes; while your `SortBody` stands on a step of its own (`onStepChange`), Escape goes back a step instead, and under `sheetActions: "head"` your sheet's head shows the step's title. Its popovers, or its sheet, are one of the toolbar's panels.
137
+ - `SortEditorHost` — the host of your sort body alone, for a holder of your own (a popover; ViewKit's own body is `SortEditor`, on `viewkitjs/views/controls`): `sorts`, `form` (`"computer"` or `"phone"`), and optionally `open`, `onDone`, `addSort` (Add sort at a computer's body's foot, for a holder with no + of its own) and `empty` (`"editor"`: with no rule, your body says nothing sorts yet, VK-1091). It opens your `SortBody` (`CONTROLS.SortBody` is ViewKit's own), handed the rules as data, its whole list written once it fits the rules; every change goes out through `sorts.onChange` as it is made.
138
+ - `useSortEditorHost` — the sort editor's state for a sheet's holder (`SortEditorOptions`: `sorts`, `form`, `open`, `onDone`, `addSort`, `empty`): `{ body, head, title, escapeBack }`. `body(closeButton)` draws your `SortBody`, on a phone handed `head` as its `actions` when `closeButton` is true (no head of your sheet draws them: your provider's `sheetActions` is `bar`, or a host of yours holds it); `head` is the ✕ (named `views.panels.close`) and ✓ (`views.panels.sort-done`) for your sheet's head, as its `actions`. ✕ takes the rules back, in one change, to what they were when `open` last turned true; the body's `onDone` calls the `onDone` you hand ([the components map](../contract.md#the-components-map)). On a phone the body is also handed `onStepChange`: while it stands on a step of its own, `title` is the step's (your sheet's title in place of the sort's), `head` gains `back` (Back, for `close`'s place), and `escapeBack()` goes back a step and says it did, so your sheet's Escape calls it first and closes only when it returns false.
139
139
  - `SortEditorOptions` — what `useSortEditorHost` takes.
140
140
  - `ToolbarQuickFilters` — the quick filters' button (`data-slot="vk-toolbar-quick"`), named `views.panels.quick-filters` (or the config's `label`), lit (`changed`) while a value is held: takes `quickFilters` (a `QuickFiltersConfig`, [`/panels`](./panels.md#quick-filters)), and optionally `open` and `onOpenChange` (to hold its state yourself), `host`, `icon` (its glyph; the `filterCategory` icon when absent) and `word` (`null`: its icon alone, its name its label to a screen reader, as `ReadyToolbar`'s default draws it on a computer, unless its part is placed `words: "both"`). It opens your `QuickFiltersBody` (through `QuickFiltersPanel`) in your `Popover` (`data-slot="vk-toolbar-quick-panel"`), in `host` (on a computer under the panels' header, its name and ✕, since a host draws no head), or on a phone in your `Sheet`, and is one of the toolbar's panels. With no field to offer it draws nothing.
141
141
  - `QuickFiltersPanel` — the quick filters' panel alone, for a holder of your own: `quickFilters`, `form` (`"computer"` or `"phone"`), and optionally `onDone`, `closeButton` (false where your sheet's head draws the ✕) and `inHost` (it stands in a host of yours that draws no head: on a computer, the panels' header over it, its name and its ✕). It opens your `QuickFiltersBody` (`CONTROLS.QuickFiltersBody` is ViewKit's own), handed the fields as the strip shows them (`quickFieldsShown`) with their values as they show (`quickValuesShown`, worded by the config's `heldLabels`), and writes its hold once `quickHoldFits` takes it; on a phone the body gets the ✕ as its `actions` when `closeButton` is true ([the components map](../contract.md#the-components-map)).
@@ -144,7 +144,7 @@ Options, Sort and Filter each open their panel from their own button, and each t
144
144
  - `ToolbarAdvancedFilters` — the advanced filters' pills, with and/or groups (`data-slot="vk-toolbar-advanced-filter"`): takes the builder's `filterTree`, and optionally `host`. One pill for each advanced filter (each group at the filter's top, or the whole of a top joined by Or), "Advanced filter" with its rules counted (one whose rules are all set aside drawn set aside instead, the button's `aside` with no count, naming why in your `Tooltip`: `views.panels.advanced-filter-set-aside`), its words kept however tight the row, opening the filter editor on its own rules in your `Popover` (`data-slot="vk-toolbar-advanced-filter-panel"`) or in `host`. A pill whose filter empties leaves the row; the others keep their own state. Each is one of the toolbar's panels; in a folding line its place carries `data-open` while it is open, so the line holds still. On a phone it draws nothing.
145
145
  - `ToolbarFilters` — each filter on a filter bar, as the kit's draws them (`data-slot="vk-toolbar-filters"`): takes the builder's `filterTree` (with `filterGroups`), and optionally `open` and `onOpenChange` (whether Filter and + list the fields: hold it to open them from ⋯), `held` and `onHeldChange` (the rule held until whole: hold it to count it as the bar folds), `host`, and `saved` (the saved view's filter: its own top-level items stand in Customize, not on the bar, an edited one standing as edited; every write is still the whole filter's). Every filter at the view's own level, in its order: a filter as four joined parts (`data-slot="vk-toolbar-filter-rule"`, named by its sentence), its field, how it compares in lower case, its value (capped at 240 and cut with "…", saying what it waits for until it is picked) and ⋯ (Convert to advanced filter, Delete filter), each opening its own list; a related record's field drawn as one ("Company › Industry"); an advanced filter as its pill (`ToolbarAdvancedFilters`'); then + (`data-slot="vk-toolbar-filter-add"`, `views.panels.filter-add-one`). Filter, + and a filter's field open your `FieldsBody`, its way and value your `FilterPartBody` ([the components map](../contract.md#the-components-map)); their lists show a column the list can't filter greyed with its reason, in its place, never picked (`filterTree.listed`). A filter whose one value is a key your app hasn't named (a person after a reload) asks that field's `onValuesWanted` once (a related record's field, `farValues.onWanted`), and draws the name once you hand the value in `knownValues` and its name in `knownLabels`. While nothing filters and nothing is held, Filter, an empty place (`data-slot="vk-toolbar-filter"`); handed `emptyPlace={false}`, where Filter stands on the row (`ToolbarFilterAdd`), nothing at all until a filter is set or held. Filter and + open the fields; a pick adds a filter at the end (`addOnBar`, wrapping a top joined by Or into one advanced filter first), a related record's field among them, waiting for its value, or, for a yes/no, the list's own or a related record's, holds it on the bar saying what it waits for, writing nothing until its value is picked; where nothing more can be added they are disabled with why (`barAddRefusal`). With no field a rule may name (every column one the list can't filter: `filterTree.fields` empty), neither Filter nor + stands: a set-aside filter still does. In a folding line its last filters fold into "+N filters" (`data-slot="vk-toolbar-more-filters"`, as its slot's `filtersFolded` says), which names each and opens what a pick opens under itself; a held rule, the filter it stands in place of and a filter with a part open never fold. Each filter and "+N filters"' menu is one of the toolbar's panels. Delete filter and Convert move the focus to what stands after the filter: the next filter, "+N filters", + or Filter, or, where Filter stands on the row's right and nothing is left on the bar, that Filter (`ToolbarFilterAdd`). An app placing it in a `Toolbar` of its own places it with `filters: foldableFilters(…)` and never with `shed` while a filter stands: its parts read the slot's `iconAlone`, and would draw no words. A held rule is compared with the tree as written, so your `filterTree.onChange` must hand the tree back unchanged (the same keys in the same order), or the held rule counts as dropped by a write from elsewhere. On a phone it draws nothing.
146
146
  - `foldableFilters` — how many of the bar's filters may fold, for its placement's `filters`: `(tree, held, saved?)`, the tree's top-level items less the one a held rule stands in place of, and less the saved filter's own where `saved` is handed; a held rule no longer standing (`held`'s tree changed by a write from elsewhere) counts as gone.
147
- - `ToolbarFilterAdd` — Filter on a toolbar row's right (`data-slot="vk-toolbar-filter-add-row"`, named `views.panels.filter`), as `ReadyToolbar` stands it by default: takes the builder's `filterTree`, and optionally `onHeldChange` (hand the toolbar's held rule's writer, the one you hand `ToolbarFilters`, so a yes/no it holds stands on the bar), `open` and `onOpenChange`, `host`, `changed` (lit: the ready toolbar hands it while the filter differs from the saved view), and `opens` (`"fields"`, the default, or `"filters"`: the whole filter editor, your `FilterBody` on every rule of the view, edited as Customize's Filter edits it, in a panel as wide as the editor; the ready toolbar hands `"filters"`). With the fields, it opens them as Filter on the bar does (your `FieldsBody`), and a pick adds a filter at the bar's end and opens nothing else, or holds a yes/no until its value is picked, which `ToolbarFilters` takes in as its own; where nothing more can be added it is disabled with why. It is one of the toolbar's panels. On a phone, or with no fields, it draws nothing.
147
+ - `ToolbarFilterAdd` — Filter on a toolbar row's right (`data-slot="vk-toolbar-filter-add-row"`, named `views.panels.filter`), as `ReadyToolbar` stands it by default: takes the builder's `filterTree`, and optionally `onHeldChange` (hand the toolbar's held rule's writer, the one you hand `ToolbarFilters`, so a yes/no it holds stands on the bar), `open` and `onOpenChange`, `host`, `changed` (lit: the ready toolbar hands it while the filter differs from the saved view), and `opens` (`"fields"`, the default, or `"filters"`: the whole filter editor, your `FilterBody` on every rule of the view, edited as Customize's Filter edits it, in a panel as wide as the editor; the ready toolbar hands `"filters"`), and with `"filters"`, `empty` (`"fields"`, the default, or `"editor"`: with nothing filtered, the editor saying so with Add filter, your `FilterBody` handed `empty`, staying open as its last rule goes). With the fields, it opens them as Filter on the bar does (your `FieldsBody`), and a pick adds a filter at the bar's end and opens nothing else, or holds a yes/no until its value is picked, which `ToolbarFilters` takes in as its own; where nothing more can be added it is disabled with why. It is one of the toolbar's panels. On a phone, or with no fields, it draws nothing.
148
148
  - `Pending` — the rule held until whole, as `ToolbarFilters` hands it to `onHeldChange`: its `container`, its `node`, the filter it `replaces`, and what it was held `over`.
149
149
  - `FilterEditorHost` — the host of your filter body on a computer (ViewKit's own body is `FilterEditor`, on `viewkitjs/views/controls`): `filterTree`, `at` (the advanced filter's path: a group's, or `[]` for a top joined by Or), and optionally `onDone` (its filter emptied) and `onRemoved` (a delete took a node away: the outermost that went). It opens your `FilterBody` (`CONTROLS.FilterBody` is ViewKit's own), handed the level it stands on as data, its whole level written once it fits the rules, its `onDone` calling the `onDone` you hand ([the components map](../contract.md#the-components-map)). The first edit in a top joined by Or wraps it into one advanced filter. At a top-level relation rule (`at` `[i]`) it edits the relation wrapped in a group of its own; where that would pass 3 levels, it edits the relation in place, the body handed the relation. Every change goes out through `filterTree.onChange` as it is made.
150
150
  - `FilterFieldList` — the fields a rule names: `fields`, `onPick(field, far?)`, and optionally `own`, `relations` (false leaves a relation's far fields out), `onDone` (done with no pick) and `form`. It opens your `FieldsBody` (`CONTROLS.FieldsBody` is ViewKit's own), in every holder, handed the list's own fields and, where `relations`, each relation with its `far` fields, each marked as the grid's header marks its column; a pick of a key it didn't offer, or a column the list can't filter, writes nothing ([the components map](../contract.md#the-components-map)).
@@ -155,7 +155,7 @@ Options, Sort and Filter each open their panel from their own button, and each t
155
155
  - `ToolbarPanelState` — what `useToolbarPanelState` returns.
156
156
  - `FilterPanelContent` — the Filter panel standing alone, for a host of your own: the filter list at its root (titled `views.panels.filter`, no back arrow) and the pages it opens, with `filters`, `timeScopeConfig`, `dateRangeConfigs`, `page`, `onPageChange`, `onClose` and `fill`.
157
157
  - `ToolbarSave` — Clear and Save, at the end of a filter bar while the list differs (`data-slot="vk-toolbar-save"`): takes `view` (a `CollectionViewState`: Clear is its `onReset`, Save its `onPublish`, shown only where `canPublish`, both waiting while `pending`, nothing while `changes` is 0 unless `layered`, the reader's own layer holding something, when Clear stands alone to empty it), or with no shared view `onClear`, Clear alone taking the list back to its default; nothing when neither has anything to do. Clear has no ground and Save wears the field's look, each your `Button`. `only` (`"clear"` or `"save"`) draws that one button alone, with no `vk-toolbar-save` box around it, as the ready toolbar draws each where an app places Clear and Save apart.
158
- - `ReadyToolbar` — the toolbar for an app that doesn't arrange its own (`ReadyToolbarProps`): the builder's input (`settings`, `layer`, `columns`, `onChange`, `onLayerChange` and the rest of `SettingsPanelsInput`), and optionally `views`, `viewsLayout`, `onAdd` or `addItems` and `addLabel`, `view`, `toggles`, `fieldEditor`, `searchPlaceholder`, `searching` (handed to its search), `hosts` (`{ options, sort, filter, quick }`), `customizeIn` (`"popover"` by default; `"pane"`: on a computer Customize opens in your map's `Pane`, `CONTROLS.Pane`, at the right edge of `paneBox`, under the toolbar and as tall as the list, the list in use beside it; on a phone its Sheet either way; a map with no `Pane`, or your own `hosts.options`, keeps theirs) and `paneBox` (the list's box the Pane stands in: positioned, holding the grid under the toolbar, never scrolling itself; null until it is on the page; not handed, the popover), `quickFilters` (a `QuickFiltersConfig`: handed, the quick filters' button stands on the row's end before the search, in the row arrangement before Options, folding into ⋯ as the row narrows; its counts follow the toolbar's Show counts unless the config carries its own `showCounts`), `quickFiltersOpen` with `onQuickFiltersOpenChange` (the quick filters' panel open, held by you, so a `QuickFiltersReminder` at your list's foot can open it; absent, the toolbar holds it), `phone`, `narrow`, `severalSorts` (true by default: the sort holds up to 3 rules, the row's Sort opening the sort editor on them, or in the old form the sort pill on the bar; `false` keeps Sort's one rule, which opens its own list whether or not a sort stands), `addAfter` (true by default: the + after the sort pill; `false` draws none, and the pill's editor, or your `SortBody`, has Add sort at its foot, as `ToolbarSortPill`'s), `filterGroups` (true by default: and/or groups, each filter on the filter bar on a computer, in the row arrangement each advanced filter's pill after Filter and Convert to advanced filter on a filter's page, and on a phone Filter opening the filter editor on every rule; `false` keeps Filter, counting what is applied, in either arrangement), `arrangement` (`"kit"` by default, or `"row"`), `sortFilter` (`"right"` by default, or `"bar"`), `bar` (`"added"` by default, or `"always"`: with Sort and Filter on the row's right, the bar then always shows, its empty Sort and Filter included), `viewName`, `onRenameView`, `onCopyLink`, `onExport` and `exportCount` (handed on to Customize, as `ToolbarOptions` takes them), `menus` (`ToolbarMenus`: a view's menu, New's, ⋯, Customize's rows and the sort, filter and group editors' menus as data), `toolbarParts` (`ToolbarParts`: where each part stands, every form's parts handed as data and drawn as you hand them back, [`/list`'s Parts as data](./list.md#parts-as-data)), `overflow` (`ToolbarOverflow`: ⋯ as you draw it where the parts don't fit), `moreViews` (`ToolbarMoreViews`: the views row's "+N" as you draw it) and `className`. It calls the builder and draws its parts in the kit's arrangement (`Toolbar`'s `fold`). By default, on a computer, one row at rest: the views with Customize beside them, then on its right Sort and Filter with their words, the quick filters' button and the search, each its icon alone, and New. The toolbar shows only what differs from the saved view (the open view's `saved`, or with no view the list's defaults; a view handed without `saved` keeps the older lighting, lit while a sort stands, the bar for every filter). Sort holds the sort (`ToolbarSortPill`'s `row`): lit while it differs, counted from two, it opens the sort editor to change or remove the rules, Add sort at its foot; with none, the fields. Filter (`ToolbarFilterAdd`, `opens="filters"`), lit while the filter differs, opens the view's filters, editable, with Add filter under them, as Sort opens its rules (with no filter, the editor's fields); the bar's + adds one filter to the bar. Under the row the filter bar, a step smaller, holds what changed: it comes while the sort or the filter differs, a filter is held (or one of its parts is open), or a second axis of views stands there, holding the changed sort ("Sorted by", a list with one sort's included: `ToolbarSort`'s `bar`), the filters that aren't the saved view's own (an edited one as edited; each as below, + after the last, no empty Filter) and Clear and Save at its end. Something taken away (a saved rule removed) brings Clear and Save alone. Customize's foot holds Reset and Save too while anything differs, the bar standing or not (on a shared view Customize also carries its dot), as on a phone. Each of the row's Sort and Filter is a panel of its own, apart from the bar's, so a press opens one list. `sortFilter: "bar"` with `bar: "always"` draws the kit arrangement's old form: the row, the views with Customize beside them and the search and New at its end, and under it the filter bar, always shown, a step smaller: the sort pill first, a separator, the filters (`ToolbarFilters`: each filter as its four joined parts, each advanced filter's pill, + after the last; while there is none, Filter, an empty place; the rule held until whole is held by the toolbar, so the bar counts it as it folds; with `filterGroups` false, Filter as before, with what is applied counted), and at its end Clear and Save (`ToolbarSave`) while the list differs: on a shared view (`view`) Clear takes it back and Save, where `canPublish`, keeps it for everyone; with no shared view, Clear alone takes the list back to its default (nothing filtered, the default sort, no group: so a list that starts grouped or filtered shows Clear at once); Customize's foot then draws neither. A row with no room folds as the kit's does (words to icons, the view tabs into "+N", the bar's last filters into "+N filters", then into ⋯: by default Customize and the row's Sort and Filter, whatever is set; in the old form Customize, and the sort and Filter while no filter stands), with no narrow form. On a phone one line in either form (the views, the sort, Filter, the quick filters' button when handed, Customize, then the search, which opens across the line), Clear and Save in Customize's foot (`views.panels.view-clear`, `views.panels.view-save`; with no shared view, Clear alone), and New a round + at the list's foot, lifted by `--vk-toolbar-foot`. `arrangement: "row"` draws the order of 12 Nov instead: the views on the left; search, sort, filter, options and new on the right, the narrow form under 700px, and Reset and Save for everyone in Customize's foot. Every change comes back as a `ListSettingsChange` or a layer patch: its search writes the settings' search, its ✕s clear in one change (`settingsCleared`), and the active view's menu gains "Edit view…" (`withEditView`), which opens Customize. It is a `ListRoot` around `ListToolbar` ([`/list`](./list.md)): its panels' state is held in that root, above its frame, so a change of form keeps a panel open on its page, in a sheet once the form is the phone's. Show counts is the view's: read from `settings.showCounts` for the views row and the quick filters, absent meaning on, it joins Customize's toggles where the views carry counts and is written back through `onChange`. Group steps aside on a board (`groupShown`).
158
+ - `ReadyToolbar` — the toolbar for an app that doesn't arrange its own (`ReadyToolbarProps`): the builder's input (`settings`, `layer`, `columns`, `onChange`, `onLayerChange` and the rest of `SettingsPanelsInput`), and optionally `views`, `viewsLayout`, `onAdd` or `addItems` and `addLabel`, `view`, `toggles`, `fieldEditor`, `searchPlaceholder`, `searching` (handed to its search), `hosts` (`{ options, sort, filter, quick }`), `customizeIn` (`"popover"` by default; `"pane"`: on a computer Customize opens in your map's `Pane`, `CONTROLS.Pane`, at the right edge of `paneBox`, under the toolbar and as tall as the list, the list in use beside it; on a phone its Sheet either way; a map with no `Pane`, or your own `hosts.options`, keeps theirs) and `paneBox` (the list's box the Pane stands in: positioned, holding the grid under the toolbar, never scrolling itself; null until it is on the page; not handed, the popover), `quickFilters` (a `QuickFiltersConfig`: handed, the quick filters' button stands on the row's end before the search, in the row arrangement before Options, folding into ⋯ as the row narrows; its counts follow the toolbar's Show counts unless the config carries its own `showCounts`), `quickFiltersOpen` with `onQuickFiltersOpenChange` (the quick filters' panel open, held by you, so a `QuickFiltersReminder` at your list's foot can open it; absent, the toolbar holds it), `phone`, `narrow`, `severalSorts` (true by default: the sort holds up to 3 rules, the row's Sort opening the sort editor on them, or in the old form the sort pill on the bar; `false` keeps Sort's one rule, which opens its own list whether or not a sort stands), `addAfter` (true by default: the + after the sort pill; `false` draws none, and the pill's editor, or your `SortBody`, has Add sort at its foot, as `ToolbarSortPill`'s), `filterGroups` (true by default: and/or groups, each filter on the filter bar on a computer, in the row arrangement each advanced filter's pill after Filter and Convert to advanced filter on a filter's page, and on a phone Filter opening the filter editor on every rule; `false` keeps Filter, counting what is applied, in either arrangement), `arrangement` (`"kit"` by default, or `"row"`), `sortFilter` (`"right"` by default, or `"bar"`), `bar` (`"added"` by default, or `"always"`: with Sort and Filter on the row's right, the bar then always shows, its empty Sort and Filter included), `viewName`, `onRenameView`, `onCopyLink`, `onExport` and `exportCount` (handed on to Customize, as `ToolbarOptions` takes them), `menus` (`ToolbarMenus`: a view's menu, New's, ⋯, Customize's rows and the sort, filter and group editors' menus as data), `toolbarParts` (`ToolbarParts`: where each part stands, every form's parts handed as data and drawn as you hand them back, [`/list`'s Parts as data](./list.md#parts-as-data)), `overflow` (`ToolbarOverflow`: ⋯ as you draw it where the parts don't fit), `moreViews` (`ToolbarMoreViews`: the views row's "+N" as you draw it) and `className`. It calls the builder and draws its parts in the kit's arrangement: the list's own parts ([`/list`'s buttons](./list.md)) in `ListLine`s, folding as `Toolbar`'s `fold` does; `arrangement: "row"` keeps `Toolbar`'s own frame. By default, on a computer, one row at rest: the views with Customize beside them, then on its right Sort and Filter with their words, the quick filters' button and the search, each its icon alone, and New. The toolbar shows only what differs from the saved view (the open view's `saved`, or with no view the list's defaults; a view handed without `saved` keeps the older lighting, lit while a sort stands, the bar for every filter). Sort holds the sort (`ToolbarSortPill`'s `row`): lit while it differs, counted from two, it opens the sort editor to change or remove the rules, Add sort at its foot; with none, the fields. Filter (`ToolbarFilterAdd`, `opens="filters"`), lit while the filter differs, opens the view's filters, editable, with Add filter under them, as Sort opens its rules (with no filter, the editor's fields); the bar's + adds one filter to the bar. Under the row the filter bar, a step smaller, holds what changed: it comes while the sort or the filter differs, a filter is held (or one of its parts is open), or a second axis of views stands there, holding the changed sort ("Sorted by", a list with one sort's included: `ToolbarSort`'s `bar`), the filters that aren't the saved view's own (an edited one as edited; each as below, + after the last, no empty Filter) and Clear and Save at its end. Something taken away (a saved rule removed) brings Clear and Save alone. Customize's foot holds Reset and Save too while anything differs, the bar standing or not (on a shared view Customize also carries its dot), as on a phone. Each of the row's Sort and Filter is a panel of its own, apart from the bar's, so a press opens one list. `sortFilter: "bar"` with `bar: "always"` draws the kit arrangement's old form: the row, the views with Customize beside them and the search and New at its end, and under it the filter bar, always shown, a step smaller: the sort pill first, a separator, the filters (`ToolbarFilters`: each filter as its four joined parts, each advanced filter's pill, + after the last; while there is none, Filter, an empty place; the rule held until whole is held by the toolbar, so the bar counts it as it folds; with `filterGroups` false, Filter as before, with what is applied counted), and at its end Clear and Save (`ToolbarSave`) while the list differs: on a shared view (`view`) Clear takes it back and Save, where `canPublish`, keeps it for everyone; with no shared view, Clear alone takes the list back to its default (nothing filtered, the default sort, no group: so a list that starts grouped or filtered shows Clear at once); Customize's foot then draws neither. A row with no room folds as the kit's does (words to icons, the view tabs into "+N", the bar's last filters into "+N filters", then into ⋯: by default Customize and the row's Sort and Filter, whatever is set; in the old form Customize, and the sort and Filter while no filter stands), with no narrow form. On a phone one line in either form (the views, the sort, Filter, the quick filters' button when handed, Customize, then the search, which opens across the line), Clear and Save in Customize's foot (`views.panels.view-clear`, `views.panels.view-save`; with no shared view, Clear alone), and New a round + at the list's foot, lifted by `--vk-toolbar-foot`. `arrangement: "row"` draws the order of 12 Nov instead: the views on the left; search, sort, filter, options and new on the right, the narrow form under 700px, and Reset and Save for everyone in Customize's foot. Every change comes back as a `ListSettingsChange` or a layer patch: its search writes the settings' search, its ✕s clear in one change (`settingsCleared`), and the active view's menu gains "Edit view…" (`withEditView`), which opens Customize. It is a `ListRoot` around `ListToolbar` ([`/list`](./list.md)): its panels' state is held in that root, above its frame, so a change of form keeps a panel open on its page, in a sheet once the form is the phone's. Show counts is the view's: read from `settings.showCounts` for the views row and the quick filters, absent meaning on, it joins Customize's toggles where the views carry counts and is written back through `onChange`. Group steps aside on a board (`groupShown`).
159
159
  - `ReadyToolbarProps` — what `ReadyToolbar` takes.
160
160
  - `ToolbarParts` — `ReadyToolbar`'s and `ListToolbar`'s `toolbarParts`: `(parts: ToolbarPartPlace[], ctx: ToolbarPartsContext) => ToolbarPartPlace[]`, handed the form's parts in the order they are placed and handing back the parts drawn, in their order. The rules and an example are [`/list`'s Parts as data](./list.md#parts-as-data).
161
161
  - `ToolbarPartPlace` — a part's place: `{ key, line, side, words, node?, className?, button?, panel? }`: its public key, its line (`"row"`, `"bar"`, or `"foot"`, New's place at a kit phone list's foot), its side (`"start"` or `"end"`), its words (`"both"`, `"icon"` or `"word"`, its word alone), `node` for a part of your own under a key of your own, and its look: `className`, put on every toolbar button the part draws, and `button`, your own button drawn for each of them in place of your `ToolbarButton`, handed the same props (`ref` included: put it on your button); and `panel` (`ToolbarPanelPlace`), where what it opens hangs at its button. [`/list`'s Parts as data](./list.md#parts-as-data) lists each place's buttons and what stays fixed.
@@ -137,7 +137,7 @@ Every panel's config from one value: a list's `ListSettings` (`viewkitjs/fields/
137
137
 
138
138
  - `settingsPanels` — every panel at once: `filters`, `filterTree` (with `filterGroups` only), `sort`, `sorts` (with `severalSorts` only), `group`, `groupBy` (the grid header's), `layout`, and the two writes a list's body makes, `setLaneVisible` (a board lane shown or hidden) and `setFolded` (the groups the person folded, their layer's).
139
139
  - `SettingsPanels` — what `settingsPanels` returns.
140
- - `SettingsPanelsInput` — what every builder takes: `settings`, `layer`, `columns`, `onChange`, `onLayerChange`, and optionally `defaults` (the reader's), `resolve`, `conventions` (the reader's: the Filter rows' country names read its `language`; `ReadyToolbar` hands the provider's), `layouts` (the layouts the list offers, in order), `boardField` and `calendarField` (the fields a board and a calendar take when the settings name none), `parts` (the same `parts` your grid takes: on the table, the Columns list also lists each part column the view places, "Address · Country", at its place, shown, hidden and moved there as any column; a part column takes no `columnIcon` or `columnSettings`), `rowsShowColumns`, `rowIcon`, `manualOrder` (Sort offers Manual), `severalSorts` (the sort holds up to 3 rules; pass it to every builder call whose `sort` reaches your grid's header, or a header pick there replaces every rule), `filterGroups` (and/or groups, below), `defaultSort`, `sortOptions` and `groupDimensions` (a list's own, until it moves onto its fields), `groupHeads` (the answer's groups), `columnIcon`, `columnSettings` (a column's drill-in beyond Visible: its formats, a lock), `filterData` (what the filter rows offer), `relationFilters` and `goneFields` (the fields the list no longer shows, an archived one say, each `FilterGoneField`: a set-aside filter on one is named by them).
140
+ - `SettingsPanelsInput` — what every builder takes: `settings`, `layer`, `columns`, `onChange`, `onLayerChange`, and optionally `defaults` (the reader's), `resolve`, `conventions` (the reader's: the Filter rows' country names read its `language`; `ReadyToolbar` hands the provider's), `layouts` (the layouts the list offers, in order), `boardField` and `calendarField` (the fields a board and a calendar take when the settings name none), `parts` (the same `parts` your grid takes: on the table, the Columns list also lists each part column the view places, "Address · Country", at its place, shown, hidden and moved there as any column; a part column takes no `columnIcon` or `columnSettings`), `rowsShowColumns`, `rowIcon`, `manualOrder` (Sort offers Manual), `severalSorts` (the sort holds up to 3 rules; pass it to every builder call whose `sort` reaches your grid's header, or a header pick there replaces every rule), `filterGroups` (and/or groups, below), `defaultSort`, `sortOptions` and `groupDimensions` (a list's own, until it moves onto its fields), `groupHeads` (the answer's groups), `columnIcon`, `columnSettings` (a column's drill-in beyond Visible: its formats, a lock), `filterData` (what the filter rows offer), `relationFilters` and `goneFields` (the fields the list no longer shows, an archived one say, each `FilterGoneField`: a set-aside filter on one is named by them), and `person`, `phone` and `barDefault` (Layout's Filter bar and Button words rows, written to the layer's `toolbar`: `person` says which the app turns on, `phone` leaves the Filter bar out, and `barDefault`, `added`, `always` or `button`, is what the bar row reads before the person picks, `button` leaving it out; the list's root hands all three from `personSettings`).
141
141
  - `PanelGroupHead` — one group of the answer, as the Group panel lists it: `key`, `label`, `count`, `hidden`.
142
142
  - `SettingsGroupDimension` — a Group dimension with the `fieldKey` it groups by.
143
143
  - `settingsFilters` — the Filter rows: each column's root rule read from the settings' filter, an edit written back with every group, relation rule and set-aside rule kept; a column with no field is a row a saved list can't filter on.
@@ -32,7 +32,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
32
32
  - `ViewsResolvedComponents` — the map as `useViews()` hands it on: yours, with `Input` always there, your own or the plain one, and `Calendar` always there, yours or a stand-in that throws an error naming the slot when it is reached.
33
33
  - `ViewsButtonProps` — a button: its `children`, `onClick`, `disabled`, a `variant` (`default`, `secondary`, `ghost`, `outline`, `destructive`; `secondary` only for the views picker's chip), a `size` (`default`, `sm`, `icon`), its `type`, a class, `aria-label` and `title`; and a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, which the grid hands its own buttons: forward each to your element; and `aria-disabled`, which a field row's edit target is handed while its write is pending; and `aria-pressed`, `role`, `aria-selected`, `data-state` and `data-vs-row`, which the panels' own buttons are handed (the new-line mark, a view's row in the picker, the views row's chips and a view's ⋯, Export); and `data-key`, which one of a part that repeats, beside its `data-slot`, inside the sort and filter panels under `panelControls`. There a ViewKit part may hand it more props than these (a tooltip's handlers, a `data-*` the panel finds it by again): forward the rest to your element.
34
34
  - `ViewsPopoverProps` — a popover opened at an `anchor`, controlled by `open` and `onOpenChange`, placed by `side`, `align`, `sideOffset` and `alignOffset`; its `label`, where ViewKit names it (a panel's popover under `panelControls`), is its name to a screen reader, your popup's `aria-label`.
35
- - Focus: `initialFocus` false keeps focus where it was when the popup opens, for an editor that focuses its own input (with `preventScroll`). Default true.
35
+ - Focus: `initialFocus` false keeps focus where it was when the popup opens, for an editor that focuses its own input (with `preventScroll`). Default true. `finalFocus` false moves no focus as it closes, for what hands the focus back itself (a field row's editor, to its row): forward it to your popup's return of focus. Default true.
36
36
  - Vetoes: `onOutsidePress` is handed the pointer press, its `target` where it landed, and returns `false` to keep the popup open, also against the focus that press moves; focus leaving by keyboard closes without asking. `onEscape` does the same for Escape.
37
37
  - Look: `chrome` is `panel` (your card popover, the default) or `menu` (your menu panel's surface, for a popover that holds a list: no inset, no card width). `onPanelClick` takes a click inside the popup, `panelData` sets `data-*` attributes on it, and `style` carries what a class cannot say, such as a width that follows a cell.
38
38
  - `ViewsPortsHostProps` — what the components map's `PortsHost` is told: `toast` and `confirm` (which ports the app left out) and `onReady` (hand it the ports once they stand).
@@ -58,12 +58,12 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
58
58
  - `ViewsLinkRole` — `{ value, label, archived? }`: a role a link may hold, as a links body offers it.
59
59
  - `ViewsTextBodyProps` — a whole body for a field typed as one string your app draws: `label`, `kind` (`text`, `url`, `domain`, `email`, `phone` or `rich_text`), `paragraph`, `value` and `onValueChange` (the whole text, every change as it is made), `onDone` (closes as Enter does), `check` (a value's reason, or null), `region` (a phone's country), `typed`, `autoFocus`, `form` (`phone`: draw no ✕, ✓ or Cancel of your own) and `place` (`cell` in a grid cell, `row` in a field row, where it stands in the row's flow; absent, `cell`), and, in the phone's sheet, `onStepChange` (a `ViewsBodyStep` while it stands on a step of its own, `null` once back). The editor keeps the draft, Tab, Escape, ⌘ or Ctrl Enter, the close's tidy, the write check, the save and the phone's ✕ and ✓.
60
60
  - `ViewsNumberBodyProps` — a whole body for a number, money or a percent your app draws: `label`, `kind` (`number`, `money` or `percent`), `value` (a number, `null` empty, `NaN` unreadable) and `onValueChange` (the number and, when it is one of `units`, the unit; every change as it is made), `unit` and `units`, `onDone` (closes as Enter does), `check` (a value's reason, or null), `decimals`, `min`, `max`, `locale`, `decimal`, `empty`, `align`, `typed`, `autoFocus`, `form` (`phone`: draw no ✕, ✓ or Cancel of your own) and, in the phone's sheet, `onStepChange` (a step of its own, money's currencies). The editor keeps the draft, the rounding, Tab, Escape, ⌘ or Ctrl Enter, the write check, the save and the phone's ✕ and ✓.
61
- - `ViewsSortBodyProps` — the sort editor's whole body your app draws: `label`, `options` (the fields it sorts by, each its `value`, `label` and `defaultDir`, and, as the grid's header marks its column, its field's `type`, its `part` and the header's `glyph`), `rules` (in order, the first sorting first), `setAside` (the set-aside sorts, `[]` when none), `max`, `form`, `addSort` (on a computer, Add sort at its foot), `onStepChange` (on a phone: a step of your body's own, its title and Back, `null` once back), `onRulesChange` (the whole rules and, when handed, the set-aside sorts kept; every change as it is made; a list that breaks the rules writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the rules back to what they were as it opened, and ✓). ViewKit keeps the check, the latest rules between renders, the close on the last rule and what ✕ takes back to.
62
- - Its `items` (`ViewsSortEditorItems`, from `menus.sortEditor`, VK-1063): its menus as data, `(items, ctx) => items`, `ctx` a `ViewsSortEditorItemsContext`: `{ menu: "rule", field, index }` (a rule's ⋯; `field` the sort's key) or `{ menu: "aside", field }` (a set-aside rule's ⋯; `field` its stored `fieldKey`), with `form`. `CONTROLS.SortBody` draws what it hands back; a body of your own may honour it.
61
+ - `ViewsSortBodyProps` — the sort editor's whole body your app draws: `label`, `options` (the fields it sorts by, each its `value`, `label` and `defaultDir`, and, as the grid's header marks its column, its field's `type`, its `part` and the header's `glyph`), `rules` (in order, the first sorting first), `setAside` (the set-aside sorts, `[]` when none), `max`, `form`, `addSort` (on a computer, Add sort at its foot), `onStepChange` (on a phone: a step of your body's own, its title and Back, `null` once back), `onRulesChange` (the whole rules and, when handed, the set-aside sorts kept; every change as it is made; a list that breaks the rules writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the rules back to what they were as it opened, and ✓). ViewKit keeps the check, the latest rules between renders, the close on the last rule (unless `empty="editor"`) and what ✕ takes back to. `empty` (VK-1091): `"editor"` where a placed Sort asks a computer's body with no rule to say nothing sorts yet over Add sort (`views.panels.sort-empty`), staying open as its last rule goes; absent, as before.
62
+ - Its `items` (`ViewsSortEditorItems`, from `menus.sortEditor`, VK-1063): its menus as data, `(items, ctx) => items`, `ctx` a `ViewsSortEditorItemsContext`: `{ menu: "rule", field, index }` (a rule's ⋯; `field` the sort's key) or `{ menu: "aside", field }` (a set-aside rule's ⋯; `field` its stored `fieldKey`); and (VK-1065) `{ menu: "row", field, index }` (`place: "bar"` on the filter bar's pill, VK-1107) or `{ menu: "row", field, aside: true }` (the buttons at a rule's end: × `delete` on a computer, ⋯ `more`) or `{ menu: "foot" }` (Add sort and Clear: `add`, `clear`), with `form`. `CONTROLS.SortBody` draws what it hands back; a body of your own may honour it.
63
63
  - `ViewsQuickFiltersBodyProps` — the quick filters' whole body your app draws: `label`, `fields` (each its `key`, `label`, `searchPlaceholder`, its `options` as the quick filter field hands them (each value's mark is its option's), and `values` in the order to show them, each value its key, its words, its `count` where counts show and whether it is `held`; a held value no count lists is among them, drawn from the hold and worded by the config's `heldLabels` else its key; after the fields offered, each other field holding a value, its held values alone), `hold` (each held field once, its values), `several`, `showCounts`, `form`, `onHoldChange` (the whole hold, every change as it is made; one that holds a field twice, more than one value where `several` is false, or a value added on a field the strip doesn't offer writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕, closing it).
64
- - `ViewsFilterBodyProps` — the filter editor's whole body your app draws: `label`, `fields` (the fields a rule may name, `ViewsFilterBodyField`s, each column the list can't filter among them in its place, greyed by its `disabled`), `filter` (the level it is open on, a `FilterGroup`: an advanced filter's group on a computer, the whole filter on a phone), `levels` (how deep its rules may stand, its own the first), `excludable` (whether it may be `not`), `relation` (where the level is a relation's where edited in place: its field key, words and quantifier, and `gone`, why in words, where the list no longer lists the relation: there a level that adds or changes a rule writes nothing), `form`, `onFilterChange` (the whole level and, at a relation, its quantifier; every change as it is made; a level that breaks the rules writes nothing; an empty one on a computer takes its advanced filter away), `ruleValue` (a rule's value in ViewKit's own body for its type, each change handed back as the rule), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the filter back to what it was as it opened, and ✓). ViewKit keeps the check, the Or top's wrap, the pills' keys and what ✕ takes back to.
65
- - Its `items` (`ViewsFilterEditorItems`, from `menus.filterEditor`, VK-1063): its menus as data, `ctx` a `ViewsFilterEditorItemsContext`: `{ menu: "rule" | "aside", field, part?, relation?, path }` (a rule's ⋮ or a set-aside rule's: its `fieldKey`, its part, the relation it stands under) or `{ menu: "group", path }` (a group's actions), each with its `path` in the filter the body is handed (indices through `items` and a relation rule's `where.items`; the whole filter `[]`), with `form`.
66
- - `ViewsFilterBodyField` — a field a filter body's rule may name: `key`, `label`, `fieldKey`, `part`, `type` (its value type, which says its ways), `far` (a relation's fields one level in), `integer` (`true` on a number field that holds whole numbers only: its box takes whole numbers) and `disabled` (on a column the list can't filter, why in words: draw it greyed and never name it in a rule).
64
+ - `ViewsFilterBodyProps` — the filter editor's whole body your app draws: `label`, `fields` (the fields a rule may name, `ViewsFilterBodyField`s, each column the list can't filter among them in its place, greyed by its `disabled`), `filter` (the level it is open on, a `FilterGroup`: an advanced filter's group on a computer, the whole filter on a phone), `levels` (how deep its rules may stand, its own the first), `empty` (VK-1091: `"editor"` where a placed Filter asks a computer's top level with nothing filtered to say so over Add filter, `views.panels.filter-empty`, staying open as its last rule goes; absent, the fields), `excludable` (whether it may be `not`), `relation` (where the level is a relation's where edited in place: its field key, words and quantifier, and `gone`, why in words, where the list no longer lists the relation: there a level that adds or changes a rule writes nothing), `form`, `onFilterChange` (the whole level and, at a relation, its quantifier; every change as it is made; a level that breaks the rules writes nothing; an empty one on a computer takes its advanced filter away), `ruleValue` (a rule's value in ViewKit's own body for its type, each change handed back as the rule), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the filter back to what it was as it opened, and ✓). ViewKit keeps the check, the Or top's wrap, the pills' keys and what ✕ takes back to.
65
+ - Its `items` (`ViewsFilterEditorItems`, from `menus.filterEditor`, VK-1063): its menus as data, `ctx` a `ViewsFilterEditorItemsContext`: `{ menu: "rule" | "aside", field, part?, relation?, path }` (a rule's ⋮ or a set-aside rule's: its `fieldKey`, its part, the relation it stands under) or `{ menu: "group", path }` (a group's actions); and (VK-1065) `{ menu: "row", field, part?, relation?, path, aside? }` (a rule's ⋮, `more`) or `{ menu: "foot", path }` (a foot's buttons: `add`, `clear`, `delete`, `more`), each with its `path` in the filter the body is handed (indices through `items` and a relation rule's `where.items`; the whole filter `[]`), with `form`.
66
+ - `ViewsFilterBodyField` — a field a filter body's rule may name: `key`, `label`, `fieldKey`, `part`, `type` (its value type, which says its ways), `far` (a relation's fields one level in), `integer` (`true` on a number field that holds whole numbers only: its box takes whole numbers), `duration` (`"ms"` or `"s"` on a number kept as a duration, in that unit: its box reads and writes a duration, `1m 30s` or a bare number in seconds, and a rule keeps its bound in that unit) and `disabled` (on a column the list can't filter, why in words: draw it greyed and never name it in a rule).
67
67
  - `ViewsFieldsBodyProps` — the field list's whole body your app draws: `purpose` (`sort` or `filter`), `label`, `search` (its search's words), `fields` (each a `ViewsFieldsBodyField`), `own` (the field being changed; absent where a pick adds), `ownRelation` (for a rule on a related record's field, the relation `own` stands under, its key as `onPick` hands it back), `form`, `onPick` (the key picked, and a far field's key for a far field; a key not handed, or handed `disabled`, writes nothing) and `onDone` (what holds it closes, or on a phone the page turns back).
68
68
  - `ViewsFieldsBodyField` — a field as the field list's body is handed it: `key`, `label`, `type` and `part` (its field's type and the part it reads, as the grid's header reads them), `glyph` (its column's glyph, drawn as the header draws it), `disabled` (why it can't be picked) and, for a filter's relation, `far` (its far fields, one level in).
69
69
  - `ViewsFilterPartBodyProps` — a filter rule's way or value your app draws: `part` (`way` or `value`), `label`, `rule` (the rule as data), `field` (the field it names, a `ViewsFilterBodyField` with no `far`), `relation` (for a far rule, the relation's field key it stands under, as `ruleValue` hands it), `ways` (each its operator and its words), `own` (ViewKit's own value body; null at `way`), `form`, `onRuleChange` (the rule with its new way, written as ViewKit's own writes one, or its new value; another field or part, a way its field doesn't offer or a value its way can't hold writes nothing) and `onDone` (what holds it closes).
@@ -79,9 +79,9 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
79
79
  - `ViewsGroupBodyProps` — the group editor's whole body your app draws: `label`, `dimensions` (each a `ViewsGroupDimension`), `group` (a `ViewsGroupValue`), `manualOrder` (your own order may be picked), `form`, `onGroupChange` (the whole group, every change as it is made; one write for each: a new Group by, order or date step alone, else Hide empty groups, else the groups; a new Group by keeps the order and step handed with it only where the new field offers them; a value that changes two at once, names a field the list doesn't offer, or names an order or step the field grouped by doesn't offer writes nothing), `onDone` (inside Customize, back to its list), `actions` (none inside Customize, whose head holds the ✕) and `onStepChange` (a level of the body's own, Group by's fields or an order's choices, whose name and Back Customize's head shows).
80
80
  - Its `items` (`ViewsGroupEditorItems`, from `menus.groupEditor`, VK-1063): its rows as data, `ctx` a `ViewsGroupEditorItemsContext`: `{ menu: "settings", field? }` (Group by, Order, Direction, Date step, Hide empty groups; `field` the field grouped by) or `{ menu: "foot" }` (Remove grouping), with `form`.
81
81
  - `ViewsSortEditorItems` — the sort editor's menus reshaped (`menus.sortEditor`, VK-1063): `(items: ViewsMenuItem[], ctx: ViewsSortEditorItemsContext) => ViewsMenuItem[]`.
82
- - `ViewsSortEditorItemsContext` — which of the sort editor's menus: `{ menu: "rule", field, index }` or `{ menu: "aside", field }`, with `form`.
82
+ - `ViewsSortEditorItemsContext` — which of the sort editor's menus: `{ menu: "rule", field, index }` or `{ menu: "aside", field }`; or which of its rule ends and its foot (VK-1065): `{ menu: "row", field, index }` (with `place: "bar"`, the rule's pill on the filter bar, VK-1107), `{ menu: "row", field, aside: true }` or `{ menu: "foot" }`; with `form`.
83
83
  - `ViewsFilterEditorItems` — the filter editor's menus reshaped (`menus.filterEditor`): `(items, ctx: ViewsFilterEditorItemsContext) => items`.
84
- - `ViewsFilterEditorItemsContext` — which of the filter editor's menus: `{ menu: "rule" | "aside", field, part?, relation?, path }` or `{ menu: "group", path }`, with `form`.
84
+ - `ViewsFilterEditorItemsContext` — which of the filter editor's menus: `{ menu: "rule" | "aside", field, part?, relation?, path }` or `{ menu: "group", path }`; or which of its rule ends and feet (VK-1065): `{ menu: "row", field, part?, relation?, path, aside? }` or `{ menu: "foot", path }`; with `form`.
85
85
  - `ViewsGroupEditorItems` — the group editor's rows reshaped (`menus.groupEditor`): `(items, ctx: ViewsGroupEditorItemsContext) => items`.
86
86
  - `ViewsGroupEditorItemsContext` — which of the group editor's rows: `{ menu: "settings", field? }` or `{ menu: "foot" }`, with `form`.
87
87
  - `ViewsGroupDimension` — a field a list can be grouped by: `value`, `label`, `orderOptions` (each its mode, words and `defaultDir`), `defaultOrder`, and a date's `granularities` with `defaultGranularity`.
@@ -148,7 +148,7 @@ Guide: [atoms](../guides/atoms.md).
148
148
  The pieces the rendering is built from, and your app's own pieces it cannot draw itself. Each ships as a default, drawn from your app's colours and marked with its own `data-slot`; your app swaps any of them through the provider's `atoms`, and the rest stay the defaults. A swapped atom marks itself as your app does. The [contract](../contract.md) lists their slots and states.
149
149
 
150
150
  - `DEFAULT_VIEWS_ATOMS` — the atoms every app starts with, one default per name of `ViewsAtoms`; the provider lays your `atoms` over it.
151
- - `ViewsAtoms` — the full set, one component per atom: `List`, `Row`, `RowContent` (deprecated, drawn by nothing), `TickBox`, `Avatar`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`, `RelationLink`, `RelationRoles`, `RelationChip`, `CellMore`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu`, and the rows ViewKit's own filter and sort bodies draw, `CheckRow`, `RadioRow`, `DirectionButton`, `MenuRow` and `PanelSearch` (the older panels, `severalSorts: false` or `filterGroups: false`, and the value body a filter rule falls back to), with `ChoiceRow` and `ToggleRow` (deprecated, drawn by nothing), the selection's `SelectionSheet`, the filter panel's month `RangeCalendar`, the views row's `Pill`, and the toolbar's `ToolbarButton`. The provider's `atoms` takes any part of it.
151
+ - `ViewsAtoms` — the full set, one component per atom: `List`, `Row`, `RowContent` (deprecated, drawn by nothing), `TickBox`, `Avatar`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`, `RelationLink`, `RelationRoles`, `RelationChip`, `CellMore`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu`, and the rows ViewKit's own filter and sort bodies draw, `CheckRow`, `RadioRow`, `DirectionButton`, `MenuRow` and `PanelSearch` (the older panels, `severalSorts: false` or `filterGroups: false`, and the value body a filter rule falls back to), with `ChoiceRow` and `ToggleRow` (deprecated, drawn by nothing), the selection's `SelectionSheet`, the filter panel's month `RangeCalendar`, the views row's `Pill`, the toolbar's `ToolbarButton`, and a grid header cell's `HeaderGlyph`, `HeaderSortMark` and `HeaderResizeHandle`. The provider's `atoms` takes any part of it.
152
152
  - `ViewsChoiceRowProps` — deprecated with the `ChoiceRow` atom, which nothing draws; a panel's value row: `label`, a `description` under it, a right-hand `meta` (a sample, a count; a row with one draws no check), `leading`, `trailing`, `selected`, `onClick`, `onMouseDown`, `disabled`, `role` and `aria-selected`.
153
153
  - `ViewsCheckRowProps` — toggles one of many, a tick box on the left: `checked`, `onClick`, its `children`, `leading`, `trailing`, `disabled`.
154
154
  - `ViewsRadioRowProps` — picks one of a set: `selected`, `label`, `onClick`, `leading`, `trailing`, `mark` (`"check"` or `"box"`), `disabled` and the `disabledReason` your `Tooltip` shows, and class hooks for the check and the label.
@@ -157,8 +157,8 @@ The pieces the rendering is built from, and your app's own pieces it cannot draw
157
157
  - `ViewsToggleRowProps` — deprecated with the `ToggleRow` atom, which nothing draws; a boolean flipped in place: `icon`, `label`, `active`, `disabled` and the `disabledReason` your `Tooltip` shows, `onClick`, and `reset` (`{ onReset }`), the way back to the reader's default.
158
158
  - `ViewsPanelSearchProps` — a panel's text box: `value`, `onChange`, `onClear`, `placeholder`, `autoFocus`, `onKeyDown`, `onFocus`, `inputRef`, `leading` (`null` drops the magnifier), `suffix` and `inputMode`.
159
159
  - `ViewsPillProps` — one option of a row of pills: `active`, `variant` (`solid` or `plain`), `size` (`default` or `sm`), `leading` and `leadingSlot`, your own `activeClassName` and `hoverClassName`, `onClick`, `onContextMenu`, `onPointerDown`, `menuOpen` (it opens a menu) and `ref`.
160
- - `ViewsToolbarButtonProps` — a toolbar's button: its `icon`, its `label` (its name, and the word a dress shows unless `word` says another, or `null` for none), a `count` in its corner that becomes a ✕ badge clearing what it counts when handed `onClear`, a `dot` drawn instead of a count, `open`, `changed`, `edge` (the row's outermost button), `disabled`, `size` (`md` or `sm`), `popup` (`menu` or `dialog`, with `aria-expanded` from `open`), `joined` (`start`, `middle` or `end`: one of buttons joined as one, its outer corners alone rounded, `data-joined`), `waits` (its words say what it waits for, in the placeholder's colour, `data-waits`), `part` (which button it is, below), `className` (its toolbar place's class: put it on the button), `onClick`, `onPointerDown` and `ref`; its own words (`children`) keep to one line, cut with "…" where a holder caps its width.
161
- - `ViewsToolbarButtonPart` — which of the toolbar's buttons a `ToolbarButton` stands for, handed as `part` by every button the toolbar draws: named after the `toolbarParts` place it stands in (`options`, `search`, `quick`, `new`, `sort`, `filter`, `filter-add`, `filters`, `advanced-filters`, `sort-pill`), a place's second kind of button by a name of its own (`sort-add`, Sort's +; `more-filters`, "+N filters"), ⋯ `more`, and the frame's parts (`ViewsFramePart`). Which place draws which is [`/list`'s Default keys](./list.md#default-keys). An atom that spreads its leftover props onto its element takes `part` out first.
160
+ - `ViewsToolbarButtonProps` — a toolbar's button: its `icon`, its `label` (its name, and the word a dress shows unless `word` says another, or `null` for none), a `count` in its corner that becomes a ✕ badge clearing what it counts when handed `onClear`, a `dot` drawn instead of a count, `open`, `changed`, `edge` (the row's outermost button), `disabled`, `size` (`md` or `sm`), `popup` (`menu` or `dialog`, with `aria-expanded` from `open`), `expanded` (VK-1091: it shows and hides a part of the page rather than opening a popup, Sort and filter: `aria-expanded` from it), `joined` (`start`, `middle` or `end`: one of buttons joined as one, its outer corners alone rounded, `data-joined`), `waits` (its words say what it waits for, in the placeholder's colour, `data-waits`), `part` (which button it is, below), `className` (its toolbar place's class: put it on the button), `onClick`, `onPointerDown` and `ref`; its own words (`children`) keep to one line, cut with "…" where a holder caps its width.
161
+ - `ViewsToolbarButtonPart` — which of the toolbar's buttons a `ToolbarButton` stands for, handed as `part` by every button the toolbar draws: named after the `toolbarParts` place it stands in (`options`, `search`, `quick`, `new`, `sort`, `filter`, `filter-add`, `filters`, `advanced-filters`, `sort-pill`), a place's second kind of button by a name of its own (`sort-add`, Sort's +; `more-filters`, "+N filters"), ⋯ `more`, a placed Sort and filter `sort-filter` (VK-1091), and the frame's parts (`ViewsFramePart`). Which place draws which is [`/list`'s Default keys](./list.md#default-keys). An atom that spreads its leftover props onto its element takes `part` and `expanded` out first.
162
162
  - `ViewsFramePart` — the six a `ToolbarButton` is handed only where your own toolbar frame draws them: `views-chip`, `views-tab`, `views-more`, `views-add`, `clear` or `save`, with `current` (a view tab; `true`, the open one) and `onContextMenu` (a tab's verbs); draw each as its `data-slot` (`vk-views-chip`, `vk-views-tab`, `vk-views-more`, `vk-views-add`, `vk-toolbar-clear`, `vk-toolbar-save-button`). Dress by these, not by any `part`: `if (part && FRAME.has(part))`.
163
163
  - `ViewsListProps` — the rows' container, the inset a run of rows sits in inside a panel or a command list's group: its `children` and a class.
164
164
  - `ViewsRowContentProps` — a row's inside, what `ViewsRowProps` is built on (the `RowContent` atom that took it alone is deprecated).
@@ -181,6 +181,9 @@ The pieces the rendering is built from, and your app's own pieces it cannot draw
181
181
  - `ViewsRelationRolesProps` — a link's roles, drawn inside its chip after the record's name, on a `many` relation that declares `links`: the `relation` value and its `roles` in order, each its stored `value` and its `label` (the field's, else the value). Handed only when the link holds one or more. The default draws the labels in the subtle colour after a middle dot, cut before the name in a narrow cell, and names the record and every role on hover.
182
182
  - `ViewsRelationChipProps` — a mentioned record (VK-1053), drawn where the provider's `panelControls` names `RelationChip`: every relation ViewKit draws, in a table's cell (one and many, and the +N list), a field row's value, `renderFieldValue` (a highlight) and a user field's chip. ViewKit places a mentioned record and hands its data; your app draws it. It is handed `relation` (`id`, `label`, `entity`, `avatarUrl`), `roles` (each its `value` and `label`; none but on a `many` relation that declares `links`), `size` (`chip` in a cell or a highlight, `row` in a field row), `render`, the host's link where it has one, and `fallback`, ViewKit's own chip as it would draw it there. The default draws its `fallback`.
183
183
  - `ViewsRelationChipLinkProps` — what a mentioned record hands the host's link it draws itself through (`render`): its own element's props, its words and mark as `children`, its class, its `data-*`, its ref. The host's link draws its own element with them: a cell whose host opens its relations a bare `<button data-slot="vk-relation-link" data-no-nav>` whose press opens the record, the app's `RelationLink` or a host's `relationWrap` around a `<span>` holding them.
184
+ - `ViewsHeaderGlyphProps` — a grid header cell's type glyph, the `HeaderGlyph` atom: `columnId`, `type` (its list type, where it has one), `fieldKey` (the field it draws, where it draws one), `fallback` (ViewKit's own glyph for the column, null where it has none; the default draws it) and `className` (what ViewKit's own draws with: its size, `--vk-head-glyph`, its colour and its opacity).
185
+ - `ViewsHeaderSortMarkProps` — a sorted column's mark in its header, the `HeaderSortMark` atom, drawn where the grid's `sortMark` is on inside ViewKit's `aria-hidden` box: `columnId`, `dir` (`asc` or `desc`) and `className`; the default draws `icons.sortAsc` or `icons.sortDesc`.
186
+ - `ViewsHeaderResizeHandleProps` — what a header cell's resize handle shows, the `HeaderResizeHandle` atom, inside ViewKit's grab zone (`vk-grid-resize-handle`), which keeps the press, the drag and the double-click's reset: `columnId` and `active`, true while the column is resized; the default is a hairline in `--vk-brand`.
184
187
  - `ViewsCellMoreProps` — the count after a cell's shown values: `count`, how many are not shown, and `inert`, true where the host owns the click (the count is plain text, and nothing opens). Drawn inside `data-slot="vk-cell-more"`, a button that opens the whole list. The default, `DefaultCellMore`, draws "+" and the number, and ViewKit keeps its own frame on that element only for it; yours draws inside a bare button (or span), so a count tag of yours stands there alone.
185
188
  - `ViewsLoadingProps` — a wait: `placement` `body` (the whole list reloading) or `footer` (more rows arriving), and the `label` read to assistive technology. The default is a plain ring, larger in the body.
186
189
  - `ViewsLoadMoreProps` — how a list asks for its next page once its end comes near: `onReveal`, and an optional `label` drawn while it waits. The default watches a sentinel past the last row, calls `onReveal` as it comes within 600px of the end of what it scrolls in (the grid's own scroll area, else the viewport), and draws your `Loading` (or the label) meanwhile.
@@ -94,7 +94,7 @@ A column is plain data: what a list shows in one place for every row, how it rea
94
94
  - `ListRelationValue` — one relation value, already resolved by your host: the contract's `RelationValue` (`id` compared and committed but never shown, `label` shown, sorted and copied, `entity` handed back when the chip is opened, `avatarUrl`) plus an optional per-value `icon`, for a column whose rows point at different kinds. The grid never turns an id into a label itself.
95
95
  - `ListCellAction` — a button drawn in a cell: its `id`, an `icon` for the row, and optionally a `label`, an `onClick` handed the row and the click, and a `status` slot that tints it.
96
96
  - `ListCardZone` — where a column lands on a card: `title`, `chips`, `figures`, `footer` or `body`. The board's type defaults decide it for almost every column; `card.zone` overrides it. `body` is prose, never a default, and draws only on a card laid out roomy enough for a sentence.
97
- - `ListAggregateKind` — a footer figure: `none`, `sum`, `avg`, `min`, `max`, `count`, `filled`, `unique` or `ratio`. `ratio` is sum over sum as a percent, offered only by a column that carries `ratio`.
97
+ - `ListAggregateKind` — a footer figure: `none`, `sum`, `avg`, `min`, `max`, `count`, `filled`, `empty`, `percentEmpty`, `percentFilled`, `unique` or `ratio`. `ratio` is sum over sum as a percent, offered only by a column that carries `ratio`.
98
98
 
99
99
  ## A column from a field binding
100
100
 
@@ -128,7 +128,7 @@ What the machinery may do with each column type, declared once per type so a new
128
128
  - `typeRule` — the rule for a type, or `null` for a column that declares no type.
129
129
  - `GridEditorId` — which editor a writable column mounts when clicked, Entered or typed into: `text`, `select`, `number`, `date`, `relation`, `chips`, `range`, `name`, `values` (several emails, phones, links or domains, each with its label and a main one) or `place` (the country first, then its parts).
130
130
  - `ListFilterEditor` — which editor a column opens in the filter panel: `options`, `text`, `number`, `date`, `boolean`, `range`, or `none` (listed, opens nothing).
131
- - `GridPasteKind` — how a pasted clipboard cell becomes a commit: `text`, `option` (the pasted text matched against an offered option's label or key, exact before ignoring case, an in-grid copy landing on the exact option it copied, a label two options share refused), `number`, `date` (a day; a date and time with an offset or `Z` is the instant it names, one with none the wall clock in the conventions' `timeZone`, as typed, a day alone that zone's first instant, a time the zone skips or a day that doesn't exist refused), `boolean`, `relation` (the pasted label matched against the candidates, committing the id; on a relation of several, a copy of a relation cell lands its links whole, and text names records by their labels between commas, the set replacing the cell's links, a label no candidate has refused by name), `list` (the text split into several values, each read as an `option` is on a column of options), `range` (an in-grid pair, a band's name in any case, a name two bands share refused, or text read as a range is written: "11–50", "10,001+", "up to 50"), or `none` (the type refuses paste).
131
+ - `GridPasteKind` — how a pasted clipboard cell becomes a commit: `text`, `option` (the pasted text matched against an offered option's label or key, exact before ignoring case, an in-grid copy landing on the key it copied only where this column's option with that key carries the copied label, else read by its label, a label two options share refused), `number`, `date` (a day; a date and time with an offset or `Z` is the instant it names, one with none the wall clock in the conventions' `timeZone`, as typed, a day alone that zone's first instant, a time the zone skips or a day that doesn't exist refused), `boolean`, `relation` (the pasted label matched against the candidates, committing the id; on a relation of several, a copy of a relation cell lands its links whole, and text names records by their labels between commas, the set replacing the cell's links, a label no candidate has refused by name), `list` (an in-grid copy's list landing whole where its items are this column's keys and their labels are the copied text; else, on a column of options, the whole text as one option, then the column's labels, longest first, wherever one stands up to a comma, then the rest split on commas, each read as an `option` is; on a column with no options, the text split on commas), `range` (an in-grid pair, a band's name in any case, a name two bands share refused, or text read as a range is written: "11–50", "10,001+", "up to 50"), or `none` (the type refuses paste).
132
132
  - `GridValueKind` — what a written value must look like for a type: `any`, `email`, `url`, `boolean`, `relation` or `list`. `gridNormalizeWrite` holds a value to it.
133
133
  - `gridPasteKind` — how a paste becomes this column's value. A `multiple` column pastes as a `list` when it presents a field of a type that keeps several values, and takes no paste otherwise; any other column answers with its type's rule. Returns `null` for a column with no type.
134
134
  - `gridRelationSource` — the candidates the relation picker offers for a column: its `relation.source`, or a static list of its `relation.options`. Given an `entityIcon` resolver, each candidate without an icon of its own wears its kind's glyph, both in a static list and in each page a remote search returns; without one, the candidates come back untouched.
@@ -599,10 +599,12 @@ Guide: [the grid](../guides/the-grid.md).
599
599
 
600
600
  A column's footer shows one figure, the pick the reader made from the ones the column offers. A list whose rows come a page at a time (a source list) has its figures counted by the database instead; `SourcedAggregates` tells these functions which ones it answered.
601
601
 
602
- - `aggregateLabel` — a pick's name, through `views.grid.figure`. Messages default to `resolveViewsMessage`.
603
- - `aggregateOptions` — the picks a column offers, `none` first. A numeric column offers sum, average, min, max and count; a percent never sums, and offers ratio only when the column carries its two parts; any other column offers count, filled and unique. On a source list it offers what the database can answer: count everywhere, the numeric picks where it can total the column, and filled on any other column whose figure carries `filled`. A column that names its picks (`footerKinds`) offers only those.
604
- - `resolveAggregateKind` — the pick a column's footer shows: the reader's, when the column offers it; else ratio for a ratio column; else the column's declared default, when offered (on a source list, only when the database totalled it); else `none`.
605
- - `computeAggregate` — a pick's figure over the rows in hand, or `null` for nothing to show. Count is the rows; filled and unique read a place, a name and a phone by their text, a range by its two ends, a person, a related record or an actor by its key, and several values as a set; ratio is sum over sum as a whole percent, `null` on an empty denominator; the numeric picks skip blanks and are `null` over no values.
602
+ - `aggregateLabel` — a pick's name, a row of the footer's picker ("Count empty"), through `views.grid.figure`. Messages default to `resolveViewsMessage`.
603
+ - `aggregateWord` — a pick's word after its value in the footer ("count", "empty"), through `views.grid.figure-word`.
604
+ - `AggregatePlace` — where a column stands in the footer, `{ first }`: the first (visible) column offers Count alone.
605
+ - `aggregateOptions` — the picks a column offers, `none` first, its place third (`AggregatePlace`). The first column offers count alone. Every other offers empty, filled, percentEmpty and percentFilled; a numeric column adds sum, average, min and max after them; a percent never sums, and offers ratio, right after none, only when the column carries its two parts. On a source list it offers what the database can answer: the four counts on a column bound to a field (a pick asks for its key) or whose figure carries `filled`, the numeric picks where it can total the column; never unique. A column that names its picks (`footerKinds`) offers only those.
606
+ - `resolveAggregateKind` — the pick a column's footer shows, its place fourth: the reader's, when the column offers it (a saved pick it no longer offers reads none and stays saved); else ratio for a ratio column; else the column's declared default, when offered (on a source list, a default other than count only when the database totalled it); else `none`.
607
+ - `computeAggregate` — a pick's figure over the rows in hand, or `null` for nothing to show. Count is the rows; empty is the rows not filled, and percentEmpty and percentFilled each as a whole percent of the rows (`null` over none); filled and unique read a place, a name and a phone by their text, a range by its two ends, a person, a related record or an actor by its key, and several values as a set; ratio is sum over sum as a whole percent, `null` on an empty denominator; the numeric picks skip blanks and are `null` over no values.
606
608
  - `MoneyTotal` — one money figure and its currency code, `{ amount, code }`.
607
609
  - `moneyTotal` — one figure for a money column, never one per currency. A column read in a currency totals in it; a column read in its original currencies totals each row converted into the reader's default currency. Returns `null` for a column whose rows keep their own currency with no rates to convert them, and `undefined` for a column that is not money or a pick that is not numeric (that one is `computeAggregate`'s).
608
610
  - `moneyFigureCode` — the currency a money column's database figure is drawn in: the reader's default under the original currencies, else the column's code (`undefined` when it has no single one), `null` for a column nothing can convert.
@@ -635,7 +637,7 @@ A source list holds a page, not the list, so its footer and its group headers re
635
637
  - `EMPTY_FIGURE` — the figure of no values: count 0, the rest `null`.
636
638
  - `combineFigure` — two parts' figures as the figure of both. A `null` is a value absent, never a zero.
637
639
  - `figureOf` — the figure of some numbers, a blank or `NaN` not counted.
638
- - `figureFor` — the number a pick shows for one key, or `null`: count is the group's rows, filled the values present, sum, average, min and max `null` over no values. Unique and ratio are not the database's to answer, and give `null`.
640
+ - `figureFor` — the number a pick shows for one key, or `null`: count is the group's rows, filled the values present, empty the rows less `filled`, and percentEmpty and percentFilled that count over the rows, whole (none of the three from an answer that carries no `filled`), sum, average, min and max `null` over no values. Unique and ratio are not the database's to answer, and give `null`.
639
641
  - `ratioFigure` — a ratio column's figure from its two parts' keys: sum over sum as a whole percent, `null` when either part was not totalled or the denominator is empty.
640
642
  - `isGroupFigures` — says whether a value has the shape of `GroupFigures`.
641
643
 
@@ -80,7 +80,8 @@ typed catalog can overflow TypeScript) and read each key without its `views.` pr
80
80
  `(m) => { const key = m.key.slice("views.".length); return t.has(key) ? t(key, "values" in m ? m.values : undefined) : resolveViewsMessage(m); }`.
81
81
 
82
82
  The atoms — `List`, `Row`, `TickBox`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`,
83
- `RelationLink`, `RelationRoles`, `RelationChip`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu` — ship as defaults drawn from your theme. Swap any of them through `atoms` so the views wear
83
+ `RelationLink`, `RelationRoles`, `RelationChip`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu`, and a grid header cell's
84
+ `HeaderGlyph`, `HeaderSortMark` and `HeaderResizeHandle` — ship as defaults drawn from your theme. Swap any of them through `atoms` so the views wear
84
85
  your own menus and pills. `CommandMenu`, `RowMenu` and `RelationLink` are your app's own pieces — the verb menu a
85
86
  command cell opens, the row's right-click menu, and where a relation chip goes; their defaults are the map's menu,
86
87
  the map's menu at the pointer (its Delete asks the `confirm` port: ViewKit's alert dialog when you hand none and spread `CONTROLS`, else the browser's own confirm), and a chip that goes nowhere. `Loading` and `LoadMore` are your waits — the list reloading, and how it asks for more rows; their
@@ -1,10 +0,0 @@
1
- import { type PieceLooks } from "../../looks/looks.js";
2
- export type SettingRowOptionId = "card" | "rows" | "end" | "fields" | "icon";
3
- /** One value for every option. */
4
- export type SettingRowPicks = Record<SettingRowOptionId, string>;
5
- /** The setting row's options and looks. */
6
- export declare const SETTING_ROW_LOOKS: PieceLooks<SettingRowOptionId>;
7
- /** The options worn round `el`, each from the nearest frame that picks it; outside any frame, or a value it lacks, its default. */
8
- export declare function settingRowWornOf(el: Element | null): SettingRowPicks;
9
- /** The attributes the setting rows' options are set by. */
10
- export declare const SETTING_ROW_ATTRS: string[];
@@ -1,22 +0,0 @@
1
- import { lookWornOf } from "../../looks/looks.js";
2
- const OUTRIGHT = { card: "outlined", rows: "snug", end: "buttons", fields: "boxes", icon: "line" };
3
- const ATTIO = { card: "raised", rows: "roomy", end: "buttons", fields: "boxes", icon: "line" };
4
- const LINEAR = { card: "edged", rows: "inset", end: "words", fields: "end", icon: "line" };
5
- const options = [
6
- { id: "card", name: "Card", device: "desktop", def: ATTIO.card, values: [{ id: "outlined", name: "Outlined" }, { id: "raised", name: "Raised" }, { id: "edged", name: "Edged" }] },
7
- { id: "rows", name: "Rows", device: "desktop", def: ATTIO.rows, values: [{ id: "snug", name: "Snug" }, { id: "roomy", name: "Roomy" }, { id: "inset", name: "Inset" }] },
8
- { id: "end", name: "End", device: "desktop", def: ATTIO.end, values: [{ id: "buttons", name: "Buttons" }, { id: "words", name: "Words" }] },
9
- { id: "fields", name: "Fields", device: "desktop", def: ATTIO.fields, values: [{ id: "boxes", name: "Boxes" }, { id: "end", name: "At the end" }] },
10
- { id: "icon", name: "Icon", device: "phone", def: ATTIO.icon, values: [{ id: "line", name: "Line" }, { id: "tile", name: "Tile" }] },
11
- ];
12
- const looks = [
13
- { id: "outright", name: "Outright", picks: OUTRIGHT },
14
- { id: "attio", name: "Attio", picks: ATTIO },
15
- { id: "linear", name: "Linear", picks: LINEAR },
16
- ];
17
- export const SETTING_ROW_LOOKS = { id: "setting-row", name: "Setting row", options, looks };
18
- const IDS = options.map((o) => o.id);
19
- export function settingRowWornOf(el) {
20
- return lookWornOf(SETTING_ROW_LOOKS, el, IDS);
21
- }
22
- export const SETTING_ROW_ATTRS = IDS.map((id) => `data-setting-row-${id}`);
@@ -1,102 +0,0 @@
1
- import * as React from "react";
2
- import type { OptionColour } from "../option/looks.js";
3
- import { type SelectListProps } from "../select/select.js";
4
- import { type SwitchProps } from "../switch/switch.js";
5
- import { type SettingRowPicks } from "./looks.js";
6
- /** A setting row's button: its words, an icon before them, what a press does. */
7
- export interface SettingAction {
8
- label: string;
9
- icon?: React.ReactNode;
10
- onClick?: () => void;
11
- disabled?: boolean;
12
- /** Its icon alone, its label naming it (a pencil for Change). */
13
- iconOnly?: boolean;
14
- /** The Button's kind: danger where it can't be undone, outline where it can (Leave); left out, danger in the danger zone,
15
- * outline elsewhere. */
16
- kind?: "outline" | "danger";
17
- }
18
- /** A word of state before a row's control: what is true now (Connected), in a value's colour. */
19
- export interface SettingState {
20
- label: string;
21
- colour?: OptionColour;
22
- }
23
- interface SettingRowBase {
24
- /** The setting's name ("Weekly digest"). */
25
- label: React.ReactNode;
26
- /** The line under its name: what it does. */
27
- note?: React.ReactNode;
28
- /** An icon at the row's start: on a computer in a 32 box; on a phone a line icon, or a tile under the Icon option's Tile. */
29
- icon?: React.ReactNode;
30
- /** The tile's colour under the Icon option's Tile, a label colour (the palette's 700s); left out, grey. Line ignores it. */
31
- colour?: OptionColour;
32
- /** A mark at the row's start, as given (Google's, a team's letter). */
33
- mark?: React.ReactNode;
34
- /** Why it can't change: its control is shut, and this stands before it. On a phone the row fades and the reason stands in
35
- * place of its line; a page that puts the reason in its group's note passes `true`. */
36
- locked?: React.ReactNode;
37
- /** A word of state: on a computer before its control, the Option in its colour (Connected, green); on a phone the grey
38
- * value before ›, the row then the press of its action. */
39
- state?: SettingState;
40
- /** A lone row: one action on its own; on a computer bare, with no card; on a phone a card of its own, the row the press. */
41
- alone?: boolean;
42
- className?: string;
43
- }
44
- type No<K extends string> = {
45
- [P in K]?: never;
46
- };
47
- export type SettingRowProps = SettingRowBase & (({
48
- switch: Omit<SwitchProps, "locked">;
49
- } & No<"select" | "action" | "onOpen" | "value">) | ({
50
- select: Omit<SelectListProps, "label" | "size">;
51
- } & No<"switch" | "action" | "onOpen" | "value">) | ({
52
- action: SettingAction; /** On a computer, a value before its action, as the open kind's (an email before Change). */
53
- value?: React.ReactNode;
54
- } & No<"switch" | "select" | "onOpen">) | ({
55
- onOpen: () => void;
56
- value?: React.ReactNode;
57
- } & No<"switch" | "select" | "action">)
58
- /** The plain kind (VK-1036): no control and no ›, a row that only says, opening nothing. */
59
- | No<"switch" | "select" | "action" | "onOpen" | "value">);
60
- export interface SettingRowsProps {
61
- /** The danger zone's: a red edge, each row's button the Button's danger kind unless its action says outline, on a phone its
62
- * names red. */
63
- danger?: boolean;
64
- /** Its form: the device's unless told (a PhoneHost screen, or below the app's line, is a phone's). */
65
- form?: "computer" | "phone";
66
- className?: string;
67
- children: React.ReactNode;
68
- }
69
- /** The setting row's options as the frame round `el` picks them, kept up to date as they change; each its default for `null`. */
70
- export declare function useSettingRowWorn(el: Element | null): SettingRowPicks;
71
- /** True for a part placed in a computer's SettingRows whose Fields option is At the end: it draws as one of the card's rows (a
72
- * Field, the kit's photo). */
73
- export declare function useSettingRowsRow(): boolean;
74
- /** The icon at a row's start, or beside a list's name: Line or Tile by the Icon option, the tile on `colour`. */
75
- export declare function SettingIcon({ colour, children }: {
76
- colour?: OptionColour;
77
- children: React.ReactNode;
78
- }): import("react/jsx-runtime").JSX.Element;
79
- /** iOS's ›, 9 × 15, at a phone row's end: the setting row's, drawn by a list beside setting rows too (the kit's settings list, an
80
- * app's own row), so one › stands on every settings page. */
81
- export declare function SettingChevron(): import("react/jsx-runtime").JSX.Element;
82
- /** Settings rows in a card, a line between each; `danger` the danger zone's. On a phone, Field rows' card: a Field placed in it
83
- * is its row, beside the setting rows, its note and error under the card (VK-979). */
84
- export declare function SettingRows({ danger, form, className, children }: SettingRowsProps): import("react/jsx-runtime").JSX.Element;
85
- /** One setting as a row: its name and its line, its control at its end. What it holds is no row of its card: a Field its control
86
- * draws (a Select with a note) stands as it does anywhere else. */
87
- export declare function SettingRow(props: SettingRowProps): import("react/jsx-runtime").JSX.Element;
88
- /** A setting with a switch: the setting row's switch kind, only its Switch switching it. */
89
- export interface SwitchRowProps extends SwitchProps {
90
- /** The setting's name ("Daily summary"), not the action. */
91
- label: React.ReactNode;
92
- /** A line under it: what it does, or why it is locked. */
93
- note?: React.ReactNode;
94
- }
95
- /** A setting in a settings list: its name and a line on the left, the switch on the right, which alone switches it. */
96
- export declare function SwitchRow({ label, note, locked, ...props }: SwitchRowProps): import("react/jsx-runtime").JSX.Element;
97
- /** Settings rows in a bordered box, a line between each: the setting rows' card in its computer form on every device. */
98
- export declare function SwitchRows({ className, children }: {
99
- className?: string;
100
- children: React.ReactNode;
101
- }): import("react/jsx-runtime").JSX.Element;
102
- export {};