@leaflink/stash 50.2.1 → 50.4.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/assets/icons/camera.svg +1 -0
- package/assets/icons/home.svg +1 -0
- package/assets/spritesheet.svg +1 -1
- package/dist/Accordion.vue.d.ts +2 -2
- package/dist/AppNavigationItem.vue.d.ts +1 -1
- package/dist/Icon.js +2 -0
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +1 -1
- package/dist/IconLabel.vue.d.ts +1 -1
- package/dist/ListView.vue.d.ts +6 -6
- package/dist/QuickAction.vue.d.ts +1 -1
- package/dist/SelectStatus.vue.d.ts +1 -1
- package/dist/TextEditor.vue.d.ts +1 -1
- package/dist/Tooltip.js +36 -157
- package/dist/Tooltip.js.map +1 -1
- package/dist/index-Ck3Dl09q.js +128 -0
- package/dist/index-Ck3Dl09q.js.map +1 -0
- package/dist/useSortable.d.ts +94 -0
- package/dist/useSortable.js +116 -0
- package/dist/useSortable.js.map +1 -0
- package/package.json +1 -1
package/dist/Tooltip.js
CHANGED
|
@@ -1,131 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
function B(e) {
|
|
7
|
-
return typeof e == "function" ? e() : M(e);
|
|
8
|
-
}
|
|
9
|
-
const J = typeof window < "u" && typeof document < "u";
|
|
10
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
11
|
-
const K = Object.prototype.toString, Q = (e) => K.call(e) === "[object Object]", Z = () => {
|
|
12
|
-
}, W = J ? window : void 0;
|
|
13
|
-
function H(e) {
|
|
14
|
-
var s;
|
|
15
|
-
const n = B(e);
|
|
16
|
-
return (s = n == null ? void 0 : n.$el) != null ? s : n;
|
|
17
|
-
}
|
|
18
|
-
function b(...e) {
|
|
19
|
-
let s, n, l, i;
|
|
20
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, i] = e, s = W) : [s, n, l, i] = e, !s)
|
|
21
|
-
return Z;
|
|
22
|
-
Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);
|
|
23
|
-
const c = [], f = () => {
|
|
24
|
-
c.forEach((o) => o()), c.length = 0;
|
|
25
|
-
}, y = (o, r, u, a) => (o.addEventListener(r, u, a), () => o.removeEventListener(r, u, a)), d = $(
|
|
26
|
-
() => [H(s), B(i)],
|
|
27
|
-
([o, r]) => {
|
|
28
|
-
if (f(), !o)
|
|
29
|
-
return;
|
|
30
|
-
const u = Q(r) ? { ...r } : r;
|
|
31
|
-
c.push(
|
|
32
|
-
...n.flatMap((a) => l.map((m) => y(o, a, m, u)))
|
|
33
|
-
);
|
|
34
|
-
},
|
|
35
|
-
{ immediate: !0, flush: "post" }
|
|
36
|
-
), w = () => {
|
|
37
|
-
d(), f();
|
|
38
|
-
};
|
|
39
|
-
return q(w), w;
|
|
40
|
-
}
|
|
41
|
-
const ee = {
|
|
42
|
-
page: (e) => [e.pageX, e.pageY],
|
|
43
|
-
client: (e) => [e.clientX, e.clientY],
|
|
44
|
-
screen: (e) => [e.screenX, e.screenY],
|
|
45
|
-
movement: (e) => e instanceof Touch ? null : [e.movementX, e.movementY]
|
|
46
|
-
};
|
|
47
|
-
function te(e = {}) {
|
|
48
|
-
const {
|
|
49
|
-
type: s = "page",
|
|
50
|
-
touch: n = !0,
|
|
51
|
-
resetOnTouchEnds: l = !1,
|
|
52
|
-
initialValue: i = { x: 0, y: 0 },
|
|
53
|
-
window: c = W,
|
|
54
|
-
target: f = c,
|
|
55
|
-
scroll: y = !0,
|
|
56
|
-
eventFilter: d
|
|
57
|
-
} = e;
|
|
58
|
-
let w = null;
|
|
59
|
-
const o = p(i.x), r = p(i.y), u = p(null), a = typeof s == "function" ? s : ee[s], m = (t) => {
|
|
60
|
-
const h = a(t);
|
|
61
|
-
w = t, h && ([o.value, r.value] = h, u.value = "mouse");
|
|
62
|
-
}, v = (t) => {
|
|
63
|
-
if (t.touches.length > 0) {
|
|
64
|
-
const h = a(t.touches[0]);
|
|
65
|
-
h && ([o.value, r.value] = h, u.value = "touch");
|
|
66
|
-
}
|
|
67
|
-
}, g = () => {
|
|
68
|
-
if (!w || !c)
|
|
69
|
-
return;
|
|
70
|
-
const t = a(w);
|
|
71
|
-
w instanceof MouseEvent && t && (o.value = t[0] + c.scrollX, r.value = t[1] + c.scrollY);
|
|
72
|
-
}, x = () => {
|
|
73
|
-
o.value = i.x, r.value = i.y;
|
|
74
|
-
}, S = d ? (t) => d(() => m(t), {}) : (t) => m(t), O = d ? (t) => d(() => v(t), {}) : (t) => v(t), _ = d ? () => d(() => g(), {}) : () => g();
|
|
75
|
-
if (f) {
|
|
76
|
-
const t = { passive: !0 };
|
|
77
|
-
b(f, ["mousemove", "dragover"], S, t), n && s !== "movement" && (b(f, ["touchstart", "touchmove"], O, t), l && b(f, "touchend", x, t)), y && s === "page" && b(c, "scroll", _, { passive: !0 });
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
x: o,
|
|
81
|
-
y: r,
|
|
82
|
-
sourceType: u
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
function oe(e, s = {}) {
|
|
86
|
-
const {
|
|
87
|
-
handleOutside: n = !0,
|
|
88
|
-
window: l = W
|
|
89
|
-
} = s, i = s.type || "page", { x: c, y: f, sourceType: y } = te(s), d = p(e ?? (l == null ? void 0 : l.document.body)), w = p(0), o = p(0), r = p(0), u = p(0), a = p(0), m = p(0), v = p(!0);
|
|
90
|
-
let g = () => {
|
|
91
|
-
};
|
|
92
|
-
return l && (g = $(
|
|
93
|
-
[d, c, f],
|
|
94
|
-
() => {
|
|
95
|
-
const x = H(d);
|
|
96
|
-
if (!x || !(x instanceof Element))
|
|
97
|
-
return;
|
|
98
|
-
const {
|
|
99
|
-
left: S,
|
|
100
|
-
top: O,
|
|
101
|
-
width: _,
|
|
102
|
-
height: t
|
|
103
|
-
} = x.getBoundingClientRect();
|
|
104
|
-
r.value = S + (i === "page" ? l.pageXOffset : 0), u.value = O + (i === "page" ? l.pageYOffset : 0), a.value = t, m.value = _;
|
|
105
|
-
const h = c.value - r.value, T = f.value - u.value;
|
|
106
|
-
v.value = _ === 0 || t === 0 || h < 0 || T < 0 || h > _ || T > t, (n || !v.value) && (w.value = h, o.value = T);
|
|
107
|
-
},
|
|
108
|
-
{ immediate: !0 }
|
|
109
|
-
), b(document, "mouseleave", () => {
|
|
110
|
-
v.value = !0;
|
|
111
|
-
})), {
|
|
112
|
-
x: c,
|
|
113
|
-
y: f,
|
|
114
|
-
sourceType: y,
|
|
115
|
-
elementX: w,
|
|
116
|
-
elementY: o,
|
|
117
|
-
elementPositionX: r,
|
|
118
|
-
elementPositionY: u,
|
|
119
|
-
elementHeight: a,
|
|
120
|
-
elementWidth: m,
|
|
121
|
-
isOutside: v,
|
|
122
|
-
stop: g
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
const ne = {
|
|
1
|
+
import { defineComponent as g, ref as n, computed as r, openBlock as d, createElementBlock as S, createElementVNode as i, renderSlot as l, createBlock as T, Teleport as E, normalizeStyle as u, unref as $, createTextVNode as k, toDisplayString as O } from "vue";
|
|
2
|
+
import { u as A, a as B, f as F, o as D, b as I } from "./floating-ui.vue-BmfQDqE-.js";
|
|
3
|
+
import { u as P } from "./index-Ck3Dl09q.js";
|
|
4
|
+
const z = {
|
|
126
5
|
ref: "wrapper",
|
|
127
6
|
class: "stash-tooltip__wrapper tw-relative tw-inline-flex tw-h-fit tw-w-fit"
|
|
128
|
-
},
|
|
7
|
+
}, M = 6, N = 12, X = /* @__PURE__ */ g({
|
|
129
8
|
__name: "Tooltip",
|
|
130
9
|
props: {
|
|
131
10
|
disableTeleport: { type: Boolean, default: !1 },
|
|
@@ -134,59 +13,59 @@ const ne = {
|
|
|
134
13
|
teleportTo: { default: "#stash-menus-mount-node" },
|
|
135
14
|
text: { default: "" }
|
|
136
15
|
},
|
|
137
|
-
setup(
|
|
138
|
-
const
|
|
16
|
+
setup(f) {
|
|
17
|
+
const m = {
|
|
139
18
|
top: "bottom",
|
|
140
19
|
right: "left",
|
|
141
20
|
bottom: "top",
|
|
142
21
|
left: "right"
|
|
143
|
-
},
|
|
144
|
-
whileElementsMounted:
|
|
145
|
-
placement:
|
|
146
|
-
middleware: [
|
|
147
|
-
}),
|
|
148
|
-
var
|
|
149
|
-
const
|
|
22
|
+
}, e = f, a = n(null), p = n(null), c = n(null), { isOutside: h } = P(a), _ = r(() => !h.value || e.isOpen), y = r(() => e.side), { floatingStyles: x, middlewareData: o, placement: v } = A(a, c, {
|
|
23
|
+
whileElementsMounted: B,
|
|
24
|
+
placement: y,
|
|
25
|
+
middleware: [F(), D(N), I({ element: p })]
|
|
26
|
+
}), b = r(() => {
|
|
27
|
+
var s, w;
|
|
28
|
+
const t = m[v.value];
|
|
150
29
|
return {
|
|
151
|
-
left: ((
|
|
152
|
-
top: ((
|
|
153
|
-
[
|
|
30
|
+
left: ((s = o.value.arrow) == null ? void 0 : s.x) != null ? `${o.value.arrow.x}px` : "",
|
|
31
|
+
top: ((w = o.value.arrow) == null ? void 0 : w.y) != null ? `${o.value.arrow.y}px` : "",
|
|
32
|
+
[t]: `-${M}px`
|
|
154
33
|
};
|
|
155
34
|
});
|
|
156
|
-
return (
|
|
157
|
-
|
|
35
|
+
return (t, s) => (d(), S("div", z, [
|
|
36
|
+
i("span", {
|
|
158
37
|
ref_key: "anchor",
|
|
159
|
-
ref:
|
|
38
|
+
ref: a,
|
|
160
39
|
"data-test": "stash-tooltip|anchor",
|
|
161
40
|
class: "stash-tooltip__anchor"
|
|
162
41
|
}, [
|
|
163
|
-
|
|
42
|
+
l(t.$slots, "default")
|
|
164
43
|
], 512),
|
|
165
|
-
(
|
|
166
|
-
to:
|
|
167
|
-
disabled:
|
|
44
|
+
(d(), T(E, {
|
|
45
|
+
to: e.teleportTo,
|
|
46
|
+
disabled: e.disableTeleport
|
|
168
47
|
}, [
|
|
169
|
-
|
|
48
|
+
i("div", {
|
|
170
49
|
ref_key: "tooltip",
|
|
171
50
|
ref: c,
|
|
172
51
|
"data-test": "stash-tooltip",
|
|
173
52
|
class: "stash-tooltip tw-pointer-events-none tw-z-screen tw-flex tw-w-[148px] tw-flex-col tw-items-center tw-whitespace-normal tw-rounded tw-bg-ice-900 tw-p-3 tw-text-center tw-text-xs tw-text-white tw-opacity-0 tw-shadow tw-transition-opacity",
|
|
174
53
|
role: "tooltip",
|
|
175
|
-
style:
|
|
176
|
-
|
|
177
|
-
opacity:
|
|
54
|
+
style: u({
|
|
55
|
+
...$(x),
|
|
56
|
+
opacity: _.value ? 0.95 : 0
|
|
178
57
|
})
|
|
179
58
|
}, [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
59
|
+
l(t.$slots, "icon"),
|
|
60
|
+
l(t.$slots, "content", {}, () => [
|
|
61
|
+
k(O(e.text), 1)
|
|
183
62
|
]),
|
|
184
|
-
|
|
185
|
-
|
|
63
|
+
l(t.$slots, "secondaryIcon"),
|
|
64
|
+
i("div", {
|
|
186
65
|
ref_key: "floatingArrow",
|
|
187
|
-
ref:
|
|
66
|
+
ref: p,
|
|
188
67
|
class: "stash-tooltip__arrow tw-absolute tw-z-behind tw-h-[12px] tw-w-[12px] tw-rotate-45 tw-bg-ice-900",
|
|
189
|
-
style:
|
|
68
|
+
style: u(b.value)
|
|
190
69
|
}, null, 4)
|
|
191
70
|
], 4)
|
|
192
71
|
], 8, ["to", "disabled"]))
|
|
@@ -194,6 +73,6 @@ const ne = {
|
|
|
194
73
|
}
|
|
195
74
|
});
|
|
196
75
|
export {
|
|
197
|
-
|
|
76
|
+
X as default
|
|
198
77
|
};
|
|
199
78
|
//# sourceMappingURL=Tooltip.js.map
|