@quoreadmin/ui 1.9.3 → 1.10.1
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/index.js +46 -44
- package/dist/index10.js +2 -2
- package/dist/index100.js +20 -25
- package/dist/index101.js +34 -0
- package/dist/{index102.js → index103.js} +1 -1
- package/dist/index105.js +147 -2
- package/dist/index106.js +2 -37
- package/dist/index107.js +39 -0
- package/dist/{index108.js → index109.js} +2 -2
- package/dist/index11.js +2 -2
- package/dist/{index110.js → index111.js} +1 -1
- package/dist/{index112.js → index113.js} +3 -3
- package/dist/{index114.js → index115.js} +6 -6
- package/dist/{index116.js → index117.js} +1 -1
- package/dist/{index118.js → index119.js} +5 -5
- package/dist/index12.js +2 -2
- package/dist/index13.js +2 -2
- package/dist/index131.js +272 -0
- package/dist/index134.js +8 -249
- package/dist/{index132.js → index136.js} +1 -1
- package/dist/index138.js +257 -0
- package/dist/index14.js +2 -2
- package/dist/index141.js +36 -45
- package/dist/index143.js +17 -1169
- package/dist/index145.js +38 -267
- package/dist/index147.js +1125 -286
- package/dist/index149.js +278 -15
- package/dist/index15.js +2 -2
- package/dist/index151.js +316 -69
- package/dist/index153.js +24 -558
- package/dist/index155.js +103 -0
- package/dist/index157.js +565 -0
- package/dist/index16.js +2 -2
- package/dist/{index158.js → index162.js} +1 -1
- package/dist/index165.js +353 -174
- package/dist/{index163.js → index167.js} +1 -1
- package/dist/index169.js +195 -482
- package/dist/index17.js +2 -2
- package/dist/index172.js +105 -852
- package/dist/index173.js +493 -36
- package/dist/index174.js +5507 -265
- package/dist/index175.js +87 -146
- package/dist/index176.js +847 -1185
- package/dist/index177.js +35 -769
- package/dist/index178.js +270 -1298
- package/dist/index179.js +142 -268
- package/dist/index18.js +2 -2
- package/dist/index180.js +1185 -92
- package/dist/index181.js +772 -2
- package/dist/index182.js +1229 -1297
- package/dist/index183.js +278 -0
- package/dist/index184.js +105 -17
- package/dist/index185.js +2 -18
- package/dist/index186.js +1372 -14
- package/dist/index188.js +14 -21
- package/dist/index189.js +18 -759
- package/dist/index19.js +2 -2
- package/dist/index190.js +18 -1144
- package/dist/index191.js +16 -1232
- package/dist/index192.js +22 -11274
- package/dist/index193.js +759 -36
- package/dist/index194.js +1144 -44
- package/dist/index195.js +1117 -1111
- package/dist/index196.js +11279 -0
- package/dist/index197.js +36 -5938
- package/dist/index198.js +42 -205
- package/dist/index199.js +1218 -25
- package/dist/index2.js +2 -2
- package/dist/index20.js +2 -2
- package/dist/index201.js +5932 -72
- package/dist/index202.js +199 -245
- package/dist/index203.js +25 -13674
- package/dist/index204.js +17 -26
- package/dist/index205.js +76 -61
- package/dist/index206.js +239 -224
- package/dist/index207.js +13659 -286
- package/dist/index208.js +27 -295
- package/dist/index209.js +62 -32
- package/dist/index21.js +2 -2
- package/dist/index210.js +236 -114
- package/dist/index211.js +305 -30
- package/dist/index212.js +295 -26
- package/dist/index213.js +30 -33
- package/dist/index214.js +114 -49
- package/dist/index215.js +33 -40
- package/dist/index216.js +26 -4
- package/dist/index217.js +36 -9
- package/dist/index218.js +50 -18
- package/dist/index219.js +43 -10
- package/dist/index22.js +2 -2
- package/dist/index220.js +4 -10
- package/dist/index221.js +9 -39
- package/dist/index222.js +19 -21
- package/dist/index223.js +10 -88
- package/dist/index224.js +9 -406
- package/dist/index225.js +39 -22
- package/dist/index226.js +21 -161
- package/dist/index227.js +157 -224
- package/dist/index228.js +222 -31
- package/dist/index229.js +37 -10
- package/dist/index23.js +2 -2
- package/dist/index230.js +10 -127
- package/dist/index231.js +148 -25
- package/dist/index232.js +20 -80
- package/dist/index233.js +1 -1
- package/dist/index234.js +15 -13
- package/dist/index235.js +198 -19
- package/dist/index236.js +68 -18
- package/dist/index237.js +87 -19
- package/dist/index238.js +383 -137
- package/dist/index239.js +34 -20
- package/dist/index24.js +2 -2
- package/dist/index240.js +39 -21
- package/dist/index241.js +20 -197
- package/dist/index242.js +21 -69
- package/dist/index243.js +22 -34
- package/dist/index244.js +19 -39
- package/dist/index245.js +836 -22
- package/dist/index246.js +701 -21
- package/dist/index247.js +176 -20
- package/dist/index248.js +20 -836
- package/dist/index249.js +19 -701
- package/dist/index250.js +22 -176
- package/dist/index251.js +12 -14
- package/dist/index252.js +9 -9
- package/dist/index253.js +3 -20
- package/dist/index254.js +187 -3
- package/dist/index255.js +42 -96
- package/dist/index256.js +1160 -70
- package/dist/index257.js +101 -1197
- package/dist/index258.js +1 -1
- package/dist/index259.js +1 -1
- package/dist/index26.js +2 -2
- package/dist/index260.js +1 -1
- package/dist/index261.js +37 -28
- package/dist/index262.js +21 -12
- package/dist/index263.js +9 -9
- package/dist/index264.js +20 -2
- package/dist/index266.js +2 -3636
- package/dist/index267.js +3620 -39
- package/dist/index268.js +30 -52
- package/dist/index269.js +47 -22
- package/dist/index27.js +2 -2
- package/dist/index270.js +25 -188
- package/dist/index271.js +213 -8
- package/dist/index272.js +9 -56
- package/dist/index273.js +41 -45
- package/dist/index274.js +46 -39
- package/dist/index275.js +36 -57
- package/dist/index276.js +41 -692
- package/dist/index277.js +707 -23
- package/dist/index278.js +25 -47
- package/dist/index279.js +63 -10
- package/dist/index28.js +2 -2
- package/dist/index280.js +10 -704
- package/dist/index281.js +655 -770
- package/dist/index282.js +820 -3
- package/dist/index283.js +80 -27
- package/dist/index284.js +20 -253
- package/dist/index285.js +20 -8
- package/dist/index286.js +42 -126
- package/dist/index287.js +59 -63
- package/dist/index288.js +26 -2
- package/dist/index289.js +21 -78
- package/dist/index29.js +2 -2
- package/dist/index290.js +21 -53
- package/dist/index291.js +16 -26
- package/dist/index292.js +17 -22
- package/dist/index293.js +253 -22
- package/dist/index294.js +5 -13
- package/dist/index295.js +137 -16
- package/dist/index296.js +82 -22
- package/dist/index297.js +23 -1534
- package/dist/index298.js +3 -386
- package/dist/index299.js +23 -2727
- package/dist/index3.js +2 -2
- package/dist/index30.js +2 -2
- package/dist/index300.js +252 -76
- package/dist/index301.js +4 -3790
- package/dist/index302.js +135 -55
- package/dist/index303.js +71 -77
- package/dist/index304.js +86 -21
- package/dist/index305.js +26 -932
- package/dist/index306.js +14 -20
- package/dist/index307.js +74 -19
- package/dist/index308.js +3 -19
- package/dist/index309.js +2 -69
- package/dist/index31.js +3 -3
- package/dist/index310.js +82 -18
- package/dist/index311.js +53 -19
- package/dist/index312.js +5 -21
- package/dist/index313.js +4 -21
- package/dist/index314.js +178 -62
- package/dist/index315.js +62 -14
- package/dist/index316.js +75 -84
- package/dist/index317.js +1485 -153
- package/dist/index318.js +357 -217
- package/dist/index319.js +2714 -245
- package/dist/index32.js +2 -2
- package/dist/index320.js +84 -4
- package/dist/index321.js +3785 -133
- package/dist/index322.js +57 -70
- package/dist/index323.js +75 -83
- package/dist/index324.js +21 -28
- package/dist/index325.js +933 -14
- package/dist/index326.js +21 -74
- package/dist/index327.js +19 -3
- package/dist/index328.js +20 -2
- package/dist/index329.js +66 -80
- package/dist/index33.js +2 -2
- package/dist/index330.js +19 -53
- package/dist/index331.js +19 -6
- package/dist/index332.js +21 -4
- package/dist/index333.js +21 -178
- package/dist/index334.js +62 -62
- package/dist/index335.js +2 -75
- package/dist/index336.js +15 -9
- package/dist/index337.js +83 -12
- package/dist/index338.js +197 -50
- package/dist/index339.js +243 -9
- package/dist/index34.js +2 -2
- package/dist/index340.js +35 -12
- package/dist/index341.js +8 -57
- package/dist/index342.js +12 -51
- package/dist/index343.js +49 -25
- package/dist/index344.js +12 -2
- package/dist/index345.js +14 -5
- package/dist/index346.js +58 -2
- package/dist/index347.js +52 -23
- package/dist/index348.js +28 -38
- package/dist/index349.js +2 -2
- package/dist/index35.js +2 -2
- package/dist/index350.js +4 -10
- package/dist/index351.js +2 -20
- package/dist/index352.js +22 -9
- package/dist/index353.js +40 -9
- package/dist/index354.js +2 -17
- package/dist/index355.js +11 -2
- package/dist/index356.js +20 -9
- package/dist/index357.js +10 -10
- package/dist/index358.js +9 -13
- package/dist/index359.js +16 -36
- package/dist/index36.js +2 -2
- package/dist/index360.js +2 -20
- package/dist/index361.js +9 -20
- package/dist/index362.js +9 -63
- package/dist/index363.js +14 -37
- package/dist/index364.js +1 -1
- package/dist/index365.js +1 -1
- package/dist/index366.js +5 -5
- package/dist/index368.js +2 -2
- package/dist/index37.js +2 -2
- package/dist/index370.js +2 -2
- package/dist/index372.js +1 -1
- package/dist/index374.js +4 -4
- package/dist/index375.js +3 -3
- package/dist/index376.js +19 -100
- package/dist/index377.js +19 -90
- package/dist/index378.js +63 -16
- package/dist/index379.js +36 -97
- package/dist/index38.js +5 -16
- package/dist/index380.js +1 -1
- package/dist/index381.js +3 -3
- package/dist/index384.js +3 -3
- package/dist/index386.js +1 -1
- package/dist/index388.js +3 -3
- package/dist/index389.js +5 -5
- package/dist/index39.js +15 -43
- package/dist/index390.js +3 -3
- package/dist/index392.js +17 -3
- package/dist/index393.js +101 -2
- package/dist/index394.js +91 -2
- package/dist/index395.js +98 -17
- package/dist/index396.js +3 -13
- package/dist/index397.js +2 -6
- package/dist/index398.js +2 -32
- package/dist/index399.js +19 -0
- package/dist/index4.js +2 -2
- package/dist/index40.js +42 -67
- package/dist/index400.js +15 -0
- package/dist/index401.js +8 -0
- package/dist/index402.js +34 -0
- package/dist/index41.js +66 -26
- package/dist/index42.js +25 -32
- package/dist/index43.js +32 -37
- package/dist/index44.js +37 -1389
- package/dist/index45.js +1362 -344
- package/dist/index46.js +364 -145
- package/dist/index47.js +155 -18
- package/dist/index48.js +16 -42
- package/dist/index49.js +45 -5
- package/dist/index5.js +2 -2
- package/dist/index50.js +5 -69
- package/dist/index51.js +67 -61
- package/dist/index52.js +57 -175
- package/dist/index53.js +173 -77
- package/dist/index54.js +79 -200
- package/dist/index55.js +206 -68
- package/dist/index56.js +69 -20
- package/dist/index57.js +20 -11
- package/dist/index58.js +10 -6
- package/dist/index59.js +5 -209
- package/dist/index6.js +2 -2
- package/dist/index60.js +210 -12
- package/dist/index61.js +12 -184
- package/dist/index62.js +176 -68
- package/dist/index63.js +79 -0
- package/dist/index65.js +7 -91
- package/dist/index66.js +93 -0
- package/dist/index7.js +2 -2
- package/dist/{index73.js → index74.js} +2 -2
- package/dist/index78.js +40 -308
- package/dist/index79.js +330 -0
- package/dist/index8.js +3 -3
- package/dist/{index82.js → index83.js} +5 -5
- package/dist/{index84.js → index85.js} +1 -1
- package/dist/index87.js +23 -131
- package/dist/index88.js +144 -0
- package/dist/index9.js +2 -2
- package/dist/{index89.js → index90.js} +5 -5
- package/dist/{index91.js → index92.js} +5 -5
- package/dist/{index97.js → index98.js} +5 -5
- package/dist/src/components/page-layout/page-layout.vue.d.ts +89 -0
- package/dist/src/components/room-details-popover/room-details-popover.d.ts +2087 -0
- package/dist/src/components/time-picker/time-picker.vue.d.ts +23 -7
- package/dist/src/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/index104.js +0 -149
- package/dist/index130.js +0 -16
- package/dist/index137.js +0 -56
- package/dist/index139.js +0 -37
- package/dist/index161.js +0 -389
- package/dist/index168.js +0 -116
- package/dist/index170.js +0 -5524
- package/dist/index171.js +0 -93
- package/dist/index187.js +0 -20
- package/dist/index200.js +0 -20
- package/dist/index64.js +0 -9
- package/dist/index77.js +0 -62
- package/dist/index86.js +0 -36
- package/dist/index99.js +0 -29
- /package/dist/{index120.js → index121.js} +0 -0
- /package/dist/{index122.js → index123.js} +0 -0
- /package/dist/{index124.js → index125.js} +0 -0
- /package/dist/{index126.js → index127.js} +0 -0
- /package/dist/{index128.js → index129.js} +0 -0
- /package/dist/{index156.js → index160.js} +0 -0
- /package/dist/{index67.js → index68.js} +0 -0
- /package/dist/{index69.js → index70.js} +0 -0
- /package/dist/{index71.js → index72.js} +0 -0
- /package/dist/{index75.js → index76.js} +0 -0
- /package/dist/{index80.js → index81.js} +0 -0
- /package/dist/{index93.js → index94.js} +0 -0
- /package/dist/{index95.js → index96.js} +0 -0
package/dist/index131.js
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { defineComponent as N, useSlots as O, ref as p, computed as n, onMounted as R, onUnmounted as A, resolveComponent as D, openBlock as g, createElementBlock as h, normalizeClass as l, createElementVNode as r, normalizeStyle as y, renderSlot as i, unref as k, createCommentVNode as T, createVNode as U } from "vue";
|
|
2
|
+
import u from "./index57.js";
|
|
3
|
+
const _ = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-none text-left" }, G = "4.5rem", I = "4.8125rem", P = /* @__PURE__ */ N({
|
|
4
|
+
__name: "page-layout",
|
|
5
|
+
props: {
|
|
6
|
+
headerBackgroundColor: { default: "green-20" },
|
|
7
|
+
headerColor: { default: "white" },
|
|
8
|
+
headerFixed: { type: Boolean, default: void 0 },
|
|
9
|
+
headerHideOnScroll: { type: Boolean, default: !0 },
|
|
10
|
+
headerHideScrollThreshold: { default: 100 },
|
|
11
|
+
headerTop: { default: 0 },
|
|
12
|
+
headerShowShadow: { type: Boolean, default: !1 },
|
|
13
|
+
headerBarClass: { default: "" },
|
|
14
|
+
sidebarCollapsible: { type: Boolean, default: !1 },
|
|
15
|
+
sidebarCollapsed: { type: Boolean, default: !1 },
|
|
16
|
+
sidebarWidth: { default: "md:w-[19rem] lg:w-[23rem]" },
|
|
17
|
+
sidebarCollapsedWidth: { default: "md:!w-12 lg:!w-12" },
|
|
18
|
+
sidebarClass: { default: "" },
|
|
19
|
+
contentClass: { default: "" },
|
|
20
|
+
mainClass: { default: "" },
|
|
21
|
+
maxContentWidth: { default: "max-w-[72rem]" },
|
|
22
|
+
footerBackgroundColor: { default: "white" },
|
|
23
|
+
footerBarClass: { default: "" },
|
|
24
|
+
footerVisible: { type: Boolean, default: void 0 },
|
|
25
|
+
containerBackgroundColor: { default: "gray-00" }
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:sidebarCollapsed"],
|
|
28
|
+
setup(o, { expose: Y, emit: L }) {
|
|
29
|
+
const t = o, M = L, q = O(), w = p(null), c = p(!0), s = p(!1), m = p(!1), $ = p(!1);
|
|
30
|
+
let C = 0, x = !1;
|
|
31
|
+
const v = n(() => !!q.sidebar), f = n(() => t.headerFixed !== void 0 ? t.headerFixed : v.value), d = n({
|
|
32
|
+
get: () => t.sidebarCollapsed,
|
|
33
|
+
set: (e) => M("update:sidebarCollapsed", e)
|
|
34
|
+
}), j = n(
|
|
35
|
+
() => v.value && t.sidebarCollapsible && u.md
|
|
36
|
+
), S = n(() => `${t.headerTop + 80}px`), z = n(
|
|
37
|
+
() => `calc(100vh - ${t.headerTop + 80}px)`
|
|
38
|
+
), H = n(
|
|
39
|
+
() => d.value ? t.sidebarCollapsedWidth : t.sidebarWidth
|
|
40
|
+
), E = () => {
|
|
41
|
+
const e = w.value, a = !u.md && e;
|
|
42
|
+
return {
|
|
43
|
+
scrollY: a ? e.scrollTop : window.scrollY,
|
|
44
|
+
atTop: a ? e.scrollTop <= 0 : window.scrollY <= 0,
|
|
45
|
+
atBottom: a ? e.scrollTop + e.clientHeight >= e.scrollHeight : window.scrollY + window.innerHeight >= document.documentElement.scrollHeight
|
|
46
|
+
};
|
|
47
|
+
}, B = () => {
|
|
48
|
+
x || (window.requestAnimationFrame(() => {
|
|
49
|
+
const { scrollY: e, atTop: a, atBottom: b } = E();
|
|
50
|
+
if (c.value = a, s.value = b, t.headerHideOnScroll && (f.value || !u.md)) {
|
|
51
|
+
if (e <= t.headerHideScrollThreshold) {
|
|
52
|
+
m.value = !1, C = e, x = !1;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const V = e - C;
|
|
56
|
+
Math.abs(V) > 5 && (m.value = V > 0, C = e);
|
|
57
|
+
} else
|
|
58
|
+
m.value = !1;
|
|
59
|
+
x = !1;
|
|
60
|
+
}), x = !0);
|
|
61
|
+
}, F = () => {
|
|
62
|
+
d.value = !d.value;
|
|
63
|
+
};
|
|
64
|
+
return R(() => {
|
|
65
|
+
window.addEventListener("scroll", B, { passive: !0 }), w.value && w.value.addEventListener("scroll", B, {
|
|
66
|
+
passive: !0
|
|
67
|
+
});
|
|
68
|
+
const { scrollY: e, atTop: a, atBottom: b } = E();
|
|
69
|
+
C = e, c.value = a, s.value = b;
|
|
70
|
+
}), A(() => {
|
|
71
|
+
window.removeEventListener("scroll", B), w.value?.removeEventListener("scroll", B);
|
|
72
|
+
}), Y({ scrolledToTop: c, scrolledToBottom: s, headerHidden: m }), (e, a) => {
|
|
73
|
+
const b = D("q-icon");
|
|
74
|
+
return g(), h("div", {
|
|
75
|
+
class: l([
|
|
76
|
+
"page-layout",
|
|
77
|
+
`bg-${o.containerBackgroundColor}`,
|
|
78
|
+
"sm-down:absolute sm-down:inset-x-0 sm-down:top-0 sm-down:bottom-0"
|
|
79
|
+
])
|
|
80
|
+
}, [
|
|
81
|
+
r("div", {
|
|
82
|
+
class: l([
|
|
83
|
+
"page-layout__header",
|
|
84
|
+
"flex items-center justify-center",
|
|
85
|
+
`md:bg-${o.containerBackgroundColor}`,
|
|
86
|
+
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",
|
|
87
|
+
{ "page-layout__header--hidden": m.value }
|
|
88
|
+
]),
|
|
89
|
+
style: y(f.value ? { top: `${o.headerTop}px` } : void 0)
|
|
90
|
+
}, [
|
|
91
|
+
r("div", {
|
|
92
|
+
class: l([
|
|
93
|
+
"page-layout__header-bar",
|
|
94
|
+
"flex items-center text-left md:rounded-lg",
|
|
95
|
+
`md:h-[3.5rem] ${o.maxContentWidth} w-full p-4 md:pl-6`,
|
|
96
|
+
"sm-down:py-6 sm-down:h-[4.5rem]",
|
|
97
|
+
`bg-${o.headerBackgroundColor}`,
|
|
98
|
+
`text-${o.headerColor}`,
|
|
99
|
+
o.headerBarClass,
|
|
100
|
+
{
|
|
101
|
+
"md:shadow-[0_0.375rem_0.5rem_0_rgba(0,0,0,0.05)] md:shadow-gray-20": f.value && (!c.value || o.headerShowShadow)
|
|
102
|
+
}
|
|
103
|
+
])
|
|
104
|
+
}, [
|
|
105
|
+
r("h1", _, [
|
|
106
|
+
i(e.$slots, "header", {
|
|
107
|
+
scrolledToTop: c.value,
|
|
108
|
+
scrolledToBottom: s.value
|
|
109
|
+
}, void 0, !0)
|
|
110
|
+
]),
|
|
111
|
+
i(e.$slots, "header-actions", {}, void 0, !0)
|
|
112
|
+
], 2)
|
|
113
|
+
], 6),
|
|
114
|
+
r("div", {
|
|
115
|
+
ref_key: "contentRef",
|
|
116
|
+
ref: w,
|
|
117
|
+
class: l([
|
|
118
|
+
"page-layout__content",
|
|
119
|
+
"sm-down:absolute sm-down:left-0 sm-down:right-0",
|
|
120
|
+
"sm-down:overflow-y-auto sm-down:scroll-smooth sm-down:overscroll-none",
|
|
121
|
+
{ "md:pt-[4.5rem]": f.value },
|
|
122
|
+
{ "md:mb-[0.5rem]": f.value && t.footerVisible },
|
|
123
|
+
o.contentClass
|
|
124
|
+
]),
|
|
125
|
+
style: y({
|
|
126
|
+
"--sm-top": m.value ? "0px" : G,
|
|
127
|
+
"--sm-bottom": t.footerVisible ? I : "0px"
|
|
128
|
+
})
|
|
129
|
+
}, [
|
|
130
|
+
r("div", {
|
|
131
|
+
class: l([
|
|
132
|
+
"page-layout__content-inner",
|
|
133
|
+
{ "md:flex md:gap-4": v.value }
|
|
134
|
+
])
|
|
135
|
+
}, [
|
|
136
|
+
v.value && k(u).md ? (g(), h("div", {
|
|
137
|
+
key: 0,
|
|
138
|
+
class: l([
|
|
139
|
+
"page-layout__sidebar",
|
|
140
|
+
"shrink-0 flex flex-col gap-4",
|
|
141
|
+
"md:transition-[width] md:duration-300",
|
|
142
|
+
H.value,
|
|
143
|
+
{ "!overflow-hidden": d.value },
|
|
144
|
+
o.sidebarClass
|
|
145
|
+
]),
|
|
146
|
+
onMouseenter: a[0] || (a[0] = (W) => $.value = !0),
|
|
147
|
+
onMouseleave: a[1] || (a[1] = (W) => $.value = !1)
|
|
148
|
+
}, [
|
|
149
|
+
r("div", {
|
|
150
|
+
class: l([
|
|
151
|
+
"page-layout__sidebar-inner",
|
|
152
|
+
"fixed z-10 md:pb-6 md:pt-4 overflow-y-auto",
|
|
153
|
+
`bg-${o.containerBackgroundColor}`,
|
|
154
|
+
H.value,
|
|
155
|
+
{ "!overflow-hidden": d.value }
|
|
156
|
+
]),
|
|
157
|
+
style: y({
|
|
158
|
+
top: S.value,
|
|
159
|
+
height: z.value
|
|
160
|
+
})
|
|
161
|
+
}, [
|
|
162
|
+
i(e.$slots, "sidebar", {}, void 0, !0)
|
|
163
|
+
], 6),
|
|
164
|
+
d.value ? (g(), h("div", {
|
|
165
|
+
key: 0,
|
|
166
|
+
class: "fixed cursor-pointer w-12 rounded-lg bg-white z-10",
|
|
167
|
+
style: y({
|
|
168
|
+
top: `calc(${S.value} + 1rem)`,
|
|
169
|
+
height: `calc(${z.value} - 2rem)`
|
|
170
|
+
}),
|
|
171
|
+
onClick: F
|
|
172
|
+
}, null, 4)) : T("", !0),
|
|
173
|
+
j.value && ($.value || d.value) ? (g(), h("div", {
|
|
174
|
+
key: 1,
|
|
175
|
+
class: l([
|
|
176
|
+
"page-layout__sidebar-toggle",
|
|
177
|
+
"cursor-pointer fixed z-30",
|
|
178
|
+
"bg-white rounded border border-gray-10",
|
|
179
|
+
"transition-all duration-300 ease-in-out",
|
|
180
|
+
{
|
|
181
|
+
"page-layout__sidebar-toggle--collapsed": d.value
|
|
182
|
+
}
|
|
183
|
+
]),
|
|
184
|
+
style: y({
|
|
185
|
+
top: "calc(50vh + 97px)",
|
|
186
|
+
marginLeft: d.value ? "0.875rem" : k(u).lg ? "22.125rem" : "18.125rem"
|
|
187
|
+
}),
|
|
188
|
+
onClick: F
|
|
189
|
+
}, [
|
|
190
|
+
U(b, {
|
|
191
|
+
icon: "double-chevron-right ",
|
|
192
|
+
type: "",
|
|
193
|
+
color: "inkwell-30",
|
|
194
|
+
class: l([
|
|
195
|
+
"page-layout__sidebar-toggle-icon",
|
|
196
|
+
"w-6 h-6 p-1 text-inkwell-30",
|
|
197
|
+
{ "rotate-180": d.value }
|
|
198
|
+
])
|
|
199
|
+
}, null, 8, ["class"])
|
|
200
|
+
], 6)) : T("", !0)
|
|
201
|
+
], 34)) : T("", !0),
|
|
202
|
+
r("div", {
|
|
203
|
+
class: l([
|
|
204
|
+
"page-layout__main",
|
|
205
|
+
"block w-full grow leading-normal",
|
|
206
|
+
{ "md:mb-4": v.value },
|
|
207
|
+
o.mainClass
|
|
208
|
+
])
|
|
209
|
+
}, [
|
|
210
|
+
i(e.$slots, "default", {
|
|
211
|
+
sidebarCollapsed: d.value,
|
|
212
|
+
scrolledToTop: c.value,
|
|
213
|
+
scrolledToBottom: s.value
|
|
214
|
+
}, void 0, !0)
|
|
215
|
+
], 2)
|
|
216
|
+
], 2)
|
|
217
|
+
], 6),
|
|
218
|
+
i(e.$slots, "overlay", {}, void 0, !0),
|
|
219
|
+
t.footerVisible ? (g(), h("div", {
|
|
220
|
+
key: 0,
|
|
221
|
+
class: l([
|
|
222
|
+
"page-layout__footer",
|
|
223
|
+
"fixed bottom-0 left-0 right-0 z-20 justify-center",
|
|
224
|
+
`bg-${o.footerBackgroundColor}`,
|
|
225
|
+
k(u).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"
|
|
226
|
+
])
|
|
227
|
+
}, [
|
|
228
|
+
k(u).md ? (g(), h("div", {
|
|
229
|
+
key: 0,
|
|
230
|
+
class: l([
|
|
231
|
+
"flex gap-4 items-end h-0 overflow-visible margin-x-auto w-full",
|
|
232
|
+
o.maxContentWidth
|
|
233
|
+
])
|
|
234
|
+
}, [
|
|
235
|
+
r("div", {
|
|
236
|
+
class: l([
|
|
237
|
+
"shrink-0 w-0 transition-[width] duration-300",
|
|
238
|
+
v.value ? H.value : "hidden"
|
|
239
|
+
])
|
|
240
|
+
}, null, 2),
|
|
241
|
+
r("div", {
|
|
242
|
+
class: l([
|
|
243
|
+
"grow pb-6 rounded-t-lg",
|
|
244
|
+
`bg-${o.containerBackgroundColor}`
|
|
245
|
+
])
|
|
246
|
+
}, [
|
|
247
|
+
r("div", {
|
|
248
|
+
class: l([
|
|
249
|
+
"page-layout__footer-bar",
|
|
250
|
+
"flex items-center justify-center gap-4",
|
|
251
|
+
"left-auto right-auto py-4",
|
|
252
|
+
"rounded-lg shadow-[0_-2px_5px_0_rgba(0,0,0,0.05)] shadow-gray-10",
|
|
253
|
+
`bg-${o.footerBackgroundColor}`,
|
|
254
|
+
{ "shadow-none": s.value },
|
|
255
|
+
o.footerBarClass
|
|
256
|
+
])
|
|
257
|
+
}, [
|
|
258
|
+
i(e.$slots, "footer", { scrolledToBottom: s.value }, void 0, !0)
|
|
259
|
+
], 2)
|
|
260
|
+
], 2)
|
|
261
|
+
], 2)) : i(e.$slots, "footer", {
|
|
262
|
+
key: 1,
|
|
263
|
+
scrolledToBottom: s.value
|
|
264
|
+
}, void 0, !0)
|
|
265
|
+
], 2)) : T("", !0)
|
|
266
|
+
], 2);
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
export {
|
|
271
|
+
P as default
|
|
272
|
+
};
|
package/dist/index134.js
CHANGED
|
@@ -1,257 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const G = M({
|
|
5
|
-
name: "QPopover",
|
|
1
|
+
import { defineComponent as e } from "vue";
|
|
2
|
+
const a = e({
|
|
3
|
+
name: "QPageNavigation",
|
|
6
4
|
props: {
|
|
7
|
-
|
|
8
|
-
* i.e. bottom, center, left, middle, right, top.
|
|
9
|
-
* Right, left or middle align goes with bottom or top position
|
|
10
|
-
* Top, bottom or center align goes with right or left position */
|
|
11
|
-
align: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: "left"
|
|
14
|
-
},
|
|
15
|
-
/** Specifies whether to have a caret pointer or not. */
|
|
16
|
-
hasCaret: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: !0
|
|
19
|
-
},
|
|
20
|
-
/** Toggles the content from the parent component. i.e. false, true. */
|
|
21
|
-
modelValue: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
},
|
|
25
|
-
/** Positions the popover to the specified side of the trigger.
|
|
26
|
-
* i.e. bottom, left, right, top.
|
|
27
|
-
* Bottom or top position goes with right, left or middle align
|
|
28
|
-
* Right or left position goes with top, bottom or center align */
|
|
29
|
-
position: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: "bottom"
|
|
32
|
-
},
|
|
33
|
-
/** Should the popover be repositioned and realigned automatically if it is outside viewport.
|
|
34
|
-
* Moving element position from left to right, and top to bottom
|
|
35
|
-
* and alignment from right to left or top to bottom.
|
|
36
|
-
*/
|
|
37
|
-
reposition: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: !0
|
|
40
|
-
},
|
|
41
|
-
/** Specifies the size of the popover. sm, md, lg, or filter-sm, filter-md, filter-lg for filter-style popovers. */
|
|
42
|
-
size: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: "md"
|
|
45
|
-
},
|
|
46
|
-
/** Set if the popover is teleported to the teleportTo element (escapes overflow clipping) */
|
|
47
|
-
teleport: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: !1
|
|
50
|
-
},
|
|
51
|
-
/** Target element for teleport */
|
|
52
|
-
teleportTo: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: "body"
|
|
55
|
-
},
|
|
56
|
-
/** Whether the teleported popover should follow the trigger on scroll.
|
|
57
|
-
* When true (default), popover repositions as user scrolls.
|
|
58
|
-
* When false, popover stays fixed at its initial opened position. */
|
|
59
|
-
followScroll: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: !0
|
|
62
|
-
},
|
|
63
|
-
/** Trigger popover on click, hover or both */
|
|
64
|
-
trigger: {
|
|
65
|
-
type: String,
|
|
66
|
-
default: "click"
|
|
67
|
-
},
|
|
68
|
-
/** Whether to close the popover when the trigger scrolls out of its scrollable parent.
|
|
69
|
-
* Useful for popovers inside scrollable containers to prevent orphaned popovers. */
|
|
70
|
-
closeOnScrollOutOfView: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
default: !1
|
|
73
|
-
},
|
|
74
|
-
/** Whether to scroll the page to bring the popover into view when it opens or content changes.
|
|
75
|
-
* Uses smooth scrolling and adds padding to ensure the popover isn't at the edge of the viewport. */
|
|
76
|
-
scrollIntoView: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: !1
|
|
79
|
-
},
|
|
80
|
-
/** Padding (in pixels) from viewport edge when scrolling popover into view. */
|
|
81
|
-
scrollIntoViewPadding: {
|
|
5
|
+
fixedTopOffset: {
|
|
82
6
|
type: Number,
|
|
83
|
-
default:
|
|
7
|
+
default: 0
|
|
84
8
|
}
|
|
85
9
|
},
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const f = h(!1), d = h(""), u = h(null), g = h(null), V = h({
|
|
89
|
-
top: "0",
|
|
90
|
-
left: "0",
|
|
91
|
-
transform: "none"
|
|
92
|
-
}), p = H(() => f.value === !0 && o.reposition === !0 ? S(o.align) : o.align), y = H(() => f.value === !0 && o.reposition === !0 ? R(o.position) : o.position), S = (t) => {
|
|
93
|
-
if (!u.value) return t;
|
|
94
|
-
const e = o.teleport ? document.querySelector(".q-popover.teleported") : u.value.children[1];
|
|
95
|
-
if (!e || w(e)) return t;
|
|
96
|
-
const n = u.value.children[0].getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
97
|
-
if (t === "left" || t === "right" || t === "center") {
|
|
98
|
-
const l = n.left;
|
|
99
|
-
return window.innerWidth - l < r.width ? "right" : "left";
|
|
100
|
-
} else {
|
|
101
|
-
const l = n.top;
|
|
102
|
-
return window.innerHeight - l < r.height ? "bottom" : "top";
|
|
103
|
-
}
|
|
104
|
-
}, R = (t) => {
|
|
105
|
-
if (!u.value) return t;
|
|
106
|
-
const e = o.teleport ? document.querySelector(".q-popover.teleported") : u.value.children[1];
|
|
107
|
-
if (!e || w(e)) return t;
|
|
108
|
-
const n = u.value.children[0].getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
109
|
-
if (t === "top" || t === "bottom") {
|
|
110
|
-
const l = n.top;
|
|
111
|
-
return window.innerHeight - l < r.height ? "top" : "bottom";
|
|
112
|
-
} else {
|
|
113
|
-
const l = n.left;
|
|
114
|
-
return window.innerWidth - l < r.width ? "left" : "right";
|
|
115
|
-
}
|
|
116
|
-
}, w = (t) => {
|
|
117
|
-
if (!t) return !1;
|
|
118
|
-
const e = t.getBoundingClientRect();
|
|
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
|
-
}, q = () => {
|
|
121
|
-
if (!u.value) return !0;
|
|
122
|
-
const t = u.value.children[0];
|
|
123
|
-
if (!t) return !0;
|
|
124
|
-
const e = t.getBoundingClientRect();
|
|
125
|
-
let n = t.parentElement;
|
|
126
|
-
for (; n; ) {
|
|
127
|
-
const r = getComputedStyle(n), l = r.overflowY, i = r.overflowX;
|
|
128
|
-
if (l === "auto" || l === "scroll" || (i === "auto" || i === "scroll")) {
|
|
129
|
-
const v = n.getBoundingClientRect();
|
|
130
|
-
if (!(e.bottom > v.top && e.top < v.bottom && e.right > v.left && e.left < v.right))
|
|
131
|
-
return !1;
|
|
132
|
-
}
|
|
133
|
-
n = n.parentElement;
|
|
134
|
-
}
|
|
135
|
-
return !0;
|
|
136
|
-
}, B = () => {
|
|
137
|
-
if (!o.teleport || !o.scrollIntoView || !o.modelValue) return;
|
|
138
|
-
const t = document.querySelector(".q-popover.teleported");
|
|
139
|
-
if (!t) return;
|
|
140
|
-
const e = t.getBoundingClientRect(), n = o.scrollIntoViewPadding, r = window.innerHeight, l = window.innerWidth;
|
|
141
|
-
let i = 0, c = 0;
|
|
142
|
-
e.bottom + n > r ? c = e.bottom + n - r : e.top - n < 0 && (c = e.top - n), e.right + n > l ? i = e.right + n - l : e.left - n < 0 && (i = e.left - n), (i !== 0 || c !== 0) && window.scrollBy({
|
|
143
|
-
top: c,
|
|
144
|
-
left: i,
|
|
145
|
-
behavior: "smooth"
|
|
146
|
-
});
|
|
147
|
-
}, z = () => {
|
|
148
|
-
if (!o.teleport || !o.scrollIntoView) return;
|
|
149
|
-
b();
|
|
150
|
-
const t = document.querySelector(".q-popover.teleported");
|
|
151
|
-
t && (g.value = new ResizeObserver(() => {
|
|
152
|
-
setTimeout(B, 50);
|
|
153
|
-
}), g.value.observe(t));
|
|
154
|
-
}, b = () => {
|
|
155
|
-
g.value && (g.value.disconnect(), g.value = null);
|
|
156
|
-
}, I = () => {
|
|
157
|
-
(o.trigger === "click" || o.trigger === "both") && a("update:modelValue", !o.modelValue);
|
|
158
|
-
}, P = () => {
|
|
159
|
-
o.trigger !== "click" && a("update:modelValue", !1);
|
|
160
|
-
}, T = () => {
|
|
161
|
-
o.trigger !== "click" && a("update:modelValue", !0);
|
|
162
|
-
}, x = () => {
|
|
163
|
-
const t = u.value?.children[0];
|
|
164
|
-
if (t) {
|
|
165
|
-
const e = t.clientWidth, n = t.clientHeight;
|
|
166
|
-
switch (p.value) {
|
|
167
|
-
case "left":
|
|
168
|
-
d.value = `margin-left: ${e / 2 - 10}px;`;
|
|
169
|
-
break;
|
|
170
|
-
case "right":
|
|
171
|
-
d.value = `margin-right: ${e / 2 - 10}px;`;
|
|
172
|
-
break;
|
|
173
|
-
case "top":
|
|
174
|
-
d.value = `margin-top: ${n / 2 - 10}px;`;
|
|
175
|
-
break;
|
|
176
|
-
case "bottom":
|
|
177
|
-
d.value = `margin-bottom: ${n / 2 - 10}px;`;
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}, m = () => {
|
|
182
|
-
if (!u.value || !o.teleport) return;
|
|
183
|
-
const t = u.value.children[0];
|
|
184
|
-
if (!t) return;
|
|
185
|
-
const e = t.getBoundingClientRect(), n = 10, r = y.value, l = p.value;
|
|
186
|
-
let i = 0, c = 0, s = "none";
|
|
187
|
-
r === "bottom" ? (i = e.bottom + n, l === "left" ? (c = e.left, s = "none") : l === "right" ? (c = e.right, s = "translateX(-100%)") : l === "center" && (c = e.left + e.width / 2, s = "translateX(-50%)")) : r === "top" ? (i = e.top - n, s = "translateY(-100%)", l === "left" ? c = e.left : l === "right" ? (c = e.right, s = "translate(-100%, -100%)") : l === "center" && (c = e.left + e.width / 2, s = "translate(-50%, -100%)")) : r === "left" ? (c = e.left - n, s = "translateX(-100%)", l === "top" ? i = e.top : l === "bottom" ? (i = e.bottom, s = "translate(-100%, -100%)") : l === "middle" && (i = e.top + e.height / 2, s = "translate(-100%, -50%)")) : r === "right" && (c = e.right + n, l === "top" ? (i = e.top, s = "none") : l === "bottom" ? (i = e.bottom, s = "translateY(-100%)") : l === "middle" && (i = e.top + e.height / 2, s = "translateY(-50%)")), V.value = {
|
|
188
|
-
top: `${i}px`,
|
|
189
|
-
left: `${c}px`,
|
|
190
|
-
transform: s
|
|
191
|
-
};
|
|
192
|
-
}, L = () => {
|
|
193
|
-
o.teleport && o.modelValue && m();
|
|
194
|
-
}, X = () => {
|
|
195
|
-
if (o.teleport && o.modelValue) {
|
|
196
|
-
if (o.closeOnScrollOutOfView && !q()) {
|
|
197
|
-
a("update:modelValue", !1);
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
o.followScroll && m();
|
|
201
|
-
}
|
|
202
|
-
}, C = k(L, 16, !0), E = k(X, 16, !0);
|
|
203
|
-
W(u, (t) => {
|
|
204
|
-
if (o.teleport) {
|
|
205
|
-
const e = document.querySelector(".q-popover.teleported");
|
|
206
|
-
if (e && e.contains(t.target))
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
o.modelValue && a("update:modelValue", !1);
|
|
210
|
-
});
|
|
211
|
-
function Y() {
|
|
212
|
-
f.value = !1, b();
|
|
213
|
-
}
|
|
214
|
-
function $() {
|
|
215
|
-
f.value = !0, o.teleport ? O(() => {
|
|
216
|
-
m(), o.scrollIntoView && setTimeout(() => {
|
|
217
|
-
z(), B();
|
|
218
|
-
}, 100);
|
|
219
|
-
}) : !w(u.value?.children[1]) && o.reposition === !0 && x();
|
|
220
|
-
}
|
|
221
|
-
return A(() => {
|
|
222
|
-
o.teleport && (window.addEventListener("resize", C), window.addEventListener("scroll", E, !0));
|
|
223
|
-
}), Q(() => {
|
|
224
|
-
o.teleport && (window.removeEventListener("resize", C), window.removeEventListener("scroll", E, !0)), b();
|
|
225
|
-
}), F(
|
|
226
|
-
() => o.modelValue,
|
|
227
|
-
(t) => {
|
|
228
|
-
o.teleport && t && O(() => {
|
|
229
|
-
m();
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
), {
|
|
233
|
-
// Refs
|
|
234
|
-
entered: f,
|
|
235
|
-
offsetStyle: d,
|
|
236
|
-
popover: u,
|
|
237
|
-
teleportedStyle: V,
|
|
238
|
-
// Computed
|
|
239
|
-
alignment: p,
|
|
240
|
-
positioning: y,
|
|
241
|
-
// Methods
|
|
242
|
-
getAlignment: S,
|
|
243
|
-
getPositioning: R,
|
|
244
|
-
isElementInView: w,
|
|
245
|
-
onAfterLeave: Y,
|
|
246
|
-
onClick: I,
|
|
247
|
-
onClickOutside: W,
|
|
248
|
-
onEnter: $,
|
|
249
|
-
onMouseLeave: P,
|
|
250
|
-
onMouseOver: T,
|
|
251
|
-
updateTeleportedPosition: m
|
|
252
|
-
};
|
|
10
|
+
setup() {
|
|
11
|
+
return {};
|
|
253
12
|
}
|
|
254
13
|
});
|
|
255
14
|
export {
|
|
256
|
-
|
|
15
|
+
a as default
|
|
257
16
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as x, ref as s, onMounted as y, nextTick as P } from "vue";
|
|
2
|
-
import { getDocument as C, version as k, GlobalWorkerOptions as E } from "./
|
|
2
|
+
import { getDocument as C, version as k, GlobalWorkerOptions as E } from "./index196.js";
|
|
3
3
|
import D from "./index22.js";
|
|
4
4
|
E.workerSrc = `https://cdn.jsdelivr.net/npm/pdfjs-dist@${k}/legacy/build/pdf.worker.min.mjs`;
|
|
5
5
|
const S = x({
|