vue-composable-ui 1.1.0 → 1.1.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-ChCbDl0x.js → combobox.vue_vue_type_script_setup_true_lang-sMngTuXu.js} +10 -10
- package/dist/{comboboxHiddenInput.vue_vue_type_script_setup_true_lang-Ba-UPd-M.js → comboboxHiddenInput.vue_vue_type_script_setup_true_lang-BtODyQnH.js} +2 -2
- package/dist/{comboboxInput.vue_vue_type_script_setup_true_lang-D3KIXNRO.js → comboboxInput.vue_vue_type_script_setup_true_lang-Be5FBBbM.js} +3 -3
- package/dist/{comboboxOption.vue_vue_type_script_setup_true_lang-C9FIG5ye.js → comboboxOption.vue_vue_type_script_setup_true_lang-DmF_EaqI.js} +4 -4
- package/dist/comboboxOptions.vue_vue_type_script_setup_true_lang-DN0tz5dv.js +20 -0
- package/dist/composable-ui.js +22 -22
- package/dist/composable-ui10.js +1 -1
- package/dist/composable-ui11.js +1 -1
- package/dist/composable-ui12.js +1 -1
- package/dist/composable-ui13.js +1 -1
- package/dist/composable-ui14.js +1 -1
- package/dist/composable-ui15.js +1 -1
- package/dist/composable-ui16.js +1 -1
- package/dist/composable-ui17.js +1 -1
- package/dist/composable-ui18.js +2 -29
- package/dist/composable-ui19.js +5 -2
- package/dist/composable-ui2.js +2 -28
- package/dist/composable-ui20.js +53 -2
- package/dist/composable-ui21.js +29 -2
- package/dist/composable-ui22.js +132 -91
- package/dist/composable-ui23.js +90 -132
- package/dist/composable-ui25.js +28 -5
- package/dist/composable-ui3.js +2 -53
- package/dist/composable-ui4.js +1 -1
- package/dist/composable-ui5.js +1 -1
- package/dist/composable-ui6.js +1 -1
- package/dist/composable-ui7.js +1 -1
- package/dist/composable-ui8.js +1 -1
- package/dist/composable-ui9.js +1 -1
- package/dist/{listbox.vue_vue_type_script_setup_true_lang-BJS1g6K9.js → listbox.vue_vue_type_script_setup_true_lang-OvzuliPQ.js} +8 -8
- package/dist/{listboxOption.vue_vue_type_script_setup_true_lang-DMkQ_ZA_.js → listboxOption.vue_vue_type_script_setup_true_lang-BhQm7GxW.js} +3 -3
- package/dist/{menu.vue_vue_type_script_setup_true_lang-BTGGj0FY.js → menu.vue_vue_type_script_setup_true_lang-B0Jm9v_v.js} +9 -9
- package/dist/{menuItem.vue_vue_type_script_setup_true_lang-CSWsvc1p.js → menuItem.vue_vue_type_script_setup_true_lang-IZgj64N4.js} +4 -4
- package/dist/{menuItems.vue_vue_type_script_setup_true_lang-DZL1uyoq.js → menuItems.vue_vue_type_script_setup_true_lang-DQV-lU_A.js} +5 -5
- package/dist/{popover.vue_vue_type_script_setup_true_lang-C13ARHho.js → popover.vue_vue_type_script_setup_true_lang-D1gc6B-4.js} +2 -2
- package/dist/popoverDialog.vue_vue_type_script_setup_true_lang-ApsJsSDN.js +30 -0
- package/dist/{tab.vue_vue_type_script_setup_true_lang-BSckMUwj.js → tab.vue_vue_type_script_setup_true_lang-C12uJKqo.js} +3 -3
- package/dist/{tabContainer.vue_vue_type_script_setup_true_lang-YfrBXoWm.js → tabContainer.vue_vue_type_script_setup_true_lang-yqy32Zx5.js} +4 -4
- package/dist/{tabList.vue_vue_type_script_setup_true_lang-DLoNOwJ7.js → tabList.vue_vue_type_script_setup_true_lang-BjKRcoyi.js} +3 -3
- package/dist/{tabPanel.vue_vue_type_script_setup_true_lang-DZfMk_Sn.js → tabPanel.vue_vue_type_script_setup_true_lang-DwEwu3p7.js} +4 -4
- package/dist/{tooltip.vue_vue_type_script_setup_true_lang-CXxwHtxF.js → tooltip.vue_vue_type_script_setup_true_lang-kslDnoRH.js} +5 -5
- package/dist/types/components/combobox/combobox.vue.d.ts +8 -6
- package/dist/types/components/combobox/comboboxHiddenInput.vue.d.ts +2 -1
- package/dist/types/components/combobox/comboboxInput.vue.d.ts +4 -3
- package/dist/types/components/combobox/comboboxOption.vue.d.ts +3 -2
- package/dist/types/components/combobox/comboboxOptions.vue.d.ts +3 -2
- package/dist/types/components/listbox/listbox.vue.d.ts +5 -3
- package/dist/types/components/listbox/listboxOption.vue.d.ts +3 -2
- package/dist/types/components/menu/menu.vue.d.ts +5 -3
- package/dist/types/components/menu/menuItem.vue.d.ts +3 -2
- package/dist/types/components/menu/menuItems.vue.d.ts +3 -2
- package/dist/types/components/popover/popover.vue.d.ts +3 -2
- package/dist/types/components/popover/popoverDialog.vue.d.ts +3 -2
- package/dist/types/components/tabs/tab.vue.d.ts +3 -2
- package/dist/types/components/tabs/tabContainer.vue.d.ts +5 -4
- package/dist/types/components/tabs/tabList.vue.d.ts +3 -2
- package/dist/types/components/tabs/tabPanel.vue.d.ts +3 -2
- package/dist/types/components/tooltip.vue.d.ts +5 -4
- package/dist/types/main.d.ts +1 -1
- package/package.json +5 -5
- package/dist/comboboxOptions.vue_vue_type_script_setup_true_lang-DLv4KjF8.js +0 -20
- package/dist/popoverDialog.vue_vue_type_script_setup_true_lang-C2z6To-6.js +0 -33
package/dist/composable-ui23.js
CHANGED
|
@@ -1,144 +1,102 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useHTMLElement as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
if (!
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
function b(e) {
|
|
17
|
-
const t = s(e.element);
|
|
18
|
-
if (t)
|
|
19
|
-
return t.focus(), t;
|
|
20
|
-
}
|
|
21
|
-
function f(e, { focus: t = !1 } = {}) {
|
|
22
|
-
l.value = e?.id ?? void 0, e !== void 0 && t && b(e);
|
|
23
|
-
}
|
|
24
|
-
function O(e, { focus: t = !1 } = {}) {
|
|
25
|
-
const i = o(e);
|
|
26
|
-
return f(i, { focus: t });
|
|
27
|
-
}
|
|
28
|
-
function m(e) {
|
|
29
|
-
return l.value === e;
|
|
30
|
-
}
|
|
31
|
-
function w(e, t, i = !1) {
|
|
32
|
-
const a = _(e), u = c++;
|
|
33
|
-
return n.value.push({
|
|
34
|
-
id: u,
|
|
35
|
-
value: t,
|
|
36
|
-
element: a,
|
|
37
|
-
disabled: i
|
|
38
|
-
}), S(n), u;
|
|
39
|
-
}
|
|
40
|
-
function A(e) {
|
|
41
|
-
m(e) && f();
|
|
42
|
-
const t = o(e), i = n.value.indexOf(t);
|
|
43
|
-
n.value.splice(i, 1), S(n);
|
|
44
|
-
}
|
|
45
|
-
function I(e) {
|
|
46
|
-
const t = o(e);
|
|
47
|
-
if (s(t.disabled)) return;
|
|
48
|
-
const i = s(t.value);
|
|
49
|
-
if (i !== void 0) {
|
|
50
|
-
if (s(v)) {
|
|
51
|
-
const a = r.value.findIndex(
|
|
52
|
-
(u) => d(i, u)
|
|
53
|
-
);
|
|
54
|
-
a > -1 ? r.value.splice(a, 1) : r.value = [...r.value, i];
|
|
55
|
-
} else
|
|
56
|
-
r.value = i;
|
|
57
|
-
f(t);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function y(e) {
|
|
61
|
-
return s(v) ? !!r.value.find(
|
|
62
|
-
(t) => d(e.value, t)
|
|
63
|
-
) : d(r, e.value);
|
|
1
|
+
import { ref as T, onBeforeMount as _, onMounted as F, watch as U, nextTick as P, onBeforeUnmount as j } from "vue";
|
|
2
|
+
import { useHTMLElement as k } from "./composable-ui24.js";
|
|
3
|
+
function G(y, z, {
|
|
4
|
+
direction: c = "down",
|
|
5
|
+
align: u = "left",
|
|
6
|
+
position: L = "fixed",
|
|
7
|
+
closeOnOutsideClick: A = !0,
|
|
8
|
+
closeOnInsideClick: M = !1
|
|
9
|
+
} = {}) {
|
|
10
|
+
const s = T(!1);
|
|
11
|
+
function v() {
|
|
12
|
+
const e = k(y);
|
|
13
|
+
if (!e.value) throw new Error("Activator element is undefined");
|
|
14
|
+
return e.value;
|
|
64
15
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} catch {
|
|
70
|
-
return !1;
|
|
71
|
-
}
|
|
16
|
+
function $() {
|
|
17
|
+
const e = k(z);
|
|
18
|
+
if (!e.value) throw new Error("Popover element is undefined");
|
|
19
|
+
return e.value;
|
|
72
20
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
21
|
+
function B({ focus: e = !0 } = {}) {
|
|
22
|
+
s.value = !0, e && P(() => {
|
|
23
|
+
$().focus();
|
|
24
|
+
});
|
|
77
25
|
}
|
|
78
|
-
function
|
|
79
|
-
|
|
80
|
-
return f(n.value[0], { focus: e });
|
|
26
|
+
function E({ focus: e = !0 } = {}) {
|
|
27
|
+
s.value = !1, e && v().focus();
|
|
81
28
|
}
|
|
82
|
-
function
|
|
83
|
-
|
|
84
|
-
return f(n.value[n.value.length - 1], { focus: e });
|
|
29
|
+
function O(e) {
|
|
30
|
+
s.value ? E(e) : B(e);
|
|
85
31
|
}
|
|
86
|
-
function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
32
|
+
function h() {
|
|
33
|
+
if (!s.value) return;
|
|
34
|
+
const e = v(), r = $();
|
|
35
|
+
r.style.position = L;
|
|
36
|
+
const {
|
|
37
|
+
top: f,
|
|
38
|
+
right: l,
|
|
39
|
+
bottom: w,
|
|
40
|
+
left: p,
|
|
41
|
+
width: m,
|
|
42
|
+
height: W
|
|
43
|
+
} = e.getBoundingClientRect(), a = r.offsetHeight, d = r.offsetWidth, x = document.documentElement.clientHeight, b = document.documentElement.clientWidth;
|
|
44
|
+
let i = c;
|
|
45
|
+
c == "up" ? f - a < 0 && (i = "down") : c == "down" ? w + a > x && (i = "up") : c == "right" ? l + d > b && (i = "left") : c == "left" && p - d < 0 && (i = "right");
|
|
46
|
+
let o = u;
|
|
47
|
+
u == "left" ? p + d > b && (o = "right") : u == "right" ? l - d < 0 && (o = "left") : u == "top" ? f + a > x && (o = "bottom") : u == "bottom" && w - a < 0 && (o = "top");
|
|
48
|
+
const t = {
|
|
49
|
+
top: "auto",
|
|
50
|
+
bottom: "auto",
|
|
51
|
+
left: "auto",
|
|
52
|
+
right: "auto",
|
|
53
|
+
width: "auto"
|
|
54
|
+
}, n = L === "fixed";
|
|
55
|
+
i == "up" ? t.bottom = `${W + (n ? x - w : 0)}px` : i == "down" ? t.top = `${W + (n ? f : 0)}px` : i == "right" ? t.left = `${m + (n ? p : 0)}px` : i == "left" && (t.right = `${m + (n ? b - l : 0)}px`), ["up", "down"].includes(i) ? o == "right" ? t.right = `${n ? b - l : 0}px` : o == "left" || o == "stretch" ? t.left = `${n ? p : 0}px` : o == "center" && (t.left = `${(n ? p : 0) - (d - m) / 2}px`) : o == "bottom" ? t.bottom = `${n ? x - w : 0}px` : o == "top" ? t.top = `${n ? f : 0}px` : o == "center" && (t.top = `${(n ? f : 0) - (a - W) / 2}px`), ["up", "down"].includes(i) && o === "stretch" && (t.width = m + "px");
|
|
56
|
+
for (const C in t)
|
|
57
|
+
r.style[C] = t[C];
|
|
100
58
|
}
|
|
101
|
-
function
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (a - 1 > -1)
|
|
109
|
-
u = n.value[a - 1];
|
|
110
|
-
else if (t)
|
|
111
|
-
u = n.value[n.value.length - 1];
|
|
112
|
-
else
|
|
113
|
-
return;
|
|
114
|
-
return f(u, { focus: e });
|
|
59
|
+
function R(e) {
|
|
60
|
+
const r = e.target;
|
|
61
|
+
if (!v().contains(r))
|
|
62
|
+
try {
|
|
63
|
+
$().contains(r) ? M && E() : A && (s.value = !1);
|
|
64
|
+
} catch {
|
|
65
|
+
}
|
|
115
66
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
67
|
+
let H;
|
|
68
|
+
const g = new AbortController();
|
|
69
|
+
return _(() => {
|
|
70
|
+
H = new ResizeObserver(h);
|
|
71
|
+
}), F(() => {
|
|
72
|
+
U(
|
|
73
|
+
s,
|
|
74
|
+
(e) => {
|
|
75
|
+
e && P(() => {
|
|
76
|
+
h();
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
{ flush: "pre" }
|
|
80
|
+
), window.addEventListener("resize", h, {
|
|
81
|
+
passive: !0,
|
|
82
|
+
signal: g.signal
|
|
83
|
+
}), window.addEventListener("scroll", h, {
|
|
84
|
+
passive: !0,
|
|
85
|
+
//capture: true,
|
|
86
|
+
signal: g.signal
|
|
87
|
+
}), window.addEventListener("click", R, {
|
|
88
|
+
passive: !0,
|
|
89
|
+
signal: g.signal
|
|
90
|
+
}), H.observe(v());
|
|
91
|
+
}), j(() => {
|
|
92
|
+
g.abort(), H.disconnect();
|
|
125
93
|
}), {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
),
|
|
131
|
-
selectActiveItem: () => {
|
|
132
|
-
l.value !== void 0 && I(l.value);
|
|
133
|
-
},
|
|
134
|
-
activateSelectedItem: j,
|
|
135
|
-
activateFirstItem: p,
|
|
136
|
-
activateLastItem: x,
|
|
137
|
-
activateNextItem: E,
|
|
138
|
-
activatePrevItem: M
|
|
94
|
+
isOpen: s,
|
|
95
|
+
open: B,
|
|
96
|
+
close: E,
|
|
97
|
+
toggle: O
|
|
139
98
|
};
|
|
140
99
|
}
|
|
141
100
|
export {
|
|
142
|
-
|
|
143
|
-
P as useList
|
|
101
|
+
G as usePopover
|
|
144
102
|
};
|
package/dist/composable-ui25.js
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
import { ref as l, watch as V, toValue as u, readonly as n } from "vue";
|
|
2
|
+
function h(s, f = [], c = !1) {
|
|
3
|
+
const e = l(!0), r = l([]);
|
|
4
|
+
function d(t, a, o) {
|
|
5
|
+
r.value = [], e.value = !0;
|
|
6
|
+
for (const v of a) {
|
|
7
|
+
const i = v(t);
|
|
8
|
+
if (i !== !0 && (r.value.push(i), e.value = !1, o))
|
|
9
|
+
return !1;
|
|
10
|
+
}
|
|
11
|
+
return e.value;
|
|
12
|
+
}
|
|
13
|
+
return V(
|
|
14
|
+
[
|
|
15
|
+
() => u(s),
|
|
16
|
+
() => u(f),
|
|
17
|
+
() => u(c)
|
|
18
|
+
],
|
|
19
|
+
([t, a, o]) => {
|
|
20
|
+
d(t, a, o);
|
|
21
|
+
},
|
|
22
|
+
{ immediate: !0 }
|
|
23
|
+
), {
|
|
24
|
+
isValid: n(e),
|
|
25
|
+
errors: n(r)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
2
28
|
export {
|
|
3
|
-
|
|
4
|
-
t as injectMenu,
|
|
5
|
-
n as injectPopover,
|
|
6
|
-
o as injectTabs
|
|
29
|
+
h as useValidation
|
|
7
30
|
};
|
package/dist/composable-ui3.js
CHANGED
|
@@ -1,55 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useHTMLElement as b } from "./composable-ui24.js";
|
|
3
|
-
function k(y, h = [], w = !0) {
|
|
4
|
-
const a = t(!1), n = t(!0), l = t(), r = t("");
|
|
5
|
-
let e, u;
|
|
6
|
-
function s() {
|
|
7
|
-
e?.focus();
|
|
8
|
-
}
|
|
9
|
-
function d() {
|
|
10
|
-
n.value = e.validity.valid, l.value = e.validity, r.value = e.validationMessage;
|
|
11
|
-
}
|
|
12
|
-
function f() {
|
|
13
|
-
if (!e) throw new Error("Form element is undefined");
|
|
14
|
-
const o = e.value;
|
|
15
|
-
for (const p of g(h)) {
|
|
16
|
-
const c = p(o);
|
|
17
|
-
if (c !== !0) {
|
|
18
|
-
e.setCustomValidity(c);
|
|
19
|
-
break;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function v() {
|
|
24
|
-
if (!e) throw new Error("Form element is undefined");
|
|
25
|
-
return e.setCustomValidity(""), e.validity.valid && f(), d(), n.value;
|
|
26
|
-
}
|
|
27
|
-
function C(o) {
|
|
28
|
-
d(), g(w) || o.preventDefault();
|
|
29
|
-
}
|
|
30
|
-
function E() {
|
|
31
|
-
v(), a.value = u !== e.value;
|
|
32
|
-
}
|
|
33
|
-
let i = new AbortController();
|
|
34
|
-
return V(() => {
|
|
35
|
-
if (e = b(y).value, !e) throw new Error("Form element is undefined");
|
|
36
|
-
f(), u = e.value, e.addEventListener("change", E, {
|
|
37
|
-
signal: i.signal,
|
|
38
|
-
passive: !0
|
|
39
|
-
}), e.addEventListener("invalid", C, {
|
|
40
|
-
signal: i.signal
|
|
41
|
-
}), e?.autofocus && s();
|
|
42
|
-
}), M(() => {
|
|
43
|
-
i.abort();
|
|
44
|
-
}), {
|
|
45
|
-
focus: s,
|
|
46
|
-
validate: v,
|
|
47
|
-
isValid: n,
|
|
48
|
-
validity: m(l),
|
|
49
|
-
validationMessage: m(r),
|
|
50
|
-
isChanged: a
|
|
51
|
-
};
|
|
52
|
-
}
|
|
1
|
+
import { _ as f } from "./comboboxHiddenInput.vue_vue_type_script_setup_true_lang-BtODyQnH.js";
|
|
53
2
|
export {
|
|
54
|
-
|
|
3
|
+
f as default
|
|
55
4
|
};
|
package/dist/composable-ui4.js
CHANGED
package/dist/composable-ui5.js
CHANGED
package/dist/composable-ui6.js
CHANGED
package/dist/composable-ui7.js
CHANGED
package/dist/composable-ui8.js
CHANGED
package/dist/composable-ui9.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as m,
|
|
2
|
-
import { useList as x } from "./composable-
|
|
1
|
+
import { defineComponent as m, useModel as p, computed as v, openBlock as b, createElementBlock as k, unref as w, renderSlot as I, mergeModels as h } from "vue";
|
|
2
|
+
import { useList as x } from "./composable-ui22.js";
|
|
3
3
|
const A = ["aria-activedescendant", "aria-orientation", "aria-multiselectable"], B = /* @__PURE__ */ m({
|
|
4
4
|
__name: "listbox",
|
|
5
|
-
props: /* @__PURE__ */
|
|
5
|
+
props: /* @__PURE__ */ h({
|
|
6
6
|
orientation: { default: "vertical" },
|
|
7
7
|
loop: { type: Boolean, default: !1 }
|
|
8
8
|
}, {
|
|
@@ -11,7 +11,7 @@ const A = ["aria-activedescendant", "aria-orientation", "aria-multiselectable"],
|
|
|
11
11
|
}),
|
|
12
12
|
emits: ["update:modelValue"],
|
|
13
13
|
setup(i) {
|
|
14
|
-
const e = i, n =
|
|
14
|
+
const e = i, n = p(i, "modelValue"), {
|
|
15
15
|
isMultiselectable: t,
|
|
16
16
|
activeItem: s,
|
|
17
17
|
selectActiveItem: o,
|
|
@@ -19,7 +19,7 @@ const A = ["aria-activedescendant", "aria-orientation", "aria-multiselectable"],
|
|
|
19
19
|
activateLastItem: u,
|
|
20
20
|
activateNextItem: l,
|
|
21
21
|
activatePrevItem: r
|
|
22
|
-
} = x(n), f =
|
|
22
|
+
} = x(n), f = v(() => s.value?.element.value?.id);
|
|
23
23
|
function d(a) {
|
|
24
24
|
switch (a.code) {
|
|
25
25
|
case "Space":
|
|
@@ -52,15 +52,15 @@ const A = ["aria-activedescendant", "aria-orientation", "aria-multiselectable"],
|
|
|
52
52
|
}
|
|
53
53
|
a.preventDefault();
|
|
54
54
|
}
|
|
55
|
-
return (a, M) => (
|
|
55
|
+
return (a, M) => (b(), k("div", {
|
|
56
56
|
onKeydown: d,
|
|
57
57
|
"aria-activedescendant": f.value,
|
|
58
58
|
"aria-orientation": i.orientation,
|
|
59
|
-
"aria-multiselectable":
|
|
59
|
+
"aria-multiselectable": w(t),
|
|
60
60
|
role: "listbox",
|
|
61
61
|
tabindex: "0"
|
|
62
62
|
}, [
|
|
63
|
-
|
|
63
|
+
I(a.$slots, "default")
|
|
64
64
|
], 40, A));
|
|
65
65
|
}
|
|
66
66
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as m, useId as p, useTemplateRef as u,
|
|
2
|
-
import { useListOption as _ } from "./composable-
|
|
1
|
+
import { defineComponent as m, useId as p, useTemplateRef as u, openBlock as f, createElementBlock as b, unref as e, renderSlot as v } from "vue";
|
|
2
|
+
import { useListOption as _ } from "./composable-ui21.js";
|
|
3
3
|
const k = ["id", "aria-disabled", "aria-selected", "data-active"], B = /* @__PURE__ */ m({
|
|
4
4
|
__name: "listboxOption",
|
|
5
5
|
props: {
|
|
@@ -13,7 +13,7 @@ const k = ["id", "aria-disabled", "aria-selected", "data-active"], B = /* @__PUR
|
|
|
13
13
|
t.value,
|
|
14
14
|
t.disabled
|
|
15
15
|
);
|
|
16
|
-
return (r, l) => (
|
|
16
|
+
return (r, l) => (f(), b("div", {
|
|
17
17
|
ref_key: "itemEl",
|
|
18
18
|
ref: s,
|
|
19
19
|
id: e(n),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as b,
|
|
2
|
-
import { usePopover as C } from "./composable-
|
|
3
|
-
import { useList as D } from "./composable-
|
|
4
|
-
import { injectMenu as V } from "./composable-
|
|
1
|
+
import { defineComponent as b, useId as u, useModel as M, computed as m, provide as O, renderSlot as A, unref as _, mergeModels as h, nextTick as r } from "vue";
|
|
2
|
+
import { usePopover as C } from "./composable-ui23.js";
|
|
3
|
+
import { useList as D } from "./composable-ui22.js";
|
|
4
|
+
import { injectMenu as V } from "./composable-ui19.js";
|
|
5
5
|
const j = /* @__PURE__ */ b({
|
|
6
6
|
__name: "menu",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ h({
|
|
8
8
|
id: {},
|
|
9
9
|
activatorId: {},
|
|
10
10
|
direction: { default: "down" },
|
|
@@ -16,7 +16,7 @@ const j = /* @__PURE__ */ b({
|
|
|
16
16
|
}),
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
18
|
setup(s) {
|
|
19
|
-
const e = s, a = e.id ?? u(), i = e.activatorId ?? u(), p =
|
|
19
|
+
const e = s, a = e.id ?? u(), i = e.activatorId ?? u(), p = M(s, "modelValue"), {
|
|
20
20
|
isMultiselectable: v,
|
|
21
21
|
activeItem: f,
|
|
22
22
|
activateFirstItem: n,
|
|
@@ -60,7 +60,7 @@ const j = /* @__PURE__ */ b({
|
|
|
60
60
|
onkeydown: g,
|
|
61
61
|
tabindex: 0
|
|
62
62
|
}));
|
|
63
|
-
return
|
|
63
|
+
return O(V, {
|
|
64
64
|
menuId: a,
|
|
65
65
|
activatorId: i,
|
|
66
66
|
isOpen: t,
|
|
@@ -71,9 +71,9 @@ const j = /* @__PURE__ */ b({
|
|
|
71
71
|
activateLastItem: c,
|
|
72
72
|
activateNextItem: I,
|
|
73
73
|
activatePrevItem: k
|
|
74
|
-
}), (o, $) =>
|
|
74
|
+
}), (o, $) => A(o.$slots, "default", {
|
|
75
75
|
attrs: x.value,
|
|
76
|
-
isOpen:
|
|
76
|
+
isOpen: _(t)
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as w, useId as x, useTemplateRef as y, inject as S, computed as h,
|
|
2
|
-
import { useListOption as I } from "./composable-
|
|
3
|
-
import { injectMenu as $ } from "./composable-
|
|
1
|
+
import { defineComponent as w, useId as x, useTemplateRef as y, inject as S, computed as h, openBlock as j, createElementBlock as A, unref as t, renderSlot as B } from "vue";
|
|
2
|
+
import { useListOption as I } from "./composable-ui21.js";
|
|
3
|
+
import { injectMenu as $ } from "./composable-ui19.js";
|
|
4
4
|
const C = ["id", "data-active", "role", "aria-checked", "aria-disabled"], O = /* @__PURE__ */ w({
|
|
5
5
|
__name: "menuItem",
|
|
6
6
|
props: {
|
|
@@ -37,7 +37,7 @@ const C = ["id", "data-active", "role", "aria-checked", "aria-disabled"], O = /*
|
|
|
37
37
|
}
|
|
38
38
|
o.preventDefault();
|
|
39
39
|
}
|
|
40
|
-
return (o, n) => (
|
|
40
|
+
return (o, n) => (j(), A("div", {
|
|
41
41
|
ref_key: "itemEl",
|
|
42
42
|
ref: s,
|
|
43
43
|
id: t(m),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as n, inject as o,
|
|
2
|
-
import { injectMenu as l } from "./composable-
|
|
1
|
+
import { defineComponent as n, inject as o, unref as a, openBlock as c, createElementBlock as s, renderSlot as i, createCommentVNode as u } from "vue";
|
|
2
|
+
import { injectMenu as l } from "./composable-ui19.js";
|
|
3
3
|
const d = ["id", "aria-activedescendant", "aria-labelledby"], b = /* @__PURE__ */ n({
|
|
4
4
|
__name: "menuItems",
|
|
5
5
|
setup(m) {
|
|
@@ -31,7 +31,7 @@ const d = ["id", "aria-activedescendant", "aria-labelledby"], b = /* @__PURE__ *
|
|
|
31
31
|
}
|
|
32
32
|
t.preventDefault();
|
|
33
33
|
}
|
|
34
|
-
return (t, f) => a(e).isOpen.value ? (
|
|
34
|
+
return (t, f) => a(e).isOpen.value ? (c(), s("div", {
|
|
35
35
|
key: 0,
|
|
36
36
|
onKeydown: r,
|
|
37
37
|
id: a(e).menuId,
|
|
@@ -40,8 +40,8 @@ const d = ["id", "aria-activedescendant", "aria-labelledby"], b = /* @__PURE__ *
|
|
|
40
40
|
role: "menu",
|
|
41
41
|
tabindex: "-1"
|
|
42
42
|
}, [
|
|
43
|
-
|
|
44
|
-
], 40, d)) :
|
|
43
|
+
i(t.$slots, "default")
|
|
44
|
+
], 40, d)) : u("", !0);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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-
|
|
3
|
-
import { injectPopover as g } from "./composable-
|
|
2
|
+
import { usePopover as m } from "./composable-ui23.js";
|
|
3
|
+
import { injectPopover as g } from "./composable-ui19.js";
|
|
4
4
|
const x = /* @__PURE__ */ u({
|
|
5
5
|
__name: "popover",
|
|
6
6
|
props: {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as n, inject as a, unref as r, openBlock as i, createElementBlock as c, renderSlot as l, createCommentVNode as p } from "vue";
|
|
2
|
+
import { injectPopover as d } from "./composable-ui19.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
|
+
if (o.code === "Escape")
|
|
11
|
+
e.close();
|
|
12
|
+
else
|
|
13
|
+
return;
|
|
14
|
+
o.preventDefault();
|
|
15
|
+
}
|
|
16
|
+
return (o, f) => r(e).isOpen.value ? (i(), c("div", {
|
|
17
|
+
key: 0,
|
|
18
|
+
onKeydown: t,
|
|
19
|
+
id: r(e).popoverId,
|
|
20
|
+
role: r(e).role,
|
|
21
|
+
"aria-labelledby": r(e).activatorId,
|
|
22
|
+
tabindex: "-1"
|
|
23
|
+
}, [
|
|
24
|
+
l(o.$slots, "default")
|
|
25
|
+
], 40, s)) : p("", !0);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
v as _
|
|
30
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as u, useTemplateRef as b, useId as s,
|
|
2
|
-
import { useListOption as k } from "./composable-
|
|
1
|
+
import { defineComponent as u, useTemplateRef as b, useId as s, openBlock as f, createElementBlock as m, unref as e, renderSlot as _ } from "vue";
|
|
2
|
+
import { useListOption as k } from "./composable-ui21.js";
|
|
3
3
|
const C = ["id", "aria-selected", "aria-controls", "tabindex"], v = /* @__PURE__ */ u({
|
|
4
4
|
__name: "tab",
|
|
5
5
|
props: {
|
|
@@ -9,7 +9,7 @@ const C = ["id", "aria-selected", "aria-controls", "tabindex"], v = /* @__PURE__
|
|
|
9
9
|
},
|
|
10
10
|
setup(i) {
|
|
11
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) => (
|
|
12
|
+
return (d, r) => (f(), m("button", {
|
|
13
13
|
ref_key: "tab",
|
|
14
14
|
ref: o,
|
|
15
15
|
onClick: r[0] || (r[0] = //@ts-ignore
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as c, useModel as u, provide as v, computed as p,
|
|
2
|
-
import { useList as b } from "./composable-
|
|
3
|
-
import { injectTabs as g } from "./composable-
|
|
1
|
+
import { defineComponent as c, useModel as u, provide as v, computed as p, openBlock as f, createElementBlock as I, renderSlot as _ } from "vue";
|
|
2
|
+
import { useList as b } from "./composable-ui22.js";
|
|
3
|
+
import { injectTabs as g } from "./composable-ui19.js";
|
|
4
4
|
const x = /* @__PURE__ */ c({
|
|
5
5
|
__name: "tabContainer",
|
|
6
6
|
props: {
|
|
@@ -30,7 +30,7 @@ const x = /* @__PURE__ */ c({
|
|
|
30
30
|
activateLastItem: r,
|
|
31
31
|
activateNextItem: n,
|
|
32
32
|
activatePrevItem: s
|
|
33
|
-
}), (e, t) => (
|
|
33
|
+
}), (e, t) => (f(), I("div", null, [
|
|
34
34
|
_(e.$slots, "default")
|
|
35
35
|
]));
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as i, inject as n,
|
|
2
|
-
import { injectTabs as l } from "./composable-
|
|
1
|
+
import { defineComponent as i, inject as n, openBlock as c, createElementBlock as s, renderSlot as u } from "vue";
|
|
2
|
+
import { injectTabs as l } from "./composable-ui19.js";
|
|
3
3
|
const f = ["aria-orientation"], b = /* @__PURE__ */ i({
|
|
4
4
|
__name: "tabList",
|
|
5
5
|
props: {
|
|
@@ -34,7 +34,7 @@ const f = ["aria-orientation"], b = /* @__PURE__ */ i({
|
|
|
34
34
|
}
|
|
35
35
|
t.selectActiveItem(), o.preventDefault();
|
|
36
36
|
}
|
|
37
|
-
return (o, p) => (
|
|
37
|
+
return (o, p) => (c(), s("div", {
|
|
38
38
|
onKeydown: a,
|
|
39
39
|
"aria-orientation": e.orientation,
|
|
40
40
|
role: "tablist"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as c, inject as i, computed as d, withDirectives as p,
|
|
2
|
-
import { injectList as f } from "./composable-
|
|
3
|
-
import { injectTabs as _ } from "./composable-
|
|
1
|
+
import { defineComponent as c, inject as i, computed as d, withDirectives as p, openBlock as b, createElementBlock 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-ui19.js";
|
|
4
4
|
const h = ["id", "aria-labelledby"], I = /* @__PURE__ */ c({
|
|
5
5
|
__name: "tabPanel",
|
|
6
6
|
props: {
|
|
@@ -14,7 +14,7 @@ const h = ["id", "aria-labelledby"], I = /* @__PURE__ */ c({
|
|
|
14
14
|
if (!o)
|
|
15
15
|
throw new Error("Tabs injectable context is not provided");
|
|
16
16
|
const s = d(() => e.value === t.value.value), n = o.getIds(e.value);
|
|
17
|
-
return (l, w) => p((
|
|
17
|
+
return (l, w) => p((b(), u("div", {
|
|
18
18
|
id: r(n).panelId,
|
|
19
19
|
"aria-labelledby": r(n).tabId,
|
|
20
20
|
tabindex: "0",
|