@quidgest/ui 0.14.13 → 0.14.14
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/ui.css +69 -77
- package/dist/ui.esm.js +1185 -1165
- package/dist/ui.js +18 -18
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +551 -549
- package/dist/ui.scss +79 -87
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +64 -64
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +50 -29
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ne, mergeModels as
|
|
1
|
+
import { defineComponent as ne, mergeModels as V, useModel as oe, computed as l, reactive as A, watch as k, ref as U, nextTick as v, onMounted as re, onBeforeUnmount as ie, createElementBlock as E, openBlock as u, Fragment as ae, createBlock as B, createCommentVNode as g, Teleport as le, createVNode as se, normalizeClass as z, Transition as de, withCtx as I, unref as b, createElementVNode as P, normalizeStyle as N, mergeProps as ue, withKeys as ce, renderSlot as fe } from "vue";
|
|
2
2
|
import { QRemoveScrollBar as me } from "../QRemoveScrollBar/index.js";
|
|
3
3
|
import { QThemeProvider as ve } from "../QThemeProvider/index.js";
|
|
4
4
|
import { getSideFromPlacement as pe, computePosition as he } from "../../composables/overlay.js";
|
|
@@ -7,7 +7,7 @@ import { getElement as we } from "../../utils/getElement.js";
|
|
|
7
7
|
const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "QOverlay",
|
|
10
|
-
props: /* @__PURE__ */
|
|
10
|
+
props: /* @__PURE__ */ V({
|
|
11
11
|
anchor: {},
|
|
12
12
|
appearance: { default: "regular" },
|
|
13
13
|
arrow: { type: Boolean },
|
|
@@ -31,9 +31,9 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
31
31
|
modelValue: { type: Boolean },
|
|
32
32
|
modelModifiers: {}
|
|
33
33
|
}),
|
|
34
|
-
emits: /* @__PURE__ */
|
|
35
|
-
setup(
|
|
36
|
-
const t =
|
|
34
|
+
emits: /* @__PURE__ */ V(["enter", "leave"], ["update:modelValue"]),
|
|
35
|
+
setup(_, { emit: Q }) {
|
|
36
|
+
const t = _, T = Q, r = oe(_, "modelValue"), D = ye(), F = l(() => [
|
|
37
37
|
"q-overlay",
|
|
38
38
|
`q-overlay--${pe(n.placement)}`,
|
|
39
39
|
{
|
|
@@ -41,13 +41,13 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
41
41
|
"q-overlay--inverted": t.appearance === "inverted"
|
|
42
42
|
},
|
|
43
43
|
t.class
|
|
44
|
-
]), c = l(() => t.anchor === void 0),
|
|
44
|
+
]), c = l(() => t.anchor === void 0), C = l(() => (r.value || n.animating) && !t.nonModal), K = l(() => (r.value || n.animating) && t.scrollLock), n = A({
|
|
45
45
|
animating: !1,
|
|
46
46
|
top: 0,
|
|
47
47
|
left: 0,
|
|
48
48
|
width: 0,
|
|
49
49
|
placement: t.placement
|
|
50
|
-
}), i =
|
|
50
|
+
}), i = A({
|
|
51
51
|
top: void 0,
|
|
52
52
|
left: void 0,
|
|
53
53
|
hidden: !0
|
|
@@ -68,7 +68,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
68
68
|
left: i.left !== void 0 ? `${i.left}px` : void 0,
|
|
69
69
|
opacity: i.hidden ? 0 : 1
|
|
70
70
|
};
|
|
71
|
-
}), p =
|
|
71
|
+
}), p = U(null), h = U(null);
|
|
72
72
|
function a() {
|
|
73
73
|
const e = d();
|
|
74
74
|
if (!e || !h.value)
|
|
@@ -93,32 +93,32 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
93
93
|
);
|
|
94
94
|
let f;
|
|
95
95
|
function y() {
|
|
96
|
-
|
|
96
|
+
S(0);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
98
|
+
function x() {
|
|
99
|
+
S(t.delay);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
f &&
|
|
101
|
+
function S(e) {
|
|
102
|
+
f && q(), f = window.setTimeout(() => {
|
|
103
103
|
r.value = !0;
|
|
104
104
|
}, e);
|
|
105
105
|
}
|
|
106
106
|
function s() {
|
|
107
|
-
if (f &&
|
|
107
|
+
if (f && q(), r.value = !1, t.anchor && t.trigger === "click") {
|
|
108
108
|
const e = d();
|
|
109
109
|
e == null || e.focus();
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function q() {
|
|
113
113
|
clearTimeout(f), f = void 0;
|
|
114
114
|
}
|
|
115
115
|
k(W, () => v(H));
|
|
116
116
|
function H() {
|
|
117
|
-
|
|
117
|
+
T("enter");
|
|
118
118
|
}
|
|
119
|
-
let
|
|
119
|
+
let $;
|
|
120
120
|
function J() {
|
|
121
|
-
window.clearTimeout(
|
|
121
|
+
window.clearTimeout($), $ = window.setTimeout(() => n.animating = !1, 200), T("leave");
|
|
122
122
|
}
|
|
123
123
|
function d() {
|
|
124
124
|
return t.anchor ? we(t.anchor) : null;
|
|
@@ -137,7 +137,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
137
137
|
e.addEventListener("click", y);
|
|
138
138
|
break;
|
|
139
139
|
case "hover":
|
|
140
|
-
e.addEventListener("mouseenter",
|
|
140
|
+
e.addEventListener("mouseenter", x), e.addEventListener("mouseleave", s), e.addEventListener("focusin", y), e.addEventListener("focusout", s);
|
|
141
141
|
break;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -149,7 +149,7 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
149
149
|
e.removeEventListener("click", y);
|
|
150
150
|
break;
|
|
151
151
|
case "hover":
|
|
152
|
-
e.removeEventListener("mouseenter",
|
|
152
|
+
e.removeEventListener("mouseenter", x), e.removeEventListener("mouseleave", s), e.removeEventListener("focusin", y), e.removeEventListener("focusout", s);
|
|
153
153
|
break;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
@@ -159,83 +159,83 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
159
159
|
function ee() {
|
|
160
160
|
window.removeEventListener("resize", a), t.scrollLock || window.removeEventListener("scroll", a);
|
|
161
161
|
}
|
|
162
|
-
let
|
|
163
|
-
function
|
|
164
|
-
d() ? (a(),
|
|
162
|
+
let L;
|
|
163
|
+
function M() {
|
|
164
|
+
d() ? (a(), L = window.setTimeout(M, 100)) : s();
|
|
165
165
|
}
|
|
166
166
|
function te() {
|
|
167
|
-
c.value || (Z(), t.spy ?
|
|
167
|
+
c.value || (Z(), t.spy ? M() : a()), (c.value || t.trigger === "click") && v(() => {
|
|
168
168
|
var e;
|
|
169
169
|
return (e = h.value) == null ? void 0 : e.focus();
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
|
-
function M() {
|
|
173
|
-
c.value || ee(), t.spy && (clearTimeout(E), E = void 0), n.top = 0, n.left = 0;
|
|
174
|
-
}
|
|
175
172
|
function R() {
|
|
173
|
+
c.value || ee(), t.spy && (clearTimeout(L), L = void 0), n.top = 0, n.left = 0;
|
|
174
|
+
}
|
|
175
|
+
function O() {
|
|
176
176
|
t.persistent || s();
|
|
177
177
|
}
|
|
178
178
|
return re(() => {
|
|
179
179
|
v(X);
|
|
180
180
|
}), ie(() => {
|
|
181
|
-
Y(),
|
|
181
|
+
Y(), R();
|
|
182
182
|
}), k(
|
|
183
183
|
r,
|
|
184
184
|
(e) => {
|
|
185
|
-
v(() => e ? te() :
|
|
185
|
+
v(() => e ? te() : R());
|
|
186
186
|
},
|
|
187
187
|
{ immediate: !0 }
|
|
188
|
-
), (e, w) => (u(),
|
|
188
|
+
), (e, w) => (u(), E(
|
|
189
189
|
ae,
|
|
190
190
|
null,
|
|
191
191
|
[
|
|
192
|
-
(u(),
|
|
192
|
+
(u(), B(le, {
|
|
193
193
|
disabled: !r.value && !n.animating || t.inline,
|
|
194
194
|
to: t.attach
|
|
195
195
|
}, [
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
C.value ? (u(), E(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
key: 0,
|
|
200
|
+
class: z([
|
|
201
|
+
t.backdropClass,
|
|
202
|
+
"q-overlay__underlay",
|
|
203
|
+
{ "q-overlay__underlay--blur": t.backdropBlur }
|
|
204
|
+
])
|
|
205
|
+
},
|
|
206
|
+
null,
|
|
207
|
+
2
|
|
208
|
+
/* CLASS */
|
|
209
|
+
)) : g("v-if", !0),
|
|
210
|
+
se(de, {
|
|
211
|
+
name: t.transition,
|
|
212
|
+
appear: "",
|
|
213
|
+
onLeave: J
|
|
198
214
|
}, {
|
|
199
215
|
default: I(() => [
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
key: 0,
|
|
204
|
-
class: P([
|
|
205
|
-
t.backdropClass,
|
|
206
|
-
"q-overlay__underlay",
|
|
207
|
-
{ "q-overlay__underlay--blur": t.backdropBlur }
|
|
208
|
-
])
|
|
209
|
-
},
|
|
210
|
-
null,
|
|
211
|
-
2
|
|
212
|
-
/* CLASS */
|
|
213
|
-
)) : L("v-if", !0),
|
|
214
|
-
z(se, {
|
|
215
|
-
name: t.transition,
|
|
216
|
-
appear: "",
|
|
217
|
-
onLeave: J
|
|
216
|
+
r.value ? (u(), B(b(ve), {
|
|
217
|
+
key: 0,
|
|
218
|
+
theme: b(D).current.value.name
|
|
218
219
|
}, {
|
|
219
220
|
default: I(() => [
|
|
220
|
-
|
|
221
|
+
P(
|
|
221
222
|
"div",
|
|
222
223
|
{
|
|
223
|
-
|
|
224
|
-
class: P(F.value),
|
|
224
|
+
class: z(F.value),
|
|
225
225
|
style: N(j.value)
|
|
226
226
|
},
|
|
227
227
|
[
|
|
228
|
-
|
|
228
|
+
P("div", ue({
|
|
229
229
|
ref_key: "overlayRef",
|
|
230
230
|
ref: h,
|
|
231
231
|
class: "q-overlay__content",
|
|
232
232
|
tabindex: "-1",
|
|
233
|
-
role:
|
|
233
|
+
role: C.value ? "dialog" : void 0
|
|
234
234
|
}, e.$attrs, {
|
|
235
|
-
onKeydown: ce(
|
|
236
|
-
onBlur:
|
|
235
|
+
onKeydown: ce(O, ["escape"]),
|
|
236
|
+
onBlur: O
|
|
237
237
|
}), [
|
|
238
|
-
t.arrow ? (u(),
|
|
238
|
+
t.arrow ? (u(), E(
|
|
239
239
|
"div",
|
|
240
240
|
{
|
|
241
241
|
key: 0,
|
|
@@ -248,23 +248,23 @@ const ke = ["role"], Te = /* @__PURE__ */ ne({
|
|
|
248
248
|
null,
|
|
249
249
|
4
|
|
250
250
|
/* STYLE */
|
|
251
|
-
)) :
|
|
251
|
+
)) : g("v-if", !0),
|
|
252
252
|
fe(e.$slots, "default")
|
|
253
253
|
], 16, ke)
|
|
254
254
|
],
|
|
255
255
|
6
|
|
256
256
|
/* CLASS, STYLE */
|
|
257
|
-
)
|
|
257
|
+
)
|
|
258
258
|
]),
|
|
259
259
|
_: 3
|
|
260
260
|
/* FORWARDED */
|
|
261
|
-
}, 8, ["
|
|
261
|
+
}, 8, ["theme"])) : g("v-if", !0)
|
|
262
262
|
]),
|
|
263
263
|
_: 3
|
|
264
264
|
/* FORWARDED */
|
|
265
|
-
}, 8, ["
|
|
265
|
+
}, 8, ["name"])
|
|
266
266
|
], 8, ["disabled", "to"])),
|
|
267
|
-
K.value ? (u(),
|
|
267
|
+
K.value ? (u(), B(b(me), { key: 0 })) : g("v-if", !0)
|
|
268
268
|
],
|
|
269
269
|
64
|
|
270
270
|
/* STABLE_FRAGMENT */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/QTooltip.vue"],"names":[],"mappings":"AAkCA;
|
|
1
|
+
{"version":3,"file":"QTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/QTooltip.vue"],"names":[],"mappings":"AAkCA;AAyHC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAO5C,KAAK,WAAW,GAAG,aAAa,CAAC;AA6ElC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAkFT,OAAO,IAA6B;;;;;;YAXtB,GAAG;yBACF,GAAG;;;;EAe/B;AAcD,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,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useId as
|
|
5
|
-
|
|
1
|
+
import { defineComponent as g, mergeModels as V, useModel as v, onMounted as B, onUnmounted as k, watch as M, createElementBlock as l, openBlock as a, Fragment as m, renderSlot as u, createVNode as w, unref as r, normalizeClass as x, withCtx as C, createBlock as T, createCommentVNode as A, normalizeProps as D, mergeProps as N, createTextVNode as Q, toDisplayString as _ } from "vue";
|
|
2
|
+
import { QIcon as z } from "../QIcon/index.js";
|
|
3
|
+
import { QOverlay as H } from "../QOverlay/index.js";
|
|
4
|
+
import { useId as I } from "../../composables/uid.js";
|
|
5
|
+
import { getElement as p } from "../../utils/getElement.js";
|
|
6
|
+
const L = ["innerHTML"], F = /* @__PURE__ */ g({
|
|
6
7
|
__name: "QTooltip",
|
|
7
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ V({
|
|
8
9
|
id: {},
|
|
9
10
|
anchor: {},
|
|
10
11
|
appearance: { default: "inverted" },
|
|
@@ -24,18 +25,38 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
|
|
|
24
25
|
modelModifiers: {}
|
|
25
26
|
}),
|
|
26
27
|
emits: ["update:modelValue"],
|
|
27
|
-
setup(
|
|
28
|
-
const e =
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
setup(i) {
|
|
29
|
+
const e = i, d = v(i, "modelValue"), n = I(e.id);
|
|
30
|
+
function c(o) {
|
|
31
|
+
const t = p(o);
|
|
32
|
+
t == null || t.setAttribute("aria-describedby", n);
|
|
33
|
+
}
|
|
34
|
+
function f() {
|
|
35
|
+
e.anchor && c(e.anchor);
|
|
36
|
+
}
|
|
37
|
+
B(f);
|
|
38
|
+
function s(o) {
|
|
39
|
+
const t = p(o);
|
|
40
|
+
t == null || t.removeAttribute("aria-describedby");
|
|
41
|
+
}
|
|
42
|
+
function y() {
|
|
43
|
+
e.anchor && s(e.anchor);
|
|
44
|
+
}
|
|
45
|
+
k(y);
|
|
46
|
+
function h(o, t) {
|
|
47
|
+
t && s(t), o && c(o);
|
|
48
|
+
}
|
|
49
|
+
return M(() => e.anchor, h), (o, t) => (a(), l(
|
|
50
|
+
m,
|
|
31
51
|
null,
|
|
32
52
|
[
|
|
33
|
-
|
|
34
|
-
props: { "aria-describedby":
|
|
53
|
+
u(o.$slots, "anchor", {
|
|
54
|
+
props: { "aria-describedby": r(n) }
|
|
35
55
|
}),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
56
|
+
w(r(H), {
|
|
57
|
+
modelValue: d.value,
|
|
58
|
+
"onUpdate:modelValue": t[0] || (t[0] = (b) => d.value = b),
|
|
59
|
+
id: r(n),
|
|
39
60
|
anchor: e.anchor,
|
|
40
61
|
role: "tooltip",
|
|
41
62
|
"non-modal": "",
|
|
@@ -43,30 +64,30 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
|
|
|
43
64
|
arrow: e.arrow,
|
|
44
65
|
attach: e.attach,
|
|
45
66
|
inline: e.inline,
|
|
46
|
-
class:
|
|
67
|
+
class: x(["q-tooltip", e.class]),
|
|
47
68
|
delay: e.delay,
|
|
48
69
|
disabled: e.disabled,
|
|
49
70
|
placement: e.placement,
|
|
50
71
|
trigger: e.trigger
|
|
51
72
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
|
|
54
|
-
e.icon ? (a(),
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
default: C(() => [
|
|
74
|
+
u(o.$slots, "default", {}, () => [
|
|
75
|
+
e.icon ? (a(), T(
|
|
76
|
+
r(z),
|
|
77
|
+
D(N({ key: 0 }, e.icon)),
|
|
57
78
|
null,
|
|
58
79
|
16
|
|
59
80
|
/* FULL_PROPS */
|
|
60
|
-
)) :
|
|
61
|
-
e.html ? (a(),
|
|
81
|
+
)) : A("v-if", !0),
|
|
82
|
+
e.html ? (a(), l("span", {
|
|
62
83
|
key: 1,
|
|
63
84
|
innerHTML: e.text
|
|
64
|
-
}, null, 8,
|
|
65
|
-
|
|
85
|
+
}, null, 8, L)) : (a(), l(
|
|
86
|
+
m,
|
|
66
87
|
{ key: 2 },
|
|
67
88
|
[
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
Q(
|
|
90
|
+
_(e.text),
|
|
70
91
|
1
|
|
71
92
|
/* TEXT */
|
|
72
93
|
)
|
|
@@ -78,7 +99,7 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
|
|
|
78
99
|
]),
|
|
79
100
|
_: 3
|
|
80
101
|
/* FORWARDED */
|
|
81
|
-
}, 8, ["
|
|
102
|
+
}, 8, ["modelValue", "id", "anchor", "appearance", "arrow", "attach", "inline", "class", "delay", "disabled", "placement", "trigger"])
|
|
82
103
|
],
|
|
83
104
|
64
|
|
84
105
|
/* STABLE_FRAGMENT */
|
|
@@ -86,5 +107,5 @@ const M = ["innerHTML"], z = /* @__PURE__ */ s({
|
|
|
86
107
|
}
|
|
87
108
|
});
|
|
88
109
|
export {
|
|
89
|
-
|
|
110
|
+
F as default
|
|
90
111
|
};
|