@quidgest/ui 0.16.42 → 0.16.44

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 (59) hide show
  1. package/dist/json/api.json +68 -57
  2. package/dist/manifest/components.json +0 -1
  3. package/dist/ui.css +18 -22
  4. package/dist/ui.esm.js +5318 -5235
  5. package/dist/ui.js +25 -21
  6. package/dist/ui.min.css +1 -1
  7. package/dist/ui.min.js +659 -650
  8. package/dist/ui.scss +65 -53
  9. package/esm/components/QDialog/QDialog.d.ts +1 -0
  10. package/esm/components/QDialog/QDialog.d.ts.map +1 -1
  11. package/esm/components/QDialog/QDialog.vue.js +50 -48
  12. package/esm/components/QDialog/index.d.ts +6 -0
  13. package/esm/components/QDialog/index.d.ts.map +1 -1
  14. package/esm/components/QDialog/types.d.ts +7 -0
  15. package/esm/components/QDialog/types.d.ts.map +1 -1
  16. package/esm/components/QDivider/QDivider.d.ts +2 -0
  17. package/esm/components/QDivider/QDivider.d.ts.map +1 -1
  18. package/esm/components/QDivider/QDivider.vue.js +26 -18
  19. package/esm/components/QDivider/index.d.ts +6 -0
  20. package/esm/components/QDivider/index.d.ts.map +1 -1
  21. package/esm/components/QDivider/types.d.ts +14 -0
  22. package/esm/components/QDivider/types.d.ts.map +1 -1
  23. package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +2 -0
  24. package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
  25. package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +23 -17
  26. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +4 -0
  27. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
  28. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +70 -68
  29. package/esm/components/QDropdownMenu/index.d.ts +2 -0
  30. package/esm/components/QDropdownMenu/index.d.ts.map +1 -1
  31. package/esm/components/QOverlay/QOverlay.d.ts +1 -0
  32. package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
  33. package/esm/components/QOverlay/QOverlay.vue.js +114 -111
  34. package/esm/components/QOverlay/index.d.ts +6 -0
  35. package/esm/components/QOverlay/index.d.ts.map +1 -1
  36. package/esm/components/QOverlay/types.d.ts +7 -0
  37. package/esm/components/QOverlay/types.d.ts.map +1 -1
  38. package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +12 -11
  39. package/esm/components/QPopover/QPopover.d.ts.map +1 -1
  40. package/esm/components/QPopover/QPopover.vue.js +14 -13
  41. package/esm/components/QSelect/QSelect.vue.js +1 -2
  42. package/esm/components/index.d.ts +0 -1
  43. package/esm/components/index.d.ts.map +1 -1
  44. package/esm/components/index.js +70 -72
  45. package/esm/composables/useDialog/index.d.ts +1 -0
  46. package/esm/composables/useDialog/index.d.ts.map +1 -1
  47. package/esm/index.d.ts +0 -1
  48. package/esm/vendors/focus-trap-vue/dist/focus-trap-vue.esm-browser.js +104 -0
  49. package/package.json +3 -2
  50. package/esm/components/QFocusTrap/QFocusTrap.d.ts +0 -28
  51. package/esm/components/QFocusTrap/QFocusTrap.d.ts.map +0 -1
  52. package/esm/components/QFocusTrap/QFocusTrap.vue.js +0 -32
  53. package/esm/components/QFocusTrap/QFocusTrap.vue2.js +0 -4
  54. package/esm/components/QFocusTrap/index.d.ts +0 -37
  55. package/esm/components/QFocusTrap/index.d.ts.map +0 -1
  56. package/esm/components/QFocusTrap/index.js +0 -6
  57. package/esm/components/QFocusTrap/types.d.ts +0 -6
  58. package/esm/components/QFocusTrap/types.d.ts.map +0 -1
  59. package/esm/vendors/@vueuse/integrations/useFocusTrap/component.js +0 -24
@@ -1,14 +1,14 @@
1
- import { defineComponent as ue, mergeModels as A, useModel as ce, computed as d, reactive as I, watch as P, ref as _, nextTick as g, onMounted as fe, onBeforeUnmount as pe, createElementBlock as k, openBlock as u, Fragment as ve, createBlock as B, createCommentVNode as m, Teleport as me, createVNode as T, Transition as z, withCtx as L, normalizeClass as F, normalizeStyle as Q, unref as C, createElementVNode as ye, mergeProps as he, renderSlot as we } from "vue";
2
- import { QDismissibleLayer as ge } from "../QDismissibleLayer/index.js";
3
- import { QFocusTrap as ke } from "../QFocusTrap/index.js";
1
+ import { defineComponent as de, mergeModels as F, useModel as fe, computed as l, reactive as I, ref as b, watch as P, nextTick as g, onMounted as ve, onBeforeUnmount as pe, createElementBlock as k, openBlock as c, Fragment as me, createBlock as _, createCommentVNode as y, Teleport as ye, createVNode as B, Transition as z, withCtx as L, normalizeClass as U, normalizeStyle as N, unref as T, createElementVNode as he, mergeProps as we, renderSlot as ge } from "vue";
2
+ import { QDismissibleLayer as ke } from "../QDismissibleLayer/index.js";
4
3
  import { QRemoveScrollBar as Le } from "../QRemoveScrollBar/index.js";
5
- import { getSideFromPlacement as Ee, computePosition as be } from "../../composables/overlay.js";
6
- import { useTheme as _e } from "../../composables/theme.js";
7
- import { getElement as Be } from "../../utils/getElement.js";
8
- const Te = ["id"], Ce = ["role"], $e = /* @__PURE__ */ ue({
4
+ import { FocusTrap as Ee } from "../../vendors/focus-trap-vue/dist/focus-trap-vue.esm-browser.js";
5
+ import { getSideFromPlacement as be, computePosition as _e } from "../../composables/overlay.js";
6
+ import { useTheme as Be } from "../../composables/theme.js";
7
+ import { getElement as Te } from "../../utils/getElement.js";
8
+ const Ce = ["id"], xe = ["role"], Ae = /* @__PURE__ */ de({
9
9
  inheritAttrs: !1,
10
10
  __name: "QOverlay",
11
- props: /* @__PURE__ */ A({
11
+ props: /* @__PURE__ */ F({
12
12
  id: {},
13
13
  class: {},
14
14
  anchor: {},
@@ -30,24 +30,25 @@ const Te = ["id"], Ce = ["role"], $e = /* @__PURE__ */ ue({
30
30
  persistent: { type: Boolean },
31
31
  spy: { type: Boolean },
32
32
  trigger: { default: "click" },
33
- focusTrap: { type: Boolean }
33
+ focusTrap: { type: Boolean },
34
+ returnFocusOnDeactivate: { type: Boolean, default: !0 }
34
35
  }, {
35
36
  modelValue: { type: Boolean },
36
37
  modelModifiers: {}
37
38
  }),
38
- emits: /* @__PURE__ */ A(["enter", "leave"], ["update:modelValue"]),
39
- setup(x, { emit: U }) {
40
- const t = x, S = U, r = ce(x, "modelValue"), { class: N } = _e(), W = d(() => [
39
+ emits: /* @__PURE__ */ F(["enter", "leave"], ["update:modelValue"]),
40
+ setup(C, { emit: Q }) {
41
+ const t = C, x = Q, r = fe(C, "modelValue"), { class: W } = Be(), j = l(() => [
41
42
  "q-overlay",
42
- `q-overlay--${Ee(o.placement)}`,
43
- N.value,
43
+ `q-overlay--${be(o.placement)}`,
44
+ W.value,
44
45
  {
45
46
  "q-overlay--independent": f.value,
46
47
  "q-overlay--inverted": t.appearance === "inverted",
47
48
  "q-overlay--center": t.centerVertically
48
49
  },
49
50
  t.class
50
- ]), f = d(() => t.anchor === void 0), q = d(() => r.value && !t.nonModal), j = d(() => (r.value || o.animating) && t.scrollLock), G = d(() => !t.inline && (r.value || o.animating)), o = I({
51
+ ]), f = l(() => t.anchor === void 0), D = l(() => r.value && !t.nonModal), G = l(() => (r.value || o.animating) && t.scrollLock), H = l(() => !t.inline && (r.value || o.animating)), O = l(() => v.value ?? "#" + t.id), o = I({
51
52
  animating: !1,
52
53
  top: 0,
53
54
  left: 0,
@@ -58,38 +59,38 @@ const Te = ["id"], Ce = ["role"], $e = /* @__PURE__ */ ue({
58
59
  left: void 0,
59
60
  hidden: !0
60
61
  });
61
- P(r, ee);
62
- const H = d(() => {
62
+ P(r, te);
63
+ const J = l(() => {
63
64
  if (f.value) return;
64
- const e = l(), s = t.width === "anchor", n = s ? e == null ? void 0 : e.getBoundingClientRect().width : void 0;
65
+ const e = s(), u = t.width === "anchor", n = u ? e == null ? void 0 : e.getBoundingClientRect().width : void 0;
65
66
  return {
66
67
  top: `${o.top}px`,
67
68
  left: `${o.left}px`,
68
69
  width: n !== void 0 ? `${n}px` : void 0
69
70
  };
70
- }), J = d(() => {
71
+ }), K = l(() => {
71
72
  if (t.arrow)
72
73
  return {
73
74
  top: a.top !== void 0 ? `${a.top}px` : void 0,
74
75
  left: a.left !== void 0 ? `${a.left}px` : void 0,
75
76
  opacity: a.hidden ? 0 : 1
76
77
  };
77
- }), y = _(null), h = _(null), E = _(null);
78
+ }), h = b(null), S = b(null), v = b(null);
78
79
  function i() {
79
- const e = l();
80
- if (!e || !h.value)
80
+ const e = s();
81
+ if (!e || !v.value)
81
82
  return;
82
- const s = {
83
+ const u = {
83
84
  placement: t.placement,
84
85
  width: t.width,
85
86
  offset: t.offset,
86
87
  crossOffset: t.crossOffset,
87
88
  arrow: t.arrow
88
- }, n = be(
89
+ }, n = _e(
89
90
  e,
90
- h.value,
91
- (y == null ? void 0 : y.value) ?? void 0,
92
- s
91
+ v.value,
92
+ (h == null ? void 0 : h.value) ?? void 0,
93
+ u
93
94
  );
94
95
  o.left = n.overlayCoords.x, o.top = n.overlayCoords.y, o.placement = n.placement, a.hidden = n.arrowCoords === void 0, n.arrowCoords && (a.top = n.arrowCoords.y, a.left = n.arrowCoords.x);
95
96
  }
@@ -99,72 +100,72 @@ const Te = ["id"], Ce = ["role"], $e = /* @__PURE__ */ ue({
99
100
  );
100
101
  let p;
101
102
  function w() {
102
- O(0);
103
+ R(0);
103
104
  }
104
- function D() {
105
- O(t.delay);
105
+ function q() {
106
+ R(t.delay);
106
107
  }
107
- function O(e) {
108
- p && R(), p = window.setTimeout(() => {
108
+ function R(e) {
109
+ p && M(), p = window.setTimeout(() => {
109
110
  r.value = !0;
110
111
  }, e);
111
112
  }
112
- function c() {
113
- if (p && R(), r.value = !1, t.anchor && t.trigger === "click") {
114
- const e = l();
113
+ function d() {
114
+ if (p && M(), r.value = !1, t.anchor && t.trigger === "click") {
115
+ const e = s();
115
116
  g(() => e == null ? void 0 : e.focus());
116
117
  }
117
118
  }
118
- function R() {
119
+ function M() {
119
120
  clearTimeout(p), p = void 0;
120
121
  }
121
- function K() {
122
- g(se), S("enter");
123
- }
124
122
  function X() {
125
- M();
123
+ g(ue), x("enter");
126
124
  }
127
125
  function Y() {
128
- S("leave");
126
+ V();
129
127
  }
130
128
  function Z() {
131
- M(), de();
129
+ x("leave");
132
130
  }
133
131
  function ee() {
132
+ V(), ce();
133
+ }
134
+ function te() {
134
135
  o.animating = !0;
135
136
  }
136
- function M() {
137
+ function V() {
137
138
  o.animating = !1;
138
139
  }
139
- function l() {
140
- return t.anchor ? Be(t.anchor) : null;
140
+ function s() {
141
+ return t.anchor ? Te(t.anchor) : null;
141
142
  }
142
- function te(e) {
143
+ function ne(e) {
143
144
  t.persistent && e.preventDefault();
144
145
  }
145
- function ne(e) {
146
- var $;
146
+ function oe(e) {
147
+ var A;
147
148
  if (t.persistent) {
148
149
  e.preventDefault();
149
150
  return;
150
151
  }
151
- let s = !1;
152
- e.defaultPrevented || e.detail.originalEvent.type === "pointerdown" && (s = !0);
152
+ let u = !1;
153
+ e.defaultPrevented || e.detail.originalEvent.type === "pointerdown" && (u = !0);
153
154
  const n = e.detail.originalEvent.target;
154
- if (($ = l()) == null ? void 0 : $.contains(n)) {
155
+ if ((A = s()) == null ? void 0 : A.contains(n)) {
155
156
  e.preventDefault();
156
157
  return;
157
158
  }
158
- e.detail.originalEvent.type === "focusin" && s && e.preventDefault();
159
+ e.detail.originalEvent.type === "focusin" && u && e.preventDefault();
159
160
  }
160
- function oe() {
161
- c();
162
- }
163
- let v;
164
161
  function re() {
165
- const e = l();
162
+ d();
163
+ }
164
+ let m;
165
+ function ae() {
166
+ const e = s();
166
167
  if (e)
167
- switch (v = new MutationObserver(i), v.observe(e, {
168
+ switch (m = new MutationObserver(i), m.observe(e, {
168
169
  attributes: !1,
169
170
  childList: !0,
170
171
  characterData: !0,
@@ -174,59 +175,59 @@ const Te = ["id"], Ce = ["role"], $e = /* @__PURE__ */ ue({
174
175
  e.addEventListener("click", w);
175
176
  break;
176
177
  case "hover":
177
- e.addEventListener("mouseenter", D), e.addEventListener("mouseleave", c), e.addEventListener("focusin", w), e.addEventListener("focusout", c);
178
+ e.addEventListener("mouseenter", q), e.addEventListener("mouseleave", d), e.addEventListener("focusin", w), e.addEventListener("focusout", d);
178
179
  break;
179
180
  }
180
181
  }
181
- function ae() {
182
- const e = l();
182
+ function ie() {
183
+ const e = s();
183
184
  if (e)
184
- switch (v == null || v.disconnect(), t.trigger) {
185
+ switch (m == null || m.disconnect(), t.trigger) {
185
186
  case "click":
186
187
  e.removeEventListener("click", w);
187
188
  break;
188
189
  case "hover":
189
- e.removeEventListener("mouseenter", D), e.removeEventListener("mouseleave", c), e.removeEventListener("focusin", w), e.removeEventListener("focusout", c);
190
+ e.removeEventListener("mouseenter", q), e.removeEventListener("mouseleave", d), e.removeEventListener("focusin", w), e.removeEventListener("focusout", d);
190
191
  break;
191
192
  }
192
193
  }
193
- function ie() {
194
+ function le() {
194
195
  window.addEventListener("resize", i), t.scrollLock || window.addEventListener("scroll", i);
195
196
  }
196
- function le() {
197
+ function se() {
197
198
  window.removeEventListener("resize", i), t.scrollLock || window.removeEventListener("scroll", i);
198
199
  }
199
- let b;
200
- function V() {
201
- l() ? (i(), b = window.setTimeout(V, 100)) : c();
200
+ let E;
201
+ function $() {
202
+ s() ? (i(), E = window.setTimeout($, 100)) : d();
202
203
  }
203
- function se() {
204
+ function ue() {
204
205
  var e;
205
- f.value || (ie(), t.spy ? V() : i()), (f.value || t.trigger === "click") && ((e = h.value) == null || e.focus());
206
+ f.value || (le(), t.spy ? $() : i()), (f.value || t.trigger === "click") && ((e = S.value) == null || e.focus());
206
207
  }
207
- function de() {
208
- f.value || le(), t.spy && (clearTimeout(b), b = void 0);
208
+ function ce() {
209
+ f.value || se(), t.spy && (clearTimeout(E), E = void 0);
209
210
  }
210
- return fe(() => {
211
- g(re);
212
- }), pe(ae), (e, s) => (u(), k(
213
- ve,
211
+ return ve(() => {
212
+ g(ae);
213
+ }), pe(ie), (e, u) => (c(), k(
214
+ me,
214
215
  null,
215
216
  [
216
- (u(), B(me, {
217
- disabled: !G.value,
217
+ (c(), _(ye, {
218
+ disabled: !H.value,
218
219
  to: t.attach
219
220
  }, [
220
- T(z, {
221
+ B(z, {
221
222
  name: "fade",
222
223
  appear: ""
223
224
  }, {
224
225
  default: L(() => [
225
- q.value ? (u(), k(
226
+ D.value ? (c(), k(
226
227
  "div",
227
228
  {
228
229
  key: 0,
229
- class: F([
230
+ class: U([
230
231
  t.backdropClass,
231
232
  "q-overlay__underlay",
232
233
  { "q-overlay__underlay--blur": t.backdropBlur }
@@ -235,79 +236,81 @@ const Te = ["id"], Ce = ["role"], $e = /* @__PURE__ */ ue({
235
236
  null,
236
237
  2
237
238
  /* CLASS */
238
- )) : m("v-if", !0)
239
+ )) : y("v-if", !0)
239
240
  ]),
240
241
  _: 1
241
242
  /* STABLE */
242
243
  }),
243
- T(z, {
244
+ B(z, {
244
245
  name: t.transition,
245
246
  appear: "",
246
- onEnter: K,
247
- onAfterEnter: X,
248
- onLeave: Y,
249
- onAfterLeave: Z
247
+ onEnter: X,
248
+ onAfterEnter: Y,
249
+ onLeave: Z,
250
+ onAfterLeave: ee
250
251
  }, {
251
252
  default: L(() => [
252
- r.value ? (u(), k("div", {
253
+ r.value ? (c(), k("div", {
253
254
  key: 0,
254
255
  id: t.id,
255
256
  ref_key: "overlayContainerRef",
256
- ref: E,
257
+ ref: v,
257
258
  tabindex: "-1",
258
- class: F(W.value),
259
- style: Q(H.value)
259
+ class: U(j.value),
260
+ style: N(J.value)
260
261
  }, [
261
- T(C(ge), {
262
- onDismiss: oe,
263
- onInteractOutside: ne,
264
- onPointerDownOutside: te
262
+ B(T(ke), {
263
+ onDismiss: re,
264
+ onInteractOutside: oe,
265
+ onPointerDownOutside: ne
265
266
  }, {
266
267
  default: L(() => [
267
- E.value ? (u(), B(C(ke), {
268
+ v.value ? (c(), _(T(Ee), {
268
269
  key: 0,
269
- disabled: t.nonModal || !r.value || !t.focusTrap,
270
- options: { fallbackFocus: E.value }
270
+ active: !t.nonModal && r.value && t.focusTrap,
271
+ "fallback-focus": O.value,
272
+ "initial-focus": O.value,
273
+ "return-focus-on-deactivate": t.returnFocusOnDeactivate
271
274
  }, {
272
275
  default: L(() => [
273
- ye("div", he({
276
+ he("div", we({
274
277
  ref_key: "overlayRef",
275
- ref: h,
278
+ ref: S,
276
279
  class: "q-overlay__content",
277
280
  tabindex: "-1",
278
- role: q.value ? "dialog" : void 0
281
+ role: D.value ? "dialog" : void 0
279
282
  }, e.$attrs), [
280
- t.arrow ? (u(), k(
283
+ t.arrow ? (c(), k(
281
284
  "div",
282
285
  {
283
286
  key: 0,
284
287
  ref_key: "arrowRef",
285
- ref: y,
288
+ ref: h,
286
289
  role: "presentation",
287
290
  class: "q-overlay__arrow",
288
- style: Q(J.value)
291
+ style: N(K.value)
289
292
  },
290
293
  null,
291
294
  4
292
295
  /* STYLE */
293
- )) : m("v-if", !0),
294
- we(e.$slots, "default")
295
- ], 16, Ce)
296
+ )) : y("v-if", !0),
297
+ ge(e.$slots, "default")
298
+ ], 16, xe)
296
299
  ]),
297
300
  _: 3
298
301
  /* FORWARDED */
299
- }, 8, ["disabled", "options"])) : m("v-if", !0)
302
+ }, 8, ["active", "fallback-focus", "initial-focus", "return-focus-on-deactivate"])) : y("v-if", !0)
300
303
  ]),
301
304
  _: 3
302
305
  /* FORWARDED */
303
306
  })
304
- ], 14, Te)) : m("v-if", !0)
307
+ ], 14, Ce)) : y("v-if", !0)
305
308
  ]),
306
309
  _: 3
307
310
  /* FORWARDED */
308
311
  }, 8, ["name"])
309
312
  ], 8, ["disabled", "to"])),
310
- j.value ? (u(), B(C(Le), { key: 0 })) : m("v-if", !0)
313
+ G.value ? (c(), _(T(Le), { key: 0 })) : y("v-if", !0)
311
314
  ],
312
315
  64
313
316
  /* STABLE_FRAGMENT */
@@ -315,5 +318,5 @@ const Te = ["id"], Ce = ["role"], $e = /* @__PURE__ */ ue({
315
318
  }
316
319
  });
317
320
  export {
318
- $e as default
321
+ Ae as default
319
322
  };
@@ -22,6 +22,7 @@ declare const QOverlay: {
22
22
  spy?: boolean;
23
23
  trigger?: import('../../composables/overlay').Trigger;
24
24
  focusTrap?: boolean;
25
+ returnFocusOnDeactivate?: boolean;
25
26
  }> & Readonly<{
26
27
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
27
28
  onEnter?: (() => any) | undefined;
@@ -41,6 +42,7 @@ declare const QOverlay: {
41
42
  attach: string;
42
43
  delay: number;
43
44
  trigger: import('../../composables/overlay').Trigger;
45
+ returnFocusOnDeactivate: boolean;
44
46
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
45
47
  overlayContainerRef: HTMLDivElement;
46
48
  overlayRef: HTMLDivElement;
@@ -75,6 +77,7 @@ declare const QOverlay: {
75
77
  spy?: boolean;
76
78
  trigger?: import('../../composables/overlay').Trigger;
77
79
  focusTrap?: boolean;
80
+ returnFocusOnDeactivate?: boolean;
78
81
  }> & Readonly<{
79
82
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
80
83
  onEnter?: (() => any) | undefined;
@@ -89,6 +92,7 @@ declare const QOverlay: {
89
92
  attach: string;
90
93
  delay: number;
91
94
  trigger: import('../../composables/overlay').Trigger;
95
+ returnFocusOnDeactivate: boolean;
92
96
  }>;
93
97
  __isFragment?: never;
94
98
  __isTeleport?: never;
@@ -116,6 +120,7 @@ declare const QOverlay: {
116
120
  spy?: boolean;
117
121
  trigger?: import('../../composables/overlay').Trigger;
118
122
  focusTrap?: boolean;
123
+ returnFocusOnDeactivate?: boolean;
119
124
  }> & Readonly<{
120
125
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
121
126
  onEnter?: (() => any) | undefined;
@@ -135,6 +140,7 @@ declare const QOverlay: {
135
140
  attach: string;
136
141
  delay: number;
137
142
  trigger: import('../../composables/overlay').Trigger;
143
+ returnFocusOnDeactivate: boolean;
138
144
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
139
145
  $slots: {
140
146
  default?(_: {}): any;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA6B,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,CAAA;AAGnB,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA6B,CAAA;AAG3C,OAAO,EAAE,QAAQ,EAAE,CAAA;AAGnB,cAAc,SAAS,CAAA"}
@@ -133,5 +133,12 @@ export type QOverlayProps = QBaseComponentProps & {
133
133
  * @category Behavior
134
134
  */
135
135
  focusTrap?: boolean;
136
+ /**
137
+ * Whether to return focus to the element that opened this
138
+ * when the focus trap is deactivaed.
139
+ *
140
+ * @category Behavior
141
+ */
142
+ returnFocusOnDeactivate?: boolean;
136
143
  };
137
144
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM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b;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;OAKG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAA"}
@@ -1,11 +1,11 @@
1
- import { defineComponent as p, mergeModels as u, useModel as f, computed as h, createBlock as d, openBlock as r, unref as c, withCtx as y, createElementVNode as i, createElementBlock as v, createCommentVNode as m, createVNode as g, toDisplayString as B } from "vue";
1
+ import { defineComponent as p, mergeModels as u, useModel as f, computed as y, createBlock as c, openBlock as s, unref as d, withCtx as h, createElementVNode as i, createElementBlock as v, createCommentVNode as m, createVNode as g, toDisplayString as B } from "vue";
2
2
  import { QMeter as _ } from "../QMeter/index.js";
3
3
  import { QOverlay as V } from "../QOverlay/index.js";
4
4
  import k from "./QPasswordFieldMessages.vue.js";
5
5
  const w = { class: "q-password-field__meter" }, M = {
6
6
  key: 0,
7
7
  class: "q-password-field__meter-score"
8
- }, N = /* @__PURE__ */ p({
8
+ }, I = /* @__PURE__ */ p({
9
9
  inheritAttrs: !1,
10
10
  __name: "QPasswordFieldMeterOverlay",
11
11
  props: /* @__PURE__ */ u({
@@ -31,6 +31,7 @@ const w = { class: "q-password-field__meter" }, M = {
31
31
  spy: { type: Boolean },
32
32
  trigger: {},
33
33
  focusTrap: { type: Boolean },
34
+ returnFocusOnDeactivate: { type: Boolean },
34
35
  messages: {},
35
36
  score: {},
36
37
  levels: {}
@@ -40,7 +41,7 @@ const w = { class: "q-password-field__meter" }, M = {
40
41
  }),
41
42
  emits: ["update:modelValue"],
42
43
  setup(a) {
43
- const o = a, n = f(a, "modelValue"), s = h(() => {
44
+ const o = a, n = f(a, "modelValue"), r = y(() => {
44
45
  if (!o.levels.length) {
45
46
  console.warn("Levels array is empty.");
46
47
  return;
@@ -55,7 +56,7 @@ const w = { class: "q-password-field__meter" }, M = {
55
56
  }
56
57
  return o.levels[o.levels.length - 1];
57
58
  });
58
- return (t, l) => (r(), d(c(V), {
59
+ return (t, l) => (s(), c(d(V), {
59
60
  modelValue: n.value,
60
61
  "onUpdate:modelValue": l[0] || (l[0] = (e) => n.value = e),
61
62
  trigger: "manual",
@@ -64,25 +65,25 @@ const w = { class: "q-password-field__meter" }, M = {
64
65
  "non-modal": "",
65
66
  placement: "bottom"
66
67
  }, {
67
- default: y(() => {
68
+ default: h(() => {
68
69
  var e;
69
70
  return [
70
71
  i("div", w, [
71
- s.value ? (r(), v("div", M, [
72
- g(c(_), {
72
+ r.value ? (s(), v("div", M, [
73
+ g(d(_), {
73
74
  "model-value": o.score,
74
75
  max: 1,
75
- color: s.value.color
76
+ color: r.value.color
76
77
  }, null, 8, ["model-value", "color"]),
77
78
  i(
78
79
  "span",
79
80
  null,
80
- B(s.value.label),
81
+ B(r.value.label),
81
82
  1
82
83
  /* TEXT */
83
84
  )
84
85
  ])) : m("v-if", !0),
85
- (e = t.messages) != null && e.length ? (r(), d(k, {
86
+ (e = t.messages) != null && e.length ? (s(), c(k, {
86
87
  key: 1,
87
88
  messages: t.messages
88
89
  }, null, 8, ["messages"])) : m("v-if", !0)
@@ -95,5 +96,5 @@ const w = { class: "q-password-field__meter" }, M = {
95
96
  }
96
97
  });
97
98
  export {
98
- N as default
99
+ I as default
99
100
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QPopover.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QPopover/QPopover.vue"],"names":[],"mappings":"AAkCA;AA6DC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,KAAK,WAAW,GAAG,aAAa,CAAC;AAuBlC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAsFT,OAAO,IAA6B;;wBAbtB,GAAG;kCACO,GAAG;iCACJ,GAAG;yBACX,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"QPopover.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QPopover/QPopover.vue"],"names":[],"mappings":"AAmCA;AA8DC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,KAAK,WAAW,GAAG,aAAa,CAAC;AAuBlC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAwFT,OAAO,IAA6B;;wBAbtB,GAAG;kCACO,GAAG;iCACJ,GAAG;yBACX,GAAG;;;;EAe/B;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;6EAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { defineComponent as c, mergeModels as m, useModel as u, createBlock as h, openBlock as o, unref as f, normalizeClass as y, withCtx as _, createElementVNode as d, createElementBlock as l, createCommentVNode as v, renderSlot as a, Fragment as k, toDisplayString as i } from "vue";
1
+ import { defineComponent as c, mergeModels as m, useModel as u, createBlock as h, openBlock as o, unref as f, normalizeClass as y, withCtx as _, createElementVNode as d, createElementBlock as a, createCommentVNode as v, renderSlot as l, Fragment as k, toDisplayString as i } from "vue";
2
2
  import { QOverlay as B } from "../QOverlay/index.js";
3
3
  const V = { class: "q-popover__content" }, g = {
4
4
  key: 0,
@@ -23,12 +23,12 @@ const V = { class: "q-popover__content" }, g = {
23
23
  modelModifiers: {}
24
24
  }),
25
25
  emits: ["update:modelValue"],
26
- setup(n) {
27
- const e = n, s = u(n, "modelValue");
26
+ setup(s) {
27
+ const e = s, n = u(s, "modelValue");
28
28
  return (t, r) => (o(), h(f(B), {
29
29
  id: e.id,
30
- modelValue: s.value,
31
- "onUpdate:modelValue": r[0] || (r[0] = (p) => s.value = p),
30
+ modelValue: n.value,
31
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => n.value = p),
32
32
  class: y(["q-popover", e.class]),
33
33
  trigger: "click",
34
34
  anchor: e.anchor,
@@ -36,16 +36,17 @@ const V = { class: "q-popover__content" }, g = {
36
36
  attach: e.attach,
37
37
  inline: e.inline,
38
38
  disabled: e.disabled,
39
- placement: e.placement
39
+ placement: e.placement,
40
+ "focus-trap": ""
40
41
  }, {
41
42
  default: _(() => [
42
43
  d("div", V, [
43
- e.title || t.$slots.header ? (o(), l("div", g, [
44
- t.$slots.header ? a(t.$slots, "header", { key: 0 }) : (o(), l(
44
+ e.title || t.$slots.header ? (o(), a("div", g, [
45
+ t.$slots.header ? l(t.$slots, "header", { key: 0 }) : (o(), a(
45
46
  k,
46
47
  { key: 1 },
47
48
  [
48
- a(t.$slots, "header.prepend"),
49
+ l(t.$slots, "header.prepend"),
49
50
  d(
50
51
  "h4",
51
52
  $,
@@ -53,17 +54,17 @@ const V = { class: "q-popover__content" }, g = {
53
54
  1
54
55
  /* TEXT */
55
56
  ),
56
- a(t.$slots, "header.append")
57
+ l(t.$slots, "header.append")
57
58
  ],
58
59
  64
59
60
  /* STABLE_FRAGMENT */
60
61
  ))
61
62
  ])) : v("v-if", !0),
62
- a(t.$slots, "default", {}, () => [
63
- e.html ? (o(), l("span", {
63
+ l(t.$slots, "default", {}, () => [
64
+ e.html ? (o(), a("span", {
64
65
  key: 0,
65
66
  innerHTML: e.text
66
- }, null, 8, b)) : (o(), l(
67
+ }, null, 8, b)) : (o(), a(
67
68
  "span",
68
69
  w,
69
70
  i(e.text),
@@ -130,9 +130,8 @@ const De = {
130
130
  }
131
131
  async function $() {
132
132
  var n;
133
- if (await O(), !e.multiple || !e.badges || !N.value) return;
133
+ if (await O(), await O(), !e.multiple || !e.badges || !N.value) return;
134
134
  let l = 0, a = 0;
135
- await O();
136
135
  const d = N.value.offsetWidth, i = 4;
137
136
  for (const b of W.value ?? []) {
138
137
  const v = b.$el.scrollWidth + i;