vue-composable-ui 1.0.1 → 1.0.2
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/combobox.vue_vue_type_script_setup_true_lang-BhVMcx67.js +140 -0
- package/dist/comboboxHiddenInput.vue_vue_type_script_setup_true_lang-Ba-UPd-M.js +29 -0
- package/dist/comboboxInput.vue_vue_type_script_setup_true_lang-DzRfJ5ke.js +33 -0
- package/dist/comboboxOption.vue_vue_type_script_setup_true_lang-OyJxB4Jk.js +42 -0
- package/dist/comboboxOptions.vue_vue_type_script_setup_true_lang-Doy6MfEQ.js +20 -0
- package/dist/composable-ui.js +47 -1112
- package/dist/composable-ui10.js +4 -0
- package/dist/composable-ui11.js +4 -0
- package/dist/composable-ui12.js +4 -0
- package/dist/composable-ui13.js +4 -0
- package/dist/composable-ui14.js +4 -0
- package/dist/composable-ui15.js +4 -0
- package/dist/composable-ui16.js +4 -0
- package/dist/composable-ui17.js +31 -0
- package/dist/composable-ui18.js +4 -0
- package/dist/composable-ui19.js +4 -0
- package/dist/composable-ui2.js +55 -0
- package/dist/composable-ui20.js +4 -0
- package/dist/composable-ui21.js +100 -0
- package/dist/composable-ui22.js +144 -0
- package/dist/composable-ui23.js +7 -0
- package/dist/composable-ui24.js +7 -0
- package/dist/composable-ui3.js +4 -0
- package/dist/composable-ui4.js +4 -0
- package/dist/composable-ui5.js +4 -0
- package/dist/composable-ui6.js +4 -0
- package/dist/composable-ui7.js +4 -0
- package/dist/composable-ui8.js +4 -0
- package/dist/composable-ui9.js +4 -0
- package/dist/listbox.vue_vue_type_script_setup_true_lang-Bj1ZXiBX.js +69 -0
- package/dist/listboxOption.vue_vue_type_script_setup_true_lang-B_yRptJm.js +37 -0
- package/dist/menu.vue_vue_type_script_setup_true_lang-Ci7q2rOg.js +82 -0
- package/dist/menuItem.vue_vue_type_script_setup_true_lang-mXtMa4gO.js +63 -0
- package/dist/menuItems.vue_vue_type_script_setup_true_lang-p9vftREy.js +49 -0
- package/dist/popover.vue_vue_type_script_setup_true_lang-DhKF7_nY.js +50 -0
- package/dist/popoverDialog.vue_vue_type_script_setup_true_lang-CDXUO7wZ.js +33 -0
- package/dist/tab.vue_vue_type_script_setup_true_lang-Y5OFGqMB.js +29 -0
- package/dist/tabContainer.vue_vue_type_script_setup_true_lang-fPpLno2Z.js +40 -0
- package/dist/tabList.vue_vue_type_script_setup_true_lang-CZyqGCuj.js +48 -0
- package/dist/tabPanel.vue_vue_type_script_setup_true_lang-CGhP6SHR.js +31 -0
- package/dist/tooltip.vue_vue_type_script_setup_true_lang-DVKYJyfL.js +85 -0
- package/dist/types/components/combobox/combobox.vue.d.ts +45 -0
- package/dist/types/components/combobox/comboboxHiddenInput.vue.d.ts +3 -5
- package/dist/types/components/combobox/comboboxInput.vue.d.ts +3 -3
- package/dist/types/components/combobox/comboboxOption.vue.d.ts +12 -14
- package/dist/types/components/combobox/comboboxOptions.vue.d.ts +6 -5
- package/dist/types/components/listbox/listbox.vue.d.ts +11 -11
- package/dist/types/components/listbox/listboxOption.vue.d.ts +12 -14
- package/dist/types/components/menu/menu.vue.d.ts +42 -0
- package/dist/types/components/menu/menuItem.vue.d.ts +13 -15
- package/dist/types/components/menu/menuItems.vue.d.ts +6 -5
- package/dist/types/components/popover/popover.vue.d.ts +40 -0
- package/dist/types/components/popover/popoverDialog.vue.d.ts +6 -5
- package/dist/types/components/tabs/tab.vue.d.ts +9 -11
- package/dist/types/components/tabs/tabContainer.vue.d.ts +8 -7
- package/dist/types/components/tabs/tabList.vue.d.ts +9 -9
- package/dist/types/components/tabs/tabPanel.vue.d.ts +9 -9
- package/dist/types/components/tooltip.vue.d.ts +23 -25
- package/dist/types/composables/list.d.ts +5 -1
- package/dist/types/composables/listOption.d.ts +4 -0
- package/dist/types/main.d.ts +21 -23
- package/dist/types/utils/element.d.ts +2 -2
- package/package.json +11 -8
- package/dist/composable-ui.umd.cjs +0 -1
- package/dist/types/utils/id.d.ts +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { defineComponent as w, useId as y, useTemplateRef as S, inject as h, computed as j, createElementBlock as A, openBlock as B, unref as t, renderSlot as I } from "vue";
|
|
2
|
+
import { useListOption as _ } from "./composable-ui17.js";
|
|
3
|
+
import { injectMenu as $ } from "./composable-ui24.js";
|
|
4
|
+
const x = ["id", "data-active", "role", "aria-checked", "aria-disabled"], L = /* @__PURE__ */ w({
|
|
5
|
+
__name: "menuItem",
|
|
6
|
+
props: {
|
|
7
|
+
id: {},
|
|
8
|
+
value: {},
|
|
9
|
+
disabled: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
emits: ["select"],
|
|
12
|
+
setup(d, { emit: r }) {
|
|
13
|
+
const e = d, u = r, m = e.id ?? y(), l = S("itemEl"), { isSelected: s, isActive: c, select: v, activate: f, deactivate: p } = _(
|
|
14
|
+
l,
|
|
15
|
+
e.value,
|
|
16
|
+
e.disabled
|
|
17
|
+
), i = h($);
|
|
18
|
+
if (!i)
|
|
19
|
+
throw new Error("Menu injectable context is not provided");
|
|
20
|
+
const b = j(() => e.value !== void 0 ? i.isMultiselectable.value ? "menuitemcheckbox" : "menuitemradio" : "menuitem");
|
|
21
|
+
function a() {
|
|
22
|
+
v(), u("select", e.value);
|
|
23
|
+
}
|
|
24
|
+
function k() {
|
|
25
|
+
a(), (e.value === void 0 || !i?.isMultiselectable.value) && i.close();
|
|
26
|
+
}
|
|
27
|
+
function E(o) {
|
|
28
|
+
switch (o.code) {
|
|
29
|
+
case "Space":
|
|
30
|
+
a(), e.value === void 0 && i.close();
|
|
31
|
+
break;
|
|
32
|
+
case "Enter":
|
|
33
|
+
a(), i.close();
|
|
34
|
+
break;
|
|
35
|
+
default:
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
o.preventDefault();
|
|
39
|
+
}
|
|
40
|
+
return (o, n) => (B(), A("div", {
|
|
41
|
+
ref_key: "itemEl",
|
|
42
|
+
ref: l,
|
|
43
|
+
id: t(m),
|
|
44
|
+
onClick: k,
|
|
45
|
+
onKeydown: E,
|
|
46
|
+
onMouseenter: n[0] || (n[0] = (M) => t(f)({ focus: !1 })),
|
|
47
|
+
onMouseleave: n[1] || (n[1] = (M) => t(p)()),
|
|
48
|
+
"data-active": t(c),
|
|
49
|
+
role: b.value,
|
|
50
|
+
"aria-checked": o.value !== void 0 ? t(s) : void 0,
|
|
51
|
+
"aria-disabled": o.disabled || void 0,
|
|
52
|
+
tabindex: "-1"
|
|
53
|
+
}, [
|
|
54
|
+
I(o.$slots, "default", {
|
|
55
|
+
isSelected: t(s),
|
|
56
|
+
isActive: t(c)
|
|
57
|
+
})
|
|
58
|
+
], 40, x));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export {
|
|
62
|
+
L as _
|
|
63
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as n, inject as o, createElementBlock as c, createCommentVNode as s, unref as a, openBlock as i, renderSlot as u } from "vue";
|
|
2
|
+
import { injectMenu as l } from "./composable-ui24.js";
|
|
3
|
+
const d = ["id", "aria-activedescendant", "aria-labelledby"], b = /* @__PURE__ */ n({
|
|
4
|
+
__name: "menuItems",
|
|
5
|
+
setup(m) {
|
|
6
|
+
const e = o(l);
|
|
7
|
+
if (!e)
|
|
8
|
+
throw new Error("Menu injectable context is not provided");
|
|
9
|
+
function r(t) {
|
|
10
|
+
switch (t.code) {
|
|
11
|
+
case "ArrowUp":
|
|
12
|
+
e.activatePrevItem({ focus: !0, loop: !1 });
|
|
13
|
+
break;
|
|
14
|
+
case "ArrowDown":
|
|
15
|
+
e.activateNextItem({ focus: !0, loop: !1 });
|
|
16
|
+
break;
|
|
17
|
+
case "Home":
|
|
18
|
+
e.activateFirstItem({ focus: !0 });
|
|
19
|
+
break;
|
|
20
|
+
case "End":
|
|
21
|
+
e.activateLastItem({ focus: !0 });
|
|
22
|
+
break;
|
|
23
|
+
case "Escape":
|
|
24
|
+
e.close();
|
|
25
|
+
break;
|
|
26
|
+
case "Tab":
|
|
27
|
+
e.isOpen.value = !1;
|
|
28
|
+
return;
|
|
29
|
+
default:
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
t.preventDefault();
|
|
33
|
+
}
|
|
34
|
+
return (t, f) => a(e).isOpen.value ? (i(), c("div", {
|
|
35
|
+
key: 0,
|
|
36
|
+
onKeydown: r,
|
|
37
|
+
id: a(e).menuId,
|
|
38
|
+
"aria-activedescendant": a(e).activeItemId.value,
|
|
39
|
+
"aria-labelledby": a(e).activatorId,
|
|
40
|
+
role: "menu",
|
|
41
|
+
tabindex: "-1"
|
|
42
|
+
}, [
|
|
43
|
+
u(t.$slots, "default")
|
|
44
|
+
], 40, d)) : s("", !0);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
b as _
|
|
49
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { defineComponent as u, useId as r, computed as f, provide as v, renderSlot as O, unref as t } from "vue";
|
|
2
|
+
import { usePopover as m } from "./composable-ui21.js";
|
|
3
|
+
import { injectPopover as g } from "./composable-ui24.js";
|
|
4
|
+
const x = /* @__PURE__ */ u({
|
|
5
|
+
__name: "popover",
|
|
6
|
+
props: {
|
|
7
|
+
id: {},
|
|
8
|
+
activatorId: {},
|
|
9
|
+
direction: { default: "down" },
|
|
10
|
+
align: { default: "left" },
|
|
11
|
+
position: { default: "fixed" },
|
|
12
|
+
closeOnOutsideClick: { type: Boolean, default: !0 },
|
|
13
|
+
closeOnInsideClick: { type: Boolean, default: !1 },
|
|
14
|
+
role: { default: "dialog" }
|
|
15
|
+
},
|
|
16
|
+
setup(s) {
|
|
17
|
+
const e = s, n = e.id ?? r(), i = e.activatorId ?? r(), { isOpen: o, toggle: a, open: d, close: l } = m(
|
|
18
|
+
`#${i}`,
|
|
19
|
+
`#${n}`,
|
|
20
|
+
{
|
|
21
|
+
direction: e.direction,
|
|
22
|
+
align: e.align,
|
|
23
|
+
position: e.position,
|
|
24
|
+
closeOnOutsideClick: e.closeOnOutsideClick,
|
|
25
|
+
closeOnInsideClick: e.closeOnInsideClick
|
|
26
|
+
}
|
|
27
|
+
), c = f(() => ({
|
|
28
|
+
id: i,
|
|
29
|
+
"aria-controls": o.value ? e.id : void 0,
|
|
30
|
+
"aria-haspopup": e.role,
|
|
31
|
+
"aria-expanded": o.value
|
|
32
|
+
}));
|
|
33
|
+
return v(g, {
|
|
34
|
+
popoverId: n,
|
|
35
|
+
activatorId: i,
|
|
36
|
+
role: e.role,
|
|
37
|
+
isOpen: o,
|
|
38
|
+
close: l
|
|
39
|
+
}), (p, I) => O(p.$slots, "default", {
|
|
40
|
+
attrs: c.value,
|
|
41
|
+
isOpen: t(o),
|
|
42
|
+
toggle: () => t(a)(),
|
|
43
|
+
open: () => t(d)(),
|
|
44
|
+
close: () => t(l)()
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
export {
|
|
49
|
+
x as _
|
|
50
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineComponent as n, inject as a, createElementBlock as i, createCommentVNode as c, unref as r, openBlock as l, renderSlot as p } from "vue";
|
|
2
|
+
import { injectPopover as d } from "./composable-ui24.js";
|
|
3
|
+
const s = ["id", "role", "aria-labelledby"], v = /* @__PURE__ */ n({
|
|
4
|
+
__name: "popoverDialog",
|
|
5
|
+
setup(u) {
|
|
6
|
+
const e = a(d);
|
|
7
|
+
if (!e)
|
|
8
|
+
throw new Error("Popover injectable context is not provided");
|
|
9
|
+
function t(o) {
|
|
10
|
+
switch (o.code) {
|
|
11
|
+
case "Escape":
|
|
12
|
+
e.close();
|
|
13
|
+
break;
|
|
14
|
+
default:
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
o.preventDefault();
|
|
18
|
+
}
|
|
19
|
+
return (o, f) => r(e).isOpen.value ? (l(), i("div", {
|
|
20
|
+
key: 0,
|
|
21
|
+
onKeydown: t,
|
|
22
|
+
id: r(e).popoverId,
|
|
23
|
+
role: r(e).role,
|
|
24
|
+
"aria-labelledby": r(e).activatorId,
|
|
25
|
+
tabindex: "-1"
|
|
26
|
+
}, [
|
|
27
|
+
p(o.$slots, "default")
|
|
28
|
+
], 40, s)) : c("", !0);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
v as _
|
|
33
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as u, useTemplateRef as b, useId as s, createElementBlock as f, openBlock as m, unref as e, renderSlot as _ } from "vue";
|
|
2
|
+
import { useListOption as k } from "./composable-ui17.js";
|
|
3
|
+
const C = ["id", "aria-selected", "aria-controls", "tabindex"], v = /* @__PURE__ */ u({
|
|
4
|
+
__name: "tab",
|
|
5
|
+
props: {
|
|
6
|
+
id: {},
|
|
7
|
+
ariaControls: {},
|
|
8
|
+
value: {}
|
|
9
|
+
},
|
|
10
|
+
setup(i) {
|
|
11
|
+
const t = i, o = b("tab"), { isSelected: a, select: n } = k(o, t.value), l = t.id ?? s(), c = t.ariaControls ?? s();
|
|
12
|
+
return (d, r) => (m(), f("button", {
|
|
13
|
+
ref_key: "tab",
|
|
14
|
+
ref: o,
|
|
15
|
+
onClick: r[0] || (r[0] = //@ts-ignore
|
|
16
|
+
(...p) => e(n) && e(n)(...p)),
|
|
17
|
+
id: e(l),
|
|
18
|
+
"aria-selected": e(a),
|
|
19
|
+
"aria-controls": e(c),
|
|
20
|
+
tabindex: e(a) ? 0 : -1,
|
|
21
|
+
role: "tab"
|
|
22
|
+
}, [
|
|
23
|
+
_(d.$slots, "default")
|
|
24
|
+
], 8, C));
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
v as _
|
|
29
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as c, useModel as u, provide as v, computed as p, createElementBlock as f, openBlock as I, renderSlot as _ } from "vue";
|
|
2
|
+
import { useList as b } from "./composable-ui22.js";
|
|
3
|
+
import { injectTabs as g } from "./composable-ui24.js";
|
|
4
|
+
const x = /* @__PURE__ */ c({
|
|
5
|
+
__name: "tabContainer",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {},
|
|
8
|
+
modelModifiers: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["update:modelValue"],
|
|
11
|
+
setup(o) {
|
|
12
|
+
const a = u(o, "modelValue"), {
|
|
13
|
+
items: i,
|
|
14
|
+
selectActiveItem: l,
|
|
15
|
+
activateFirstItem: m,
|
|
16
|
+
activateLastItem: r,
|
|
17
|
+
activateNextItem: n,
|
|
18
|
+
activatePrevItem: s
|
|
19
|
+
} = b(a);
|
|
20
|
+
return v(g, {
|
|
21
|
+
getIds: (e) => p(() => {
|
|
22
|
+
const t = i.value.find((d) => d.value === e);
|
|
23
|
+
return {
|
|
24
|
+
tabId: t?.element.value?.getAttribute("id") || void 0,
|
|
25
|
+
panelId: t?.element.value?.getAttribute("aria-controls") || void 0
|
|
26
|
+
};
|
|
27
|
+
}),
|
|
28
|
+
selectActiveItem: l,
|
|
29
|
+
activateFirstItem: m,
|
|
30
|
+
activateLastItem: r,
|
|
31
|
+
activateNextItem: n,
|
|
32
|
+
activatePrevItem: s
|
|
33
|
+
}), (e, t) => (I(), f("div", null, [
|
|
34
|
+
_(e.$slots, "default")
|
|
35
|
+
]));
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
x as _
|
|
40
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as i, inject as n, createElementBlock as c, openBlock as s, renderSlot as u } from "vue";
|
|
2
|
+
import { injectTabs as l } from "./composable-ui24.js";
|
|
3
|
+
const f = ["aria-orientation"], b = /* @__PURE__ */ i({
|
|
4
|
+
__name: "tabList",
|
|
5
|
+
props: {
|
|
6
|
+
orientation: { default: "horizontal" }
|
|
7
|
+
},
|
|
8
|
+
setup(r) {
|
|
9
|
+
const e = r, t = n(l);
|
|
10
|
+
if (!t)
|
|
11
|
+
throw new Error("Tabs injectable context is not provided");
|
|
12
|
+
function a(o) {
|
|
13
|
+
switch (o.code) {
|
|
14
|
+
case "ArrowUp":
|
|
15
|
+
e.orientation === "vertical" && t.activatePrevItem({ focus: !0, loop: !0 });
|
|
16
|
+
break;
|
|
17
|
+
case "ArrowDown":
|
|
18
|
+
e.orientation === "vertical" && t.activateNextItem({ focus: !0, loop: !0 });
|
|
19
|
+
break;
|
|
20
|
+
case "ArrowLeft":
|
|
21
|
+
e.orientation === "horizontal" && t.activatePrevItem({ focus: !0, loop: !0 });
|
|
22
|
+
break;
|
|
23
|
+
case "ArrowRight":
|
|
24
|
+
e.orientation === "horizontal" && t.activateNextItem({ focus: !0, loop: !0 });
|
|
25
|
+
break;
|
|
26
|
+
case "Home":
|
|
27
|
+
t.activateFirstItem({ focus: !0 });
|
|
28
|
+
break;
|
|
29
|
+
case "End":
|
|
30
|
+
t.activateLastItem({ focus: !0 });
|
|
31
|
+
break;
|
|
32
|
+
default:
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
t.selectActiveItem(), o.preventDefault();
|
|
36
|
+
}
|
|
37
|
+
return (o, p) => (s(), c("div", {
|
|
38
|
+
onKeydown: a,
|
|
39
|
+
"aria-orientation": e.orientation,
|
|
40
|
+
role: "tablist"
|
|
41
|
+
}, [
|
|
42
|
+
u(o.$slots, "default")
|
|
43
|
+
], 40, f));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
b as _
|
|
48
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent as c, inject as i, computed as d, withDirectives as p, createElementBlock as b, openBlock as u, unref as r, renderSlot as m, vShow as v } from "vue";
|
|
2
|
+
import { injectList as f } from "./composable-ui22.js";
|
|
3
|
+
import { injectTabs as _ } from "./composable-ui24.js";
|
|
4
|
+
const h = ["id", "aria-labelledby"], I = /* @__PURE__ */ c({
|
|
5
|
+
__name: "tabPanel",
|
|
6
|
+
props: {
|
|
7
|
+
value: {}
|
|
8
|
+
},
|
|
9
|
+
setup(a) {
|
|
10
|
+
const e = a, t = i(f);
|
|
11
|
+
if (!t)
|
|
12
|
+
throw new Error("List injectable context is not provided");
|
|
13
|
+
const o = i(_);
|
|
14
|
+
if (!o)
|
|
15
|
+
throw new Error("Tabs injectable context is not provided");
|
|
16
|
+
const s = d(() => e.value === t.value.value), n = o.getIds(e.value);
|
|
17
|
+
return (l, w) => p((u(), b("div", {
|
|
18
|
+
id: r(n).panelId,
|
|
19
|
+
"aria-labelledby": r(n).tabId,
|
|
20
|
+
tabindex: "0",
|
|
21
|
+
role: "tabpanel"
|
|
22
|
+
}, [
|
|
23
|
+
m(l.$slots, "default")
|
|
24
|
+
], 8, h)), [
|
|
25
|
+
[v, s.value]
|
|
26
|
+
]);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
I as _
|
|
31
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent as g, useSlots as b, ref as E, useId as k, onMounted as w, onBeforeUnmount as _, createElementBlock as c, openBlock as a, Fragment as $, renderSlot as p, createBlock as L, Teleport as T, createCommentVNode as h, unref as f, mergeProps as B, createTextVNode as S, toDisplayString as A } from "vue";
|
|
2
|
+
import { usePopover as C } from "./composable-ui21.js";
|
|
3
|
+
const I = ["id"], V = /* @__PURE__ */ g({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "tooltip",
|
|
6
|
+
props: {
|
|
7
|
+
id: {},
|
|
8
|
+
text: {},
|
|
9
|
+
delay: {},
|
|
10
|
+
direction: { default: "up" }
|
|
11
|
+
},
|
|
12
|
+
setup(m) {
|
|
13
|
+
const o = m, v = b(), l = E();
|
|
14
|
+
let d;
|
|
15
|
+
const n = o.id ?? k(), { isOpen: i } = C(`[aria-describedby=${n}]`, l, {
|
|
16
|
+
direction: o.direction,
|
|
17
|
+
align: "center"
|
|
18
|
+
});
|
|
19
|
+
function s() {
|
|
20
|
+
d = setTimeout(
|
|
21
|
+
() => {
|
|
22
|
+
i.value = !0;
|
|
23
|
+
},
|
|
24
|
+
typeof o.delay == "string" ? parseInt(o.delay) : o.delay
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
function r() {
|
|
28
|
+
i.value = !1, clearTimeout(d);
|
|
29
|
+
}
|
|
30
|
+
function u(e) {
|
|
31
|
+
e.key === "Escape" && r();
|
|
32
|
+
}
|
|
33
|
+
const y = {
|
|
34
|
+
"aria-describedby": n,
|
|
35
|
+
onmouseenter: s,
|
|
36
|
+
onmouseleave: r,
|
|
37
|
+
onfocus: s,
|
|
38
|
+
onblur: r,
|
|
39
|
+
onkeydown: u
|
|
40
|
+
}, t = new AbortController();
|
|
41
|
+
return w(() => {
|
|
42
|
+
if (v.default) return;
|
|
43
|
+
const e = document.querySelector(
|
|
44
|
+
`[aria-describedby=${n}]`
|
|
45
|
+
);
|
|
46
|
+
if (!e)
|
|
47
|
+
throw new Error(`Tooltip activator not found: ${n}`);
|
|
48
|
+
e.addEventListener("mouseenter", s, {
|
|
49
|
+
signal: t.signal,
|
|
50
|
+
passive: !0
|
|
51
|
+
}), e.addEventListener("mouseleave", r, {
|
|
52
|
+
signal: t.signal,
|
|
53
|
+
passive: !0
|
|
54
|
+
}), e.addEventListener("focus", s, {
|
|
55
|
+
signal: t.signal,
|
|
56
|
+
passive: !0
|
|
57
|
+
}), e.addEventListener("blur", r, {
|
|
58
|
+
signal: t.signal,
|
|
59
|
+
passive: !0
|
|
60
|
+
}), e.addEventListener("keydown", u, {
|
|
61
|
+
signal: t.signal,
|
|
62
|
+
passive: !0
|
|
63
|
+
});
|
|
64
|
+
}), _(() => {
|
|
65
|
+
t.abort();
|
|
66
|
+
}), (e, D) => (a(), c($, null, [
|
|
67
|
+
p(e.$slots, "default", { attrs: y }),
|
|
68
|
+
(a(), L(T, { to: "body" }, [
|
|
69
|
+
f(i) ? (a(), c("div", B({
|
|
70
|
+
key: 0,
|
|
71
|
+
ref_key: "popupEl",
|
|
72
|
+
ref: l,
|
|
73
|
+
id: f(n)
|
|
74
|
+
}, e.$attrs, { role: "tooltip" }), [
|
|
75
|
+
p(e.$slots, "content", {}, () => [
|
|
76
|
+
S(A(e.text), 1)
|
|
77
|
+
])
|
|
78
|
+
], 16, I)) : h("", !0)
|
|
79
|
+
]))
|
|
80
|
+
], 64));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
export {
|
|
84
|
+
V as _
|
|
85
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
displayValue?: (value: any) => string;
|
|
3
|
+
id?: string;
|
|
4
|
+
activatorId?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
formValue?: (item: any) => Record<string, string> | string;
|
|
7
|
+
};
|
|
8
|
+
declare function onKeyDown(evt: KeyboardEvent): void;
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
10
|
+
modelValue?: any;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_9: {
|
|
13
|
+
popoverId: string;
|
|
14
|
+
isOpen: boolean;
|
|
15
|
+
toggle: () => void;
|
|
16
|
+
displayValue: ((value: any) => string) & string;
|
|
17
|
+
attrs: {
|
|
18
|
+
onkeydown: typeof onKeyDown;
|
|
19
|
+
onclick: () => void;
|
|
20
|
+
id: string;
|
|
21
|
+
"aria-controls": string | undefined;
|
|
22
|
+
"aria-expanded": boolean;
|
|
23
|
+
"aria-activedescendant": string | undefined;
|
|
24
|
+
"aria-haspopup": "listbox";
|
|
25
|
+
role: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
type __VLS_Slots = {} & {
|
|
29
|
+
default?: (props: typeof __VLS_9) => any;
|
|
30
|
+
};
|
|
31
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
32
|
+
"update:modelValue": (value: any) => any;
|
|
33
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
34
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
displayValue: (value: any) => string;
|
|
37
|
+
formValue: (item: any) => Record<string, string> | string;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
2
|
name: string;
|
|
3
3
|
value: any;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
value: any;
|
|
7
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
6
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
type __VLS_PublicProps = {
|
|
2
2
|
modelValue?: string;
|
|
3
3
|
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_PublicProps,
|
|
5
|
-
"update:modelValue": (
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
7
|
-
"onUpdate:modelValue"?: ((
|
|
7
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
8
8
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
export default _default;
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
default?(_: {
|
|
3
|
-
isSelected: boolean;
|
|
4
|
-
isActive: boolean;
|
|
5
|
-
}): any;
|
|
6
|
-
};
|
|
7
|
-
declare const __VLS_component: import("vue").DefineComponent<{
|
|
8
|
-
id?: string;
|
|
9
|
-
value: any;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
1
|
+
type __VLS_Props = {
|
|
12
2
|
id?: string;
|
|
13
3
|
value: any;
|
|
14
4
|
disabled?: boolean;
|
|
15
|
-
}
|
|
16
|
-
declare
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
15
|
export default _default;
|
|
18
|
-
type
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
17
|
new (): {
|
|
20
18
|
$slots: S;
|
|
21
19
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
3
4
|
};
|
|
4
|
-
declare const __VLS_component: import("vue").DefineComponent<{},
|
|
5
|
-
declare const _default:
|
|
5
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
6
7
|
export default _default;
|
|
7
|
-
type
|
|
8
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
9
|
new (): {
|
|
9
10
|
$slots: S;
|
|
10
11
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
2
|
orientation?: "horizontal" | "vertical";
|
|
3
3
|
loop?: boolean;
|
|
4
4
|
};
|
|
5
|
-
type __VLS_PublicProps = {
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
6
|
modelValue?: any;
|
|
7
|
-
} & typeof __VLS_typeProps;
|
|
8
|
-
declare function __VLS_template(): {
|
|
9
|
-
default?(_: {}): any;
|
|
10
7
|
};
|
|
11
|
-
declare
|
|
12
|
-
|
|
8
|
+
declare var __VLS_1: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_1) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: any) => any;
|
|
13
14
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
-
"onUpdate:modelValue"?: ((
|
|
15
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
15
16
|
}>, {
|
|
16
17
|
loop: boolean;
|
|
17
18
|
orientation: "horizontal" | "vertical";
|
|
18
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
-
declare const _default:
|
|
20
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
20
21
|
export default _default;
|
|
21
|
-
|
|
22
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
23
|
new (): {
|
|
24
24
|
$slots: S;
|
|
25
25
|
};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
default?(_: {
|
|
3
|
-
isSelected: boolean;
|
|
4
|
-
isActive: boolean;
|
|
5
|
-
}): any;
|
|
6
|
-
};
|
|
7
|
-
declare const __VLS_component: import("vue").DefineComponent<{
|
|
8
|
-
id?: string;
|
|
9
|
-
value?: any;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
1
|
+
type __VLS_Props = {
|
|
12
2
|
id?: string;
|
|
13
3
|
value?: any;
|
|
14
4
|
disabled?: boolean;
|
|
15
|
-
}
|
|
16
|
-
declare
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_1: {
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_1) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
17
15
|
export default _default;
|
|
18
|
-
type
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
17
|
new (): {
|
|
20
18
|
$slots: S;
|
|
21
19
|
};
|