diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8da06cadf09..922ca47534c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
@@ -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))
diff --git a/scripts/compile-eui.js b/scripts/compile-eui.js
index b10967959d2..215ca3c991d 100755
--- a/scripts/compile-eui.js
+++ b/scripts/compile-eui.js
@@ -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/');
@@ -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}`);
});
diff --git a/src/components/badge/index.d.ts b/src/components/badge/index.d.ts
index 783c8c7495c..5d401789d82 100644
--- a/src/components/badge/index.d.ts
+++ b/src/components/badge/index.d.ts
@@ -1,6 +1,7 @@
///
+///
-import { HTMLAttributes, MouseEventHandler, SFC } from 'react';
+import { HTMLAttributes, MouseEventHandler, SFC, ReactNode } from 'react';
declare module '@elastic/eui' {
@@ -20,4 +21,28 @@ declare module '@elastic/eui' {
export const EuiBadge: SFC<
CommonProps & HTMLAttributes & HTMLAttributes & EuiBadgeProps
>;
+
+ export interface EuiBetaBadgeProps {
+ iconType?: IconType;
+ label: ReactNode;
+ tooltipContent?: ReactNode;
+ tooltipPosition?: ToolTipPositions;
+ title?: string;
+ }
+
+ export const EuiBetaBadge: SFC<
+ CommonProps & HTMLAttributes & EuiBetaBadgeProps
+ >;
+
+ export interface EuiNotificationBadgeProps {
+ iconType?: IconType;
+ label: ReactNode;
+ tooltipContent?: ReactNode;
+ tooltipPosition?: ToolTipPositions;
+ title?: string;
+ }
+
+ export const EuiNotificationBadge: SFC<
+ CommonProps & HTMLAttributes
+ >;
}
diff --git a/src/components/error_boundary/index.d.ts b/src/components/error_boundary/index.d.ts
new file mode 100644
index 00000000000..813200d82c7
--- /dev/null
+++ b/src/components/error_boundary/index.d.ts
@@ -0,0 +1,9 @@
+///
+
+import { HTMLAttributes, Component } from 'react';
+
+declare module '@elastic/eui' {
+ export class EuiErrorBoundary extends Component<
+ CommonProps & HTMLAttributes
+ > {}
+}
diff --git a/src/components/icon/index.d.ts b/src/components/icon/index.d.ts
index 20f0f830324..3639ea66cb1 100644
--- a/src/components/icon/index.d.ts
+++ b/src/components/icon/index.d.ts
@@ -77,7 +77,7 @@ declare module '@elastic/eui' {
| 'filter'
| 'fullScreen'
| 'gear'
- | 'glob'
+ | 'globe'
| 'grab'
| 'graphApp'
| 'grid'
diff --git a/src/components/index.d.ts b/src/components/index.d.ts
index d98c980af40..1f52035a509 100644
--- a/src/components/index.d.ts
+++ b/src/components/index.d.ts
@@ -10,6 +10,7 @@
///
///
///
+///
///
///
///
@@ -30,6 +31,7 @@
///
///
///
+///
///
///
///
diff --git a/src/components/popover/index.d.ts b/src/components/popover/index.d.ts
index 51622c122e0..2e58d8f837d 100644
--- a/src/components/popover/index.d.ts
+++ b/src/components/popover/index.d.ts
@@ -40,4 +40,8 @@ declare module '@elastic/eui' {
export const EuiPopover: SFC<
CommonProps & HTMLAttributes & EuiPopoverProps
>;
+
+ export const EuiPopoverTitle: SFC<
+ CommonProps & HTMLAttributes
+ >;
}