@elastic/eui 72.1.0 → 73.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/CHANGELOG.md +6185 -0
  2. package/dist/eui_theme_dark.css +15 -15
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +15 -15
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/accordion/accordion.js +1 -1
  7. package/es/components/datagrid/controls/column_selector.js +23 -7
  8. package/es/components/datagrid/controls/column_sorting_draggable.js +17 -8
  9. package/es/components/datagrid/data_grid.a11y.js +3 -2
  10. package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  11. package/es/components/date_picker/super_date_picker/super_update_button.js +8 -0
  12. package/es/components/image/image.js +9 -2
  13. package/es/components/image/image_fullscreen_wrapper.js +3 -1
  14. package/es/components/image/image_wrapper.js +3 -1
  15. package/es/components/markdown_editor/markdown_format.styles.js +2 -5
  16. package/es/components/notification/notification_event.a11y.js +113 -0
  17. package/es/components/page/page_header/page_header.a11y.js +32 -0
  18. package/es/components/portal/portal.a11y.js +70 -0
  19. package/es/components/text/text.styles.js +6 -3
  20. package/es/components/tool_tip/icon_tip.js +8 -0
  21. package/es/components/tool_tip/tool_tip.js +34 -6
  22. package/es/components/tool_tip/tool_tip_manager.js +42 -0
  23. package/es/components/tour/tour.styles.js +1 -1
  24. package/eui.d.ts +23 -1
  25. package/i18ntokens.json +36 -20
  26. package/lib/components/accordion/accordion.js +1 -1
  27. package/lib/components/datagrid/controls/column_selector.js +21 -6
  28. package/lib/components/datagrid/controls/column_sorting_draggable.js +17 -8
  29. package/lib/components/datagrid/data_grid.a11y.js +3 -2
  30. package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  31. package/lib/components/date_picker/super_date_picker/super_update_button.js +8 -0
  32. package/lib/components/image/image.js +9 -2
  33. package/lib/components/image/image_fullscreen_wrapper.js +3 -1
  34. package/lib/components/image/image_wrapper.js +3 -1
  35. package/lib/components/markdown_editor/markdown_format.styles.js +1 -4
  36. package/lib/components/notification/notification_event.a11y.js +117 -0
  37. package/lib/components/page/page_header/page_header.a11y.js +40 -0
  38. package/lib/components/portal/portal.a11y.js +73 -0
  39. package/lib/components/text/text.styles.js +5 -2
  40. package/lib/components/tool_tip/icon_tip.js +8 -0
  41. package/lib/components/tool_tip/tool_tip.js +37 -8
  42. package/lib/components/tool_tip/tool_tip_manager.js +50 -0
  43. package/lib/components/tour/tour.styles.js +1 -1
  44. package/optimize/es/components/accordion/accordion.js +1 -1
  45. package/optimize/es/components/datagrid/controls/column_selector.js +22 -7
  46. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +17 -8
  47. package/optimize/es/components/datagrid/data_grid.a11y.js +3 -2
  48. package/optimize/es/components/image/image.js +4 -2
  49. package/optimize/es/components/image/image_fullscreen_wrapper.js +3 -1
  50. package/optimize/es/components/image/image_wrapper.js +3 -1
  51. package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -5
  52. package/optimize/es/components/notification/notification_event.a11y.js +103 -0
  53. package/optimize/es/components/page/page_header/page_header.a11y.js +32 -0
  54. package/optimize/es/components/portal/portal.a11y.js +60 -0
  55. package/optimize/es/components/text/text.styles.js +6 -3
  56. package/optimize/es/components/tool_tip/tool_tip.js +26 -6
  57. package/optimize/es/components/tool_tip/tool_tip_manager.js +41 -0
  58. package/optimize/es/components/tour/tour.styles.js +1 -1
  59. package/optimize/lib/components/accordion/accordion.js +1 -1
  60. package/optimize/lib/components/datagrid/controls/column_selector.js +21 -6
  61. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +17 -8
  62. package/optimize/lib/components/datagrid/data_grid.a11y.js +3 -2
  63. package/optimize/lib/components/image/image.js +4 -2
  64. package/optimize/lib/components/image/image_fullscreen_wrapper.js +3 -1
  65. package/optimize/lib/components/image/image_wrapper.js +3 -1
  66. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +1 -4
  67. package/optimize/lib/components/notification/notification_event.a11y.js +117 -0
  68. package/optimize/lib/components/page/page_header/page_header.a11y.js +40 -0
  69. package/optimize/lib/components/portal/portal.a11y.js +73 -0
  70. package/optimize/lib/components/text/text.styles.js +5 -2
  71. package/optimize/lib/components/tool_tip/tool_tip.js +29 -8
  72. package/optimize/lib/components/tool_tip/tool_tip_manager.js +49 -0
  73. package/optimize/lib/components/tour/tour.styles.js +1 -1
  74. package/package.json +2 -2
  75. package/src/components/datagrid/controls/_data_grid_column_sorting.scss +14 -13
  76. package/src/components/date_picker/react-datepicker/LICENSE +21 -0
  77. package/src/components/date_picker/react-datepicker/README.md +168 -0
  78. package/src/components/markdown_editor/_markdown_format.scss +0 -4
  79. package/src/services/theme/README.md +153 -0
  80. package/src/test/README.md +59 -0
  81. package/test-env/components/accordion/accordion.js +1 -1
  82. package/test-env/components/datagrid/controls/column_selector.js +21 -6
  83. package/test-env/components/datagrid/controls/column_sorting_draggable.js +17 -8
  84. package/test-env/components/datagrid/data_grid.a11y.js +3 -2
  85. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  86. package/test-env/components/date_picker/super_date_picker/super_update_button.js +8 -0
  87. package/test-env/components/image/image.js +9 -2
  88. package/test-env/components/image/image_fullscreen_wrapper.js +3 -1
  89. package/test-env/components/image/image_wrapper.js +3 -1
  90. package/test-env/components/markdown_editor/markdown_format.styles.js +1 -4
  91. package/test-env/components/notification/notification_event.a11y.js +117 -0
  92. package/test-env/components/page/page_header/page_header.a11y.js +40 -0
  93. package/test-env/components/portal/portal.a11y.js +73 -0
  94. package/test-env/components/text/text.styles.js +5 -2
  95. package/test-env/components/tool_tip/icon_tip.js +8 -0
  96. package/test-env/components/tool_tip/tool_tip.js +37 -8
  97. package/test-env/components/tool_tip/tool_tip_manager.js +49 -0
  98. package/test-env/components/tour/tour.styles.js +1 -1
@@ -28,7 +28,8 @@ export var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref)
28
28
  setIsFullScreen = _ref.setIsFullScreen,
29
29
  wrapperProps = _ref.wrapperProps,
30
30
  isFullWidth = _ref.isFullWidth,
31
- fullScreenIconColor = _ref.fullScreenIconColor;
31
+ fullScreenIconColor = _ref.fullScreenIconColor,
32
+ onFullScreen = _ref.onFullScreen;
32
33
  var euiTheme = useEuiTheme();
33
34
  var styles = euiImageFullscreenWrapperStyles(euiTheme);
34
35
  var cssStyles = [styles.euiImageFullscreenWrapper];
@@ -44,6 +45,7 @@ export var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref)
44
45
 
45
46
  var closeFullScreen = function closeFullScreen() {
46
47
  setIsFullScreen(false);
48
+ onFullScreen === null || onFullScreen === void 0 ? void 0 : onFullScreen(false);
47
49
  };
48
50
 
49
51
  var _useInnerText = useInnerText(),
@@ -27,10 +27,12 @@ export var EuiImageWrapper = function EuiImageWrapper(_ref) {
27
27
  setIsFullScreen = _ref.setIsFullScreen,
28
28
  wrapperProps = _ref.wrapperProps,
29
29
  fullScreenIconColor = _ref.fullScreenIconColor,
30
- isFullWidth = _ref.isFullWidth;
30
+ isFullWidth = _ref.isFullWidth,
31
+ onFullScreen = _ref.onFullScreen;
31
32
 
32
33
  var openFullScreen = function openFullScreen() {
33
34
  setIsFullScreen(true);
35
+ onFullScreen === null || onFullScreen === void 0 ? void 0 : onFullScreen(true);
34
36
  };
35
37
 
36
38
  var classes = classNames('euiImageWrapper', wrapperProps && wrapperProps.className);
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, logicalShorthandCSS, euiFontSize, mathWithUnits } from '../../global_styling';
9
+ import { logicalCSS, euiFontSize, mathWithUnits } from '../../global_styling';
10
10
  /**
11
11
  * Mixins
12
12
  */
@@ -20,16 +20,13 @@ var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, o
20
20
  var measurement = options.measurement;
21
21
  var lineHeightSize = measurement === 'em' ? "".concat(lineHeight, "em") : lineHeight; // Custom scales
22
22
 
23
- var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
24
- return x / 4;
25
- });
26
23
  var tablePaddingVertical = mathWithUnits(fontSize, function (x) {
27
24
  return x / 4;
28
25
  });
29
26
  var tablePaddingHorizontal = mathWithUnits(fontSize, function (x) {
30
27
  return x / 2;
31
28
  });
32
- return "\n .euiMarkdownFormat__blockquote {\n ".concat(logicalShorthandCSS('padding', "0 ".concat(fontSize)), "\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiCheckbox .euiCheckbox__input ~ .euiCheckbox__label { // Extra specificity necessary to override default checkbox CSS\n font-size: ").concat(fontSize, ";\n ").concat(logicalCSS('padding-left', lineHeightSize), "\n line-height: ").concat(lineHeight, ";\n }\n\n .euiCheckbox + *:not(.euiCheckbox) {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n .euiMarkdownFormat__codeblockWrapper {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', tablePaddingVertical), "\n ").concat(logicalCSS('padding-horizontal', tablePaddingHorizontal), "\n }\n ");
29
+ return "\n .euiCheckbox .euiCheckbox__input ~ .euiCheckbox__label { // Extra specificity necessary to override default checkbox CSS\n font-size: ".concat(fontSize, ";\n ").concat(logicalCSS('padding-left', lineHeightSize), "\n line-height: ").concat(lineHeight, ";\n }\n\n .euiCheckbox + *:not(.euiCheckbox) {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n .euiMarkdownFormat__codeblockWrapper {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', tablePaddingVertical), "\n ").concat(logicalCSS('padding-horizontal', tablePaddingHorizontal), "\n }\n ");
33
30
  };
34
31
  /**
35
32
  * Styles
@@ -0,0 +1,103 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ /// <reference types="../../../cypress/support"/>
11
+ import React, { useState } from 'react';
12
+ import { EuiContextMenuItem } from '../context_menu';
13
+ import { EuiNotificationEvent } from './notification_event';
14
+ import { EuiPanel } from '../panel';
15
+ import { jsx as ___EmotionJSX } from "@emotion/react";
16
+
17
+ var NotificationEvent = function NotificationEvent() {
18
+ var _useState = useState(false),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ isRead = _useState2[0],
21
+ setIsRead = _useState2[1];
22
+
23
+ var onRead = function onRead(id, isRead) {
24
+ setIsRead(!isRead);
25
+ };
26
+
27
+ var onOpenContextMenu = function onOpenContextMenu(id) {
28
+ return [___EmotionJSX(EuiContextMenuItem, {
29
+ key: "contextMenuItemA",
30
+ onClick: function onClick() {
31
+ return onRead(id, isRead);
32
+ }
33
+ }, isRead ? 'Mark as unread' : 'Mark as read'), ___EmotionJSX(EuiContextMenuItem, {
34
+ key: "contextMenuItemB",
35
+ onClick: function onClick() {}
36
+ }, "View messages like this"), ___EmotionJSX(EuiContextMenuItem, {
37
+ key: "contextMenuItemC",
38
+ onClick: function onClick() {}
39
+ }, "Don\u2019t notify me about this")];
40
+ };
41
+
42
+ return ___EmotionJSX(EuiPanel, {
43
+ paddingSize: "none",
44
+ hasShadow: true,
45
+ style: {
46
+ maxWidth: '540px'
47
+ }
48
+ }, ___EmotionJSX(EuiNotificationEvent, {
49
+ id: "cy-eui-notification-1",
50
+ type: "Report",
51
+ iconType: "logoKibana",
52
+ iconAriaLabel: "Kibana",
53
+ time: "1 min ago",
54
+ title: "[Error Monitoring Report] is generated",
55
+ primaryAction: "Download",
56
+ primaryActionProps: {
57
+ iconType: 'download'
58
+ },
59
+ messages: ['The reported was generated at 17:12:16 GMT+4'],
60
+ isRead: isRead,
61
+ onRead: onRead,
62
+ onOpenContextMenu: onOpenContextMenu,
63
+ onClickPrimaryAction: function onClickPrimaryAction() {},
64
+ onClickTitle: function onClickTitle() {}
65
+ }));
66
+ };
67
+
68
+ describe('EuiNotificationEvent', function () {
69
+ beforeEach(function () {
70
+ cy.viewport(1024, 768); // medium breakpoint
71
+
72
+ cy.realMount(___EmotionJSX(NotificationEvent, null));
73
+ cy.get('article.euiNotificationEvent').should('exist');
74
+ });
75
+ describe('Automated accessibility check', function () {
76
+ it('has zero violations on first render', function () {
77
+ cy.checkAxe();
78
+ });
79
+ it('has zero violations when popover is open', function () {
80
+ cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').realClick();
81
+ cy.get('div.euiPopover__panel').should('exist');
82
+ cy.checkAxe();
83
+ });
84
+ it('has zero violations after the Mark as read button is clicked', function () {
85
+ cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').realClick();
86
+ cy.get('div.euiPopover__panel').should('exist');
87
+ cy.get('div.euiPopover__panel button').first().realClick();
88
+ cy.checkAxe();
89
+ });
90
+ });
91
+ describe('Keyboard accessibility', function () {
92
+ it('has zero violations when the popover is opened by keyboard', function () {
93
+ cy.repeatRealPress('Tab');
94
+ cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').should('have.focus');
95
+ cy.realPress('Enter');
96
+ cy.get('div.euiPopover__panel').should('exist');
97
+ cy.checkAxe();
98
+ cy.realPress('Escape');
99
+ cy.get('div.euiPopover__panel').should('not.exist');
100
+ cy.checkAxe();
101
+ });
102
+ });
103
+ });
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ /// <reference types="../../../../cypress/support"/>
9
+ import React from 'react';
10
+ import { EuiButton } from '../../button';
11
+ import { EuiPageHeader } from './page_header';
12
+ import { jsx as ___EmotionJSX } from "@emotion/react";
13
+ describe('EuiPageHeader', function () {
14
+ beforeEach(function () {
15
+ cy.viewport(1024, 768); // medium breakpoint
16
+
17
+ cy.realMount(___EmotionJSX(EuiPageHeader, {
18
+ pageTitle: "Page title",
19
+ iconType: "logoKibana",
20
+ description: "This description should be describing the current page as depicted by the page title. It will never extend beneath the right side content.",
21
+ rightSideItems: [___EmotionJSX(EuiButton, {
22
+ fill: true
23
+ }, "Add something"), ___EmotionJSX(EuiButton, null, "Do something")]
24
+ }));
25
+ cy.get('h1.euiTitle').should('exist');
26
+ });
27
+ describe('Automated accessibility check', function () {
28
+ it('has zero violations on first render', function () {
29
+ cy.checkAxe();
30
+ });
31
+ });
32
+ });
@@ -0,0 +1,60 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ /// <reference types="../../../cypress/support"/>
11
+ import React, { useState } from 'react';
12
+ import { EuiButton } from '../button';
13
+ import { EuiPortal } from './portal';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+
16
+ var Portal = function Portal() {
17
+ var _useState = useState(false),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ isPortalVisible = _useState2[0],
20
+ setIsPortalVisible = _useState2[1];
21
+
22
+ var togglePortal = function togglePortal() {
23
+ setIsPortalVisible(!isPortalVisible);
24
+ };
25
+
26
+ var closePortal = function closePortal() {
27
+ setIsPortalVisible(false);
28
+ };
29
+
30
+ var customPortal;
31
+
32
+ if (isPortalVisible) {
33
+ customPortal = ___EmotionJSX(EuiPortal, null, ___EmotionJSX("div", null, "This is the portal. Click anywhere to close."), ___EmotionJSX(EuiButton, {
34
+ onClick: closePortal
35
+ }, "Close portal"));
36
+ }
37
+
38
+ return ___EmotionJSX("div", null, ___EmotionJSX(EuiButton, {
39
+ onClick: togglePortal
40
+ }, "View guide"), customPortal);
41
+ };
42
+
43
+ describe('EuiPortal', function () {
44
+ beforeEach(function () {
45
+ cy.viewport(1024, 768); // medium breakpoint
46
+
47
+ cy.realMount(___EmotionJSX(Portal, null));
48
+ cy.get('div[data-relative-to-header="above"]').should('not.exist');
49
+ });
50
+ describe('Automated accessibility check', function () {
51
+ it('has zero violations on first render', function () {
52
+ cy.checkAxe();
53
+ });
54
+ it('has zero violations after the portal is activated', function () {
55
+ cy.get('button[type="button"]').contains('View guide').realClick();
56
+ cy.get('div[data-euiportal="true"]').should('exist');
57
+ cy.checkAxe();
58
+ });
59
+ });
60
+ });
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, logicalTextAlignCSS, euiFontSize, euiBackgroundColor, mathWithUnits } from '../../global_styling';
9
+ import { logicalCSS, logicalShorthandCSS, logicalTextAlignCSS, euiFontSize, euiBackgroundColor, mathWithUnits } from '../../global_styling';
10
10
  import { euiLinkCSS } from '../link/link.styles';
11
11
  import { euiTitle } from '../title/title.styles';
12
12
  /**
@@ -50,7 +50,10 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
50
50
  return x * 2;
51
51
  });
52
52
  var headingMarginBottom = marginSize;
53
- return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n ul,\n ol,\n dl,\n blockquote,\n img,\n pre {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n padding: ").concat(lineHeightSize, ";\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; // 90% of parent font size\n }\n ").concat( // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
53
+ var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
54
+ return x / 4;
55
+ });
56
+ return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n ul,\n ol,\n dl,\n blockquote,\n img,\n pre {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n ").concat(logicalShorthandCSS('padding', "0 ".concat(fontSize)), "\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; // 90% of parent font size\n }\n ").concat( // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
54
57
  _customScale === 'm' ? "\n kbd {\n ".concat(logicalCSS('padding-bottom', euiTheme.size.xs), "\n // ensures when only one character the shape looks like a square\n ").concat(logicalCSS('min-width', euiTheme.size.l), "\n ").concat(logicalTextAlignCSS('center'), "\n }\n \n kbd::after {\n content: '';\n ").concat(logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.text)), "\n position: absolute;\n ").concat(logicalCSS('bottom', euiTheme.size.xxs), "\n ").concat(logicalCSS('left', 0), "\n ").concat(logicalCSS('width', '100%'), "\n }") : '', "\n ");
55
58
  };
56
59
  /**
@@ -61,7 +64,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
61
64
  export var euiTextStyles = function euiTextStyles(euiThemeContext) {
62
65
  var euiTheme = euiThemeContext.euiTheme;
63
66
  return {
64
- euiText: /*#__PURE__*/css(euiText(euiTheme, true), ";clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}img{display:block;", logicalCSS('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote:not(.euiMarkdownFormat__blockquote){position:relative;", logicalTextAlignCSS('center'), " ", logicalCSS('margin-horizontal', 'auto'), " font-family:", euiTheme.font.familySerif, ";font-style:italic;letter-spacing:normal;p:last-child{", logicalCSS('margin-bottom', '0'), ";}&:before,&:after{position:absolute;content:'';", logicalCSS('height', euiTheme.border.width.thick), " ", logicalCSS('width', '50%'), " ", logicalCSS('left', '25%'), " ", logicalCSS('right', '25%'), " background:", euiTheme.colors.darkShade, ";}&:before{", logicalCSS('top', '0'), ";}&:after{", logicalCSS('bottom', '0'), ";}}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
67
+ euiText: /*#__PURE__*/css(euiText(euiTheme, true), ";clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}img{display:block;", logicalCSS('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote{border-inline-start-color:", euiTheme.border.color, ";border-inline-start-style:solid;}blockquote:not(.euiMarkdownFormat__blockquote){color:", euiTheme.colors.subduedText, ";}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
65
68
  return x / 2;
66
69
  }), ";};label:euiText;"),
67
70
  constrainedWidth: /*#__PURE__*/css(logicalCSS('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
@@ -7,7 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
- var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display"];
10
+ var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display", "repositionOnScroll"];
11
11
 
12
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
13
 
@@ -23,13 +23,14 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
23
23
  import React, { Component } from 'react';
24
24
  import classNames from 'classnames';
25
25
  import { keysOf } from '../common';
26
+ import { findPopoverPosition, htmlIdGenerator } from '../../services';
27
+ import { enqueueStateChange } from '../../services/react';
28
+ import { EuiResizeObserver } from '../observer/resize_observer';
26
29
  import { EuiPortal } from '../portal';
30
+ import { EuiToolTipPopover } from './tool_tip_popover';
27
31
  import { EuiToolTipAnchor } from './tool_tip_anchor';
28
32
  import { EuiToolTipArrow } from './tool_tip_arrow';
29
- import { EuiToolTipPopover } from './tool_tip_popover';
30
- import { enqueueStateChange } from '../../services/react';
31
- import { findPopoverPosition, htmlIdGenerator } from '../../services';
32
- import { EuiResizeObserver } from '../observer/resize_observer';
33
+ import { toolTipManager } from './tool_tip_manager';
33
34
  import { jsx as ___EmotionJSX } from "@emotion/react";
34
35
  var positionsToClassNameMap = {
35
36
  top: 'euiToolTip--top',
@@ -124,9 +125,11 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
124
125
  if (!_this.timeoutId) {
125
126
  _this.timeoutId = setTimeout(function () {
126
127
  enqueueStateChange(function () {
127
- return _this.setState({
128
+ _this.setState({
128
129
  visible: true
129
130
  });
131
+
132
+ toolTipManager.registerTooltip(_this.hideToolTip);
130
133
  });
131
134
  }, delayToMsMap[_this.props.delay]);
132
135
  }
@@ -187,6 +190,8 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
187
190
  toolTipStyles: DEFAULT_TOOLTIP_STYLES,
188
191
  arrowStyles: undefined
189
192
  });
193
+
194
+ toolTipManager.deregisterToolTip(_this.hideToolTip);
190
195
  }
191
196
  });
192
197
  });
@@ -228,18 +233,32 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
228
233
  key: "componentDidMount",
229
234
  value: function componentDidMount() {
230
235
  this._isMounted = true;
236
+
237
+ if (this.props.repositionOnScroll) {
238
+ window.addEventListener('scroll', this.positionToolTip, true);
239
+ }
231
240
  }
232
241
  }, {
233
242
  key: "componentWillUnmount",
234
243
  value: function componentWillUnmount() {
235
244
  this.clearAnimationTimeout();
236
245
  this._isMounted = false;
246
+ window.removeEventListener('scroll', this.positionToolTip, true);
237
247
  }
238
248
  }, {
239
249
  key: "componentDidUpdate",
240
250
  value: function componentDidUpdate(prevProps, prevState) {
241
251
  if (prevState.visible === false && this.state.visible === true) {
242
252
  requestAnimationFrame(this.testAnchor);
253
+ } // update scroll listener
254
+
255
+
256
+ if (prevProps.repositionOnScroll !== this.props.repositionOnScroll) {
257
+ if (this.props.repositionOnScroll) {
258
+ window.addEventListener('scroll', this.positionToolTip, true);
259
+ } else {
260
+ window.removeEventListener('scroll', this.positionToolTip, true);
261
+ }
243
262
  }
244
263
  }
245
264
  }, {
@@ -254,6 +273,7 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
254
273
  title = _this$props.title,
255
274
  delay = _this$props.delay,
256
275
  display = _this$props.display,
276
+ repositionOnScroll = _this$props.repositionOnScroll,
257
277
  rest = _objectWithoutProperties(_this$props, _excluded);
258
278
 
259
279
  var _this$state = this.state,
@@ -0,0 +1,41 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+
4
+ /*
5
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
6
+ * or more contributor license agreements. Licensed under the Elastic License
7
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
8
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
9
+ * Side Public License, v 1.
10
+ */
11
+
12
+ /**
13
+ * Manager utility that ensures only one tooltip is visible at a time
14
+ *
15
+ * UX rationale (primarily for mouse-only users):
16
+ * @see https://github.com/elastic/kibana/issues/144482
17
+ * @see https://github.com/elastic/eui/issues/5883
18
+ */
19
+ var ToolTipManager = function ToolTipManager() {
20
+ var _this = this;
21
+
22
+ _classCallCheck(this, ToolTipManager);
23
+
24
+ _defineProperty(this, "toolTipsToHide", new Set());
25
+
26
+ _defineProperty(this, "registerTooltip", function (hideCallback) {
27
+ _this.toolTipsToHide.forEach(function (hide) {
28
+ return hide();
29
+ });
30
+
31
+ _this.toolTipsToHide.clear();
32
+
33
+ _this.toolTipsToHide.add(hideCallback);
34
+ });
35
+
36
+ _defineProperty(this, "deregisterToolTip", function (hideCallback) {
37
+ _this.toolTipsToHide.delete(hideCallback);
38
+ });
39
+ };
40
+
41
+ export var toolTipManager = new ToolTipManager();
@@ -50,7 +50,7 @@ export var euiTourHeaderStyles = function euiTourHeaderStyles(_ref3) {
50
50
  euiTourHeader: /*#__PURE__*/css(logicalCSS('border-bottom', 'none'), ";", logicalCSS('margin-bottom', euiTheme.size.s), ";;label:euiTourHeader;"),
51
51
  // Elements
52
52
  euiTourHeader__title: /*#__PURE__*/css(logicalCSS('margin-top', 0), ";;label:euiTourHeader__title;"),
53
- euiTourHeader__subtitle: /*#__PURE__*/css("color:", euiTheme.colors.subduedText, ";;label:euiTourHeader__subtitle;")
53
+ euiTourHeader__subtitle: /*#__PURE__*/css("color:", euiTheme.colors.subduedText, ";padding-block-end:", euiTheme.size.xs, ";;label:euiTourHeader__subtitle;")
54
54
  };
55
55
  };
56
56
  export var euiTourFooterStyles = function euiTourFooterStyles(_ref4) {
@@ -242,7 +242,7 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
242
242
  css: cssSpinnerStyles
243
243
  }), (0, _react2.jsx)(_text.EuiText, {
244
244
  size: "s"
245
- }, (0, _react2.jsx)("p", null, isLoadingMessage && isLoadingMessage !== true ? isLoadingMessage : (0, _react2.jsx)(_i18n.EuiI18n, {
245
+ }, (0, _react2.jsx)("p", null, isLoadingMessage !== true ? isLoadingMessage : (0, _react2.jsx)(_i18n.EuiI18n, {
246
246
  token: "euiAccordion.isLoading",
247
247
  default: "Loading"
248
248
  }))));
@@ -11,6 +11,8 @@ exports.useDataGridColumnSelector = void 0;
11
11
 
12
12
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
13
13
 
14
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
+
14
16
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
17
 
16
18
  var _react = _interopRequireWildcard(require("react"));
@@ -107,6 +109,7 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
107
109
  }, [sortedColumns, columnSearchText, displayValues]);
108
110
  var isDragEnabled = allowColumnReorder && columnSearchText.length === 0; // only allow drag-and-drop when not filtering columns
109
111
 
112
+ var dragHandleAriaLabel = (0, _i18n.useEuiI18n)('euiColumnSelector.dragHandleAriaLabel', 'Drag handle');
110
113
  var buttonText = (0, _react2.jsx)(_i18n.EuiI18n, {
111
114
  token: "euiColumnSelector.button",
112
115
  default: "Columns"
@@ -179,18 +182,23 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
179
182
  key: id,
180
183
  draggableId: id,
181
184
  index: index,
182
- isDragDisabled: !isDragEnabled
185
+ isDragDisabled: !isDragEnabled,
186
+ hasInteractiveChildren: true,
187
+ customDragHandle: true
183
188
  }, function (provided, state) {
184
189
  return (0, _react2.jsx)("div", {
185
190
  className: "euiDataGridColumnSelector__item ".concat(state.isDragging && 'euiDataGridColumnSelector__item-isDragging'),
186
191
  "data-test-subj": "dataGridColumnSelectorColumnItem-".concat(id)
187
192
  }, (0, _react2.jsx)(_flex.EuiFlexGroup, {
188
193
  responsive: false,
189
- gutterSize: "m",
194
+ gutterSize: "s",
190
195
  alignItems: "center"
191
- }, (0, _react2.jsx)(_flex.EuiFlexItem, null, allowColumnHiding ? (0, _react2.jsx)(_form.EuiSwitch, {
196
+ }, allowColumnHiding && (0, _react2.jsx)(_flex.EuiFlexItem, {
197
+ grow: false
198
+ }, (0, _react2.jsx)(_form.EuiSwitch, {
192
199
  name: id,
193
200
  label: displayValues[id] || id,
201
+ showLabel: false,
194
202
  checked: visibleColumnIds.has(id),
195
203
  compressed: true,
196
204
  className: "euiSwitch--mini",
@@ -202,11 +210,18 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
202
210
  setVisibleColumns(nextVisibleColumns);
203
211
  },
204
212
  "data-test-subj": "dataGridColumnSelectorToggleColumnVisibility-".concat(id)
205
- }) : (0, _react2.jsx)("span", {
213
+ })), (0, _react2.jsx)(_flex.EuiFlexItem // This extra column name flex item affords the column more grabbable real estate
214
+ // for mouse users, while hiding repetition for keyboard/screen reader users
215
+ , (0, _extends2.default)({}, provided.dragHandleProps, {
216
+ "aria-hidden": true,
217
+ tabIndex: -1
218
+ }), (0, _react2.jsx)("span", {
206
219
  className: "euiDataGridColumnSelector__itemLabel"
207
- }, id)), isDragEnabled && (0, _react2.jsx)(_flex.EuiFlexItem, {
220
+ }, displayValues[id] || id)), isDragEnabled && (0, _react2.jsx)(_flex.EuiFlexItem, (0, _extends2.default)({
208
221
  grow: false
209
- }, (0, _react2.jsx)(_icon.EuiIcon, {
222
+ }, provided.dragHandleProps, {
223
+ "aria-label": dragHandleAriaLabel
224
+ }), (0, _react2.jsx)(_icon.EuiIcon, {
210
225
  type: "grab",
211
226
  color: "subdued"
212
227
  }))));
@@ -73,7 +73,9 @@ var EuiDataGridColumnSortingDraggable = function EuiDataGridColumnSortingDraggab
73
73
  var dragHandleAriaLabel = (0, _i18n.useEuiI18n)('euiColumnSortingDraggable.dragHandleAriaLabel', 'Drag handle');
74
74
  return (0, _react2.jsx)(_drag_and_drop.EuiDraggable, (0, _extends2.default)({
75
75
  draggableId: id,
76
- index: index
76
+ index: index,
77
+ hasInteractiveChildren: true,
78
+ customDragHandle: true
77
79
  }, rest), function (provided, state) {
78
80
  return (0, _react2.jsx)("div", {
79
81
  className: "euiDataGridColumnSorting__item ".concat(state.isDragging && 'euiDataGridColumnSorting__item-isDragging')
@@ -114,18 +116,25 @@ var EuiDataGridColumnSortingDraggable = function EuiDataGridColumnSortingDraggab
114
116
  sorting.onSort(nextColumns);
115
117
  }
116
118
  });
117
- })), (0, _react2.jsx)(_flex.EuiFlexItem, {
119
+ })), (0, _react2.jsx)(_flex.EuiFlexItem, (0, _extends2.default)({
120
+ className: "euiDataGridColumnSorting__name" // This extra column name flex item affords the column more grabbable real estate
121
+ // for mouse users, while hiding repetition for keyboard/screen reader users
122
+
123
+ }, provided.dragHandleProps, {
124
+ tabIndex: -1,
125
+ "aria-hidden": true
126
+ }), (0, _react2.jsx)(_flex.EuiFlexGroup, {
127
+ gutterSize: "xs",
128
+ alignItems: "center",
129
+ responsive: false
130
+ }, (0, _react2.jsx)(_flex.EuiFlexItem, {
118
131
  grow: false
119
132
  }, (0, _react2.jsx)(_token.EuiToken, {
120
133
  color: schemaDetails != null ? schemaDetails.color : undefined,
121
134
  iconType: schemaDetails != null ? schemaDetails.icon : 'tokenString'
122
- })), (0, _react2.jsx)(_flex.EuiFlexItem, {
123
- "aria-hidden": true
124
- }, (0, _react2.jsx)(_text.EuiText, {
135
+ })), (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_text.EuiText, {
125
136
  size: "xs"
126
- }, (0, _react2.jsx)("p", null, display))), (0, _react2.jsx)(_flex.EuiFlexItem, {
127
- className: "euiDataGridColumnSorting__orderButtons"
128
- }, (0, _react2.jsx)(_i18n.EuiI18n, {
137
+ }, (0, _react2.jsx)("p", null, display))))), (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_i18n.EuiI18n, {
129
138
  token: "euiColumnSortingDraggable.toggleLegend",
130
139
  default: "Select sorting method for {display}",
131
140
  values: {
@@ -181,7 +181,7 @@ describe('EuiDataGrid', function () {
181
181
  it('has zero violations on first render', function () {
182
182
  cy.checkAxe();
183
183
  });
184
- it('has zero violations when the columns reorder menu is open', function () {
184
+ it('has zero violations when the columns visibility menu is open', function () {
185
185
  cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
186
186
  cy.checkAxe();
187
187
  });
@@ -234,9 +234,10 @@ describe('EuiDataGrid', function () {
234
234
  cy.get('div[data-gridcell-visible-row-index="0"][data-gridcell-column-index="1"]').find('button.euiButtonIcon').last().realClick();
235
235
  cy.checkAxe();
236
236
  });
237
- it('has zero violations when the Favorite Distro column has been sorted', function () {
237
+ it('has zero violations on sort and when the columns sorting menu is open', function () {
238
238
  cy.get('button.euiDataGridHeaderCell__button').last().realClick();
239
239
  cy.get('button.euiListGroupItem__button').contains('Sort Alma to Debian').should('exist').realClick();
240
+ cy.get('button[data-test-subj="dataGridColumnSortingPopover"]').realClick();
240
241
  cy.checkAxe();
241
242
  });
242
243
  it('has zero violations when fullscreen is open', function () {
@@ -33,7 +33,7 @@ var _image_types = require("./image_types");
33
33
 
34
34
  var _react2 = require("@emotion/react");
35
35
 
36
- var _excluded = ["className", "alt", "url", "src", "size", "hasShadow", "style", "wrapperProps", "fullScreenIconColor", "allowFullScreen", "caption", "float", "margin"];
36
+ var _excluded = ["className", "alt", "url", "src", "size", "hasShadow", "style", "wrapperProps", "fullScreenIconColor", "allowFullScreen", "caption", "float", "margin", "onFullScreen"];
37
37
 
38
38
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
39
39
 
@@ -58,6 +58,7 @@ var EuiImage = function EuiImage(_ref) {
58
58
  caption = _ref.caption,
59
59
  float = _ref.float,
60
60
  margin = _ref.margin,
61
+ onFullScreen = _ref.onFullScreen,
61
62
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
62
63
 
63
64
  var _useState = (0, _react.useState)(false),
@@ -89,7 +90,8 @@ var EuiImage = function EuiImage(_ref) {
89
90
  alt: alt,
90
91
  caption: caption,
91
92
  float: float,
92
- margin: margin
93
+ margin: margin,
94
+ onFullScreen: onFullScreen
93
95
  };
94
96
 
95
97
  var commonImgProps = _objectSpread({
@@ -50,7 +50,8 @@ var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref) {
50
50
  setIsFullScreen = _ref.setIsFullScreen,
51
51
  wrapperProps = _ref.wrapperProps,
52
52
  isFullWidth = _ref.isFullWidth,
53
- fullScreenIconColor = _ref.fullScreenIconColor;
53
+ fullScreenIconColor = _ref.fullScreenIconColor,
54
+ onFullScreen = _ref.onFullScreen;
54
55
  var euiTheme = (0, _services.useEuiTheme)();
55
56
  var styles = (0, _image_fullscreen_wrapper.euiImageFullscreenWrapperStyles)(euiTheme);
56
57
  var cssStyles = [styles.euiImageFullscreenWrapper];
@@ -66,6 +67,7 @@ var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref) {
66
67
 
67
68
  var closeFullScreen = function closeFullScreen() {
68
69
  setIsFullScreen(false);
70
+ onFullScreen === null || onFullScreen === void 0 ? void 0 : onFullScreen(false);
69
71
  };
70
72
 
71
73
  var _useInnerText = (0, _inner_text.useInnerText)(),