@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
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["label", "isActive", "isDisabled", "href", "target", "
|
|
5
|
+
var _excluded = ["label", "isActive", "isDisabled", "href", "rel", "target", "external", "className", "css", "style", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText", "toolTipProps"],
|
|
6
6
|
_excluded2 = ["iconType", "alwaysShow", "isDisabled"];
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
8
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -22,6 +22,7 @@ import { useInnerText } from '../inner_text';
|
|
|
22
22
|
import { EuiListGroupItemExtraAction } from './list_group_item_extra_action';
|
|
23
23
|
import { getSecureRelForTarget, useEuiTheme, cloneElementWithCss } from '../../services';
|
|
24
24
|
import { validateHref } from '../../services/security/href_validator';
|
|
25
|
+
import { EuiExternalLinkIcon } from '../link/external_link_icon';
|
|
25
26
|
import { euiListGroupItemStyles, euiListGroupItemIconStyles, euiListGroupItemInnerStyles, euiListGroupItemTooltipStyles, euiListGroupItemLabelStyles } from './list_group_item.styles';
|
|
26
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
28
|
export var SIZES = ['xs', 's', 'm', 'l'];
|
|
@@ -33,8 +34,9 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
33
34
|
_ref$isDisabled = _ref.isDisabled,
|
|
34
35
|
_isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
35
36
|
href = _ref.href,
|
|
36
|
-
target = _ref.target,
|
|
37
37
|
rel = _ref.rel,
|
|
38
|
+
target = _ref.target,
|
|
39
|
+
external = _ref.external,
|
|
38
40
|
className = _ref.className,
|
|
39
41
|
customCss = _ref.css,
|
|
40
42
|
style = _ref.style,
|
|
@@ -134,7 +136,10 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
134
136
|
target: target
|
|
135
137
|
}),
|
|
136
138
|
onClick: onClick
|
|
137
|
-
}, rest), iconNode, labelContent
|
|
139
|
+
}, rest), iconNode, labelContent, ___EmotionJSX(EuiExternalLinkIcon, {
|
|
140
|
+
external: external,
|
|
141
|
+
target: target
|
|
142
|
+
}));
|
|
138
143
|
} else if (href && isDisabled || onClick) {
|
|
139
144
|
itemContent = ___EmotionJSX("button", _extends({
|
|
140
145
|
type: "button",
|
|
@@ -67,7 +67,8 @@ export var euiListGroupItemInnerStyles = function euiListGroupItemInnerStyles(eu
|
|
|
67
67
|
// Variants
|
|
68
68
|
isDisabled: /*#__PURE__*/css("cursor:not-allowed;&,&:hover,&:focus{color:", euiButtonColor(euiThemeContext, 'disabled').color, ";cursor:not-allowed;background-color:transparent;text-decoration:none;};label:isDisabled;"),
|
|
69
69
|
isActive: /*#__PURE__*/css(";label:isActive;"),
|
|
70
|
-
isClickable: _ref
|
|
70
|
+
isClickable: _ref,
|
|
71
|
+
externalIcon: /*#__PURE__*/css(logicalCSS('margin-left', euiTheme.size.xs), ";;label:externalIcon;")
|
|
71
72
|
};
|
|
72
73
|
};
|
|
73
74
|
export var euiListGroupItemLabelStyles = function euiListGroupItemLabelStyles() {
|
|
@@ -87,8 +87,7 @@ describe('EuiNotificationEvent', function () {
|
|
|
87
87
|
});
|
|
88
88
|
describe('Keyboard accessibility', function () {
|
|
89
89
|
it('has zero violations when the popover is opened by keyboard', function () {
|
|
90
|
-
cy.
|
|
91
|
-
cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').should('have.focus');
|
|
90
|
+
cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').focus();
|
|
92
91
|
cy.realPress('Enter');
|
|
93
92
|
cy.get('div.euiPopover__panel').should('exist');
|
|
94
93
|
cy.checkAxe();
|
|
@@ -198,9 +198,12 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
198
198
|
anchor: _this.button,
|
|
199
199
|
popover: _this.panel,
|
|
200
200
|
offset: _this.props.attachToAnchor ? offset : _this.props.hasArrow ? 16 + offset : 8 + offset,
|
|
201
|
-
arrowConfig: {
|
|
201
|
+
arrowConfig: _this.props.hasArrow ? {
|
|
202
202
|
arrowWidth: 24,
|
|
203
203
|
arrowBuffer: 10
|
|
204
|
+
} : {
|
|
205
|
+
arrowWidth: 0,
|
|
206
|
+
arrowBuffer: 0
|
|
204
207
|
},
|
|
205
208
|
returnBoundingBox: _this.props.attachToAnchor,
|
|
206
209
|
allowCrossAxis: _this.props.repositionToCrossAxis,
|
|
@@ -49,22 +49,19 @@ describe('Horizontal EuiResizableContainer', function () {
|
|
|
49
49
|
});
|
|
50
50
|
describe('Keyboard accessibility check', function () {
|
|
51
51
|
it('has zero violations when first panel is scrolled vertically', function () {
|
|
52
|
-
cy.
|
|
53
|
-
cy.get('div.euiPanel').first().should('have.focus');
|
|
52
|
+
cy.get('div.euiPanel').first().focus();
|
|
54
53
|
cy.realPress('End');
|
|
55
54
|
cy.get('a[data-test-subj="hello-world-link"]').should('be.visible');
|
|
56
55
|
cy.checkAxe();
|
|
57
56
|
});
|
|
58
57
|
it('has zero violations when second panel is scrolled vertically', function () {
|
|
59
|
-
cy.
|
|
60
|
-
cy.get('div.euiPanel').last().should('have.focus');
|
|
58
|
+
cy.get('div.euiPanel').last().focus();
|
|
61
59
|
cy.realPress('End');
|
|
62
60
|
cy.realPress('Home');
|
|
63
61
|
cy.checkAxe();
|
|
64
62
|
});
|
|
65
63
|
it('has zero violations when the horizontal panels are resized', function () {
|
|
66
|
-
cy.
|
|
67
|
-
cy.get('button.euiResizableButton').should('have.focus');
|
|
64
|
+
cy.get('button.euiResizableButton').focus();
|
|
68
65
|
cy.repeatRealPress('ArrowRight', 10);
|
|
69
66
|
cy.checkAxe();
|
|
70
67
|
});
|
|
@@ -99,8 +96,7 @@ describe('Vertical EuiResizableContainer', function () {
|
|
|
99
96
|
cy.checkAxe();
|
|
100
97
|
});
|
|
101
98
|
it('has zero violations when the vertical panels are resized', function () {
|
|
102
|
-
cy.
|
|
103
|
-
cy.get('button.euiResizableButton').should('have.focus');
|
|
99
|
+
cy.get('button.euiResizableButton').focus();
|
|
104
100
|
cy.repeatRealPress('ArrowDown', 10);
|
|
105
101
|
cy.checkAxe();
|
|
106
102
|
});
|
|
@@ -172,8 +172,7 @@ describe('EuiSearchBar', function () {
|
|
|
172
172
|
});
|
|
173
173
|
describe('Keyboard accessibility', function () {
|
|
174
174
|
it('has zero violations after a full-text search', function () {
|
|
175
|
-
cy.
|
|
176
|
-
cy.get('input[type="search"]').should('have.focus');
|
|
175
|
+
cy.get('input[type="search"]').focus();
|
|
177
176
|
cy.get('input[type="search"]').type('watch');
|
|
178
177
|
cy.realPress('Enter');
|
|
179
178
|
cy.get('table.euiTable tbody').find('tr').should('have.length', 1);
|
|
@@ -185,8 +184,7 @@ describe('EuiSearchBar', function () {
|
|
|
185
184
|
cy.checkAxe();
|
|
186
185
|
});
|
|
187
186
|
it('has zero violations after filtering on Open items', function () {
|
|
188
|
-
cy.
|
|
189
|
-
cy.get('button.euiButtonEmpty').first().should('have.focus');
|
|
187
|
+
cy.get('button.euiButtonEmpty').first().focus();
|
|
190
188
|
cy.realPress('Enter');
|
|
191
189
|
cy.get('table.euiTable tbody').find('tr').should('have.length', 3);
|
|
192
190
|
cy.checkAxe();
|
|
@@ -197,8 +195,7 @@ describe('EuiSearchBar', function () {
|
|
|
197
195
|
cy.checkAxe();
|
|
198
196
|
});
|
|
199
197
|
it('has zero violations after filtering by Tags', function () {
|
|
200
|
-
cy.
|
|
201
|
-
cy.get('button.euiButtonEmpty').last().should('have.focus');
|
|
198
|
+
cy.get('button.euiButtonEmpty').last().focus();
|
|
202
199
|
cy.realPress('Enter');
|
|
203
200
|
cy.realPress('Tab');
|
|
204
201
|
cy.realPress('ArrowDown');
|
|
@@ -8,8 +8,8 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
10
|
var _excluded = ["data"],
|
|
11
|
-
_excluded2 = ["label", "isGroupLabel", "checked", "disabled", "prepend", "append", "ref", "key", "searchableLabel", "data"],
|
|
12
|
-
_excluded3 = ["className", "options", "searchValue", "onOptionClick", "renderOption", "height", "windowProps", "rowHeight", "activeOptionIndex", "makeOptionId", "showIcons", "singleSelection", "visibleOptions", "allowExclusions", "bordered", "paddingSize", "searchable", "onFocusBadge", "listId", "setActiveOptionIndex", "aria-label", "aria-labelledby", "aria-describedby", "role", "isVirtualized", "textWrap"];
|
|
11
|
+
_excluded2 = ["label", "isGroupLabel", "checked", "disabled", "prepend", "append", "ref", "key", "searchableLabel", "data", "truncationProps"],
|
|
12
|
+
_excluded3 = ["className", "options", "searchValue", "onOptionClick", "renderOption", "height", "windowProps", "rowHeight", "activeOptionIndex", "makeOptionId", "showIcons", "singleSelection", "visibleOptions", "allowExclusions", "bordered", "paddingSize", "searchable", "onFocusBadge", "listId", "setActiveOptionIndex", "aria-label", "aria-labelledby", "aria-describedby", "role", "isVirtualized", "textWrap", "truncationProps"];
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
15
|
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); }; }
|
|
@@ -27,6 +27,8 @@ import classNames from 'classnames';
|
|
|
27
27
|
import { FixedSizeList, areEqual } from 'react-window';
|
|
28
28
|
import { EuiAutoSizer } from '../../auto_sizer';
|
|
29
29
|
import { EuiHighlight } from '../../highlight';
|
|
30
|
+
import { EuiMark } from '../../mark';
|
|
31
|
+
import { EuiTextTruncate } from '../../text_truncate';
|
|
30
32
|
import { EuiSelectableListItem } from './selectable_list_item';
|
|
31
33
|
|
|
32
34
|
// Consumer Configurable Props via `EuiSelectable.listProps`
|
|
@@ -81,20 +83,23 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
});
|
|
84
|
-
|
|
85
|
-
_defineProperty(_assertThisInitialized(_this), "ariaPosInSetMap", {});
|
|
86
|
+
// This utility is necessary to exclude group labels from the aria set count
|
|
86
87
|
_defineProperty(_assertThisInitialized(_this), "calculateAriaSetAttrs", function (optionArray) {
|
|
87
|
-
|
|
88
|
+
var ariaPosInSetMap = {};
|
|
88
89
|
var latestAriaPosIndex = 0;
|
|
89
90
|
optionArray.forEach(function (option, index) {
|
|
90
91
|
if (!option.isGroupLabel) {
|
|
91
92
|
latestAriaPosIndex++;
|
|
92
|
-
|
|
93
|
+
ariaPosInSetMap[index] = latestAriaPosIndex;
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
|
-
|
|
96
|
+
return {
|
|
97
|
+
ariaPosInSetMap: ariaPosInSetMap,
|
|
98
|
+
ariaSetSize: latestAriaPosIndex
|
|
99
|
+
};
|
|
96
100
|
});
|
|
97
101
|
_defineProperty(_assertThisInitialized(_this), "ListRow", /*#__PURE__*/memo(function (_ref) {
|
|
102
|
+
var _option$textWrap;
|
|
98
103
|
var data = _ref.data,
|
|
99
104
|
index = _ref.index,
|
|
100
105
|
style = _ref.style;
|
|
@@ -111,19 +116,20 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
111
116
|
key = option.key,
|
|
112
117
|
searchableLabel = option.searchableLabel,
|
|
113
118
|
_data = option.data,
|
|
119
|
+
_truncationProps = option.truncationProps,
|
|
114
120
|
optionRest = _objectWithoutProperties(option, _excluded2);
|
|
115
121
|
var _this$props2 = _this.props,
|
|
116
122
|
activeOptionIndex = _this$props2.activeOptionIndex,
|
|
117
123
|
allowExclusions = _this$props2.allowExclusions,
|
|
118
124
|
onFocusBadge = _this$props2.onFocusBadge,
|
|
119
125
|
paddingSize = _this$props2.paddingSize,
|
|
120
|
-
searchValue = _this$props2.searchValue,
|
|
121
126
|
showIcons = _this$props2.showIcons,
|
|
122
127
|
makeOptionId = _this$props2.makeOptionId,
|
|
123
128
|
renderOption = _this$props2.renderOption,
|
|
124
129
|
setActiveOptionIndex = _this$props2.setActiveOptionIndex,
|
|
125
130
|
searchable = _this$props2.searchable,
|
|
126
|
-
|
|
131
|
+
searchValue = _this$props2.searchValue,
|
|
132
|
+
isVirtualized = _this$props2.isVirtualized;
|
|
127
133
|
if (isGroupLabel) {
|
|
128
134
|
return ___EmotionJSX("li", _extends({
|
|
129
135
|
role: "presentation",
|
|
@@ -133,6 +139,15 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
133
139
|
}, optionRest), prepend, label, append);
|
|
134
140
|
}
|
|
135
141
|
var id = makeOptionId(index);
|
|
142
|
+
var isFocused = activeOptionIndex === index;
|
|
143
|
+
|
|
144
|
+
// Text wrapping
|
|
145
|
+
var canWrap = !isVirtualized;
|
|
146
|
+
var _textWrap = (_option$textWrap = option.textWrap) !== null && _option$textWrap !== void 0 ? _option$textWrap : _this.props.textWrap;
|
|
147
|
+
var textWrap = canWrap ? _textWrap : 'truncate';
|
|
148
|
+
|
|
149
|
+
// Truncation config (if any). If none, CSS truncation is used
|
|
150
|
+
var truncationProps = textWrap === 'truncate' ? _this.getTruncationProps(option, isFocused) : undefined;
|
|
136
151
|
return ___EmotionJSX(EuiSelectableListItem, _extends({
|
|
137
152
|
key: id,
|
|
138
153
|
id: id,
|
|
@@ -145,14 +160,14 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
145
160
|
_this.onAddOrRemoveOption(option, event);
|
|
146
161
|
},
|
|
147
162
|
ref: ref ? ref.bind(null, index) : undefined,
|
|
148
|
-
isFocused:
|
|
163
|
+
isFocused: isFocused,
|
|
149
164
|
title: searchableLabel || label,
|
|
150
165
|
checked: checked,
|
|
151
166
|
disabled: disabled,
|
|
152
167
|
prepend: prepend,
|
|
153
168
|
append: append,
|
|
154
|
-
"aria-posinset": _this.ariaPosInSetMap[index],
|
|
155
|
-
"aria-setsize": _this.ariaSetSize,
|
|
169
|
+
"aria-posinset": _this.state.ariaPosInSetMap[index],
|
|
170
|
+
"aria-setsize": _this.state.ariaSetSize,
|
|
156
171
|
onFocusBadge: onFocusBadge,
|
|
157
172
|
allowExclusions: allowExclusions,
|
|
158
173
|
showIcons: showIcons,
|
|
@@ -160,16 +175,18 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
160
175
|
searchable: searchable,
|
|
161
176
|
textWrap: textWrap
|
|
162
177
|
}, optionRest), renderOption ? renderOption( // @ts-ignore complex
|
|
163
|
-
_objectSpread(_objectSpread({}, _option), optionData), _this.
|
|
164
|
-
search: searchValue
|
|
165
|
-
}, label));
|
|
178
|
+
_objectSpread(_objectSpread({}, _option), optionData), searchValue) : searchValue ? _this.renderSearchedText(label, truncationProps) : truncationProps ? _this.renderTruncatedText(label, truncationProps) : label);
|
|
166
179
|
}, areEqual));
|
|
167
|
-
_defineProperty(_assertThisInitialized(_this), "renderVirtualizedList", function (
|
|
180
|
+
_defineProperty(_assertThisInitialized(_this), "renderVirtualizedList", function () {
|
|
168
181
|
if (!_this.props.isVirtualized) return null;
|
|
182
|
+
var _this$state = _this.state,
|
|
183
|
+
optionArray = _this$state.optionArray,
|
|
184
|
+
itemData = _this$state.itemData;
|
|
169
185
|
var _this$props3 = _this.props,
|
|
170
186
|
windowProps = _this$props3.windowProps,
|
|
171
187
|
forcedHeight = _this$props3.height,
|
|
172
188
|
rowHeight = _this$props3.rowHeight;
|
|
189
|
+
var heightIsFull = forcedHeight === 'full';
|
|
173
190
|
var virtualizationProps = _objectSpread({
|
|
174
191
|
className: 'euiSelectableList__list',
|
|
175
192
|
ref: _this.setListRef,
|
|
@@ -177,7 +194,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
177
194
|
innerRef: _this.setListBoxRef,
|
|
178
195
|
innerElementType: 'ul',
|
|
179
196
|
itemCount: optionArray.length,
|
|
180
|
-
itemData:
|
|
197
|
+
itemData: itemData,
|
|
181
198
|
itemSize: rowHeight,
|
|
182
199
|
'data-skip-axe': 'scrollable-region-focusable'
|
|
183
200
|
}, windowProps);
|
|
@@ -197,7 +214,9 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
197
214
|
calculatedHeight = numVisibleOptions * rowHeight;
|
|
198
215
|
}
|
|
199
216
|
}
|
|
200
|
-
return heightIsFull ? ___EmotionJSX(EuiAutoSizer,
|
|
217
|
+
return heightIsFull ? ___EmotionJSX(EuiAutoSizer, {
|
|
218
|
+
onResize: _this.calculateDefaultOptionWidth
|
|
219
|
+
}, function (_ref2) {
|
|
201
220
|
var width = _ref2.width,
|
|
202
221
|
height = _ref2.height;
|
|
203
222
|
return ___EmotionJSX(FixedSizeList, _extends({
|
|
@@ -205,7 +224,8 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
205
224
|
height: height
|
|
206
225
|
}, virtualizationProps), _this.ListRow);
|
|
207
226
|
}) : ___EmotionJSX(EuiAutoSizer, {
|
|
208
|
-
disableHeight: true
|
|
227
|
+
disableHeight: true,
|
|
228
|
+
onResize: _this.calculateDefaultOptionWidth
|
|
209
229
|
}, function (_ref3) {
|
|
210
230
|
var width = _ref3.width;
|
|
211
231
|
return ___EmotionJSX(FixedSizeList, _extends({
|
|
@@ -214,17 +234,106 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
214
234
|
}, virtualizationProps), _this.ListRow);
|
|
215
235
|
});
|
|
216
236
|
});
|
|
237
|
+
_defineProperty(_assertThisInitialized(_this), "forceVirtualizedListRowRerender", function () {
|
|
238
|
+
_this.setState({
|
|
239
|
+
itemData: _objectSpread({}, _this.state.optionArray)
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
// EuiTextTruncate is expensive perf-wise - we use several utilities here to
|
|
243
|
+
// offset its performance cost
|
|
244
|
+
// and creates a resize observer for
|
|
245
|
+
// each individual item. This logic tries to offset this performance hit by
|
|
246
|
+
// guesstimating a default width for each option
|
|
247
|
+
_defineProperty(_assertThisInitialized(_this), "focusBadgeOffset", 0);
|
|
248
|
+
_defineProperty(_assertThisInitialized(_this), "calculateDefaultOptionWidth", function (_ref4) {
|
|
249
|
+
var containerWidth = _ref4.width;
|
|
250
|
+
var _this$props4 = _this.props,
|
|
251
|
+
truncationProps = _this$props4.truncationProps,
|
|
252
|
+
searchable = _this$props4.searchable,
|
|
253
|
+
searchValue = _this$props4.searchValue;
|
|
254
|
+
|
|
255
|
+
// If it's not likely we'll need to use EuiTextTruncate, don't set state/rerender on every panel resize
|
|
256
|
+
var mayTruncate = searchable || truncationProps;
|
|
257
|
+
if (!mayTruncate) return;
|
|
258
|
+
var paddingOffset = _this.props.paddingSize === 'none' ? 0 : 24; // Defaults to 's'
|
|
259
|
+
var checkedIconOffset = _this.props.showIcons === false ? 0 : 28; // Defaults to true
|
|
260
|
+
_this.focusBadgeOffset = _this.props.onFocusBadge === false ? 0 : 46;
|
|
261
|
+
_this.setState({
|
|
262
|
+
defaultOptionWidth: containerWidth - paddingOffset - checkedIconOffset
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
// Potentially force list rows to rerender on dynamic resize as well,
|
|
266
|
+
// but try to do it as lightly as possible
|
|
267
|
+
if (truncationProps || searchable && searchValue) {
|
|
268
|
+
_this.forceVirtualizedListRowRerender();
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
_defineProperty(_assertThisInitialized(_this), "getTruncationProps", function (option, isFocused) {
|
|
272
|
+
// Individual truncation settings should override component-wide settings
|
|
273
|
+
var truncationProps = _objectSpread(_objectSpread({}, _this.props.truncationProps), option.truncationProps);
|
|
274
|
+
|
|
275
|
+
// If we're not actually using EuiTextTruncate, no need to continue
|
|
276
|
+
var hasComplexTruncation = _this.props.searchValue || Object.keys(truncationProps).length > 0;
|
|
277
|
+
if (!hasComplexTruncation) return undefined;
|
|
278
|
+
|
|
279
|
+
// Determine whether we can use the optimized default option width
|
|
280
|
+
var defaultOptionWidth = _this.state.defaultOptionWidth;
|
|
281
|
+
var useDefaultWidth = !option.append && !option.prepend;
|
|
282
|
+
var defaultWidth = useDefaultWidth && defaultOptionWidth ? isFocused ? defaultOptionWidth - _this.focusBadgeOffset : defaultOptionWidth : undefined;
|
|
283
|
+
return _objectSpread({
|
|
284
|
+
width: defaultWidth
|
|
285
|
+
}, truncationProps);
|
|
286
|
+
});
|
|
287
|
+
_defineProperty(_assertThisInitialized(_this), "renderSearchedText", function (text, truncationProps) {
|
|
288
|
+
var searchValue = _this.props.searchValue;
|
|
289
|
+
|
|
290
|
+
// If truncationProps is undefined, we're using non-virtualized text wrapping
|
|
291
|
+
if (!truncationProps) {
|
|
292
|
+
return ___EmotionJSX(EuiHighlight, {
|
|
293
|
+
search: searchValue
|
|
294
|
+
}, text);
|
|
295
|
+
}
|
|
296
|
+
var searchPositionStart = text.toLowerCase().indexOf(searchValue.toLowerCase());
|
|
297
|
+
var searchPositionCenter = searchPositionStart + Math.floor(searchValue.length / 2);
|
|
298
|
+
return ___EmotionJSX(EuiTextTruncate, _extends({}, truncationProps, {
|
|
299
|
+
// When searching, don't allow overriding the truncation settings
|
|
300
|
+
truncation: "startEnd",
|
|
301
|
+
truncationPosition: searchPositionCenter,
|
|
302
|
+
text: text
|
|
303
|
+
}), function (text) {
|
|
304
|
+
return ___EmotionJSX(React.Fragment, null, text.length >= searchValue.length ? ___EmotionJSX(EuiHighlight, {
|
|
305
|
+
search: searchValue
|
|
306
|
+
}, text) :
|
|
307
|
+
// If the available truncated text is shorter than the full search string,
|
|
308
|
+
// just highlight the entire truncated text
|
|
309
|
+
___EmotionJSX(EuiMark, null, text));
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
_defineProperty(_assertThisInitialized(_this), "renderTruncatedText", function (text, truncationProps) {
|
|
313
|
+
return (
|
|
314
|
+
// For some bizarre reason, truncation in EuiSelectable is off on initial mount
|
|
315
|
+
// (but not on rerender) for Safari and _some_ truncation types in Firefox :|
|
|
316
|
+
// Waiting a tick before calculating truncation seems to smooth over the issue
|
|
317
|
+
___EmotionJSX(EuiTextTruncate, _extends({
|
|
318
|
+
calculationDelayMs: 2
|
|
319
|
+
}, truncationProps, {
|
|
320
|
+
text: text
|
|
321
|
+
}), function (text) {
|
|
322
|
+
return text;
|
|
323
|
+
})
|
|
324
|
+
);
|
|
325
|
+
});
|
|
217
326
|
_defineProperty(_assertThisInitialized(_this), "onAddOrRemoveOption", function (option, event) {
|
|
218
327
|
if (option.disabled) {
|
|
219
328
|
return;
|
|
220
329
|
}
|
|
221
|
-
var _this$
|
|
222
|
-
allowExclusions = _this$
|
|
223
|
-
options = _this$
|
|
224
|
-
_this$
|
|
225
|
-
visibleOptions = _this$
|
|
226
|
-
_this.props.setActiveOptionIndex(visibleOptions.findIndex(function (
|
|
227
|
-
var label =
|
|
330
|
+
var _this$props5 = _this.props,
|
|
331
|
+
allowExclusions = _this$props5.allowExclusions,
|
|
332
|
+
options = _this$props5.options,
|
|
333
|
+
_this$props5$visibleO = _this$props5.visibleOptions,
|
|
334
|
+
visibleOptions = _this$props5$visibleO === void 0 ? options : _this$props5$visibleO;
|
|
335
|
+
_this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref5) {
|
|
336
|
+
var label = _ref5.label;
|
|
228
337
|
return label === option.label;
|
|
229
338
|
}), function () {
|
|
230
339
|
if (option.checked === 'on' && allowExclusions) {
|
|
@@ -237,10 +346,10 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
237
346
|
});
|
|
238
347
|
});
|
|
239
348
|
_defineProperty(_assertThisInitialized(_this), "onAddOption", function (addedOption, event) {
|
|
240
|
-
var _this$
|
|
241
|
-
onOptionClick = _this$
|
|
242
|
-
options = _this$
|
|
243
|
-
singleSelection = _this$
|
|
349
|
+
var _this$props6 = _this.props,
|
|
350
|
+
onOptionClick = _this$props6.onOptionClick,
|
|
351
|
+
options = _this$props6.options,
|
|
352
|
+
singleSelection = _this$props6.singleSelection;
|
|
244
353
|
var changedOption = _objectSpread({}, addedOption);
|
|
245
354
|
var updatedOptions = options.map(function (option) {
|
|
246
355
|
// if singleSelection is enabled, uncheck any selected option(s)
|
|
@@ -259,10 +368,10 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
259
368
|
onOptionClick(updatedOptions, event, changedOption);
|
|
260
369
|
});
|
|
261
370
|
_defineProperty(_assertThisInitialized(_this), "onRemoveOption", function (removedOption, event) {
|
|
262
|
-
var _this$
|
|
263
|
-
onOptionClick = _this$
|
|
264
|
-
singleSelection = _this$
|
|
265
|
-
options = _this$
|
|
371
|
+
var _this$props7 = _this.props,
|
|
372
|
+
onOptionClick = _this$props7.onOptionClick,
|
|
373
|
+
singleSelection = _this$props7.singleSelection,
|
|
374
|
+
options = _this$props7.options;
|
|
266
375
|
var changedOption = _objectSpread({}, removedOption);
|
|
267
376
|
var updatedOptions = options.map(function (option) {
|
|
268
377
|
var updatedOption = _objectSpread({}, option);
|
|
@@ -275,9 +384,9 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
275
384
|
onOptionClick(updatedOptions, event, changedOption);
|
|
276
385
|
});
|
|
277
386
|
_defineProperty(_assertThisInitialized(_this), "onExcludeOption", function (excludedOption, event) {
|
|
278
|
-
var _this$
|
|
279
|
-
onOptionClick = _this$
|
|
280
|
-
options = _this$
|
|
387
|
+
var _this$props8 = _this.props,
|
|
388
|
+
onOptionClick = _this$props8.onOptionClick,
|
|
389
|
+
options = _this$props8.options;
|
|
281
390
|
var changedOption = _objectSpread({}, excludedOption);
|
|
282
391
|
var updatedOptions = options.map(function (option) {
|
|
283
392
|
var updatedOption = _objectSpread({}, option);
|
|
@@ -289,69 +398,83 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
289
398
|
});
|
|
290
399
|
onOptionClick(updatedOptions, event, changedOption);
|
|
291
400
|
});
|
|
401
|
+
var _optionArray = props.visibleOptions || props.options;
|
|
402
|
+
_this.state = _objectSpread({
|
|
403
|
+
defaultOptionWidth: 0,
|
|
404
|
+
optionArray: _optionArray,
|
|
405
|
+
itemData: _objectSpread({}, _optionArray)
|
|
406
|
+
}, _this.calculateAriaSetAttrs(_optionArray));
|
|
292
407
|
return _this;
|
|
293
408
|
}
|
|
294
409
|
_createClass(EuiSelectableList, [{
|
|
295
410
|
key: "componentDidUpdate",
|
|
296
|
-
value: function componentDidUpdate() {
|
|
297
|
-
var
|
|
411
|
+
value: function componentDidUpdate(prevProps) {
|
|
412
|
+
var _this$props9 = this.props,
|
|
413
|
+
activeOptionIndex = _this$props9.activeOptionIndex,
|
|
414
|
+
visibleOptions = _this$props9.visibleOptions,
|
|
415
|
+
options = _this$props9.options;
|
|
298
416
|
if (this.listBoxRef && this.props.searchable !== true) {
|
|
299
417
|
this.listBoxRef.setAttribute('aria-activedescendant', "".concat(this.props.makeOptionId(activeOptionIndex)));
|
|
300
418
|
}
|
|
301
|
-
if (this.listRef && typeof
|
|
302
|
-
this.listRef.scrollToItem(
|
|
419
|
+
if (this.listRef && typeof activeOptionIndex !== 'undefined') {
|
|
420
|
+
this.listRef.scrollToItem(activeOptionIndex, 'auto');
|
|
421
|
+
}
|
|
422
|
+
if (prevProps.visibleOptions !== visibleOptions || prevProps.options !== options) {
|
|
423
|
+
var optionArray = visibleOptions || options;
|
|
424
|
+
this.setState(_objectSpread({
|
|
425
|
+
optionArray: optionArray,
|
|
426
|
+
itemData: _objectSpread({}, optionArray)
|
|
427
|
+
}, this.calculateAriaSetAttrs(optionArray)));
|
|
303
428
|
}
|
|
304
429
|
}
|
|
305
430
|
}, {
|
|
306
431
|
key: "render",
|
|
307
432
|
value: function render() {
|
|
308
433
|
var _this2 = this;
|
|
309
|
-
var _this$
|
|
310
|
-
className = _this$
|
|
311
|
-
options = _this$
|
|
312
|
-
searchValue = _this$
|
|
313
|
-
onOptionClick = _this$
|
|
314
|
-
renderOption = _this$
|
|
315
|
-
forcedHeight = _this$
|
|
316
|
-
windowProps = _this$
|
|
317
|
-
rowHeight = _this$
|
|
318
|
-
activeOptionIndex = _this$
|
|
319
|
-
makeOptionId = _this$
|
|
320
|
-
showIcons = _this$
|
|
321
|
-
singleSelection = _this$
|
|
322
|
-
visibleOptions = _this$
|
|
323
|
-
allowExclusions = _this$
|
|
324
|
-
bordered = _this$
|
|
325
|
-
paddingSize = _this$
|
|
326
|
-
searchable = _this$
|
|
327
|
-
onFocusBadge = _this$
|
|
328
|
-
listId = _this$
|
|
329
|
-
setActiveOptionIndex = _this$
|
|
330
|
-
ariaLabel = _this$
|
|
331
|
-
ariaLabelledby = _this$
|
|
332
|
-
ariaDescribedby = _this$
|
|
333
|
-
role = _this$
|
|
334
|
-
isVirtualized = _this$
|
|
335
|
-
textWrap = _this$
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
this.calculateAriaSetAttrs(optionArray);
|
|
339
|
-
var heightIsFull = forcedHeight === 'full';
|
|
434
|
+
var _this$props10 = this.props,
|
|
435
|
+
className = _this$props10.className,
|
|
436
|
+
options = _this$props10.options,
|
|
437
|
+
searchValue = _this$props10.searchValue,
|
|
438
|
+
onOptionClick = _this$props10.onOptionClick,
|
|
439
|
+
renderOption = _this$props10.renderOption,
|
|
440
|
+
forcedHeight = _this$props10.height,
|
|
441
|
+
windowProps = _this$props10.windowProps,
|
|
442
|
+
rowHeight = _this$props10.rowHeight,
|
|
443
|
+
activeOptionIndex = _this$props10.activeOptionIndex,
|
|
444
|
+
makeOptionId = _this$props10.makeOptionId,
|
|
445
|
+
showIcons = _this$props10.showIcons,
|
|
446
|
+
singleSelection = _this$props10.singleSelection,
|
|
447
|
+
visibleOptions = _this$props10.visibleOptions,
|
|
448
|
+
allowExclusions = _this$props10.allowExclusions,
|
|
449
|
+
bordered = _this$props10.bordered,
|
|
450
|
+
paddingSize = _this$props10.paddingSize,
|
|
451
|
+
searchable = _this$props10.searchable,
|
|
452
|
+
onFocusBadge = _this$props10.onFocusBadge,
|
|
453
|
+
listId = _this$props10.listId,
|
|
454
|
+
setActiveOptionIndex = _this$props10.setActiveOptionIndex,
|
|
455
|
+
ariaLabel = _this$props10['aria-label'],
|
|
456
|
+
ariaLabelledby = _this$props10['aria-labelledby'],
|
|
457
|
+
ariaDescribedby = _this$props10['aria-describedby'],
|
|
458
|
+
role = _this$props10.role,
|
|
459
|
+
isVirtualized = _this$props10.isVirtualized,
|
|
460
|
+
textWrap = _this$props10.textWrap,
|
|
461
|
+
truncationProps = _this$props10.truncationProps,
|
|
462
|
+
rest = _objectWithoutProperties(_this$props10, _excluded3);
|
|
340
463
|
var classes = classNames('euiSelectableList', {
|
|
341
|
-
'euiSelectableList-fullHeight':
|
|
464
|
+
'euiSelectableList-fullHeight': forcedHeight === 'full',
|
|
342
465
|
'euiSelectableList-bordered': bordered
|
|
343
466
|
}, className);
|
|
344
467
|
return ___EmotionJSX("div", _extends({
|
|
345
468
|
className: classes
|
|
346
|
-
}, rest), isVirtualized ? this.renderVirtualizedList(
|
|
469
|
+
}, rest), isVirtualized ? this.renderVirtualizedList() : ___EmotionJSX("div", {
|
|
347
470
|
className: "euiSelectableList__list",
|
|
348
471
|
ref: this.removeScrollableTabStop
|
|
349
472
|
}, ___EmotionJSX("ul", {
|
|
350
473
|
ref: this.setListBoxRef
|
|
351
|
-
}, optionArray.map(function (_, index) {
|
|
474
|
+
}, this.state.optionArray.map(function (_, index) {
|
|
352
475
|
return /*#__PURE__*/React.createElement(_this2.ListRow, {
|
|
353
476
|
key: index,
|
|
354
|
-
data: optionArray,
|
|
477
|
+
data: _this2.state.optionArray,
|
|
355
478
|
index: index
|
|
356
479
|
}, null);
|
|
357
480
|
}))));
|
|
@@ -54,7 +54,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
|
|
|
54
54
|
var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
|
|
55
55
|
return x / 4;
|
|
56
56
|
});
|
|
57
|
-
return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n dl,\n blockquote,\n
|
|
57
|
+
return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n dl,\n blockquote,\n pre,\n > ul,\n > ol {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n\n /* The styles of the nested ordered lists follow the style of GitHub\n which is commonly used in Markdown or MDX formatting. */\n ol ol,\n ul ol {\n list-style-type: lower-roman;\n }\n\n ul ul ol,\n ul ol ol,\n ol ul ol,\n ol ol ol {\n list-style-type: lower-alpha;\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n ").concat(logicalShorthandCSS('padding', "0 ".concat(fontSize)), "\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; /* 90% of parent font size */\n }\n ").concat(
|
|
58
58
|
// when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
|
|
59
59
|
_customScale === 'm' ? "\n kbd {\n ".concat(logicalCSS('padding-bottom', euiTheme.size.xs), "\n /* Ensures the shape still looks like a square when only one character */\n ").concat(logicalCSS('min-width', euiTheme.size.l), "\n ").concat(logicalTextAlignCSS('center'), "\n }\n \n kbd::after {\n content: '';\n ").concat(logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.text)), "\n position: absolute;\n ").concat(logicalCSS('bottom', euiTheme.size.xxs), "\n ").concat(logicalCSS('left', 0), "\n ").concat(logicalCSS('width', '100%'), "\n }") : '', "\n ");
|
|
60
60
|
};
|
|
@@ -65,7 +65,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
|
|
|
65
65
|
export var euiTextStyles = function euiTextStyles(euiThemeContext) {
|
|
66
66
|
var euiTheme = euiThemeContext.euiTheme;
|
|
67
67
|
return {
|
|
68
|
-
euiText: /*#__PURE__*/css(euiText(euiTheme, true), "clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}
|
|
68
|
+
euiText: /*#__PURE__*/css(euiText(euiTheme, true), "clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote{border-inline-start-color:", euiTheme.border.color, ";border-inline-start-style:solid;}blockquote:not(.euiMarkdownFormat__blockquote){color:", euiTheme.colors.subduedText, ";}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
|
|
69
69
|
return x / 2;
|
|
70
70
|
}), ";};label:euiText;"),
|
|
71
71
|
constrainedWidth: /*#__PURE__*/css(logicalCSS('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
|