@quoreadmin/ui 1.10.4 → 1.10.6
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/index.css +1 -1
- package/dist/index131.js +59 -54
- package/dist/index138.js +145 -96
- package/dist/index147.js +1 -1
- package/dist/index182.js +14 -14
- package/dist/index183.js +3 -3
- package/dist/index186.js +4 -4
- package/dist/index193.js +10 -10
- package/dist/index195.js +9 -9
- package/dist/index198.js +17 -17
- package/dist/index201.js +27 -27
- package/dist/index202.js +2 -2
- package/dist/index203.js +2 -2
- package/dist/index204.js +1 -1
- package/dist/index206.js +2 -2
- package/dist/index208.js +14 -14
- package/dist/index209.js +1 -1
- package/dist/index210.js +1 -1
- package/dist/index211.js +3 -3
- package/dist/index212.js +6 -6
- package/dist/index213.js +84 -29
- package/dist/index214.js +400 -109
- package/dist/index215.js +22 -36
- package/dist/index216.js +33 -26
- package/dist/index217.js +111 -31
- package/dist/index218.js +35 -50
- package/dist/index219.js +26 -43
- package/dist/index220.js +35 -3
- package/dist/index221.js +51 -9
- package/dist/index222.js +42 -18
- package/dist/index223.js +4 -10
- package/dist/index224.js +9 -10
- package/dist/index225.js +18 -38
- package/dist/index226.js +10 -21
- package/dist/index227.js +10 -88
- package/dist/index228.js +35 -403
- package/dist/index229.js +21 -22
- package/dist/index230.js +21 -126
- package/dist/index231.js +21 -37
- package/dist/index232.js +20 -80
- package/dist/index233.js +836 -20
- package/dist/index234.js +701 -19
- package/dist/index235.js +175 -19
- package/dist/index236.js +1 -1
- package/dist/index237.js +11 -11
- package/dist/index238.js +21 -160
- package/dist/index239.js +20 -228
- package/dist/index240.js +19 -36
- package/dist/index241.js +20 -10
- package/dist/index242.js +3 -161
- package/dist/index243.js +186 -19
- package/dist/index244.js +132 -21
- package/dist/index245.js +129 -167
- package/dist/index246.js +1199 -46
- package/dist/index247.js +124 -31
- package/dist/index248.js +19 -39
- package/dist/index249.js +11 -11
- package/dist/index250.js +11 -13
- package/dist/index251.js +13 -11
- package/dist/index252.js +21 -819
- package/dist/index253.js +28 -701
- package/dist/index254.js +20 -176
- package/dist/index255.js +12 -14
- package/dist/index256.js +2 -20
- package/dist/index257.js +2 -20
- package/dist/index258.js +3636 -3
- package/dist/index259.js +49 -181
- package/dist/index260.js +72 -128
- package/dist/index261.js +45 -1216
- package/dist/index262.js +215 -20
- package/dist/index263.js +10 -22
- package/dist/index264.js +57 -22
- package/dist/index265.js +61 -29
- package/dist/index266.js +54 -20
- package/dist/index267.js +75 -20
- package/dist/index268.js +726 -2
- package/dist/index269.js +42 -2
- package/dist/index270.js +42 -3614
- package/dist/index271.js +10 -54
- package/dist/index272.js +696 -68
- package/dist/index273.js +819 -51
- package/dist/index274.js +71 -206
- package/dist/index275.js +20 -10
- package/dist/index276.js +20 -57
- package/dist/index277.js +160 -60
- package/dist/index278.js +225 -51
- package/dist/index279.js +37 -75
- package/dist/index280.js +10 -726
- package/dist/index281.js +22 -42
- package/dist/index282.js +190 -55
- package/dist/index283.js +70 -11
- package/dist/index284.js +33 -704
- package/dist/index285.js +37 -817
- package/dist/index290.js +1534 -3
- package/dist/index291.js +382 -23
- package/dist/index292.js +2731 -2
- package/dist/index293.js +78 -71
- package/dist/index294.js +3792 -54
- package/dist/index295.js +59 -25
- package/dist/index296.js +15 -22
- package/dist/index297.js +83 -21
- package/dist/index298.js +201 -15
- package/dist/index299.js +246 -17
- package/dist/index300.js +78 -22
- package/dist/index301.js +73 -256
- package/dist/index302.js +21 -5
- package/dist/index303.js +925 -130
- package/dist/index304.js +21 -72
- package/dist/index305.js +18 -85
- package/dist/index306.js +19 -28
- package/dist/index307.js +68 -15
- package/dist/index308.js +19 -75
- package/dist/index309.js +19 -4
- package/dist/index310.js +54 -2
- package/dist/index311.js +21 -82
- package/dist/index312.js +21 -52
- package/dist/index313.js +63 -6
- package/dist/index314.js +2 -5
- package/dist/index315.js +3 -179
- package/dist/index316.js +25 -61
- package/dist/index317.js +261 -74
- package/dist/index318.js +5 -1533
- package/dist/index319.js +125 -371
- package/dist/index320.js +70 -2728
- package/dist/index321.js +85 -84
- package/dist/index322.js +26 -3789
- package/dist/index323.js +14 -58
- package/dist/index324.js +72 -76
- package/dist/index325.js +3 -21
- package/dist/index326.js +2 -935
- package/dist/index327.js +82 -21
- package/dist/index328.js +52 -19
- package/dist/index329.js +5 -19
- package/dist/index330.js +4 -68
- package/dist/index331.js +178 -18
- package/dist/index332.js +62 -18
- package/dist/index333.js +75 -22
- package/dist/index334.js +19 -15
- package/dist/index335.js +21 -62
- package/dist/index336.js +22 -15
- package/dist/index337.js +16 -84
- package/dist/index338.js +16 -201
- package/dist/index339.js +23 -246
- package/dist/index340.js +36 -9
- package/dist/index341.js +20 -10
- package/dist/index342.js +20 -14
- package/dist/index343.js +64 -10
- package/dist/index344.js +37 -17
- package/dist/index347.js +1 -1
- package/dist/index352.js +1 -1
- package/dist/index356.js +3 -3
- package/dist/index357.js +3 -3
- package/dist/index361.js +10 -2
- package/dist/index362.js +9 -8
- package/dist/index363.js +16 -36
- package/dist/index364.js +2 -19
- package/dist/index365.js +9 -57
- package/dist/index366.js +9 -28
- package/dist/index367.js +14 -7
- package/dist/index368.js +16 -49
- package/dist/index369.js +57 -7
- package/dist/index370.js +27 -10
- package/dist/index371.js +7 -7
- package/dist/index372.js +51 -27
- package/dist/index373.js +7 -2
- package/dist/index374.js +11 -69
- package/dist/index375.js +6 -166
- package/dist/index376.js +28 -20
- package/dist/index377.js +2 -20
- package/dist/index378.js +67 -61
- package/dist/index379.js +166 -36
- package/dist/index38.js +1 -1
- package/dist/index380.js +98 -28
- package/dist/index381.js +90 -10
- package/dist/index382.js +98 -4
- package/dist/index383.js +17 -4
- package/dist/index384.js +30 -12
- package/dist/index385.js +11 -7
- package/dist/index386.js +3 -11
- package/dist/index387.js +3 -4
- package/dist/index388.js +13 -33
- package/dist/index389.js +7 -31
- package/dist/index390.js +12 -28
- package/dist/index391.js +5 -61
- package/dist/index392.js +33 -17
- package/dist/index393.js +29 -99
- package/dist/index394.js +28 -91
- package/dist/index395.js +59 -96
- package/dist/index396.js +1 -1
- package/dist/index401.js +1 -1
- package/dist/index402.js +2 -2
- package/dist/index41.js +5 -5
- package/dist/src/components/comment/comment.d.ts +6 -0
- package/dist/src/components/comment/comment.stories.d.ts +6 -0
- package/dist/src/components/comment-section/comment-section.d.ts +6 -0
- package/dist/src/components/comment-section/comment-section.stories.d.ts +6 -0
- package/dist/src/components/data-filter/data-filter.d.ts +6 -0
- package/dist/src/components/data-list/data-list.d.ts +6 -0
- package/dist/src/components/grid/grid.stories.d.ts +12 -0
- package/dist/src/components/popover/popover.d.ts +6 -0
- package/dist/src/components/popover/popover.stories.d.ts +42 -0
- package/dist/src/components/room-details-popover/room-details-popover.d.ts +6 -0
- package/dist/src/views/lists.vue.d.ts +12 -0
- package/dist/src/views/tables.vue.d.ts +6 -0
- package/package.json +1 -1
package/dist/index131.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, useSlots as U, ref as g, computed as
|
|
1
|
+
import { defineComponent as A, useSlots as U, ref as g, computed as c, onMounted as G, onUnmounted as I, resolveComponent as J, openBlock as w, createElementBlock as p, normalizeClass as a, createElementVNode as r, normalizeStyle as C, unref as B, renderSlot as u, createCommentVNode as $, createVNode as P } from "vue";
|
|
2
2
|
import s from "./index57.js";
|
|
3
3
|
const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-none text-left" }, X = 100, Z = "4.5rem", _ = "4.8125rem", O = 80, le = /* @__PURE__ */ A({
|
|
4
4
|
__name: "page-layout",
|
|
@@ -27,18 +27,18 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
27
27
|
},
|
|
28
28
|
emits: ["update:sidebarCollapsed"],
|
|
29
29
|
setup(o, { expose: R, emit: q }) {
|
|
30
|
-
const l = o, K = q, D = U(), b = g(null),
|
|
31
|
-
let y = 0, x = !1,
|
|
32
|
-
const
|
|
30
|
+
const l = o, K = q, D = U(), b = g(null), m = g(!0), n = g(!1), v = g(!1), S = g(!1), k = g(0);
|
|
31
|
+
let y = 0, x = !1, H = 0;
|
|
32
|
+
const f = c(() => !!D.sidebar), h = c(() => l.headerFixed !== void 0 ? l.headerFixed : f.value), d = c({
|
|
33
33
|
get: () => l.sidebarCollapsed,
|
|
34
34
|
set: (e) => K("update:sidebarCollapsed", e)
|
|
35
|
-
}), N =
|
|
36
|
-
() =>
|
|
37
|
-
), E =
|
|
35
|
+
}), N = c(
|
|
36
|
+
() => f.value && l.sidebarCollapsible && s.md
|
|
37
|
+
), E = c(
|
|
38
38
|
() => `${l.headerTop + O}px`
|
|
39
|
-
), V =
|
|
39
|
+
), V = c(
|
|
40
40
|
() => `calc(100vh - ${l.headerTop + O}px)`
|
|
41
|
-
), z =
|
|
41
|
+
), z = c(
|
|
42
42
|
() => d.value ? l.sidebarCollapsedWidth : l.sidebarWidth
|
|
43
43
|
), F = () => {
|
|
44
44
|
const e = b.value, t = !s.md && e;
|
|
@@ -47,41 +47,46 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
47
47
|
atTop: t ? e.scrollTop <= 0 : window.scrollY <= 0,
|
|
48
48
|
atBottom: t ? e.scrollTop + e.clientHeight >= e.scrollHeight : window.scrollY + window.innerHeight >= document.documentElement.scrollHeight
|
|
49
49
|
};
|
|
50
|
-
},
|
|
50
|
+
}, T = () => {
|
|
51
51
|
x || (window.requestAnimationFrame(() => {
|
|
52
|
-
const { scrollY: e, atTop: t, atBottom:
|
|
53
|
-
if (
|
|
52
|
+
const { scrollY: e, atTop: t, atBottom: i } = F();
|
|
53
|
+
if (m.value = t, n.value = i, l.headerHideOnScroll && (h.value || !s.md)) {
|
|
54
54
|
if (e <= l.headerHideScrollThreshold) {
|
|
55
|
-
|
|
55
|
+
v.value = !1, y = e, x = !1;
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
58
|
+
if (i) {
|
|
59
59
|
y = e, x = !1;
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
Math.abs(
|
|
62
|
+
const W = Math.max(0, e), j = W - y;
|
|
63
|
+
Math.abs(j) > 15 && (v.value = j > 0, y = W);
|
|
64
64
|
} else
|
|
65
|
-
|
|
65
|
+
v.value = !1;
|
|
66
66
|
x = !1;
|
|
67
67
|
}), x = !0);
|
|
68
68
|
}, Y = () => {
|
|
69
69
|
d.value = !d.value;
|
|
70
70
|
}, L = () => {
|
|
71
71
|
if (!l.adjustForKeyboard || s.md) return;
|
|
72
|
-
const e = window.visualViewport?.height ?? window.innerHeight, t =
|
|
73
|
-
t <= X
|
|
72
|
+
const e = window.visualViewport?.height ?? window.innerHeight, t = H - e;
|
|
73
|
+
if (t <= X)
|
|
74
|
+
H = window.innerHeight, k.value = 0;
|
|
75
|
+
else {
|
|
76
|
+
const i = Math.max(0, H - window.innerHeight);
|
|
77
|
+
k.value = Math.max(0, t - i);
|
|
78
|
+
}
|
|
74
79
|
};
|
|
75
80
|
return G(() => {
|
|
76
|
-
|
|
81
|
+
H = window.innerHeight, window.addEventListener("scroll", T, { passive: !0 }), b.value && b.value.addEventListener("scroll", T, {
|
|
77
82
|
passive: !0
|
|
78
83
|
});
|
|
79
|
-
const { scrollY: e, atTop: t, atBottom:
|
|
80
|
-
y = e,
|
|
84
|
+
const { scrollY: e, atTop: t, atBottom: i } = F();
|
|
85
|
+
y = e, m.value = t, n.value = i, l.adjustForKeyboard && window.visualViewport?.addEventListener("resize", L);
|
|
81
86
|
}), I(() => {
|
|
82
|
-
window.removeEventListener("scroll",
|
|
83
|
-
}), R({ scrolledToTop:
|
|
84
|
-
const
|
|
87
|
+
window.removeEventListener("scroll", T), b.value?.removeEventListener("scroll", T), window.visualViewport?.removeEventListener("resize", L);
|
|
88
|
+
}), R({ scrolledToTop: m, scrolledToBottom: n, headerHidden: v, keyboardOffset: k }), (e, t) => {
|
|
89
|
+
const i = J("q-icon");
|
|
85
90
|
return w(), p("div", {
|
|
86
91
|
class: a([
|
|
87
92
|
"page-layout",
|
|
@@ -94,10 +99,10 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
94
99
|
"page-layout__header",
|
|
95
100
|
"flex items-center justify-center",
|
|
96
101
|
B(s).md ? `bg-${o.containerBackgroundColor}` : "",
|
|
97
|
-
|
|
98
|
-
{ "page-layout__header--hidden":
|
|
102
|
+
h.value ? "fixed left-0 w-full sm-down:z-50 md:z-[45] md:pt-6 md:px-6" : "md:mb-4 relative sm-down:absolute sm-down:top-0 sm-down:inset-x-0 sm-down:z-50",
|
|
103
|
+
{ "page-layout__header--hidden": v.value }
|
|
99
104
|
]),
|
|
100
|
-
style: C(
|
|
105
|
+
style: C(h.value ? { top: `${o.headerTop}px` } : void 0)
|
|
101
106
|
}, [
|
|
102
107
|
r("div", {
|
|
103
108
|
class: a([
|
|
@@ -109,17 +114,17 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
109
114
|
`text-${o.headerColor}`,
|
|
110
115
|
o.headerBarClass,
|
|
111
116
|
{
|
|
112
|
-
"md:shadow-[0_0.375rem_0.5rem_0_rgba(0,0,0,0.05)] md:shadow-gray-20":
|
|
117
|
+
"md:shadow-[0_0.375rem_0.5rem_0_rgba(0,0,0,0.05)] md:shadow-gray-20": h.value && (!m.value || o.headerShowShadow)
|
|
113
118
|
}
|
|
114
119
|
])
|
|
115
120
|
}, [
|
|
116
121
|
r("h1", Q, [
|
|
117
|
-
|
|
118
|
-
scrolledToTop:
|
|
122
|
+
u(e.$slots, "header", {
|
|
123
|
+
scrolledToTop: m.value,
|
|
119
124
|
scrolledToBottom: n.value
|
|
120
125
|
}, void 0, !0)
|
|
121
126
|
]),
|
|
122
|
-
|
|
127
|
+
u(e.$slots, "header-actions", {}, void 0, !0)
|
|
123
128
|
], 2)
|
|
124
129
|
], 6),
|
|
125
130
|
r("div", {
|
|
@@ -129,12 +134,12 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
129
134
|
"page-layout__content",
|
|
130
135
|
"sm-down:absolute sm-down:left-0 sm-down:right-0",
|
|
131
136
|
"sm-down:overflow-y-auto sm-down:scroll-smooth sm-down:overscroll-none",
|
|
132
|
-
{ "md:pt-[4.5rem]":
|
|
133
|
-
{ "md:mb-[0.5rem]":
|
|
137
|
+
{ "md:pt-[4.5rem]": h.value },
|
|
138
|
+
{ "md:mb-[0.5rem]": h.value && l.footerVisible },
|
|
134
139
|
o.contentClass
|
|
135
140
|
]),
|
|
136
141
|
style: C({
|
|
137
|
-
"--sm-top":
|
|
142
|
+
"--sm-top": v.value ? "0px" : Z,
|
|
138
143
|
"--sm-bottom": l.footerVisible ? _ : "0px",
|
|
139
144
|
"--keyboard-offset": `${k.value}px`
|
|
140
145
|
})
|
|
@@ -142,10 +147,10 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
142
147
|
r("div", {
|
|
143
148
|
class: a([
|
|
144
149
|
"page-layout__content-inner",
|
|
145
|
-
{ "md:flex md:gap-4":
|
|
150
|
+
{ "md:flex md:gap-4": f.value }
|
|
146
151
|
])
|
|
147
152
|
}, [
|
|
148
|
-
|
|
153
|
+
f.value && B(s).md ? (w(), p("div", {
|
|
149
154
|
key: 0,
|
|
150
155
|
class: a([
|
|
151
156
|
"page-layout__sidebar",
|
|
@@ -155,8 +160,8 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
155
160
|
{ "!overflow-hidden": d.value },
|
|
156
161
|
o.sidebarClass
|
|
157
162
|
]),
|
|
158
|
-
onMouseenter: t[0] || (t[0] = (
|
|
159
|
-
onMouseleave: t[1] || (t[1] = (
|
|
163
|
+
onMouseenter: t[0] || (t[0] = (M) => S.value = !0),
|
|
164
|
+
onMouseleave: t[1] || (t[1] = (M) => S.value = !1)
|
|
160
165
|
}, [
|
|
161
166
|
r("div", {
|
|
162
167
|
class: a([
|
|
@@ -171,7 +176,7 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
171
176
|
height: V.value
|
|
172
177
|
})
|
|
173
178
|
}, [
|
|
174
|
-
|
|
179
|
+
u(e.$slots, "sidebar", {}, void 0, !0)
|
|
175
180
|
], 6),
|
|
176
181
|
d.value ? (w(), p("div", {
|
|
177
182
|
key: 0,
|
|
@@ -181,8 +186,8 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
181
186
|
height: `calc(${V.value} - 2.5rem)`
|
|
182
187
|
}),
|
|
183
188
|
onClick: Y
|
|
184
|
-
}, null, 4)) :
|
|
185
|
-
N.value && (
|
|
189
|
+
}, null, 4)) : $("", !0),
|
|
190
|
+
N.value && (S.value || d.value) ? (w(), p("div", {
|
|
186
191
|
key: 1,
|
|
187
192
|
class: a([
|
|
188
193
|
"page-layout__sidebar-toggle",
|
|
@@ -199,8 +204,8 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
199
204
|
}),
|
|
200
205
|
onClick: Y
|
|
201
206
|
}, [
|
|
202
|
-
|
|
203
|
-
P(
|
|
207
|
+
u(e.$slots, "sidebar-toggle", { collapsed: d.value }, () => [
|
|
208
|
+
P(i, {
|
|
204
209
|
icon: "double-chevron-right",
|
|
205
210
|
color: "inkwell-30",
|
|
206
211
|
type: "",
|
|
@@ -211,25 +216,25 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
211
216
|
])
|
|
212
217
|
}, null, 8, ["class"])
|
|
213
218
|
], !0)
|
|
214
|
-
], 6)) :
|
|
215
|
-
], 34)) :
|
|
219
|
+
], 6)) : $("", !0)
|
|
220
|
+
], 34)) : $("", !0),
|
|
216
221
|
r("div", {
|
|
217
222
|
class: a([
|
|
218
223
|
"page-layout__main",
|
|
219
224
|
"block w-full grow leading-normal",
|
|
220
|
-
{ "md:mb-4":
|
|
225
|
+
{ "md:mb-4": f.value },
|
|
221
226
|
o.mainClass
|
|
222
227
|
])
|
|
223
228
|
}, [
|
|
224
|
-
|
|
229
|
+
u(e.$slots, "default", {
|
|
225
230
|
sidebarCollapsed: d.value,
|
|
226
|
-
scrolledToTop:
|
|
231
|
+
scrolledToTop: m.value,
|
|
227
232
|
scrolledToBottom: n.value
|
|
228
233
|
}, void 0, !0)
|
|
229
234
|
], 2)
|
|
230
235
|
], 2)
|
|
231
236
|
], 6),
|
|
232
|
-
|
|
237
|
+
u(e.$slots, "overlay", {}, void 0, !0),
|
|
233
238
|
l.footerVisible ? (w(), p("div", {
|
|
234
239
|
key: 0,
|
|
235
240
|
class: a([
|
|
@@ -249,7 +254,7 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
249
254
|
r("div", {
|
|
250
255
|
class: a([
|
|
251
256
|
"shrink-0 w-0 transition-[width] duration-300",
|
|
252
|
-
|
|
257
|
+
f.value ? z.value : "hidden"
|
|
253
258
|
])
|
|
254
259
|
}, null, 2),
|
|
255
260
|
r("div", {
|
|
@@ -269,14 +274,14 @@ const Q = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
269
274
|
o.footerBarClass
|
|
270
275
|
])
|
|
271
276
|
}, [
|
|
272
|
-
|
|
277
|
+
u(e.$slots, "footer", { scrolledToBottom: n.value }, void 0, !0)
|
|
273
278
|
], 2)
|
|
274
279
|
], 2)
|
|
275
|
-
], 2)) :
|
|
280
|
+
], 2)) : u(e.$slots, "footer", {
|
|
276
281
|
key: 1,
|
|
277
282
|
scrolledToBottom: n.value
|
|
278
283
|
}, void 0, !0)
|
|
279
|
-
], 2)) :
|
|
284
|
+
], 2)) : $("", !0)
|
|
280
285
|
], 2);
|
|
281
286
|
};
|
|
282
287
|
}
|
package/dist/index138.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { onClickOutside as
|
|
3
|
-
import { useThrottleFn as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as _, ref as g, computed as O, onMounted as D, onUnmounted as G, watch as U, nextTick as k } from "vue";
|
|
2
|
+
import { onClickOutside as q } from "./index173.js";
|
|
3
|
+
import { useThrottleFn as x } from "./index184.js";
|
|
4
|
+
const te = _({
|
|
5
5
|
name: "QPopover",
|
|
6
6
|
props: {
|
|
7
7
|
/** Aligns the popover accordingly with the trigger.
|
|
@@ -84,175 +84,224 @@ const Z = A({
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:modelValue"],
|
|
87
|
-
setup(o, { emit:
|
|
88
|
-
const
|
|
87
|
+
setup(o, { emit: m }) {
|
|
88
|
+
const h = g(!1), w = g(""), s = g(null), v = g(0), p = g(null), V = g({
|
|
89
89
|
top: "0",
|
|
90
90
|
left: "0",
|
|
91
91
|
transform: "none"
|
|
92
|
-
}),
|
|
92
|
+
}), H = O(() => (v.value, h.value === !0 && o.reposition === !0 ? B(o.align) : o.align)), E = O(() => (v.value, h.value === !0 && o.reposition === !0 ? C(o.position) : o.position)), B = (t) => {
|
|
93
93
|
if (!s.value) return t;
|
|
94
94
|
const e = o.teleport ? document.querySelector(".q-popover.teleported") : s.value.children[1];
|
|
95
|
-
if (!e ||
|
|
96
|
-
const n = s.value.children[0].getBoundingClientRect(),
|
|
95
|
+
if (!e || S(e)) return t;
|
|
96
|
+
const n = s.value.children[0].getBoundingClientRect(), c = e.getBoundingClientRect();
|
|
97
97
|
if (t === "left" || t === "right" || t === "center") {
|
|
98
98
|
const l = n.left;
|
|
99
|
-
return window.innerWidth - l <
|
|
99
|
+
return window.innerWidth - l < c.width ? "right" : "left";
|
|
100
100
|
} else {
|
|
101
101
|
const l = n.top;
|
|
102
|
-
return window.innerHeight - l <
|
|
102
|
+
return window.innerHeight - l < c.height ? "bottom" : "top";
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, C = (t) => {
|
|
105
105
|
if (!s.value) return t;
|
|
106
106
|
const e = o.teleport ? document.querySelector(".q-popover.teleported") : s.value.children[1];
|
|
107
|
-
if (!e ||
|
|
108
|
-
const n = s.value.children[0].getBoundingClientRect(),
|
|
107
|
+
if (!e || S(e)) return t;
|
|
108
|
+
const n = s.value.children[0].getBoundingClientRect(), c = e.getBoundingClientRect();
|
|
109
109
|
if (t === "top" || t === "bottom") {
|
|
110
|
+
if (o.teleport && v.value > 0) {
|
|
111
|
+
const i = window.innerHeight - n.bottom - 10, a = n.top - 10, b = 100;
|
|
112
|
+
return t === "bottom" && a > i + b ? "top" : t === "top" && i > a + b ? "bottom" : t;
|
|
113
|
+
}
|
|
110
114
|
const l = n.top;
|
|
111
|
-
return window.innerHeight - l <
|
|
115
|
+
return window.innerHeight - l < c.height ? "top" : "bottom";
|
|
112
116
|
} else {
|
|
113
117
|
const l = n.left;
|
|
114
|
-
return window.innerWidth - l <
|
|
118
|
+
return window.innerWidth - l < c.width ? "left" : "right";
|
|
115
119
|
}
|
|
116
|
-
},
|
|
120
|
+
}, S = (t) => {
|
|
117
121
|
if (!t) return !1;
|
|
118
122
|
const e = t.getBoundingClientRect();
|
|
119
123
|
return e ? e.top >= 0 && e.left >= 0 && e.bottom <= (window.innerHeight || document.documentElement.clientHeight) && e.right <= (window.innerWidth || document.documentElement.clientWidth) : !1;
|
|
120
|
-
},
|
|
124
|
+
}, P = () => {
|
|
121
125
|
if (!s.value) return !0;
|
|
122
126
|
const t = s.value.children[0];
|
|
123
127
|
if (!t) return !0;
|
|
124
128
|
const e = t.getBoundingClientRect();
|
|
125
129
|
let n = t.parentElement;
|
|
126
130
|
for (; n; ) {
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
const
|
|
130
|
-
if (!(e.bottom >
|
|
131
|
+
const u = getComputedStyle(n), i = u.overflowY, a = u.overflowX;
|
|
132
|
+
if (i === "auto" || i === "scroll" || (a === "auto" || a === "scroll")) {
|
|
133
|
+
const y = n.getBoundingClientRect();
|
|
134
|
+
if (!(e.bottom > y.top && e.top < y.bottom && e.right > y.left && e.left < y.right))
|
|
131
135
|
return !1;
|
|
132
136
|
}
|
|
133
137
|
n = n.parentElement;
|
|
134
138
|
}
|
|
135
|
-
const
|
|
136
|
-
return e.bottom > 0 && e.top <
|
|
137
|
-
},
|
|
139
|
+
const c = window.innerHeight || document.documentElement.clientHeight, l = window.innerWidth || document.documentElement.clientWidth;
|
|
140
|
+
return e.bottom > 0 && e.top < c && e.right > 0 && e.left < l;
|
|
141
|
+
}, Y = (t) => {
|
|
142
|
+
let e = t.parentElement;
|
|
143
|
+
for (; e && e !== document.documentElement; ) {
|
|
144
|
+
const c = getComputedStyle(e).overflowY;
|
|
145
|
+
if ((c === "auto" || c === "scroll") && e.scrollHeight > e.clientHeight)
|
|
146
|
+
return e;
|
|
147
|
+
e = e.parentElement;
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
}, T = () => {
|
|
138
151
|
if (!o.teleport || !o.scrollIntoView || !o.modelValue) return;
|
|
139
152
|
const t = document.querySelector(".q-popover.teleported");
|
|
140
153
|
if (!t) return;
|
|
141
|
-
const e = t.getBoundingClientRect(), n = o.scrollIntoViewPadding,
|
|
142
|
-
let
|
|
143
|
-
e.bottom + n >
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
154
|
+
const e = t.getBoundingClientRect(), n = o.scrollIntoViewPadding, c = window.innerHeight, l = window.innerWidth;
|
|
155
|
+
let r = 0, u = 0;
|
|
156
|
+
if (e.bottom + n > c ? u = e.bottom + n - c : e.top - n < 0 && (u = e.top - n), e.right + n > l ? r = e.right + n - l : e.left - n < 0 && (r = e.left - n), !(r === 0 && u === 0)) {
|
|
157
|
+
if (s.value) {
|
|
158
|
+
const i = s.value.children[0];
|
|
159
|
+
if (i) {
|
|
160
|
+
const a = Y(i);
|
|
161
|
+
if (a) {
|
|
162
|
+
const b = a.scrollTop;
|
|
163
|
+
a.scrollBy({
|
|
164
|
+
top: u,
|
|
165
|
+
left: r,
|
|
166
|
+
behavior: "smooth"
|
|
167
|
+
}), requestAnimationFrame(() => {
|
|
168
|
+
a.scrollTop !== b && (f(), d());
|
|
169
|
+
});
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
window.scrollBy({
|
|
175
|
+
top: u,
|
|
176
|
+
left: r,
|
|
177
|
+
behavior: "smooth"
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}, L = () => {
|
|
149
181
|
if (!o.teleport || !o.scrollIntoView) return;
|
|
150
|
-
|
|
182
|
+
R();
|
|
151
183
|
const t = document.querySelector(".q-popover.teleported");
|
|
152
|
-
t && (
|
|
153
|
-
setTimeout(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
},
|
|
160
|
-
o.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
184
|
+
t && (p.value = new ResizeObserver(() => {
|
|
185
|
+
setTimeout(() => {
|
|
186
|
+
v.value++, f(), d(), T();
|
|
187
|
+
}, 50);
|
|
188
|
+
}), p.value.observe(t));
|
|
189
|
+
}, R = () => {
|
|
190
|
+
p.value && (p.value.disconnect(), p.value = null);
|
|
191
|
+
}, d = () => {
|
|
192
|
+
if (!o.teleport || !o.scrollIntoView || !o.modelValue || !s.value) return;
|
|
193
|
+
const t = s.value.children[0];
|
|
194
|
+
if (!t) return;
|
|
195
|
+
const e = t.getBoundingClientRect(), n = 10, c = o.scrollIntoViewPadding, l = window.innerHeight, r = E.value, u = 200;
|
|
196
|
+
let i;
|
|
197
|
+
if (r === "bottom") {
|
|
198
|
+
const a = e.bottom + n;
|
|
199
|
+
i = l - a - c;
|
|
200
|
+
} else r === "top" ? i = e.top - n - c : i = l - c * 2;
|
|
201
|
+
i = Math.max(i, u), V.value = {
|
|
202
|
+
...V.value,
|
|
203
|
+
maxHeight: `${i}px`,
|
|
204
|
+
overflowY: "auto"
|
|
205
|
+
};
|
|
206
|
+
}, z = () => {
|
|
207
|
+
(o.trigger === "click" || o.trigger === "both") && m("update:modelValue", !o.modelValue);
|
|
208
|
+
}, X = () => {
|
|
209
|
+
o.trigger !== "click" && m("update:modelValue", !1);
|
|
210
|
+
}, $ = () => {
|
|
211
|
+
o.trigger !== "click" && m("update:modelValue", !0);
|
|
212
|
+
}, A = () => {
|
|
164
213
|
const t = s.value?.children[0];
|
|
165
214
|
if (t) {
|
|
166
215
|
const e = t.clientWidth, n = t.clientHeight;
|
|
167
|
-
switch (
|
|
216
|
+
switch (H.value) {
|
|
168
217
|
case "left":
|
|
169
|
-
|
|
218
|
+
w.value = `margin-left: ${e / 2 - 10}px;`;
|
|
170
219
|
break;
|
|
171
220
|
case "right":
|
|
172
|
-
|
|
221
|
+
w.value = `margin-right: ${e / 2 - 10}px;`;
|
|
173
222
|
break;
|
|
174
223
|
case "top":
|
|
175
|
-
|
|
224
|
+
w.value = `margin-top: ${n / 2 - 10}px;`;
|
|
176
225
|
break;
|
|
177
226
|
case "bottom":
|
|
178
|
-
|
|
227
|
+
w.value = `margin-bottom: ${n / 2 - 10}px;`;
|
|
179
228
|
break;
|
|
180
229
|
}
|
|
181
230
|
}
|
|
182
|
-
},
|
|
231
|
+
}, f = () => {
|
|
183
232
|
if (!s.value || !o.teleport) return;
|
|
184
233
|
const t = s.value.children[0];
|
|
185
234
|
if (!t) return;
|
|
186
|
-
const e = t.getBoundingClientRect(), n = 10,
|
|
187
|
-
let
|
|
188
|
-
|
|
189
|
-
top: `${
|
|
190
|
-
left: `${
|
|
191
|
-
transform:
|
|
235
|
+
const e = t.getBoundingClientRect(), n = 10, c = E.value, l = H.value;
|
|
236
|
+
let r = 0, u = 0, i = "none";
|
|
237
|
+
c === "bottom" ? (r = e.bottom + n, l === "left" ? (u = e.left, i = "none") : l === "right" ? (u = e.right, i = "translateX(-100%)") : l === "center" && (u = e.left + e.width / 2, i = "translateX(-50%)")) : c === "top" ? (r = e.top - n, i = "translateY(-100%)", l === "left" ? u = e.left : l === "right" ? (u = e.right, i = "translate(-100%, -100%)") : l === "center" && (u = e.left + e.width / 2, i = "translate(-50%, -100%)")) : c === "left" ? (u = e.left - n, i = "translateX(-100%)", l === "top" ? r = e.top : l === "bottom" ? (r = e.bottom, i = "translate(-100%, -100%)") : l === "middle" && (r = e.top + e.height / 2, i = "translate(-100%, -50%)")) : c === "right" && (u = e.right + n, l === "top" ? (r = e.top, i = "none") : l === "bottom" ? (r = e.bottom, i = "translateY(-100%)") : l === "middle" && (r = e.top + e.height / 2, i = "translateY(-50%)")), V.value = {
|
|
238
|
+
top: `${r}px`,
|
|
239
|
+
left: `${u}px`,
|
|
240
|
+
transform: i
|
|
192
241
|
};
|
|
193
|
-
},
|
|
194
|
-
o.teleport && o.modelValue &&
|
|
195
|
-
},
|
|
242
|
+
}, M = () => {
|
|
243
|
+
o.teleport && o.modelValue && (f(), d());
|
|
244
|
+
}, F = () => {
|
|
196
245
|
if (o.teleport && o.modelValue) {
|
|
197
|
-
if (o.closeOnScrollOutOfView && !
|
|
198
|
-
|
|
246
|
+
if (o.closeOnScrollOutOfView && !P()) {
|
|
247
|
+
m("update:modelValue", !1);
|
|
199
248
|
return;
|
|
200
249
|
}
|
|
201
|
-
o.followScroll &&
|
|
250
|
+
o.followScroll && (f(), d());
|
|
202
251
|
}
|
|
203
|
-
},
|
|
204
|
-
|
|
252
|
+
}, I = x(M, 16, !0), W = x(F, 16, !0);
|
|
253
|
+
q(s, (t) => {
|
|
205
254
|
if (o.teleport) {
|
|
206
255
|
const e = document.querySelector(".q-popover.teleported");
|
|
207
256
|
if (e && e.contains(t.target))
|
|
208
257
|
return;
|
|
209
258
|
}
|
|
210
|
-
o.modelValue &&
|
|
259
|
+
o.modelValue && m("update:modelValue", !1);
|
|
211
260
|
});
|
|
212
|
-
function
|
|
213
|
-
|
|
261
|
+
function N() {
|
|
262
|
+
h.value = !1, v.value = 0, R();
|
|
214
263
|
}
|
|
215
|
-
function
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
264
|
+
function Q() {
|
|
265
|
+
h.value = !0, o.teleport ? k(() => {
|
|
266
|
+
f(), o.scrollIntoView && setTimeout(() => {
|
|
267
|
+
d(), L(), T();
|
|
219
268
|
}, 100);
|
|
220
|
-
}) : !
|
|
269
|
+
}) : !S(s.value?.children[1]) && o.reposition === !0 && A();
|
|
221
270
|
}
|
|
222
|
-
return
|
|
223
|
-
o.teleport && (window.addEventListener("resize",
|
|
224
|
-
}),
|
|
225
|
-
o.teleport && (window.removeEventListener("resize",
|
|
226
|
-
}),
|
|
271
|
+
return D(() => {
|
|
272
|
+
o.teleport && (window.addEventListener("resize", I), window.addEventListener("scroll", W, !0));
|
|
273
|
+
}), G(() => {
|
|
274
|
+
o.teleport && (window.removeEventListener("resize", I), window.removeEventListener("scroll", W, !0)), R();
|
|
275
|
+
}), U(
|
|
227
276
|
() => o.modelValue,
|
|
228
277
|
(t) => {
|
|
229
|
-
o.teleport && t &&
|
|
230
|
-
|
|
278
|
+
o.teleport && t && k(() => {
|
|
279
|
+
f(), d();
|
|
231
280
|
});
|
|
232
281
|
}
|
|
233
282
|
), {
|
|
234
283
|
// Refs
|
|
235
|
-
entered:
|
|
236
|
-
offsetStyle:
|
|
284
|
+
entered: h,
|
|
285
|
+
offsetStyle: w,
|
|
237
286
|
popover: s,
|
|
238
287
|
teleportedStyle: V,
|
|
239
288
|
// Computed
|
|
240
|
-
alignment:
|
|
241
|
-
positioning:
|
|
289
|
+
alignment: H,
|
|
290
|
+
positioning: E,
|
|
242
291
|
// Methods
|
|
243
|
-
getAlignment:
|
|
244
|
-
getPositioning:
|
|
245
|
-
isElementInView:
|
|
246
|
-
onAfterLeave:
|
|
247
|
-
onClick:
|
|
248
|
-
onClickOutside:
|
|
249
|
-
onEnter:
|
|
250
|
-
onMouseLeave:
|
|
251
|
-
onMouseOver:
|
|
252
|
-
updateTeleportedPosition:
|
|
292
|
+
getAlignment: B,
|
|
293
|
+
getPositioning: C,
|
|
294
|
+
isElementInView: S,
|
|
295
|
+
onAfterLeave: N,
|
|
296
|
+
onClick: z,
|
|
297
|
+
onClickOutside: q,
|
|
298
|
+
onEnter: Q,
|
|
299
|
+
onMouseLeave: X,
|
|
300
|
+
onMouseOver: $,
|
|
301
|
+
updateTeleportedPosition: f
|
|
253
302
|
};
|
|
254
303
|
}
|
|
255
304
|
});
|
|
256
305
|
export {
|
|
257
|
-
|
|
306
|
+
te as default
|
|
258
307
|
};
|
package/dist/index147.js
CHANGED
|
@@ -751,7 +751,7 @@ const Pt = 996, Zt = It({
|
|
|
751
751
|
}, dt = (e) => {
|
|
752
752
|
Ne(), b.value = e;
|
|
753
753
|
}, mt = async (e) => {
|
|
754
|
-
if (
|
|
754
|
+
if (E.value = e, O.value = [], g.value.issue = null, p.value.problem = null, v.value.item = null, v.value.issue = null, d.value.item = null, !E.value) {
|
|
755
755
|
y.value.actionItems = !1;
|
|
756
756
|
return;
|
|
757
757
|
}
|
package/dist/index182.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import st from "./
|
|
1
|
+
import st from "./index216.js";
|
|
2
2
|
import { reactive as V, watch as h, ref as g, defineComponent as Z, useSlots as H, h as K, Fragment as at, inject as ct, computed as A, toRaw as lt, unref as x } from "vue";
|
|
3
|
-
import { unrefElement as ut, useIntersectionObserver as ft, useEventListener as m } from "./
|
|
4
|
-
import { tryOnUnmounted as pt, isObject as yt } from "./
|
|
5
|
-
import D, { getFrameData as dt } from "./
|
|
6
|
-
import { complex as $ } from "./
|
|
7
|
-
import { inertia as mt } from "./
|
|
8
|
-
import { animate as bt } from "./
|
|
9
|
-
import { velocityPerSecond as ht } from "./
|
|
10
|
-
import { number as vt, alpha as C, scale as j } from "./
|
|
11
|
-
import { filter as P } from "./
|
|
12
|
-
import { px as c, progressPercentage as F, degrees as O } from "./
|
|
13
|
-
import { color as b } from "./
|
|
14
|
-
import { cubicBezier as gt } from "./
|
|
15
|
-
import { bounceOut as Ot, bounceInOut as Tt, bounceIn as At, anticipate as xt, backOut as jt, backInOut as Vt, backIn as St, circOut as Ct, circInOut as Et, circIn as Nt, easeOut as Pt, easeInOut as _t, easeIn as wt, linear as Rt } from "./
|
|
3
|
+
import { unrefElement as ut, useIntersectionObserver as ft, useEventListener as m } from "./index217.js";
|
|
4
|
+
import { tryOnUnmounted as pt, isObject as yt } from "./index218.js";
|
|
5
|
+
import D, { getFrameData as dt } from "./index219.js";
|
|
6
|
+
import { complex as $ } from "./index220.js";
|
|
7
|
+
import { inertia as mt } from "./index221.js";
|
|
8
|
+
import { animate as bt } from "./index222.js";
|
|
9
|
+
import { velocityPerSecond as ht } from "./index223.js";
|
|
10
|
+
import { number as vt, alpha as C, scale as j } from "./index224.js";
|
|
11
|
+
import { filter as P } from "./index225.js";
|
|
12
|
+
import { px as c, progressPercentage as F, degrees as O } from "./index226.js";
|
|
13
|
+
import { color as b } from "./index227.js";
|
|
14
|
+
import { cubicBezier as gt } from "./index228.js";
|
|
15
|
+
import { bounceOut as Ot, bounceInOut as Tt, bounceIn as At, anticipate as xt, backOut as jt, backInOut as Vt, backIn as St, circOut as Ct, circInOut as Et, circIn as Nt, easeOut as Pt, easeInOut as _t, easeIn as wt, linear as Rt } from "./index229.js";
|
|
16
16
|
const R = {};
|
|
17
17
|
class Mt {
|
|
18
18
|
subscriptions = /* @__PURE__ */ new Set();
|