@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
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["className", "children", "as", "hideCloseButton", "flyoutMenuProps", "closeButtonProps", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "hasChildBackground", "maskProps", "type", "outsideClickCloses", "pushMinBreakpoint", "pushAnimation", "focusTrapProps", "includeFixedHeadersInFocusTrap", "includeSelectorInFocusTrap", "aria-describedby", "aria-labelledby", "id", "resizable", "minWidth", "onResize", "onAnimationEnd"],
2
+ var _excluded = ["className", "children", "as", "hideCloseButton", "flyoutMenuProps", "closeButtonProps", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "hasChildBackground", "maskProps", "type", "outsideClickCloses", "pushMinBreakpoint", "pushAnimation", "focusTrapProps", "includeFixedHeadersInFocusTrap", "includeSelectorInFocusTrap", "aria-describedby", "aria-labelledby", "id", "resizable", "minWidth", "onResize", "onAnimationEnd", "container"],
3
3
  _excluded2 = ["titleId"];
4
4
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
5
5
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
@@ -32,8 +32,8 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
32
32
  import React, { useEffect, useLayoutEffect, useRef, useMemo, useCallback, useState, forwardRef } from 'react';
33
33
  import classnames from 'classnames';
34
34
  import { keys, EuiWindowEvent, useCombinedRefs, useEuiMemoizedStyles, useGeneratedHtmlId, useEuiThemeCSSVariables, focusTrapPubSub } from '../../services';
35
- import { useCurrentSession, useIsInManagedFlyout, useFlyoutLayoutMode, useFlyoutId, useFlyoutWidth, useIsFlyoutActive, useFlyoutManager, useHasPushPadding } from './manager';
36
- import { LAYOUT_MODE_STACKED } from './manager/const';
35
+ import { useIsInManagedFlyout, useFlyoutId, useFlyoutManager } from './manager';
36
+ import { LAYOUT_MODE_SIDE_BY_SIDE, LAYOUT_MODE_STACKED, LEVEL_MAIN, PROPERTY_LEVEL } from './manager/const';
37
37
  import { EuiFocusTrap } from '../focus_trap';
38
38
  import { EuiI18n } from '../i18n';
39
39
  import { useResizeObserver } from '../observer/resize_observer';
@@ -49,10 +49,25 @@ import { EuiFlyoutResizeButton } from './_flyout_resize_button';
49
49
  import { useEuiFlyoutResizable } from './use_flyout_resizable';
50
50
  import { useEuiFlyoutZIndex } from './use_flyout_z_index';
51
51
  import { EuiFlyoutParentProvider } from './flyout_parent_context';
52
- import { useCurrentFlyoutZIndexRef } from './manager/selectors';
53
52
  import { jsx as ___EmotionJSX } from "@emotion/react";
53
+ /**
54
+ * Resolves the container prop (element, getter, or selector string) to an
55
+ * HTMLElement, or null if not found / invalid.
56
+ */
57
+ var resolveContainer = function resolveContainer(raw) {
58
+ if (raw == null) return null;
59
+ if (typeof raw === 'string') {
60
+ if (typeof document === 'undefined') return null;
61
+ var el = document.querySelector(raw);
62
+ return el instanceof HTMLElement ? el : null;
63
+ }
64
+ if (typeof raw === 'function') return raw();
65
+ if (typeof HTMLElement === 'undefined') return null;
66
+ return raw instanceof HTMLElement ? raw : null;
67
+ };
54
68
  var defaultElement = 'div';
55
69
  export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
70
+ var _maskProps$headerZind, _managerSessions, _managerState$layoutM, _managerState$current, _managerState$flyouts, _managerState$pushPad;
56
71
  var _usePropsWithComponen = usePropsWithComponentDefaults('EuiFlyout', props),
57
72
  className = _usePropsWithComponen.className,
58
73
  children = _usePropsWithComponen.children,
@@ -97,7 +112,9 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
97
112
  minWidth = _usePropsWithComponen.minWidth,
98
113
  onResize = _usePropsWithComponen.onResize,
99
114
  onAnimationEnd = _usePropsWithComponen.onAnimationEnd,
115
+ containerProp = _usePropsWithComponen.container,
100
116
  rest = _objectWithoutProperties(_usePropsWithComponen, _excluded);
117
+ var container = resolveContainer(containerProp);
101
118
  var _useEuiThemeCSSVariab = useEuiThemeCSSVariables(),
102
119
  setGlobalCSSVariables = _useEuiThemeCSSVariab.setGlobalCSSVariables;
103
120
  var Element = as || defaultElement;
@@ -109,13 +126,46 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
109
126
  type: type,
110
127
  pushMinBreakpoint: pushMinBreakpoint
111
128
  });
112
- var currentSession = useCurrentSession();
129
+ // When no explicit container is provided, push padding targets
130
+ // document.body and global push-offset CSS vars are set. When a
131
+ // container is provided, only that element receives padding.
132
+ var shouldSetGlobalPushVars = container == null;
133
+ if ('container' in props && ('maskProps' in props || 'includeFixedHeadersInFocusTrap' in props) && process.env.NODE_ENV === 'development') {
134
+ if ('maskProps' in props) {
135
+ console.warn('EuiFlyout: `maskProps` is deprecated. Prefer using the `container` prop to scope flyouts.');
136
+ }
137
+ if ('includeFixedHeadersInFocusTrap' in props) {
138
+ console.warn('EuiFlyout: `includeFixedHeadersInFocusTrap` is deprecated. Prefer `includeSelectorInFocusTrap` when using `container`.');
139
+ }
140
+ }
141
+ // Explicit viewport flyouts (container={null}) default to 'above' so
142
+ // they render above fixed headers. Container-scoped and legacy flyouts
143
+ // (no container prop) default to 'below'.
144
+ var effectiveHeaderZindexLocation = (_maskProps$headerZind = maskProps === null || maskProps === void 0 ? void 0 : maskProps.headerZindexLocation) !== null && _maskProps$headerZind !== void 0 ? _maskProps$headerZind : containerProp === null ? 'above' : 'below';
145
+
146
+ // Report the container element to the flyout manager for layout calculations.
147
+ useEffect(function () {
148
+ var _flyoutManagerRef$cur;
149
+ if (!container) return;
150
+ (_flyoutManagerRef$cur = flyoutManagerRef.current) === null || _flyoutManagerRef$cur === void 0 || _flyoutManagerRef$cur.setContainerElement(container);
151
+ return function () {
152
+ var _flyoutManagerRef$cur2;
153
+ if (((_flyoutManagerRef$cur2 = flyoutManagerRef.current) === null || _flyoutManagerRef$cur2 === void 0 || (_flyoutManagerRef$cur2 = _flyoutManagerRef$cur2.state) === null || _flyoutManagerRef$cur2 === void 0 ? void 0 : _flyoutManagerRef$cur2.containerElement) === container) {
154
+ flyoutManagerRef.current.setContainerElement(null);
155
+ }
156
+ };
157
+ }, [container]);
158
+
159
+ // Performance: read context once and derive all manager-dependent values inline.
113
160
  var isInManagedContext = useIsInManagedFlyout();
114
161
  var flyoutId = useFlyoutId(id);
115
- var layoutMode = useFlyoutLayoutMode();
116
- var isActiveManagedFlyout = useIsFlyoutActive(flyoutId);
117
162
  var flyoutManager = useFlyoutManager();
118
- var currentZIndexRef = useCurrentFlyoutZIndexRef();
163
+ var managerState = flyoutManager === null || flyoutManager === void 0 ? void 0 : flyoutManager.state;
164
+ var managerSessions = managerState === null || managerState === void 0 ? void 0 : managerState.sessions;
165
+ var currentSession = managerSessions ? (_managerSessions = managerSessions[managerSessions.length - 1]) !== null && _managerSessions !== void 0 ? _managerSessions : null : null;
166
+ var layoutMode = (_managerState$layoutM = managerState === null || managerState === void 0 ? void 0 : managerState.layoutMode) !== null && _managerState$layoutM !== void 0 ? _managerState$layoutM : LAYOUT_MODE_SIDE_BY_SIDE;
167
+ var isActiveManagedFlyout = (currentSession === null || currentSession === void 0 ? void 0 : currentSession.mainFlyoutId) === flyoutId || (currentSession === null || currentSession === void 0 ? void 0 : currentSession.childFlyoutId) === flyoutId;
168
+ var currentZIndexRef = useRef((_managerState$current = managerState === null || managerState === void 0 ? void 0 : managerState.currentZIndex) !== null && _managerState$current !== void 0 ? _managerState$current : 0);
119
169
 
120
170
  // Use a ref to access the latest flyoutManager without triggering effect re-runs
121
171
  var flyoutManagerRef = useRef(flyoutManager);
@@ -126,106 +176,186 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
126
176
  // Keep track of unmanaged flyouts to properly calculate z-index
127
177
  // values for all flyouts
128
178
  if (!isInManagedContext) {
129
- var _flyoutManagerRef$cur;
130
- (_flyoutManagerRef$cur = flyoutManagerRef.current) === null || _flyoutManagerRef$cur === void 0 || _flyoutManagerRef$cur.addUnmanagedFlyout(flyoutId);
179
+ var _flyoutManagerRef$cur3;
180
+ (_flyoutManagerRef$cur3 = flyoutManagerRef.current) === null || _flyoutManagerRef$cur3 === void 0 || _flyoutManagerRef$cur3.addUnmanagedFlyout(flyoutId);
131
181
  return function () {
132
- var _flyoutManagerRef$cur2;
133
- return (_flyoutManagerRef$cur2 = flyoutManagerRef.current) === null || _flyoutManagerRef$cur2 === void 0 ? void 0 : _flyoutManagerRef$cur2.closeUnmanagedFlyout(flyoutId);
182
+ var _flyoutManagerRef$cur4;
183
+ return (_flyoutManagerRef$cur4 = flyoutManagerRef.current) === null || _flyoutManagerRef$cur4 === void 0 ? void 0 : _flyoutManagerRef$cur4.closeUnmanagedFlyout(flyoutId);
134
184
  };
135
185
  }
136
186
  }, [isInManagedContext, flyoutId]);
137
- var _useEuiFlyoutResizabl = useEuiFlyoutResizable({
138
- enabled: resizable,
139
- minWidth: minWidth,
140
- maxWidth: typeof maxWidth === 'number' ? maxWidth : 0,
141
- onResize: onResize,
142
- side: side,
143
- size: _size
144
- }),
145
- onMouseDownResizableButton = _useEuiFlyoutResizabl.onMouseDown,
146
- onKeyDownResizableButton = _useEuiFlyoutResizabl.onKeyDown,
147
- size = _useEuiFlyoutResizabl.size,
148
- setFlyoutRef = _useEuiFlyoutResizabl.setFlyoutRef;
149
187
 
150
- /**
151
- * Setting up the refs on the actual flyout element in order to
152
- * accommodate for the `isPushed` state by adding padding to the body equal to the width of the element
153
- */
154
- var _useState = useState(null),
155
- _useState2 = _slicedToArray(_useState, 2),
156
- resizeRef = _useState2[0],
157
- setResizeRef = _useState2[1];
158
- var setRef = useCombinedRefs([setResizeRef, ref, internalParentFlyoutRef, setFlyoutRef]);
159
- var _useResizeObserver = useResizeObserver(isPushed ? resizeRef : null, 'width'),
160
- width = _useResizeObserver.width;
161
-
162
- // Memoize flyout identification and relationships to prevent race conditions
188
+ // Derive flyout identity and sibling info from the single context read
163
189
  var flyoutIdentity = useMemo(function () {
164
190
  if (!flyoutId || !currentSession) {
165
191
  return {
166
192
  isMainFlyout: false,
167
193
  siblingFlyoutId: null,
168
- hasValidSession: false,
169
- sessionForWidth: null
194
+ hasValidSession: false
170
195
  };
171
196
  }
172
197
  var siblingFlyoutId = currentSession.mainFlyoutId === flyoutId ? currentSession.childFlyoutId : currentSession.mainFlyoutId;
173
198
  return {
174
199
  isMainFlyout: currentSession.mainFlyoutId === flyoutId,
175
200
  siblingFlyoutId: siblingFlyoutId,
176
- hasValidSession: true,
177
- sessionForWidth: currentSession
201
+ hasValidSession: true
178
202
  };
179
203
  }, [flyoutId, currentSession]);
180
204
 
181
205
  // Destructure for easier use
182
206
  var siblingFlyoutId = flyoutIdentity.siblingFlyoutId,
183
207
  isMainFlyout = flyoutIdentity.isMainFlyout;
184
- var _siblingFlyoutWidth = useFlyoutWidth(siblingFlyoutId);
208
+
209
+ // Derive sibling flyout data from manager state (single read, no extra hooks)
210
+ var siblingFlyout = siblingFlyoutId ? (_managerState$flyouts = managerState === null || managerState === void 0 ? void 0 : managerState.flyouts.find(function (f) {
211
+ return f.flyoutId === siblingFlyoutId;
212
+ })) !== null && _managerState$flyouts !== void 0 ? _managerState$flyouts : null : null;
213
+ var _siblingFlyoutWidth = siblingFlyout === null || siblingFlyout === void 0 ? void 0 : siblingFlyout.width;
214
+ var isSiblingFill = (siblingFlyout === null || siblingFlyout === void 0 ? void 0 : siblingFlyout.size) === 'fill';
215
+ var siblingFlyoutMinWidth = siblingFlyout === null || siblingFlyout === void 0 ? void 0 : siblingFlyout.minWidth;
185
216
  var siblingFlyoutWidth = layoutMode === LAYOUT_MODE_STACKED ? 0 : _siblingFlyoutWidth;
186
217
 
218
+ // Observe the container's dimensions so the resize hook and
219
+ // positioning styles stay aligned with its bounding rect.
220
+ // When no container is provided, these remain inert (null/undefined).
221
+ var containerDimensions = useResizeObserver(container !== null && container !== void 0 ? container : null, 'width');
222
+ var containerReferenceWidth = container ? containerDimensions.width || container.clientWidth : undefined;
223
+
224
+ // Track the container's bounding rect for positioning the flyout.
225
+ var _useState = useState(null),
226
+ _useState2 = _slicedToArray(_useState, 2),
227
+ containerRect = _useState2[0],
228
+ setContainerRect = _useState2[1];
229
+ useLayoutEffect(function () {
230
+ if (!container) {
231
+ setContainerRect(null);
232
+ return;
233
+ }
234
+ setContainerRect(container.getBoundingClientRect());
235
+ }, [container, containerDimensions.width]);
236
+ useEffect(function () {
237
+ if (!container) return;
238
+ var updateRect = function updateRect() {
239
+ var next = container.getBoundingClientRect();
240
+ setContainerRect(function (prev) {
241
+ if (prev && prev.top === next.top && prev.left === next.left && prev.width === next.width && prev.height === next.height) {
242
+ return prev;
243
+ }
244
+ return next;
245
+ });
246
+ };
247
+ window.addEventListener('scroll', updateRect, {
248
+ passive: true
249
+ });
250
+ window.addEventListener('resize', updateRect, {
251
+ passive: true
252
+ });
253
+ return function () {
254
+ window.removeEventListener('scroll', updateRect);
255
+ window.removeEventListener('resize', updateRect);
256
+ };
257
+ }, [container]);
258
+ // Prefer the manager's reference width when available so resize clamp
259
+ // uses the same value as layout mode. When we have a container, cap by
260
+ // its measured width so we never allow resize past the container (e.g. if
261
+ // manager had viewport fallback or timing mismatch).
262
+ var managerRefWidth = isInManagedContext && typeof (managerState === null || managerState === void 0 ? void 0 : managerState.referenceWidth) === 'number' && managerState.referenceWidth > 0 ? managerState.referenceWidth : undefined;
263
+ var effectiveReferenceWidth = containerReferenceWidth != null && containerReferenceWidth > 0 ? managerRefWidth != null ? Math.min(managerRefWidth, containerReferenceWidth) : containerReferenceWidth : managerRefWidth !== null && managerRefWidth !== void 0 ? managerRefWidth : containerReferenceWidth;
264
+ var _useEuiFlyoutResizabl = useEuiFlyoutResizable({
265
+ enabled: resizable,
266
+ minWidth: minWidth,
267
+ maxWidth: typeof maxWidth === 'number' ? maxWidth : undefined,
268
+ // For fill siblings, clamp based on their minWidth rather than their
269
+ // current measured width. Fill siblings dynamically adjust via CSS
270
+ // (`calc(90% - mainWidth)`), so subtracting their current width from
271
+ // the max creates a circular dependency where the main flyout can
272
+ // never grow (max = 90% - (90% - main) = main). Using minWidth
273
+ // breaks this cycle while ensuring the fill sibling never collapses
274
+ // below its configured minimum.
275
+ siblingFlyoutWidth: isSiblingFill ? siblingFlyoutMinWidth : siblingFlyoutWidth !== null && siblingFlyoutWidth !== void 0 ? siblingFlyoutWidth : undefined,
276
+ referenceWidth: effectiveReferenceWidth,
277
+ onResize: onResize,
278
+ side: side,
279
+ size: _size
280
+ }),
281
+ onMouseDownResizableButton = _useEuiFlyoutResizabl.onMouseDown,
282
+ onKeyDownResizableButton = _useEuiFlyoutResizabl.onKeyDown,
283
+ size = _useEuiFlyoutResizabl.size,
284
+ setFlyoutRef = _useEuiFlyoutResizabl.setFlyoutRef;
285
+
286
+ // Publish the main flyout's resolved width as a CSS custom property on
287
+ // the document element so that the child (fill) flyout can track it
288
+ // synchronously during drag resize, avoiding the 1-frame lag that
289
+ // results from the async ResizeObserver → manager-state pipeline.
290
+ useLayoutEffect(function () {
291
+ if (!isMainFlyout) return;
292
+
293
+ // Only set when we have a computed percentage (during active resize)
294
+ if (typeof size === 'string' && size.endsWith('%')) {
295
+ document.documentElement.style.setProperty('--euiFlyoutMainWidth', size);
296
+ }
297
+ return function () {
298
+ document.documentElement.style.removeProperty('--euiFlyoutMainWidth');
299
+ };
300
+ }, [isMainFlyout, size]);
301
+
302
+ /**
303
+ * Setting up the refs on the actual flyout element in order to
304
+ * accommodate for the `isPushed` state by adding padding to the body equal to the width of the element
305
+ */
306
+ var _useState3 = useState(null),
307
+ _useState4 = _slicedToArray(_useState3, 2),
308
+ resizeRef = _useState4[0],
309
+ setResizeRef = _useState4[1];
310
+ var setRef = useCombinedRefs([setResizeRef, ref, internalParentFlyoutRef, setFlyoutRef]);
311
+ var _useResizeObserver = useResizeObserver(isPushed ? resizeRef : null, 'width'),
312
+ width = _useResizeObserver.width;
313
+
187
314
  /**
188
- * Effect for adding push padding to body. Using useLayoutEffect to ensure
189
- * padding changes happen synchronously before child components render -
190
- * this is needed to prevent RemoveScrollBar from measuring the body in an
191
- * inconsistent state during flyout transitions.
315
+ * Effect for adding push padding so the flyout has room. Targets the
316
+ * container element when one is provided, otherwise document.body.
317
+ * Uses useLayoutEffect so padding is applied before child render.
192
318
  */
193
319
  useLayoutEffect(function () {
194
320
  if (!isPushed) {
195
- return; // Only push-type flyouts manage body padding
321
+ return;
196
322
  }
323
+ var paddingTarget = container !== null && container !== void 0 ? container : document.body;
197
324
  var shouldApplyPadding = !isInManagedContext || isActiveManagedFlyout;
198
325
  var paddingSide = side === 'left' ? 'paddingInlineStart' : 'paddingInlineEnd';
199
326
  var cssVarName = "--euiPushFlyoutOffset".concat(side === 'left' ? 'InlineStart' : 'InlineEnd');
200
327
  var managerSide = side === 'left' ? 'left' : 'right';
328
+
329
+ // Capture pre-existing inline padding so it can be restored on cleanup
330
+ var previousPadding = paddingTarget.style[paddingSide];
201
331
  var paddingWidth = layoutMode === LAYOUT_MODE_STACKED && isMainFlyout && _siblingFlyoutWidth ? _siblingFlyoutWidth : width;
202
332
  if (shouldApplyPadding) {
203
- document.body.style[paddingSide] = "".concat(paddingWidth, "px");
204
- setGlobalCSSVariables(_defineProperty({}, cssVarName, "".concat(paddingWidth, "px")));
205
- // Update manager state if in managed context
333
+ paddingTarget.style[paddingSide] = "".concat(paddingWidth, "px");
334
+ if (shouldSetGlobalPushVars) {
335
+ setGlobalCSSVariables(_defineProperty({}, cssVarName, "".concat(paddingWidth, "px")));
336
+ }
206
337
  if (isInManagedContext && flyoutManagerRef.current) {
207
338
  flyoutManagerRef.current.setPushPadding(managerSide, paddingWidth);
208
339
  }
209
340
  } else {
210
- // Explicitly remove padding when this push flyout becomes inactive
211
- document.body.style[paddingSide] = '';
212
- setGlobalCSSVariables(_defineProperty({}, cssVarName, null));
213
- // Clear manager state if in managed context
341
+ paddingTarget.style[paddingSide] = previousPadding;
342
+ if (shouldSetGlobalPushVars) {
343
+ setGlobalCSSVariables(_defineProperty({}, cssVarName, null));
344
+ }
214
345
  if (isInManagedContext && flyoutManagerRef.current) {
215
346
  flyoutManagerRef.current.setPushPadding(managerSide, 0);
216
347
  }
217
348
  }
218
-
219
- // Cleanup on unmount
220
349
  return function () {
221
- document.body.style[paddingSide] = '';
222
- setGlobalCSSVariables(_defineProperty({}, cssVarName, null));
223
- // Clear manager state on unmount if in managed context
350
+ paddingTarget.style[paddingSide] = previousPadding;
351
+ if (shouldSetGlobalPushVars) {
352
+ setGlobalCSSVariables(_defineProperty({}, cssVarName, null));
353
+ }
224
354
  if (isInManagedContext && flyoutManagerRef.current) {
225
355
  flyoutManagerRef.current.setPushPadding(managerSide, 0);
226
356
  }
227
357
  };
228
- }, [isPushed, isInManagedContext, isActiveManagedFlyout, setGlobalCSSVariables, side, width, layoutMode, isMainFlyout, _siblingFlyoutWidth]);
358
+ }, [isPushed, isInManagedContext, isActiveManagedFlyout, setGlobalCSSVariables, side, width, layoutMode, isMainFlyout, _siblingFlyoutWidth, shouldSetGlobalPushVars, container]);
229
359
 
230
360
  /**
231
361
  * This class doesn't actually do anything by EUI, but is nice to add for consumers (JIC)
@@ -233,7 +363,6 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
233
363
  useEffect(function () {
234
364
  document.body.classList.add('euiBody--hasFlyout');
235
365
  return function () {
236
- // Remove the hasFlyout class when the flyout is unmounted
237
366
  document.body.classList.remove('euiBody--hasFlyout');
238
367
  };
239
368
  }, []);
@@ -258,6 +387,9 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
258
387
  // Main flyout with child flyout - don't close on ESC
259
388
  return false;
260
389
  }, [isInManagedContext, hasChildFlyout, isChildFlyout]);
390
+ var handleClose = useCallback(function (event) {
391
+ onClose(event);
392
+ }, [onClose]);
261
393
 
262
394
  /**
263
395
  * ESC key closes flyout based on flyout hierarchy rules
@@ -265,15 +397,15 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
265
397
  var onKeyDown = useCallback(function (event) {
266
398
  if (!isPushed && event.key === keys.ESCAPE && shouldCloseOnEscape) {
267
399
  event.preventDefault();
268
- onClose(event);
400
+ handleClose(event);
269
401
  }
270
- }, [onClose, isPushed, shouldCloseOnEscape]);
402
+ }, [handleClose, isPushed, shouldCloseOnEscape]);
271
403
  var managedFlyoutIndex = currentZIndexRef.current;
272
404
  if (isInManagedContext && currentSession) {
273
405
  managedFlyoutIndex = currentSession.zIndex;
274
406
  }
275
407
  var _useEuiFlyoutZIndex = useEuiFlyoutZIndex({
276
- maskProps: maskProps,
408
+ headerZindexLocation: effectiveHeaderZindexLocation,
277
409
  isPushed: isPushed,
278
410
  managedFlyoutIndex: managedFlyoutIndex,
279
411
  isChildFlyout: isChildFlyout
@@ -282,20 +414,125 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
282
414
  maskZIndex = _useEuiFlyoutZIndex.maskZIndex;
283
415
 
284
416
  /**
285
- * Set inline styles
417
+ * Inline styles position the flyout inside the reference container's
418
+ * bounding rect (document.body or a specific element) while remaining in
419
+ * document.body with position: fixed.
286
420
  */
287
421
  var inlineStyles = useMemo(function () {
288
422
  var composedStyles = composeFlyoutInlineStyles(size, layoutMode, siblingFlyoutId, siblingFlyoutWidth || null, maxWidth, flyoutZIndex);
289
- return _objectSpread(_objectSpread({}, style), composedStyles);
290
- }, [style, size, layoutMode, siblingFlyoutId, siblingFlyoutWidth, maxWidth, flyoutZIndex]);
423
+
424
+ // Constrain the flyout to the reference container's bounding rect.
425
+ var containerPositionStyles = {};
426
+ if (containerRect) {
427
+ var containerMaxWidth = containerRect.width * 0.9;
428
+ // Use clientWidth (excludes scrollbar) to match the coordinate
429
+ // system of getBoundingClientRect() and CSS position: fixed.
430
+ var viewportWidth = document.documentElement.clientWidth;
431
+ var containerRightOffset = viewportWidth - containerRect.right;
432
+
433
+ // Compute the container-relative width for this flyout.
434
+ //
435
+ // For `position: fixed` elements CSS resolves `%` values against
436
+ // the viewport, not the container. The resize hook outputs
437
+ // percentage strings relative to `_referenceWidth` (the container),
438
+ // so we must convert them to pixel values here.
439
+ //
440
+ // Named sizes use their standard proportions (matching
441
+ // `composeFlyoutSizing`). Percentage strings from the resize hook
442
+ // are parsed and resolved against the container width. Numeric
443
+ // values are used directly.
444
+ var sizePercentMap = {
445
+ s: 0.25,
446
+ m: 0.5,
447
+ l: 0.75,
448
+ fill: 0.9
449
+ };
450
+ var containerRelativeWidth;
451
+ if (typeof size === 'string') {
452
+ var namedPct = sizePercentMap[size];
453
+ if (namedPct !== undefined) {
454
+ containerRelativeWidth = containerRect.width * namedPct;
455
+ } else if (size.endsWith('%')) {
456
+ // Percentage string from the resize hook — the value is
457
+ // relative to `_referenceWidth` (container width). Parse it
458
+ // and resolve against the container to get the correct pixels.
459
+ var pct = parseFloat(size);
460
+ if (!isNaN(pct)) {
461
+ containerRelativeWidth = containerRect.width * (pct / 100);
462
+ }
463
+ }
464
+ } else if (typeof size === 'number') {
465
+ containerRelativeWidth = size;
466
+ }
467
+
468
+ // All container-scoped flyouts get top/height from the container rect.
469
+ // Reset minInlineSize to 0 so that the CSS `min-inline-size` (which
470
+ // resolves against the viewport for `position: fixed`) does not
471
+ // prevent the container-relative width constraints from taking effect.
472
+ containerPositionStyles = {
473
+ top: containerRect.top,
474
+ height: containerRect.height,
475
+ minInlineSize: 0
476
+ };
477
+ if (isChildFlyout) {
478
+ // Child flyouts position themselves relative to the main flyout.
479
+ // In side-by-side mode, `siblingFlyoutWidth` is the main flyout's
480
+ // pixel width; in stacked mode it's 0 (child sits on top).
481
+ var siblingPx = siblingFlyoutWidth || 0;
482
+ if (side === 'left') {
483
+ containerPositionStyles.left = containerRect.left + siblingPx;
484
+ } else {
485
+ containerPositionStyles.right = containerRightOffset + siblingPx;
486
+ }
487
+ if (containerRelativeWidth !== undefined) {
488
+ // Set `inlineSize` (logical property) so it properly overrides
489
+ // `inlineSize` from composedStyles. We intentionally do NOT set
490
+ // maxInlineSize — the CSS `max-inline-size` from the size class
491
+ // provides the size-specific cap on initial render, and the
492
+ // resize hook's clamp handles it after resize interactions.
493
+ //
494
+ // For fill-size children in side-by-side mode, subtract the
495
+ // main flyout's width so the child takes only the remaining
496
+ // available space. For non-fill children, do NOT subtract —
497
+ // a fill-size main will shrink dynamically to accommodate.
498
+ var fillDeduction = size === 'fill' && layoutMode === LAYOUT_MODE_SIDE_BY_SIDE && siblingFlyoutWidth ? siblingFlyoutWidth : 0;
499
+ containerPositionStyles.inlineSize = Math.min(Math.max(0, containerRelativeWidth - fillDeduction), containerMaxWidth);
500
+ } else {
501
+ containerPositionStyles.maxInlineSize = containerMaxWidth;
502
+ }
503
+ } else {
504
+ // Main/standalone flyouts align to the container's edge.
505
+ if (side === 'left') {
506
+ containerPositionStyles.left = containerRect.left;
507
+ } else {
508
+ containerPositionStyles.right = containerRightOffset;
509
+ }
510
+ if (containerRelativeWidth !== undefined) {
511
+ // For fill-size flyouts in side-by-side mode, subtract the
512
+ // sibling's width so the main shrinks to accommodate the child.
513
+ var _siblingPx = size === 'fill' && layoutMode === LAYOUT_MODE_SIDE_BY_SIDE && siblingFlyoutWidth ? siblingFlyoutWidth : 0;
514
+ containerPositionStyles.inlineSize = Math.min(Math.max(0, containerRelativeWidth - _siblingPx), containerMaxWidth);
515
+ } else {
516
+ containerPositionStyles.maxInlineSize = containerMaxWidth;
517
+ }
518
+ }
519
+ }
520
+ return _objectSpread(_objectSpread(_objectSpread({}, style), composedStyles), containerPositionStyles);
521
+ }, [style, size, layoutMode, siblingFlyoutId, siblingFlyoutWidth, maxWidth, flyoutZIndex, containerRect, side, isChildFlyout]);
291
522
  var styles = useEuiMemoizedStyles(euiFlyoutStyles);
292
523
  var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, isPushed ? styles.push.push : styles.overlay.overlay, isPushed ? styles.push[side] : styles.overlay[side], isPushed && !pushAnimation && styles.push.noAnimation, styles[side]];
293
524
  var classes = classnames('euiFlyout', isChildFlyout && hasChildBackground && 'euiFlyout--hasChildBackground', className);
294
525
  var flyoutToggle = useRef(document.activeElement);
295
- var _useState3 = useState([]),
296
- _useState4 = _slicedToArray(_useState3, 2),
297
- focusTrapShards = _useState4[0],
298
- setFocusTrapShards = _useState4[1];
526
+ var _useState5 = useState([]),
527
+ _useState6 = _slicedToArray(_useState5, 2),
528
+ focusTrapShards = _useState6[0],
529
+ setFocusTrapShards = _useState6[1];
530
+ var isSideBySideChild = isChildFlyout && layoutMode === LAYOUT_MODE_SIDE_BY_SIDE;
531
+ // Side-by-side: main + child form a single modal unit; only main has aria-modal
532
+ // to avoid competing dialog semantics. Stacked children are independent modals.
533
+ var announcesAsModal = useMemo(function () {
534
+ return !isPushed && !isSideBySideChild;
535
+ }, [isPushed, isSideBySideChild]);
299
536
  var focusTrapSelectors = useMemo(function () {
300
537
  var selectors = [];
301
538
  if (includeSelectorInFocusTrap) {
@@ -304,8 +541,14 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
304
541
  if (includeFixedHeadersInFocusTrap) {
305
542
  selectors.push('.euiHeader[data-fixed-header]');
306
543
  }
544
+
545
+ // Include parent in focus trap shards for side-by-side mode (unified navigation).
546
+ // In stacked mode, parent is hidden behind child so shouldn't be navigable.
547
+ if (isSideBySideChild) {
548
+ selectors.push("[".concat(PROPERTY_LEVEL, "=\"").concat(LEVEL_MAIN, "\"]"));
549
+ }
307
550
  return selectors;
308
- }, [includeSelectorInFocusTrap, includeFixedHeadersInFocusTrap]);
551
+ }, [includeSelectorInFocusTrap, includeFixedHeadersInFocusTrap, isSideBySideChild]);
309
552
 
310
553
  /**
311
554
  * Finds the shards to include in the focus trap by querying by `focusTrapSelectors`.
@@ -363,8 +606,8 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
363
606
  token: "euiFlyout.screenReaderModalDialog",
364
607
  default: "You are in a modal dialog. Press Escape or tap/click outside the dialog on the shadowed overlay to close."
365
608
  }) : ___EmotionJSX(EuiI18n, {
366
- token: "euiFlyout.screenReaderNonModalDialog",
367
- default: "You are in a non-modal dialog. To close the dialog, press Escape."
609
+ token: "euiFlyout.screenReaderNoOverlayMaskDialog",
610
+ default: "You are in a modal dialog. To close the dialog, press Escape."
368
611
  }), ' ', focusTrapShards.length > 0 && ___EmotionJSX(EuiI18n, {
369
612
  token: "euiFlyout.screenReaderFocusTrapShards",
370
613
  default: "You can still continue tabbing through other global page landmarks."
@@ -416,26 +659,31 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
416
659
  if (outsideClickCloses === false) return undefined;
417
660
  if (hasOverlayMask) {
418
661
  // The overlay mask is present, so only clicks on the mask should close the flyout, regardless of outsideClickCloses
419
- if (event.target === maskRef.current) return onClose(event);
662
+ if (event.target === maskRef.current) return handleClose(event);
420
663
  } else {
421
664
  // No overlay mask is present, so any outside clicks should close the flyout
422
- if (outsideClickCloses === true) return onClose(event);
665
+ if (outsideClickCloses === true) return handleClose(event);
423
666
  }
424
667
  // Otherwise if ownFocus is false and outsideClickCloses is undefined, outside clicks should not close the flyout
425
668
  return undefined;
426
- }, [onClose, hasOverlayMask, outsideClickCloses]);
669
+ }, [handleClose, hasOverlayMask, outsideClickCloses]);
427
670
  var maskCombinedRefs = useCombinedRefs([maskProps === null || maskProps === void 0 ? void 0 : maskProps.maskRef, maskRef]);
428
671
 
429
672
  /**
430
673
  * For overlay flyouts in managed contexts, coordinate scroll locking with push flyout state.
431
674
  */
432
- var hasPushPaddingInManager = useHasPushPadding();
675
+ var pushPadding = (_managerState$pushPad = managerState === null || managerState === void 0 ? void 0 : managerState.pushPadding) !== null && _managerState$pushPad !== void 0 ? _managerState$pushPad : {
676
+ left: 0,
677
+ right: 0
678
+ };
679
+ var hasPushPaddingInManager = pushPadding.left > 0 || pushPadding.right > 0;
433
680
  var shouldDeferScrollLock = !isPushed && isInManagedContext && hasPushPaddingInManager;
434
681
  var shouldUseScrollLock = hasOverlayMask && !shouldDeferScrollLock;
435
682
  return ___EmotionJSX(EuiFlyoutOverlay, {
436
683
  hasOverlayMask: hasOverlayMask,
437
684
  isPushed: isPushed,
438
685
  maskZIndex: maskZIndex,
686
+ headerZindexLocation: effectiveHeaderZindexLocation,
439
687
  maskProps: _objectSpread(_objectSpread({}, maskProps), {}, {
440
688
  maskRef: maskCombinedRefs
441
689
  })
@@ -454,15 +702,15 @@ export var EuiFlyoutComponent = /*#__PURE__*/forwardRef(function (props, ref) {
454
702
  ref: setRef,
455
703
  id: id
456
704
  }, rest, {
457
- role: !isPushed ? 'dialog' : rest.role,
458
- "aria-modal": !isPushed || undefined,
705
+ role: announcesAsModal ? 'dialog' : rest.role,
706
+ "aria-modal": announcesAsModal ? true : undefined,
459
707
  tabIndex: !isPushed ? 0 : rest.tabIndex,
460
708
  "aria-describedby": !isPushed ? ariaDescribedBy : _ariaDescribedBy,
461
709
  "aria-labelledby": ariaLabelledBy,
462
710
  "data-autofocus": !isPushed || undefined,
463
711
  onAnimationEnd: onAnimationEnd
464
712
  }), !isPushed && screenReaderDescription, !_flyoutMenuProps && !hideCloseButton && ___EmotionJSX(EuiFlyoutCloseButton, _extends({}, closeButtonProps, {
465
- onClose: onClose,
713
+ onClose: handleClose,
466
714
  closeButtonPosition: closeButtonPosition,
467
715
  side: side
468
716
  })), _flyoutMenuProps && ___EmotionJSX(EuiFlyoutMenu, _extends({}, flyoutMenuProps, {