viewkitjs 0.34.0 → 0.35.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 +110 -0
- package/package.json +1 -1
- package/views/README.md +1 -1
- package/views/dist/atoms/Avatar.js +2 -1
- package/views/dist/atoms/RelationChip.d.ts +2 -0
- package/views/dist/atoms/RelationChip.js +5 -0
- package/views/dist/atoms/RowMenu.d.ts +1 -1
- package/views/dist/atoms/RowMenu.js +15 -3
- package/views/dist/atoms/defaults.js +2 -0
- package/views/dist/atoms/types.d.ts +40 -4
- package/views/dist/cells/relation-wrap.js +9 -2
- package/views/dist/contract.d.ts +9 -6
- package/views/dist/contract.js +4 -2
- package/views/dist/controls/avatar/avatar-mark.d.ts +4 -0
- package/views/dist/controls/avatar/avatar-mark.js +5 -0
- package/views/dist/controls/avatar/avatar.d.ts +7 -4
- package/views/dist/controls/avatar/avatar.js +10 -4
- package/views/dist/controls/avatar/looks.d.ts +1 -1
- package/views/dist/controls/avatar/looks.js +3 -0
- package/views/dist/controls/avatar/record-mark.d.ts +16 -0
- package/views/dist/controls/avatar/record-mark.js +13 -0
- package/views/dist/controls/avatar/tokens.d.ts +12 -0
- package/views/dist/controls/avatar/tokens.js +3 -0
- package/views/dist/controls/avatar.css +54 -17
- package/views/dist/controls/bulk-bar/bulk-bar.js +4 -5
- package/views/dist/controls/bulk-bar/map-selection-bar.js +2 -1
- package/views/dist/controls/compound-editor/compound-editor.d.ts +3 -0
- package/views/dist/controls/compound-editor/map-parts-body.d.ts +1 -1
- package/views/dist/controls/compound-editor/map-parts-body.js +6 -1
- package/views/dist/controls/compound-editor/name-parts.js +2 -1
- package/views/dist/controls/compound-editor/place-parts.js +2 -2
- package/views/dist/controls/compound-editor/range-parts.js +10 -9
- package/views/dist/controls/customize/customize.d.ts +14 -5
- package/views/dist/controls/customize/customize.js +11 -14
- package/views/dist/controls/customize/map-customize-body.js +12 -11
- package/views/dist/controls/customize/words.d.ts +3 -3
- package/views/dist/controls/filter-editor/filter-editor.d.ts +2 -0
- package/views/dist/controls/filter-editor/filter-editor.js +4 -6
- package/views/dist/controls/filter-editor/parts.d.ts +1 -1
- package/views/dist/controls/filter-editor/parts.js +4 -4
- package/views/dist/controls/index.d.ts +1 -1
- package/views/dist/controls/internal/map-panel-controls.js +9 -5
- package/views/dist/controls/internal/panel-controls.d.ts +27 -3
- package/views/dist/controls/internal/panel-controls.js +141 -12
- package/views/dist/controls/links-editor/links-editor.js +5 -7
- package/views/dist/controls/links-editor/map-links-body.d.ts +1 -1
- package/views/dist/controls/links-editor/map-links-body.js +5 -1
- package/views/dist/controls/menu/menu.d.ts +3 -0
- package/views/dist/controls/menu/menu.js +2 -1
- package/views/dist/controls/picker/map-fields-body.d.ts +2 -2
- package/views/dist/controls/picker/map-fields-body.js +5 -1
- package/views/dist/controls/picker/map-picker.d.ts +8 -3
- package/views/dist/controls/picker/map-picker.js +14 -3
- package/views/dist/controls/picker/picker.js +11 -8
- package/views/dist/controls/picker/rows.d.ts +7 -2
- package/views/dist/controls/quick-filters/map-quick-filters-body.js +2 -1
- package/views/dist/controls/quick-filters/quick-filters.js +4 -4
- package/views/dist/controls/quick-filters/reminder.js +2 -2
- package/views/dist/controls/quick-filters/rules.d.ts +4 -1
- package/views/dist/controls/quick-filters/words.d.ts +2 -0
- package/views/dist/controls/quick-filters/words.js +1 -0
- package/views/dist/controls/select/select.d.ts +3 -0
- package/views/dist/controls/select/select.js +9 -3
- package/views/dist/controls/sort-editor/sort-editor.d.ts +2 -0
- package/views/dist/controls/sort-editor/sort-editor.js +4 -5
- package/views/dist/controls/toolbar/toolbar.d.ts +25 -12
- package/views/dist/controls/toolbar/toolbar.js +15 -20
- package/views/dist/controls/toolbar.css +0 -5
- package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
- package/views/dist/controls/tooltip/map-tooltip.js +4 -2
- package/views/dist/controls/values-editor/map-values-body.d.ts +1 -2
- package/views/dist/controls/values-editor/map-values-body.js +5 -1
- package/views/dist/controls/values-editor/values-editor.js +8 -7
- package/views/dist/display/option-badges.d.ts +16 -0
- package/views/dist/display/option-badges.js +11 -0
- package/views/dist/display/relation-link.d.ts +12 -0
- package/views/dist/display/relation-link.js +17 -0
- package/views/dist/display/relation.d.ts +1 -1
- package/views/dist/display/relation.js +10 -3
- package/views/dist/display/select.js +1 -8
- package/views/dist/editors/EditorPanel.js +1 -1
- package/views/dist/editors/RangeEditor.d.ts +3 -0
- package/views/dist/editors/RangeEditor.js +2 -2
- package/views/dist/editors/SelectEditor.d.ts +2 -2
- package/views/dist/editors/SelectEditor.js +1 -1
- package/views/dist/editors/TextEditor.js +4 -2
- package/views/dist/editors/ValueListEditor.js +2 -1
- package/views/dist/field-row/FieldRow.js +32 -5
- package/views/dist/field-row/editors/RowRangeEditor.js +2 -1
- package/views/dist/grid/chrome/GridAddColumn.js +9 -6
- package/views/dist/grid/chrome/GridCellEditors.js +1 -1
- package/views/dist/grid/chrome/GridCellOutline.d.ts +3 -1
- package/views/dist/grid/chrome/GridCellOutline.js +16 -6
- package/views/dist/grid/chrome/GridChipsEditor.js +3 -2
- package/views/dist/grid/chrome/GridColumnMenu.js +7 -4
- package/views/dist/grid/chrome/GridFooter.d.ts +4 -1
- package/views/dist/grid/chrome/GridFooter.js +4 -4
- package/views/dist/grid/chrome/GridGroupMenu.js +39 -14
- package/views/dist/grid/chrome/GridHeader.d.ts +1 -1
- package/views/dist/grid/chrome/GridHeader.js +1 -2
- package/views/dist/grid/chrome/GridRangeEditor.d.ts +4 -1
- package/views/dist/grid/chrome/GridRangeEditor.js +2 -2
- package/views/dist/grid/chrome/GridRow.js +5 -3
- package/views/dist/grid/chrome/GridRowActions.d.ts +4 -1
- package/views/dist/grid/chrome/GridRowActions.js +2 -2
- package/views/dist/grid/chrome/GridRowCells.js +3 -2
- package/views/dist/grid/chrome/GridStructure.js +1 -1
- package/views/dist/grid/chrome/GridTable.js +32 -20
- package/views/dist/grid/chrome/checks.d.ts +1 -1
- package/views/dist/grid/chrome/checks.js +4 -1
- package/views/dist/grid/chrome/grid-cell-classes.d.ts +6 -2
- package/views/dist/grid/chrome/grid-cell-classes.js +10 -5
- package/views/dist/grid/chrome/grid-hover.d.ts +10 -2
- package/views/dist/grid/chrome/grid-hover.js +14 -4
- package/views/dist/grid/chrome/grid-row-props.d.ts +4 -0
- package/views/dist/grid/chrome/grid-rows-menu.js +9 -4
- package/views/dist/grid/chrome/grid-table-props.d.ts +10 -2
- package/views/dist/grid/grid.css +6 -0
- package/views/dist/grid/looks.d.ts +3 -1
- package/views/dist/grid/looks.js +10 -4
- package/views/dist/list/layer.d.ts +8 -0
- package/views/dist/list/layer.js +7 -0
- package/views/dist/list/store.d.ts +1 -1
- package/views/dist/list/toolbar.js +44 -19
- package/views/dist/list/views.js +1 -0
- package/views/dist/panels/availability.d.ts +5 -0
- package/views/dist/panels/availability.js +4 -5
- package/views/dist/panels/customize-body.d.ts +4 -0
- package/views/dist/panels/customize-body.js +13 -11
- package/views/dist/panels/model.d.ts +9 -4
- package/views/dist/panels/react/customize-body.js +5 -2
- package/views/dist/panels/react/customize.d.ts +5 -0
- package/views/dist/panels/react/filter/FilterEditor.d.ts +6 -0
- package/views/dist/panels/react/filter/FilterEditor.js +7 -0
- package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +3 -1
- package/views/dist/panels/react/quick/QuickFiltersPanel.js +7 -3
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +4 -1
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +11 -1
- package/views/dist/panels/react/toolbar/Toolbar.js +16 -6
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +6 -1
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +12 -5
- package/views/dist/panels/react/toolbar/ToolbarFilters.d.ts +7 -3
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +18 -8
- package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +6 -1
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.d.ts +3 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.js +5 -4
- package/views/dist/panels/react/toolbar/ToolbarSort.d.ts +7 -1
- package/views/dist/panels/react/toolbar/ToolbarSort.js +6 -3
- package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +3 -0
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +4 -4
- package/views/dist/panels/react/views-row/ViewPicker.js +13 -5
- package/views/dist/panels/react.d.ts +1 -1
- package/views/dist/panels/settings/layout.js +6 -38
- package/views/dist/panels/toolbar/page-resets.d.ts +17 -0
- package/views/dist/panels/toolbar/page-resets.js +62 -0
- package/views/dist/panels/toolbar/same-item.d.ts +7 -0
- package/views/dist/panels/toolbar/same-item.js +9 -0
- package/views/dist/panels/view-state.d.ts +4 -0
- package/views/dist/provider/ViewsProvider.d.ts +9 -4
- package/views/dist/provider/ViewsProvider.js +13 -2
- package/views/dist/provider/components.d.ts +27 -5
- package/views/dist/provider/components.js +1 -1
- package/views/dist/react.d.ts +1 -1
- package/views/dist/styles.css +98 -23
- package/views/dist/styles.unlayered.css +98 -23
- package/views/docs/contract.md +38 -25
- package/views/docs/controls/avatar.md +3 -0
- package/views/docs/controls/bulk-bar.md +3 -1
- package/views/docs/controls/compound-editor.md +2 -0
- package/views/docs/controls/customize.md +1 -1
- package/views/docs/controls/filter-editor.md +1 -1
- package/views/docs/controls/links-editor.md +2 -0
- package/views/docs/controls/pane.md +1 -1
- package/views/docs/controls/picker.md +2 -0
- package/views/docs/controls/quick-filters.md +1 -1
- package/views/docs/controls/text-editor.md +1 -1
- package/views/docs/controls/values-editor.md +2 -0
- package/views/docs/guides/atoms.md +54 -3
- package/views/docs/guides/display.md +1 -1
- package/views/docs/guides/looks.md +1 -1
- package/views/docs/guides/the-grid.md +4 -2
- package/views/docs/guides/the-provider.md +2 -2
- package/views/docs/index.md +2 -2
- package/views/docs/install.md +198 -104
- package/views/docs/reference/controls.md +17 -15
- package/views/docs/reference/editors-range.md +1 -1
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +2 -1
- package/views/docs/reference/list.md +2 -2
- package/views/docs/reference/looks.md +5 -5
- package/views/docs/reference/panels-react.md +13 -12
- package/views/docs/reference/panels.md +4 -4
- package/views/docs/reference/react.md +10 -8
- package/views/docs/reference/views.md +2 -2
- package/views/docs/reshaping.md +22 -6
- package/views/skills/views/SKILL.md +2 -2
|
@@ -12,7 +12,7 @@ Guide: [the provider](../guides/the-provider.md).
|
|
|
12
12
|
- `ViewsEscapeRules` — the provider's `escape`: an `EditEscape` per field type, and for `email`, `phone`, `url` and `domain` either one `EditEscape`, which covers both of their editors, or an `EditEscapeByEditor`.
|
|
13
13
|
- `EditEscapeByEditor` — `{ box?: EditEscape; list?: EditEscape }`: what Escape does in an email, phone, link or domain field by the editor it opens, `box` its text box (a single value) and `list` the value list (several values, or a single one `oneValue` opens as a list of one). One left out throws the edit away.
|
|
14
14
|
- `ViewsOneValueEditors` — `Partial<Record<"email" | "domain", "text" | "list">>`, the provider's `oneValue`.
|
|
15
|
-
- `PANEL_CONTROL_NAMES` — `Button`, `Select`, `Menu`, `Popover`, `Input` and `
|
|
15
|
+
- `PANEL_CONTROL_NAMES` — `Button`, `Select`, `Menu`, `Popover`, `Input`, `Calendar` and `Avatar` (your `atoms.Avatar`, VK-1044): the controls the provider's `panelControls` can name.
|
|
16
16
|
- `PanelControlName` — one member of `PANEL_CONTROL_NAMES`.
|
|
17
17
|
- `flatSelectItems` — a Select's rows (`ViewsSelectItem[]`) with every `level` flattened, each row one level in standing in its parent's place, named by its path ("Company › Region"), its value as handed: for a `Select` of yours that draws no levels.
|
|
18
18
|
- `DEFAULT_DESKTOP_QUERY` — `(min-width: 1024px)`: the width a desktop starts at when the provider is handed no `desktopQuery`, the default controls' phone line too (`PhoneLine`, in controls.md). Where the screen can't be asked (a server render, a browser with no `matchMedia`), it is a desktop.
|
|
@@ -37,7 +37,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
|
|
|
37
37
|
- Look: `chrome` is `panel` (your card popover, the default) or `menu` (your menu panel's surface, for a popover that holds a list: no inset, no card width). `onPanelClick` takes a click inside the popup, `panelData` sets `data-*` attributes on it, and `style` carries what a class cannot say, such as a width that follows a cell.
|
|
38
38
|
- `ViewsPortsHostProps` — what the components map's `PortsHost` is told: `toast` and `confirm` (which ports the app left out) and `onReady` (hand it the ports once they stand).
|
|
39
39
|
- `ViewsSelectionBarProps` — what the components map's `SelectionBar` is handed: `SelectionBar`'s own props, at every count.
|
|
40
|
-
- `ViewsTooltipProps` — a tooltip around the element it wraps (`children`), showing `content`, with `side`, `align`, `delayMs` and a class. Your app mounts one tooltip provider above the views; a tooltip never mounts its own.
|
|
40
|
+
- `ViewsTooltipProps` — a tooltip around the element it wraps (`children`), showing `content`, with `side`, `align`, `delayMs` and a class; `reason`, handed inside ViewKit's panels under `panelControls` (VK-1015), says its content is why what it names can't be used, a longer line to wrap. Your app mounts one tooltip provider above the views; a tooltip never mounts its own.
|
|
41
41
|
- `ViewsCheckboxProps` — a checkbox: `checked`, and `indeterminate` for a box ticked partly, whose press hands `true` while `checked` is false. `onCheckedChange` hands the new value and, where your library reports it, `{ event }`, the press that changed it (a list reads its shift key for a range). `partialTone` colours the partial mark, `muted` by default or `brand` for a select-all with a live selection; with `disabled`, `readOnly` (shown as it is and not pressable: a yes/no the grid or a field row can't write), a class, `tabIndex` and `aria-label`.
|
|
42
42
|
- `ViewsMenuProps` — a menu opened at an `anchor`, with no trigger child (a group opens beside it only where it asks to and your menu can), controlled by `open` and `onOpenChange`, drawing its `items`, placed by `side` and `align`, and named by `label`, its accessible name, which every menu the package opens hands; `data-slot`, its public name where ViewKit names it (a view's menu, `vk-view-menu`, VK-988), for your menu to draw on its popup. On Base UI it is the menu's root, positioner and popup, the anchor handed to the positioner.
|
|
43
43
|
- `ViewsMenuItem` — one row of a menu, as data your `Menu` draws: its `key`, `label` (always words), `icon`, `onSelect`, `disabled` with an optional `disabledReason` (why, for you to show), and `destructive`, a `separatorBefore`, a `shortcut` hint drawn at its end and never bound, and an `href` that makes it a link (with `onSelect` still firing). A `checked` row is checkable and closes the menu like any row, unless it carries `keepOpen`. A row with `children` is a group: its rows drawn in place under its label, unless it carries `beside` (open them one level in), its own `onSelect`, `href` and `checked` ignored; a disabled group's rows reach your `Menu` already `disabled`, with the group's reason where they give none. Any row may carry `detail`, its current value in words, for its end. A plain row may carry `render`, which draws its inside in place of its icon, words, keys and count (`label` still its name; called while the menu draws, so it may call no hooks). All three are hints: a menu that draws none of them keeps every group in place and every row closing. A row's `slot`, where ViewKit names it (a panel's menu under `panelControls`: `vk-sort-rule-action`), is its public name, `key` saying which: draw them on your row as `data-slot` and `data-key`.
|
|
@@ -68,7 +68,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
|
|
|
68
68
|
- `ViewsSearchFieldProps` — the toolbar's search box your app draws: `value`, `onChange` (every keystroke), `placeholder`, `label` (its name to a screen reader), `searching` and `searchingLabel` (draw a spinner where your glass is, the box still usable), `onClear` (empties the search, and closes it where `closes`), `clearLabel` (your clear's name: "Close search" where it closes, "Clear" where it only clears), `closes` (opened from its button: your clear stands while it is open, empty or not; filling its line: show it only with a value), `form` (`computer` or `phone`) and `fill` (it fills its line).
|
|
69
69
|
- `ViewsViewsListBodyProps` — the views list's whole body your app draws: `label`, `views` (each a `ViewsViewsListItem`), `value` (the view in use), `form`, `onViewChange` (a view picked; written when it is one of `views`; it closes nothing), `onCreate` and `createLabel` where the axis grows (what holds it closes first), `onReorder` and `canDrag` where the axis reorders (one whole block, shared or the reader's own, each once; any other order writes nothing), `onDone` (what holds it closes), on a phone where the sheet's head doesn't draw it `actions` (the ✕, and Back while the body stands on a step), on a computer `onHold` (while true, a press outside and Escape close nothing: the body asks outside the list), on a phone `onStepChange` (the body stands on a step of its own: the sheet shows its title and Back), and, where the axis hands them, `verbs` (a view's whole menu's data, `ViewsViewVerbs`).
|
|
70
70
|
- `ViewsViewsListItem` — one view as the views list's body is handed it: `value`, `label`, `icon`, `count` (absent while counts are hidden), `private`, `menu` (the view's own verbs), and for a view's whole menu `layout`, `changed`, `favorite` and `readOnly` (nothing that changes it).
|
|
71
|
-
- `ViewsViewMenuProps` — one view's whole menu your app may draw (`ViewMenu`, optional; `CONTROLS.ViewMenu` is ViewKit's own), opened on a computer by a views row's pill and a folded view's `⋮` where the axis hands `verbs`: `open`, `onOpenChange`, `anchor` and `align`, as `Menu` is; `view` (whose menu it is; left out, New view's Modal stands in place of a menu, as the row's + opens it, and `onOpenChange(false)` is told once it has closed), `views` (every view of the axis, each a `ViewsViewsListItem`), `value` (the view in use), `verbs`, `onDone` (what holds it closes) and `onHold` (while true, a press outside and Escape close nothing: the menu asks outside what holds it).
|
|
71
|
+
- `ViewsViewMenuProps` — one view's whole menu your app may draw (`ViewMenu`, optional; `CONTROLS.ViewMenu` is ViewKit's own), opened on a computer by a views row's pill and a folded view's `⋮` where the axis hands `verbs`: `open`, `onOpenChange`, `anchor` and `align`, as `Menu` is; `view` (whose menu it is; left out, New view's Modal stands in place of a menu, as the row's + opens it and the picker's + with no view yet, and `onOpenChange(false)` is told once it has closed), `views` (every view of the axis, each a `ViewsViewsListItem`), `value` (the view in use), `verbs`, `onDone` (what holds it closes) and `onHold` (while true, a press outside and Escape close nothing: the menu asks outside what holds it).
|
|
72
72
|
- `ViewsPaneProps` — what your map's `Pane` is handed (VK-1026; `CONTROLS.Pane` is ViewKit's own Pane): `open`, `onOpenChange` (it closes from inside: Escape, its ✕), `container` (the list's box it stands in: positioned, holding the grid, never scrolling itself; null until it is on the page, when it draws nothing), `opener` (the part's button, ⋯ while folded: give it the focus back as it closes from inside), `label` (its name to a screen reader) and `children` (the panel). A toolbar with `customizeIn: "pane"` opens Customize in it on a computer, in the box handed as `paneBox`.
|
|
73
73
|
- `ViewsViewVerbs` — a view's verbs, handed on the axis where your app lets ViewKit draw a view's whole menu: `layouts`, `records` (the noun in the delete question's line), a board's `columns`, and `onChange`, which takes each `ViewsViewChange` and opens the right view itself (ViewKit moves none: `viewsAfter` does it); optionally `menu`, the view's menu as data, handed its default items and the view and returning the items drawn ([`/list`'s Menus as data](./list.md#menus-as-data)).
|
|
74
74
|
- `ViewsViewChange` — a change a view's menu makes: rename, create (with its layout, name, a board's columns and the view it was made from), duplicate, delete, restore (Undo: the view, its place, whether it was open), save, reset, edit, link, favorite, private.
|
|
@@ -78,7 +78,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
|
|
|
78
78
|
- `ViewsGroupDimension` — a field a list can be grouped by: `value`, `label`, `orderOptions` (each its mode, words and `defaultDir`), `defaultOrder`, and a date's `granularities` with `defaultGranularity`.
|
|
79
79
|
- `ViewsGroupValue` — a list's group as one value: `value` (the field grouped by, or `none`), `order` (the active field's `mode` and `dir`), `granularity`, `hideEmpty` and `groups` (each a `ViewsGroupEntry`, in the order the list shows them).
|
|
80
80
|
- `ViewsGroupEntry` — one group: `key`, `label`, `empty`, `hidden`, and its `count` where the list counts it.
|
|
81
|
-
- `ViewsCustomizeBodyProps` — Customize's whole body your app draws: `label`, `page` and `onPageChange` (a `ViewsCustomizePage`), `layout` (a `ViewsCustomizeLayout`), `columns` (`ViewsCustomizeColumns`), `filter` (`FilterBody`'s props on the whole filter, without `form`, `onDone` and `actions`), `sort` (`SortBody`'s, likewise), `group` (`GroupBody`'s, likewise), `toggles` (each a `ViewsCustomizeToggle`, Show counts among them), `view` (on a shared view, or the person's own with `own`: `changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`), `foot`, `onClear`, `clearAll`, `form`, `onDone` and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕). `fields` (`ViewsCustomizeFields`): a list's per-field filters, its time range and its date ranges.
|
|
81
|
+
- `ViewsCustomizeBodyProps` — Customize's whole body your app draws: `label`, `page` and `onPageChange` (a `ViewsCustomizePage`), `layout` (a `ViewsCustomizeLayout`), `columns` (`ViewsCustomizeColumns`), `filter` (`FilterBody`'s props on the whole filter, without `form`, `onDone` and `actions`), `sort` (`SortBody`'s, likewise), `group` (`GroupBody`'s, likewise), `toggles` (each a `ViewsCustomizeToggle`, Show counts among them), `view` (on a shared view, or the person's own with `own`: `changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`, and `layered` while the reader's own layer holds something), `resets` (each page's own Reset, while that page differs), `foot`, `onClear`, `clearAll`, `form`, `onDone` and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕). `fields` (`ViewsCustomizeFields`): a list's per-field filters, its time range and its date ranges.
|
|
82
82
|
- `ViewsCustomizePage` — where a Customize body stands: `list`, `layout`, `columns`, `filter`, `sort` or `group`.
|
|
83
83
|
- `ViewsCustomizeLayout` — the layouts (`options`, `refused` with reasons, `value`, `onLayoutChange`) and the layout in use's `toggles`, `choices`, `density` and the reader's own `personal` settings.
|
|
84
84
|
- `ViewsCustomizeFields` — a list's per-field filters, its time range and its date ranges: `folded` (behind one Filter row, or each its own row) and `items`, each a `ViewsCustomizeField`.
|
|
@@ -100,7 +100,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
|
|
|
100
100
|
- `ViewsSheetActionsPlace` — where the ✕ and ✓ stand on a phone, the provider's `sheetActions`: `bar` (the default, the panel's own bar, or a toolbar panel's own ✕, inside your sheet) or `head` (handed to your sheet as `actions`, and none drawn inside; a toolbar panel hands `close` alone, but the sort editor hands `close`, which takes its rules back, and `done`).
|
|
101
101
|
- `ViewsInputProps` — a single-line text box: every prop of an `<input>`, `ref` included, which your element must receive, and `chrome`, `bare` (the default: a grid cell, a panel that frames the box) or `field` (your field's frame).
|
|
102
102
|
- `ViewsSelectItem` — one row of a `Select`'s list: its `value`, `label`, an `icon`, a second `line`, the `group` it stands under, `disabled`, and `level`, the rows one level in under a row never picked itself (draw them in place, or flatten them with `flatSelectItems`).
|
|
103
|
-
- `ViewsSelectProps` — the components map's `Select`, which ViewKit's panels draw under `panelControls` for their boxes that pick (the sort's and the filter's,
|
|
103
|
+
- `ViewsSelectProps` — the components map's `Select`, which ViewKit's panels and field editors draw under `panelControls` for their boxes that pick (the sort's and the filter's, New view's columns, the place editor's on a computer and the links editor's fields; a clear the box offers comes as its first row, a pick of it handing `null`): its `items`, its `value` (one, several with `multiple`, or none) and `onValueChange`, a `placeholder`, `disabled`, `open` and `onOpenChange` (on a phone a panel holds it shut and turns its sheet to a step of its own on `onOpenChange(true)`: honour both when handed), `search` (the words of the search ViewKit's own shows over a long list), `size` (`sm` or `default`), a class, `aria-label`, `id` (inside a ViewKit field, the id its label names, VK-1022), and the part's `data-slot` and `data-key`, to draw on the box a person presses. Forward any other prop to your box.
|
|
104
104
|
- `ViewsAnchor` — where a floating part attaches: an element, a ref to one, a point `{ x, y }` (a context menu), or `null`.
|
|
105
105
|
- `ViewsSide` — the side a floating part opens on: `top`, `right`, `bottom` or `left`.
|
|
106
106
|
- `ViewsAlign` — how a floating part lines up along that side: `start`, `center` or `end`.
|
|
@@ -136,7 +136,7 @@ Guide: [atoms](../guides/atoms.md).
|
|
|
136
136
|
The pieces the rendering is built from, and your app's own pieces it cannot draw itself. Each ships as a default, drawn from your app's colours and marked with its own `data-slot`; your app swaps any of them through the provider's `atoms`, and the rest stay the defaults. A swapped atom marks itself as your app does. The [contract](../contract.md) lists their slots and states.
|
|
137
137
|
|
|
138
138
|
- `DEFAULT_VIEWS_ATOMS` — the atoms every app starts with, one default per name of `ViewsAtoms`; the provider lays your `atoms` over it.
|
|
139
|
-
- `ViewsAtoms` — the full set, one component per atom: `List`, `Row`, `RowContent`, `TickBox`, `Avatar`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`, `RelationLink`, `RelationRoles`, `CellMore`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu`, and the panels' rows `ChoiceRow`, `CheckRow`, `RadioRow`, `DirectionButton`, `MenuRow`, `ToggleRow` and `PanelSearch`, the selection's `SelectionSheet`, the filter panel's month `RangeCalendar`, the views row's `Pill`, and the toolbar's `ToolbarButton`. The provider's `atoms` takes any part of it.
|
|
139
|
+
- `ViewsAtoms` — the full set, one component per atom: `List`, `Row`, `RowContent`, `TickBox`, `Avatar`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`, `RelationLink`, `RelationRoles`, `RelationChip`, `CellMore`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu`, and the panels' rows `ChoiceRow`, `CheckRow`, `RadioRow`, `DirectionButton`, `MenuRow`, `ToggleRow` and `PanelSearch`, the selection's `SelectionSheet`, the filter panel's month `RangeCalendar`, the views row's `Pill`, and the toolbar's `ToolbarButton`. The provider's `atoms` takes any part of it.
|
|
140
140
|
- `ViewsChoiceRowProps` — a panel's value row: `label`, a `description` under it, a right-hand `meta` (a sample, a count; a row with one draws no check), `leading`, `trailing`, `selected`, `onClick`, `onMouseDown`, `disabled`, `role` and `aria-selected`.
|
|
141
141
|
- `ViewsCheckRowProps` — toggles one of many, a tick box on the left: `checked`, `onClick`, its `children`, `leading`, `trailing`, `disabled`.
|
|
142
142
|
- `ViewsRadioRowProps` — picks one of a set: `selected`, `label`, `onClick`, `leading`, `trailing`, `mark` (`"check"` or `"box"`), `disabled` and the `disabledReason` your `Tooltip` shows, and class hooks for the check and the label.
|
|
@@ -154,7 +154,7 @@ The pieces the rendering is built from, and your app's own pieces it cannot draw
|
|
|
154
154
|
- How it reads: `chosen` draws a trailing check (a chosen row with a `detail` draws the detail in the brand colour and no check), `chosenTint` false keeps a badge label's own colour, `tone` `muted` for a row that offers rather than lists (none, create, add), and `size` `compact` (13px) or `regular` (your menu size, the default).
|
|
155
155
|
- `ViewsRowProps` — a whole row: everything `ViewsRowContentProps` takes, as a button, or with `interactive` false a static line. It adds `onClick`, `onMouseDown` (for a row inside an editor that keeps its input focused), `disabled`, `title`, a `role` with `aria-selected`, and `opens` and `open` for a row that opens a flyout beside its menu.
|
|
156
156
|
- `ViewsTickBoxProps` — a paint-only tick box: `checked` and a class. The control around it is the caller's.
|
|
157
|
-
- `ViewsAvatarProps` — a person's or a record's picture, drawn in a user's, a relation's and an actor's chip (`size: "chip"`) and before the name when the list's `rowIcon` hands the row's `avatar` (`size: "glyph"`, sized by `--vk-glyph`): `label` (whose picture it is, for initials), `avatarUrl` (the picture, when there is one), `kind` (the record's kind as your 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 while it loads and the fallback otherwise; yours may hand back the fallback for a kind it doesn't dress. It only paints: what wraps the chip owns the click.
|
|
157
|
+
- `ViewsAvatarProps` — a person's or a record's picture, drawn in a user's, a relation's and an actor's chip (`size: "chip"`) and before the name when the list's `rowIcon` hands the row's `avatar` (`size: "glyph"`, sized by `--vk-glyph`): `label` (whose picture it is, for initials), `avatarUrl` (the picture, when there is one), `kind` (the record's kind as your 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). Where the provider's `panelControls` names `Avatar`, it also draws every record's mark ViewKit's panels draw (the Picker's rows, the links editor's, the bulk bar's choices, the quick filters' values), its `size` then a number in pixels (20, 24, 32 or 40) and its `fallback` ViewKit's own Avatar (VK-1044). The default draws the picture while it loads and the fallback otherwise; yours may hand back the fallback for a kind it doesn't dress. It only paints: what wraps the chip owns the click.
|
|
158
158
|
- `ViewsStatusBadgeProps` — a pill coloured by a status slot of `viewkitjs/fields`: its `slot` and `label`, a `leading` mark that replaces the slot's own, a `title`, a `size` (`compact`, 11px, the default; `regular`; or `row`, the text size of the row it sits in, which a cell's status value hands) and a class. It is handed `place` wherever a field's option is drawn (a cell, the select editor, the selection bar): where the status stands among the field's steps.
|
|
159
159
|
- `ViewsStatusPlace` — a status's `place`: `options`, the field's active options in their order (the same array for every cell of a field), and `index`, this one's place in them. A stray or archived value, and a badge that is no option, are handed none.
|
|
160
160
|
- `ViewsStatusOption` — one of those options as a badge is handed it: `value`, `label` and its `slot`.
|
|
@@ -163,10 +163,12 @@ The pieces the rendering is built from, and your app's own pieces it cannot draw
|
|
|
163
163
|
- `ViewsCommandMenuProps` — a `command` cell's verb menu: the `trigger` the cell drew (a button), the host's `items` as `FieldRowMenuItem`s, and `align`. The default is your components map's `Menu`; your app may swap in its own action menu.
|
|
164
164
|
- `ViewsRangeCalendarProps` — the filter panel's month, in ISO days: `mode` (`single` or `range`), `from`, `to`, `onSelect` (the selection a press makes, and the day pressed), `armed` (the end the next press sets), `limit`, a painted `window`, `minNights`, a `footer`, `cellSize`, `locale` and `className`. The default is the map's one-day `Calendar` on the end being picked; hand your own to paint a range.
|
|
165
165
|
- `ViewsSelectionSheetProps` — the phone's sheet of a selection's verbs, opened by the selection bar's Actions: `open`, `onOpenChange`, `title` ("3 selected"), the `verbs`, `onDelete` and `deleteLabel` for the bar's own delete, drawn last, and `busy`. The default draws a disabled verb's `disabledReason` as its row's second line, none while `busy`. Picking a row closes the sheet, then runs it.
|
|
166
|
-
- `ViewsRowMenuProps` — the row's right-click menu, around the row it opens on (`children`): opened by a right-click on the row or by its ⋯, it lists an Open page row for `openHref` (a new tab), the `items` the rendering built, and a Delete row when `onDelete` is given, called with `rowId` once the confirm port says yes, with `deleteLabel` as its `subject`. A delete that rejects says so through the toast port's `error`. `onToggleSelect` flips the row's selection, for an app whose long-press selects; with `GridTable`'s `phonePicking` on, a call that answers a long press still held ticks the pressed row once with the grid's own, never flipping it back, and with no press held it flips the row last pressed. The default doesn't use it, and without `phonePicking` a long-press on a phone opens nothing.
|
|
166
|
+
- `ViewsRowMenuProps` — the row's right-click menu, around the row it opens on (`children`): opened by a right-click on the row or by its ⋯, it lists an Open page row for `openHref` (a new tab), the `items` the rendering built, and a Delete row when `onDelete` is given, called with `rowId` once the confirm port says yes, with `deleteLabel` as its `subject`. A delete that rejects says so through the toast port's `error`. `onToggleSelect` flips the row's selection, for an app whose long-press selects; with `GridTable`'s `phonePicking` on, a call that answers a long press still held ticks the pressed row once with the grid's own, never flipping it back, and with no press held it flips the row last pressed. The default doesn't use it, and without `phonePicking` a long-press on a phone opens nothing. Call `onOpenChange` with `true` as the menu opens and `false` as it closes: while it is open the grid draws the row it is aimed at as under the pointer (`data-hovered`, its tint, its ⋯), wherever the pointer goes. The default calls it; an atom that doesn't leaves the row to the real pointer.
|
|
167
167
|
- `ViewsRowMenuItem` — one row of the row's menu, the shape a host's own row-menu items already have: a rule (`{ separator: true }`), or a row with its `label`, `icon`, `onClick`, `destructive`, `disabled`, a `shortcut` hint drawn at its end and never bound, and an optional `key`, by which `menus.row` finds it (its words, without one).
|
|
168
168
|
- `ViewsRelationLinkProps` — where a relation chip goes: the `relation` value and the chip the display drew as `children`, for your app's own link around it. The default goes nowhere, since a relation is a fact as often as a destination.
|
|
169
169
|
- `ViewsRelationRolesProps` — a link's roles, drawn inside its chip after the record's name, on a `many` relation that declares `links`: the `relation` value and its `roles` in order, each its stored `value` and its `label` (the field's, else the value). Handed only when the link holds one or more. The default draws the labels in the subtle colour after a middle dot, cut before the name in a narrow cell, and names the record and every role on hover.
|
|
170
|
+
- `ViewsRelationChipProps` — a mentioned record (VK-1053), drawn where the provider's `panelControls` names `RelationChip`: every relation ViewKit draws, in a table's cell (one and many, and the +N list), a field row's value, `renderFieldValue` (a highlight) and a user field's chip. ViewKit places a mentioned record and hands its data; your app draws it. It is handed `relation` (`id`, `label`, `entity`, `avatarUrl`), `roles` (each its `value` and `label`; none but on a `many` relation that declares `links`), `size` (`chip` in a cell or a highlight, `row` in a field row), `render`, the host's link where it has one, and `fallback`, ViewKit's own chip as it would draw it there. The default draws its `fallback`.
|
|
171
|
+
- `ViewsRelationChipLinkProps` — what a mentioned record hands the host's link it draws itself through (`render`): its own element's props, its words and mark as `children`, its class, its `data-*`, its ref. The host's link draws its own element with them: a cell whose host opens its relations a bare `<button data-slot="vk-relation-link" data-no-nav>` whose press opens the record, the app's `RelationLink` or a host's `relationWrap` around a `<span>` holding them.
|
|
170
172
|
- `ViewsCellMoreProps` — the count after a cell's shown values: `count`, how many are not shown, and `inert`, true where the host owns the click (the count is plain text, and nothing opens). Drawn inside `data-slot="vk-cell-more"`, a button that opens the whole list. The default, `DefaultCellMore`, draws "+" and the number, and ViewKit keeps its own frame on that element only for it; yours draws inside a bare button (or span), so a count tag of yours stands there alone.
|
|
171
173
|
- `ViewsLoadingProps` — a wait: `placement` `body` (the whole list reloading) or `footer` (more rows arriving), and the `label` read to assistive technology. The default is a plain ring, larger in the body.
|
|
172
174
|
- `ViewsLoadMoreProps` — how a list asks for its next page once its end comes near: `onReveal`, and an optional `label` drawn while it waits. The default watches a sentinel past the last row, calls `onReveal` as it comes within 600px of the end of what it scrolls in (the grid's own scroll area, else the viewport), and draws your `Loading` (or the label) meanwhile.
|
|
@@ -11,7 +11,7 @@ Guide: [the provider](../guides/the-provider.md).
|
|
|
11
11
|
- `VK_PREFIX` — the prefix `"vk"`, worn by everything that shares a global namespace: the CSS variables (`--vk-*`) and the `data-slot` values (`vk-grid-row`). States are bare `data-*` attributes, and message keys live under `views.*` ([the contract](../contract.md)).
|
|
12
12
|
- `GRID_SLOTS` — every `data-slot` value the grid draws, from `vk-grid` (the frame) to `vk-grid-pager-next`, in the order of the [contract's Slots table](../contract.md#slots). A skin styles a part through its slot, never through a class name the package happens to use.
|
|
13
13
|
- `GridSlot` — one member of `GRID_SLOTS`.
|
|
14
|
-
- `GRID_STATES` — the flags the grid styles, each a `data-*` attribute present when true (`focused`, `selected`, `editing`, `in-range`, `range-edge`, `pending`, `invalid`, `dragging`, `empty`, `frozen`, `frozen-edge`, `scrolled`, `parked`, `collapsed`, `stuck`, `open`, `desktop`), as the [contract's States table](../contract.md#states) lists them with where each sits.
|
|
14
|
+
- `GRID_STATES` — the flags the grid styles, each a `data-*` attribute present when true (`focused`, `selected`, `hovered`, `active`, `editing`, `in-range`, `range-edge`, `pending`, `invalid`, `dragging`, `empty`, `frozen`, `frozen-edge`, `scrolled`, `parked`, `collapsed`, `stuck`, `open`, `desktop`), as the [contract's States table](../contract.md#states) lists them with where each sits.
|
|
15
15
|
- `GridState` — one member of `GRID_STATES`.
|
|
16
16
|
- `VK_TOKENS` — the CSS variables the package owns and sets on the grid's frame: geometry and density (`--vk-scale`, `--vk-row-h`, the paddings, the text sizes, the 0-or-1 flags `--vk-scrolled`, `--vk-parked` and `--vk-frozen-on`). A skin reads them and an app overrides them on the frame ([Tokens](../contract.md#tokens)).
|
|
17
17
|
- `VkToken` — one member of `VK_TOKENS`.
|
|
@@ -43,7 +43,7 @@ Guide: [the provider](../guides/the-provider.md).
|
|
|
43
43
|
- `PANEL_SLOTS` — the `data-slot` names of the parts inside the default panels, by panel (`sort`, `filter`, `group`, `customize`, `viewsList`, `viewMenu`, `quick`): a sort rule, Add sort, a filter rule, one Customize section … (VK-988, [the panels' parts](../contract.md#the-atoms)). Each is in `ATOM_SLOTS` too.
|
|
44
44
|
- `PanelSlot` — one member of `PANEL_SLOTS`.
|
|
45
45
|
- `EDITOR_PART_SLOTS` — the `data-slot` names of the parts inside the default field editors, by editor (`shared`, `date`, `text`, `number`, `parts`, `values`, `links`, `picker`): the date editor's quick picks, the Picker's search and + Add, a values row, a link's field … (VK-989, [the field editors' parts](../contract.md#the-field-editors-parts-vk-989)). Each is in `EDITOR_SLOTS` too.
|
|
46
|
-
- `EDITOR_SLOTS` — the `data-slot` values the editor panel marks its parts with, prefixed like the grid's (`vk-editor-panel`, `vk-editor-bar`, `vk-editor-refusal`), the frames an editor's body stands in, and every field editor part's ([the editor panel](../contract.md#the-editor-panel)).
|
|
46
|
+
- `EDITOR_SLOTS` — the `data-slot` values the editor panel marks its parts with, prefixed like the grid's (`vk-editor-panel`, `vk-editor-bar`, `vk-editor-title`, `vk-editor-refusal`), the frames an editor's body stands in, and every field editor part's ([the editor panel](../contract.md#the-editor-panel)).
|
|
47
47
|
- `EditorSlot` — one member of `EDITOR_SLOTS`.
|
|
48
48
|
- `EDITOR_STATES` — the states the editor panel's popover carries: `vk-body`, the app's own body it holds (`picker`, `parts`, `values` or `links`).
|
|
49
49
|
- `EditorState` — one member of `EDITOR_STATES`.
|
package/views/docs/reshaping.md
CHANGED
|
@@ -15,21 +15,37 @@ Cheapest change first. Each step reaches further and costs more to keep current.
|
|
|
15
15
|
panel draws itself on a phone) they are yours too where the provider's `panelControls` says so (VK-1013,
|
|
16
16
|
VK-1014): your Button, Select, Menu, Popover and Input, each handed its part's name. So are the text, number
|
|
17
17
|
and date editors (VK-1021): your Button, Popover and one-line Input, and your Calendar as the date editor's
|
|
18
|
-
month where `panelControls` names `Calendar`.
|
|
19
|
-
|
|
18
|
+
month where `panelControls` names `Calendar`. So are the Picker, wherever a ViewKit body holds it (an
|
|
19
|
+
editor's list, the text and number editors' country and currency lists, the filter's value Pickers, the
|
|
20
|
+
sort's Add sort fields, the views list), the name and place parts, and the values and links editors
|
|
21
|
+
(VK-1022): your Button, Menu, Popover, Select and one-line Input, a box inside ViewKit's field named by
|
|
22
|
+
its label. So is every record's mark the panels draw, the Picker's rows, the links editor's, the bulk bar's choices and the quick filters' values (VK-1044): your `Avatar` atom where `panelControls` names `Avatar`, handed data only (its name, picture, kind and a size in pixels). So is every mentioned record ViewKit draws, a table's cell, a field row's value and a highlight (VK-1053): your `RelationChip` atom where `panelControls` names `RelationChip`, handed its data, its size and the host's link. So is the bulk bar (VK-1023): your Button for its verbs, Delete, More, the pill's ✕ and Actions (and for the hidden copies it measures them by), your Menu for More's and a group's rows, your Popover round a field's list on a computer; its count, its Toast, a phone's field sheet and Delete's question stay ViewKit's, the question's buttons yours. In those three editors these stay ViewKit's: a box that grows over lines (the text
|
|
20
23
|
editor's box on a computer, text and long text on a phone), a box group's frame (your Input stands bare
|
|
21
24
|
inside it), the Number field, a search list's box, the date's segments, its parts' boxes, its quarter
|
|
22
25
|
list (`vk-date-quarter`), its months and years choices and its day buttons where no `Calendar` of yours
|
|
23
|
-
is named, its wheels, the phone's time row, the
|
|
24
|
-
|
|
26
|
+
is named, its wheels, the phone's time row, the ✕ and ✓ an editor standing on its own draws in
|
|
27
|
+
ViewKit's Sheet, and a duration's box (your map's `Input`, as before, opted in or not). In the Picker
|
|
28
|
+
and the parts, values and links editors these stay ViewKit's: the Picker's search box and its rows, and
|
|
29
|
+
on a computer its actions, + Add and Create, which are rows of its list (on a phone they are your
|
|
30
|
+
buttons); the place's country and region on a phone, which open the place's own list; the range's
|
|
31
|
+
Number fields; a box that takes lines; a box group's frame; the values editor's grip and its phone's
|
|
32
|
+
minus mark; a button drawn as a link (the values editor's Open); and the links editor's Radio and Switch.
|
|
25
33
|
With your Calendar and a time, Enter on a day no longer keeps and closes the date editor on a computer:
|
|
26
|
-
your Calendar's day is a press. Across the panels,
|
|
27
|
-
|
|
34
|
+
your Calendar's day is a press. Across the panels, your Tooltip draws their tooltips where `panelControls` names it
|
|
35
|
+
(VK-1015), and your Input the filter's number and range boxes, ViewKit reading the number (VK-1018); the Picker's search box
|
|
36
|
+
and rows, ViewKit's menu rows, Radio, Toggle, the quick filters' values and the sort's grip stay ViewKit's, and so
|
|
28
37
|
does the head ViewKit's own Sheet draws: hand your own `Sheet` to change it. The sort's direction box keeps, out of sight, ViewKit's two
|
|
29
38
|
words drawn in its own classes, which size the box round your Select so the row never moves on a turn.
|
|
30
39
|
5. **A copy of the rendering.** When the copy mode ships, a view's default rendering is a registry
|
|
31
40
|
item you copy into your app and own from then on, updated by a three-way merge against the tag you
|
|
32
41
|
copied. Reach for it only when the structure itself must differ.
|
|
33
42
|
|
|
43
|
+
**What ViewKit draws by itself is yours when you hand it.** ViewKit says which actions exist and what they do; it never
|
|
44
|
+
decides how your buttons look. Anything it draws on screen of its own accord, the ⋯ a toolbar folds its parts into first,
|
|
45
|
+
takes yours where you hand one: `overflow` on the list's toolbar (`ReadyToolbar`, `ListToolbar`, `List`'s `toolbar`) and on
|
|
46
|
+
the kit's `ToolbarControl`, your glyph, your class or your whole button; on `ToolbarControl` "+N" and "+N filters" too
|
|
47
|
+
(`moreViews`, `moreFilters`), your class or your whole button. Hand nothing and it draws its own. The toolbar is the
|
|
48
|
+
bar above a list and nothing else: a row of a page's actions (a record's) is yours, on your Button.
|
|
49
|
+
|
|
34
50
|
An `if` in a skin that is not about layout is engine code in the wrong place: file it as a package
|
|
35
51
|
issue, do not fork the rendering around it.
|
|
@@ -22,7 +22,7 @@ conventions from one `ViewsProvider` above it. Mount it once, at the app's clien
|
|
|
22
22
|
through `CONTROLS.AppIcon`, the browser's clipboard and `localStorage`, `en-US` in `UTC`); hand each only to draw your
|
|
23
23
|
own, as below. The
|
|
24
24
|
rendering paints through its own colour names (`--vk-fg`, `--vk-ground`, …), which your stylesheet
|
|
25
|
-
declares once: `views/docs/install.md
|
|
25
|
+
declares once: `views/docs/install.md`, Your theme, holds the block for stock shadcn.
|
|
26
26
|
|
|
27
27
|
<!-- viewkit-example:provider -->
|
|
28
28
|
|
|
@@ -80,7 +80,7 @@ typed catalog can overflow TypeScript) and read each key without its `views.` pr
|
|
|
80
80
|
`(m) => { const key = m.key.slice("views.".length); return t.has(key) ? t(key, "values" in m ? m.values : undefined) : resolveViewsMessage(m); }`.
|
|
81
81
|
|
|
82
82
|
The atoms — `List`, `Row`, `RowContent`, `TickBox`, `StatusBadge`, `StatusMarker`, `Tag`, `CommandMenu`,
|
|
83
|
-
`RelationLink`, `RelationRoles`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu` — ship as defaults drawn from your theme. Swap any of them through `atoms` so the views wear
|
|
83
|
+
`RelationLink`, `RelationRoles`, `RelationChip`, `Loading`, `LoadMore`, `PlatformMark`, `RowMenu` — ship as defaults drawn from your theme. Swap any of them through `atoms` so the views wear
|
|
84
84
|
your own menus and pills. `CommandMenu`, `RowMenu` and `RelationLink` are your app's own pieces — the verb menu a
|
|
85
85
|
command cell opens, the row's right-click menu, and where a relation chip goes; their defaults are the map's menu,
|
|
86
86
|
the map's menu at the pointer (its Delete asks the `confirm` port: ViewKit's alert dialog when you hand none and spread `CONTROLS`, else the browser's own confirm), and a chip that goes nowhere. `Loading` and `LoadMore` are your waits — the list reloading, and how it asks for more rows; their
|