@wikimedia/codex
Version:
Codex Design System for Wikimedia
1,263 lines (1,262 loc) • 128 kB
TypeScript
import { PropType } from 'vue';
import { SearchResult, SearchResultWithId, MenuItemDataWithId, MenuConfig } from '../../types';
/**
* A search form that provides a menu with autocomplete suggestions.
*/
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
/**
* ID attribute for the form.
*/
id: {
type: StringConstructor;
required: true;
};
/**
* Action attribute for form.
*/
formAction: {
type: StringConstructor;
required: true;
};
/**
* List of search results. See the SearchResult type.
*/
searchResults: {
type: PropType<SearchResult[]>;
required: true;
};
/**
*
* Whether to display a submit button.
*/
useButton: {
type: BooleanConstructor;
default: boolean;
};
/**
* Custom label for the submit button.
*
* Omit this prop to use the default value, "Search".
*/
buttonLabel: {
type: StringConstructor;
default: string;
validator: (value: string, props: {
[x: string]: unknown;
}) => boolean;
};
/**
* Initial value for the text input.
*
* Triggers an initial `input` event on mount.
*/
initialInputValue: {
type: StringConstructor;
default: string;
};
/**
* Link for the final menu item.
*
* This will typically be a link to the search page for the current search query.
*/
searchFooterUrl: {
type: StringConstructor;
default: string;
};
/**
* Time interval for debouncing input events, in ms.
*/
debounceInterval: {
type: NumberConstructor;
default: number;
};
/**
* Whether the search query should be highlighted within a search result's title.
*/
highlightQuery: {
type: BooleanConstructor;
default: boolean;
};
/**
* Whether to show search results' thumbnails (or a placeholder icon).
*/
showThumbnail: {
type: BooleanConstructor;
default: boolean;
};
/**
* Contract the width of the input when unfocused and expand the width of
* the input when focused to accommodate the extra width of the thumbnails.
*
* This prop is ignored if showThumbnail is false.
*/
autoExpandWidth: {
type: BooleanConstructor;
default: boolean;
};
/**
* Limit the number of menu items to display before scrolling.
*
* Setting this prop to anything falsy will show all menu items.
*
* By default, all menu items are shown.
*/
visibleItemLimit: {
type: PropType<number | null>;
default: null;
};
/**
* By default, search results will be shown only when the query is not empty.
* When this prop is set to true, search results will be shown even if the query is empty
* This is used for empty search recommendations in Vector & MinervaNeue
*/
showEmptyQueryResults: {
type: BooleanConstructor;
default: boolean;
};
/**
* When this prop is set to true, the UI will be modified to accommodate mobile devices,
* including making the button clearable and the removal of the search icon to save space
*/
isMobileView: {
type: BooleanConstructor;
default: boolean;
};
}>, {
form: import("vue").Ref<HTMLFormElement | undefined, HTMLFormElement | undefined>;
menu: import("vue").Ref<import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
menuItems: {
type: PropType<(import("../../types").MenuItemData | import("../../types").MenuGroupData)[]>;
required: true;
};
footer: {
type: PropType<import("../../types").MenuItemData>;
default: null;
};
selected: {
type: PropType<import("../../types").MenuItemValue | import("../../types").MenuItemValue[] | null>;
required: true;
};
expanded: {
type: BooleanConstructor;
required: true;
};
showPending: {
type: BooleanConstructor;
default: boolean;
};
visibleItemLimit: {
type: PropType<number | null>;
default: null;
};
showThumbnail: {
type: BooleanConstructor;
default: boolean;
};
boldLabel: {
type: BooleanConstructor;
default: boolean;
};
hideDescriptionOverflow: {
type: BooleanConstructor;
default: boolean;
};
searchQuery: {
type: StringConstructor;
default: string;
};
showNoResultsSlot: {
type: PropType<boolean | null>;
default: null;
};
}>> & Readonly<{
"onUpdate:selected"?: ((...args: any[]) => any) | undefined;
"onUpdate:expanded"?: ((...args: any[]) => any) | undefined;
"onMenu-item-click"?: ((...args: any[]) => any) | undefined;
"onMenu-item-keyboard-navigation"?: ((...args: any[]) => any) | undefined;
"onLoad-more"?: ((...args: any[]) => any) | undefined;
}>, {
listBoxStyle: import("vue").ComputedRef<{
'max-height': string | undefined;
'margin-bottom': string | undefined;
}>;
rootClasses: import("vue").ComputedRef<Record<string, boolean>>;
rootStyle: import("vue").ComputedRef<import("vue").StyleValue>;
otherAttrs: import("vue").ComputedRef<{
[x: string]: unknown;
}>;
assignTemplateRef: (templateRef: import("vue").ComponentPublicInstance | Element | null, index: number) => void;
computedMenuEntries: import("vue").ComputedRef<(MenuItemDataWithId | import("../../types").MenuGroupDataWithIds)[]>;
computedMenuItems: import("vue").ComputedRef<MenuItemDataWithId[]>;
computedShowNoResultsSlot: import("vue").ComputedRef<boolean>;
highlightedMenuItem: import("vue").Ref<{
id: string;
value: import("../../types").MenuItemValue;
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | null | undefined;
language?: {
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | undefined;
} | undefined;
icon?: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
} | {
rtl: string | {
path: string;
};
ltr: string | {
path: string;
};
} | {
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>;
default: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
};
} | undefined;
thumbnail?: {
url: string;
} | null | undefined;
url?: string | undefined;
disabled?: boolean | undefined;
} | null, MenuItemDataWithId | {
id: string;
value: import("../../types").MenuItemValue;
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | null | undefined;
language?: {
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | undefined;
} | undefined;
icon?: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
} | {
rtl: string | {
path: string;
};
ltr: string | {
path: string;
};
} | {
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>;
default: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
};
} | undefined;
thumbnail?: {
url: string;
} | null | undefined;
url?: string | undefined;
disabled?: boolean | undefined;
} | null>;
highlightedViaKeyboard: import("vue").Ref<boolean, boolean>;
handleMenuItemChange: (menuState: import("../../types").MenuState, menuItem: MenuItemDataWithId | null) => void;
handleKeyNavigation: (e: KeyboardEvent, { prevent, characterNavigation }?: {
prevent?: boolean | undefined;
characterNavigation?: boolean | undefined;
}) => boolean;
ariaRelevant: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
isMultiselect: import("vue").ComputedRef<boolean>;
menuListbox: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
getGroupWrapperClasses: (group: import("../../types").MenuGroupData) => {
'cdx-menu__group-wrapper--hide-label': boolean;
};
getMenuItemIndex: (menuItem: MenuItemDataWithId) => number;
getMenuItemBindings: (menuItem: MenuItemDataWithId) => {
id: string;
value: import("../../types").MenuItemValue;
label?: string;
match?: string;
supportingText?: string;
description?: string | null;
language?: import("../../types").MenuItemLanguageData;
icon?: import("@wikimedia/codex-icons").Icon;
thumbnail?: import("../../types").Thumbnail | null;
url?: string;
disabled?: boolean;
selected: boolean;
active: boolean;
highlighted: boolean;
showThumbnail: boolean;
boldLabel: boolean;
hideDescriptionOverflow: boolean;
searchQuery: string;
multiselect: boolean;
};
getMenuItemHandlers: (menuItem: MenuItemDataWithId) => {
change: (menuState: import("../../types").MenuState, setState: boolean) => void;
click: () => void;
};
getSlotBindings: (menuItem: MenuItemDataWithId) => {
menuItem: MenuItemDataWithId;
active: boolean;
};
isMenuGroupData: (menuEntry: import("../../types").MenuItemData | import("../../types").MenuGroupData) => menuEntry is import("../../types").MenuGroupData;
}, {}, {}, {
isExpanded(): boolean;
getHighlightedMenuItem(): MenuItemDataWithId | null;
getHighlightedViaKeyboard(): boolean;
getComputedMenuItems(): MenuItemDataWithId[];
clearActive(): void;
delegateKeyNavigation(event: KeyboardEvent, { prevent, characterNavigation }?: {
prevent?: boolean | undefined;
characterNavigation?: boolean | undefined;
}): boolean;
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "update:expanded" | "menu-item-click" | "menu-item-keyboard-navigation" | "load-more")[], import("vue").PublicProps, {
footer: import("../../types").MenuItemData;
searchQuery: string;
showThumbnail: boolean;
boldLabel: boolean;
hideDescriptionOverflow: boolean;
showPending: boolean;
visibleItemLimit: number | null;
showNoResultsSlot: boolean | null;
}, true, {}, {}, {
CdxMenuItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
id: {
type: StringConstructor;
required: true;
};
value: {
type: PropType<import("../../types").MenuItemValue>;
required: true;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
selected: {
type: BooleanConstructor;
default: boolean;
};
active: {
type: BooleanConstructor;
default: boolean;
};
highlighted: {
type: BooleanConstructor;
default: boolean;
};
label: {
type: StringConstructor;
default: string;
};
match: {
type: StringConstructor;
default: string;
};
supportingText: {
type: StringConstructor;
default: string;
};
url: {
type: StringConstructor;
default: string;
};
icon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
default: string;
};
showThumbnail: {
type: BooleanConstructor;
default: boolean;
};
thumbnail: {
type: PropType<import("../../types").Thumbnail | null>;
default: null;
};
description: {
type: PropType<string | null>;
default: string;
};
searchQuery: {
type: StringConstructor;
default: string;
};
boldLabel: {
type: BooleanConstructor;
default: boolean;
};
hideDescriptionOverflow: {
type: BooleanConstructor;
default: boolean;
};
language: {
type: PropType<import("../../types").MenuItemLanguageData>;
default: () => {};
};
action: {
type: PropType<import("../../types").ButtonAction>;
default: string;
};
multiselect: {
type: BooleanConstructor;
default: boolean;
};
}>, {
onMouseMove: () => void;
onMouseLeave: () => void;
onMouseDown: (e: MouseEvent) => void;
onClick: () => void;
highlightQuery: import("vue").ComputedRef<boolean>;
rootClasses: import("vue").ComputedRef<Record<string, boolean>>;
contentTag: import("vue").ComputedRef<"span" | "a">;
title: import("vue").ComputedRef<string>;
cdxIconCheck: string;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
id: {
type: StringConstructor;
required: true;
};
value: {
type: PropType<import("../../types").MenuItemValue>;
required: true;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
selected: {
type: BooleanConstructor;
default: boolean;
};
active: {
type: BooleanConstructor;
default: boolean;
};
highlighted: {
type: BooleanConstructor;
default: boolean;
};
label: {
type: StringConstructor;
default: string;
};
match: {
type: StringConstructor;
default: string;
};
supportingText: {
type: StringConstructor;
default: string;
};
url: {
type: StringConstructor;
default: string;
};
icon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
default: string;
};
showThumbnail: {
type: BooleanConstructor;
default: boolean;
};
thumbnail: {
type: PropType<import("../../types").Thumbnail | null>;
default: null;
};
description: {
type: PropType<string | null>;
default: string;
};
searchQuery: {
type: StringConstructor;
default: string;
};
boldLabel: {
type: BooleanConstructor;
default: boolean;
};
hideDescriptionOverflow: {
type: BooleanConstructor;
default: boolean;
};
language: {
type: PropType<import("../../types").MenuItemLanguageData>;
default: () => {};
};
action: {
type: PropType<import("../../types").ButtonAction>;
default: string;
};
multiselect: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{
onChange?: ((...args: any[]) => any) | undefined;
}>, {
url: string;
selected: boolean;
highlighted: boolean;
active: boolean;
icon: import("@wikimedia/codex-icons").Icon;
label: string;
match: string;
action: "default" | "progressive" | "destructive";
disabled: boolean;
thumbnail: import("../../types").Thumbnail | null;
description: string | null;
searchQuery: string;
supportingText: string;
showThumbnail: boolean;
boldLabel: boolean;
hideDescriptionOverflow: boolean;
language: import("../../types").MenuItemLanguageData;
multiselect: boolean;
}, {}, {
CdxIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
icon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
required: true;
};
iconLabel: {
type: StringConstructor;
default: string;
};
lang: {
type: PropType<string | null>;
default: null;
};
dir: {
type: PropType<import("../../types").HTMLDirection | null>;
default: null;
};
size: {
type: PropType<import("../../types").IconSize>;
default: string;
validator: import("../../types").StringTypeValidator<"medium" | "small" | "x-small">;
};
}>, {
rootElement: import("vue").Ref<HTMLSpanElement | undefined, HTMLSpanElement | undefined>;
rootClasses: import("vue").ComputedRef<{
[x: string]: boolean;
'cdx-icon--flipped': boolean;
}>;
iconSvg: import("vue").ComputedRef<string>;
iconPath: import("vue").ComputedRef<string>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
icon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
required: true;
};
iconLabel: {
type: StringConstructor;
default: string;
};
lang: {
type: PropType<string | null>;
default: null;
};
dir: {
type: PropType<import("../../types").HTMLDirection | null>;
default: null;
};
size: {
type: PropType<import("../../types").IconSize>;
default: string;
validator: import("../../types").StringTypeValidator<"medium" | "small" | "x-small">;
};
}>> & Readonly<{}>, {
lang: string | null;
iconLabel: string;
dir: import("../../types").HTMLDirection | null;
size: "medium" | "small" | "x-small";
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
CdxThumbnail: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
thumbnail: {
type: PropType<import("../../types").Thumbnail | null>;
default: null;
};
placeholderIcon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
default: string;
};
}>, {
thumbnailStyle: import("vue").Ref<{}, {}>;
thumbnailLoaded: import("vue").Ref<boolean, boolean>;
NoInvertClass: "cdx-no-invert";
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
thumbnail: {
type: PropType<import("../../types").Thumbnail | null>;
default: null;
};
placeholderIcon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
default: string;
};
}>> & Readonly<{}>, {
thumbnail: import("../../types").Thumbnail | null;
placeholderIcon: import("@wikimedia/codex-icons").Icon;
}, {}, {
CdxIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
icon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
required: true;
};
iconLabel: {
type: StringConstructor;
default: string;
};
lang: {
type: PropType<string | null>;
default: null;
};
dir: {
type: PropType<import("../../types").HTMLDirection | null>;
default: null;
};
size: {
type: PropType<import("../../types").IconSize>;
default: string;
validator: import("../../types").StringTypeValidator<"medium" | "small" | "x-small">;
};
}>, {
rootElement: import("vue").Ref<HTMLSpanElement | undefined, HTMLSpanElement | undefined>;
rootClasses: import("vue").ComputedRef<{
[x: string]: boolean;
'cdx-icon--flipped': boolean;
}>;
iconSvg: import("vue").ComputedRef<string>;
iconPath: import("vue").ComputedRef<string>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
icon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
required: true;
};
iconLabel: {
type: StringConstructor;
default: string;
};
lang: {
type: PropType<string | null>;
default: null;
};
dir: {
type: PropType<import("../../types").HTMLDirection | null>;
default: null;
};
size: {
type: PropType<import("../../types").IconSize>;
default: string;
validator: import("../../types").StringTypeValidator<"medium" | "small" | "x-small">;
};
}>> & Readonly<{}>, {
lang: string | null;
iconLabel: string;
dir: import("../../types").HTMLDirection | null;
size: "medium" | "small" | "x-small";
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
CdxSearchResultTitle: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
title: {
type: StringConstructor;
required: true;
};
searchQuery: {
type: StringConstructor;
default: string;
};
}>, {
titleChunks: import("vue").ComputedRef<[string, string, string]>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
title: {
type: StringConstructor;
required: true;
};
searchQuery: {
type: StringConstructor;
default: string;
};
}>> & Readonly<{}>, {
searchQuery: string;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
CdxIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
icon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
required: true;
};
iconLabel: {
type: StringConstructor;
default: string;
};
lang: {
type: PropType<string | null>;
default: null;
};
dir: {
type: PropType<import("../../types").HTMLDirection | null>;
default: null;
};
size: {
type: PropType<import("../../types").IconSize>;
default: string;
validator: import("../../types").StringTypeValidator<"medium" | "small" | "x-small">;
};
}>, {
rootElement: import("vue").Ref<HTMLSpanElement | undefined, HTMLSpanElement | undefined>;
rootClasses: import("vue").ComputedRef<{
[x: string]: boolean;
'cdx-icon--flipped': boolean;
}>;
iconSvg: import("vue").ComputedRef<string>;
iconPath: import("vue").ComputedRef<string>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
icon: {
type: PropType<import("@wikimedia/codex-icons").Icon>;
required: true;
};
iconLabel: {
type: StringConstructor;
default: string;
};
lang: {
type: PropType<string | null>;
default: null;
};
dir: {
type: PropType<import("../../types").HTMLDirection | null>;
default: null;
};
size: {
type: PropType<import("../../types").IconSize>;
default: string;
validator: import("../../types").StringTypeValidator<"medium" | "small" | "x-small">;
};
}>> & Readonly<{}>, {
lang: string | null;
iconLabel: string;
dir: import("../../types").HTMLDirection | null;
size: "medium" | "small" | "x-small";
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
CdxProgressBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
inline: {
type: BooleanConstructor;
default: boolean;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
}>, {
rootClasses: import("vue").ComputedRef<{
'cdx-progress-bar--block': boolean;
'cdx-progress-bar--inline': boolean;
'cdx-progress-bar--enabled': boolean;
'cdx-progress-bar--disabled': boolean;
}>;
computedAriaHidden: import("vue").ComputedRef<"true" | undefined>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
inline: {
type: BooleanConstructor;
default: boolean;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
}>> & Readonly<{}>, {
disabled: boolean;
inline: boolean;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
} & import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
P: {};
B: {};
D: {};
C: {};
M: {};
Defaults: {};
}, Readonly<import("vue").ExtractPropTypes<{
menuItems: {
type: PropType<(import("../../types").MenuItemData | import("../../types").MenuGroupData)[]>;
required: true;
};
footer: {
type: PropType<import("../../types").MenuItemData>;
default: null;
};
selected: {
type: PropType<import("../../types").MenuItemValue | import("../../types").MenuItemValue[] | null>;
required: true;
};
expanded: {
type: BooleanConstructor;
required: true;
};
showPending: {
type: BooleanConstructor;
default: boolean;
};
visibleItemLimit: {
type: PropType<number | null>;
default: null;
};
showThumbnail: {
type: BooleanConstructor;
default: boolean;
};
boldLabel: {
type: BooleanConstructor;
default: boolean;
};
hideDescriptionOverflow: {
type: BooleanConstructor;
default: boolean;
};
searchQuery: {
type: StringConstructor;
default: string;
};
showNoResultsSlot: {
type: PropType<boolean | null>;
default: null;
};
}>> & Readonly<{
"onUpdate:selected"?: ((...args: any[]) => any) | undefined;
"onUpdate:expanded"?: ((...args: any[]) => any) | undefined;
"onMenu-item-click"?: ((...args: any[]) => any) | undefined;
"onMenu-item-keyboard-navigation"?: ((...args: any[]) => any) | undefined;
"onLoad-more"?: ((...args: any[]) => any) | undefined;
}>, {
listBoxStyle: import("vue").ComputedRef<{
'max-height': string | undefined;
'margin-bottom': string | undefined;
}>;
rootClasses: import("vue").ComputedRef<Record<string, boolean>>;
rootStyle: import("vue").ComputedRef<import("vue").StyleValue>;
otherAttrs: import("vue").ComputedRef<{
[x: string]: unknown;
}>;
assignTemplateRef: (templateRef: import("vue").ComponentPublicInstance | Element | null, index: number) => void;
computedMenuEntries: import("vue").ComputedRef<(MenuItemDataWithId | import("../../types").MenuGroupDataWithIds)[]>;
computedMenuItems: import("vue").ComputedRef<MenuItemDataWithId[]>;
computedShowNoResultsSlot: import("vue").ComputedRef<boolean>;
highlightedMenuItem: import("vue").Ref<{
id: string;
value: import("../../types").MenuItemValue;
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | null | undefined;
language?: {
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | undefined;
} | undefined;
icon?: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
} | {
rtl: string | {
path: string;
};
ltr: string | {
path: string;
};
} | {
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>;
default: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
};
} | undefined;
thumbnail?: {
url: string;
} | null | undefined;
url?: string | undefined;
disabled?: boolean | undefined;
} | null, MenuItemDataWithId | {
id: string;
value: import("../../types").MenuItemValue;
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | null | undefined;
language?: {
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | undefined;
} | undefined;
icon?: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
} | {
rtl: string | {
path: string;
};
ltr: string | {
path: string;
};
} | {
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>;
default: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
};
} | undefined;
thumbnail?: {
url: string;
} | null | undefined;
url?: string | undefined;
disabled?: boolean | undefined;
} | null>;
highlightedViaKeyboard: import("vue").Ref<boolean, boolean>;
handleMenuItemChange: (menuState: import("../../types").MenuState, menuItem: MenuItemDataWithId | null) => void;
handleKeyNavigation: (e: KeyboardEvent, { prevent, characterNavigation }?: {
prevent?: boolean | undefined;
characterNavigation?: boolean | undefined;
}) => boolean;
ariaRelevant: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
isMultiselect: import("vue").ComputedRef<boolean>;
menuListbox: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
getGroupWrapperClasses: (group: import("../../types").MenuGroupData) => {
'cdx-menu__group-wrapper--hide-label': boolean;
};
getMenuItemIndex: (menuItem: MenuItemDataWithId) => number;
getMenuItemBindings: (menuItem: MenuItemDataWithId) => {
id: string;
value: import("../../types").MenuItemValue;
label?: string;
match?: string;
supportingText?: string;
description?: string | null;
language?: import("../../types").MenuItemLanguageData;
icon?: import("@wikimedia/codex-icons").Icon;
thumbnail?: import("../../types").Thumbnail | null;
url?: string;
disabled?: boolean;
selected: boolean;
active: boolean;
highlighted: boolean;
showThumbnail: boolean;
boldLabel: boolean;
hideDescriptionOverflow: boolean;
searchQuery: string;
multiselect: boolean;
};
getMenuItemHandlers: (menuItem: MenuItemDataWithId) => {
change: (menuState: import("../../types").MenuState, setState: boolean) => void;
click: () => void;
};
getSlotBindings: (menuItem: MenuItemDataWithId) => {
menuItem: MenuItemDataWithId;
active: boolean;
};
isMenuGroupData: (menuEntry: import("../../types").MenuItemData | import("../../types").MenuGroupData) => menuEntry is import("../../types").MenuGroupData;
}, {}, {}, {
isExpanded(): boolean;
getHighlightedMenuItem(): MenuItemDataWithId | null;
getHighlightedViaKeyboard(): boolean;
getComputedMenuItems(): MenuItemDataWithId[];
clearActive(): void;
delegateKeyNavigation(event: KeyboardEvent, { prevent, characterNavigation }?: {
prevent?: boolean | undefined;
characterNavigation?: boolean | undefined;
}): boolean;
}, {
footer: import("../../types").MenuItemData;
searchQuery: string;
showThumbnail: boolean;
boldLabel: boolean;
hideDescriptionOverflow: boolean;
showPending: boolean;
visibleItemLimit: number | null;
showNoResultsSlot: boolean | null;
}> | undefined, import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
menuItems: {
type: PropType<(import("../../types").MenuItemData | import("../../types").MenuGroupData)[]>;
required: true;
};
footer: {
type: PropType<import("../../types").MenuItemData>;
default: null;
};
selected: {
type: PropType<import("../../types").MenuItemValue | import("../../types").MenuItemValue[] | null>;
required: true;
};
expanded: {
type: BooleanConstructor;
required: true;
};
showPending: {
type: BooleanConstructor;
default: boolean;
};
visibleItemLimit: {
type: PropType<number | null>;
default: null;
};
showThumbnail: {
type: BooleanConstructor;
default: boolean;
};
boldLabel: {
type: BooleanConstructor;
default: boolean;
};
hideDescriptionOverflow: {
type: BooleanConstructor;
default: boolean;
};
searchQuery: {
type: StringConstructor;
default: string;
};
showNoResultsSlot: {
type: PropType<boolean | null>;
default: null;
};
}>> & Readonly<{
"onUpdate:selected"?: ((...args: any[]) => any) | undefined;
"onUpdate:expanded"?: ((...args: any[]) => any) | undefined;
"onMenu-item-click"?: ((...args: any[]) => any) | undefined;
"onMenu-item-keyboard-navigation"?: ((...args: any[]) => any) | undefined;
"onLoad-more"?: ((...args: any[]) => any) | undefined;
}>, {
listBoxStyle: import("vue").ComputedRef<{
'max-height': string | undefined;
'margin-bottom': string | undefined;
}>;
rootClasses: import("vue").ComputedRef<Record<string, boolean>>;
rootStyle: import("vue").ComputedRef<import("vue").StyleValue>;
otherAttrs: import("vue").ComputedRef<{
[x: string]: unknown;
}>;
assignTemplateRef: (templateRef: import("vue").ComponentPublicInstance | Element | null, index: number) => void;
computedMenuEntries: import("vue").ComputedRef<(MenuItemDataWithId | import("../../types").MenuGroupDataWithIds)[]>;
computedMenuItems: import("vue").ComputedRef<MenuItemDataWithId[]>;
computedShowNoResultsSlot: import("vue").ComputedRef<boolean>;
highlightedMenuItem: import("vue").Ref<{
id: string;
value: import("../../types").MenuItemValue;
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | null | undefined;
language?: {
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | undefined;
} | undefined;
icon?: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
} | {
rtl: string | {
path: string;
};
ltr: string | {
path: string;
};
} | {
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>;
default: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
};
} | undefined;
thumbnail?: {
url: string;
} | null | undefined;
url?: string | undefined;
disabled?: boolean | undefined;
} | null, MenuItemDataWithId | {
id: string;
value: import("../../types").MenuItemValue;
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | null | undefined;
language?: {
label?: string | undefined;
match?: string | undefined;
supportingText?: string | undefined;
description?: string | undefined;
} | undefined;
icon?: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
} | {
rtl: string | {
path: string;
};
ltr: string | {
path: string;
};
} | {
langCodeMap: Record<string, import("@wikimedia/codex-icons").SimpleIcon | import("@wikimedia/codex-icons").IconFlipForRtl>;
default: string | {
path: string;
} | {
ltr: string | {
path: string;
};
shouldFlip: true;
shouldFlipExceptions?: string[] | undefined;
};
} | undefined;
thumbnail?: {
url: string;
} | null | undefined;
url?: string | undefined;
disabled?: boolean | undefined;
} | null>;
highlightedViaKeyboard: import("vue").Ref<boolean, boolean>;
handleMenuItemChange: (menuState: import("../../types").MenuState, menuItem: MenuItemDataWithId | null) => void;
handleKeyNavigation: (e: KeyboardEvent, { prevent, characterNavigation }?: {
prevent?: boolean | undefined;
characterNavigation?: boolean | undefined;
}) => boolean;
ariaRelevant: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
isMultiselect: import("vue").ComputedRef<boolean>;
menuListbox: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>;
getGroupWrapperClasses: (group: import("../../types").MenuGroupData) => {
'cdx-menu__group-wrapper--hide-label': boolean;
};
getMenuItemIndex: (menuItem: MenuItemDataWithId) => number;
getMenuItemBindings: (menuItem: MenuItemDataWithId) => {
id: string;
value: import("../../types").MenuItemValue;
label?: string;
match?: string;
supportingText?: string;
description?: string | null;
language?: import("../../types").MenuItemLanguageData;
icon?: import("@wikimedia/codex-icons").Icon;
thumbnail?: import("../../types").Thumbnail | null;
url?: string;
disabled?: boolean;
selected: boolean;
active: boolean;
highlighted: boolean;
showThumbnail: boolean;
boldLabel: boolean;
hideDescriptionOverflow: boolean;
searchQuery: string;
multiselect: boolean;
};
getMenuItemHandlers: (menuItem: MenuItemDataWithId) => {
change: (menuState: import("../../types").MenuState, setState: boolean) => void;
click: () => void;
};
getSlotBindings: (menuItem: MenuItemDataWithId) => {
menuItem: MenuItemDataWithId;
active: boolean;
};
isMenuGroupData: (menuEntry: import("../../types").MenuItemData | import("../../types").MenuGroupData) => menuEntry is import("../../types").MenuGroupData;
}, {}, {}, {
isExpanded(): boolean;
getHighlightedMenuItem(): MenuItemDataWithId | null;
getHighlightedViaKeyboard(): boolean;
getComputedMenuItems(): MenuItemDataWithId[];
clearActive(): void;
delegateKeyNavigation(event: KeyboardEvent, { prevent, characterNavigation }?: {
prevent?: boolean | undefined;
characterNavigation?: boolean | undefined;
}): boolean;
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selected" | "update:expanded" | "menu-item-click" | "menu-item-keyboard-navigation" | "load-more")[], import("vue").PublicProps, {
footer: import("../../types").MenuItemData;
searchQuery: string;
showThumbnail: boolean;
boldLabel: boolean;
hideDescriptionOverflow: boolean;
showPending: boolean;
visibleItemLimit: number | null;
showNoResultsSlot: boolean | null;
}, true, {}, {}, {
CdxMenuItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
id: {
type: StringConstructor;
required: true;
};
value: {
type: PropType<import("../../types").MenuItemValue>;
required: true;
};
disabled: {
type: BooleanConstructor;
default: boolean;
};
selected: {
type: BooleanConstructor;
default: boolean;
};
active: {
type: BooleanConstructor;
default: boolean;
};
highlighted: {
type: BooleanConstructor;
default: boolean;