viewkitjs 0.39.0 → 0.40.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 +65 -0
- package/MIGRATION.md +25 -0
- package/fields/dist/derived.d.ts +7 -0
- package/fields/dist/derived.js +4 -0
- package/fields/dist/index.d.ts +1 -1
- package/fields/dist/index.js +1 -1
- package/fields/dist/messages.d.ts +5 -1
- package/fields/dist/messages.js +3 -0
- package/fields/dist/query/evaluate.d.ts +7 -1
- package/fields/dist/query/evaluate.js +8 -5
- package/fields/dist/query/filter.d.ts +7 -0
- package/fields/dist/query/filter.js +7 -1
- package/fields/dist/query/kit.d.ts +3 -2
- package/fields/dist/query/kit.js +1 -1
- package/fields/dist/query/layer.d.ts +6 -0
- package/fields/dist/query/layer.js +3 -0
- package/fields/dist/query/number.d.ts +3 -2
- package/fields/dist/query/number.js +5 -3
- package/fields/dist/query/read-rule.d.ts +1 -1
- package/fields/dist/query/read-rule.js +3 -0
- package/fields/docs/guides/queries.md +28 -24
- package/fields/docs/reference/fields.md +1 -0
- package/fields/docs/reference/query.md +6 -4
- package/package.json +2 -4
- package/postgres/dist/check.js +3 -1
- package/postgres/dist/definitions/storage.d.ts +3 -1
- package/postgres/dist/definitions/storage.js +3 -1
- package/postgres/dist/definitions/stored.js +13 -2
- package/postgres/dist/map.d.ts +5 -1
- package/postgres/dist/map.js +4 -0
- package/postgres/dist/records.js +6 -1
- package/postgres/docs/guides/definitions.md +1 -1
- package/postgres/docs/guides/field-map.md +2 -2
- package/postgres/docs/reference/postgres.md +1 -1
- package/views/dist/contract.d.ts +20 -2
- package/views/dist/contract.js +27 -0
- package/views/dist/controls/avatar.css +1 -1
- package/views/dist/controls/customize/map-customize-body.js +1 -1
- package/views/dist/controls/field/field.d.ts +2 -14
- package/views/dist/controls/field/field.js +4 -9
- package/views/dist/controls/filter-editor/filter-editor.d.ts +2 -0
- package/views/dist/controls/filter-editor/filter-editor.js +5 -2
- package/views/dist/controls/filter-editor/how.d.ts +8 -0
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +4 -2
- package/views/dist/controls/filter-editor/map-filter-body.js +17 -8
- package/views/dist/controls/filter-editor/map-rules.d.ts +4 -3
- package/views/dist/controls/filter-editor/map-rules.js +5 -2
- package/views/dist/controls/filter-editor/parts.d.ts +14 -1
- package/views/dist/controls/filter-editor/parts.js +14 -0
- package/views/dist/controls/filter-editor.css +4 -1
- package/views/dist/controls/index.d.ts +0 -3
- package/views/dist/controls/index.js +0 -3
- package/views/dist/controls/input.css +1 -1
- package/views/dist/controls/menu-list.css +1 -1
- package/views/dist/controls/picker/looks.d.ts +1 -1
- package/views/dist/controls/picker.css +2 -2
- package/views/dist/controls/press.css +0 -1
- package/views/dist/controls/radio/radio.d.ts +1 -1
- package/views/dist/controls/radio/radio.js +1 -16
- package/views/dist/controls/sheet/bottom-sheet.d.ts +2 -2
- package/views/dist/controls/sheet/bottom-sheet.js +31 -24
- package/views/dist/controls/text-editor.css +5 -3
- package/views/dist/controls/tokens.js +0 -6
- package/views/dist/controls/toolbar/toolbar.js +2 -2
- package/views/dist/field-row/editors/RowTextEditor.js +4 -1
- package/views/dist/filters/duration-bound.d.ts +7 -0
- package/views/dist/filters/duration-bound.js +9 -0
- package/views/dist/filters/filter-model.d.ts +4 -0
- package/views/dist/filters/number-refused.d.ts +8 -0
- package/views/dist/filters/number-refused.js +4 -0
- package/views/dist/grid/chrome/grid-table-props.d.ts +4 -1
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +12 -2
- package/views/dist/grid/core/clipboard-model.js +42 -8
- package/views/dist/grid/core/commit-model.d.ts +3 -0
- package/views/dist/grid/core/editing-controller.d.ts +29 -1
- package/views/dist/grid/core/editing-controller.js +142 -12
- package/views/dist/grid/core/pending-reconciliation.d.ts +14 -0
- package/views/dist/grid/core/pending-reconciliation.js +20 -8
- package/views/dist/grid/core/save-path.d.ts +4 -2
- package/views/dist/grid/core/save-path.js +1 -1
- package/views/dist/grid/core/spreadsheet-operations.js +43 -5
- package/views/dist/grid/core/useGridEditing.d.ts +5 -1
- package/views/dist/grid/core/useGridEditing.js +4 -4
- package/views/dist/grid/core/written-alongside.d.ts +16 -0
- package/views/dist/grid/core/written-alongside.js +30 -0
- package/views/dist/grid/grid.css +1 -1
- package/views/dist/grid/index.d.ts +1 -1
- package/views/dist/grid/looks.d.ts +2 -2
- package/views/dist/internal/before-paint.d.ts +5 -0
- package/views/dist/internal/before-paint.js +17 -0
- package/views/dist/internal/field-rows.d.ts +0 -8
- package/views/dist/internal/field-rows.js +1 -3
- package/views/dist/list/bar-keys.d.ts +3 -0
- package/views/dist/list/bar-keys.js +1 -0
- package/views/dist/list/buttons/clear-save.js +6 -2
- package/views/dist/list/buttons/new.d.ts +1 -1
- package/views/dist/list/buttons/new.js +14 -2
- package/views/dist/list/buttons/shared.d.ts +7 -1
- package/views/dist/list/buttons/shared.js +8 -2
- package/views/dist/list/buttons/views.js +6 -4
- package/views/dist/list/edits.d.ts +3 -1
- package/views/dist/list/layer.d.ts +13 -3
- package/views/dist/list/layer.js +13 -3
- package/views/dist/list/line.d.ts +5 -2
- package/views/dist/list/line.js +11 -3
- package/views/dist/list/list.d.ts +7 -1
- package/views/dist/list/list.js +2 -2
- package/views/dist/list/panels/filter-bar.d.ts +1 -1
- package/views/dist/list/panels/filter-bar.js +9 -3
- package/views/dist/list/panels/shared.d.ts +3 -2
- package/views/dist/list/panels/shared.js +5 -2
- package/views/dist/list/root-base.d.ts +2 -1
- package/views/dist/list/root-base.js +5 -3
- package/views/dist/list/root.d.ts +1 -1
- package/views/dist/list/store.d.ts +10 -0
- package/views/dist/list/store.js +8 -1
- package/views/dist/list/toolbar-model.d.ts +4 -0
- package/views/dist/list/toolbar-model.js +19 -1
- package/views/dist/list/toolbar.js +2 -1
- package/views/dist/list/views.d.ts +1 -1
- package/views/dist/list/views.js +4 -1
- package/views/dist/looks/index.d.ts +0 -1
- package/views/dist/looks/index.js +0 -1
- package/views/dist/looks/looks.d.ts +1 -1
- package/views/dist/looks/pieces.js +0 -2
- package/views/dist/model/column-filters.js +10 -3
- package/views/dist/model/view-rules.js +1 -0
- package/views/dist/panels/filter/NumberFilterBody.js +6 -8
- package/views/dist/panels/labels.js +7 -2
- package/views/dist/panels/model.d.ts +3 -0
- package/views/dist/panels/react/filter/filter-body.js +5 -1
- package/views/dist/panels/react/toolbar/ToolbarBarSorts.js +28 -1
- package/views/dist/panels/react/toolbar/ToolbarButton.d.ts +1 -1
- package/views/dist/panels/react/toolbar/ToolbarButton.js +5 -3
- package/views/dist/panels/react/toolbar/context.d.ts +4 -0
- package/views/dist/panels/react/toolbar/context.js +1 -0
- package/views/dist/panels/react/toolbar/use-give-way.js +2 -2
- package/views/dist/panels/settings/filter-groups.js +5 -0
- package/views/dist/panels/settings/input.d.ts +11 -0
- package/views/dist/panels/settings/layout.js +26 -0
- package/views/dist/panels/settings/person.d.ts +15 -0
- package/views/dist/panels/settings/person.js +6 -0
- package/views/dist/panels/toolbar/page-resets.js +14 -3
- package/views/dist/provider/components.d.ts +12 -3
- package/views/dist/styles.css +16 -260
- package/views/dist/styles.unlayered.css +16 -260
- package/views/docs/contract.md +9 -7
- package/views/docs/controls/field.md +1 -1
- package/views/docs/guides/looks.md +1 -1
- package/views/docs/guides/the-grid.md +4 -2
- package/views/docs/guides/toolbar-parts.md +337 -0
- package/views/docs/index.md +4 -0
- package/views/docs/reference/controls.md +3 -41
- package/views/docs/reference/grid.md +4 -3
- package/views/docs/reference/list.md +24 -13
- package/views/docs/reference/looks.md +12 -15
- package/views/docs/reference/panels.md +1 -1
- package/views/docs/reference/react.md +3 -3
- package/views/docs/reference/views.md +1 -1
- package/views/dist/controls/setting-row/looks.d.ts +0 -10
- package/views/dist/controls/setting-row/looks.js +0 -22
- package/views/dist/controls/setting-row/setting-row.d.ts +0 -102
- package/views/dist/controls/setting-row/setting-row.js +0 -135
- package/views/dist/controls/setting-row/tokens.d.ts +0 -156
- package/views/dist/controls/setting-row/tokens.js +0 -41
- package/views/dist/controls/setting-row.css +0 -216
- package/views/dist/controls/switch-row/switch-row.d.ts +0 -1
- package/views/dist/controls/switch-row/switch-row.js +0 -1
- package/views/dist/controls/switch-row/tokens.d.ts +0 -39
- package/views/dist/controls/switch-row/tokens.js +0 -12
- package/views/dist/controls/switch-row.css +0 -35
- package/views/dist/controls/tag-field/tag-field.d.ts +0 -24
- package/views/dist/controls/tag-field/tag-field.js +0 -25
- package/views/dist/controls/tag-field/tokens.d.ts +0 -23
- package/views/dist/controls/tag-field/tokens.js +0 -8
- package/views/dist/controls/tag-field.css +0 -32
- package/views/docs/controls/setting-row.md +0 -44
- package/views/docs/controls/switch-row.md +0 -15
- package/views/docs/controls/tag-field.md +0 -11
|
@@ -89,6 +89,7 @@ export function OrdersFromAnAction() {
|
|
|
89
89
|
- `views`: a `ViewsStore`, or `{ seed }` (your own views, read-only), `{ records }` (what the delete question calls the rows), `{ store }`.
|
|
90
90
|
- `defaults`: what a list with no saved view shows; by default the fields' columns over `LIST_SETTINGS_DEFAULTS`.
|
|
91
91
|
- `sortFilter` and `bar`: the toolbar's form on a computer, as `ListRoot` takes them.
|
|
92
|
+
- `personSettings`: what the person may set in their own Customize, as `ListRoot` takes it ([The person's own toolbar](#the-persons-own-toolbar)).
|
|
92
93
|
- `menus`: every menu as data ([Menus as data](#menus-as-data)): `column`, `row`, `group`, `addColumn` and `figure` reach the grid, `view`, `add`, `more`, `customize`, `sortEditor`, `filterEditor` and `groupEditor` the toolbar.
|
|
93
94
|
- `toolbarParts`: where each of the toolbar's parts stands ([Parts as data](#parts-as-data)).
|
|
94
95
|
- `customizeIn`: where Customize opens on a computer (VK-1026). `"popover"`, the default, at its button. `"pane"`: in your map's `Pane` (`CONTROLS.Pane`), at the list's right edge under the toolbar and as tall as the grid, over its edge, the grid scrolling and taking presses beside it; the grid then stands in a box of its own, `data-slot="vk-list-box"` (positioned, a flex column that fills the list: give the list its height as a flex column), the Pane's. On a phone Customize keeps its Sheet. An app on `ListRoot` hands its own box to `ListToolbar` as `paneBox`.
|
|
@@ -98,7 +99,7 @@ export function OrdersFromAnAction() {
|
|
|
98
99
|
- `toolbar`, `grid` and `bulk`: any other prop of `ListToolbar`, `ListGrid` and `ListBulkBar`. A prop handed at the top wins over the same one in these; one not handed leaves theirs. `menus` merges key by key. A `grid.children` of your own (your own bar) stands where `ListBulkBar` would, and wins.
|
|
99
100
|
- `className`: on the `div` around the parts (`data-slot="vk-list"`). With `customizeIn: "pane"` the grid stands in a `div` of its own inside it (`data-slot="vk-list-box"`).
|
|
100
101
|
- A field its key can't bind (a writable `datetime`, whose editor needs your time zone) throws, naming the field: hand its binding in `columns` (`bind`).
|
|
101
|
-
- For another arrangement, write `ListRoot` with the same data props and place the parts yourself.
|
|
102
|
+
- For another arrangement, write `ListRoot` with the same data props and place the parts yourself ([The toolbar's parts](../guides/toolbar-parts.md): every part, its settings, how these props map onto them, and six layouts).
|
|
102
103
|
- `ListProps` — what `List` takes.
|
|
103
104
|
- `ListColumnOverride` — one column's change by its field's key: `width`, `header`, `hidden` (the column starts hidden in the defaults), `editable: false` (an edit only ever taken away), and `bind`, the field's binding where its key doesn't say (a `bindFields` spec: `read`, and `write` handing back `{ body }` or `{ skip, reason }`).
|
|
104
105
|
- `ListColumnsOverride` — the columns changed, by field key.
|
|
@@ -124,8 +125,8 @@ export function DealsList({ children }: { children: ReactNode }) {
|
|
|
124
125
|
```
|
|
125
126
|
|
|
126
127
|
- `ListRoot` — holds one list's state in a store outside React, for every part inside it, wherever it stands. It has two modes, fixed by its first render:
|
|
127
|
-
- **Yours (memory mode):** it takes `id`, and the list's settings and layer as you hold them: `settings`, `layer`, `onChange` and `onLayerChange`, exactly as `useListSettingsState` returns them, or your own saved view's. Optionally `view` (the shared view this list shows, a `CollectionViewState`), `sortFilter` and `bar` (as `ReadyToolbar` takes them).
|
|
128
|
-
- **Kept by ViewKit:** handed no `settings`, it keeps the list's saved views, the person's draft and their layer itself, through a `ViewsStore`: below, "A list's saved views". It takes `id`, and optionally `views`, `defaults`, `link`, `sortFilter` and `
|
|
128
|
+
- **Yours (memory mode):** it takes `id`, and the list's settings and layer as you hold them: `settings`, `layer`, `onChange` and `onLayerChange`, exactly as `useListSettingsState` returns them, or your own saved view's. Optionally `view` (the shared view this list shows, a `CollectionViewState`), `sortFilter` and `bar` (as `ReadyToolbar` takes them), and `personSettings` ([The person's own toolbar](#the-persons-own-toolbar)).
|
|
129
|
+
- **Kept by ViewKit:** handed no `settings`, it keeps the list's saved views, the person's draft and their layer itself, through a `ViewsStore`: below, "A list's saved views". It takes `id`, and optionally `views`, `defaults`, `link`, `sortFilter`, `bar` and `personSettings`. `link={true}` carries the open view in the address, as `List`'s `link` does; a `readListLink` reading is opened and never written. Either way the open view is kept on the device (`ports.viewPrefs`), opened again where no link names one.
|
|
129
130
|
- **A list's data, in either mode** (`ListData`): `fields` (its columns, and in store mode its defaults), `rows` (worked out as the settings ask, into `answer`) or `source` and `pageSize` (answered a page at a time), `quickFilters` (their hold narrows the rows, in memory and from a source), `columns`, `save` and `can`, as `List` takes them. A grid under the root (`ListGrid`) saves through `save`, and hands the root its undo, redo and edits.
|
|
130
131
|
- A change a part makes goes to your `onChange` or `onLayerChange`; your next `settings` and `layer` are what every part reads. A change you refuse never shows.
|
|
131
132
|
- One panel is open per root, whichever frame opened it: every `Toolbar` inside it, every frame of your own under a `ToolbarRadioProvider` and every part standing in no frame share the root's radio. Outside a root, each frame keeps its own. Two roots never close each other's panels.
|
|
@@ -149,7 +150,7 @@ export function DealsList({ children }: { children: ReactNode }) {
|
|
|
149
150
|
- `ListState` — one list's state, as a part selects it:
|
|
150
151
|
- `id`: the root's.
|
|
151
152
|
- `view`: `settings` (the view as the person edits it), `layer` (their own layer over it) and `shared` (the shared view, or `null`; kept by ViewKit, the open view, the person's own included).
|
|
152
|
-
- `panels`: `open` (the one open panel's key, or `null`), `pages` (each panel's page by its key), `held` (the filter rule held until whole), `barShown` (the filter bar shows), `footHere` (Clear and Save stand in Customize's foot: on a phone, and in Mihai's look beside the bar's own), `sortFilter` and `bar`, `placed` (what stands under the root, by key, counted: `ListToolbar` and `ListFilterBar` place `bar` while they draw a filter bar on a computer, `ListFilterBar` its own `list-filter-bar` too, and each placed panel its button's key), `barOpen` (the filter bar asked open by `ListSortFilter`: what `ListFilterBar shows="button"` reads), `shown` (a placed panel asked to stand by its button, by its key; apart from `open`, so a popover opening elsewhere leaves it standing) and `standing` (each placed panel standing now, by its key: `alone`, or `shown`, only because its button showed it). `ListToolbar` says `barShown` and `footHere` as it draws.
|
|
153
|
+
- `panels`: `open` (the one open panel's key, or `null`), `pages` (each panel's page by its key), `held` (the filter rule held until whole), `barShown` (the filter bar shows), `footHere` (Clear and Save stand in Customize's foot: on a phone, and in Mihai's look beside the bar's own), `sortFilter` and `bar`, `personBar` and `personWords` (what `personSettings` turns on, as two flags), `placed` (what stands under the root, by key, counted: `ListToolbar` and `ListFilterBar` place `bar` while they draw a filter bar on a computer, `ListFilterBar` its own `list-filter-bar` too, and `list-filter-bar-button` or `list-filter-bar-always` as its own `shows` says, and each placed panel its button's key; on a phone each placed button `button:<name>` (`button:sort`, `button:filter`, `button:customize`, `button:quick`, `button:views`), the ready toolbar's too, so a placed panel of the same folds behind it), `barOpen` (the filter bar asked open by `ListSortFilter`: what `ListFilterBar shows="button"` reads), `shown` (a placed panel asked to stand by its button, by its key; apart from `open`, so a popover opening elsewhere leaves it standing) and `standing` (each placed panel standing now, by its key: `alone`, or `shown`, only because its button showed it). `ListToolbar` says `barShown` and `footHere` as it draws.
|
|
153
154
|
- `views`: the list's saved views where the root keeps them (a `ListViewsState`); `null` in memory mode.
|
|
154
155
|
- `columns`: the list's columns from its `fields`; `null` with none.
|
|
155
156
|
- `answer`: the rows the list shows (a `ListAnswerState`); `null` with no `fields`, or with neither `rows` nor a `source`.
|
|
@@ -199,10 +200,10 @@ export function DealsPage({ dealFields, deals, addDeal }: { dealFields: ListFiel
|
|
|
199
200
|
}
|
|
200
201
|
```
|
|
201
202
|
|
|
202
|
-
The ready toolbar's buttons, each a part of its own: written anywhere under a `ListRoot`, or through a `ListFill` outside its tree, it reads and changes the list with nothing wired, as `ListToolbar`'s own button does. A part has no side and no line: it stands where you write it. Place each one once per root. Sort, Filter and Customize need a root holding the list's `fields`; without them they draw nothing.
|
|
203
|
+
The ready toolbar's buttons, each a part of its own (all of the parts on one page, with six layouts: [The toolbar's parts](../guides/toolbar-parts.md)): written anywhere under a `ListRoot`, or through a `ListFill` outside its tree, it reads and changes the list with nothing wired, as `ListToolbar`'s own button does. A part has no side and no line: it stands where you write it. Place each one once per root. Sort, Filter and Customize need a root holding the list's `fields`; without them they draw nothing.
|
|
203
204
|
|
|
204
205
|
- Each panel a button opens is its own in the root's radio (one panel open per root), under a key of its own, apart from `ListToolbar`'s, so a button placed beside the ready toolbar never opens with its twin: `list-sort`, `list-filter`, `list-customize` and `list-quick`, for your `openPanel(key)`.
|
|
205
|
-
- What a placed button doesn't take from `ListToolbar`: `hosts`; the Pane's box comes from `ListPaneBox`. The editors' menus as data come from a `ListEditorMenus` around it ([Menus as data](#menus-as-data)), a view's menu and the views' "+N" from `ListViews`' `menu` and `moreViews`, Customize's rows from `ListCustomize`'s `menu`. On a phone each
|
|
206
|
+
- What a placed button doesn't take from `ListToolbar`: `hosts`; the Pane's box comes from `ListPaneBox`. The editors' menus as data come from a `ListEditorMenus` around it ([Menus as data](#menus-as-data)), a view's menu and the views' "+N" from `ListViews`' `menu` and `moreViews`, Customize's rows from `ListCustomize`'s `menu`. On a phone each keeps today's phone, wherever you place it (VK-1094): every button opens its panel in your map's Sheet, Sort the sort editor and Filter the filter editor as the ready toolbar's phone line does; `ListNew` is the round + at the list's foot (`data-at="foot"`, lifted by `--vk-toolbar-foot`), unless a `toolbarParts` place says `foot: false`; `ListClearSave` draws nothing, Clear and Save waiting in Customize's foot. A `ListLine` takes the phone's form there, so a phone layout of your own is written from the same parts. `ListToolbar` and `<List />` on a phone draw today's one line unchanged.
|
|
206
207
|
- `ListViews` — the root's saved views (or `views`, your own), Show counts the view's. `shows`: `tabs` (the default), each view a tab, or `button`, one button naming the open view and opening the rest (one axis; several still draw as tabs). `layouts`: what a new view takes one of. `menu`: a view's menu as data, as the ready toolbar's `menus.view`. `moreViews`: the views' "+N" as you draw it (`ToolbarMoreViews`), as the ready toolbar's `moreViews`. No "Edit view…" row, unlike the ready toolbar's.
|
|
207
208
|
- `ListViewsProps` — what `ListViews` takes: `views`, `layouts`, `shows`, `menu` and `moreViews`.
|
|
208
209
|
- `ListSearch` — the root's search. `shows`: `button` (the default), its glass opening a field, or `input`, standing as a field. `words` (its glass alone by default), `placeholder`, `searching`.
|
|
@@ -268,7 +269,7 @@ The ready toolbar's panels, each a part of its own: written anywhere under a `Li
|
|
|
268
269
|
- When a panel stands, its `shows` (`ListPanelShows`): `always`, standing open (every panel's default but the filter bar's); `filled`, once it holds something (the filter bar's default, the ready toolbar's "once added"; the filter bar, the filter panel and the sort panel take it); `button`, while its button shows it, with a ✕ that lets it go. A panel shown by its button stays as a popover opens elsewhere: one popover is open per root, but a standing panel is part of the page. Gone from the page, its button's ask to show it goes too.
|
|
269
270
|
- Its button, placed under the same root, shows that panel instead of opening a popover: a press shows it (a panel that doesn't stand), points to it (the focus moves into it and it scrolls into view, for a panel standing on its own), or hides it (a panel standing only because the button showed it); `aria-expanded` while it stands. `ListViews` does so only with `shows="button"`: its tabs open nothing. `ListToolbar`'s own buttons don't see placed panels yet.
|
|
270
271
|
- A panel that can't draw (a root with no `fields`, no quick filters, no saved views, no and/or groups) draws nothing and places nothing, so its button opens its popover as before.
|
|
271
|
-
- On a phone a placed panel
|
|
272
|
+
- On a phone a placed panel folds behind its button (VK-1094): while a button of the same stands under the root (a placed `ListSort`, `ListFilter`, `ListCustomize`, `ListQuickFilters` or `ListViews`, or `ListToolbar`'s own), the panel isn't placed and draws nothing, and the button opens it as a sheet (`ListViews shows="button"` its own list). With no such button under the root it keeps standing, so a phone layout of your own may stand one. A column you keep for it is yours to hide while it is empty (`:empty`). `ListFilterBar` draws nothing on a phone, as the bar's filters don't (Filter's sheet edits there).
|
|
272
273
|
- `ListViewsPanel` — the views as a standing list, as a sidebar's nav: your map's `ViewsListBody` (the one the view picker opens), a pick opening the view, New view, reordering and a view's verbs as the views hand them. `views` (your own, else the root's saved views), `layouts`, `shows` (`always` or `button`), `className`.
|
|
273
274
|
- `ListViewsPanelProps` — what `ListViewsPanel` takes.
|
|
274
275
|
- `ListFilterPanel` — the filter standing: every rule editable, Add filter under them, "No filtering set up yet" with nothing set. `shows` (`filled`: once a filter stands or a rule is held), `className`. Placed, `ListFilter` shows or points to it.
|
|
@@ -279,7 +280,7 @@ The ready toolbar's panels, each a part of its own: written anywhere under a `Li
|
|
|
279
280
|
- `ListQuickFiltersPanelProps` — what `ListQuickFiltersPanel` takes.
|
|
280
281
|
- `ListCustomizePanel` — Customize standing, its own head, its pages and foot as `ListCustomize`'s. `shows` (`always` or `button`), `className`, and `viewName`, `onRenameView`, `onCopyLink`, `onExport`, `exportCount` and `fieldEditor`, as `ListCustomize` takes them. Placed, `ListCustomize` shows or points to it.
|
|
281
282
|
- `ListCustomizePanelProps` — what `ListCustomizePanel` takes.
|
|
282
|
-
- `ListFilterBar` — the filter bar: the standing rules, each edited right where it stands, and its +, as the ready toolbar's bar draws them (the sort on the bar, a separator, the filters), in a wrapping line of its own (`role="region"` named "Sort and filter", `data-slot="vk-list-filter-bar"`). `shows`: `filled` (the default: a filter standing beyond the saved view's own, a rule held, or its sort drawn; a saved filter taken away, or a second axis of views, doesn't bring it: `ListClearSave` and `ListViews` are their own parts), `always` (its empty Filter with nothing set) or `button` (while `ListSortFilter` holds it open). `sorts`: `no` (the default, the sort pill while the sort differs) or `yes`, each sort rule standing on the bar as its field, its direction and ×, edited in place, and + (Add sort, with its word, while none stands): the field and + open the fields, on the menu's surface, and no sort editor opens; a list without several sorts keeps `no`'s one-rule sort. It places `bar` (a button's `opens="bar"` adds its rule here) and `list-filter-bar`: while it is placed, `ListToolbar` leaves the filters to it, so one bar edits per root. In the ready toolbar's default form its bar keeps only its stacked views and Clear and Save, and stands only for those; with `sortFilter="bar"` its line keeps its Sort and Filter alone. A rule held for the bar until whole (a yes/no, a related record's field, picked from a Filter with `opens="bar"` or the bar's +) stands on this bar, which with `shows="button"` opens for it while it is hidden; a Filter with its own panel holds the rule in its editor. Written in a `ListLine`, its pieces stand as the line's items (no region), its filters folding into "+N filters" as the line narrows; outside one they wrap and never fold, and `className` goes on the region. Nothing without the root's fields or and/or groups.
|
|
283
|
+
- `ListFilterBar` — the filter bar: the standing rules, each edited right where it stands, and its +, as the ready toolbar's bar draws them (the sort on the bar, a separator, the filters), in a wrapping line of its own (`role="region"` named "Sort and filter", `data-slot="vk-list-filter-bar"`). `shows`: `filled` (the default: a filter standing beyond the saved view's own, a rule held, or its sort drawn; a saved filter taken away, or a second axis of views, doesn't bring it: `ListClearSave` and `ListViews` are their own parts), `always` (its empty Filter with nothing set) or `button` (while `ListSortFilter` holds it open). Where `personSettings.bar` is on, the person's own pick stands over `filled` and `always` ([The person's own toolbar](#the-persons-own-toolbar)). `sorts`: `no` (the default, the sort pill while the sort differs) or `yes`, each sort rule standing on the bar as its field, its direction and ×, edited in place, and + (Add sort, with its word, while none stands): the field and + open the fields, on the menu's surface, and no sort editor opens; a list without several sorts keeps `no`'s one-rule sort. It places `bar` (a button's `opens="bar"` adds its rule here) and `list-filter-bar`: while it is placed, `ListToolbar` leaves the filters to it, so one bar edits per root. In the ready toolbar's default form its bar keeps only its stacked views and Clear and Save, and stands only for those; with `sortFilter="bar"` its line keeps its Sort and Filter alone. A rule held for the bar until whole (a yes/no, a related record's field, picked from a Filter with `opens="bar"` or the bar's +) stands on this bar, which with `shows="button"` opens for it while it is hidden; a Filter with its own panel holds the rule in its editor. Written in a `ListLine`, its pieces stand as the line's items (no region), its filters folding into "+N filters" as the line narrows; outside one they wrap and never fold, and `className` goes on the region. Nothing without the root's fields or and/or groups.
|
|
283
284
|
- `ListFilterBarProps` — what `ListFilterBar` takes: `shows`, `sorts` and `className`.
|
|
284
285
|
- `ListPanelShows` — when a placed panel stands: `always`, `filled` or `button`.
|
|
285
286
|
|
|
@@ -315,13 +316,23 @@ export function DealsWithLines({ dealFields, deals }: { dealFields: ListFieldsRe
|
|
|
315
316
|
|
|
316
317
|
A line of your own, written with the toolbar's parts under a `ListRoot` (or through a `ListFill`): it stands them in the order you write them and folds them as the ready toolbar's line folds as it narrows. No part has a start or an end of its own: its place is its position, and a gap does the pushing.
|
|
317
318
|
|
|
318
|
-
- `ListLine` — a toolbar line (`role="toolbar"`, `data-slot="vk-toolbar-line"`). `kind`: `row` (the default: a toolbar row, its buttons full size, named "List tools") or `bar` (a filter bar's line, a step smaller, named "Sort and filters"); `className`. What stands before its first `ListGap` is its start, what follows it its end: what opens from the end hangs toward it. A line with no gap is all start, and a second gap is room too, nothing more. As it narrows it folds from its end, in today's order: each part that has words turns to its icon, then the views' tabs fold into "+N" (the open one never), then the filter bar's filters into "+N filters", then each part that may fold goes into ⋯, which stands after the last folded part and lists them in the line's order, each row doing what the part's press does. Your own nodes and the panels written in a line stand as written and never fold. ⋯ stays one element as the parts change, open while the part it stood after goes. On a phone a line
|
|
319
|
+
- `ListLine` — a toolbar line (`role="toolbar"`, `data-slot="vk-toolbar-line"`). `kind`: `row` (the default: a toolbar row, its buttons full size, named "List tools") or `bar` (a filter bar's line, a step smaller, named "Sort and filters"); `className`. What stands before its first `ListGap` is its start, what follows it its end: what opens from the end hangs toward it. A line with no gap is all start, and a second gap is room too, nothing more. As it narrows it folds from its end, in today's order: each part that has words turns to its icon, then the views' tabs fold into "+N" (the open one never), then the filter bar's filters into "+N filters", then each part that may fold goes into ⋯, which stands after the last folded part and lists them in the line's order, each row doing what the part's press does. Your own nodes and the panels written in a line stand as written and never fold. While none of its parts draws anything (a bar's `ListFilterBar` with nothing standing and `ListClearSave` with nothing to clear), the line takes no room, as the ready toolbar draws no bar at rest, and it stands again as soon as one does; your own node or text in it keeps it standing. ⋯ stays one element as the parts change, open while the part it stood after goes. On a phone, off the provider's desktop query, a line takes the phone's form (VK-1094): no band, its parts opening sheets, a `ListNew` in it at the list's foot, its search opening across the line. The server draws its computer form, as it draws every placed part.
|
|
319
320
|
- `ListLineProps` — what `ListLine` takes: `kind`, `className`, `children`; `more`, ⋯'s rows as data (`ToolbarMore`: handed the folded parts' rows, each keyed by its part, and `{ line }`, `row` or `bar` as its `kind`, it hands back the rows ⋯ shows), as the ready toolbar's `menus.more`; `overflow`, ⋯ as you draw it (`ToolbarOverflow`), as the ready toolbar's `overflow`.
|
|
320
321
|
- `ListGap` — empty room: in a line it pushes what follows it to the line's end (the first one splitting the line's start from its end); anywhere else, the same room in a row of your own (a page header). As many as you like.
|
|
321
322
|
- `ListGapProps` — what `ListGap` takes: nothing.
|
|
322
323
|
- How each part folds in a line, keyed as the ready toolbar keys it (`data-toolbar-item`): `ListViews` (`views`, its tabs into "+N", one axis as tabs), `ListCustomize` (`options`), `ListSort` (`sort`), `ListFilter` (`filter-add`; `filter` on a phone or without and/or groups), `ListQuickFilters` (`quick`) and `ListSortFilter` (`sort-filter`) give up their words, then fold into ⋯; `ListNew` (`new`) gives up its words; `ListSearch` (`search`) is the line's search; `ListClearSave` (`save`) never folds; `ListFilterBar` stands its pieces (`sort-pill`, `sep`, `filters`).
|
|
323
324
|
- Every part placed under one root reads one model of the list, built once for each change of what it reads, whatever the number of parts.
|
|
324
325
|
|
|
326
|
+
## The person's own toolbar
|
|
327
|
+
|
|
328
|
+
Where you let them, a person picks two things about the toolbar in their own Customize, kept in their layer (`ListPersonalLayer.toolbar`) beside their widths, folds and look, never in the shared view (VK-1095). Where its parts sit stays yours.
|
|
329
|
+
|
|
330
|
+
- The switch, `personSettings` on `List` and `ListRoot`: `{ bar?: boolean; words?: boolean }`, each off by default. With neither, Customize and the toolbar are as they always were, whatever the person's layer holds.
|
|
331
|
+
- Its `bar`: Customize's Layout page offers **Filter bar** (`choice:bar`): Once added (`added`) or Always (`always`). The pick stands over the ready toolbar's `bar` and over a placed `ListFilterBar`'s `shows` where that is `filled` or `always`; a bar written `shows="button"` keeps its button, and while one is placed the row is left out. Before the person picks, the row reads a placed bar's own `shows`, else the toolbar's `bar`. A computer's alone: a phone draws no filter bar, so its Layout has no such row and its Reset leaves the pick.
|
|
332
|
+
- Its `words`: Layout offers **Button words** (`choice:words`): Icon and word (`both`), Icon (`icon`) or Word (`word`), on a computer and a phone. It stands over every toolbar button's own words under the root, as you placed them (`words` on a part, a `toolbarParts` place): with `both`, a button you placed as its icon draws its word too. A button with no word of its own (the search's, the quick filters') stays its icon. Before the person picks, it reads Icon and word.
|
|
333
|
+
- Both are written by `onLayerChange` alone and never change the view. Customize's first page's Reset (Clear, with no saved view) empties them with the rest of the layer, and Layout's own Reset takes back the ones the person can set there; a layer key the switch doesn't turn on counts for neither.
|
|
334
|
+
- An app that keeps the layer in its own storage keeps `toolbar` with it; a reader on an older ViewKit refuses a layer holding it (its schema is strict), so take this release everywhere a layer is read before turning either on.
|
|
335
|
+
|
|
325
336
|
## A list's saved views
|
|
326
337
|
|
|
327
338
|
```tsx
|
|
@@ -384,7 +395,7 @@ Your app's own store implements `ViewsStore` over its API, a server checking eac
|
|
|
384
395
|
|
|
385
396
|
Each of a list's menus below hands you its default items as data, and draws the items your function hands back: drop a row, rename it, move it, add your own, or draw a row's inside yourself.
|
|
386
397
|
|
|
387
|
-
- `ListEditorMenus` — the editors' menus as data for every part under it: `sortEditor`, `filterEditor` and `groupEditor`, as the ready toolbar's `menus` names them, reaching a placed Sort's, Filter's and Customize's editors
|
|
398
|
+
- `ListEditorMenus` — the editors' menus as data for every part under it: `sortEditor`, `filterEditor` and `groupEditor`, as the ready toolbar's `menus` names them, reaching a placed Sort's, Filter's and Customize's editors, the placed panels' and the filter bar's own sort rules (`sorts="yes"`: each pill's ×, VK-1107). Each it hands takes over that editor from an outer one; the rest stay the outer's. `ListToolbar` stands its own `menus` in one, over yours.
|
|
388
399
|
- `ListEditorMenusProps` — what `ListEditorMenus` takes: `sortEditor`, `filterEditor`, `groupEditor`, `children`.
|
|
389
400
|
|
|
390
401
|
```tsx
|
|
@@ -430,7 +441,7 @@ const filterEditor: ListMenus<Deal>["filterEditor"] = (items, ctx) =>
|
|
|
430
441
|
- `more(items, { line })`: ⋯, the folded parts' rows, each keyed by its part. Each line folds into its own ⋯, so it is handed which: `"row"` or `"bar"` (the filter bar). A press on any row closes ⋯ first.
|
|
431
442
|
- `customize(items, { page, form, layout })`: Customize's rows (VK-1062), each page's handed in turn: `page` is `"list"` (its sections, a list's per-field filters unless they fold behind Filter, where they aren't handed, and its toggles), `"layout"` (Layout's page: the layout's own settings, under the layout cards, which are your `layouts`) or `"columns"` (Columns' page: none of its own, as the columns are the view's, set by your columns' `hideable` and `fixed`; the rows you hand draw after the columns, before your field editor's rows). Its items are `ViewsCustomizeItem`s ([`/react`](./react.md)): a row keyed by one of Customize's own (below) is ViewKit's row, opening its page, its choices or its field as before, with your item's words, icon, value (`detail`), mark (`inForce`) and divider; its own `onSelect` and `checked` are set aside. A section's rows are always the item's `children`, so `menu.drop` and `menu.add` reach inside it; a section handed back with none draws nothing. Any other key is your row: `checked` with `onSelect` a check, `onSelect` an action (`destructive` drawn as danger), `children` a section of your own, and on the list `page` a page of your own, opened by its row, titled by its `label`, with Back (a function is handed Back, so the page can close itself); the page's place is told as `page:<key>` and held across a change of form. `disabled` draws a row that can't be used, saying `disabledReason`, else "Not available" (`views.panels.customize-unavailable`), and opens nothing. A page whose row you drop, disable or hand back as a section doesn't open, its layout button goes with Layout's row, and a screen whose row goes while it stands is the list again. `beside`, `keepOpen`, `href`, `render` and `shortcut` are set aside here. Layout's and Columns' rows are asked only while their page stands. An app's own `CustomizeBody` is handed the function as `items`; the older popover route (`ViewOptionsPopoverPanel`) hands none.
|
|
432
443
|
- `sortEditor(items, ctx)`, `filterEditor(items, ctx)`, `groupEditor(items, ctx)` (VK-1063): the editors' menus, wherever the toolbar draws them (its Sort and Filter panels, Customize's Sort, Filter and Group pages; the toolbar's Group has no panel of its own, so `groupEditor` reaches Customize's Group page). `ctx.menu` says which: the sort editor's `rule` (a rule's ⋯, on a phone and in the narrow form: a computer's rule has × and no ⋯) and `aside` (a set-aside rule's ⋯); the filter editor's `rule`, `aside` and `group` (a group's actions); the group editor's `settings` and `foot` (Remove grouping). The groups themselves (each group's row) are the list's values, not reshaped. `ctx` names a rule in your terms only, `field` across the three: the sort's key (on `aside`, the rule's stored `fieldKey`), or the filter's `fieldKey` with its `part` and `relation`, and a filter rule or group by its `path` in the filter (`[]` the whole filter, indices through `items` and a relation rule's `where.items`) (the `ViewsSortEditorItemsContext`, `ViewsFilterEditorItemsContext` and `ViewsGroupEditorItemsContext` of [`/react`](./react.md)). A row keyed by one of the menu's own (below) is ViewKit's row with your words and icon, its own `onSelect` set aside; `disabled` greys it, saying `disabledReason`. A default ViewKit doesn't offer this time (Put back while it doesn't fit) draws nothing. The filter's any/none/every is one item, `relation` (its label `views.panels.filter-relation-rows`, "Which related records"), its choices its `children` (`relation:any`, `relation:none`, `relation:every`; the choices' own `data-key` stays `any`, `none`, `every`): drop one, rename one, or hand back none to drop the choice. Any other key is your row: an action (`destructive` drawn as danger), a check (`checked` with `onSelect`) or a group of rows, drawn with the menu's own slot (`vk-sort-rule-action`, `vk-filter-rule-action`, `vk-filter-group-action`, the group editor's `vk-group-row`). No line stands first, last or twice in a row. `beside`, `keepOpen`, `href`, `render`, `shortcut` and `detail` are set aside here. An app with its own toolbar frame (`ToolbarSlotProvider`) can't hand these yet: draw a `SortBody` or `FilterBody` of your own that hands `CONTROLS`' its `items`.
|
|
433
|
-
- The sort and filter editors' rule ends and feet (VK-1065), through the same `sortEditor` and `filterEditor`: `ctx.menu` `row`, the buttons a rule ends in (the sort's × on a computer, its ⋯ on a phone, in the narrow form and on a set-aside rule; the filter's ⋮, or ⋯ on a phone), and `foot`, the buttons at a foot (Add sort and Clear; Add filter, Clear, a group's or a relation's Delete, and the ⋮ of a group or of a filter that may exclude). `ctx` names a sort rule by its `field` and `index` (`aside: true`, and no `index`, on a set-aside rule), a filter rule as `rule` does (with `aside: true` on a set-aside one), and a filter's foot by its group's `path` (`[]` the filter's own); the sort's foot is `{ menu: "foot" }`. A row keyed by one of the place's own (below) is ViewKit's button with your words (a text button's text, an icon button's name), your icon (on ×, Add sort and Add filter; ⋯, ⋮ and the words buttons keep their own) and your greying (`disabled`, saying `disabledReason`, else its own reason, else its words); its own `onSelect` is set aside, and one ViewKit greys this time (Add sort at the most, Add filter on a relation the list no longer lists) is handed to you already `disabled` with its reason. A default ViewKit doesn't offer this time (Clear with nothing to clear, Add sort where what holds the editor has its own +) draws nothing. Any other key is your button, quiet, at the place's size: with an `icon`, an icon button named by its `label`; without, its words; `disabled` greys it, saying why; drawn as `data-slot` `vk-sort-row-action`, `vk-sort-foot-action`, `vk-filter-row-action` or `vk-filter-foot-action`, with `data-key` its key. Only plain actions: `children`, `checked`, `beside`, `keepOpen`, `href`, `render`, `shortcut`, `detail`, `destructive` and `separatorBefore` are set aside here. A rule's boxes, its grip, Where and the joins are not data: rename them through the messages. The sort's × and its ⋯'s Delete share the key `delete`, so `menu.drop(items, "delete")` over every `ctx` makes a rule unremovable in the editor in every form; a function that drops `delete` (or `more`, `add`, `clear`) without checking `ctx.menu` reaches these buttons too, and one that adds or renames rows without checking it now adds a button at every rule's end and foot, or renames each rule's ×: check `ctx.menu`. The sort editor's foot on a computer, handed back nothing, isn't drawn; the filter editor's feet stand, empty. The filter bar's sort pills
|
|
444
|
+
- The sort and filter editors' rule ends and feet (VK-1065), through the same `sortEditor` and `filterEditor`: `ctx.menu` `row`, the buttons a rule ends in (the sort's × on a computer, its ⋯ on a phone, in the narrow form and on a set-aside rule; the filter's ⋮, or ⋯ on a phone), and `foot`, the buttons at a foot (Add sort and Clear; Add filter, Clear, a group's or a relation's Delete, and the ⋮ of a group or of a filter that may exclude). `ctx` names a sort rule by its `field` and `index` (`aside: true`, and no `index`, on a set-aside rule), a filter rule as `rule` does (with `aside: true` on a set-aside one), and a filter's foot by its group's `path` (`[]` the filter's own); the sort's foot is `{ menu: "foot" }`. A row keyed by one of the place's own (below) is ViewKit's button with your words (a text button's text, an icon button's name), your icon (on ×, Add sort and Add filter; ⋯, ⋮ and the words buttons keep their own) and your greying (`disabled`, saying `disabledReason`, else its own reason, else its words); its own `onSelect` is set aside, and one ViewKit greys this time (Add sort at the most, Add filter on a relation the list no longer lists) is handed to you already `disabled` with its reason. A default ViewKit doesn't offer this time (Clear with nothing to clear, Add sort where what holds the editor has its own +) draws nothing. Any other key is your button, quiet, at the place's size: with an `icon`, an icon button named by its `label`; without, its words; `disabled` greys it, saying why; drawn as `data-slot` `vk-sort-row-action`, `vk-sort-foot-action`, `vk-filter-row-action` or `vk-filter-foot-action`, with `data-key` its key. Only plain actions: `children`, `checked`, `beside`, `keepOpen`, `href`, `render`, `shortcut`, `detail`, `destructive` and `separatorBefore` are set aside here. A rule's boxes, its grip, Where and the joins are not data: rename them through the messages. The sort's × and its ⋯'s Delete share the key `delete`, so `menu.drop(items, "delete")` over every `ctx` makes a rule unremovable in the editor in every form; a function that drops `delete` (or `more`, `add`, `clear`) without checking `ctx.menu` reaches these buttons too, and one that adds or renames rows without checking it now adds a button at every rule's end and foot, or renames each rule's ×: check `ctx.menu`. The sort editor's foot on a computer, handed back nothing, isn't drawn; the filter editor's feet stand, empty. The filter bar's sort pills (`ListFilterBar sorts="yes"`, VK-1107) are reached as the editor's rows: each pill's × is handed as `delete` with `{ menu: "row", field, index, form: "computer", place: "bar" }`, so dropping `delete` takes the × off the pill too; your own item draws as one more part of the pill (its icon alone, named by its label, else its words), the pill's last part its end; the field and the direction stay the pill's.
|
|
434
445
|
- `List` takes `menus` whole and hands each part its own: `GridTable` (and `ListGrid`) takes `column`, `row`, `group` and `addColumn` as `menus` ([`/grid`](./grid.md)), and `ReadyToolbar` and `ListToolbar` take `view`, `add`, `more`, `customize`, `sortEditor`, `filterEditor` and `groupEditor` as `menus` ([`/panels/react`](./panels-react.md)).
|
|
435
446
|
- A menu ViewKit doesn't open stays closed: ⋯ stands only while a part has folded, whatever `more` adds, and New stays a button while `add` hands back its one `new` row. A menu ViewKit opens stays openable: a function that returns `[]` opens an empty menu, so drop what you don't want rather than everything.
|
|
436
447
|
- Each function is called as ViewKit draws (`view` on every toolbar render, the rest as their menus draw): keep it pure and cheap, and call no hooks in it. `row` alone may answer later, with a promise, asked once per opening.
|
|
@@ -455,7 +466,7 @@ Every default row's key is a public name: your function finds rows by it, and ev
|
|
|
455
466
|
- A row's menu: `copy`, `cut`, `paste`, `clear`; `row-select`; `action:<id>` for each of a name column's actions. Your `contextMenu` rows keep their keys, or are keyed by their words. With `row`, also `row-open` (first) and `row-delete` (last), and `row-waiting`, the greyed row drawn while a promise from `row` waits (never handed to `row`).
|
|
456
467
|
- A view's menu, from the axis's verbs: `rename`, `edit`, `private`, `save`, `reset`, `save-new`, `copy-link`, `favorite`, `duplicate`, `delete`; on a phone `save`, `reset` and `save-new` are under `unsaved`, and `private` and `edit` under `this-view`. A view's own rows keep their keys, `edit-view` (Edit view…) at the head of the open view's.
|
|
457
468
|
- New: your `addItems`' keys, or `new`.
|
|
458
|
-
- Customize (`customize`): on its list `layout`, `columns`, `filter`, `sort`, `group`; a per-field filter `field:<key>` and a section of them `fields:<section>` (not handed while they fold behind Filter); a toggle `toggle:<key>` (`toggle:show_counts`; Show counts from the view, with no toggles handed, `toggle:counts`) and a section of toggles `toggles:<section>`. On Layout's page a pick-one setting `choice:<key
|
|
469
|
+
- Customize (`customize`): on its list `layout`, `columns`, `filter`, `sort`, `group`; a per-field filter `field:<key>` and a section of them `fields:<section>` (not handed while they fold behind Filter); a toggle `toggle:<key>` (`toggle:show_counts`; Show counts from the view, with no toggles handed, `toggle:counts`) and a section of toggles `toggles:<section>`. On Layout's page a pick-one setting `choice:<key>` (the person's own toolbar rows `choice:bar` and `choice:words`, where `personSettings` turns them on), a toggle `toggle:<key>` and a section `toggles:<section>` (with no settings handed, a table's `toggle:freeze` and `toggle:wrap`, from the kit's own `Customize` alone). Columns' page has none. A section's key is its heading's words, so a translated heading is another key, and one heading names one section (a heading among the filter fields and again after Group shares one key: handed any function, the second goes). A `fields:` or `toggles:` key handed back with no rows draws nothing. Your rows draw as `data-slot="vk-customize-row"`, a page of yours as `vk-customize-page`, each with `data-key` its key; ViewKit's rows keep their own names (`vk-customize-section`, `-field`, `-toggle`, `-choice`).
|
|
459
470
|
- The sort editor (`sortEditor`): a rule's ⋯ `delete`; a set-aside rule's `why`, `put-back`, `delete`; a rule's end (`row`) `delete` (×, a computer's) and `more` (⋯); its foot (`foot`) `add`, `clear`.
|
|
460
471
|
- The filter editor (`filterEditor`): a rule's ⋮ `convert`, `relation` (with `relation:any`, `relation:none`, `relation:every`), `delete`; a set-aside rule's `why`, `put-back`, `delete`; a group's `exclude`; a rule's end (`row`) `more` (⋮); a foot (`foot`) `add`, `clear`, `delete` (Delete group, or a relation's Delete condition), `more` (a group's ⋮, or the ⋮ of a filter that may exclude).
|
|
461
472
|
- The group editor (`groupEditor`): its settings `field`, `order`, `direction`, `step`, `empty`; its foot `remove`.
|
|
@@ -502,7 +513,7 @@ export function DealsToolbar(props: ReadyToolbarProps<Deal>) {
|
|
|
502
513
|
- `key`: the part's public name: `views` (and `views-stacked`, a second axis of views on the bar), `options` (Customize), `search`, `sort` (on the row, or the bar's sort in the old form), `sort-pill` (the bar's sort in Mihai's look with `bar: "always"`), `filter` and `filter-add` (Filter), `filters` (the filters on the bar), `advanced-filters`, `sep` (the bar's separator), `quick`, `new`, `clear` and `save` (the bar's Clear and Save, handed side by side: back side by side, `clear` first, on one line and side, they draw as one item, as they always stood; parted, reordered or with one left out, each draws on its own where you place it).
|
|
503
514
|
- `line`: `"row"`, `"bar"` (the filter bar; in the `row` arrangement, the line below the row) or `"foot"` (a kit phone list's foot, New's place; anywhere else it means the row). On a kit phone the row and the bar are one line, so `"bar"` stands a part on it too, and New stands on the line once you place it anywhere but `"foot"`.
|
|
504
515
|
- `side`: `"start"` or `"end"`.
|
|
505
|
-
- `words`: `"both"`, as the look's words say (icon and word where the buttons on the right show theirs), `"icon"`, its icon alone whatever the look, or `"word"`, its word alone, no icon, whatever the look. It means something for a part whose button has an icon and a word: `search`, `quick`, `sort`, `filter`, `filter-add`, `options`, `new`. The search and, in Mihai's look, the quick filters' button are handed `"icon"`, as they always stood; placed `"both"`, they read their word and give it up first as the line narrows, as Sort and Filter do. Placed `"word"`, every button of the part that has a word draws it with no icon (your `ToolbarButton` handed `icon: null` and the word as its `children`), and never gives it up as the line narrows: the part folds into ⋯ instead. A button whose glyph is its word (Sort's +, the bar's +) and New's round + at a phone list's foot keep their glyph; a button with no icon (Clear, Save) keeps its words.
|
|
516
|
+
- `words`: `"both"`, as the look's words say (icon and word where the buttons on the right show theirs), `"icon"`, its icon alone whatever the look, or `"word"`, its word alone, no icon, whatever the look. It means something for a part whose button has an icon and a word: `search`, `quick`, `sort`, `filter`, `filter-add`, `options`, `new`. The search and, in Mihai's look, the quick filters' button are handed `"icon"`, as they always stood; placed `"both"`, they read their word and give it up first as the line narrows, as Sort and Filter do. Placed `"word"`, every button of the part that has a word draws it with no icon (your `ToolbarButton` handed `icon: null` and the word as its `children`), and never gives it up as the line narrows: the part folds into ⋯ instead. A button whose glyph is its word (Sort's +, the bar's +) and New's round + at a phone list's foot keep their glyph; a button with no icon (Clear, Save) keeps its words. Where `personSettings.words` is on, the person's own pick stands over each place's `words` ([The person's own toolbar](#the-persons-own-toolbar)).
|
|
506
517
|
- `node`: a part of your own, under a key of your own, drawn where you place it (it doesn't fold into ⋯). `menu.add` places it. The keys above are the toolbar's, even while a part of theirs isn't handed: don't name your own part by one.
|
|
507
518
|
- `className`: put on every toolbar button the part draws (each handed its `part`, [Default keys](#default-keys)'s table), on the button itself, through your `ToolbarButton` (ViewKit's own puts it on its `<button>`, `CONTROL_ATOMS`' on the toolbar button or New's `Button`).
|
|
508
519
|
- `panel`: where what it opens hangs at its button, `{ side?, align?, offset? }` (`ToolbarPanelPlace`), your `Popover`'s `side`, `align` and `sideOffset`: `{ align: "start" }` opens Sort's panel from its button's start wherever Sort stands. Absent, a part on its line's end side opens its panel aligned to its button's end and one on its start side to its start, 8 px below it; a host of yours (`hosts`) or a phone's sheet takes none of it.
|
|
@@ -4,7 +4,7 @@ Import from `viewkitjs/views/looks` to pick a piece's look by name: each piece's
|
|
|
4
4
|
|
|
5
5
|
## The shape
|
|
6
6
|
|
|
7
|
-
- `PieceLooks` — a piece's options and looks: `id` (the piece's, the middle of its attributes' names), `name`, `options` (`LookOption`s, in the order a picker shows them) and `looks` (`Look`s, each picking every option, or only those its second type names, `PieceLooks<Id, Picked>`, the rest an app's own say). Nothing picked wears each option's `def`,
|
|
7
|
+
- `PieceLooks` — a piece's options and looks: `id` (the piece's, the middle of its attributes' names), `name`, `options` (`LookOption`s, in the order a picker shows them) and `looks` (`Look`s, each picking every option, or only those its second type names, `PieceLooks<Id, Picked>`, the rest an app's own say). Nothing picked wears each option's `def`, ViewKit's own, which no look need match whole.
|
|
8
8
|
- `LookOption` — one option: `id`, `name`, `def` (the value worn when nothing is picked, or when the pick is a value it doesn't have), `values` (`LookValue`s), and optionally `device` (a `LookDevice`), `kind` (`"steps"` for an ordered scale, `"list"` for a long list), `unless` (an option and a value, or several, under which this one means nothing) and `demo: false` (it changes nothing a whole list draws, so a list-wide picker may leave it out).
|
|
9
9
|
- `LookValue` — one value an option can hold: `id` and `name`.
|
|
10
10
|
- `Look` — a named set of picks: `id`, `name`, `picks` (one value for every option) and optionally `device`.
|
|
@@ -91,9 +91,6 @@ on a frame round the controls as `data-<piece>-*`, which each control's styleshe
|
|
|
91
91
|
- `StatusLookOptionId` — the Status's option ids.
|
|
92
92
|
- `SWITCH_LOOKS` — the Switch's: 4 options (`shape` a computer's, `phone` a phone's, `mark`, `motion`) and five looks, `slim`, `capsule`, `thin`, `hairline` and `classic`.
|
|
93
93
|
- `SwitchLookOptionId` — the Switch's option ids.
|
|
94
|
-
- `SETTING_ROW_LOOKS` — the setting row's: 3 options, two a computer's (`card`, `outlined` or `raised` (the default); `rows`, `snug` or `roomy` (the default), 64 tall) and one a phone's (`icon`, `line` (the default), the glyph alone, or `tile`, a white glyph on a tile of the row's `colour`), and two looks, `outright` (`outlined`, `snug`, `line`: the SwitchRows as they were) and `attio` (`raised`, `roomy`, `line`: every option's default).
|
|
95
|
-
- `SettingRowOptionId` — its option ids.
|
|
96
|
-
- `SettingRowPicks` — one value for each.
|
|
97
94
|
- `MENU_LIST_LOOKS` — the menu list's, each a phone's: 6 options (`rows`, what its rows stand on; `lines`; `height`, a scale from `48` to `56`; `corners`, a scale from `lg` to `2xl`; `close`, a Close row; `tiles`) and five looks, `stack`, `card`, `plain`, `joined` and `words`, which pick the first four and leave the Close row and the tiles to the app.
|
|
98
95
|
- `MenuListLookOptionId` — the menu list's option ids.
|
|
99
96
|
|
|
@@ -101,29 +98,29 @@ on a frame round the controls as `data-<piece>-*`, which each control's styleshe
|
|
|
101
98
|
|
|
102
99
|
- `LIST_LOOKS` — the list's, every list that floats (the Select's, the Menu's panel, the Picker on a computer): 9 options (`smoothing`; `edge`; `shadow`, a scale from `none` to `xl`; `padding`, from `0` to `8`; `rows`, a computer's row height from `28` to `40`; `highlight`; `intensity`, from `1` to `3`; `row-corners`, from `input` to `full`; `dividers`) and no looks.
|
|
103
100
|
- `ListOptionId` — the list's option ids.
|
|
104
|
-
- `PICKER_LOOKS` — the Picker's: 9 options (`search`; `picked`, `create`, `doing`, `heading` and `face` a computer's; `mark`; `line`; `kind`) and two looks, `attio` (Attio's picks) and `mihai` (named Outright); with nothing picked, a second line below, the list's message at the start and a face of 24 (
|
|
101
|
+
- `PICKER_LOOKS` — the Picker's: 9 options (`search`; `picked`, `create`, `doing`, `heading` and `face` a computer's; `mark`; `line`; `kind`) and two looks, `attio` (Attio's picks) and `mihai` (named Outright); with nothing picked, a second line below, the list's message at the start and a face of 24 (ViewKit's own).
|
|
105
102
|
- `PickerOptionId` — the Picker's option ids.
|
|
106
103
|
- `AVATAR_LOOKS` — the Avatar's: 5 options and no looks. For its squares, `corners` (a scale from `small` to `xlarge`) and `smoothing`; for a record's mark, a person's or a thing's handed its object's `icon` with no picture, `mark` (`icon` or `initials`), `ground` (`quiet`, `grey`, `outline` or `colour`, the object's colour) and `icon-colour` (`grey` or `colour`). An Avatar handed no icon draws its letters as before.
|
|
107
104
|
- `AvatarLookOptionId` — the Avatar's option ids.
|
|
108
|
-
- `MENU_LIST_CARD_FRAME` — the menu list's options as a frame's data attributes, the Stack look's (Card rows, inset lines, 52, xl): a piece whose menu lists are no menu's own sheet (a panel's settings, a list of people) puts it round them, and keeps them whatever the app picks, since with nothing picked a menu's own sheet draws
|
|
105
|
+
- `MENU_LIST_CARD_FRAME` — the menu list's options as a frame's data attributes, the Stack look's (Card rows, inset lines, 52, xl): a piece whose menu lists are no menu's own sheet (a panel's settings, a list of people) puts it round them, and keeps them whatever the app picks, since with nothing picked a menu's own sheet draws the Words and the nearest frame wins.
|
|
109
106
|
|
|
110
107
|
<!-- The panels' block: the Pane, the toolbar button, the Radio, the sort editor, the views list, the filter editor, the group editor, Customize, the Modal, the alert dialog, the Toast, the Collapsible, the Alert, the Notice -->
|
|
111
108
|
|
|
112
|
-
- `PANE_LOOKS` — the Pane's: 7 options, each a computer's (`place`, `list` or `fit`; `corners`, `lg`, `xl` or `2xl`; `smoothing`, `round` or `smooth`; `shadow`, `none`, `menu`, `lg` or `xl`; `edge`, `outline`, `subtle` or `none`; `gap`, `0` to `16`, `8` the default
|
|
109
|
+
- `PANE_LOOKS` — the Pane's: 7 options, each a computer's (`place`, `list` or `fit`; `corners`, `lg`, `xl` or `2xl`; `smoothing`, `round` or `smooth`; `shadow`, `none`, `menu`, `lg` or `xl`; `edge`, `outline`, `subtle` or `none`; `gap`, `0` to `16`, `8` the default; `padding`, `0` to `16`), and no looks.
|
|
113
110
|
- `PaneOptionId` — its option ids.
|
|
114
|
-
- `TOOLBAR_BUTTON_LOOKS` — the toolbar button's: 10 options, a computer's `ground` (`ghost`, `bordered` the default, `filled`), `words` (`both` the default, `icon`, `word`), `size` (`28`, `32` the default, `36`) and `corners` (`button` the default, the Button's, then `xs` to `full`); a phone's `groundphone` (`filled` the default), `wordsphone` (`icon` the default, `both`), `sizephone` (`36` the default, `44`) and `cornersphone` (`full` the default); and on both `smoothing` (`app` the default, `smooth`, `round`) and `weight` (`button` the default, `medium`, `semibold`). Every default is
|
|
111
|
+
- `TOOLBAR_BUTTON_LOOKS` — the toolbar button's: 10 options, a computer's `ground` (`ghost`, `bordered` the default, `filled`), `words` (`both` the default, `icon`, `word`), `size` (`28`, `32` the default, `36`) and `corners` (`button` the default, the Button's, then `xs` to `full`); a phone's `groundphone` (`filled` the default), `wordsphone` (`icon` the default, `both`), `sizephone` (`36` the default, `44`) and `cornersphone` (`full` the default); and on both `smoothing` (`app` the default, `smooth`, `round`) and `weight` (`button` the default, `medium`, `semibold`). Every default is ViewKit's own. 2 looks: `attio`, every default, and `portal`, ghost with its icon alone.
|
|
115
112
|
- `ToolbarButtonOptionId` — its option ids.
|
|
116
|
-
- `VIEWS_LIST_LOOKS` — the views list's: 2 options (`private`, Private views: Shared and Just me, a private view's lock, and a view's menu's Private view; `favorites`, a view's menu's Favorite), each `off` (the default
|
|
113
|
+
- `VIEWS_LIST_LOOKS` — the views list's: 2 options (`private`, Private views: Shared and Just me, a private view's lock, and a view's menu's Private view; `favorites`, a view's menu's Favorite), each `off` (the default) or `on`, and no looks.
|
|
117
114
|
- `ViewsListOptionId` — its option ids.
|
|
118
|
-
- `CUSTOMIZE_LOOKS` — Customize's: 2 options (`head`, Its head: `title`, a title (the default
|
|
115
|
+
- `CUSTOMIZE_LOOKS` — Customize's: 2 options (`head`, Its head: `title`, a title (the default), or `name`, the view's name renamed in place; `columns`, Columns: `switch`, Switches (the default), or `eye`, Eyes), for a computer and a phone alike, and no looks.
|
|
119
116
|
- `CustomizeOptionId` — its option ids.
|
|
120
117
|
- `MODAL_LOOKS` — the Modal's: 12 options, each a computer's (`edge`, `lines`, `buttons`, `head`, `size`, `corners`, `smoothing`, `padding`, `behind`, `strength`, `blur`, `shadow`), and two looks, `framed` (every option's default) and `outlined`.
|
|
121
118
|
- `ModalOptionId` — its option ids.
|
|
122
|
-
- `ALERT_DIALOG_LOOKS` — the alert dialog's: 11 options (`close`, the X, a phone's; `padding`; `behind`, `dim` or `veil`; `strength`; `blur`, a computer's, and `blurphone`; `shadow`, a computer's, and `shadowphone`; `margin`, a phone's; `corners`; `smoothing`, `round` or `smooth` (the default
|
|
119
|
+
- `ALERT_DIALOG_LOOKS` — the alert dialog's: 11 options (`close`, the X, a phone's; `padding`; `behind`, `dim` or `veil`; `strength`; `blur`, a computer's, and `blurphone`; `shadow`, a computer's, and `shadowphone`; `margin`, a phone's; `corners`; `smoothing`, `round` or `smooth` (the default)), and no looks.
|
|
123
120
|
- `AlertDialogOptionId` — its option ids.
|
|
124
|
-
- `COLLAPSIBLE_LOOKS` — the Collapsible's: 2 options (`content`, `still`, `fade` (the default
|
|
121
|
+
- `COLLAPSIBLE_LOOKS` — the Collapsible's: 2 options (`content`, `still`, `fade` (the default) or `slide`: how what it holds comes and goes; `curve`, `soft` or `sharp`), and no looks.
|
|
125
122
|
- `CollapsibleOptionId` — its option ids.
|
|
126
|
-
- `ALERT_LOOKS` — the Alert's: 5 options (`buttons`, `end` (the default
|
|
123
|
+
- `ALERT_LOOKS` — the Alert's: 5 options (`buttons`, `end` (the default) or `full`, a computer's; `size`, `32`, `36` or `44`, a computer's; `pair`, `side` or `stacked`, a phone's; `mark`, `none` or `shown`; `phone`, `panel` or `sheet`, what it opens as on a phone) and three looks, `even`, `plain` and `marked`.
|
|
127
124
|
- `AlertOptionId` — its option ids.
|
|
128
125
|
|
|
129
126
|
<!-- The toolbar's block: the quick filters (VK-724), the Toolbar (VK-858), the bulk bar (VK-725) -->
|
|
@@ -133,7 +130,7 @@ on a frame round the controls as `data-<piece>-*`, which each control's styleshe
|
|
|
133
130
|
- `TOOLBAR_LOOKS` — the Toolbar's: 14 options, a computer's ten (`search`, `button` or `input`; `words`, `icon` or `both`; `sortfilter`, `bar` or `right`; `settings`, `beside` or `right`; `bar`, `always` or `added`; `lines`, `across` or `none`; `save`, `bar` or `settings`; `add`, `primary`, `primary-icon`, `outline`, `outline-icon`, `like` or `like-icon`; `views`, `button` or `tabs`; `tabs`, `ghost`, `bordered` or `filled`), two for both (`sortfilterat`, `bar`, `pane` or `both`; `quick`, `none` or `button`) and a phone's two (`searchphone`, `button` or `line`; `sortfilterphone`, `beside` or `right`); and four looks, `mihai`, named Outright (every option's default: one row at rest, the sort and Filter on its right with their words, the filter bar once a filter is added, the quick filters' button), `attio`, `attio-right` and `portal`.
|
|
134
131
|
- `ToolbarOptionId` — its option ids.
|
|
135
132
|
- `ToolbarPicks` — one value for every option.
|
|
136
|
-
- `BULK_BAR_LOOKS` — the bulk bar's: 3 options (`delete`, `more` (the default
|
|
133
|
+
- `BULK_BAR_LOOKS` — the bulk bar's: 3 options (`delete`, `more` (the default) or `own`; `phone`, `tray` (the default) or `pill`, a phone's; `picked`, `plain` (the default) or `ground`, a phone's, which the list holding it reads for its picked rows) and one look, `attio` (every option's default).
|
|
137
134
|
- `BulkBarOptionId` — its option ids.
|
|
138
135
|
- `BulkBarPicks` — one value for every option.
|
|
139
136
|
|
|
@@ -152,7 +149,7 @@ on a frame round the controls as `data-<piece>-*`, which each control's styleshe
|
|
|
152
149
|
|
|
153
150
|
## The grid's
|
|
154
151
|
|
|
155
|
-
- `GRID_LOOKS` — the grid's options and looks: 27 options (`header`, `lines`, `columns`, `density`, `phone`, `name`, `edge`, `boxes`, `icon`, `picked`, `cell`, `corners`, `hover`, `highlight`, `frame`, `groups`, `names`, `phones`, `typed`, `figures`, `offer`, `width`, `more`, `wait`, `foot`, `add`, `picking`) and two looks, `attio` and `portal` (ViewKit's own grid, as the portal draws it). Every default is
|
|
152
|
+
- `GRID_LOOKS` — the grid's options and looks: 27 options (`header`, `lines`, `columns`, `density`, `phone`, `name`, `edge`, `boxes`, `icon`, `picked`, `cell`, `corners`, `hover`, `highlight`, `frame`, `groups`, `names`, `phones`, `typed`, `figures`, `offer`, `width`, `more`, `wait`, `foot`, `add`, `picking`) and two looks, `attio` and `portal` (ViewKit's own grid, as the portal draws it). Every default is ViewKit's own, which differs from `attio` in ten options (`columns` `all`, `edge` `line`, `boxes` `always`, `picked` `line`, `corners` `round`, `hover` `strong`, `groups` `titles`, `names` `hover`, `phones` `text`, `figures` `word`). `highlight` (Row highlight: `hover`, the default, or `active`, the active row alone, `GridTable`'s `rowHighlight`) and `offer` (Add calculation: `hover`, the default, or `always`, every empty footer cell's offer shown at rest) are `hover` in both looks.
|
|
156
153
|
- `GridLookOptionId` — the grid's option ids.
|
|
157
154
|
- `GridLookWorn` — what the grid's code reads of its options: `columns`, `density`, `phone`, `name`, `boxes`, `icon`, `groups`, `figures`, `width`, `more`, `wait`, `foot`, `add`, `picking` and `highlight`. The others are its look stylesheet's alone, `viewkitjs/views/grid.css`.
|
|
158
155
|
- `GRID_LOOK_READ` — those fifteen option ids, in that order. Twelve reach `GridTable` through `gridLookProps`; `more`, `figures` and `wait` the app wires itself (the [guide](../guides/looks.md)).
|
|
@@ -137,7 +137,7 @@ Every panel's config from one value: a list's `ListSettings` (`viewkitjs/fields/
|
|
|
137
137
|
|
|
138
138
|
- `settingsPanels` — every panel at once: `filters`, `filterTree` (with `filterGroups` only), `sort`, `sorts` (with `severalSorts` only), `group`, `groupBy` (the grid header's), `layout`, and the two writes a list's body makes, `setLaneVisible` (a board lane shown or hidden) and `setFolded` (the groups the person folded, their layer's).
|
|
139
139
|
- `SettingsPanels` — what `settingsPanels` returns.
|
|
140
|
-
- `SettingsPanelsInput` — what every builder takes: `settings`, `layer`, `columns`, `onChange`, `onLayerChange`, and optionally `defaults` (the reader's), `resolve`, `conventions` (the reader's: the Filter rows' country names read its `language`; `ReadyToolbar` hands the provider's), `layouts` (the layouts the list offers, in order), `boardField` and `calendarField` (the fields a board and a calendar take when the settings name none), `parts` (the same `parts` your grid takes: on the table, the Columns list also lists each part column the view places, "Address · Country", at its place, shown, hidden and moved there as any column; a part column takes no `columnIcon` or `columnSettings`), `rowsShowColumns`, `rowIcon`, `manualOrder` (Sort offers Manual), `severalSorts` (the sort holds up to 3 rules; pass it to every builder call whose `sort` reaches your grid's header, or a header pick there replaces every rule), `filterGroups` (and/or groups, below), `defaultSort`, `sortOptions` and `groupDimensions` (a list's own, until it moves onto its fields), `groupHeads` (the answer's groups), `columnIcon`, `columnSettings` (a column's drill-in beyond Visible: its formats, a lock), `filterData` (what the filter rows offer), `relationFilters` and `goneFields` (the fields the list no longer shows, an archived one say, each `FilterGoneField`: a set-aside filter on one is named by them).
|
|
140
|
+
- `SettingsPanelsInput` — what every builder takes: `settings`, `layer`, `columns`, `onChange`, `onLayerChange`, and optionally `defaults` (the reader's), `resolve`, `conventions` (the reader's: the Filter rows' country names read its `language`; `ReadyToolbar` hands the provider's), `layouts` (the layouts the list offers, in order), `boardField` and `calendarField` (the fields a board and a calendar take when the settings name none), `parts` (the same `parts` your grid takes: on the table, the Columns list also lists each part column the view places, "Address · Country", at its place, shown, hidden and moved there as any column; a part column takes no `columnIcon` or `columnSettings`), `rowsShowColumns`, `rowIcon`, `manualOrder` (Sort offers Manual), `severalSorts` (the sort holds up to 3 rules; pass it to every builder call whose `sort` reaches your grid's header, or a header pick there replaces every rule), `filterGroups` (and/or groups, below), `defaultSort`, `sortOptions` and `groupDimensions` (a list's own, until it moves onto its fields), `groupHeads` (the answer's groups), `columnIcon`, `columnSettings` (a column's drill-in beyond Visible: its formats, a lock), `filterData` (what the filter rows offer), `relationFilters` and `goneFields` (the fields the list no longer shows, an archived one say, each `FilterGoneField`: a set-aside filter on one is named by them), and `person`, `phone` and `barDefault` (Layout's Filter bar and Button words rows, written to the layer's `toolbar`: `person` says which the app turns on, `phone` leaves the Filter bar out, and `barDefault`, `added`, `always` or `button`, is what the bar row reads before the person picks, `button` leaving it out; the list's root hands all three from `personSettings`).
|
|
141
141
|
- `PanelGroupHead` — one group of the answer, as the Group panel lists it: `key`, `label`, `count`, `hidden`.
|
|
142
142
|
- `SettingsGroupDimension` — a Group dimension with the `fieldKey` it groups by.
|
|
143
143
|
- `settingsFilters` — the Filter rows: each column's root rule read from the settings' filter, an edit written back with every group, relation rule and set-aside rule kept; a column with no field is a row a saved list can't filter on.
|
|
@@ -59,11 +59,11 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
|
|
|
59
59
|
- `ViewsTextBodyProps` — a whole body for a field typed as one string your app draws: `label`, `kind` (`text`, `url`, `domain`, `email`, `phone` or `rich_text`), `paragraph`, `value` and `onValueChange` (the whole text, every change as it is made), `onDone` (closes as Enter does), `check` (a value's reason, or null), `region` (a phone's country), `typed`, `autoFocus`, `form` (`phone`: draw no ✕, ✓ or Cancel of your own) and `place` (`cell` in a grid cell, `row` in a field row, where it stands in the row's flow; absent, `cell`), and, in the phone's sheet, `onStepChange` (a `ViewsBodyStep` while it stands on a step of its own, `null` once back). The editor keeps the draft, Tab, Escape, ⌘ or Ctrl Enter, the close's tidy, the write check, the save and the phone's ✕ and ✓.
|
|
60
60
|
- `ViewsNumberBodyProps` — a whole body for a number, money or a percent your app draws: `label`, `kind` (`number`, `money` or `percent`), `value` (a number, `null` empty, `NaN` unreadable) and `onValueChange` (the number and, when it is one of `units`, the unit; every change as it is made), `unit` and `units`, `onDone` (closes as Enter does), `check` (a value's reason, or null), `decimals`, `min`, `max`, `locale`, `decimal`, `empty`, `align`, `typed`, `autoFocus`, `form` (`phone`: draw no ✕, ✓ or Cancel of your own) and, in the phone's sheet, `onStepChange` (a step of its own, money's currencies). The editor keeps the draft, the rounding, Tab, Escape, ⌘ or Ctrl Enter, the write check, the save and the phone's ✕ and ✓.
|
|
61
61
|
- `ViewsSortBodyProps` — the sort editor's whole body your app draws: `label`, `options` (the fields it sorts by, each its `value`, `label` and `defaultDir`, and, as the grid's header marks its column, its field's `type`, its `part` and the header's `glyph`), `rules` (in order, the first sorting first), `setAside` (the set-aside sorts, `[]` when none), `max`, `form`, `addSort` (on a computer, Add sort at its foot), `onStepChange` (on a phone: a step of your body's own, its title and Back, `null` once back), `onRulesChange` (the whole rules and, when handed, the set-aside sorts kept; every change as it is made; a list that breaks the rules writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the rules back to what they were as it opened, and ✓). ViewKit keeps the check, the latest rules between renders, the close on the last rule (unless `empty="editor"`) and what ✕ takes back to. `empty` (VK-1091): `"editor"` where a placed Sort asks a computer's body with no rule to say nothing sorts yet over Add sort (`views.panels.sort-empty`), staying open as its last rule goes; absent, as before.
|
|
62
|
-
- Its `items` (`ViewsSortEditorItems`, from `menus.sortEditor`, VK-1063): its menus as data, `(items, ctx) => items`, `ctx` a `ViewsSortEditorItemsContext`: `{ menu: "rule", field, index }` (a rule's ⋯; `field` the sort's key) or `{ menu: "aside", field }` (a set-aside rule's ⋯; `field` its stored `fieldKey`); and (VK-1065) `{ menu: "row", field, index }` or `{ menu: "row", field, aside: true }` (the buttons at a rule's end: × `delete` on a computer, ⋯ `more`) or `{ menu: "foot" }` (Add sort and Clear: `add`, `clear`), with `form`. `CONTROLS.SortBody` draws what it hands back; a body of your own may honour it.
|
|
62
|
+
- Its `items` (`ViewsSortEditorItems`, from `menus.sortEditor`, VK-1063): its menus as data, `(items, ctx) => items`, `ctx` a `ViewsSortEditorItemsContext`: `{ menu: "rule", field, index }` (a rule's ⋯; `field` the sort's key) or `{ menu: "aside", field }` (a set-aside rule's ⋯; `field` its stored `fieldKey`); and (VK-1065) `{ menu: "row", field, index }` (`place: "bar"` on the filter bar's pill, VK-1107) or `{ menu: "row", field, aside: true }` (the buttons at a rule's end: × `delete` on a computer, ⋯ `more`) or `{ menu: "foot" }` (Add sort and Clear: `add`, `clear`), with `form`. `CONTROLS.SortBody` draws what it hands back; a body of your own may honour it.
|
|
63
63
|
- `ViewsQuickFiltersBodyProps` — the quick filters' whole body your app draws: `label`, `fields` (each its `key`, `label`, `searchPlaceholder`, its `options` as the quick filter field hands them (each value's mark is its option's), and `values` in the order to show them, each value its key, its words, its `count` where counts show and whether it is `held`; a held value no count lists is among them, drawn from the hold and worded by the config's `heldLabels` else its key; after the fields offered, each other field holding a value, its held values alone), `hold` (each held field once, its values), `several`, `showCounts`, `form`, `onHoldChange` (the whole hold, every change as it is made; one that holds a field twice, more than one value where `several` is false, or a value added on a field the strip doesn't offer writes nothing), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw it, `actions` (the ✕, closing it).
|
|
64
64
|
- `ViewsFilterBodyProps` — the filter editor's whole body your app draws: `label`, `fields` (the fields a rule may name, `ViewsFilterBodyField`s, each column the list can't filter among them in its place, greyed by its `disabled`), `filter` (the level it is open on, a `FilterGroup`: an advanced filter's group on a computer, the whole filter on a phone), `levels` (how deep its rules may stand, its own the first), `empty` (VK-1091: `"editor"` where a placed Filter asks a computer's top level with nothing filtered to say so over Add filter, `views.panels.filter-empty`, staying open as its last rule goes; absent, the fields), `excludable` (whether it may be `not`), `relation` (where the level is a relation's where edited in place: its field key, words and quantifier, and `gone`, why in words, where the list no longer lists the relation: there a level that adds or changes a rule writes nothing), `form`, `onFilterChange` (the whole level and, at a relation, its quantifier; every change as it is made; a level that breaks the rules writes nothing; an empty one on a computer takes its advanced filter away), `ruleValue` (a rule's value in ViewKit's own body for its type, each change handed back as the rule), `onDone` (what holds it closes) and, on a phone where the sheet's head doesn't draw them, `actions` (the ✕, taking the filter back to what it was as it opened, and ✓). ViewKit keeps the check, the Or top's wrap, the pills' keys and what ✕ takes back to.
|
|
65
65
|
- Its `items` (`ViewsFilterEditorItems`, from `menus.filterEditor`, VK-1063): its menus as data, `ctx` a `ViewsFilterEditorItemsContext`: `{ menu: "rule" | "aside", field, part?, relation?, path }` (a rule's ⋮ or a set-aside rule's: its `fieldKey`, its part, the relation it stands under) or `{ menu: "group", path }` (a group's actions); and (VK-1065) `{ menu: "row", field, part?, relation?, path, aside? }` (a rule's ⋮, `more`) or `{ menu: "foot", path }` (a foot's buttons: `add`, `clear`, `delete`, `more`), each with its `path` in the filter the body is handed (indices through `items` and a relation rule's `where.items`; the whole filter `[]`), with `form`.
|
|
66
|
-
- `ViewsFilterBodyField` — a field a filter body's rule may name: `key`, `label`, `fieldKey`, `part`, `type` (its value type, which says its ways), `far` (a relation's fields one level in), `integer` (`true` on a number field that holds whole numbers only: its box takes whole numbers) and `disabled` (on a column the list can't filter, why in words: draw it greyed and never name it in a rule).
|
|
66
|
+
- `ViewsFilterBodyField` — a field a filter body's rule may name: `key`, `label`, `fieldKey`, `part`, `type` (its value type, which says its ways), `far` (a relation's fields one level in), `integer` (`true` on a number field that holds whole numbers only: its box takes whole numbers), `duration` (`"ms"` or `"s"` on a number kept as a duration, in that unit: its box reads and writes a duration, `1m 30s` or a bare number in seconds, and a rule keeps its bound in that unit) and `disabled` (on a column the list can't filter, why in words: draw it greyed and never name it in a rule).
|
|
67
67
|
- `ViewsFieldsBodyProps` — the field list's whole body your app draws: `purpose` (`sort` or `filter`), `label`, `search` (its search's words), `fields` (each a `ViewsFieldsBodyField`), `own` (the field being changed; absent where a pick adds), `ownRelation` (for a rule on a related record's field, the relation `own` stands under, its key as `onPick` hands it back), `form`, `onPick` (the key picked, and a far field's key for a far field; a key not handed, or handed `disabled`, writes nothing) and `onDone` (what holds it closes, or on a phone the page turns back).
|
|
68
68
|
- `ViewsFieldsBodyField` — a field as the field list's body is handed it: `key`, `label`, `type` and `part` (its field's type and the part it reads, as the grid's header reads them), `glyph` (its column's glyph, drawn as the header draws it), `disabled` (why it can't be picked) and, for a filter's relation, `far` (its far fields, one level in).
|
|
69
69
|
- `ViewsFilterPartBodyProps` — a filter rule's way or value your app draws: `part` (`way` or `value`), `label`, `rule` (the rule as data), `field` (the field it names, a `ViewsFilterBodyField` with no `far`), `relation` (for a far rule, the relation's field key it stands under, as `ruleValue` hands it), `ways` (each its operator and its words), `own` (ViewKit's own value body; null at `way`), `form`, `onRuleChange` (the rule with its new way, written as ViewKit's own writes one, or its new value; another field or part, a way its field doesn't offer or a value its way can't hold writes nothing) and `onDone` (what holds it closes).
|
|
@@ -79,7 +79,7 @@ The primitives your app hands in, modelled on Base UI's shapes: a controlled `op
|
|
|
79
79
|
- `ViewsGroupBodyProps` — the group editor's whole body your app draws: `label`, `dimensions` (each a `ViewsGroupDimension`), `group` (a `ViewsGroupValue`), `manualOrder` (your own order may be picked), `form`, `onGroupChange` (the whole group, every change as it is made; one write for each: a new Group by, order or date step alone, else Hide empty groups, else the groups; a new Group by keeps the order and step handed with it only where the new field offers them; a value that changes two at once, names a field the list doesn't offer, or names an order or step the field grouped by doesn't offer writes nothing), `onDone` (inside Customize, back to its list), `actions` (none inside Customize, whose head holds the ✕) and `onStepChange` (a level of the body's own, Group by's fields or an order's choices, whose name and Back Customize's head shows).
|
|
80
80
|
- Its `items` (`ViewsGroupEditorItems`, from `menus.groupEditor`, VK-1063): its rows as data, `ctx` a `ViewsGroupEditorItemsContext`: `{ menu: "settings", field? }` (Group by, Order, Direction, Date step, Hide empty groups; `field` the field grouped by) or `{ menu: "foot" }` (Remove grouping), with `form`.
|
|
81
81
|
- `ViewsSortEditorItems` — the sort editor's menus reshaped (`menus.sortEditor`, VK-1063): `(items: ViewsMenuItem[], ctx: ViewsSortEditorItemsContext) => ViewsMenuItem[]`.
|
|
82
|
-
- `ViewsSortEditorItemsContext` — which of the sort editor's menus: `{ menu: "rule", field, index }` or `{ menu: "aside", field }`; or which of its rule ends and its foot (VK-1065): `{ menu: "row", field, index }`, `{ menu: "row", field, aside: true }` or `{ menu: "foot" }`; with `form`.
|
|
82
|
+
- `ViewsSortEditorItemsContext` — which of the sort editor's menus: `{ menu: "rule", field, index }` or `{ menu: "aside", field }`; or which of its rule ends and its foot (VK-1065): `{ menu: "row", field, index }` (with `place: "bar"`, the rule's pill on the filter bar, VK-1107), `{ menu: "row", field, aside: true }` or `{ menu: "foot" }`; with `form`.
|
|
83
83
|
- `ViewsFilterEditorItems` — the filter editor's menus reshaped (`menus.filterEditor`): `(items, ctx: ViewsFilterEditorItemsContext) => items`.
|
|
84
84
|
- `ViewsFilterEditorItemsContext` — which of the filter editor's menus: `{ menu: "rule" | "aside", field, part?, relation?, path }` or `{ menu: "group", path }`; or which of its rule ends and feet (VK-1065): `{ menu: "row", field, part?, relation?, path, aside? }` or `{ menu: "foot", path }`; with `form`.
|
|
85
85
|
- `ViewsGroupEditorItems` — the group editor's rows reshaped (`menus.groupEditor`): `(items, ctx: ViewsGroupEditorItemsContext) => items`.
|
|
@@ -128,7 +128,7 @@ What the machinery may do with each column type, declared once per type so a new
|
|
|
128
128
|
- `typeRule` — the rule for a type, or `null` for a column that declares no type.
|
|
129
129
|
- `GridEditorId` — which editor a writable column mounts when clicked, Entered or typed into: `text`, `select`, `number`, `date`, `relation`, `chips`, `range`, `name`, `values` (several emails, phones, links or domains, each with its label and a main one) or `place` (the country first, then its parts).
|
|
130
130
|
- `ListFilterEditor` — which editor a column opens in the filter panel: `options`, `text`, `number`, `date`, `boolean`, `range`, or `none` (listed, opens nothing).
|
|
131
|
-
- `GridPasteKind` — how a pasted clipboard cell becomes a commit: `text`, `option` (the pasted text matched against an offered option's label or key, exact before ignoring case, an in-grid copy landing on the
|
|
131
|
+
- `GridPasteKind` — how a pasted clipboard cell becomes a commit: `text`, `option` (the pasted text matched against an offered option's label or key, exact before ignoring case, an in-grid copy landing on the key it copied only where this column's option with that key carries the copied label, else read by its label, a label two options share refused), `number`, `date` (a day; a date and time with an offset or `Z` is the instant it names, one with none the wall clock in the conventions' `timeZone`, as typed, a day alone that zone's first instant, a time the zone skips or a day that doesn't exist refused), `boolean`, `relation` (the pasted label matched against the candidates, committing the id; on a relation of several, a copy of a relation cell lands its links whole, and text names records by their labels between commas, the set replacing the cell's links, a label no candidate has refused by name), `list` (an in-grid copy's list landing whole where its items are this column's keys and their labels are the copied text; else, on a column of options, the whole text as one option, then the column's labels, longest first, wherever one stands up to a comma, then the rest split on commas, each read as an `option` is; on a column with no options, the text split on commas), `range` (an in-grid pair, a band's name in any case, a name two bands share refused, or text read as a range is written: "11–50", "10,001+", "up to 50"), or `none` (the type refuses paste).
|
|
132
132
|
- `GridValueKind` — what a written value must look like for a type: `any`, `email`, `url`, `boolean`, `relation` or `list`. `gridNormalizeWrite` holds a value to it.
|
|
133
133
|
- `gridPasteKind` — how a paste becomes this column's value. A `multiple` column pastes as a `list` when it presents a field of a type that keeps several values, and takes no paste otherwise; any other column answers with its type's rule. Returns `null` for a column with no type.
|
|
134
134
|
- `gridRelationSource` — the candidates the relation picker offers for a column: its `relation.source`, or a static list of its `relation.options`. Given an `entityIcon` resolver, each candidate without an icon of its own wears its kind's glyph, both in a static list and in each page a remote search returns; without one, the candidates come back untouched.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type PieceLooks } from "../../looks/looks.js";
|
|
2
|
-
export type SettingRowOptionId = "card" | "rows" | "end" | "fields" | "icon";
|
|
3
|
-
/** One value for every option. */
|
|
4
|
-
export type SettingRowPicks = Record<SettingRowOptionId, string>;
|
|
5
|
-
/** The setting row's options and looks. */
|
|
6
|
-
export declare const SETTING_ROW_LOOKS: PieceLooks<SettingRowOptionId>;
|
|
7
|
-
/** The options worn round `el`, each from the nearest frame that picks it; outside any frame, or a value it lacks, its default. */
|
|
8
|
-
export declare function settingRowWornOf(el: Element | null): SettingRowPicks;
|
|
9
|
-
/** The attributes the setting rows' options are set by. */
|
|
10
|
-
export declare const SETTING_ROW_ATTRS: string[];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { lookWornOf } from "../../looks/looks.js";
|
|
2
|
-
const OUTRIGHT = { card: "outlined", rows: "snug", end: "buttons", fields: "boxes", icon: "line" };
|
|
3
|
-
const ATTIO = { card: "raised", rows: "roomy", end: "buttons", fields: "boxes", icon: "line" };
|
|
4
|
-
const LINEAR = { card: "edged", rows: "inset", end: "words", fields: "end", icon: "line" };
|
|
5
|
-
const options = [
|
|
6
|
-
{ id: "card", name: "Card", device: "desktop", def: ATTIO.card, values: [{ id: "outlined", name: "Outlined" }, { id: "raised", name: "Raised" }, { id: "edged", name: "Edged" }] },
|
|
7
|
-
{ id: "rows", name: "Rows", device: "desktop", def: ATTIO.rows, values: [{ id: "snug", name: "Snug" }, { id: "roomy", name: "Roomy" }, { id: "inset", name: "Inset" }] },
|
|
8
|
-
{ id: "end", name: "End", device: "desktop", def: ATTIO.end, values: [{ id: "buttons", name: "Buttons" }, { id: "words", name: "Words" }] },
|
|
9
|
-
{ id: "fields", name: "Fields", device: "desktop", def: ATTIO.fields, values: [{ id: "boxes", name: "Boxes" }, { id: "end", name: "At the end" }] },
|
|
10
|
-
{ id: "icon", name: "Icon", device: "phone", def: ATTIO.icon, values: [{ id: "line", name: "Line" }, { id: "tile", name: "Tile" }] },
|
|
11
|
-
];
|
|
12
|
-
const looks = [
|
|
13
|
-
{ id: "outright", name: "Outright", picks: OUTRIGHT },
|
|
14
|
-
{ id: "attio", name: "Attio", picks: ATTIO },
|
|
15
|
-
{ id: "linear", name: "Linear", picks: LINEAR },
|
|
16
|
-
];
|
|
17
|
-
export const SETTING_ROW_LOOKS = { id: "setting-row", name: "Setting row", options, looks };
|
|
18
|
-
const IDS = options.map((o) => o.id);
|
|
19
|
-
export function settingRowWornOf(el) {
|
|
20
|
-
return lookWornOf(SETTING_ROW_LOOKS, el, IDS);
|
|
21
|
-
}
|
|
22
|
-
export const SETTING_ROW_ATTRS = IDS.map((id) => `data-setting-row-${id}`);
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { OptionColour } from "../option/looks.js";
|
|
3
|
-
import { type SelectListProps } from "../select/select.js";
|
|
4
|
-
import { type SwitchProps } from "../switch/switch.js";
|
|
5
|
-
import { type SettingRowPicks } from "./looks.js";
|
|
6
|
-
/** A setting row's button: its words, an icon before them, what a press does. */
|
|
7
|
-
export interface SettingAction {
|
|
8
|
-
label: string;
|
|
9
|
-
icon?: React.ReactNode;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
/** Its icon alone, its label naming it (a pencil for Change). */
|
|
13
|
-
iconOnly?: boolean;
|
|
14
|
-
/** The Button's kind: danger where it can't be undone, outline where it can (Leave); left out, danger in the danger zone,
|
|
15
|
-
* outline elsewhere. */
|
|
16
|
-
kind?: "outline" | "danger";
|
|
17
|
-
}
|
|
18
|
-
/** A word of state before a row's control: what is true now (Connected), in a value's colour. */
|
|
19
|
-
export interface SettingState {
|
|
20
|
-
label: string;
|
|
21
|
-
colour?: OptionColour;
|
|
22
|
-
}
|
|
23
|
-
interface SettingRowBase {
|
|
24
|
-
/** The setting's name ("Weekly digest"). */
|
|
25
|
-
label: React.ReactNode;
|
|
26
|
-
/** The line under its name: what it does. */
|
|
27
|
-
note?: React.ReactNode;
|
|
28
|
-
/** An icon at the row's start: on a computer in a 32 box; on a phone a line icon, or a tile under the Icon option's Tile. */
|
|
29
|
-
icon?: React.ReactNode;
|
|
30
|
-
/** The tile's colour under the Icon option's Tile, a label colour (the palette's 700s); left out, grey. Line ignores it. */
|
|
31
|
-
colour?: OptionColour;
|
|
32
|
-
/** A mark at the row's start, as given (Google's, a team's letter). */
|
|
33
|
-
mark?: React.ReactNode;
|
|
34
|
-
/** Why it can't change: its control is shut, and this stands before it. On a phone the row fades and the reason stands in
|
|
35
|
-
* place of its line; a page that puts the reason in its group's note passes `true`. */
|
|
36
|
-
locked?: React.ReactNode;
|
|
37
|
-
/** A word of state: on a computer before its control, the Option in its colour (Connected, green); on a phone the grey
|
|
38
|
-
* value before ›, the row then the press of its action. */
|
|
39
|
-
state?: SettingState;
|
|
40
|
-
/** A lone row: one action on its own; on a computer bare, with no card; on a phone a card of its own, the row the press. */
|
|
41
|
-
alone?: boolean;
|
|
42
|
-
className?: string;
|
|
43
|
-
}
|
|
44
|
-
type No<K extends string> = {
|
|
45
|
-
[P in K]?: never;
|
|
46
|
-
};
|
|
47
|
-
export type SettingRowProps = SettingRowBase & (({
|
|
48
|
-
switch: Omit<SwitchProps, "locked">;
|
|
49
|
-
} & No<"select" | "action" | "onOpen" | "value">) | ({
|
|
50
|
-
select: Omit<SelectListProps, "label" | "size">;
|
|
51
|
-
} & No<"switch" | "action" | "onOpen" | "value">) | ({
|
|
52
|
-
action: SettingAction; /** On a computer, a value before its action, as the open kind's (an email before Change). */
|
|
53
|
-
value?: React.ReactNode;
|
|
54
|
-
} & No<"switch" | "select" | "onOpen">) | ({
|
|
55
|
-
onOpen: () => void;
|
|
56
|
-
value?: React.ReactNode;
|
|
57
|
-
} & No<"switch" | "select" | "action">)
|
|
58
|
-
/** The plain kind (VK-1036): no control and no ›, a row that only says, opening nothing. */
|
|
59
|
-
| No<"switch" | "select" | "action" | "onOpen" | "value">);
|
|
60
|
-
export interface SettingRowsProps {
|
|
61
|
-
/** The danger zone's: a red edge, each row's button the Button's danger kind unless its action says outline, on a phone its
|
|
62
|
-
* names red. */
|
|
63
|
-
danger?: boolean;
|
|
64
|
-
/** Its form: the device's unless told (a PhoneHost screen, or below the app's line, is a phone's). */
|
|
65
|
-
form?: "computer" | "phone";
|
|
66
|
-
className?: string;
|
|
67
|
-
children: React.ReactNode;
|
|
68
|
-
}
|
|
69
|
-
/** The setting row's options as the frame round `el` picks them, kept up to date as they change; each its default for `null`. */
|
|
70
|
-
export declare function useSettingRowWorn(el: Element | null): SettingRowPicks;
|
|
71
|
-
/** True for a part placed in a computer's SettingRows whose Fields option is At the end: it draws as one of the card's rows (a
|
|
72
|
-
* Field, the kit's photo). */
|
|
73
|
-
export declare function useSettingRowsRow(): boolean;
|
|
74
|
-
/** The icon at a row's start, or beside a list's name: Line or Tile by the Icon option, the tile on `colour`. */
|
|
75
|
-
export declare function SettingIcon({ colour, children }: {
|
|
76
|
-
colour?: OptionColour;
|
|
77
|
-
children: React.ReactNode;
|
|
78
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
79
|
-
/** iOS's ›, 9 × 15, at a phone row's end: the setting row's, drawn by a list beside setting rows too (the kit's settings list, an
|
|
80
|
-
* app's own row), so one › stands on every settings page. */
|
|
81
|
-
export declare function SettingChevron(): import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
/** Settings rows in a card, a line between each; `danger` the danger zone's. On a phone, Field rows' card: a Field placed in it
|
|
83
|
-
* is its row, beside the setting rows, its note and error under the card (VK-979). */
|
|
84
|
-
export declare function SettingRows({ danger, form, className, children }: SettingRowsProps): import("react/jsx-runtime").JSX.Element;
|
|
85
|
-
/** One setting as a row: its name and its line, its control at its end. What it holds is no row of its card: a Field its control
|
|
86
|
-
* draws (a Select with a note) stands as it does anywhere else. */
|
|
87
|
-
export declare function SettingRow(props: SettingRowProps): import("react/jsx-runtime").JSX.Element;
|
|
88
|
-
/** A setting with a switch: the setting row's switch kind, only its Switch switching it. */
|
|
89
|
-
export interface SwitchRowProps extends SwitchProps {
|
|
90
|
-
/** The setting's name ("Daily summary"), not the action. */
|
|
91
|
-
label: React.ReactNode;
|
|
92
|
-
/** A line under it: what it does, or why it is locked. */
|
|
93
|
-
note?: React.ReactNode;
|
|
94
|
-
}
|
|
95
|
-
/** A setting in a settings list: its name and a line on the left, the switch on the right, which alone switches it. */
|
|
96
|
-
export declare function SwitchRow({ label, note, locked, ...props }: SwitchRowProps): import("react/jsx-runtime").JSX.Element;
|
|
97
|
-
/** Settings rows in a bordered box, a line between each: the setting rows' card in its computer form on every device. */
|
|
98
|
-
export declare function SwitchRows({ className, children }: {
|
|
99
|
-
className?: string;
|
|
100
|
-
children: React.ReactNode;
|
|
101
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
102
|
-
export {};
|