@elastic/eui 67.0.0 → 67.1.1
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 -390
- package/dist/eui_theme_dark.json +0 -24
- package/dist/eui_theme_dark.json.d.ts +0 -24
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -390
- package/dist/eui_theme_light.json +0 -24
- package/dist/eui_theme_light.json.d.ts +0 -24
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.js +5 -4
- package/es/components/accordion/accordion.styles.js +1 -1
- package/es/components/badge/badge.js +84 -78
- package/es/components/badge/badge.styles.js +62 -0
- package/es/components/basic_table/in_memory_table.js +8 -0
- package/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
- package/es/components/button/button.js +0 -1
- package/es/components/button/button_display/_button_display.js +10 -5
- 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_icon/button_icon.js +11 -7
- 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 +8 -0
- package/es/components/expression/expression.styles.js +4 -2
- package/es/components/flyout/flyout.js +27 -48
- package/es/components/flyout/flyout.styles.js +111 -0
- package/es/components/flyout/flyout_body.js +14 -6
- package/es/components/flyout/flyout_body.styles.js +21 -0
- package/es/components/flyout/flyout_footer.js +8 -1
- package/es/components/flyout/flyout_footer.styles.js +14 -0
- package/es/components/flyout/flyout_header.js +9 -4
- package/es/components/flyout/flyout_header.styles.js +28 -0
- package/es/components/image/image_wrapper.js +3 -3
- package/es/components/markdown_editor/markdown_format.styles.js +11 -6
- package/es/components/notification/notification_event.js +1 -1
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/page/page_section/page_section.js +3 -4
- package/es/components/pagination/pagination_button.styles.js +5 -3
- 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 +2 -2
- 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/text/text.styles.js +6 -3
- package/es/components/tool_tip/tool_tip.styles.js +7 -6
- package/es/components/tour/tour.styles.js +11 -6
- package/es/global_styling/functions/index.js +1 -0
- package/es/global_styling/functions/math.js +46 -0
- package/es/global_styling/mixins/_helpers.js +5 -2
- 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 +199 -35
- package/i18ntokens.json +2 -2
- package/lib/components/accordion/accordion.js +5 -4
- package/lib/components/accordion/accordion.styles.js +1 -1
- package/lib/components/badge/badge.js +92 -80
- package/lib/components/badge/badge.styles.js +67 -0
- package/lib/components/basic_table/in_memory_table.js +8 -0
- package/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
- package/lib/components/button/button.js +0 -1
- package/lib/components/button/button_display/_button_display.js +10 -5
- 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_icon/button_icon.js +11 -7
- 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 +8 -0
- package/lib/components/expression/expression.styles.js +3 -1
- package/lib/components/flyout/flyout.js +27 -47
- package/lib/components/flyout/flyout.styles.js +122 -0
- package/lib/components/flyout/flyout_body.js +16 -6
- package/lib/components/flyout/flyout_body.styles.js +32 -0
- package/lib/components/flyout/flyout_footer.js +10 -1
- package/lib/components/flyout/flyout_footer.styles.js +24 -0
- package/lib/components/flyout/flyout_header.js +11 -4
- package/lib/components/flyout/flyout_header.styles.js +31 -0
- package/lib/components/image/image_wrapper.js +3 -3
- package/lib/components/markdown_editor/markdown_format.styles.js +10 -5
- package/lib/components/notification/notification_event.js +1 -1
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/page/page_section/page_section.js +3 -4
- package/lib/components/pagination/pagination_button.styles.js +4 -2
- 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 +2 -2
- 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/text/text.styles.js +5 -2
- package/lib/components/tool_tip/tool_tip.styles.js +6 -5
- package/lib/components/tour/tour.styles.js +10 -5
- package/lib/global_styling/functions/index.js +13 -0
- package/lib/global_styling/functions/math.js +55 -0
- package/lib/global_styling/mixins/_helpers.js +5 -2
- 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/accordion/accordion.js +5 -4
- package/optimize/es/components/accordion/accordion.styles.js +1 -1
- package/optimize/es/components/badge/badge.js +82 -76
- package/optimize/es/components/badge/badge.styles.js +62 -0
- package/optimize/es/components/basic_table/in_memory_table.js +4 -0
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
- 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/button/button_icon/button_icon.js +11 -7
- package/optimize/es/components/card/card.js +2 -2
- package/optimize/es/components/card/card.styles.js +5 -2
- package/optimize/es/components/expression/expression.styles.js +4 -2
- package/optimize/es/components/flyout/flyout.js +27 -48
- package/optimize/es/components/flyout/flyout.styles.js +111 -0
- package/optimize/es/components/flyout/flyout_body.js +14 -6
- package/optimize/es/components/flyout/flyout_body.styles.js +21 -0
- package/optimize/es/components/flyout/flyout_footer.js +8 -1
- package/optimize/es/components/flyout/flyout_footer.styles.js +14 -0
- package/optimize/es/components/flyout/flyout_header.js +9 -4
- package/optimize/es/components/flyout/flyout_header.styles.js +28 -0
- package/optimize/es/components/image/image_wrapper.js +3 -3
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +11 -6
- package/optimize/es/components/page/page_header/page_header_content.js +1 -1
- package/optimize/es/components/page/page_section/page_section.js +3 -4
- package/optimize/es/components/pagination/pagination_button.styles.js +5 -3
- 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/progress/progress.js +2 -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/text/text.styles.js +6 -3
- package/optimize/es/components/tool_tip/tool_tip.styles.js +7 -6
- package/optimize/es/components/tour/tour.styles.js +11 -6
- package/optimize/es/global_styling/functions/index.js +1 -0
- package/optimize/es/global_styling/functions/math.js +44 -0
- package/optimize/es/global_styling/mixins/_helpers.js +5 -2
- 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/accordion/accordion.js +5 -4
- package/optimize/lib/components/accordion/accordion.styles.js +1 -1
- package/optimize/lib/components/badge/badge.js +90 -78
- package/optimize/lib/components/badge/badge.styles.js +67 -0
- package/optimize/lib/components/basic_table/in_memory_table.js +4 -0
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
- 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/button/button_icon/button_icon.js +11 -7
- package/optimize/lib/components/card/card.js +2 -2
- package/optimize/lib/components/card/card.styles.js +5 -2
- package/optimize/lib/components/expression/expression.styles.js +3 -1
- package/optimize/lib/components/flyout/flyout.js +27 -47
- package/optimize/lib/components/flyout/flyout.styles.js +124 -0
- package/optimize/lib/components/flyout/flyout_body.js +16 -6
- package/optimize/lib/components/flyout/flyout_body.styles.js +32 -0
- package/optimize/lib/components/flyout/flyout_footer.js +10 -1
- package/optimize/lib/components/flyout/flyout_footer.styles.js +24 -0
- package/optimize/lib/components/flyout/flyout_header.js +11 -4
- package/optimize/lib/components/flyout/flyout_header.styles.js +31 -0
- package/optimize/lib/components/image/image_wrapper.js +3 -3
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +10 -5
- package/optimize/lib/components/page/page_header/page_header_content.js +1 -1
- package/optimize/lib/components/page/page_section/page_section.js +3 -4
- package/optimize/lib/components/pagination/pagination_button.styles.js +4 -2
- 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/progress/progress.js +2 -2
- 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/text/text.styles.js +5 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +6 -5
- package/optimize/lib/components/tour/tour.styles.js +10 -5
- package/optimize/lib/global_styling/functions/index.js +13 -0
- package/optimize/lib/global_styling/functions/math.js +57 -0
- package/optimize/lib/global_styling/mixins/_helpers.js +5 -2
- 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 -1
- package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -1
- package/test-env/components/accordion/accordion.js +5 -4
- package/test-env/components/accordion/accordion.styles.js +1 -1
- package/test-env/components/badge/badge.js +92 -80
- package/test-env/components/badge/badge.styles.js +67 -0
- package/test-env/components/basic_table/in_memory_table.js +8 -0
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +3 -1
- package/test-env/components/button/button.js +0 -1
- package/test-env/components/button/button_display/_button_display.js +10 -5
- 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_icon/button_icon.js +11 -7
- 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 +8 -0
- package/test-env/components/expression/expression.styles.js +3 -1
- package/test-env/components/flyout/flyout.styles.js +124 -0
- package/test-env/components/flyout/flyout_body.js +16 -6
- package/test-env/components/flyout/flyout_body.styles.js +32 -0
- package/test-env/components/flyout/flyout_footer.js +10 -1
- package/test-env/components/flyout/flyout_footer.styles.js +24 -0
- package/test-env/components/flyout/flyout_header.js +11 -4
- package/test-env/components/flyout/flyout_header.styles.js +31 -0
- package/test-env/components/image/image_wrapper.js +3 -3
- package/test-env/components/markdown_editor/markdown_format.styles.js +10 -5
- package/test-env/components/notification/notification_event.js +1 -1
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/page/page_section/page_section.js +3 -4
- package/test-env/components/pagination/pagination_button.styles.js +4 -2
- 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 +2 -2
- 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/text/text.styles.js +5 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +6 -5
- package/test-env/components/tour/tour.styles.js +10 -5
- package/test-env/global_styling/functions/index.js +13 -0
- package/test-env/global_styling/functions/math.js +57 -0
- package/test-env/global_styling/mixins/_helpers.js +5 -2
- 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/flyout/_flyout.scss +0 -196
- package/src/components/flyout/_flyout_body.scss +0 -18
- package/src/components/flyout/_flyout_footer.scss +0 -4
- package/src/components/flyout/_flyout_header.scss +0 -7
- package/src/components/flyout/_index.scss +0 -7
- package/src/components/flyout/_mixins.scss +0 -18
- package/src/components/flyout/_variables.scss +0 -8
- package/src/themes/amsterdam/global_styling/variables/_flyout.scss +0 -1
|
@@ -10,7 +10,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
10
|
* Side Public License, v 1.
|
|
11
11
|
*/
|
|
12
12
|
import { css } from '@emotion/react';
|
|
13
|
-
import { euiFontSize, logicalCSS, logicalTextAlignCSS, euiTextBreakWord, euiTextTruncate } from '../../global_styling';
|
|
13
|
+
import { euiFontSize, logicalCSS, logicalTextAlignCSS, euiTextBreakWord, euiTextTruncate, mathWithUnits } from '../../global_styling';
|
|
14
14
|
import { transparentize } from '../../services/color';
|
|
15
15
|
|
|
16
16
|
var _colorCSS = function _colorCSS(color) {
|
|
@@ -20,7 +20,9 @@ var _colorCSS = function _colorCSS(color) {
|
|
|
20
20
|
export var euiExpressionStyles = function euiExpressionStyles(euiThemeContext) {
|
|
21
21
|
var euiTheme = euiThemeContext.euiTheme;
|
|
22
22
|
return {
|
|
23
|
-
euiExpression: /*#__PURE__*/css(euiTextBreakWord(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", logicalCSS('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", euiFontSize(euiThemeContext, 's'), ";", logicalTextAlignCSS('left'), " padding:",
|
|
23
|
+
euiExpression: /*#__PURE__*/css(euiTextBreakWord(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", logicalCSS('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", euiFontSize(euiThemeContext, 's'), ";", logicalTextAlignCSS('left'), " padding:", mathWithUnits(euiTheme.size.s, function (x) {
|
|
24
|
+
return x / 2;
|
|
25
|
+
}), " 0;color:", euiTheme.colors.text, ";&:focus{", logicalCSS('border-bottom-style', 'solid'), ";}&+.euiExpression{", logicalCSS('margin-left', euiTheme.size.s), ";};label:euiExpression;"),
|
|
24
26
|
// Variants
|
|
25
27
|
columns: /*#__PURE__*/css("border-color:transparent;", logicalCSS('border-bottom-style', 'solid'), " ", logicalCSS('margin-bottom', euiTheme.size.xs), " ", logicalCSS('width', '100%'), " display:flex;padding:", euiTheme.size.xs, ";border-radius:", euiTheme.size.xs, ";;label:columns;"),
|
|
26
28
|
truncate: /*#__PURE__*/css(logicalCSS('max-width', '100%'), ";;label:truncate;"),
|
|
@@ -17,31 +17,19 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
17
17
|
*/
|
|
18
18
|
import React, { useEffect, useRef, useState, forwardRef, Fragment } from 'react';
|
|
19
19
|
import classnames from 'classnames';
|
|
20
|
-
import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint } from '../../services';
|
|
21
|
-
import {
|
|
20
|
+
import { keys, EuiWindowEvent, useCombinedRefs, useIsWithinMinBreakpoint, useEuiTheme } from '../../services';
|
|
21
|
+
import { logicalStyle } from '../../global_styling';
|
|
22
22
|
import { EuiFocusTrap } from '../focus_trap';
|
|
23
23
|
import { EuiOverlayMask } from '../overlay_mask';
|
|
24
24
|
import { EuiButtonIcon } from '../button';
|
|
25
25
|
import { EuiI18n } from '../i18n';
|
|
26
26
|
import { useResizeObserver } from '../observer/resize_observer';
|
|
27
27
|
import { EuiPortal } from '../portal';
|
|
28
|
+
import { euiFlyoutStyles, euiFlyoutCloseButtonStyles } from './flyout.styles';
|
|
28
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
export var TYPES = keysOf(typeToClassNameMap);
|
|
34
|
-
var sideToClassNameMap = {
|
|
35
|
-
left: 'euiFlyout--left',
|
|
36
|
-
right: null
|
|
37
|
-
};
|
|
38
|
-
export var SIDES = keysOf(sideToClassNameMap);
|
|
39
|
-
var sizeToClassNameMap = {
|
|
40
|
-
s: 'euiFlyout--small',
|
|
41
|
-
m: 'euiFlyout--medium',
|
|
42
|
-
l: 'euiFlyout--large'
|
|
43
|
-
};
|
|
44
|
-
export var SIZES = keysOf(sizeToClassNameMap);
|
|
30
|
+
export var TYPES = ['push', 'overlay'];
|
|
31
|
+
export var SIDES = ['left', 'right'];
|
|
32
|
+
export var SIZES = ['s', 'm', 'l'];
|
|
45
33
|
|
|
46
34
|
/**
|
|
47
35
|
* Custom type checker for named flyout sizes since the prop
|
|
@@ -51,13 +39,7 @@ function isEuiFlyoutSizeNamed(value) {
|
|
|
51
39
|
return SIZES.includes(value);
|
|
52
40
|
}
|
|
53
41
|
|
|
54
|
-
var
|
|
55
|
-
none: 'euiFlyout--paddingNone',
|
|
56
|
-
s: 'euiFlyout--paddingSmall',
|
|
57
|
-
m: 'euiFlyout--paddingMedium',
|
|
58
|
-
l: 'euiFlyout--paddingLarge'
|
|
59
|
-
};
|
|
60
|
-
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
42
|
+
export var PADDING_SIZES = ['none', 's', 'm', 'l'];
|
|
61
43
|
var defaultElement = 'div';
|
|
62
44
|
export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
63
45
|
var className = _ref.className,
|
|
@@ -148,41 +130,37 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
148
130
|
onClose(event);
|
|
149
131
|
}
|
|
150
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
* Set inline styles
|
|
135
|
+
*/
|
|
151
136
|
|
|
152
|
-
var newStyle;
|
|
153
|
-
var widthClassName;
|
|
154
|
-
var sizeClassName; // Setting max-width
|
|
155
137
|
|
|
156
|
-
|
|
157
|
-
widthClassName = 'euiFlyout--maxWidth-default';
|
|
158
|
-
} else if (maxWidth !== false) {
|
|
159
|
-
var value = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
|
|
160
|
-
newStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
161
|
-
maxWidth: value
|
|
162
|
-
});
|
|
163
|
-
} // Setting size
|
|
138
|
+
var newStyle = style;
|
|
164
139
|
|
|
140
|
+
if (typeof maxWidth !== 'boolean') {
|
|
141
|
+
newStyle = _objectSpread(_objectSpread({}, newStyle), logicalStyle('max-width', maxWidth));
|
|
142
|
+
}
|
|
165
143
|
|
|
166
|
-
if (isEuiFlyoutSizeNamed(size)) {
|
|
167
|
-
|
|
168
|
-
} else if (newStyle) {
|
|
169
|
-
newStyle.width = size;
|
|
170
|
-
} else {
|
|
171
|
-
newStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
172
|
-
width: size
|
|
173
|
-
});
|
|
144
|
+
if (!isEuiFlyoutSizeNamed(size)) {
|
|
145
|
+
newStyle = _objectSpread(_objectSpread({}, newStyle), logicalStyle('width', size));
|
|
174
146
|
}
|
|
175
147
|
|
|
176
|
-
var
|
|
148
|
+
var euiTheme = useEuiTheme();
|
|
149
|
+
var styles = euiFlyoutStyles(euiTheme);
|
|
150
|
+
var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, styles[type], type === 'push' && styles.pushSide[side], styles[side]];
|
|
151
|
+
var classes = classnames('euiFlyout', className);
|
|
177
152
|
var closeButton;
|
|
178
153
|
|
|
179
154
|
if (onClose && !hideCloseButton) {
|
|
180
|
-
var closeButtonClasses = classnames('euiFlyout__closeButton',
|
|
155
|
+
var closeButtonClasses = classnames('euiFlyout__closeButton', closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.className);
|
|
156
|
+
var closeButtonStyles = euiFlyoutCloseButtonStyles(euiTheme);
|
|
157
|
+
var closeButtonCssStyles = [closeButtonStyles.euiFlyout__closeButton, closeButtonStyles[closeButtonPosition], closeButtonPosition === 'outside' && closeButtonStyles.outsideSide[side]];
|
|
181
158
|
closeButton = ___EmotionJSX(EuiI18n, {
|
|
182
159
|
token: "euiFlyout.closeAriaLabel",
|
|
183
160
|
default: "Close this dialog"
|
|
184
161
|
}, function (closeAriaLabel) {
|
|
185
162
|
return ___EmotionJSX(EuiButtonIcon, _extends({
|
|
163
|
+
css: closeButtonCssStyles,
|
|
186
164
|
display: closeButtonPosition === 'outside' ? 'fill' : 'empty',
|
|
187
165
|
iconType: "cross",
|
|
188
166
|
color: "text",
|
|
@@ -239,8 +217,9 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
239
217
|
role: role,
|
|
240
218
|
className: classes,
|
|
241
219
|
tabIndex: -1,
|
|
242
|
-
style: newStyle
|
|
243
|
-
ref: setRef
|
|
220
|
+
style: newStyle,
|
|
221
|
+
ref: setRef,
|
|
222
|
+
css: cssStyles
|
|
244
223
|
}), closeButton, children)); // If ownFocus is set, wrap with an overlay and allow the user to click it to close it.
|
|
245
224
|
|
|
246
225
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
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 { css, keyframes } from '@emotion/react';
|
|
13
|
+
import { euiCanAnimate, euiBreakpoint, logicalCSS, mathWithUnits } from '../../global_styling';
|
|
14
|
+
import { euiShadowXLarge } from '../../themes/amsterdam/global_styling/mixins';
|
|
15
|
+
import { transparentize } from '../../services/color';
|
|
16
|
+
import { euiFormMaxWidth } from '../form/form.styles';
|
|
17
|
+
var euiFlyoutSlideInRight = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
|
|
18
|
+
var euiFlyoutSlideInLeft = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n}\n"])));
|
|
19
|
+
export var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
|
|
20
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
21
|
+
return {
|
|
22
|
+
euiFlyout__closeButton: /*#__PURE__*/css("position:absolute;", logicalCSS('right', euiTheme.size.s), " ", logicalCSS('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
|
|
23
|
+
inside: /*#__PURE__*/css("background-color:", transparentize(euiTheme.colors.emptyShade, 0.9), ";;label:inside;"),
|
|
24
|
+
outside: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), ";animation:none!important;;label:outside;"),
|
|
25
|
+
outsideSide: {
|
|
26
|
+
// `transforms` pull in close buttons a little
|
|
27
|
+
// `!important` is necessary here to override the hover/focus transitions of buttons
|
|
28
|
+
right: /*#__PURE__*/css(logicalCSS('left', 0), " ", euiBreakpoint(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(-100% - ", euiTheme.size.l, "))!important;}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(-100% - ", euiTheme.size.xs, "))!important;};label:right;"),
|
|
29
|
+
left: /*#__PURE__*/css(logicalCSS('right', 0), " ", euiBreakpoint(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(100% + ", euiTheme.size.l, "))!important;}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(100% + ", euiTheme.size.xs, "))!important;};label:left;")
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
|
|
34
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
35
|
+
return {
|
|
36
|
+
euiFlyout: /*#__PURE__*/css("position:fixed;", logicalCSS('top', 0), " ", logicalCSS('bottom', 0), " ", logicalCSS('height', '100%'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{", logicalCSS('max-width', '90vw !important'), ";};label:euiFlyout;"),
|
|
37
|
+
// Flyout sizes
|
|
38
|
+
s: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 's'), ";;label:s;"),
|
|
39
|
+
m: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 'm'), ";;label:m;"),
|
|
40
|
+
l: /*#__PURE__*/css(composeFlyoutSizing(euiThemeContext, 'l'), ";;label:l;"),
|
|
41
|
+
noMaxWidth: /*#__PURE__*/css(logicalCSS('max-width', 'none'), ";;label:noMaxWidth;"),
|
|
42
|
+
// Side
|
|
43
|
+
right: /*#__PURE__*/css("clip-path:polygon(-50% 0, 100% 0, 100% 100%, -50% 100%);", logicalCSS('right', 0), " ", euiCanAnimate, "{animation:", euiFlyoutSlideInRight, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:right;"),
|
|
44
|
+
// Left-side flyouts should only be used for navigation
|
|
45
|
+
left: /*#__PURE__*/css(logicalCSS('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, ";};label:left;"),
|
|
46
|
+
// Type
|
|
47
|
+
overlay: /*#__PURE__*/css(euiShadowXLarge(euiThemeContext), ";;label:overlay;"),
|
|
48
|
+
push: /*#__PURE__*/css("clip-path:none;animation-duration:0s!important;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
|
|
49
|
+
pushSide: {
|
|
50
|
+
right: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thick), ";;label:right;"),
|
|
51
|
+
left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thick), ";;label:left;")
|
|
52
|
+
},
|
|
53
|
+
// Padding
|
|
54
|
+
paddingSizes: {
|
|
55
|
+
none: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 'none'), ";;label:none;"),
|
|
56
|
+
s: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 's'), ";;label:s;"),
|
|
57
|
+
m: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 'm'), ";;label:m;"),
|
|
58
|
+
l: /*#__PURE__*/css(composeFlyoutPadding(euiThemeContext, 'l'), ";;label:l;")
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var composeFlyoutSizing = function composeFlyoutSizing(euiThemeContext, size) {
|
|
64
|
+
var euiTheme = euiThemeContext.euiTheme; // 1. Calculating the minimum width based on the screen takeover breakpoint
|
|
65
|
+
|
|
66
|
+
var flyoutSizes = {
|
|
67
|
+
s: {
|
|
68
|
+
min: "".concat(Math.round(euiTheme.breakpoint.m * 0.5), "px"),
|
|
69
|
+
// 1.
|
|
70
|
+
width: '25vw',
|
|
71
|
+
max: "".concat(Math.round(euiTheme.breakpoint.s * 0.7), "px")
|
|
72
|
+
},
|
|
73
|
+
m: {
|
|
74
|
+
// Calculated for forms plus padding
|
|
75
|
+
min: "".concat(mathWithUnits(euiFormMaxWidth(euiThemeContext), function (x) {
|
|
76
|
+
return x + 24;
|
|
77
|
+
})),
|
|
78
|
+
width: '50vw',
|
|
79
|
+
max: "".concat(euiTheme.breakpoint.m, "px")
|
|
80
|
+
},
|
|
81
|
+
l: {
|
|
82
|
+
min: "".concat(Math.round(euiTheme.breakpoint.m * 0.9), "px"),
|
|
83
|
+
// 1.
|
|
84
|
+
width: '75vw',
|
|
85
|
+
max: "".concat(euiTheme.breakpoint.l, "px")
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
return "\n ".concat(logicalCSS('max-width', flyoutSizes[size].max), "\n\n ").concat(euiBreakpoint(euiThemeContext, ['m', 'xl']), " {\n ").concat(logicalCSS('min-width', flyoutSizes[size].min), "\n ").concat(logicalCSS('width', flyoutSizes[size].width), "\n }\n ").concat(euiBreakpoint(euiThemeContext, ['xs', 's']), " {\n ").concat(logicalCSS('min-width', 0), "\n ").concat(logicalCSS('width', flyoutSizes[size].min), "\n }\n ");
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddingSize) {
|
|
92
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
93
|
+
var paddingModifierMap = {
|
|
94
|
+
none: 0,
|
|
95
|
+
s: euiTheme.size.s,
|
|
96
|
+
m: euiTheme.size.base,
|
|
97
|
+
l: euiTheme.size.l
|
|
98
|
+
}; // Footer padding
|
|
99
|
+
|
|
100
|
+
var footerPaddingSizes = {
|
|
101
|
+
none: 0,
|
|
102
|
+
s: euiTheme.size.s,
|
|
103
|
+
m: "".concat(mathWithUnits(euiTheme.size.base, function (x) {
|
|
104
|
+
return x * 0.75;
|
|
105
|
+
}), " ").concat(euiTheme.size.base, ";"),
|
|
106
|
+
l: "".concat(mathWithUnits(euiTheme.size.l, function (x) {
|
|
107
|
+
return x / 1.5;
|
|
108
|
+
}), " ").concat(euiTheme.size.l, ";")
|
|
109
|
+
};
|
|
110
|
+
return "\n .euiFlyoutHeader {\n ".concat(logicalCSS('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat(logicalCSS('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat(logicalCSS('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutBody__banner .euiCallOut {\n ").concat(logicalCSS('padding-horizontal', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
|
|
111
|
+
};
|
|
@@ -11,6 +11,8 @@ var _excluded = ["children", "className", "banner"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
|
+
import { euiFlyoutBodyStyles } from './flyout_body.styles';
|
|
14
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
17
|
export var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
|
|
16
18
|
var children = _ref.children,
|
|
@@ -19,16 +21,22 @@ export var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
|
|
|
19
21
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
22
|
|
|
21
23
|
var classes = classNames('euiFlyoutBody', className);
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
var euiTheme = useEuiTheme();
|
|
25
|
+
var styles = euiFlyoutBodyStyles(euiTheme);
|
|
26
|
+
var cssStyles = [styles.euiFlyoutBody];
|
|
27
|
+
var bannerCssStyles = [banner && styles.euiFlyoutBody__banner];
|
|
28
|
+
var overflowCssStyles = [banner ? styles.euiFlyoutBody__overflow.hasBanner : styles.euiFlyoutBody__overflow.noBanner];
|
|
25
29
|
return ___EmotionJSX("div", _extends({
|
|
26
30
|
className: classes
|
|
27
|
-
}, rest
|
|
31
|
+
}, rest, {
|
|
32
|
+
css: cssStyles
|
|
33
|
+
}), ___EmotionJSX("div", {
|
|
28
34
|
tabIndex: 0,
|
|
29
|
-
className:
|
|
35
|
+
className: "euiFlyoutBody__overflow",
|
|
36
|
+
css: overflowCssStyles
|
|
30
37
|
}, banner && ___EmotionJSX("div", {
|
|
31
|
-
className: "euiFlyoutBody__banner"
|
|
38
|
+
className: "euiFlyoutBody__banner",
|
|
39
|
+
css: bannerCssStyles
|
|
32
40
|
}, banner), ___EmotionJSX("div", {
|
|
33
41
|
className: "euiFlyoutBody__overflowContent"
|
|
34
42
|
}, children)));
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { css } from '@emotion/react';
|
|
9
|
+
import { logicalCSS, logicalCSSWithFallback, euiYScrollWithShadows } from '../../global_styling';
|
|
10
|
+
export var euiFlyoutBodyStyles = function euiFlyoutBodyStyles(euiThemeContext) {
|
|
11
|
+
return {
|
|
12
|
+
euiFlyoutBody: /*#__PURE__*/css(logicalCSSWithFallback('overflow-y', 'hidden'), " ", logicalCSS('height', '100%'), ";;label:euiFlyoutBody;"),
|
|
13
|
+
euiFlyoutBody__overflow: {
|
|
14
|
+
noBanner: /*#__PURE__*/css(euiYScrollWithShadows(euiThemeContext), ";;label:noBanner;"),
|
|
15
|
+
hasBanner: /*#__PURE__*/css(euiYScrollWithShadows(euiThemeContext, {
|
|
16
|
+
side: 'end'
|
|
17
|
+
}), ";;label:hasBanner;")
|
|
18
|
+
},
|
|
19
|
+
euiFlyoutBody__banner: /*#__PURE__*/css(logicalCSSWithFallback('overflow-x', 'hidden'), ";;label:euiFlyoutBody__banner;")
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -11,6 +11,8 @@ var _excluded = ["children", "className"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
|
+
import { euiFlyoutFooterStyles } from './flyout_footer.styles';
|
|
14
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
17
|
export var EuiFlyoutFooter = function EuiFlyoutFooter(_ref) {
|
|
16
18
|
var children = _ref.children,
|
|
@@ -18,7 +20,12 @@ export var EuiFlyoutFooter = function EuiFlyoutFooter(_ref) {
|
|
|
18
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
21
|
|
|
20
22
|
var classes = classNames('euiFlyoutFooter', className);
|
|
23
|
+
var euiTheme = useEuiTheme();
|
|
24
|
+
var styles = euiFlyoutFooterStyles(euiTheme);
|
|
25
|
+
var cssStyles = [styles.euiFlyoutFooter];
|
|
21
26
|
return ___EmotionJSX("div", _extends({
|
|
22
27
|
className: classes
|
|
23
|
-
}, rest
|
|
28
|
+
}, rest, {
|
|
29
|
+
css: cssStyles
|
|
30
|
+
}), children);
|
|
24
31
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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 { css } from '@emotion/react';
|
|
9
|
+
export var euiFlyoutFooterStyles = function euiFlyoutFooterStyles(euiThemeContext) {
|
|
10
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
11
|
+
return {
|
|
12
|
+
euiFlyoutFooter: /*#__PURE__*/css("background-color:", euiTheme.colors.lightestShade, ";flex-grow:0;;label:euiFlyoutFooter;")
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -11,6 +11,8 @@ var _excluded = ["children", "className", "hasBorder"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
|
+
import { euiFlyoutHeaderStyles } from './flyout_header.styles';
|
|
14
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
17
|
export var EuiFlyoutHeader = function EuiFlyoutHeader(_ref) {
|
|
16
18
|
var children = _ref.children,
|
|
@@ -19,10 +21,13 @@ export var EuiFlyoutHeader = function EuiFlyoutHeader(_ref) {
|
|
|
19
21
|
hasBorder = _ref$hasBorder === void 0 ? false : _ref$hasBorder,
|
|
20
22
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
23
|
|
|
22
|
-
var classes = classNames('euiFlyoutHeader',
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
var classes = classNames('euiFlyoutHeader', className);
|
|
25
|
+
var euiTheme = useEuiTheme();
|
|
26
|
+
var styles = euiFlyoutHeaderStyles(euiTheme);
|
|
27
|
+
var cssStyles = [styles.euiFlyoutHeader, hasBorder && styles.hasBorder];
|
|
25
28
|
return ___EmotionJSX("div", _extends({
|
|
26
29
|
className: classes
|
|
27
|
-
}, rest
|
|
30
|
+
}, rest, {
|
|
31
|
+
css: cssStyles
|
|
32
|
+
}), children);
|
|
28
33
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
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)."; }
|
|
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 { css } from '@emotion/react';
|
|
11
|
+
import { logicalCSS } from '../../global_styling';
|
|
12
|
+
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "1hivny1-euiFlyoutHeader",
|
|
15
|
+
styles: "flex-grow:0;label:euiFlyoutHeader;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "1hivny1-euiFlyoutHeader",
|
|
18
|
+
styles: "flex-grow:0;label:euiFlyoutHeader;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export var euiFlyoutHeaderStyles = function euiFlyoutHeaderStyles(euiThemeContext) {
|
|
23
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
24
|
+
return {
|
|
25
|
+
euiFlyoutHeader: _ref,
|
|
26
|
+
hasBorder: /*#__PURE__*/css(logicalCSS('border-bottom', euiTheme.border.thin), ";;label:hasBorder;")
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -44,10 +44,10 @@ export var EuiImageWrapper = function EuiImageWrapper(_ref) {
|
|
|
44
44
|
optionalCaptionText = _useInnerText2[1];
|
|
45
45
|
|
|
46
46
|
return ___EmotionJSX("figure", _extends({
|
|
47
|
-
"aria-label": optionalCaptionText
|
|
48
|
-
}, wrapperProps, {
|
|
49
|
-
className: classes,
|
|
47
|
+
"aria-label": optionalCaptionText,
|
|
50
48
|
css: cssFigureStyles
|
|
49
|
+
}, wrapperProps, {
|
|
50
|
+
className: classes
|
|
51
51
|
}), allowFullScreen ? ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiImageButton, {
|
|
52
52
|
hasAlt: !!alt,
|
|
53
53
|
hasShadow: hasShadow,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
|
-
import { logicalCSS, euiFontSize } from '../../global_styling';
|
|
9
|
+
import { logicalCSS, euiFontSize, mathWithUnits } from '../../global_styling';
|
|
10
10
|
/**
|
|
11
11
|
* Mixins
|
|
12
12
|
*/
|
|
@@ -20,11 +20,16 @@ var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, o
|
|
|
20
20
|
var measurement = options.measurement;
|
|
21
21
|
var lineHeightSize = measurement === 'em' ? "".concat(lineHeight, "em") : lineHeight; // Custom scales
|
|
22
22
|
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
|
|
23
|
+
var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
|
|
24
|
+
return x / 4;
|
|
25
|
+
});
|
|
26
|
+
var tablePaddingVertical = mathWithUnits(fontSize, function (x) {
|
|
27
|
+
return x / 4;
|
|
28
|
+
});
|
|
29
|
+
var tablePaddingHorizontal = mathWithUnits(fontSize, function (x) {
|
|
30
|
+
return x / 2;
|
|
31
|
+
});
|
|
32
|
+
return "\n .euiMarkdownFormat__blockquote {\n padding: 0 ".concat(fontSize, ";\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiCheckbox .euiCheckbox__input ~ .euiCheckbox__label { // Extra specificity necessary to override default checkbox CSS\n font-size: ").concat(fontSize, ";\n ").concat(logicalCSS('padding-left', lineHeightSize), "\n line-height: ").concat(lineHeight, ";\n }\n\n .euiCheckbox + *:not(.euiCheckbox) {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n .euiMarkdownFormat__codeblockWrapper {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', tablePaddingVertical), "\n ").concat(logicalCSS('padding-horizontal', tablePaddingHorizontal), "\n }\n ");
|
|
28
33
|
};
|
|
29
34
|
/**
|
|
30
35
|
* Styles
|
|
@@ -54,7 +54,7 @@ export var EuiPageHeaderContent = function EuiPageHeaderContent(_ref) {
|
|
|
54
54
|
|
|
55
55
|
var isResponsiveBreakpoint = useIsWithinBreakpoints(['xs', 's'], !!responsive);
|
|
56
56
|
var useTheme = useEuiTheme();
|
|
57
|
-
var classes = classNames('euiPageHeaderContent');
|
|
57
|
+
var classes = classNames('euiPageHeaderContent', className);
|
|
58
58
|
var pageHeaderStyles = euiPageHeaderStyles(useTheme);
|
|
59
59
|
var contentStyles = euiPageHeaderContentStyles(useTheme);
|
|
60
60
|
var styles = setStyleForRestrictedPageWidth(restrictWidth, style);
|
|
@@ -42,12 +42,11 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
42
42
|
var colors = useEuiBackgroundColorCSS();
|
|
43
43
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
44
44
|
var contentStyles = euiPageSectionContentStyles();
|
|
45
|
-
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
45
|
+
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth, (contentProps === null || contentProps === void 0 ? void 0 : contentProps.css) && contentProps.css];
|
|
46
46
|
return ___EmotionJSX(Component, _extends({
|
|
47
47
|
css: cssStyles
|
|
48
|
-
}, rest), ___EmotionJSX("div", _extends({
|
|
49
|
-
css: cssContentStyles
|
|
50
|
-
}, contentProps, {
|
|
48
|
+
}, rest), ___EmotionJSX("div", _extends({}, contentProps, {
|
|
49
|
+
css: cssContentStyles,
|
|
51
50
|
style: widthStyles
|
|
52
51
|
}), children));
|
|
53
52
|
};
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
|
-
import { logicalCSS, logicalTextAlignCSS, euiFontSize } from '../../global_styling';
|
|
9
|
+
import { logicalCSS, logicalTextAlignCSS, mathWithUnits, euiFontSize } from '../../global_styling';
|
|
10
10
|
import { euiButtonEmptyColor } from '../../themes/amsterdam/global_styling/mixins';
|
|
11
11
|
export var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThemeContext) {
|
|
12
12
|
var euiTheme = euiThemeContext.euiTheme;
|
|
13
13
|
var fontSizeS = euiFontSize(euiThemeContext, 's');
|
|
14
|
-
var halfSizeM =
|
|
14
|
+
var halfSizeM = mathWithUnits(euiTheme.size.m, function (x) {
|
|
15
|
+
return x / 2;
|
|
16
|
+
});
|
|
15
17
|
var disabled = euiButtonEmptyColor(euiThemeContext, 'disabled'); // && to increase specificity. Can likely be removed once EuiButtonEmpty has been converted.
|
|
16
18
|
|
|
17
19
|
return {
|
|
@@ -19,7 +21,7 @@ export var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThe
|
|
|
19
21
|
euiPaginationButton: /*#__PURE__*/css("&&{", fontSizeS, ";padding:0;", logicalTextAlignCSS('center'), " border-radius:", euiTheme.border.radius.medium, ";outline-offset:-", euiTheme.focus.width, ";};label:euiPaginationButton;"),
|
|
20
22
|
// States
|
|
21
23
|
isActive: /*#__PURE__*/css("&&{font-weight:", euiTheme.font.weight.bold, ";color:", euiTheme.colors.primary, ";.euiButtonEmpty__content{cursor:default;}&&,&&:hover{text-decoration:underline;}};label:isActive;"),
|
|
22
|
-
isPlaceholder: /*#__PURE__*/css("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", logicalCSS('padding-top',
|
|
24
|
+
isPlaceholder: /*#__PURE__*/css("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", logicalCSS('padding-top', halfSizeM), ";", logicalCSS('padding-bottom', 0), ";", logicalCSS('padding-horizontal', euiTheme.size.s), ";", logicalCSS('height', euiTheme.size.l), ";};label:isPlaceholder;")
|
|
23
25
|
};
|
|
24
26
|
};
|
|
25
27
|
export var euiPaginationButtonArrowStyles = function euiPaginationButtonArrowStyles(_ref) {
|
|
@@ -26,9 +26,9 @@ export var EuiPopoverTitle = function EuiPopoverTitle(_ref) {
|
|
|
26
26
|
panelPadding = _useContext.paddingSize;
|
|
27
27
|
|
|
28
28
|
var euiTheme = useEuiTheme();
|
|
29
|
-
var styles = euiPopoverTitleStyles(euiTheme
|
|
29
|
+
var styles = euiPopoverTitleStyles(euiTheme);
|
|
30
30
|
var paddingStyles = useEuiPaddingCSS();
|
|
31
|
-
var cssStyles = [styles.euiPopoverTitle, // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
|
|
31
|
+
var cssStyles = [styles.euiPopoverTitle, styles.panelPaddingSizes[panelPadding], // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
|
|
32
32
|
paddingStyles[paddingSize || panelPadding]];
|
|
33
33
|
var classes = classNames('euiPopoverTitle', className);
|
|
34
34
|
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
|
};
|
|
@@ -79,9 +79,9 @@ export var EuiProgress = function EuiProgress(_ref) {
|
|
|
79
79
|
}, label && ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
|
|
80
80
|
return ___EmotionJSX("span", _extends({
|
|
81
81
|
title: innerText,
|
|
82
|
-
ref: ref
|
|
82
|
+
ref: ref,
|
|
83
|
+
css: labelCssStyles
|
|
83
84
|
}, labelProps, {
|
|
84
|
-
css: labelCssStyles,
|
|
85
85
|
className: labelClasses
|
|
86
86
|
}), label);
|
|
87
87
|
}), valueRender && ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
|
|
@@ -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, "]"));
|