viewkitjs 0.33.0 → 0.35.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.
- package/CHANGELOG.md +139 -0
- package/package.json +1 -1
- package/views/README.md +1 -1
- package/views/dist/atoms/Avatar.js +2 -1
- package/views/dist/atoms/RelationChip.d.ts +2 -0
- package/views/dist/atoms/RelationChip.js +5 -0
- package/views/dist/atoms/RowMenu.d.ts +1 -1
- package/views/dist/atoms/RowMenu.js +15 -3
- package/views/dist/atoms/defaults.js +2 -0
- package/views/dist/atoms/types.d.ts +40 -4
- package/views/dist/cells/relation-wrap.js +9 -2
- package/views/dist/contract.d.ts +27 -14
- package/views/dist/contract.js +40 -4
- package/views/dist/controls/alert/alert.js +2 -1
- package/views/dist/controls/alert-dialog/alert-dialog.js +3 -2
- package/views/dist/controls/avatar/avatar-mark.d.ts +4 -0
- package/views/dist/controls/avatar/avatar-mark.js +5 -0
- package/views/dist/controls/avatar/avatar.d.ts +7 -4
- package/views/dist/controls/avatar/avatar.js +10 -4
- package/views/dist/controls/avatar/looks.d.ts +1 -1
- package/views/dist/controls/avatar/looks.js +3 -0
- package/views/dist/controls/avatar/record-mark.d.ts +16 -0
- package/views/dist/controls/avatar/record-mark.js +13 -0
- package/views/dist/controls/avatar/tokens.d.ts +12 -0
- package/views/dist/controls/avatar/tokens.js +3 -0
- package/views/dist/controls/avatar.css +54 -17
- package/views/dist/controls/bulk-bar/bulk-bar.js +29 -27
- package/views/dist/controls/bulk-bar/map-selection-bar.js +2 -1
- package/views/dist/controls/compound-editor/compound-editor.d.ts +3 -0
- package/views/dist/controls/compound-editor/map-parts-body.d.ts +1 -1
- package/views/dist/controls/compound-editor/map-parts-body.js +6 -1
- package/views/dist/controls/compound-editor/name-parts.js +2 -1
- package/views/dist/controls/compound-editor/place-parts.js +2 -2
- package/views/dist/controls/compound-editor/range-parts.js +10 -9
- package/views/dist/controls/controls.d.ts +2 -0
- package/views/dist/controls/controls.js +2 -0
- package/views/dist/controls/customize/customize.d.ts +14 -5
- package/views/dist/controls/customize/customize.js +19 -20
- package/views/dist/controls/customize/map-customize-body.d.ts +2 -2
- package/views/dist/controls/customize/map-customize-body.js +15 -13
- package/views/dist/controls/customize/words.d.ts +3 -3
- package/views/dist/controls/date-editor/date-editor.d.ts +3 -0
- package/views/dist/controls/date-editor/date-editor.js +13 -7
- package/views/dist/controls/date-editor/map-calendar.js +2 -0
- package/views/dist/controls/date-editor/map-date-body.d.ts +1 -1
- package/views/dist/controls/date-editor/map-date-body.js +7 -3
- package/views/dist/controls/filter-editor/filter-editor.d.ts +2 -0
- package/views/dist/controls/filter-editor/filter-editor.js +4 -6
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +2 -0
- package/views/dist/controls/filter-editor/map-filter-body.js +7 -4
- package/views/dist/controls/filter-editor/parts.d.ts +4 -2
- package/views/dist/controls/filter-editor/parts.js +8 -7
- package/views/dist/controls/group-editor/group-editor.js +2 -1
- package/views/dist/controls/group-editor/map-group-body.d.ts +1 -0
- package/views/dist/controls/group-editor/map-group-body.js +5 -1
- package/views/dist/controls/index.d.ts +1 -1
- package/views/dist/controls/input/input.js +2 -1
- package/views/dist/controls/internal/head-button.d.ts +9 -0
- package/views/dist/controls/internal/head-button.js +13 -0
- package/views/dist/controls/internal/map-panel-controls.js +9 -5
- package/views/dist/controls/internal/panel-controls.d.ts +38 -6
- package/views/dist/controls/internal/panel-controls.js +191 -19
- package/views/dist/controls/links-editor/links-editor.js +5 -7
- package/views/dist/controls/links-editor/map-links-body.d.ts +1 -1
- package/views/dist/controls/links-editor/map-links-body.js +5 -1
- package/views/dist/controls/menu/menu.d.ts +5 -1
- package/views/dist/controls/menu/menu.js +4 -3
- package/views/dist/controls/modal/modal.js +5 -3
- package/views/dist/controls/number-editor/map-number-body.js +5 -1
- package/views/dist/controls/number-editor/number-editor.js +6 -6
- package/views/dist/controls/pane/map-pane.d.ts +3 -0
- package/views/dist/controls/pane/map-pane.js +5 -0
- package/views/dist/controls/picker/map-fields-body.d.ts +2 -2
- package/views/dist/controls/picker/map-fields-body.js +30 -2
- package/views/dist/controls/picker/map-picker.d.ts +8 -3
- package/views/dist/controls/picker/map-picker.js +14 -3
- package/views/dist/controls/picker/picker.js +11 -8
- package/views/dist/controls/picker/rows.d.ts +7 -2
- package/views/dist/controls/picker.css +10 -1
- package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +2 -1
- package/views/dist/controls/quick-filters/map-quick-filters-body.js +9 -4
- package/views/dist/controls/quick-filters/quick-filters.js +8 -6
- package/views/dist/controls/quick-filters/reminder.js +2 -2
- package/views/dist/controls/quick-filters/rules.d.ts +4 -1
- package/views/dist/controls/quick-filters/words.d.ts +2 -0
- package/views/dist/controls/quick-filters/words.js +1 -0
- package/views/dist/controls/select/select.d.ts +3 -0
- package/views/dist/controls/select/select.js +9 -3
- package/views/dist/controls/setting-row/looks.js +5 -5
- package/views/dist/controls/setting-row/setting-row.d.ts +3 -1
- package/views/dist/controls/setting-row/setting-row.js +3 -1
- package/views/dist/controls/setting-row.css +3 -2
- package/views/dist/controls/sheet/bottom-sheet.d.ts +3 -1
- package/views/dist/controls/sheet/bottom-sheet.js +2 -2
- package/views/dist/controls/sort-editor/map-sort-body.js +4 -4
- package/views/dist/controls/sort-editor/sort-editor.d.ts +2 -0
- package/views/dist/controls/sort-editor/sort-editor.js +4 -5
- package/views/dist/controls/text-editor/map-text-body.js +5 -1
- package/views/dist/controls/text-editor/text-editor.js +5 -4
- package/views/dist/controls/toolbar/toolbar.d.ts +29 -14
- package/views/dist/controls/toolbar/toolbar.js +17 -22
- package/views/dist/controls/toolbar.css +0 -5
- package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
- package/views/dist/controls/tooltip/map-tooltip.js +4 -2
- package/views/dist/controls/values-editor/map-values-body.d.ts +1 -2
- package/views/dist/controls/values-editor/map-values-body.js +5 -1
- package/views/dist/controls/values-editor/values-editor.js +8 -7
- package/views/dist/controls/views-list/map-view-menu.d.ts +3 -2
- package/views/dist/controls/views-list/map-view-menu.js +6 -2
- package/views/dist/controls/views-list/map-views-list-body.d.ts +2 -1
- package/views/dist/controls/views-list/map-views-list-body.js +6 -5
- package/views/dist/controls/views-list/view-menu.js +3 -4
- package/views/dist/controls/views-list/views-list.js +2 -2
- package/views/dist/display/option-badges.d.ts +16 -0
- package/views/dist/display/option-badges.js +11 -0
- package/views/dist/display/relation-link.d.ts +12 -0
- package/views/dist/display/relation-link.js +17 -0
- package/views/dist/display/relation.d.ts +1 -1
- package/views/dist/display/relation.js +10 -3
- package/views/dist/display/select.js +1 -8
- package/views/dist/editors/EditorPanel.js +4 -4
- package/views/dist/editors/RangeEditor.d.ts +3 -0
- package/views/dist/editors/RangeEditor.js +2 -2
- package/views/dist/editors/SelectEditor.d.ts +2 -2
- package/views/dist/editors/SelectEditor.js +1 -1
- package/views/dist/editors/TextEditor.js +4 -2
- package/views/dist/editors/ValueListEditor.js +2 -1
- package/views/dist/field-row/FieldRow.js +32 -5
- package/views/dist/field-row/editors/RowRangeEditor.js +2 -1
- package/views/dist/grid/chrome/GridAddColumn.js +9 -6
- package/views/dist/grid/chrome/GridCellEditors.js +1 -1
- package/views/dist/grid/chrome/GridCellOutline.d.ts +3 -1
- package/views/dist/grid/chrome/GridCellOutline.js +16 -6
- package/views/dist/grid/chrome/GridChipsEditor.js +3 -2
- package/views/dist/grid/chrome/GridColumnMenu.js +7 -4
- package/views/dist/grid/chrome/GridFooter.d.ts +4 -1
- package/views/dist/grid/chrome/GridFooter.js +4 -4
- package/views/dist/grid/chrome/GridGroupMenu.js +39 -14
- package/views/dist/grid/chrome/GridHeader.d.ts +1 -1
- package/views/dist/grid/chrome/GridHeader.js +1 -2
- package/views/dist/grid/chrome/GridRangeEditor.d.ts +4 -1
- package/views/dist/grid/chrome/GridRangeEditor.js +2 -2
- package/views/dist/grid/chrome/GridRow.js +5 -3
- package/views/dist/grid/chrome/GridRowActions.d.ts +4 -1
- package/views/dist/grid/chrome/GridRowActions.js +2 -2
- package/views/dist/grid/chrome/GridRowCells.js +3 -2
- package/views/dist/grid/chrome/GridStructure.js +1 -1
- package/views/dist/grid/chrome/GridTable.js +32 -20
- package/views/dist/grid/chrome/checks.d.ts +1 -1
- package/views/dist/grid/chrome/checks.js +4 -1
- package/views/dist/grid/chrome/grid-cell-classes.d.ts +6 -2
- package/views/dist/grid/chrome/grid-cell-classes.js +10 -5
- package/views/dist/grid/chrome/grid-hover.d.ts +10 -2
- package/views/dist/grid/chrome/grid-hover.js +14 -4
- package/views/dist/grid/chrome/grid-row-props.d.ts +4 -0
- package/views/dist/grid/chrome/grid-rows-menu.js +9 -4
- package/views/dist/grid/chrome/grid-table-props.d.ts +10 -2
- package/views/dist/grid/grid.css +6 -0
- package/views/dist/grid/looks.d.ts +3 -1
- package/views/dist/grid/looks.js +10 -4
- package/views/dist/list/layer.d.ts +8 -0
- package/views/dist/list/layer.js +7 -0
- package/views/dist/list/list.d.ts +6 -2
- package/views/dist/list/list.js +6 -2
- package/views/dist/list/parts.js +3 -2
- package/views/dist/list/store.d.ts +1 -1
- package/views/dist/list/toolbar.js +51 -20
- package/views/dist/list/views.js +1 -0
- package/views/dist/panels/availability.d.ts +5 -0
- package/views/dist/panels/availability.js +4 -5
- package/views/dist/panels/customize-body.d.ts +4 -0
- package/views/dist/panels/customize-body.js +13 -11
- package/views/dist/panels/model.d.ts +9 -4
- package/views/dist/panels/react/customize-body.js +5 -2
- package/views/dist/panels/react/customize.d.ts +5 -0
- package/views/dist/panels/react/filter/FilterEditor.d.ts +6 -0
- package/views/dist/panels/react/filter/FilterEditor.js +7 -0
- package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +3 -1
- package/views/dist/panels/react/quick/QuickFiltersPanel.js +7 -3
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +17 -1
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +15 -1
- package/views/dist/panels/react/toolbar/Toolbar.js +24 -9
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +3 -2
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +6 -1
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +14 -6
- package/views/dist/panels/react/toolbar/ToolbarFilters.d.ts +7 -3
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +21 -10
- package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +6 -1
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.d.ts +3 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.js +5 -4
- package/views/dist/panels/react/toolbar/ToolbarSort.d.ts +7 -1
- package/views/dist/panels/react/toolbar/ToolbarSort.js +6 -3
- package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +3 -0
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +7 -6
- package/views/dist/panels/react/toolbar/context.d.ts +21 -0
- package/views/dist/panels/react/toolbar/context.js +4 -0
- package/views/dist/panels/react/toolbar/pane-host.d.ts +6 -0
- package/views/dist/panels/react/toolbar/pane-host.js +17 -0
- package/views/dist/panels/react/toolbar/panel-part.js +3 -2
- package/views/dist/panels/react/views-row/ViewPicker.js +13 -5
- package/views/dist/panels/react.d.ts +2 -2
- package/views/dist/panels/settings/layout.js +6 -38
- package/views/dist/panels/toolbar/page-resets.d.ts +17 -0
- package/views/dist/panels/toolbar/page-resets.js +62 -0
- package/views/dist/panels/toolbar/same-item.d.ts +7 -0
- package/views/dist/panels/toolbar/same-item.js +9 -0
- package/views/dist/panels/view-state.d.ts +4 -0
- package/views/dist/provider/ViewsProvider.d.ts +9 -3
- package/views/dist/provider/ViewsProvider.js +13 -2
- package/views/dist/provider/components.d.ts +59 -8
- package/views/dist/provider/components.js +1 -1
- package/views/dist/react.d.ts +2 -2
- package/views/dist/styles.css +194 -100
- package/views/dist/styles.unlayered.css +194 -100
- package/views/docs/contract.md +96 -27
- package/views/docs/controls/alert-dialog.md +4 -0
- package/views/docs/controls/alert.md +4 -0
- package/views/docs/controls/avatar.md +3 -0
- package/views/docs/controls/bulk-bar.md +7 -1
- package/views/docs/controls/compound-editor.md +2 -0
- package/views/docs/controls/customize.md +3 -1
- package/views/docs/controls/date-editor.md +2 -0
- package/views/docs/controls/filter-editor.md +1 -1
- package/views/docs/controls/group-editor.md +2 -0
- package/views/docs/controls/links-editor.md +2 -0
- package/views/docs/controls/menu.md +3 -1
- package/views/docs/controls/modal.md +4 -0
- package/views/docs/controls/number-editor.md +2 -0
- package/views/docs/controls/pane.md +1 -1
- package/views/docs/controls/picker.md +2 -0
- package/views/docs/controls/quick-filters.md +4 -2
- package/views/docs/controls/sheet.md +1 -1
- package/views/docs/controls/text-editor.md +3 -1
- package/views/docs/controls/toolbar.md +4 -0
- package/views/docs/controls/values-editor.md +2 -0
- package/views/docs/controls/views-list.md +2 -0
- package/views/docs/guides/atoms.md +54 -3
- package/views/docs/guides/display.md +1 -1
- package/views/docs/guides/looks.md +1 -1
- package/views/docs/guides/the-grid.md +4 -2
- package/views/docs/guides/the-provider.md +4 -4
- package/views/docs/index.md +2 -2
- package/views/docs/install.md +198 -104
- package/views/docs/reference/controls.md +21 -17
- package/views/docs/reference/editors-range.md +1 -1
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +2 -1
- package/views/docs/reference/list.md +7 -5
- package/views/docs/reference/looks.md +6 -6
- package/views/docs/reference/panels-react.md +17 -15
- package/views/docs/reference/panels.md +4 -4
- package/views/docs/reference/react.md +15 -12
- package/views/docs/reference/views.md +6 -4
- package/views/docs/reshaping.md +32 -5
- package/views/skills/views/SKILL.md +3 -3
package/views/docs/contract.md
CHANGED
|
@@ -70,7 +70,7 @@ use; the prefix keeps that selector from reaching an element of the app's own.
|
|
|
70
70
|
| `data-slot="vk-grid-footer-cell"` | one column's figure |
|
|
71
71
|
| `data-slot="vk-grid-figure-label"` | a footer figure's kind ("Sum"), drawn before its value; none on a figure the app draws |
|
|
72
72
|
| `data-slot="vk-grid-figure-value"` | a footer figure's value, its suffix inside it |
|
|
73
|
-
| `data-slot="vk-grid-figure-pick"` | an empty footer cell's offer of a figure, shown under the pointer |
|
|
73
|
+
| `data-slot="vk-grid-figure-pick"` | an empty footer cell's offer of a figure, shown under the pointer, or at rest under the grid look's `offer` `always` |
|
|
74
74
|
| `data-slot="vk-grid-rail"` | the left rail: the checkbox lane |
|
|
75
75
|
| `data-slot="vk-grid-frozen-shadow"` | the shadow at the pinned columns' edge, shown while they are parked: one down each group's rows, one on the column names' rail and one on the footer's |
|
|
76
76
|
| `data-slot="vk-grid-name-check"` | a row's or a titles row's box inside the name column, before the picture, on a phone with `phonePicking` |
|
|
@@ -106,6 +106,43 @@ The selection bar's parts (`SelectionBar`, `viewkitjs/views/selection`):
|
|
|
106
106
|
| `data-slot="vk-selection-pill"` | the pill inside it: the count, the verbs, the trash, More |
|
|
107
107
|
| `data-slot="vk-selection-chip"` | the count that clears the selection, on the desktop |
|
|
108
108
|
|
|
109
|
+
### The bulk bar's parts (VK-1023)
|
|
110
|
+
|
|
111
|
+
The bulk bar (`CONTROLS.SelectionBar`, the Outright kit's `BulkBar`) names every part it draws, and every part of what it opens,
|
|
112
|
+
with a public `data-slot`, in every form: a computer's bar, the phone's tray and the pill. Dress one part by its name and the rest
|
|
113
|
+
stay as they are. Its names are listed in `BULK_BAR_SLOTS`, and in `SELECTION_SLOTS` too.
|
|
114
|
+
|
|
115
|
+
A part that repeats says which one it is by `data-key`: a verb, on the bar and as a row of More or Actions, its place in the
|
|
116
|
+
verbs you hand, from 0, whether it stands on the bar or is kept off (`more`), so the keys follow the verbs' order; Delete's row
|
|
117
|
+
`delete`; a group's row its place in the group; a field's value its value. The bar measures its verbs out of sight to know how
|
|
118
|
+
many fit, and those hidden copies wear the same names, so a dress that widens a verb is measured as it is drawn. A part's name
|
|
119
|
+
never starts ViewKit's reset: More's menu, standing in the page outside the bar, draws as it did before it was named. Where
|
|
120
|
+
VK-1023's second half hands your own `Button`, `Menu` and `Popover` into the bar, each is handed its part's `data-slot` and
|
|
121
|
+
`data-key` as props: draw them on the element your stylesheet styles.
|
|
122
|
+
|
|
123
|
+
| slot | the part |
|
|
124
|
+
| --- | --- |
|
|
125
|
+
| `data-slot="vk-bulk-bar"` | the bar, every form |
|
|
126
|
+
| `data-slot="vk-bulk-count"` | the count: on a computer the button that clears the selection; on the pill its words |
|
|
127
|
+
| `data-slot="vk-bulk-separator"` | the hairline after the count |
|
|
128
|
+
| `data-slot="vk-bulk-verb"` | a verb's button, `data-key` its place in the verbs |
|
|
129
|
+
| `data-slot="vk-bulk-delete"` | Delete's own button: a computer's red icon (its option `delete`), the tray's Delete |
|
|
130
|
+
| `data-slot="vk-bulk-more"` | More: a computer's, the tray's ⋯ |
|
|
131
|
+
| `data-slot="vk-bulk-clear"` | the pill's ✕ |
|
|
132
|
+
| `data-slot="vk-bulk-actions"` | the pill's Actions |
|
|
133
|
+
| `data-slot="vk-bulk-menu"` | More's menu and the pill's Actions menu: its popup on a computer, its sheet on a phone |
|
|
134
|
+
| `data-slot="vk-bulk-menu-row"` | a row in it: `data-key` its verb's place, or `delete` |
|
|
135
|
+
| `data-slot="vk-bulk-group-menu"` | a group's menu |
|
|
136
|
+
| `data-slot="vk-bulk-group-row"` | a group's row, in its menu or in More's: `data-key` its place in the group |
|
|
137
|
+
| `data-slot="vk-bulk-choice"` | a field's value in More's or Actions' menu: `data-key` its value |
|
|
138
|
+
| `data-slot="vk-bulk-empty"` | that menu's empty row (an options verb's `empty`) |
|
|
139
|
+
| `data-slot="vk-bulk-field"` | a field's popover on a computer; the Picker in it keeps its own names ([the field editors' parts](#the-field-editors-parts-vk-989)) |
|
|
140
|
+
| `data-slot="vk-bulk-field-sheet"` | a field's sheet on a phone, the Picker's names inside it |
|
|
141
|
+
| `data-slot="vk-bulk-toasts"` | where its Toast rises, just above the bar |
|
|
142
|
+
|
|
143
|
+
Delete's question (ViewKit's alert dialog) and the Toast itself are ViewKit's own and carry no part's name, nor does a menu
|
|
144
|
+
level's own ✕ on a phone (the sheet's, as the field editors' are).
|
|
145
|
+
|
|
109
146
|
## States
|
|
110
147
|
|
|
111
148
|
Flags the rendering styles, present as an attribute when true and absent when false, so a skin
|
|
@@ -120,7 +157,8 @@ attribute.
|
|
|
120
157
|
| ----------------- | ----------------- | ------------------------------------------------------ |
|
|
121
158
|
| `data-focused` | cell | the keyboard focus is here |
|
|
122
159
|
| `data-selected` | row | the row is checked |
|
|
123
|
-
| `data-hovered` | row | the app holds the row under the pointer (`GridTable`'s `hoveredRow`), drawn as a real hover draws it; a real pointer's row wears none, its look being `:hover`, so a skin dresses both |
|
|
160
|
+
| `data-hovered` | row | the app holds the row under the pointer (`GridTable`'s `hoveredRow`), or the row menu is open on it (the `RowMenu` atom's `onOpenChange`), drawn as a real hover draws it; a real pointer's row wears none, its look being `:hover`, so a skin dresses both |
|
|
161
|
+
| `data-active` | row | the active row, under `GridTable`'s `rowHighlight: "active"`: the row last pressed, or the picked cell's; it wears the row's tint, and no row tints under the pointer |
|
|
124
162
|
| `data-editing` | cell | an editor is open here |
|
|
125
163
|
| `data-in-range` | cell | inside the selected range |
|
|
126
164
|
| `data-range-edge` | cell | which edges of the range this cell draws |
|
|
@@ -320,6 +358,13 @@ for the line under every row but the last (`1px`; `0px` draws none), `--vk-field
|
|
|
320
358
|
it always has; declared on a section or any ancestor, every row in it takes them. Inside a Field rows card on a phone the
|
|
321
359
|
row is one of the card's rows, drawn by the card's frame, and none of them apply there.
|
|
322
360
|
|
|
361
|
+
**The toolbar's band is the app's to declare.** On a computer each line of a folding toolbar (the ready toolbar's, or
|
|
362
|
+
`Toolbar`'s `fold`) reads `--vk-toolbar-line-py` for its padding above and below (undeclared `calc(var(--spacing)*2.5)`,
|
|
363
|
+
what `py-2.5` drew), `--vk-toolbar-line-gap` for the room between its tools (`calc(var(--spacing)*2)`) and
|
|
364
|
+
`--vk-toolbar-line-w` for the line under it (`1px`, in `--vk-border-subtle`; `0px` draws none, for an app that draws its
|
|
365
|
+
own line edge to edge). Undeclared, the line draws as it always has; declared on the toolbar or any ancestor, every line
|
|
366
|
+
in it takes them. A phone's one line takes none of them.
|
|
367
|
+
|
|
323
368
|
**Type, lines and timing are the app's to dress, one variable per kind.** Each is optional. Undeclared, every
|
|
324
369
|
place keeps its own value, the one shown here; declared once, on the grid, a panel or an ancestor, every place of
|
|
325
370
|
that kind takes it.
|
|
@@ -403,10 +448,10 @@ renamed only with a codemod, since apps save picks by them. Not public: the word
|
|
|
403
448
|
reword. Only options live in the shape: what a piece takes from an app's own design beyond its options stays outside it.
|
|
404
449
|
|
|
405
450
|
Each default control declares its looks beside it in the controls part (its folder's `looks.ts`, listed in `LOOKS`), and
|
|
406
|
-
its stylesheet is its look stylesheet. The grid (`GRID_LOOKS`):
|
|
407
|
-
options are read by the grid's code (`GRID_LOOK_READ`):
|
|
451
|
+
its stylesheet is its look stylesheet. The grid (`GRID_LOOKS`): 27 options and two looks, `attio` and `portal`. Fifteen of its
|
|
452
|
+
options are read by the grid's code (`GRID_LOOK_READ`): twelve become the props it is handed (`gridLookProps`), and three
|
|
408
453
|
the app wires itself, `more` (pages under `GridTable`'s `pages`), `figures` (the footer's words, through the provider's
|
|
409
|
-
messages) and `wait` (`RowsWait` in the components map). The other
|
|
454
|
+
messages) and `wait` (`RowsWait` in the components map). The other twelve are its look stylesheet's: `viewkitjs/views/grid.css`,
|
|
410
455
|
inside the ready stylesheet after ViewKit's own classes, or imported by its door after them. It reaches the grid only by its
|
|
411
456
|
slots, its states, the frame's `data-grid-*` and the kit mark ViewKit's own controls carry (where the Text, Number,
|
|
412
457
|
Picker, Compound, Values or Date editor draws its own edge, the cell's outline stands down), and each option's default
|
|
@@ -437,11 +482,11 @@ peer; the provider and every other door import neither library, so an app that h
|
|
|
437
482
|
|
|
438
483
|
`Checkbox`: `ViewsCheckboxProps`. A yes/no cell in the grid draws it, handed `checked`, the column's name as `aria-label`, `tabIndex` -1 and `onCheckedChange`; a cell the grid can't write is handed `readOnly` and a press that writes nothing. A field row's yes/no draws it, handed `checked`, the field's name as `aria-label` and `onCheckedChange`, and no `tabIndex`, so it stays a Tab stop as a switch is; a row it can't write is handed `readOnly`, and a value inside the row's own button keeps the tick box. Forward `readOnly` to your control.
|
|
439
484
|
|
|
440
|
-
`Input`, optional: a single-line text box, `ViewsInputProps`. The editors' own single-line box (a duration's, the one number no body has a form for) draws through it; without it the editors draw a plain `<input>`. Forward every prop to your element, `ref` included. `chrome` is `bare` (the default: a grid cell, a panel that frames the box) or `field` (your field's frame). `OPTIONAL_COMPONENT_NAMES` lists the ten optional slots apart from `COMPONENT_NAMES`, which lists the slots you must fill.
|
|
485
|
+
`Input`, optional: a single-line text box, `ViewsInputProps`. The editors' own single-line box (a duration's, the one number no body has a form for) draws through it; without it the editors draw a plain `<input>`. Under the provider's `panelControls` the text and date editors' one-line boxes draw through it too (VK-1021), and so do Customize's name and columns search, the view menu's name box, the quick filters' search and the filter bar's typed value (VK-1014), and the name and place parts', the values and links editors' one-line boxes (VK-1022), handed ViewKit's autofill-off where the box holds a record's details (an autocomplete word and the password managers' marks: forward them to your element). Forward every prop to your element, `ref` included. `chrome` is `bare` (the default: a grid cell, a panel that frames the box) or `field` (your field's frame). `OPTIONAL_COMPONENT_NAMES` lists the ten optional slots apart from `COMPONENT_NAMES`, which lists the slots you must fill.
|
|
441
486
|
|
|
442
|
-
`Select`, optional: a box that picks one value or several, `ViewsSelectProps`. Only ViewKit's panels draw it, and only where the provider's `panelControls` names `Select
|
|
487
|
+
`Select`, optional: a box that picks one value or several, `ViewsSelectProps`. Only ViewKit's panels and field editors draw it, and only where the provider's `panelControls` names `Select`: the sort's field and direction, the filter's field, way, choices and a block's quantifier (VK-1013), New view's columns box in the view menu (VK-1014), and the place editor's country and region on a computer and the links editor's fields (VK-1022). Inside a ViewKit field it is handed the `id` its label names: put it on the box a person presses. It is handed the rows (`ViewsSelectItem`: a value, its words, an icon, a line, a group, `disabled`, and `level`, rows one level in, which `flatSelectItems` flattens for a Select that draws none), the value and `onValueChange`, `multiple`, a placeholder, `disabled`, `open` and `onOpenChange` (honour both: on a phone a panel holds the box shut and opens a step of its own), `search` (the words of ViewKit's own search), `size` (`sm` or `default`), and the part's `data-slot` and `data-key`, for the box a person presses. `CONTROLS.Select` is ViewKit's own.
|
|
443
488
|
|
|
444
|
-
`panelControls` (the provider): the names among `Button`, `Select`, `Menu`, `Popover` and `
|
|
489
|
+
`panelControls` (the provider): the names among `Button`, `Select`, `Menu`, `Popover`, `Input`, `Calendar`, `Tooltip`, `Avatar` and `RelationChip` that ViewKit's panels and field editors draw with your own (VK-1013, the sort and filter panels; VK-1014, the group editor, Customize, the views list and view menu, the quick filters' search, the filter bar's typed value and date, and every phone head a panel draws itself; VK-1021, the text, number and date editors, `Calendar` their date's month; VK-1022, the Picker wherever a ViewKit body holds it, the name and place parts, and the values and links editors; VK-1023, the bulk bar, `CONTROLS.SelectionBar`, whose Toolbar holds your Button as one of its stops: forward its `ref`; VK-1044, `Avatar`, your `atoms.Avatar` for every record's mark the panels draw: the Picker's rows, the links editor's, the bulk bar's choices, the quick filters' values and their reminder's, handed the record's `label`, `avatarUrl`, `kind` as your app names it, the panel's size in pixels (20, 24, 32 or 40; a typed Select's chip `chip`) and ViewKit's own Avatar as `fallback`; ViewKit's own Avatar atom is never counted as yours, and an atom handed without this name keeps drawing only the chips and names it always drew; VK-1015, `Tooltip`, the panels' tooltips (Add sort at its most, a set-aside rule's why, Add filter on a relation the list no longer lists), handed `content`, `side`, `align` and, where it says why something can't be used, `reason`; a tooltip ViewKit's own would never show is no tooltip, its child alone; VK-1018, under `Input`, the filter's number and range boxes too, handed `inputMode="decimal"` and the text typed, ViewKit reading it as a number by your conventions (rounded where the field takes whole numbers) and stepping it with ↑ and ↓; VK-1053, `RelationChip`, your `atoms.RelationChip` for every mentioned record, above). Inside a ViewKit field your Input is handed the `id` its label names; a popover ViewKit opens from its own button it opens itself, at that button, handed its `anchor`, and gives the focus back to it; a busy button (the Picker's Add while it adds) is handed `aria-busy` and `aria-disabled`, and a button drawn as a link stays ViewKit's. Inside a ViewKit box group (a date's line, a phone number's digits) your Input is handed `chrome="bare"`: the group draws the frame; a box that grows over lines and a search list's box stay ViewKit's. Each is handed the map's props, never ViewKit's own look, and the part's `data-slot` and `data-key`; a menu's rows carry theirs as `slot` and `key`; a menu's group comes to your Menu as a row with `children` drawn in place, a row of actions or of choices one level in as a row with `children` and `beside` (a choice's rows `checked`, its `detail` the one picked), and a link as a row with its `href` (ViewKit's own router link and new tab aren't handed, and say so in development; its `onSelect` hands no event, as every row's) (VK-1022); a clear ViewKit's own box offers (the place's "No country") comes to your Select as its first row, a pick of it handing `null`; a menu ViewKit opens from your Button it opens itself, at your Button, and gives the focus back to it. Inside the panels and the editors a ViewKit part may hand your Button, Select or Input more props than these (a tooltip's handlers, `type="tel"`, `inputMode`, `enterKeyHint`, `aria-haspopup`): forward the rest to your element. A box group's button (a phone's country, a money's currency) comes to your Button as `variant="ghost"`, `size="sm"`. A control of `CONTROLS`' stays ViewKit's whatever `panelControls` says; without it, the panels and the editors draw ViewKit's own, as before.
|
|
445
490
|
|
|
446
491
|
`Command`, optional and deprecated: the command list's parts (`ViewsCommandParts`). Nothing reads it: the grid's menus are your `Menu` and the editors' lists your `Picker`. Leave it out; it goes at a later minor.
|
|
447
492
|
|
|
@@ -449,11 +494,11 @@ peer; the provider and every other door import neither library, so an app that h
|
|
|
449
494
|
|
|
450
495
|
`LinksBody`, required: a whole links body your app draws, `ViewsLinksBodyProps`, for a relation holding several records whose field declares `links` (each link may carry roles, and one may lead). The set editor opens it in the grid and in a field row, in a popover on a computer and the sheet on a phone, in place of your `Picker`; a relation with no `links` still opens your `Picker`. It hands the field's name (`label`), the records as `ViewsPickerItem` data (`items`: the linked ones first, in the links' order, then the ones to add, filtered or fetched by the editor as for `Picker`, with `search`, `onSearch`, `doing`, `onRetry`, `onMore` and the create rows as `actions`), the links (`links`: `ViewsLink`s, `{ value, roles }`, in the order they stand), the field's roles in its order (`roles`: `ViewsLinkRole`s, `{ value, label, archived? }`; an archived one is handed so a link holding it shows its words and can let it go, and you offer it on that link alone), where the field leads `lead` (which value leads, `onLead`, and its words: making another lead never moves a line), what was typed on what opened it (`typed`), `autoFocus` and `form`, and in the phone's sheet `onStepChange`. The body hands back `onLinksChange` (the whole list, every change as it is made: a record linked, last and holding no role, or unlinked, a link's roles set) and `onDone` (it closes and saves the set). The editor drops from what comes back a value it never handed, a repeated link, a role the field doesn't declare, an archived role on a link that didn't hold it as the editor opened, and a role repeated; `onLead` with a value no link holds changes nothing. Unlinking the lead passes it to the first link left. The set saves with the lead first and, on each link, its roles in the key it was stored with: a link stored with `role` keeps `role` (its first role, or null), one stored with `roles` keeps `roles`, one stored with `role` alone gains `roles` beside it once it holds two or more, and a new link writes `roles` alone; a link whose roles didn't change is written as it was stored. Escape and Tab from inside your body's element are taken before your body hears them (Escape throws the set away; Tab walks your controls and closes from either end, which saves); a key in a popup your body draws outside its element, or in a level you mark `EDITOR_INNER_ESCAPE` inside it, is your body's. Its popover stands at your `Popover`'s own width, marked `data-vk-body="links"`. `CONTROLS.LinksBody` is ViewKit's own, the Links editor: the search on top, the linked records as rows under the field's name, Roles and Lead (a link's roles ticked in the Picker under its button, the lead a radio, ✕ to unlink), the records to add under Add; on a phone a card per link, its roles a step of the sheet with Back (`onStepChange`). It hands every query back (`onSearch`), draws the records as handed, and draws `doing`, `onMore` and the create rows.
|
|
451
496
|
|
|
452
|
-
`Calendar`, optional: a calendar over ISO days, `ViewsCalendarProps`, which the default `RangeCalendar` atom draws the filter panel's month through (the date filter, its date ranges and its custom time scope). Reached without one, it throws an error naming it. The
|
|
497
|
+
`Calendar`, optional: a calendar over ISO days, `ViewsCalendarProps`, which the default `RangeCalendar` atom draws the filter panel's month through (the date filter, its date ranges and its custom time scope). Reached without one, it throws an error naming it. The filter panel reaches it unless the app hands its own `RangeCalendar` atom. Where the provider's `panelControls` names `Calendar` (VK-1021), `CONTROLS.DateBody` draws its month with it too, in place of its own head and days, handed the day held, the month shown and its change, `locale` and `data-slot="vk-calendar"`; a day pressed in it is a day picked. Otherwise your `DateBody` alone decides. `CONTROLS.Calendar` is ViewKit's own: a month of the Date editor's days, one day a press, so an app that spreads `CONTROLS` needs no `Calendar` of its own.
|
|
453
498
|
|
|
454
499
|
`DateBody`, required: a whole date body your app draws, `ViewsDateBodyProps`. `CONTROLS.DateBody` is ViewKit's own, the Date editor. The date editor opens it in every host, handed the value on the conventions' calendar (a day, or a day and a time; a date-only field's stored instant on the browser's calendar, as its cell shows it), whether it holds a time, whether it may be emptied, the quick picks (`ViewsDatePick`: the provider's `datePicks`, by default today, tomorrow and next Monday, then `none` where it may be emptied; an app asks for a week from today by naming `in-a-week` there), today, what was typed on what opened it, `autoFocus` and `form`. The body hands back `onValueChange` (every change as it is made, a typed day once it reads as one) and `onDone` (a pick that finishes the edit). The editor keeps the draft, what each close means (Escape's keep or throw-away by field type), the save and, on a phone, the panel's ✕ and ✓: at `form: "phone"` your body draws none of its own. Escape is taken before your body hears it, so a popover of your own inside the body never hears Escape either; Tab walks your body's controls and closes from either end. An `onDone` after a plain Enter from inside your body closes the edit as Enter does (in a grid the next key lands the write first, ⌘Z included); after anything else it is a pick.
|
|
455
500
|
|
|
456
|
-
`PartsBody`, required: a whole body for a field made of parts your app draws, `ViewsPartsBodyProps`, by `kind`: `name`, `place` or `range`; `CONTROLS.PartsBody` is ViewKit's own, the Compound editor. The name, place and range editors open it in the grid and in a field row, in a popover under the value (over the cell, in the grid) on a computer and the sheet on a phone, handed the field's name, the draft as its parts, whether it may be emptied, what was typed on what opened it (already the first part's value where it reads as one), `autoFocus` and `form`. A name is handed `{ given, family, full }`, `full` as the editor's rule shows it: hand it back as handed unless the person typed one, and the editor keeps the full name following the parts until a name of its own is typed; a full name handed back as the parts joined follows them again. A place is handed its parts (`ViewsPlaceParts`), the boxes the field takes (`parts`, `ViewsPlacePart`s), those boxes in the country's own order (`rows`), each box's words for that country (`words`), the boxes it asks for (`required`), every country by name where the field takes the country (`countries`), the country's regions once loaded (`regions`), and `opens: "countries"` where the field takes a country and the place has none as the editor opens (read once, it stays as handed); the next render hands a new country's rows, words and regions. Its `regionCode` is the editor's, read from the region: a region named in the list (by its code, its name, its Latin name or its label, in any case) takes that region's label and code, any other has none, and a new country clears both. A range is handed its ends, the `decimals` the editor rounds to as it closes, its `unit
|
|
501
|
+
`PartsBody`, required: a whole body for a field made of parts your app draws, `ViewsPartsBodyProps`, by `kind`: `name`, `place` or `range`; `CONTROLS.PartsBody` is ViewKit's own, the Compound editor. The name, place and range editors open it in the grid and in a field row, in a popover under the value (over the cell, in the grid) on a computer and the sheet on a phone, handed the field's name, the draft as its parts, whether it may be emptied, what was typed on what opened it (already the first part's value where it reads as one), `autoFocus` and `form`. A name is handed `{ given, family, full }`, `full` as the editor's rule shows it: hand it back as handed unless the person typed one, and the editor keeps the full name following the parts until a name of its own is typed; a full name handed back as the parts joined follows them again. A place is handed its parts (`ViewsPlaceParts`), the boxes the field takes (`parts`, `ViewsPlacePart`s), those boxes in the country's own order (`rows`), each box's words for that country (`words`), the boxes it asks for (`required`), every country by name where the field takes the country (`countries`), the country's regions once loaded (`regions`), and `opens: "countries"` where the field takes a country and the place has none as the editor opens (read once, it stays as handed); the next render hands a new country's rows, words and regions. Its `regionCode` is the editor's, read from the region: a region named in the list (by its code, its name, its Latin name or its label, in any case) takes that region's label and code, any other has none, and a new country clears both. A range is handed its ends, the `decimals` the editor rounds to as it closes, its `unit`, its `bands`, which your body draws as picks, and, where the field states them, its limits, `min` and `max`, which each end steps within as the number body's box does (VK-904); `CONTROLS.PartsBody`'s ends step within them and draw an end typed outside back to them as its box is left. The body hands back `onValueChange` (the whole value, every change as it is made) and `onDone` (with no argument it closes as Enter does; `onDone("pick")` closes as a pick, a band picked). The editor keeps the draft, Escape's keep or throw-away by field type, the write check and the save and, on a phone, the panel's ✕ and ✓: at `form: "phone"` your body draws none of its own. Escape and Tab from inside your body's element are taken before your body hears them (Tab walks your controls and closes from either end); a key that starts in a popup your body draws outside its element (a list in a portal) is left to your body, and that popup carries `EDITOR_INNER_ESCAPE` on its root (from `viewkitjs/views/editors/panel`), so a popover that hears Escape on the document first leaves it to your popup. A level you draw inside your element (a list in your boxes' place) may carry `EDITOR_INNER_ESCAPE` too: its Escape is your body's, and the editor stays open. Call `preventDefault()` on that Escape as you close your level, so nothing around the editor takes it too (a list's Escape that clears its selection). Enter is your body's. In the phone's sheet your body is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`) while you stand on one, and `null` once you are back (*The sheet's head*). Its popover stands at your `Popover`'s own width, marked `data-vk-body="parts"`.
|
|
457
502
|
|
|
458
503
|
`ValuesBody`, required: a whole body for a field holding several emails, phones, links or domains, which your app draws, `ViewsValuesBodyProps`; `CONTROLS.ValuesBody` is ViewKit's own, the Values editor. The value list editor opens it in the grid and in a field row, in a popover under the values (over the cell, in the grid) on a computer and the sheet on a phone, handed the field's name (`label`), its type (`kind`: `email`, `phone`, `url` or `domain`), the draft as lines (`ViewsValueLine`: `{ value, label?, main }`, the main one first; `[]` when there are none, so your body draws its own line for adding one), whether a value carries a label (`labels`; false, draw none and none is saved), `holds` (`one` where the field holds one value: one line, no label, no main mark, no line to add another while it holds one), a phone's country (`region`, where a number typed without its code is read), whether it may be emptied, what was typed on what opened it (already the one line's value), `autoFocus` and `form`, and `check`, the field's own reading of a value: its reason in your app's words, or null when it reads, for your body to say as a value is added or changed. The body hands back `onValueChange` (the whole list, every change as it is made) and `onDone` (it closes as Enter does: the grid moves one row down). A line handed back as it was drawn keeps what is stored, so a phone or a link is not rewritten by opening the editor. The editor keeps the draft, Escape's keep or throw-away by field type, the write check and the save and, on a phone, the panel's ✕ and ✓: at `form: "phone"` your body draws none of its own. Escape and Tab from inside your body's element are taken before your body hears them (Tab walks your controls and closes from either end); a key that starts in a popup your body draws outside its element (a label list in a portal) is left to your body, and that popup carries `EDITOR_INNER_ESCAPE` on its root. A level you draw inside your element (a list in your rows' place) may carry `EDITOR_INNER_ESCAPE` too: its Escape is your body's, and the editor stays open. Call `preventDefault()` on that Escape as you close your level, so nothing around the editor takes it too (a list's Escape that clears its selection). Enter is your body's. In the phone's sheet your body is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`) while you stand on one, and `null` once you are back (*The sheet's head*). A list the write check refuses is said once, under your body in the panel; where Escape keeps, an Escape over a refused list shows the reason and a second Escape throws the edit away; and focus leaving your body other than by Tab doesn't close the editor (a press outside does). Its popover stands at your `Popover`'s own width, marked `data-vk-body="values"`.
|
|
459
504
|
|
|
@@ -472,15 +517,17 @@ peer; the provider and every other door import neither library, so an app that h
|
|
|
472
517
|
|
|
473
518
|
`PortsHost`, optional: what draws the ports an app leaves out, `ViewsPortsHostProps`: `toast` and `confirm` (which of them to draw) and `onReady` (hand it the ports once they stand). The provider mounts it once, after it first renders in the browser, so a server render draws neither, and only when the app hands no `toast` or no `confirm`; an app's own port always wins. Left out, a missing `toast` draws nothing and a missing `confirm` is the browser's. `CONTROLS.PortsHost` reports in ViewKit's Toast (Undo where `success` hands one) and asks in ViewKit's alert dialog, the question held in its own state, so an app's own `AlertDialogHost` never shows it twice; its words are your messages' (`views.panels.toast-undo`, `views.panels.close`, `views.panels.toast-region`, `views.panels.alert-failed`, `views.picker.retry`, `views.picker.cancel`).
|
|
474
519
|
|
|
475
|
-
`ViewMenu`, optional: one view's whole menu at an anchor, which your app draws, `ViewsViewMenuProps`; `CONTROLS.ViewMenu` is ViewKit's own (VK-947). A views row's pill (the open one on a click on it again or a right-click, another on a right-click) and a folded view's `⋮` in the "+N" list open it, on a computer, where the axis hands `verbs`; left out, they open the view's `menu` rows through `Menu`, and the row's + calls the axis's `onCreate`, as an axis without `verbs` does. It is handed `open`, `onOpenChange`, `anchor` and `align`, as `Menu` is; the view whose menu it is (`view`; left out, it stands on New view's Modal in place of a menu, as the row's + opens it where the axis grows, and tells `onOpenChange(false)` once the Modal has closed, VK-971), every view of the axis in its order (`views`, as `ViewsListBody` is handed them), the view in use (`value`) and `verbs`; `onDone` (a change opened a view, ended in the Toast, or asked for Customize: what holds it closes) and, in the "+N" list's popover, `onHold` (while it asks your `confirm` port, a press outside and Escape close nothing). `CONTROLS.ViewMenu` draws the views list's view menu (`useViewMenu`), its items reshaped by `verbs.menu`, through your `Menu`: Rename… and Save as new view… in the Modal, Delete asked through the `confirm` port and said through the `toast` port with its `undo`, each change handed to `verbs.onChange`.
|
|
520
|
+
`ViewMenu`, optional: one view's whole menu at an anchor, which your app draws, `ViewsViewMenuProps`; `CONTROLS.ViewMenu` is ViewKit's own (VK-947). A views row's pill (the open one on a click on it again or a right-click, another on a right-click) and a folded view's `⋮` in the "+N" list open it, on a computer, where the axis hands `verbs`; left out, they open the view's `menu` rows through `Menu`, and the row's + calls the axis's `onCreate`, as an axis without `verbs` does. It is handed `open`, `onOpenChange`, `anchor` and `align`, as `Menu` is; the view whose menu it is (`view`; left out, it stands on New view's Modal in place of a menu, as the row's + opens it where the axis grows, and the picker's + where the axis holds no view yet, and tells `onOpenChange(false)` once the Modal has closed, VK-971), every view of the axis in its order (`views`, as `ViewsListBody` is handed them), the view in use (`value`) and `verbs`; `onDone` (a change opened a view, ended in the Toast, or asked for Customize: what holds it closes) and, in the "+N" list's popover, `onHold` (while it asks your `confirm` port, a press outside and Escape close nothing). `CONTROLS.ViewMenu` draws the views list's view menu (`useViewMenu`), its items reshaped by `verbs.menu`, through your `Menu`: Rename… and Save as new view… in the Modal, Delete asked through the `confirm` port and said through the `toast` port with its `undo`, each change handed to `verbs.onChange`.
|
|
476
521
|
|
|
477
522
|
`SelectionBar`, optional: the selection bar, which your app draws, `ViewsSelectionBarProps`, the props of ViewKit's `SelectionBar`. Handed one, ViewKit's `SelectionBar`, wherever your `renderBar` calls it, draws yours in its own place, in the box that holds it (a grid's frame), at every count, zero included, so it can leave as it chooses; left out, ViewKit draws its own bar, portalled to the screen's foot, placed by the provider's `selectionBar`. Beside the count, the clear, the verbs, `busy`, `onDelete` and `deleteLabel`, it is handed what ViewKit's own bar doesn't read: `noun` (what a row is, one and many), `deleteLine` (the line under Delete's question), and on each verb `more` (kept off the bar, in More), on an options verb `value` (what every picked row holds, null when every one is empty), `empty` (the empty row's words; a pick of it hands `null`) and `search`, its `options` ViewKit's picker items (a person by `avatarUrl` and `kind`), and a press (`onClick`, `onSelect`, `onDelete`) may hand back a `SelectionDone`, `{ words, undo }`, or a promise of one, which yours shows. `CONTROLS.SelectionBar` is the Outright bulk bar (`BulkBar`): on a computer a surface floating at the foot of the box that holds it, centred, its count (which clears), the verbs as outlined buttons, Delete in More or its own (its option `delete`, `BULK_BAR_LOOKS`), and More, holding what is kept off and what doesn't fit; on a phone, or in a `PhoneHost` screen, the tray, its verbs at 44 with Delete among them, or the pill (its option `phone`); one Tab stop with the arrows; Escape from the box clears; an options verb's values in the Picker (in the one Sheet on a phone); Delete asked first in ViewKit's alert dialog, then called, so your `onDelete` asks nothing of its own; what a press hands back said in its own Toast, just above it, with Undo; a press that throws said as one that didn't go through. It hands the box that holds it the room it takes, which a list that scrolls in it pads its foot by ([its tokens](controls/bulk-bar.md)). The provider's `selectionBar` placement and query are ViewKit's own bar's. Every word is your messages'.
|
|
478
523
|
|
|
524
|
+
`Pane`, optional: a toolbar panel standing at the right edge of the list's box, which your app draws, `ViewsPaneProps`; `CONTROLS.Pane` is ViewKit's own Pane (VK-1026). A toolbar with `customizeIn: "pane"` opens Customize in it on a computer, in the box it is handed (`paneBox`; the ready `<List>` hands its own, `vk-list-box`), under the toolbar and as tall as the list, the list in use beside it. It is handed `open` and `onOpenChange` (it closes from inside: Escape, its ✕), `container` (the list's box: positioned, holding the grid, never scrolling itself; null until it is on the page, when it draws nothing), `opener` (the part's button, ⋯ while the part is folded into it: give it the focus back as it closes from inside), `label` (its name to a screen reader) and `children` (the panel). Left out, Customize opens in the `Popover`, as with nothing set; on a phone it opens in the `Sheet` either way, and an app's own `hosts.options` wins over it.
|
|
525
|
+
|
|
479
526
|
`ViewsListBody`, required: the views list's whole body, which your app draws, `ViewsViewsListBodyProps`; `CONTROLS.ViewsListBody` is ViewKit's own. The view picker's chip opens it: in its popover on a computer and in the Sheet on a phone. The row's pills and its "+N" list stay ViewKit's (a view's menu there is `ViewMenu`'s). It is handed the list's name (`label`), the axis's views in its order (`views`, each its `value`, its words, its `icon`, its `count` (absent while the list's counts are hidden), `private` for one of the reader's own, and `menu`, the view's own verbs as your app gave them), the view in use (`value`), `form`, and, where the axis has them, `onCreate` with its word (`createLabel`; what holds the list closes first, then the axis's own create runs) and `onReorder` with `canDrag`. The body hands back `onViewChange` (a view picked; it closes nothing, so call `onDone` after it, as `CONTROLS.ViewsListBody` closes on a pick), `onReorder` (one whole block, the shared views or the reader's own, in its new order, each once) and `onDone` (what holds it closes). On a phone where the sheet's head doesn't draw it (the provider's `sheetActions` at `bar`), it is handed `actions`, the ✕ (`close`, which closes the list) and, while it stands on a step, Back (`back`); on a computer, and under `head`, it is handed none. On a computer it is handed `onHold`: while the body holds, a press outside the list and Escape close nothing (it asks a question outside the list, your `confirm` port's dialog), so the list stays when the question is answered. On a phone it is handed `onStepChange`: a body standing on a step of its own (a view's menu, Rename) tells it, and the sheet shows the step's title and Back and its Escape goes back a step. Where the axis hands `verbs` (`ViewsViewVerbs`: the `layouts` a new view can take, each its glyph by your `AppIcon`, the `records`' noun, a board's `columns` and `onChange`, which takes every change a view's menu makes, `ViewsViewChange`: rename, create, duplicate, delete, restore, save, reset, edit, link, favorite, private), the body is handed them, and each view its `layout`, `changed` and `favorite`. ViewKit checks each value before it is written: a pick that isn't one of `views`, and an order that isn't one whole block, write nothing. What creating, reordering and a view's verbs mean stays your app's, as the axis says. `CONTROLS.ViewsListBody` is ViewKit's own, the views list: a search over the views (at the Sheet's foot on a phone), each with its glyph, its count and its ⋮ where you hand it a menu, Shared and the reader's own under their headings with a lock on each of the reader's own, a view moved by a drag or ⌥↑ ⌥↓ within its block (never one `canDrag` refuses, nor a view dropped past one), ↓ and ↑ going on from the view in use, and New view where the axis grows. It draws no ✕ of its own: the Sheet's head draws it, and `actions` goes unread but for Back on a step. On a phone a view's ⋯ turns the one Sheet into its menu, with Back, never a sheet on top (VK-823). Handed `verbs`, a view's menu is the Outright kit's (`useViewMenu`): Rename… and New view in the Modal (New view where the axis grows, as without verbs, its create handed to `verbs.onChange`), Edit view, Private view, Save for everyone, Reset and Save as new view, Copy link, Favorite, Duplicate, and Delete, asked on a computer through the `confirm` port (ViewKit's alert dialog where your app hands none and `PortsHost` stands; the menu's own dialog where neither does, never the browser's) and said through the `toast` port's `success` with its `undo`. ViewKit moves no view itself: your `verbs.onChange` opens the right one, the first listed when the open one is deleted, the view again on a restore with `open`, the new one on a create or a duplicate (whose ids your app makes); `viewsAfter`, from `viewkitjs/views/controls`, does all of it over your views; on a phone each a step of the one Sheet, the delete question the Alert in its sheet form. Every word is your messages'.
|
|
480
527
|
|
|
481
528
|
`GroupBody`, optional and deprecated: read by nothing. Only ViewKit's own Customize opened it, and that Customize is gone; a `CustomizeBody` holds its group editor inside it, handed the same props as its `group`. A map that names it still compiles; it leaves in a later release. Its props, `ViewsGroupBodyProps`, are what a `CustomizeBody`'s `group` is handed: it is handed the group's name (`label`), the fields the list can be grouped by (`dimensions`, each its `value`, its words, its `orderOptions` with the direction each opens in, its `defaultOrder`, and a date's `granularities` with its `defaultGranularity`), the group as one value (`group`, a `ViewsGroupValue`: the dimension grouped by or `none`, the active dimension's `order` (`mode` and `dir`), its date step (`granularity`), `hideEmpty` while grouped where the list offers it, and `groups` while grouped where the list hands them, in the order the list shows them, each its `key`, its words, `empty`, `hidden`, and its `count` where the list counts it), `manualOrder` (your own order, `manual`, may be picked) and `form`. The body hands back `onGroupChange` (the whole group, every change as it is made) and `onDone` (inside Customize, back to its list). ViewKit makes one write for each change, in this order: a new Group by, order or date step is written alone, the rest of the value (about the old field's groups) set aside; else Hide empty groups; else the groups: the same groups in a new order (your own order), one group shown or hidden, every group hidden, or every group shown. A new Group by keeps the order and step handed with it only where the new field offers them, else takes the field's own. A value that changes two of those at once, names a field the list doesn't offer, names an order or step the field grouped by doesn't offer, or adds or loses a group writes nothing. It is handed no `actions`. It is handed `onStepChange`, on a computer and a phone: hand it a level of your own (`ViewsBodyStep`, its `title` and `onBack`: Group by's fields, an order's choices) while you stand on one, and `null` once you are back; what holds it shows the level's name in its head and its Back calls `onBack`. `CONTROLS.GroupBody`, kept so a map that names it compiles, is ViewKit's own, the group editor: Group by, Order, Direction, a date field's Date step and Hide empty groups, each opening its choices in place; the groups with their Switch, dragged into your own order, Hide all and Show all; Remove grouping; each change one write, Count ordered by each group's `count`, its level told through `onStepChange`.
|
|
482
529
|
|
|
483
|
-
`CustomizeBody`, required: Customize's whole body, which your app draws, `ViewsCustomizeBodyProps` (`CONTROLS.CustomizeBody`, or your own). ViewKit draws no Customize of its own: Options opens it in your `host`, the map's `Popover` or, on a phone, the `Sheet`, and so does everything else that draws Customize (`ViewOptionsPanelContent`, the ready toolbar's Options, `ViewOptionsPopoverPanel`). One body holds the whole of Customize: its sections stand where your body puts them. It is handed Customize's name (`label`), the page it stands on (`page`: `list`, `layout`, `columns`, `filter`, `sort` or `group`, held by your app where it holds Options' page, so it survives the toolbar changing form) with `onPageChange`, and the view's settings as data: `layout` (the layouts, the one in use, those refused with their reasons, `onLayoutChange`, and the layout in use's own toggles, choices, density and the reader's own settings, offered where ViewKit's own Layout page offers them), `columns` (every column in the view's order, hidden or not, `hideable`, `fixed`, a card's `startsLine` and each column's own settings; `onColumnsChange` with every column in its order, written one change at a time, a reorder or columns shown or hidden, several at once in one write (your Hide all and Show all), a column that can't hide (fixed, not hideable) staying shown and a Hide all of every column leaving the first one shown, a reorder with a column shown or hidden writing nothing; with the panels' builder's `parts`, the table's columns include each part column the view places, so a Hide all reaches it; `onStartsLineChange`, `reset` while the columns differ from the view's, and your field editor's rows as `columnMenu` and `footer`), the sort as `SortBody` is handed it (`sort`; a list with one sort as one rule, `max` 1), the filter as `FilterBody` is handed it on a phone (`filter`: the whole filter, 3 levels deep), the group as `GroupBody` is handed it (`group`), `toggles` (Show counts among them, read from the view, each written through its own `onChange`), and, on a shared view, `view` (`changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`). With no shared view it is handed the foot's Clear (`onClear`) where the holder offers one and Clear all (`clearAll`) while anything is set; `foot` says the foot's words (`kit` for Clear and Save, `none` where they stand elsewhere). It hands back `onDone` (what holds it closes); on a phone where the sheet's head doesn't draw it, it is handed `actions`, the ✕ alone. The sort, filter and group are written as their own slots' are, through ViewKit's checks. A list's per-field filters (a field's values, as ViewKit's own Filter page drew them), its time range and its date ranges are handed as `fields` (`ViewsCustomizeFields`): `folded` (behind one Filter row, as a list folds them, or each its own row, as a dashboard lists them) and `items`, each with its words, what it holds (`says`, `inForce`), where its row stands (`place`), why it can't open (`disabled`), `onOpen` (asked as its screen opens), and its screen's content: `pick` (one value, its All choice first), `check` (several), `time` (presets, and `custom` with its days and each press), `dates` (a range of days) or `body` (ViewKit's own body for any other kind). Each writes through its own change. The view's name with its rename (`name`, `onRename`), Copy link (`onCopyLink`) and Export CSV with its count (`onExport`, `exportCount`) are handed where your app hands them to the toolbar (`ToolbarOptions`' and `ReadyToolbar`'s `viewName`, `onRenameView`, `onCopyLink`, `onExport`, `exportCount`); draw each only where handed. On a phone it may tell the level of its own it stands on inside a section (`onStepChange`), and the sheet's Escape goes back a level instead of closing. Your body draws everything else a list hands it: a column's own settings, your field editor's rows (`columnMenu`, `footer`) and a card layout's line breaks (`onStartsLineChange`) included.
|
|
530
|
+
`CustomizeBody`, required: Customize's whole body, which your app draws, `ViewsCustomizeBodyProps` (`CONTROLS.CustomizeBody`, or your own). ViewKit draws no Customize of its own: Options opens it in your `host`, the map's `Popover` or, on a phone, the `Sheet`, and so does everything else that draws Customize (`ViewOptionsPanelContent`, the ready toolbar's Options, `ViewOptionsPopoverPanel`). One body holds the whole of Customize: its sections stand where your body puts them. It is handed Customize's name (`label`), the page it stands on (`page`: `list`, `layout`, `columns`, `filter`, `sort` or `group`, held by your app where it holds Options' page, so it survives the toolbar changing form) with `onPageChange`, and the view's settings as data: `layout` (the layouts, the one in use, those refused with their reasons, `onLayoutChange`, and the layout in use's own toggles, choices, density and the reader's own settings, offered where ViewKit's own Layout page offers them), `columns` (every column in the view's order, hidden or not, `hideable`, `fixed`, a card's `startsLine` and each column's own settings; `onColumnsChange` with every column in its order, written one change at a time, a reorder or columns shown or hidden, several at once in one write (your Hide all and Show all), a column that can't hide (fixed, not hideable) staying shown and a Hide all of every column leaving the first one shown, a reorder with a column shown or hidden writing nothing; with the panels' builder's `parts`, the table's columns include each part column the view places, so a Hide all reaches it; `onStartsLineChange`, `reset` while the columns differ from the view's, and your field editor's rows as `columnMenu` and `footer`), the sort as `SortBody` is handed it (`sort`; a list with one sort as one rule, `max` 1), the filter as `FilterBody` is handed it on a phone (`filter`: the whole filter, 3 levels deep), the group as `GroupBody` is handed it (`group`), `toggles` (Show counts among them, read from the view, each written through its own `onChange`), and, on a shared view, `view` (`changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`, and `layered` while the reader's own layer holds something: Reset stands for it and empties it, Save doesn't). Each page's own Reset comes as `resets` (`layout`, `columns`, `filter`, `sort`, `group`, each only while that page differs from the view as saved, or with no saved view from the first page's Clear): draw it on its page, in the first page's Reset's word and look; inside it, no Clear all of the sort's or the filter's own. The same `resets` marks Customize's sections: a section shows its value in the brand only while its page is named there, a saved filter or sort at rest in the normal colour and one taken away in the brand (`CONTROLS.CustomizeBody`, VK-1048); with no `resets` handed, a section is marked while something is set in it. With no shared view it is handed the foot's Clear (`onClear`) where the holder offers one and Clear all (`clearAll`) while anything is set; `foot` says the foot's words (`kit` for Clear and Save, `none` where they stand elsewhere). It hands back `onDone` (what holds it closes); on a phone where the sheet's head doesn't draw it, it is handed `actions`, the ✕ alone. The sort, filter and group are written as their own slots' are, through ViewKit's checks. A list's per-field filters (a field's values, as ViewKit's own Filter page drew them), its time range and its date ranges are handed as `fields` (`ViewsCustomizeFields`): `folded` (behind one Filter row, as a list folds them, or each its own row, as a dashboard lists them) and `items`, each with its words, what it holds (`says`, `inForce`), where its row stands (`place`), why it can't open (`disabled`), `onOpen` (asked as its screen opens), and its screen's content: `pick` (one value, its All choice first), `check` (several), `time` (presets, and `custom` with its days and each press), `dates` (a range of days) or `body` (ViewKit's own body for any other kind). Each writes through its own change. The view's name with its rename (`name`, `onRename`), Copy link (`onCopyLink`) and Export CSV with its count (`onExport`, `exportCount`) are handed where your app hands them to the toolbar (`ToolbarOptions`' and `ReadyToolbar`'s `viewName`, `onRenameView`, `onCopyLink`, `onExport`, `exportCount`); draw each only where handed. On a phone it may tell the level of its own it stands on inside a section (`onStepChange`), and the sheet's Escape goes back a level instead of closing. Your body draws everything else a list hands it: a column's own settings, your field editor's rows (`columnMenu`, `footer`) and a card layout's line breaks (`onStartsLineChange`) included.
|
|
484
531
|
|
|
485
532
|
`RowsWait`, optional: wraps a grid's rows, `ViewsRowsWaitProps`: `pending` and `children`. Handed one, a grid that has settled always draws its rows as its children, so they stay mounted as a wait starts and ends. It stands inside the grid's scroll area, where the rows are: an ungrouped grid's column names stand above it and its footer below it, and a grouped grid's one row of column names (`oneHeader`) above it, every group inside it with its bar, column names and footer. The column names and the footer stay as they are, and take no press while the rows wait. While new rows load (`transitionPending`, or the one commit after `transitionKey` changes) and the grid already shows rows, it keeps the old ones on screen as they were drawn, inert, and hands `pending: true`: draw how they wait (a bar along the top, the rows dimmed). When the wait ends the new rows mount fresh and `pending` is false: draw `children` as they are. A grid with no rows yet, a first load or an empty grid, draws Loading in place of its body either way, and without `RowsWait` every wait does. Draw it as a block in flow that neither scrolls nor clips (no `overflow` of its own) and is no size container (no `container-type`), so the heads inside it still pin, the group labels and the empty message keep to the scroll area's width, and the rows scroll with the grid. Its top scrolls with the rows: a bar along it lies along the first row's top and leaves sight once the grid is scrolled, so a bar meant to stay in sight pins itself, sticky at `top: var(--vk-head-h)` under the column names. The slot mounts afresh when the grid changes shape (empty to rows, grouped to ungrouped, `oneHeader`), never during a wait. An editor open as the wait starts writes its draft then, as the grid going would; a draft your app refuses there keeps its refusal under the inert cell and is said in a toast when the rows mount fresh. A popup the grid opened outside its box (a column's or a row's menu, a phone's sheet) is not inert and stays as it was; what is typed in a sheet during the wait is thrown away when the rows mount fresh. The grid's paste, undo and redo wait with the rows.
|
|
486
533
|
|
|
@@ -507,7 +554,7 @@ words, always text; it may carry a `shortcut` hint and an `href`, and a `disable
|
|
|
507
554
|
`disabledReason`, why it can't be used, for you to show (a tooltip, a second line); a `checked` row is checkable and closes the menu like any row, unless it
|
|
508
555
|
carries `keepOpen`, a hint to leave the menu open so several can be ticked in turn; an
|
|
509
556
|
item's `children` are a group, its rows drawn in place under the item's label unless it carries `beside`, a hint to open them one level in, its row showing its label and `detail`, and
|
|
510
|
-
the group's own `onSelect`, `href` and `checked` are ignored, and a group marked `disabled` disables every row under it, at every depth: the provider hands your `Menu` those rows already `disabled`, each one that gives no reason carrying the group's `disabledReason`, so you draw each row by its own flag. Any row may carry `detail`, its current value in words, for its end. An adapter that draws none of the three keeps every row closing and every group in place, and loses nothing it needs. So an adapter needn't guess: a ticked row's `onSelect` fires on every pick, also when it is already ticked (a second pick of the ticked sort flips its direction), so an adapter that draws ticked rows as a radio value still calls it; ticked rows that close, inside a group, are one choice among several (a pick list), and ticked rows with `keepOpen` are separate ticks (checkboxes); a label is always text, so a swatch or a column's mark rides as the row's `icon` beside it. The sheet takes `label`, its title in words whenever the title is words (its accessible name, and the title of a head that takes only text), and, when the provider's `sheetActions` is `head`, `actions`: the editor panel's ✕ (`close`) and ✓ (`done`, absent where the body saves on its pick), or a toolbar panel's ✕ alone (`close`, which closes it), or the sort editor's ✕ (`close`, which takes its rules back to what they were as the sheet opened) and ✓ (`done`), each a `label` and an `
|
|
557
|
+
the group's own `onSelect`, `href` and `checked` are ignored, and a group marked `disabled` disables every row under it, at every depth: the provider hands your `Menu` those rows already `disabled`, each one that gives no reason carrying the group's `disabledReason`, so you draw each row by its own flag. Any row may carry `detail`, its current value in words, for its end. An adapter that draws none of the three keeps every row closing and every group in place, and loses nothing it needs. So an adapter needn't guess: a ticked row's `onSelect` fires on every pick, also when it is already ticked (a second pick of the ticked sort flips its direction), so an adapter that draws ticked rows as a radio value still calls it; ticked rows that close, inside a group, are one choice among several (a pick list), and ticked rows with `keepOpen` are separate ticks (checkboxes); a label is always text, so a swatch or a column's mark rides as the row's `icon` beside it. The sheet takes `label`, its title in words whenever the title is words (its accessible name, and the title of a head that takes only text), and, when the provider's `sheetActions` is `head`, `actions`: the editor panel's ✕ (`close`) and ✓ (`done`, absent where the body saves on its pick), or a toolbar panel's ✕ alone (`close`, which closes it), or the sort editor's ✕ (`close`, which takes its rules back to what they were as the sheet opened) and ✓ (`done`), each a `label`, an `onPress` and, on an editor panel's, a `slot` (`vk-editor-close`, `vk-editor-save`, `vk-editor-back`: draw it on your button as its `data-slot`), for your sheet's own head; with `bar`, the default, the panel draws them itself. `AppIcon` is the app's own icon component by the app's own names, for
|
|
511
558
|
the glyphs a host declares (a row's icon, a binding's icon, an option's icon), drawn on the first paint (rows are measured as they mount); the semantic glyphs the rendering itself
|
|
512
559
|
needs are a port, by meaning (below); `CONTROLS.AppIcon` draws ViewKit's own glyph of each meaning's name. `Markdown` is the
|
|
513
560
|
app's markdown renderer, handed the stored text whole; the package draws rich text through it and parses none, and
|
|
@@ -600,9 +647,9 @@ contract doesn't name is `none`.
|
|
|
600
647
|
The pieces the rendering is built from, and the app's own pieces it cannot draw itself, typed in `src/atoms/types.ts`: `List` (the rows'
|
|
601
648
|
container: the inset a run of rows sits in, inside a panel or a command list's group), `Row` (a whole row,
|
|
602
649
|
a button or, with `interactive={false}`, a static line), `RowContent` (a row's inside, for inside a
|
|
603
|
-
command list's item, which owns the element and the highlight), `TickBox` (a paint-only tick box), `Avatar` (a person's or a record's picture, `ViewsAvatarProps`: a user's, a relation's and an actor's chip draw it at `size="chip"`, and the name draws it at `size="glyph"`, sized by `--vk-glyph`, when the list's `rowIcon` hands the row's `avatar`; it is handed `label`, whose picture it is, `avatarUrl`, `kind`, the record's kind as the app names it (a relation's `entity`, `user` for a member, an actor's type), and `fallback`, the glyph the chip or the name draws without a picture; the default draws the picture, marked `data-slot="vk-avatar"`, and the fallback when there is none or it fails to load, so an app that hands none sees its chips and names as before; yours draws initials on a tone, a record in its own shape, or the fallback for a kind it doesn't dress),
|
|
650
|
+
command list's item, which owns the element and the highlight), `TickBox` (a paint-only tick box), `Avatar` (a person's or a record's picture, `ViewsAvatarProps`: a user's, a relation's and an actor's chip draw it at `size="chip"`, and the name draws it at `size="glyph"`, sized by `--vk-glyph`, when the list's `rowIcon` hands the row's `avatar`; it is handed `label`, whose picture it is, `avatarUrl`, `kind`, the record's kind as the app names it (a relation's `entity`, `user` for a member, an actor's type), and `fallback`, the glyph the chip or the name draws without a picture; the default draws the picture, marked `data-slot="vk-avatar"`, and the fallback when there is none or it fails to load, so an app that hands none sees its chips and names as before; yours draws initials on a tone, a record in its own shape, or the fallback for a kind it doesn't dress; where the provider's `panelControls` names `Avatar`, every record's mark ViewKit's panels draw is yours too, handed a pixel size, VK-1044: anything ViewKit draws on screen by itself takes your own where you hand it, and ViewKit hands it data only),
|
|
604
651
|
`StatusBadge` (a pill by status slot), `StatusMarker` (an attention badge that opens its reason) and
|
|
605
|
-
`Tag` (a category chip, removable, with an optional leading glyph), `CommandMenu` (a `command` cell's verb menu, opened from the trigger the cell drew; the default is the components map's `Menu`), `RowMenu` (the rows' right-click menu, once around each section's rows' container and aimed at the row a press or a right-click came from, its props that row's: Open page, the rows the rendering builds, Delete, where the grid's `menus.row` makes the first and last rows of `items` instead (`row-open`, `row-delete`), with one disabled `loading` row while it answers; the default is the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`), wrapped in `data-slot="vk-row-menu"`; the grid's row-menu keys send a cell the same right-click, with no press before it, so a `RowMenu` of your own opens on any `contextmenu` and doesn't wait for a press; its Delete asks the `confirm` port with `views.menus.row-delete-confirm` (the browser's own confirm when you hand none), and a delete that rejects says so through the toast port's `error` with `views.menus.row-delete-failed`; a long-press on a phone opens nothing, and with `GridTable`'s `phonePicking` on the grid's own long press picks the row, an `onToggleSelect` that answers the same held press ticking it with the grid's, once) and `RelationLink` (where a relation chip goes, around the chip the display drew; the default goes nowhere), `RelationRoles` (a link's roles, inside its chip after the record's name, on a `many` relation that declares `links`; the default draws their labels in the subtle colour after a middle dot, wrapped in `data-slot="vk-relation-roles"`, and in a narrow cell cuts them, down to nothing, before the name loses a letter), `Loading` (a wait: the list reloading, or more rows arriving; the default is a plain ring) `LoadMore` (how a list asks for its next page; the default watches a sentinel past the last row) and `PlatformMark` (a link's platform, drawn before it, read from its address with the conventions' platforms; the default draws nothing, so a link looks plain, and the package ships no brand art, so an app that wants marks draws its own by the platform's key into `data-slot="vk-platform"`), and the rows the panels (`/panels`) draw with: `ChoiceRow` (picks a value: its label, a second line, a right-hand meta, the check when chosen), `CheckRow` (toggles one of many, a tick box on the left), `RadioRow` (picks one of a set, its mark a check or, with `mark="box"`, a tick box; a disabled row's reason in your `Tooltip`), `DirectionButton` (a sort's direction arrow, named `views.panels.direction`), `MenuRow` (a drill-in row: a glyph, the section, where it stands, a chevron; a disabled row's reason in your `Tooltip`), `ToggleRow` (a boolean flipped in place, with a way back named `views.panels.toggle-reset`; a disabled row's reason in your `Tooltip`) and `PanelSearch` (a panel's text box, a filled well with a magnifier), and `Pill` (one option of a row of pills, the views row's and any tab row's: `active`, a `solid` or `plain` variant, a `default` or `sm` size, a leading glyph, the app's own active and hover classes for a status colour; with `menuOpen` it says it opens a menu, `aria-haspopup="menu"` and `aria-expanded`), and `ToolbarButton` (a toolbar's button, the one every toolbar part draws with: its glyph, its name, its word for a dress that shows words, a count in its corner, which becomes a ✕ badge that clears what it counts when handed `onClear`, a dot that says something is applied with no number, `open`, `changed`, `edge` for the row's outermost button, `disabled`, a `md` or `sm` size, and `popup` when it opens one; and, for the sort (VK-188), its own words shown whatever the dress, with their weight, in `data-slot="vk-toolbar-words"` (`children`: "Sorted by **Amount**"), a count in words after them in `data-slot="vk-toolbar-more"` (`more`: "+1"), an empty place with its edge dashed and `data-empty` (`empty`), and a reason it can't be used, `disabledReason` with `disabled`, in your `Tooltip`, the button then `aria-disabled` and still a Tab stop, a press doing nothing; its own words are then its name, with `more` after them, in place of `label`; and, in a folding toolbar line with no room, `iconAlone`, its words given up for its icon, `data-icon-alone`, which you draw as the icon alone whatever your dress says of words; `aside`, what it names left the list, its edge dashed in the warning's colour, `data-aside`; `foot`, New's + standing alone at a phone list's foot, round, a finger's size, on the brand's ground, `data-foot`; `joined` (`start`, `middle` or `end`), one of buttons joined as one (a filter's field, how it compares, its value, its menu), its corners on the outer side alone, no gap, the shared edge drawn once, `data-joined` with the value; and `waits`, its words saying what it waits for (a filter's value not yet picked), drawn in `--vk-fg-subtlest`, the placeholder's colour, `data-waits`; its own words keep to one line and give way to a holder that caps its width, cut with "…", where an icon button keeps its size; and, told what it is where your own toolbar frame draws it (VK-629), `current` (a view tab, `data-tab`; `true` the open one, `data-current` and `aria-current="true"`), `part` (which of the toolbar's own buttons it stands for, drawn as its `data-slot`: `views-chip` `vk-views-chip`, `views-tab` `vk-views-tab`, `views-more` `vk-views-more`, `views-add` `vk-views-add`, `clear` `vk-toolbar-clear`, `save` `vk-toolbar-save-button`; the default draws the chip and "+N" with a chevron after their words, `data-slot="vk-toolbar-chevron"`, and Save on an edge) and `onContextMenu` (a right-click: a tab's verbs open on it); and wherever it stands (VK-984), `part` naming every other button after its toolbar place (`sort`, `filter`, `options`, `search`, `quick`, `new`, `filters`, `filter-add`, `sort-pill`, `sort-add`, `advanced-filters`, `more-filters`, ⋯ `more`), which the default draws as it always did, and `className`, its place's class, put on the button). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
|
|
652
|
+
`Tag` (a category chip, removable, with an optional leading glyph), `CommandMenu` (a `command` cell's verb menu, opened from the trigger the cell drew; the default is the components map's `Menu`), `RowMenu` (the rows' right-click menu, once around each section's rows' container and aimed at the row a press or a right-click came from, its props that row's: Open page, the rows the rendering builds, Delete, where the grid's `menus.row` makes the first and last rows of `items` instead (`row-open`, `row-delete`), with one disabled `loading` row while it answers; the default is the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`), wrapped in `data-slot="vk-row-menu"`; the grid's row-menu keys send a cell the same right-click, with no press before it, so a `RowMenu` of your own opens on any `contextmenu` and doesn't wait for a press; its Delete asks the `confirm` port with `views.menus.row-delete-confirm` (the browser's own confirm when you hand none), and a delete that rejects says so through the toast port's `error` with `views.menus.row-delete-failed`; a long-press on a phone opens nothing, and with `GridTable`'s `phonePicking` on the grid's own long press picks the row, an `onToggleSelect` that answers the same held press ticking it with the grid's, once; `onOpenChange`, called as the menu opens and closes, holds the row it is aimed at as under the pointer while it is open, `data-hovered`, its tint and its ⋯, which the default calls) and `RelationLink` (where a relation chip goes, around the chip the display drew; the default goes nowhere), `RelationRoles` (a link's roles, inside its chip after the record's name, on a `many` relation that declares `links`; the default draws their labels in the subtle colour after a middle dot, wrapped in `data-slot="vk-relation-roles"`, and in a narrow cell cuts them, down to nothing, before the name loses a letter), `RelationChip` (a mentioned record, `ViewsRelationChipProps`: every relation ViewKit draws, in a table's cell, one and many and the +N list, a field row's value and `renderFieldValue`, a highlight's, and a user field's chip, where the provider's `panelControls` names `RelationChip` (VK-1053); ViewKit places a mentioned record and hands its data; your app draws it: it is handed `relation` (its `id`, `label`, `entity`, the record's kind as the app names it, `user` for a member, and `avatarUrl`), `roles` (a link's, each its `value` and `label`, 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 (handed your element's props, it draws the host's element with them: a cell whose host opens its relations a bare `<button data-slot="vk-relation-link" data-no-nav>` whose press is the host's, the app's `RelationLink` or a host's `relationWrap` around a `<span>` holding them; absent for an inert fact and where the host's own element owns the click, `slotOwnsClick`; ViewKit never makes one up), and `fallback`, ViewKit's own chip as it would draw it there; the default draws its `fallback`, so with nothing named every place draws as before, and an app that hands the atom without naming it sees no change; a typed Select's chip is not one: a control stands without the provider), `Loading` (a wait: the list reloading, or more rows arriving; the default is a plain ring) `LoadMore` (how a list asks for its next page; the default watches a sentinel past the last row) and `PlatformMark` (a link's platform, drawn before it, read from its address with the conventions' platforms; the default draws nothing, so a link looks plain, and the package ships no brand art, so an app that wants marks draws its own by the platform's key into `data-slot="vk-platform"`), and the rows the panels (`/panels`) draw with: `ChoiceRow` (picks a value: its label, a second line, a right-hand meta, the check when chosen), `CheckRow` (toggles one of many, a tick box on the left), `RadioRow` (picks one of a set, its mark a check or, with `mark="box"`, a tick box; a disabled row's reason in your `Tooltip`), `DirectionButton` (a sort's direction arrow, named `views.panels.direction`), `MenuRow` (a drill-in row: a glyph, the section, where it stands, a chevron; a disabled row's reason in your `Tooltip`), `ToggleRow` (a boolean flipped in place, with a way back named `views.panels.toggle-reset`; a disabled row's reason in your `Tooltip`) and `PanelSearch` (a panel's text box, a filled well with a magnifier), and `Pill` (one option of a row of pills, the views row's and any tab row's: `active`, a `solid` or `plain` variant, a `default` or `sm` size, a leading glyph, the app's own active and hover classes for a status colour; with `menuOpen` it says it opens a menu, `aria-haspopup="menu"` and `aria-expanded`), and `ToolbarButton` (a toolbar's button, the one every toolbar part draws with: its glyph, its name, its word for a dress that shows words, a count in its corner, which becomes a ✕ badge that clears what it counts when handed `onClear`, a dot that says something is applied with no number, `open`, `changed`, `edge` for the row's outermost button, `disabled`, a `md` or `sm` size, and `popup` when it opens one; and, for the sort (VK-188), its own words shown whatever the dress, with their weight, in `data-slot="vk-toolbar-words"` (`children`: "Sorted by **Amount**"), a count in words after them in `data-slot="vk-toolbar-more"` (`more`: "+1"), an empty place with its edge dashed and `data-empty` (`empty`), and a reason it can't be used, `disabledReason` with `disabled`, in your `Tooltip`, the button then `aria-disabled` and still a Tab stop, a press doing nothing; its own words are then its name, with `more` after them, in place of `label`; and, in a folding toolbar line with no room, `iconAlone`, its words given up for its icon, `data-icon-alone`, which you draw as the icon alone whatever your dress says of words; `aside`, what it names left the list, its edge dashed in the warning's colour, `data-aside`; `foot`, New's + standing alone at a phone list's foot, round, a finger's size, on the brand's ground, `data-foot`; `joined` (`start`, `middle` or `end`), one of buttons joined as one (a filter's field, how it compares, its value, its menu), its corners on the outer side alone, no gap, the shared edge drawn once, `data-joined` with the value; and `waits`, its words saying what it waits for (a filter's value not yet picked), drawn in `--vk-fg-subtlest`, the placeholder's colour, `data-waits`; its own words keep to one line and give way to a holder that caps its width, cut with "…", where an icon button keeps its size; and, told what it is where your own toolbar frame draws it (VK-629), `current` (a view tab, `data-tab`; `true` the open one, `data-current` and `aria-current="true"`), `part` (which of the toolbar's own buttons it stands for, drawn as its `data-slot`: `views-chip` `vk-views-chip`, `views-tab` `vk-views-tab`, `views-more` `vk-views-more`, `views-add` `vk-views-add`, `clear` `vk-toolbar-clear`, `save` `vk-toolbar-save-button`; the default draws the chip and "+N" with a chevron after their words, `data-slot="vk-toolbar-chevron"`, and Save on an edge) and `onContextMenu` (a right-click: a tab's verbs open on it); and wherever it stands (VK-984), `part` naming every other button after its toolbar place (`sort`, `filter`, `options`, `search`, `quick`, `new`, `filters`, `filter-add`, `sort-pill`, `sort-add`, `advanced-filters`, `more-filters`, ⋯ `more`), which the default draws as it always did, and `className`, its place's class, put on the button). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
|
|
606
653
|
from the app's colours; an app swaps any of them through the provider's `atoms`, and the rest
|
|
607
654
|
stay the defaults. `SelectionSheet` is the phone's sheet of a selection's verbs, opened by the
|
|
608
655
|
selection bar's Actions: the default is the components map's `Sheet` holding the atoms' rows, a group's
|
|
@@ -766,7 +813,7 @@ apart from the rest; each name starts with its panel's: `vk-sort-`, `vk-filter-`
|
|
|
766
813
|
section's, a toggle's, a verb's), and a sort rule or a filter's item its place, `data-index`, from 0. Two filter rules on one field share a
|
|
767
814
|
`data-key`, and a filter's `data-index` counts again from 0 at each level of its groups. Where your own `Menu` draws a part (a
|
|
768
815
|
view's menu), it is handed the part's `data-slot` as a prop (`ViewsMenuProps`), and so are your `Button`, `Select`, `Menu`,
|
|
769
|
-
`Popover` and `Input` inside the
|
|
816
|
+
`Popover` and `Input` inside the panels, the text, number and date editors, the Picker, the name and place parts and the values and links editors under the provider's `panelControls` (VK-1013, VK-1014, VK-1021, VK-1022; a menu's rows by their item's `slot`
|
|
770
817
|
and `key`): draw them on the element your stylesheet styles. ViewKit's own Select, Input, Radio,
|
|
771
818
|
Toggle, PaneHead, PaneFoot and Notice draw a name a panel hands them on their box. The Picker's own parts (its search, its rows, its actions) are the Picker's; a panel row the Picker draws carries the
|
|
772
819
|
panel's name. A row drawn from data takes its name from its entry's `slot` (`PartSlot`: `slot`, `key`, `index`), on a Menu list's
|
|
@@ -803,13 +850,13 @@ entry and choice and a Picker's item.
|
|
|
803
850
|
`data-slot="vk-customize-name"` (the view's name) and `data-slot="vk-customize-layout-button"` (its layout's mark beside it),
|
|
804
851
|
`data-slot="vk-customize-section"` (a section's row, `data-key` `layout`, `columns`, `filter`, `sort` or `group`),
|
|
805
852
|
`data-slot="vk-customize-field"` (a field's own filter row, `data-key` its field), `data-slot="vk-customize-toggle"` (a toggle's row,
|
|
806
|
-
`data-key` its key; Show counts `counts`), `data-slot="vk-customize-
|
|
853
|
+
`data-key` its key; Show counts `counts`), `data-slot="vk-customize-choice"`
|
|
807
854
|
(a pick-one setting's row, `data-key` its key) and `data-slot="vk-customize-option"` (one of its options, `data-key` its value),
|
|
808
855
|
`data-slot="vk-customize-heading"` (a heading, `data-key` where it has one), `data-slot="vk-customize-layout"` (a layout's card,
|
|
809
856
|
`data-key` its id), `data-slot="vk-customize-search"` (Columns' search), `data-slot="vk-customize-column"` (a column's row,
|
|
810
|
-
`data-key` its id), `data-slot="vk-customize-columns-action"` (Hide all, Show all,
|
|
811
|
-
`show-all
|
|
812
|
-
`copy-link`, `export`, `reset` or `
|
|
857
|
+
`data-key` its id), `data-slot="vk-customize-columns-action"` (Hide all, Show all, `data-key` `hide-all`,
|
|
858
|
+
`show-all`), `data-slot="vk-customize-foot"` (its foot), `data-slot="vk-customize-changes"` (Reset and Save for everyone, over it, or a page's own Reset), `data-slot="vk-customize-action"` (a foot button, `data-key`
|
|
859
|
+
`copy-link`, `export`, `reset`, `save`, or `page-reset`, a page's own Reset) and `data-slot="vk-customize-stale"` (the note that the shared view moved).
|
|
813
860
|
- The views list (`CONTROLS.ViewsListBody`): `data-slot="vk-views-list"` (the list), `data-slot="vk-views-list-row"` (a view's row,
|
|
814
861
|
`data-key` its id) and `data-slot="vk-views-list-head"` (a phone's step head). A view's menu: `data-slot="vk-view-menu"` (the
|
|
815
862
|
menu), `data-slot="vk-view-menu-row"` (a row, `data-key` its item's key: `rename`, `edit`, `copy-link`, …),
|
|
@@ -821,7 +868,17 @@ entry and choice and a Picker's item.
|
|
|
821
868
|
`data-slot="vk-quick-field"` (a field's pill, `data-key` its id), `data-slot="vk-quick-search"` (the search),
|
|
822
869
|
`data-slot="vk-quick-value"` (a value, `data-key` the value, `data-held` while it is held: read it beside the name, since the
|
|
823
870
|
Picker's rows carry a `data-held` of their own), `data-slot="vk-quick-count"` (its
|
|
824
|
-
count), `data-slot="vk-quick-clear"` (a held value's ✕) and `data-slot="vk-quick-none"` (nothing found).
|
|
871
|
+
count), `data-slot="vk-quick-clear"` (a held value's ✕) and `data-slot="vk-quick-none"` (nothing found, or a field with nothing to pick).
|
|
872
|
+
- The last parts round the panels (VK-1003): the filter bar's own popover names its typed value's box
|
|
873
|
+
`data-slot="vk-filter-part-value"` and a range's two numbers `data-slot="vk-filter-part-pair"` (the row they stand in);
|
|
874
|
+
the quick filters' strip of fields is `data-slot="vk-quick-strip"` and its values' list `data-slot="vk-quick-values"`
|
|
875
|
+
(`data-key` the field's id); Customize's empty line is `data-slot="vk-customize-none"` (`data-key` `columns` where no column
|
|
876
|
+
matches the search, `choices` where a field has nothing to pick), a column's own rows `data-slot="vk-customize-rows"`
|
|
877
|
+
(`data-key` its id) and Columns' foot rows `data-slot="vk-customize-columns-foot"`. A phone menu's sheet carries its menu's name,
|
|
878
|
+
and on a phone the views list's step that holds a view's menu is named `vk-view-menu` too, its rows `vk-view-menu-row`
|
|
879
|
+
whether or not the axis hands `verbs`. A panel's own phone head (the quick filters', the views list's step, Customize's in a
|
|
880
|
+
Sheet of yours) names its ✕ and ‹ `vk-editor-close` and `vk-editor-back`, as the sort's and filter's do (and their ✓
|
|
881
|
+
`vk-editor-save`).
|
|
825
882
|
|
|
826
883
|
Lists that scroll wear the class `scrollbar-overlay`, which an app may define (to show the OS
|
|
827
884
|
overlay scrollbar, say); without it the class does nothing.
|
|
@@ -834,7 +891,8 @@ a desktop and its `Sheet` on a phone, and marks its parts with these slots:
|
|
|
834
891
|
| slot | the element |
|
|
835
892
|
| ---------------------------------- | ------------------------------------------------------------- |
|
|
836
893
|
| `data-slot="vk-editor-panel"` | the popover's panel, or the sheet's body, an editor sits in |
|
|
837
|
-
| `data-slot="vk-editor-bar"` | the sheet's bar: its
|
|
894
|
+
| `data-slot="vk-editor-bar"` | the sheet's bar, its one head: its ✕, its name and its ✓ (none with `sheetActions: "head"`, where the sheet's head holds them) |
|
|
895
|
+
| `data-slot="vk-editor-title"` | the bar's name: the field's, or a step's |
|
|
838
896
|
| `data-slot="vk-editor-refusal"` | the reason a refused value gave, under the editor; in a popover that scrolls, pinned to its bottom edge |
|
|
839
897
|
| `data-slot="vk-text-editor"` | a read-only text's box (`viewkitjs/views/editors/text`), unless its host names its own |
|
|
840
898
|
|
|
@@ -1098,7 +1156,8 @@ the pager's `views.grid.pager` ("Pages", its name), `views.grid.pager-range` (`{
|
|
|
1098
1156
|
`views.grid.pager-next` ("Next"),
|
|
1099
1157
|
`views.grid.loading` ("Loading rows"), the labels `views.grid.select-row`, `views.grid.select-group`,
|
|
1100
1158
|
`views.grid.select-all`, `views.grid.row-menu`, `views.grid.group-expand`, `views.grid.group-collapse`,
|
|
1101
|
-
`views.grid.change-value
|
|
1159
|
+
`views.grid.change-value` and `views.grid.value` (a long text's box), `views.grid.edit-value` (deprecated, read by
|
|
1160
|
+
nothing: a writable long text edits in the text body; removed in a later release),
|
|
1102
1161
|
`views.grid.read-only` and `views.grid.read-only-why` (a locked list's badge and its title); its refusals
|
|
1103
1162
|
`views.grid.locked` (`{ field }`), `views.grid.not-clearable`, `views.grid.computed` (`{ from }`),
|
|
1104
1163
|
`views.grid.cell-read-only`, `views.grid.clear-none` and `views.grid.clear-required` (`{ fields }`, the fields a clear
|
|
@@ -1193,7 +1252,7 @@ group order), `views.panels.groups-hide-all` ("Hide all"), `views.panels.groups-
|
|
|
1193
1252
|
`views.panels.group-remove` ("Remove grouping") and `views.panels.group-empty` ("—", the empty group's name);
|
|
1194
1253
|
a dragging list's rows: `views.panels.move`, `views.panels.show` and `views.panels.hide` (`{ label }`, "Move
|
|
1195
1254
|
Status", "Show Status", "Hide Status"); the Columns list and one column's settings:
|
|
1196
|
-
`views.panels.columns-reset` ("Reset columns"), `views.panels.column-visible` ("Visible"), the reasons a disabled Visible switch or eye gives, `views.panels.column-always-shown` ("This column always shows") and `views.panels.column-last-shown` ("One column must stay shown"),
|
|
1255
|
+
`views.panels.columns-reset` ("Reset columns", drawn nowhere since Columns resets through its page's Reset), `views.panels.column-visible` ("Visible"), the reasons a disabled Visible switch or eye gives, `views.panels.column-always-shown` ("This column always shows") and `views.panels.column-last-shown` ("One column must stay shown"),
|
|
1197
1256
|
`views.panels.new-line-first` ("The first field already starts the card"), `views.panels.new-line-on`
|
|
1198
1257
|
(`{ label }`, "Owner starts a new line"), `views.panels.new-line-start` (`{ label }`, "Start a new line at
|
|
1199
1258
|
Owner") and `views.panels.new-line-hidden` (a hidden field's new-line reason: "A hidden field isn't on the card"); the Layout panel's: `views.panels.layout-options` ("Options"), `views.panels.layout-density`
|
|
@@ -1220,7 +1279,7 @@ rows' and pages' names where the list names none, `views.panels.filter` ("Filter
|
|
|
1220
1279
|
changed since you started."); and its actions, `views.panels.copy-link` ("Copy link to view"),
|
|
1221
1280
|
`views.panels.export-csv` ("Export CSV"), `views.panels.share` ("Share"), `views.panels.coming-soon` ("Coming
|
|
1222
1281
|
soon", a parked action's hint) and `views.panels.loading` ("Loading", the export's spinner).
|
|
1223
|
-
The words the panels' builder writes into its configs (`settingsPanels`, `/panels`): the layouts, `views.panels.layout-table` ("Table"), `views.panels.layout-list` ("List"), `views.panels.layout-board` ("Board"), `views.panels.layout-calendar` ("Calendar"), with `views.panels.layout-rows` ("Rows", the list as the phone choice names it), and the reasons one is refused, `views.panels.layout-refused-calendar` ("No date field") and `views.panels.layout-refused-board` ("No field to lay a board out by"); the look, `views.panels.look-vertical-borders` ("Vertical borders"), `views.panels.look-row-icon` ("Row icon"), `views.panels.look-freeze-identity` ("Freeze identity columns"), `views.panels.look-always-checkboxes` ("Show checkboxes always"); the densities, `views.panels.density-compact` ("Compact"), `views.panels.density-default` ("Default"), `views.panels.density-spacious` ("Spacious"); the Layout panel's choices, `views.panels.board-field` ("Board by"), `views.panels.calendar-field` ("Date field"), `views.panels.card-fields` ("Fields") (a card's Columns row) and `views.panels.phone-layout` ("On your phone"); Sort's `views.panels.sort-manual` ("Manual"); the sort pill and the sort editor's (VK-188), `views.panels.sorted-by` ("Sorted by", before the first rule's field), `views.panels.sort-more` (`{ count }`, "+{count}"), `views.panels.sort-add-one` ("Add a sort", the +'s name), `views.panels.sort-add` ("Add sort"), `views.panels.sort-clear-all` ("Clear all"), `views.panels.sort-sorted` ("Sorted", a field already sorted), `views.panels.sort-max` (`{ max }`, "Three at most"), `views.panels.sort-empty` ("No sorting set up yet") and `views.panels.sort-empty-line` ("Choose a field to sort by"), `views.panels.sort-ascending` ("Ascending") and `views.panels.sort-descending` ("Descending"), `views.panels.sort-direction` ("Direction", its menu's name), with `views.panels.sort-field-named` and `views.panels.sort-direction-named` (`{ label }`, "Field: {label}", "Direction: {label}", a rule's two boxes named with what they hold), `views.panels.sort-delete` ("Delete"), `views.panels.sort-move` (`{ label }`, "Move {label}", a rule's grip), `views.panels.sort-remove` (`{ label }`, "Remove the sort by {label}"), `views.panels.sort-actions` (`{ label }`, "Actions for the sort by {label}", a phone's ⋯), `views.panels.sort-search` ("Search fields") and `views.panels.sort-done` ("Done", the phone sheet's ✓), and `CONTROLS.SortBody`'s own (VK-721), `views.panels.sort-field` ("Field", a rule's field box), `views.panels.sort-clear-all-sorts` ("Clear all sorts", a computer's foot) and `views.panels.sort-by-named` (`{ label }`, "the sort by {label}", a rule's ⋯ menu); `CONTROLS.FilterBody`'s and `CONTROLS.FilterPartBody`'s own (VK-720), `views.panels.filter-group-list` ("Group", a group's rules to a screen reader), `views.panels.filter-rule-named` (`{ label }`, "{label}'s rule", a rule's ⋮), `views.panels.filter-way-named` (`{ label }`, "How {label} compares", a way's list and its step), `views.panels.filter-choose-date` ("Choose a date"), `views.panels.filter-type-number` ("Type a number") and `views.panels.filter-type-value` ("Type a value"), a value's placeholders, `views.panels.filter-from-named` and `views.panels.filter-to-named` (`{ label }`, "{label} from", "{label} to", a range's two ends), `views.panels.filter-checked` ("Checked") and `views.panels.filter-unchecked` ("Unchecked"), a yes/no's two values, and `views.panels.filter-kit-way` (`{ way }`, the kit's ways in their words: "is any of", "less than", "any part between"); `CONTROLS.GroupBody`'s own (VK-839), `views.panels.group-order` ("Order", the group's order setting), `views.panels.group-date-step` ("Date step", a date field's step setting), `views.panels.group-order-own` ("Your own", your own order), `views.panels.group-own-no-direction` ("Your own order has no direction", why Direction is greyed), `views.panels.group-no-value` ("No value", the empty group), and its rows' own, `views.panels.list-move-keys` ("Left arrow for its grip, then up or down arrow to move it", how a computer's rows move), `views.panels.list-move-hold` ("Hold, then drag to move it", a phone's) and `views.panels.list-moved` (`{ label, at, of }`, "{label}, {at} of {of}", a move said), a grip named by `views.panels.sort-move` and a Switch's words by `views.panels.toggle-on` and `views.panels.toggle-off`; `CONTROLS.CustomizeBody`'s own (VK-840), `views.panels.customize-list` ("Customize", its list to a screen reader), `views.panels.customize-shown` ("Shown in the table", on a table), `views.panels.customize-shown-fields` ("Shown", on another layout) and `views.panels.customize-hidden` ("Hidden"), Columns' headings, `views.panels.customize-search` ("Search columns", a computer's) and `views.panels.customize-find` ("Find a column", a phone's), `views.panels.customize-no-column` (`{ words }`, "No column is named “{words}”"), `views.panels.customize-always-shown` ("Always shown", why the first column can't hide), `views.panels.customize-view-name` ("The view's name", its box), `views.panels.customize-layout-button` (`{ name }`, "Layout: {name}", the layout's button beside the name), `views.panels.customize-layout-settings` (`{ name }`, "{name} settings", a layout's settings to a screen reader), `views.panels.customize-share` ("Share the view", its footer) and `views.panels.column-settings` (`{ label }`, "{label} settings", the › opening a column's own settings); the quick filters' (VK-563), `views.panels.quick-filters` ("Quick filters", the button and its panel), `views.panels.quick-fields` ("Fields", the strip's name), `views.panels.quick-search` (`{ field }`, "Search {field}"), `views.panels.quick-none` ("Nothing matches."), `views.panels.quick-value` (`{ label, count }`, "{label}, {count}", a value with its count to a screen reader, the count already in the reader's digits), `views.panels.quick-empty` ("No value", a held empty value no value lists), `CONTROLS.QuickFiltersBody`'s own (VK-724), `views.panels.quick-clear-value` ("Clear filter", a held value's words before its count), and the reminder's on a phone (VK-566), `views.panels.quick-reminder` (`{ names }`, "Quick filters: {names}", its names to a screen reader, every held value named once), `views.panels.quick-more` (`{ count }`, "+{count}", the names it doesn't show) and `views.panels.quick-clear` ("Clear quick filters", its ✕); the advanced filter and the filter editor's (VK-531), `views.panels.advanced-filter` ("Advanced filter", its pill), `views.panels.advanced-filter-set-aside` ("Its rules are set aside", why a pill whose rules are all set aside is drawn set aside), `views.panels.filter-join` (`{ join }`, "And" or "Or"), `views.panels.filter-add` ("Add filter"), `views.panels.filter-clear-all-filters` ("Clear all filters"), `views.panels.filter-to-group` ("Convert to group"), `views.panels.filter-delete-rule` ("Delete condition"), `views.panels.filter-delete-group` ("Delete group"), `views.panels.filter-exclude` ("Exclude matches"), `views.panels.filter-exclude-needs-and` ("Join by And to exclude matches"), `views.panels.filter-excluded` ("Not all of these", heading a group that excludes its matches), `views.panels.filter-to-advanced` ("Convert to advanced filter", a filter's page in the Filter panel, and a row of a filter's ⋯ on the bar), `views.panels.filter-field` ("Field"), `views.panels.filter-way` ("How it compares") and `views.panels.filter-value` ("Value"), a rule's three boxes and a bar filter's three parts, `views.panels.filter-choose` ("Choose", drawn nowhere: a value waiting says `views.panels.filter-waits`), `views.panels.filter-search` ("Filter by…"), `views.panels.filter-relation-way` (`{ quantifier }`, "any where", "none where", "every where"), `views.panels.filter-rule-actions` (`{ label }`, "Actions for the filter on {label}", a rule's ⋮), `views.panels.filter-group-actions` ("Actions for this group"), `views.panels.filter-set-aside-why` (`{ reason }`, a set-aside filter's why: "Set aside: its field is no longer in this list", "Set aside: its field no longer compares this way", "Set aside: its field no longer has this part"), `views.panels.sort-set-aside-why` (`{ reason }`, a set-aside sort's: "Set aside: its field is no longer in this list", else "Set aside: its field no longer sorts this way"), `views.panels.filter-set-aside-back` and `views.panels.sort-set-aside-back` (a set-aside filter's or sort's why once its field is listed again: "Set aside: its field is back in this list, and Put back filters by it again", "… and Put back sorts by it again"), `views.panels.put-back` ("Put back"), `views.panels.filter-or-full` ("This view's filter joins by Or and is three levels deep: change it in its advanced filter", the rows' reason), `views.panels.filter-too-deep` ("Three levels at most"), `views.panels.filter-too-many` ("Fifty filters at most in one group") and `views.panels.filter-relation-gone` ("Its relation is no longer in this list", Add filter's reason under a relation the list no longer lists); the filter editor on a phone's (VK-532), `views.panels.filter-empty` ("No filtering set up yet") and `views.panels.filter-empty-line` ("Choose a field to filter by"), `views.panels.filter-clear-all` ("Clear all") and `views.panels.filter-done` ("Done", the phone sheet's ✓); the filters on the toolbar's bar, `views.panels.filter-waits` (`{ type }`, what a filter's value waits for, on the bar and in the filter editor's value box: "Choose" for a choice, "Type a number", "Choose a date", "Type a value"), `views.panels.filter-way-words` (`{ label }`, how it compares as the bar says it, the way's label with its first letter in lower case, "is any of"), `views.panels.filter-far-field` (`{ relation, field }`, "Company › Industry", a related record's field), `views.panels.filter-rule-words` (`{ field, way, value }`, "Stage is any of Talking", the sentence that names a filter), `views.panels.filter-add-one` ("Add a filter", the +'s name), `views.panels.filter-delete` ("Delete filter"), `views.panels.filter-more` (`{ count }`, "+1 filter", "+{count} filters") and `views.panels.filter-more-named` (`{ count }`, "1 more filter", "{count} more filters", its name); what a screen reader hears of a drag in the parts that drag (VK-401), each row by its label, `views.panels.drag-instructions` ("To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel."), `views.panels.drag-picked-up` (`{ label }`, "Picked up draggable item {label}."), `views.panels.drag-over` (`{ label, over }`, "Draggable item {label} was moved over droppable area {over}."), `views.panels.drag-not-over` (`{ label }`, "Draggable item {label} is no longer over a droppable area."), `views.panels.drag-dropped-over` (`{ label, over }`, "Draggable item {label} was dropped over droppable area {over}"), `views.panels.drag-dropped` (`{ label }`, "Draggable item {label} was dropped.") and `views.panels.drag-cancelled` (`{ label }`, "Dragging was cancelled. Draggable item {label} was dropped."); the Group panel's orders `views.panels.group-order-date` ("Date") and `views.panels.group-order-lifecycle` ("Lifecycle"); and a date's granularities, `views.panels.granularity-relative` ("Relative"), `views.panels.granularity-due` ("Due"), `views.panels.granularity-day` ("Day"), `views.panels.granularity-week` ("Week"), `views.panels.granularity-month` ("Month"), `views.panels.granularity-year` ("Year").
|
|
1282
|
+
The words the panels' builder writes into its configs (`settingsPanels`, `/panels`): the layouts, `views.panels.layout-table` ("Table"), `views.panels.layout-list` ("List"), `views.panels.layout-board` ("Board"), `views.panels.layout-calendar` ("Calendar"), with `views.panels.layout-rows` ("Rows", the list as the phone choice names it), and the reasons one is refused, `views.panels.layout-refused-calendar` ("No date field") and `views.panels.layout-refused-board` ("No field to lay a board out by"); the look, `views.panels.look-vertical-borders` ("Vertical borders"), `views.panels.look-row-icon` ("Row icon"), `views.panels.look-freeze-identity` ("Freeze identity columns"), `views.panels.look-always-checkboxes` ("Show checkboxes always"); the densities, `views.panels.density-compact` ("Compact"), `views.panels.density-default` ("Default"), `views.panels.density-spacious` ("Spacious"); the Layout panel's choices, `views.panels.board-field` ("Board by"), `views.panels.calendar-field` ("Date field"), `views.panels.card-fields` ("Fields") (a card's Columns row) and `views.panels.phone-layout` ("On your phone"); Sort's `views.panels.sort-manual` ("Manual"); the sort pill and the sort editor's (VK-188), `views.panels.sorted-by` ("Sorted by", before the first rule's field), `views.panels.sort-more` (`{ count }`, "+{count}"), `views.panels.sort-add-one` ("Add a sort", the +'s name), `views.panels.sort-add` ("Add sort"), `views.panels.sort-clear-all` ("Clear all"), `views.panels.sort-sorted` ("Sorted", a field already sorted), `views.panels.sort-max` (`{ max }`, "Three at most"), `views.panels.sort-empty` ("No sorting set up yet") and `views.panels.sort-empty-line` ("Choose a field to sort by"), `views.panels.sort-ascending` ("Ascending") and `views.panels.sort-descending` ("Descending"), `views.panels.sort-direction` ("Direction", its menu's name), with `views.panels.sort-field-named` and `views.panels.sort-direction-named` (`{ label }`, "Field: {label}", "Direction: {label}", a rule's two boxes named with what they hold), `views.panels.sort-delete` ("Delete"), `views.panels.sort-move` (`{ label }`, "Move {label}", a rule's grip), `views.panels.sort-remove` (`{ label }`, "Remove the sort by {label}"), `views.panels.sort-actions` (`{ label }`, "Actions for the sort by {label}", a phone's ⋯), `views.panels.sort-search` ("Search fields") and `views.panels.sort-done` ("Done", the phone sheet's ✓), and `CONTROLS.SortBody`'s own (VK-721), `views.panels.sort-field` ("Field", a rule's field box), `views.panels.sort-clear-all-sorts` ("Clear all sorts", a computer's foot) and `views.panels.sort-by-named` (`{ label }`, "the sort by {label}", a rule's ⋯ menu); `CONTROLS.FilterBody`'s and `CONTROLS.FilterPartBody`'s own (VK-720), `views.panels.filter-group-list` ("Group", a group's rules to a screen reader), `views.panels.filter-rule-named` (`{ label }`, "{label}'s rule", a rule's ⋮), `views.panels.filter-way-named` (`{ label }`, "How {label} compares", a way's list and its step), `views.panels.filter-choose-date` ("Choose a date"), `views.panels.filter-type-number` ("Type a number") and `views.panels.filter-type-value` ("Type a value"), a value's placeholders, `views.panels.filter-from-named` and `views.panels.filter-to-named` (`{ label }`, "{label} from", "{label} to", a range's two ends), `views.panels.filter-checked` ("Checked") and `views.panels.filter-unchecked` ("Unchecked"), a yes/no's two values, and `views.panels.filter-kit-way` (`{ way }`, the kit's ways in their words: "is any of", "less than", "any part between"); `CONTROLS.GroupBody`'s own (VK-839), `views.panels.group-order` ("Order", the group's order setting), `views.panels.group-date-step` ("Date step", a date field's step setting), `views.panels.group-order-own` ("Your own", your own order), `views.panels.group-own-no-direction` ("Your own order has no direction", why Direction is greyed), `views.panels.group-no-value` ("No value", the empty group), and its rows' own, `views.panels.list-move-keys` ("Left arrow for its grip, then up or down arrow to move it", how a computer's rows move), `views.panels.list-move-hold` ("Hold, then drag to move it", a phone's) and `views.panels.list-moved` (`{ label, at, of }`, "{label}, {at} of {of}", a move said), a grip named by `views.panels.sort-move` and a Switch's words by `views.panels.toggle-on` and `views.panels.toggle-off`; `CONTROLS.CustomizeBody`'s own (VK-840), `views.panels.customize-list` ("Customize", its list to a screen reader), `views.panels.customize-shown` ("Shown in the table", on a table), `views.panels.customize-shown-fields` ("Shown", on another layout) and `views.panels.customize-hidden` ("Hidden"), Columns' headings, `views.panels.customize-search` ("Search columns", a computer's) and `views.panels.customize-find` ("Find a column", a phone's), `views.panels.customize-no-column` (`{ words }`, "No column is named “{words}”"), `views.panels.customize-always-shown` ("Always shown", why the first column can't hide), `views.panels.customize-view-name` ("The view's name", its box), `views.panels.customize-layout-button` (`{ name }`, "Layout: {name}", the layout's button beside the name), `views.panels.customize-layout-settings` (`{ name }`, "{name} settings", a layout's settings to a screen reader), `views.panels.customize-share` ("Share the view", its footer) and `views.panels.column-settings` (`{ label }`, "{label} settings", the › opening a column's own settings); the quick filters' (VK-563), `views.panels.quick-filters` ("Quick filters", the button and its panel), `views.panels.quick-fields` ("Fields", the strip's name), `views.panels.quick-search` (`{ field }`, "Search {field}"), `views.panels.quick-none` ("Nothing matches."), `views.panels.filter-no-options` ("Nothing to pick.", a field with no value to pick), `views.panels.quick-value` (`{ label, count }`, "{label}, {count}", a value with its count to a screen reader, the count already in the reader's digits), `views.panels.quick-empty` ("No value", a held empty value no value lists), `CONTROLS.QuickFiltersBody`'s own (VK-724), `views.panels.quick-clear-value` ("Clear filter", a held value's words before its count), and the reminder's on a phone (VK-566), `views.panels.quick-reminder` (`{ names }`, "Quick filters: {names}", its names to a screen reader, every held value named once), `views.panels.quick-more` (`{ count }`, "+{count}", the names it doesn't show) and `views.panels.quick-clear` ("Clear quick filters", its ✕); the advanced filter and the filter editor's (VK-531), `views.panels.advanced-filter` ("Advanced filter", its pill), `views.panels.advanced-filter-set-aside` ("Its rules are set aside", why a pill whose rules are all set aside is drawn set aside), `views.panels.filter-join` (`{ join }`, "And" or "Or"), `views.panels.filter-add` ("Add filter"), `views.panels.filter-clear-all-filters` ("Clear all filters"), `views.panels.filter-to-group` ("Convert to group"), `views.panels.filter-delete-rule` ("Delete condition"), `views.panels.filter-delete-group` ("Delete group"), `views.panels.filter-exclude` ("Exclude matches"), `views.panels.filter-exclude-needs-and` ("Join by And to exclude matches"), `views.panels.filter-excluded` ("Not all of these", heading a group that excludes its matches), `views.panels.filter-to-advanced` ("Convert to advanced filter", a filter's page in the Filter panel, and a row of a filter's ⋯ on the bar), `views.panels.filter-field` ("Field"), `views.panels.filter-way` ("How it compares") and `views.panels.filter-value` ("Value"), a rule's three boxes and a bar filter's three parts, `views.panels.filter-choose` ("Choose", drawn nowhere: a value waiting says `views.panels.filter-waits`), `views.panels.filter-search` ("Filter by…"), `views.panels.filter-relation-way` (`{ quantifier }`, "any where", "none where", "every where"), `views.panels.filter-rule-actions` (`{ label }`, "Actions for the filter on {label}", a rule's ⋮), `views.panels.filter-group-actions` ("Actions for this group"), `views.panels.filter-set-aside-why` (`{ reason }`, a set-aside filter's why: "Set aside: its field is no longer in this list", "Set aside: its field no longer compares this way", "Set aside: its field no longer has this part"), `views.panels.sort-set-aside-why` (`{ reason }`, a set-aside sort's: "Set aside: its field is no longer in this list", else "Set aside: its field no longer sorts this way"), `views.panels.filter-set-aside-back` and `views.panels.sort-set-aside-back` (a set-aside filter's or sort's why once its field is listed again: "Set aside: its field is back in this list, and Put back filters by it again", "… and Put back sorts by it again"), `views.panels.put-back` ("Put back"), `views.panels.filter-or-full` ("This view's filter joins by Or and is three levels deep: change it in its advanced filter", the rows' reason), `views.panels.filter-too-deep` ("Three levels at most"), `views.panels.filter-too-many` ("Fifty filters at most in one group") and `views.panels.filter-relation-gone` ("Its relation is no longer in this list", Add filter's reason under a relation the list no longer lists); the filter editor on a phone's (VK-532), `views.panels.filter-empty` ("No filtering set up yet") and `views.panels.filter-empty-line` ("Choose a field to filter by"), `views.panels.filter-clear-all` ("Clear all") and `views.panels.filter-done` ("Done", the phone sheet's ✓); the filters on the toolbar's bar, `views.panels.filter-waits` (`{ type }`, what a filter's value waits for, on the bar and in the filter editor's value box: "Choose" for a choice, "Type a number", "Choose a date", "Type a value"), `views.panels.filter-way-words` (`{ label }`, how it compares as the bar says it, the way's label with its first letter in lower case, "is any of"), `views.panels.filter-far-field` (`{ relation, field }`, "Company › Industry", a related record's field), `views.panels.filter-rule-words` (`{ field, way, value }`, "Stage is any of Talking", the sentence that names a filter), `views.panels.filter-add-one` ("Add a filter", the +'s name), `views.panels.filter-delete` ("Delete filter"), `views.panels.filter-more` (`{ count }`, "+1 filter", "+{count} filters") and `views.panels.filter-more-named` (`{ count }`, "1 more filter", "{count} more filters", its name); what a screen reader hears of a drag in the parts that drag (VK-401), each row by its label, `views.panels.drag-instructions` ("To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel."), `views.panels.drag-picked-up` (`{ label }`, "Picked up draggable item {label}."), `views.panels.drag-over` (`{ label, over }`, "Draggable item {label} was moved over droppable area {over}."), `views.panels.drag-not-over` (`{ label }`, "Draggable item {label} is no longer over a droppable area."), `views.panels.drag-dropped-over` (`{ label, over }`, "Draggable item {label} was dropped over droppable area {over}"), `views.panels.drag-dropped` (`{ label }`, "Draggable item {label} was dropped.") and `views.panels.drag-cancelled` (`{ label }`, "Dragging was cancelled. Draggable item {label} was dropped."); the Group panel's orders `views.panels.group-order-date` ("Date") and `views.panels.group-order-lifecycle` ("Lifecycle"); and a date's granularities, `views.panels.granularity-relative` ("Relative"), `views.panels.granularity-due` ("Due"), `views.panels.granularity-day` ("Day"), `views.panels.granularity-week` ("Week"), `views.panels.granularity-month` ("Month"), `views.panels.granularity-year` ("Year").
|
|
1224
1283
|
The selection bar's words are under `views.selection.*`: `views.selection.count` (`{ count }`, "3 selected",
|
|
1225
1284
|
the phone sheet's title), `views.selection.selected` (the word after the count the bar draws),
|
|
1226
1285
|
`views.selection.deselect-all` (the count chip), `views.selection.clear` (the phone's ✕),
|
|
@@ -1284,7 +1343,7 @@ A field whose changes are transitions with rules of their own (a lost deal needs
|
|
|
1284
1343
|
|
|
1285
1344
|
## The doors
|
|
1286
1345
|
|
|
1287
|
-
Twenty-
|
|
1346
|
+
Twenty-six doors in this version, and nothing else is importable but `./package.json`; the panels' two (`/panels` and `/panels/react`) and the list's (`/list`) are described last, the controls' (`/controls`) on its own reference page. What each holds is summarised here; each door's reference page names every export, one line each, starting at [`reference/views.md`](reference/views.md).
|
|
1288
1347
|
|
|
1289
1348
|
`viewkitjs/views`, no React at runtime, holds two things. The rendering contract, every name listed:
|
|
1290
1349
|
the constants `VK_PREFIX`, `GRID_SLOTS`, `GRID_STATES`, `VK_TOKENS`, `VK_COLOURS`,
|
|
@@ -1317,7 +1376,7 @@ public; nothing else at the root door is.
|
|
|
1317
1376
|
`ViewsClipboardPort`, `ViewsPrefsPort`, `ViewsConfirmPort`, `ViewsConfirmRequest` and `ViewsResolvedPorts` (the
|
|
1318
1377
|
ports `useViews()` hands on, `confirm` always there); the atoms' `DEFAULT_VIEWS_ATOMS` and types `ViewsAtoms`,
|
|
1319
1378
|
`ViewsListProps`, `ViewsRowProps`, `ViewsRowContentProps`, `ViewsTickBoxProps`, `ViewsAvatarProps`, `ViewsStatusBadgeProps`,
|
|
1320
|
-
`ViewsStatusMarkerProps`, `ViewsTagProps`, `ViewsCommandMenuProps`, `ViewsRowMenuProps`, `ViewsRowMenuItem`, `ViewsRelationLinkProps`, `ViewsRelationRolesProps`, `ViewsLoadingProps`, `ViewsLoadMoreProps` and `ViewsPlatformMarkProps`; and, re-exported from the root door, `ComponentName`,
|
|
1379
|
+
`ViewsStatusMarkerProps`, `ViewsTagProps`, `ViewsCommandMenuProps`, `ViewsRowMenuProps`, `ViewsRowMenuItem`, `ViewsRelationLinkProps`, `ViewsRelationRolesProps`, `ViewsRelationChipProps`, `ViewsRelationChipLinkProps`, `ViewsLoadingProps`, `ViewsLoadMoreProps` and `ViewsPlatformMarkProps`; and, re-exported from the root door, `ComponentName`,
|
|
1321
1380
|
`PortName`, `ViewsIconName`, `ViewsMessage` and `ViewsMessageResolver`. The provider takes an
|
|
1322
1381
|
optional `presentation`, `(defaults: FieldPresentation) => FieldPresentation`: how the app's numbers,
|
|
1323
1382
|
dates and durations read — given the package's defaults (in the conventions' locale), return the
|
|
@@ -1523,6 +1582,16 @@ as it loads (`loadPanelsDrag`), so the door itself loads in plain Node without t
|
|
|
1523
1582
|
them, and an app that takes only the grid, or only the panels' pure door, never does. It stays
|
|
1524
1583
|
apart from `/panels` so a server file can read the panels' settings and words without shipping a panel.
|
|
1525
1584
|
|
|
1585
|
+
`viewkitjs/views/list`: a whole list. The ready `List` (`ListProps`: `id`, `fields`, `rows`
|
|
1586
|
+
or `source`, the rest optional) is a `ListRoot` around `ListToolbar`, `ListGrid` and `ListBulkBar`; `ListRoot` holds one
|
|
1587
|
+
list's state in a store outside React, read by any part inside it through `useList(select)`, and `ListSlot` with
|
|
1588
|
+
`ListFill` draw a part outside the list's tree. A list's rows come from memory or a source (`ListSource`,
|
|
1589
|
+
`fetchSource`); its saved views sit behind a `ViewsStore` (`browserViewsStore` by default, `ViewSeed`,
|
|
1590
|
+
`ViewDraft`, `SavedViewInput`, `ListViewsOptions`, `ListViewsState`); every menu is data (`ListMenus`, `MenuPlace`, and
|
|
1591
|
+
`menu`'s `drop`, `rename`, `add` and `move`), and the toolbar's parts too (`toolbarParts`, typed by
|
|
1592
|
+
`/panels/react`'s `ToolbarParts`). Its toolbar reaches dnd-kit as `/panels/react` does, through `import()`. Every export, one line
|
|
1593
|
+
each: [`reference/list.md`](reference/list.md); what an app writes with it: [Install](install.md).
|
|
1594
|
+
|
|
1526
1595
|
## Registry items
|
|
1527
1596
|
|
|
1528
1597
|
When the copy mode ships, each view's default rendering is one registry item, tagged by the package
|
|
@@ -35,3 +35,7 @@ What it stands in on a phone, its panel or a Sheet, is the Alert's Opens as (`da
|
|
|
35
35
|
| `--vk-radius-lg` | size | `radius-lg` | `10px` |
|
|
36
36
|
| `--vk-radius-xl` | size | `radius-xl` | `15px` |
|
|
37
37
|
| `--vk-radius-3xl` | size | `radius-3xl` | `26.67px` |
|
|
38
|
+
|
|
39
|
+
## Inside a panel
|
|
40
|
+
|
|
41
|
+
Inside a panel under the provider's `panelControls` (the view menu's Rename and New view, and its Delete on a phone) its buttons are the app's own Button, ViewKit's anywhere else (VK-1014). On a computer the view menu's Delete is asked through the `confirm` port: ViewKit's own (`PortsHost`) stays ViewKit's, so hand your own `confirm` to draw that question yourself.
|
|
@@ -28,3 +28,7 @@ How far its words stand from the panel's edge is the alert dialog's (`--alert-pa
|
|
|
28
28
|
| `--vk-warning-subtler` | colour | `background-warning-subtler` | `hsl(19 72% 92.5%)` · dark `hsl(20 29% 13.5%)` |
|
|
29
29
|
| `--vk-warning` | colour | `text-warning` | `hsl(25 92% 41%)` · dark `hsl(25 92% 41%)` |
|
|
30
30
|
| `--vk-danger-subtler` | colour | `background-danger-subtler` | `hsl(6 100% 94%)` · dark `hsl(6 27% 14.5%)` |
|
|
31
|
+
|
|
32
|
+
## Inside a panel
|
|
33
|
+
|
|
34
|
+
Inside a panel under the provider's `panelControls` (the view menu's Rename and New view, and its Delete on a phone) its buttons are the app's own Button, ViewKit's anywhere else (VK-1014). On a computer the view menu's Delete is asked through the `confirm` port: ViewKit's own (`PortsHost`) stays ViewKit's, so hand your own `confirm` to draw that question yourself.
|
|
@@ -33,6 +33,9 @@ Every name the Avatar's stylesheet (`avatar.css`) reads, each optional: the read
|
|
|
33
33
|
| `--vk-label-pink` | colour | `label-pink` | `hsl(335 73% 49.5%)` · dark `hsl(335 73% 57.5%)` |
|
|
34
34
|
| `--vk-label-teal` | colour | `label-teal` | `hsl(192 87% 32%)` · dark `hsl(192 87% 40%)` |
|
|
35
35
|
| `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
36
|
+
| `--vk-neutral-hovered` | colour | `background-neutral-hovered` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
|
|
37
|
+
| `--vk-neutral-bold` | colour | `gray-400` | `hsl(210 1% 88%)` · dark `hsl(210 2% 19%)` |
|
|
38
|
+
| `--vk-border-input` | colour | `border-input` | `hsl(220 3% 86%)` · dark `hsl(220 4% 22%)` |
|
|
36
39
|
| `--vk-person-1` | colour | `person-1` | `#d7a77e` |
|
|
37
40
|
| `--vk-person-2` | colour | `person-2` | `#93b6ce` |
|
|
38
41
|
| `--vk-person-3` | colour | `person-3` | `#afc98f` |
|
|
@@ -37,5 +37,11 @@ The bar draws its surface, its place, its count, the room its Toast rises in, an
|
|
|
37
37
|
| `--vk-radius-sm` | size | `radius-sm` | `5px` |
|
|
38
38
|
| `--vk-radius-xl` | size | `radius-xl` | `15px` |
|
|
39
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)` · dark `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
|
|
40
|
-
| `--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)
|
|
40
|
+
| `--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)` |
|
|
41
41
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
42
|
+
|
|
43
|
+
## Its parts
|
|
44
|
+
|
|
45
|
+
The bar names every part it draws, and every part of what it opens, with a public `data-slot`: `vk-bulk-bar`, `vk-bulk-count`, `vk-bulk-separator`, `vk-bulk-verb`, `vk-bulk-delete`, `vk-bulk-more`, `vk-bulk-clear`, `vk-bulk-actions`, `vk-bulk-menu`, `vk-bulk-menu-row`, `vk-bulk-group-menu`, `vk-bulk-group-row`, `vk-bulk-choice`, `vk-bulk-empty`, `vk-bulk-field`, `vk-bulk-field-sheet`, `vk-bulk-toasts` (`BULK_BAR_SLOTS`). A verb, on the bar and as a menu's row, says which one it is by `data-key`, its place in the verbs; its measured copy wears the same. Dress a part by its name, never by a class: [the bulk bar's parts](../contract.md#the-bulk-bars-parts-vk-1023).
|
|
46
|
+
|
|
47
|
+
Under the provider's `panelControls` (VK-1023) the bar draws your own controls: every verb, Delete, More, the pill's ✕ and Actions is your `Button`, handed its part's name, and stays one of the stops of the bar's Toolbar (one Tab stop, the arrows, Home and End), so forward the `ref` it is handed; the copies the bar measures to know how many verbs fit are your Button too. More's and a group's rows are your `Menu`, a group's verbs and a field's values as rows one level in; a field's Picker stands in your `Popover` on a computer. The count's Toolbar button, the hairline, the Toast, a phone's field Sheet and Delete's question (the alert dialog) stay ViewKit's; the question's buttons are yours, as in every panel. With nothing opted in, or `components={CONTROLS}`, it draws as before.
|
|
@@ -21,3 +21,5 @@ It also sets the popup line's own `--popup-line-more` and `--popup-line-under` o
|
|
|
21
21
|
## Its parts
|
|
22
22
|
|
|
23
23
|
The Name, Place and Range editor names every part it draws with a public `data-slot`, the same in the grid, the field row and a phone's sheet, on the box a person sees: `vk-parts`, `vk-parts-field`, `vk-parts-box`, `vk-parts-line`, `vk-parts-own`, `vk-parts-card`, `vk-parts-pair`, `vk-parts-note`, `vk-parts-bands`. Each part's field and box say which part they are by `data-key` (`given`, `city`, `low`…). Its ✕, ✓ and a step's ‹ are `vk-editor-close`, `vk-editor-save` and `vk-editor-back`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
24
|
+
|
|
25
|
+
Under the provider's `panelControls` its one-line boxes and, on a computer, its country and region boxes are the app's own, handed each part's name and the id their field's label names (VK-1022). What stays ViewKit's: [reshaping](../reshaping.md).
|
|
@@ -20,4 +20,6 @@ The Menu list, the Radio, the Input, the Button, the Notice, the Pane and the Sh
|
|
|
20
20
|
|
|
21
21
|
Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
|
|
22
22
|
|
|
23
|
-
`vk-customize`, `vk-customize-head`, `vk-customize-title`, `vk-customize-back`, `vk-customize-close`, `vk-customize-layout-button`, `vk-customize-name`, `vk-customize-heading`, `vk-customize-section`, `vk-customize-field`, `vk-customize-toggle`, `vk-customize-
|
|
23
|
+
`vk-customize`, `vk-customize-head`, `vk-customize-title`, `vk-customize-back`, `vk-customize-close`, `vk-customize-layout-button`, `vk-customize-name`, `vk-customize-heading`, `vk-customize-section`, `vk-customize-field`, `vk-customize-toggle`, `vk-customize-choice`, `vk-customize-option`, `vk-customize-layout`, `vk-customize-column`, `vk-customize-search`, `vk-customize-columns-action`, `vk-customize-foot`, `vk-customize-changes`, `vk-customize-action`, `vk-customize-stale`, `vk-customize-none`, `vk-customize-rows`, `vk-customize-columns-foot`.
|
|
24
|
+
|
|
25
|
+
Under the provider's `panelControls` its buttons, boxes that pick and text boxes are the app's own, each handed its part's name (VK-1014). On a phone in a Sheet of the app's, its own head names its ‹ and ✕ `vk-editor-back` and `vk-editor-close`, the app's Button where `panelControls` names it.
|
|
@@ -45,3 +45,5 @@ It also reads other controls' own names where it stands inside them, the Popover
|
|
|
45
45
|
## Its parts
|
|
46
46
|
|
|
47
47
|
The Date editor names every part it draws with a public `data-slot`, the same in the grid, the field row and a phone's sheet, on the box a person sees: `vk-date`, `vk-calendar`, `vk-date-line`, `vk-date-reads`, `vk-date-error`, `vk-date-time`, `vk-date-head`, `vk-date-prev`, `vk-date-next`, `vk-date-month`, `vk-date-year`, `vk-date-days`, `vk-date-weekdays`, `vk-date-day`, `vk-date-choices`, `vk-date-choice`, `vk-date-quarters`, `vk-date-quarter`, `vk-date-parts`, `vk-date-part`, `vk-date-segment`, `vk-date-sep`, `vk-date-picks`, `vk-date-pick`, `vk-date-card`, `vk-date-wheels`, `vk-date-wheel`, `vk-date-wheel-row`. The default Calendar is `vk-calendar`, and its head and days take the same names; a quick pick says which by `data-key` (`today`, `tomorrow`, `none`…). Its ✕, ✓ and a step's ‹ are `vk-editor-close`, `vk-editor-save` and `vk-editor-back`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
48
|
+
|
|
49
|
+
Under the provider's `panelControls` its buttons and one-line boxes are the app's own, handed each part's name (VK-1021). Its month is the app's `Calendar` where `panelControls` names one. What stays ViewKit's: [reshaping](../reshaping.md).
|
|
@@ -33,4 +33,4 @@ Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dr
|
|
|
33
33
|
|
|
34
34
|
`vk-filter`, `vk-filter-rules`, `vk-filter-item`, `vk-filter-rule`, `vk-filter-where`, `vk-filter-joined`, `vk-filter-join`, `vk-filter-field`, `vk-filter-how`, `vk-filter-value`, `vk-filter-rule-more`, `vk-filter-rule-action`, `vk-filter-group`, `vk-filter-group-head`, `vk-filter-quantifier`, `vk-filter-group-more`, `vk-filter-group-action`, `vk-filter-delete`, `vk-filter-add`, `vk-filter-clear`, `vk-filter-foot`, `vk-filter-none`, `vk-filter-excluded`, `vk-filter-head`.
|
|
35
35
|
|
|
36
|
-
Under the provider's `panelControls` its buttons, boxes that pick, menus, popovers and text boxes are the app's own, each handed its part's name (VK-1013).
|
|
36
|
+
Under the provider's `panelControls` its buttons, boxes that pick, menus, popovers and text boxes are the app's own, each handed its part's name (VK-1013). The filter bar's own popover (`FilterPartBody`) names its typed value's box `vk-filter-part-value` and a range's two numbers `vk-filter-part-pair` (VK-1003); its words' box is the app's Input there too, and a date part the date editor with the app's controls (VK-1014, VK-1021); its number boxes are the app's Input too, ViewKit reading the number (VK-1018), and its tooltips the app's Tooltip where `panelControls` names it (VK-1015).
|
|
@@ -15,3 +15,5 @@ The Menu list, the Picker, the Button and the Sheet it draws with read their own
|
|
|
15
15
|
Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
|
|
16
16
|
|
|
17
17
|
`vk-group`, `vk-group-setting`, `vk-group-choice`, `vk-group-heading`, `vk-group-value`, `vk-group-hide-all`, `vk-group-remove`.
|
|
18
|
+
|
|
19
|
+
Under the provider's `panelControls` its Hide all is the app's own Button, handed its part's name (VK-1014); its field list and that list's search are the Picker's.
|