@elastic/eui 102.1.0 → 102.2.0-snapshot.1748601905883
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_borealis_dark.json +1 -1
- package/es/components/badge/color_utils.js +1 -3
- package/es/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/es/components/basic_table/basic_table.js +14 -10
- package/es/components/basic_table/in_memory_table.js +22 -17
- package/es/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/es/components/breadcrumbs/_breadcrumb_content.styles.js +6 -3
- package/es/components/breadcrumbs/breadcrumbs.js +3 -3
- package/es/components/button/button_display/_button_display.js +1 -1
- package/es/components/button/button_display/_button_display.styles.js +11 -2
- package/es/components/button/button_display/_button_display_content.styles.js +6 -3
- package/es/components/button/button_empty/button_empty.styles.js +9 -12
- package/es/components/button/button_group/button_group.js +1 -1
- package/es/components/button/button_group/button_group.styles.js +5 -3
- package/es/components/button/button_group/button_group_button.js +19 -9
- package/es/components/button/button_group/button_group_button.styles.js +43 -19
- package/es/components/button/button_icon/button_icon.js +4 -2
- package/es/components/collapsible_nav/collapsible_nav.js +1 -0
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/es/components/color_picker/color_palette_display/color_palette_display.js +2 -2
- package/es/components/color_picker/color_palette_display/color_palette_display_fixed.js +1 -1
- package/es/components/color_picker/color_palette_display/color_palette_display_gradient.js +1 -1
- package/es/components/color_picker/color_palette_picker/color_palette_picker.js +4 -4
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/es/components/comment_list/comment_list.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +9 -9
- package/es/components/datagrid/body/data_grid_body.js +14 -9
- package/es/components/datagrid/body/data_grid_body_custom.js +14 -9
- package/es/components/datagrid/body/data_grid_body_virtualized.js +58 -10
- package/es/components/datagrid/body/header/data_grid_header_cell.js +3 -3
- package/es/components/datagrid/body/header/draggable_columns.js +1 -1
- package/es/components/datagrid/controls/column_sorting.js +6 -6
- package/es/components/datagrid/controls/column_sorting_draggable.js +3 -3
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
- package/es/components/datagrid/utils/focus.js +2 -2
- package/es/components/datagrid/utils/in_memory.js +3 -3
- package/es/components/datagrid/utils/scrolling.js +3 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.js +4 -4
- package/es/components/filter_group/filter_button.js +88 -23
- package/es/components/filter_group/filter_button.styles.js +51 -15
- package/es/components/filter_group/filter_group.styles.js +18 -6
- package/es/components/form/range/dual_range.js +1 -1
- package/es/components/form/range/range.js +1 -1
- package/es/components/form/range/range_track.js +1 -1
- package/es/components/form/select/select.js +1 -1
- package/es/components/header/header.js +10 -10
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -3
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/icon/assets/logo_elastic.js +23 -17
- package/es/components/icon/icon.styles.js +1 -1
- package/es/components/key_pad_menu/key_pad_menu.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_elastic.styles.js +2 -2
- package/es/components/loading/loading_spinner.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +9 -4
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/popover/popover.js +1 -1
- package/es/components/responsive/hide_for.js +1 -1
- package/es/components/responsive/show_for.js +1 -1
- package/es/components/search_bar/filters/field_value_selection_filter.js +2 -1
- package/es/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/es/components/search_bar/filters/field_value_toggle_group_filter.js +4 -2
- package/es/components/search_bar/filters/is_filter.js +3 -1
- package/es/components/search_bar/search_bar.a11y.js +3 -3
- package/es/components/search_bar/search_bar.js +3 -3
- package/es/components/search_bar/search_filters.js +2 -2
- package/es/components/selectable/selectable.js +13 -12
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/es/components/side_nav/side_nav.js +2 -2
- package/es/components/table/table_row_cell.js +1 -1
- package/es/components/timeline/timeline.js +1 -1
- package/es/components/toast/global_toast_list.js +27 -20
- package/es/components/tour/tour_step.js +1 -1
- package/es/global_styling/mixins/_button.js +95 -28
- package/es/services/theme/hooks.js +11 -0
- package/es/services/theme/index.js +3 -2
- package/es/services/theme/provider.js +28 -2
- package/es/services/theme/theme_variant.js +22 -0
- package/es/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/es/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/es/themes/amsterdam/theme.js +2 -1
- package/es/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/es/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/es/themes/json/eui_theme_borealis_dark.json +427 -0
- package/es/themes/json/eui_theme_borealis_light.json +427 -0
- package/eui.d.ts +2034 -249
- package/lib/components/badge/color_utils.js +1 -3
- package/lib/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/lib/components/basic_table/basic_table.js +14 -10
- package/lib/components/basic_table/in_memory_table.js +22 -17
- package/lib/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
- package/lib/components/breadcrumbs/breadcrumbs.js +2 -2
- package/lib/components/button/button_display/_button_display.js +1 -1
- package/lib/components/button/button_display/_button_display.styles.js +11 -2
- package/lib/components/button/button_display/_button_display_content.styles.js +6 -3
- package/lib/components/button/button_empty/button_empty.styles.js +10 -11
- package/lib/components/button/button_group/button_group.js +1 -1
- package/lib/components/button/button_group/button_group.styles.js +5 -3
- package/lib/components/button/button_group/button_group_button.js +18 -8
- package/lib/components/button/button_group/button_group_button.styles.js +41 -17
- package/lib/components/button/button_icon/button_icon.js +3 -1
- package/lib/components/collapsible_nav/collapsible_nav.js +1 -0
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/lib/components/color_picker/color_palette_display/color_palette_display.js +2 -2
- package/lib/components/color_picker/color_palette_display/color_palette_display_fixed.js +1 -1
- package/lib/components/color_picker/color_palette_display/color_palette_display_gradient.js +1 -1
- package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +4 -4
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/lib/components/comment_list/comment_list.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +9 -9
- package/lib/components/datagrid/body/data_grid_body.js +14 -9
- package/lib/components/datagrid/body/data_grid_body_custom.js +14 -9
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +58 -10
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +3 -3
- package/lib/components/datagrid/body/header/draggable_columns.js +1 -1
- package/lib/components/datagrid/controls/column_sorting.js +6 -6
- package/lib/components/datagrid/controls/column_sorting_draggable.js +3 -3
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
- package/lib/components/datagrid/utils/focus.js +1 -1
- package/lib/components/datagrid/utils/in_memory.js +3 -3
- package/lib/components/datagrid/utils/scrolling.js +3 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +4 -4
- package/lib/components/empty_prompt/images/illustration.svg +939 -0
- package/lib/components/filter_group/filter_button.js +86 -21
- package/lib/components/filter_group/filter_button.styles.js +51 -15
- package/lib/components/filter_group/filter_group.styles.js +18 -6
- package/lib/components/form/range/dual_range.js +1 -1
- package/lib/components/form/range/range.js +1 -1
- package/lib/components/form/range/range_track.js +1 -1
- package/lib/components/form/select/select.js +1 -1
- package/lib/components/header/header.js +10 -10
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +2 -2
- package/lib/components/icon/assets/logo_elastic.js +23 -17
- package/lib/components/icon/icon.styles.js +1 -1
- package/lib/components/icon/svgs/logo_elastic.svg +7 -9
- package/lib/components/key_pad_menu/key_pad_menu.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_elastic.styles.js +2 -2
- package/lib/components/loading/loading_spinner.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +8 -3
- package/lib/components/popover/popover.js +1 -1
- package/lib/components/responsive/hide_for.js +1 -1
- package/lib/components/responsive/show_for.js +1 -1
- package/lib/components/search_bar/filters/field_value_selection_filter.js +2 -1
- package/lib/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/lib/components/search_bar/filters/field_value_toggle_group_filter.js +4 -2
- package/lib/components/search_bar/filters/is_filter.js +3 -1
- package/lib/components/search_bar/search_bar.a11y.js +3 -3
- package/lib/components/search_bar/search_bar.js +3 -3
- package/lib/components/search_bar/search_filters.js +2 -2
- package/lib/components/selectable/selectable.js +13 -12
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/lib/components/side_nav/side_nav.js +2 -2
- package/lib/components/table/table_row_cell.js +1 -1
- package/lib/components/timeline/timeline.js +1 -1
- package/lib/components/toast/global_toast_list.js +27 -20
- package/lib/global_styling/mixins/_button.js +94 -27
- package/lib/services/theme/hooks.js +12 -1
- package/lib/services/theme/index.js +48 -1
- package/lib/services/theme/provider.js +28 -2
- package/lib/services/theme/theme_variant.js +28 -0
- package/lib/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/lib/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/lib/themes/amsterdam/theme.js +2 -1
- package/lib/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/lib/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/lib/themes/json/eui_theme_borealis_dark.json +427 -0
- package/lib/themes/json/eui_theme_borealis_light.json +427 -0
- package/optimize/es/components/badge/color_utils.js +1 -3
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +6 -3
- package/optimize/es/components/button/button_display/_button_display.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.styles.js +11 -2
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +6 -3
- package/optimize/es/components/button/button_empty/button_empty.styles.js +9 -12
- package/optimize/es/components/button/button_group/button_group.styles.js +5 -3
- package/optimize/es/components/button/button_group/button_group_button.js +12 -8
- package/optimize/es/components/button/button_group/button_group_button.styles.js +43 -19
- package/optimize/es/components/button/button_icon/button_icon.js +4 -2
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +44 -1
- package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
- package/optimize/es/components/datagrid/utils/focus.js +2 -2
- package/optimize/es/components/datagrid/utils/scrolling.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/optimize/es/components/filter_group/filter_button.js +78 -21
- package/optimize/es/components/filter_group/filter_button.styles.js +51 -15
- package/optimize/es/components/filter_group/filter_group.styles.js +18 -6
- package/optimize/es/components/form/select/select.js +1 -1
- package/optimize/es/components/icon/assets/logo_elastic.js +23 -17
- package/optimize/es/components/icon/icon.styles.js +1 -1
- package/optimize/es/components/loading/loading_elastic.styles.js +2 -2
- package/optimize/es/components/markdown_editor/markdown_editor_footer.js +9 -4
- package/optimize/es/components/search_bar/filters/field_value_selection_filter.js +1 -0
- package/optimize/es/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/optimize/es/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
- package/optimize/es/components/search_bar/filters/is_filter.js +3 -1
- package/optimize/es/components/search_bar/search_bar.a11y.js +3 -3
- package/optimize/es/components/selectable/selectable.js +10 -9
- package/optimize/es/components/toast/global_toast_list.js +24 -20
- package/optimize/es/global_styling/mixins/_button.js +95 -28
- package/optimize/es/services/theme/hooks.js +11 -0
- package/optimize/es/services/theme/index.js +3 -2
- package/optimize/es/services/theme/provider.js +28 -2
- package/optimize/es/services/theme/theme_variant.js +22 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/optimize/es/themes/amsterdam/theme.js +2 -1
- package/optimize/es/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/optimize/es/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/optimize/es/themes/json/eui_theme_borealis_dark.json +427 -0
- package/optimize/es/themes/json/eui_theme_borealis_light.json +427 -0
- package/optimize/lib/components/badge/color_utils.js +1 -3
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
- package/optimize/lib/components/button/button_display/_button_display.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.styles.js +11 -2
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +6 -3
- package/optimize/lib/components/button/button_empty/button_empty.styles.js +10 -11
- package/optimize/lib/components/button/button_group/button_group.styles.js +5 -3
- package/optimize/lib/components/button/button_group/button_group_button.js +11 -7
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +41 -17
- package/optimize/lib/components/button/button_icon/button_icon.js +3 -1
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +44 -1
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
- package/optimize/lib/components/datagrid/utils/focus.js +1 -1
- package/optimize/lib/components/datagrid/utils/scrolling.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/optimize/lib/components/empty_prompt/images/illustration.svg +939 -0
- package/optimize/lib/components/filter_group/filter_button.js +76 -19
- package/optimize/lib/components/filter_group/filter_button.styles.js +51 -15
- package/optimize/lib/components/filter_group/filter_group.styles.js +18 -6
- package/optimize/lib/components/form/select/select.js +1 -1
- package/optimize/lib/components/icon/assets/logo_elastic.js +23 -17
- package/optimize/lib/components/icon/icon.styles.js +1 -1
- package/optimize/lib/components/icon/svgs/logo_elastic.svg +7 -9
- package/optimize/lib/components/loading/loading_elastic.styles.js +2 -2
- package/optimize/lib/components/markdown_editor/markdown_editor_footer.js +8 -3
- package/optimize/lib/components/search_bar/filters/field_value_selection_filter.js +1 -0
- package/optimize/lib/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/optimize/lib/components/search_bar/filters/field_value_toggle_group_filter.js +3 -1
- package/optimize/lib/components/search_bar/filters/is_filter.js +3 -1
- package/optimize/lib/components/search_bar/search_bar.a11y.js +3 -3
- package/optimize/lib/components/selectable/selectable.js +10 -9
- package/optimize/lib/components/toast/global_toast_list.js +24 -20
- package/optimize/lib/global_styling/mixins/_button.js +94 -27
- package/optimize/lib/services/theme/hooks.js +12 -1
- package/optimize/lib/services/theme/index.js +48 -1
- package/optimize/lib/services/theme/provider.js +28 -2
- package/optimize/lib/services/theme/theme_variant.js +28 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/optimize/lib/themes/amsterdam/theme.js +2 -1
- package/optimize/lib/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/optimize/lib/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/optimize/lib/themes/json/eui_theme_borealis_dark.json +427 -0
- package/optimize/lib/themes/json/eui_theme_borealis_light.json +427 -0
- package/package.json +8 -9
- package/test-env/components/badge/color_utils.js +1 -3
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +6 -1
- package/test-env/components/basic_table/basic_table.js +14 -10
- package/test-env/components/basic_table/in_memory_table.js +22 -17
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +5 -2
- package/test-env/components/breadcrumbs/breadcrumbs.js +2 -2
- package/test-env/components/button/button_display/_button_display.js +1 -1
- package/test-env/components/button/button_display/_button_display.styles.js +11 -2
- package/test-env/components/button/button_display/_button_display_content.styles.js +6 -3
- package/test-env/components/button/button_empty/button_empty.styles.js +10 -11
- package/test-env/components/button/button_group/button_group.js +1 -1
- package/test-env/components/button/button_group/button_group.styles.js +5 -3
- package/test-env/components/button/button_group/button_group_button.js +18 -8
- package/test-env/components/button/button_group/button_group_button.styles.js +41 -17
- package/test-env/components/button/button_icon/button_icon.js +3 -1
- package/test-env/components/collapsible_nav/collapsible_nav.js +1 -0
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/test-env/components/color_picker/color_palette_display/color_palette_display.js +2 -2
- package/test-env/components/color_picker/color_palette_display/color_palette_display_fixed.js +1 -1
- package/test-env/components/color_picker/color_palette_display/color_palette_display_gradient.js +1 -1
- package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +4 -4
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/test-env/components/comment_list/comment_list.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +9 -9
- package/test-env/components/datagrid/body/data_grid_body.js +14 -9
- package/test-env/components/datagrid/body/data_grid_body_custom.js +14 -9
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +58 -10
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +3 -3
- package/test-env/components/datagrid/body/header/draggable_columns.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting.js +6 -6
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +3 -3
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +11 -1
- package/test-env/components/datagrid/utils/focus.js +1 -1
- package/test-env/components/datagrid/utils/in_memory.js +3 -3
- package/test-env/components/datagrid/utils/scrolling.js +3 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +4 -4
- package/test-env/components/filter_group/filter_button.js +86 -21
- package/test-env/components/filter_group/filter_button.styles.js +51 -15
- package/test-env/components/filter_group/filter_group.styles.js +18 -6
- package/test-env/components/form/range/dual_range.js +1 -1
- package/test-env/components/form/range/range.js +1 -1
- package/test-env/components/form/range/range_track.js +1 -1
- package/test-env/components/form/select/select.js +1 -1
- package/test-env/components/header/header.js +10 -10
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +2 -2
- package/test-env/components/icon/assets/logo_elastic.js +23 -17
- package/test-env/components/icon/icon.styles.js +1 -1
- package/test-env/components/key_pad_menu/key_pad_menu.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_elastic.styles.js +2 -2
- package/test-env/components/loading/loading_spinner.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +8 -3
- package/test-env/components/popover/popover.js +1 -1
- package/test-env/components/responsive/hide_for.js +1 -1
- package/test-env/components/responsive/show_for.js +1 -1
- package/test-env/components/search_bar/filters/field_value_selection_filter.js +2 -1
- package/test-env/components/search_bar/filters/field_value_toggle_filter.js +3 -1
- package/test-env/components/search_bar/filters/field_value_toggle_group_filter.js +4 -2
- package/test-env/components/search_bar/filters/is_filter.js +3 -1
- package/test-env/components/search_bar/search_bar.a11y.js +3 -3
- package/test-env/components/search_bar/search_bar.js +3 -3
- package/test-env/components/search_bar/search_filters.js +2 -2
- package/test-env/components/selectable/selectable.js +13 -12
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/test-env/components/side_nav/side_nav.js +2 -2
- package/test-env/components/table/table_row_cell.js +1 -1
- package/test-env/components/timeline/timeline.js +1 -1
- package/test-env/components/toast/global_toast_list.js +24 -20
- package/test-env/global_styling/mixins/_button.js +94 -27
- package/test-env/services/theme/hooks.js +12 -1
- package/test-env/services/theme/index.js +48 -1
- package/test-env/services/theme/provider.js +28 -2
- package/test-env/services/theme/theme_variant.js +28 -0
- package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +348 -147
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +229 -224
- package/test-env/themes/amsterdam/theme.js +2 -1
- package/test-env/themes/json/eui_theme_amsterdam_dark.json +427 -0
- package/test-env/themes/json/eui_theme_amsterdam_light.json +427 -0
- package/test-env/themes/json/eui_theme_borealis_dark.json +427 -0
- package/test-env/themes/json/eui_theme_borealis_light.json +427 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color", "toolTipContent", "toolTipProps"];
|
|
5
|
+
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color", "toolTipContent", "toolTipProps", "contentProps"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
/*
|
|
@@ -15,7 +15,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
15
15
|
|
|
16
16
|
import classNames from 'classnames';
|
|
17
17
|
import React from 'react';
|
|
18
|
-
import { useEuiMemoizedStyles } from '../../../services';
|
|
18
|
+
import { isEuiThemeRefreshVariant, useEuiMemoizedStyles, useEuiTheme } from '../../../services';
|
|
19
19
|
import { useEuiButtonColorCSS } from '../../../global_styling/mixins/_button';
|
|
20
20
|
import { useInnerText } from '../../inner_text';
|
|
21
21
|
import { EuiButtonDisplay } from '../button_display/_button_display';
|
|
@@ -36,17 +36,21 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
36
36
|
_color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
37
37
|
toolTipContent = _ref.toolTipContent,
|
|
38
38
|
toolTipProps = _ref.toolTipProps,
|
|
39
|
+
contentProps = _ref.contentProps,
|
|
39
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
+
var euiThemeContext = useEuiTheme();
|
|
42
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
40
43
|
var isCompressed = size === 'compressed';
|
|
41
44
|
var color = isDisabled ? 'disabled' : _color;
|
|
42
|
-
var
|
|
45
|
+
var hasBorder = isRefreshVariant && color !== 'text' && !isCompressed;
|
|
46
|
+
var display = isSelected ? 'fill' : isCompressed || hasBorder ? 'empty' : 'base';
|
|
43
47
|
var hasToolTip = !!toolTipContent;
|
|
44
48
|
var styles = useEuiMemoizedStyles(euiButtonGroupButtonStyles);
|
|
45
49
|
var focusColorStyles = useEuiMemoizedStyles(_compressedButtonFocusColors);
|
|
46
50
|
var buttonColorStyles = useEuiButtonColorCSS({
|
|
47
51
|
display: display
|
|
48
52
|
})[color];
|
|
49
|
-
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]];
|
|
53
|
+
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], hasBorder && styles.hasBorder];
|
|
50
54
|
var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
|
|
51
55
|
var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
|
|
52
56
|
var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
|
|
@@ -74,9 +78,9 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
74
78
|
className: buttonClasses,
|
|
75
79
|
isDisabled: isDisabled,
|
|
76
80
|
size: size === 'compressed' ? 's' : size,
|
|
77
|
-
contentProps: {
|
|
78
|
-
css: contentStyles
|
|
79
|
-
},
|
|
81
|
+
contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
|
|
82
|
+
css: [contentStyles, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
|
|
83
|
+
}),
|
|
80
84
|
textProps: {
|
|
81
85
|
css: textStyles,
|
|
82
86
|
ref: buttonTextRef,
|
|
@@ -12,17 +12,17 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { css } from '@emotion/react';
|
|
15
|
-
import { makeDisabledContrastColor } from '../../../services';
|
|
16
|
-
import { mathWithUnits, logicalCSS, logicalShorthandCSS, euiTextShift, euiOutline, euiCanAnimate } from '../../../global_styling';
|
|
15
|
+
import { isEuiThemeRefreshVariant, makeDisabledContrastColor } from '../../../services';
|
|
16
|
+
import { mathWithUnits, logicalCSS, logicalShorthandCSS, euiTextShift, euiOutline, euiCanAnimate, preventForcedColors, highContrastModeStyles } from '../../../global_styling';
|
|
17
17
|
import { euiButtonFillColor, BUTTON_COLORS } from '../../../global_styling/mixins/_button';
|
|
18
18
|
import { euiScreenReaderOnly } from '../../accessibility';
|
|
19
19
|
import { euiFormVariables } from '../../form/form.styles';
|
|
20
20
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
21
|
-
name: "
|
|
22
|
-
styles: "overflow:hidden;label:tooltipWrapper;"
|
|
21
|
+
name: "m6ysua-tooltipWrapper",
|
|
22
|
+
styles: "overflow:hidden;&:has(:focus-visible){z-index:1;};label:tooltipWrapper;"
|
|
23
23
|
} : {
|
|
24
|
-
name: "
|
|
25
|
-
styles: "overflow:hidden;label:tooltipWrapper;",
|
|
24
|
+
name: "m6ysua-tooltipWrapper",
|
|
25
|
+
styles: "overflow:hidden;&:has(:focus-visible){z-index:1;};label:tooltipWrapper;",
|
|
26
26
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
27
|
};
|
|
28
28
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
@@ -36,48 +36,70 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
36
36
|
export var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeContext) {
|
|
37
37
|
var euiTheme = euiThemeContext.euiTheme,
|
|
38
38
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
39
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
39
40
|
var _euiFormVariables = euiFormVariables(euiThemeContext),
|
|
40
41
|
controlCompressedHeight = _euiFormVariables.controlCompressedHeight,
|
|
41
42
|
controlCompressedBorderRadius = _euiFormVariables.controlCompressedBorderRadius;
|
|
42
43
|
var compressedButtonHeight = mathWithUnits([controlCompressedHeight, euiTheme.border.width.thin], function (x, y) {
|
|
43
|
-
return x - y * 2;
|
|
44
|
+
return isRefreshVariant ? x - y * 6 : x - y * 2;
|
|
44
45
|
});
|
|
46
|
+
var selectedSelectors = '.euiButtonGroupButton-isSelected, .euiButtonGroup__tooltipWrapper-isSelected';
|
|
45
47
|
var uncompressedBorderRadii = function uncompressedBorderRadii(radiusSize) {
|
|
46
|
-
return "\n border-radius: 0;\n\n &:first-child {\n ".concat(logicalShorthandCSS('border-radius', "".concat(radiusSize, " 0 0 ").concat(radiusSize)), "\n }\n\n &:last-child {\n ").concat(logicalShorthandCSS('border-radius', "0 ".concat(radiusSize, " ").concat(radiusSize, " 0")), "\n }\n ");
|
|
48
|
+
return "\n border-radius: 0;\n\n &:first-child {\n ".concat(logicalShorthandCSS('border-radius', "".concat(radiusSize, " 0 0 ").concat(radiusSize)), "\n }\n\n &:last-child {\n ").concat(logicalShorthandCSS('border-radius', "0 ".concat(radiusSize, " ").concat(radiusSize, " 0")), "\n }\n\n &:first-child:last-child {\n ").concat(logicalShorthandCSS('border-radius', "".concat(radiusSize)), "\n }\n ");
|
|
47
49
|
};
|
|
50
|
+
var refreshVariantStyles = "\n &:is(".concat(selectedSelectors, ") {\n ").concat(highContrastModeStyles(euiThemeContext, {
|
|
51
|
+
forced: "\n --highContrastHoverIndicatorColor: ".concat(euiTheme.colors.textInverse, ";\n border: none;\n\n /* styles the content manually instead of the button itself to preserve the system\n focus style, as otherwise preventForcedColors() would require manual styling */\n > [class*=\"euiButtonDisplayContent\"] {\n ").concat(preventForcedColors(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n border: none;\n }\n ")
|
|
52
|
+
}), "\n }\n ");
|
|
53
|
+
var uncompressedStyles = isRefreshVariant ? "\n &:is(".concat(selectedSelectors, "):not(:disabled) {\n z-index: 1;\n /* prevent layout jumps due to missing border for selected/filled buttons */\n border: ").concat(euiTheme.border.width.thin, " solid transparent;\n\n ").concat(highContrastModeStyles(euiThemeContext, {
|
|
54
|
+
forced: "\n /* use inset focus outline to ensure visibility, same as custom hover.\n NOTE: temp solution - this will be revisited once we handle global focus styles */\n &:focus-visible {\n outline-color: ".concat(euiTheme.colors.textInverse, ";\n /* has to be inset due to overflow: hidden */\n outline-offset: -").concat(mathWithUnits(euiTheme.border.width.thin, function (x) {
|
|
55
|
+
return x * 4;
|
|
56
|
+
}), ";\n }\n ")
|
|
57
|
+
}), "\n }\n ") : "\n &:is(.euiButtonGroupButton-isSelected) {\n font-weight: ".concat(euiTheme.font.weight.bold, ";\n }\n ");
|
|
58
|
+
var compressedStyles = isRefreshVariant ? "\n margin: ".concat(euiTheme.size.xxs, ";\n border-radius: ").concat(mathWithUnits(euiTheme.border.radius.small, function (x) {
|
|
59
|
+
return x / 2;
|
|
60
|
+
}), ";\n\n & + .euiButtonGroupButton {\n ").concat(logicalCSS('margin-left', '0'), "\n }\n\n &:is(").concat(selectedSelectors, "):not(:disabled) {\n /* prevent layout jumps due to missing border for non-selected buttons */\n border: none;\n\n ").concat(highContrastModeStyles(euiThemeContext, {
|
|
61
|
+
forced: "\n /* use inset focus outline to ensure visibility, same as custom hover.\n NOTE: temp solution - this will be revisited once we handle global focus styles */\n &:focus-visible {\n outline-color: ".concat(euiTheme.colors.textInverse, ";\n /* has to be inset due to overflow: hidden */\n outline-offset: -").concat(mathWithUnits(euiTheme.border.width.thin, function (x) {
|
|
62
|
+
return x * 3;
|
|
63
|
+
}), ";\n }\n ")
|
|
64
|
+
}), "\n }\n ") : "\n background-clip: content-box;\n /* Tweak border radius to account for the padding & background-clip */\n border-radius: ".concat(mathWithUnits([controlCompressedBorderRadius, euiTheme.border.width.thin], function (x, y) {
|
|
65
|
+
return x + y;
|
|
66
|
+
}), ";\n\n &:is(.euiButtonGroupButton-isSelected) {\n font-weight: ").concat(euiTheme.font.weight.semiBold, ";\n }\n ");
|
|
48
67
|
return {
|
|
49
68
|
// Base
|
|
50
|
-
euiButtonGroupButton: /*#__PURE__*/css(logicalCSS('min-width', 0), " flex-shrink:1;flex-grow:0;z-index:0;&:focus-visible{z-index:
|
|
69
|
+
euiButtonGroupButton: /*#__PURE__*/css(logicalCSS('min-width', 0), " flex-shrink:1;flex-grow:0;z-index:0;&:focus-visible{z-index:2;}", euiCanAnimate, "{transition:background-color ", euiTheme.animation.normal, " ease-in-out,color ", euiTheme.animation.normal, " ease-in-out;}", isRefreshVariant && refreshVariantStyles, ";;label:euiButtonGroupButton;"),
|
|
51
70
|
iconOnly: /*#__PURE__*/css("padding-inline:", euiTheme.size.s, ";;label:iconOnly;"),
|
|
52
71
|
// Sizes
|
|
53
72
|
uncompressed: {
|
|
54
|
-
uncompressed: /*#__PURE__*/css("&:
|
|
73
|
+
uncompressed: /*#__PURE__*/css("&:focus-visible{", euiOutline(euiThemeContext, 'inset', euiTheme.components.buttonGroupFocusColor), ";}", uncompressedStyles, ";;label:uncompressed;"),
|
|
55
74
|
get borders() {
|
|
56
75
|
// We use pseudo elements to avoid affecing button width, and to allow
|
|
57
76
|
// inheriting high contrast border colors
|
|
58
|
-
var selectors =
|
|
77
|
+
var selectors = selectedSelectors;
|
|
59
78
|
var selectedColor = highContrastMode ? euiTheme.colors.emptyShade : euiTheme.components.buttonGroupBorderColorSelected;
|
|
60
79
|
var unselectedColor = highContrastMode ? 'inherit' : euiTheme.components.buttonGroupBorderColor;
|
|
80
|
+
var borderWidth = euiTheme.border.width.thin;
|
|
81
|
+
var borderStyles = isRefreshVariant ? "\n &:not(:first-child) {\n margin-inline-start: -".concat(borderWidth, ";\n }\n\n &:is(").concat(selectors, ") {\n &::before {\n position: absolute;\n z-index: 1;\n ").concat(logicalCSS('left', 0), "\n ").concat(logicalCSS('vertical', "-".concat(euiTheme.border.width.thin)), "\n ").concat(logicalCSS('border-left-style', 'solid'), "\n ").concat(logicalCSS('border-left-width', euiTheme.border.width.thin), "\n pointer-events: none;\n\n ").concat(preventForcedColors(euiThemeContext), "\n }\n }\n ") : "\n &::before {\n position: absolute;\n ".concat(logicalCSS('left', 0), "\n ").concat(logicalCSS('vertical', highContrastMode ? "-".concat(euiTheme.border.width.thin) : 0), "\n ").concat(logicalCSS('border-left-style', 'solid'), "\n ").concat(logicalCSS('border-left-width', euiTheme.border.width.thin), "\n pointer-events: none;\n }\n ");
|
|
61
82
|
|
|
62
83
|
// "Borders" between buttons should be present between two of the same colored buttons,
|
|
63
84
|
// and absent between selected vs non-selected buttons (different colors)
|
|
64
|
-
return "\n position: relative;\n\n
|
|
85
|
+
return "\n position: relative;\n\n ".concat(borderStyles, "\n\n &:not(").concat(selectors, ") + *:not(").concat(selectors, ") {\n &::before {\n content: '';\n border-color: ").concat(unselectedColor, ";\n }\n }\n\n &:is(").concat(selectors, ") + *:is(").concat(selectors, ") {\n &::before {\n content: '';\n border-color: ").concat(selectedColor, ";\n }\n }\n ");
|
|
65
86
|
},
|
|
66
87
|
get s() {
|
|
67
88
|
return /*#__PURE__*/css(this.borders, " ", uncompressedBorderRadii(euiTheme.border.radius.small), ";;label:s;");
|
|
68
89
|
},
|
|
69
90
|
get m() {
|
|
70
|
-
|
|
91
|
+
var radius = isRefreshVariant ? euiTheme.border.radius.small : euiTheme.border.radius.medium;
|
|
92
|
+
return /*#__PURE__*/css(this.borders, " ", uncompressedBorderRadii(radius), ";;label:m;");
|
|
71
93
|
},
|
|
72
94
|
hasToolTip: _ref2
|
|
73
95
|
},
|
|
74
|
-
compressed: /*#__PURE__*/css(logicalCSS('height', compressedButtonHeight), " line-height:", compressedButtonHeight, ";padding:", mathWithUnits(euiTheme.border.width.thin, function (x) {
|
|
96
|
+
compressed: /*#__PURE__*/css(logicalCSS('height', compressedButtonHeight), " line-height:", compressedButtonHeight, ";font-weight:", euiTheme.font.weight.regular, ";padding:", isRefreshVariant ? '0' : mathWithUnits(euiTheme.border.width.thin, function (x) {
|
|
75
97
|
return x * 2;
|
|
76
|
-
}), ";
|
|
77
|
-
return x + y;
|
|
78
|
-
}), ";font-weight:", euiTheme.font.weight.regular, ";&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.semiBold, ";};label:compressed;"),
|
|
98
|
+
}), ";", compressedStyles, ";;label:compressed;"),
|
|
79
99
|
// States
|
|
80
|
-
disabledAndSelected: /*#__PURE__*/css("color:", makeDisabledContrastColor(euiTheme.colors.textDisabled)(euiTheme.components.buttonGroupBackgroundDisabledSelected), ";background-color:", euiTheme.components.buttonGroupBackgroundDisabledSelected, ";border:", highContrastMode
|
|
100
|
+
disabledAndSelected: /*#__PURE__*/css("color:", isRefreshVariant ? euiTheme.colors.textDisabled : makeDisabledContrastColor(euiTheme.colors.textDisabled)(euiTheme.components.buttonGroupBackgroundDisabledSelected), ";background-color:", euiTheme.components.buttonGroupBackgroundDisabledSelected, ";border:", highContrastMode ? "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.components.buttonGroupBackgroundDisabledSelected) : isRefreshVariant ? "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.borderBasePlain) : '', ";;label:disabledAndSelected;"),
|
|
101
|
+
// Skip css`` to avoid generating a className
|
|
102
|
+
hasBorder: "\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBasePlain, ";\n "),
|
|
81
103
|
// Tooltip anchor wrapper
|
|
82
104
|
tooltipWrapper: _ref,
|
|
83
105
|
// Content wrapper
|
|
@@ -93,10 +115,12 @@ export var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiT
|
|
|
93
115
|
};
|
|
94
116
|
};
|
|
95
117
|
export var _compressedButtonFocusColors = function _compressedButtonFocusColors(euiThemeContext) {
|
|
118
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
119
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
96
120
|
var colors = [].concat(_toConsumableArray(BUTTON_COLORS), ['disabled']);
|
|
97
121
|
return colors.reduce(function (acc, color) {
|
|
98
122
|
var _euiButtonFillColor = euiButtonFillColor(euiThemeContext, color),
|
|
99
123
|
backgroundColor = _euiButtonFillColor.backgroundColor;
|
|
100
|
-
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("&:focus-visible{", euiOutline(euiThemeContext, 'center', backgroundColor), " &:is(.euiButtonGroupButton-isSelected){outline-offset:0;}
|
|
124
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("&:focus-visible{", euiOutline(euiThemeContext, isRefreshVariant ? 'outset' : 'center', isRefreshVariant ? euiTheme.focus.color : backgroundColor), " ", !isRefreshVariant && "\n &:is(.euiButtonGroupButton-isSelected) {\n outline-offset: 0;\n }\n ", ";}")));
|
|
101
125
|
}, {});
|
|
102
126
|
};
|
|
@@ -11,7 +11,7 @@ var _excluded = ["className", "iconType", "iconSize", "color", "isDisabled", "di
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import { getSecureRelForTarget, useEuiMemoizedStyles } from '../../../services';
|
|
14
|
+
import { getSecureRelForTarget, isEuiThemeRefreshVariant, useEuiMemoizedStyles, useEuiTheme } from '../../../services';
|
|
15
15
|
import { EuiIcon } from '../../icon';
|
|
16
16
|
import { EuiLoadingSpinner } from '../../loading';
|
|
17
17
|
import { useEuiButtonColorCSS, useEuiButtonFocusCSS } from '../../../global_styling/mixins/_button';
|
|
@@ -42,6 +42,8 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
42
42
|
isSelected = _ref.isSelected,
|
|
43
43
|
isLoading = _ref.isLoading,
|
|
44
44
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
|
+
var euiThemeContext = useEuiTheme();
|
|
46
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
45
47
|
var isDisabled = isButtonDisabled({
|
|
46
48
|
isDisabled: _isDisabled || disabled,
|
|
47
49
|
href: href,
|
|
@@ -58,7 +60,7 @@ export var EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
58
60
|
var buttonFocusStyle = useEuiButtonFocusCSS();
|
|
59
61
|
var emptyHoverStyles = useEuiMemoizedStyles(_emptyHoverStyles);
|
|
60
62
|
var styles = useEuiMemoizedStyles(euiButtonIconStyles);
|
|
61
|
-
var cssStyles = [styles.euiButtonIcon, styles[size], buttonColorStyles[isDisabled ? 'disabled' : color], buttonFocusStyle, display === 'empty' && !isDisabled && emptyHoverStyles[color], isDisabled && styles.isDisabled];
|
|
63
|
+
var cssStyles = [styles.euiButtonIcon, styles[size], buttonColorStyles[isDisabled ? 'disabled' : color], buttonFocusStyle, !isRefreshVariant && display === 'empty' && !isDisabled && emptyHoverStyles[color], isDisabled && styles.isDisabled];
|
|
62
64
|
var classes = classNames('euiButtonIcon', className);
|
|
63
65
|
|
|
64
66
|
// Add an icon to the button if one exists.
|
|
@@ -300,6 +300,48 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
|
|
|
300
300
|
footerRow: footerRow
|
|
301
301
|
};
|
|
302
302
|
}, [headerRowHeight, headerRow, footerRow]);
|
|
303
|
+
var onScroll = useCallback(function (args) {
|
|
304
|
+
// check only if a callback is passed
|
|
305
|
+
if (typeof (virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.onScroll) !== 'function') return;
|
|
306
|
+
var enhancedArgs = _objectSpread(_objectSpread({}, args), {}, {
|
|
307
|
+
scrollHeight: 0,
|
|
308
|
+
scrollWidth: 0,
|
|
309
|
+
clientHeight: 0,
|
|
310
|
+
clientWidth: 0,
|
|
311
|
+
isScrolledToBlockStart: args.scrollTop === 0,
|
|
312
|
+
isScrolledToBlockEnd: false,
|
|
313
|
+
isScrolledToInlineStart: args.scrollLeft === 0,
|
|
314
|
+
isScrolledToInlineEnd: false
|
|
315
|
+
});
|
|
316
|
+
if (outerGridRef.current) {
|
|
317
|
+
var _outerGridRef$current = outerGridRef.current,
|
|
318
|
+
scrollTop = _outerGridRef$current.scrollTop,
|
|
319
|
+
scrollLeft = _outerGridRef$current.scrollLeft,
|
|
320
|
+
scrollHeight = _outerGridRef$current.scrollHeight,
|
|
321
|
+
scrollWidth = _outerGridRef$current.scrollWidth,
|
|
322
|
+
clientHeight = _outerGridRef$current.clientHeight,
|
|
323
|
+
clientWidth = _outerGridRef$current.clientWidth;
|
|
324
|
+
var isScrollableVertical = scrollHeight > clientHeight;
|
|
325
|
+
var isScrolledToBlockStart = scrollTop === 0;
|
|
326
|
+
var isScrollableHorizontal = scrollWidth > clientWidth;
|
|
327
|
+
var isScrolledToInlineStart = scrollLeft === 0;
|
|
328
|
+
var isScrolledToBlockEnd = isScrollableVertical && !isScrolledToBlockStart && scrollHeight - scrollTop <= clientHeight;
|
|
329
|
+
var isScrolledToInlineEnd = isScrollableHorizontal && !isScrolledToInlineStart && scrollWidth - scrollLeft <= clientWidth;
|
|
330
|
+
enhancedArgs = _objectSpread(_objectSpread({}, enhancedArgs), {}, {
|
|
331
|
+
scrollTop: scrollTop,
|
|
332
|
+
scrollLeft: scrollLeft,
|
|
333
|
+
scrollHeight: scrollHeight,
|
|
334
|
+
scrollWidth: scrollWidth,
|
|
335
|
+
clientHeight: clientHeight,
|
|
336
|
+
clientWidth: clientWidth,
|
|
337
|
+
isScrolledToBlockStart: isScrolledToBlockStart,
|
|
338
|
+
isScrolledToBlockEnd: isScrolledToBlockEnd,
|
|
339
|
+
isScrolledToInlineStart: isScrolledToInlineStart,
|
|
340
|
+
isScrolledToInlineEnd: isScrolledToInlineEnd
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
return virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.onScroll(enhancedArgs);
|
|
344
|
+
}, [outerGridRef, virtualizationOptions]);
|
|
303
345
|
return IS_JEST_ENVIRONMENT || finalWidth > 0 ? ___EmotionJSX(DataGridWrapperRowsContext.Provider, {
|
|
304
346
|
value: rowWrapperContextValue
|
|
305
347
|
}, ___EmotionJSX(Grid, _extends({}, virtualizationOptions, {
|
|
@@ -315,7 +357,8 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
|
|
|
315
357
|
height: finalHeight,
|
|
316
358
|
rowHeight: getRowHeight,
|
|
317
359
|
itemData: itemData,
|
|
318
|
-
rowCount: IS_JEST_ENVIRONMENT || headerRowHeight > 0 ? visibleRowCount : 0
|
|
360
|
+
rowCount: IS_JEST_ENVIRONMENT || headerRowHeight > 0 ? visibleRowCount : 0,
|
|
361
|
+
onScroll: onScroll
|
|
319
362
|
}), Cell), scrollBorderOverlay) : null;
|
|
320
363
|
});
|
|
321
364
|
EuiDataGridBodyVirtualized.displayName = 'EuiDataGridBodyVirtualized';
|
|
@@ -13,6 +13,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { css } from '@emotion/react';
|
|
16
|
+
import { useEuiTheme, useEuiThemeRefreshVariant } from '../../../services';
|
|
16
17
|
import { EuiButtonEmpty } from '../../button';
|
|
17
18
|
import { EuiNotificationBadge } from '../../badge';
|
|
18
19
|
import { useEuiI18n } from '../../i18n';
|
|
@@ -23,7 +24,12 @@ export var EuiDataGridToolbarControl = function EuiDataGridToolbarControl(_ref)
|
|
|
23
24
|
badgeContent = _ref.badgeContent,
|
|
24
25
|
textProps = _ref.textProps,
|
|
25
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
+
var euiThemeContext = useEuiTheme();
|
|
28
|
+
var isRefreshVariant = useEuiThemeRefreshVariant('buttonVariant');
|
|
26
29
|
var classes = classNames('euiDataGridToolbarControl', className);
|
|
30
|
+
var cssStyles = isRefreshVariant ?
|
|
31
|
+
// passes euiThemeContext here instead via `css` to ensure legacy Enzyme tests work
|
|
32
|
+
interactiveStyles(euiThemeContext) : underlineStyles;
|
|
27
33
|
var badgeAriaLabel = useEuiI18n('euiDataGridToolbarControl.badgeAriaLabel', 'Active: {count}', {
|
|
28
34
|
count: typeof badgeContent === 'string' ? betterScreenReaderSlashes(badgeContent) : badgeContent
|
|
29
35
|
});
|
|
@@ -32,7 +38,7 @@ export var EuiDataGridToolbarControl = function EuiDataGridToolbarControl(_ref)
|
|
|
32
38
|
size: "xs",
|
|
33
39
|
color: "text",
|
|
34
40
|
textProps: false,
|
|
35
|
-
css:
|
|
41
|
+
css: cssStyles
|
|
36
42
|
}, rest), ___EmotionJSX("span", _extends({}, textProps, {
|
|
37
43
|
className: classNames('euiDataGridToolbarControl__text', 'eui-textTruncate', textProps && textProps.className)
|
|
38
44
|
}), children), Boolean(badgeContent) && ___EmotionJSX(EuiNotificationBadge, {
|
|
@@ -60,6 +66,10 @@ var underlineStyles = process.env.NODE_ENV === "production" ? {
|
|
|
60
66
|
styles: "&:focus,&:hover:not(:disabled){text-decoration:none;.euiDataGridToolbarControl__text{text-decoration:underline;}};label:underlineStyles;",
|
|
61
67
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
62
68
|
};
|
|
69
|
+
var interactiveStyles = function interactiveStyles(_ref2) {
|
|
70
|
+
var euiTheme = _ref2.euiTheme;
|
|
71
|
+
return /*#__PURE__*/css("&:focus,&:hover:not(:disabled){.euiDataGridToolbarControl__badge{background-color:", euiTheme.components.filterButtonBadgeBackgroundHover, ";}};label:interactiveStyles;");
|
|
72
|
+
};
|
|
63
73
|
var badgeStyles = process.env.NODE_ENV === "production" ? {
|
|
64
74
|
name: "1968nw3-badgeStyles",
|
|
65
75
|
styles: "cursor:inherit;label:badgeStyles;"
|
|
@@ -7,7 +7,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
7
7
|
* Side Public License, v 1.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { createContext, useCallback,
|
|
10
|
+
import { createContext, useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
11
11
|
import { tabbable } from 'tabbable';
|
|
12
12
|
import { keys } from '../../../services';
|
|
13
13
|
export var DataGridFocusContext = /*#__PURE__*/createContext({
|
|
@@ -55,7 +55,7 @@ export var useFocus = function useFocus() {
|
|
|
55
55
|
});
|
|
56
56
|
}, []);
|
|
57
57
|
var previousCell = useRef(undefined);
|
|
58
|
-
|
|
58
|
+
useLayoutEffect(function () {
|
|
59
59
|
if (previousCell.current) {
|
|
60
60
|
notifyCellOfFocusState(cellsUpdateFocus.current, previousCell.current, false);
|
|
61
61
|
}
|
|
@@ -15,6 +15,7 @@ import { DataGridCellPopoverContext } from '../body/cell';
|
|
|
15
15
|
import { DataGridFocusContext } from './focus';
|
|
16
16
|
import { euiDataGridScrollBarStyles } from './scrolling.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
+
var ACTIONS_MENU_HEIGHT = 21;
|
|
18
19
|
/**
|
|
19
20
|
* The primary goal of this scroll logic is to ensure keyboard navigation works accessibly,
|
|
20
21
|
* but there are other scenarios where it applies (e.g. clicking partially-visible cells)
|
|
@@ -168,7 +169,8 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
|
|
|
168
169
|
if (topHeightOutOfView > 0) {
|
|
169
170
|
// Note: This overrides the bottom side being out of bounds, as we want to prefer
|
|
170
171
|
// showing the top-left corner of items if a cell is larger than the grid container
|
|
171
|
-
|
|
172
|
+
// Additionally, add an offset for the actions menu
|
|
173
|
+
adjustedScrollTop = cellTopPos - headerRowHeight - ACTIONS_MENU_HEIGHT;
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
176
|
|
package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js
CHANGED
|
@@ -177,7 +177,8 @@ export var EuiQuickSelect = /*#__PURE__*/function (_Component) {
|
|
|
177
177
|
default: "Previous time window"
|
|
178
178
|
}, function (previousLabel) {
|
|
179
179
|
return ___EmotionJSX(EuiToolTip, {
|
|
180
|
-
content: previousLabel
|
|
180
|
+
content: previousLabel,
|
|
181
|
+
disableScreenReaderOutput: true
|
|
181
182
|
}, ___EmotionJSX(EuiButtonIcon, {
|
|
182
183
|
"aria-label": previousLabel,
|
|
183
184
|
iconType: "arrowLeft",
|
|
@@ -190,7 +191,8 @@ export var EuiQuickSelect = /*#__PURE__*/function (_Component) {
|
|
|
190
191
|
default: "Next time window"
|
|
191
192
|
}, function (nextLabel) {
|
|
192
193
|
return ___EmotionJSX(EuiToolTip, {
|
|
193
|
-
content: nextLabel
|
|
194
|
+
content: nextLabel,
|
|
195
|
+
disableScreenReaderOutput: true
|
|
194
196
|
}, ___EmotionJSX(EuiButtonIcon, {
|
|
195
197
|
"aria-label": nextLabel,
|
|
196
198
|
iconType: "arrowRight",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["children", "className", "iconType", "iconSide", "color", "badgeColor", "hasActiveFilters", "numFilters", "numActiveFilters", "isDisabled", "isSelected", "type", "grow", "withNext", "textProps", "contentProps"];
|
|
5
|
+
var _excluded = ["children", "className", "iconType", "iconSide", "color", "badgeColor", "hasActiveFilters", "numFilters", "numActiveFilters", "isToggle", "isDisabled", "isSelected", "type", "grow", "withNext", "textProps", "contentProps"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
/*
|
|
@@ -15,12 +15,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
15
15
|
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import classNames from 'classnames';
|
|
18
|
-
import { useEuiMemoizedStyles } from '../../services';
|
|
18
|
+
import { EuiThemeProvider, useEuiMemoizedStyles, useEuiTheme, useGeneratedHtmlId, useEuiThemeRefreshVariant } from '../../services';
|
|
19
19
|
import { useEuiI18n } from '../i18n';
|
|
20
20
|
import { useInnerText } from '../inner_text';
|
|
21
21
|
import { EuiNotificationBadge } from '../badge';
|
|
22
22
|
import { EuiButtonEmpty } from '../button/button_empty';
|
|
23
|
-
import { euiFilterButtonStyles, euiFilterButtonChildStyles } from './filter_button.styles';
|
|
23
|
+
import { euiFilterButtonStyles, euiFilterButtonWrapperStyles, euiFilterButtonChildStyles } from './filter_button.styles';
|
|
24
|
+
import { EuiButtonGroupButton } from '../button/button_group/button_group_button';
|
|
25
|
+
import { _compressedButtonFocusColors } from '../button/button_group/button_group_button.styles';
|
|
24
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
27
|
export var EuiFilterButton = function EuiFilterButton(_ref) {
|
|
26
28
|
var children = _ref.children,
|
|
@@ -35,6 +37,7 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
35
37
|
hasActiveFilters = _ref.hasActiveFilters,
|
|
36
38
|
numFilters = _ref.numFilters,
|
|
37
39
|
numActiveFilters = _ref.numActiveFilters,
|
|
40
|
+
isToggle = _ref.isToggle,
|
|
38
41
|
isDisabled = _ref.isDisabled,
|
|
39
42
|
isSelected = _ref.isSelected,
|
|
40
43
|
_ref$type = _ref.type,
|
|
@@ -45,18 +48,37 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
45
48
|
textProps = _ref.textProps,
|
|
46
49
|
contentProps = _ref.contentProps,
|
|
47
50
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
51
|
+
var id = useGeneratedHtmlId({
|
|
52
|
+
prefix: 'filter-button'
|
|
53
|
+
});
|
|
48
54
|
var numFiltersDefined = numFilters != null; // != instead of !== to allow for null and undefined
|
|
49
55
|
var numActiveFiltersDefined = numActiveFilters != null && numActiveFilters > 0;
|
|
56
|
+
var euiThemeContext = useEuiTheme();
|
|
57
|
+
var colorMode = euiThemeContext.colorMode;
|
|
58
|
+
var isRefreshVariant = useEuiThemeRefreshVariant('buttonVariant');
|
|
59
|
+
|
|
60
|
+
// assumption about type of usage based on icon usage
|
|
61
|
+
// requires manual override to apply correct aria attributes for more custom usages
|
|
62
|
+
var isCollapsible = !isToggle && iconType === 'arrowDown';
|
|
63
|
+
// NOTE: in Amsterdam `hasActiveFilters` applies selected styling while `isSelected` does not.
|
|
64
|
+
// With Borealis this is more granular as EuiFilterButton now supports proper toggle buttons next to regular buttons
|
|
65
|
+
var isExpanded = isCollapsible && (isSelected !== null && isSelected !== void 0 ? isSelected : hasActiveFilters);
|
|
50
66
|
var styles = useEuiMemoizedStyles(euiFilterButtonStyles);
|
|
51
|
-
var
|
|
67
|
+
var focusColorStyles = useEuiMemoizedStyles(_compressedButtonFocusColors);
|
|
68
|
+
var toggleVariantStyles = isRefreshVariant ? [isToggle && styles.buttonType.toggle, !isToggle && !isDisabled && focusColorStyles[color], !isToggle && styles.buttonType.default] : [isToggle && styles.buttonType.toggle];
|
|
69
|
+
var cssStyles = [styles.euiFilterButton, !isRefreshVariant && withNext && styles.withNext, hasActiveFilters && styles.hasActiveFilters].concat(toggleVariantStyles);
|
|
70
|
+
var wrapperStyles = useEuiMemoizedStyles(euiFilterButtonWrapperStyles);
|
|
71
|
+
var wrapperCssStyles = [wrapperStyles.wrapper, isRefreshVariant && withNext && styles.withNext, numFiltersDefined && styles.hasNotification, isToggle && wrapperStyles.hasToggle, !grow && styles.noGrow];
|
|
52
72
|
var _useEuiMemoizedStyles = useEuiMemoizedStyles(euiFilterButtonChildStyles),
|
|
53
73
|
contentStyles = _useEuiMemoizedStyles.content,
|
|
54
74
|
textStyles = _useEuiMemoizedStyles.text,
|
|
55
75
|
notificationStyles = _useEuiMemoizedStyles.notification;
|
|
76
|
+
var wrapperClasses = classNames('euiFilterButton__wrapper');
|
|
56
77
|
var classes = classNames('euiFilterButton', {
|
|
57
78
|
'euiFilterButton-isSelected': isSelected,
|
|
58
79
|
'euiFilterButton-hasActiveFilters': hasActiveFilters,
|
|
59
|
-
'euiFilterButton-hasNotification': numFiltersDefined
|
|
80
|
+
'euiFilterButton-hasNotification': numFiltersDefined,
|
|
81
|
+
'euiFilterButton-isToggle': isRefreshVariant && isToggle
|
|
60
82
|
}, className);
|
|
61
83
|
|
|
62
84
|
/**
|
|
@@ -71,6 +93,16 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
71
93
|
count: badgeCount
|
|
72
94
|
});
|
|
73
95
|
var badgeStyles = [notificationStyles.euiFilterButton__notification, isDisabled && notificationStyles.disabled];
|
|
96
|
+
var badgeContent = ___EmotionJSX(EuiNotificationBadge, {
|
|
97
|
+
className: "euiFilterButton__notification",
|
|
98
|
+
css: badgeStyles,
|
|
99
|
+
"aria-label": hasActiveFilters ? activeBadgeLabel : availableBadgeLabel,
|
|
100
|
+
color: isDisabled || !hasActiveFilters ? 'subdued' : badgeColor,
|
|
101
|
+
role: "marquee" // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/marquee_role
|
|
102
|
+
}, badgeCount);
|
|
103
|
+
var badgeElement = showBadge && (isRefreshVariant ? ___EmotionJSX(EuiThemeProvider, {
|
|
104
|
+
colorMode: isToggle && isSelected ? 'INVERSE' : colorMode
|
|
105
|
+
}, badgeContent) : badgeContent);
|
|
74
106
|
|
|
75
107
|
/**
|
|
76
108
|
* Text
|
|
@@ -84,7 +116,17 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
84
116
|
ref = _useInnerText2[0],
|
|
85
117
|
innerText = _useInnerText2[1];
|
|
86
118
|
var dataText = children && typeof children === 'string' ? children : innerText;
|
|
87
|
-
|
|
119
|
+
var textContent = ___EmotionJSX("span", _extends({
|
|
120
|
+
ref: ref,
|
|
121
|
+
"data-text": dataText,
|
|
122
|
+
title: dataText
|
|
123
|
+
}, textProps, {
|
|
124
|
+
className: buttonTextClassNames,
|
|
125
|
+
css: textCssStyles
|
|
126
|
+
}), children);
|
|
127
|
+
|
|
128
|
+
/** Button element */
|
|
129
|
+
var button = ___EmotionJSX(EuiButtonEmpty, _extends({
|
|
88
130
|
className: classes,
|
|
89
131
|
css: cssStyles,
|
|
90
132
|
color: color,
|
|
@@ -93,21 +135,36 @@ export var EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
93
135
|
iconType: iconType,
|
|
94
136
|
type: type,
|
|
95
137
|
textProps: false,
|
|
138
|
+
contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
|
|
139
|
+
css: [contentStyles.euiFilterButton__content, iconType && contentStyles.hasIcon, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
|
|
140
|
+
}),
|
|
141
|
+
"aria-expanded": isCollapsible ? isExpanded : undefined
|
|
142
|
+
}, rest), textContent, badgeElement);
|
|
143
|
+
var onToggleClick = function onToggleClick(e) {
|
|
144
|
+
var _rest$onClick;
|
|
145
|
+
rest === null || rest === void 0 || (_rest$onClick = rest.onClick) === null || _rest$onClick === void 0 || _rest$onClick.call(rest, e);
|
|
146
|
+
};
|
|
147
|
+
return ___EmotionJSX("div", {
|
|
148
|
+
className: wrapperClasses,
|
|
149
|
+
css: wrapperCssStyles
|
|
150
|
+
}, isToggle && !isCollapsible ? ___EmotionJSX(EuiButtonGroupButton, _extends({
|
|
151
|
+
id: id,
|
|
152
|
+
label: ___EmotionJSX(React.Fragment, null, textContent, badgeElement),
|
|
153
|
+
className: classes,
|
|
154
|
+
css: cssStyles,
|
|
155
|
+
color: color,
|
|
156
|
+
isSelected: isSelected,
|
|
157
|
+
size: "compressed",
|
|
158
|
+
isDisabled: isDisabled,
|
|
159
|
+
iconSide: iconSide,
|
|
160
|
+
iconType: iconType,
|
|
161
|
+
isIconOnly: false,
|
|
162
|
+
type: type,
|
|
163
|
+
textProps: false,
|
|
96
164
|
contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
|
|
97
165
|
css: [contentStyles.euiFilterButton__content, iconType && contentStyles.hasIcon, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
|
|
98
166
|
})
|
|
99
|
-
}, rest
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
title: dataText
|
|
103
|
-
}, textProps, {
|
|
104
|
-
className: buttonTextClassNames,
|
|
105
|
-
css: textCssStyles
|
|
106
|
-
}), children), showBadge && ___EmotionJSX(EuiNotificationBadge, {
|
|
107
|
-
className: "euiFilterButton__notification",
|
|
108
|
-
css: badgeStyles,
|
|
109
|
-
"aria-label": hasActiveFilters ? activeBadgeLabel : availableBadgeLabel,
|
|
110
|
-
color: isDisabled || !hasActiveFilters ? 'subdued' : badgeColor,
|
|
111
|
-
role: "marquee" // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/marquee_role
|
|
112
|
-
}, badgeCount));
|
|
167
|
+
}, rest, {
|
|
168
|
+
onClick: onToggleClick
|
|
169
|
+
})) : button);
|
|
113
170
|
};
|