@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
@@ -26,6 +26,7 @@ var _date_picker_range = require("../date_picker_range");
26
26
  var _form = require("../../form");
27
27
  var _time_options = require("./time_options");
28
28
  var _pretty_duration = require("./pretty_duration");
29
+ var _time_window_buttons = require("./time_window_buttons");
29
30
  var _async_interval = require("./async_interval");
30
31
  var _super_update_button = require("./super_update_button");
31
32
  var _quick_select_popover = require("./quick_select_popover/quick_select_popover");
@@ -277,7 +278,9 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
277
278
  maxDate = _this$props3.maxDate,
278
279
  compressed = _this$props3.compressed,
279
280
  onFocus = _this$props3.onFocus,
280
- styles = _this$props3.memoizedStyles;
281
+ styles = _this$props3.memoizedStyles,
282
+ _this$props3$timeZone = _this$props3.timeZoneDisplayProps,
283
+ timeZoneDisplayProps = _this$props3$timeZone === void 0 ? {} : _this$props3$timeZone;
281
284
  var autoRefreshAppend = !isPaused ? (0, _react2.jsx)(_auto_refresh.EuiAutoRefreshButton, {
282
285
  refreshInterval: refreshInterval,
283
286
  minInterval: refreshMinInterval,
@@ -354,7 +357,8 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
354
357
  timeOptions: timeOptions,
355
358
  buttonProps: {
356
359
  onFocus: onFocus
357
- }
360
+ },
361
+ timeZoneDisplayProps: timeZoneDisplayProps
358
362
  }),
359
363
  endDateControl: isQuickSelectOnly ? undefined : (0, _react2.jsx)(_date_popover_button.EuiDatePopoverButton, {
360
364
  css: styles.euiSuperDatePicker__rangeInput,
@@ -379,7 +383,8 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
379
383
  timeOptions: timeOptions,
380
384
  buttonProps: {
381
385
  onFocus: onFocus
382
- }
386
+ },
387
+ timeZoneDisplayProps: timeZoneDisplayProps
383
388
  })
384
389
  }));
385
390
  });
@@ -399,13 +404,32 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
399
404
  _this.applyTime();
400
405
  }
401
406
  });
402
- (0, _defineProperty2.default)(_this, "renderUpdateButton", function () {
407
+ (0, _defineProperty2.default)(_this, "renderTimeWindowButtons", function () {
408
+ if (!_this.props.showTimeWindowButtons || _this.props.isAutoRefreshOnly) {
409
+ return null;
410
+ }
403
411
  var _this$props5 = _this.props,
404
- isLoading = _this$props5.isLoading,
405
- isDisabled = _this$props5.isDisabled,
406
- updateButtonProps = _this$props5.updateButtonProps,
407
- showUpdateButton = _this$props5.showUpdateButton,
408
- compressed = _this$props5.compressed;
412
+ start = _this$props5.start,
413
+ end = _this$props5.end,
414
+ showTimeWindowButtons = _this$props5.showTimeWindowButtons,
415
+ compressed = _this$props5.compressed,
416
+ isDisabled = _this$props5.isDisabled;
417
+ var config = typeof showTimeWindowButtons === 'boolean' ? {} : showTimeWindowButtons;
418
+ return (0, _react2.jsx)(_time_window_buttons.EuiTimeWindowButtons, (0, _extends2.default)({
419
+ applyTime: _this.applyQuickTime,
420
+ start: start,
421
+ end: end,
422
+ compressed: compressed,
423
+ isDisabled: !!isDisabled || _this.state.isInvalid
424
+ }, config));
425
+ });
426
+ (0, _defineProperty2.default)(_this, "renderUpdateButton", function () {
427
+ var _this$props6 = _this.props,
428
+ isLoading = _this$props6.isLoading,
429
+ isDisabled = _this$props6.isDisabled,
430
+ updateButtonProps = _this$props6.updateButtonProps,
431
+ showUpdateButton = _this$props6.showUpdateButton,
432
+ compressed = _this$props6.compressed;
409
433
  if (!showUpdateButton) return null;
410
434
  return (0, _react2.jsx)(_super_update_button.EuiSuperUpdateButton, (0, _extends2.default)({
411
435
  needsUpdate: _this.state.hasChanged,
@@ -424,21 +448,21 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
424
448
  return (0, _createClass2.default)(EuiSuperDatePickerInternal, [{
425
449
  key: "render",
426
450
  value: function render() {
427
- var _this$props6 = this.props,
428
- isAutoRefreshOnly = _this$props6.isAutoRefreshOnly,
429
- isDisabled = _this$props6.isDisabled,
430
- isPaused = _this$props6.isPaused,
431
- onRefreshChange = _this$props6.onRefreshChange,
432
- refreshInterval = _this$props6.refreshInterval,
433
- refreshMinInterval = _this$props6.refreshMinInterval,
434
- refreshIntervalUnits = _this$props6.refreshIntervalUnits,
435
- showUpdateButton = _this$props6.showUpdateButton,
436
- dataTestSubj = _this$props6['data-test-subj'],
437
- _width = _this$props6.width,
438
- isQuickSelectOnly = _this$props6.isQuickSelectOnly,
439
- compressed = _this$props6.compressed,
440
- className = _this$props6.className,
441
- styles = _this$props6.memoizedStyles;
451
+ var _this$props7 = this.props,
452
+ isAutoRefreshOnly = _this$props7.isAutoRefreshOnly,
453
+ isDisabled = _this$props7.isDisabled,
454
+ isPaused = _this$props7.isPaused,
455
+ onRefreshChange = _this$props7.onRefreshChange,
456
+ refreshInterval = _this$props7.refreshInterval,
457
+ refreshMinInterval = _this$props7.refreshMinInterval,
458
+ refreshIntervalUnits = _this$props7.refreshIntervalUnits,
459
+ showUpdateButton = _this$props7.showUpdateButton,
460
+ dataTestSubj = _this$props7['data-test-subj'],
461
+ _width = _this$props7.width,
462
+ isQuickSelectOnly = _this$props7.isQuickSelectOnly,
463
+ compressed = _this$props7.compressed,
464
+ className = _this$props7.className,
465
+ styles = _this$props7.memoizedStyles;
442
466
  var _this$state2 = this.state,
443
467
  hasChanged = _this$state2.hasChanged,
444
468
  isInvalid = _this$state2.isInvalid;
@@ -463,7 +487,7 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
463
487
  compressed: compressed,
464
488
  isDisabled: !!isDisabled,
465
489
  className: className
466
- }) : (0, _react2.jsx)(_react.default.Fragment, null, this.renderDatePickerRange(), this.renderUpdateButton()));
490
+ }) : (0, _react2.jsx)(_react.default.Fragment, null, this.renderDatePickerRange(), this.renderTimeWindowButtons(), this.renderUpdateButton()));
467
491
  }
468
492
  }], [{
469
493
  key: "getDerivedStateFromProps",
@@ -626,6 +650,28 @@ EuiSuperDatePickerInternal.propTypes = {
626
650
  * @default true
627
651
  */
628
652
  showUpdateButton: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.oneOf(["iconOnly"])]),
653
+ /**
654
+ * Set to true to display buttons for time shifting and zooming out,
655
+ * next to the top-level control.
656
+ */
657
+ showTimeWindowButtons: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
658
+ /**
659
+ * Show button for zooming out
660
+ * @default true
661
+ */
662
+ showZoomOut: _propTypes.default.bool,
663
+ /**
664
+ * Show buttons for shifting the time window forward and backward
665
+ * @default true
666
+ */
667
+ showShiftArrows: _propTypes.default.bool,
668
+ /**
669
+ * How much the time window is increased when zooming.
670
+ * A number between 0 and 1 e.g. 0.25, or a string representing a percentage e.g. 25%
671
+ * @default 0.5
672
+ * */
673
+ zoomFactor: _propTypes.default.oneOfType([_propTypes.default.number.isRequired, _propTypes.default.string.isRequired])
674
+ }).isRequired]),
629
675
  /**
630
676
  * Hides the actual input reducing to just the quick select button.
631
677
  */
@@ -672,6 +718,31 @@ EuiSuperDatePickerInternal.propTypes = {
672
718
  * input by the user, set this flag to `false`.
673
719
  */
674
720
  canRoundRelativeUnits: _propTypes.default.bool,
721
+ /**
722
+ * Props passed to the time zone display in the popovers {@link EuiTimeZoneDisplayProps}
723
+ *
724
+ * Setting `timeZoneDisplayProps.timeZone` with a valid time zone name will make
725
+ * the time zone information be visible below the start and end input fields.
726
+ * This is informational only, it will not affect how date/times are handled.
727
+ */
728
+ timeZoneDisplayProps: _propTypes.default.shape({
729
+ /**
730
+ * A valid time zone name, from the IANA database, e.g. "America/Los_Angeles".
731
+ *
732
+ * @link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
733
+ */
734
+ timeZone: _propTypes.default.string,
735
+ /**
736
+ * Render prop function to add additional content to the time zone display.
737
+ * Useful for e.g. adding links to documentation or setting pages.
738
+ */
739
+ customRender: _propTypes.default.func,
740
+ /**
741
+ * Reference date to be used while resolving the UTC offset.
742
+ * Only useful for edge cases involving daylight saving time.
743
+ */
744
+ date: _propTypes.default.any
745
+ }),
675
746
  memoizedStyles: _propTypes.default.any.isRequired,
676
747
  timeOptions: _propTypes.default.shape({
677
748
  timeTenseOptions: _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired,
@@ -821,6 +892,15 @@ EuiSuperDatePicker.propTypes = {
821
892
  * @default true
822
893
  */
823
894
  showUpdateButton: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.oneOf(["iconOnly"])]),
895
+ /**
896
+ * Set to true to display buttons for time shifting and zooming out,
897
+ * next to the top-level control.
898
+ */
899
+ showTimeWindowButtons: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
900
+ showZoomOut: _propTypes.default.bool,
901
+ showShiftArrows: _propTypes.default.bool,
902
+ zoomFactor: _propTypes.default.oneOfType([_propTypes.default.number.isRequired, _propTypes.default.string.isRequired])
903
+ }).isRequired]),
824
904
  /**
825
905
  * Hides the actual input reducing to just the quick select button.
826
906
  */
@@ -846,5 +926,17 @@ EuiSuperDatePicker.propTypes = {
846
926
  * If you do not want this behavior and instead wish to keep the exact units
847
927
  * input by the user, set this flag to `false`.
848
928
  */
849
- canRoundRelativeUnits: _propTypes.default.bool
929
+ canRoundRelativeUnits: _propTypes.default.bool,
930
+ /**
931
+ * Props passed to the time zone display in the popovers {@link EuiTimeZoneDisplayProps}
932
+ *
933
+ * Setting `timeZoneDisplayProps.timeZone` with a valid time zone name will make
934
+ * the time zone information be visible below the start and end input fields.
935
+ * This is informational only, it will not affect how date/times are handled.
936
+ */
937
+ timeZoneDisplayProps: _propTypes.default.shape({
938
+ timeZone: _propTypes.default.string,
939
+ customRender: _propTypes.default.func,
940
+ date: _propTypes.default.any
941
+ })
850
942
  };
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.ZOOM_FACTOR_DEFAULT = exports.EuiTimeWindowButtons = void 0;
8
+ exports.useEuiTimeWindow = useEuiTimeWindow;
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _datemath = _interopRequireDefault(require("@elastic/datemath"));
11
+ var _moment = _interopRequireDefault(require("moment"));
12
+ var _pretty_interval = require("./pretty_interval");
13
+ var _relative_utils = require("./relative_utils");
14
+ var _button_group_button = require("../../button/button_group/button_group_button");
15
+ var _button_group = require("../../button/button_group/button_group.styles");
16
+ var _services = require("../../../services");
17
+ var _i18n = require("../../i18n");
18
+ var _react2 = require("@emotion/react");
19
+ /*
20
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
21
+ * or more contributor license agreements. Licensed under the Elastic License
22
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
23
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
24
+ * Side Public License, v 1.
25
+ */
26
+
27
+ var ZOOM_FACTOR_DEFAULT = exports.ZOOM_FACTOR_DEFAULT = 0.5;
28
+ /**
29
+ * Button group with time window controls for shifting the time window
30
+ * forwards and backwards, and zooming out.
31
+ */
32
+ var EuiTimeWindowButtons = exports.EuiTimeWindowButtons = function EuiTimeWindowButtons(_ref) {
33
+ var applyTime = _ref.applyTime,
34
+ start = _ref.start,
35
+ end = _ref.end,
36
+ compressed = _ref.compressed,
37
+ isDisabled = _ref.isDisabled,
38
+ _ref$showZoomOut = _ref.showZoomOut,
39
+ showZoomOut = _ref$showZoomOut === void 0 ? true : _ref$showZoomOut,
40
+ _ref$showShiftArrows = _ref.showShiftArrows,
41
+ showShiftArrows = _ref$showShiftArrows === void 0 ? true : _ref$showShiftArrows,
42
+ _ref$zoomFactor = _ref.zoomFactor,
43
+ zoomFactor = _ref$zoomFactor === void 0 ? ZOOM_FACTOR_DEFAULT : _ref$zoomFactor;
44
+ var buttonColor = 'text';
45
+ var buttonSize = compressed ? 's' : 'm';
46
+ var iconSize = compressed ? 's' : 'm';
47
+ var styles = (0, _services.useEuiMemoizedStyles)(_button_group.euiButtonGroupButtonsStyles);
48
+ var _useEuiTimeWindow = useEuiTimeWindow(start, end, applyTime, {
49
+ zoomFactor: zoomFactor
50
+ }),
51
+ displayInterval = _useEuiTimeWindow.displayInterval,
52
+ isInvalid = _useEuiTimeWindow.isInvalid,
53
+ stepForward = _useEuiTimeWindow.stepForward,
54
+ stepBackward = _useEuiTimeWindow.stepBackward,
55
+ expandWindow = _useEuiTimeWindow.expandWindow;
56
+ var invalidShiftDescription = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.invalidShiftLabel', 'Cannot shift invalid time window');
57
+ var invalidZoomOutDescription = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.invalidZoomOutLabel', 'Cannot zoom out invalid time window');
58
+ var previousId = (0, _services.useGeneratedHtmlId)({
59
+ prefix: 'previous'
60
+ });
61
+ var previousLabel = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.previousLabel', 'Previous');
62
+ var previousTooltipContent = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.previousDescription', 'Previous {displayInterval}', {
63
+ displayInterval: displayInterval
64
+ });
65
+ var zoomOutId = (0, _services.useGeneratedHtmlId)({
66
+ prefix: 'zoom_out'
67
+ });
68
+ var zoomOutLabel = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.zoomOutLabel', 'Zoom out');
69
+ var zoomOutTooltipContent = isInvalid ? invalidZoomOutDescription : zoomOutLabel;
70
+ var nextId = (0, _services.useGeneratedHtmlId)({
71
+ prefix: 'next'
72
+ });
73
+ var nextLabel = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.nextLabel', 'Next');
74
+ var nextTooltipContent = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.nextDescription', 'Next {displayInterval}', {
75
+ displayInterval: displayInterval
76
+ });
77
+ if (!showZoomOut && !showShiftArrows) return null;
78
+ return (0, _react2.jsx)("div", {
79
+ className: "euiSuperDatePicker__timeWindowButtons",
80
+ css: [styles.euiButtonGroup__buttons, styles[buttonSize], ";label:EuiTimeWindowButtons;"],
81
+ "data-test-subj": "timeWindowButtons"
82
+ }, showShiftArrows && (0, _react2.jsx)(_button_group_button.EuiButtonGroupButton, {
83
+ id: previousId,
84
+ "data-test-subj": "timeWindowButtonsPrevious",
85
+ label: previousLabel,
86
+ title: "",
87
+ toolTipContent: !isDisabled && (isInvalid ? invalidShiftDescription : previousTooltipContent),
88
+ color: buttonColor,
89
+ size: buttonSize,
90
+ iconType: "arrowLeft",
91
+ iconSize: iconSize,
92
+ isIconOnly: true,
93
+ isSelected: false,
94
+ isDisabled: isDisabled,
95
+ onClick: stepBackward
96
+ }), showZoomOut && (0, _react2.jsx)(_button_group_button.EuiButtonGroupButton, {
97
+ id: zoomOutId,
98
+ "data-test-subj": "timeWindowButtonsZoomOut",
99
+ label: zoomOutLabel,
100
+ title: "",
101
+ toolTipContent: !isDisabled && zoomOutTooltipContent,
102
+ toolTipProps: {
103
+ disableScreenReaderOutput: zoomOutLabel === zoomOutTooltipContent
104
+ },
105
+ color: buttonColor,
106
+ size: buttonSize,
107
+ iconType: "magnifyWithMinus",
108
+ iconSize: iconSize,
109
+ isIconOnly: true,
110
+ isSelected: false,
111
+ isDisabled: isDisabled,
112
+ onClick: expandWindow
113
+ }), showShiftArrows && (0, _react2.jsx)(_button_group_button.EuiButtonGroupButton, {
114
+ id: nextId,
115
+ "data-test-subj": "timeWindowButtonsNext",
116
+ label: nextLabel,
117
+ title: "",
118
+ toolTipContent: !isDisabled && (isInvalid ? invalidShiftDescription : nextTooltipContent),
119
+ color: buttonColor,
120
+ size: buttonSize,
121
+ iconType: "arrowRight",
122
+ iconSize: iconSize,
123
+ isIconOnly: true,
124
+ isSelected: false,
125
+ isDisabled: isDisabled,
126
+ onClick: stepForward
127
+ }));
128
+ };
129
+
130
+ /**
131
+ * Partly adapted from date_picker/super_date_picker/quick_select_popover/quick_select.tsx
132
+ */
133
+ function useEuiTimeWindow(start, end, apply, options) {
134
+ var _options$zoomFactor;
135
+ var min = _datemath.default.parse(start);
136
+ var max = _datemath.default.parse(end, {
137
+ roundUp: true
138
+ });
139
+ var isInvalid = !min || !min.isValid() || !max || !max.isValid();
140
+ var windowDuration = isInvalid ? 1 : max.diff(min);
141
+ var zoomFactor = getPercentageMultiplier((_options$zoomFactor = options === null || options === void 0 ? void 0 : options.zoomFactor) !== null && _options$zoomFactor !== void 0 ? _options$zoomFactor : ZOOM_FACTOR_DEFAULT);
142
+ var zoomAddition = windowDuration * (zoomFactor / 2); // Gets added to each end, that's why it's split in half
143
+ var prettyInterval = (0, _pretty_interval.usePrettyInterval)(false, windowDuration);
144
+ var displayInterval = isInvalid ? '' : prettyInterval;
145
+ if (!isInvalid && !(0, _relative_utils.isRelativeToNow)(start, end) && !isExactMinuteRange(windowDuration)) {
146
+ displayInterval = "~".concat(displayInterval);
147
+ }
148
+ return {
149
+ displayInterval: displayInterval,
150
+ isInvalid: isInvalid,
151
+ stepForward: stepForward,
152
+ stepBackward: stepBackward,
153
+ expandWindow: expandWindow
154
+ };
155
+ function stepForward() {
156
+ if (isInvalid) return;
157
+ apply({
158
+ start: (0, _moment.default)(max).toISOString(),
159
+ end: (0, _moment.default)(max).add(windowDuration, 'ms').toISOString()
160
+ });
161
+ }
162
+ function stepBackward() {
163
+ if (isInvalid) return;
164
+ apply({
165
+ start: (0, _moment.default)(min).subtract(windowDuration, 'ms').toISOString(),
166
+ end: (0, _moment.default)(min).toISOString()
167
+ });
168
+ }
169
+ function expandWindow() {
170
+ if (isInvalid) return;
171
+ apply({
172
+ start: (0, _moment.default)(min).subtract(zoomAddition, 'ms').toISOString(),
173
+ end: (0, _moment.default)(max).add(zoomAddition, 'ms').toISOString()
174
+ });
175
+ }
176
+ }
177
+
178
+ /**
179
+ * Get a number out of either 0.2 or "20%"
180
+ */
181
+ function getPercentageMultiplier(value) {
182
+ var result = typeof value === 'number' ? value : parseFloat(String(value).replace('%', '').trim());
183
+ if (isNaN(result)) throw new TypeError('Please provide a valid number or percentage string e.g. "25%"');
184
+ return result > 1 ? result / 100 : result;
185
+ }
186
+
187
+ /**
188
+ * Useful to determine whether to show the tilde in the display
189
+ */
190
+ function isExactMinuteRange(diffMs) {
191
+ // 60 * 1000 = ms per minute
192
+ return diffMs % (60 * 1000) === 0;
193
+ }
@@ -113,6 +113,9 @@ EuiFacetButton.propTypes = {
113
113
  * Any node, but preferably a `EuiIcon` or `EuiAvatar`
114
114
  */
115
115
  icon: _propTypes.default.node,
116
+ /**
117
+ * Controls the disabled behavior via the native `disabled` attribute.
118
+ */
116
119
  isDisabled: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.bool]),
117
120
  /**
118
121
  * Force disables the button and changes the icon to a loading spinner
@@ -155,27 +158,14 @@ EuiFacetButton.propTypes = {
155
158
  style: _propTypes.default.any,
156
159
  type: _propTypes.default.any,
157
160
  /**
158
- * Any `type` accepted by EuiIcon
159
- */
160
- iconType: _propTypes.default.oneOfType([_propTypes.default.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.default.string.isRequired, _propTypes.default.elementType.isRequired]),
161
- /**
162
- * Can only be one side `left` or `right`
163
- */
164
- iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
165
- /**
166
- * Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
161
+ * NOTE: Beta feature, may be changed or removed in the future
162
+ *
163
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
164
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
167
165
  *
168
- * This span wrapper can be removed by passing `textProps={false}`.
166
+ * Use e.g. when a disabled button should have a tooltip.
169
167
  */
170
- textProps: _propTypes.default.oneOfType([_propTypes.default.shape({
171
- className: _propTypes.default.string,
172
- "aria-label": _propTypes.default.string,
173
- "data-test-subj": _propTypes.default.string,
174
- css: _propTypes.default.any,
175
- ref: _propTypes.default.any,
176
- "data-text": _propTypes.default.string
177
- }).isRequired, _propTypes.default.oneOf([false])]),
178
- iconSize: _propTypes.default.any,
168
+ hasAriaDisabled: _propTypes.default.bool,
179
169
  className: _propTypes.default.string,
180
170
  "aria-label": _propTypes.default.string,
181
171
  "data-test-subj": _propTypes.default.string,
@@ -225,5 +225,18 @@ EuiFilterButton.propTypes = {
225
225
  * - accent
226
226
  * - warning
227
227
  */
228
- color: _propTypes.default.any
228
+ color: _propTypes.default.any,
229
+ /**
230
+ * Controls the disabled behavior via the native `disabled` attribute.
231
+ */
232
+ isDisabled: _propTypes.default.bool,
233
+ /**
234
+ * NOTE: Beta feature, may be changed or removed in the future
235
+ *
236
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
237
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
238
+ *
239
+ * Use e.g. when a disabled button should have a tooltip.
240
+ */
241
+ hasAriaDisabled: _propTypes.default.bool
229
242
  };
@@ -100,13 +100,6 @@ EuiFormControlButton.propTypes = {
100
100
  fullWidth: _propTypes.default.bool,
101
101
  href: _propTypes.default.string,
102
102
  onClick: _propTypes.default.func,
103
- /**
104
- * `disabled` is also allowed
105
- */
106
- /**
107
- * `disabled` is also allowed
108
- */
109
- isDisabled: _propTypes.default.bool,
110
103
  target: _propTypes.default.string,
111
104
  rel: _propTypes.default.string,
112
105
  type: _propTypes.default.any,
@@ -145,10 +138,23 @@ EuiFormControlButton.propTypes = {
145
138
  "data-text": _propTypes.default.string
146
139
  }).isRequired, _propTypes.default.oneOf([false])]),
147
140
  iconSize: _propTypes.default.any,
141
+ /**
142
+ * Controls the disabled behavior via the native `disabled` attribute.
143
+ */
144
+ isDisabled: _propTypes.default.bool,
148
145
  className: _propTypes.default.string,
149
146
  "aria-label": _propTypes.default.string,
150
147
  "data-test-subj": _propTypes.default.string,
151
148
  css: _propTypes.default.any,
149
+ /**
150
+ * NOTE: Beta feature, may be changed or removed in the future
151
+ *
152
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
153
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
154
+ *
155
+ * Use e.g. when a disabled button should have a tooltip.
156
+ */
157
+ hasAriaDisabled: _propTypes.default.bool,
152
158
  /**
153
159
  * Defines the button label when used like an input in combination with `placeholder`
154
160
  */
@@ -38,13 +38,6 @@ var EuiHeaderLink = exports.EuiHeaderLink = function EuiHeaderLink(_ref) {
38
38
  EuiHeaderLink.propTypes = {
39
39
  href: _propTypes.default.string,
40
40
  onClick: _propTypes.default.func,
41
- /**
42
- * `disabled` is also allowed
43
- */
44
- /**
45
- * `disabled` is also allowed
46
- */
47
- isDisabled: _propTypes.default.bool,
48
41
  target: _propTypes.default.string,
49
42
  rel: _propTypes.default.string,
50
43
  type: _propTypes.default.any,
@@ -83,10 +76,23 @@ EuiHeaderLink.propTypes = {
83
76
  "data-text": _propTypes.default.string
84
77
  }).isRequired, _propTypes.default.oneOf([false])]),
85
78
  iconSize: _propTypes.default.any,
79
+ /**
80
+ * Controls the disabled behavior via the native `disabled` attribute.
81
+ */
82
+ isDisabled: _propTypes.default.bool,
86
83
  className: _propTypes.default.string,
87
84
  "aria-label": _propTypes.default.string,
88
85
  "data-test-subj": _propTypes.default.string,
89
86
  css: _propTypes.default.any,
87
+ /**
88
+ * NOTE: Beta feature, may be changed or removed in the future
89
+ *
90
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
91
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
92
+ *
93
+ * Use e.g. when a disabled button should have a tooltip.
94
+ */
95
+ hasAriaDisabled: _propTypes.default.bool,
90
96
  /**
91
97
  * Simple prop to update color based on active state.
92
98
  * Can be overridden with `color`
@@ -182,13 +182,6 @@ ref) {
182
182
  EuiHeaderSectionItemButton.propTypes = {
183
183
  href: _propTypes.default.string,
184
184
  onClick: _propTypes.default.func,
185
- /**
186
- * `disabled` is also allowed
187
- */
188
- /**
189
- * `disabled` is also allowed
190
- */
191
- isDisabled: _propTypes.default.bool,
192
185
  target: _propTypes.default.string,
193
186
  rel: _propTypes.default.string,
194
187
  type: _propTypes.default.any,
@@ -227,10 +220,23 @@ EuiHeaderSectionItemButton.propTypes = {
227
220
  "data-text": _propTypes.default.string
228
221
  }).isRequired, _propTypes.default.oneOf([false])]),
229
222
  iconSize: _propTypes.default.any,
223
+ /**
224
+ * Controls the disabled behavior via the native `disabled` attribute.
225
+ */
226
+ isDisabled: _propTypes.default.bool,
230
227
  className: _propTypes.default.string,
231
228
  "aria-label": _propTypes.default.string,
232
229
  "data-test-subj": _propTypes.default.string,
233
230
  css: _propTypes.default.any,
231
+ /**
232
+ * NOTE: Beta feature, may be changed or removed in the future
233
+ *
234
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
235
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
236
+ *
237
+ * Use e.g. when a disabled button should have a tooltip.
238
+ */
239
+ hasAriaDisabled: _propTypes.default.bool,
234
240
  /**
235
241
  * Inserts the node into a EuiBadgeNotification and places it appropriately against the button.
236
242
  * Or pass `true` to render a simple dot
@@ -34,7 +34,7 @@ var EuiIconBoxesVertical = function EuiIconBoxesVertical(_ref) {
34
34
  }, props), title ? (0, _react2.jsx)("title", {
35
35
  id: titleId
36
36
  }, title) : null, (0, _react2.jsx)("path", {
37
- d: "M8 12a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm0-6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm0-6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z"
37
+ d: "M6 3a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm2-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM6 8a2 2 0 1 1 4 0 2 2 0 0 1-4 0Zm2-1a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm0 4a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-1 2a1 1 0 1 1 2 0 1 1 0 0 1-2 0Z"
38
38
  }));
39
39
  };
40
40
  var icon = exports.icon = EuiIconBoxesVertical;
@@ -34,8 +34,7 @@ var EuiIconCheckInCircleFilled = function EuiIconCheckInCircleFilled(_ref) {
34
34
  }, props), title ? (0, _react2.jsx)("title", {
35
35
  id: titleId
36
36
  }, title) : null, (0, _react2.jsx)("path", {
37
- fillRule: "evenodd",
38
- d: "M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16Zm3.65-10.857L6.91 9.8 4.35 7.286a.5.5 0 0 0-.7.714l2.909 2.857a.5.5 0 0 0 .7 0l5.091-5a.5.5 0 1 0-.7-.714Z"
37
+ d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1ZM7 9.293 5.354 7.646l-.708.708L7 10.707l4.354-4.353-.707-.708L7 9.293Z"
39
38
  }));
40
39
  };
41
40
  var icon = exports.icon = EuiIconCheckInCircleFilled;
@@ -34,8 +34,7 @@ var EuiIconErrorFilled = function EuiIconErrorFilled(_ref) {
34
34
  }, props), title ? (0, _react2.jsx)("title", {
35
35
  id: titleId
36
36
  }, title) : null, (0, _react2.jsx)("path", {
37
- fillRule: "evenodd",
38
- d: "M10 1a1 1 0 0 1 .707.293l4 4A1 1 0 0 1 15 6v5a1 1 0 0 1-.293.707l-4 4A1 1 0 0 1 10 16H5a1 1 0 0 1-.707-.293l-4-4A1 1 0 0 1 0 11V6a1 1 0 0 1 .293-.707l4-4A1 1 0 0 1 5 1h5ZM4.146 5.146a.5.5 0 0 1 .708 0L7.5 7.793l2.646-2.647a.5.5 0 0 1 .708.708L8.207 8.5l2.647 2.646a.5.5 0 0 1-.708.708L7.5 9.207l-2.646 2.647a.5.5 0 0 1-.708-.708L6.793 8.5 4.146 5.854a.5.5 0 0 1 0-.708Z"
37
+ d: "M10.392 1.005a1 1 0 0 1 .608.288L14.707 5a1 1 0 0 1 .293.707v4.586a1 1 0 0 1-.293.707L11 14.707a1 1 0 0 1-.707.293H5.707a1 1 0 0 1-.634-.227L5 14.707 1.293 11a1 1 0 0 1-.288-.608L1 10.293V5.707A1 1 0 0 1 1.293 5L5 1.293A1 1 0 0 1 5.707 1h4.586l.099.005ZM8 7.293 5.354 4.646l-.708.708L7.293 8l-2.647 2.646.708.707L8 8.707l2.646 2.646.707-.707L8.707 8l2.646-2.646-.707-.708L8 7.293Z"
39
38
  }));
40
39
  };
41
40
  var icon = exports.icon = EuiIconErrorFilled;
@@ -34,8 +34,7 @@ var EuiIconWarningFilled = function EuiIconWarningFilled(_ref) {
34
34
  }, props), title ? (0, _react2.jsx)("title", {
35
35
  id: titleId
36
36
  }, title) : null, (0, _react2.jsx)("path", {
37
- fillRule: "evenodd",
38
- d: "M8 1a1 1 0 0 1 .864.496l7 12A1 1 0 0 1 15 15H1a1 1 0 0 1-.864-1.504l7-12A1 1 0 0 1 8 1Zm.9 4.995-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995a.905.905 0 1 1 1.8 0ZM8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
37
+ d: "M8 1a1 1 0 0 1 .863.496l7 12A1 1 0 0 1 15 15H1a1 1 0 0 1-.864-1.504l7-12A1 1 0 0 1 8 1Zm0 10a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm-.5-6v5h1V5h-1Z"
39
38
  }));
40
39
  };
41
40
  var icon = exports.icon = EuiIconWarningFilled;