@quoreadmin/ui 1.10.2 → 1.10.4
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 +113 -107
- package/dist/index138.js +56 -55
- 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 +10 -10
- package/dist/index198.js +17 -17
- package/dist/index201.js +28 -28
- 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 +29 -84
- package/dist/index214.js +109 -400
- package/dist/index215.js +36 -22
- package/dist/index216.js +26 -127
- package/dist/index217.js +35 -37
- package/dist/index218.js +51 -80
- package/dist/index219.js +42 -19
- package/dist/index220.js +3 -19
- package/dist/index221.js +9 -20
- package/dist/index222.js +18 -19
- package/dist/index223.js +10 -20
- package/dist/index224.js +9 -3635
- package/dist/index225.js +38 -54
- package/dist/index226.js +21 -77
- package/dist/index227.js +84 -48
- package/dist/index228.js +395 -203
- package/dist/index229.js +21 -9
- package/dist/index230.js +121 -51
- package/dist/index231.js +32 -55
- package/dist/index232.js +79 -53
- package/dist/index233.js +20 -75
- package/dist/index234.js +19 -725
- package/dist/index235.js +20 -42
- package/dist/index236.js +20 -64
- package/dist/index237.js +20 -11
- package/dist/index238.js +156 -700
- package/dist/index239.js +208 -800
- package/dist/index240.js +34 -30
- package/dist/index241.js +10 -116
- package/dist/index242.js +159 -34
- package/dist/index243.js +20 -26
- package/dist/index244.js +21 -35
- package/dist/index245.js +193 -45
- package/dist/index246.js +66 -39
- package/dist/index247.js +34 -4
- package/dist/index248.js +40 -9
- package/dist/index249.js +21 -18
- package/dist/index250.js +22 -10
- package/dist/index251.js +20 -10
- package/dist/index252.js +835 -38
- package/dist/index253.js +702 -21
- package/dist/index254.js +175 -160
- package/dist/index255.js +22 -228
- package/dist/index256.js +19 -36
- package/dist/index257.js +20 -10
- package/dist/index258.js +3 -22
- package/dist/index259.js +186 -21
- package/dist/index260.js +132 -19
- package/dist/index261.js +1131 -744
- package/dist/index262.js +19 -701
- package/dist/index263.js +22 -176
- package/dist/index264.js +8 -8
- package/dist/index265.js +22 -13
- package/dist/index266.js +10 -10
- package/dist/index267.js +20 -3
- package/dist/index268.js +2 -187
- package/dist/index269.js +2 -133
- package/dist/index270.js +3624 -149
- package/dist/index271.js +48 -1216
- package/dist/index272.js +77 -20
- package/dist/index273.js +52 -22
- package/dist/index274.js +215 -20
- package/dist/index275.js +10 -22
- package/dist/index276.js +57 -29
- package/dist/index277.js +61 -20
- package/dist/index278.js +54 -20
- package/dist/index279.js +75 -2
- package/dist/index280.js +726 -2
- package/dist/index281.js +42 -22
- package/dist/index282.js +55 -190
- package/dist/index283.js +11 -70
- package/dist/index284.js +704 -33
- package/dist/index285.js +817 -37
- package/dist/index290.js +3 -2
- package/dist/index291.js +25 -77
- package/dist/index292.js +2 -1534
- package/dist/index293.js +67 -374
- package/dist/index294.js +54 -2731
- package/dist/index295.js +25 -85
- package/dist/index296.js +22 -3792
- package/dist/index297.js +21 -59
- package/dist/index298.js +16 -15
- package/dist/index299.js +17 -84
- package/dist/index300.js +22 -201
- package/dist/index301.js +247 -231
- package/dist/index302.js +6 -3
- package/dist/index303.js +136 -23
- package/dist/index304.js +71 -52
- package/dist/index305.js +86 -25
- package/dist/index306.js +28 -21
- package/dist/index307.js +14 -20
- package/dist/index308.js +75 -16
- package/dist/index309.js +4 -17
- package/dist/index310.js +2 -23
- package/dist/index311.js +78 -74
- package/dist/index312.js +52 -21
- package/dist/index313.js +5 -934
- package/dist/index314.js +4 -21
- package/dist/index315.js +178 -19
- package/dist/index316.js +62 -19
- package/dist/index317.js +74 -68
- package/dist/index318.js +1534 -19
- package/dist/index319.js +386 -19
- package/dist/index320.js +2731 -22
- package/dist/index321.js +85 -21
- package/dist/index322.js +3792 -63
- package/dist/index323.js +52 -254
- package/dist/index324.js +78 -5
- package/dist/index325.js +21 -139
- package/dist/index326.js +928 -66
- package/dist/index327.js +21 -86
- package/dist/index328.js +19 -28
- package/dist/index329.js +19 -15
- package/dist/index330.js +67 -73
- package/dist/index331.js +19 -4
- package/dist/index332.js +19 -2
- package/dist/index333.js +21 -82
- package/dist/index334.js +21 -52
- package/dist/index335.js +63 -6
- package/dist/index336.js +15 -5
- package/dist/index337.js +71 -166
- package/dist/index338.js +196 -57
- package/dist/index339.js +246 -75
- package/dist/index340.js +9 -36
- package/dist/index341.js +10 -9
- package/dist/index342.js +14 -13
- package/dist/index343.js +10 -55
- package/dist/index344.js +16 -11
- package/dist/index345.js +8 -13
- package/dist/index346.js +12 -57
- package/dist/index347.js +51 -48
- package/dist/index348.js +9 -28
- package/dist/index349.js +14 -2
- package/dist/index350.js +58 -5
- package/dist/index351.js +52 -2
- package/dist/index352.js +30 -22
- package/dist/index353.js +2 -41
- package/dist/index354.js +5 -2
- package/dist/index355.js +2 -11
- package/dist/index356.js +22 -19
- package/dist/index357.js +40 -9
- package/dist/index358.js +2 -10
- package/dist/index359.js +10 -16
- package/dist/index360.js +20 -2
- package/dist/index361.js +2 -9
- package/dist/index362.js +9 -10
- package/dist/index363.js +37 -14
- package/dist/index364.js +18 -19
- package/dist/index365.js +56 -19
- package/dist/index366.js +28 -63
- package/dist/index367.js +7 -37
- package/dist/index368.js +49 -16
- package/dist/index369.js +7 -57
- package/dist/index370.js +10 -27
- package/dist/index371.js +7 -7
- package/dist/index372.js +27 -51
- package/dist/index373.js +2 -7
- package/dist/index374.js +69 -11
- package/dist/index375.js +166 -6
- package/dist/index376.js +20 -28
- package/dist/index377.js +20 -2
- package/dist/index378.js +61 -67
- package/dist/index379.js +36 -166
- package/dist/index38.js +2 -2
- package/dist/index380.js +28 -98
- package/dist/index381.js +10 -90
- package/dist/index382.js +4 -98
- package/dist/index383.js +4 -17
- package/dist/index384.js +12 -30
- package/dist/index385.js +7 -11
- package/dist/index386.js +11 -3
- package/dist/index387.js +4 -3
- package/dist/index388.js +33 -13
- package/dist/index389.js +31 -7
- package/dist/index390.js +28 -12
- package/dist/index391.js +61 -5
- package/dist/index392.js +17 -33
- package/dist/index393.js +99 -29
- package/dist/index394.js +91 -28
- package/dist/index395.js +96 -59
- package/dist/index396.js +1 -1
- package/dist/index401.js +1 -1
- package/dist/index402.js +2 -2
- package/dist/src/components/page-layout/page-layout.vue.d.ts +3 -0
- package/package.json +1 -1
package/dist/index131.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as A, useSlots as U, ref as g, computed as u, 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 i, createCommentVNode as T, createVNode as P } from "vue";
|
|
2
|
+
import s from "./index57.js";
|
|
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",
|
|
5
5
|
props: {
|
|
6
6
|
headerBackgroundColor: { default: "green-20" },
|
|
@@ -22,80 +22,85 @@ const J = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
22
22
|
footerBackgroundColor: { default: "white" },
|
|
23
23
|
footerBarClass: { default: "" },
|
|
24
24
|
footerVisible: { type: Boolean, default: void 0 },
|
|
25
|
-
containerBackgroundColor: { default: "gray-00" }
|
|
25
|
+
containerBackgroundColor: { default: "gray-00" },
|
|
26
|
+
adjustForKeyboard: { type: Boolean, default: !1 }
|
|
26
27
|
},
|
|
27
28
|
emits: ["update:sidebarCollapsed"],
|
|
28
|
-
setup(o, { expose:
|
|
29
|
-
const
|
|
30
|
-
let
|
|
31
|
-
const v = u(() => !!
|
|
32
|
-
get: () =>
|
|
33
|
-
set: (e) =>
|
|
34
|
-
}),
|
|
35
|
-
() => v.value &&
|
|
36
|
-
),
|
|
37
|
-
() => `${
|
|
29
|
+
setup(o, { expose: R, emit: q }) {
|
|
30
|
+
const l = o, K = q, D = U(), b = g(null), c = g(!0), n = g(!1), m = g(!1), $ = g(!1), k = g(0);
|
|
31
|
+
let y = 0, x = !1, S = 0;
|
|
32
|
+
const v = u(() => !!D.sidebar), f = u(() => l.headerFixed !== void 0 ? l.headerFixed : v.value), d = u({
|
|
33
|
+
get: () => l.sidebarCollapsed,
|
|
34
|
+
set: (e) => K("update:sidebarCollapsed", e)
|
|
35
|
+
}), N = u(
|
|
36
|
+
() => v.value && l.sidebarCollapsible && s.md
|
|
37
|
+
), E = u(
|
|
38
|
+
() => `${l.headerTop + O}px`
|
|
39
|
+
), V = u(
|
|
40
|
+
() => `calc(100vh - ${l.headerTop + O}px)`
|
|
38
41
|
), z = u(
|
|
39
|
-
() =>
|
|
40
|
-
),
|
|
41
|
-
|
|
42
|
-
), E = () => {
|
|
43
|
-
const e = b.value, d = !i.md && e;
|
|
42
|
+
() => d.value ? l.sidebarCollapsedWidth : l.sidebarWidth
|
|
43
|
+
), F = () => {
|
|
44
|
+
const e = b.value, t = !s.md && e;
|
|
44
45
|
return {
|
|
45
|
-
scrollY:
|
|
46
|
-
atTop:
|
|
47
|
-
atBottom:
|
|
46
|
+
scrollY: t ? e.scrollTop : window.scrollY,
|
|
47
|
+
atTop: t ? e.scrollTop <= 0 : window.scrollY <= 0,
|
|
48
|
+
atBottom: t ? e.scrollTop + e.clientHeight >= e.scrollHeight : window.scrollY + window.innerHeight >= document.documentElement.scrollHeight
|
|
48
49
|
};
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
const { scrollY: e, atTop:
|
|
52
|
-
if (c.value =
|
|
53
|
-
if (e <=
|
|
54
|
-
m.value = !1,
|
|
50
|
+
}, H = () => {
|
|
51
|
+
x || (window.requestAnimationFrame(() => {
|
|
52
|
+
const { scrollY: e, atTop: t, atBottom: h } = F();
|
|
53
|
+
if (c.value = t, n.value = h, l.headerHideOnScroll && (f.value || !s.md)) {
|
|
54
|
+
if (e <= l.headerHideScrollThreshold) {
|
|
55
|
+
m.value = !1, y = e, x = !1;
|
|
55
56
|
return;
|
|
56
57
|
}
|
|
57
|
-
if (
|
|
58
|
-
|
|
58
|
+
if (h) {
|
|
59
|
+
y = e, x = !1;
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
|
-
const
|
|
62
|
-
Math.abs(
|
|
62
|
+
const j = Math.max(0, e), M = j - y;
|
|
63
|
+
Math.abs(M) > 15 && (m.value = M > 0, y = j);
|
|
63
64
|
} else
|
|
64
65
|
m.value = !1;
|
|
65
|
-
|
|
66
|
-
}),
|
|
67
|
-
},
|
|
68
|
-
|
|
66
|
+
x = !1;
|
|
67
|
+
}), x = !0);
|
|
68
|
+
}, Y = () => {
|
|
69
|
+
d.value = !d.value;
|
|
70
|
+
}, L = () => {
|
|
71
|
+
if (!l.adjustForKeyboard || s.md) return;
|
|
72
|
+
const e = window.visualViewport?.height ?? window.innerHeight, t = S - e;
|
|
73
|
+
t <= X ? (S = window.innerHeight, k.value = 0) : k.value = t;
|
|
69
74
|
};
|
|
70
|
-
return
|
|
71
|
-
window.addEventListener("scroll",
|
|
75
|
+
return G(() => {
|
|
76
|
+
S = window.innerHeight, window.addEventListener("scroll", H, { passive: !0 }), b.value && b.value.addEventListener("scroll", H, {
|
|
72
77
|
passive: !0
|
|
73
78
|
});
|
|
74
|
-
const { scrollY: e, atTop:
|
|
75
|
-
|
|
76
|
-
}),
|
|
77
|
-
window.removeEventListener("scroll",
|
|
78
|
-
}),
|
|
79
|
-
const
|
|
80
|
-
return
|
|
81
|
-
class:
|
|
79
|
+
const { scrollY: e, atTop: t, atBottom: h } = F();
|
|
80
|
+
y = e, c.value = t, n.value = h, l.adjustForKeyboard && window.visualViewport?.addEventListener("resize", L);
|
|
81
|
+
}), I(() => {
|
|
82
|
+
window.removeEventListener("scroll", H), b.value?.removeEventListener("scroll", H), window.visualViewport?.removeEventListener("resize", L);
|
|
83
|
+
}), R({ scrolledToTop: c, scrolledToBottom: n, headerHidden: m, keyboardOffset: k }), (e, t) => {
|
|
84
|
+
const h = J("q-icon");
|
|
85
|
+
return w(), p("div", {
|
|
86
|
+
class: a([
|
|
82
87
|
"page-layout",
|
|
83
88
|
`bg-${o.containerBackgroundColor}`,
|
|
84
89
|
"sm-down:absolute sm-down:inset-x-0 sm-down:top-0 sm-down:bottom-0"
|
|
85
90
|
])
|
|
86
91
|
}, [
|
|
87
92
|
r("div", {
|
|
88
|
-
class:
|
|
93
|
+
class: a([
|
|
89
94
|
"page-layout__header",
|
|
90
95
|
"flex items-center justify-center",
|
|
91
|
-
B(
|
|
96
|
+
B(s).md ? `bg-${o.containerBackgroundColor}` : "",
|
|
92
97
|
f.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",
|
|
93
98
|
{ "page-layout__header--hidden": m.value }
|
|
94
99
|
]),
|
|
95
|
-
style:
|
|
100
|
+
style: C(f.value ? { top: `${o.headerTop}px` } : void 0)
|
|
96
101
|
}, [
|
|
97
102
|
r("div", {
|
|
98
|
-
class:
|
|
103
|
+
class: a([
|
|
99
104
|
"page-layout__header-bar",
|
|
100
105
|
"flex items-center text-left md:rounded-lg",
|
|
101
106
|
`md:h-[3.5rem] ${o.maxContentWidth} w-full p-4 md:pl-6`,
|
|
@@ -108,167 +113,168 @@ const J = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
108
113
|
}
|
|
109
114
|
])
|
|
110
115
|
}, [
|
|
111
|
-
r("h1",
|
|
112
|
-
|
|
116
|
+
r("h1", Q, [
|
|
117
|
+
i(e.$slots, "header", {
|
|
113
118
|
scrolledToTop: c.value,
|
|
114
|
-
scrolledToBottom:
|
|
119
|
+
scrolledToBottom: n.value
|
|
115
120
|
}, void 0, !0)
|
|
116
121
|
]),
|
|
117
|
-
|
|
122
|
+
i(e.$slots, "header-actions", {}, void 0, !0)
|
|
118
123
|
], 2)
|
|
119
124
|
], 6),
|
|
120
125
|
r("div", {
|
|
121
126
|
ref_key: "contentRef",
|
|
122
127
|
ref: b,
|
|
123
|
-
class:
|
|
128
|
+
class: a([
|
|
124
129
|
"page-layout__content",
|
|
125
130
|
"sm-down:absolute sm-down:left-0 sm-down:right-0",
|
|
126
131
|
"sm-down:overflow-y-auto sm-down:scroll-smooth sm-down:overscroll-none",
|
|
127
132
|
{ "md:pt-[4.5rem]": f.value },
|
|
128
|
-
{ "md:mb-[0.5rem]": f.value &&
|
|
133
|
+
{ "md:mb-[0.5rem]": f.value && l.footerVisible },
|
|
129
134
|
o.contentClass
|
|
130
135
|
]),
|
|
131
|
-
style:
|
|
132
|
-
"--sm-top": m.value ? "0px" :
|
|
133
|
-
"--sm-bottom":
|
|
136
|
+
style: C({
|
|
137
|
+
"--sm-top": m.value ? "0px" : Z,
|
|
138
|
+
"--sm-bottom": l.footerVisible ? _ : "0px",
|
|
139
|
+
"--keyboard-offset": `${k.value}px`
|
|
134
140
|
})
|
|
135
141
|
}, [
|
|
136
142
|
r("div", {
|
|
137
|
-
class:
|
|
143
|
+
class: a([
|
|
138
144
|
"page-layout__content-inner",
|
|
139
145
|
{ "md:flex md:gap-4": v.value }
|
|
140
146
|
])
|
|
141
147
|
}, [
|
|
142
|
-
v.value && B(
|
|
148
|
+
v.value && B(s).md ? (w(), p("div", {
|
|
143
149
|
key: 0,
|
|
144
|
-
class:
|
|
150
|
+
class: a([
|
|
145
151
|
"page-layout__sidebar",
|
|
146
152
|
"shrink-0 flex flex-col gap-4",
|
|
147
153
|
"md:transition-[width] md:duration-300",
|
|
148
|
-
|
|
149
|
-
{ "!overflow-hidden":
|
|
154
|
+
z.value,
|
|
155
|
+
{ "!overflow-hidden": d.value },
|
|
150
156
|
o.sidebarClass
|
|
151
157
|
]),
|
|
152
|
-
onMouseenter:
|
|
153
|
-
onMouseleave:
|
|
158
|
+
onMouseenter: t[0] || (t[0] = (W) => $.value = !0),
|
|
159
|
+
onMouseleave: t[1] || (t[1] = (W) => $.value = !1)
|
|
154
160
|
}, [
|
|
155
161
|
r("div", {
|
|
156
|
-
class:
|
|
162
|
+
class: a([
|
|
157
163
|
"page-layout__sidebar-inner",
|
|
158
164
|
"fixed z-10 md:pb-6 md:pt-4 overflow-y-auto",
|
|
159
165
|
`bg-${o.containerBackgroundColor}`,
|
|
160
|
-
|
|
161
|
-
{ "!overflow-hidden":
|
|
166
|
+
z.value,
|
|
167
|
+
{ "!overflow-hidden": d.value }
|
|
162
168
|
]),
|
|
163
|
-
style:
|
|
164
|
-
top:
|
|
165
|
-
height:
|
|
169
|
+
style: C({
|
|
170
|
+
top: E.value,
|
|
171
|
+
height: V.value
|
|
166
172
|
})
|
|
167
173
|
}, [
|
|
168
|
-
|
|
174
|
+
i(e.$slots, "sidebar", {}, void 0, !0)
|
|
169
175
|
], 6),
|
|
170
|
-
|
|
176
|
+
d.value ? (w(), p("div", {
|
|
171
177
|
key: 0,
|
|
172
178
|
class: "fixed cursor-pointer w-12 rounded-lg bg-white z-10",
|
|
173
|
-
style:
|
|
174
|
-
top: `calc(${
|
|
175
|
-
height: `calc(${
|
|
179
|
+
style: C({
|
|
180
|
+
top: `calc(${E.value} + 1rem)`,
|
|
181
|
+
height: `calc(${V.value} - 2.5rem)`
|
|
176
182
|
}),
|
|
177
|
-
onClick:
|
|
183
|
+
onClick: Y
|
|
178
184
|
}, null, 4)) : T("", !0),
|
|
179
|
-
|
|
185
|
+
N.value && ($.value || d.value) ? (w(), p("div", {
|
|
180
186
|
key: 1,
|
|
181
|
-
class:
|
|
187
|
+
class: a([
|
|
182
188
|
"page-layout__sidebar-toggle",
|
|
183
189
|
"cursor-pointer fixed z-30",
|
|
184
190
|
"bg-white rounded",
|
|
185
191
|
"transition-all duration-300 ease-in-out",
|
|
186
|
-
{ "border border-gray-10": !
|
|
192
|
+
{ "border border-gray-10": !d.value }
|
|
187
193
|
]),
|
|
188
|
-
style:
|
|
194
|
+
style: C({
|
|
189
195
|
top: "calc(50vh + 97px)",
|
|
190
196
|
// Expanded: sidebar width minus half the button (lg: 23rem - 0.875rem, md: 19rem - 0.875rem).
|
|
191
197
|
// Collapsed: inset from the left edge.
|
|
192
|
-
marginLeft:
|
|
198
|
+
marginLeft: d.value ? "0.875rem" : B(s).lg ? "22.125rem" : "18.125rem"
|
|
193
199
|
}),
|
|
194
|
-
onClick:
|
|
200
|
+
onClick: Y
|
|
195
201
|
}, [
|
|
196
|
-
|
|
197
|
-
|
|
202
|
+
i(e.$slots, "sidebar-toggle", { collapsed: d.value }, () => [
|
|
203
|
+
P(h, {
|
|
198
204
|
icon: "double-chevron-right",
|
|
199
205
|
color: "inkwell-30",
|
|
200
206
|
type: "",
|
|
201
|
-
class:
|
|
207
|
+
class: a([
|
|
202
208
|
"page-layout__sidebar-toggle-icon",
|
|
203
209
|
"w-6 h-6 p-1 text-inkwell-30",
|
|
204
|
-
{ "rotate-180":
|
|
210
|
+
{ "rotate-180": d.value }
|
|
205
211
|
])
|
|
206
212
|
}, null, 8, ["class"])
|
|
207
213
|
], !0)
|
|
208
214
|
], 6)) : T("", !0)
|
|
209
215
|
], 34)) : T("", !0),
|
|
210
216
|
r("div", {
|
|
211
|
-
class:
|
|
217
|
+
class: a([
|
|
212
218
|
"page-layout__main",
|
|
213
219
|
"block w-full grow leading-normal",
|
|
214
220
|
{ "md:mb-4": v.value },
|
|
215
221
|
o.mainClass
|
|
216
222
|
])
|
|
217
223
|
}, [
|
|
218
|
-
|
|
219
|
-
sidebarCollapsed:
|
|
224
|
+
i(e.$slots, "default", {
|
|
225
|
+
sidebarCollapsed: d.value,
|
|
220
226
|
scrolledToTop: c.value,
|
|
221
|
-
scrolledToBottom:
|
|
227
|
+
scrolledToBottom: n.value
|
|
222
228
|
}, void 0, !0)
|
|
223
229
|
], 2)
|
|
224
230
|
], 2)
|
|
225
231
|
], 6),
|
|
226
|
-
|
|
227
|
-
|
|
232
|
+
i(e.$slots, "overlay", {}, void 0, !0),
|
|
233
|
+
l.footerVisible ? (w(), p("div", {
|
|
228
234
|
key: 0,
|
|
229
|
-
class:
|
|
235
|
+
class: a([
|
|
230
236
|
"page-layout__footer",
|
|
231
237
|
"fixed bottom-0 left-0 right-0 z-20 justify-center",
|
|
232
238
|
`bg-${o.footerBackgroundColor}`,
|
|
233
|
-
B(
|
|
239
|
+
B(s).md ? "overflow-visible h-0 w-full px-6 flex" : "py-6 px-4 bg-white border-t border-gray-20 flex gap-4 sm-down:absolute sm-down:!py-4"
|
|
234
240
|
])
|
|
235
241
|
}, [
|
|
236
|
-
B(
|
|
242
|
+
B(s).md ? (w(), p("div", {
|
|
237
243
|
key: 0,
|
|
238
|
-
class:
|
|
244
|
+
class: a([
|
|
239
245
|
"flex gap-4 items-end h-0 overflow-visible margin-x-auto w-full",
|
|
240
246
|
o.maxContentWidth
|
|
241
247
|
])
|
|
242
248
|
}, [
|
|
243
249
|
r("div", {
|
|
244
|
-
class:
|
|
250
|
+
class: a([
|
|
245
251
|
"shrink-0 w-0 transition-[width] duration-300",
|
|
246
|
-
v.value ?
|
|
252
|
+
v.value ? z.value : "hidden"
|
|
247
253
|
])
|
|
248
254
|
}, null, 2),
|
|
249
255
|
r("div", {
|
|
250
|
-
class:
|
|
256
|
+
class: a([
|
|
251
257
|
"grow pb-6 rounded-t-lg",
|
|
252
258
|
`bg-${o.containerBackgroundColor}`
|
|
253
259
|
])
|
|
254
260
|
}, [
|
|
255
261
|
r("div", {
|
|
256
|
-
class:
|
|
262
|
+
class: a([
|
|
257
263
|
"page-layout__footer-bar",
|
|
258
264
|
"flex items-center justify-center gap-4",
|
|
259
265
|
"left-auto right-auto py-4",
|
|
260
266
|
"rounded-lg shadow-[0_-2px_5px_0_rgba(0,0,0,0.05)] shadow-gray-10",
|
|
261
267
|
`bg-${o.footerBackgroundColor}`,
|
|
262
|
-
{ "shadow-none":
|
|
268
|
+
{ "shadow-none": n.value },
|
|
263
269
|
o.footerBarClass
|
|
264
270
|
])
|
|
265
271
|
}, [
|
|
266
|
-
|
|
272
|
+
i(e.$slots, "footer", { scrolledToBottom: n.value }, void 0, !0)
|
|
267
273
|
], 2)
|
|
268
274
|
], 2)
|
|
269
|
-
], 2)) :
|
|
275
|
+
], 2)) : i(e.$slots, "footer", {
|
|
270
276
|
key: 1,
|
|
271
|
-
scrolledToBottom:
|
|
277
|
+
scrolledToBottom: n.value
|
|
272
278
|
}, void 0, !0)
|
|
273
279
|
], 2)) : T("", !0)
|
|
274
280
|
], 2);
|
|
@@ -276,5 +282,5 @@ const J = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
276
282
|
}
|
|
277
283
|
});
|
|
278
284
|
export {
|
|
279
|
-
|
|
285
|
+
le as default
|
|
280
286
|
};
|
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 A, ref as h, computed as W, onMounted as Q, onUnmounted as F, watch as N, nextTick as O } from "vue";
|
|
2
|
+
import { onClickOutside as k } from "./index173.js";
|
|
3
|
+
import { useThrottleFn as I } from "./index184.js";
|
|
4
|
+
const Z = A({
|
|
5
5
|
name: "QPopover",
|
|
6
6
|
props: {
|
|
7
7
|
/** Aligns the popover accordingly with the trigger.
|
|
@@ -85,62 +85,63 @@ const G = M({
|
|
|
85
85
|
},
|
|
86
86
|
emits: ["update:modelValue"],
|
|
87
87
|
setup(o, { emit: a }) {
|
|
88
|
-
const f = h(!1), d = h(""),
|
|
88
|
+
const f = h(!1), d = h(""), s = h(null), g = h(null), V = h({
|
|
89
89
|
top: "0",
|
|
90
90
|
left: "0",
|
|
91
91
|
transform: "none"
|
|
92
|
-
}), p =
|
|
93
|
-
if (!
|
|
94
|
-
const e = o.teleport ? document.querySelector(".q-popover.teleported") :
|
|
92
|
+
}), p = W(() => f.value === !0 && o.reposition === !0 ? S(o.align) : o.align), y = W(() => f.value === !0 && o.reposition === !0 ? R(o.position) : o.position), S = (t) => {
|
|
93
|
+
if (!s.value) return t;
|
|
94
|
+
const e = o.teleport ? document.querySelector(".q-popover.teleported") : s.value.children[1];
|
|
95
95
|
if (!e || w(e)) return t;
|
|
96
|
-
const n =
|
|
96
|
+
const n = s.value.children[0].getBoundingClientRect(), u = 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 < u.width ? "right" : "left";
|
|
100
100
|
} else {
|
|
101
101
|
const l = n.top;
|
|
102
|
-
return window.innerHeight - l <
|
|
102
|
+
return window.innerHeight - l < u.height ? "bottom" : "top";
|
|
103
103
|
}
|
|
104
104
|
}, R = (t) => {
|
|
105
|
-
if (!
|
|
106
|
-
const e = o.teleport ? document.querySelector(".q-popover.teleported") :
|
|
105
|
+
if (!s.value) return t;
|
|
106
|
+
const e = o.teleport ? document.querySelector(".q-popover.teleported") : s.value.children[1];
|
|
107
107
|
if (!e || w(e)) return t;
|
|
108
|
-
const n =
|
|
108
|
+
const n = s.value.children[0].getBoundingClientRect(), u = e.getBoundingClientRect();
|
|
109
109
|
if (t === "top" || t === "bottom") {
|
|
110
110
|
const l = n.top;
|
|
111
|
-
return window.innerHeight - l <
|
|
111
|
+
return window.innerHeight - l < u.height ? "top" : "bottom";
|
|
112
112
|
} else {
|
|
113
113
|
const l = n.left;
|
|
114
|
-
return window.innerWidth - l <
|
|
114
|
+
return window.innerWidth - l < u.width ? "left" : "right";
|
|
115
115
|
}
|
|
116
116
|
}, w = (t) => {
|
|
117
117
|
if (!t) return !1;
|
|
118
118
|
const e = t.getBoundingClientRect();
|
|
119
119
|
return e ? e.top >= 0 && e.left >= 0 && e.bottom <= (window.innerHeight || document.documentElement.clientHeight) && e.right <= (window.innerWidth || document.documentElement.clientWidth) : !1;
|
|
120
120
|
}, q = () => {
|
|
121
|
-
if (!
|
|
122
|
-
const t =
|
|
121
|
+
if (!s.value) return !0;
|
|
122
|
+
const t = s.value.children[0];
|
|
123
123
|
if (!t) return !0;
|
|
124
124
|
const e = t.getBoundingClientRect();
|
|
125
125
|
let n = t.parentElement;
|
|
126
126
|
for (; n; ) {
|
|
127
|
-
const r = getComputedStyle(n),
|
|
128
|
-
if (
|
|
127
|
+
const r = getComputedStyle(n), c = r.overflowY, H = r.overflowX;
|
|
128
|
+
if (c === "auto" || c === "scroll" || (H === "auto" || H === "scroll")) {
|
|
129
129
|
const v = n.getBoundingClientRect();
|
|
130
130
|
if (!(e.bottom > v.top && e.top < v.bottom && e.right > v.left && e.left < v.right))
|
|
131
131
|
return !1;
|
|
132
132
|
}
|
|
133
133
|
n = n.parentElement;
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
const u = window.innerHeight || document.documentElement.clientHeight, l = window.innerWidth || document.documentElement.clientWidth;
|
|
136
|
+
return e.bottom > 0 && e.top < u && e.right > 0 && e.left < l;
|
|
136
137
|
}, B = () => {
|
|
137
138
|
if (!o.teleport || !o.scrollIntoView || !o.modelValue) return;
|
|
138
139
|
const t = document.querySelector(".q-popover.teleported");
|
|
139
140
|
if (!t) return;
|
|
140
|
-
const e = t.getBoundingClientRect(), n = o.scrollIntoViewPadding,
|
|
141
|
-
let i = 0,
|
|
142
|
-
e.bottom + n >
|
|
143
|
-
top:
|
|
141
|
+
const e = t.getBoundingClientRect(), n = o.scrollIntoViewPadding, u = window.innerHeight, l = window.innerWidth;
|
|
142
|
+
let i = 0, r = 0;
|
|
143
|
+
e.bottom + n > u ? r = e.bottom + n - u : e.top - n < 0 && (r = e.top - n), e.right + n > l ? i = e.right + n - l : e.left - n < 0 && (i = e.left - n), (i !== 0 || r !== 0) && window.scrollBy({
|
|
144
|
+
top: r,
|
|
144
145
|
left: i,
|
|
145
146
|
behavior: "smooth"
|
|
146
147
|
});
|
|
@@ -153,14 +154,14 @@ const G = M({
|
|
|
153
154
|
}), g.value.observe(t));
|
|
154
155
|
}, b = () => {
|
|
155
156
|
g.value && (g.value.disconnect(), g.value = null);
|
|
156
|
-
}, I = () => {
|
|
157
|
-
(o.trigger === "click" || o.trigger === "both") && a("update:modelValue", !o.modelValue);
|
|
158
157
|
}, P = () => {
|
|
159
|
-
o.trigger
|
|
158
|
+
(o.trigger === "click" || o.trigger === "both") && a("update:modelValue", !o.modelValue);
|
|
160
159
|
}, T = () => {
|
|
161
|
-
o.trigger !== "click" && a("update:modelValue", !
|
|
160
|
+
o.trigger !== "click" && a("update:modelValue", !1);
|
|
162
161
|
}, x = () => {
|
|
163
|
-
|
|
162
|
+
o.trigger !== "click" && a("update:modelValue", !0);
|
|
163
|
+
}, L = () => {
|
|
164
|
+
const t = s.value?.children[0];
|
|
164
165
|
if (t) {
|
|
165
166
|
const e = t.clientWidth, n = t.clientHeight;
|
|
166
167
|
switch (p.value) {
|
|
@@ -179,19 +180,19 @@ const G = M({
|
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
}, m = () => {
|
|
182
|
-
if (!
|
|
183
|
-
const t =
|
|
183
|
+
if (!s.value || !o.teleport) return;
|
|
184
|
+
const t = s.value.children[0];
|
|
184
185
|
if (!t) return;
|
|
185
|
-
const e = t.getBoundingClientRect(), n = 10,
|
|
186
|
-
let i = 0,
|
|
187
|
-
|
|
186
|
+
const e = t.getBoundingClientRect(), n = 10, u = y.value, l = p.value;
|
|
187
|
+
let i = 0, r = 0, c = "none";
|
|
188
|
+
u === "bottom" ? (i = e.bottom + n, l === "left" ? (r = e.left, c = "none") : l === "right" ? (r = e.right, c = "translateX(-100%)") : l === "center" && (r = e.left + e.width / 2, c = "translateX(-50%)")) : u === "top" ? (i = e.top - n, c = "translateY(-100%)", l === "left" ? r = e.left : l === "right" ? (r = e.right, c = "translate(-100%, -100%)") : l === "center" && (r = e.left + e.width / 2, c = "translate(-50%, -100%)")) : u === "left" ? (r = e.left - n, c = "translateX(-100%)", l === "top" ? i = e.top : l === "bottom" ? (i = e.bottom, c = "translate(-100%, -100%)") : l === "middle" && (i = e.top + e.height / 2, c = "translate(-100%, -50%)")) : u === "right" && (r = e.right + n, l === "top" ? (i = e.top, c = "none") : l === "bottom" ? (i = e.bottom, c = "translateY(-100%)") : l === "middle" && (i = e.top + e.height / 2, c = "translateY(-50%)")), V.value = {
|
|
188
189
|
top: `${i}px`,
|
|
189
|
-
left: `${
|
|
190
|
-
transform:
|
|
190
|
+
left: `${r}px`,
|
|
191
|
+
transform: c
|
|
191
192
|
};
|
|
192
|
-
}, L = () => {
|
|
193
|
-
o.teleport && o.modelValue && m();
|
|
194
193
|
}, X = () => {
|
|
194
|
+
o.teleport && o.modelValue && m();
|
|
195
|
+
}, Y = () => {
|
|
195
196
|
if (o.teleport && o.modelValue) {
|
|
196
197
|
if (o.closeOnScrollOutOfView && !q()) {
|
|
197
198
|
a("update:modelValue", !1);
|
|
@@ -199,8 +200,8 @@ const G = M({
|
|
|
199
200
|
}
|
|
200
201
|
o.followScroll && m();
|
|
201
202
|
}
|
|
202
|
-
}, C =
|
|
203
|
-
|
|
203
|
+
}, C = I(X, 16, !0), E = I(Y, 16, !0);
|
|
204
|
+
k(s, (t) => {
|
|
204
205
|
if (o.teleport) {
|
|
205
206
|
const e = document.querySelector(".q-popover.teleported");
|
|
206
207
|
if (e && e.contains(t.target))
|
|
@@ -208,21 +209,21 @@ const G = M({
|
|
|
208
209
|
}
|
|
209
210
|
o.modelValue && a("update:modelValue", !1);
|
|
210
211
|
});
|
|
211
|
-
function
|
|
212
|
+
function $() {
|
|
212
213
|
f.value = !1, b();
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
+
function M() {
|
|
215
216
|
f.value = !0, o.teleport ? O(() => {
|
|
216
217
|
m(), o.scrollIntoView && setTimeout(() => {
|
|
217
218
|
z(), B();
|
|
218
219
|
}, 100);
|
|
219
|
-
}) : !w(
|
|
220
|
+
}) : !w(s.value?.children[1]) && o.reposition === !0 && L();
|
|
220
221
|
}
|
|
221
|
-
return
|
|
222
|
+
return Q(() => {
|
|
222
223
|
o.teleport && (window.addEventListener("resize", C), window.addEventListener("scroll", E, !0));
|
|
223
|
-
}),
|
|
224
|
+
}), F(() => {
|
|
224
225
|
o.teleport && (window.removeEventListener("resize", C), window.removeEventListener("scroll", E, !0)), b();
|
|
225
|
-
}),
|
|
226
|
+
}), N(
|
|
226
227
|
() => o.modelValue,
|
|
227
228
|
(t) => {
|
|
228
229
|
o.teleport && t && O(() => {
|
|
@@ -233,7 +234,7 @@ const G = M({
|
|
|
233
234
|
// Refs
|
|
234
235
|
entered: f,
|
|
235
236
|
offsetStyle: d,
|
|
236
|
-
popover:
|
|
237
|
+
popover: s,
|
|
237
238
|
teleportedStyle: V,
|
|
238
239
|
// Computed
|
|
239
240
|
alignment: p,
|
|
@@ -242,16 +243,16 @@ const G = M({
|
|
|
242
243
|
getAlignment: S,
|
|
243
244
|
getPositioning: R,
|
|
244
245
|
isElementInView: w,
|
|
245
|
-
onAfterLeave:
|
|
246
|
-
onClick:
|
|
247
|
-
onClickOutside:
|
|
248
|
-
onEnter:
|
|
249
|
-
onMouseLeave:
|
|
250
|
-
onMouseOver:
|
|
246
|
+
onAfterLeave: $,
|
|
247
|
+
onClick: P,
|
|
248
|
+
onClickOutside: k,
|
|
249
|
+
onEnter: M,
|
|
250
|
+
onMouseLeave: T,
|
|
251
|
+
onMouseOver: x,
|
|
251
252
|
updateTeleportedPosition: m
|
|
252
253
|
};
|
|
253
254
|
}
|
|
254
255
|
});
|
|
255
256
|
export {
|
|
256
|
-
|
|
257
|
+
Z as default
|
|
257
258
|
};
|
package/dist/index182.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import st from "./
|
|
1
|
+
import st from "./index213.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 "./index214.js";
|
|
4
|
+
import { tryOnUnmounted as pt, isObject as yt } from "./index215.js";
|
|
5
|
+
import D, { getFrameData as dt } from "./index216.js";
|
|
6
|
+
import { complex as $ } from "./index217.js";
|
|
7
|
+
import { inertia as mt } from "./index218.js";
|
|
8
|
+
import { animate as bt } from "./index219.js";
|
|
9
|
+
import { velocityPerSecond as ht } from "./index220.js";
|
|
10
|
+
import { number as vt, alpha as C, scale as j } from "./index221.js";
|
|
11
|
+
import { filter as P } from "./index222.js";
|
|
12
|
+
import { px as c, progressPercentage as F, degrees as O } from "./index223.js";
|
|
13
|
+
import { color as b } from "./index224.js";
|
|
14
|
+
import { cubicBezier as gt } from "./index225.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 "./index226.js";
|
|
16
16
|
const R = {};
|
|
17
17
|
class Mt {
|
|
18
18
|
subscriptions = /* @__PURE__ */ new Set();
|
package/dist/index183.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import g from "./
|
|
1
|
+
import g from "./index227.js";
|
|
2
2
|
import { DomHandler as f, ObjectUtils as d } from "./index180.js";
|
|
3
|
-
import v from "./
|
|
4
|
-
import S from "./
|
|
3
|
+
import v from "./index228.js";
|
|
4
|
+
import S from "./index229.js";
|
|
5
5
|
import { resolveDirective as A, openBlock as h, createElementBlock as p, mergeProps as b, Fragment as E, renderList as O, withDirectives as w, renderSlot as x, normalizeClass as K, createElementVNode as I, toDisplayString as D } from "vue";
|
|
6
6
|
var V = {
|
|
7
7
|
name: "BaseSelectButton",
|