@plexui/vue 0.11.0 → 0.13.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/dist/es/components/ContextMenu/ContextMenu.js +217 -41
- package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -1
- package/dist/es/components/ContextMenu/shared.js +182 -8
- package/dist/es/components/ContextMenu/shared.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +49 -15
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +47 -23
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/composables/usePhoneSubmenu.js +3 -2
- package/dist/es/composables/usePhoneSubmenu.js.map +1 -1
- package/dist/es/lib/contextMenuHold.js +23 -0
- package/dist/es/lib/contextMenuHold.js.map +1 -0
- package/dist/es/lib/menuInitialFocus.js +5 -3
- package/dist/es/lib/menuInitialFocus.js.map +1 -1
- package/dist/es/lib/menuSubmenuPlacement.js +129 -5
- package/dist/es/lib/menuSubmenuPlacement.js.map +1 -1
- package/dist/es/lib/menuTriggerCover.js +10 -4
- package/dist/es/lib/menuTriggerCover.js.map +1 -1
- package/dist/es/lib/sortable.js +31 -2
- package/dist/es/lib/sortable.js.map +1 -1
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +59 -10
- package/dist/types/components/ContextMenu/shared.d.ts +53 -8
- package/dist/types/components/DatePicker/DatePicker.d.ts +2 -2
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/types/components/Dialog/Dialog.d.ts +3 -1
- package/dist/types/components/Menu/Menu.d.ts +16 -0
- package/dist/types/components/Tip/Tip.d.ts +1 -1
- package/dist/types/components/Tooltip/CopyTooltip.d.ts +1 -1
- package/dist/types/composables/usePhoneSubmenu.d.ts +2 -1
- package/dist/types/lib/contextMenuHold.d.ts +21 -0
- package/dist/types/lib/menuSubmenuPlacement.d.ts +9 -2
- package/package.json +2 -2
|
@@ -132,8 +132,8 @@ export declare const TipPopover: import("vue").DefineComponent<import("vue").Ext
|
|
|
132
132
|
}>, {
|
|
133
133
|
open: boolean;
|
|
134
134
|
defaultOpen: boolean;
|
|
135
|
-
side: "left" | "right" | "bottom" | "top";
|
|
136
135
|
sideOffset: number;
|
|
136
|
+
side: "left" | "right" | "bottom" | "top";
|
|
137
137
|
align: "center" | "end" | "start";
|
|
138
138
|
closeButton: boolean;
|
|
139
139
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -71,9 +71,9 @@ export declare const CopyTooltip: import("vue").DefineComponent<import("vue").Ex
|
|
|
71
71
|
}>> & Readonly<{
|
|
72
72
|
onCopy?: ((copied: boolean) => any) | undefined;
|
|
73
73
|
}>, {
|
|
74
|
-
side: TooltipSide;
|
|
75
74
|
sideOffset: number;
|
|
76
75
|
alignOffset: number;
|
|
76
|
+
side: TooltipSide;
|
|
77
77
|
align: TooltipAlign;
|
|
78
78
|
openDelay: number;
|
|
79
79
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type ComputedRef, type ShallowRef } from "vue";
|
|
2
2
|
import { type MenuFloatingBoundary, type PhoneSubmenuState } from "../lib/menuSubmenuPlacement.js";
|
|
3
|
-
|
|
3
|
+
/** `onParentPress` collapses the submenu when a press lands on the parent it stands over. */
|
|
4
|
+
export declare function usePhoneSubmenu(active: () => boolean, trigger: ShallowRef<HTMLElement | null>, content: ShallowRef<HTMLElement | null>, boundary: ComputedRef<MenuFloatingBoundary>, onParentPress?: () => void): ShallowRef<PhoneSubmenuState, PhoneSubmenuState>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** A touch held this long opens the menu, as a UIKit long press (0.5 s). */
|
|
2
|
+
export declare const CONTEXT_MENU_LONG_PRESS = 500;
|
|
3
|
+
/** A touch that moves farther than this before then scrolls or drags instead. */
|
|
4
|
+
export declare const CONTEXT_MENU_LONG_PRESS_SLOP = 10;
|
|
5
|
+
/** On the element of a `ContextMenu.Trigger` that is not disabled. */
|
|
6
|
+
export declare const CONTEXT_MENU_TRIGGER = "data-context-menu-trigger";
|
|
7
|
+
/** Sent on that element, and bubbling, when a touch and hold opened its menu and the finger is still down. */
|
|
8
|
+
export declare const CONTEXT_MENU_HOLD = "plexui:context-menu-hold";
|
|
9
|
+
export type ContextMenuHold = {
|
|
10
|
+
/** The touch that holds the element */
|
|
11
|
+
pointerId: number;
|
|
12
|
+
/** Closes the menu at once and puts the element back in its place, for a drag that takes the touch over */
|
|
13
|
+
close: () => void;
|
|
14
|
+
};
|
|
15
|
+
/** The grip of a Sortable item: it drags at once, so a hold on it opens no context menu. */
|
|
16
|
+
export declare const SORTABLE_HANDLE = "[data-sortable-handle]";
|
|
17
|
+
/** The item a Sortable drag is moving: a hold that a list around the element already turned into a drag. */
|
|
18
|
+
export declare const SORTABLE_SOURCE = "[data-sortable-source]";
|
|
19
|
+
export declare const sendContextMenuHold: (element: HTMLElement, hold: ContextMenuHold) => boolean;
|
|
20
|
+
/** The element of a context menu that a touch on `target` holds together with the drag of `item`: the item, or in it. */
|
|
21
|
+
export declare const heldContextMenu: (target: EventTarget | null, item: HTMLElement) => HTMLElement | undefined;
|
|
@@ -50,8 +50,15 @@ export declare function readMenuBoundaryRect(document: Document, boundary: MenuF
|
|
|
50
50
|
export declare function readMenuTriggerLabel(trigger: HTMLElement): string;
|
|
51
51
|
export declare function focusPhoneSubmenuEntry(content: HTMLElement): void;
|
|
52
52
|
export declare function samePhoneSubmenuState(a: PhoneSubmenuState, b: PhoneSubmenuState): boolean;
|
|
53
|
-
/**
|
|
54
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Own only these Phone attributes/variables. Primitive focus and dismissal stay intact.
|
|
55
|
+
*
|
|
56
|
+
* While a phone submenu stands over its parent the parent is behind it, as in iOS 26 (owner, plan 176): a press on it
|
|
57
|
+
* collapses the submenu (`onParentPress`) and chooses none of its rows, which take no presses (Menu.module.css), and
|
|
58
|
+
* it is hidden from a screen reader. Focus left in it by the press that opened the submenu moves into the submenu, as
|
|
59
|
+
* VoiceOver's moves into an iOS submenu, and a focus that returns to it (the submenu collapsing) shows it again.
|
|
60
|
+
*/
|
|
61
|
+
export declare function observePhoneSubmenu(trigger: HTMLElement, content: HTMLElement, boundary: MenuFloatingBoundary, update: (state: PhoneSubmenuState) => void, onParentPress?: () => void): {
|
|
55
62
|
refresh: () => void;
|
|
56
63
|
dispose: () => void;
|
|
57
64
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plexui/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Plex UI components for Vue 3, built on Reka UI and the shared @plexui/styles CSS",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@maskito/core": "5.2.2",
|
|
78
78
|
"@maskito/kit": "5.2.2",
|
|
79
79
|
"@maskito/vue": "5.2.2",
|
|
80
|
-
"@plexui/styles": "^0.1.
|
|
80
|
+
"@plexui/styles": "^0.1.37",
|
|
81
81
|
"@tanstack/table-core": "8.21.3",
|
|
82
82
|
"@tanstack/vue-table": "8.21.3",
|
|
83
83
|
"@tiptap/core": "3.21.0",
|