@elastic/eui 66.0.0 → 67.1.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_theme_dark.css +0 -345
- package/dist/eui_theme_dark.json +0 -6
- package/dist/eui_theme_dark.json.d.ts +0 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -345
- package/dist/eui_theme_light.json +0 -6
- package/dist/eui_theme_light.json.d.ts +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/badge/badge.js +84 -78
- package/es/components/badge/badge.styles.js +56 -0
- package/es/components/basic_table/in_memory_table.js +8 -0
- package/es/components/button/button.js +0 -1
- package/es/components/button/button_display/_button_display.js +20 -6
- package/es/components/button/button_display/_button_display.styles.js +2 -2
- package/es/components/button/button_display/_button_display_content.js +5 -3
- package/es/components/button/button_display/_button_display_content.styles.js +4 -1
- package/es/components/button/button_empty/button_empty.js +10 -1
- package/es/components/card/card.js +2 -2
- package/es/components/card/card.styles.js +5 -2
- package/es/components/collapsible_nav/collapsible_nav.js +0 -5
- package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
- package/es/components/expression/expression.js +12 -2
- package/es/components/header/header_links/header_link.js +10 -1
- package/es/components/image/image.js +6 -1
- package/es/components/image/image_fullscreen_wrapper.js +2 -3
- package/es/components/notification/notification_event.js +25 -6
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/overlay_mask/overlay_mask.js +27 -65
- package/es/components/overlay_mask/overlay_mask.styles.js +28 -0
- package/es/components/page/page_content/page_content.js +1 -2
- package/es/components/page/page_content/page_content_body.js +1 -2
- package/es/components/page/page_content/page_content_header.js +1 -2
- package/es/components/page/page_content/page_content_header_section.js +1 -2
- package/es/components/page/page_section/page_section.js +15 -3
- package/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/es/components/page/page_template.js +3 -1
- package/es/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/es/components/page_template/page_template.js +18 -2
- package/es/components/pagination/pagination.js +17 -4
- package/es/components/pagination/pagination.styles.js +31 -0
- package/es/components/pagination/pagination_button.js +17 -5
- package/es/components/pagination/pagination_button.styles.js +30 -0
- package/es/components/pagination/pagination_button_arrow.js +5 -0
- package/es/components/popover/popover_title.js +2 -2
- package/es/components/popover/popover_title.styles.js +18 -6
- package/es/components/progress/progress.js +6 -1
- package/es/components/provider/cache/cache_provider.js +3 -9
- package/es/components/provider/provider.js +25 -2
- package/es/components/resizable_container/resizable_panel.js +6 -1
- package/es/components/search_bar/filters/custom_component_filter.js +16 -0
- package/es/components/search_bar/filters/filters.js +6 -0
- package/es/components/search_bar/query/ast.js +12 -0
- package/es/components/search_bar/query/ast_to_es_query_dsl.js +15 -10
- package/es/components/search_bar/query/query.js +17 -0
- package/es/components/search_bar/search_bar.js +4 -0
- package/es/components/search_bar/search_filters.js +4 -0
- package/es/components/selectable/selectable_list/selectable_list.js +2 -2
- package/es/components/selectable/selectable_list/selectable_list_item.js +2 -2
- package/es/components/side_nav/side_nav.js +5 -0
- package/es/components/suggest/suggest.js +10 -1
- package/es/components/tool_tip/tool_tip.js +42 -66
- package/es/components/tool_tip/tool_tip.styles.js +107 -0
- package/es/components/tool_tip/tool_tip_anchor.js +73 -0
- package/es/components/tool_tip/tool_tip_arrow.js +20 -0
- package/es/components/tool_tip/tool_tip_popover.js +48 -101
- package/es/global_styling/index.js +2 -1
- package/es/global_styling/utility/animations.js +13 -0
- package/es/services/color/contrast.js +2 -0
- package/es/services/index.js +1 -1
- package/es/services/theme/context.js +2 -1
- package/es/services/theme/hooks.js +27 -1
- package/es/services/theme/index.js +1 -1
- package/es/services/theme/provider.js +15 -1
- package/eui.d.ts +232 -79
- package/i18ntokens.json +54 -54
- package/lib/components/badge/badge.js +92 -80
- package/lib/components/badge/badge.styles.js +61 -0
- package/lib/components/basic_table/in_memory_table.js +8 -0
- package/lib/components/button/button.js +0 -1
- package/lib/components/button/button_display/_button_display.js +20 -6
- package/lib/components/button/button_display/_button_display.styles.js +2 -2
- package/lib/components/button/button_display/_button_display_content.js +9 -4
- package/lib/components/button/button_display/_button_display_content.styles.js +4 -1
- package/lib/components/button/button_empty/button_empty.js +10 -1
- package/lib/components/card/card.js +2 -2
- package/lib/components/card/card.styles.js +5 -2
- package/lib/components/collapsible_nav/collapsible_nav.js +0 -5
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/lib/components/expression/expression.js +12 -2
- package/lib/components/header/header_links/header_link.js +10 -1
- package/lib/components/image/image.js +6 -1
- package/lib/components/image/image_fullscreen_wrapper.js +2 -3
- package/lib/components/notification/notification_event.js +28 -9
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/overlay_mask/overlay_mask.js +27 -65
- package/lib/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/lib/components/page/page_content/page_content.js +1 -2
- package/lib/components/page/page_content/page_content_body.js +1 -2
- package/lib/components/page/page_content/page_content_header.js +1 -2
- package/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/lib/components/page/page_section/page_section.js +15 -3
- package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/lib/components/page/page_template.js +3 -1
- package/lib/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/lib/components/page_template/page_template.js +18 -2
- package/lib/components/pagination/pagination.js +18 -3
- package/lib/components/pagination/pagination.styles.js +34 -0
- package/lib/components/pagination/pagination_button.js +9 -4
- package/lib/components/pagination/pagination_button.styles.js +45 -0
- package/lib/components/pagination/pagination_button_arrow.js +7 -0
- package/lib/components/popover/popover_title.js +2 -2
- package/lib/components/popover/popover_title.styles.js +19 -7
- package/lib/components/progress/progress.js +6 -1
- package/lib/components/provider/cache/cache_provider.js +3 -11
- package/lib/components/provider/provider.js +31 -6
- package/lib/components/resizable_container/resizable_panel.js +6 -1
- package/lib/components/search_bar/filters/custom_component_filter.js +29 -0
- package/lib/components/search_bar/filters/filters.js +7 -0
- package/lib/components/search_bar/query/ast.js +12 -0
- package/lib/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
- package/lib/components/search_bar/query/query.js +17 -0
- package/lib/components/search_bar/search_bar.js +4 -0
- package/lib/components/search_bar/search_filters.js +4 -0
- package/lib/components/selectable/selectable_list/selectable_list.js +2 -2
- package/lib/components/selectable/selectable_list/selectable_list_item.js +2 -2
- package/lib/components/side_nav/side_nav.js +5 -0
- package/lib/components/suggest/suggest.js +10 -1
- package/lib/components/tool_tip/tool_tip.js +43 -64
- package/lib/components/tool_tip/tool_tip.styles.js +123 -0
- package/lib/components/tool_tip/tool_tip_anchor.js +87 -0
- package/lib/components/tool_tip/tool_tip_arrow.js +28 -0
- package/lib/components/tool_tip/tool_tip_popover.js +49 -98
- package/lib/global_styling/index.js +13 -0
- package/lib/global_styling/utility/animations.js +15 -0
- package/lib/services/color/contrast.js +6 -1
- package/lib/services/index.js +7 -0
- package/lib/services/theme/context.js +4 -2
- package/lib/services/theme/hooks.js +28 -0
- package/lib/services/theme/index.js +12 -0
- package/lib/services/theme/provider.js +23 -2
- package/optimize/es/components/badge/badge.js +82 -76
- package/optimize/es/components/badge/badge.styles.js +56 -0
- package/optimize/es/components/basic_table/in_memory_table.js +4 -0
- package/optimize/es/components/button/button.js +0 -1
- package/optimize/es/components/button/button_display/_button_display.js +8 -3
- package/optimize/es/components/button/button_display/_button_display.styles.js +2 -2
- package/optimize/es/components/button/button_display/_button_display_content.js +3 -1
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +4 -1
- package/optimize/es/components/card/card.js +2 -2
- package/optimize/es/components/card/card.styles.js +5 -2
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +0 -1
- package/optimize/es/components/image/image_fullscreen_wrapper.js +2 -3
- package/optimize/es/components/notification/notification_event.js +10 -4
- package/optimize/es/components/overlay_mask/overlay_mask.js +27 -60
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +28 -0
- package/optimize/es/components/page/page_content/page_content.js +1 -2
- package/optimize/es/components/page/page_content/page_content_body.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/es/components/page/page_section/page_section.js +4 -2
- package/optimize/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/es/components/page/page_template.js +3 -1
- package/optimize/es/components/pagination/pagination.js +17 -4
- package/optimize/es/components/pagination/pagination.styles.js +31 -0
- package/optimize/es/components/pagination/pagination_button.js +7 -4
- package/optimize/es/components/pagination/pagination_button.styles.js +30 -0
- package/optimize/es/components/pagination/pagination_button_arrow.js +5 -0
- package/optimize/es/components/popover/popover_title.js +2 -2
- package/optimize/es/components/popover/popover_title.styles.js +18 -6
- package/optimize/es/components/provider/cache/cache_provider.js +3 -9
- package/optimize/es/components/provider/provider.js +25 -2
- package/optimize/es/components/search_bar/filters/custom_component_filter.js +16 -0
- package/optimize/es/components/search_bar/filters/filters.js +6 -0
- package/optimize/es/components/search_bar/query/ast.js +12 -0
- package/optimize/es/components/search_bar/query/ast_to_es_query_dsl.js +14 -9
- package/optimize/es/components/search_bar/query/query.js +17 -0
- package/optimize/es/components/suggest/suggest.js +4 -1
- package/optimize/es/components/tool_tip/tool_tip.js +42 -66
- package/optimize/es/components/tool_tip/tool_tip.styles.js +107 -0
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +60 -0
- package/optimize/es/components/tool_tip/tool_tip_arrow.js +20 -0
- package/optimize/es/components/tool_tip/tool_tip_popover.js +46 -87
- package/optimize/es/global_styling/index.js +2 -1
- package/optimize/es/global_styling/utility/animations.js +13 -0
- package/optimize/es/services/color/contrast.js +2 -0
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/theme/context.js +2 -1
- package/optimize/es/services/theme/hooks.js +27 -1
- package/optimize/es/services/theme/index.js +1 -1
- package/optimize/es/services/theme/provider.js +14 -1
- package/optimize/lib/components/badge/badge.js +90 -78
- package/optimize/lib/components/badge/badge.styles.js +61 -0
- package/optimize/lib/components/basic_table/in_memory_table.js +4 -0
- package/optimize/lib/components/button/button.js +0 -1
- package/optimize/lib/components/button/button_display/_button_display.js +8 -3
- package/optimize/lib/components/button/button_display/_button_display.styles.js +2 -2
- package/optimize/lib/components/button/button_display/_button_display_content.js +6 -2
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +4 -1
- package/optimize/lib/components/card/card.js +2 -2
- package/optimize/lib/components/card/card.styles.js +5 -2
- package/optimize/lib/components/image/image_fullscreen_wrapper.js +2 -3
- package/optimize/lib/components/notification/notification_event.js +11 -11
- package/optimize/lib/components/overlay_mask/overlay_mask.js +27 -59
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/optimize/lib/components/page/page_content/page_content.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_body.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/lib/components/page/page_section/page_section.js +4 -2
- package/optimize/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/lib/components/page/page_template.js +3 -1
- package/optimize/lib/components/pagination/pagination.js +18 -3
- package/optimize/lib/components/pagination/pagination.styles.js +34 -0
- package/optimize/lib/components/pagination/pagination_button.js +9 -4
- package/optimize/lib/components/pagination/pagination_button.styles.js +45 -0
- package/optimize/lib/components/pagination/pagination_button_arrow.js +7 -0
- package/optimize/lib/components/popover/popover_title.js +2 -2
- package/optimize/lib/components/popover/popover_title.styles.js +19 -7
- package/optimize/lib/components/provider/cache/cache_provider.js +3 -11
- package/optimize/lib/components/provider/provider.js +31 -6
- package/optimize/lib/components/search_bar/filters/custom_component_filter.js +29 -0
- package/optimize/lib/components/search_bar/filters/filters.js +7 -0
- package/optimize/lib/components/search_bar/query/ast.js +12 -0
- package/optimize/lib/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
- package/optimize/lib/components/search_bar/query/query.js +17 -0
- package/optimize/lib/components/suggest/suggest.js +4 -1
- package/optimize/lib/components/tool_tip/tool_tip.js +42 -64
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +125 -0
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +75 -0
- package/optimize/lib/components/tool_tip/tool_tip_arrow.js +35 -0
- package/optimize/lib/components/tool_tip/tool_tip_popover.js +47 -88
- package/optimize/lib/global_styling/index.js +13 -0
- package/optimize/lib/global_styling/utility/animations.js +17 -0
- package/optimize/lib/services/color/contrast.js +5 -1
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/services/theme/context.js +4 -2
- package/optimize/lib/services/theme/hooks.js +28 -0
- package/optimize/lib/services/theme/index.js +12 -0
- package/optimize/lib/services/theme/provider.js +23 -9
- package/package.json +5 -5
- package/src/components/badge/_index.scss +0 -1
- package/src/components/index.scss +0 -4
- package/src/global_styling/mixins/_tool_tip.scss +3 -6
- package/src/themes/amsterdam/overrides/_index.scss +0 -2
- package/test-env/components/badge/badge.js +92 -80
- package/test-env/components/badge/badge.styles.js +61 -0
- package/test-env/components/basic_table/in_memory_table.js +8 -0
- package/test-env/components/button/button.js +0 -1
- package/test-env/components/button/button_display/_button_display.js +20 -6
- package/test-env/components/button/button_display/_button_display.styles.js +2 -2
- package/test-env/components/button/button_display/_button_display_content.js +8 -4
- package/test-env/components/button/button_display/_button_display_content.styles.js +4 -1
- package/test-env/components/button/button_empty/button_empty.js +10 -1
- package/test-env/components/card/card.js +2 -2
- package/test-env/components/card/card.styles.js +5 -2
- package/test-env/components/collapsible_nav/collapsible_nav.js +0 -5
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/test-env/components/expression/expression.js +12 -2
- package/test-env/components/header/header_links/header_link.js +10 -1
- package/test-env/components/image/image.js +6 -1
- package/test-env/components/image/image_fullscreen_wrapper.js +2 -3
- package/test-env/components/notification/notification_event.js +25 -16
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/overlay_mask/overlay_mask.js +27 -64
- package/test-env/components/overlay_mask/overlay_mask.styles.js +34 -0
- package/test-env/components/page/page_content/page_content.js +1 -2
- package/test-env/components/page/page_content/page_content_body.js +1 -2
- package/test-env/components/page/page_content/page_content_header.js +1 -2
- package/test-env/components/page/page_content/page_content_header_section.js +1 -2
- package/test-env/components/page/page_section/page_section.js +15 -3
- package/test-env/components/page/page_side_bar/page_side_bar.js +1 -2
- package/test-env/components/page/page_template.js +3 -1
- package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/test-env/components/page_template/page_template.js +18 -2
- package/test-env/components/pagination/pagination.js +18 -3
- package/test-env/components/pagination/pagination.styles.js +34 -0
- package/test-env/components/pagination/pagination_button.js +9 -4
- package/test-env/components/pagination/pagination_button.styles.js +45 -0
- package/test-env/components/pagination/pagination_button_arrow.js +7 -0
- package/test-env/components/popover/popover_title.js +2 -2
- package/test-env/components/popover/popover_title.styles.js +19 -7
- package/test-env/components/progress/progress.js +6 -1
- package/test-env/components/provider/cache/cache_provider.js +3 -11
- package/test-env/components/provider/provider.js +31 -6
- package/test-env/components/resizable_container/resizable_panel.js +6 -1
- package/test-env/components/search_bar/filters/custom_component_filter.js +29 -0
- package/test-env/components/search_bar/filters/filters.js +7 -0
- package/test-env/components/search_bar/query/ast.js +12 -0
- package/test-env/components/search_bar/query/ast_to_es_query_dsl.js +16 -11
- package/test-env/components/search_bar/query/query.js +17 -0
- package/test-env/components/search_bar/search_bar.js +4 -0
- package/test-env/components/search_bar/search_filters.js +4 -0
- package/test-env/components/selectable/selectable_list/selectable_list.js +2 -2
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +2 -2
- package/test-env/components/side_nav/side_nav.js +5 -0
- package/test-env/components/suggest/suggest.js +10 -1
- package/test-env/components/tool_tip/tool_tip.js +42 -64
- package/test-env/components/tool_tip/tool_tip.styles.js +125 -0
- package/test-env/components/tool_tip/tool_tip_anchor.js +84 -0
- package/test-env/components/tool_tip/tool_tip_arrow.js +35 -0
- package/test-env/components/tool_tip/tool_tip_popover.js +49 -89
- package/test-env/global_styling/index.js +13 -0
- package/test-env/global_styling/utility/animations.js +17 -0
- package/test-env/services/color/contrast.js +5 -1
- package/test-env/services/index.js +7 -0
- package/test-env/services/theme/context.js +4 -2
- package/test-env/services/theme/hooks.js +28 -0
- package/test-env/services/theme/index.js +12 -0
- package/test-env/services/theme/provider.js +23 -9
- package/src/components/badge/_badge.scss +0 -133
- package/src/components/call_out/_index.scss +0 -3
- package/src/components/call_out/_mixins.scss +0 -23
- package/src/components/call_out/_variables.scss +0 -7
- package/src/components/overlay_mask/_index.scss +0 -1
- package/src/components/overlay_mask/_overlay_mask.scss +0 -33
- package/src/components/pagination/_index.scss +0 -2
- package/src/components/pagination/_pagination.scss +0 -30
- package/src/components/pagination/_pagination_button.scss +0 -37
- package/src/components/tool_tip/_index.scss +0 -1
- package/src/components/tool_tip/_tool_tip.scss +0 -121
- package/src/themes/amsterdam/overrides/_overlay_mask.scss +0 -3
- package/src/themes/amsterdam/overrides/_tooltip.scss +0 -7
|
@@ -13,6 +13,8 @@ import classNames from 'classnames';
|
|
|
13
13
|
import { EuiButtonIcon } from '../button/button_icon';
|
|
14
14
|
import { keysOf } from '../common';
|
|
15
15
|
import { useEuiI18n } from '../i18n';
|
|
16
|
+
import { useEuiTheme } from '../../services';
|
|
17
|
+
import { euiPaginationButtonArrowStyles } from './pagination_button.styles';
|
|
16
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
19
|
var typeToIconTypeMap = {
|
|
18
20
|
first: 'arrowStart',
|
|
@@ -27,6 +29,8 @@ export var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
|
|
|
27
29
|
disabled = _ref.disabled,
|
|
28
30
|
ariaControls = _ref.ariaControls,
|
|
29
31
|
onClick = _ref.onClick;
|
|
32
|
+
var euiTheme = useEuiTheme();
|
|
33
|
+
var styles = euiPaginationButtonArrowStyles(euiTheme);
|
|
30
34
|
var labels = {
|
|
31
35
|
first: useEuiI18n('euiPaginationButtonArrow.firstPage', 'First page'),
|
|
32
36
|
previous: useEuiI18n('euiPaginationButtonArrow.previousPage', 'Previous page'),
|
|
@@ -41,6 +45,7 @@ export var EuiPaginationButtonArrow = function EuiPaginationButtonArrow(_ref) {
|
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
return ___EmotionJSX(EuiButtonIcon, _extends({
|
|
48
|
+
css: styles.euiPaginationArrowButton,
|
|
44
49
|
className: classNames('euiPaginationArrowButton', className),
|
|
45
50
|
color: "text",
|
|
46
51
|
"aria-label": labels[type],
|
|
@@ -31,9 +31,9 @@ export var EuiPopoverTitle = function EuiPopoverTitle(_ref) {
|
|
|
31
31
|
panelPadding = _useContext.paddingSize;
|
|
32
32
|
|
|
33
33
|
var euiTheme = useEuiTheme();
|
|
34
|
-
var styles = euiPopoverTitleStyles(euiTheme
|
|
34
|
+
var styles = euiPopoverTitleStyles(euiTheme);
|
|
35
35
|
var paddingStyles = useEuiPaddingCSS();
|
|
36
|
-
var cssStyles = [styles.euiPopoverTitle, // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
|
|
36
|
+
var cssStyles = [styles.euiPopoverTitle, styles.panelPaddingSizes[panelPadding], // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
|
|
37
37
|
paddingStyles[paddingSize || panelPadding]];
|
|
38
38
|
var classes = classNames('euiPopoverTitle', className);
|
|
39
39
|
return ___EmotionJSX("div", _extends({
|
|
@@ -8,13 +8,25 @@
|
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
9
|
import { euiPaddingSize, logicalCSS } from '../../global_styling';
|
|
10
10
|
import { euiTitle } from '../title/title.styles';
|
|
11
|
-
export var euiPopoverTitleStyles = function euiPopoverTitleStyles(euiThemeContext
|
|
12
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
13
|
-
// ensure the title expands to cover that padding and
|
|
14
|
-
|
|
15
|
-
var panelPaddingSize = euiPaddingSize(euiThemeContext, panelPadding);
|
|
11
|
+
export var euiPopoverTitleStyles = function euiPopoverTitleStyles(euiThemeContext) {
|
|
12
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
16
13
|
return {
|
|
17
14
|
// Base
|
|
18
|
-
euiPopoverTitle: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxs'), ";", logicalCSS('border-bottom', euiTheme.border.thin), "
|
|
15
|
+
euiPopoverTitle: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxs'), ";", logicalCSS('border-bottom', euiTheme.border.thin), ";;label:euiPopoverTitle;"),
|
|
16
|
+
// If the popover's containing panel has padding applied,
|
|
17
|
+
// ensure the title expands to cover that padding via negative margins
|
|
18
|
+
panelPaddingSizes: {
|
|
19
|
+
none: /*#__PURE__*/css(";label:none;"),
|
|
20
|
+
xs: /*#__PURE__*/css(getPaddingOffset(euiThemeContext, 'xs'), ";;label:xs;"),
|
|
21
|
+
s: /*#__PURE__*/css(getPaddingOffset(euiThemeContext, 's'), ";;label:s;"),
|
|
22
|
+
m: /*#__PURE__*/css(getPaddingOffset(euiThemeContext, 'm'), ";;label:m;"),
|
|
23
|
+
l: /*#__PURE__*/css(getPaddingOffset(euiThemeContext, 'l'), ";;label:l;"),
|
|
24
|
+
xl: /*#__PURE__*/css(getPaddingOffset(euiThemeContext, 'xl'), ";;label:xl;")
|
|
25
|
+
}
|
|
19
26
|
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var getPaddingOffset = function getPaddingOffset(euiThemeContext, size) {
|
|
30
|
+
var panelPaddingSize = euiPaddingSize(euiThemeContext, size);
|
|
31
|
+
return "margin: -".concat(panelPaddingSize, " -").concat(panelPaddingSize, " ").concat(panelPaddingSize, ";");
|
|
20
32
|
};
|
|
@@ -140,5 +140,10 @@ EuiProgress.propTypes = {
|
|
|
140
140
|
/**
|
|
141
141
|
* Object of props passed to the <span/> wrapping the determinate progress's label
|
|
142
142
|
*/
|
|
143
|
-
labelProps: PropTypes.
|
|
143
|
+
labelProps: PropTypes.shape({
|
|
144
|
+
className: PropTypes.string,
|
|
145
|
+
"aria-label": PropTypes.string,
|
|
146
|
+
"data-test-subj": PropTypes.string,
|
|
147
|
+
css: PropTypes.any
|
|
148
|
+
})
|
|
144
149
|
};
|
|
@@ -6,18 +6,12 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import createCache from '@emotion/cache';
|
|
10
9
|
import { CacheProvider } from '@emotion/react';
|
|
11
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
12
|
-
var defaultCache = createCache({
|
|
13
|
-
key: 'css'
|
|
14
|
-
});
|
|
15
|
-
defaultCache.compat = true;
|
|
16
11
|
export var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
17
|
-
var
|
|
18
|
-
cache = _ref$cache === void 0 ? defaultCache : _ref$cache,
|
|
12
|
+
var cache = _ref.cache,
|
|
19
13
|
children = _ref.children;
|
|
20
|
-
return ___EmotionJSX(CacheProvider, {
|
|
14
|
+
return children && cache ? ___EmotionJSX(CacheProvider, {
|
|
21
15
|
value: cache
|
|
22
|
-
}, children);
|
|
16
|
+
}, children) : ___EmotionJSX(React.Fragment, null, children);
|
|
23
17
|
};
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import createCache from '@emotion/cache';
|
|
9
10
|
import { EuiGlobalStyles } from '../../global_styling/reset/global_styles';
|
|
10
11
|
import { EuiUtilityClasses } from '../../global_styling/utility/utility';
|
|
11
12
|
import { EuiThemeProvider, CurrentEuiBreakpointProvider } from '../../services';
|
|
@@ -17,8 +18,15 @@ var isEmotionCacheObject = function isEmotionCacheObject(obj) {
|
|
|
17
18
|
return obj.hasOwnProperty('key');
|
|
18
19
|
};
|
|
19
20
|
|
|
21
|
+
var fallbackCache = createCache({
|
|
22
|
+
key: 'css'
|
|
23
|
+
});
|
|
24
|
+
fallbackCache.compat = true;
|
|
20
25
|
export var EuiProvider = function EuiProvider(_ref) {
|
|
21
|
-
var
|
|
26
|
+
var _defaultCache;
|
|
27
|
+
|
|
28
|
+
var _ref$cache = _ref.cache,
|
|
29
|
+
cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
|
|
22
30
|
_ref$theme = _ref.theme,
|
|
23
31
|
theme = _ref$theme === void 0 ? EuiThemeAmsterdam : _ref$theme,
|
|
24
32
|
_ref$globalStyles = _ref.globalStyles,
|
|
@@ -34,16 +42,31 @@ export var EuiProvider = function EuiProvider(_ref) {
|
|
|
34
42
|
|
|
35
43
|
if (cache) {
|
|
36
44
|
if (isEmotionCacheObject(cache)) {
|
|
45
|
+
cache.compat = true;
|
|
37
46
|
defaultCache = cache;
|
|
38
47
|
} else {
|
|
48
|
+
if (cache.default) {
|
|
49
|
+
cache.default.compat = true;
|
|
50
|
+
}
|
|
51
|
+
|
|
39
52
|
defaultCache = cache.default;
|
|
53
|
+
|
|
54
|
+
if (cache.global) {
|
|
55
|
+
cache.global.compat = true;
|
|
56
|
+
}
|
|
57
|
+
|
|
40
58
|
globalCache = cache.global;
|
|
59
|
+
|
|
60
|
+
if (cache.utility) {
|
|
61
|
+
cache.utility.compat = true;
|
|
62
|
+
}
|
|
63
|
+
|
|
41
64
|
utilityCache = cache.utility;
|
|
42
65
|
}
|
|
43
66
|
}
|
|
44
67
|
|
|
45
68
|
return ___EmotionJSX(EuiCacheProvider, {
|
|
46
|
-
cache: defaultCache
|
|
69
|
+
cache: (_defaultCache = defaultCache) !== null && _defaultCache !== void 0 ? _defaultCache : fallbackCache
|
|
47
70
|
}, ___EmotionJSX(EuiThemeProvider, {
|
|
48
71
|
theme: theme !== null && theme !== void 0 ? theme : undefined,
|
|
49
72
|
colorMode: colorMode,
|
|
@@ -331,7 +331,12 @@ EuiResizablePanel.propTypes = {
|
|
|
331
331
|
/**
|
|
332
332
|
* Props to add to the wrapping `.euiResizablePanel` div
|
|
333
333
|
*/
|
|
334
|
-
wrapperProps: PropTypes.
|
|
334
|
+
wrapperProps: PropTypes.shape({
|
|
335
|
+
className: PropTypes.string,
|
|
336
|
+
"aria-label": PropTypes.string,
|
|
337
|
+
"data-test-subj": PropTypes.string,
|
|
338
|
+
css: PropTypes.any
|
|
339
|
+
}),
|
|
335
340
|
|
|
336
341
|
/**
|
|
337
342
|
* Padding to add directly to the wrapping `.euiResizablePanel` div
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
10
|
+
export var CustomComponentFilter = function CustomComponentFilter(props) {
|
|
11
|
+
var CustomComponent = props.config.component;
|
|
12
|
+
return ___EmotionJSX(CustomComponent, {
|
|
13
|
+
query: props.query,
|
|
14
|
+
onChange: props.onChange
|
|
15
|
+
});
|
|
16
|
+
};
|
|
@@ -12,6 +12,7 @@ import { IsFilter } from './is_filter';
|
|
|
12
12
|
import { FieldValueSelectionFilter } from './field_value_selection_filter';
|
|
13
13
|
import { FieldValueToggleFilter } from './field_value_toggle_filter';
|
|
14
14
|
import { FieldValueToggleGroupFilter } from './field_value_toggle_group_filter';
|
|
15
|
+
import { CustomComponentFilter } from './custom_component_filter';
|
|
15
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
17
|
export var createFilter = function createFilter(index, config, query, onChange) {
|
|
17
18
|
var props = {
|
|
@@ -45,6 +46,11 @@ export var createFilter = function createFilter(index, config, query, onChange)
|
|
|
45
46
|
config: config
|
|
46
47
|
}));
|
|
47
48
|
|
|
49
|
+
case 'custom_component':
|
|
50
|
+
return ___EmotionJSX(CustomComponentFilter, _extends({}, props, {
|
|
51
|
+
config: config
|
|
52
|
+
}));
|
|
53
|
+
|
|
48
54
|
default:
|
|
49
55
|
// @ts-ignore TS knows that we've checked `config.type` exhaustively
|
|
50
56
|
throw new Error("Unknown search filter type [".concat(config.type, "]"));
|
|
@@ -543,6 +543,18 @@ export var _AST = /*#__PURE__*/function () {
|
|
|
543
543
|
return !Is.isInstance(clause) || clause.flag !== flag;
|
|
544
544
|
}));
|
|
545
545
|
}
|
|
546
|
+
}, {
|
|
547
|
+
key: "removeIsClauses",
|
|
548
|
+
value: function removeIsClauses() {
|
|
549
|
+
return new _AST(this._clauses.filter(function (clause) {
|
|
550
|
+
return !Is.isInstance(clause);
|
|
551
|
+
}));
|
|
552
|
+
}
|
|
553
|
+
}, {
|
|
554
|
+
key: "removeAllClauses",
|
|
555
|
+
value: function removeAllClauses() {
|
|
556
|
+
return new _AST();
|
|
557
|
+
}
|
|
546
558
|
}, {
|
|
547
559
|
key: "getGroupClauses",
|
|
548
560
|
value: function getGroupClauses() {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
2
2
|
|
|
3
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
|
|
3
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
6
|
|
|
5
7
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -12,8 +14,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
12
14
|
|
|
13
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
16
|
|
|
15
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
-
|
|
17
17
|
/*
|
|
18
18
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
19
19
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -21,11 +21,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
21
21
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
22
22
|
* Side Public License, v 1.
|
|
23
23
|
*/
|
|
24
|
-
import { printIso8601 } from './date_format';
|
|
25
|
-
import { isDateValue, dateValue } from './date_value';
|
|
26
|
-
import { AST } from './ast';
|
|
27
24
|
import { isArray, isDateLike, isString } from '../../../services/predicate';
|
|
28
25
|
import { keysOf } from '../../common';
|
|
26
|
+
import { AST } from './ast';
|
|
27
|
+
import { printIso8601 } from './date_format';
|
|
28
|
+
import { dateValue, isDateValue } from './date_value';
|
|
29
29
|
|
|
30
30
|
var processDateOperation = function processDateOperation(value, operator) {
|
|
31
31
|
var granularity = value.granularity,
|
|
@@ -115,12 +115,17 @@ export var _fieldValuesToQuery = function _fieldValuesToQuery(field, operations,
|
|
|
115
115
|
}
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
-
if (_terms.length >
|
|
118
|
+
if (_terms.length > 1) {
|
|
119
|
+
queries.push({
|
|
120
|
+
bool: _defineProperty({}, andOr === 'and' ? 'must' : 'should', _toConsumableArray(_terms.map(function (value) {
|
|
121
|
+
return {
|
|
122
|
+
match: _defineProperty({}, field, value)
|
|
123
|
+
};
|
|
124
|
+
})))
|
|
125
|
+
});
|
|
126
|
+
} else if (_terms.length === 1) {
|
|
119
127
|
queries.push({
|
|
120
|
-
match: _defineProperty({}, field,
|
|
121
|
-
query: _terms.join(' '),
|
|
122
|
-
operator: andOr
|
|
123
|
-
})
|
|
128
|
+
match: _defineProperty({}, field, _terms[0])
|
|
124
129
|
});
|
|
125
130
|
}
|
|
126
131
|
|
|
@@ -44,6 +44,11 @@ export var Query = /*#__PURE__*/function () {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
_createClass(Query, [{
|
|
47
|
+
key: "hasClauses",
|
|
48
|
+
value: function hasClauses() {
|
|
49
|
+
return this.ast.clauses.length > 0;
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
47
52
|
key: "hasSimpleFieldClause",
|
|
48
53
|
value: function hasSimpleFieldClause(field, value) {
|
|
49
54
|
return this.ast.hasSimpleFieldClause(field, value);
|
|
@@ -103,6 +108,12 @@ export var Query = /*#__PURE__*/function () {
|
|
|
103
108
|
var ast = this.ast.removeOrFieldClauses(field);
|
|
104
109
|
return new Query(ast, this.syntax);
|
|
105
110
|
}
|
|
111
|
+
}, {
|
|
112
|
+
key: "removeAllClauses",
|
|
113
|
+
value: function removeAllClauses() {
|
|
114
|
+
var ast = this.ast.removeAllClauses();
|
|
115
|
+
return new Query(ast, this.syntax);
|
|
116
|
+
}
|
|
106
117
|
}, {
|
|
107
118
|
key: "hasIsClause",
|
|
108
119
|
value: function hasIsClause(flag) {
|
|
@@ -131,6 +142,12 @@ export var Query = /*#__PURE__*/function () {
|
|
|
131
142
|
var ast = this.ast.removeIsClause(flag);
|
|
132
143
|
return new Query(ast, this.syntax);
|
|
133
144
|
}
|
|
145
|
+
}, {
|
|
146
|
+
key: "removeIsClauses",
|
|
147
|
+
value: function removeIsClauses() {
|
|
148
|
+
var ast = this.ast.removeIsClauses();
|
|
149
|
+
return new Query(ast, this.syntax);
|
|
150
|
+
}
|
|
134
151
|
/**
|
|
135
152
|
* Executes this query over the given iterable item and returns
|
|
136
153
|
* an new array of all items that matched this query. Options:
|
|
@@ -412,6 +412,10 @@ EuiSearchBar.propTypes = {
|
|
|
412
412
|
operator: PropTypes.oneOf(["eq", "exact", "gt", "gte", "lt", "lte"])
|
|
413
413
|
}).isRequired).isRequired,
|
|
414
414
|
available: PropTypes.func
|
|
415
|
+
}).isRequired, PropTypes.shape({
|
|
416
|
+
type: PropTypes.oneOf(["custom_component"]).isRequired,
|
|
417
|
+
component: PropTypes.elementType.isRequired,
|
|
418
|
+
available: PropTypes.func
|
|
415
419
|
}).isRequired]).isRequired),
|
|
416
420
|
|
|
417
421
|
/**
|
|
@@ -156,5 +156,9 @@ EuiSearchFilters.propTypes = {
|
|
|
156
156
|
operator: PropTypes.oneOf(["eq", "exact", "gt", "gte", "lt", "lte"])
|
|
157
157
|
}).isRequired).isRequired,
|
|
158
158
|
available: PropTypes.func
|
|
159
|
+
}).isRequired, PropTypes.shape({
|
|
160
|
+
type: PropTypes.oneOf(["custom_component"]).isRequired,
|
|
161
|
+
component: PropTypes.elementType.isRequired,
|
|
162
|
+
available: PropTypes.func
|
|
159
163
|
}).isRequired]).isRequired).isRequired
|
|
160
164
|
};
|
|
@@ -438,12 +438,12 @@ EuiSelectableList.propTypes = {
|
|
|
438
438
|
/**
|
|
439
439
|
* The side of the badge the icon should sit
|
|
440
440
|
*/
|
|
441
|
-
iconSide: PropTypes.
|
|
441
|
+
iconSide: PropTypes.any,
|
|
442
442
|
|
|
443
443
|
/**
|
|
444
444
|
* Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
|
|
445
445
|
*/
|
|
446
|
-
color: PropTypes.oneOfType([PropTypes.
|
|
446
|
+
color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
449
|
* Will override any color passed through the `color` prop.
|
|
@@ -272,12 +272,12 @@ EuiSelectableListItem.propTypes = {
|
|
|
272
272
|
/**
|
|
273
273
|
* The side of the badge the icon should sit
|
|
274
274
|
*/
|
|
275
|
-
iconSide: PropTypes.
|
|
275
|
+
iconSide: PropTypes.any,
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
278
|
* Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
|
|
279
279
|
*/
|
|
280
|
-
color: PropTypes.oneOfType([PropTypes.
|
|
280
|
+
color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
|
|
281
281
|
|
|
282
282
|
/**
|
|
283
283
|
* Will override any color passed through the `color` prop.
|
|
@@ -255,6 +255,11 @@ EuiSideNav.propTypes = {
|
|
|
255
255
|
* Adds a couple extra #EuiSideNavHeading props and extends the props of EuiTitle that wraps the `heading`
|
|
256
256
|
*/
|
|
257
257
|
headingProps: PropTypes.shape({
|
|
258
|
+
className: PropTypes.string,
|
|
259
|
+
"aria-label": PropTypes.string,
|
|
260
|
+
"data-test-subj": PropTypes.string,
|
|
261
|
+
css: PropTypes.any,
|
|
262
|
+
|
|
258
263
|
/**
|
|
259
264
|
* The actual HTML heading element to wrap the `heading`.
|
|
260
265
|
* Default is `h2`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["onItemClick", "onBlur", "onFocus", "onInput", "onSearch", "status", "append", "tooltipContent", "suggestions", "id", "aria-label", "aria-labelledby", "isVirtualized", "fullWidth", "maxHeight"];
|
|
1
|
+
var _excluded = ["onItemClick", "onBlur", "onFocus", "onInput", "onSearch", "status", "append", "tooltipContent", "suggestions", "id", "aria-label", "aria-labelledby", "isPreFiltered", "isVirtualized", "fullWidth", "maxHeight"];
|
|
2
2
|
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
@@ -72,6 +72,8 @@ export var EuiSuggest = function EuiSuggest(_ref) {
|
|
|
72
72
|
id = _ref.id,
|
|
73
73
|
ariaLabel = _ref['aria-label'],
|
|
74
74
|
labelId = _ref['aria-labelledby'],
|
|
75
|
+
_ref$isPreFiltered = _ref.isPreFiltered,
|
|
76
|
+
isPreFiltered = _ref$isPreFiltered === void 0 ? false : _ref$isPreFiltered,
|
|
75
77
|
_ref$isVirtualized = _ref.isVirtualized,
|
|
76
78
|
isVirtualized = _ref$isVirtualized === void 0 ? false : _ref$isVirtualized,
|
|
77
79
|
_ref$fullWidth = _ref.fullWidth,
|
|
@@ -238,6 +240,7 @@ export var EuiSuggest = function EuiSuggest(_ref) {
|
|
|
238
240
|
isVirtualized: isVirtualized
|
|
239
241
|
},
|
|
240
242
|
searchable: true,
|
|
243
|
+
isPreFiltered: isPreFiltered,
|
|
241
244
|
searchProps: _objectSpread({
|
|
242
245
|
id: id,
|
|
243
246
|
append: appendArray.length ? appendArray : undefined,
|
|
@@ -363,5 +366,11 @@ EuiSuggest.propTypes = {
|
|
|
363
366
|
* Default is `60vh`
|
|
364
367
|
*/
|
|
365
368
|
maxHeight: PropTypes.any,
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Control whether or not options get filtered internally or if consumer will filter.
|
|
372
|
+
* Default `false`
|
|
373
|
+
*/
|
|
374
|
+
isPreFiltered: PropTypes.bool,
|
|
366
375
|
"aria-labelledby": PropTypes.oneOfType([PropTypes.string, PropTypes.string.isRequired])
|
|
367
376
|
};
|
|
@@ -2,10 +2,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2
2
|
|
|
3
3
|
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display"];
|
|
4
4
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
-
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
-
|
|
9
5
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10
6
|
|
|
11
7
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -41,11 +37,13 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
41
37
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
42
38
|
* Side Public License, v 1.
|
|
43
39
|
*/
|
|
44
|
-
import React, { Component
|
|
40
|
+
import React, { Component } from 'react';
|
|
45
41
|
import PropTypes from "prop-types";
|
|
46
42
|
import classNames from 'classnames';
|
|
47
43
|
import { keysOf } from '../common';
|
|
48
44
|
import { EuiPortal } from '../portal';
|
|
45
|
+
import { EuiToolTipAnchor } from './tool_tip_anchor';
|
|
46
|
+
import { EuiToolTipArrow } from './tool_tip_arrow';
|
|
49
47
|
import { EuiToolTipPopover } from './tool_tip_popover';
|
|
50
48
|
import { enqueueStateChange } from '../../services/react';
|
|
51
49
|
import { findPopoverPosition, htmlIdGenerator } from '../../services';
|
|
@@ -132,16 +130,12 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
132
130
|
}
|
|
133
131
|
});
|
|
134
132
|
|
|
133
|
+
_defineProperty(_assertThisInitialized(_this), "setAnchorRef", function (ref) {
|
|
134
|
+
return _this.anchor = ref;
|
|
135
|
+
});
|
|
136
|
+
|
|
135
137
|
_defineProperty(_assertThisInitialized(_this), "setPopoverRef", function (ref) {
|
|
136
|
-
_this.popover = ref;
|
|
137
|
-
// any previous knowledge about its size
|
|
138
|
-
|
|
139
|
-
if (ref == null) {
|
|
140
|
-
_this.setState({
|
|
141
|
-
toolTipStyles: DEFAULT_TOOLTIP_STYLES,
|
|
142
|
-
arrowStyles: undefined
|
|
143
|
-
});
|
|
144
|
-
}
|
|
138
|
+
return _this.popover = ref;
|
|
145
139
|
});
|
|
146
140
|
|
|
147
141
|
_defineProperty(_assertThisInitialized(_this), "showToolTip", function () {
|
|
@@ -207,7 +201,9 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
207
201
|
enqueueStateChange(function () {
|
|
208
202
|
if (_this._isMounted) {
|
|
209
203
|
_this.setState({
|
|
210
|
-
visible: false
|
|
204
|
+
visible: false,
|
|
205
|
+
toolTipStyles: DEFAULT_TOOLTIP_STYLES,
|
|
206
|
+
arrowStyles: undefined
|
|
211
207
|
});
|
|
212
208
|
}
|
|
213
209
|
});
|
|
@@ -267,8 +263,6 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
267
263
|
}, {
|
|
268
264
|
key: "render",
|
|
269
265
|
value: function render() {
|
|
270
|
-
var _this2 = this;
|
|
271
|
-
|
|
272
266
|
var _this$props = this.props,
|
|
273
267
|
children = _this$props.children,
|
|
274
268
|
className = _this$props.className,
|
|
@@ -284,57 +278,39 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
284
278
|
arrowStyles = _this$state.arrowStyles,
|
|
285
279
|
id = _this$state.id,
|
|
286
280
|
toolTipStyles = _this$state.toolTipStyles,
|
|
287
|
-
visible = _this$state.visible
|
|
281
|
+
visible = _this$state.visible,
|
|
282
|
+
calculatedPosition = _this$state.calculatedPosition;
|
|
288
283
|
var classes = classNames('euiToolTip', positionsToClassNameMap[this.state.calculatedPosition], className);
|
|
289
|
-
var anchorClasses = classNames(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
className: classes,
|
|
295
|
-
style: toolTipStyles,
|
|
296
|
-
positionToolTip: this.positionToolTip,
|
|
297
|
-
popoverRef: this.setPopoverRef,
|
|
298
|
-
title: title,
|
|
299
|
-
id: id,
|
|
300
|
-
role: "tooltip"
|
|
301
|
-
}, rest), ___EmotionJSX("div", {
|
|
302
|
-
style: arrowStyles,
|
|
303
|
-
className: "euiToolTip__arrow"
|
|
304
|
-
}), ___EmotionJSX(EuiResizeObserver, {
|
|
305
|
-
onResize: this.positionToolTip
|
|
306
|
-
}, function (resizeRef) {
|
|
307
|
-
return ___EmotionJSX("div", {
|
|
308
|
-
ref: resizeRef
|
|
309
|
-
}, content);
|
|
310
|
-
})));
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
var anchor = // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
314
|
-
___EmotionJSX("span", _extends({
|
|
315
|
-
ref: function ref(anchor) {
|
|
316
|
-
return _this2.anchor = anchor;
|
|
317
|
-
}
|
|
318
|
-
}, anchorProps, {
|
|
319
|
-
className: anchorClasses,
|
|
284
|
+
var anchorClasses = classNames(anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
285
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiToolTipAnchor, _extends({}, anchorProps, {
|
|
286
|
+
ref: this.setAnchorRef,
|
|
287
|
+
onBlur: this.onBlur,
|
|
288
|
+
onFocus: this.onFocus,
|
|
320
289
|
onMouseOver: this.showToolTip,
|
|
321
|
-
onMouseOut: this.onMouseOut
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
})
|
|
336
|
-
|
|
337
|
-
|
|
290
|
+
onMouseOut: this.onMouseOut,
|
|
291
|
+
id: this.state.id,
|
|
292
|
+
className: anchorClasses,
|
|
293
|
+
display: display,
|
|
294
|
+
isVisible: visible
|
|
295
|
+
}), children), visible && (content || title) && ___EmotionJSX(EuiPortal, null, ___EmotionJSX(EuiToolTipPopover, _extends({
|
|
296
|
+
className: classes,
|
|
297
|
+
style: toolTipStyles,
|
|
298
|
+
positionToolTip: this.positionToolTip,
|
|
299
|
+
popoverRef: this.setPopoverRef,
|
|
300
|
+
title: title,
|
|
301
|
+
id: id,
|
|
302
|
+
role: "tooltip",
|
|
303
|
+
calculatedPosition: calculatedPosition
|
|
304
|
+
}, rest), ___EmotionJSX(EuiToolTipArrow, {
|
|
305
|
+
style: arrowStyles,
|
|
306
|
+
className: "euiToolTip__arrow"
|
|
307
|
+
}), ___EmotionJSX(EuiResizeObserver, {
|
|
308
|
+
onResize: this.positionToolTip
|
|
309
|
+
}, function (resizeRef) {
|
|
310
|
+
return ___EmotionJSX("div", {
|
|
311
|
+
ref: resizeRef
|
|
312
|
+
}, content);
|
|
313
|
+
}))));
|
|
338
314
|
}
|
|
339
315
|
}]);
|
|
340
316
|
|