@elastic/eui 91.0.0 → 91.1.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/dist/eui_theme_dark.css +191 -124
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +191 -124
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.a11y.js +1 -3
- package/es/components/basic_table/action_types.js +5 -0
- package/es/components/basic_table/basic_table.a11y.js +1 -2
- package/es/components/basic_table/basic_table.js +8 -8
- package/es/components/basic_table/collapsed_item_actions.js +120 -249
- package/es/components/basic_table/custom_item_action.js +9 -95
- package/es/components/basic_table/default_item_action.js +23 -14
- package/es/components/basic_table/in_memory_table.a11y.js +13 -11
- package/es/components/basic_table/in_memory_table.js +8 -8
- package/es/components/breadcrumbs/breadcrumb.js +11 -7
- package/es/components/breadcrumbs/breadcrumb.styles.js +5 -0
- package/es/components/button/button_display/_button_display.js +5 -3
- package/es/components/button/button_display/_button_display_content.js +8 -4
- package/es/components/button/button_empty/button_empty.js +9 -7
- package/es/components/button/button_group/button_group.js +5 -3
- package/es/components/button/button_group/button_group_button.js +5 -3
- package/es/components/card/card.a11y.js +5 -18
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
- package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +67 -81
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +1 -19
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -102
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +7 -90
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
- package/es/components/combo_box/combo_box.js +1 -1
- package/es/components/context_menu/context_menu_item.js +16 -8
- package/es/components/context_menu/context_menu_item.styles.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +16 -6
- package/es/components/datagrid/body/data_grid_body_custom.js +16 -6
- package/es/components/datagrid/body/data_grid_body_virtualized.js +16 -6
- package/es/components/datagrid/body/data_grid_cell.js +67 -44
- package/es/components/datagrid/body/data_grid_cell_actions.js +12 -12
- package/es/components/datagrid/body/data_grid_cell_popover.js +43 -10
- package/es/components/datagrid/body/header/data_grid_header_cell.js +65 -34
- package/es/components/datagrid/body/header/data_grid_header_row.js +16 -6
- package/es/components/datagrid/controls/column_selector.js +19 -39
- package/es/components/datagrid/controls/column_sorting.js +18 -29
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +154 -0
- package/es/components/datagrid/controls/display_selector.js +0 -1
- package/es/components/datagrid/controls/fullscreen_selector.js +2 -6
- package/es/components/datagrid/controls/index.js +2 -1
- package/es/components/datagrid/index.js +1 -1
- package/es/components/datagrid/utils/in_memory.js +16 -6
- package/es/components/datagrid/utils/row_heights.js +1 -1
- package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -4
- package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/es/components/error_boundary/error_boundary.a11y.js +1 -1
- package/es/components/expression/expression.a11y.js +2 -4
- package/es/components/facet/facet_button.js +5 -3
- package/es/components/filter_group/filter_button.js +2 -2
- package/es/components/focus_trap/focus_trap.a11y.js +3 -3
- package/es/components/form/range/range.a11y.js +5 -10
- package/es/components/form/super_select/super_select.js +3 -2
- package/es/components/form/super_select/super_select_control.js +13 -20
- package/es/components/header/header.a11y.js +1 -1
- package/es/components/header/header_links/header_link.js +7 -5
- package/es/components/header/header_section/header_section_item_button.js +7 -5
- package/es/components/image/image.a11y.js +1 -2
- package/es/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
- package/es/components/link/external_link_icon.js +51 -0
- package/es/components/link/link.js +6 -20
- package/es/components/link/link.styles.js +2 -5
- package/es/components/list_group/list_group.js +6 -1
- package/es/components/list_group/list_group_item.js +14 -4
- package/es/components/list_group/list_group_item.styles.js +2 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +12 -2
- package/es/components/notification/notification_event.a11y.js +1 -2
- package/es/components/notification/notification_event.js +7 -5
- package/es/components/pagination/pagination_button.js +7 -5
- package/es/components/popover/popover.js +4 -1
- package/es/components/resizable_container/resizable_container.a11y.js +4 -8
- package/es/components/search_bar/search_bar.a11y.js +3 -6
- package/es/components/selectable/selectable.js +16 -1
- package/es/components/selectable/selectable_list/selectable_list.js +227 -78
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
- package/es/components/text/text.styles.js +2 -2
- package/es/components/text_truncate/text_truncate.js +33 -10
- package/eui.d.ts +466 -136
- package/i18ntokens.json +224 -260
- package/lib/components/accordion/accordion.a11y.js +1 -3
- package/lib/components/basic_table/action_types.js +8 -2
- package/lib/components/basic_table/basic_table.a11y.js +1 -2
- package/lib/components/basic_table/basic_table.js +8 -8
- package/lib/components/basic_table/collapsed_item_actions.js +128 -257
- package/lib/components/basic_table/custom_item_action.js +18 -104
- package/lib/components/basic_table/default_item_action.js +23 -14
- package/lib/components/basic_table/in_memory_table.a11y.js +13 -11
- package/lib/components/basic_table/in_memory_table.js +8 -8
- package/lib/components/breadcrumbs/breadcrumb.js +11 -7
- package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -0
- package/lib/components/button/button_display/_button_display.js +5 -3
- package/lib/components/button/button_display/_button_display_content.js +8 -4
- package/lib/components/button/button_empty/button_empty.js +9 -7
- package/lib/components/button/button_group/button_group.js +5 -3
- package/lib/components/button/button_group/button_group_button.js +5 -3
- package/lib/components/card/card.a11y.js +5 -18
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +66 -80
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -104
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +7 -90
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
- package/lib/components/combo_box/combo_box.js +1 -1
- package/lib/components/context_menu/context_menu_item.js +16 -8
- package/lib/components/context_menu/context_menu_item.styles.js +1 -1
- package/lib/components/datagrid/body/data_grid_body.js +16 -6
- package/lib/components/datagrid/body/data_grid_body_custom.js +16 -6
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +16 -6
- package/lib/components/datagrid/body/data_grid_cell.js +67 -44
- package/lib/components/datagrid/body/data_grid_cell_actions.js +12 -13
- package/lib/components/datagrid/body/data_grid_cell_popover.js +43 -10
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +65 -34
- package/lib/components/datagrid/body/header/data_grid_header_row.js +16 -6
- package/lib/components/datagrid/controls/column_selector.js +19 -39
- package/lib/components/datagrid/controls/column_sorting.js +18 -30
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +159 -0
- package/lib/components/datagrid/controls/display_selector.js +0 -1
- package/lib/components/datagrid/controls/fullscreen_selector.js +2 -7
- package/lib/components/datagrid/controls/index.js +8 -1
- package/lib/components/datagrid/index.js +8 -1
- package/lib/components/datagrid/utils/in_memory.js +16 -6
- package/lib/components/datagrid/utils/row_heights.js +1 -1
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -4
- package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/lib/components/error_boundary/error_boundary.a11y.js +1 -1
- package/lib/components/expression/expression.a11y.js +2 -4
- package/lib/components/facet/facet_button.js +5 -3
- package/lib/components/filter_group/filter_button.js +2 -2
- package/lib/components/focus_trap/focus_trap.a11y.js +3 -3
- package/lib/components/form/range/range.a11y.js +5 -10
- package/lib/components/form/super_select/super_select.js +3 -2
- package/lib/components/form/super_select/super_select_control.js +12 -19
- package/lib/components/header/header.a11y.js +1 -1
- package/lib/components/header/header_links/header_link.js +7 -5
- package/lib/components/header/header_section/header_section_item_button.js +7 -5
- package/lib/components/image/image.a11y.js +1 -2
- package/lib/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
- package/lib/components/link/external_link_icon.js +57 -0
- package/lib/components/link/link.js +6 -20
- package/lib/components/link/link.styles.js +1 -4
- package/lib/components/list_group/list_group.js +6 -1
- package/lib/components/list_group/list_group_item.js +14 -4
- package/lib/components/list_group/list_group_item.styles.js +2 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +12 -2
- package/lib/components/notification/notification_event.a11y.js +1 -2
- package/lib/components/notification/notification_event.js +7 -5
- package/lib/components/popover/popover.js +4 -1
- package/lib/components/resizable_container/resizable_container.a11y.js +4 -8
- package/lib/components/search_bar/search_bar.a11y.js +3 -6
- package/lib/components/selectable/selectable.js +16 -1
- package/lib/components/selectable/selectable_list/selectable_list.js +227 -78
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
- package/lib/components/text/text.styles.js +2 -2
- package/lib/components/text_truncate/text_truncate.js +32 -9
- package/optimize/es/components/accordion/accordion.a11y.js +1 -3
- package/optimize/es/components/basic_table/action_types.js +5 -0
- package/optimize/es/components/basic_table/basic_table.a11y.js +1 -2
- package/optimize/es/components/basic_table/collapsed_item_actions.js +116 -169
- package/optimize/es/components/basic_table/custom_item_action.js +10 -83
- package/optimize/es/components/basic_table/default_item_action.js +23 -14
- package/optimize/es/components/basic_table/in_memory_table.a11y.js +13 -11
- package/optimize/es/components/breadcrumbs/breadcrumb.js +11 -7
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +5 -0
- package/optimize/es/components/button/button_display/_button_display_content.js +3 -1
- package/optimize/es/components/button/button_empty/button_empty.js +2 -2
- package/optimize/es/components/card/card.a11y.js +5 -18
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +10 -5
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +8 -36
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +1 -19
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -23
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +6 -10
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -5
- package/optimize/es/components/context_menu/context_menu_item.js +9 -6
- package/optimize/es/components/context_menu/context_menu_item.styles.js +1 -1
- package/optimize/es/components/datagrid/body/data_grid_cell.js +38 -30
- package/optimize/es/components/datagrid/body/data_grid_cell_actions.js +12 -12
- package/optimize/es/components/datagrid/body/data_grid_cell_popover.js +43 -10
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +49 -28
- package/optimize/es/components/datagrid/controls/column_selector.js +19 -39
- package/optimize/es/components/datagrid/controls/column_sorting.js +18 -29
- package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +70 -0
- package/optimize/es/components/datagrid/controls/display_selector.js +0 -1
- package/optimize/es/components/datagrid/controls/fullscreen_selector.js +2 -6
- package/optimize/es/components/datagrid/controls/index.js +2 -1
- package/optimize/es/components/datagrid/index.js +1 -1
- package/optimize/es/components/datagrid/utils/row_heights.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/optimize/es/components/error_boundary/error_boundary.a11y.js +1 -1
- package/optimize/es/components/expression/expression.a11y.js +2 -4
- package/optimize/es/components/filter_group/filter_button.js +2 -2
- package/optimize/es/components/focus_trap/focus_trap.a11y.js +3 -3
- package/optimize/es/components/form/range/range.a11y.js +5 -10
- package/optimize/es/components/form/super_select/super_select.js +3 -2
- package/optimize/es/components/form/super_select/super_select_control.js +13 -20
- package/optimize/es/components/header/header.a11y.js +1 -1
- package/optimize/es/components/image/image.a11y.js +1 -2
- package/optimize/es/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
- package/optimize/es/components/link/external_link_icon.js +41 -0
- package/optimize/es/components/link/link.js +6 -20
- package/optimize/es/components/link/link.styles.js +2 -5
- package/optimize/es/components/list_group/list_group_item.js +8 -3
- package/optimize/es/components/list_group/list_group_item.styles.js +2 -1
- package/optimize/es/components/notification/notification_event.a11y.js +1 -2
- package/optimize/es/components/popover/popover.js +4 -1
- package/optimize/es/components/resizable_container/resizable_container.a11y.js +4 -8
- package/optimize/es/components/search_bar/search_bar.a11y.js +3 -6
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +199 -76
- package/optimize/es/components/text/text.styles.js +2 -2
- package/optimize/es/components/text_truncate/text_truncate.js +26 -9
- package/optimize/lib/components/accordion/accordion.a11y.js +1 -3
- package/optimize/lib/components/basic_table/action_types.js +8 -2
- package/optimize/lib/components/basic_table/basic_table.a11y.js +1 -2
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +123 -174
- package/optimize/lib/components/basic_table/custom_item_action.js +17 -91
- package/optimize/lib/components/basic_table/default_item_action.js +23 -14
- package/optimize/lib/components/basic_table/in_memory_table.a11y.js +13 -11
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +11 -7
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +5 -0
- package/optimize/lib/components/button/button_display/_button_display_content.js +3 -1
- package/optimize/lib/components/button/button_empty/button_empty.js +2 -2
- package/optimize/lib/components/card/card.a11y.js +5 -18
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -3
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +10 -5
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +8 -36
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -26
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +6 -10
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -5
- package/optimize/lib/components/context_menu/context_menu_item.js +9 -6
- package/optimize/lib/components/context_menu/context_menu_item.styles.js +1 -1
- package/optimize/lib/components/datagrid/body/data_grid_cell.js +38 -30
- package/optimize/lib/components/datagrid/body/data_grid_cell_actions.js +12 -12
- package/optimize/lib/components/datagrid/body/data_grid_cell_popover.js +43 -10
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +55 -36
- package/optimize/lib/components/datagrid/controls/column_selector.js +19 -39
- package/optimize/lib/components/datagrid/controls/column_sorting.js +18 -29
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +75 -0
- package/optimize/lib/components/datagrid/controls/display_selector.js +0 -1
- package/optimize/lib/components/datagrid/controls/fullscreen_selector.js +2 -6
- package/optimize/lib/components/datagrid/controls/index.js +8 -1
- package/optimize/lib/components/datagrid/index.js +8 -1
- package/optimize/lib/components/datagrid/utils/row_heights.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/optimize/lib/components/error_boundary/error_boundary.a11y.js +1 -1
- package/optimize/lib/components/expression/expression.a11y.js +2 -4
- package/optimize/lib/components/filter_group/filter_button.js +2 -2
- package/optimize/lib/components/focus_trap/focus_trap.a11y.js +3 -3
- package/optimize/lib/components/form/range/range.a11y.js +5 -10
- package/optimize/lib/components/form/super_select/super_select.js +3 -2
- package/optimize/lib/components/form/super_select/super_select_control.js +12 -19
- package/optimize/lib/components/header/header.a11y.js +1 -1
- package/optimize/lib/components/image/image.a11y.js +1 -2
- package/optimize/lib/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
- package/optimize/lib/components/link/external_link_icon.js +47 -0
- package/optimize/lib/components/link/link.js +6 -20
- package/optimize/lib/components/link/link.styles.js +1 -4
- package/optimize/lib/components/list_group/list_group_item.js +8 -3
- package/optimize/lib/components/list_group/list_group_item.styles.js +2 -1
- package/optimize/lib/components/notification/notification_event.a11y.js +1 -2
- package/optimize/lib/components/popover/popover.js +4 -1
- package/optimize/lib/components/resizable_container/resizable_container.a11y.js +4 -8
- package/optimize/lib/components/search_bar/search_bar.a11y.js +3 -6
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +199 -76
- package/optimize/lib/components/text/text.styles.js +2 -2
- package/optimize/lib/components/text_truncate/text_truncate.js +25 -8
- package/package.json +4 -4
- package/src/components/datagrid/_data_grid_data_row.scss +139 -100
- package/src/components/datagrid/_mixins.scss +2 -2
- package/src/components/datagrid/body/header/_data_grid_header_row.scss +36 -28
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -5
- package/src/components/form/form_row/_form_row.scss +1 -1
- package/src/components/table/_responsive.scss +19 -0
- package/src/components/table/_table.scss +4 -9
- package/test-env/components/accordion/accordion.a11y.js +1 -3
- package/test-env/components/auto_sizer/auto_sizer.js +10 -3
- package/test-env/components/basic_table/action_types.js +8 -2
- package/test-env/components/basic_table/basic_table.a11y.js +1 -2
- package/test-env/components/basic_table/basic_table.js +8 -8
- package/test-env/components/basic_table/collapsed_item_actions.js +124 -251
- package/test-env/components/basic_table/custom_item_action.js +18 -100
- package/test-env/components/basic_table/default_item_action.js +23 -14
- package/test-env/components/basic_table/in_memory_table.a11y.js +13 -11
- package/test-env/components/basic_table/in_memory_table.js +8 -8
- package/test-env/components/breadcrumbs/breadcrumb.js +11 -7
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -0
- package/test-env/components/button/button_display/_button_display.js +5 -3
- package/test-env/components/button/button_display/_button_display_content.js +8 -4
- package/test-env/components/button/button_empty/button_empty.js +9 -7
- package/test-env/components/button/button_group/button_group.js +5 -3
- package/test-env/components/button/button_group/button_group_button.js +5 -3
- package/test-env/components/card/card.a11y.js +5 -18
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +66 -80
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -105
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +7 -90
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
- package/test-env/components/combo_box/combo_box.js +1 -1
- package/test-env/components/context_menu/context_menu_item.js +16 -8
- package/test-env/components/context_menu/context_menu_item.styles.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body.js +16 -6
- package/test-env/components/datagrid/body/data_grid_body_custom.js +16 -6
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +16 -6
- package/test-env/components/datagrid/body/data_grid_cell.js +67 -44
- package/test-env/components/datagrid/body/data_grid_cell_actions.js +12 -12
- package/test-env/components/datagrid/body/data_grid_cell_popover.js +43 -10
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +71 -42
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +16 -6
- package/test-env/components/datagrid/controls/column_selector.js +19 -39
- package/test-env/components/datagrid/controls/column_sorting.js +18 -29
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +158 -0
- package/test-env/components/datagrid/controls/display_selector.js +0 -1
- package/test-env/components/datagrid/controls/fullscreen_selector.js +2 -6
- package/test-env/components/datagrid/controls/index.js +8 -1
- package/test-env/components/datagrid/index.js +8 -1
- package/test-env/components/datagrid/utils/in_memory.js +16 -6
- package/test-env/components/datagrid/utils/row_heights.js +1 -1
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -4
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/test-env/components/error_boundary/error_boundary.a11y.js +1 -1
- package/test-env/components/expression/expression.a11y.js +2 -4
- package/test-env/components/facet/facet_button.js +5 -3
- package/test-env/components/filter_group/filter_button.js +2 -2
- package/test-env/components/focus_trap/focus_trap.a11y.js +3 -3
- package/test-env/components/form/range/range.a11y.js +5 -10
- package/test-env/components/form/super_select/super_select.js +3 -2
- package/test-env/components/form/super_select/super_select_control.js +12 -19
- package/test-env/components/header/header.a11y.js +1 -1
- package/test-env/components/header/header_links/header_link.js +7 -5
- package/test-env/components/header/header_section/header_section_item_button.js +7 -5
- package/test-env/components/image/image.a11y.js +1 -2
- package/test-env/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
- package/test-env/components/link/external_link_icon.js +56 -0
- package/test-env/components/link/link.js +6 -20
- package/test-env/components/link/link.styles.js +1 -4
- package/test-env/components/list_group/list_group.js +6 -1
- package/test-env/components/list_group/list_group_item.js +14 -4
- package/test-env/components/list_group/list_group_item.styles.js +2 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +12 -2
- package/test-env/components/notification/notification_event.a11y.js +1 -2
- package/test-env/components/notification/notification_event.js +7 -5
- package/test-env/components/popover/popover.js +4 -1
- package/test-env/components/resizable_container/resizable_container.a11y.js +4 -8
- package/test-env/components/search_bar/search_bar.a11y.js +3 -6
- package/test-env/components/selectable/selectable.js +16 -1
- package/test-env/components/selectable/selectable_list/selectable_list.js +227 -78
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
- package/test-env/components/text/text.styles.js +2 -2
- package/test-env/components/text_truncate/text_truncate.js +32 -9
|
@@ -29,9 +29,7 @@ describe('EuiAccordion', function () {
|
|
|
29
29
|
it('has zero violations when expanded', function () {
|
|
30
30
|
cy.mount(___EmotionJSX(EuiAccordion, noArrowProps, ___EmotionJSX(EuiPanel, {
|
|
31
31
|
color: "subdued"
|
|
32
|
-
}, "Any content inside of ", ___EmotionJSX("strong", null, "EuiAccordion"), " will appear here.
|
|
33
|
-
href: "#"
|
|
34
|
-
}, "a link"), " to confirm focus.")));
|
|
32
|
+
}, "Any content inside of ", ___EmotionJSX("strong", null, "EuiAccordion"), " will appear here.")));
|
|
35
33
|
cy.get('button.euiAccordion__button').click();
|
|
36
34
|
cy.checkAxe();
|
|
37
35
|
});
|
|
@@ -8,4 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
export var isCustomItemAction = function isCustomItemAction(action) {
|
|
10
10
|
return action.hasOwnProperty('render');
|
|
11
|
+
};
|
|
12
|
+
export var callWithItemIfFunction = function callWithItemIfFunction(item) {
|
|
13
|
+
return function (prop) {
|
|
14
|
+
return typeof prop === 'function' ? prop(item) : prop;
|
|
15
|
+
};
|
|
11
16
|
};
|
|
@@ -183,8 +183,7 @@ describe('EuiTable', function () {
|
|
|
183
183
|
});
|
|
184
184
|
describe('Keyboard accessibility', function () {
|
|
185
185
|
it('has zero violations after expanding a row', function () {
|
|
186
|
-
cy.
|
|
187
|
-
cy.get('button#1').should('have.focus');
|
|
186
|
+
cy.get('button#1').focus();
|
|
188
187
|
cy.realPress('Enter');
|
|
189
188
|
cy.get('tr.euiTableRow-isExpandedRow div.euiTableCellContent').should('exist');
|
|
190
189
|
cy.checkAxe();
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
10
2
|
/*
|
|
11
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
4
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -15,173 +7,128 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
15
7
|
* Side Public License, v 1.
|
|
16
8
|
*/
|
|
17
9
|
|
|
18
|
-
import React, {
|
|
10
|
+
import React, { useState, useCallback, useMemo } from 'react';
|
|
19
11
|
import { isString } from '../../services/predicate';
|
|
20
12
|
import { EuiContextMenuItem, EuiContextMenuPanel } from '../context_menu';
|
|
21
13
|
import { EuiPopover } from '../popover';
|
|
22
14
|
import { EuiButtonIcon } from '../button';
|
|
23
15
|
import { EuiToolTip } from '../tool_tip';
|
|
24
16
|
import { EuiI18n } from '../i18n';
|
|
17
|
+
import { isCustomItemAction, callWithItemIfFunction } from './action_types';
|
|
25
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
_defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
|
|
67
|
-
if (!_this.popoverDiv) {
|
|
68
|
-
_this.popoverDiv = popoverDiv;
|
|
69
|
-
_this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
_defineProperty(_assertThisInitialized(_this), "onClickItem", function (onClickAction) {
|
|
73
|
-
_this.closePopover();
|
|
74
|
-
if (onClickAction) {
|
|
75
|
-
onClickAction();
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
return _this;
|
|
79
|
-
}
|
|
80
|
-
_createClass(CollapsedItemActions, [{
|
|
81
|
-
key: "componentWillUnmount",
|
|
82
|
-
value: function componentWillUnmount() {
|
|
83
|
-
if (this.popoverDiv) {
|
|
84
|
-
this.popoverDiv.removeEventListener('focusout', this.onPopoverBlur);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "render",
|
|
89
|
-
value: function render() {
|
|
90
|
-
var _this2 = this;
|
|
91
|
-
var _this$props = this.props,
|
|
92
|
-
actions = _this$props.actions,
|
|
93
|
-
itemId = _this$props.itemId,
|
|
94
|
-
item = _this$props.item,
|
|
95
|
-
actionEnabled = _this$props.actionEnabled,
|
|
96
|
-
onFocus = _this$props.onFocus,
|
|
97
|
-
className = _this$props.className;
|
|
98
|
-
var isOpen = this.state.popoverOpen;
|
|
99
|
-
var allDisabled = true;
|
|
100
|
-
var controls = actions.reduce(function (controls, action, index) {
|
|
101
|
-
var key = "action_".concat(itemId, "_").concat(index);
|
|
102
|
-
var available = action.available ? action.available(item) : true;
|
|
103
|
-
if (!available) {
|
|
104
|
-
return controls;
|
|
105
|
-
}
|
|
106
|
-
var enabled = actionEnabled(action);
|
|
107
|
-
allDisabled = allDisabled && !enabled;
|
|
108
|
-
if (actionIsCustomItemAction(action)) {
|
|
109
|
-
var customAction = action;
|
|
110
|
-
var actionControl = customAction.render(item, enabled);
|
|
111
|
-
var actionControlOnClick = actionControl && actionControl.props && actionControl.props.onClick;
|
|
112
|
-
controls.push(___EmotionJSX(EuiContextMenuItem, {
|
|
113
|
-
key: key,
|
|
114
|
-
onClick: function onClick() {
|
|
115
|
-
return _this2.onClickItem(actionControlOnClick ? function () {
|
|
116
|
-
return actionControlOnClick(item);
|
|
117
|
-
} : undefined);
|
|
118
|
-
}
|
|
119
|
-
}, actionControl));
|
|
120
|
-
} else {
|
|
121
|
-
var _onClick = action.onClick,
|
|
122
|
-
name = action.name,
|
|
123
|
-
href = action.href,
|
|
124
|
-
target = action.target,
|
|
125
|
-
dataTestSubj = action['data-test-subj'];
|
|
126
|
-
var buttonIcon = action.icon;
|
|
127
|
-
var icon;
|
|
128
|
-
if (buttonIcon) {
|
|
129
|
-
icon = isString(buttonIcon) ? buttonIcon : buttonIcon(item);
|
|
19
|
+
export var CollapsedItemActions = function CollapsedItemActions(_ref) {
|
|
20
|
+
var actions = _ref.actions,
|
|
21
|
+
itemId = _ref.itemId,
|
|
22
|
+
item = _ref.item,
|
|
23
|
+
actionEnabled = _ref.actionEnabled,
|
|
24
|
+
className = _ref.className;
|
|
25
|
+
var _useState = useState(false),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
popoverOpen = _useState2[0],
|
|
28
|
+
setPopoverOpen = _useState2[1];
|
|
29
|
+
var _useState3 = useState(true),
|
|
30
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
+
allDisabled = _useState4[0],
|
|
32
|
+
setAllDisabled = _useState4[1];
|
|
33
|
+
var onClickItem = useCallback(function (onClickAction) {
|
|
34
|
+
setPopoverOpen(false);
|
|
35
|
+
onClickAction === null || onClickAction === void 0 ? void 0 : onClickAction();
|
|
36
|
+
}, []);
|
|
37
|
+
var controls = useMemo(function () {
|
|
38
|
+
return actions.reduce(function (controls, action, index) {
|
|
39
|
+
var _action$available, _action$available2;
|
|
40
|
+
var available = (_action$available = (_action$available2 = action.available) === null || _action$available2 === void 0 ? void 0 : _action$available2.call(action, item)) !== null && _action$available !== void 0 ? _action$available : true;
|
|
41
|
+
if (!available) return controls;
|
|
42
|
+
var enabled = actionEnabled(action);
|
|
43
|
+
if (enabled) setAllDisabled(false);
|
|
44
|
+
if (isCustomItemAction(action)) {
|
|
45
|
+
var customAction = action;
|
|
46
|
+
var actionControl = customAction.render(item, enabled);
|
|
47
|
+
controls.push(
|
|
48
|
+
// Do not put the `onClick` on the EuiContextMenuItem itself - otherwise
|
|
49
|
+
// it renders a <button> tag instead of a <div>, and we end up with nested
|
|
50
|
+
// interactive elements
|
|
51
|
+
___EmotionJSX(EuiContextMenuItem, {
|
|
52
|
+
key: index,
|
|
53
|
+
className: "euiBasicTable__collapsedCustomAction"
|
|
54
|
+
}, ___EmotionJSX("span", {
|
|
55
|
+
onClick: function onClick() {
|
|
56
|
+
return onClickItem();
|
|
130
57
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
icon: icon,
|
|
138
|
-
"data-test-subj": dataTestSubj,
|
|
139
|
-
onClick: function onClick() {
|
|
140
|
-
return _this2.onClickItem(_onClick ? function () {
|
|
141
|
-
return _onClick(item);
|
|
142
|
-
} : undefined);
|
|
143
|
-
}
|
|
144
|
-
}, buttonContent));
|
|
58
|
+
}, actionControl)));
|
|
59
|
+
} else {
|
|
60
|
+
var buttonIcon = action.icon;
|
|
61
|
+
var icon;
|
|
62
|
+
if (buttonIcon) {
|
|
63
|
+
icon = isString(buttonIcon) ? buttonIcon : buttonIcon(item);
|
|
145
64
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
65
|
+
var buttonContent = callWithItemIfFunction(item)(action.name);
|
|
66
|
+
var toolTipContent = callWithItemIfFunction(item)(action.description);
|
|
67
|
+
var href = callWithItemIfFunction(item)(action.href);
|
|
68
|
+
var dataTestSubj = callWithItemIfFunction(item)(action['data-test-subj']);
|
|
69
|
+
var _onClick = action.onClick,
|
|
70
|
+
target = action.target;
|
|
71
|
+
controls.push(___EmotionJSX(EuiContextMenuItem, {
|
|
72
|
+
key: index,
|
|
73
|
+
className: "euiBasicTable__collapsedAction",
|
|
74
|
+
disabled: !enabled,
|
|
75
|
+
href: href,
|
|
76
|
+
target: target,
|
|
77
|
+
icon: icon,
|
|
78
|
+
"data-test-subj": dataTestSubj,
|
|
79
|
+
onClick: function onClick() {
|
|
80
|
+
return onClickItem(_onClick ? function () {
|
|
81
|
+
return _onClick(item);
|
|
82
|
+
} : undefined);
|
|
83
|
+
},
|
|
84
|
+
toolTipContent: toolTipContent,
|
|
85
|
+
toolTipProps: {
|
|
86
|
+
delay: 'long'
|
|
87
|
+
}
|
|
88
|
+
}, buttonContent));
|
|
89
|
+
}
|
|
90
|
+
return controls;
|
|
91
|
+
}, []);
|
|
92
|
+
}, [actions, actionEnabled, item, onClickItem]);
|
|
93
|
+
var popoverButton = ___EmotionJSX(EuiI18n, {
|
|
94
|
+
token: "euiCollapsedItemActions.allActions",
|
|
95
|
+
default: "All actions"
|
|
96
|
+
}, function (allActions) {
|
|
97
|
+
return ___EmotionJSX(EuiButtonIcon, {
|
|
98
|
+
className: className,
|
|
99
|
+
"aria-label": allActions,
|
|
100
|
+
iconType: "boxesHorizontal",
|
|
101
|
+
color: "text",
|
|
102
|
+
isDisabled: allDisabled,
|
|
103
|
+
onClick: function onClick() {
|
|
104
|
+
return setPopoverOpen(function (isOpen) {
|
|
105
|
+
return !isOpen;
|
|
161
106
|
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
107
|
+
},
|
|
108
|
+
"data-test-subj": "euiCollapsedItemActionsButton"
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
var withTooltip = !allDisabled && ___EmotionJSX(EuiI18n, {
|
|
112
|
+
token: "euiCollapsedItemActions.allActions",
|
|
113
|
+
default: "All actions"
|
|
114
|
+
}, function (allActions) {
|
|
115
|
+
return ___EmotionJSX(EuiToolTip, {
|
|
116
|
+
content: allActions,
|
|
117
|
+
delay: "long"
|
|
118
|
+
}, popoverButton);
|
|
119
|
+
});
|
|
120
|
+
return ___EmotionJSX(EuiPopover, {
|
|
121
|
+
className: className,
|
|
122
|
+
id: "".concat(itemId, "-actions"),
|
|
123
|
+
isOpen: popoverOpen,
|
|
124
|
+
button: withTooltip || popoverButton,
|
|
125
|
+
closePopover: function closePopover() {
|
|
126
|
+
return setPopoverOpen(false);
|
|
127
|
+
},
|
|
128
|
+
panelPaddingSize: "none",
|
|
129
|
+
anchorPosition: "leftCenter"
|
|
130
|
+
}, ___EmotionJSX(EuiContextMenuPanel, {
|
|
131
|
+
className: "euiBasicTable__collapsedActions",
|
|
132
|
+
items: controls
|
|
133
|
+
}));
|
|
134
|
+
};
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
1
|
/*
|
|
11
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -15,78 +6,14 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
15
6
|
* Side Public License, v 1.
|
|
16
7
|
*/
|
|
17
8
|
|
|
18
|
-
import React
|
|
9
|
+
import React from 'react';
|
|
19
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
|
-
export var CustomItemAction =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (_this.mounted) {
|
|
30
|
-
_this.setState({
|
|
31
|
-
hasFocus: true
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
_defineProperty(_assertThisInitialized(_this), "onBlur", function () {
|
|
36
|
-
if (_this.mounted) {
|
|
37
|
-
_this.setState({
|
|
38
|
-
hasFocus: false
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
_defineProperty(_assertThisInitialized(_this), "hasFocus", function () {
|
|
43
|
-
return _this.state.hasFocus;
|
|
44
|
-
});
|
|
45
|
-
_this.state = {
|
|
46
|
-
hasFocus: false
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
// while generally considered an anti-pattern, here we require
|
|
50
|
-
// to do that as the onFocus/onBlur events of the action controls
|
|
51
|
-
// may trigger while this component is unmounted. An alternative
|
|
52
|
-
// (at least the workarounds suggested by react is to unregister
|
|
53
|
-
// the onFocus/onBlur listeners from the action controls... this
|
|
54
|
-
// unfortunately will lead to unnecessarily complex code... so we'll
|
|
55
|
-
// stick to this approach for now)
|
|
56
|
-
_this.mounted = false;
|
|
57
|
-
return _this;
|
|
58
|
-
}
|
|
59
|
-
_createClass(CustomItemAction, [{
|
|
60
|
-
key: "componentDidMount",
|
|
61
|
-
value: function componentDidMount() {
|
|
62
|
-
this.mounted = true;
|
|
63
|
-
}
|
|
64
|
-
}, {
|
|
65
|
-
key: "componentWillUnmount",
|
|
66
|
-
value: function componentWillUnmount() {
|
|
67
|
-
this.mounted = false;
|
|
68
|
-
}
|
|
69
|
-
}, {
|
|
70
|
-
key: "render",
|
|
71
|
-
value: function render() {
|
|
72
|
-
var _this$props = this.props,
|
|
73
|
-
action = _this$props.action,
|
|
74
|
-
enabled = _this$props.enabled,
|
|
75
|
-
item = _this$props.item,
|
|
76
|
-
className = _this$props.className;
|
|
77
|
-
var tool = action.render(item, enabled);
|
|
78
|
-
var clonedTool = /*#__PURE__*/cloneElement(tool, {
|
|
79
|
-
onFocus: this.onFocus,
|
|
80
|
-
onBlur: this.onBlur
|
|
81
|
-
});
|
|
82
|
-
var style = this.hasFocus() ? {
|
|
83
|
-
opacity: 1
|
|
84
|
-
} : undefined;
|
|
85
|
-
return ___EmotionJSX("div", {
|
|
86
|
-
style: style,
|
|
87
|
-
className: className
|
|
88
|
-
}, clonedTool);
|
|
89
|
-
}
|
|
90
|
-
}]);
|
|
91
|
-
return CustomItemAction;
|
|
92
|
-
}(Component);
|
|
11
|
+
export var CustomItemAction = function CustomItemAction(_ref) {
|
|
12
|
+
var action = _ref.action,
|
|
13
|
+
enabled = _ref.enabled,
|
|
14
|
+
item = _ref.item,
|
|
15
|
+
className = _ref.className;
|
|
16
|
+
return ___EmotionJSX("div", {
|
|
17
|
+
className: className
|
|
18
|
+
}, action.render(item, enabled));
|
|
19
|
+
};
|
|
@@ -12,10 +12,8 @@ import { EuiButtonEmpty, EuiButtonIcon } from '../button';
|
|
|
12
12
|
import { EuiToolTip } from '../tool_tip';
|
|
13
13
|
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
14
14
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
15
|
+
import { callWithItemIfFunction } from './action_types';
|
|
15
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
-
// In order to use generics with an arrow function inside a .tsx file, it's necessary to use
|
|
17
|
-
// this `extends` hack and declare the types as shown, instead of declaring the const as a
|
|
18
|
-
// FunctionComponent
|
|
19
17
|
export var DefaultItemAction = function DefaultItemAction(_ref) {
|
|
20
18
|
var action = _ref.action,
|
|
21
19
|
enabled = _ref.enabled,
|
|
@@ -38,25 +36,36 @@ export var DefaultItemAction = function DefaultItemAction(_ref) {
|
|
|
38
36
|
icon = isString(buttonIcon) ? buttonIcon : buttonIcon(item);
|
|
39
37
|
}
|
|
40
38
|
var button;
|
|
41
|
-
var actionContent =
|
|
39
|
+
var actionContent = callWithItemIfFunction(item)(action.name);
|
|
40
|
+
var tooltipContent = callWithItemIfFunction(item)(action.description);
|
|
41
|
+
var href = callWithItemIfFunction(item)(action.href);
|
|
42
|
+
var dataTestSubj = callWithItemIfFunction(item)(action['data-test-subj']);
|
|
42
43
|
var ariaLabelId = useGeneratedHtmlId();
|
|
44
|
+
var ariaLabelledBy;
|
|
43
45
|
if (action.type === 'icon') {
|
|
44
46
|
if (!icon) {
|
|
45
47
|
throw new Error("Cannot render item action [".concat(action.name, "]. It is configured to render as an icon but no\n icon is provided. Make sure to set the 'icon' property of the action"));
|
|
46
48
|
}
|
|
47
|
-
button = ___EmotionJSX(
|
|
49
|
+
button = ___EmotionJSX(EuiButtonIcon, {
|
|
48
50
|
className: className,
|
|
49
51
|
"aria-labelledby": ariaLabelId,
|
|
50
52
|
isDisabled: !enabled,
|
|
51
53
|
color: color,
|
|
52
54
|
iconType: icon,
|
|
53
55
|
onClick: onClick,
|
|
54
|
-
href:
|
|
56
|
+
href: href,
|
|
55
57
|
target: action.target,
|
|
56
|
-
"data-test-subj":
|
|
57
|
-
|
|
58
|
+
"data-test-subj": dataTestSubj
|
|
59
|
+
// If action is disabled, the normal tooltip can't show - attempt to
|
|
60
|
+
// provide some amount of affordance with a browser title tooltip
|
|
61
|
+
,
|
|
62
|
+
title: !enabled ? tooltipContent : undefined
|
|
63
|
+
});
|
|
64
|
+
// actionContent (action.name) is a ReactNode and must be rendered
|
|
65
|
+
// to an element and referenced by ID for screen readers
|
|
66
|
+
ariaLabelledBy = ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", {
|
|
58
67
|
id: ariaLabelId
|
|
59
|
-
}, actionContent))
|
|
68
|
+
}, actionContent));
|
|
60
69
|
} else {
|
|
61
70
|
button = ___EmotionJSX(EuiButtonEmpty, {
|
|
62
71
|
className: className,
|
|
@@ -65,14 +74,14 @@ export var DefaultItemAction = function DefaultItemAction(_ref) {
|
|
|
65
74
|
color: color,
|
|
66
75
|
iconType: icon,
|
|
67
76
|
onClick: onClick,
|
|
68
|
-
href:
|
|
77
|
+
href: href,
|
|
69
78
|
target: action.target,
|
|
70
|
-
"data-test-subj":
|
|
79
|
+
"data-test-subj": dataTestSubj,
|
|
71
80
|
flush: "right"
|
|
72
81
|
}, actionContent);
|
|
73
82
|
}
|
|
74
|
-
return enabled
|
|
75
|
-
content:
|
|
83
|
+
return enabled ? ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiToolTip, {
|
|
84
|
+
content: tooltipContent,
|
|
76
85
|
delay: "long"
|
|
77
|
-
}, button) : button;
|
|
86
|
+
}, button), ariaLabelledBy) : ___EmotionJSX(React.Fragment, null, button, ariaLabelledBy);
|
|
78
87
|
};
|
|
@@ -133,24 +133,26 @@ describe('EuiInMemoryTable', function () {
|
|
|
133
133
|
cy.checkAxe();
|
|
134
134
|
});
|
|
135
135
|
it('has zero violations after sorting on a column', function () {
|
|
136
|
-
cy.
|
|
137
|
-
cy.
|
|
138
|
-
cy.realPress('Enter');
|
|
136
|
+
cy.get('button[data-test-subj="tableHeaderSortButton"]').first().focus();
|
|
137
|
+
cy.realPress('{enter}');
|
|
139
138
|
cy.checkAxe();
|
|
140
139
|
});
|
|
141
140
|
it('has zero violations when number of rows is increased by keyboard', function () {
|
|
142
|
-
cy.
|
|
143
|
-
cy.get('
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
cy.get('button[data-test-subj="tablePaginationPopoverButton"]').focus().realPress('{enter}');
|
|
142
|
+
cy.get('div[data-popover-open="true"]', {
|
|
143
|
+
timeout: 1000
|
|
144
|
+
}).should('exist');
|
|
146
145
|
cy.repeatRealPress('Tab'); // Switched to Tab from ArrowDown because of flaky test runs
|
|
147
|
-
cy.get('button[data-test-subj="tablePagination-25-rows"]'
|
|
148
|
-
|
|
146
|
+
cy.get('button[data-test-subj="tablePagination-25-rows"]', {
|
|
147
|
+
timeout: 1000
|
|
148
|
+
}).realPress('{enter}');
|
|
149
|
+
cy.get('table.euiTable', {
|
|
150
|
+
timeout: 1000
|
|
151
|
+
}).find('tr.euiTableRow').should('have.length', 20);
|
|
149
152
|
cy.checkAxe();
|
|
150
153
|
});
|
|
151
154
|
it('has zero violations when pagination is pressed', function () {
|
|
152
|
-
cy.
|
|
153
|
-
cy.get('a[data-test-subj="pagination-button-1"]').should('have.focus').realPress('Enter');
|
|
155
|
+
cy.get('a[data-test-subj="pagination-button-1"]').focus().realPress('{enter}');
|
|
154
156
|
cy.get('button[data-test-subj="pagination-button-1"]').should('be.disabled');
|
|
155
157
|
cy.checkAxe();
|
|
156
158
|
});
|
|
@@ -82,10 +82,12 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
|
82
82
|
var popoverAriaLabel = useEuiI18n('euiBreadcrumb.popoverAriaLabel', 'Clicking this button will toggle a popover dialog.');
|
|
83
83
|
return ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
|
|
84
84
|
var title = innerText === '' ? undefined : innerText;
|
|
85
|
-
var
|
|
85
|
+
var baseProps = {
|
|
86
86
|
ref: ref,
|
|
87
87
|
title: title,
|
|
88
|
-
'aria-current': ariaCurrent
|
|
88
|
+
'aria-current': ariaCurrent
|
|
89
|
+
};
|
|
90
|
+
var styleProps = {
|
|
89
91
|
className: classes,
|
|
90
92
|
css: cssStyles
|
|
91
93
|
};
|
|
@@ -95,8 +97,10 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
|
95
97
|
closePopover: function closePopover() {
|
|
96
98
|
return setIsPopoverOpen(false);
|
|
97
99
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
css: !isLastBreadcrumb && styles.euiBreadcrumb__popoverWrapper,
|
|
101
|
+
button: ___EmotionJSX(EuiLink, _extends({}, baseProps, {
|
|
102
|
+
color: linkColor,
|
|
103
|
+
css: styles.euiBreadcrumb__popoverButton
|
|
100
104
|
// Avoid passing href and onClick - should only toggle the popover
|
|
101
105
|
,
|
|
102
106
|
onClick: function onClick() {
|
|
@@ -104,14 +108,14 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
|
104
108
|
return !isOpen;
|
|
105
109
|
});
|
|
106
110
|
}
|
|
107
|
-
}, rest),
|
|
111
|
+
}, rest), ___EmotionJSX("span", styleProps, text), ___EmotionJSX(EuiIcon, {
|
|
108
112
|
type: "arrowDown",
|
|
109
113
|
size: "s",
|
|
110
114
|
"aria-label": " - ".concat(popoverAriaLabel)
|
|
111
115
|
}))
|
|
112
116
|
}), popoverContent);
|
|
113
117
|
} else if (isInteractiveBreadcrumb) {
|
|
114
|
-
return ___EmotionJSX(EuiLink, _extends({},
|
|
118
|
+
return ___EmotionJSX(EuiLink, _extends({}, baseProps, styleProps, {
|
|
115
119
|
color: linkColor,
|
|
116
120
|
onClick: onClick,
|
|
117
121
|
href: href,
|
|
@@ -121,7 +125,7 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
|
121
125
|
return ___EmotionJSX(EuiTextColor, {
|
|
122
126
|
color: plainTextColor,
|
|
123
127
|
cloneElement: true
|
|
124
|
-
}, ___EmotionJSX("span", _extends({},
|
|
128
|
+
}, ___EmotionJSX("span", _extends({}, baseProps, styleProps, rest), text));
|
|
125
129
|
}
|
|
126
130
|
});
|
|
127
131
|
};
|
|
@@ -49,6 +49,11 @@ export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiT
|
|
|
49
49
|
return x * 10;
|
|
50
50
|
})), ";;label:isTruncated;"),
|
|
51
51
|
isTruncatedLast: /*#__PURE__*/css(euiTextTruncate('none'), ";;label:isTruncatedLast;"),
|
|
52
|
+
// Popover styles
|
|
53
|
+
euiBreadcrumb__popoverButton: /*#__PURE__*/css("max-inline-size:100%;display:inline-flex;align-items:center;gap:", euiTheme.size.xs, ";;label:euiBreadcrumb__popoverButton;"),
|
|
54
|
+
euiBreadcrumb__popoverWrapper: /*#__PURE__*/css("max-inline-size:calc(\n 100% - ", mathWithUnits(euiTheme.size.base, function (x) {
|
|
55
|
+
return x + 1;
|
|
56
|
+
}), "\n );;label:euiBreadcrumb__popoverWrapper;"),
|
|
52
57
|
// Types
|
|
53
58
|
page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(euiThemeContext, 'inset'), ";}&:is(button):focus{", euiFocusRing(euiThemeContext, 'center'), ";};label:page;"),
|
|
54
59
|
application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
@@ -66,9 +66,11 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
var isText = typeof children === 'string';
|
|
69
|
+
var doNotRenderTextWrapper = textProps === false;
|
|
70
|
+
var renderTextWrapper = (isText || textProps) && !doNotRenderTextWrapper;
|
|
69
71
|
return ___EmotionJSX("span", _extends({
|
|
70
72
|
css: cssStyles
|
|
71
|
-
}, contentProps), iconSide === 'left' && icon,
|
|
73
|
+
}, contentProps), iconSide === 'left' && icon, renderTextWrapper ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
72
74
|
className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
73
75
|
}), children) : children, iconSide === 'right' && icon);
|
|
74
76
|
};
|