@elastic/eui 119.1.0 → 120.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui-icons.json +74 -82
- package/dist/svgs/cloud_bolt.svg +4 -0
- package/dist/svgs/cloud_rain.svg +4 -0
- package/dist/svgs/cloud_sun.svg +4 -0
- package/dist/svgs/cube.svg +3 -0
- package/dist/svgs/kubernetes_namespace.svg +4 -0
- package/dist/svgs/memory.svg +1 -10
- package/dist/svgs/product_timelion.svg +3 -0
- package/dist/svgs/product_tsvb.svg +5 -0
- package/dist/svgs/push.svg +4 -0
- package/dist/svgs/transition_right_in.svg +4 -0
- package/dist/svgs/transition_right_out.svg +4 -0
- package/dist/svgs/wrench.svg +1 -1
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/basic_table/basic_table.js +4 -4
- package/es/components/basic_table/in_memory_table.js +4 -4
- package/es/components/button/button.js +17 -5
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group.js +111 -29
- package/es/components/button/button_group/button_group.styles.js +20 -7
- package/es/components/button/button_group/use_button_group_selection.js +30 -0
- package/es/components/button/button_icon/button_icon.js +18 -7
- package/es/components/button/use_button_common_props.js +16 -7
- package/es/components/call_out/call_out.js +2 -2
- package/es/components/card/card.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/context_menu/context_menu_item.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +24 -24
- package/es/components/datagrid/body/data_grid_body.js +13 -13
- package/es/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/es/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/es/components/datagrid/controls/column_sorting.js +13 -13
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/es/components/datagrid/utils/in_memory.js +12 -12
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/es/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/es/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/es/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/es/components/date_picker/react-datepicker/test/helper_components/custom_input.js +74 -0
- package/es/components/date_picker/react-datepicker/test/test_wrapper.js +38 -0
- package/es/components/date_picker/react-datepicker/test/timezone_date_picker.js +75 -0
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +224 -253
- package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/es/components/delay_hide/delay_hide.js +36 -93
- package/es/components/delay_render/delay_render.js +42 -80
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/flyout/flyout_menu/flyout_menu.js +4 -4
- package/es/components/form/field_number/field_number.js +2 -2
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_button/form_control_button.js +1 -1
- package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/text_area/text_area.js +2 -2
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_logo/header_logo.js +1 -1
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/{kubernetes_pod.js → cloud_bolt.js} +5 -3
- package/es/components/icon/assets/{branch_user.js → cloud_rain.js} +4 -6
- package/es/components/icon/assets/{cloud_stormy.js → cloud_sun.js} +3 -3
- package/es/components/icon/assets/{kql_function.js → cube.js} +3 -3
- package/es/components/icon/assets/{cloud_drizzle.js → kubernetes_namespace.js} +5 -3
- package/es/components/icon/assets/memory.js +1 -3
- package/es/components/icon/assets/{continuity_below.js → product_timelion.js} +3 -3
- package/es/components/icon/assets/{cloud_sunny.js → product_tsvb.js} +7 -3
- package/es/components/icon/assets/{namespace.js → push.js} +3 -6
- package/es/components/icon/assets/{function.js → transition_right_in.js} +5 -3
- package/es/components/icon/assets/{continuity_above_below.js → transition_right_out.js} +5 -3
- package/es/components/icon/assets/wrench.js +1 -3
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_glyphs.a11y.js +1 -1
- package/es/components/icon/icon_map.js +143 -58
- package/es/components/icon/svgs/cloud_bolt.svg +4 -0
- package/es/components/icon/svgs/cloud_rain.svg +4 -0
- package/es/components/icon/svgs/cloud_sun.svg +4 -0
- package/es/components/icon/svgs/cube.svg +3 -0
- package/es/components/icon/svgs/kubernetes_namespace.svg +4 -0
- package/es/components/icon/svgs/memory.svg +1 -10
- package/es/components/icon/svgs/product_timelion.svg +3 -0
- package/es/components/icon/svgs/product_tsvb.svg +5 -0
- package/es/components/icon/svgs/push.svg +4 -0
- package/es/components/icon/svgs/transition_right_in.svg +4 -0
- package/es/components/icon/svgs/transition_right_out.svg +4 -0
- package/es/components/icon/svgs/wrench.svg +1 -1
- package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +2 -2
- package/es/components/list_group/list_group_item_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/resizable_container/resizable_collapse_button.js +4 -4
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/text_diff/text_diff.js +4 -6
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +2 -2
- package/es/components/toast/toast.js +2 -2
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/eui.d.ts +224 -275
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/basic_table/basic_table.js +4 -4
- package/lib/components/basic_table/in_memory_table.js +4 -4
- package/lib/components/button/button.js +17 -5
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group.js +111 -29
- package/lib/components/button/button_group/button_group.styles.js +19 -6
- package/lib/components/button/button_group/use_button_group_selection.js +36 -0
- package/lib/components/button/button_icon/button_icon.js +18 -7
- package/lib/components/button/use_button_common_props.js +16 -7
- package/lib/components/call_out/call_out.js +2 -2
- package/lib/components/card/card.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/context_menu/context_menu_item.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +24 -24
- package/lib/components/datagrid/body/data_grid_body.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/lib/components/datagrid/controls/column_sorting.js +13 -13
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/lib/components/datagrid/utils/in_memory.js +12 -12
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/lib/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/lib/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/lib/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/lib/components/date_picker/react-datepicker/test/helper_components/custom_input.js +80 -0
- package/lib/components/date_picker/react-datepicker/test/test_wrapper.js +46 -0
- package/lib/components/date_picker/react-datepicker/test/timezone_date_picker.js +83 -0
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +224 -253
- package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/lib/components/delay_hide/delay_hide.js +35 -93
- package/lib/components/delay_render/delay_render.js +41 -79
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/flyout/flyout_menu/flyout_menu.js +4 -4
- package/lib/components/form/field_number/field_number.js +2 -2
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_button/form_control_button.js +1 -1
- package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/text_area/text_area.js +2 -2
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +1 -1
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/{kubernetes_pod.js → cloud_bolt.js} +5 -3
- package/lib/components/icon/assets/{branch_user.js → cloud_rain.js} +4 -6
- package/lib/components/icon/assets/{cloud_stormy.js → cloud_sun.js} +3 -3
- package/lib/components/icon/assets/{kql_function.js → cube.js} +3 -3
- package/lib/components/icon/assets/{cloud_drizzle.js → kubernetes_namespace.js} +5 -3
- package/lib/components/icon/assets/memory.js +1 -3
- package/lib/components/icon/assets/{continuity_below.js → product_timelion.js} +3 -3
- package/lib/components/icon/assets/{cloud_sunny.js → product_tsvb.js} +7 -3
- package/lib/components/icon/assets/{namespace.js → push.js} +3 -6
- package/lib/components/icon/assets/{function.js → transition_right_in.js} +5 -3
- package/lib/components/icon/assets/{continuity_above_below.js → transition_right_out.js} +5 -3
- package/lib/components/icon/assets/wrench.js +1 -3
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_glyphs.a11y.js +1 -1
- package/lib/components/icon/icon_map.js +165 -78
- package/lib/components/icon/svgs/cloud_bolt.svg +4 -0
- package/lib/components/icon/svgs/cloud_rain.svg +4 -0
- package/lib/components/icon/svgs/cloud_sun.svg +4 -0
- package/lib/components/icon/svgs/cube.svg +3 -0
- package/lib/components/icon/svgs/kubernetes_namespace.svg +4 -0
- package/lib/components/icon/svgs/memory.svg +1 -10
- package/lib/components/icon/svgs/product_timelion.svg +3 -0
- package/lib/components/icon/svgs/product_tsvb.svg +5 -0
- package/lib/components/icon/svgs/push.svg +4 -0
- package/lib/components/icon/svgs/transition_right_in.svg +4 -0
- package/lib/components/icon/svgs/transition_right_out.svg +4 -0
- package/lib/components/icon/svgs/wrench.svg +1 -1
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +2 -2
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/pagination/pagination_button.js +1 -1
- package/lib/components/resizable_container/resizable_collapse_button.js +4 -4
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/text_diff/text_diff.js +4 -6
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +2 -2
- package/lib/components/toast/toast.js +2 -2
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/optimize/es/components/button/button.js +17 -5
- package/optimize/es/components/button/button_group/button_group.js +44 -12
- package/optimize/es/components/button/button_group/button_group.styles.js +20 -7
- package/optimize/es/components/button/button_group/use_button_group_selection.js +30 -0
- package/optimize/es/components/button/button_icon/button_icon.js +17 -6
- package/optimize/es/components/button/use_button_common_props.js +16 -7
- package/optimize/es/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/optimize/es/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/optimize/es/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/optimize/es/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/optimize/es/components/date_picker/react-datepicker/test/helper_components/custom_input.js +68 -0
- package/optimize/es/components/date_picker/react-datepicker/test/test_wrapper.js +38 -0
- package/optimize/es/components/date_picker/react-datepicker/test/timezone_date_picker.js +69 -0
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +220 -225
- package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/optimize/es/components/delay_hide/delay_hide.js +31 -81
- package/optimize/es/components/delay_render/delay_render.js +36 -73
- package/optimize/es/components/icon/assets/{continuity_below.js → cloud_bolt.js} +5 -3
- package/optimize/es/components/icon/assets/{branch_user.js → cloud_rain.js} +4 -6
- package/optimize/es/components/icon/assets/{cloud_sunny.js → cloud_sun.js} +3 -3
- package/optimize/es/components/icon/assets/{kql_function.js → cube.js} +3 -3
- package/optimize/es/components/icon/assets/{cloud_drizzle.js → kubernetes_namespace.js} +5 -3
- package/optimize/es/components/icon/assets/memory.js +1 -3
- package/optimize/es/components/icon/assets/product_timelion.js +32 -0
- package/optimize/es/components/icon/assets/{cloud_stormy.js → product_tsvb.js} +7 -3
- package/optimize/es/components/icon/assets/{namespace.js → push.js} +3 -6
- package/optimize/es/components/icon/assets/{function.js → transition_right_in.js} +5 -3
- package/optimize/es/components/icon/assets/{continuity_above_below.js → transition_right_out.js} +5 -3
- package/optimize/es/components/icon/assets/wrench.js +1 -3
- package/optimize/es/components/icon/icon_glyphs.a11y.js +1 -1
- package/optimize/es/components/icon/icon_map.js +143 -58
- package/optimize/es/components/icon/svgs/cloud_bolt.svg +4 -0
- package/optimize/es/components/icon/svgs/cloud_rain.svg +4 -0
- package/optimize/es/components/icon/svgs/cloud_sun.svg +4 -0
- package/optimize/es/components/icon/svgs/cube.svg +3 -0
- package/optimize/es/components/icon/svgs/kubernetes_namespace.svg +4 -0
- package/optimize/es/components/icon/svgs/memory.svg +1 -10
- package/optimize/es/components/icon/svgs/product_timelion.svg +3 -0
- package/optimize/es/components/icon/svgs/product_tsvb.svg +5 -0
- package/optimize/es/components/icon/svgs/push.svg +4 -0
- package/optimize/es/components/icon/svgs/transition_right_in.svg +4 -0
- package/optimize/es/components/icon/svgs/transition_right_out.svg +4 -0
- package/optimize/es/components/icon/svgs/wrench.svg +1 -1
- package/optimize/es/components/resizable_container/resizable_collapse_button.js +4 -4
- package/optimize/es/components/text_diff/text_diff.js +4 -6
- package/optimize/lib/components/button/button.js +17 -5
- package/optimize/lib/components/button/button_group/button_group.js +44 -12
- package/optimize/lib/components/button/button_group/button_group.styles.js +19 -6
- package/optimize/lib/components/button/button_group/use_button_group_selection.js +36 -0
- package/optimize/lib/components/button/button_icon/button_icon.js +17 -6
- package/optimize/lib/components/button/use_button_common_props.js +16 -7
- package/optimize/lib/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/optimize/lib/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/optimize/lib/components/date_picker/react-datepicker/test/helper_components/custom_input.js +74 -0
- package/optimize/lib/components/date_picker/react-datepicker/test/test_wrapper.js +46 -0
- package/optimize/lib/components/date_picker/react-datepicker/test/timezone_date_picker.js +78 -0
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +219 -224
- package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/optimize/lib/components/delay_hide/delay_hide.js +32 -80
- package/optimize/lib/components/delay_render/delay_render.js +37 -72
- package/optimize/lib/components/icon/assets/{continuity_below.js → cloud_bolt.js} +5 -3
- package/{test-env/components/icon/assets/branch_user.js → optimize/lib/components/icon/assets/cloud_rain.js} +4 -6
- package/optimize/lib/components/icon/assets/{cloud_sunny.js → cloud_sun.js} +3 -3
- package/{test-env/components/icon/assets/kql_function.js → optimize/lib/components/icon/assets/cube.js} +3 -3
- package/optimize/lib/components/icon/assets/{cloud_drizzle.js → kubernetes_namespace.js} +5 -3
- package/optimize/lib/components/icon/assets/memory.js +1 -3
- package/{test-env/components/icon/assets/continuity_below.js → optimize/lib/components/icon/assets/product_timelion.js} +3 -3
- package/optimize/lib/components/icon/assets/product_tsvb.js +44 -0
- package/{test-env/components/icon/assets/namespace.js → optimize/lib/components/icon/assets/push.js} +3 -6
- package/optimize/lib/components/icon/assets/{function.js → transition_right_in.js} +5 -3
- package/optimize/lib/components/icon/assets/transition_right_out.js +42 -0
- package/optimize/lib/components/icon/assets/wrench.js +1 -3
- package/optimize/lib/components/icon/icon_glyphs.a11y.js +1 -1
- package/optimize/lib/components/icon/icon_map.js +165 -78
- package/optimize/lib/components/icon/svgs/cloud_bolt.svg +4 -0
- package/optimize/lib/components/icon/svgs/cloud_rain.svg +4 -0
- package/optimize/lib/components/icon/svgs/cloud_sun.svg +4 -0
- package/optimize/lib/components/icon/svgs/cube.svg +3 -0
- package/optimize/lib/components/icon/svgs/kubernetes_namespace.svg +4 -0
- package/optimize/lib/components/icon/svgs/memory.svg +1 -10
- package/optimize/lib/components/icon/svgs/product_timelion.svg +3 -0
- package/optimize/lib/components/icon/svgs/product_tsvb.svg +5 -0
- package/optimize/lib/components/icon/svgs/push.svg +4 -0
- package/optimize/lib/components/icon/svgs/transition_right_in.svg +4 -0
- package/optimize/lib/components/icon/svgs/transition_right_out.svg +4 -0
- package/optimize/lib/components/icon/svgs/wrench.svg +1 -1
- package/optimize/lib/components/resizable_container/resizable_collapse_button.js +4 -4
- package/optimize/lib/components/text_diff/text_diff.js +4 -6
- package/package.json +12 -10
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/basic_table/basic_table.js +4 -4
- package/test-env/components/basic_table/in_memory_table.js +4 -4
- package/test-env/components/button/button.js +17 -5
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group.js +111 -29
- package/test-env/components/button/button_group/button_group.styles.js +19 -6
- package/test-env/components/button/button_group/use_button_group_selection.js +36 -0
- package/test-env/components/button/button_icon/button_icon.js +18 -7
- package/test-env/components/button/use_button_common_props.js +16 -7
- package/test-env/components/call_out/call_out.js +2 -2
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/context_menu/context_menu_item.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +24 -24
- package/test-env/components/datagrid/body/data_grid_body.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/test-env/components/datagrid/controls/column_sorting.js +13 -13
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/test-env/components/datagrid/utils/in_memory.js +12 -12
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/date_picker/react-datepicker/src/month_dropdown.js +0 -1
- package/test-env/components/date_picker/react-datepicker/src/month_dropdown_options.js +0 -1
- package/test-env/components/date_picker/react-datepicker/src/month_year_dropdown.js +0 -1
- package/test-env/components/date_picker/react-datepicker/src/year_dropdown.js +0 -1
- package/test-env/components/date_picker/react-datepicker/test/helper_components/custom_input.js +74 -0
- package/test-env/components/date_picker/react-datepicker/test/test_wrapper.js +46 -0
- package/test-env/components/date_picker/react-datepicker/test/timezone_date_picker.js +78 -0
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +218 -249
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/test-env/components/delay_hide/delay_hide.js +32 -86
- package/test-env/components/delay_render/delay_render.js +38 -73
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/flyout/flyout_menu/flyout_menu.js +4 -4
- package/test-env/components/form/field_number/field_number.js +2 -2
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_button/form_control_button.js +1 -1
- package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/text_area/text_area.js +2 -2
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +1 -1
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/{optimize/lib/components/icon/assets/kubernetes_pod.js → test-env/components/icon/assets/cloud_bolt.js} +5 -3
- package/{optimize/lib/components/icon/assets/branch_user.js → test-env/components/icon/assets/cloud_rain.js} +4 -6
- package/{optimize/lib/components/icon/assets/cloud_stormy.js → test-env/components/icon/assets/cloud_sun.js} +3 -3
- package/{optimize/lib/components/icon/assets/kql_function.js → test-env/components/icon/assets/cube.js} +3 -3
- package/test-env/components/icon/assets/kubernetes_namespace.js +42 -0
- package/test-env/components/icon/assets/memory.js +1 -3
- package/test-env/components/icon/assets/product_timelion.js +40 -0
- package/test-env/components/icon/assets/product_tsvb.js +44 -0
- package/{optimize/lib/components/icon/assets/namespace.js → test-env/components/icon/assets/push.js} +3 -6
- package/{optimize/lib/components/icon/assets/continuity_above_below.js → test-env/components/icon/assets/transition_right_in.js} +5 -3
- package/test-env/components/icon/assets/transition_right_out.js +42 -0
- package/test-env/components/icon/assets/wrench.js +1 -3
- package/test-env/components/icon/icon_glyphs.a11y.js +1 -1
- package/test-env/components/icon/icon_map.js +165 -78
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +2 -2
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/pagination/pagination_button.js +1 -1
- package/test-env/components/resizable_container/resizable_collapse_button.js +4 -4
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/text_diff/text_diff.js +4 -6
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +2 -2
- package/test-env/components/toast/toast.js +2 -2
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/dist/svgs/branch_user.svg +0 -4
- package/dist/svgs/cloud_drizzle.svg +0 -3
- package/dist/svgs/cloud_stormy.svg +0 -3
- package/dist/svgs/cloud_sunny.svg +0 -3
- package/dist/svgs/continuity_above_below.svg +0 -3
- package/dist/svgs/continuity_below.svg +0 -3
- package/dist/svgs/function.svg +0 -3
- package/dist/svgs/kql_function.svg +0 -5
- package/dist/svgs/kubernetes_pod.svg +0 -3
- package/dist/svgs/magnet.svg +0 -3
- package/dist/svgs/menu_down.svg +0 -3
- package/dist/svgs/menu_up.svg +0 -3
- package/dist/svgs/namespace.svg +0 -3
- package/dist/svgs/page_select.svg +0 -3
- package/dist/svgs/security_signal_resolved.svg +0 -3
- package/dist/svgs/tear.svg +0 -3
- package/dist/svgs/vis_timelion.svg +0 -3
- package/dist/svgs/vis_visual_builder.svg +0 -3
- package/es/components/icon/assets/magnet.js +0 -33
- package/es/components/icon/assets/menu_down.js +0 -33
- package/es/components/icon/assets/menu_up.js +0 -33
- package/es/components/icon/assets/page_select.js +0 -34
- package/es/components/icon/assets/security_signal_resolved.js +0 -34
- package/es/components/icon/assets/tear.js +0 -33
- package/es/components/icon/assets/vis_timelion.js +0 -33
- package/es/components/icon/assets/vis_visual_builder.js +0 -33
- package/es/components/icon/svgs/branch_user.svg +0 -4
- package/es/components/icon/svgs/cloud_drizzle.svg +0 -3
- package/es/components/icon/svgs/cloud_stormy.svg +0 -3
- package/es/components/icon/svgs/cloud_sunny.svg +0 -3
- package/es/components/icon/svgs/continuity_above_below.svg +0 -3
- package/es/components/icon/svgs/continuity_below.svg +0 -3
- package/es/components/icon/svgs/function.svg +0 -3
- package/es/components/icon/svgs/kql_function.svg +0 -5
- package/es/components/icon/svgs/kubernetes_pod.svg +0 -3
- package/es/components/icon/svgs/magnet.svg +0 -3
- package/es/components/icon/svgs/menu_down.svg +0 -3
- package/es/components/icon/svgs/menu_up.svg +0 -3
- package/es/components/icon/svgs/namespace.svg +0 -3
- package/es/components/icon/svgs/page_select.svg +0 -3
- package/es/components/icon/svgs/security_signal_resolved.svg +0 -3
- package/es/components/icon/svgs/tear.svg +0 -3
- package/es/components/icon/svgs/vis_timelion.svg +0 -3
- package/es/components/icon/svgs/vis_visual_builder.svg +0 -3
- package/lib/components/icon/assets/magnet.js +0 -40
- package/lib/components/icon/assets/menu_down.js +0 -40
- package/lib/components/icon/assets/menu_up.js +0 -40
- package/lib/components/icon/assets/page_select.js +0 -41
- package/lib/components/icon/assets/security_signal_resolved.js +0 -41
- package/lib/components/icon/assets/tear.js +0 -40
- package/lib/components/icon/assets/vis_timelion.js +0 -40
- package/lib/components/icon/assets/vis_visual_builder.js +0 -40
- package/lib/components/icon/svgs/branch_user.svg +0 -4
- package/lib/components/icon/svgs/cloud_drizzle.svg +0 -3
- package/lib/components/icon/svgs/cloud_stormy.svg +0 -3
- package/lib/components/icon/svgs/cloud_sunny.svg +0 -3
- package/lib/components/icon/svgs/continuity_above_below.svg +0 -3
- package/lib/components/icon/svgs/continuity_below.svg +0 -3
- package/lib/components/icon/svgs/function.svg +0 -3
- package/lib/components/icon/svgs/kql_function.svg +0 -5
- package/lib/components/icon/svgs/kubernetes_pod.svg +0 -3
- package/lib/components/icon/svgs/magnet.svg +0 -3
- package/lib/components/icon/svgs/menu_down.svg +0 -3
- package/lib/components/icon/svgs/menu_up.svg +0 -3
- package/lib/components/icon/svgs/namespace.svg +0 -3
- package/lib/components/icon/svgs/page_select.svg +0 -3
- package/lib/components/icon/svgs/security_signal_resolved.svg +0 -3
- package/lib/components/icon/svgs/tear.svg +0 -3
- package/lib/components/icon/svgs/vis_timelion.svg +0 -3
- package/lib/components/icon/svgs/vis_visual_builder.svg +0 -3
- package/optimize/es/components/icon/assets/kubernetes_pod.js +0 -32
- package/optimize/es/components/icon/assets/magnet.js +0 -32
- package/optimize/es/components/icon/assets/menu_down.js +0 -32
- package/optimize/es/components/icon/assets/menu_up.js +0 -32
- package/optimize/es/components/icon/assets/page_select.js +0 -33
- package/optimize/es/components/icon/assets/security_signal_resolved.js +0 -33
- package/optimize/es/components/icon/assets/tear.js +0 -32
- package/optimize/es/components/icon/assets/vis_timelion.js +0 -32
- package/optimize/es/components/icon/assets/vis_visual_builder.js +0 -32
- package/optimize/es/components/icon/svgs/branch_user.svg +0 -4
- package/optimize/es/components/icon/svgs/cloud_drizzle.svg +0 -3
- package/optimize/es/components/icon/svgs/cloud_stormy.svg +0 -3
- package/optimize/es/components/icon/svgs/cloud_sunny.svg +0 -3
- package/optimize/es/components/icon/svgs/continuity_above_below.svg +0 -3
- package/optimize/es/components/icon/svgs/continuity_below.svg +0 -3
- package/optimize/es/components/icon/svgs/function.svg +0 -3
- package/optimize/es/components/icon/svgs/kql_function.svg +0 -5
- package/optimize/es/components/icon/svgs/kubernetes_pod.svg +0 -3
- package/optimize/es/components/icon/svgs/magnet.svg +0 -3
- package/optimize/es/components/icon/svgs/menu_down.svg +0 -3
- package/optimize/es/components/icon/svgs/menu_up.svg +0 -3
- package/optimize/es/components/icon/svgs/namespace.svg +0 -3
- package/optimize/es/components/icon/svgs/page_select.svg +0 -3
- package/optimize/es/components/icon/svgs/security_signal_resolved.svg +0 -3
- package/optimize/es/components/icon/svgs/tear.svg +0 -3
- package/optimize/es/components/icon/svgs/vis_timelion.svg +0 -3
- package/optimize/es/components/icon/svgs/vis_visual_builder.svg +0 -3
- package/optimize/lib/components/icon/assets/magnet.js +0 -40
- package/optimize/lib/components/icon/assets/menu_down.js +0 -40
- package/optimize/lib/components/icon/assets/menu_up.js +0 -40
- package/optimize/lib/components/icon/assets/page_select.js +0 -41
- package/optimize/lib/components/icon/assets/security_signal_resolved.js +0 -41
- package/optimize/lib/components/icon/assets/tear.js +0 -40
- package/optimize/lib/components/icon/assets/vis_timelion.js +0 -40
- package/optimize/lib/components/icon/assets/vis_visual_builder.js +0 -40
- package/optimize/lib/components/icon/svgs/branch_user.svg +0 -4
- package/optimize/lib/components/icon/svgs/cloud_drizzle.svg +0 -3
- package/optimize/lib/components/icon/svgs/cloud_stormy.svg +0 -3
- package/optimize/lib/components/icon/svgs/cloud_sunny.svg +0 -3
- package/optimize/lib/components/icon/svgs/continuity_above_below.svg +0 -3
- package/optimize/lib/components/icon/svgs/continuity_below.svg +0 -3
- package/optimize/lib/components/icon/svgs/function.svg +0 -3
- package/optimize/lib/components/icon/svgs/kql_function.svg +0 -5
- package/optimize/lib/components/icon/svgs/kubernetes_pod.svg +0 -3
- package/optimize/lib/components/icon/svgs/magnet.svg +0 -3
- package/optimize/lib/components/icon/svgs/menu_down.svg +0 -3
- package/optimize/lib/components/icon/svgs/menu_up.svg +0 -3
- package/optimize/lib/components/icon/svgs/namespace.svg +0 -3
- package/optimize/lib/components/icon/svgs/page_select.svg +0 -3
- package/optimize/lib/components/icon/svgs/security_signal_resolved.svg +0 -3
- package/optimize/lib/components/icon/svgs/tear.svg +0 -3
- package/optimize/lib/components/icon/svgs/vis_timelion.svg +0 -3
- package/optimize/lib/components/icon/svgs/vis_visual_builder.svg +0 -3
- package/test-env/components/icon/assets/cloud_drizzle.js +0 -40
- package/test-env/components/icon/assets/cloud_stormy.js +0 -40
- package/test-env/components/icon/assets/cloud_sunny.js +0 -40
- package/test-env/components/icon/assets/continuity_above_below.js +0 -40
- package/test-env/components/icon/assets/function.js +0 -40
- package/test-env/components/icon/assets/kubernetes_pod.js +0 -40
- package/test-env/components/icon/assets/magnet.js +0 -40
- package/test-env/components/icon/assets/menu_down.js +0 -40
- package/test-env/components/icon/assets/menu_up.js +0 -40
- package/test-env/components/icon/assets/page_select.js +0 -41
- package/test-env/components/icon/assets/security_signal_resolved.js +0 -41
- package/test-env/components/icon/assets/tear.js +0 -40
- package/test-env/components/icon/assets/vis_timelion.js +0 -40
- package/test-env/components/icon/assets/vis_visual_builder.js +0 -40
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "buttonRef", "size", "color", "fill", "isDisabled", "hasAriaDisabled", "fullWidth"];
|
|
1
|
+
var _excluded = ["className", "buttonRef", "size", "color", "fill", "isDisabled", "hasAriaDisabled", "fullWidth", "id", "onClick", "isSelected"];
|
|
2
2
|
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
3
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
@@ -38,6 +38,9 @@ export var EuiButton = function EuiButton(_ref) {
|
|
|
38
38
|
_isDisabled = _ref.isDisabled,
|
|
39
39
|
_hasAriaDisabled = _ref.hasAriaDisabled,
|
|
40
40
|
_fullWidth = _ref.fullWidth,
|
|
41
|
+
id = _ref.id,
|
|
42
|
+
_onClick = _ref.onClick,
|
|
43
|
+
_isSelected = _ref.isSelected,
|
|
41
44
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
42
45
|
var _useEuiButtonCommonPr = useEuiButtonCommonProps({
|
|
43
46
|
size: _size,
|
|
@@ -46,16 +49,21 @@ export var EuiButton = function EuiButton(_ref) {
|
|
|
46
49
|
hasAriaDisabled: _hasAriaDisabled,
|
|
47
50
|
fullWidth: _fullWidth,
|
|
48
51
|
fill: _fill,
|
|
52
|
+
isSelected: _isSelected,
|
|
49
53
|
href: rest.href,
|
|
50
54
|
disabled: rest.disabled,
|
|
51
|
-
isLoading: rest.isLoading
|
|
55
|
+
isLoading: rest.isLoading,
|
|
56
|
+
id: id,
|
|
57
|
+
onClick: _onClick
|
|
52
58
|
}),
|
|
53
59
|
size = _useEuiButtonCommonPr.size,
|
|
54
60
|
color = _useEuiButtonCommonPr.color,
|
|
55
61
|
isDisabled = _useEuiButtonCommonPr.isDisabled,
|
|
56
62
|
hasAriaDisabled = _useEuiButtonCommonPr.hasAriaDisabled,
|
|
57
63
|
fullWidth = _useEuiButtonCommonPr.fullWidth,
|
|
58
|
-
fill = _useEuiButtonCommonPr.fill
|
|
64
|
+
fill = _useEuiButtonCommonPr.fill,
|
|
65
|
+
isSelected = _useEuiButtonCommonPr.isSelected,
|
|
66
|
+
onClick = _useEuiButtonCommonPr.onClick;
|
|
59
67
|
var buttonColorStyles = useEuiButtonColorCSS({
|
|
60
68
|
display: fill ? 'fill' : 'base'
|
|
61
69
|
})[isDisabled ? 'disabled' : color];
|
|
@@ -63,14 +71,18 @@ export var EuiButton = function EuiButton(_ref) {
|
|
|
63
71
|
var classes = classNames('euiButton', className);
|
|
64
72
|
var cssStyles = [buttonColorStyles, buttonFocusStyle];
|
|
65
73
|
return ___EmotionJSX(EuiButtonDisplay, _extends({
|
|
74
|
+
ref: buttonRef,
|
|
66
75
|
className: classes,
|
|
67
76
|
css: cssStyles,
|
|
68
|
-
ref: buttonRef,
|
|
69
77
|
size: size,
|
|
70
78
|
isDisabled: isDisabled,
|
|
71
79
|
hasAriaDisabled: hasAriaDisabled,
|
|
72
80
|
fullWidth: fullWidth
|
|
73
|
-
}, rest
|
|
81
|
+
}, rest, {
|
|
82
|
+
id: id,
|
|
83
|
+
isSelected: isSelected,
|
|
84
|
+
onClick: onClick
|
|
85
|
+
}));
|
|
74
86
|
};
|
|
75
87
|
EuiButton.propTypes = {
|
|
76
88
|
href: PropTypes.string,
|
|
@@ -83,7 +83,7 @@ EuiButtonDisplayContent.propTypes = {
|
|
|
83
83
|
/**
|
|
84
84
|
* Any `type` accepted by EuiIcon
|
|
85
85
|
*/
|
|
86
|
-
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "addToChat", "addToDashboard", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "analyzeEvent", "annotation", "chartAnomaly", "anomalySwimLane", "apmApp", "chartWaterfall", "appSearchApp", "apps", "chevronSingleDown", "chevronSingleLeft", "chevronSingleRight", "chevronSingleUp", "chevronLimitLeft", "chevronLimitRight", "
|
|
86
|
+
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "addToChat", "addToDashboard", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "analyzeEvent", "annotation", "chartAnomaly", "anomalySwimLane", "apmApp", "chartWaterfall", "appSearchApp", "apps", "chevronSingleDown", "chevronSingleLeft", "chevronSingleRight", "chevronSingleUp", "chevronLimitLeft", "chevronLimitRight", "asterisk", "at", "archive", "article", "axisX", "axisYLeft", "axisYRight", "auditbeatApp", "backgroundTask", "bell", "bellSlash", "beta", "bolt", "boxesVertical", "branch", "briefcase", "broom", "brush", "bug", "bulb", "bullseye", "calendar", "canvasApp", "casesApp", "chartChangePoint", "chartArea", "visArea", "chartAreaStack", "chartBarHorizontal", "chartBarHorizontalStack", "chartBarVertical", "visBarVertical", "chartBarVerticalStack", "chartGauge", "visGauge", "chartHeatmap", "chartLine", "visLine", "chartPie", "visPie", "chartTagCloud", "chartThreshold", "check", "checkCircle", "checkCircleFill", "popper", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "clockControl", "cloud", "cloudBolt", "cloudDrizzle", "cloudRain", "cloudStormy", "cloudSun", "cloudSunny", "cluster", "code", "codeApp", "paintBucket", "commandLine", "comment", "editorComment", "compare", "processor", "compute", "consoleApp", "container", "continuityAbove", "continuityWithin", "contrast", "contrastFill", "controls", "copy", "crossProjectSearch", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossCircle", "crosshair", "cursorDefault", "money", "scissors", "dashboardApp", "dashedCircle", "dataVisualizer", "database", "display", "devToolsApp", "discoverApp", "distributeHorizontal", "distributeVertical", "download", "drag", "dragHorizontal", "dragVertical", "document", "documentation", "documents", "dot", "dotInCircle", "chevronDoubleLeft", "chevronDoubleRight", "ellipsis", "textAlignCenter", "textAlignLeft", "textAlignRight", "textBold", "listCheck", "textHeading", "textItalic", "listNumber", "redo", "textStrike", "table", "visTable", "textUnderline", "undo", "listBullet", "list", "mail", "empty", "emsApp", "endpoint", "query", "eraser", "error", "errorFill", "esqlVis", "logIn", "logOut", "maximize", "export", "upload", "external", "eye", "eyeSlash", "faceHappy", "faceNeutral", "faceSad", "tableInfo", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "flask", "flag", "fleetApp", "fold", "folder", "folderClosed", "folderClose", "folderCheck", "folderExclamation", "folderOpen", "folderOpened", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "gear", "gisApp", "globe", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "help", "home", "hourglass", "if", "info", "image", "index", "indexClose", "tableCross", "indexEdit", "tablePencil", "indexManagementApp", "mapping", "indexOpen", "tablePlus", "indexPatternApp", "indexRollupApp", "indexRuntime", "tablePlay", "indexSettings", "tableGear", "tableTime", "infinity", "inputOutput", "inspect", "ip", "key", "keyboard", "queryField", "kqlFunction", "queryOperand", "querySelector", "queryValue", "kubernetesNamespace", "kubernetesNode", "kubernetesPod", "cube", "rocket", "layers", "lensApp", "text", "lineBreak", "lineBreakSlash", "lineDash", "lineDot", "lineSolid", "link", "linkSlash", "lock", "lockOpen", "pattern", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVectorDB", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashInput", "logstashOutput", "queue", "machineLearningApp", "magnify", "search", "magnifyExclamation", "magnifyMinus", "magnifyPlus", "managementApp", "map", "mapMarker", "waypoint", "megaphone", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusCircle", "minusSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "vectorTriangle", "notebookApp", "number", "wifiSlash", "wifi", "outlierDetectionJob", "package", "packetbeatApp", "pagesSelect", "documentsCheck", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFill", "pinFilled", "pipelineApp", "pivot", "play", "plugs", "plus", "plusCircle", "plusSquare", "presentation", "productAgent", "productCloudInfra", "productDashboard", "productDiscover", "productML", "productStreamsClassic", "productStreamsWired", "productTimelion", "productTSVB", "push", "send", "question", "quote", "radar", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "return", "routeSplit", "save", "scale", "savedObjectsApp", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignalDetected", "server", "sessionViewer", "shard", "share", "significantEvents", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "star", "starEmpty", "starEmptySpace", "starFill", "starFilled", "starFillSpace", "starMinusEmpty", "starMinusFill", "starPlusEmpty", "starPlusFill", "stats", "stop", "stopFill", "stopSlash", "storage", "string", "sun", "swatchInput", "symlink", "tableDensityHigh", "tableDensityLow", "tableOfContents", "tag", "thermometer", "temperature", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelinePointer", "timelionApp", "refreshTime", "transitionBottomIn", "transitionBottomOut", "transitionLeftIn", "transitionLeftOut", "transitionRightIn", "transitionRightOut", "transitionTopIn", "transitionTopOut", "translate", "trash", "unfold", "upgradeAssistantApp", "uptimeApp", "user", "users", "usersRolesApp", "unarchive", "vectorSquare", "videoPlayer", "visGoal", "chartMetric", "visTimelion", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "warningFill", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workflow", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenVectorSparse"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
|
|
87
87
|
/**
|
|
88
88
|
* Can only be one side `left` or `right`
|
|
89
89
|
*/
|
|
@@ -188,7 +188,7 @@ EuiButtonEmpty.propTypes = {
|
|
|
188
188
|
/**
|
|
189
189
|
* Any `type` accepted by EuiIcon
|
|
190
190
|
*/
|
|
191
|
-
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "addToChat", "addToDashboard", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "analyzeEvent", "annotation", "chartAnomaly", "anomalySwimLane", "apmApp", "chartWaterfall", "appSearchApp", "apps", "chevronSingleDown", "chevronSingleLeft", "chevronSingleRight", "chevronSingleUp", "chevronLimitLeft", "chevronLimitRight", "
|
|
191
|
+
iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "addToChat", "addToDashboard", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "analyzeEvent", "annotation", "chartAnomaly", "anomalySwimLane", "apmApp", "chartWaterfall", "appSearchApp", "apps", "chevronSingleDown", "chevronSingleLeft", "chevronSingleRight", "chevronSingleUp", "chevronLimitLeft", "chevronLimitRight", "asterisk", "at", "archive", "article", "axisX", "axisYLeft", "axisYRight", "auditbeatApp", "backgroundTask", "bell", "bellSlash", "beta", "bolt", "boxesVertical", "branch", "briefcase", "broom", "brush", "bug", "bulb", "bullseye", "calendar", "canvasApp", "casesApp", "chartChangePoint", "chartArea", "visArea", "chartAreaStack", "chartBarHorizontal", "chartBarHorizontalStack", "chartBarVertical", "visBarVertical", "chartBarVerticalStack", "chartGauge", "visGauge", "chartHeatmap", "chartLine", "visLine", "chartPie", "visPie", "chartTagCloud", "chartThreshold", "check", "checkCircle", "checkCircleFill", "popper", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "clockControl", "cloud", "cloudBolt", "cloudDrizzle", "cloudRain", "cloudStormy", "cloudSun", "cloudSunny", "cluster", "code", "codeApp", "paintBucket", "commandLine", "comment", "editorComment", "compare", "processor", "compute", "consoleApp", "container", "continuityAbove", "continuityWithin", "contrast", "contrastFill", "controls", "copy", "crossProjectSearch", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossCircle", "crosshair", "cursorDefault", "money", "scissors", "dashboardApp", "dashedCircle", "dataVisualizer", "database", "display", "devToolsApp", "discoverApp", "distributeHorizontal", "distributeVertical", "download", "drag", "dragHorizontal", "dragVertical", "document", "documentation", "documents", "dot", "dotInCircle", "chevronDoubleLeft", "chevronDoubleRight", "ellipsis", "textAlignCenter", "textAlignLeft", "textAlignRight", "textBold", "listCheck", "textHeading", "textItalic", "listNumber", "redo", "textStrike", "table", "visTable", "textUnderline", "undo", "listBullet", "list", "mail", "empty", "emsApp", "endpoint", "query", "eraser", "error", "errorFill", "esqlVis", "logIn", "logOut", "maximize", "export", "upload", "external", "eye", "eyeSlash", "faceHappy", "faceNeutral", "faceSad", "tableInfo", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "flask", "flag", "fleetApp", "fold", "folder", "folderClosed", "folderClose", "folderCheck", "folderExclamation", "folderOpen", "folderOpened", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "gear", "gisApp", "globe", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "help", "home", "hourglass", "if", "info", "image", "index", "indexClose", "tableCross", "indexEdit", "tablePencil", "indexManagementApp", "mapping", "indexOpen", "tablePlus", "indexPatternApp", "indexRollupApp", "indexRuntime", "tablePlay", "indexSettings", "tableGear", "tableTime", "infinity", "inputOutput", "inspect", "ip", "key", "keyboard", "queryField", "kqlFunction", "queryOperand", "querySelector", "queryValue", "kubernetesNamespace", "kubernetesNode", "kubernetesPod", "cube", "rocket", "layers", "lensApp", "text", "lineBreak", "lineBreakSlash", "lineDash", "lineDot", "lineSolid", "link", "linkSlash", "lock", "lockOpen", "pattern", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVectorDB", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashInput", "logstashOutput", "queue", "machineLearningApp", "magnify", "search", "magnifyExclamation", "magnifyMinus", "magnifyPlus", "managementApp", "map", "mapMarker", "waypoint", "megaphone", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusCircle", "minusSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "vectorTriangle", "notebookApp", "number", "wifiSlash", "wifi", "outlierDetectionJob", "package", "packetbeatApp", "pagesSelect", "documentsCheck", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFill", "pinFilled", "pipelineApp", "pivot", "play", "plugs", "plus", "plusCircle", "plusSquare", "presentation", "productAgent", "productCloudInfra", "productDashboard", "productDiscover", "productML", "productStreamsClassic", "productStreamsWired", "productTimelion", "productTSVB", "push", "send", "question", "quote", "radar", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "return", "routeSplit", "save", "scale", "savedObjectsApp", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignalDetected", "server", "sessionViewer", "shard", "share", "significantEvents", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "star", "starEmpty", "starEmptySpace", "starFill", "starFilled", "starFillSpace", "starMinusEmpty", "starMinusFill", "starPlusEmpty", "starPlusFill", "stats", "stop", "stopFill", "stopSlash", "storage", "string", "sun", "swatchInput", "symlink", "tableDensityHigh", "tableDensityLow", "tableOfContents", "tag", "thermometer", "temperature", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelinePointer", "timelionApp", "refreshTime", "transitionBottomIn", "transitionBottomOut", "transitionLeftIn", "transitionLeftOut", "transitionRightIn", "transitionRightOut", "transitionTopIn", "transitionTopOut", "translate", "trash", "unfold", "upgradeAssistantApp", "uptimeApp", "user", "users", "usersRolesApp", "unarchive", "vectorSquare", "videoPlayer", "visGoal", "chartMetric", "visTimelion", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "warningFill", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workflow", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenVectorSparse"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
|
|
192
192
|
/**
|
|
193
193
|
* Can only be one side `left` or `right`
|
|
194
194
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
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
2
|
var _excluded = ["className", "buttonSize", "color", "idSelected", "idToSelectedMap", "isDisabled", "hasAriaDisabled", "isFullWidth", "isIconOnly", "legend", "name", "onChange", "options", "type"],
|
|
3
|
-
_excluded2 = ["className", "children", "legend", "buttonSize", "variant", "gutterSize", "isDisabled", "hasAriaDisabled", "isFullWidth", "showDividers", "wrap", "layout", "onChange"];
|
|
3
|
+
_excluded2 = ["className", "children", "legend", "buttonSize", "variant", "gutterSize", "isDisabled", "hasAriaDisabled", "isFullWidth", "showDividers", "wrap", "layout", "display", "type", "idSelected", "idToSelectedMap", "onChange"];
|
|
4
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; }
|
|
5
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; }
|
|
6
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; }
|
|
@@ -22,8 +22,9 @@ import PropTypes from "prop-types";
|
|
|
22
22
|
import React, { useMemo } from 'react';
|
|
23
23
|
import { useEuiMemoizedStyles } from '../../../services';
|
|
24
24
|
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
25
|
-
import { EuiButtonGroupButton } from './button_group_button';
|
|
26
25
|
import { EuiButtonContext } from '../button_context';
|
|
26
|
+
import { EuiButtonGroupButton } from './button_group_button';
|
|
27
|
+
import { useEuiButtonGroupSelection } from './use_button_group_selection';
|
|
27
28
|
import { euiButtonGroupStyles, euiButtonGroupButtonsStyles } from './button_group.styles';
|
|
28
29
|
|
|
29
30
|
// removes outer fragment wrappers only; no nested traversal of children
|
|
@@ -245,32 +246,62 @@ export var EuiButtonGroupChildren = function EuiButtonGroupChildren(_ref2) {
|
|
|
245
246
|
wrap = _ref2$wrap === void 0 ? true : _ref2$wrap,
|
|
246
247
|
_ref2$layout = _ref2.layout,
|
|
247
248
|
layout = _ref2$layout === void 0 ? 'horizontal' : _ref2$layout,
|
|
248
|
-
|
|
249
|
+
_ref2$display = _ref2.display,
|
|
250
|
+
display = _ref2$display === void 0 ? 'regular' : _ref2$display,
|
|
251
|
+
type = _ref2.type,
|
|
252
|
+
idSelected = _ref2.idSelected,
|
|
253
|
+
idToSelectedMap = _ref2.idToSelectedMap,
|
|
254
|
+
onChange = _ref2.onChange,
|
|
249
255
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
250
256
|
var isSegmented = variant === 'segmented';
|
|
257
|
+
var isSelection = variant === 'selection';
|
|
258
|
+
var hasSegmentedStyle = isSegmented || isSelection;
|
|
251
259
|
var hasGutterSize = variant === 'default' && gutterSize !== 'none';
|
|
260
|
+
var _useEuiButtonGroupSel = useEuiButtonGroupSelection({
|
|
261
|
+
type: type,
|
|
262
|
+
idSelected: idSelected,
|
|
263
|
+
idToSelectedMap: idToSelectedMap,
|
|
264
|
+
onChange: onChange
|
|
265
|
+
}),
|
|
266
|
+
isSelected = _useEuiButtonGroupSel.isSelected,
|
|
267
|
+
_onSelect = _useEuiButtonGroupSel.onSelect;
|
|
252
268
|
var wrapperCssStyles = [euiButtonGroupStyles.euiButtonGroup, isFullWidth && euiButtonGroupStyles.fullWidth];
|
|
253
269
|
var styles = useEuiMemoizedStyles(euiButtonGroupButtonsStyles);
|
|
254
|
-
var cssStyles = [styles.euiButtonGroup__buttons, hasGutterSize && styles.gutterSize[gutterSize],
|
|
270
|
+
var cssStyles = [styles.euiButtonGroup__buttons, hasGutterSize && styles.gutterSize[gutterSize], hasSegmentedStyle && !wrap && styles.noWrap];
|
|
255
271
|
var containerCssStyles = [styles.euiButtonGroup__container, isFullWidth && layout !== 'vertical' && styles.fullWidth];
|
|
256
272
|
var classes = classNames('euiButtonGroup', {
|
|
257
273
|
'euiButtonGroup-isDisabled': isDisabled
|
|
258
274
|
}, className);
|
|
259
275
|
var contextValue = useMemo(function () {
|
|
260
|
-
return _objectSpread({
|
|
276
|
+
return _objectSpread(_objectSpread(_objectSpread({
|
|
261
277
|
size: buttonSize,
|
|
262
278
|
isDisabled: isDisabled || undefined,
|
|
263
279
|
hasAriaDisabled: hasAriaDisabled || undefined,
|
|
264
280
|
fullWidth: isFullWidth
|
|
265
|
-
}, isSegmented && {
|
|
281
|
+
}, (isSegmented || isSelection) && {
|
|
282
|
+
color: 'text'
|
|
283
|
+
}), isSegmented && {
|
|
266
284
|
display: 'base',
|
|
267
|
-
color: 'text',
|
|
268
285
|
fill: false
|
|
286
|
+
}), isSelection && {
|
|
287
|
+
getSelectionProps: function getSelectionProps(id) {
|
|
288
|
+
var selected = isSelected(id);
|
|
289
|
+
var isInverse = display === 'inverse';
|
|
290
|
+
var hasFill = selected && display === 'highlighted';
|
|
291
|
+
return {
|
|
292
|
+
isSelected: selected,
|
|
293
|
+
fill: isInverse ? false : hasFill,
|
|
294
|
+
display: isInverse ? 'base' : hasFill ? 'fill' : undefined,
|
|
295
|
+
onSelect: function onSelect() {
|
|
296
|
+
return _onSelect(id);
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
}
|
|
269
300
|
});
|
|
270
|
-
}, [buttonSize, isDisabled, hasAriaDisabled, isFullWidth, isSegmented]);
|
|
301
|
+
}, [buttonSize, isDisabled, hasAriaDisabled, isFullWidth, isSegmented, isSelection, isSelected, _onSelect, display]);
|
|
271
302
|
|
|
272
|
-
// wrap children in a wrapper to
|
|
273
|
-
var children = isSegmented ? flattenButtonGroupChildren(_children).map(function (child, index) {
|
|
303
|
+
// wrap children in a wrapper to apply required inset styles
|
|
304
|
+
var children = isSegmented || isSelection ? flattenButtonGroupChildren(_children).map(function (child, index) {
|
|
274
305
|
var _child$key;
|
|
275
306
|
return ___EmotionJSX("div", {
|
|
276
307
|
key: (_child$key = child.key) !== null && _child$key !== void 0 ? _child$key : "euiButtonGroupItem-".concat(index),
|
|
@@ -283,8 +314,9 @@ export var EuiButtonGroupChildren = function EuiButtonGroupChildren(_ref2) {
|
|
|
283
314
|
role: "group",
|
|
284
315
|
"data-variant": variant,
|
|
285
316
|
"data-size": buttonSize,
|
|
286
|
-
"data-
|
|
287
|
-
"data-
|
|
317
|
+
"data-display": isSelection ? display : undefined,
|
|
318
|
+
"data-layout": hasSegmentedStyle ? layout : undefined,
|
|
319
|
+
"data-dividers": hasSegmentedStyle && showDividers || undefined,
|
|
288
320
|
"aria-label": legend,
|
|
289
321
|
"aria-disabled": isDisabled || undefined
|
|
290
322
|
}, rest), ___EmotionJSX("div", {
|
|
@@ -326,14 +358,6 @@ EuiButtonGroupChildren.propTypes = {
|
|
|
326
358
|
* @default 's'
|
|
327
359
|
*/
|
|
328
360
|
buttonSize: PropTypes.oneOf(["s", "m"]),
|
|
329
|
-
/**
|
|
330
|
-
* Defines the type of a button group, which renders visually and functionally different:
|
|
331
|
-
* - default: arranges buttons in a horizontal row with optional gutter via `gutterSize`
|
|
332
|
-
* - segmented: arranges buttons in a horizontal or vertical row with no gutter.
|
|
333
|
-
* The buttons are placed inset and dividers can optionally be shown between them.
|
|
334
|
-
* @default 'default'
|
|
335
|
-
*/
|
|
336
|
-
variant: PropTypes.oneOf(["default", "segmented"]),
|
|
337
361
|
/**
|
|
338
362
|
* Defines the gutter size between children buttons.
|
|
339
363
|
* Applies only when `variant="default"`.
|
|
@@ -342,36 +366,94 @@ EuiButtonGroupChildren.propTypes = {
|
|
|
342
366
|
gutterSize: PropTypes.any,
|
|
343
367
|
/**
|
|
344
368
|
* Expands the whole group to the full width of the container.
|
|
345
|
-
* `EuiButton` children will stretch to fill the available space
|
|
369
|
+
* Only `EuiButton` children will stretch to fill the available space.
|
|
370
|
+
* `EuiButtonIcon` groups will not stretch.
|
|
346
371
|
* Does not apply when `layout="vertical"`.
|
|
347
372
|
* @default false
|
|
348
373
|
*/
|
|
349
374
|
isFullWidth: PropTypes.bool,
|
|
350
375
|
/**
|
|
351
376
|
* Shows dividers between buttons.
|
|
352
|
-
*
|
|
377
|
+
* Does not apply when `variant="default"`.
|
|
353
378
|
* @default false
|
|
354
379
|
*/
|
|
355
380
|
showDividers: PropTypes.bool,
|
|
356
381
|
/**
|
|
357
382
|
* Defines the layout direction of the button group.
|
|
358
383
|
* `layout="vertical"` should only be used with EuiButtonIcon children.
|
|
359
|
-
*
|
|
384
|
+
* Does not apply when `variant="default"`.
|
|
360
385
|
* @default 'horizontal'
|
|
361
386
|
*/
|
|
362
387
|
layout: PropTypes.oneOf(["horizontal", "vertical"]),
|
|
363
388
|
/**
|
|
364
389
|
* Defines if buttons wrap or shrink.
|
|
365
|
-
*
|
|
390
|
+
* Does not apply when `variant="default"`.
|
|
366
391
|
* @default true
|
|
367
392
|
*/
|
|
368
393
|
wrap: PropTypes.bool,
|
|
369
394
|
/**
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
395
|
+
* Defines the type of a button group, which renders visually and functionally different:
|
|
396
|
+
* - default: arranges buttons in a horizontal row with optional gutter via `gutterSize`
|
|
397
|
+
* - segmented: arranges buttons in a horizontal or vertical row with no gutter.
|
|
398
|
+
* The buttons are placed inset and dividers can optionally be shown between them.
|
|
399
|
+
* - selection: arranges buttons inset with toggle selection state (single or multi).
|
|
400
|
+
* Each child button must have a unique `id` prop.
|
|
401
|
+
* @default 'default'
|
|
402
|
+
*/
|
|
403
|
+
variant: PropTypes.oneOfType([PropTypes.oneOf(["selection"]), PropTypes.oneOf(["default", "segmented"])]),
|
|
404
|
+
/**
|
|
405
|
+
* Determines selection behavior.
|
|
406
|
+
* With `'multi'` multiple buttons can be selected simultaneously.
|
|
407
|
+
* Applies only when `variant="selection"`.
|
|
408
|
+
*/
|
|
409
|
+
/**
|
|
410
|
+
* Determines selection behavior.
|
|
411
|
+
* With `'single'` only one button can be selected at a time.
|
|
412
|
+
* Applies only when `variant="selection"`.
|
|
413
|
+
* @default 'single'
|
|
414
|
+
*/
|
|
415
|
+
type: PropTypes.oneOfType([PropTypes.oneOf(["single"]), PropTypes.oneOf(["multi"])]),
|
|
416
|
+
/**
|
|
417
|
+
* The currently selected button `id`.
|
|
418
|
+
* Omit or pass `undefined` for no initial selection.
|
|
419
|
+
* Applies only when `variant="selection"` and `type="single"`.
|
|
420
|
+
*/
|
|
421
|
+
idSelected: PropTypes.string,
|
|
422
|
+
/**
|
|
423
|
+
* Visual display variant for the selection container background.
|
|
424
|
+
* Applies only when `variant="selection"`.
|
|
425
|
+
* - `'regular'`: subdued toggle state, light container background
|
|
426
|
+
* - `'highlighted'`: highlighted toggle state, light container background
|
|
427
|
+
* - `'inverse'`: light toggle state, dark container background
|
|
428
|
+
* @default 'regular'
|
|
429
|
+
*/
|
|
430
|
+
/**
|
|
431
|
+
* Visual display variant for the selection container background.
|
|
432
|
+
* Applies only when `variant="selection"`.
|
|
433
|
+
* - `'regular'`: subdued toggle state, light container background
|
|
434
|
+
* - `'highlighted'`: highlighted toggle state, light container background
|
|
435
|
+
* - `'inverse'`: light toggle state, dark container background
|
|
436
|
+
* @default 'regular'
|
|
437
|
+
*/
|
|
438
|
+
display: PropTypes.oneOf(["regular", "highlighted", "inverse"]),
|
|
439
|
+
/**
|
|
440
|
+
* Callback fired when a child button is selected.
|
|
441
|
+
* Returns the `id` of the clicked option.
|
|
442
|
+
* Applies only when `variant="selection"`.
|
|
443
|
+
*/
|
|
444
|
+
/**
|
|
445
|
+
* Callback fired when a child button is selected.
|
|
446
|
+
* Returns the `id` of the clicked option.
|
|
447
|
+
* Applies only when `variant="selection"`.
|
|
448
|
+
*/
|
|
449
|
+
onChange: PropTypes.func,
|
|
450
|
+
/**
|
|
451
|
+
* A map of button `id`s to their selected boolean values.
|
|
452
|
+
* Omit or pass `{}` for no initial selection.
|
|
453
|
+
* The consumer must update this value via `onChange` to reflect new selections.
|
|
454
|
+
* Applies only when `variant="selection"` and `type="multi"`.
|
|
455
|
+
*/
|
|
456
|
+
idToSelectedMap: PropTypes.any
|
|
375
457
|
};
|
|
376
458
|
// Renders either the (legacy) `options` API or the `children` API depending on which props are provided.
|
|
377
459
|
export var EuiButtonGroup = function EuiButtonGroup(props) {
|
|
@@ -8,15 +8,16 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { euiButtonSizeMap, euiDisabledSelector, logicalCSS, mathWithUnits } from '../../../global_styling';
|
|
11
|
+
import { euiButtonSizeMap, euiDisabledSelector, euiShadowXSmall, logicalCSS, mathWithUnits } from '../../../global_styling';
|
|
12
12
|
import { highContrastModeStyles, preventForcedColors } from '../../../global_styling/functions/high_contrast';
|
|
13
13
|
import { euiFormVariables } from '../../form/form.styles';
|
|
14
14
|
var hasButtonOnlySelector = ':not(:has(.euiButtonIcon))';
|
|
15
15
|
var hasButtonIconOnlySelector = ':not(:has(.euiButton, .euiButtonEmpty))';
|
|
16
16
|
var buttonItemSelector = '.euiButtonGroup__item, .euiToolTipAnchor, .euiPopover, .euiButton';
|
|
17
17
|
var buttonOnlyItemSelector = "*:is(".concat(buttonItemSelector, "):not(:has(.euiButtonIcon))");
|
|
18
|
+
var segmentedStyledSelector = "*:is([data-variant='segmented'], [data-variant='selection'])";
|
|
18
19
|
export var euiButtonGroupStyles = {
|
|
19
|
-
euiButtonGroup: /*#__PURE__*/css("display:inline-block;", logicalCSS('max-width', '100%'), " position:relative;&:where(
|
|
20
|
+
euiButtonGroup: /*#__PURE__*/css("display:inline-block;", logicalCSS('max-width', '100%'), " position:relative;&:where(", segmentedStyledSelector, "){&", hasButtonIconOnlySelector, "{display:flex;}};label:euiButtonGroup;"),
|
|
20
21
|
fullWidth: process.env.NODE_ENV === "production" ? {
|
|
21
22
|
name: "jl0hie-fullWidth",
|
|
22
23
|
styles: "display:block;label:fullWidth;"
|
|
@@ -69,13 +70,25 @@ export var euiButtonGroupButtonsStyles = function euiButtonGroupButtonsStyles(eu
|
|
|
69
70
|
}), ";\n inline-size: calc(\n 100% + ").concat(mathWithUnits(containerPadding, function (x) {
|
|
70
71
|
return x * 2;
|
|
71
72
|
}), "\n );\n block-size: ").concat(euiTheme.border.width.thin, ";\n border-block-start: ").concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBasePlain, ";\n pointer-events: none;\n }\n\n /* inline border */\n &::after {\n content: '';\n position: absolute;\n inset-inline-start: -").concat(dividerOffset, ";\n block-size: calc(\n var(--euiButtonGroupButtonInsetSize) - ").concat(euiTheme.size.s, "\n );\n inline-size: ").concat(euiTheme.border.width.thin, ";\n border-inline-start: ").concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBasePlain, ";\n pointer-events: none;\n }\n }\n\n &:where([data-layout='horizontal'] &) {\n &:where(:is(").concat(hasButtonIconOnlySelector, ") &) {\n .euiButtonGroup__item::before {\n inset-inline-start: 0;\n inline-size: 100%;\n }\n }\n }\n\n &:where([data-layout='vertical'] &) {\n &:where(:is(").concat(hasButtonIconOnlySelector, ") &) {\n .euiButtonGroup__item::before {\n inset-inline-start: auto;\n inline-size: calc(\n var(--euiButtonGroupButtonInsetSize) - ").concat(euiTheme.size.s, "\n );\n }\n }\n }\n ");
|
|
72
|
-
|
|
73
|
+
|
|
74
|
+
// Shared inset styles for both segmented and selection variants.
|
|
75
|
+
var segmentedChildrenStyles = "\n /* Buttons are used inset and shouldn't have their own borders */\n .euiButton,\n .euiButtonIcon {\n border: none;\n pointer-events: auto; /* Ensure buttons are still clickable in jsdom */\n\n &::before {\n border-radius: inherit;\n }\n\n &:focus-visible {\n outline-offset: 0;\n }\n }\n\n /* Adjust children for inset behavior */\n ".concat(buttonItemSelector, ",\n .euiButtonIcon {\n display: inline-flex;\n align-items: center;\n block-size: var(--euiButtonGroupButtonInsetSize);\n border-radius: ").concat(buttonGroupVariables.radius.inner, ";\n }\n\n .euiButtonIcon {\n inline-size: var(--euiButtonGroupButtonInsetSize);\n }\n\n /* Only non-icon buttons auto-grow/shrink */\n .euiButton,\n ").concat(buttonOnlyItemSelector, " {\n flex: 1;\n min-inline-size: auto;\n }\n ");
|
|
73
76
|
return {
|
|
74
77
|
// Base
|
|
75
|
-
euiButtonGroup__container: /*#__PURE__*/css("&:where(
|
|
76
|
-
euiButtonGroup__buttons: /*#__PURE__*/css(logicalCSS('max-width', '100%'), " display:flex;align-items:center;&:where([data-variant='default'] &){flex-wrap:wrap;}&:where(
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
euiButtonGroup__container: /*#__PURE__*/css("&:where(", segmentedStyledSelector, " &){position:relative;display:inline-flex;align-items:center;max-inline-size:100%;padding:", splitPadding, ";border-radius:", buttonGroupVariables.radius.outer, ";background-color:", euiTheme.colors.backgroundBasePlain, ";&:where([data-size='s'] &){--euiButtonGroupButtonInsetSize:", buttonGroupVariables.size.s, ";min-block-size:", buttonSizeMap.s.height, ";}&:where([data-size='m'] &){--euiButtonGroupButtonInsetSize:", buttonGroupVariables.size.m, ";min-block-size:", buttonSizeMap.m.height, ";}&::after{content:'';position:absolute;inset:0;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.borderBasePlain, ";border-radius:inherit;pointer-events:none;}}&:where([data-variant='selection'][data-display='inverse'] &){background-color:", euiTheme.colors.backgroundBaseSubdued, ";};label:euiButtonGroup__container;"),
|
|
79
|
+
euiButtonGroup__buttons: /*#__PURE__*/css(logicalCSS('max-width', '100%'), " display:flex;align-items:center;&:where([data-variant='default'] &){flex-wrap:wrap;}&:where(", segmentedStyledSelector, " &){position:relative;display:inline-flex;align-items:center;flex-wrap:wrap;gap:", buttonGroupVariables.gap.regular, ";max-inline-size:100%;padding:", splitPadding, ";overflow:hidden;", segmentedChildrenStyles, " *:where(.euiButton, .euiButtonIcon):is(", euiDisabledSelector, "){background-color:transparent;}&:where([data-dividers='true'] &){", dividerStyles, ";}&:where([data-layout='vertical'] &){flex-direction:column;.euiButtonGroup__item{justify-content:center;}}}&:where([data-variant='segmented'] &){*:where(.euiButton, .euiButtonIcon):is(", euiDisabledSelector, "){background-color:transparent;}}&:where([data-variant='selection'] &){*:where(.euiButton, .euiButtonIcon){&:is(", euiDisabledSelector, "){", highContrastModeStyles(euiThemeContext, {
|
|
80
|
+
forced: "\n opacity: 0.5;\n "
|
|
81
|
+
}), ";}&:is([aria-pressed='true']){", highContrastModeStyles(euiThemeContext, {
|
|
82
|
+
forced: "\n --highContrastHoverIndicatorColor: ".concat(euiTheme.colors.textInverse, ";\n ").concat(preventForcedColors(euiThemeContext), "\n background-color: ").concat(euiTheme.colors.fullShade, ";\n color: ").concat(euiTheme.colors.emptyShade, ";\n ")
|
|
83
|
+
}), ";}&:is([aria-pressed='false']){background-color:transparent;}}}&:where([data-variant='selection'][data-display='regular'] &){*:where(.euiButton, .euiButtonIcon):is([aria-pressed='true']){background-color:", euiTheme.colors.backgroundLightText, ";", highContrastModeStyles(euiThemeContext, {
|
|
84
|
+
none: "\n background-color: ".concat(euiTheme.colors.backgroundLightText, ";\n "),
|
|
85
|
+
preferred: "\n border: ".concat(euiTheme.border.thin, ";\n "),
|
|
86
|
+
forced: "\n background-color: ".concat(euiTheme.colors.fullShade, ";\n border: none;\n ")
|
|
87
|
+
}), ";}}&:where([data-variant='selection'][data-display='inverse'] &){*:where(.euiButton, .euiButtonIcon):is([aria-pressed='true']){", euiShadowXSmall(euiThemeContext), " ", highContrastModeStyles(euiThemeContext, {
|
|
88
|
+
forced: "\n border: none;\n "
|
|
89
|
+
}), ";}};label:euiButtonGroup__buttons;"),
|
|
90
|
+
noWrap: /*#__PURE__*/css("&:where(", segmentedStyledSelector, " &){flex-wrap:nowrap;", buttonOnlyItemSelector, "{flex:0 1 auto;min-inline-size:0;.euiButton .eui-textTruncate{min-inline-size:0;}}&", hasButtonIconOnlySelector, "{overflow-inline:auto;}};label:noWrap;"),
|
|
91
|
+
fullWidth: /*#__PURE__*/css(logicalCSS('width', '100%'), " .euiButtonGroupButton,.euiButtonGroup__tooltipWrapper{flex:1;", logicalCSS('width', '100%'), ";}&:where([data-variant='default'] &){.euiButton{flex-grow:1;inline-size:auto;}.euiButtonEmpty{flex-shrink:0;}}&:where(", segmentedStyledSelector, " &){&", hasButtonIconOnlySelector, "{inline-size:auto;}&", hasButtonOnlySelector, "{.euiButtonGroup__buttons{inline-size:100%;}", buttonOnlyItemSelector, "{flex-grow:1;}}};label:fullWidth;"),
|
|
79
92
|
// Sizes
|
|
80
93
|
size: {
|
|
81
94
|
m: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";", _highContrastStyles(euiThemeContext), ";;label:m;"),
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useCallback } from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Purely controlled selection state for `EuiButtonGroup` with `variant="selection"`.
|
|
12
|
+
* The consumer owns state via `idSelected` (single) or `idToSelectedMap` (multi)
|
|
13
|
+
* and updates it through `onChange`.
|
|
14
|
+
*/
|
|
15
|
+
export function useEuiButtonGroupSelection(_ref) {
|
|
16
|
+
var type = _ref.type,
|
|
17
|
+
idSelected = _ref.idSelected,
|
|
18
|
+
idToSelectedMap = _ref.idToSelectedMap,
|
|
19
|
+
onChange = _ref.onChange;
|
|
20
|
+
var isSelected = useCallback(function (id) {
|
|
21
|
+
return type === 'multi' ? !!(idToSelectedMap !== null && idToSelectedMap !== void 0 && idToSelectedMap[id]) : id === idSelected;
|
|
22
|
+
}, [type, idSelected, idToSelectedMap]);
|
|
23
|
+
var onSelect = useCallback(function (id) {
|
|
24
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(id);
|
|
25
|
+
}, [onChange]);
|
|
26
|
+
return {
|
|
27
|
+
isSelected: isSelected,
|
|
28
|
+
onSelect: onSelect
|
|
29
|
+
};
|
|
30
|
+
}
|