Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
**Bug fixes**

- Fixed size of `EuiSuperSelect`'s dropdown menu when there is no initial selection ([#1295](https://github.com/elastic/eui/pull/1295))
- Added TypeScript definitions for `EuiPopoverTitle` and the beta and notification badges. Ensure tab TS definitions are included in the main definition index. Fix typo in icon types ([#1299](https://github.com/elastic/eui/pull/1299))

## [`5.0.0`](https://github.com/elastic/eui/tree/v5.0.0)

Expand All @@ -27,10 +28,6 @@

**Bug fixes**

- Added TypeScript definitions for `EuiToolTip`'s `delay` prop. ([#1284](https://github.com/elastic/eui/pull/1284))

**Bug fixes**

- Added TypeScript definitions for `EuiToolTip`'s `delay` prop. ([#1284](https://github.com/elastic/eui/pull/1284))
- Added TypeScript definitions for step components, and some checkbox definition fixes ([#1263](https://github.com/elastic/eui/pull/1263))

Expand Down
7 changes: 3 additions & 4 deletions scripts/compile-eui.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const shell = require('shelljs');
const glob = require('glob');

function compileLib() {
shell.mkdir('-p', 'lib/components', 'lib/services', 'lib/test');
shell.mkdir('-p', 'lib/components/icon/assets/tokens', 'lib/services', 'lib/test');

console.log('Compiling src/ to es/ and lib/');

Expand All @@ -16,15 +16,14 @@ function compileLib() {

console.log(chalk.green('✔ Finished compiling src/'));

// Also copy over SVGs. Babel has a --copy-files option but that brings over
// all kinds of things we don't want into the lib folder.
// Also copy over SVGs. Babel has a --copy-files option but that brings over
// all kinds of things we don't want into the lib folder.
shell.mkdir('-p', 'lib/components/icon/assets');

glob('./src/components/**/*.svg', undefined, (error, files) => {
files.forEach(file => {
const splitPath = file.split('/');
const basePath = splitPath.slice(2, splitPath.length).join('/');
console.log(basePath)
shell.cp('-f', `${file}`, `lib/${basePath}`);
});

Expand Down
27 changes: 26 additions & 1 deletion src/components/badge/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// <reference path="../icon/index.d.ts" />
/// <reference path="../tool_tip/index.d.ts" />

import { HTMLAttributes, MouseEventHandler, SFC } from 'react';
import { HTMLAttributes, MouseEventHandler, SFC, ReactNode } from 'react';

declare module '@elastic/eui' {

Expand All @@ -20,4 +21,28 @@ declare module '@elastic/eui' {
export const EuiBadge: SFC<
CommonProps & HTMLAttributes<HTMLSpanElement> & HTMLAttributes<HTMLButtonElement> & EuiBadgeProps
>;

export interface EuiBetaBadgeProps {
iconType?: IconType;
label: ReactNode;
tooltipContent?: ReactNode;
tooltipPosition?: ToolTipPositions;
title?: string;
}

export const EuiBetaBadge: SFC<
CommonProps & HTMLAttributes<HTMLSpanElement> & EuiBetaBadgeProps
>;

export interface EuiNotificationBadgeProps {
iconType?: IconType;
label: ReactNode;
tooltipContent?: ReactNode;
tooltipPosition?: ToolTipPositions;
title?: string;
}

export const EuiNotificationBadge: SFC<
CommonProps & HTMLAttributes<HTMLSpanElement>
>;
}
9 changes: 9 additions & 0 deletions src/components/error_boundary/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference path="../common.d.ts" />

import { HTMLAttributes, Component } from 'react';

declare module '@elastic/eui' {
export class EuiErrorBoundary extends Component<
CommonProps & HTMLAttributes<HTMLDivElement>
> {}
}
2 changes: 1 addition & 1 deletion src/components/icon/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ declare module '@elastic/eui' {
| 'filter'
| 'fullScreen'
| 'gear'
| 'glob'
| 'globe'
| 'grab'
| 'graphApp'
| 'grid'
Expand Down
2 changes: 2 additions & 0 deletions src/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/// <reference path="./context_menu/index.d.ts" />
/// <reference path="./description_list/index.d.ts" />
/// <reference path="./empty_prompt/index.d.ts" />
/// <reference path="./error_boundary/index.d.ts" />
/// <reference path="./flex/index.d.ts" />
/// <reference path="./flyout/index.d.ts" />
/// <reference path="./form/index.d.ts" />
Expand All @@ -30,6 +31,7 @@
/// <reference path="./spacer/index.d.ts" />
/// <reference path="./steps/index.d.ts" />
/// <reference path="./table/index.d.ts" />
/// <reference path="./tabs/index.d.ts" />
/// <reference path="./text/index.d.ts" />
/// <reference path="./title/index.d.ts" />
/// <reference path="./toast/index.d.ts" />
Expand Down
4 changes: 4 additions & 0 deletions src/components/popover/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ declare module '@elastic/eui' {
export const EuiPopover: SFC<
CommonProps & HTMLAttributes<HTMLDivElement> & EuiPopoverProps
>;

export const EuiPopoverTitle: SFC<
CommonProps & HTMLAttributes<HTMLDivElement>
>;
}