@elastic/eui 109.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 (356) hide show
  1. package/es/components/accessibility/skip_link/skip_link.js +10 -1
  2. package/es/components/bottom_bar/bottom_bar.js +12 -2
  3. package/es/components/button/button.js +20 -25
  4. package/es/components/button/button_display/_button_display.js +32 -30
  5. package/es/components/button/button_display/_button_display.styles.js +4 -4
  6. package/es/components/button/button_empty/button_empty.js +32 -14
  7. package/es/components/button/button_group/button_group.js +49 -31
  8. package/es/components/button/button_group/button_group_button.js +14 -2
  9. package/es/components/button/button_group/button_group_button.styles.js +12 -8
  10. package/es/components/button/button_icon/button_icon.js +30 -6
  11. package/es/components/card/card.js +20 -25
  12. package/es/components/card/card_select/card_select.js +20 -25
  13. package/es/components/code/code_block_virtualized.js +9 -7
  14. package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
  15. package/es/components/datagrid/body/cell/data_grid_cell.js +35 -12
  16. package/es/components/datagrid/body/data_grid_body.js +23 -6
  17. package/es/components/datagrid/body/data_grid_body_custom.js +23 -6
  18. package/es/components/datagrid/body/data_grid_body_virtualized.js +23 -6
  19. package/es/components/datagrid/body/header/data_grid_header_cell.js +23 -6
  20. package/es/components/datagrid/controls/column_selector.js +36 -19
  21. package/es/components/datagrid/controls/column_sorting.js +23 -6
  22. package/es/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
  23. package/es/components/datagrid/data_grid.js +5 -1
  24. package/es/components/datagrid/utils/in_memory.js +25 -7
  25. package/es/components/date_picker/auto_refresh/auto_refresh.js +11 -2
  26. package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +31 -5
  27. package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
  28. package/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
  29. package/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
  30. package/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +98 -0
  31. package/es/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +19 -0
  32. package/es/components/date_picker/super_date_picker/pretty_duration.js +1 -8
  33. package/es/components/date_picker/super_date_picker/relative_utils.js +8 -0
  34. package/es/components/date_picker/super_date_picker/super_date_picker.js +118 -26
  35. package/es/components/date_picker/super_date_picker/time_window_buttons.js +185 -0
  36. package/es/components/facet/facet_button.js +9 -19
  37. package/es/components/filter_group/filter_button.js +14 -1
  38. package/es/components/flyout/flyout.js +27 -10
  39. package/es/components/form/form_control_button/form_control_button.js +13 -7
  40. package/es/components/header/header_links/header_link.js +13 -7
  41. package/es/components/header/header_section/header_section_item_button.js +13 -7
  42. package/es/components/icon/assets/boxes_vertical.js +1 -1
  43. package/es/components/icon/assets/checkInCircleFilled.js +1 -2
  44. package/es/components/icon/assets/errorFilled.js +1 -2
  45. package/es/components/icon/assets/warningFilled.js +1 -2
  46. package/es/components/icon/icon_map.js +3 -6
  47. package/es/components/list_group/list_group.js +13 -1
  48. package/es/components/list_group/list_group_item.js +13 -1
  49. package/es/components/list_group/list_group_item_extra_action.js +13 -1
  50. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
  51. package/es/components/overlay_mask/overlay_mask.styles.js +1 -1
  52. package/es/components/pagination/pagination_button.js +13 -7
  53. package/es/components/popover/popover.js +22 -16
  54. package/es/components/provider/component_defaults/component_defaults.js +22 -2
  55. package/es/components/table/table_row.styles.js +1 -1
  56. package/es/components/tool_tip/tool_tip.js +24 -24
  57. package/es/global_styling/index.js +2 -1
  58. package/es/global_styling/mixins/_button.js +1 -1
  59. package/es/global_styling/utility/selectors.js +9 -0
  60. package/es/services/focus_trap/focus_trap_pub_sub.js +74 -0
  61. package/es/services/focus_trap/index.js +9 -0
  62. package/es/services/hooks/index.js +2 -1
  63. package/es/services/hooks/useEuiDisabledElement.js +195 -0
  64. package/es/services/index.js +1 -0
  65. package/es/services/popover/reposition_on_scroll.js +61 -0
  66. package/es/test/cypress/index.d.ts +12 -0
  67. package/es/test/cypress/index.js +9 -0
  68. package/es/test/cypress/matchers.d.ts +20 -0
  69. package/es/test/cypress/matchers.js +54 -0
  70. package/es/test/cypress/test_reposition_on_scroll.js +66 -0
  71. package/es/test/enzyme/enzyme_matchers.d.ts +36 -0
  72. package/es/test/enzyme/enzyme_matchers.js +43 -0
  73. package/es/test/enzyme/index.d.ts +14 -0
  74. package/es/test/enzyme/index.js +10 -0
  75. package/es/test/rtl/index.d.ts +9 -1
  76. package/es/test/rtl/index.js +2 -1
  77. package/es/test/rtl/matchers.d.ts +36 -0
  78. package/es/test/rtl/matchers.js +82 -0
  79. package/es/utils/element_can_be_disabled.js +16 -0
  80. package/es/utils/index.js +2 -1
  81. package/eui.d.ts +588 -180
  82. package/i18ntokens.json +1357 -1231
  83. package/lib/components/accessibility/skip_link/skip_link.js +10 -1
  84. package/lib/components/bottom_bar/bottom_bar.js +11 -1
  85. package/lib/components/button/button.js +21 -26
  86. package/lib/components/button/button_display/_button_display.js +31 -29
  87. package/lib/components/button/button_display/_button_display.styles.js +4 -4
  88. package/lib/components/button/button_empty/button_empty.js +31 -13
  89. package/lib/components/button/button_group/button_group.js +49 -31
  90. package/lib/components/button/button_group/button_group_button.js +14 -2
  91. package/lib/components/button/button_group/button_group_button.styles.js +10 -6
  92. package/lib/components/button/button_icon/button_icon.js +29 -5
  93. package/lib/components/card/card.js +21 -26
  94. package/lib/components/card/card_select/card_select.js +21 -26
  95. package/lib/components/code/code_block_virtualized.js +9 -7
  96. package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
  97. package/lib/components/datagrid/body/cell/data_grid_cell.js +35 -12
  98. package/lib/components/datagrid/body/data_grid_body.js +23 -6
  99. package/lib/components/datagrid/body/data_grid_body_custom.js +23 -6
  100. package/lib/components/datagrid/body/data_grid_body_virtualized.js +23 -6
  101. package/lib/components/datagrid/body/header/data_grid_header_cell.js +23 -6
  102. package/lib/components/datagrid/controls/column_selector.js +36 -19
  103. package/lib/components/datagrid/controls/column_sorting.js +23 -6
  104. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
  105. package/lib/components/datagrid/data_grid.js +5 -1
  106. package/lib/components/datagrid/utils/in_memory.js +25 -7
  107. package/lib/components/date_picker/auto_refresh/auto_refresh.js +12 -3
  108. package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +30 -4
  109. package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
  110. package/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
  111. package/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
  112. package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +104 -0
  113. package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
  114. package/lib/components/date_picker/super_date_picker/pretty_duration.js +2 -9
  115. package/lib/components/date_picker/super_date_picker/relative_utils.js +9 -0
  116. package/lib/components/date_picker/super_date_picker/super_date_picker.js +118 -26
  117. package/lib/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
  118. package/lib/components/facet/facet_button.js +9 -19
  119. package/lib/components/filter_group/filter_button.js +14 -1
  120. package/lib/components/flyout/flyout.js +26 -9
  121. package/lib/components/form/form_control_button/form_control_button.js +13 -7
  122. package/lib/components/header/header_links/header_link.js +13 -7
  123. package/lib/components/header/header_section/header_section_item_button.js +13 -7
  124. package/lib/components/icon/assets/boxes_vertical.js +1 -1
  125. package/lib/components/icon/assets/checkInCircleFilled.js +1 -2
  126. package/lib/components/icon/assets/errorFilled.js +1 -2
  127. package/lib/components/icon/assets/warningFilled.js +1 -2
  128. package/lib/components/icon/icon_map.js +3 -6
  129. package/lib/components/icon/svgs/boxes_vertical.svg +1 -1
  130. package/lib/components/icon/svgs/checkInCircleFilled.svg +1 -1
  131. package/lib/components/icon/svgs/errorFilled.svg +1 -1
  132. package/lib/components/icon/svgs/warningFilled.svg +1 -1
  133. package/lib/components/list_group/list_group.js +13 -1
  134. package/lib/components/list_group/list_group_item.js +13 -1
  135. package/lib/components/list_group/list_group_item_extra_action.js +13 -1
  136. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
  137. package/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
  138. package/lib/components/pagination/pagination_button.js +13 -7
  139. package/lib/components/popover/popover.js +21 -15
  140. package/lib/components/provider/component_defaults/component_defaults.js +22 -2
  141. package/lib/components/table/table_row.styles.js +1 -1
  142. package/lib/components/tool_tip/tool_tip.js +24 -24
  143. package/lib/global_styling/index.js +16 -1
  144. package/lib/global_styling/mixins/_button.js +1 -1
  145. package/lib/global_styling/utility/selectors.js +15 -0
  146. package/lib/services/focus_trap/focus_trap_pub_sub.js +80 -0
  147. package/lib/services/focus_trap/index.js +12 -0
  148. package/lib/services/hooks/index.js +18 -1
  149. package/lib/services/hooks/useEuiDisabledElement.js +199 -0
  150. package/lib/services/index.js +8 -0
  151. package/lib/services/popover/reposition_on_scroll.js +67 -0
  152. package/lib/test/cypress/index.d.ts +12 -0
  153. package/lib/test/cypress/index.js +18 -0
  154. package/lib/test/cypress/matchers.d.ts +20 -0
  155. package/lib/test/cypress/matchers.js +61 -0
  156. package/lib/test/cypress/test_reposition_on_scroll.js +69 -0
  157. package/lib/test/enzyme/enzyme_matchers.d.ts +36 -0
  158. package/lib/test/enzyme/enzyme_matchers.js +49 -0
  159. package/lib/test/enzyme/index.d.ts +14 -0
  160. package/lib/test/enzyme/index.js +24 -0
  161. package/lib/test/rtl/index.d.ts +9 -1
  162. package/lib/test/rtl/index.js +24 -2
  163. package/lib/test/rtl/matchers.d.ts +36 -0
  164. package/lib/test/rtl/matchers.js +86 -0
  165. package/lib/utils/element_can_be_disabled.js +22 -0
  166. package/lib/utils/index.js +14 -1
  167. package/optimize/es/components/bottom_bar/bottom_bar.js +12 -2
  168. package/optimize/es/components/button/button_display/_button_display.js +24 -12
  169. package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
  170. package/optimize/es/components/button/button_empty/button_empty.js +18 -6
  171. package/optimize/es/components/button/button_group/button_group.js +10 -5
  172. package/optimize/es/components/button/button_group/button_group_button.js +1 -1
  173. package/optimize/es/components/button/button_group/button_group_button.styles.js +12 -8
  174. package/optimize/es/components/button/button_icon/button_icon.js +17 -5
  175. package/optimize/es/components/code/code_block_virtualized.js +9 -7
  176. package/optimize/es/components/datagrid/controls/column_selector.js +36 -19
  177. package/optimize/es/components/datagrid/data_grid.js +5 -1
  178. package/optimize/es/components/datagrid/utils/in_memory.js +2 -1
  179. package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -4
  180. package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +5 -2
  181. package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +7 -3
  182. package/optimize/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +10 -2
  183. package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +97 -0
  184. package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +19 -0
  185. package/optimize/es/components/date_picker/super_date_picker/pretty_duration.js +1 -8
  186. package/optimize/es/components/date_picker/super_date_picker/relative_utils.js +8 -0
  187. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +49 -25
  188. package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +185 -0
  189. package/optimize/es/components/flyout/flyout.js +27 -10
  190. package/optimize/es/components/icon/assets/boxes_vertical.js +1 -1
  191. package/optimize/es/components/icon/assets/checkInCircleFilled.js +1 -2
  192. package/optimize/es/components/icon/assets/errorFilled.js +1 -2
  193. package/optimize/es/components/icon/assets/warningFilled.js +1 -2
  194. package/optimize/es/components/icon/icon_map.js +3 -6
  195. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -1
  196. package/optimize/es/components/popover/popover.js +22 -16
  197. package/optimize/es/components/table/table_row.styles.js +1 -1
  198. package/optimize/es/components/tool_tip/tool_tip.js +24 -24
  199. package/optimize/es/global_styling/index.js +2 -1
  200. package/optimize/es/global_styling/mixins/_button.js +1 -1
  201. package/optimize/es/global_styling/utility/selectors.js +9 -0
  202. package/optimize/es/services/focus_trap/focus_trap_pub_sub.js +74 -0
  203. package/optimize/es/services/focus_trap/index.js +9 -0
  204. package/optimize/es/services/hooks/index.js +2 -1
  205. package/optimize/es/services/hooks/useEuiDisabledElement.js +192 -0
  206. package/optimize/es/services/index.js +1 -0
  207. package/optimize/es/services/popover/reposition_on_scroll.js +61 -0
  208. package/optimize/es/test/cypress/index.d.ts +12 -0
  209. package/optimize/es/test/cypress/index.js +9 -0
  210. package/optimize/es/test/cypress/matchers.d.ts +20 -0
  211. package/optimize/es/test/cypress/matchers.js +54 -0
  212. package/optimize/es/test/cypress/test_reposition_on_scroll.js +63 -0
  213. package/optimize/es/test/enzyme/enzyme_matchers.d.ts +36 -0
  214. package/optimize/es/test/enzyme/enzyme_matchers.js +43 -0
  215. package/optimize/es/test/enzyme/index.d.ts +14 -0
  216. package/optimize/es/test/enzyme/index.js +10 -0
  217. package/optimize/es/test/rtl/index.d.ts +9 -1
  218. package/optimize/es/test/rtl/index.js +2 -1
  219. package/optimize/es/test/rtl/matchers.d.ts +36 -0
  220. package/optimize/es/test/rtl/matchers.js +82 -0
  221. package/optimize/es/utils/element_can_be_disabled.js +16 -0
  222. package/optimize/es/utils/index.js +2 -1
  223. package/optimize/lib/components/bottom_bar/bottom_bar.js +11 -1
  224. package/optimize/lib/components/button/button_display/_button_display.js +23 -11
  225. package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
  226. package/optimize/lib/components/button/button_empty/button_empty.js +17 -5
  227. package/optimize/lib/components/button/button_group/button_group.js +10 -5
  228. package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
  229. package/optimize/lib/components/button/button_group/button_group_button.styles.js +10 -6
  230. package/optimize/lib/components/button/button_icon/button_icon.js +16 -4
  231. package/optimize/lib/components/code/code_block_virtualized.js +9 -7
  232. package/optimize/lib/components/datagrid/controls/column_selector.js +36 -19
  233. package/optimize/lib/components/datagrid/data_grid.js +5 -1
  234. package/optimize/lib/components/datagrid/utils/in_memory.js +2 -1
  235. package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +11 -3
  236. package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +5 -2
  237. package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +7 -3
  238. package/optimize/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +10 -2
  239. package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +103 -0
  240. package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
  241. package/optimize/lib/components/date_picker/super_date_picker/pretty_duration.js +2 -9
  242. package/optimize/lib/components/date_picker/super_date_picker/relative_utils.js +9 -0
  243. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +49 -25
  244. package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
  245. package/optimize/lib/components/flyout/flyout.js +26 -9
  246. package/optimize/lib/components/icon/assets/boxes_vertical.js +1 -1
  247. package/optimize/lib/components/icon/assets/checkInCircleFilled.js +1 -2
  248. package/optimize/lib/components/icon/assets/errorFilled.js +1 -2
  249. package/optimize/lib/components/icon/assets/warningFilled.js +1 -2
  250. package/optimize/lib/components/icon/icon_map.js +3 -6
  251. package/optimize/lib/components/icon/svgs/boxes_vertical.svg +1 -1
  252. package/optimize/lib/components/icon/svgs/checkInCircleFilled.svg +1 -1
  253. package/optimize/lib/components/icon/svgs/errorFilled.svg +1 -1
  254. package/optimize/lib/components/icon/svgs/warningFilled.svg +1 -1
  255. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -1
  256. package/optimize/lib/components/popover/popover.js +21 -15
  257. package/optimize/lib/components/table/table_row.styles.js +1 -1
  258. package/optimize/lib/components/tool_tip/tool_tip.js +24 -24
  259. package/optimize/lib/global_styling/index.js +16 -1
  260. package/optimize/lib/global_styling/mixins/_button.js +1 -1
  261. package/optimize/lib/global_styling/utility/selectors.js +15 -0
  262. package/optimize/lib/services/focus_trap/focus_trap_pub_sub.js +80 -0
  263. package/optimize/lib/services/focus_trap/index.js +12 -0
  264. package/optimize/lib/services/hooks/index.js +18 -1
  265. package/optimize/lib/services/hooks/useEuiDisabledElement.js +197 -0
  266. package/optimize/lib/services/index.js +8 -0
  267. package/optimize/lib/services/popover/reposition_on_scroll.js +67 -0
  268. package/optimize/lib/test/cypress/index.d.ts +12 -0
  269. package/optimize/lib/test/cypress/index.js +18 -0
  270. package/optimize/lib/test/cypress/matchers.d.ts +20 -0
  271. package/optimize/lib/test/cypress/matchers.js +61 -0
  272. package/optimize/lib/test/cypress/test_reposition_on_scroll.js +70 -0
  273. package/optimize/lib/test/enzyme/enzyme_matchers.d.ts +36 -0
  274. package/optimize/lib/test/enzyme/enzyme_matchers.js +50 -0
  275. package/optimize/lib/test/enzyme/index.d.ts +14 -0
  276. package/optimize/lib/test/enzyme/index.js +24 -0
  277. package/optimize/lib/test/rtl/index.d.ts +9 -1
  278. package/optimize/lib/test/rtl/index.js +24 -2
  279. package/optimize/lib/test/rtl/matchers.d.ts +36 -0
  280. package/optimize/lib/test/rtl/matchers.js +86 -0
  281. package/optimize/lib/utils/element_can_be_disabled.js +22 -0
  282. package/optimize/lib/utils/index.js +14 -1
  283. package/package.json +3 -2
  284. package/test-env/components/accessibility/skip_link/skip_link.js +10 -1
  285. package/test-env/components/bottom_bar/bottom_bar.js +11 -1
  286. package/test-env/components/button/button.js +21 -26
  287. package/test-env/components/button/button_display/_button_display.js +31 -29
  288. package/test-env/components/button/button_display/_button_display.styles.js +4 -4
  289. package/test-env/components/button/button_empty/button_empty.js +31 -13
  290. package/test-env/components/button/button_group/button_group.js +49 -31
  291. package/test-env/components/button/button_group/button_group_button.js +14 -2
  292. package/test-env/components/button/button_group/button_group_button.styles.js +10 -6
  293. package/test-env/components/button/button_icon/button_icon.js +29 -5
  294. package/test-env/components/card/card.js +21 -26
  295. package/test-env/components/card/card_select/card_select.js +21 -26
  296. package/test-env/components/code/code_block_virtualized.js +9 -7
  297. package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +13 -1
  298. package/test-env/components/datagrid/body/cell/data_grid_cell.js +35 -12
  299. package/test-env/components/datagrid/body/data_grid_body.js +23 -6
  300. package/test-env/components/datagrid/body/data_grid_body_custom.js +23 -6
  301. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +23 -6
  302. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +23 -6
  303. package/test-env/components/datagrid/controls/column_selector.js +36 -19
  304. package/test-env/components/datagrid/controls/column_sorting.js +23 -6
  305. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +13 -7
  306. package/test-env/components/datagrid/data_grid.js +5 -1
  307. package/test-env/components/datagrid/utils/in_memory.js +25 -7
  308. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +12 -3
  309. package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +30 -4
  310. package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +24 -3
  311. package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_content.js +26 -4
  312. package/test-env/components/date_picker/super_date_picker/date_popover/relative_tab.js +29 -3
  313. package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.js +103 -0
  314. package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.styles.js +25 -0
  315. package/test-env/components/date_picker/super_date_picker/pretty_duration.js +2 -9
  316. package/test-env/components/date_picker/super_date_picker/relative_utils.js +9 -0
  317. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +118 -26
  318. package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +193 -0
  319. package/test-env/components/facet/facet_button.js +9 -19
  320. package/test-env/components/filter_group/filter_button.js +14 -1
  321. package/test-env/components/form/form_control_button/form_control_button.js +13 -7
  322. package/test-env/components/header/header_links/header_link.js +13 -7
  323. package/test-env/components/header/header_section/header_section_item_button.js +13 -7
  324. package/test-env/components/icon/assets/boxes_vertical.js +1 -1
  325. package/test-env/components/icon/assets/checkInCircleFilled.js +1 -2
  326. package/test-env/components/icon/assets/errorFilled.js +1 -2
  327. package/test-env/components/icon/assets/warningFilled.js +1 -2
  328. package/test-env/components/icon/icon_map.js +3 -6
  329. package/test-env/components/list_group/list_group.js +13 -1
  330. package/test-env/components/list_group/list_group_item.js +13 -1
  331. package/test-env/components/list_group/list_group_item_extra_action.js +13 -1
  332. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +15 -2
  333. package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -1
  334. package/test-env/components/pagination/pagination_button.js +13 -7
  335. package/test-env/components/popover/popover.js +21 -15
  336. package/test-env/components/provider/component_defaults/component_defaults.js +22 -2
  337. package/test-env/components/table/table_row.styles.js +1 -1
  338. package/test-env/components/tool_tip/tool_tip.js +24 -24
  339. package/test-env/global_styling/index.js +16 -1
  340. package/test-env/global_styling/mixins/_button.js +1 -1
  341. package/test-env/global_styling/utility/selectors.js +15 -0
  342. package/test-env/services/focus_trap/focus_trap_pub_sub.js +80 -0
  343. package/test-env/services/focus_trap/index.js +12 -0
  344. package/test-env/services/hooks/index.js +18 -1
  345. package/test-env/services/hooks/useEuiDisabledElement.js +197 -0
  346. package/test-env/services/index.js +8 -0
  347. package/test-env/services/popover/reposition_on_scroll.js +67 -0
  348. package/test-env/test/cypress/index.js +18 -0
  349. package/test-env/test/cypress/matchers.js +61 -0
  350. package/test-env/test/cypress/test_reposition_on_scroll.js +70 -0
  351. package/test-env/test/enzyme/enzyme_matchers.js +50 -0
  352. package/test-env/test/enzyme/index.js +24 -0
  353. package/test-env/test/rtl/index.js +24 -2
  354. package/test-env/test/rtl/matchers.js +86 -0
  355. package/test-env/utils/element_can_be_disabled.js +22 -0
  356. 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,
@@ -253,7 +253,6 @@ EuiDataGridHeaderCell.propTypes = {
253
253
  color: PropTypes.any,
254
254
  "aria-label": PropTypes.string,
255
255
  "aria-labelledby": PropTypes.string,
256
- isDisabled: PropTypes.bool,
257
256
  /**
258
257
  * Overall size of button.
259
258
  * Matches the sizes of other EuiButtons
@@ -283,6 +282,19 @@ EuiDataGridHeaderCell.propTypes = {
283
282
  className: PropTypes.string,
284
283
  "data-test-subj": PropTypes.string,
285
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,
286
298
  buttonRef: PropTypes.any
287
299
  }),
288
300
  /**
@@ -336,7 +348,6 @@ EuiDataGridHeaderCell.propTypes = {
336
348
  color: PropTypes.any,
337
349
  "aria-label": PropTypes.string,
338
350
  "aria-labelledby": PropTypes.string,
339
- isDisabled: PropTypes.bool,
340
351
  size: PropTypes.any,
341
352
  iconSize: PropTypes.any,
342
353
  isSelected: PropTypes.bool,
@@ -345,6 +356,8 @@ EuiDataGridHeaderCell.propTypes = {
345
356
  className: PropTypes.string,
346
357
  "data-test-subj": PropTypes.string,
347
358
  css: PropTypes.any,
359
+ isDisabled: PropTypes.bool,
360
+ hasAriaDisabled: PropTypes.bool,
348
361
  buttonRef: PropTypes.any
349
362
  }),
350
363
  onClick: PropTypes.func,
@@ -379,7 +392,6 @@ EuiDataGridHeaderCell.propTypes = {
379
392
  color: PropTypes.any,
380
393
  "aria-label": PropTypes.string,
381
394
  "aria-labelledby": PropTypes.string,
382
- isDisabled: PropTypes.bool,
383
395
  size: PropTypes.any,
384
396
  iconSize: PropTypes.any,
385
397
  isSelected: PropTypes.bool,
@@ -388,6 +400,8 @@ EuiDataGridHeaderCell.propTypes = {
388
400
  className: PropTypes.string,
389
401
  "data-test-subj": PropTypes.string,
390
402
  css: PropTypes.any,
403
+ isDisabled: PropTypes.bool,
404
+ hasAriaDisabled: PropTypes.bool,
391
405
  buttonRef: PropTypes.any
392
406
  }),
393
407
  onClick: PropTypes.func,
@@ -422,7 +436,6 @@ EuiDataGridHeaderCell.propTypes = {
422
436
  color: PropTypes.any,
423
437
  "aria-label": PropTypes.string,
424
438
  "aria-labelledby": PropTypes.string,
425
- isDisabled: PropTypes.bool,
426
439
  size: PropTypes.any,
427
440
  iconSize: PropTypes.any,
428
441
  isSelected: PropTypes.bool,
@@ -431,6 +444,8 @@ EuiDataGridHeaderCell.propTypes = {
431
444
  className: PropTypes.string,
432
445
  "data-test-subj": PropTypes.string,
433
446
  css: PropTypes.any,
447
+ isDisabled: PropTypes.bool,
448
+ hasAriaDisabled: PropTypes.bool,
434
449
  buttonRef: PropTypes.any
435
450
  }),
436
451
  onClick: PropTypes.func,
@@ -465,7 +480,6 @@ EuiDataGridHeaderCell.propTypes = {
465
480
  color: PropTypes.any,
466
481
  "aria-label": PropTypes.string,
467
482
  "aria-labelledby": PropTypes.string,
468
- isDisabled: PropTypes.bool,
469
483
  size: PropTypes.any,
470
484
  iconSize: PropTypes.any,
471
485
  isSelected: PropTypes.bool,
@@ -474,6 +488,8 @@ EuiDataGridHeaderCell.propTypes = {
474
488
  className: PropTypes.string,
475
489
  "data-test-subj": PropTypes.string,
476
490
  css: PropTypes.any,
491
+ isDisabled: PropTypes.bool,
492
+ hasAriaDisabled: PropTypes.bool,
477
493
  buttonRef: PropTypes.any
478
494
  }),
479
495
  onClick: PropTypes.func,
@@ -508,7 +524,6 @@ EuiDataGridHeaderCell.propTypes = {
508
524
  color: PropTypes.any,
509
525
  "aria-label": PropTypes.string,
510
526
  "aria-labelledby": PropTypes.string,
511
- isDisabled: PropTypes.bool,
512
527
  size: PropTypes.any,
513
528
  iconSize: PropTypes.any,
514
529
  isSelected: PropTypes.bool,
@@ -517,6 +532,8 @@ EuiDataGridHeaderCell.propTypes = {
517
532
  className: PropTypes.string,
518
533
  "data-test-subj": PropTypes.string,
519
534
  css: PropTypes.any,
535
+ isDisabled: PropTypes.bool,
536
+ hasAriaDisabled: PropTypes.bool,
520
537
  buttonRef: PropTypes.any
521
538
  }),
522
539
  onClick: PropTypes.func,
@@ -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() {
@@ -383,7 +383,6 @@ DataGridSortingControl.propTypes = {
383
383
  color: PropTypes.any,
384
384
  "aria-label": PropTypes.string,
385
385
  "aria-labelledby": PropTypes.string,
386
- isDisabled: PropTypes.bool,
387
386
  /**
388
387
  * Overall size of button.
389
388
  * Matches the sizes of other EuiButtons
@@ -413,6 +412,19 @@ DataGridSortingControl.propTypes = {
413
412
  className: PropTypes.string,
414
413
  "data-test-subj": PropTypes.string,
415
414
  css: PropTypes.any,
415
+ /**
416
+ * Controls the disabled behavior via the native `disabled` attribute.
417
+ */
418
+ isDisabled: PropTypes.bool,
419
+ /**
420
+ * NOTE: Beta feature, may be changed or removed in the future
421
+ *
422
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
423
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
424
+ *
425
+ * Use e.g. when a disabled button should have a tooltip.
426
+ */
427
+ hasAriaDisabled: PropTypes.bool,
416
428
  buttonRef: PropTypes.any
417
429
  }),
418
430
  /**
@@ -466,7 +478,6 @@ DataGridSortingControl.propTypes = {
466
478
  color: PropTypes.any,
467
479
  "aria-label": PropTypes.string,
468
480
  "aria-labelledby": PropTypes.string,
469
- isDisabled: PropTypes.bool,
470
481
  size: PropTypes.any,
471
482
  iconSize: PropTypes.any,
472
483
  isSelected: PropTypes.bool,
@@ -475,6 +486,8 @@ DataGridSortingControl.propTypes = {
475
486
  className: PropTypes.string,
476
487
  "data-test-subj": PropTypes.string,
477
488
  css: PropTypes.any,
489
+ isDisabled: PropTypes.bool,
490
+ hasAriaDisabled: PropTypes.bool,
478
491
  buttonRef: PropTypes.any
479
492
  }),
480
493
  onClick: PropTypes.func,
@@ -509,7 +522,6 @@ DataGridSortingControl.propTypes = {
509
522
  color: PropTypes.any,
510
523
  "aria-label": PropTypes.string,
511
524
  "aria-labelledby": PropTypes.string,
512
- isDisabled: PropTypes.bool,
513
525
  size: PropTypes.any,
514
526
  iconSize: PropTypes.any,
515
527
  isSelected: PropTypes.bool,
@@ -518,6 +530,8 @@ DataGridSortingControl.propTypes = {
518
530
  className: PropTypes.string,
519
531
  "data-test-subj": PropTypes.string,
520
532
  css: PropTypes.any,
533
+ isDisabled: PropTypes.bool,
534
+ hasAriaDisabled: PropTypes.bool,
521
535
  buttonRef: PropTypes.any
522
536
  }),
523
537
  onClick: PropTypes.func,
@@ -552,7 +566,6 @@ DataGridSortingControl.propTypes = {
552
566
  color: PropTypes.any,
553
567
  "aria-label": PropTypes.string,
554
568
  "aria-labelledby": PropTypes.string,
555
- isDisabled: PropTypes.bool,
556
569
  size: PropTypes.any,
557
570
  iconSize: PropTypes.any,
558
571
  isSelected: PropTypes.bool,
@@ -561,6 +574,8 @@ DataGridSortingControl.propTypes = {
561
574
  className: PropTypes.string,
562
575
  "data-test-subj": PropTypes.string,
563
576
  css: PropTypes.any,
577
+ isDisabled: PropTypes.bool,
578
+ hasAriaDisabled: PropTypes.bool,
564
579
  buttonRef: PropTypes.any
565
580
  }),
566
581
  onClick: PropTypes.func,
@@ -595,7 +610,6 @@ DataGridSortingControl.propTypes = {
595
610
  color: PropTypes.any,
596
611
  "aria-label": PropTypes.string,
597
612
  "aria-labelledby": PropTypes.string,
598
- isDisabled: PropTypes.bool,
599
613
  size: PropTypes.any,
600
614
  iconSize: PropTypes.any,
601
615
  isSelected: PropTypes.bool,
@@ -604,6 +618,8 @@ DataGridSortingControl.propTypes = {
604
618
  className: PropTypes.string,
605
619
  "data-test-subj": PropTypes.string,
606
620
  css: PropTypes.any,
621
+ isDisabled: PropTypes.bool,
622
+ hasAriaDisabled: PropTypes.bool,
607
623
  buttonRef: PropTypes.any
608
624
  }),
609
625
  onClick: PropTypes.func,
@@ -638,7 +654,6 @@ DataGridSortingControl.propTypes = {
638
654
  color: PropTypes.any,
639
655
  "aria-label": PropTypes.string,
640
656
  "aria-labelledby": PropTypes.string,
641
- isDisabled: PropTypes.bool,
642
657
  size: PropTypes.any,
643
658
  iconSize: PropTypes.any,
644
659
  isSelected: PropTypes.bool,
@@ -647,6 +662,8 @@ DataGridSortingControl.propTypes = {
647
662
  className: PropTypes.string,
648
663
  "data-test-subj": PropTypes.string,
649
664
  css: PropTypes.any,
665
+ isDisabled: PropTypes.bool,
666
+ hasAriaDisabled: PropTypes.bool,
650
667
  buttonRef: PropTypes.any
651
668
  }),
652
669
  onClick: PropTypes.func,
@@ -74,13 +74,6 @@ EuiDataGridToolbarControl.propTypes = {
74
74
  * Ensure the text of the button sits flush to the left, right, or both sides of its container
75
75
  */
76
76
  flush: PropTypes.any,
77
- /**
78
- * `disabled` is also allowed
79
- */
80
- /**
81
- * `disabled` is also allowed
82
- */
83
- isDisabled: PropTypes.bool,
84
77
  /**
85
78
  * Force disables the button and changes the icon to a loading spinner
86
79
  */
@@ -135,10 +128,23 @@ EuiDataGridToolbarControl.propTypes = {
135
128
  "data-text": PropTypes.string
136
129
  }).isRequired, PropTypes.oneOf([false])]),
137
130
  iconSize: PropTypes.any,
131
+ /**
132
+ * Controls the disabled behavior via the native `disabled` attribute.
133
+ */
134
+ isDisabled: PropTypes.bool,
138
135
  className: PropTypes.string,
139
136
  "aria-label": PropTypes.string,
140
137
  "data-test-subj": PropTypes.string,
141
138
  css: PropTypes.any,
139
+ /**
140
+ * NOTE: Beta feature, may be changed or removed in the future
141
+ *
142
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
143
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
144
+ *
145
+ * Use e.g. when a disabled button should have a tooltip.
146
+ */
147
+ hasAriaDisabled: PropTypes.bool,
142
148
  badgeContent: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.string.isRequired])
143
149
  };
144
150
  var betterScreenReaderSlashes = function betterScreenReaderSlashes(badgeContent) {
@@ -168,7 +168,11 @@ export var EuiDataGrid = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (pr
168
168
  */
169
169
  var displayValues = useMemo(function () {
170
170
  return columns.reduce(function (acc, column) {
171
- return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, column.id, column.displayAsText || column.id));
171
+ // prevent duplicate values
172
+ if (!acc[column.id]) {
173
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, column.id, column.displayAsText || column.id));
174
+ }
175
+ return acc;
172
176
  }, {});
173
177
  }, [columns]);
174
178
  var _useDataGridDisplaySe = useDataGridDisplaySelector(checkOrDefaultToolBarDisplayOptions(toolbarVisibility, 'showDisplaySelector'), gridStyleWithDefaults, _rowHeightsOptions),