@elastic/eui 93.5.1 → 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/es/services/theme/style_memoization.js +2 -1
- package/eui.d.ts +91 -79
- 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/lib/services/theme/style_memoization.js +2 -1
- 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/es/services/theme/style_memoization.js +2 -1
- 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/optimize/lib/services/theme/style_memoization.js +2 -1
- package/package.json +3 -3
- 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
- package/test-env/services/theme/style_memoization.js +2 -1
|
@@ -6,21 +6,22 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
|
+
import classNames from 'classnames';
|
|
11
12
|
import { cloneElementWithCss } from '../../../services';
|
|
12
|
-
import { euiScreenReaderOnlyStyles } from './screen_reader_only.styles';
|
|
13
|
+
import { euiScreenReaderOnlyStyles as styles } from './screen_reader_only.styles';
|
|
13
14
|
export var EuiScreenReaderOnly = function EuiScreenReaderOnly(_ref) {
|
|
14
15
|
var children = _ref.children,
|
|
15
16
|
className = _ref.className,
|
|
16
17
|
showOnFocus = _ref.showOnFocus;
|
|
17
18
|
var classes = classNames(className, children.props.className);
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
19
|
+
var props = useMemo(function () {
|
|
20
|
+
return {
|
|
21
|
+
className: classes.length ? classes : undefined,
|
|
22
|
+
css: showOnFocus ? styles['euiScreenReaderOnly-showOnFocus'] : styles.euiScreenReaderOnly
|
|
23
|
+
};
|
|
24
|
+
}, [classes, showOnFocus]);
|
|
24
25
|
return cloneElementWithCss(children, props);
|
|
25
26
|
};
|
|
26
27
|
EuiScreenReaderOnly.propTypes = {
|
|
@@ -20,8 +20,7 @@ export var euiScreenReaderOnly = function euiScreenReaderOnly() {
|
|
|
20
20
|
/*
|
|
21
21
|
* Styles
|
|
22
22
|
*/
|
|
23
|
-
export var euiScreenReaderOnlyStyles =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
23
|
+
export var euiScreenReaderOnlyStyles = {
|
|
24
|
+
euiScreenReaderOnly: /*#__PURE__*/css(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;"),
|
|
25
|
+
'euiScreenReaderOnly-showOnFocus': /*#__PURE__*/css("&:not(:focus, :active, :focus-within){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly-showOnFocus;")
|
|
27
26
|
};
|
|
@@ -14,7 +14,7 @@ import React, { useCallback } from 'react';
|
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import { isTabbable } from 'tabbable';
|
|
17
|
-
import {
|
|
17
|
+
import { useEuiMemoizedStyles } from '../../../services';
|
|
18
18
|
import { EuiButton } from '../../button/button';
|
|
19
19
|
import { EuiScreenReaderOnly } from '../screen_reader_only';
|
|
20
20
|
import { euiSkipLinkStyles } from './skip_link.styles';
|
|
@@ -32,9 +32,8 @@ export var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
|
32
32
|
className = _ref.className,
|
|
33
33
|
_onClick = _ref.onClick,
|
|
34
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
-
var euiTheme = useEuiTheme();
|
|
36
|
-
var styles = euiSkipLinkStyles(euiTheme);
|
|
37
35
|
var classes = classNames('euiSkipLink', className);
|
|
36
|
+
var styles = useEuiMemoizedStyles(euiSkipLinkStyles);
|
|
38
37
|
var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined];
|
|
39
38
|
var onClick = useCallback(function (e) {
|
|
40
39
|
var destinationEl = null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
var _excluded = ["children", "className", "
|
|
2
|
+
var _excluded = ["children", "className", "style", "height", "width", "maxWidth"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -15,29 +15,31 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import React from 'react';
|
|
18
|
+
import React, { useMemo } from 'react';
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import classNames from 'classnames';
|
|
21
|
+
import { logicalStyles } from '../../global_styling';
|
|
21
22
|
export var EuiAspectRatio = function EuiAspectRatio(_ref) {
|
|
22
23
|
var children = _ref.children,
|
|
23
24
|
className = _ref.className,
|
|
25
|
+
style = _ref.style,
|
|
24
26
|
height = _ref.height,
|
|
25
27
|
width = _ref.width,
|
|
26
28
|
maxWidth = _ref.maxWidth,
|
|
27
|
-
style = _ref.style,
|
|
28
29
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
var classes = classNames('euiAspectRatio', className);
|
|
30
|
-
var euiAspectRatioStyle =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
var classes = classNames('euiAspectRatio', className, children.props.className);
|
|
31
|
+
var euiAspectRatioStyle = useMemo(function () {
|
|
32
|
+
return logicalStyles({
|
|
33
|
+
aspectRatio: "".concat(width, " / ").concat(height),
|
|
34
|
+
height: 'auto',
|
|
35
|
+
width: '100%',
|
|
36
|
+
maxWidth: maxWidth
|
|
37
|
+
});
|
|
38
|
+
}, [height, width, maxWidth]);
|
|
39
|
+
return /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
|
|
37
40
|
className: classes,
|
|
38
|
-
style: euiAspectRatioStyle
|
|
39
|
-
}
|
|
40
|
-
return /*#__PURE__*/React.cloneElement(children, props);
|
|
41
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, children.props.style), euiAspectRatioStyle), style)
|
|
42
|
+
}));
|
|
41
43
|
};
|
|
42
44
|
EuiAspectRatio.propTypes = {
|
|
43
45
|
className: PropTypes.string,
|
|
@@ -2,14 +2,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
2
2
|
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"],
|
|
3
3
|
_excluded2 = ["casing"];
|
|
4
4
|
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); }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
5
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
8
|
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."); }
|
|
7
9
|
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); }
|
|
8
10
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
11
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
12
|
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; }
|
|
11
|
-
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; }
|
|
12
|
-
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; }
|
|
13
13
|
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; }
|
|
14
14
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
15
|
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); }
|
|
@@ -23,14 +23,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
23
23
|
* Side Public License, v 1.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import React from 'react';
|
|
26
|
+
import React, { useMemo } from 'react';
|
|
27
27
|
import PropTypes from "prop-types";
|
|
28
28
|
import classNames from 'classnames';
|
|
29
29
|
import { isColorDark, hexToRgb, isValidHex } from '../../services/color';
|
|
30
|
-
import { euiPaletteColorBlindBehindText, toInitials,
|
|
30
|
+
import { euiPaletteColorBlindBehindText, toInitials, useEuiMemoizedStyles } from '../../services';
|
|
31
31
|
import { EuiIcon } from '../icon';
|
|
32
32
|
import { euiAvatarStyles } from './avatar.styles';
|
|
33
33
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
34
|
+
var visColors = euiPaletteColorBlindBehindText();
|
|
34
35
|
export var SIZES = ['s', 'm', 'l', 'xl'];
|
|
35
36
|
export var TYPES = ['space', 'user'];
|
|
36
37
|
export var CASING = ['capitalize', 'uppercase', 'lowercase', 'none'];
|
|
@@ -59,57 +60,55 @@ export var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
59
60
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
60
61
|
style = _ref.style,
|
|
61
62
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
63
|
+
checkValidInitials(initials);
|
|
62
64
|
var _props$casing = props.casing,
|
|
63
65
|
casing = _props$casing === void 0 ? type === 'space' ? 'none' : 'uppercase' : _props$casing,
|
|
64
66
|
rest = _objectWithoutProperties(props, _excluded2);
|
|
65
|
-
var euiTheme = useEuiTheme();
|
|
66
|
-
var styles = euiAvatarStyles(euiTheme);
|
|
67
|
-
var visColors = euiPaletteColorBlindBehindText();
|
|
68
67
|
var isPlain = color === 'plain';
|
|
69
68
|
var isSubdued = color === 'subdued';
|
|
69
|
+
var isNamedColor = isPlain || isSubdued || color === null;
|
|
70
70
|
var classes = classNames('euiAvatar', (_classNames = {}, _defineProperty(_classNames, "euiAvatar--".concat(size), size), _defineProperty(_classNames, "euiAvatar--".concat(type), type), _defineProperty(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
|
|
71
|
+
var styles = useEuiMemoizedStyles(euiAvatarStyles);
|
|
71
72
|
var cssStyles = [styles.euiAvatar, styles[type], styles[size], styles[casing], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}, calculatedInitials);
|
|
97
|
-
} else if (iconType) {
|
|
98
|
-
content = ___EmotionJSX(EuiIcon, {
|
|
99
|
-
className: "euiAvatar__icon",
|
|
100
|
-
size: iconSize || size,
|
|
101
|
-
type: iconType,
|
|
102
|
-
color: iconCustomColor === null ? undefined : iconCustomColor
|
|
103
|
-
});
|
|
104
|
-
}
|
|
73
|
+
var avatarStyle = useMemo(function () {
|
|
74
|
+
if (imageUrl) {
|
|
75
|
+
return {
|
|
76
|
+
backgroundImage: "url(".concat(imageUrl, ")")
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
if (!isNamedColor) {
|
|
80
|
+
checkValidColor(color);
|
|
81
|
+
var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
|
|
82
|
+
var textColor = isColorDark.apply(void 0, _toConsumableArray(hexToRgb(assignedColor))) ? '#FFFFFF' : '#000000';
|
|
83
|
+
return {
|
|
84
|
+
backgroundColor: assignedColor,
|
|
85
|
+
color: textColor
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}, [imageUrl, color, isNamedColor, name.length]);
|
|
89
|
+
var iconCustomColor = useMemo(function () {
|
|
90
|
+
// `null` allows icons to keep their default color (e.g. app icons)
|
|
91
|
+
if (iconColor === null) return undefined;
|
|
92
|
+
// Otherwise continue to pass on `iconColor`
|
|
93
|
+
if (iconColor) return iconColor;
|
|
94
|
+
// Fall back to the adjusted text color if it exists
|
|
95
|
+
return avatarStyle === null || avatarStyle === void 0 ? void 0 : avatarStyle.color;
|
|
96
|
+
}, [iconColor, avatarStyle === null || avatarStyle === void 0 ? void 0 : avatarStyle.color]);
|
|
105
97
|
return ___EmotionJSX("div", _extends({
|
|
106
98
|
css: cssStyles,
|
|
107
99
|
className: classes,
|
|
108
|
-
style: avatarStyle,
|
|
100
|
+
style: _objectSpread(_objectSpread({}, style), avatarStyle),
|
|
109
101
|
"aria-label": isDisabled ? undefined : name,
|
|
110
102
|
role: isDisabled ? 'presentation' : 'img',
|
|
111
103
|
title: name
|
|
112
|
-
}, rest),
|
|
104
|
+
}, rest), !imageUrl && (iconType ? ___EmotionJSX(EuiIcon, {
|
|
105
|
+
className: "euiAvatar__icon",
|
|
106
|
+
size: iconSize || size,
|
|
107
|
+
type: iconType,
|
|
108
|
+
color: iconCustomColor
|
|
109
|
+
}) : ___EmotionJSX("span", {
|
|
110
|
+
"aria-hidden": "true"
|
|
111
|
+
}, toInitials(name, initialsLength, initials))));
|
|
113
112
|
};
|
|
114
113
|
|
|
115
114
|
// TODO: Migrate to a service
|
|
@@ -66,7 +66,7 @@ export var euiAvatarStyles = function euiAvatarStyles(_ref8) {
|
|
|
66
66
|
var euiTheme = _ref8.euiTheme;
|
|
67
67
|
return {
|
|
68
68
|
// Base
|
|
69
|
-
euiAvatar: /*#__PURE__*/css("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;background-size:cover;", logicalTextAlignCSS('center'), " ", logicalCSS('overflow-x', 'hidden'), "font-weight:", euiTheme.font.weight.medium, ";;label:euiAvatar;"),
|
|
69
|
+
euiAvatar: /*#__PURE__*/css("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;background-size:cover;background-color:", euiTheme.colors.lightShade, ";", logicalTextAlignCSS('center'), " ", logicalCSS('overflow-x', 'hidden'), "font-weight:", euiTheme.font.weight.medium, ";;label:euiAvatar;"),
|
|
70
70
|
// Variants
|
|
71
71
|
plain: /*#__PURE__*/css("background-color:", euiTheme.colors.emptyShade, ";;label:plain;"),
|
|
72
72
|
subdued: /*#__PURE__*/css("background-color:", euiTheme.colors.lightestShade, ";;label:subdued;"),
|
|
@@ -19,10 +19,10 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
19
19
|
import React, { useMemo } from 'react';
|
|
20
20
|
import PropTypes from "prop-types";
|
|
21
21
|
import classNames from 'classnames';
|
|
22
|
-
import { useEuiTheme, getSecureRelForTarget, wcagContrastMin } from '../../services';
|
|
22
|
+
import { useEuiTheme, useEuiMemoizedStyles, getSecureRelForTarget, wcagContrastMin } from '../../services';
|
|
23
|
+
import { validateHref } from '../../services/security/href_validator';
|
|
23
24
|
import { EuiInnerText } from '../inner_text';
|
|
24
25
|
import { EuiIcon } from '../icon';
|
|
25
|
-
import { validateHref } from '../../services/security/href_validator';
|
|
26
26
|
import { getTextColor, getColorContrast, getIsValidColor } from './color_utils';
|
|
27
27
|
import { euiBadgeStyles } from './badge.styles';
|
|
28
28
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -47,10 +47,10 @@ export var EuiBadge = function EuiBadge(_ref) {
|
|
|
47
47
|
target = _ref.target,
|
|
48
48
|
style = _ref.style,
|
|
49
49
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
50
|
-
var euiTheme = useEuiTheme();
|
|
51
50
|
var isHrefValid = !href || validateHref(href);
|
|
52
51
|
var isDisabled = _isDisabled || !isHrefValid;
|
|
53
52
|
var isNamedColor = COLORS.includes(color);
|
|
53
|
+
var euiTheme = useEuiTheme();
|
|
54
54
|
var customColorStyles = useMemo(function () {
|
|
55
55
|
// Named colors set their styles via Emotion CSS and not inline styles
|
|
56
56
|
if (isNamedColor) return style;
|
|
@@ -75,7 +75,7 @@ export var EuiBadge = function EuiBadge(_ref) {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}, [color, isNamedColor, style, euiTheme]);
|
|
78
|
-
var styles = euiBadgeStyles
|
|
78
|
+
var styles = useEuiMemoizedStyles(euiBadgeStyles);
|
|
79
79
|
var cssStyles = [styles.euiBadge, isNamedColor && styles[color], (onClick || href) && !iconOnClick && styles.clickable, isDisabled && styles.disabled];
|
|
80
80
|
var textCssStyles = [styles.text.euiBadge__text, (onClick || href) && !isDisabled && styles.text.clickable];
|
|
81
81
|
var iconCssStyles = [styles.icon.euiBadge__icon, styles.icon[iconSide]];
|
|
@@ -13,7 +13,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
13
13
|
import React, { forwardRef } from 'react';
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
-
import {
|
|
16
|
+
import { useEuiMemoizedStyles } from '../../../services';
|
|
17
17
|
import { euiBadgeGroupStyles } from './badge_group.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
19
|
export var GUTTER_SIZES = ['none', 'xs', 's'];
|
|
@@ -23,10 +23,9 @@ export var EuiBadgeGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
23
23
|
_ref$gutterSize = _ref.gutterSize,
|
|
24
24
|
gutterSize = _ref$gutterSize === void 0 ? 'xs' : _ref$gutterSize,
|
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
var euiTheme = useEuiTheme();
|
|
27
|
-
var styles = euiBadgeGroupStyles(euiTheme);
|
|
28
|
-
var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
|
|
29
26
|
var classes = classNames('euiBadgeGroup', className);
|
|
27
|
+
var styles = useEuiMemoizedStyles(euiBadgeGroupStyles);
|
|
28
|
+
var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
|
|
30
29
|
return ___EmotionJSX("div", _extends({
|
|
31
30
|
css: cssStyles,
|
|
32
31
|
className: classes,
|
|
@@ -14,7 +14,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import PropTypes from "prop-types";
|
|
16
16
|
import classNames from 'classnames';
|
|
17
|
-
import { getSecureRelForTarget,
|
|
17
|
+
import { getSecureRelForTarget, useEuiMemoizedStyles } from '../../../services';
|
|
18
18
|
import { EuiToolTip } from '../../tool_tip';
|
|
19
19
|
import { EuiIcon } from '../../icon';
|
|
20
20
|
import { euiBetaBadgeStyles } from './beta_badge.styles';
|
|
@@ -48,11 +48,10 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
48
48
|
_ref$alignment = _ref.alignment,
|
|
49
49
|
alignment = _ref$alignment === void 0 ? 'baseline' : _ref$alignment,
|
|
50
50
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
51
|
-
var euiTheme = useEuiTheme();
|
|
52
51
|
var singleLetter = !!(typeof label === 'string' && label.length === 1);
|
|
53
52
|
var isCircular = iconType || singleLetter;
|
|
54
53
|
var classes = classNames('euiBetaBadge', className);
|
|
55
|
-
var styles = euiBetaBadgeStyles
|
|
54
|
+
var styles = useEuiMemoizedStyles(euiBetaBadgeStyles);
|
|
56
55
|
var cssStyles = [styles.euiBetaBadge, styles[color], styles[size], styles[alignment], isCircular ? styles.badgeSizes.circle[size] : styles.badgeSizes.default[size]];
|
|
57
56
|
var icon;
|
|
58
57
|
if (iconType) {
|
|
@@ -13,7 +13,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
-
import {
|
|
16
|
+
import { useEuiMemoizedStyles } from '../../../services';
|
|
17
17
|
import { euiNotificationBadgeStyles } from './badge_notification.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
19
|
export var COLORS = ['accent', 'subdued', 'success'];
|
|
@@ -26,10 +26,9 @@ export var EuiNotificationBadge = function EuiNotificationBadge(_ref) {
|
|
|
26
26
|
_ref$color = _ref.color,
|
|
27
27
|
color = _ref$color === void 0 ? 'accent' : _ref$color,
|
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
var euiTheme = useEuiTheme();
|
|
30
|
-
var styles = euiNotificationBadgeStyles(euiTheme);
|
|
31
|
-
var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
|
|
32
29
|
var classes = classNames('euiNotificationBadge', className);
|
|
30
|
+
var styles = useEuiMemoizedStyles(euiNotificationBadgeStyles);
|
|
31
|
+
var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
|
|
33
32
|
return ___EmotionJSX("span", _extends({
|
|
34
33
|
css: cssStyles,
|
|
35
34
|
className: classes
|
|
@@ -25,21 +25,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
25
25
|
import classNames from 'classnames';
|
|
26
26
|
import PropTypes from "prop-types";
|
|
27
27
|
import React, { forwardRef, useEffect, useState } from 'react';
|
|
28
|
-
import { useCombinedRefs,
|
|
28
|
+
import { useCombinedRefs, useEuiMemoizedStyles, EuiThemeProvider } from '../../services';
|
|
29
29
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
30
30
|
import { EuiI18n } from '../i18n';
|
|
31
31
|
import { useResizeObserver } from '../observer/resize_observer';
|
|
32
32
|
import { EuiPortal } from '../portal';
|
|
33
33
|
import { euiBottomBarStyles } from './bottom_bar.styles';
|
|
34
|
-
import { EuiThemeProvider } from '../../services/theme/provider';
|
|
35
34
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
36
|
-
|
|
37
|
-
export var paddingSizeToClassNameMap = {
|
|
38
|
-
none: null,
|
|
39
|
-
s: 'euiBottomBar--paddingSmall',
|
|
40
|
-
m: 'euiBottomBar--paddingMedium',
|
|
41
|
-
l: 'euiBottomBar--paddingLarge'
|
|
42
|
-
};
|
|
35
|
+
export var PADDING_SIZES = ['none', 's', 'm', 'l'];
|
|
43
36
|
export var POSITIONS = ['static', 'fixed', 'sticky'];
|
|
44
37
|
var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
45
38
|
var _ref$position = _ref.position,
|
|
@@ -63,8 +56,7 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
63
56
|
top = _ref.top,
|
|
64
57
|
style = _ref.style,
|
|
65
58
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
66
|
-
var
|
|
67
|
-
var styles = euiBottomBarStyles(euiTheme);
|
|
59
|
+
var styles = useEuiMemoizedStyles(euiBottomBarStyles);
|
|
68
60
|
|
|
69
61
|
// Force some props if `fixed` position, but not if the user has supplied these
|
|
70
62
|
affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
|
|
@@ -92,10 +84,8 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
92
84
|
}
|
|
93
85
|
};
|
|
94
86
|
}, [affordForDisplacement, usePortal, dimensions, bodyClassName]);
|
|
95
|
-
var classes = classNames('euiBottomBar', "euiBottomBar--".concat(position),
|
|
96
|
-
var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize]
|
|
97
|
-
position: position
|
|
98
|
-
}];
|
|
87
|
+
var classes = classNames('euiBottomBar', "euiBottomBar--".concat(position), className);
|
|
88
|
+
var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize]];
|
|
99
89
|
var newStyle = _objectSpread({
|
|
100
90
|
left: left,
|
|
101
91
|
right: right,
|
|
@@ -171,7 +161,7 @@ _EuiBottomBar.propTypes = {
|
|
|
171
161
|
/**
|
|
172
162
|
* Padding applied to the bar. Default is 'm'.
|
|
173
163
|
*/
|
|
174
|
-
paddingSize: PropTypes.
|
|
164
|
+
paddingSize: PropTypes.any,
|
|
175
165
|
/**
|
|
176
166
|
* Optional class applied to the body element on mount.
|
|
177
167
|
*/
|
|
@@ -208,7 +198,7 @@ _EuiBottomBar.propTypes = {
|
|
|
208
198
|
export var EuiBottomBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
209
199
|
var BottomBar = _EuiBottomBar;
|
|
210
200
|
return ___EmotionJSX(EuiThemeProvider, {
|
|
211
|
-
colorMode:
|
|
201
|
+
colorMode: "dark",
|
|
212
202
|
wrapperProps: {
|
|
213
203
|
cloneElement: true
|
|
214
204
|
}
|
|
@@ -245,7 +235,7 @@ EuiBottomBar.propTypes = {
|
|
|
245
235
|
/**
|
|
246
236
|
* Padding applied to the bar. Default is 'm'.
|
|
247
237
|
*/
|
|
248
|
-
paddingSize: PropTypes.
|
|
238
|
+
paddingSize: PropTypes.any,
|
|
249
239
|
/**
|
|
250
240
|
* Optional class applied to the body element on mount.
|
|
251
241
|
*/
|
|
@@ -20,8 +20,9 @@ export var euiBottomBarStyles = function euiBottomBarStyles(euiThemeContext) {
|
|
|
20
20
|
// `color` is inherited from the wrapping `EuiThemeProvider colorMode="dark"`
|
|
21
21
|
euiBottomBar: /*#__PURE__*/css(euiShadowFlat(euiThemeContext), " background:", shade(euiTheme.colors.lightestShade, 0.5), ";", euiCanAnimate, "{animation:", euiBottomBarAppear, " ", euiTheme.animation.slow, " ", euiTheme.animation.resistance, ";};label:euiBottomBar;"),
|
|
22
22
|
static: /*#__PURE__*/css(";label:static;"),
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
// Default
|
|
24
|
+
fixed: /*#__PURE__*/css("position:fixed;z-index:", Number(euiTheme.levels.header) - 2, ";;label:fixed;"),
|
|
25
|
+
sticky: /*#__PURE__*/css("position:sticky;z-index:", Number(euiTheme.levels.header) - 2, ";;label:sticky;"),
|
|
25
26
|
// Padding
|
|
26
27
|
s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
|
|
27
28
|
m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
|
|
@@ -27,7 +27,6 @@ import PropTypes from "prop-types";
|
|
|
27
27
|
import classNames from 'classnames';
|
|
28
28
|
import { useEuiMemoizedStyles } from '../../services';
|
|
29
29
|
import { EuiInnerText } from '../inner_text';
|
|
30
|
-
import { EuiTextColor } from '../text';
|
|
31
30
|
import { EuiLink } from '../link';
|
|
32
31
|
import { EuiPopover } from '../popover';
|
|
33
32
|
import { EuiIcon } from '../icon';
|
|
@@ -51,10 +50,11 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
|
51
50
|
highlightLastBreadcrumb = _ref.highlightLastBreadcrumb,
|
|
52
51
|
truncateLastBreadcrumb = _ref.truncateLastBreadcrumb,
|
|
53
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
53
|
+
var isApplication = type === 'application';
|
|
54
54
|
var classes = classNames('euiBreadcrumb__content', className);
|
|
55
55
|
var styles = useEuiMemoizedStyles(euiBreadcrumbContentStyles);
|
|
56
56
|
var cssStyles = [styles.euiBreadcrumb__content, styles[type]];
|
|
57
|
-
if (
|
|
57
|
+
if (isApplication) {
|
|
58
58
|
if (isOnlyBreadcrumb) {
|
|
59
59
|
cssStyles.push(styles.applicationStyles.onlyChild);
|
|
60
60
|
} else if (isFirstBreadcrumb) {
|
|
@@ -66,9 +66,9 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
|
66
66
|
var truncationStyles = [truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
67
67
|
var isBreadcrumbWithPopover = !!popoverContent;
|
|
68
68
|
var isInteractiveBreadcrumb = href || onClick;
|
|
69
|
-
var linkColor = color ||
|
|
70
|
-
var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
|
|
69
|
+
var linkColor = color || 'subdued';
|
|
71
70
|
var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
|
|
71
|
+
var interactionStyles = (isInteractiveBreadcrumb || isBreadcrumbWithPopover) && !isApplication && styles.isInteractive;
|
|
72
72
|
return ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
|
|
73
73
|
var title = innerText === '' ? undefined : innerText;
|
|
74
74
|
var baseProps = {
|
|
@@ -76,13 +76,13 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
|
76
76
|
title: title,
|
|
77
77
|
'aria-current': ariaCurrent,
|
|
78
78
|
className: classes,
|
|
79
|
-
css: [].concat(cssStyles, truncationStyles)
|
|
79
|
+
css: [].concat(cssStyles, truncationStyles, [interactionStyles])
|
|
80
80
|
};
|
|
81
81
|
if (isBreadcrumbWithPopover) {
|
|
82
82
|
var _ = baseProps.css,
|
|
83
83
|
popoverButtonProps = _objectWithoutProperties(baseProps, _excluded2);
|
|
84
84
|
return ___EmotionJSX(EuiBreadcrumbPopover, _extends({}, popoverButtonProps, {
|
|
85
|
-
breadcrumbCss: cssStyles,
|
|
85
|
+
breadcrumbCss: [].concat(cssStyles, [interactionStyles]),
|
|
86
86
|
truncationCss: truncationStyles,
|
|
87
87
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
88
88
|
type: type,
|
|
@@ -98,10 +98,7 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
|
|
|
98
98
|
rel: rel
|
|
99
99
|
}, rest), text);
|
|
100
100
|
} else {
|
|
101
|
-
return ___EmotionJSX(
|
|
102
|
-
color: plainTextColor,
|
|
103
|
-
cloneElement: true
|
|
104
|
-
}, ___EmotionJSX("span", _extends({}, baseProps, rest), text));
|
|
101
|
+
return ___EmotionJSX("span", _extends({}, baseProps, rest), text);
|
|
105
102
|
}
|
|
106
103
|
});
|
|
107
104
|
};
|
|
@@ -122,7 +119,7 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
122
119
|
*/
|
|
123
120
|
truncate: PropTypes.bool,
|
|
124
121
|
/**
|
|
125
|
-
*
|
|
122
|
+
* @deprecated - if a custom color is wanted, use the `css` prop to pass custom css
|
|
126
123
|
*/
|
|
127
124
|
color: PropTypes.any,
|
|
128
125
|
/**
|
|
@@ -7,24 +7,37 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
-
import {
|
|
10
|
+
import { tintOrShade } from '../../services/color';
|
|
11
11
|
import { euiFontSize, euiTextTruncate, euiFocusRing, logicalCSS, logicalBorderRadiusCSS, mathWithUnits } from '../../global_styling';
|
|
12
|
+
import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins/button';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Styles cast to inner <a>, <button>, <span> elements
|
|
15
16
|
*/
|
|
16
17
|
export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeContext) {
|
|
17
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
18
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
19
|
+
colorMode = euiThemeContext.colorMode;
|
|
20
|
+
|
|
21
|
+
// Reuse button colors for `type="application`" clickable breadcrumbs
|
|
22
|
+
var applicationButtonColors = euiButtonColor(euiThemeContext, 'primary');
|
|
23
|
+
|
|
24
|
+
// Create custom darker gray colors for non-clickable application breadcrumbs
|
|
25
|
+
// The numbers/ratios are fairly specific here to pass WCAG AA contrast minimums
|
|
26
|
+
var applicationTextColors = {
|
|
27
|
+
backgroundColor: tintOrShade(euiTheme.colors.darkestShade, colorMode === 'DARK' ? 0.7 : 0.85, colorMode),
|
|
28
|
+
color: tintOrShade(euiTheme.colors.darkestShade, 0.2, colorMode)
|
|
29
|
+
};
|
|
18
30
|
return {
|
|
19
|
-
euiBreadcrumb__content: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.
|
|
31
|
+
euiBreadcrumb__content: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.regular, ";text-align:center;vertical-align:baseline;&:not(.euiLink){color:", euiTheme.colors.subduedText, ";};label:euiBreadcrumb__content;"),
|
|
20
32
|
// Truncation styles
|
|
21
33
|
isTruncated: /*#__PURE__*/css(euiTextTruncate(mathWithUnits(euiTheme.size.base, function (x) {
|
|
22
34
|
return x * 10;
|
|
23
35
|
})), ";;label:isTruncated;"),
|
|
24
36
|
isTruncatedLast: /*#__PURE__*/css(euiTextTruncate('none'), ";;label:isTruncatedLast;"),
|
|
37
|
+
isInteractive: /*#__PURE__*/css("&:not(:disabled){text-decoration:underline;&[class*='euiLink-subdued']{&:hover,&:focus{color:", euiTheme.colors.text, ";}}};label:isInteractive;"),
|
|
25
38
|
// Types
|
|
26
39
|
page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(euiThemeContext, 'inset'), ";}&:is(button):focus{", euiFocusRing(euiThemeContext, 'center'), ";};label:page;"),
|
|
27
|
-
application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), "
|
|
40
|
+
application: /*#__PURE__*/css(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, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", applicationButtonColors.backgroundColor, ";color:", applicationButtonColors.color, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
28
41
|
applicationStyles: {
|
|
29
42
|
onlyChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", logicalCSS('padding-horizontal', euiTheme.size.m), ";;label:onlyChild;"),
|
|
30
43
|
firstChild: /*#__PURE__*/css(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 );", logicalCSS('padding-left', euiTheme.size.m), ";;label:firstChild;"),
|
|
@@ -132,7 +132,7 @@ EuiBreadcrumbs.propTypes = {
|
|
|
132
132
|
*/
|
|
133
133
|
truncate: PropTypes.bool,
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
135
|
+
* @deprecated - if a custom color is wanted, use the `css` prop to pass custom css
|
|
136
136
|
*/
|
|
137
137
|
color: PropTypes.any,
|
|
138
138
|
/**
|
|
@@ -310,8 +310,9 @@ EuiBreadcrumbs.propTypes = {
|
|
|
310
310
|
*/
|
|
311
311
|
type: PropTypes.oneOf(["page", "application"]),
|
|
312
312
|
/**
|
|
313
|
-
* Whether the last breadcrumb should
|
|
314
|
-
*
|
|
313
|
+
* Whether the last breadcrumb should be semantically highlighted as the
|
|
314
|
+
* current page. (improves accessibility for screen readers users)
|
|
315
|
+
* Defaults to true.
|
|
315
316
|
*/
|
|
316
317
|
lastBreadcrumbIsCurrentPage: PropTypes.bool
|
|
317
318
|
};
|