测试
This commit is contained in:
7
frontend/node_modules/element-plus/es/components/roving-focus-group/index.d.ts
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/roving-focus-group/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import ElRovingFocusGroup from './src/roving-focus-group.vue';
|
||||
import ElRovingFocusItem from './src/roving-focus-item.vue';
|
||||
export { ElRovingFocusGroup, ElRovingFocusItem };
|
||||
export * from './src/tokens';
|
||||
export * from './src/utils';
|
||||
export { ROVING_FOCUS_COLLECTION_INJECTION_KEY, ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY, } from './src/roving-focus-group';
|
||||
export default ElRovingFocusGroup;
|
||||
7
frontend/node_modules/element-plus/es/components/roving-focus-group/index.mjs
generated
vendored
Normal file
7
frontend/node_modules/element-plus/es/components/roving-focus-group/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import ElRovingFocusGroup from './src/roving-focus-group2.mjs';
|
||||
export { default as ElRovingFocusGroup, default } from './src/roving-focus-group2.mjs';
|
||||
export { default as ElRovingFocusItem } from './src/roving-focus-item.mjs';
|
||||
export { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from './src/tokens.mjs';
|
||||
export { focusFirst, getFocusIntent, reorderArray } from './src/utils.mjs';
|
||||
export { ROVING_FOCUS_COLLECTION_INJECTION_KEY, ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY } from './src/roving-focus-group.mjs';
|
||||
//# 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","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
||||
128
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
generated
vendored
Normal file
128
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.mjs
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
import { defineComponent, ref, inject, computed, provide, readonly, toRef, unref, watch, nextTick, renderSlot } from 'vue';
|
||||
import { useEventListener } from '@vueuse/core';
|
||||
import { rovingFocusGroupProps, ROVING_FOCUS_COLLECTION_INJECTION_KEY as COLLECTION_INJECTION_KEY } from './roving-focus-group.mjs';
|
||||
import { ROVING_FOCUS_GROUP_INJECTION_KEY } from './tokens.mjs';
|
||||
import { getFocusIntent, reorderArray, focusFirst } from './utils.mjs';
|
||||
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
||||
import { composeEventHandlers } from '../../../utils/dom/event.mjs';
|
||||
|
||||
const CURRENT_TAB_ID_CHANGE_EVT = "currentTabIdChange";
|
||||
const ENTRY_FOCUS_EVT = "rovingFocusGroup.entryFocus";
|
||||
const EVT_OPTS = { bubbles: false, cancelable: true };
|
||||
const _sfc_main = defineComponent({
|
||||
name: "ElRovingFocusGroupImpl",
|
||||
inheritAttrs: false,
|
||||
props: rovingFocusGroupProps,
|
||||
emits: [CURRENT_TAB_ID_CHANGE_EVT, "entryFocus"],
|
||||
setup(props, { emit }) {
|
||||
var _a;
|
||||
const currentTabbedId = ref((_a = props.currentTabId || props.defaultCurrentTabId) != null ? _a : 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) => {
|
||||
var _a2;
|
||||
(_a2 = props.onMousedown) == null ? void 0 : _a2.call(props, e);
|
||||
}, () => {
|
||||
isClickFocus.value = true;
|
||||
});
|
||||
const onFocus = composeEventHandlers((e) => {
|
||||
var _a2;
|
||||
(_a2 = props.onFocus) == null ? void 0 : _a2.call(props, 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 == null ? void 0 : currentTarget.dispatchEvent(entryFocusEvt);
|
||||
if (!entryFocusEvt.defaultPrevented) {
|
||||
const items = getItems().filter((item) => item.focusable);
|
||||
const activeItem = items.find((item) => item.active);
|
||||
const currentItem = items.find((item) => item.id === unref(currentTabbedId));
|
||||
const candidates = [activeItem, currentItem, ...items].filter(Boolean);
|
||||
const candidateNodes = candidates.map((item) => item.ref);
|
||||
focusFirst(candidateNodes);
|
||||
}
|
||||
}
|
||||
isClickFocus.value = false;
|
||||
});
|
||||
const onBlur = composeEventHandlers((e) => {
|
||||
var _a2;
|
||||
(_a2 = props.onBlur) == null ? void 0 : _a2.call(props, e);
|
||||
}, () => {
|
||||
isBackingOut.value = false;
|
||||
});
|
||||
const handleEntryFocus = (...args) => {
|
||||
emit("entryFocus", ...args);
|
||||
};
|
||||
const onKeydown = (e) => {
|
||||
const focusIntent = getFocusIntent(e);
|
||||
if (focusIntent) {
|
||||
e.preventDefault();
|
||||
const items = getItems().filter((item) => item.focusable);
|
||||
let elements = items.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;
|
||||
}
|
||||
}
|
||||
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 ? val : null;
|
||||
});
|
||||
useEventListener(rovingFocusGroupRef, ENTRY_FOCUS_EVT, handleEntryFocus);
|
||||
}
|
||||
});
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return renderSlot(_ctx.$slots, "default");
|
||||
}
|
||||
var ElRovingFocusGroupImpl = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "roving-focus-group-impl.vue"]]);
|
||||
|
||||
export { ElRovingFocusGroupImpl 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
59
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts
generated
vendored
Normal file
59
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,59 @@
|
||||
import type { StyleValue } from 'vue';
|
||||
declare const _default: import("vue").DefineComponent<{
|
||||
style: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
currentTabId: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | ((new (...args: any[]) => string) | (() => string | null))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultCurrentTabId: StringConstructor;
|
||||
loop: BooleanConstructor;
|
||||
dir: import("element-plus/es/utils").EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
||||
orientation: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | ((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
onBlur: FunctionConstructor;
|
||||
onFocus: FunctionConstructor;
|
||||
onMousedown: FunctionConstructor;
|
||||
}, void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("currentTabIdChange" | "entryFocus")[], "currentTabIdChange" | "entryFocus", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
style: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
currentTabId: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | ((new (...args: any[]) => string) | (() => string | null))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultCurrentTabId: StringConstructor;
|
||||
loop: BooleanConstructor;
|
||||
dir: import("element-plus/es/utils").EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
||||
orientation: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | ((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
onBlur: FunctionConstructor;
|
||||
onFocus: FunctionConstructor;
|
||||
onMousedown: FunctionConstructor;
|
||||
}>> & {
|
||||
onCurrentTabIdChange?: ((...args: any[]) => any) | undefined;
|
||||
onEntryFocus?: ((...args: any[]) => any) | undefined;
|
||||
}, {
|
||||
dir: string;
|
||||
loop: boolean;
|
||||
}>;
|
||||
export default _default;
|
||||
217
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.d.ts
generated
vendored
Normal file
217
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.d.ts
generated
vendored
Normal file
@@ -0,0 +1,217 @@
|
||||
import type { ExtractPropTypes, StyleValue, __ExtractPublicPropTypes } from 'vue';
|
||||
export declare const rovingFocusGroupProps: {
|
||||
style: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue) | ((new (...args: any[]) => string | import("vue").CSSProperties | StyleValue[]) | (() => StyleValue))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
currentTabId: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string) | (() => string | null) | ((new (...args: any[]) => string) | (() => string | null))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
defaultCurrentTabId: StringConstructor;
|
||||
loop: BooleanConstructor;
|
||||
dir: import("element-plus/es/utils").EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
|
||||
orientation: {
|
||||
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined) | ((new (...args: any[]) => "horizontal" | "vertical") | (() => "horizontal" | "vertical" | undefined))[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
onBlur: FunctionConstructor;
|
||||
onFocus: FunctionConstructor;
|
||||
onMousedown: FunctionConstructor;
|
||||
};
|
||||
export type ElRovingFocusGroupProps = ExtractPropTypes<typeof rovingFocusGroupProps>;
|
||||
export type ElRovingFocusGroupPropsPublic = __ExtractPublicPropTypes<typeof rovingFocusGroupProps>;
|
||||
declare const ElCollection: {
|
||||
name: string;
|
||||
setup(): void;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
template?: string | object;
|
||||
render?: Function;
|
||||
components?: Record<string, import("vue").Component>;
|
||||
directives?: Record<string, import("vue").Directive>;
|
||||
inheritAttrs?: boolean;
|
||||
emits?: (import("vue").EmitsOptions & ThisType<void>) | undefined;
|
||||
expose?: string[];
|
||||
serverPrefetch?(): Promise<any>;
|
||||
compilerOptions?: import("vue").RuntimeCompilerOptions;
|
||||
call?: (this: unknown, ...args: unknown[]) => never;
|
||||
__defaults?: {} | undefined;
|
||||
compatConfig?: Partial<Record<import("vue").DeprecationTypes, boolean | "suppress-warning">> & {
|
||||
MODE?: 2 | 3 | ((comp: import("vue").Component | null) => 2 | 3);
|
||||
};
|
||||
data?: ((this: import("vue").CreateComponentPublicInstance<Readonly<ExtractPropTypes<{}>>, {}, {}, {}, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, Readonly<ExtractPropTypes<{}>>, {}, false, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<ExtractPropTypes<{}>>, {}, {}, {}, import("vue").MethodOptions, {}>, vm: import("vue").CreateComponentPublicInstance<Readonly<ExtractPropTypes<{}>>, {}, {}, {}, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, Readonly<ExtractPropTypes<{}>>, {}, false, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<ExtractPropTypes<{}>>, {}, {}, {}, import("vue").MethodOptions, {}>) => {}) | undefined;
|
||||
computed?: {} | undefined;
|
||||
methods?: {} | undefined;
|
||||
watch?: {
|
||||
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
||||
handler: import("vue").WatchCallback | string;
|
||||
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
||||
handler: import("vue").WatchCallback | string;
|
||||
} & import("vue").WatchOptions<boolean>))[];
|
||||
};
|
||||
provide?: import("vue").ComponentProvideOptions;
|
||||
inject?: string[] | {
|
||||
[x: string]: string | symbol | {
|
||||
from?: string | symbol;
|
||||
default?: unknown;
|
||||
};
|
||||
[x: symbol]: string | symbol | {
|
||||
from?: string | symbol;
|
||||
default?: unknown;
|
||||
};
|
||||
};
|
||||
filters?: Record<string, Function>;
|
||||
mixins?: import("vue").ComponentOptionsMixin[] | undefined;
|
||||
extends?: import("vue").ComponentOptionsMixin | undefined;
|
||||
beforeCreate?(): void;
|
||||
created?(): void;
|
||||
beforeMount?(): void;
|
||||
mounted?(): void;
|
||||
beforeUpdate?(): void;
|
||||
updated?(): void;
|
||||
activated?(): void;
|
||||
deactivated?(): void;
|
||||
beforeDestroy?(): void;
|
||||
beforeUnmount?(): void;
|
||||
destroyed?(): void;
|
||||
unmounted?(): void;
|
||||
renderTracked?: (e: import("vue").DebuggerEvent) => void;
|
||||
renderTriggered?: (e: import("vue").DebuggerEvent) => void;
|
||||
errorCaptured?: (err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void;
|
||||
delimiters?: [string, string];
|
||||
__differentiator?: undefined;
|
||||
__isBuiltIn?: boolean;
|
||||
__file?: string;
|
||||
__name?: string;
|
||||
beforeRouteEnter?: import("vue-router").NavigationGuardWithThis<undefined>;
|
||||
beforeRouteUpdate?: import("vue-router").NavigationGuard;
|
||||
beforeRouteLeave?: import("vue-router").NavigationGuard;
|
||||
key?: string | number | symbol;
|
||||
ref?: import("vue").VNodeRef;
|
||||
ref_for?: boolean;
|
||||
ref_key?: string;
|
||||
onVnodeBeforeMount?: ((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[];
|
||||
onVnodeMounted?: ((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[];
|
||||
onVnodeBeforeUpdate?: ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[];
|
||||
onVnodeUpdated?: ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[];
|
||||
onVnodeBeforeUnmount?: ((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[];
|
||||
onVnodeUnmounted?: ((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[];
|
||||
class?: unknown;
|
||||
style?: unknown;
|
||||
}, ElCollectionItem: {
|
||||
name: string;
|
||||
setup(_: unknown, { attrs }: import("vue").SetupContext): void;
|
||||
__isFragment?: never;
|
||||
__isTeleport?: never;
|
||||
__isSuspense?: never;
|
||||
template?: string | object;
|
||||
render?: Function;
|
||||
components?: Record<string, import("vue").Component>;
|
||||
directives?: Record<string, import("vue").Directive>;
|
||||
inheritAttrs?: boolean;
|
||||
emits?: (import("vue").EmitsOptions & ThisType<void>) | undefined;
|
||||
expose?: string[];
|
||||
serverPrefetch?(): Promise<any>;
|
||||
compilerOptions?: import("vue").RuntimeCompilerOptions;
|
||||
call?: (this: unknown, ...args: unknown[]) => never;
|
||||
__defaults?: {} | undefined;
|
||||
compatConfig?: Partial<Record<import("vue").DeprecationTypes, boolean | "suppress-warning">> & {
|
||||
MODE?: 2 | 3 | ((comp: import("vue").Component | null) => 2 | 3);
|
||||
};
|
||||
data?: ((this: import("vue").CreateComponentPublicInstance<Readonly<ExtractPropTypes<{}>>, {}, {}, {}, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, Readonly<ExtractPropTypes<{}>>, {}, false, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<ExtractPropTypes<{}>>, {}, {}, {}, import("vue").MethodOptions, {}>, vm: import("vue").CreateComponentPublicInstance<Readonly<ExtractPropTypes<{}>>, {}, {}, {}, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, Readonly<ExtractPropTypes<{}>>, {}, false, {
|
||||
P: {};
|
||||
B: {};
|
||||
D: {};
|
||||
C: {};
|
||||
M: {};
|
||||
Defaults: {};
|
||||
}, Readonly<ExtractPropTypes<{}>>, {}, {}, {}, import("vue").MethodOptions, {}>) => {}) | undefined;
|
||||
computed?: {} | undefined;
|
||||
methods?: {} | undefined;
|
||||
watch?: {
|
||||
[x: string]: (string | import("vue").WatchCallback<any, any> | ({
|
||||
handler: import("vue").WatchCallback | string;
|
||||
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback<any, any> | ({
|
||||
handler: import("vue").WatchCallback | string;
|
||||
} & import("vue").WatchOptions<boolean>))[];
|
||||
};
|
||||
provide?: import("vue").ComponentProvideOptions;
|
||||
inject?: string[] | {
|
||||
[x: string]: string | symbol | {
|
||||
from?: string | symbol;
|
||||
default?: unknown;
|
||||
};
|
||||
[x: symbol]: string | symbol | {
|
||||
from?: string | symbol;
|
||||
default?: unknown;
|
||||
};
|
||||
};
|
||||
filters?: Record<string, Function>;
|
||||
mixins?: import("vue").ComponentOptionsMixin[] | undefined;
|
||||
extends?: import("vue").ComponentOptionsMixin | undefined;
|
||||
beforeCreate?(): void;
|
||||
created?(): void;
|
||||
beforeMount?(): void;
|
||||
mounted?(): void;
|
||||
beforeUpdate?(): void;
|
||||
updated?(): void;
|
||||
activated?(): void;
|
||||
deactivated?(): void;
|
||||
beforeDestroy?(): void;
|
||||
beforeUnmount?(): void;
|
||||
destroyed?(): void;
|
||||
unmounted?(): void;
|
||||
renderTracked?: (e: import("vue").DebuggerEvent) => void;
|
||||
renderTriggered?: (e: import("vue").DebuggerEvent) => void;
|
||||
errorCaptured?: (err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void;
|
||||
delimiters?: [string, string];
|
||||
__differentiator?: undefined;
|
||||
__isBuiltIn?: boolean;
|
||||
__file?: string;
|
||||
__name?: string;
|
||||
beforeRouteEnter?: import("vue-router").NavigationGuardWithThis<undefined>;
|
||||
beforeRouteUpdate?: import("vue-router").NavigationGuard;
|
||||
beforeRouteLeave?: import("vue-router").NavigationGuard;
|
||||
key?: string | number | symbol;
|
||||
ref?: import("vue").VNodeRef;
|
||||
ref_for?: boolean;
|
||||
ref_key?: string;
|
||||
onVnodeBeforeMount?: ((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[];
|
||||
onVnodeMounted?: ((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[];
|
||||
onVnodeBeforeUpdate?: ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[];
|
||||
onVnodeUpdated?: ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void) | ((vnode: import("vue").VNode, oldVNode: import("vue").VNode) => void)[];
|
||||
onVnodeBeforeUnmount?: ((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[];
|
||||
onVnodeUnmounted?: ((vnode: import("vue").VNode) => void) | ((vnode: import("vue").VNode) => void)[];
|
||||
class?: unknown;
|
||||
style?: unknown;
|
||||
}, COLLECTION_INJECTION_KEY: import("vue").InjectionKey<import("element-plus/es/components/collection").ElCollectionInjectionContext>, COLLECTION_ITEM_INJECTION_KEY: import("vue").InjectionKey<import("element-plus/es/components/collection").ElCollectionItemInjectionContext>;
|
||||
export { ElCollection, ElCollectionItem, COLLECTION_INJECTION_KEY as ROVING_FOCUS_COLLECTION_INJECTION_KEY, COLLECTION_ITEM_INJECTION_KEY as ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY, };
|
||||
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 { createCollectionWithScope } from '../../collection/src/collection.mjs';
|
||||
import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
|
||||
|
||||
const rovingFocusGroupProps = buildProps({
|
||||
style: { type: definePropType([String, Array, Object]) },
|
||||
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");
|
||||
|
||||
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","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 HTMLAttributes,\n StyleValue,\n __ExtractPublicPropTypes,\n} from 'vue'\n\nexport const rovingFocusGroupProps = buildProps({\n style: { type: definePropType<StyleValue>([String, Array, Object]) },\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"],"names":[],"mappings":";;;AAEY,MAAC,qBAAqB,GAAG,UAAU,CAAC;AAChD,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,EAAE;AAC1D,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,mBAAmB,EAAE,MAAM;AAC7B,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,GAAG,EAAE;AACP,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;AAC1B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,MAAM,EAAE,QAAQ;AAClB,EAAE,OAAO,EAAE,QAAQ;AACnB,EAAE,WAAW,EAAE,QAAQ;AACvB,CAAC,EAAE;AACE,MAAC;AACN,EAAE,YAAY;AACd,EAAE,gBAAgB;AAClB,EAAE,wBAAwB;AAC1B,EAAE,6BAA6B;AAC/B,CAAC,GAAG,yBAAyB,CAAC,kBAAkB;;;;"}
|
||||
2
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts
generated
vendored
Normal file
2
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
||||
export default _default;
|
||||
31
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
generated
vendored
Normal file
31
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-group2.mjs
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, renderSlot } from 'vue';
|
||||
import ElRovingFocusGroupImpl from './roving-focus-group-impl.mjs';
|
||||
import { ElCollection } from './roving-focus-group.mjs';
|
||||
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
||||
|
||||
const _sfc_main = defineComponent({
|
||||
name: "ElRovingFocusGroup",
|
||||
components: {
|
||||
ElFocusGroupCollection: ElCollection,
|
||||
ElRovingFocusGroupImpl
|
||||
}
|
||||
});
|
||||
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 ElRovingFocusGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "roving-focus-group.vue"]]);
|
||||
|
||||
export { ElRovingFocusGroup 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","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"],"names":["ElFocusGroupCollection","_createBlock","_withCtx","_createVNode","_normalizeProps","_guardReactiveProps","_renderSlot"],"mappings":";;;;;AAaA,MAAK,YAAa,eAAa,CAAA;AAAA,EAC7B,IAAM,EAAA,oBAAA;AAAA,EACN,UAAY,EAAA;AAAA,4BACVA,YAAA;AAAA,IACA,sBAAA;AAAA,GACF;AACF,CAAC,CAAA,CAAA;;;;sBAlBCC,WAI4B,CAAA,oCAAA,EAAA,IAAA,EAAA;AAAA,IAAA,OAAA,EAAAC,OAAA,CAH1B,MAE6B;AAAA,MAF7BC,WAAA,CAAA,qCAAA,EAAAC,cAAA,CAAAC,kBAAA,CAAA,IAAA,CAAA,MAAA,CAAA,CAAA,EAAA;AAAA,QAE6B,OAAA,EAAAH,OAAA,CAAA,MAAA;AAAA,UAAAI,UAAA,CAAA,IAAA,CAAA,MAAA,EAAA,SAFO,CAAM;AAAA,SAAA,CAAA;AAAA,QAAA,CAAA,EAAA,CAAA;AAChC,OAAA,EAAA,EAAA,CAAR;AAAQ,KAAA,CAAA;;;;;;;;"}
|
||||
84
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
generated
vendored
Normal file
84
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.mjs
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
import { defineComponent, inject, ref, computed, unref, provide, resolveComponent, openBlock, createBlock, withCtx, renderSlot } from 'vue';
|
||||
import { ElCollectionItem } from './roving-focus-group.mjs';
|
||||
import { ROVING_FOCUS_GROUP_INJECTION_KEY, ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY } from './tokens.mjs';
|
||||
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
||||
import { useId } from '../../../hooks/use-id/index.mjs';
|
||||
import { composeEventHandlers, getEventCode } from '../../../utils/dom/event.mjs';
|
||||
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
||||
|
||||
const _sfc_main = 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;
|
||||
const code = getEventCode(e);
|
||||
if (code === 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
|
||||
};
|
||||
}
|
||||
});
|
||||
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 ElRovingFocusItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "roving-focus-item.vue"]]);
|
||||
|
||||
export { ElRovingFocusItem 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
File diff suppressed because one or more lines are too long
26
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts
generated
vendored
Normal file
26
frontend/node_modules/element-plus/es/components/roving-focus-group/src/roving-focus-item.vue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
declare const _default: import("vue").DefineComponent<{
|
||||
focusable: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
active: BooleanConstructor;
|
||||
}, {
|
||||
id: import("vue").Ref<string>;
|
||||
handleKeydown: (event: Event) => void;
|
||||
handleFocus: (event: Event) => void;
|
||||
handleMousedown: (event: Event) => void;
|
||||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "keydown" | "mousedown")[], "focus" | "keydown" | "mousedown", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
||||
focusable: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
active: BooleanConstructor;
|
||||
}>> & {
|
||||
onFocus?: ((...args: any[]) => any) | undefined;
|
||||
onKeydown?: ((...args: any[]) => any) | undefined;
|
||||
onMousedown?: ((...args: any[]) => any) | undefined;
|
||||
}, {
|
||||
active: boolean;
|
||||
focusable: boolean;
|
||||
}>;
|
||||
export default _default;
|
||||
28
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.d.ts
generated
vendored
Normal file
28
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { InjectionKey, Ref, StyleValue } from 'vue';
|
||||
import type { ElRovingFocusGroupProps } from './roving-focus-group';
|
||||
type EventHandler<T = Event> = (e: T) => void;
|
||||
export 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>;
|
||||
};
|
||||
export type RovingFocusGroupItemInjectionContext = {
|
||||
rovingFocusGroupItemRef: Ref<HTMLElement | undefined>;
|
||||
tabIndex: Ref<number>;
|
||||
handleMousedown: EventHandler;
|
||||
handleFocus: EventHandler;
|
||||
handleKeydown: EventHandler;
|
||||
};
|
||||
export declare const ROVING_FOCUS_GROUP_INJECTION_KEY: InjectionKey<RovingGroupInjectionContext>;
|
||||
export declare const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY: InjectionKey<RovingFocusGroupItemInjectionContext>;
|
||||
export {};
|
||||
5
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
generated
vendored
Normal file
5
frontend/node_modules/element-plus/es/components/roving-focus-group/src/tokens.mjs
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
const ROVING_FOCUS_GROUP_INJECTION_KEY = Symbol("elRovingFocusGroup");
|
||||
const ROVING_FOCUS_GROUP_ITEM_INJECTION_KEY = Symbol("elRovingFocusGroupItem");
|
||||
|
||||
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","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"],"names":[],"mappings":"AAAY,MAAC,gCAAgC,GAAG,MAAM,CAAC,oBAAoB,EAAE;AACjE,MAAC,qCAAqC,GAAG,MAAM,CAAC,wBAAwB;;;;"}
|
||||
8
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.d.ts
generated
vendored
Normal file
8
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { HTMLAttributes } from 'vue';
|
||||
type Orientation = HTMLAttributes['aria-orientation'];
|
||||
type Direction = 'ltr' | 'rtl';
|
||||
type FocusIntent = 'first' | 'last' | 'prev' | 'next';
|
||||
export declare const getFocusIntent: (event: KeyboardEvent, orientation?: Orientation, dir?: Direction) => FocusIntent | undefined;
|
||||
export declare const reorderArray: <T>(array: T[], atIdx: number) => T[];
|
||||
export declare const focusFirst: (elements: HTMLElement[]) => void;
|
||||
export {};
|
||||
50
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
generated
vendored
Normal file
50
frontend/node_modules/element-plus/es/components/roving-focus-group/src/utils.mjs
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import { getEventCode } from '../../../utils/dom/event.mjs';
|
||||
import { EVENT_CODE } from '../../../constants/aria.mjs';
|
||||
|
||||
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 code = getEventCode(event);
|
||||
const key = getDirectionAwareKey(code, 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;
|
||||
}
|
||||
};
|
||||
|
||||
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","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"],"names":[],"mappings":";;;AAEA,MAAM,uBAAuB,GAAG;AAChC,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,OAAO,EAAE,MAAM;AACjB,EAAE,UAAU,EAAE,MAAM;AACpB,EAAE,SAAS,EAAE,MAAM;AACnB,EAAE,MAAM,EAAE,OAAO;AACjB,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,QAAQ,EAAE,MAAM;AAClB,EAAE,GAAG,EAAE,MAAM;AACb,CAAC,CAAC;AACF,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK;AAC3C,EAAE,IAAI,GAAG,KAAK,KAAK;AACnB,IAAI,OAAO,GAAG,CAAC;AACf,EAAE,QAAQ,GAAG;AACb,IAAI,KAAK,UAAU,CAAC,KAAK;AACzB,MAAM,OAAO,UAAU,CAAC,IAAI,CAAC;AAC7B,IAAI,KAAK,UAAU,CAAC,IAAI;AACxB,MAAM,OAAO,UAAU,CAAC,KAAK,CAAC;AAC9B,IAAI;AACJ,MAAM,OAAO,GAAG,CAAC;AACjB,GAAG;AACH,CAAC,CAAC;AACU,MAAC,cAAc,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK;AAC3D,EAAE,MAAM,IAAI,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;AACnC,EAAE,MAAM,GAAG,GAAG,oBAAoB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC9C,EAAE,IAAI,WAAW,KAAK,UAAU,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;AACrF,IAAI,OAAO,KAAK,CAAC,CAAC;AAClB,EAAE,IAAI,WAAW,KAAK,YAAY,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;AACpF,IAAI,OAAO,KAAK,CAAC,CAAC;AAClB,EAAE,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;AACtC,EAAE;AACU,MAAC,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK;AAC9C,EAAE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC,GAAG,GAAG,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACpE,EAAE;AACU,MAAC,UAAU,GAAG,CAAC,QAAQ,KAAK;AACxC,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;AACjD,EAAE,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;AAClC,IAAI,IAAI,OAAO,KAAK,UAAU;AAC9B,MAAM,OAAO;AACb,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;AACpB,IAAI,IAAI,UAAU,KAAK,QAAQ,CAAC,aAAa;AAC7C,MAAM,OAAO;AACb,GAAG;AACH;;;;"}
|
||||
Reference in New Issue
Block a user