@quidgest/ui 0.7.10 → 0.7.11
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.esm.js +46 -46
- package/dist/ui.esm.js.map +1 -1
- package/dist/ui.js +1 -1
- package/dist/ui.js.map +1 -1
- package/dist/ui.min.js +2 -2
- package/dist/ui.min.js.map +1 -1
- package/dist/ui.scss +1 -1
- package/package.json +1 -1
package/dist/ui.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance as De, computed as g, ref as q, provide as Ke, inject as Ee, watch as
|
|
1
|
+
import { getCurrentInstance as De, computed as g, ref as q, provide as Ke, inject as Ee, watch as C, defineComponent as B, openBlock as c, createElementBlock as m, normalizeStyle as se, createElementVNode as K, normalizeClass as W, withModifiers as ee, createVNode as te, unref as b, createCommentVNode as S, Fragment as P, createTextVNode as de, toDisplayString as U, renderSlot as h, toRef as me, createBlock as L, withCtx as $, renderList as he, resolveDynamicComponent as Te, h as Ie, normalizeProps as ue, mergeProps as le, reactive as We, onBeforeUnmount as Ge, onMounted as ze, Teleport as je, Transition as Xe, nextTick as J, createSlots as ge, withDirectives as Ye, vModelDynamic as Pe, useAttrs as Ze, guardReactiveProps as ye } from "vue";
|
|
2
2
|
function be(t) {
|
|
3
3
|
return t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
|
|
4
4
|
}
|
|
@@ -221,7 +221,7 @@ function ot(t, n) {
|
|
|
221
221
|
activeTheme: o.name,
|
|
222
222
|
themes: n.themes
|
|
223
223
|
});
|
|
224
|
-
|
|
224
|
+
C(
|
|
225
225
|
() => e.value.activeTheme,
|
|
226
226
|
(l) => {
|
|
227
227
|
const a = e.value.themes.find((d) => d.name === l);
|
|
@@ -420,7 +420,7 @@ const ke = x(rt), ut = ["disabled"], ct = {
|
|
|
420
420
|
emits: ["update:modelValue"],
|
|
421
421
|
setup(t, { emit: n }) {
|
|
422
422
|
const o = n, e = t, l = q(e.modelValue);
|
|
423
|
-
|
|
423
|
+
C(
|
|
424
424
|
() => e.modelValue,
|
|
425
425
|
(r) => l.value = r
|
|
426
426
|
);
|
|
@@ -686,7 +686,7 @@ const qt = /* @__PURE__ */ B({
|
|
|
686
686
|
let f;
|
|
687
687
|
a.value ? f = l.items.findIndex((oe) => oe[l.itemValue] === a.value) : f = R();
|
|
688
688
|
const I = d.value;
|
|
689
|
-
|
|
689
|
+
F(f, I);
|
|
690
690
|
}
|
|
691
691
|
function z(s) {
|
|
692
692
|
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(s.key) && s.preventDefault(), s.key) {
|
|
@@ -708,17 +708,17 @@ const qt = /* @__PURE__ */ B({
|
|
|
708
708
|
switch (s) {
|
|
709
709
|
case "next":
|
|
710
710
|
case "prev":
|
|
711
|
-
|
|
711
|
+
F(G(s));
|
|
712
712
|
break;
|
|
713
713
|
case "first":
|
|
714
|
-
|
|
714
|
+
F(R());
|
|
715
715
|
break;
|
|
716
716
|
case "last":
|
|
717
|
-
|
|
717
|
+
F(A());
|
|
718
718
|
break;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function F(s, f = !1) {
|
|
722
722
|
var w;
|
|
723
723
|
(w = D()[s]) == null || w.focus({ preventScroll: f });
|
|
724
724
|
}
|
|
@@ -737,7 +737,7 @@ const qt = /* @__PURE__ */ B({
|
|
|
737
737
|
const s = D(), f = s.find((I) => y(I));
|
|
738
738
|
return f ? s.indexOf(f) : -1;
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function A() {
|
|
741
741
|
const s = D(), f = [...s].reverse().find((I) => y(I));
|
|
742
742
|
return f ? s.indexOf(f) : -1;
|
|
743
743
|
}
|
|
@@ -766,17 +766,17 @@ const qt = /* @__PURE__ */ B({
|
|
|
766
766
|
function T(s) {
|
|
767
767
|
return s ? l.items.filter((f) => f.group === s) : l.items;
|
|
768
768
|
}
|
|
769
|
-
return
|
|
769
|
+
return C(
|
|
770
770
|
() => l.modelValue,
|
|
771
771
|
(s) => {
|
|
772
772
|
a.value = s;
|
|
773
773
|
}
|
|
774
774
|
), n({
|
|
775
|
-
focusItem:
|
|
775
|
+
focusItem: F,
|
|
776
776
|
getItem: Z,
|
|
777
777
|
getAdjacentItemIndex: M,
|
|
778
778
|
getFirstFocusableItemIndex: R,
|
|
779
|
-
getLastFocusableItemIndex:
|
|
779
|
+
getLastFocusableItemIndex: A
|
|
780
780
|
}), (s, f) => (c(), L(Te(r.value), {
|
|
781
781
|
ref_key: "listRef",
|
|
782
782
|
ref: u,
|
|
@@ -865,10 +865,10 @@ const Dt = ["id", "tabindex", "aria-label", "aria-selected"], Et = { class: "q-l
|
|
|
865
865
|
}, [
|
|
866
866
|
h(r.$slots, "default", {}, () => [
|
|
867
867
|
e.icon ? (c(), L(b(Y), ue(le({ key: 0 }, e.icon)), null, 16)) : S("", !0),
|
|
868
|
-
de(" " + U(e.label)
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
868
|
+
de(" " + U(e.label), 1)
|
|
869
|
+
]),
|
|
870
|
+
K("div", Et, [
|
|
871
|
+
e.selected ? (c(), L(b(Y), le({ key: 0 }, e.icons.check, { class: "q-list-item__check" }), null, 16)) : S("", !0)
|
|
872
872
|
])
|
|
873
873
|
], 42, Dt));
|
|
874
874
|
}
|
|
@@ -992,10 +992,10 @@ const Ut = {
|
|
|
992
992
|
width: 0,
|
|
993
993
|
placement: e.placement
|
|
994
994
|
}), d = g(() => a.visible && !e.disabled);
|
|
995
|
-
|
|
995
|
+
C(
|
|
996
996
|
() => e.modelValue,
|
|
997
997
|
() => a.visible = e.modelValue
|
|
998
|
-
),
|
|
998
|
+
), C(
|
|
999
999
|
() => a.visible,
|
|
1000
1000
|
() => a.animating = !0
|
|
1001
1001
|
);
|
|
@@ -1028,7 +1028,7 @@ const Ut = {
|
|
|
1028
1028
|
a.left = T.x, a.top = T.y, a.width = T.width, a.placement = T.placement;
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
|
-
|
|
1031
|
+
C([() => d.value, () => e.placement], u);
|
|
1032
1032
|
let k;
|
|
1033
1033
|
function v() {
|
|
1034
1034
|
const y = e.trigger === "hover" ? e.delay : 0;
|
|
@@ -1044,7 +1044,7 @@ const Ut = {
|
|
|
1044
1044
|
function E() {
|
|
1045
1045
|
o("enter");
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function F() {
|
|
1048
1048
|
window.clearTimeout(z), z = window.setTimeout(() => a.animating = !1, 200), o("leave");
|
|
1049
1049
|
}
|
|
1050
1050
|
let D;
|
|
@@ -1076,23 +1076,23 @@ const Ut = {
|
|
|
1076
1076
|
function R() {
|
|
1077
1077
|
window.removeEventListener("scroll", u), window.removeEventListener("resize", u), D == null || D.disconnect();
|
|
1078
1078
|
}
|
|
1079
|
-
let
|
|
1079
|
+
let A;
|
|
1080
1080
|
function O() {
|
|
1081
|
-
re(e.anchor) ? (u(),
|
|
1081
|
+
re(e.anchor) ? (u(), A = window.setTimeout(O, 100)) : Q();
|
|
1082
1082
|
}
|
|
1083
1083
|
function G() {
|
|
1084
1084
|
H(), e.spy && O();
|
|
1085
1085
|
}
|
|
1086
1086
|
function M() {
|
|
1087
|
-
R(), e.spy && (clearTimeout(
|
|
1087
|
+
R(), e.spy && (clearTimeout(A), A = void 0);
|
|
1088
1088
|
}
|
|
1089
|
-
return Ge(M), ze(u),
|
|
1089
|
+
return Ge(M), ze(u), C(
|
|
1090
1090
|
() => e.disabled,
|
|
1091
1091
|
(y) => {
|
|
1092
1092
|
y || Z();
|
|
1093
1093
|
},
|
|
1094
1094
|
{ immediate: !0 }
|
|
1095
|
-
),
|
|
1095
|
+
), C(
|
|
1096
1096
|
() => d.value,
|
|
1097
1097
|
(y) => {
|
|
1098
1098
|
y ? G() : M();
|
|
@@ -1109,7 +1109,7 @@ const Ut = {
|
|
|
1109
1109
|
name: e.transition,
|
|
1110
1110
|
appear: "",
|
|
1111
1111
|
onEnter: E,
|
|
1112
|
-
onLeave:
|
|
1112
|
+
onLeave: F
|
|
1113
1113
|
}, {
|
|
1114
1114
|
default: $(() => [
|
|
1115
1115
|
d.value ? (c(), m("div", {
|
|
@@ -1223,7 +1223,7 @@ const Ut = {
|
|
|
1223
1223
|
a.value = u, e("update:modelValue", u);
|
|
1224
1224
|
}
|
|
1225
1225
|
});
|
|
1226
|
-
return
|
|
1226
|
+
return C(
|
|
1227
1227
|
() => l.modelValue,
|
|
1228
1228
|
(u) => a.value = u
|
|
1229
1229
|
), n({
|
|
@@ -1331,7 +1331,7 @@ const en = {
|
|
|
1331
1331
|
emits: ["update:modelValue", "update:inputValue", "before-show", "before-hide", "show", "hide"],
|
|
1332
1332
|
setup(t, { expose: n, emit: o }) {
|
|
1333
1333
|
const e = o, l = t, a = Ne(), d = q(l.modelValue), r = q(!1), p = q(""), u = q(void 0), k = q(null), v = q(null), Q = q(null);
|
|
1334
|
-
ze(
|
|
1334
|
+
ze(A);
|
|
1335
1335
|
const N = g(
|
|
1336
1336
|
() => l.clearable && !l.readonly && !l.disabled && !l.loading
|
|
1337
1337
|
), z = g(() => {
|
|
@@ -1342,7 +1342,7 @@ const en = {
|
|
|
1342
1342
|
}), E = g(() => {
|
|
1343
1343
|
var i;
|
|
1344
1344
|
return (i = l.items) == null ? void 0 : i.find((_) => _[l.itemValue] === d.value);
|
|
1345
|
-
}),
|
|
1345
|
+
}), F = g(() => {
|
|
1346
1346
|
const i = u.value;
|
|
1347
1347
|
if (i !== void 0 && z.value[i])
|
|
1348
1348
|
return z.value[i];
|
|
@@ -1357,12 +1357,12 @@ const en = {
|
|
|
1357
1357
|
return p.value.length > 0 && p.value !== ((i = E.value) == null ? void 0 : i[l.itemLabel]);
|
|
1358
1358
|
});
|
|
1359
1359
|
function H(i) {
|
|
1360
|
-
d.value = i,
|
|
1360
|
+
d.value = i, A(), e("update:modelValue", i);
|
|
1361
1361
|
}
|
|
1362
1362
|
function R(i) {
|
|
1363
1363
|
H(i), G();
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function A() {
|
|
1366
1366
|
var i;
|
|
1367
1367
|
p.value = ((i = E.value) == null ? void 0 : i[l.itemLabel]) || "";
|
|
1368
1368
|
}
|
|
@@ -1398,9 +1398,9 @@ const en = {
|
|
|
1398
1398
|
i.key === "ArrowDown" ? s() : f();
|
|
1399
1399
|
}));
|
|
1400
1400
|
else if (i.key === "Enter") {
|
|
1401
|
-
if (
|
|
1401
|
+
if (F.value === void 0)
|
|
1402
1402
|
return;
|
|
1403
|
-
R(
|
|
1403
|
+
R(F.value[l.itemValue]);
|
|
1404
1404
|
} else
|
|
1405
1405
|
i.key === "Home" ? u.value = (_ = v.value) == null ? void 0 : _.getFirstFocusableItemIndex() : i.key === "End" ? u.value = (V = v.value) == null ? void 0 : V.getLastFocusableItemIndex() : (/^[a-z]$/i.test(i.key) || i.key === "Backspace") && O();
|
|
1406
1406
|
}
|
|
@@ -1424,7 +1424,7 @@ const en = {
|
|
|
1424
1424
|
}
|
|
1425
1425
|
function w(i) {
|
|
1426
1426
|
var _, V, j;
|
|
1427
|
-
!((_ = Q.value) != null && _.contains(i.relatedTarget)) && !((j = (V = k.value) == null ? void 0 : V.fieldRef) != null && j.contains(i.relatedTarget)) && (G(),
|
|
1427
|
+
!((_ = Q.value) != null && _.contains(i.relatedTarget)) && !((j = (V = k.value) == null ? void 0 : V.fieldRef) != null && j.contains(i.relatedTarget)) && (G(), A());
|
|
1428
1428
|
}
|
|
1429
1429
|
function oe() {
|
|
1430
1430
|
var i, _;
|
|
@@ -1441,14 +1441,14 @@ const en = {
|
|
|
1441
1441
|
const _ = (V = v.value) == null ? void 0 : V.getItem(i);
|
|
1442
1442
|
_ == null || _.scrollIntoView({ block: "nearest", inline: "start" });
|
|
1443
1443
|
}
|
|
1444
|
-
return
|
|
1444
|
+
return C(
|
|
1445
1445
|
() => l.modelValue,
|
|
1446
1446
|
(i) => {
|
|
1447
|
-
d.value = i;
|
|
1447
|
+
d.value = i, A();
|
|
1448
1448
|
}
|
|
1449
|
-
),
|
|
1449
|
+
), C(u, (i) => {
|
|
1450
1450
|
i !== void 0 && $e(i);
|
|
1451
|
-
}),
|
|
1451
|
+
}), C(p, (i) => {
|
|
1452
1452
|
!i && N.value ? M() : r.value && l.selectionMode === "automatic" && J(s), e("update:inputValue", i);
|
|
1453
1453
|
}), n({
|
|
1454
1454
|
triggerEl: k
|
|
@@ -1547,7 +1547,7 @@ const en = {
|
|
|
1547
1547
|
_[1] || (_[1] = (pe) => d.value = pe),
|
|
1548
1548
|
R
|
|
1549
1549
|
],
|
|
1550
|
-
highlighted: (ie =
|
|
1550
|
+
highlighted: (ie = F.value) == null ? void 0 : ie[l.itemValue],
|
|
1551
1551
|
items: z.value,
|
|
1552
1552
|
groups: i.groups,
|
|
1553
1553
|
"item-label": l.itemLabel,
|
|
@@ -1731,7 +1731,7 @@ const mn = /* @__PURE__ */ un(cn, [["render", pn]]), zn = x(mn), vn = {
|
|
|
1731
1731
|
function E() {
|
|
1732
1732
|
N.value && z(void 0);
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function F() {
|
|
1735
1735
|
e.readonly || e.disabled || (d.value ? H() : Z());
|
|
1736
1736
|
}
|
|
1737
1737
|
function D(s) {
|
|
@@ -1745,7 +1745,7 @@ const mn = /* @__PURE__ */ un(cn, [["render", pn]]), zn = x(mn), vn = {
|
|
|
1745
1745
|
d.value && (o("before-hide"), d.value = !1);
|
|
1746
1746
|
}
|
|
1747
1747
|
let R;
|
|
1748
|
-
function
|
|
1748
|
+
function A(s) {
|
|
1749
1749
|
if (!(!s.key || e.readonly || e.disabled)) {
|
|
1750
1750
|
if (window.clearTimeout(R), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(s.key) && (s.preventDefault(), s.stopPropagation()), ["Enter", " "].includes(s.key) && (d.value = !0), ["Escape", "Tab"].includes(s.key) && (d.value ? d.value = !1 : e.clearable && s.key === "Escape" && E()), s.key === "Delete" && e.clearable && E(), /^[a-z]$/i.test(s.key)) {
|
|
1751
1751
|
r.value += s.key.toLowerCase();
|
|
@@ -1779,12 +1779,12 @@ const mn = /* @__PURE__ */ un(cn, [["render", pn]]), zn = x(mn), vn = {
|
|
|
1779
1779
|
var f;
|
|
1780
1780
|
(f = u.value) == null || f.focusItem(s);
|
|
1781
1781
|
}
|
|
1782
|
-
return
|
|
1782
|
+
return C(
|
|
1783
1783
|
() => e.modelValue,
|
|
1784
1784
|
(s) => {
|
|
1785
1785
|
a.value = s;
|
|
1786
1786
|
}
|
|
1787
|
-
),
|
|
1787
|
+
), C(
|
|
1788
1788
|
() => e.loading,
|
|
1789
1789
|
(s) => {
|
|
1790
1790
|
!s && d.value && J(y);
|
|
@@ -1814,8 +1814,8 @@ const mn = /* @__PURE__ */ un(cn, [["render", pn]]), zn = x(mn), vn = {
|
|
|
1814
1814
|
"aria-expanded": d.value,
|
|
1815
1815
|
"aria-haspopup": "listbox",
|
|
1816
1816
|
size: e.size,
|
|
1817
|
-
onClick:
|
|
1818
|
-
onKeydown: ee(
|
|
1817
|
+
onClick: F,
|
|
1818
|
+
onKeydown: ee(A, ["stop"])
|
|
1819
1819
|
}, ge({
|
|
1820
1820
|
append: $(() => [
|
|
1821
1821
|
N.value && a.value ? (c(), L(b(Y), le({ key: 0 }, e.icons.clear, {
|
|
@@ -1859,7 +1859,7 @@ const mn = /* @__PURE__ */ un(cn, [["render", pn]]), zn = x(mn), vn = {
|
|
|
1859
1859
|
class: "q-select__body",
|
|
1860
1860
|
tabindex: "-1",
|
|
1861
1861
|
onFocusout: D,
|
|
1862
|
-
onKeydown: ee(
|
|
1862
|
+
onKeydown: ee(A, ["stop"])
|
|
1863
1863
|
}, [
|
|
1864
1864
|
h(s.$slots, "body.prepend"),
|
|
1865
1865
|
e.loading ? (c(), L(b(ke), {
|