@plexui/vue 0.12.0 → 0.14.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 +66 -15
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Dialog/index.js +1 -1
- package/dist/es/components/Dialog/index.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +5 -3
- package/dist/es/components/Menu/Menu.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/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 +11 -1
- package/dist/types/components/Dialog/index.d.ts +1 -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/lib/contextMenuHold.d.ts +21 -0
- package/package.json +2 -2
|
@@ -167,7 +167,9 @@ export declare const DialogHeader: import("vue").DefineComponent<import("vue").E
|
|
|
167
167
|
};
|
|
168
168
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
169
169
|
[key: string]: any;
|
|
170
|
-
}
|
|
170
|
+
}> | (VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
171
|
+
[key: string]: any;
|
|
172
|
+
}> | null)[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
171
173
|
/** How the bar meets the content scrolled under it in a phone Sheet. @default "glass" */
|
|
172
174
|
background: {
|
|
173
175
|
type: PropType<DialogBarBackground>;
|
|
@@ -183,6 +185,14 @@ export declare const DialogHeaderAction: import("vue").DefineComponent<{}, () =>
|
|
|
183
185
|
export declare const DialogBody: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
184
186
|
[key: string]: any;
|
|
185
187
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
188
|
+
/**
|
|
189
|
+
* Where a phone Sheet's description goes in content of your own, such as a scroller inside a form so that Enter
|
|
190
|
+
* submits: the description starts it, as it starts DialogBody, and it comes before the body's place. It renders
|
|
191
|
+
* nothing outside a phone Sheet.
|
|
192
|
+
*/
|
|
193
|
+
export declare const DialogDescriptionSlot: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
194
|
+
[key: string]: any;
|
|
195
|
+
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
186
196
|
export declare const DialogFooter: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
187
197
|
/** Override the mobile action layout. Alerts default to inline; sheets to stacked. */
|
|
188
198
|
mobileLayout: PropType<"inline" | "stacked">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderAction, DialogSteps, DialogTitle, DialogTrigger, type DialogBarBackground, type DialogHeaderProps, type DialogFooterProps, type DialogContentProps, type DialogInteractOutsideEvent, type DialogLayerProps, type DialogPlacement, type DialogProps, type DialogStepsProps, } from "./Dialog.js";
|
|
1
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogDescriptionSlot, DialogFooter, DialogHeader, DialogHeaderAction, DialogSteps, DialogTitle, DialogTrigger, type DialogBarBackground, type DialogHeaderProps, type DialogFooterProps, type DialogContentProps, type DialogInteractOutsideEvent, type DialogLayerProps, type DialogPlacement, type DialogProps, type DialogStepsProps, } from "./Dialog.js";
|
|
@@ -72,6 +72,22 @@ export declare const MenuTrigger: import("vue").DefineComponent<import("vue").Ex
|
|
|
72
72
|
}>> & Readonly<{}>, {
|
|
73
73
|
disabled: boolean;
|
|
74
74
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
75
|
+
export declare const useMenuPhoneLayout: () => {
|
|
76
|
+
container: ComputedRef<HTMLElement | null>;
|
|
77
|
+
scoped: ComputedRef<boolean>;
|
|
78
|
+
};
|
|
79
|
+
export declare const useMenuBoundary: (active: () => boolean) => ComputedRef<{
|
|
80
|
+
collisionBoundary: HTMLElement;
|
|
81
|
+
collisionPadding: {
|
|
82
|
+
bottom: number;
|
|
83
|
+
left?: number | undefined;
|
|
84
|
+
right?: number | undefined;
|
|
85
|
+
top?: number | undefined;
|
|
86
|
+
};
|
|
87
|
+
} | {
|
|
88
|
+
collisionPadding: Partial<Record<"left" | "right" | "bottom" | "top", number>>;
|
|
89
|
+
collisionBoundary?: undefined;
|
|
90
|
+
}>;
|
|
75
91
|
type MenuSide = "top" | "right" | "bottom" | "left";
|
|
76
92
|
type MenuAlign = "start" | "center" | "end";
|
|
77
93
|
type SizeValue = number | "auto";
|
|
@@ -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>;
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plexui/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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.38",
|
|
81
81
|
"@tanstack/table-core": "8.21.3",
|
|
82
82
|
"@tanstack/vue-table": "8.21.3",
|
|
83
83
|
"@tiptap/core": "3.21.0",
|