@elastic/eui 113.1.0 → 113.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
- package/es/components/badge/badge.js +12 -6
- package/es/components/badge/badge.styles.js +55 -4
- package/es/components/badge/color_utils.js +39 -17
- package/es/components/basic_table/basic_table.a11y.js +1 -1
- package/es/components/basic_table/basic_table.js +82 -16
- package/es/components/basic_table/collapsed_item_actions.js +1 -1
- package/es/components/basic_table/in_memory_table.js +47 -2
- package/es/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/es/components/button/split_button/split_button.js +3 -3
- package/es/components/button/split_button/split_button_actions.js +2 -2
- package/es/components/code/code_block_copy.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
- package/es/components/combo_box/combo_box_input/combo_box_input.js +1 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/es/components/context_menu/context_menu_item.js +1 -1
- package/es/components/context_menu/context_menu_panel.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
- package/es/components/datagrid/body/header/column_actions.js +1 -1
- package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/es/components/datagrid/controls/column_selector.js +2 -2
- package/es/components/datagrid/controls/column_sorting.js +1 -1
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/data_grid.a11y.js +1 -1
- package/es/components/datagrid/data_grid.stories.utils.js +3 -3
- package/es/components/datagrid/utils/data_grid_schema.js +1 -1
- package/es/components/date_picker/auto_refresh/auto_refresh.js +2 -2
- package/es/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
- package/es/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
- package/es/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
- package/es/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
- package/es/components/filter_group/filter_button.js +2 -2
- package/es/components/filter_group/filter_group.a11y.js +1 -1
- package/es/components/flyout/_flyout_overlay.js +5 -2
- package/es/components/flyout/flyout.component.js +329 -81
- package/es/components/flyout/flyout.styles.js +57 -31
- package/es/components/flyout/flyout_menu.js +2 -2
- package/es/components/flyout/manager/actions.js +27 -1
- package/es/components/flyout/manager/activity_stage.js +18 -7
- package/es/components/flyout/manager/flyout_child.js +18 -5
- package/es/components/flyout/manager/flyout_managed.js +29 -12
- package/es/components/flyout/manager/layout_mode.js +93 -33
- package/es/components/flyout/manager/reducer.js +24 -2
- package/es/components/flyout/manager/selectors.js +6 -0
- package/es/components/flyout/manager/store.js +6 -3
- package/es/components/flyout/use_flyout_resizable.js +64 -10
- package/es/components/flyout/use_flyout_z_index.js +5 -7
- package/es/components/form/checkbox/checkbox.js +1 -1
- package/es/components/form/field_password/field_password.js +1 -1
- package/es/components/form/field_search/field_search.js +1 -1
- package/es/components/form/file_picker/file_picker.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/es/components/header/header.a11y.js +1 -1
- package/es/components/link/external_link_icon.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
- package/es/components/markdown_editor/markdown_editor_toolbar.js +6 -6
- package/es/components/pagination/pagination_button_arrow.js +4 -4
- package/es/components/provider/component_defaults/component_defaults.js +2 -2
- package/es/components/search_bar/filters/field_value_selection_filter.js +1 -1
- package/es/components/selectable/selectable.a11y.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/side_nav/side_nav_item.js +1 -1
- package/es/components/table/_table_cell_content.js +1 -1
- package/es/components/table/_table_cell_content.styles.js +2 -1
- package/es/components/table/const.js +15 -0
- package/es/components/table/index.js +2 -1
- package/es/components/table/mobile/responsive_context.js +2 -5
- package/es/components/table/mobile/table_header_mobile.js +10 -3
- package/es/components/table/mobile/table_sort_mobile.js +1 -1
- package/es/components/table/table.js +44 -15
- package/es/components/table/table.styles.js +27 -9
- package/es/components/table/table_cells_shared.styles.js +41 -1
- package/es/components/table/table_footer_cell.js +53 -8
- package/es/components/table/table_header_cell.js +47 -9
- package/es/components/table/table_header_cell_checkbox.js +15 -7
- package/es/components/table/table_pagination/table_pagination.js +1 -1
- package/es/components/table/table_row_cell.js +61 -12
- package/es/components/table/types.js +1 -0
- package/es/components/table/utils.js +50 -24
- package/es/components/tree_view/tree_view_item.js +1 -1
- package/es/global_styling/mixins/_button.js +14 -10
- package/es/global_styling/mixins/_container_query.js +1 -1
- package/eui.d.ts +474 -183
- package/i18ntokens.json +1043 -1043
- package/lib/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
- package/lib/components/badge/badge.js +11 -5
- package/lib/components/badge/badge.styles.js +54 -3
- package/lib/components/badge/color_utils.js +39 -17
- package/lib/components/basic_table/basic_table.a11y.js +1 -1
- package/lib/components/basic_table/basic_table.js +82 -16
- package/lib/components/basic_table/collapsed_item_actions.js +1 -1
- package/lib/components/basic_table/in_memory_table.js +47 -2
- package/lib/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/lib/components/button/split_button/split_button.js +2 -2
- package/lib/components/button/split_button/split_button_actions.js +2 -2
- package/lib/components/code/code_block_copy.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +1 -1
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/lib/components/context_menu/context_menu_item.js +1 -1
- package/lib/components/context_menu/context_menu_panel.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
- package/lib/components/datagrid/body/header/column_actions.js +1 -1
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/lib/components/datagrid/controls/column_selector.js +2 -2
- package/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/data_grid.a11y.js +1 -1
- package/lib/components/datagrid/data_grid.stories.utils.js +3 -3
- package/lib/components/datagrid/utils/data_grid_schema.js +1 -1
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -2
- package/lib/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
- package/lib/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
- package/lib/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
- package/lib/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
- package/lib/components/filter_group/filter_button.js +2 -2
- package/lib/components/filter_group/filter_group.a11y.js +1 -1
- package/lib/components/flyout/_flyout_overlay.js +5 -2
- package/lib/components/flyout/flyout.component.js +327 -79
- package/lib/components/flyout/flyout.styles.js +58 -32
- package/lib/components/flyout/flyout_menu.js +2 -2
- package/lib/components/flyout/manager/actions.js +28 -2
- package/lib/components/flyout/manager/activity_stage.js +18 -7
- package/lib/components/flyout/manager/flyout_child.js +17 -4
- package/lib/components/flyout/manager/flyout_managed.js +26 -9
- package/lib/components/flyout/manager/layout_mode.js +92 -32
- package/lib/components/flyout/manager/reducer.js +23 -1
- package/lib/components/flyout/manager/selectors.js +7 -1
- package/lib/components/flyout/manager/store.js +5 -2
- package/lib/components/flyout/use_flyout_resizable.js +64 -10
- package/lib/components/flyout/use_flyout_z_index.js +5 -7
- package/lib/components/form/checkbox/checkbox.js +1 -1
- package/lib/components/form/field_password/field_password.js +1 -1
- package/lib/components/form/field_search/field_search.js +1 -1
- package/lib/components/form/file_picker/file_picker.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/lib/components/header/header.a11y.js +1 -1
- package/lib/components/link/external_link_icon.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +6 -6
- package/lib/components/pagination/pagination_button_arrow.js +4 -4
- package/lib/components/provider/component_defaults/component_defaults.js +2 -2
- package/lib/components/search_bar/filters/field_value_selection_filter.js +1 -1
- package/lib/components/selectable/selectable.a11y.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/side_nav/side_nav_item.js +1 -1
- package/lib/components/table/_table_cell_content.js +1 -1
- package/lib/components/table/_table_cell_content.styles.js +2 -1
- package/lib/components/table/const.js +21 -0
- package/lib/components/table/index.js +8 -1
- package/lib/components/table/mobile/responsive_context.js +2 -5
- package/lib/components/table/mobile/table_header_mobile.js +10 -3
- package/lib/components/table/mobile/table_sort_mobile.js +1 -1
- package/lib/components/table/table.js +44 -15
- package/lib/components/table/table.styles.js +26 -8
- package/lib/components/table/table_cells_shared.styles.js +43 -3
- package/lib/components/table/table_footer_cell.js +50 -6
- package/lib/components/table/table_header_cell.js +45 -7
- package/lib/components/table/table_header_cell_checkbox.js +14 -6
- package/lib/components/table/table_pagination/table_pagination.js +1 -1
- package/lib/components/table/table_row_cell.js +60 -11
- package/lib/components/table/types.js +5 -0
- package/lib/components/table/utils.js +51 -25
- package/lib/components/tree_view/tree_view_item.js +1 -1
- package/lib/global_styling/mixins/_button.js +15 -11
- package/lib/global_styling/mixins/_container_query.js +1 -1
- package/optimize/es/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
- package/optimize/es/components/badge/badge.js +12 -6
- package/optimize/es/components/badge/badge.styles.js +55 -4
- package/optimize/es/components/badge/color_utils.js +39 -17
- package/optimize/es/components/basic_table/basic_table.a11y.js +1 -1
- package/optimize/es/components/basic_table/basic_table.js +35 -14
- package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -1
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/optimize/es/components/button/split_button/split_button.js +3 -3
- package/optimize/es/components/button/split_button/split_button_actions.js +2 -2
- package/optimize/es/components/code/code_block_copy.js +1 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +1 -1
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/optimize/es/components/context_menu/context_menu_item.js +1 -1
- package/optimize/es/components/context_menu/context_menu_panel.js +1 -1
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
- package/optimize/es/components/datagrid/body/header/column_actions.js +1 -1
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/optimize/es/components/datagrid/controls/column_selector.js +2 -2
- package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/optimize/es/components/datagrid/data_grid.a11y.js +1 -1
- package/optimize/es/components/datagrid/data_grid.stories.utils.js +3 -3
- package/optimize/es/components/datagrid/utils/data_grid_schema.js +1 -1
- package/optimize/es/components/date_picker/auto_refresh/auto_refresh.js +2 -2
- package/optimize/es/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
- package/optimize/es/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
- package/optimize/es/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
- package/optimize/es/components/filter_group/filter_button.js +1 -1
- package/optimize/es/components/filter_group/filter_group.a11y.js +1 -1
- package/optimize/es/components/flyout/_flyout_overlay.js +5 -2
- package/optimize/es/components/flyout/flyout.component.js +329 -81
- package/optimize/es/components/flyout/flyout.styles.js +57 -31
- package/optimize/es/components/flyout/flyout_menu.js +2 -2
- package/optimize/es/components/flyout/manager/actions.js +27 -1
- package/optimize/es/components/flyout/manager/activity_stage.js +18 -7
- package/optimize/es/components/flyout/manager/flyout_child.js +18 -5
- package/optimize/es/components/flyout/manager/flyout_managed.js +29 -12
- package/optimize/es/components/flyout/manager/layout_mode.js +93 -33
- package/optimize/es/components/flyout/manager/reducer.js +24 -2
- package/optimize/es/components/flyout/manager/selectors.js +6 -0
- package/optimize/es/components/flyout/manager/store.js +6 -3
- package/optimize/es/components/flyout/use_flyout_resizable.js +64 -10
- package/optimize/es/components/flyout/use_flyout_z_index.js +5 -7
- package/optimize/es/components/form/checkbox/checkbox.js +1 -1
- package/optimize/es/components/form/field_password/field_password.js +1 -1
- package/optimize/es/components/form/field_search/field_search.js +1 -1
- package/optimize/es/components/form/file_picker/file_picker.js +1 -1
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/optimize/es/components/header/header.a11y.js +1 -1
- package/optimize/es/components/link/external_link_icon.js +1 -1
- package/optimize/es/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
- package/optimize/es/components/markdown_editor/markdown_editor_toolbar.js +6 -6
- package/optimize/es/components/pagination/pagination_button_arrow.js +4 -4
- package/optimize/es/components/search_bar/filters/field_value_selection_filter.js +1 -1
- package/optimize/es/components/selectable/selectable.a11y.js +1 -1
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/optimize/es/components/side_nav/side_nav_item.js +1 -1
- package/optimize/es/components/table/_table_cell_content.js +1 -1
- package/optimize/es/components/table/_table_cell_content.styles.js +2 -1
- package/optimize/es/components/table/const.js +15 -0
- package/optimize/es/components/table/index.js +2 -1
- package/optimize/es/components/table/mobile/responsive_context.js +2 -5
- package/optimize/es/components/table/mobile/table_header_mobile.js +10 -3
- package/optimize/es/components/table/mobile/table_sort_mobile.js +1 -1
- package/optimize/es/components/table/table.js +34 -15
- package/optimize/es/components/table/table.styles.js +27 -9
- package/optimize/es/components/table/table_cells_shared.styles.js +41 -1
- package/optimize/es/components/table/table_footer_cell.js +21 -7
- package/optimize/es/components/table/table_header_cell.js +17 -7
- package/optimize/es/components/table/table_header_cell_checkbox.js +11 -5
- package/optimize/es/components/table/table_pagination/table_pagination.js +1 -1
- package/optimize/es/components/table/table_row_cell.js +28 -9
- package/optimize/es/components/table/types.js +1 -0
- package/optimize/es/components/table/utils.js +50 -20
- package/optimize/es/components/tree_view/tree_view_item.js +1 -1
- package/optimize/es/global_styling/mixins/_button.js +14 -10
- package/optimize/es/global_styling/mixins/_container_query.js +1 -1
- package/optimize/lib/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
- package/optimize/lib/components/badge/badge.js +11 -5
- package/optimize/lib/components/badge/badge.styles.js +54 -3
- package/optimize/lib/components/badge/color_utils.js +39 -17
- package/optimize/lib/components/basic_table/basic_table.a11y.js +1 -1
- package/optimize/lib/components/basic_table/basic_table.js +35 -14
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -1
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/optimize/lib/components/button/split_button/split_button.js +2 -2
- package/optimize/lib/components/button/split_button/split_button_actions.js +2 -2
- package/optimize/lib/components/code/code_block_copy.js +1 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +1 -1
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/optimize/lib/components/context_menu/context_menu_item.js +1 -1
- package/optimize/lib/components/context_menu/context_menu_panel.js +1 -1
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
- package/optimize/lib/components/datagrid/body/header/column_actions.js +1 -1
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_selector.js +2 -2
- package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/optimize/lib/components/datagrid/data_grid.a11y.js +1 -1
- package/optimize/lib/components/datagrid/data_grid.stories.utils.js +3 -3
- package/optimize/lib/components/datagrid/utils/data_grid_schema.js +1 -1
- package/optimize/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -2
- package/optimize/lib/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
- package/optimize/lib/components/filter_group/filter_button.js +1 -1
- package/optimize/lib/components/filter_group/filter_group.a11y.js +1 -1
- package/optimize/lib/components/flyout/_flyout_overlay.js +5 -2
- package/optimize/lib/components/flyout/flyout.component.js +327 -79
- package/optimize/lib/components/flyout/flyout.styles.js +58 -32
- package/optimize/lib/components/flyout/flyout_menu.js +2 -2
- package/optimize/lib/components/flyout/manager/actions.js +28 -2
- package/optimize/lib/components/flyout/manager/activity_stage.js +18 -7
- package/optimize/lib/components/flyout/manager/flyout_child.js +17 -4
- package/optimize/lib/components/flyout/manager/flyout_managed.js +26 -9
- package/optimize/lib/components/flyout/manager/layout_mode.js +92 -32
- package/optimize/lib/components/flyout/manager/reducer.js +23 -1
- package/optimize/lib/components/flyout/manager/selectors.js +7 -1
- package/optimize/lib/components/flyout/manager/store.js +5 -2
- package/optimize/lib/components/flyout/use_flyout_resizable.js +64 -10
- package/optimize/lib/components/flyout/use_flyout_z_index.js +5 -7
- package/optimize/lib/components/form/checkbox/checkbox.js +1 -1
- package/optimize/lib/components/form/field_password/field_password.js +1 -1
- package/optimize/lib/components/form/field_search/field_search.js +1 -1
- package/optimize/lib/components/form/file_picker/file_picker.js +1 -1
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/optimize/lib/components/header/header.a11y.js +1 -1
- package/optimize/lib/components/link/external_link_icon.js +1 -1
- package/optimize/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
- package/optimize/lib/components/markdown_editor/markdown_editor_toolbar.js +6 -6
- package/optimize/lib/components/pagination/pagination_button_arrow.js +4 -4
- package/optimize/lib/components/search_bar/filters/field_value_selection_filter.js +1 -1
- package/optimize/lib/components/selectable/selectable.a11y.js +1 -1
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/optimize/lib/components/side_nav/side_nav_item.js +1 -1
- package/optimize/lib/components/table/_table_cell_content.js +1 -1
- package/optimize/lib/components/table/_table_cell_content.styles.js +2 -1
- package/optimize/lib/components/table/const.js +21 -0
- package/optimize/lib/components/table/index.js +8 -1
- package/optimize/lib/components/table/mobile/responsive_context.js +2 -5
- package/optimize/lib/components/table/mobile/table_header_mobile.js +10 -3
- package/optimize/lib/components/table/mobile/table_sort_mobile.js +1 -1
- package/optimize/lib/components/table/table.js +34 -15
- package/optimize/lib/components/table/table.styles.js +26 -8
- package/optimize/lib/components/table/table_cells_shared.styles.js +42 -2
- package/optimize/lib/components/table/table_footer_cell.js +19 -5
- package/optimize/lib/components/table/table_header_cell.js +15 -5
- package/optimize/lib/components/table/table_header_cell_checkbox.js +10 -4
- package/optimize/lib/components/table/table_pagination/table_pagination.js +1 -1
- package/optimize/lib/components/table/table_row_cell.js +27 -8
- package/optimize/lib/components/table/types.js +5 -0
- package/optimize/lib/components/table/utils.js +51 -22
- package/optimize/lib/components/tree_view/tree_view_item.js +1 -1
- package/optimize/lib/global_styling/mixins/_button.js +15 -11
- package/optimize/lib/global_styling/mixins/_container_query.js +1 -1
- package/package.json +1 -1
- package/test-env/components/accordion/accordion_trigger/accordion_arrow.js +1 -1
- package/test-env/components/badge/badge.js +11 -5
- package/test-env/components/badge/badge.styles.js +54 -3
- package/test-env/components/badge/color_utils.js +39 -17
- package/test-env/components/basic_table/basic_table.a11y.js +1 -1
- package/test-env/components/basic_table/basic_table.js +82 -16
- package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
- package/test-env/components/basic_table/in_memory_table.js +47 -2
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/test-env/components/button/split_button/split_button.js +2 -2
- package/test-env/components/button/split_button/split_button_actions.js +2 -2
- package/test-env/components/code/code_block_copy.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -1
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +1 -1
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/test-env/components/context_menu/context_menu_item.js +1 -1
- package/test-env/components/context_menu/context_menu_panel.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +1 -1
- package/test-env/components/datagrid/body/header/column_actions.js +1 -1
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/test-env/components/datagrid/controls/column_selector.js +2 -2
- package/test-env/components/datagrid/controls/column_sorting.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/data_grid.a11y.js +1 -1
- package/test-env/components/datagrid/data_grid.stories.utils.js +3 -3
- package/test-env/components/datagrid/utils/data_grid_schema.js +1 -1
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +2 -2
- package/test-env/components/date_picker/react-datepicker/src/month_dropdown.js +1 -1
- package/test-env/components/date_picker/react-datepicker/src/month_year_dropdown.js +1 -1
- package/test-env/components/date_picker/react-datepicker/src/year_dropdown.js +1 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +2 -2
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +1 -1
- package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +4 -4
- package/test-env/components/filter_group/filter_button.js +2 -2
- package/test-env/components/filter_group/filter_group.a11y.js +1 -1
- package/test-env/components/flyout/_flyout_overlay.js +5 -2
- package/test-env/components/flyout/flyout.component.js +327 -79
- package/test-env/components/flyout/flyout.styles.js +58 -32
- package/test-env/components/flyout/flyout_menu.js +2 -2
- package/test-env/components/flyout/manager/actions.js +28 -2
- package/test-env/components/flyout/manager/activity_stage.js +18 -7
- package/test-env/components/flyout/manager/flyout_child.js +17 -4
- package/test-env/components/flyout/manager/flyout_managed.js +26 -9
- package/test-env/components/flyout/manager/layout_mode.js +92 -32
- package/test-env/components/flyout/manager/reducer.js +23 -1
- package/test-env/components/flyout/manager/selectors.js +7 -1
- package/test-env/components/flyout/manager/store.js +5 -2
- package/test-env/components/flyout/use_flyout_resizable.js +64 -10
- package/test-env/components/flyout/use_flyout_z_index.js +5 -7
- package/test-env/components/form/checkbox/checkbox.js +1 -1
- package/test-env/components/form/field_password/field_password.js +1 -1
- package/test-env/components/form/field_search/field_search.js +1 -1
- package/test-env/components/form/file_picker/file_picker.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/test-env/components/header/header.a11y.js +1 -1
- package/test-env/components/link/external_link_icon.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +6 -6
- package/test-env/components/pagination/pagination_button_arrow.js +4 -4
- package/test-env/components/provider/component_defaults/component_defaults.js +2 -2
- package/test-env/components/search_bar/filters/field_value_selection_filter.js +1 -1
- package/test-env/components/selectable/selectable.a11y.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/side_nav/side_nav_item.js +1 -1
- package/test-env/components/table/_table_cell_content.js +1 -1
- package/test-env/components/table/_table_cell_content.styles.js +2 -1
- package/test-env/components/table/const.js +21 -0
- package/test-env/components/table/index.js +8 -1
- package/test-env/components/table/mobile/responsive_context.js +2 -5
- package/test-env/components/table/mobile/table_header_mobile.js +10 -3
- package/test-env/components/table/mobile/table_sort_mobile.js +1 -1
- package/test-env/components/table/table.js +44 -15
- package/test-env/components/table/table.styles.js +26 -8
- package/test-env/components/table/table_cells_shared.styles.js +42 -2
- package/test-env/components/table/table_footer_cell.js +48 -6
- package/test-env/components/table/table_header_cell.js +45 -7
- package/test-env/components/table/table_header_cell_checkbox.js +14 -6
- package/test-env/components/table/table_pagination/table_pagination.js +1 -1
- package/test-env/components/table/table_row_cell.js +60 -11
- package/test-env/components/table/types.js +5 -0
- package/test-env/components/table/utils.js +51 -22
- package/test-env/components/tree_view/tree_view_item.js +1 -1
- package/test-env/global_styling/mixins/_button.js +15 -11
- 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 {
|
|
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
|
-
|
|
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
|
|
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$
|
|
130
|
-
(_flyoutManagerRef$
|
|
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$
|
|
133
|
-
return (_flyoutManagerRef$
|
|
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
|
-
|
|
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
|
|
189
|
-
*
|
|
190
|
-
*
|
|
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;
|
|
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
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
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
|
-
|
|
222
|
-
|
|
223
|
-
|
|
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
|
-
|
|
400
|
+
handleClose(event);
|
|
269
401
|
}
|
|
270
|
-
}, [
|
|
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
|
-
|
|
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
|
-
*
|
|
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
|
-
|
|
290
|
-
|
|
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
|
|
296
|
-
|
|
297
|
-
focusTrapShards =
|
|
298
|
-
setFocusTrapShards =
|
|
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.
|
|
367
|
-
default: "You are in a
|
|
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
|
|
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
|
|
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
|
-
}, [
|
|
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
|
|
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:
|
|
458
|
-
"aria-modal":
|
|
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:
|
|
713
|
+
onClose: handleClose,
|
|
466
714
|
closeButtonPosition: closeButtonPosition,
|
|
467
715
|
side: side
|
|
468
716
|
})), _flyoutMenuProps && ___EmotionJSX(EuiFlyoutMenu, _extends({}, flyoutMenuProps, {
|