@elastic/eui 93.5.2 → 93.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/accessibility/screen_reader_only/screen_reader_only.js +9 -8
- package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
- package/es/components/accessibility/skip_link/skip_link.js +2 -3
- package/es/components/aspect_ratio/aspect_ratio.js +16 -14
- package/es/components/avatar/avatar.js +41 -42
- package/es/components/avatar/avatar.styles.js +1 -1
- package/es/components/badge/badge.js +4 -4
- package/es/components/badge/badge_group/badge_group.js +3 -4
- package/es/components/badge/beta_badge/beta_badge.js +2 -3
- package/es/components/badge/notification_badge/badge_notification.js +3 -4
- package/es/components/bottom_bar/bottom_bar.js +8 -18
- package/es/components/bottom_bar/bottom_bar.styles.js +3 -2
- package/es/components/breadcrumbs/_breadcrumb_content.js +8 -11
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +17 -4
- package/es/components/breadcrumbs/breadcrumbs.js +4 -3
- package/es/components/button/button_display/_button_display_content.js +28 -30
- package/es/components/button/button_group/button_group_button.js +5 -6
- package/es/components/button/button_group/button_group_button.styles.js +21 -10
- package/es/components/call_out/call_out.js +45 -42
- package/es/components/call_out/call_out.styles.js +4 -4
- package/es/components/code/code_block_annotations.js +7 -6
- package/es/components/code/code_block_annotations.style.js +2 -1
- package/es/components/collapsible_nav/collapsible_nav.js +2 -3
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -4
- package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +2 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +2 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +2 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -4
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +2 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +2 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +2 -3
- package/es/components/color_picker/color_palette_picker/color_palette_picker.js +1 -0
- package/es/components/combo_box/combo_box.js +22 -16
- package/es/components/comment_list/comment_event.js +4 -5
- package/es/components/context_menu/context_menu.js +6 -7
- package/es/components/context_menu/context_menu_item.js +2 -3
- package/es/components/context_menu/context_menu_panel.js +5 -5
- package/es/components/description_list/description_list.js +14 -16
- package/es/components/description_list/description_list_description.js +2 -3
- package/es/components/description_list/description_list_title.js +2 -3
- package/es/components/empty_prompt/empty_prompt.js +2 -5
- package/es/components/flyout/_flyout_close_button.js +45 -0
- package/es/components/flyout/_flyout_close_button.styles.js +27 -0
- package/es/components/flyout/flyout.js +77 -64
- package/es/components/flyout/flyout.styles.js +3 -17
- package/es/components/flyout/flyout_body.js +5 -8
- package/es/components/flyout/flyout_body.styles.js +2 -1
- package/es/components/flyout/flyout_footer.js +3 -5
- package/es/components/flyout/flyout_header.js +2 -3
- package/es/components/flyout/flyout_resizable.js +2 -3
- package/es/components/form/super_select/super_select.js +33 -22
- package/es/components/form/super_select/super_select_control.js +39 -5
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -3
- package/es/components/horizontal_rule/horizontal_rule.js +3 -18
- package/es/components/loading/loading_chart.js +16 -21
- package/es/components/loading/loading_chart.styles.js +28 -10
- package/es/components/loading/loading_elastic.js +3 -5
- package/es/components/loading/loading_elastic.styles.js +2 -4
- package/es/components/loading/loading_logo.js +6 -9
- package/es/components/loading/loading_logo.styles.js +1 -6
- package/es/components/loading/loading_spinner.js +5 -5
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/resizable_container/resizable_collapse_button.js +1 -2
- package/es/components/tabs/tab.js +3 -4
- package/es/components/tabs/tabs.js +2 -3
- package/eui.d.ts +71 -57
- package/i18ntokens.json +82 -100
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.js +8 -7
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
- package/lib/components/accessibility/skip_link/skip_link.js +1 -2
- package/lib/components/aspect_ratio/aspect_ratio.js +18 -14
- package/lib/components/avatar/avatar.js +42 -41
- package/lib/components/avatar/avatar.styles.js +1 -1
- package/lib/components/badge/badge.js +3 -3
- package/lib/components/badge/badge_group/badge_group.js +2 -3
- package/lib/components/badge/beta_badge/beta_badge.js +1 -2
- package/lib/components/badge/notification_badge/badge_notification.js +2 -3
- package/lib/components/bottom_bar/bottom_bar.js +10 -20
- package/lib/components/bottom_bar/bottom_bar.styles.js +3 -2
- package/lib/components/breadcrumbs/_breadcrumb_content.js +8 -11
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +16 -3
- package/lib/components/breadcrumbs/breadcrumbs.js +4 -3
- package/lib/components/button/button_display/_button_display_content.js +30 -29
- package/lib/components/button/button_group/button_group_button.js +3 -4
- package/lib/components/button/button_group/button_group_button.styles.js +22 -12
- package/lib/components/call_out/call_out.js +43 -40
- package/lib/components/call_out/call_out.styles.js +6 -6
- package/lib/components/code/code_block_annotations.js +6 -5
- package/lib/components/code/code_block_annotations.style.js +2 -1
- package/lib/components/collapsible_nav/collapsible_nav.js +1 -2
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
- package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +1 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +1 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -3
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +1 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +1 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +1 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +1 -2
- package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +1 -0
- package/lib/components/combo_box/combo_box.js +22 -16
- package/lib/components/comment_list/comment_event.js +3 -4
- package/lib/components/context_menu/context_menu.js +5 -6
- package/lib/components/context_menu/context_menu_item.js +1 -2
- package/lib/components/context_menu/context_menu_panel.js +4 -4
- package/lib/components/description_list/description_list.js +13 -15
- package/lib/components/description_list/description_list_description.js +1 -2
- package/lib/components/description_list/description_list_title.js +1 -2
- package/lib/components/empty_prompt/empty_prompt.js +1 -4
- package/lib/components/flyout/_flyout_close_button.js +52 -0
- package/lib/components/flyout/_flyout_close_button.styles.js +34 -0
- package/lib/components/flyout/flyout.js +76 -63
- package/lib/components/flyout/flyout.styles.js +5 -19
- package/lib/components/flyout/flyout_body.js +4 -7
- package/lib/components/flyout/flyout_body.styles.js +2 -1
- package/lib/components/flyout/flyout_footer.js +2 -4
- package/lib/components/flyout/flyout_header.js +1 -2
- package/lib/components/flyout/flyout_resizable.js +1 -2
- package/lib/components/form/super_select/super_select.js +32 -21
- package/lib/components/form/super_select/super_select_control.js +38 -4
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -3
- package/lib/components/horizontal_rule/horizontal_rule.js +2 -17
- package/lib/components/loading/loading_chart.js +14 -19
- package/lib/components/loading/loading_chart.styles.js +28 -10
- package/lib/components/loading/loading_elastic.js +2 -4
- package/lib/components/loading/loading_elastic.styles.js +2 -4
- package/lib/components/loading/loading_logo.js +5 -8
- package/lib/components/loading/loading_logo.styles.js +3 -9
- package/lib/components/loading/loading_spinner.js +5 -5
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/resizable_container/resizable_collapse_button.js +1 -2
- package/lib/components/tabs/tab.js +2 -3
- package/lib/components/tabs/tabs.js +1 -2
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.js +8 -7
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
- package/optimize/es/components/accessibility/skip_link/skip_link.js +2 -3
- package/optimize/es/components/aspect_ratio/aspect_ratio.js +16 -14
- package/optimize/es/components/avatar/avatar.js +39 -40
- package/optimize/es/components/avatar/avatar.styles.js +1 -1
- package/optimize/es/components/badge/badge.js +4 -4
- package/optimize/es/components/badge/badge_group/badge_group.js +3 -4
- package/optimize/es/components/badge/beta_badge/beta_badge.js +2 -3
- package/optimize/es/components/badge/notification_badge/badge_notification.js +3 -4
- package/optimize/es/components/bottom_bar/bottom_bar.js +6 -16
- package/optimize/es/components/bottom_bar/bottom_bar.styles.js +3 -2
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +7 -10
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +17 -4
- package/optimize/es/components/button/button_display/_button_display_content.js +28 -30
- package/optimize/es/components/button/button_group/button_group_button.js +5 -6
- package/optimize/es/components/button/button_group/button_group_button.styles.js +13 -10
- package/optimize/es/components/call_out/call_out.js +45 -42
- package/optimize/es/components/call_out/call_out.styles.js +4 -4
- package/optimize/es/components/code/code_block_annotations.js +7 -6
- package/optimize/es/components/code/code_block_annotations.style.js +2 -1
- package/optimize/es/components/collapsible_nav/collapsible_nav.js +2 -3
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -4
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +2 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +2 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +2 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -4
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +2 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +2 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +2 -3
- package/optimize/es/components/combo_box/combo_box.js +22 -16
- package/optimize/es/components/comment_list/comment_event.js +4 -5
- package/optimize/es/components/context_menu/context_menu.js +6 -7
- package/optimize/es/components/context_menu/context_menu_item.js +2 -3
- package/optimize/es/components/context_menu/context_menu_panel.js +5 -5
- package/optimize/es/components/description_list/description_list.js +14 -16
- package/optimize/es/components/description_list/description_list_description.js +2 -3
- package/optimize/es/components/description_list/description_list_title.js +2 -3
- package/optimize/es/components/empty_prompt/empty_prompt.js +2 -5
- package/optimize/es/components/flyout/_flyout_close_button.js +44 -0
- package/optimize/es/components/flyout/_flyout_close_button.styles.js +27 -0
- package/optimize/es/components/flyout/flyout.js +57 -64
- package/optimize/es/components/flyout/flyout.styles.js +3 -17
- package/optimize/es/components/flyout/flyout_body.js +5 -8
- package/optimize/es/components/flyout/flyout_body.styles.js +2 -1
- package/optimize/es/components/flyout/flyout_footer.js +3 -5
- package/optimize/es/components/flyout/flyout_header.js +2 -3
- package/optimize/es/components/flyout/flyout_resizable.js +2 -3
- package/optimize/es/components/form/super_select/super_select.js +32 -22
- package/optimize/es/components/form/super_select/super_select_control.js +34 -5
- package/optimize/es/components/horizontal_rule/horizontal_rule.js +3 -15
- package/optimize/es/components/loading/loading_chart.js +16 -21
- package/optimize/es/components/loading/loading_chart.styles.js +28 -10
- package/optimize/es/components/loading/loading_elastic.js +3 -5
- package/optimize/es/components/loading/loading_elastic.styles.js +2 -4
- package/optimize/es/components/loading/loading_logo.js +6 -9
- package/optimize/es/components/loading/loading_logo.styles.js +1 -6
- package/optimize/es/components/loading/loading_spinner.js +5 -5
- package/optimize/es/components/resizable_container/resizable_collapse_button.js +1 -2
- package/optimize/es/components/tabs/tab.js +3 -4
- package/optimize/es/components/tabs/tabs.js +2 -3
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.js +7 -6
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +1 -2
- package/optimize/lib/components/aspect_ratio/aspect_ratio.js +19 -14
- package/optimize/lib/components/avatar/avatar.js +41 -39
- package/optimize/lib/components/avatar/avatar.styles.js +1 -1
- package/optimize/lib/components/badge/badge.js +3 -3
- package/optimize/lib/components/badge/badge_group/badge_group.js +2 -3
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -2
- package/optimize/lib/components/badge/notification_badge/badge_notification.js +2 -3
- package/optimize/lib/components/bottom_bar/bottom_bar.js +8 -18
- package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +3 -2
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +7 -10
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +16 -3
- package/optimize/lib/components/button/button_display/_button_display_content.js +30 -29
- package/optimize/lib/components/button/button_group/button_group_button.js +3 -4
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +15 -12
- package/optimize/lib/components/call_out/call_out.js +43 -40
- package/optimize/lib/components/call_out/call_out.styles.js +6 -6
- package/optimize/lib/components/code/code_block_annotations.js +6 -5
- package/optimize/lib/components/code/code_block_annotations.style.js +2 -1
- package/optimize/lib/components/collapsible_nav/collapsible_nav.js +1 -2
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +1 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +1 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -3
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +1 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +1 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +1 -2
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +1 -2
- package/optimize/lib/components/combo_box/combo_box.js +22 -16
- package/optimize/lib/components/comment_list/comment_event.js +3 -4
- package/optimize/lib/components/context_menu/context_menu.js +5 -6
- package/optimize/lib/components/context_menu/context_menu_item.js +1 -2
- package/optimize/lib/components/context_menu/context_menu_panel.js +4 -4
- package/optimize/lib/components/description_list/description_list.js +13 -15
- package/optimize/lib/components/description_list/description_list_description.js +1 -2
- package/optimize/lib/components/description_list/description_list_title.js +1 -2
- package/optimize/lib/components/empty_prompt/empty_prompt.js +1 -4
- package/optimize/lib/components/flyout/_flyout_close_button.js +51 -0
- package/optimize/lib/components/flyout/_flyout_close_button.styles.js +34 -0
- package/optimize/lib/components/flyout/flyout.js +55 -62
- package/optimize/lib/components/flyout/flyout.styles.js +5 -19
- package/optimize/lib/components/flyout/flyout_body.js +4 -7
- package/optimize/lib/components/flyout/flyout_body.styles.js +2 -1
- package/optimize/lib/components/flyout/flyout_footer.js +2 -4
- package/optimize/lib/components/flyout/flyout_header.js +1 -2
- package/optimize/lib/components/flyout/flyout_resizable.js +1 -2
- package/optimize/lib/components/form/super_select/super_select.js +31 -21
- package/optimize/lib/components/form/super_select/super_select_control.js +33 -4
- package/optimize/lib/components/horizontal_rule/horizontal_rule.js +2 -14
- package/optimize/lib/components/loading/loading_chart.js +14 -19
- package/optimize/lib/components/loading/loading_chart.styles.js +28 -10
- package/optimize/lib/components/loading/loading_elastic.js +2 -4
- package/optimize/lib/components/loading/loading_elastic.styles.js +2 -4
- package/optimize/lib/components/loading/loading_logo.js +5 -8
- package/optimize/lib/components/loading/loading_logo.styles.js +3 -9
- package/optimize/lib/components/loading/loading_spinner.js +5 -5
- package/optimize/lib/components/resizable_container/resizable_collapse_button.js +1 -2
- package/optimize/lib/components/tabs/tab.js +2 -3
- package/optimize/lib/components/tabs/tabs.js +1 -2
- package/package.json +1 -1
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.js +8 -7
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
- package/test-env/components/accessibility/skip_link/skip_link.js +1 -2
- package/test-env/components/aspect_ratio/aspect_ratio.js +19 -14
- package/test-env/components/avatar/avatar.js +41 -39
- package/test-env/components/avatar/avatar.styles.js +1 -1
- package/test-env/components/badge/badge.js +3 -3
- package/test-env/components/badge/badge_group/badge_group.js +2 -3
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -2
- package/test-env/components/badge/notification_badge/badge_notification.js +2 -3
- package/test-env/components/bottom_bar/bottom_bar.js +10 -20
- package/test-env/components/bottom_bar/bottom_bar.styles.js +3 -2
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +8 -11
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +16 -3
- package/test-env/components/breadcrumbs/breadcrumbs.js +4 -3
- package/test-env/components/button/button_display/_button_display_content.js +30 -29
- package/test-env/components/button/button_group/button_group_button.js +3 -4
- package/test-env/components/button/button_group/button_group_button.styles.js +15 -12
- package/test-env/components/call_out/call_out.js +43 -40
- package/test-env/components/call_out/call_out.styles.js +6 -6
- package/test-env/components/code/code_block_annotations.js +6 -5
- package/test-env/components/code/code_block_annotations.style.js +2 -1
- package/test-env/components/collapsible_nav/collapsible_nav.js +1 -2
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +1 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +1 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +1 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +1 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +1 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +1 -2
- package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +1 -0
- package/test-env/components/combo_box/combo_box.js +22 -16
- package/test-env/components/comment_list/comment_event.js +3 -4
- package/test-env/components/context_menu/context_menu.js +5 -6
- package/test-env/components/context_menu/context_menu_item.js +1 -2
- package/test-env/components/context_menu/context_menu_panel.js +4 -4
- package/test-env/components/description_list/description_list.js +13 -15
- package/test-env/components/description_list/description_list_description.js +1 -2
- package/test-env/components/description_list/description_list_title.js +1 -2
- package/test-env/components/empty_prompt/empty_prompt.js +1 -4
- package/test-env/components/flyout/_flyout_close_button.js +51 -0
- package/test-env/components/flyout/_flyout_close_button.styles.js +34 -0
- package/test-env/components/flyout/flyout.styles.js +5 -19
- package/test-env/components/flyout/flyout_body.js +4 -7
- package/test-env/components/flyout/flyout_body.styles.js +2 -1
- package/test-env/components/flyout/flyout_footer.js +2 -4
- package/test-env/components/flyout/flyout_header.js +1 -2
- package/test-env/components/flyout/flyout_resizable.js +1 -2
- package/test-env/components/form/super_select/super_select.js +32 -21
- package/test-env/components/form/super_select/super_select_control.js +33 -4
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -3
- package/test-env/components/horizontal_rule/horizontal_rule.js +2 -14
- package/test-env/components/loading/loading_chart.js +14 -19
- package/test-env/components/loading/loading_chart.styles.js +28 -10
- package/test-env/components/loading/loading_elastic.js +2 -4
- package/test-env/components/loading/loading_elastic.styles.js +2 -4
- package/test-env/components/loading/loading_logo.js +5 -8
- package/test-env/components/loading/loading_logo.styles.js +3 -9
- package/test-env/components/loading/loading_spinner.js +5 -5
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/resizable_container/resizable_collapse_button.js +1 -2
- package/test-env/components/tabs/tab.js +2 -3
- package/test-env/components/tabs/tabs.js +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
@@ -16,16 +16,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
16
16
|
|
|
17
17
|
import React, { useEffect, useRef, useMemo, useCallback, useState, forwardRef } from 'react';
|
|
18
18
|
import classnames from 'classnames';
|
|
19
|
-
import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint,
|
|
19
|
+
import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint, useEuiMemoizedStyles, useGeneratedHtmlId } from '../../services';
|
|
20
20
|
import { logicalStyle } from '../../global_styling';
|
|
21
21
|
import { EuiFocusTrap } from '../focus_trap';
|
|
22
22
|
import { EuiOverlayMask } from '../overlay_mask';
|
|
23
|
-
import { EuiButtonIcon } from '../button';
|
|
24
23
|
import { EuiI18n } from '../i18n';
|
|
25
24
|
import { useResizeObserver } from '../observer/resize_observer';
|
|
26
25
|
import { EuiPortal } from '../portal';
|
|
27
26
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
28
|
-
import {
|
|
27
|
+
import { EuiFlyoutCloseButton } from './_flyout_close_button';
|
|
28
|
+
import { euiFlyoutStyles } from './flyout.styles';
|
|
29
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
30
30
|
export var TYPES = ['push', 'overlay'];
|
|
31
31
|
export var SIDES = ['left', 'right'];
|
|
@@ -131,36 +131,9 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
131
131
|
var maxWidthStyle = typeof maxWidth !== 'boolean' && logicalStyle('max-width', maxWidth);
|
|
132
132
|
return _objectSpread(_objectSpread(_objectSpread({}, style), widthStyle), maxWidthStyle);
|
|
133
133
|
}, [style, maxWidth, size]);
|
|
134
|
-
var
|
|
135
|
-
var styles = euiFlyoutStyles(euiTheme);
|
|
134
|
+
var styles = useEuiMemoizedStyles(euiFlyoutStyles);
|
|
136
135
|
var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, isPushed ? styles.push.push : styles.overlay, isPushed && styles.push[side], isPushed && !pushAnimation && styles.push.noAnimation, styles[side]];
|
|
137
136
|
var classes = classnames('euiFlyout', className);
|
|
138
|
-
var closeButton = useMemo(function () {
|
|
139
|
-
if (hideCloseButton || !onClose) return null;
|
|
140
|
-
var closeButtonClasses = classnames('euiFlyout__closeButton', closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.className);
|
|
141
|
-
var closeButtonStyles = euiFlyoutCloseButtonStyles(euiTheme);
|
|
142
|
-
var closeButtonCssStyles = [closeButtonStyles.euiFlyout__closeButton, closeButtonStyles[closeButtonPosition], closeButtonPosition === 'outside' && closeButtonStyles.outsideSide[side], closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.css];
|
|
143
|
-
return ___EmotionJSX(EuiI18n, {
|
|
144
|
-
token: "euiFlyout.closeAriaLabel",
|
|
145
|
-
default: "Close this dialog"
|
|
146
|
-
}, function (closeAriaLabel) {
|
|
147
|
-
return ___EmotionJSX(EuiButtonIcon, _extends({
|
|
148
|
-
display: closeButtonPosition === 'outside' ? 'fill' : 'empty',
|
|
149
|
-
iconType: "cross",
|
|
150
|
-
color: "text",
|
|
151
|
-
"aria-label": closeAriaLabel,
|
|
152
|
-
"data-test-subj": "euiFlyoutCloseButton"
|
|
153
|
-
}, closeButtonProps, {
|
|
154
|
-
className: closeButtonClasses,
|
|
155
|
-
css: closeButtonCssStyles,
|
|
156
|
-
onClick: function onClick(e) {
|
|
157
|
-
var _closeButtonProps$onC;
|
|
158
|
-
onClose(e.nativeEvent);
|
|
159
|
-
closeButtonProps === null || closeButtonProps === void 0 ? void 0 : (_closeButtonProps$onC = closeButtonProps.onClick) === null || _closeButtonProps$onC === void 0 ? void 0 : _closeButtonProps$onC.call(closeButtonProps, e);
|
|
160
|
-
}
|
|
161
|
-
}));
|
|
162
|
-
});
|
|
163
|
-
}, [onClose, hideCloseButton, closeButtonPosition, closeButtonProps, side, euiTheme]);
|
|
164
137
|
|
|
165
138
|
/*
|
|
166
139
|
* If not disabled, automatically add fixed EuiHeaders as shards
|
|
@@ -202,18 +175,20 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
202
175
|
var hasOverlayMask = ownFocus && !isPushed;
|
|
203
176
|
var descriptionId = useGeneratedHtmlId();
|
|
204
177
|
var ariaDescribedBy = classnames(descriptionId, _ariaDescribedBy);
|
|
205
|
-
var screenReaderDescription =
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
178
|
+
var screenReaderDescription = useMemo(function () {
|
|
179
|
+
return ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
180
|
+
id: descriptionId
|
|
181
|
+
}, hasOverlayMask ? ___EmotionJSX(EuiI18n, {
|
|
182
|
+
token: "euiFlyout.screenReaderModalDialog",
|
|
183
|
+
default: "You are in a modal dialog. Press Escape or tap/click outside the dialog on the shadowed overlay to close."
|
|
184
|
+
}) : ___EmotionJSX(EuiI18n, {
|
|
185
|
+
token: "euiFlyout.screenReaderNonModalDialog",
|
|
186
|
+
default: "You are in a non-modal dialog. To close the dialog, press Escape."
|
|
187
|
+
}), ' ', fixedHeaders.length > 0 && ___EmotionJSX(EuiI18n, {
|
|
188
|
+
token: "euiFlyout.screenReaderFixedHeaders",
|
|
189
|
+
default: "You can still continue tabbing through the page headers in addition to the dialog."
|
|
190
|
+
})));
|
|
191
|
+
}, [hasOverlayMask, descriptionId, fixedHeaders.length]);
|
|
217
192
|
|
|
218
193
|
/*
|
|
219
194
|
* Trap focus even when `ownFocus={false}`, otherwise closing
|
|
@@ -240,7 +215,16 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
240
215
|
// Otherwise if ownFocus is false and outsideClickCloses is undefined, outside clicks should not close the flyout
|
|
241
216
|
return undefined;
|
|
242
217
|
}, [onClose, hasOverlayMask, outsideClickCloses]);
|
|
243
|
-
|
|
218
|
+
return ___EmotionJSX(EuiFlyoutWrapper, {
|
|
219
|
+
hasOverlayMask: hasOverlayMask,
|
|
220
|
+
maskProps: _objectSpread(_objectSpread({}, maskProps), {}, {
|
|
221
|
+
maskRef: useCombinedRefs([maskProps === null || maskProps === void 0 ? void 0 : maskProps.maskRef, maskRef])
|
|
222
|
+
}),
|
|
223
|
+
isPortalled: !isPushed
|
|
224
|
+
}, ___EmotionJSX(EuiWindowEvent, {
|
|
225
|
+
event: "keydown",
|
|
226
|
+
handler: onKeyDown
|
|
227
|
+
}), ___EmotionJSX(EuiFocusTrap, _extends({
|
|
244
228
|
disabled: isPushed,
|
|
245
229
|
scrollLock: hasOverlayMask,
|
|
246
230
|
clickOutsideDisables: !ownFocus,
|
|
@@ -255,28 +239,37 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
255
239
|
tabIndex: !isPushed ? 0 : rest.tabIndex,
|
|
256
240
|
"aria-describedby": !isPushed ? ariaDescribedBy : _ariaDescribedBy,
|
|
257
241
|
"data-autofocus": !isPushed || undefined
|
|
258
|
-
}), !isPushed && screenReaderDescription,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
});
|
|
264
|
-
if (hasOverlayMask) {
|
|
265
|
-
flyout = ___EmotionJSX(EuiOverlayMask, _extends({
|
|
266
|
-
headerZindexLocation: "below"
|
|
267
|
-
}, mergedMaskProps), flyout);
|
|
268
|
-
} else if (!isPushed) {
|
|
269
|
-
// Otherwise still wrap within an EuiPortal so it appends (unless it is the push style)
|
|
270
|
-
flyout = ___EmotionJSX(EuiPortal, null, flyout);
|
|
271
|
-
}
|
|
272
|
-
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiWindowEvent, {
|
|
273
|
-
event: "keydown",
|
|
274
|
-
handler: onKeyDown
|
|
275
|
-
}), flyout);
|
|
242
|
+
}), !isPushed && screenReaderDescription, !hideCloseButton && onClose && ___EmotionJSX(EuiFlyoutCloseButton, _extends({}, closeButtonProps, {
|
|
243
|
+
onClose: onClose,
|
|
244
|
+
closeButtonPosition: closeButtonPosition,
|
|
245
|
+
side: side
|
|
246
|
+
})), children)));
|
|
276
247
|
}
|
|
277
248
|
// React.forwardRef interferes with the inferred element type
|
|
278
249
|
// Casting to ensure correct element prop type checking for `as`
|
|
279
250
|
// e.g., `href` is not on a `div`
|
|
280
251
|
);
|
|
281
252
|
// Recast to allow `displayName`
|
|
282
|
-
EuiFlyout.displayName = 'EuiFlyout';
|
|
253
|
+
EuiFlyout.displayName = 'EuiFlyout';
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Light wrapper for conditionally rendering portals or overlay masks:
|
|
257
|
+
* - If ownFocus is set, wrap with an overlay and allow the user to click it to close it.
|
|
258
|
+
* - Otherwise still wrap within an EuiPortal so it appends to the bottom of the window.
|
|
259
|
+
* Push flyouts have no overlay OR portal behavior.
|
|
260
|
+
*/
|
|
261
|
+
var EuiFlyoutWrapper = function EuiFlyoutWrapper(_ref2) {
|
|
262
|
+
var children = _ref2.children,
|
|
263
|
+
hasOverlayMask = _ref2.hasOverlayMask,
|
|
264
|
+
maskProps = _ref2.maskProps,
|
|
265
|
+
isPortalled = _ref2.isPortalled;
|
|
266
|
+
if (hasOverlayMask) {
|
|
267
|
+
return ___EmotionJSX(EuiOverlayMask, _extends({
|
|
268
|
+
headerZindexLocation: "below"
|
|
269
|
+
}, maskProps), children);
|
|
270
|
+
} else if (isPortalled) {
|
|
271
|
+
return ___EmotionJSX(EuiPortal, null, children);
|
|
272
|
+
} else {
|
|
273
|
+
return ___EmotionJSX(React.Fragment, null, children);
|
|
274
|
+
}
|
|
275
|
+
};
|
|
@@ -12,24 +12,10 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
12
12
|
import { css, keyframes } from '@emotion/react';
|
|
13
13
|
import { euiCanAnimate, euiMaxBreakpoint, euiMinBreakpoint, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
14
14
|
import { euiShadowXLarge } from '../../themes/amsterdam/global_styling/mixins';
|
|
15
|
-
import { transparentize } from '../../services/color';
|
|
16
15
|
import { euiFormVariables } from '../form/form.styles';
|
|
16
|
+
export var FLYOUT_BREAKPOINT = 'm';
|
|
17
17
|
export var euiFlyoutSlideInRight = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
|
|
18
18
|
export var euiFlyoutSlideInLeft = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
|
|
19
|
-
export var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
|
|
20
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
21
|
-
return {
|
|
22
|
-
euiFlyout__closeButton: /*#__PURE__*/css("position:absolute;", logicalCSS('right', euiTheme.size.s), " ", logicalCSS('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
|
|
23
|
-
inside: /*#__PURE__*/css("background-color:", transparentize(euiTheme.colors.emptyShade, 0.9), ";;label:inside;"),
|
|
24
|
-
outside: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), "animation:none!important;;label:outside;"),
|
|
25
|
-
outsideSide: {
|
|
26
|
-
// `transforms` pull in close buttons a little
|
|
27
|
-
// `!important` is necessary here to override the hover/focus transitions of buttons
|
|
28
|
-
right: /*#__PURE__*/css(logicalCSS('left', 0), " ", euiMaxBreakpoint(euiThemeContext, 'm'), "{transform:translateX(calc(-100% - ", euiTheme.size.xs, "))!important;}", euiMinBreakpoint(euiThemeContext, 'm'), "{transform:translateX(calc(-100% - ", euiTheme.size.l, "))!important;};label:right;"),
|
|
29
|
-
left: /*#__PURE__*/css(logicalCSS('right', 0), " ", euiMaxBreakpoint(euiThemeContext, 'm'), "{transform:translateX(calc(100% + ", euiTheme.size.xs, "))!important;}", euiMinBreakpoint(euiThemeContext, 'm'), "{transform:translateX(calc(100% + ", euiTheme.size.l, "))!important;};label:left;")
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
19
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
34
20
|
name: "yokctr-noAnimation",
|
|
35
21
|
styles: "animation-duration:0s!important;label:noAnimation;"
|
|
@@ -41,7 +27,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
41
27
|
export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
|
|
42
28
|
var euiTheme = euiThemeContext.euiTheme;
|
|
43
29
|
return {
|
|
44
|
-
euiFlyout: /*#__PURE__*/css("position:fixed;", logicalCSS('bottom', 0), " ", logicalCSS('top', 'var(--euiFixedHeadersOffset, 0)'), " ", logicalCSS('height', 'inherit'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", euiMaxBreakpoint(euiThemeContext,
|
|
30
|
+
euiFlyout: /*#__PURE__*/css("position:fixed;", logicalCSS('bottom', 0), " ", logicalCSS('top', 'var(--euiFixedHeadersOffset, 0)'), " ", logicalCSS('height', 'inherit'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", euiMaxBreakpoint(euiThemeContext, FLYOUT_BREAKPOINT), "{", logicalCSS('max-width', '90vw !important'), ";};label:euiFlyout;"),
|
|
45
31
|
// Flyout sizes
|
|
46
32
|
s: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 's'), ";;label:s;"),
|
|
47
33
|
m: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 'm'), ";;label:m;"),
|
|
@@ -95,7 +81,7 @@ var composeFlyoutSizing = function composeFlyoutSizing(euiThemeContext, size) {
|
|
|
95
81
|
max: "".concat(euiTheme.breakpoint.l, "px")
|
|
96
82
|
}
|
|
97
83
|
};
|
|
98
|
-
return "\n ".concat(logicalCSS('max-width', flyoutSizes[size].max), "\n\n ").concat(euiMaxBreakpoint(euiThemeContext,
|
|
84
|
+
return "\n ".concat(logicalCSS('max-width', flyoutSizes[size].max), "\n\n ").concat(euiMaxBreakpoint(euiThemeContext, FLYOUT_BREAKPOINT), " {\n ").concat(logicalCSS('min-width', 0), "\n ").concat(logicalCSS('width', flyoutSizes[size].min), "\n }\n ").concat(euiMinBreakpoint(euiThemeContext, FLYOUT_BREAKPOINT), " {\n ").concat(logicalCSS('min-width', flyoutSizes[size].min), "\n ").concat(logicalCSS('width', flyoutSizes[size].width), "\n }\n ");
|
|
99
85
|
};
|
|
100
86
|
var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddingSize) {
|
|
101
87
|
var euiTheme = euiThemeContext.euiTheme;
|
|
@@ -11,7 +11,7 @@ var _excluded = ["children", "className", "banner", "scrollableTabIndex"];
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { euiFlyoutBodyStyles } from './flyout_body.styles';
|
|
16
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
17
|
export var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
|
|
@@ -22,21 +22,18 @@ export var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
|
|
|
22
22
|
scrollableTabIndex = _ref$scrollableTabInd === void 0 ? 0 : _ref$scrollableTabInd,
|
|
23
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
24
|
var classes = classNames('euiFlyoutBody', className);
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var cssStyles = [styles.euiFlyoutBody];
|
|
28
|
-
var bannerCssStyles = [banner && styles.euiFlyoutBody__banner];
|
|
29
|
-
var overflowCssStyles = [banner ? styles.euiFlyoutBody__overflow.hasBanner : styles.euiFlyoutBody__overflow.noBanner];
|
|
25
|
+
var styles = useEuiMemoizedStyles(euiFlyoutBodyStyles);
|
|
26
|
+
var overflowCssStyles = [styles.overflow.euiFlyoutBody__overflow, banner ? styles.overflow.hasBanner : styles.overflow.noBanner];
|
|
30
27
|
return ___EmotionJSX("div", _extends({
|
|
31
28
|
className: classes,
|
|
32
|
-
css:
|
|
29
|
+
css: styles.euiFlyoutBody
|
|
33
30
|
}, rest), ___EmotionJSX("div", {
|
|
34
31
|
tabIndex: scrollableTabIndex,
|
|
35
32
|
className: "euiFlyoutBody__overflow",
|
|
36
33
|
css: overflowCssStyles
|
|
37
34
|
}, banner && ___EmotionJSX("div", {
|
|
38
35
|
className: "euiFlyoutBody__banner",
|
|
39
|
-
css:
|
|
36
|
+
css: styles.euiFlyoutBody__banner
|
|
40
37
|
}, banner), ___EmotionJSX("div", {
|
|
41
38
|
className: "euiFlyoutBody__overflowContent"
|
|
42
39
|
}, children)));
|
|
@@ -11,7 +11,8 @@ import { logicalCSS, logicalCSSWithFallback, euiYScrollWithShadows } from '../..
|
|
|
11
11
|
export var euiFlyoutBodyStyles = function euiFlyoutBodyStyles(euiThemeContext) {
|
|
12
12
|
return {
|
|
13
13
|
euiFlyoutBody: /*#__PURE__*/css(logicalCSSWithFallback('overflow-y', 'hidden'), " ", logicalCSS('height', '100%'), ";;label:euiFlyoutBody;"),
|
|
14
|
-
|
|
14
|
+
overflow: {
|
|
15
|
+
euiFlyoutBody__overflow: /*#__PURE__*/css(";label:euiFlyoutBody__overflow;"),
|
|
15
16
|
noBanner: /*#__PURE__*/css(euiYScrollWithShadows(euiThemeContext), ";;label:noBanner;"),
|
|
16
17
|
hasBanner: /*#__PURE__*/css(euiYScrollWithShadows(euiThemeContext, {
|
|
17
18
|
side: 'end'
|
|
@@ -11,7 +11,7 @@ var _excluded = ["children", "className"];
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { euiFlyoutFooterStyles } from './flyout_footer.styles';
|
|
16
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
17
|
export var EuiFlyoutFooter = function EuiFlyoutFooter(_ref) {
|
|
@@ -19,11 +19,9 @@ export var EuiFlyoutFooter = function EuiFlyoutFooter(_ref) {
|
|
|
19
19
|
className = _ref.className,
|
|
20
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
21
|
var classes = classNames('euiFlyoutFooter', className);
|
|
22
|
-
var
|
|
23
|
-
var styles = euiFlyoutFooterStyles(euiTheme);
|
|
24
|
-
var cssStyles = [styles.euiFlyoutFooter];
|
|
22
|
+
var styles = useEuiMemoizedStyles(euiFlyoutFooterStyles);
|
|
25
23
|
return ___EmotionJSX("div", _extends({
|
|
26
24
|
className: classes,
|
|
27
|
-
css:
|
|
25
|
+
css: styles.euiFlyoutFooter
|
|
28
26
|
}, rest), children);
|
|
29
27
|
};
|
|
@@ -11,7 +11,7 @@ var _excluded = ["children", "className", "hasBorder"];
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { euiFlyoutHeaderStyles } from './flyout_header.styles';
|
|
16
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
17
|
export var EuiFlyoutHeader = function EuiFlyoutHeader(_ref) {
|
|
@@ -21,8 +21,7 @@ export var EuiFlyoutHeader = function EuiFlyoutHeader(_ref) {
|
|
|
21
21
|
hasBorder = _ref$hasBorder === void 0 ? false : _ref$hasBorder,
|
|
22
22
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
23
|
var classes = classNames('euiFlyoutHeader', className);
|
|
24
|
-
var
|
|
25
|
-
var styles = euiFlyoutHeaderStyles(euiTheme);
|
|
24
|
+
var styles = useEuiMemoizedStyles(euiFlyoutHeaderStyles);
|
|
26
25
|
var cssStyles = [styles.euiFlyoutHeader, hasBorder && styles.hasBorder];
|
|
27
26
|
return ___EmotionJSX("div", _extends({
|
|
28
27
|
className: classes,
|
|
@@ -11,7 +11,7 @@ var _excluded = ["size", "maxWidth", "minWidth", "onResize", "side", "type", "ch
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import React, { forwardRef, useState, useEffect, useRef, useMemo, useCallback } from 'react';
|
|
14
|
-
import { keys, useCombinedRefs,
|
|
14
|
+
import { keys, useCombinedRefs, useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { EuiResizableButton } from '../resizable_container';
|
|
16
16
|
import { getPosition } from '../resizable_container/helpers';
|
|
17
17
|
import { EuiFlyout } from './flyout';
|
|
@@ -29,8 +29,7 @@ export var EuiFlyoutResizable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
29
29
|
type = _ref$type === void 0 ? 'overlay' : _ref$type,
|
|
30
30
|
children = _ref.children,
|
|
31
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
var
|
|
33
|
-
var styles = euiFlyoutResizableButtonStyles(euiTheme);
|
|
32
|
+
var styles = useEuiMemoizedStyles(euiFlyoutResizableButtonStyles);
|
|
34
33
|
var cssStyles = [styles.euiFlyoutResizableButton, styles[type][side]];
|
|
35
34
|
var getFlyoutMinMaxWidth = useCallback(function (width) {
|
|
36
35
|
return Math.min(Math.max(width, minWidth), maxWidth || Infinity, window.innerWidth - 20 // Leave some offset
|
|
@@ -19,7 +19,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
19
19
|
* Side Public License, v 1.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import React, { Component } from 'react';
|
|
22
|
+
import React, { Component, createRef } from 'react';
|
|
23
23
|
import classNames from 'classnames';
|
|
24
24
|
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
25
25
|
import { htmlIdGenerator, keys } from '../../../services';
|
|
@@ -45,6 +45,7 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
45
45
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
46
46
|
_defineProperty(_assertThisInitialized(_this), "itemNodes", []);
|
|
47
47
|
_defineProperty(_assertThisInitialized(_this), "_isMounted", false);
|
|
48
|
+
_defineProperty(_assertThisInitialized(_this), "controlButtonRef", /*#__PURE__*/createRef());
|
|
48
49
|
_defineProperty(_assertThisInitialized(_this), "describedById", htmlIdGenerator('euiSuperSelect_')('_screenreaderDescribeId'));
|
|
49
50
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
50
51
|
isPopoverOpen: _this.props.isOpen || false
|
|
@@ -66,18 +67,10 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
66
67
|
if (!_this._isMounted) {
|
|
67
68
|
return;
|
|
68
69
|
}
|
|
69
|
-
if (_this.props.valueOfSelected != null) {
|
|
70
|
-
|
|
71
|
-
_this.focusItemAt(indexOfSelected);
|
|
72
|
-
} else {
|
|
73
|
-
focusSelected();
|
|
74
|
-
}
|
|
70
|
+
if (_this.props.valueOfSelected != null && indexOfSelected != null) {
|
|
71
|
+
_this.focusItemAt(indexOfSelected);
|
|
75
72
|
} else {
|
|
76
|
-
|
|
77
|
-
var disabled = _ref.disabled;
|
|
78
|
-
return disabled !== true;
|
|
79
|
-
});
|
|
80
|
-
_this.focusItemAt(firstFocusableOption);
|
|
73
|
+
_this.focusItemAt(0);
|
|
81
74
|
}
|
|
82
75
|
if (_this.props.onFocus) {
|
|
83
76
|
_this.props.onFocus();
|
|
@@ -90,6 +83,12 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
90
83
|
_this.setState({
|
|
91
84
|
isPopoverOpen: false
|
|
92
85
|
});
|
|
86
|
+
|
|
87
|
+
// Refocus back to the toggling control button on popover close
|
|
88
|
+
requestAnimationFrame(function () {
|
|
89
|
+
var _this$controlButtonRe;
|
|
90
|
+
(_this$controlButtonRe = _this.controlButtonRef.current) === null || _this$controlButtonRe === void 0 ? void 0 : _this$controlButtonRe.focus();
|
|
91
|
+
});
|
|
93
92
|
if (_this.props.onBlur) {
|
|
94
93
|
_this.props.onBlur();
|
|
95
94
|
}
|
|
@@ -101,7 +100,8 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
101
100
|
}
|
|
102
101
|
});
|
|
103
102
|
_defineProperty(_assertThisInitialized(_this), "onSelectKeyDown", function (event) {
|
|
104
|
-
|
|
103
|
+
// Mimic the ways native `<select>`s can be opened via keypress
|
|
104
|
+
if (event.key === keys.ARROW_UP || event.key === keys.ARROW_DOWN || event.key === keys.SPACE) {
|
|
105
105
|
event.preventDefault();
|
|
106
106
|
event.stopPropagation();
|
|
107
107
|
_this.openPopover();
|
|
@@ -116,9 +116,10 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
116
116
|
_this.closePopover();
|
|
117
117
|
break;
|
|
118
118
|
case keys.TAB:
|
|
119
|
-
//
|
|
119
|
+
// Mimic native `<select>` behavior, which selects an item on tab press
|
|
120
120
|
event.preventDefault();
|
|
121
121
|
event.stopPropagation();
|
|
122
|
+
event.target.click();
|
|
122
123
|
break;
|
|
123
124
|
case keys.ARROW_UP:
|
|
124
125
|
event.preventDefault();
|
|
@@ -149,11 +150,15 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
149
150
|
}
|
|
150
151
|
}, {
|
|
151
152
|
key: "focusItemAt",
|
|
152
|
-
value: function focusItemAt(index) {
|
|
153
|
+
value: function focusItemAt(index, direction) {
|
|
154
|
+
var _targetElement;
|
|
153
155
|
var targetElement = this.itemNodes[index];
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
// If the current index is disabled, find the next non-disabled element
|
|
157
|
+
while (targetElement && targetElement.disabled) {
|
|
158
|
+
direction === ShiftDirection.BACK ? index-- : index++;
|
|
159
|
+
targetElement = this.itemNodes[index];
|
|
156
160
|
}
|
|
161
|
+
(_targetElement = targetElement) === null || _targetElement === void 0 ? void 0 : _targetElement.focus();
|
|
157
162
|
}
|
|
158
163
|
}, {
|
|
159
164
|
key: "shiftFocus",
|
|
@@ -164,13 +169,15 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
164
169
|
// somehow the select options has lost focus
|
|
165
170
|
targetElementIndex = 0;
|
|
166
171
|
} else {
|
|
172
|
+
// Note: this component purposely does not cycle arrow key navigation
|
|
173
|
+
// to match native <select> elements
|
|
167
174
|
if (direction === ShiftDirection.BACK) {
|
|
168
|
-
targetElementIndex = currentIndex
|
|
175
|
+
targetElementIndex = currentIndex - 1;
|
|
169
176
|
} else {
|
|
170
|
-
targetElementIndex = currentIndex
|
|
177
|
+
targetElementIndex = currentIndex + 1;
|
|
171
178
|
}
|
|
172
179
|
}
|
|
173
|
-
this.focusItemAt(targetElementIndex);
|
|
180
|
+
this.focusItemAt(targetElementIndex, direction);
|
|
174
181
|
}
|
|
175
182
|
}, {
|
|
176
183
|
key: "render",
|
|
@@ -208,7 +215,9 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
208
215
|
fullWidth: fullWidth,
|
|
209
216
|
isInvalid: isInvalid,
|
|
210
217
|
compressed: compressed
|
|
211
|
-
}, rest
|
|
218
|
+
}, rest, {
|
|
219
|
+
buttonRef: this.controlButtonRef
|
|
220
|
+
}));
|
|
212
221
|
var items = options.map(function (option, index) {
|
|
213
222
|
var value = option.value,
|
|
214
223
|
dropdownDisplay = option.dropdownDisplay,
|
|
@@ -239,7 +248,8 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
239
248
|
className: popoverClasses,
|
|
240
249
|
isOpen: isOpen || this.state.isPopoverOpen,
|
|
241
250
|
input: button,
|
|
242
|
-
fullWidth: fullWidth
|
|
251
|
+
fullWidth: fullWidth,
|
|
252
|
+
disableFocusTrap: true // This component handles its own focus manually
|
|
243
253
|
}), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
244
254
|
id: this.describedById
|
|
245
255
|
}, ___EmotionJSX(EuiI18n, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "options", "id", "name", "fullWidth", "isLoading", "isInvalid", "readOnly", "defaultValue", "compressed", "value", "placeholder", "prepend", "append", "disabled"];
|
|
4
|
+
var _excluded = ["buttonRef", "className", "options", "id", "name", "fullWidth", "isLoading", "isInvalid", "readOnly", "defaultValue", "compressed", "value", "placeholder", "prepend", "append", "disabled"];
|
|
4
5
|
/*
|
|
5
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
7
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -9,8 +10,9 @@ var _excluded = ["className", "options", "id", "name", "fullWidth", "isLoading",
|
|
|
9
10
|
* Side Public License, v 1.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
|
-
import React, { useMemo } from 'react';
|
|
13
|
+
import React, { useEffect, useState, useMemo } from 'react';
|
|
13
14
|
import classNames from 'classnames';
|
|
15
|
+
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
14
16
|
import { EuiFormControlLayout } from '../form_control_layout';
|
|
15
17
|
import { getFormControlClassNameForIconCount } from '../form_control_layout/_num_icons';
|
|
16
18
|
import { useFormContext } from '../eui_form_context';
|
|
@@ -18,7 +20,8 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
|
18
20
|
export var EuiSuperSelectControl = function EuiSuperSelectControl(props) {
|
|
19
21
|
var _useFormContext = useFormContext(),
|
|
20
22
|
defaultFullWidth = _useFormContext.defaultFullWidth;
|
|
21
|
-
var
|
|
23
|
+
var buttonRef = props.buttonRef,
|
|
24
|
+
className = props.className,
|
|
22
25
|
options = props.options,
|
|
23
26
|
id = props.id,
|
|
24
27
|
name = props.name,
|
|
@@ -60,6 +63,25 @@ export var EuiSuperSelectControl = function EuiSuperSelectControl(props) {
|
|
|
60
63
|
}
|
|
61
64
|
}, [inputValue, options]);
|
|
62
65
|
var showPlaceholder = !!placeholder && !selectedValue;
|
|
66
|
+
|
|
67
|
+
// An extra screen reader workaround is required here to make sure `id`s
|
|
68
|
+
// passed from EuiFormRow are inherited by the targetable <button> element
|
|
69
|
+
var _useState = useState(''),
|
|
70
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
71
|
+
formLabelId = _useState2[0],
|
|
72
|
+
setFormLabelId = _useState2[1];
|
|
73
|
+
var hasFormLabel = !!formLabelId;
|
|
74
|
+
useEffect(function () {
|
|
75
|
+
if (id) {
|
|
76
|
+
var formRowLabel = "".concat(id, "-label");
|
|
77
|
+
var _hasFormLabel = !!document.getElementById(formRowLabel);
|
|
78
|
+
if (_hasFormLabel) {
|
|
79
|
+
setFormLabelId(formRowLabel);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, [id]);
|
|
83
|
+
var buttonId = hasFormLabel ? "".concat(id, "-button") : undefined;
|
|
84
|
+
var ariaLabelledBy = hasFormLabel ? "".concat(buttonId, " ").concat(formLabelId) : undefined;
|
|
63
85
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("input", {
|
|
64
86
|
type: "hidden",
|
|
65
87
|
id: id,
|
|
@@ -80,11 +102,18 @@ export var EuiSuperSelectControl = function EuiSuperSelectControl(props) {
|
|
|
80
102
|
type: "button",
|
|
81
103
|
className: classes,
|
|
82
104
|
"aria-haspopup": "listbox",
|
|
105
|
+
"aria-labelledby": ariaLabelledBy,
|
|
106
|
+
id: buttonId,
|
|
83
107
|
disabled: disabled || readOnly
|
|
84
108
|
// @ts-ignore Using as a selector only for mixin use
|
|
85
109
|
,
|
|
86
110
|
readOnly: readOnly
|
|
87
|
-
}, rest
|
|
111
|
+
}, rest, {
|
|
112
|
+
ref: buttonRef
|
|
113
|
+
}), showPlaceholder ? ___EmotionJSX("span", {
|
|
88
114
|
className: "euiSuperSelectControl__placeholder"
|
|
89
|
-
}, placeholder) : selectedValue
|
|
115
|
+
}, placeholder) : selectedValue, hasFormLabel &&
|
|
116
|
+
// Add a slight pause between reading out the multiple aria-labelledby elements,
|
|
117
|
+
// mimicking how screen readers handle native <select> elements
|
|
118
|
+
___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", null, ", ")))));
|
|
90
119
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
3
|
var _excluded = ["className", "size", "margin"];
|
|
5
4
|
/*
|
|
@@ -12,31 +11,20 @@ var _excluded = ["className", "size", "margin"];
|
|
|
12
11
|
|
|
13
12
|
import React from 'react';
|
|
14
13
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
16
15
|
import { euiHorizontalRuleStyles } from './horizontal_rule.styles';
|
|
17
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
17
|
export var SIZES = ['full', 'half', 'quarter'];
|
|
19
18
|
export var MARGINS = ['none', 'xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
20
|
-
var marginToClassNameMap = {
|
|
21
|
-
none: null,
|
|
22
|
-
xs: 'marginXSmall',
|
|
23
|
-
s: 'marginSmall',
|
|
24
|
-
m: 'marginMedium',
|
|
25
|
-
l: 'marginLarge',
|
|
26
|
-
xl: 'marginXLarge',
|
|
27
|
-
xxl: 'marginXXLarge'
|
|
28
|
-
};
|
|
29
19
|
export var EuiHorizontalRule = function EuiHorizontalRule(_ref) {
|
|
30
|
-
var _classNames;
|
|
31
20
|
var className = _ref.className,
|
|
32
21
|
_ref$size = _ref.size,
|
|
33
22
|
size = _ref$size === void 0 ? 'full' : _ref$size,
|
|
34
23
|
_ref$margin = _ref.margin,
|
|
35
24
|
margin = _ref$margin === void 0 ? 'l' : _ref$margin,
|
|
36
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
-
var
|
|
38
|
-
var styles = euiHorizontalRuleStyles
|
|
39
|
-
var classes = classNames('euiHorizontalRule', (_classNames = {}, _defineProperty(_classNames, "euiHorizontalRule--".concat(size), size), _defineProperty(_classNames, "euiHorizontalRule--".concat(marginToClassNameMap[margin]), margin && margin !== 'none'), _classNames), className);
|
|
26
|
+
var classes = classNames('euiHorizontalRule', className);
|
|
27
|
+
var styles = useEuiMemoizedStyles(euiHorizontalRuleStyles);
|
|
40
28
|
var cssStyles = [styles.euiHorizontalRule, styles[size], styles[margin]];
|
|
41
29
|
return ___EmotionJSX("hr", _extends({
|
|
42
30
|
css: cssStyles,
|
|
@@ -11,9 +11,9 @@ var _excluded = ["size", "mono", "className", "aria-label"];
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
|
+
import { useLoadingAriaLabel } from './_loading_strings';
|
|
16
|
+
import { euiLoadingChartStyles, euiLoadingChartBarStyles, BARS_COUNT } from './loading_chart.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var SIZES = ['m', 'l', 'xl'];
|
|
19
19
|
export var EuiLoadingChart = function EuiLoadingChart(_ref) {
|
|
@@ -24,28 +24,23 @@ export var EuiLoadingChart = function EuiLoadingChart(_ref) {
|
|
|
24
24
|
className = _ref.className,
|
|
25
25
|
ariaLabel = _ref['aria-label'],
|
|
26
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var styles = euiLoadingChartStyles(euiTheme);
|
|
30
|
-
var barStyles = euiLoadingChartBarStyles(euiTheme);
|
|
31
|
-
var classes = classNames('euiLoadingChart', {
|
|
32
|
-
'euiLoadingChart--mono': mono
|
|
33
|
-
}, className);
|
|
27
|
+
var classes = classNames('euiLoadingChart', className);
|
|
28
|
+
var styles = useEuiMemoizedStyles(euiLoadingChartStyles);
|
|
34
29
|
var cssStyles = [styles.euiLoadingChart, styles[size]];
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var bars = [];
|
|
39
|
-
for (var index = 0; index < 4; index++) {
|
|
40
|
-
bars.push(___EmotionJSX("span", {
|
|
41
|
-
key: index,
|
|
42
|
-
css: cssBarStyles(index)
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
30
|
+
var barStyles = useEuiMemoizedStyles(euiLoadingChartBarStyles);
|
|
31
|
+
var barCssStyles = [barStyles.euiLoadingChart__bar, mono ? barStyles.mono : barStyles.nonmono, barStyles[size]];
|
|
32
|
+
var defaultAriaLabel = useLoadingAriaLabel();
|
|
45
33
|
return ___EmotionJSX("span", _extends({
|
|
46
34
|
className: classes,
|
|
47
35
|
css: cssStyles,
|
|
48
36
|
role: "progressbar",
|
|
49
37
|
"aria-label": ariaLabel || defaultAriaLabel
|
|
50
|
-
}, rest),
|
|
38
|
+
}, rest), Array.from({
|
|
39
|
+
length: BARS_COUNT
|
|
40
|
+
}, function (_, index) {
|
|
41
|
+
return ___EmotionJSX("span", {
|
|
42
|
+
key: index,
|
|
43
|
+
css: barCssStyles
|
|
44
|
+
});
|
|
45
|
+
}));
|
|
51
46
|
};
|