diff --git a/package.json b/package.json index a8a40fca02780..e3b06c55f284e 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "@elastic/datemath": "5.0.3", "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.4.0-canary.1", "@elastic/ems-client": "8.3.3", - "@elastic/eui": "64.0.5", + "@elastic/eui": "67.1.8", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", diff --git a/packages/core/application/core-application-browser-internal/src/application_leave.tsx b/packages/core/application/core-application-browser-internal/src/application_leave.tsx index e6c7bc8b4ad7a..d2a82cbb129c8 100644 --- a/packages/core/application/core-application-browser-internal/src/application_leave.tsx +++ b/packages/core/application/core-application-browser-internal/src/application_leave.tsx @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import type { ButtonColor } from '@elastic/eui'; +import type { EuiButtonColor } from '@elastic/eui'; import { AppLeaveActionType, type AppLeaveActionFactory, @@ -20,7 +20,7 @@ const appLeaveActionFactory: AppLeaveActionFactory = { title?: string, callback?: () => void, confirmButtonText?: string, - buttonColor?: ButtonColor + buttonColor?: EuiButtonColor ) { return { type: AppLeaveActionType.confirm, diff --git a/packages/core/application/core-application-browser/src/app_leave.ts b/packages/core/application/core-application-browser/src/app_leave.ts index 683d55296ff66..edc18c5ef8a48 100644 --- a/packages/core/application/core-application-browser/src/app_leave.ts +++ b/packages/core/application/core-application-browser/src/app_leave.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { ButtonColor } from '@elastic/eui'; +import type { EuiButtonColor } from '@elastic/eui'; /** * A handler that will be executed before leaving the application, either when @@ -61,7 +61,7 @@ export interface AppLeaveConfirmAction { text: string; title?: string; confirmButtonText?: string; - buttonColor?: ButtonColor; + buttonColor?: EuiButtonColor; callback?: () => void; } @@ -95,7 +95,7 @@ export interface AppLeaveActionFactory { title?: string, callback?: () => void, confirmButtonText?: string, - buttonColor?: ButtonColor + buttonColor?: EuiButtonColor ): AppLeaveConfirmAction; /** diff --git a/packages/core/apps/core-apps-browser-internal/src/status/components/__snapshots__/server_status.test.tsx.snap b/packages/core/apps/core-apps-browser-internal/src/status/components/__snapshots__/server_status.test.tsx.snap index bcc60f5908592..60d1bad95e3e1 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/components/__snapshots__/server_status.test.tsx.snap +++ b/packages/core/apps/core-apps-browser-internal/src/status/components/__snapshots__/server_status.test.tsx.snap @@ -1,100 +1,61 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`ServerStatus renders correctly for green state 2`] = ` - - + - - - Green - - + Green - - + + `; exports[`ServerStatus renders correctly for red state 2`] = ` - - + - - - Red - - + Red - - + + `; exports[`ServerStatus renders correctly for yellow state 2`] = ` - - + - - - Yellow - - + Yellow - - + + `; diff --git a/packages/core/apps/core-apps-browser-internal/src/status/components/server_status.test.tsx b/packages/core/apps/core-apps-browser-internal/src/status/components/server_status.test.tsx index 13e6a36a65cfd..af27e2ba54ea2 100644 --- a/packages/core/apps/core-apps-browser-internal/src/status/components/server_status.test.tsx +++ b/packages/core/apps/core-apps-browser-internal/src/status/components/server_status.test.tsx @@ -24,7 +24,7 @@ describe('ServerStatus', () => { const status = getStatus(); const component = mount(); expect(component.find('EuiTitle').text()).toMatchInlineSnapshot(`"Kibana status is Green"`); - expect(component.find('EuiBadge')).toMatchSnapshot(); + expect(component.find('EuiBadge').render()).toMatchSnapshot(); }); it('renders correctly for yellow state', () => { @@ -34,7 +34,7 @@ describe('ServerStatus', () => { }); const component = mount(); expect(component.find('EuiTitle').text()).toMatchInlineSnapshot(`"Kibana status is Yellow"`); - expect(component.find('EuiBadge')).toMatchSnapshot(); + expect(component.find('EuiBadge').render()).toMatchSnapshot(); }); it('renders correctly for red state', () => { @@ -44,7 +44,7 @@ describe('ServerStatus', () => { }); const component = mount(); expect(component.find('EuiTitle').text()).toMatchInlineSnapshot(`"Kibana status is Red"`); - expect(component.find('EuiBadge')).toMatchSnapshot(); + expect(component.find('EuiBadge').render()).toMatchSnapshot(); }); it('displays the correct `name`', () => { diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap index 63e5e8dd748be..1475e5fbedd01 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap @@ -136,7 +136,7 @@ Array [ aria-controls="generated-id" aria-expanded="true" aria-labelledby="generated-id" - class="euiButtonIcon euiButtonIcon--text euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiAccordion__iconButton-isOpen-arrowRight" + class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiButtonIcon-empty-text-hoverStyles-euiAccordion__iconButton-isOpen-arrowRight" tabindex="-1" type="button" > @@ -261,7 +261,7 @@ Array [ aria-controls="generated-id" aria-expanded="true" aria-labelledby="generated-id" - class="euiButtonIcon euiButtonIcon--text euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiAccordion__iconButton-isOpen-arrowRight" + class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiButtonIcon-empty-text-hoverStyles-euiAccordion__iconButton-isOpen-arrowRight" tabindex="-1" type="button" > @@ -393,7 +393,7 @@ Array [ aria-controls="generated-id" aria-expanded="true" aria-labelledby="generated-id" - class="euiButtonIcon euiButtonIcon--text euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiAccordion__iconButton-isOpen-arrowRight" + class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiButtonIcon-empty-text-hoverStyles-euiAccordion__iconButton-isOpen-arrowRight" tabindex="-1" type="button" > @@ -508,7 +508,7 @@ Array [ aria-controls="generated-id" aria-expanded="true" aria-labelledby="generated-id" - class="euiButtonIcon euiButtonIcon--text euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiAccordion__iconButton-isOpen-arrowRight" + class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiButtonIcon-empty-text-hoverStyles-euiAccordion__iconButton-isOpen-arrowRight" tabindex="-1" type="button" > @@ -606,7 +606,7 @@ Array [ aria-controls="generated-id" aria-expanded="true" aria-labelledby="generated-id" - class="euiButtonIcon euiButtonIcon--text euiButtonIcon--empty euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiAccordion__iconButton-isOpen-arrowRight" + class="euiButtonIcon euiButtonIcon--xSmall euiAccordion__iconButton euiAccordion__iconButton-isOpen euiAccordion__iconButton--right emotion-euiButtonIcon-empty-text-hoverStyles-euiAccordion__iconButton-isOpen-arrowRight" tabindex="-1" type="button" > diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap index 2a42112f30a81..aa77a58ad7202 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap @@ -83,7 +83,7 @@ exports[`Header renders 1`] = ` aria-expanded="false" aria-haspopup="true" aria-label="Help menu" - class="euiButtonEmpty euiButtonEmpty--text euiHeaderSectionItemButton" + class="euiButtonEmpty euiHeaderSectionItemButton css-wvaqcf-empty-text" type="button" > + + `; diff --git a/packages/shared-ux/button_toolbar/src/buttons/primary/primary.test.tsx b/packages/shared-ux/button_toolbar/src/buttons/primary/primary.test.tsx index 10cbe7cb4dff0..8478ca1842c41 100644 --- a/packages/shared-ux/button_toolbar/src/buttons/primary/primary.test.tsx +++ b/packages/shared-ux/button_toolbar/src/buttons/primary/primary.test.tsx @@ -14,13 +14,13 @@ import { PrimaryButton } from './primary'; describe('', () => { test('is rendered', () => { const component = mountWithIntl(); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); test('it can be passed a functional onClick handler', () => { const mockHandler = jest.fn(); const component = mountWithIntl(); - component.simulate('click'); + component.find('button').simulate('click'); expect(mockHandler).toHaveBeenCalled(); }); }); diff --git a/packages/shared-ux/button_toolbar/src/popover/__snapshots__/popover.test.tsx.snap b/packages/shared-ux/button_toolbar/src/popover/__snapshots__/popover.test.tsx.snap index 319ea90381f9e..dd63af4b39fac 100644 --- a/packages/shared-ux/button_toolbar/src/popover/__snapshots__/popover.test.tsx.snap +++ b/packages/shared-ux/button_toolbar/src/popover/__snapshots__/popover.test.tsx.snap @@ -9,14 +9,14 @@ exports[` is rendered 1`] = ` class="euiPopover__anchor css-16vtueo-render" > - - - - - - -
- -
- -
- -
- - + Create chart + + + + +
+
+
+
`; diff --git a/packages/shared-ux/button_toolbar/src/toolbar/toolbar.test.tsx b/packages/shared-ux/button_toolbar/src/toolbar/toolbar.test.tsx index 545ed8d4f7b93..729695edab5e8 100644 --- a/packages/shared-ux/button_toolbar/src/toolbar/toolbar.test.tsx +++ b/packages/shared-ux/button_toolbar/src/toolbar/toolbar.test.tsx @@ -18,7 +18,7 @@ describe('', () => { const children = { primaryButton }; const component = mountWithIntl(); - expect(component).toMatchSnapshot(); + expect(component.render()).toMatchSnapshot(); }); test('onClick works as expected when the primary button is clicked', () => { diff --git a/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.component.test.tsx.snap b/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.component.test.tsx.snap index 17eb4ef8804cd..a74b8433433cb 100644 --- a/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.component.test.tsx.snap +++ b/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.component.test.tsx.snap @@ -11,7 +11,9 @@ exports[`NoDataCardComponent props button 1`] = ` description="Use Elastic Agent for a simple, unified way to collect data from your machines." footer={ Button @@ -40,7 +42,9 @@ exports[`NoDataCardComponent props href 1`] = ` description="Use Elastic Agent for a simple, unified way to collect data from your machines." footer={ Add Elastic Agent @@ -70,7 +74,9 @@ exports[`NoDataCardComponent renders 1`] = ` description="Use Elastic Agent for a simple, unified way to collect data from your machines." footer={ Add Elastic Agent diff --git a/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap b/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap index 949570f3e8b5a..89967755cbb11 100644 --- a/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap +++ b/packages/shared-ux/card/no_data/impl/src/__snapshots__/no_data_card.test.tsx.snap @@ -3,13 +3,13 @@ exports[`NoDataCard props button 1`] = `
- @@ -42,9 +42,9 @@ exports[`NoDataCard props button 1`] = ` Card title - +

@@ -53,17 +53,17 @@ exports[`NoDataCard props button 1`] = `