x-next 1.2.0 → 1.3.1

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 (35) hide show
  1. package/AI_USAGE.md +647 -0
  2. package/CHANGELOG.md +22 -0
  3. package/README.md +8 -0
  4. package/dist/components/dropdown/Dropdown.vue.d.ts +27 -1
  5. package/dist/components/dropdown/DropdownButton.vue.d.ts +27 -1
  6. package/dist/components/dropdown/DropdownOption.vue.d.ts +2 -0
  7. package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +158 -1
  8. package/dist/components/dropdown/context.d.ts +14 -1
  9. package/dist/components/dropdown/dropdown-panel.vue.d.ts +7 -1
  10. package/dist/components/dropdown/index.d.ts +588 -6
  11. package/dist/components/dropdown/use-keyboard.d.ts +10 -0
  12. package/dist/components/form-select/hooks/use-select.d.ts +2 -1
  13. package/dist/es/_hooks/use-overflow.js +45 -40
  14. package/dist/es/components/_components/select-view/select-view.js +49 -55
  15. package/dist/es/components/dialog/Dialog.js +106 -97
  16. package/dist/es/components/dropdown/Dropdown.vue.js +18 -15
  17. package/dist/es/components/dropdown/Dropdown.vue2.js +52 -31
  18. package/dist/es/components/dropdown/DropdownOption.vue.js +22 -21
  19. package/dist/es/components/dropdown/DropdownOption.vue2.js +23 -19
  20. package/dist/es/components/dropdown/DropdownSubmenu.vue.js +49 -36
  21. package/dist/es/components/dropdown/DropdownSubmenu.vue2.js +45 -24
  22. package/dist/es/components/dropdown/context.js +3 -2
  23. package/dist/es/components/dropdown/dropdown-panel.vue.js +24 -21
  24. package/dist/es/components/dropdown/dropdown-panel.vue2.js +83 -31
  25. package/dist/es/components/dropdown/use-keyboard.js +45 -0
  26. package/dist/es/components/form-checkbox/Checkbox.js +49 -49
  27. package/dist/es/components/form-select/Select.js +25 -24
  28. package/dist/es/components/form-select/hooks/use-select.js +128 -128
  29. package/dist/es/style.css +1 -1
  30. package/dist/index.cjs +4 -4
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.umd.js +4 -4
  33. package/dist/style/base.css +1 -1
  34. package/dist/style.css +1 -1
  35. package/package.json +9 -3
@@ -1,9 +1,9 @@
1
- import r from "./Dropdown.vue2.js";
2
- import { resolveComponent as t, openBlock as s, createBlock as a, withCtx as e, renderSlot as n, createVNode as l, createSlots as m } from "vue";
1
+ import l from "./Dropdown.vue2.js";
2
+ import { resolveComponent as n, openBlock as a, createBlock as d, withCtx as e, createVNode as i, createSlots as m, renderSlot as t } from "vue";
3
3
  import f from "../../_virtual/_plugin-vue_export-helper.js";
4
- function d(o, g, u, c, h, $) {
5
- const i = t("DropdownPanel"), p = t("Trigger");
6
- return s(), a(p, {
4
+ function g(o, u, c, h, b, y) {
5
+ const p = n("RenderFunction"), r = n("DropdownPanel"), s = n("Trigger");
6
+ return a(), d(s, {
7
7
  "popup-visible": o.computedPopupVisible,
8
8
  "animation-name": "x-slide-dynamic-origin",
9
9
  "auto-fit-transform-origin": "",
@@ -13,10 +13,13 @@ function d(o, g, u, c, h, $) {
13
13
  "popup-offset": 4,
14
14
  "popup-container": o.popupContainer,
15
15
  "opened-class": o.className.modifier("open"),
16
- onPopupVisibleChange: o.handlePopupVisibleChange
16
+ onPopupVisibleChange: o.handlePopupVisibleChange,
17
+ onShow: o.handleShow
17
18
  }, {
18
19
  content: e(() => [
19
- l(i, {
20
+ i(r, {
21
+ ref: "panelRef",
22
+ onClose: o.handleClose,
20
23
  loading: o.loading,
21
24
  "is-empty": o.isEmpty,
22
25
  "bottom-offset": o.bottomOffset,
@@ -24,33 +27,33 @@ function d(o, g, u, c, h, $) {
24
27
  onReachBottom: o.handleReachBottom
25
28
  }, m({
26
29
  default: e(() => [
27
- n(o.$slots, "content")
30
+ t(o.$slots, "content")
28
31
  ]),
29
32
  _: 2
30
33
  }, [
31
34
  o.$slots.empty ? {
32
35
  name: "empty",
33
36
  fn: e(() => [
34
- n(o.$slots, "empty")
37
+ t(o.$slots, "empty")
35
38
  ]),
36
39
  key: "0"
37
40
  } : void 0,
38
41
  o.$slots.footer ? {
39
42
  name: "footer",
40
43
  fn: e(() => [
41
- n(o.$slots, "footer")
44
+ t(o.$slots, "footer")
42
45
  ]),
43
46
  key: "1"
44
47
  } : void 0
45
- ]), 1032, ["loading", "is-empty", "bottom-offset", "onScroll", "onReachBottom"])
48
+ ]), 1032, ["onClose", "loading", "is-empty", "bottom-offset", "onScroll", "onReachBottom"])
46
49
  ]),
47
50
  default: e(() => [
48
- n(o.$slots, "default")
51
+ i(p, { "render-func": o.renderTrigger }, null, 8, ["render-func"])
49
52
  ]),
50
53
  _: 3
51
- }, 8, ["popup-visible", "trigger", "position", "align-point", "popup-container", "opened-class", "onPopupVisibleChange"]);
54
+ }, 8, ["popup-visible", "trigger", "position", "align-point", "popup-container", "opened-class", "onPopupVisibleChange", "onShow"]);
52
55
  }
53
- const C = /* @__PURE__ */ f(r, [["render", d]]);
56
+ const w = /* @__PURE__ */ f(l, [["render", g]]);
54
57
  export {
55
- C as default
58
+ w as default
56
59
  };
@@ -1,14 +1,19 @@
1
- import { defineComponent as c, toRefs as m, provide as g, reactive as b } from "vue";
2
- import { Trigger as y } from "../trigger/index.js";
3
- import h from "./dropdown-panel.vue.js";
4
- import { useTrigger as B } from "../../_hooks/use-trigger.js";
5
- import { dropdownInjectionKey as v } from "./context.js";
6
- import { getClassNameMixin as V } from "../../_utils/config.js";
7
- const N = c({
1
+ import { defineComponent as v, toRefs as B, provide as C, reactive as w } from "vue";
2
+ import { Trigger as V } from "../trigger/index.js";
3
+ import F from "./dropdown-panel.vue.js";
4
+ import { useTrigger as S } from "../../_hooks/use-trigger.js";
5
+ import { dropdownInjectionKey as O } from "./context.js";
6
+ import { getClassNameMixin as P } from "../../_utils/config.js";
7
+ import T from "../../_container/render-function.js";
8
+ import { useFirstElement as k } from "../../_hooks/use-first-element.js";
9
+ import { mergeFirstChild as K } from "../../_utils/vue-eco.js";
10
+ import { useDropdownKeyboard as x } from "./use-keyboard.js";
11
+ const q = v({
8
12
  name: "Dropdown",
9
13
  components: {
10
- Trigger: y,
11
- DropdownPanel: h
14
+ Trigger: V,
15
+ DropdownPanel: F,
16
+ RenderFunction: T
12
17
  },
13
18
  props: {
14
19
  /**
@@ -113,7 +118,7 @@ const N = c({
113
118
  * @param {string | number | Record<string, any> | undefined } value
114
119
  * @param {Event} ev
115
120
  */
116
- select: (e, o) => !0,
121
+ select: (e, t) => !0,
117
122
  /**
118
123
  * @zh 下拉菜单滚动时触发
119
124
  * @en Triggered when the dropdown scrolls
@@ -143,33 +148,49 @@ const N = c({
143
148
  * @en Empty content
144
149
  * @slot empty
145
150
  */
146
- setup(e, { emit: o }) {
147
- const { defaultPopupVisible: l, popupVisible: i, popupMaxHeight: a } = m(e), n = V("dropdown"), { computedPopupVisible: r, handlePopupVisibleChange: p } = B({
148
- defaultPopupVisible: l,
149
- popupVisible: i,
150
- emit: o
151
- }), s = (t, f) => {
152
- o("select", t, f), e.hideOnSelect && p(!1);
153
- }, u = (t) => {
154
- o("scroll", t);
155
- }, d = (t) => {
156
- o("reachBottom", t);
151
+ setup(e, { emit: t, slots: n }) {
152
+ const { defaultPopupVisible: d, popupVisible: s, popupMaxHeight: c } = B(e), f = P("dropdown"), { computedPopupVisible: a, handlePopupVisibleChange: p } = S({
153
+ defaultPopupVisible: d,
154
+ popupVisible: s,
155
+ emit: t
156
+ }), { children: l, firstElement: m } = k(), r = x(
157
+ a,
158
+ p,
159
+ m
160
+ ), g = (o) => {
161
+ var i;
162
+ return l.value = ((i = n.default) == null ? void 0 : i.call(n)) ?? [], K(l.value, {
163
+ ...o,
164
+ onKeydown: (u) => {
165
+ u.key !== "ArrowRight" && r.handleTriggerKeydown(u);
166
+ },
167
+ onFocusinCapture: r.handleTriggerFocus,
168
+ onFocusoutCapture: r.handleTriggerFocus
169
+ }), l.value;
170
+ }, h = (o, i) => {
171
+ t("select", o, i), e.hideOnSelect && (r.handleKeyboardSelect(i), p(!1));
172
+ }, y = (o) => {
173
+ t("scroll", o);
174
+ }, b = (o) => {
175
+ t("reachBottom", o);
157
176
  };
158
- return g(
159
- v,
160
- b({
161
- popupMaxHeight: a,
162
- onOptionClick: s
177
+ return C(
178
+ O,
179
+ w({
180
+ popupMaxHeight: c,
181
+ onOptionClick: h
163
182
  })
164
183
  ), {
165
- className: n,
166
- computedPopupVisible: r,
184
+ ...r,
185
+ renderTrigger: g,
186
+ className: f,
187
+ computedPopupVisible: a,
167
188
  handlePopupVisibleChange: p,
168
- handleScroll: u,
169
- handleReachBottom: d
189
+ handleScroll: y,
190
+ handleReachBottom: b
170
191
  };
171
192
  }
172
193
  });
173
194
  export {
174
- N as default
195
+ q as default
175
196
  };
@@ -1,37 +1,38 @@
1
- import d from "./DropdownOption.vue2.js";
2
- import { openBlock as n, createElementBlock as a, normalizeClass as o, renderSlot as i, createCommentVNode as r, createElementVNode as t } from "vue";
3
- import f from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = ["aria-disabled", "tabindex"];
5
- function p(e, s, u, $, k, b) {
6
- return n(), a("li", {
1
+ import r from "./DropdownOption.vue2.js";
2
+ import { openBlock as l, createElementBlock as a, normalizeClass as n, renderSlot as i, createCommentVNode as d, createElementVNode as f } from "vue";
3
+ import m from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const t = ["aria-disabled", "tabindex"];
5
+ function u(e, s, p, $, k, b) {
6
+ return l(), a("li", {
7
7
  ref: "liRef",
8
- class: o([e.cls, { [e.className.modifier("has-suffix")]: !!e.$slots.suffix }]),
8
+ class: n([e.cls, { [e.className.modifier("has-suffix")]: !!e.$slots.suffix }]),
9
9
  role: "menuitem",
10
10
  "aria-disabled": e.disabled,
11
- tabindex: e.disabled ? -1 : 0,
12
- onClick: s[0] || (s[0] = (...l) => e.handleClick && e.handleClick(...l)),
13
- onKeydown: s[1] || (s[1] = (...l) => e.handleKeydown && e.handleKeydown(...l))
11
+ tabindex: e.tabIndex,
12
+ onFocus: s[0] || (s[0] = (...o) => e.handleFocus && e.handleFocus(...o)),
13
+ onClick: s[1] || (s[1] = (...o) => e.handleClick && e.handleClick(...o)),
14
+ onKeydown: s[2] || (s[2] = (...o) => e.handleKeydown && e.handleKeydown(...o))
14
15
  }, [
15
- e.$slots.icon ? (n(), a("span", {
16
+ e.$slots.icon ? (l(), a("span", {
16
17
  key: 0,
17
- class: o(e.className.element("icon"))
18
+ class: n(e.className.element("icon"))
18
19
  }, [
19
20
  i(e.$slots, "icon")
20
- ], 2)) : r("", !0),
21
- t("span", {
22
- class: o(e.className.element("content"))
21
+ ], 2)) : d("", !0),
22
+ f("span", {
23
+ class: n(e.className.element("content"))
23
24
  }, [
24
25
  i(e.$slots, "default")
25
26
  ], 2),
26
- e.$slots.suffix ? (n(), a("span", {
27
+ e.$slots.suffix ? (l(), a("span", {
27
28
  key: 1,
28
- class: o(e.className.element("suffix"))
29
+ class: n(e.className.element("suffix"))
29
30
  }, [
30
31
  i(e.$slots, "suffix")
31
- ], 2)) : r("", !0)
32
- ], 42, m);
32
+ ], 2)) : d("", !0)
33
+ ], 42, t);
33
34
  }
34
- const C = /* @__PURE__ */ f(d, [["render", p]]);
35
+ const w = /* @__PURE__ */ m(r, [["render", u]]);
35
36
  export {
36
- C as default
37
+ w as default
37
38
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as r, ref as u, computed as c, inject as f } from "vue";
2
- import { dropdownInjectionKey as b } from "./context.js";
3
- import { getClassNameMixin as p } from "../../_utils/config.js";
4
- const C = r({
1
+ import { defineComponent as y, ref as j, computed as a, inject as m, onBeforeUnmount as p } from "vue";
2
+ import { dropdownInjectionKey as I, dropdownMenuInjectionKey as g } from "./context.js";
3
+ import { getClassNameMixin as w } from "../../_utils/config.js";
4
+ const K = y({
5
5
  name: "DropdownOption",
6
6
  props: {
7
7
  /**
@@ -36,30 +36,34 @@ const C = r({
36
36
  * @en Icon
37
37
  * @slot icon
38
38
  */
39
- setup(t, { emit: l }) {
40
- const n = p("dropdown--option"), i = u(), d = c(() => {
39
+ setup(t, { emit: r }) {
40
+ const o = w("dropdown--option"), i = j(), u = a(() => {
41
41
  var e;
42
42
  return t.value ?? ((e = i.value) == null ? void 0 : e.textContent) ?? void 0;
43
- }), o = t.uninjectContext ? void 0 : f(b, void 0), a = (e) => {
44
- t.disabled || (l("click", e), o == null || o.onOptionClick(d.value, e));
45
- }, s = (e) => {
46
- t.disabled || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), a(e));
47
- }, m = c(() => [
48
- n.block,
43
+ }), d = t.uninjectContext ? void 0 : m(I, void 0), n = m(g, void 0), c = { element: i, disabled: a(() => t.disabled) }, l = n == null ? void 0 : n.registerItem(c);
44
+ p(() => l == null ? void 0 : l());
45
+ const f = a(() => t.disabled ? -1 : !n || n.activeItem.value === c ? 0 : -1), b = () => n == null ? void 0 : n.setActiveItem(c), s = (e) => {
46
+ t.disabled || (r("click", e), d == null || d.onOptionClick(u.value, e));
47
+ }, v = (e) => {
48
+ t.disabled || e.defaultPrevented || e.isComposing || e.target !== i.value || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), s(e));
49
+ }, k = a(() => [
50
+ o.block,
49
51
  {
50
- [n.modifier("disabled")]: t.disabled,
51
- [n.modifier("active")]: t.active
52
+ [o.modifier("disabled")]: t.disabled,
53
+ [o.modifier("active")]: t.active
52
54
  }
53
55
  ]);
54
56
  return {
55
- className: n,
56
- cls: m,
57
+ className: o,
58
+ cls: k,
57
59
  liRef: i,
58
- handleClick: a,
59
- handleKeydown: s
60
+ tabIndex: f,
61
+ handleFocus: b,
62
+ handleClick: s,
63
+ handleKeydown: v
60
64
  };
61
65
  }
62
66
  });
63
67
  export {
64
- C as default
68
+ K as default
65
69
  };
@@ -1,20 +1,24 @@
1
- import d from "./DropdownSubmenu.vue2.js";
2
- import { resolveComponent as s, openBlock as c, createBlock as f, withCtx as e, createVNode as i, mergeProps as u, createSlots as p, renderSlot as n, normalizeClass as m } from "vue";
3
- import g from "../../_virtual/_plugin-vue_export-helper.js";
4
- function b(o, $, h, v, P, _) {
5
- const t = s("IconRight"), r = s("dropdown-option"), l = s("dropdown-panel"), a = s("Trigger");
6
- return c(), f(a, {
1
+ import u from "./DropdownSubmenu.vue2.js";
2
+ import { resolveComponent as s, openBlock as f, createBlock as c, withCtx as e, createVNode as p, mergeProps as g, createSlots as r, renderSlot as n, normalizeClass as m } from "vue";
3
+ import b from "../../_virtual/_plugin-vue_export-helper.js";
4
+ function h(o, C, w, $, P, v) {
5
+ const a = s("IconRight"), t = s("dropdown-option"), l = s("dropdown-panel"), d = s("Trigger");
6
+ return f(), c(d, {
7
7
  "popup-visible": o.computedPopupVisible,
8
8
  trigger: o.trigger,
9
9
  position: o.position,
10
10
  disabled: o.disabled,
11
11
  "popup-offset": 4,
12
- onPopupVisibleChange: o.handlePopupVisibleChange
12
+ onPopupVisibleChange: o.handlePopupVisibleChange,
13
+ onShow: o.handleShow
13
14
  }, {
14
15
  content: e(() => [
15
- i(l, {
16
- class: m(o.className.block)
17
- }, p({
16
+ p(l, {
17
+ ref: "panelRef",
18
+ class: m(o.className.block),
19
+ "close-on-arrow-left": "",
20
+ onClose: o.handleClose
21
+ }, r({
18
22
  default: e(() => [
19
23
  n(o.$slots, "content")
20
24
  ]),
@@ -27,36 +31,45 @@ function b(o, $, h, v, P, _) {
27
31
  ]),
28
32
  key: "0"
29
33
  } : void 0
30
- ]), 1032, ["class"])
34
+ ]), 1032, ["class", "onClose"])
31
35
  ]),
32
- default: e(() => [
33
- i(r, u(o.optionProps, {
34
- active: o.computedPopupVisible,
35
- "uninject-context": ""
36
- }), p({
37
- suffix: e(() => [
38
- n(o.$slots, "suffix", {}, () => [
39
- i(t)
40
- ])
41
- ]),
42
- default: e(() => [
43
- n(o.$slots, "default")
44
- ]),
45
- _: 2
46
- }, [
47
- o.$slots.icon ? {
48
- name: "icon",
49
- fn: e(() => [
50
- n(o.$slots, "icon")
36
+ default: e(() => {
37
+ var i;
38
+ return [
39
+ p(t, g({ ref: "optionRef" }, o.optionProps, {
40
+ disabled: o.disabled || ((i = o.optionProps) == null ? void 0 : i.disabled),
41
+ active: o.computedPopupVisible,
42
+ "uninject-context": "",
43
+ "aria-haspopup": "menu",
44
+ "aria-expanded": o.computedPopupVisible,
45
+ onKeydownCapture: o.handleTriggerKeydown,
46
+ onFocusinCapture: o.handleTriggerFocus,
47
+ onFocusoutCapture: o.handleTriggerFocus
48
+ }), r({
49
+ suffix: e(() => [
50
+ n(o.$slots, "suffix", {}, () => [
51
+ p(a)
52
+ ])
51
53
  ]),
52
- key: "0"
53
- } : void 0
54
- ]), 1040, ["active"])
55
- ]),
54
+ default: e(() => [
55
+ n(o.$slots, "default")
56
+ ]),
57
+ _: 2
58
+ }, [
59
+ o.$slots.icon ? {
60
+ name: "icon",
61
+ fn: e(() => [
62
+ n(o.$slots, "icon")
63
+ ]),
64
+ key: "0"
65
+ } : void 0
66
+ ]), 1040, ["disabled", "active", "aria-expanded", "onKeydownCapture", "onFocusinCapture", "onFocusoutCapture"])
67
+ ];
68
+ }),
56
69
  _: 3
57
- }, 8, ["popup-visible", "trigger", "position", "disabled", "onPopupVisibleChange"]);
70
+ }, 8, ["popup-visible", "trigger", "position", "disabled", "onPopupVisibleChange", "onShow"]);
58
71
  }
59
- const k = /* @__PURE__ */ g(d, [["render", b]]);
72
+ const k = /* @__PURE__ */ b(u, [["render", h]]);
60
73
  export {
61
74
  k as default
62
75
  };
@@ -1,17 +1,18 @@
1
- import { defineComponent as s, toRefs as l } from "vue";
2
- import { Trigger as u } from "../trigger/index.js";
3
- import a from "./dropdown-panel.vue.js";
4
- import m from "./DropdownOption.vue.js";
5
- import d from "../../icons/_self/dropdown/more.js";
6
- import { useTrigger as f } from "../../_hooks/use-trigger.js";
7
- import { getClassNameMixin as b } from "../../_utils/config.js";
8
- const v = s({
1
+ import { defineComponent as u, toRefs as m, ref as f, computed as g } from "vue";
2
+ import { Trigger as b } from "../trigger/index.js";
3
+ import c from "./dropdown-panel.vue.js";
4
+ import y from "./DropdownOption.vue.js";
5
+ import w from "../../icons/_self/dropdown/more.js";
6
+ import { useTrigger as V } from "../../_hooks/use-trigger.js";
7
+ import { getClassNameMixin as P } from "../../_utils/config.js";
8
+ import { useDropdownKeyboard as h } from "./use-keyboard.js";
9
+ const K = u({
9
10
  name: "DropdownSubmenu",
10
11
  components: {
11
- Trigger: u,
12
- DropdownPanel: a,
13
- DropdownOption: m,
14
- IconRight: d
12
+ Trigger: b,
13
+ DropdownPanel: c,
14
+ DropdownOption: y,
15
+ IconRight: w
15
16
  },
16
17
  props: {
17
18
  /**
@@ -77,13 +78,13 @@ const v = s({
77
78
  }
78
79
  },
79
80
  emits: {
80
- "update:popupVisible": (e) => !0,
81
+ "update:popupVisible": (o) => !0,
81
82
  /**
82
83
  * @zh 下拉框显示状态发生改变时触发
83
84
  * @en Triggered when the display status of the drop-down box changes
84
85
  * @property {boolean} visible
85
86
  */
86
- popupVisibleChange: (e) => !0
87
+ popupVisibleChange: (o) => !0
87
88
  },
88
89
  /**
89
90
  * @zh 子菜单内容
@@ -102,19 +103,39 @@ const v = s({
102
103
  * @slot icon
103
104
  * @version 2.29.0
104
105
  */
105
- setup(e, { emit: o }) {
106
- const { defaultPopupVisible: p, popupVisible: t } = l(e), i = b("dropdown--submenu"), { computedPopupVisible: r, handlePopupVisibleChange: n } = f({
107
- defaultPopupVisible: p,
108
- popupVisible: t,
109
- emit: o
110
- });
106
+ setup(o, { emit: n }) {
107
+ const { defaultPopupVisible: l, popupVisible: s } = m(o), a = P("dropdown--submenu"), { computedPopupVisible: t, handlePopupVisibleChange: i } = V({
108
+ defaultPopupVisible: l,
109
+ popupVisible: s,
110
+ emit: n
111
+ }), p = f(), d = g({
112
+ get: () => {
113
+ var e;
114
+ return (e = p.value) == null ? void 0 : e.$el;
115
+ },
116
+ set: () => {
117
+ }
118
+ }), r = h(
119
+ t,
120
+ i,
121
+ d,
122
+ () => {
123
+ var e;
124
+ return o.disabled || !!((e = o.optionProps) != null && e.disabled);
125
+ }
126
+ );
111
127
  return {
112
- className: i,
113
- computedPopupVisible: r,
114
- handlePopupVisibleChange: n
128
+ ...r,
129
+ optionRef: p,
130
+ className: a,
131
+ computedPopupVisible: t,
132
+ handlePopupVisibleChange: i,
133
+ handleTriggerKeydown: (e) => {
134
+ e.key !== "ArrowDown" && e.key !== "ArrowUp" && r.handleTriggerKeydown(e);
135
+ }
115
136
  };
116
137
  }
117
138
  });
118
139
  export {
119
- v as default
140
+ K as default
120
141
  };
@@ -1,4 +1,5 @@
1
- const o = Symbol("ArcoDropdown");
1
+ const o = Symbol("ArcoDropdown"), n = Symbol("DropdownMenu");
2
2
  export {
3
- o as dropdownInjectionKey
3
+ o as dropdownInjectionKey,
4
+ n as dropdownMenuInjectionKey
4
5
  };
@@ -1,49 +1,52 @@
1
1
  import c from "./dropdown-panel.vue2.js";
2
- import { resolveComponent as s, openBlock as o, createElementBlock as a, normalizeClass as l, createBlock as t, renderSlot as n, createVNode as i, normalizeStyle as d, withCtx as f, createElementVNode as y, createCommentVNode as u } from "vue";
3
- import k from "../../_virtual/_plugin-vue_export-helper.js";
4
- function N(e, $, S, g, v, w) {
5
- const r = s("spin"), m = s("empty"), p = s("Scrollbar");
6
- return o(), a("div", {
7
- class: l(e.cls)
2
+ import { resolveComponent as s, openBlock as o, createElementBlock as n, normalizeClass as l, createBlock as t, renderSlot as a, createVNode as y, normalizeStyle as f, withCtx as u, createElementVNode as k, createCommentVNode as N } from "vue";
3
+ import $ from "../../_virtual/_plugin-vue_export-helper.js";
4
+ function w(e, r, S, E, b, g) {
5
+ const m = s("spin"), p = s("empty"), d = s("Scrollbar");
6
+ return o(), n("div", {
7
+ ref: "panelElement",
8
+ class: l(e.cls),
9
+ tabindex: "-1",
10
+ onKeydown: r[0] || (r[0] = (...i) => e.handleKeydown && e.handleKeydown(...i))
8
11
  }, [
9
- e.loading ? (o(), t(r, {
12
+ e.loading ? (o(), t(m, {
10
13
  key: 0,
11
14
  class: l(e.className.element("loading")),
12
15
  display: "block",
13
16
  tip: e.t("common.loading")
14
- }, null, 8, ["class", "tip"])) : e.isEmpty ? (o(), a("div", {
17
+ }, null, 8, ["class", "tip"])) : e.isEmpty ? (o(), n("div", {
15
18
  key: 1,
16
19
  class: l(e.className.element("empty"))
17
20
  }, [
18
- n(e.$slots, "empty", {}, () => [
19
- i(m)
21
+ a(e.$slots, "empty", {}, () => [
22
+ y(p)
20
23
  ])
21
- ], 2)) : (o(), t(p, {
24
+ ], 2)) : (o(), t(d, {
22
25
  key: 2,
23
26
  ref: "wrapperRef",
24
27
  class: l(e.className.element("list--wrapper")),
25
- style: d(e.style),
28
+ style: f(e.style),
26
29
  onScroll: e.handleScroll
27
30
  }, {
28
- default: f(() => [
29
- y("ul", {
31
+ default: u(() => [
32
+ k("ul", {
30
33
  class: l(e.className.element("list")),
31
34
  role: "menu"
32
35
  }, [
33
- n(e.$slots, "default")
36
+ a(e.$slots, "default")
34
37
  ], 2)
35
38
  ]),
36
39
  _: 3
37
40
  }, 8, ["class", "style", "onScroll"])),
38
- e.$slots.footer && !e.loading && !e.isEmpty ? (o(), a("div", {
41
+ e.$slots.footer && !e.loading && !e.isEmpty ? (o(), n("div", {
39
42
  key: 3,
40
43
  class: l(e.className.element("footer"))
41
44
  }, [
42
- n(e.$slots, "footer")
43
- ], 2)) : u("", !0)
44
- ], 2);
45
+ a(e.$slots, "footer")
46
+ ], 2)) : N("", !0)
47
+ ], 34);
45
48
  }
46
- const h = /* @__PURE__ */ k(c, [["render", N]]);
49
+ const B = /* @__PURE__ */ $(c, [["render", w]]);
47
50
  export {
48
- h as default
51
+ B as default
49
52
  };