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