@elastic/eui 108.0.0 → 109.1.0-snapshot.1763390960850

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 (405) hide show
  1. package/es/components/accessibility/skip_link/skip_link.js +10 -1
  2. package/es/components/basic_table/collapsed_item_actions.js +3 -1
  3. package/es/components/basic_table/default_item_action.js +7 -4
  4. package/es/components/bottom_bar/bottom_bar.js +12 -2
  5. package/es/components/button/button.js +20 -25
  6. package/es/components/button/button_display/_button_display.js +32 -30
  7. package/es/components/button/button_display/_button_display.styles.js +4 -4
  8. package/es/components/button/button_empty/button_empty.js +32 -14
  9. package/es/components/button/button_group/button_group.js +49 -31
  10. package/es/components/button/button_group/button_group_button.js +16 -5
  11. package/es/components/button/button_group/button_group_button.styles.js +12 -8
  12. package/es/components/button/button_icon/button_icon.js +30 -6
  13. package/es/components/card/card.js +20 -25
  14. package/es/components/card/card_select/card_select.js +20 -25
  15. package/es/components/code/code_block_virtualized.js +9 -7
  16. package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
  17. package/es/components/datagrid/body/cell/data_grid_cell.js +35 -12
  18. package/es/components/datagrid/body/data_grid_body.js +23 -6
  19. package/es/components/datagrid/body/data_grid_body_custom.js +23 -6
  20. package/es/components/datagrid/body/data_grid_body_virtualized.js +23 -6
  21. package/es/components/datagrid/body/header/column_actions.js +5 -21
  22. package/es/components/datagrid/body/header/data_grid_header_cell.js +29 -10
  23. package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -2
  24. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
  25. package/es/components/datagrid/controls/column_selector.js +36 -19
  26. package/es/components/datagrid/controls/column_sorting.js +23 -6
  27. package/es/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
  28. package/es/components/datagrid/data_grid.js +5 -1
  29. package/es/components/datagrid/utils/in_memory.js +25 -7
  30. package/es/components/date_picker/auto_refresh/auto_refresh.js +11 -2
  31. package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +31 -5
  32. package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
  33. package/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
  34. package/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
  35. package/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +98 -0
  36. package/es/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +19 -0
  37. package/es/components/date_picker/super_date_picker/pretty_duration.js +1 -8
  38. package/es/components/date_picker/super_date_picker/relative_utils.js +8 -0
  39. package/es/components/date_picker/super_date_picker/super_date_picker.js +118 -26
  40. package/es/components/date_picker/super_date_picker/time_window_buttons.js +185 -0
  41. package/es/components/facet/facet_button.js +9 -19
  42. package/es/components/filter_group/filter_button.js +14 -1
  43. package/es/components/flyout/flyout.js +27 -10
  44. package/es/components/form/file_picker/file_picker.styles.js +3 -3
  45. package/es/components/form/form_control_button/form_control_button.js +13 -7
  46. package/es/components/header/header_links/header_link.js +13 -7
  47. package/es/components/header/header_section/header_section_item_button.js +13 -7
  48. package/es/components/icon/assets/boxes_vertical.js +1 -1
  49. package/es/components/icon/assets/checkInCircleFilled.js +1 -2
  50. package/es/components/icon/assets/errorFilled.js +1 -2
  51. package/es/components/icon/assets/paper_clip.js +1 -1
  52. package/es/components/icon/assets/streams_wired.js +3 -2
  53. package/es/components/icon/assets/warningFilled.js +1 -2
  54. package/es/components/icon/icon_map.js +3 -6
  55. package/es/components/list_group/list_group.js +13 -1
  56. package/es/components/list_group/list_group_item.js +13 -1
  57. package/es/components/list_group/list_group_item_extra_action.js +13 -1
  58. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
  59. package/es/components/overlay_mask/overlay_mask.styles.js +1 -1
  60. package/es/components/pagination/pagination_button.js +13 -7
  61. package/es/components/popover/popover.js +22 -16
  62. package/es/components/provider/component_defaults/component_defaults.js +22 -2
  63. package/es/components/table/table_row.styles.js +1 -1
  64. package/es/components/tool_tip/tool_tip.js +24 -24
  65. package/es/global_styling/index.js +2 -1
  66. package/es/global_styling/mixins/_button.js +1 -1
  67. package/es/global_styling/utility/selectors.js +9 -0
  68. package/es/services/focus_trap/focus_trap_pub_sub.js +74 -0
  69. package/es/services/focus_trap/index.js +9 -0
  70. package/es/services/hooks/index.js +2 -1
  71. package/es/services/hooks/useEuiDisabledElement.js +195 -0
  72. package/es/services/index.js +1 -0
  73. package/es/services/popover/reposition_on_scroll.js +61 -0
  74. package/es/services/theme/high_contrast_overrides.js +5 -1
  75. package/es/test/cypress/index.d.ts +12 -0
  76. package/es/test/cypress/index.js +9 -0
  77. package/es/test/cypress/matchers.d.ts +20 -0
  78. package/es/test/cypress/matchers.js +54 -0
  79. package/es/test/cypress/test_reposition_on_scroll.js +66 -0
  80. package/es/test/enzyme/enzyme_matchers.d.ts +36 -0
  81. package/es/test/enzyme/enzyme_matchers.js +43 -0
  82. package/es/test/enzyme/index.d.ts +14 -0
  83. package/es/test/enzyme/index.js +10 -0
  84. package/es/test/rtl/index.d.ts +9 -1
  85. package/es/test/rtl/index.js +2 -1
  86. package/es/test/rtl/matchers.d.ts +36 -0
  87. package/es/test/rtl/matchers.js +82 -0
  88. package/es/utils/element_can_be_disabled.js +16 -0
  89. package/es/utils/index.js +2 -1
  90. package/eui.d.ts +604 -183
  91. package/i18ntokens.json +1357 -1231
  92. package/lib/components/accessibility/skip_link/skip_link.js +10 -1
  93. package/lib/components/basic_table/collapsed_item_actions.js +3 -1
  94. package/lib/components/basic_table/default_item_action.js +7 -4
  95. package/lib/components/bottom_bar/bottom_bar.js +11 -1
  96. package/lib/components/button/button.js +21 -26
  97. package/lib/components/button/button_display/_button_display.js +31 -29
  98. package/lib/components/button/button_display/_button_display.styles.js +4 -4
  99. package/lib/components/button/button_empty/button_empty.js +31 -13
  100. package/lib/components/button/button_group/button_group.js +49 -31
  101. package/lib/components/button/button_group/button_group_button.js +16 -5
  102. package/lib/components/button/button_group/button_group_button.styles.js +10 -6
  103. package/lib/components/button/button_icon/button_icon.js +29 -5
  104. package/lib/components/card/card.js +21 -26
  105. package/lib/components/card/card_select/card_select.js +21 -26
  106. package/lib/components/code/code_block_virtualized.js +9 -7
  107. package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
  108. package/lib/components/datagrid/body/cell/data_grid_cell.js +35 -12
  109. package/lib/components/datagrid/body/data_grid_body.js +23 -6
  110. package/lib/components/datagrid/body/data_grid_body_custom.js +23 -6
  111. package/lib/components/datagrid/body/data_grid_body_virtualized.js +23 -6
  112. package/lib/components/datagrid/body/header/column_actions.js +5 -21
  113. package/lib/components/datagrid/body/header/data_grid_header_cell.js +29 -10
  114. package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
  115. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
  116. package/lib/components/datagrid/controls/column_selector.js +36 -19
  117. package/lib/components/datagrid/controls/column_sorting.js +23 -6
  118. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
  119. package/lib/components/datagrid/data_grid.js +5 -1
  120. package/lib/components/datagrid/utils/in_memory.js +25 -7
  121. package/lib/components/date_picker/auto_refresh/auto_refresh.js +12 -3
  122. package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +30 -4
  123. package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
  124. package/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
  125. package/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
  126. package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +104 -0
  127. package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
  128. package/lib/components/date_picker/super_date_picker/pretty_duration.js +2 -9
  129. package/lib/components/date_picker/super_date_picker/relative_utils.js +9 -0
  130. package/lib/components/date_picker/super_date_picker/super_date_picker.js +118 -26
  131. package/lib/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
  132. package/lib/components/facet/facet_button.js +9 -19
  133. package/lib/components/filter_group/filter_button.js +14 -1
  134. package/lib/components/flyout/flyout.js +26 -9
  135. package/lib/components/form/file_picker/file_picker.styles.js +3 -3
  136. package/lib/components/form/form_control_button/form_control_button.js +13 -7
  137. package/lib/components/header/header_links/header_link.js +13 -7
  138. package/lib/components/header/header_section/header_section_item_button.js +13 -7
  139. package/lib/components/icon/assets/boxes_vertical.js +1 -1
  140. package/lib/components/icon/assets/checkInCircleFilled.js +1 -2
  141. package/lib/components/icon/assets/errorFilled.js +1 -2
  142. package/lib/components/icon/assets/paper_clip.js +1 -1
  143. package/lib/components/icon/assets/streams_wired.js +3 -2
  144. package/lib/components/icon/assets/warningFilled.js +1 -2
  145. package/lib/components/icon/icon_map.js +3 -6
  146. package/lib/components/icon/svgs/boxes_vertical.svg +1 -1
  147. package/lib/components/icon/svgs/checkInCircleFilled.svg +1 -1
  148. package/lib/components/icon/svgs/errorFilled.svg +1 -1
  149. package/lib/components/icon/svgs/paper_clip.svg +3 -3
  150. package/lib/components/icon/svgs/warningFilled.svg +1 -1
  151. package/lib/components/list_group/list_group.js +13 -1
  152. package/lib/components/list_group/list_group_item.js +13 -1
  153. package/lib/components/list_group/list_group_item_extra_action.js +13 -1
  154. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
  155. package/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
  156. package/lib/components/pagination/pagination_button.js +13 -7
  157. package/lib/components/popover/popover.js +21 -15
  158. package/lib/components/provider/component_defaults/component_defaults.js +22 -2
  159. package/lib/components/table/table_row.styles.js +1 -1
  160. package/lib/components/tool_tip/tool_tip.js +24 -24
  161. package/lib/global_styling/index.js +16 -1
  162. package/lib/global_styling/mixins/_button.js +1 -1
  163. package/lib/global_styling/utility/selectors.js +15 -0
  164. package/lib/services/focus_trap/focus_trap_pub_sub.js +80 -0
  165. package/lib/services/focus_trap/index.js +12 -0
  166. package/lib/services/hooks/index.js +18 -1
  167. package/lib/services/hooks/useEuiDisabledElement.js +199 -0
  168. package/lib/services/index.js +8 -0
  169. package/lib/services/popover/reposition_on_scroll.js +67 -0
  170. package/lib/services/theme/high_contrast_overrides.js +5 -1
  171. package/lib/test/cypress/index.d.ts +12 -0
  172. package/lib/test/cypress/index.js +18 -0
  173. package/lib/test/cypress/matchers.d.ts +20 -0
  174. package/lib/test/cypress/matchers.js +61 -0
  175. package/lib/test/cypress/test_reposition_on_scroll.js +69 -0
  176. package/lib/test/enzyme/enzyme_matchers.d.ts +36 -0
  177. package/lib/test/enzyme/enzyme_matchers.js +49 -0
  178. package/lib/test/enzyme/index.d.ts +14 -0
  179. package/lib/test/enzyme/index.js +24 -0
  180. package/lib/test/rtl/index.d.ts +9 -1
  181. package/lib/test/rtl/index.js +24 -2
  182. package/lib/test/rtl/matchers.d.ts +36 -0
  183. package/lib/test/rtl/matchers.js +86 -0
  184. package/lib/utils/element_can_be_disabled.js +22 -0
  185. package/lib/utils/index.js +14 -1
  186. package/optimize/es/components/basic_table/collapsed_item_actions.js +3 -1
  187. package/optimize/es/components/basic_table/default_item_action.js +7 -4
  188. package/optimize/es/components/bottom_bar/bottom_bar.js +12 -2
  189. package/optimize/es/components/button/button_display/_button_display.js +24 -12
  190. package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
  191. package/optimize/es/components/button/button_empty/button_empty.js +18 -6
  192. package/optimize/es/components/button/button_group/button_group.js +10 -5
  193. package/optimize/es/components/button/button_group/button_group_button.js +2 -3
  194. package/optimize/es/components/button/button_group/button_group_button.styles.js +12 -8
  195. package/optimize/es/components/button/button_icon/button_icon.js +17 -5
  196. package/optimize/es/components/code/code_block_virtualized.js +9 -7
  197. package/optimize/es/components/datagrid/body/header/column_actions.js +5 -21
  198. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +6 -4
  199. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -2
  200. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -2
  201. package/optimize/es/components/datagrid/controls/column_selector.js +36 -19
  202. package/optimize/es/components/datagrid/data_grid.js +5 -1
  203. package/optimize/es/components/datagrid/utils/in_memory.js +2 -1
  204. package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -4
  205. package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +5 -2
  206. package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +7 -3
  207. package/optimize/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +10 -2
  208. package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +97 -0
  209. package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +19 -0
  210. package/optimize/es/components/date_picker/super_date_picker/pretty_duration.js +1 -8
  211. package/optimize/es/components/date_picker/super_date_picker/relative_utils.js +8 -0
  212. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +49 -25
  213. package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +185 -0
  214. package/optimize/es/components/flyout/flyout.js +27 -10
  215. package/optimize/es/components/form/file_picker/file_picker.styles.js +3 -3
  216. package/optimize/es/components/icon/assets/boxes_vertical.js +1 -1
  217. package/optimize/es/components/icon/assets/checkInCircleFilled.js +1 -2
  218. package/optimize/es/components/icon/assets/errorFilled.js +1 -2
  219. package/optimize/es/components/icon/assets/paper_clip.js +1 -1
  220. package/optimize/es/components/icon/assets/streams_wired.js +3 -2
  221. package/optimize/es/components/icon/assets/warningFilled.js +1 -2
  222. package/optimize/es/components/icon/icon_map.js +3 -6
  223. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -1
  224. package/optimize/es/components/popover/popover.js +22 -16
  225. package/optimize/es/components/table/table_row.styles.js +1 -1
  226. package/optimize/es/components/tool_tip/tool_tip.js +24 -24
  227. package/optimize/es/global_styling/index.js +2 -1
  228. package/optimize/es/global_styling/mixins/_button.js +1 -1
  229. package/optimize/es/global_styling/utility/selectors.js +9 -0
  230. package/optimize/es/services/focus_trap/focus_trap_pub_sub.js +74 -0
  231. package/optimize/es/services/focus_trap/index.js +9 -0
  232. package/optimize/es/services/hooks/index.js +2 -1
  233. package/optimize/es/services/hooks/useEuiDisabledElement.js +192 -0
  234. package/optimize/es/services/index.js +1 -0
  235. package/optimize/es/services/popover/reposition_on_scroll.js +61 -0
  236. package/optimize/es/services/theme/high_contrast_overrides.js +5 -1
  237. package/optimize/es/test/cypress/index.d.ts +12 -0
  238. package/optimize/es/test/cypress/index.js +9 -0
  239. package/optimize/es/test/cypress/matchers.d.ts +20 -0
  240. package/optimize/es/test/cypress/matchers.js +54 -0
  241. package/optimize/es/test/cypress/test_reposition_on_scroll.js +63 -0
  242. package/optimize/es/test/enzyme/enzyme_matchers.d.ts +36 -0
  243. package/optimize/es/test/enzyme/enzyme_matchers.js +43 -0
  244. package/optimize/es/test/enzyme/index.d.ts +14 -0
  245. package/optimize/es/test/enzyme/index.js +10 -0
  246. package/optimize/es/test/rtl/index.d.ts +9 -1
  247. package/optimize/es/test/rtl/index.js +2 -1
  248. package/optimize/es/test/rtl/matchers.d.ts +36 -0
  249. package/optimize/es/test/rtl/matchers.js +82 -0
  250. package/optimize/es/utils/element_can_be_disabled.js +16 -0
  251. package/optimize/es/utils/index.js +2 -1
  252. package/optimize/lib/components/basic_table/collapsed_item_actions.js +3 -1
  253. package/optimize/lib/components/basic_table/default_item_action.js +7 -4
  254. package/optimize/lib/components/bottom_bar/bottom_bar.js +11 -1
  255. package/optimize/lib/components/button/button_display/_button_display.js +23 -11
  256. package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
  257. package/optimize/lib/components/button/button_empty/button_empty.js +17 -5
  258. package/optimize/lib/components/button/button_group/button_group.js +10 -5
  259. package/optimize/lib/components/button/button_group/button_group_button.js +2 -3
  260. package/optimize/lib/components/button/button_group/button_group_button.styles.js +10 -6
  261. package/optimize/lib/components/button/button_icon/button_icon.js +16 -4
  262. package/optimize/lib/components/code/code_block_virtualized.js +9 -7
  263. package/optimize/lib/components/datagrid/body/header/column_actions.js +5 -21
  264. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -4
  265. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
  266. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -2
  267. package/optimize/lib/components/datagrid/controls/column_selector.js +36 -19
  268. package/optimize/lib/components/datagrid/data_grid.js +5 -1
  269. package/optimize/lib/components/datagrid/utils/in_memory.js +2 -1
  270. package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +11 -3
  271. package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +5 -2
  272. package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +7 -3
  273. package/optimize/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +10 -2
  274. package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +103 -0
  275. package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
  276. package/optimize/lib/components/date_picker/super_date_picker/pretty_duration.js +2 -9
  277. package/optimize/lib/components/date_picker/super_date_picker/relative_utils.js +9 -0
  278. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +49 -25
  279. package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
  280. package/optimize/lib/components/flyout/flyout.js +26 -9
  281. package/optimize/lib/components/form/file_picker/file_picker.styles.js +3 -3
  282. package/optimize/lib/components/icon/assets/boxes_vertical.js +1 -1
  283. package/optimize/lib/components/icon/assets/checkInCircleFilled.js +1 -2
  284. package/optimize/lib/components/icon/assets/errorFilled.js +1 -2
  285. package/optimize/lib/components/icon/assets/paper_clip.js +1 -1
  286. package/optimize/lib/components/icon/assets/streams_wired.js +3 -2
  287. package/optimize/lib/components/icon/assets/warningFilled.js +1 -2
  288. package/optimize/lib/components/icon/icon_map.js +3 -6
  289. package/optimize/lib/components/icon/svgs/boxes_vertical.svg +1 -1
  290. package/optimize/lib/components/icon/svgs/checkInCircleFilled.svg +1 -1
  291. package/optimize/lib/components/icon/svgs/errorFilled.svg +1 -1
  292. package/optimize/lib/components/icon/svgs/paper_clip.svg +3 -3
  293. package/optimize/lib/components/icon/svgs/warningFilled.svg +1 -1
  294. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
  295. package/optimize/lib/components/popover/popover.js +21 -15
  296. package/optimize/lib/components/table/table_row.styles.js +1 -1
  297. package/optimize/lib/components/tool_tip/tool_tip.js +24 -24
  298. package/optimize/lib/global_styling/index.js +16 -1
  299. package/optimize/lib/global_styling/mixins/_button.js +1 -1
  300. package/optimize/lib/global_styling/utility/selectors.js +15 -0
  301. package/optimize/lib/services/focus_trap/focus_trap_pub_sub.js +80 -0
  302. package/optimize/lib/services/focus_trap/index.js +12 -0
  303. package/optimize/lib/services/hooks/index.js +18 -1
  304. package/optimize/lib/services/hooks/useEuiDisabledElement.js +197 -0
  305. package/optimize/lib/services/index.js +8 -0
  306. package/optimize/lib/services/popover/reposition_on_scroll.js +67 -0
  307. package/optimize/lib/services/theme/high_contrast_overrides.js +5 -1
  308. package/optimize/lib/test/cypress/index.d.ts +12 -0
  309. package/optimize/lib/test/cypress/index.js +18 -0
  310. package/optimize/lib/test/cypress/matchers.d.ts +20 -0
  311. package/optimize/lib/test/cypress/matchers.js +61 -0
  312. package/optimize/lib/test/cypress/test_reposition_on_scroll.js +70 -0
  313. package/optimize/lib/test/enzyme/enzyme_matchers.d.ts +36 -0
  314. package/optimize/lib/test/enzyme/enzyme_matchers.js +50 -0
  315. package/optimize/lib/test/enzyme/index.d.ts +14 -0
  316. package/optimize/lib/test/enzyme/index.js +24 -0
  317. package/optimize/lib/test/rtl/index.d.ts +9 -1
  318. package/optimize/lib/test/rtl/index.js +24 -2
  319. package/optimize/lib/test/rtl/matchers.d.ts +36 -0
  320. package/optimize/lib/test/rtl/matchers.js +86 -0
  321. package/optimize/lib/utils/element_can_be_disabled.js +22 -0
  322. package/optimize/lib/utils/index.js +14 -1
  323. package/package.json +6 -5
  324. package/test-env/components/accessibility/skip_link/skip_link.js +10 -1
  325. package/test-env/components/basic_table/collapsed_item_actions.js +3 -1
  326. package/test-env/components/basic_table/default_item_action.js +7 -4
  327. package/test-env/components/bottom_bar/bottom_bar.js +11 -1
  328. package/test-env/components/button/button.js +21 -26
  329. package/test-env/components/button/button_display/_button_display.js +31 -29
  330. package/test-env/components/button/button_display/_button_display.styles.js +4 -4
  331. package/test-env/components/button/button_empty/button_empty.js +31 -13
  332. package/test-env/components/button/button_group/button_group.js +49 -31
  333. package/test-env/components/button/button_group/button_group_button.js +16 -5
  334. package/test-env/components/button/button_group/button_group_button.styles.js +10 -6
  335. package/test-env/components/button/button_icon/button_icon.js +29 -5
  336. package/test-env/components/card/card.js +21 -26
  337. package/test-env/components/card/card_select/card_select.js +21 -26
  338. package/test-env/components/code/code_block_virtualized.js +9 -7
  339. package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
  340. package/test-env/components/datagrid/body/cell/data_grid_cell.js +35 -12
  341. package/test-env/components/datagrid/body/data_grid_body.js +23 -6
  342. package/test-env/components/datagrid/body/data_grid_body_custom.js +23 -6
  343. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +23 -6
  344. package/test-env/components/datagrid/body/header/column_actions.js +5 -21
  345. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +29 -10
  346. package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +8 -1
  347. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +5 -2
  348. package/test-env/components/datagrid/controls/column_selector.js +36 -19
  349. package/test-env/components/datagrid/controls/column_sorting.js +23 -6
  350. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
  351. package/test-env/components/datagrid/data_grid.js +5 -1
  352. package/test-env/components/datagrid/utils/in_memory.js +25 -7
  353. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +12 -3
  354. package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +30 -4
  355. package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
  356. package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
  357. package/test-env/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
  358. package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.js +103 -0
  359. package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
  360. package/test-env/components/date_picker/super_date_picker/pretty_duration.js +2 -9
  361. package/test-env/components/date_picker/super_date_picker/relative_utils.js +9 -0
  362. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +118 -26
  363. package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
  364. package/test-env/components/facet/facet_button.js +9 -19
  365. package/test-env/components/filter_group/filter_button.js +14 -1
  366. package/test-env/components/form/file_picker/file_picker.styles.js +3 -3
  367. package/test-env/components/form/form_control_button/form_control_button.js +13 -7
  368. package/test-env/components/header/header_links/header_link.js +13 -7
  369. package/test-env/components/header/header_section/header_section_item_button.js +13 -7
  370. package/test-env/components/icon/assets/boxes_vertical.js +1 -1
  371. package/test-env/components/icon/assets/checkInCircleFilled.js +1 -2
  372. package/test-env/components/icon/assets/errorFilled.js +1 -2
  373. package/test-env/components/icon/assets/paper_clip.js +1 -1
  374. package/test-env/components/icon/assets/streams_wired.js +3 -2
  375. package/test-env/components/icon/assets/warningFilled.js +1 -2
  376. package/test-env/components/icon/icon_map.js +3 -6
  377. package/test-env/components/list_group/list_group.js +13 -1
  378. package/test-env/components/list_group/list_group_item.js +13 -1
  379. package/test-env/components/list_group/list_group_item_extra_action.js +13 -1
  380. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
  381. package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -1
  382. package/test-env/components/pagination/pagination_button.js +13 -7
  383. package/test-env/components/popover/popover.js +21 -15
  384. package/test-env/components/provider/component_defaults/component_defaults.js +22 -2
  385. package/test-env/components/table/table_row.styles.js +1 -1
  386. package/test-env/components/tool_tip/tool_tip.js +24 -24
  387. package/test-env/global_styling/index.js +16 -1
  388. package/test-env/global_styling/mixins/_button.js +1 -1
  389. package/test-env/global_styling/utility/selectors.js +15 -0
  390. package/test-env/services/focus_trap/focus_trap_pub_sub.js +80 -0
  391. package/test-env/services/focus_trap/index.js +12 -0
  392. package/test-env/services/hooks/index.js +18 -1
  393. package/test-env/services/hooks/useEuiDisabledElement.js +197 -0
  394. package/test-env/services/index.js +8 -0
  395. package/test-env/services/popover/reposition_on_scroll.js +67 -0
  396. package/test-env/services/theme/high_contrast_overrides.js +5 -1
  397. package/test-env/test/cypress/index.js +18 -0
  398. package/test-env/test/cypress/matchers.js +61 -0
  399. package/test-env/test/cypress/test_reposition_on_scroll.js +70 -0
  400. package/test-env/test/enzyme/enzyme_matchers.js +50 -0
  401. package/test-env/test/enzyme/index.js +24 -0
  402. package/test-env/test/rtl/index.js +24 -2
  403. package/test-env/test/rtl/matchers.js +86 -0
  404. package/test-env/utils/element_can_be_disabled.js +22 -0
  405. package/test-env/utils/index.js +14 -1
@@ -29,7 +29,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
29
29
 
30
30
  import React, { useEffect, useRef, useMemo, useCallback, useState, forwardRef } from 'react';
31
31
  import classnames from 'classnames';
32
- import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint, useEuiMemoizedStyles, useGeneratedHtmlId, useEuiThemeCSSVariables } from '../../services';
32
+ import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint, useEuiMemoizedStyles, useGeneratedHtmlId, useEuiThemeCSSVariables, focusTrapPubSub } from '../../services';
33
33
  import { logicalStyle } from '../../global_styling';
34
34
  import { EuiFocusTrap } from '../focus_trap';
35
35
  import { EuiOverlayMask } from '../overlay_mask';
@@ -223,20 +223,28 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (props, ref) {
223
223
  }
224
224
  return selectors;
225
225
  }, [includeSelectorInFocusTrap, includeFixedHeadersInFocusTrap]);
226
- useEffect(function () {
226
+
227
+ /**
228
+ * Finds the shards to include in the focus trap by querying by `focusTrapSelectors`.
229
+ *
230
+ * @param shouldAutoFocus Whether to auto-focus the flyout wrapper when the focus trap is activated.
231
+ * This is necessary because when a flyout is toggled from within a shard, the focus trap's `autoFocus`
232
+ * feature doesn't work. This logic manually focuses the flyout as a workaround.
233
+ */
234
+ var findShards = useCallback(function () {
235
+ var shouldAutoFocus = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
227
236
  if (focusTrapSelectors.length > 0) {
228
237
  var shardsEls = focusTrapSelectors.flatMap(function (selector) {
229
238
  return Array.from(document.querySelectorAll(selector));
230
239
  });
231
240
  setFocusTrapShards(Array.from(shardsEls));
232
-
233
- // Flyouts that are toggled from shards do not have working
234
- // focus trap autoFocus, so we need to focus the flyout wrapper ourselves
235
- shardsEls.forEach(function (shard) {
236
- if (shard.contains(flyoutToggle.current)) {
237
- resizeRef === null || resizeRef === void 0 || resizeRef.focus();
238
- }
239
- });
241
+ if (shouldAutoFocus) {
242
+ shardsEls.forEach(function (shard) {
243
+ if (shard.contains(flyoutToggle.current)) {
244
+ resizeRef === null || resizeRef === void 0 || resizeRef.focus();
245
+ }
246
+ });
247
+ }
240
248
  } else {
241
249
  // Clear existing shards if necessary, e.g. switching to `false`
242
250
  setFocusTrapShards(function (shards) {
@@ -244,6 +252,15 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (props, ref) {
244
252
  });
245
253
  }
246
254
  }, [focusTrapSelectors, resizeRef]);
255
+ useEffect(function () {
256
+ // Auto-focus should only happen on initial flyout mount (or when the dependencies change)
257
+ // because it snaps focus to the flyout wrapper, which steals it from subsequently focused elements.
258
+ findShards(true);
259
+ var unsubscribe = focusTrapPubSub.subscribe(function () {
260
+ return findShards();
261
+ });
262
+ return unsubscribe;
263
+ }, [findShards]);
247
264
  var focusTrapProps = useMemo(function () {
248
265
  return _objectSpread(_objectSpread({}, _focusTrapProps), {}, {
249
266
  shards: [].concat(_toConsumableArray(focusTrapShards), _toConsumableArray((_focusTrapProps === null || _focusTrapProps === void 0 ? void 0 : _focusTrapProps.shards) || []))
@@ -43,7 +43,7 @@ export var euiFilePickerStyles = function euiFilePickerStyles(euiThemeContext) {
43
43
  fontSize = _euiFontSize.fontSize,
44
44
  lineHeight = _euiFontSize.lineHeight;
45
45
  return {
46
- euiFilePicker: /*#__PURE__*/css("--euiFormControlLeftIconsCount:1;position:relative;border-radius:", formVariables.controlBorderRadius, ";&:has(input:focus){--euiFormControlStateColor:", formVariables.borderFocused, ";}&:hover{--euiFormControlStateColor:", highContrastMode ? euiTheme.border.color : formVariables.borderHovered, ";--euiFormControlStateStyle:solid;}&:focus-within{", highContrastModeStyles(euiThemeContext, {
46
+ euiFilePicker: /*#__PURE__*/css("--euiFormControlLeftIconsCount:1;position:relative;border-radius:", formVariables.controlBorderRadius, ";&:has(input:focus){--euiFormControlStateColor:", formVariables.borderFocused, ";}&:hover{--euiFormControlStateColor:", highContrastMode ? euiTheme.border.color : euiTheme.colors.borderInteractiveFormsHoverProminent, ";--euiFormControlStateStyle:", highContrastMode ? 'solid' : 'dashed', ";}&:focus-within{", highContrastModeStyles(euiThemeContext, {
47
47
  forced: "\n ".concat(euiFormControlShowBackgroundLine(euiThemeContext, formVariables.borderFocused), "\n ")
48
48
  }), ";};label:euiFilePicker;"),
49
49
  isDroppingFile: /*#__PURE__*/css("--euiFormControlStateColor:", euiTheme.colors.borderStrongSuccess, ";--euiFormControlStateStyle:", highContrastMode === 'forced' ? 'solid' : 'dashed', ";background-color:", euiTheme.components.forms.backgroundDropping, ";;label:isDroppingFile;"),
@@ -62,8 +62,8 @@ export var euiFilePickerStyles = function euiFilePickerStyles(euiThemeContext) {
62
62
  forced: "\n text-decoration: underline;\n "
63
63
  }), ";}.euiFilePicker__icon{transform:scale(1.05);}}};label:largeInteractive;")
64
64
  },
65
- euiFilePicker__prompt: /*#__PURE__*/css("pointer-events:none;font-size:", fontSize, ";line-height:1;", euiTextTruncate(), " color:", euiTheme.colors.textParagraph, ";border:", euiTheme.border.width.thin, " var(--euiFormControlStateStyle, dashed) var(--euiFormControlStateColor, ", formVariables.borderColor, ");", euiCanAnimate, "{transition:border-color ", euiTheme.animation.fast, " ease-in,background-color ", euiTheme.animation.fast, " ease-in;};label:euiFilePicker__prompt;"),
66
- disabled: /*#__PURE__*/css(formStyles.disabled, ";label:disabled;"),
65
+ euiFilePicker__prompt: /*#__PURE__*/css("pointer-events:none;font-size:", fontSize, ";line-height:1;", euiTextTruncate(), " color:", euiTheme.colors.textParagraph, ";border:", euiTheme.border.width.thin, " var(--euiFormControlStateStyle, dashed) var(--euiFormControlStateColor, ", euiTheme.colors.borderBaseProminent, ");", euiCanAnimate, "{transition:border-color ", euiTheme.animation.fast, " ease-in,background-color ", euiTheme.animation.fast, " ease-in;};label:euiFilePicker__prompt;"),
66
+ disabled: /*#__PURE__*/css(formStyles.disabled, "--euiFormControlStateColor:transparent;;label:disabled;"),
67
67
  // Skip the css() on the default height to avoid generating a className
68
68
  uncompressed: formStyles.uncompressed,
69
69
  compressed: /*#__PURE__*/css(formStyles.compressed, ";label:compressed;"),
@@ -100,13 +100,6 @@ EuiFormControlButton.propTypes = {
100
100
  fullWidth: PropTypes.bool,
101
101
  href: PropTypes.string,
102
102
  onClick: PropTypes.func,
103
- /**
104
- * `disabled` is also allowed
105
- */
106
- /**
107
- * `disabled` is also allowed
108
- */
109
- isDisabled: PropTypes.bool,
110
103
  target: PropTypes.string,
111
104
  rel: PropTypes.string,
112
105
  type: PropTypes.any,
@@ -145,10 +138,23 @@ EuiFormControlButton.propTypes = {
145
138
  "data-text": PropTypes.string
146
139
  }).isRequired, PropTypes.oneOf([false])]),
147
140
  iconSize: PropTypes.any,
141
+ /**
142
+ * Controls the disabled behavior via the native `disabled` attribute.
143
+ */
144
+ isDisabled: PropTypes.bool,
148
145
  className: PropTypes.string,
149
146
  "aria-label": PropTypes.string,
150
147
  "data-test-subj": PropTypes.string,
151
148
  css: PropTypes.any,
149
+ /**
150
+ * NOTE: Beta feature, may be changed or removed in the future
151
+ *
152
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
153
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
154
+ *
155
+ * Use e.g. when a disabled button should have a tooltip.
156
+ */
157
+ hasAriaDisabled: PropTypes.bool,
152
158
  /**
153
159
  * Defines the button label when used like an input in combination with `placeholder`
154
160
  */
@@ -33,13 +33,6 @@ export var EuiHeaderLink = function EuiHeaderLink(_ref) {
33
33
  EuiHeaderLink.propTypes = {
34
34
  href: PropTypes.string,
35
35
  onClick: PropTypes.func,
36
- /**
37
- * `disabled` is also allowed
38
- */
39
- /**
40
- * `disabled` is also allowed
41
- */
42
- isDisabled: PropTypes.bool,
43
36
  target: PropTypes.string,
44
37
  rel: PropTypes.string,
45
38
  type: PropTypes.any,
@@ -78,10 +71,23 @@ EuiHeaderLink.propTypes = {
78
71
  "data-text": PropTypes.string
79
72
  }).isRequired, PropTypes.oneOf([false])]),
80
73
  iconSize: PropTypes.any,
74
+ /**
75
+ * Controls the disabled behavior via the native `disabled` attribute.
76
+ */
77
+ isDisabled: PropTypes.bool,
81
78
  className: PropTypes.string,
82
79
  "aria-label": PropTypes.string,
83
80
  "data-test-subj": PropTypes.string,
84
81
  css: PropTypes.any,
82
+ /**
83
+ * NOTE: Beta feature, may be changed or removed in the future
84
+ *
85
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
86
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
87
+ *
88
+ * Use e.g. when a disabled button should have a tooltip.
89
+ */
90
+ hasAriaDisabled: PropTypes.bool,
85
91
  /**
86
92
  * Simple prop to update color based on active state.
87
93
  * Can be overridden with `color`
@@ -174,13 +174,6 @@ ref) {
174
174
  EuiHeaderSectionItemButton.propTypes = {
175
175
  href: PropTypes.string,
176
176
  onClick: PropTypes.func,
177
- /**
178
- * `disabled` is also allowed
179
- */
180
- /**
181
- * `disabled` is also allowed
182
- */
183
- isDisabled: PropTypes.bool,
184
177
  target: PropTypes.string,
185
178
  rel: PropTypes.string,
186
179
  type: PropTypes.any,
@@ -219,10 +212,23 @@ EuiHeaderSectionItemButton.propTypes = {
219
212
  "data-text": PropTypes.string
220
213
  }).isRequired, PropTypes.oneOf([false])]),
221
214
  iconSize: PropTypes.any,
215
+ /**
216
+ * Controls the disabled behavior via the native `disabled` attribute.
217
+ */
218
+ isDisabled: PropTypes.bool,
222
219
  className: PropTypes.string,
223
220
  "aria-label": PropTypes.string,
224
221
  "data-test-subj": PropTypes.string,
225
222
  css: PropTypes.any,
223
+ /**
224
+ * NOTE: Beta feature, may be changed or removed in the future
225
+ *
226
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
227
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
228
+ *
229
+ * Use e.g. when a disabled button should have a tooltip.
230
+ */
231
+ hasAriaDisabled: PropTypes.bool,
226
232
  /**
227
233
  * Inserts the node into a EuiBadgeNotification and places it appropriately against the button.
228
234
  * Or pass `true` to render a simple dot
@@ -27,7 +27,7 @@ var EuiIconBoxesVertical = function EuiIconBoxesVertical(_ref) {
27
27
  }, props), title ? ___EmotionJSX("title", {
28
28
  id: titleId
29
29
  }, title) : null, ___EmotionJSX("path", {
30
- d: "M8 12a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm0-6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm0-6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z"
30
+ d: "M6 3a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm2-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM6 8a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm2-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm0 4a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-1 2a1 1 0 1 1 2 0 1 1 0 0 1-2 0Z"
31
31
  }));
32
32
  };
33
33
  export var icon = EuiIconBoxesVertical;
@@ -27,8 +27,7 @@ var EuiIconCheckInCircleFilled = function EuiIconCheckInCircleFilled(_ref) {
27
27
  }, props), title ? ___EmotionJSX("title", {
28
28
  id: titleId
29
29
  }, title) : null, ___EmotionJSX("path", {
30
- fillRule: "evenodd",
31
- d: "M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16Zm3.65-10.857L6.91 9.8 4.35 7.286a.5.5 0 0 0-.7.714l2.909 2.857a.5.5 0 0 0 .7 0l5.091-5a.5.5 0 1 0-.7-.714Z"
30
+ d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1ZM7 9.293 5.354 7.646l-.708.708L7 10.707l4.354-4.353-.707-.708L7 9.293Z"
32
31
  }));
33
32
  };
34
33
  export var icon = EuiIconCheckInCircleFilled;
@@ -27,8 +27,7 @@ var EuiIconErrorFilled = function EuiIconErrorFilled(_ref) {
27
27
  }, props), title ? ___EmotionJSX("title", {
28
28
  id: titleId
29
29
  }, title) : null, ___EmotionJSX("path", {
30
- fillRule: "evenodd",
31
- d: "M10 1a1 1 0 0 1 .707.293l4 4A1 1 0 0 1 15 6v5a1 1 0 0 1-.293.707l-4 4A1 1 0 0 1 10 16H5a1 1 0 0 1-.707-.293l-4-4A1 1 0 0 1 0 11V6a1 1 0 0 1 .293-.707l4-4A1 1 0 0 1 5 1h5ZM4.146 5.146a.5.5 0 0 1 .708 0L7.5 7.793l2.646-2.647a.5.5 0 0 1 .708.708L8.207 8.5l2.647 2.646a.5.5 0 0 1-.708.708L7.5 9.207l-2.646 2.647a.5.5 0 0 1-.708-.708L6.793 8.5 4.146 5.854a.5.5 0 0 1 0-.708Z"
30
+ d: "M10.392 1.005a1 1 0 0 1 .608.288L14.707 5a1 1 0 0 1 .293.707v4.586a1 1 0 0 1-.293.707L11 14.707a1 1 0 0 1-.707.293H5.707a1 1 0 0 1-.634-.227L5 14.707 1.293 11a1 1 0 0 1-.288-.608L1 10.293V5.707A1 1 0 0 1 1.293 5L5 1.293A1 1 0 0 1 5.707 1h4.586l.099.005ZM8 7.293 5.354 4.646l-.708.708L7.293 8l-2.647 2.646.708.707L8 8.707l2.646 2.646.707-.707L8.707 8l2.646-2.646-.707-.708L8 7.293Z"
32
31
  }));
33
32
  };
34
33
  export var icon = EuiIconErrorFilled;
@@ -27,7 +27,7 @@ var EuiIconPaperClip = function EuiIconPaperClip(_ref) {
27
27
  }, props), title ? ___EmotionJSX("title", {
28
28
  id: titleId
29
29
  }, title) : null, ___EmotionJSX("path", {
30
- d: "M9.84 2.019 3.046 8.57c-.987.952-1.133 2.517-.199 3.516.951 1.021 2.58 1.106 3.64.19.034-.03.068-.061.1-.092l5.655-5.452a.484.484 0 0 0 0-.703.53.53 0 0 0-.729 0L5.92 11.421c-.572.551-1.505.657-2.131.163a1.455 1.455 0 0 1-.118-2.211l6.899-6.651a2.646 2.646 0 0 1 3.644 0 2.422 2.422 0 0 1 0 3.513L7.3 12.901c-1.333 1.285-3.497 1.493-4.95.336-1.54-1.22-1.764-3.411-.5-4.897a3.33 3.33 0 0 1 .238-.252l5.78-5.572a.484.484 0 0 0 0-.703.53.53 0 0 0-.73 0l-5.78 5.572a4.36 4.36 0 0 0 0 6.324c2.188 2.109 5.202 1.31 6.66-.095l6.925-6.676a3.39 3.39 0 0 0 0-4.92C13.534.66 11.25.66 9.841 2.019z"
30
+ d: "M7 11c0 .423.105.648.229.771.123.124.348.229.771.229.423 0 .648-.105.771-.229.124-.123.229-.348.229-.771V5h1v6c0 .577-.145 1.102-.521 1.479C9.102 12.854 8.577 13 8 13c-.577 0-1.102-.145-1.479-.521C6.145 12.101 6 11.577 6 11V4c0-.719.215-1.468.716-2.046C7.226 1.364 7.996 1 9 1c1.005 0 1.773.365 2.284.954.5.578.716 1.327.716 2.046v7c0 1.103-.345 2.11-1.043 2.845C10.255 14.583 9.242 15 8 15c-1.242 0-2.255-.417-2.957-1.155C4.345 13.11 4 12.103 4 11V4h1v7c0 .897.279 1.64.768 2.155C6.253 13.666 6.99 14 8 14c1.01 0 1.747-.334 2.232-.845.49-.515.768-1.258.768-2.155V4c0-.531-.16-1.032-.472-1.392C10.227 2.26 9.745 2 9 2s-1.227.26-1.528.608C7.16 2.968 7 3.47 7 4v7Z"
31
31
  }));
32
32
  };
33
33
  export var icon = EuiIconPaperClip;
@@ -22,17 +22,18 @@ var EuiIconStreamsWired = function EuiIconStreamsWired(_ref) {
22
22
  xmlns: "http://www.w3.org/2000/svg",
23
23
  width: 16,
24
24
  height: 16,
25
+ fill: "none",
25
26
  viewBox: "0 0 16 16",
26
27
  "aria-labelledby": titleId
27
28
  }, props), title ? ___EmotionJSX("title", {
28
29
  id: titleId
29
30
  }, title) : null, ___EmotionJSX("path", {
30
31
  fillRule: "evenodd",
31
- d: "M13.5 1a1.5 1.5 0 1 1-1.413 2H11.5A1.5 1.5 0 0 0 10 4.5v1c0 .564-.19 1.082-.504 1.5H9.5l-.048.06a2.58 2.58 0 0 1-.352.36c-.01.01-.021.017-.032.025a2.501 2.501 0 0 1-.142.108l-.043.03c-.055.036-.11.07-.168.103l-.047.024c-.057.03-.115.06-.175.085-.018.008-.036.014-.055.021A2.475 2.475 0 0 1 7.5 8h-.504c.315.418.504.936.504 1.5v1A1.5 1.5 0 0 0 9 12h3.087a1.5 1.5 0 1 1 0 1H9a2.5 2.5 0 0 1-2.5-2.5v-1A1.5 1.5 0 0 0 5 8H3.913a1.5 1.5 0 1 1 0-1H7.5A1.5 1.5 0 0 0 9 5.5v-1A2.5 2.5 0 0 1 11.5 2h.587A1.5 1.5 0 0 1 13.5 1Zm0 11a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Zm-11-5a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Zm11-5a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z",
32
+ d: "M13.5 1a1.5 1.5 0 1 1-1.413 2H11.5A1.5 1.5 0 0 0 10 4.5V6a2.49 2.49 0 0 1-.504 1.5H9.5l-.048.06a2.58 2.58 0 0 1-.352.36c-.01.01-.021.017-.032.025a2.496 2.496 0 0 1-.142.108l-.043.03c-.055.036-.11.07-.168.103l-.047.024c-.057.03-.115.06-.175.085-.018.008-.036.014-.055.021A2.475 2.475 0 0 1 7.5 8.5h-.504c.315.418.504.936.504 1.5v1.5A1.5 1.5 0 0 0 9 13h3.087a1.5 1.5 0 1 1 0 1H9a2.5 2.5 0 0 1-2.5-2.5V10A1.5 1.5 0 0 0 5 8.5H3.913a1.5 1.5 0 1 1 0-1H7.5A1.5 1.5 0 0 0 9 6V4.5A2.5 2.5 0 0 1 11.5 2h.587A1.5 1.5 0 0 1 13.5 1Zm0 12a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Zm-11-5.5a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Zm11-5.5a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z",
32
33
  clipRule: "evenodd"
33
34
  }), ___EmotionJSX("path", {
34
35
  fillRule: "evenodd",
35
- d: "M13.5 6a1.5 1.5 0 1 1-1.413 2H9.948c.293-.287.536-.625.714-1h1.425A1.5 1.5 0 0 1 13.5 6Zm0 1a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z",
36
+ d: "M13.5 6.5a1.5 1.5 0 1 1-1.413 2H9.948c.293-.287.536-.625.714-1h1.425a1.5 1.5 0 0 1 1.413-1Zm0 1a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z",
36
37
  clipRule: "evenodd"
37
38
  }));
38
39
  };
@@ -27,8 +27,7 @@ var EuiIconWarningFilled = function EuiIconWarningFilled(_ref) {
27
27
  }, props), title ? ___EmotionJSX("title", {
28
28
  id: titleId
29
29
  }, title) : null, ___EmotionJSX("path", {
30
- fillRule: "evenodd",
31
- d: "M8 1a1 1 0 0 1 .864.496l7 12A1 1 0 0 1 15 15H1a1 1 0 0 1-.864-1.504l7-12A1 1 0 0 1 8 1Zm.9 4.995-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995a.905.905 0 1 1 1.8 0ZM8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
30
+ d: "M8 1a1 1 0 0 1 .863.496l7 12A1 1 0 0 1 15 15H1a1 1 0 0 1-.864-1.504l7-12A1 1 0 0 1 8 1Zm0 10a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-.5-6v5h1V5h-1Z"
32
31
  }));
33
32
  };
34
33
  export var icon = EuiIconWarningFilled;
@@ -54,8 +54,7 @@ export var typeToPathMap = {
54
54
  changePointDetection: 'change_point_detection',
55
55
  check: 'check',
56
56
  checkCircle: 'checkCircle',
57
- checkInCircleFilled: 'checkCircle',
58
- // NOTE: To be deprecated in favor of `checkCircle`
57
+ checkInCircleFilled: 'checkInCircleFilled',
59
58
  cheer: 'cheer',
60
59
  classificationJob: 'ml_classification_job',
61
60
  clickLeft: 'clickLeft',
@@ -160,8 +159,7 @@ export var typeToPathMap = {
160
159
  eql: 'eql',
161
160
  eraser: 'eraser',
162
161
  error: 'error',
163
- errorFilled: 'error',
164
- // NOTE: To be deprecated in favor of `error`
162
+ errorFilled: 'errorFilled',
165
163
  esqlVis: 'esqlVis',
166
164
  exit: 'exit',
167
165
  expand: 'expand',
@@ -500,8 +498,7 @@ export var typeToPathMap = {
500
498
  visualizeApp: 'app_visualize',
501
499
  vulnerabilityManagementApp: 'app_vulnerability_management',
502
500
  warning: 'warning',
503
- warningFilled: 'warning',
504
- // NOTE: To be deprecated in favor of `warning`
501
+ warningFilled: 'warningFilled',
505
502
  watchesApp: 'app_watches',
506
503
  web: 'web',
507
504
  wordWrap: 'wordWrap',
@@ -189,7 +189,6 @@ EuiListGroup.propTypes = {
189
189
  color: PropTypes.any,
190
190
  "aria-label": PropTypes.string,
191
191
  "aria-labelledby": PropTypes.string,
192
- isDisabled: PropTypes.bool,
193
192
  /**
194
193
  * Overall size of button.
195
194
  * Matches the sizes of other EuiButtons
@@ -219,6 +218,19 @@ EuiListGroup.propTypes = {
219
218
  className: PropTypes.string,
220
219
  "data-test-subj": PropTypes.string,
221
220
  css: PropTypes.any,
221
+ /**
222
+ * Controls the disabled behavior via the native `disabled` attribute.
223
+ */
224
+ isDisabled: PropTypes.bool,
225
+ /**
226
+ * NOTE: Beta feature, may be changed or removed in the future
227
+ *
228
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
229
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
230
+ *
231
+ * Use e.g. when a disabled button should have a tooltip.
232
+ */
233
+ hasAriaDisabled: PropTypes.bool,
222
234
  buttonRef: PropTypes.any
223
235
  }),
224
236
  /**
@@ -274,7 +274,6 @@ EuiListGroupItem.propTypes = {
274
274
  color: PropTypes.any,
275
275
  "aria-label": PropTypes.string,
276
276
  "aria-labelledby": PropTypes.string,
277
- isDisabled: PropTypes.bool,
278
277
  /**
279
278
  * Overall size of button.
280
279
  * Matches the sizes of other EuiButtons
@@ -304,6 +303,19 @@ EuiListGroupItem.propTypes = {
304
303
  className: PropTypes.string,
305
304
  "data-test-subj": PropTypes.string,
306
305
  css: PropTypes.any,
306
+ /**
307
+ * Controls the disabled behavior via the native `disabled` attribute.
308
+ */
309
+ isDisabled: PropTypes.bool,
310
+ /**
311
+ * NOTE: Beta feature, may be changed or removed in the future
312
+ *
313
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
314
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
315
+ *
316
+ * Use e.g. when a disabled button should have a tooltip.
317
+ */
318
+ hasAriaDisabled: PropTypes.bool,
307
319
  buttonRef: PropTypes.any
308
320
  }),
309
321
  /**
@@ -54,7 +54,6 @@ EuiListGroupItemExtraAction.propTypes = {
54
54
  color: PropTypes.any,
55
55
  "aria-label": PropTypes.string,
56
56
  "aria-labelledby": PropTypes.string,
57
- isDisabled: PropTypes.bool,
58
57
  /**
59
58
  * Overall size of button.
60
59
  * Matches the sizes of other EuiButtons
@@ -84,6 +83,19 @@ EuiListGroupItemExtraAction.propTypes = {
84
83
  className: PropTypes.string,
85
84
  "data-test-subj": PropTypes.string,
86
85
  css: PropTypes.any,
86
+ /**
87
+ * Controls the disabled behavior via the native `disabled` attribute.
88
+ */
89
+ isDisabled: PropTypes.bool,
90
+ /**
91
+ * NOTE: Beta feature, may be changed or removed in the future
92
+ *
93
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
94
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
95
+ *
96
+ * Use e.g. when a disabled button should have a tooltip.
97
+ */
98
+ hasAriaDisabled: PropTypes.bool,
87
99
  buttonRef: PropTypes.any,
88
100
  parentIsDisabled: PropTypes.bool
89
101
  };
@@ -168,7 +168,6 @@ EuiPinnableListGroup.propTypes = {
168
168
  color: PropTypes.any,
169
169
  "aria-label": PropTypes.string,
170
170
  "aria-labelledby": PropTypes.string,
171
- isDisabled: PropTypes.bool,
172
171
  /**
173
172
  * Overall size of button.
174
173
  * Matches the sizes of other EuiButtons
@@ -198,6 +197,19 @@ EuiPinnableListGroup.propTypes = {
198
197
  className: PropTypes.string,
199
198
  "data-test-subj": PropTypes.string,
200
199
  css: PropTypes.any,
200
+ /**
201
+ * Controls the disabled behavior via the native `disabled` attribute.
202
+ */
203
+ isDisabled: PropTypes.bool,
204
+ /**
205
+ * NOTE: Beta feature, may be changed or removed in the future
206
+ *
207
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
208
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
209
+ *
210
+ * Use e.g. when a disabled button should have a tooltip.
211
+ */
212
+ hasAriaDisabled: PropTypes.bool,
201
213
  buttonRef: PropTypes.any
202
214
  }),
203
215
  /**
@@ -301,7 +313,6 @@ EuiPinnableListGroup.propTypes = {
301
313
  color: PropTypes.any,
302
314
  "aria-label": PropTypes.string,
303
315
  "aria-labelledby": PropTypes.string,
304
- isDisabled: PropTypes.bool,
305
316
  size: PropTypes.any,
306
317
  iconSize: PropTypes.any,
307
318
  isSelected: PropTypes.bool,
@@ -310,6 +321,8 @@ EuiPinnableListGroup.propTypes = {
310
321
  className: PropTypes.string,
311
322
  "data-test-subj": PropTypes.string,
312
323
  css: PropTypes.any,
324
+ isDisabled: PropTypes.bool,
325
+ hasAriaDisabled: PropTypes.bool,
313
326
  buttonRef: PropTypes.any
314
327
  }),
315
328
  /**
@@ -12,7 +12,7 @@ export var euiOverlayMaskStyles = function euiOverlayMaskStyles(_ref) {
12
12
  var euiTheme = _ref.euiTheme,
13
13
  highContrastMode = _ref.highContrastMode;
14
14
  return {
15
- euiOverlayMask: /*#__PURE__*/css("position:fixed;", logicalCSS('top', 0), " ", logicalCSS('left', 0), " ", logicalCSS('right', 0), " ", logicalCSS('bottom', 0), " display:flex;align-items:center;justify-content:center;", logicalCSS('padding-bottom', '10vh'), " animation:", euiAnimFadeIn, " ", euiTheme.animation.fast, " ease-in;background:", highContrastMode ? euiTheme.components.overlayMaskBackgroundHighContrast : euiTheme.components.overlayMaskBackground, ";;label:euiOverlayMask;"),
15
+ euiOverlayMask: /*#__PURE__*/css("position:fixed;", logicalCSS('top', 0), " ", logicalCSS('left', 0), " ", logicalCSS('right', 0), " ", logicalCSS('bottom', 0), " display:flex;align-items:center;justify-content:center;animation:", euiAnimFadeIn, " ", euiTheme.animation.fast, " ease-in;background:", highContrastMode ? euiTheme.components.overlayMaskBackgroundHighContrast : euiTheme.components.overlayMaskBackground, ";;label:euiOverlayMask;"),
16
16
  aboveHeader: /*#__PURE__*/css("z-index:", euiTheme.levels.mask, ";;label:aboveHeader;"),
17
17
  belowHeader: /*#__PURE__*/css("z-index:", euiTheme.levels.maskBelowHeader, ";", logicalCSS('top', 'var(--euiFixedHeadersOffset, 0)'), ";;label:belowHeader;")
18
18
  };
@@ -71,13 +71,6 @@ export var EuiPaginationButton = function EuiPaginationButton(_ref) {
71
71
  EuiPaginationButton.propTypes = {
72
72
  href: PropTypes.string,
73
73
  onClick: PropTypes.func,
74
- /**
75
- * `disabled` is also allowed
76
- */
77
- /**
78
- * `disabled` is also allowed
79
- */
80
- isDisabled: PropTypes.bool,
81
74
  target: PropTypes.string,
82
75
  rel: PropTypes.string,
83
76
  type: PropTypes.any,
@@ -116,10 +109,23 @@ EuiPaginationButton.propTypes = {
116
109
  "data-text": PropTypes.string
117
110
  }).isRequired, PropTypes.oneOf([false])]),
118
111
  iconSize: PropTypes.any,
112
+ /**
113
+ * Controls the disabled behavior via the native `disabled` attribute.
114
+ */
115
+ isDisabled: PropTypes.bool,
119
116
  className: PropTypes.string,
120
117
  "aria-label": PropTypes.string,
121
118
  "data-test-subj": PropTypes.string,
122
119
  css: PropTypes.any,
120
+ /**
121
+ * NOTE: Beta feature, may be changed or removed in the future
122
+ *
123
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
124
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
125
+ *
126
+ * Use e.g. when a disabled button should have a tooltip.
127
+ */
128
+ hasAriaDisabled: PropTypes.bool,
123
129
  isActive: PropTypes.bool,
124
130
  pageIndex: PropTypes.number.isRequired,
125
131
  totalPages: PropTypes.number
@@ -41,17 +41,19 @@ import React, { Component } from 'react';
41
41
  import classNames from 'classnames';
42
42
  import { focusable } from 'tabbable';
43
43
  import { EuiFocusTrap } from '../focus_trap';
44
- import { keys, getTransitionTimings, getWaitDuration, performOnFrame, htmlIdGenerator } from '../../services';
44
+ import { keys, getTransitionTimings, getWaitDuration, performOnFrame, htmlIdGenerator, focusTrapPubSub } from '../../services';
45
45
  import { setMultipleRefs } from '../../services/hooks/useCombinedRefs';
46
46
  import { EuiScreenReaderOnly } from '../accessibility';
47
47
  import { EuiPortal } from '../portal';
48
48
  import { EuiMutationObserver } from '../observer/mutation_observer';
49
49
  import { findPopoverPosition, getElementZIndex } from '../../services/popover';
50
+ import { createRepositionOnScroll } from '../../services/popover/reposition_on_scroll';
50
51
  import { EuiI18n } from '../i18n';
51
52
  import { EuiOutsideClickDetector } from '../outside_click_detector';
52
53
  import { EuiPopoverArrow } from './popover_arrow';
53
54
  import { euiPopoverStyles } from './popover.styles';
54
55
  import { EuiPopoverPanel } from './popover_panel';
56
+ import { EuiComponentDefaultsContext } from '../provider/component_defaults';
55
57
  import { jsx as ___EmotionJSX } from "@emotion/react";
56
58
  export var popoverAnchorPosition = ['upCenter', 'upLeft', 'upRight', 'downCenter', 'downLeft', 'downRight', 'leftCenter', 'leftUp', 'leftDown', 'rightCenter', 'rightUp', 'rightDown'];
57
59
  var anchorPositionToPopoverPositionMap = {
@@ -103,7 +105,8 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
103
105
  var _this;
104
106
  _classCallCheck(this, EuiPopover);
105
107
  _this = _callSuper(this, EuiPopover, [props]);
106
- _defineProperty(_this, "respositionTimeout", void 0);
108
+ _defineProperty(_this, "repositionOnScroll", void 0);
109
+ _defineProperty(_this, "repositionTimeout", void 0);
107
110
  _defineProperty(_this, "strandedFocusTimeout", void 0);
108
111
  _defineProperty(_this, "closingTransitionTimeout", void 0);
109
112
  _defineProperty(_this, "closingTransitionAnimationFrame", void 0);
@@ -182,12 +185,13 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
182
185
  }),
183
186
  durationMatch = _Array$prototype$slic.durationMatch,
184
187
  delayMatch = _Array$prototype$slic.delayMatch;
185
- clearTimeout(_this.respositionTimeout);
186
- _this.respositionTimeout = window.setTimeout(function () {
188
+ clearTimeout(_this.repositionTimeout);
189
+ _this.repositionTimeout = window.setTimeout(function () {
187
190
  _this.setState({
188
191
  isOpenStable: true
189
192
  }, function () {
190
193
  _this.positionPopoverFixed();
194
+ focusTrapPubSub.publish();
191
195
  });
192
196
  }, durationMatch + delayMatch);
193
197
  });
@@ -297,6 +301,13 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
297
301
  // once a stable position has been found, keep the contents on that side
298
302
  isOpenStable: false // wait for any initial opening transitions to finish before marking as stable
299
303
  };
304
+ _this.repositionOnScroll = createRepositionOnScroll(function () {
305
+ return {
306
+ repositionOnScroll: _this.props.repositionOnScroll,
307
+ componentDefaults: _this.context.EuiPopover,
308
+ repositionFn: _this.positionPopoverFixed
309
+ };
310
+ });
300
311
  return _this;
301
312
  }
302
313
  _inherits(EuiPopover, _Component);
@@ -314,9 +325,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
314
325
  _this2.onOpenPopover();
315
326
  });
316
327
  }
317
- if (this.props.repositionOnScroll) {
318
- window.addEventListener('scroll', this.positionPopoverFixed, true);
319
- }
328
+ this.repositionOnScroll.subscribe();
320
329
  }
321
330
  }, {
322
331
  key: "componentDidUpdate",
@@ -333,13 +342,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
333
342
  }
334
343
 
335
344
  // update scroll listener
336
- if (prevProps.repositionOnScroll !== this.props.repositionOnScroll) {
337
- if (this.props.repositionOnScroll) {
338
- window.addEventListener('scroll', this.positionPopoverFixed, true);
339
- } else {
340
- window.removeEventListener('scroll', this.positionPopoverFixed, true);
341
- }
342
- }
345
+ this.repositionOnScroll.update();
343
346
 
344
347
  // The popover is being closed.
345
348
  if (prevProps.isOpen && !this.props.isOpen) {
@@ -349,17 +352,19 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
349
352
  _this3.setState({
350
353
  isClosing: false
351
354
  });
355
+ focusTrapPubSub.publish();
352
356
  }, closingTransitionTime);
353
357
  }
354
358
  }
355
359
  }, {
356
360
  key: "componentWillUnmount",
357
361
  value: function componentWillUnmount() {
358
- window.removeEventListener('scroll', this.positionPopoverFixed, true);
359
- clearTimeout(this.respositionTimeout);
362
+ this.repositionOnScroll.cleanup();
363
+ clearTimeout(this.repositionTimeout);
360
364
  clearTimeout(this.strandedFocusTimeout);
361
365
  clearTimeout(this.closingTransitionTimeout);
362
366
  cancelAnimationFrame(this.closingTransitionAnimationFrame);
367
+ focusTrapPubSub.publish();
363
368
  }
364
369
  }, {
365
370
  key: "render",
@@ -532,6 +537,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
532
537
  }
533
538
  }]);
534
539
  }(Component);
540
+ _defineProperty(EuiPopover, "contextType", EuiComponentDefaultsContext);
535
541
  _defineProperty(EuiPopover, "defaultProps", {
536
542
  isOpen: false,
537
543
  ownFocus: true,
@@ -66,7 +66,17 @@ EuiComponentDefaultsProvider.propTypes = {
66
66
  * Provide a global configuration for `EuiFlyout`s.
67
67
  * Defaults will be inherited by all `EuiFlyout`s.
68
68
  */
69
- EuiFlyout: PropTypes.any
69
+ EuiFlyout: PropTypes.any,
70
+ /**
71
+ * Provide a global configuration for `EuiPopover`s.
72
+ * Defaults will be inherited by every `EuiPopover`.
73
+ */
74
+ EuiPopover: PropTypes.any,
75
+ /**
76
+ * Provide a global configuration for `EuiToolTip`s.
77
+ * Defaults will be inherited by every `EuiToolTip`.
78
+ */
79
+ EuiToolTip: PropTypes.any
70
80
  })
71
81
  };
72
82
  export var useComponentDefaults = function useComponentDefaults() {
@@ -121,5 +131,15 @@ EuiProviderComponentDefaultsProps.propTypes = {
121
131
  * Provide a global configuration for `EuiFlyout`s.
122
132
  * Defaults will be inherited by all `EuiFlyout`s.
123
133
  */
124
- EuiFlyout: PropTypes.any
134
+ EuiFlyout: PropTypes.any,
135
+ /**
136
+ * Provide a global configuration for `EuiPopover`s.
137
+ * Defaults will be inherited by every `EuiPopover`.
138
+ */
139
+ EuiPopover: PropTypes.any,
140
+ /**
141
+ * Provide a global configuration for `EuiToolTip`s.
142
+ * Defaults will be inherited by every `EuiToolTip`.
143
+ */
144
+ EuiToolTip: PropTypes.any
125
145
  };