viewkitjs 0.21.0 → 0.23.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 +49 -0
- package/MIGRATION.md +1 -1
- package/README.md +1 -1
- package/fields/dist/conventions.d.ts +15 -3
- package/fields/dist/conventions.js +25 -0
- package/fields/dist/design/category-colors.d.ts +12 -5
- package/fields/dist/design/category-colors.js +7 -7
- package/fields/dist/query/buckets.js +42 -35
- package/fields/dist/query/date.js +2 -13
- package/fields/docs/guides/conventions.md +1 -1
- package/fields/docs/guides/options.md +2 -1
- package/fields/docs/reference/design-category-colors.md +2 -2
- package/fields/docs/reference/fields.md +1 -1
- package/package.json +13 -1
- package/views/dist/atoms/tones.js +7 -7
- package/views/dist/contract.d.ts +6 -1
- package/views/dist/contract.js +1 -0
- package/views/dist/controls/atoms.d.ts +8 -0
- package/views/dist/controls/atoms.js +8 -0
- package/views/dist/controls/button/button.d.ts +40 -0
- package/views/dist/controls/button/button.js +40 -0
- package/views/dist/controls/button/looks.d.ts +4 -0
- package/views/dist/controls/button/looks.js +20 -0
- package/views/dist/controls/button/map-button.d.ts +11 -0
- package/views/dist/controls/button/map-button.js +20 -0
- package/views/dist/controls/button/own-look.d.ts +59 -0
- package/views/dist/controls/button/own-look.js +33 -0
- package/views/dist/controls/button/tokens.d.ts +351 -0
- package/views/dist/controls/button/tokens.js +90 -0
- package/views/dist/controls/button.css +530 -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 +14 -0
- package/views/dist/controls/controls.js +14 -0
- 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/index.d.ts +37 -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/popup-host.d.ts +7 -0
- package/views/dist/controls/internal/popup-host.js +10 -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/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 +372 -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 +220 -0
- package/views/dist/controls/smooth.css +101 -0
- package/views/dist/controls/spinner/looks.d.ts +4 -0
- package/views/dist/controls/spinner/looks.js +32 -0
- package/views/dist/controls/spinner/spinner.d.ts +23 -0
- package/views/dist/controls/spinner/spinner.js +16 -0
- package/views/dist/controls/spinner/tokens.d.ts +55 -0
- package/views/dist/controls/spinner/tokens.js +16 -0
- package/views/dist/controls/spinner.css +147 -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 +45 -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/display/date.js +15 -2
- package/views/dist/grid/chrome/GridTable.js +21 -19
- 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 +29 -0
- package/views/dist/grid/chrome/useGridFittedWidths.js +46 -0
- package/views/dist/looks/index.d.ts +17 -0
- package/views/dist/looks/index.js +17 -0
- package/views/dist/looks/looks.d.ts +2 -1
- package/views/dist/looks/pieces.js +37 -1
- 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/panels/react/views-row/FoldingViewRow.js +8 -8
- package/views/dist/styles.css +2748 -56
- package/views/dist/styles.unlayered.css +2765 -56
- package/views/docs/contract.md +39 -8
- 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/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/guides/the-provider.md +1 -1
- package/views/docs/index.md +1 -0
- package/views/docs/install.md +2 -0
- package/views/docs/reference/controls.md +207 -0
- package/views/docs/reference/looks.md +77 -2
- package/views/docs/reference/views.md +10 -2
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# The Status's tokens
|
|
2
|
+
|
|
3
|
+
Every name the Status's stylesheet (`status.css`) reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
|
|
4
|
+
|
|
5
|
+
| name | kind | the Outright token | default |
|
|
6
|
+
| ---- | ---- | ------------------ | ------- |
|
|
7
|
+
| `--vk-amber-700` | colour | `amber-700` | `hsl(25 92% 41%)` |
|
|
8
|
+
| `--vk-blue-700` | colour | `blue-700` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
9
|
+
| `--vk-border` | colour | `border` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
|
|
10
|
+
| `--vk-border-accent` | colour | `border-brand` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
|
|
11
|
+
| `--vk-border-bold` | colour | `border-bold` | `hsl(210 1% 82%)` · dark `hsl(210 2% 26.5%)` |
|
|
12
|
+
| `--vk-border-danger` | colour | `border-danger` | `hsl(3 87% 68%)` · dark `hsl(1 55% 46.5%)` |
|
|
13
|
+
| `--vk-border-info` | colour | `border-information` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
|
|
14
|
+
| `--vk-border-success` | colour | `border-success` | `hsl(149 43% 44.5%)` · dark `hsl(153 64% 32%)` |
|
|
15
|
+
| `--vk-border-warning` | colour | `border-warning` | `hsl(20 63% 57.5%)` · dark `hsl(22 74% 36%)` |
|
|
16
|
+
| `--vk-brand` | colour | `background-brand-bold` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
17
|
+
| `--vk-brand-100` | colour | `brand-100` | `hsl(218 100% 98%)` · dark `hsl(218 15% 10%)` |
|
|
18
|
+
| `--vk-brand-200` | colour | `brand-200` | `hsl(218 100% 94%)` · dark `hsl(218 32% 14.5%)` |
|
|
19
|
+
| `--vk-brand-400` | colour | `brand-400` | `hsl(218 97% 82%)` · dark `hsl(219 55% 29%)` |
|
|
20
|
+
| `--vk-brand-500` | colour | `brand-500` | `hsl(218 94% 74.5%)` · dark `hsl(219 61% 36.5%)` |
|
|
21
|
+
| `--vk-brand-600` | colour | `brand-600` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
|
|
22
|
+
| `--vk-brand-700` | colour | `brand-700` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
23
|
+
| `--vk-brand-800` | colour | `brand-800` | `hsl(219 70% 46.5%)` · dark `hsl(219 95% 64%)` |
|
|
24
|
+
| `--vk-brand-1000` | colour | `brand-1000` | `hsl(219 72% 29%)` · dark `hsl(218 100% 81%)` |
|
|
25
|
+
| `--vk-brand-subtler` | colour | `background-brand-subtler` | `hsl(218 100% 94%)` · dark `hsl(218 32% 14.5%)` |
|
|
26
|
+
| `--vk-brand-subtlest` | colour | `background-brand-subtlest` | `hsl(218 100% 98%)` · dark `hsl(218 15% 10%)` |
|
|
27
|
+
| `--vk-danger` | colour | `text-danger` | `hsl(0 81% 58%)` |
|
|
28
|
+
| `--vk-danger-bold` | colour | `background-danger-bold` | `hsl(0 81% 58%)` |
|
|
29
|
+
| `--vk-danger-subtler` | colour | `background-danger-subtler` | `hsl(6 100% 94%)` · dark `hsl(6 27% 14.5%)` |
|
|
30
|
+
| `--vk-danger-subtlest` | colour | `background-danger-subtlest` | `hsl(6 100% 98%)` · dark `hsl(6 13% 10%)` |
|
|
31
|
+
| `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
|
|
32
|
+
| `--vk-fg-accent` | colour | `text-brand` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
33
|
+
| `--vk-fg-inverse` | colour | `text-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 95%)` |
|
|
34
|
+
| `--vk-fg-on-brand` | colour | `text-brand-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 5%)` |
|
|
35
|
+
| `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
|
|
36
|
+
| `--vk-fg-subtlest` | colour | `text-subtlest` | `hsl(210 1% 53.5%)` · dark `hsl(210 3% 53%)` |
|
|
37
|
+
| `--vk-fg-warning-inverse` | colour | `text-warning-inverse` | `hsl(210 6% 7%)` · dark `hsl(210 8% 5%)` |
|
|
38
|
+
| `--vk-green-700` | colour | `green-700` | `hsl(158 98% 26%)` · dark `hsl(158 98% 34%)` |
|
|
39
|
+
| `--vk-ground` | colour | `surface` | `hsl(0 0% 100%)` · dark `hsl(210 6% 7%)` |
|
|
40
|
+
| `--vk-info` | colour | `text-information` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
41
|
+
| `--vk-info-bold` | colour | `background-information-bold` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
42
|
+
| `--vk-info-subtler` | colour | `background-information-subtler` | `hsl(218 100% 94%)` · dark `hsl(218 32% 14.5%)` |
|
|
43
|
+
| `--vk-info-subtlest` | colour | `background-information-subtlest` | `hsl(218 100% 98%)` · dark `hsl(218 15% 10%)` |
|
|
44
|
+
| `--vk-label-amber` | colour | `label-amber` | `hsl(25 92% 41%)` |
|
|
45
|
+
| `--vk-label-amber-edge` | colour | `label-amber-edge` | `hsl(20 68% 77%)` · dark `hsl(20 54% 24%)` |
|
|
46
|
+
| `--vk-label-amber-fill` | colour | `label-amber-fill` | `hsl(19 72% 92.5%)` · dark `hsl(20 42% 18.5%)` |
|
|
47
|
+
| `--vk-label-amber-soft` | colour | `label-amber-soft` | `hsl(19 74% 97.5%)` · dark `hsl(19 13% 10%)` |
|
|
48
|
+
| `--vk-label-amber-strong` | colour | `label-amber-strong` | `hsl(23 85% 29%)` · dark `hsl(20 90% 76.5%)` |
|
|
49
|
+
| `--vk-label-blue` | colour | `label-blue` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
50
|
+
| `--vk-label-blue-edge` | colour | `label-blue-edge` | `hsl(218 97% 82%)` · dark `hsl(219 55% 29%)` |
|
|
51
|
+
| `--vk-label-blue-fill` | colour | `label-blue-fill` | `hsl(218 100% 94%)` · dark `hsl(219 46% 21%)` |
|
|
52
|
+
| `--vk-label-blue-soft` | colour | `label-blue-soft` | `hsl(218 100% 98%)` · dark `hsl(218 15% 10%)` |
|
|
53
|
+
| `--vk-label-blue-strong` | colour | `label-blue-strong` | `hsl(219 70% 38%)` · dark `hsl(218 100% 81%)` |
|
|
54
|
+
| `--vk-label-green` | colour | `label-green` | `hsl(158 98% 26%)` · dark `hsl(158 98% 34%)` |
|
|
55
|
+
| `--vk-label-green-edge` | colour | `label-green-edge` | `hsl(145 41% 71.5%)` · dark `hsl(148 37% 21%)` |
|
|
56
|
+
| `--vk-label-green-fill` | colour | `label-green-fill` | `hsl(143 41% 91%)` · dark `hsl(146 27% 16.5%)` |
|
|
57
|
+
| `--vk-label-green-soft` | colour | `label-green-soft` | `hsl(142 41% 97%)` · dark `hsl(143 7% 9.5%)` |
|
|
58
|
+
| `--vk-label-green-strong` | colour | `label-green-strong` | `hsl(156 87% 21%)` · dark `hsl(146 52% 73.5%)` |
|
|
59
|
+
| `--vk-label-pink` | colour | `label-pink` | `hsl(335 73% 49.5%)` · dark `hsl(335 73% 57.5%)` |
|
|
60
|
+
| `--vk-label-pink-edge` | colour | `label-pink-edge` | `hsl(343 88% 82.5%)` · dark `hsl(339 42% 28%)` |
|
|
61
|
+
| `--vk-label-pink-fill` | colour | `label-pink-fill` | `hsl(345 100% 94.5%)` · dark `hsl(341 34% 20.5%)` |
|
|
62
|
+
| `--vk-label-pink-soft` | colour | `label-pink-soft` | `hsl(345 100% 98%)` · dark `hsl(344 11% 10%)` |
|
|
63
|
+
| `--vk-label-pink-strong` | colour | `label-pink-strong` | `hsl(336 59% 37.5%)` · dark `hsl(342 100% 83.5%)` |
|
|
64
|
+
| `--vk-label-purple` | colour | `label-purple` | `hsl(260 100% 64.5%)` · dark `hsl(260 100% 69%)` |
|
|
65
|
+
| `--vk-label-purple-edge` | colour | `label-purple-edge` | `hsl(251 100% 86.5%)` · dark `hsl(256 41% 32.5%)` |
|
|
66
|
+
| `--vk-label-purple-fill` | colour | `label-purple-fill` | `hsl(249 100% 95.5%)` · dark `hsl(254 34% 23.5%)` |
|
|
67
|
+
| `--vk-label-purple-soft` | colour | `label-purple-soft` | `hsl(248 100% 98.5%)` · dark `hsl(249 11% 10.5%)` |
|
|
68
|
+
| `--vk-label-purple-strong` | colour | `label-purple-strong` | `hsl(259 53% 44.5%)` · dark `hsl(251 100% 86%)` |
|
|
69
|
+
| `--vk-label-red` | colour | `label-red` | `hsl(0 81% 58%)` |
|
|
70
|
+
| `--vk-label-red-edge` | colour | `label-red-edge` | `hsl(5 99% 82%)` · dark `hsl(4 45% 28%)` |
|
|
71
|
+
| `--vk-label-red-fill` | colour | `label-red-fill` | `hsl(6 100% 94%)` · dark `hsl(5 37% 20.5%)` |
|
|
72
|
+
| `--vk-label-red-soft` | colour | `label-red-soft` | `hsl(6 100% 98%)` · dark `hsl(6 13% 10%)` |
|
|
73
|
+
| `--vk-label-red-strong` | colour | `label-red-strong` | `hsl(0 59% 39%)` · dark `hsl(6 100% 83%)` |
|
|
74
|
+
| `--vk-label-teal` | colour | `label-teal` | `hsl(192 87% 32%)` · dark `hsl(192 87% 40%)` |
|
|
75
|
+
| `--vk-label-teal-edge` | colour | `label-teal-edge` | `hsl(196 52% 74.5%)` · dark `hsl(195 42% 22.5%)` |
|
|
76
|
+
| `--vk-label-teal-fill` | colour | `label-teal-fill` | `hsl(196 52% 91.5%)` · dark `hsl(196 32% 17.5%)` |
|
|
77
|
+
| `--vk-label-teal-soft` | colour | `label-teal-soft` | `hsl(196 52% 97%)` · dark `hsl(196 8% 9.5%)` |
|
|
78
|
+
| `--vk-label-teal-strong` | colour | `label-teal-strong` | `hsl(193 82% 26%)` · dark `hsl(196 67% 75.5%)` |
|
|
79
|
+
| `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
80
|
+
| `--vk-neutral-hovered` | colour | `background-neutral-hovered` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
|
|
81
|
+
| `--vk-overlay` | colour | `surface-overlay` | `hsl(0 0% 100%)` · dark `hsl(226 10% 10%)` |
|
|
82
|
+
| `--vk-pink-700` | colour | `pink-700` | `hsl(335 73% 49.5%)` · dark `hsl(335 73% 57.5%)` |
|
|
83
|
+
| `--vk-purple-700` | colour | `purple-700` | `hsl(260 100% 64.5%)` · dark `hsl(260 100% 69%)` |
|
|
84
|
+
| `--vk-raised` | colour | `surface-raised` | `hsl(0 0% 100%)` · dark `hsl(226 10% 10%)` |
|
|
85
|
+
| `--vk-red-700` | colour | `red-700` | `hsl(0 81% 58%)` |
|
|
86
|
+
| `--vk-success` | colour | `text-success` | `hsl(158 98% 26%)` · dark `hsl(158 98% 34%)` |
|
|
87
|
+
| `--vk-success-bold` | colour | `background-success-bold` | `hsl(158 98% 26%)` · dark `hsl(158 98% 34%)` |
|
|
88
|
+
| `--vk-success-subtler` | colour | `background-success-subtler` | `hsl(143 41% 91%)` · dark `hsl(145 17% 12.5%)` |
|
|
89
|
+
| `--vk-success-subtlest` | colour | `background-success-subtlest` | `hsl(142 41% 97%)` · dark `hsl(143 7% 9.5%)` |
|
|
90
|
+
| `--vk-teal-700` | colour | `teal-700` | `hsl(192 87% 32%)` · dark `hsl(192 87% 40%)` |
|
|
91
|
+
| `--vk-warning` | colour | `text-warning` | `hsl(25 92% 41%)` |
|
|
92
|
+
| `--vk-warning-bold` | colour | `background-warning-bold` | `hsl(25 92% 41%)` |
|
|
93
|
+
| `--vk-warning-subtler` | colour | `background-warning-subtler` | `hsl(19 72% 92.5%)` · dark `hsl(20 29% 13.5%)` |
|
|
94
|
+
| `--vk-warning-subtlest` | colour | `background-warning-subtlest` | `hsl(19 74% 97.5%)` · dark `hsl(19 13% 10%)` |
|
|
95
|
+
| `--vk-border-width` | size | `border-width` | `1px` |
|
|
96
|
+
| `--vk-font-size-base` | size | `text-base` | `16px` |
|
|
97
|
+
| `--vk-font-size-sm` | size | `text-sm` | `14px` |
|
|
98
|
+
| `--vk-font-size-xs` | size | `text-xs` | `12px` |
|
|
99
|
+
| `--vk-font-weight-bold` | size | `font-weight-bold` | `700` |
|
|
100
|
+
| `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
|
|
101
|
+
| `--vk-font-weight-normal` | size | `font-weight-normal` | `400` |
|
|
102
|
+
| `--vk-font-weight-semibold` | size | `font-weight-semibold` | `600` |
|
|
103
|
+
| `--vk-radius-full` | size | `radius-full` | `9999px` |
|
|
104
|
+
| `--vk-radius-sm` | size | `radius-sm` | `5px` |
|
|
105
|
+
| `--vk-radius-xs` | size | `radius-xs` | `2.5px` |
|
|
106
|
+
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
107
|
+
| `--vk-tracking-wide` | size | `tracking-wide` | `0.025em` |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# The Switch's tokens
|
|
2
|
+
|
|
3
|
+
Every name the Switch's stylesheet (`switch.css`) reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
|
|
4
|
+
|
|
5
|
+
| name | kind | the Outright token | default |
|
|
6
|
+
| ---- | ---- | ------------------ | ------- |
|
|
7
|
+
| `--vk-border-bold` | colour | `border-bold` | `hsl(210 1% 82%)` · dark `hsl(210 2% 26.5%)` |
|
|
8
|
+
| `--vk-border-brand` | colour | `border-focused` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
|
|
9
|
+
| `--vk-border-danger` | colour | `border-danger` | `hsl(3 87% 68%)` · dark `hsl(1 55% 46.5%)` |
|
|
10
|
+
| `--vk-border-input` | colour | `border-input` | `hsl(220 3% 86%)` · dark `hsl(220 4% 22%)` |
|
|
11
|
+
| `--vk-border-input-hovered` | colour | `border-input-hovered` | `hsl(210 1% 82%)` · dark `hsl(210 2% 26.5%)` |
|
|
12
|
+
| `--vk-border-subtle` | colour | `border-subtle` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
13
|
+
| `--vk-brand` | colour | `background-brand-bold` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
14
|
+
| `--vk-brand-hovered` | colour | `background-brand-bold-hovered` | `hsl(219 70% 46.5%)` · dark `hsl(219 95% 64%)` |
|
|
15
|
+
| `--vk-brand-subtler` | colour | `background-brand-subtler` | `hsl(218 100% 94%)` · dark `hsl(218 32% 14.5%)` |
|
|
16
|
+
| `--vk-danger-bold` | colour | `background-danger-bold` | `hsl(0 81% 58%)` |
|
|
17
|
+
| `--vk-danger-bold-hovered` | colour | `background-danger-bold-hovered` | `hsl(0 59% 49%)` · dark `hsl(3 90% 66.5%)` |
|
|
18
|
+
| `--vk-fg-accent` | colour | `text-brand` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
19
|
+
| `--vk-fg-disabled` | colour | `text-disabled` | `hsl(210 1% 72%)` · dark `hsl(210 1% 37%)` |
|
|
20
|
+
| `--vk-fg-inverse` | colour | `text-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 95%)` |
|
|
21
|
+
| `--vk-fg-on-brand` | colour | `text-brand-inverse` | `hsl(0 0% 100%)` · dark `hsl(210 8% 5%)` |
|
|
22
|
+
| `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
|
|
23
|
+
| `--vk-ground` | colour | `surface` | `hsl(0 0% 100%)` · dark `hsl(210 6% 7%)` |
|
|
24
|
+
| `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
25
|
+
| `--vk-neutral-hovered` | colour | `background-neutral-hovered` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
|
|
26
|
+
| `--vk-shadow-md` | shadow | `shadow-md` | `0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)` |
|
|
27
|
+
| `--vk-shadow-sm` | shadow | `shadow-sm` | `0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)` |
|
|
28
|
+
| `--vk-shadow-xs` | shadow | `shadow-xs` | `0 1px 2px 0 rgb(0 0 0 / 0.05)` |
|
|
29
|
+
| `--vk-border-width` | size | `border-width` | `1px` |
|
|
30
|
+
| `--vk-focus-offset` | size | `focus-offset` | `2px` |
|
|
31
|
+
| `--vk-focus-width` | size | `focus-width` | `2px` |
|
|
32
|
+
| `--vk-font-weight-semibold` | size | `font-weight-semibold` | `600` |
|
|
33
|
+
| `--vk-radius-full` | size | `radius-full` | `9999px` |
|
|
34
|
+
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
35
|
+
| `--vk-duration-base` | motion | `duration-base` | `200ms` |
|
|
36
|
+
| `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
|
|
37
|
+
| `--vk-duration-slow` | motion | `duration-slow` | `300ms` |
|
|
38
|
+
| `--vk-ease-in-out` | motion | `ease-in-out` | `cubic-bezier(0.4, 0, 0.2, 1)` |
|
|
39
|
+
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
40
|
+
| `--vk-ease-spring` | motion | `ease-spring` | `cubic-bezier(0.34, 1.56, 0.64, 1)` |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# The Tag's tokens
|
|
2
|
+
|
|
3
|
+
Every name the Tag's stylesheet (`tag.css`) reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
|
|
4
|
+
|
|
5
|
+
| name | kind | the Outright token | default |
|
|
6
|
+
| ---- | ---- | ------------------ | ------- |
|
|
7
|
+
| `--vk-border-bold` | colour | `border-bold` | `hsl(210 1% 82%)` · dark `hsl(210 2% 26.5%)` |
|
|
8
|
+
| `--vk-border-brand` | colour | `border-focused` | `hsl(219 90% 65.5%)` · dark `hsl(219 66% 47%)` |
|
|
9
|
+
| `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
|
|
10
|
+
| `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
|
|
11
|
+
| `--vk-neutral-hovered` | colour | `background-neutral-hovered` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
|
|
12
|
+
| `--vk-border-width` | size | `border-width` | `1px` |
|
|
13
|
+
| `--vk-corner-smoothing` | size | `corner-smoothing` | `0.7` |
|
|
14
|
+
| `--vk-focus-width` | size | `focus-width` | `2px` |
|
|
15
|
+
| `--vk-font-size-xs` | size | `text-xs` | `12px` |
|
|
16
|
+
| `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
|
|
17
|
+
| `--vk-radius-md` | size | `radius-md` | `7.5px` |
|
|
18
|
+
| `--vk-radius-xs` | size | `radius-xs` | `2.5px` |
|
|
19
|
+
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
20
|
+
| `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
|
|
21
|
+
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# The Toggle's tokens
|
|
2
|
+
|
|
3
|
+
Every name `toggle.css` reads (beside the Button's `button.css`, which a toggle is drawn as), each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
|
|
4
|
+
|
|
5
|
+
| name | kind | the Outright token | default |
|
|
6
|
+
| ---- | ---- | ------------------ | ------- |
|
|
7
|
+
| `--vk-border` | colour | `border` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
|
|
8
|
+
| `--vk-border-danger` | colour | `border-danger` | `hsl(3 87% 68%)` · dark `hsl(1 55% 46.5%)` |
|
|
9
|
+
| `--vk-border-input` | colour | `border-input` | `hsl(220 3% 86%)` · dark `hsl(220 4% 22%)` |
|
|
10
|
+
| `--vk-brand` | colour | `background-brand-bold` | `hsl(219 87% 54%)` · dark `hsl(219 87% 59.5%)` |
|
|
11
|
+
| `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
|
|
12
|
+
| `--vk-fg-subtle` | colour | `text-subtle` | `hsl(0 0% 35%)` · dark `hsl(258 4% 72%)` |
|
|
13
|
+
| `--vk-ground` | colour | `surface` | `hsl(0 0% 100%)` · dark `hsl(210 6% 7%)` |
|
|
14
|
+
| `--vk-hovered` | colour | `surface-hovered` | `hsl(0 0% 96.5%)` · dark `hsl(210 4% 9.5%)` |
|
|
15
|
+
| `--vk-label-amber` | colour | `label-amber` | `hsl(25 92% 41%)` |
|
|
16
|
+
| `--vk-neutral` | colour | `background-neutral` | `hsl(0 0% 94%)` · dark `hsl(225 7% 11%)` |
|
|
17
|
+
| `--vk-neutral-hovered` | colour | `background-neutral-hovered` | `hsl(220 7% 90%)` · dark `hsl(225 7% 15%)` |
|
|
18
|
+
| `--vk-radius-full` | size | `radius-full` | `9999px` |
|
|
19
|
+
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# The Tooltip's tokens
|
|
2
|
+
|
|
3
|
+
Every name the Tooltip's stylesheet (`tooltip.css`) reads, each optional: the ready stylesheet declares it at the Outright look's value, and your app declares it to change it. Each stands for one Outright token, which an app on the Outright tokens declares it as. How the names are made, and the controls' other pages: [the controls' tokens](../contract.md#the-controls-tokens).
|
|
4
|
+
|
|
5
|
+
| name | kind | the Outright token | default |
|
|
6
|
+
| ---- | ---- | ------------------ | ------- |
|
|
7
|
+
| `--vk-fg` | colour | `text` | `hsl(210 6% 7%)` · dark `hsl(210 8% 95%)` |
|
|
8
|
+
| `--vk-ground` | colour | `surface` | `hsl(0 0% 100%)` · dark `hsl(210 6% 7%)` |
|
|
9
|
+
| `--vk-border-width` | size | `border-width` | `1px` |
|
|
10
|
+
| `--vk-corner-smoothing` | size | `corner-smoothing` | `0.7` |
|
|
11
|
+
| `--vk-duration-fast` | motion | `duration-fast` | `150ms` |
|
|
12
|
+
| `--vk-ease-out` | motion | `ease-out` | `cubic-bezier(0, 0, 0.2, 1)` |
|
|
13
|
+
| `--vk-font-size-2xs` | size | `text-2xs` | `10px` |
|
|
14
|
+
| `--vk-font-size-xs` | size | `text-xs` | `12px` |
|
|
15
|
+
| `--vk-line-height-xs` | size | `text-xs--line-height` | `1.3333` |
|
|
16
|
+
| `--vk-font-weight-medium` | size | `font-weight-medium` | `500` |
|
|
17
|
+
| `--vk-font-weight-normal` | size | `font-weight-normal` | `400` |
|
|
18
|
+
| `--vk-layer-popup` | size | `layer-popup` | `50` |
|
|
19
|
+
| `--vk-radius-md` | size | `radius-md` | `7.5px` |
|
|
20
|
+
| `--vk-radius-xs` | size | `radius-xs` | `2.5px` |
|
|
21
|
+
| `--vk-spacing` | size | `spacing` | `4px` |
|
|
22
|
+
| `--vk-tooltip-delay` | motion | `tooltip-delay` | `500ms` |
|
|
23
|
+
| `--vk-tooltip-warm` | motion | `tooltip-warm` | `300ms` |
|
|
24
|
+
| `--vk-toast-duration` | motion | `toast-duration` | `4000ms` |
|
|
@@ -68,7 +68,7 @@ const DEAL_BINDINGS = bindFields<Deal, typeof DEAL_FIELDS>(DEAL_FIELDS, {
|
|
|
68
68
|
|
|
69
69
|
## Make the columns
|
|
70
70
|
|
|
71
|
-
A column is what the grid draws: a binding plus what only the grid knows, such as its `id` and its starting width in pixels. `columnFrom` derives the column's type, options, format and whether it can be edited from the field and the binding.
|
|
71
|
+
A column is what the grid draws: a binding plus what only the grid knows, such as its `id` and its starting width in pixels. Leave the width out and the grid starts the column as wide as the values it first draws and its header need, up to 320 px; a width the person drags is kept over either. `columnFrom` derives the column's type, options, format and whether it can be edited from the field and the binding.
|
|
72
72
|
|
|
73
73
|
```tsx
|
|
74
74
|
const columns = [
|
|
@@ -87,7 +87,7 @@ The shapes are Base UI's, and the types promise three things:
|
|
|
87
87
|
- **An `anchor`, not a trigger child.** The popover and the menu open at an element, a ref to one, or a point (a right-click). Nothing is wrapped.
|
|
88
88
|
- **No `asChild`.** The tooltip is the one slot that wraps, and it takes the element it wraps as `children`.
|
|
89
89
|
|
|
90
|
-
So an app on Base UI wraps its own copies thinly, and an app on Radix maps the difference in its adapter. The package
|
|
90
|
+
So an app on Base UI wraps its own copies thinly, and an app on Radix maps the difference in its adapter. The package's own defaults are `CONTROLS`, from `viewkitjs/views/controls`, on Base UI, an optional peer: spread it first and your own controls after. Every other door depends on neither library.
|
|
91
91
|
|
|
92
92
|
### An adapter over Radix
|
|
93
93
|
|
package/views/docs/index.md
CHANGED
|
@@ -52,5 +52,6 @@ One page per door. Each lists every name the door exports.
|
|
|
52
52
|
- [`viewkitjs/views/selection`](reference/selection.md): a list's selection
|
|
53
53
|
- [`viewkitjs/views/grid`](reference/grid.md): the grid, its props and the helpers a host shares with it
|
|
54
54
|
- [`viewkitjs/views/looks`](reference/looks.md): a piece's options and looks, and the helpers that wear one ([guide](guides/looks.md))
|
|
55
|
+
- [`viewkitjs/views/controls`](reference/controls.md): ViewKit's default controls on Base UI, the Button and the Spinner, and `CONTROLS` for the components map
|
|
55
56
|
- [`viewkitjs/views/panels`](reference/panels.md): what a list's panels read and say, built from its settings, and the toolbar's arrangement, with no React
|
|
56
57
|
- [`viewkitjs/views/panels/react`](reference/panels-react.md): the panels as they draw, the toolbar's frame, its parts and the ready toolbar
|
package/views/docs/install.md
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
`@dnd-kit/utilities` are optional peers for the panels' parts that drag (the views row's pills, the sort's rules, the
|
|
11
11
|
Columns list, the group order), which the door loads with `import()` as it loads: install them if your app renders one. The drawn
|
|
12
12
|
panels' door (`viewkitjs/views/panels/react`) itself loads without them. ESM only, Node 20 or later.
|
|
13
|
+
`@base-ui/react` (1.6 or later) is an optional peer too: install it only to take ViewKit's default controls
|
|
14
|
+
(`CONTROLS`, from `viewkitjs/views/controls`) for the ones your components map leaves out.
|
|
13
15
|
|
|
14
16
|
2. **Import the stylesheet.** One line gives the rendering its whole look, with no Tailwind needed:
|
|
15
17
|
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# `viewkitjs/views/controls`
|
|
2
|
+
|
|
3
|
+
Import from `viewkitjs/views/controls` to draw ViewKit's default controls: the Outright kit's Button and Spinner, on Base UI. It is the one door that needs `@base-ui/react`, an optional peer (`^1.6.0`): an app that hands every control in its components map never imports it and never installs Base UI. Guide: [the components map](../contract.md#the-components-map).
|
|
4
|
+
|
|
5
|
+
## The defaults
|
|
6
|
+
|
|
7
|
+
- `CONTROLS` — the components map's defaults, for each control an app leaves out: each control below that fills a slot of the map. An app spreads it first and its own controls after, `components={{ ...CONTROLS, ...own }}`. Its `Button` draws ViewKit's buttons (`variant`, `size`) as the kit's Button's kinds and sizes, and stands a glyph handed before the words as the Button's icon.
|
|
8
|
+
- `leadingGlyph` — `leadingGlyph(children, glyphs)`: a glyph before a button's words (an svg, or one of the app's icons in `glyphs`) as `{ icon, label }`; a glyph alone, or another component, stays `{ label }`.
|
|
9
|
+
|
|
10
|
+
<!-- One block per lane of control moves, each opened by its comment: a move adds its controls' sections inside its own block alone. -->
|
|
11
|
+
|
|
12
|
+
<!-- The actions: the Button, the Spinner -->
|
|
13
|
+
|
|
14
|
+
## The Button
|
|
15
|
+
|
|
16
|
+
- `Button` — what a person presses to make something happen, on Base UI's button: `kind`, `size`, `shape`, `loading` (a spinner over the label, which keeps its width; a press does nothing), `icon` and `iconEnd`, and `look`, its own look. Drawn as a link (`render={<a href=… />}`, `nativeButton={false}`) it stays a link. An icon-only one needs an `aria-label`.
|
|
17
|
+
- `ButtonProps` — its props: Base UI's button's, with those above.
|
|
18
|
+
- `ButtonKind` — `primary`, `outline` (the default), `soft`, `quiet`, `danger`, `information`, `success`, `warning`, `link`, `text`.
|
|
19
|
+
- `ButtonSize` — `2xs`, `xs`, `sm`, `md` (the default), `lg`, `44`, and the measured sizes `20`, `22`, `26`, `20x24`, `32x44`, `40x44`, `line`.
|
|
20
|
+
- `ButtonShape` — `default`, `icon` (square), `round`.
|
|
21
|
+
- `buttonClass` — `buttonClass(kind?, size?, shape?)`: its class names, for an element drawn as a Button.
|
|
22
|
+
- `ButtonGroup` — Buttons joined in a row or a column, the corners between them square and the edges shared.
|
|
23
|
+
- `ButtonGroupText` — words inside a group: a unit, a count.
|
|
24
|
+
- `ButtonGroupSeparator` — a line between two Buttons of a group that have no edge of their own.
|
|
25
|
+
- `ButtonOwnLook` — a Button's own look, set on one Button: its radius, words, colour, icons, room, hover, open and pressed states and the rest, each an attribute on the Button beside `data-button-own`. It may change before 1.0.
|
|
26
|
+
- `buttonOwnOptions` — each own option, the attribute it sets and its values.
|
|
27
|
+
- `buttonOwnAttrs` — `buttonOwnAttrs(look)`: the attributes of an own look.
|
|
28
|
+
|
|
29
|
+
## The Spinner
|
|
30
|
+
|
|
31
|
+
- `Spinner` — something on its way, in the colour of the words beside it, at `size` px, said to screen readers by `label` (empty when what it stands in for says it). Every kind is in its drawing; the frame's `data-spinner-*` picks one.
|
|
32
|
+
- `SpinnerProps` — its props.
|
|
33
|
+
- `LoadingBar` — a thin bar along the top of what is loading again, which stays where it is, dimmed and out of reach, until it is in.
|
|
34
|
+
- `LoadingBarProps` — its props.
|
|
35
|
+
|
|
36
|
+
<!-- The popups: the Popover, the bottom Sheet, the Tooltip, and what they stand on -->
|
|
37
|
+
|
|
38
|
+
## What the popups stand on
|
|
39
|
+
|
|
40
|
+
- `Scrollbar` — placed as the very next sibling of what scrolls (`<div class="body">…</div><Scrollbar />`): it keeps what scrolls to up and down only, and hides the browser's bar; `drawn` draws its own thin bar over the right edge while it scrolls, on a computer.
|
|
41
|
+
- `POPUP_HOST` — `data-popup-host`, the attribute that marks where a popup stands: a popup opened inside an element marked with it is put inside that element, so it wears the looks set round it; outside any, the page itself.
|
|
42
|
+
- `popupHostOf` — `popupHostOf(element)`: the nearest popup host round an element, or `undefined`.
|
|
43
|
+
- `Anchor` — where a popup opens from when nothing triggers it: an element, a ref to one, or a point on the page `{ x, y }`.
|
|
44
|
+
|
|
45
|
+
## The Kbd
|
|
46
|
+
|
|
47
|
+
- `Kbd` — a key to press, drawn as a key: `keys` (one, or several pressed together, side by side), `then` (one after the other), `platform` (`windows` writes Ctrl, Shift and Alt for the Mac's symbols).
|
|
48
|
+
- `KbdProps` — its props.
|
|
49
|
+
|
|
50
|
+
## The Tooltip
|
|
51
|
+
|
|
52
|
+
- `Tooltip` — the name of a button that shows only an icon, or why something can't be used (`reason`): on hover after its wait, at once on keyboard focus, and on a touch screen a reason on a tap on what's off. What it names is its one child, which takes a ref, with no element round it. `keys` adds a shortcut's keys after the words. Its wait is `--vk-tooltip-delay`, read off what it names (a look set round it reaches it), or `delay` in ms. What it names wears the class `o-tooltip-trigger`. `CONTROLS.Tooltip` draws ViewKit's tooltips with it; it doesn't read a tooltip's `align`, `delayMs` or `className` yet.
|
|
53
|
+
- `TooltipProps` — its props.
|
|
54
|
+
- `TooltipGroup` — tooltips side by side (a toolbar): once one has shown, the next shows at once for its warm time, `--vk-tooltip-warm` read off its first tooltip, or `warm` in ms.
|
|
55
|
+
- `TooltipGroupProps` — its props.
|
|
56
|
+
- `TooltipShown` — the tooltip standing open beside what it names, for a page that shows how it looks.
|
|
57
|
+
- `TOOLTIP_TIMING` — its times in ms where nothing declares them, the Outright look's: `delay`, `warm`, and `tap`, how long a tapped reason stays (`--vk-toast-duration`).
|
|
58
|
+
|
|
59
|
+
## The Glass button
|
|
60
|
+
|
|
61
|
+
- `GlassButton` — a button made of glass, for a control that floats over a page: 44 round with one icon (`icon`), or a capsule holding a word, an icon and a word, a `count` or a `dot`; `kind` `primary` for what confirms, `danger` for what takes something away; `pressed` for one that is on or off; `size` `sm` (36) for an island on a computer; `render` draws it as a link. Never glass on glass.
|
|
62
|
+
- `GlassButtonProps` — its props: Base UI's button's, with those above.
|
|
63
|
+
- `GlassButtonGroup` — Glass buttons standing together: two apart, each with a lighter shadow, or on one piece of glass, the pill (`pair`, else the frame's `data-glass-button-pair`).
|
|
64
|
+
- `GlassButtonGroupProps` — its props.
|
|
65
|
+
|
|
66
|
+
## The Popover
|
|
67
|
+
|
|
68
|
+
- `Popover` — what opens from what it belongs to on a computer: a shell that knows nothing of what it holds. It opens from its `trigger`, or from an `anchor` when it is set `open` from outside (an element, a ref to one, or a point on the page); it stands on its `side` and flips or shifts to stay on the screen; a press outside, Escape or focus leaving it closes it and gives focus back, and `onOutsidePress` or `onEscape` returning false keeps it open; it follows what opened it through a scroll and closes once that has scrolled out of the view that clips it. It says why it closed. `CONTROLS.Popover` draws ViewKit's popups with it, `panelData` and `onPanelClick` on its own element; it doesn't read a popup's `chrome` yet.
|
|
69
|
+
- `PopoverProps` — its props.
|
|
70
|
+
- `PopoverAnchor` — where it opens from when it has no trigger.
|
|
71
|
+
- `PopoverChangeDetails` — why it opened or closed, and the event that did it.
|
|
72
|
+
- `PopoverCloseReason` — the reasons, as the components map names them, but a drag.
|
|
73
|
+
- `PopoverTitle` — its title, which names it to a screen reader too.
|
|
74
|
+
- `PopoverDescription` — what it says under its title, quieter.
|
|
75
|
+
- `PopoverClose` — what closes it from inside (`render`, a Button).
|
|
76
|
+
|
|
77
|
+
## The phone's header bar
|
|
78
|
+
|
|
79
|
+
- `HeaderBar` — the phone's one header row, on a page and in a sheet's head: a `left` place, the `title` (centred, or `titleAt` `left`), an optional `description` under it (drawn by `descriptionRender` when it must be the caller's element), and a `right` place, which is the Glass button group. It stands on the soft edge under Glass, the frame's `data-phone-header-surface` (Glass unless it says `flat`); `--hd-bar-room` says how much room stands over it.
|
|
80
|
+
- `HeaderBarProps` — its props.
|
|
81
|
+
- `SoftEdge` — what a floating head stands on, so what passes under it melts away with no line; what it stands in sets its height and, in `--soft-edge-ground`, its ground.
|
|
82
|
+
|
|
83
|
+
## The bottom Sheet
|
|
84
|
+
|
|
85
|
+
- `Sheet` — what rises from the bottom of the phone, in a `form` (`full`, `floating`, `blend`, `edge`) and at `stops`, on Base UI's drawer: the drag, focus, Escape and the dim, and a settle on a spring that starts from the finger's speed. What it holds is poured in. `standing` keeps it in its `container`, a screen on a page. It says why it closed. `CONTROLS.Sheet` draws ViewKit's sheets with it, the editor's ✕ (or Back) and ✓ in its head; it doesn't read a sheet's `snap`, a title that isn't words, `description` or `className` yet.
|
|
86
|
+
- `SheetProps` — its props.
|
|
87
|
+
- `SheetChangeDetails` — why it opened or closed.
|
|
88
|
+
- `SheetForm` — `full`, `floating`, `blend` or `edge`.
|
|
89
|
+
- `SheetStop` — a height it rests at: a share of the window up to 1, px above it, or `mark`, measured under what it holds.
|
|
90
|
+
- `STOPS` — the stops a sheet may be given: `small`, `middle` and `full`.
|
|
91
|
+
- `SheetHead` — its head, the phone's header bar under its handle: Glass, its X or Back on the left, or Flat; or `left` and `right` of its own.
|
|
92
|
+
- `SheetHeadProps` — its props.
|
|
93
|
+
- `SheetBody` — what scrolls under its head; at a lower stop a drag raises the sheet instead.
|
|
94
|
+
- `SheetFoot` — its foot, at the screen's foot at every stop.
|
|
95
|
+
- `SheetStep` — one step of a sheet, which a row opens in its place.
|
|
96
|
+
- `SheetButton` — a button in its head: the Glass button under Glass, a quiet Button under Flat.
|
|
97
|
+
- `SheetClose` — a close that is a button of its own (a head's Cancel).
|
|
98
|
+
- `useSheetCloseAll` — closes every sheet open under this one and this one: a choice that finishes the job.
|
|
99
|
+
|
|
100
|
+
<!-- The boxes: the Input, the inline input, the Field, the Toggle, the number field, the Checkbox -->
|
|
101
|
+
|
|
102
|
+
## The boxes
|
|
103
|
+
|
|
104
|
+
`CONTROLS` fills two slots of the map with them: its `Input` draws ViewKit's text boxes as the Input, bare unless ViewKit asks for its field, sized by its place, its digits lined up for a number's keyboard and autofill off; its `Checkbox` draws ViewKit's tick boxes as the Checkbox, handing on the press that changed it.
|
|
105
|
+
|
|
106
|
+
- `Input` — what a person types into, on Base UI's input: in its field (`chrome` `soft`: in the Soft look) unless `chrome` says `bare`, at `size` (`2xs` to `lg`, `md` 36 the default), `multiline` long text that may `grow` to `maxLines`, start at `minLines` or show `lines`, `numeric` digits, `autofill` on unless said, and `look`, its own look. `combobox` puts it as the box of a Base UI combobox's list.
|
|
107
|
+
- `InputProps` — its props.
|
|
108
|
+
- `InputComboboxProps` — its props as a combobox's box.
|
|
109
|
+
- `InputSize` — `2xs`, `xs`, `sm`, `md`, `lg`.
|
|
110
|
+
- `InputChrome` — how it stands: `field`, `soft`, `bare`.
|
|
111
|
+
- `InputGroup` — a field with something inside it beside the words, its Input the group's bare control; a press anywhere in it but a button puts the cursor in its Input.
|
|
112
|
+
- `InputGroupProps` — its props: `size`, `look`, `chrome`.
|
|
113
|
+
- `InputGroupAddon` — what sits beside the words (`side`: `start`, `end`, `top`, `bottom`), `flush` to stand a Button as the side's other parts do.
|
|
114
|
+
- `InputGroupAddonProps` — its props.
|
|
115
|
+
- `InputGroupButton` — a quiet Button inside the field, an icon-only square when it has no words.
|
|
116
|
+
- `InputGroupSegment` — a segment of a value typed in parts (a day, a month), a spinbutton; `on` draws it on the brand's tint.
|
|
117
|
+
- `InputGroupContext` — the group an Input stands in, for a box that frames its Input as the InputGroup does.
|
|
118
|
+
- `pressGroup` — `pressGroup(event)`: a press on a box holding an Input taken as the InputGroup takes it.
|
|
119
|
+
- `useAutofill` — a hook: `fill(false)` spreads what turns the browser's and the password managers' filling off on a box; `fill()` adds nothing.
|
|
120
|
+
- `offWord` — `offWord(navigator)`: the word that turns autofill off in a browser, `language` in Chromium and Firefox, `off` in WebKit.
|
|
121
|
+
- `autofillOff` — `autofillOff(word)`: what a box carries with its autofill off.
|
|
122
|
+
- `OFF_WORD` — `language`, the word Chromium and Firefox take as "fill nothing here".
|
|
123
|
+
- `InlineInput` — the box a value is typed into where it stands (a grid's cell, a list's row): the Input's bare control, its edge, corners and ground the inline input's options, autofill off unless said.
|
|
124
|
+
- `InlineInputProps` — its props.
|
|
125
|
+
- `InlineInputGroup` — an inline input with something beside the value in one row; its button is `xs`.
|
|
126
|
+
- `InlineInputGroupProps` — its props.
|
|
127
|
+
- `NumberField` — a number typed in, stepped or bounded, on Base UI's number field: the Input's own field with its steppers (or `steppers="arrows"`), `before` and `after` it, `align`, `scrub`; `chrome` `field`, `soft`, `inline` or `bare`.
|
|
128
|
+
- `NumberFieldProps` — its props.
|
|
129
|
+
- `Field` — a field: its `label`, its control, and under it its `note` or its `error` (several shown each once), `orientation`, `quietLabel` and its `form`, the computer's unless said: its place says the phone's where it draws a phone's form.
|
|
130
|
+
- `FieldProps` — its props.
|
|
131
|
+
- `FieldError` — one error, or several.
|
|
132
|
+
- `errorsOf` — `errorsOf(error)`: the errors to show, empty ones left out and the same words once.
|
|
133
|
+
- `ErrorWords` — one error as it is, several as a list.
|
|
134
|
+
- `FieldSet` — fields or choices that answer one question under their own `legend`, with their own note and error; `disabled` reaches every choice in it.
|
|
135
|
+
- `FieldSetProps` — its props.
|
|
136
|
+
- `FieldSeparator` — a line between fields, with a word on it.
|
|
137
|
+
- `FieldRows` — Field rows' card: fields as rows of one card on a phone, or each its own card; `look` its own, whole.
|
|
138
|
+
- `FieldRowsProps` — its props.
|
|
139
|
+
- `FieldRowsRow` — a row of Field rows: its label beside its control (`as`: `label`, `button`, `div`).
|
|
140
|
+
- `FieldRowsRowProps` — its props.
|
|
141
|
+
- `Toggle` — a button that stays on until pressed again, drawn as the Button (`kind` quiet, outline or pill); `iconOn` its filled icon while on, in its `tone`; `readOnly`.
|
|
142
|
+
- `ToggleProps` — its props.
|
|
143
|
+
- `ToggleGroup` — toggles that belong together, one on at a time unless `multiple`; `spacing` 0 joins them.
|
|
144
|
+
- `ToggleGroupProps` — its props.
|
|
145
|
+
- `Checkbox` — picks any number of things, or says yes to one: its `label` and `note` beside it, `row` in a list, `card` drawn as a card.
|
|
146
|
+
- `CheckboxProps` — its props.
|
|
147
|
+
- `CheckboxMark` — the box alone, for a row pressed as a whole.
|
|
148
|
+
- `CheckboxList` — checkboxes in rows in a bordered box, Base UI's checkbox group.
|
|
149
|
+
- `CheckboxListProps` — its props.
|
|
150
|
+
|
|
151
|
+
Their stylesheets are `input.css`, `inline-input.css`, `field.css`, `toggle.css`, `number-field.css` and `checkbox.css`; the Checkbox's words (`o-choice-*`) and the phone's larger press area are drawn by the app's own styles for now. Their phone rules hold below 640px, a window narrower than that, or what stands in a container named `o-phone` narrower than it; the window's copy stands down inside an element marked `data-computer-host` and inside it. Those three are the Outright Showcase's hooks, kept until the controls take their phone line from the app.
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
<!-- The rows: the Option, the Tag, the Status, the Switch, the menu list -->
|
|
155
|
+
|
|
156
|
+
## The Option
|
|
157
|
+
|
|
158
|
+
- `Option` — the value of a select or multi-select field: the Tag's chip without its icon, in its own `colour` where a colour look draws one, `size` `md` or `lg` (a phone's row), an `icon` at its start and an `iconEnd`, a `count` ("+2"), a remove button by `onRemove`, and drawn as a link by `render` (never while editing).
|
|
159
|
+
- `OptionProps` — its props.
|
|
160
|
+
- `Options` — a field's values as a record or a list shows them: an Option each, in its colour from `colours`, the first `max` then a count; a dash for none.
|
|
161
|
+
|
|
162
|
+
## The Tag
|
|
163
|
+
|
|
164
|
+
- `Tag` — a free word someone added to a record, in a plain edge with the tag icon in front: `size` `md` or `sm`, a `count` for the rest, and a remove button by `onRemove`.
|
|
165
|
+
- `TagProps` — its props.
|
|
166
|
+
- `TagCut` — a chip's cut, its first child, which draws its ground and edge under Corner smoothing's Smooth: the Tag's and the Option's.
|
|
167
|
+
- `TagRemove` — a chip's remove button, named "Remove" and its word: the Tag's and the Option's.
|
|
168
|
+
|
|
169
|
+
## The Status
|
|
170
|
+
|
|
171
|
+
- `Status` — where a record stands on its path: a mark that says how far along, and the word. `place` (a deal's, a run's, a project's health's, or something published's), `quarters` for a step between, `size` `sm` to `xl`, its own `colour`, and for Along the path `step`, `steps`, `at`, `since` and `stale`. Every mark is in it; the frame's `data-status-*` picks one.
|
|
172
|
+
- `StatusProps` — its props.
|
|
173
|
+
- `StatusGlyph` — the mark alone, beside a step's name.
|
|
174
|
+
- `StatusPlace` — every place: `DealPlace`, `RunPlace`, `HealthPlace` and `PublishedPlace`, each a type of its own.
|
|
175
|
+
- `DealPlace` — `start`, `between`, `won`, `lost`, `risk`, `archived`.
|
|
176
|
+
- `RunPlace` — `queued`, `running`, `succeeded`, `failed`, `cancelled`, `skipped`.
|
|
177
|
+
- `HealthPlace` — `on-track`, `at-risk`, `off-track`, `no-update`.
|
|
178
|
+
- `PublishedPlace` — `draft`, `scheduled`, `live`, `paused`, `ended`.
|
|
179
|
+
- `StatusSize` — `sm`, `md` (the default), `lg`, `xl`.
|
|
180
|
+
- `MARKS` — the twelve marks a deal's place is drawn in, in order.
|
|
181
|
+
- `MarkId` — one of `MARKS`.
|
|
182
|
+
- `MarkDrawing` — what a mark draws, in a box 16 high.
|
|
183
|
+
- `markOf` — `markOf(mark, place, quarters?)`: what a mark draws for a place.
|
|
184
|
+
- `isDealPlace` — whether a place is on a deal's path.
|
|
185
|
+
- `stepOf` — `stepOf(place, quarters?)`: a place's step along a deal's path, 1 to 5.
|
|
186
|
+
|
|
187
|
+
## The Switch
|
|
188
|
+
|
|
189
|
+
- `Switch` — turns a setting on or off, at once, on Base UI's switch: `size` `sm`, `md` or `lg` (on a phone `md` takes `lg`'s), `saving` (its thumb turns and a press does nothing), `locked` (a lock in its thumb) and its two `words`. Give it an `aria-label`, or a label round it.
|
|
190
|
+
- `SwitchProps` — its props: Base UI's switch's, with those above.
|
|
191
|
+
|
|
192
|
+
## The atoms drawn with them
|
|
193
|
+
|
|
194
|
+
- `CONTROL_ATOMS` — the atoms drawn with the default controls, for an app that takes them: it spreads them over its own, `atoms={{ ...CONTROL_ATOMS, ...own }}`. Taking none keeps ViewKit's own atoms, which need no Base UI. The rows' are `Tag` (a select's value as the Option, in its colour), `StatusBadge` (a status as the Status at its place) and `CellMore` (the rest of a cell's values as the Tag's count).
|
|
195
|
+
- `colourOf` — `colourOf(color)`: a value's colour as ViewKit names it, as the Option's (`gray` is `grey`).
|
|
196
|
+
- `statusPlaceOf` — `statusPlaceOf(slot)`: where a status of a slot stands on the Status's path (`running` and `primary` are a step between).
|
|
197
|
+
- `quartersOf` — `quartersOf(steps, at)`: a step between at its quarters (1, 2 or 3) among the steps between, in their order.
|
|
198
|
+
|
|
199
|
+
<!-- The picker's: the Menu, the Select, the Avatar -->
|
|
200
|
+
|
|
201
|
+
<!-- The panels': the Pane, the toolbar button, the Radio, the Modal, the alert dialog, the Toast, the Collapsible, the Alert, the Notice -->
|
|
202
|
+
|
|
203
|
+
## The stylesheets
|
|
204
|
+
|
|
205
|
+
The ready stylesheet (`viewkitjs/views/styles.css`) carries the controls, every token they read declared at the Outright look's value ([the controls' tokens](../contract.md#the-controls-tokens)). An app on the Outright tokens imports them one by one instead, and declares each token as its own: `viewkitjs/views/controls/smooth.css` first (the smooth corner every control's outline stands on), then each control's own, `viewkitjs/views/controls/<piece>.css` (the Button's `button.css`, the Spinner's `spinner.css`); each control's names are on its page under `docs/controls/`. Their options and looks are on [`viewkitjs/views/looks`](looks.md).
|
|
206
|
+
|
|
207
|
+
The class names (`o-button`, `o-spinner` and the rest) and the selectors other pieces use to style a Button they hold stay as the Outright kit named them until those pieces move into ViewKit; they are not public.
|
|
@@ -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
|
|
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.
|
|
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,7 +17,82 @@ 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
|
|
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
|
+
|
|
22
|
+
## The controls'
|
|
23
|
+
|
|
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-<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 -->
|
|
30
|
+
|
|
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`.
|
|
32
|
+
- `ButtonLookOptionId` — the Button's option ids.
|
|
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`.
|
|
34
|
+
- `SpinnerLookOptionId` — the Spinner's option ids.
|
|
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
|
+
|
|
93
|
+
<!-- The picker's: the Menu, the Select, the Avatar -->
|
|
94
|
+
|
|
95
|
+
<!-- The panels': the Pane, the toolbar button, the Radio, the Modal, the alert dialog, the Toast, the Collapsible, the Alert, the Notice -->
|
|
21
96
|
|
|
22
97
|
## The grid's
|
|
23
98
|
|
|
@@ -26,6 +26,11 @@ Guide: [the provider](../guides/the-provider.md).
|
|
|
26
26
|
- `VK_INTERNAL_FAMILIES` — the grid's internal variable families, a prefix with one variable per key after it: `--vk-col-w-<id>`, one column's resolved width, set on the grid's root for every visible column. Not public, like `VK_INTERNAL`.
|
|
27
27
|
- `VK_INTERNAL_MARKS` — the display's own marks, set and read by ViewKit alone: `vk-fit` on a cell fitting its values and `vk-fit-value` on each value's box, which its measure reads. Not public, like `VK_INTERNAL`: your app neither sets, reads nor styles them, and they may change in any release.
|
|
28
28
|
- `VkInternalMark` — one member of `VK_INTERNAL_MARKS`.
|
|
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
|
+
- `VkControlToken` — one name of `VK_CONTROL_TOKENS`.
|
|
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.
|
|
29
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)).
|
|
30
35
|
- `ComponentName` — one member of `COMPONENT_NAMES`.
|
|
31
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)).
|
|
@@ -166,7 +171,10 @@ What a person changes about the columns (which are shown, in what order, at what
|
|
|
166
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.
|
|
167
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.
|
|
168
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).
|
|
169
|
-
- `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.
|
|
170
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.
|
|
171
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.
|
|
172
180
|
- `prettifyOptionValue` — a stored code made readable: underscores and hyphens become spaces and each word starts with a capital (`on_hold` reads `On Hold`).
|
|
@@ -430,7 +438,7 @@ Each rule is data, an operator and its values, so the same rule is judged in mem
|
|
|
430
438
|
- `dateFilterDates` — how many days a date operator takes: none, one or two.
|
|
431
439
|
- `dateFilterOperatorLabel` — a date operator's name in the host's words.
|
|
432
440
|
- `isDateRuleActive` — says whether a date rule filters: a relative rule needs its direction and unit, the others their days.
|
|
433
|
-
- `dateRuleLabel` — a date rule's summary, its days written in the host's locale
|
|
441
|
+
- `dateRuleLabel` — a date rule's summary, its days written in the host's locale with their month's word in its `language`, or the word for any.
|
|
434
442
|
- `matchesDateRule` — judges a value against a date rule by its calendar day in the host's time zone; a relative rule is resolved against the current moment each time, so it moves with the clock.
|
|
435
443
|
- `resolveRelativeWindow` — the inclusive window of days a relative rule means today: this is the calendar period holding today, with weeks running Monday to Sunday; past and next run back or forward one unit from today.
|
|
436
444
|
- `valueDayKey` — the calendar day a stored date or instant means, in the host's time zone; a bare day is already a day and is never read as a UTC instant. Null for an empty or unreadable value.
|