@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
|
|
4
4
|
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; } } }; }
|
|
5
5
|
|
|
@@ -14,11 +14,11 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
14
14
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
|
-
import { printIso8601 } from './date_format';
|
|
18
|
-
import { isDateValue, dateValue } from './date_value';
|
|
19
|
-
import { AST } from './ast';
|
|
20
17
|
import { isArray, isDateLike, isString } from '../../../services/predicate';
|
|
21
18
|
import { keysOf } from '../../common';
|
|
19
|
+
import { AST } from './ast';
|
|
20
|
+
import { printIso8601 } from './date_format';
|
|
21
|
+
import { dateValue, isDateValue } from './date_value';
|
|
22
22
|
|
|
23
23
|
var processDateOperation = function processDateOperation(value, operator) {
|
|
24
24
|
var granularity = value.granularity,
|
|
@@ -108,12 +108,17 @@ export var _fieldValuesToQuery = function _fieldValuesToQuery(field, operations,
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
if (_terms.length >
|
|
111
|
+
if (_terms.length > 1) {
|
|
112
|
+
queries.push({
|
|
113
|
+
bool: _defineProperty({}, andOr === 'and' ? 'must' : 'should', _toConsumableArray(_terms.map(function (value) {
|
|
114
|
+
return {
|
|
115
|
+
match: _defineProperty({}, field, value)
|
|
116
|
+
};
|
|
117
|
+
})))
|
|
118
|
+
});
|
|
119
|
+
} else if (_terms.length === 1) {
|
|
112
120
|
queries.push({
|
|
113
|
-
match: _defineProperty({}, field,
|
|
114
|
-
query: _terms.join(' '),
|
|
115
|
-
operator: andOr
|
|
116
|
-
})
|
|
121
|
+
match: _defineProperty({}, field, _terms[0])
|
|
117
122
|
});
|
|
118
123
|
}
|
|
119
124
|
|
|
@@ -40,6 +40,11 @@ export var Query = /*#__PURE__*/function () {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
_createClass(Query, [{
|
|
43
|
+
key: "hasClauses",
|
|
44
|
+
value: function hasClauses() {
|
|
45
|
+
return this.ast.clauses.length > 0;
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
43
48
|
key: "hasSimpleFieldClause",
|
|
44
49
|
value: function hasSimpleFieldClause(field, value) {
|
|
45
50
|
return this.ast.hasSimpleFieldClause(field, value);
|
|
@@ -99,6 +104,12 @@ export var Query = /*#__PURE__*/function () {
|
|
|
99
104
|
var ast = this.ast.removeOrFieldClauses(field);
|
|
100
105
|
return new Query(ast, this.syntax);
|
|
101
106
|
}
|
|
107
|
+
}, {
|
|
108
|
+
key: "removeAllClauses",
|
|
109
|
+
value: function removeAllClauses() {
|
|
110
|
+
var ast = this.ast.removeAllClauses();
|
|
111
|
+
return new Query(ast, this.syntax);
|
|
112
|
+
}
|
|
102
113
|
}, {
|
|
103
114
|
key: "hasIsClause",
|
|
104
115
|
value: function hasIsClause(flag) {
|
|
@@ -127,6 +138,12 @@ export var Query = /*#__PURE__*/function () {
|
|
|
127
138
|
var ast = this.ast.removeIsClause(flag);
|
|
128
139
|
return new Query(ast, this.syntax);
|
|
129
140
|
}
|
|
141
|
+
}, {
|
|
142
|
+
key: "removeIsClauses",
|
|
143
|
+
value: function removeIsClauses() {
|
|
144
|
+
var ast = this.ast.removeIsClauses();
|
|
145
|
+
return new Query(ast, this.syntax);
|
|
146
|
+
}
|
|
130
147
|
/**
|
|
131
148
|
* Executes this query over the given iterable item and returns
|
|
132
149
|
* an new array of all items that matched this query. Options:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["onItemClick", "onBlur", "onFocus", "onInput", "onSearch", "status", "append", "tooltipContent", "suggestions", "id", "aria-label", "aria-labelledby", "isVirtualized", "fullWidth", "maxHeight"];
|
|
4
|
+
var _excluded = ["onItemClick", "onBlur", "onFocus", "onInput", "onSearch", "status", "append", "tooltipContent", "suggestions", "id", "aria-label", "aria-labelledby", "isPreFiltered", "isVirtualized", "fullWidth", "maxHeight"];
|
|
5
5
|
|
|
6
6
|
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; }
|
|
7
7
|
|
|
@@ -56,6 +56,8 @@ export var EuiSuggest = function EuiSuggest(_ref) {
|
|
|
56
56
|
id = _ref.id,
|
|
57
57
|
ariaLabel = _ref['aria-label'],
|
|
58
58
|
labelId = _ref['aria-labelledby'],
|
|
59
|
+
_ref$isPreFiltered = _ref.isPreFiltered,
|
|
60
|
+
isPreFiltered = _ref$isPreFiltered === void 0 ? false : _ref$isPreFiltered,
|
|
59
61
|
_ref$isVirtualized = _ref.isVirtualized,
|
|
60
62
|
isVirtualized = _ref$isVirtualized === void 0 ? false : _ref$isVirtualized,
|
|
61
63
|
_ref$fullWidth = _ref.fullWidth,
|
|
@@ -222,6 +224,7 @@ export var EuiSuggest = function EuiSuggest(_ref) {
|
|
|
222
224
|
isVirtualized: isVirtualized
|
|
223
225
|
},
|
|
224
226
|
searchable: true,
|
|
227
|
+
isPreFiltered: isPreFiltered,
|
|
225
228
|
searchProps: _objectSpread({
|
|
226
229
|
id: id,
|
|
227
230
|
append: appendArray.length ? appendArray : undefined,
|
|
@@ -9,10 +9,6 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
10
|
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display"];
|
|
11
11
|
|
|
12
|
-
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; }
|
|
13
|
-
|
|
14
|
-
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; }
|
|
15
|
-
|
|
16
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
17
13
|
|
|
18
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -24,10 +20,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
24
20
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
25
21
|
* Side Public License, v 1.
|
|
26
22
|
*/
|
|
27
|
-
import React, { Component
|
|
23
|
+
import React, { Component } from 'react';
|
|
28
24
|
import classNames from 'classnames';
|
|
29
25
|
import { keysOf } from '../common';
|
|
30
26
|
import { EuiPortal } from '../portal';
|
|
27
|
+
import { EuiToolTipAnchor } from './tool_tip_anchor';
|
|
28
|
+
import { EuiToolTipArrow } from './tool_tip_arrow';
|
|
31
29
|
import { EuiToolTipPopover } from './tool_tip_popover';
|
|
32
30
|
import { enqueueStateChange } from '../../services/react';
|
|
33
31
|
import { findPopoverPosition, htmlIdGenerator } from '../../services';
|
|
@@ -114,16 +112,12 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
114
112
|
}
|
|
115
113
|
});
|
|
116
114
|
|
|
115
|
+
_defineProperty(_assertThisInitialized(_this), "setAnchorRef", function (ref) {
|
|
116
|
+
return _this.anchor = ref;
|
|
117
|
+
});
|
|
118
|
+
|
|
117
119
|
_defineProperty(_assertThisInitialized(_this), "setPopoverRef", function (ref) {
|
|
118
|
-
_this.popover = ref;
|
|
119
|
-
// any previous knowledge about its size
|
|
120
|
-
|
|
121
|
-
if (ref == null) {
|
|
122
|
-
_this.setState({
|
|
123
|
-
toolTipStyles: DEFAULT_TOOLTIP_STYLES,
|
|
124
|
-
arrowStyles: undefined
|
|
125
|
-
});
|
|
126
|
-
}
|
|
120
|
+
return _this.popover = ref;
|
|
127
121
|
});
|
|
128
122
|
|
|
129
123
|
_defineProperty(_assertThisInitialized(_this), "showToolTip", function () {
|
|
@@ -189,7 +183,9 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
189
183
|
enqueueStateChange(function () {
|
|
190
184
|
if (_this._isMounted) {
|
|
191
185
|
_this.setState({
|
|
192
|
-
visible: false
|
|
186
|
+
visible: false,
|
|
187
|
+
toolTipStyles: DEFAULT_TOOLTIP_STYLES,
|
|
188
|
+
arrowStyles: undefined
|
|
193
189
|
});
|
|
194
190
|
}
|
|
195
191
|
});
|
|
@@ -249,8 +245,6 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
249
245
|
}, {
|
|
250
246
|
key: "render",
|
|
251
247
|
value: function render() {
|
|
252
|
-
var _this2 = this;
|
|
253
|
-
|
|
254
248
|
var _this$props = this.props,
|
|
255
249
|
children = _this$props.children,
|
|
256
250
|
className = _this$props.className,
|
|
@@ -266,57 +260,39 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
266
260
|
arrowStyles = _this$state.arrowStyles,
|
|
267
261
|
id = _this$state.id,
|
|
268
262
|
toolTipStyles = _this$state.toolTipStyles,
|
|
269
|
-
visible = _this$state.visible
|
|
263
|
+
visible = _this$state.visible,
|
|
264
|
+
calculatedPosition = _this$state.calculatedPosition;
|
|
270
265
|
var classes = classNames('euiToolTip', positionsToClassNameMap[this.state.calculatedPosition], className);
|
|
271
|
-
var anchorClasses = classNames(
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
className: classes,
|
|
277
|
-
style: toolTipStyles,
|
|
278
|
-
positionToolTip: this.positionToolTip,
|
|
279
|
-
popoverRef: this.setPopoverRef,
|
|
280
|
-
title: title,
|
|
281
|
-
id: id,
|
|
282
|
-
role: "tooltip"
|
|
283
|
-
}, rest), ___EmotionJSX("div", {
|
|
284
|
-
style: arrowStyles,
|
|
285
|
-
className: "euiToolTip__arrow"
|
|
286
|
-
}), ___EmotionJSX(EuiResizeObserver, {
|
|
287
|
-
onResize: this.positionToolTip
|
|
288
|
-
}, function (resizeRef) {
|
|
289
|
-
return ___EmotionJSX("div", {
|
|
290
|
-
ref: resizeRef
|
|
291
|
-
}, content);
|
|
292
|
-
})));
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
var anchor = // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
296
|
-
___EmotionJSX("span", _extends({
|
|
297
|
-
ref: function ref(anchor) {
|
|
298
|
-
return _this2.anchor = anchor;
|
|
299
|
-
}
|
|
300
|
-
}, anchorProps, {
|
|
301
|
-
className: anchorClasses,
|
|
266
|
+
var anchorClasses = classNames(anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
267
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiToolTipAnchor, _extends({}, anchorProps, {
|
|
268
|
+
ref: this.setAnchorRef,
|
|
269
|
+
onBlur: this.onBlur,
|
|
270
|
+
onFocus: this.onFocus,
|
|
302
271
|
onMouseOver: this.showToolTip,
|
|
303
|
-
onMouseOut: this.onMouseOut
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
})
|
|
318
|
-
|
|
319
|
-
|
|
272
|
+
onMouseOut: this.onMouseOut,
|
|
273
|
+
id: this.state.id,
|
|
274
|
+
className: anchorClasses,
|
|
275
|
+
display: display,
|
|
276
|
+
isVisible: visible
|
|
277
|
+
}), children), visible && (content || title) && ___EmotionJSX(EuiPortal, null, ___EmotionJSX(EuiToolTipPopover, _extends({
|
|
278
|
+
className: classes,
|
|
279
|
+
style: toolTipStyles,
|
|
280
|
+
positionToolTip: this.positionToolTip,
|
|
281
|
+
popoverRef: this.setPopoverRef,
|
|
282
|
+
title: title,
|
|
283
|
+
id: id,
|
|
284
|
+
role: "tooltip",
|
|
285
|
+
calculatedPosition: calculatedPosition
|
|
286
|
+
}, rest), ___EmotionJSX(EuiToolTipArrow, {
|
|
287
|
+
style: arrowStyles,
|
|
288
|
+
className: "euiToolTip__arrow"
|
|
289
|
+
}), ___EmotionJSX(EuiResizeObserver, {
|
|
290
|
+
onResize: this.positionToolTip
|
|
291
|
+
}, function (resizeRef) {
|
|
292
|
+
return ___EmotionJSX("div", {
|
|
293
|
+
ref: resizeRef
|
|
294
|
+
}, content);
|
|
295
|
+
}))));
|
|
320
296
|
}
|
|
321
297
|
}]);
|
|
322
298
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
|
+
|
|
5
|
+
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)."; }
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
import { css, keyframes } from '@emotion/react';
|
|
15
|
+
import { logicalCSS, logicalSizeCSS, euiFontSize } from '../../global_styling';
|
|
16
|
+
import { COLOR_MODES_STANDARD, tint, shade } from '../../services';
|
|
17
|
+
import { euiShadow } from '../../themes/amsterdam';
|
|
18
|
+
export var euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
|
|
19
|
+
return colorMode === COLOR_MODES_STANDARD.dark ? shade(euiTheme.colors.emptyShade, 1) : tint(euiTheme.colors.fullShade, 0.25);
|
|
20
|
+
};
|
|
21
|
+
export var euiToolTipBorderColor = function euiToolTipBorderColor(euiTheme, colorMode) {
|
|
22
|
+
return colorMode === COLOR_MODES_STANDARD.dark ? shade(euiTheme.colors.fullShade, 0.8) : tint(euiTheme.colors.fullShade, 0.35);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var euiToolTipAnimationVertical = function euiToolTipAnimationVertical(size) {
|
|
26
|
+
return keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateY(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])), size);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var euiToolTipAnimationHorizontal = function euiToolTipAnimationHorizontal(size) {
|
|
30
|
+
return keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n"])), size);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export var euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
|
|
34
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
35
|
+
colorMode = euiThemeContext.colorMode;
|
|
36
|
+
var animationTiming = "".concat(euiTheme.animation.slow, " ease-out 0s forwards");
|
|
37
|
+
/*
|
|
38
|
+
* 1. Shift arrow 1px more than half its size to account for border radius
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
var arrowSize = euiTheme.size.m;
|
|
42
|
+
var arrowSizeInt = parseInt(arrowSize, 10);
|
|
43
|
+
var arrowPlusSize = "".concat((arrowSizeInt / 2 + 1) * -1, "px");
|
|
44
|
+
/* 1 */
|
|
45
|
+
|
|
46
|
+
var arrowMinusSize = "".concat((arrowSizeInt / 2 - 1) * -1, "px");
|
|
47
|
+
/* 1 */
|
|
48
|
+
|
|
49
|
+
return {
|
|
50
|
+
// Base
|
|
51
|
+
euiToolTip: /*#__PURE__*/css(euiShadow(euiThemeContext), ";border-radius:", euiTheme.border.radius.medium, ";background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";color:", euiTheme.colors.ghost, ";z-index:", euiTheme.levels.toast, ";", logicalCSS('max-width', '256px'), " overflow-wrap:break-word;padding:", euiTheme.size.s, ";", euiFontSize(euiThemeContext, 's'), ";position:absolute;[class*='euiHorizontalRule']{background-color:", euiToolTipBorderColor(euiTheme, colorMode), ";};label:euiToolTip;"),
|
|
52
|
+
// Sizes
|
|
53
|
+
s: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";;label:s;"),
|
|
54
|
+
// Positions
|
|
55
|
+
top: /*#__PURE__*/css("animation:", euiToolTipAnimationVertical("-".concat(euiTheme.size.base)), " ", animationTiming, ";;label:top;"),
|
|
56
|
+
bottom: /*#__PURE__*/css("animation:", euiToolTipAnimationVertical(euiTheme.size.base), " ", animationTiming, ";[class*='euiToolTip__arrow']{transform:translateY(", arrowMinusSize, ") rotateZ(45deg);};label:bottom;"),
|
|
57
|
+
left: /*#__PURE__*/css("animation:", euiToolTipAnimationHorizontal("-".concat(euiTheme.size.base)), " ", animationTiming, ";[class*='euiToolTip__arrow']{transform:translateX(", arrowPlusSize, ") rotateZ(45deg);};label:left;"),
|
|
58
|
+
right: /*#__PURE__*/css("animation:", euiToolTipAnimationHorizontal(euiTheme.size.base), " ", animationTiming, ";[class*='euiToolTip__arrow']{transform:translateX(", arrowMinusSize, ") rotateZ(45deg);};label:right;"),
|
|
59
|
+
// Elements
|
|
60
|
+
euiToolTip__arrow: /*#__PURE__*/css("content:'';position:absolute;transform-origin:center;border-radius:2px;background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";", logicalSizeCSS(arrowSize, arrowSize), ";transform:translateY(", arrowPlusSize, ") rotateZ(45deg);;label:euiToolTip__arrow;")
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export var euiToolTipPopoverStyles = function euiToolTipPopoverStyles(_ref4) {
|
|
64
|
+
var euiTheme = _ref4.euiTheme,
|
|
65
|
+
colorMode = _ref4.colorMode;
|
|
66
|
+
return {
|
|
67
|
+
// Elements
|
|
68
|
+
euiToolTip__title: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.bold, ";", logicalCSS('border-bottom', "solid ".concat(euiTheme.border.width.thin, " ").concat(euiToolTipBorderColor(euiTheme, colorMode))), ";", logicalCSS('padding-bottom', euiTheme.size.xs), ";", logicalCSS('margin-bottom', euiTheme.size.xs), ";;label:euiToolTip__title;")
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
73
|
+
name: "fzilnk-inlineBlock",
|
|
74
|
+
styles: "display:inline-block;label:inlineBlock;"
|
|
75
|
+
} : {
|
|
76
|
+
name: "fzilnk-inlineBlock",
|
|
77
|
+
styles: "display:inline-block;label:inlineBlock;",
|
|
78
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
82
|
+
name: "14aceuy-block",
|
|
83
|
+
styles: "display:block;label:block;"
|
|
84
|
+
} : {
|
|
85
|
+
name: "14aceuy-block",
|
|
86
|
+
styles: "display:block;label:block;",
|
|
87
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
91
|
+
name: "1s3i3p5-euiToolTipAnchor",
|
|
92
|
+
styles: "*[disabled]{pointer-events:none;};label:euiToolTipAnchor;"
|
|
93
|
+
} : {
|
|
94
|
+
name: "1s3i3p5-euiToolTipAnchor",
|
|
95
|
+
styles: "*[disabled]{pointer-events:none;};label:euiToolTipAnchor;",
|
|
96
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export var euiToolTipAnchorStyles = function euiToolTipAnchorStyles() {
|
|
100
|
+
return {
|
|
101
|
+
// Elements
|
|
102
|
+
euiToolTipAnchor: _ref3,
|
|
103
|
+
// Variants
|
|
104
|
+
block: _ref2,
|
|
105
|
+
inlineBlock: _ref
|
|
106
|
+
};
|
|
107
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["onBlur", "onFocus", "onMouseOver", "onMouseOut", "id", "className", "children", "display", "isVisible"];
|
|
5
|
+
|
|
6
|
+
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; }
|
|
7
|
+
|
|
8
|
+
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; }
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
import React, { cloneElement, forwardRef } from 'react';
|
|
18
|
+
import classNames from 'classnames';
|
|
19
|
+
import { euiToolTipAnchorStyles } from './tool_tip.styles';
|
|
20
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
|
+
export var EuiToolTipAnchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
22
|
+
var _onBlur = _ref.onBlur,
|
|
23
|
+
_onFocus = _ref.onFocus,
|
|
24
|
+
onMouseOver = _ref.onMouseOver,
|
|
25
|
+
onMouseOut = _ref.onMouseOut,
|
|
26
|
+
id = _ref.id,
|
|
27
|
+
className = _ref.className,
|
|
28
|
+
children = _ref.children,
|
|
29
|
+
display = _ref.display,
|
|
30
|
+
isVisible = _ref.isVisible,
|
|
31
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
|
|
33
|
+
var anchorCss = euiToolTipAnchorStyles();
|
|
34
|
+
var cssStyles = [anchorCss.euiToolTipAnchor, anchorCss[display]];
|
|
35
|
+
var classes = classNames('euiToolTipAnchor', className);
|
|
36
|
+
return (// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
37
|
+
___EmotionJSX("span", _extends({
|
|
38
|
+
ref: ref
|
|
39
|
+
}, rest, {
|
|
40
|
+
css: cssStyles,
|
|
41
|
+
className: classes,
|
|
42
|
+
onMouseOver: onMouseOver,
|
|
43
|
+
onMouseOut: onMouseOut
|
|
44
|
+
}), /*#__PURE__*/cloneElement(children, _objectSpread({
|
|
45
|
+
onFocus: function onFocus(e) {
|
|
46
|
+
_onFocus();
|
|
47
|
+
|
|
48
|
+
children.props.onFocus && children.props.onFocus(e);
|
|
49
|
+
},
|
|
50
|
+
onBlur: function onBlur(e) {
|
|
51
|
+
_onBlur();
|
|
52
|
+
|
|
53
|
+
children.props.onBlur && children.props.onBlur(e);
|
|
54
|
+
}
|
|
55
|
+
}, isVisible && {
|
|
56
|
+
'aria-describedby': id
|
|
57
|
+
})))
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
EuiToolTipAnchor.displayName = 'EuiToolTipAnchor';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { useEuiTheme } from '../../services';
|
|
12
|
+
import { euiToolTipStyles } from './tool_tip.styles';
|
|
13
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
+
export var EuiToolTipArrow = function EuiToolTipArrow(props) {
|
|
15
|
+
var euiTheme = useEuiTheme();
|
|
16
|
+
var toolTipCss = euiToolTipStyles(euiTheme);
|
|
17
|
+
return ___EmotionJSX("div", _extends({
|
|
18
|
+
css: [toolTipCss.euiToolTip__arrow, ";label:EuiToolTipArrow;"]
|
|
19
|
+
}, props));
|
|
20
|
+
};
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["children", "title", "className", "positionToolTip", "popoverRef"];
|
|
11
|
-
|
|
12
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
-
|
|
14
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
3
|
+
var _excluded = ["children", "title", "className", "positionToolTip", "popoverRef", "calculatedPosition"];
|
|
15
4
|
|
|
16
5
|
/*
|
|
17
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -20,85 +9,55 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
20
9
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
10
|
* Side Public License, v 1.
|
|
22
11
|
*/
|
|
23
|
-
import React, {
|
|
12
|
+
import React, { useEffect, useRef, useCallback } from 'react';
|
|
24
13
|
import classNames from 'classnames';
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
|
+
import { euiToolTipStyles, euiToolTipPopoverStyles } from './tool_tip.styles';
|
|
25
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
|
-
export var EuiToolTipPopover =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
requestAnimationFrame(function () {
|
|
46
|
-
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
47
|
-
if (_this.popover) {
|
|
48
|
-
_this.props.positionToolTip();
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
_defineProperty(_assertThisInitialized(_this), "setPopoverRef", function (ref) {
|
|
54
|
-
_this.popover = ref;
|
|
55
|
-
|
|
56
|
-
if (_this.props.popoverRef) {
|
|
57
|
-
_this.props.popoverRef(ref);
|
|
17
|
+
export var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
title = _ref.title,
|
|
20
|
+
className = _ref.className,
|
|
21
|
+
positionToolTip = _ref.positionToolTip,
|
|
22
|
+
popoverRef = _ref.popoverRef,
|
|
23
|
+
calculatedPosition = _ref.calculatedPosition,
|
|
24
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
|
|
26
|
+
var popover = useRef();
|
|
27
|
+
var euiTheme = useEuiTheme();
|
|
28
|
+
var toolTipCss = euiToolTipStyles(euiTheme);
|
|
29
|
+
var popoverStyles = euiToolTipPopoverStyles(euiTheme);
|
|
30
|
+
var titleCss = [popoverStyles.euiToolTip__title];
|
|
31
|
+
var updateDimensions = useCallback(function () {
|
|
32
|
+
requestAnimationFrame(function () {
|
|
33
|
+
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
34
|
+
if (popover.current) {
|
|
35
|
+
positionToolTip();
|
|
58
36
|
}
|
|
59
37
|
});
|
|
38
|
+
}, [positionToolTip]);
|
|
60
39
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_createClass(EuiToolTipPopover, [{
|
|
65
|
-
key: "componentDidMount",
|
|
66
|
-
value: function componentDidMount() {
|
|
67
|
-
document.body.classList.add('euiBody-hasPortalContent');
|
|
68
|
-
window.addEventListener('resize', this.updateDimensions);
|
|
40
|
+
var setPopoverRef = function setPopoverRef(ref) {
|
|
41
|
+
if (popoverRef) {
|
|
42
|
+
popoverRef(ref);
|
|
69
43
|
}
|
|
70
|
-
}
|
|
71
|
-
key: "componentWillUnmount",
|
|
72
|
-
value: function componentWillUnmount() {
|
|
73
|
-
document.body.classList.remove('euiBody-hasPortalContent');
|
|
74
|
-
window.removeEventListener('resize', this.updateDimensions);
|
|
75
|
-
}
|
|
76
|
-
}, {
|
|
77
|
-
key: "render",
|
|
78
|
-
value: function render() {
|
|
79
|
-
var _this$props = this.props,
|
|
80
|
-
children = _this$props.children,
|
|
81
|
-
title = _this$props.title,
|
|
82
|
-
className = _this$props.className,
|
|
83
|
-
positionToolTip = _this$props.positionToolTip,
|
|
84
|
-
popoverRef = _this$props.popoverRef,
|
|
85
|
-
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
86
|
-
|
|
87
|
-
var classes = classNames('euiToolTipPopover', className);
|
|
88
|
-
var optionalTitle;
|
|
44
|
+
};
|
|
89
45
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
document.body.classList.add('euiBody-hasPortalContent');
|
|
48
|
+
window.addEventListener('resize', updateDimensions);
|
|
49
|
+
return function () {
|
|
50
|
+
document.body.classList.remove('euiBody-hasPortalContent');
|
|
51
|
+
window.removeEventListener('resize', updateDimensions);
|
|
52
|
+
};
|
|
53
|
+
}, [updateDimensions]);
|
|
54
|
+
var classes = classNames('euiToolTipPopover', className);
|
|
55
|
+
return ___EmotionJSX("div", _extends({
|
|
56
|
+
css: [toolTipCss.euiToolTip, calculatedPosition && toolTipCss[calculatedPosition], ";label:EuiToolTipPopover;"],
|
|
57
|
+
className: classes,
|
|
58
|
+
ref: setPopoverRef
|
|
59
|
+
}, rest), title && ___EmotionJSX("div", {
|
|
60
|
+
css: titleCss,
|
|
61
|
+
className: "euiToolTip__title"
|
|
62
|
+
}, title), children);
|
|
63
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject;
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import { keyframes } from '@emotion/react';
|
|
13
|
+
export var euiAnimFadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n"])));
|
|
@@ -10,6 +10,8 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
10
10
|
import chroma from 'chroma-js';
|
|
11
11
|
import { shade, tint, lightness as getLightness } from './manipulation';
|
|
12
12
|
import { getOn } from '../theme/utils';
|
|
13
|
+
export var wcagContrastMin = 4.5; // WCAG AA minimum contrast ratio for normal (non-large) text
|
|
14
|
+
|
|
13
15
|
/**
|
|
14
16
|
* Creates a new color that meets or exceeds WCAG level AA
|
|
15
17
|
* @param foreground - Color to manipulate
|
|
@@ -11,7 +11,7 @@ export { keys };
|
|
|
11
11
|
export { accessibleClickKeys, cascadingMenuKeys, comboBoxKeys, htmlIdGenerator, useGeneratedHtmlId } from './accessibility';
|
|
12
12
|
export { LEFT_ALIGNMENT, RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from './alignment';
|
|
13
13
|
export { useIsWithinBreakpoints, useIsWithinMaxBreakpoint, useIsWithinMinBreakpoint, CurrentEuiBreakpointContext, CurrentEuiBreakpointProvider, useCurrentEuiBreakpoint } from './breakpoint';
|
|
14
|
-
export { isColorDark, isValidHex, calculateContrast, calculateLuminance, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, rgbToHex, rgbToHsv, VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR, colorPalette, euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray, getSteppedGradient, transparentize, tint, shade, tintOrShade, shadeOrTint, saturate, desaturate, lightness, makeHighContrastColor, makeDisabledContrastColor } from './color';
|
|
14
|
+
export { isColorDark, isValidHex, calculateContrast, calculateLuminance, hexToHsv, hexToRgb, hsvToHex, hsvToRgb, rgbToHex, rgbToHsv, VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR, colorPalette, euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray, getSteppedGradient, transparentize, tint, shade, tintOrShade, shadeOrTint, saturate, desaturate, lightness, makeHighContrastColor, makeDisabledContrastColor, wcagContrastMin } from './color';
|
|
15
15
|
export { useColorPickerState, useColorStopsState } from './color_picker';
|
|
16
16
|
export * from './console';
|
|
17
17
|
export { copyToClipboard } from './copy_to_clipboard';
|