@quoreadmin/ui 1.10.4 → 1.10.6

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