viewkitjs 0.22.0 → 0.24.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 +38 -0
- package/package.json +2 -4
- package/views/dist/contract.d.ts +6 -289
- package/views/dist/contract.js +1 -96
- package/views/dist/controls/atoms.d.ts +8 -0
- package/views/dist/controls/atoms.js +8 -0
- package/views/dist/controls/button/tokens.d.ts +351 -0
- package/views/dist/controls/button/tokens.js +90 -0
- package/views/dist/controls/checkbox/checkbox.d.ts +28 -0
- package/views/dist/controls/checkbox/checkbox.js +15 -0
- package/views/dist/controls/checkbox/looks.d.ts +3 -0
- package/views/dist/controls/checkbox/looks.js +8 -0
- package/views/dist/controls/checkbox/map-checkbox.d.ts +2 -0
- package/views/dist/controls/checkbox/map-checkbox.js +5 -0
- package/views/dist/controls/checkbox/tokens.d.ts +131 -0
- package/views/dist/controls/checkbox/tokens.js +35 -0
- package/views/dist/controls/checkbox.css +133 -0
- package/views/dist/controls/controls.d.ts +12 -3
- package/views/dist/controls/controls.js +13 -1
- package/views/dist/controls/field/field.d.ts +94 -0
- package/views/dist/controls/field/field.js +46 -0
- package/views/dist/controls/field/looks.d.ts +13 -0
- package/views/dist/controls/field/looks.js +22 -0
- package/views/dist/controls/field/tokens.d.ts +75 -0
- package/views/dist/controls/field/tokens.js +21 -0
- package/views/dist/controls/field.css +98 -0
- package/views/dist/controls/glass-button/glass-button.d.ts +40 -0
- package/views/dist/controls/glass-button/glass-button.js +16 -0
- package/views/dist/controls/glass-button/looks.d.ts +4 -0
- package/views/dist/controls/glass-button/looks.js +4 -0
- package/views/dist/controls/glass-button/tokens.d.ts +127 -0
- package/views/dist/controls/glass-button/tokens.js +34 -0
- package/views/dist/controls/glass-button.css +111 -0
- package/views/dist/controls/grip/grip.d.ts +14 -0
- package/views/dist/controls/grip/grip.js +9 -0
- package/views/dist/controls/index.d.ts +32 -0
- package/views/dist/controls/index.js +31 -0
- package/views/dist/controls/inline-input/inline-input.d.ts +14 -0
- package/views/dist/controls/inline-input/inline-input.js +10 -0
- package/views/dist/controls/inline-input/looks.d.ts +3 -0
- package/views/dist/controls/inline-input/looks.js +16 -0
- package/views/dist/controls/inline-input/tokens.d.ts +79 -0
- package/views/dist/controls/inline-input/tokens.js +22 -0
- package/views/dist/controls/inline-input.css +78 -0
- package/views/dist/controls/input/autofill.d.ts +25 -0
- package/views/dist/controls/input/autofill.js +17 -0
- package/views/dist/controls/input/input.d.ts +119 -0
- package/views/dist/controls/input/input.js +127 -0
- package/views/dist/controls/input/looks.d.ts +41 -0
- package/views/dist/controls/input/looks.js +48 -0
- package/views/dist/controls/input/map-input.d.ts +2 -0
- package/views/dist/controls/input/map-input.js +5 -0
- package/views/dist/controls/input/tokens.d.ts +171 -0
- package/views/dist/controls/input/tokens.js +45 -0
- package/views/dist/controls/input.css +381 -0
- package/views/dist/controls/internal/anchor.d.ts +16 -0
- package/views/dist/controls/internal/anchor.js +8 -0
- package/views/dist/controls/internal/close-reason.d.ts +5 -0
- package/views/dist/controls/internal/close-reason.js +2 -0
- package/views/dist/controls/internal/hold.d.ts +25 -0
- package/views/dist/controls/internal/hold.js +81 -0
- package/views/dist/controls/internal/icons.d.ts +8 -0
- package/views/dist/controls/internal/icons.js +65 -0
- package/views/dist/controls/internal/popup-host.d.ts +7 -0
- package/views/dist/controls/internal/popup-host.js +10 -0
- package/views/dist/controls/internal/read-token.d.ts +6 -0
- package/views/dist/controls/internal/read-token.js +11 -0
- package/views/dist/controls/internal/reorder.d.ts +44 -0
- package/views/dist/controls/internal/reorder.js +83 -0
- package/views/dist/controls/internal/scroll.d.ts +11 -0
- package/views/dist/controls/internal/scroll.js +14 -0
- package/views/dist/controls/kbd/kbd.d.ts +13 -0
- package/views/dist/controls/kbd/kbd.js +10 -0
- package/views/dist/controls/kbd/looks.d.ts +4 -0
- package/views/dist/controls/kbd/looks.js +4 -0
- package/views/dist/controls/kbd/tokens.d.ts +47 -0
- package/views/dist/controls/kbd/tokens.js +14 -0
- package/views/dist/controls/kbd.css +46 -0
- package/views/dist/controls/list/tokens.d.ts +139 -0
- package/views/dist/controls/list/tokens.js +37 -0
- package/views/dist/controls/list.css +188 -0
- package/views/dist/controls/menu-list/keys.d.ts +7 -0
- package/views/dist/controls/menu-list/keys.js +29 -0
- package/views/dist/controls/menu-list/looks.d.ts +4 -0
- package/views/dist/controls/menu-list/looks.js +20 -0
- package/views/dist/controls/menu-list/menu-list.d.ts +196 -0
- package/views/dist/controls/menu-list/menu-list.js +346 -0
- package/views/dist/controls/menu-list/tokens.d.ts +187 -0
- package/views/dist/controls/menu-list/tokens.js +49 -0
- package/views/dist/controls/menu-list.css +259 -0
- package/views/dist/controls/number-field/number-field.d.ts +48 -0
- package/views/dist/controls/number-field/number-field.js +34 -0
- package/views/dist/controls/number-field/tokens.d.ts +47 -0
- package/views/dist/controls/number-field/tokens.js +14 -0
- package/views/dist/controls/number-field.css +54 -0
- package/views/dist/controls/option/atom-tag.d.ts +6 -0
- package/views/dist/controls/option/atom-tag.js +6 -0
- package/views/dist/controls/option/looks.d.ts +7 -0
- package/views/dist/controls/option/looks.js +21 -0
- package/views/dist/controls/option/option.d.ts +35 -0
- package/views/dist/controls/option/option.js +32 -0
- package/views/dist/controls/option/tokens.d.ts +223 -0
- package/views/dist/controls/option/tokens.js +58 -0
- package/views/dist/controls/option.css +92 -0
- package/views/dist/controls/phone-header/header-bar.d.ts +18 -0
- package/views/dist/controls/phone-header/header-bar.js +9 -0
- package/views/dist/controls/phone-header/looks.d.ts +4 -0
- package/views/dist/controls/phone-header/looks.js +4 -0
- package/views/dist/controls/phone-header/soft-edge.d.ts +5 -0
- package/views/dist/controls/phone-header/soft-edge.js +3 -0
- package/views/dist/controls/phone-header/tokens.d.ts +59 -0
- package/views/dist/controls/phone-header/tokens.js +17 -0
- package/views/dist/controls/phone-header.css +51 -0
- package/views/dist/controls/popover/looks.d.ts +4 -0
- package/views/dist/controls/popover/looks.js +10 -0
- package/views/dist/controls/popover/map-popover.d.ts +3 -0
- package/views/dist/controls/popover/map-popover.js +5 -0
- package/views/dist/controls/popover/popover.d.ts +74 -0
- package/views/dist/controls/popover/popover.js +106 -0
- package/views/dist/controls/popover/tokens.d.ts +83 -0
- package/views/dist/controls/popover/tokens.js +23 -0
- package/views/dist/controls/popover.css +94 -0
- package/views/dist/controls/scrollbar/scrollbar.d.ts +10 -0
- package/views/dist/controls/scrollbar/scrollbar.js +143 -0
- package/views/dist/controls/scrollbar/tokens.d.ts +43 -0
- package/views/dist/controls/scrollbar/tokens.js +13 -0
- package/views/dist/controls/scrollbar.css +47 -0
- package/views/dist/controls/sheet/bottom-sheet.d.ts +98 -0
- package/views/dist/controls/sheet/bottom-sheet.js +375 -0
- package/views/dist/controls/sheet/forms.d.ts +38 -0
- package/views/dist/controls/sheet/forms.js +26 -0
- package/views/dist/controls/sheet/looks.d.ts +4 -0
- package/views/dist/controls/sheet/looks.js +10 -0
- package/views/dist/controls/sheet/map-sheet.d.ts +3 -0
- package/views/dist/controls/sheet/map-sheet.js +12 -0
- package/views/dist/controls/sheet/spring.d.ts +22 -0
- package/views/dist/controls/sheet/spring.js +48 -0
- package/views/dist/controls/sheet/tokens.d.ts +143 -0
- package/views/dist/controls/sheet/tokens.js +38 -0
- package/views/dist/controls/sheet.css +223 -0
- package/views/dist/controls/spinner/tokens.d.ts +55 -0
- package/views/dist/controls/spinner/tokens.js +16 -0
- package/views/dist/controls/status/atom-status-badge.d.ts +10 -0
- package/views/dist/controls/status/atom-status-badge.js +13 -0
- package/views/dist/controls/status/looks.d.ts +4 -0
- package/views/dist/controls/status/looks.js +22 -0
- package/views/dist/controls/status/marks.d.ts +26 -0
- package/views/dist/controls/status/marks.js +73 -0
- package/views/dist/controls/status/status.d.ts +43 -0
- package/views/dist/controls/status/status.js +26 -0
- package/views/dist/controls/status/tokens.d.ts +407 -0
- package/views/dist/controls/status/tokens.js +104 -0
- package/views/dist/controls/status.css +164 -0
- package/views/dist/controls/switch/looks.d.ts +4 -0
- package/views/dist/controls/switch/looks.js +19 -0
- package/views/dist/controls/switch/switch.d.ts +15 -0
- package/views/dist/controls/switch/switch.js +11 -0
- package/views/dist/controls/switch/tokens.d.ts +139 -0
- package/views/dist/controls/switch/tokens.js +37 -0
- package/views/dist/controls/switch.css +169 -0
- package/views/dist/controls/tag/atom-cell-more.d.ts +3 -0
- package/views/dist/controls/tag/atom-cell-more.js +5 -0
- package/views/dist/controls/tag/looks.d.ts +4 -0
- package/views/dist/controls/tag/looks.js +4 -0
- package/views/dist/controls/tag/tag.d.ts +25 -0
- package/views/dist/controls/tag/tag.js +19 -0
- package/views/dist/controls/tag/tokens.d.ts +63 -0
- package/views/dist/controls/tag/tokens.js +18 -0
- package/views/dist/controls/tag.css +81 -0
- package/views/dist/controls/toggle/looks.d.ts +3 -0
- package/views/dist/controls/toggle/looks.js +12 -0
- package/views/dist/controls/toggle/toggle.d.ts +47 -0
- package/views/dist/controls/toggle/toggle.js +23 -0
- package/views/dist/controls/toggle/tokens.d.ts +55 -0
- package/views/dist/controls/toggle/tokens.js +16 -0
- package/views/dist/controls/toggle.css +67 -0
- package/views/dist/controls/tokens.d.ts +16 -0
- package/views/dist/controls/tokens.js +49 -0
- package/views/dist/controls/tooltip/looks.d.ts +4 -0
- package/views/dist/controls/tooltip/looks.js +4 -0
- package/views/dist/controls/tooltip/map-tooltip.d.ts +3 -0
- package/views/dist/controls/tooltip/map-tooltip.js +5 -0
- package/views/dist/controls/tooltip/tokens.d.ts +75 -0
- package/views/dist/controls/tooltip/tokens.js +21 -0
- package/views/dist/controls/tooltip/tooltip.d.ts +54 -0
- package/views/dist/controls/tooltip/tooltip.js +78 -0
- package/views/dist/controls/tooltip.css +94 -0
- package/views/dist/grid/chrome/GridTable.js +21 -19
- package/views/dist/grid/chrome/grid-caret-keys.d.ts +7 -0
- package/views/dist/grid/chrome/grid-caret-keys.js +22 -0
- package/views/dist/grid/chrome/grid-row-window.js +3 -0
- package/views/dist/grid/chrome/useGridColumnLayout.d.ts +4 -1
- package/views/dist/grid/chrome/useGridColumnLayout.js +17 -2
- package/views/dist/grid/chrome/useGridFittedWidths.d.ts +32 -0
- package/views/dist/grid/chrome/useGridFittedWidths.js +59 -0
- package/views/dist/grid/chrome/useGridKeyboard.js +3 -0
- package/views/dist/looks/index.d.ts +16 -0
- package/views/dist/looks/index.js +16 -0
- package/views/dist/looks/looks.d.ts +10 -9
- package/views/dist/looks/pieces.js +38 -2
- package/views/dist/model/column-schema.d.ts +3 -2
- package/views/dist/model/column-state.d.ts +11 -1
- package/views/dist/model/column-state.js +8 -2
- package/views/dist/styles.css +2362 -7
- package/views/dist/styles.unlayered.css +2362 -7
- package/views/docs/contract.md +5 -97
- package/views/docs/controls/button.md +93 -0
- package/views/docs/controls/checkbox.md +38 -0
- package/views/docs/controls/field.md +26 -0
- package/views/docs/controls/glass-button.md +37 -0
- package/views/docs/controls/inline-input.md +27 -0
- package/views/docs/controls/input.md +48 -0
- package/views/docs/controls/kbd.md +17 -0
- package/views/docs/controls/list.md +40 -0
- package/views/docs/controls/menu-list.md +52 -0
- package/views/docs/controls/number-field.md +17 -0
- package/views/docs/controls/option.md +61 -0
- package/views/docs/controls/phone-header.md +20 -0
- package/views/docs/controls/popover.md +26 -0
- package/views/docs/controls/scrollbar.md +16 -0
- package/views/docs/controls/sheet.md +41 -0
- package/views/docs/controls/spinner.md +19 -0
- package/views/docs/controls/status.md +107 -0
- package/views/docs/controls/switch.md +40 -0
- package/views/docs/controls/tag.md +21 -0
- package/views/docs/controls/toggle.md +19 -0
- package/views/docs/controls/tooltip.md +24 -0
- package/views/docs/getting-started.md +1 -1
- package/views/docs/reference/controls.md +213 -2
- package/views/docs/reference/looks.md +70 -3
- package/views/docs/reference/views.md +7 -2
|
@@ -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). Nothing picked wears each option's `def`, My preset's pick, which no look need match whole.
|
|
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`, My preset's pick, 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`.
|
|
@@ -17,18 +17,85 @@ Import from `viewkitjs/views/looks` to pick a piece's look by name: each piece's
|
|
|
17
17
|
- `lookPicks` — `lookPicks(piece, id)`: a look's picks by its id, or `undefined` for an id the piece has no look by.
|
|
18
18
|
- `lookWorn` — `lookWorn(piece, picks, ids)`: the named options' values from a set of picks, each its default when missing or unknown.
|
|
19
19
|
- `lookWornOf` — `lookWornOf(piece, element, ids)`: the same, read from the closest frame round `element` carrying each option's attribute; with `null`, or outside any frame, the defaults.
|
|
20
|
-
- `LOOKS` — every piece that declares looks, in a list, each found by its `id`: the grid,
|
|
20
|
+
- `LOOKS` — every piece that declares looks, in a list, each found by its `id`: the grid, then each default control that has looks.
|
|
21
21
|
|
|
22
22
|
## The controls'
|
|
23
23
|
|
|
24
24
|
The default controls' options and looks (the controls themselves: [`viewkitjs/views/controls`](controls.md)), each worn
|
|
25
|
-
on a frame round the controls as `data
|
|
25
|
+
on a frame round the controls as `data-<piece>-*`, which each control's stylesheet reads.
|
|
26
|
+
|
|
27
|
+
<!-- One block per lane of control moves, each opened by its comment: a move adds its controls' lines inside its own block alone. -->
|
|
28
|
+
|
|
29
|
+
<!-- The actions: the Button, the Spinner -->
|
|
26
30
|
|
|
27
31
|
- `BUTTON_LOOKS` — the Button's: 7 options (`radius`, a scale from `xs` to `full`; `smoothing`; `depth`; `hover`; `press`; `soft`; `weight`) and four looks, `classic` (every option's default), `keycap`, `pill` and `soft-lift`.
|
|
28
32
|
- `ButtonLookOptionId` — the Button's option ids.
|
|
29
33
|
- `SPINNER_LOOKS` — the Spinner's: 6 options (`kind`, `breath`, `line`, `track`, `bars`, `loading`, the four in the middle meaning nothing under some kinds) and thirteen looks, from `arc` to `pulse`.
|
|
30
34
|
- `SpinnerLookOptionId` — the Spinner's option ids.
|
|
31
35
|
|
|
36
|
+
<!-- The popups: the Popover, the bottom Sheet, the Tooltip, and what they stand on -->
|
|
37
|
+
|
|
38
|
+
- `KBD_LOOKS` — the Kbd's: one option, `smoothing` (`app`, following the corner-smoothing token; `smooth`; `round`), no looks.
|
|
39
|
+
- `KbdLookOptionId` — the Kbd's option ids.
|
|
40
|
+
- `TOOLTIP_LOOKS` — the Tooltip's: one option, `arrow` (`none`, `soft`), no looks.
|
|
41
|
+
- `TooltipLookOptionId` — the Tooltip's option ids.
|
|
42
|
+
- `GLASS_BUTTON_LOOKS` — the Glass button's: one option, `pair` (`separate`, `together`), no looks.
|
|
43
|
+
- `GlassButtonLookOptionId` — the Glass button's option ids.
|
|
44
|
+
- `POPOVER_LOOKS` — the Popover's: 6 options, each a computer's (`corners`, a scale from `lg` to `2xl`; `smoothing`; `shadow`, a scale from `none` to `xl`; `edge`; `padding`; `gap`), no looks.
|
|
45
|
+
- `PopoverLookOptionId` — the Popover's option ids.
|
|
46
|
+
|
|
47
|
+
- `PHONE_HEADER_LOOKS` — the phone header's: one option, `surface` (`glass`, `flat`), no looks; the Glass button group and the Sheet's head read it too.
|
|
48
|
+
- `PhoneHeaderLookOptionId` — the phone header's option ids.
|
|
49
|
+
|
|
50
|
+
- `SHEET_LOOKS` — the Sheet's: 6 options (`spring`; `corners`, a scale from `lg` to `5xl`; `smoothing`; `margin`, a scale from `4` to `12`; `padding`; `dim`), no looks.
|
|
51
|
+
- `SheetLookOptionId` — the Sheet's option ids.
|
|
52
|
+
|
|
53
|
+
<!-- The boxes: the Input, the inline input, the Field, the Toggle, the number field, the Checkbox -->
|
|
54
|
+
|
|
55
|
+
- `INPUT_LOOKS` — the Input's: 7 options (`radius`, a scale from `xs` to `full`; `smoothing`; `style`; `depth`; `hover`; `focus`; `error`; corners, smoothing and focus meaning nothing under the underline) and five looks, `classic` (every option's default), `soft`, `line`, `pill` and `inset`. Every field drawn as the Input wears them.
|
|
56
|
+
- `InputLookOptionId` — the Input's option ids.
|
|
57
|
+
- `InputOwnLook` — a box's own look: the Input's options on one box, whole, and the values only an own look takes (`ground`, `pad`, `corner`, `words`, `lines`, `keep`; `hover: "none"`, `focus: "within"`). It may change before 1.0.
|
|
58
|
+
- `InputPicks` — some of the Input's options' picks.
|
|
59
|
+
- `InputGround` — an own look's ground: `input`, `overlay`.
|
|
60
|
+
- `InputPad` — where an own look's words start: `field`, `edge`.
|
|
61
|
+
- `InputCorner` — an own look's corners: `squircle`, `round`.
|
|
62
|
+
- `InputWords` — an own look's words: `code`.
|
|
63
|
+
- `inputAttrs` — `inputAttrs(picks)`: the Input's options as attributes, every option written, one not picked at its default.
|
|
64
|
+
- `inputOwnAttrs` — `inputOwnAttrs(look)`: an own look's attributes, on the box, beside `data-input-own`.
|
|
65
|
+
- `inputFrameAttrs` — `inputFrameAttrs(look)`: the same, on a frame, so every field inside draws as that look draws its own box.
|
|
66
|
+
- `kindLook` — `kindLook(chrome, look)`: a box's own look under its kind (Soft lays the Soft look under it).
|
|
67
|
+
- `attioBox` — `attioBox(phone)`: the labelled box's own look, its computer form keeping its own size on a phone.
|
|
68
|
+
- `INLINE_INPUT_LOOKS` — the inline input's: 4 options (`edge`, `corners` from `none` to `full`, `ground`, `tint` from 10% to 100% under the tint ground) and three looks, `attio`, `mihais` and `tinted`. Nothing picked is the line, `md` corners, on a 20% tint, which no look matches.
|
|
69
|
+
- `InlineInputLookOptionId` — its option ids.
|
|
70
|
+
- `FIELD_LOOKS` — Field rows', the phone's: 5 options (`rows-cards`, `rows-edge`, `rows-height`, `rows-label`, `rows-lines`) and three looks, `card` (every option's default), `each` and `rows`.
|
|
71
|
+
- `FieldLookOptionId` — its option ids.
|
|
72
|
+
- `FieldRowsLook` — a card's own look, each option without its `rows-`.
|
|
73
|
+
- `fieldRowsAttrs` — `fieldRowsAttrs(look)`: a card's own look as its attributes.
|
|
74
|
+
- `TOGGLE_LOOKS` — the Toggle's: 1 option (`mark`, a filled icon's colour) and three looks, `brand` (the default), `amber` and `text`.
|
|
75
|
+
- `ToggleLookOptionId` — its option ids.
|
|
76
|
+
- `CHECKBOX_LOOKS` — the Checkbox's: 1 option (`smoothing`) and no looks.
|
|
77
|
+
- `CheckboxLookOptionId` — its option ids.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<!-- The rows: the Option, the Tag, the Status, the Switch, the menu list -->
|
|
81
|
+
|
|
82
|
+
- `OPTION_LOOKS` — the Option's: 5 options (`colour`, how a coloured Option draws its colour; `height`, a scale from `20` to `24`; `radius`, a scale from `xs` to `full`; `smoothing`; `edge`) and five looks, `none`, `dot`, `pill`, `flat` and `shadcn`.
|
|
83
|
+
- `OptionLookOptionId` — the Option's option ids.
|
|
84
|
+
- `OptionColour` — a value's own colour, which an Option carries and its `colour` option draws: `blue`, `green`, `amber`, `red`, `purple`, `pink`, `teal` or `grey`.
|
|
85
|
+
- `optionColours` — every `OptionColour`, in order.
|
|
86
|
+
- `TAG_LOOKS` — the Tag's: 1 option (`smoothing`) and no looks.
|
|
87
|
+
- `TagLookOptionId` — the Tag's option ids.
|
|
88
|
+
- `STATUS_LOOKS` — the Status's: 4 options (`mark`, `shape`, `colour`, `path`) and eight looks, from `today` to `monday`.
|
|
89
|
+
- `StatusLookOptionId` — the Status's option ids.
|
|
90
|
+
- `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`.
|
|
91
|
+
- `SwitchLookOptionId` — the Switch's option ids.
|
|
92
|
+
- `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.
|
|
93
|
+
- `MenuListLookOptionId` — the menu list's option ids.
|
|
94
|
+
|
|
95
|
+
<!-- The picker's: the Menu, the Select, the Avatar -->
|
|
96
|
+
|
|
97
|
+
<!-- The panels': the Pane, the toolbar button, the Radio, the Modal, the alert dialog, the Toast, the Collapsible, the Alert, the Notice -->
|
|
98
|
+
|
|
32
99
|
## The grid's
|
|
33
100
|
|
|
34
101
|
- `GRID_LOOKS` — the grid's options and looks: 25 options (`header`, `lines`, `columns`, `density`, `phone`, `name`, `edge`, `boxes`, `icon`, `picked`, `cell`, `corners`, `hover`, `frame`, `groups`, `names`, `phones`, `typed`, `figures`, `width`, `more`, `wait`, `foot`, `add`, `picking`) and two looks, `attio` (every option's default) and `portal` (ViewKit's own grid, as the portal draws it).
|
|
@@ -28,7 +28,9 @@ Guide: [the provider](../guides/the-provider.md).
|
|
|
28
28
|
- `VkInternalMark` — one member of `VK_INTERNAL_MARKS`.
|
|
29
29
|
- `VK_CONTROL_TOKENS` — every name ViewKit's default controls (`viewkitjs/views/controls`) read, each with its `kind` (`colour`, `shadow`, `size` or `motion`): all optional, the ready stylesheet declaring each at the Outright look's value, and each standing for the Outright token [the controls' tokens](../contract.md#the-controls-tokens) names.
|
|
30
30
|
- `VkControlToken` — one name of `VK_CONTROL_TOKENS`.
|
|
31
|
-
- `
|
|
31
|
+
- `VK_CONTROL_TOKENS_BY_PIECE` — each control's own list, by its piece: the names its stylesheet reads, a name two controls read in both, one kind and one token.
|
|
32
|
+
- `ControlToken` — one name a control reads: `name`, `kind` and `outright`, the Outright token it stands for.
|
|
33
|
+
- `VK_CONTROL_PRIVATE_FAMILIES` — the prefixes of the controls' own machinery, set and read by a control alone (the smooth corner's, the pressing room's, and each control's own): not public, and your app neither sets nor reads them.
|
|
32
34
|
- `COMPONENT_NAMES` — the primitives your app hands in through the provider: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon` and `Markdown` ([the components map](../contract.md#the-components-map)).
|
|
33
35
|
- `ComponentName` — one member of `COMPONENT_NAMES`.
|
|
34
36
|
- `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Command` (reached without one, it throws an error naming it), `Picker` (without one, the lists draw from `Command`), `LinksBody` (without one, the set editor of a relation whose field declares `links` opens `Picker`, else its own list), `Calendar` (reached without one, it throws an error naming it), `DateBody` (without one, the date editor draws its own around `Calendar`), `PartsBody` (without one, the name, place and range editors draw their own boxes), `ValuesBody` (without one, the value list editor draws its own rows), `TextBody` (without one, the text editors draw their own box) and `NumberBody` (without one, the number editors draw their own box), `SortBody` (without one, the sort pill opens ViewKit's own sort editor), `FilterBody` (without one, an advanced filter's pill and the phone's Filter open ViewKit's own filter editor), `FieldsBody` (without one, ViewKit's own sort and filter field lists), `FilterPartBody` (without one, a filter rule's way and value open ViewKit's ways menu and value body), `RowsWait` (without one, a grid waiting for new rows draws Loading in place of its body), `QuickFiltersBody` (without one, the quick filters' button opens ViewKit's own quick-filters panel), `ViewsListBody` (without one, the view picker opens ViewKit's own list of views), `GroupBody` (without one, Customize's Group opens ViewKit's own group pages), `CustomizeBody` (without one, Options opens ViewKit's own Customize) and `SearchField` (without one, the toolbar's search draws its own field) ([the components map](../contract.md#the-components-map)).
|
|
@@ -169,7 +171,10 @@ What a person changes about the columns (which are shown, in what order, at what
|
|
|
169
171
|
- `toggleColumnHidden` — returns a new `ListColumnState` with a column shown or hidden. A column hidden by default is toggled through `visible`, any other through `hidden`, the same key `isColumnHidden` reads back for that view; an emptied list is dropped.
|
|
170
172
|
- `resolveColumnOrder` — the declared columns in a stored order: the ids the order names first (an unknown id dropped), and each column the order leaves out placed after its nearest declared neighbour that is placed. An empty order returns the declaration.
|
|
171
173
|
- `resolveVisibleColumns` — the columns a view draws: in the state's order, without the hidden ones, and never none (the first column stays when every column is hidden).
|
|
172
|
-
- `resolveColumnWidths` — each visible column's width by id: its stored width, held to its bounds,
|
|
174
|
+
- `resolveColumnWidths` — each visible column's width by id: its stored width, held to its bounds, else its declared `width`, else the width the grid fitted it to (its third argument, by id), else `LIST_DEFAULT_WIDTH`.
|
|
175
|
+
- `fittedColumnWidth` — the width a column with no `width` of its own starts at, from its widest drawn value and its header: never narrower than the header, at most `LIST_FITTED_MAX_WIDTH`, held to the column's bounds.
|
|
176
|
+
- `LIST_DEFAULT_WIDTH` — 160: where a column with no `width` stands until the grid has fitted it, and where a pinned one stays on a phone.
|
|
177
|
+
- `LIST_FITTED_MAX_WIDTH` — 320: the widest a fitted column starts.
|
|
173
178
|
- `clampColumnWidth` — a width held between a column's `grid.minWidth` (60 pixels when it states none) and its `grid.maxWidth`, rounded to a whole pixel.
|
|
174
179
|
- `ListDensity` — the density every view shares: `compact`, `default` or `spacious`. Each view spends it its own way; the grid scales its pixels, the rows views widen their padding.
|
|
175
180
|
- `prettifyOptionValue` — a stored code made readable: underscores and hyphens become spaces and each word starts with a capital (`on_hold` reads `On Hold`).
|