@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
|
@@ -11,9 +11,10 @@ var _datemath = _interopRequireDefault(require("@elastic/datemath"));
|
|
|
11
11
|
var _moment = _interopRequireDefault(require("moment"));
|
|
12
12
|
var _pretty_interval = require("./pretty_interval");
|
|
13
13
|
var _relative_utils = require("./relative_utils");
|
|
14
|
-
var _button_group_button = require("../../button/button_group/button_group_button");
|
|
15
|
-
var _button_group = require("../../button/button_group/button_group.styles");
|
|
16
14
|
var _services = require("../../../services");
|
|
15
|
+
var _button = require("../../button");
|
|
16
|
+
var _tool_tip = require("../../tool_tip");
|
|
17
|
+
var _button_group = require("../../button/button_group/button_group");
|
|
17
18
|
var _i18n = require("../../i18n");
|
|
18
19
|
var _react2 = require("@emotion/react");
|
|
19
20
|
/*
|
|
@@ -44,10 +45,8 @@ var EuiTimeWindowButtons = exports.EuiTimeWindowButtons = function EuiTimeWindow
|
|
|
44
45
|
showShiftArrows = _ref$showShiftArrows === void 0 ? true : _ref$showShiftArrows,
|
|
45
46
|
_ref$zoomFactor = _ref.zoomFactor,
|
|
46
47
|
zoomFactor = _ref$zoomFactor === void 0 ? ZOOM_FACTOR_DEFAULT : _ref$zoomFactor;
|
|
47
|
-
var buttonColor = 'text';
|
|
48
48
|
var buttonSize = compressed ? 's' : 'm';
|
|
49
49
|
var iconSize = 'm';
|
|
50
|
-
var styles = (0, _services.useEuiMemoizedStyles)(_button_group.euiButtonGroupButtonsStyles);
|
|
51
50
|
var _useEuiTimeWindow = useEuiTimeWindow(start, end, applyTime, {
|
|
52
51
|
zoomFactor: zoomFactor
|
|
53
52
|
}),
|
|
@@ -58,6 +57,7 @@ var EuiTimeWindowButtons = exports.EuiTimeWindowButtons = function EuiTimeWindow
|
|
|
58
57
|
expandWindow = _useEuiTimeWindow.expandWindow,
|
|
59
58
|
shrinkWindow = _useEuiTimeWindow.shrinkWindow,
|
|
60
59
|
isWindowDurationZero = _useEuiTimeWindow.isWindowDurationZero;
|
|
60
|
+
var groupLabel = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.label', 'Time window controls');
|
|
61
61
|
var previousDescription = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.previousDescription', 'Previous {displayInterval}', {
|
|
62
62
|
displayInterval: displayInterval
|
|
63
63
|
});
|
|
@@ -89,69 +89,57 @@ var EuiTimeWindowButtons = exports.EuiTimeWindowButtons = function EuiTimeWindow
|
|
|
89
89
|
var nextLabel = (0, _i18n.useEuiI18n)('euiTimeWindowButtons.nextLabel', 'Next');
|
|
90
90
|
var nextTooltipContent = isInvalid ? invalidShiftDescription : nextDescription;
|
|
91
91
|
if (!showZoomIn && !showZoomOut && !showShiftArrows) return null;
|
|
92
|
-
return (0, _react2.jsx)(
|
|
92
|
+
return (0, _react2.jsx)(_button_group.EuiButtonGroup, {
|
|
93
|
+
legend: groupLabel,
|
|
94
|
+
variant: "segmented",
|
|
95
|
+
buttonSize: buttonSize,
|
|
96
|
+
showDividers: true,
|
|
97
|
+
wrap: false,
|
|
93
98
|
className: "euiSuperDatePicker__timeWindowButtons",
|
|
94
|
-
css: [styles.euiButtonGroup__buttons, styles.size[buttonSize], ";label:EuiTimeWindowButtons;"],
|
|
95
99
|
"data-test-subj": "timeWindowButtons"
|
|
96
|
-
}, showShiftArrows && (0, _react2.jsx)(
|
|
100
|
+
}, showShiftArrows && (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
101
|
+
content: !isDisabled && previousTooltipContent
|
|
102
|
+
}, (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
97
103
|
id: previousId,
|
|
98
|
-
"data-test-subj": "timeWindowButtonsPrevious",
|
|
99
|
-
label: previousLabel,
|
|
100
|
-
title: "",
|
|
101
|
-
toolTipContent: !isDisabled && previousTooltipContent,
|
|
102
|
-
color: buttonColor,
|
|
103
|
-
size: buttonSize,
|
|
104
104
|
iconType: "chevronSingleLeft",
|
|
105
105
|
iconSize: iconSize,
|
|
106
|
-
isIconOnly: true,
|
|
107
106
|
isDisabled: isWindowDurationZero || isDisabled,
|
|
108
|
-
onClick: stepBackward
|
|
109
|
-
|
|
107
|
+
onClick: stepBackward,
|
|
108
|
+
"aria-label": previousLabel,
|
|
109
|
+
"data-test-subj": "timeWindowButtonsPrevious"
|
|
110
|
+
})), showZoomIn && (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
111
|
+
content: !isDisabled && zoomInTooltipContent,
|
|
112
|
+
disableScreenReaderOutput: zoomInLabel === zoomInTooltipContent
|
|
113
|
+
}, (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
110
114
|
id: zoomInId,
|
|
111
|
-
"data-test-subj": "timeWindowButtonsZoomIn",
|
|
112
|
-
label: zoomInLabel,
|
|
113
|
-
title: "",
|
|
114
|
-
toolTipContent: !isDisabled && zoomInTooltipContent,
|
|
115
|
-
toolTipProps: {
|
|
116
|
-
disableScreenReaderOutput: zoomInLabel === zoomInTooltipContent
|
|
117
|
-
},
|
|
118
|
-
color: buttonColor,
|
|
119
|
-
size: buttonSize,
|
|
120
115
|
iconType: "magnifyPlus",
|
|
121
116
|
iconSize: iconSize,
|
|
122
|
-
isIconOnly: true,
|
|
123
117
|
isDisabled: isWindowDurationZero || isDisabled,
|
|
124
|
-
onClick: shrinkWindow
|
|
125
|
-
|
|
118
|
+
onClick: shrinkWindow,
|
|
119
|
+
"aria-label": zoomInLabel,
|
|
120
|
+
"data-test-subj": "timeWindowButtonsZoomIn"
|
|
121
|
+
})), showZoomOut && (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
122
|
+
content: !isDisabled && zoomOutTooltipContent,
|
|
123
|
+
disableScreenReaderOutput: zoomOutLabel === zoomOutTooltipContent
|
|
124
|
+
}, (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
126
125
|
id: zoomOutId,
|
|
127
|
-
"data-test-subj": "timeWindowButtonsZoomOut",
|
|
128
|
-
label: zoomOutLabel,
|
|
129
|
-
title: "",
|
|
130
|
-
toolTipContent: !isDisabled && zoomOutTooltipContent,
|
|
131
|
-
toolTipProps: {
|
|
132
|
-
disableScreenReaderOutput: zoomOutLabel === zoomOutTooltipContent
|
|
133
|
-
},
|
|
134
|
-
color: buttonColor,
|
|
135
|
-
size: buttonSize,
|
|
136
126
|
iconType: "magnifyMinus",
|
|
137
127
|
iconSize: iconSize,
|
|
138
|
-
isIconOnly: true,
|
|
139
128
|
isDisabled: isDisabled,
|
|
140
|
-
onClick: expandWindow
|
|
141
|
-
|
|
129
|
+
onClick: expandWindow,
|
|
130
|
+
"aria-label": zoomOutLabel,
|
|
131
|
+
"data-test-subj": "timeWindowButtonsZoomOut"
|
|
132
|
+
})), showShiftArrows && (0, _react2.jsx)(_tool_tip.EuiToolTip, {
|
|
133
|
+
content: !isDisabled && nextTooltipContent
|
|
134
|
+
}, (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
142
135
|
id: nextId,
|
|
143
|
-
"data-test-subj": "timeWindowButtonsNext",
|
|
144
|
-
label: nextLabel,
|
|
145
|
-
title: "",
|
|
146
|
-
toolTipContent: !isDisabled && nextTooltipContent,
|
|
147
|
-
color: buttonColor,
|
|
148
|
-
size: buttonSize,
|
|
149
136
|
iconType: "chevronSingleRight",
|
|
150
137
|
iconSize: iconSize,
|
|
151
|
-
isIconOnly: true,
|
|
152
138
|
isDisabled: isWindowDurationZero || isDisabled,
|
|
153
|
-
onClick: stepForward
|
|
154
|
-
|
|
139
|
+
onClick: stepForward,
|
|
140
|
+
"aria-label": nextLabel,
|
|
141
|
+
"data-test-subj": "timeWindowButtonsNext"
|
|
142
|
+
})));
|
|
155
143
|
};
|
|
156
144
|
|
|
157
145
|
/**
|
|
@@ -16,11 +16,12 @@ var _i18n = require("../i18n");
|
|
|
16
16
|
var _inner_text = require("../inner_text");
|
|
17
17
|
var _badge = require("../badge");
|
|
18
18
|
var _button_empty = require("../button/button_empty");
|
|
19
|
+
var _button = require("../button/button");
|
|
20
|
+
var _button_group_button = require("../button/button_group/button_group_button.styles");
|
|
19
21
|
var _filter_button = require("./filter_button.styles");
|
|
20
|
-
var
|
|
21
|
-
var _button_group_button2 = require("../button/button_group/button_group_button.styles");
|
|
22
|
+
var _filter_group_context = require("./filter_group_context");
|
|
22
23
|
var _react2 = require("@emotion/react");
|
|
23
|
-
var _excluded = ["children", "className", "iconType", "iconSide", "color", "badgeColor", "hasActiveFilters", "numFilters", "numActiveFilters", "isToggle", "isDisabled", "isSelected", "type", "grow", "withNext", "textProps", "contentProps"];
|
|
24
|
+
var _excluded = ["children", "className", "iconType", "iconSide", "color", "badgeColor", "hasActiveFilters", "numFilters", "numActiveFilters", "isToggle", "isDisabled", "disabled", "isSelected", "type", "grow", "withNext", "textProps", "contentProps"];
|
|
24
25
|
/*
|
|
25
26
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
26
27
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -44,7 +45,8 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
44
45
|
numFilters = _ref.numFilters,
|
|
45
46
|
numActiveFilters = _ref.numActiveFilters,
|
|
46
47
|
isToggle = _ref.isToggle,
|
|
47
|
-
|
|
48
|
+
_isDisabled = _ref.isDisabled,
|
|
49
|
+
disabled = _ref.disabled,
|
|
48
50
|
isSelected = _ref.isSelected,
|
|
49
51
|
_ref$type = _ref.type,
|
|
50
52
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
@@ -54,24 +56,30 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
54
56
|
textProps = _ref.textProps,
|
|
55
57
|
contentProps = _ref.contentProps,
|
|
56
58
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
59
|
+
var _useEuiTheme = (0, _services.useEuiTheme)(),
|
|
60
|
+
colorMode = _useEuiTheme.colorMode;
|
|
61
|
+
var _useEuiFilterGroupCon = (0, _filter_group_context.useEuiFilterGroupContext)(),
|
|
62
|
+
compressed = _useEuiFilterGroupCon.compressed,
|
|
63
|
+
display = _useEuiFilterGroupCon.display,
|
|
64
|
+
showDividers = _useEuiFilterGroupCon.showDividers;
|
|
65
|
+
var isDisabled = _isDisabled || disabled;
|
|
66
|
+
var fill = isToggle && isSelected && (display === 'highlighted' || color !== 'text');
|
|
57
67
|
var id = (0, _services.useGeneratedHtmlId)({
|
|
58
68
|
prefix: 'filter-button'
|
|
59
69
|
});
|
|
60
70
|
var numFiltersDefined = numFilters != null; // != instead of !== to allow for null and undefined
|
|
61
71
|
var numActiveFiltersDefined = !!numActiveFilters;
|
|
62
|
-
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
63
|
-
var colorMode = euiThemeContext.colorMode;
|
|
64
72
|
|
|
65
73
|
// assumption about type of usage based on icon usage
|
|
66
74
|
// requires manual override to apply correct aria attributes for more custom usages
|
|
67
75
|
var isCollapsible = !isToggle && iconType === 'chevronSingleDown';
|
|
68
76
|
var isExpanded = isCollapsible && (isSelected !== null && isSelected !== void 0 ? isSelected : hasActiveFilters);
|
|
69
77
|
var styles = (0, _services.useEuiMemoizedStyles)(_filter_button.euiFilterButtonStyles);
|
|
70
|
-
var focusColorStyles = (0, _services.useEuiMemoizedStyles)(
|
|
71
|
-
var toggleVariantStyles = [isToggle && styles.buttonType.toggle,
|
|
72
|
-
var cssStyles = [styles.euiFilterButton, hasActiveFilters && styles.hasActiveFilters].concat(toggleVariantStyles);
|
|
78
|
+
var focusColorStyles = (0, _services.useEuiMemoizedStyles)(_button_group_button._compressedButtonFocusColors);
|
|
79
|
+
var toggleVariantStyles = [isToggle && styles.buttonType.toggle, isToggle && isSelected && display !== 'highlighted' && color === 'text' && styles.isSelected, !isToggle && !isDisabled && focusColorStyles[color]];
|
|
80
|
+
var cssStyles = [styles.euiFilterButton, hasActiveFilters && styles.hasActiveFilters, compressed && styles.compressed, !children && styles.isIconOnly].concat(toggleVariantStyles);
|
|
73
81
|
var wrapperStyles = (0, _services.useEuiMemoizedStyles)(_filter_button.euiFilterButtonWrapperStyles);
|
|
74
|
-
var wrapperCssStyles = [wrapperStyles.wrapper, withNext && styles.withNext, numFiltersDefined && styles.hasNotification,
|
|
82
|
+
var wrapperCssStyles = [wrapperStyles.wrapper, withNext && styles.withNext, numFiltersDefined && styles.hasNotification, compressed && wrapperStyles.compressed, showDividers && wrapperStyles.hasDividers, !children && wrapperStyles.isIconOnly, !grow && styles.noGrow];
|
|
75
83
|
var _useEuiMemoizedStyles = (0, _services.useEuiMemoizedStyles)(_filter_button.euiFilterButtonChildStyles),
|
|
76
84
|
contentStyles = _useEuiMemoizedStyles.content,
|
|
77
85
|
textStyles = _useEuiMemoizedStyles.text,
|
|
@@ -81,6 +89,7 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
81
89
|
'euiFilterButton-isSelected': isSelected,
|
|
82
90
|
'euiFilterButton-hasActiveFilters': hasActiveFilters,
|
|
83
91
|
'euiFilterButton-hasNotification': numFiltersDefined,
|
|
92
|
+
'euiFilterButton-isIconOnly': !children,
|
|
84
93
|
'euiFilterButton-isToggle': isToggle
|
|
85
94
|
}, className);
|
|
86
95
|
|
|
@@ -119,7 +128,7 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
119
128
|
ref = _useInnerText2[0],
|
|
120
129
|
innerText = _useInnerText2[1];
|
|
121
130
|
var dataText = children && typeof children === 'string' ? children : innerText;
|
|
122
|
-
var textContent = (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
131
|
+
var textContent = children && (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
123
132
|
ref: ref,
|
|
124
133
|
"data-text": dataText,
|
|
125
134
|
title: dataText
|
|
@@ -150,18 +159,17 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
150
159
|
return (0, _react2.jsx)("div", {
|
|
151
160
|
className: wrapperClasses,
|
|
152
161
|
css: wrapperCssStyles
|
|
153
|
-
}, isToggle && !isCollapsible ? (0, _react2.jsx)(
|
|
162
|
+
}, isToggle && !isCollapsible ? (0, _react2.jsx)(_button.EuiButton, (0, _extends2.default)({
|
|
154
163
|
id: id,
|
|
155
|
-
label: (0, _react2.jsx)(_react.default.Fragment, null, textContent, badgeElement),
|
|
156
164
|
className: classes,
|
|
157
165
|
css: cssStyles,
|
|
158
166
|
color: color,
|
|
159
167
|
isSelected: isSelected,
|
|
160
|
-
|
|
168
|
+
fill: fill,
|
|
169
|
+
size: "s",
|
|
161
170
|
isDisabled: isDisabled,
|
|
162
171
|
iconSide: iconSide,
|
|
163
172
|
iconType: iconType,
|
|
164
|
-
isIconOnly: false,
|
|
165
173
|
type: type,
|
|
166
174
|
textProps: false,
|
|
167
175
|
contentProps: _objectSpread(_objectSpread({}, contentProps), {}, {
|
|
@@ -169,5 +177,5 @@ var EuiFilterButton = exports.EuiFilterButton = function EuiFilterButton(_ref) {
|
|
|
169
177
|
})
|
|
170
178
|
}, rest, {
|
|
171
179
|
onClick: onToggleClick
|
|
172
|
-
})) : button);
|
|
180
|
+
}), textContent, badgeElement) : button);
|
|
173
181
|
};
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiFilterButtonWrapperStyles = exports.euiFilterButtonStyles = exports.euiFilterButtonDisplay = exports.euiFilterButtonChildStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
|
-
var _supports = require("../../global_styling/functions/supports");
|
|
10
9
|
var _form = require("../form/form.styles");
|
|
11
10
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
12
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -24,7 +23,15 @@ var euiFilterButtonDisplay = exports.euiFilterButtonDisplay = function euiFilter
|
|
|
24
23
|
})
|
|
25
24
|
};
|
|
26
25
|
};
|
|
27
|
-
var
|
|
26
|
+
var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
27
|
+
name: "1s8pkrf-isIconOnly",
|
|
28
|
+
styles: "inline-size:var(--euiFilterButtonInsetSize);min-inline-size:var(--euiFilterButtonInsetSize);label:isIconOnly;"
|
|
29
|
+
} : {
|
|
30
|
+
name: "1s8pkrf-isIconOnly",
|
|
31
|
+
styles: "inline-size:var(--euiFilterButtonInsetSize);min-inline-size:var(--euiFilterButtonInsetSize);label:isIconOnly;",
|
|
32
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
|
+
};
|
|
34
|
+
var _ref6 = process.env.NODE_ENV === "production" ? {
|
|
28
35
|
name: "jkp921-noGrow",
|
|
29
36
|
styles: "flex-grow:0;label:noGrow;"
|
|
30
37
|
} : {
|
|
@@ -34,40 +41,58 @@ var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
|
34
41
|
};
|
|
35
42
|
var euiFilterButtonStyles = exports.euiFilterButtonStyles = function euiFilterButtonStyles(euiThemeContext) {
|
|
36
43
|
var euiTheme = euiThemeContext.euiTheme;
|
|
44
|
+
var buttonSizeMap = (0, _global_styling.euiButtonSizeMap)(euiThemeContext);
|
|
37
45
|
var selectedSelector = '.euiFilterButton-isSelected';
|
|
38
46
|
var withNextSelector = '& + .euiFilterButton__wrapper';
|
|
47
|
+
var containerPadding = euiTheme.size.xs;
|
|
39
48
|
return {
|
|
40
|
-
euiFilterButton: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('width', '100%'), "
|
|
49
|
+
euiFilterButton: /*#__PURE__*/(0, _react.css)("--euiFilterButtonInsetSize:", buttonSizeMap.m.getInsetHeight(buttonSizeMap.m.height, containerPadding), ";--euiFilterButtonRadius:", buttonSizeMap.m.radiusInset, ";position:relative;block-size:var(--euiFilterButtonInsetSize);", (0, _global_styling.logicalCSS)('width', '100%'), " border:none;border-radius:var(\n --euiFilterButtonRadius,\n ", euiTheme.border.radius.small, "\n );&:not(", selectedSelector, "){&:hover,&:active{.euiFilterButton__notification[class*='subdued']{background-color:", euiTheme.components.filterButtonBadgeBackgroundHover, ";}}}&&:focus-visible{outline-style:auto;outline-offset:0;};label:euiFilterButton;"),
|
|
41
50
|
buttonType: {
|
|
42
|
-
|
|
43
|
-
toggle: /*#__PURE__*/(0, _react.css)(euiFilterButtonDisplay(euiThemeContext), " &:focus-visible{outline-offset:", (0, _global_styling.mathWithUnits)(euiTheme.focus.width, function (x) {
|
|
44
|
-
return x / 2;
|
|
45
|
-
}), ";}", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
51
|
+
toggle: /*#__PURE__*/(0, _react.css)(euiFilterButtonDisplay(euiThemeContext), " &:where(:is(", _global_styling.euiDisabledSelector, "):not([aria-pressed=\"true\"])){background-color:transparent;}", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
46
52
|
forced: "\n &:is(".concat(selectedSelector, ") {\n ").concat((0, _global_styling.preventForcedColors)(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n }\n ")
|
|
47
53
|
}), ";;label:toggle;")
|
|
48
54
|
},
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
compressed: /*#__PURE__*/(0, _react.css)("--euiFilterButtonInsetSize:", buttonSizeMap.s.getInsetHeight(buttonSizeMap.s.height, containerPadding), ";--euiFilterButtonRadius:", buttonSizeMap.s.radiusInset, ";;label:compressed;"),
|
|
56
|
+
withNext: /*#__PURE__*/(0, _react.css)(withNextSelector, "{margin-inline-start:-", containerPadding, ";&:where(.euiFilterGroup[data-dividers='true'] &){margin-inline-start:-", (0, _global_styling.mathWithUnits)([containerPadding, euiTheme.border.width.thin], function (x, y) {
|
|
57
|
+
return x + y;
|
|
58
|
+
}), ";}&::before{border:none;}};label:withNext;"),
|
|
59
|
+
noGrow: _ref6,
|
|
51
60
|
hasNotification: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
52
61
|
return x * 6;
|
|
53
62
|
})), ";;label:hasNotification;"),
|
|
54
|
-
hasActiveFilters: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.medium, ";;label:hasActiveFilters;")
|
|
63
|
+
hasActiveFilters: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.medium, ";;label:hasActiveFilters;"),
|
|
64
|
+
isSelected: /*#__PURE__*/(0, _react.css)("&", selectedSelector, "{background-color:", euiTheme.colors.backgroundLightText, ";", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
65
|
+
preferred: "\n border: ".concat(euiTheme.border.thin, ";\n ")
|
|
66
|
+
}), ";};label:isSelected;"),
|
|
67
|
+
isIconOnly: _ref5
|
|
55
68
|
};
|
|
56
69
|
};
|
|
70
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
71
|
+
name: "khp3oe-isIconOnly",
|
|
72
|
+
styles: "min-inline-size:auto;label:isIconOnly;"
|
|
73
|
+
} : {
|
|
74
|
+
name: "khp3oe-isIconOnly",
|
|
75
|
+
styles: "min-inline-size:auto;label:isIconOnly;",
|
|
76
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
77
|
+
};
|
|
57
78
|
var euiFilterButtonWrapperStyles = exports.euiFilterButtonWrapperStyles = function euiFilterButtonWrapperStyles(euiThemeContext) {
|
|
58
79
|
var euiTheme = euiThemeContext.euiTheme;
|
|
80
|
+
var buttonSizeMap = (0, _global_styling.euiButtonSizeMap)(euiThemeContext);
|
|
59
81
|
var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
|
|
60
82
|
borderColor = _euiFormVariables.borderColor;
|
|
61
83
|
var border = "".concat(euiTheme.border.width.thin, " solid ").concat(borderColor);
|
|
84
|
+
var containerPadding = euiTheme.size.xs;
|
|
62
85
|
|
|
63
86
|
// Pseudo elements create borders without affecting width. We also prefer them
|
|
64
87
|
// over box-shadow for Windows high contrast theme compatibility
|
|
65
|
-
var leftBorder = "\n &::before {\n content: '';\n position: absolute;\n inset:
|
|
88
|
+
var leftBorder = "\n &::before {\n content: '';\n position: absolute;\n inset-inline-start: -".concat(euiTheme.border.width.thin, ";\n block-size: calc(\n var(--euiFilterButtonSize, ").concat(euiTheme.size.xl, ") - ").concat(euiTheme.size.base, "\n );\n inline-size: ").concat(euiTheme.border.width.thin, ";\n border-inline-start: ").concat(border, ";\n pointer-events: none;\n }\n ");
|
|
66
89
|
// Bottom borders are needed for responsive flex-wrap behavior
|
|
67
|
-
var bottomBorder = "\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n ".concat((0, _global_styling.logicalCSS)('border-bottom', border), "\n pointer-events: none;\n }\n ");
|
|
90
|
+
var bottomBorder = "\n &::after {\n content: '';\n position: absolute;\n inset-block-start: -".concat(euiTheme.border.width.thin, ";\n inset-inline-start: 0;\n inline-size: calc(100% + ").concat(euiTheme.border.width.thin, ");\n ").concat((0, _global_styling.logicalCSS)('border-bottom', border), "\n pointer-events: none;\n }\n ");
|
|
68
91
|
return {
|
|
69
|
-
wrapper: /*#__PURE__*/(0, _react.css)(euiFilterButtonDisplay(euiThemeContext), " position:relative;display:flex;align-items:center;",
|
|
70
|
-
|
|
92
|
+
wrapper: /*#__PURE__*/(0, _react.css)("--euiFilterButtonSize:", buttonSizeMap.m.height, ";", euiFilterButtonDisplay(euiThemeContext), " position:relative;display:flex;align-items:center;block-size:var(--euiFilterButtonSize, ", euiTheme.size.xl, ");padding:", containerPadding, ";&+:where(:has(.euiFilterButton)){margin-inline-start:-", containerPadding, ";};label:wrapper;"),
|
|
93
|
+
compressed: /*#__PURE__*/(0, _react.css)("--euiFilterButtonSize:", buttonSizeMap.s.height, ";;label:compressed;"),
|
|
94
|
+
hasDividers: /*#__PURE__*/(0, _react.css)(leftBorder, " ", bottomBorder, " &+:where(:has(.euiFilterButton)){margin-inline-start:0;};label:hasDividers;"),
|
|
95
|
+
isIconOnly: _ref4
|
|
71
96
|
};
|
|
72
97
|
};
|
|
73
98
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.EuiFilterGroup = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react =
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
13
|
var _services = require("../../services");
|
|
13
14
|
var _filter_group = require("./filter_group.styles");
|
|
15
|
+
var _filter_group_context = require("./filter_group_context");
|
|
14
16
|
var _react2 = require("@emotion/react");
|
|
15
|
-
var _excluded = ["children", "className", "fullWidth", "compressed"];
|
|
17
|
+
var _excluded = ["children", "className", "fullWidth", "compressed", "display", "showDividers"];
|
|
16
18
|
/*
|
|
17
19
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
20
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -20,6 +22,8 @@ var _excluded = ["children", "className", "fullWidth", "compressed"];
|
|
|
20
22
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
23
|
* Side Public License, v 1.
|
|
22
24
|
*/
|
|
25
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
27
|
/**
|
|
24
28
|
* @see {@link https://eui.elastic.co/docs/components/navigation/buttons/filter-group/|EuiFilterGroup documentation}
|
|
25
29
|
*/
|
|
@@ -29,12 +33,28 @@ var EuiFilterGroup = exports.EuiFilterGroup = function EuiFilterGroup(_ref) {
|
|
|
29
33
|
_ref$fullWidth = _ref.fullWidth,
|
|
30
34
|
fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
|
|
31
35
|
compressed = _ref.compressed,
|
|
36
|
+
_ref$display = _ref.display,
|
|
37
|
+
display = _ref$display === void 0 ? 'regular' : _ref$display,
|
|
38
|
+
_ref$showDividers = _ref.showDividers,
|
|
39
|
+
showDividers = _ref$showDividers === void 0 ? true : _ref$showDividers,
|
|
32
40
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
33
41
|
var styles = (0, _services.useEuiMemoizedStyles)(_filter_group.euiFilterGroupStyles);
|
|
34
42
|
var cssStyles = [styles.euiFilterGroup, fullWidth && styles.fullWidth, compressed ? styles.compressed : styles.uncompressed];
|
|
35
43
|
var classes = (0, _classnames.default)('euiFilterGroup', className);
|
|
36
|
-
|
|
44
|
+
var contextValue = (0, _react.useMemo)(function () {
|
|
45
|
+
return {
|
|
46
|
+
compressed: compressed,
|
|
47
|
+
display: display,
|
|
48
|
+
showDividers: showDividers
|
|
49
|
+
};
|
|
50
|
+
}, [compressed, display, showDividers]);
|
|
51
|
+
return (0, _react2.jsx)(_filter_group_context.EuiFilterGroupContext.Provider, {
|
|
52
|
+
value: contextValue
|
|
53
|
+
}, (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
37
54
|
className: classes,
|
|
38
55
|
css: cssStyles
|
|
39
|
-
}, rest
|
|
56
|
+
}, rest, {
|
|
57
|
+
"data-display": display,
|
|
58
|
+
"data-dividers": showDividers || undefined
|
|
59
|
+
}), children));
|
|
40
60
|
};
|
|
@@ -26,22 +26,16 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
26
26
|
var euiFilterGroupStyles = exports.euiFilterGroupStyles = function euiFilterGroupStyles(euiThemeContext) {
|
|
27
27
|
var euiTheme = euiThemeContext.euiTheme;
|
|
28
28
|
var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
|
|
29
|
-
backgroundColor = _euiFormVariables.backgroundColor
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var borderRadius = euiTheme.border.radius.small;
|
|
33
|
-
var borderRadiusCompressed = euiTheme.border.radius.small;
|
|
29
|
+
backgroundColor = _euiFormVariables.backgroundColor;
|
|
30
|
+
var buttonSizeMap = (0, _global_styling.euiButtonSizeMap)(euiThemeContext);
|
|
31
|
+
var containerPadding = euiTheme.size.xs;
|
|
34
32
|
return {
|
|
35
|
-
euiFilterGroup: /*#__PURE__*/(0, _react.css)("position:relative;display:inline-flex;", (0, _global_styling.logicalCSS)('max-width', '100%'), " overflow:hidden;background-color:", backgroundColor, ";&::after{content:'';position:absolute;inset:0;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.borderBasePlain, ";border-radius:inherit;pointer-events:none;}
|
|
33
|
+
euiFilterGroup: /*#__PURE__*/(0, _react.css)("position:relative;display:inline-flex;", (0, _global_styling.logicalCSS)('max-width', '100%'), " overflow:hidden;background-color:", backgroundColor, ";&::after{content:'';position:absolute;inset:0;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.borderBasePlain, ";border-radius:inherit;pointer-events:none;}&:where([data-dividers='true']){gap:", euiTheme.border.width.thin, ";}.euiFilterButton-isToggle{padding-inline:", (0, _global_styling.mathWithUnits)([euiTheme.size.s, containerPadding], function (x, y) {
|
|
34
|
+
return x - y / 2;
|
|
35
|
+
}), ";}>*:not(.euiFilterButton__wrapper, .euiFilterButton){", (0, _filter_button.euiFilterButtonDisplay)(euiThemeContext), " &:has(.euiFilterButton-isIconOnly){min-inline-size:auto;}}.euiPopover>*:is(.euiToolTipAnchor, .euiFilterButton__wrapper, .euiFilterButton){", (0, _global_styling.logicalCSS)('width', '100%'), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{flex-wrap:wrap;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs']), "{display:flex;.euiPopover:focus-within{z-index:1;}.euiFilterButton__wrapper{flex-grow:1;}};label:euiFilterGroup;"),
|
|
36
36
|
fullWidth: _ref,
|
|
37
|
-
uncompressed: /*#__PURE__*/(0, _react.css)("border-radius:",
|
|
38
|
-
|
|
39
|
-
})), ";};label:uncompressed;"),
|
|
40
|
-
compressed: /*#__PURE__*/(0, _react.css)("border-radius:", borderRadiusCompressed, ";.euiFilterButton{", (0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)([controlCompressedHeight, euiTheme.border.width.thin], function (x, y) {
|
|
41
|
-
return x - 2 * y;
|
|
42
|
-
})), ";}.euiFilterButton-isToggle{", (0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)([controlCompressedHeight, euiTheme.size.xxs], function (x, y) {
|
|
43
|
-
return x - 3 * y;
|
|
44
|
-
})), ";};label:compressed;"),
|
|
37
|
+
uncompressed: /*#__PURE__*/(0, _react.css)("border-radius:", buttonSizeMap.m.radius, ";;label:uncompressed;"),
|
|
38
|
+
compressed: /*#__PURE__*/(0, _react.css)("border-radius:", buttonSizeMap.s.radius, ";;label:compressed;"),
|
|
45
39
|
/**
|
|
46
40
|
* Not used in EuiFilterGroup directly, but used by EuiSearchBar and consumers
|
|
47
41
|
* A fixed width is required because of the shift in widths that can be caused
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useEuiFilterGroupContext = exports.EuiFilterGroupContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
/*
|
|
9
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
10
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
11
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
12
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
13
|
+
* Side Public License, v 1.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
var EuiFilterGroupContext = exports.EuiFilterGroupContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
17
|
+
var useEuiFilterGroupContext = exports.useEuiFilterGroupContext = function useEuiFilterGroupContext() {
|
|
18
|
+
return (0, _react.useContext)(EuiFilterGroupContext);
|
|
19
|
+
};
|
|
@@ -722,7 +722,11 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
|
|
|
722
722
|
onMouseDown: onMouseDownResizableButton,
|
|
723
723
|
onTouchStart: onMouseDownResizableButton,
|
|
724
724
|
onKeyDown: onKeyDownResizableButton
|
|
725
|
-
}), (0, _react2.jsx)(
|
|
725
|
+
}), (0, _react2.jsx)("div", {
|
|
726
|
+
className: "euiFlyout__content",
|
|
727
|
+
css: styles.content,
|
|
728
|
+
"data-test-subj": "euiFlyoutContent"
|
|
729
|
+
}, (0, _react2.jsx)(_flyout_parent_context.EuiFlyoutParentProvider, null, children)))));
|
|
726
730
|
}
|
|
727
731
|
// React.forwardRef interferes with the inferred element type
|
|
728
732
|
// Casting to ensure correct element prop type checking for `as`
|
|
@@ -52,7 +52,8 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
52
52
|
var euiFlyoutStyles = exports.euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
|
|
53
53
|
var euiTheme = euiThemeContext.euiTheme;
|
|
54
54
|
return _objectSpread(_objectSpread({
|
|
55
|
-
euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('top', 'var(--euiFixedHeadersOffset, 0)'), " ", (0, _global_styling.logicalCSS)('height', 'inherit'), " background:", euiTheme.colors.backgroundBasePlain, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}&.euiFlyout--hasChildBackground{background:", euiTheme.colors.backgroundBaseSubdued, ";}", maxedFlyoutWidth(euiThemeContext), ";;label:euiFlyout;")
|
|
55
|
+
euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('top', 'var(--euiFixedHeadersOffset, 0)'), " ", (0, _global_styling.logicalCSS)('height', 'inherit'), " background:", euiTheme.colors.backgroundBasePlain, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}&.euiFlyout--hasChildBackground{background:", euiTheme.colors.backgroundBaseSubdued, ";}", maxedFlyoutWidth(euiThemeContext), ";;label:euiFlyout;"),
|
|
56
|
+
content: /*#__PURE__*/(0, _react.css)("display:flex;flex:1 1 auto;flex-direction:column;align-items:stretch;min-block-size:0;&:has(.euiFlyoutBody){", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'auto'), ";};label:content;")
|
|
56
57
|
}, composeFlyoutSizing(euiThemeContext)), {}, {
|
|
57
58
|
noMaxWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', 'none'), ";;label:noMaxWidth;"),
|
|
58
59
|
// Side
|
|
@@ -165,7 +166,7 @@ var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddin
|
|
|
165
166
|
return x / 1.5;
|
|
166
167
|
}), " ").concat(euiTheme.size.l, ";")
|
|
167
168
|
};
|
|
168
|
-
return "\n .euiFlyoutHeader {\n ".concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat((0, _global_styling.logicalCSS)('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat((0, _global_styling.logicalCSS)('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
|
|
169
|
+
return "\n --euiFlyoutBodyPadding: ".concat(paddingModifierMap[paddingSize], ";\n\n .euiFlyoutHeader {\n ").concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat((0, _global_styling.logicalCSS)('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat((0, _global_styling.logicalCSS)('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
|
|
169
170
|
};
|
|
170
171
|
|
|
171
172
|
/**
|
|
@@ -17,7 +17,7 @@ var _global_styling = require("../../global_styling");
|
|
|
17
17
|
var euiFlyoutBodyStyles = exports.euiFlyoutBodyStyles = function euiFlyoutBodyStyles(euiThemeContext) {
|
|
18
18
|
var euiTheme = euiThemeContext.euiTheme;
|
|
19
19
|
return {
|
|
20
|
-
euiFlyoutBody: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSSWithFallback)('overflow-y', 'hidden'), " ", (0, _global_styling.logicalCSS)('height', '100%'), ";;label:euiFlyoutBody;"),
|
|
20
|
+
euiFlyoutBody: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSSWithFallback)('overflow-y', 'hidden'), " ", (0, _global_styling.logicalCSS)('height', '100%'), (0, _global_styling.logicalCSS)('min-height', "calc(".concat(euiTheme.size.xxl, " + var(--euiFlyoutBodyPadding, 0px) + var(--euiFlyoutBodyPadding, 0px) + ").concat(euiTheme.size.s, ")")), ";;label:euiFlyoutBody;"),
|
|
21
21
|
overflow: {
|
|
22
22
|
euiFlyoutBody__overflow: /*#__PURE__*/(0, _react.css)(";label:euiFlyoutBody__overflow;"),
|
|
23
23
|
noBanner: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext), ";;label:noBanner;"),
|
|
@@ -18,7 +18,7 @@ var _high_contrast = require("../../global_styling/functions/high_contrast");
|
|
|
18
18
|
var euiFlyoutFooterStyles = exports.euiFlyoutFooterStyles = function euiFlyoutFooterStyles(euiThemeContext) {
|
|
19
19
|
var euiTheme = euiThemeContext.euiTheme;
|
|
20
20
|
return {
|
|
21
|
-
euiFlyoutFooter: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.flyoutFooterBackground, ";flex-grow:0;", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
21
|
+
euiFlyoutFooter: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.flyoutFooterBackground, ";flex-grow:0;flex-shrink:0;", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
22
22
|
preferred: (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin)
|
|
23
23
|
}), ";;label:euiFlyoutFooter;")
|
|
24
24
|
};
|
|
@@ -14,11 +14,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
-
name: "
|
|
18
|
-
styles: "flex-grow:0;label:euiFlyoutHeader;"
|
|
17
|
+
name: "1w8kdp8-euiFlyoutHeader",
|
|
18
|
+
styles: "flex-grow:0;flex-shrink:0;label:euiFlyoutHeader;"
|
|
19
19
|
} : {
|
|
20
|
-
name: "
|
|
21
|
-
styles: "flex-grow:0;label:euiFlyoutHeader;",
|
|
20
|
+
name: "1w8kdp8-euiFlyoutHeader",
|
|
21
|
+
styles: "flex-grow:0;flex-shrink:0;label:euiFlyoutHeader;",
|
|
22
22
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
23
|
};
|
|
24
24
|
var euiFlyoutHeaderStyles = exports.euiFlyoutHeaderStyles = function euiFlyoutHeaderStyles(euiThemeContext) {
|
|
@@ -24,13 +24,22 @@ var MenuActionButton = exports.MenuActionButton = function MenuActionButton(_ref
|
|
|
24
24
|
onClick = action.onClick,
|
|
25
25
|
ariaLabel = action['aria-label'],
|
|
26
26
|
toolTipContent = action.toolTipContent,
|
|
27
|
-
toolTipProps = action.toolTipProps
|
|
27
|
+
toolTipProps = action.toolTipProps,
|
|
28
|
+
isDisabled = action.isDisabled,
|
|
29
|
+
isLoading = action.isLoading,
|
|
30
|
+
href = action.href,
|
|
31
|
+
target = action.target;
|
|
28
32
|
var sharedProps = {
|
|
29
33
|
'aria-label': ariaLabel,
|
|
30
34
|
iconType: iconType,
|
|
31
35
|
onClick: onClick,
|
|
32
36
|
color: 'text',
|
|
33
|
-
size: 'xs'
|
|
37
|
+
size: 'xs',
|
|
38
|
+
isDisabled: isDisabled,
|
|
39
|
+
// Keeps the button focusable so tooltip-on-disabled works for keyboard users
|
|
40
|
+
isLoading: isLoading,
|
|
41
|
+
href: href,
|
|
42
|
+
target: target
|
|
34
43
|
};
|
|
35
44
|
return toolTipContent ? (0, _react2.jsx)(_tool_tip.EuiToolTip, (0, _extends2.default)({
|
|
36
45
|
content: toolTipContent,
|
|
@@ -81,7 +81,7 @@ var euiFormControlLayoutSideNodeStyles = exports.euiFormControlLayoutSideNodeSty
|
|
|
81
81
|
return "\n position: relative;\n ".concat("margin-inline-".concat(side), ": -", euiTheme.border.width.thin, ";\n\n &::before {\n content: '';\n position: absolute;\n inset-inline-").concat(side, ": 0;\n z-index: ").concat(side === 'end' ? 1 : 0, ";\n block-size: ").concat(compressed ? euiTheme.size.base : euiTheme.size.l, ";\n inline-size: ").concat(euiTheme.border.width.thin, ";\n pointer-events: none;\n border-inline-").concat(side, ": \n ").concat(euiTheme.border.width.thin, " solid ").concat(form.borderColor, ";\n }\n ");
|
|
82
82
|
};
|
|
83
83
|
return {
|
|
84
|
-
euiFormControlLayout__side: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), " ", (0, _global_styling.euiTextTruncate)('50%'), " flex-shrink:0;display:flex;align-items:center;gap:", euiTheme.size.s, ";padding:", euiTheme.size.xs, ";", buttons, "{block-size:100%;border-radius:", form.controlLayoutInnerBorderRadius, ";transform:none!important;&:focus-visible{z-index:1;outline-offset:", euiTheme.focus.width, ";}}", text, "{cursor:default;overflow:hidden;text-overflow:ellipsis;}&:where(:has(", buttons, ":focus-visible):has(> *:only-child)){*:not(", appendPrepend, "){outline:none;}&::after{", (0, _form.euiFormControlFocusStyles)(euiThemeContext), " content:'';position:absolute;inset:0;border-radius:", form.controlLayoutBorderRadius, ";pointer-events:none;}}:where(:not(:has(:disabled))) label{color:", form.labelColor, ";};label:euiFormControlLayout__side;"),
|
|
84
|
+
euiFormControlLayout__side: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), " ", (0, _global_styling.euiTextTruncate)('50%'), " flex-shrink:0;display:flex;align-items:center;gap:", euiTheme.size.s, ";padding:", euiTheme.size.xs, ";", buttons, "{block-size:100%;border-radius:", form.controlLayoutInnerBorderRadius, ";transform:none!important;&:focus-visible{z-index:1;outline-offset:", euiTheme.focus.width, ";}}", text, "{cursor:default;overflow:hidden;text-overflow:ellipsis;}&:where(:has(", buttons, ":focus-visible):has(> *:only-child)){*:not(", appendPrepend, "){outline:none;}&::after{", (0, _form.euiFormControlFocusStyles)(euiThemeContext), " content:'';position:absolute;inset:0;border-radius:", form.controlLayoutBorderRadius, ";pointer-events:none;}}:where(:not(:has(:disabled))) label{color:", form.labelColor, ";}.euiFilterButton__wrapper{padding:0;};label:euiFormControlLayout__side;"),
|
|
85
85
|
uncompressed: {
|
|
86
86
|
uncompressed: "\n &:not(:has(> ".concat(buttons, ":first-child, > *:first-child ").concat(buttons, ")) {\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n }\n\n &:not(:has(> ").concat(buttons, ":last-child, > *:last-child ").concat(buttons, ")) {\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), "\n }\n\n ").concat(text, " {\n line-height: ").concat(uncompressedHeight, ";\n\n &:first-child {\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.xs), "\n }\n\n &:last-child {\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xs), "\n }\n }\n\n ").concat(buttons, " {\n ").concat((0, _global_styling.logicalCSS)('height', uncompressedHeight), "\n ").concat(_buttonPadding('s'), "\n }\n\n .euiButtonIcon {\n flex-shrink: 0;\n ").concat((0, _global_styling.logicalCSS)('width', uncompressedHeight), "\n }\n "),
|
|
87
87
|
append: "\n ".concat(dividerStyles('start'), "\n "),
|
|
@@ -36,7 +36,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
36
36
|
var Header = function Header() {
|
|
37
37
|
var renderLogo = function renderLogo() {
|
|
38
38
|
return (0, _react2.jsx)(_header_logo.EuiHeaderLogo, {
|
|
39
|
-
iconType: "logoElastic",
|
|
40
39
|
href: "#",
|
|
41
40
|
onClick: function onClick(e) {
|
|
42
41
|
return e.preventDefault();
|
|
@@ -55,5 +55,5 @@ var euiHeaderStyles = exports.euiHeaderStyles = function euiHeaderStyles(euiThem
|
|
|
55
55
|
var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
|
|
56
56
|
var euiTheme = euiThemeContext.euiTheme;
|
|
57
57
|
var backgroundColor = euiTheme.components.headerDarkBackground;
|
|
58
|
-
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.textGhost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat((0, _services.makeHighContrastColor)(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n ");
|
|
58
|
+
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo,\n .euiHeaderLogo__text,\n .euiHeaderLogo__image,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.textGhost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat((0, _services.makeHighContrastColor)(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n ");
|
|
59
59
|
};
|