@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
@@ -239,7 +239,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
239
239
  css: cssSpinnerStyles
240
240
  }), ___EmotionJSX(EuiText, {
241
241
  size: "s"
242
- }, ___EmotionJSX("p", null, isLoadingMessage && isLoadingMessage !== true ? isLoadingMessage : ___EmotionJSX(EuiI18n, {
242
+ }, ___EmotionJSX("p", null, isLoadingMessage !== true ? isLoadingMessage : ___EmotionJSX(EuiI18n, {
243
243
  token: "euiAccordion.isLoading",
244
244
  default: "Loading"
245
245
  }))));
@@ -6,6 +6,8 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
6
6
 
7
7
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
8
 
9
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
10
+
9
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
12
 
11
13
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -28,7 +30,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
30
  import React, { Fragment, useState, useMemo, useCallback } from 'react';
29
31
  import classNames from 'classnames';
30
32
  import { EuiPopover, EuiPopoverFooter, EuiPopoverTitle } from '../../popover';
31
- import { EuiI18n } from '../../i18n';
33
+ import { EuiI18n, useEuiI18n } from '../../i18n';
32
34
  import { EuiButtonEmpty } from '../../button';
33
35
  import { EuiFlexGroup, EuiFlexItem } from '../../flex';
34
36
  import { EuiSwitch, EuiFieldText } from '../../form';
@@ -96,6 +98,8 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
96
98
  }, [sortedColumns, columnSearchText, displayValues]);
97
99
  var isDragEnabled = allowColumnReorder && columnSearchText.length === 0; // only allow drag-and-drop when not filtering columns
98
100
 
101
+ var dragHandleAriaLabel = useEuiI18n('euiColumnSelector.dragHandleAriaLabel', 'Drag handle');
102
+
99
103
  var buttonText = ___EmotionJSX(EuiI18n, {
100
104
  token: "euiColumnSelector.button",
101
105
  default: "Columns"
@@ -168,18 +172,23 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
168
172
  key: id,
169
173
  draggableId: id,
170
174
  index: index,
171
- isDragDisabled: !isDragEnabled
175
+ isDragDisabled: !isDragEnabled,
176
+ hasInteractiveChildren: true,
177
+ customDragHandle: true
172
178
  }, function (provided, state) {
173
179
  return ___EmotionJSX("div", {
174
180
  className: "euiDataGridColumnSelector__item ".concat(state.isDragging && 'euiDataGridColumnSelector__item-isDragging'),
175
181
  "data-test-subj": "dataGridColumnSelectorColumnItem-".concat(id)
176
182
  }, ___EmotionJSX(EuiFlexGroup, {
177
183
  responsive: false,
178
- gutterSize: "m",
184
+ gutterSize: "s",
179
185
  alignItems: "center"
180
- }, ___EmotionJSX(EuiFlexItem, null, allowColumnHiding ? ___EmotionJSX(EuiSwitch, {
186
+ }, allowColumnHiding && ___EmotionJSX(EuiFlexItem, {
187
+ grow: false
188
+ }, ___EmotionJSX(EuiSwitch, {
181
189
  name: id,
182
190
  label: displayValues[id] || id,
191
+ showLabel: false,
183
192
  checked: visibleColumnIds.has(id),
184
193
  compressed: true,
185
194
  className: "euiSwitch--mini",
@@ -191,11 +200,18 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
191
200
  setVisibleColumns(nextVisibleColumns);
192
201
  },
193
202
  "data-test-subj": "dataGridColumnSelectorToggleColumnVisibility-".concat(id)
194
- }) : ___EmotionJSX("span", {
203
+ })), ___EmotionJSX(EuiFlexItem // This extra column name flex item affords the column more grabbable real estate
204
+ // for mouse users, while hiding repetition for keyboard/screen reader users
205
+ , _extends({}, provided.dragHandleProps, {
206
+ "aria-hidden": true,
207
+ tabIndex: -1
208
+ }), ___EmotionJSX("span", {
195
209
  className: "euiDataGridColumnSelector__itemLabel"
196
- }, id)), isDragEnabled && ___EmotionJSX(EuiFlexItem, {
210
+ }, displayValues[id] || id)), isDragEnabled && ___EmotionJSX(EuiFlexItem, _extends({
197
211
  grow: false
198
- }, ___EmotionJSX(EuiIcon, {
212
+ }, provided.dragHandleProps, {
213
+ "aria-label": dragHandleAriaLabel
214
+ }), ___EmotionJSX(EuiIcon, {
199
215
  type: "grab",
200
216
  color: "subdued"
201
217
  }))));
@@ -72,7 +72,9 @@ export var EuiDataGridColumnSortingDraggable = function EuiDataGridColumnSorting
72
72
  var dragHandleAriaLabel = useEuiI18n('euiColumnSortingDraggable.dragHandleAriaLabel', 'Drag handle');
73
73
  return ___EmotionJSX(EuiDraggable, _extends({
74
74
  draggableId: id,
75
- index: index
75
+ index: index,
76
+ hasInteractiveChildren: true,
77
+ customDragHandle: true
76
78
  }, rest), function (provided, state) {
77
79
  return ___EmotionJSX("div", {
78
80
  className: "euiDataGridColumnSorting__item ".concat(state.isDragging && 'euiDataGridColumnSorting__item-isDragging')
@@ -114,18 +116,25 @@ export var EuiDataGridColumnSortingDraggable = function EuiDataGridColumnSorting
114
116
  sorting.onSort(nextColumns);
115
117
  }
116
118
  });
117
- })), ___EmotionJSX(EuiFlexItem, {
119
+ })), ___EmotionJSX(EuiFlexItem, _extends({
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
+ }), ___EmotionJSX(EuiFlexGroup, {
127
+ gutterSize: "xs",
128
+ alignItems: "center",
129
+ responsive: false
130
+ }, ___EmotionJSX(EuiFlexItem, {
118
131
  grow: false
119
132
  }, ___EmotionJSX(EuiToken, {
120
133
  color: schemaDetails != null ? schemaDetails.color : undefined,
121
134
  iconType: schemaDetails != null ? schemaDetails.icon : 'tokenString'
122
- })), ___EmotionJSX(EuiFlexItem, {
123
- "aria-hidden": true
124
- }, ___EmotionJSX(EuiText, {
135
+ })), ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiText, {
125
136
  size: "xs"
126
- }, ___EmotionJSX("p", null, display))), ___EmotionJSX(EuiFlexItem, {
127
- className: "euiDataGridColumnSorting__orderButtons"
128
- }, ___EmotionJSX(EuiI18n, {
137
+ }, ___EmotionJSX("p", null, display))))), ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiI18n, {
129
138
  token: "euiColumnSortingDraggable.toggleLegend",
130
139
  default: "Select sorting method for {display}",
131
140
  values: {
@@ -184,7 +184,7 @@ describe('EuiDataGrid', function () {
184
184
  it('has zero violations on first render', function () {
185
185
  cy.checkAxe();
186
186
  });
187
- it('has zero violations when the columns reorder menu is open', function () {
187
+ it('has zero violations when the columns visibility menu is open', function () {
188
188
  cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
189
189
  cy.checkAxe();
190
190
  });
@@ -237,9 +237,10 @@ describe('EuiDataGrid', function () {
237
237
  cy.get('div[data-gridcell-visible-row-index="0"][data-gridcell-column-index="1"]').find('button.euiButtonIcon').last().realClick();
238
238
  cy.checkAxe();
239
239
  });
240
- it('has zero violations when the Favorite Distro column has been sorted', function () {
240
+ it('has zero violations on sort and when the columns sorting menu is open', function () {
241
241
  cy.get('button.euiDataGridHeaderCell__button').last().realClick();
242
242
  cy.get('button.euiListGroupItem__button').contains('Sort Alma to Debian').should('exist').realClick();
243
+ cy.get('button[data-test-subj="dataGridColumnSortingPopover"]').realClick();
243
244
  cy.checkAxe();
244
245
  });
245
246
  it('has zero violations when fullscreen is open', function () {
@@ -693,6 +693,14 @@ EuiSuperDatePickerInternal.propTypes = {
693
693
  */
694
694
  position: PropTypes.oneOf(["top", "right", "bottom", "left"]).isRequired,
695
695
 
696
+ /**
697
+ * When `true`, the tooltip's position is re-calculated when the user
698
+ * scrolls. This supports having fixed-position tooltip anchors.
699
+ *
700
+ * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
701
+ */
702
+ repositionOnScroll: PropTypes.bool,
703
+
696
704
  /**
697
705
  * If supplied, called when mouse movement causes the tool tip to be
698
706
  * hidden.
@@ -861,6 +869,7 @@ EuiSuperDatePicker.propTypes = {
861
869
  title: PropTypes.node,
862
870
  id: PropTypes.string,
863
871
  position: PropTypes.oneOf(["top", "right", "bottom", "left"]).isRequired,
872
+ repositionOnScroll: PropTypes.bool,
864
873
  onMouseOut: PropTypes.func
865
874
  }),
866
875
  iconOnly: PropTypes.bool,
@@ -281,6 +281,14 @@ EuiSuperUpdateButton.propTypes = {
281
281
  */
282
282
  position: PropTypes.oneOf(["top", "right", "bottom", "left"]).isRequired,
283
283
 
284
+ /**
285
+ * When `true`, the tooltip's position is re-calculated when the user
286
+ * scrolls. This supports having fixed-position tooltip anchors.
287
+ *
288
+ * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
289
+ */
290
+ repositionOnScroll: PropTypes.bool,
291
+
284
292
  /**
285
293
  * If supplied, called when mouse movement causes the tool tip to be
286
294
  * hidden.
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "alt", "url", "src", "size", "hasShadow", "style", "wrapperProps", "fullScreenIconColor", "allowFullScreen", "caption", "float", "margin"];
1
+ var _excluded = ["className", "alt", "url", "src", "size", "hasShadow", "style", "wrapperProps", "fullScreenIconColor", "allowFullScreen", "caption", "float", "margin", "onFullScreen"];
2
2
 
3
3
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -55,6 +55,7 @@ export var EuiImage = function EuiImage(_ref) {
55
55
  caption = _ref.caption,
56
56
  float = _ref.float,
57
57
  margin = _ref.margin,
58
+ onFullScreen = _ref.onFullScreen,
58
59
  rest = _objectWithoutProperties(_ref, _excluded);
59
60
 
60
61
  var _useState = useState(false),
@@ -85,7 +86,8 @@ export var EuiImage = function EuiImage(_ref) {
85
86
  alt: alt,
86
87
  caption: caption,
87
88
  float: float,
88
- margin: margin
89
+ margin: margin,
90
+ onFullScreen: onFullScreen
89
91
  };
90
92
 
91
93
  var commonImgProps = _objectSpread({
@@ -157,6 +159,11 @@ EuiImage.propTypes = {
157
159
  */
158
160
  allowFullScreen: PropTypes.bool,
159
161
 
162
+ /**
163
+ * Callback when the image is clicked and `allowFullScreen` is `true`
164
+ */
165
+ onFullScreen: PropTypes.func,
166
+
160
167
  /**
161
168
  * Changes the color of the icon that floats above the image when it can be clicked to fullscreen.
162
169
  * The default value of `light` is fine unless your image has a white background, in which case you should change it to `dark`.
@@ -40,7 +40,8 @@ export var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref)
40
40
  setIsFullScreen = _ref.setIsFullScreen,
41
41
  wrapperProps = _ref.wrapperProps,
42
42
  isFullWidth = _ref.isFullWidth,
43
- fullScreenIconColor = _ref.fullScreenIconColor;
43
+ fullScreenIconColor = _ref.fullScreenIconColor,
44
+ onFullScreen = _ref.onFullScreen;
44
45
  var euiTheme = useEuiTheme();
45
46
  var styles = euiImageFullscreenWrapperStyles(euiTheme);
46
47
  var cssStyles = [styles.euiImageFullscreenWrapper];
@@ -56,6 +57,7 @@ export var EuiImageFullScreenWrapper = function EuiImageFullScreenWrapper(_ref)
56
57
 
57
58
  var closeFullScreen = function closeFullScreen() {
58
59
  setIsFullScreen(false);
60
+ onFullScreen === null || onFullScreen === void 0 ? void 0 : onFullScreen(false);
59
61
  };
60
62
 
61
63
  var _useInnerText = useInnerText(),
@@ -39,10 +39,12 @@ export var EuiImageWrapper = function EuiImageWrapper(_ref) {
39
39
  setIsFullScreen = _ref.setIsFullScreen,
40
40
  wrapperProps = _ref.wrapperProps,
41
41
  fullScreenIconColor = _ref.fullScreenIconColor,
42
- isFullWidth = _ref.isFullWidth;
42
+ isFullWidth = _ref.isFullWidth,
43
+ onFullScreen = _ref.onFullScreen;
43
44
 
44
45
  var openFullScreen = function openFullScreen() {
45
46
  setIsFullScreen(true);
47
+ onFullScreen === null || onFullScreen === void 0 ? void 0 : onFullScreen(true);
46
48
  };
47
49
 
48
50
  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,113 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+
7
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
+
9
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
+
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
13
+ /*
14
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
15
+ * or more contributor license agreements. Licensed under the Elastic License
16
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
17
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
18
+ * Side Public License, v 1.
19
+ */
20
+ /// <reference types="../../../cypress/support"/>
21
+ import React, { useState } from 'react';
22
+ import { EuiContextMenuItem } from '../context_menu';
23
+ import { EuiNotificationEvent } from './notification_event';
24
+ import { EuiPanel } from '../panel';
25
+ import { jsx as ___EmotionJSX } from "@emotion/react";
26
+
27
+ var NotificationEvent = function NotificationEvent() {
28
+ var _useState = useState(false),
29
+ _useState2 = _slicedToArray(_useState, 2),
30
+ isRead = _useState2[0],
31
+ setIsRead = _useState2[1];
32
+
33
+ var onRead = function onRead(id, isRead) {
34
+ setIsRead(!isRead);
35
+ };
36
+
37
+ var onOpenContextMenu = function onOpenContextMenu(id) {
38
+ return [___EmotionJSX(EuiContextMenuItem, {
39
+ key: "contextMenuItemA",
40
+ onClick: function onClick() {
41
+ return onRead(id, isRead);
42
+ }
43
+ }, isRead ? 'Mark as unread' : 'Mark as read'), ___EmotionJSX(EuiContextMenuItem, {
44
+ key: "contextMenuItemB",
45
+ onClick: function onClick() {}
46
+ }, "View messages like this"), ___EmotionJSX(EuiContextMenuItem, {
47
+ key: "contextMenuItemC",
48
+ onClick: function onClick() {}
49
+ }, "Don\u2019t notify me about this")];
50
+ };
51
+
52
+ return ___EmotionJSX(EuiPanel, {
53
+ paddingSize: "none",
54
+ hasShadow: true,
55
+ style: {
56
+ maxWidth: '540px'
57
+ }
58
+ }, ___EmotionJSX(EuiNotificationEvent, {
59
+ id: "cy-eui-notification-1",
60
+ type: "Report",
61
+ iconType: "logoKibana",
62
+ iconAriaLabel: "Kibana",
63
+ time: "1 min ago",
64
+ title: "[Error Monitoring Report] is generated",
65
+ primaryAction: "Download",
66
+ primaryActionProps: {
67
+ iconType: 'download'
68
+ },
69
+ messages: ['The reported was generated at 17:12:16 GMT+4'],
70
+ isRead: isRead,
71
+ onRead: onRead,
72
+ onOpenContextMenu: onOpenContextMenu,
73
+ onClickPrimaryAction: function onClickPrimaryAction() {},
74
+ onClickTitle: function onClickTitle() {}
75
+ }));
76
+ };
77
+
78
+ describe('EuiNotificationEvent', function () {
79
+ beforeEach(function () {
80
+ cy.viewport(1024, 768); // medium breakpoint
81
+
82
+ cy.realMount(___EmotionJSX(NotificationEvent, null));
83
+ cy.get('article.euiNotificationEvent').should('exist');
84
+ });
85
+ describe('Automated accessibility check', function () {
86
+ it('has zero violations on first render', function () {
87
+ cy.checkAxe();
88
+ });
89
+ it('has zero violations when popover is open', function () {
90
+ cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').realClick();
91
+ cy.get('div.euiPopover__panel').should('exist');
92
+ cy.checkAxe();
93
+ });
94
+ it('has zero violations after the Mark as read button is clicked', function () {
95
+ cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').realClick();
96
+ cy.get('div.euiPopover__panel').should('exist');
97
+ cy.get('div.euiPopover__panel button').first().realClick();
98
+ cy.checkAxe();
99
+ });
100
+ });
101
+ describe('Keyboard accessibility', function () {
102
+ it('has zero violations when the popover is opened by keyboard', function () {
103
+ cy.repeatRealPress('Tab');
104
+ cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').should('have.focus');
105
+ cy.realPress('Enter');
106
+ cy.get('div.euiPopover__panel').should('exist');
107
+ cy.checkAxe();
108
+ cy.realPress('Escape');
109
+ cy.get('div.euiPopover__panel').should('not.exist');
110
+ cy.checkAxe();
111
+ });
112
+ });
113
+ });
@@ -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,70 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+
7
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
+
9
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
+
11
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
13
+ /*
14
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
15
+ * or more contributor license agreements. Licensed under the Elastic License
16
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
17
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
18
+ * Side Public License, v 1.
19
+ */
20
+ /// <reference types="../../../cypress/support"/>
21
+ import React, { useState } from 'react';
22
+ import { EuiButton } from '../button';
23
+ import { EuiPortal } from './portal';
24
+ import { jsx as ___EmotionJSX } from "@emotion/react";
25
+
26
+ var Portal = function Portal() {
27
+ var _useState = useState(false),
28
+ _useState2 = _slicedToArray(_useState, 2),
29
+ isPortalVisible = _useState2[0],
30
+ setIsPortalVisible = _useState2[1];
31
+
32
+ var togglePortal = function togglePortal() {
33
+ setIsPortalVisible(!isPortalVisible);
34
+ };
35
+
36
+ var closePortal = function closePortal() {
37
+ setIsPortalVisible(false);
38
+ };
39
+
40
+ var customPortal;
41
+
42
+ if (isPortalVisible) {
43
+ customPortal = ___EmotionJSX(EuiPortal, null, ___EmotionJSX("div", null, "This is the portal. Click anywhere to close."), ___EmotionJSX(EuiButton, {
44
+ onClick: closePortal
45
+ }, "Close portal"));
46
+ }
47
+
48
+ return ___EmotionJSX("div", null, ___EmotionJSX(EuiButton, {
49
+ onClick: togglePortal
50
+ }, "View guide"), customPortal);
51
+ };
52
+
53
+ describe('EuiPortal', function () {
54
+ beforeEach(function () {
55
+ cy.viewport(1024, 768); // medium breakpoint
56
+
57
+ cy.realMount(___EmotionJSX(Portal, null));
58
+ cy.get('div[data-relative-to-header="above"]').should('not.exist');
59
+ });
60
+ describe('Automated accessibility check', function () {
61
+ it('has zero violations on first render', function () {
62
+ cy.checkAxe();
63
+ });
64
+ it('has zero violations after the portal is activated', function () {
65
+ cy.get('button[type="button"]').contains('View guide').realClick();
66
+ cy.get('div[data-euiportal="true"]').should('exist');
67
+ cy.checkAxe();
68
+ });
69
+ });
70
+ });
@@ -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;"),
@@ -84,6 +84,14 @@ EuiIconTip.propTypes = {
84
84
  */
85
85
  id: PropTypes.string,
86
86
 
87
+ /**
88
+ * When `true`, the tooltip's position is re-calculated when the user
89
+ * scrolls. This supports having fixed-position tooltip anchors.
90
+ *
91
+ * When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
92
+ */
93
+ repositionOnScroll: PropTypes.bool,
94
+
87
95
  /**
88
96
  * If supplied, called when mouse movement causes the tool tip to be
89
97
  * hidden.