@elastic/eui 61.0.0 → 62.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 (477) hide show
  1. package/dist/eui_theme_dark.css +11 -487
  2. package/dist/eui_theme_dark.json +1 -2
  3. package/dist/eui_theme_dark.json.d.ts +1 -2
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +11 -487
  6. package/dist/eui_theme_light.json +1 -2
  7. package/dist/eui_theme_light.json.d.ts +1 -2
  8. package/dist/eui_theme_light.min.css +1 -1
  9. package/es/components/accessibility/skip_link/skip_link.js +1 -1
  10. package/es/components/avatar/avatar.js +1 -2
  11. package/es/components/badge/badge.js +1 -1
  12. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  13. package/es/components/basic_table/basic_table.js +1 -1
  14. package/es/components/basic_table/collapsed_item_actions.js +1 -1
  15. package/es/components/basic_table/in_memory_table.js +1 -1
  16. package/es/components/button/_button_content_deprecated.js +1 -1
  17. package/es/components/button/button.js +2 -2
  18. package/es/components/button/button_display/_button_display.js +1 -1
  19. package/es/components/button/button_display/_button_display_content.js +1 -1
  20. package/es/components/button/button_empty/button_empty.js +1 -1
  21. package/es/components/button/button_group/button_group.js +1 -1
  22. package/es/components/button/button_group/button_group_button.js +1 -1
  23. package/es/components/button/button_icon/button_icon.js +1 -1
  24. package/es/components/call_out/call_out.js +1 -1
  25. package/es/components/card/card.js +1 -1
  26. package/es/components/card/card_select.js +1 -1
  27. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  28. package/es/components/color_picker/color_picker.js +1 -1
  29. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +7 -4
  30. package/es/components/comment_list/comment.js +17 -8
  31. package/es/components/comment_list/comment_event.js +2 -2
  32. package/es/components/comment_list/comment_list.js +12 -4
  33. package/es/components/comment_list/comment_timeline.js +20 -14
  34. package/es/components/context_menu/context_menu_panel.js +1 -1
  35. package/es/components/datagrid/body/data_grid_body.js +13 -13
  36. package/es/components/datagrid/body/data_grid_cell.js +24 -24
  37. package/es/components/datagrid/body/header/data_grid_header_cell.js +164 -68
  38. package/es/components/datagrid/body/header/data_grid_header_row.js +13 -13
  39. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  40. package/es/components/datagrid/data_grid.js +13 -13
  41. package/es/components/datagrid/utils/in_memory.js +12 -12
  42. package/es/components/date_picker/date_picker.js +2 -2
  43. package/es/components/date_picker/date_picker_range.js +1 -1
  44. package/es/components/empty_prompt/empty_prompt.js +1 -1
  45. package/es/components/error_boundary/error_boundary.js +18 -11
  46. package/es/components/error_boundary/error_boundary.styles.js +18 -0
  47. package/es/components/focus_trap/focus_trap.js +1 -0
  48. package/es/components/form/field_number/field_number.js +1 -1
  49. package/es/components/form/field_text/field_text.js +2 -2
  50. package/es/components/form/form.styles.js +11 -0
  51. package/es/components/form/form_control_layout/form_control_layout.js +2 -2
  52. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  53. package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  54. package/es/components/header/header_links/header_link.js +1 -1
  55. package/es/components/header/header_links/header_links.js +10 -8
  56. package/es/components/header/header_logo.js +1 -1
  57. package/es/components/icon/assets/tokenMetricCounter.js +38 -0
  58. package/es/components/icon/assets/tokenMetricGauge.js +38 -0
  59. package/es/components/icon/icon.js +1 -1
  60. package/es/components/icon/icon_map.js +38 -36
  61. package/es/components/image/image.js +71 -166
  62. package/es/components/image/image.styles.js +28 -0
  63. package/es/components/image/image_button.js +68 -0
  64. package/es/components/image/image_button.styles.js +41 -0
  65. package/es/components/image/image_caption.js +28 -0
  66. package/es/components/image/image_caption.styles.js +18 -0
  67. package/es/components/image/image_fullscreen_wrapper.js +100 -0
  68. package/es/components/image/image_fullscreen_wrapper.styles.js +26 -0
  69. package/es/components/image/image_types.js +10 -0
  70. package/es/components/image/image_wrapper.js +78 -0
  71. package/es/components/image/image_wrapper.styles.js +41 -0
  72. package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
  73. package/es/components/list_group/list_group.js +2 -2
  74. package/es/components/list_group/list_group_item.js +2 -2
  75. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  76. package/es/components/loading/loading_logo.js +1 -1
  77. package/es/components/markdown_editor/markdown_editor.js +1 -1
  78. package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  79. package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
  80. package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  81. package/es/components/notification/notification_event.js +2 -2
  82. package/es/components/notification/notification_event_meta.js +1 -1
  83. package/es/components/page/page_header/page_header.js +1 -1
  84. package/es/components/page/page_header/page_header_content.js +1 -1
  85. package/es/components/page/page_template.js +1 -1
  86. package/es/components/pagination/pagination_button.js +1 -1
  87. package/es/components/popover/input_popover.js +8 -4
  88. package/es/components/popover/popover.js +58 -148
  89. package/es/components/popover/popover.styles.js +15 -0
  90. package/es/components/popover/popover_arrow/_popover_arrow.js +40 -0
  91. package/es/components/popover/popover_arrow/_popover_arrow.styles.js +25 -0
  92. package/es/components/popover/popover_arrow/index.js +8 -0
  93. package/es/components/popover/popover_footer.js +15 -12
  94. package/es/components/popover/popover_footer.styles.js +19 -0
  95. package/es/components/popover/popover_panel/_popover_panel.js +114 -0
  96. package/es/components/popover/popover_panel/_popover_panel.styles.js +42 -0
  97. package/es/components/popover/popover_panel/index.js +8 -0
  98. package/es/components/popover/popover_title.js +15 -12
  99. package/es/components/popover/popover_title.styles.js +20 -0
  100. package/es/components/selectable/selectable.js +8 -9
  101. package/es/components/selectable/selectable_list/selectable_list.js +1 -1
  102. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  103. package/es/components/selectable/selectable_search/selectable_search.js +1 -6
  104. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +2 -2
  105. package/es/components/suggest/suggest.js +1 -5
  106. package/es/components/suggest/suggest_item.js +1 -1
  107. package/es/components/table/table_header_button.js +1 -1
  108. package/es/components/text/text.styles.js +1 -1
  109. package/es/components/text_diff/text_diff.js +5 -0
  110. package/es/components/text_diff/text_diff.styles.js +15 -0
  111. package/es/components/timeline/timeline_item_icon.js +1 -1
  112. package/es/components/toast/global_toast_list.js +1 -1
  113. package/es/components/toast/toast.js +1 -1
  114. package/es/components/token/token.js +1 -1
  115. package/es/components/token/token_map.js +115 -107
  116. package/es/components/tool_tip/icon_tip.js +1 -1
  117. package/es/components/tour/tour.js +6 -6
  118. package/es/components/tour/tour_step.js +6 -6
  119. package/es/global_styling/functions/logicals.js +22 -0
  120. package/es/global_styling/mixins/_responsive.js +46 -0
  121. package/es/global_styling/mixins/index.js +2 -1
  122. package/es/themes/amsterdam/global_styling/functions/shadows.js +1 -1
  123. package/es/themes/amsterdam/global_styling/mixins/shadow.js +13 -2
  124. package/eui.d.ts +411 -102
  125. package/i18ntokens.json +134 -38
  126. package/lib/components/accessibility/skip_link/skip_link.js +1 -1
  127. package/lib/components/avatar/avatar.js +1 -2
  128. package/lib/components/badge/badge.js +1 -1
  129. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  130. package/lib/components/basic_table/basic_table.js +1 -1
  131. package/lib/components/basic_table/collapsed_item_actions.js +1 -1
  132. package/lib/components/basic_table/in_memory_table.js +1 -1
  133. package/lib/components/button/_button_content_deprecated.js +1 -1
  134. package/lib/components/button/button.js +2 -2
  135. package/lib/components/button/button_display/_button_display.js +1 -1
  136. package/lib/components/button/button_display/_button_display_content.js +1 -1
  137. package/lib/components/button/button_empty/button_empty.js +1 -1
  138. package/lib/components/button/button_group/button_group.js +1 -1
  139. package/lib/components/button/button_group/button_group_button.js +1 -1
  140. package/lib/components/button/button_icon/button_icon.js +1 -1
  141. package/lib/components/call_out/call_out.js +1 -1
  142. package/lib/components/card/card.js +1 -1
  143. package/lib/components/card/card_select.js +1 -1
  144. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  145. package/lib/components/color_picker/color_picker.js +1 -1
  146. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +8 -5
  147. package/lib/components/comment_list/comment.js +17 -8
  148. package/lib/components/comment_list/comment_event.js +2 -2
  149. package/lib/components/comment_list/comment_list.js +12 -4
  150. package/lib/components/comment_list/comment_timeline.js +27 -14
  151. package/lib/components/context_menu/context_menu_panel.js +1 -1
  152. package/lib/components/datagrid/body/data_grid_body.js +13 -13
  153. package/lib/components/datagrid/body/data_grid_cell.js +24 -24
  154. package/lib/components/datagrid/body/header/data_grid_header_cell.js +166 -67
  155. package/lib/components/datagrid/body/header/data_grid_header_row.js +13 -13
  156. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  157. package/lib/components/datagrid/data_grid.js +13 -13
  158. package/lib/components/datagrid/utils/in_memory.js +12 -12
  159. package/lib/components/date_picker/date_picker.js +2 -2
  160. package/lib/components/date_picker/date_picker_range.js +1 -1
  161. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  162. package/lib/components/error_boundary/error_boundary.js +23 -13
  163. package/lib/components/error_boundary/error_boundary.styles.js +30 -0
  164. package/lib/components/focus_trap/focus_trap.js +1 -0
  165. package/lib/components/form/field_number/field_number.js +1 -1
  166. package/lib/components/form/field_text/field_text.js +2 -2
  167. package/lib/components/form/form.styles.js +20 -0
  168. package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
  169. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  170. package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  171. package/lib/components/header/header_links/header_link.js +1 -1
  172. package/lib/components/header/header_links/header_links.js +10 -8
  173. package/lib/components/header/header_logo.js +1 -1
  174. package/lib/components/icon/assets/tokenMetricCounter.js +45 -0
  175. package/lib/components/icon/assets/tokenMetricGauge.js +45 -0
  176. package/lib/components/icon/icon.js +1 -1
  177. package/lib/components/icon/icon_map.js +38 -36
  178. package/lib/components/icon/svgs/tokens/tokenMetricCounter.svg +3 -0
  179. package/lib/components/icon/svgs/tokens/tokenMetricGauge.svg +3 -0
  180. package/lib/components/image/image.js +73 -168
  181. package/lib/components/image/image.styles.js +40 -0
  182. package/lib/components/image/image_button.js +81 -0
  183. package/lib/components/image/image_button.styles.js +48 -0
  184. package/lib/components/image/image_caption.js +49 -0
  185. package/lib/components/image/image_caption.styles.js +30 -0
  186. package/lib/components/image/image_fullscreen_wrapper.js +117 -0
  187. package/lib/components/image/image_fullscreen_wrapper.styles.js +30 -0
  188. package/lib/components/image/image_types.js +18 -0
  189. package/lib/components/image/image_wrapper.js +91 -0
  190. package/lib/components/image/image_wrapper.styles.js +44 -0
  191. package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
  192. package/lib/components/list_group/list_group.js +2 -2
  193. package/lib/components/list_group/list_group_item.js +2 -2
  194. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  195. package/lib/components/loading/loading_logo.js +1 -1
  196. package/lib/components/markdown_editor/markdown_editor.js +1 -1
  197. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  198. package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
  199. package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  200. package/lib/components/notification/notification_event.js +2 -2
  201. package/lib/components/notification/notification_event_meta.js +1 -1
  202. package/lib/components/page/page_header/page_header.js +1 -1
  203. package/lib/components/page/page_header/page_header_content.js +1 -1
  204. package/lib/components/page/page_template.js +1 -1
  205. package/lib/components/popover/input_popover.js +8 -3
  206. package/lib/components/popover/popover.js +74 -165
  207. package/lib/components/popover/popover.styles.js +26 -0
  208. package/lib/components/popover/popover_arrow/_popover_arrow.js +51 -0
  209. package/lib/components/popover/popover_arrow/_popover_arrow.styles.js +38 -0
  210. package/lib/components/popover/popover_arrow/index.js +13 -0
  211. package/lib/components/popover/popover_footer.js +25 -15
  212. package/lib/components/popover/popover_footer.styles.js +30 -0
  213. package/lib/components/popover/popover_panel/_popover_panel.js +132 -0
  214. package/lib/components/popover/popover_panel/_popover_panel.styles.js +54 -0
  215. package/lib/components/popover/popover_panel/index.js +13 -0
  216. package/lib/components/popover/popover_title.js +25 -15
  217. package/lib/components/popover/popover_title.styles.js +32 -0
  218. package/lib/components/selectable/selectable.js +8 -9
  219. package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
  220. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  221. package/lib/components/selectable/selectable_search/selectable_search.js +0 -5
  222. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +2 -2
  223. package/lib/components/suggest/suggest.js +1 -5
  224. package/lib/components/suggest/suggest_item.js +1 -1
  225. package/lib/components/table/table_header_button.js +1 -1
  226. package/lib/components/text/text.styles.js +1 -1
  227. package/lib/components/text_diff/text_diff.js +7 -0
  228. package/lib/components/text_diff/text_diff.styles.js +25 -0
  229. package/lib/components/timeline/timeline_item_icon.js +1 -1
  230. package/lib/components/toast/global_toast_list.js +1 -1
  231. package/lib/components/toast/toast.js +1 -1
  232. package/lib/components/token/token.js +1 -1
  233. package/lib/components/token/token_map.js +115 -107
  234. package/lib/components/tool_tip/icon_tip.js +1 -1
  235. package/lib/global_styling/functions/logicals.js +30 -2
  236. package/lib/global_styling/mixins/_responsive.js +60 -0
  237. package/lib/global_styling/mixins/index.js +13 -0
  238. package/lib/themes/amsterdam/global_styling/functions/shadows.js +1 -1
  239. package/lib/themes/amsterdam/global_styling/mixins/shadow.js +13 -2
  240. package/optimize/es/components/avatar/avatar.js +0 -1
  241. package/optimize/es/components/color_picker/color_picker.js +1 -1
  242. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +7 -4
  243. package/optimize/es/components/comment_list/comment.js +5 -4
  244. package/optimize/es/components/comment_list/comment_timeline.js +10 -11
  245. package/optimize/es/components/context_menu/context_menu_panel.js +1 -1
  246. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +150 -54
  247. package/optimize/es/components/error_boundary/error_boundary.js +17 -10
  248. package/optimize/es/components/error_boundary/error_boundary.styles.js +18 -0
  249. package/optimize/es/components/focus_trap/focus_trap.js +1 -0
  250. package/optimize/es/components/form/form.styles.js +11 -0
  251. package/optimize/es/components/icon/assets/tokenMetricCounter.js +34 -0
  252. package/optimize/es/components/icon/assets/tokenMetricGauge.js +34 -0
  253. package/optimize/es/components/icon/icon_map.js +38 -36
  254. package/optimize/es/components/image/image.js +50 -154
  255. package/optimize/es/components/image/image.styles.js +28 -0
  256. package/optimize/es/components/image/image_button.js +56 -0
  257. package/optimize/es/components/image/image_button.styles.js +41 -0
  258. package/optimize/es/components/image/image_caption.js +24 -0
  259. package/optimize/es/components/image/image_caption.styles.js +18 -0
  260. package/optimize/es/components/image/image_fullscreen_wrapper.js +84 -0
  261. package/optimize/es/components/image/image_fullscreen_wrapper.styles.js +26 -0
  262. package/optimize/es/components/image/image_types.js +10 -0
  263. package/optimize/es/components/image/image_wrapper.js +62 -0
  264. package/optimize/es/components/image/image_wrapper.styles.js +41 -0
  265. package/optimize/es/components/popover/input_popover.js +8 -4
  266. package/optimize/es/components/popover/popover.js +41 -131
  267. package/optimize/es/components/popover/popover.styles.js +15 -0
  268. package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +29 -0
  269. package/optimize/es/components/popover/popover_arrow/_popover_arrow.styles.js +25 -0
  270. package/optimize/es/components/popover/popover_arrow/index.js +8 -0
  271. package/optimize/es/components/popover/popover_footer.js +15 -12
  272. package/optimize/es/components/popover/popover_footer.styles.js +19 -0
  273. package/optimize/es/components/popover/popover_panel/_popover_panel.js +55 -0
  274. package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +42 -0
  275. package/optimize/es/components/popover/popover_panel/index.js +8 -0
  276. package/optimize/es/components/popover/popover_title.js +15 -12
  277. package/optimize/es/components/popover/popover_title.styles.js +20 -0
  278. package/optimize/es/components/selectable/selectable.js +8 -9
  279. package/optimize/es/components/selectable/selectable_search/selectable_search.js +1 -6
  280. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  281. package/optimize/es/components/suggest/suggest.js +0 -4
  282. package/optimize/es/components/text/text.styles.js +1 -1
  283. package/optimize/es/components/text_diff/text_diff.js +5 -0
  284. package/optimize/es/components/text_diff/text_diff.styles.js +15 -0
  285. package/optimize/es/components/token/token_map.js +115 -107
  286. package/optimize/es/global_styling/functions/logicals.js +22 -0
  287. package/optimize/es/global_styling/mixins/_responsive.js +46 -0
  288. package/optimize/es/global_styling/mixins/index.js +2 -1
  289. package/optimize/es/themes/amsterdam/global_styling/functions/shadows.js +1 -1
  290. package/optimize/es/themes/amsterdam/global_styling/mixins/shadow.js +13 -2
  291. package/optimize/lib/components/avatar/avatar.js +0 -1
  292. package/optimize/lib/components/color_picker/color_picker.js +1 -1
  293. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +8 -5
  294. package/optimize/lib/components/comment_list/comment.js +5 -4
  295. package/optimize/lib/components/comment_list/comment_timeline.js +10 -11
  296. package/optimize/lib/components/context_menu/context_menu_panel.js +1 -1
  297. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +153 -54
  298. package/optimize/lib/components/error_boundary/error_boundary.js +20 -10
  299. package/optimize/lib/components/error_boundary/error_boundary.styles.js +30 -0
  300. package/optimize/lib/components/focus_trap/focus_trap.js +1 -0
  301. package/optimize/lib/components/form/form.styles.js +20 -0
  302. package/optimize/lib/components/icon/assets/tokenMetricCounter.js +44 -0
  303. package/optimize/lib/components/icon/assets/tokenMetricGauge.js +44 -0
  304. package/optimize/lib/components/icon/icon_map.js +38 -36
  305. package/optimize/lib/components/icon/svgs/tokens/tokenMetricCounter.svg +3 -0
  306. package/optimize/lib/components/icon/svgs/tokens/tokenMetricGauge.svg +3 -0
  307. package/optimize/lib/components/image/image.js +52 -156
  308. package/optimize/lib/components/image/image.styles.js +40 -0
  309. package/optimize/lib/components/image/image_button.js +68 -0
  310. package/optimize/lib/components/image/image_button.styles.js +48 -0
  311. package/optimize/lib/components/image/image_caption.js +42 -0
  312. package/optimize/lib/components/image/image_caption.styles.js +30 -0
  313. package/optimize/lib/components/image/image_fullscreen_wrapper.js +108 -0
  314. package/optimize/lib/components/image/image_fullscreen_wrapper.styles.js +32 -0
  315. package/optimize/lib/components/image/image_types.js +18 -0
  316. package/optimize/lib/components/image/image_wrapper.js +82 -0
  317. package/optimize/lib/components/image/image_wrapper.styles.js +44 -0
  318. package/optimize/lib/components/popover/input_popover.js +7 -3
  319. package/optimize/lib/components/popover/popover.js +60 -150
  320. package/optimize/lib/components/popover/popover.styles.js +26 -0
  321. package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +39 -0
  322. package/optimize/lib/components/popover/popover_arrow/_popover_arrow.styles.js +38 -0
  323. package/optimize/lib/components/popover/popover_arrow/index.js +13 -0
  324. package/optimize/lib/components/popover/popover_footer.js +26 -14
  325. package/optimize/lib/components/popover/popover_footer.styles.js +30 -0
  326. package/optimize/lib/components/popover/popover_panel/_popover_panel.js +74 -0
  327. package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +54 -0
  328. package/optimize/lib/components/popover/popover_panel/index.js +13 -0
  329. package/optimize/lib/components/popover/popover_title.js +26 -14
  330. package/optimize/lib/components/popover/popover_title.styles.js +32 -0
  331. package/optimize/lib/components/selectable/selectable.js +8 -8
  332. package/optimize/lib/components/selectable/selectable_search/selectable_search.js +0 -5
  333. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  334. package/optimize/lib/components/suggest/suggest.js +0 -4
  335. package/optimize/lib/components/text/text.styles.js +1 -1
  336. package/optimize/lib/components/text_diff/text_diff.js +7 -0
  337. package/optimize/lib/components/text_diff/text_diff.styles.js +25 -0
  338. package/optimize/lib/components/token/token_map.js +115 -107
  339. package/optimize/lib/global_styling/functions/logicals.js +30 -2
  340. package/optimize/lib/global_styling/mixins/_responsive.js +60 -0
  341. package/optimize/lib/global_styling/mixins/index.js +13 -0
  342. package/optimize/lib/themes/amsterdam/global_styling/functions/shadows.js +1 -1
  343. package/optimize/lib/themes/amsterdam/global_styling/mixins/shadow.js +13 -2
  344. package/package.json +2 -2
  345. package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +0 -4
  346. package/src/components/context_menu/_context_menu_panel.scss +2 -2
  347. package/src/components/index.scss +0 -4
  348. package/src/components/tour/_tour.scss +13 -9
  349. package/src/global_styling/mixins/_index.scss +0 -1
  350. package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -2
  351. package/src/themes/amsterdam/overrides/_index.scss +0 -2
  352. package/test-env/components/accessibility/skip_link/skip_link.js +1 -1
  353. package/test-env/components/avatar/avatar.js +1 -2
  354. package/test-env/components/badge/badge.js +1 -1
  355. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  356. package/test-env/components/basic_table/basic_table.js +1 -1
  357. package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
  358. package/test-env/components/basic_table/in_memory_table.js +1 -1
  359. package/test-env/components/button/_button_content_deprecated.js +1 -1
  360. package/test-env/components/button/button.js +2 -2
  361. package/test-env/components/button/button_display/_button_display.js +1 -1
  362. package/test-env/components/button/button_display/_button_display_content.js +1 -1
  363. package/test-env/components/button/button_empty/button_empty.js +1 -1
  364. package/test-env/components/button/button_group/button_group.js +1 -1
  365. package/test-env/components/button/button_group/button_group_button.js +1 -1
  366. package/test-env/components/button/button_icon/button_icon.js +1 -1
  367. package/test-env/components/call_out/call_out.js +1 -1
  368. package/test-env/components/card/card.js +1 -1
  369. package/test-env/components/card/card_select.js +1 -1
  370. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  371. package/test-env/components/color_picker/color_picker.js +1 -1
  372. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +8 -5
  373. package/test-env/components/comment_list/comment.js +17 -8
  374. package/test-env/components/comment_list/comment_event.js +2 -2
  375. package/test-env/components/comment_list/comment_list.js +12 -4
  376. package/test-env/components/comment_list/comment_timeline.js +20 -14
  377. package/test-env/components/context_menu/context_menu_panel.js +1 -1
  378. package/test-env/components/datagrid/body/data_grid_body.js +13 -13
  379. package/test-env/components/datagrid/body/data_grid_cell.js +24 -24
  380. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +166 -67
  381. package/test-env/components/datagrid/body/header/data_grid_header_row.js +13 -13
  382. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  383. package/test-env/components/datagrid/data_grid.js +13 -13
  384. package/test-env/components/datagrid/utils/in_memory.js +12 -12
  385. package/test-env/components/date_picker/date_picker.js +2 -2
  386. package/test-env/components/date_picker/date_picker_range.js +1 -1
  387. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  388. package/test-env/components/error_boundary/error_boundary.js +23 -13
  389. package/test-env/components/error_boundary/error_boundary.styles.js +30 -0
  390. package/test-env/components/form/field_number/field_number.js +1 -1
  391. package/test-env/components/form/field_text/field_text.js +2 -2
  392. package/test-env/components/form/form.styles.js +20 -0
  393. package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
  394. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  395. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  396. package/test-env/components/header/header_links/header_link.js +1 -1
  397. package/test-env/components/header/header_links/header_links.js +10 -8
  398. package/test-env/components/header/header_logo.js +1 -1
  399. package/test-env/components/icon/assets/tokenMetricCounter.js +44 -0
  400. package/test-env/components/icon/assets/tokenMetricGauge.js +44 -0
  401. package/test-env/components/icon/icon_map.js +38 -36
  402. package/test-env/components/image/image.js +73 -168
  403. package/test-env/components/image/image.styles.js +40 -0
  404. package/test-env/components/image/image_button.js +77 -0
  405. package/test-env/components/image/image_button.styles.js +48 -0
  406. package/test-env/components/image/image_caption.js +49 -0
  407. package/test-env/components/image/image_caption.styles.js +30 -0
  408. package/test-env/components/image/image_fullscreen_wrapper.js +114 -0
  409. package/test-env/components/image/image_fullscreen_wrapper.styles.js +32 -0
  410. package/test-env/components/image/image_types.js +18 -0
  411. package/test-env/components/image/image_wrapper.js +88 -0
  412. package/test-env/components/image/image_wrapper.styles.js +44 -0
  413. package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
  414. package/test-env/components/list_group/list_group.js +2 -2
  415. package/test-env/components/list_group/list_group_item.js +2 -2
  416. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  417. package/test-env/components/loading/loading_logo.js +1 -1
  418. package/test-env/components/markdown_editor/markdown_editor.js +1 -1
  419. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  420. package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
  421. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  422. package/test-env/components/notification/notification_event.js +2 -2
  423. package/test-env/components/notification/notification_event_meta.js +1 -1
  424. package/test-env/components/page/page_header/page_header.js +1 -1
  425. package/test-env/components/page/page_header/page_header_content.js +1 -1
  426. package/test-env/components/page/page_template.js +1 -1
  427. package/test-env/components/popover/input_popover.js +7 -3
  428. package/test-env/components/popover/popover.js +75 -166
  429. package/test-env/components/popover/popover.styles.js +26 -0
  430. package/test-env/components/popover/popover_arrow/_popover_arrow.js +47 -0
  431. package/test-env/components/popover/popover_arrow/_popover_arrow.styles.js +38 -0
  432. package/test-env/components/popover/popover_arrow/index.js +13 -0
  433. package/test-env/components/popover/popover_footer.js +26 -14
  434. package/test-env/components/popover/popover_footer.styles.js +30 -0
  435. package/test-env/components/popover/popover_panel/_popover_panel.js +119 -0
  436. package/test-env/components/popover/popover_panel/_popover_panel.styles.js +54 -0
  437. package/test-env/components/popover/popover_panel/index.js +13 -0
  438. package/test-env/components/popover/popover_title.js +26 -14
  439. package/test-env/components/popover/popover_title.styles.js +32 -0
  440. package/test-env/components/selectable/selectable.js +8 -8
  441. package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
  442. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  443. package/test-env/components/selectable/selectable_search/selectable_search.js +0 -5
  444. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +2 -2
  445. package/test-env/components/suggest/suggest.js +1 -5
  446. package/test-env/components/suggest/suggest_item.js +1 -1
  447. package/test-env/components/table/table_header_button.js +1 -1
  448. package/test-env/components/text/text.styles.js +1 -1
  449. package/test-env/components/text_diff/text_diff.js +7 -0
  450. package/test-env/components/text_diff/text_diff.styles.js +25 -0
  451. package/test-env/components/timeline/timeline_item_icon.js +1 -1
  452. package/test-env/components/toast/global_toast_list.js +1 -1
  453. package/test-env/components/toast/toast.js +1 -1
  454. package/test-env/components/token/token.js +1 -1
  455. package/test-env/components/token/token_map.js +115 -107
  456. package/test-env/components/tool_tip/icon_tip.js +1 -1
  457. package/test-env/global_styling/functions/logicals.js +30 -2
  458. package/test-env/global_styling/mixins/_responsive.js +60 -0
  459. package/test-env/global_styling/mixins/index.js +13 -0
  460. package/test-env/themes/amsterdam/global_styling/functions/shadows.js +1 -1
  461. package/test-env/themes/amsterdam/global_styling/mixins/shadow.js +13 -2
  462. package/src/components/error_boundary/_error_boundary.scss +0 -13
  463. package/src/components/error_boundary/_index.scss +0 -1
  464. package/src/components/image/_image.scss +0 -212
  465. package/src/components/image/_index.scss +0 -1
  466. package/src/components/popover/_index.scss +0 -5
  467. package/src/components/popover/_input_popover.scss +0 -7
  468. package/src/components/popover/_popover.scss +0 -182
  469. package/src/components/popover/_popover_footer.scss +0 -27
  470. package/src/components/popover/_popover_title.scss +0 -27
  471. package/src/components/popover/_variables.scss +0 -2
  472. package/src/components/text_diff/_index.scss +0 -1
  473. package/src/components/text_diff/_text_diff.scss +0 -9
  474. package/src/global_styling/mixins/_popover.scss +0 -19
  475. package/src/themes/amsterdam/global_styling/mixins/_popover.scss +0 -5
  476. package/src/themes/amsterdam/overrides/_image.scss +0 -10
  477. package/src/themes/amsterdam/overrides/_popover.scss +0 -104
@@ -120,6 +120,28 @@ export var logicalStyle = function logicalStyle(property, value) {
120
120
  return str.charAt(1).toUpperCase();
121
121
  });
122
122
  return _defineProperty({}, camelCasedProperty, "".concat(value));
123
+ };
124
+ /**
125
+ *
126
+ * @param width A string value for the LTR width
127
+ * @param height A string value for the LTR height
128
+ * @returns `string` Returns the logical CSS properties for height and width
129
+ */
130
+
131
+ export var logicalSizeCSS = function logicalSizeCSS(width, height) {
132
+ return "\n ".concat(logicals.width, ": ").concat(width, ";\n ").concat(logicals.height, ": ").concat(height, ";\n ");
133
+ };
134
+ /**
135
+ *
136
+ * @param width A string value for the LTR width
137
+ * @param height A string value for the LTR height
138
+ * @returns `object` Returns the logical CSS properties for height and width
139
+ */
140
+
141
+ export var logicalSizeStyle = function logicalSizeStyle(width, height) {
142
+ var _ref2;
143
+
144
+ return _ref2 = {}, _defineProperty(_ref2, logicals.width, width), _defineProperty(_ref2, logicals.height, height), _ref2;
123
145
  }; // Text alignment is separate because its the value that changes not the property
124
146
 
125
147
  export var logicalText = {
@@ -0,0 +1,46 @@
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
+ import { useEuiTheme } from '../../services/theme/hooks';
9
+ import { EuiThemeBreakpoints } from '../variables';
10
+ /**
11
+ * Generates a CSS media query rule string based on the input breakpoint ranges.
12
+ * Examples:
13
+ * euiBreakpoint(['s']) becomes `@media only screen and (min-width: 575px) and (max-width: 767px)`
14
+ * euiBreakpoint(['s', 'l']) becomes `@media only screen and (min-width: 575px) and (max-width: 1199px)`
15
+ *
16
+ * Use the `xs` and `xl` sizes to generate media queries with only min/max-width.
17
+ * Examples:
18
+ * euiBreakpoint(['xs', 'm']) becomes `@media only screen and (max-width: 991px)`
19
+ * euiBreakpoint(['l', 'xl']) becomes `@media only screen and (min-width: 992px)`
20
+ */
21
+
22
+ export var euiBreakpoint = function euiBreakpoint(_ref, sizes) {
23
+ var euiTheme = _ref.euiTheme;
24
+ // Ensure the array is in the correct ascending size order
25
+ var orderedSizes = sizes.sort(function (a, b) {
26
+ return EuiThemeBreakpoints.indexOf(a) - EuiThemeBreakpoints.indexOf(b);
27
+ });
28
+ var firstBreakpoint = orderedSizes[0];
29
+ var minBreakpointSize = euiTheme.breakpoint[firstBreakpoint];
30
+ var lastBreakpoint = orderedSizes[sizes.length - 1];
31
+ var maxBreakpointSize; // To get the correct screen range, we set the max-width
32
+ // to the next breakpoint size in the sizes array
33
+
34
+ if (lastBreakpoint !== 'xl') {
35
+ var nextBreakpoint = EuiThemeBreakpoints.indexOf(lastBreakpoint) + 1;
36
+ maxBreakpointSize = euiTheme.breakpoint[EuiThemeBreakpoints[nextBreakpoint]];
37
+ }
38
+
39
+ return ['@media only screen', minBreakpointSize ? "(min-width: ".concat(minBreakpointSize, "px)") : false, // If xs/0, don't render a min-width
40
+ maxBreakpointSize ? "(max-width: ".concat(maxBreakpointSize - 1, "px)") : false // If xl/undefined, don't render a max-width
41
+ ].filter(Boolean).join(' and ');
42
+ };
43
+ export var useEuiBreakpoint = function useEuiBreakpoint(sizes) {
44
+ var euiTheme = useEuiTheme();
45
+ return euiBreakpoint(euiTheme, sizes);
46
+ };
@@ -9,4 +9,5 @@ export * from './_color';
9
9
  export * from './_helpers';
10
10
  export * from './_padding';
11
11
  export * from './_states';
12
- export * from './_typography';
12
+ export * from './_typography';
13
+ export * from './_responsive';
@@ -11,6 +11,6 @@ import { COLOR_MODES_STANDARD } from '../../../../services/theme/types'; // Crea
11
11
  // of 1 for light themes and 2.5 for dark themes
12
12
 
13
13
  export var getShadowColor = function getShadowColor(color, opacity, colorMode) {
14
- var themeOpacity = colorMode === COLOR_MODES_STANDARD.dark ? opacity * 2.5 : opacity * 1;
14
+ var themeOpacity = colorMode === COLOR_MODES_STANDARD.dark ? opacity * 3.5 : opacity * 1;
15
15
  return chroma(color).alpha(themeOpacity).css();
16
16
  };
@@ -44,10 +44,21 @@ export var euiShadowMedium = function euiShadowMedium(_ref5) {
44
44
  colorMode = _ref5.colorMode;
45
45
 
46
46
  var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
47
- _color = _ref6.color;
47
+ _color = _ref6.color,
48
+ property = _ref6.property;
48
49
 
49
50
  var color = _color || euiTheme.colors.shadow;
50
- return "\nbox-shadow:\n 0 .9px 4px -1px ".concat(getShadowColor(color, 0.08, colorMode), ",\n 0 2.6px 8px -1px ").concat(getShadowColor(color, 0.06, colorMode), ",\n 0 5.7px 12px -1px ").concat(getShadowColor(color, 0.05, colorMode), ",\n 0 15px 15px -1px ").concat(getShadowColor(color, 0.04, colorMode), ";\n");
51
+ var array = ["0 .9px 4px ".concat(getShadowColor(color, 0.08, colorMode)), "0 2.6px 8px ".concat(getShadowColor(color, 0.06, colorMode)), "0 5.7px 12px ".concat(getShadowColor(color, 0.05, colorMode)), "0 15px 15px ".concat(getShadowColor(color, 0.04, colorMode))];
52
+
53
+ if (property === 'filter') {
54
+ return "filter: ".concat(array.reduce(function (v, i) {
55
+ return "".concat(v, " drop-shadow(").concat(i, ")");
56
+ }, ''), ";");
57
+ } else {
58
+ return "box-shadow: ".concat(array.map(function (v) {
59
+ return v;
60
+ }), ";");
61
+ }
51
62
  };
52
63
  /**
53
64
  * bottomShadow
@@ -95,7 +95,6 @@ var EuiAvatar = function EuiAvatar(_ref) {
95
95
  className: "euiAvatar__icon",
96
96
  size: iconSize || size,
97
97
  type: iconType,
98
- "aria-label": name,
99
98
  color: iconCustomColor === null ? undefined : iconCustomColor
100
99
  });
101
100
  }
@@ -536,7 +536,7 @@ var EuiColorPicker = function EuiColorPicker(_ref) {
536
536
  zIndex: popoverZIndex,
537
537
  className: popoverClass,
538
538
  panelClassName: panelClasses,
539
- display: button ? 'inlineBlock' : 'block',
539
+ display: button ? 'inline-block' : 'block',
540
540
  attachToAnchor: button ? false : true,
541
541
  anchorPosition: "downLeft",
542
542
  panelPaddingSize: "s",
@@ -37,8 +37,6 @@ var _flex = require("../../flex");
37
37
 
38
38
  var _highlight = require("../../highlight");
39
39
 
40
- var _panel = require("../../panel");
41
-
42
40
  var _text = require("../../text");
43
41
 
44
42
  var _loading = require("../../loading");
@@ -51,6 +49,8 @@ var _filter_select_item = require("../../filter_group/filter_select_item");
51
49
 
52
50
  var _badge = require("../../badge/");
53
51
 
52
+ var _popover_panel = require("../../popover/popover_panel");
53
+
54
54
  var _react2 = require("@emotion/react");
55
55
 
56
56
  var _excluded = ["key", "isGroupLabelOption", "label", "value"],
@@ -384,8 +384,8 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
384
384
  * But this should really be converted to user the popover component.
385
385
  */
386
386
 
387
- var classes = (0, _classnames.default)('euiComboBoxOptionsList', 'euiPopover__panel', 'euiPopover__panel-isAttached', 'euiPopover__panel-noArrow', 'euiPopover__panel-isOpen', "euiPopover__panel--".concat(position));
388
- return (0, _react2.jsx)(_panel.EuiPanel, (0, _extends2.default)({
387
+ var classes = (0, _classnames.default)('euiComboBoxOptionsList');
388
+ return (0, _react2.jsx)(_popover_panel.EuiPopoverPanel, (0, _extends2.default)({
389
389
  paddingSize: "none",
390
390
  hasShadow: false,
391
391
  className: classes,
@@ -393,7 +393,10 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
393
393
  "data-test-subj": "comboBoxOptionsList ".concat(dataTestSubj),
394
394
  style: _objectSpread(_objectSpread({}, style), {}, {
395
395
  zIndex: zIndex
396
- })
396
+ }),
397
+ isOpen: true,
398
+ isAttached: true,
399
+ position: position
397
400
  }, rest), (0, _react2.jsx)("div", {
398
401
  className: "euiComboBoxOptionsList__rowWrap"
399
402
  }, emptyState || optionsList));
@@ -23,7 +23,7 @@ var _comment_timeline = require("./comment_timeline");
23
23
 
24
24
  var _react2 = require("@emotion/react");
25
25
 
26
- var _excluded = ["children", "className", "username", "event", "actions", "timestamp", "timelineIcon", "eventColor", "eventIcon", "eventIconAriaLabel"];
26
+ var _excluded = ["children", "className", "username", "event", "actions", "timestamp", "timelineAvatar", "timelineAvatarAriaLabel", "eventColor", "eventIcon", "eventIconAriaLabel"];
27
27
 
28
28
  var EuiComment = function EuiComment(_ref) {
29
29
  var children = _ref.children,
@@ -32,7 +32,8 @@ var EuiComment = function EuiComment(_ref) {
32
32
  event = _ref.event,
33
33
  actions = _ref.actions,
34
34
  timestamp = _ref.timestamp,
35
- timelineIcon = _ref.timelineIcon,
35
+ timelineAvatar = _ref.timelineAvatar,
36
+ timelineAvatarAriaLabel = _ref.timelineAvatarAriaLabel,
36
37
  eventColor = _ref.eventColor,
37
38
  eventIcon = _ref.eventIcon,
38
39
  eventIconAriaLabel = _ref.eventIconAriaLabel,
@@ -41,8 +42,8 @@ var EuiComment = function EuiComment(_ref) {
41
42
  var isTypeUpdate = !children;
42
43
  var verticalAlign = isTypeUpdate ? 'center' : 'top';
43
44
  var mainIcon = (0, _react2.jsx)(_comment_timeline.EuiCommentTimeline, {
44
- username: username,
45
- timelineIcon: timelineIcon
45
+ timelineAvatar: timelineAvatar,
46
+ timelineAvatarAriaLabel: timelineAvatarAriaLabel
46
47
  });
47
48
  return (0, _react2.jsx)(_timeline.EuiTimelineItem, (0, _extends2.default)({
48
49
  verticalAlign: verticalAlign,
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.EuiCommentTimeline = void 0;
9
9
 
10
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
11
-
12
10
  var _react = _interopRequireDefault(require("react"));
13
11
 
14
12
  var _avatar = require("../avatar");
@@ -23,26 +21,27 @@ var _react2 = require("@emotion/react");
23
21
  * Side Public License, v 1.
24
22
  */
25
23
  var EuiCommentTimeline = function EuiCommentTimeline(_ref) {
26
- var timelineIcon = _ref.timelineIcon,
27
- username = _ref.username;
24
+ var timelineAvatar = _ref.timelineAvatar,
25
+ timelineAvatarAriaLabel = _ref.timelineAvatarAriaLabel;
28
26
  var iconRender;
29
27
  var avatarClassName = 'euiCommentAvatar';
30
- var iconIsString = typeof timelineIcon === 'string';
31
- var iconIsNode = (0, _typeof2.default)(timelineIcon) === 'object';
28
+ var iconIsString = typeof timelineAvatar === 'string';
32
29
 
33
30
  if (iconIsString) {
34
31
  iconRender = (0, _react2.jsx)(_avatar.EuiAvatar, {
35
32
  className: avatarClassName,
36
- name: username,
37
- iconType: timelineIcon,
33
+ name: timelineAvatarAriaLabel || '',
34
+ iconType: timelineAvatar,
38
35
  color: "subdued"
39
36
  });
40
- } else if (iconIsNode) {
41
- iconRender = timelineIcon;
37
+ } else if (timelineAvatar) {
38
+ iconRender = timelineAvatar;
42
39
  } else {
43
40
  iconRender = (0, _react2.jsx)(_avatar.EuiAvatar, {
44
41
  className: avatarClassName,
45
- name: username
42
+ name: timelineAvatarAriaLabel || '',
43
+ iconType: "userAvatar",
44
+ color: "subdued"
46
45
  });
47
46
  }
48
47
 
@@ -336,7 +336,7 @@ var EuiContextMenuPanel = /*#__PURE__*/function (_Component) {
336
336
  // If EuiContextMenu is used within an EuiPopover, we need to wait for EuiPopover to:
337
337
  // 1. Correctly set its `returnFocus` to the toggling button,
338
338
  // so focus is correctly restored to the popover toggle on close
339
- // 2. Finish its own `updateFocus()` call 350ms after transitioning in,
339
+ // 2. Finish its react-focus-on `autoFocus` behavior after transitioning in,
340
340
  // so the panel can handle its own focus without focus fighting
341
341
  if (this.initialPopoverParent) {
342
342
  this.initialPopoverParent.addEventListener('focus', this.reclaimPopoverFocus, {
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.usePopoverArrowNavigation = exports.EuiDataGridHeaderCell = void 0;
10
+ exports.useSortingUtils = exports.usePopoverArrowNavigation = exports.EuiDataGridHeaderCell = void 0;
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
@@ -76,9 +76,6 @@ var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
76
76
  var width = columnWidths[id] || defaultColumnWidth;
77
77
  var columnType = schema[id] ? schema[id].columnType : null;
78
78
  var classes = (0, _classnames2.default)((0, _defineProperty2.default)({}, "euiDataGridHeaderCell--".concat(columnType), columnType));
79
- var actionButtonAriaLabel = (0, _i18n.useEuiI18n)('euiDataGridHeaderCell.headerActions', 'Header actions');
80
- var ariaProps = {};
81
- var screenReaderId = (0, _accessibility.useGeneratedHtmlId)();
82
79
 
83
80
  var _useContext = (0, _react.useContext)(_focus.DataGridFocusContext),
84
81
  setFocusedCell = _useContext.setFocusedCell,
@@ -87,37 +84,6 @@ var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
87
84
  var _useContext2 = (0, _react.useContext)(_sorting.DataGridSortingContext),
88
85
  sorting = _useContext2.sorting;
89
86
 
90
- var sortString;
91
-
92
- if (sorting) {
93
- var sortedColumnIds = new Set(sorting.columns.map(function (_ref2) {
94
- var id = _ref2.id;
95
- return id;
96
- }));
97
-
98
- if (sortedColumnIds.has(id)) {
99
- if (sorting.columns.length === 1) {
100
- var sortDirection = sorting.columns[0].direction;
101
- var sortValue = 'other';
102
-
103
- if (sortDirection === 'asc') {
104
- sortValue = 'ascending';
105
- }
106
-
107
- if (sortDirection === 'desc') {
108
- sortValue = 'descending';
109
- }
110
-
111
- ariaProps['aria-sort'] = sortValue;
112
- } else {
113
- sortString = sorting.columns.map(function (col) {
114
- return "Sorted by ".concat(col.id, " ").concat(col.direction);
115
- }).join(' then ');
116
- ariaProps['aria-describedby'] = screenReaderId;
117
- }
118
- }
119
- }
120
-
121
87
  var _useState = (0, _react.useState)(false),
122
88
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
123
89
  isPopoverOpen = _useState2[0],
@@ -137,31 +103,39 @@ var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
137
103
  setFocusedCell: setFocusedCell
138
104
  });
139
105
  var showColumnActions = columnActions && columnActions.length > 0;
140
- var sortedColumn = sorting === null || sorting === void 0 ? void 0 : sorting.columns.find(function (col) {
141
- return col.id === id;
106
+
107
+ var _useSortingUtils = useSortingUtils({
108
+ sorting: sorting,
109
+ id: id,
110
+ showColumnActions: showColumnActions
111
+ }),
112
+ sortingArrow = _useSortingUtils.sortingArrow,
113
+ ariaSort = _useSortingUtils.ariaSort,
114
+ sortingScreenReaderText = _useSortingUtils.sortingScreenReaderText;
115
+
116
+ var sortingAriaId = (0, _accessibility.useGeneratedHtmlId)({
117
+ prefix: 'euiDataGridCellHeader',
118
+ suffix: 'sorting'
142
119
  });
143
- var sortingArrow = sortedColumn ? (0, _react2.jsx)(_icon.EuiIcon, {
144
- type: sortedColumn.direction === 'asc' ? 'sortUp' : 'sortDown',
145
- color: "text",
146
- className: "euiDataGridHeaderCell__sortingArrow",
147
- "data-test-subj": "dataGridHeaderCellSortingIcon-".concat(id)
148
- }) : null;
149
- return (0, _react2.jsx)(_data_grid_header_cell_wrapper.EuiDataGridHeaderCellWrapper, (0, _extends2.default)({
120
+ var actionsAriaId = (0, _accessibility.useGeneratedHtmlId)({
121
+ prefix: 'euiDataGridCellHeader',
122
+ suffix: 'actions'
123
+ });
124
+ return (0, _react2.jsx)(_data_grid_header_cell_wrapper.EuiDataGridHeaderCellWrapper, {
150
125
  id: id,
151
126
  index: index,
152
127
  width: width,
153
128
  headerIsInteractive: headerIsInteractive,
154
- className: classes
155
- }, ariaProps), column.isResizable !== false && width != null ? (0, _react2.jsx)(_data_grid_column_resizer.EuiDataGridColumnResizer, {
129
+ className: classes,
130
+ "aria-sort": ariaSort
131
+ }, column.isResizable !== false && width != null ? (0, _react2.jsx)(_data_grid_column_resizer.EuiDataGridColumnResizer, {
156
132
  columnId: id,
157
133
  columnWidth: width,
158
134
  setColumnWidth: setColumnWidth
159
- }) : null, sortString && (0, _react2.jsx)(_accessibility2.EuiScreenReaderOnly, null, (0, _react2.jsx)("div", {
160
- id: screenReaderId
161
- }, sortString)), !showColumnActions ? (0, _react2.jsx)(_react.default.Fragment, null, sortingArrow, (0, _react2.jsx)("div", {
135
+ }) : null, !showColumnActions ? (0, _react2.jsx)(_react.default.Fragment, null, sortingArrow, (0, _react2.jsx)("div", {
162
136
  className: "euiDataGridHeaderCell__content",
163
137
  title: displayAsText || id
164
- }, display || displayAsText || id)) : (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({
138
+ }, display || displayAsText || id), sortingScreenReaderText && (0, _react2.jsx)(_accessibility2.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", null, sortingScreenReaderText))) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({
165
139
  className: "eui-fullWidth",
166
140
  anchorClassName: "eui-fullWidth",
167
141
  panelPaddingSize: "none",
@@ -173,7 +147,8 @@ var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
173
147
  setIsPopoverOpen(function (isPopoverOpen) {
174
148
  return !isPopoverOpen;
175
149
  });
176
- }
150
+ },
151
+ "aria-describedby": "".concat(sortingAriaId, " ").concat(actionsAriaId)
177
152
  }, sortingArrow, (0, _react2.jsx)("div", {
178
153
  className: "euiDataGridHeaderCell__content",
179
154
  title: displayAsText || id
@@ -182,7 +157,6 @@ var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
182
157
  type: "arrowDown",
183
158
  size: "s",
184
159
  color: "text",
185
- "aria-label": actionButtonAriaLabel,
186
160
  "data-test-subj": "dataGridHeaderCellActionButton-".concat(id)
187
161
  })),
188
162
  isOpen: isPopoverOpen,
@@ -193,7 +167,132 @@ var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
193
167
  listItems: columnActions,
194
168
  gutterSize: "none",
195
169
  "data-test-subj": "dataGridHeaderCellActionGroup-".concat(id)
196
- })));
170
+ })), (0, _react2.jsx)("p", {
171
+ id: sortingAriaId,
172
+ hidden: true
173
+ }, sortingScreenReaderText), (0, _react2.jsx)("p", {
174
+ id: actionsAriaId,
175
+ hidden: true
176
+ }, (0, _react2.jsx)(_i18n.EuiI18n, {
177
+ token: "euiDataGridHeaderCell.headerActions",
178
+ default: "Click to view column header actions"
179
+ }))));
180
+ };
181
+ /**
182
+ * Column sorting utility helpers
183
+ */
184
+
185
+
186
+ exports.EuiDataGridHeaderCell = EuiDataGridHeaderCell;
187
+
188
+ var useSortingUtils = function useSortingUtils(_ref2) {
189
+ var _sorting$columns;
190
+
191
+ var sorting = _ref2.sorting,
192
+ id = _ref2.id,
193
+ showColumnActions = _ref2.showColumnActions;
194
+ var sortedColumn = (0, _react.useMemo)(function () {
195
+ return sorting === null || sorting === void 0 ? void 0 : sorting.columns.find(function (col) {
196
+ return col.id === id;
197
+ });
198
+ }, [sorting, id]);
199
+ var isColumnSorted = !!sortedColumn;
200
+ var hasOnlyOneSort = (sorting === null || sorting === void 0 ? void 0 : (_sorting$columns = sorting.columns) === null || _sorting$columns === void 0 ? void 0 : _sorting$columns.length) === 1;
201
+ /**
202
+ * Arrow icon
203
+ */
204
+
205
+ var sortingArrow = isColumnSorted ? (0, _react2.jsx)(_icon.EuiIcon, {
206
+ type: sortedColumn.direction === 'asc' ? 'sortUp' : 'sortDown',
207
+ color: "text",
208
+ className: "euiDataGridHeaderCell__sortingArrow",
209
+ "data-test-subj": "dataGridHeaderCellSortingIcon-".concat(id)
210
+ }) : null;
211
+ /**
212
+ * aria-sort attribute - should only be used when a single column is being sorted
213
+ * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort
214
+ * @see https://www.w3.org/WAI/ARIA/apg/example-index/table/sortable-table.html
215
+ * @see https://github.com/w3c/aria/issues/283 for potential future multi-column usage
216
+ */
217
+
218
+ var ariaSort = // eslint-disable-next-line no-nested-ternary
219
+ isColumnSorted && hasOnlyOneSort ? sorting.columns[0].direction === 'asc' ? 'ascending' : 'descending' : undefined;
220
+ /**
221
+ * Sorting status - screen reader text
222
+ */
223
+
224
+ var sortingScreenReaderText = (0, _react.useMemo)(function () {
225
+ var _sorting$columns2;
226
+
227
+ if (!isColumnSorted) return null;
228
+ if (!showColumnActions && hasOnlyOneSort) return null; // in this scenario, the `aria-sort` attribute will be used by screen readers
229
+
230
+ return (0, _react2.jsx)(_react.default.Fragment, null, sorting === null || sorting === void 0 ? void 0 : (_sorting$columns2 = sorting.columns) === null || _sorting$columns2 === void 0 ? void 0 : _sorting$columns2.map(function (_ref3, index) {
231
+ var columnId = _ref3.id,
232
+ direction = _ref3.direction;
233
+
234
+ if (hasOnlyOneSort) {
235
+ if (direction === 'asc') {
236
+ return (0, _react2.jsx)(_i18n.EuiI18n, {
237
+ token: "euiDataGridHeaderCell.sortedByAscendingSingle",
238
+ default: "Sorted ascending",
239
+ key: index
240
+ });
241
+ } else {
242
+ return (0, _react2.jsx)(_i18n.EuiI18n, {
243
+ token: "euiDataGridHeaderCell.sortedByDescendingSingle",
244
+ default: "Sorted descending",
245
+ key: index
246
+ });
247
+ }
248
+ } else if (index === 0) {
249
+ if (direction === 'asc') {
250
+ return (0, _react2.jsx)(_i18n.EuiI18n, {
251
+ token: "euiDataGridHeaderCell.sortedByAscendingFirst",
252
+ default: "Sorted by {columnId}, ascending",
253
+ values: {
254
+ columnId: columnId
255
+ },
256
+ key: index
257
+ });
258
+ } else {
259
+ return (0, _react2.jsx)(_i18n.EuiI18n, {
260
+ token: "euiDataGridHeaderCell.sortedByDescendingFirst",
261
+ default: "Sorted by {columnId}, descending",
262
+ values: {
263
+ columnId: columnId
264
+ },
265
+ key: index
266
+ });
267
+ }
268
+ } else {
269
+ if (direction === 'asc') {
270
+ return (0, _react2.jsx)(_i18n.EuiI18n, {
271
+ token: "euiDataGridHeaderCell.sortedByAscendingMultiple",
272
+ default: ", then sorted by {columnId}, ascending",
273
+ values: {
274
+ columnId: columnId
275
+ },
276
+ key: index
277
+ });
278
+ } else {
279
+ return (0, _react2.jsx)(_i18n.EuiI18n, {
280
+ token: "euiDataGridHeaderCell.sortedByDescendingMultiple",
281
+ default: ", then sorted by {columnId}, descending",
282
+ values: {
283
+ columnId: columnId
284
+ },
285
+ key: index
286
+ });
287
+ }
288
+ }
289
+ }), ".");
290
+ }, [isColumnSorted, showColumnActions, hasOnlyOneSort, sorting]);
291
+ return {
292
+ sortingArrow: sortingArrow,
293
+ ariaSort: ariaSort,
294
+ sortingScreenReaderText: sortingScreenReaderText
295
+ };
197
296
  };
198
297
  /**
199
298
  * Add keyboard arrow navigation to the cell actions popover
@@ -201,7 +300,7 @@ var EuiDataGridHeaderCell = function EuiDataGridHeaderCell(_ref) {
201
300
  */
202
301
 
203
302
 
204
- exports.EuiDataGridHeaderCell = EuiDataGridHeaderCell;
303
+ exports.useSortingUtils = useSortingUtils;
205
304
 
206
305
  var usePopoverArrowNavigation = function usePopoverArrowNavigation() {
207
306
  var popoverPanelRef = (0, _react.useRef)(null);
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.EuiErrorBoundary = void 0;
10
+ exports._EuiErrorBoundary = exports.EuiErrorBoundary = void 0;
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
@@ -33,9 +33,13 @@ var _code = require("../code");
33
33
 
34
34
  var _i18n = require("../i18n");
35
35
 
36
+ var _services = require("../../services");
37
+
38
+ var _error_boundary = require("./error_boundary.styles");
39
+
36
40
  var _react2 = require("@emotion/react");
37
41
 
38
- var _excluded = ["children", "data-test-subj"];
42
+ var _excluded = ["className", "children", "data-test-subj", "theme"];
39
43
 
40
44
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
41
45
 
@@ -45,15 +49,15 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
45
49
 
46
50
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
47
51
 
48
- var EuiErrorBoundary = /*#__PURE__*/function (_Component) {
49
- (0, _inherits2.default)(EuiErrorBoundary, _Component);
52
+ var _EuiErrorBoundary = /*#__PURE__*/function (_Component) {
53
+ (0, _inherits2.default)(_EuiErrorBoundary, _Component);
50
54
 
51
- var _super = _createSuper(EuiErrorBoundary);
55
+ var _super = _createSuper(_EuiErrorBoundary);
52
56
 
53
- function EuiErrorBoundary(props) {
57
+ function _EuiErrorBoundary(props) {
54
58
  var _this;
55
59
 
56
- (0, _classCallCheck2.default)(this, EuiErrorBoundary);
60
+ (0, _classCallCheck2.default)(this, _EuiErrorBoundary);
57
61
  _this = _super.call(this, props);
58
62
  var errorState = {
59
63
  hasError: false,
@@ -63,7 +67,7 @@ var EuiErrorBoundary = /*#__PURE__*/function (_Component) {
63
67
  return _this;
64
68
  }
65
69
 
66
- (0, _createClass2.default)(EuiErrorBoundary, [{
70
+ (0, _createClass2.default)(_EuiErrorBoundary, [{
67
71
  key: "componentDidCatch",
68
72
  value: function componentDidCatch(_ref) {
69
73
  var message = _ref.message,
@@ -83,15 +87,19 @@ var EuiErrorBoundary = /*#__PURE__*/function (_Component) {
83
87
  key: "render",
84
88
  value: function render() {
85
89
  var _this$props = this.props,
90
+ className = _this$props.className,
86
91
  children = _this$props.children,
87
92
  _dataTestSubj = _this$props['data-test-subj'],
93
+ theme = _this$props.theme,
88
94
  rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
89
95
  var dataTestSubj = (0, _classnames.default)('euiErrorBoundary', _dataTestSubj);
96
+ var styles = (0, _error_boundary.euiErrorBoundaryStyles)(theme);
90
97
 
91
98
  if (this.state.hasError) {
92
99
  // You can render any custom fallback UI
93
100
  return (0, _react2.jsx)("div", (0, _extends2.default)({
94
- className: "euiErrorBoundary",
101
+ css: styles.euiErrorBoundary,
102
+ className: (0, _classnames.default)('euiErrorBoundary', className),
95
103
  "data-test-subj": dataTestSubj
96
104
  }, rest), (0, _react2.jsx)(_code.EuiCodeBlock, null, (0, _react2.jsx)(_title.EuiTitle, {
97
105
  size: "xs"
@@ -104,7 +112,9 @@ var EuiErrorBoundary = /*#__PURE__*/function (_Component) {
104
112
  return children;
105
113
  }
106
114
  }]);
107
- return EuiErrorBoundary;
115
+ return _EuiErrorBoundary;
108
116
  }(_react.Component);
109
117
 
118
+ exports._EuiErrorBoundary = _EuiErrorBoundary;
119
+ var EuiErrorBoundary = (0, _services.withEuiTheme)(_EuiErrorBoundary);
110
120
  exports.EuiErrorBoundary = EuiErrorBoundary;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiErrorBoundaryStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ var _services = require("../../services");
13
+
14
+ /*
15
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
+ * or more contributor license agreements. Licensed under the Elastic License
17
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
18
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
19
+ * Side Public License, v 1.
20
+ */
21
+ var euiErrorBoundaryStyles = function euiErrorBoundaryStyles(_ref) {
22
+ var euiTheme = _ref.euiTheme;
23
+ var color1 = (0, _services.transparentize)(euiTheme.colors.danger, 0.25);
24
+ var color2 = (0, _services.transparentize)(euiTheme.colors.danger, 0.05);
25
+ return {
26
+ euiErrorBoundary: /*#__PURE__*/(0, _react.css)("background-image:repeating-linear-gradient(\n 45deg,\n ", color1, ",\n ", color1, " 1px,\n ", color2, " 1px,\n ", color2, " 19px\n );background-size:54px 54px;", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.base), ";;label:euiErrorBoundary;")
27
+ };
28
+ };
29
+
30
+ exports.euiErrorBoundaryStyles = euiErrorBoundaryStyles;
@@ -68,6 +68,7 @@ var EuiFocusTrap = /*#__PURE__*/function (_Component) {
68
68
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastInterceptedEvent", null);
69
69
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "preventFocusExit", false);
70
70
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setInitialFocus", function (initialFocus) {
71
+ if (!initialFocus) return;
71
72
  var node = (0, _services.findElementBySelectorOrRef)(initialFocus);
72
73
  if (!node) return; // `data-autofocus` is part of the 'react-focus-on' API
73
74