viewkitjs 0.28.0 → 0.30.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 +218 -0
- package/MIGRATION.md +181 -11
- package/fields/dist/derived.d.ts +2 -1
- package/fields/dist/derived.js +9 -3
- package/fields/dist/entities.js +41 -3
- package/fields/dist/index.d.ts +1 -1
- package/fields/dist/index.js +1 -1
- package/fields/dist/messages.d.ts +8 -2
- package/fields/dist/messages.js +3 -0
- package/fields/dist/range.d.ts +6 -0
- package/fields/dist/range.js +8 -0
- package/fields/dist/registry.js +11 -1
- package/fields/dist/spec-changes.js +1 -0
- package/fields/dist/types.d.ts +23 -1
- package/fields/docs/guides/derived-fields.md +7 -5
- package/fields/docs/guides/field-types.md +2 -2
- package/fields/docs/guides/the-index.md +1 -1
- package/fields/docs/reference/fields.md +3 -1
- package/fields/docs/reference/types.md +3 -1
- package/fields/skills/viewkit/SKILL.md +1 -1
- package/package.json +2 -1
- package/postgres/dist/definitions/build.js +29 -5
- package/postgres/dist/definitions/label.d.ts +7 -0
- package/postgres/dist/definitions/label.js +9 -1
- package/postgres/dist/definitions/lookup.js +6 -2
- package/postgres/dist/definitions/place.d.ts +6 -3
- package/postgres/dist/definitions/rollup.js +5 -1
- package/postgres/dist/definitions/storage.d.ts +15 -0
- package/postgres/dist/definitions/storage.js +52 -1
- package/postgres/dist/definitions/stored.js +21 -0
- package/postgres/dist/phone.d.ts +13 -1
- package/postgres/dist/phone.js +23 -3
- package/postgres/dist/search-indexes.d.ts +6 -1
- package/postgres/dist/search-indexes.js +71 -25
- package/postgres/dist/search.js +3 -3
- package/postgres/docs/guides/definitions.md +22 -5
- package/postgres/docs/guides/field-map.md +5 -4
- package/postgres/docs/reference/definitions.md +3 -3
- package/postgres/docs/reference/postgres.md +1 -1
- package/views/dist/cells/cell-format.d.ts +2 -2
- package/views/dist/cells/cell-format.js +2 -2
- package/views/dist/cells/cell-values.js +9 -12
- package/views/dist/contract.d.ts +161 -18
- package/views/dist/contract.js +170 -28
- package/views/dist/controls/bulk-bar/bulk-bar-of.d.ts +66 -0
- package/views/dist/controls/bulk-bar/bulk-bar-of.js +22 -0
- package/views/dist/controls/bulk-bar/bulk-bar.d.ts +40 -0
- package/views/dist/controls/bulk-bar/bulk-bar.js +278 -0
- package/views/dist/controls/bulk-bar/looks.d.ts +10 -0
- package/views/dist/controls/bulk-bar/looks.js +14 -0
- package/views/dist/controls/bulk-bar/map-selection-bar.d.ts +19 -0
- package/views/dist/controls/bulk-bar/map-selection-bar.js +57 -0
- package/views/dist/controls/bulk-bar/tokens.d.ts +136 -0
- package/views/dist/controls/bulk-bar/tokens.js +36 -0
- package/views/dist/controls/bulk-bar/words.d.ts +50 -0
- package/views/dist/controls/bulk-bar/words.js +19 -0
- package/views/dist/controls/bulk-bar.css +96 -0
- package/views/dist/controls/button/button.js +3 -1
- package/views/dist/controls/button.css +5 -4
- package/views/dist/controls/checkbox/checkbox.js +3 -1
- package/views/dist/controls/checkbox.css +1 -1
- package/views/dist/controls/choice/tokens.d.ts +79 -0
- package/views/dist/controls/choice/tokens.js +22 -0
- package/views/dist/controls/choice.css +31 -0
- package/views/dist/controls/compound-editor/looks.js +1 -1
- package/views/dist/controls/controls.d.ts +8 -0
- package/views/dist/controls/controls.js +8 -0
- package/views/dist/controls/customize/customize.d.ts +176 -0
- package/views/dist/controls/customize/customize.js +348 -0
- package/views/dist/controls/customize/glide.d.ts +10 -0
- package/views/dist/controls/customize/glide.js +55 -0
- package/views/dist/controls/customize/looks.d.ts +13 -0
- package/views/dist/controls/customize/looks.js +11 -0
- package/views/dist/controls/customize/map-customize-body.d.ts +15 -0
- package/views/dist/controls/customize/map-customize-body.js +195 -0
- package/views/dist/controls/customize/map-ranges.d.ts +23 -0
- package/views/dist/controls/customize/map-ranges.js +41 -0
- package/views/dist/controls/customize/rules.d.ts +39 -0
- package/views/dist/controls/customize/rules.js +21 -0
- package/views/dist/controls/customize/tokens.d.ts +40 -0
- package/views/dist/controls/customize/tokens.js +12 -0
- package/views/dist/controls/customize/words.d.ts +65 -0
- package/views/dist/controls/customize/words.js +42 -0
- package/views/dist/controls/customize.css +57 -0
- package/views/dist/controls/date-editor/looks.js +1 -1
- package/views/dist/controls/filter-editor/block.d.ts +31 -0
- package/views/dist/controls/filter-editor/block.js +27 -0
- package/views/dist/controls/filter-editor/filter-editor.d.ts +4 -0
- package/views/dist/controls/filter-editor/filter-editor.js +86 -43
- package/views/dist/controls/filter-editor/how.d.ts +1 -1
- package/views/dist/controls/filter-editor/how.js +1 -0
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +16 -1
- package/views/dist/controls/filter-editor/map-filter-body.js +39 -13
- package/views/dist/controls/filter-editor/map-rules.d.ts +27 -11
- package/views/dist/controls/filter-editor/map-rules.js +73 -42
- package/views/dist/controls/filter-editor/rules.d.ts +42 -5
- package/views/dist/controls/filter-editor/rules.js +55 -2
- package/views/dist/controls/filter-editor/words.d.ts +15 -0
- package/views/dist/controls/filter-editor/words.js +6 -0
- package/views/dist/controls/filter-editor.css +18 -0
- package/views/dist/controls/index.d.ts +33 -9
- package/views/dist/controls/index.js +32 -9
- package/views/dist/controls/inline-input/looks.js +1 -1
- package/views/dist/controls/input/input.js +10 -4
- package/views/dist/controls/internal/phone.d.ts +5 -4
- package/views/dist/controls/internal/phone.js +7 -7
- package/views/dist/controls/internal/scroll.js +5 -1
- package/views/dist/controls/internal/typed-run.d.ts +2 -0
- package/views/dist/controls/internal/typed-run.js +5 -0
- package/views/dist/controls/menu/map-menu.js +2 -2
- package/views/dist/controls/menu-list/menu-list.d.ts +16 -1
- package/views/dist/controls/menu-list/menu-list.js +26 -8
- package/views/dist/controls/menu-list.css +8 -0
- package/views/dist/controls/number-editor/looks.js +1 -1
- package/views/dist/controls/option/option.js +3 -1
- package/views/dist/controls/option.css +1 -1
- package/views/dist/controls/pane/pane.d.ts +4 -0
- package/views/dist/controls/pane/pane.js +2 -1
- package/views/dist/controls/picker/looks.js +1 -1
- package/views/dist/controls/picker/map-picker.d.ts +6 -2
- package/views/dist/controls/picker/map-picker.js +4 -2
- package/views/dist/controls/picker/picker.d.ts +7 -0
- package/views/dist/controls/picker/picker.js +57 -8
- package/views/dist/controls/popover/map-popover.d.ts +1 -1
- package/views/dist/controls/popover/map-popover.js +2 -2
- package/views/dist/controls/popover/popover.js +2 -1
- package/views/dist/controls/popover.css +3 -0
- package/views/dist/controls/ports-host/map-ports-host.d.ts +7 -0
- package/views/dist/controls/ports-host/map-ports-host.js +43 -0
- package/views/dist/controls/press/tokens.d.ts +8 -0
- package/views/dist/controls/press/tokens.js +4 -0
- package/views/dist/controls/press.css +44 -0
- package/views/dist/controls/quick-filters/looks.d.ts +11 -0
- package/views/dist/controls/quick-filters/looks.js +9 -0
- package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +31 -0
- package/views/dist/controls/quick-filters/map-quick-filters-body.js +59 -0
- package/views/dist/controls/quick-filters/quick-filters.d.ts +37 -0
- package/views/dist/controls/quick-filters/quick-filters.js +89 -0
- package/views/dist/controls/quick-filters/reminder.d.ts +18 -0
- package/views/dist/controls/quick-filters/reminder.js +41 -0
- package/views/dist/controls/quick-filters/rules.d.ts +89 -0
- package/views/dist/controls/quick-filters/rules.js +52 -0
- package/views/dist/controls/quick-filters/tokens.d.ts +112 -0
- package/views/dist/controls/quick-filters/tokens.js +30 -0
- package/views/dist/controls/quick-filters/words.d.ts +25 -0
- package/views/dist/controls/quick-filters/words.js +13 -0
- package/views/dist/controls/quick-filters.css +118 -0
- package/views/dist/controls/sheet/bottom-sheet.d.ts +9 -4
- package/views/dist/controls/sheet/bottom-sheet.js +4 -4
- package/views/dist/controls/sheet/map-sheet.d.ts +4 -1
- package/views/dist/controls/sheet/map-sheet.js +19 -6
- package/views/dist/controls/sheet/sheet-parts.d.ts +10 -0
- package/views/dist/controls/sheet/sheet-parts.js +2 -0
- package/views/dist/controls/switch-row/switch-row.d.ts +15 -0
- package/views/dist/controls/switch-row/switch-row.js +9 -0
- package/views/dist/controls/switch-row/tokens.d.ts +51 -0
- package/views/dist/controls/switch-row/tokens.js +15 -0
- package/views/dist/controls/switch-row.css +39 -0
- package/views/dist/controls/switch.css +1 -1
- package/views/dist/controls/tag/tag.js +3 -1
- package/views/dist/controls/tag-field/tag-field.d.ts +20 -0
- package/views/dist/controls/tag-field/tag-field.js +19 -0
- package/views/dist/controls/tag-field/tokens.d.ts +7 -0
- package/views/dist/controls/tag-field/tokens.js +4 -0
- package/views/dist/controls/tag-field.css +13 -0
- package/views/dist/controls/text-editor/looks.js +1 -1
- package/views/dist/controls/text-editor/map-text-body.d.ts +1 -1
- package/views/dist/controls/text-editor/map-text-body.js +2 -2
- package/views/dist/controls/text-editor/text-editor.d.ts +3 -0
- package/views/dist/controls/text-editor/text-editor.js +17 -7
- package/views/dist/controls/text-editor.css +11 -0
- package/views/dist/controls/toast/toast.d.ts +5 -1
- package/views/dist/controls/toast/toast.js +5 -3
- package/views/dist/controls/tokens.js +18 -0
- package/views/dist/controls/toolbar/keys.d.ts +3 -0
- package/views/dist/controls/toolbar/keys.js +11 -0
- package/views/dist/controls/toolbar/looks.d.ts +10 -0
- package/views/dist/controls/toolbar/looks.js +40 -0
- package/views/dist/controls/toolbar/tokens.d.ts +28 -0
- package/views/dist/controls/toolbar/tokens.js +9 -0
- package/views/dist/controls/toolbar/toolbar.d.ts +111 -0
- package/views/dist/controls/toolbar/toolbar.js +370 -0
- package/views/dist/controls/toolbar/words.d.ts +28 -0
- package/views/dist/controls/toolbar/words.js +17 -0
- package/views/dist/controls/toolbar-button/looks.d.ts +4 -0
- package/views/dist/controls/toolbar-button/looks.js +21 -0
- package/views/dist/controls/toolbar-button/tokens.d.ts +103 -0
- package/views/dist/controls/toolbar-button/tokens.js +28 -0
- package/views/dist/controls/toolbar-button/toolbar-button.d.ts +66 -0
- package/views/dist/controls/toolbar-button/toolbar-button.js +51 -0
- package/views/dist/controls/toolbar-button.css +75 -0
- package/views/dist/controls/toolbar.css +65 -0
- package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
- package/views/dist/controls/tooltip/map-tooltip.js +2 -2
- package/views/dist/controls/tooltip/tooltip.d.ts +3 -1
- package/views/dist/controls/tooltip/tooltip.js +2 -2
- package/views/dist/controls/values-editor/looks.js +1 -1
- package/views/dist/controls/values-editor/values.js +6 -2
- package/views/dist/controls/views-list/map-views-list-body.d.ts +4 -1
- package/views/dist/controls/views-list/map-views-list-body.js +128 -4
- package/views/dist/controls/views-list/rules.d.ts +26 -0
- package/views/dist/controls/views-list/rules.js +63 -0
- package/views/dist/controls/views-list/view-menu.d.ts +84 -0
- package/views/dist/controls/views-list/view-menu.js +201 -0
- package/views/dist/controls/views-list/views-list.d.ts +8 -1
- package/views/dist/controls/views-list/views-list.js +18 -3
- package/views/dist/controls/views-list/words.d.ts +54 -0
- package/views/dist/controls/views-list/words.js +10 -1
- package/views/dist/controls/views-list.css +5 -1
- package/views/dist/display/date.js +3 -3
- package/views/dist/display/format.d.ts +6 -0
- package/views/dist/display/format.js +3 -0
- package/views/dist/display/index.d.ts +1 -1
- package/views/dist/display/index.js +1 -1
- package/views/dist/display/options.d.ts +1 -1
- package/views/dist/display/range.d.ts +2 -1
- package/views/dist/display/range.js +4 -1
- package/views/dist/display/rich-text.js +0 -1
- package/views/dist/editors/ChipsEditor.d.ts +4 -5
- package/views/dist/editors/ChipsEditor.js +12 -78
- package/views/dist/editors/DateEditor.d.ts +12 -16
- package/views/dist/editors/DateEditor.js +40 -191
- package/views/dist/editors/EditorPanel.d.ts +2 -6
- package/views/dist/editors/EditorPanel.js +2 -2
- package/views/dist/editors/LocationEditor.d.ts +11 -19
- package/views/dist/editors/LocationEditor.js +19 -211
- package/views/dist/editors/NameEditor.d.ts +8 -16
- package/views/dist/editors/NameEditor.js +11 -100
- package/views/dist/editors/NumberEditor.d.ts +14 -21
- package/views/dist/editors/NumberEditor.js +22 -49
- package/views/dist/editors/RangeEditor.d.ts +9 -33
- package/views/dist/editors/RangeEditor.js +12 -97
- package/views/dist/editors/RelationEditor.d.ts +6 -9
- package/views/dist/editors/RelationEditor.js +11 -30
- package/views/dist/editors/RelationSetEditor.d.ts +13 -24
- package/views/dist/editors/RelationSetEditor.js +33 -101
- package/views/dist/editors/SelectEditor.d.ts +15 -17
- package/views/dist/editors/SelectEditor.js +15 -94
- package/views/dist/editors/TextEditor.d.ts +23 -26
- package/views/dist/editors/TextEditor.js +11 -48
- package/views/dist/editors/ValueListEditor.d.ts +14 -23
- package/views/dist/editors/ValueListEditor.js +16 -202
- package/views/dist/editors/body-panel.d.ts +13 -7
- package/views/dist/editors/body-panel.js +3 -7
- package/views/dist/editors/edit-cores.d.ts +15 -15
- package/views/dist/editors/edit-cores.js +14 -14
- package/views/dist/editors/number-body.d.ts +1 -1
- package/views/dist/editors/number-step.d.ts +0 -34
- package/views/dist/editors/number-step.js +0 -37
- package/views/dist/editors/option-add-flow.d.ts +1 -13
- package/views/dist/editors/option-add-flow.js +0 -22
- package/views/dist/editors/relation-links-body.d.ts +2 -3
- package/views/dist/editors/relation-picker.d.ts +13 -3
- package/views/dist/editors/relation-source.d.ts +0 -22
- package/views/dist/editors/relation-source.js +0 -21
- package/views/dist/field-row/FieldRow.js +5 -6
- package/views/dist/field-row/FieldRowLane.js +0 -1
- package/views/dist/field-row/editors/RowChipsEditor.js +2 -2
- package/views/dist/field-row/editors/RowDateEditor.d.ts +2 -2
- package/views/dist/field-row/editors/RowDateEditor.js +2 -2
- package/views/dist/field-row/editors/RowNameEditor.d.ts +2 -5
- package/views/dist/field-row/editors/RowNameEditor.js +7 -12
- package/views/dist/field-row/editors/RowNumberEditor.d.ts +1 -1
- package/views/dist/field-row/editors/RowNumberEditor.js +4 -4
- package/views/dist/field-row/editors/RowPlaceEditor.js +3 -3
- package/views/dist/field-row/editors/RowRangeEditor.d.ts +2 -5
- package/views/dist/field-row/editors/RowRangeEditor.js +7 -14
- package/views/dist/field-row/editors/RowRelationEditor.js +3 -3
- package/views/dist/field-row/editors/RowSelectEditor.js +2 -2
- package/views/dist/field-row/editors/RowTextEditor.d.ts +1 -1
- package/views/dist/field-row/editors/RowTextEditor.js +3 -4
- package/views/dist/field-row/editors/RowValueListEditor.js +5 -5
- package/views/dist/field-row/field-row-button.d.ts +6 -9
- package/views/dist/field-row/field-row-button.js +1 -6
- package/views/dist/field-row/field-row-checkbox.d.ts +1 -1
- package/views/dist/field-row/row-target.d.ts +0 -7
- package/views/dist/field-row/row-target.js +0 -2
- package/views/dist/grid/chrome/GridAddColumn.d.ts +2 -1
- package/views/dist/grid/chrome/GridAddColumn.js +8 -66
- package/views/dist/grid/chrome/GridAggregateMenu.d.ts +5 -7
- package/views/dist/grid/chrome/GridAggregateMenu.js +20 -39
- package/views/dist/grid/chrome/GridCellEditors.d.ts +2 -2
- package/views/dist/grid/chrome/GridCellEditors.js +12 -12
- package/views/dist/grid/chrome/GridChipsEditor.js +3 -3
- package/views/dist/grid/chrome/GridColumnMenu.d.ts +11 -12
- package/views/dist/grid/chrome/GridColumnMenu.js +32 -93
- package/views/dist/grid/chrome/GridDateEditor.d.ts +6 -6
- package/views/dist/grid/chrome/GridDateEditor.js +3 -3
- package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -6
- package/views/dist/grid/chrome/GridGroupMenu.js +21 -62
- package/views/dist/grid/chrome/GridHeader.d.ts +1 -2
- package/views/dist/grid/chrome/GridHeader.js +3 -2
- package/views/dist/grid/chrome/GridLongTextEditor.d.ts +17 -38
- package/views/dist/grid/chrome/GridLongTextEditor.js +6 -7
- package/views/dist/grid/chrome/GridNameEditor.js +4 -4
- package/views/dist/grid/chrome/GridNumberEditor.d.ts +4 -5
- package/views/dist/grid/chrome/GridNumberEditor.js +5 -6
- package/views/dist/grid/chrome/GridPlaceEditor.d.ts +2 -5
- package/views/dist/grid/chrome/GridPlaceEditor.js +5 -5
- package/views/dist/grid/chrome/GridRangeEditor.d.ts +6 -12
- package/views/dist/grid/chrome/GridRangeEditor.js +7 -15
- package/views/dist/grid/chrome/GridRelationEditor.js +5 -5
- package/views/dist/grid/chrome/GridRow.js +0 -3
- package/views/dist/grid/chrome/GridRowActions.d.ts +1 -1
- package/views/dist/grid/chrome/GridRowActions.js +0 -5
- package/views/dist/grid/chrome/GridRowCells.js +11 -7
- package/views/dist/grid/chrome/GridSelectEditor.js +3 -3
- package/views/dist/grid/chrome/GridStructure.js +0 -1
- package/views/dist/grid/chrome/GridTable.js +1 -1
- package/views/dist/grid/chrome/GridTextEditor.d.ts +5 -7
- package/views/dist/grid/chrome/GridTextEditor.js +5 -18
- package/views/dist/grid/chrome/GridValueListEditor.js +4 -4
- package/views/dist/grid/chrome/grid-body-place.d.ts +2 -3
- package/views/dist/grid/chrome/grid-body-place.js +4 -8
- package/views/dist/grid/chrome/grid-button.d.ts +7 -10
- package/views/dist/grid/chrome/grid-button.js +1 -6
- package/views/dist/grid/chrome/grid-cell-classes.js +1 -1
- package/views/dist/grid/chrome/grid-column-menu-items.d.ts +4 -4
- package/views/dist/grid/chrome/grid-column-menu-items.js +10 -6
- package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -1
- package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
- package/views/dist/grid/chrome/grid-fitted-box.d.ts +7 -1
- package/views/dist/grid/chrome/grid-fitted-box.js +4 -4
- package/views/dist/grid/chrome/grid-group-menu-parts.d.ts +5 -9
- package/views/dist/grid/chrome/grid-group-menu-parts.js +1 -3
- package/views/dist/grid/chrome/grid-hover.js +0 -1
- package/views/dist/grid/chrome/grid-menu-focus.d.ts +7 -31
- package/views/dist/grid/chrome/grid-menu-focus.js +7 -47
- package/views/dist/grid/chrome/grid-styles.d.ts +0 -3
- package/views/dist/grid/chrome/grid-styles.js +0 -1
- package/views/dist/grid/chrome/grid-table-props.d.ts +6 -10
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -4
- package/views/dist/grid/core/clipboard-model.js +9 -4
- package/views/dist/grid/core/editing-controller.d.ts +2 -1
- package/views/dist/grid/core/editing-controller.js +10 -2
- package/views/dist/grid/core/refusal-sentence.d.ts +3 -0
- package/views/dist/grid/core/refusal-sentence.js +2 -2
- package/views/dist/grid/core/write-states.d.ts +3 -1
- package/views/dist/grid/core/write-states.js +6 -2
- package/views/dist/grid/grid.css +240 -0
- package/views/dist/grid/looks.d.ts +5 -1
- package/views/dist/grid/looks.js +20 -12
- package/views/dist/grid-tokens.d.ts +109 -0
- package/views/dist/grid-tokens.js +29 -0
- package/views/dist/looks/index.d.ts +5 -0
- package/views/dist/looks/index.js +5 -0
- package/views/dist/looks/pieces.js +10 -0
- package/views/dist/model/body-frame.d.ts +0 -32
- package/views/dist/model/body-frame.js +1 -15
- package/views/dist/model/column-capabilities.d.ts +2 -0
- package/views/dist/model/column-filters.d.ts +2 -1
- package/views/dist/model/column-from.js +2 -2
- package/views/dist/model/column-inspect.d.ts +5 -5
- package/views/dist/model/column-inspect.js +2 -2
- package/views/dist/model/relation-filters.d.ts +2 -0
- package/views/dist/panels/customize-body.d.ts +1 -10
- package/views/dist/panels/customize-body.js +0 -3
- package/views/dist/panels/filter/MenuSelect.js +0 -5
- package/views/dist/panels/filter/RangeFilterBody.js +0 -1
- package/views/dist/panels/filter/details.d.ts +1 -5
- package/views/dist/panels/filter/details.js +0 -13
- package/views/dist/panels/filter/filter-list.d.ts +0 -1
- package/views/dist/panels/filter/filter-list.js +1 -1
- package/views/dist/panels/index.d.ts +2 -2
- package/views/dist/panels/index.js +2 -2
- package/views/dist/panels/labels.d.ts +4 -0
- package/views/dist/panels/labels.js +8 -0
- package/views/dist/panels/model.d.ts +10 -2
- package/views/dist/panels/panel-button.d.ts +10 -12
- package/views/dist/panels/panel-button.js +1 -6
- package/views/dist/panels/quick/model.d.ts +4 -0
- package/views/dist/panels/react/chrome.d.ts +0 -17
- package/views/dist/panels/react/chrome.js +0 -8
- package/views/dist/panels/react/customize-body.d.ts +14 -12
- package/views/dist/panels/react/customize-body.js +93 -19
- package/views/dist/panels/react/customize.d.ts +16 -12
- package/views/dist/panels/react/customize.js +4 -110
- package/views/dist/panels/react/filter/FilterEditor.d.ts +4 -18
- package/views/dist/panels/react/filter/FilterEditor.js +6 -330
- package/views/dist/panels/react/filter/FilterFieldList.d.ts +1 -1
- package/views/dist/panels/react/filter/FilterFieldList.js +27 -51
- package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +1 -11
- package/views/dist/panels/react/filter/PhoneFilterEditor.js +8 -144
- package/views/dist/panels/react/filter/editor-ctx.d.ts +1 -33
- package/views/dist/panels/react/filter/editor-ctx.js +5 -33
- package/views/dist/panels/react/filter/filter-body.js +5 -2
- package/views/dist/panels/react/filter/filter-part-body.d.ts +3 -6
- package/views/dist/panels/react/filter/filter-part-body.js +0 -5
- package/views/dist/panels/react/filter/rule-writes.d.ts +1 -26
- package/views/dist/panels/react/filter/rule-writes.js +4 -95
- package/views/dist/panels/react/order-details.d.ts +1 -26
- package/views/dist/panels/react/order-details.js +3 -69
- package/views/dist/panels/react/panel-header.js +0 -1
- package/views/dist/panels/react/panel-step.d.ts +3 -0
- package/views/dist/panels/react/panel-step.js +2 -1
- package/views/dist/panels/react/popover.d.ts +4 -7
- package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +2 -4
- package/views/dist/panels/react/quick/QuickFiltersPanel.js +16 -136
- package/views/dist/panels/react/sort/SortEditor.d.ts +4 -4
- package/views/dist/panels/react/sort/SortEditor.js +8 -245
- package/views/dist/panels/react/sort/SortFieldList.d.ts +1 -1
- package/views/dist/panels/react/sort/SortFieldList.js +11 -25
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +13 -3
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +10 -3
- package/views/dist/panels/react/toolbar/Toolbar.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +16 -18
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +2 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +3 -3
- package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +12 -4
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -2
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.js +0 -4
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +0 -1
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +3 -3
- package/views/dist/panels/react/view-actions.js +0 -1
- package/views/dist/panels/react/views-row/FoldingViewRow.js +2 -5
- package/views/dist/panels/react/views-row/ViewCreatePill.js +0 -1
- package/views/dist/panels/react/views-row/ViewPicker.js +30 -45
- package/views/dist/panels/react/views-row/ViewPickerRow.js +0 -2
- package/views/dist/panels/react/views-row/menu-classes.d.ts +0 -4
- package/views/dist/panels/react/views-row/menu-classes.js +0 -2
- package/views/dist/panels/react.d.ts +5 -12
- package/views/dist/panels/react.js +5 -12
- package/views/dist/panels/settings/filter-groups.d.ts +3 -0
- package/views/dist/panels/settings/filter-groups.js +40 -9
- package/views/dist/panels/settings/filters.d.ts +5 -0
- package/views/dist/panels/settings/filters.js +12 -6
- package/views/dist/panels/views-row/model.d.ts +10 -1
- package/views/dist/provider/ViewsProvider.d.ts +2 -46
- package/views/dist/provider/ViewsProvider.js +31 -27
- package/views/dist/provider/components.d.ts +295 -107
- package/views/dist/provider/context.d.ts +7 -21
- package/views/dist/provider/missing-slot.d.ts +3 -7
- package/views/dist/provider/missing-slot.js +2 -9
- package/views/dist/provider/ports.d.ts +18 -6
- package/views/dist/provider/ports.js +2 -1
- package/views/dist/react.d.ts +2 -3
- package/views/dist/react.js +1 -1
- package/views/dist/selection/SelectionBar.d.ts +2 -16
- package/views/dist/selection/SelectionBar.js +6 -4
- package/views/dist/selection/bar-props.d.ts +26 -0
- package/views/dist/selection/bar-props.js +1 -0
- package/views/dist/selection/index.d.ts +1 -1
- package/views/dist/selection/verbs.d.ts +32 -5
- package/views/dist/styles.css +694 -191
- package/views/dist/styles.unlayered.css +691 -188
- package/views/docs/contract.md +133 -130
- package/views/docs/controls/bulk-bar.md +41 -0
- package/views/docs/controls/choice.md +25 -0
- package/views/docs/controls/customize.md +17 -0
- package/views/docs/controls/popover.md +2 -0
- package/views/docs/controls/press.md +9 -0
- package/views/docs/controls/quick-filters.md +35 -0
- package/views/docs/controls/radio.md +1 -1
- package/views/docs/controls/switch-row.md +18 -0
- package/views/docs/controls/tag-field.md +7 -0
- package/views/docs/controls/toolbar-button.md +31 -0
- package/views/docs/controls/toolbar.md +14 -0
- package/views/docs/getting-started.md +222 -2
- package/views/docs/guides/atoms.md +2 -2
- package/views/docs/guides/cells.md +224 -4
- package/views/docs/guides/display.md +3 -3
- package/views/docs/guides/editors.md +235 -20
- package/views/docs/guides/looks.md +8 -2
- package/views/docs/guides/ports.md +7 -7
- package/views/docs/guides/selection.md +5 -1
- package/views/docs/guides/the-grid.md +15 -17
- package/views/docs/guides/the-provider.md +9 -15
- package/views/docs/install.md +4 -1
- package/views/docs/reference/cells.md +2 -2
- package/views/docs/reference/controls.md +215 -21
- package/views/docs/reference/display.md +1 -0
- package/views/docs/reference/editors-chips.md +2 -2
- package/views/docs/reference/editors-date.md +4 -4
- package/views/docs/reference/editors-location.md +4 -7
- package/views/docs/reference/editors-name.md +3 -5
- package/views/docs/reference/editors-number.md +10 -10
- package/views/docs/reference/editors-panel.md +3 -3
- package/views/docs/reference/editors-range.md +3 -5
- package/views/docs/reference/editors-relation.md +4 -4
- package/views/docs/reference/editors-select.md +3 -3
- package/views/docs/reference/editors-text.md +3 -4
- package/views/docs/reference/editors-value-list.md +3 -3
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +2 -2
- package/views/docs/reference/looks.md +25 -11
- package/views/docs/reference/panels-react.md +23 -37
- package/views/docs/reference/panels.md +8 -6
- package/views/docs/reference/react.md +24 -24
- package/views/docs/reference/selection.md +4 -2
- package/views/docs/reference/views.md +12 -11
- package/views/skills/views/SKILL.md +2 -2
- package/views/dist/editors/relation-panel.d.ts +0 -69
- package/views/dist/editors/relation-panel.js +0 -46
- package/views/dist/grid/chrome/GridColumnColorSection.d.ts +0 -13
- package/views/dist/grid/chrome/GridColumnColorSection.js +0 -40
- package/views/dist/grid/chrome/GridColumnDateSection.d.ts +0 -28
- package/views/dist/grid/chrome/GridColumnDateSection.js +0 -23
- package/views/dist/grid/chrome/GridColumnDurationSection.d.ts +0 -23
- package/views/dist/grid/chrome/GridColumnDurationSection.js +0 -24
- package/views/dist/grid/chrome/GridColumnNumberSection.d.ts +0 -29
- package/views/dist/grid/chrome/GridColumnNumberSection.js +0 -27
- package/views/dist/grid/chrome/GridColumnPercentSection.d.ts +0 -16
- package/views/dist/grid/chrome/GridColumnPercentSection.js +0 -16
- package/views/dist/grid/chrome/GridColumnSortSection.d.ts +0 -38
- package/views/dist/grid/chrome/GridColumnSortSection.js +0 -33
- package/views/dist/grid/chrome/GridFlyout.d.ts +0 -44
- package/views/dist/grid/chrome/GridFlyout.js +0 -80
- package/views/dist/grid/chrome/GridMenuRow.d.ts +0 -15
- package/views/dist/grid/chrome/GridMenuRow.js +0 -15
- package/views/dist/grid/chrome/grid-menu-search.d.ts +0 -7
- package/views/dist/grid/chrome/grid-menu-search.js +0 -7
- package/views/dist/panels/react/GroupBucketsList.d.ts +0 -16
- package/views/dist/panels/react/GroupBucketsList.js +0 -44
- package/views/dist/panels/react/LayoutColumnsList.d.ts +0 -24
- package/views/dist/panels/react/LayoutColumnsList.js +0 -101
- package/views/dist/panels/react/PopoverColumnDetail.d.ts +0 -11
- package/views/dist/panels/react/PopoverColumnDetail.js +0 -24
- package/views/dist/panels/react/drag.d.ts +0 -2
- package/views/dist/panels/react/drag.js +0 -5
- package/views/dist/panels/react/layout-detail.d.ts +0 -4
- package/views/dist/panels/react/layout-detail.js +0 -29
- package/views/dist/panels/react/root-list.d.ts +0 -6
- package/views/dist/panels/react/root-list.js +0 -31
- package/views/dist/panels/react/sort/use-sort-drag.d.ts +0 -17
- package/views/dist/panels/react/sort/use-sort-drag.js +0 -39
- package/views/dist/panels/react/view-footer.d.ts +0 -20
- package/views/dist/panels/react/view-footer.js +0 -41
|
@@ -49,7 +49,7 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
|
|
|
49
49
|
|
|
50
50
|
## The Tooltip
|
|
51
51
|
|
|
52
|
-
- `Tooltip` — the name of a button that shows only an icon, or why something can't be used (`reason`): on hover after its wait, at once on keyboard focus, and on a touch screen a reason on a tap on what's off. What it names is its one child, which takes a ref, with no element round it. `keys` adds a shortcut's keys after the words. Its wait is `--vk-tooltip-delay`, read off what it names (a look set round it reaches it), or `delay` in ms. What it names wears the class `o-tooltip-trigger`. `CONTROLS.Tooltip` draws ViewKit's tooltips with it
|
|
52
|
+
- `Tooltip` — the name of a button that shows only an icon, or why something can't be used (`reason`): on hover after its wait, at once on keyboard focus, and on a touch screen a reason on a tap on what's off. What it names is its one child, which takes a ref, with no element round it. `keys` adds a shortcut's keys after the words. Its wait is `--vk-tooltip-delay`, read off what it names (a look set round it reaches it), or `delay` in ms. What it names wears the class `o-tooltip-trigger`. `CONTROLS.Tooltip` draws ViewKit's tooltips with it, at the `side` and `align` asked, after `delayMs` where one is handed (0 opens it at once), `className` on the tooltip itself; `className` is a prop of the Tooltip too.
|
|
53
53
|
- `TooltipProps` — its props.
|
|
54
54
|
- `TooltipGroup` — tooltips side by side (a toolbar): once one has shown, the next shows at once for its warm time, `--vk-tooltip-warm` read off its first tooltip, or `warm` in ms.
|
|
55
55
|
- `TooltipGroupProps` — its props.
|
|
@@ -65,7 +65,7 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
|
|
|
65
65
|
|
|
66
66
|
## The Popover
|
|
67
67
|
|
|
68
|
-
- `Popover` — what opens from what it belongs to on a computer: a shell that knows nothing of what it holds. It opens from its `trigger`, or from an `anchor` when it is set `open` from outside (an element, a ref to one, or a point on the page); it stands on its `side` and flips or shifts to stay on the screen; a press outside, Escape or focus leaving it closes it and gives focus back, and `onOutsidePress` or `onEscape` returning false keeps it open; it follows what opened it through a scroll and closes once that has scrolled out of the view that clips it. It says why it closed. `CONTROLS.Popover` draws ViewKit's popups with it, `panelData` and `onPanelClick` on its own element;
|
|
68
|
+
- `Popover` — what opens from what it belongs to on a computer: a shell that knows nothing of what it holds. It opens from its `trigger`, or from an `anchor` when it is set `open` from outside (an element, a ref to one, or a point on the page); it stands on its `side` and flips or shifts to stay on the screen; a press outside, Escape or focus leaving it closes it and gives focus back, and `onOutsidePress` or `onEscape` returning false keeps it open; it follows what opened it through a scroll and closes once that has scrolled out of the view that clips it. It says why it closed. `CONTROLS.Popover` draws ViewKit's popups with it, `panelData` and `onPanelClick` on its own element; a popup that holds a list (`chrome` `menu`) is marked `data-popover-chrome="menu"`, which your styles may draw otherwise, and the Outright look draws it as its card.
|
|
69
69
|
- `PopoverProps` — its props.
|
|
70
70
|
- `PopoverAnchor` — where it opens from when it has no trigger.
|
|
71
71
|
- `PopoverChangeDetails` — why it opened or closed, and the event that did it.
|
|
@@ -82,7 +82,7 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
|
|
|
82
82
|
|
|
83
83
|
## The bottom Sheet
|
|
84
84
|
|
|
85
|
-
- `Sheet` — what rises from the bottom of the phone, in a `form` (`full`, `floating`, `blend`, `edge`) and at `stops`, on Base UI's drawer: the drag, focus, Escape and the dim, and a settle on a spring that starts from the finger's speed. What it holds is poured in. `standing` keeps it in its `container`, a screen on a page. It says why it closed. `CONTROLS.Sheet` draws ViewKit's sheets with it, the editor's ✕ (or Back) and ✓ in its head;
|
|
85
|
+
- `Sheet` — what rises from the bottom of the phone, in a `form` (`full`, `floating`, `blend`, `edge`) and at `stops`, on Base UI's drawer: the drag, focus, Escape and the dim, and a settle on a spring that starts from the finger's speed. What it holds is poured in. `standing` keeps it in its `container`, a screen on a page. It says why it closed. `CONTROLS.Sheet` draws ViewKit's sheets with it, the editor's ✕ (or Back) and ✓ in its head; its height is the `snap` asked (`auto` the `edge` form, as tall as its content; `half` the `blend` form, opening at half; `peek` opening at the small stop; `full`, and none, to the top), a title that isn't words is drawn as handed (its name to screen readers still the label), `description` under the title and `className` on the sheet itself, a prop of the Sheet too.
|
|
86
86
|
- `SheetProps` — its props.
|
|
87
87
|
- `SheetChangeDetails` — why it opened or closed.
|
|
88
88
|
- `SheetForm` — `full`, `floating`, `blend` or `edge`.
|
|
@@ -103,7 +103,7 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
|
|
|
103
103
|
|
|
104
104
|
`CONTROLS` fills two slots of the map with them: its `Input` draws ViewKit's text boxes as the Input, bare unless ViewKit asks for its field, sized by its place, its digits lined up for a number's keyboard and autofill off; its `Checkbox` draws ViewKit's tick boxes as the Checkbox, handing on the press that changed it.
|
|
105
105
|
|
|
106
|
-
- `Input` — what a person types into, on Base UI's input: in its field (`chrome` `soft`: in the Soft look) unless `chrome` says `bare`, at `size` (`2xs` to `lg`, `md` 36 the default), `multiline` long text that may `grow` to `maxLines`, start at `minLines` or show `lines`, `numeric` digits, `autofill` on unless said, and `look`, its own look. `combobox` puts it as the box of a Base UI combobox's list.
|
|
106
|
+
- `Input` — what a person types into, on Base UI's input: in its field (`chrome` `soft`: in the Soft look) unless `chrome` says `bare`, at `size` (`2xs` to `lg`, `md` 36 the default), `multiline` long text that may `grow` to `maxLines`, start at `minLines` or show `lines`, `numeric` digits, `autofill` on unless said, and `look`, its own look. `combobox` puts it as the box of a Base UI combobox's list. Long text keeps a typed run whole: one ⌘Z takes it back, a value handed to it or not.
|
|
107
107
|
- `InputProps` — its props.
|
|
108
108
|
- `InputComboboxProps` — its props as a combobox's box.
|
|
109
109
|
- `InputSize` — `2xs`, `xs`, `sm`, `md`, `lg`.
|
|
@@ -148,7 +148,7 @@ Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the O
|
|
|
148
148
|
- `CheckboxList` — checkboxes in rows in a bordered box, Base UI's checkbox group.
|
|
149
149
|
- `CheckboxListProps` — its props.
|
|
150
150
|
|
|
151
|
-
Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`, `number-field.css` and `checkbox.css`; the Checkbox's words (`o-choice-*`) and the phone's larger
|
|
151
|
+
Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`, `number-field.css` and `checkbox.css`; the Checkbox's words (`o-choice-*`) are drawn by `choice.css` and the phone's larger pressing area by `press.css` (below). Their phone rules hold on an element marked `data-vk-phone` and inside it: each control marks its own root on a phone, by the line the app hands the provider (`desktopQuery`), a PhoneHost screen or a ComputerHost, and an app marks a box it shows as a phone's screen the same way. A control told its `form` changes only its layout; its sizes stay the device's. On the server and before the page comes alive a control draws the computer's form. `input.css` keeps one Outright Showcase hook, `[data-computer-host]`: a box marked so keeps typable words at 16px, so iOS never zooms into a field drawn at a computer's size on a phone.
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
<!-- The rows: the Option, the Tag, the Status, the Switch, the menu list -->
|
|
@@ -202,7 +202,7 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
|
|
|
202
202
|
- `MenuListProps` — its props.
|
|
203
203
|
- `MenuListRows` — a menu's rows on a computer, every kind of entry, each level in with its own panel beside it, placed inside a Base UI Menu or ContextMenu popup; `host` is the popup host its levels open in.
|
|
204
204
|
- `MenuListShown` — the same rows standing still on a page: `open` shows a level's rows beside it, `on` a row as under the pointer.
|
|
205
|
-
- `MenuListPanelRows` — a menu's rows in a panel that is no menu (a pane, a popover): one tab stop, ↑ ↓ wrapping, Home, End and a typed letter, Enter and Space press, → presses a row one level in, which `onOpen` hands its holder; `ticks` `box`, `switch` or `eye`; rows with a `grip` moved by it, the pointer or ↑ ↓ on it.
|
|
205
|
+
- `MenuListPanelRows` — a menu's rows in a panel that is no menu (a pane, a popover): one tab stop, ↑ ↓ wrapping, Home, End and a typed letter, Enter and Space press, → presses a row one level in, which `onOpen` hands its holder; a tick row may open a level too (`opens`, the name of the › after its tick, which → presses while Enter and Space still tick it) and carry one Toggle before its tick (`toggle`: its mark, name, state, press, and `disabled` saying why it can't be pressed), the same in `MenuList` on a phone; `ticks` `box`, `switch` or `eye`; rows with a `grip` moved by it, the pointer or ↑ ↓ on it.
|
|
206
206
|
- `MenuListPanelRowsProps` — its props.
|
|
207
207
|
- `MenuListWords` — the words its rows with a grip and its Switches say: a grip's name, how the rows move on a computer and on a phone, a move said, a Switch's two words; handed as `words` to `MenuList` and `MenuListPanelRows`.
|
|
208
208
|
- `MENU_LIST_WORDS` — those words in English.
|
|
@@ -290,7 +290,7 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
|
|
|
290
290
|
|
|
291
291
|
## The Picker's core
|
|
292
292
|
|
|
293
|
-
- `usePicker` — `usePicker(props)`: the Picker's parts for a shell to pour in, its body and on a phone the Sheet head's buttons: a list to pick from, with its search, the empty row, Create, several held, a row's own menu (on a phone in a frame of its own by `menuFrame`), levels one in and rows put in order. Its options are read off the frame round it (`pickerWornOf`).
|
|
293
|
+
- `usePicker` — `usePicker(props)`: the Picker's parts for a shell to pour in, its body and on a phone the Sheet head's buttons: a list to pick from, with its search, the empty row, Create, several held, a row's own menu (on a phone in a frame of its own by `menuFrame`; its words, and the ⋯'s beside a phone's search, by `menuWords`), levels one in and rows put in order. Its options are read off the frame round it (`pickerWornOf`). ↓ and ↑ pass a greyed row by.
|
|
294
294
|
- `Picker` — the Picker's body alone.
|
|
295
295
|
- `PickerUnder` — the Picker under a box that opens it, on a computer (the Select's): its root round the box, its list in the box's panel.
|
|
296
296
|
- `PickerProps` — its props.
|
|
@@ -333,7 +333,7 @@ Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`
|
|
|
333
333
|
- `chipsThatFit` — how many chips stand on its one line.
|
|
334
334
|
- `filledMatch` — the choice a browser's fill names.
|
|
335
335
|
|
|
336
|
-
<!-- The panels' block: the Pane, the toolbar button, the Radio, the sort editor, the views list, the filter editor, the group editor, the Modal, the alert dialog, the Toast, the Collapsible, the Alert, the Notice -->
|
|
336
|
+
<!-- The panels' block: the Pane, the toolbar button, the Radio, the sort editor, the views list, the filter editor, the group editor, Customize, the Modal, the alert dialog, the Toast, the Collapsible, the Alert, the Notice -->
|
|
337
337
|
|
|
338
338
|
## The Pane
|
|
339
339
|
|
|
@@ -353,9 +353,24 @@ A list's panel at its right edge, on a computer, on Base UI's dialog, not modal:
|
|
|
353
353
|
- `PaneState` — what stands in it, by its key, and what opened it last.
|
|
354
354
|
- `PanePress` — a press on an opener, or a close from inside.
|
|
355
355
|
|
|
356
|
+
## The toolbar button
|
|
357
|
+
|
|
358
|
+
What stands in a toolbar: the view switcher, View settings, the sort, each filter on the filter bar, a phone's round buttons. It is the Button, on Base UI's Toolbar button inside a toolbar: its ground picks the Button's kind (ghost the quiet, bordered the outline, filled the soft), its size the Button's height, its words whether it is icon-only, so every Button option an app sets reaches it. Its own options are read off the frame around it (`data-toolbar-button-<option>`), a computer's or a phone's, and change as the frame's attributes change; what it holds can say otherwise for itself. Nothing set, it is bordered, 32, its icon and word on a computer, and filled, 36, round, its icon alone on a phone. Its stylesheet is `viewkitjs/views/controls/toolbar-button.css`, after the Button's; its options and looks are `TOOLBAR_BUTTON_LOOKS`. ViewKit's own toolbar still draws its `ToolbarButton` atom: an app hands this control through its own atom.
|
|
359
|
+
|
|
360
|
+
Its name here is `ToolbarButtonControl`: `viewkitjs/views/panels/react` already names the toolbar's part `ToolbarButton`, and one package holds no two public names alike.
|
|
361
|
+
|
|
362
|
+
- `ToolbarButtonControl` — the button: `label` (its word and, its icon alone, its name to a screen reader), `icon`, `iconEnd`, `children` (what it says in place of its name), `count` (at its end, said after its name when its icon stands alone), `dot`, `empty`, `lit`, `aside`, `joined` (`start`, `middle` or `end`), `current` (a view tab, `true` the open one), `ground`, `words`, `size`, `corners`, `smoothing` and `form` (each over what the frame picks), `filter` and `stays` (what a folding toolbar reads), `focusableWhenDisabled`, and the Button's own props.
|
|
363
|
+
- `ToolbarButtonProps` — its props.
|
|
364
|
+
- `ToolbarButtonGround` — `ghost`, `bordered` or `filled`.
|
|
365
|
+
- `ToolbarButtonWords` — `both`, `icon` or `word`.
|
|
366
|
+
- `ToolbarButtonSize` — `28`, `32`, `36` or `44`.
|
|
367
|
+
- `ToolbarButtonSmoothing` — `app`, `smooth` or `round`.
|
|
368
|
+
- `InToolbar` — the toolbar it stands in: `{ size, form }`, which it takes unless it says its own, and inside which it is one of the toolbar's stops.
|
|
369
|
+
- `useToolbarButtonWorn(el, phone)` — its options as worn around `el`, kept up to date: what a toolbar reads for its row's height.
|
|
370
|
+
|
|
356
371
|
## The Radio
|
|
357
372
|
|
|
358
|
-
One of a few choices, all of them in sight, on Base UI's radio group: the arrow keys move the choice, a hidden input carries it in a form, and the label round a ring presses it. Its stylesheet is `viewkitjs/views/controls/radio.css`; the words beside a choice and a card's edge and ground (`o-choice-*`) are
|
|
373
|
+
One of a few choices, all of them in sight, on Base UI's radio group: the arrow keys move the choice, a hidden input carries it in a form, and the label round a ring presses it. Its stylesheet is `viewkitjs/views/controls/radio.css`; the words beside a choice and a card's edge and ground (`o-choice-*`) are drawn by `choice.css`, as the Checkbox's are, and its ring's pressing area by `press.css`. Its group marks a phone from the device (`data-vk-phone`), where marked cards stand one under another and tiles on one card. The Links editor draws a link's lead with it.
|
|
359
374
|
|
|
360
375
|
- `RadioGroup` — its choices, one under another: its `label` (the group a FieldSet, its name the legend; without one, give it an `aria-label`), `row` for two to four side by side, `tiles` for marked cards three across, and Base UI's group props (`value`, `defaultValue`, `onValueChange`, `disabled`).
|
|
361
376
|
- `RadioGroupProps` — its props.
|
|
@@ -366,7 +381,9 @@ One of a few choices, all of them in sight, on Base UI's radio group: the arrow
|
|
|
366
381
|
|
|
367
382
|
What a list's sort opens, Attio's: the view's rules in order, the first sorting first, three at most, one per field (a place by one of its parts). Every change is handed on as it is made, so the list sorts again at once. Its stylesheet is `viewkitjs/views/controls/sort-editor.css`; its root marks a phone from the device (`data-vk-phone`).
|
|
368
383
|
|
|
369
|
-
- `
|
|
384
|
+
- `SortEditor` — the body alone, for a shell that holds only a body (the Popover, Customize's Sort): its props are `SortEditorProps`.
|
|
385
|
+
- `useSortEditor` — the editor's state and its parts (`SortEditorParts`): the `body`, and on a phone the Sheet head's ✕ and ✓, or on a step its Back (`head.onBack`) and its `title`. Its props (`SortEditorProps`): `label`, the `fields` (Picker rows, each with its mark; one leading one level in holds its own), the `rules`, `onRulesChange` (the whole rules, and the set-aside sorts left when one of them is written), `max`, `form` (`computer`, `phone`, or `narrow`: the phone's structure at a computer's sizes, for a narrow place), `onDone`, the fields' `search` words, `aside` (the sorts set aside, `SortAside`s), `fieldOf` (the field a sort key sorts, so a place sorts once by one of its parts), `addSort` (Add sort at a computer's foot, true unless said), `words`, and for a page standing still `lifted`, `opens` (`SortEditorOpens`) and `level`. On a computer each rule is its grip, its field's and its direction's Select, and ×, with Add sort and Clear all sorts at the foot; the set-aside sorts follow, each its field's box dashed in the warning colour with why, its direction greyed, ⋯ holding why, Put back and Delete. On a phone each rule is a card row, its direction under its name; a press turns the body to its direction, Add sort to the fields, a set-aside sort's row to the fields to point it at one: steps of the same sheet, never a sheet on top. The body answers no Escape: its holder's sheet does. Its hook joins this door as `useSortEditor`, and the body alone as `SortEditor`, once VK-727 retires the panels' older sort editor of those names.
|
|
386
|
+
- `useSortEditorParts` — `useSortEditor`, under its name before the body took the plain one; kept.
|
|
370
387
|
- `SortEditorProps` — its props.
|
|
371
388
|
- `SortEditorParts` — its parts: the body, the head's buttons, and on a phone's step its title and Back.
|
|
372
389
|
- `SortEditorOpens` — what a page shows standing open: a rule's field or direction, by its place.
|
|
@@ -411,13 +428,35 @@ What the view switcher opens: the Picker over a list's views, each its layout's
|
|
|
411
428
|
- `VIEWS_LIST_WORDS` — their English.
|
|
412
429
|
- `viewsListWords` — the words handed over the English.
|
|
413
430
|
|
|
431
|
+
A view's menu and what it opens (VK-823), for an app that draws its own menu or holds its views in its page:
|
|
432
|
+
|
|
433
|
+
- `useViewMenu` — a view's menu's state, its entries and what it opens (`ViewMenuParts`): `entries` (a view's menu, by its id), `startNew` (New view's Modal; from a view, Save as new view), `dialogs` (the Modals and the question, drawn beside the list), `asking`, and on a phone with `steps` `openMenu` and `step`. Its props (`ViewMenuProps`): `views`, `open`, `layouts`, `columns`, `records`, `onChange`, `onDone`, `form`, `shows`, `container` and `standing` for a page that shows one standing, `words`, and `ask` (the delete question asked there, an app's `confirm`), `report` (the deletion said there, an app's toast `success` with its `undo`) and `steps` (on a phone, the menu, Rename, New view and the delete question as steps of its holder's one Sheet). With neither `ask` nor `report` it draws its own alert dialog and says the deletion through `useToast` where a `Toast` stands round it.
|
|
434
|
+
- `ViewMenuShows` — what a page shows standing open: Rename, New view, or the delete question.
|
|
435
|
+
- `ViewMenuProps` — its props, as `useViewMenu` above lists them.
|
|
436
|
+
- `ViewMenuParts` — what it hands back, as `useViewMenu` above lists them.
|
|
437
|
+
- `ViewMenuAsk` — the delete question as it asks it through `ask`: `message`, `confirmLabel`, `subject`, `detail` and `destructive`, the `confirm` port's request.
|
|
438
|
+
- `ViewMenuStep` — a phone's step: its `title`, `body` and `onBack`.
|
|
439
|
+
- `ViewMenuWords` — its words.
|
|
440
|
+
- `VIEW_MENU_WORDS` — its words in English.
|
|
441
|
+
- `ViewsState` — the views and the one open.
|
|
442
|
+
- `viewsAfter` — the views and the open one after a change: a new view last and open, a duplicate after its view, the last view kept, an open one deleted opening the first listed, a restore back at its place.
|
|
443
|
+
- `copyName` — a copy's name, "Copy of …", counting on while it's taken.
|
|
444
|
+
- `canDelete` — whether a view can be deleted: a list keeps one.
|
|
445
|
+
- `deleteLine` — the delete question's line.
|
|
446
|
+
- `DeleteLineWords` — its words: the records staying, given their noun, and the view going for everyone.
|
|
447
|
+
- `columnsLabel` — the label of the field a board's columns follow.
|
|
448
|
+
|
|
449
|
+
`CONTROLS.ViewsListBody`, handed the axis's `verbs`, draws a view's menu through `useViewMenu`: on a computer the delete question goes to your `confirm` port and the deletion to your `toast` port; on a phone a view's ⋯ turns the one Sheet into its menu, with Back, and what it opens turns it again. Without `verbs` a view's menu is its `menu` rows, on a phone a step of the one Sheet too.
|
|
450
|
+
|
|
414
451
|
`CONTROLS.ViewsListBody` draws it where the view switcher opens: the axis's views, each its glyph by your `AppIcon`, its count and its menu rows as the Menu's (a row with no reason it can't be used says your `views.menus.not-now`), New view from `onCreate` in the axis's word, an order handed to `onReorder` as one whole block and never one that moves a view `canDrag` refuses, Shared and the reader's own wherever a view is private, and every word your messages'. It is internal: `CONTROLS` is the way in.
|
|
415
452
|
|
|
416
453
|
## The filter editor
|
|
417
454
|
|
|
418
|
-
What an advanced filter opens on a computer and Filter on a phone, Attio's: the view's rules, each Where or its level's join, its field, how it compares and its value in its type's own box, joined by And or Or, in groups three deep; and the filter part, what a filter's way and value open on the bar. A body, as the sort editor is: the Popover holds it on a computer and the Sheet on a phone. Every word is handed (`words`). Its stylesheet is `viewkitjs/views/controls/filter-editor.css`; its root marks a phone from the device (`data-vk-phone`).
|
|
455
|
+
What an advanced filter opens on a computer and Filter on a phone, Attio's: the view's rules, each Where or its level's join, its field, how it compares and its value in its type's own box, joined by And or Or, in groups three deep; a relation rule's block (its relation, Any, None or Every where, its rules on that relation's fields inside, Add filter and Delete condition), which a rule on a related field's ⋮ makes with None or Every, Every waiting until a rule in it narrows; a group's ⋮ with Exclude matches (a group joined by And), an excluded group saying so; and the filter part, what a filter's way and value open on the bar. A body, as the sort editor is: the Popover holds it on a computer and the Sheet on a phone. Every word is handed (`words`). Its stylesheet is `viewkitjs/views/controls/filter-editor.css`; its root marks a phone from the device (`data-vk-phone`).
|
|
419
456
|
|
|
420
|
-
- `
|
|
457
|
+
- `FilterEditor` — the body alone, for a shell that holds only a body (the Popover): its props are `FilterEditorProps`.
|
|
458
|
+
- `useFilterEditor` — the editor's state and its parts (`FilterEditorParts`): the `body`, and on a phone the Sheet head's ✕ and ✓, or on a step its Back (`head.onBack`) and its `title`. Its props (`FilterEditorProps`): `label`, the `fields` (each typed, a choice's values with it; one leading one level in holds its own), the `filter`, `onFilterChange`, `at`, `ids`, `levels`, `form` (`computer`, `phone`, or `narrow`), `onDone`, `standing`, `own` (ViewKit's own words and value body for a rule the kit has no box for), `excludable` (whether the filter itself may exclude its matches: an advanced filter's own group, its foot then holding a group's ⋮ too) and `words`. On a phone each box's list, a date, a value ViewKit draws, Add filter, a block's quantifier and a rule's or a group's ⋯ turn the body to a step of the same sheet, never a sheet on top; the body answers no Escape: its holder's sheet does. Its hook joins this door as `useFilterEditor`, and the body alone as `FilterEditor`, once VK-727 retires the panels' older filter editor of that name.
|
|
459
|
+
- `useFilterEditorParts` — deprecated: `useFilterEditor`, under its name before the body took the plain one.
|
|
421
460
|
- `FilterEditorProps` — its props.
|
|
422
461
|
- `FilterEditorParts` — its parts: the body, the head's buttons, and on a phone's step its title and Back.
|
|
423
462
|
- `FilterOwn` — ViewKit's own words and value body for a rule: its field's words, its way's word, its value's words, its value body.
|
|
@@ -454,6 +493,8 @@ What an advanced filter opens on a computer and Filter on a phone, Attio's: the
|
|
|
454
493
|
- `isSetAside` — whether a rule is set aside.
|
|
455
494
|
- `isPair` — whether a value is a range's From and To.
|
|
456
495
|
- `isGroup` — whether an item is a group.
|
|
496
|
+
- `FilterItem` — an item of a filter: a rule or a group.
|
|
497
|
+
- `putFilterBack` — a rule set aside put back: its `aside` dropped, so it is written as a rule again (the sort editor's is `putBack`).
|
|
457
498
|
- `isAdvanced` — whether the filter is advanced: an Or between its rules, or a group in it.
|
|
458
499
|
- `barOf` — the filter as the bar reads it: each rule at its own level plain, each group there advanced.
|
|
459
500
|
- `BarFilter` — a filter as the bar shows it.
|
|
@@ -466,12 +507,13 @@ What an advanced filter opens on a computer and Filter on a phone, Attio's: the
|
|
|
466
507
|
- `filterWords` — its words: the handed ones over the English.
|
|
467
508
|
- `FilterEditorWords` — its words' shape.
|
|
468
509
|
|
|
469
|
-
`CONTROLS.FilterBody` draws ViewKit's filter body with it: the level as data, every change handed back whole, a choice's values from each field's `options`, a set-aside rule in its place saying why, ViewKit's own words and value body for a way the kit has no word for, a field it
|
|
510
|
+
`CONTROLS.FilterBody` draws ViewKit's filter body with it: the level as data, every change handed back whole, a choice's values from each field's `options`, a set-aside rule in its place saying why, ViewKit's own words and value body for a way the kit has no word for, a field it has no type for or a choice with no values; a `not` group as a group that excludes its matches, and a relation rule other than Any with one plain far rule as its block, one set aside or on a relation the list no longer lists as one row in its words (open on a relation's where, the same head over the rules, the quantifier handed back with the level), so nothing a person's filter holds is out of sight; Created by as a person, a long text by its four ways, and a place's Country (with `parts: true`) as a choice of country names; a phone's step told to the sheet (`onStepChange`), and under `sheetActions: "bar"` its own head (✕, the title, ✓; on a step Back and the step's title). `CONTROLS.FilterPartBody` draws a filter's way and value with the filter part, ViewKit's ways and own value body for a rule the kit draws no part of. Every word is the app's, from its messages. Both are internal: `CONTROLS` is the way in.
|
|
470
511
|
|
|
471
512
|
## The group editor
|
|
472
513
|
|
|
473
514
|
What Customize's Group opens: the list's group as the Menu list's rows. Group by, Order, Direction, a date field's Date step and Hide empty groups, each saying what it is and opening its choices in place; then the groups under their heading, each its grip, its name and its Switch, dragged into your own order, Hide all (Show all once none shows) at the heading; Remove grouping at its foot. A body: Customize holds it, a screen in its panel on a computer and a step of its sheet on a phone. A setting's choices stand in place of the settings, and the editor hands their name and the way back to its holder (`level`), whose head shows them. Every word is handed (`words`). Its stylesheet is `viewkitjs/views/controls/group-editor.css`; its root marks a phone from the device (`data-vk-phone`).
|
|
474
515
|
|
|
516
|
+
- `GroupEditor` — the body alone, for a shell that holds only a body: its props are `GroupEditorProps`.
|
|
475
517
|
- `useGroupEditor` — the editor's state and its parts (`GroupEditorParts`): the `body`, and the `level` it stands on. Its props (`GroupEditorProps`): `label`, the `fields` (Picker rows; one leading one level in holds its own), `ownOrders` (a field's own order, in its words), `orders` (the orders each field offers), `manualOrder` (whether Your own may be picked), `steps` (each date field's steps), the `group`, the groups as `values` (each with its count), `onGroupChange` (the whole group, null once taken off), `search`, `form`, `words`, and for a page standing still `opens` and `opensLevel`. The body alone, `GroupEditor`, joins this door with VK-727, beside the other panels' bodies.
|
|
476
518
|
- `GroupEditorProps` — its props.
|
|
477
519
|
- `GroupEditorParts` — its parts: the body, and the level it stands on (its name and the way back), null at the settings.
|
|
@@ -494,7 +536,47 @@ What Customize's Group opens: the list's group as the Menu list's rows. Group by
|
|
|
494
536
|
- `groupWords` — its words: the handed ones over the English.
|
|
495
537
|
- `GroupEditorWords` — its words' shape.
|
|
496
538
|
|
|
497
|
-
`CONTROLS.GroupBody` draws ViewKit's group body with it: the group as one value, every change handed back as one write, the orders each field offers, Your own where the list offers it, a date field's steps, each group's count (`ViewsGroupEntry.count`) for its Count order, and its level told to what holds it (`onStepChange`)
|
|
539
|
+
`CONTROLS.GroupBody` draws ViewKit's group body with it: the group as one value, every change handed back as one write, the orders each field offers, Your own where the list offers it, a date field's steps, each group's count (`ViewsGroupEntry.count`) for its Count order, and its level told to what holds it (`onStepChange`). No ViewKit part draws it since ViewKit's own Customize went: `CONTROLS.CustomizeBody` holds the group editor itself, and the `GroupBody` slot is deprecated. Every word is the app's, from its messages. It is internal: `CONTROLS` is the way in.
|
|
540
|
+
|
|
541
|
+
## Customize
|
|
542
|
+
|
|
543
|
+
What View settings opens: the view's sections as the Menu list's rows, Layout, Columns, then each of Filter, Sort and Group it is handed, each saying where it stands and opening its screen in place, then its toggles (Show counts among them). Layout is the layout cards and the layout's own settings: its pick-one settings (a density, a board's field) each opening its choices in place, its toggles under their sections with a toggle's way back, and For you with its own. Columns is a search, the shown columns, each its grip, its mark, its name and its Switch, dragged into place, the first one locked, the hidden ones under Hidden, Hide all, Reset columns and Show all at the headings. A column with settings of its own or the app's rows for its field carries a › after its Switch, opening its level in Columns' place: Shown, its pick-one settings each opening in place, its toggles under their sections, then the app's rows; on a card layout each field carries its new-line Toggle, refused with its reason on the card's first field and a hidden one; and the app's rows under Columns' rows (Add field) stand at its foot. A list's per-field filters stand as rows after Columns and its time range and date ranges after Group, each saying what it holds and opening its screen (choices to pick one of, choices to check, or a body of its own with its level), or, folded, all behind one Filter row. Its head is the view's name renamed in place, or a title, as its options say; its footer, Copy link and Export CSV, each where handed; Reset and Save over it once something changed, with the shared view's stale note. A body: on a computer the Pane holds it where an app hands a Pane, and elsewhere (the toolbar's popover) it draws the same head, body and foot in a frame of its own; on a phone it hands the Sheet its head and foot, each section's step under that one head. Every word is handed (`words`). Its stylesheet is `viewkitjs/views/controls/customize.css`; its options are `CUSTOMIZE_LOOKS`; its root marks a phone from the device (`data-vk-phone`).
|
|
544
|
+
|
|
545
|
+
- `Customize` — the body alone, for a shell that holds only a body: its props are `CustomizeProps`.
|
|
546
|
+
- `useCustomize` — its state and its parts (`CustomizeParts`): the `body`, the `level` it stands on (a layout's choice, a column's settings, a section's level) or `null`, and on a phone the Sheet's `title`, `head` (Back and ✕) and `foot`. Its props (`CustomizeProps`): the `view`, `onViewChange` (the whole view, each change as it is made), the `layouts`, the `filter`, `sort` and `group` sections, `changed` with `onReset` and `onSave`, `pending`, `stale`, `exportCount` with `onCopyLink` and `onExport`, `toggles`, `layoutSettings`, `columnsReset`, `onLineChange` (a card's field starting a new line, turned on or off), `columnsFoot` (the app's rows under Columns' rows), `fields` and `foldFields` (a list's per-field filters, its time range and date ranges, `CustomizeField`), `onClose` (outside a Pane, the title head's ✕), `onScreenChange`, `words`, `form`, and for a page standing still `screen`. The body alone, `Customize`, joins this door with VK-727, beside the other panels' bodies.
|
|
547
|
+
- `useCustomizeWorn` — its options as the frame round it wears them, kept up to date as they change.
|
|
548
|
+
- `layoutMark` — a layout's mark by its id: table, board, list, calendar, timeline.
|
|
549
|
+
- `CustomizeProps` — its props.
|
|
550
|
+
- `CustomizeParts` — its parts.
|
|
551
|
+
- `CustomizeView` — the view it sets: its name, its layout, its columns, and a table's own settings as its page draws them.
|
|
552
|
+
- `CustomizeField` — a list's per-field filter, its time range or a date range: its row's words, what it holds, where it stands, why it can't open, and what its screen holds (`pick`, `check` or a `body` with its `level`).
|
|
553
|
+
- `CustomizeColumn` — a column: its id, its name, whether it shows, whether it is locked, its mark, its own `settings`, the app's `rows` for its field, and on a card layout its `line` (whether it starts a new line, and why it can't).
|
|
554
|
+
- `CustomizeLayout` — a layout it offers: its id, its name, its mark; one still to come can't be picked.
|
|
555
|
+
- `CustomizeSection` — a section it is handed: what it says, whether that is in force, what its screen holds, and the level that screen stands on.
|
|
556
|
+
- `CustomizeScreen` — where it stands: its list, or a section's screen.
|
|
557
|
+
- `CustomizeToggle` — a setting turned on or off: its words, its value, its write, its way back and its section.
|
|
558
|
+
- `CustomizeChoice` — a setting picked from a few: its words, its value, its choices, its write.
|
|
559
|
+
- `CustomizeLayoutSettings` — Layout's own settings: its pick-one settings, its toggles, For you.
|
|
560
|
+
- `columnsSay` — what Columns says: how many show.
|
|
561
|
+
- `setShown` — a column shown or hidden, in its place; the locked one stays shown.
|
|
562
|
+
- `hideAll` — every column hidden but the locked one.
|
|
563
|
+
- `showAll` — every column shown.
|
|
564
|
+
- `moveColumn` — a column moved to another's place in the whole order; the locked one never moves.
|
|
565
|
+
- `findColumns` — the columns whose name holds the words.
|
|
566
|
+
- `reduced` — whether the person asked for less motion.
|
|
567
|
+
- `slideTime` — how long a column's tick takes to show its new state.
|
|
568
|
+
- `useGlide` — a change that glides: each row slides from where it stood.
|
|
569
|
+
- `customizeWornOf` — its options worn round an element; outside any frame, the defaults.
|
|
570
|
+
- `CUSTOMIZE_ATTRS` — the attributes it watches.
|
|
571
|
+
- `CustomizeWorn` — its options as it reads them.
|
|
572
|
+
- `CUSTOMIZE_WORDS` — its words in English.
|
|
573
|
+
- `customizeWords` — its words: the handed ones over the English.
|
|
574
|
+
- `CustomizeWords` — its words' shape.
|
|
575
|
+
- `CustomizeBodyOwn` — the view's name and its rename, Copy link, and Export CSV with its count, as `ViewsCustomizeBodyProps` carries them (`name`, `onRename`, `onCopyLink`, `onExport`, `exportCount`): what the toolbar hands Customize's body, each drawn only where handed.
|
|
576
|
+
- `SheetPartsFrom` — what a Sheet holds for a body that heads it: the body hands its title, Back, ✕ and foot, drawn in place of the Sheet's head. The controls' Sheet holds it; an app's own may too.
|
|
577
|
+
- `SheetParts` — what a body hands its Sheet.
|
|
578
|
+
|
|
579
|
+
`CONTROLS.CustomizeBody` draws ViewKit's Customize body with it: the view's columns and layout, each change handed back as one write; the layout's own settings, its toggles, Columns' own Reset and the shared view's foot (Reset and Save for everyone; under the kit's foot, Clear and Save; with no shared view, the foot's Clear); its Filter, Sort and Group through the filter, sort and group editors, narrow on a computer, each step a level under its head on a phone. It draws a column's own settings one level into Columns, your field editor's rows for that column under them and its footer under Columns' rows, and on a card layout each field's new-line toggle. The view's name, Copy link and Export come through the toolbar (`ToolbarOptions`' and `ReadyToolbar`'s `viewName`, `onRenameView`, `onCopyLink`, `onExport`, `exportCount`), each drawn only where handed, and on a phone the level a section stands on (Group by's fields, Add sort's) is told as its step (`onStepChange`), so the sheet's Escape goes back a level. Every word is the app's, from its messages. It is internal: `CONTROLS` is the way in.
|
|
498
580
|
|
|
499
581
|
## The Modal
|
|
500
582
|
|
|
@@ -535,6 +617,8 @@ What just happened, said for a moment at the bottom of the screen, on Base UI's
|
|
|
535
617
|
- `TOAST_WORDS` — its words in English: Undo, Close.
|
|
536
618
|
- `ToastWords` — its words' shape.
|
|
537
619
|
|
|
620
|
+
`CONTROLS.PortsHost` answers the ports an app leaves out (VK-844): a `toast` shown in this Toast, Undo where `success` hands one, and a `confirm` asked in the alert dialog, held in its own state, so an app's own `AlertDialogHost` never shows the same question twice. The provider mounts it once in the browser, only for the ports the app left out; every word is your messages'. It is internal: `CONTROLS` is the way in.
|
|
621
|
+
|
|
538
622
|
## The Collapsible
|
|
539
623
|
|
|
540
624
|
One part that opens and closes in place, under its trigger or set open from outside, on Base UI's collapsible: the trigger says whether its part is open and which part it opens, Enter and Space press it, and a closed part leaves the page unless it is kept for the browser's find. Its height moves from nothing to what it holds, easing out both ways, its time following its height; under reduced motion it opens and closes at once. Its stylesheet is `viewkitjs/views/controls/collapsible.css`; its root marks a phone from the device (`data-vk-phone`), where its trigger is 44 high; its options are `COLLAPSIBLE_LOOKS`.
|
|
@@ -572,13 +656,96 @@ A sentence set into the page on its meaning's ground: worth knowing, done, caref
|
|
|
572
656
|
- `NOTICE_WORDS` — its words in English: Retry, Retrying…, Dismiss.
|
|
573
657
|
- `NoticeWords` — its words' shape.
|
|
574
658
|
|
|
659
|
+
<!-- The toolbar's block: the quick filters (VK-724), the Toolbar (VK-858), the bulk bar (VK-725) -->
|
|
660
|
+
|
|
661
|
+
## The quick filters
|
|
662
|
+
|
|
663
|
+
What the quick filters' button opens, the Outright kit's (after Linear's): a strip of the fields offered, three across, one open (the first holding a value); past 8 values a search under it; the open field's values as plain rows, each its mark (a status's step or a face, its option's), its words and its count, the most first, a held one on a quiet ground saying Clear filter while the field's others go quiet. A press holds a value, a second lets it go; one at a time in all, or several, as its option Holds says. The values are one Tab stop: ↑ ↓, Home and End between them, Enter or Space holds or lets go, ↓ from the search reaches the first and ↑ from the first goes back. A body: the Pane holds it on a computer and the one Sheet on a phone, where it takes the phone's sizes and, holding one at a time, a press closes the Sheet (`onDone`). Every word is handed (`words`). Its stylesheet is `viewkitjs/views/controls/quick-filters.css` ([its tokens](../controls/quick-filters.md)).
|
|
664
|
+
|
|
665
|
+
`CONTROLS.QuickFiltersBody` draws ViewKit's quick filters' body with it: ViewKit's hold turned to its holds and back, each value's mark from its field's `options`, its words the app's messages. It is internal: `CONTROLS` is the way in.
|
|
666
|
+
|
|
667
|
+
- `QuickFilters` — the body. Its props, `QuickFiltersProps`: the `fields` (`QuickField`s: an id, a name, the values, a search's words), the `holds` (`QuickHolds`: each field's held values by its id), `onHoldsChange` (the holds after each press, and the press), `open` and `onOpenChange` (the field open in the strip, where its holder keeps it), `counts`, `form`, `onDone` and `words`.
|
|
668
|
+
- `QuickFiltersProps` — its props.
|
|
669
|
+
- `QuickField` — a field it offers: its id, its name in the strip, its values, what its search says.
|
|
670
|
+
- `QuickValue` — a value: its key, its words, its mark, its count.
|
|
671
|
+
- `QuickMark` — a value's mark: a status's place (a step between at its quarters), or a person's or a company's face.
|
|
672
|
+
- `QuickHolds` — what is held: each field's held values by its id.
|
|
673
|
+
- `QuickHolding` — one at a time in all, or several.
|
|
674
|
+
- `QuickPress` — a press: the field and the value held or let go.
|
|
675
|
+
- `QUICK_FILTERS_RULES` — its rules, as one object: `holdAfter`, `heldIn`, `holdCount`, `valuesShown`, `valuesFound`, `firstOpen`, `SEARCH_PAST`, `narrowed`, `countValues`, `heldNames`, `reminderWords`, `pressCloses`. The panels' own quick filters' rules (`viewkitjs/views/panels`) keep ViewKit's hold's shape.
|
|
676
|
+
- `quickFiltersFieldsOf` — ViewKit's fields as the body takes them, each value with its option's mark.
|
|
677
|
+
- `QuickFiltersFieldIn` — a field as `quickFiltersFieldsOf` reads it: its key, its words, its search's words, its values and its `options`.
|
|
678
|
+
- `quickHoldsOf` — ViewKit's hold as the body's holds.
|
|
679
|
+
- `quickListHoldOf` — the body's holds as ViewKit's hold, the fields still held in ViewKit's order, then the new ones.
|
|
680
|
+
- `quickFiltersWornOf` — its option as the frame round it wears it.
|
|
681
|
+
- `QUICK_FILTERS_ATTRS` — the attribute it watches, so an option changed while it is open reaches it.
|
|
682
|
+
- `QUICK_FILTERS_WORDS` — its English words.
|
|
683
|
+
- `quickFiltersWords` — the words handed, each left out the English.
|
|
684
|
+
- `QuickFiltersWords` — its words: the strip's name, a field's search, Clear filter, and what a search that finds nothing says.
|
|
685
|
+
|
|
686
|
+
### The reminder
|
|
687
|
+
|
|
688
|
+
On a phone, a pill at the list's foot naming what quick filters hold while they are closed, the Outright kit's: the first held value's mark and the first two names, "+N" for the rest, which opens quick filters; a hairline; and ✕, letting every hold go. It is one Toolbar (one Tab stop, the arrows across it), shows while a held value is named and leaves with the last, handing the focus to its holder when it leaves holding it. It stands at the centre of its holder's foot and hands its holder the room it takes (`--quick-filters-room`); while a bulk bar shows in the same holder it steps aside. Its holder places it and holds quick filters' open state. Its rules sit in `quick-filters.css`.
|
|
689
|
+
|
|
690
|
+
- `QuickFiltersReminderControl` — the reminder. Its props, `QuickFiltersReminderProps`: the `fields` (as the body takes them), the `holds`, `onOpen`, `onClear`, `words` and `className`. Its name ends in `Control`: `viewkitjs/views/panels/react` already names the ready toolbar's own reminder `QuickFiltersReminder`.
|
|
691
|
+
- `QuickFiltersReminderProps` — its props.
|
|
692
|
+
- `QUICK_FILTERS_REMINDER_WORDS` — its English words.
|
|
693
|
+
- `quickFiltersReminderWords` — the words handed, each left out the English.
|
|
694
|
+
- `QuickFiltersReminderWords` — its words: its name, its press's name over the held names, and its ✕'s.
|
|
695
|
+
|
|
696
|
+
## The Toolbar
|
|
697
|
+
|
|
698
|
+
The Outright kit's Toolbar, on Base UI's toolbar: the row and, under it, the filter bar, a step smaller; on a phone one line. Tab reaches the whole of it once, the arrows run through its lines and loop, Home and End reach its ends; in a text box the arrows move the caret and step out at its ends. Handed a list's places (`views`, `settings`, `search`, `add`, `sort`, `filter`, `filters`, `quick`, `save`), it stands each where its options pick (`TOOLBAR_LOOKS`, worn as `data-toolbar-*` on the frame round it): View settings beside the views or on the row's right, the sort and Filter on the bar or on the row's right, the filter bar always or once something is added (`added`), lines across or none, Clear and Save on the bar or in View settings, New in its form, the quick filters' button or none; on a phone the sort, Filter, the quick filters' icon and View settings beside the views or on the right, the search a button or its own line. A place may be a function of where it stands (`ToolbarAt`: `row`, `right`, `bar`, `phone`). Handed no places, it is its `children` (the row) and `bar` (the filter bar), as any row of controls. What doesn't fit gives way, each line on its own, from its end: words to icons, then the view tabs into "+N", the filters into "+N filters", then the rest into ⋯, a Menu; a line holds while a Menu holding what folded stands open, or while its holder says `holds`. What never folds: a toolbar button marked `stays`, and the Button (New). Each line's height is its toolbar buttons' (the toolbar button's Size, a phone's its own), given to the Buttons, the Toggle group and the text box in it. Every word it says of its own is handed (`words`). Its stylesheet is `viewkitjs/views/controls/toolbar.css` ([its tokens](../controls/toolbar.md)).
|
|
699
|
+
|
|
700
|
+
Its frame and its separator are `ToolbarControl` and `ToolbarSeparatorControl`: `viewkitjs/views/panels/react` already names the ready toolbar's frame `Toolbar` and its separator `ToolbarSeparator`, and one package holds no two public names alike. The ready toolbar keeps its own frame.
|
|
701
|
+
|
|
702
|
+
- `ToolbarControl` — the Toolbar. Its props, `ToolbarProps`: `label` (its name to a screen reader), `children` and `bar`, the places above, `added`, `picks` (its options over the frame's), `barLabel`, `size` and `barSize` (`28`, `32` or `36`), `spacing` (in spacing steps), `fold` (default on), `holds`, `form` (`computer` or `phone`; by default a phone's in a phone's window or a `PhoneHost`), `onMoreViews` and `moreViewsOpen` (where its holder opens what "+N" opens), `words`, `className`, `style`, and Base UI's toolbar's own. Its width is its holder's to give: sized from what it holds in a pill (the bulk bar, the quick filters' reminder), so a holder that draws it as a list's toolbar gives it its width (a flex item with `min-width: 0`), or its row never runs out of room to fold.
|
|
703
|
+
- `ToolbarProps` — its props.
|
|
704
|
+
- `ToolbarPlace` — a place: what it draws, or a function of where it stands.
|
|
705
|
+
- `ToolbarAt` — where a place stands: `row`, `right`, `bar` or `phone`.
|
|
706
|
+
- `ToolbarSeparatorControl` — a line between what belongs together and what doesn't.
|
|
707
|
+
- `ToolbarSpacer` — room that pushes what follows to its line's far end.
|
|
708
|
+
- `ToolbarInput` — the text box in a line, one of its stops, at its line's height (`icon` at its start side). In the search's place, a button the Toolbar opens: pressed, its box with the caret in it and a ✕; the ✕, Escape or leaving it empty closes it, and Escape brings the focus back to the button.
|
|
709
|
+
- `ToolbarInputProps` — its props: the Input's, and `icon`.
|
|
710
|
+
- `ToolbarFolds` — filters or view tabs a holder draws itself, standing in a line: the line folds them one at a time among its own (`kind`, `filters` or `tabs`; `count`) and hands `children` how many are folded.
|
|
711
|
+
- `ToolbarFoldsProps` — its props.
|
|
712
|
+
- `toolbarSteps` — the steps a line takes as it narrows, in order, for a holder's test.
|
|
713
|
+
- `useToolbarWorn` — its options as worn round an element, kept up to date as they change.
|
|
714
|
+
- `toolbarWornOf` — its options as the frame round an element wears them, each its default where nothing sets it.
|
|
715
|
+
- `TOOLBAR_ATTRS` — the attributes it watches.
|
|
716
|
+
- `TOOLBAR_WORDS` — its English words.
|
|
717
|
+
- `toolbarWords` — the words handed, each left out the English.
|
|
718
|
+
- `ToolbarWords` — its words: the filter bar's name, the search's, the open search's ✕, ⋯ and its Menu, "+N" and its Menu, "+N filters", its name and its Menu, and why a folded item can't be used.
|
|
719
|
+
|
|
720
|
+
## The bulk bar
|
|
721
|
+
|
|
722
|
+
What picked rows bring, the Outright kit's (after Attio's): on a computer a surface floating at the foot of the box that holds it, centred: the count (the number on the brand, Selected, ×; a press clears), a hairline, the verbs as outlined buttons, Delete in More or its own red button, and More, holding the verbs kept off the bar, then those that don't fit, then Delete; on a phone the tray, its verbs at 44 with Delete among them and ⋯ for the rest, or the pill (the count, ✕, Actions opening every verb). It is one Toolbar (one Tab stop, the arrows, Home and End). Escape from the box that holds it clears the selection, never while something it opened is open. A field set opens the Picker, in a Popover on a computer and in the one Sheet on a phone; a group opens a Menu; Delete asks in the alert dialog first, then runs, and a press that hands back `{ words, undo }` is said in its own Toast, just above it, with Undo; one that throws, as a press that didn't go through. It comes with the first picked row and leaves with the last, reading its last words as it goes, and hands the focus back to where it was in the list when it leaves holding it. It stands absolute in its nearest placed box, its holder, and hands it the room it takes (`--bulk-bar-room`), so a list that scrolls there pads its foot by it. Its rules sit in `bulk-bar.css`; its options are `BULK_BAR_LOOKS`.
|
|
723
|
+
|
|
724
|
+
`CONTROLS.SelectionBar` draws ViewKit's `SelectionBar` with it, wherever an app calls it, its words the app's messages and an options verb's values the Picker's rows. It is internal: `CONTROLS` is the way in.
|
|
725
|
+
|
|
726
|
+
- `BulkBar` — the bar. Its props, `BulkBarProps`: `count` (at 0 it leaves), `noun` (what a row is, one and many), `onClear`, `verbs` (`BulkVerb`s, in order), `onDelete` (asked first; left out, no Delete), `deleteLine` (the line under its question), `deleteLabel`, `busy`, `form` (`computer` or `phone`; by default the phone's below the line or in a `PhoneHost` screen), `standing` (on a page that shows it), `className` and `words`.
|
|
727
|
+
- `BulkBarProps` — its props.
|
|
728
|
+
- `BulkVerb` — a verb: an `action`, a `group` of actions behind one word, or `options`, a field set on every picked row, its values the Picker's rows, `value` (what every picked row holds), `empty` and `search`; any of them `more`, kept off the bar.
|
|
729
|
+
- `BulkVerbItem` — an action, or a group's row.
|
|
730
|
+
- `BulkDone` — what a press hands back: what the Toast says, and how it is taken back.
|
|
731
|
+
- `BulkRun` — a press: done at once or once its promise settles.
|
|
732
|
+
- `BulkNoun` — what a row is, one and many.
|
|
733
|
+
- `useBulkBarWorn` — its options as the frame round an element wears them, kept up to date.
|
|
734
|
+
- `bulkBarWornOf` — its options as the frame round an element wears them, read once.
|
|
735
|
+
- `BULK_BAR_ATTRS` — the attributes it watches, so an option changed while it stands reaches it.
|
|
736
|
+
- `BULK_BAR_WORDS` — its English words.
|
|
737
|
+
- `bulkBarWords` — the words handed, each left out the English.
|
|
738
|
+
- `BulkBarWords` — its words: how many are picked, its name, Delete's name and question, the noun where none is handed, the count, the pill's, Clear, More, Actions, Delete, Cancel, the failed Toast, why a verb can't be used, and the words of its Picker, Menus, Toast, question and Sheet.
|
|
739
|
+
|
|
575
740
|
<!-- The editors' block: the Text editor, the Picker, the Date editor, the Compound editor, the Number editor, the Values editor, the Links editor -->
|
|
576
741
|
|
|
577
742
|
## The Text editor
|
|
578
743
|
|
|
579
|
-
`CONTROLS` fills its `TextBody` with the Text editor: ViewKit's text bodies, held as a shell that keeps the draft. A line, an email, a phone, a link and a domain type into the inline input over the cell, growing over the rows below a row at a time to eight; long text and rich text are its long text, as plain lines; a url is a link. A phone opens with its country first (its country, its dial code and its country's pattern, the countries the Picker's list in a Popover, on a phone a step of the Sheet), its extension after its digits and kept. ViewKit's text editor keeps the draft, Escape, Tab, ⌘ or Ctrl Enter, the check and the save; a refusal is the host's to show.
|
|
744
|
+
`CONTROLS` fills its `TextBody` with the Text editor: ViewKit's text bodies, held as a shell that keeps the draft. A line, an email, a phone, a link and a domain type into the inline input over the cell, growing over the rows below a row at a time to eight; long text and rich text are its long text, as plain lines; a url is a link. A phone opens with its country first (its country, its dial code and its country's pattern, the countries the Picker's list in a Popover, on a phone a step of the Sheet), its extension after its digits and kept. In a field row (`place: "row"`) it stands in the row's flow instead: a line one list row high (28px), long text growing with its text to 320px, then scrolling, so the row grows with it. ViewKit's text editor keeps the draft, Escape, Tab, ⌘ or Ctrl Enter, the check and the save; a refusal is the host's to show.
|
|
580
745
|
|
|
581
|
-
- `useTextEditor` — the Text editor, as the parts a shell pours in: its `body` (on a computer what stands in the cell, on a phone what the Sheet's body holds), and on a phone the Sheet head's buttons (`head`) and a step's `title`. Standing alone (`draft: "own"`, the default) it keeps on Enter or a press elsewhere and leaves on Escape, says why a value is refused just under the box, and on a phone hands its head ✕ and ✓; held (`draft: "shell"`) it hands every change, the whole text each time, and keeps nothing. Its props are
|
|
746
|
+
- `useTextEditor` — the Text editor, as the parts a shell pours in: its `body` (on a computer what stands in the cell, on a phone what the Sheet's body holds), and on a phone the Sheet head's buttons (`head`) and a step's `title`. Standing alone (`draft: "own"`, the default) it keeps on Enter or a press elsewhere and leaves on Escape, says why a value is refused just under the box, and on a phone hands its head ✕ and ✓; held (`draft: "shell"`) it hands every change, the whole text each time, and keeps nothing. Its props are `TextEditorProps`.
|
|
747
|
+
- `TextEditor` — the body alone, for a shell that holds only a body.
|
|
748
|
+
- `TextEditorProps` — its props: the field's `label`, its `kind`, its `value`, `onValueChange`, and how it keeps its draft (`draft`).
|
|
582
749
|
- `TextEditorParts` — what `useTextEditor` hands back: its `body`, its phone `head` and a step's `title`.
|
|
583
750
|
- `TextKind` — its kinds: `text`, `email`, `phone`, `link`, `domain`, `long`.
|
|
584
751
|
- `TEXT_KEYS` — the keyboard each kind brings on a phone.
|
|
@@ -610,7 +777,7 @@ Its stylesheet is `viewkitjs/views/controls/text-editor.css`, beside the inline
|
|
|
610
777
|
|
|
611
778
|
## The Picker as the editors' list
|
|
612
779
|
|
|
613
|
-
`CONTROLS` fills its `Picker` with the Picker: ViewKit's select, status, several-values, relation and set editors open it
|
|
780
|
+
`CONTROLS` fills its `Picker` with the Picker: ViewKit's select, status, several-values, relation and set editors open it, handed their rows as data, the panel round it keeping the draft and, on a phone, its ✕ and ✓, so the Picker is told the shell keeps them and hands every change. Its words are ViewKit's `views.picker.*` messages, so an app's own words reach it. A status field's steps come as `steps`: an archived option held stands outside them, as its cell draws it. It fills its `FieldsBody` with the Picker too: the sort's and the filter's field lists, each field its column's glyph, one that can't be picked greyed with why, a relation under Related records with its far fields one level in. The Picker's stylesheet, `viewkitjs/views/controls/picker.css`, stands on the Avatar's, the Button's, the Checkbox's, the Glass button's, the Input's, the Kbd's, the Menu's, the Option's, the Spinner's, the Status's, the Sheet's, the scrollbar's, the list's and the popup line's.
|
|
614
781
|
|
|
615
782
|
- `pickerItemsOf` — ViewKit's rows (`ViewsPickerItem`) as the Picker's: an avatar, the record's glyph, a status at its place (its quarters among `steps` when handed), an option, or the app's icon (handed `AppIcon`). For an app's own list in the Picker; the editors' own `pickerItemOf` is another, internal one.
|
|
616
783
|
|
|
@@ -620,7 +787,8 @@ Its stylesheet is `viewkitjs/views/controls/text-editor.css`, beside the inline
|
|
|
620
787
|
|
|
621
788
|
`CONTROLS` fills its `Calendar` with the Date editor's days: the filter panel's month (the date filter, its date ranges and its custom time scope), one day a press, the end being picked shown, the days outside its limits greyed. Its arrows and Page Up and Down move the month (with Shift a year); its words are the app's and its names in the conventions' `language`, as the Date editor's. An app that hands its own `Calendar`, or its own `RangeCalendar` atom, keeps it.
|
|
622
789
|
|
|
623
|
-
- `useDateEditor` — the Date editor, as the parts a shell pours in: its `body`, and on a phone the Sheet head's ✕ and ✓ (`head`). Standing alone (`draft: "own"`, the default) it keeps on Enter, Escape or a press elsewhere and, on a phone, hands its head ✕ and ✓; held (`draft: "shell"`) it hands every change as it is made and keeps nothing. Its `words` and `language` say what it writes
|
|
790
|
+
- `useDateEditor` — the Date editor, as the parts a shell pours in: its `body`, and on a phone the Sheet head's ✕ and ✓ (`head`). Standing alone (`draft: "own"`, the default) it keeps on Enter, Escape or a press elsewhere and, on a phone, hands its head ✕ and ✓; held (`draft: "shell"`) it hands every change as it is made and keeps nothing. Its `words` and `language` say what it writes.
|
|
791
|
+
- `DateEditor` — the body alone, for a shell that holds only a body.
|
|
624
792
|
- `DateEditorProps` — its props: the field's `label`, its `value` (`"2026-11-12"`, `"2026-11-12T14:30"` or null), `onValueChange`, `onDone`, `time`, `empty`, `days`, `picks`, `today`, `typed`, `opens`, `autoFocus`, `form`, `worn`, `draft`, `words` and `language`.
|
|
625
793
|
- `DateEditorParts` — what `useDateEditor` hands back: its `body` and its phone `head`.
|
|
626
794
|
- `useDateEditorWorn` — the options worn round an element, as a ref callback and what it wears, read again as a frame's attributes change.
|
|
@@ -666,7 +834,7 @@ Its stylesheet is `viewkitjs/views/controls/text-editor.css`, beside the inline
|
|
|
666
834
|
- `dateEditorWornOf` — its options as worn round an element.
|
|
667
835
|
- `DATE_EDITOR_ATTRS` — the attributes it watches, so a look changed while it is open reaches it.
|
|
668
836
|
- `DATE_EDITOR_ATTIO` — Attio's look: every option's default.
|
|
669
|
-
- `DATE_EDITOR_MIHAI` —
|
|
837
|
+
- `DATE_EDITOR_MIHAI` — the Outright look's picks (the look `mihai`).
|
|
670
838
|
- `DateEditorWorn` — its options as worn.
|
|
671
839
|
|
|
672
840
|
Its stylesheet is `viewkitjs/views/controls/date-editor.css`, beside the Button's, the Input's, the Select's, the menu list's, the popup line's and the Popover's or the Sheet's; its names are on [its page](../controls/date-editor.md).
|
|
@@ -721,6 +889,7 @@ A name's `NameValue` and `sameName`, and a range's `rangeText`, stay inside the
|
|
|
721
889
|
`CONTROLS` fills its `NumberBody` with the Number editor: ViewKit's number, money and percent bodies, held as a shell that keeps the draft. A number types into the number field inline, over its cell, its up and down arrows at its end while it is edited; money's code stands before the amount, a press away from a list of each currency's sign and name in the conventions' language, found by its name or its code, ↓ there going on from the currency held; a number's unit the same; a percent shows its %. Home and End move the cursor. On a phone the Sheet holds the number field with the number pad, the currencies a step of the Sheet (`onStepChange`). ViewKit's number editor keeps the draft, the rounding to the field's decimals, Escape, Tab, the check, the empty rule and the save; a refusal is the host's to show. A duration keeps ViewKit's own box.
|
|
722
890
|
|
|
723
891
|
- `useNumberEditor` — the Number editor, as the parts a shell pours in: its `body`, and on a phone the Sheet head's buttons (`head`) and the currencies' step `title`. Standing alone (`draft: "own"`, the default) it keeps on Enter or a press elsewhere and leaves on Escape, and on a phone hands its head ✕ and ✓; held (`draft: "shell"`) it hands every change as it is read and keeps nothing.
|
|
892
|
+
- `NumberEditor` — the body alone, for a shell that holds only a body.
|
|
724
893
|
- `useNumberEditorWorn` — the options worn round the body, read again as they change: a ref for its root, and what it wears.
|
|
725
894
|
- `NumberEditorProps` — its props: a `number`, `money` or `percent`, its value, its currency or unit and those on offer, its limits, decimals and reading, and its change.
|
|
726
895
|
- `NumberEditorParts` — what `useNumberEditor` hands back: its `body`, its phone `head` and a step's `title`.
|
|
@@ -738,7 +907,7 @@ A name's `NameValue` and `sameName`, and a range's `rangeText`, stay inside the
|
|
|
738
907
|
- `numberWords` — the words handed over the English.
|
|
739
908
|
- `NumberEditorWords` — those words, and its lists' own (`picker`).
|
|
740
909
|
|
|
741
|
-
|
|
910
|
+
Its stylesheet is `viewkitjs/views/controls/number-editor.css`, beside those of the controls it draws with; its names are on [its page](../controls/number-editor.md).
|
|
742
911
|
## The Values editor
|
|
743
912
|
|
|
744
913
|
`CONTROLS` fills its `ValuesBody` with the Values editor: ViewKit's bodies for several emails, phones, links or domains (and for one email or domain an app opens as a list of one, `oneValue`), held as a shell that keeps the draft. Each value is a pill with copy and trash, pressed to edit it in place, its label quiet after it; a grip moves it, by the pointer or by ↑ and ↓, and the first is the main one. A line at the foot adds one: a plus and its kind's words, or a phone's country (ViewKit's region for the record, else the last one kept, else the browser's region), its dial code and its pattern. Enter there adds the value and stays open; Enter on the empty line saves, as Enter on a value being edited first finishes it. A new value takes Work, Mobile or Other (a domain none), and a label is picked from Work, Personal, Mobile and Other in the app's words, or typed. ViewKit's value list editor keeps the draft, which value is kept as stored, Escape, Tab, the check and the save; a value that doesn't read, left in the line or in a value being edited, is handed as typed, so the host refuses it, says why and stays open. Escape in a label's or a country's list closes the list alone.
|
|
@@ -795,8 +964,33 @@ The grip's `moved` and `dragAt`, the list a shell is handed (`handedList`) and t
|
|
|
795
964
|
- `LinksEditorWords` — those words, and its roles list's own (`picker`).
|
|
796
965
|
- `linksWords` — the words handed, over the English.
|
|
797
966
|
|
|
967
|
+
<!-- The press and the choice: press.css, choice.css, the TagField, the SwitchRow -->
|
|
968
|
+
|
|
969
|
+
## The pressing area
|
|
970
|
+
|
|
971
|
+
On a phone a small target keeps the size it draws and takes taps from an invisible area round it, 44px each way, its `::after`: every Button under 44px, the Checkbox's box, the Radio's ring, the Tag's ×, the Switch and an Option drawn as a link. On a computer the Switch, the Checkbox's box and the Radio's ring take 12px either side and 8px above and below. Its stylesheet is `viewkitjs/views/controls/press.css`, in the ready stylesheet. Its phone rule holds on an element marked `data-vk-phone` and inside it: the Button, the Checkbox, the Tag's × and a link Option mark themselves on a phone, as the Switch and the Radio do, so a target outside any panel takes it too. A control that packs targets closer than 44px sets `--pressing-room-x` and `--pressing-room-y` on them, half the room between, so two areas never overlap; those two are the controls' own machinery, not public. Its names are on [its page](../controls/press.md).
|
|
972
|
+
|
|
973
|
+
## The words beside a choice
|
|
974
|
+
|
|
975
|
+
The label beside a Checkbox, a Radio or a Switch in a settings row (`o-choice-label`, the small text in the text colour), the line under it (`o-choice-note`, the extra-small text in the subtle colour), and a choice drawn as a card (`o-choice-card`: an edge round it, the hovered ground under the pointer, the selected edge and ground when chosen, a softer edge when off, a red edge in error). Its stylesheet is `viewkitjs/views/controls/choice.css`, in the ready stylesheet. Its names are on [its page](../controls/choice.md).
|
|
976
|
+
|
|
977
|
+
## The TagField
|
|
978
|
+
|
|
979
|
+
Tags inside the Input's field, before the caret, in a Field with its label, its note and its error: typing and Enter (or a comma) adds one, a tag already there is not added again, Backspace in an empty box takes the last one off, and each tag has its remove button; disabled, nothing is typed in and the tags have none. The field is an InputGroup, so every state and option of the Input draws it, and on a phone it takes the phone's 44. Its stylesheet is `viewkitjs/views/controls/tag-field.css`, in the ready stylesheet; it stands on the Field's, the Input's and the Tag's. Its names are on [its page](../controls/tag-field.md).
|
|
980
|
+
|
|
981
|
+
- `TagField` — the field. Its words are its props: `placeholder` says "Add a tag" when none is handed, and each tag's remove button "Remove <tag>", as the Tag's does.
|
|
982
|
+
- `TagFieldProps` — `label`, `note`, `error`, `disabled`, `defaultValue`, `onValueChange`, `placeholder`, `className`.
|
|
983
|
+
|
|
984
|
+
## The SwitchRow and SwitchRows
|
|
985
|
+
|
|
986
|
+
A setting in a settings list: its name and a line under it on the left (the words beside a choice), the Switch on the right, the whole row pressing it, the hovered ground under the pointer; a disabled one is not pressed. SwitchRows draws them in a bordered box, a line between each, its corners smooth where the browser can draw them. Its stylesheet is `viewkitjs/views/controls/switch-row.css`, in the ready stylesheet; it stands on `choice.css` and the Switch's. Its names are on [its page](../controls/switch-row.md).
|
|
987
|
+
|
|
988
|
+
- `SwitchRow` — one row; every prop of the Switch, and its `label` and `note`.
|
|
989
|
+
- `SwitchRowProps` — those props.
|
|
990
|
+
- `SwitchRows` — the box round the rows.
|
|
991
|
+
|
|
798
992
|
## The stylesheets
|
|
799
993
|
|
|
800
|
-
The ready stylesheet (`viewkitjs/views/styles.css`) carries the controls, every token they read declared at the Outright look's value ([the controls' tokens](../contract.md#the-controls-tokens)). An app on the Outright tokens imports them one by one instead, and declares each token as its own: `viewkitjs/views/controls/smooth.css` first (the smooth corner every control's outline stands on), then each control's own, `viewkitjs/views/controls/<piece>.css` (the Button's `button.css`, the Spinner's `spinner.css`); each control's names are on its page under `docs/controls/`. Their options and looks are on [`viewkitjs/views/looks`](looks.md).
|
|
994
|
+
The ready stylesheet (`viewkitjs/views/styles.css`) carries the controls, every token they read declared at the Outright look's value ([the controls' tokens](../contract.md#the-controls-tokens)). An app on the Outright tokens imports them one by one instead, and declares each token as its own: `viewkitjs/views/controls/smooth.css` first (the smooth corner every control's outline stands on), then each control's own, `viewkitjs/views/controls/<piece>.css` (the Button's `button.css`, the Spinner's `spinner.css`), with `press.css` and `choice.css` for the pressing area and the words beside a choice; each control's names are on its page under `docs/controls/`. Their options and looks are on [`viewkitjs/views/looks`](looks.md).
|
|
801
995
|
|
|
802
996
|
The class names (`o-button`, `o-spinner` and the rest) and the selectors other pieces use to style a Button they hold stay as the Outright kit named them until those pieces move into ViewKit; they are not public.
|
|
@@ -24,6 +24,7 @@ Guide: [display](../guides/display.md).
|
|
|
24
24
|
|
|
25
25
|
## Formatting a value as text
|
|
26
26
|
|
|
27
|
+
- `timeShown` — whether a date-and-time shows its time: the reader's choice, else the field's or column's `withTime`, else yes. Takes the declared answer, then the chosen one.
|
|
27
28
|
- `formatDateValue` — prints a date or an instant: takes the value, the date style (`short` when none), whether to show the time, the kind (`"datetime"` by default; `"date"` reads a `YYYY-MM-DD` day key) and options carrying `presentation` and `viewer`. A `Date` handed for a day is read as its calendar day. A value that does not parse comes back as its own text, never "Invalid Date".
|
|
28
29
|
- `formatNumberValue` — prints a number in the style its format names (plain, duration, percent or currency): takes the value, a `NumberLikeFormat` (plain when none) and options (`decimals`, `currency`, `durationStyle`, `presentation`, `viewer`), which win over the format. A duration reads the value in its stored unit (milliseconds, or seconds when the format says so) and picks its own precision. A currency code comes from the options, then the format, then `EUR`. A `signed` format prints `+ ` or `− ` before the absolute value.
|
|
29
30
|
- `formatMoney` — writes an amount in its own currency, as a money cell does: takes the amount, the currency, the decimals (two by default) and options carrying `presentation` and `viewer`, and prints through `formatNumberValue`, so the amount reads in the viewer's locale and your presentation's look. With no options it takes the default presentation and the neutral conventions (`en-GB`). An absent currency is read as EUR and an absent amount as zero; a code `Intl` refuses is written as the code before the number.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `viewkitjs/views/editors/chips`
|
|
2
2
|
|
|
3
|
-
Import from `viewkitjs/views/editors/chips` in a client component: the door opens with the client directive. It holds the editor of a `multiselect` field, a value that is several values. The chosen values stay on screen while you edit them,
|
|
3
|
+
Import from `viewkitjs/views/editors/chips` in a client component: the door opens with the client directive. It holds the editor of a `multiselect` field, a value that is several values. The chosen values stay on screen while you edit them, held in your app's `Picker`, and adds and removes build a draft that commits once when the host closes the panel: several tags are one write and one undo step. A pick adds a value and keeps the panel open, so this editor never sees the `pick` reason. It owns the draft and what a close means; its host owns the popover, the anchor and the write. It commits the list of values, a `string[]`. Guide: [editors](../guides/editors.md).
|
|
4
4
|
|
|
5
|
-
- `ChipsEditor` — the chips panel
|
|
5
|
+
- `ChipsEditor` — the chips panel, opened in your app's `Picker` with `multiple`, the values it holds and those on offer (the column's, then any held stray); its ref is a `ChipsEditorHandle`. Your Picker hands back the whole new list, every change as it is made; a value handed twice is held once, the empty text never, and a closed vocabulary (`creatable={false}`) takes only what it offers or holds. Unless `creatable` is false your Picker is handed `onCreate`: the typed text through the column's `normalize`, a value held or offered in any case being that value. Your Picker's `onDone` closes with `pick`; Escape closes with `escape`, Tab and Shift-Tab with `tab` and `shift-tab`. It takes `values` (what the cell holds), `suggestions` (what the column already holds, the same list its filter offers), `resolve` (one value's label and colour as a `PickerOption`, including a value just typed), `onRequestClose` (called with `escape`, `tab` or `shift-tab`) and `message`, and optionally `normalize`, the rule every added value goes through (default: trimmed), and `creatable` (default true), `seed`, the text the search opens with (a letter typed on the cell that opened it, the values held kept), and `addOption`, an `OptionAdd` from your app: your Picker is handed + Add (`onAdd`, with `adding` while your app answers and `addRefused` for a refusal or a failure) and no `onCreate`; a word a value held or offered already is (by label or value, ignoring spaces at either end, case and accents) is that value, never asked; otherwise your app is asked once, and the option it returns is added to the set and checked, the panel staying open, once `suggestions` carry it. `CONTROLS.Picker` doesn't draw + Add yet.
|
|
6
6
|
- `ChipsEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Its close rule is the date editor's: Escape discards, and any other close, an outside click included, commits the list when it differs from `values` (compared as fields compares a list) and is a `noop` when it doesn't.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# `viewkitjs/views/editors/date`
|
|
2
2
|
|
|
3
|
-
Import from `viewkitjs/views/editors/date` in a client component: the door opens with the client directive. It holds the editor of a `date` and a `datetime` field
|
|
3
|
+
Import from `viewkitjs/views/editors/date` in a client component: the door opens with the client directive. It holds the editor of a `date` and a `datetime` field, which opens your app's `DateBody` (`CONTROLS.DateBody` is ViewKit's own, the Date editor: its line, its days, its quick picks and its time; it has no list of every quarter hour). It owns the draft, the reading of the value on the conventions' calendar and clock, and what a close means; the body draws; its host owns the popover, the anchor and when a close means commit. It commits `YYYY-MM-DD` when no time is set, `YYYY-MM-DDTHH:MM` in local time, or `""` when the date is emptied. Guide: [editors](../guides/editors.md).
|
|
4
4
|
|
|
5
|
-
- `
|
|
5
|
+
- `DateEditorHost` — the date panel (the Date editor's body alone is `DateEditor`, on `viewkitjs/views/controls`); its ref is a `DateEditorHandle`. It takes `initial` (the stored value, which picks the day the body opens on: a full ISO string; a wall clock with no offset, read on the browser's clock, the form a commit waiting for its write comes back in; or `YYYY-MM-DD`, that day in every time zone, never midnight UTC), `onRequestClose` (Enter means done, Escape means leave, and `pick` means a choice that ends the edit; Tab from the body's last control asks to close with `tab`, and Shift-Tab from its first with `shift-tab`, while Tab between its own controls moves as usual, so a popover that keeps the focus in a loop can still be left; the panel never closes itself) and `message` (the fields message resolver, defaulting to the provider's conventions). With `timeOptional` the time starts empty and stays out of the commit until set; without it the time is the stored one, or 00:00, and every commit includes one. With `dayOnly`, for a calendar-day field, there is no time and the commit is the day. With `clearable` the body offers No date, which commits `""`, or nothing when there was no date. With `seed` the body's line opens holding that text (a character typed on the cell), read as a typed date. With `focusDate` the body takes the focus as the panel opens, without scrolling; leave it off on a phone, whose sheet opens with the keyboard down. With no stored value a close with no interaction writes nothing. The panel opens on, and takes, the wall clock of the conventions' zone (`timeZone`), the hour the cell shows, and today (which the body's quick days count from) is that zone's; the commit is the browser's wall clock of the instant set, so `mergeLocalOntoInstant` lands it there. A time the zone skips commits nothing. A day with no time (with `timeOptional`, the time left or made empty) lands at the zone's first instant that day, its midnight or, where its clocks skip midnight, the moment they land on; where that is the browser's own start of the day it commits the bare day, which `mergeLocalOntoInstant` lays onto the stored clock, as before. A `dayOnly` field reads a stored instant's day on the browser's calendar, as its cell does, and a grid column of type `date` with no field keeps its editor on the browser's clock.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- `DateEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape discards: `"escape"` answers `cancel`. After
|
|
7
|
+
It hands the body the value on the conventions' calendar and clock (a day, or a day and a time, a stored day read as that day on any clock), `time` (false for a date-only field), `empty` (where the date may be emptied), the quick picks, today, the text typed on what opened it, `autoFocus` and `form`. A change from the body is the draft a close resolves, `resolveClose` answers it unchanged, a datetime handed a bare day moves the day and keeps the time in force (the one it opened with, or the last one handed), while a field whose time is optional takes a bare day as holding no time, the empty pick (No date) empties the date, and a value that isn't a date changes nothing. `onDone` asks the host to close with `enter` when the body's last key was a plain Enter (so a grid's next key lands the write first), and with `pick` otherwise. Escape is taken before the body hears it and asks the host to close with `escape`, so your provider's rule for the field's type decides what it keeps; Tab walks the body's controls and asks to close with `tab` or `shift-tab` from either end, so a popover your body draws in a portal, outside its element, reads as a Tab out. `label` names the field for the body (default: the date's words); the grid and the field row hand their field's name.
|
|
8
|
+
- `DateEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape discards: `"escape"` answers `cancel`. After the body hands the empty pick, any other close commits `""`, or is a `noop` when there was no date. Otherwise every other close commits the draft when it differs from the stored value, and is a `noop` otherwise, with a seed typed on what opened it read as a typed date.
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
# `viewkitjs/views/editors/location`
|
|
2
2
|
|
|
3
|
-
Import from `viewkitjs/views/editors/location` in a client component: the door opens with the client directive. It holds the editor of a `location` field: the country first, then that country's own parts in its own order and with its own words (one country's postal code, county and city on one line, another's city first), the parts the country asks for marked as required and never refused. It owns the
|
|
3
|
+
Import from `viewkitjs/views/editors/location` in a client component: the door opens with the client directive. It holds the editor of a `location` field, which opens your app's `PartsBody` as `kind: "place"` (`CONTROLS.PartsBody` is ViewKit's own, the Compound editor): the country first, then that country's own parts in its own order and with its own words (one country's postal code, county and city on one line, another's city first), the parts the country asks for marked as required and never refused. It owns the draft, the region's code and what a close means; the body draws the boxes and the country and region lists; its host owns the popover, the anchor and the write. It commits a `LocationValue` of `viewkitjs/fields` holding the field's parts, or null. Guide: [editors](../guides/editors.md).
|
|
4
4
|
|
|
5
|
-
- `LocationEditor` — the place
|
|
6
|
-
- Country:
|
|
5
|
+
- `LocationEditor` — the place panel; its ref is a `LocationEditorHandle`. It takes `field` (the location field, whose `parts` limit what it edits), `initial` (the stored place, or null) and `onRequestClose`, and optionally `allowEmpty` (the place may be emptied: the body is told so as `empty`), `conventions` (whose names language, `language`, names the countries and regions and picks each country's format; default: the provider's) and `label` (the field's name, for your `PartsBody`; default the field's label). It hands the body the place's parts, the boxes the field takes and their rows in the country's own order, each box's words, the parts the country asks for, every country where the field takes one, the country's regions once loaded, and `opens: "countries"` where the place has no country yet.
|
|
6
|
+
- Country: picking another country clears the region and its code.
|
|
7
7
|
- Region: where the country has a region list, the region is picked from it, storing the region's name and its ISO 3166-2 code; the list loads when the editor lands on that country. A typed region has no code.
|
|
8
8
|
- Parts: a field limited to some parts edits only those, and a part it names that the country's format has no place for comes after the country's lines, as does a part a stored place holds that its country has no place for.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Handed `PartsBody` in the components map, the editor opens it in place of its boxes and lists, as `kind: "place"`: it hands the body the place's parts, the boxes the field takes and their rows in the country's own order, each box's words, the parts the country asks for, every country where the field takes one, the country's regions once loaded, and `opens: "countries"` where the place has no country yet. It keeps the region's code (read from the region, cleared with a new country), the draft, Escape, Tab and the close.
|
|
12
|
-
- `LocationEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape cancels. Each of the field's parts is trimmed, an empty one null; the same stored value as `initial` is a `noop`; every part empty commits null with `allowEmpty` and cancels without it; anything else commits. After a press on the Clear row, until the next edit, every close but Escape commits null, or is a `noop` when the place was already empty.
|
|
9
|
+
- `LocationEditorHandle` — what the host's ref reads: `resolveClose(reason)`, synchronous and safe to ask twice. Escape cancels. Each of the field's parts is trimmed, an empty one null; the same stored value as `initial` is a `noop`; every part empty commits null with `allowEmpty` and cancels without it; anything else commits.
|