@elastic/eui 113.1.0 → 113.2.1

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 (419) hide show
  1. package/es/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
  2. package/es/components/badge/badge.js +12 -6
  3. package/es/components/badge/badge.styles.js +55 -4
  4. package/es/components/badge/color_utils.js +39 -17
  5. package/es/components/basic_table/basic_table.a11y.js +1 -1
  6. package/es/components/basic_table/basic_table.js +82 -16
  7. package/es/components/basic_table/collapsed_item_actions.js +1 -1
  8. package/es/components/basic_table/in_memory_table.js +47 -2
  9. package/es/components/breadcrumbs/_breadcrumb_content.js +1 -1
  10. package/es/components/button/split_button/split_button.js +3 -3
  11. package/es/components/button/split_button/split_button_actions.js +2 -2
  12. package/es/components/code/code_block_copy.js +1 -1
  13. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
  14. package/es/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  15. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  16. package/es/components/context_menu/context_menu_item.js +1 -1
  17. package/es/components/context_menu/context_menu_panel.js +1 -1
  18. package/es/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
  19. package/es/components/datagrid/body/header/column_actions.js +1 -1
  20. package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  21. package/es/components/datagrid/controls/column_selector.js +2 -2
  22. package/es/components/datagrid/controls/column_sorting.js +1 -1
  23. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  24. package/es/components/datagrid/data_grid.a11y.js +1 -1
  25. package/es/components/datagrid/data_grid.stories.utils.js +3 -3
  26. package/es/components/datagrid/utils/data_grid_schema.js +1 -1
  27. package/es/components/date_picker/auto_refresh/auto_refresh.js +2 -2
  28. package/es/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
  29. package/es/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
  30. package/es/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
  31. package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
  32. package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
  33. package/es/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
  34. package/es/components/filter_group/filter_button.js +2 -2
  35. package/es/components/filter_group/filter_group.a11y.js +1 -1
  36. package/es/components/flyout/_flyout_overlay.js +5 -2
  37. package/es/components/flyout/flyout.component.js +329 -81
  38. package/es/components/flyout/flyout.styles.js +57 -31
  39. package/es/components/flyout/flyout_menu.js +2 -2
  40. package/es/components/flyout/manager/actions.js +27 -1
  41. package/es/components/flyout/manager/activity_stage.js +18 -7
  42. package/es/components/flyout/manager/flyout_child.js +18 -5
  43. package/es/components/flyout/manager/flyout_managed.js +29 -12
  44. package/es/components/flyout/manager/layout_mode.js +93 -33
  45. package/es/components/flyout/manager/reducer.js +24 -2
  46. package/es/components/flyout/manager/selectors.js +6 -0
  47. package/es/components/flyout/manager/store.js +6 -3
  48. package/es/components/flyout/use_flyout_resizable.js +64 -10
  49. package/es/components/flyout/use_flyout_z_index.js +5 -7
  50. package/es/components/form/checkbox/checkbox.js +1 -1
  51. package/es/components/form/field_password/field_password.js +1 -1
  52. package/es/components/form/field_search/field_search.js +1 -1
  53. package/es/components/form/file_picker/file_picker.js +1 -1
  54. package/es/components/form/form_control_layout/form_control_layout_icons.js +1 -1
  55. package/es/components/header/header.a11y.js +1 -1
  56. package/es/components/link/external_link_icon.js +1 -1
  57. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
  58. package/es/components/markdown_editor/markdown_editor_toolbar.js +6 -6
  59. package/es/components/pagination/pagination_button_arrow.js +4 -4
  60. package/es/components/provider/component_defaults/component_defaults.js +2 -2
  61. package/es/components/search_bar/filters/field_value_selection_filter.js +1 -1
  62. package/es/components/selectable/selectable.a11y.js +1 -1
  63. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  64. package/es/components/side_nav/side_nav_item.js +1 -1
  65. package/es/components/table/_table_cell_content.js +1 -1
  66. package/es/components/table/_table_cell_content.styles.js +2 -1
  67. package/es/components/table/const.js +15 -0
  68. package/es/components/table/index.js +2 -1
  69. package/es/components/table/mobile/responsive_context.js +2 -5
  70. package/es/components/table/mobile/table_header_mobile.js +10 -3
  71. package/es/components/table/mobile/table_sort_mobile.js +1 -1
  72. package/es/components/table/table.js +44 -15
  73. package/es/components/table/table.styles.js +27 -9
  74. package/es/components/table/table_cells_shared.styles.js +41 -1
  75. package/es/components/table/table_footer_cell.js +53 -8
  76. package/es/components/table/table_header_cell.js +47 -9
  77. package/es/components/table/table_header_cell_checkbox.js +15 -7
  78. package/es/components/table/table_pagination/table_pagination.js +1 -1
  79. package/es/components/table/table_row_cell.js +61 -12
  80. package/es/components/table/types.js +1 -0
  81. package/es/components/table/utils.js +50 -24
  82. package/es/components/tree_view/tree_view_item.js +1 -1
  83. package/es/global_styling/mixins/_button.js +14 -10
  84. package/es/global_styling/mixins/_container_query.js +1 -1
  85. package/eui.d.ts +474 -183
  86. package/i18ntokens.json +1043 -1043
  87. package/lib/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
  88. package/lib/components/badge/badge.js +11 -5
  89. package/lib/components/badge/badge.styles.js +54 -3
  90. package/lib/components/badge/color_utils.js +39 -17
  91. package/lib/components/basic_table/basic_table.a11y.js +1 -1
  92. package/lib/components/basic_table/basic_table.js +82 -16
  93. package/lib/components/basic_table/collapsed_item_actions.js +1 -1
  94. package/lib/components/basic_table/in_memory_table.js +47 -2
  95. package/lib/components/breadcrumbs/_breadcrumb_content.js +1 -1
  96. package/lib/components/button/split_button/split_button.js +2 -2
  97. package/lib/components/button/split_button/split_button_actions.js +2 -2
  98. package/lib/components/code/code_block_copy.js +1 -1
  99. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
  100. package/lib/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  101. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  102. package/lib/components/context_menu/context_menu_item.js +1 -1
  103. package/lib/components/context_menu/context_menu_panel.js +1 -1
  104. package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
  105. package/lib/components/datagrid/body/header/column_actions.js +1 -1
  106. package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  107. package/lib/components/datagrid/controls/column_selector.js +2 -2
  108. package/lib/components/datagrid/controls/column_sorting.js +1 -1
  109. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  110. package/lib/components/datagrid/data_grid.a11y.js +1 -1
  111. package/lib/components/datagrid/data_grid.stories.utils.js +3 -3
  112. package/lib/components/datagrid/utils/data_grid_schema.js +1 -1
  113. package/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -2
  114. package/lib/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
  115. package/lib/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
  116. package/lib/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
  117. package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
  118. package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
  119. package/lib/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
  120. package/lib/components/filter_group/filter_button.js +2 -2
  121. package/lib/components/filter_group/filter_group.a11y.js +1 -1
  122. package/lib/components/flyout/_flyout_overlay.js +5 -2
  123. package/lib/components/flyout/flyout.component.js +327 -79
  124. package/lib/components/flyout/flyout.styles.js +58 -32
  125. package/lib/components/flyout/flyout_menu.js +2 -2
  126. package/lib/components/flyout/manager/actions.js +28 -2
  127. package/lib/components/flyout/manager/activity_stage.js +18 -7
  128. package/lib/components/flyout/manager/flyout_child.js +17 -4
  129. package/lib/components/flyout/manager/flyout_managed.js +26 -9
  130. package/lib/components/flyout/manager/layout_mode.js +92 -32
  131. package/lib/components/flyout/manager/reducer.js +23 -1
  132. package/lib/components/flyout/manager/selectors.js +7 -1
  133. package/lib/components/flyout/manager/store.js +5 -2
  134. package/lib/components/flyout/use_flyout_resizable.js +64 -10
  135. package/lib/components/flyout/use_flyout_z_index.js +5 -7
  136. package/lib/components/form/checkbox/checkbox.js +1 -1
  137. package/lib/components/form/field_password/field_password.js +1 -1
  138. package/lib/components/form/field_search/field_search.js +1 -1
  139. package/lib/components/form/file_picker/file_picker.js +1 -1
  140. package/lib/components/form/form_control_layout/form_control_layout_icons.js +1 -1
  141. package/lib/components/header/header.a11y.js +1 -1
  142. package/lib/components/link/external_link_icon.js +1 -1
  143. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
  144. package/lib/components/markdown_editor/markdown_editor_toolbar.js +6 -6
  145. package/lib/components/pagination/pagination_button_arrow.js +4 -4
  146. package/lib/components/provider/component_defaults/component_defaults.js +2 -2
  147. package/lib/components/search_bar/filters/field_value_selection_filter.js +1 -1
  148. package/lib/components/selectable/selectable.a11y.js +1 -1
  149. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  150. package/lib/components/side_nav/side_nav_item.js +1 -1
  151. package/lib/components/table/_table_cell_content.js +1 -1
  152. package/lib/components/table/_table_cell_content.styles.js +2 -1
  153. package/lib/components/table/const.js +21 -0
  154. package/lib/components/table/index.js +8 -1
  155. package/lib/components/table/mobile/responsive_context.js +2 -5
  156. package/lib/components/table/mobile/table_header_mobile.js +10 -3
  157. package/lib/components/table/mobile/table_sort_mobile.js +1 -1
  158. package/lib/components/table/table.js +44 -15
  159. package/lib/components/table/table.styles.js +26 -8
  160. package/lib/components/table/table_cells_shared.styles.js +43 -3
  161. package/lib/components/table/table_footer_cell.js +50 -6
  162. package/lib/components/table/table_header_cell.js +45 -7
  163. package/lib/components/table/table_header_cell_checkbox.js +14 -6
  164. package/lib/components/table/table_pagination/table_pagination.js +1 -1
  165. package/lib/components/table/table_row_cell.js +60 -11
  166. package/lib/components/table/types.js +5 -0
  167. package/lib/components/table/utils.js +51 -25
  168. package/lib/components/tree_view/tree_view_item.js +1 -1
  169. package/lib/global_styling/mixins/_button.js +15 -11
  170. package/lib/global_styling/mixins/_container_query.js +1 -1
  171. package/optimize/es/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
  172. package/optimize/es/components/badge/badge.js +12 -6
  173. package/optimize/es/components/badge/badge.styles.js +55 -4
  174. package/optimize/es/components/badge/color_utils.js +39 -17
  175. package/optimize/es/components/basic_table/basic_table.a11y.js +1 -1
  176. package/optimize/es/components/basic_table/basic_table.js +35 -14
  177. package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -1
  178. package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +1 -1
  179. package/optimize/es/components/button/split_button/split_button.js +3 -3
  180. package/optimize/es/components/button/split_button/split_button_actions.js +2 -2
  181. package/optimize/es/components/code/code_block_copy.js +1 -1
  182. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
  183. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  184. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  185. package/optimize/es/components/context_menu/context_menu_item.js +1 -1
  186. package/optimize/es/components/context_menu/context_menu_panel.js +1 -1
  187. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
  188. package/optimize/es/components/datagrid/body/header/column_actions.js +1 -1
  189. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  190. package/optimize/es/components/datagrid/controls/column_selector.js +2 -2
  191. package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
  192. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  193. package/optimize/es/components/datagrid/data_grid.a11y.js +1 -1
  194. package/optimize/es/components/datagrid/data_grid.stories.utils.js +3 -3
  195. package/optimize/es/components/datagrid/utils/data_grid_schema.js +1 -1
  196. package/optimize/es/components/date_picker/auto_refresh/auto_refresh.js +2 -2
  197. package/optimize/es/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
  198. package/optimize/es/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
  199. package/optimize/es/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
  200. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
  201. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
  202. package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
  203. package/optimize/es/components/filter_group/filter_button.js +1 -1
  204. package/optimize/es/components/filter_group/filter_group.a11y.js +1 -1
  205. package/optimize/es/components/flyout/_flyout_overlay.js +5 -2
  206. package/optimize/es/components/flyout/flyout.component.js +329 -81
  207. package/optimize/es/components/flyout/flyout.styles.js +57 -31
  208. package/optimize/es/components/flyout/flyout_menu.js +2 -2
  209. package/optimize/es/components/flyout/manager/actions.js +27 -1
  210. package/optimize/es/components/flyout/manager/activity_stage.js +18 -7
  211. package/optimize/es/components/flyout/manager/flyout_child.js +18 -5
  212. package/optimize/es/components/flyout/manager/flyout_managed.js +29 -12
  213. package/optimize/es/components/flyout/manager/layout_mode.js +93 -33
  214. package/optimize/es/components/flyout/manager/reducer.js +24 -2
  215. package/optimize/es/components/flyout/manager/selectors.js +6 -0
  216. package/optimize/es/components/flyout/manager/store.js +6 -3
  217. package/optimize/es/components/flyout/use_flyout_resizable.js +64 -10
  218. package/optimize/es/components/flyout/use_flyout_z_index.js +5 -7
  219. package/optimize/es/components/form/checkbox/checkbox.js +1 -1
  220. package/optimize/es/components/form/field_password/field_password.js +1 -1
  221. package/optimize/es/components/form/field_search/field_search.js +1 -1
  222. package/optimize/es/components/form/file_picker/file_picker.js +1 -1
  223. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +1 -1
  224. package/optimize/es/components/header/header.a11y.js +1 -1
  225. package/optimize/es/components/link/external_link_icon.js +1 -1
  226. package/optimize/es/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
  227. package/optimize/es/components/markdown_editor/markdown_editor_toolbar.js +6 -6
  228. package/optimize/es/components/pagination/pagination_button_arrow.js +4 -4
  229. package/optimize/es/components/search_bar/filters/field_value_selection_filter.js +1 -1
  230. package/optimize/es/components/selectable/selectable.a11y.js +1 -1
  231. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  232. package/optimize/es/components/side_nav/side_nav_item.js +1 -1
  233. package/optimize/es/components/table/_table_cell_content.js +1 -1
  234. package/optimize/es/components/table/_table_cell_content.styles.js +2 -1
  235. package/optimize/es/components/table/const.js +15 -0
  236. package/optimize/es/components/table/index.js +2 -1
  237. package/optimize/es/components/table/mobile/responsive_context.js +2 -5
  238. package/optimize/es/components/table/mobile/table_header_mobile.js +10 -3
  239. package/optimize/es/components/table/mobile/table_sort_mobile.js +1 -1
  240. package/optimize/es/components/table/table.js +34 -15
  241. package/optimize/es/components/table/table.styles.js +27 -9
  242. package/optimize/es/components/table/table_cells_shared.styles.js +41 -1
  243. package/optimize/es/components/table/table_footer_cell.js +21 -7
  244. package/optimize/es/components/table/table_header_cell.js +17 -7
  245. package/optimize/es/components/table/table_header_cell_checkbox.js +11 -5
  246. package/optimize/es/components/table/table_pagination/table_pagination.js +1 -1
  247. package/optimize/es/components/table/table_row_cell.js +28 -9
  248. package/optimize/es/components/table/types.js +1 -0
  249. package/optimize/es/components/table/utils.js +50 -20
  250. package/optimize/es/components/tree_view/tree_view_item.js +1 -1
  251. package/optimize/es/global_styling/mixins/_button.js +14 -10
  252. package/optimize/es/global_styling/mixins/_container_query.js +1 -1
  253. package/optimize/lib/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
  254. package/optimize/lib/components/badge/badge.js +11 -5
  255. package/optimize/lib/components/badge/badge.styles.js +54 -3
  256. package/optimize/lib/components/badge/color_utils.js +39 -17
  257. package/optimize/lib/components/basic_table/basic_table.a11y.js +1 -1
  258. package/optimize/lib/components/basic_table/basic_table.js +35 -14
  259. package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -1
  260. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +1 -1
  261. package/optimize/lib/components/button/split_button/split_button.js +2 -2
  262. package/optimize/lib/components/button/split_button/split_button_actions.js +2 -2
  263. package/optimize/lib/components/code/code_block_copy.js +1 -1
  264. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
  265. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  266. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  267. package/optimize/lib/components/context_menu/context_menu_item.js +1 -1
  268. package/optimize/lib/components/context_menu/context_menu_panel.js +1 -1
  269. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
  270. package/optimize/lib/components/datagrid/body/header/column_actions.js +1 -1
  271. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  272. package/optimize/lib/components/datagrid/controls/column_selector.js +2 -2
  273. package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
  274. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  275. package/optimize/lib/components/datagrid/data_grid.a11y.js +1 -1
  276. package/optimize/lib/components/datagrid/data_grid.stories.utils.js +3 -3
  277. package/optimize/lib/components/datagrid/utils/data_grid_schema.js +1 -1
  278. package/optimize/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -2
  279. package/optimize/lib/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
  280. package/optimize/lib/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
  281. package/optimize/lib/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
  282. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
  283. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
  284. package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
  285. package/optimize/lib/components/filter_group/filter_button.js +1 -1
  286. package/optimize/lib/components/filter_group/filter_group.a11y.js +1 -1
  287. package/optimize/lib/components/flyout/_flyout_overlay.js +5 -2
  288. package/optimize/lib/components/flyout/flyout.component.js +327 -79
  289. package/optimize/lib/components/flyout/flyout.styles.js +58 -32
  290. package/optimize/lib/components/flyout/flyout_menu.js +2 -2
  291. package/optimize/lib/components/flyout/manager/actions.js +28 -2
  292. package/optimize/lib/components/flyout/manager/activity_stage.js +18 -7
  293. package/optimize/lib/components/flyout/manager/flyout_child.js +17 -4
  294. package/optimize/lib/components/flyout/manager/flyout_managed.js +26 -9
  295. package/optimize/lib/components/flyout/manager/layout_mode.js +92 -32
  296. package/optimize/lib/components/flyout/manager/reducer.js +23 -1
  297. package/optimize/lib/components/flyout/manager/selectors.js +7 -1
  298. package/optimize/lib/components/flyout/manager/store.js +5 -2
  299. package/optimize/lib/components/flyout/use_flyout_resizable.js +64 -10
  300. package/optimize/lib/components/flyout/use_flyout_z_index.js +5 -7
  301. package/optimize/lib/components/form/checkbox/checkbox.js +1 -1
  302. package/optimize/lib/components/form/field_password/field_password.js +1 -1
  303. package/optimize/lib/components/form/field_search/field_search.js +1 -1
  304. package/optimize/lib/components/form/file_picker/file_picker.js +1 -1
  305. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +1 -1
  306. package/optimize/lib/components/header/header.a11y.js +1 -1
  307. package/optimize/lib/components/link/external_link_icon.js +1 -1
  308. package/optimize/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
  309. package/optimize/lib/components/markdown_editor/markdown_editor_toolbar.js +6 -6
  310. package/optimize/lib/components/pagination/pagination_button_arrow.js +4 -4
  311. package/optimize/lib/components/search_bar/filters/field_value_selection_filter.js +1 -1
  312. package/optimize/lib/components/selectable/selectable.a11y.js +1 -1
  313. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  314. package/optimize/lib/components/side_nav/side_nav_item.js +1 -1
  315. package/optimize/lib/components/table/_table_cell_content.js +1 -1
  316. package/optimize/lib/components/table/_table_cell_content.styles.js +2 -1
  317. package/optimize/lib/components/table/const.js +21 -0
  318. package/optimize/lib/components/table/index.js +8 -1
  319. package/optimize/lib/components/table/mobile/responsive_context.js +2 -5
  320. package/optimize/lib/components/table/mobile/table_header_mobile.js +10 -3
  321. package/optimize/lib/components/table/mobile/table_sort_mobile.js +1 -1
  322. package/optimize/lib/components/table/table.js +34 -15
  323. package/optimize/lib/components/table/table.styles.js +26 -8
  324. package/optimize/lib/components/table/table_cells_shared.styles.js +42 -2
  325. package/optimize/lib/components/table/table_footer_cell.js +19 -5
  326. package/optimize/lib/components/table/table_header_cell.js +15 -5
  327. package/optimize/lib/components/table/table_header_cell_checkbox.js +10 -4
  328. package/optimize/lib/components/table/table_pagination/table_pagination.js +1 -1
  329. package/optimize/lib/components/table/table_row_cell.js +27 -8
  330. package/optimize/lib/components/table/types.js +5 -0
  331. package/optimize/lib/components/table/utils.js +51 -22
  332. package/optimize/lib/components/tree_view/tree_view_item.js +1 -1
  333. package/optimize/lib/global_styling/mixins/_button.js +15 -11
  334. package/optimize/lib/global_styling/mixins/_container_query.js +1 -1
  335. package/package.json +1 -1
  336. package/test-env/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
  337. package/test-env/components/badge/badge.js +11 -5
  338. package/test-env/components/badge/badge.styles.js +54 -3
  339. package/test-env/components/badge/color_utils.js +39 -17
  340. package/test-env/components/basic_table/basic_table.a11y.js +1 -1
  341. package/test-env/components/basic_table/basic_table.js +82 -16
  342. package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
  343. package/test-env/components/basic_table/in_memory_table.js +47 -2
  344. package/test-env/components/breadcrumbs/_breadcrumb_content.js +1 -1
  345. package/test-env/components/button/split_button/split_button.js +2 -2
  346. package/test-env/components/button/split_button/split_button_actions.js +2 -2
  347. package/test-env/components/code/code_block_copy.js +1 -1
  348. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
  349. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  350. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  351. package/test-env/components/context_menu/context_menu_item.js +1 -1
  352. package/test-env/components/context_menu/context_menu_panel.js +1 -1
  353. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
  354. package/test-env/components/datagrid/body/header/column_actions.js +1 -1
  355. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  356. package/test-env/components/datagrid/controls/column_selector.js +2 -2
  357. package/test-env/components/datagrid/controls/column_sorting.js +1 -1
  358. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  359. package/test-env/components/datagrid/data_grid.a11y.js +1 -1
  360. package/test-env/components/datagrid/data_grid.stories.utils.js +3 -3
  361. package/test-env/components/datagrid/utils/data_grid_schema.js +1 -1
  362. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +2 -2
  363. package/test-env/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
  364. package/test-env/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
  365. package/test-env/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
  366. package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
  367. package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
  368. package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
  369. package/test-env/components/filter_group/filter_button.js +2 -2
  370. package/test-env/components/filter_group/filter_group.a11y.js +1 -1
  371. package/test-env/components/flyout/_flyout_overlay.js +5 -2
  372. package/test-env/components/flyout/flyout.component.js +327 -79
  373. package/test-env/components/flyout/flyout.styles.js +58 -32
  374. package/test-env/components/flyout/flyout_menu.js +2 -2
  375. package/test-env/components/flyout/manager/actions.js +28 -2
  376. package/test-env/components/flyout/manager/activity_stage.js +18 -7
  377. package/test-env/components/flyout/manager/flyout_child.js +17 -4
  378. package/test-env/components/flyout/manager/flyout_managed.js +26 -9
  379. package/test-env/components/flyout/manager/layout_mode.js +92 -32
  380. package/test-env/components/flyout/manager/reducer.js +23 -1
  381. package/test-env/components/flyout/manager/selectors.js +7 -1
  382. package/test-env/components/flyout/manager/store.js +5 -2
  383. package/test-env/components/flyout/use_flyout_resizable.js +64 -10
  384. package/test-env/components/flyout/use_flyout_z_index.js +5 -7
  385. package/test-env/components/form/checkbox/checkbox.js +1 -1
  386. package/test-env/components/form/field_password/field_password.js +1 -1
  387. package/test-env/components/form/field_search/field_search.js +1 -1
  388. package/test-env/components/form/file_picker/file_picker.js +1 -1
  389. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +1 -1
  390. package/test-env/components/header/header.a11y.js +1 -1
  391. package/test-env/components/link/external_link_icon.js +1 -1
  392. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
  393. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +6 -6
  394. package/test-env/components/pagination/pagination_button_arrow.js +4 -4
  395. package/test-env/components/provider/component_defaults/component_defaults.js +2 -2
  396. package/test-env/components/search_bar/filters/field_value_selection_filter.js +1 -1
  397. package/test-env/components/selectable/selectable.a11y.js +1 -1
  398. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  399. package/test-env/components/side_nav/side_nav_item.js +1 -1
  400. package/test-env/components/table/_table_cell_content.js +1 -1
  401. package/test-env/components/table/_table_cell_content.styles.js +2 -1
  402. package/test-env/components/table/const.js +21 -0
  403. package/test-env/components/table/index.js +8 -1
  404. package/test-env/components/table/mobile/responsive_context.js +2 -5
  405. package/test-env/components/table/mobile/table_header_mobile.js +10 -3
  406. package/test-env/components/table/mobile/table_sort_mobile.js +1 -1
  407. package/test-env/components/table/table.js +44 -15
  408. package/test-env/components/table/table.styles.js +26 -8
  409. package/test-env/components/table/table_cells_shared.styles.js +42 -2
  410. package/test-env/components/table/table_footer_cell.js +48 -6
  411. package/test-env/components/table/table_header_cell.js +45 -7
  412. package/test-env/components/table/table_header_cell_checkbox.js +14 -6
  413. package/test-env/components/table/table_pagination/table_pagination.js +1 -1
  414. package/test-env/components/table/table_row_cell.js +60 -11
  415. package/test-env/components/table/types.js +5 -0
  416. package/test-env/components/table/utils.js +51 -22
  417. package/test-env/components/tree_view/tree_view_item.js +1 -1
  418. package/test-env/global_styling/mixins/_button.js +15 -11
  419. package/test-env/global_styling/mixins/_container_query.js +1 -1
@@ -13,8 +13,9 @@ var _responsive_context = require("./mobile/responsive_context");
13
13
  var _utils = require("./utils");
14
14
  var _table_cell_content = require("./_table_cell_content");
15
15
  var _table_row_cell = require("./table_row_cell.styles");
16
+ var _table_cells_shared = require("./table_cells_shared.styles");
16
17
  var _react2 = require("@emotion/react");
17
- var _excluded = ["align", "children", "className", "truncateText", "setScopeRow", "textOnly", "hasActions", "isExpander", "style", "width", "valign", "mobileOptions", "append"];
18
+ var _excluded = ["align", "children", "className", "truncateText", "setScopeRow", "textOnly", "hasActions", "isExpander", "style", "width", "minWidth", "maxWidth", "valign", "mobileOptions", "append", "sticky"];
18
19
  /*
19
20
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
20
21
  * or more contributor license agreements. Licensed under the Elastic License
@@ -48,27 +49,43 @@ var EuiTableRowCell = exports.EuiTableRowCell = function EuiTableRowCell(_ref) {
48
49
  textOnly = _ref$textOnly === void 0 ? true : _ref$textOnly,
49
50
  hasActions = _ref.hasActions,
50
51
  isExpander = _ref.isExpander,
51
- style = _ref.style,
52
+ _style = _ref.style,
52
53
  width = _ref.width,
54
+ minWidth = _ref.minWidth,
55
+ maxWidth = _ref.maxWidth,
53
56
  _ref$valign = _ref.valign,
54
57
  valign = _ref$valign === void 0 ? 'middle' : _ref$valign,
55
58
  mobileOptions = _ref.mobileOptions,
56
59
  append = _ref.append,
60
+ sticky = _ref.sticky,
57
61
  rest = _objectWithoutProperties(_ref, _excluded);
58
62
  var isResponsive = (0, _responsive_context.useEuiTableIsResponsive)();
59
63
  var styles = (0, _services.useEuiMemoizedStyles)(_table_row_cell.euiTableRowCellStyles);
60
- var cssStyles = [styles.euiTableRowCell, setScopeRow && styles.rowHeader, isExpander && styles.isExpander, hasActions && styles.hasActions, styles[valign]].concat(_toConsumableArray(isResponsive ? [styles.mobile.mobile, (mobileOptions === null || mobileOptions === void 0 ? void 0 : mobileOptions.enlarge) && styles.mobile.enlarge, hasActions === 'custom' && styles.mobile.customActions, hasActions === true && styles.mobile.actions, isExpander && styles.mobile.expander] : [styles.desktop.desktop, hasActions && styles.desktop.actions]));
64
+ var stickyStyles = (0, _table_cells_shared._useEuiTableStickyCellStyles)(sticky);
65
+ var cssStyles = [styles.euiTableRowCell, setScopeRow && styles.rowHeader, isExpander && styles.isExpander, hasActions && styles.hasActions, styles[valign]].concat(_toConsumableArray(isResponsive ? [styles.mobile.mobile, (mobileOptions === null || mobileOptions === void 0 ? void 0 : mobileOptions.enlarge) && styles.mobile.enlarge, hasActions === 'custom' && styles.mobile.customActions, hasActions === true && styles.mobile.actions, isExpander && styles.mobile.expander] : [styles.desktop.desktop, hasActions && styles.desktop.actions, stickyStyles]));
61
66
  var cellClasses = (0, _classnames.default)('euiTableRowCell', className, {
62
67
  'euiTableRowCell--hasActions': hasActions,
63
68
  'euiTableRowCell--isExpander': isExpander
64
69
  });
65
- var widthValue = isResponsive ? hasActions || isExpander ? undefined // On mobile, actions are shifted to a right column via CSS
66
- : mobileOptions === null || mobileOptions === void 0 ? void 0 : mobileOptions.width : width;
67
- var styleObj = (0, _utils.resolveWidthAsStyle)(style, widthValue);
70
+ var getResponsiveWidth = function getResponsiveWidth(defaultWidth, mobileWidth) {
71
+ if (isResponsive) {
72
+ if (hasActions || isExpander) {
73
+ // On mobile, actions are shifted to a right column via CSS
74
+ return undefined;
75
+ }
76
+ return mobileWidth;
77
+ }
78
+ return defaultWidth;
79
+ };
80
+ var inlineWidthStyles = (0, _utils.resolveWidthPropsAsStyle)(_style, {
81
+ width: getResponsiveWidth(width, mobileOptions === null || mobileOptions === void 0 ? void 0 : mobileOptions.width),
82
+ minWidth: getResponsiveWidth(minWidth, mobileOptions === null || mobileOptions === void 0 ? void 0 : mobileOptions.minWidth),
83
+ maxWidth: getResponsiveWidth(maxWidth, mobileOptions === null || mobileOptions === void 0 ? void 0 : mobileOptions.maxWidth)
84
+ });
68
85
  var Element = setScopeRow ? 'th' : 'td';
69
86
  var sharedProps = _objectSpread({
70
87
  scope: setScopeRow ? 'row' : undefined,
71
- style: styleObj,
88
+ style: _objectSpread(_objectSpread({}, _style), inlineWidthStyles),
72
89
  css: cssStyles
73
90
  }, rest);
74
91
  var sharedContentProps = {
@@ -102,7 +119,9 @@ var EuiTableRowCell = exports.EuiTableRowCell = function EuiTableRowCell(_ref) {
102
119
  } else {
103
120
  return (0, _react2.jsx)(Element, _extends({
104
121
  className: cellClasses
105
- }, sharedProps), (0, _react2.jsx)(_table_cell_content.EuiTableCellContent, sharedContentProps, children), append);
122
+ }, sharedProps, {
123
+ "data-sticky": sticky === null || sticky === void 0 ? void 0 : sticky.side
124
+ }), (0, _react2.jsx)(_table_cell_content.EuiTableCellContent, sharedContentProps, children), append);
106
125
  }
107
126
  }
108
127
  };
@@ -162,7 +181,7 @@ EuiTableRowCell.propTypes = {
162
181
  * Applies the value to the width of the cell in mobile view (typically 50%)
163
182
  * @default 50%
164
183
  */
165
- width: _propTypes.default.any,
184
+ width: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.number.isRequired])]),
166
185
  /**
167
186
  * Horizontal alignment of the text in the cell
168
187
  */
@@ -182,7 +201,9 @@ EuiTableRowCell.propTypes = {
182
201
  */
183
202
  truncateText: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
184
203
  lines: _propTypes.default.number.isRequired
185
- }).isRequired])
204
+ }).isRequired]),
205
+ minWidth: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.number.isRequired]),
206
+ maxWidth: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.number.isRequired])
186
207
  }),
187
208
  /**
188
209
  * Content rendered outside the visible cell content wrapper. Useful for, e.g. screen reader text.
@@ -190,6 +211,32 @@ EuiTableRowCell.propTypes = {
190
211
  * Used by EuiBasicTable to render hidden copy markers
191
212
  */
192
213
  append: _propTypes.default.node,
214
+ /**
215
+ * Whether the cell should stick to a side of the table.
216
+ *
217
+ * This option is not applied in the responsive cards layout - see
218
+ * {@link EuiTableProps#responsiveBreakpoint|`responsiveBreakpoint`}.
219
+ *
220
+ * Currently, it can only be used when the cell is in the first or the last
221
+ * column of a table.
222
+ *
223
+ * When set to `true` and `hasBackground: false` is set on the table,
224
+ * `--euiTableCellStickyBackgroundColor` CSS variable should be set to match
225
+ * the background color of the element containing the table.
226
+ * Otherwise, the sticky cell will use the default `backgroundBasePlain`
227
+ * background color.
228
+ * @internal
229
+ * @beta
230
+ * @default false
231
+ */
232
+ sticky: _propTypes.default.shape({
233
+ /**
234
+ * The side the cell should stick to.
235
+ * In horizontal writing-mode, `start` equals the left side and `end`
236
+ * the right side.
237
+ */
238
+ side: _propTypes.default.oneOf(["start", "end"]).isRequired
239
+ }),
193
240
  /**
194
241
  * Horizontal alignment of the text in the cell
195
242
  */
@@ -210,5 +257,7 @@ EuiTableRowCell.propTypes = {
210
257
  truncateText: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
211
258
  lines: _propTypes.default.number.isRequired
212
259
  }).isRequired]),
213
- width: _propTypes.default.any
260
+ width: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.number.isRequired]),
261
+ minWidth: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.number.isRequired]),
262
+ maxWidth: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.number.isRequired])
214
263
  };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,18 +1,9 @@
1
1
  "use strict";
2
2
 
3
- 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); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
- exports.resolveWidthAsStyle = exports.WARNING_MESSAGE = void 0;
8
- var _excluded = ["width"];
9
- 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; }
10
- 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; }
11
- 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; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
13
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
- 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; }
15
- 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; }
6
+ exports.resolveWidthPropsAsStyle = exports.WARNING_MESSAGE_WIDTH = exports.WARNING_MESSAGE_MIN_WIDTH = exports.WARNING_MESSAGE_MAX_WIDTH = void 0;
16
7
  /*
17
8
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
18
9
  * or more contributor license agreements. Licensed under the Elastic License
@@ -21,21 +12,56 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
21
12
  * Side Public License, v 1.
22
13
  */
23
14
 
24
- var WARNING_MESSAGE = exports.WARNING_MESSAGE = 'Two `width` properties were provided. Provide only one of `style.width` or `width` to avoid conflicts.';
25
- var resolveWidthAsStyle = exports.resolveWidthAsStyle = function resolveWidthAsStyle() {
26
- var style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
27
- var width = arguments.length > 1 ? arguments[1] : undefined;
28
- var styleWidth = style.width,
29
- styleRest = _objectWithoutProperties(style, _excluded);
30
- var attrWidth = width;
31
- if (attrWidth != null && (typeof attrWidth === 'number' || !isNaN(Number(attrWidth))) // transform {number} or unitless 'number' to px string
32
- ) {
33
- attrWidth = "".concat(attrWidth, "px");
15
+ /**
16
+ * @internal
17
+ */
18
+ var WARNING_MESSAGE_WIDTH = exports.WARNING_MESSAGE_WIDTH = 'Two `width` properties were provided. Provide only one of `style.width` or `width` to avoid conflicts.';
19
+
20
+ /**
21
+ * @internal
22
+ */
23
+ var WARNING_MESSAGE_MIN_WIDTH = exports.WARNING_MESSAGE_MIN_WIDTH = 'Two `minWidth` properties were provided. Provide only one of `style.minWidth` or `minWidth` to avoid conflicts.';
24
+
25
+ /**
26
+ * @internal
27
+ */
28
+ var WARNING_MESSAGE_MAX_WIDTH = exports.WARNING_MESSAGE_MAX_WIDTH = 'Two `maxWidth` properties were provided. Provide only one of `style.maxWidth` or `maxWidth` to avoid conflicts.';
29
+ var normalizeValue = function normalizeValue(value) {
30
+ if (value === undefined || Number.isNaN(value)) {
31
+ return undefined;
32
+ }
33
+ if (typeof value === 'number') {
34
+ return "".concat(value, "px");
34
35
  }
35
- if (styleWidth && attrWidth) {
36
- console.warn(WARNING_MESSAGE);
36
+ return value;
37
+ };
38
+
39
+ /**
40
+ * @internal
41
+ */
42
+ var resolveWidthPropsAsStyle = exports.resolveWidthPropsAsStyle = function resolveWidthPropsAsStyle() {
43
+ var style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
44
+ var _ref = arguments.length > 1 ? arguments[1] : undefined,
45
+ rawWidth = _ref.width,
46
+ rawMinWidth = _ref.minWidth,
47
+ rawMaxWidth = _ref.maxWidth;
48
+ var width = normalizeValue(rawWidth);
49
+ var minWidth = normalizeValue(rawMinWidth);
50
+ var maxWidth = normalizeValue(rawMaxWidth);
51
+ if (process.env.NODE_ENV !== 'production') {
52
+ if (style.width && width !== undefined) {
53
+ console.warn(WARNING_MESSAGE_WIDTH);
54
+ }
55
+ if (style.minWidth && minWidth !== undefined) {
56
+ console.warn(WARNING_MESSAGE_MIN_WIDTH);
57
+ }
58
+ if (style.maxWidth && maxWidth !== undefined) {
59
+ console.warn(WARNING_MESSAGE_MAX_WIDTH);
60
+ }
37
61
  }
38
- return _objectSpread(_objectSpread({}, styleRest), {}, {
39
- width: attrWidth || styleWidth
40
- });
62
+ return {
63
+ width: width || style.width,
64
+ minWidth: minWidth || style.minWidth,
65
+ maxWidth: maxWidth || style.maxWidth
66
+ };
41
67
  };
@@ -62,7 +62,7 @@ var EuiTreeViewItem = exports.EuiTreeViewItem = /*#__PURE__*/(0, _react.memo)(fu
62
62
  }, rest), hasArrow && (!!children ? (0, _react2.jsx)(_icon.EuiIcon, {
63
63
  className: "euiTreeView__expansionArrow",
64
64
  size: display === 'compressed' ? 's' : 'm',
65
- type: isExpanded ? 'arrowDown' : 'arrowRight'
65
+ type: isExpanded ? 'chevronSingleDown' : 'chevronSingleRight'
66
66
  }) : (0, _react2.jsx)("span", {
67
67
  css: iconStyles,
68
68
  className: "euiTreeView__arrowPlaceholder"
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.highContrastHoverIndicatorStyles = exports.getEuiFilledButtonColors = exports.getEuiButtonColors = exports.euiButtonSizeMap = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonDisplaysColors = exports.euiButtonColor = exports.SEVERITY_COLORS = exports.EXTENDED_BUTTON_COLORS = exports.BUTTON_DISPLAYS = exports.BUTTON_COLORS = void 0;
6
+ exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.highContrastHoverIndicatorStyles = exports.getEuiFilledButtonColorValues = exports.getEuiButtonColorValues = exports.euiButtonSizeMap = exports.euiButtonInteractionStyles = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonDisplaysColors = exports.euiButtonColor = exports.SEVERITY_COLORS = exports.EXTENDED_BUTTON_COLORS = exports.BUTTON_DISPLAYS = exports.BUTTON_COLORS = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _euiThemeCommon = require("@elastic/eui-theme-common");
9
9
  var _services = require("../../services");
@@ -51,14 +51,16 @@ var getButtonVariantTokenValues = function getButtonVariantTokenValues(_ref, col
51
51
  borderColor: highContrastMode ? foreground : color === 'text' ? euiTheme.colors.borderBasePlain : 'transparent'
52
52
  };
53
53
  };
54
- var getEuiButtonColors = exports.getEuiButtonColors = function getEuiButtonColors(euiThemeContext, color) {
54
+ var getEuiButtonColorValues = exports.getEuiButtonColorValues = function getEuiButtonColorValues(euiThemeContext, color) {
55
55
  var buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'base');
56
56
  var foreground = buttonColors.color;
57
57
  var background = buttonColors.background;
58
58
  return {
59
59
  color: background === 'transparent' || color === 'disabled' ? foreground : (0, _services.makeHighContrastColor)(foreground)(background),
60
60
  backgroundColor: background,
61
- borderColor: buttonColors.borderColor
61
+ borderColor: buttonColors.borderColor,
62
+ backgroundHover: buttonColors.backgroundHover,
63
+ backgroundActive: buttonColors.backgroundActive
62
64
  };
63
65
  };
64
66
 
@@ -69,20 +71,22 @@ var getEuiButtonColors = exports.getEuiButtonColors = function getEuiButtonColor
69
71
  * @returns Style object `{ backgroundColor, color }`
70
72
  */
71
73
  var euiButtonColor = exports.euiButtonColor = function euiButtonColor(euiThemeContext, color) {
72
- var buttonColors = getEuiButtonColors(euiThemeContext, color);
74
+ var buttonColors = getEuiButtonColorValues(euiThemeContext, color);
73
75
  return _objectSpread({
74
76
  color: buttonColors.color,
75
77
  backgroundColor: buttonColors.backgroundColor
76
78
  }, _highContrastBorder(euiThemeContext, buttonColors.borderColor));
77
79
  };
78
- var getEuiFilledButtonColors = exports.getEuiFilledButtonColors = function getEuiFilledButtonColors(euiThemeContext, color) {
80
+ var getEuiFilledButtonColorValues = exports.getEuiFilledButtonColorValues = function getEuiFilledButtonColorValues(euiThemeContext, color) {
79
81
  var buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'filled');
80
82
  var foreground = buttonColors.color;
81
83
  var background = buttonColors.background;
82
84
  return {
83
85
  color: foreground,
84
86
  backgroundColor: background,
85
- borderColor: color === 'disabled' ? foreground : background
87
+ borderColor: color === 'disabled' ? foreground : background,
88
+ backgroundHover: buttonColors.backgroundHover,
89
+ backgroundActive: buttonColors.backgroundActive
86
90
  };
87
91
  };
88
92
 
@@ -93,7 +97,7 @@ var getEuiFilledButtonColors = exports.getEuiFilledButtonColors = function getEu
93
97
  * @returns Style object `{ backgroundColor, color }`
94
98
  */
95
99
  var euiButtonFillColor = exports.euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
96
- var buttonColors = getEuiFilledButtonColors(euiThemeContext, color);
100
+ var buttonColors = getEuiFilledButtonColorValues(euiThemeContext, color);
97
101
  var foreground = buttonColors.color;
98
102
  var background = buttonColors.backgroundColor;
99
103
  return _objectSpread({
@@ -155,19 +159,19 @@ var euiButtonDisplaysColors = exports.euiButtonDisplaysColors = function euiButt
155
159
  {
156
160
  var buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'base');
157
161
  var borderStyle = color === 'text' && "\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.borderBasePlain, ";\n ");
158
- displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)(euiButtonColor(euiThemeContext, color), " ", _interactionStyles(euiThemeContext, buttonColors, 'overlay'), " ", borderStyle, ";;label:displaysColorsMap-display-color;");
162
+ displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)(euiButtonColor(euiThemeContext, color), " ", euiButtonInteractionStyles(euiThemeContext, buttonColors, 'overlay'), " ", borderStyle, ";;label:displaysColorsMap-display-color;");
159
163
  break;
160
164
  }
161
165
  case 'fill':
162
166
  {
163
167
  var _buttonColors = getButtonVariantTokenValues(euiThemeContext, color, 'filled');
164
- displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : color !== 'disabled' ? euiThemeContext.euiTheme.colors.fullShade : '', ";", _interactionStyles(euiThemeContext, _buttonColors), ";;label:displaysColorsMap-display-color;");
168
+ displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)(euiButtonFillColor(euiThemeContext, color), "outline-color:", euiThemeContext.colorMode === 'DARK' && color === 'text' ? 'currentColor' : color !== 'disabled' ? euiThemeContext.euiTheme.colors.fullShade : '', ";", euiButtonInteractionStyles(euiThemeContext, _buttonColors), ";;label:displaysColorsMap-display-color;");
165
169
  break;
166
170
  }
167
171
  case 'empty':
168
172
  {
169
173
  var _buttonColors2 = getButtonVariantTokenValues(euiThemeContext, color, 'empty');
170
- displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";", _interactionStyles(euiThemeContext, _buttonColors2, 'overlay'), ";;label:displaysColorsMap-display-color;");
174
+ displaysColorsMap[display][color] = /*#__PURE__*/(0, _react.css)("color:", euiButtonEmptyColor(euiThemeContext, color).color, ";", euiButtonInteractionStyles(euiThemeContext, _buttonColors2, 'overlay'), ";;label:displaysColorsMap-display-color;");
171
175
  break;
172
176
  }
173
177
  }
@@ -235,7 +239,7 @@ var euiButtonSizeMap = exports.euiButtonSizeMap = function euiButtonSizeMap(euiT
235
239
  /**
236
240
  * internal styles util for applying button background color on hover
237
241
  */
238
- var _interactionStyles = function _interactionStyles(euiThemeContext, buttonColors) {
242
+ var euiButtonInteractionStyles = exports.euiButtonInteractionStyles = function euiButtonInteractionStyles(euiThemeContext, buttonColors) {
239
243
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'fill';
240
244
  var baseStyles = function baseStyles() {
241
245
  // button hover is applied as pseudo element with a transparent background-color
@@ -47,7 +47,7 @@ var euiContainer = exports.euiContainer = function euiContainer(type, name, scro
47
47
  }
48
48
  finalType += 'scroll-state';
49
49
  }
50
- return [!!name && "container-name: ".concat(name), !!finalType && "container-type: ".concat(finalType)].filter(Boolean).join(';');
50
+ return [!!name && "container-name: ".concat(name, ";"), !!finalType && "container-type: ".concat(finalType, ";")].filter(Boolean).join('');
51
51
  };
52
52
 
53
53
  /**
@@ -31,6 +31,6 @@ export var EuiAccordionArrow = function EuiAccordionArrow(_ref) {
31
31
  }, arrowProps, rest, {
32
32
  className: classes,
33
33
  css: cssStyles,
34
- iconType: "arrowRight"
34
+ iconType: "chevronSingleRight"
35
35
  }));
36
36
  };
@@ -19,7 +19,7 @@ import { useEuiTheme, useEuiMemoizedStyles, getSecureRelForTarget } from '../../
19
19
  import { validateHref } from '../../services/security/href_validator';
20
20
  import { EuiInnerText } from '../inner_text';
21
21
  import { EuiIcon } from '../icon';
22
- import { getTextColor, getIsValidColor } from './color_utils';
22
+ import { getTextColor, getIsValidColor, getCustomInteractiveColors } from './color_utils';
23
23
  import { warnIfContrastBelowMin, wcagContrastMin } from '../../services/color/contrast';
24
24
  import { euiBadgeStyles } from './badge.styles';
25
25
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -50,7 +50,7 @@ export var EuiBadge = function EuiBadge(_ref) {
50
50
  var isDisabled = _isDisabled || !isHrefValid;
51
51
  var isNamedColor = COLORS.includes(color);
52
52
  var isIconOnly = !children && !!iconType;
53
- var euiTheme = useEuiTheme();
53
+ var euiThemeContext = useEuiTheme();
54
54
  var customColorStyles = useMemo(function () {
55
55
  // Disabled badges should not have custom colors
56
56
  if (isDisabled) return style;
@@ -60,22 +60,28 @@ export var EuiBadge = function EuiBadge(_ref) {
60
60
  // Do our best to ensure custom colors provide sufficient contrast
61
61
  try {
62
62
  // Set dark or light text color based upon best contrast
63
- var textColor = getTextColor(euiTheme, color);
63
+ var textColor = getTextColor(euiThemeContext, color);
64
+ // These values are approximations as we don't know what custom color is passed
65
+ var customInteractiveColors = getCustomInteractiveColors(euiThemeContext, color);
64
66
 
65
67
  // Emit a warning if contrast is below WCAG threshold (centralized util)
66
68
  warnIfContrastBelowMin(textColor, color, wcagContrastMin);
67
69
  return _objectSpread({
68
70
  '--euiBadgeBackgroundColor': color,
69
- '--euiBadgeTextColor': textColor
71
+ '--euiBadgeTextColor': textColor,
72
+ '--euiBadgeBackgroundHoverColor': customInteractiveColors.backgroundHover,
73
+ '--euiBadgeBackgroundActiveColor': customInteractiveColors.backgroundActive
70
74
  }, style);
71
75
  } catch (err) {
72
76
  if (!getIsValidColor(color)) {
73
77
  console.warn('EuiBadge expects a valid color. This can either be a three or six ' + "character hex value, rgb(a) value, hsv value, hollow, or one of the following: ".concat(COLORS, ". ") + "Instead got ".concat(color, "."));
74
78
  }
75
79
  }
76
- }, [color, isNamedColor, isDisabled, style, euiTheme]);
80
+ }, [color, isNamedColor, isDisabled, style, euiThemeContext]);
77
81
  var styles = useEuiMemoizedStyles(euiBadgeStyles);
78
- var cssStyles = [styles.euiBadge, isIconOnly && styles.iconOnly].concat(_toConsumableArray(isDisabled ? [styles.disabled] : [isNamedColor && fill && styles.colors.fill[color], isNamedColor && !fill && styles.colors.base[color], !iconOnClick && (onClick || href) && styles.clickable]));
82
+ var clickableCssStyles = styles.clickable[isNamedColor ? color === 'hollow' ? 'hollow' : !fill ? 'base' : 'fill' : 'custom'];
83
+ var iconOnClickCssStyles = isNamedColor ? styles.iconClickable[color === 'hollow' ? 'hollow' : !fill ? 'base' : 'fill'] : styles.iconClickable.custom;
84
+ var cssStyles = [styles.euiBadge, isIconOnly && styles.iconOnly].concat(_toConsumableArray(isDisabled ? [styles.disabled] : [isNamedColor && fill && styles.colors.fill[color], isNamedColor && !fill && styles.colors.base[color], !iconOnClick && (onClick || href) && clickableCssStyles, iconOnClick && !(onClick || href) && iconOnClickCssStyles]));
79
85
  var textCssStyles = [styles.text.euiBadge__text, (onClick || href) && !isDisabled && styles.text.clickable];
80
86
  var iconCssStyles = [styles.icon.euiBadge__icon, styles.icon[iconSide]];
81
87
  var iconButtonCssStyles = [styles.iconButton.euiBadge__iconButton, styles.iconButton[iconSide]];
@@ -8,7 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
- import { euiFontSize, euiFocusRing, euiTextTruncate, highContrastModeStyles, logicalCSS, logicalShorthandCSS, logicalTextAlignCSS, mathWithUnits } from '../../global_styling';
11
+ import { euiFontSize, euiFocusRing, euiTextTruncate, highContrastModeStyles, logicalCSS, logicalShorthandCSS, logicalTextAlignCSS, mathWithUnits, euiButtonInteractionStyles } from '../../global_styling';
12
12
  import { euiBadgeColors } from './color_utils';
13
13
  var _ref = process.env.NODE_ENV === "production" ? {
14
14
  name: "1jbvl30-euiBadge__iconButton",
@@ -30,9 +30,31 @@ export var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
30
30
  var euiTheme = euiThemeContext.euiTheme;
31
31
  var badgeColors = euiBadgeColors(euiThemeContext);
32
32
  var defaultBadgeColors = badgeColors.fill.default;
33
+ var focusOutlineOffset = mathWithUnits([euiTheme.focus.width, euiTheme.border.width.thin], function (x, y) {
34
+ return x + y;
35
+ });
33
36
  var setBadgeColorVars = function setBadgeColorVars(colors) {
34
- return "\n --euiBadgeTextColor: ".concat(colors.color, ";\n --euiBadgeBackgroundColor: ").concat(colors.backgroundColor, ";\n ").concat(colors.border ? "--euiBadgeBorder: ".concat(colors.border, ";") : '', "\n ");
37
+ return "\n --euiBadgeTextColor: ".concat(colors.color, ";\n --euiBadgeBackgroundColor: ").concat(colors.backgroundColor, ";\n --euiBadgeBackgroundHoverColor: ").concat(colors.backgroundHover, ";\n --euiBadgeBackgroundActiveColor: ").concat(colors.backgroundActive, ";\n ").concat(colors.borderColor ? "--euiBadgeBorder: ".concat(euiTheme.border.width.thin, " solid ").concat(colors.borderColor, ";") : '', "\n ");
38
+ };
39
+ var getButtonInteractionStyles = function getButtonInteractionStyles(euiThemeContext) {
40
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'fill';
41
+ return "\n ".concat(euiButtonInteractionStyles(euiThemeContext, {
42
+ color: 'var(--euiBadgeTextColor)',
43
+ background: 'var(--euiBadgeBackgroundColor)',
44
+ borderColor: 'var(--euiBadgeBorder)',
45
+ backgroundHover: 'var(--euiBadgeBackgroundHoverColor)',
46
+ backgroundActive: 'var(--euiBadgeBackgroundActiveColor)'
47
+ }, type), "\n ");
48
+ };
49
+ var highContrastStyles = highContrastModeStyles(euiThemeContext, {
50
+ preferred: "\n text-decoration: underline;\n ",
51
+ forced: "\n &::after { display: none; }\n "
52
+ });
53
+ var focusStyles = "\n &:focus {\n ".concat(euiFocusRing(euiThemeContext, 'outset'), "\n /* uses custom offset as the default \"outset\" is not enough */\n outline-offset: ").concat(focusOutlineOffset, ";\n }\n ");
54
+ var getClickableStyles = function getClickableStyles(interactionStyles) {
55
+ return "\n &:not(:disabled) {\n ".concat(interactionStyles, "\n\n &:hover,\n &:focus {\n ").concat(highContrastStyles, "\n }\n\n ").concat(focusStyles, "\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n ");
35
56
  };
57
+ var customInteractiveStyles = "\n &:hover {\n background-color: var(--euiBadgeBackgroundHoverColor);\n }\n\n &:active {\n background-color: var(--euiBadgeBackgroundActiveColor);\n }\n\n ".concat(focusStyles, "\n ");
36
58
  var inlinePadding = mathWithUnits(
37
59
  // Account for the (usually transparent) border so that the visual
38
60
  // padding is of size s
@@ -52,7 +74,36 @@ export var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
52
74
  [euiTheme.size.xs, euiTheme.border.width.thin], function (size, borderWidth) {
53
75
  return size - borderWidth;
54
76
  }), ";;label:iconOnly;"),
55
- clickable: /*#__PURE__*/css("&:not(:disabled){&:hover,&:focus{text-decoration:underline;}}&:focus{", euiFocusRing(euiThemeContext), ";}&:disabled{cursor:not-allowed;};label:clickable;"),
77
+ get clickable() {
78
+ // ensures border colors are aligned with the background colors
79
+ var borderHoverStyles = "\n &:hover { \n border-color: var(--euiBadgeBackgroundHoverColor);\n }\n &:active {\n border-color: var(--euiBadgeBackgroundActiveColor);\n }\n ";
80
+ return {
81
+ fill: /*#__PURE__*/css(getClickableStyles(getButtonInteractionStyles(euiThemeContext, 'fill')), " ", borderHoverStyles, ";;label:fill;"),
82
+ base: /*#__PURE__*/css(getClickableStyles(getButtonInteractionStyles(euiThemeContext, 'overlay')), " ", highContrastModeStyles(euiThemeContext, {
83
+ none: borderHoverStyles
84
+ }), ";;label:base;"),
85
+ // hollow has a visible border that must not be overwritten on hover
86
+ hollow: /*#__PURE__*/css(getClickableStyles(getButtonInteractionStyles(euiThemeContext, 'overlay')), " &:hover,&:focus{", highContrastStyles, ";};label:hollow;"),
87
+ custom: /*#__PURE__*/css("&:not(:disabled){", customInteractiveStyles, ";&:hover,&:focus{", highContrastStyles, ";}};label:custom;")
88
+ };
89
+ },
90
+ // on icon button hover, we apply hover styles on the entire badge
91
+ get iconClickable() {
92
+ var iconButtonSelector = function iconButtonSelector() {
93
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ':hover';
94
+ return "&:not(:disabled):where(:has(.euiBadge__iconButton".concat(state, "))");
95
+ };
96
+ var borderHoverStyles = "\n border-color: var(--euiBadgeBackgroundHoverColor);\n ";
97
+ return {
98
+ fill: /*#__PURE__*/css(iconButtonSelector(), "{", getButtonInteractionStyles(euiThemeContext, 'fill'), " ", borderHoverStyles, ";}", iconButtonSelector(':is(:hover, :focus)'), "{", highContrastStyles, ";};label:fill;"),
99
+ base: /*#__PURE__*/css(iconButtonSelector(), "{", getButtonInteractionStyles(euiThemeContext, 'overlay'), " ", highContrastModeStyles(euiThemeContext, {
100
+ none: borderHoverStyles
101
+ }), ";}", iconButtonSelector(':is(:hover, :focus)'), "{", highContrastStyles, ";};label:base;"),
102
+ // hollow has a visible border that must not be overwritten on hover
103
+ hollow: /*#__PURE__*/css(iconButtonSelector(), "{", getButtonInteractionStyles(euiThemeContext, 'overlay'), ";}", iconButtonSelector(':is(:hover, :focus)'), "{", highContrastStyles, ";};label:hollow;"),
104
+ custom: /*#__PURE__*/css(iconButtonSelector(':is(:hover, :focus)'), "{", highContrastStyles, " ", customInteractiveStyles, ";};label:custom;")
105
+ };
106
+ },
56
107
  colors: {
57
108
  fill: {
58
109
  default: /*#__PURE__*/css(setBadgeColorVars(badgeColors.fill.default), " border-color:", badgeColors.fill.default.borderColor, ";;label:default;"),
@@ -77,7 +128,7 @@ export var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
77
128
  danger: /*#__PURE__*/css(setBadgeColorVars(badgeColors.base.danger), ";label:danger;")
78
129
  }
79
130
  },
80
- disabled: /*#__PURE__*/css(setBadgeColorVars(badgeColors.disabled), " border-color:", badgeColors.disabled.borderColor, ";*::selection{color:", euiTheme.colors.emptyShade, ";};label:disabled;"),
131
+ disabled: /*#__PURE__*/css(setBadgeColorVars(badgeColors.disabled), " border-color:", badgeColors.disabled.borderColor, ";*::selection{color:", euiTheme.colors.backgroundBasePlain, ";};label:disabled;"),
81
132
  // Content wrapper
82
133
  euiBadge__content: /*#__PURE__*/css(logicalCSS(
83
134
  // Ensure proper height in case of just displaying an icon
@@ -12,7 +12,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
12
12
 
13
13
  import chroma from 'chroma-js';
14
14
  import { isColorDark } from '../../services';
15
- import { euiButtonColor, euiButtonFillColor } from '../../global_styling/mixins/_button';
15
+ import { getEuiButtonColorValues, getEuiFilledButtonColorValues } from '../../global_styling/mixins/_button';
16
16
  import { chromaValid, parseColor } from '../color_picker/utils';
17
17
  export var euiBadgeColors = function euiBadgeColors(euiThemeContext) {
18
18
  var euiTheme = euiThemeContext.euiTheme,
@@ -20,38 +20,44 @@ export var euiBadgeColors = function euiBadgeColors(euiThemeContext) {
20
20
  var badgeColorsAccentText = getBadgeColors(euiThemeContext, euiTheme.colors.textAccent);
21
21
  var fill = {
22
22
  // Colors shared between buttons and badges
23
- primary: euiButtonFillColor(euiThemeContext, 'primary'),
24
- neutral: euiButtonFillColor(euiThemeContext, 'neutral'),
25
- success: euiButtonFillColor(euiThemeContext, 'success'),
26
- warning: euiButtonFillColor(euiThemeContext, 'warning'),
27
- risk: euiButtonFillColor(euiThemeContext, 'risk'),
28
- danger: euiButtonFillColor(euiThemeContext, 'danger'),
29
- accent: euiButtonFillColor(euiThemeContext, 'accent'),
23
+ primary: getEuiFilledButtonColorValues(euiThemeContext, 'primary'),
24
+ neutral: getEuiFilledButtonColorValues(euiThemeContext, 'neutral'),
25
+ success: getEuiFilledButtonColorValues(euiThemeContext, 'success'),
26
+ warning: getEuiFilledButtonColorValues(euiThemeContext, 'warning'),
27
+ risk: getEuiFilledButtonColorValues(euiThemeContext, 'risk'),
28
+ danger: getEuiFilledButtonColorValues(euiThemeContext, 'danger'),
29
+ accent: getEuiFilledButtonColorValues(euiThemeContext, 'accent'),
30
30
  // Colors unique to badges
31
31
  default: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.components.badgeBackground)), {}, {
32
- borderColor: highContrastMode ? euiTheme.border.color : ''
32
+ backgroundHover: euiTheme.components.buttons.backgroundFilledTextHover,
33
+ backgroundActive: euiTheme.components.buttons.backgroundFilledTextActive,
34
+ borderColor: 'transparent'
33
35
  })
34
36
  };
35
37
  var base = {
36
- primary: euiButtonColor(euiThemeContext, 'primary'),
37
- neutral: euiButtonColor(euiThemeContext, 'neutral'),
38
- success: euiButtonColor(euiThemeContext, 'success'),
39
- warning: euiButtonColor(euiThemeContext, 'warning'),
40
- risk: euiButtonColor(euiThemeContext, 'risk'),
41
- danger: euiButtonColor(euiThemeContext, 'danger'),
42
- accent: euiButtonColor(euiThemeContext, 'accent'),
38
+ primary: getEuiButtonColorValues(euiThemeContext, 'primary'),
39
+ neutral: getEuiButtonColorValues(euiThemeContext, 'neutral'),
40
+ success: getEuiButtonColorValues(euiThemeContext, 'success'),
41
+ warning: getEuiButtonColorValues(euiThemeContext, 'warning'),
42
+ risk: getEuiButtonColorValues(euiThemeContext, 'risk'),
43
+ danger: getEuiButtonColorValues(euiThemeContext, 'danger'),
44
+ accent: getEuiButtonColorValues(euiThemeContext, 'accent'),
43
45
  default: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.colors.backgroundLightText)), {}, {
46
+ backgroundHover: euiTheme.components.buttons.backgroundTextHover,
47
+ backgroundActive: euiTheme.components.buttons.backgroundTextActive,
44
48
  borderColor: highContrastMode ? euiTheme.border.color : ''
45
49
  })
46
50
  };
47
51
  return {
48
52
  fill: fill,
49
53
  base: base,
50
- disabled: _objectSpread(_objectSpread({}, euiButtonColor(euiThemeContext, 'disabled')), {}, {
54
+ disabled: _objectSpread(_objectSpread({}, getEuiButtonColorValues(euiThemeContext, 'disabled')), {}, {
51
55
  borderColor: highContrastMode ? euiTheme.colors.textDisabled : ''
52
56
  }),
53
57
  // Hollow has a border and is used for autocompleters and beta badges
54
58
  hollow: _objectSpread(_objectSpread({}, getBadgeColors(euiThemeContext, euiTheme.colors.emptyShade)), {}, {
59
+ backgroundHover: euiTheme.components.buttons.backgroundTextHover,
60
+ backgroundActive: euiTheme.components.buttons.backgroundTextActive,
55
61
  borderColor: highContrastMode ? euiTheme.border.color : euiTheme.components.badgeBorderColorHollow
56
62
  }),
57
63
  // Colors used by beta and notification badges
@@ -75,6 +81,22 @@ export var getTextColor = function getTextColor(_ref, bgColor) {
75
81
  var textColor = isColorDark.apply(void 0, _toConsumableArray(chroma(bgColor).rgb())) ? euiTheme.colors.textGhost : euiTheme.colors.textInk;
76
82
  return textColor;
77
83
  };
84
+
85
+ /**
86
+ * Generates the background hover and active colors for custom interactive badges by mixing
87
+ * the background color with black or white depending on the background color luminance.
88
+ * @returns { backgroundHover: string, backgroundActive: string }
89
+ */
90
+ export var getCustomInteractiveColors = function getCustomInteractiveColors(_ref2, bgColor) {
91
+ var euiTheme = _ref2.euiTheme;
92
+ var isDarkColor = isColorDark.apply(void 0, _toConsumableArray(chroma(bgColor).rgb()));
93
+ var backgroundHover = isDarkColor ? "color-mix(in oklab, ".concat(bgColor, ", ").concat(euiTheme.colors.textGhost, " 10%)") : "color-mix(in oklab, ".concat(bgColor, ", ").concat(euiTheme.colors.textInk, " 10%)");
94
+ var backgroundActive = isDarkColor ? "color-mix(in oklab, ".concat(bgColor, ", ").concat(euiTheme.colors.textGhost, " 15%)") : "color-mix(in oklab, ".concat(bgColor, ", ").concat(euiTheme.colors.textInk, " 15%)");
95
+ return {
96
+ backgroundHover: backgroundHover,
97
+ backgroundActive: backgroundActive
98
+ };
99
+ };
78
100
  export var getIsValidColor = function getIsValidColor(color) {
79
101
  return chromaValid(parseColor(color || '') || '');
80
102
  };
@@ -157,7 +157,7 @@ describe('EuiTable', function () {
157
157
  return toggleDetails(user);
158
158
  },
159
159
  "aria-label": itemIdToExpandedRowMapValues[user.id] ? 'Collapse' : 'Expand',
160
- iconType: itemIdToExpandedRowMapValues[user.id] ? 'arrowDown' : 'arrowRight'
160
+ iconType: itemIdToExpandedRowMapValues[user.id] ? 'chevronSingleDown' : 'chevronSingleRight'
161
161
  });
162
162
  }
163
163
  }]);