@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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "1.0.0-beta.73",
4
+ "version": "1.0.0-beta.74",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
@@ -109,7 +109,7 @@ const functions$1 = [
109
109
  {
110
110
  name: "MagicTray",
111
111
  "package": "plugins",
112
- lastUpdated: 1781870441000,
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);
@@ -56,6 +56,7 @@ export interface MagicToastOptions {
56
56
  debug?: boolean;
57
57
  position?: Position;
58
58
  duration?: number;
59
+ draggable?: boolean;
59
60
  scrollLock?: boolean | {
60
61
  padding: boolean;
61
62
  };
@@ -3,6 +3,7 @@ const defaultOptions = {
3
3
  debug: false,
4
4
  position: "bottom",
5
5
  duration: 0,
6
+ draggable: true,
6
7
  scrollLock: {
7
8
  padding: true
8
9
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "Our Frontend Toolkit, Free and Open Source",
4
- "version": "1.0.0-beta.74",
4
+ "version": "1.0.0-beta.75",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "Robin Scholz",