viewkitjs 0.32.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 +69 -0
- package/fields/dist/index.d.ts +1 -1
- package/fields/dist/index.js +1 -1
- package/fields/dist/query/evaluate.d.ts +7 -0
- package/fields/dist/query/exact-number.d.ts +8 -2
- package/fields/dist/query/exact-number.js +14 -1
- package/fields/dist/query/sort.js +13 -10
- package/fields/dist/registry.js +5 -1
- package/fields/dist/types.d.ts +4 -1
- package/fields/dist/zod.d.ts +5 -0
- package/fields/dist/zod.js +10 -1
- package/fields/docs/guides/contact-values.md +12 -0
- package/fields/docs/guides/field-types.md +1 -1
- package/fields/docs/guides/queries.md +3 -1
- package/fields/docs/reference/fields.md +1 -0
- package/package.json +1 -1
- package/postgres/dist/check.js +4 -1
- package/postgres/dist/definitions/formula-forms.js +3 -1
- package/postgres/dist/definitions/money.js +2 -1
- package/postgres/dist/page.js +6 -3
- package/postgres/dist/rules.d.ts +15 -1
- package/postgres/dist/rules.js +16 -0
- package/postgres/dist/sort.js +7 -2
- package/postgres/docs/guides/definitions.md +1 -1
- package/postgres/docs/guides/field-map.md +1 -1
- package/postgres/docs/reference/definitions.md +1 -1
- package/postgres/docs/reference/postgres.md +1 -1
- package/views/dist/atoms/ToolbarButton.d.ts +1 -1
- package/views/dist/atoms/ToolbarButton.js +4 -3
- package/views/dist/atoms/frame-parts.d.ts +6 -0
- package/views/dist/atoms/frame-parts.js +15 -0
- package/views/dist/atoms/types.d.ts +16 -7
- package/views/dist/cells/cell-title.d.ts +3 -1
- package/views/dist/cells/cell-title.js +2 -2
- package/views/dist/cells/cell-values.js +2 -2
- package/views/dist/contract.d.ts +31 -6
- package/views/dist/contract.js +123 -0
- package/views/dist/controls/button/map-button.js +2 -0
- package/views/dist/controls/checkbox/checkbox.d.ts +3 -2
- package/views/dist/controls/checkbox/checkbox.js +2 -2
- package/views/dist/controls/compound-editor/compound-editor.d.ts +1 -1
- package/views/dist/controls/compound-editor/name-parts.js +4 -4
- package/views/dist/controls/compound-editor/place-parts.js +19 -19
- package/views/dist/controls/compound-editor/range-parts.js +14 -14
- package/views/dist/controls/compound-editor/row.d.ts +3 -1
- package/views/dist/controls/compound-editor/row.js +2 -2
- package/views/dist/controls/controls.d.ts +2 -0
- package/views/dist/controls/controls.js +2 -0
- 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 +4 -0
- 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 +3 -0
- package/views/dist/controls/field/field.js +6 -6
- package/views/dist/controls/filter-editor/block.d.ts +2 -2
- package/views/dist/controls/filter-editor/block.js +5 -5
- package/views/dist/controls/filter-editor/filter-editor.js +31 -33
- package/views/dist/controls/filter-editor/how.d.ts +3 -1
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +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/group-editor/group-editor.js +15 -13
- package/views/dist/controls/index.d.ts +2 -0
- package/views/dist/controls/index.js +1 -0
- package/views/dist/controls/input/input.js +2 -2
- package/views/dist/controls/input/map-input.js +2 -0
- package/views/dist/controls/internal/editor-parts.js +1 -1
- package/views/dist/controls/internal/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/links-editor/links-editor.d.ts +1 -1
- package/views/dist/controls/links-editor/links-editor.js +27 -27
- package/views/dist/controls/menu/map-menu.d.ts +2 -2
- package/views/dist/controls/menu/map-menu.js +15 -12
- package/views/dist/controls/menu/menu.d.ts +2 -0
- package/views/dist/controls/menu/menu.js +3 -3
- package/views/dist/controls/menu-list/menu-list.d.ts +14 -4
- package/views/dist/controls/menu-list/menu-list.js +23 -22
- package/views/dist/controls/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 +4 -4
- package/views/dist/controls/picker/picker.d.ts +2 -0
- package/views/dist/controls/picker/picker.js +37 -36
- package/views/dist/controls/picker/rows.d.ts +4 -0
- package/views/dist/controls/popover/map-popover.d.ts +1 -1
- package/views/dist/controls/popover/map-popover.js +4 -2
- package/views/dist/controls/quick-filters/quick-filters.js +4 -4
- package/views/dist/controls/radio/radio.d.ts +3 -0
- package/views/dist/controls/radio/radio.js +4 -3
- package/views/dist/controls/select/map-select.d.ts +3 -0
- package/views/dist/controls/select/map-select.js +8 -0
- package/views/dist/controls/select/select.d.ts +3 -0
- package/views/dist/controls/select/select.js +3 -3
- package/views/dist/controls/sheet/bottom-sheet.d.ts +5 -1
- package/views/dist/controls/sheet/bottom-sheet.js +2 -2
- package/views/dist/controls/sheet/map-sheet.js +1 -1
- package/views/dist/controls/sort-editor/map-sort-body.d.ts +1 -0
- package/views/dist/controls/sort-editor/map-sort-body.js +7 -3
- package/views/dist/controls/sort-editor/sort-editor.js +24 -26
- package/views/dist/controls/sort-editor.css +5 -0
- package/views/dist/controls/text-editor/text-editor.d.ts +1 -1
- package/views/dist/controls/text-editor/text-editor.js +8 -8
- package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +3 -3
- package/views/dist/controls/toolbar-button/atom-toolbar-button.js +7 -6
- package/views/dist/controls/values-editor/values-editor.d.ts +1 -1
- package/views/dist/controls/values-editor/values-editor.js +22 -22
- package/views/dist/controls/views-list/map-view-menu.js +1 -1
- package/views/dist/controls/views-list/view-menu.js +6 -6
- package/views/dist/controls/views-list/views-list.js +4 -4
- package/views/dist/editors/EditorPanel.js +1 -1
- package/views/dist/field-row/FieldRow.js +13 -0
- package/views/dist/fields/money.d.ts +5 -2
- package/views/dist/fields/money.js +14 -2
- package/views/dist/grid/chrome/GridTable.js +4 -1
- package/views/dist/grid/chrome/cell-clipboard.d.ts +4 -2
- package/views/dist/grid/chrome/cell-clipboard.js +2 -2
- package/views/dist/grid/chrome/cells.js +3 -1
- package/views/dist/grid/chrome/grid-row-menu-items.js +1 -1
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -1
- package/views/dist/grid/chrome/useGridKeyboard.js +29 -6
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +9 -2
- package/views/dist/grid/core/clipboard-model.d.ts +3 -1
- package/views/dist/grid/core/clipboard-model.js +9 -8
- package/views/dist/grid/core/editing-controller.d.ts +3 -0
- package/views/dist/grid/core/editing-controller.js +6 -0
- package/views/dist/grid/core/edits-sink.d.ts +19 -0
- package/views/dist/grid/core/edits-sink.js +2 -0
- package/views/dist/grid/core/spreadsheet-operations.js +1 -1
- package/views/dist/grid/core/useGridEditing.d.ts +5 -0
- package/views/dist/grid/core/useGridEditing.js +6 -0
- package/views/dist/list/answer.d.ts +40 -0
- package/views/dist/list/answer.js +43 -0
- package/views/dist/list/bulk-bar.d.ts +7 -0
- package/views/dist/list/bulk-bar.js +10 -0
- package/views/dist/list/columns.d.ts +24 -0
- package/views/dist/list/columns.js +27 -0
- package/views/dist/list/edits.d.ts +19 -0
- package/views/dist/list/edits.js +56 -0
- package/views/dist/list/grid.d.ts +11 -0
- package/views/dist/list/grid.js +76 -0
- package/views/dist/list/index.d.ts +14 -1
- package/views/dist/list/index.js +4 -1
- package/views/dist/list/link.d.ts +8 -0
- package/views/dist/list/link.js +78 -0
- package/views/dist/list/list.d.ts +70 -0
- package/views/dist/list/list.js +14 -0
- package/views/dist/list/parts.js +10 -3
- package/views/dist/list/root-base.d.ts +46 -0
- package/views/dist/list/root-base.js +137 -0
- package/views/dist/list/root.d.ts +35 -34
- package/views/dist/list/root.js +153 -113
- package/views/dist/list/source-answers.d.ts +39 -0
- package/views/dist/list/source-answers.js +225 -0
- package/views/dist/list/store.d.ts +37 -5
- package/views/dist/list/store.js +31 -0
- package/views/dist/list/toolbar.d.ts +3 -2
- package/views/dist/list/toolbar.js +14 -2
- package/views/dist/list/views-axis.js +4 -2
- package/views/dist/list/views.d.ts +7 -2
- package/views/dist/list/views.js +16 -5
- package/views/dist/model/column-capabilities.d.ts +13 -0
- package/views/dist/model/column-capabilities.js +23 -2
- package/views/dist/model/column-schema.d.ts +11 -1
- package/views/dist/model/view-rules.js +1 -0
- package/views/dist/panels/model.d.ts +2 -0
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +8 -2
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +2 -2
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +8 -1
- package/views/dist/panels/react/toolbar/Toolbar.js +12 -3
- 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 +4 -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 +1 -1
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSort.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +6 -4
- package/views/dist/panels/react/toolbar/context.d.ts +10 -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/settings/filter-groups.js +6 -1
- package/views/dist/provider/ViewsProvider.d.ts +6 -2
- package/views/dist/provider/ViewsProvider.js +18 -1
- package/views/dist/provider/components.d.ts +59 -0
- package/views/dist/provider/components.js +1 -1
- package/views/dist/provider/context.d.ts +4 -1
- package/views/dist/provider/own-control.d.ts +4 -0
- package/views/dist/provider/own-control.js +7 -0
- package/views/dist/provider/select-items.d.ts +3 -0
- package/views/dist/provider/select-items.js +6 -0
- package/views/dist/react.d.ts +4 -2
- package/views/dist/react.js +2 -0
- package/views/dist/styles.css +86 -78
- package/views/dist/styles.unlayered.css +86 -78
- package/views/docs/contract.md +252 -5
- 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 +4 -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 +4 -0
- package/views/docs/controls/links-editor.md +4 -0
- package/views/docs/controls/menu-list.md +8 -0
- package/views/docs/controls/menu.md +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 +4 -0
- package/views/docs/controls/select.md +8 -0
- package/views/docs/controls/sheet.md +4 -0
- package/views/docs/controls/sort-editor.md +8 -0
- package/views/docs/controls/text-editor.md +4 -0
- package/views/docs/controls/values-editor.md +4 -0
- package/views/docs/controls/views-list.md +6 -0
- package/views/docs/guides/the-grid.md +2 -2
- package/views/docs/guides/the-provider.md +19 -2
- package/views/docs/reference/controls.md +7 -5
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +1 -1
- package/views/docs/reference/list.md +141 -11
- package/views/docs/reference/panels-react.md +2 -2
- package/views/docs/reference/react.md +15 -9
- package/views/docs/reference/views.md +8 -4
- package/views/docs/reshaping.md +6 -1
package/views/docs/contract.md
CHANGED
|
@@ -427,17 +427,21 @@ grid's editors and menus use, each in Base UI's shape, and an adapter on Radix a
|
|
|
427
427
|
both fill every one.
|
|
428
428
|
|
|
429
429
|
**Defaults for an app that hands none:** `CONTROLS`, from `viewkitjs/views/controls`, holds ViewKit's default controls,
|
|
430
|
-
the Outright kit's, on Base UI: its controls (the Button, the Popover, the Sheet, the Input, the Checkbox, the Tooltip, the Menu), the Text editor as its `TextBody`, the Picker as its `Picker` and `FieldsBody`, the Date editor as its `DateBody`, the Date editor's days as its `Calendar`, the Compound editor as its `PartsBody`, the Number editor as its `NumberBody`, the Values editor as its `ValuesBody`, the Links editor as its `LinksBody`, and of the panels the sort editor as its `SortBody`, the views list as its `ViewsListBody` and a view's menu as its `ViewMenu`, the filter editor as its `FilterBody` and `FilterPartBody` and the group editor as its `GroupBody`, Customize as its `CustomizeBody`, the quick filters as its `QuickFiltersBody`, the bulk bar as its `SelectionBar`; and of the panels' controls the Collapsible as its `Collapse`; and `PortsHost`, ViewKit's Toast and alert dialog for the `toast` and `confirm` ports an app leaves out; and `AppIcon`, ViewKit's own glyphs by name (`CONTROL_ICONS`), and `Markdown`, the stored text as it stands with its line breaks kept. So it fills every required slot, and `components={CONTROLS}` is the one line an app must write; handed as it stands it brings `CONTROL_ATOMS` too, the atoms drawn with those controls, under the app's own `atoms`. An app spreads it first and its own after
|
|
430
|
+
the Outright kit's, on Base UI: its controls (the Button, the Popover, the Sheet, the Input, the Checkbox, the Tooltip, the Menu, the Select), the Text editor as its `TextBody`, the Picker as its `Picker` and `FieldsBody`, the Date editor as its `DateBody`, the Date editor's days as its `Calendar`, the Compound editor as its `PartsBody`, the Number editor as its `NumberBody`, the Values editor as its `ValuesBody`, the Links editor as its `LinksBody`, and of the panels the sort editor as its `SortBody`, the views list as its `ViewsListBody` and a view's menu as its `ViewMenu`, the filter editor as its `FilterBody` and `FilterPartBody` and the group editor as its `GroupBody`, Customize as its `CustomizeBody`, the quick filters as its `QuickFiltersBody`, the bulk bar as its `SelectionBar`; and of the panels' controls the Collapsible as its `Collapse`; and `PortsHost`, ViewKit's Toast and alert dialog for the `toast` and `confirm` ports an app leaves out; and `AppIcon`, ViewKit's own glyphs by name (`CONTROL_ICONS`), and `Markdown`, the stored text as it stands with its line breaks kept. So it fills every required slot, and `components={CONTROLS}` is the one line an app must write; handed as it stands it brings `CONTROL_ATOMS` too, the atoms drawn with those controls, under the app's own `atoms`. An app spreads it first and its own after
|
|
431
431
|
(`components={{ ...CONTROLS, ...own }}`), so whatever it hands wins. That door alone needs `@base-ui/react`, an optional
|
|
432
432
|
peer; the provider and every other door import neither library, so an app that hands every control never installs it.
|
|
433
433
|
|
|
434
434
|
`Button` · `Popover` · `Tooltip` · `Checkbox` · `Menu` · `Collapse` · `Sheet` · `AppIcon` · `Markdown` · `TextBody` · `NumberBody` · `Picker` · `LinksBody` · `DateBody` · `PartsBody` · `ValuesBody`
|
|
435
435
|
|
|
436
|
-
`Button`: `ViewsButtonProps`, its children, `onClick`, `disabled`, `variant`, `size`, `type`, a class, `aria-label` and `title`. It draws every button ViewKit draws itself, handed ViewKit's box in its one class. The grid's own buttons are handed a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, each forwarded to your element; a command cell's ▾ and trigger, and the selection chip, only the props named first, the chip also `data-slot`. A field row's own buttons are handed `type`, `variant`, `size`, `className`, `aria-label`, `disabled` and `onClick` (the ▾ and the verb trigger no `onClick`: the menu opens on them), Show more also `data-slot`, and the edit target also a ref and `aria-disabled` while its write is pending, each forwarded to your element. The panels' own buttons are handed `type`, `variant` (`ghost`, `outline` or `secondary`), `size`, `className` and their children, each with what it needs of `onClick`, `disabled`, `aria-label`, `title`, a ref, `aria-haspopup`, `aria-expanded`, `aria-pressed`, `role`, `aria-selected`, `aria-disabled` and `aria-describedby` (a button that can't be used, described by why), `data-slot`, `data-state="open"` or `data-state="closed"` and `data-vs-row="true"`, each forwarded to your element.
|
|
436
|
+
`Button`: `ViewsButtonProps`, its children, `onClick`, `disabled`, `variant`, `size`, `type`, a class, `aria-label` and `title`. It draws every button ViewKit draws itself, handed ViewKit's box in its one class. The grid's own buttons are handed a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, each forwarded to your element; a command cell's ▾ and trigger, and the selection chip, only the props named first, the chip also `data-slot`. A field row's own buttons are handed `type`, `variant`, `size`, `className`, `aria-label`, `disabled` and `onClick` (the ▾ and the verb trigger no `onClick`: the menu opens on them), Show more also `data-slot`, and the edit target also a ref and `aria-disabled` while its write is pending, each forwarded to your element. The panels' own buttons are handed `type`, `variant` (`ghost`, `outline` or `secondary`), `size`, `className` and their children, each with what it needs of `onClick`, `disabled`, `aria-label`, `title`, a ref, `aria-haspopup`, `aria-expanded`, `aria-pressed`, `role`, `aria-selected`, `aria-disabled` and `aria-describedby` (a button that can't be used, described by why), `data-slot`, `data-state="open"` or `data-state="closed"` and `data-vs-row="true"`, each forwarded to your element. Inside the sort and filter panels under the provider's `panelControls` (VK-1013), each button is handed `type="button"`, a `variant` from what it is (`default` for a primary one, an empty filter's Add filter; `destructive` for a danger one), `size` `icon` for one drawn as its glyph alone, its icon and words as its children, its part's `data-slot` and `data-key`, and `aria-disabled` where it can't be used but keeps its focus; forward the rest to your element.
|
|
437
437
|
|
|
438
438
|
`Checkbox`: `ViewsCheckboxProps`. A yes/no cell in the grid draws it, handed `checked`, the column's name as `aria-label`, `tabIndex` -1 and `onCheckedChange`; a cell the grid can't write is handed `readOnly` and a press that writes nothing. A field row's yes/no draws it, handed `checked`, the field's name as `aria-label` and `onCheckedChange`, and no `tabIndex`, so it stays a Tab stop as a switch is; a row it can't write is handed `readOnly`, and a value inside the row's own button keeps the tick box. Forward `readOnly` to your control.
|
|
439
439
|
|
|
440
|
-
`Input`, optional: a single-line text box, `ViewsInputProps`. The editors' own single-line box (a duration's, the one number no body has a form for) draws through it; without it the editors draw a plain `<input>`. Forward every prop to your element, `ref` included. `chrome` is `bare` (the default: a grid cell, a panel that frames the box) or `field` (your field's frame). `OPTIONAL_COMPONENT_NAMES` lists the
|
|
440
|
+
`Input`, optional: a single-line text box, `ViewsInputProps`. The editors' own single-line box (a duration's, the one number no body has a form for) draws through it; without it the editors draw a plain `<input>`. Forward every prop to your element, `ref` included. `chrome` is `bare` (the default: a grid cell, a panel that frames the box) or `field` (your field's frame). `OPTIONAL_COMPONENT_NAMES` lists the ten optional slots apart from `COMPONENT_NAMES`, which lists the slots you must fill.
|
|
441
|
+
|
|
442
|
+
`Select`, optional: a box that picks one value or several, `ViewsSelectProps`. Only ViewKit's panels draw it, and only where the provider's `panelControls` names `Select` (VK-1013): the sort's field and direction, the filter's field, way, choices and a block's quantifier. It is handed the rows (`ViewsSelectItem`: a value, its words, an icon, a line, a group, `disabled`, and `level`, rows one level in, which `flatSelectItems` flattens for a Select that draws none), the value and `onValueChange`, `multiple`, a placeholder, `disabled`, `open` and `onOpenChange` (honour both: on a phone a panel holds the box shut and opens a step of its own), `search` (the words of ViewKit's own search), `size` (`sm` or `default`), and the part's `data-slot` and `data-key`, for the box a person presses. `CONTROLS.Select` is ViewKit's own.
|
|
443
|
+
|
|
444
|
+
`panelControls` (the provider): the names among `Button`, `Select`, `Menu`, `Popover` and `Input` that ViewKit's panels draw with your own (VK-1013, the sort and filter panels so far). Each is handed the map's props, never ViewKit's own look, and the part's `data-slot` and `data-key`; a menu's rows carry theirs as `slot` and `key`, and a menu ViewKit opens from your Button it opens itself, at your Button, and gives the focus back to it. Inside the panels a ViewKit part may hand your Button, Select or Input more props than these: forward the rest to your element. A control of `CONTROLS`' stays ViewKit's whatever `panelControls` says; without it, the panels draw ViewKit's own, as before.
|
|
441
445
|
|
|
442
446
|
`Command`, optional and deprecated: the command list's parts (`ViewsCommandParts`). Nothing reads it: the grid's menus are your `Menu` and the editors' lists your `Picker`. Leave it out; it goes at a later minor.
|
|
443
447
|
|
|
@@ -598,7 +602,7 @@ container: the inset a run of rows sits in, inside a panel or a command list's g
|
|
|
598
602
|
a button or, with `interactive={false}`, a static line), `RowContent` (a row's inside, for inside a
|
|
599
603
|
command list's item, which owns the element and the highlight), `TickBox` (a paint-only tick box), `Avatar` (a person's or a record's picture, `ViewsAvatarProps`: a user's, a relation's and an actor's chip draw it at `size="chip"`, and the name draws it at `size="glyph"`, sized by `--vk-glyph`, when the list's `rowIcon` hands the row's `avatar`; it is handed `label`, whose picture it is, `avatarUrl`, `kind`, the record's kind as the app names it (a relation's `entity`, `user` for a member, an actor's type), and `fallback`, the glyph the chip or the name draws without a picture; the default draws the picture, marked `data-slot="vk-avatar"`, and the fallback when there is none or it fails to load, so an app that hands none sees its chips and names as before; yours draws initials on a tone, a record in its own shape, or the fallback for a kind it doesn't dress),
|
|
600
604
|
`StatusBadge` (a pill by status slot), `StatusMarker` (an attention badge that opens its reason) and
|
|
601
|
-
`Tag` (a category chip, removable, with an optional leading glyph), `CommandMenu` (a `command` cell's verb menu, opened from the trigger the cell drew; the default is the components map's `Menu`), `RowMenu` (the rows' right-click menu, once around each section's rows' container and aimed at the row a press or a right-click came from, its props that row's: Open page, the rows the rendering builds, Delete, where the grid's `menus.row` makes the first and last rows of `items` instead (`row-open`, `row-delete`), with one disabled `loading` row while it answers; the default is the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`), wrapped in `data-slot="vk-row-menu"`; the grid's row-menu keys send a cell the same right-click, with no press before it, so a `RowMenu` of your own opens on any `contextmenu` and doesn't wait for a press; its Delete asks the `confirm` port with `views.menus.row-delete-confirm` (the browser's own confirm when you hand none), and a delete that rejects says so through the toast port's `error` with `views.menus.row-delete-failed`; a long-press on a phone opens nothing, and with `GridTable`'s `phonePicking` on the grid's own long press picks the row, an `onToggleSelect` that answers the same held press ticking it with the grid's, once) and `RelationLink` (where a relation chip goes, around the chip the display drew; the default goes nowhere), `RelationRoles` (a link's roles, inside its chip after the record's name, on a `many` relation that declares `links`; the default draws their labels in the subtle colour after a middle dot, wrapped in `data-slot="vk-relation-roles"`, and in a narrow cell cuts them, down to nothing, before the name loses a letter), `Loading` (a wait: the list reloading, or more rows arriving; the default is a plain ring) `LoadMore` (how a list asks for its next page; the default watches a sentinel past the last row) and `PlatformMark` (a link's platform, drawn before it, read from its address with the conventions' platforms; the default draws nothing, so a link looks plain, and the package ships no brand art, so an app that wants marks draws its own by the platform's key into `data-slot="vk-platform"`), and the rows the panels (`/panels`) draw with: `ChoiceRow` (picks a value: its label, a second line, a right-hand meta, the check when chosen), `CheckRow` (toggles one of many, a tick box on the left), `RadioRow` (picks one of a set, its mark a check or, with `mark="box"`, a tick box; a disabled row's reason in your `Tooltip`), `DirectionButton` (a sort's direction arrow, named `views.panels.direction`), `MenuRow` (a drill-in row: a glyph, the section, where it stands, a chevron; a disabled row's reason in your `Tooltip`), `ToggleRow` (a boolean flipped in place, with a way back named `views.panels.toggle-reset`; a disabled row's reason in your `Tooltip`) and `PanelSearch` (a panel's text box, a filled well with a magnifier), and `Pill` (one option of a row of pills, the views row's and any tab row's: `active`, a `solid` or `plain` variant, a `default` or `sm` size, a leading glyph, the app's own active and hover classes for a status colour; with `menuOpen` it says it opens a menu, `aria-haspopup="menu"` and `aria-expanded`), and `ToolbarButton` (a toolbar's button, the one every toolbar part draws with: its glyph, its name, its word for a dress that shows words, a count in its corner, which becomes a ✕ badge that clears what it counts when handed `onClear`, a dot that says something is applied with no number, `open`, `changed`, `edge` for the row's outermost button, `disabled`, a `md` or `sm` size, and `popup` when it opens one; and, for the sort (VK-188), its own words shown whatever the dress, with their weight, in `data-slot="vk-toolbar-words"` (`children`: "Sorted by **Amount**"), a count in words after them in `data-slot="vk-toolbar-more"` (`more`: "+1"), an empty place with its edge dashed and `data-empty` (`empty`), and a reason it can't be used, `disabledReason` with `disabled`, in your `Tooltip`, the button then `aria-disabled` and still a Tab stop, a press doing nothing; its own words are then its name, with `more` after them, in place of `label`; and, in a folding toolbar line with no room, `iconAlone`, its words given up for its icon, `data-icon-alone`, which you draw as the icon alone whatever your dress says of words; `aside`, what it names left the list, its edge dashed in the warning's colour, `data-aside`; `foot`, New's + standing alone at a phone list's foot, round, a finger's size, on the brand's ground, `data-foot`; `joined` (`start`, `middle` or `end`), one of buttons joined as one (a filter's field, how it compares, its value, its menu), its corners on the outer side alone, no gap, the shared edge drawn once, `data-joined` with the value; and `waits`, its words saying what it waits for (a filter's value not yet picked), drawn in `--vk-fg-subtlest`, the placeholder's colour, `data-waits`; its own words keep to one line and give way to a holder that caps its width, cut with "…", where an icon button keeps its size; and, told what it is where your own toolbar frame draws it (VK-629), `current` (a view tab, `data-tab`; `true` the open one, `data-current` and `aria-current="true"`), `part` (which of the toolbar's own buttons it stands for, drawn as its `data-slot`: `views-chip` `vk-views-chip`, `views-tab` `vk-views-tab`, `views-more` `vk-views-more`, `views-add` `vk-views-add`, `clear` `vk-toolbar-clear`, `save` `vk-toolbar-save-button`; the default draws the chip and "+N" with a chevron after their words, `data-slot="vk-toolbar-chevron"`, and Save on an edge) and `onContextMenu` (a right-click: a tab's verbs open on it)). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
|
|
605
|
+
`Tag` (a category chip, removable, with an optional leading glyph), `CommandMenu` (a `command` cell's verb menu, opened from the trigger the cell drew; the default is the components map's `Menu`), `RowMenu` (the rows' right-click menu, once around each section's rows' container and aimed at the row a press or a right-click came from, its props that row's: Open page, the rows the rendering builds, Delete, where the grid's `menus.row` makes the first and last rows of `items` instead (`row-open`, `row-delete`), with one disabled `loading` row while it answers; the default is the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`), wrapped in `data-slot="vk-row-menu"`; the grid's row-menu keys send a cell the same right-click, with no press before it, so a `RowMenu` of your own opens on any `contextmenu` and doesn't wait for a press; its Delete asks the `confirm` port with `views.menus.row-delete-confirm` (the browser's own confirm when you hand none), and a delete that rejects says so through the toast port's `error` with `views.menus.row-delete-failed`; a long-press on a phone opens nothing, and with `GridTable`'s `phonePicking` on the grid's own long press picks the row, an `onToggleSelect` that answers the same held press ticking it with the grid's, once) and `RelationLink` (where a relation chip goes, around the chip the display drew; the default goes nowhere), `RelationRoles` (a link's roles, inside its chip after the record's name, on a `many` relation that declares `links`; the default draws their labels in the subtle colour after a middle dot, wrapped in `data-slot="vk-relation-roles"`, and in a narrow cell cuts them, down to nothing, before the name loses a letter), `Loading` (a wait: the list reloading, or more rows arriving; the default is a plain ring) `LoadMore` (how a list asks for its next page; the default watches a sentinel past the last row) and `PlatformMark` (a link's platform, drawn before it, read from its address with the conventions' platforms; the default draws nothing, so a link looks plain, and the package ships no brand art, so an app that wants marks draws its own by the platform's key into `data-slot="vk-platform"`), and the rows the panels (`/panels`) draw with: `ChoiceRow` (picks a value: its label, a second line, a right-hand meta, the check when chosen), `CheckRow` (toggles one of many, a tick box on the left), `RadioRow` (picks one of a set, its mark a check or, with `mark="box"`, a tick box; a disabled row's reason in your `Tooltip`), `DirectionButton` (a sort's direction arrow, named `views.panels.direction`), `MenuRow` (a drill-in row: a glyph, the section, where it stands, a chevron; a disabled row's reason in your `Tooltip`), `ToggleRow` (a boolean flipped in place, with a way back named `views.panels.toggle-reset`; a disabled row's reason in your `Tooltip`) and `PanelSearch` (a panel's text box, a filled well with a magnifier), and `Pill` (one option of a row of pills, the views row's and any tab row's: `active`, a `solid` or `plain` variant, a `default` or `sm` size, a leading glyph, the app's own active and hover classes for a status colour; with `menuOpen` it says it opens a menu, `aria-haspopup="menu"` and `aria-expanded`), and `ToolbarButton` (a toolbar's button, the one every toolbar part draws with: its glyph, its name, its word for a dress that shows words, a count in its corner, which becomes a ✕ badge that clears what it counts when handed `onClear`, a dot that says something is applied with no number, `open`, `changed`, `edge` for the row's outermost button, `disabled`, a `md` or `sm` size, and `popup` when it opens one; and, for the sort (VK-188), its own words shown whatever the dress, with their weight, in `data-slot="vk-toolbar-words"` (`children`: "Sorted by **Amount**"), a count in words after them in `data-slot="vk-toolbar-more"` (`more`: "+1"), an empty place with its edge dashed and `data-empty` (`empty`), and a reason it can't be used, `disabledReason` with `disabled`, in your `Tooltip`, the button then `aria-disabled` and still a Tab stop, a press doing nothing; its own words are then its name, with `more` after them, in place of `label`; and, in a folding toolbar line with no room, `iconAlone`, its words given up for its icon, `data-icon-alone`, which you draw as the icon alone whatever your dress says of words; `aside`, what it names left the list, its edge dashed in the warning's colour, `data-aside`; `foot`, New's + standing alone at a phone list's foot, round, a finger's size, on the brand's ground, `data-foot`; `joined` (`start`, `middle` or `end`), one of buttons joined as one (a filter's field, how it compares, its value, its menu), its corners on the outer side alone, no gap, the shared edge drawn once, `data-joined` with the value; and `waits`, its words saying what it waits for (a filter's value not yet picked), drawn in `--vk-fg-subtlest`, the placeholder's colour, `data-waits`; its own words keep to one line and give way to a holder that caps its width, cut with "…", where an icon button keeps its size; and, told what it is where your own toolbar frame draws it (VK-629), `current` (a view tab, `data-tab`; `true` the open one, `data-current` and `aria-current="true"`), `part` (which of the toolbar's own buttons it stands for, drawn as its `data-slot`: `views-chip` `vk-views-chip`, `views-tab` `vk-views-tab`, `views-more` `vk-views-more`, `views-add` `vk-views-add`, `clear` `vk-toolbar-clear`, `save` `vk-toolbar-save-button`; the default draws the chip and "+N" with a chevron after their words, `data-slot="vk-toolbar-chevron"`, and Save on an edge) and `onContextMenu` (a right-click: a tab's verbs open on it); and wherever it stands (VK-984), `part` naming every other button after its toolbar place (`sort`, `filter`, `options`, `search`, `quick`, `new`, `filters`, `filter-add`, `sort-pill`, `sort-add`, `advanced-filters`, `more-filters`, ⋯ `more`), which the default draws as it always did, and `className`, its place's class, put on the button). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
|
|
602
606
|
from the app's colours; an app swaps any of them through the provider's `atoms`, and the rest
|
|
603
607
|
stay the defaults. `SelectionSheet` is the phone's sheet of a selection's verbs, opened by the
|
|
604
608
|
selection bar's Actions: the default is the components map's `Sheet` holding the atoms' rows, a group's
|
|
@@ -700,8 +704,17 @@ places), each one's popover handed `data-slot="vk-toolbar-options-panel"`, `data
|
|
|
700
704
|
`data-slot="vk-toolbar-filter-panel"` through your `Popover`'s `panelData`; on a phone, where the panel opens in your
|
|
701
705
|
`Sheet`, the same slot marks the panel's box inside it.
|
|
702
706
|
|
|
707
|
+
These slots mark the places ViewKit draws around your buttons. The button itself is told which it is: every button the
|
|
708
|
+
toolbar draws hands your `ToolbarButton` its `part` (`sort`, `filter`, `options`, `search`, `quick`, `new`, the filter
|
|
709
|
+
bar's `filters`, `filter-add`, `sort-pill`, `sort-add`, `advanced-filters`, `more-filters`, and ⋯ `more`; `/list`'s
|
|
710
|
+
Default keys has the whole table), and a place the ready toolbar's `toolbarParts` dresses hands its `className` on to
|
|
711
|
+
each of its buttons, or draws your own `button` for them, handed the same props. Your atom puts `className` on the
|
|
712
|
+
button, and dresses by `part` only the six of an app's own frame (`ViewsFramePart`) as their slots say.
|
|
713
|
+
|
|
703
714
|
In the fold arrangement (`Toolbar`'s `fold`, the ready toolbar's default) the frame carries `data-fold`, a line's
|
|
704
|
-
kind is `main` or `bar` (the filter bar under the row), each part stands in an item of its own,
|
|
715
|
+
kind is `main` or `bar` (the filter bar under the row), each part stands in an item of its own, marked
|
|
716
|
+
`data-toolbar-item` with its place's key (yours included, so an app dresses a place of its own by it; the fold hides an item
|
|
717
|
+
that gives way with `hidden`, so a rule of yours that sets `display` on `[data-toolbar-item]` breaks the folding), and as a line
|
|
705
718
|
narrows its parts give way: a toolbar button standing as its icon alone carries `data-icon-alone`, the views fold
|
|
706
719
|
tabs into "+N", the bar's last filters fold into "+N filters" (`data-slot="vk-toolbar-more-filters"`) one at a time,
|
|
707
720
|
and what may fold goes behind `data-slot="vk-toolbar-overflow"` (⋯, its folded parts' rows in your `Menu`). A line
|
|
@@ -747,6 +760,69 @@ with why; its ⋯ holding why, Put back once it fits, and Delete filter), `data-
|
|
|
747
760
|
folded, standing where the last of them stood, its menu naming each) and `data-slot="vk-toolbar-filters-panel"` (the fields' popover, handed through your
|
|
748
761
|
`Popover`'s `panelData`).
|
|
749
762
|
|
|
763
|
+
The panels' parts (VK-988). Every part inside the default panels carries a name of its own, so a stylesheet dresses one part
|
|
764
|
+
apart from the rest; each name starts with its panel's: `vk-sort-`, `vk-filter-`, `vk-group-`, `vk-customize-`, `vk-views-list-`,
|
|
765
|
+
`vk-view-menu-` and `vk-quick-`. A part that repeats says which one it is: `data-key`, by the key you handed (a field's, a view's, a
|
|
766
|
+
section's, a toggle's, a verb's), and a sort rule or a filter's item its place, `data-index`, from 0. Two filter rules on one field share a
|
|
767
|
+
`data-key`, and a filter's `data-index` counts again from 0 at each level of its groups. Where your own `Menu` draws a part (a
|
|
768
|
+
view's menu), it is handed the part's `data-slot` as a prop (`ViewsMenuProps`), and so are your `Button`, `Select`, `Menu`,
|
|
769
|
+
`Popover` and `Input` inside the sort and filter panels under the provider's `panelControls` (VK-1013; a menu's rows by their item's `slot`
|
|
770
|
+
and `key`): draw them on the element your stylesheet styles. ViewKit's own Select, Input, Radio,
|
|
771
|
+
Toggle, PaneHead, PaneFoot and Notice draw a name a panel hands them on their box. The Picker's own parts (its search, its rows, its actions) are the Picker's; a panel row the Picker draws carries the
|
|
772
|
+
panel's name. A row drawn from data takes its name from its entry's `slot` (`PartSlot`: `slot`, `key`, `index`), on a Menu list's
|
|
773
|
+
entry and choice and a Picker's item.
|
|
774
|
+
|
|
775
|
+
- The sort editor (`CONTROLS.SortBody`): `data-slot="vk-sort"` (the editor), `data-slot="vk-sort-rules"` (its rules' list),
|
|
776
|
+
`data-slot="vk-sort-rule"` (one rule, `data-key` its field and `data-index` its place; a set-aside sort keeps `data-aside`, its
|
|
777
|
+
key in `data-key` and no place), `data-slot="vk-sort-grip"` (its grip), `data-slot="vk-sort-field"` and
|
|
778
|
+
`data-slot="vk-sort-direction"` (its two boxes), `data-slot="vk-sort-remove"` (its ×), `data-slot="vk-sort-rule-open"` (a phone's
|
|
779
|
+
or the narrow form's row, pressed to turn its direction), `data-slot="vk-sort-rule-more"` (its ⋯), `data-slot="vk-sort-rule-action"`
|
|
780
|
+
(a row of that menu, `data-key` `delete`, `why` or `put-back`), `data-slot="vk-sort-direction-option"` (a direction to pick on a
|
|
781
|
+
phone's step or the narrow form's list, `data-key` `ascending` or `descending`), `data-slot="vk-sort-add"` (Add sort),
|
|
782
|
+
`data-slot="vk-sort-clear"` (Clear all), `data-slot="vk-sort-foot"` (the row they stand in) and `data-slot="vk-sort-none"`
|
|
783
|
+
(nothing sorted).
|
|
784
|
+
- The filter editor (`CONTROLS.FilterBody`): `data-slot="vk-filter"` (the editor), `data-slot="vk-filter-rules"` (a level's list),
|
|
785
|
+
`data-slot="vk-filter-item"` (a rule's or a group's place in it, `data-index`), `data-slot="vk-filter-rule"` (one rule, `data-key`
|
|
786
|
+
its field; a set-aside keeps `data-aside`), `data-slot="vk-filter-where"` (Where), `data-slot="vk-filter-join"` (the And/Or that
|
|
787
|
+
turns its level), `data-slot="vk-filter-joined"` (a later rule's And/Or words), `data-slot="vk-filter-field"` and
|
|
788
|
+
`data-slot="vk-filter-how"` (its field's and way's boxes, on the box itself, the Select's), `data-slot="vk-filter-value"` (what
|
|
789
|
+
holds its value's box, its wrapper), `data-slot="vk-filter-rule-more"` (its ⋮),
|
|
790
|
+
`data-slot="vk-filter-rule-action"` (a row of that menu: Convert to group, the ways a several-values rule matches, Delete, a
|
|
791
|
+
set-aside's why and Put back, `data-key` `convert`, `any`, `none`, `every`, `delete`, `why`, `put-back`),
|
|
792
|
+
`data-slot="vk-filter-group"` (a group's well), `data-slot="vk-filter-group-head"` and `data-slot="vk-filter-group-more"` (its head
|
|
793
|
+
and ⋮), `data-slot="vk-filter-quantifier"` (a related record's group's Any, None or Every, in its head),
|
|
794
|
+
`data-slot="vk-filter-group-action"` (a row of a group's menu, `data-key` `exclude`), `data-slot="vk-filter-delete"` (Delete at a group's foot), `data-slot="vk-filter-add"` (Add filter),
|
|
795
|
+
`data-slot="vk-filter-clear"` (Clear all), `data-slot="vk-filter-foot"` (a foot they stand in), `data-slot="vk-filter-none"`
|
|
796
|
+
(nothing filtered) and `data-slot="vk-filter-excluded"` (the note over a filter that leaves records out).
|
|
797
|
+
- The group editor (Customize's Group): `data-slot="vk-group"` (the editor), `data-slot="vk-group-setting"` (a setting's row,
|
|
798
|
+
`data-key` `field`, `order`, `direction`, `step` or `empty`), `data-slot="vk-group-choice"` (one of a setting's choices, `data-key`
|
|
799
|
+
its value), `data-slot="vk-group-heading"` (the groups' heading), `data-slot="vk-group-hide-all"` (its Hide all or Show all),
|
|
800
|
+
`data-slot="vk-group-value"` (a group's row, `data-key` its value) and `data-slot="vk-group-remove"` (Remove grouping).
|
|
801
|
+
- Customize (`CONTROLS.CustomizeBody`): `data-slot="vk-customize"` (its body), `data-slot="vk-customize-head"` (its head),
|
|
802
|
+
`data-slot="vk-customize-title"`, `data-slot="vk-customize-back"`, `data-slot="vk-customize-close"`,
|
|
803
|
+
`data-slot="vk-customize-name"` (the view's name) and `data-slot="vk-customize-layout-button"` (its layout's mark beside it),
|
|
804
|
+
`data-slot="vk-customize-section"` (a section's row, `data-key` `layout`, `columns`, `filter`, `sort` or `group`),
|
|
805
|
+
`data-slot="vk-customize-field"` (a field's own filter row, `data-key` its field), `data-slot="vk-customize-toggle"` (a toggle's row,
|
|
806
|
+
`data-key` its key; Show counts `counts`), `data-slot="vk-customize-toggle-reset"` (its way back), `data-slot="vk-customize-choice"`
|
|
807
|
+
(a pick-one setting's row, `data-key` its key) and `data-slot="vk-customize-option"` (one of its options, `data-key` its value),
|
|
808
|
+
`data-slot="vk-customize-heading"` (a heading, `data-key` where it has one), `data-slot="vk-customize-layout"` (a layout's card,
|
|
809
|
+
`data-key` its id), `data-slot="vk-customize-search"` (Columns' search), `data-slot="vk-customize-column"` (a column's row,
|
|
810
|
+
`data-key` its id), `data-slot="vk-customize-columns-action"` (Hide all, Show all, Reset columns, `data-key` `hide-all`,
|
|
811
|
+
`show-all`, `reset`), `data-slot="vk-customize-foot"` (its foot), `data-slot="vk-customize-changes"` (Reset and Save for everyone, over it), `data-slot="vk-customize-action"` (a foot button, `data-key`
|
|
812
|
+
`copy-link`, `export`, `reset` or `save`) and `data-slot="vk-customize-stale"` (the note that the shared view moved).
|
|
813
|
+
- The views list (`CONTROLS.ViewsListBody`): `data-slot="vk-views-list"` (the list), `data-slot="vk-views-list-row"` (a view's row,
|
|
814
|
+
`data-key` its id) and `data-slot="vk-views-list-head"` (a phone's step head). A view's menu: `data-slot="vk-view-menu"` (the
|
|
815
|
+
menu), `data-slot="vk-view-menu-row"` (a row, `data-key` its item's key: `rename`, `edit`, `copy-link`, …),
|
|
816
|
+
`data-slot="vk-view-menu-name"` (the name box of Rename and New view), `data-slot="vk-view-menu-layout"` (New view's layout
|
|
817
|
+
card, `data-key` its id), `data-slot="vk-view-menu-columns"` (a board's columns' box) and `data-slot="vk-view-menu-act"` (a step's
|
|
818
|
+
Save or Create). Your `Menu` is handed the view menu's name as `data-slot` (`ViewsMenuProps`); ViewKit's own names each row
|
|
819
|
+
`vk-view-menu-row` by its item's key.
|
|
820
|
+
- The quick filters (`CONTROLS.QuickFiltersBody`): `data-slot="vk-quick"` (the body), `data-slot="vk-quick-head"` (a phone's head),
|
|
821
|
+
`data-slot="vk-quick-field"` (a field's pill, `data-key` its id), `data-slot="vk-quick-search"` (the search),
|
|
822
|
+
`data-slot="vk-quick-value"` (a value, `data-key` the value, `data-held` while it is held: read it beside the name, since the
|
|
823
|
+
Picker's rows carry a `data-held` of their own), `data-slot="vk-quick-count"` (its
|
|
824
|
+
count), `data-slot="vk-quick-clear"` (a held value's ✕) and `data-slot="vk-quick-none"` (nothing found).
|
|
825
|
+
|
|
750
826
|
Lists that scroll wear the class `scrollbar-overlay`, which an app may define (to show the OS
|
|
751
827
|
overlay scrollbar, say); without it the class does nothing.
|
|
752
828
|
|
|
@@ -762,6 +838,177 @@ a desktop and its `Sheet` on a phone, and marks its parts with these slots:
|
|
|
762
838
|
| `data-slot="vk-editor-refusal"` | the reason a refused value gave, under the editor; in a popover that scrolls, pinned to its bottom edge |
|
|
763
839
|
| `data-slot="vk-text-editor"` | a read-only text's box (`viewkitjs/views/editors/text`), unless its host names its own |
|
|
764
840
|
|
|
841
|
+
The frames an editor stands in keep their own names, apart from the parts inside: `data-slot="vk-date-editor"` wraps the date
|
|
842
|
+
editor's body in the grid (it draws as nothing, `display: contents`), and an app's own body stands in
|
|
843
|
+
`data-slot="vk-text-body"`, `data-slot="vk-number-body"`, `data-slot="vk-parts-body"`, `data-slot="vk-values-body"` or
|
|
844
|
+
`data-slot="vk-links-body"`. So `[data-slot^="vk-date"]` reaches the frame as well as the date editor's parts: name the part.
|
|
845
|
+
|
|
846
|
+
### The field editors' parts (VK-989)
|
|
847
|
+
|
|
848
|
+
Every part inside ViewKit's default field editors carries a public name, the same in the grid, the field row and the phone's
|
|
849
|
+
sheet, on the box a person sees (not the input inside it). Dress one part by its name and the rest stay as they are.
|
|
850
|
+
|
|
851
|
+
A part that repeats says which one it is: `data-key`, by its own key (a quick pick's, a part's, a field's, a record's, an item's
|
|
852
|
+
value), and a values row its place, `data-index`, from 0. A date day carries no `data-key`; it is told by its label, and a day,
|
|
853
|
+
month, year or quarter picked by `data-picked`, today's day and year by `data-today`. A Picker row lit by the keys or the pointer
|
|
854
|
+
carries `data-highlighted`. Where VK-991 hands your own control into a part (your `Button`, `Input`, `Select`, `Menu`,
|
|
855
|
+
`Calendar`), it is handed the part's `data-slot` and `data-key` as props: draw them on the element your stylesheet styles. A part's
|
|
856
|
+
name never starts ViewKit's reset: an editor you draw on your own, outside ViewKit's frames, draws as it did before it was named.
|
|
857
|
+
|
|
858
|
+
Every editor's ✕, ✓, a step's ‹ and the Picker's Cancel: `data-slot="vk-editor-close"`, `data-slot="vk-editor-save"`,
|
|
859
|
+
`data-slot="vk-editor-back"` and `data-slot="vk-editor-cancel"`, wherever ViewKit draws them: an editor's own phone head, the
|
|
860
|
+
sheet's bar (`vk-editor-bar`), and ViewKit's own Sheet when it holds them in its head (`sheetActions: "head"`). The sort and
|
|
861
|
+
filter sheets' own ✕, ✓ and ‹ carry the same names, in either place. An app's own Sheet draws its head's buttons itself, and a
|
|
862
|
+
sheet's own ✕, the one its head draws where the editor hands it none (a Picker of one value), is the sheet's: it carries no part's
|
|
863
|
+
name.
|
|
864
|
+
|
|
865
|
+
The date editor and its calendar:
|
|
866
|
+
|
|
867
|
+
| slot | the part |
|
|
868
|
+
| --- | --- |
|
|
869
|
+
| `data-slot="vk-date"` | the date editor, every form |
|
|
870
|
+
| `data-slot="vk-calendar"` | the default calendar (the components map's `Calendar`); its head and days take the date editor's names |
|
|
871
|
+
| `data-slot="vk-date-line"` | the typed line's box |
|
|
872
|
+
| `data-slot="vk-date-reads"` | what the typed line reads as |
|
|
873
|
+
| `data-slot="vk-date-error"` | why the typed line isn't a date |
|
|
874
|
+
| `data-slot="vk-date-time"` | the time's button beside the line, and a phone's time row |
|
|
875
|
+
| `data-slot="vk-date-head"` | the month's head |
|
|
876
|
+
| `data-slot="vk-date-prev"` | the last month's ‹ |
|
|
877
|
+
| `data-slot="vk-date-next"` | the next month's › |
|
|
878
|
+
| `data-slot="vk-date-month"` | the month's name, pressed for the months |
|
|
879
|
+
| `data-slot="vk-date-year"` | the year, pressed (or typed into) for the years |
|
|
880
|
+
| `data-slot="vk-date-days"` | the days' grid |
|
|
881
|
+
| `data-slot="vk-date-weekdays"` | the weekdays' row |
|
|
882
|
+
| `data-slot="vk-date-day"` | each day |
|
|
883
|
+
| `data-slot="vk-date-choices"` | the twelve months, or the twelve years |
|
|
884
|
+
| `data-slot="vk-date-choice"` | each month or year |
|
|
885
|
+
| `data-slot="vk-date-quarters"` | the quarter-hours |
|
|
886
|
+
| `data-slot="vk-date-quarter"` | each quarter-hour |
|
|
887
|
+
| `data-slot="vk-date-parts"` | the date and the time in boxes of their own |
|
|
888
|
+
| `data-slot="vk-date-part"` | the date's box, or the time's |
|
|
889
|
+
| `data-slot="vk-date-segment"` | each of a box's parts: day, month, year, hour, minute |
|
|
890
|
+
| `data-slot="vk-date-sep"` | the line over the quick picks |
|
|
891
|
+
| `data-slot="vk-date-picks"` | the quick picks |
|
|
892
|
+
| `data-slot="vk-date-pick"` | each quick pick (Today, Tomorrow, No date…) |
|
|
893
|
+
| `data-slot="vk-date-card"` | each card on a phone |
|
|
894
|
+
| `data-slot="vk-date-wheels"` | a phone's wheels |
|
|
895
|
+
| `data-slot="vk-date-wheel"` | each wheel |
|
|
896
|
+
| `data-slot="vk-date-wheel-row"` | each row of a wheel |
|
|
897
|
+
|
|
898
|
+
The text and number editors:
|
|
899
|
+
|
|
900
|
+
| slot | the part |
|
|
901
|
+
| --- | --- |
|
|
902
|
+
| `data-slot="vk-text"` | the text editor, every form |
|
|
903
|
+
| `data-slot="vk-text-box"` | its box (a phone number's: the box round the country, the dial code and the number) |
|
|
904
|
+
| `data-slot="vk-text-country"` | a phone number's country, pressed for the countries |
|
|
905
|
+
| `data-slot="vk-text-dial"` | a phone number's dial code |
|
|
906
|
+
| `data-slot="vk-text-note"` | why what was typed can't be kept |
|
|
907
|
+
| `data-slot="vk-number"` | the number editor, every form |
|
|
908
|
+
| `data-slot="vk-number-box"` | its box |
|
|
909
|
+
| `data-slot="vk-number-currency"` | the currency, pressed for the currencies |
|
|
910
|
+
| `data-slot="vk-number-unit"` | a unit that stays as it is: `%`, a currency's sign or code |
|
|
911
|
+
|
|
912
|
+
The name, place and range editors (one editor of parts; which part each box is, its key, says: given, family, shown, country,
|
|
913
|
+
line1, line2, postalCode, city, region, low, high):
|
|
914
|
+
|
|
915
|
+
| slot | the part |
|
|
916
|
+
| --- | --- |
|
|
917
|
+
| `data-slot="vk-parts"` | the editor, every form |
|
|
918
|
+
| `data-slot="vk-parts-field"` | each part's whole field: its label and its box |
|
|
919
|
+
| `data-slot="vk-parts-box"` | each part's box |
|
|
920
|
+
| `data-slot="vk-parts-line"` | a name's one line, as it is shown |
|
|
921
|
+
| `data-slot="vk-parts-own"` | the mark of a line written by hand |
|
|
922
|
+
| `data-slot="vk-parts-card"` | each card on a phone |
|
|
923
|
+
| `data-slot="vk-parts-pair"` | two parts side by side (first and last name; from and to) |
|
|
924
|
+
| `data-slot="vk-parts-note"` | a note under the parts: a range's unit, why it can't be empty |
|
|
925
|
+
| `data-slot="vk-parts-bands"` | a range's bands, picked whole |
|
|
926
|
+
|
|
927
|
+
The values editor (several emails, phones, links or domains):
|
|
928
|
+
|
|
929
|
+
| slot | the part |
|
|
930
|
+
| --- | --- |
|
|
931
|
+
| `data-slot="vk-values"` | the editor, every form |
|
|
932
|
+
| `data-slot="vk-values-rows"` | its rows, or its cards on a phone |
|
|
933
|
+
| `data-slot="vk-values-row"` | each value's row or card |
|
|
934
|
+
| `data-slot="vk-values-value"` | a value, pressed to change it (a phone card's box) |
|
|
935
|
+
| `data-slot="vk-values-edit"` | the box a value is changed in |
|
|
936
|
+
| `data-slot="vk-values-label"` | a value's label (Work, Mobile), pressed to change it where it can be |
|
|
937
|
+
| `data-slot="vk-values-main"` | the main one's mark |
|
|
938
|
+
| `data-slot="vk-values-pill"` | a value and its copy button together |
|
|
939
|
+
| `data-slot="vk-values-acts"` | a row's call, write or open and its remove, on a phone |
|
|
940
|
+
| `data-slot="vk-values-grip"` | the grip a value is moved by |
|
|
941
|
+
| `data-slot="vk-values-copy"` | copy |
|
|
942
|
+
| `data-slot="vk-values-open"` | call, write or open |
|
|
943
|
+
| `data-slot="vk-values-remove"` | remove |
|
|
944
|
+
| `data-slot="vk-values-line"` | the line a new value is typed in |
|
|
945
|
+
| `data-slot="vk-values-code"` | a phone number's country, pressed for the countries |
|
|
946
|
+
| `data-slot="vk-values-prefix"` | the dial code or the + before the line |
|
|
947
|
+
| `data-slot="vk-values-add"` | a phone's Add |
|
|
948
|
+
| `data-slot="vk-values-back"` | the head of a step (a label's, a country's) on a computer, its ‹ inside |
|
|
949
|
+
| `data-slot="vk-values-error"` | why a value can't be kept |
|
|
950
|
+
|
|
951
|
+
The links editor (the records a record is linked to, and what each link says):
|
|
952
|
+
|
|
953
|
+
| slot | the part |
|
|
954
|
+
| --- | --- |
|
|
955
|
+
| `data-slot="vk-links"` | the editor, every form |
|
|
956
|
+
| `data-slot="vk-links-search"` | the search's box |
|
|
957
|
+
| `data-slot="vk-links-list"` | the list of links and of what can be linked |
|
|
958
|
+
| `data-slot="vk-links-head"` | the table's head row |
|
|
959
|
+
| `data-slot="vk-links-rows"` | the links, or their cards on a phone |
|
|
960
|
+
| `data-slot="vk-links-row"` | each link: its row, or its card on a phone |
|
|
961
|
+
| `data-slot="vk-links-name"` | a link's record: its face and name; on a computer, its column's head too |
|
|
962
|
+
| `data-slot="vk-links-field"` | each field of a link (its cell, or its row on a phone or a step); on a computer, its column's head too |
|
|
963
|
+
| `data-slot="vk-links-value"` | a field's value, pressed to change it |
|
|
964
|
+
| `data-slot="vk-links-control"` | the switch, box or choice a field is changed with in place, and the lead's |
|
|
965
|
+
| `data-slot="vk-links-pop"` | a field's list, opened under it |
|
|
966
|
+
| `data-slot="vk-links-lead"` | which link leads; on a computer, its column's head too. Scope a rule under `vk-links-row` to leave the head out |
|
|
967
|
+
| `data-slot="vk-links-remove"` | a link's ✕ |
|
|
968
|
+
| `data-slot="vk-links-config"` | a link's fields, pressed to open them |
|
|
969
|
+
| `data-slot="vk-links-more"` | a phone card's ⋯ |
|
|
970
|
+
| `data-slot="vk-links-action"` | each row of that ⋯'s menu: `lead` (make it lead), `unlink` |
|
|
971
|
+
| `data-slot="vk-links-step"` | the head of a link's step on a computer |
|
|
972
|
+
| `data-slot="vk-links-back"` | that step's ‹ |
|
|
973
|
+
| `data-slot="vk-links-unlink"` | Unlink |
|
|
974
|
+
| `data-slot="vk-links-offers"` | the records offered to link |
|
|
975
|
+
| `data-slot="vk-links-offer"` | each record offered |
|
|
976
|
+
| `data-slot="vk-links-offer-action"` | each action among them (New company) |
|
|
977
|
+
| `data-slot="vk-links-note"` | what the list is doing, or why it is empty |
|
|
978
|
+
| `data-slot="vk-links-retry"` | Retry, when the search failed |
|
|
979
|
+
|
|
980
|
+
The Picker (every pick list: a select's, a status's, a relation's, a Select's list, and the lists inside the other editors):
|
|
981
|
+
|
|
982
|
+
| slot | the part |
|
|
983
|
+
| --- | --- |
|
|
984
|
+
| `data-slot="vk-picker"` | the Picker, both forms |
|
|
985
|
+
| `data-slot="vk-picker-search"` | the search's box |
|
|
986
|
+
| `data-slot="vk-picker-list"` | the list of rows |
|
|
987
|
+
| `data-slot="vk-picker-chips"` | the chips of what is held, beside the search |
|
|
988
|
+
| `data-slot="vk-picker-chip"` | each chip |
|
|
989
|
+
| `data-slot="vk-picker-option"` | each row (a panel's own row wears the panel's name instead) |
|
|
990
|
+
| `data-slot="vk-picker-parent"` | an open level's own row, on top |
|
|
991
|
+
| `data-slot="vk-picker-empty"` | the row that leaves the field empty |
|
|
992
|
+
| `data-slot="vk-picker-add"` | + Add: the row, or a phone's button, that asks the app to add what was typed |
|
|
993
|
+
| `data-slot="vk-picker-create"` | Create: the row, or a phone's button, that makes a new value |
|
|
994
|
+
| `data-slot="vk-picker-action"` | each of its actions (the views list's New view, a field's first action) |
|
|
995
|
+
| `data-slot="vk-picker-group"` | each group of rows under a heading |
|
|
996
|
+
| `data-slot="vk-picker-heading"` | each heading |
|
|
997
|
+
| `data-slot="vk-picker-card"` | each card of rows on a phone |
|
|
998
|
+
| `data-slot="vk-picker-selected"` | a phone's card of what is held |
|
|
999
|
+
| `data-slot="vk-picker-tick"` | a held row's mark: its tick, its box where several are held, or a phone's circle |
|
|
1000
|
+
| `data-slot="vk-picker-row-more"` | a row's ⋯ |
|
|
1001
|
+
| `data-slot="vk-picker-more"` | a phone's ⋯ for its actions |
|
|
1002
|
+
| `data-slot="vk-picker-back"` | the ‹ out of a level |
|
|
1003
|
+
| `data-slot="vk-picker-count"` | how many are held, with Clear |
|
|
1004
|
+
| `data-slot="vk-picker-clear"` | Clear all |
|
|
1005
|
+
| `data-slot="vk-picker-lead"` | the leading value's word |
|
|
1006
|
+
| `data-slot="vk-picker-lead-make"` | Make lead |
|
|
1007
|
+
| `data-slot="vk-picker-message"` | what the list says: searching, failed, nothing matches, nothing yet |
|
|
1008
|
+
| `data-slot="vk-picker-retry"` | Retry |
|
|
1009
|
+
| `data-slot="vk-picker-loading"` | Loading more |
|
|
1010
|
+
| `data-slot="vk-picker-foot"` | its foot: Create or + Add, and its actions |
|
|
1011
|
+
|
|
765
1012
|
## Ports
|
|
766
1013
|
|
|
767
1014
|
Runtime services the app may hand in through the provider, typed in `src/provider/ports.ts`. Each is optional, and
|
|
@@ -17,3 +17,7 @@ It also sets the popup line's own `--popup-line-more` and `--popup-line-under` o
|
|
|
17
17
|
| `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
|
|
18
18
|
| `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
|
|
19
19
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
20
|
+
|
|
21
|
+
## Its parts
|
|
22
|
+
|
|
23
|
+
The Name, Place and Range editor names every part it draws with a public `data-slot`, the same in the grid, the field row and a phone's sheet, on the box a person sees: `vk-parts`, `vk-parts-field`, `vk-parts-box`, `vk-parts-line`, `vk-parts-own`, `vk-parts-card`, `vk-parts-pair`, `vk-parts-note`, `vk-parts-bands`. Each part's field and box say which part they are by `data-key` (`given`, `city`, `low`…). Its ✕, ✓ and a step's ‹ are `vk-editor-close`, `vk-editor-save` and `vk-editor-back`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
@@ -15,3 +15,9 @@ The Menu list, the Radio, the Input, the Button, the Notice, the Pane and the Sh
|
|
|
15
15
|
| `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
|
|
16
16
|
| `--vk-overlay` | colour | `surface-overlay` | the colour defaults' |
|
|
17
17
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
18
|
+
|
|
19
|
+
## Its parts by name
|
|
20
|
+
|
|
21
|
+
Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
|
|
22
|
+
|
|
23
|
+
`vk-customize`, `vk-customize-head`, `vk-customize-title`, `vk-customize-back`, `vk-customize-close`, `vk-customize-layout-button`, `vk-customize-name`, `vk-customize-heading`, `vk-customize-section`, `vk-customize-field`, `vk-customize-toggle`, `vk-customize-toggle-reset`, `vk-customize-choice`, `vk-customize-option`, `vk-customize-layout`, `vk-customize-column`, `vk-customize-search`, `vk-customize-columns-action`, `vk-customize-foot`, `vk-customize-changes`, `vk-customize-action`, `vk-customize-stale`.
|
|
@@ -41,3 +41,7 @@ It also reads other controls' own names where it stands inside them, the Popover
|
|
|
41
41
|
| `--vk-radius-xs` | size | `radius-xs` | `2.5px` |
|
|
42
42
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
43
43
|
| `--vk-tracking-wide` | size | `tracking-wide` | `0.025em` |
|
|
44
|
+
|
|
45
|
+
## Its parts
|
|
46
|
+
|
|
47
|
+
The Date editor names every part it draws with a public `data-slot`, the same in the grid, the field row and a phone's sheet, on the box a person sees: `vk-date`, `vk-calendar`, `vk-date-line`, `vk-date-reads`, `vk-date-error`, `vk-date-time`, `vk-date-head`, `vk-date-prev`, `vk-date-next`, `vk-date-month`, `vk-date-year`, `vk-date-days`, `vk-date-weekdays`, `vk-date-day`, `vk-date-choices`, `vk-date-choice`, `vk-date-quarters`, `vk-date-quarter`, `vk-date-parts`, `vk-date-part`, `vk-date-segment`, `vk-date-sep`, `vk-date-picks`, `vk-date-pick`, `vk-date-card`, `vk-date-wheels`, `vk-date-wheel`, `vk-date-wheel-row`. The default Calendar is `vk-calendar`, and its head and days take the same names; a quick pick says which by `data-key` (`today`, `tomorrow`, `none`…). Its ✕, ✓ and a step's ‹ are `vk-editor-close`, `vk-editor-save` and `vk-editor-back`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
@@ -27,3 +27,7 @@ A row of Field rows may open with a glyph lane (`o-field-row-glyph`), 20 wide, i
|
|
|
27
27
|
| `--vk-overlay-card` | colour | `surface-overlay-card` | `hsl(0 0% 94%)` · dark `hsl(225 7% 15%)` |
|
|
28
28
|
| `--vk-radius-xl` | size | `radius-xl` | `15px` |
|
|
29
29
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
30
|
+
|
|
31
|
+
## A part's name
|
|
32
|
+
|
|
33
|
+
Handed `data-slot` and `data-key`, a Field draws them on its root in every form: alone, as a row of Field rows, and at a setting row's end.
|
|
@@ -26,3 +26,11 @@ The Select, the Picker, the Menu, the Button, the Input, the Number field, the D
|
|
|
26
26
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
27
27
|
| `--vk-sunken` | colour | `surface-sunken` | `hsl(0 0% 98%)` · dark `hsl(210 8% 5%)` |
|
|
28
28
|
| `--vk-warning` | colour | `text-warning` | `hsl(25 92% 41%)` |
|
|
29
|
+
|
|
30
|
+
## Its parts by name
|
|
31
|
+
|
|
32
|
+
Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
|
|
33
|
+
|
|
34
|
+
`vk-filter`, `vk-filter-rules`, `vk-filter-item`, `vk-filter-rule`, `vk-filter-where`, `vk-filter-joined`, `vk-filter-join`, `vk-filter-field`, `vk-filter-how`, `vk-filter-value`, `vk-filter-rule-more`, `vk-filter-rule-action`, `vk-filter-group`, `vk-filter-group-head`, `vk-filter-quantifier`, `vk-filter-group-more`, `vk-filter-group-action`, `vk-filter-delete`, `vk-filter-add`, `vk-filter-clear`, `vk-filter-foot`, `vk-filter-none`, `vk-filter-excluded`, `vk-filter-head`.
|
|
35
|
+
|
|
36
|
+
Under the provider's `panelControls` its buttons, boxes that pick, menus, popovers and text boxes are the app's own, each handed its part's name (VK-1013).
|
|
@@ -9,3 +9,9 @@ The Menu list, the Picker, the Button and the Sheet it draws with read their own
|
|
|
9
9
|
| `--vk-font-size-sm` | size | `text-sm` | `14px` |
|
|
10
10
|
| `--vk-line-height-sm` | size | `text-sm--line-height` | `1.4286` |
|
|
11
11
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
12
|
+
|
|
13
|
+
## Its parts by name
|
|
14
|
+
|
|
15
|
+
Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
|
|
16
|
+
|
|
17
|
+
`vk-group`, `vk-group-setting`, `vk-group-choice`, `vk-group-heading`, `vk-group-value`, `vk-group-hide-all`, `vk-group-remove`.
|
|
@@ -55,3 +55,7 @@ Every name the Input's, the InputGroup's and the segments' stylesheet (`input.cs
|
|
|
55
55
|
## Saving and Saved
|
|
56
56
|
|
|
57
57
|
`<Input saving />`, `<Input saved />`, and the same on an `InputGroup`: while the app saves what was typed, the Spinner stands at the field's end (after a group's end side), in `--vk-fg-subtlest`, the field busy (`aria-busy`) and still typed into; once the save took, a check and the word Saved, in `--vk-success` at `--vk-font-size-xs`, announced (`role="status"`), fading on `--vk-duration-base` after `--vk-saved-hold` and then gone from the field. It shows again each time `saved` turns on; saving wins when both are on. A page holds Saved with `data-force="saved"`. A save that fails is the Field's `error`, with the value before put back by the app.
|
|
58
|
+
|
|
59
|
+
## Its name in a panel or an editor
|
|
60
|
+
|
|
61
|
+
A panel or a field editor that names the Input it draws hands `data-slot` and `data-key` (VK-988: Customize's `vk-customize-name`; VK-989: a name's `vk-parts-box`, the date's `vk-date-year`): in its field form the Input draws them on its box (`data-kit="input"`), the element your stylesheet dresses, as it does `data-force`; bare (`chrome="bare"`), on the input itself.
|
|
@@ -23,3 +23,7 @@ Its own machinery (`--links-room`, `--links-under`, the room a phone's full Shee
|
|
|
23
23
|
| `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
|
|
24
24
|
| `--vk-overlay` | colour | `surface-overlay` | `hsl(0 0% 100%)` · dark `hsl(226 10% 10%)` |
|
|
25
25
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
26
|
+
|
|
27
|
+
## Its parts
|
|
28
|
+
|
|
29
|
+
The Links editor names every part it draws with a public `data-slot`, the same in the grid, the field row and a phone's sheet, on the box a person sees: `vk-links`, `vk-links-search`, `vk-links-list`, `vk-links-head`, `vk-links-rows`, `vk-links-row`, `vk-links-name`, `vk-links-field`, `vk-links-value`, `vk-links-control`, `vk-links-pop`, `vk-links-lead`, `vk-links-remove`, `vk-links-config`, `vk-links-more`, `vk-links-step`, `vk-links-back`, `vk-links-unlink`, `vk-links-offers`, `vk-links-offer`, `vk-links-offer-action`, `vk-links-note`, `vk-links-retry`. A link says its record, and a field its id, by `data-key`. Its ✕, ✓ and a step's ‹ are `vk-editor-close`, `vk-editor-save` and `vk-editor-back`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
@@ -50,3 +50,11 @@ Every name the menu list's stylesheet (`menu-list.css`) reads, each optional: th
|
|
|
50
50
|
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
51
51
|
| `--vk-hold-delay` | motion | `hold-delay` | `500ms` |
|
|
52
52
|
| `--vk-submenu-delay` | motion | `submenu-delay` | `100ms` |
|
|
53
|
+
|
|
54
|
+
## A row's name
|
|
55
|
+
|
|
56
|
+
An entry or a choice that carries `slot` (`PartSlot`: `slot`, `key`, `index`, VK-988) draws them on its row as `data-slot`, `data-key` and `data-index`, in every form: the popup's rows, the rows standing still, a panel's rows, a phone's rows and tiles. A `pick` or a `group` names its rows through its choices or entries.
|
|
57
|
+
|
|
58
|
+
## MenuListRow's name
|
|
59
|
+
|
|
60
|
+
`MenuListRow` draws a handed `data-slot` and `data-key` on its row: a field editor's row (the date editor's time on a phone, `vk-date-time`).
|
|
@@ -9,3 +9,7 @@ Every name the Menu's stylesheet (`menu.css`) reads, each optional: the ready st
|
|
|
9
9
|
| `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
10
10
|
| `--vk-layer-popup` | size | `layer-popup` | `50` |
|
|
11
11
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
12
|
+
|
|
13
|
+
## Its name in a panel
|
|
14
|
+
|
|
15
|
+
A menu a panel names takes `data-slot` (VK-988: `vk-view-menu`), drawn on its popup on a computer; its rows take theirs from each entry's `slot` (`PartSlot`). ViewKit's own map Menu (`ViewsMenuProps`) names a named menu's rows `<name>-row`, each by its item's `data-key`; a menu nobody names draws as before.
|
|
@@ -30,3 +30,7 @@ Its actions are any Button, a label's the Button's text kind; its × the quiet B
|
|
|
30
30
|
| `--vk-duration-base` | motion | `duration-base` | `200ms` |
|
|
31
31
|
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
32
32
|
| `--vk-corner-smoothing` | size | `corner-smoothing` | `0.7` |
|
|
33
|
+
|
|
34
|
+
## Its name in a panel
|
|
35
|
+
|
|
36
|
+
A Notice a panel names takes `data-slot` on its box (VK-988: Customize's `vk-customize-stale`).
|
|
@@ -10,3 +10,7 @@ Every name `number-editor.css` reads (beside the stylesheets of the controls it
|
|
|
10
10
|
| `--vk-font-size-base` | size | `text-base` | `16px` |
|
|
11
11
|
| `--vk-font-size-sm` | size | `text-sm` | `14px` |
|
|
12
12
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
13
|
+
|
|
14
|
+
## Its parts
|
|
15
|
+
|
|
16
|
+
The Number editor names every part it draws with a public `data-slot`, the same in the grid, the field row and a phone's sheet, on the box a person sees: `vk-number`, `vk-number-box`, `vk-number-currency`, `vk-number-unit`. Its ✕, ✓ and a step's ‹ are `vk-editor-close`, `vk-editor-save` and `vk-editor-back`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
@@ -23,3 +23,7 @@ Every name `pane.css` reads, each optional: the ready stylesheet declares it at
|
|
|
23
23
|
| `--vk-radius-2xl` | size | `radius-2xl` | `20px` |
|
|
24
24
|
| `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` · dark `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
|
|
25
25
|
| `--vk-shadow-xl` | shadow | `shadow-xl` | `0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)` · dark `0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)` |
|
|
26
|
+
|
|
27
|
+
## Its parts' names in a panel
|
|
28
|
+
|
|
29
|
+
`PaneHead` and `PaneFoot` take a handed `data-slot` (VK-988: Customize's `vk-customize-head` and `vk-customize-foot`).
|
|
@@ -40,3 +40,11 @@ Every name the Picker's stylesheet (`picker.css`) reads, each optional: the read
|
|
|
40
40
|
| `--vk-radius-xl` | size | `radius-xl` | `15px` |
|
|
41
41
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
42
42
|
| `--vk-hold-delay` | motion | `hold-delay` | `500ms` |
|
|
43
|
+
|
|
44
|
+
## A row's name
|
|
45
|
+
|
|
46
|
+
An item that carries `slot` (`PartSlot`, VK-988) draws it on its row as `data-slot` and `data-key`, on a computer and on a phone, its Selected card too: a panel's own row (a view in the views list, `vk-views-list-row`). `menuSlot` names its rows' menus' popups (the views list's `vk-view-menu`).
|
|
47
|
+
|
|
48
|
+
## Its parts
|
|
49
|
+
|
|
50
|
+
The Picker names every part it draws with a public `data-slot`, in every field editor, a Select's list and a panel alike: `vk-picker`, `vk-picker-search`, `vk-picker-list`, `vk-picker-chips`, `vk-picker-chip`, `vk-picker-option`, `vk-picker-parent`, `vk-picker-empty`, `vk-picker-add`, `vk-picker-create`, `vk-picker-action`, `vk-picker-group`, `vk-picker-heading`, `vk-picker-card`, `vk-picker-selected`, `vk-picker-tick`, `vk-picker-row-more`, `vk-picker-more`, `vk-picker-back`, `vk-picker-count`, `vk-picker-clear`, `vk-picker-lead`, `vk-picker-lead-make`, `vk-picker-message`, `vk-picker-retry`, `vk-picker-loading`, `vk-picker-foot`. A row says which one it is by `data-key`, its item's value, and wears `vk-picker-option` unless its item hands a `slot` of its own (a panel's row: the views list's `vk-views-list-row`), which wins. + Add is `vk-picker-add` where the Picker adds through `onAdd`, Create `vk-picker-create`; each action is `vk-picker-action`, keyed by its `id`. Its Cancel and ✓ on a phone are `vk-editor-cancel` and `vk-editor-save`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
@@ -33,3 +33,9 @@ The Toggle group, the Input, the Avatar, the Status and the Scrollbar it draws w
|
|
|
33
33
|
| `--vk-radius-lg` | size | `radius-lg` | `10px` |
|
|
34
34
|
| `--vk-shadow-menu` | shadow | `shadow-menu` | `0 6px 18px hsl(0 0% 0% / 0.06), 0 3px 9px hsl(0 0% 0% / 0.05), 0 1px 1px hsl(0 0% 0% / 0.04)` · dark `0 8px 24px hsl(0 0% 0% / 0.5), 0 0 0 1px hsl(0 0% 18%)` |
|
|
35
35
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
36
|
+
|
|
37
|
+
## Its parts by name
|
|
38
|
+
|
|
39
|
+
Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
|
|
40
|
+
|
|
41
|
+
`vk-quick`, `vk-quick-field`, `vk-quick-search`, `vk-quick-value`, `vk-quick-count`, `vk-quick-clear`, `vk-quick-none`, `vk-quick-head`.
|
|
@@ -70,3 +70,7 @@ The words beside a choice, and a card's edge and ground (`o-choice-*`), are `cho
|
|
|
70
70
|
## Cards on a phone
|
|
71
71
|
|
|
72
72
|
`<Radio card value="everyone" label="Everyone in the workspace" note="Every member and guest." />` in a group: on a phone the cards are iOS's ✓ rows on one card (`--vk-overlay-card`, `--vk-radius-xl`), each row 52 at least, its label in `--vk-font-size-base` and its note in `--vk-fg-subtlest`, a rule in `--vk-border-overlay-card` between each from the words (a place stops it `--field-rows-line-end` short of the right edge, as Field rows' rule); the ring stands at the row's end, bare, and the chosen one shows a ✓ in `--vk-fg-accent`. The ring keeps the keys and the focus.
|
|
73
|
+
|
|
74
|
+
## Its name in a panel
|
|
75
|
+
|
|
76
|
+
A panel that names the Radio it draws hands `data-slot` and `data-key` (VK-988: `vk-customize-layout`, say): the Radio draws them on its label, the card a person sees, never on the ring.
|
|
@@ -16,3 +16,11 @@ Every name the Select's stylesheet (`select.css`) reads, each optional: the read
|
|
|
16
16
|
## Saving and Saved
|
|
17
17
|
|
|
18
18
|
Every Select field takes `saving` and `saved`, as the Input does ([its page](input.md), Saving and Saved): the Spinner, then a check and Saved, just before the chevron, the field busy while it saves and named as before. Its names are the Input's.
|
|
19
|
+
|
|
20
|
+
## The components map's Select
|
|
21
|
+
|
|
22
|
+
`CONTROLS.Select` (`MapSelect`) is the components map's default `Select`: the map's props drawn as this Select, its list as wide as its rows need. Under the provider's `panelControls` a panel draws the app's own `Select` in this one's place (VK-1013).
|
|
23
|
+
|
|
24
|
+
## Its name in a panel
|
|
25
|
+
|
|
26
|
+
A panel that names the Select it draws hands `data-slot` and `data-key` (VK-988: `vk-sort-field`, say): the Select draws them on its box, the element carrying `data-kit="select"`, in every form.
|
|
@@ -39,3 +39,7 @@ Every name the bottom Sheet's stylesheet (`sheet.css`) reads, each optional: the
|
|
|
39
39
|
| `--vk-push-scale` | motion | `push-scale` | `0.94` |
|
|
40
40
|
| `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
|
|
41
41
|
| `--vk-duration-base` | motion | `duration-base` | `200ms` |
|
|
42
|
+
|
|
43
|
+
## Its buttons' names
|
|
44
|
+
|
|
45
|
+
`SheetButton` draws a handed `data-slot` on both its forms. `SheetHead` draws its `backSlot` on its ‹ (`data-slot`): a field editor's step hands `vk-editor-back`. ViewKit's own Sheet names the ✕, ✓ and ‹ it draws from its `actions` (`sheetActions: "head"`) `vk-editor-close`, `vk-editor-save` and `vk-editor-back`.
|
|
@@ -25,3 +25,11 @@ The Select, the Picker, the Menu, the Button and the Field rows it draws with re
|
|
|
25
25
|
| `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
|
|
26
26
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
27
27
|
| `--vk-warning` | colour | `text-warning` | `hsl(25 92% 41%)` |
|
|
28
|
+
|
|
29
|
+
## Its parts by name
|
|
30
|
+
|
|
31
|
+
Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
|
|
32
|
+
|
|
33
|
+
`vk-sort`, `vk-sort-rules`, `vk-sort-rule`, `vk-sort-grip`, `vk-sort-field`, `vk-sort-direction`, `vk-sort-remove`, `vk-sort-rule-open`, `vk-sort-rule-more`, `vk-sort-rule-action`, `vk-sort-direction-option`, `vk-sort-add`, `vk-sort-clear`, `vk-sort-foot`, `vk-sort-none`, `vk-sort-head`.
|
|
34
|
+
|
|
35
|
+
Under the provider's `panelControls` its buttons, boxes that pick, menus, popovers and text boxes are the app's own, each handed its part's name (VK-1013).
|
|
@@ -21,3 +21,7 @@ It also reads the inline input's own `--inline-input-ring` and `--inline-input-c
|
|
|
21
21
|
| `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
|
|
22
22
|
| `--vk-shadow-menu` | shadow | `shadow-menu` | `0 6px 18px hsl(0 0% 0% / 0.06), 0 3px 9px hsl(0 0% 0% / 0.05), 0 1px 1px hsl(0 0% 0% / 0.04)` · dark `0 8px 24px hsl(0 0% 0% / 0.5), 0 0 0 1px hsl(0 0% 18%)` |
|
|
23
23
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
24
|
+
|
|
25
|
+
## Its parts
|
|
26
|
+
|
|
27
|
+
The Text editor names every part it draws with a public `data-slot`, the same in the grid, the field row and a phone's sheet, on the box a person sees: `vk-text`, `vk-text-box`, `vk-text-country`, `vk-text-dial`, `vk-text-note`. Its ✕, ✓ and a step's ‹ are `vk-editor-close`, `vk-editor-save` and `vk-editor-back`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
@@ -38,3 +38,7 @@ It also reads the Popover's corners (`--popover-corners`), the popup line's reac
|
|
|
38
38
|
| `--vk-radius-xl` | size | `radius-xl` | `15px` |
|
|
39
39
|
| `--vk-shadow-lg` | shadow | `shadow-lg` | `0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` |
|
|
40
40
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
41
|
+
|
|
42
|
+
## Its parts
|
|
43
|
+
|
|
44
|
+
The Values editor names every part it draws with a public `data-slot`, the same in the grid, the field row and a phone's sheet, on the box a person sees: `vk-values`, `vk-values-rows`, `vk-values-row`, `vk-values-value`, `vk-values-edit`, `vk-values-label`, `vk-values-main`, `vk-values-pill`, `vk-values-acts`, `vk-values-grip`, `vk-values-copy`, `vk-values-open`, `vk-values-remove`, `vk-values-line`, `vk-values-code`, `vk-values-prefix`, `vk-values-add`, `vk-values-back`, `vk-values-error`. Each row says its place by `data-index`, from 0. Its ✕, ✓ and a step's ‹ are `vk-editor-close`, `vk-editor-save` and `vk-editor-back`. Dress a part by its name, never by a class: [the field editors' parts](../contract.md#the-field-editors-parts-vk-989).
|
|
@@ -6,3 +6,9 @@ Every name `views-list.css` reads (beside the stylesheets of the controls it dra
|
|
|
6
6
|
| ---- | ---- | ------------------ | ------- |
|
|
7
7
|
| `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
|
|
8
8
|
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
9
|
+
|
|
10
|
+
## Its parts by name
|
|
11
|
+
|
|
12
|
+
Each part inside it carries a public `data-slot` (VK-988), so your stylesheet dresses one part apart from the rest; a part that repeats also says which one it is (`data-key`, and a rule its place, `data-index`). What each names, and its keys: [the panels' parts](../contract.md#the-atoms).
|
|
13
|
+
|
|
14
|
+
`vk-views-list`, `vk-views-list-row`, `vk-views-list-head`, `vk-view-menu`, `vk-view-menu-row`, `vk-view-menu-name`, `vk-view-menu-layout`, `vk-view-menu-columns`, `vk-view-menu-act`.
|