@elastic/eui 120.0.0 → 121.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 +29 -28
- package/dist/svgs/table_sparkles.svg +6 -0
- 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_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 +7 -4
- package/es/components/button/button_group/button_group.styles.js +22 -33
- package/es/components/button/button_group/button_group_button.js +9 -15
- package/es/components/button/button_group/button_group_button.styles.js +27 -66
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/button/split_button/split_button.styles.js +6 -5
- package/es/components/button/use_button_common_props.js +1 -1
- 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.styles.js +1 -1
- package/es/components/datagrid/controls/column_sorting_draggable.js +42 -23
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/es/components/datagrid/controls/display_selector.js +56 -44
- 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/super_date_picker/time_window_buttons.js +38 -50
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/filter_group/filter_button.js +24 -15
- package/es/components/filter_group/filter_button.styles.js +40 -15
- package/es/components/filter_group/filter_group.js +34 -5
- package/es/components/filter_group/filter_group.styles.js +9 -15
- package/es/components/filter_group/filter_group_context.js +13 -0
- package/es/components/flyout/flyout.component.js +5 -1
- package/es/components/flyout/flyout.styles.js +4 -3
- package/es/components/flyout/flyout_body.styles.js +1 -1
- package/es/components/flyout/flyout_footer.styles.js +1 -1
- package/es/components/flyout/flyout_header.styles.js +4 -4
- package/es/components/flyout/flyout_menu/action_button.js +11 -2
- package/es/components/flyout/flyout_menu/flyout_menu.js +52 -10
- 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.styles.js +1 -1
- 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.a11y.js +0 -1
- package/es/components/header/header.styles.js +1 -1
- 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/elastic_logo_full.js +75 -0
- package/es/components/header/header_logo/header_logo.js +23 -28
- package/es/components/header/header_logo/header_logo.styles.js +1 -3
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/table_sparkles.js +43 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +5 -0
- package/es/components/icon/svgs/table_sparkles.svg +6 -0
- 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/popover/popover_footer.styles.js +2 -2
- package/es/components/popover/popover_title.styles.js +1 -1
- 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/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/es/global_styling/mixins/_button.js +8 -0
- package/eui.d.ts +251 -192
- package/i18ntokens.json +594 -576
- 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_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 +7 -4
- package/lib/components/button/button_group/button_group.styles.js +22 -33
- package/lib/components/button/button_group/button_group_button.js +8 -14
- package/lib/components/button/button_group/button_group_button.styles.js +26 -65
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/button/split_button/split_button.styles.js +6 -5
- package/lib/components/button/use_button_common_props.js +1 -1
- 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.styles.js +1 -1
- package/lib/components/datagrid/controls/column_sorting_draggable.js +40 -21
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/lib/components/datagrid/controls/display_selector.js +55 -43
- 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/super_date_picker/time_window_buttons.js +37 -49
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/filter_group/filter_button.js +25 -16
- package/lib/components/filter_group/filter_button.styles.js +39 -14
- package/lib/components/filter_group/filter_group.js +37 -5
- package/lib/components/filter_group/filter_group.styles.js +8 -14
- package/lib/components/filter_group/filter_group_context.js +19 -0
- package/lib/components/flyout/flyout.component.js +5 -1
- package/lib/components/flyout/flyout.styles.js +3 -2
- package/lib/components/flyout/flyout_body.styles.js +1 -1
- package/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/lib/components/flyout/flyout_header.styles.js +4 -4
- package/lib/components/flyout/flyout_menu/action_button.js +11 -2
- package/lib/components/flyout/flyout_menu/flyout_menu.js +52 -10
- 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.styles.js +1 -1
- 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.a11y.js +0 -1
- package/lib/components/header/header.styles.js +1 -1
- 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/elastic_logo_full.js +84 -0
- package/lib/components/header/header_logo/header_logo.js +22 -27
- package/lib/components/header/header_logo/header_logo.styles.js +1 -3
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/table_sparkles.js +50 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +7 -0
- package/lib/components/icon/svgs/table_sparkles.svg +6 -0
- 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/popover/popover_footer.styles.js +2 -2
- package/lib/components/popover/popover_title.styles.js +1 -1
- 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/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/lib/global_styling/mixins/_button.js +8 -0
- package/optimize/es/components/button/button_group/button_group.js +4 -3
- package/optimize/es/components/button/button_group/button_group.styles.js +22 -33
- package/optimize/es/components/button/button_group/button_group_button.js +9 -15
- package/optimize/es/components/button/button_group/button_group_button.styles.js +27 -66
- package/optimize/es/components/button/split_button/split_button.styles.js +6 -5
- package/optimize/es/components/button/use_button_common_props.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting.styles.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +41 -22
- package/optimize/es/components/datagrid/controls/display_selector.js +56 -44
- package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +38 -50
- package/optimize/es/components/filter_group/filter_button.js +23 -15
- package/optimize/es/components/filter_group/filter_button.styles.js +40 -15
- package/optimize/es/components/filter_group/filter_group.js +21 -4
- package/optimize/es/components/filter_group/filter_group.styles.js +9 -15
- package/optimize/es/components/filter_group/filter_group_context.js +13 -0
- package/optimize/es/components/flyout/flyout.component.js +5 -1
- package/optimize/es/components/flyout/flyout.styles.js +4 -3
- package/optimize/es/components/flyout/flyout_body.styles.js +1 -1
- package/optimize/es/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/es/components/flyout/flyout_header.styles.js +4 -4
- package/optimize/es/components/flyout/flyout_menu/action_button.js +11 -2
- package/optimize/es/components/form/form_control_layout/form_control_layout.styles.js +1 -1
- package/optimize/es/components/header/header.a11y.js +0 -1
- package/optimize/es/components/header/header.styles.js +1 -1
- package/optimize/es/components/header/header_logo/elastic_logo_full.js +74 -0
- package/optimize/es/components/header/header_logo/header_logo.js +23 -12
- package/optimize/es/components/header/header_logo/header_logo.styles.js +1 -3
- package/optimize/es/components/icon/assets/table_sparkles.js +42 -0
- package/optimize/es/components/icon/icon_map.js +5 -0
- package/optimize/es/components/icon/svgs/table_sparkles.svg +6 -0
- package/optimize/es/components/popover/popover_footer.styles.js +2 -2
- package/optimize/es/components/popover/popover_title.styles.js +1 -1
- package/optimize/es/global_styling/mixins/_button.js +8 -0
- package/optimize/lib/components/button/button_group/button_group.js +4 -3
- package/optimize/lib/components/button/button_group/button_group.styles.js +22 -33
- package/optimize/lib/components/button/button_group/button_group_button.js +8 -14
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +26 -65
- package/optimize/lib/components/button/split_button/split_button.styles.js +6 -5
- package/optimize/lib/components/button/use_button_common_props.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting.styles.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +39 -20
- package/optimize/lib/components/datagrid/controls/display_selector.js +55 -43
- package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +37 -49
- package/optimize/lib/components/filter_group/filter_button.js +24 -16
- package/optimize/lib/components/filter_group/filter_button.styles.js +39 -14
- package/optimize/lib/components/filter_group/filter_group.js +24 -4
- package/optimize/lib/components/filter_group/filter_group.styles.js +8 -14
- package/optimize/lib/components/filter_group/filter_group_context.js +19 -0
- package/optimize/lib/components/flyout/flyout.component.js +5 -1
- package/optimize/lib/components/flyout/flyout.styles.js +3 -2
- package/optimize/lib/components/flyout/flyout_body.styles.js +1 -1
- package/optimize/lib/components/flyout/flyout_footer.styles.js +1 -1
- package/optimize/lib/components/flyout/flyout_header.styles.js +4 -4
- package/optimize/lib/components/flyout/flyout_menu/action_button.js +11 -2
- package/optimize/lib/components/form/form_control_layout/form_control_layout.styles.js +1 -1
- package/optimize/lib/components/header/header.a11y.js +0 -1
- package/optimize/lib/components/header/header.styles.js +1 -1
- package/optimize/lib/components/header/header_logo/elastic_logo_full.js +84 -0
- package/optimize/lib/components/header/header_logo/header_logo.js +22 -11
- package/optimize/lib/components/header/header_logo/header_logo.styles.js +1 -3
- package/optimize/lib/components/icon/assets/table_sparkles.js +50 -0
- package/optimize/lib/components/icon/icon_map.js +7 -0
- package/optimize/lib/components/icon/svgs/table_sparkles.svg +6 -0
- package/optimize/lib/components/popover/popover_footer.styles.js +2 -2
- package/optimize/lib/components/popover/popover_title.styles.js +1 -1
- package/optimize/lib/global_styling/mixins/_button.js +8 -0
- package/package.json +2 -1
- 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_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 +7 -4
- package/test-env/components/button/button_group/button_group.styles.js +22 -33
- package/test-env/components/button/button_group/button_group_button.js +8 -14
- package/test-env/components/button/button_group/button_group_button.styles.js +26 -65
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/button/split_button/split_button.styles.js +6 -5
- package/test-env/components/button/use_button_common_props.js +1 -1
- 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.styles.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +40 -21
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/test-env/components/datagrid/controls/display_selector.js +55 -43
- 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/super_date_picker/time_window_buttons.js +37 -49
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/filter_group/filter_button.js +25 -16
- package/test-env/components/filter_group/filter_button.styles.js +39 -14
- package/test-env/components/filter_group/filter_group.js +37 -5
- package/test-env/components/filter_group/filter_group.styles.js +8 -14
- package/test-env/components/filter_group/filter_group_context.js +19 -0
- package/test-env/components/flyout/flyout.component.js +5 -1
- package/test-env/components/flyout/flyout.styles.js +3 -2
- package/test-env/components/flyout/flyout_body.styles.js +1 -1
- package/test-env/components/flyout/flyout_footer.styles.js +1 -1
- package/test-env/components/flyout/flyout_header.styles.js +4 -4
- package/test-env/components/flyout/flyout_menu/action_button.js +11 -2
- package/test-env/components/flyout/flyout_menu/flyout_menu.js +52 -10
- 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.styles.js +1 -1
- 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.a11y.js +0 -1
- package/test-env/components/header/header.styles.js +1 -1
- 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/elastic_logo_full.js +84 -0
- package/test-env/components/header/header_logo/header_logo.js +22 -27
- package/test-env/components/header/header_logo/header_logo.styles.js +1 -3
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/table_sparkles.js +50 -0
- package/test-env/components/icon/icon_map.js +7 -0
- 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/popover/popover_footer.styles.js +2 -2
- package/test-env/components/popover/popover_title.styles.js +1 -1
- 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/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/test-env/global_styling/mixins/_button.js +8 -0
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.EuiButtonGroupButton = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -36,26 +36,22 @@ var EuiButtonGroupButton = exports.EuiButtonGroupButton = function EuiButtonGrou
|
|
|
36
36
|
isSelected = _ref.isSelected,
|
|
37
37
|
label = _ref.label,
|
|
38
38
|
value = _ref.value,
|
|
39
|
-
|
|
39
|
+
_size = _ref.size,
|
|
40
40
|
_ref$color = _ref.color,
|
|
41
41
|
_color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
42
42
|
toolTipContent = _ref.toolTipContent,
|
|
43
43
|
toolTipProps = _ref.toolTipProps,
|
|
44
44
|
contentProps = _ref.contentProps,
|
|
45
45
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
46
|
-
var
|
|
46
|
+
var size = _size === 'compressed' ? 's' : _size;
|
|
47
47
|
var color = isDisabled ? 'disabled' : _color;
|
|
48
|
-
var
|
|
49
|
-
var display = isSelected ? 'fill' : isCompressed || hasBorder ? 'empty' : 'base';
|
|
50
|
-
var hasToolTip = !!toolTipContent;
|
|
48
|
+
var display = isSelected && color !== 'text' ? 'fill' : 'empty';
|
|
51
49
|
var styles = (0, _services.useEuiMemoizedStyles)(_button_group_button.euiButtonGroupButtonStyles);
|
|
52
|
-
var focusColorStyles = (0, _services.useEuiMemoizedStyles)(_button_group_button._compressedButtonFocusColors);
|
|
53
50
|
var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
|
|
54
51
|
display: display
|
|
55
52
|
})[color];
|
|
56
|
-
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly.iconOnly, isIconOnly && styles.iconOnly[size],
|
|
57
|
-
var tooltipWrapperStyles = [styles.tooltipWrapper
|
|
58
|
-
var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
|
|
53
|
+
var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly.iconOnly, isIconOnly && styles.iconOnly[size], styles[size], isSelected && color === 'text' && styles.isSelected, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles];
|
|
54
|
+
var tooltipWrapperStyles = [styles.tooltipWrapper];
|
|
59
55
|
var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
|
|
60
56
|
var buttonClasses = (0, _classnames.default)('euiButtonGroupButton', {
|
|
61
57
|
'euiButtonGroupButton-isSelected': isSelected,
|
|
@@ -80,10 +76,8 @@ var EuiButtonGroupButton = exports.EuiButtonGroupButton = function EuiButtonGrou
|
|
|
80
76
|
css: cssStyles,
|
|
81
77
|
className: buttonClasses,
|
|
82
78
|
isDisabled: isDisabled,
|
|
83
|
-
size: size
|
|
84
|
-
contentProps:
|
|
85
|
-
css: [contentStyles, contentProps === null || contentProps === void 0 ? void 0 : contentProps.css]
|
|
86
|
-
}),
|
|
79
|
+
size: size,
|
|
80
|
+
contentProps: contentProps,
|
|
87
81
|
textProps: {
|
|
88
82
|
css: textStyles,
|
|
89
83
|
ref: buttonTextRef,
|
|
@@ -21,90 +21,51 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
21
21
|
* Side Public License, v 1.
|
|
22
22
|
*/
|
|
23
23
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
24
|
-
name: "
|
|
25
|
-
styles: "
|
|
24
|
+
name: "1ockoqy-tooltipWrapper",
|
|
25
|
+
styles: "min-inline-size:0;&:has(:focus-visible){z-index:1;};label:tooltipWrapper;"
|
|
26
26
|
} : {
|
|
27
|
-
name: "
|
|
28
|
-
styles: "
|
|
29
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
-
};
|
|
31
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
32
|
-
name: "1u3o7zy-hasToolTip",
|
|
33
|
-
styles: "border-radius:inherit;label:hasToolTip;"
|
|
34
|
-
} : {
|
|
35
|
-
name: "1u3o7zy-hasToolTip",
|
|
36
|
-
styles: "border-radius:inherit;label:hasToolTip;",
|
|
27
|
+
name: "1ockoqy-tooltipWrapper",
|
|
28
|
+
styles: "min-inline-size:0;&:has(:focus-visible){z-index:1;};label:tooltipWrapper;",
|
|
37
29
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
30
|
};
|
|
39
31
|
var euiButtonGroupButtonStyles = exports.euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeContext) {
|
|
40
32
|
var euiTheme = euiThemeContext.euiTheme,
|
|
41
33
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
var buttonSizeMap = (0, _button.euiButtonSizeMap)(euiThemeContext);
|
|
35
|
+
var buttonSizes = {
|
|
36
|
+
s: {
|
|
37
|
+
height: buttonSizeMap.s.getInsetHeight(buttonSizeMap.s.height, euiTheme.size.xs),
|
|
38
|
+
radius: buttonSizeMap.s.radiusInset
|
|
39
|
+
},
|
|
40
|
+
m: {
|
|
41
|
+
height: buttonSizeMap.m.getInsetHeight(buttonSizeMap.m.height, euiTheme.size.xs),
|
|
42
|
+
radius: buttonSizeMap.m.radiusInset
|
|
43
|
+
}
|
|
49
44
|
};
|
|
45
|
+
var selectedSelectors = '.euiButtonGroupButton-isSelected, .euiButtonGroup__tooltipWrapper-isSelected';
|
|
50
46
|
return {
|
|
51
47
|
// Base
|
|
52
|
-
euiButtonGroupButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), " flex-shrink:1;flex-grow:0;
|
|
48
|
+
euiButtonGroupButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), " flex-shrink:1;flex-grow:0;border:none;border-radius:", buttonSizes.s.radius, ";font-weight:", euiTheme.font.weight.medium, ";&:is(", selectedSelectors, "):not(", _global_styling.euiDisabledSelector, "){", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
53
49
|
forced: "\n --highContrastHoverIndicatorColor: ".concat(euiTheme.colors.textInverse, ";\n border: none;\n\n /* styles the content manually instead of the button itself to preserve the system\n focus style, as otherwise preventForcedColors() would require manual styling */\n > [class*=\"euiButtonDisplayContent\"] {\n ").concat((0, _global_styling.preventForcedColors)(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n border: none;\n }\n ")
|
|
54
|
-
}), ";};label:euiButtonGroupButton;"),
|
|
50
|
+
}), ";}&:is(", selectedSelectors, ":where(", _global_styling.euiDisabledSelector, ")){border:none;}&:focus-visible{outline-offset:0;};label:euiButtonGroupButton;"),
|
|
55
51
|
iconOnly: {
|
|
56
52
|
// used only as classname, sizes are added separately
|
|
57
53
|
iconOnly: /*#__PURE__*/(0, _react.css)(";label:iconOnly;"),
|
|
58
54
|
s: "\n ".concat((0, _global_styling.logicalCSS)('width', buttonSizes.s.height), "\n "),
|
|
59
|
-
m: "\n ".concat((0, _global_styling.logicalCSS)('width', buttonSizes.m.height), "\n ")
|
|
60
|
-
compressed: "\n ".concat((0, _global_styling.logicalCSS)('width', compressedButtonHeight), "\n ")
|
|
55
|
+
m: "\n ".concat((0, _global_styling.logicalCSS)('width', buttonSizes.m.height), "\n ")
|
|
61
56
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
uncompressed: /*#__PURE__*/(0, _react.css)("&:focus-visible{", (0, _global_styling.euiOutline)(euiThemeContext, 'inset', euiTheme.components.buttonGroupFocusColor), ";}&:is(", selectedSelectors, "):not(", _global_styling.euiDisabledSelector, "){z-index:1;border:", euiTheme.border.width.thin, " solid transparent;", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
65
|
-
forced: "\n /* use inset focus outline to ensure visibility, same as custom hover.\n NOTE: temp solution - this will be revisited once we handle global focus styles */\n &:focus-visible {\n outline-color: ".concat(euiTheme.colors.textInverse, ";\n /* has to be inset due to overflow: hidden */\n outline-offset: -").concat((0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
|
|
66
|
-
return x * 4;
|
|
67
|
-
}), ";\n }\n ")
|
|
68
|
-
}), ";};label:uncompressed;"),
|
|
69
|
-
get borders() {
|
|
70
|
-
// We use pseudo elements to avoid affecing button width, and to allow
|
|
71
|
-
// inheriting high contrast border colors
|
|
72
|
-
var selectors = selectedSelectors;
|
|
73
|
-
var selectedColor = highContrastMode ? euiTheme.colors.emptyShade : euiTheme.components.buttonGroupBorderColorSelected;
|
|
74
|
-
var unselectedColor = highContrastMode ? 'inherit' : euiTheme.components.buttonGroupBorderColor;
|
|
75
|
-
var borderWidth = euiTheme.border.width.thin;
|
|
76
|
-
|
|
77
|
-
// "Borders" between buttons should be present between two of the same colored buttons,
|
|
78
|
-
// and absent between selected vs non-selected buttons (different colors)
|
|
79
|
-
return "\n position: relative;\n\n &:not(:first-child) {\n margin-inline-start: -".concat(borderWidth, ";\n }\n\n &:is(").concat(selectors, ") {\n &::before {\n position: absolute;\n z-index: 1;\n ").concat((0, _global_styling.logicalCSS)('left', 0), "\n ").concat((0, _global_styling.logicalCSS)('vertical', "-".concat(euiTheme.border.width.thin)), "\n ").concat((0, _global_styling.logicalCSS)('border-left-style', 'solid'), "\n ").concat((0, _global_styling.logicalCSS)('border-left-width', euiTheme.border.width.thin), "\n pointer-events: none;\n\n ").concat((0, _global_styling.preventForcedColors)(euiThemeContext), "\n }\n }\n\n &:not(").concat(selectors, ") + *:not(").concat(selectors, ") {\n &::before {\n content: '';\n border-color: ").concat(unselectedColor, ";\n inset-inline-start: -").concat(borderWidth, ";\n }\n }\n\n &:is(").concat(selectors, ") + *:is(").concat(selectors, ") {\n &::before {\n content: '';\n border-color: ").concat(selectedColor, ";\n inset-inline-start: -").concat(borderWidth, ";\n }\n }\n ");
|
|
80
|
-
},
|
|
81
|
-
get s() {
|
|
82
|
-
return /*#__PURE__*/(0, _react.css)(this.borders, " ", uncompressedBorderRadii(euiTheme.border.radius.small), ";;label:s;");
|
|
83
|
-
},
|
|
84
|
-
get m() {
|
|
85
|
-
var radius = euiTheme.border.radius.small;
|
|
86
|
-
return /*#__PURE__*/(0, _react.css)(this.borders, " ", uncompressedBorderRadii(radius), ";;label:m;");
|
|
87
|
-
},
|
|
88
|
-
hasToolTip: _ref2
|
|
89
|
-
},
|
|
90
|
-
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedButtonHeight), " line-height:", compressedButtonHeight, ";font-weight:", euiTheme.font.weight.medium, ";padding:0;margin:", euiTheme.size.xxs, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
|
|
91
|
-
return x / 2;
|
|
92
|
-
}), ";&+.euiButtonGroupButton{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";}&:is(", selectedSelectors, "):not(", _global_styling.euiDisabledSelector, "){border:none;", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
93
|
-
forced: "\n /* use inset focus outline to ensure visibility, same as custom hover.\n NOTE: temp solution - this will be revisited once we handle global focus styles */\n &:focus-visible {\n outline-color: ".concat(euiTheme.colors.textInverse, ";\n /* has to be inset due to overflow: hidden */\n outline-offset: -").concat((0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
|
|
94
|
-
return x * 3;
|
|
95
|
-
}), ";\n }\n ")
|
|
96
|
-
}), ";};label:compressed;"),
|
|
57
|
+
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', buttonSizes.s.height), " line-height:", buttonSizes.s.height, ";;label:s;"),
|
|
58
|
+
m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', buttonSizes.m.height), " line-height:", buttonSizes.m.height, ";;label:m;"),
|
|
97
59
|
// States
|
|
60
|
+
isSelected: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.backgroundLightText, ";&:is(", selectedSelectors, "):not(", _global_styling.euiDisabledSelector, "){", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
61
|
+
preferred: "\n border: ".concat(euiTheme.border.width.thin, " solid currentColor;\n "),
|
|
62
|
+
forced: "\n border: none;\n "
|
|
63
|
+
}), ";}&:is(", selectedSelectors, ":where(", _global_styling.euiDisabledSelector, ")){", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
64
|
+
preferred: "\n border: ".concat(euiTheme.border.thin, ";\n ")
|
|
65
|
+
}), ";};label:isSelected;"),
|
|
98
66
|
disabledAndSelected: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textDisabled, ";background-color:", euiTheme.components.buttonGroupBackgroundDisabledSelected, ";border:", highContrastMode ? "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.components.buttonGroupBackgroundDisabledSelected) : "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.borderBasePlain), ";;label:disabledAndSelected;"),
|
|
99
|
-
// Skip css`` to avoid generating a className
|
|
100
|
-
hasBorder: "\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBasePlain, ";\n "),
|
|
101
67
|
// Tooltip anchor wrapper
|
|
102
68
|
tooltipWrapper: _ref,
|
|
103
|
-
// Content wrapper
|
|
104
|
-
content: {
|
|
105
|
-
euiButtonGroupButton__content: /*#__PURE__*/(0, _react.css)(";label:euiButtonGroupButton__content;"),
|
|
106
|
-
compressed: /*#__PURE__*/(0, _react.css)("padding-inline:", euiTheme.size.s, ";;label:compressed;")
|
|
107
|
-
},
|
|
108
69
|
// Text wrapper
|
|
109
70
|
text: {
|
|
110
71
|
euiButtonGroupButton__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextShift)('bold', 'data-text', euiTheme), ";;label:euiButtonGroupButton__text;"),
|
|
@@ -16,6 +16,7 @@ var _global_styling = require("../../../global_styling");
|
|
|
16
16
|
|
|
17
17
|
var primaryDisabledSelector = ".euiSplitButtonActionPrimary:is(".concat(_global_styling.euiDisabledSelector, ")");
|
|
18
18
|
var secondaryDisabledSelector = ".euiSplitButtonActionSecondary:is(".concat(_global_styling.euiDisabledSelector, ")");
|
|
19
|
+
var hasAllDisabledActionsSelector = ":has(".concat(primaryDisabledSelector, "):has(").concat(secondaryDisabledSelector, ")");
|
|
19
20
|
var euiSplitButtonStyles = exports.euiSplitButtonStyles = function euiSplitButtonStyles(euiThemeContext, backgroundColor) {
|
|
20
21
|
var euiTheme = euiThemeContext.euiTheme;
|
|
21
22
|
var buttonSizeMap = (0, _global_styling.euiButtonSizeMap)(euiThemeContext);
|
|
@@ -23,10 +24,10 @@ var euiSplitButtonStyles = exports.euiSplitButtonStyles = function euiSplitButto
|
|
|
23
24
|
return "\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n border: ".concat(euiTheme.border.width.thin, " solid ").concat(color, ";\n border-radius: ").concat(euiTheme.border.radius.small, ";\n pointer-events: none;\n }\n ");
|
|
24
25
|
};
|
|
25
26
|
return {
|
|
26
|
-
euiSplitButton: /*#__PURE__*/(0, _react.css)("position:relative;display:inline-flex;align-items:center;flex-wrap:nowrap;max-inline-size:fit-content;padding:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";background-color:", backgroundColor, ";&:where([data-size='s']){block-size:", buttonSizeMap.s.height, ";}&:where([data-size='m']){block-size:", buttonSizeMap.m.height, ";}&:
|
|
27
|
+
euiSplitButton: /*#__PURE__*/(0, _react.css)("position:relative;display:inline-flex;align-items:center;flex-wrap:nowrap;max-inline-size:fit-content;padding:", euiTheme.size.xs, ";border-radius:", euiTheme.border.radius.small, ";background-color:", backgroundColor, ";&:where([data-size='s']){block-size:", buttonSizeMap.s.height, ";}&:where([data-size='m']){block-size:", buttonSizeMap.m.height, ";}&:where(", hasAllDisabledActionsSelector, "){background-color:", euiTheme.colors.backgroundBaseDisabled, ";};label:euiSplitButton;"),
|
|
27
28
|
hasBorder: /*#__PURE__*/(0, _react.css)((0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
28
|
-
none: "\n &:where(:not([data-fill])):not(
|
|
29
|
-
preferred: "\n &:where(:not([data-fill])) {\n ".concat(borderStyles("var(--euiSplitButtonBorderColor)"), "\n\n &:
|
|
29
|
+
none: "\n &:where(:not([data-fill])):not(".concat(hasAllDisabledActionsSelector, ") {\n ").concat(borderStyles("var(--euiSplitButtonBorderColor)"), "\n }\n "),
|
|
30
|
+
preferred: "\n &:where(:not([data-fill])) {\n ".concat(borderStyles("var(--euiSplitButtonBorderColor)"), "\n\n &:where(").concat(hasAllDisabledActionsSelector, ") {\n ").concat(borderStyles(euiTheme.colors.borderBaseDisabled), "\n }\n }\n\n &:where([data-fill]").concat(hasAllDisabledActionsSelector, ") {\n ").concat(borderStyles(euiTheme.colors.borderBaseDisabled), "\n }\n "),
|
|
30
31
|
forced: "\n ".concat(borderStyles("var(--euiSplitButtonBorderColor)"), "\n ")
|
|
31
32
|
}), ";;label:hasBorder;")
|
|
32
33
|
};
|
|
@@ -39,7 +40,7 @@ var euiSplitButtonActionStyles = exports.euiSplitButtonActionStyles = function e
|
|
|
39
40
|
var buttonSize = size === 's' ? buttonSizeMap.xs.height : buttonSizeMap.s.height;
|
|
40
41
|
var buttonMinWidth = size === 's' ? buttonSizeMap.xs.minWidth : buttonSizeMap.s.minWidth;
|
|
41
42
|
var buttonRadius = size === 's' ? buttonSizeMap.xs.radiusInset : buttonSizeMap.s.radiusInset;
|
|
42
|
-
var commonStyles = "\n block-size: ".concat(buttonSize, ";\n border-radius: ").concat(buttonRadius, ";\n /* prevent issues in jsdom where pointer-events: none is inherited from the pseudo element */\n pointer-events: auto;\n
|
|
43
|
+
var commonStyles = "\n block-size: ".concat(buttonSize, ";\n border-radius: ").concat(buttonRadius, ";\n /* prevent issues in jsdom where pointer-events: none is inherited from the pseudo element */\n pointer-events: auto;\n border: none;\n ");
|
|
43
44
|
return {
|
|
44
45
|
euiSplitButtonActionPrimary: /*#__PURE__*/(0, _react.css)(commonStyles, " z-index:", euiTheme.levels.content, ";&:not(.euiButtonIcon){min-inline-size:", buttonMinWidth, "px;}&.euiButtonIcon{inline-size:", buttonSize, ";};label:euiSplitButtonActionPrimary;"),
|
|
45
46
|
euiSplitButtonActionSecondary: /*#__PURE__*/(0, _react.css)(commonStyles, " inline-size:", buttonSize, ";;label:euiSplitButtonActionSecondary;")
|
|
@@ -48,6 +49,6 @@ var euiSplitButtonActionStyles = exports.euiSplitButtonActionStyles = function e
|
|
|
48
49
|
var euiSplitButtonDividerStyles = exports.euiSplitButtonDividerStyles = function euiSplitButtonDividerStyles(euiThemeContext, color) {
|
|
49
50
|
var euiTheme = euiThemeContext.euiTheme;
|
|
50
51
|
return {
|
|
51
|
-
divider: /*#__PURE__*/(0, _react.css)("block-size:calc(100% - ", euiTheme.size.s, ");border-inline-start:", euiTheme.border.width.thin, " solid ", color, ";", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.xs), ";&:where(\n ", primaryDisabledSelector, " +
|
|
52
|
+
divider: /*#__PURE__*/(0, _react.css)("block-size:calc(100% - ", euiTheme.size.s, ");border-inline-start:", euiTheme.border.width.thin, " solid ", color, ";", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.xs), ";&:where(\n :is(", primaryDisabledSelector, " + &):has(\n ~ ", secondaryDisabledSelector, "\n )\n ){border-color:", euiTheme.colors.borderBaseDisabled, ";};label:divider;")
|
|
52
53
|
};
|
|
53
54
|
};
|
|
@@ -40,7 +40,7 @@ function useEuiButtonCommonProps(_ref) {
|
|
|
40
40
|
isDisabled: ((_groupContext$isDisab = groupContext.isDisabled) !== null && _groupContext$isDisab !== void 0 ? _groupContext$isDisab : _isDisabled) || disabled,
|
|
41
41
|
isLoading: isLoading
|
|
42
42
|
});
|
|
43
|
-
var selectionProps = id != null ? (_groupContext$getSele = groupContext.getSelectionProps) === null || _groupContext$getSele === void 0 ? void 0 : _groupContext$getSele.call(groupContext, id) : undefined;
|
|
43
|
+
var selectionProps = id != null ? (_groupContext$getSele = groupContext.getSelectionProps) === null || _groupContext$getSele === void 0 ? void 0 : _groupContext$getSele.call(groupContext, id, isDisabled) : undefined;
|
|
44
44
|
var onClick = selectionProps ? function (event) {
|
|
45
45
|
selectionProps.onSelect();
|
|
46
46
|
_onClick === null || _onClick === void 0 || _onClick(event);
|
|
@@ -33,7 +33,7 @@ var euiDataGridColumnSortingStyles = exports.euiDataGridColumnSortingStyles = fu
|
|
|
33
33
|
euiDataGridColumnSorting__order: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.xxl, function (x) {
|
|
34
34
|
return x * 5;
|
|
35
35
|
})), ";}.euiButtonGroup__buttons{border:none;}.euiButtonGroupButton{font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";};label:euiDataGridColumnSorting__order;"),
|
|
36
|
-
euiDataGridColumnSorting__dragHandle: /*#__PURE__*/(0, _react.css)(
|
|
36
|
+
euiDataGridColumnSorting__dragHandle: /*#__PURE__*/(0, _react.css)("&+.euiDataGridColumnSorting__dragHandle{margin-block-start:", euiTheme.size.xxs, ";};label:euiDataGridColumnSorting__dragHandle;"),
|
|
37
37
|
/**
|
|
38
38
|
* 'Pick fields to sort by' popover
|
|
39
39
|
*/
|
|
@@ -53,17 +53,19 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
53
53
|
var schemaDetails = schema.hasOwnProperty(id) && schema[id].columnType != null ? (0, _data_grid_schema.getDetailsForSchema)(schemaDetectors, schema[id].columnType) : null;
|
|
54
54
|
var textSortAsc = schemaDetails != null ? schemaDetails.sortTextAsc : defaultSortAscLabel;
|
|
55
55
|
var textSortDesc = schemaDetails != null ? schemaDetails.sortTextDesc : defaultSortDescLabel;
|
|
56
|
-
var toggleOptions =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
var toggleOptions = (0, _react.useMemo)(function () {
|
|
57
|
+
return [{
|
|
58
|
+
id: "".concat(id, "Asc"),
|
|
59
|
+
value: 'asc',
|
|
60
|
+
label: textSortAsc,
|
|
61
|
+
'data-test-subj': "euiDataGridColumnSorting-sortColumn-".concat(id, "-asc")
|
|
62
|
+
}, {
|
|
63
|
+
id: "".concat(id, "Desc"),
|
|
64
|
+
value: 'desc',
|
|
65
|
+
label: textSortDesc,
|
|
66
|
+
'data-test-subj': "euiDataGridColumnSorting-sortColumn-".concat(id, "-desc")
|
|
67
|
+
}];
|
|
68
|
+
}, [id, textSortAsc, textSortDesc]);
|
|
67
69
|
var dragHandleAriaLabel = (0, _i18n.useEuiI18n)('euiColumnSortingDraggable.dragHandleAriaLabel', 'Drag handle');
|
|
68
70
|
var removeSort = (0, _react.useCallback)(function () {
|
|
69
71
|
var nextColumns = (0, _toConsumableArray2.default)(sorting.columns);
|
|
@@ -74,25 +76,32 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
74
76
|
nextColumns.splice(columnIndex, 1);
|
|
75
77
|
sorting.onSort(nextColumns);
|
|
76
78
|
}, [id, sorting]);
|
|
77
|
-
var toggleLegendHandler = (0, _react.useCallback)(function (
|
|
79
|
+
var toggleLegendHandler = (0, _react.useCallback)(function (selectedId) {
|
|
80
|
+
var _ref3;
|
|
81
|
+
var selectedOption = toggleOptions.find(function (option) {
|
|
82
|
+
return option.id === selectedId;
|
|
83
|
+
});
|
|
84
|
+
var direction = (_ref3 = selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) !== null && _ref3 !== void 0 ? _ref3 : 'asc';
|
|
78
85
|
var nextColumns = (0, _toConsumableArray2.default)(sorting.columns);
|
|
79
|
-
var columnIndex = nextColumns.map(function (
|
|
80
|
-
var
|
|
81
|
-
return
|
|
86
|
+
var columnIndex = nextColumns.map(function (_ref4) {
|
|
87
|
+
var colId = _ref4.id;
|
|
88
|
+
return colId;
|
|
82
89
|
}).indexOf(id);
|
|
83
90
|
nextColumns.splice(columnIndex, 1, {
|
|
84
91
|
id: id,
|
|
85
92
|
direction: direction
|
|
86
93
|
});
|
|
87
94
|
sorting.onSort(nextColumns);
|
|
88
|
-
}, [id, sorting]);
|
|
95
|
+
}, [id, sorting, toggleOptions]);
|
|
89
96
|
var styles = (0, _services.useEuiMemoizedStyles)(_column_sorting.euiDataGridColumnSortingStyles);
|
|
90
97
|
return (0, _react2.jsx)(_drag_and_drop.EuiDraggable, (0, _extends2.default)({
|
|
91
98
|
draggableId: id,
|
|
92
99
|
index: index,
|
|
93
100
|
hasInteractiveChildren: true,
|
|
94
101
|
customDragHandle: true,
|
|
95
|
-
usePortal: true
|
|
102
|
+
usePortal: true,
|
|
103
|
+
className: "euiDataGridColumnSorting__dragHandle",
|
|
104
|
+
css: styles.euiDataGridColumnSorting__dragHandle
|
|
96
105
|
}, rest), function (provided, state) {
|
|
97
106
|
return (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
98
107
|
css: styles.euiDataGridColumnSorting__item,
|
|
@@ -157,13 +166,23 @@ var EuiDataGridColumnSortingDraggable = exports.EuiDataGridColumnSortingDraggabl
|
|
|
157
166
|
return (0, _react2.jsx)(_button.EuiButtonGroup, {
|
|
158
167
|
legend: toggleLegend,
|
|
159
168
|
isFullWidth: true,
|
|
160
|
-
|
|
161
|
-
buttonSize: "
|
|
169
|
+
variant: "selection",
|
|
170
|
+
buttonSize: "s",
|
|
171
|
+
wrap: false,
|
|
162
172
|
css: styles.euiDataGridColumnSorting__order,
|
|
163
173
|
className: "euiDataGridColumnSorting__order",
|
|
164
174
|
idSelected: direction === 'asc' ? "".concat(id, "Asc") : "".concat(id, "Desc"),
|
|
165
175
|
onChange: toggleLegendHandler
|
|
166
|
-
})
|
|
176
|
+
}, toggleOptions.map(function (_ref5) {
|
|
177
|
+
var id = _ref5.id,
|
|
178
|
+
label = _ref5.label,
|
|
179
|
+
dataTestSubj = _ref5['data-test-subj'];
|
|
180
|
+
return (0, _react2.jsx)(_button.EuiButton, {
|
|
181
|
+
key: id,
|
|
182
|
+
id: id,
|
|
183
|
+
"data-test-subj": dataTestSubj
|
|
184
|
+
}, label);
|
|
185
|
+
}));
|
|
167
186
|
})), (0, _react2.jsx)(_flex.EuiFlexItem, (0, _extends2.default)({
|
|
168
187
|
grow: false
|
|
169
188
|
}, provided.dragHandleProps, {
|
|
@@ -47,6 +47,19 @@ var startingStyles = exports.startingStyles = {
|
|
|
47
47
|
stickyFooter: true
|
|
48
48
|
};
|
|
49
49
|
var emptyRowHeightsOptions = {};
|
|
50
|
+
var ButtonGroupButton = function ButtonGroupButton(_ref) {
|
|
51
|
+
var id = _ref.id,
|
|
52
|
+
label = _ref.label;
|
|
53
|
+
return (0, _react2.jsx)(_button.EuiButton, {
|
|
54
|
+
key: id,
|
|
55
|
+
id: id,
|
|
56
|
+
textProps: {
|
|
57
|
+
'data-text': label
|
|
58
|
+
},
|
|
59
|
+
title: label,
|
|
60
|
+
"data-test-subj": id
|
|
61
|
+
}, label);
|
|
62
|
+
};
|
|
50
63
|
|
|
51
64
|
/**
|
|
52
65
|
* Cell density
|
|
@@ -73,9 +86,9 @@ var convertGridStylesToSelection = function convertGridStylesToSelection(gridSty
|
|
|
73
86
|
if (gridStyles.fontSize === 'l' && gridStyles.cellPadding === 'l') return 'expanded';
|
|
74
87
|
return '';
|
|
75
88
|
};
|
|
76
|
-
var DensityControl = function DensityControl(
|
|
77
|
-
var gridStyles =
|
|
78
|
-
onChange =
|
|
89
|
+
var DensityControl = function DensityControl(_ref2) {
|
|
90
|
+
var gridStyles = _ref2.gridStyles,
|
|
91
|
+
onChange = _ref2.onChange;
|
|
79
92
|
var getDensity = (0, _react.useMemo)(function () {
|
|
80
93
|
return convertGridStylesToSelection(gridStyles);
|
|
81
94
|
}, [gridStyles]);
|
|
@@ -85,33 +98,31 @@ var DensityControl = function DensityControl(_ref) {
|
|
|
85
98
|
return (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
86
99
|
tokens: ['euiDisplaySelector.densityLabel', 'euiDisplaySelector.labelCompact', 'euiDisplaySelector.labelNormal', 'euiDisplaySelector.labelExpanded'],
|
|
87
100
|
defaults: ['Density', 'Compact', 'Normal', 'Expanded']
|
|
88
|
-
}, function (
|
|
89
|
-
var
|
|
90
|
-
densityLabel =
|
|
91
|
-
labelCompact =
|
|
92
|
-
labelNormal =
|
|
93
|
-
labelExpanded =
|
|
101
|
+
}, function (_ref3) {
|
|
102
|
+
var _ref4 = (0, _slicedToArray2.default)(_ref3, 4),
|
|
103
|
+
densityLabel = _ref4[0],
|
|
104
|
+
labelCompact = _ref4[1],
|
|
105
|
+
labelNormal = _ref4[2],
|
|
106
|
+
labelExpanded = _ref4[3];
|
|
94
107
|
return (0, _react2.jsx)(_form.EuiFormRow, {
|
|
95
108
|
label: densityLabel,
|
|
96
109
|
display: "columnCompressed"
|
|
97
110
|
}, (0, _react2.jsx)(_button.EuiButtonGroup, {
|
|
98
111
|
legend: densityLabel,
|
|
99
|
-
|
|
112
|
+
variant: "selection",
|
|
113
|
+
buttonSize: "s",
|
|
100
114
|
isFullWidth: true,
|
|
101
|
-
|
|
102
|
-
id: densityOptions[0],
|
|
103
|
-
label: labelCompact
|
|
104
|
-
}, {
|
|
105
|
-
id: densityOptions[1],
|
|
106
|
-
label: labelNormal
|
|
107
|
-
}, {
|
|
108
|
-
id: densityOptions[2],
|
|
109
|
-
label: labelExpanded
|
|
110
|
-
}],
|
|
115
|
+
wrap: false,
|
|
111
116
|
onChange: setDensity,
|
|
112
117
|
idSelected: getDensity,
|
|
113
118
|
"data-test-subj": "densityButtonGroup"
|
|
114
|
-
})
|
|
119
|
+
}, densityOptions.map(function (option) {
|
|
120
|
+
return (0, _react2.jsx)(ButtonGroupButton, {
|
|
121
|
+
key: option,
|
|
122
|
+
id: option,
|
|
123
|
+
label: option === densityOptions[0] ? labelCompact : option === densityOptions[1] ? labelNormal : labelExpanded
|
|
124
|
+
});
|
|
125
|
+
})));
|
|
115
126
|
});
|
|
116
127
|
};
|
|
117
128
|
|
|
@@ -132,7 +143,7 @@ var convertRowHeightsOptionsToSelection = function convertRowHeightsOptionsToSel
|
|
|
132
143
|
}
|
|
133
144
|
return rowHeightSelectionOptions[1];
|
|
134
145
|
};
|
|
135
|
-
var
|
|
146
|
+
var _ref8 = process.env.NODE_ENV === "production" ? {
|
|
136
147
|
name: "ueqtrq-RowHeightControl",
|
|
137
148
|
styles: "flex-shrink:0;flex-basis:66.6%;label:RowHeightControl;"
|
|
138
149
|
} : {
|
|
@@ -140,9 +151,9 @@ var _ref7 = process.env.NODE_ENV === "production" ? {
|
|
|
140
151
|
styles: "flex-shrink:0;flex-basis:66.6%;label:RowHeightControl;",
|
|
141
152
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
142
153
|
};
|
|
143
|
-
var RowHeightControl = function RowHeightControl(
|
|
144
|
-
var rowHeightsOptions =
|
|
145
|
-
onChange =
|
|
154
|
+
var RowHeightControl = function RowHeightControl(_ref5) {
|
|
155
|
+
var rowHeightsOptions = _ref5.rowHeightsOptions,
|
|
156
|
+
onChange = _ref5.onChange;
|
|
146
157
|
var autoBelowLineCount = rowHeightsOptions.autoBelowLineCount;
|
|
147
158
|
var _useState = (0, _react.useState)(1),
|
|
148
159
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -196,12 +207,12 @@ var RowHeightControl = function RowHeightControl(_ref4) {
|
|
|
196
207
|
return (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
197
208
|
tokens: ['euiDisplaySelector.rowHeightLabel', 'euiDisplaySelector.labelAuto', 'euiDisplaySelector.labelStatic', 'euiDisplaySelector.labelMax'],
|
|
198
209
|
defaults: ['Lines per row', 'Auto', 'Static', 'Max']
|
|
199
|
-
}, function (
|
|
200
|
-
var
|
|
201
|
-
rowHeightLabel =
|
|
202
|
-
labelAuto =
|
|
203
|
-
labelStatic =
|
|
204
|
-
labelMax =
|
|
210
|
+
}, function (_ref6) {
|
|
211
|
+
var _ref7 = (0, _slicedToArray2.default)(_ref6, 4),
|
|
212
|
+
rowHeightLabel = _ref7[0],
|
|
213
|
+
labelAuto = _ref7[1],
|
|
214
|
+
labelStatic = _ref7[2],
|
|
215
|
+
labelMax = _ref7[3];
|
|
205
216
|
return (0, _react2.jsx)(_form.EuiFormRow, {
|
|
206
217
|
label: rowHeightLabel,
|
|
207
218
|
display: "columnCompressed"
|
|
@@ -210,20 +221,21 @@ var RowHeightControl = function RowHeightControl(_ref4) {
|
|
|
210
221
|
responsive: false
|
|
211
222
|
}, (0, _react2.jsx)(_button.EuiButtonGroup, {
|
|
212
223
|
legend: rowHeightLabel,
|
|
213
|
-
css:
|
|
214
|
-
|
|
224
|
+
css: _ref8,
|
|
225
|
+
variant: "selection",
|
|
226
|
+
buttonSize: "s",
|
|
215
227
|
isFullWidth: true,
|
|
216
|
-
|
|
217
|
-
id: rowHeightSelectionOptions[0],
|
|
218
|
-
label: labelAuto
|
|
219
|
-
}, {
|
|
220
|
-
id: rowHeightSelectionOptions[1],
|
|
221
|
-
label: autoBelowLineCount ? labelMax : labelStatic
|
|
222
|
-
}],
|
|
228
|
+
wrap: false,
|
|
223
229
|
onChange: setRowHeight,
|
|
224
230
|
idSelected: rowHeightSelection,
|
|
225
231
|
"data-test-subj": "rowHeightButtonGroup"
|
|
226
|
-
}
|
|
232
|
+
}, rowHeightSelectionOptions.map(function (option) {
|
|
233
|
+
return (0, _react2.jsx)(ButtonGroupButton, {
|
|
234
|
+
key: option,
|
|
235
|
+
id: option,
|
|
236
|
+
label: option === rowHeightSelectionOptions[0] ? labelAuto : autoBelowLineCount ? labelMax : labelStatic
|
|
237
|
+
});
|
|
238
|
+
})), (0, _react2.jsx)(_form.EuiFieldNumber, {
|
|
227
239
|
"aria-label": rowHeightLabel,
|
|
228
240
|
compressed: true,
|
|
229
241
|
min: 1,
|
|
@@ -382,8 +394,8 @@ var useDataGridDisplaySelector = exports.useDataGridDisplaySelector = function u
|
|
|
382
394
|
}, [euiTheme, densityControl, rowHeightControl, additionalDisplaySettings, resetButton, customRender, buttonLabel, isOpen]);
|
|
383
395
|
return [displaySelector, gridStyles, rowHeightsOptions];
|
|
384
396
|
};
|
|
385
|
-
var ResetButton = function ResetButton(
|
|
386
|
-
var onClick =
|
|
397
|
+
var ResetButton = function ResetButton(_ref9) {
|
|
398
|
+
var onClick = _ref9.onClick;
|
|
387
399
|
var resetButtonLabel = (0, _i18n.useEuiI18n)('euiDisplaySelector.resetButtonText', 'Reset to default');
|
|
388
400
|
return (0, _react2.jsx)(_popover.EuiPopoverFooter, null, (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
389
401
|
justifyContent: "flexEnd",
|