viewkitjs 0.26.0 → 0.28.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 (294) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/MIGRATION.md +122 -7
  3. package/package.json +1 -1
  4. package/views/dist/cells/cell-format.d.ts +3 -1
  5. package/views/dist/cells/cell-format.js +2 -2
  6. package/views/dist/cells/use-cell-format.d.ts +8 -1
  7. package/views/dist/cells/use-cell-format.js +13 -2
  8. package/views/dist/contract.d.ts +240 -3
  9. package/views/dist/contract.js +238 -0
  10. package/views/dist/controls/alert/alert.d.ts +46 -0
  11. package/views/dist/controls/alert/alert.js +11 -0
  12. package/views/dist/controls/alert/looks.d.ts +4 -0
  13. package/views/dist/controls/alert/looks.js +19 -0
  14. package/views/dist/controls/alert/tokens.d.ts +92 -0
  15. package/views/dist/controls/alert/tokens.js +25 -0
  16. package/views/dist/controls/alert-dialog/alert-dialog.d.ts +50 -0
  17. package/views/dist/controls/alert-dialog/alert-dialog.js +67 -0
  18. package/views/dist/controls/alert-dialog/confirm.d.ts +13 -0
  19. package/views/dist/controls/alert-dialog/confirm.js +11 -0
  20. package/views/dist/controls/alert-dialog/looks.d.ts +4 -0
  21. package/views/dist/controls/alert-dialog/looks.js +17 -0
  22. package/views/dist/controls/alert-dialog/tokens.d.ts +119 -0
  23. package/views/dist/controls/alert-dialog/tokens.js +32 -0
  24. package/views/dist/controls/alert-dialog.css +95 -0
  25. package/views/dist/controls/alert.css +51 -0
  26. package/views/dist/controls/collapsible/collapsible.d.ts +39 -0
  27. package/views/dist/controls/collapsible/collapsible.js +18 -0
  28. package/views/dist/controls/collapsible/looks.d.ts +4 -0
  29. package/views/dist/controls/collapsible/looks.js +5 -0
  30. package/views/dist/controls/collapsible/map-collapse.d.ts +2 -0
  31. package/views/dist/controls/collapsible/map-collapse.js +6 -0
  32. package/views/dist/controls/collapsible/tokens.d.ts +68 -0
  33. package/views/dist/controls/collapsible/tokens.js +19 -0
  34. package/views/dist/controls/collapsible.css +83 -0
  35. package/views/dist/controls/compound-editor/map-parts-body.js +2 -1
  36. package/views/dist/controls/compound-editor/name-parts.js +10 -2
  37. package/views/dist/controls/compound-editor/place-parts.js +5 -1
  38. package/views/dist/controls/compound-editor/place.d.ts +2 -1
  39. package/views/dist/controls/compound-editor/place.js +2 -0
  40. package/views/dist/controls/controls.d.ts +17 -0
  41. package/views/dist/controls/controls.js +17 -0
  42. package/views/dist/controls/date-editor/date-editor.d.ts +2 -1
  43. package/views/dist/controls/date-editor/map-calendar.js +3 -1
  44. package/views/dist/controls/filter-editor/filter-editor.d.ts +56 -0
  45. package/views/dist/controls/filter-editor/filter-editor.js +208 -0
  46. package/views/dist/controls/filter-editor/how.d.ts +23 -0
  47. package/views/dist/controls/filter-editor/how.js +13 -0
  48. package/views/dist/controls/filter-editor/map-filter-body.d.ts +18 -0
  49. package/views/dist/controls/filter-editor/map-filter-body.js +164 -0
  50. package/views/dist/controls/filter-editor/map-rules.d.ts +85 -0
  51. package/views/dist/controls/filter-editor/map-rules.js +273 -0
  52. package/views/dist/controls/filter-editor/parts.d.ts +46 -0
  53. package/views/dist/controls/filter-editor/parts.js +75 -0
  54. package/views/dist/controls/filter-editor/rules.d.ts +104 -0
  55. package/views/dist/controls/filter-editor/rules.js +148 -0
  56. package/views/dist/controls/filter-editor/tokens.d.ts +83 -0
  57. package/views/dist/controls/filter-editor/tokens.js +23 -0
  58. package/views/dist/controls/filter-editor/words.d.ts +59 -0
  59. package/views/dist/controls/filter-editor/words.js +40 -0
  60. package/views/dist/controls/filter-editor.css +124 -0
  61. package/views/dist/controls/group-editor/group-editor.d.ts +56 -0
  62. package/views/dist/controls/group-editor/group-editor.js +126 -0
  63. package/views/dist/controls/group-editor/map-group-body.d.ts +19 -0
  64. package/views/dist/controls/group-editor/map-group-body.js +106 -0
  65. package/views/dist/controls/group-editor/rules.d.ts +48 -0
  66. package/views/dist/controls/group-editor/rules.js +41 -0
  67. package/views/dist/controls/group-editor/tokens.d.ts +15 -0
  68. package/views/dist/controls/group-editor/tokens.js +6 -0
  69. package/views/dist/controls/group-editor/words.d.ts +39 -0
  70. package/views/dist/controls/group-editor/words.js +21 -0
  71. package/views/dist/controls/group-editor.css +20 -0
  72. package/views/dist/controls/index.d.ts +35 -1
  73. package/views/dist/controls/index.js +35 -1
  74. package/views/dist/controls/internal/editor-parts.d.ts +47 -0
  75. package/views/dist/controls/internal/editor-parts.js +48 -0
  76. package/views/dist/controls/internal/step-return.d.ts +9 -0
  77. package/views/dist/controls/internal/step-return.js +27 -0
  78. package/views/dist/controls/links-editor/links-editor.d.ts +80 -0
  79. package/views/dist/controls/links-editor/links-editor.js +329 -0
  80. package/views/dist/controls/links-editor/links.d.ts +62 -0
  81. package/views/dist/controls/links-editor/links.js +50 -0
  82. package/views/dist/controls/links-editor/map-links-body.d.ts +10 -0
  83. package/views/dist/controls/links-editor/map-links-body.js +74 -0
  84. package/views/dist/controls/links-editor/tokens.d.ts +71 -0
  85. package/views/dist/controls/links-editor/tokens.js +20 -0
  86. package/views/dist/controls/links-editor/words.d.ts +56 -0
  87. package/views/dist/controls/links-editor/words.js +33 -0
  88. package/views/dist/controls/links-editor.css +132 -0
  89. package/views/dist/controls/menu-list/menu-list.d.ts +17 -2
  90. package/views/dist/controls/menu-list/menu-list.js +25 -16
  91. package/views/dist/controls/modal/looks.d.ts +4 -0
  92. package/views/dist/controls/modal/looks.js +25 -0
  93. package/views/dist/controls/modal/modal.d.ts +69 -0
  94. package/views/dist/controls/modal/modal.js +62 -0
  95. package/views/dist/controls/modal/tokens.d.ts +192 -0
  96. package/views/dist/controls/modal/tokens.js +50 -0
  97. package/views/dist/controls/modal.css +130 -0
  98. package/views/dist/controls/notice/notice.d.ts +49 -0
  99. package/views/dist/controls/notice/notice.js +35 -0
  100. package/views/dist/controls/notice/tokens.d.ts +99 -0
  101. package/views/dist/controls/notice/tokens.js +27 -0
  102. package/views/dist/controls/notice.css +100 -0
  103. package/views/dist/controls/number-editor/format.d.ts +31 -0
  104. package/views/dist/controls/number-editor/format.js +79 -0
  105. package/views/dist/controls/number-editor/looks.d.ts +14 -0
  106. package/views/dist/controls/number-editor/looks.js +17 -0
  107. package/views/dist/controls/number-editor/map-number-body.d.ts +16 -0
  108. package/views/dist/controls/number-editor/map-number-body.js +57 -0
  109. package/views/dist/controls/number-editor/number-editor.d.ts +72 -0
  110. package/views/dist/controls/number-editor/number-editor.js +202 -0
  111. package/views/dist/controls/number-editor/tokens.d.ts +28 -0
  112. package/views/dist/controls/number-editor/tokens.js +9 -0
  113. package/views/dist/controls/number-editor/words.d.ts +23 -0
  114. package/views/dist/controls/number-editor/words.js +13 -0
  115. package/views/dist/controls/number-editor.css +37 -0
  116. package/views/dist/controls/number-field/number-field.js +57 -5
  117. package/views/dist/controls/pane/looks.d.ts +4 -0
  118. package/views/dist/controls/pane/looks.js +11 -0
  119. package/views/dist/controls/pane/pane.d.ts +63 -0
  120. package/views/dist/controls/pane/pane.js +98 -0
  121. package/views/dist/controls/pane/state.d.ts +14 -0
  122. package/views/dist/controls/pane/state.js +7 -0
  123. package/views/dist/controls/pane/tokens.d.ts +79 -0
  124. package/views/dist/controls/pane/tokens.js +22 -0
  125. package/views/dist/controls/pane.css +104 -0
  126. package/views/dist/controls/picker/rows.d.ts +4 -2
  127. package/views/dist/controls/picker/rows.js +4 -3
  128. package/views/dist/controls/radio/radio.d.ts +33 -0
  129. package/views/dist/controls/radio/radio.js +19 -0
  130. package/views/dist/controls/radio/tokens.d.ts +127 -0
  131. package/views/dist/controls/radio/tokens.js +34 -0
  132. package/views/dist/controls/radio.css +104 -0
  133. package/views/dist/controls/sort-editor/map-sort-body.d.ts +9 -0
  134. package/views/dist/controls/sort-editor/map-sort-body.js +81 -0
  135. package/views/dist/controls/sort-editor/rules.d.ts +48 -0
  136. package/views/dist/controls/sort-editor/rules.js +24 -0
  137. package/views/dist/controls/sort-editor/sort-editor.d.ts +58 -0
  138. package/views/dist/controls/sort-editor/sort-editor.js +180 -0
  139. package/views/dist/controls/sort-editor/tokens.d.ts +79 -0
  140. package/views/dist/controls/sort-editor/tokens.js +22 -0
  141. package/views/dist/controls/sort-editor/words.d.ts +48 -0
  142. package/views/dist/controls/sort-editor/words.js +25 -0
  143. package/views/dist/controls/sort-editor.css +96 -0
  144. package/views/dist/controls/text-editor/phone-number.d.ts +4 -0
  145. package/views/dist/controls/text-editor/phone-number.js +20 -0
  146. package/views/dist/controls/text-editor/text-editor.js +2 -19
  147. package/views/dist/controls/toast/toast.d.ts +75 -0
  148. package/views/dist/controls/toast/toast.js +99 -0
  149. package/views/dist/controls/toast/tokens.d.ts +100 -0
  150. package/views/dist/controls/toast/tokens.js +27 -0
  151. package/views/dist/controls/toast.css +93 -0
  152. package/views/dist/controls/tokens.js +30 -0
  153. package/views/dist/controls/values-editor/looks.d.ts +16 -0
  154. package/views/dist/controls/values-editor/looks.js +19 -0
  155. package/views/dist/controls/values-editor/map-values-body.d.ts +12 -0
  156. package/views/dist/controls/values-editor/map-values-body.js +71 -0
  157. package/views/dist/controls/values-editor/tokens.d.ts +132 -0
  158. package/views/dist/controls/values-editor/tokens.js +35 -0
  159. package/views/dist/controls/values-editor/values-editor.d.ts +62 -0
  160. package/views/dist/controls/values-editor/values-editor.js +441 -0
  161. package/views/dist/controls/values-editor/values.d.ts +71 -0
  162. package/views/dist/controls/values-editor/values.js +59 -0
  163. package/views/dist/controls/values-editor/words.d.ts +50 -0
  164. package/views/dist/controls/values-editor/words.js +29 -0
  165. package/views/dist/controls/values-editor.css +207 -0
  166. package/views/dist/controls/views-list/looks.d.ts +13 -0
  167. package/views/dist/controls/views-list/looks.js +12 -0
  168. package/views/dist/controls/views-list/map-views-list-body.d.ts +19 -0
  169. package/views/dist/controls/views-list/map-views-list-body.js +65 -0
  170. package/views/dist/controls/views-list/rules.d.ts +72 -0
  171. package/views/dist/controls/views-list/rules.js +4 -0
  172. package/views/dist/controls/views-list/tokens.d.ts +11 -0
  173. package/views/dist/controls/views-list/tokens.js +5 -0
  174. package/views/dist/controls/views-list/views-list.d.ts +44 -0
  175. package/views/dist/controls/views-list/views-list.js +57 -0
  176. package/views/dist/controls/views-list/words.d.ts +22 -0
  177. package/views/dist/controls/views-list/words.js +3 -0
  178. package/views/dist/controls/views-list.css +8 -0
  179. package/views/dist/display/date.js +2 -2
  180. package/views/dist/display/format.js +10 -2
  181. package/views/dist/display/options.d.ts +3 -1
  182. package/views/dist/display/use-display-options.d.ts +3 -0
  183. package/views/dist/display/use-display-options.js +10 -2
  184. package/views/dist/display/viewer.d.ts +1 -1
  185. package/views/dist/display/viewer.js +1 -1
  186. package/views/dist/editors/DateEditor.js +11 -9
  187. package/views/dist/editors/NumberEditor.js +3 -1
  188. package/views/dist/editors/relation-panel.js +7 -1
  189. package/views/dist/editors/relation-picker.d.ts +2 -1
  190. package/views/dist/editors/relation-picker.js +4 -3
  191. package/views/dist/editors/relation-source.d.ts +4 -1
  192. package/views/dist/editors/relation-source.js +5 -2
  193. package/views/dist/field-row/editors/RowNumberEditor.js +2 -2
  194. package/views/dist/fields/number-edit.d.ts +6 -0
  195. package/views/dist/fields/number-edit.js +8 -1
  196. package/views/dist/grid/chrome/GridCellEditors.js +3 -3
  197. package/views/dist/grid/chrome/GridColumnDateSection.d.ts +4 -3
  198. package/views/dist/grid/chrome/GridColumnDateSection.js +4 -4
  199. package/views/dist/grid/chrome/GridColumnDurationSection.js +2 -2
  200. package/views/dist/grid/chrome/GridColumnMenu.js +6 -4
  201. package/views/dist/grid/chrome/GridDateEditor.d.ts +3 -1
  202. package/views/dist/grid/chrome/GridDateEditor.js +2 -1
  203. package/views/dist/grid/chrome/GridFooter.js +2 -2
  204. package/views/dist/grid/chrome/grid-column-menu-items.js +4 -2
  205. package/views/dist/grid/chrome/useGridBandFigures.js +2 -2
  206. package/views/dist/grid/chrome/useGridFittedWidths.d.ts +3 -0
  207. package/views/dist/grid/chrome/useGridFittedWidths.js +9 -3
  208. package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -1
  209. package/views/dist/grid/chrome/useGridKeyboard.js +5 -2
  210. package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -1
  211. package/views/dist/grid/core/commit-model.d.ts +7 -0
  212. package/views/dist/grid/core/commit-model.js +5 -1
  213. package/views/dist/grid/core/editing-controller.js +10 -2
  214. package/views/dist/grid/core/editing-model.js +3 -7
  215. package/views/dist/grid/core/undo-owner.d.ts +6 -0
  216. package/views/dist/grid/core/undo-owner.js +13 -0
  217. package/views/dist/grid/core/useGridEditing.d.ts +2 -0
  218. package/views/dist/grid/core/useGridEditing.js +4 -0
  219. package/views/dist/looks/index.d.ts +8 -0
  220. package/views/dist/looks/index.js +8 -0
  221. package/views/dist/looks/pieces.js +16 -0
  222. package/views/dist/panels/model.d.ts +6 -1
  223. package/views/dist/panels/react/customize-body.d.ts +4 -2
  224. package/views/dist/panels/react/customize-body.js +3 -3
  225. package/views/dist/panels/react/customize.js +4 -2
  226. package/views/dist/panels/react/filter/FilterEditor.js +2 -2
  227. package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +8 -2
  228. package/views/dist/panels/react/filter/PhoneFilterEditor.js +9 -6
  229. package/views/dist/panels/react/filter/filter-body.d.ts +8 -5
  230. package/views/dist/panels/react/filter/filter-body.js +17 -6
  231. package/views/dist/panels/react/filter/filter-part-body.d.ts +4 -1
  232. package/views/dist/panels/react/filter/filter-part-body.js +3 -1
  233. package/views/dist/panels/react/panel-sheet.d.ts +5 -1
  234. package/views/dist/panels/react/panel-sheet.js +6 -2
  235. package/views/dist/panels/react/panel-step.d.ts +12 -0
  236. package/views/dist/panels/react/panel-step.js +26 -0
  237. package/views/dist/panels/react/sort/SortEditor.d.ts +4 -0
  238. package/views/dist/panels/react/sort/SortEditor.js +5 -2
  239. package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +8 -0
  240. package/views/dist/panels/react/toolbar/ReadyToolbar.js +84 -2
  241. package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +2 -2
  242. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +16 -0
  243. package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +49 -0
  244. package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +3 -1
  245. package/views/dist/panels/react/toolbar/ToolbarFilters.d.ts +4 -1
  246. package/views/dist/panels/react/toolbar/ToolbarFilters.js +36 -21
  247. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +4 -1
  248. package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +2 -2
  249. package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +5 -0
  250. package/views/dist/panels/react/toolbar/ToolbarSortPill.js +15 -6
  251. package/views/dist/panels/react/toolbar/panel-part.d.ts +5 -1
  252. package/views/dist/panels/react/toolbar/panel-part.js +2 -2
  253. package/views/dist/panels/react/toolbar/use-filter-add.d.ts +16 -0
  254. package/views/dist/panels/react/toolbar/use-filter-add.js +32 -0
  255. package/views/dist/panels/react.d.ts +1 -0
  256. package/views/dist/panels/react.js +1 -0
  257. package/views/dist/panels/settings/filter-groups.js +35 -1
  258. package/views/dist/panels/settings/group-buckets.js +1 -0
  259. package/views/dist/provider/ViewsProvider.d.ts +7 -1
  260. package/views/dist/provider/ViewsProvider.js +23 -3
  261. package/views/dist/provider/components.d.ts +34 -4
  262. package/views/dist/provider/moment.d.ts +6 -0
  263. package/views/dist/provider/moment.js +10 -0
  264. package/views/dist/styles.css +1276 -51
  265. package/views/dist/styles.unlayered.css +1277 -51
  266. package/views/docs/contract.md +23 -15
  267. package/views/docs/controls/alert-dialog.md +37 -0
  268. package/views/docs/controls/alert.md +30 -0
  269. package/views/docs/controls/collapsible.md +22 -0
  270. package/views/docs/controls/filter-editor.md +28 -0
  271. package/views/docs/controls/group-editor.md +11 -0
  272. package/views/docs/controls/links-editor.md +25 -0
  273. package/views/docs/controls/modal.md +55 -0
  274. package/views/docs/controls/notice.md +32 -0
  275. package/views/docs/controls/number-editor.md +12 -0
  276. package/views/docs/controls/pane.md +25 -0
  277. package/views/docs/controls/radio.md +39 -0
  278. package/views/docs/controls/sort-editor.md +27 -0
  279. package/views/docs/controls/toast.md +32 -0
  280. package/views/docs/controls/values-editor.md +40 -0
  281. package/views/docs/controls/views-list.md +8 -0
  282. package/views/docs/guides/cells.md +1 -1
  283. package/views/docs/guides/display.md +1 -1
  284. package/views/docs/guides/the-grid.md +1 -1
  285. package/views/docs/guides/the-provider.md +19 -0
  286. package/views/docs/reference/cells.md +2 -2
  287. package/views/docs/reference/controls.md +326 -8
  288. package/views/docs/reference/display.md +2 -2
  289. package/views/docs/reference/editors-relation.md +1 -1
  290. package/views/docs/reference/looks.md +20 -3
  291. package/views/docs/reference/panels-react.md +7 -6
  292. package/views/docs/reference/panels.md +1 -1
  293. package/views/docs/reference/react.md +8 -8
  294. package/views/docs/reference/views.md +1 -0
@@ -0,0 +1,12 @@
1
+ # The Number editor's tokens
2
+
3
+ Every name `number-editor.css` reads (beside the stylesheets of the controls it draws with: the number field's `number-field.css`, the Input's `input.css`, the inline input's `inline-input.css`, the Button's `button.css`, the Popover's `popover.css`, the Picker's `picker.css` for money's currencies and a number's units, and the Sheet's `sheet.css` for a phone's ✕ and ✓), each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
4
+
5
+ | name | kind | the Outright token | default |
6
+ | ---- | ---- | ------------------ | ------- |
7
+ | `--vk-border-width` | size | `border-width` | `1px` |
8
+ | `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
9
+ | `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
10
+ | `--vk-font-size-base` | size | `text-base` | `16px` |
11
+ | `--vk-font-size-sm` | size | `text-sm` | `14px` |
12
+ | `--vk-spacing` | size | `spacing` | `4px` |
@@ -0,0 +1,25 @@
1
+ # The Pane's tokens
2
+
3
+ Every name `pane.css` reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
4
+
5
+ | name | kind | the Outright token | default |
6
+ | ---- | ---- | ------------------ | ------- |
7
+ | `--vk-radius-xl` | size | `radius-xl` | `15px` |
8
+ | `--vk-shadow-menu` | shadow | `shadow-menu` | `0 6px 18px hsl(0 0% 0% / 0.06), 0 3px 9px hsl(0 0% 0% / 0.05), 0 1px 1px hsl(0 0% 0% / 0.04)` · dark `0 8px 24px hsl(0 0% 0% / 0.5), 0 0 0 1px hsl(0 0% 18%)` |
9
+ | `--vk-border` | colour | `border` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
10
+ | `--vk-spacing` | size | `spacing` | `4px` |
11
+ | `--vk-layer-drawer` | size | `layer-drawer` | `40` |
12
+ | `--vk-overlay` | colour | `surface-overlay` | `hsl(0 0% 100%)` · dark `hsl(226 10% 10%)` |
13
+ | `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
14
+ | `--vk-font-size-sm` | size | `text-sm` | `14px` |
15
+ | `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
16
+ | `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
17
+ | `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
18
+ | `--vk-border-width` | size | `border-width` | `1px` |
19
+ | `--vk-border-subtle` | colour | `border-subtle` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
20
+ | `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
21
+ | `--vk-ease-in` | motion | `ease-in` | `cubic-bezier(0.4, 0, 1, 1)` |
22
+ | `--vk-radius-lg` | size | `radius-lg` | `10px` |
23
+ | `--vk-radius-2xl` | size | `radius-2xl` | `20px` |
24
+ | `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` · dark `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
25
+ | `--vk-shadow-xl` | shadow | `shadow-xl` | `0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)` · dark `0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)` |
@@ -0,0 +1,39 @@
1
+ # The Radio's tokens
2
+
3
+ Every name `radio.css` reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
4
+
5
+ The words beside a choice, and a card's edge and ground (`o-choice-*`), are the app's own choice styles, as the Checkbox's are.
6
+
7
+ | name | kind | the Outright token | default |
8
+ | ---- | ---- | ------------------ | ------- |
9
+ | `--vk-border-brand` | colour | `border-focused` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
10
+ | `--vk-border-danger` | colour | `border-danger` | `hsl(3 87% 68%)` · dark `hsl(1 55% 46.5%)` |
11
+ | `--vk-border-input` | colour | `border-input` | `hsl(220 3% 86%)` · dark `hsl(220 4% 22%)` |
12
+ | `--vk-border-input-hovered` | colour | `border-input-hovered` | `hsl(210 1% 82%)` · dark `hsl(210 2% 26.5%)` |
13
+ | `--vk-border-selected` | colour | `border-selected` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
14
+ | `--vk-border-subtle` | colour | `border-subtle` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
15
+ | `--vk-border-width` | size | `border-width` | `1px` |
16
+ | `--vk-brand` | colour | `background-brand-bold` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
17
+ | `--vk-brand-hovered` | colour | `background-brand-bold-hovered` | `hsl(219 70% 46.5%)` · dark `hsl(219 95% 64%)` |
18
+ | `--vk-danger-bold` | colour | `background-danger-bold` | `hsl(0 81% 58%)` |
19
+ | `--vk-danger-bold-hovered` | colour | `background-danger-bold-hovered` | `hsl(0 59% 49%)` · dark `hsl(3 90% 66.5%)` |
20
+ | `--vk-duration-base` | motion | `duration-base` | `200ms` |
21
+ | `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
22
+ | `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
23
+ | `--vk-fg-accent` | colour | `text-brand` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
24
+ | `--vk-fg-disabled` | colour | `text-disabled` | `hsl(210 1% 72%)` · dark `hsl(210 1% 37%)` |
25
+ | `--vk-fg-inverse` | colour | `text-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 95%)` |
26
+ | `--vk-fg-on-brand` | colour | `text-brand-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 5%)` |
27
+ | `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
28
+ | `--vk-focus-offset` | size | `focus-offset` | `2px` |
29
+ | `--vk-focus-width` | size | `focus-width` | `2px` |
30
+ | `--vk-font-weight-normal` | size | `font-weight-normal` | `400` |
31
+ | `--vk-ground` | colour | `surface` | `hsl(0 0% 100%)` · dark `hsl(210 6% 7%)` |
32
+ | `--vk-hovered` | colour | `surface-hovered` | `hsl(0 0% 96.5%)` · dark `hsl(210 4% 9.5%)` |
33
+ | `--vk-input` | colour | `background-input` | `hsl(0 0% 100% / 0)` |
34
+ | `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
35
+ | `--vk-overlay-card` | colour | `surface-overlay-card` | `hsl(0 0% 94%)` · dark `hsl(225 7% 15%)` |
36
+ | `--vk-radius-full` | size | `radius-full` | `9999px` |
37
+ | `--vk-radius-lg` | size | `radius-lg` | `10px` |
38
+ | `--vk-radius-xl` | size | `radius-xl` | `15px` |
39
+ | `--vk-spacing` | size | `spacing` | `4px` |
@@ -0,0 +1,27 @@
1
+ # The sort editor's tokens
2
+
3
+ Every name `sort-editor.css` reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
4
+
5
+ The Select, the Picker, the Menu, the Button and the Field rows it draws with read their own pages' names.
6
+
7
+ | name | kind | the Outright token | default |
8
+ | ---- | ---- | ------------------ | ------- |
9
+ | `--vk-border-brand` | colour | `border-focused` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
10
+ | `--vk-border-warning` | colour | `border-warning` | `hsl(20 63% 57.5%)` · dark `hsl(22 74% 36%)` |
11
+ | `--vk-border-width` | size | `border-width` | `1px` |
12
+ | `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
13
+ | `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
14
+ | `--vk-font-size-base` | size | `text-base` | `16px` |
15
+ | `--vk-font-size-sm` | size | `text-sm` | `14px` |
16
+ | `--vk-font-size-xs` | size | `text-xs` | `12px` |
17
+ | `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
18
+ | `--vk-layer-popup` | size | `layer-popup` | `50` |
19
+ | `--vk-line-height-base` | size | `text-base--line-height` | `1.5` |
20
+ | `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
21
+ | `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
22
+ | `--vk-overlay` | colour | `surface-overlay` | `hsl(0 0% 100%)` · dark `hsl(226 10% 10%)` |
23
+ | `--vk-overlay-hovered` | colour | `surface-overlay-hovered` | `hsl(220 3% 97%)` · dark `hsl(225 7% 15%)` |
24
+ | `--vk-radius-md` | size | `radius-md` | `7.5px` |
25
+ | `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
26
+ | `--vk-spacing` | size | `spacing` | `4px` |
27
+ | `--vk-warning` | colour | `text-warning` | `hsl(25 92% 41%)` |
@@ -0,0 +1,32 @@
1
+ # The Toast's tokens
2
+
3
+ Every name `toast.css` reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
4
+
5
+ `--vk-toast-duration` is how long a toast stays: its script reads it off the toast's viewport (`--toast-wait`), else off the page's root, and waits four seconds where nothing declares it.
6
+
7
+ | name | kind | the Outright token | default |
8
+ | ---- | ---- | ------------------ | ------- |
9
+ | `--vk-layer-popup` | size | `layer-popup` | `50` |
10
+ | `--vk-spacing` | size | `spacing` | `4px` |
11
+ | `--vk-radius-lg` | size | `radius-lg` | `10px` |
12
+ | `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
13
+ | `--vk-ground` | colour | `surface` | `hsl(0 0% 100%)` · dark `hsl(210 6% 7%)` |
14
+ | `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` · dark `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
15
+ | `--vk-font-size-sm` | size | `text-sm` | `14px` |
16
+ | `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
17
+ | `--vk-duration-base` | motion | `duration-base` | `200ms` |
18
+ | `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
19
+ | `--vk-focus-width` | size | `focus-width` | `2px` |
20
+ | `--vk-border-brand` | colour | `border-focused` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
21
+ | `--vk-focus-offset` | size | `focus-offset` | `2px` |
22
+ | `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
23
+ | `--vk-ease-in` | motion | `ease-in` | `cubic-bezier(0.4, 0, 1, 1)` |
24
+ | `--vk-font-weight-semibold` | size | `font-weight-semibold` | `600` |
25
+ | `--vk-danger` | colour | `text-danger` | `hsl(0 81% 58%)` · dark `hsl(0 81% 58%)` |
26
+ | `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
27
+ | `--vk-info` | colour | `text-information` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
28
+ | `--vk-success` | colour | `text-success` | `hsl(158 98% 26%)` · dark `hsl(158 98% 34%)` |
29
+ | `--vk-warning` | colour | `text-warning` | `hsl(25 92% 41%)` · dark `hsl(25 92% 41%)` |
30
+ | `--vk-press-scale` | motion | `press-scale` | `0.98` |
31
+ | `--vk-corner-smoothing` | size | `corner-smoothing` | `0.7` |
32
+ | `--vk-toast-duration` | motion | `toast-duration` | `4000ms` |
@@ -0,0 +1,40 @@
1
+ # The Values editor's tokens
2
+
3
+ Every name `values-editor.css` reads (beside the stylesheets of the controls it draws its values with: the Button's `button.css`, the Input's `input.css`, the Inline input's `inline-input.css`, the Field's `field.css` for a phone's card, the Popover's `popover.css` and the Picker's `picker.css` for a label's or a country's list, the list's `list.css`, the popup line's `popup-line.css`, the Sheet's `sheet.css` for a phone's ✕ and ✓, and the Flag's `flag.css`), each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
4
+
5
+ It also reads the Popover's corners (`--popover-corners`), the popup line's reach (`--popup-line-reach`) and a list's dividers (`--divider-colour`, `--divider-reach`, `--dividers-words`, `--dividers-rows`), those controls' own families, and sets its line's inset, `--values-line-in`, its own: none is public, and none is for an app to set.
6
+
7
+ | name | kind | the Outright token | default |
8
+ | ---- | ---- | ------------------ | ------- |
9
+ | `--vk-border` | colour | `border` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
10
+ | `--vk-border-brand` | colour | `border-focused` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
11
+ | `--vk-border-danger` | colour | `border-danger` | `hsl(3 87% 68%)` · dark `hsl(1 55% 46.5%)` |
12
+ | `--vk-border-overlay-card` | colour | `border-overlay-card` | `hsl(220 3% 86%)` · dark `hsl(220 4% 22%)` |
13
+ | `--vk-border-subtle` | colour | `border-subtle` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
14
+ | `--vk-border-width` | size | `border-width` | `1px` |
15
+ | `--vk-brand-subtler` | colour | `background-brand-subtler` | `hsl(218 100% 94%)` · dark `hsl(218 32% 14.5%)` |
16
+ | `--vk-danger` | colour | `text-danger` | `hsl(0 81% 58%)` |
17
+ | `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
18
+ | `--vk-fg-brand` | colour | `link` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
19
+ | `--vk-fg-inverse` | colour | `text-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 95%)` |
20
+ | `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
21
+ | `--vk-fg-subtlest` | colour | `text-subtlest` | `hsl(210 1% 53.5%)` · dark `hsl(210 3% 53%)` |
22
+ | `--vk-focus-width` | size | `focus-width` | `2px` |
23
+ | `--vk-font-size-base` | size | `text-base` | `16px` |
24
+ | `--vk-font-size-sm` | size | `text-sm` | `14px` |
25
+ | `--vk-font-size-xs` | size | `text-xs` | `12px` |
26
+ | `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
27
+ | `--vk-layer-popup` | size | `layer-popup` | `50` |
28
+ | `--vk-line-height-base` | size | `text-base--line-height` | `1.5` |
29
+ | `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
30
+ | `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
31
+ | `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
32
+ | `--vk-overlay` | colour | `surface-overlay` | `hsl(0 0% 100%)` · dark `hsl(226 10% 10%)` |
33
+ | `--vk-overlay-hovered` | colour | `surface-overlay-hovered` | `hsl(220 3% 97%)` · dark `hsl(225 7% 15%)` |
34
+ | `--vk-radius-full` | size | `radius-full` | `9999px` |
35
+ | `--vk-radius-lg` | size | `radius-lg` | `10px` |
36
+ | `--vk-radius-md` | size | `radius-md` | `7.5px` |
37
+ | `--vk-radius-sm` | size | `radius-sm` | `5px` |
38
+ | `--vk-radius-xl` | size | `radius-xl` | `15px` |
39
+ | `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
40
+ | `--vk-spacing` | size | `spacing` | `4px` |
@@ -0,0 +1,8 @@
1
+ # The views list's tokens
2
+
3
+ Every name `views-list.css` reads (beside the stylesheets of the controls it draws with: the Picker's `picker.css`, the list's `list.css`, the popup line's `popup-line.css`, the Menu's and the menu list's for a view's menu, and the Sheet's `sheet.css` on a phone), each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
4
+
5
+ | name | kind | the Outright token | default |
6
+ | ---- | ---- | ------------------ | ------- |
7
+ | `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
8
+ | `--vk-spacing` | size | `spacing` | `4px` |
@@ -135,7 +135,7 @@ function DealCards({ items }: { items: Deal[] }) {
135
135
 
136
136
  ## The column-shaped formatters
137
137
 
138
- A line that is not a cell, such as a total under the cards, must still print the way the cells do. `formatNumber(value, column, options)` prints a number as the column prints its cells, and `formatDate(value, column, dateStyle, withTime, viewer)` prints a date as the column does, the two overrides winning over the column's own format. Both are plain functions that read no state; the viewer (the locale, time zone and wording) is yours to hand in. Inside a component, `useCellFormat()` reads it from the provider, with the provider's `presentation`.
138
+ A line that is not a cell, such as a total under the cards, must still print the way the cells do. `formatNumber(value, column, options)` prints a number as the column prints its cells, and `formatDate(value, column, dateStyle, withTime, viewer, presentation?)` prints a date as the column does, the two overrides winning over the column's own format; hand it your `presentation` too, or it prints with the package's defaults. Both are plain functions that read no state; the viewer (the locale, time zone and wording) is yours to hand in. Inside a component, `useCellFormat()` reads it from the provider, with the provider's `presentation`.
139
139
 
140
140
  ```tsx
141
141
  import { formatDate, formatNumber, resolveRowCurrency, useCellFormat } from "viewkitjs/views/cells";
@@ -129,7 +129,7 @@ const openInDrawer =
129
129
 
130
130
  A footer total, a column menu's live preview or a server-rendered email need the value as a string, not an element. `formatDateValue` and `formatNumberValue` are those strings, the same ones the cells draw, and the door carries no client directive, so a server module imports them as they are.
131
131
 
132
- Both read a viewer: who is reading, in which locale and time zone, at what moment. `viewerFrom(conventions, messages?, now?)` builds one from the conventions you hand fields: their locale, names language, zone, region and wording, with the package's words unless you hand a resolver and the current moment unless you hand one.
132
+ Both read a viewer: who is reading, in which locale and time zone, at what moment. `viewerFrom(conventions, messages?, now?)` builds one from the conventions you hand fields: their locale, names language, zone, region and wording, with the package's words unless you hand a resolver and the current moment unless you hand one. Hand `null` for a viewer with no moment yet: its relative dates draw in full, as the provider's do before it has read the clock ([the provider](the-provider.md#the-moment)).
133
133
 
134
134
  ```ts
135
135
  import { formatDateValue, formatNumberValue, viewerFrom } from "viewkitjs/views/display";
@@ -665,7 +665,7 @@ assert.equal(gridNormalizeWrite(stageColumn, "maybe", conventions).ok, false);
665
665
 
666
666
  Tab enters the grid at its focused cell, or at the first cell on screen, and the keyboard is a spreadsheet's: the arrows and ⇧-arrows, ⌘A, Home and End, ⌘Home and ⌘End, Tab with the row wrapping, typing to replace (on a select, a status or a multiselect, typing starts its search), Enter to edit (or to flip a boolean); a select or a status with no search, opened by Enter or a typed letter, opens with the focus on the option it holds, so ↓ and ↑ walk its options and Enter picks one, while a list opened by a click moves no focus, ⌘C, ⌘X and Delete over a range, ⌘Z and ⇧⌘Z, and pasted tab-separated text. On a desktop, a click selects a cell; a second click on it, a double-click or Enter opens its editor, or the panel of a long text or a cut-off text. An email, a phone, a url or a domain is part of its cell: a click on it selects the cell like any other, and a ⌘-click (Ctrl-click on Windows) follows the link. ⌘X and Delete over a range empty what may be emptied, then say in one toast which fields they left because those can't be empty (`views.grid.clear-required`). A drag selects a range, and the dot at its corner fills it. Below your provider's `desktopQuery`, one tap on a cell opens its editor in your `Sheet`, and a cell that opens nothing is selected and says why. The answer is read at the tap, so a test that clicks the grid answers your desktop query in its `matchMedia` stub to keep a desktop's clicks.
667
667
 
668
- Every cell takes the browser's own focus, and the grid's keys listen on the grid itself; only ⌘Z listens on the window, so an undo works wherever focus is, and lands on the cell it changed: selected, and holding the focus unless something outside the grid has it, so the next key moves from there. Tab past the grid's last cell (Shift+Tab before its first) leaves it, and Escape with nothing open clears the cell and lets go of the grid: the next Tab or Shift+Tab leaves. The arrows also reach what surrounds the cells: ↑ from a group's first row lands on its column names, where Enter or Space opens a column's menu with focus on its first row; ↓ from its last row lands on its footer, where Enter or Space opens the figure picker; above the column names is the group's bar, where Enter, Space or ← collapse it and Enter, Space or → open it again, and → on an open bar reaches its ⋯ menu; ← from a row's first column reaches its checkbox, and Space ticks it (the select-all and a group's box the same way from the column names). With `oneHeader`, a group has no column names and no box of its own: ↑ from its first row lands on its bar, and above the first bar is the one row of column names. On a cell, Shift+F10, the menu key, or ⌘⇧\ (Ctrl+Shift+\ off a Mac, as in Google Sheets) opens the row's menu, the one a right-click on that cell opens, under the cell; the grid sends that right-click to your `RowMenu`, and your `Menu` puts focus on its first row. Safari may keep ⌘⇧\ for its own tab overview: there, fn+Shift+F10 opens it. In a column's menu, the figure picker and a group's ⋯ menu, ↓ and ↑ move between the rows, round at either end, and Enter picks the focused one (with the provider's `menus` set to `menu`, the figure picker, a column's menu, a group's ⋯ and Add column are your `Menu`, and their keys are your `Menu`'s). On the `popover` route, past eight sort choices, or at any count once you pass `groupMenu`, a group's menu lists them under a search (on the `menu` route they open beside the menu with no search field), whose own arrows walk its matches: ↓ past the last match goes on to the rows below it, and ↑ from the first of those comes back. That reads the match your `Command` has highlighted from its field's `aria-activedescendant`, as cmdk names it; a list that names none keeps its own arrows, and Tab leaves it. Escape, or a pick, closes a menu and puts focus back on its cell, after your `Popover` or `Menu` has played its exit and left the page. The keyboard, a range, a copy, a clear, a paste and a fill skip a collapsed group's rows, and collapsing a group keeps an edit open in it.
668
+ Every cell takes the browser's own focus, and the grid's keys listen on the grid itself; only ⌘Z listens on the window, so an undo works with the focus outside the grid too: the grid holding the focus answers, and with the focus in no grid, the grid edited last. It lands on the cell it changed: selected, and holding the focus unless something outside the grid has it, so the next key moves from there. Tab past the grid's last cell (Shift+Tab before its first) leaves it, and Escape with nothing open clears the cell and lets go of the grid: the next Tab or Shift+Tab leaves. The arrows also reach what surrounds the cells: ↑ from a group's first row lands on its column names, where Enter or Space opens a column's menu with focus on its first row; ↓ from its last row lands on its footer, where Enter or Space opens the figure picker; above the column names is the group's bar, where Enter, Space or ← collapse it and Enter, Space or → open it again, and → on an open bar reaches its ⋯ menu; ← from a row's first column reaches its checkbox, and Space ticks it (the select-all and a group's box the same way from the column names). With `oneHeader`, a group has no column names and no box of its own: ↑ from its first row lands on its bar, and above the first bar is the one row of column names. On a cell, Shift+F10, the menu key, or ⌘⇧\ (Ctrl+Shift+\ off a Mac, as in Google Sheets) opens the row's menu, the one a right-click on that cell opens, under the cell; the grid sends that right-click to your `RowMenu`, and your `Menu` puts focus on its first row. Safari may keep ⌘⇧\ for its own tab overview: there, fn+Shift+F10 opens it. In a column's menu, the figure picker and a group's ⋯ menu, ↓ and ↑ move between the rows, round at either end, and Enter picks the focused one (with the provider's `menus` set to `menu`, the figure picker, a column's menu, a group's ⋯ and Add column are your `Menu`, and their keys are your `Menu`'s). On the `popover` route, past eight sort choices, or at any count once you pass `groupMenu`, a group's menu lists them under a search (on the `menu` route they open beside the menu with no search field), whose own arrows walk its matches: ↓ past the last match goes on to the rows below it, and ↑ from the first of those comes back. That reads the match your `Command` has highlighted from its field's `aria-activedescendant`, as cmdk names it; a list that names none keeps its own arrows, and Tab leaves it. Escape, or a pick, closes a menu and puts focus back on its cell, after your `Popover` or `Menu` has played its exit and left the page. The keyboard, a range, a copy, a clear, a paste and a fill skip a collapsed group's rows, and collapsing a group keeps an edit open in it.
669
669
 
670
670
  A page that shows the grid's states side by side, as a design system's does, hands each grid the state to hold, and a person's gesture beside it is told to you to answer: `hoveredRow` draws a row as under the pointer, with its actions and `data-hovered`; `cellPick` draws a picked cell and its ranges, and keeps them through a press elsewhere on the page; `openColumnMenu` stands a column's menu open, a press on a header or outside it only told through `onOpenColumnMenuChange`. Left out, a grid holds none of them, as it always has.
671
671
 
@@ -466,6 +466,25 @@ assert.equal(printed.duration({ milliseconds: 150_000, context: viewer }), "2:30
466
466
  assert.equal(printed.duration({ milliseconds: 150_000, style: "units", context: viewer }), "2m 30s"); // a chosen style wins
467
467
  ```
468
468
 
469
+ ## The moment
470
+
471
+ Relative dates ("today", "3d ago"), a short date's year, the column menu's date samples and the date editors' quick days and today all count from one moment, the provider's `now`. Hand it the moment your server rendered at, and the server and the browser draw the same text on first load:
472
+
473
+ ```tsx
474
+ // The moment your server rendered at, carried to the browser with the page (a prop, a data attribute).
475
+ export function MomentViews({ children, renderedAt }: { children: ReactNode; renderedAt: Date }) {
476
+ return (
477
+ <ViewsProvider components={viewsComponents} icons={viewsIcons} ports={viewsPorts} conventions={conventions} now={renderedAt}>
478
+ {children}
479
+ </ViewsProvider>
480
+ );
481
+ }
482
+ ```
483
+
484
+ With none, the provider reads the clock just after the page loads, then once a minute and whenever the tab comes back into view, and never while rendering, so a framework that refuses a render reading the clock (a Next.js prerender) builds the grid as it is. Until the first read, a date that needs the moment draws its full form (`01 Dec 2026`, `01 Dec 2026, 14:05`), then its short or relative form; after that "5m ago" moves about once a minute, and a row saved after the page loaded reads "just now". A moment you hand is kept as it is: it moves only when you hand a new one. To keep a fixed moment, hand it here, not through `presentation`.
485
+
486
+ Your `presentation`'s `calendarDay` and `instant` may meet a viewer with no `now` (before the moment is read); its relative formatters are only called with one. A date editor or calendar drawn open in the first render, before the moment is read, takes today from the browser's clock; one opened by a press, after the page loads, counts from the moment. The provider compares the moment's time, so a new `Date` for the same moment redraws nothing.
487
+
469
488
  ## Atoms
470
489
 
471
490
  The rows, tick boxes, badges, tags, menus and waits every view is built from ship as defaults drawn from your theme; swap any of them through `atoms`, a module-level object such as `atoms={{ Tag: MyTag }}`. [Atoms](atoms.md) covers each.
@@ -17,9 +17,9 @@ Guide: [cells](../guides/cells.md).
17
17
 
18
18
  ## Column-shaped text
19
19
 
20
- - `formatDate` — a date column's value as text: takes the value, the column, a date style override, a show-time override and the viewer. The overrides win over the column's `format`. A date column, or a derived field whose result is a day, reads as a calendar day; anything else as an instant.
20
+ - `formatDate` — a date column's value as text: takes the value, the column, a date style override, a show-time override and the viewer, and optionally the app's presentation (`useCellFormat`'s), so it reads as the cells do. The overrides win over the column's `format`. A date column, or a derived field whose result is a day, reads as a calendar day; anything else as an instant.
21
21
  - `formatNumber` — a number as a column prints it, for a footer total that must match its cells: takes the value, the column and options that include the viewer. The column's format is read through `legacyNumberLikeFormat`, so a percent or currency column prints as one.
22
- - `useCellFormat` — reads what the two formatters need from the provider: `{ viewer, presentation }`. The viewer is built from the provider's conventions and wording on each render, with that render's `now`; `presentation` is the provider's `presentation` applied to the defaults, or `undefined` when it has none.
22
+ - `useCellFormat` — reads what the two formatters need from the provider: `{ viewer, presentation }`. The viewer is built from the provider's conventions, wording and moment (`now`, absent until the provider has one), and kept while they stay the same; `presentation` is the provider's `presentation` applied to the defaults, or `undefined` when it has none.
23
23
  - `resolveRowCurrency` — returns the options with `currency` set to the code this row's money value is in: the column's `currencyAccessor` answer for the row, else, for a column a currency field backs, the code its format names. The options come back unchanged when neither gives one.
24
24
 
25
25
  ## A column no registry field backs