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.
Files changed (62) hide show
  1. package/dist/{combobox.vue_vue_type_script_setup_true_lang-ChCbDl0x.js → combobox.vue_vue_type_script_setup_true_lang-sMngTuXu.js} +10 -10
  2. 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
  3. package/dist/{comboboxInput.vue_vue_type_script_setup_true_lang-D3KIXNRO.js → comboboxInput.vue_vue_type_script_setup_true_lang-Be5FBBbM.js} +3 -3
  4. 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
  5. package/dist/comboboxOptions.vue_vue_type_script_setup_true_lang-DN0tz5dv.js +20 -0
  6. package/dist/composable-ui.js +22 -22
  7. package/dist/composable-ui10.js +1 -1
  8. package/dist/composable-ui11.js +1 -1
  9. package/dist/composable-ui12.js +1 -1
  10. package/dist/composable-ui13.js +1 -1
  11. package/dist/composable-ui14.js +1 -1
  12. package/dist/composable-ui15.js +1 -1
  13. package/dist/composable-ui16.js +1 -1
  14. package/dist/composable-ui17.js +1 -1
  15. package/dist/composable-ui18.js +2 -29
  16. package/dist/composable-ui19.js +5 -2
  17. package/dist/composable-ui2.js +2 -28
  18. package/dist/composable-ui20.js +53 -2
  19. package/dist/composable-ui21.js +29 -2
  20. package/dist/composable-ui22.js +132 -91
  21. package/dist/composable-ui23.js +90 -132
  22. package/dist/composable-ui25.js +28 -5
  23. package/dist/composable-ui3.js +2 -53
  24. package/dist/composable-ui4.js +1 -1
  25. package/dist/composable-ui5.js +1 -1
  26. package/dist/composable-ui6.js +1 -1
  27. package/dist/composable-ui7.js +1 -1
  28. package/dist/composable-ui8.js +1 -1
  29. package/dist/composable-ui9.js +1 -1
  30. package/dist/{listbox.vue_vue_type_script_setup_true_lang-BJS1g6K9.js → listbox.vue_vue_type_script_setup_true_lang-OvzuliPQ.js} +8 -8
  31. 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
  32. 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
  33. package/dist/{menuItem.vue_vue_type_script_setup_true_lang-CSWsvc1p.js → menuItem.vue_vue_type_script_setup_true_lang-IZgj64N4.js} +4 -4
  34. 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
  35. 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
  36. package/dist/popoverDialog.vue_vue_type_script_setup_true_lang-ApsJsSDN.js +30 -0
  37. package/dist/{tab.vue_vue_type_script_setup_true_lang-BSckMUwj.js → tab.vue_vue_type_script_setup_true_lang-C12uJKqo.js} +3 -3
  38. package/dist/{tabContainer.vue_vue_type_script_setup_true_lang-YfrBXoWm.js → tabContainer.vue_vue_type_script_setup_true_lang-yqy32Zx5.js} +4 -4
  39. package/dist/{tabList.vue_vue_type_script_setup_true_lang-DLoNOwJ7.js → tabList.vue_vue_type_script_setup_true_lang-BjKRcoyi.js} +3 -3
  40. 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
  41. package/dist/{tooltip.vue_vue_type_script_setup_true_lang-CXxwHtxF.js → tooltip.vue_vue_type_script_setup_true_lang-kslDnoRH.js} +5 -5
  42. package/dist/types/components/combobox/combobox.vue.d.ts +8 -6
  43. package/dist/types/components/combobox/comboboxHiddenInput.vue.d.ts +2 -1
  44. package/dist/types/components/combobox/comboboxInput.vue.d.ts +4 -3
  45. package/dist/types/components/combobox/comboboxOption.vue.d.ts +3 -2
  46. package/dist/types/components/combobox/comboboxOptions.vue.d.ts +3 -2
  47. package/dist/types/components/listbox/listbox.vue.d.ts +5 -3
  48. package/dist/types/components/listbox/listboxOption.vue.d.ts +3 -2
  49. package/dist/types/components/menu/menu.vue.d.ts +5 -3
  50. package/dist/types/components/menu/menuItem.vue.d.ts +3 -2
  51. package/dist/types/components/menu/menuItems.vue.d.ts +3 -2
  52. package/dist/types/components/popover/popover.vue.d.ts +3 -2
  53. package/dist/types/components/popover/popoverDialog.vue.d.ts +3 -2
  54. package/dist/types/components/tabs/tab.vue.d.ts +3 -2
  55. package/dist/types/components/tabs/tabContainer.vue.d.ts +5 -4
  56. package/dist/types/components/tabs/tabList.vue.d.ts +3 -2
  57. package/dist/types/components/tabs/tabPanel.vue.d.ts +3 -2
  58. package/dist/types/components/tooltip.vue.d.ts +5 -4
  59. package/dist/types/main.d.ts +1 -1
  60. package/package.json +5 -5
  61. package/dist/comboboxOptions.vue_vue_type_script_setup_true_lang-DLv4KjF8.js +0 -20
  62. package/dist/popoverDialog.vue_vue_type_script_setup_true_lang-C2z6To-6.js +0 -33
@@ -1,144 +1,102 @@
1
- import { shallowRef as N, ref as R, computed as g, provide as B, readonly as h, shallowReadonly as J, triggerRef as S, unref as s } from "vue";
2
- import { useHTMLElement as _ } from "./composable-ui24.js";
3
- const q = Symbol();
4
- function d(r, c) {
5
- const [n, l] = [s(r), s(c)];
6
- return typeof n == "object" ? typeof l == "object" ? JSON.stringify(n) === JSON.stringify(l) : !1 : n === l;
7
- }
8
- function P(r) {
9
- let c = 0;
10
- const n = N([]), l = R(), v = g(() => Array.isArray(r.value));
11
- function o(e) {
12
- const t = n.value.find((i) => i.id === e);
13
- if (!t) throw new Error(`Item not found: (${e})`);
14
- return t;
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 L(e) {
66
- try {
67
- const t = o(e);
68
- return y(t);
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 j({ focus: e = !1 } = {}) {
74
- for (let t of n.value)
75
- if (y(t))
76
- return f(t, { focus: e });
21
+ function B({ focus: e = !0 } = {}) {
22
+ s.value = !0, e && P(() => {
23
+ $().focus();
24
+ });
77
25
  }
78
- function p({ focus: e = !1 } = {}) {
79
- if (n.value.length)
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 x({ focus: e = !1 } = {}) {
83
- if (n.value.length)
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 E({
87
- focus: e = !1,
88
- loop: t = !1
89
- } = {}) {
90
- if (l.value === void 0) return p({ focus: e });
91
- const i = o(l.value), a = n.value.indexOf(i);
92
- let u;
93
- if (a + 1 < n.value.length)
94
- u = n.value[a + 1];
95
- else if (t)
96
- u = n.value[0];
97
- else
98
- return;
99
- return f(u, { focus: e });
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 M({
102
- focus: e = !1,
103
- loop: t = !1
104
- } = {}) {
105
- if (l.value === void 0) return x({ focus: e });
106
- const i = o(l.value), a = n.value.indexOf(i);
107
- let u;
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
- return B(q, {
117
- value: h(r),
118
- selectItem: I,
119
- activateItem: O,
120
- deactivateItem: () => f(),
121
- isSelected: L,
122
- isActive: m,
123
- addItem: w,
124
- removeItem: A
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
- items: J(n),
127
- isMultiselectable: h(v),
128
- activeItem: g(
129
- () => l.value !== void 0 ? o(l.value) : void 0
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
- q as injectList,
143
- P as useList
101
+ G as usePopover
144
102
  };
@@ -1,7 +1,30 @@
1
- const o = Symbol(), n = Symbol(), t = Symbol(), c = Symbol();
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
- c as injectCombobox,
4
- t as injectMenu,
5
- n as injectPopover,
6
- o as injectTabs
29
+ h as useValidation
7
30
  };
@@ -1,55 +1,4 @@
1
- import { ref as t, onMounted as V, onBeforeUnmount as M, readonly as m, unref as g } from "vue";
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
- k as useFormControl
3
+ f as default
55
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./tooltip.vue_vue_type_script_setup_true_lang-CXxwHtxF.js";
1
+ import { _ as f } from "./comboboxInput.vue_vue_type_script_setup_true_lang-Be5FBBbM.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./tabPanel.vue_vue_type_script_setup_true_lang-DZfMk_Sn.js";
1
+ import { _ as f } from "./comboboxOption.vue_vue_type_script_setup_true_lang-DmF_EaqI.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./tabList.vue_vue_type_script_setup_true_lang-DLoNOwJ7.js";
1
+ import { _ as f } from "./comboboxOptions.vue_vue_type_script_setup_true_lang-DN0tz5dv.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./tabContainer.vue_vue_type_script_setup_true_lang-YfrBXoWm.js";
1
+ import { _ as f } from "./listbox.vue_vue_type_script_setup_true_lang-OvzuliPQ.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./tab.vue_vue_type_script_setup_true_lang-BSckMUwj.js";
1
+ import { _ as f } from "./listboxOption.vue_vue_type_script_setup_true_lang-BhQm7GxW.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./popoverDialog.vue_vue_type_script_setup_true_lang-C2z6To-6.js";
1
+ import { _ as f } from "./menu.vue_vue_type_script_setup_true_lang-B0Jm9v_v.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as m, mergeModels as p, useModel as v, computed as b, createElementBlock as k, openBlock as w, unref as I, renderSlot as h } from "vue";
2
- import { useList as x } from "./composable-ui23.js";
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__ */ p({
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 = v(i, "modelValue"), {
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 = b(() => s.value?.element.value?.id);
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) => (w(), k("div", {
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": I(t),
59
+ "aria-multiselectable": w(t),
60
60
  role: "listbox",
61
61
  tabindex: "0"
62
62
  }, [
63
- h(a.$slots, "default")
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, createElementBlock as f, openBlock as b, unref as e, renderSlot as v } from "vue";
2
- import { useListOption as _ } from "./composable-ui18.js";
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) => (b(), f("div", {
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, mergeModels as M, useId as u, useModel as O, computed as m, provide as A, renderSlot as _, unref as h, nextTick as r } from "vue";
2
- import { usePopover as C } from "./composable-ui22.js";
3
- import { useList as D } from "./composable-ui23.js";
4
- import { injectMenu as V } from "./composable-ui25.js";
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__ */ M({
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 = O(s, "modelValue"), {
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 A(V, {
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, $) => _(o.$slots, "default", {
74
+ }), (o, $) => A(o.$slots, "default", {
75
75
  attrs: x.value,
76
- isOpen: h(t)
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, createElementBlock as j, openBlock as A, unref as t, renderSlot as B } from "vue";
2
- import { useListOption as I } from "./composable-ui18.js";
3
- import { injectMenu as $ } from "./composable-ui25.js";
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) => (A(), j("div", {
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, createElementBlock as c, createCommentVNode as s, unref as a, openBlock as i, renderSlot as u } from "vue";
2
- import { injectMenu as l } from "./composable-ui25.js";
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 ? (i(), c("div", {
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
- u(t.$slots, "default")
44
- ], 40, d)) : s("", !0);
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-ui22.js";
3
- import { injectPopover as g } from "./composable-ui25.js";
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, createElementBlock as f, openBlock as m, unref as e, renderSlot as _ } from "vue";
2
- import { useListOption as k } from "./composable-ui18.js";
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) => (m(), f("button", {
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, createElementBlock as f, openBlock as I, renderSlot as _ } from "vue";
2
- import { useList as b } from "./composable-ui23.js";
3
- import { injectTabs as g } from "./composable-ui25.js";
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) => (I(), f("div", null, [
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, createElementBlock as c, openBlock as s, renderSlot as u } from "vue";
2
- import { injectTabs as l } from "./composable-ui25.js";
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) => (s(), c("div", {
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, createElementBlock as b, openBlock as u, unref as r, renderSlot as m, vShow as v } from "vue";
2
- import { injectList as f } from "./composable-ui23.js";
3
- import { injectTabs as _ } from "./composable-ui25.js";
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((u(), b("div", {
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",