@maas/vue-equipment 1.0.0-beta.74 → 1.0.0-beta.75
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/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +9 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +4 -1
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -0
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -0
- package/package.json +1 -1
package/dist/nuxt/module.json
CHANGED
package/dist/nuxt/module.mjs
CHANGED
|
@@ -109,7 +109,7 @@ const functions$1 = [
|
|
|
109
109
|
{
|
|
110
110
|
name: "MagicTray",
|
|
111
111
|
"package": "plugins",
|
|
112
|
-
lastUpdated:
|
|
112
|
+
lastUpdated: 1782824900000,
|
|
113
113
|
docs: "https://maas.egineering/vue-equipment/plugins/MagicTray/",
|
|
114
114
|
description: "MagicTray is a flexible"
|
|
115
115
|
},
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:data-id="id"
|
|
5
5
|
:data-expanded="state.expanded"
|
|
6
6
|
:data-dragging="view?.dragging"
|
|
7
|
+
:data-draggable="state.options.draggable"
|
|
7
8
|
:data-position="state.options.position"
|
|
8
9
|
:data-debug="state.options.debug"
|
|
9
10
|
:style="{
|
|
@@ -123,6 +124,14 @@ const { style, onPointerdown, onClick } = useToastDrag({
|
|
|
123
124
|
cursor: var(--magic-toast-view-cursor-dragging, grabbing);
|
|
124
125
|
}
|
|
125
126
|
|
|
127
|
+
.magic-toast-view[data-draggable='false'] {
|
|
128
|
+
cursor: default;
|
|
129
|
+
|
|
130
|
+
& .magic-toast-view__drag {
|
|
131
|
+
touch-action: auto;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
126
135
|
.magic-toast-view[data-position='left'] {
|
|
127
136
|
position: absolute;
|
|
128
137
|
}
|
|
@@ -16,7 +16,7 @@ export function useToastDrag(args) {
|
|
|
16
16
|
const { initializeState } = useToastState(instanceId);
|
|
17
17
|
const state = initializeState();
|
|
18
18
|
const { options } = toRefs(state);
|
|
19
|
-
const { threshold, animation, position, scrollLock } = options.value;
|
|
19
|
+
const { threshold, animation, position, scrollLock, draggable } = options.value;
|
|
20
20
|
const { deleteView } = useToastView(instanceId);
|
|
21
21
|
const {
|
|
22
22
|
dragStart,
|
|
@@ -262,6 +262,9 @@ export function useToastDrag(args) {
|
|
|
262
262
|
cancelTouchcancel?.();
|
|
263
263
|
}
|
|
264
264
|
function onPointerdown(e) {
|
|
265
|
+
if (!toValue(draggable)) {
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
265
268
|
const scrollLockValue = toValue(scrollLock);
|
|
266
269
|
if (scrollLockValue) {
|
|
267
270
|
lockScroll(typeof scrollLockValue === "object" && scrollLockValue.padding);
|