viewkitjs 0.32.0 → 0.34.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 +98 -0
- package/fields/dist/index.d.ts +1 -1
- package/fields/dist/index.js +1 -1
- package/fields/dist/query/evaluate.d.ts +7 -0
- package/fields/dist/query/exact-number.d.ts +8 -2
- package/fields/dist/query/exact-number.js +14 -1
- package/fields/dist/query/sort.js +13 -10
- package/fields/dist/registry.js +5 -1
- package/fields/dist/types.d.ts +4 -1
- package/fields/dist/zod.d.ts +5 -0
- package/fields/dist/zod.js +10 -1
- package/fields/docs/guides/contact-values.md +12 -0
- package/fields/docs/guides/field-types.md +1 -1
- package/fields/docs/guides/queries.md +3 -1
- package/fields/docs/reference/fields.md +1 -0
- package/package.json +1 -1
- package/postgres/dist/check.js +4 -1
- package/postgres/dist/definitions/formula-forms.js +3 -1
- package/postgres/dist/definitions/money.js +2 -1
- package/postgres/dist/page.js +6 -3
- package/postgres/dist/rules.d.ts +15 -1
- package/postgres/dist/rules.js +16 -0
- package/postgres/dist/sort.js +7 -2
- package/postgres/docs/guides/definitions.md +1 -1
- package/postgres/docs/guides/field-map.md +1 -1
- package/postgres/docs/reference/definitions.md +1 -1
- package/postgres/docs/reference/postgres.md +1 -1
- package/views/dist/atoms/ToolbarButton.d.ts +1 -1
- package/views/dist/atoms/ToolbarButton.js +4 -3
- package/views/dist/atoms/frame-parts.d.ts +6 -0
- package/views/dist/atoms/frame-parts.js +15 -0
- package/views/dist/atoms/types.d.ts +16 -7
- package/views/dist/cells/cell-title.d.ts +3 -1
- package/views/dist/cells/cell-title.js +2 -2
- package/views/dist/cells/cell-values.js +2 -2
- package/views/dist/contract.d.ts +46 -11
- package/views/dist/contract.js +157 -0
- package/views/dist/controls/alert/alert.js +2 -1
- package/views/dist/controls/alert-dialog/alert-dialog.js +3 -2
- package/views/dist/controls/bulk-bar/bulk-bar.js +25 -22
- package/views/dist/controls/button/map-button.js +2 -0
- package/views/dist/controls/checkbox/checkbox.d.ts +3 -2
- package/views/dist/controls/checkbox/checkbox.js +2 -2
- package/views/dist/controls/compound-editor/compound-editor.d.ts +1 -1
- package/views/dist/controls/compound-editor/name-parts.js +4 -4
- package/views/dist/controls/compound-editor/place-parts.js +19 -19
- package/views/dist/controls/compound-editor/range-parts.js +14 -14
- package/views/dist/controls/compound-editor/row.d.ts +3 -1
- package/views/dist/controls/compound-editor/row.js +2 -2
- package/views/dist/controls/controls.d.ts +4 -0
- package/views/dist/controls/controls.js +4 -0
- package/views/dist/controls/customize/customize.js +43 -39
- package/views/dist/controls/customize/map-customize-body.d.ts +2 -0
- package/views/dist/controls/customize/map-customize-body.js +7 -2
- package/views/dist/controls/date-editor/date-days.js +2 -2
- package/views/dist/controls/date-editor/date-editor.d.ts +3 -0
- package/views/dist/controls/date-editor/date-editor.js +27 -21
- package/views/dist/controls/date-editor/date-parts.js +6 -6
- package/views/dist/controls/date-editor/map-calendar.js +3 -1
- 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/date-editor.css +2 -2
- package/views/dist/controls/field/field.d.ts +3 -0
- package/views/dist/controls/field/field.js +6 -6
- package/views/dist/controls/filter-editor/block.d.ts +2 -2
- package/views/dist/controls/filter-editor/block.js +5 -5
- package/views/dist/controls/filter-editor/filter-editor.js +31 -33
- package/views/dist/controls/filter-editor/how.d.ts +3 -1
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +3 -0
- package/views/dist/controls/filter-editor/map-filter-body.js +11 -4
- package/views/dist/controls/filter-editor/map-rules.js +1 -1
- package/views/dist/controls/filter-editor/parts.d.ts +3 -1
- package/views/dist/controls/filter-editor/parts.js +8 -6
- package/views/dist/controls/group-editor/group-editor.js +17 -14
- 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 +2 -0
- package/views/dist/controls/index.js +1 -0
- package/views/dist/controls/input/input.js +4 -3
- package/views/dist/controls/input/map-input.js +2 -0
- package/views/dist/controls/internal/editor-parts.js +1 -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.d.ts +8 -0
- package/views/dist/controls/internal/map-panel-controls.js +20 -0
- package/views/dist/controls/internal/panel-controls.d.ts +58 -0
- package/views/dist/controls/internal/panel-controls.js +240 -0
- package/views/dist/controls/internal/part-slot.d.ts +12 -0
- package/views/dist/controls/internal/part-slot.js +5 -0
- package/views/dist/controls/links-editor/links-editor.d.ts +1 -1
- package/views/dist/controls/links-editor/links-editor.js +27 -27
- package/views/dist/controls/menu/map-menu.d.ts +2 -2
- package/views/dist/controls/menu/map-menu.js +15 -12
- package/views/dist/controls/menu/menu.d.ts +3 -0
- package/views/dist/controls/menu/menu.js +5 -5
- package/views/dist/controls/menu-list/menu-list.d.ts +14 -4
- package/views/dist/controls/menu-list/menu-list.js +23 -22
- package/views/dist/controls/modal/modal.js +5 -3
- package/views/dist/controls/notice/notice.d.ts +3 -1
- package/views/dist/controls/notice/notice.js +2 -2
- package/views/dist/controls/number-editor/map-number-body.js +5 -1
- package/views/dist/controls/number-editor/number-editor.d.ts +1 -1
- package/views/dist/controls/number-editor/number-editor.js +16 -16
- package/views/dist/controls/number-field/number-field.js +5 -3
- 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/pane/pane.d.ts +4 -2
- package/views/dist/controls/pane/pane.js +4 -4
- package/views/dist/controls/picker/map-fields-body.js +25 -1
- package/views/dist/controls/picker/picker.d.ts +2 -0
- package/views/dist/controls/picker/picker.js +37 -36
- package/views/dist/controls/picker/rows.d.ts +4 -0
- package/views/dist/controls/picker.css +10 -1
- package/views/dist/controls/popover/map-popover.d.ts +1 -1
- package/views/dist/controls/popover/map-popover.js +4 -2
- 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 +7 -3
- package/views/dist/controls/quick-filters/quick-filters.js +8 -6
- package/views/dist/controls/radio/radio.d.ts +3 -0
- package/views/dist/controls/radio/radio.js +4 -3
- package/views/dist/controls/select/map-select.d.ts +3 -0
- package/views/dist/controls/select/map-select.js +8 -0
- package/views/dist/controls/select/select.d.ts +3 -0
- package/views/dist/controls/select/select.js +3 -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 +8 -2
- package/views/dist/controls/sheet/bottom-sheet.js +4 -4
- package/views/dist/controls/sheet/map-sheet.js +1 -1
- package/views/dist/controls/sort-editor/map-sort-body.d.ts +1 -0
- package/views/dist/controls/sort-editor/map-sort-body.js +8 -4
- package/views/dist/controls/sort-editor/sort-editor.js +24 -26
- package/views/dist/controls/sort-editor.css +5 -0
- package/views/dist/controls/text-editor/map-text-body.js +5 -1
- package/views/dist/controls/text-editor/text-editor.d.ts +1 -1
- package/views/dist/controls/text-editor/text-editor.js +11 -10
- package/views/dist/controls/toolbar/toolbar.d.ts +4 -2
- package/views/dist/controls/toolbar/toolbar.js +2 -2
- package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +3 -3
- package/views/dist/controls/toolbar-button/atom-toolbar-button.js +7 -6
- package/views/dist/controls/values-editor/values-editor.d.ts +1 -1
- package/views/dist/controls/values-editor/values-editor.js +22 -22
- package/views/dist/controls/views-list/map-view-menu.d.ts +3 -2
- package/views/dist/controls/views-list/map-view-menu.js +7 -3
- 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 +9 -10
- package/views/dist/controls/views-list/views-list.js +6 -6
- package/views/dist/editors/EditorPanel.js +4 -4
- package/views/dist/field-row/FieldRow.js +13 -0
- package/views/dist/fields/money.d.ts +5 -2
- package/views/dist/fields/money.js +14 -2
- package/views/dist/grid/chrome/GridTable.js +4 -1
- package/views/dist/grid/chrome/cell-clipboard.d.ts +4 -2
- package/views/dist/grid/chrome/cell-clipboard.js +2 -2
- package/views/dist/grid/chrome/cells.js +3 -1
- package/views/dist/grid/chrome/grid-row-menu-items.js +1 -1
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -1
- package/views/dist/grid/chrome/useGridKeyboard.js +29 -6
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +9 -2
- package/views/dist/grid/core/clipboard-model.d.ts +3 -1
- package/views/dist/grid/core/clipboard-model.js +9 -8
- package/views/dist/grid/core/editing-controller.d.ts +3 -0
- package/views/dist/grid/core/editing-controller.js +6 -0
- package/views/dist/grid/core/edits-sink.d.ts +19 -0
- package/views/dist/grid/core/edits-sink.js +2 -0
- package/views/dist/grid/core/spreadsheet-operations.js +1 -1
- package/views/dist/grid/core/useGridEditing.d.ts +5 -0
- package/views/dist/grid/core/useGridEditing.js +6 -0
- package/views/dist/list/answer.d.ts +40 -0
- package/views/dist/list/answer.js +43 -0
- package/views/dist/list/bulk-bar.d.ts +7 -0
- package/views/dist/list/bulk-bar.js +10 -0
- package/views/dist/list/columns.d.ts +24 -0
- package/views/dist/list/columns.js +27 -0
- package/views/dist/list/edits.d.ts +19 -0
- package/views/dist/list/edits.js +56 -0
- package/views/dist/list/grid.d.ts +11 -0
- package/views/dist/list/grid.js +76 -0
- package/views/dist/list/index.d.ts +14 -1
- package/views/dist/list/index.js +4 -1
- package/views/dist/list/link.d.ts +8 -0
- package/views/dist/list/link.js +78 -0
- package/views/dist/list/list.d.ts +74 -0
- package/views/dist/list/list.js +18 -0
- package/views/dist/list/parts.js +11 -3
- package/views/dist/list/root-base.d.ts +46 -0
- package/views/dist/list/root-base.js +137 -0
- package/views/dist/list/root.d.ts +35 -34
- package/views/dist/list/root.js +153 -113
- package/views/dist/list/source-answers.d.ts +39 -0
- package/views/dist/list/source-answers.js +225 -0
- package/views/dist/list/store.d.ts +37 -5
- package/views/dist/list/store.js +31 -0
- package/views/dist/list/toolbar.d.ts +3 -2
- package/views/dist/list/toolbar.js +23 -5
- package/views/dist/list/views-axis.js +4 -2
- package/views/dist/list/views.d.ts +7 -2
- package/views/dist/list/views.js +16 -5
- package/views/dist/model/column-capabilities.d.ts +13 -0
- package/views/dist/model/column-capabilities.js +23 -2
- package/views/dist/model/column-schema.d.ts +11 -1
- package/views/dist/model/view-rules.js +1 -0
- package/views/dist/panels/model.d.ts +2 -0
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +21 -2
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +2 -2
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +12 -1
- package/views/dist/panels/react/toolbar/Toolbar.js +20 -6
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +4 -3
- package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +4 -4
- package/views/dist/panels/react/toolbar/ToolbarButton.js +4 -1
- package/views/dist/panels/react/toolbar/ToolbarFilter.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +4 -3
- package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +5 -4
- package/views/dist/panels/react/toolbar/ToolbarNew.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSort.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +8 -5
- package/views/dist/panels/react/toolbar/context.d.ts +31 -1
- 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.d.ts +4 -1
- package/views/dist/panels/react/toolbar/panel-part.js +7 -4
- package/views/dist/panels/react.d.ts +1 -1
- package/views/dist/panels/settings/filter-groups.js +6 -1
- package/views/dist/provider/ViewsProvider.d.ts +7 -2
- package/views/dist/provider/ViewsProvider.js +18 -1
- package/views/dist/provider/components.d.ts +90 -2
- package/views/dist/provider/components.js +1 -1
- package/views/dist/provider/context.d.ts +4 -1
- package/views/dist/provider/own-control.d.ts +4 -0
- package/views/dist/provider/own-control.js +7 -0
- package/views/dist/provider/select-items.d.ts +3 -0
- package/views/dist/provider/select-items.js +6 -0
- package/views/dist/react.d.ts +4 -2
- package/views/dist/react.js +2 -0
- package/views/dist/styles.css +107 -80
- package/views/dist/styles.unlayered.css +107 -80
- package/views/docs/contract.md +310 -7
- package/views/docs/controls/alert-dialog.md +4 -0
- package/views/docs/controls/alert.md +4 -0
- package/views/docs/controls/bulk-bar.md +4 -0
- package/views/docs/controls/compound-editor.md +4 -0
- package/views/docs/controls/customize.md +8 -0
- package/views/docs/controls/date-editor.md +6 -0
- package/views/docs/controls/field.md +4 -0
- package/views/docs/controls/filter-editor.md +8 -0
- package/views/docs/controls/group-editor.md +8 -0
- package/views/docs/controls/input.md +4 -0
- package/views/docs/controls/links-editor.md +4 -0
- package/views/docs/controls/menu-list.md +8 -0
- package/views/docs/controls/menu.md +6 -0
- package/views/docs/controls/modal.md +4 -0
- package/views/docs/controls/notice.md +4 -0
- package/views/docs/controls/number-editor.md +6 -0
- package/views/docs/controls/pane.md +4 -0
- package/views/docs/controls/picker.md +8 -0
- package/views/docs/controls/quick-filters.md +8 -0
- package/views/docs/controls/radio.md +4 -0
- package/views/docs/controls/select.md +8 -0
- package/views/docs/controls/sheet.md +4 -0
- package/views/docs/controls/sort-editor.md +8 -0
- package/views/docs/controls/text-editor.md +6 -0
- package/views/docs/controls/toolbar.md +4 -0
- package/views/docs/controls/values-editor.md +4 -0
- package/views/docs/controls/views-list.md +8 -0
- package/views/docs/guides/the-grid.md +2 -2
- package/views/docs/guides/the-provider.md +19 -2
- package/views/docs/reference/controls.md +11 -7
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +1 -1
- package/views/docs/reference/list.md +143 -11
- package/views/docs/reference/looks.md +1 -1
- package/views/docs/reference/panels-react.md +6 -5
- package/views/docs/reference/react.md +19 -12
- package/views/docs/reference/views.md +11 -5
- package/views/docs/reshaping.md +17 -1
- package/views/skills/views/SKILL.md +1 -1
package/views/docs/contract.md
CHANGED
|
@@ -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
|
|
@@ -320,6 +357,13 @@ for the line under every row but the last (`1px`; `0px` draws none), `--vk-field
|
|
|
320
357
|
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
358
|
row is one of the card's rows, drawn by the card's frame, and none of them apply there.
|
|
322
359
|
|
|
360
|
+
**The toolbar's band is the app's to declare.** On a computer each line of a folding toolbar (the ready toolbar's, or
|
|
361
|
+
`Toolbar`'s `fold`) reads `--vk-toolbar-line-py` for its padding above and below (undeclared `calc(var(--spacing)*2.5)`,
|
|
362
|
+
what `py-2.5` drew), `--vk-toolbar-line-gap` for the room between its tools (`calc(var(--spacing)*2)`) and
|
|
363
|
+
`--vk-toolbar-line-w` for the line under it (`1px`, in `--vk-border-subtle`; `0px` draws none, for an app that draws its
|
|
364
|
+
own line edge to edge). Undeclared, the line draws as it always has; declared on the toolbar or any ancestor, every line
|
|
365
|
+
in it takes them. A phone's one line takes none of them.
|
|
366
|
+
|
|
323
367
|
**Type, lines and timing are the app's to dress, one variable per kind.** Each is optional. Undeclared, every
|
|
324
368
|
place keeps its own value, the one shown here; declared once, on the grid, a panel or an ancestor, every place of
|
|
325
369
|
that kind takes it.
|
|
@@ -427,17 +471,21 @@ grid's editors and menus use, each in Base UI's shape, and an adapter on Radix a
|
|
|
427
471
|
both fill every one.
|
|
428
472
|
|
|
429
473
|
**Defaults for an app that hands none:** `CONTROLS`, from `viewkitjs/views/controls`, holds ViewKit's default controls,
|
|
430
|
-
the Outright kit's, on Base UI: its controls (the Button, the Popover, the Sheet, the Input, the Checkbox, the Tooltip, the Menu), the Text editor as its `TextBody`, the Picker as its `Picker` and `FieldsBody`, the Date editor as its `DateBody`, the Date editor's days as its `Calendar`, the Compound editor as its `PartsBody`, the Number editor as its `NumberBody`, the Values editor as its `ValuesBody`, the Links editor as its `LinksBody`, and of the panels the sort editor as its `SortBody`, the views list as its `ViewsListBody` and a view's menu as its `ViewMenu`, the filter editor as its `FilterBody` and `FilterPartBody` and the group editor as its `GroupBody`, Customize as its `CustomizeBody`, the quick filters as its `QuickFiltersBody`, the bulk bar as its `SelectionBar`; and of the panels' controls the Collapsible as its `Collapse`; and `PortsHost`, ViewKit's Toast and alert dialog for the `toast` and `confirm` ports an app leaves out; and `AppIcon`, ViewKit's own glyphs by name (`CONTROL_ICONS`), and `Markdown`, the stored text as it stands with its line breaks kept. So it fills every required slot, and `components={CONTROLS}` is the one line an app must write; handed as it stands it brings `CONTROL_ATOMS` too, the atoms drawn with those controls, under the app's own `atoms`. An app spreads it first and its own after
|
|
474
|
+
the Outright kit's, on Base UI: its controls (the Button, the Popover, the Sheet, the Input, the Checkbox, the Tooltip, the Menu, the Select), the Text editor as its `TextBody`, the Picker as its `Picker` and `FieldsBody`, the Date editor as its `DateBody`, the Date editor's days as its `Calendar`, the Compound editor as its `PartsBody`, the Number editor as its `NumberBody`, the Values editor as its `ValuesBody`, the Links editor as its `LinksBody`, and of the panels the sort editor as its `SortBody`, the views list as its `ViewsListBody` and a view's menu as its `ViewMenu`, the filter editor as its `FilterBody` and `FilterPartBody` and the group editor as its `GroupBody`, Customize as its `CustomizeBody`, the quick filters as its `QuickFiltersBody`, the bulk bar as its `SelectionBar`; and of the panels' controls the Collapsible as its `Collapse`; and `PortsHost`, ViewKit's Toast and alert dialog for the `toast` and `confirm` ports an app leaves out; and `AppIcon`, ViewKit's own glyphs by name (`CONTROL_ICONS`), and `Markdown`, the stored text as it stands with its line breaks kept. So it fills every required slot, and `components={CONTROLS}` is the one line an app must write; handed as it stands it brings `CONTROL_ATOMS` too, the atoms drawn with those controls, under the app's own `atoms`. An app spreads it first and its own after
|
|
431
475
|
(`components={{ ...CONTROLS, ...own }}`), so whatever it hands wins. That door alone needs `@base-ui/react`, an optional
|
|
432
476
|
peer; the provider and every other door import neither library, so an app that hands every control never installs it.
|
|
433
477
|
|
|
434
478
|
`Button` · `Popover` · `Tooltip` · `Checkbox` · `Menu` · `Collapse` · `Sheet` · `AppIcon` · `Markdown` · `TextBody` · `NumberBody` · `Picker` · `LinksBody` · `DateBody` · `PartsBody` · `ValuesBody`
|
|
435
479
|
|
|
436
|
-
`Button`: `ViewsButtonProps`, its children, `onClick`, `disabled`, `variant`, `size`, `type`, a class, `aria-label` and `title`. It draws every button ViewKit draws itself, handed ViewKit's box in its one class. The grid's own buttons are handed a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, each forwarded to your element; a command cell's ▾ and trigger, and the selection chip, only the props named first, the chip also `data-slot`. A field row's own buttons are handed `type`, `variant`, `size`, `className`, `aria-label`, `disabled` and `onClick` (the ▾ and the verb trigger no `onClick`: the menu opens on them), Show more also `data-slot`, and the edit target also a ref and `aria-disabled` while its write is pending, each forwarded to your element. The panels' own buttons are handed `type`, `variant` (`ghost`, `outline` or `secondary`), `size`, `className` and their children, each with what it needs of `onClick`, `disabled`, `aria-label`, `title`, a ref, `aria-haspopup`, `aria-expanded`, `aria-pressed`, `role`, `aria-selected`, `aria-disabled` and `aria-describedby` (a button that can't be used, described by why), `data-slot`, `data-state="open"` or `data-state="closed"` and `data-vs-row="true"`, each forwarded to your element.
|
|
480
|
+
`Button`: `ViewsButtonProps`, its children, `onClick`, `disabled`, `variant`, `size`, `type`, a class, `aria-label` and `title`. It draws every button ViewKit draws itself, handed ViewKit's box in its one class. The grid's own buttons are handed a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, each forwarded to your element; a command cell's ▾ and trigger, and the selection chip, only the props named first, the chip also `data-slot`. A field row's own buttons are handed `type`, `variant`, `size`, `className`, `aria-label`, `disabled` and `onClick` (the ▾ and the verb trigger no `onClick`: the menu opens on them), Show more also `data-slot`, and the edit target also a ref and `aria-disabled` while its write is pending, each forwarded to your element. The panels' own buttons are handed `type`, `variant` (`ghost`, `outline` or `secondary`), `size`, `className` and their children, each with what it needs of `onClick`, `disabled`, `aria-label`, `title`, a ref, `aria-haspopup`, `aria-expanded`, `aria-pressed`, `role`, `aria-selected`, `aria-disabled` and `aria-describedby` (a button that can't be used, described by why), `data-slot`, `data-state="open"` or `data-state="closed"` and `data-vs-row="true"`, each forwarded to your element. Inside the sort and filter panels under the provider's `panelControls` (VK-1013), each button is handed `type="button"`, a `variant` from what it is (`default` for a primary one, an empty filter's Add filter; `destructive` for a danger one), `size` `icon` for one drawn as its glyph alone, its icon and words as its children, its part's `data-slot` and `data-key`, and `aria-disabled` where it can't be used but keeps its focus; forward the rest to your element.
|
|
437
481
|
|
|
438
482
|
`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
483
|
|
|
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
|
|
484
|
+
`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), 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.
|
|
485
|
+
|
|
486
|
+
`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`: the sort's field and direction, the filter's field, way, choices and a block's quantifier (VK-1013), and New view's columns box in the view menu (VK-1014). 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.
|
|
487
|
+
|
|
488
|
+
`panelControls` (the provider): the names among `Button`, `Select`, `Menu`, `Popover`, `Input` and `Calendar` 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). 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`, and 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.
|
|
441
489
|
|
|
442
490
|
`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.
|
|
443
491
|
|
|
@@ -445,7 +493,7 @@ peer; the provider and every other door import neither library, so an app that h
|
|
|
445
493
|
|
|
446
494
|
`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.
|
|
447
495
|
|
|
448
|
-
`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
|
|
496
|
+
`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.
|
|
449
497
|
|
|
450
498
|
`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.
|
|
451
499
|
|
|
@@ -472,6 +520,8 @@ peer; the provider and every other door import neither library, so an app that h
|
|
|
472
520
|
|
|
473
521
|
`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'.
|
|
474
522
|
|
|
523
|
+
`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.
|
|
524
|
+
|
|
475
525
|
`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'.
|
|
476
526
|
|
|
477
527
|
`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`.
|
|
@@ -503,7 +553,7 @@ words, always text; it may carry a `shortcut` hint and an `href`, and a `disable
|
|
|
503
553
|
`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
|
|
504
554
|
carries `keepOpen`, a hint to leave the menu open so several can be ticked in turn; an
|
|
505
555
|
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
|
|
506
|
-
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 `
|
|
556
|
+
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
|
|
507
557
|
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
|
|
508
558
|
needs are a port, by meaning (below); `CONTROLS.AppIcon` draws ViewKit's own glyph of each meaning's name. `Markdown` is the
|
|
509
559
|
app's markdown renderer, handed the stored text whole; the package draws rich text through it and parses none, and
|
|
@@ -598,7 +648,7 @@ container: the inset a run of rows sits in, inside a panel or a command list's g
|
|
|
598
648
|
a button or, with `interactive={false}`, a static line), `RowContent` (a row's inside, for inside a
|
|
599
649
|
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),
|
|
600
650
|
`StatusBadge` (a pill by status slot), `StatusMarker` (an attention badge that opens its reason) and
|
|
601
|
-
`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)). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
|
|
651
|
+
`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
|
|
602
652
|
from the app's colours; an app swaps any of them through the provider's `atoms`, and the rest
|
|
603
653
|
stay the defaults. `SelectionSheet` is the phone's sheet of a selection's verbs, opened by the
|
|
604
654
|
selection bar's Actions: the default is the components map's `Sheet` holding the atoms' rows, a group's
|
|
@@ -700,8 +750,17 @@ places), each one's popover handed `data-slot="vk-toolbar-options-panel"`, `data
|
|
|
700
750
|
`data-slot="vk-toolbar-filter-panel"` through your `Popover`'s `panelData`; on a phone, where the panel opens in your
|
|
701
751
|
`Sheet`, the same slot marks the panel's box inside it.
|
|
702
752
|
|
|
753
|
+
These slots mark the places ViewKit draws around your buttons. The button itself is told which it is: every button the
|
|
754
|
+
toolbar draws hands your `ToolbarButton` its `part` (`sort`, `filter`, `options`, `search`, `quick`, `new`, the filter
|
|
755
|
+
bar's `filters`, `filter-add`, `sort-pill`, `sort-add`, `advanced-filters`, `more-filters`, and ⋯ `more`; `/list`'s
|
|
756
|
+
Default keys has the whole table), and a place the ready toolbar's `toolbarParts` dresses hands its `className` on to
|
|
757
|
+
each of its buttons, or draws your own `button` for them, handed the same props. Your atom puts `className` on the
|
|
758
|
+
button, and dresses by `part` only the six of an app's own frame (`ViewsFramePart`) as their slots say.
|
|
759
|
+
|
|
703
760
|
In the fold arrangement (`Toolbar`'s `fold`, the ready toolbar's default) the frame carries `data-fold`, a line's
|
|
704
|
-
kind is `main` or `bar` (the filter bar under the row), each part stands in an item of its own,
|
|
761
|
+
kind is `main` or `bar` (the filter bar under the row), each part stands in an item of its own, marked
|
|
762
|
+
`data-toolbar-item` with its place's key (yours included, so an app dresses a place of its own by it; the fold hides an item
|
|
763
|
+
that gives way with `hidden`, so a rule of yours that sets `display` on `[data-toolbar-item]` breaks the folding), and as a line
|
|
705
764
|
narrows its parts give way: a toolbar button standing as its icon alone carries `data-icon-alone`, the views fold
|
|
706
765
|
tabs into "+N", the bar's last filters fold into "+N filters" (`data-slot="vk-toolbar-more-filters"`) one at a time,
|
|
707
766
|
and what may fold goes behind `data-slot="vk-toolbar-overflow"` (⋯, its folded parts' rows in your `Menu`). A line
|
|
@@ -747,6 +806,79 @@ with why; its ⋯ holding why, Put back once it fits, and Delete filter), `data-
|
|
|
747
806
|
folded, standing where the last of them stood, its menu naming each) and `data-slot="vk-toolbar-filters-panel"` (the fields' popover, handed through your
|
|
748
807
|
`Popover`'s `panelData`).
|
|
749
808
|
|
|
809
|
+
The panels' parts (VK-988). Every part inside the default panels carries a name of its own, so a stylesheet dresses one part
|
|
810
|
+
apart from the rest; each name starts with its panel's: `vk-sort-`, `vk-filter-`, `vk-group-`, `vk-customize-`, `vk-views-list-`,
|
|
811
|
+
`vk-view-menu-` and `vk-quick-`. A part that repeats says which one it is: `data-key`, by the key you handed (a field's, a view's, a
|
|
812
|
+
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
|
|
813
|
+
`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
|
|
814
|
+
view's menu), it is handed the part's `data-slot` as a prop (`ViewsMenuProps`), and so are your `Button`, `Select`, `Menu`,
|
|
815
|
+
`Popover` and `Input` inside the panels and the text, number and date editors under the provider's `panelControls` (VK-1013, VK-1014, VK-1021; a menu's rows by their item's `slot`
|
|
816
|
+
and `key`): draw them on the element your stylesheet styles. ViewKit's own Select, Input, Radio,
|
|
817
|
+
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
|
|
818
|
+
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
|
|
819
|
+
entry and choice and a Picker's item.
|
|
820
|
+
|
|
821
|
+
- The sort editor (`CONTROLS.SortBody`): `data-slot="vk-sort"` (the editor), `data-slot="vk-sort-rules"` (its rules' list),
|
|
822
|
+
`data-slot="vk-sort-rule"` (one rule, `data-key` its field and `data-index` its place; a set-aside sort keeps `data-aside`, its
|
|
823
|
+
key in `data-key` and no place), `data-slot="vk-sort-grip"` (its grip), `data-slot="vk-sort-field"` and
|
|
824
|
+
`data-slot="vk-sort-direction"` (its two boxes), `data-slot="vk-sort-remove"` (its ×), `data-slot="vk-sort-rule-open"` (a phone's
|
|
825
|
+
or the narrow form's row, pressed to turn its direction), `data-slot="vk-sort-rule-more"` (its ⋯), `data-slot="vk-sort-rule-action"`
|
|
826
|
+
(a row of that menu, `data-key` `delete`, `why` or `put-back`), `data-slot="vk-sort-direction-option"` (a direction to pick on a
|
|
827
|
+
phone's step or the narrow form's list, `data-key` `ascending` or `descending`), `data-slot="vk-sort-add"` (Add sort),
|
|
828
|
+
`data-slot="vk-sort-clear"` (Clear all), `data-slot="vk-sort-foot"` (the row they stand in) and `data-slot="vk-sort-none"`
|
|
829
|
+
(nothing sorted).
|
|
830
|
+
- The filter editor (`CONTROLS.FilterBody`): `data-slot="vk-filter"` (the editor), `data-slot="vk-filter-rules"` (a level's list),
|
|
831
|
+
`data-slot="vk-filter-item"` (a rule's or a group's place in it, `data-index`), `data-slot="vk-filter-rule"` (one rule, `data-key`
|
|
832
|
+
its field; a set-aside keeps `data-aside`), `data-slot="vk-filter-where"` (Where), `data-slot="vk-filter-join"` (the And/Or that
|
|
833
|
+
turns its level), `data-slot="vk-filter-joined"` (a later rule's And/Or words), `data-slot="vk-filter-field"` and
|
|
834
|
+
`data-slot="vk-filter-how"` (its field's and way's boxes, on the box itself, the Select's), `data-slot="vk-filter-value"` (what
|
|
835
|
+
holds its value's box, its wrapper), `data-slot="vk-filter-rule-more"` (its ⋮),
|
|
836
|
+
`data-slot="vk-filter-rule-action"` (a row of that menu: Convert to group, the ways a several-values rule matches, Delete, a
|
|
837
|
+
set-aside's why and Put back, `data-key` `convert`, `any`, `none`, `every`, `delete`, `why`, `put-back`),
|
|
838
|
+
`data-slot="vk-filter-group"` (a group's well), `data-slot="vk-filter-group-head"` and `data-slot="vk-filter-group-more"` (its head
|
|
839
|
+
and ⋮), `data-slot="vk-filter-quantifier"` (a related record's group's Any, None or Every, in its head),
|
|
840
|
+
`data-slot="vk-filter-group-action"` (a row of a group's menu, `data-key` `exclude`), `data-slot="vk-filter-delete"` (Delete at a group's foot), `data-slot="vk-filter-add"` (Add filter),
|
|
841
|
+
`data-slot="vk-filter-clear"` (Clear all), `data-slot="vk-filter-foot"` (a foot they stand in), `data-slot="vk-filter-none"`
|
|
842
|
+
(nothing filtered) and `data-slot="vk-filter-excluded"` (the note over a filter that leaves records out).
|
|
843
|
+
- The group editor (Customize's Group): `data-slot="vk-group"` (the editor), `data-slot="vk-group-setting"` (a setting's row,
|
|
844
|
+
`data-key` `field`, `order`, `direction`, `step` or `empty`), `data-slot="vk-group-choice"` (one of a setting's choices, `data-key`
|
|
845
|
+
its value), `data-slot="vk-group-heading"` (the groups' heading), `data-slot="vk-group-hide-all"` (its Hide all or Show all),
|
|
846
|
+
`data-slot="vk-group-value"` (a group's row, `data-key` its value) and `data-slot="vk-group-remove"` (Remove grouping).
|
|
847
|
+
- Customize (`CONTROLS.CustomizeBody`): `data-slot="vk-customize"` (its body), `data-slot="vk-customize-head"` (its head),
|
|
848
|
+
`data-slot="vk-customize-title"`, `data-slot="vk-customize-back"`, `data-slot="vk-customize-close"`,
|
|
849
|
+
`data-slot="vk-customize-name"` (the view's name) and `data-slot="vk-customize-layout-button"` (its layout's mark beside it),
|
|
850
|
+
`data-slot="vk-customize-section"` (a section's row, `data-key` `layout`, `columns`, `filter`, `sort` or `group`),
|
|
851
|
+
`data-slot="vk-customize-field"` (a field's own filter row, `data-key` its field), `data-slot="vk-customize-toggle"` (a toggle's row,
|
|
852
|
+
`data-key` its key; Show counts `counts`), `data-slot="vk-customize-toggle-reset"` (its way back), `data-slot="vk-customize-choice"`
|
|
853
|
+
(a pick-one setting's row, `data-key` its key) and `data-slot="vk-customize-option"` (one of its options, `data-key` its value),
|
|
854
|
+
`data-slot="vk-customize-heading"` (a heading, `data-key` where it has one), `data-slot="vk-customize-layout"` (a layout's card,
|
|
855
|
+
`data-key` its id), `data-slot="vk-customize-search"` (Columns' search), `data-slot="vk-customize-column"` (a column's row,
|
|
856
|
+
`data-key` its id), `data-slot="vk-customize-columns-action"` (Hide all, Show all, Reset columns, `data-key` `hide-all`,
|
|
857
|
+
`show-all`, `reset`), `data-slot="vk-customize-foot"` (its foot), `data-slot="vk-customize-changes"` (Reset and Save for everyone, over it), `data-slot="vk-customize-action"` (a foot button, `data-key`
|
|
858
|
+
`copy-link`, `export`, `reset` or `save`) and `data-slot="vk-customize-stale"` (the note that the shared view moved).
|
|
859
|
+
- The views list (`CONTROLS.ViewsListBody`): `data-slot="vk-views-list"` (the list), `data-slot="vk-views-list-row"` (a view's row,
|
|
860
|
+
`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
|
|
861
|
+
menu), `data-slot="vk-view-menu-row"` (a row, `data-key` its item's key: `rename`, `edit`, `copy-link`, …),
|
|
862
|
+
`data-slot="vk-view-menu-name"` (the name box of Rename and New view), `data-slot="vk-view-menu-layout"` (New view's layout
|
|
863
|
+
card, `data-key` its id), `data-slot="vk-view-menu-columns"` (a board's columns' box) and `data-slot="vk-view-menu-act"` (a step's
|
|
864
|
+
Save or Create). Your `Menu` is handed the view menu's name as `data-slot` (`ViewsMenuProps`); ViewKit's own names each row
|
|
865
|
+
`vk-view-menu-row` by its item's key.
|
|
866
|
+
- The quick filters (`CONTROLS.QuickFiltersBody`): `data-slot="vk-quick"` (the body), `data-slot="vk-quick-head"` (a phone's head),
|
|
867
|
+
`data-slot="vk-quick-field"` (a field's pill, `data-key` its id), `data-slot="vk-quick-search"` (the search),
|
|
868
|
+
`data-slot="vk-quick-value"` (a value, `data-key` the value, `data-held` while it is held: read it beside the name, since the
|
|
869
|
+
Picker's rows carry a `data-held` of their own), `data-slot="vk-quick-count"` (its
|
|
870
|
+
count), `data-slot="vk-quick-clear"` (a held value's ✕) and `data-slot="vk-quick-none"` (nothing found).
|
|
871
|
+
- The last parts round the panels (VK-1003): the filter bar's own popover names its typed value's box
|
|
872
|
+
`data-slot="vk-filter-part-value"` and a range's two numbers `data-slot="vk-filter-part-pair"` (the row they stand in);
|
|
873
|
+
the quick filters' strip of fields is `data-slot="vk-quick-strip"` and its values' list `data-slot="vk-quick-values"`
|
|
874
|
+
(`data-key` the field's id); Customize's empty line is `data-slot="vk-customize-none"` (`data-key` `columns` where no column
|
|
875
|
+
matches the search, `choices` where a field has nothing to pick), a column's own rows `data-slot="vk-customize-rows"`
|
|
876
|
+
(`data-key` its id) and Columns' foot rows `data-slot="vk-customize-columns-foot"`. A phone menu's sheet carries its menu's name,
|
|
877
|
+
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`
|
|
878
|
+
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
|
|
879
|
+
Sheet of yours) names its ✕ and ‹ `vk-editor-close` and `vk-editor-back`, as the sort's and filter's do (and their ✓
|
|
880
|
+
`vk-editor-save`).
|
|
881
|
+
|
|
750
882
|
Lists that scroll wear the class `scrollbar-overlay`, which an app may define (to show the OS
|
|
751
883
|
overlay scrollbar, say); without it the class does nothing.
|
|
752
884
|
|
|
@@ -762,6 +894,177 @@ a desktop and its `Sheet` on a phone, and marks its parts with these slots:
|
|
|
762
894
|
| `data-slot="vk-editor-refusal"` | the reason a refused value gave, under the editor; in a popover that scrolls, pinned to its bottom edge |
|
|
763
895
|
| `data-slot="vk-text-editor"` | a read-only text's box (`viewkitjs/views/editors/text`), unless its host names its own |
|
|
764
896
|
|
|
897
|
+
The frames an editor stands in keep their own names, apart from the parts inside: `data-slot="vk-date-editor"` wraps the date
|
|
898
|
+
editor's body in the grid (it draws as nothing, `display: contents`), and an app's own body stands in
|
|
899
|
+
`data-slot="vk-text-body"`, `data-slot="vk-number-body"`, `data-slot="vk-parts-body"`, `data-slot="vk-values-body"` or
|
|
900
|
+
`data-slot="vk-links-body"`. So `[data-slot^="vk-date"]` reaches the frame as well as the date editor's parts: name the part.
|
|
901
|
+
|
|
902
|
+
### The field editors' parts (VK-989)
|
|
903
|
+
|
|
904
|
+
Every part inside ViewKit's default field editors carries a public name, the same in the grid, the field row and the phone's
|
|
905
|
+
sheet, on the box a person sees (not the input inside it). Dress one part by its name and the rest stay as they are.
|
|
906
|
+
|
|
907
|
+
A part that repeats says which one it is: `data-key`, by its own key (a quick pick's, a part's, a field's, a record's, an item's
|
|
908
|
+
value), and a values row its place, `data-index`, from 0. A date day carries no `data-key`; it is told by its label, and a day,
|
|
909
|
+
month, year or quarter picked by `data-picked`, today's day and year by `data-today`. A Picker row lit by the keys or the pointer
|
|
910
|
+
carries `data-highlighted`. Where VK-991 hands your own control into a part (your `Button`, `Input`, `Select`, `Menu`,
|
|
911
|
+
`Calendar`), it is handed the part's `data-slot` and `data-key` as props: draw them on the element your stylesheet styles. A part's
|
|
912
|
+
name never starts ViewKit's reset: an editor you draw on your own, outside ViewKit's frames, draws as it did before it was named.
|
|
913
|
+
|
|
914
|
+
Every editor's ✕, ✓, a step's ‹ and the Picker's Cancel: `data-slot="vk-editor-close"`, `data-slot="vk-editor-save"`,
|
|
915
|
+
`data-slot="vk-editor-back"` and `data-slot="vk-editor-cancel"`, wherever ViewKit draws them: an editor's own phone head, the
|
|
916
|
+
sheet's bar (`vk-editor-bar`), and ViewKit's own Sheet when it holds them in its head (`sheetActions: "head"`). The sort and
|
|
917
|
+
filter sheets' own ✕, ✓ and ‹ carry the same names, in either place. An app's own Sheet draws its head's buttons itself, and a
|
|
918
|
+
sheet's own ✕, the one its head draws where the editor hands it none (a Picker of one value), is the sheet's: it carries no part's
|
|
919
|
+
name.
|
|
920
|
+
|
|
921
|
+
The date editor and its calendar:
|
|
922
|
+
|
|
923
|
+
| slot | the part |
|
|
924
|
+
| --- | --- |
|
|
925
|
+
| `data-slot="vk-date"` | the date editor, every form |
|
|
926
|
+
| `data-slot="vk-calendar"` | the default calendar (the components map's `Calendar`); its head and days take the date editor's names |
|
|
927
|
+
| `data-slot="vk-date-line"` | the typed line's box |
|
|
928
|
+
| `data-slot="vk-date-reads"` | what the typed line reads as |
|
|
929
|
+
| `data-slot="vk-date-error"` | why the typed line isn't a date |
|
|
930
|
+
| `data-slot="vk-date-time"` | the time's button beside the line, and a phone's time row |
|
|
931
|
+
| `data-slot="vk-date-head"` | the month's head |
|
|
932
|
+
| `data-slot="vk-date-prev"` | the last month's ‹ |
|
|
933
|
+
| `data-slot="vk-date-next"` | the next month's › |
|
|
934
|
+
| `data-slot="vk-date-month"` | the month's name, pressed for the months |
|
|
935
|
+
| `data-slot="vk-date-year"` | the year, pressed (or typed into) for the years |
|
|
936
|
+
| `data-slot="vk-date-days"` | the days' grid |
|
|
937
|
+
| `data-slot="vk-date-weekdays"` | the weekdays' row |
|
|
938
|
+
| `data-slot="vk-date-day"` | each day |
|
|
939
|
+
| `data-slot="vk-date-choices"` | the twelve months, or the twelve years |
|
|
940
|
+
| `data-slot="vk-date-choice"` | each month or year |
|
|
941
|
+
| `data-slot="vk-date-quarters"` | the quarter-hours |
|
|
942
|
+
| `data-slot="vk-date-quarter"` | each quarter-hour |
|
|
943
|
+
| `data-slot="vk-date-parts"` | the date and the time in boxes of their own |
|
|
944
|
+
| `data-slot="vk-date-part"` | the date's box, or the time's |
|
|
945
|
+
| `data-slot="vk-date-segment"` | each of a box's parts: day, month, year, hour, minute |
|
|
946
|
+
| `data-slot="vk-date-sep"` | the line over the quick picks |
|
|
947
|
+
| `data-slot="vk-date-picks"` | the quick picks |
|
|
948
|
+
| `data-slot="vk-date-pick"` | each quick pick (Today, Tomorrow, No date…) |
|
|
949
|
+
| `data-slot="vk-date-card"` | each card on a phone |
|
|
950
|
+
| `data-slot="vk-date-wheels"` | a phone's wheels |
|
|
951
|
+
| `data-slot="vk-date-wheel"` | each wheel |
|
|
952
|
+
| `data-slot="vk-date-wheel-row"` | each row of a wheel |
|
|
953
|
+
|
|
954
|
+
The text and number editors:
|
|
955
|
+
|
|
956
|
+
| slot | the part |
|
|
957
|
+
| --- | --- |
|
|
958
|
+
| `data-slot="vk-text"` | the text editor, every form |
|
|
959
|
+
| `data-slot="vk-text-box"` | its box (a phone number's: the box round the country, the dial code and the number) |
|
|
960
|
+
| `data-slot="vk-text-country"` | a phone number's country, pressed for the countries |
|
|
961
|
+
| `data-slot="vk-text-dial"` | a phone number's dial code |
|
|
962
|
+
| `data-slot="vk-text-note"` | why what was typed can't be kept |
|
|
963
|
+
| `data-slot="vk-number"` | the number editor, every form |
|
|
964
|
+
| `data-slot="vk-number-box"` | its box |
|
|
965
|
+
| `data-slot="vk-number-currency"` | the currency, pressed for the currencies |
|
|
966
|
+
| `data-slot="vk-number-unit"` | a unit that stays as it is: `%`, a currency's sign or code |
|
|
967
|
+
|
|
968
|
+
The name, place and range editors (one editor of parts; which part each box is, its key, says: given, family, shown, country,
|
|
969
|
+
line1, line2, postalCode, city, region, low, high):
|
|
970
|
+
|
|
971
|
+
| slot | the part |
|
|
972
|
+
| --- | --- |
|
|
973
|
+
| `data-slot="vk-parts"` | the editor, every form |
|
|
974
|
+
| `data-slot="vk-parts-field"` | each part's whole field: its label and its box |
|
|
975
|
+
| `data-slot="vk-parts-box"` | each part's box |
|
|
976
|
+
| `data-slot="vk-parts-line"` | a name's one line, as it is shown |
|
|
977
|
+
| `data-slot="vk-parts-own"` | the mark of a line written by hand |
|
|
978
|
+
| `data-slot="vk-parts-card"` | each card on a phone |
|
|
979
|
+
| `data-slot="vk-parts-pair"` | two parts side by side (first and last name; from and to) |
|
|
980
|
+
| `data-slot="vk-parts-note"` | a note under the parts: a range's unit, why it can't be empty |
|
|
981
|
+
| `data-slot="vk-parts-bands"` | a range's bands, picked whole |
|
|
982
|
+
|
|
983
|
+
The values editor (several emails, phones, links or domains):
|
|
984
|
+
|
|
985
|
+
| slot | the part |
|
|
986
|
+
| --- | --- |
|
|
987
|
+
| `data-slot="vk-values"` | the editor, every form |
|
|
988
|
+
| `data-slot="vk-values-rows"` | its rows, or its cards on a phone |
|
|
989
|
+
| `data-slot="vk-values-row"` | each value's row or card |
|
|
990
|
+
| `data-slot="vk-values-value"` | a value, pressed to change it (a phone card's box) |
|
|
991
|
+
| `data-slot="vk-values-edit"` | the box a value is changed in |
|
|
992
|
+
| `data-slot="vk-values-label"` | a value's label (Work, Mobile), pressed to change it where it can be |
|
|
993
|
+
| `data-slot="vk-values-main"` | the main one's mark |
|
|
994
|
+
| `data-slot="vk-values-pill"` | a value and its copy button together |
|
|
995
|
+
| `data-slot="vk-values-acts"` | a row's call, write or open and its remove, on a phone |
|
|
996
|
+
| `data-slot="vk-values-grip"` | the grip a value is moved by |
|
|
997
|
+
| `data-slot="vk-values-copy"` | copy |
|
|
998
|
+
| `data-slot="vk-values-open"` | call, write or open |
|
|
999
|
+
| `data-slot="vk-values-remove"` | remove |
|
|
1000
|
+
| `data-slot="vk-values-line"` | the line a new value is typed in |
|
|
1001
|
+
| `data-slot="vk-values-code"` | a phone number's country, pressed for the countries |
|
|
1002
|
+
| `data-slot="vk-values-prefix"` | the dial code or the + before the line |
|
|
1003
|
+
| `data-slot="vk-values-add"` | a phone's Add |
|
|
1004
|
+
| `data-slot="vk-values-back"` | the head of a step (a label's, a country's) on a computer, its ‹ inside |
|
|
1005
|
+
| `data-slot="vk-values-error"` | why a value can't be kept |
|
|
1006
|
+
|
|
1007
|
+
The links editor (the records a record is linked to, and what each link says):
|
|
1008
|
+
|
|
1009
|
+
| slot | the part |
|
|
1010
|
+
| --- | --- |
|
|
1011
|
+
| `data-slot="vk-links"` | the editor, every form |
|
|
1012
|
+
| `data-slot="vk-links-search"` | the search's box |
|
|
1013
|
+
| `data-slot="vk-links-list"` | the list of links and of what can be linked |
|
|
1014
|
+
| `data-slot="vk-links-head"` | the table's head row |
|
|
1015
|
+
| `data-slot="vk-links-rows"` | the links, or their cards on a phone |
|
|
1016
|
+
| `data-slot="vk-links-row"` | each link: its row, or its card on a phone |
|
|
1017
|
+
| `data-slot="vk-links-name"` | a link's record: its face and name; on a computer, its column's head too |
|
|
1018
|
+
| `data-slot="vk-links-field"` | each field of a link (its cell, or its row on a phone or a step); on a computer, its column's head too |
|
|
1019
|
+
| `data-slot="vk-links-value"` | a field's value, pressed to change it |
|
|
1020
|
+
| `data-slot="vk-links-control"` | the switch, box or choice a field is changed with in place, and the lead's |
|
|
1021
|
+
| `data-slot="vk-links-pop"` | a field's list, opened under it |
|
|
1022
|
+
| `data-slot="vk-links-lead"` | which link leads; on a computer, its column's head too. Scope a rule under `vk-links-row` to leave the head out |
|
|
1023
|
+
| `data-slot="vk-links-remove"` | a link's ✕ |
|
|
1024
|
+
| `data-slot="vk-links-config"` | a link's fields, pressed to open them |
|
|
1025
|
+
| `data-slot="vk-links-more"` | a phone card's ⋯ |
|
|
1026
|
+
| `data-slot="vk-links-action"` | each row of that ⋯'s menu: `lead` (make it lead), `unlink` |
|
|
1027
|
+
| `data-slot="vk-links-step"` | the head of a link's step on a computer |
|
|
1028
|
+
| `data-slot="vk-links-back"` | that step's ‹ |
|
|
1029
|
+
| `data-slot="vk-links-unlink"` | Unlink |
|
|
1030
|
+
| `data-slot="vk-links-offers"` | the records offered to link |
|
|
1031
|
+
| `data-slot="vk-links-offer"` | each record offered |
|
|
1032
|
+
| `data-slot="vk-links-offer-action"` | each action among them (New company) |
|
|
1033
|
+
| `data-slot="vk-links-note"` | what the list is doing, or why it is empty |
|
|
1034
|
+
| `data-slot="vk-links-retry"` | Retry, when the search failed |
|
|
1035
|
+
|
|
1036
|
+
The Picker (every pick list: a select's, a status's, a relation's, a Select's list, and the lists inside the other editors):
|
|
1037
|
+
|
|
1038
|
+
| slot | the part |
|
|
1039
|
+
| --- | --- |
|
|
1040
|
+
| `data-slot="vk-picker"` | the Picker, both forms |
|
|
1041
|
+
| `data-slot="vk-picker-search"` | the search's box |
|
|
1042
|
+
| `data-slot="vk-picker-list"` | the list of rows |
|
|
1043
|
+
| `data-slot="vk-picker-chips"` | the chips of what is held, beside the search |
|
|
1044
|
+
| `data-slot="vk-picker-chip"` | each chip |
|
|
1045
|
+
| `data-slot="vk-picker-option"` | each row (a panel's own row wears the panel's name instead) |
|
|
1046
|
+
| `data-slot="vk-picker-parent"` | an open level's own row, on top |
|
|
1047
|
+
| `data-slot="vk-picker-empty"` | the row that leaves the field empty |
|
|
1048
|
+
| `data-slot="vk-picker-add"` | + Add: the row, or a phone's button, that asks the app to add what was typed |
|
|
1049
|
+
| `data-slot="vk-picker-create"` | Create: the row, or a phone's button, that makes a new value |
|
|
1050
|
+
| `data-slot="vk-picker-action"` | each of its actions (the views list's New view, a field's first action) |
|
|
1051
|
+
| `data-slot="vk-picker-group"` | each group of rows under a heading |
|
|
1052
|
+
| `data-slot="vk-picker-heading"` | each heading |
|
|
1053
|
+
| `data-slot="vk-picker-card"` | each card of rows on a phone |
|
|
1054
|
+
| `data-slot="vk-picker-selected"` | a phone's card of what is held |
|
|
1055
|
+
| `data-slot="vk-picker-tick"` | a held row's mark: its tick, its box where several are held, or a phone's circle |
|
|
1056
|
+
| `data-slot="vk-picker-row-more"` | a row's ⋯ |
|
|
1057
|
+
| `data-slot="vk-picker-more"` | a phone's ⋯ for its actions |
|
|
1058
|
+
| `data-slot="vk-picker-back"` | the ‹ out of a level |
|
|
1059
|
+
| `data-slot="vk-picker-count"` | how many are held, with Clear |
|
|
1060
|
+
| `data-slot="vk-picker-clear"` | Clear all |
|
|
1061
|
+
| `data-slot="vk-picker-lead"` | the leading value's word |
|
|
1062
|
+
| `data-slot="vk-picker-lead-make"` | Make lead |
|
|
1063
|
+
| `data-slot="vk-picker-message"` | what the list says: searching, failed, nothing matches, nothing yet |
|
|
1064
|
+
| `data-slot="vk-picker-retry"` | Retry |
|
|
1065
|
+
| `data-slot="vk-picker-loading"` | Loading more |
|
|
1066
|
+
| `data-slot="vk-picker-foot"` | its foot: Create or + Add, and its actions |
|
|
1067
|
+
|
|
765
1068
|
## Ports
|
|
766
1069
|
|
|
767
1070
|
Runtime services the app may hand in through the provider, typed in `src/provider/ports.ts`. Each is optional, and
|
|
@@ -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.
|
|
@@ -39,3 +39,7 @@ The bar draws its surface, its place, its count, the room its Toast rises in, an
|
|
|
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
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), 0 0 0 1px hsl(0 0% 18%)` |
|
|
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).
|
|
@@ -17,3 +17,7 @@ It also sets the popup line's own `--popup-line-more` and `--popup-line-under` o
|
|
|
17
17
|
| `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
|
|
18
18
|
| `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
|
|
19
19
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
20
|
+
|
|
21
|
+
## Its parts
|
|
22
|
+
|
|
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).
|
|
@@ -15,3 +15,11 @@ The Menu list, the Radio, the Input, the Button, the Notice, the Pane and the Sh
|
|
|
15
15
|
| `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
|
|
16
16
|
| `--vk-overlay` | colour | `surface-overlay` | the colour defaults' |
|
|
17
17
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
18
|
+
|
|
19
|
+
## Its parts by name
|
|
20
|
+
|
|
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
|
+
|
|
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-toggle-reset`, `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.
|
|
@@ -41,3 +41,9 @@ It also reads other controls' own names where it stands inside them, the Popover
|
|
|
41
41
|
| `--vk-radius-xs` | size | `radius-xs` | `2.5px` |
|
|
42
42
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
43
43
|
| `--vk-tracking-wide` | size | `tracking-wide` | `0.025em` |
|
|
44
|
+
|
|
45
|
+
## Its parts
|
|
46
|
+
|
|
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).
|
|
@@ -27,3 +27,7 @@ A row of Field rows may open with a glyph lane (`o-field-row-glyph`), 20 wide, i
|
|
|
27
27
|
| `--vk-overlay-card` | colour | `surface-overlay-card` | `hsl(0 0% 94%)` · dark `hsl(225 7% 15%)` |
|
|
28
28
|
| `--vk-radius-xl` | size | `radius-xl` | `15px` |
|
|
29
29
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
30
|
+
|
|
31
|
+
## A part's name
|
|
32
|
+
|
|
33
|
+
Handed `data-slot` and `data-key`, a Field draws them on its root in every form: alone, as a row of Field rows, and at a setting row's end.
|
|
@@ -26,3 +26,11 @@ The Select, the Picker, the Menu, the Button, the Input, the Number field, the D
|
|
|
26
26
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
27
27
|
| `--vk-sunken` | colour | `surface-sunken` | `hsl(0 0% 98%)` · dark `hsl(210 8% 5%)` |
|
|
28
28
|
| `--vk-warning` | colour | `text-warning` | `hsl(25 92% 41%)` |
|
|
29
|
+
|
|
30
|
+
## Its parts by name
|
|
31
|
+
|
|
32
|
+
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).
|
|
33
|
+
|
|
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
|
+
|
|
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 field stays ViewKit's.
|
|
@@ -9,3 +9,11 @@ The Menu list, the Picker, the Button and the Sheet it draws with read their own
|
|
|
9
9
|
| `--vk-font-size-sm` | size | `text-sm` | `14px` |
|
|
10
10
|
| `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
|
|
11
11
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
12
|
+
|
|
13
|
+
## Its parts by name
|
|
14
|
+
|
|
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
|
+
|
|
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.
|
|
@@ -55,3 +55,7 @@ Every name the Input's, the InputGroup's and the segments' stylesheet (`input.cs
|
|
|
55
55
|
## Saving and Saved
|
|
56
56
|
|
|
57
57
|
`<Input saving />`, `<Input saved />`, and the same on an `InputGroup`: while the app saves what was typed, the Spinner stands at the field's end (after a group's end side), in `--vk-fg-subtlest`, the field busy (`aria-busy`) and still typed into; once the save took, a check and the word Saved, in `--vk-success` at `--vk-font-size-xs`, announced (`role="status"`), fading on `--vk-duration-base` after `--vk-saved-hold` and then gone from the field. It shows again each time `saved` turns on; saving wins when both are on. A page holds Saved with `data-force="saved"`. A save that fails is the Field's `error`, with the value before put back by the app.
|
|
58
|
+
|
|
59
|
+
## Its name in a panel or an editor
|
|
60
|
+
|
|
61
|
+
A panel or a field editor that names the Input it draws hands `data-slot` and `data-key` (VK-988: Customize's `vk-customize-name`; VK-989: a name's `vk-parts-box`, the date's `vk-date-year`): in its field form the Input draws them on its box (`data-kit="input"`), the element your stylesheet dresses, as it does `data-force`; bare (`chrome="bare"`), on the input itself.
|