@greendrake/ui 0.7.0 → 0.8.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/README.md +4 -3
- package/package.json +4 -4
- package/src/MenuButton.vue +3 -1
package/README.md
CHANGED
|
@@ -27,13 +27,14 @@ Read with no fallback, so the app defines them:
|
|
|
27
27
|
|
|
28
28
|
| Property | Read by |
|
|
29
29
|
| --- | --- |
|
|
30
|
-
| `--font-color` | text throughout: `AsyncSearch`, `BottomNav`, `Checkbox`, `ContextMenu`, `Gallery`, `Modal`, `Password`, `SearchField`, `TreeView` |
|
|
30
|
+
| `--font-color` | text throughout: `AsyncSearch`, `BottomNav`, `Checkbox`, `ContextMenu`, `Gallery`, `Modal`, `Password`, `SearchField`, `SwitchRow`, `TreeView` |
|
|
31
31
|
| `--background-color` | `AsyncSearch` narrow panel |
|
|
32
32
|
| `--form-background`, `--form-background-hover` | control surfaces: `AsyncSearchResults`, `BottomNav`, `ContextMenu`, `SegmentedControl`, `TabBar`, `ThumbnailGrid`, `TreeView` |
|
|
33
33
|
| `--input-background` | `Checkbox` box |
|
|
34
34
|
| `--border-color`, `--border-color-light`, `--border-color-hover` | control and container borders; `--border-color-light` is also the `SplitPane` handle |
|
|
35
35
|
| `--border-radius` | `AsyncSearch`, `AsyncSearchResults`, `Checkbox`, `ThumbnailGrid` (`FieldTip` falls back to 4px) |
|
|
36
|
-
| `--
|
|
36
|
+
| `--border-radius-pill` | `SwitchRow` track |
|
|
37
|
+
| `--accent-color` | active and checked states: `BottomNav`, `Checkbox`, `SegmentedControl`, `SwitchRow`, `TabBar`, toasts; the hovered `SplitPane` handle; `TreeView` drop targets |
|
|
37
38
|
| `--space-1` … `--space-5` | spacing |
|
|
38
39
|
| `--font-xs`, `--font-md`, `--font-lg` | `BottomNav` and `ThumbnailGrid` labels, `FieldTip`, `Modal` title |
|
|
39
40
|
| `--line-height-normal` | `Password` |
|
|
@@ -217,7 +218,7 @@ Full-screen image viewer in an expanded `Modal`. Props: `items: GalleryItem[]` (
|
|
|
217
218
|
|
|
218
219
|
### MenuButton
|
|
219
220
|
|
|
220
|
-
Hover/click dropdown built on `vue-tippy`'s `Tippy` (theme `HMenu`, placement `bottom-end`); any click inside the menu closes it. Slots: `main` (trigger), `menuitems` (menu content, wrapped in `.Menubutton-Menu`). Props: `menuClass` (on the wrapper), `boxClass` (on the tippy box, applied once on create), `offset` (default `[0, -1]`), `matchTriggerWidth` (pins the popper width to the trigger's).
|
|
221
|
+
Hover/click dropdown built on `vue-tippy`'s `Tippy` (theme `HMenu`, placement `bottom-end`), appended to `body`, or to the element filling the screen while one does; any click inside the menu closes it. Slots: `main` (trigger), `menuitems` (menu content, wrapped in `.Menubutton-Menu`). Props: `menuClass` (on the wrapper), `boxClass` (on the tippy box, applied once on create), `offset` (default `[0, -1]`), `matchTriggerWidth` (pins the popper width to the trigger's).
|
|
221
222
|
|
|
222
223
|
### ContextMenu
|
|
223
224
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@greendrake/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Vue 3 component library: form controls, modals, search, tabs, toasts, layout",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Eugene Greendrake <eugene@greendrake.nz>",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"prettier": "@greendrake/dev-config/prettier",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@greendrake/domains": "0.7.0",
|
|
37
|
-
"@greendrake/scss-kit": "0.
|
|
38
|
-
"@greendrake/util": "0.
|
|
36
|
+
"@greendrake/domains": "^0.7.0",
|
|
37
|
+
"@greendrake/scss-kit": "^0.8.0",
|
|
38
|
+
"@greendrake/util": "^0.8.0",
|
|
39
39
|
"vue-tippy": "^6.7.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
package/src/MenuButton.vue
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
// coordinates as top/left.
|
|
9
9
|
const popperOptions = { modifiers: [{ name: 'computeStyles', options: { gpuAcceleration: false } }] }
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// The body, or the element filling the screen while one does, outside which nothing
|
|
12
|
+
// shows: a menu opened in a fullscreen video player, say. Asked on every show.
|
|
13
|
+
const appendTo = () => document.fullscreenElement ?? document.body
|
|
12
14
|
</script>
|
|
13
15
|
<script setup lang="ts">
|
|
14
16
|
import { computed } from 'vue'
|