@quidgest/ui 0.16.43 → 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.
- package/dist/json/api.json +36 -57
- package/dist/manifest/components.json +0 -1
- package/dist/ui.css +1 -1
- package/dist/ui.esm.js +5246 -5170
- package/dist/ui.js +24 -20
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +657 -650
- package/dist/ui.scss +2 -2
- package/esm/components/QDialog/QDialog.d.ts +1 -0
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +50 -48
- package/esm/components/QDialog/index.d.ts +6 -0
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +7 -0
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +2 -0
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +23 -17
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +4 -0
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +70 -68
- package/esm/components/QDropdownMenu/index.d.ts +2 -0
- package/esm/components/QDropdownMenu/index.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.d.ts +1 -0
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +114 -111
- package/esm/components/QOverlay/index.d.ts +6 -0
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/types.d.ts +7 -0
- package/esm/components/QOverlay/types.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +12 -11
- package/esm/components/QPopover/QPopover.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.vue.js +14 -13
- package/esm/components/QSelect/QSelect.vue.js +1 -2
- package/esm/components/index.d.ts +0 -1
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +70 -72
- package/esm/composables/useDialog/index.d.ts +1 -0
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/index.d.ts +0 -1
- package/esm/vendors/focus-trap-vue/dist/focus-trap-vue.esm-browser.js +104 -0
- package/package.json +3 -2
- package/esm/components/QFocusTrap/QFocusTrap.d.ts +0 -28
- package/esm/components/QFocusTrap/QFocusTrap.d.ts.map +0 -1
- package/esm/components/QFocusTrap/QFocusTrap.vue.js +0 -32
- package/esm/components/QFocusTrap/QFocusTrap.vue2.js +0 -4
- package/esm/components/QFocusTrap/index.d.ts +0 -37
- package/esm/components/QFocusTrap/index.d.ts.map +0 -1
- package/esm/components/QFocusTrap/index.js +0 -6
- package/esm/components/QFocusTrap/types.d.ts +0 -6
- package/esm/components/QFocusTrap/types.d.ts.map +0 -1
- package/esm/vendors/@vueuse/integrations/useFocusTrap/component.js +0 -24
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { QDismissibleLayer as
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
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__ */
|
|
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__ */
|
|
39
|
-
setup(
|
|
40
|
-
const t =
|
|
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--${
|
|
43
|
-
|
|
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 =
|
|
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,
|
|
62
|
-
const
|
|
62
|
+
P(r, te);
|
|
63
|
+
const J = l(() => {
|
|
63
64
|
if (f.value) return;
|
|
64
|
-
const e =
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
78
|
+
}), h = b(null), S = b(null), v = b(null);
|
|
78
79
|
function i() {
|
|
79
|
-
const e =
|
|
80
|
-
if (!e || !
|
|
80
|
+
const e = s();
|
|
81
|
+
if (!e || !v.value)
|
|
81
82
|
return;
|
|
82
|
-
const
|
|
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 =
|
|
89
|
+
}, n = _e(
|
|
89
90
|
e,
|
|
90
|
-
|
|
91
|
-
(
|
|
92
|
-
|
|
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
|
-
|
|
103
|
+
R(0);
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
-
|
|
105
|
+
function q() {
|
|
106
|
+
R(t.delay);
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
-
p &&
|
|
108
|
+
function R(e) {
|
|
109
|
+
p && M(), p = window.setTimeout(() => {
|
|
109
110
|
r.value = !0;
|
|
110
111
|
}, e);
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
-
if (p &&
|
|
114
|
-
const e =
|
|
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
|
|
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
|
-
|
|
123
|
+
g(ue), x("enter");
|
|
126
124
|
}
|
|
127
125
|
function Y() {
|
|
128
|
-
|
|
126
|
+
V();
|
|
129
127
|
}
|
|
130
128
|
function Z() {
|
|
131
|
-
|
|
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
|
|
137
|
+
function V() {
|
|
137
138
|
o.animating = !1;
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
return t.anchor ?
|
|
140
|
+
function s() {
|
|
141
|
+
return t.anchor ? Te(t.anchor) : null;
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
+
function ne(e) {
|
|
143
144
|
t.persistent && e.preventDefault();
|
|
144
145
|
}
|
|
145
|
-
function
|
|
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
|
|
152
|
-
e.defaultPrevented || e.detail.originalEvent.type === "pointerdown" && (
|
|
152
|
+
let u = !1;
|
|
153
|
+
e.defaultPrevented || e.detail.originalEvent.type === "pointerdown" && (u = !0);
|
|
153
154
|
const n = e.detail.originalEvent.target;
|
|
154
|
-
if ((
|
|
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" &&
|
|
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
|
-
|
|
162
|
+
d();
|
|
163
|
+
}
|
|
164
|
+
let m;
|
|
165
|
+
function ae() {
|
|
166
|
+
const e = s();
|
|
166
167
|
if (e)
|
|
167
|
-
switch (
|
|
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",
|
|
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
|
|
182
|
-
const e =
|
|
182
|
+
function ie() {
|
|
183
|
+
const e = s();
|
|
183
184
|
if (e)
|
|
184
|
-
switch (
|
|
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",
|
|
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
|
|
194
|
+
function le() {
|
|
194
195
|
window.addEventListener("resize", i), t.scrollLock || window.addEventListener("scroll", i);
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function se() {
|
|
197
198
|
window.removeEventListener("resize", i), t.scrollLock || window.removeEventListener("scroll", i);
|
|
198
199
|
}
|
|
199
|
-
let
|
|
200
|
-
function
|
|
201
|
-
|
|
200
|
+
let E;
|
|
201
|
+
function $() {
|
|
202
|
+
s() ? (i(), E = window.setTimeout($, 100)) : d();
|
|
202
203
|
}
|
|
203
|
-
function
|
|
204
|
+
function ue() {
|
|
204
205
|
var e;
|
|
205
|
-
f.value || (
|
|
206
|
+
f.value || (le(), t.spy ? $() : i()), (f.value || t.trigger === "click") && ((e = S.value) == null || e.focus());
|
|
206
207
|
}
|
|
207
|
-
function
|
|
208
|
-
f.value ||
|
|
208
|
+
function ce() {
|
|
209
|
+
f.value || se(), t.spy && (clearTimeout(E), E = void 0);
|
|
209
210
|
}
|
|
210
|
-
return
|
|
211
|
-
g(
|
|
212
|
-
}), pe(
|
|
213
|
-
|
|
211
|
+
return ve(() => {
|
|
212
|
+
g(ae);
|
|
213
|
+
}), pe(ie), (e, u) => (c(), k(
|
|
214
|
+
me,
|
|
214
215
|
null,
|
|
215
216
|
[
|
|
216
|
-
(
|
|
217
|
-
disabled: !
|
|
217
|
+
(c(), _(ye, {
|
|
218
|
+
disabled: !H.value,
|
|
218
219
|
to: t.attach
|
|
219
220
|
}, [
|
|
220
|
-
|
|
221
|
+
B(z, {
|
|
221
222
|
name: "fade",
|
|
222
223
|
appear: ""
|
|
223
224
|
}, {
|
|
224
225
|
default: L(() => [
|
|
225
|
-
|
|
226
|
+
D.value ? (c(), k(
|
|
226
227
|
"div",
|
|
227
228
|
{
|
|
228
229
|
key: 0,
|
|
229
|
-
class:
|
|
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
|
-
)) :
|
|
239
|
+
)) : y("v-if", !0)
|
|
239
240
|
]),
|
|
240
241
|
_: 1
|
|
241
242
|
/* STABLE */
|
|
242
243
|
}),
|
|
243
|
-
|
|
244
|
+
B(z, {
|
|
244
245
|
name: t.transition,
|
|
245
246
|
appear: "",
|
|
246
|
-
onEnter:
|
|
247
|
-
onAfterEnter:
|
|
248
|
-
onLeave:
|
|
249
|
-
onAfterLeave:
|
|
247
|
+
onEnter: X,
|
|
248
|
+
onAfterEnter: Y,
|
|
249
|
+
onLeave: Z,
|
|
250
|
+
onAfterLeave: ee
|
|
250
251
|
}, {
|
|
251
252
|
default: L(() => [
|
|
252
|
-
r.value ? (
|
|
253
|
+
r.value ? (c(), k("div", {
|
|
253
254
|
key: 0,
|
|
254
255
|
id: t.id,
|
|
255
256
|
ref_key: "overlayContainerRef",
|
|
256
|
-
ref:
|
|
257
|
+
ref: v,
|
|
257
258
|
tabindex: "-1",
|
|
258
|
-
class:
|
|
259
|
-
style:
|
|
259
|
+
class: U(j.value),
|
|
260
|
+
style: N(J.value)
|
|
260
261
|
}, [
|
|
261
|
-
T(
|
|
262
|
-
onDismiss:
|
|
263
|
-
onInteractOutside:
|
|
264
|
-
onPointerDownOutside:
|
|
262
|
+
B(T(ke), {
|
|
263
|
+
onDismiss: re,
|
|
264
|
+
onInteractOutside: oe,
|
|
265
|
+
onPointerDownOutside: ne
|
|
265
266
|
}, {
|
|
266
267
|
default: L(() => [
|
|
267
|
-
|
|
268
|
+
v.value ? (c(), _(T(Ee), {
|
|
268
269
|
key: 0,
|
|
269
|
-
|
|
270
|
-
|
|
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
|
-
|
|
276
|
+
he("div", we({
|
|
274
277
|
ref_key: "overlayRef",
|
|
275
|
-
ref:
|
|
278
|
+
ref: S,
|
|
276
279
|
class: "q-overlay__content",
|
|
277
280
|
tabindex: "-1",
|
|
278
|
-
role:
|
|
281
|
+
role: D.value ? "dialog" : void 0
|
|
279
282
|
}, e.$attrs), [
|
|
280
|
-
t.arrow ? (
|
|
283
|
+
t.arrow ? (c(), k(
|
|
281
284
|
"div",
|
|
282
285
|
{
|
|
283
286
|
key: 0,
|
|
284
287
|
ref_key: "arrowRef",
|
|
285
|
-
ref:
|
|
288
|
+
ref: h,
|
|
286
289
|
role: "presentation",
|
|
287
290
|
class: "q-overlay__arrow",
|
|
288
|
-
style:
|
|
291
|
+
style: N(K.value)
|
|
289
292
|
},
|
|
290
293
|
null,
|
|
291
294
|
4
|
|
292
295
|
/* STYLE */
|
|
293
|
-
)) :
|
|
294
|
-
|
|
295
|
-
], 16,
|
|
296
|
+
)) : y("v-if", !0),
|
|
297
|
+
ge(e.$slots, "default")
|
|
298
|
+
], 16, xe)
|
|
296
299
|
]),
|
|
297
300
|
_: 3
|
|
298
301
|
/* FORWARDED */
|
|
299
|
-
}, 8, ["
|
|
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,
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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,wBAAwB,CAAA;AAEtD,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IACjD;;;;OAIG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAA;IAExB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IA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,11 @@
|
|
|
1
|
-
import { defineComponent as p, mergeModels as u, useModel as f, computed as
|
|
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
|
-
},
|
|
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"),
|
|
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) => (
|
|
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:
|
|
68
|
+
default: h(() => {
|
|
68
69
|
var e;
|
|
69
70
|
return [
|
|
70
71
|
i("div", w, [
|
|
71
|
-
|
|
72
|
-
g(
|
|
72
|
+
r.value ? (s(), v("div", M, [
|
|
73
|
+
g(d(_), {
|
|
73
74
|
"model-value": o.score,
|
|
74
75
|
max: 1,
|
|
75
|
-
color:
|
|
76
|
+
color: r.value.color
|
|
76
77
|
}, null, 8, ["model-value", "color"]),
|
|
77
78
|
i(
|
|
78
79
|
"span",
|
|
79
80
|
null,
|
|
80
|
-
B(
|
|
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 ? (
|
|
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
|
-
|
|
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":"
|
|
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
|
|
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(
|
|
27
|
-
const e =
|
|
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:
|
|
31
|
-
"onUpdate:modelValue": r[0] || (r[0] = (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(),
|
|
44
|
-
t.$slots.header ?
|
|
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
|
-
|
|
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
|
-
|
|
57
|
+
l(t.$slots, "header.append")
|
|
57
58
|
],
|
|
58
59
|
64
|
|
59
60
|
/* STABLE_FRAGMENT */
|
|
60
61
|
))
|
|
61
62
|
])) : v("v-if", !0),
|
|
62
|
-
|
|
63
|
-
e.html ? (o(),
|
|
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(),
|
|
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;
|