@quoreadmin/ui 1.10.20 → 1.10.22
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 +168 -147
- package/dist/index149.js +78 -68
- package/dist/index157.js +30 -29
- 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/index216.js +2 -2
- package/dist/index217.js +1 -1
- package/dist/index219.js +4 -4
- package/dist/index221.js +1 -1
- package/dist/index222.js +1 -1
- package/dist/index223.js +1 -1
- package/dist/index224.js +4 -4
- package/dist/index226.js +1 -1
- package/dist/index227.js +106 -67
- package/dist/index228.js +26 -395
- package/dist/index229.js +406 -21
- package/dist/index230.js +76 -123
- package/dist/index231.js +19 -37
- package/dist/index232.js +85 -77
- package/dist/index233.js +12 -12
- package/dist/index234.js +3 -3
- package/dist/index235.js +3 -3
- package/dist/index236.js +11 -11
- package/dist/index237.js +22 -20
- package/dist/index238.js +159 -159
- package/dist/index239.js +20 -228
- package/dist/index240.js +21 -36
- package/dist/index241.js +198 -9
- package/dist/index242.js +49 -140
- package/dist/index243.js +34 -20
- package/dist/index244.js +39 -21
- package/dist/index245.js +21 -198
- package/dist/index246.js +21 -69
- package/dist/index247.js +20 -34
- package/dist/index248.js +823 -27
- package/dist/index249.js +701 -21
- package/dist/index250.js +176 -22
- package/dist/index251.js +15 -13
- package/dist/index252.js +20 -836
- package/dist/index253.js +19 -701
- package/dist/index254.js +3 -176
- package/dist/index255.js +186 -21
- package/dist/index256.js +132 -19
- package/dist/index257.js +1223 -20
- package/dist/index258.js +20 -3
- package/dist/index259.js +21 -186
- package/dist/index260.js +21 -132
- package/dist/index261.js +29 -1223
- package/dist/index262.js +12 -12
- package/dist/index263.js +13 -15
- package/dist/index264.js +2 -22
- package/dist/index265.js +2 -29
- package/dist/index266.js +3636 -20
- package/dist/index267.js +55 -20
- package/dist/index268.js +77 -2
- package/dist/index269.js +52 -2
- package/dist/index270.js +182 -3603
- package/dist/index271.js +8 -53
- package/dist/index272.js +40 -60
- package/dist/index273.js +44 -35
- package/dist/index274.js +32 -193
- package/dist/index275.js +74 -9
- package/dist/index276.js +707 -38
- package/dist/index277.js +25 -44
- package/dist/index278.js +46 -36
- package/dist/index279.js +10 -74
- package/dist/index280.js +679 -700
- package/dist/index281.js +817 -39
- package/dist/index282.js +160 -63
- package/dist/index283.js +227 -10
- package/dist/index284.js +36 -704
- package/dist/index285.js +9 -819
- package/dist/index286.js +253 -3
- package/dist/index287.js +2 -27
- package/dist/index288.js +104 -219
- package/dist/index289.js +83 -8
- package/dist/index290.js +59 -118
- package/dist/index291.js +8 -83
- package/dist/index292.js +3 -262
- package/dist/index293.js +25 -4
- package/dist/index294.js +51 -137
- package/dist/index295.js +25 -72
- package/dist/index296.js +20 -85
- package/dist/index297.js +21 -28
- package/dist/index298.js +16 -16
- package/dist/index299.js +17 -75
- package/dist/index300.js +23 -4
- package/dist/index301.js +79 -2
- package/dist/index302.js +21 -82
- package/dist/index303.js +929 -47
- package/dist/index304.js +21 -5
- package/dist/index305.js +19 -4
- package/dist/index306.js +19 -178
- package/dist/index307.js +67 -61
- package/dist/index308.js +18 -74
- package/dist/index309.js +19 -2
- package/dist/index310.js +21 -78
- package/dist/index311.js +21 -53
- package/dist/index312.js +63 -26
- package/dist/index313.js +1534 -22
- package/dist/index314.js +386 -22
- package/dist/index315.js +2731 -16
- package/dist/index316.js +86 -17
- package/dist/index317.js +3792 -23
- package/dist/index318.js +55 -1529
- package/dist/index319.js +14 -385
- package/dist/index320.js +67 -2714
- package/dist/index321.js +189 -73
- package/dist/index322.js +222 -3768
- package/dist/index323.js +254 -52
- package/dist/index324.js +6 -15
- package/dist/index325.js +130 -74
- package/dist/index326.js +66 -195
- package/dist/index327.js +81 -240
- package/dist/index328.js +25 -75
- package/dist/index329.js +14 -20
- package/dist/index330.js +66 -926
- package/dist/index331.js +3 -21
- package/dist/index332.js +2 -20
- package/dist/index333.js +82 -19
- package/dist/index334.js +52 -68
- package/dist/index335.js +6 -19
- package/dist/index336.js +5 -19
- package/dist/index337.js +178 -21
- package/dist/index338.js +62 -21
- package/dist/index339.js +74 -62
- package/dist/index340.js +36 -9
- package/dist/index341.js +9 -10
- package/dist/index342.js +13 -14
- package/dist/index343.js +55 -10
- package/dist/index344.js +11 -16
- package/dist/index345.js +13 -8
- package/dist/index346.js +57 -12
- package/dist/index347.js +48 -51
- package/dist/index348.js +28 -9
- package/dist/index349.js +2 -14
- package/dist/index350.js +5 -58
- package/dist/index351.js +2 -52
- package/dist/index352.js +22 -30
- package/dist/index353.js +41 -2
- package/dist/index354.js +2 -5
- package/dist/index355.js +11 -2
- package/dist/index356.js +19 -22
- package/dist/index357.js +9 -40
- package/dist/index358.js +10 -2
- package/dist/index359.js +16 -10
- package/dist/index360.js +2 -20
- package/dist/index361.js +9 -2
- package/dist/index362.js +10 -9
- package/dist/index363.js +14 -19
- package/dist/index364.js +19 -56
- package/dist/index365.js +19 -28
- package/dist/index366.js +63 -6
- package/dist/index367.js +36 -51
- package/dist/index368.js +19 -7
- package/dist/index369.js +56 -11
- package/dist/index370.js +29 -7
- package/dist/index371.js +6 -27
- package/dist/index372.js +52 -2
- package/dist/index373.js +6 -69
- package/dist/index374.js +11 -166
- package/dist/index375.js +7 -37
- 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 +2 -2
- package/dist/index380.js +17 -31
- package/dist/index381.js +100 -10
- package/dist/index382.js +90 -3
- package/dist/index383.js +98 -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 -101
- package/dist/index393.js +31 -91
- package/dist/index394.js +27 -97
- package/dist/index395.js +60 -16
- package/dist/index396.js +1 -1
- package/dist/index401.js +1 -1
- package/dist/index402.js +2 -2
- package/dist/index46.js +6 -3
- package/dist/index50.js +1 -1
- package/dist/src/components/grid/grid.stories.d.ts +2 -0
- package/dist/src/components/list/list.stories.d.ts +1 -0
- package/dist/src/components/modal/modal.stories.d.ts +1 -0
- package/dist/src/components/page-layout/page-layout.vue.d.ts +4 -0
- package/dist/src/components/room-details-popover/room-details-popover.d.ts +3 -0
- package/dist/src/components/select/select.d.ts +1 -0
- package/dist/src/components/select/select.stories.d.ts +3 -0
- package/dist/src/components/time-picker/time-picker.vue.d.ts +3 -0
- package/package.json +1 -1
package/dist/index131.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as te, useSlots as le, ref as n, computed as i, onMounted as ae, nextTick as _, onUnmounted as re, resolveComponent as se, openBlock as p, createElementBlock as b, normalizeClass as r, createElementVNode as d, normalizeStyle as S, unref as T, renderSlot as v, createCommentVNode as E, createVNode as ne } from "vue";
|
|
2
|
+
import u from "./index57.js";
|
|
3
|
+
import de from "./index58.js";
|
|
4
|
+
const ie = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-none text-left" }, ue = 100, ce = "4.5rem", ve = "4.8125rem", W = 80, me = 24, we = /* @__PURE__ */ te({
|
|
4
5
|
__name: "page-layout",
|
|
5
6
|
props: {
|
|
6
7
|
headerBackgroundColor: { default: "green-20" },
|
|
@@ -26,268 +27,288 @@ const Z = { class: "flex-grow m-0 font-bold sm-down:text-md md:text-lg leading-n
|
|
|
26
27
|
adjustForKeyboard: { type: Boolean, default: !1 }
|
|
27
28
|
},
|
|
28
29
|
emits: ["update:sidebarCollapsed"],
|
|
29
|
-
setup(
|
|
30
|
-
const l =
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
setup(t, { expose: I, emit: P }) {
|
|
31
|
+
const l = t, U = P, { deviceType: G } = de(), J = le(), k = n(null), y = n(null), R = n(null), C = n(null), m = n(!0), c = n(!1), f = n(!1), z = n(!1), B = n(0), V = n(0), D = n({
|
|
32
|
+
top: "50vh",
|
|
33
|
+
left: "24px",
|
|
34
|
+
transform: "translate(-50%, -50%)"
|
|
35
|
+
});
|
|
36
|
+
let x = 0, H = !1, F = 0, M = 0, L = null;
|
|
37
|
+
const g = i(() => !!J.sidebar), h = i(() => l.headerFixed !== void 0 ? l.headerFixed : g.value), a = i({
|
|
33
38
|
get: () => l.sidebarCollapsed,
|
|
34
|
-
set: (e) =>
|
|
35
|
-
}),
|
|
36
|
-
() =>
|
|
37
|
-
),
|
|
38
|
-
() => `${l.headerTop +
|
|
39
|
-
),
|
|
40
|
-
() => `calc(100vh - ${l.headerTop +
|
|
41
|
-
),
|
|
42
|
-
() =>
|
|
43
|
-
),
|
|
44
|
-
const e =
|
|
39
|
+
set: (e) => U("update:sidebarCollapsed", e)
|
|
40
|
+
}), Q = i(() => G.value === "desktop"), X = i(
|
|
41
|
+
() => g.value && l.sidebarCollapsible && u.md
|
|
42
|
+
), Z = i(
|
|
43
|
+
() => `${l.headerTop + W}px`
|
|
44
|
+
), ee = i(
|
|
45
|
+
() => `calc(100vh - ${l.headerTop + W}px)`
|
|
46
|
+
), Y = i(
|
|
47
|
+
() => a.value ? l.sidebarCollapsedWidth : l.sidebarWidth
|
|
48
|
+
), oe = i(() => {
|
|
49
|
+
const e = l.headerTop + W, o = window.innerHeight / 2 + 97, w = e + 16 + V.value / 2;
|
|
50
|
+
return `${Math.min(o, w)}px`;
|
|
51
|
+
}), j = () => {
|
|
52
|
+
const e = y.value, o = !u.md && e;
|
|
45
53
|
return {
|
|
46
|
-
scrollY:
|
|
47
|
-
atTop:
|
|
48
|
-
atBottom:
|
|
54
|
+
scrollY: o ? e.scrollTop : window.scrollY,
|
|
55
|
+
atTop: o ? e.scrollTop <= 0 : window.scrollY <= 0,
|
|
56
|
+
atBottom: o ? e.scrollTop + e.clientHeight >= e.scrollHeight : window.scrollY + window.innerHeight >= document.documentElement.scrollHeight
|
|
49
57
|
};
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
const { scrollY: e, atTop:
|
|
53
|
-
if (
|
|
58
|
+
}, $ = () => {
|
|
59
|
+
H || (window.requestAnimationFrame(() => {
|
|
60
|
+
const { scrollY: e, atTop: o, atBottom: s } = j();
|
|
61
|
+
if (m.value = o, c.value = s, l.headerHideOnScroll && (h.value || !u.md)) {
|
|
54
62
|
if (e <= l.headerHideScrollThreshold) {
|
|
55
|
-
f.value = !1,
|
|
63
|
+
f.value = !1, x = e, H = !1;
|
|
56
64
|
return;
|
|
57
65
|
}
|
|
58
|
-
if (
|
|
59
|
-
|
|
66
|
+
if (s) {
|
|
67
|
+
x = e, H = !1;
|
|
60
68
|
return;
|
|
61
69
|
}
|
|
62
|
-
const
|
|
63
|
-
Math.abs(
|
|
70
|
+
const K = Math.max(0, e), N = K - x;
|
|
71
|
+
Math.abs(N) > 15 && (f.value = N > 0, x = K);
|
|
64
72
|
} else
|
|
65
73
|
f.value = !1;
|
|
66
|
-
|
|
67
|
-
}),
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
if (!
|
|
72
|
-
const e =
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
O(), H = !1;
|
|
75
|
+
}), H = !0);
|
|
76
|
+
}, q = () => {
|
|
77
|
+
a.value = !a.value, _(O);
|
|
78
|
+
}, O = () => {
|
|
79
|
+
if (!a.value || !R.value) return;
|
|
80
|
+
const e = R.value.getBoundingClientRect(), o = Math.max(0, e.top), s = Math.min(window.innerHeight, e.bottom);
|
|
81
|
+
s <= o || (D.value = {
|
|
82
|
+
top: `${(o + s) / 2}px`,
|
|
83
|
+
left: `${e.left + me}px`,
|
|
84
|
+
transform: "translate(-50%, -50%)"
|
|
85
|
+
});
|
|
86
|
+
}, A = () => {
|
|
87
|
+
if (!l.adjustForKeyboard || u.md) return;
|
|
88
|
+
const e = window.visualViewport?.height ?? window.innerHeight, o = F - e;
|
|
89
|
+
if (o <= ue)
|
|
90
|
+
F = window.innerHeight, M = k.value?.clientHeight ?? window.innerHeight, B.value = 0;
|
|
75
91
|
else {
|
|
76
|
-
const
|
|
77
|
-
B.value = Math.max(0,
|
|
92
|
+
const s = k.value?.clientHeight ?? window.innerHeight, w = Math.max(0, M - s);
|
|
93
|
+
B.value = Math.max(0, o - w);
|
|
78
94
|
}
|
|
79
95
|
};
|
|
80
|
-
return
|
|
81
|
-
|
|
96
|
+
return ae(() => {
|
|
97
|
+
F = window.innerHeight, M = k.value?.clientHeight ?? window.innerHeight, window.addEventListener("scroll", $, { passive: !0 }), y.value && y.value.addEventListener("scroll", $, {
|
|
82
98
|
passive: !0
|
|
83
99
|
});
|
|
84
|
-
const { scrollY: e, atTop:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}),
|
|
89
|
-
|
|
90
|
-
|
|
100
|
+
const { scrollY: e, atTop: o, atBottom: s } = j();
|
|
101
|
+
x = e, m.value = o, c.value = s, l.adjustForKeyboard && window.visualViewport?.addEventListener("resize", A), _(O), C.value && (L = new ResizeObserver(() => {
|
|
102
|
+
V.value = C.value?.offsetHeight ?? 0;
|
|
103
|
+
}), L.observe(C.value), V.value = C.value.offsetHeight);
|
|
104
|
+
}), re(() => {
|
|
105
|
+
window.removeEventListener("scroll", $), y.value?.removeEventListener("scroll", $), window.visualViewport?.removeEventListener("resize", A), L?.disconnect();
|
|
106
|
+
}), I({ scrolledToTop: m, scrolledToBottom: c, headerHidden: f, keyboardOffset: B }), (e, o) => {
|
|
107
|
+
const s = se("q-icon");
|
|
108
|
+
return p(), b("div", {
|
|
91
109
|
ref_key: "rootRef",
|
|
92
110
|
ref: k,
|
|
93
|
-
class:
|
|
111
|
+
class: r([
|
|
94
112
|
"page-layout",
|
|
95
|
-
`bg-${
|
|
113
|
+
`bg-${t.containerBackgroundColor}`,
|
|
96
114
|
"sm-down:absolute sm-down:inset-x-0 sm-down:top-0 sm-down:bottom-0"
|
|
97
115
|
])
|
|
98
116
|
}, [
|
|
99
117
|
d("div", {
|
|
100
|
-
class:
|
|
118
|
+
class: r([
|
|
101
119
|
"page-layout__header",
|
|
102
120
|
"flex items-center justify-center",
|
|
103
|
-
|
|
104
|
-
|
|
121
|
+
T(u).md ? `bg-${t.containerBackgroundColor}` : "",
|
|
122
|
+
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",
|
|
105
123
|
{ "page-layout__header--hidden": f.value }
|
|
106
124
|
]),
|
|
107
|
-
style:
|
|
125
|
+
style: S(h.value ? { top: `${t.headerTop}px` } : void 0)
|
|
108
126
|
}, [
|
|
109
127
|
d("div", {
|
|
110
|
-
class:
|
|
128
|
+
class: r([
|
|
111
129
|
"page-layout__header-bar",
|
|
112
130
|
"flex items-center text-left md:rounded-lg",
|
|
113
|
-
`md:h-[3.5rem] ${
|
|
131
|
+
`md:h-[3.5rem] ${t.maxContentWidth} w-full p-4 md:pl-6`,
|
|
114
132
|
"sm-down:py-6 sm-down:h-[4.5rem]",
|
|
115
|
-
`bg-${
|
|
116
|
-
`text-${
|
|
117
|
-
|
|
133
|
+
`bg-${t.headerBackgroundColor}`,
|
|
134
|
+
`text-${t.headerColor}`,
|
|
135
|
+
t.headerBarClass,
|
|
118
136
|
{
|
|
119
|
-
"md:shadow-[0_0.375rem_0.5rem_0_rgba(0,0,0,0.05)] md:shadow-gray-20":
|
|
137
|
+
"md:shadow-[0_0.375rem_0.5rem_0_rgba(0,0,0,0.05)] md:shadow-gray-20": h.value && (!m.value || t.headerShowShadow)
|
|
120
138
|
}
|
|
121
139
|
])
|
|
122
140
|
}, [
|
|
123
|
-
d("h1",
|
|
124
|
-
|
|
125
|
-
scrolledToTop:
|
|
126
|
-
scrolledToBottom:
|
|
141
|
+
d("h1", ie, [
|
|
142
|
+
v(e.$slots, "header", {
|
|
143
|
+
scrolledToTop: m.value,
|
|
144
|
+
scrolledToBottom: c.value
|
|
127
145
|
}, void 0, !0)
|
|
128
146
|
]),
|
|
129
|
-
|
|
147
|
+
v(e.$slots, "header-actions", {}, void 0, !0)
|
|
130
148
|
], 2)
|
|
131
149
|
], 6),
|
|
132
150
|
d("div", {
|
|
133
151
|
ref_key: "contentRef",
|
|
134
|
-
ref:
|
|
135
|
-
class:
|
|
152
|
+
ref: y,
|
|
153
|
+
class: r([
|
|
136
154
|
"page-layout__content",
|
|
137
155
|
"sm-down:absolute sm-down:left-0 sm-down:right-0",
|
|
138
156
|
"sm-down:overflow-y-auto sm-down:scroll-smooth sm-down:overscroll-none",
|
|
139
|
-
{ "md:pt-[4.5rem]":
|
|
140
|
-
{ "md:mb-[0.5rem]":
|
|
141
|
-
|
|
157
|
+
{ "md:pt-[4.5rem]": h.value },
|
|
158
|
+
{ "md:mb-[0.5rem]": h.value && l.footerVisible },
|
|
159
|
+
t.contentClass
|
|
142
160
|
]),
|
|
143
|
-
style:
|
|
144
|
-
"--sm-top": f.value ? "0px" :
|
|
145
|
-
"--sm-bottom": l.footerVisible ?
|
|
161
|
+
style: S({
|
|
162
|
+
"--sm-top": f.value ? "0px" : ce,
|
|
163
|
+
"--sm-bottom": l.footerVisible ? ve : "0px",
|
|
146
164
|
"--keyboard-offset": `${B.value}px`
|
|
147
165
|
})
|
|
148
166
|
}, [
|
|
149
167
|
d("div", {
|
|
150
|
-
class:
|
|
168
|
+
class: r([
|
|
151
169
|
"page-layout__content-inner",
|
|
152
|
-
{ "md:flex md:gap-4":
|
|
170
|
+
{ "md:flex md:gap-4": g.value }
|
|
153
171
|
])
|
|
154
172
|
}, [
|
|
155
|
-
|
|
173
|
+
g.value && T(u).md ? (p(), b("div", {
|
|
156
174
|
key: 0,
|
|
157
|
-
|
|
175
|
+
ref_key: "sidebarRef",
|
|
176
|
+
ref: R,
|
|
177
|
+
class: r([
|
|
158
178
|
"page-layout__sidebar",
|
|
159
|
-
"shrink-0 flex flex-col gap-4",
|
|
179
|
+
"relative shrink-0 flex flex-col gap-4",
|
|
160
180
|
"md:transition-[width] md:duration-300",
|
|
161
|
-
|
|
162
|
-
{ "!overflow-hidden":
|
|
163
|
-
|
|
181
|
+
Y.value,
|
|
182
|
+
{ "!overflow-hidden": a.value },
|
|
183
|
+
t.sidebarClass
|
|
164
184
|
]),
|
|
165
|
-
onMouseenter:
|
|
166
|
-
onMouseleave:
|
|
185
|
+
onMouseenter: o[0] || (o[0] = (w) => z.value = !0),
|
|
186
|
+
onMouseleave: o[1] || (o[1] = (w) => z.value = !1)
|
|
167
187
|
}, [
|
|
168
188
|
d("div", {
|
|
169
|
-
class:
|
|
189
|
+
class: r([
|
|
170
190
|
"page-layout__sidebar-inner",
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
191
|
+
a.value ? "absolute inset-0 !overflow-hidden" : "fixed overflow-y-auto",
|
|
192
|
+
"z-10 md:pb-6 md:pt-4",
|
|
193
|
+
`bg-${t.containerBackgroundColor}`,
|
|
194
|
+
!a.value && Y.value
|
|
175
195
|
]),
|
|
176
|
-
style:
|
|
177
|
-
top:
|
|
178
|
-
height:
|
|
196
|
+
style: S(a.value ? void 0 : {
|
|
197
|
+
top: Z.value,
|
|
198
|
+
height: ee.value
|
|
179
199
|
})
|
|
180
200
|
}, [
|
|
181
|
-
|
|
201
|
+
d("div", {
|
|
202
|
+
ref_key: "sidebarContentRef",
|
|
203
|
+
ref: C
|
|
204
|
+
}, [
|
|
205
|
+
v(e.$slots, "sidebar", {}, void 0, !0)
|
|
206
|
+
], 512)
|
|
182
207
|
], 6),
|
|
183
|
-
|
|
208
|
+
a.value ? (p(), b("div", {
|
|
184
209
|
key: 0,
|
|
185
|
-
class: "
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}),
|
|
190
|
-
onClick: W
|
|
191
|
-
}, null, 4)) : S("", !0),
|
|
192
|
-
U.value && (z.value || r.value) ? (w(), b("div", {
|
|
210
|
+
class: "absolute inset-0 cursor-pointer rounded-lg bg-white z-10",
|
|
211
|
+
onClick: q
|
|
212
|
+
})) : E("", !0),
|
|
213
|
+
X.value && (!Q.value || z.value || a.value) ? (p(), b("div", {
|
|
193
214
|
key: 1,
|
|
194
|
-
class:
|
|
215
|
+
class: r([
|
|
195
216
|
"page-layout__sidebar-toggle",
|
|
196
217
|
"cursor-pointer fixed z-30",
|
|
197
218
|
"bg-white rounded",
|
|
198
|
-
"transition-all duration-300 ease-in-out",
|
|
199
|
-
{ "border border-gray-10": !
|
|
219
|
+
!a.value && "transition-all duration-300 ease-in-out",
|
|
220
|
+
{ "border border-gray-10": !a.value }
|
|
200
221
|
]),
|
|
201
|
-
style:
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
onClick:
|
|
222
|
+
style: S(
|
|
223
|
+
a.value ? D.value : {
|
|
224
|
+
top: oe.value,
|
|
225
|
+
marginLeft: T(u).lg ? "22.125rem" : "18.125rem"
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
onClick: q
|
|
208
229
|
}, [
|
|
209
|
-
|
|
210
|
-
|
|
230
|
+
v(e.$slots, "sidebar-toggle", { collapsed: a.value }, () => [
|
|
231
|
+
ne(s, {
|
|
211
232
|
icon: "double-chevron-right",
|
|
212
233
|
color: "inkwell-30",
|
|
213
234
|
type: "",
|
|
214
|
-
class:
|
|
235
|
+
class: r([
|
|
215
236
|
"page-layout__sidebar-toggle-icon",
|
|
216
237
|
"w-6 h-6 p-1 text-inkwell-30",
|
|
217
|
-
{ "rotate-180":
|
|
238
|
+
{ "rotate-180": a.value }
|
|
218
239
|
])
|
|
219
240
|
}, null, 8, ["class"])
|
|
220
241
|
], !0)
|
|
221
|
-
], 6)) :
|
|
222
|
-
], 34)) :
|
|
242
|
+
], 6)) : E("", !0)
|
|
243
|
+
], 34)) : E("", !0),
|
|
223
244
|
d("div", {
|
|
224
|
-
class:
|
|
245
|
+
class: r([
|
|
225
246
|
"page-layout__main",
|
|
226
247
|
"block w-full grow leading-normal",
|
|
227
|
-
{ "md:mb-4":
|
|
228
|
-
|
|
248
|
+
{ "md:mb-4": g.value },
|
|
249
|
+
t.mainClass
|
|
229
250
|
])
|
|
230
251
|
}, [
|
|
231
|
-
|
|
232
|
-
sidebarCollapsed:
|
|
233
|
-
scrolledToTop:
|
|
234
|
-
scrolledToBottom:
|
|
252
|
+
v(e.$slots, "default", {
|
|
253
|
+
sidebarCollapsed: a.value,
|
|
254
|
+
scrolledToTop: m.value,
|
|
255
|
+
scrolledToBottom: c.value
|
|
235
256
|
}, void 0, !0)
|
|
236
257
|
], 2)
|
|
237
258
|
], 2)
|
|
238
259
|
], 6),
|
|
239
|
-
|
|
240
|
-
l.footerVisible ? (
|
|
260
|
+
v(e.$slots, "overlay", {}, void 0, !0),
|
|
261
|
+
l.footerVisible ? (p(), b("div", {
|
|
241
262
|
key: 0,
|
|
242
|
-
class:
|
|
263
|
+
class: r([
|
|
243
264
|
"page-layout__footer",
|
|
244
265
|
"fixed bottom-0 left-0 right-0 z-20 justify-center",
|
|
245
|
-
`bg-${
|
|
246
|
-
|
|
266
|
+
`bg-${t.footerBackgroundColor}`,
|
|
267
|
+
T(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"
|
|
247
268
|
])
|
|
248
269
|
}, [
|
|
249
|
-
|
|
270
|
+
T(u).md ? (p(), b("div", {
|
|
250
271
|
key: 0,
|
|
251
|
-
class:
|
|
272
|
+
class: r([
|
|
252
273
|
"flex gap-4 items-end h-0 overflow-visible margin-x-auto w-full",
|
|
253
|
-
|
|
274
|
+
t.maxContentWidth
|
|
254
275
|
])
|
|
255
276
|
}, [
|
|
256
277
|
d("div", {
|
|
257
|
-
class:
|
|
278
|
+
class: r([
|
|
258
279
|
"shrink-0 w-0 transition-[width] duration-300",
|
|
259
|
-
|
|
280
|
+
g.value ? Y.value : "hidden"
|
|
260
281
|
])
|
|
261
282
|
}, null, 2),
|
|
262
283
|
d("div", {
|
|
263
|
-
class:
|
|
284
|
+
class: r([
|
|
264
285
|
"grow pb-6 rounded-t-lg",
|
|
265
|
-
`bg-${
|
|
286
|
+
`bg-${t.containerBackgroundColor}`
|
|
266
287
|
])
|
|
267
288
|
}, [
|
|
268
289
|
d("div", {
|
|
269
|
-
class:
|
|
290
|
+
class: r([
|
|
270
291
|
"page-layout__footer-bar",
|
|
271
292
|
"flex items-center justify-center gap-4",
|
|
272
293
|
"left-auto right-auto py-4",
|
|
273
294
|
"rounded-lg shadow-[0_-2px_5px_0_rgba(0,0,0,0.05)] shadow-gray-10",
|
|
274
|
-
`bg-${
|
|
275
|
-
{ "shadow-none":
|
|
276
|
-
|
|
295
|
+
`bg-${t.footerBackgroundColor}`,
|
|
296
|
+
{ "shadow-none": c.value },
|
|
297
|
+
t.footerBarClass
|
|
277
298
|
])
|
|
278
299
|
}, [
|
|
279
|
-
|
|
300
|
+
v(e.$slots, "footer", { scrolledToBottom: c.value }, void 0, !0)
|
|
280
301
|
], 2)
|
|
281
302
|
], 2)
|
|
282
|
-
], 2)) :
|
|
303
|
+
], 2)) : v(e.$slots, "footer", {
|
|
283
304
|
key: 1,
|
|
284
|
-
scrolledToBottom:
|
|
305
|
+
scrolledToBottom: c.value
|
|
285
306
|
}, void 0, !0)
|
|
286
|
-
], 2)) :
|
|
307
|
+
], 2)) : E("", !0)
|
|
287
308
|
], 2);
|
|
288
309
|
};
|
|
289
310
|
}
|
|
290
311
|
});
|
|
291
312
|
export {
|
|
292
|
-
|
|
313
|
+
we as default
|
|
293
314
|
};
|
package/dist/index149.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Multiselect as
|
|
3
|
-
import { useI18n as
|
|
1
|
+
import { defineComponent as I, ref as u, computed as a, watch as h, nextTick as c } from "vue";
|
|
2
|
+
import { Multiselect as q } from "./index199.js";
|
|
3
|
+
import { useI18n as D } from "vue-i18n";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
const
|
|
5
|
+
import N from "./index6.js";
|
|
6
|
+
const z = I({
|
|
7
7
|
name: "QSelect",
|
|
8
8
|
components: {
|
|
9
|
-
QBadge:
|
|
10
|
-
VueMultiselect:
|
|
9
|
+
QBadge: N,
|
|
10
|
+
VueMultiselect: q
|
|
11
11
|
},
|
|
12
12
|
props: {
|
|
13
13
|
id: {
|
|
@@ -207,88 +207,98 @@ const U = H({
|
|
|
207
207
|
}
|
|
208
208
|
},
|
|
209
209
|
emits: ["update:model-value"],
|
|
210
|
-
setup(l, { slots:
|
|
211
|
-
const { t: r } =
|
|
212
|
-
|
|
213
|
-
},
|
|
214
|
-
p.value =
|
|
215
|
-
},
|
|
216
|
-
const
|
|
217
|
-
label:
|
|
218
|
-
name:
|
|
210
|
+
setup(l, { slots: m, emit: s }) {
|
|
211
|
+
const { t: r } = D(), o = u(null), d = u(null), t = u(l.modelValue), p = u(""), i = u(!1), f = u([]), y = a(() => Array.isArray(l.options) ? l.options.length : 0), S = a(() => !!m.action), b = a(() => l.noResultMessage || r("HC_PRESS_ENTER_TO_CREATE_A_TAG")), B = a(() => l.tagPlaceholder || r("HC_PRESS_ENTER_TO_CREATE_A_TAG")), _ = a(() => l.noOptionsMessage || r("HC_LIST_IS_EMPTY")), T = a(() => y.value === t.value.length ? r("HC_ALL") : t.value.length > 1 ? r("HC_MULTIPLE_SELECTED") : t.value[0].label || t.value[0].name || ""), A = a(() => l.taggable || l.showTags), E = a(() => !!(l.groupValues && l.groupLabel && l.groupSelectable)), v = a(() => l.multiple ? Array.isArray(t.value) && t.value.length > 0 : t.value !== null && t.value !== void 0 && t.value !== ""), O = a(() => l.floatingLabel), C = a(() => l.floatingLabel && v.value), w = (e) => {
|
|
212
|
+
s("update:model-value", e);
|
|
213
|
+
}, L = (e) => {
|
|
214
|
+
p.value = e;
|
|
215
|
+
}, M = async (e) => {
|
|
216
|
+
const n = {
|
|
217
|
+
label: e,
|
|
218
|
+
name: e,
|
|
219
219
|
added: !0
|
|
220
220
|
// maybe change this to class - I am going to use this for external emails
|
|
221
221
|
};
|
|
222
|
-
if (!l.validationMethod(
|
|
223
|
-
await
|
|
222
|
+
if (!l.validationMethod(n)) {
|
|
223
|
+
await c(), o.value.search = e;
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
226
|
-
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
typeof
|
|
231
|
-
|
|
226
|
+
f.value.push(n), t.value.push(n);
|
|
227
|
+
}, R = () => {
|
|
228
|
+
t.value = [], s("update:model-value", t.value);
|
|
229
|
+
}, V = (e) => {
|
|
230
|
+
typeof e == "number" && e >= 0 ? t.value.splice(e, 1) : t.value = [], c(() => {
|
|
231
|
+
s("update:model-value", t.value);
|
|
232
232
|
});
|
|
233
|
-
},
|
|
234
|
-
l.multiple &&
|
|
235
|
-
|
|
233
|
+
}, x = (e) => {
|
|
234
|
+
l.multiple && t.value && e.length === t.value.length && c(() => {
|
|
235
|
+
t.value = [], s("update:model-value", t.value);
|
|
236
236
|
});
|
|
237
|
-
},
|
|
238
|
-
if (
|
|
239
|
-
await
|
|
240
|
-
const
|
|
237
|
+
}, P = async () => {
|
|
238
|
+
if (i.value || (i.value = !0, f.value = l.options), d.value && l.searchable) {
|
|
239
|
+
await c();
|
|
240
|
+
const e = d.value.querySelector(
|
|
241
241
|
".multiselect__content-wrapper"
|
|
242
|
-
),
|
|
242
|
+
), n = d.value.querySelector(
|
|
243
243
|
".multiselect__input"
|
|
244
244
|
);
|
|
245
|
-
|
|
245
|
+
n.style.width = e.clientWidth + "px";
|
|
246
246
|
}
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
}, g = u(!1), F = (e) => {
|
|
248
|
+
g.value = e, e || c(() => {
|
|
249
|
+
o.value?.deactivate?.();
|
|
250
|
+
});
|
|
251
|
+
}, k = () => {
|
|
252
|
+
if (g.value) {
|
|
253
|
+
const e = o.value;
|
|
254
|
+
e && (e.isOpen = !0);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
i.value = !1;
|
|
258
|
+
}, H = async () => {
|
|
259
|
+
if (!o.value)
|
|
251
260
|
return;
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}) :
|
|
261
|
+
const e = o.value;
|
|
262
|
+
t.value = [], l.groupValues ? e.filteredOptions.forEach((n) => {
|
|
263
|
+
t.value.push(n);
|
|
264
|
+
}) : t.value = e.filteredOptions, s("update:model-value", t.value);
|
|
256
265
|
};
|
|
257
|
-
return
|
|
258
|
-
|
|
259
|
-
}),
|
|
260
|
-
|
|
266
|
+
return h(() => l.modelValue, (e) => {
|
|
267
|
+
t.value = e;
|
|
268
|
+
}), h(() => l.options, (e) => {
|
|
269
|
+
i.value && (f.value = e);
|
|
261
270
|
}), {
|
|
262
|
-
currentSelect:
|
|
263
|
-
currentContainer:
|
|
271
|
+
currentSelect: o,
|
|
272
|
+
currentContainer: d,
|
|
264
273
|
search: p,
|
|
265
|
-
selected:
|
|
266
|
-
isOpened:
|
|
267
|
-
internalOptions:
|
|
274
|
+
selected: t,
|
|
275
|
+
isOpened: i,
|
|
276
|
+
internalOptions: f,
|
|
268
277
|
// computed
|
|
269
|
-
hasAction:
|
|
270
|
-
noResultsText:
|
|
271
|
-
noOptionsText:
|
|
272
|
-
noTagFound:
|
|
278
|
+
hasAction: S,
|
|
279
|
+
noResultsText: b,
|
|
280
|
+
noOptionsText: _,
|
|
281
|
+
noTagFound: B,
|
|
273
282
|
selectedCount: y,
|
|
274
|
-
selectedText:
|
|
275
|
-
useTags:
|
|
276
|
-
enableGroupSelect:
|
|
283
|
+
selectedText: T,
|
|
284
|
+
useTags: A,
|
|
285
|
+
enableGroupSelect: E,
|
|
277
286
|
hasValue: v,
|
|
278
|
-
showFloatingLabel:
|
|
287
|
+
showFloatingLabel: O,
|
|
279
288
|
isLabelFloated: C,
|
|
280
|
-
addTag:
|
|
281
|
-
clearAll:
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
+
addTag: M,
|
|
290
|
+
clearAll: R,
|
|
291
|
+
keepOpen: F,
|
|
292
|
+
onOpen: P,
|
|
293
|
+
onClose: k,
|
|
294
|
+
onRemove: x,
|
|
295
|
+
onUpdateValue: w,
|
|
296
|
+
removeElement: V,
|
|
297
|
+
searchChange: L,
|
|
298
|
+
selectAll: H
|
|
289
299
|
};
|
|
290
300
|
}
|
|
291
301
|
});
|
|
292
302
|
export {
|
|
293
|
-
|
|
303
|
+
z as default
|
|
294
304
|
};
|