@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
@@ -214,7 +214,6 @@ EuiDataGridBody.propTypes = {
214
214
  color: PropTypes.any,
215
215
  "aria-label": PropTypes.string,
216
216
  "aria-labelledby": PropTypes.string,
217
- isDisabled: PropTypes.bool,
218
217
  /**
219
218
  * Overall size of button.
220
219
  * Matches the sizes of other EuiButtons
@@ -244,6 +243,19 @@ EuiDataGridBody.propTypes = {
244
243
  className: PropTypes.string,
245
244
  "data-test-subj": PropTypes.string,
246
245
  css: PropTypes.any,
246
+ /**
247
+ * Controls the disabled behavior via the native `disabled` attribute.
248
+ */
249
+ isDisabled: PropTypes.bool,
250
+ /**
251
+ * NOTE: Beta feature, may be changed or removed in the future
252
+ *
253
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
254
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
255
+ *
256
+ * Use e.g. when a disabled button should have a tooltip.
257
+ */
258
+ hasAriaDisabled: PropTypes.bool,
247
259
  buttonRef: PropTypes.any
248
260
  }),
249
261
  /**
@@ -297,7 +309,6 @@ EuiDataGridBody.propTypes = {
297
309
  color: PropTypes.any,
298
310
  "aria-label": PropTypes.string,
299
311
  "aria-labelledby": PropTypes.string,
300
- isDisabled: PropTypes.bool,
301
312
  size: PropTypes.any,
302
313
  iconSize: PropTypes.any,
303
314
  isSelected: PropTypes.bool,
@@ -306,6 +317,8 @@ EuiDataGridBody.propTypes = {
306
317
  className: PropTypes.string,
307
318
  "data-test-subj": PropTypes.string,
308
319
  css: PropTypes.any,
320
+ isDisabled: PropTypes.bool,
321
+ hasAriaDisabled: PropTypes.bool,
309
322
  buttonRef: PropTypes.any
310
323
  }),
311
324
  onClick: PropTypes.func,
@@ -340,7 +353,6 @@ EuiDataGridBody.propTypes = {
340
353
  color: PropTypes.any,
341
354
  "aria-label": PropTypes.string,
342
355
  "aria-labelledby": PropTypes.string,
343
- isDisabled: PropTypes.bool,
344
356
  size: PropTypes.any,
345
357
  iconSize: PropTypes.any,
346
358
  isSelected: PropTypes.bool,
@@ -349,6 +361,8 @@ EuiDataGridBody.propTypes = {
349
361
  className: PropTypes.string,
350
362
  "data-test-subj": PropTypes.string,
351
363
  css: PropTypes.any,
364
+ isDisabled: PropTypes.bool,
365
+ hasAriaDisabled: PropTypes.bool,
352
366
  buttonRef: PropTypes.any
353
367
  }),
354
368
  onClick: PropTypes.func,
@@ -383,7 +397,6 @@ EuiDataGridBody.propTypes = {
383
397
  color: PropTypes.any,
384
398
  "aria-label": PropTypes.string,
385
399
  "aria-labelledby": PropTypes.string,
386
- isDisabled: PropTypes.bool,
387
400
  size: PropTypes.any,
388
401
  iconSize: PropTypes.any,
389
402
  isSelected: PropTypes.bool,
@@ -392,6 +405,8 @@ EuiDataGridBody.propTypes = {
392
405
  className: PropTypes.string,
393
406
  "data-test-subj": PropTypes.string,
394
407
  css: PropTypes.any,
408
+ isDisabled: PropTypes.bool,
409
+ hasAriaDisabled: PropTypes.bool,
395
410
  buttonRef: PropTypes.any
396
411
  }),
397
412
  onClick: PropTypes.func,
@@ -426,7 +441,6 @@ EuiDataGridBody.propTypes = {
426
441
  color: PropTypes.any,
427
442
  "aria-label": PropTypes.string,
428
443
  "aria-labelledby": PropTypes.string,
429
- isDisabled: PropTypes.bool,
430
444
  size: PropTypes.any,
431
445
  iconSize: PropTypes.any,
432
446
  isSelected: PropTypes.bool,
@@ -435,6 +449,8 @@ EuiDataGridBody.propTypes = {
435
449
  className: PropTypes.string,
436
450
  "data-test-subj": PropTypes.string,
437
451
  css: PropTypes.any,
452
+ isDisabled: PropTypes.bool,
453
+ hasAriaDisabled: PropTypes.bool,
438
454
  buttonRef: PropTypes.any
439
455
  }),
440
456
  onClick: PropTypes.func,
@@ -469,7 +485,6 @@ EuiDataGridBody.propTypes = {
469
485
  color: PropTypes.any,
470
486
  "aria-label": PropTypes.string,
471
487
  "aria-labelledby": PropTypes.string,
472
- isDisabled: PropTypes.bool,
473
488
  size: PropTypes.any,
474
489
  iconSize: PropTypes.any,
475
490
  isSelected: PropTypes.bool,
@@ -478,6 +493,8 @@ EuiDataGridBody.propTypes = {
478
493
  className: PropTypes.string,
479
494
  "data-test-subj": PropTypes.string,
480
495
  css: PropTypes.any,
496
+ isDisabled: PropTypes.bool,
497
+ hasAriaDisabled: PropTypes.bool,
481
498
  buttonRef: PropTypes.any
482
499
  }),
483
500
  onClick: PropTypes.func,
@@ -378,7 +378,6 @@ EuiDataGridBodyCustomRender.propTypes = {
378
378
  color: PropTypes.any,
379
379
  "aria-label": PropTypes.string,
380
380
  "aria-labelledby": PropTypes.string,
381
- isDisabled: PropTypes.bool,
382
381
  /**
383
382
  * Overall size of button.
384
383
  * Matches the sizes of other EuiButtons
@@ -408,6 +407,19 @@ EuiDataGridBodyCustomRender.propTypes = {
408
407
  className: PropTypes.string,
409
408
  "data-test-subj": PropTypes.string,
410
409
  css: PropTypes.any,
410
+ /**
411
+ * Controls the disabled behavior via the native `disabled` attribute.
412
+ */
413
+ isDisabled: PropTypes.bool,
414
+ /**
415
+ * NOTE: Beta feature, may be changed or removed in the future
416
+ *
417
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
418
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
419
+ *
420
+ * Use e.g. when a disabled button should have a tooltip.
421
+ */
422
+ hasAriaDisabled: PropTypes.bool,
411
423
  buttonRef: PropTypes.any
412
424
  }),
413
425
  /**
@@ -461,7 +473,6 @@ EuiDataGridBodyCustomRender.propTypes = {
461
473
  color: PropTypes.any,
462
474
  "aria-label": PropTypes.string,
463
475
  "aria-labelledby": PropTypes.string,
464
- isDisabled: PropTypes.bool,
465
476
  size: PropTypes.any,
466
477
  iconSize: PropTypes.any,
467
478
  isSelected: PropTypes.bool,
@@ -470,6 +481,8 @@ EuiDataGridBodyCustomRender.propTypes = {
470
481
  className: PropTypes.string,
471
482
  "data-test-subj": PropTypes.string,
472
483
  css: PropTypes.any,
484
+ isDisabled: PropTypes.bool,
485
+ hasAriaDisabled: PropTypes.bool,
473
486
  buttonRef: PropTypes.any
474
487
  }),
475
488
  onClick: PropTypes.func,
@@ -504,7 +517,6 @@ EuiDataGridBodyCustomRender.propTypes = {
504
517
  color: PropTypes.any,
505
518
  "aria-label": PropTypes.string,
506
519
  "aria-labelledby": PropTypes.string,
507
- isDisabled: PropTypes.bool,
508
520
  size: PropTypes.any,
509
521
  iconSize: PropTypes.any,
510
522
  isSelected: PropTypes.bool,
@@ -513,6 +525,8 @@ EuiDataGridBodyCustomRender.propTypes = {
513
525
  className: PropTypes.string,
514
526
  "data-test-subj": PropTypes.string,
515
527
  css: PropTypes.any,
528
+ isDisabled: PropTypes.bool,
529
+ hasAriaDisabled: PropTypes.bool,
516
530
  buttonRef: PropTypes.any
517
531
  }),
518
532
  onClick: PropTypes.func,
@@ -547,7 +561,6 @@ EuiDataGridBodyCustomRender.propTypes = {
547
561
  color: PropTypes.any,
548
562
  "aria-label": PropTypes.string,
549
563
  "aria-labelledby": PropTypes.string,
550
- isDisabled: PropTypes.bool,
551
564
  size: PropTypes.any,
552
565
  iconSize: PropTypes.any,
553
566
  isSelected: PropTypes.bool,
@@ -556,6 +569,8 @@ EuiDataGridBodyCustomRender.propTypes = {
556
569
  className: PropTypes.string,
557
570
  "data-test-subj": PropTypes.string,
558
571
  css: PropTypes.any,
572
+ isDisabled: PropTypes.bool,
573
+ hasAriaDisabled: PropTypes.bool,
559
574
  buttonRef: PropTypes.any
560
575
  }),
561
576
  onClick: PropTypes.func,
@@ -590,7 +605,6 @@ EuiDataGridBodyCustomRender.propTypes = {
590
605
  color: PropTypes.any,
591
606
  "aria-label": PropTypes.string,
592
607
  "aria-labelledby": PropTypes.string,
593
- isDisabled: PropTypes.bool,
594
608
  size: PropTypes.any,
595
609
  iconSize: PropTypes.any,
596
610
  isSelected: PropTypes.bool,
@@ -599,6 +613,8 @@ EuiDataGridBodyCustomRender.propTypes = {
599
613
  className: PropTypes.string,
600
614
  "data-test-subj": PropTypes.string,
601
615
  css: PropTypes.any,
616
+ isDisabled: PropTypes.bool,
617
+ hasAriaDisabled: PropTypes.bool,
602
618
  buttonRef: PropTypes.any
603
619
  }),
604
620
  onClick: PropTypes.func,
@@ -633,7 +649,6 @@ EuiDataGridBodyCustomRender.propTypes = {
633
649
  color: PropTypes.any,
634
650
  "aria-label": PropTypes.string,
635
651
  "aria-labelledby": PropTypes.string,
636
- isDisabled: PropTypes.bool,
637
652
  size: PropTypes.any,
638
653
  iconSize: PropTypes.any,
639
654
  isSelected: PropTypes.bool,
@@ -642,6 +657,8 @@ EuiDataGridBodyCustomRender.propTypes = {
642
657
  className: PropTypes.string,
643
658
  "data-test-subj": PropTypes.string,
644
659
  css: PropTypes.any,
660
+ isDisabled: PropTypes.bool,
661
+ hasAriaDisabled: PropTypes.bool,
645
662
  buttonRef: PropTypes.any
646
663
  }),
647
664
  onClick: PropTypes.func,
@@ -546,7 +546,6 @@ EuiDataGridBodyVirtualized.propTypes = {
546
546
  color: PropTypes.any,
547
547
  "aria-label": PropTypes.string,
548
548
  "aria-labelledby": PropTypes.string,
549
- isDisabled: PropTypes.bool,
550
549
  /**
551
550
  * Overall size of button.
552
551
  * Matches the sizes of other EuiButtons
@@ -576,6 +575,19 @@ EuiDataGridBodyVirtualized.propTypes = {
576
575
  className: PropTypes.string,
577
576
  "data-test-subj": PropTypes.string,
578
577
  css: PropTypes.any,
578
+ /**
579
+ * Controls the disabled behavior via the native `disabled` attribute.
580
+ */
581
+ isDisabled: PropTypes.bool,
582
+ /**
583
+ * NOTE: Beta feature, may be changed or removed in the future
584
+ *
585
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
586
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
587
+ *
588
+ * Use e.g. when a disabled button should have a tooltip.
589
+ */
590
+ hasAriaDisabled: PropTypes.bool,
579
591
  buttonRef: PropTypes.any
580
592
  }),
581
593
  /**
@@ -629,7 +641,6 @@ EuiDataGridBodyVirtualized.propTypes = {
629
641
  color: PropTypes.any,
630
642
  "aria-label": PropTypes.string,
631
643
  "aria-labelledby": PropTypes.string,
632
- isDisabled: PropTypes.bool,
633
644
  size: PropTypes.any,
634
645
  iconSize: PropTypes.any,
635
646
  isSelected: PropTypes.bool,
@@ -638,6 +649,8 @@ EuiDataGridBodyVirtualized.propTypes = {
638
649
  className: PropTypes.string,
639
650
  "data-test-subj": PropTypes.string,
640
651
  css: PropTypes.any,
652
+ isDisabled: PropTypes.bool,
653
+ hasAriaDisabled: PropTypes.bool,
641
654
  buttonRef: PropTypes.any
642
655
  }),
643
656
  onClick: PropTypes.func,
@@ -672,7 +685,6 @@ EuiDataGridBodyVirtualized.propTypes = {
672
685
  color: PropTypes.any,
673
686
  "aria-label": PropTypes.string,
674
687
  "aria-labelledby": PropTypes.string,
675
- isDisabled: PropTypes.bool,
676
688
  size: PropTypes.any,
677
689
  iconSize: PropTypes.any,
678
690
  isSelected: PropTypes.bool,
@@ -681,6 +693,8 @@ EuiDataGridBodyVirtualized.propTypes = {
681
693
  className: PropTypes.string,
682
694
  "data-test-subj": PropTypes.string,
683
695
  css: PropTypes.any,
696
+ isDisabled: PropTypes.bool,
697
+ hasAriaDisabled: PropTypes.bool,
684
698
  buttonRef: PropTypes.any
685
699
  }),
686
700
  onClick: PropTypes.func,
@@ -715,7 +729,6 @@ EuiDataGridBodyVirtualized.propTypes = {
715
729
  color: PropTypes.any,
716
730
  "aria-label": PropTypes.string,
717
731
  "aria-labelledby": PropTypes.string,
718
- isDisabled: PropTypes.bool,
719
732
  size: PropTypes.any,
720
733
  iconSize: PropTypes.any,
721
734
  isSelected: PropTypes.bool,
@@ -724,6 +737,8 @@ EuiDataGridBodyVirtualized.propTypes = {
724
737
  className: PropTypes.string,
725
738
  "data-test-subj": PropTypes.string,
726
739
  css: PropTypes.any,
740
+ isDisabled: PropTypes.bool,
741
+ hasAriaDisabled: PropTypes.bool,
727
742
  buttonRef: PropTypes.any
728
743
  }),
729
744
  onClick: PropTypes.func,
@@ -758,7 +773,6 @@ EuiDataGridBodyVirtualized.propTypes = {
758
773
  color: PropTypes.any,
759
774
  "aria-label": PropTypes.string,
760
775
  "aria-labelledby": PropTypes.string,
761
- isDisabled: PropTypes.bool,
762
776
  size: PropTypes.any,
763
777
  iconSize: PropTypes.any,
764
778
  isSelected: PropTypes.bool,
@@ -767,6 +781,8 @@ EuiDataGridBodyVirtualized.propTypes = {
767
781
  className: PropTypes.string,
768
782
  "data-test-subj": PropTypes.string,
769
783
  css: PropTypes.any,
784
+ isDisabled: PropTypes.bool,
785
+ hasAriaDisabled: PropTypes.bool,
770
786
  buttonRef: PropTypes.any
771
787
  }),
772
788
  onClick: PropTypes.func,
@@ -801,7 +817,6 @@ EuiDataGridBodyVirtualized.propTypes = {
801
817
  color: PropTypes.any,
802
818
  "aria-label": PropTypes.string,
803
819
  "aria-labelledby": PropTypes.string,
804
- isDisabled: PropTypes.bool,
805
820
  size: PropTypes.any,
806
821
  iconSize: PropTypes.any,
807
822
  isSelected: PropTypes.bool,
@@ -810,6 +825,8 @@ EuiDataGridBodyVirtualized.propTypes = {
810
825
  className: PropTypes.string,
811
826
  "data-test-subj": PropTypes.string,
812
827
  css: PropTypes.any,
828
+ isDisabled: PropTypes.bool,
829
+ hasAriaDisabled: PropTypes.bool,
813
830
  buttonRef: PropTypes.any
814
831
  }),
815
832
  onClick: PropTypes.func,
@@ -83,16 +83,6 @@ export var ColumnActions = /*#__PURE__*/memo(function (_ref) {
83
83
  var closePopover = useCallback(function () {
84
84
  setIsPopoverOpen(false);
85
85
  }, []);
86
- var _useState3 = useState(false),
87
- _useState4 = _slicedToArray(_useState3, 2),
88
- isActionsButtonFocused = _useState4[0],
89
- setIsActionsButtonFocused = _useState4[1];
90
- var onFocus = useCallback(function () {
91
- return setIsActionsButtonFocused(true);
92
- }, []);
93
- var onBlur = useCallback(function () {
94
- return setIsActionsButtonFocused(false);
95
- }, []);
96
86
  var actionsButtonAriaLabel = useEuiI18n('euiDataGridHeaderCell.actionsButtonAriaLabel', '{title}. Click to view column header actions.', {
97
87
  title: title
98
88
  });
@@ -107,10 +97,10 @@ export var ColumnActions = /*#__PURE__*/memo(function (_ref) {
107
97
  /**
108
98
  * Props to set on parent EuiDataGridHeaderCell
109
99
  */
110
- var _useState5 = useState(false),
111
- _useState6 = _slicedToArray(_useState5, 2),
112
- isColumnMoving = _useState6[0],
113
- setIsColumnMoving = _useState6[1];
100
+ var _useState3 = useState(false),
101
+ _useState4 = _slicedToArray(_useState3, 2),
102
+ isColumnMoving = _useState4[0],
103
+ setIsColumnMoving = _useState4[1];
114
104
  useEffect(function () {
115
105
  setPropsFromColumnActions({
116
106
  className: isPopoverOpen ? 'euiDataGridHeaderCell--isActionsPopoverOpen' : '',
@@ -156,17 +146,11 @@ export var ColumnActions = /*#__PURE__*/memo(function (_ref) {
156
146
  iconType: "boxesVertical",
157
147
  iconSize: "s",
158
148
  color: "text",
159
- css: styles.euiDataGridHeaderCell__actions,
160
149
  className: "euiDataGridHeaderCell__button",
161
150
  onClick: togglePopover,
162
151
  buttonRef: actionsButtonRef,
163
- onFocus: onFocus,
164
- onBlur: onBlur,
165
- tabIndex: 0 // Override EuiButtonIcon's conditional tabindex based on aria-hidden
166
- ,
167
- "aria-hidden": hasFocusTrap && !isActionsButtonFocused ? 'true' // prevent the actions button from being read on cell focus
168
- : undefined,
169
152
  "aria-label": hasFocusTrap ? actionsButtonAriaLabel : actionsEnterKeyInstructions,
153
+ css: [styles.euiDataGridHeaderCell__actions.action, styles.euiDataGridHeaderCell__actions.end, ";label:ColumnActions;"],
170
154
  "data-test-subj": "dataGridHeaderCellActionButton-".concat(id)
171
155
  }),
172
156
  isOpen: isPopoverOpen,
@@ -54,6 +54,7 @@ export var EuiDataGridHeaderCell = /*#__PURE__*/memo(function (_ref) {
54
54
  var width = columnWidths[id] || defaultColumnWidth;
55
55
  var columnType = schema[id] ? schema[id].columnType : null;
56
56
  var hasColumnActions = useHasColumnActions(actions);
57
+ var cellContentId = "dataGridHeaderCellContent-".concat(id);
57
58
  var classes = classnames(_defineProperty(_defineProperty({}, "euiDataGridHeaderCell--".concat(columnType), columnType), 'euiDataGridHeaderCell--hasColumnActions', hasColumnActions), displayHeaderCellProps === null || displayHeaderCellProps === void 0 ? void 0 : displayHeaderCellProps.className);
58
59
  var styles = useEuiMemoizedStyles(euiDataGridHeaderCellStyles);
59
60
  var contentStyles = [styles.euiDataGridHeaderCell__content, (columnType === 'numeric' || columnType === 'currency') && styles.right];
@@ -97,8 +98,7 @@ export var EuiDataGridHeaderCell = /*#__PURE__*/memo(function (_ref) {
97
98
  isLastColumn: isLastColumn,
98
99
  width: width,
99
100
  "aria-sort": ariaSort,
100
- "aria-label": displayAsText && "".concat(displayAsText, ", ") // ensure cell text content is read first, if available
101
- ,
101
+ "aria-labelledby": cellContentId,
102
102
  "aria-describedby": classnames(sortingAriaId, dragProps === null || dragProps === void 0 ? void 0 : dragProps['aria-describedby']),
103
103
  "data-column-moving": propsFromColumnActions['data-column-moving'] || (dragProps === null || dragProps === void 0 ? void 0 : dragProps['data-column-moving']) || undefined
104
104
  }), function (hasFocusTrap) {
@@ -107,11 +107,13 @@ export var EuiDataGridHeaderCell = /*#__PURE__*/memo(function (_ref) {
107
107
  }, ___EmotionJSX(EuiIcon, {
108
108
  type: "grabOmnidirectional",
109
109
  size: "s",
110
- css: styles.euiDataGridHeaderCell__actions
110
+ css: [styles.euiDataGridHeaderCell__actions.action, styles.euiDataGridHeaderCell__actions.start, ";label:EuiDataGridHeaderCell;"]
111
111
  })), ___EmotionJSX("div", {
112
112
  css: contentStyles,
113
113
  className: "euiDataGridHeaderCell__content",
114
- title: title
114
+ title: title,
115
+ id: cellContentId,
116
+ "aria-label": displayAsText ? displayAsText : typeof children === 'string' ? children : undefined
115
117
  }, children), sortingArrow, sortingScreenReaderText, hasColumnActions && ___EmotionJSX(ColumnActions, {
116
118
  index: index,
117
119
  id: id,
@@ -251,7 +253,6 @@ EuiDataGridHeaderCell.propTypes = {
251
253
  color: PropTypes.any,
252
254
  "aria-label": PropTypes.string,
253
255
  "aria-labelledby": PropTypes.string,
254
- isDisabled: PropTypes.bool,
255
256
  /**
256
257
  * Overall size of button.
257
258
  * Matches the sizes of other EuiButtons
@@ -281,6 +282,19 @@ EuiDataGridHeaderCell.propTypes = {
281
282
  className: PropTypes.string,
282
283
  "data-test-subj": PropTypes.string,
283
284
  css: PropTypes.any,
285
+ /**
286
+ * Controls the disabled behavior via the native `disabled` attribute.
287
+ */
288
+ isDisabled: PropTypes.bool,
289
+ /**
290
+ * NOTE: Beta feature, may be changed or removed in the future
291
+ *
292
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
293
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
294
+ *
295
+ * Use e.g. when a disabled button should have a tooltip.
296
+ */
297
+ hasAriaDisabled: PropTypes.bool,
284
298
  buttonRef: PropTypes.any
285
299
  }),
286
300
  /**
@@ -334,7 +348,6 @@ EuiDataGridHeaderCell.propTypes = {
334
348
  color: PropTypes.any,
335
349
  "aria-label": PropTypes.string,
336
350
  "aria-labelledby": PropTypes.string,
337
- isDisabled: PropTypes.bool,
338
351
  size: PropTypes.any,
339
352
  iconSize: PropTypes.any,
340
353
  isSelected: PropTypes.bool,
@@ -343,6 +356,8 @@ EuiDataGridHeaderCell.propTypes = {
343
356
  className: PropTypes.string,
344
357
  "data-test-subj": PropTypes.string,
345
358
  css: PropTypes.any,
359
+ isDisabled: PropTypes.bool,
360
+ hasAriaDisabled: PropTypes.bool,
346
361
  buttonRef: PropTypes.any
347
362
  }),
348
363
  onClick: PropTypes.func,
@@ -377,7 +392,6 @@ EuiDataGridHeaderCell.propTypes = {
377
392
  color: PropTypes.any,
378
393
  "aria-label": PropTypes.string,
379
394
  "aria-labelledby": PropTypes.string,
380
- isDisabled: PropTypes.bool,
381
395
  size: PropTypes.any,
382
396
  iconSize: PropTypes.any,
383
397
  isSelected: PropTypes.bool,
@@ -386,6 +400,8 @@ EuiDataGridHeaderCell.propTypes = {
386
400
  className: PropTypes.string,
387
401
  "data-test-subj": PropTypes.string,
388
402
  css: PropTypes.any,
403
+ isDisabled: PropTypes.bool,
404
+ hasAriaDisabled: PropTypes.bool,
389
405
  buttonRef: PropTypes.any
390
406
  }),
391
407
  onClick: PropTypes.func,
@@ -420,7 +436,6 @@ EuiDataGridHeaderCell.propTypes = {
420
436
  color: PropTypes.any,
421
437
  "aria-label": PropTypes.string,
422
438
  "aria-labelledby": PropTypes.string,
423
- isDisabled: PropTypes.bool,
424
439
  size: PropTypes.any,
425
440
  iconSize: PropTypes.any,
426
441
  isSelected: PropTypes.bool,
@@ -429,6 +444,8 @@ EuiDataGridHeaderCell.propTypes = {
429
444
  className: PropTypes.string,
430
445
  "data-test-subj": PropTypes.string,
431
446
  css: PropTypes.any,
447
+ isDisabled: PropTypes.bool,
448
+ hasAriaDisabled: PropTypes.bool,
432
449
  buttonRef: PropTypes.any
433
450
  }),
434
451
  onClick: PropTypes.func,
@@ -463,7 +480,6 @@ EuiDataGridHeaderCell.propTypes = {
463
480
  color: PropTypes.any,
464
481
  "aria-label": PropTypes.string,
465
482
  "aria-labelledby": PropTypes.string,
466
- isDisabled: PropTypes.bool,
467
483
  size: PropTypes.any,
468
484
  iconSize: PropTypes.any,
469
485
  isSelected: PropTypes.bool,
@@ -472,6 +488,8 @@ EuiDataGridHeaderCell.propTypes = {
472
488
  className: PropTypes.string,
473
489
  "data-test-subj": PropTypes.string,
474
490
  css: PropTypes.any,
491
+ isDisabled: PropTypes.bool,
492
+ hasAriaDisabled: PropTypes.bool,
475
493
  buttonRef: PropTypes.any
476
494
  }),
477
495
  onClick: PropTypes.func,
@@ -506,7 +524,6 @@ EuiDataGridHeaderCell.propTypes = {
506
524
  color: PropTypes.any,
507
525
  "aria-label": PropTypes.string,
508
526
  "aria-labelledby": PropTypes.string,
509
- isDisabled: PropTypes.bool,
510
527
  size: PropTypes.any,
511
528
  iconSize: PropTypes.any,
512
529
  isSelected: PropTypes.bool,
@@ -515,6 +532,8 @@ EuiDataGridHeaderCell.propTypes = {
515
532
  className: PropTypes.string,
516
533
  "data-test-subj": PropTypes.string,
517
534
  css: PropTypes.any,
535
+ isDisabled: PropTypes.bool,
536
+ hasAriaDisabled: PropTypes.bool,
518
537
  buttonRef: PropTypes.any
519
538
  }),
520
539
  onClick: PropTypes.func,
@@ -9,7 +9,6 @@
9
9
  import { css } from '@emotion/react';
10
10
  import { euiCanAnimate, euiTextTruncate, logicalCSS, logicalTextAlignCSS } from '../../../../global_styling';
11
11
  import { euiDataGridCellOutlineSelectors } from '../cell/data_grid_cell.styles';
12
-
13
12
  /**
14
13
  * Styles only applied to data header cell content, not control header cells
15
14
  */
@@ -17,11 +16,18 @@ export var euiDataGridHeaderCellStyles = function euiDataGridHeaderCellStyles(eu
17
16
  var euiTheme = euiThemeContext.euiTheme;
18
17
  var _euiDataGridCellOutli = euiDataGridCellOutlineSelectors('.euiDataGridHeaderCell'),
19
18
  header = _euiDataGridCellOutli.header;
19
+ var hideAnimation = function hideAnimation(margin, translateX) {
20
+ return "\n ".concat(header.hideActions, " & {\n ").concat(logicalCSS('margin-left', margin), "\n transform: translateX(").concat(translateX, ") scale(0.01);\n opacity: 0;\n }\n ");
21
+ };
20
22
  return {
21
23
  euiDataGridHeaderCell__content: /*#__PURE__*/css("flex-grow:1;", euiTextTruncate(), ";;label:euiDataGridHeaderCell__content;"),
22
24
  // Numeric and currency schemas are aligned to the right
23
25
  right: /*#__PURE__*/css(logicalTextAlignCSS('right'), ";;label:right;"),
24
26
  euiDataGridHeaderCell__popover: /*#__PURE__*/css(logicalCSS('margin-left', 'auto'), "line-height:0;;label:euiDataGridHeaderCell__popover;"),
25
- euiDataGridHeaderCell__actions: /*#__PURE__*/css("overflow:hidden;display:flex;", header.hideActions, " &{", logicalCSS('width', 0), " opacity:0;}", euiCanAnimate, "{transition:inline-size ", euiTheme.animation.fast, " ease-in,opacity ", euiTheme.animation.slow, " ease-in;transform:none!important;animation:none!important;};label:euiDataGridHeaderCell__actions;")
27
+ euiDataGridHeaderCell__actions: {
28
+ action: /*#__PURE__*/css("overflow:hidden;display:flex;max-inline-size:24px;", euiCanAnimate, "{transition:transform ", euiTheme.animation.fast, " ease-in,opacity ", euiTheme.animation.slow, " ease-in,margin-left ", euiTheme.animation.fast, " ease-in;animation:none!important;};label:action;"),
29
+ start: /*#__PURE__*/css(hideAnimation("-".concat(euiTheme.size.m), '0%'), ";;label:start;"),
30
+ end: /*#__PURE__*/css(hideAnimation("-".concat(euiTheme.size.l), '50%'), ";;label:end;")
31
+ }
26
32
  };
27
33
  };
@@ -1,4 +1,4 @@
1
- var _excluded = ["id", "index", "isLastColumn", "width", "className", "children", "hasColumnActions", "isDragging", "onKeyDown", "aria-label"];
1
+ var _excluded = ["id", "index", "isLastColumn", "width", "className", "children", "hasColumnActions", "isDragging", "onKeyDown", "aria-label", "aria-labelledby"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -41,6 +41,7 @@ export var EuiDataGridHeaderCellWrapper = function EuiDataGridHeaderCellWrapper(
41
41
  isDragging = _ref.isDragging,
42
42
  _onKeyDown = _ref.onKeyDown,
43
43
  ariaLabel = _ref['aria-label'],
44
+ ariaLabelledby = _ref['aria-labelledby'],
44
45
  rest = _objectWithoutProperties(_ref, _excluded);
45
46
  var classes = classnames('euiDataGridHeaderCell', className);
46
47
  var styles = useEuiMemoizedStyles(euiDataGridHeaderCellWrapperStyles);
@@ -106,7 +107,8 @@ export var EuiDataGridHeaderCellWrapper = function EuiDataGridHeaderCellWrapper(
106
107
  style: width != null ? {
107
108
  width: "".concat(width, "px")
108
109
  } : {},
109
- "aria-label": renderFocusTrap ? ariaLabel : undefined
110
+ "aria-label": renderFocusTrap ? ariaLabel : undefined,
111
+ "aria-labelledby": renderFocusTrap ? ariaLabelledby : undefined
110
112
  }, rest), ___EmotionJSX(HandleInteractiveChildren, {
111
113
  cellEl: isDragging ? null : headerEl,
112
114
  renderFocusTrap: isDragging ? false : renderFocusTrap,
@@ -122,6 +124,7 @@ EuiDataGridHeaderCellWrapper.propTypes = {
122
124
  width: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.oneOf([null])]),
123
125
  className: PropTypes.string,
124
126
  "aria-label": PropTypes.any,
127
+ "aria-labelledby": PropTypes.any,
125
128
  hasColumnActions: PropTypes.bool,
126
129
  isDragging: PropTypes.bool,
127
130
  onKeyDown: PropTypes.any
@@ -1,8 +1,8 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
2
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
2
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
4
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
4
5
  function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
5
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
6
6
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
7
7
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
8
8
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -43,31 +43,48 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
43
43
  var id = _ref.id;
44
44
  return id;
45
45
  });
46
- var availableSet = new Set(availableColumnIds);
47
- // Filter visibleColumns to only include existing columns
46
+ // remove duplicate columns to ensure unique columns
47
+ var availableColumnIdsSet = new Set(availableColumnIds);
48
+ if (process.env.NODE_ENV === 'development') {
49
+ if (availableColumnIds.length > availableColumnIdsSet.size) {
50
+ var duplicateIds = [];
51
+ var _iterator = _createForOfIteratorHelper(availableColumnIds),
52
+ _step;
53
+ try {
54
+ var _loop = function _loop() {
55
+ var id = _step.value;
56
+ if (!duplicateIds.includes(id) && availableColumnIds.filter(function (_id) {
57
+ return _id === id;
58
+ }).length > 1) {
59
+ duplicateIds.push(id);
60
+ }
61
+ };
62
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
63
+ _loop();
64
+ }
65
+ } catch (err) {
66
+ _iterator.e(err);
67
+ } finally {
68
+ _iterator.f();
69
+ }
70
+ console.warn("\u26A0\uFE0F EuiDataGrid: Duplicate column IDs detected and removed: ".concat(duplicateIds.join(', '), "."), '\n Column IDs must be unique. Only the first occurrence of each duplicate will be used.');
71
+ }
72
+ }
48
73
  var validVisibleColumns = visibleColumns.filter(function (id) {
49
- return availableSet.has(id);
74
+ return availableColumnIdsSet.has(id);
50
75
  });
51
76
  var visibleSet = new Set(validVisibleColumns);
52
77
  var result = [];
53
78
  var visibleIndex = 0;
54
- var _iterator = _createForOfIteratorHelper(availableColumnIds),
55
- _step;
56
- try {
57
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
58
- var columnId = _step.value;
59
- if (visibleSet.has(columnId)) {
60
- // Replace with next visible column in order
79
+ for (var _i = 0, _arr = _toConsumableArray(availableColumnIdsSet); _i < _arr.length; _i++) {
80
+ var columnId = _arr[_i];
81
+ if (visibleSet.has(columnId)) {
82
+ if (visibleIndex < validVisibleColumns.length) {
61
83
  result.push(validVisibleColumns[visibleIndex++]);
62
- } else {
63
- // Keep hidden column in original position
64
- result.push(columnId);
65
84
  }
85
+ } else {
86
+ result.push(columnId);
66
87
  }
67
- } catch (err) {
68
- _iterator.e(err);
69
- } finally {
70
- _iterator.f();
71
88
  }
72
89
  return result;
73
90
  // doesn't depend on visibleColumns on purpose to keep it an initial state
@@ -132,7 +149,7 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
132
149
  anchorPosition: "downLeft",
133
150
  panelPaddingSize: "none",
134
151
  button: ___EmotionJSX(EuiDataGridToolbarControl, {
135
- badgeContent: numberOfHiddenFields > 0 ? "".concat(orderedVisibleColumns.length, "/").concat(availableColumns.length) : availableColumns.length,
152
+ badgeContent: numberOfHiddenFields > 0 ? "".concat(orderedVisibleColumns.length, "/").concat(sortedColumns.length) : sortedColumns.length,
136
153
  iconType: "tableDensityNormal",
137
154
  "data-test-subj": "dataGridColumnSelectorButton",
138
155
  onClick: function onClick() {