@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
|
@@ -9,9 +9,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _services = require("../../services");
|
|
12
|
+
var _href_validator = require("../../services/security/href_validator");
|
|
12
13
|
var _inner_text = require("../inner_text");
|
|
13
14
|
var _icon = require("../icon");
|
|
14
|
-
var _href_validator = require("../../services/security/href_validator");
|
|
15
15
|
var _color_utils = require("./color_utils");
|
|
16
16
|
var _badge = require("./badge.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
@@ -57,10 +57,10 @@ var EuiBadge = function EuiBadge(_ref) {
|
|
|
57
57
|
target = _ref.target,
|
|
58
58
|
style = _ref.style,
|
|
59
59
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
60
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
61
60
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
62
61
|
var isDisabled = _isDisabled || !isHrefValid;
|
|
63
62
|
var isNamedColor = COLORS.includes(color);
|
|
63
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
64
64
|
var customColorStyles = (0, _react.useMemo)(function () {
|
|
65
65
|
// Named colors set their styles via Emotion CSS and not inline styles
|
|
66
66
|
if (isNamedColor) return style;
|
|
@@ -85,7 +85,7 @@ var EuiBadge = function EuiBadge(_ref) {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}, [color, isNamedColor, style, euiTheme]);
|
|
88
|
-
var styles = (0, _badge.euiBadgeStyles)
|
|
88
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_badge.euiBadgeStyles);
|
|
89
89
|
var cssStyles = [styles.euiBadge, isNamedColor && styles[color], (onClick || href) && !iconOnClick && styles.clickable, isDisabled && styles.disabled];
|
|
90
90
|
var textCssStyles = [styles.text.euiBadge__text, (onClick || href) && !isDisabled && styles.text.clickable];
|
|
91
91
|
var iconCssStyles = [styles.icon.euiBadge__icon, styles.icon[iconSide]];
|
|
@@ -33,10 +33,9 @@ var EuiBadgeGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
33
33
|
_ref$gutterSize = _ref.gutterSize,
|
|
34
34
|
gutterSize = _ref$gutterSize === void 0 ? 'xs' : _ref$gutterSize,
|
|
35
35
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
37
|
-
var styles = (0, _badge_group.euiBadgeGroupStyles)(euiTheme);
|
|
38
|
-
var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
|
|
39
36
|
var classes = (0, _classnames.default)('euiBadgeGroup', className);
|
|
37
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_badge_group.euiBadgeGroupStyles);
|
|
38
|
+
var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
|
|
40
39
|
return (0, _react2.jsx)("div", _extends({
|
|
41
40
|
css: cssStyles,
|
|
42
41
|
className: classes,
|
|
@@ -57,11 +57,10 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
57
57
|
_ref$alignment = _ref.alignment,
|
|
58
58
|
alignment = _ref$alignment === void 0 ? 'baseline' : _ref$alignment,
|
|
59
59
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
60
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
61
60
|
var singleLetter = !!(typeof label === 'string' && label.length === 1);
|
|
62
61
|
var isCircular = iconType || singleLetter;
|
|
63
62
|
var classes = (0, _classnames.default)('euiBetaBadge', className);
|
|
64
|
-
var styles = (0, _beta_badge.euiBetaBadgeStyles)
|
|
63
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_beta_badge.euiBetaBadgeStyles);
|
|
65
64
|
var cssStyles = [styles.euiBetaBadge, styles[color], styles[size], styles[alignment], isCircular ? styles.badgeSizes.circle[size] : styles.badgeSizes.default[size]];
|
|
66
65
|
var icon;
|
|
67
66
|
if (iconType) {
|
|
@@ -34,10 +34,9 @@ var EuiNotificationBadge = function EuiNotificationBadge(_ref) {
|
|
|
34
34
|
_ref$color = _ref.color,
|
|
35
35
|
color = _ref$color === void 0 ? 'accent' : _ref$color,
|
|
36
36
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
38
|
-
var styles = (0, _badge_notification.euiNotificationBadgeStyles)(euiTheme);
|
|
39
|
-
var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
|
|
40
37
|
var classes = (0, _classnames.default)('euiNotificationBadge', className);
|
|
38
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_badge_notification.euiNotificationBadgeStyles);
|
|
39
|
+
var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
|
|
41
40
|
return (0, _react2.jsx)("span", _extends({
|
|
42
41
|
css: cssStyles,
|
|
43
42
|
className: classes
|
|
@@ -4,7 +4,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.POSITIONS = exports.PADDING_SIZES = exports.EuiBottomBar = void 0;
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -14,7 +14,6 @@ var _i18n = require("../i18n");
|
|
|
14
14
|
var _resize_observer = require("../observer/resize_observer");
|
|
15
15
|
var _portal = require("../portal");
|
|
16
16
|
var _bottom_bar = require("./bottom_bar.styles");
|
|
17
|
-
var _provider = require("../../services/theme/provider");
|
|
18
17
|
var _react2 = require("@emotion/react");
|
|
19
18
|
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
|
|
20
19
|
/*
|
|
@@ -41,14 +40,8 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
41
40
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
42
41
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
43
42
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
none: null,
|
|
47
|
-
s: 'euiBottomBar--paddingSmall',
|
|
48
|
-
m: 'euiBottomBar--paddingMedium',
|
|
49
|
-
l: 'euiBottomBar--paddingLarge'
|
|
50
|
-
};
|
|
51
|
-
exports.paddingSizeToClassNameMap = paddingSizeToClassNameMap;
|
|
43
|
+
var PADDING_SIZES = ['none', 's', 'm', 'l'];
|
|
44
|
+
exports.PADDING_SIZES = PADDING_SIZES;
|
|
52
45
|
var POSITIONS = ['static', 'fixed', 'sticky'];
|
|
53
46
|
exports.POSITIONS = POSITIONS;
|
|
54
47
|
var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
@@ -73,8 +66,7 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
73
66
|
top = _ref.top,
|
|
74
67
|
style = _ref.style,
|
|
75
68
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
76
|
-
var
|
|
77
|
-
var styles = (0, _bottom_bar.euiBottomBarStyles)(euiTheme);
|
|
69
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_bottom_bar.euiBottomBarStyles);
|
|
78
70
|
|
|
79
71
|
// Force some props if `fixed` position, but not if the user has supplied these
|
|
80
72
|
affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
|
|
@@ -102,10 +94,8 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
102
94
|
}
|
|
103
95
|
};
|
|
104
96
|
}, [affordForDisplacement, usePortal, dimensions, bodyClassName]);
|
|
105
|
-
var classes = (0, _classnames.default)('euiBottomBar', "euiBottomBar--".concat(position),
|
|
106
|
-
var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize]
|
|
107
|
-
position: position
|
|
108
|
-
}];
|
|
97
|
+
var classes = (0, _classnames.default)('euiBottomBar', "euiBottomBar--".concat(position), className);
|
|
98
|
+
var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize]];
|
|
109
99
|
var newStyle = _objectSpread({
|
|
110
100
|
left: left,
|
|
111
101
|
right: right,
|
|
@@ -181,7 +171,7 @@ _EuiBottomBar.propTypes = {
|
|
|
181
171
|
/**
|
|
182
172
|
* Padding applied to the bar. Default is 'm'.
|
|
183
173
|
*/
|
|
184
|
-
paddingSize: _propTypes.default.
|
|
174
|
+
paddingSize: _propTypes.default.any,
|
|
185
175
|
/**
|
|
186
176
|
* Optional class applied to the body element on mount.
|
|
187
177
|
*/
|
|
@@ -217,8 +207,8 @@ _EuiBottomBar.propTypes = {
|
|
|
217
207
|
};
|
|
218
208
|
var EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
219
209
|
var BottomBar = _EuiBottomBar;
|
|
220
|
-
return (0, _react2.jsx)(
|
|
221
|
-
colorMode:
|
|
210
|
+
return (0, _react2.jsx)(_services.EuiThemeProvider, {
|
|
211
|
+
colorMode: "dark",
|
|
222
212
|
wrapperProps: {
|
|
223
213
|
cloneElement: true
|
|
224
214
|
}
|
|
@@ -256,7 +246,7 @@ EuiBottomBar.propTypes = {
|
|
|
256
246
|
/**
|
|
257
247
|
* Padding applied to the bar. Default is 'm'.
|
|
258
248
|
*/
|
|
259
|
-
paddingSize: _propTypes.default.
|
|
249
|
+
paddingSize: _propTypes.default.any,
|
|
260
250
|
/**
|
|
261
251
|
* Optional class applied to the body element on mount.
|
|
262
252
|
*/
|
|
@@ -25,8 +25,9 @@ var euiBottomBarStyles = function euiBottomBarStyles(euiThemeContext) {
|
|
|
25
25
|
// `color` is inherited from the wrapping `EuiThemeProvider colorMode="dark"`
|
|
26
26
|
euiBottomBar: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowFlat)(euiThemeContext), " background:", (0, _services.shade)(euiTheme.colors.lightestShade, 0.5), ";", _global_styling.euiCanAnimate, "{animation:", euiBottomBarAppear, " ", euiTheme.animation.slow, " ", euiTheme.animation.resistance, ";};label:euiBottomBar;"),
|
|
27
27
|
static: /*#__PURE__*/(0, _react.css)(";label:static;"),
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
// Default
|
|
29
|
+
fixed: /*#__PURE__*/(0, _react.css)("position:fixed;z-index:", Number(euiTheme.levels.header) - 2, ";;label:fixed;"),
|
|
30
|
+
sticky: /*#__PURE__*/(0, _react.css)("position:sticky;z-index:", Number(euiTheme.levels.header) - 2, ";;label:sticky;"),
|
|
30
31
|
// Padding
|
|
31
32
|
s: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.s, ";;label:s;"),
|
|
32
33
|
m: /*#__PURE__*/(0, _react.css)("padding:", euiTheme.size.base, ";;label:m;"),
|
|
@@ -10,7 +10,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _services = require("../../services");
|
|
12
12
|
var _inner_text = require("../inner_text");
|
|
13
|
-
var _text = require("../text");
|
|
14
13
|
var _link = require("../link");
|
|
15
14
|
var _popover = require("../popover");
|
|
16
15
|
var _icon = require("../icon");
|
|
@@ -60,10 +59,11 @@ var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
|
60
59
|
highlightLastBreadcrumb = _ref.highlightLastBreadcrumb,
|
|
61
60
|
truncateLastBreadcrumb = _ref.truncateLastBreadcrumb,
|
|
62
61
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
62
|
+
var isApplication = type === 'application';
|
|
63
63
|
var classes = (0, _classnames.default)('euiBreadcrumb__content', className);
|
|
64
64
|
var styles = (0, _services.useEuiMemoizedStyles)(_breadcrumb_content.euiBreadcrumbContentStyles);
|
|
65
65
|
var cssStyles = [styles.euiBreadcrumb__content, styles[type]];
|
|
66
|
-
if (
|
|
66
|
+
if (isApplication) {
|
|
67
67
|
if (isOnlyBreadcrumb) {
|
|
68
68
|
cssStyles.push(styles.applicationStyles.onlyChild);
|
|
69
69
|
} else if (isFirstBreadcrumb) {
|
|
@@ -75,9 +75,9 @@ var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
|
75
75
|
var truncationStyles = [truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
76
76
|
var isBreadcrumbWithPopover = !!popoverContent;
|
|
77
77
|
var isInteractiveBreadcrumb = href || onClick;
|
|
78
|
-
var linkColor = color ||
|
|
79
|
-
var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
|
|
78
|
+
var linkColor = color || 'subdued';
|
|
80
79
|
var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
|
|
80
|
+
var interactionStyles = (isInteractiveBreadcrumb || isBreadcrumbWithPopover) && !isApplication && styles.isInteractive;
|
|
81
81
|
return (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
82
82
|
var title = innerText === '' ? undefined : innerText;
|
|
83
83
|
var baseProps = {
|
|
@@ -85,13 +85,13 @@ var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
|
85
85
|
title: title,
|
|
86
86
|
'aria-current': ariaCurrent,
|
|
87
87
|
className: classes,
|
|
88
|
-
css: [].concat(cssStyles, truncationStyles)
|
|
88
|
+
css: [].concat(cssStyles, truncationStyles, [interactionStyles])
|
|
89
89
|
};
|
|
90
90
|
if (isBreadcrumbWithPopover) {
|
|
91
91
|
var _ = baseProps.css,
|
|
92
92
|
popoverButtonProps = _objectWithoutProperties(baseProps, _excluded2);
|
|
93
93
|
return (0, _react2.jsx)(EuiBreadcrumbPopover, _extends({}, popoverButtonProps, {
|
|
94
|
-
breadcrumbCss: cssStyles,
|
|
94
|
+
breadcrumbCss: [].concat(cssStyles, [interactionStyles]),
|
|
95
95
|
truncationCss: truncationStyles,
|
|
96
96
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
97
97
|
type: type,
|
|
@@ -107,10 +107,7 @@ var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
|
107
107
|
rel: rel
|
|
108
108
|
}, rest), text);
|
|
109
109
|
} else {
|
|
110
|
-
return (0, _react2.jsx)(
|
|
111
|
-
color: plainTextColor,
|
|
112
|
-
cloneElement: true
|
|
113
|
-
}, (0, _react2.jsx)("span", _extends({}, baseProps, rest), text));
|
|
110
|
+
return (0, _react2.jsx)("span", _extends({}, baseProps, rest), text);
|
|
114
111
|
}
|
|
115
112
|
});
|
|
116
113
|
};
|
|
@@ -132,7 +129,7 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
132
129
|
*/
|
|
133
130
|
truncate: _propTypes.default.bool,
|
|
134
131
|
/**
|
|
135
|
-
*
|
|
132
|
+
* @deprecated - if a custom color is wanted, use the `css` prop to pass custom css
|
|
136
133
|
*/
|
|
137
134
|
color: _propTypes.default.any,
|
|
138
135
|
/**
|
|
@@ -7,6 +7,7 @@ exports.euiBreadcrumbPopoverStyles = exports.euiBreadcrumbContentStyles = void 0
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _color = require("../../services/color");
|
|
9
9
|
var _global_styling = require("../../global_styling");
|
|
10
|
+
var _button = require("../../themes/amsterdam/global_styling/mixins/button");
|
|
10
11
|
/*
|
|
11
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -19,17 +20,29 @@ var _global_styling = require("../../global_styling");
|
|
|
19
20
|
* Styles cast to inner <a>, <button>, <span> elements
|
|
20
21
|
*/
|
|
21
22
|
var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeContext) {
|
|
22
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
23
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
24
|
+
colorMode = euiThemeContext.colorMode;
|
|
25
|
+
|
|
26
|
+
// Reuse button colors for `type="application`" clickable breadcrumbs
|
|
27
|
+
var applicationButtonColors = (0, _button.euiButtonColor)(euiThemeContext, 'primary');
|
|
28
|
+
|
|
29
|
+
// Create custom darker gray colors for non-clickable application breadcrumbs
|
|
30
|
+
// The numbers/ratios are fairly specific here to pass WCAG AA contrast minimums
|
|
31
|
+
var applicationTextColors = {
|
|
32
|
+
backgroundColor: (0, _color.tintOrShade)(euiTheme.colors.darkestShade, colorMode === 'DARK' ? 0.7 : 0.85, colorMode),
|
|
33
|
+
color: (0, _color.tintOrShade)(euiTheme.colors.darkestShade, 0.2, colorMode)
|
|
34
|
+
};
|
|
23
35
|
return {
|
|
24
|
-
euiBreadcrumb__content: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.
|
|
36
|
+
euiBreadcrumb__content: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.regular, ";text-align:center;vertical-align:baseline;&:not(.euiLink){color:", euiTheme.colors.subduedText, ";};label:euiBreadcrumb__content;"),
|
|
25
37
|
// Truncation styles
|
|
26
38
|
isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)((0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
27
39
|
return x * 10;
|
|
28
40
|
})), ";;label:isTruncated;"),
|
|
29
41
|
isTruncatedLast: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)('none'), ";;label:isTruncatedLast;"),
|
|
42
|
+
isInteractive: /*#__PURE__*/(0, _react.css)("&:not(:disabled){text-decoration:underline;&[class*='euiLink-subdued']{&:hover,&:focus{color:", euiTheme.colors.text, ";}}};label:isInteractive;"),
|
|
30
43
|
// Types
|
|
31
44
|
page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'center'), ";};label:page;"),
|
|
32
|
-
application: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), "
|
|
45
|
+
application: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), " font-weight:", euiTheme.font.weight.medium, ";background-color:", applicationTextColors.backgroundColor, ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", applicationTextColors.color, ";line-height:", euiTheme.size.base, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", applicationButtonColors.backgroundColor, ";color:", applicationButtonColors.color, ";:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
33
46
|
applicationStyles: {
|
|
34
47
|
onlyChild: /*#__PURE__*/(0, _react.css)("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.m), ";;label:onlyChild;"),
|
|
35
48
|
firstChild: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalBorderRadiusCSS)("".concat(euiTheme.border.radius.medium, " 0 0 ").concat(euiTheme.border.radius.medium), true), " clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.m), ";;label:firstChild;"),
|
|
@@ -141,7 +141,7 @@ EuiBreadcrumbs.propTypes = {
|
|
|
141
141
|
*/
|
|
142
142
|
truncate: _propTypes.default.bool,
|
|
143
143
|
/**
|
|
144
|
-
*
|
|
144
|
+
* @deprecated - if a custom color is wanted, use the `css` prop to pass custom css
|
|
145
145
|
*/
|
|
146
146
|
color: _propTypes.default.any,
|
|
147
147
|
/**
|
|
@@ -169,8 +169,9 @@ EuiBreadcrumbs.propTypes = {
|
|
|
169
169
|
*/
|
|
170
170
|
type: _propTypes.default.oneOf(["page", "application"]),
|
|
171
171
|
/**
|
|
172
|
-
* Whether the last breadcrumb should
|
|
173
|
-
*
|
|
172
|
+
* Whether the last breadcrumb should be semantically highlighted as the
|
|
173
|
+
* current page. (improves accessibility for screen readers users)
|
|
174
|
+
* Defaults to true.
|
|
174
175
|
*/
|
|
175
176
|
lastBreadcrumbIsCurrentPage: _propTypes.default.bool
|
|
176
177
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.ICON_SIZES = exports.ICON_SIDES = exports.EuiButtonDisplayContent = void 0;
|
|
7
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
11
|
var _services = require("../../../services");
|
|
10
12
|
var _loading = require("../../loading");
|
|
11
13
|
var _icon = require("../../icon");
|
|
12
14
|
var _button_display_content = require("./_button_display_content.styles");
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
15
|
var _react2 = require("@emotion/react");
|
|
15
16
|
var _excluded = ["children", "textProps", "isLoading", "isDisabled", "iconType", "iconSize", "iconSide"];
|
|
16
17
|
/*
|
|
@@ -21,6 +22,8 @@ var _excluded = ["children", "textProps", "isLoading", "isDisabled", "iconType",
|
|
|
21
22
|
* Side Public License, v 1.
|
|
22
23
|
*/
|
|
23
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
26
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
27
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
28
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
26
29
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -46,39 +49,37 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
46
49
|
_ref$iconSide = _ref.iconSide,
|
|
47
50
|
iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
|
|
48
51
|
contentProps = _objectWithoutProperties(_ref, _excluded);
|
|
49
|
-
var
|
|
50
|
-
var styles = (0, _button_display_content.euiButtonDisplayContentStyles)(theme);
|
|
51
|
-
var cssStyles = [styles.euiButtonDisplayContent];
|
|
52
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_button_display_content.euiButtonDisplayContentStyles);
|
|
52
53
|
|
|
53
54
|
// Add an icon to the button if one exists.
|
|
54
|
-
var icon
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
55
|
+
var icon = (0, _react.useMemo)(function () {
|
|
56
|
+
if (isLoading) {
|
|
57
|
+
// When the button is disabled the text gets gray
|
|
58
|
+
// and in some buttons the background gets a light gray
|
|
59
|
+
// for better contrast we want to change the border of the spinner
|
|
60
|
+
// to have the same color of the text. This way we ensure the borders
|
|
61
|
+
// are always visible. The default spinner color could be very light.
|
|
62
|
+
var loadingSpinnerColor = isDisabled ? {
|
|
63
|
+
border: 'currentcolor'
|
|
64
|
+
} : undefined;
|
|
65
|
+
return (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
66
|
+
size: iconSize,
|
|
67
|
+
color: loadingSpinnerColor
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (iconType) {
|
|
71
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
72
|
+
type: iconType,
|
|
73
|
+
size: iconSize,
|
|
74
|
+
color: "inherit" // forces the icon to inherit its parent color
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}, [iconType, iconSize, isLoading, isDisabled]);
|
|
77
78
|
var isText = typeof children === 'string';
|
|
78
79
|
var doNotRenderTextWrapper = textProps === false;
|
|
79
80
|
var renderTextWrapper = (isText || textProps) && !doNotRenderTextWrapper;
|
|
80
81
|
return (0, _react2.jsx)("span", _extends({
|
|
81
|
-
css:
|
|
82
|
+
css: styles.euiButtonDisplayContent
|
|
82
83
|
}, contentProps), iconSide === 'left' && icon, renderTextWrapper ? (0, _react2.jsx)("span", _extends({}, textProps, {
|
|
83
84
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
84
85
|
}), children) : children, iconSide === 'right' && icon);
|
|
@@ -57,13 +57,12 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
57
57
|
var color = isDisabled ? 'disabled' : _color;
|
|
58
58
|
var display = isSelected ? 'fill' : isCompressed ? 'empty' : 'base';
|
|
59
59
|
var hasToolTip = !!toolTipContent;
|
|
60
|
-
var
|
|
60
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_button_group_button.euiButtonGroupButtonStyles);
|
|
61
|
+
var focusColorStyles = (0, _services.useEuiMemoizedStyles)(_button_group_button._compressedButtonFocusColors);
|
|
61
62
|
var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
|
|
62
63
|
display: display
|
|
63
64
|
})[color];
|
|
64
|
-
var
|
|
65
|
-
var styles = (0, _button_group_button.euiButtonGroupButtonStyles)(euiTheme);
|
|
66
|
-
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && focusColorStyles];
|
|
65
|
+
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && isCompressed && focusColorStyles[color]];
|
|
67
66
|
var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
|
|
68
67
|
var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
|
|
69
68
|
var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.euiButtonGroupButtonStyles = exports.
|
|
7
|
+
exports.euiButtonGroupButtonStyles = exports._compressedButtonFocusColors = void 0;
|
|
7
8
|
var _react = require("@emotion/react");
|
|
8
9
|
var _services = require("../../../services");
|
|
9
10
|
var _global_styling = require("../../../global_styling");
|
|
10
11
|
var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
|
|
11
12
|
var _accessibility = require("../../accessibility");
|
|
12
13
|
var _form = require("../../form/form.styles");
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
20
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
22
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
23
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
24
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
25
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
14
26
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
15
27
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -50,7 +62,7 @@ var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeCon
|
|
|
50
62
|
iconOnly: /*#__PURE__*/(0, _react.css)("padding-inline:", euiTheme.size.s, ";;label:iconOnly;"),
|
|
51
63
|
// Sizes
|
|
52
64
|
uncompressed: {
|
|
53
|
-
uncompressed: /*#__PURE__*/(0, _react.css)("&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.bold, ";};label:uncompressed;"),
|
|
65
|
+
uncompressed: /*#__PURE__*/(0, _react.css)("&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.bold, ";}&:focus-visible{", (0, _global_styling.euiOutline)(euiThemeContext, 'inset', euiTheme.colors.fullShade), ";};label:uncompressed;"),
|
|
54
66
|
get borders() {
|
|
55
67
|
var selectors = '.euiButtonGroupButton-isSelected, .euiButtonGroup__tooltipWrapper-isSelected';
|
|
56
68
|
var selectedColor = (0, _services.transparentize)(euiTheme.colors.emptyShade, 0.2);
|
|
@@ -91,14 +103,12 @@ var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeCon
|
|
|
91
103
|
};
|
|
92
104
|
};
|
|
93
105
|
exports.euiButtonGroupButtonStyles = euiButtonGroupButtonStyles;
|
|
94
|
-
var
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
var _compressedButtonFocusColors = function _compressedButtonFocusColors(euiThemeContext) {
|
|
107
|
+
var colors = [].concat(_toConsumableArray(_button.BUTTON_COLORS), ['disabled']);
|
|
108
|
+
return colors.reduce(function (acc, color) {
|
|
109
|
+
var _euiButtonFillColor = (0, _button.euiButtonFillColor)(euiThemeContext, color),
|
|
110
|
+
backgroundColor = _euiButtonFillColor.backgroundColor;
|
|
111
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/(0, _react.css)("&:focus-visible{", (0, _global_styling.euiOutline)(euiThemeContext, 'center', backgroundColor), " &:is(.euiButtonGroupButton-isSelected){outline-offset:0;}}")));
|
|
112
|
+
}, {});
|
|
98
113
|
};
|
|
99
|
-
exports.
|
|
100
|
-
var _uncompressedButtonFocus = function _uncompressedButtonFocus(euiThemeContext) {
|
|
101
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
102
|
-
return /*#__PURE__*/(0, _react.css)("&:focus-visible{", (0, _global_styling.euiOutline)(euiThemeContext, 'inset', euiTheme.colors.fullShade), ";}");
|
|
103
|
-
};
|
|
104
|
-
exports._uncompressedButtonFocus = _uncompressedButtonFocus;
|
|
114
|
+
exports._compressedButtonFocusColors = _compressedButtonFocusColors;
|
|
@@ -8,10 +8,10 @@ exports.HEADINGS = exports.EuiCallOut = exports.COLORS = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
|
+
var _services = require("../../services");
|
|
11
12
|
var _icon = require("../icon");
|
|
12
13
|
var _button = require("../button");
|
|
13
14
|
var _text = require("../text");
|
|
14
|
-
var _services = require("../../services");
|
|
15
15
|
var _panel = require("../panel");
|
|
16
16
|
var _spacer = require("../spacer");
|
|
17
17
|
var _title = require("../title");
|
|
@@ -52,51 +52,48 @@ var EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
52
52
|
heading = _ref$heading === void 0 ? 'p' : _ref$heading,
|
|
53
53
|
onDismiss = _ref.onDismiss,
|
|
54
54
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
55
|
-
var
|
|
56
|
-
var styles = (0, _call_out.euiCallOutStyles)(theme);
|
|
55
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_call_out.euiCallOutStyles);
|
|
57
56
|
var cssStyles = [styles.euiCallOut, onDismiss && styles.hasDismissButton.hasDimissButton, onDismiss && styles.hasDismissButton[size]];
|
|
58
|
-
var cssDismissButtonStyles = [styles.dismissButton.euiCallOut__dismissButton, styles.dismissButton[size]];
|
|
59
|
-
var headerStyles = (0, _call_out.euiCallOutHeadingStyles)(theme);
|
|
60
|
-
var cssHeaderStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
|
|
61
57
|
var classes = (0, _classnames.default)('euiCallOut', _defineProperty({}, "euiCallOut--".concat(color), color), className);
|
|
62
|
-
var dismissButton =
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
var dismissButton = (0, _react.useMemo)(function () {
|
|
59
|
+
if (!onDismiss) return;
|
|
60
|
+
var cssStyles = [styles.dismissButton.euiCallOut__dismissButton, styles.dismissButton[size]];
|
|
61
|
+
return (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
62
|
+
token: "euiCallOut.dismissAriaLabel",
|
|
63
|
+
default: "Dismiss this callout"
|
|
64
|
+
}, function (dismissAriaLabel) {
|
|
65
|
+
return (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
66
|
+
iconType: "cross",
|
|
67
|
+
onClick: onDismiss,
|
|
68
|
+
"aria-label": dismissAriaLabel,
|
|
69
|
+
css: cssStyles,
|
|
70
|
+
color: color,
|
|
71
|
+
"data-test-subj": "euiDismissCalloutButton"
|
|
72
|
+
});
|
|
73
73
|
});
|
|
74
|
-
});
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
74
|
+
}, [onDismiss, styles, color, size]);
|
|
75
|
+
var headerStyles = (0, _services.useEuiMemoizedStyles)(_call_out.euiCallOutHeaderStyles);
|
|
76
|
+
var header = (0, _react.useMemo)(function () {
|
|
77
|
+
if (!title) return;
|
|
78
|
+
var H = heading;
|
|
79
|
+
var cssStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
|
|
80
|
+
return (0, _react2.jsx)(_title.EuiTitle, {
|
|
81
|
+
size: size === 's' ? 'xxs' : 'xs',
|
|
82
|
+
css: cssStyles
|
|
83
|
+
}, (0, _react2.jsx)(H, {
|
|
84
|
+
className: "euiCallOutHeader__title"
|
|
85
|
+
}, iconType && (0, _react2.jsx)(_icon.EuiIcon, {
|
|
86
|
+
css: headerStyles.euiCallOut__icon,
|
|
87
|
+
type: iconType,
|
|
88
|
+
size: "m",
|
|
89
|
+
"aria-hidden": "true",
|
|
90
|
+
color: "inherit"
|
|
91
|
+
}), title));
|
|
92
|
+
}, [title, heading, iconType, size, color, headerStyles]);
|
|
89
93
|
var optionalChildren = children && (0, _react2.jsx)(_text.EuiText, {
|
|
90
94
|
size: size === 's' ? 'xs' : 's',
|
|
91
95
|
color: "default"
|
|
92
96
|
}, children);
|
|
93
|
-
|
|
94
|
-
// Note: the DOM position of the dismiss button matters to screen reader users.
|
|
95
|
-
// We generally want them to have some context of _what_ they're dismissing,
|
|
96
|
-
// instead of navigating to the dismiss button first before the callout content
|
|
97
|
-
var calloutContent = header && optionalChildren ? (0, _react2.jsx)(_react.default.Fragment, null, header, dismissButton, (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
98
|
-
size: "s"
|
|
99
|
-
}), optionalChildren) : (0, _react2.jsx)(_react.default.Fragment, null, header || optionalChildren, dismissButton);
|
|
100
97
|
return (0, _react2.jsx)(_panel.EuiPanel, _extends({
|
|
101
98
|
borderRadius: "none",
|
|
102
99
|
color: color,
|
|
@@ -105,7 +102,13 @@ var EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
105
102
|
className: classes,
|
|
106
103
|
panelRef: ref,
|
|
107
104
|
grow: false
|
|
108
|
-
}, rest),
|
|
105
|
+
}, rest),
|
|
106
|
+
// Note: the DOM position of the dismiss button matters to screen reader users.
|
|
107
|
+
// We generally want them to have some context of _what_ they're dismissing,
|
|
108
|
+
// instead of navigating to the dismiss button first before the callout content
|
|
109
|
+
header && optionalChildren ? (0, _react2.jsx)(_react.default.Fragment, null, header, dismissButton, (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
110
|
+
size: "s"
|
|
111
|
+
}), optionalChildren) : (0, _react2.jsx)(_react.default.Fragment, null, header || optionalChildren, dismissButton));
|
|
109
112
|
});
|
|
110
113
|
exports.EuiCallOut = EuiCallOut;
|
|
111
114
|
EuiCallOut.propTypes = {
|