@viewkitjs/views 0.5.0 → 0.6.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 +620 -0
- package/README.md +4 -2
- package/dist/atoms/Avatar.d.ts +2 -0
- package/dist/atoms/Avatar.js +13 -0
- package/dist/atoms/CellMore.d.ts +2 -0
- package/dist/atoms/CellMore.js +4 -0
- package/dist/atoms/DisabledReason.d.ts +11 -0
- package/dist/atoms/DisabledReason.js +10 -0
- package/dist/atoms/DrillRows.d.ts +2 -2
- package/dist/atoms/DrillRows.js +7 -5
- package/dist/atoms/Loading.d.ts +6 -0
- package/dist/atoms/Loading.js +4 -1
- package/dist/atoms/PanelRows.js +3 -5
- package/dist/atoms/Pill.d.ts +2 -0
- package/dist/atoms/Pill.js +25 -0
- package/dist/atoms/RangeCalendar.d.ts +8 -0
- package/dist/atoms/RangeCalendar.js +30 -0
- package/dist/atoms/RelationRoles.js +2 -2
- package/dist/atoms/SelectionSheet.js +5 -4
- package/dist/atoms/ToolbarButton.d.ts +2 -0
- package/dist/atoms/ToolbarButton.js +18 -0
- package/dist/atoms/defaults.js +10 -0
- package/dist/atoms/types.d.ts +141 -1
- package/dist/cells/cell-format.d.ts +10 -1
- package/dist/cells/cell-title.d.ts +5 -1
- package/dist/cells/cell-title.js +2 -2
- package/dist/cells/cell-values.js +22 -7
- package/dist/cells/relation-wrap.js +1 -1
- package/dist/contract.d.ts +351 -15
- package/dist/contract.js +482 -4
- package/dist/display/actor.js +1 -1
- package/dist/display/boolean.js +5 -0
- package/dist/display/entity-chip.d.ts +12 -9
- package/dist/display/entity-chip.js +4 -5
- package/dist/display/fit-values.d.ts +34 -0
- package/dist/display/fit-values.js +45 -0
- package/dist/display/location.js +1 -1
- package/dist/display/multi-value.js +72 -8
- package/dist/display/options.d.ts +9 -1
- package/dist/display/relation.js +1 -1
- package/dist/display/rich-text.js +17 -6
- package/dist/display/select.js +6 -4
- package/dist/display/status-steps.d.ts +8 -0
- package/dist/display/status-steps.js +18 -0
- package/dist/display/viewer.js +1 -0
- package/dist/editors/BodyFrame.d.ts +29 -0
- package/dist/editors/BodyFrame.js +80 -0
- package/dist/editors/DateEditor.js +13 -17
- package/dist/editors/LocationEditor.d.ts +2 -0
- package/dist/editors/LocationEditor.js +29 -5
- package/dist/editors/NameEditor.d.ts +2 -0
- package/dist/editors/NameEditor.js +27 -7
- package/dist/editors/NumberEditor.d.ts +18 -0
- package/dist/editors/NumberEditor.js +29 -2
- package/dist/editors/RangeEditor.d.ts +2 -0
- package/dist/editors/RangeEditor.js +29 -4
- package/dist/editors/SelectEditor.d.ts +5 -0
- package/dist/editors/SelectEditor.js +3 -2
- package/dist/editors/TextEditor.d.ts +11 -1
- package/dist/editors/TextEditor.js +25 -8
- package/dist/editors/ValueListEditor.d.ts +7 -0
- package/dist/editors/ValueListEditor.js +60 -48
- package/dist/editors/body-panel.d.ts +7 -0
- package/dist/editors/body-panel.js +8 -0
- package/dist/editors/edit-session.d.ts +20 -3
- package/dist/editors/edit-session.js +43 -3
- package/dist/editors/leave-scope.d.ts +23 -0
- package/dist/editors/leave-scope.js +28 -0
- package/dist/editors/number-body.d.ts +29 -0
- package/dist/editors/number-body.js +37 -0
- package/dist/editors/parts-body.d.ts +66 -0
- package/dist/editors/parts-body.js +114 -0
- package/dist/editors/tab-ends.d.ts +5 -0
- package/dist/editors/tab-ends.js +7 -0
- package/dist/editors/text-body.d.ts +16 -0
- package/dist/editors/text-body.js +30 -0
- package/dist/editors/values-body.d.ts +47 -0
- package/dist/editors/values-body.js +140 -0
- package/dist/field-row/FieldRow.d.ts +7 -0
- package/dist/field-row/FieldRow.js +44 -24
- package/dist/field-row/FieldRowLane.js +12 -4
- package/dist/field-row/editors/RowChipsEditor.js +3 -1
- package/dist/field-row/editors/RowEditor.js +2 -1
- package/dist/field-row/editors/RowNameEditor.d.ts +5 -2
- package/dist/field-row/editors/RowNameEditor.js +12 -5
- package/dist/field-row/editors/RowNumberEditor.js +18 -2
- package/dist/field-row/editors/RowPlaceEditor.js +4 -2
- package/dist/field-row/editors/RowRangeEditor.d.ts +5 -2
- package/dist/field-row/editors/RowRangeEditor.js +13 -6
- package/dist/field-row/editors/RowRelationEditor.js +5 -2
- package/dist/field-row/editors/RowSelectEditor.js +4 -1
- package/dist/field-row/editors/RowTextEditor.d.ts +1 -1
- package/dist/field-row/editors/RowTextEditor.js +12 -3
- package/dist/field-row/editors/RowValueListEditor.d.ts +2 -1
- package/dist/field-row/editors/RowValueListEditor.js +17 -4
- package/dist/field-row/editors/host.d.ts +3 -0
- package/dist/field-row/editors/row-session.d.ts +12 -1
- package/dist/field-row/editors/row-session.js +52 -2
- package/dist/field-row/field-row-button.d.ts +40 -0
- package/dist/field-row/field-row-button.js +18 -0
- package/dist/field-row/field-row-checkbox.d.ts +9 -0
- package/dist/field-row/field-row-checkbox.js +7 -0
- package/dist/filters/filter-model.d.ts +2 -0
- package/dist/grid/chrome/GridAddColumn.js +17 -3
- package/dist/grid/chrome/GridAggregateMenu.d.ts +2 -0
- package/dist/grid/chrome/GridAggregateMenu.js +2 -0
- package/dist/grid/chrome/GridCellEditors.js +16 -6
- package/dist/grid/chrome/GridCellOutline.d.ts +7 -4
- package/dist/grid/chrome/GridCellOutline.js +4 -2
- package/dist/grid/chrome/GridChipsEditor.js +3 -1
- package/dist/grid/chrome/GridColumnMenu.d.ts +4 -1
- package/dist/grid/chrome/GridColumnMenu.js +5 -3
- package/dist/grid/chrome/GridColumnSortSection.d.ts +20 -0
- package/dist/grid/chrome/GridColumnSortSection.js +18 -1
- package/dist/grid/chrome/GridFooter.d.ts +4 -1
- package/dist/grid/chrome/GridFooter.js +6 -4
- package/dist/grid/chrome/GridGroupMenu.d.ts +5 -1
- package/dist/grid/chrome/GridGroupMenu.js +30 -8
- package/dist/grid/chrome/GridHeader.d.ts +5 -1
- package/dist/grid/chrome/GridHeader.js +9 -5
- package/dist/grid/chrome/GridLongTextEditor.js +15 -11
- package/dist/grid/chrome/GridNameEditor.js +4 -2
- package/dist/grid/chrome/GridNumberEditor.d.ts +8 -1
- package/dist/grid/chrome/GridNumberEditor.js +15 -3
- package/dist/grid/chrome/GridPager.d.ts +7 -0
- package/dist/grid/chrome/GridPager.js +34 -0
- package/dist/grid/chrome/GridPlaceEditor.js +4 -2
- package/dist/grid/chrome/GridRangeEditor.js +12 -4
- package/dist/grid/chrome/GridRelationEditor.js +5 -2
- package/dist/grid/chrome/GridRow.js +18 -6
- package/dist/grid/chrome/GridRowActions.d.ts +8 -3
- package/dist/grid/chrome/GridRowActions.js +16 -6
- package/dist/grid/chrome/GridRowCells.js +23 -7
- package/dist/grid/chrome/GridRowGlyph.d.ts +3 -1
- package/dist/grid/chrome/GridRowGlyph.js +7 -2
- package/dist/grid/chrome/GridSelectEditor.js +6 -3
- package/dist/grid/chrome/GridStructure.d.ts +6 -1
- package/dist/grid/chrome/GridStructure.js +32 -8
- package/dist/grid/chrome/GridTable.js +36 -24
- package/dist/grid/chrome/GridTableSurface.d.ts +5 -1
- package/dist/grid/chrome/GridTableSurface.js +5 -2
- package/dist/grid/chrome/GridTextEditor.d.ts +5 -1
- package/dist/grid/chrome/GridTextEditor.js +13 -3
- package/dist/grid/chrome/GridValueListEditor.d.ts +12 -4
- package/dist/grid/chrome/GridValueListEditor.js +11 -3
- package/dist/grid/chrome/StuckMarker.d.ts +3 -1
- package/dist/grid/chrome/StuckMarker.js +6 -2
- package/dist/grid/chrome/cells.d.ts +4 -2
- package/dist/grid/chrome/cells.js +2 -2
- package/dist/grid/chrome/grid-add-column-items.d.ts +1 -1
- package/dist/grid/chrome/grid-add-column-items.js +8 -1
- package/dist/grid/chrome/grid-button.d.ts +32 -0
- package/dist/grid/chrome/grid-button.js +12 -0
- package/dist/grid/chrome/grid-cell-classes.d.ts +38 -0
- package/dist/grid/chrome/grid-cell-classes.js +30 -0
- package/dist/grid/chrome/grid-column-menu-items.d.ts +3 -0
- package/dist/grid/chrome/grid-column-menu-items.js +32 -3
- package/dist/grid/chrome/grid-columns-template.d.ts +27 -0
- package/dist/grid/chrome/grid-columns-template.js +13 -0
- package/dist/grid/chrome/grid-edit-session.d.ts +4 -1
- package/dist/grid/chrome/grid-edit-session.js +11 -1
- package/dist/grid/chrome/grid-group-menu-items.d.ts +8 -1
- package/dist/grid/chrome/grid-group-menu-items.js +17 -0
- package/dist/grid/chrome/grid-group-menu-parts.d.ts +10 -6
- package/dist/grid/chrome/grid-group-menu-parts.js +4 -2
- package/dist/grid/chrome/grid-hover.d.ts +4 -1
- package/dist/grid/chrome/grid-hover.js +16 -6
- package/dist/grid/chrome/grid-pages.d.ts +15 -0
- package/dist/grid/chrome/grid-pages.js +9 -0
- package/dist/grid/chrome/grid-row-menu-items.js +18 -10
- package/dist/grid/chrome/grid-row-props.d.ts +6 -2
- package/dist/grid/chrome/grid-row-window.d.ts +7 -0
- package/dist/grid/chrome/grid-row-window.js +35 -1
- package/dist/grid/chrome/grid-table-props.d.ts +38 -4
- package/dist/grid/chrome/useGridColumnLayout.d.ts +3 -1
- package/dist/grid/chrome/useGridColumnLayout.js +29 -9
- package/dist/grid/chrome/useGridPartColumns.js +1 -1
- package/dist/grid/chrome/useGridScrollArea.js +2 -0
- package/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -0
- package/dist/grid/chrome/useGridTableInteractionModel.js +5 -3
- package/dist/grid/chrome/useGridTableSelection.d.ts +3 -1
- package/dist/grid/chrome/useGridTableSelection.js +2 -2
- package/dist/grid/chrome/useHeaderDragReorder.js +2 -0
- package/dist/grid/core/editing-controller.d.ts +36 -11
- package/dist/grid/core/editing-controller.js +92 -25
- package/dist/grid/core/grid-aria.d.ts +4 -0
- package/dist/grid/core/grid-aria.js +6 -4
- package/dist/grid/core/grid-focus.d.ts +6 -0
- package/dist/grid/core/grid-focus.js +28 -5
- package/dist/grid/core/useGridEditing.d.ts +11 -2
- package/dist/grid/core/useGridEditing.js +9 -5
- package/dist/grid/core/write-states.d.ts +20 -0
- package/dist/grid/core/write-states.js +21 -0
- package/dist/grid/grid-format-props.d.ts +26 -0
- package/dist/grid/grid-format-props.js +65 -0
- package/dist/grid/index.d.ts +3 -1
- package/dist/grid/index.js +1 -0
- package/dist/grid/useGridTablePrefs.d.ts +19 -20
- package/dist/grid/useGridTablePrefs.js +6 -58
- package/dist/grid/useGridTableSettings.d.ts +60 -0
- package/dist/grid/useGridTableSettings.js +61 -0
- package/dist/internal/count.d.ts +3 -0
- package/dist/internal/count.js +3 -0
- package/dist/model/body-frame.d.ts +16 -0
- package/dist/model/body-frame.js +5 -0
- package/dist/model/column-capabilities.d.ts +4 -1
- package/dist/model/column-capabilities.js +4 -1
- package/dist/model/column-filters.d.ts +7 -4
- package/dist/model/column-filters.js +26 -18
- package/dist/model/column-inspect.d.ts +3 -2
- package/dist/model/column-inspect.js +3 -1
- package/dist/model/column-sort.d.ts +11 -0
- package/dist/model/column-sort.js +14 -0
- package/dist/model/one-value.d.ts +6 -0
- package/dist/model/one-value.js +5 -0
- package/dist/model/part-write.js +1 -1
- package/dist/model/place-parts.d.ts +6 -0
- package/dist/model/place-parts.js +14 -0
- package/dist/model/relation-filters.d.ts +13 -2
- package/dist/model/relation-filters.js +9 -4
- package/dist/model/row-icon.d.ts +16 -6
- package/dist/model/settings-columns.d.ts +34 -0
- package/dist/model/settings-columns.js +146 -0
- package/dist/model/settings-look.d.ts +17 -0
- package/dist/model/settings-look.js +23 -0
- package/dist/model/view-rules.js +6 -2
- package/dist/panels/availability.d.ts +26 -0
- package/dist/panels/availability.js +28 -0
- package/dist/panels/filter/DateFilterBody.d.ts +42 -0
- package/dist/panels/filter/DateFilterBody.js +64 -0
- package/dist/panels/filter/DateFilterCalendar.d.ts +19 -0
- package/dist/panels/filter/DateFilterCalendar.js +37 -0
- package/dist/panels/filter/DateFilterInput.d.ts +16 -0
- package/dist/panels/filter/DateFilterInput.js +37 -0
- package/dist/panels/filter/FilterIcon.d.ts +7 -0
- package/dist/panels/filter/FilterIcon.js +15 -0
- package/dist/panels/filter/MenuSelect.d.ts +12 -0
- package/dist/panels/filter/MenuSelect.js +34 -0
- package/dist/panels/filter/NumberFilterBody.d.ts +21 -0
- package/dist/panels/filter/NumberFilterBody.js +76 -0
- package/dist/panels/filter/RangeFilterBody.d.ts +19 -0
- package/dist/panels/filter/RangeFilterBody.js +71 -0
- package/dist/panels/filter/RelationFilterBody.d.ts +17 -0
- package/dist/panels/filter/RelationFilterBody.js +20 -0
- package/dist/panels/filter/TextFilterBody.d.ts +31 -0
- package/dist/panels/filter/TextFilterBody.js +44 -0
- package/dist/panels/filter/TimeScopeDetail.d.ts +6 -0
- package/dist/panels/filter/TimeScopeDetail.js +47 -0
- package/dist/panels/filter/details.d.ts +17 -0
- package/dist/panels/filter/details.js +73 -0
- package/dist/panels/filter/filter-list.d.ts +23 -0
- package/dist/panels/filter/filter-list.js +38 -0
- package/dist/panels/group-sort.d.ts +24 -0
- package/dist/panels/group-sort.js +58 -0
- package/dist/panels/index.d.ts +24 -0
- package/dist/panels/index.js +17 -0
- package/dist/panels/labels.d.ts +37 -0
- package/dist/panels/labels.js +166 -0
- package/dist/panels/model.d.ts +343 -0
- package/dist/panels/model.js +77 -0
- package/dist/panels/react/GroupBucketsList.d.ts +16 -0
- package/dist/panels/react/GroupBucketsList.js +38 -0
- package/dist/panels/react/LayoutColumnsList.d.ts +24 -0
- package/dist/panels/react/LayoutColumnsList.js +71 -0
- package/dist/panels/react/PopoverColumnDetail.d.ts +11 -0
- package/dist/panels/react/PopoverColumnDetail.js +24 -0
- package/dist/panels/react/chrome.d.ts +17 -0
- package/dist/panels/react/chrome.js +8 -0
- package/dist/panels/react/column-refusals.d.ts +7 -0
- package/dist/panels/react/column-refusals.js +14 -0
- package/dist/panels/react/customize.d.ts +26 -0
- package/dist/panels/react/customize.js +98 -0
- package/dist/panels/react/drag.d.ts +2 -0
- package/dist/panels/react/drag.js +6 -0
- package/dist/panels/react/field-editor.d.ts +10 -0
- package/dist/panels/react/field-editor.js +1 -0
- package/dist/panels/react/filter-panel.d.ts +15 -0
- package/dist/panels/react/filter-panel.js +48 -0
- package/dist/panels/react/layout-detail.d.ts +4 -0
- package/dist/panels/react/layout-detail.js +21 -0
- package/dist/panels/react/order-details.d.ts +32 -0
- package/dist/panels/react/order-details.js +81 -0
- package/dist/panels/react/panel-header.d.ts +10 -0
- package/dist/panels/react/panel-header.js +12 -0
- package/dist/panels/react/panel-sheet.d.ts +19 -0
- package/dist/panels/react/panel-sheet.js +22 -0
- package/dist/panels/react/popover.d.ts +71 -0
- package/dist/panels/react/popover.js +47 -0
- package/dist/panels/react/root-list.d.ts +6 -0
- package/dist/panels/react/root-list.js +31 -0
- package/dist/panels/react/toolbar/ReadyToolbar.d.ts +42 -0
- package/dist/panels/react/toolbar/ReadyToolbar.js +92 -0
- package/dist/panels/react/toolbar/Toolbar.d.ts +16 -0
- package/dist/panels/react/toolbar/Toolbar.js +34 -0
- package/dist/panels/react/toolbar/ToolbarButton.d.ts +5 -0
- package/dist/panels/react/toolbar/ToolbarButton.js +9 -0
- package/dist/panels/react/toolbar/ToolbarFilter.d.ts +19 -0
- package/dist/panels/react/toolbar/ToolbarFilter.js +32 -0
- package/dist/panels/react/toolbar/ToolbarNew.d.ts +12 -0
- package/dist/panels/react/toolbar/ToolbarNew.js +21 -0
- package/dist/panels/react/toolbar/ToolbarOptions.d.ts +25 -0
- package/dist/panels/react/toolbar/ToolbarOptions.js +33 -0
- package/dist/panels/react/toolbar/ToolbarSearch.d.ts +9 -0
- package/dist/panels/react/toolbar/ToolbarSearch.js +41 -0
- package/dist/panels/react/toolbar/ToolbarSort.d.ts +12 -0
- package/dist/panels/react/toolbar/ToolbarSort.js +16 -0
- package/dist/panels/react/toolbar/ToolbarViews.d.ts +13 -0
- package/dist/panels/react/toolbar/ToolbarViews.js +24 -0
- package/dist/panels/react/toolbar/context.d.ts +29 -0
- package/dist/panels/react/toolbar/context.js +49 -0
- package/dist/panels/react/toolbar/panel-part.d.ts +37 -0
- package/dist/panels/react/toolbar/panel-part.js +37 -0
- package/dist/panels/react/toolbar/panel-state.d.ts +9 -0
- package/dist/panels/react/toolbar/panel-state.js +12 -0
- package/dist/panels/react/toolbar/use-box-narrow.d.ts +2 -0
- package/dist/panels/react/toolbar/use-box-narrow.js +18 -0
- package/dist/panels/react/toolbar/use-list-settings-state.d.ts +10 -0
- package/dist/panels/react/toolbar/use-list-settings-state.js +10 -0
- package/dist/panels/react/view-actions.d.ts +4 -0
- package/dist/panels/react/view-actions.js +37 -0
- package/dist/panels/react/view-footer.d.ts +16 -0
- package/dist/panels/react/view-footer.js +11 -0
- package/dist/panels/react/views-row/FoldingViewRow.d.ts +4 -0
- package/dist/panels/react/views-row/FoldingViewRow.js +105 -0
- package/dist/panels/react/views-row/HScrollRow.d.ts +7 -0
- package/dist/panels/react/views-row/HScrollRow.js +42 -0
- package/dist/panels/react/views-row/PillGroup.d.ts +30 -0
- package/dist/panels/react/views-row/PillGroup.js +86 -0
- package/dist/panels/react/views-row/ViewAxes.d.ts +6 -0
- package/dist/panels/react/views-row/ViewAxes.js +16 -0
- package/dist/panels/react/views-row/ViewCreatePill.d.ts +7 -0
- package/dist/panels/react/views-row/ViewCreatePill.js +11 -0
- package/dist/panels/react/views-row/ViewPicker.d.ts +5 -0
- package/dist/panels/react/views-row/ViewPicker.js +65 -0
- package/dist/panels/react/views-row/ViewPickerRow.d.ts +7 -0
- package/dist/panels/react/views-row/ViewPickerRow.js +18 -0
- package/dist/panels/react/views-row/ViewTabs.d.ts +31 -0
- package/dist/panels/react/views-row/ViewTabs.js +29 -0
- package/dist/panels/react/views-row/menu-classes.d.ts +6 -0
- package/dist/panels/react/views-row/menu-classes.js +3 -0
- package/dist/panels/react/views-row/use-anchored-toggle.d.ts +19 -0
- package/dist/panels/react/views-row/use-anchored-toggle.js +31 -0
- package/dist/panels/react.d.ts +51 -0
- package/dist/panels/react.js +43 -0
- package/dist/panels/settings/axes.d.ts +28 -0
- package/dist/panels/settings/axes.js +71 -0
- package/dist/panels/settings/filters.d.ts +5 -0
- package/dist/panels/settings/filters.js +62 -0
- package/dist/panels/settings/group-buckets.d.ts +23 -0
- package/dist/panels/settings/group-buckets.js +73 -0
- package/dist/panels/settings/input.d.ts +69 -0
- package/dist/panels/settings/input.js +1 -0
- package/dist/panels/settings/layout.d.ts +5 -0
- package/dist/panels/settings/layout.js +244 -0
- package/dist/panels/settings/order.d.ts +19 -0
- package/dist/panels/settings/order.js +271 -0
- package/dist/panels/settings/settings-panels.d.ts +17 -0
- package/dist/panels/settings/settings-panels.js +28 -0
- package/dist/panels/toolbar/clear.d.ts +9 -0
- package/dist/panels/toolbar/clear.js +26 -0
- package/dist/panels/toolbar/counts.d.ts +15 -0
- package/dist/panels/toolbar/counts.js +21 -0
- package/dist/panels/toolbar/edit-view.d.ts +5 -0
- package/dist/panels/toolbar/edit-view.js +18 -0
- package/dist/panels/toolbar/model.d.ts +34 -0
- package/dist/panels/toolbar/model.js +52 -0
- package/dist/panels/use-filter-opened.d.ts +8 -0
- package/dist/panels/use-filter-opened.js +11 -0
- package/dist/panels/view-state.d.ts +38 -0
- package/dist/panels/view-state.js +1 -0
- package/dist/panels/views-row/model.d.ts +131 -0
- package/dist/panels/views-row/model.js +14 -0
- package/dist/provider/ViewsProvider.d.ts +46 -6
- package/dist/provider/ViewsProvider.js +32 -2
- package/dist/provider/components.d.ts +258 -11
- package/dist/provider/context.d.ts +21 -2
- package/dist/react.d.ts +5 -2
- package/dist/selection/SelectionBar.js +13 -7
- package/dist/selection/bar-overflow.js +14 -1
- package/dist/selection/bar-parts.d.ts +4 -2
- package/dist/selection/bar-parts.js +5 -3
- package/dist/selection/useListSelectionShortcuts.d.ts +3 -2
- package/dist/selection/useListSelectionShortcuts.js +1 -1
- package/dist/selection/verbs.d.ts +7 -0
- package/docs/contract.md +307 -41
- package/docs/getting-started.md +1 -1
- package/docs/guides/atoms.md +37 -5
- package/docs/guides/columns.md +1 -1
- package/docs/guides/display.md +3 -2
- package/docs/guides/editors.md +4 -3
- package/docs/guides/selection.md +4 -2
- package/docs/guides/the-grid.md +21 -11
- package/docs/guides/the-provider.md +22 -6
- package/docs/index.md +2 -2
- package/docs/install.md +2 -3
- package/docs/reference/cells.md +1 -1
- package/docs/reference/display.md +5 -4
- package/docs/reference/editors-location.md +3 -1
- package/docs/reference/editors-name.md +3 -1
- package/docs/reference/editors-number.md +1 -0
- package/docs/reference/editors-range.md +3 -1
- package/docs/reference/editors-session.md +1 -0
- package/docs/reference/editors-text.md +2 -2
- package/docs/reference/editors-value-list.md +1 -1
- package/docs/reference/field-row.md +2 -2
- package/docs/reference/grid.md +8 -5
- package/docs/reference/panels-react.md +101 -0
- package/docs/reference/panels.md +123 -0
- package/docs/reference/react.md +39 -16
- package/docs/reference/selection.md +5 -5
- package/docs/reference/views.md +17 -12
- package/package.json +16 -6
- package/skills/views/SKILL.md +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,626 @@ All notable changes to `@viewkitjs/views`. `0.x`: the API may change between min
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.6.0] — 2026-11-18
|
|
8
|
+
|
|
9
|
+
The controls. Both panels doors ship: `@viewkitjs/views/panels`, what a list's panels read and say, built from its
|
|
10
|
+
settings with no React, and `@viewkitjs/views/panels/react`, the panels as they draw, the toolbar's frame, its parts
|
|
11
|
+
and `ReadyToolbar`, every panel opening as a sheet on a phone. Beside them: whole bodies an app draws for the
|
|
12
|
+
editors (`TextBody`, `NumberBody`, `PartsBody`, `ValuesBody`), the grid drawn with your own checkboxes, buttons and
|
|
13
|
+
avatars, a field row drawn with your own checkbox and buttons, a grid that shows one page at a time with its pager
|
|
14
|
+
(`pages`), a place column sorted by its parts, and country names in the reader's names language. It needs
|
|
15
|
+
`@viewkitjs/fields` 0.13.
|
|
16
|
+
|
|
17
|
+
What an app changes when it takes this version:
|
|
18
|
+
|
|
19
|
+
- **Install `@viewkitjs/fields` 0.13** beside it: the peer is `^0.13.0`, for the conventions' names language
|
|
20
|
+
(Changed).
|
|
21
|
+
- **Five new atoms**, `Avatar`, `CellMore`, `Pill`, `RangeCalendar` and `ToolbarButton`: an adapter typed as the
|
|
22
|
+
whole `ViewsAtoms` maps each one or leaves it to the default (For an adapter).
|
|
23
|
+
- **Your icons map draws fifteen more glyphs**: an icons map typed `ViewsIcons` doesn't compile until it does (For
|
|
24
|
+
an adapter).
|
|
25
|
+
- **129 new message keys**, most of them `views.panels.*`. A resolver that falls back to `resolveViewsMessage` reads
|
|
26
|
+
them in English; one that words every message with a `switch` and no default, or a `ViewsMessages` override typed
|
|
27
|
+
over every key, must word them (For an adapter).
|
|
28
|
+
- **The drawn panels need dnd-kit.** `@dnd-kit/core`, `@dnd-kit/sortable` and `@dnd-kit/utilities` are optional peers,
|
|
29
|
+
reached only through `@viewkitjs/views/panels/react`: install them to use it. An app that takes only the grid
|
|
30
|
+
installs none of them.
|
|
31
|
+
- **On a phone your `Sheet` receives the toolbar's panels and the views picker's list** (Changed, For an adapter).
|
|
32
|
+
- **Country and region names read the names language** instead of the locale (Changed).
|
|
33
|
+
- **Nothing is removed**: every name 0.5.0 exported is still exported. Every new provider and grid option
|
|
34
|
+
(`gridCheckboxes`, `gridButtons`, `fieldRowCheckboxes`, `fieldRowButtons`, `severalValues`, `bodyFrame`, `pages`,
|
|
35
|
+
`fillWidth`, `oneHeader`, `headerVerticalBorders` and the rest) is off by default and draws as 0.5.0 did.
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **`datePicks`** on the provider (`ViewsDatePicks`): the quick days the date editors offer, in order. The date
|
|
40
|
+
editor hands exactly these to an app's `DateBody` and its own panel draws the same; absent, today, tomorrow and
|
|
41
|
+
next Monday, as on 0.5.0. `ViewsDatePick` gains `in-a-week`, today + 7 on the local calendar, worded by
|
|
42
|
+
`date.in-a-week` ("In a week", `@viewkitjs/fields`). A `DateBody` that switches over `ViewsDatePick` with no
|
|
43
|
+
default must handle it (For an adapter).
|
|
44
|
+
|
|
45
|
+
- **`views.panels.sort-none`** ("None"): a list with no sort reads None on Customize's Sort row
|
|
46
|
+
(`sortValueLabel`), the way Group does, where it read a bare "asc". A resolver that words every message with a
|
|
47
|
+
`switch` and no default must word it (For an adapter).
|
|
48
|
+
- `ViewOptionsPanelContent` takes `closeButton` (default true): false draws no ✕ in its header while `onClose` still closes it from inside.
|
|
49
|
+
- `oneValue` on `ViewsProvider`: `{ email: "list", domain: "list" }` opens a field holding one email or one domain as
|
|
50
|
+
the value list holding one value (one line, no label, no main mark, no line to add another; × empties it), in the
|
|
51
|
+
grid and in a field row alike, where it opens the text box in its cell by default. It writes the same string the text
|
|
52
|
+
box writes, and a key typed on its cell starts its line. A phone and a link keep the text box. `ViewsOneValueEditors`
|
|
53
|
+
is its type, from `@viewkitjs/views/react`.
|
|
54
|
+
- `ValueListEditor` takes optional `holds` (`"one"` or `"several"`, the default) and `seed` (what was typed on what
|
|
55
|
+
opened it: the first line starts as it).
|
|
56
|
+
- `TextBody`, an optional slot in the components map for a whole body your app draws for a field typed as one string: a
|
|
57
|
+
line of text, an email, a phone, a link, a domain, long text or rich text. Handed one, the grid's and a field row's
|
|
58
|
+
text editors open it. It is handed the field's name (`label`), its text type (`kind`), whether it is a paragraph
|
|
59
|
+
(`paragraph`), the draft (`value`), the host's own reading of a value (`check`), a phone's country (`region`), what was
|
|
60
|
+
typed on what opened it (`typed`, already the draft), `autoFocus` and `form`, and hands back `onValueChange` and
|
|
61
|
+
`onDone`. The editor keeps the draft, Escape's keep or throw-away by field type, Tab, ⌘ or Ctrl Enter, the close's
|
|
62
|
+
tidy, the write check and the save, and draws the reason a value is refused. Left out, the text editors draw their own
|
|
63
|
+
box as before.
|
|
64
|
+
- `ViewsTextBodyProps`, from `@viewkitjs/views/react`. `TextEditor` takes optional `check`, `region`, `escapeKeeps` and
|
|
65
|
+
`form`, handed to a text body; the grid's text editor takes optional `paragraph` and `region`; `gridTextOpensBox`
|
|
66
|
+
takes an optional third argument, `inCell`.
|
|
67
|
+
- `NumberBody`, an optional slot in the components map for a whole body your app draws for a number, money or a percent.
|
|
68
|
+
Handed one, the grid's and a field row's number editors open it: in the grid cell on a computer, lifted over the rows
|
|
69
|
+
below and the frozen columns, in the sheet on a phone, and in place in a field row at every width. A number formatted
|
|
70
|
+
as a duration keeps the editor's own box. It is handed the field's name (`label`), its kind (`kind`: `number`, `money`
|
|
71
|
+
or `percent`; a percent is stored 0 to 100), the draft (`value`), its unit and the units it may be put in (`unit`,
|
|
72
|
+
`units`: money's currency code, or a number's unit), the digits the field keeps (`decimals`), its limits (`min`,
|
|
73
|
+
`max`), how your people write a number (`locale`, `decimal`), whether it may be emptied (`empty`), where the figure
|
|
74
|
+
stands (`align`), what was typed on what opened it (`typed`), `autoFocus`, `form` and `check`, the host's own reading
|
|
75
|
+
of a value. It hands back `onValueChange` and `onDone`. The editor keeps the draft, rounds it to `decimals`, keeps
|
|
76
|
+
Escape's keep or throw-away by field type, Tab, the write check and the save, and draws the reason a value is refused.
|
|
77
|
+
Left out, the number editors draw their own box as before.
|
|
78
|
+
- `ViewsNumberBodyProps`, from `@viewkitjs/views/react`. `NumberEditor` takes optional `type`, `label`, `min`, `max`,
|
|
79
|
+
`check`, `escapeKeeps`, `closeOnBlur` and `form`, handed to a number body.
|
|
80
|
+
- `PartsBody`, an optional slot in the components map for a whole body your app draws for a field made of parts: a
|
|
81
|
+
name, a place or a range, told apart by `kind`. Handed one, the name, place and range editors open it in the grid and
|
|
82
|
+
in a field row. Every kind is handed the field's name (`label`), whether it may be emptied (`empty`), what was typed on
|
|
83
|
+
what opened it (`typed`, already the first part's value where it reads as one), `autoFocus` and `form`, and hands
|
|
84
|
+
back `onValueChange` and `onDone`.
|
|
85
|
+
- A name is handed `{ given, family, full }`, `full` as the editor's rule shows it: it follows the parts until a
|
|
86
|
+
name of its own is typed, and a name stored written another way ("Nagy Imre") stays as it is.
|
|
87
|
+
- A place is handed its parts, the boxes the field takes (`parts`) and those boxes in the country's own order
|
|
88
|
+
(`rows`), each box's words for that country (`words`), the boxes it asks for (`required`), every country by name
|
|
89
|
+
where the field takes the country (`countries`), the country's regions once loaded (`regions`), and
|
|
90
|
+
`opens: "countries"` where the place has no country yet.
|
|
91
|
+
- A range is handed its two ends, the `decimals` the editor rounds to as it closes, its `unit` and its `bands`.
|
|
92
|
+
The editor keeps the draft, the full name's rule, the region's code, Escape's keep or throw-away by field type, Tab,
|
|
93
|
+
the write check and the save and, on a phone, the panel's ✕ and ✓. Left out, the three editors draw as before.
|
|
94
|
+
- `ViewsPartsBodyProps`, `ViewsPlacePart` and `ViewsPlaceParts`, from `@viewkitjs/views/react`. `NameEditor`,
|
|
95
|
+
`LocationEditor` and `RangeEditor` take an optional `label`, the field's name for your body.
|
|
96
|
+
- `ValuesBody`, an optional slot in the components map for a whole body your app draws for a field holding several
|
|
97
|
+
emails, phones, links or domains. Handed one, the value list editor opens it in the grid and in a field row, in a
|
|
98
|
+
popover under the values on a computer and the sheet on a phone. It is handed the field's name (`label`), its type
|
|
99
|
+
(`kind`: `email`, `phone`, `url` or `domain`), the draft as lines (`{ value, label?, main }`, `[]` when there are
|
|
100
|
+
none), whether a value carries a label (`labels`), whether the field holds one value or several (`holds`), a phone's
|
|
101
|
+
country (`region`), whether it may be emptied (`empty`), what was typed on what opened it (`typed`), `autoFocus`,
|
|
102
|
+
`form`, and `check`, the field's own reading of a value. It hands back `onValueChange` and `onDone`. The editor keeps
|
|
103
|
+
the draft, which value is kept as stored, Escape's keep or throw-away by field type, Tab, the write check, the save
|
|
104
|
+
and, on a phone, the panel's ✕ and ✓. Left out, the value list editor draws its own rows as before.
|
|
105
|
+
- `ViewsValuesBodyProps` and `ViewsValueLine`, from `@viewkitjs/views/react`. `ValueListEditor` takes an optional
|
|
106
|
+
`label`, the field's name for your body.
|
|
107
|
+
- Three message keys, each a reason a disabled row hands your `Menu`: `views.menus.range-not-clearable` ("Nothing in this selection can be emptied"), `views.menus.add-column-all-shown-reason` ("No hidden column to add") and `views.menus.loading` ("Wait for current data before editing").
|
|
108
|
+
- `bodyFrame`, an optional provider setting (`ViewsBodyFrame`, `"views"` or `"popover"`, default `"views"`): who sets the
|
|
109
|
+
width and padding of the popover around a whole body your app hands, its `Picker`, `PartsBody` or `ValuesBody`, in the
|
|
110
|
+
grid and a field row alike. At `"views"` nothing changes: the popover keeps the widths ViewKit gives its own lists,
|
|
111
|
+
whether or not you hand a body. At `"popover"` an editor that opens your body hands its popover no width and no
|
|
112
|
+
padding of ViewKit's, only its layer (and, in a field row, a cap at the screen's width less 2rem), so your `Popover`
|
|
113
|
+
stands at its own width; and it marks the popover with the body it holds, `data-vk-body` (`picker`, `parts` or
|
|
114
|
+
`values`), through `panelData`. A width is set here rather than by a variable because a whole body's width is not one
|
|
115
|
+
number: a pick list, a place's parts and a value list each want their own.
|
|
116
|
+
- `ViewsBodyFrame`, from `@viewkitjs/views/react`.
|
|
117
|
+
- `@viewkitjs/views/panels/react`: the panels as they draw, each under your `ViewsProvider`, with the client directive. It holds the filter panel: a body per filter type (`TextFilterBody`, `NumberFilterBody`, `RangeFilterBody`, `RelationFilterBody`, `DateFilterBody` with `DateFilterFields`, `useDateFilterEditor`, `DateFilterCalendar` and `DateFilterInput`), the filter list (`CompactFilterList`, `dimensionRows`, `FilterSectionHeading`, `FilterIcon`) and the details (`CompactFilterDetail`, `CompactToggleDetail`, `CompactDateRangeDetail`, `CompactTimeScopeDetail`). `@viewkitjs/views/panels` stays the pure door, which a server file may read.
|
|
118
|
+
- The `RangeCalendar` atom: the filter panel's month, a day or a range in ISO days, marked `data-slot="vk-range-calendar"`. The default is your components map's one-day `Calendar` on the end being picked.
|
|
119
|
+
- Four icon names: `filter`, `filterStatus`, `filterCategory` and `filterMetric`, a filter row's glyphs.
|
|
120
|
+
- The filter panel's words as `views.panels.*` keys: its placeholders, the bounds, a relation's choices, the toggle's On and Off, the date's boxes, its relative note and its menus' names.
|
|
121
|
+
- The panels' words: `views.panels.search`, `group-by`, `sort`, `date-by`, `hide-empty-groups`, `groups`, `groups-hide-all`, `groups-show-all`, `group-remove`, `group-empty`, `move`, `show`, `hide`, `columns-reset`, `column-visible`, `new-line-first`, `new-line-on`, `new-line-start`, `layout-options`, `layout-density` and `personal-reset`. The Sort, Group, Layout and Columns panels that say them, and the Columns list's and the group order's drag, come with the controls' release.
|
|
122
|
+
- `@viewkitjs/views/panels/react`, a client door for the panels as they draw, the one that reaches dnd-kit; `@viewkitjs/views/panels` stays pure, so a server file may import it. Both panels doors come in the release that publishes the panels.
|
|
123
|
+
- The views row in `@viewkitjs/views/panels/react`: `PillGroup` (a row of pills that drags with dnd-kit by the mouse and the keyboard), `ViewTabs`, `HScrollRow`, `FoldingViewRow` (the row that folds what doesn't fit into "+N"), `ViewPicker` and `ViewPickerRow`, `ViewCreatePill` and `ViewAxes`; the axes they draw in `@viewkitjs/views/panels` (`ViewTabOption`, `CollectionViewsConfig`, `CollectionViewsInput`, `CollectionChildAxis`, `ViewsLayout`, `PillOption`, `toViewAxes`, `splitViewAxes`). A view's verbs are the package's menu rows, opened through your `Menu`; its glyph is your own icon's name, drawn by your `AppIcon`.
|
|
124
|
+
- The `Pill` atom, with a plain default marked `data-slot="vk-pill"`.
|
|
125
|
+
- The views row's dress hooks: `data-slot="vk-views-row"`, `"vk-views-more"`, `"vk-views-chip"` and `"vk-views-add"`.
|
|
126
|
+
- One icon name, `moreVertical`; one optional colour, `--vk-selected` (falls back to `--vk-neutral`); two optional layout names, `--vk-scroll-row-inset` and `--vk-scroll-row-end`.
|
|
127
|
+
- Fifteen `views.panels.*` keys for the row's words, from `views.panels.view-private` to `views.panels.view-menu`.
|
|
128
|
+
- The Customize panel's words: `views.panels.customize-title`, `back`, `close`, `clear-all`, `filter`, `layout`, `columns`, `columns-shown`, `column`, `group`, `view-publish`, `view-reset`, `view-stale`, `copy-link`, `export-csv`, `share`, `coming-soon` and `loading`. The panel that says them comes with the controls' release.
|
|
129
|
+
- `CollectionExportCsv` in the panels' pure door: a list's export, its count and its run.
|
|
130
|
+
- Customize behind the drawn panels' door: `ViewOptionsPanelContent`, `PopoverRootList`, `ViewFooter`, `ViewOptionsActions`, `ViewOptionsPopoverPanel`, `useViewOptionsPopover`, `useViewActivePanel`, `viewOptionsPopoverClassName` and `keepPanelOpenForPortals`.
|
|
131
|
+
- `leave` on `useAnchoredEditSession`: `"outside"` asks a session still open when its page or its surface goes as for a
|
|
132
|
+
press outside; `"discard"`, the default, asks nothing. A host of your own asks nothing of an editor still open;
|
|
133
|
+
pass `leave: "outside"` to have it asked. On every host, an answer already given and waiting out its exit is
|
|
134
|
+
finished at once when the page or the surface around it goes (its `onClose`, or in the deferred mode its `onDone`,
|
|
135
|
+
runs then instead of after the gap). `onLeave`, in the admitted mode, is called first.
|
|
136
|
+
- **The panels built from a list's settings** (`@viewkitjs/views/panels`). `settingsPanels({ settings, layer, columns, onChange, onLayerChange })` takes a `ListSettings`, a person's
|
|
137
|
+
`ListPersonalLayer` and the list's columns, and returns the Filter rows, Sort, Group, the grid header's Group by and
|
|
138
|
+
the Layout panel. Each change comes back as a `ListSettingsChange` over the settings, or as a layer patch (a width,
|
|
139
|
+
the folded groups, the phone's layout), so a list kept as settings never speaks `ListViewPrefs`. Each panel is also
|
|
140
|
+
its own builder (`settingsFilters`, `settingsSort`, `settingsGroup`, `settingsGroupBy`, `settingsLayout`), beside the
|
|
141
|
+
translations they stand on (`columnStateOf`, `columnsChangeOf`, `seenLook`, `lookChange` and their siblings).
|
|
142
|
+
- **`useGridTableSettings`** on `@viewkitjs/views/grid`: the grid's props from a list's settings and a person's layer,
|
|
143
|
+
as `useGridTablePrefs` gives them from a prefs blob. A column hidden, moved or given a figure comes back as a
|
|
144
|
+
`ListSettingsChange`; a resize as the person's width. How the fields read stays yours, as `GridFormatPrefs`.
|
|
145
|
+
- The toolbar in `@viewkitjs/views/panels/react`: `Toolbar`, a frame that places the parts you hand it at the start or the end, on one line or two, in three forms — one row, a narrow panel for a box under 700px (the search on its own line, the views under it) and the phone's one row — decided by its own box and your provider's `desktopQuery`, or by you (`phone`, `narrow`). Its parts: `ToolbarViews` (the views row or its picker, the stacked axes on the second line, a chip per axis on a phone, and Show counts), `ToolbarSearch` (a button that opens an inline field, or a field that fills its line; Escape and ✕ clear it; drawn through your `Input`), `ToolbarNew` (one verb, or a menu of several through your `Menu`, drawn disabled on the row where a list can't add) and any node of your own. `useToolbarSlot` tells a part where it stands; `useToolbarPanel` makes a part's menu, panel or pane one of the toolbar's, so opening one closes every other; `ToolbarButton` draws the button atom at the line's size.
|
|
146
|
+
- The toolbar's arrangement in `@viewkitjs/views/panels`: `toolbarForm`, `arrangeToolbar`, `ToolbarForm`, `ToolbarPlacement`, `ToolbarLine`, `ToolbarSlot`, `TOOLBAR_NARROW_BELOW`; and what the toolbar owns over a list's settings: `withCounts`, `countsToggle` and `SHOW_COUNTS_KEY` (the toolbar's own Show counts), `groupShown` (no Group on a board). Both panels doors come in the release that publishes the panels.
|
|
147
|
+
- The `ToolbarButton` atom, with a plain default marked `data-slot="vk-toolbar-button"`: a glyph in a circle, its word for a dress (`data-slot="vk-toolbar-word"`, hidden by default), a count (`data-slot="vk-toolbar-count"`) that becomes a ✕ badge with `onClear`, a dot (`data-slot="vk-toolbar-dot"`), and the states `data-open`, `data-changed`, `data-edge` and `data-disabled`.
|
|
148
|
+
- The toolbar's dress hooks: `data-slot="vk-toolbar"` (with `data-form`), `"vk-toolbar-line"` (with `data-line`), `"vk-toolbar-cluster"`, `"vk-toolbar-search"` (with `data-expanded`), `"vk-toolbar-search-field"`, `"vk-toolbar-search-clear"` and `"vk-toolbar-new"`.
|
|
149
|
+
- Three `views.panels.*` keys: `views.panels.show-counts`, `views.panels.toolbar-new` and `views.panels.toolbar-clear`.
|
|
150
|
+
- The ready toolbar in `@viewkitjs/views/panels/react`: `ReadyToolbar` takes a list's `ListSettings`, a person's `ListPersonalLayer` and the list's columns (the builder's input), calls the builder, and draws the views on the left; search, sort, filter, options and new on the right. Every change comes back as a `ListSettingsChange` or a layer patch; its search writes the settings' search; the active view's menu gains "Edit view…", which opens Customize; its ✕s clear in one change. It holds its panels' state above its frame, so a change of form keeps a panel open on its page. `useListSettingsState` holds a list's settings and layer in memory, ready to spread into it.
|
|
151
|
+
- The panel parts: `ToolbarOptions` (Customize behind its own button, with the count and its ✕, or the drift dot on a shared view), `ToolbarSort` (the sort panel, lit while the list sorts other than its default) and `ToolbarFilter` (the filter list and its drill-ins standing alone, with the count and its ✕). Each takes the builder's panels and opens in your `Popover`, or in a host you hand in (`ToolbarPanelHost`: your side drawer, your sheet). `useToolbarPanelState` holds a part's open state and page for your app; `FilterPanelContent` is the Filter panel for a host of your own.
|
|
152
|
+
- In `@viewkitjs/views/panels`: `withEditView` (a row at the head of the active view's menu) and `settingsCleared` (a toolbar ✕ over a list's settings as one change, folded through the builder).
|
|
153
|
+
- The panel parts' dress hooks: `data-slot="vk-toolbar-options"`, `"vk-toolbar-sort"`, `"vk-toolbar-filter"`, and their popovers' `"vk-toolbar-options-panel"`, `"vk-toolbar-sort-panel"` and `"vk-toolbar-filter-panel"` through your `Popover`'s `panelData`.
|
|
154
|
+
- Two `views.panels.*` keys: `views.panels.toolbar-options` and `views.panels.edit-view`.
|
|
155
|
+
- `gridCheckboxes` on `ViewsProvider` (`ViewsGridCheckboxes`, `"own" | "checkbox"`, default `"own"`): who draws a yes/no
|
|
156
|
+
cell's box in the grid, the checkbox style. Left out, ViewKit draws its tick box in its own switch button, exactly as
|
|
157
|
+
before. Set to `"checkbox"`, your `Checkbox` draws it, the same box your rail draws on the row: it stands alone in the
|
|
158
|
+
cell, handed `checked`, the column's name as `aria-label`, `tabIndex` -1 and `onCheckedChange`, and one press writes
|
|
159
|
+
the value once. Enter on the cell still flips it, through the grid. A cell the grid can't write (a locked column, a
|
|
160
|
+
read-only list) is handed `readOnly` and a press that writes nothing. The `icon`, `text` and `marker` styles are as
|
|
161
|
+
they were.
|
|
162
|
+
- `ViewsCheckboxProps.readOnly`, optional: shown as it is and not pressable, unlike `disabled`, which greys it.
|
|
163
|
+
- `DisplayOptions.booleanCheckbox` and `GridCellOptions.booleanCheckbox` (`ComponentType<ViewsCheckboxProps>`), both
|
|
164
|
+
optional: a checkbox control the checkbox style draws alone in place of the tick box and its switch, handed `checked`,
|
|
165
|
+
the field's label, `tabIndex` -1 and `onCheckedChange` (or `readOnly` without `onToggle`). The grid hands the
|
|
166
|
+
components map's `Checkbox` here while `gridCheckboxes` is `checkbox`; a surface of your own that draws a yes/no can
|
|
167
|
+
hand it too. A slot that owns the click (`slotOwnsClick`) keeps the tick box.
|
|
168
|
+
- `gridButtons` on `ViewsProvider` (`ViewsGridButtons`, `"own" | "button"`, default `"own"`): who draws the buttons the
|
|
169
|
+
grid draws itself, a group's fold and ⋯, "+ Add column", a row's ⋯, the name's actions (the pencil and your
|
|
170
|
+
`rowActions`), an action column's buttons and a pick-list cell's ▾. Left out, ViewKit draws its own, exactly as
|
|
171
|
+
before. Set to `"button"`, your `Button` draws them, so they take your pointer, hover, press and focus ring: the grid
|
|
172
|
+
hands `variant` `"ghost"` (`"outline"` for the name's actions), `size` `"icon"` (`"sm"` for "+ Add column") and its
|
|
173
|
+
box in `className` (the size, the place in the row or cell, and the reveal on hover); the look is yours. Each keeps
|
|
174
|
+
its name, its place, what it opens and its tab order.
|
|
175
|
+
- `ViewsButtonProps` takes six optional props more, which the grid hands its own buttons with `gridButtons: "button"`:
|
|
176
|
+
`ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`.
|
|
177
|
+
- "+ Add column" carries `data-open` (present, no value) while its menu is open, whatever `gridButtons` says, so a
|
|
178
|
+
skin can dress it as it dresses a header cell whose menu is open.
|
|
179
|
+
- **Your Avatar in a chip and before the name.** A new atom, `Avatar` (`ViewsAvatarProps`), draws a person's or a
|
|
180
|
+
record's picture: a user's, a relation's and an actor's chip draw it at `size="chip"`, handed `label`, `avatarUrl`,
|
|
181
|
+
`kind` (a relation's `entity`, `user` for a member, an actor's type) and `fallback`, the glyph the chip drew
|
|
182
|
+
before. Hand your own through the provider's `atoms` to draw initials on a tone, or a record in its own shape;
|
|
183
|
+
return `fallback` for a kind you don't dress. Hand none and every chip draws as before: the picture while it
|
|
184
|
+
loads, the glyph otherwise.
|
|
185
|
+
- **The row's picture before its name.** `ListRowIcon` takes an optional `avatar`, a `ListRowAvatar`
|
|
186
|
+
(`{ label, avatarUrl?, kind? }`): the grid draws it through `Avatar` at `size="glyph"`, sized by `--vk-glyph`,
|
|
187
|
+
with the row's `icon` as its fallback.
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
rowIcon: (row) => ({ icon: "building", avatar: { label: row.name, avatarUrl: row.logo, kind: "company" } })
|
|
191
|
+
```
|
|
192
|
+
- The grid's record names are a named part, `vk-grid-title`: the words in a title cell that open the row. Your app
|
|
193
|
+
styles them at rest and under the pointer with a rule on `[data-slot="vk-grid-title"]`, written outside any CSS layer
|
|
194
|
+
or in a layer after `utilities`, for example a name underlined at rest. A rule that colours the name at rest wins
|
|
195
|
+
under the pointer too, so write its `:hover` as well. With no rule the names look as before, and
|
|
196
|
+
`GRID_TITLE_LINK_CLASS` dresses them as it did. A title drawn outside the grid carries no part.
|
|
197
|
+
- **A footer figure's parts, and an empty footer cell's state.** A figure's kind and its value are parts of their own,
|
|
198
|
+
`vk-grid-figure-label` and `vk-grid-figure-value` (the value's suffix inside it), and the offer an empty footer cell
|
|
199
|
+
shows under the pointer is `vk-grid-figure-pick`, on a cell that now carries `data-empty`. A figure your own
|
|
200
|
+
`renderAggregate` draws sits in `vk-grid-figure-value`, with no kind. So you can draw a figure value first, then
|
|
201
|
+
its word in sentence case, and dress the offer:
|
|
202
|
+
|
|
203
|
+
```css
|
|
204
|
+
[data-slot="vk-grid-figure-value"] { order: -1; }
|
|
205
|
+
[data-slot="vk-grid-figure-label"],
|
|
206
|
+
[data-slot="vk-grid-figure-pick"] { text-transform: none; letter-spacing: normal; }
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The offer's words are still `views.grid.figure-pick` ("Calculate"); answer it with "Add calculation" to word it
|
|
210
|
+
so. Styling none of these, the footer draws as before.
|
|
211
|
+
- `fillWidth` on `GridTable` (off by default): the columns share the grid's whole width, each growing in proportion to
|
|
212
|
+
its own width and never below it. A column the person resized keeps its width and the others take the rest; a
|
|
213
|
+
column that declares `grid.maxWidth` keeps its own. A table already wider than the grid is unchanged and scrolls
|
|
214
|
+
sideways. Off, every column stands at its own width, as before.
|
|
215
|
+
- `severalValues` on `ViewsProvider` (`ViewsSeveralValues`, `"first" | "fit"`, default `"first"`): how a cell of several
|
|
216
|
+
values draws on one line, a multiselect's options, several emails, phones, links or domains, several records, a
|
|
217
|
+
lookup's names or places. Left out, it draws its first value and a "+N" count at any width, exactly as before. Set to
|
|
218
|
+
`"fit"`, it draws as many whole values as fit the cell's width, then the count, and follows a column resize; when even
|
|
219
|
+
the first doesn't fit whole, it shows cut, then the count. A wrapped row shows three either way. Each cell measures
|
|
220
|
+
its values once, when it mounts or they change, and works out a resize from what it kept, so fitting redraws no row.
|
|
221
|
+
- The `CellMore` atom (`ViewsCellMoreProps`: `count`, and `inert` where the host owns the click): what the "+N" draws.
|
|
222
|
+
Hand your own to draw your count tag there.
|
|
223
|
+
- The count is marked `data-slot="vk-cell-more"`, and carries `data-open` (present, no value) while its list is open.
|
|
224
|
+
- A new state, `data-open` (`GRID_STATES`' `open`): a header cell carries it while its column's menu is open, and a
|
|
225
|
+
footer cell while its figure picker is open, on either menu route. It is present with an empty value, and absent
|
|
226
|
+
when the menu is closed. Both cells already say `aria-expanded` as they open.
|
|
227
|
+
- **One row of column names over a grouped grid.** `oneHeader` on `GridTable` draws a grouped grid with a single row
|
|
228
|
+
of column names, pinned at the top of its scroll area (`vk-grid-head`), in place of each group's own; each group's
|
|
229
|
+
bar pins under it, and the row's checkbox picks every row. While it is on, a group has no box of its own that picks
|
|
230
|
+
its rows. A bar's `data-stuck` works as before: it says the bar has left where it rests, wherever it pins. Off by
|
|
231
|
+
default: a grouped grid draws as before.
|
|
232
|
+
- **A folded group says so.** A group's box (`vk-grid-group`) carries `data-collapsed` while it is folded, a state
|
|
233
|
+
of the contract. With it you set the gap between groups yourself: each group after the first still stands `mt-5`
|
|
234
|
+
below the one before, and a rule on the slot and the state, written outside any CSS layer or in a layer after
|
|
235
|
+
`utilities` so it wins over the class, changes it. To stand the group after a folded one right under it:
|
|
236
|
+
|
|
237
|
+
```css
|
|
238
|
+
[data-slot="vk-grid-group"][data-collapsed] + [data-slot="vk-grid-group"] {
|
|
239
|
+
margin-top: 0;
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Handed no rule, nothing moves.
|
|
244
|
+
- **`data-stuck` is a state of the contract.** A pinned head (`vk-grid-head`, `vk-grid-group-head`) carries
|
|
245
|
+
`data-stuck` while content passes under it, for a shadow or a ground of your own. When present its value is
|
|
246
|
+
`"true"`, as before, so `[data-stuck]` and `[data-stuck="true"]` both match.
|
|
247
|
+
- **Select all in group, from a group's ⋯.** Name `"select"` in `groupMenu` and, on a grid with a `selection`, each
|
|
248
|
+
group's ⋯ menu leads with Select all in group, on the `popover` route and the `menu` route alike. It picks every
|
|
249
|
+
row of the group (the rest of them, when some are picked), and reads Deselect all in group and clears them once
|
|
250
|
+
all are picked. It is how a grid with one row of column names over its groups (`oneHeader`), whose groups have no
|
|
251
|
+
box of their own, picks a whole group. Its words are `views.menus.group-select` (`{ selected }`). Left out of
|
|
252
|
+
`groupMenu`, the menu is as before. `GridGroupMenuPart` gains the member `"select"`: a `switch` over it that
|
|
253
|
+
names every part needs a case for it.
|
|
254
|
+
- The grid writes its contract's twelve states (`GRID_STATES`, the contract's States), each on the part the
|
|
255
|
+
contract names while it holds, and absent when it doesn't:
|
|
256
|
+
- on a body cell: `data-focused`, `data-editing`, `data-in-range`, `data-range-edge`, `data-pending`,
|
|
257
|
+
`data-invalid`, `data-empty`, `data-frozen`;
|
|
258
|
+
- on a row: `data-selected` (the row is checked);
|
|
259
|
+
- on a header cell: `data-frozen`, and `data-dragging` while it is dragged;
|
|
260
|
+
- on the grid's frame (`vk-grid`): `data-empty` (no rows), `data-scrolled` (the table has scrolled sideways) and
|
|
261
|
+
`data-parked` (the identity columns are parked behind the frozen band).
|
|
262
|
+
- A flag is present with an empty value; `data-range-edge` carries the cell's outer edges of the range, in the order
|
|
263
|
+
`top right bottom left`.
|
|
264
|
+
- `--vk-selection-edge`, an optional colour: the line over the first picked row of a run and under every picked row.
|
|
265
|
+
Undeclared it is `--vk-brand`, so picked rows look as before. Declare it `transparent` on the grid or an ancestor
|
|
266
|
+
and a picked row keeps its ordinary line, drawn by its tint alone; the brand stays on everything else in the row,
|
|
267
|
+
its focus ring and its checkbox included.
|
|
268
|
+
- `--vk-head-glyph-fg`, an optional colour (`VK_OPTIONAL_COLOURS`): the colour of the column glyphs the grid draws in
|
|
269
|
+
its header (a field's or a type's, a binding's `AppIcon`). Undeclared, they take the header's words' colour, as
|
|
270
|
+
before, so an app can now darken the words and keep the glyphs quiet.
|
|
271
|
+
- **The cell outlines take your corners and your colours.** The line of the cell under the pointer and the picked
|
|
272
|
+
cell's ring now read four variables you may declare:
|
|
273
|
+
- `--vk-outline-radius`, the corners of both. Undeclared, it is your Tailwind small radius, exactly what
|
|
274
|
+
`rounded-sm` drew, so nothing moves. Declare `0` and a picked cell and a hovered cell are both straight.
|
|
275
|
+
- `--vk-outline-hover`, the hovered cell's line (undeclared, `--vk-border-bold`).
|
|
276
|
+
- `--vk-outline`, the picked ring at rest (undeclared, `--vk-fg-subtle`).
|
|
277
|
+
- `--vk-outline-active`, the picked ring under the pointer or while editing (undeclared, `--vk-border-brand`).
|
|
278
|
+
|
|
279
|
+
`--vk-outline-radius` joins `VK_OPTIONAL_LAYOUT`; the three colours join `VK_OPTIONAL_COLOURS`. The hover is
|
|
280
|
+
still pure CSS: nothing renders as the pointer moves.
|
|
281
|
+
- **Your StatusBadge knows where its status stands.** `ViewsStatusBadgeProps` gains an optional `place`, a
|
|
282
|
+
`ViewsStatusPlace` (`{ index, options }`): the field's active options in their order, archived ones out, and this
|
|
283
|
+
option's index in them. A cell, the select editor's rows and the selection bar's options verb hand it, the same
|
|
284
|
+
list for the same field everywhere, so a value gets the same place in each. Read it to show how far along a step
|
|
285
|
+
is (a stage's progress). A stray value, an archived one, the None row and a badge that is no option (a boolean's
|
|
286
|
+
marker, `StatusMarker`) are handed none, and ViewKit's own badge draws as before.
|
|
287
|
+
- **`SelectEditor` takes `steps`**, the field's steps its badges are placed among (`statusSteps(field)` in the
|
|
288
|
+
grid and a field row). Left out, its badges carry no place.
|
|
289
|
+
- `headerVerticalBorders` on `GridTable` (off by default): the header's columns follow `verticalBorders` as the rows'
|
|
290
|
+
do, a line on the right of each column but the last. Off, the header draws no line between its columns, as before.
|
|
291
|
+
- `MenuRow` and `ToggleRow` take an optional `disabledReason`. The defaults show it in your `Tooltip` once the pointer rests on a disabled row, as `RadioRow` already does.
|
|
292
|
+
- A filter row (`FilterConfig`) takes an optional `disabledReason`, shown on its disabled row.
|
|
293
|
+
- Four message keys, each the reason a disabled panel control gives: `views.panels.filter-not-offered` ("This column can't be filtered"), `views.panels.column-always-shown` ("This column always shows"), `views.panels.column-last-shown` ("One column must stay shown") and `views.panels.new-line-hidden` ("A hidden field isn't on the card").
|
|
294
|
+
- A selection verb (`SelectionVerbItem`, a group and `SelectionOptionsVerb`) takes an optional `disabledReason`, why it is disabled in the person's words. More's rows hand it to your `Menu`, the bar's own button shows it in your `Tooltip`, and the phone's default sheet draws it under the row. A group's rows that give no reason of their own carry the group's. While a batch runs (`busy`), no reason shows.
|
|
295
|
+
- `gridButtons: "button"` now also reaches a command cell's ▾ and its trigger: the ▾ beside a relation, user, link,
|
|
296
|
+
email, phone or domain is your `Button` (`ghost`, `icon`, a 20px box), and the trigger around any other value is your
|
|
297
|
+
`Button` (`ghost`, `sm`) holding the value and its ▾, its `className` keeping the value's line and the cell's own type
|
|
298
|
+
(`[font:inherit]`): your `Button` brings the pointer, hover, press and focus, never the text's size or weight. Each is
|
|
299
|
+
handed the column's name as `aria-label`. Left at `own`, both are ViewKit's own, exactly as before.
|
|
300
|
+
- `chip` on `ViewsProvider`'s `selectionBar` (`ViewsSelectionChip`, `"own" | "button"`, default `"own"`): who draws the
|
|
301
|
+
selection bar's count chip on the desktop. Set to `"button"`, your `Button` draws it, handed `variant` `"outline"`,
|
|
302
|
+
`size` `"sm"`, its box in `className`, `data-slot="vk-selection-chip"`, `aria-label` and `disabled` while a batch
|
|
303
|
+
runs; it stays inside your `Tooltip`. `gridButtons` has no say over it.
|
|
304
|
+
- Rich text's Show more and Show less, in a field row, carry `data-slot="vk-show-more"`.
|
|
305
|
+
- A place column's header sorts it by each of its parts: Sort ascending and Sort descending each open the place's parts (City, Region, Country, Postal code, or the ones its field holds), the part in force shown beside the row, and Clear sort while the column sorts by any of them. Both menu routes offer it, and the header's `aria-sort` says so.
|
|
306
|
+
- The Sort panel lists a place's parts as options of their own ("Address · City"), and shows a part sort the header picked.
|
|
307
|
+
- `columnSortParts(column, viewBacked)` lists the parts a column offers a sort by, and `sortPartOf(value, fieldKey, parts)` reads the part a sort value names for that column.
|
|
308
|
+
- `ToolbarSearch` and `ReadyToolbar` take `searching`. While it is true, a spinner stands where the search's glass is (on its button, and in its field on every form), and the field keeps its value and its typing, marked `aria-busy`. Your app decides when it is true, for a search that answers from a server.
|
|
309
|
+
- The word `views.panels.searching` ("Searching"), the spinner's name, and the slot `vk-toolbar-search-spinner`.
|
|
310
|
+
- `pages` on `GridTable` (absent by default): the grid shows one page of rows the app hands, and under it a pager, `vk-grid-pager`, with where you are (`26–50 of 213`, `of 1,000+` under a capped count), a page-size pick and Previous and Next. Its controls are your `Button`, the size pick your `Button` opening your `Menu`. Picks cover the page and clear when the page or its size changes; the footer shows only the figures you hand, so its totals cover the view; hand none and the footer is empty in pages, apart from your own `renderAggregate` cells. A grouped grid draws no pager and keeps each group's own "more". Absent, rows arrive as you scroll, as before.
|
|
311
|
+
- `fieldRowCheckboxes` on `ViewsProvider` (`ViewsFieldRowCheckboxes`, `"own" | "checkbox"`, default `"own"`): who draws a
|
|
312
|
+
field row's yes/no box, the checkbox style. Left out, ViewKit draws its tick box in its own switch button, exactly as
|
|
313
|
+
before. Set to `"checkbox"`, your `Checkbox` draws it, handed `checked`, the field's name as `aria-label` and
|
|
314
|
+
`onCheckedChange`, and no `tabIndex`, so it stays a Tab stop as the switch is; one press writes the value once. A row
|
|
315
|
+
the field row can't write is handed `readOnly`. A value inside the row's own button (a command field's verbs) keeps
|
|
316
|
+
the tick box. `gridCheckboxes` has no say over it.
|
|
317
|
+
- `fieldRowButtons` on `ViewsProvider` (`ViewsFieldRowButtons`, `"own" | "button"`, default `"own"`): who draws a field
|
|
318
|
+
row's own buttons, its edit target (around the value, beside a link's open action, under a rich text), the verb
|
|
319
|
+
trigger around a value, the lane's ▾ and rich text's Show more. Left out, each is ViewKit's own, exactly as before.
|
|
320
|
+
Set to `"button"`, each is your `Button`, `ghost`, `sm` (`icon` for the ▾), ViewKit's box in `className`: the
|
|
321
|
+
target's keeps the row's own type (`[font:inherit]`) and grows with a wrapped value. `gridButtons` has no say over a
|
|
322
|
+
field row.
|
|
323
|
+
- `ViewsButtonProps["aria-disabled"]`, optional: a field row's edit target holds its focus with it while a write is
|
|
324
|
+
pending.
|
|
325
|
+
|
|
326
|
+
### Changed
|
|
327
|
+
|
|
328
|
+
- **The peer is `@viewkitjs/fields` `^0.13.0`** (it was `^0.12.0`): the place cell, its editor and the country
|
|
329
|
+
filter read the conventions' names language that fields 0.13 brings.
|
|
330
|
+
- On a phone, the toolbar's Options, Sort and Filter parts open their panel in your `Sheet` instead of your `Popover`, full height, with every page the popover has (Customize's pages, a column's settings, a filter's drill-ins). A host you hand still takes the panel. Phone or desktop is the toolbar's form inside a `Toolbar` (its `phone` flag, else your provider's `desktopQuery`), and your `desktopQuery` outside one.
|
|
331
|
+
- On a phone, `ViewPicker` opens its list of views in your `Sheet`: inside a `Toolbar`, in its phone form; placed on its own, below your `desktopQuery`. If your shell switches to its desktop at another width, hand that query to the provider.
|
|
332
|
+
- With a `TextBody` handed, long text and a line the cell cut off open in the cell on a computer, the body standing in
|
|
333
|
+
it and lifted over the rows below and the frozen columns, rather than in the panel over the cell. A text opened only to
|
|
334
|
+
be read still opens the panel. On a phone the body stands in the sheet; in a field row, in place at every width.
|
|
335
|
+
- With a `PartsBody` handed, a range in the grid, and a name or a range in a field row, open in a popover under the
|
|
336
|
+
value on a computer and in the sheet on a phone, rather than in place, and the value stays on screen. Without one,
|
|
337
|
+
they open in place as before.
|
|
338
|
+
- On a phone, long text's and rich text's sheet frames its box and opens it three lines tall, growing to twelve, so an
|
|
339
|
+
empty one shows where to type: a border, rounded, and the brand ring while it can be typed in. A line the cell cut off
|
|
340
|
+
keeps its sheet as it was, and the panel over the cell on a computer is unchanged.
|
|
341
|
+
- This changes what your app sees: with an editor open, a route change, Back inside your app, a drawer you close or a
|
|
342
|
+
switch of views now calls your `onCellCommit` (or a field row's `onCommit`) with what the editor holds, where the
|
|
343
|
+
previous version dropped it; a reload or a closed tab calls it too.
|
|
344
|
+
- **A switch to Calendar fills the default date field** when the stored one is not a date column of the list
|
|
345
|
+
(`settingsLayout`), as the switch to Board already did for a field the list can't lay a board out by. A stored date
|
|
346
|
+
field the list draws is kept.
|
|
347
|
+
- **Group by's None and the grid header's Ungroup clear a set-aside group** (`settingsGroup`, `settingsGroupBy`): no
|
|
348
|
+
other control removes one, so they write `group: null` whenever the settings hold a group.
|
|
349
|
+
- **A head back at rest carries no `data-stuck`.** A head that had been stuck and came back to rest carried
|
|
350
|
+
`data-stuck="false"`; it now carries none, as a head that was never stuck didn't. A selector for a head at rest
|
|
351
|
+
changes:
|
|
352
|
+
|
|
353
|
+
```css
|
|
354
|
+
/* before */ [data-slot="vk-grid-group-head"][data-stuck="false"] { … }
|
|
355
|
+
/* after */ [data-slot="vk-grid-group-head"]:not([data-stuck]) { … }
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
A search of the apps known to run the package found nothing reading `data-stuck` but the package's own styles.
|
|
359
|
+
- The contract's `data-scrolled` and `--vk-scrolled` are described as what they always were: the table has scrolled
|
|
360
|
+
sideways.
|
|
361
|
+
- The panels' default rows and buttons now show why they are disabled, in your `Tooltip`: a column filter that can't be opened, the Visible switch and the eye of a column that always shows or is the last one shown, and the card's new-line button on a hidden or the first field. Each disabled control that has a reason sits inside a plain wrapper `span` the tooltip listens on, since a disabled control doesn't hear the pointer.
|
|
362
|
+
- The new-line button on the first field says "The first field already starts the card" through your `Tooltip` instead of the browser's own `title`.
|
|
363
|
+
- The relation chip a list's `onOpenRelation` makes pressable carries `data-slot="vk-relation-link"`, the part the
|
|
364
|
+
default `RelationLink` already carries, whatever the provider says. A skin rule you wrote on `vk-relation-link` now
|
|
365
|
+
also reaches that button.
|
|
366
|
+
- Every country and region name the package writes reads the conventions' names language (`conventions.language`, new in `@viewkitjs/fields`) instead of their locale: a place's cell, the place editor's country list and its regions, a country part column and its editor, and a place's country filter choices, named and ordered. Dates and numbers keep the locale. Conventions that state no `language` read as before.
|
|
367
|
+
- A country typed, pasted or filled into a country cell is read in the names language, then the locale, then English.
|
|
368
|
+
- The guides and the contract say when a server's refusal shows under `escape: "keep"`: the editor has closed by then,
|
|
369
|
+
as it has after Enter, so the refusal shows on the cell in the grid and under the row in a field row. A value the
|
|
370
|
+
editor or your app refuses on the spot still stays open with its reason. Nothing changes in how Escape behaves.
|
|
371
|
+
- The retry line under a field row's failed write carries `data-slot="vk-field-retry"`, whatever the provider says. It
|
|
372
|
+
stays ViewKit's own, as a note's disclosure (`data-field-note`) does: each is the sentence it says.
|
|
373
|
+
|
|
374
|
+
### Fixed
|
|
375
|
+
|
|
376
|
+
- **Every word the Filter, Sort and Customize panels draw is yours, and every number and date reads your
|
|
377
|
+
conventions.** A text or number row's "Any" and a text rule's summary (`filterValueLabel` now hands them the
|
|
378
|
+
conventions); the text, number, range and date operator menus (fields' `*FilterOperatorLabel`); a relative date's
|
|
379
|
+
direction and unit menus (fields' new `filter.relative-direction` and `filter.relative-unit`); a yes/no column's
|
|
380
|
+
choices (`views.panels.boolean-checked`, `views.panels.boolean-unchecked`, `views.panels.boolean-not`, and
|
|
381
|
+
`views.display.boolean` for a text display's fallback); a relation's Where field page title
|
|
382
|
+
(`views.panels.where-field-title`); a date range's days, in the conventions' locale (`dateRangeValueLabel` and
|
|
383
|
+
`timeScopeRowValueLabel` take the conventions as an optional third argument); a number box's starting text, with
|
|
384
|
+
your decimal; the views' and the export's counts, grouped in your locale; and a relation row's names, sorted in it.
|
|
385
|
+
A relation target may name its noun (`RelationFilterTarget.noun`), and without one its label is lower-cased in your
|
|
386
|
+
locale. With no words of yours, each reads as before.
|
|
387
|
+
- **The Filter panel the builder makes speaks your words and reads your conventions.** `settingsFilters` (and so
|
|
388
|
+
`settingsPanels` and `ReadyToolbar`) hands `resolve` and the new `conventions` input to the column rows and the
|
|
389
|
+
Related records rows, where it handed neither: part labels ("Address · Country"), a select row's empty summary
|
|
390
|
+
(`views.panels.filter-all-of`, where it wrote "All stage" in English) and a place's country choices, named in
|
|
391
|
+
`conventions.language`, now follow the app. `ReadyToolbar` hands the provider's conventions where you hand none. A
|
|
392
|
+
hidden column's rows sit under `views.panels.hidden-columns` and the relation rows under
|
|
393
|
+
`views.panels.related-records`, worded by your resolver; `buildRelationFilters` takes `messages` and `conventions`
|
|
394
|
+
for them. `HIDDEN_COLUMN_SECTION` stays, the heading's English.
|
|
395
|
+
- **The row menu's Cut, Paste and Clear follow the same rule as the keyboard.** On a yes/no cell, which ⌘X, ⌘V and Delete already write, the three are no longer disabled, and Clear unticks it. A column the keyboard never writes, a computed or a `command` one, keeps them disabled, even where it is hand-written with `editable: true`.
|
|
396
|
+
- An edit still open in the grid or a field row is no longer lost when its page goes (a reload, a closed tab, a removed
|
|
397
|
+
frame, Back to another document) or when the grid or the row goes while the page stays (a route change, Back inside
|
|
398
|
+
your app, a drawer you close, switching views). On a desktop the editor's draft is written as a press outside writes
|
|
399
|
+
it, and an answer already given and waiting out the editor's exit is written at once. In a phone's sheet nothing is
|
|
400
|
+
written, as when the sheet is swiped away. Escape still writes nothing, and so does the grid's own end of an edit
|
|
401
|
+
(Escape on the cell, a row that left the data). A value the grid refuses writes nothing: when the page goes nothing
|
|
402
|
+
is said, and when the grid goes while the page stays its reason is said in the toast port's `error`, as the grid says
|
|
403
|
+
a refusal left behind when a cell's editor goes. A field row says nothing either way. A grid or a row hidden by
|
|
404
|
+
`<Suspense>` or `<Activity mode="hidden">` above it counts as going.
|
|
405
|
+
- **The selection bar's More no longer opens an empty menu.** With four verbs or fewer nothing spills into More, so
|
|
406
|
+
it is drawn disabled in its usual place and opens nothing; with five or more it opens the extra verbs as before.
|
|
407
|
+
- **One Escape that closes a menu no longer clears the selection too.** `useEscapeToClear` skips an Escape something
|
|
408
|
+
open already took: a menu or popover that closes on the key marks it handled with `preventDefault`, as Radix and
|
|
409
|
+
Base UI both do. The next Escape clears the selection.
|
|
410
|
+
- **Sort's and Group by's search keep a filter search's inset.** Their search field sits in the same well as a
|
|
411
|
+
filter's (`data-vs-inset`), so a host that insets its panel rows by that attribute insets the search with them, and
|
|
412
|
+
the popover gives both the same padding.
|
|
413
|
+
- **A filter with no options says so.** A several-values filter, or a one-value filter without its All row, whose
|
|
414
|
+
option list is empty shows "Nothing to pick." in place of an empty box.
|
|
415
|
+
- A Filter or Options part you place yourself, handed the builder's rows and no `onClear`, now clears every active filter on its ✕; it used to clear only the last of several. The builder's filter rows of one build now add up: several writes through them hand changes that build on each other, the last carrying them all. `settingsCleared` still gives the clear as one change.
|
|
416
|
+
- A lookup column whose far field is a place now offers a sort only by the parts that place keeps (its `parts`), following a chain of lookups to its end, as a place column already did. It used to offer city, region, country and postal code whatever the far field kept.
|
|
417
|
+
- A place's Filter part rows are only the parts it keeps (its `parts`, or a lookup's far field's, through a chain of lookups), as its sorts are. A place keeping `city` and `countryCode` offered Region and Postal code rows that filtered nothing. A rule on a part the place doesn't keep has no opinion on a row, as a part no row offers already had, and the panel conversions (`filterPanelFromTree`, `rootRulesByColumn`) keep it in the rest instead of reading it into a row. A place naming no parts offers all four, as before.
|
|
418
|
+
- A grid that a layout move shifts while it shows (a pager moving its track by less than a screen, a transform, a
|
|
419
|
+
slide that ends on screen), or that slides into view from off screen, draws the rows it now shows. It used to keep
|
|
420
|
+
the rows it drew before the move, with empty row lines where the new ones belong, until something scrolled.
|
|
421
|
+
- A part column's edit made while an earlier write of its cell is still on its way keeps that write's change when a
|
|
422
|
+
later write of the cell is refused first. It built on the row before, and could put back what the earlier write
|
|
423
|
+
changed.
|
|
424
|
+
- A part column's edit made right after ⌘Z no longer builds on the value the undo is about to take back.
|
|
425
|
+
- A field row whose save your server refused, pressed again, opens its editor on the refused value with your server's
|
|
426
|
+
reason, as the retry line under the row says it, until the value changes. It used to open on the value with no
|
|
427
|
+
reason.
|
|
428
|
+
|
|
429
|
+
### For an adapter
|
|
430
|
+
|
|
431
|
+
- **Four more message keys**, `views.panels.boolean-checked` ("Checked"), `views.panels.boolean-unchecked`
|
|
432
|
+
("Unchecked"), `views.panels.boolean-not` (`{ label }`, "Not won") and `views.panels.where-field-title`
|
|
433
|
+
(`{ relation, field }`, "Campaigns · Status"), and two in `@viewkitjs/fields`, `filter.relative-direction` and
|
|
434
|
+
`filter.relative-unit`. A resolver that falls back to the package's English reads them; one that words every message
|
|
435
|
+
with a `switch` and no default, or an override typed over every key, must word them. Your conventions' `messages`
|
|
436
|
+
now also word the Filter's operator menus and a text or number row's summary.
|
|
437
|
+
- **Two new message keys**, `views.panels.hidden-columns` ("Hidden columns") and `views.panels.related-records`
|
|
438
|
+
("Related records"), the Filter panel's two headings. A resolver that falls back to `resolveViewsMessage` reads them
|
|
439
|
+
in English; one that words every message with a `switch` and no default, or a `ViewsMessages` override typed over
|
|
440
|
+
every key, must word them.
|
|
441
|
+
- Your `Sheet` now also receives the toolbar's panels (`snap: "full"`, with `label` and no `title`: the panel's own header titles it) and the views picker's list (`snap: "auto"`, titled "Views"). With `sheetActions: "head"`, a panel's sheet is handed `actions.close` and no `done`: draw the ✕ in its head, and the panel draws none of its own.
|
|
442
|
+
- A views picker row's ⋮ opens your `Menu` from inside that sheet: a press in the menu must not count as a press outside the sheet.
|
|
443
|
+
- A values body opened for one value is handed `holds: "one"` and `labels: false`: one line, no label, no main mark, no
|
|
444
|
+
line to add another while it holds one.
|
|
445
|
+
- Hand every change through `onValueChange` as it is made, the whole text each time. A change equal to what your body
|
|
446
|
+
was drawn with is no change, so an echo of the value you were handed never undoes a newer one.
|
|
447
|
+
- Enter and Shift Enter are yours and do what the editor's own do: on a line they call `onDone()`, in a paragraph they
|
|
448
|
+
make a new line. A step of your own that lists choices (a phone's countries) may take Enter for its pick.
|
|
449
|
+
- Escape, Tab and ⌘ or Ctrl Enter from inside your body's element are taken before your body hears them: Tab walks your
|
|
450
|
+
controls and closes from either end, ⌘ or Ctrl Enter closes as Enter. In place, a Tab between your controls moves the
|
|
451
|
+
focus but your own key handlers don't hear it.
|
|
452
|
+
- A popup you draw outside your body's element (a country list in a portal) keeps its own keys, carries
|
|
453
|
+
`EDITOR_INNER_ESCAPE` on its root (from `@viewkitjs/views/editors/panel`) takes the focus while it is open and hands it back to your body when it closes; in
|
|
454
|
+
place, the focus leaving your body for anywhere else closes the editor as a press outside does, and a press on your
|
|
455
|
+
body's own surface doesn't.
|
|
456
|
+
- Draw no reason a value is refused at the close: the editor draws it. Use `check` to say it as it is typed.
|
|
457
|
+
- A phone's country is `region`; the phone opens written out, and a number handed back that reads as the stored one writes
|
|
458
|
+
nothing.
|
|
459
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the sheet holds them.
|
|
460
|
+
- A body taller than its cell grows over the rows below; at the last row, where the scroll box clips it, open upward or
|
|
461
|
+
scroll inside.
|
|
462
|
+
- Hand every change through `onValueChange` as it is made: a number, never text. Hand `null` when your box is emptied and
|
|
463
|
+
`NaN` when what is in it reads as no number; a close on `NaN` writes nothing, and a close on `null` clears only where
|
|
464
|
+
the field may be emptied. A typed key that reads as no number opens your body with `value` as `NaN` and `typed` as the
|
|
465
|
+
key.
|
|
466
|
+
- Read what is typed in your box with `locale`, and with `decimal` where it is handed; without it, either separator
|
|
467
|
+
reads. The editor rounds to `decimals`, so hand what was typed.
|
|
468
|
+
- A percent is the percent: 40 is 40 %.
|
|
469
|
+
- A unit changes only to one of `units`; a unit with no `units` is shown, with nothing to press. A unit you hand back
|
|
470
|
+
that isn't on offer is ignored.
|
|
471
|
+
- Enter, Shift Enter and Alt Enter are yours and call `onDone()`, as the editor's own box closes on Enter with any
|
|
472
|
+
modifier; your own unit list may take Enter for its pick. Escape, Tab and ⌘ or Ctrl Enter from inside your body's
|
|
473
|
+
element are taken before your body hears them: Tab walks your controls and closes from either end, ⌘ or Ctrl Enter
|
|
474
|
+
closes as Enter.
|
|
475
|
+
- A popup you draw outside your body's element (a unit list in a portal) keeps its own keys, carries
|
|
476
|
+
`EDITOR_INNER_ESCAPE` on its root (from `@viewkitjs/views/editors/panel`), takes the focus while it is open and hands it
|
|
477
|
+
back to your body when it closes; in place, the focus leaving your body for anywhere else closes the editor as a press
|
|
478
|
+
outside does, and a press on your body's own surface doesn't.
|
|
479
|
+
- Draw no reason a value is refused at the close: the editor draws it. Use `check` to say it as it is typed.
|
|
480
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the sheet holds them.
|
|
481
|
+
- A body taller than its cell grows over the rows below; at the last row, where the scroll box clips it, open upward or
|
|
482
|
+
scroll inside.
|
|
483
|
+
- Hand every change through `onValueChange` as it is made, the whole value each time. The editor holds the draft, so
|
|
484
|
+
Escape (where your app keeps it), Tab out and a press outside save what was handed, and nothing else.
|
|
485
|
+
- A name: hand `full` back as you were handed it unless the person typed a full name of their own.
|
|
486
|
+
- A place: `regionCode` is the editor's, read from the region: a region named in the country's list (by its code, its
|
|
487
|
+
name, its Latin name or its label, in any case) takes that region's label and code, any other has none, and a new
|
|
488
|
+
country clears both. A part you leave out of the value is cleared.
|
|
489
|
+
- A range: draw `bands` as picks, each handing its two ends, then `onDone("pick")`. The editor draws no refusal inside
|
|
490
|
+
your body: the panel draws it.
|
|
491
|
+
- `onDone()` closes as Enter does (the grid moves one row down); `onDone("pick")` closes as a pick.
|
|
492
|
+
- Escape and Tab from inside your body's element are taken before your body hears them: Tab walks your controls and
|
|
493
|
+
closes from either end. A key that starts in a popup you draw outside your body's element (a list in a portal) is
|
|
494
|
+
left to you, and that popup carries `EDITOR_INNER_ESCAPE` on its root (from `@viewkitjs/views/editors/panel`), so a popover that hears Escape on the document first leaves it to your popup. Enter is yours.
|
|
495
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the editor's panel holds them.
|
|
496
|
+
- Hand every change through `onValueChange` as it is made, the whole list each time. A line you hand back as it was
|
|
497
|
+
drawn keeps what is stored, so a phone or a link is not rewritten by opening the editor; a phone is matched however it
|
|
498
|
+
is written.
|
|
499
|
+
- Check each value as it is added or changed with `check`: its reason is in your app's words, and a value as it was
|
|
500
|
+
stored always reads.
|
|
501
|
+
- `labels: false`: draw no label, and none is saved. Offer your own labels when it is true.
|
|
502
|
+
- `onDone()` closes as Enter does (the grid moves one row down). Enter is yours.
|
|
503
|
+
- Escape and Tab from inside your body's element are taken before your body hears them: Tab walks your controls and
|
|
504
|
+
closes from either end. A key that starts in a popup you draw outside your body's element (a label list in a portal)
|
|
505
|
+
is left to you, and that popup carries `EDITOR_INNER_ESCAPE` on its root (from `@viewkitjs/views/editors/panel`).
|
|
506
|
+
- On a phone (`form: "phone"`), draw no ✕, ✓ or Cancel of your own: the editor's panel holds them.
|
|
507
|
+
- Three things differ from the editor's own rows: a list the write check refuses is said once, under your body in the
|
|
508
|
+
panel, rather than under each row; where Escape keeps, an Escape over a refused list shows the reason and a second
|
|
509
|
+
Escape throws the edit away; and focus leaving your body other than by Tab doesn't close the editor (a press outside
|
|
510
|
+
does).
|
|
511
|
+
- The row menu's Cut, Paste and Clear, "+ Add column"'s all-shown row, and a field row's verbs while their record loads now reach your `Menu` with a `disabledReason` whenever they are disabled. Each one says the sentence the grid already says for the same cause: the column's own reason (`reasons.editable`, `reasons.clearable`), "Nothing to paste", or the paste's own refusal ("Not a number"). A new key is used only where none fits. A verb you disabled with a reason of your own keeps it.
|
|
512
|
+
- So a `Menu` that takes a disabled row only with its reason can drop any stand-in for those rows.
|
|
513
|
+
- A `ViewsMessages` override typed over every key must map the three new ones.
|
|
514
|
+
- Before you turn `bodyFrame: "popover"` on, give the popover that opens with `chrome: "menu"` a width that doesn't
|
|
515
|
+
follow its content, or it widens and narrows as a list filters while a person types; a popover sized to its content
|
|
516
|
+
(a `w-auto` menu panel) needs one. Setting a fixed width on your body's own root, with the popover sized to it, works
|
|
517
|
+
too.
|
|
518
|
+
- Cap it by the room on screen (your positioner's available width), so it stays on screen in the grid's last column.
|
|
519
|
+
- Pad it as you want: ViewKit's own padding around a parts or values body is gone at `"popover"`.
|
|
520
|
+
- A body that needs more room than the rest (a place's parts on one line) is reached by the popover's
|
|
521
|
+
`[data-vk-body="parts"]`, or `"picker"` and `"values"` for the others.
|
|
522
|
+
- An editor drawing ViewKit's own body (no `Picker`, `PartsBody` or `ValuesBody` handed) keeps ViewKit's width at
|
|
523
|
+
either setting, and a phone's sheet is unchanged.
|
|
524
|
+
- `ATOM_NAMES` gains `RangeCalendar`. An adapter typed as the whole `ViewsAtoms` won't compile until it maps it or leaves it to the default.
|
|
525
|
+
- `ICON_NAMES` gains `filter`, `filterStatus`, `filterCategory` and `filterMetric`. An icon map typed `Record<ViewsIconName, …>` maps all four.
|
|
526
|
+
- `ICON_NAMES` gains `options` (a layout setting's default glyph) and `person` (a For you setting's default glyph). An icon map typed `Record<ViewsIconName, …>` won't compile until it maps them both.
|
|
527
|
+
- `VK_OPTIONAL_LAYOUT` gains `--vk-panel-padding`, the inset a panel's list keeps from its edge, `0.375rem` when you declare none. Declare it onto your menus' own padding if they have one.
|
|
528
|
+
- `ATOM_NAMES` gains `Pill`. An adapter typed as the whole `ViewsAtoms` won't compile until it maps it or leaves it to the default (`Omit<ViewsAtoms, …>`).
|
|
529
|
+
- `ICON_NAMES` gains `moreVertical`. An icon map typed `Record<ViewsIconName, …>` maps it.
|
|
530
|
+
- `ICON_NAMES` gains `layout`, `columns` and `sort` (Customize's root rows), `back` (its header's arrow), `copyLink`, `export` and `share` (its actions) and `loading` (the export's spinner: map it to a glyph that turns by itself, as your app's spinner does). An icon map typed `Record<ViewsIconName, …>` won't compile until it maps all eight.
|
|
531
|
+
- Your `onCellCommit` (and a field row's `onCommit`) can be called inside `pagehide`, as the page is going: send the
|
|
532
|
+
write with `keepalive` (or a beacon) where it must outlive the page.
|
|
533
|
+
- **Twenty-seven new message keys** for the builder's words: the layouts (`views.panels.layout-table`,
|
|
534
|
+
`layout-list`, `layout-board`, `layout-calendar`, `layout-rows`) and the reasons one is refused, the look's toggles,
|
|
535
|
+
the densities, the Layout panel's choices, Sort's Manual, two Group orders and a date's granularities. A resolver
|
|
536
|
+
that falls back to `resolveViewsMessage` reads them in English; one that words every message with a `switch` and no
|
|
537
|
+
default must word them, and a test that holds your catalogue to `VIEWS_MESSAGE_KEYS` fails until it does.
|
|
538
|
+
- `ATOM_NAMES` gains `ToolbarButton`. An adapter typed as the whole `ViewsAtoms` won't compile until it maps it or leaves it to the default (`Omit<ViewsAtoms, …>`).
|
|
539
|
+
- `ATOM_STATES` gains `changed`, `edge`, `expanded`, `form` and `line`.
|
|
540
|
+
- A popup of your own that closes on Escape without either library calls `event.preventDefault()` on that Escape, so
|
|
541
|
+
a selection under it survives the press.
|
|
542
|
+
- **One new message key**, `views.panels.filter-no-options` ("Nothing to pick."). A resolver that falls back to
|
|
543
|
+
`resolveViewsMessage` reads it in English; one that words every message with a `switch` and no default must word it.
|
|
544
|
+
- Before you set `gridCheckboxes: "checkbox"`, forward `readOnly` to your Checkbox's control. An app that hasn't
|
|
545
|
+
forwarded `readOnly` shows a read-only cell that looks pressable and does nothing when pressed.
|
|
546
|
+
- Your Checkbox's element, or one around it, must be a `button`, an `input`, a `label` or carry `role="checkbox"`: the
|
|
547
|
+
grid's row stands aside for those, so a press on the box writes the value and neither selects the cell nor opens the
|
|
548
|
+
row. Hand `onCheckedChange` the new value once per press.
|
|
549
|
+
- With the option on, each drawn row's yes/no cell is one of your Checkboxes, so one that draws more than its box (a
|
|
550
|
+
label, a hidden input, an animated mark) draws it in every row.
|
|
551
|
+
- An adapter that forwards `checked`, `onCheckedChange`, `disabled`, `tabIndex`, `aria-label` and `className` already
|
|
552
|
+
has everything else the cell hands, and adds only `readOnly`. A Base UI checkbox takes `readOnly` as it is. A Radix
|
|
553
|
+
checkbox has no read-only form, so its adapter has to stop the press itself (no `onCheckedChange` while `readOnly`, and
|
|
554
|
+
no pointer on the box) before the app switches the option on.
|
|
555
|
+
- Before you set `gridButtons: "button"`, forward `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and
|
|
556
|
+
`data-open` to your `Button`'s element. An adapter that picks the props it forwards (one that forwards `aria-label`
|
|
557
|
+
alone, say) leaves a group's ⋯ and "+ Add column" with nothing to anchor their menus on, and makes every grid button
|
|
558
|
+
a Tab stop. An adapter that spreads the rest of its props onto a `forwardRef` button (or a React 19 function
|
|
559
|
+
component that passes `ref` on) already does.
|
|
560
|
+
- Hand `onClick` the click on that element: the row's ⋯ reads its place from `event.currentTarget`.
|
|
561
|
+
- Let the `className` handed win over your size's own classes: the grid's box is in it (a 24px square, a full-height
|
|
562
|
+
header cell). A `cn` built on `tailwind-merge` does.
|
|
563
|
+
- With `gridButtons: "button"`, each drawn row's ⋯ is one of your `Button`s, and so is each button in an action
|
|
564
|
+
column's cells and the hovered row's name actions. A `Button` that draws more than its element (a ripple layer, a
|
|
565
|
+
`<span>` around its label) draws that in every row; one that warns in development about an icon-only button with no
|
|
566
|
+
`aria-label` warns once per row for an action column whose actions give no `label`.
|
|
567
|
+
- **`ViewsAtoms` gains `Avatar`.** Atoms typed as the whole `ViewsAtoms` need one: add your own, or spread
|
|
568
|
+
`DEFAULT_VIEWS_ATOMS` under yours. Atoms passed to the provider as a partial set take the default, unchanged.
|
|
569
|
+
- **One new slot**, `data-slot="vk-avatar"`, on the default's picture.
|
|
570
|
+
- While any column grows, the tail ("+ Add column", a row's ⋯) stands at its own width right after the last column, so
|
|
571
|
+
a row has no empty stretch past the columns. With every column holding a set width or a `grid.maxWidth`, the tail
|
|
572
|
+
takes the rest again, as without the option.
|
|
573
|
+
- A group's band, the footer and the one header over the groups (`oneHeader`) follow the same widths: they read the
|
|
574
|
+
same columns' template as the rows.
|
|
575
|
+
- Nothing changes unless you set `severalValues: "fit"` or hand a `CellMore`. With ViewKit's own, the count is the same
|
|
576
|
+
element as before, its frame and all, now marked `data-slot="vk-cell-more"`.
|
|
577
|
+
- A `CellMore` of yours draws inside a bare button (a bare span where the host owns the click, handed `inert`): ViewKit
|
|
578
|
+
keeps its frame only for its own default, so wrapping `DefaultCellMore` in an atom of yours gives that bare button
|
|
579
|
+
too. The button still opens the whole list and keeps its place in the row's click contract.
|
|
580
|
+
- With `"fit"`, a cell's values box fills the room its host gives it, and a cell that mounts before it is laid out (a
|
|
581
|
+
hidden tab, a drawer still opening) shows its first value until its first real width, then fits.
|
|
582
|
+
- Dress the open cell as pressed with `[data-slot="vk-grid-header-cell"][data-open]` (and the footer cell's slot), for
|
|
583
|
+
example on `--vk-pressed`. ViewKit draws no look of its own for it, so nothing changes until you do.
|
|
584
|
+
- Dress the grid's states by their attributes (`[data-selected]`, `data-[focused]:…`), never by the classes ViewKit
|
|
585
|
+
happens to use. ViewKit's own look for each state is unchanged.
|
|
586
|
+
- `data-pending`: a write to the cell is in flight, any of them, from its send to the app's answer.
|
|
587
|
+
- `data-invalid`: the latest write sent for the cell was refused. It holds until the cell's next write is sent, which
|
|
588
|
+
is then the last commit; an undo or a redo is a write.
|
|
589
|
+
- `data-empty` on a cell reads the value it shows. A value made of parts whose parts are all empty (a money, a range)
|
|
590
|
+
doesn't count as empty, and a column with no value of its own (an action column) never is.
|
|
591
|
+
- The grid drags no row, so no row carries `data-dragging`.
|
|
592
|
+
- The glyphs are still drawn at 70% opacity, so a colour you set shows at 70% of itself: to reach an exact colour,
|
|
593
|
+
set a stronger one. A column's own `icon` node is drawn as you hand it, and this colour doesn't reach it.
|
|
594
|
+
- **Nothing to declare**: every default is what the outlines drew before. If you dressed the picked ring by a rule
|
|
595
|
+
on `data-slot="vk-grid-outline"` (its `border-radius`, or `--vk-fg-subtle` set on it), the variables do the same
|
|
596
|
+
for both outlines at once.
|
|
597
|
+
- **One new line in your compiled CSS.** The new corner class reads Tailwind's `--radius-sm`, so an app whose
|
|
598
|
+
Tailwind inlined `rounded-sm` before now emits `--radius-sm` on `:root` (Atlas: `calc(var(--radius) * 0.6)`),
|
|
599
|
+
the same value.
|
|
600
|
+
- **Nothing to add.** `place` is optional: an adapter typed as the whole `ViewsAtoms` keeps compiling, and a
|
|
601
|
+
badge that ignores it draws as it did. `ViewsStatusOption` and `ViewsStatusPlace` are exported from
|
|
602
|
+
`@viewkitjs/views/react` beside `ViewsStatusBadgeProps`.
|
|
603
|
+
- With it on, a column's resize handle bar sits on the column's right edge, 1px inside the new line.
|
|
604
|
+
- To rule only the pinned columns' edge, turn `verticalBorders` off and draw the line on the cells that carry
|
|
605
|
+
`data-frozen`; it marks every pinned column, not only the last of them, so each pinned column is ruled.
|
|
606
|
+
- Your own `MenuRow` and `ToggleRow` receive the reason as `disabledReason` on every row the panels disable themselves; a filter row you declare disabled carries the `disabledReason` you give it. A row that reads none looks as before.
|
|
607
|
+
- A `ViewsMessages` override typed over every key must map the four new ones.
|
|
608
|
+
- More's disabled rows now reach your `Menu` with the verb's `disabledReason`, a group's rows with the group's where they give none, and a group's own menu hands each disabled row its reason. Your own `SelectionSheet` receives the reasons on its `verbs`.
|
|
609
|
+
- So a `Menu` that takes a disabled row only with its reason can drop its stand-in for these rows wherever your verbs set one; a verb that sets none still arrives without a reason.
|
|
610
|
+
- Your `Button` renders a real `<button>`, so a row's click and the cell-range drag stand aside for a command cell's
|
|
611
|
+
trigger as they do for ViewKit's own.
|
|
612
|
+
- An app `CommandMenu` or `Tooltip` that clones the trigger it is handed (a trigger with `asChild`) composes its own handlers
|
|
613
|
+
and attributes onto your `Button`: spread the rest of your props onto its element and forward `ref`.
|
|
614
|
+
- Let the `className` handed win over your size's own classes; a `cn` built on `tailwind-merge` does.
|
|
615
|
+
- A sort by a place's part arrives through the sort state's `onChange` as the part key, `{ value: "address::countryCode", dir }`: read it with `parsePartKey` from `@viewkitjs/fields/query`, which gives `{ id: "address", part: "countryCode" }`. The settings panels write it as `{ fieldKey: "address", direction, by: "countryCode" }`, as before. A place column offers these on a saved view only, and not when it declares a `sortKey`.
|
|
616
|
+
- `FieldViewerContext` takes an optional `language`, the language a place's country is written in (`viewerFrom` fills it from the conventions). A viewer without one names countries in its `locale`, as before.
|
|
617
|
+
- This needs the `@viewkitjs/fields` version whose conventions carry `language`.
|
|
618
|
+
- The pager's slots: `vk-grid-pager`, `vk-grid-pager-range`, `vk-grid-pager-size` (`data-open` while its menu is open), `vk-grid-pager-previous`, `vk-grid-pager-next`. Its words: `views.grid.pager`, `views.grid.pager-range`, `views.grid.pager-size`, `views.grid.pager-sizes`, `views.grid.pager-previous`, `views.grid.pager-next`.
|
|
619
|
+
- Forward `readOnly` to your `Checkbox` before you set `fieldRowCheckboxes: "checkbox"`, as for `gridCheckboxes`.
|
|
620
|
+
- The panels' tick rows (`CheckRow`, and `RadioRow` with `mark="box"`) draw the `TickBox` atom inside a row that is
|
|
621
|
+
itself the control: hand the picture of your box there through `atoms.TickBox` (a kit's checkbox mark), never your
|
|
622
|
+
`Checkbox`.
|
|
623
|
+
- Before you set `fieldRowButtons: "button"`, your `Button` forwards the ref and `aria-disabled` to its element, renders
|
|
624
|
+
a real `<button>` (a rich text's layer lets a press through only to its links and buttons), and lets the `className`
|
|
625
|
+
handed win over its own size; a `cn` built on `tailwind-merge` does.
|
|
626
|
+
|
|
7
627
|
## [0.5.0] — 2026-11-14
|
|
8
628
|
|
|
9
629
|
The selection bar, one conversion between a filter panel and a view's filter tree, figures worked out by
|