@astryx-vue/core 0.6.0 → 0.7.0
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/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-CBkJecfc.js → AlertDialog-5bbCe_ma.js} +1 -1
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-DhVBdHeQ.js → AvatarGroup-ezWQX5UE.js} +5 -2
- package/dist/Banner/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-m54uCMJN.js → BottomSheet-BrxST6Zp.js} +2 -1
- package/dist/{BottomSheet-B4sc3F1S.js → BottomSheet-itRm1Yh5.js} +1 -0
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-DRXYUqOk.js → Breadcrumbs-DYmOUlSu.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-sNg2CZ_P.js → Chat-DpH2ob4k.js} +1 -1
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-DDORpsYN.js → CheckboxInput-D0SSjziv.js} +2 -4
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-B8_wed6z.js → CheckboxList-DnqRfWKg.js} +1 -1
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/ClickableCard/index.js +1 -1
- package/dist/{ClickableCard-DM66XZ07.js → ClickableCard-CGjr4c7g.js} +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-DFxk2sil.js → CommandPalette-B6lzcEE4.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-32r0RVQE.js → ComplexSelector-CABdPOyw.js} +16 -3
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-BH_yV1xZ.js → ContextMenu-DMSJQdZ5.js} +1 -1
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-B57PrbII.js → DateInput-cVln1Xnn.js} +4 -6
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-BMw1A5Q3.js → DateTimeInput-CViJJt8m.js} +3 -3
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -2
- package/dist/{Dialog-fhyxB00e.js → Dialog-BhxN-tp4.js} +1 -0
- package/dist/Dialog-Bn4eUNiy.js +49 -0
- package/dist/{Dialog-CL8u76KG.js → DialogHeader-B-Lz4rB5.js} +3 -49
- package/dist/Divider/index.d.ts +1 -1
- package/dist/Drawer/index.d.ts +2 -0
- package/dist/Drawer/index.js +2 -0
- package/dist/Drawer-DjSbpQcy.js +137 -0
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-C0QDklYy.js → DropdownMenu-Cr1zAiZm.js} +142 -27
- package/dist/{DropdownMenu-DO9lDRvW.js → DropdownMenu-CxbpuT2r.js} +2 -2
- package/dist/{DropdownMenuRadioItem.vue-D-VSfulY.d.ts → DropdownMenuRadioItem.vue-z0XU7pZS.d.ts} +9 -0
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-BpJhT0sn.js → HoverCard-C3zQizyS.js} +93 -67
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/plugin-protocol/index.js +4 -3
- package/dist/MetadataList/index.d.ts +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-DVqD6OEy.js → MultiSelector-r5acBuN0.js} +10 -5
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-L0IDhBbo.js → Pagination-CYmPEKKt.js} +1 -1
- package/dist/Popover/index.d.ts +1 -1
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-CBYYhpvA.js → PowerSearch-CjhX2YkL.js} +8 -8
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-Dle5Lbvs.js → Selector-PYpxWfKo.js} +38 -15
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-DBdLd0-t.js → Switch-DSuC0F7H.js} +2 -4
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-npiEQK-q.js → TabList-CXLDPFte.js} +30 -6
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-BwfRe7_x.js → Table-36BOw1Q0.js} +5 -5
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/{TimeField-Dajh0ej2.js → TimeField-BnXwqr_O.js} +8 -12
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-BVrrBcMF.js → TimeInput-68-3BdYQ.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-Bf6iQTk6.js → Timestamp-DTr30OUF.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-CBrEN21_.js → Token-DP3bU-8c.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-DxOCrbq3.js → Tokenizer-DT1Kj9dR.js} +1 -1
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-XpX5aA-Q.js → Typeahead-D4oT1wUP.js} +1 -1
- package/dist/{disabledInteraction-C9lrgFxB.js → disabledInteraction-CPzL8kVP.js} +20 -1
- package/dist/{index-Dacg7XTH.d.ts → index-8px-LKw_.d.ts} +2 -2
- package/dist/{index-D_K1wfRa.d.ts → index-B2kcUxGA.d.ts} +1 -1
- package/dist/{index-CL8JvxHW.d.ts → index-B3yTdknp.d.ts} +1 -1
- package/dist/{index-rszZajcw.d.ts → index-B449gOMC.d.ts} +2 -2
- package/dist/{index-RW8kvEwf.d.ts → index-B6eL2gOK.d.ts} +5 -5
- package/dist/{index-C3f1zsJR.d.ts → index-Bm_3wP0q.d.ts} +2 -2
- package/dist/{index-BaxM-pFP.d.ts → index-BnEhvmdR.d.ts} +4 -4
- package/dist/{index-DTyX3QfK.d.ts → index-C3dirxkN.d.ts} +4 -4
- package/dist/{index-D05JGsT3.d.ts → index-C8wfe0Mr.d.ts} +1 -1
- package/dist/{index-WrrH8ulk.d.ts → index-CA9Nneq_.d.ts} +6 -6
- package/dist/{index-Bgk1Rj2A.d.ts → index-CTjkJP4x.d.ts} +1 -1
- package/dist/{index-YKCx03zD.d.ts → index-CdvmnNMH.d.ts} +1 -1
- package/dist/{index-DLAG3m9W.d.ts → index-DXJ3U3ve.d.ts} +2 -2
- package/dist/{index-DR3eQt87.d.ts → index-Djd6glIa.d.ts} +206 -115
- package/dist/{index-BNaRK-s5.d.ts → index-DsaP4-eB.d.ts} +1 -1
- package/dist/{index-C_6RCsGf.d.ts → index-Gnewu6-J.d.ts} +1 -1
- package/dist/{index-B1WWphal.d.ts → index-IvAfdGCC.d.ts} +1 -1
- package/dist/{index-TA1zVibb.d.ts → index-MEix_m1o.d.ts} +4 -4
- package/dist/{index-utZGF4GR.d.ts → index-NOXYEdOI.d.ts} +1 -1
- package/dist/{index-B1eCxBCY.d.ts → index-TXcNH86P.d.ts} +1 -1
- package/dist/{index-CqSDC6Af.d.ts → index-aTBpXbot.d.ts} +6 -6
- package/dist/{index-ChOyJzJh.d.ts → index-cG1E0U2s.d.ts} +2 -2
- package/dist/{index-D5N9ikrS.d.ts → index-hCpxKePE.d.ts} +1 -1
- package/dist/{index-3t5RAfNP.d.ts → index-mkbGYz8f.d.ts} +2 -2
- package/dist/{index-C732aNMY.d.ts → index-qayqGnJT.d.ts} +3 -3
- package/dist/{index-BEZ4ezJk.d.ts → index-wY6dKz6c.d.ts} +2 -2
- package/dist/index.d.ts +68 -68
- package/dist/index.js +104 -102
- package/package.json +5 -1
- package/styles/drawer.css +77 -0
- package/styles/dropdown-menu.css +28 -0
- package/styles.css +1 -0
- package/dist/{index-CHx33xGa.d.ts → index-BJ9Wim6J.d.ts} +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as _sfc_main$1 } from "./IconButton-BmMIccb4.js";
|
|
2
2
|
import { s as useAstryxMessages } from "./context-CVUee2tp.js";
|
|
3
|
-
import { n as DIALOG_CONTEXT_KEY
|
|
4
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent,
|
|
3
|
+
import { n as DIALOG_CONTEXT_KEY } from "./Dialog-BhxN-tp4.js";
|
|
4
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, inject, mergeProps, normalizeClass, onBeforeUnmount, onMounted, openBlock, renderSlot, toDisplayString, useAttrs, useId, useSlots, withCtx } from "vue";
|
|
5
5
|
import "../styles/dialog-header.css";
|
|
6
6
|
//#region src/Dialog/DialogHeader.vue
|
|
7
7
|
const _hoisted_1 = {
|
|
@@ -109,50 +109,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
109
109
|
}
|
|
110
110
|
});
|
|
111
111
|
//#endregion
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* 无需管理 `isOpen` 状态即可打开对话框。
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
* ```
|
|
118
|
-
* const dialog = useImperativeDialog()
|
|
119
|
-
* // <button @click="dialog.show(() => h('p', 'Hello'))">Open</button>
|
|
120
|
-
* // <dialog.Host />
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
function useImperativeDialog(defaultOptions = {}) {
|
|
124
|
-
const isOpen = ref(false);
|
|
125
|
-
const content = shallowRef(() => null);
|
|
126
|
-
const options = shallowRef(defaultOptions);
|
|
127
|
-
function show(nextContent, nextOptions) {
|
|
128
|
-
content.value = nextContent;
|
|
129
|
-
if (nextOptions) options.value = {
|
|
130
|
-
...options.value,
|
|
131
|
-
...nextOptions
|
|
132
|
-
};
|
|
133
|
-
isOpen.value = true;
|
|
134
|
-
}
|
|
135
|
-
function hide() {
|
|
136
|
-
isOpen.value = false;
|
|
137
|
-
}
|
|
138
|
-
const Host = defineComponent({
|
|
139
|
-
name: "AstryxImperativeDialogHost",
|
|
140
|
-
setup() {
|
|
141
|
-
return () => h(_sfc_main$2, {
|
|
142
|
-
...options.value,
|
|
143
|
-
isOpen: isOpen.value,
|
|
144
|
-
onOpenChange: (open) => {
|
|
145
|
-
if (!open) isOpen.value = false;
|
|
146
|
-
}
|
|
147
|
-
}, { default: () => content.value() });
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
return {
|
|
151
|
-
show,
|
|
152
|
-
hide,
|
|
153
|
-
isOpen: readonly(isOpen),
|
|
154
|
-
Host
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
//#endregion
|
|
158
|
-
export { _sfc_main as n, useImperativeDialog as t };
|
|
112
|
+
export { _sfc_main as t };
|
package/dist/Divider/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as DividerVariant, n as DividerOrientation, r as DividerProps, t as _default } from "../index-
|
|
1
|
+
import { i as DividerVariant, n as DividerOrientation, r as DividerProps, t as _default } from "../index-C8wfe0Mr.js";
|
|
2
2
|
export { _default as Divider, type DividerOrientation, type DividerProps, type DividerVariant };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Ci as DrawerHeaderSlots, Ei as DrawerSlots, Si as DrawerHeaderProps, Ti as DrawerProps, bi as DrawerEmits, vi as _default$1, wi as DrawerPlacement, xi as DrawerHeaderEmits, yi as _default } from "../index-Djd6glIa.js";
|
|
2
|
+
export { _default as Drawer, type DrawerEmits, _default$1 as DrawerHeader, type DrawerHeaderEmits, type DrawerHeaderProps, type DrawerHeaderSlots, type DrawerPlacement, type DrawerProps, type DrawerSlots };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { t as _sfc_main$2 } from "./Dialog-BhxN-tp4.js";
|
|
2
|
+
import { t as _sfc_main$3 } from "./DialogHeader-B-Lz4rB5.js";
|
|
3
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, unref, useAttrs, useSlots, withCtx } from "vue";
|
|
4
|
+
import "../styles/drawer.css";
|
|
5
|
+
//#region src/Drawer/Drawer.vue
|
|
6
|
+
const _hoisted_1 = { class: "astryx-drawer-body" };
|
|
7
|
+
const _hoisted_2 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "astryx-drawer-footer"
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 贴边的模态面板。模态、焦点陷阱、焦点归还、滚动锁和 `purpose` 的关闭规则
|
|
13
|
+
* 都由 `Dialog` 负责,这里只决定贴哪一边和多大。
|
|
14
|
+
*/
|
|
15
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
16
|
+
name: "AstryxDrawer",
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
__name: "Drawer",
|
|
19
|
+
props: {
|
|
20
|
+
isOpen: { type: Boolean },
|
|
21
|
+
label: {},
|
|
22
|
+
placement: { default: "end" },
|
|
23
|
+
width: { default: 400 },
|
|
24
|
+
padding: { default: void 0 },
|
|
25
|
+
purpose: { default: "info" }
|
|
26
|
+
},
|
|
27
|
+
emits: ["openChange"],
|
|
28
|
+
setup(__props, { emit: __emit }) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
const emit = __emit;
|
|
31
|
+
const attrs = useAttrs();
|
|
32
|
+
const position = computed(() => props.placement === "start" ? {
|
|
33
|
+
start: 0,
|
|
34
|
+
top: 0,
|
|
35
|
+
bottom: 0
|
|
36
|
+
} : {
|
|
37
|
+
end: 0,
|
|
38
|
+
top: 0,
|
|
39
|
+
bottom: 0
|
|
40
|
+
});
|
|
41
|
+
const rootAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([name]) => name !== "class" && name !== "style")));
|
|
42
|
+
return (_ctx, _cache) => {
|
|
43
|
+
return openBlock(), createBlock(_sfc_main$2, mergeProps(rootAttrs.value, {
|
|
44
|
+
"aria-label": __props.label,
|
|
45
|
+
class: ["astryx-drawer", [`astryx-drawer--${__props.placement}`, unref(attrs).class]],
|
|
46
|
+
"is-open": __props.isOpen,
|
|
47
|
+
"max-height": "100dvh",
|
|
48
|
+
padding: __props.padding,
|
|
49
|
+
position: position.value,
|
|
50
|
+
purpose: __props.purpose,
|
|
51
|
+
style: unref(attrs).style,
|
|
52
|
+
width: __props.width,
|
|
53
|
+
onOpenChange: _cache[0] || (_cache[0] = ($event) => emit("openChange", $event))
|
|
54
|
+
}), {
|
|
55
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")]), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("v-if", true)]),
|
|
56
|
+
_: 3
|
|
57
|
+
}, 16, [
|
|
58
|
+
"aria-label",
|
|
59
|
+
"class",
|
|
60
|
+
"is-open",
|
|
61
|
+
"padding",
|
|
62
|
+
"position",
|
|
63
|
+
"purpose",
|
|
64
|
+
"style",
|
|
65
|
+
"width"
|
|
66
|
+
]);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/Drawer/DrawerHeader.vue
|
|
72
|
+
/**
|
|
73
|
+
* 抽屉的标题行。布局、标题语义和关闭按钮的补偿边都复用 `DialogHeader`,
|
|
74
|
+
* 这里只把关闭按钮的默认值和事件名换成抽屉的说法。
|
|
75
|
+
*/
|
|
76
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
77
|
+
name: "AstryxDrawerHeader",
|
|
78
|
+
__name: "DrawerHeader",
|
|
79
|
+
props: {
|
|
80
|
+
title: {},
|
|
81
|
+
subtitle: { default: void 0 },
|
|
82
|
+
hasCloseButton: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: void 0
|
|
85
|
+
},
|
|
86
|
+
closeButtonLabel: { default: void 0 }
|
|
87
|
+
},
|
|
88
|
+
emits: ["openChange"],
|
|
89
|
+
setup(__props, { emit: __emit }) {
|
|
90
|
+
const props = __props;
|
|
91
|
+
const emit = __emit;
|
|
92
|
+
const instance = getCurrentInstance();
|
|
93
|
+
const slots = useSlots();
|
|
94
|
+
/**
|
|
95
|
+
* 关闭按钮只在有人接关闭请求时出现:没人处理的按钮点了什么也不会发生。
|
|
96
|
+
* 显式传 `hasCloseButton` 时以传入值为准。监听函数在渲染时才看得到,所以放在 computed 里读。
|
|
97
|
+
*/
|
|
98
|
+
const showClose = computed(() => props.hasCloseButton ?? instance?.vnode?.props?.onOpenChange != null);
|
|
99
|
+
return (_ctx, _cache) => {
|
|
100
|
+
return openBlock(), createBlock(_sfc_main$3, {
|
|
101
|
+
"close-button-label": __props.closeButtonLabel,
|
|
102
|
+
"has-close-button": showClose.value,
|
|
103
|
+
subtitle: __props.subtitle,
|
|
104
|
+
title: __props.title,
|
|
105
|
+
onOpenChange: _cache[0] || (_cache[0] = ($event) => emit("openChange", false))
|
|
106
|
+
}, createSlots({ _: 2 }, [
|
|
107
|
+
unref(slots).title ? {
|
|
108
|
+
name: "title",
|
|
109
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "title")]),
|
|
110
|
+
key: "0"
|
|
111
|
+
} : void 0,
|
|
112
|
+
unref(slots).subtitle ? {
|
|
113
|
+
name: "subtitle",
|
|
114
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "subtitle")]),
|
|
115
|
+
key: "1"
|
|
116
|
+
} : void 0,
|
|
117
|
+
unref(slots).startContent ? {
|
|
118
|
+
name: "startContent",
|
|
119
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "startContent")]),
|
|
120
|
+
key: "2"
|
|
121
|
+
} : void 0,
|
|
122
|
+
unref(slots).endContent ? {
|
|
123
|
+
name: "endContent",
|
|
124
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "endContent")]),
|
|
125
|
+
key: "3"
|
|
126
|
+
} : void 0
|
|
127
|
+
]), 1032, [
|
|
128
|
+
"close-button-label",
|
|
129
|
+
"has-close-button",
|
|
130
|
+
"subtitle",
|
|
131
|
+
"title"
|
|
132
|
+
]);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
//#endregion
|
|
137
|
+
export { _sfc_main$1 as n, _sfc_main as t };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as DropdownMenuRadioGroupSlots, C as DropdownMenuGroupSlots, D as DropdownMenuItemVariant, E as DropdownMenuItemSlots, F as DropdownMenuSubMenuProps, I as DropdownMenuSubMenuSlots, M as DropdownMenuRadioItemSlots, N as DropdownMenuSubMenuEmits, O as DropdownMenuRadioGroupEmits, P as DropdownMenuSubMenuPresentation, S as DropdownMenuGroupProps, T as DropdownMenuItemProps, _ as DropdownMenuSlots, a as DropdownMenuCheckboxData, b as DropdownMenuCheckboxItemProps, c as DropdownMenuEntry, d as DropdownMenuPresentation, f as DropdownMenuProps, g as DropdownMenuSize, h as DropdownMenuSection, i as DropdownMenuButtonProps, j as DropdownMenuRadioItemProps, k as DropdownMenuRadioGroupProps, l as DropdownMenuItemData, m as DropdownMenuRadioOptionData, n as _default$5, o as DropdownMenuDividerData, p as DropdownMenuRadioData, r as _default$1, s as DropdownMenuEmits, t as _default$6, u as DropdownMenuOption, v as DropdownMenuTriggerProps, w as DropdownMenuItemEmits, x as DropdownMenuCheckboxItemSlots, y as DropdownMenuCheckboxItemEmits } from "../DropdownMenuRadioItem.vue-
|
|
2
|
-
import { a as _default, c as useDropdownMenuContext, i as _default$2, l as useDropdownMenuRadioGroup, n as _default$4, o as DropdownMenuContextValue, r as _default$3, s as DropdownMenuRadioGroupContext, t as _default$7 } from "../index-
|
|
1
|
+
import { A as DropdownMenuRadioGroupSlots, C as DropdownMenuGroupSlots, D as DropdownMenuItemVariant, E as DropdownMenuItemSlots, F as DropdownMenuSubMenuProps, I as DropdownMenuSubMenuSlots, M as DropdownMenuRadioItemSlots, N as DropdownMenuSubMenuEmits, O as DropdownMenuRadioGroupEmits, P as DropdownMenuSubMenuPresentation, S as DropdownMenuGroupProps, T as DropdownMenuItemProps, _ as DropdownMenuSlots, a as DropdownMenuCheckboxData, b as DropdownMenuCheckboxItemProps, c as DropdownMenuEntry, d as DropdownMenuPresentation, f as DropdownMenuProps, g as DropdownMenuSize, h as DropdownMenuSection, i as DropdownMenuButtonProps, j as DropdownMenuRadioItemProps, k as DropdownMenuRadioGroupProps, l as DropdownMenuItemData, m as DropdownMenuRadioOptionData, n as _default$5, o as DropdownMenuDividerData, p as DropdownMenuRadioData, r as _default$1, s as DropdownMenuEmits, t as _default$6, u as DropdownMenuOption, v as DropdownMenuTriggerProps, w as DropdownMenuItemEmits, x as DropdownMenuCheckboxItemSlots, y as DropdownMenuCheckboxItemEmits } from "../DropdownMenuRadioItem.vue-z0XU7pZS.js";
|
|
2
|
+
import { a as _default, c as useDropdownMenuContext, i as _default$2, l as useDropdownMenuRadioGroup, n as _default$4, o as DropdownMenuContextValue, r as _default$3, s as DropdownMenuRadioGroupContext, t as _default$7 } from "../index-IvAfdGCC.js";
|
|
3
3
|
export { _default as DropdownMenu, type DropdownMenuButtonProps, type DropdownMenuCheckboxData, _default$1 as DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemEmits, type DropdownMenuCheckboxItemProps, type DropdownMenuCheckboxItemSlots, type DropdownMenuContextValue, _default$2 as DropdownMenuDivider, type DropdownMenuDividerData, type DropdownMenuEmits, type DropdownMenuEntry, _default$3 as DropdownMenuGroup, type DropdownMenuGroupProps, type DropdownMenuGroupSlots, _default$4 as DropdownMenuItem, type DropdownMenuItemData, type DropdownMenuItemEmits, type DropdownMenuItemProps, type DropdownMenuItemSlots, type DropdownMenuItemVariant, type DropdownMenuOption, type DropdownMenuPresentation, type DropdownMenuProps, type DropdownMenuRadioData, _default$5 as DropdownMenuRadioGroup, type DropdownMenuRadioGroupContext, type DropdownMenuRadioGroupEmits, type DropdownMenuRadioGroupProps, type DropdownMenuRadioGroupSlots, _default$6 as DropdownMenuRadioItem, type DropdownMenuRadioItemProps, type DropdownMenuRadioItemSlots, type DropdownMenuRadioOptionData, type DropdownMenuSection, type DropdownMenuSize, type DropdownMenuSlots, _default$7 as DropdownMenuSubMenu, type DropdownMenuSubMenuEmits, type DropdownMenuSubMenuPresentation, type DropdownMenuSubMenuProps, type DropdownMenuSubMenuSlots, type DropdownMenuTriggerProps, useDropdownMenuContext, useDropdownMenuRadioGroup };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as _sfc_main$1, n as _sfc_main$6, o as useDropdownMenuContext, r as _sfc_main$5, s as useDropdownMenuRadioGroup } from "../useMenuDrillIn-CjU_ZMhh.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as _sfc_main$7 } from "../DropdownMenu-
|
|
2
|
+
import { c as _sfc_main$2, i as _sfc_main$4, s as _sfc_main$3, t as _sfc_main } from "../DropdownMenu-CxbpuT2r.js";
|
|
3
|
+
import { t as _sfc_main$7 } from "../DropdownMenu-Cr1zAiZm.js";
|
|
4
4
|
export { _sfc_main as DropdownMenu, _sfc_main$1 as DropdownMenuCheckboxItem, _sfc_main$2 as DropdownMenuDivider, _sfc_main$3 as DropdownMenuGroup, _sfc_main$4 as DropdownMenuItem, _sfc_main$5 as DropdownMenuRadioGroup, _sfc_main$6 as DropdownMenuRadioItem, _sfc_main$7 as DropdownMenuSubMenu, useDropdownMenuContext, useDropdownMenuRadioGroup };
|
|
@@ -6,12 +6,12 @@ import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
|
|
|
6
6
|
import { t as _sfc_main$2 } from "./LayerContentBoundary-CvsKxwwm.js";
|
|
7
7
|
import { t as _sfc_main$3 } from "./Item-DWMIjN8n.js";
|
|
8
8
|
import { o as useDropdownMenuContext } from "./useMenuDrillIn-CjU_ZMhh.js";
|
|
9
|
-
import { a as
|
|
9
|
+
import { a as MENU_ITEM_ROLES, i as _sfc_main$5, l as _sfc_main$4, n as useMenuRegions, o as activateMenuItem, r as useMenuFocus } from "./DropdownMenu-CxbpuT2r.js";
|
|
10
10
|
import { n as clampInlineSize, r as isIntrinsicInlineSize } from "./inlineSize-BNe8wggI.js";
|
|
11
11
|
import { t as _sfc_main$6 } from "./Spinner-B7xuy3ZA.js";
|
|
12
12
|
import { t as useSubmenuMode } from "./useSubmenuMode-CZN9qrUo.js";
|
|
13
13
|
import { t as useMenuHover } from "./useMenuHover-Djreu23i.js";
|
|
14
|
-
import { Fragment, Teleport, computed, createBlock, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, nextTick, normalizeStyle, openBlock, ref, renderSlot, unref, useId, useSlots, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
14
|
+
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, mergeProps, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderSlot, unref, useId, useSlots, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
15
15
|
import "../styles/dropdown-menu.css";
|
|
16
16
|
//#region src/DropdownMenu/DropdownMenuSubMenu.vue
|
|
17
17
|
const _hoisted_1 = {
|
|
@@ -19,8 +19,20 @@ const _hoisted_1 = {
|
|
|
19
19
|
class: "astryx-dropdown-menu-spinner",
|
|
20
20
|
"aria-hidden": "true"
|
|
21
21
|
};
|
|
22
|
-
const _hoisted_2 = [
|
|
23
|
-
|
|
22
|
+
const _hoisted_2 = [
|
|
23
|
+
"role",
|
|
24
|
+
"aria-label",
|
|
25
|
+
"aria-modal",
|
|
26
|
+
"hidden"
|
|
27
|
+
];
|
|
28
|
+
const _hoisted_3 = ["aria-label"];
|
|
29
|
+
const _hoisted_4 = [
|
|
30
|
+
"role",
|
|
31
|
+
"aria-label",
|
|
32
|
+
"aria-modal",
|
|
33
|
+
"data-overflow"
|
|
34
|
+
];
|
|
35
|
+
const _hoisted_5 = ["aria-label"];
|
|
24
36
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
25
37
|
name: "AstryxDropdownMenuSubMenu",
|
|
26
38
|
inheritAttrs: false,
|
|
@@ -56,10 +68,32 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
56
68
|
const menuSize = computed(() => menu?.menuSize.value ?? "md");
|
|
57
69
|
const density = computed(() => menuSize.value === "sm" ? "compact" : "balanced");
|
|
58
70
|
const hasStart = computed(() => slots.icon != null || props.icon != null);
|
|
71
|
+
const hasRegions = computed(() => slots.header != null || slots.footer != null);
|
|
72
|
+
const headerRef = ref(null);
|
|
73
|
+
const footerRef = ref(null);
|
|
74
|
+
const regionMenuRef = ref(null);
|
|
75
|
+
function setHeader(el) {
|
|
76
|
+
headerRef.value = el ?? null;
|
|
77
|
+
}
|
|
78
|
+
function setFooter(el) {
|
|
79
|
+
footerRef.value = el ?? null;
|
|
80
|
+
}
|
|
81
|
+
function setRegionMenu(el) {
|
|
82
|
+
regionMenuRef.value = el ?? null;
|
|
83
|
+
}
|
|
59
84
|
const stringLabel = computed(() => typeof props.label === "string" ? props.label : void 0);
|
|
60
85
|
const focus = useMenuFocus({ list: flyoutRef });
|
|
61
86
|
const drillFocus = useMenuFocus({ list: drillRef });
|
|
62
87
|
const hasOverflow = useOverflow(flyoutRef, flyoutOpen);
|
|
88
|
+
/** Tab 循环里的「菜单」那一站:有头尾时是里层的 `role="menu"`,否则就是整个飞出层。 */
|
|
89
|
+
const menuStop = computed(() => hasRegions.value ? regionMenuRef.value : flyoutRef.value);
|
|
90
|
+
const regions = useMenuRegions({
|
|
91
|
+
header: headerRef,
|
|
92
|
+
footer: footerRef,
|
|
93
|
+
menu: menuStop,
|
|
94
|
+
hasRegions,
|
|
95
|
+
closeMenu: () => closeFlyout(true)
|
|
96
|
+
});
|
|
63
97
|
const mode = useSubmenuMode({
|
|
64
98
|
drillIn: computed(() => menu?.drillIn.value),
|
|
65
99
|
presentation: computed(() => props.presentation),
|
|
@@ -114,19 +148,32 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
114
148
|
await nextTick();
|
|
115
149
|
focus.focusFirst();
|
|
116
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* 焦点回到触发行。行的 `focus()` 只会找里面的链接或按钮,子菜单这一行两者都没有,
|
|
153
|
+
* 所以直接聚焦行元素本身。
|
|
154
|
+
*/
|
|
155
|
+
function focusRowElement() {
|
|
156
|
+
rowRef.value?.focus();
|
|
157
|
+
nextTick(() => rowRef.value?.focus());
|
|
158
|
+
}
|
|
117
159
|
function closeFlyout(focusRow = true) {
|
|
118
160
|
if (isDrill.value) {
|
|
119
161
|
if (!mode.closeDrill()) return;
|
|
120
162
|
emit("openChange", false);
|
|
121
|
-
if (focusRow)
|
|
163
|
+
if (focusRow) focusRowElement();
|
|
122
164
|
return;
|
|
123
165
|
}
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
166
|
+
if (flyoutOpen.value) {
|
|
167
|
+
flyoutOpen.value = false;
|
|
168
|
+
emit("openChange", false);
|
|
169
|
+
}
|
|
170
|
+
if (focusRow) focusRowElement();
|
|
128
171
|
}
|
|
129
172
|
function onDrillKeydown(event) {
|
|
173
|
+
if (event.key === "Tab" && hasRegions.value) {
|
|
174
|
+
regions.moveDialogTab(event);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
130
177
|
if (event.key === "Tab" && menu?.hasRegions.value) {
|
|
131
178
|
event.preventDefault();
|
|
132
179
|
event.stopPropagation();
|
|
@@ -152,6 +199,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
152
199
|
drillFocus.handleKeyDown(event);
|
|
153
200
|
}
|
|
154
201
|
function onFlyoutKeydown(event) {
|
|
202
|
+
if (event.key === "Tab" && hasRegions.value) {
|
|
203
|
+
regions.moveDialogTab(event);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
155
206
|
if (event.key === "Tab" && menu?.hasRegions.value) {
|
|
156
207
|
event.preventDefault();
|
|
157
208
|
event.stopPropagation();
|
|
@@ -198,7 +249,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
198
249
|
};
|
|
199
250
|
const hover = useMenuHover({
|
|
200
251
|
show: (options) => void openFlyout(options),
|
|
201
|
-
hide: () =>
|
|
252
|
+
hide: () => {
|
|
253
|
+
if (hasRegions.value && flyoutRef.value?.contains(document.activeElement)) return;
|
|
254
|
+
closeFlyout(false);
|
|
255
|
+
},
|
|
202
256
|
isOpen: flyoutOpen,
|
|
203
257
|
isEnabled: () => !props.isDisabled && !isDrill.value,
|
|
204
258
|
flyoutRef,
|
|
@@ -214,11 +268,22 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
214
268
|
}
|
|
215
269
|
hover.triggerProps.onClick(event);
|
|
216
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* 关闭时焦点还留在面板里(Escape、外部关闭都会这样),就交还给触发行:
|
|
273
|
+
* 否则焦点会落进一个已经隐藏的容器。
|
|
274
|
+
*/
|
|
275
|
+
watch(flyoutOpen, (open, wasOpen) => {
|
|
276
|
+
if (open || !wasOpen) return;
|
|
277
|
+
if (isDrill.value) return;
|
|
278
|
+
const active = document.activeElement;
|
|
279
|
+
if (active instanceof Node && flyoutRef.value?.contains(active)) focusRowElement();
|
|
280
|
+
}, { flush: "pre" });
|
|
217
281
|
useDismiss({
|
|
218
282
|
container: flyoutRef,
|
|
219
283
|
trigger: rowRef,
|
|
220
284
|
isEnabled: computed(() => flyoutOpen.value && !isDrill.value),
|
|
221
|
-
onDismiss: () => closeFlyout(false)
|
|
285
|
+
onDismiss: () => closeFlyout(false),
|
|
286
|
+
onEscape: () => closeFlyout(true)
|
|
222
287
|
});
|
|
223
288
|
useDismiss({
|
|
224
289
|
container: drillRef,
|
|
@@ -231,7 +296,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
231
296
|
if (!open) flyoutOpen.value = false;
|
|
232
297
|
});
|
|
233
298
|
watch(drillOnStack, (onStack, wasOnStack) => {
|
|
234
|
-
if (wasOnStack === true && !onStack && menu?.isOpen.value)
|
|
299
|
+
if (wasOnStack === true && !onStack && menu?.isOpen.value) focusRowElement();
|
|
235
300
|
});
|
|
236
301
|
return (_ctx, _cache) => {
|
|
237
302
|
return openBlock(), createElementBlock(Fragment, null, [createVNode(_sfc_main$3, mergeProps(_ctx.$attrs, {
|
|
@@ -239,7 +304,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
239
304
|
ref: rowComponent,
|
|
240
305
|
class: "astryx-dropdown-menu-item",
|
|
241
306
|
role: "menuitem",
|
|
242
|
-
"aria-haspopup": "menu",
|
|
307
|
+
"aria-haspopup": hasRegions.value ? "dialog" : "menu",
|
|
243
308
|
"aria-expanded": isShown.value,
|
|
244
309
|
"data-menu-size": menuSize.value,
|
|
245
310
|
"data-variant": "default",
|
|
@@ -285,6 +350,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
285
350
|
key: "2"
|
|
286
351
|
} : void 0
|
|
287
352
|
]), 1040, [
|
|
353
|
+
"aria-haspopup",
|
|
288
354
|
"aria-expanded",
|
|
289
355
|
"data-menu-size",
|
|
290
356
|
"density",
|
|
@@ -297,21 +363,51 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
297
363
|
]), drillHost.value ? (openBlock(), createBlock(Teleport, {
|
|
298
364
|
key: 0,
|
|
299
365
|
to: drillHost.value
|
|
300
|
-
}, [withDirectives(createElementVNode("div", {
|
|
366
|
+
}, [createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- 键盘事件在面板根上接住再分发给头部、菜单和尾部,交互元素仍是里面的行和控件。 "), withDirectives(createElementVNode("div", {
|
|
301
367
|
ref_key: "drillRef",
|
|
302
368
|
ref: drillRef,
|
|
303
|
-
class: "astryx-dropdown-menu-drill",
|
|
304
|
-
role: "menu",
|
|
369
|
+
class: normalizeClass(["astryx-dropdown-menu-drill", { "is-frame": hasRegions.value }]),
|
|
370
|
+
role: hasRegions.value ? "dialog" : "menu",
|
|
305
371
|
"aria-label": stringLabel.value,
|
|
372
|
+
"aria-modal": hasRegions.value ? "true" : void 0,
|
|
306
373
|
hidden: unref(drillIsTop) ? void 0 : true,
|
|
307
374
|
tabindex: "-1",
|
|
308
375
|
onKeydown: onDrillKeydown
|
|
309
376
|
}, [createVNode(_sfc_main$2, null, {
|
|
310
377
|
default: withCtx(() => [createVNode(_sfc_main$4, { value: nestedContext }, {
|
|
311
|
-
default: withCtx(() => [
|
|
378
|
+
default: withCtx(() => [hasRegions.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
379
|
+
createElementVNode("div", {
|
|
380
|
+
ref: setHeader,
|
|
381
|
+
class: "astryx-dropdown-menu-region",
|
|
382
|
+
onKeydown: _cache[3] || (_cache[3] = (...args) => unref(regions).onRegionKeydown && unref(regions).onRegionKeydown(...args))
|
|
383
|
+
}, [renderSlot(_ctx.$slots, "header")], 544),
|
|
384
|
+
createElementVNode("div", {
|
|
385
|
+
ref: setRegionMenu,
|
|
386
|
+
class: "astryx-dropdown-menu-region-menu",
|
|
387
|
+
"aria-label": stringLabel.value,
|
|
388
|
+
role: "menu",
|
|
389
|
+
tabindex: "-1"
|
|
390
|
+
}, [createVNode(_sfc_main$5, {
|
|
391
|
+
"has-close-on-select": false,
|
|
392
|
+
label: backLabel.value,
|
|
393
|
+
onClick: _cache[4] || (_cache[4] = ($event) => closeFlyout(true))
|
|
394
|
+
}, {
|
|
395
|
+
icon: withCtx(() => [createVNode(_sfc_main$1, {
|
|
396
|
+
color: "secondary",
|
|
397
|
+
icon: "chevronLeft",
|
|
398
|
+
size: "sm"
|
|
399
|
+
})]),
|
|
400
|
+
_: 1
|
|
401
|
+
}, 8, ["label"]), renderSlot(_ctx.$slots, "default")], 8, _hoisted_3),
|
|
402
|
+
createElementVNode("div", {
|
|
403
|
+
ref: setFooter,
|
|
404
|
+
class: "astryx-dropdown-menu-region",
|
|
405
|
+
onKeydown: _cache[5] || (_cache[5] = (...args) => unref(regions).onRegionKeydown && unref(regions).onRegionKeydown(...args))
|
|
406
|
+
}, [renderSlot(_ctx.$slots, "footer")], 544)
|
|
407
|
+
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(_sfc_main$5, {
|
|
312
408
|
"has-close-on-select": false,
|
|
313
409
|
label: backLabel.value,
|
|
314
|
-
onClick: _cache[
|
|
410
|
+
onClick: _cache[6] || (_cache[6] = ($event) => closeFlyout(true))
|
|
315
411
|
}, {
|
|
316
412
|
icon: withCtx(() => [createVNode(_sfc_main$1, {
|
|
317
413
|
color: "secondary",
|
|
@@ -319,32 +415,51 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
319
415
|
size: "sm"
|
|
320
416
|
})]),
|
|
321
417
|
_: 1
|
|
322
|
-
}, 8, ["label"]), renderSlot(_ctx.$slots, "default")]),
|
|
418
|
+
}, 8, ["label"]), renderSlot(_ctx.$slots, "default")], 64))]),
|
|
323
419
|
_: 3
|
|
324
420
|
})]),
|
|
325
421
|
_: 3
|
|
326
|
-
})],
|
|
422
|
+
})], 42, _hoisted_2), [[vShow, unref(drillOnStack)]])], 8, ["to"])) : (openBlock(), createBlock(Teleport, {
|
|
327
423
|
key: 1,
|
|
328
424
|
to: unref(teleportTarget)
|
|
329
|
-
}, [withDirectives(createElementVNode("div", {
|
|
425
|
+
}, [createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- 键盘事件在面板根上接住再分发给头部、菜单和尾部,交互元素仍是里面的行和控件。 "), withDirectives(createElementVNode("div", {
|
|
330
426
|
ref_key: "flyoutRef",
|
|
331
427
|
ref: flyoutRef,
|
|
332
|
-
class: "astryx-dropdown-menu astryx-dropdown-submenu",
|
|
333
|
-
role: "menu",
|
|
428
|
+
class: normalizeClass(["astryx-dropdown-menu astryx-dropdown-submenu", { "is-frame": hasRegions.value }]),
|
|
429
|
+
role: hasRegions.value ? "dialog" : "menu",
|
|
334
430
|
"aria-label": stringLabel.value,
|
|
431
|
+
"aria-modal": hasRegions.value ? "true" : void 0,
|
|
335
432
|
"data-overflow": unref(hasOverflow) || void 0,
|
|
336
433
|
style: normalizeStyle(flyoutStyle.value),
|
|
337
434
|
tabindex: "-1",
|
|
338
435
|
onKeydown: onFlyoutKeydown,
|
|
339
|
-
onMouseenter: _cache[
|
|
340
|
-
onMouseleave: _cache[
|
|
436
|
+
onMouseenter: _cache[9] || (_cache[9] = (...args) => unref(hover).contentProps.onMouseenter && unref(hover).contentProps.onMouseenter(...args)),
|
|
437
|
+
onMouseleave: _cache[10] || (_cache[10] = (...args) => unref(hover).contentProps.onMouseleave && unref(hover).contentProps.onMouseleave(...args))
|
|
341
438
|
}, [createVNode(_sfc_main$2, null, {
|
|
342
439
|
default: withCtx(() => [createVNode(_sfc_main$4, { value: nestedContext }, {
|
|
343
|
-
default: withCtx(() => [
|
|
440
|
+
default: withCtx(() => [hasRegions.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
441
|
+
createElementVNode("div", {
|
|
442
|
+
ref: setHeader,
|
|
443
|
+
class: "astryx-dropdown-menu-region",
|
|
444
|
+
onKeydown: _cache[7] || (_cache[7] = (...args) => unref(regions).onRegionKeydown && unref(regions).onRegionKeydown(...args))
|
|
445
|
+
}, [renderSlot(_ctx.$slots, "header")], 544),
|
|
446
|
+
createElementVNode("div", {
|
|
447
|
+
ref: setRegionMenu,
|
|
448
|
+
class: "astryx-dropdown-menu-region-menu",
|
|
449
|
+
"aria-label": stringLabel.value,
|
|
450
|
+
role: "menu",
|
|
451
|
+
tabindex: "-1"
|
|
452
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_5),
|
|
453
|
+
createElementVNode("div", {
|
|
454
|
+
ref: setFooter,
|
|
455
|
+
class: "astryx-dropdown-menu-region",
|
|
456
|
+
onKeydown: _cache[8] || (_cache[8] = (...args) => unref(regions).onRegionKeydown && unref(regions).onRegionKeydown(...args))
|
|
457
|
+
}, [renderSlot(_ctx.$slots, "footer")], 544)
|
|
458
|
+
], 64)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)]),
|
|
344
459
|
_: 3
|
|
345
460
|
})]),
|
|
346
461
|
_: 3
|
|
347
|
-
})],
|
|
462
|
+
})], 46, _hoisted_4), [[vShow, flyoutOpen.value]])], 8, ["to"]))], 64);
|
|
348
463
|
};
|
|
349
464
|
}
|
|
350
465
|
});
|
|
@@ -11,7 +11,7 @@ import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
|
|
|
11
11
|
import { t as useTypeahead } from "./useTypeahead-BvtflkRk.js";
|
|
12
12
|
import { t as _sfc_main$9 } from "./LayerContentBoundary-CvsKxwwm.js";
|
|
13
13
|
import { t as useScrollbars } from "./useScrollbars-C2NJ6Qwq.js";
|
|
14
|
-
import { t as _sfc_main$10 } from "./BottomSheet-
|
|
14
|
+
import { t as _sfc_main$10 } from "./BottomSheet-itRm1Yh5.js";
|
|
15
15
|
import { t as _sfc_main$11 } from "./Item-DWMIjN8n.js";
|
|
16
16
|
import { a as dropdownMenuContextKey, i as _sfc_main$13, n as _sfc_main$12, o as useDropdownMenuContext, r as _sfc_main$14, t as useMenuDrillIn } from "./useMenuDrillIn-CjU_ZMhh.js";
|
|
17
17
|
import { n as clampInlineSize, r as isIntrinsicInlineSize, t as LAYER_MAX_INLINE_SIZE } from "./inlineSize-BNe8wggI.js";
|
|
@@ -1267,4 +1267,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
1267
1267
|
}
|
|
1268
1268
|
});
|
|
1269
1269
|
//#endregion
|
|
1270
|
-
export {
|
|
1270
|
+
export { MENU_ITEM_ROLES as a, _sfc_main$5 as c, _sfc_main$2 as i, _sfc_main$6 as l, useMenuRegions as n, activateMenuItem as o, useMenuFocus as r, _sfc_main$3 as s, _sfc_main as t };
|
package/dist/{DropdownMenuRadioItem.vue-D-VSfulY.d.ts → DropdownMenuRadioItem.vue-z0XU7pZS.d.ts}
RENAMED
|
@@ -133,6 +133,15 @@ interface DropdownMenuSubMenuEmits {
|
|
|
133
133
|
interface DropdownMenuSubMenuSlots {
|
|
134
134
|
/** The rows of the nested menu. */
|
|
135
135
|
default?: () => VNodeChild;
|
|
136
|
+
/**
|
|
137
|
+
* 行内容上方、菜单之外的内容,例如筛选这些行的输入框。
|
|
138
|
+
* 有 header 或 footer 时,子菜单的面板变成以行为名的模态对话框:
|
|
139
|
+
* 行带 `aria-haspopup="dialog"`,Tab 在头部、行、尾部之间循环,
|
|
140
|
+
* Escape 回到行,指针离开时只要焦点还在里面就不关闭。
|
|
141
|
+
*/
|
|
142
|
+
header?: () => VNodeChild;
|
|
143
|
+
/** 行内容下方、菜单之外的内容。规则和 header 相同。 */
|
|
144
|
+
footer?: () => VNodeChild;
|
|
136
145
|
icon?: () => VNodeChild;
|
|
137
146
|
label?: () => VNodeChild;
|
|
138
147
|
description?: () => VNodeChild;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _i as FileInputValue, di as _default, fi as FileInputEmits, gi as FileInputStatus, hi as FileInputSize, mi as FileInputProps, pi as FileInputMode } from "../index-
|
|
1
|
+
import { _i as FileInputValue, di as _default, fi as FileInputEmits, gi as FileInputStatus, hi as FileInputSize, mi as FileInputProps, pi as FileInputMode } from "../index-Djd6glIa.js";
|
|
2
2
|
export { _default as FileInput, type FileInputEmits, type FileInputMode, type FileInputProps, type FileInputSize, type FileInputStatus, type FileInputValue };
|
package/dist/HoverCard/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useHoverCard, t as _sfc_main } from "../HoverCard-
|
|
1
|
+
import { n as useHoverCard, t as _sfc_main } from "../HoverCard-C3zQizyS.js";
|
|
2
2
|
export { _sfc_main as HoverCard, useHoverCard };
|