@manohub/ui 1.2.13 → 1.2.14

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.
@@ -0,0 +1,129 @@
1
+ /**
2
+ * DropdownPanel —— 动作菜单的面板壳(不对外导出)。
3
+ *
4
+ * 只拥有四样东西:**原生 popover 元素**(开合 / Esc / 点外部关闭 / 顶层渲染 / 定位全归浏览器)、
5
+ * **角色**(`menu`)、**开合与键盘 / 焦点回调**、**内容槽**(`Dropdown.Item` / `Dropdown.Separator`)。
6
+ *
7
+ * 组合类名与定位属性都是**操作层的组合**:`class="mh-popup mh-dropdown__panel"`、`popover="auto"`、
8
+ * `data-side` / `data-align`(`popup.css` 的定位档)。面板宽度跟触发器走时由根组件加
9
+ * `.mh-dropdown__panel--match-trigger`(`anchor-size(width)`),本件不写任何尺寸。
10
+ *
11
+ * `panelRef` 是由根组件持有的 ref:根层要用它查可激活项、聚焦、开合与 `focusout` 判定。
12
+ */
13
+ import { type PropType, type Ref, type SlotsType, type VNodeChild } from 'vue';
14
+ import type { DropdownAlign, DropdownSide } from './dropdown-shared';
15
+ export declare const DropdownPanel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
16
+ /** 面板 id(必须与触发器的 `popovertarget` 成对) */
17
+ id: {
18
+ type: StringConstructor;
19
+ required: true;
20
+ };
21
+ /** 面板元素的 ref,由根组件持有 */
22
+ panelRef: {
23
+ type: PropType<Ref<HTMLElement | null>>;
24
+ default: undefined;
25
+ };
26
+ /** 落地侧 */
27
+ side: {
28
+ type: PropType<DropdownSide>;
29
+ default: string;
30
+ };
31
+ /** 两侧对齐;`center` 不写 `data-align`(操作层缺省即中线) */
32
+ align: {
33
+ type: PropType<DropdownAlign>;
34
+ default: string;
35
+ };
36
+ /** 面板最小宽度是否对齐触发器 */
37
+ matchWidth: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ /** 菜单的可访问名;不给则由触发器的 id 反推 `aria-labelledby` */
42
+ ariaLabel: {
43
+ type: StringConstructor;
44
+ default: undefined;
45
+ };
46
+ /** 触发器 id(`aria-labelledby` 的目标) */
47
+ labelledby: {
48
+ type: StringConstructor;
49
+ default: undefined;
50
+ };
51
+ /** 原生 `toggle`(开合真相) */
52
+ onToggle: {
53
+ type: PropType<(event: Event) => void>;
54
+ default: undefined;
55
+ };
56
+ /** 面板上的键盘契约(方向键 / Home / End / Esc / Tab) */
57
+ onKeydown: {
58
+ type: PropType<(event: KeyboardEvent) => void>;
59
+ default: undefined;
60
+ };
61
+ /** 焦点离开面板(Tab / 点外部 / 焦点转移) */
62
+ onFocusout: {
63
+ type: PropType<(event: FocusEvent) => void>;
64
+ default: undefined;
65
+ };
66
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
67
+ /** 面板 id(必须与触发器的 `popovertarget` 成对) */
68
+ id: {
69
+ type: StringConstructor;
70
+ required: true;
71
+ };
72
+ /** 面板元素的 ref,由根组件持有 */
73
+ panelRef: {
74
+ type: PropType<Ref<HTMLElement | null>>;
75
+ default: undefined;
76
+ };
77
+ /** 落地侧 */
78
+ side: {
79
+ type: PropType<DropdownSide>;
80
+ default: string;
81
+ };
82
+ /** 两侧对齐;`center` 不写 `data-align`(操作层缺省即中线) */
83
+ align: {
84
+ type: PropType<DropdownAlign>;
85
+ default: string;
86
+ };
87
+ /** 面板最小宽度是否对齐触发器 */
88
+ matchWidth: {
89
+ type: BooleanConstructor;
90
+ default: boolean;
91
+ };
92
+ /** 菜单的可访问名;不给则由触发器的 id 反推 `aria-labelledby` */
93
+ ariaLabel: {
94
+ type: StringConstructor;
95
+ default: undefined;
96
+ };
97
+ /** 触发器 id(`aria-labelledby` 的目标) */
98
+ labelledby: {
99
+ type: StringConstructor;
100
+ default: undefined;
101
+ };
102
+ /** 原生 `toggle`(开合真相) */
103
+ onToggle: {
104
+ type: PropType<(event: Event) => void>;
105
+ default: undefined;
106
+ };
107
+ /** 面板上的键盘契约(方向键 / Home / End / Esc / Tab) */
108
+ onKeydown: {
109
+ type: PropType<(event: KeyboardEvent) => void>;
110
+ default: undefined;
111
+ };
112
+ /** 焦点离开面板(Tab / 点外部 / 焦点转移) */
113
+ onFocusout: {
114
+ type: PropType<(event: FocusEvent) => void>;
115
+ default: undefined;
116
+ };
117
+ }>> & Readonly<{}>, {
118
+ onFocusout: (event: FocusEvent) => void;
119
+ onKeydown: (event: KeyboardEvent) => void;
120
+ onToggle: (event: Event) => void;
121
+ align: DropdownAlign;
122
+ panelRef: Ref<HTMLElement | null, HTMLElement | null>;
123
+ side: DropdownSide;
124
+ matchWidth: boolean;
125
+ ariaLabel: string;
126
+ labelledby: string;
127
+ }, SlotsType<{
128
+ default?: () => VNodeChild;
129
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,89 @@
1
+ import { defineComponent, createVNode, mergeProps } from "vue";
2
+ const DropdownPanel = /* @__PURE__ */ defineComponent({
3
+ name: "DropdownPanel",
4
+ inheritAttrs: false,
5
+ props: {
6
+ /** 面板 id(必须与触发器的 `popovertarget` 成对) */
7
+ id: {
8
+ type: String,
9
+ required: true
10
+ },
11
+ /** 面板元素的 ref,由根组件持有 */
12
+ panelRef: {
13
+ type: Object,
14
+ default: void 0
15
+ },
16
+ /** 落地侧 */
17
+ side: {
18
+ type: String,
19
+ default: "bottom"
20
+ },
21
+ /** 两侧对齐;`center` 不写 `data-align`(操作层缺省即中线) */
22
+ align: {
23
+ type: String,
24
+ default: "start"
25
+ },
26
+ /** 面板最小宽度是否对齐触发器 */
27
+ matchWidth: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ /** 菜单的可访问名;不给则由触发器的 id 反推 `aria-labelledby` */
32
+ ariaLabel: {
33
+ type: String,
34
+ default: void 0
35
+ },
36
+ /** 触发器 id(`aria-labelledby` 的目标) */
37
+ labelledby: {
38
+ type: String,
39
+ default: void 0
40
+ },
41
+ /** 原生 `toggle`(开合真相) */
42
+ onToggle: {
43
+ type: Function,
44
+ default: void 0
45
+ },
46
+ /** 面板上的键盘契约(方向键 / Home / End / Esc / Tab) */
47
+ onKeydown: {
48
+ type: Function,
49
+ default: void 0
50
+ },
51
+ /** 焦点离开面板(Tab / 点外部 / 焦点转移) */
52
+ onFocusout: {
53
+ type: Function,
54
+ default: void 0
55
+ }
56
+ },
57
+ slots: Object,
58
+ setup(props, {
59
+ slots
60
+ }) {
61
+ return () => createVNode("div", mergeProps({
62
+ "ref": props.panelRef,
63
+ "id": props.id
64
+ }, {
65
+ popover: "auto"
66
+ }, {
67
+ "class": [
68
+ "mh-popup",
69
+ "mh-dropdown__panel",
70
+ /* 显式锚:受控 / 键盘(`showPopover()`)打开时没有隐式锚,必须由触发器上的
71
+ `.mh-popup-anchor` 提供锚点名,否则面板会落到视口左上角(实测) */
72
+ "mh-popup--anchored",
73
+ props.matchWidth ? "mh-dropdown__panel--match-trigger" : ""
74
+ ].filter(Boolean).join(" "),
75
+ "data-side": props.side,
76
+ "data-align": props.align === "center" ? void 0 : props.align,
77
+ "role": "menu",
78
+ "tabindex": -1,
79
+ "aria-label": props.ariaLabel,
80
+ "aria-labelledby": props.ariaLabel ? void 0 : props.labelledby,
81
+ "onToggle": props.onToggle,
82
+ "onKeydown": props.onKeydown,
83
+ "onFocusout": props.onFocusout
84
+ }), [slots.default?.()]);
85
+ }
86
+ });
87
+ export {
88
+ DropdownPanel
89
+ };
@@ -0,0 +1 @@
1
+ export declare const DropdownSeparator: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,17 @@
1
+ import { defineComponent, createVNode, mergeProps } from "vue";
2
+ const DropdownSeparator = /* @__PURE__ */ defineComponent({
3
+ name: "DropdownSeparator",
4
+ inheritAttrs: false,
5
+ setup(_props, {
6
+ attrs
7
+ }) {
8
+ return () => createVNode("div", mergeProps(attrs, {
9
+ "role": "separator",
10
+ "class": ["mh-dropdown__separator", attrs.class].filter(Boolean).join(" "),
11
+ "style": attrs.style
12
+ }), null);
13
+ }
14
+ });
15
+ export {
16
+ DropdownSeparator
17
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Dropdown 的族内契约:方向 / 对齐词表、项 props 类型、provide/inject 上下文与面板 id。
3
+ *
4
+ * 叶子模块(不 import 同目录其它文件),供根组件 / 面板壳 / 菜单项三件共用;内件一律不对外平级导出
5
+ * (`src/index.ts` 只出 `Dropdown` 与相关类型,`Dropdown.Item` / `Dropdown.Separator` 走点号)。
6
+ */
7
+ import type { IconName } from '@manohub/icon';
8
+ import type { InjectionKey, Ref } from 'vue';
9
+ export type DropdownSide = 'top' | 'bottom' | 'left' | 'right';
10
+ export type DropdownAlign = 'start' | 'center' | 'end';
11
+ /** 根部 `close()` 的来因:只有选中 / Esc 回焦,点外部与 Tab 不回焦 */
12
+ export type DropdownCloseReason = 'select' | 'escape' | 'outside' | 'tab';
13
+ /** `Dropdown.Item` 的公开 props(文档页与 `src/index.ts` 的 `DropdownItemProps` 同一份) */
14
+ export interface DropdownItemProps {
15
+ /** 文案;给了默认插槽时以插槽为准 */
16
+ label?: string;
17
+ /** 前置图标(`@manohub/icon` 的闭合枚举) */
18
+ icon?: IconName;
19
+ /** 不可点、键盘跳过、`aria-disabled="true"` */
20
+ disabled?: boolean;
21
+ /** 危险色(删除 / 停用一类动作) */
22
+ danger?: boolean;
23
+ /** 右侧快捷键提示(纯展示;`#trailing` 优先) */
24
+ shortcut?: string;
25
+ }
26
+ /** 项与根部之间的注入契约(项只做「选中 + 收起」,开合真相仍在根部) */
27
+ export interface DropdownContext {
28
+ close: (reason: DropdownCloseReason) => void;
29
+ closeOnSelect: Ref<boolean>;
30
+ disabled: Ref<boolean>;
31
+ }
32
+ export declare const DROPDOWN_CONTEXT: InjectionKey<DropdownContext>;
33
+ export declare const createDropdownPanelId: () => string;
@@ -0,0 +1,8 @@
1
+ import { createPanelId } from "../../utils/popover.js";
2
+ const DROPDOWN_CONTEXT = /* @__PURE__ */ Symbol("mh-dropdown");
3
+ const PANEL_ID_PREFIX = "mh-dropdown-";
4
+ const createDropdownPanelId = () => createPanelId(PANEL_ID_PREFIX);
5
+ export {
6
+ DROPDOWN_CONTEXT,
7
+ createDropdownPanelId
8
+ };
@@ -0,0 +1,372 @@
1
+ import { type ExtractPropTypes, type PropType, type SlotsType, type VNodeChild } from 'vue';
2
+ import { type ButtonVariant } from '../button';
3
+ import type { ControlSize } from '../control-size';
4
+ import { type DropdownAlign, type DropdownSide } from './dropdown-shared';
5
+ declare const dropdownProps: {
6
+ /** 受控开合;给了就是受控(必须接 `update:open` / `v-model:open`) */
7
+ readonly open: {
8
+ readonly type: PropType<boolean | undefined>;
9
+ readonly default: undefined;
10
+ };
11
+ /** 非受控初始开合 */
12
+ readonly defaultOpen: {
13
+ readonly type: BooleanConstructor;
14
+ readonly default: false;
15
+ };
16
+ /** 内建触发器文案(给 `#trigger` 时不生效) */
17
+ readonly label: {
18
+ readonly type: StringConstructor;
19
+ readonly default: "更多";
20
+ };
21
+ /** 内建触发器的按钮型 */
22
+ readonly variant: {
23
+ readonly type: PropType<ButtonVariant>;
24
+ readonly default: "secondary";
25
+ };
26
+ /** 内建触发器尺寸 + 菜单项密度(`sm` 24 / `md` 32 / `lg` 40) */
27
+ readonly size: {
28
+ readonly type: PropType<ControlSize>;
29
+ readonly default: "md";
30
+ };
31
+ /** 整个菜单禁用(触发器不可开、菜单项不响应) */
32
+ readonly disabled: {
33
+ readonly type: BooleanConstructor;
34
+ readonly default: false;
35
+ };
36
+ /** 面板落在锚点哪一侧 */
37
+ readonly side: {
38
+ readonly type: PropType<DropdownSide>;
39
+ readonly default: "bottom";
40
+ };
41
+ /** 两侧对齐;`center` 不写 `data-align` */
42
+ readonly align: {
43
+ readonly type: PropType<DropdownAlign>;
44
+ readonly default: "start";
45
+ };
46
+ /** 面板最小宽度是否对齐触发器 */
47
+ readonly matchWidth: {
48
+ readonly type: BooleanConstructor;
49
+ readonly default: false;
50
+ };
51
+ /** 选中后是否收起 */
52
+ readonly closeOnSelect: {
53
+ readonly type: BooleanConstructor;
54
+ readonly default: true;
55
+ };
56
+ /** 菜单的可访问名;不给则由触发器的 id 反推 `aria-labelledby` */
57
+ readonly ariaLabel: {
58
+ readonly type: StringConstructor;
59
+ readonly default: undefined;
60
+ };
61
+ };
62
+ export type DropdownProps = ExtractPropTypes<typeof dropdownProps>;
63
+ /**
64
+ * `Dropdown` 的复合导出:`Dropdown.Item` / `Dropdown.Separator` 走点号,**不平级导出**
65
+ * (与 `Button.Group` / `Button.Divider` 同款)。
66
+ */
67
+ export declare const Dropdown: {
68
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes<{
69
+ /** 受控开合;给了就是受控(必须接 `update:open` / `v-model:open`) */
70
+ readonly open: {
71
+ readonly type: PropType<boolean | undefined>;
72
+ readonly default: undefined;
73
+ };
74
+ /** 非受控初始开合 */
75
+ readonly defaultOpen: {
76
+ readonly type: BooleanConstructor;
77
+ readonly default: false;
78
+ };
79
+ /** 内建触发器文案(给 `#trigger` 时不生效) */
80
+ readonly label: {
81
+ readonly type: StringConstructor;
82
+ readonly default: "更多";
83
+ };
84
+ /** 内建触发器的按钮型 */
85
+ readonly variant: {
86
+ readonly type: PropType<ButtonVariant>;
87
+ readonly default: "secondary";
88
+ };
89
+ /** 内建触发器尺寸 + 菜单项密度(`sm` 24 / `md` 32 / `lg` 40) */
90
+ readonly size: {
91
+ readonly type: PropType<ControlSize>;
92
+ readonly default: "md";
93
+ };
94
+ /** 整个菜单禁用(触发器不可开、菜单项不响应) */
95
+ readonly disabled: {
96
+ readonly type: BooleanConstructor;
97
+ readonly default: false;
98
+ };
99
+ /** 面板落在锚点哪一侧 */
100
+ readonly side: {
101
+ readonly type: PropType<DropdownSide>;
102
+ readonly default: "bottom";
103
+ };
104
+ /** 两侧对齐;`center` 不写 `data-align` */
105
+ readonly align: {
106
+ readonly type: PropType<DropdownAlign>;
107
+ readonly default: "start";
108
+ };
109
+ /** 面板最小宽度是否对齐触发器 */
110
+ readonly matchWidth: {
111
+ readonly type: BooleanConstructor;
112
+ readonly default: false;
113
+ };
114
+ /** 选中后是否收起 */
115
+ readonly closeOnSelect: {
116
+ readonly type: BooleanConstructor;
117
+ readonly default: true;
118
+ };
119
+ /** 菜单的可访问名;不给则由触发器的 id 反推 `aria-labelledby` */
120
+ readonly ariaLabel: {
121
+ readonly type: StringConstructor;
122
+ readonly default: undefined;
123
+ };
124
+ }>> & Readonly<{
125
+ "onUpdate:open"?: ((_open: boolean) => any) | undefined;
126
+ onOpenChange?: ((_open: boolean) => any) | undefined;
127
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
128
+ 'update:open': (_open: boolean) => true;
129
+ openChange: (_open: boolean) => true;
130
+ }, import("vue").PublicProps, {
131
+ readonly size: ControlSize;
132
+ readonly open: boolean | undefined;
133
+ readonly disabled: boolean;
134
+ readonly label: string;
135
+ readonly variant: ButtonVariant;
136
+ readonly defaultOpen: boolean;
137
+ readonly align: DropdownAlign;
138
+ readonly side: DropdownSide;
139
+ readonly matchWidth: boolean;
140
+ readonly ariaLabel: string;
141
+ readonly closeOnSelect: boolean;
142
+ }, true, {}, SlotsType<{
143
+ trigger?: (scope: {
144
+ triggerProps: Record<string, unknown>;
145
+ open: boolean;
146
+ panelId: string;
147
+ }) => VNodeChild;
148
+ default?: () => VNodeChild;
149
+ }>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
150
+ P: {};
151
+ B: {};
152
+ D: {};
153
+ C: {};
154
+ M: {};
155
+ Defaults: {};
156
+ }, Readonly<ExtractPropTypes<{
157
+ /** 受控开合;给了就是受控(必须接 `update:open` / `v-model:open`) */
158
+ readonly open: {
159
+ readonly type: PropType<boolean | undefined>;
160
+ readonly default: undefined;
161
+ };
162
+ /** 非受控初始开合 */
163
+ readonly defaultOpen: {
164
+ readonly type: BooleanConstructor;
165
+ readonly default: false;
166
+ };
167
+ /** 内建触发器文案(给 `#trigger` 时不生效) */
168
+ readonly label: {
169
+ readonly type: StringConstructor;
170
+ readonly default: "更多";
171
+ };
172
+ /** 内建触发器的按钮型 */
173
+ readonly variant: {
174
+ readonly type: PropType<ButtonVariant>;
175
+ readonly default: "secondary";
176
+ };
177
+ /** 内建触发器尺寸 + 菜单项密度(`sm` 24 / `md` 32 / `lg` 40) */
178
+ readonly size: {
179
+ readonly type: PropType<ControlSize>;
180
+ readonly default: "md";
181
+ };
182
+ /** 整个菜单禁用(触发器不可开、菜单项不响应) */
183
+ readonly disabled: {
184
+ readonly type: BooleanConstructor;
185
+ readonly default: false;
186
+ };
187
+ /** 面板落在锚点哪一侧 */
188
+ readonly side: {
189
+ readonly type: PropType<DropdownSide>;
190
+ readonly default: "bottom";
191
+ };
192
+ /** 两侧对齐;`center` 不写 `data-align` */
193
+ readonly align: {
194
+ readonly type: PropType<DropdownAlign>;
195
+ readonly default: "start";
196
+ };
197
+ /** 面板最小宽度是否对齐触发器 */
198
+ readonly matchWidth: {
199
+ readonly type: BooleanConstructor;
200
+ readonly default: false;
201
+ };
202
+ /** 选中后是否收起 */
203
+ readonly closeOnSelect: {
204
+ readonly type: BooleanConstructor;
205
+ readonly default: true;
206
+ };
207
+ /** 菜单的可访问名;不给则由触发器的 id 反推 `aria-labelledby` */
208
+ readonly ariaLabel: {
209
+ readonly type: StringConstructor;
210
+ readonly default: undefined;
211
+ };
212
+ }>> & Readonly<{
213
+ "onUpdate:open"?: ((_open: boolean) => any) | undefined;
214
+ onOpenChange?: ((_open: boolean) => any) | undefined;
215
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
216
+ readonly size: ControlSize;
217
+ readonly open: boolean | undefined;
218
+ readonly disabled: boolean;
219
+ readonly label: string;
220
+ readonly variant: ButtonVariant;
221
+ readonly defaultOpen: boolean;
222
+ readonly align: DropdownAlign;
223
+ readonly side: DropdownSide;
224
+ readonly matchWidth: boolean;
225
+ readonly ariaLabel: string;
226
+ readonly closeOnSelect: boolean;
227
+ }>;
228
+ __isFragment?: never;
229
+ __isTeleport?: never;
230
+ __isSuspense?: never;
231
+ } & import("vue").ComponentOptionsBase<Readonly<ExtractPropTypes<{
232
+ /** 受控开合;给了就是受控(必须接 `update:open` / `v-model:open`) */
233
+ readonly open: {
234
+ readonly type: PropType<boolean | undefined>;
235
+ readonly default: undefined;
236
+ };
237
+ /** 非受控初始开合 */
238
+ readonly defaultOpen: {
239
+ readonly type: BooleanConstructor;
240
+ readonly default: false;
241
+ };
242
+ /** 内建触发器文案(给 `#trigger` 时不生效) */
243
+ readonly label: {
244
+ readonly type: StringConstructor;
245
+ readonly default: "更多";
246
+ };
247
+ /** 内建触发器的按钮型 */
248
+ readonly variant: {
249
+ readonly type: PropType<ButtonVariant>;
250
+ readonly default: "secondary";
251
+ };
252
+ /** 内建触发器尺寸 + 菜单项密度(`sm` 24 / `md` 32 / `lg` 40) */
253
+ readonly size: {
254
+ readonly type: PropType<ControlSize>;
255
+ readonly default: "md";
256
+ };
257
+ /** 整个菜单禁用(触发器不可开、菜单项不响应) */
258
+ readonly disabled: {
259
+ readonly type: BooleanConstructor;
260
+ readonly default: false;
261
+ };
262
+ /** 面板落在锚点哪一侧 */
263
+ readonly side: {
264
+ readonly type: PropType<DropdownSide>;
265
+ readonly default: "bottom";
266
+ };
267
+ /** 两侧对齐;`center` 不写 `data-align` */
268
+ readonly align: {
269
+ readonly type: PropType<DropdownAlign>;
270
+ readonly default: "start";
271
+ };
272
+ /** 面板最小宽度是否对齐触发器 */
273
+ readonly matchWidth: {
274
+ readonly type: BooleanConstructor;
275
+ readonly default: false;
276
+ };
277
+ /** 选中后是否收起 */
278
+ readonly closeOnSelect: {
279
+ readonly type: BooleanConstructor;
280
+ readonly default: true;
281
+ };
282
+ /** 菜单的可访问名;不给则由触发器的 id 反推 `aria-labelledby` */
283
+ readonly ariaLabel: {
284
+ readonly type: StringConstructor;
285
+ readonly default: undefined;
286
+ };
287
+ }>> & Readonly<{
288
+ "onUpdate:open"?: ((_open: boolean) => any) | undefined;
289
+ onOpenChange?: ((_open: boolean) => any) | undefined;
290
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
291
+ 'update:open': (_open: boolean) => true;
292
+ openChange: (_open: boolean) => true;
293
+ }, string, {
294
+ readonly size: ControlSize;
295
+ readonly open: boolean | undefined;
296
+ readonly disabled: boolean;
297
+ readonly label: string;
298
+ readonly variant: ButtonVariant;
299
+ readonly defaultOpen: boolean;
300
+ readonly align: DropdownAlign;
301
+ readonly side: DropdownSide;
302
+ readonly matchWidth: boolean;
303
+ readonly ariaLabel: string;
304
+ readonly closeOnSelect: boolean;
305
+ }, {}, string, SlotsType<{
306
+ trigger?: (scope: {
307
+ triggerProps: Record<string, unknown>;
308
+ open: boolean;
309
+ panelId: string;
310
+ }) => VNodeChild;
311
+ default?: () => VNodeChild;
312
+ }>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
313
+ Item: import("vue").DefineComponent<ExtractPropTypes<{
314
+ label: {
315
+ type: StringConstructor;
316
+ default: undefined;
317
+ };
318
+ icon: {
319
+ type: PropType<import("@manohub/icon").IconName>;
320
+ default: undefined;
321
+ };
322
+ disabled: {
323
+ type: BooleanConstructor;
324
+ default: boolean;
325
+ };
326
+ danger: {
327
+ type: BooleanConstructor;
328
+ default: boolean;
329
+ };
330
+ shortcut: {
331
+ type: StringConstructor;
332
+ default: undefined;
333
+ };
334
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
335
+ select: (_event: MouseEvent) => true;
336
+ }, string, import("vue").PublicProps, Readonly<ExtractPropTypes<{
337
+ label: {
338
+ type: StringConstructor;
339
+ default: undefined;
340
+ };
341
+ icon: {
342
+ type: PropType<import("@manohub/icon").IconName>;
343
+ default: undefined;
344
+ };
345
+ disabled: {
346
+ type: BooleanConstructor;
347
+ default: boolean;
348
+ };
349
+ danger: {
350
+ type: BooleanConstructor;
351
+ default: boolean;
352
+ };
353
+ shortcut: {
354
+ type: StringConstructor;
355
+ default: undefined;
356
+ };
357
+ }>> & Readonly<{
358
+ onSelect?: ((_event: MouseEvent) => any) | undefined;
359
+ }>, {
360
+ icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "close" | "pause" | "play" | "image" | "delete" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history" | "maximize" | "minimize";
361
+ disabled: boolean;
362
+ label: string;
363
+ danger: boolean;
364
+ shortcut: string;
365
+ }, SlotsType<{
366
+ default?: () => VNodeChild;
367
+ trailing?: () => VNodeChild;
368
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
369
+ Separator: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
370
+ };
371
+ export type DropdownCompound = typeof Dropdown;
372
+ export type { DropdownAlign, DropdownItemProps, DropdownSide, } from './dropdown-shared';