@@ -434,7 +434,7 @@ export default () => (
-
+ Add thing
@@ -447,7 +447,7 @@ export default () => (
-
+ Cancel
@@ -458,7 +458,7 @@ export default () => (
-
+ Create thing
@@ -471,7 +471,7 @@ export default () => (
-
+
Delete
@@ -495,7 +495,7 @@ export default () => (
-
+ Remove (
-
+ Save
-
+
Save and complete
diff --git a/src-docs/src/views/card/card_beta.js b/src-docs/src/views/card/card_beta.tsx
similarity index 54%
rename from src-docs/src/views/card/card_beta.js
rename to src-docs/src/views/card/card_beta.tsx
index 610eb50d04b..cead3eb18a4 100644
--- a/src-docs/src/views/card/card_beta.js
+++ b/src-docs/src/views/card/card_beta.tsx
@@ -7,31 +7,29 @@ import {
EuiFlexItem,
} from '../../../../src/components';
-const icons = ['dashboard', 'monitoring'];
-const badges = [null, 'Beta'];
-
-const cardNodes = icons.map(function (item, index) {
- return (
-
+export default () => (
+
+ }
- title={`Kibana ${item}`}
+ icon={}
+ title="Dashboards"
description="Example of a card's description. Stick to one or two sentences."
- betaBadgeLabel={badges[index]}
- betaBadgeTooltipContent={
- badges[index]
- ? 'This module is not GA. Please help us by reporting any bugs.'
- : undefined
- }
onClick={() => {}}
/>
- );
-});
-
-export default () => (
-
- {cardNodes}
+
+ }
+ title="Monitoring"
+ description="Example of a card's description. Stick to one or two sentences."
+ betaBadgeProps={{
+ label: 'Beta',
+ tooltipContent:
+ 'This module is not GA. Please help us by reporting any bugs.',
+ }}
+ onClick={() => {}}
+ />
+ }
@@ -41,9 +39,9 @@ export default () => (
betaBadgeProps={{
href: 'http://www.elastic.co/subscriptions',
target: '_blank',
+ label: 'Basic',
+ tooltipContent: 'This feature requires a Basic License',
}}
- betaBadgeLabel="Basic"
- betaBadgeTooltipContent="This feature requires a Basic License"
onClick={() => {}}
/>
diff --git a/src-docs/src/views/card/card_display.js b/src-docs/src/views/card/card_display.tsx
similarity index 87%
rename from src-docs/src/views/card/card_display.js
rename to src-docs/src/views/card/card_display.tsx
index ba04f40435a..5e6cbedf567 100644
--- a/src-docs/src/views/card/card_display.js
+++ b/src-docs/src/views/card/card_display.tsx
@@ -38,8 +38,11 @@ export default () => (
title="Transparent"
display="transparent"
description="This one doesn't have a background color anymore."
- betaBadgeLabel="Beta"
- betaBadgeTooltipContent="This module is not GA. Please help us by reporting any bugs."
+ betaBadgeProps={{
+ label: 'Beta',
+ tooltipContent:
+ 'This module is not GA. Please help us by reporting any bugs.',
+ }}
onClick={() => {}}
/>
diff --git a/src-docs/src/views/card/card_example.js b/src-docs/src/views/card/card_example.js
index 6cb0cbd2817..f99a8d7c973 100644
--- a/src-docs/src/views/card/card_example.js
+++ b/src-docs/src/views/card/card_example.js
@@ -242,11 +242,11 @@ export const CardExample = {
text: (
If the card links to or references a module that is not GA (beta, lab,
- etc), you can add a betaBadgeLabel and{' '}
- betaBadgeTooltipContent to the card and it will
- properly create and position an EuiBetaBadge. If you
- want to change the title of the tooltip, supply a{' '}
- betaBadgeTitle prop.
+ etc), you can add a betaBadgeProps.label and{' '}
+ betaBadgeProps.tooltipContent to the card and it
+ will properly create and position an EuiBetaBadge. If
+ you want to change the title of the tooltip, supply a{' '}
+ betaBadgeProps.title prop.
- The EuiCodeEditor, a wrapper of{' '}
- react-ace, has been deprecated and will be
- removed in a{' '}
-
- future release
-
- .
-
- If you are a Kibana developer, we recommend using the{' '}
-
- @kbn/monaco package
- {' '}
- within the Kibana codebase.
-
no items, click
@@ -459,7 +467,11 @@ exports[`EuiBasicTable empty renders a string as a custom message 1`] = `
where my items at?
@@ -2550,7 +2562,11 @@ exports[`EuiBasicTable with pagination and error 1`] = `
extends Component<
if (
!(column as EuiTableFieldDataColumnType).sortable ||
- (column as EuiTableFieldDataColumnType).hideForMobile
+ (column as EuiTableFieldDataColumnType)?.mobileOptions?.show ===
+ false
) {
return;
}
@@ -797,8 +798,6 @@ export class EuiBasicTable extends Component<
dataType,
sortable,
mobileOptions,
- isMobileHeader,
- hideForMobile,
readOnly,
description,
} = column as EuiTableFieldDataColumnType;
@@ -883,8 +882,6 @@ export class EuiBasicTable extends Component<
key={`_data_h_${field}_${index}`}
align={columnAlign}
width={width}
- isMobileHeader={isMobileHeader}
- hideForMobile={hideForMobile}
mobileOptions={mobileOptions}
data-test-subj={`tableHeaderCell_${field}_${index}`}
description={description}
@@ -917,12 +914,11 @@ export class EuiBasicTable extends Component<
const footer = getColumnFooter(column, { items, pagination });
const {
mobileOptions,
- isMobileHeader,
field,
align,
} = column as EuiTableFieldDataColumnType;
- if ((mobileOptions && mobileOptions!.only) || isMobileHeader) {
+ if (mobileOptions?.only) {
return; // exclude columns that only exist for mobile headers
}
@@ -982,7 +978,7 @@ export class EuiBasicTable extends Component<
{error}
@@ -1000,7 +996,7 @@ export class EuiBasicTable extends Component<
{noItemsMessage}
@@ -1080,14 +1076,7 @@ export class EuiBasicTable extends Component<
let expandedRowColSpan = selection ? columns.length + 1 : columns.length;
const mobileOnlyCols = columns.reduce((num, column) => {
- if (
- (column as EuiTableFieldDataColumnType).mobileOptions &&
- (column as EuiTableFieldDataColumnType).mobileOptions!.only
- ) {
- return num + 1;
- }
-
- return (column as EuiTableFieldDataColumnType).isMobileHeader
+ return (column as EuiTableFieldDataColumnType)?.mobileOptions?.only
? num + 1
: num + 0; // BWC only
}, 0);
diff --git a/src/components/basic_table/table_types.ts b/src/components/basic_table/table_types.ts
index f0bff460444..75c2d3da847 100644
--- a/src/components/basic_table/table_types.ts
+++ b/src/components/basic_table/table_types.ts
@@ -65,11 +65,9 @@ export interface EuiTableFieldDataColumnType
* Indicates whether this column should truncate its content when it doesn't fit
*/
truncateText?: boolean;
- isMobileHeader?: boolean;
mobileOptions?: Omit & {
render?: (item: T) => ReactNode;
};
- hideForMobile?: boolean;
/**
* Describe a custom renderer function for the content
*/
diff --git a/src/components/button/__snapshots__/button.test.tsx.snap b/src/components/button/__snapshots__/button.test.tsx.snap
index c925a773e3e..4483c843abd 100644
--- a/src/components/button/__snapshots__/button.test.tsx.snap
+++ b/src/components/button/__snapshots__/button.test.tsx.snap
@@ -79,21 +79,6 @@ exports[`EuiButton props color primary is rendered 1`] = `
`;
-exports[`EuiButton props color secondary is rendered 1`] = `
-
-`;
-
exports[`EuiButton props color success is rendered 1`] = `
`;
-exports[`EuiExpression props color secondary is rendered 1`] = `
-
-
- the answer is
-
-
-
- 42
-
-
-`;
-
exports[`EuiExpression props color subdued is rendered 1`] = `
;
/**
* Color of the `description`
- * **`secondary` color is DEPRECATED, use `success` instead**
*/
color?: ExpressionColor;
/**
diff --git a/src/components/form/form_row/make_id.test.ts b/src/components/form/form_row/make_id.test.ts
deleted file mode 100644
index 27c23c61027..00000000000
--- a/src/components/form/form_row/make_id.test.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import makeId from './make_id';
-
-describe('makeId', () => {
- const _consoleLog = console.log;
- beforeAll(() => {
- const _consoleLog = console.log;
- console.log = (...args: [any?, ...any[]]) => {
- // swallow the deprecation warning
- if (
- args[0] ===
- 'WARNING: makeId is deprecated. Use htmlIdGenerator from @elastic/eui instead.'
- )
- return;
- _consoleLog.apply(console, args);
- };
- });
-
- afterAll(() => {
- console.log = _consoleLog;
- });
-
- let ids: Map;
- beforeEach(() => {
- ids = new Map();
- });
-
- test('returns a string of length 8', () => {
- expect(makeId()).toHaveLength(8);
- });
-
- // Could be slow so adding a [SLOW] tag for use with --testNamePattern=
- test('returns a random string - [SLOW]', () => {
- for (let i = 0; i < 60000; i += 1) {
- const id: string = makeId();
- expect(ids.has(id)).toBeFalsy();
- ids.set(id, true);
- }
- });
-});
diff --git a/src/components/form/form_row/make_id.ts b/src/components/form/form_row/make_id.ts
deleted file mode 100644
index e0f8c554763..00000000000
--- a/src/components/form/form_row/make_id.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-// Generate statistically almost-certainly-unique `id`s for associating form
-// inputs with their labels and other descriptive text elements.
-function makeId(): string {
- console.log(
- 'WARNING: makeId is deprecated. Use htmlIdGenerator from @elastic/eui instead.'
- );
- return Math.random().toString(36).slice(-8);
-}
-
-export default makeId;
diff --git a/src/components/health/__snapshots__/health.test.tsx.snap b/src/components/health/__snapshots__/health.test.tsx.snap
index 0c2581fea23..8d8d5943526 100644
--- a/src/components/health/__snapshots__/health.test.tsx.snap
+++ b/src/components/health/__snapshots__/health.test.tsx.snap
@@ -177,28 +177,6 @@ exports[`EuiHealth props color primary is rendered 1`] = `
`;
-exports[`EuiHealth props color secondary is rendered 1`] = `
-
-
-
-
-
-
-
-
-`;
-
exports[`EuiHealth props color subdued is rendered 1`] = `
`;
-exports[`EuiIcon props color secondary is rendered 1`] = `
-
-`;
-
exports[`EuiIcon props color subdued is rendered 1`] = `
`;
-exports[`EuiLink secondary is rendered 1`] = `
-
-`;
-
exports[`EuiLink subdued is rendered 1`] = `
;
@@ -65,7 +62,6 @@ export interface LinkAnchorProps {
type?: EuiLinkType;
/**
* Any of our named colors.
- * **`secondary` color is DEPRECATED, use `success` instead**
*/
color?: EuiLinkColor;
/**
diff --git a/src/components/loading/__snapshots__/loading_kibana.test.tsx.snap b/src/components/loading/__snapshots__/loading_kibana.test.tsx.snap
deleted file mode 100644
index 86f82e37056..00000000000
--- a/src/components/loading/__snapshots__/loading_kibana.test.tsx.snap
+++ /dev/null
@@ -1,59 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`EuiLoadingKibana is rendered 1`] = `
-
-
-
-
-
-`;
-
-exports[`EuiLoadingKibana size l is rendered 1`] = `
-
-
-
-
-
-`;
-
-exports[`EuiLoadingKibana size m is rendered 1`] = `
-
-
-
-
-
-`;
-
-exports[`EuiLoadingKibana size xl is rendered 1`] = `
-
-
-
-
-
-`;
diff --git a/src/components/loading/_index.scss b/src/components/loading/_index.scss
index 75bfa724f35..c2990867ddc 100644
--- a/src/components/loading/_index.scss
+++ b/src/components/loading/_index.scss
@@ -1,6 +1,6 @@
@import 'variables';
-@import 'loading_kibana';
@import 'loading_elastic';
@import 'loading_chart';
@import 'loading_content';
+@import 'loading_logo';
@import 'loading_spinner';
diff --git a/src/components/loading/_loading_kibana.scss b/src/components/loading/_loading_logo.scss
similarity index 82%
rename from src/components/loading/_loading_kibana.scss
rename to src/components/loading/_loading_logo.scss
index 5a113b31040..85e479a8cc6 100644
--- a/src/components/loading/_loading_kibana.scss
+++ b/src/components/loading/_loading_logo.scss
@@ -1,5 +1,4 @@
-.euiLoadingLogo,
-.euiLoadingKibana {
+.euiLoadingLogo {
position: relative;
display: inline-block;
@@ -27,8 +26,7 @@
}
}
- .euiLoadingLogo__icon,
- .euiLoadingKibana__icon {
+ .euiLoadingLogo__icon {
display: block;
@include euiCanAnimate {
@@ -40,8 +38,7 @@
/**
* 1. Requires pixel math for animation.
*/
-.euiLoadingLogo--medium,
-.euiLoadingKibana--medium {
+.euiLoadingLogo--medium {
width: $euiSize;
&:before,
@@ -50,15 +47,13 @@
bottom: -$euiSizeXS;
}
- .euiLoadingLogo__icon,
- .euiLoadingKibana__icon {
+ .euiLoadingLogo__icon {
z-index: 999;
animation-name: euiLoadingKibanaBounceMedium;
}
}
-.euiLoadingLogo--large,
-.euiLoadingKibana--large {
+.euiLoadingLogo--large {
width: $euiSizeL;
&:before,
@@ -67,14 +62,12 @@
bottom: -$euiSizeS;
}
- .euiLoadingLogo__icon,
- .euiLoadingKibana__icon {
+ .euiLoadingLogo__icon {
animation-name: euiLoadingKibanaBounceLarge;
}
}
-.euiLoadingLogo--xLarge,
-.euiLoadingKibana--xLarge {
+.euiLoadingLogo--xLarge {
width: $euiSizeXL;
&:before,
@@ -83,8 +76,7 @@
bottom: -$euiSizeM;
}
- .euiLoadingLogo__icon,
- .euiLoadingKibana__icon {
+ .euiLoadingLogo__icon {
animation-name: euiLoadingKibanaBounceXLarge;
}
}
diff --git a/src/components/loading/index.ts b/src/components/loading/index.ts
index 9dae0d5a615..3484f9d7b84 100644
--- a/src/components/loading/index.ts
+++ b/src/components/loading/index.ts
@@ -6,7 +6,6 @@
* Side Public License, v 1.
*/
-export { EuiLoadingKibana, EuiLoadingKibanaProps } from './loading_kibana';
export { EuiLoadingElastic, EuiLoadingElasticProps } from './loading_elastic';
export { EuiLoadingChart, EuiLoadingChartProps } from './loading_chart';
export { EuiLoadingContent, EuiLoadingContentProps } from './loading_content';
diff --git a/src/components/loading/loading_kibana.test.tsx b/src/components/loading/loading_kibana.test.tsx
deleted file mode 100644
index 840eceb06a9..00000000000
--- a/src/components/loading/loading_kibana.test.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import React from 'react';
-import { render } from 'enzyme';
-import { requiredProps } from '../../test/required_props';
-
-import { EuiLoadingKibana, SIZES } from './loading_kibana';
-
-describe('EuiLoadingKibana', () => {
- test('is rendered', () => {
- const component = render();
-
- expect(component).toMatchSnapshot();
- });
-
- describe('size', () => {
- SIZES.forEach((size) => {
- test(`${size} is rendered`, () => {
- const component = render();
-
- expect(component).toMatchSnapshot();
- });
- });
- });
-});
diff --git a/src/components/loading/loading_kibana.tsx b/src/components/loading/loading_kibana.tsx
deleted file mode 100644
index e79548211a9..00000000000
--- a/src/components/loading/loading_kibana.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
- * or more contributor license agreements. Licensed under the Elastic License
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
- * in compliance with, at your election, the Elastic License 2.0 or the Server
- * Side Public License, v 1.
- */
-
-import React, { HTMLAttributes, FunctionComponent } from 'react';
-import classNames from 'classnames';
-import { CommonProps, keysOf } from '../common';
-import { EuiIcon } from '../icon';
-
-const sizeToClassNameMap = {
- m: 'euiLoadingKibana--medium',
- l: 'euiLoadingKibana--large',
- xl: 'euiLoadingKibana--xLarge',
-};
-
-export const SIZES = keysOf(sizeToClassNameMap);
-
-export type EuiLoadingKibanaProps = CommonProps &
- HTMLAttributes & {
- size?: keyof typeof sizeToClassNameMap;
- };
-
-/**
- * **DEPRECATED** Use EuiLoadingLogo instead
- */
-export const EuiLoadingKibana: FunctionComponent = ({
- size = 'm',
- className,
- ...rest
-}) => {
- const classes = classNames(
- 'euiLoadingKibana',
- sizeToClassNameMap[size],
- className
- );
-
- return (
-
-
-
-
-
- );
-};
diff --git a/src/components/mark/mark.tsx b/src/components/mark/mark.tsx
index e9012c894c1..581d29c871a 100644
--- a/src/components/mark/mark.tsx
+++ b/src/components/mark/mark.tsx
@@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
-import React, { HTMLAttributes, FunctionComponent } from 'react';
+import React, { HTMLAttributes, FunctionComponent, ReactNode } from 'react';
import { CommonProps } from '../common';
import classNames from 'classnames';
export type EuiMarkProps = HTMLAttributes &
@@ -14,7 +14,7 @@ export type EuiMarkProps = HTMLAttributes &
/**
* ReactNode to render as this component's content
*/
- children: string;
+ children: ReactNode;
};
export const EuiMark: FunctionComponent = ({
diff --git a/src/components/markdown_editor/_markdown_format.scss b/src/components/markdown_editor/_markdown_format.scss
index ba33c62326e..bd24e3c0e4d 100644
--- a/src/components/markdown_editor/_markdown_format.scss
+++ b/src/components/markdown_editor/_markdown_format.scss
@@ -37,7 +37,6 @@
$euiMarkdownBorderColors: (
default: $euiMarkdownAlphaShade,
subdued: $euiTextSubduedColor,
- secondary: $euiColorSecondary,
success: $euiColorSuccess,
accent: $euiColorAccent,
warning: $euiColorWarning,
diff --git a/src/components/notification/notification_event_meta.tsx b/src/components/notification/notification_event_meta.tsx
index 12bd466605d..abca23b9d46 100644
--- a/src/components/notification/notification_event_meta.tsx
+++ b/src/components/notification/notification_event_meta.tsx
@@ -41,7 +41,6 @@ export type EuiNotificationEventMetaProps = {
severity?: string;
/**
* Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
- * **`secondary` color is DEPRECATED, use `success` instead**
*/
badgeColor?: EuiBadgeProps['color'];
/**
@@ -147,7 +146,7 @@ export const EuiNotificationEventMeta: FunctionComponent
diff --git a/src/components/page/page_content/page_content.tsx b/src/components/page/page_content/page_content.tsx
index 596513503f7..22effaccf2f 100644
--- a/src/components/page/page_content/page_content.tsx
+++ b/src/components/page/page_content/page_content.tsx
@@ -10,12 +10,7 @@ import React, { FunctionComponent } from 'react';
import classNames from 'classnames';
import { CommonProps } from '../../common';
-import {
- EuiPanel,
- PanelPaddingSize,
- _EuiPanelProps,
- _EuiPanelDivlike,
-} from '../../panel/panel';
+import { EuiPanel, _EuiPanelProps, _EuiPanelDivlike } from '../../panel/panel';
import { HTMLAttributes } from 'enzyme';
export type EuiPageContentVerticalPositions = 'center';
@@ -37,10 +32,6 @@ export type EuiPageContentProps = CommonProps &
// Use only the div properties of EuiPanel (not button)
_EuiPanelProps &
Omit<_EuiPanelDivlike, 'onClick' | 'role'> & {
- /**
- * **DEPRECATED: use `paddingSize` instead.**
- */
- panelPaddingSize?: PanelPaddingSize;
verticalPosition?: EuiPageContentVerticalPositions;
horizontalPosition?: EuiPageContentHorizontalPositions;
/**
@@ -53,7 +44,6 @@ export type EuiPageContentProps = CommonProps &
export const EuiPageContent: FunctionComponent = ({
verticalPosition,
horizontalPosition,
- panelPaddingSize,
paddingSize = 'l',
borderRadius,
children,
@@ -79,7 +69,7 @@ export const EuiPageContent: FunctionComponent = ({
return (
`;
-exports[`EuiProgress color secondary is rendered 1`] = `
-
-`;
-
exports[`EuiProgress color subdued is rendered 1`] = `
`;
-exports[`EuiStat props secondary is rendered 1`] = `
+exports[`EuiStat props subdued is rendered 1`] = `