declare module '@elastic/eui/src/services/keys' { export const ENTER = "Enter"; export const SPACE = " "; export const ESCAPE = "Escape"; export const TAB = "Tab"; export const BACKSPACE = "Backspace"; export const F2 = "F2"; export const ALT = "Alt"; export const SHIFT = "Shift"; export const CTRL = "Control"; export const META = "Meta"; export const ARROW_DOWN = "ArrowDown"; export const ARROW_UP = "ArrowUp"; export const ARROW_LEFT = "ArrowLeft"; export const ARROW_RIGHT = "ArrowRight"; export const PAGE_UP = "PageUp"; export const PAGE_DOWN = "PageDown"; export const END = "End"; export const HOME = "Home"; export enum keys { ENTER = "Enter", SPACE = " ", ESCAPE = "Escape", TAB = "Tab", BACKSPACE = "Backspace", F2 = "F2", ALT = "Alt", SHIFT = "Shift", CTRL = "Control", META = "Meta",// Windows, Command, Option ARROW_DOWN = "ArrowDown", ARROW_UP = "ArrowUp", ARROW_LEFT = "ArrowLeft", ARROW_RIGHT = "ArrowRight", PAGE_UP = "PageUp", PAGE_DOWN = "PageDown", END = "End", HOME = "Home" } } declare module '@elastic/eui/src/services/accessibility/html_id_generator' { /** * This function returns a function to generate ids. * This can be used to generate unique, but predictable ids to pair labels * with their inputs. It takes an optional prefix as a parameter. If you don't * specify it, it generates a random id prefix. If you specify a custom prefix * it should begin with an letter to be HTML4 compliant. */ export function htmlIdGenerator(idPrefix?: string): (idSuffix?: string) => string; /** * Generates a memoized ID that remains static until component unmount. * This prevents IDs from being re-randomized on every component update. */ export type UseGeneratedHtmlIdOptions = { /** * Optional prefix to prepend to the generated ID */ prefix?: string; /** * Optional suffix to append to the generated ID */ suffix?: string; /** * Optional conditional ID to use instead of a randomly generated ID. * Typically used by EUI components where IDs can be passed in as custom props */ conditionalId?: string; }; export const useGeneratedHtmlId: ({ prefix, suffix, conditionalId, }?: UseGeneratedHtmlIdOptions) => string; } declare module '@elastic/eui/src/services/accessibility' { export { htmlIdGenerator, useGeneratedHtmlId } from '@elastic/eui/src/services/accessibility/html_id_generator'; } declare module '@elastic/eui/src/services/alignment' { export const LEFT_ALIGNMENT = "left"; export const RIGHT_ALIGNMENT = "right"; export const CENTER_ALIGNMENT = "center"; export type HorizontalAlignment = 'left' | 'right' | 'center'; } declare module '@elastic/eui/src/global_styling/variables/breakpoint' { export { EuiThemeBreakpoints, type _EuiThemeBreakpoint, type _EuiThemeBreakpoints, } from '@elastic/eui-theme-common'; } declare module '@elastic/eui/src/components/common' { import { AnchorHTMLAttributes, ButtonHTMLAttributes, ComponentProps, Component, FunctionComponent, JSXElementConstructor, MouseEventHandler, JSX } from 'react'; import { Interpolation, Theme } from '@emotion/react'; export type { RecursivePartial, ValueOf } from '@elastic/eui-theme-common'; export interface CommonProps { className?: string; 'aria-label'?: string; 'data-test-subj'?: string; css?: Interpolation; } export interface DataAttributeProps { [key: `data-${string}`]: string | undefined; } export type NoArgCallback = () => T; export const assertNever: (x: never) => never; /** * XOR for some properties applied to a type * (XOR is one of these but not both or neither) * * Usage: OneOf * * To require aria-label or aria-labelledby but not both * Example: OneOf */ export type OneOf = Omit & { [k in K]: Pick, k> & { [k1 in Exclude]?: never; }; }[K]; /** * Wraps Object.keys with proper typescript definition of the resulting array */ export function keysOf(obj: T): K[]; export type PropsOf = C extends FunctionComponent ? SFCProps : C extends FunctionComponent ? FunctionProps : C extends Component ? ComponentProps : never; export type PropsOfElement> = JSX.LibraryManagedAttributes>; type ExtractDefaultProps = T extends { defaultProps: infer D; } ? D : never; type ExtractProps any, IT = InstanceType> = IT extends Component ? P : never; /** * Because of how TypeScript's LibraryManagedAttributes is designed to handle defaultProps (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#support-for-defaultprops-in-jsx) * we can't directly export the props definition as the defaulted values are not made optional, * because it isn't processed by LibraryManagedAttributes. To get around this, we: * - remove the props which have default values applied * - export (Props - Defaults) & Partial */ export type ApplyClassComponentDefaults any, D = ExtractDefaultProps, P = ExtractProps> = Omit & { [K in keyof D]?: K extends keyof P ? P[K] : never; }; type UnionKeys = T extends any ? keyof T : never; export type DistributivePick> = T extends any ? Pick> : never; export type DistributiveOmit> = T extends any ? Omit> : never; type RecursiveDistributiveOmit = T extends any ? T extends object ? RecursiveOmit : T : never; export type RecursiveOmit = Omit<{ [P in keyof T]: RecursiveDistributiveOmit; }, K>; /** * Returns member keys in U not present in T set to never * T = { 'one', 'two', 'three' } * U = { 'three', 'four', 'five' } * returns { 'four': never, 'five': never } */ export type DisambiguateSet = { [P in Exclude]?: never; }; /** * Allow either T or U, preventing any additional keys of the other type from being present */ export type ExclusiveUnion = T | U extends object ? (DisambiguateSet & U) | (DisambiguateSet & T) : T | U; /** * For components that conditionally render