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