@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
|
@@ -392,7 +392,7 @@
|
|
|
392
392
|
"euiColorBackgroundLightWarning": "#3D3014",
|
|
393
393
|
"euiColorBackgroundLightRisk": "#4A221C",
|
|
394
394
|
"euiColorBackgroundLightDanger": "#491D27",
|
|
395
|
-
"euiColorBackgroundLightText": "#
|
|
395
|
+
"euiColorBackgroundLightText": "#2B394F",
|
|
396
396
|
"euiColorBackgroundFilledPrimary": "#61A2FF",
|
|
397
397
|
"euiColorBackgroundFilledAccent": "#EE72A6",
|
|
398
398
|
"euiColorBackgroundFilledAccentSecondary": "#16C5C0",
|
|
@@ -35,7 +35,6 @@ export var euiBadgeColors = function euiBadgeColors(euiThemeContext) {
|
|
|
35
35
|
risk: euiButtonFillColor(euiThemeContext, 'risk'),
|
|
36
36
|
danger: euiButtonFillColor(euiThemeContext, 'danger'),
|
|
37
37
|
accent: euiButtonFillColor(euiThemeContext, 'accent'),
|
|
38
|
-
accentSecondary: euiButtonFillColor(euiThemeContext, 'accentSecondary'),
|
|
39
38
|
disabled: _objectSpread(_objectSpread({}, euiButtonColor(euiThemeContext, 'disabled')), {}, {
|
|
40
39
|
borderColor: highContrastMode ? euiTheme.colors.textDisabled : ''
|
|
41
40
|
}),
|
|
@@ -53,8 +52,7 @@ export var euiBadgeColors = function euiBadgeColors(euiThemeContext) {
|
|
|
53
52
|
}),
|
|
54
53
|
accentText: _objectSpread(_objectSpread({}, badgeColorsAccentText), {}, {
|
|
55
54
|
borderColor: highContrastMode ? badgeColorsAccentText.backgroundColor : ''
|
|
56
|
-
})
|
|
57
|
-
accentSecondaryText: getBadgeColors(euiThemeContext, euiTheme.colors.textAccentSecondary)
|
|
55
|
+
})
|
|
58
56
|
};
|
|
59
57
|
};
|
|
60
58
|
export var getBadgeColors = function getBadgeColors(euiThemeContext, backgroundColor) {
|
|
@@ -9,12 +9,17 @@
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
10
|
import { logicalCSS, euiCanAnimate, euiFontSizeFromScale, euiNumberFormat, mathWithUnits } from '../../../global_styling';
|
|
11
11
|
import { highContrastModeStyles } from '../../../global_styling/functions/high_contrast';
|
|
12
|
+
import { isEuiThemeRefreshVariant } from '../../../services';
|
|
12
13
|
import { euiBadgeColors } from '../color_utils';
|
|
13
14
|
export var euiNotificationBadgeStyles = function euiNotificationBadgeStyles(euiThemeContext) {
|
|
14
15
|
var euiTheme = euiThemeContext.euiTheme;
|
|
16
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
15
17
|
var badgeColors = euiBadgeColors(euiThemeContext);
|
|
18
|
+
var borderRadius = isRefreshVariant ? mathWithUnits(euiTheme.border.radius.small, function (x) {
|
|
19
|
+
return x / 2;
|
|
20
|
+
}) : euiTheme.border.radius.small;
|
|
16
21
|
return {
|
|
17
|
-
euiNotificationBadge: /*#__PURE__*/css("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;", logicalCSS('padding-horizontal', euiTheme.size.xs), " border-radius:",
|
|
22
|
+
euiNotificationBadge: /*#__PURE__*/css("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;", logicalCSS('padding-horizontal', euiTheme.size.xs), " border-radius:", borderRadius, ";", highContrastModeStyles(euiThemeContext, {
|
|
18
23
|
preferred: "\n border: ".concat(euiTheme.border.thin, ";\n overflow: hidden; /* Fix text clipping */\n ")
|
|
19
24
|
}), " cursor:default;font-size:", euiFontSizeFromScale('xs', euiTheme), ";font-weight:", euiTheme.font.weight.medium, ";", euiNumberFormat(euiThemeContext), " text-align:center;", euiCanAnimate, "{transition:all ", euiTheme.animation.fast, " ease-in;};label:euiNotificationBadge;"),
|
|
20
25
|
// Sizes
|
|
@@ -1052,10 +1052,10 @@ EuiBasicTable.propTypes = {
|
|
|
1052
1052
|
*/
|
|
1053
1053
|
cellProps: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.func.isRequired]),
|
|
1054
1054
|
/**
|
|
1055
|
-
* An array of one of the objects:
|
|
1055
|
+
* An array of one of the objects: {@link EuiTableFieldDataColumnType}, {@link EuiTableComputedColumnType} or {@link EuiTableActionsColumnType}.
|
|
1056
1056
|
*/
|
|
1057
1057
|
/**
|
|
1058
|
-
* An array of one of the objects:
|
|
1058
|
+
* An array of one of the objects: {@link EuiTableFieldDataColumnType}, {@link EuiTableComputedColumnType} or {@link EuiTableActionsColumnType}.
|
|
1059
1059
|
*/
|
|
1060
1060
|
columns: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
1061
1061
|
/**
|
|
@@ -1191,7 +1191,10 @@ EuiBasicTable.propTypes = {
|
|
|
1191
1191
|
render: PropTypes.func
|
|
1192
1192
|
}),
|
|
1193
1193
|
/**
|
|
1194
|
-
*
|
|
1194
|
+
* A custom renderer for this column's cell content.
|
|
1195
|
+
* Unlike computed columns or `mobileOptions.render`, this function receives:
|
|
1196
|
+
* - `value`: The value of the specified field for this row
|
|
1197
|
+
* - `item`: The full data item (row object)
|
|
1195
1198
|
*/
|
|
1196
1199
|
render: PropTypes.func,
|
|
1197
1200
|
/**
|
|
@@ -1260,7 +1263,7 @@ EuiBasicTable.propTypes = {
|
|
|
1260
1263
|
sortable: PropTypes.func
|
|
1261
1264
|
}).isRequired, PropTypes.shape({
|
|
1262
1265
|
/**
|
|
1263
|
-
* An array of one of the objects:
|
|
1266
|
+
* An array of one of the objects: {@link DefaultItemAction} or {@link CustomItemAction}
|
|
1264
1267
|
*/
|
|
1265
1268
|
actions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
1266
1269
|
/**
|
|
@@ -1432,11 +1435,12 @@ EuiBasicTable.propTypes = {
|
|
|
1432
1435
|
*/
|
|
1433
1436
|
noItemsMessage: PropTypes.node,
|
|
1434
1437
|
/**
|
|
1435
|
-
* Called whenever pagination or sorting changes (this property is required when either pagination or sorting is configured).
|
|
1438
|
+
* Called whenever pagination or sorting changes (this property is required when either pagination or sorting is configured).
|
|
1439
|
+
* See {@link Criteria} or {@link CriteriaWithPagination}
|
|
1436
1440
|
*/
|
|
1437
1441
|
onChange: PropTypes.func,
|
|
1438
1442
|
/**
|
|
1439
|
-
* Configures
|
|
1443
|
+
* Configures {@link Pagination}
|
|
1440
1444
|
*/
|
|
1441
1445
|
pagination: PropTypes.oneOfType([PropTypes.oneOf([undefined]), PropTypes.shape({
|
|
1442
1446
|
/**
|
|
@@ -1476,10 +1480,10 @@ EuiBasicTable.propTypes = {
|
|
|
1476
1480
|
*/
|
|
1477
1481
|
rowProps: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.func.isRequired]),
|
|
1478
1482
|
/**
|
|
1479
|
-
* Configures
|
|
1483
|
+
* Configures {@link EuiTableSelectionType}
|
|
1480
1484
|
*/
|
|
1481
1485
|
/**
|
|
1482
|
-
* Configures
|
|
1486
|
+
* Configures {@link EuiTableSelectionType}
|
|
1483
1487
|
*/
|
|
1484
1488
|
selection: PropTypes.shape({
|
|
1485
1489
|
/**
|
|
@@ -1511,10 +1515,10 @@ EuiBasicTable.propTypes = {
|
|
|
1511
1515
|
selected: PropTypes.arrayOf(PropTypes.any.isRequired)
|
|
1512
1516
|
}),
|
|
1513
1517
|
/**
|
|
1514
|
-
* Configures
|
|
1518
|
+
* Configures {@link EuiTableSortingType}
|
|
1515
1519
|
*/
|
|
1516
1520
|
/**
|
|
1517
|
-
* Configures
|
|
1521
|
+
* Configures {@link EuiTableSortingType}
|
|
1518
1522
|
*/
|
|
1519
1523
|
sorting: PropTypes.shape({
|
|
1520
1524
|
/**
|
|
@@ -546,10 +546,10 @@ EuiInMemoryTable.propTypes = {
|
|
|
546
546
|
*/
|
|
547
547
|
cellProps: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.func.isRequired]),
|
|
548
548
|
/**
|
|
549
|
-
* An array of one of the objects:
|
|
549
|
+
* An array of one of the objects: {@link EuiTableFieldDataColumnType}, {@link EuiTableComputedColumnType} or {@link EuiTableActionsColumnType}.
|
|
550
550
|
*/
|
|
551
551
|
/**
|
|
552
|
-
* An array of one of the objects:
|
|
552
|
+
* An array of one of the objects: {@link EuiTableFieldDataColumnType}, {@link EuiTableComputedColumnType} or {@link EuiTableActionsColumnType}.
|
|
553
553
|
*/
|
|
554
554
|
columns: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
555
555
|
/**
|
|
@@ -685,7 +685,10 @@ EuiInMemoryTable.propTypes = {
|
|
|
685
685
|
render: PropTypes.func
|
|
686
686
|
}),
|
|
687
687
|
/**
|
|
688
|
-
*
|
|
688
|
+
* A custom renderer for this column's cell content.
|
|
689
|
+
* Unlike computed columns or `mobileOptions.render`, this function receives:
|
|
690
|
+
* - `value`: The value of the specified field for this row
|
|
691
|
+
* - `item`: The full data item (row object)
|
|
689
692
|
*/
|
|
690
693
|
render: PropTypes.func,
|
|
691
694
|
/**
|
|
@@ -754,7 +757,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
754
757
|
sortable: PropTypes.func
|
|
755
758
|
}).isRequired, PropTypes.shape({
|
|
756
759
|
/**
|
|
757
|
-
* An array of one of the objects:
|
|
760
|
+
* An array of one of the objects: {@link DefaultItemAction} or {@link CustomItemAction}
|
|
758
761
|
*/
|
|
759
762
|
actions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
760
763
|
/**
|
|
@@ -926,10 +929,10 @@ EuiInMemoryTable.propTypes = {
|
|
|
926
929
|
*/
|
|
927
930
|
rowProps: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.func.isRequired]),
|
|
928
931
|
/**
|
|
929
|
-
* Configures
|
|
932
|
+
* Configures {@link EuiTableSelectionType}
|
|
930
933
|
*/
|
|
931
934
|
/**
|
|
932
|
-
* Configures
|
|
935
|
+
* Configures {@link EuiTableSelectionType}
|
|
933
936
|
*/
|
|
934
937
|
selection: PropTypes.shape({
|
|
935
938
|
/**
|
|
@@ -969,10 +972,10 @@ EuiInMemoryTable.propTypes = {
|
|
|
969
972
|
tableLayout: PropTypes.oneOf(["fixed", "auto"]),
|
|
970
973
|
message: PropTypes.node,
|
|
971
974
|
/**
|
|
972
|
-
* Configures
|
|
975
|
+
* Configures {@link Search}.
|
|
973
976
|
*/
|
|
974
977
|
/**
|
|
975
|
-
* Configures
|
|
978
|
+
* Configures {@link Search}.
|
|
976
979
|
*/
|
|
977
980
|
search: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.shape({
|
|
978
981
|
onChange: PropTypes.func,
|
|
@@ -1045,7 +1048,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
1045
1048
|
}).isRequired, PropTypes.bool.isRequired])
|
|
1046
1049
|
}),
|
|
1047
1050
|
/**
|
|
1048
|
-
An array of search filters. See
|
|
1051
|
+
An array of search filters. See {@link SearchFilterConfig}.
|
|
1049
1052
|
*/
|
|
1050
1053
|
filters: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
1051
1054
|
type: PropTypes.oneOf(["is"]).isRequired,
|
|
@@ -1058,7 +1061,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
1058
1061
|
field: PropTypes.string,
|
|
1059
1062
|
name: PropTypes.string.isRequired,
|
|
1060
1063
|
/**
|
|
1061
|
-
* See
|
|
1064
|
+
* See {@link FieldValueOptionType}
|
|
1062
1065
|
*/
|
|
1063
1066
|
options: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
|
|
1064
1067
|
field: PropTypes.string,
|
|
@@ -1114,7 +1117,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
1114
1117
|
type: PropTypes.oneOf(["field_value_toggle_group"]).isRequired,
|
|
1115
1118
|
field: PropTypes.string.isRequired,
|
|
1116
1119
|
/**
|
|
1117
|
-
* See
|
|
1120
|
+
* See {@link FieldValueToggleGroupFilterItemType}
|
|
1118
1121
|
*/
|
|
1119
1122
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
1120
1123
|
value: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.number.isRequired, PropTypes.bool.isRequired]).isRequired,
|
|
@@ -1176,7 +1179,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
1176
1179
|
*/
|
|
1177
1180
|
searchFormat: PropTypes.oneOf(["eql", "text"]),
|
|
1178
1181
|
/**
|
|
1179
|
-
* Configures
|
|
1182
|
+
* Configures {@link Pagination}
|
|
1180
1183
|
*/
|
|
1181
1184
|
pagination: PropTypes.oneOfType([PropTypes.oneOf([undefined]), PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.shape({
|
|
1182
1185
|
pageSizeOptions: PropTypes.arrayOf(PropTypes.number.isRequired),
|
|
@@ -1216,10 +1219,10 @@ EuiInMemoryTable.propTypes = {
|
|
|
1216
1219
|
"aria-label": PropTypes.string
|
|
1217
1220
|
}).isRequired])]),
|
|
1218
1221
|
/**
|
|
1219
|
-
* Configures
|
|
1222
|
+
* Configures {@link EuiTableSortingType}
|
|
1220
1223
|
*/
|
|
1221
1224
|
/**
|
|
1222
|
-
* Configures
|
|
1225
|
+
* Configures {@link EuiTableSortingType}
|
|
1223
1226
|
*/
|
|
1224
1227
|
sorting: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.shape({
|
|
1225
1228
|
sort: PropTypes.any.isRequired
|
|
@@ -1234,16 +1237,18 @@ EuiInMemoryTable.propTypes = {
|
|
|
1234
1237
|
/**
|
|
1235
1238
|
* `onChange` is not required when `pagination` and/or `sorting` are configured,
|
|
1236
1239
|
* but if `onChange` is present it is responsible for handling state for each/both.
|
|
1237
|
-
* See
|
|
1240
|
+
* See {@link Criteria} or {@link CriteriaWithPagination}
|
|
1238
1241
|
*/
|
|
1239
1242
|
/**
|
|
1240
1243
|
* `onChange` is not required when `pagination` and/or `sorting` are configured,
|
|
1241
1244
|
* but if `onChange` is present it is responsible for handling state for each/both.
|
|
1242
|
-
* See
|
|
1245
|
+
* See {@link Criteria} or {@link CriteriaWithPagination}
|
|
1243
1246
|
*/
|
|
1244
1247
|
onChange: PropTypes.any,
|
|
1245
1248
|
/**
|
|
1246
|
-
* Callback for when table pagination or sorting is changed. This is meant to be informational only,
|
|
1249
|
+
* Callback for when table pagination or sorting is changed. This is meant to be informational only,
|
|
1250
|
+
* and not used to set any state as the in-memory table already manages this state.
|
|
1251
|
+
* See {@link Criteria} or {@link CriteriaWithPagination}.
|
|
1247
1252
|
*/
|
|
1248
1253
|
onTableChange: PropTypes.func,
|
|
1249
1254
|
executeQueryOptions: PropTypes.shape({
|
|
@@ -201,7 +201,7 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
201
201
|
*/
|
|
202
202
|
panelStyle: PropTypes.any,
|
|
203
203
|
/**
|
|
204
|
-
* Object of props passed to EuiPanel. See
|
|
204
|
+
* Object of props passed to EuiPanel. See {@link EuiPopoverPanelProps}
|
|
205
205
|
*/
|
|
206
206
|
panelProps: PropTypes.shape({
|
|
207
207
|
element: PropTypes.oneOf(["div"]),
|
|
@@ -7,9 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
-
import { euiFontSize, euiTextTruncate, euiFocusRing, logicalCSS, logicalBorderRadiusCSS, mathWithUnits } from '../../global_styling';
|
|
10
|
+
import { euiFontSize, euiTextTruncate, euiFocusRing, logicalCSS, logicalBorderRadiusCSS, mathWithUnits, euiButtonColor } from '../../global_styling';
|
|
11
11
|
import { highContrastModeStyles } from '../../global_styling/functions/high_contrast';
|
|
12
|
-
import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins/button';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Styles cast to inner <a>, <button>, <span> elements
|
|
@@ -19,7 +18,11 @@ export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiT
|
|
|
19
18
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
20
19
|
|
|
21
20
|
// Reuse button colors for `type="application`" clickable breadcrumbs
|
|
22
|
-
var
|
|
21
|
+
var buttonColors = euiButtonColor(euiThemeContext, 'primary');
|
|
22
|
+
var applicationButtonColors = {
|
|
23
|
+
backgroundColor: euiTheme.colors.backgroundLightPrimary,
|
|
24
|
+
color: buttonColors.color
|
|
25
|
+
};
|
|
23
26
|
|
|
24
27
|
// Create custom darker gray colors for non-clickable application breadcrumbs
|
|
25
28
|
// The numbers/ratios are fairly specific here to pass WCAG AA contrast minimums
|
|
@@ -93,7 +93,7 @@ EuiBreadcrumbs.propTypes = {
|
|
|
93
93
|
css: PropTypes.any,
|
|
94
94
|
/**
|
|
95
95
|
* Hides extra (above the max) breadcrumbs under a collapsed item as the window gets smaller.
|
|
96
|
-
* Pass a custom
|
|
96
|
+
* Pass a custom {@link EuiBreadcrumbResponsiveMaxCount} object to change the number of breadcrumbs to show at the particular breakpoints.
|
|
97
97
|
*
|
|
98
98
|
* Pass `false` to turn this behavior off.
|
|
99
99
|
*
|
|
@@ -113,7 +113,7 @@ EuiBreadcrumbs.propTypes = {
|
|
|
113
113
|
*/
|
|
114
114
|
max: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.oneOf([null])]),
|
|
115
115
|
/**
|
|
116
|
-
* The array of individual
|
|
116
|
+
* The array of individual {@link EuiBreadcrumb} items
|
|
117
117
|
*/
|
|
118
118
|
breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
|
|
119
119
|
className: PropTypes.string,
|
|
@@ -212,7 +212,7 @@ EuiBreadcrumbs.propTypes = {
|
|
|
212
212
|
*/
|
|
213
213
|
panelStyle: PropTypes.any,
|
|
214
214
|
/**
|
|
215
|
-
* Object of props passed to EuiPanel. See
|
|
215
|
+
* Object of props passed to EuiPanel. See {@link EuiPopoverPanelProps}
|
|
216
216
|
*/
|
|
217
217
|
panelProps: PropTypes.shape({
|
|
218
218
|
element: PropTypes.oneOf(["div"]),
|
|
@@ -76,7 +76,7 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
76
76
|
isLoading: isLoading
|
|
77
77
|
});
|
|
78
78
|
var styles = useEuiMemoizedStyles(euiButtonDisplayStyles);
|
|
79
|
-
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && styles.defaultMinWidth, buttonIsDisabled && styles.isDisabled];
|
|
79
|
+
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && [styles.defaultMinWidth.defaultMinWidth, styles.defaultMinWidth[size]], buttonIsDisabled && styles.isDisabled];
|
|
80
80
|
var innerNode = ___EmotionJSX(EuiButtonDisplayContent, _extends({
|
|
81
81
|
isLoading: isLoading,
|
|
82
82
|
isDisabled: buttonIsDisabled,
|
|
@@ -7,6 +7,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
7
7
|
* Side Public License, v 1.
|
|
8
8
|
*/
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
|
+
import { isEuiThemeRefreshVariant } from '../../../services';
|
|
10
11
|
import { euiFontSize, logicalCSS, logicalShorthandCSS, logicalTextAlignCSS } from '../../../global_styling';
|
|
11
12
|
import { euiButtonSizeMap } from '../../../global_styling/mixins';
|
|
12
13
|
// Provides a solid reset and base for handling sizing layout
|
|
@@ -24,18 +25,26 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
24
25
|
};
|
|
25
26
|
export var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext) {
|
|
26
27
|
var euiTheme = euiThemeContext.euiTheme;
|
|
28
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
27
29
|
var sizes = euiButtonSizeMap(euiThemeContext);
|
|
28
30
|
var _buttonSize = function _buttonSize(sizeKey) {
|
|
29
31
|
var size = sizes[sizeKey];
|
|
30
32
|
return /*#__PURE__*/css(logicalCSS('height', size.height), " line-height:", size.height, ";", euiFontSize(euiThemeContext, size.fontScale), " border-radius:", size.radius, ";");
|
|
31
33
|
};
|
|
34
|
+
var classicVariantStyles = "\n &:hover:not(:disabled),\n &:focus {\n text-decoration: underline;\n }\n ";
|
|
32
35
|
return {
|
|
33
36
|
// Base
|
|
34
|
-
euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), " font-weight:", euiTheme.font.weight.medium, ";", logicalShorthandCSS('padding', "0 ".concat(euiTheme.size.m)), "
|
|
37
|
+
euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), " font-weight:", euiTheme.font.weight.medium, ";", logicalShorthandCSS('padding', "0 ".concat(euiTheme.size.m)), " ", !isRefreshVariant && classicVariantStyles, ";;label:euiButtonDisplay;"),
|
|
35
38
|
// States
|
|
36
39
|
isDisabled: _ref,
|
|
37
40
|
fullWidth: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), ";;label:fullWidth;"),
|
|
38
|
-
defaultMinWidth:
|
|
41
|
+
defaultMinWidth: {
|
|
42
|
+
defaultMinWidth: /*#__PURE__*/css(";label:defaultMinWidth;"),
|
|
43
|
+
// Skip css`` for the sizes as we already add classes for sizes and defaultMinWidth
|
|
44
|
+
xs: "\n ".concat(logicalCSS('min-width', "".concat(sizes.xs.minWidth, "px")), "\n "),
|
|
45
|
+
s: "\n ".concat(logicalCSS('min-width', "".concat(sizes.s.minWidth, "px")), "\n "),
|
|
46
|
+
m: "\n ".concat(logicalCSS('min-width', "".concat(sizes.m.minWidth, "px")), "\n ")
|
|
47
|
+
},
|
|
39
48
|
// Sizes
|
|
40
49
|
xs: /*#__PURE__*/css(_buttonSize('xs'), ";label:xs;"),
|
|
41
50
|
s: /*#__PURE__*/css(_buttonSize('s'), ";label:s;"),
|
|
@@ -6,11 +6,14 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
|
+
import { isEuiThemeRefreshVariant } from '../../../services';
|
|
9
10
|
import { logicalCSS } from '../../../global_styling';
|
|
10
|
-
export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(
|
|
11
|
-
var euiTheme =
|
|
11
|
+
export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(euiThemeContext) {
|
|
12
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
13
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
14
|
+
var refreshVariantStyles = "\n /* ensure content stays ontop of hover pseudo element */\n position: relative;\n ";
|
|
12
15
|
return {
|
|
13
16
|
// Base
|
|
14
|
-
euiButtonDisplayContent: /*#__PURE__*/css(logicalCSS('height', '100%'), " ", logicalCSS('width', '100%'), " display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
17
|
+
euiButtonDisplayContent: /*#__PURE__*/css(logicalCSS('height', '100%'), " ", logicalCSS('width', '100%'), " display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";", isRefreshVariant && refreshVariantStyles, ";;label:euiButtonDisplayContent;")
|
|
15
18
|
};
|
|
16
19
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
1
|
/*
|
|
3
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -8,32 +7,30 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { css } from '@emotion/react';
|
|
11
|
-
import {
|
|
10
|
+
import { isEuiThemeRefreshVariant } from '../../../services';
|
|
11
|
+
import { logicalCSS, logicalShorthandCSS, euiCanAnimate, highContrastModeStyles } from '../../../global_styling';
|
|
12
12
|
import { euiButtonDisplayStyles } from '../button_display/_button_display.styles';
|
|
13
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
-
name: "1lywbid-flush",
|
|
15
|
-
styles: "padding-inline:0;label:flush;"
|
|
16
|
-
} : {
|
|
17
|
-
name: "1lywbid-flush",
|
|
18
|
-
styles: "padding-inline:0;label:flush;",
|
|
19
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
-
};
|
|
21
13
|
export var euiButtonEmptyStyles = function euiButtonEmptyStyles(euiThemeContext) {
|
|
22
14
|
var euiTheme = euiThemeContext.euiTheme;
|
|
15
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
23
16
|
|
|
24
17
|
// EuiButtonEmpty uses the same size/font styling as EuiButtonDisplay,
|
|
25
18
|
// but does not share enough of the same colors/props to the point
|
|
26
19
|
// of using the actual component - so we'll reuse its styles instead
|
|
27
20
|
var displayStyles = euiButtonDisplayStyles(euiThemeContext);
|
|
21
|
+
var refreshFlushStyles = "\n /* using duplicate selector to ensure specificity */\n &&:hover,\n &&:active {\n background-color: transparent;\n\n /* removes hover overlay */\n &::before {\n display: none;\n }\n }\n\n &:hover:not(:disabled),\n &:focus {\n text-decoration: underline;\n\n ".concat(highContrastModeStyles(euiThemeContext, {
|
|
22
|
+
forced: "\n /* hides HCM hover border, flush buttons use text-decoration */\n &::after {\n display: none;\n }\n "
|
|
23
|
+
}), "\n }\n ");
|
|
28
24
|
return {
|
|
29
25
|
euiButtonEmpty: /*#__PURE__*/css(displayStyles.euiButtonDisplay, " ", logicalShorthandCSS('padding', "0 ".concat(euiTheme.size.s)), euiCanAnimate, "{transition-timing-function:ease-in;transition-duration:", euiTheme.animation.fast, ";};label:euiButtonEmpty;"),
|
|
30
26
|
isDisabled: displayStyles.isDisabled,
|
|
31
27
|
// Sizes
|
|
32
28
|
xs: displayStyles.xs,
|
|
33
29
|
s: displayStyles.s,
|
|
34
|
-
m
|
|
30
|
+
// uses array here to prevent adding duplicate "m" classname partial
|
|
31
|
+
m: [displayStyles.m, isRefreshVariant && "\n ".concat(logicalCSS('padding-horizontal', euiTheme.size.m), "\n ")],
|
|
35
32
|
// Flush sides
|
|
36
|
-
flush:
|
|
33
|
+
flush: /*#__PURE__*/css("padding-inline:0;", isRefreshVariant && refreshFlushStyles, ";;label:flush;"),
|
|
37
34
|
left: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.s), ";;label:left;"),
|
|
38
35
|
right: /*#__PURE__*/css(logicalCSS('margin-left', euiTheme.size.s), ";;label:right;"),
|
|
39
36
|
both: /*#__PURE__*/css(";label:both;")
|
|
@@ -118,7 +118,7 @@ EuiButtonGroup.propTypes = {
|
|
|
118
118
|
*/
|
|
119
119
|
type: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.oneOf(["single", "multi"]), PropTypes.oneOf(["single"])]), PropTypes.oneOf(["multi"])]),
|
|
120
120
|
/**
|
|
121
|
-
* An array of
|
|
121
|
+
* An array of {@link EuiButtonGroupOptionProps}
|
|
122
122
|
*/
|
|
123
123
|
options: PropTypes.arrayOf(PropTypes.shape({
|
|
124
124
|
/**
|
|
@@ -8,6 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
+
import { isEuiThemeRefreshVariant } from '../../../services';
|
|
11
12
|
import { logicalCSS } from '../../../global_styling';
|
|
12
13
|
import { highContrastModeStyles, preventForcedColors } from '../../../global_styling/functions/high_contrast';
|
|
13
14
|
import { euiFormVariables } from '../../form/form.styles';
|
|
@@ -31,7 +32,7 @@ export var euiButtonGroupButtonsStyles = function euiButtonGroupButtonsStyles(eu
|
|
|
31
32
|
borderColor = _euiFormVariables.borderColor;
|
|
32
33
|
return {
|
|
33
34
|
// Base
|
|
34
|
-
euiButtonGroup__buttons: /*#__PURE__*/css(logicalCSS('max-width', '100%'), " display:flex;;label:euiButtonGroup__buttons;"),
|
|
35
|
+
euiButtonGroup__buttons: /*#__PURE__*/css(logicalCSS('max-width', '100%'), " display:flex;align-items:center;;label:euiButtonGroup__buttons;"),
|
|
35
36
|
fullWidth: /*#__PURE__*/css(logicalCSS('width', '100%'), " .euiButtonGroupButton,.euiButtonGroup__tooltipWrapper{flex:1;", logicalCSS('width', '100%'), ";};label:fullWidth;"),
|
|
36
37
|
// Sizes
|
|
37
38
|
m: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";", _highContrastStyles(euiThemeContext), ";;label:m;"),
|
|
@@ -41,6 +42,7 @@ export var euiButtonGroupButtonsStyles = function euiButtonGroupButtonsStyles(eu
|
|
|
41
42
|
};
|
|
42
43
|
var _highContrastStyles = function _highContrastStyles(euiThemeContext, compressed) {
|
|
43
44
|
var euiTheme = euiThemeContext.euiTheme;
|
|
45
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
44
46
|
|
|
45
47
|
// Account for buttons within tooltip wrappers in selectors
|
|
46
48
|
var getButtonChildSelectors = function getButtonChildSelectors(selector) {
|
|
@@ -50,7 +52,7 @@ var _highContrastStyles = function _highContrastStyles(euiThemeContext, compress
|
|
|
50
52
|
preferred: compressed ? "\n .euiButtonGroupButton {\n border: none;\n }\n " : // Conditionally unset the high contrast borders passed by `euiButtonColor` -
|
|
51
53
|
// faux borders between selected/unselected buttons are rendered by pseudo elements,
|
|
52
54
|
// and can flip colors depending on selected/unselected siblings
|
|
53
|
-
"\n ".concat(getButtonChildSelectors(':not(:first-child, :last-child)'), " {\n
|
|
54
|
-
forced: "\n .euiButtonGroupButton-isSelected {\n ".concat(preventForcedColors(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n }\n\n .euiButtonGroupButton[disabled] {\n opacity: 0.5;\n }\n ")
|
|
55
|
+
"\n ".concat(!isRefreshVariant && "\n ".concat(getButtonChildSelectors(':not(:first-child, :last-child)'), " {\n ").concat(logicalCSS('border-horizontal', 'none'), "\n }\n ").concat(getButtonChildSelectors(':first-child'), " {\n ").concat(logicalCSS('border-right', 'none'), "\n }\n ").concat(getButtonChildSelectors(':last-child'), " {\n ").concat(logicalCSS('border-left', 'none'), "\n }\n "), "\n "),
|
|
56
|
+
forced: "\n .euiButtonGroupButton-isSelected {\n ".concat(preventForcedColors(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n\n ").concat(isRefreshVariant && "\n &:is(:hover, :focus):not(:disabled) {\n &::before {\n border-color: ".concat(euiTheme.colors.textInverse, ";\n }\n }\n "), "\n }\n\n .euiButtonGroupButton[disabled] {\n opacity: 0.5;\n }\n ")
|
|
55
57
|
});
|
|
56
58
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color", "toolTipContent", "toolTipProps"];
|
|
2
|
+
var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color", "toolTipContent", "toolTipProps", "contentProps"];
|
|
3
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
4
|
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; }
|
|
4
5
|
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; }
|
|
5
6
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
9
9
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
10
10
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
11
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -25,7 +25,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
25
25
|
import classNames from 'classnames';
|
|
26
26
|
import PropTypes from "prop-types";
|
|
27
27
|
import React from 'react';
|
|
28
|
-
import { useEuiMemoizedStyles } from '../../../services';
|
|
28
|
+
import { isEuiThemeRefreshVariant, useEuiMemoizedStyles, useEuiTheme } from '../../../services';
|
|
29
29
|
import { useEuiButtonColorCSS } from '../../../global_styling/mixins/_button';
|
|
30
30
|
import { useInnerText } from '../../inner_text';
|
|
31
31
|
import { EuiButtonDisplay } from '../button_display/_button_display';
|
|
@@ -46,17 +46,21 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
46
46
|
_color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
47
47
|
toolTipContent = _ref.toolTipContent,
|
|
48
48
|
toolTipProps = _ref.toolTipProps,
|
|
49
|
+
contentProps = _ref.contentProps,
|
|
49
50
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
51
|
+
var euiThemeContext = useEuiTheme();
|
|
52
|
+
var isRefreshVariant = isEuiThemeRefreshVariant(euiThemeContext, 'buttonVariant');
|
|
50
53
|
var isCompressed = size === 'compressed';
|
|
51
54
|
var color = isDisabled ? 'disabled' : _color;
|
|
52
|
-
var
|
|
55
|
+
var hasBorder = isRefreshVariant && color !== 'text' && !isCompressed;
|
|
56
|
+
var display = isSelected ? 'fill' : isCompressed || hasBorder ? 'empty' : 'base';
|
|
53
57
|
var hasToolTip = !!toolTipContent;
|
|
54
58
|
var styles = useEuiMemoizedStyles(euiButtonGroupButtonStyles);
|
|
55
59
|
var focusColorStyles = useEuiMemoizedStyles(_compressedButtonFocusColors);
|
|
56
60
|
var buttonColorStyles = useEuiButtonColorCSS({
|
|
57
61
|
display: display
|
|
58
62
|
})[color];
|
|
59
|
-
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]];
|
|
63
|
+
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];
|
|
60
64
|
var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
|
|
61
65
|
var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
|
|
62
66
|
var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
|
|
@@ -84,9 +88,9 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
84
88
|
className: buttonClasses,
|
|
85
89
|
isDisabled: isDisabled,
|
|
86
90
|
size: size === 'compressed' ? 's' : size,
|
|
87
|
-
contentProps: {
|
|
88
|
-
css: contentStyles
|
|
89
|
-
},
|
|
91
|
+
contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
|
|
92
|
+
css: [contentStyles, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
|
|
93
|
+
}),
|
|
90
94
|
textProps: {
|
|
91
95
|
css: textStyles,
|
|
92
96
|
ref: buttonTextRef,
|
|
@@ -175,7 +179,13 @@ EuiButtonGroupButton.propTypes = {
|
|
|
175
179
|
/**
|
|
176
180
|
* Inherit from EuiButtonGroup
|
|
177
181
|
*/
|
|
178
|
-
onClick: PropTypes.func.isRequired
|
|
182
|
+
onClick: PropTypes.func.isRequired,
|
|
183
|
+
contentProps: PropTypes.shape({
|
|
184
|
+
className: PropTypes.string,
|
|
185
|
+
"aria-label": PropTypes.string,
|
|
186
|
+
"data-test-subj": PropTypes.string,
|
|
187
|
+
css: PropTypes.any
|
|
188
|
+
})
|
|
179
189
|
};
|
|
180
190
|
var EuiButtonGroupButtonWithToolTip = function EuiButtonGroupButtonWithToolTip(_ref2) {
|
|
181
191
|
var _toolTipProps$anchorP, _toolTipProps$anchorP2;
|