viewkitjs 0.31.0 → 0.33.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 +198 -0
- package/MIGRATION.md +40 -6
- package/README.md +1 -1
- package/fields/dist/index.d.ts +1 -1
- package/fields/dist/index.js +1 -1
- package/fields/dist/query/evaluate.d.ts +7 -0
- package/fields/dist/query/exact-number.d.ts +8 -2
- package/fields/dist/query/exact-number.js +14 -1
- package/fields/dist/query/index.d.ts +2 -0
- package/fields/dist/query/index.js +2 -0
- package/fields/dist/query/list-request.d.ts +148 -0
- package/fields/dist/query/list-request.js +125 -0
- package/fields/dist/query/saved-view.d.ts +15 -0
- package/fields/dist/query/saved-view.js +11 -0
- package/fields/dist/query/settings.d.ts +9 -0
- package/fields/dist/query/settings.js +9 -0
- package/fields/dist/query/sort.js +13 -10
- package/fields/dist/registry.js +5 -1
- package/fields/dist/types.d.ts +4 -1
- package/fields/dist/zod.d.ts +5 -0
- package/fields/dist/zod.js +10 -1
- package/fields/docs/guides/contact-values.md +12 -0
- package/fields/docs/guides/field-types.md +1 -1
- package/fields/docs/guides/queries.md +3 -1
- package/fields/docs/reference/fields.md +1 -0
- package/fields/docs/reference/query.md +66 -0
- package/package.json +5 -1
- package/postgres/README.md +1 -0
- package/postgres/dist/check.js +4 -1
- package/postgres/dist/definitions/formula-forms.js +3 -1
- package/postgres/dist/definitions/money.js +2 -1
- package/postgres/dist/handler.d.ts +53 -0
- package/postgres/dist/handler.js +211 -0
- package/postgres/dist/ids.d.ts +1 -1
- package/postgres/dist/ids.js +19 -1
- package/postgres/dist/index.d.ts +1 -0
- package/postgres/dist/index.js +1 -0
- package/postgres/dist/limits.d.ts +3 -1
- package/postgres/dist/limits.js +1 -1
- package/postgres/dist/list-fields.d.ts +10 -0
- package/postgres/dist/list-fields.js +36 -0
- package/postgres/dist/page.js +6 -3
- package/postgres/dist/readable.d.ts +4 -0
- package/postgres/dist/readable.js +4 -0
- package/postgres/dist/refusals.d.ts +9 -2
- package/postgres/dist/refusals.js +6 -0
- package/postgres/dist/rules.d.ts +15 -1
- package/postgres/dist/rules.js +16 -0
- package/postgres/dist/sort.js +7 -2
- package/postgres/docs/guides/definitions.md +1 -1
- package/postgres/docs/guides/field-map.md +3 -3
- package/postgres/docs/guides/list-handler.md +99 -0
- package/postgres/docs/index.md +1 -0
- package/postgres/docs/reference/definitions.md +1 -1
- package/postgres/docs/reference/postgres.md +12 -4
- package/views/README.md +2 -2
- package/views/dist/atoms/RowMenu.d.ts +7 -0
- package/views/dist/atoms/RowMenu.js +18 -16
- package/views/dist/atoms/ToolbarButton.d.ts +1 -1
- package/views/dist/atoms/ToolbarButton.js +4 -3
- package/views/dist/atoms/carried.d.ts +5 -0
- package/views/dist/atoms/carried.js +7 -0
- package/views/dist/atoms/frame-parts.d.ts +6 -0
- package/views/dist/atoms/frame-parts.js +15 -0
- package/views/dist/atoms/types.d.ts +19 -7
- package/views/dist/cells/cell-title.d.ts +3 -1
- package/views/dist/cells/cell-title.js +2 -2
- package/views/dist/cells/cell-values.js +2 -2
- package/views/dist/contract.d.ts +56 -11
- package/views/dist/contract.js +148 -0
- package/views/dist/controls/alert-dialog/alert-dialog.js +2 -1
- package/views/dist/controls/atoms.d.ts +2 -0
- package/views/dist/controls/atoms.js +2 -0
- package/views/dist/controls/avatar/avatar.d.ts +3 -3
- package/views/dist/controls/avatar/avatar.js +1 -1
- package/views/dist/controls/avatar/tokens.d.ts +44 -0
- package/views/dist/controls/avatar/tokens.js +11 -0
- package/views/dist/controls/avatar.css +22 -5
- package/views/dist/controls/button/map-button.js +2 -0
- package/views/dist/controls/checkbox/checkbox.d.ts +3 -2
- package/views/dist/controls/checkbox/checkbox.js +2 -2
- package/views/dist/controls/choice/tokens.d.ts +0 -4
- package/views/dist/controls/choice/tokens.js +0 -1
- package/views/dist/controls/choice.css +3 -3
- package/views/dist/controls/compound-editor/compound-editor.d.ts +1 -1
- package/views/dist/controls/compound-editor/name-parts.js +4 -4
- package/views/dist/controls/compound-editor/place-parts.js +19 -19
- package/views/dist/controls/compound-editor/range-parts.js +14 -14
- package/views/dist/controls/compound-editor/row.d.ts +3 -1
- package/views/dist/controls/compound-editor/row.js +2 -2
- package/views/dist/controls/controls.d.ts +8 -0
- package/views/dist/controls/controls.js +12 -2
- package/views/dist/controls/customize/customize.js +37 -35
- package/views/dist/controls/customize/map-customize-body.d.ts +2 -0
- package/views/dist/controls/customize/map-customize-body.js +5 -1
- package/views/dist/controls/date-editor/date-days.js +2 -2
- package/views/dist/controls/date-editor/date-editor.js +18 -18
- package/views/dist/controls/date-editor/date-parts.js +6 -6
- package/views/dist/controls/date-editor/map-calendar.js +1 -1
- package/views/dist/controls/date-editor.css +2 -2
- package/views/dist/controls/field/field.d.ts +22 -4
- package/views/dist/controls/field/field.js +63 -5
- package/views/dist/controls/field/tokens.d.ts +4 -0
- package/views/dist/controls/field/tokens.js +1 -0
- package/views/dist/controls/field.css +41 -16
- package/views/dist/controls/filter-editor/block.d.ts +2 -2
- package/views/dist/controls/filter-editor/block.js +5 -5
- package/views/dist/controls/filter-editor/filter-editor.js +31 -33
- package/views/dist/controls/filter-editor/how.d.ts +3 -1
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +1 -0
- package/views/dist/controls/filter-editor/map-filter-body.js +7 -3
- package/views/dist/controls/filter-editor/map-rules.js +1 -1
- package/views/dist/controls/filter-editor/parts.js +2 -1
- package/views/dist/controls/glyphs/glyphs.d.ts +10 -0
- package/views/dist/controls/glyphs/glyphs.js +173 -0
- package/views/dist/controls/group-editor/group-editor.js +15 -13
- package/views/dist/controls/index.d.ts +4 -1
- package/views/dist/controls/index.js +3 -1
- package/views/dist/controls/input/input.js +6 -3
- package/views/dist/controls/input/map-input.js +2 -0
- package/views/dist/controls/input/tokens.d.ts +4 -0
- package/views/dist/controls/input/tokens.js +1 -0
- package/views/dist/controls/input.css +31 -3
- package/views/dist/controls/internal/editor-parts.js +1 -1
- package/views/dist/controls/internal/icons.js +10 -0
- package/views/dist/controls/internal/keep-focus.d.ts +2 -0
- package/views/dist/controls/internal/keep-focus.js +17 -0
- package/views/dist/controls/internal/map-panel-controls.d.ts +8 -0
- package/views/dist/controls/internal/map-panel-controls.js +20 -0
- package/views/dist/controls/internal/panel-controls.d.ts +50 -0
- package/views/dist/controls/internal/panel-controls.js +197 -0
- package/views/dist/controls/internal/part-slot.d.ts +12 -0
- package/views/dist/controls/internal/part-slot.js +5 -0
- package/views/dist/controls/internal/watch-frame.d.ts +2 -0
- package/views/dist/controls/internal/watch-frame.js +33 -0
- package/views/dist/controls/links-editor/links-editor.d.ts +1 -1
- package/views/dist/controls/links-editor/links-editor.js +27 -27
- package/views/dist/controls/markdown/map-markdown.d.ts +4 -0
- package/views/dist/controls/markdown/map-markdown.js +5 -0
- package/views/dist/controls/menu/map-menu.d.ts +2 -2
- package/views/dist/controls/menu/map-menu.js +15 -12
- package/views/dist/controls/menu/menu.d.ts +2 -0
- package/views/dist/controls/menu/menu.js +3 -3
- package/views/dist/controls/menu-list/menu-list.d.ts +17 -4
- package/views/dist/controls/menu-list/menu-list.js +27 -25
- package/views/dist/controls/modal/modal.js +5 -1
- package/views/dist/controls/notice/notice.d.ts +3 -1
- package/views/dist/controls/notice/notice.js +2 -2
- package/views/dist/controls/number-editor/number-editor.d.ts +1 -1
- package/views/dist/controls/number-editor/number-editor.js +13 -13
- package/views/dist/controls/number-field/number-field.js +5 -3
- package/views/dist/controls/pane/pane.d.ts +4 -2
- package/views/dist/controls/pane/pane.js +6 -5
- package/views/dist/controls/phone-header/header-bar.d.ts +5 -1
- package/views/dist/controls/phone-header/header-bar.js +2 -2
- package/views/dist/controls/phone-header.css +11 -1
- package/views/dist/controls/picker/map-picker.js +3 -0
- package/views/dist/controls/picker/picker.d.ts +16 -0
- package/views/dist/controls/picker/picker.js +61 -40
- package/views/dist/controls/picker/rows.d.ts +4 -0
- package/views/dist/controls/picker.css +2 -0
- package/views/dist/controls/popover/map-popover.d.ts +1 -1
- package/views/dist/controls/popover/map-popover.js +4 -2
- package/views/dist/controls/popover/popover.js +2 -1
- package/views/dist/controls/quick-filters/quick-filters.js +4 -4
- package/views/dist/controls/radio/radio.d.ts +8 -3
- package/views/dist/controls/radio/radio.js +22 -5
- package/views/dist/controls/radio/tokens.d.ts +44 -0
- package/views/dist/controls/radio/tokens.js +11 -0
- package/views/dist/controls/radio.css +79 -1
- package/views/dist/controls/select/map-select.d.ts +3 -0
- package/views/dist/controls/select/map-select.js +8 -0
- package/views/dist/controls/select/select.d.ts +7 -0
- package/views/dist/controls/select/select.js +12 -6
- package/views/dist/controls/select/tokens.d.ts +8 -0
- package/views/dist/controls/select/tokens.js +2 -0
- package/views/dist/controls/select.css +17 -0
- package/views/dist/controls/setting-row/looks.d.ts +1 -1
- package/views/dist/controls/setting-row/looks.js +9 -4
- package/views/dist/controls/setting-row/setting-row.d.ts +45 -10
- package/views/dist/controls/setting-row/setting-row.js +82 -15
- package/views/dist/controls/setting-row/tokens.d.ts +74 -2
- package/views/dist/controls/setting-row/tokens.js +19 -1
- package/views/dist/controls/setting-row.css +135 -14
- package/views/dist/controls/sheet/bottom-sheet.d.ts +14 -2
- package/views/dist/controls/sheet/bottom-sheet.js +6 -3
- package/views/dist/controls/sheet/map-sheet.js +1 -1
- package/views/dist/controls/sheet.css +4 -1
- package/views/dist/controls/sort-editor/map-sort-body.d.ts +1 -0
- package/views/dist/controls/sort-editor/map-sort-body.js +7 -3
- package/views/dist/controls/sort-editor/sort-editor.js +25 -26
- package/views/dist/controls/sort-editor.css +13 -2
- package/views/dist/controls/switch-row/tokens.d.ts +0 -12
- package/views/dist/controls/switch-row/tokens.js +0 -3
- package/views/dist/controls/switch-row.css +3 -7
- package/views/dist/controls/switch.css +17 -7
- package/views/dist/controls/tag/tag.d.ts +3 -1
- package/views/dist/controls/tag/tag.js +2 -2
- package/views/dist/controls/tag/tokens.d.ts +4 -0
- package/views/dist/controls/tag/tokens.js +1 -0
- package/views/dist/controls/tag-field/tag-field.d.ts +5 -1
- package/views/dist/controls/tag-field/tag-field.js +11 -5
- package/views/dist/controls/tag-field/tokens.d.ts +16 -0
- package/views/dist/controls/tag-field/tokens.js +4 -0
- package/views/dist/controls/tag-field.css +19 -0
- package/views/dist/controls/tag.css +2 -0
- package/views/dist/controls/text-editor/text-editor.d.ts +1 -1
- package/views/dist/controls/text-editor/text-editor.js +8 -8
- package/views/dist/controls/toolbar/toolbar.d.ts +15 -3
- package/views/dist/controls/toolbar/toolbar.js +22 -15
- package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +14 -0
- package/views/dist/controls/toolbar-button/atom-toolbar-button.js +52 -0
- package/views/dist/controls/toolbar-button/toolbar-button.d.ts +1 -1
- package/views/dist/controls/toolbar-button/toolbar-button.js +2 -3
- package/views/dist/controls/toolbar-button.css +4 -0
- package/views/dist/controls/toolbar.css +5 -0
- package/views/dist/controls/values-editor/values-editor.d.ts +1 -1
- package/views/dist/controls/values-editor/values-editor.js +22 -22
- package/views/dist/controls/views-list/map-view-menu.d.ts +3 -0
- package/views/dist/controls/views-list/map-view-menu.js +25 -0
- package/views/dist/controls/views-list/map-views-list-body.d.ts +28 -1
- package/views/dist/controls/views-list/map-views-list-body.js +39 -21
- package/views/dist/controls/views-list/rules.d.ts +2 -0
- package/views/dist/controls/views-list/view-menu.d.ts +7 -0
- package/views/dist/controls/views-list/view-menu.js +33 -29
- package/views/dist/controls/views-list/views-list.js +4 -4
- package/views/dist/controls/views-list/words.d.ts +2 -0
- package/views/dist/controls/views-list/words.js +1 -1
- package/views/dist/editors/EditorPanel.js +3 -2
- package/views/dist/editors/edit-session.js +2 -5
- package/views/dist/field-row/FieldRow.d.ts +4 -2
- package/views/dist/field-row/FieldRow.js +80 -20
- package/views/dist/field-row/FieldRowLane.d.ts +7 -2
- package/views/dist/field-row/FieldRowLane.js +4 -3
- package/views/dist/field-row/editors/RowEditor.d.ts +12 -0
- package/views/dist/field-row/editors/RowEditor.js +31 -1
- package/views/dist/field-row/editors/RowValueListEditor.d.ts +5 -1
- package/views/dist/field-row/editors/RowValueListEditor.js +4 -1
- package/views/dist/field-row/field-row-button.d.ts +5 -0
- package/views/dist/field-row/field-row-button.js +2 -0
- package/views/dist/fields/binding.d.ts +3 -2
- package/views/dist/fields/binding.js +38 -5
- package/views/dist/fields/money.d.ts +5 -2
- package/views/dist/fields/money.js +14 -2
- package/views/dist/grid/chrome/GridColumnMenu.d.ts +4 -2
- package/views/dist/grid/chrome/GridColumnMenu.js +3 -2
- package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -1
- package/views/dist/grid/chrome/GridGroupMenu.js +4 -3
- package/views/dist/grid/chrome/GridHeader.d.ts +4 -1
- package/views/dist/grid/chrome/GridHeader.js +2 -2
- package/views/dist/grid/chrome/GridRow.js +6 -5
- package/views/dist/grid/chrome/GridRowCells.js +6 -9
- package/views/dist/grid/chrome/GridStructure.d.ts +4 -1
- package/views/dist/grid/chrome/GridStructure.js +4 -4
- package/views/dist/grid/chrome/GridTable.js +9 -3
- package/views/dist/grid/chrome/cell-clipboard.d.ts +4 -2
- package/views/dist/grid/chrome/cell-clipboard.js +2 -2
- package/views/dist/grid/chrome/cells.js +3 -1
- package/views/dist/grid/chrome/grid-column-menu-items.js +1 -1
- package/views/dist/grid/chrome/grid-row-menu-items.d.ts +27 -3
- package/views/dist/grid/chrome/grid-row-menu-items.js +93 -7
- package/views/dist/grid/chrome/grid-row-props.d.ts +7 -2
- package/views/dist/grid/chrome/grid-rows-menu.js +34 -6
- package/views/dist/grid/chrome/grid-table-props.d.ts +38 -7
- package/views/dist/grid/chrome/useGridBatchApi.d.ts +3 -1
- package/views/dist/grid/chrome/useGridBatchApi.js +4 -2
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +7 -2
- package/views/dist/grid/chrome/useGridKeyboard.js +43 -14
- package/views/dist/grid/chrome/useGridPendingReconciliation.js +1 -2
- package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -1
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +20 -7
- package/views/dist/grid/core/clipboard-model.d.ts +3 -1
- package/views/dist/grid/core/clipboard-model.js +9 -8
- package/views/dist/grid/core/commit-model.d.ts +20 -2
- package/views/dist/grid/core/editing-controller.d.ts +21 -0
- package/views/dist/grid/core/editing-controller.js +194 -42
- package/views/dist/grid/core/editing-model.d.ts +3 -0
- package/views/dist/grid/core/editing-model.js +3 -0
- package/views/dist/grid/core/edits-sink.d.ts +19 -0
- package/views/dist/grid/core/edits-sink.js +2 -0
- package/views/dist/grid/core/save-path.d.ts +24 -0
- package/views/dist/grid/core/save-path.js +122 -0
- package/views/dist/grid/core/spreadsheet-operations.d.ts +3 -0
- package/views/dist/grid/core/spreadsheet-operations.js +24 -1
- package/views/dist/grid/core/useGridEditing.d.ts +5 -0
- package/views/dist/grid/core/useGridEditing.js +6 -0
- package/views/dist/grid/index.d.ts +3 -2
- package/views/dist/grid/index.js +1 -0
- package/views/dist/internal/field-rows.d.ts +26 -0
- package/views/dist/internal/field-rows.js +8 -0
- package/views/dist/internal/page-close.d.ts +7 -0
- package/views/dist/internal/page-close.js +43 -0
- package/views/dist/list/answer.d.ts +40 -0
- package/views/dist/list/answer.js +43 -0
- package/views/dist/list/browser-views-store.d.ts +10 -0
- package/views/dist/list/browser-views-store.js +182 -0
- package/views/dist/list/bulk-bar.d.ts +7 -0
- package/views/dist/list/bulk-bar.js +10 -0
- package/views/dist/list/columns.d.ts +24 -0
- package/views/dist/list/columns.js +27 -0
- package/views/dist/list/edits.d.ts +19 -0
- package/views/dist/list/edits.js +56 -0
- package/views/dist/list/grid.d.ts +11 -0
- package/views/dist/list/grid.js +76 -0
- package/views/dist/list/index.d.ts +36 -0
- package/views/dist/list/index.js +11 -0
- package/views/dist/list/link.d.ts +8 -0
- package/views/dist/list/link.js +78 -0
- package/views/dist/list/list.d.ts +70 -0
- package/views/dist/list/list.js +14 -0
- package/views/dist/list/menu.d.ts +31 -0
- package/views/dist/list/menu.js +76 -0
- package/views/dist/list/parts.d.ts +6 -0
- package/views/dist/list/parts.js +66 -0
- package/views/dist/list/registry.d.ts +11 -0
- package/views/dist/list/registry.js +31 -0
- package/views/dist/list/root-base.d.ts +46 -0
- package/views/dist/list/root-base.js +137 -0
- package/views/dist/list/root.d.ts +41 -0
- package/views/dist/list/root.js +168 -0
- package/views/dist/list/slot.d.ts +14 -0
- package/views/dist/list/slot.js +22 -0
- package/views/dist/list/source-answers.d.ts +39 -0
- package/views/dist/list/source-answers.js +225 -0
- package/views/dist/list/source.d.ts +11 -0
- package/views/dist/list/source.js +31 -0
- package/views/dist/list/store.d.ts +119 -0
- package/views/dist/list/store.js +146 -0
- package/views/dist/list/toolbar.d.ts +7 -0
- package/views/dist/list/toolbar.js +371 -0
- package/views/dist/list/views-axis.d.ts +5 -0
- package/views/dist/list/views-axis.js +98 -0
- package/views/dist/list/views-store.d.ts +41 -0
- package/views/dist/list/views-store.js +1 -0
- package/views/dist/list/views.d.ts +72 -0
- package/views/dist/list/views.js +411 -0
- package/views/dist/model/column-capabilities.d.ts +13 -0
- package/views/dist/model/column-capabilities.js +23 -2
- package/views/dist/model/column-schema.d.ts +11 -1
- package/views/dist/model/preferences.js +1 -1
- package/views/dist/model/prefs-buckets.js +1 -1
- package/views/dist/model/view-rules.js +1 -0
- package/views/dist/panels/index.d.ts +3 -1
- package/views/dist/panels/index.js +1 -0
- package/views/dist/panels/model.d.ts +2 -0
- package/views/dist/panels/react/customize-body.js +1 -0
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +47 -4
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +6 -326
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +17 -2
- package/views/dist/panels/react/toolbar/Toolbar.js +43 -23
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +4 -4
- package/views/dist/panels/react/toolbar/ToolbarButton.js +7 -1
- package/views/dist/panels/react/toolbar/ToolbarFilter.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarNew.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +2 -2
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +3 -1
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSort.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +6 -4
- package/views/dist/panels/react/toolbar/context.d.ts +20 -3
- package/views/dist/panels/react/toolbar/context.js +3 -1
- package/views/dist/panels/react/toolbar/panel-part.d.ts +4 -1
- package/views/dist/panels/react/toolbar/panel-part.js +5 -3
- package/views/dist/panels/react/views-row/FoldingViewRow.d.ts +1 -1
- package/views/dist/panels/react/views-row/FoldingViewRow.js +15 -4
- package/views/dist/panels/react/views-row/PillGroup.d.ts +5 -2
- package/views/dist/panels/react/views-row/PillGroup.js +16 -7
- package/views/dist/panels/react/views-row/ViewPicker.js +2 -12
- package/views/dist/panels/react/views-row/ViewPickerRow.d.ts +4 -2
- package/views/dist/panels/react/views-row/ViewPickerRow.js +9 -5
- package/views/dist/panels/react.d.ts +2 -2
- package/views/dist/panels/settings/filter-groups.js +6 -1
- package/views/dist/panels/toolbar/edit-view.d.ts +7 -1
- package/views/dist/panels/toolbar/edit-view.js +14 -0
- package/views/dist/panels/toolbar/model.d.ts +5 -0
- package/views/dist/panels/toolbar/model.js +7 -3
- package/views/dist/panels/view-state.d.ts +5 -3
- package/views/dist/panels/views-row/model.d.ts +19 -2
- package/views/dist/panels/views-row/model.js +14 -0
- package/views/dist/provider/ViewsProvider.d.ts +21 -8
- package/views/dist/provider/ViewsProvider.js +40 -5
- package/views/dist/provider/components.d.ts +102 -2
- package/views/dist/provider/components.js +1 -1
- package/views/dist/provider/context.d.ts +6 -2
- package/views/dist/provider/context.js +1 -1
- package/views/dist/provider/own-control.d.ts +4 -0
- package/views/dist/provider/own-control.js +7 -0
- package/views/dist/provider/ports.d.ts +19 -12
- package/views/dist/provider/ports.js +69 -1
- package/views/dist/provider/select-items.d.ts +3 -0
- package/views/dist/provider/select-items.js +6 -0
- package/views/dist/react.d.ts +4 -2
- package/views/dist/react.js +2 -0
- package/views/dist/styles.css +503 -136
- package/views/dist/styles.unlayered.css +503 -136
- package/views/docs/contract.md +292 -34
- package/views/docs/controls/avatar.md +11 -0
- package/views/docs/controls/choice.md +0 -1
- package/views/docs/controls/compound-editor.md +4 -0
- package/views/docs/controls/customize.md +6 -0
- package/views/docs/controls/date-editor.md +4 -0
- package/views/docs/controls/field.md +7 -0
- package/views/docs/controls/filter-editor.md +8 -0
- package/views/docs/controls/group-editor.md +6 -0
- package/views/docs/controls/input.md +5 -0
- package/views/docs/controls/links-editor.md +4 -0
- package/views/docs/controls/menu-list.md +8 -0
- package/views/docs/controls/menu.md +4 -0
- package/views/docs/controls/notice.md +4 -0
- package/views/docs/controls/number-editor.md +4 -0
- package/views/docs/controls/pane.md +4 -0
- package/views/docs/controls/picker.md +8 -0
- package/views/docs/controls/quick-filters.md +6 -0
- package/views/docs/controls/radio.md +20 -1
- package/views/docs/controls/select.md +10 -0
- package/views/docs/controls/setting-row.md +18 -0
- package/views/docs/controls/sheet.md +4 -0
- package/views/docs/controls/sort-editor.md +8 -0
- package/views/docs/controls/switch-row.md +0 -3
- package/views/docs/controls/tag-field.md +4 -0
- package/views/docs/controls/tag.md +1 -0
- package/views/docs/controls/text-editor.md +4 -0
- package/views/docs/controls/values-editor.md +4 -0
- package/views/docs/controls/views-list.md +6 -0
- package/views/docs/getting-started.md +2 -2
- package/views/docs/guides/atoms.md +2 -2
- package/views/docs/guides/columns.md +1 -1
- package/views/docs/guides/ports.md +1 -1
- package/views/docs/guides/the-grid.md +36 -9
- package/views/docs/guides/the-provider.md +22 -3
- package/views/docs/index.md +1 -0
- package/views/docs/reference/controls.md +41 -29
- package/views/docs/reference/editors-session.md +1 -1
- package/views/docs/reference/field-row.md +9 -1
- package/views/docs/reference/grid.md +15 -9
- package/views/docs/reference/list.md +357 -0
- package/views/docs/reference/looks.md +1 -1
- package/views/docs/reference/panels-react.md +17 -12
- package/views/docs/reference/panels.md +8 -5
- package/views/docs/reference/react.md +24 -16
- package/views/docs/reference/views.md +10 -6
- package/views/docs/reshaping.md +6 -1
- package/views/skills/views/SKILL.md +9 -6
|
@@ -22,6 +22,10 @@ export declare const SETTING_ROW_TOKENS: readonly [{
|
|
|
22
22
|
readonly name: "--vk-danger";
|
|
23
23
|
readonly kind: "colour";
|
|
24
24
|
readonly outright: "--text-danger";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "--vk-fg";
|
|
27
|
+
readonly kind: "colour";
|
|
28
|
+
readonly outright: "--text";
|
|
25
29
|
}, {
|
|
26
30
|
readonly name: "--vk-fg-subtle";
|
|
27
31
|
readonly kind: "colour";
|
|
@@ -30,6 +34,54 @@ export declare const SETTING_ROW_TOKENS: readonly [{
|
|
|
30
34
|
readonly name: "--vk-fg-subtlest";
|
|
31
35
|
readonly kind: "colour";
|
|
32
36
|
readonly outright: "--text-subtlest";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "--vk-fg-brand";
|
|
39
|
+
readonly kind: "colour";
|
|
40
|
+
readonly outright: "--link";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "--vk-border-brand";
|
|
43
|
+
readonly kind: "colour";
|
|
44
|
+
readonly outright: "--border-focused";
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "--vk-label-blue";
|
|
47
|
+
readonly kind: "colour";
|
|
48
|
+
readonly outright: "--label-blue";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "--vk-label-green";
|
|
51
|
+
readonly kind: "colour";
|
|
52
|
+
readonly outright: "--label-green";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "--vk-label-amber";
|
|
55
|
+
readonly kind: "colour";
|
|
56
|
+
readonly outright: "--label-amber";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "--vk-label-red";
|
|
59
|
+
readonly kind: "colour";
|
|
60
|
+
readonly outright: "--label-red";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "--vk-label-purple";
|
|
63
|
+
readonly kind: "colour";
|
|
64
|
+
readonly outright: "--label-purple";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "--vk-label-pink";
|
|
67
|
+
readonly kind: "colour";
|
|
68
|
+
readonly outright: "--label-pink";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "--vk-label-teal";
|
|
71
|
+
readonly kind: "colour";
|
|
72
|
+
readonly outright: "--label-teal";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "--vk-fg-inverse";
|
|
75
|
+
readonly kind: "colour";
|
|
76
|
+
readonly outright: "--text-inverse";
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: "--vk-neutral";
|
|
79
|
+
readonly kind: "colour";
|
|
80
|
+
readonly outright: "--background-neutral";
|
|
81
|
+
}, {
|
|
82
|
+
readonly name: "--vk-icon-disclosure";
|
|
83
|
+
readonly kind: "colour";
|
|
84
|
+
readonly outright: "--icon-disclosure";
|
|
33
85
|
}, {
|
|
34
86
|
readonly name: "--vk-border-width";
|
|
35
87
|
readonly kind: "size";
|
|
@@ -46,6 +98,14 @@ export declare const SETTING_ROW_TOKENS: readonly [{
|
|
|
46
98
|
readonly name: "--vk-font-size-xs";
|
|
47
99
|
readonly kind: "size";
|
|
48
100
|
readonly outright: "--text-xs";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "--vk-focus-width";
|
|
103
|
+
readonly kind: "size";
|
|
104
|
+
readonly outright: "--focus-width";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "--vk-focus-offset";
|
|
107
|
+
readonly kind: "size";
|
|
108
|
+
readonly outright: "--focus-offset";
|
|
49
109
|
}, {
|
|
50
110
|
readonly name: "--vk-font-weight-medium";
|
|
51
111
|
readonly kind: "size";
|
|
@@ -66,10 +126,22 @@ export declare const SETTING_ROW_TOKENS: readonly [{
|
|
|
66
126
|
readonly name: "--vk-radius-md";
|
|
67
127
|
readonly kind: "size";
|
|
68
128
|
readonly outright: "--radius-md";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "--vk-radius-sm";
|
|
131
|
+
readonly kind: "size";
|
|
132
|
+
readonly outright: "--radius-sm";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "--vk-radius-full";
|
|
135
|
+
readonly kind: "size";
|
|
136
|
+
readonly outright: "--radius-full";
|
|
69
137
|
}, {
|
|
70
138
|
readonly name: "--vk-spacing";
|
|
71
139
|
readonly kind: "size";
|
|
72
140
|
readonly outright: "--spacing";
|
|
141
|
+
}, {
|
|
142
|
+
readonly name: "--vk-opacity-off";
|
|
143
|
+
readonly kind: "size";
|
|
144
|
+
readonly outright: "--opacity-off";
|
|
73
145
|
}, {
|
|
74
146
|
readonly name: "--vk-duration-fast";
|
|
75
147
|
readonly kind: "motion";
|
|
@@ -80,5 +152,5 @@ export declare const SETTING_ROW_TOKENS: readonly [{
|
|
|
80
152
|
readonly outright: "--ease-out";
|
|
81
153
|
}];
|
|
82
154
|
/** The card's own machinery: its edge and ground by the card picked, its rows' room by the rows picked, the size its smooth
|
|
83
|
-
* corner is fitted to. */
|
|
84
|
-
export declare const SETTING_ROW_PRIVATE: readonly ["--setting-rows-"];
|
|
155
|
+
* corner is fitted to; a tile's colour, by the colour its icon was given; and a state's dot's, by its colour. */
|
|
156
|
+
export declare const SETTING_ROW_PRIVATE: readonly ["--setting-rows-", "--setting-row-tile", "--setting-row-dot"];
|
|
@@ -5,19 +5,37 @@ export const SETTING_ROW_TOKENS = [
|
|
|
5
5
|
{ name: "--vk-hovered", kind: "colour", outright: "--surface-hovered" },
|
|
6
6
|
{ name: "--vk-raised", kind: "colour", outright: "--surface-raised" },
|
|
7
7
|
{ name: "--vk-danger", kind: "colour", outright: "--text-danger" },
|
|
8
|
+
{ name: "--vk-fg", kind: "colour", outright: "--text" },
|
|
8
9
|
{ name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
|
|
9
10
|
{ name: "--vk-fg-subtlest", kind: "colour", outright: "--text-subtlest" },
|
|
11
|
+
{ name: "--vk-fg-brand", kind: "colour", outright: "--link" },
|
|
12
|
+
{ name: "--vk-border-brand", kind: "colour", outright: "--border-focused" },
|
|
13
|
+
{ name: "--vk-label-blue", kind: "colour", outright: "--label-blue" },
|
|
14
|
+
{ name: "--vk-label-green", kind: "colour", outright: "--label-green" },
|
|
15
|
+
{ name: "--vk-label-amber", kind: "colour", outright: "--label-amber" },
|
|
16
|
+
{ name: "--vk-label-red", kind: "colour", outright: "--label-red" },
|
|
17
|
+
{ name: "--vk-label-purple", kind: "colour", outright: "--label-purple" },
|
|
18
|
+
{ name: "--vk-label-pink", kind: "colour", outright: "--label-pink" },
|
|
19
|
+
{ name: "--vk-label-teal", kind: "colour", outright: "--label-teal" },
|
|
20
|
+
{ name: "--vk-fg-inverse", kind: "colour", outright: "--text-inverse" },
|
|
21
|
+
{ name: "--vk-neutral", kind: "colour", outright: "--background-neutral" },
|
|
22
|
+
{ name: "--vk-icon-disclosure", kind: "colour", outright: "--icon-disclosure" },
|
|
10
23
|
{ name: "--vk-border-width", kind: "size", outright: "--border-width" },
|
|
11
24
|
{ name: "--vk-corner-smoothing", kind: "size", outright: "--corner-smoothing" },
|
|
12
25
|
{ name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
|
|
13
26
|
{ name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
|
|
27
|
+
{ name: "--vk-focus-width", kind: "size", outright: "--focus-width" },
|
|
28
|
+
{ name: "--vk-focus-offset", kind: "size", outright: "--focus-offset" },
|
|
14
29
|
{ name: "--vk-font-weight-medium", kind: "size", outright: "--font-weight-medium" },
|
|
15
30
|
{ name: "--vk-line-height-sm", kind: "size", outright: "--text-sm--line-height" },
|
|
16
31
|
{ name: "--vk-line-height-xs", kind: "size", outright: "--text-xs--line-height" },
|
|
17
32
|
{ name: "--vk-radius-lg", kind: "size", outright: "--radius-lg" },
|
|
18
33
|
{ name: "--vk-radius-md", kind: "size", outright: "--radius-md" },
|
|
34
|
+
{ name: "--vk-radius-sm", kind: "size", outright: "--radius-sm" },
|
|
35
|
+
{ name: "--vk-radius-full", kind: "size", outright: "--radius-full" },
|
|
19
36
|
{ name: "--vk-spacing", kind: "size", outright: "--spacing" },
|
|
37
|
+
{ name: "--vk-opacity-off", kind: "size", outright: "--opacity-off" },
|
|
20
38
|
{ name: "--vk-duration-fast", kind: "motion", outright: "--duration-fast" },
|
|
21
39
|
{ name: "--vk-ease-out", kind: "motion", outright: "--ease-out" },
|
|
22
40
|
];
|
|
23
|
-
export const SETTING_ROW_PRIVATE = ["--setting-rows-"];
|
|
41
|
+
export const SETTING_ROW_PRIVATE = ["--setting-rows-", "--setting-row-tile", "--setting-row-dot"];
|
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
(choice.css) on the left, its control at its end (the Switch, the Select, a Button, or its value and ›), its mark or icon at
|
|
3
3
|
its start; the rows in a card, a line between each; the danger zone's card with a red edge; a lone row bare. Two options, each
|
|
4
4
|
a computer's, picked on the frame or the app around it (looks.ts): the card (outlined, the default, or raised on its ground)
|
|
5
|
-
and the rows (snug, the default, or roomy, 64 tall). Nothing picked draws exactly as SwitchRows did (switch-row.css)
|
|
6
|
-
|
|
7
|
-
Field rows' (field.css), and this sheet adds
|
|
8
|
-
…,
|
|
5
|
+
and the rows (snug, the default, or roomy, 64 tall). Nothing picked draws exactly as SwitchRows did (switch-row.css); a switch's row is no
|
|
6
|
+
press of its own, only its Switch is (KIT-969). On a phone the card and its rows are
|
|
7
|
+
Field rows' (field.css), and this sheet adds what a setting puts in them, as iOS's Settings draws it (KIT-972): the name taking
|
|
8
|
+
the room; the value in the quietest grey, cut with …, before iOS's ›; a button's words in the link colour at the end; a lone
|
|
9
|
+
row's name in the link colour; a danger row's name and icon in red; a locked row faded but for its line; and its icon by the
|
|
10
|
+
phone's Icon option, a line icon (Line, nothing picked) or a white glyph on a tile of the colour the app passed (Tile).
|
|
11
|
+
|
|
12
|
+
Linear's look (VK-985; round 4 of the Outright kit's settings canvas) is four more values, each a computer's, drawn only under
|
|
13
|
+
its own attribute, so nothing picked and Attio's draw as before: Card's Edged (the card on its ground with a firm edge, the
|
|
14
|
+
danger zone's card plain, a lone row a card of its own, an icon on a grey tile, no edge); Rows' Inset (60 tall at least, 15 by
|
|
15
|
+
16, the line between rows from the words' start to 16 short of the end); End's Words (an action as its words, 28 tall, in the
|
|
16
|
+
text colour or red, a state as a dot and its words, a locked row's words greyed and its reason in its control's place); and
|
|
17
|
+
Fields' At the end (a Field placed in the card its row, its Input 256 at the end, a select as wide as its value).
|
|
9
18
|
|
|
10
19
|
The rules sit in the components layer, so a utility class on a row still wins. */
|
|
11
20
|
@layer components {
|
|
@@ -17,6 +26,14 @@
|
|
|
17
26
|
--setting-rows-side: calc(var(--vk-spacing) * 16);
|
|
18
27
|
}
|
|
19
28
|
.o-setting-rows.o-setting-rows-danger { --setting-rows-edge: var(--vk-border-danger); }
|
|
29
|
+
/* Edged (Linear's): the card on its ground with a firm edge; its danger zone's plain, only its action red. */
|
|
30
|
+
:where([data-setting-row-card="edged"]) .o-setting-rows { --setting-rows-edge: var(--vk-border); --setting-rows-ground: var(--vk-raised); }
|
|
31
|
+
:where([data-setting-row-card="edged"]) .o-setting-rows.o-setting-rows-danger { --setting-rows-edge: var(--vk-border); }
|
|
32
|
+
/* Inset (Linear's): 60 tall at least, 15 by 16, the line between rows inset 16 at each end. */
|
|
33
|
+
:where([data-setting-row-rows="inset"]) :is(.o-setting-rows, .o-setting-row) {
|
|
34
|
+
--setting-rows-pad: calc(var(--vk-spacing) * 3.75) calc(var(--vk-spacing) * 4); --setting-rows-height: calc(var(--vk-spacing) * 15);
|
|
35
|
+
--setting-rows-side: calc(var(--vk-spacing) * 15);
|
|
36
|
+
}
|
|
20
37
|
|
|
21
38
|
/* ── The card, on a computer: the rows in a box, a line between each ───────────────────────────────────────────────── */
|
|
22
39
|
.o-setting-rows:not(.o-field-rows) {
|
|
@@ -34,14 +51,15 @@
|
|
|
34
51
|
.o-setting-row:not(.o-field-row):first-child { border-top: 0; }
|
|
35
52
|
.o-setting-row:not(.o-field-row) > .o-choice-text { flex: 1 1 auto; }
|
|
36
53
|
.o-setting-row:not(.o-field-row) .o-choice-label { font-weight: var(--vk-font-weight-medium); }
|
|
37
|
-
/* The
|
|
54
|
+
/* The row that is a press as a whole: the one opening its page (a button). A switch's row is not: only its Switch switches it
|
|
55
|
+
(KIT-969), so it takes no pointer and no ground under it. */
|
|
38
56
|
button.o-setting-row { width: 100%; font: inherit; color: inherit; text-align: left; background-color: transparent; }
|
|
39
|
-
.o-setting-row
|
|
40
|
-
@media (hover: hover) { .o-setting-row
|
|
41
|
-
.o-setting-row:not(.o-field-row)
|
|
57
|
+
.o-setting-row[data-setting-row-kind="open"]:not(.o-field-row) { cursor: pointer; }
|
|
58
|
+
@media (hover: hover) { .o-setting-row[data-setting-row-kind="open"]:not(.o-field-row):hover { background-color: var(--vk-hovered); } }
|
|
59
|
+
.o-setting-row[data-setting-row-kind="open"]:not(.o-field-row)[data-locked] { cursor: not-allowed; background-color: transparent; }
|
|
42
60
|
|
|
43
61
|
/* Its start: a mark as given; an icon in its box. */
|
|
44
|
-
.o-setting-row > :not(.o-choice-text) { flex: none; }
|
|
62
|
+
.o-setting-row > :not(.o-choice-text, .o-setting-row-press) { flex: none; }
|
|
45
63
|
.o-setting-row-icon {
|
|
46
64
|
display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: calc(var(--vk-spacing) * 8); height: calc(var(--vk-spacing) * 8);
|
|
47
65
|
border: var(--vk-border-width) solid var(--vk-border-subtle); border-radius: var(--vk-radius-md); background-color: var(--vk-raised); color: var(--vk-fg-subtle);
|
|
@@ -57,11 +75,68 @@ button.o-setting-row { width: 100%; font: inherit; color: inherit; text-align: l
|
|
|
57
75
|
.o-setting-row-value { font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); color: var(--vk-fg-subtle); }
|
|
58
76
|
.o-setting-row-chevron { flex: none; width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); color: var(--vk-fg-subtlest); }
|
|
59
77
|
/* Locked: its control greyed (a switch keeps its own locked state), its words as they are. */
|
|
60
|
-
.o-setting-row[data-locked] :is(.o-setting-row-select, .o-button, .o-setting-row-value, .o-setting-row-chevron) { opacity:
|
|
78
|
+
.o-setting-row[data-locked] :is(.o-setting-row-select, .o-button, .o-setting-row-value, .o-setting-row-chevron) { opacity: var(--vk-opacity-off); }
|
|
61
79
|
|
|
62
80
|
/* A lone row: bare, no card, no line, no room round it. */
|
|
63
81
|
.o-setting-row[data-alone]:not(.o-field-row) { min-height: 0; padding: 0; border-top: 0; background-color: transparent; }
|
|
64
82
|
|
|
83
|
+
/* ── Linear's values on a computer ─────────────────────────────────────────────────────────────────────────────────── */
|
|
84
|
+
/* Edged: a lone row a card of its own, the rows' room in it; an icon on a grey tile, no edge. */
|
|
85
|
+
:where([data-setting-row-card="edged"]) .o-setting-row[data-alone]:not(.o-field-row) {
|
|
86
|
+
min-height: var(--setting-rows-height, auto); padding: var(--setting-rows-pad, calc(var(--vk-spacing) * 3.5) calc(var(--vk-spacing) * 4));
|
|
87
|
+
border: var(--vk-border-width) solid var(--vk-border); border-radius: var(--vk-radius-lg); background-color: var(--vk-raised);
|
|
88
|
+
}
|
|
89
|
+
:where([data-setting-row-card="edged"]) .o-setting-row-icon:not(:where([data-vk-phone], [data-vk-phone] *)) {
|
|
90
|
+
border: 0; border-radius: var(--vk-radius-sm); background-color: var(--vk-neutral);
|
|
91
|
+
}
|
|
92
|
+
:where([data-setting-row-card="edged"]) .o-setting-row-icon:not(:where([data-vk-phone], [data-vk-phone] *)) > svg { width: calc(var(--vk-spacing) * 3.5); height: calc(var(--vk-spacing) * 3.5); }
|
|
93
|
+
/* Inset: the line between rows from 16 in to 16 short, drawn under a row's own ground. */
|
|
94
|
+
:where([data-setting-row-rows="inset"]) .o-setting-rows:not(.o-field-rows) > :is(.o-setting-row, .o-field) { border-top: 0; }
|
|
95
|
+
:where([data-setting-row-rows="inset"]) .o-setting-rows:not(.o-field-rows) > * + :is(.o-setting-row, .o-field) {
|
|
96
|
+
background-image: linear-gradient(var(--vk-border-subtle), var(--vk-border-subtle)); background-repeat: no-repeat;
|
|
97
|
+
background-size: calc(100% - var(--vk-spacing) * 8) var(--vk-border-width); background-position: calc(var(--vk-spacing) * 4) 0;
|
|
98
|
+
}
|
|
99
|
+
/* Words: an action as its words, the row's own press, 28 tall, in the text colour, red where it can't be undone; its icon alone
|
|
100
|
+
a 24 press in the subtle text. */
|
|
101
|
+
.o-setting-row:not(.o-field-row) .o-setting-row-act {
|
|
102
|
+
display: inline-flex; align-items: center; justify-content: center; min-height: calc(var(--vk-spacing) * 7); margin: 0;
|
|
103
|
+
padding: 0 calc(var(--vk-spacing) * 1.75); border: 0; border-radius: var(--vk-radius-sm); font: inherit; font-size: var(--vk-font-size-sm);
|
|
104
|
+
line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); font-weight: var(--vk-font-weight-medium); white-space: nowrap;
|
|
105
|
+
color: var(--vk-fg); background-color: transparent; cursor: pointer; transition: background-color var(--vk-duration-fast) var(--vk-ease-out);
|
|
106
|
+
}
|
|
107
|
+
.o-setting-row:not(.o-field-row) .o-setting-row-act[data-kind="danger"] { color: var(--vk-danger); }
|
|
108
|
+
.o-setting-row:not(.o-field-row) .o-setting-row-act[data-icon] { width: calc(var(--vk-spacing) * 6); min-height: calc(var(--vk-spacing) * 6); padding: 0; color: var(--vk-fg-subtle); }
|
|
109
|
+
.o-setting-row:not(.o-field-row) .o-setting-row-act > svg { width: calc(var(--vk-spacing) * 3.5); height: calc(var(--vk-spacing) * 3.5); }
|
|
110
|
+
@media (hover: hover) { .o-setting-row:not(.o-field-row) .o-setting-row-act:hover:not(:disabled) { background-color: var(--vk-hovered); } }
|
|
111
|
+
.o-setting-row:not(.o-field-row) .o-setting-row-act:disabled { cursor: not-allowed; opacity: var(--vk-opacity-off); }
|
|
112
|
+
/* A state as a dot in its colour and its words in the text colour; with no colour, its words alone. */
|
|
113
|
+
.o-setting-row-said {
|
|
114
|
+
display: inline-flex; align-items: center; gap: calc(var(--vk-spacing) * 1.5); white-space: nowrap; color: var(--vk-fg);
|
|
115
|
+
font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm));
|
|
116
|
+
}
|
|
117
|
+
.o-setting-row-dot { flex: none; width: calc(var(--vk-spacing) * 1.5); height: calc(var(--vk-spacing) * 1.5); border-radius: var(--vk-radius-full); background-color: var(--setting-row-dot, var(--vk-fg-subtlest)); }
|
|
118
|
+
.o-setting-row-dot[data-colour="blue"] { --setting-row-dot: var(--vk-label-blue); }
|
|
119
|
+
.o-setting-row-dot[data-colour="green"] { --setting-row-dot: var(--vk-label-green); }
|
|
120
|
+
.o-setting-row-dot[data-colour="amber"] { --setting-row-dot: var(--vk-label-amber); }
|
|
121
|
+
.o-setting-row-dot[data-colour="red"] { --setting-row-dot: var(--vk-label-red); }
|
|
122
|
+
.o-setting-row-dot[data-colour="purple"] { --setting-row-dot: var(--vk-label-purple); }
|
|
123
|
+
.o-setting-row-dot[data-colour="pink"] { --setting-row-dot: var(--vk-label-pink); }
|
|
124
|
+
.o-setting-row-dot[data-colour="teal"] { --setting-row-dot: var(--vk-label-teal); }
|
|
125
|
+
/* A locked row under Words: its words greyed, its reason at the row's size. */
|
|
126
|
+
:where([data-setting-row-end="words"]) .o-setting-row[data-locked]:not(.o-field-row) :is(.o-choice-label, .o-choice-note) { color: var(--vk-fg-subtlest); }
|
|
127
|
+
:where([data-setting-row-end="words"]) .o-setting-row:not(.o-field-row) .o-setting-row-reason { font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); }
|
|
128
|
+
/* At the end: a Field in the card is its row (field.tsx), its error red in its note's place, its Input or InputGroup 256 wide at
|
|
129
|
+
the row's end, 64 tall at least under Inset, 16 above and below; every select at a row's end as wide as its value. */
|
|
130
|
+
.o-setting-row-field > .o-choice-text { flex: 1 1 auto; min-width: 0; }
|
|
131
|
+
.o-setting-row-field .o-setting-row-error { color: var(--vk-danger); }
|
|
132
|
+
.o-setting-row-field > .o-setting-row-end > :is(.o-input, .o-input-group) { width: calc(var(--vk-spacing) * 64); }
|
|
133
|
+
:where([data-setting-row-rows="inset"]) .o-setting-row-field { --setting-rows-height: calc(var(--vk-spacing) * 16); --setting-rows-pad: calc(var(--vk-spacing) * 4); }
|
|
134
|
+
:where([data-setting-row-fields="end"]) :is(.o-setting-row-select, .o-setting-row-end .o-select) { width: auto; }
|
|
135
|
+
:where([data-setting-row-fields="end"]) :is(.o-setting-row-select, .o-setting-row-end .o-select) .o-select-field { width: auto; }
|
|
136
|
+
/* Boxes: a Field placed in a computer's card stands as a row, the rows' room round it and the line above it. */
|
|
137
|
+
.o-setting-rows:not(.o-field-rows) > .o-field { box-sizing: border-box; padding: var(--setting-rows-pad, calc(var(--vk-spacing) * 3.5) calc(var(--vk-spacing) * 4)); border-top: var(--vk-border-width) solid var(--vk-border-subtle); }
|
|
138
|
+
.o-setting-rows:not(.o-field-rows) > .o-field:first-child { border-top: 0; }
|
|
139
|
+
|
|
65
140
|
/* ── On a phone: Field rows' card and rows; a setting's words, value and › in them ─────────────────────────────────── */
|
|
66
141
|
.o-setting-row.o-field-row > .o-choice-text { flex: 1 1 auto; }
|
|
67
142
|
.o-setting-row-press {
|
|
@@ -69,8 +144,54 @@ button.o-setting-row { width: 100%; font: inherit; color: inherit; text-align: l
|
|
|
69
144
|
border: 0; font: inherit; color: inherit; text-align: left; background-color: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
|
|
70
145
|
}
|
|
71
146
|
.o-setting-row.o-field-row .o-setting-row-end { flex: 0 1 auto; }
|
|
72
|
-
.o-setting-row.o-field-row .o-setting-row-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
|
|
73
|
-
.o-setting-rows-danger.o-field-rows .o-choice-label { color: var(--vk-danger); }
|
|
147
|
+
.o-setting-row.o-field-row .o-setting-row-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
148
|
+
.o-setting-rows-danger.o-field-rows :is(.o-choice-label, .o-setting-row-icon) { color: var(--vk-danger); }
|
|
149
|
+
.o-setting-row.o-field-row .o-setting-row-end { gap: calc(var(--vk-spacing) * 3); }
|
|
150
|
+
.o-setting-row.o-field-row .o-setting-row-value { max-width: calc(var(--vk-spacing) * 47.5); color: var(--vk-fg-subtlest); }
|
|
151
|
+
.o-setting-row-chevron[data-phone] {
|
|
152
|
+
width: calc(var(--vk-spacing) * 2.25); height: calc(var(--vk-spacing) * 3.75); margin: 0 calc(var(--vk-spacing) * 0.5) 0 calc(var(--vk-spacing) * 0.25); color: var(--vk-icon-disclosure);
|
|
153
|
+
}
|
|
154
|
+
/* One group, one way: a card where any row has a start (an icon, or a mark) gives every row the start's room, 28 an icon's or 32
|
|
155
|
+
when a mark stands in it, so every row's words stand in one line; and each row's rule starts at the words, as iOS's Settings. */
|
|
156
|
+
.o-setting-rows.o-field-rows:has(> .o-setting-row[data-setting-row-start]) { --setting-rows-start: calc(var(--vk-spacing) * 7); }
|
|
157
|
+
.o-setting-rows.o-field-rows:has(> .o-setting-row[data-setting-row-start="mark"]) { --setting-rows-start: calc(var(--vk-spacing) * 8); }
|
|
158
|
+
.o-setting-rows.o-field-rows:has(> .o-setting-row[data-setting-row-start]) > .o-setting-row:not([data-setting-row-start]) { padding-left: calc(var(--vk-spacing) * 7 + var(--setting-rows-start)); }
|
|
159
|
+
.o-setting-rows.o-field-rows:has(> .o-setting-row[data-setting-row-start]) > .o-setting-row + .o-setting-row {
|
|
160
|
+
background-position: calc(var(--vk-spacing) * 7 + var(--setting-rows-start)) 0;
|
|
161
|
+
background-size: calc(100% - var(--vk-spacing) * 7 - var(--setting-rows-start) - var(--field-rows-line-end, 0px)) var(--vk-border-width);
|
|
162
|
+
}
|
|
163
|
+
/* A button's words at the row's end, a press of their own, a finger's height. */
|
|
164
|
+
.o-setting-row-act {
|
|
165
|
+
display: inline-flex; align-items: center; min-height: calc(var(--vk-spacing) * 11); margin: 0; padding: 0; border: 0; border-radius: var(--vk-radius-md);
|
|
166
|
+
font: inherit; font-size: var(--vk-font-size-sm); line-height: calc(var(--vk-font-size-sm) * var(--vk-line-height-sm)); white-space: nowrap; color: var(--vk-fg-brand); background-color: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
|
|
167
|
+
}
|
|
168
|
+
.o-setting-row-act:focus-visible { outline: var(--vk-focus-width) solid var(--vk-border-brand); outline-offset: var(--vk-focus-offset); }
|
|
169
|
+
.o-setting-row-act:disabled { cursor: not-allowed; }
|
|
170
|
+
/* A lone row: the row the press, its name in the link colour. */
|
|
171
|
+
.o-setting-row.o-field-row[data-alone] .o-choice-label { color: var(--vk-fg-brand); }
|
|
172
|
+
/* Locked: faded, but its line (the reason) kept; its Switch fades itself (switch.css). */
|
|
173
|
+
.o-setting-row.o-field-row[data-locked] :is(.o-choice-label, .o-setting-row-icon, .o-setting-row-value, .o-setting-row-chevron, .o-setting-row-act),
|
|
174
|
+
.o-setting-row.o-field-row[data-locked] > :first-child:not(.o-choice-text, .o-setting-row-press),
|
|
175
|
+
.o-setting-row.o-field-row[data-locked] > .o-setting-row-press > :first-child:not(.o-choice-text) { opacity: var(--vk-opacity-off); }
|
|
176
|
+
|
|
177
|
+
/* ── Its icon on a phone, by the Icon option: Line, nothing picked, the glyph alone in the subtle text in a 28 box; Tile, a white
|
|
178
|
+
glyph on a 28 tile of the colour the app passed (data-colour, a label colour), grey when it passed none. The danger zone's
|
|
179
|
+
icons stay lines. Drawn wherever it stands on a phone, a row's start or a list's (SettingIcon). ─────────────────────────── */
|
|
180
|
+
.o-setting-row-icon:where([data-vk-phone], [data-vk-phone] *) {
|
|
181
|
+
width: calc(var(--vk-spacing) * 7); height: calc(var(--vk-spacing) * 7); border: 0; border-radius: 0; background-color: transparent; color: var(--vk-fg-subtle);
|
|
182
|
+
}
|
|
183
|
+
.o-setting-row-icon:where([data-vk-phone], [data-vk-phone] *) > svg { width: calc(var(--vk-spacing) * 5.5); height: calc(var(--vk-spacing) * 5.5); stroke-width: calc(var(--vk-spacing) * 0.4); }
|
|
184
|
+
:where([data-setting-row-icon="tile"]) .o-setting-row-icon:where([data-vk-phone], [data-vk-phone] *):not(.o-setting-rows-danger *) {
|
|
185
|
+
border-radius: var(--vk-radius-md); background-color: var(--setting-row-tile, var(--vk-fg-subtlest)); color: var(--vk-fg-inverse);
|
|
186
|
+
}
|
|
187
|
+
:where([data-setting-row-icon="tile"]) .o-setting-row-icon:where([data-vk-phone], [data-vk-phone] *):not(.o-setting-rows-danger *) > svg { width: calc(var(--vk-spacing) * 4.5); height: calc(var(--vk-spacing) * 4.5); stroke-width: calc(var(--vk-spacing) * 0.5); }
|
|
188
|
+
.o-setting-row-icon[data-colour="blue"] { --setting-row-tile: var(--vk-label-blue); }
|
|
189
|
+
.o-setting-row-icon[data-colour="green"] { --setting-row-tile: var(--vk-label-green); }
|
|
190
|
+
.o-setting-row-icon[data-colour="amber"] { --setting-row-tile: var(--vk-label-amber); }
|
|
191
|
+
.o-setting-row-icon[data-colour="red"] { --setting-row-tile: var(--vk-label-red); }
|
|
192
|
+
.o-setting-row-icon[data-colour="purple"] { --setting-row-tile: var(--vk-label-purple); }
|
|
193
|
+
.o-setting-row-icon[data-colour="pink"] { --setting-row-tile: var(--vk-label-pink); }
|
|
194
|
+
.o-setting-row-icon[data-colour="teal"] { --setting-row-tile: var(--vk-label-teal); }
|
|
74
195
|
|
|
75
196
|
@media (prefers-reduced-motion: reduce) { .o-setting-row { transition: none; } }
|
|
76
197
|
|
|
@@ -79,13 +200,13 @@ button.o-setting-row { width: 100%; font: inherit; color: inherit; text-align: l
|
|
|
79
200
|
control's is. Nothing stands outside it (its rows were hidden past its edge), so it is clipped itself, its rows with it; its
|
|
80
201
|
edge is a ring along the curve over its rows (::after), in the card's edge colour. ── */
|
|
81
202
|
@supports (clip-path: shape(evenodd from 0 0, curve by 1px 1px with 1px 0 / 1px 0, close, move to 0 0, hline to 1px, close)) and (width: calc(tan(atan2(1px, 1px)) * 1px)) {
|
|
82
|
-
.o-setting-rows:not(.o-field-rows) {
|
|
203
|
+
.o-setting-rows:not(.o-field-rows), :where([data-setting-row-card="edged"]) .o-setting-row[data-alone]:not(.o-field-row) {
|
|
83
204
|
--smooth-amount: var(--vk-corner-smoothing);
|
|
84
205
|
--setting-rows-fit: min(var(--vk-radius-lg), var(--setting-rows-side, calc(var(--vk-spacing) * 7 + var(--vk-font-size-sm) * var(--vk-line-height-sm))) / (2 + 2 * var(--smooth-amount, 0.7)));
|
|
85
206
|
--smooth-t: var(--setting-rows-fit); --smooth-side: var(--setting-rows-side, calc(var(--vk-spacing) * 7 + var(--vk-font-size-sm) * var(--vk-line-height-sm)));
|
|
86
207
|
position: relative; overflow: visible; border-color: transparent; border-radius: var(--setting-rows-fit); clip-path: shape(var(--smooth-outline));
|
|
87
208
|
}
|
|
88
|
-
.o-setting-rows:not(.o-field-rows)::after {
|
|
209
|
+
.o-setting-rows:not(.o-field-rows)::after, :where([data-setting-row-card="edged"]) .o-setting-row[data-alone]:not(.o-field-row)::after {
|
|
89
210
|
--smooth-t: max(0px, var(--setting-rows-fit) - var(--vk-border-width)); --smooth-in: var(--vk-border-width);
|
|
90
211
|
content: ""; position: absolute; inset: calc(var(--vk-border-width) * -1); z-index: 1; pointer-events: none;
|
|
91
212
|
background-color: var(--setting-rows-edge, var(--vk-border)); clip-path: shape(var(--smooth-ring));
|
|
@@ -10,8 +10,10 @@ export declare const SheetClose: ({ children }: {
|
|
|
10
10
|
children: React.ReactElement;
|
|
11
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export interface SheetHeadProps {
|
|
13
|
-
/** What it is:
|
|
13
|
+
/** What it is: its words. */
|
|
14
14
|
title: React.ReactNode;
|
|
15
|
+
/** A record's mark beside its title, as the header bar draws it (the Avatar at 24). */
|
|
16
|
+
mark?: React.ReactNode;
|
|
15
17
|
/** Its name to screen readers where the title says it otherwise (a mark beside the words, other words): the title is what
|
|
16
18
|
* names the sheet, so this names the title. */
|
|
17
19
|
titleLabel?: string;
|
|
@@ -23,6 +25,8 @@ export interface SheetHeadProps {
|
|
|
23
25
|
close?: boolean;
|
|
24
26
|
/** Back: to the step before, or out of the sheet. In Glass it takes the X's place, and the sheet closes by a drag or the dim. */
|
|
25
27
|
onBack?: () => void;
|
|
28
|
+
/** Back's public name (VK-989): a field editor's step hands `vk-editor-back`, drawn on its ‹ as `data-slot`. */
|
|
29
|
+
backSlot?: string;
|
|
26
30
|
/** The X's and Back's names to a screen reader; English unless handed. */
|
|
27
31
|
words?: {
|
|
28
32
|
close?: string;
|
|
@@ -33,6 +37,12 @@ export interface SheetHeadProps {
|
|
|
33
37
|
right?: React.ReactNode;
|
|
34
38
|
/** What stands on its right: a ⋯, or two SheetButtons. */
|
|
35
39
|
children?: React.ReactNode;
|
|
40
|
+
/** The step it heads, as its body's SheetStep names it: its row is drawn afresh for each step and what stands in it slides in
|
|
41
|
+
* with the step, from the left going back. Left off, it changes in place. */
|
|
42
|
+
step?: {
|
|
43
|
+
id: string;
|
|
44
|
+
back?: boolean;
|
|
45
|
+
};
|
|
36
46
|
}
|
|
37
47
|
/** A button in its head. Its head is an option on the frame around it, which only sheet.css reads, so both are drawn and it
|
|
38
48
|
* shows one: under Glass the Glass button, under Flat a quiet Button. Primary, for what confirms, is primary in both. It holds
|
|
@@ -45,11 +55,13 @@ export declare function SheetButton({ className, kind, children, ...props }: {
|
|
|
45
55
|
className?: string;
|
|
46
56
|
kind?: "primary";
|
|
47
57
|
disabled?: boolean;
|
|
58
|
+
/** Its public name (VK-989), drawn on both its forms: the editors' ✕ and ✓ hand `vk-editor-close` and `vk-editor-save`. */
|
|
59
|
+
"data-slot"?: string;
|
|
48
60
|
}): import("react/jsx-runtime").JSX.Element;
|
|
49
61
|
/** Its head, one of its kinds: the one header (HeaderBar), under its handle. Glass has on its left the X, or Back in its place, and on its right one action, or two, as the phone header's Two buttons says.
|
|
50
62
|
* Flat has Back on its left, if there is one, and its action and the X on its right. Or Decide, a button either side of its
|
|
51
63
|
* title. A sheet with no head is its handle alone. */
|
|
52
|
-
export declare function SheetHead({ title, titleLabel, titleAt, description, close, onBack, left, right, children, words }: SheetHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare function SheetHead({ title, mark, titleLabel, titleAt, description, close, onBack, backSlot, left, right, children, words, step }: SheetHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
53
65
|
/** Its foot: stays at the foot of the screen at every stop, and leaves with the sheet. */
|
|
54
66
|
export declare const SheetFoot: ({ children }: {
|
|
55
67
|
children: React.ReactNode;
|
|
@@ -2,9 +2,11 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Drawer as Base } from "@base-ui/react/drawer";
|
|
4
4
|
import { cx } from "../../internal/cx.js";
|
|
5
|
+
import { OutOfFieldRows } from "../../internal/field-rows.js";
|
|
5
6
|
import { Button } from "../button/button.js";
|
|
6
7
|
import { GlassButton } from "../glass-button/glass-button.js";
|
|
7
8
|
import { closeReasonOf } from "../internal/close-reason.js";
|
|
9
|
+
import { useKeptFocus } from "../internal/keep-focus.js";
|
|
8
10
|
import { drawnAt, typesInto } from "../internal/scroll.js";
|
|
9
11
|
import { HeaderBar } from "../phone-header/header-bar.js";
|
|
10
12
|
import { Scrollbar } from "../scrollbar/scrollbar.js";
|
|
@@ -20,10 +22,10 @@ export const SheetClose = ({ children }) => _jsx(Base.Close, { render: children
|
|
|
20
22
|
export function SheetButton({ className, kind, children, ...props }) {
|
|
21
23
|
return _jsxs(_Fragment, { children: [_jsx(GlassButton, { ...props, kind: kind, className: cx("o-sheet-glass", className), children: children }), _jsx(Button, { ...props, kind: kind ?? "quiet", shape: children == null ? "icon" : undefined, className: cx("o-sheet-plain", className), children: children })] });
|
|
22
24
|
}
|
|
23
|
-
export function SheetHead({ title, titleLabel, titleAt, description, close = true, onBack, left, right, children, words }) {
|
|
25
|
+
export function SheetHead({ title, mark, titleLabel, titleAt, description, close = true, onBack, backSlot, left, right, children, words, step }) {
|
|
24
26
|
const closeWord = words?.close ?? "Close", backWord = words?.back ?? "Back";
|
|
25
27
|
const sides = left != null || right != null;
|
|
26
|
-
return (_jsx("div", { className: "o-sheet-head", children: _jsx(HeaderBar, { className: "o-sheet-row", titleAt: titleAt, "data-sides": sides ? "" : undefined, left: sides ? left : onBack ? _jsx(SheetButton, { "aria-label": backWord, className: "o-sheet-back", icon: glyph(BACK), onClick: onBack }) : close && _jsx(Base.Close, { render: _jsx(GlassButton, { "aria-label": closeWord, className: "o-sheet-glass", icon: glyph(X) }) }), title: _jsx(Base.Title, { className: "o-sheet-title", "aria-label": titleLabel, children: title }), description: description, descriptionRender: _jsx(Base.Description, {}), right: sides ? right : _jsxs(_Fragment, { children: [children, close && _jsx(Base.Close, { render: _jsx(Button, { kind: "quiet", shape: "icon", "aria-label": closeWord, className: "o-sheet-plain", icon: glyph(X) }) })] }) }) }));
|
|
28
|
+
return (_jsx("div", { className: "o-sheet-head", children: _jsx(HeaderBar, { className: "o-sheet-row", titleAt: titleAt, mark: mark, "data-sides": sides ? "" : undefined, "data-step": step ? (step.back ? "back" : "in") : undefined, left: sides ? left : onBack ? _jsx(SheetButton, { "aria-label": backWord, className: "o-sheet-back", icon: glyph(BACK), onClick: onBack, ...(backSlot ? { "data-slot": backSlot } : {}) }) : close && _jsx(Base.Close, { render: _jsx(GlassButton, { "aria-label": closeWord, className: "o-sheet-glass", icon: glyph(X) }) }), title: _jsx(Base.Title, { className: "o-sheet-title", "aria-label": titleLabel, children: title }), description: description, descriptionRender: _jsx(Base.Description, {}), right: sides ? right : _jsxs(_Fragment, { children: [children, close && _jsx(Base.Close, { render: _jsx(Button, { kind: "quiet", shape: "icon", "aria-label": closeWord, className: "o-sheet-plain", icon: glyph(X) }) })] }) }, step?.id) }));
|
|
27
29
|
}
|
|
28
30
|
export const SheetFoot = ({ children }) => _jsx("div", { className: "o-sheet-foot", children: children });
|
|
29
31
|
export const SheetBody = React.forwardRef(function SheetBody({ onScroll, children }, ref) {
|
|
@@ -305,6 +307,7 @@ export function Sheet({ open, onOpenChange, onOpenChangeComplete, label, form =
|
|
|
305
307
|
const { release } = useSheetMotion({ on: true, open, form, standing, points, point, popup, viewport, backdrop });
|
|
306
308
|
useFit(form === "floating" || form === "edge", popup, open);
|
|
307
309
|
useKeyboardFoot(popup, open && !standing);
|
|
310
|
+
useKeptFocus(popup);
|
|
308
311
|
React.useEffect(() => {
|
|
309
312
|
if (form === "full" || form === "edge" || !popup)
|
|
310
313
|
return;
|
|
@@ -372,5 +375,5 @@ export function Sheet({ open, onOpenChange, onOpenChangeComplete, label, form =
|
|
|
372
375
|
}, children: _jsxs(Base.Portal, { container: container, children: [_jsx(Base.Backdrop, { ref: backdrop, forceRender: stacked, className: "o-sheet-backdrop", "data-stacked": stacked ? "" : undefined }), _jsxs(Base.Viewport, { ref: setViewport, className: "o-sheet-viewport", "data-sheet-form": form, onClick: standing ? (e) => { if (e.target === e.currentTarget) {
|
|
373
376
|
release("closed");
|
|
374
377
|
close("outside-press");
|
|
375
|
-
} } : undefined, children: [_jsx(Base.Popup, { ref: bindPopup, initialFocus: popupRef, finalFocus: finalFocus ? () => finalFocus() ?? true : undefined, className: cx("o-sheet o-smooth", className), "data-sheet-form": form, "aria-label": label, "data-kit": "sheet", children: _jsxs("div", { className: "o-sheet-cut", children: [_jsx("div", { className: "o-sheet-handle", "aria-hidden": "true" }), _jsx(Standing.Provider, { value: standing, children: _jsx(Body.Provider, { value: body, children: _jsx(CloseAll.Provider, { value: closeAll, children: children }) }) })] }) }), coming && _jsx("div", { className: "o-sheet-shield", "aria-hidden": "true", "data-sheet-shield": "", onPointerDown: (e) => { e.preventDefault(); e.stopPropagation(); }, onMouseDown: (e) => { e.preventDefault(); e.stopPropagation(); }, onClick: (e) => e.stopPropagation() })] })] }) }));
|
|
378
|
+
} } : undefined, children: [_jsx(Base.Popup, { ref: bindPopup, initialFocus: popupRef, finalFocus: finalFocus ? () => finalFocus() ?? true : undefined, className: cx("o-sheet o-smooth", className), "data-sheet-form": form, "aria-label": label, "data-kit": "sheet", children: _jsxs("div", { className: "o-sheet-cut", children: [_jsx("div", { className: "o-sheet-handle", "aria-hidden": "true" }), _jsx(Standing.Provider, { value: standing, children: _jsx(Body.Provider, { value: body, children: _jsx(CloseAll.Provider, { value: closeAll, children: _jsx(OutOfFieldRows, { children: children }) }) }) })] }) }), coming && _jsx("div", { className: "o-sheet-shield", "aria-hidden": "true", "data-sheet-shield": "", onPointerDown: (e) => { e.preventDefault(); e.stopPropagation(); }, onMouseDown: (e) => { e.preventDefault(); e.stopPropagation(); }, onClick: (e) => e.stopPropagation() })] })] }) }));
|
|
376
379
|
}
|
|
@@ -21,6 +21,6 @@ export function MapSheet({ open, onOpenChange, title, label, description, action
|
|
|
21
21
|
return (_jsxs(Sheet, { open: open, onOpenChange: (next, d) => onOpenChange(next, { reason: d.reason }), label: name, ...SNAP_FORM[snap ?? "full"], className: className, children: [parts
|
|
22
22
|
? _jsx(SheetHead, { title: parts.title, ...parts.head, words: words })
|
|
23
23
|
: actions && left
|
|
24
|
-
? _jsx(SheetHead, { title: shown, titleLabel: titleLabel, description: description, left: _jsx(SheetButton, { "aria-label": left.label, className: actions.back ? "o-sheet-back" : undefined, icon: actions.back ? _jsx(Back, {}) : _jsx(Close, {}), onClick: left.onPress }), right: actions.done ? _jsx(SheetButton, { kind: "primary", "aria-label": actions.done.label, icon: _jsx(Check, {}), onClick: actions.done.onPress }) : _jsx("span", {}) })
|
|
24
|
+
? _jsx(SheetHead, { title: shown, titleLabel: titleLabel, description: description, left: _jsx(SheetButton, { "data-slot": actions.back ? "vk-editor-back" : "vk-editor-close", "aria-label": left.label, className: actions.back ? "o-sheet-back" : undefined, icon: actions.back ? _jsx(Back, {}) : _jsx(Close, {}), onClick: left.onPress }), right: actions.done ? _jsx(SheetButton, { "data-slot": "vk-editor-save", kind: "primary", "aria-label": actions.done.label, icon: _jsx(Check, {}), onClick: actions.done.onPress }) : _jsx("span", {}) })
|
|
25
25
|
: (title != null || description != null) && _jsx(SheetHead, { title: shown, titleLabel: titleLabel, description: description, words: words }), _jsx(SheetBody, { children: _jsx(SheetPartsFrom.Provider, { value: setParts, children: children }) }), parts?.foot && _jsx(SheetFoot, { children: parts.foot })] }));
|
|
26
26
|
}
|
|
@@ -211,6 +211,9 @@
|
|
|
211
211
|
sideways (a full Sheet's body scrolls, and a step's slide would otherwise widen it). */
|
|
212
212
|
.o-sheet-step { outline: none; }
|
|
213
213
|
.o-sheet-body:has(.o-sheet-step) { overflow-x: hidden; }
|
|
214
|
+
/* A head that heads a step slides in with it: what stands in its row, its ground (the soft edge) staying still. */
|
|
215
|
+
.o-sheet-row[data-step] > :not(.o-hd-bar-edge) { --step-from: calc(var(--vk-spacing) * 6); animation: o-sheet-step var(--vk-duration-slow) var(--vk-ease-out); }
|
|
216
|
+
.o-sheet-row[data-step="back"] > :not(.o-hd-bar-edge) { --step-from: calc(var(--vk-spacing) * -6); }
|
|
214
217
|
|
|
215
218
|
/* Less motion: a fade, no scale. */
|
|
216
219
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -218,6 +221,6 @@
|
|
|
218
221
|
.o-sheet:is([data-starting-style], [data-ending-style]) { opacity: 0; transform: translateY(var(--drawer-snap-point-offset, 0px)); }
|
|
219
222
|
.o-sheet[data-nested-drawer-open] { scale: 1; }
|
|
220
223
|
.o-sheet-backdrop { transition: opacity var(--vk-duration-base) var(--vk-ease-out); }
|
|
221
|
-
.o-sheet-step { animation: none; }
|
|
224
|
+
.o-sheet-step, .o-sheet-row[data-step] > :not(.o-hd-bar-edge) { animation: none; }
|
|
222
225
|
}
|
|
223
226
|
}
|
|
@@ -6,4 +6,5 @@ import type { SortEditorWords } from "./words.js";
|
|
|
6
6
|
export declare function sortEditorWordsOf(say: ViewsMessageResolver): SortEditorWords;
|
|
7
7
|
/** ViewKit's sort body's props as the sort editor's. */
|
|
8
8
|
export declare function sortEditorPropsOf(p: ViewsSortBodyProps, words: SortEditorWords, say?: ViewsMessageResolver): SortEditorProps;
|
|
9
|
+
/** ViewKit's sort body, its controls the app's where the provider's `panelControls` names them (VK-1013). */
|
|
9
10
|
export declare function MapSortBody(props: ViewsSortBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import { resolveViewsMessage } from "../../contract.js";
|
|
5
5
|
import { ViewsContext } from "../../provider/context.js";
|
|
6
6
|
import { glyph, TICK, X } from "../internal/editor-parts.js";
|
|
7
|
+
import { PanelControlsFromViews } from "../internal/map-panel-controls.js";
|
|
7
8
|
import { useToldStep } from "../internal/told-step.js";
|
|
8
9
|
import { pickerWordsOf } from "../picker/map-picker.js";
|
|
9
10
|
import { HeaderBar } from "../phone-header/header-bar.js";
|
|
@@ -66,6 +67,9 @@ export function sortEditorPropsOf(p, words, say = resolveViewsMessage) {
|
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
export function MapSortBody(props) {
|
|
70
|
+
return _jsx(PanelControlsFromViews, { children: _jsx(SortBodyInner, { ...props }) });
|
|
71
|
+
}
|
|
72
|
+
function SortBodyInner(props) {
|
|
69
73
|
const views = React.useContext(ViewsContext);
|
|
70
74
|
const messages = views?.messages ?? resolveViewsMessage;
|
|
71
75
|
const words = React.useMemo(() => sortEditorWordsOf(messages), [messages]);
|
|
@@ -74,8 +78,8 @@ export function MapSortBody(props) {
|
|
|
74
78
|
const { actions } = props;
|
|
75
79
|
if (!actions)
|
|
76
80
|
return _jsx(_Fragment, { children: parts.body });
|
|
77
|
-
const done = actions.done && _jsx(SheetButton, { kind: "primary", "aria-label": actions.done.label, icon: glyph(TICK), onClick: actions.done.onPress });
|
|
81
|
+
const done = actions.done && _jsx(SheetButton, { "data-slot": "vk-editor-save", kind: "primary", "aria-label": actions.done.label, icon: glyph(TICK), onClick: actions.done.onPress });
|
|
78
82
|
return (_jsxs(_Fragment, { children: [parts.title !== undefined
|
|
79
|
-
? _jsx(BodyHead, { title: parts.title, left: _jsx(SheetButton, { "aria-label": words.back, className: "o-sheet-back", icon: glyph(BACK), onClick: parts.head.onBack }), right: done || _jsx("span", {}) })
|
|
80
|
-
: _jsx(BodyHead, { title: props.label, left: _jsx(SheetButton, { "aria-label": actions.close.label, icon: glyph(X), onClick: actions.close.onPress }), right: done || _jsx("span", {}) }), parts.body] }));
|
|
83
|
+
? _jsx(BodyHead, { title: parts.title, left: _jsx(SheetButton, { "data-slot": "vk-editor-back", "aria-label": words.back, className: "o-sheet-back", icon: glyph(BACK), onClick: parts.head.onBack }), right: done || _jsx("span", {}) })
|
|
84
|
+
: _jsx(BodyHead, { title: props.label, left: _jsx(SheetButton, { "data-slot": "vk-editor-close", "aria-label": actions.close.label, icon: glyph(X), onClick: actions.close.onPress }), right: done || _jsx("span", {}) }), parts.body] }));
|
|
81
85
|
}
|