diff --git a/src-docs/src/components/guide_section/guide_section_parts/guide_section_tabs.tsx b/src-docs/src/components/guide_section/guide_section_parts/guide_section_tabs.tsx index 0218292dd04..bd18d5f0c06 100644 --- a/src-docs/src/components/guide_section/guide_section_parts/guide_section_tabs.tsx +++ b/src-docs/src/components/guide_section/guide_section_parts/guide_section_tabs.tsx @@ -57,7 +57,7 @@ export const GuideSectionExampleTabs: FunctionComponent { return ( - + {tabs.map((tab, index) => { const { displayName, diff --git a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap index 695129dac57..57cd4dc2c48 100644 --- a/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap +++ b/src/components/datagrid/__snapshots__/data_grid.test.tsx.snap @@ -1138,7 +1138,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -1170,7 +1169,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -1202,7 +1200,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -1234,7 +1231,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -1266,7 +1262,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -1298,7 +1293,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -1602,7 +1596,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn euiDataGridRowCell--controlColumn" data-gridcell-column-id="leading" data-gridcell-column-index="0" - data-gridcell-id="0,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -1653,7 +1646,6 @@ Array [ class="euiDataGridRowCell" data-gridcell-column-id="A" data-gridcell-column-index="1" - data-gridcell-id="1,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -1685,7 +1677,6 @@ Array [ class="euiDataGridRowCell" data-gridcell-column-id="B" data-gridcell-column-index="2" - data-gridcell-id="2,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -1717,7 +1708,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn euiDataGridRowCell--controlColumn" data-gridcell-column-id="trailing" data-gridcell-column-index="3" - data-gridcell-id="3,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -1768,7 +1758,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn euiDataGridRowCell--controlColumn" data-gridcell-column-id="leading" data-gridcell-column-index="0" - data-gridcell-id="0,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -1819,7 +1808,6 @@ Array [ class="euiDataGridRowCell" data-gridcell-column-id="A" data-gridcell-column-index="1" - data-gridcell-id="1,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -1851,7 +1839,6 @@ Array [ class="euiDataGridRowCell" data-gridcell-column-id="B" data-gridcell-column-index="2" - data-gridcell-id="2,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -1883,7 +1870,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn euiDataGridRowCell--controlColumn" data-gridcell-column-id="trailing" data-gridcell-column-index="3" - data-gridcell-id="3,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -1934,7 +1920,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn euiDataGridRowCell--controlColumn" data-gridcell-column-id="leading" data-gridcell-column-index="0" - data-gridcell-id="0,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -1985,7 +1970,6 @@ Array [ class="euiDataGridRowCell" data-gridcell-column-id="A" data-gridcell-column-index="1" - data-gridcell-id="1,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -2017,7 +2001,6 @@ Array [ class="euiDataGridRowCell" data-gridcell-column-id="B" data-gridcell-column-index="2" - data-gridcell-id="2,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -2049,7 +2032,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn euiDataGridRowCell--controlColumn" data-gridcell-column-id="trailing" data-gridcell-column-index="3" - data-gridcell-id="3,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -2333,7 +2315,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -2365,7 +2346,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -2397,7 +2377,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -2429,7 +2408,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -2461,7 +2439,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -2493,7 +2470,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -2756,7 +2732,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -2788,7 +2763,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -2820,7 +2794,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -2852,7 +2825,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,1" data-gridcell-row-index="1" data-gridcell-visible-row-index="1" data-test-subj="dataGridRowCell" @@ -2884,7 +2856,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--firstColumn" data-gridcell-column-id="A" data-gridcell-column-index="0" - data-gridcell-id="0,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" @@ -2916,7 +2887,6 @@ Array [ class="euiDataGridRowCell euiDataGridRowCell--lastColumn" data-gridcell-column-id="B" data-gridcell-column-index="1" - data-gridcell-id="1,2" data-gridcell-row-index="2" data-gridcell-visible-row-index="2" data-test-subj="dataGridRowCell" diff --git a/src/components/datagrid/body/__snapshots__/data_grid_body.test.tsx.snap b/src/components/datagrid/body/__snapshots__/data_grid_body.test.tsx.snap index 4b0c6d49d8f..a080a115d1c 100644 --- a/src/components/datagrid/body/__snapshots__/data_grid_body.test.tsx.snap +++ b/src/components/datagrid/body/__snapshots__/data_grid_body.test.tsx.snap @@ -104,7 +104,6 @@ exports[`EuiDataGridBody renders 1`] = ` class="euiDataGridRowCell euiDataGridRowCell--boolean euiDataGridRowCell--firstColumn" data-gridcell-column-id="columnA" data-gridcell-column-index="0" - data-gridcell-id="0,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" @@ -138,7 +137,6 @@ exports[`EuiDataGridBody renders 1`] = ` class="euiDataGridRowCell euiDataGridRowCell--string euiDataGridRowCell--lastColumn" data-gridcell-column-id="columnB" data-gridcell-column-index="1" - data-gridcell-id="1,0" data-gridcell-row-index="0" data-gridcell-visible-row-index="0" data-test-subj="dataGridRowCell" diff --git a/src/components/datagrid/body/__snapshots__/data_grid_cell.test.tsx.snap b/src/components/datagrid/body/__snapshots__/data_grid_cell.test.tsx.snap index e8f2afac7be..cba98ca001a 100644 --- a/src/components/datagrid/body/__snapshots__/data_grid_cell.test.tsx.snap +++ b/src/components/datagrid/body/__snapshots__/data_grid_cell.test.tsx.snap @@ -93,7 +93,6 @@ exports[`EuiDataGridCell renders 1`] = ` className="euiDataGridRowCell" data-gridcell-column-id="someColumn" data-gridcell-column-index={0} - data-gridcell-id="0,0" data-gridcell-row-index={0} data-gridcell-visible-row-index={0} data-test-subj="dataGridRowCell" diff --git a/src/components/datagrid/body/data_grid_cell.tsx b/src/components/datagrid/body/data_grid_cell.tsx index 920736b98d2..c8938e512a7 100644 --- a/src/components/datagrid/body/data_grid_cell.tsx +++ b/src/components/datagrid/body/data_grid_cell.tsx @@ -697,7 +697,6 @@ export class EuiDataGridCell extends Component< data-gridcell-column-index={this.props.colIndex} // Affected by column reordering data-gridcell-row-index={this.props.rowIndex} // Index from data, not affected by sorting or pagination data-gridcell-visible-row-index={this.props.visibleRowIndex} // Affected by sorting & pagination - data-gridcell-id={`${this.props.colIndex},${this.props.rowIndex}`} // TODO: Deprecate in favor of the above 4 data attrs onKeyDown={handleCellKeyDown} onFocus={this.onFocus} onMouseEnter={() => { diff --git a/src/components/datagrid/data_grid.test.tsx b/src/components/datagrid/data_grid.test.tsx index 4d5bd581306..195033a2ef7 100644 --- a/src/components/datagrid/data_grid.test.tsx +++ b/src/components/datagrid/data_grid.test.tsx @@ -545,7 +545,6 @@ describe('EuiDataGrid', () => { "className": "euiDataGridRowCell euiDataGridRowCell--firstColumn customClass", "data-gridcell-column-id": "A", "data-gridcell-column-index": 0, - "data-gridcell-id": "0,0", "data-gridcell-row-index": 0, "data-gridcell-visible-row-index": 0, "data-test-subj": "dataGridRowCell", @@ -571,7 +570,6 @@ describe('EuiDataGrid', () => { "className": "euiDataGridRowCell euiDataGridRowCell--lastColumn customClass", "data-gridcell-column-id": "B", "data-gridcell-column-index": 1, - "data-gridcell-id": "1,0", "data-gridcell-row-index": 0, "data-gridcell-visible-row-index": 0, "data-test-subj": "dataGridRowCell", @@ -597,7 +595,6 @@ describe('EuiDataGrid', () => { "className": "euiDataGridRowCell euiDataGridRowCell--firstColumn customClass", "data-gridcell-column-id": "A", "data-gridcell-column-index": 0, - "data-gridcell-id": "0,1", "data-gridcell-row-index": 1, "data-gridcell-visible-row-index": 1, "data-test-subj": "dataGridRowCell", @@ -623,7 +620,6 @@ describe('EuiDataGrid', () => { "className": "euiDataGridRowCell euiDataGridRowCell--lastColumn customClass", "data-gridcell-column-id": "B", "data-gridcell-column-index": 1, - "data-gridcell-id": "1,1", "data-gridcell-row-index": 1, "data-gridcell-visible-row-index": 1, "data-test-subj": "dataGridRowCell", diff --git a/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap b/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap index c977e76b4bb..dfd1c41262d 100644 --- a/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap +++ b/src/components/date_picker/__snapshots__/date_picker.test.tsx.snap @@ -867,7 +867,7 @@ exports[`EuiDatePicker localization inherits locale from context 1`] = ` `; -exports[`EuiDatePicker popoverPlacement top-end is rendered 1`] = ` +exports[`EuiDatePicker popoverPlacement upRight is rendered 1`] = ` { }); describe('popoverPlacement', () => { - test('top-end is rendered', () => { + test('upRight is rendered', () => { const component = mount( - + ); expect(component).toMatchSnapshot(); diff --git a/src/components/date_picker/date_picker.tsx b/src/components/date_picker/date_picker.tsx index 8f7aee14578..0d49faa201e 100644 --- a/src/components/date_picker/date_picker.tsx +++ b/src/components/date_picker/date_picker.tsx @@ -24,41 +24,6 @@ import { ReactDatePicker, ReactDatePickerProps } from './react-datepicker'; export const euiDatePickerDefaultDateFormat = 'MM/DD/YYYY'; export const euiDatePickerDefaultTimeFormat = 'hh:mm A'; -type popperPlacement = - | 'bottom' - | 'bottom-end' - | 'bottom-start' - | 'left' - | 'left-end' - | 'left-start' - | 'right' - | 'right-end' - | 'right-start' - | 'top' - | 'top-end' - | 'top-start'; - -const mapAnchorPositions: { - [key in popperPlacement]: PopoverAnchorPosition; -} = { - 'bottom-start': 'downLeft', - bottom: 'downCenter', - 'bottom-end': 'downRight', - 'left-start': 'leftUp', - left: 'leftCenter', - 'left-end': 'leftDown', - 'right-start': 'rightUp', - right: 'rightCenter', - 'right-end': 'rightDown', - 'top-start': 'upLeft', - top: 'upCenter', - 'top-end': 'upRight', -}; - -function isPopperPlacement(position?: string): position is popperPlacement { - return position != null && Object.keys(mapAnchorPositions).includes(position); -} - // EuiDatePicker only supports a subset of props from react-datepicker. const unsupportedProps = [ // We don't want to show multiple months next to each other @@ -149,11 +114,9 @@ interface EuiExtendedDatePickerProps /** * Sets the placement of the popover. * - * DEPRECATED: 'bottom', 'bottom-end', 'bottom-start', 'left', 'left-end', 'left-start', right', 'right-end', 'right-start', 'top', 'top-end', 'top-start' - * * **Use [EuiPopover](/#/layout/popover) values**: 'upCenter', 'upLeft', 'upRight', downCenter', 'downLeft', 'downRight', 'leftCenter', 'leftUp', 'leftDown', 'rightCenter', 'rightUp', 'rightDown'. */ - popoverPlacement?: PopoverAnchorPosition | popperPlacement; + popoverPlacement?: PopoverAnchorPosition; } type _EuiDatePickerProps = CommonProps & EuiExtendedDatePickerProps; @@ -205,7 +168,7 @@ export class EuiDatePicker extends Component<_EuiDatePickerProps> { openToDate, placeholder, popperClassName, - popoverPlacement: _popoverPlacement, + popoverPlacement, selected, shadow, shouldCloseOnSelect, @@ -253,13 +216,6 @@ export class EuiDatePicker extends Component<_EuiDatePickerProps> { fullDateFormat = `${dateFormat} ${timeFormat}`; } - let popoverPlacement: PopoverAnchorPosition; - if (isPopperPlacement(_popoverPlacement)) { - popoverPlacement = mapAnchorPositions[_popoverPlacement]; - } else { - popoverPlacement = _popoverPlacement!; - } - return ( = ({ showIcon: false, fullWidth: fullWidth, readOnly: readOnly, - popoverPlacement: 'bottom-end', + popoverPlacement: 'downRight', className: classNames( 'euiDatePickerRange__end', endDateControl.props.className diff --git a/src/components/filter_group/filter_button.tsx b/src/components/filter_group/filter_button.tsx index 8a8fa913652..00cf0ccabf0 100644 --- a/src/components/filter_group/filter_button.tsx +++ b/src/components/filter_group/filter_button.tsx @@ -43,11 +43,6 @@ export type EuiFilterButtonProps = { * Remove border after button, good for opposite filters */ withNext?: boolean; - /** - * _DEPRECATED: use `withNext`_ - * Remove border after button, good for opposite filters - */ - noDivider?: boolean; } & DistributiveOmit; export const EuiFilterButton: FunctionComponent = ({ @@ -63,7 +58,6 @@ export const EuiFilterButton: FunctionComponent = ({ isSelected, type = 'button', grow = true, - noDivider, withNext, textProps, ...rest @@ -80,7 +74,7 @@ export const EuiFilterButton: FunctionComponent = ({ 'euiFilterButton-hasNotification': numFiltersDefined, 'euiFilterButton--hasIcon': iconType, 'euiFilterButton--noGrow': !grow, - 'euiFilterButton--withNext': noDivider || withNext, + 'euiFilterButton--withNext': withNext, }, className ); diff --git a/src/components/markdown_editor/markdown_editor.tsx b/src/components/markdown_editor/markdown_editor.tsx index 296ae753368..d6d54d7babe 100644 --- a/src/components/markdown_editor/markdown_editor.tsx +++ b/src/components/markdown_editor/markdown_editor.tsx @@ -44,7 +44,6 @@ import { import { EuiModal } from '../modal'; import { ContextShape, EuiMarkdownContext } from './markdown_context'; -import * as MarkdownTooltip from './plugins/markdown_tooltip'; import { defaultParsingPlugins, defaultProcessingPlugins, @@ -227,13 +226,6 @@ export const EuiMarkdownEditor = forwardRef< >(undefined); const toolbarPlugins = [...uiPlugins]; - // @ts-ignore __originatedFromEui is a custom property - if (!uiPlugins.__originatedFromEui) { - toolbarPlugins.unshift(MarkdownTooltip.plugin); - console.warn( - 'Deprecation warning: uiPlugins passed to EuiMarkdownEditor does not include the tooltip plugin, which has been added for you. This automatic inclusion has been deprecated and will be removed in the future, see https://github.com/elastic/eui/pull/4383' - ); - } const markdownActions = useMemo( () => new MarkdownActions(editorId, toolbarPlugins), diff --git a/src/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.ts b/src/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.ts index 0b885654aff..f5dc92cb9c8 100644 --- a/src/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.ts +++ b/src/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.ts @@ -19,8 +19,6 @@ export const getDefaultEuiMarkdownUiPlugins = ({ if (!excludeSet.has('tooltip')) uiPlugins.push(MarkdownTooltip.plugin); - // @ts-ignore __originatedFromEui is a custom property - uiPlugins.__originatedFromEui = true; return uiPlugins; }; diff --git a/src/components/page/page_header/__snapshots__/page_header.test.tsx.snap b/src/components/page/page_header/__snapshots__/page_header.test.tsx.snap index 9dc91ab28e6..cb2c6b03f4a 100644 --- a/src/components/page/page_header/__snapshots__/page_header.test.tsx.snap +++ b/src/components/page/page_header/__snapshots__/page_header.test.tsx.snap @@ -306,7 +306,7 @@ exports[`EuiPageHeader props page content props are passed down is rendered 1`] />
diff --git a/src/components/page/page_header/__snapshots__/page_header_content.test.tsx.snap b/src/components/page/page_header/__snapshots__/page_header_content.test.tsx.snap index 6dc3292468d..576789e8c13 100644 --- a/src/components/page/page_header/__snapshots__/page_header_content.test.tsx.snap +++ b/src/components/page/page_header/__snapshots__/page_header_content.test.tsx.snap @@ -329,7 +329,7 @@ exports[`EuiPageHeaderContent props children is rendered even if content props a class="euiSpacer euiSpacer--l css-p2o3x6-euiSpacer-l" />
-`; - -exports[`EuiStepHorizontal props status disabled is rendered 1`] = ` +exports[`EuiStepHorizontal props status disabled overrides the passed status 1`] = ` - -
-
-

- Elasticsearch content -

-
-
-`; - exports[`EuiTabbedContent props initialSelectedTab renders a selected tab 1`] = `
{ }); }); - describe('display', () => { - test('can be condensed', () => { - const component = render( - - ); - expect(component).toMatchSnapshot(); - }); - }); - describe('autoFocus', () => { AUTOFOCUS.forEach((focusType) => { test(`${focusType} is rendered`, () => { diff --git a/src/components/tabs/tabbed_content/tabbed_content.tsx b/src/components/tabs/tabbed_content/tabbed_content.tsx index 601b1cbd30c..e60cc31f3c2 100644 --- a/src/components/tabs/tabbed_content/tabbed_content.tsx +++ b/src/components/tabs/tabbed_content/tabbed_content.tsx @@ -10,7 +10,7 @@ import React, { Component, createRef, HTMLAttributes, ReactNode } from 'react'; import { htmlIdGenerator } from '../../../services'; -import { EuiTabs, EuiTabsDisplaySizes, EuiTabsSizes } from '../tabs'; +import { EuiTabs, EuiTabsSizes } from '../tabs'; import { EuiTab, EuiTabProps } from '../tab'; import { CommonProps } from '../../common'; @@ -38,10 +38,6 @@ export type EuiTabbedContentProps = CommonProps & * overlay content like popovers or flyouts. */ autoFocus?: 'initial' | 'selected'; - /** - * Choose `default` or alternative `condensed` display styles - */ - display?: EuiTabsDisplaySizes; /** * Evenly stretches each tab to fill the horizontal space */ @@ -163,7 +159,6 @@ export class EuiTabbedContent extends Component< render() { const { className, - display, expand, initialSelectedTab, onTabClick, @@ -188,7 +183,6 @@ export class EuiTabbedContent extends Component< diff --git a/src/components/tabs/tabs.test.tsx b/src/components/tabs/tabs.test.tsx index b3d9a9c0d3b..c1572a2ba7d 100644 --- a/src/components/tabs/tabs.test.tsx +++ b/src/components/tabs/tabs.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { render } from 'enzyme'; import { requiredProps } from '../../test/required_props'; -import { EuiTabs, SIZES, DISPLAYS } from './tabs'; +import { EuiTabs, SIZES } from './tabs'; describe('EuiTabs', () => { test('renders', () => { @@ -30,18 +30,6 @@ describe('EuiTabs', () => { }); }); - describe('display', () => { - DISPLAYS.forEach((display) => { - it(`${display} is rendered`, () => { - const component = render( - children - ); - - expect(component).toMatchSnapshot(); - }); - }); - }); - describe('expand', () => { test('is rendered', () => { const component = render(children); diff --git a/src/components/tabs/tabs.tsx b/src/components/tabs/tabs.tsx index 18c1070e4f8..a580ae12b7a 100644 --- a/src/components/tabs/tabs.tsx +++ b/src/components/tabs/tabs.tsx @@ -15,15 +15,6 @@ import React, { import classNames from 'classnames'; import { CommonProps, keysOf } from '../common'; -const displayToClassNameMap = { - condensed: 'euiTabs--condensed', - default: null, -}; - -export const DISPLAYS = keysOf(displayToClassNameMap); - -export type EuiTabsDisplaySizes = keyof typeof displayToClassNameMap; - const sizeToClassNameMap = { s: 'euiTabs--small', m: null, @@ -41,11 +32,6 @@ export type EuiTabsProps = CommonProps & * ReactNode to render as this component's content */ children?: ReactNode; - /** - * **DEPRECATED IN AMSTERDAM** - * Choose `default` or alternative `condensed` display styles. - */ - display?: EuiTabsDisplaySizes; /** * Evenly stretches each tab to fill the * horizontal space @@ -69,7 +55,6 @@ export const EuiTabs = forwardRef>( { children, className, - display = 'default', bottomBorder = true, expand = false, size = 'm', @@ -77,15 +62,9 @@ export const EuiTabs = forwardRef>( }: PropsWithChildren, ref ) => { - /** - * Temporary force of bottom border based on `display` - */ - bottomBorder = display === 'condensed' ? false : bottomBorder; - const classes = classNames( 'euiTabs', sizeToClassNameMap[size], - displayToClassNameMap[display], { 'euiTabs--expand': expand, 'euiTabs--bottomBorder': bottomBorder, diff --git a/src/global_styling/utility/_utility.scss b/src/global_styling/utility/_utility.scss index c64257ffd4d..26c4d8b44e0 100644 --- a/src/global_styling/utility/_utility.scss +++ b/src/global_styling/utility/_utility.scss @@ -39,14 +39,6 @@ word-break: normal !important; } -// TODO: 7/23 DEPRECATE in favor of .eui-textBreakWord now that it's working as intended -.eui-textOverflowWrap { - @include internetExplorerOnly { - word-break: break-all !important; - } - overflow-wrap: break-word !important; -} - .eui-textTruncate { @include euiTextTruncate; } @@ -129,11 +121,6 @@ @include euiXScrollWithShadows; } -// TODO: 10/22 DEPRECATE in favor of the correctly formatted class .eui-yScrollWithShadows -.euiYScrollWithShadows { - @include euiYScrollWithShadows; -} - /** * Forcing focus ring on non-EUI elements */ diff --git a/src/global_styling/variables/_buttons.scss b/src/global_styling/variables/_buttons.scss index 97d2d365855..97304c0f5c0 100644 --- a/src/global_styling/variables/_buttons.scss +++ b/src/global_styling/variables/_buttons.scss @@ -14,7 +14,6 @@ $euiButtonTypes: ( success: $euiColorSuccess, warning: $euiColorWarning, danger: $euiColorDanger, - subdued: $euiTextSubduedColor, // Should get deprecated in favor of `text` ghost: $euiColorGhost, // Ghost is special, and does not care about theming. text: $euiColorDarkShade, // Reserved for special use cases ) !default; diff --git a/src/themes/charts/themes.ts b/src/themes/charts/themes.ts index ac19da9365d..cf292a559ba 100644 --- a/src/themes/charts/themes.ts +++ b/src/themes/charts/themes.ts @@ -6,12 +6,7 @@ * Side Public License, v 1. */ -import { - PartialTheme, - LineAnnotationStyle, - RecursivePartial, - PartitionConfig, -} from '@elastic/charts'; +import { PartialTheme, LineAnnotationStyle } from '@elastic/charts'; import { euiPaletteColorBlind } from '../../services/color/eui_palettes'; import { DEFAULT_VISUALIZATION_COLOR } from '../../services/color/visualization_colors'; @@ -27,8 +22,6 @@ const fontFamily = `'Inter', 'Inter UI', -apple-system, BlinkMacSystemFont, export interface EuiChartThemeType { lineAnnotation: LineAnnotationStyle; theme: PartialTheme; - /** DEPRECATED: Use `theme.partition` config instead */ - partition: RecursivePartial; } function createTheme(colors: any): EuiChartThemeType { @@ -46,25 +39,6 @@ function createTheme(colors: any): EuiChartThemeType { padding: 0, }, }, - partition: { - fontFamily: fontFamily, - minFontSize: 8, - maxFontSize: 16, - fillLabel: { - valueFont: { - fontWeight: 700, - }, - }, - linkLabel: { - maxCount: 5, - fontSize: 11, - textColor: colors.euiTextColor.rgba, - }, - outerSizeRatio: 1, - circlePadding: 4, - sectorLineStroke: colors.euiColorEmptyShade.rgba, - sectorLineWidth: 1.5, - }, theme: { background: { color: colors.euiColorEmptyShade.rgba, diff --git a/upcoming_changelogs/5868.md b/upcoming_changelogs/5868.md new file mode 100644 index 00000000000..28c91ba8eee --- /dev/null +++ b/upcoming_changelogs/5868.md @@ -0,0 +1,14 @@ +**Breaking changes** + +- Removed deprecated options for `EuiDatePicker`'s `popoverPosition` props - use `EuiPopover` values going forward +- Removed `partition` prop from EuiCharts theme configuration - use `theme.partition` instead +- Removed `data-grid-cell-id` attribute from `EuiDataGrid` cells - use separate `data-gridcell-column-id` & `data-gridcell-row-index` attributes instead +- Removed `noDivider` prop from `EuiFilterButton` - use `withNext` prop instead +- Removed `isSelected` and `isComplete` props from `EuiHorizontalStep` - use `status` prop instead +- Removed `isHollow` prop from `EuiStep` - this visual appearance is no longer used in Amsterdam +- Removed condensed `display` prop from `EuiTabs` & `EuiTabbedContent` - this visual appearance is no longer used in Amsterdam +- Removed `descriptionDisplay` and `labelDisplay` props from `EuiSuggestItem` - use `truncate` and `labelWidth` instead, respectively +- Removed `.euiButton---subdued` className and `$euiButtonTypes.subdued` Sass variable - use `text` color instead +- Removed `.eui-textOverflowWrap` - use `.eui-textBreakWord` instead +- Removed `.euiYScrollWithShadows` - use `.eui-yScrollWithShadows` instead +- `EuiMarkdownEditor` no longer automatically includes the tooltip plugin in custom plugin arrays passed to `uiPlugins`. To use EUI's tooltip plugin, use `getDefaultEuiMarkdownPlugins()`