完全跑通1.0版本
This commit is contained in:
6
frontend/node_modules/element-plus/es/components/roving-focus-group/index.d.ts
generated
vendored
Normal file
6
frontend/node_modules/element-plus/es/components/roving-focus-group/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import _default from "./src/roving-focus-group.vue.js";
|
||||
import _default$1 from "./src/roving-focus-item.vue.js";
|
||||
import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY, ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY } from "./src/roving-focus-group.js";
|
||||
import { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, RovingFocusGroupItemInjectionContext, RovingGroupInjectionContext } from "./src/tokens.js";
|
||||
import { focusFirst, getFocusIntent, reorderArray } from "./src/utils.js";
|
||||
export { _default as ElRovingFocusGroup, _default as default, _default$1 as ElRovingFocusItem, COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY, ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY, RovingFocusGroupItemInjectionContext, RovingGroupInjectionContext, focusFirst, getFocusIntent, reorderArray };
|
||||
11
frontend/node_modules/element-plus/es/components/roving-focus-group/index.mjs
generated
vendored
Normal file
11
frontend/node_modules/element-plus/es/components/roving-focus-group/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY, ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY as COLLECTION_ITEM_INJECTION_KEY } from "./src/roving-focus-group.mjs";
|
||||
import { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from "./src/tokens.mjs";
|
||||
import { focusFirst, getFocusIntent, reorderArray } from "./src/utils.mjs";
|
||||
import roving_focus_group_default from "./src/roving-focus-group2.mjs";
|
||||
import roving_focus_item_default from "./src/roving-focus-item.mjs";
|
||||
//#region ../../packages/components/roving-focus-group/index.ts
|
||||
var roving_focus_group_default$1 = roving_focus_group_default;
|
||||
//#endregion
|
||||
export { roving_focus_group_default as ElRovingFocusGroup, roving_focus_item_default as ElRovingFocusItem, COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY, ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY, roving_focus_group_default$1 as default, focusFirst, getFocusIntent, reorderArray };
|
||||
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["ElRovingFocusGroup"],"sources":["../../../../../packages/components/roving-focus-group/index.ts"],"sourcesContent":["// This component is ported from https://github.com/radix-ui/primitives/tree/main/packages/react/roving-focus\n// with some modification for Vue\nimport ElRovingFocusGroup from './src/roving-focus-group.vue'\nimport ElRovingFocusItem from './src/roving-focus-item.vue'\n\nexport { ElRovingFocusGroup, ElRovingFocusItem }\n\nexport * from './src/tokens'\nexport * from './src/utils'\n\nexport {\n ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n} from './src/roving-focus-group'\n\nexport default ElRovingFocusGroup\n"],"mappings":";;;;;;AAeA,IAAA,+BAAeA"}
|
||||
12
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
generated
vendored
Normal file
12
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
||||
import roving_focus_group_impl_vue_vue_type_script_lang_default from "./roving-focus-group-impl.vue_vue_type_script_lang.mjs";
|
||||
import { renderSlot } from "vue";
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-group-impl.vue
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return renderSlot(_ctx.$slots, "default");
|
||||
}
|
||||
var roving_focus_group_impl_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_group_impl_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
||||
//#endregion
|
||||
export { roving_focus_group_impl_default as default };
|
||||
|
||||
//# sourceMappingURL=roving-focus-group-impl.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
56
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts
generated
vendored
Normal file
56
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import * as _$vue from "vue";
|
||||
import { StyleValue } from "vue";
|
||||
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts
|
||||
declare const _default: typeof __VLS_export;
|
||||
declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
style: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
currentTabId: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | (((new (...args: any[]) => string) | (() => string | null)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultCurrentTabId: StringConstructor;
|
||||
loop: BooleanConstructor;
|
||||
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
||||
orientation: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
onBlur: FunctionConstructor;
|
||||
onFocus: FunctionConstructor;
|
||||
onMousedown: FunctionConstructor;
|
||||
}>, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, ("currentTabIdChange" | "entryFocus")[], "currentTabIdChange" | "entryFocus", _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
style: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
currentTabId: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | (((new (...args: any[]) => string) | (() => string | null)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultCurrentTabId: StringConstructor;
|
||||
loop: BooleanConstructor;
|
||||
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
||||
orientation: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
onBlur: FunctionConstructor;
|
||||
onFocus: FunctionConstructor;
|
||||
onMousedown: FunctionConstructor;
|
||||
}>> & Readonly<{
|
||||
onCurrentTabIdChange?: ((...args: any[]) => any) | undefined;
|
||||
onEntryFocus?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
style: StyleValue;
|
||||
loop: boolean;
|
||||
dir: string;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
115
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
115
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
import { composeEventHandlers } from "../../../utils/dom/event.mjs";
|
||||
import { ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY, rovingFocusGroupProps } from "./roving-focus-group.mjs";
|
||||
import { ROVING_FOCUS_GROUP_INJECTION_KEY } from "./tokens.mjs";
|
||||
import { focusFirst, getFocusIntent, reorderArray } from "./utils.mjs";
|
||||
import { useEventListener } from "@vueuse/core";
|
||||
import { computed, defineComponent, inject, nextTick, provide, readonly, ref, toRef, unref, watch } from "vue";
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-group-impl.vue?vue&type=script&lang.ts
|
||||
const CURRENT_TAB_ID_CHANGE_EVT = "currentTabIdChange";
|
||||
const ENTRY_FOCUS_EVT = "rovingFocusGroup.entryFocus";
|
||||
const EVT_OPTS = {
|
||||
bubbles: false,
|
||||
cancelable: true
|
||||
};
|
||||
var roving_focus_group_impl_vue_vue_type_script_lang_default = defineComponent({
|
||||
name: "ElRovingFocusGroupImpl",
|
||||
inheritAttrs: false,
|
||||
props: rovingFocusGroupProps,
|
||||
emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"],
|
||||
setup(props, { emit }) {
|
||||
const currentTabbedId = ref((props.currentTabId || props.defaultCurrentTabId) ?? null);
|
||||
const isBackingOut = ref(false);
|
||||
const isClickFocus = ref(false);
|
||||
const rovingFocusGroupRef = ref();
|
||||
const { getItems } = inject(COLLECTION_INJECTION_KEY, void 0);
|
||||
const rovingFocusGroupRootStyle = computed(() => {
|
||||
return [{ outline: "none" }, props.style];
|
||||
});
|
||||
const onItemFocus = (tabbedId) => {
|
||||
emit(CURRENT_TAB_ID_CHANGE_EVT, tabbedId);
|
||||
};
|
||||
const onItemShiftTab = () => {
|
||||
isBackingOut.value = true;
|
||||
};
|
||||
const onMousedown = composeEventHandlers((e) => {
|
||||
props.onMousedown?.(e);
|
||||
}, () => {
|
||||
isClickFocus.value = true;
|
||||
});
|
||||
const onFocus = composeEventHandlers((e) => {
|
||||
props.onFocus?.(e);
|
||||
}, (e) => {
|
||||
const isKeyboardFocus = !unref(isClickFocus);
|
||||
const { target, currentTarget } = e;
|
||||
if (target === currentTarget && isKeyboardFocus && !unref(isBackingOut)) {
|
||||
const entryFocusEvt = new Event(ENTRY_FOCUS_EVT, EVT_OPTS);
|
||||
currentTarget?.dispatchEvent(entryFocusEvt);
|
||||
if (!entryFocusEvt.defaultPrevented) {
|
||||
const items = getItems().filter((item) => item.focusable);
|
||||
focusFirst([
|
||||
items.find((item) => item.active),
|
||||
items.find((item) => item.id === unref(currentTabbedId)),
|
||||
...items
|
||||
].filter(Boolean).map((item) => item.ref));
|
||||
}
|
||||
}
|
||||
isClickFocus.value = false;
|
||||
});
|
||||
const onBlur = composeEventHandlers((e) => {
|
||||
props.onBlur?.(e);
|
||||
}, () => {
|
||||
isBackingOut.value = false;
|
||||
});
|
||||
const handleEntryFocus = (...args) => {
|
||||
emit("entryFocus", ...args);
|
||||
};
|
||||
const onKeydown = (e) => {
|
||||
const focusIntent = getFocusIntent(e);
|
||||
if (focusIntent) {
|
||||
e.preventDefault();
|
||||
let elements = getItems().filter((item) => item.focusable).map((item) => item.ref);
|
||||
switch (focusIntent) {
|
||||
case "last":
|
||||
elements.reverse();
|
||||
break;
|
||||
case "prev":
|
||||
case "next": {
|
||||
if (focusIntent === "prev") elements.reverse();
|
||||
const currentIdx = elements.indexOf(e.currentTarget);
|
||||
elements = props.loop ? reorderArray(elements, currentIdx + 1) : elements.slice(currentIdx + 1);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
nextTick(() => {
|
||||
focusFirst(elements);
|
||||
});
|
||||
}
|
||||
};
|
||||
provide(ROVING_FOCUS_GROUP_INJECTION_KEY, {
|
||||
currentTabbedId: readonly(currentTabbedId),
|
||||
loop: toRef(props, "loop"),
|
||||
tabIndex: computed(() => {
|
||||
return unref(isBackingOut) ? -1 : 0;
|
||||
}),
|
||||
rovingFocusGroupRef,
|
||||
rovingFocusGroupRootStyle,
|
||||
orientation: toRef(props, "orientation"),
|
||||
dir: toRef(props, "dir"),
|
||||
onItemFocus,
|
||||
onItemShiftTab,
|
||||
onBlur,
|
||||
onFocus,
|
||||
onMousedown,
|
||||
onKeydown
|
||||
});
|
||||
watch(() => props.currentTabId, (val) => {
|
||||
currentTabbedId.value = val ?? null;
|
||||
});
|
||||
useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus);
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { roving_focus_group_impl_vue_vue_type_script_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=roving-focus-group-impl.vue_vue_type_script_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
64
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.d.ts
generated
vendored
Normal file
64
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import { ElCollectionInjectionContext, ElCollectionItemInjectionContext } from "../../collection/src/tokens.js";
|
||||
import * as _$vue from "vue";
|
||||
import { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from "vue";
|
||||
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-group.d.ts
|
||||
declare const rovingFocusGroupProps: {
|
||||
style: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | StyleValue[]) | (() => StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
currentTabId: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | (((new (...args: any[]) => string) | (() => string | null)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultCurrentTabId: StringConstructor;
|
||||
loop: BooleanConstructor;
|
||||
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
||||
orientation: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
onBlur: FunctionConstructor;
|
||||
onFocus: FunctionConstructor;
|
||||
onMousedown: FunctionConstructor;
|
||||
};
|
||||
type ElRovingFocusGroupProps = ExtractPropTypes<typeof rovingFocusGroupProps>;
|
||||
type ElRovingFocusGroupPropsPublic = ExtractPublicPropTypes<typeof rovingFocusGroupProps>;
|
||||
declare const ElCollection: {
|
||||
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {}, true, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & _$vue.ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & {
|
||||
name: string;
|
||||
setup(): void;
|
||||
}, ElCollectionItem: {
|
||||
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {}, true, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & _$vue.ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & {
|
||||
name: string;
|
||||
setup(_: unknown, {
|
||||
attrs
|
||||
}: _$vue.SetupContext): void;
|
||||
}, COLLECTION_INJECTION_KEY: _$vue.InjectionKey<ElCollectionInjectionContext>, COLLECTION_ITEM_INJECTION_KEY: _$vue.InjectionKey<ElCollectionItemInjectionContext>;
|
||||
//#endregion
|
||||
export { ElCollection, ElCollectionItem, ElRovingFocusGroupProps, ElRovingFocusGroupPropsPublic, COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY, rovingFocusGroupProps };
|
||||
31
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs
generated
vendored
Normal file
31
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import { buildProps, definePropType } from "../../../utils/vue/props/runtime.mjs";
|
||||
import { createCollectionWithScope } from "../../collection/src/collection.mjs";
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-group.ts
|
||||
const rovingFocusGroupProps = buildProps({
|
||||
style: {
|
||||
type: definePropType([
|
||||
String,
|
||||
Array,
|
||||
Object,
|
||||
Boolean
|
||||
]),
|
||||
default: void 0
|
||||
},
|
||||
currentTabId: { type: definePropType(String) },
|
||||
defaultCurrentTabId: String,
|
||||
loop: Boolean,
|
||||
dir: {
|
||||
type: String,
|
||||
values: ["ltr", "rtl"],
|
||||
default: "ltr"
|
||||
},
|
||||
orientation: { type: definePropType(String) },
|
||||
onBlur: Function,
|
||||
onFocus: Function,
|
||||
onMousedown: Function
|
||||
});
|
||||
const { ElCollection, ElCollectionItem, COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY } = createCollectionWithScope("RovingFocusGroup");
|
||||
//#endregion
|
||||
export { ElCollection, ElCollectionItem, COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY, rovingFocusGroupProps };
|
||||
|
||||
//# sourceMappingURL=roving-focus-group.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"roving-focus-group.mjs","names":[],"sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { createCollectionWithScope } from '@element-plus/components/collection'\n\nimport type {\n ExtractPropTypes,\n ExtractPublicPropTypes,\n HTMLAttributes,\n StyleValue,\n} from 'vue'\n\nexport const rovingFocusGroupProps = buildProps({\n style: {\n type: definePropType<StyleValue>([String, Array, Object, Boolean]),\n default: undefined,\n },\n currentTabId: {\n type: definePropType<string | null>(String),\n },\n defaultCurrentTabId: String,\n loop: Boolean,\n dir: {\n type: String, // left for direction support\n values: ['ltr', 'rtl'],\n default: 'ltr',\n },\n orientation: {\n // left for orientation support\n type: definePropType<HTMLAttributes['aria-orientation']>(String),\n },\n\n onBlur: Function,\n onFocus: Function,\n onMousedown: Function,\n})\n\nexport type ElRovingFocusGroupProps = ExtractPropTypes<\n typeof rovingFocusGroupProps\n>\n\nexport type ElRovingFocusGroupPropsPublic = ExtractPublicPropTypes<\n typeof rovingFocusGroupProps\n>\n\nconst {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY,\n} = createCollectionWithScope('RovingFocusGroup')\n\nexport {\n ElCollection,\n ElCollectionItem,\n COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY,\n COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY,\n}\n"],"mappings":";;;AAUA,MAAa,wBAAwB,WAAW;CAC9C,OAAO;EACL,MAAM,eAA2B;GAAC;GAAQ;GAAO;GAAQ;GAAQ,CAAC;EAClE,SAAS,KAAA;EACV;CACD,cAAc,EACZ,MAAM,eAA8B,OAAO,EAC5C;CACD,qBAAqB;CACrB,MAAM;CACN,KAAK;EACH,MAAM;EACN,QAAQ,CAAC,OAAO,MAAM;EACtB,SAAS;EACV;CACD,aAAa,EAEX,MAAM,eAAmD,OAAO,EACjE;CAED,QAAQ;CACR,SAAS;CACT,aAAa;CACd,CAAC;AAUF,MAAM,EACJ,cACA,kBACA,0BACA,kCACE,0BAA0B,mBAAmB"}
|
||||
73
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts
generated
vendored
Normal file
73
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-group.vue.d.ts
|
||||
declare const _default: typeof __VLS_export;
|
||||
declare const __VLS_export: _$vue.DefineComponent<{}, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
|
||||
ElFocusGroupCollection: {
|
||||
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {}, true, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & _$vue.ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & {
|
||||
name: string;
|
||||
setup(): void;
|
||||
};
|
||||
ElRovingFocusGroupImpl: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
style: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
currentTabId: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | (((new (...args: any[]) => string) | (() => string | null)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultCurrentTabId: StringConstructor;
|
||||
loop: BooleanConstructor;
|
||||
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
||||
orientation: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
onBlur: FunctionConstructor;
|
||||
onFocus: FunctionConstructor;
|
||||
onMousedown: FunctionConstructor;
|
||||
}>, void, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, ("currentTabIdChange" | "entryFocus")[], "currentTabIdChange" | "entryFocus", _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
style: EpPropFinalized<(new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue) | (((new (...args: any[]) => string | false | _$vue.CSSProperties | _$vue.StyleValue[]) | (() => _$vue.StyleValue)) | null)[], unknown, unknown, undefined, boolean>;
|
||||
currentTabId: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | (((new (...args: any[]) => string) | (() => string | null)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultCurrentTabId: StringConstructor;
|
||||
loop: BooleanConstructor;
|
||||
dir: EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
||||
orientation: {
|
||||
readonly type: _$vue.PropType<EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | (((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
onBlur: FunctionConstructor;
|
||||
onFocus: FunctionConstructor;
|
||||
onMousedown: FunctionConstructor;
|
||||
}>> & Readonly<{
|
||||
onCurrentTabIdChange?: ((...args: any[]) => any) | undefined;
|
||||
onEntryFocus?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
style: _$vue.StyleValue;
|
||||
loop: boolean;
|
||||
dir: string;
|
||||
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
15
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
15
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ElCollection } from "./roving-focus-group.mjs";
|
||||
import roving_focus_group_impl_default from "./roving-focus-group-impl.mjs";
|
||||
import { defineComponent } from "vue";
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-group.vue?vue&type=script&lang.ts
|
||||
var roving_focus_group_vue_vue_type_script_lang_default = defineComponent({
|
||||
name: "ElRovingFocusGroup",
|
||||
components: {
|
||||
ElFocusGroupCollection: ElCollection,
|
||||
ElRovingFocusGroupImpl: roving_focus_group_impl_default
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { roving_focus_group_vue_vue_type_script_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=roving-focus-group.vue_vue_type_script_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"roving-focus-group.vue_vue_type_script_lang.mjs","names":[],"sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group.vue"],"sourcesContent":["<template>\n <el-focus-group-collection>\n <el-roving-focus-group-impl v-bind=\"$attrs\">\n <slot />\n </el-roving-focus-group-impl>\n </el-focus-group-collection>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport ElRovingFocusGroupImpl from './roving-focus-group-impl.vue'\nimport { ElCollection as ElFocusGroupCollection } from './roving-focus-group'\n\nexport default defineComponent({\n name: 'ElRovingFocusGroup',\n components: {\n ElFocusGroupCollection,\n ElRovingFocusGroupImpl,\n },\n})\n</script>\n"],"mappings":";;;;AAaA,IAAA,sDAAe,gBAAgB;CAC7B,MAAM;CACN,YAAY;EACV,wBAAA;EACA,wBAAA;EACD;CACF,CAAA"}
|
||||
20
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
generated
vendored
Normal file
20
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
||||
import roving_focus_group_vue_vue_type_script_lang_default from "./roving-focus-group.vue_vue_type_script_lang.mjs";
|
||||
import { createBlock, createVNode, guardReactiveProps, normalizeProps, openBlock, renderSlot, resolveComponent, withCtx } from "vue";
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-group.vue
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
const _component_el_roving_focus_group_impl = resolveComponent("el-roving-focus-group-impl");
|
||||
const _component_el_focus_group_collection = resolveComponent("el-focus-group-collection");
|
||||
return openBlock(), createBlock(_component_el_focus_group_collection, null, {
|
||||
default: withCtx(() => [createVNode(_component_el_roving_focus_group_impl, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
||||
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
||||
_: 3
|
||||
}, 16)]),
|
||||
_: 3
|
||||
});
|
||||
}
|
||||
var roving_focus_group_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_group_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
||||
//#endregion
|
||||
export { roving_focus_group_default as default };
|
||||
|
||||
//# sourceMappingURL=roving-focus-group2.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"roving-focus-group2.mjs","names":[],"sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-group.vue"],"sourcesContent":["<template>\n <el-focus-group-collection>\n <el-roving-focus-group-impl v-bind=\"$attrs\">\n <slot />\n </el-roving-focus-group-impl>\n </el-focus-group-collection>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport ElRovingFocusGroupImpl from './roving-focus-group-impl.vue'\nimport { ElCollection as ElFocusGroupCollection } from './roving-focus-group'\n\nexport default defineComponent({\n name: 'ElRovingFocusGroup',\n components: {\n ElFocusGroupCollection,\n ElRovingFocusGroupImpl,\n },\n})\n</script>\n"],"mappings":";;;;;;;qBACE,YAI4B,sCAAA,MAAA;yBADG,CAF7B,YAE6B,uCAAA,eAAA,mBAFO,KAAA,OAAM,CAAA,EAAA;0BAChC,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
|
||||
24
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
generated
vendored
Normal file
24
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
||||
import roving_focus_item_vue_vue_type_script_lang_default from "./roving-focus-item.vue_vue_type_script_lang.mjs";
|
||||
import { createBlock, openBlock, renderSlot, resolveComponent, withCtx } from "vue";
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-item.vue
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
const _component_el_roving_focus_collection_item = resolveComponent("el-roving-focus-collection-item");
|
||||
return openBlock(), createBlock(_component_el_roving_focus_collection_item, {
|
||||
id: _ctx.id,
|
||||
focusable: _ctx.focusable,
|
||||
active: _ctx.active
|
||||
}, {
|
||||
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
||||
_: 3
|
||||
}, 8, [
|
||||
"id",
|
||||
"focusable",
|
||||
"active"
|
||||
]);
|
||||
}
|
||||
var roving_focus_item_default = /* @__PURE__ */ _plugin_vue_export_helper_default(roving_focus_item_vue_vue_type_script_lang_default, [["render", _sfc_render]]);
|
||||
//#endregion
|
||||
export { roving_focus_item_default as default };
|
||||
|
||||
//# sourceMappingURL=roving-focus-item.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"roving-focus-item.mjs","names":[],"sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-item.vue"],"sourcesContent":["<template>\n <el-roving-focus-collection-item\n :id=\"id\"\n :focusable=\"focusable\"\n :active=\"active\"\n >\n <slot />\n </el-roving-focus-collection-item>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, inject, provide, ref, unref } from 'vue'\nimport { useId } from '@element-plus/hooks'\nimport { composeEventHandlers, getEventCode } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElCollectionItem as ElRovingFocusCollectionItem } from './roving-focus-group'\nimport {\n ROVING_FOCUS_GROUP_INJECTION_KEY,\n ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY,\n} from './tokens'\n\nexport default defineComponent({\n components: {\n ElRovingFocusCollectionItem,\n },\n props: {\n focusable: {\n type: Boolean,\n default: true,\n },\n active: Boolean,\n },\n emits: ['mousedown', 'focus', 'keydown'],\n setup(props, { emit }) {\n const { currentTabbedId, onItemFocus, onItemShiftTab, onKeydown } = inject(\n ROVING_FOCUS_GROUP_INJECTION_KEY,\n undefined\n )!\n\n const id = useId()\n const rovingFocusGroupItemRef = ref<HTMLElement>()\n\n const handleMousedown = composeEventHandlers(\n (e: Event) => {\n emit('mousedown', e)\n },\n (e) => {\n if (!props.focusable) {\n e.preventDefault()\n } else {\n onItemFocus(unref(id))\n }\n }\n )\n\n const handleFocus = composeEventHandlers(\n (e: Event) => {\n emit('focus', e)\n },\n () => {\n onItemFocus(unref(id))\n }\n )\n\n const handleKeydown = composeEventHandlers(\n (e: Event) => {\n emit('keydown', e)\n },\n (e) => {\n const { shiftKey, target, currentTarget } = e as KeyboardEvent\n const code = getEventCode(e as KeyboardEvent)\n\n if (code === EVENT_CODE.tab && shiftKey) {\n onItemShiftTab()\n return\n }\n if (target !== currentTarget) return\n onKeydown(e as KeyboardEvent)\n }\n )\n\n const isCurrentTab = computed(() => currentTabbedId.value === unref(id))\n\n provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {\n rovingFocusGroupItemRef,\n tabIndex: computed(() => (unref(isCurrentTab) ? 0 : -1)),\n handleMousedown,\n handleFocus,\n handleKeydown,\n })\n\n return {\n id,\n handleKeydown,\n handleFocus,\n handleMousedown,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;qBACE,YAMkC,4CAAA;EAL/B,IAAI,KAAA;EACJ,WAAW,KAAA;EACX,QAAQ,KAAA;;yBAED,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
|
||||
50
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts
generated
vendored
Normal file
50
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import * as _$vue from "vue";
|
||||
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-item.vue.d.ts
|
||||
declare const _default: typeof __VLS_export;
|
||||
declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
||||
focusable: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
active: BooleanConstructor;
|
||||
}>, {
|
||||
id: _$vue.Ref<string, string>;
|
||||
handleKeydown: (event: Event) => void;
|
||||
handleFocus: (event: Event) => void;
|
||||
handleMousedown: (event: Event) => void;
|
||||
}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, ("focus" | "keydown" | "mousedown")[], "focus" | "keydown" | "mousedown", _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
|
||||
focusable: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
active: BooleanConstructor;
|
||||
}>> & Readonly<{
|
||||
onFocus?: ((...args: any[]) => any) | undefined;
|
||||
onKeydown?: ((...args: any[]) => any) | undefined;
|
||||
onMousedown?: ((...args: any[]) => any) | undefined;
|
||||
}>, {
|
||||
active: boolean;
|
||||
focusable: boolean;
|
||||
}, {}, {
|
||||
ElRovingFocusCollectionItem: {
|
||||
new (...args: any[]): _$vue.CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, _$vue.PublicProps, {}, true, {}, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, {}, any, _$vue.ComponentProvideOptions, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
} & _$vue.ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, _$vue.GlobalComponents, _$vue.GlobalDirectives, string, _$vue.ComponentProvideOptions> & _$vue.VNodeProps & _$vue.AllowedComponentProps & _$vue.ComponentCustomProps & {
|
||||
name: string;
|
||||
setup(_: unknown, {
|
||||
attrs
|
||||
}: _$vue.SetupContext): void;
|
||||
};
|
||||
}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { _default as default };
|
||||
67
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
67
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
import { EVENT_CODE } from "../../../constants/aria.mjs";
|
||||
import { composeEventHandlers, getEventCode } from "../../../utils/dom/event.mjs";
|
||||
import { useId } from "../../../hooks/use-id/index.mjs";
|
||||
import { ElCollectionItem } from "./roving-focus-group.mjs";
|
||||
import { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from "./tokens.mjs";
|
||||
import { computed, defineComponent, inject, provide, ref, unref } from "vue";
|
||||
//#region ../../packages/components/roving-focus-group/src/roving-focus-item.vue?vue&type=script&lang.ts
|
||||
var roving_focus_item_vue_vue_type_script_lang_default = defineComponent({
|
||||
components: { ElRovingFocusCollectionItem: ElCollectionItem },
|
||||
props: {
|
||||
focusable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
active: Boolean
|
||||
},
|
||||
emits: [
|
||||
"mousedown",
|
||||
"focus",
|
||||
"keydown"
|
||||
],
|
||||
setup(props, { emit }) {
|
||||
const { currentTabbedId, onItemFocus, onItemShiftTab, onKeydown } = inject(ROVING_FOCUS_GROUP_INJECTION_KEY, void 0);
|
||||
const id = useId();
|
||||
const rovingFocusGroupItemRef = ref();
|
||||
const handleMousedown = composeEventHandlers((e) => {
|
||||
emit("mousedown", e);
|
||||
}, (e) => {
|
||||
if (!props.focusable) e.preventDefault();
|
||||
else onItemFocus(unref(id));
|
||||
});
|
||||
const handleFocus = composeEventHandlers((e) => {
|
||||
emit("focus", e);
|
||||
}, () => {
|
||||
onItemFocus(unref(id));
|
||||
});
|
||||
const handleKeydown = composeEventHandlers((e) => {
|
||||
emit("keydown", e);
|
||||
}, (e) => {
|
||||
const { shiftKey, target, currentTarget } = e;
|
||||
if (getEventCode(e) === EVENT_CODE.tab && shiftKey) {
|
||||
onItemShiftTab();
|
||||
return;
|
||||
}
|
||||
if (target !== currentTarget) return;
|
||||
onKeydown(e);
|
||||
});
|
||||
const isCurrentTab = computed(() => currentTabbedId.value === unref(id));
|
||||
provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {
|
||||
rovingFocusGroupItemRef,
|
||||
tabIndex: computed(() => unref(isCurrentTab) ? 0 : -1),
|
||||
handleMousedown,
|
||||
handleFocus,
|
||||
handleKeydown
|
||||
});
|
||||
return {
|
||||
id,
|
||||
handleKeydown,
|
||||
handleFocus,
|
||||
handleMousedown
|
||||
};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { roving_focus_item_vue_vue_type_script_lang_default as default };
|
||||
|
||||
//# sourceMappingURL=roving-focus-item.vue_vue_type_script_lang.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue_vue_type_script_lang.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"roving-focus-item.vue_vue_type_script_lang.mjs","names":[],"sources":["../../../../../../packages/components/roving-focus-group/src/roving-focus-item.vue"],"sourcesContent":["<template>\n <el-roving-focus-collection-item\n :id=\"id\"\n :focusable=\"focusable\"\n :active=\"active\"\n >\n <slot />\n </el-roving-focus-collection-item>\n</template>\n\n<script lang=\"ts\">\nimport { computed, defineComponent, inject, provide, ref, unref } from 'vue'\nimport { useId } from '@element-plus/hooks'\nimport { composeEventHandlers, getEventCode } from '@element-plus/utils'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport { ElCollectionItem as ElRovingFocusCollectionItem } from './roving-focus-group'\nimport {\n ROVING_FOCUS_GROUP_INJECTION_KEY,\n ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY,\n} from './tokens'\n\nexport default defineComponent({\n components: {\n ElRovingFocusCollectionItem,\n },\n props: {\n focusable: {\n type: Boolean,\n default: true,\n },\n active: Boolean,\n },\n emits: ['mousedown', 'focus', 'keydown'],\n setup(props, { emit }) {\n const { currentTabbedId, onItemFocus, onItemShiftTab, onKeydown } = inject(\n ROVING_FOCUS_GROUP_INJECTION_KEY,\n undefined\n )!\n\n const id = useId()\n const rovingFocusGroupItemRef = ref<HTMLElement>()\n\n const handleMousedown = composeEventHandlers(\n (e: Event) => {\n emit('mousedown', e)\n },\n (e) => {\n if (!props.focusable) {\n e.preventDefault()\n } else {\n onItemFocus(unref(id))\n }\n }\n )\n\n const handleFocus = composeEventHandlers(\n (e: Event) => {\n emit('focus', e)\n },\n () => {\n onItemFocus(unref(id))\n }\n )\n\n const handleKeydown = composeEventHandlers(\n (e: Event) => {\n emit('keydown', e)\n },\n (e) => {\n const { shiftKey, target, currentTarget } = e as KeyboardEvent\n const code = getEventCode(e as KeyboardEvent)\n\n if (code === EVENT_CODE.tab && shiftKey) {\n onItemShiftTab()\n return\n }\n if (target !== currentTarget) return\n onKeydown(e as KeyboardEvent)\n }\n )\n\n const isCurrentTab = computed(() => currentTabbedId.value === unref(id))\n\n provide(ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, {\n rovingFocusGroupItemRef,\n tabIndex: computed(() => (unref(isCurrentTab) ? 0 : -1)),\n handleMousedown,\n handleFocus,\n handleKeydown,\n })\n\n return {\n id,\n handleKeydown,\n handleFocus,\n handleMousedown,\n }\n },\n})\n</script>\n"],"mappings":";;;;;;;AAqBA,IAAA,qDAAe,gBAAgB;CAC7B,YAAY,EACV,6BAAA,kBACD;CACD,OAAO;EACL,WAAW;GACT,MAAM;GACN,SAAS;GACV;EACD,QAAQ;EACT;CACD,OAAO;EAAC;EAAa;EAAS;EAAU;CACxC,MAAM,OAAO,EAAE,QAAQ;EACrB,MAAM,EAAE,iBAAiB,aAAa,gBAAgB,cAAc,OAClE,kCACA,KAAA,EACD;EAED,MAAM,KAAK,OAAM;EACjB,MAAM,0BAA0B,KAAiB;EAEjD,MAAM,kBAAkB,sBACrB,MAAa;GACZ,KAAK,aAAa,EAAC;MAEpB,MAAM;GACL,IAAI,CAAC,MAAM,WACT,EAAE,gBAAe;QAEjB,YAAY,MAAM,GAAG,CAAA;IAG3B;EAEA,MAAM,cAAc,sBACjB,MAAa;GACZ,KAAK,SAAS,EAAC;WAEX;GACJ,YAAY,MAAM,GAAG,CAAA;IAEzB;EAEA,MAAM,gBAAgB,sBACnB,MAAa;GACZ,KAAK,WAAW,EAAC;MAElB,MAAM;GACL,MAAM,EAAE,UAAU,QAAQ,kBAAkB;GAG5C,IAFa,aAAa,EAEnB,KAAM,WAAW,OAAO,UAAU;IACvC,gBAAe;IACf;;GAEF,IAAI,WAAW,eAAe;GAC9B,UAAU,EAAkB;IAEhC;EAEA,MAAM,eAAe,eAAe,gBAAgB,UAAU,MAAM,GAAG,CAAA;EAEvE,QAAQ,uCAAuC;GAC7C;GACA,UAAU,eAAgB,MAAM,aAAY,GAAI,IAAI,GAAI;GACxD;GACA;GACA;GACD,CAAA;EAED,OAAO;GACL;GACA;GACA;GACA;GACF;;CAEH,CAAA"}
|
||||
31
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.d.ts
generated
vendored
Normal file
31
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import { ElRovingFocusGroupProps } from "./roving-focus-group.js";
|
||||
import { InjectionKey, Ref, StyleValue } from "vue";
|
||||
|
||||
//#region ../../packages/components/roving-focus-group/src/tokens.d.ts
|
||||
type EventHandler<T = Event> = (e: T) => void;
|
||||
type RovingGroupInjectionContext = {
|
||||
currentTabbedId: Ref<string | null>;
|
||||
dir: Ref<ElRovingFocusGroupProps['dir']>;
|
||||
loop: Ref<ElRovingFocusGroupProps['loop']>;
|
||||
orientation: Ref<ElRovingFocusGroupProps['orientation']>;
|
||||
tabIndex: Ref<number>;
|
||||
rovingFocusGroupRef: Ref<HTMLElement | undefined>;
|
||||
rovingFocusGroupRootStyle: Ref<StyleValue>;
|
||||
onBlur: EventHandler;
|
||||
onFocus: EventHandler<FocusEvent>;
|
||||
onMousedown: EventHandler;
|
||||
onItemFocus: (id: string) => void;
|
||||
onItemShiftTab: () => void;
|
||||
onKeydown: EventHandler<KeyboardEvent>;
|
||||
};
|
||||
type RovingFocusGroupItemInjectionContext = {
|
||||
rovingFocusGroupItemRef: Ref<HTMLElement | undefined>;
|
||||
tabIndex: Ref<number>;
|
||||
handleMousedown: EventHandler;
|
||||
handleFocus: EventHandler;
|
||||
handleKeydown: EventHandler;
|
||||
};
|
||||
declare const ROVING_FOCUS_GROUP_INJECTION_KEY: InjectionKey<RovingGroupInjectionContext>;
|
||||
declare const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY: InjectionKey<RovingFocusGroupItemInjectionContext>;
|
||||
//#endregion
|
||||
export { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY, RovingFocusGroupItemInjectionContext, RovingGroupInjectionContext };
|
||||
7
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
//#region ../../packages/components/roving-focus-group/src/tokens.ts
|
||||
const ROVING_FOCUS_GROUP_INJECTION_KEY = Symbol("elRovingFocusGroup");
|
||||
const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY = Symbol("elRovingFocusGroupItem");
|
||||
//#endregion
|
||||
export { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY };
|
||||
|
||||
//# sourceMappingURL=tokens.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tokens.mjs","names":[],"sources":["../../../../../../packages/components/roving-focus-group/src/tokens.ts"],"sourcesContent":["import type { InjectionKey, Ref, StyleValue } from 'vue'\nimport type { ElRovingFocusGroupProps } from './roving-focus-group'\n\ntype EventHandler<T = Event> = (e: T) => void\n\nexport type RovingGroupInjectionContext = {\n currentTabbedId: Ref<string | null>\n dir: Ref<ElRovingFocusGroupProps['dir']>\n loop: Ref<ElRovingFocusGroupProps['loop']>\n orientation: Ref<ElRovingFocusGroupProps['orientation']>\n tabIndex: Ref<number>\n rovingFocusGroupRef: Ref<HTMLElement | undefined>\n rovingFocusGroupRootStyle: Ref<StyleValue>\n onBlur: EventHandler\n onFocus: EventHandler<FocusEvent>\n onMousedown: EventHandler\n onItemFocus: (id: string) => void\n onItemShiftTab: () => void\n onKeydown: EventHandler<KeyboardEvent>\n}\n\nexport type RovingFocusGroupItemInjectionContext = {\n rovingFocusGroupItemRef: Ref<HTMLElement | undefined>\n tabIndex: Ref<number>\n handleMousedown: EventHandler\n handleFocus: EventHandler\n handleKeydown: EventHandler\n}\n\nexport const ROVING_FOCUS_GROUP_INJECTION_KEY: InjectionKey<RovingGroupInjectionContext> =\n Symbol('elRovingFocusGroup')\n\nexport const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY: InjectionKey<RovingFocusGroupItemInjectionContext> =\n Symbol('elRovingFocusGroupItem')\n"],"mappings":";AA6BA,MAAa,mCACX,OAAO,qBAAqB;AAE9B,MAAa,wCACX,OAAO,yBAAyB"}
|
||||
11
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.d.ts
generated
vendored
Normal file
11
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { HTMLAttributes } from "vue";
|
||||
|
||||
//#region ../../packages/components/roving-focus-group/src/utils.d.ts
|
||||
type Orientation = HTMLAttributes['aria-orientation'];
|
||||
type Direction = 'ltr' | 'rtl';
|
||||
type FocusIntent = 'first' | 'last' | 'prev' | 'next';
|
||||
declare const getFocusIntent: (event: KeyboardEvent, orientation?: Orientation, dir?: Direction) => FocusIntent | undefined;
|
||||
declare const reorderArray: <T>(array: T[], atIdx: number) => T[];
|
||||
declare const focusFirst: (elements: HTMLElement[]) => void;
|
||||
//#endregion
|
||||
export { focusFirst, getFocusIntent, reorderArray };
|
||||
42
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
generated
vendored
Normal file
42
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import { EVENT_CODE } from "../../../constants/aria.mjs";
|
||||
import { getEventCode } from "../../../utils/dom/event.mjs";
|
||||
//#region ../../packages/components/roving-focus-group/src/utils.ts
|
||||
const MAP_KEY_TO_FOCUS_INTENT = {
|
||||
ArrowLeft: "prev",
|
||||
ArrowUp: "prev",
|
||||
ArrowRight: "next",
|
||||
ArrowDown: "next",
|
||||
PageUp: "first",
|
||||
Home: "first",
|
||||
PageDown: "last",
|
||||
End: "last"
|
||||
};
|
||||
const getDirectionAwareKey = (key, dir) => {
|
||||
if (dir !== "rtl") return key;
|
||||
switch (key) {
|
||||
case EVENT_CODE.right: return EVENT_CODE.left;
|
||||
case EVENT_CODE.left: return EVENT_CODE.right;
|
||||
default: return key;
|
||||
}
|
||||
};
|
||||
const getFocusIntent = (event, orientation, dir) => {
|
||||
const key = getDirectionAwareKey(getEventCode(event), dir);
|
||||
if (orientation === "vertical" && [EVENT_CODE.left, EVENT_CODE.right].includes(key)) return void 0;
|
||||
if (orientation === "horizontal" && [EVENT_CODE.up, EVENT_CODE.down].includes(key)) return void 0;
|
||||
return MAP_KEY_TO_FOCUS_INTENT[key];
|
||||
};
|
||||
const reorderArray = (array, atIdx) => {
|
||||
return array.map((_, idx) => array[(idx + atIdx) % array.length]);
|
||||
};
|
||||
const focusFirst = (elements) => {
|
||||
const { activeElement: prevActive } = document;
|
||||
for (const element of elements) {
|
||||
if (element === prevActive) return;
|
||||
element.focus();
|
||||
if (prevActive !== document.activeElement) return;
|
||||
}
|
||||
};
|
||||
//#endregion
|
||||
export { focusFirst, getFocusIntent, reorderArray };
|
||||
|
||||
//# sourceMappingURL=utils.mjs.map
|
||||
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.mjs","names":[],"sources":["../../../../../../packages/components/roving-focus-group/src/utils.ts"],"sourcesContent":["import { EVENT_CODE } from '@element-plus/constants'\nimport { getEventCode } from '@element-plus/utils'\n\nimport type { HTMLAttributes } from 'vue'\n\ntype Orientation = HTMLAttributes['aria-orientation']\ntype Direction = 'ltr' | 'rtl'\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next'\n\nconst MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent> = {\n ArrowLeft: 'prev',\n ArrowUp: 'prev',\n ArrowRight: 'next',\n ArrowDown: 'next',\n PageUp: 'first',\n Home: 'first',\n PageDown: 'last',\n End: 'last',\n}\n\nconst getDirectionAwareKey = (key: string, dir?: Direction) => {\n if (dir !== 'rtl') return key\n\n switch (key) {\n case EVENT_CODE.right:\n return EVENT_CODE.left\n case EVENT_CODE.left:\n return EVENT_CODE.right\n default:\n return key\n }\n}\n\nexport const getFocusIntent = (\n event: KeyboardEvent,\n orientation?: Orientation,\n dir?: Direction\n) => {\n const code = getEventCode(event)\n const key = getDirectionAwareKey(code, dir)\n if (\n orientation === 'vertical' &&\n [EVENT_CODE.left, EVENT_CODE.right].includes(key)\n )\n return undefined\n if (\n orientation === 'horizontal' &&\n [EVENT_CODE.up, EVENT_CODE.down].includes(key)\n )\n return undefined\n return MAP_KEY_TO_FOCUS_INTENT[key]\n}\n\nexport const reorderArray = <T>(array: T[], atIdx: number) => {\n return array.map((_, idx) => array[(idx + atIdx) % array.length])\n}\n\nexport const focusFirst = (elements: HTMLElement[]) => {\n const { activeElement: prevActive } = document\n\n for (const element of elements) {\n if (element === prevActive) return\n element.focus()\n if (prevActive !== document.activeElement) return\n }\n}\n"],"mappings":";;;AASA,MAAM,0BAAuD;CAC3D,WAAW;CACX,SAAS;CACT,YAAY;CACZ,WAAW;CACX,QAAQ;CACR,MAAM;CACN,UAAU;CACV,KAAK;CACN;AAED,MAAM,wBAAwB,KAAa,QAAoB;CAC7D,IAAI,QAAQ,OAAO,OAAO;CAE1B,QAAQ,KAAR;EACE,KAAK,WAAW,OACd,OAAO,WAAW;EACpB,KAAK,WAAW,MACd,OAAO,WAAW;EACpB,SACE,OAAO;;;AAIb,MAAa,kBACX,OACA,aACA,QACG;CAEH,MAAM,MAAM,qBADC,aAAa,MACW,EAAE,IAAI;CAC3C,IACE,gBAAgB,cAChB,CAAC,WAAW,MAAM,WAAW,MAAM,CAAC,SAAS,IAAI,EAEjD,OAAO,KAAA;CACT,IACE,gBAAgB,gBAChB,CAAC,WAAW,IAAI,WAAW,KAAK,CAAC,SAAS,IAAI,EAE9C,OAAO,KAAA;CACT,OAAO,wBAAwB;;AAGjC,MAAa,gBAAmB,OAAY,UAAkB;CAC5D,OAAO,MAAM,KAAK,GAAG,QAAQ,OAAO,MAAM,SAAS,MAAM,QAAQ;;AAGnE,MAAa,cAAc,aAA4B;CACrD,MAAM,EAAE,eAAe,eAAe;CAEtC,KAAK,MAAM,WAAW,UAAU;EAC9B,IAAI,YAAY,YAAY;EAC5B,QAAQ,OAAO;EACf,IAAI,eAAe,SAAS,eAAe"}
|
||||
Reference in New Issue
Block a user