@elastic/eui 60.1.1 → 60.3.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 (291) hide show
  1. package/dist/eui_theme_dark.css +0 -5
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -5
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/accessibility/skip_link/skip_link.js +1 -1
  6. package/es/components/accordion/accordion.js +10 -5
  7. package/es/components/avatar/avatar.js +1 -1
  8. package/es/components/badge/badge.js +1 -1
  9. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  10. package/es/components/basic_table/basic_table.js +1 -1
  11. package/es/components/basic_table/collapsed_item_actions.js +1 -1
  12. package/es/components/basic_table/in_memory_table.js +1 -1
  13. package/es/components/button/_button_content_deprecated.js +1 -1
  14. package/es/components/button/button.js +2 -2
  15. package/es/components/button/button_display/_button_display.js +1 -1
  16. package/es/components/button/button_display/_button_display_content.js +1 -1
  17. package/es/components/button/button_empty/button_empty.js +1 -1
  18. package/es/components/button/button_group/button_group.js +1 -1
  19. package/es/components/button/button_group/button_group_button.js +1 -1
  20. package/es/components/button/button_icon/button_icon.js +1 -1
  21. package/es/components/call_out/call_out.js +1 -1
  22. package/es/components/card/card.js +1 -1
  23. package/es/components/card/card_select.js +1 -1
  24. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  25. package/es/components/comment_list/comment.js +1 -1
  26. package/es/components/comment_list/comment_list.js +1 -1
  27. package/es/components/comment_list/comment_timeline.js +1 -1
  28. package/es/components/context_menu/context_menu.js +1 -1
  29. package/es/components/datagrid/body/data_grid_body.js +37 -28
  30. package/es/components/datagrid/body/data_grid_cell.js +130 -56
  31. package/es/components/datagrid/body/header/data_grid_header_cell.js +100 -31
  32. package/es/components/datagrid/body/header/data_grid_header_row.js +27 -24
  33. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  34. package/es/components/datagrid/data_grid.js +29 -24
  35. package/es/components/datagrid/utils/focus.js +19 -10
  36. package/es/components/datagrid/utils/in_memory.js +26 -23
  37. package/es/components/datagrid/utils/ref.js +24 -3
  38. package/es/components/date_picker/date_picker.js +2 -2
  39. package/es/components/date_picker/date_picker_range.js +1 -1
  40. package/es/components/empty_prompt/empty_prompt.js +1 -1
  41. package/es/components/form/field_number/field_number.js +1 -1
  42. package/es/components/form/field_text/field_text.js +2 -2
  43. package/es/components/form/form_control_layout/form_control_layout.js +2 -2
  44. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  45. package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  46. package/es/components/header/header_links/header_link.js +1 -1
  47. package/es/components/header/header_links/header_links.js +9 -1
  48. package/es/components/header/header_logo.js +1 -1
  49. package/es/components/icon/assets/cluster.js +41 -0
  50. package/es/components/icon/assets/container.js +39 -0
  51. package/es/components/icon/assets/kubernetesNode.js +41 -0
  52. package/es/components/icon/assets/kubernetesPod.js +41 -0
  53. package/es/components/icon/assets/namespace.js +41 -0
  54. package/es/components/icon/icon.js +1 -1
  55. package/es/components/icon/icon_map.js +5 -0
  56. package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
  57. package/es/components/list_group/list_group.js +2 -2
  58. package/es/components/list_group/list_group_item.js +2 -2
  59. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  60. package/es/components/loading/loading_logo.js +1 -1
  61. package/es/components/markdown_editor/markdown_editor.js +1 -1
  62. package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  63. package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
  64. package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  65. package/es/components/notification/notification_event.js +2 -2
  66. package/es/components/notification/notification_event_meta.js +1 -1
  67. package/es/components/page/page_header/page_header.js +1 -1
  68. package/es/components/page/page_header/page_header_content.js +1 -1
  69. package/es/components/page/page_template.js +1 -1
  70. package/es/components/pagination/pagination_button.js +1 -1
  71. package/es/components/popover/popover.js +14 -4
  72. package/es/components/selectable/selectable.js +2 -0
  73. package/es/components/selectable/selectable_list/selectable_list.js +3 -1
  74. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  75. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  76. package/es/components/suggest/suggest.js +1 -1
  77. package/es/components/suggest/suggest_item.js +1 -1
  78. package/es/components/table/table_header_button.js +1 -1
  79. package/es/components/text/text.js +2 -0
  80. package/es/components/timeline/timeline_item_icon.js +1 -1
  81. package/es/components/toast/global_toast_list.js +1 -1
  82. package/es/components/toast/toast.js +1 -1
  83. package/es/components/token/token.js +1 -1
  84. package/es/components/tool_tip/icon_tip.js +1 -1
  85. package/es/components/tour/tour.js +8 -0
  86. package/es/components/tour/tour_step.js +8 -0
  87. package/eui.d.ts +112 -21
  88. package/i18ntokens.json +49 -33
  89. package/lib/components/accessibility/skip_link/skip_link.js +1 -1
  90. package/lib/components/accordion/accordion.js +10 -5
  91. package/lib/components/avatar/avatar.js +1 -1
  92. package/lib/components/badge/badge.js +1 -1
  93. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  94. package/lib/components/basic_table/basic_table.js +1 -1
  95. package/lib/components/basic_table/collapsed_item_actions.js +1 -1
  96. package/lib/components/basic_table/in_memory_table.js +1 -1
  97. package/lib/components/button/_button_content_deprecated.js +1 -1
  98. package/lib/components/button/button.js +2 -2
  99. package/lib/components/button/button_display/_button_display.js +1 -1
  100. package/lib/components/button/button_display/_button_display_content.js +1 -1
  101. package/lib/components/button/button_empty/button_empty.js +1 -1
  102. package/lib/components/button/button_group/button_group.js +1 -1
  103. package/lib/components/button/button_group/button_group_button.js +1 -1
  104. package/lib/components/button/button_icon/button_icon.js +1 -1
  105. package/lib/components/call_out/call_out.js +1 -1
  106. package/lib/components/card/card.js +1 -1
  107. package/lib/components/card/card_select.js +1 -1
  108. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  109. package/lib/components/comment_list/comment.js +1 -1
  110. package/lib/components/comment_list/comment_list.js +1 -1
  111. package/lib/components/comment_list/comment_timeline.js +1 -1
  112. package/lib/components/context_menu/context_menu.js +1 -1
  113. package/lib/components/datagrid/body/data_grid_body.js +37 -28
  114. package/lib/components/datagrid/body/data_grid_cell.js +129 -55
  115. package/lib/components/datagrid/body/header/data_grid_header_cell.js +105 -31
  116. package/lib/components/datagrid/body/header/data_grid_header_row.js +27 -24
  117. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  118. package/lib/components/datagrid/data_grid.js +29 -24
  119. package/lib/components/datagrid/utils/focus.js +19 -10
  120. package/lib/components/datagrid/utils/in_memory.js +26 -23
  121. package/lib/components/datagrid/utils/ref.js +24 -3
  122. package/lib/components/date_picker/date_picker.js +2 -2
  123. package/lib/components/date_picker/date_picker_range.js +1 -1
  124. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  125. package/lib/components/form/field_number/field_number.js +1 -1
  126. package/lib/components/form/field_text/field_text.js +2 -2
  127. package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
  128. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  129. package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  130. package/lib/components/header/header_links/header_link.js +1 -1
  131. package/lib/components/header/header_links/header_links.js +9 -1
  132. package/lib/components/header/header_logo.js +1 -1
  133. package/lib/components/icon/assets/cluster.js +48 -0
  134. package/lib/components/icon/assets/container.js +46 -0
  135. package/lib/components/icon/assets/kubernetesNode.js +48 -0
  136. package/lib/components/icon/assets/kubernetesPod.js +48 -0
  137. package/lib/components/icon/assets/namespace.js +48 -0
  138. package/lib/components/icon/icon.js +1 -1
  139. package/lib/components/icon/icon_map.js +5 -0
  140. package/lib/components/icon/svgs/cluster.svg +3 -0
  141. package/lib/components/icon/svgs/container.svg +3 -0
  142. package/lib/components/icon/svgs/kubernetesNode.svg +3 -0
  143. package/lib/components/icon/svgs/kubernetesPod.svg +3 -0
  144. package/lib/components/icon/svgs/namespace.svg +3 -0
  145. package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
  146. package/lib/components/list_group/list_group.js +2 -2
  147. package/lib/components/list_group/list_group_item.js +2 -2
  148. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  149. package/lib/components/loading/loading_logo.js +1 -1
  150. package/lib/components/markdown_editor/markdown_editor.js +1 -1
  151. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  152. package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
  153. package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  154. package/lib/components/notification/notification_event.js +2 -2
  155. package/lib/components/notification/notification_event_meta.js +1 -1
  156. package/lib/components/page/page_header/page_header.js +1 -1
  157. package/lib/components/page/page_header/page_header_content.js +1 -1
  158. package/lib/components/page/page_template.js +1 -1
  159. package/lib/components/popover/popover.js +14 -4
  160. package/lib/components/selectable/selectable.js +2 -0
  161. package/lib/components/selectable/selectable_list/selectable_list.js +3 -1
  162. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  163. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  164. package/lib/components/suggest/suggest.js +1 -1
  165. package/lib/components/suggest/suggest_item.js +1 -1
  166. package/lib/components/table/table_header_button.js +1 -1
  167. package/lib/components/text/text.js +2 -0
  168. package/lib/components/timeline/timeline_item_icon.js +1 -1
  169. package/lib/components/toast/global_toast_list.js +1 -1
  170. package/lib/components/toast/toast.js +1 -1
  171. package/lib/components/token/token.js +1 -1
  172. package/lib/components/tool_tip/icon_tip.js +1 -1
  173. package/optimize/es/components/accordion/accordion.js +10 -5
  174. package/optimize/es/components/datagrid/body/data_grid_body.js +10 -4
  175. package/optimize/es/components/datagrid/body/data_grid_cell.js +18 -9
  176. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +74 -8
  177. package/optimize/es/components/datagrid/data_grid.js +2 -0
  178. package/optimize/es/components/datagrid/utils/focus.js +19 -10
  179. package/optimize/es/components/datagrid/utils/ref.js +24 -3
  180. package/optimize/es/components/icon/assets/cluster.js +37 -0
  181. package/optimize/es/components/icon/assets/container.js +35 -0
  182. package/optimize/es/components/icon/assets/kubernetesNode.js +37 -0
  183. package/optimize/es/components/icon/assets/kubernetesPod.js +37 -0
  184. package/optimize/es/components/icon/assets/namespace.js +37 -0
  185. package/optimize/es/components/icon/icon_map.js +5 -0
  186. package/optimize/es/components/popover/popover.js +6 -4
  187. package/optimize/es/components/selectable/selectable.js +2 -0
  188. package/optimize/es/components/selectable/selectable_list/selectable_list.js +2 -0
  189. package/optimize/es/components/text/text.js +2 -0
  190. package/optimize/lib/components/accordion/accordion.js +8 -5
  191. package/optimize/lib/components/datagrid/body/data_grid_body.js +10 -4
  192. package/optimize/lib/components/datagrid/body/data_grid_cell.js +17 -8
  193. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +79 -8
  194. package/optimize/lib/components/datagrid/data_grid.js +2 -0
  195. package/optimize/lib/components/datagrid/utils/focus.js +19 -10
  196. package/optimize/lib/components/datagrid/utils/ref.js +24 -3
  197. package/optimize/lib/components/icon/assets/cluster.js +47 -0
  198. package/optimize/lib/components/icon/assets/container.js +45 -0
  199. package/optimize/lib/components/icon/assets/kubernetesNode.js +47 -0
  200. package/optimize/lib/components/icon/assets/kubernetesPod.js +47 -0
  201. package/optimize/lib/components/icon/assets/namespace.js +47 -0
  202. package/optimize/lib/components/icon/icon_map.js +5 -0
  203. package/optimize/lib/components/icon/svgs/cluster.svg +3 -0
  204. package/optimize/lib/components/icon/svgs/container.svg +3 -0
  205. package/optimize/lib/components/icon/svgs/kubernetesNode.svg +3 -0
  206. package/optimize/lib/components/icon/svgs/kubernetesPod.svg +3 -0
  207. package/optimize/lib/components/icon/svgs/namespace.svg +3 -0
  208. package/optimize/lib/components/popover/popover.js +6 -4
  209. package/optimize/lib/components/selectable/selectable.js +2 -0
  210. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +2 -0
  211. package/optimize/lib/components/text/text.js +2 -0
  212. package/package.json +3 -3
  213. package/src/components/datagrid/body/header/_data_grid_header_row.scss +0 -9
  214. package/test-env/components/accessibility/skip_link/skip_link.js +1 -1
  215. package/test-env/components/accordion/accordion.js +8 -5
  216. package/test-env/components/avatar/avatar.js +1 -1
  217. package/test-env/components/badge/badge.js +1 -1
  218. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  219. package/test-env/components/basic_table/basic_table.js +1 -1
  220. package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
  221. package/test-env/components/basic_table/in_memory_table.js +1 -1
  222. package/test-env/components/button/_button_content_deprecated.js +1 -1
  223. package/test-env/components/button/button.js +2 -2
  224. package/test-env/components/button/button_display/_button_display.js +1 -1
  225. package/test-env/components/button/button_display/_button_display_content.js +1 -1
  226. package/test-env/components/button/button_empty/button_empty.js +1 -1
  227. package/test-env/components/button/button_group/button_group.js +1 -1
  228. package/test-env/components/button/button_group/button_group_button.js +1 -1
  229. package/test-env/components/button/button_icon/button_icon.js +1 -1
  230. package/test-env/components/call_out/call_out.js +1 -1
  231. package/test-env/components/card/card.js +1 -1
  232. package/test-env/components/card/card_select.js +1 -1
  233. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  234. package/test-env/components/comment_list/comment.js +1 -1
  235. package/test-env/components/comment_list/comment_list.js +1 -1
  236. package/test-env/components/comment_list/comment_timeline.js +1 -1
  237. package/test-env/components/context_menu/context_menu.js +1 -1
  238. package/test-env/components/datagrid/body/data_grid_body.js +37 -28
  239. package/test-env/components/datagrid/body/data_grid_cell.js +129 -55
  240. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +105 -31
  241. package/test-env/components/datagrid/body/header/data_grid_header_row.js +27 -24
  242. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  243. package/test-env/components/datagrid/data_grid.js +29 -24
  244. package/test-env/components/datagrid/utils/focus.js +19 -10
  245. package/test-env/components/datagrid/utils/in_memory.js +26 -23
  246. package/test-env/components/datagrid/utils/ref.js +24 -3
  247. package/test-env/components/date_picker/date_picker.js +2 -2
  248. package/test-env/components/date_picker/date_picker_range.js +1 -1
  249. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  250. package/test-env/components/form/field_number/field_number.js +1 -1
  251. package/test-env/components/form/field_text/field_text.js +2 -2
  252. package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
  253. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  254. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  255. package/test-env/components/header/header_links/header_link.js +1 -1
  256. package/test-env/components/header/header_links/header_links.js +9 -1
  257. package/test-env/components/header/header_logo.js +1 -1
  258. package/test-env/components/icon/assets/cluster.js +47 -0
  259. package/test-env/components/icon/assets/container.js +45 -0
  260. package/test-env/components/icon/assets/kubernetesNode.js +47 -0
  261. package/test-env/components/icon/assets/kubernetesPod.js +47 -0
  262. package/test-env/components/icon/assets/namespace.js +47 -0
  263. package/test-env/components/icon/icon_map.js +5 -0
  264. package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
  265. package/test-env/components/list_group/list_group.js +2 -2
  266. package/test-env/components/list_group/list_group_item.js +2 -2
  267. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  268. package/test-env/components/loading/loading_logo.js +1 -1
  269. package/test-env/components/markdown_editor/markdown_editor.js +1 -1
  270. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  271. package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
  272. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  273. package/test-env/components/notification/notification_event.js +2 -2
  274. package/test-env/components/notification/notification_event_meta.js +1 -1
  275. package/test-env/components/page/page_header/page_header.js +1 -1
  276. package/test-env/components/page/page_header/page_header_content.js +1 -1
  277. package/test-env/components/page/page_template.js +1 -1
  278. package/test-env/components/popover/popover.js +14 -4
  279. package/test-env/components/selectable/selectable.js +2 -0
  280. package/test-env/components/selectable/selectable_list/selectable_list.js +3 -1
  281. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  282. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  283. package/test-env/components/suggest/suggest.js +1 -1
  284. package/test-env/components/suggest/suggest_item.js +1 -1
  285. package/test-env/components/table/table_header_button.js +1 -1
  286. package/test-env/components/text/text.js +2 -0
  287. package/test-env/components/timeline/timeline_item_icon.js +1 -1
  288. package/test-env/components/toast/global_toast_list.js +1 -1
  289. package/test-env/components/toast/toast.js +1 -1
  290. package/test-env/components/token/token.js +1 -1
  291. package/test-env/components/tool_tip/icon_tip.js +1 -1
@@ -52,7 +52,8 @@ export var Cell = function Cell(_ref) {
52
52
  schemaDetectors = data.schemaDetectors,
53
53
  rowHeightsOptions = data.rowHeightsOptions,
54
54
  rowHeightUtils = data.rowHeightUtils,
55
- rowManager = data.rowManager;
55
+ rowManager = data.rowManager,
56
+ pagination = data.pagination;
56
57
  var popoverContext = useContext(DataGridCellPopoverContext);
57
58
 
58
59
  var _useContext = useContext(DataGridWrapperRowsContext),
@@ -91,7 +92,8 @@ export var Cell = function Cell(_ref) {
91
92
  rowHeightUtils: rowHeightUtils,
92
93
  setRowHeight: isFirstColumn ? setRowHeight : undefined,
93
94
  rowManager: rowManager,
94
- popoverContext: popoverContext
95
+ popoverContext: popoverContext,
96
+ pagination: pagination
95
97
  };
96
98
 
97
99
  if (isLeadingControlColumn) {
@@ -385,13 +387,16 @@ export var EuiDataGridBody = function EuiDataGridBody(props) {
385
387
  }
386
388
  }, ___EmotionJSX(Grid, _extends({}, virtualizationOptions ? virtualizationOptions : {}, {
387
389
  ref: gridRef,
390
+ className: classNames('euiDataGrid__virtualized', virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
388
391
  onItemsRendered: function onItemsRendered(itemsRendered) {
392
+ var _virtualizationOption;
393
+
389
394
  gridItemsRendered.current = itemsRendered;
395
+ virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : (_virtualizationOption = virtualizationOptions.onItemsRendered) === null || _virtualizationOption === void 0 ? void 0 : _virtualizationOption.call(virtualizationOptions, itemsRendered);
390
396
  },
391
397
  innerElementType: InnerElement,
392
398
  outerRef: outerGridRef,
393
399
  innerRef: innerGridRef,
394
- className: "euiDataGrid__virtualized",
395
400
  columnCount: visibleColCount,
396
401
  width: finalWidth,
397
402
  columnWidth: getColumnWidth,
@@ -412,7 +417,8 @@ export var EuiDataGridBody = function EuiDataGridBody(props) {
412
417
  interactiveCellId: interactiveCellId,
413
418
  rowHeightsOptions: rowHeightsOptions,
414
419
  rowHeightUtils: rowHeightUtils,
415
- rowManager: rowManager
420
+ rowManager: rowManager,
421
+ pagination: pagination
416
422
  },
417
423
  rowCount: IS_JEST_ENVIRONMENT || headerRowHeight > 0 ? visibleRowCount : 0
418
424
  }), Cell), scrollBorderOverlay) : null;
@@ -7,8 +7,8 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
8
  import _extends from "@babel/runtime/helpers/extends";
9
9
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
10
- var _excluded = ["renderCellValue", "column", "setCellContentsRef", "rowHeightsOptions", "rowIndex", "colIndex", "rowHeightUtils", "isDefinedHeight"],
11
- _excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager"],
10
+ var _excluded = ["renderCellValue", "column", "setCellContentsRef", "rowHeightsOptions", "rowIndex", "colIndex", "ariaRowIndex", "rowHeightUtils", "isDefinedHeight"],
11
+ _excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
12
12
  _excluded3 = ["isExpandable", "style", "className", "data-test-subj"];
13
13
 
14
14
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -33,7 +33,7 @@ import { tabbable } from 'tabbable';
33
33
  import { keys } from '../../../services';
34
34
  import { EuiScreenReaderOnly } from '../../accessibility';
35
35
  import { EuiFocusTrap } from '../../focus_trap';
36
- import { useEuiI18n } from '../../i18n';
36
+ import { EuiI18n } from '../../i18n';
37
37
  import { hasResizeObserver } from '../../observer/resize_observer/resize_observer';
38
38
  import { DataGridFocusContext } from '../utils/focus';
39
39
  import { EuiDataGridCellActions, EuiDataGridCellPopoverActions } from './data_grid_cell_actions';
@@ -47,16 +47,13 @@ var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
47
47
  rowHeightsOptions = _ref.rowHeightsOptions,
48
48
  rowIndex = _ref.rowIndex,
49
49
  colIndex = _ref.colIndex,
50
+ ariaRowIndex = _ref.ariaRowIndex,
50
51
  rowHeightUtils = _ref.rowHeightUtils,
51
52
  isDefinedHeight = _ref.isDefinedHeight,
52
53
  rest = _objectWithoutProperties(_ref, _excluded);
53
54
 
54
55
  // React is more permissible than the TS types indicate
55
56
  var CellElement = renderCellValue;
56
- var positionText = useEuiI18n('euiDataGridCell.position', 'Row: {row}; Column: {col}', {
57
- row: rowIndex + 1,
58
- col: colIndex + 1
59
- });
60
57
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", {
61
58
  ref: setCellContentsRef,
62
59
  "data-datagrid-cellcontent": true,
@@ -68,7 +65,15 @@ var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
68
65
  rowIndex: rowIndex,
69
66
  colIndex: colIndex,
70
67
  schema: (column === null || column === void 0 ? void 0 : column.schema) || rest.columnType
71
- }, rest))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", null, positionText)));
68
+ }, rest))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", null, '- ', ___EmotionJSX(EuiI18n, {
69
+ token: "euiDataGridCell.position",
70
+ default: "{columnId}, column {col}, row {row}",
71
+ values: {
72
+ columnId: (column === null || column === void 0 ? void 0 : column.displayAsText) || rest.columnId,
73
+ col: colIndex + 1,
74
+ row: ariaRowIndex
75
+ }
76
+ }))));
72
77
  });
73
78
  export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
74
79
  _inherits(EuiDataGridCell, _Component);
@@ -473,6 +478,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
473
478
  rowHeightUtils = _this$props8.rowHeightUtils,
474
479
  rowHeightsOptions = _this$props8.rowHeightsOptions,
475
480
  rowManager = _this$props8.rowManager,
481
+ pagination = _this$props8.pagination,
476
482
  rest = _objectWithoutProperties(_this$props8, _excluded2);
477
483
 
478
484
  var rowIndex = rest.rowIndex,
@@ -482,6 +488,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
482
488
  var popoverIsOpen = this.isPopoverOpen();
483
489
  var showCellActions = this.state.isFocused || this.state.isEntered || this.state.enableInteractions || popoverIsOpen;
484
490
  var cellClasses = classNames('euiDataGridRowCell', (_classNames = {}, _defineProperty(_classNames, "euiDataGridRowCell--".concat(columnType), columnType), _defineProperty(_classNames, 'euiDataGridRowCell--open', popoverIsOpen), _classNames), className);
491
+ var ariaRowIndex = pagination ? visibleRowIndex + 1 + pagination.pageSize * pagination.pageIndex : visibleRowIndex + 1;
485
492
 
486
493
  var _this$state$cellProps2 = this.state.cellProps,
487
494
  _ = _this$state$cellProps2.isExpandable,
@@ -590,7 +597,8 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
590
597
  setCellContentsRef: this.setCellContentsRef,
591
598
  rowHeightsOptions: rowHeightsOptions,
592
599
  rowHeightUtils: rowHeightUtils,
593
- isDefinedHeight: isDefinedHeight
600
+ isDefinedHeight: isDefinedHeight,
601
+ ariaRowIndex: ariaRowIndex
594
602
  });
595
603
 
596
604
  var anchorClass = 'euiDataGridRowCell__expandFlex';
@@ -637,6 +645,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
637
645
 
638
646
  var content = ___EmotionJSX("div", _extends({
639
647
  role: "gridcell",
648
+ "aria-rowindex": ariaRowIndex,
640
649
  tabIndex: this.state.isFocused && !this.state.disableCellTabIndex ? 0 : -1,
641
650
  ref: this.cellRef
642
651
  }, cellProps, {
@@ -10,10 +10,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  * Side Public License, v 1.
11
11
  */
12
12
  import classnames from 'classnames';
13
- import React, { useContext, useState } from 'react';
13
+ import React, { useContext, useState, useRef, useCallback } from 'react';
14
+ import { tabbable } from 'tabbable';
15
+ import { keys } from '../../../../services';
14
16
  import { useGeneratedHtmlId } from '../../../../services/accessibility';
15
17
  import { EuiScreenReaderOnly } from '../../../accessibility';
16
- import { useEuiI18n } from '../../../i18n';
18
+ import { useEuiI18n, EuiI18n } from '../../../i18n';
17
19
  import { EuiIcon } from '../../../icon';
18
20
  import { EuiListGroup } from '../../../list_group';
19
21
  import { EuiPopover } from '../../../popover';
@@ -88,6 +90,7 @@ export var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
88
90
  isPopoverOpen = _useState2[0],
89
91
  setIsPopoverOpen = _useState2[1];
90
92
 
93
+ var popoverArrowNavigationProps = usePopoverArrowNavigation();
91
94
  var columnActions = getColumnActions({
92
95
  column: column,
93
96
  columns: columns,
@@ -123,9 +126,11 @@ export var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
123
126
  }) : null, sortString && ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("div", {
124
127
  id: screenReaderId
125
128
  }, sortString)), !showColumnActions ? ___EmotionJSX(React.Fragment, null, sortingArrow, ___EmotionJSX("div", {
126
- className: "euiDataGridHeaderCell__content"
127
- }, display || displayAsText || id)) : ___EmotionJSX(EuiPopover, {
128
- anchorClassName: "euiDataGridHeaderCell__anchor",
129
+ className: "euiDataGridHeaderCell__content",
130
+ title: displayAsText || id
131
+ }, display || displayAsText || id)) : ___EmotionJSX(EuiPopover, _extends({
132
+ className: "eui-fullWidth",
133
+ anchorClassName: "eui-fullWidth",
129
134
  panelPaddingSize: "none",
130
135
  offset: 7,
131
136
  button: ___EmotionJSX("button", {
@@ -137,7 +142,8 @@ export var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
137
142
  });
138
143
  }
139
144
  }, sortingArrow, ___EmotionJSX("div", {
140
- className: "euiDataGridHeaderCell__content"
145
+ className: "euiDataGridHeaderCell__content",
146
+ title: displayAsText || id
141
147
  }, display || displayAsText || id), ___EmotionJSX(EuiIcon, {
142
148
  className: "euiDataGridHeaderCell__icon",
143
149
  type: "arrowDown",
@@ -150,9 +156,69 @@ export var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
150
156
  closePopover: function closePopover() {
151
157
  return setIsPopoverOpen(false);
152
158
  }
153
- }, ___EmotionJSX("div", null, ___EmotionJSX(EuiListGroup, {
159
+ }, popoverArrowNavigationProps), ___EmotionJSX(EuiListGroup, {
154
160
  listItems: columnActions,
155
161
  gutterSize: "none",
156
162
  "data-test-subj": "dataGridHeaderCellActionGroup-".concat(id)
157
- }))));
163
+ })));
164
+ };
165
+ /**
166
+ * Add keyboard arrow navigation to the cell actions popover
167
+ * to match the UX of the rest of EuiDataGrid
168
+ */
169
+
170
+ export var usePopoverArrowNavigation = function usePopoverArrowNavigation() {
171
+ var popoverPanelRef = useRef(null);
172
+ var actionsRef = useRef(undefined);
173
+ var panelRef = useCallback(function (ref) {
174
+ popoverPanelRef.current = ref;
175
+ actionsRef.current = ref ? tabbable(ref) : undefined;
176
+ }, []);
177
+ var onKeyDown = useCallback(function (e) {
178
+ var _actionsRef$current;
179
+
180
+ if (e.key !== keys.ARROW_DOWN && e.key !== keys.ARROW_UP) return;
181
+ if (!((_actionsRef$current = actionsRef.current) !== null && _actionsRef$current !== void 0 && _actionsRef$current.length)) return;
182
+ e.preventDefault();
183
+ var initialState = document.activeElement === popoverPanelRef.current;
184
+ var currentIndex = !initialState ? actionsRef.current.findIndex(function (el) {
185
+ return document.activeElement === el;
186
+ }) : -1;
187
+ var lastIndex = actionsRef.current.length - 1;
188
+ var indexToFocus;
189
+
190
+ if (initialState) {
191
+ if (e.key === keys.ARROW_DOWN) {
192
+ indexToFocus = 0;
193
+ } else if (e.key === keys.ARROW_UP) {
194
+ indexToFocus = lastIndex;
195
+ }
196
+ } else {
197
+ if (e.key === keys.ARROW_DOWN) {
198
+ indexToFocus = currentIndex + 1;
199
+
200
+ if (indexToFocus > lastIndex) {
201
+ indexToFocus = 0;
202
+ }
203
+ } else if (e.key === keys.ARROW_UP) {
204
+ indexToFocus = currentIndex - 1;
205
+
206
+ if (indexToFocus < 0) {
207
+ indexToFocus = lastIndex;
208
+ }
209
+ }
210
+ }
211
+
212
+ actionsRef.current[indexToFocus].focus();
213
+ }, []);
214
+ return {
215
+ panelRef: panelRef,
216
+ panelProps: {
217
+ onKeyDown: onKeyDown
218
+ },
219
+ popoverScreenReaderText: ___EmotionJSX(EuiI18n, {
220
+ token: "euiDataGridHeaderCell.actionsPopoverScreenReaderText",
221
+ default: "To navigate through the list of column actions, press the Tab or Up and Down arrow keys."
222
+ })
223
+ };
158
224
  };
@@ -233,6 +233,7 @@ export var EuiDataGrid = /*#__PURE__*/forwardRef(function (props, ref) {
233
233
 
234
234
  useImperativeGridRef({
235
235
  ref: ref,
236
+ gridRef: gridRef,
236
237
  setIsFullScreen: setIsFullScreen,
237
238
  focusContext: focusContext,
238
239
  cellPopoverContext: cellPopoverContext,
@@ -336,6 +337,7 @@ export var EuiDataGrid = /*#__PURE__*/forwardRef(function (props, ref) {
336
337
  "data-test-subj": "euiDataGridBody",
337
338
  className: "euiDataGrid__content",
338
339
  role: "grid",
340
+ "aria-rowcount": rowCount,
339
341
  id: gridId
340
342
  }, wrappingDivFocusProps, gridAriaProps), ___EmotionJSX(EuiDataGridBody, {
341
343
  columns: orderedVisibleColumns,
@@ -46,11 +46,17 @@ export var useFocus = function useFocus(_ref) {
46
46
  focusedCell = _useState4[0],
47
47
  _setFocusedCell = _useState4[1];
48
48
 
49
- var setFocusedCell = useCallback(function (focusedCell) {
50
- _setFocusedCell(focusedCell);
49
+ var setFocusedCell = useCallback(function (nextFocusedCell) {
50
+ // If the x/y coordinates remained the same, don't update. This keeps the focusedCell
51
+ // reference stable, and allows it to be used in places that need reference equality.
52
+ if (nextFocusedCell[0] === (focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell[0]) && nextFocusedCell[1] === (focusedCell === null || focusedCell === void 0 ? void 0 : focusedCell[1])) {
53
+ return;
54
+ }
55
+
56
+ _setFocusedCell(nextFocusedCell);
51
57
 
52
58
  setIsFocusedCellInView(true); // scrolling.ts ensures focused cells are fully in view
53
- }, []);
59
+ }, [focusedCell]);
54
60
  var previousCell = useRef(undefined);
55
61
  useEffect(function () {
56
62
  if (previousCell.current) {
@@ -82,13 +88,16 @@ export var useFocus = function useFocus(_ref) {
82
88
  tabIndex: -1
83
89
  } : {
84
90
  tabIndex: 0,
85
- onFocus: function onFocus(e) {
86
- // if e.target (the source element of the `focus event`
87
- // matches e.currentTarget (always the div with this onFocus listener)
88
- // then the user has focused directly on the data grid wrapper (almost definitely by tabbing)
89
- // so shift focus to the first visible and interactive cell within the grid
90
- if (e.target === e.currentTarget) {
91
- focusFirstVisibleInteractiveCell();
91
+ onKeyUp: function onKeyUp(e) {
92
+ // Ensure we only manually focus into the grid via keyboard tab -
93
+ // mouse users can accidentally trigger focus by clicking on scrollbars
94
+ if (e.key === keys.TAB) {
95
+ // if e.target (the source element of the `focus event`) matches
96
+ // e.currentTarget (always the div with this onKeyUp listener)
97
+ // then the user has focused directly on the data grid wrapper
98
+ if (e.target === e.currentTarget) {
99
+ focusFirstVisibleInteractiveCell();
100
+ }
92
101
  }
93
102
  }
94
103
  };
@@ -8,6 +8,7 @@
8
8
  import { useImperativeHandle, useCallback } from 'react';
9
9
  export var useImperativeGridRef = function useImperativeGridRef(_ref) {
10
10
  var ref = _ref.ref,
11
+ gridRef = _ref.gridRef,
11
12
  setIsFullScreen = _ref.setIsFullScreen,
12
13
  focusContext = _ref.focusContext,
13
14
  cellPopoverContext = _ref.cellPopoverContext,
@@ -62,16 +63,36 @@ export var useImperativeGridRef = function useImperativeGridRef(_ref) {
62
63
  rowIndex: visibleRowIndex,
63
64
  colIndex: colIndex
64
65
  });
65
- }, [_openCellPopover, checkCellExists, findVisibleRowIndex]); // Set the ref APIs
66
+ }, [_openCellPopover, checkCellExists, findVisibleRowIndex]);
67
+ var scrollTo = useCallback(function () {
68
+ var _gridRef$current;
69
+
70
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
71
+ args[_key] = arguments[_key];
72
+ }
73
+
74
+ return (_gridRef$current = gridRef.current) === null || _gridRef$current === void 0 ? void 0 : _gridRef$current.scrollTo.apply(_gridRef$current, args);
75
+ }, [gridRef]);
76
+ var scrollToItem = useCallback(function () {
77
+ var _gridRef$current2;
78
+
79
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
80
+ args[_key2] = arguments[_key2];
81
+ }
82
+
83
+ return (_gridRef$current2 = gridRef.current) === null || _gridRef$current2 === void 0 ? void 0 : _gridRef$current2.scrollToItem.apply(_gridRef$current2, args);
84
+ }, [gridRef]); // Set the ref APIs
66
85
 
67
86
  useImperativeHandle(ref, function () {
68
87
  return {
69
88
  setIsFullScreen: setIsFullScreen,
70
89
  setFocusedCell: setFocusedCell,
71
90
  openCellPopover: openCellPopover,
72
- closeCellPopover: closeCellPopover
91
+ closeCellPopover: closeCellPopover,
92
+ scrollTo: scrollTo,
93
+ scrollToItem: scrollToItem
73
94
  };
74
- }, [setIsFullScreen, setFocusedCell, openCellPopover, closeCellPopover]);
95
+ }, [setIsFullScreen, setFocusedCell, openCellPopover, closeCellPopover, scrollTo, scrollToItem]);
75
96
  };
76
97
  /**
77
98
  * Throw a digestible error if the consumer attempts to focus into an invalid
@@ -0,0 +1,37 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "titleId"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
13
+ import * as React from 'react';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+
16
+ var EuiIconCluster = function EuiIconCluster(_ref) {
17
+ var title = _ref.title,
18
+ titleId = _ref.titleId,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+
21
+ return ___EmotionJSX("svg", _extends({
22
+ width: 16,
23
+ height: 16,
24
+ viewBox: "0 0 16 16",
25
+ fill: "none",
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ "aria-labelledby": titleId
28
+ }, props), title ? ___EmotionJSX("title", {
29
+ id: titleId
30
+ }, title) : null, ___EmotionJSX("path", {
31
+ fillRule: "evenodd",
32
+ clipRule: "evenodd",
33
+ d: "M4.5 7a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm0-6a3.5 3.5 0 013.465 3h3.12a1.5 1.5 0 110 1h-3.12a3.482 3.482 0 01-.662 1.596l2.1 2.1A3.5 3.5 0 118.036 12h-3.12a1.5 1.5 0 110-.999h3.12a3.482 3.482 0 01.662-1.596l-2.1-2.1A3.5 3.5 0 114.5 1zM12 4.5a.5.5 0 101 0 .5.5 0 00-1 0zm-.5 9.5a2.5 2.5 0 110-5 2.5 2.5 0 010 5zM4 11.5a.5.5 0 11-1 0 .5.5 0 011 0z"
34
+ }));
35
+ };
36
+
37
+ export var icon = EuiIconCluster;
@@ -0,0 +1,35 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "titleId"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
13
+ import * as React from 'react';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+
16
+ var EuiIconContainer = function EuiIconContainer(_ref) {
17
+ var title = _ref.title,
18
+ titleId = _ref.titleId,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+
21
+ return ___EmotionJSX("svg", _extends({
22
+ fill: "none",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ viewBox: "0 0 16 16",
25
+ "aria-labelledby": titleId
26
+ }, props), title ? ___EmotionJSX("title", {
27
+ id: titleId
28
+ }, title) : null, ___EmotionJSX("path", {
29
+ fillRule: "evenodd",
30
+ clipRule: "evenodd",
31
+ d: "M0 2.5A.5.5 0 01.5 2h15a.5.5 0 010 1H15v10h.5a.5.5 0 010 1H.5a.5.5 0 010-1H1V3H.5a.5.5 0 01-.5-.5zM2 3h12v10H2V3zm3 2a.5.5 0 00-.5.5v5a.5.5 0 001 0v-5A.5.5 0 005 5zm5.5.5a.5.5 0 011 0v5a.5.5 0 01-1 0v-5zM8 5a.5.5 0 00-.5.5v5a.5.5 0 001 0v-5A.5.5 0 008 5z"
32
+ }));
33
+ };
34
+
35
+ export var icon = EuiIconContainer;
@@ -0,0 +1,37 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "titleId"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
13
+ import * as React from 'react';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+
16
+ var EuiIconKubernetesNode = function EuiIconKubernetesNode(_ref) {
17
+ var title = _ref.title,
18
+ titleId = _ref.titleId,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+
21
+ return ___EmotionJSX("svg", _extends({
22
+ width: 16,
23
+ height: 16,
24
+ viewBox: "0 0 16 16",
25
+ fill: "none",
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ "aria-labelledby": titleId
28
+ }, props), title ? ___EmotionJSX("title", {
29
+ id: titleId
30
+ }, title) : null, ___EmotionJSX("path", {
31
+ fillRule: "evenodd",
32
+ clipRule: "evenodd",
33
+ d: "M14 11.42V4.58L8 1.152 2 4.58v6.84l6 3.428 6-3.428zM8 16l7-4V4L8 0 1 4v8l7 4zM8 4.607l3 1.714V9.68l-3 1.714-3-1.714V6.32l3-1.714zm4 1.134v4.518l-4 2.286-4-2.286V5.741l4-2.286 4 2.286z"
34
+ }));
35
+ };
36
+
37
+ export var icon = EuiIconKubernetesNode;
@@ -0,0 +1,37 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "titleId"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
13
+ import * as React from 'react';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+
16
+ var EuiIconKubernetesPod = function EuiIconKubernetesPod(_ref) {
17
+ var title = _ref.title,
18
+ titleId = _ref.titleId,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+
21
+ return ___EmotionJSX("svg", _extends({
22
+ width: 16,
23
+ height: 16,
24
+ viewBox: "0 0 16 16",
25
+ fill: "none",
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ "aria-labelledby": titleId
28
+ }, props), title ? ___EmotionJSX("title", {
29
+ id: titleId
30
+ }, title) : null, ___EmotionJSX("path", {
31
+ fillRule: "evenodd",
32
+ clipRule: "evenodd",
33
+ d: "M14 5.151v6.269l-5.5 3.142V8.29L14 5.151zm-.508-.861L8 1.152 2.508 4.29 8 7.424l5.492-3.134zM2 5.151l5.5 3.14v6.272L2 11.42V5.15zM15 12l-7 4-7-4V4l7-4 7 4v8z"
34
+ }));
35
+ };
36
+
37
+ export var icon = EuiIconKubernetesPod;
@@ -0,0 +1,37 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "titleId"];
4
+
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
13
+ import * as React from 'react';
14
+ import { jsx as ___EmotionJSX } from "@emotion/react";
15
+
16
+ var EuiIconNamespace = function EuiIconNamespace(_ref) {
17
+ var title = _ref.title,
18
+ titleId = _ref.titleId,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+
21
+ return ___EmotionJSX("svg", _extends({
22
+ width: 16,
23
+ height: 16,
24
+ viewBox: "0 0 16 16",
25
+ fill: "none",
26
+ xmlns: "http://www.w3.org/2000/svg",
27
+ "aria-labelledby": titleId
28
+ }, props), title ? ___EmotionJSX("title", {
29
+ id: titleId
30
+ }, title) : null, ___EmotionJSX("path", {
31
+ fillRule: "evenodd",
32
+ clipRule: "evenodd",
33
+ d: "M1 1h14v14H1V1zm13 12v1H2V2h12v11zM6 6h4v4H6V6zm-1 5V5h6v6H5z"
34
+ }));
35
+ };
36
+
37
+ export var icon = EuiIconNamespace;
@@ -49,11 +49,13 @@ export var typeToPathMap = {
49
49
  cloudDrizzle: 'cloudDrizzle',
50
50
  cloudStormy: 'cloudStormy',
51
51
  cloudSunny: 'cloudSunny',
52
+ cluster: 'cluster',
52
53
  codeApp: 'app_code',
53
54
  color: 'color',
54
55
  compute: 'compute',
55
56
  console: 'console',
56
57
  consoleApp: 'app_console',
58
+ container: 'container',
57
59
  continuityAbove: 'continuityAbove',
58
60
  continuityAboveBelow: 'continuityAboveBelow',
59
61
  continuityBelow: 'continuityBelow',
@@ -180,6 +182,8 @@ export var typeToPathMap = {
180
182
  kqlOperand: 'kql_operand',
181
183
  kqlSelector: 'kql_selector',
182
184
  kqlValue: 'kql_value',
185
+ kubernetesNode: 'kubernetesNode',
186
+ kubernetesPod: 'kubernetesPod',
183
187
  layers: 'layers',
184
188
  lensApp: 'app_lens',
185
189
  lettering: 'lettering',
@@ -277,6 +281,7 @@ export var typeToPathMap = {
277
281
  mobile: 'mobile',
278
282
  monitoringApp: 'app_monitoring',
279
283
  moon: 'moon',
284
+ namespace: 'namespace',
280
285
  nested: 'nested',
281
286
  node: 'node',
282
287
  notebookApp: 'app_notebook',
@@ -10,7 +10,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
11
  import _typeof from "@babel/runtime/helpers/typeof";
12
12
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
13
- var _excluded = ["anchorClassName", "anchorPosition", "button", "buttonRef", "insert", "isOpen", "ownFocus", "children", "className", "closePopover", "panelClassName", "panelPaddingSize", "panelProps", "panelRef", "panelStyle", "popoverRef", "hasArrow", "arrowChildren", "repositionOnScroll", "zIndex", "initialFocus", "attachToAnchor", "display", "onTrapDeactivation", "buffer", "aria-label", "aria-labelledby", "container", "focusTrapProps", "tabIndex"];
13
+ var _excluded = ["anchorClassName", "anchorPosition", "button", "buttonRef", "insert", "isOpen", "ownFocus", "children", "className", "closePopover", "panelClassName", "panelPaddingSize", "panelProps", "panelRef", "panelStyle", "popoverScreenReaderText", "popoverRef", "hasArrow", "arrowChildren", "repositionOnScroll", "zIndex", "initialFocus", "attachToAnchor", "display", "offset", "onTrapDeactivation", "buffer", "aria-label", "aria-labelledby", "container", "focusTrapProps", "tabIndex"];
14
14
 
15
15
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
16
16
 
@@ -496,6 +496,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
496
496
  panelProps = _this$props.panelProps,
497
497
  panelRef = _this$props.panelRef,
498
498
  panelStyle = _this$props.panelStyle,
499
+ popoverScreenReaderText = _this$props.popoverScreenReaderText,
499
500
  popoverRef = _this$props.popoverRef,
500
501
  hasArrow = _this$props.hasArrow,
501
502
  arrowChildren = _this$props.arrowChildren,
@@ -504,6 +505,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
504
505
  initialFocus = _this$props.initialFocus,
505
506
  attachToAnchor = _this$props.attachToAnchor,
506
507
  display = _this$props.display,
508
+ offset = _this$props.offset,
507
509
  onTrapDeactivation = _this$props.onTrapDeactivation,
508
510
  buffer = _this$props.buffer,
509
511
  ariaLabel = _this$props['aria-label'],
@@ -549,14 +551,14 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
549
551
 
550
552
  var focusTrapScreenReaderText;
551
553
 
552
- if (ownFocus) {
554
+ if (ownFocus || popoverScreenReaderText) {
553
555
  ariaDescribedby = this.descriptionId;
554
556
  focusTrapScreenReaderText = ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
555
557
  id: this.descriptionId
556
- }, ___EmotionJSX(EuiI18n, {
558
+ }, ownFocus && ___EmotionJSX(EuiI18n, {
557
559
  token: "euiPopover.screenReaderAnnouncement",
558
560
  default: "You are in a dialog. To close this dialog, hit escape."
559
- })));
561
+ }), popoverScreenReaderText));
560
562
  }
561
563
 
562
564
  var arrowClassNames = classNames('euiPopover__panelArrow', "euiPopover__panelArrow--".concat(this.state.arrowPosition));
@@ -152,6 +152,8 @@ export var EuiSelectable = /*#__PURE__*/function (_Component) {
152
152
  event.stopPropagation();
153
153
 
154
154
  if (_this.state.activeOptionIndex != null && optionsList) {
155
+ event.persist(); // NOTE: This is needed for React v16 backwards compatibility
156
+
155
157
  optionsList.onAddOrRemoveOption(_this.state.visibleOptions[_this.state.activeOptionIndex], event);
156
158
  }
157
159
 
@@ -154,6 +154,8 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
154
154
  setActiveOptionIndex(index);
155
155
  },
156
156
  onClick: function onClick(event) {
157
+ event.persist(); // NOTE: This is needed for React v16 backwards compatibility
158
+
157
159
  _this.onAddOrRemoveOption(option, event);
158
160
  },
159
161
  ref: ref ? ref.bind(null, index) : undefined,