diff --git a/src/components/avatar/index.d.ts b/src/components/avatar/index.d.ts new file mode 100644 index 00000000000..35a5f5cb9fb --- /dev/null +++ b/src/components/avatar/index.d.ts @@ -0,0 +1,25 @@ +/// + +import { HTMLAttributes, SFC } from 'react'; + +declare module '@elastic/eui' { + + export type AvatarSize = 's' | 'm' | 'l' | 'xl'; + + export type AvatarType = 'user' | 'space'; + + export interface EuiAvatarProps { + name: string; + color?: string; + initials?: string; + initialsLength?: number; + className?: string; + imageUrl?: string; + size?: AvatarSize; + type?: AvatarType; + } + + export const EuiAvatar: SFC< + CommonProps & HTMLAttributes & EuiAvatarProps + >; +} diff --git a/src/components/form/field_search/index.d.ts b/src/components/form/field_search/index.d.ts index f01c7b7dfd1..389ab1d54ad 100644 --- a/src/components/form/field_search/index.d.ts +++ b/src/components/form/field_search/index.d.ts @@ -17,6 +17,7 @@ declare module '@elastic/eui' { isInvalid?: boolean; fullWidth?: boolean; isLoading?: boolean; + incremental?: boolean; } export const EuiFieldSearch: SFC< diff --git a/src/components/index.d.ts b/src/components/index.d.ts index 9fc64226f94..e4c05c5035e 100644 --- a/src/components/index.d.ts +++ b/src/components/index.d.ts @@ -1,4 +1,5 @@ /// +/// /// /// /// diff --git a/src/services/color/index.d.ts b/src/services/color/index.d.ts new file mode 100644 index 00000000000..658ef9ddf69 --- /dev/null +++ b/src/services/color/index.d.ts @@ -0,0 +1,16 @@ + +declare module '@elastic/eui' { + export const VISUALIZATION_COLORS: string[]; + + export const DEFAULT_VISUALIZATION_COLOR: string; + + type rgbDef = [number, number, number]; + + export const hexToRbg: (hex: string) => rgbDef; + export const rgbToHex: (rgb: string) => string; + + export const isColorDark: (red: number, green: number, blue: number) => boolean; + + export const calculateLuminance: (red: number, green: number, blue: number) => number; + export const calculateContrast: (rgb1: rgbDef, rgb2: rgbDef) => number; +} diff --git a/src/services/index.d.ts b/src/services/index.d.ts index ec6704fc16c..37e4b505c3f 100644 --- a/src/services/index.d.ts +++ b/src/services/index.d.ts @@ -1,3 +1,4 @@ /// /// +/// ///