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