@quidgest/ui 0.8.6 → 0.8.7
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 +40 -40
- 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 +1 -1
- 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 Be, computed as _, ref as q, provide as Ve, inject as Ee, watch as
|
|
1
|
+
import { getCurrentInstance as Be, computed as _, ref as q, provide as Ve, inject as Ee, watch as A, defineComponent as L, openBlock as c, createElementBlock as v, normalizeClass as E, normalizeStyle as ce, createElementVNode as Y, withModifiers as ie, createVNode as z, unref as b, createCommentVNode as I, Fragment as ee, createTextVNode as re, toDisplayString as G, renderSlot as h, toRef as we, createBlock as V, withCtx as g, renderList as me, resolveDynamicComponent as De, h as $e, normalizeProps as te, mergeProps as ne, reactive as Ne, onBeforeUnmount as Me, onMounted as Te, nextTick as X, Teleport as He, Transition as Ke, withKeys as Ge, createSlots as he, withDirectives as We, vModelDynamic as je, guardReactiveProps as oe } from "vue";
|
|
2
2
|
function ve(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
|
}
|
|
@@ -200,7 +200,7 @@ function lt(t, l) {
|
|
|
200
200
|
activeTheme: q(e),
|
|
201
201
|
themes: o
|
|
202
202
|
};
|
|
203
|
-
tt(o),
|
|
203
|
+
tt(o), A(n.activeTheme, nt, { immediate: !0 }), t.provide(de, n);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
function nt(t) {
|
|
@@ -363,7 +363,7 @@ const ge = x(st), rt = ["disabled"], dt = {
|
|
|
363
363
|
emits: ["update:modelValue"],
|
|
364
364
|
setup(t, { emit: l }) {
|
|
365
365
|
const o = l, e = t, n = q(e.modelValue);
|
|
366
|
-
|
|
366
|
+
A(
|
|
367
367
|
() => e.modelValue,
|
|
368
368
|
(u) => n.value = u
|
|
369
369
|
);
|
|
@@ -658,39 +658,39 @@ const wt = /* @__PURE__ */ L({
|
|
|
658
658
|
let a;
|
|
659
659
|
d.value ? a = n.items.findIndex((T) => T[n.itemValue] === d.value) : a = W();
|
|
660
660
|
const m = s.value;
|
|
661
|
-
|
|
661
|
+
F(a, m);
|
|
662
662
|
}
|
|
663
663
|
function B(i) {
|
|
664
664
|
switch (["ArrowDown", "ArrowUp", "Home", "End"].includes(i.key) && i.preventDefault(), i.key) {
|
|
665
665
|
case "ArrowDown":
|
|
666
|
-
|
|
666
|
+
Q("next");
|
|
667
667
|
break;
|
|
668
668
|
case "ArrowUp":
|
|
669
|
-
|
|
669
|
+
Q("prev");
|
|
670
670
|
break;
|
|
671
671
|
case "Home":
|
|
672
|
-
|
|
672
|
+
Q("first");
|
|
673
673
|
break;
|
|
674
674
|
case "End":
|
|
675
|
-
|
|
675
|
+
Q("last");
|
|
676
676
|
break;
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function Q(i) {
|
|
680
680
|
switch (i) {
|
|
681
681
|
case "next":
|
|
682
682
|
case "prev":
|
|
683
|
-
|
|
683
|
+
F(N(i));
|
|
684
684
|
break;
|
|
685
685
|
case "first":
|
|
686
|
-
|
|
686
|
+
F(W());
|
|
687
687
|
break;
|
|
688
688
|
case "last":
|
|
689
|
-
|
|
689
|
+
F(U());
|
|
690
690
|
break;
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function F(i, a = !1) {
|
|
694
694
|
var $;
|
|
695
695
|
($ = R()[i]) == null || $.focus({ preventScroll: a });
|
|
696
696
|
}
|
|
@@ -738,13 +738,13 @@ const wt = /* @__PURE__ */ L({
|
|
|
738
738
|
function j(i) {
|
|
739
739
|
return i ? n.items.filter((a) => a.group === i) : n.items;
|
|
740
740
|
}
|
|
741
|
-
return
|
|
741
|
+
return A(
|
|
742
742
|
() => n.modelValue,
|
|
743
743
|
(i) => {
|
|
744
744
|
d.value = i;
|
|
745
745
|
}
|
|
746
746
|
), l({
|
|
747
|
-
focusItem:
|
|
747
|
+
focusItem: F,
|
|
748
748
|
getItem: O,
|
|
749
749
|
getAdjacentItemIndex: Z,
|
|
750
750
|
getFirstFocusableItemIndex: W,
|
|
@@ -967,10 +967,10 @@ const Rt = ["role"], Ot = {
|
|
|
967
967
|
width: 0,
|
|
968
968
|
placement: e.placement
|
|
969
969
|
});
|
|
970
|
-
|
|
970
|
+
A(
|
|
971
971
|
() => e.modelValue,
|
|
972
972
|
() => s.visible = e.modelValue
|
|
973
|
-
),
|
|
973
|
+
), A(
|
|
974
974
|
() => s.visible,
|
|
975
975
|
() => s.animating = !0
|
|
976
976
|
);
|
|
@@ -1010,7 +1010,7 @@ const Rt = ["role"], Ot = {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
1012
|
}
|
|
1013
|
-
|
|
1013
|
+
A([() => s.visible, () => e.placement], y);
|
|
1014
1014
|
let w;
|
|
1015
1015
|
function f() {
|
|
1016
1016
|
D(0);
|
|
@@ -1034,12 +1034,12 @@ const Rt = ["role"], Ot = {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
});
|
|
1036
1036
|
}
|
|
1037
|
-
let
|
|
1038
|
-
function
|
|
1037
|
+
let Q;
|
|
1038
|
+
function F() {
|
|
1039
1039
|
o("enter");
|
|
1040
1040
|
}
|
|
1041
1041
|
function R() {
|
|
1042
|
-
window.clearTimeout(
|
|
1042
|
+
window.clearTimeout(Q), Q = window.setTimeout(() => s.animating = !1, 200), o("leave");
|
|
1043
1043
|
}
|
|
1044
1044
|
let O;
|
|
1045
1045
|
function M() {
|
|
@@ -1106,7 +1106,7 @@ const Rt = ["role"], Ot = {
|
|
|
1106
1106
|
X(() => {
|
|
1107
1107
|
M(), y();
|
|
1108
1108
|
});
|
|
1109
|
-
}),
|
|
1109
|
+
}), A(
|
|
1110
1110
|
() => s.visible,
|
|
1111
1111
|
(i) => {
|
|
1112
1112
|
i ? K() : j(), o("update:modelValue", i);
|
|
@@ -1126,7 +1126,7 @@ const Rt = ["role"], Ot = {
|
|
|
1126
1126
|
z(Ke, {
|
|
1127
1127
|
name: e.transition,
|
|
1128
1128
|
appear: "",
|
|
1129
|
-
onEnter:
|
|
1129
|
+
onEnter: F,
|
|
1130
1130
|
onLeave: R
|
|
1131
1131
|
}, {
|
|
1132
1132
|
default: g(() => [
|
|
@@ -1252,7 +1252,7 @@ const Rt = ["role"], Ot = {
|
|
|
1252
1252
|
}), w = _(
|
|
1253
1253
|
() => n.readonly || n.disabled ? "" : n.placeholder
|
|
1254
1254
|
);
|
|
1255
|
-
return
|
|
1255
|
+
return A(
|
|
1256
1256
|
() => n.modelValue,
|
|
1257
1257
|
(f) => s.value = f
|
|
1258
1258
|
), l({
|
|
@@ -1372,7 +1372,7 @@ const Rt = ["role"], Ot = {
|
|
|
1372
1372
|
}), B = _(() => {
|
|
1373
1373
|
var r;
|
|
1374
1374
|
return (r = n.items) == null ? void 0 : r.find((k) => k[n.itemValue] === d.value);
|
|
1375
|
-
}),
|
|
1375
|
+
}), Q = _(() => B.value === void 0), F = _(() => {
|
|
1376
1376
|
const r = p.value;
|
|
1377
1377
|
if (r !== void 0 && D.value[r])
|
|
1378
1378
|
return D.value[r];
|
|
@@ -1431,15 +1431,15 @@ const Rt = ["role"], Ot = {
|
|
|
1431
1431
|
r.key === "ArrowDown" ? a() : m();
|
|
1432
1432
|
}));
|
|
1433
1433
|
else if (r.key === "Enter") {
|
|
1434
|
-
if (
|
|
1434
|
+
if (F.value === void 0)
|
|
1435
1435
|
return;
|
|
1436
|
-
W(
|
|
1436
|
+
W(F.value[n.itemValue]);
|
|
1437
1437
|
} else
|
|
1438
1438
|
r.key === "Home" ? p.value = (k = w.value) == null ? void 0 : k.getFirstFocusableItemIndex() : r.key === "End" ? p.value = (S = w.value) == null ? void 0 : S.getLastFocusableItemIndex() : (/^[a-z]$/i.test(r.key) || r.key === "Backspace") && H();
|
|
1439
1439
|
}
|
|
1440
1440
|
function a() {
|
|
1441
1441
|
var r, k;
|
|
1442
|
-
if (
|
|
1442
|
+
if (Q.value)
|
|
1443
1443
|
p.value = (k = w.value) == null ? void 0 : k.getFirstFocusableItemIndex();
|
|
1444
1444
|
else {
|
|
1445
1445
|
const S = D.value.findIndex(
|
|
@@ -1478,14 +1478,14 @@ const Rt = ["role"], Ot = {
|
|
|
1478
1478
|
const k = (S = w.value) == null ? void 0 : S.getItem(r);
|
|
1479
1479
|
k == null || k.scrollIntoView({ block: "nearest", inline: "start" });
|
|
1480
1480
|
}
|
|
1481
|
-
return
|
|
1481
|
+
return A(
|
|
1482
1482
|
() => n.modelValue,
|
|
1483
1483
|
(r) => {
|
|
1484
|
-
d.value = r
|
|
1484
|
+
d.value = r;
|
|
1485
1485
|
}
|
|
1486
|
-
),
|
|
1486
|
+
), A([d, () => n.items], U, { deep: !0 }), A(p, (r) => {
|
|
1487
1487
|
r !== void 0 && ke(r);
|
|
1488
|
-
}),
|
|
1488
|
+
}), A(u, (r) => {
|
|
1489
1489
|
!r && C.value ? K() : s.value && n.selectionMode === "automatic" && X(a), e("update:inputValue", r);
|
|
1490
1490
|
}), l({
|
|
1491
1491
|
triggerEl: y
|
|
@@ -1608,7 +1608,7 @@ const Rt = ["role"], Ot = {
|
|
|
1608
1608
|
k[1] || (k[1] = (P) => d.value = P),
|
|
1609
1609
|
W
|
|
1610
1610
|
],
|
|
1611
|
-
highlighted: (S =
|
|
1611
|
+
highlighted: (S = F.value) == null ? void 0 : S[n.itemValue],
|
|
1612
1612
|
items: D.value,
|
|
1613
1613
|
groups: r.groups,
|
|
1614
1614
|
"item-label": n.itemLabel,
|
|
@@ -1789,10 +1789,10 @@ const Rt = ["role"], Ot = {
|
|
|
1789
1789
|
function B(a) {
|
|
1790
1790
|
n.value = a, o("update:modelValue", a), M();
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1792
|
+
function Q() {
|
|
1793
1793
|
D.value && B(e.emptyValue);
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function F() {
|
|
1796
1796
|
e.readonly || e.disabled || (d.value ? M() : O());
|
|
1797
1797
|
}
|
|
1798
1798
|
function R(a) {
|
|
@@ -1811,7 +1811,7 @@ const Rt = ["role"], Ot = {
|
|
|
1811
1811
|
let U;
|
|
1812
1812
|
function H(a) {
|
|
1813
1813
|
if (!(!a.key || e.readonly || e.disabled)) {
|
|
1814
|
-
if (window.clearTimeout(U), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(a.key) && (a.preventDefault(), a.stopPropagation()), ["Enter", " "].includes(a.key) && (d.value = !0), ["Escape", "Tab"].includes(a.key) && (d.value ? d.value = !1 : D.value && a.key === "Escape" &&
|
|
1814
|
+
if (window.clearTimeout(U), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(a.key) && (a.preventDefault(), a.stopPropagation()), ["Enter", " "].includes(a.key) && (d.value = !0), ["Escape", "Tab"].includes(a.key) && (d.value ? d.value = !1 : D.value && a.key === "Escape" && Q()), a.key === "Delete" && e.clearable && Q(), /^[a-z]$/i.test(a.key)) {
|
|
1815
1815
|
s.value += a.key.toLowerCase();
|
|
1816
1816
|
for (let m = 0; m < e.items.length; m++)
|
|
1817
1817
|
if (e.items[m][e.itemLabel].toLowerCase().startsWith(s.value)) {
|
|
@@ -1843,12 +1843,12 @@ const Rt = ["role"], Ot = {
|
|
|
1843
1843
|
var m;
|
|
1844
1844
|
(m = p.value) == null || m.focusItem(a);
|
|
1845
1845
|
}
|
|
1846
|
-
return
|
|
1846
|
+
return A(
|
|
1847
1847
|
() => e.modelValue,
|
|
1848
1848
|
(a) => {
|
|
1849
1849
|
n.value = a;
|
|
1850
1850
|
}
|
|
1851
|
-
),
|
|
1851
|
+
), A(
|
|
1852
1852
|
() => e.loading,
|
|
1853
1853
|
(a) => {
|
|
1854
1854
|
!a && d.value && X(j);
|
|
@@ -1878,7 +1878,7 @@ const Rt = ["role"], Ot = {
|
|
|
1878
1878
|
"aria-expanded": d.value,
|
|
1879
1879
|
"aria-haspopup": "listbox",
|
|
1880
1880
|
size: e.size,
|
|
1881
|
-
onClick:
|
|
1881
|
+
onClick: F,
|
|
1882
1882
|
onKeydown: ie(H, ["stop"])
|
|
1883
1883
|
}, he({
|
|
1884
1884
|
append: g(() => [
|
|
@@ -1889,7 +1889,7 @@ const Rt = ["role"], Ot = {
|
|
|
1889
1889
|
"b-style": "plain",
|
|
1890
1890
|
borderless: "",
|
|
1891
1891
|
tabindex: "-1",
|
|
1892
|
-
onClick:
|
|
1892
|
+
onClick: Q
|
|
1893
1893
|
}, {
|
|
1894
1894
|
default: g(() => [
|
|
1895
1895
|
z(b(J), te(oe(e.icons.clear)), null, 16)
|