@elastic/eui 109.0.0 → 109.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +1 -1
  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
@@ -143,9 +143,18 @@ EuiSkipLink.propTypes = {
143
143
  */
144
144
  size: PropTypes.any,
145
145
  /**
146
- * `disabled` is also allowed
146
+ * Controls the disabled behavior via the native `disabled` attribute.
147
147
  */
148
148
  isDisabled: PropTypes.bool,
149
+ /**
150
+ * NOTE: Beta feature, may be changed or removed in the future
151
+ *
152
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
153
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
154
+ *
155
+ * Use e.g. when a disabled button should have a tooltip.
156
+ */
157
+ hasAriaDisabled: PropTypes.bool,
149
158
  className: PropTypes.string,
150
159
  "aria-label": PropTypes.string,
151
160
  "data-test-subj": PropTypes.string,
@@ -25,7 +25,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
25
25
  import classNames from 'classnames';
26
26
  import PropTypes from "prop-types";
27
27
  import React, { forwardRef, useEffect, useState } from 'react';
28
- import { useCombinedRefs, useEuiMemoizedStyles, EuiThemeProvider } from '../../services';
28
+ import { useCombinedRefs, useEuiMemoizedStyles, useEuiThemeCSSVariables, EuiThemeProvider } from '../../services';
29
29
  import { EuiScreenReaderOnly } from '../accessibility';
30
30
  import { EuiI18n } from '../i18n';
31
31
  import { useResizeObserver } from '../observer/resize_observer';
@@ -57,6 +57,8 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
57
57
  style = _ref.style,
58
58
  rest = _objectWithoutProperties(_ref, _excluded);
59
59
  var styles = useEuiMemoizedStyles(euiBottomBarStyles);
60
+ var _useEuiThemeCSSVariab = useEuiThemeCSSVariables(),
61
+ setGlobalCSSVariables = _useEuiThemeCSSVariab.setGlobalCSSVariables;
60
62
 
61
63
  // Force some props if `fixed` position, but not if the user has supplied these
62
64
  affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
@@ -71,6 +73,11 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
71
73
  useEffect(function () {
72
74
  if (affordForDisplacement && usePortal) {
73
75
  document.body.style.paddingBottom = "".concat(dimensions.height, "px");
76
+
77
+ // EUI doesn't use this css variable, but it is useful for consumers
78
+ setGlobalCSSVariables({
79
+ '--euiBottomBarOffset': "".concat(dimensions.height, "px")
80
+ });
74
81
  }
75
82
  if (bodyClassName) {
76
83
  document.body.classList.add(bodyClassName);
@@ -78,12 +85,15 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
78
85
  return function () {
79
86
  if (affordForDisplacement && usePortal) {
80
87
  document.body.style.paddingBottom = '';
88
+ setGlobalCSSVariables({
89
+ '--euiBottomBarOffset': null
90
+ });
81
91
  }
82
92
  if (bodyClassName) {
83
93
  document.body.classList.remove(bodyClassName);
84
94
  }
85
95
  };
86
- }, [affordForDisplacement, usePortal, dimensions, bodyClassName]);
96
+ }, [affordForDisplacement, usePortal, dimensions, bodyClassName, setGlobalCSSVariables]);
87
97
  var classes = classNames('euiBottomBar', "euiBottomBar--".concat(position), className);
88
98
  var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize]];
89
99
  var newStyle = _objectSpread({
@@ -82,12 +82,29 @@ EuiButton.propTypes = {
82
82
  */
83
83
  size: PropTypes.any,
84
84
  /**
85
- * `disabled` is also allowed
85
+ * Controls the disabled behavior via the native `disabled` attribute.
86
86
  */
87
87
  /**
88
- * `disabled` is also allowed
88
+ * Controls the disabled behavior via the native `disabled` attribute.
89
89
  */
90
90
  isDisabled: PropTypes.bool,
91
+ /**
92
+ * NOTE: Beta feature, may be changed or removed in the future
93
+ *
94
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
95
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
96
+ *
97
+ * Use e.g. when a disabled button should have a tooltip.
98
+ */
99
+ /**
100
+ * NOTE: Beta feature, may be changed or removed in the future
101
+ *
102
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
103
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
104
+ *
105
+ * Use e.g. when a disabled button should have a tooltip.
106
+ */
107
+ hasAriaDisabled: PropTypes.bool,
91
108
  className: PropTypes.string,
92
109
  "aria-label": PropTypes.string,
93
110
  "data-test-subj": PropTypes.string,
@@ -121,27 +138,5 @@ EuiButton.propTypes = {
121
138
  css: PropTypes.any
122
139
  }),
123
140
  style: PropTypes.any,
124
- type: PropTypes.any,
125
- /**
126
- * Any `type` accepted by EuiIcon
127
- */
128
- iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "anomalyChart", "anomalySwimLane", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "check", "checkCircle", "checkInCircleFilled", "cheer", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "comment", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "diff", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "errorFilled", "esqlVis", "exit", "expand", "expandMini", "export", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "minusInSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusInCircle", "plusInCircleFilled", "plusInSquare", "popout", "push", "question", "quote", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
129
- /**
130
- * Can only be one side `left` or `right`
131
- */
132
- iconSide: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([undefined])]),
133
- /**
134
- * Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
135
- *
136
- * This span wrapper can be removed by passing `textProps={false}`.
137
- */
138
- textProps: PropTypes.oneOfType([PropTypes.shape({
139
- className: PropTypes.string,
140
- "aria-label": PropTypes.string,
141
- "data-test-subj": PropTypes.string,
142
- css: PropTypes.any,
143
- ref: PropTypes.any,
144
- "data-text": PropTypes.string
145
- }).isRequired, PropTypes.oneOf([false])]),
146
- iconSize: PropTypes.any
141
+ type: PropTypes.any
147
142
  };
@@ -1,5 +1,6 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["element", "type", "children", "iconType", "iconSide", "iconSize", "size", "isDisabled", "disabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps", "href", "target", "rel", "style"];
2
+ var _excluded = ["element", "type", "children", "iconType", "iconSide", "iconSize", "size", "isDisabled", "disabled", "hasAriaDisabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps", "href", "target", "rel", "style"],
3
+ _excluded2 = ["ref"];
3
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
6
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -21,10 +22,11 @@ import React, { forwardRef } from 'react';
21
22
  // @ts-ignore module doesn't export `createElement`
22
23
  import PropTypes from "prop-types";
23
24
  import { createElement } from '@emotion/react';
24
- import { getSecureRelForTarget, useEuiMemoizedStyles } from '../../../services';
25
+ import { getSecureRelForTarget, useCombinedRefs, useEuiMemoizedStyles } from '../../../services';
26
+ import { validateHref } from '../../../services/security/href_validator';
27
+ import { useEuiDisabledElement } from '../../../services/hooks/useEuiDisabledElement';
25
28
  import { euiButtonDisplayStyles } from './_button_display.styles';
26
29
  import { EuiButtonDisplayContent } from './_button_display_content';
27
- import { validateHref } from '../../../services/security/href_validator';
28
30
  import { jsx as ___EmotionJSX } from "@emotion/react";
29
31
  var SIZES = ['xs', 's', 'm'];
30
32
 
@@ -59,6 +61,8 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
59
61
  size = _ref2$size === void 0 ? 'm' : _ref2$size,
60
62
  isDisabled = _ref2.isDisabled,
61
63
  disabled = _ref2.disabled,
64
+ _ref2$hasAriaDisabled = _ref2.hasAriaDisabled,
65
+ hasAriaDisabled = _ref2$hasAriaDisabled === void 0 ? false : _ref2$hasAriaDisabled,
62
66
  isLoading = _ref2.isLoading,
63
67
  isSelected = _ref2.isSelected,
64
68
  fullWidth = _ref2.fullWidth,
@@ -75,6 +79,14 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
75
79
  isDisabled: isDisabled || disabled,
76
80
  isLoading: isLoading
77
81
  });
82
+ var _useEuiDisabledElemen = useEuiDisabledElement({
83
+ isDisabled: buttonIsDisabled,
84
+ hasAriaDisabled: hasAriaDisabled,
85
+ onKeyDown: rest.onKeyDown
86
+ }),
87
+ disabledRef = _useEuiDisabledElemen.ref,
88
+ disabledButtonProps = _objectWithoutProperties(_useEuiDisabledElemen, _excluded2);
89
+ var setCombinedRef = useCombinedRefs([disabledRef, ref]);
78
90
  var styles = useEuiMemoizedStyles(euiButtonDisplayStyles);
79
91
  var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && [styles.defaultMinWidth.defaultMinWidth, styles.defaultMinWidth[size]], buttonIsDisabled && styles.isDisabled];
80
92
  var innerNode = ___EmotionJSX(EuiButtonDisplayContent, _extends({
@@ -86,13 +98,14 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
86
98
  textProps: textProps
87
99
  }, contentProps), children);
88
100
  var element = buttonIsDisabled ? 'button' : href ? 'a' : _element;
89
- var elementProps = {};
90
- // Element-specific attributes
101
+ var elementProps = {
102
+ ref: setCombinedRef
103
+ };
104
+ var buttonProps = {};
91
105
  if (element === 'button') {
92
- elementProps = _objectSpread(_objectSpread({}, elementProps), {}, {
93
- disabled: buttonIsDisabled,
106
+ buttonProps = _objectSpread({
94
107
  'aria-pressed': isSelected
95
- });
108
+ }, disabledButtonProps);
96
109
  }
97
110
  var relObj = {};
98
111
  if (href && !buttonIsDisabled) {
@@ -106,13 +119,12 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
106
119
  } else {
107
120
  relObj.type = type;
108
121
  }
109
- return createElement(element, _objectSpread(_objectSpread(_objectSpread({
122
+ return createElement(element, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
110
123
  css: cssStyles,
111
124
  style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
112
125
  minInlineSize: minWidth
113
- }) : style,
114
- ref: ref
115
- }, elementProps), relObj), rest), innerNode);
126
+ }) : style
127
+ }, elementProps), relObj), rest), buttonProps), innerNode);
116
128
  });
117
129
  EuiButtonDisplay.propTypes = {
118
130
  href: PropTypes.string,
@@ -165,28 +177,18 @@ EuiButtonDisplay.propTypes = {
165
177
  style: PropTypes.any,
166
178
  type: PropTypes.any,
167
179
  /**
168
- * Any `type` accepted by EuiIcon
180
+ * Controls the disabled behavior via the native `disabled` attribute.
169
181
  */
170
- iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "anomalyChart", "anomalySwimLane", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "check", "checkCircle", "checkInCircleFilled", "cheer", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "comment", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "diff", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "endpoint", "eql", "eraser", "error", "errorFilled", "esqlVis", "exit", "expand", "expandMini", "export", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "minusInSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusInCircle", "plusInCircleFilled", "plusInSquare", "popout", "push", "question", "quote", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
171
- /**
172
- * Can only be one side `left` or `right`
173
- */
174
- iconSide: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([undefined])]),
182
+ isDisabled: PropTypes.bool,
175
183
  /**
176
- * Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
184
+ * NOTE: Beta feature, may be changed or removed in the future
177
185
  *
178
- * This span wrapper can be removed by passing `textProps={false}`.
186
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
187
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
188
+ *
189
+ * Use e.g. when a disabled button should have a tooltip.
179
190
  */
180
- textProps: PropTypes.oneOfType([PropTypes.shape({
181
- className: PropTypes.string,
182
- "aria-label": PropTypes.string,
183
- "data-test-subj": PropTypes.string,
184
- css: PropTypes.any,
185
- ref: PropTypes.any,
186
- "data-text": PropTypes.string
187
- }).isRequired, PropTypes.oneOf([false])]),
188
- iconSize: PropTypes.any,
189
- isDisabled: PropTypes.bool,
191
+ hasAriaDisabled: PropTypes.bool,
190
192
  className: PropTypes.string,
191
193
  "aria-label": PropTypes.string,
192
194
  "data-test-subj": PropTypes.string,
@@ -15,11 +15,11 @@ export var euiButtonBaseCSS = function euiButtonBaseCSS() {
15
15
  return "\n display: inline-block;\n appearance: none;\n cursor: pointer;\n ".concat(logicalTextAlignCSS('center'), ";\n white-space: nowrap;\n ").concat(logicalCSS('max-width', '100%'), ";\n vertical-align: middle;\n ");
16
16
  };
17
17
  var _ref = process.env.NODE_ENV === "production" ? {
18
- name: "8595p9-isDisabled",
19
- styles: "cursor:not-allowed;label:isDisabled;"
18
+ name: "col2gx-isDisabled",
19
+ styles: "cursor:not-allowed;&[aria-disabled='true']{pointer-events:none;>*{pointer-events:none;}};label:isDisabled;"
20
20
  } : {
21
- name: "8595p9-isDisabled",
22
- styles: "cursor:not-allowed;label:isDisabled;",
21
+ name: "col2gx-isDisabled",
22
+ styles: "cursor:not-allowed;&[aria-disabled='true']{pointer-events:none;>*{pointer-events:none;}};label:isDisabled;",
23
23
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
24
24
  };
25
25
  export var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext) {
@@ -1,5 +1,6 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "color", "size", "flush", "isDisabled", "disabled", "isLoading", "href", "target", "rel", "type", "buttonRef", "contentProps", "textProps", "isSelected"];
2
+ var _excluded = ["children", "className", "iconType", "iconSide", "iconSize", "color", "size", "flush", "isDisabled", "disabled", "hasAriaDisabled", "isLoading", "href", "target", "rel", "type", "buttonRef", "contentProps", "textProps", "isSelected"],
3
+ _excluded2 = ["ref"];
3
4
  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); }
4
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -19,9 +20,10 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
19
20
  import React from 'react';
20
21
  import PropTypes from "prop-types";
21
22
  import classNames from 'classnames';
22
- import { useEuiMemoizedStyles, getSecureRelForTarget } from '../../../services';
23
- import { EuiButtonDisplayContent } from '../button_display/_button_display_content';
23
+ import { useEuiMemoizedStyles, getSecureRelForTarget, useCombinedRefs } from '../../../services';
24
+ import { useEuiDisabledElement } from '../../../services/hooks/useEuiDisabledElement';
24
25
  import { useEuiButtonColorCSS } from '../../../global_styling/mixins/_button';
26
+ import { EuiButtonDisplayContent } from '../button_display/_button_display_content';
25
27
  import { isButtonDisabled } from '../button_display/_button_display';
26
28
  import { euiButtonEmptyStyles } from './button_empty.styles';
27
29
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -48,6 +50,8 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
48
50
  flush = _ref.flush,
49
51
  _isDisabled = _ref.isDisabled,
50
52
  disabled = _ref.disabled,
53
+ _ref$hasAriaDisabled = _ref.hasAriaDisabled,
54
+ hasAriaDisabled = _ref$hasAriaDisabled === void 0 ? false : _ref$hasAriaDisabled,
51
55
  isLoading = _ref.isLoading,
52
56
  href = _ref.href,
53
57
  target = _ref.target,
@@ -64,6 +68,14 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
64
68
  href: href,
65
69
  isLoading: isLoading
66
70
  });
71
+ var _useEuiDisabledElemen = useEuiDisabledElement({
72
+ isDisabled: isDisabled,
73
+ hasAriaDisabled: hasAriaDisabled,
74
+ onKeyDown: rest.onKeyDown
75
+ }),
76
+ disabledRef = _useEuiDisabledElemen.ref,
77
+ disabledButtonProps = _objectWithoutProperties(_useEuiDisabledElemen, _excluded2);
78
+ var setCombinedRef = useCombinedRefs([disabledRef, buttonRef]);
67
79
  var buttonColorStyles = useEuiButtonColorCSS({
68
80
  display: 'empty'
69
81
  });
@@ -99,7 +111,7 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
99
111
  href: href,
100
112
  target: target,
101
113
  rel: secureRel,
102
- ref: buttonRef
114
+ ref: setCombinedRef
103
115
  }, rest), innerNode);
104
116
  }
105
117
  return ___EmotionJSX("button", _extends({
@@ -107,9 +119,9 @@ export var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
107
119
  className: classes,
108
120
  css: cssStyles,
109
121
  type: type,
110
- ref: buttonRef,
122
+ ref: setCombinedRef,
111
123
  "aria-pressed": isSelected
112
- }, rest), innerNode);
124
+ }, rest, disabledButtonProps), innerNode);
113
125
  };
114
126
  EuiButtonEmpty.propTypes = {
115
127
  href: PropTypes.string,
@@ -133,13 +145,6 @@ EuiButtonEmpty.propTypes = {
133
145
  * Ensure the text of the button sits flush to the left, right, or both sides of its container
134
146
  */
135
147
  flush: PropTypes.any,
136
- /**
137
- * `disabled` is also allowed
138
- */
139
- /**
140
- * `disabled` is also allowed
141
- */
142
- isDisabled: PropTypes.bool,
143
148
  /**
144
149
  * Force disables the button and changes the icon to a loading spinner
145
150
  */
@@ -194,8 +199,21 @@ EuiButtonEmpty.propTypes = {
194
199
  "data-text": PropTypes.string
195
200
  }).isRequired, PropTypes.oneOf([false])]),
196
201
  iconSize: PropTypes.any,
202
+ /**
203
+ * Controls the disabled behavior via the native `disabled` attribute.
204
+ */
205
+ isDisabled: PropTypes.bool,
197
206
  className: PropTypes.string,
198
207
  "aria-label": PropTypes.string,
199
208
  "data-test-subj": PropTypes.string,
200
- css: PropTypes.any
209
+ css: PropTypes.any,
210
+ /**
211
+ * NOTE: Beta feature, may be changed or removed in the future
212
+ *
213
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
214
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
215
+ *
216
+ * Use e.g. when a disabled button should have a tooltip.
217
+ */
218
+ hasAriaDisabled: PropTypes.bool
201
219
  };
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "buttonSize", "color", "idSelected", "idToSelectedMap", "isDisabled", "isFullWidth", "isIconOnly", "legend", "name", "onChange", "options", "type"];
1
+ var _excluded = ["className", "buttonSize", "color", "idSelected", "idToSelectedMap", "isDisabled", "hasAriaDisabled", "isFullWidth", "isIconOnly", "legend", "name", "onChange", "options", "type"];
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 _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
4
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
@@ -30,6 +30,8 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
30
30
  idToSelectedMap = _ref$idToSelectedMap === void 0 ? {} : _ref$idToSelectedMap,
31
31
  _ref$isDisabled = _ref.isDisabled,
32
32
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
33
+ _ref$hasAriaDisabled = _ref.hasAriaDisabled,
34
+ hasAriaDisabled = _ref$hasAriaDisabled === void 0 ? false : _ref$hasAriaDisabled,
33
35
  _ref$isFullWidth = _ref.isFullWidth,
34
36
  isFullWidth = _ref$isFullWidth === void 0 ? false : _ref$isFullWidth,
35
37
  _ref$isIconOnly = _ref.isIconOnly,
@@ -49,18 +51,21 @@ export var EuiButtonGroup = function EuiButtonGroup(_ref) {
49
51
  'euiButtonGroup-isDisabled': isDisabled
50
52
  }, className);
51
53
  var typeIsSingle = type === 'single';
54
+ var groupDisabledProps = {
55
+ disabled: hasAriaDisabled ? undefined : isDisabled,
56
+ 'aria-disabled': hasAriaDisabled ? isDisabled : undefined
57
+ };
52
58
  return ___EmotionJSX("fieldset", _extends({
53
59
  css: wrapperCssStyles,
54
60
  className: classes
55
- }, rest, {
56
- disabled: isDisabled
57
- }), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("legend", null, legend)), ___EmotionJSX("div", {
61
+ }, rest, groupDisabledProps), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("legend", null, legend)), ___EmotionJSX("div", {
58
62
  css: cssStyles,
59
63
  className: "euiButtonGroup__buttons"
60
64
  }, options.map(function (option) {
61
65
  return ___EmotionJSX(EuiButtonGroupButton, _extends({
62
66
  key: option.id,
63
- isDisabled: isDisabled
67
+ isDisabled: isDisabled,
68
+ hasAriaDisabled: hasAriaDisabled
64
69
  }, option, {
65
70
  onClick: typeIsSingle ? function () {
66
71
  return onChange(option.id, option.value);
@@ -80,46 +85,50 @@ EuiButtonGroup.propTypes = {
80
85
  "data-test-subj": PropTypes.string,
81
86
  css: PropTypes.any,
82
87
  /**
83
- * Typical sizing is `s`. Medium `m` size should be reserved for major features.
84
- * `compressed` is meant to be used alongside and within compressed forms.
88
+ * Controls the disabled behavior via the native `disabled` attribute.
85
89
  */
86
- buttonSize: PropTypes.oneOf(["s", "m", "compressed"]),
87
90
  isDisabled: PropTypes.bool,
91
+ hasAriaDisabled: PropTypes.bool,
88
92
  /**
89
- * Expands the whole group to the full width of the container.
90
- * Each button gets equal widths no matter the content
91
- */
93
+ * Typical sizing is `s`. Medium `m` size should be reserved for major features.
94
+ * `compressed` is meant to be used alongside and within compressed forms.
95
+ */
96
+ buttonSize: PropTypes.oneOf(["s", "m", "compressed"]),
97
+ /**
98
+ * Expands the whole group to the full width of the container.
99
+ * Each button gets equal widths no matter the content
100
+ */
92
101
  isFullWidth: PropTypes.bool,
93
102
  /**
94
- * Hides the label to only show the `iconType` provided by the `option`
95
- */
103
+ * Hides the label to only show the `iconType` provided by the `option`
104
+ */
96
105
  isIconOnly: PropTypes.bool,
97
106
  /**
98
- * A hidden group title (required for accessibility)
99
- */
107
+ * A hidden group title (required for accessibility)
108
+ */
100
109
  legend: PropTypes.string.isRequired,
101
110
  /**
102
- * Any of the named color palette options.
103
- *
104
- * Do not use the following colors for standalone buttons directly,
105
- * they exist to serve other components:
106
- * - accent
107
- * - warning
108
- */
111
+ * Any of the named color palette options.
112
+ *
113
+ * Do not use the following colors for standalone buttons directly,
114
+ * they exist to serve other components:
115
+ * - accent
116
+ * - warning
117
+ */
109
118
  color: PropTypes.any,
110
119
  /**
111
120
  * Default for `type` is single so it can also be excluded
112
121
  */
113
122
  /**
114
- * Actual type is `'single' | 'multi'`.
115
- * Determines how the selection of the group should be handled.
116
- * With `'single'` only one option can be selected at a time (similar to radio group).
117
- * With `'multi'` multiple options selected (similar to checkbox group).
118
- */
123
+ * Actual type is `'single' | 'multi'`.
124
+ * Determines how the selection of the group should be handled.
125
+ * With `'single'` only one option can be selected at a time (similar to radio group).
126
+ * With `'multi'` multiple options selected (similar to checkbox group).
127
+ */
119
128
  type: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.oneOf(["single", "multi"]), PropTypes.oneOf(["single"])]), PropTypes.oneOf(["multi"])]),
120
129
  /**
121
- * An array of {@link EuiButtonGroupOptionProps}
122
- */
130
+ * An array of {@link EuiButtonGroupOptionProps}
131
+ */
123
132
  options: PropTypes.arrayOf(PropTypes.shape({
124
133
  /**
125
134
  * Each option must have a unique `id` for maintaining selection
@@ -129,7 +138,6 @@ EuiButtonGroup.propTypes = {
129
138
  * Each option must have a `label` even for icons which will be applied as the `aria-label`
130
139
  */
131
140
  label: PropTypes.node.isRequired,
132
- isDisabled: PropTypes.bool,
133
141
  /**
134
142
  * The value of the radio input.
135
143
  */
@@ -175,10 +183,20 @@ EuiButtonGroup.propTypes = {
175
183
  "data-text": PropTypes.string
176
184
  }).isRequired, PropTypes.oneOf([false])]),
177
185
  iconSize: PropTypes.any,
186
+ isDisabled: PropTypes.bool,
178
187
  className: PropTypes.string,
179
188
  "aria-label": PropTypes.string,
180
189
  "data-test-subj": PropTypes.string,
181
- css: PropTypes.any
190
+ css: PropTypes.any,
191
+ /**
192
+ * NOTE: Beta feature, may be changed or removed in the future
193
+ *
194
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
195
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
196
+ *
197
+ * Use e.g. when a disabled button should have a tooltip.
198
+ */
199
+ hasAriaDisabled: PropTypes.bool
182
200
  }).isRequired).isRequired,
183
201
  /**
184
202
  * @deprecated No longer needed. You can safely remove this prop entirely
@@ -57,7 +57,7 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
57
57
  var buttonColorStyles = useEuiButtonColorCSS({
58
58
  display: display
59
59
  })[color];
60
- var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && isCompressed && focusColorStyles[color], hasBorder && styles.hasBorder];
60
+ var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly.iconOnly, isIconOnly && styles.iconOnly[size], !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && isCompressed && focusColorStyles[color], hasBorder && styles.hasBorder];
61
61
  var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
62
62
  var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
63
63
  var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
@@ -107,7 +107,6 @@ EuiButtonGroupButton.propTypes = {
107
107
  * Each option must have a `label` even for icons which will be applied as the `aria-label`
108
108
  */
109
109
  label: PropTypes.node.isRequired,
110
- isDisabled: PropTypes.bool,
111
110
  /**
112
111
  * The value of the radio input.
113
112
  */
@@ -153,10 +152,23 @@ EuiButtonGroupButton.propTypes = {
153
152
  "data-text": PropTypes.string
154
153
  }).isRequired, PropTypes.oneOf([false])]),
155
154
  iconSize: PropTypes.any,
155
+ /**
156
+ * Controls the disabled behavior via the native `disabled` attribute.
157
+ */
158
+ isDisabled: PropTypes.bool,
156
159
  className: PropTypes.string,
157
160
  "aria-label": PropTypes.string,
158
161
  "data-test-subj": PropTypes.string,
159
162
  css: PropTypes.any,
163
+ /**
164
+ * NOTE: Beta feature, may be changed or removed in the future
165
+ *
166
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
167
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
168
+ *
169
+ * Use e.g. when a disabled button should have a tooltip.
170
+ */
171
+ hasAriaDisabled: PropTypes.bool,
160
172
  /**
161
173
  * Styles the selected button to look selected (usually with `fill`)
162
174
  */