viewkitjs 0.31.0 → 0.32.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 +129 -0
- package/MIGRATION.md +40 -6
- package/README.md +1 -1
- package/fields/dist/query/index.d.ts +2 -0
- package/fields/dist/query/index.js +2 -0
- package/fields/dist/query/list-request.d.ts +148 -0
- package/fields/dist/query/list-request.js +125 -0
- package/fields/dist/query/saved-view.d.ts +15 -0
- package/fields/dist/query/saved-view.js +11 -0
- package/fields/dist/query/settings.d.ts +9 -0
- package/fields/dist/query/settings.js +9 -0
- package/fields/docs/reference/query.md +66 -0
- package/package.json +5 -1
- package/postgres/README.md +1 -0
- package/postgres/dist/handler.d.ts +53 -0
- package/postgres/dist/handler.js +211 -0
- package/postgres/dist/ids.d.ts +1 -1
- package/postgres/dist/ids.js +19 -1
- package/postgres/dist/index.d.ts +1 -0
- package/postgres/dist/index.js +1 -0
- package/postgres/dist/limits.d.ts +3 -1
- package/postgres/dist/limits.js +1 -1
- package/postgres/dist/list-fields.d.ts +10 -0
- package/postgres/dist/list-fields.js +36 -0
- package/postgres/dist/readable.d.ts +4 -0
- package/postgres/dist/readable.js +4 -0
- package/postgres/dist/refusals.d.ts +9 -2
- package/postgres/dist/refusals.js +6 -0
- package/postgres/docs/guides/field-map.md +2 -2
- package/postgres/docs/guides/list-handler.md +99 -0
- package/postgres/docs/index.md +1 -0
- package/postgres/docs/reference/postgres.md +11 -3
- package/views/README.md +2 -2
- package/views/dist/atoms/RowMenu.d.ts +7 -0
- package/views/dist/atoms/RowMenu.js +18 -16
- package/views/dist/atoms/carried.d.ts +5 -0
- package/views/dist/atoms/carried.js +7 -0
- package/views/dist/atoms/types.d.ts +3 -0
- package/views/dist/contract.d.ts +26 -6
- package/views/dist/contract.js +25 -0
- package/views/dist/controls/alert-dialog/alert-dialog.js +2 -1
- package/views/dist/controls/atoms.d.ts +2 -0
- package/views/dist/controls/atoms.js +2 -0
- package/views/dist/controls/avatar/avatar.d.ts +3 -3
- package/views/dist/controls/avatar/avatar.js +1 -1
- package/views/dist/controls/avatar/tokens.d.ts +44 -0
- package/views/dist/controls/avatar/tokens.js +11 -0
- package/views/dist/controls/avatar.css +22 -5
- package/views/dist/controls/choice/tokens.d.ts +0 -4
- package/views/dist/controls/choice/tokens.js +0 -1
- package/views/dist/controls/choice.css +3 -3
- package/views/dist/controls/controls.d.ts +6 -0
- package/views/dist/controls/controls.js +10 -2
- package/views/dist/controls/customize/map-customize-body.js +1 -1
- package/views/dist/controls/field/field.d.ts +19 -4
- package/views/dist/controls/field/field.js +63 -5
- package/views/dist/controls/field/tokens.d.ts +4 -0
- package/views/dist/controls/field/tokens.js +1 -0
- package/views/dist/controls/field.css +41 -16
- package/views/dist/controls/glyphs/glyphs.d.ts +10 -0
- package/views/dist/controls/glyphs/glyphs.js +173 -0
- package/views/dist/controls/index.d.ts +2 -1
- package/views/dist/controls/index.js +2 -1
- package/views/dist/controls/input/input.js +5 -2
- package/views/dist/controls/input/tokens.d.ts +4 -0
- package/views/dist/controls/input/tokens.js +1 -0
- package/views/dist/controls/input.css +31 -3
- package/views/dist/controls/internal/icons.js +10 -0
- package/views/dist/controls/internal/keep-focus.d.ts +2 -0
- package/views/dist/controls/internal/keep-focus.js +17 -0
- package/views/dist/controls/internal/watch-frame.d.ts +2 -0
- package/views/dist/controls/internal/watch-frame.js +33 -0
- package/views/dist/controls/markdown/map-markdown.d.ts +4 -0
- package/views/dist/controls/markdown/map-markdown.js +5 -0
- package/views/dist/controls/menu/map-menu.js +2 -2
- package/views/dist/controls/menu-list/menu-list.d.ts +3 -0
- package/views/dist/controls/menu-list/menu-list.js +5 -4
- package/views/dist/controls/modal/modal.js +5 -1
- package/views/dist/controls/pane/pane.js +2 -1
- package/views/dist/controls/phone-header/header-bar.d.ts +5 -1
- package/views/dist/controls/phone-header/header-bar.js +2 -2
- package/views/dist/controls/phone-header.css +11 -1
- package/views/dist/controls/picker/map-picker.js +3 -0
- package/views/dist/controls/picker/picker.d.ts +14 -0
- package/views/dist/controls/picker/picker.js +30 -10
- package/views/dist/controls/picker.css +2 -0
- package/views/dist/controls/popover/popover.js +2 -1
- package/views/dist/controls/radio/radio.d.ts +5 -3
- package/views/dist/controls/radio/radio.js +18 -2
- package/views/dist/controls/radio/tokens.d.ts +44 -0
- package/views/dist/controls/radio/tokens.js +11 -0
- package/views/dist/controls/radio.css +79 -1
- package/views/dist/controls/select/select.d.ts +4 -0
- package/views/dist/controls/select/select.js +11 -5
- package/views/dist/controls/select/tokens.d.ts +8 -0
- package/views/dist/controls/select/tokens.js +2 -0
- package/views/dist/controls/select.css +17 -0
- package/views/dist/controls/setting-row/looks.d.ts +1 -1
- package/views/dist/controls/setting-row/looks.js +9 -4
- package/views/dist/controls/setting-row/setting-row.d.ts +45 -10
- package/views/dist/controls/setting-row/setting-row.js +82 -15
- package/views/dist/controls/setting-row/tokens.d.ts +74 -2
- package/views/dist/controls/setting-row/tokens.js +19 -1
- package/views/dist/controls/setting-row.css +135 -14
- package/views/dist/controls/sheet/bottom-sheet.d.ts +10 -2
- package/views/dist/controls/sheet/bottom-sheet.js +6 -3
- package/views/dist/controls/sheet.css +4 -1
- package/views/dist/controls/sort-editor/sort-editor.js +3 -2
- package/views/dist/controls/sort-editor.css +8 -2
- package/views/dist/controls/switch-row/tokens.d.ts +0 -12
- package/views/dist/controls/switch-row/tokens.js +0 -3
- package/views/dist/controls/switch-row.css +3 -7
- package/views/dist/controls/switch.css +17 -7
- package/views/dist/controls/tag/tag.d.ts +3 -1
- package/views/dist/controls/tag/tag.js +2 -2
- package/views/dist/controls/tag/tokens.d.ts +4 -0
- package/views/dist/controls/tag/tokens.js +1 -0
- package/views/dist/controls/tag-field/tag-field.d.ts +5 -1
- package/views/dist/controls/tag-field/tag-field.js +11 -5
- package/views/dist/controls/tag-field/tokens.d.ts +16 -0
- package/views/dist/controls/tag-field/tokens.js +4 -0
- package/views/dist/controls/tag-field.css +19 -0
- package/views/dist/controls/tag.css +2 -0
- package/views/dist/controls/toolbar/toolbar.d.ts +15 -3
- package/views/dist/controls/toolbar/toolbar.js +22 -15
- package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +14 -0
- package/views/dist/controls/toolbar-button/atom-toolbar-button.js +51 -0
- package/views/dist/controls/toolbar-button/toolbar-button.d.ts +1 -1
- package/views/dist/controls/toolbar-button/toolbar-button.js +2 -3
- package/views/dist/controls/toolbar-button.css +4 -0
- package/views/dist/controls/toolbar.css +5 -0
- package/views/dist/controls/views-list/map-view-menu.d.ts +3 -0
- package/views/dist/controls/views-list/map-view-menu.js +25 -0
- package/views/dist/controls/views-list/map-views-list-body.d.ts +28 -1
- package/views/dist/controls/views-list/map-views-list-body.js +39 -21
- package/views/dist/controls/views-list/rules.d.ts +2 -0
- package/views/dist/controls/views-list/view-menu.d.ts +7 -0
- package/views/dist/controls/views-list/view-menu.js +28 -24
- package/views/dist/controls/views-list/words.d.ts +2 -0
- package/views/dist/controls/views-list/words.js +1 -1
- package/views/dist/editors/EditorPanel.js +2 -1
- package/views/dist/editors/edit-session.js +2 -5
- package/views/dist/field-row/FieldRow.d.ts +4 -2
- package/views/dist/field-row/FieldRow.js +67 -20
- package/views/dist/field-row/FieldRowLane.d.ts +7 -2
- package/views/dist/field-row/FieldRowLane.js +4 -3
- package/views/dist/field-row/editors/RowEditor.d.ts +12 -0
- package/views/dist/field-row/editors/RowEditor.js +31 -1
- package/views/dist/field-row/editors/RowValueListEditor.d.ts +5 -1
- package/views/dist/field-row/editors/RowValueListEditor.js +4 -1
- package/views/dist/field-row/field-row-button.d.ts +5 -0
- package/views/dist/field-row/field-row-button.js +2 -0
- package/views/dist/fields/binding.d.ts +3 -2
- package/views/dist/fields/binding.js +38 -5
- package/views/dist/grid/chrome/GridColumnMenu.d.ts +4 -2
- package/views/dist/grid/chrome/GridColumnMenu.js +3 -2
- package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -1
- package/views/dist/grid/chrome/GridGroupMenu.js +4 -3
- package/views/dist/grid/chrome/GridHeader.d.ts +4 -1
- package/views/dist/grid/chrome/GridHeader.js +2 -2
- package/views/dist/grid/chrome/GridRow.js +6 -5
- package/views/dist/grid/chrome/GridRowCells.js +6 -9
- package/views/dist/grid/chrome/GridStructure.d.ts +4 -1
- package/views/dist/grid/chrome/GridStructure.js +4 -4
- package/views/dist/grid/chrome/GridTable.js +5 -2
- package/views/dist/grid/chrome/grid-column-menu-items.js +1 -1
- package/views/dist/grid/chrome/grid-row-menu-items.d.ts +27 -3
- package/views/dist/grid/chrome/grid-row-menu-items.js +92 -6
- package/views/dist/grid/chrome/grid-row-props.d.ts +7 -2
- package/views/dist/grid/chrome/grid-rows-menu.js +34 -6
- package/views/dist/grid/chrome/grid-table-props.d.ts +38 -7
- package/views/dist/grid/chrome/useGridBatchApi.d.ts +3 -1
- package/views/dist/grid/chrome/useGridBatchApi.js +4 -2
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -2
- package/views/dist/grid/chrome/useGridKeyboard.js +15 -9
- package/views/dist/grid/chrome/useGridPendingReconciliation.js +1 -2
- package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -1
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +11 -5
- package/views/dist/grid/core/commit-model.d.ts +20 -2
- package/views/dist/grid/core/editing-controller.d.ts +18 -0
- package/views/dist/grid/core/editing-controller.js +188 -42
- package/views/dist/grid/core/editing-model.d.ts +3 -0
- package/views/dist/grid/core/editing-model.js +3 -0
- package/views/dist/grid/core/save-path.d.ts +24 -0
- package/views/dist/grid/core/save-path.js +122 -0
- package/views/dist/grid/core/spreadsheet-operations.d.ts +3 -0
- package/views/dist/grid/core/spreadsheet-operations.js +23 -0
- package/views/dist/grid/index.d.ts +3 -2
- package/views/dist/grid/index.js +1 -0
- package/views/dist/internal/field-rows.d.ts +26 -0
- package/views/dist/internal/field-rows.js +8 -0
- package/views/dist/internal/page-close.d.ts +7 -0
- package/views/dist/internal/page-close.js +43 -0
- package/views/dist/list/browser-views-store.d.ts +10 -0
- package/views/dist/list/browser-views-store.js +182 -0
- package/views/dist/list/index.d.ts +23 -0
- package/views/dist/list/index.js +8 -0
- package/views/dist/list/menu.d.ts +31 -0
- package/views/dist/list/menu.js +76 -0
- package/views/dist/list/parts.d.ts +6 -0
- package/views/dist/list/parts.js +59 -0
- package/views/dist/list/registry.d.ts +11 -0
- package/views/dist/list/registry.js +31 -0
- package/views/dist/list/root.d.ts +40 -0
- package/views/dist/list/root.js +128 -0
- package/views/dist/list/slot.d.ts +14 -0
- package/views/dist/list/slot.js +22 -0
- package/views/dist/list/source.d.ts +11 -0
- package/views/dist/list/source.js +31 -0
- package/views/dist/list/store.d.ts +87 -0
- package/views/dist/list/store.js +115 -0
- package/views/dist/list/toolbar.d.ts +6 -0
- package/views/dist/list/toolbar.js +359 -0
- package/views/dist/list/views-axis.d.ts +5 -0
- package/views/dist/list/views-axis.js +96 -0
- package/views/dist/list/views-store.d.ts +41 -0
- package/views/dist/list/views-store.js +1 -0
- package/views/dist/list/views.d.ts +67 -0
- package/views/dist/list/views.js +400 -0
- package/views/dist/model/preferences.js +1 -1
- package/views/dist/model/prefs-buckets.js +1 -1
- package/views/dist/panels/index.d.ts +3 -1
- package/views/dist/panels/index.js +1 -0
- package/views/dist/panels/react/customize-body.js +1 -0
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +41 -4
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +6 -326
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +9 -1
- package/views/dist/panels/react/toolbar/Toolbar.js +34 -23
- package/views/dist/panels/react/toolbar/ToolbarButton.js +4 -1
- package/views/dist/panels/react/toolbar/ToolbarNew.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.d.ts +2 -2
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +3 -1
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +1 -1
- package/views/dist/panels/react/toolbar/context.d.ts +10 -2
- package/views/dist/panels/react/toolbar/context.js +3 -1
- package/views/dist/panels/react/views-row/FoldingViewRow.d.ts +1 -1
- package/views/dist/panels/react/views-row/FoldingViewRow.js +15 -4
- package/views/dist/panels/react/views-row/PillGroup.d.ts +5 -2
- package/views/dist/panels/react/views-row/PillGroup.js +16 -7
- package/views/dist/panels/react/views-row/ViewPicker.js +2 -12
- package/views/dist/panels/react/views-row/ViewPickerRow.d.ts +4 -2
- package/views/dist/panels/react/views-row/ViewPickerRow.js +9 -5
- package/views/dist/panels/react.d.ts +2 -2
- package/views/dist/panels/toolbar/edit-view.d.ts +7 -1
- package/views/dist/panels/toolbar/edit-view.js +14 -0
- package/views/dist/panels/toolbar/model.d.ts +5 -0
- package/views/dist/panels/toolbar/model.js +7 -3
- package/views/dist/panels/view-state.d.ts +5 -3
- package/views/dist/panels/views-row/model.d.ts +19 -2
- package/views/dist/panels/views-row/model.js +14 -0
- package/views/dist/provider/ViewsProvider.d.ts +16 -7
- package/views/dist/provider/ViewsProvider.js +23 -5
- package/views/dist/provider/components.d.ts +43 -2
- package/views/dist/provider/context.d.ts +2 -1
- package/views/dist/provider/context.js +1 -1
- package/views/dist/provider/ports.d.ts +19 -12
- package/views/dist/provider/ports.js +69 -1
- package/views/dist/react.d.ts +1 -1
- package/views/dist/styles.css +418 -59
- package/views/dist/styles.unlayered.css +418 -59
- package/views/docs/contract.md +42 -31
- package/views/docs/controls/avatar.md +11 -0
- package/views/docs/controls/choice.md +0 -1
- package/views/docs/controls/field.md +3 -0
- package/views/docs/controls/input.md +1 -0
- package/views/docs/controls/radio.md +16 -1
- package/views/docs/controls/select.md +2 -0
- package/views/docs/controls/setting-row.md +18 -0
- package/views/docs/controls/switch-row.md +0 -3
- package/views/docs/controls/tag-field.md +4 -0
- package/views/docs/controls/tag.md +1 -0
- package/views/docs/getting-started.md +2 -2
- package/views/docs/guides/atoms.md +2 -2
- package/views/docs/guides/columns.md +1 -1
- package/views/docs/guides/ports.md +1 -1
- package/views/docs/guides/the-grid.md +34 -7
- package/views/docs/guides/the-provider.md +4 -2
- package/views/docs/index.md +1 -0
- package/views/docs/reference/controls.md +35 -25
- package/views/docs/reference/editors-session.md +1 -1
- package/views/docs/reference/field-row.md +9 -1
- package/views/docs/reference/grid.md +14 -8
- package/views/docs/reference/list.md +227 -0
- package/views/docs/reference/looks.md +1 -1
- package/views/docs/reference/panels-react.md +17 -12
- package/views/docs/reference/panels.md +8 -5
- package/views/docs/reference/react.md +11 -9
- package/views/docs/reference/views.md +2 -2
- package/views/skills/views/SKILL.md +9 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type OptionColour } from "../option/looks.js";
|
|
3
|
-
export type AvatarSize = 16 | 20 | 24 | 32 | 40 | 56 | 64;
|
|
3
|
+
export type AvatarSize = 16 | 20 | 24 | 32 | 40 | 56 | 64 | 96;
|
|
4
4
|
/** A square's own colour: one of the label hues, or grey, the Option's list. */
|
|
5
5
|
export type AvatarColour = OptionColour;
|
|
6
6
|
/** The initials of a name: the first letters of the first and last names; a first name of two joined
|
|
@@ -18,7 +18,7 @@ export interface AvatarProps {
|
|
|
18
18
|
* fills, or with neither its first letter. */
|
|
19
19
|
kind?: "person" | "thing" | "workspace" | "agent";
|
|
20
20
|
/** 16 in a chip (a typed Select's), with no badge; 20 in chips and text, 24 in dense rows and stacks, 32 in list rows,
|
|
21
|
-
* 40 in headers, 56 at a settings page's head, 64 on a record's own page. */
|
|
21
|
+
* 40 in headers, 56 at a settings page's head, 64 on a record's own page, 96 a photo on a phone. */
|
|
22
22
|
size?: AvatarSize;
|
|
23
23
|
/** A stable id, for a person's tone. */
|
|
24
24
|
id?: string;
|
|
@@ -46,7 +46,7 @@ export interface AvatarStackProps {
|
|
|
46
46
|
people: AvatarStackPerson[];
|
|
47
47
|
/** How many to show before the rest become a count. */
|
|
48
48
|
max?: number;
|
|
49
|
-
size?: Exclude<AvatarSize, 16 | 56>;
|
|
49
|
+
size?: Exclude<AvatarSize, 16 | 56 | 96>;
|
|
50
50
|
className?: string;
|
|
51
51
|
/** What everyone is on ("Acme Robotics renewal"): the list's name to a screen reader. Left out, the stack's own words. */
|
|
52
52
|
label?: string;
|
|
@@ -8,7 +8,7 @@ import { Menu } from "../menu/menu.js";
|
|
|
8
8
|
import { optionColours } from "../option/looks.js";
|
|
9
9
|
import { Icon } from "../internal/icons.js";
|
|
10
10
|
import { PhoneHost, usePhone } from "../internal/phone.js";
|
|
11
|
-
const SIZE = { 16: "o-avatar-2xs", 20: "o-avatar-xs", 24: "o-avatar-sm", 32: "", 40: "o-avatar-lg", 56: "o-avatar-56", 64: "o-avatar-xl" };
|
|
11
|
+
const SIZE = { 16: "o-avatar-2xs", 20: "o-avatar-xs", 24: "o-avatar-sm", 32: "", 40: "o-avatar-lg", 56: "o-avatar-56", 64: "o-avatar-xl", 96: "o-avatar-96" };
|
|
12
12
|
export function initials(name) {
|
|
13
13
|
const words = name.split(/\s+/).filter((w) => /^\p{L}/u.test(w));
|
|
14
14
|
if (!words.length)
|
|
@@ -22,6 +22,10 @@ export declare const AVATAR_TOKENS: readonly [{
|
|
|
22
22
|
readonly name: "--vk-fg-subtlest";
|
|
23
23
|
readonly kind: "colour";
|
|
24
24
|
readonly outright: "--text-subtlest";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "--vk-fg-inverse";
|
|
27
|
+
readonly kind: "colour";
|
|
28
|
+
readonly outright: "--text-inverse";
|
|
25
29
|
}, {
|
|
26
30
|
readonly name: "--vk-label-amber-fill";
|
|
27
31
|
readonly kind: "colour";
|
|
@@ -78,6 +82,34 @@ export declare const AVATAR_TOKENS: readonly [{
|
|
|
78
82
|
readonly name: "--vk-label-teal-strong";
|
|
79
83
|
readonly kind: "colour";
|
|
80
84
|
readonly outright: "--label-teal-strong";
|
|
85
|
+
}, {
|
|
86
|
+
readonly name: "--vk-label-blue";
|
|
87
|
+
readonly kind: "colour";
|
|
88
|
+
readonly outright: "--label-blue";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "--vk-label-green";
|
|
91
|
+
readonly kind: "colour";
|
|
92
|
+
readonly outright: "--label-green";
|
|
93
|
+
}, {
|
|
94
|
+
readonly name: "--vk-label-amber";
|
|
95
|
+
readonly kind: "colour";
|
|
96
|
+
readonly outright: "--label-amber";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "--vk-label-red";
|
|
99
|
+
readonly kind: "colour";
|
|
100
|
+
readonly outright: "--label-red";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "--vk-label-purple";
|
|
103
|
+
readonly kind: "colour";
|
|
104
|
+
readonly outright: "--label-purple";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "--vk-label-pink";
|
|
107
|
+
readonly kind: "colour";
|
|
108
|
+
readonly outright: "--label-pink";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "--vk-label-teal";
|
|
111
|
+
readonly kind: "colour";
|
|
112
|
+
readonly outright: "--label-teal";
|
|
81
113
|
}, {
|
|
82
114
|
readonly name: "--vk-neutral";
|
|
83
115
|
readonly kind: "colour";
|
|
@@ -134,6 +166,10 @@ export declare const AVATAR_TOKENS: readonly [{
|
|
|
134
166
|
readonly name: "--vk-font-size-3xs";
|
|
135
167
|
readonly kind: "size";
|
|
136
168
|
readonly outright: "--text-3xs";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "--vk-font-size-4xl";
|
|
171
|
+
readonly kind: "size";
|
|
172
|
+
readonly outright: "--text-4xl";
|
|
137
173
|
}, {
|
|
138
174
|
readonly name: "--vk-font-size-sm";
|
|
139
175
|
readonly kind: "size";
|
|
@@ -154,6 +190,14 @@ export declare const AVATAR_TOKENS: readonly [{
|
|
|
154
190
|
readonly name: "--vk-radius-2xl";
|
|
155
191
|
readonly kind: "size";
|
|
156
192
|
readonly outright: "--radius-2xl";
|
|
193
|
+
}, {
|
|
194
|
+
readonly name: "--vk-radius-3xl";
|
|
195
|
+
readonly kind: "size";
|
|
196
|
+
readonly outright: "--radius-3xl";
|
|
197
|
+
}, {
|
|
198
|
+
readonly name: "--vk-radius-4xl";
|
|
199
|
+
readonly kind: "size";
|
|
200
|
+
readonly outright: "--radius-4xl";
|
|
157
201
|
}, {
|
|
158
202
|
readonly name: "--vk-radius-full";
|
|
159
203
|
readonly kind: "size";
|
|
@@ -5,6 +5,7 @@ export const AVATAR_TOKENS = [
|
|
|
5
5
|
{ name: "--vk-fg-on-brand", kind: "colour", outright: "--text-brand-inverse" },
|
|
6
6
|
{ name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
|
|
7
7
|
{ name: "--vk-fg-subtlest", kind: "colour", outright: "--text-subtlest" },
|
|
8
|
+
{ name: "--vk-fg-inverse", kind: "colour", outright: "--text-inverse" },
|
|
8
9
|
{ name: "--vk-label-amber-fill", kind: "colour", outright: "--label-amber-fill" },
|
|
9
10
|
{ name: "--vk-label-amber-strong", kind: "colour", outright: "--label-amber-strong" },
|
|
10
11
|
{ name: "--vk-label-blue-fill", kind: "colour", outright: "--label-blue-fill" },
|
|
@@ -19,6 +20,13 @@ export const AVATAR_TOKENS = [
|
|
|
19
20
|
{ name: "--vk-label-red-strong", kind: "colour", outright: "--label-red-strong" },
|
|
20
21
|
{ name: "--vk-label-teal-fill", kind: "colour", outright: "--label-teal-fill" },
|
|
21
22
|
{ name: "--vk-label-teal-strong", kind: "colour", outright: "--label-teal-strong" },
|
|
23
|
+
{ name: "--vk-label-blue", kind: "colour", outright: "--label-blue" },
|
|
24
|
+
{ name: "--vk-label-green", kind: "colour", outright: "--label-green" },
|
|
25
|
+
{ name: "--vk-label-amber", kind: "colour", outright: "--label-amber" },
|
|
26
|
+
{ name: "--vk-label-red", kind: "colour", outright: "--label-red" },
|
|
27
|
+
{ name: "--vk-label-purple", kind: "colour", outright: "--label-purple" },
|
|
28
|
+
{ name: "--vk-label-pink", kind: "colour", outright: "--label-pink" },
|
|
29
|
+
{ name: "--vk-label-teal", kind: "colour", outright: "--label-teal" },
|
|
22
30
|
{ name: "--vk-neutral", kind: "colour", outright: "--background-neutral" },
|
|
23
31
|
{ name: "--vk-person-1", kind: "colour", outright: "--person-1" },
|
|
24
32
|
{ name: "--vk-person-2", kind: "colour", outright: "--person-2" },
|
|
@@ -33,11 +41,14 @@ export const AVATAR_TOKENS = [
|
|
|
33
41
|
{ name: "--vk-font-size-2xl", kind: "size", outright: "--text-2xl" },
|
|
34
42
|
{ name: "--vk-font-size-2xs", kind: "size", outright: "--text-2xs" },
|
|
35
43
|
{ name: "--vk-font-size-3xs", kind: "size", outright: "--text-3xs" },
|
|
44
|
+
{ name: "--vk-font-size-4xl", kind: "size", outright: "--text-4xl" },
|
|
36
45
|
{ name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
|
|
37
46
|
{ name: "--vk-font-size-xl", kind: "size", outright: "--text-xl" },
|
|
38
47
|
{ name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
|
|
39
48
|
{ name: "--vk-font-weight-semibold", kind: "size", outright: "--font-weight-semibold" },
|
|
40
49
|
{ name: "--vk-radius-2xl", kind: "size", outright: "--radius-2xl" },
|
|
50
|
+
{ name: "--vk-radius-3xl", kind: "size", outright: "--radius-3xl" },
|
|
51
|
+
{ name: "--vk-radius-4xl", kind: "size", outright: "--radius-4xl" },
|
|
41
52
|
{ name: "--vk-radius-full", kind: "size", outright: "--radius-full" },
|
|
42
53
|
{ name: "--vk-radius-lg", kind: "size", outright: "--radius-lg" },
|
|
43
54
|
{ name: "--vk-radius-md", kind: "size", outright: "--radius-md" },
|
|
@@ -27,13 +27,14 @@
|
|
|
27
27
|
.o-avatar-letters svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
|
|
28
28
|
|
|
29
29
|
/* ── Sizes: 16 in a typed Select's chip, its initials at the 3xs type size; 20 in chips and text, 24 in dense rows and stacks,
|
|
30
|
-
40 in headers, 56 at a settings page's head, 64 on a record's page ── */
|
|
30
|
+
40 in headers, 56 at a settings page's head, 64 on a record's page, 96 a photo on a phone ── */
|
|
31
31
|
.o-avatar.o-avatar-2xs { width: calc(var(--vk-spacing) * 4); height: calc(var(--vk-spacing) * 4); font-size: var(--vk-font-size-3xs); }
|
|
32
32
|
.o-avatar.o-avatar-xs { width: calc(var(--vk-spacing) * 5); height: calc(var(--vk-spacing) * 5); font-size: var(--vk-font-size-2xs); }
|
|
33
33
|
.o-avatar.o-avatar-sm { width: calc(var(--vk-spacing) * 6); height: calc(var(--vk-spacing) * 6); font-size: var(--vk-font-size-2xs); }
|
|
34
34
|
.o-avatar.o-avatar-lg { width: calc(var(--vk-spacing) * 10); height: calc(var(--vk-spacing) * 10); font-size: var(--vk-font-size-sm); }
|
|
35
35
|
.o-avatar.o-avatar-56 { width: calc(var(--vk-spacing) * 14); height: calc(var(--vk-spacing) * 14); font-size: var(--vk-font-size-xl); }
|
|
36
36
|
.o-avatar.o-avatar-xl { width: calc(var(--vk-spacing) * 16); height: calc(var(--vk-spacing) * 16); font-size: var(--vk-font-size-2xl); }
|
|
37
|
+
.o-avatar.o-avatar-96 { width: calc(var(--vk-spacing) * 24); height: calc(var(--vk-spacing) * 24); font-size: var(--vk-font-size-4xl); }
|
|
37
38
|
|
|
38
39
|
/* ── A thing: a square, its corners a step that grows with it, on the neutral ground, its edge inside ─ */
|
|
39
40
|
.o-avatar.o-avatar-thing { border-radius: var(--avatar-r); background-color: var(--vk-neutral); color: var(--vk-fg-subtle); box-shadow: inset 0 0 0 var(--vk-border-width) var(--vk-border-subtle); }
|
|
@@ -53,27 +54,43 @@
|
|
|
53
54
|
/* An agent: a thing's square holding its own icon. Its mark comes in its own fills, so it is filled, never drawn as a
|
|
54
55
|
line as a record's icon is; a mark with no colour of its own (Codex's, Grok's) takes the text's ink, as the canvas drew it. */
|
|
55
56
|
.o-avatar-agent .o-avatar-letters svg { fill: var(--vk-fg); stroke: none; }
|
|
57
|
+
/* On a phone an agent's square on its own colour stands bold, as iOS draws an app's tile (round 3 of the settings canvas): the hue
|
|
58
|
+
under a white letter, as the setting row's Tile draws its icons; grey the quietest ink. A thing's, the workspace's included,
|
|
59
|
+
keeps the hue's fill. */
|
|
60
|
+
.o-avatar.o-avatar-agent[data-colour]:where([data-vk-phone] *) { color: var(--vk-fg-inverse); }
|
|
61
|
+
.o-avatar.o-avatar-agent[data-colour="blue"]:where([data-vk-phone] *) { background-color: var(--vk-label-blue); }
|
|
62
|
+
.o-avatar.o-avatar-agent[data-colour="green"]:where([data-vk-phone] *) { background-color: var(--vk-label-green); }
|
|
63
|
+
.o-avatar.o-avatar-agent[data-colour="amber"]:where([data-vk-phone] *) { background-color: var(--vk-label-amber); }
|
|
64
|
+
.o-avatar.o-avatar-agent[data-colour="red"]:where([data-vk-phone] *) { background-color: var(--vk-label-red); }
|
|
65
|
+
.o-avatar.o-avatar-agent[data-colour="purple"]:where([data-vk-phone] *) { background-color: var(--vk-label-purple); }
|
|
66
|
+
.o-avatar.o-avatar-agent[data-colour="pink"]:where([data-vk-phone] *) { background-color: var(--vk-label-pink); }
|
|
67
|
+
.o-avatar.o-avatar-agent[data-colour="teal"]:where([data-vk-phone] *) { background-color: var(--vk-label-teal); }
|
|
68
|
+
.o-avatar.o-avatar-agent[data-colour="grey"]:where([data-vk-phone] *) { background-color: var(--vk-fg-subtlest); }
|
|
56
69
|
|
|
57
|
-
/* ── Corners: a radius token per size, in steps, 56 taking 64's; Medium with nothing set: xs at 20, sm at 24 and 32, md at 40, lg at 56 and 64,
|
|
70
|
+
/* ── Corners: a radius token per size, in steps, 56 taking 64's; Medium with nothing set: xs at 20, sm at 24 and 32, md at 40, lg at 56 and 64, 2xl at 96 (two steps past 64's, as round 3's photo draws it),
|
|
58
71
|
between Small and Large, the tokens holding nothing between xs and sm ────────────────────────────── */
|
|
59
72
|
.o-avatar.o-avatar-thing { --avatar-r: var(--vk-radius-sm); }
|
|
60
73
|
.o-avatar.o-avatar-thing:is(.o-avatar-2xs, .o-avatar-xs) { --avatar-r: var(--vk-radius-xs); }
|
|
61
74
|
.o-avatar.o-avatar-thing.o-avatar-lg { --avatar-r: var(--vk-radius-md); }
|
|
62
75
|
.o-avatar.o-avatar-thing:is(.o-avatar-56, .o-avatar-xl) { --avatar-r: var(--vk-radius-lg); }
|
|
63
|
-
|
|
76
|
+
.o-avatar.o-avatar-thing.o-avatar-96 { --avatar-r: var(--vk-radius-2xl); }
|
|
77
|
+
/* Small: xs at 20 and 24, sm at 32 and 40, md at 56 and 64, xl at 96. */
|
|
64
78
|
[data-avatar-corners="small"] .o-avatar.o-avatar-thing { --avatar-r: var(--vk-radius-sm); }
|
|
65
79
|
[data-avatar-corners="small"] .o-avatar.o-avatar-thing:is(.o-avatar-2xs, .o-avatar-xs, .o-avatar-sm) { --avatar-r: var(--vk-radius-xs); }
|
|
66
80
|
[data-avatar-corners="small"] .o-avatar.o-avatar-thing:is(.o-avatar-56, .o-avatar-xl) { --avatar-r: var(--vk-radius-md); }
|
|
67
|
-
|
|
81
|
+
[data-avatar-corners="small"] .o-avatar.o-avatar-thing.o-avatar-96 { --avatar-r: var(--vk-radius-xl); }
|
|
82
|
+
/* Large, the radii before Medium came: sm at 20 and 24, md at 32, lg at 40, xl at 56 and 64, 3xl at 96. */
|
|
68
83
|
[data-avatar-corners="large"] .o-avatar.o-avatar-thing { --avatar-r: var(--vk-radius-md); }
|
|
69
84
|
[data-avatar-corners="large"] .o-avatar.o-avatar-thing:is(.o-avatar-2xs, .o-avatar-xs, .o-avatar-sm) { --avatar-r: var(--vk-radius-sm); }
|
|
70
85
|
[data-avatar-corners="large"] .o-avatar.o-avatar-thing.o-avatar-lg { --avatar-r: var(--vk-radius-lg); }
|
|
71
86
|
[data-avatar-corners="large"] .o-avatar.o-avatar-thing:is(.o-avatar-56, .o-avatar-xl) { --avatar-r: var(--vk-radius-xl); }
|
|
72
|
-
|
|
87
|
+
[data-avatar-corners="large"] .o-avatar.o-avatar-thing.o-avatar-96 { --avatar-r: var(--vk-radius-3xl); }
|
|
88
|
+
/* Extra large: md at 20 and 24, lg at 32, xl at 40, 2xl at 56 and 64, 4xl at 96. */
|
|
73
89
|
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing { --avatar-r: var(--vk-radius-lg); }
|
|
74
90
|
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing:is(.o-avatar-2xs, .o-avatar-xs, .o-avatar-sm) { --avatar-r: var(--vk-radius-md); }
|
|
75
91
|
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing.o-avatar-lg { --avatar-r: var(--vk-radius-xl); }
|
|
76
92
|
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing:is(.o-avatar-56, .o-avatar-xl) { --avatar-r: var(--vk-radius-2xl); }
|
|
93
|
+
[data-avatar-corners="xlarge"] .o-avatar.o-avatar-thing.o-avatar-96 { --avatar-r: var(--vk-radius-4xl); }
|
|
77
94
|
|
|
78
95
|
/* ── Corner smoothing: Smooth, with nothing set, draws a square's corners with the smooth outline (smooth.css),
|
|
79
96
|
every browser that knows shape() showing it; one that doesn't keeps the quarter circles above, and so does Round. Its
|
|
@@ -30,10 +30,6 @@ export declare const CHOICE_TOKENS: readonly [{
|
|
|
30
30
|
readonly name: "--vk-hovered";
|
|
31
31
|
readonly kind: "colour";
|
|
32
32
|
readonly outright: "--surface-hovered";
|
|
33
|
-
}, {
|
|
34
|
-
readonly name: "--vk-selected";
|
|
35
|
-
readonly kind: "colour";
|
|
36
|
-
readonly outright: "--surface-selected";
|
|
37
33
|
}, {
|
|
38
34
|
readonly name: "--vk-border-width";
|
|
39
35
|
readonly kind: "size";
|
|
@@ -7,7 +7,6 @@ export const CHOICE_TOKENS = [
|
|
|
7
7
|
{ name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
|
|
8
8
|
{ name: "--vk-ground", kind: "colour", outright: "--surface" },
|
|
9
9
|
{ name: "--vk-hovered", kind: "colour", outright: "--surface-hovered" },
|
|
10
|
-
{ name: "--vk-selected", kind: "colour", outright: "--surface-selected" },
|
|
11
10
|
{ name: "--vk-border-width", kind: "size", outright: "--border-width" },
|
|
12
11
|
{ name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
|
|
13
12
|
{ name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
.o-choice-note { font-size: var(--vk-font-size-xs); line-height: calc(var(--vk-font-size-xs) * var(--vk-line-height-xs)); color: var(--vk-fg-subtle); }
|
|
11
11
|
|
|
12
12
|
/* ── A choice as a card: an edge round it, the whole card pressing it; under the pointer the hovered
|
|
13
|
-
ground; chosen, the selected edge and ground; off, the softer edge and no hover ─────────────────── */
|
|
13
|
+
ground; chosen, the selected edge and a hairline ring just outside it, on the card's own ground, as a marked card; off, the softer edge and no hover ─────────────────── */
|
|
14
14
|
.o-choice-card {
|
|
15
15
|
box-sizing: border-box; display: flex; width: 100%; padding: calc(var(--vk-spacing) * 3) calc(var(--vk-spacing) * 3.5);
|
|
16
16
|
border: var(--vk-border-width) solid var(--vk-border); border-radius: var(--vk-radius-lg); corner-shape: squircle;
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
/* A hover only on a screen with a pointer (iOS keeps :hover on what was last tapped); a press and the forced state stay out. */
|
|
20
20
|
@media (hover: hover) { .o-choice-card:hover { background-color: var(--vk-hovered); } }
|
|
21
|
-
.o-choice-card:has(> [data-checked]) { border-color: var(--vk-border-selected); background-color: var(--vk-
|
|
22
|
-
.o-choice-card:has(> [data-disabled]) { border-color: var(--vk-border-subtle); background-color: transparent; }
|
|
21
|
+
.o-choice-card:has(> [data-checked]) { border-color: var(--vk-border-selected); box-shadow: 0 0 0 var(--vk-border-width) var(--vk-border-selected); background-color: var(--vk-ground); }
|
|
22
|
+
.o-choice-card:has(> [data-disabled]) { border-color: var(--vk-border-subtle); box-shadow: none; background-color: transparent; }
|
|
23
23
|
.o-choice-card .o-choice-label { font-weight: var(--vk-font-weight-medium); }
|
|
24
24
|
/* In error, the card's edge is red too. */
|
|
25
25
|
.o-choice-card:is(:has(> :is([aria-invalid="true"], [data-invalid])), .o-fieldset[data-invalid] *):not(:has(> [data-disabled])) { border-color: var(--vk-border-danger); }
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { MapButton } from "./button/map-button.js";
|
|
2
|
+
import { MapAppIcon } from "./glyphs/glyphs.js";
|
|
3
|
+
import { MapMarkdown } from "./markdown/map-markdown.js";
|
|
2
4
|
import { MapTooltip } from "./tooltip/map-tooltip.js";
|
|
3
5
|
import { MapPopover } from "./popover/map-popover.js";
|
|
4
6
|
import { MapSheet } from "./sheet/map-sheet.js";
|
|
@@ -7,6 +9,7 @@ import { MapInput } from "./input/map-input.js";
|
|
|
7
9
|
import { MapMenu } from "./menu/map-menu.js";
|
|
8
10
|
import { MapSortBody } from "./sort-editor/map-sort-body.js";
|
|
9
11
|
import { MapViewsListBody } from "./views-list/map-views-list-body.js";
|
|
12
|
+
import { MapViewMenu } from "./views-list/map-view-menu.js";
|
|
10
13
|
import { MapFilterBody, MapFilterPartBody } from "./filter-editor/map-filter-body.js";
|
|
11
14
|
import { MapGroupBody } from "./group-editor/map-group-body.js";
|
|
12
15
|
import { MapCustomizeBody } from "./customize/map-customize-body.js";
|
|
@@ -25,6 +28,8 @@ import { MapValuesBody } from "./values-editor/map-values-body.js";
|
|
|
25
28
|
import { MapLinksBody } from "./links-editor/map-links-body.js";
|
|
26
29
|
export declare const CONTROLS: {
|
|
27
30
|
Button: typeof MapButton;
|
|
31
|
+
AppIcon: typeof MapAppIcon;
|
|
32
|
+
Markdown: typeof MapMarkdown;
|
|
28
33
|
Tooltip: typeof MapTooltip;
|
|
29
34
|
Popover: typeof MapPopover;
|
|
30
35
|
Sheet: typeof MapSheet;
|
|
@@ -33,6 +38,7 @@ export declare const CONTROLS: {
|
|
|
33
38
|
Menu: typeof MapMenu;
|
|
34
39
|
SortBody: typeof MapSortBody;
|
|
35
40
|
ViewsListBody: typeof MapViewsListBody;
|
|
41
|
+
ViewMenu: typeof MapViewMenu;
|
|
36
42
|
FilterBody: typeof MapFilterBody;
|
|
37
43
|
FilterPartBody: typeof MapFilterPartBody;
|
|
38
44
|
GroupBody: typeof MapGroupBody;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { carryAtoms } from "../atoms/carried.js";
|
|
2
|
+
import { CONTROL_ATOMS } from "./atoms.js";
|
|
1
3
|
import { MapButton } from "./button/map-button.js";
|
|
4
|
+
import { MapAppIcon } from "./glyphs/glyphs.js";
|
|
5
|
+
import { MapMarkdown } from "./markdown/map-markdown.js";
|
|
2
6
|
import { MapTooltip } from "./tooltip/map-tooltip.js";
|
|
3
7
|
import { MapPopover } from "./popover/map-popover.js";
|
|
4
8
|
import { MapSheet } from "./sheet/map-sheet.js";
|
|
@@ -7,6 +11,7 @@ import { MapInput } from "./input/map-input.js";
|
|
|
7
11
|
import { MapMenu } from "./menu/map-menu.js";
|
|
8
12
|
import { MapSortBody } from "./sort-editor/map-sort-body.js";
|
|
9
13
|
import { MapViewsListBody } from "./views-list/map-views-list-body.js";
|
|
14
|
+
import { MapViewMenu } from "./views-list/map-view-menu.js";
|
|
10
15
|
import { MapFilterBody, MapFilterPartBody } from "./filter-editor/map-filter-body.js";
|
|
11
16
|
import { MapGroupBody } from "./group-editor/map-group-body.js";
|
|
12
17
|
import { MapCustomizeBody } from "./customize/map-customize-body.js";
|
|
@@ -23,8 +28,10 @@ import { MapPartsBody } from "./compound-editor/map-parts-body.js";
|
|
|
23
28
|
import { MapNumberBody } from "./number-editor/map-number-body.js";
|
|
24
29
|
import { MapValuesBody } from "./values-editor/map-values-body.js";
|
|
25
30
|
import { MapLinksBody } from "./links-editor/map-links-body.js";
|
|
26
|
-
export const CONTROLS = {
|
|
31
|
+
export const CONTROLS = carryAtoms({
|
|
27
32
|
Button: MapButton,
|
|
33
|
+
AppIcon: MapAppIcon,
|
|
34
|
+
Markdown: MapMarkdown,
|
|
28
35
|
Tooltip: MapTooltip,
|
|
29
36
|
Popover: MapPopover,
|
|
30
37
|
Sheet: MapSheet,
|
|
@@ -33,6 +40,7 @@ export const CONTROLS = {
|
|
|
33
40
|
Menu: MapMenu,
|
|
34
41
|
SortBody: MapSortBody,
|
|
35
42
|
ViewsListBody: MapViewsListBody,
|
|
43
|
+
ViewMenu: MapViewMenu,
|
|
36
44
|
FilterBody: MapFilterBody,
|
|
37
45
|
FilterPartBody: MapFilterPartBody,
|
|
38
46
|
GroupBody: MapGroupBody,
|
|
@@ -50,4 +58,4 @@ export const CONTROLS = {
|
|
|
50
58
|
NumberBody: MapNumberBody,
|
|
51
59
|
ValuesBody: MapValuesBody,
|
|
52
60
|
LinksBody: MapLinksBody,
|
|
53
|
-
};
|
|
61
|
+
}, CONTROL_ATOMS);
|
|
@@ -142,7 +142,7 @@ export function MapCustomizeBody(props) {
|
|
|
142
142
|
const shared = p.view, kit = p.foot === "kit";
|
|
143
143
|
const foot = shared ? (shared.changes > 0 && p.foot !== "none" ? {
|
|
144
144
|
changed: true, onReset: shared.onReset, ...(shared.canPublish && { onSave: shared.onPublish }), pending: shared.pending, stale: shared.stale,
|
|
145
|
-
words: { reset: say({ key: kit ? "views.panels.view-clear" : "views.panels.view-reset" }), save: say({ key: kit ? "views.panels.view-save" : "views.panels.view-publish" }) },
|
|
145
|
+
words: { reset: say({ key: kit ? "views.panels.view-clear" : "views.panels.view-reset" }), save: say({ key: kit ? "views.panels.view-save" : shared.own ? "views.panels.view-save-own" : "views.panels.view-publish" }) },
|
|
146
146
|
} : {}) : p.onClear && p.foot !== "none" ? { changed: true, onReset: p.onClear, words: { reset: say({ key: "views.panels.view-clear" }) } } : {};
|
|
147
147
|
const { words: footWords, ...footProps } = foot;
|
|
148
148
|
const timeField = p.fields?.items.find((f) => f.time);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { type FieldRowsCard } from "../../internal/field-rows.js";
|
|
2
3
|
import { type FieldRowsLook } from "./looks.js";
|
|
3
4
|
/** A field's error, or several: none, one (written as it is), or a list (each once). */
|
|
4
5
|
export type FieldError = React.ReactNode | React.ReactNode[];
|
|
@@ -37,8 +38,12 @@ export interface FieldProps {
|
|
|
37
38
|
className?: string;
|
|
38
39
|
children: React.ReactNode;
|
|
39
40
|
}
|
|
40
|
-
/** A field: its label, its control (an Input or InputGroup, a select, a tag field), and under it its note or its error.
|
|
41
|
-
|
|
41
|
+
/** A field: its label, its control (an Input or InputGroup, a select, a tag field), and under it its note or its error. Placed in
|
|
42
|
+
* Field rows (VK-960), it is the card's row instead: its label in the row's column, its control beside it (an Input or InputGroup
|
|
43
|
+
* typed in place, their save mark at the row's end), and its note and error under the card. Placed in a computer's SettingRows
|
|
44
|
+
* under its Fields option's At the end (VK-985), it is one of its setting rows: its label and note on the left, its control at the
|
|
45
|
+
* row's end. */
|
|
46
|
+
export declare function Field(props: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
42
47
|
export interface FieldSetProps {
|
|
43
48
|
/** What the group asks or holds, above it ("Who can see this deal", "Billing address"). */
|
|
44
49
|
legend: React.ReactNode;
|
|
@@ -72,9 +77,19 @@ export interface FieldRowsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
72
77
|
/** The look its place hands it, whole (an editor's look), winning over the frame's pick; left out, the frame's. */
|
|
73
78
|
look?: FieldRowsLook;
|
|
74
79
|
}
|
|
75
|
-
/** Field rows' card: fields that belong together, as rows of one card on a phone, or each its own card. Its rows are FieldRowsRows
|
|
76
|
-
* anything else stands in it as its place
|
|
80
|
+
/** Field rows' card: fields that belong together, as rows of one card on a phone, or each its own card. Its rows are FieldRowsRows,
|
|
81
|
+
* or Fields, each then the card's row (VK-960), their notes and errors under the card; anything else stands in it as its place
|
|
82
|
+
* puts it. */
|
|
77
83
|
export declare function FieldRows({ look, className, children, ...props }: FieldRowsProps): import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
/** Field rows' card as its Fields see it, and the foot to draw after it: FieldRows', and a setting rows' card on a phone (VK-979).
|
|
85
|
+
* Its Fields in the order they came (VK-960), and those with a note or an error to show; while any has one, its foot stands
|
|
86
|
+
* after the card, the card first, so a foot coming or going never redraws the card or moves the focus in it. In the foot each
|
|
87
|
+
* such Field has its own place, in the order the Fields came (the rows' order, unless a row came later), whatever order their
|
|
88
|
+
* notes came in. The card is handed to its Fields through FieldRowsCardContext by the one that draws it. */
|
|
89
|
+
export declare function useFieldRowsCard(): {
|
|
90
|
+
card: FieldRowsCard;
|
|
91
|
+
foot: React.ReactNode;
|
|
92
|
+
};
|
|
78
93
|
export type FieldRowsRowProps = {
|
|
79
94
|
label?: React.ReactNode;
|
|
80
95
|
labelClassName?: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import { createPortal } from "react-dom";
|
|
3
4
|
import { Field as BaseField } from "@base-ui/react/field";
|
|
4
5
|
import { Fieldset as BaseFieldset } from "@base-ui/react/fieldset";
|
|
5
6
|
import { FieldRootContext, useFieldRootContext } from "@base-ui/react/internals/field-root-context";
|
|
6
7
|
import { cx } from "../../internal/cx.js";
|
|
8
|
+
import { AtSettingRowEnd, FieldRowsCardContext, InFieldRow, OutOfFieldRows, SettingRowField } from "../../internal/field-rows.js";
|
|
7
9
|
import { phoneMark, usePhoneForm } from "../internal/phone.js";
|
|
8
10
|
import { fieldRowsAttrs } from "./looks.js";
|
|
9
11
|
export function errorsOf(error) {
|
|
@@ -13,10 +15,27 @@ export function errorsOf(error) {
|
|
|
13
15
|
export function ErrorWords({ errors }) {
|
|
14
16
|
return errors.length > 1 ? _jsx("ul", { className: "o-field-errors", children: errors.map((e, i) => _jsx("li", { children: e }, i)) }) : _jsx(_Fragment, { children: errors[0] });
|
|
15
17
|
}
|
|
16
|
-
export function Field(
|
|
18
|
+
export function Field(props) {
|
|
19
|
+
const card = React.useContext(FieldRowsCardContext), settingRow = React.useContext(SettingRowField);
|
|
20
|
+
return card ? _jsx(FieldAsRow, { ...props, card: card }) : settingRow ? _jsx(FieldAsSettingRow, { ...props }) : _jsx(FieldBox, { ...props });
|
|
21
|
+
}
|
|
22
|
+
function FieldAsSettingRow({ label, required = false, note, error, keepNote = false, disabled, nativeLabel = true, labelId, className, children }) {
|
|
23
|
+
const errors = errorsOf(error), invalid = errors.length > 0, name = typeof label === "string" ? label : undefined;
|
|
24
|
+
const end = React.useMemo(() => ({ name }), [name]);
|
|
25
|
+
return (_jsxs(BaseField.Root, { className: cx("o-setting-row o-setting-row-field", className), "data-setting-row-kind": "field", invalid: invalid, disabled: disabled, "data-kit": "field", children: [_jsxs("span", { className: "o-choice-text", children: [label != null && _jsxs(BaseField.Label, { className: "o-choice-label", id: labelId, ...(nativeLabel ? {} : { nativeLabel: false, render: _jsx("span", {}) }), children: [label, required && _jsx("span", { className: "o-field-req", "aria-hidden": "true", children: "*" })] }), note != null && (!invalid || keepNote) && _jsx(BaseField.Description, { className: "o-choice-note", children: note }), invalid && _jsx(BaseField.Error, { className: "o-choice-note o-setting-row-error", match: true, children: _jsx(ErrorWords, { errors: errors }) })] }), _jsx("span", { className: "o-setting-row-end", children: _jsx(SettingRowField.Provider, { value: false, children: _jsx(AtSettingRowEnd.Provider, { value: end, children: children }) }) })] }));
|
|
26
|
+
}
|
|
27
|
+
const useBeforePaint = typeof window === "undefined" ? React.useEffect : React.useLayoutEffect;
|
|
28
|
+
function FieldAsRow({ card, label, required = false, note, error, disabled, nativeLabel = true, labelId, className, children }) {
|
|
29
|
+
const errors = errorsOf(error), invalid = errors.length > 0, device = usePhoneForm();
|
|
30
|
+
const id = React.useId(), noted = note != null && !invalid, wants = noted || invalid, { enter, need, slot } = card, at = slot(id);
|
|
31
|
+
useBeforePaint(() => enter(id), [enter, id]);
|
|
32
|
+
useBeforePaint(() => { need(id, wants); return () => need(id, false); }, [need, id, wants]);
|
|
33
|
+
return (_jsxs(BaseField.Root, { className: cx("o-field o-field-row", className), "data-field-in": "rows", ...phoneMark(device), invalid: invalid, disabled: disabled, "data-kit": "field", children: [label != null && _jsxs(BaseField.Label, { className: "o-field-row-label", id: labelId, ...(nativeLabel ? {} : { nativeLabel: false, render: _jsx("span", {}) }), children: [label, required && _jsx("span", { className: "o-field-req", "aria-hidden": "true", children: "*" })] }), _jsx(FieldRowsCardContext.Provider, { value: null, children: _jsx(InFieldRow.Provider, { value: true, children: children }) }), at && wants && createPortal(_jsxs(_Fragment, { children: [noted && _jsx(BaseField.Description, { className: "o-field-note", children: note }), invalid && _jsx(BaseField.Error, { className: "o-field-error", match: true, children: _jsx(ErrorWords, { errors: errors }) })] }), at)] }));
|
|
34
|
+
}
|
|
35
|
+
function FieldBox({ label, required = false, note, error, keepNote = false, orientation = "vertical", disabled, nativeLabel = true, labelId, quietLabel = false, form, className, children }) {
|
|
17
36
|
const errors = errorsOf(error), invalid = errors.length > 0;
|
|
18
|
-
const phone = usePhoneForm(form), device = usePhoneForm();
|
|
19
|
-
return (_jsxs(BaseField.Root, { className: cx("o-field", className), "data-orientation": orientation === "vertical" ? undefined : orientation, "data-field-label": quietLabel ? "quiet" : undefined, "data-field-form": quietLabel && phone ? "phone" : undefined, ...phoneMark(device), invalid: invalid, disabled: disabled, "data-kit": "field", children: [label != null && _jsxs(BaseField.Label, { className: "o-field-label", id: labelId, ...(nativeLabel ? {} : { nativeLabel: false, render: _jsx("span", {}) }), children: [label, required && _jsx("span", { className: "o-field-req", "aria-hidden": "true", children: "*" })] }), children, note != null && (!invalid || keepNote) && _jsx(BaseField.Description, { className: "o-field-note", children: note }), invalid && _jsx(BaseField.Error, { className: "o-field-error", match: true, children: _jsx(ErrorWords, { errors: errors }) })] }));
|
|
37
|
+
const phone = usePhoneForm(form), device = usePhoneForm(), inRow = React.useContext(InFieldRow);
|
|
38
|
+
return (_jsxs(BaseField.Root, { className: cx("o-field", className), "data-orientation": orientation === "vertical" ? undefined : orientation, "data-field-label": quietLabel ? "quiet" : undefined, "data-field-form": quietLabel && phone ? "phone" : undefined, ...phoneMark(device), invalid: invalid, disabled: disabled, "data-kit": "field", children: [label != null && _jsxs(BaseField.Label, { className: "o-field-label", id: labelId, ...(nativeLabel ? {} : { nativeLabel: false, render: _jsx("span", {}) }), children: [label, required && _jsx("span", { className: "o-field-req", "aria-hidden": "true", children: "*" })] }), inRow ? _jsx(InFieldRow.Provider, { value: false, children: children }) : children, note != null && (!invalid || keepNote) && _jsx(BaseField.Description, { className: "o-field-note", children: note }), invalid && _jsx(BaseField.Error, { className: "o-field-error", match: true, children: _jsx(ErrorWords, { errors: errors }) })] }));
|
|
20
39
|
}
|
|
21
40
|
function SetDisabled({ disabled, children }) {
|
|
22
41
|
const outer = useFieldRootContext();
|
|
@@ -34,10 +53,49 @@ export function FieldSeparator({ children, className }) {
|
|
|
34
53
|
return (_jsxs("div", { className: cx("o-field-sep", className), role: "separator", children: [_jsx("span", { className: "o-field-sep-line" }), children != null && _jsxs(_Fragment, { children: [_jsx("span", { className: "o-field-sep-words", children: children }), _jsx("span", { className: "o-field-sep-line" })] })] }));
|
|
35
54
|
}
|
|
36
55
|
export function FieldRows({ look, className, children, ...props }) {
|
|
37
|
-
|
|
56
|
+
const { card, foot } = useFieldRowsCard();
|
|
57
|
+
return (_jsxs(FieldRowsCardContext.Provider, { value: card, children: [_jsx("div", { className: cx("o-field-rows", className), "data-kit": "field", ...(look ? fieldRowsAttrs(look) : {}), ...props, children: children }), foot] }));
|
|
58
|
+
}
|
|
59
|
+
export function useFieldRowsCard() {
|
|
60
|
+
const [order, setOrder] = React.useState([]);
|
|
61
|
+
const [needs, setNeeds] = React.useState(() => new Set());
|
|
62
|
+
const [slots, setSlots] = React.useState(() => new Map());
|
|
63
|
+
const enter = React.useCallback((id) => {
|
|
64
|
+
setOrder((was) => (was.includes(id) ? was : [...was, id]));
|
|
65
|
+
return () => setOrder((was) => was.filter((x) => x !== id));
|
|
66
|
+
}, []);
|
|
67
|
+
const need = React.useCallback((id, on) => setNeeds((was) => {
|
|
68
|
+
if (was.has(id) === on)
|
|
69
|
+
return was;
|
|
70
|
+
const now = new Set(was);
|
|
71
|
+
if (on)
|
|
72
|
+
now.add(id);
|
|
73
|
+
else
|
|
74
|
+
now.delete(id);
|
|
75
|
+
return now;
|
|
76
|
+
}), []);
|
|
77
|
+
const place = React.useCallback((id, el) => setSlots((was) => {
|
|
78
|
+
if ((was.get(id) ?? null) === el)
|
|
79
|
+
return was;
|
|
80
|
+
const now = new Map(was);
|
|
81
|
+
if (el)
|
|
82
|
+
now.set(id, el);
|
|
83
|
+
else
|
|
84
|
+
now.delete(id);
|
|
85
|
+
return now;
|
|
86
|
+
}), []);
|
|
87
|
+
const slot = React.useCallback((id) => slots.get(id) ?? null, [slots]);
|
|
88
|
+
const card = React.useMemo(() => ({ enter, need, slot }), [enter, need, slot]);
|
|
89
|
+
const shown = order.filter((id) => needs.has(id));
|
|
90
|
+
const foot = shown.length > 0 ? _jsx("div", { className: "o-field-rows-foot", children: shown.map((id) => _jsx(FootSlot, { id: id, place: place }, id)) }) : null;
|
|
91
|
+
return { card, foot };
|
|
92
|
+
}
|
|
93
|
+
function FootSlot({ id, place }) {
|
|
94
|
+
const ref = React.useCallback((el) => place(id, el), [id, place]);
|
|
95
|
+
return _jsx("span", { className: "o-field-rows-slot", ref: ref });
|
|
38
96
|
}
|
|
39
97
|
export const FieldRowsRow = React.forwardRef(function FieldRowsRow({ as = "label", label, labelClassName, required = false, className, children, ...props }, ref) {
|
|
40
|
-
const inner = _jsxs(_Fragment, { children: [label != null && _jsxs("span", { className: cx("o-field-row-label", labelClassName), children: [label, required && _jsx("span", { className: "o-field-req", "aria-hidden": "true", children: "*" })] }), children] });
|
|
98
|
+
const inner = _jsxs(_Fragment, { children: [label != null && _jsxs("span", { className: cx("o-field-row-label", labelClassName), children: [label, required && _jsx("span", { className: "o-field-req", "aria-hidden": "true", children: "*" })] }), _jsx(OutOfFieldRows, { children: children })] });
|
|
41
99
|
const cls = cx("o-field-row", className);
|
|
42
100
|
if (as === "button")
|
|
43
101
|
return _jsx("button", { ref: ref, type: "button", className: cls, ...props, children: inner });
|
|
@@ -26,6 +26,10 @@ export declare const FIELD_TOKENS: readonly [{
|
|
|
26
26
|
readonly name: "--vk-fg-subtle";
|
|
27
27
|
readonly kind: "colour";
|
|
28
28
|
readonly outright: "--text-subtle";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "--vk-fg-subtlest";
|
|
31
|
+
readonly kind: "colour";
|
|
32
|
+
readonly outright: "--text-subtlest";
|
|
29
33
|
}, {
|
|
30
34
|
readonly name: "--vk-font-size-base";
|
|
31
35
|
readonly kind: "size";
|
|
@@ -6,6 +6,7 @@ export const FIELD_TOKENS = [
|
|
|
6
6
|
{ name: "--vk-fg", kind: "colour", outright: "--text" },
|
|
7
7
|
{ name: "--vk-fg-disabled", kind: "colour", outright: "--text-disabled" },
|
|
8
8
|
{ name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
|
|
9
|
+
{ name: "--vk-fg-subtlest", kind: "colour", outright: "--text-subtlest" },
|
|
9
10
|
{ name: "--vk-font-size-base", kind: "size", outright: "--text-base" },
|
|
10
11
|
{ name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
|
|
11
12
|
{ name: "--vk-font-size-xs", kind: "size", outright: "--text-xs" },
|
|
@@ -51,27 +51,31 @@
|
|
|
51
51
|
Each option, on a frame or on the card itself (the look its place hands it, whole, which wins), sets the card's and
|
|
52
52
|
its rows' variables; nothing set is Card: one card on the overlay's card ground, its edge, rows 52, the label 104, the line
|
|
53
53
|
between rows from the words. What stands inside a row and where is its place's: a place may set a row's inset and gap. A row
|
|
54
|
-
typed into shows the caret alone.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
typed into shows the caret alone. Each option is declared again on every card under its pick that carries no pick of its own, so
|
|
55
|
+
the card resolves its colours, edge and corners where it stands, and a place that sets a token again round it (a settings group
|
|
56
|
+
on a phone, its white ground) reaches it. A place may stop a row's rule --field-rows-line-end short of its right edge. A row may
|
|
57
|
+
open with a glyph lane, 20 wide, its glyph centred; a row holding one starts its rule from the words, after the lane and the gap
|
|
58
|
+
(--field-rows-line-start, the lane and the 12 gap: a place that sets another gap sets it too). A label's one long word breaks. */
|
|
59
|
+
[data-field-rows-edge="on"], :where([data-field-rows-edge="on"]) .o-field-rows:not([data-field-rows-edge]) { --field-rows-edge: var(--vk-border-width) solid var(--vk-border-subtle); }
|
|
60
|
+
[data-field-rows-edge="off"], :where([data-field-rows-edge="off"]) .o-field-rows:not([data-field-rows-edge]) { --field-rows-edge: 0 none; }
|
|
61
|
+
[data-field-rows-cards="one"], :where([data-field-rows-cards="one"]) .o-field-rows:not([data-field-rows-cards]) {
|
|
58
62
|
--field-rows-card-display: block; --field-rows-card-gap: 0px; --field-rows-card-overflow: hidden; --field-rows-card-edge: var(--field-rows-edge);
|
|
59
63
|
--field-rows-card-corners: var(--vk-radius-xl); --field-rows-card-ground: var(--vk-overlay-card);
|
|
60
64
|
--field-rows-row-edge: 0 none; --field-rows-row-corners: 0px; --field-rows-row-ground: transparent;
|
|
61
65
|
}
|
|
62
|
-
[data-field-rows-cards="each"] {
|
|
66
|
+
[data-field-rows-cards="each"], :where([data-field-rows-cards="each"]) .o-field-rows:not([data-field-rows-cards]) {
|
|
63
67
|
--field-rows-card-display: grid; --field-rows-card-gap: calc(var(--vk-spacing) * 2.5); --field-rows-card-overflow: visible; --field-rows-card-edge: 0 none;
|
|
64
68
|
--field-rows-card-corners: 0px; --field-rows-card-ground: transparent;
|
|
65
69
|
--field-rows-row-edge: var(--field-rows-edge); --field-rows-row-corners: var(--vk-radius-xl); --field-rows-row-ground: var(--vk-overlay-card);
|
|
66
70
|
}
|
|
67
|
-
[data-field-rows-height="48"] { --field-rows-row: calc(var(--vk-spacing) * 12); }
|
|
68
|
-
[data-field-rows-height="52"] { --field-rows-row: calc(var(--vk-spacing) * 13); }
|
|
69
|
-
[data-field-rows-height="56"] { --field-rows-row: calc(var(--vk-spacing) * 14); }
|
|
70
|
-
[data-field-rows-label="104"] { --field-rows-label: block; }
|
|
71
|
-
[data-field-rows-label="none"] { --field-rows-label: none; }
|
|
72
|
-
[data-field-rows-lines="words"] { --field-rows-line-image: linear-gradient(var(--vk-border-overlay-card), var(--vk-border-overlay-card)); --field-rows-line-shadow: none; }
|
|
73
|
-
[data-field-rows-lines="across"] { --field-rows-line-image: none; --field-rows-line-shadow: inset 0 var(--vk-border-width) 0 var(--vk-border-overlay-card); }
|
|
74
|
-
[data-field-rows-lines="none"] { --field-rows-line-image: none; --field-rows-line-shadow: none; }
|
|
71
|
+
[data-field-rows-height="48"], :where([data-field-rows-height="48"]) .o-field-rows:not([data-field-rows-height]) { --field-rows-row: calc(var(--vk-spacing) * 12); }
|
|
72
|
+
[data-field-rows-height="52"], :where([data-field-rows-height="52"]) .o-field-rows:not([data-field-rows-height]) { --field-rows-row: calc(var(--vk-spacing) * 13); }
|
|
73
|
+
[data-field-rows-height="56"], :where([data-field-rows-height="56"]) .o-field-rows:not([data-field-rows-height]) { --field-rows-row: calc(var(--vk-spacing) * 14); }
|
|
74
|
+
[data-field-rows-label="104"], :where([data-field-rows-label="104"]) .o-field-rows:not([data-field-rows-label]) { --field-rows-label: block; }
|
|
75
|
+
[data-field-rows-label="none"], :where([data-field-rows-label="none"]) .o-field-rows:not([data-field-rows-label]) { --field-rows-label: none; }
|
|
76
|
+
[data-field-rows-lines="words"], :where([data-field-rows-lines="words"]) .o-field-rows:not([data-field-rows-lines]) { --field-rows-line-image: linear-gradient(var(--vk-border-overlay-card), var(--vk-border-overlay-card)); --field-rows-line-shadow: none; }
|
|
77
|
+
[data-field-rows-lines="across"], :where([data-field-rows-lines="across"]) .o-field-rows:not([data-field-rows-lines]) { --field-rows-line-image: none; --field-rows-line-shadow: inset 0 var(--vk-border-width) 0 var(--vk-border-overlay-card); }
|
|
78
|
+
[data-field-rows-lines="none"], :where([data-field-rows-lines="none"]) .o-field-rows:not([data-field-rows-lines]) { --field-rows-line-image: none; --field-rows-line-shadow: none; }
|
|
75
79
|
|
|
76
80
|
.o-field-rows {
|
|
77
81
|
display: var(--field-rows-card-display, block); grid-template-columns: minmax(0, 1fr); gap: var(--field-rows-card-gap, 0px); min-width: 0;
|
|
@@ -85,8 +89,29 @@
|
|
|
85
89
|
}
|
|
86
90
|
button.o-field-row { cursor: pointer; }
|
|
87
91
|
.o-field-row + .o-field-row {
|
|
88
|
-
background-image: var(--field-rows-line-image, linear-gradient(var(--vk-border-overlay-card), var(--vk-border-overlay-card))); background-size: calc(100% - var(--vk-spacing) * 4) var(--vk-border-width);
|
|
89
|
-
background-position: calc(var(--vk-spacing) * 4) 0; background-repeat: no-repeat; box-shadow: var(--field-rows-line-shadow, none);
|
|
92
|
+
background-image: var(--field-rows-line-image, linear-gradient(var(--vk-border-overlay-card), var(--vk-border-overlay-card))); background-size: calc(100% - var(--vk-spacing) * 4 - var(--field-rows-line-start, 0px) - var(--field-rows-line-end, 0px)) var(--vk-border-width);
|
|
93
|
+
background-position: calc(var(--vk-spacing) * 4 + var(--field-rows-line-start, 0px)) 0; background-repeat: no-repeat; box-shadow: var(--field-rows-line-shadow, none);
|
|
90
94
|
}
|
|
91
|
-
.o-field-row-label { display: var(--field-rows-label, block); flex: none; width: calc(var(--vk-spacing) * 26); color: var(--vk-fg-subtle); }
|
|
95
|
+
.o-field-row-label { display: var(--field-rows-label, block); flex: none; width: calc(var(--vk-spacing) * 26); color: var(--vk-fg-subtle); overflow-wrap: anywhere; }
|
|
96
|
+
.o-field-row-glyph {
|
|
97
|
+
display: flex; flex: none; align-items: center; justify-content: center; width: calc(var(--vk-spacing) * 5);
|
|
98
|
+
}
|
|
99
|
+
.o-field-row:has(> .o-field-row-glyph) { --field-rows-line-start: calc(var(--vk-spacing) * 8); }
|
|
100
|
+
|
|
101
|
+
/* ── A Field placed in Field rows is the card's row (VK-960; the settings canvas, round 3: look-ios.mjs .fl, .fv, .nt): its label
|
|
102
|
+
in the row's column, its control typed in place beside it (input.css, In a row of Field rows), the value 116 in from the row's
|
|
103
|
+
words (the label's 104 and the row's 12). Its note and error stand under the card, in the foot FieldRows draws after it while
|
|
104
|
+
any Field in it has one: 7 under the card, inset 16 as the rows' words, small and in the quietest text, the notes running on
|
|
105
|
+
as one note; an error in the danger colour, standing in place of every note. ─────────────────────────────────────────── */
|
|
106
|
+
.o-field.o-field-row { display: flex; gap: calc(var(--vk-spacing) * 3); }
|
|
107
|
+
.o-field-rows-foot {
|
|
108
|
+
margin: 0; padding: calc(var(--vk-spacing) * 1.75) calc(var(--vk-spacing) * 4) 0; overflow-wrap: anywhere;
|
|
109
|
+
font-size: var(--vk-font-size-xs); line-height: calc(var(--vk-font-size-xs) * var(--vk-line-height-xs)); color: var(--vk-fg-subtlest);
|
|
110
|
+
}
|
|
111
|
+
/* Each Field's place in it, in its row's order, standing as its words only: they run on, a space between. */
|
|
112
|
+
.o-field-rows-slot { display: contents; }
|
|
113
|
+
.o-field-rows-slot > * { display: inline; color: inherit; }
|
|
114
|
+
.o-field-rows-slot + .o-field-rows-slot::before { content: " "; }
|
|
115
|
+
.o-field-rows-slot > .o-field-error { color: var(--vk-danger); }
|
|
116
|
+
.o-field-rows-foot:has(.o-field-error) .o-field-note { display: none; }
|
|
92
117
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ViewsIcons } from "../../provider/icons.js";
|
|
2
|
+
/** ViewKit's default glyphs by meaning: what `CONTROLS.AppIcon` draws, and what an app with an `AppIcon` of its own hands
|
|
3
|
+
* as `icons` to keep them. */
|
|
4
|
+
export declare const CONTROL_ICONS: ViewsIcons;
|
|
5
|
+
/** The components map's default `AppIcon`: ViewKit's glyph of that name, and nothing for a name it doesn't draw. A
|
|
6
|
+
* provider handed no `icons` draws every meaning through it. */
|
|
7
|
+
export declare function MapAppIcon({ name, className }: {
|
|
8
|
+
name: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|