@elastic/eui 69.0.0 → 70.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 -554
- package/dist/eui_theme_dark.json +0 -27
- package/dist/eui_theme_dark.json.d.ts +0 -27
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -554
- package/dist/eui_theme_light.json +0 -27
- package/dist/eui_theme_light.json.d.ts +0 -27
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +6 -6
- package/es/components/basic_table/in_memory_table.js +16 -2
- package/es/components/button/button_display/_button_display.js +7 -6
- package/es/components/button/button_display/_button_display.styles.js +4 -4
- package/es/components/button/button_display/_button_display_content.js +6 -9
- package/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/es/components/code/code.js +7 -3
- package/es/components/code/code.styles.js +32 -0
- package/es/components/code/code_block.js +72 -315
- package/es/components/code/code_block.styles.js +153 -0
- package/es/components/code/code_block_controls.js +29 -0
- package/es/components/code/code_block_controls.styles.js +43 -0
- package/es/components/code/code_block_copy.js +65 -0
- package/es/components/code/code_block_full_screen.js +90 -0
- package/es/components/code/code_block_line.styles.js +49 -0
- package/es/components/code/code_block_overflow.js +78 -0
- package/es/components/code/code_block_virtualized.js +59 -0
- package/es/components/code/code_syntax.styles.js +43 -0
- package/es/components/code/utils.js +43 -37
- package/es/components/collapsible_nav/collapsible_nav.js +0 -5
- package/es/components/datagrid/controls/column_selector.js +1 -1
- package/es/components/datagrid/controls/column_sorting.js +1 -1
- package/es/components/header/header_links/header_links.js +6 -0
- package/es/components/loading/loading_spinner.js +14 -3
- package/es/components/loading/loading_spinner.styles.js +11 -7
- package/es/components/modal/modal.js +17 -2
- package/es/components/overlay_mask/overlay_mask.js +8 -14
- package/es/components/overlay_mask/overlay_mask.styles.js +4 -14
- package/es/components/overlay_mask/overlay_mask_body.styles.js +18 -0
- package/es/components/page_template/page_template.js +6 -9
- package/es/components/popover/popover.js +13 -3
- package/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/es/components/popover/popover_panel/_popover_panel.js +8 -2
- package/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/es/components/provider/provider.js +1 -5
- package/es/components/resizable_container/helpers.js +2 -2
- package/es/components/resizable_container/resizable_container.js +6 -9
- package/es/components/resizable_container/resizable_container.styles.js +28 -0
- package/es/components/resizable_container/resizable_panel.js +25 -48
- package/es/components/resizable_container/resizable_panel.styles.js +69 -0
- package/es/components/search_bar/query/ast.js +14 -3
- package/es/components/search_bar/search_bar.js +39 -5
- package/es/components/search_bar/search_box.js +37 -4
- package/es/components/tabs/tab.js +33 -13
- package/es/components/tabs/tab.styles.js +50 -0
- package/es/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/es/components/tabs/tabs.js +20 -14
- package/es/components/tabs/tabs.styles.js +23 -0
- package/es/components/tool_tip/tool_tip.js +3 -2
- package/es/components/tool_tip/tool_tip.styles.js +17 -22
- package/es/components/tool_tip/tool_tip_arrow.js +17 -3
- package/es/components/tool_tip/tool_tip_popover.js +7 -7
- package/es/components/tour/tour.styles.js +4 -3
- package/es/components/tour/tour_step.js +13 -5
- package/es/global_styling/functions/logicals.js +5 -3
- package/es/global_styling/functions/math.js +37 -19
- package/es/global_styling/mixins/_padding.js +13 -9
- package/eui.d.ts +401 -84
- package/i18ntokens.json +26 -26
- package/lib/components/badge/beta_badge/beta_badge.js +6 -10
- package/lib/components/basic_table/in_memory_table.js +16 -2
- package/lib/components/button/button_display/_button_display.js +7 -6
- package/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/lib/components/button/button_display/_button_display_content.js +6 -9
- package/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/lib/components/code/code.js +9 -3
- package/lib/components/code/code.styles.js +35 -0
- package/lib/components/code/code_block.js +72 -320
- package/lib/components/code/code_block.styles.js +154 -0
- package/lib/components/code/code_block_controls.js +48 -0
- package/lib/components/code/code_block_controls.styles.js +39 -0
- package/lib/components/code/code_block_copy.js +78 -0
- package/lib/components/code/code_block_full_screen.js +108 -0
- package/lib/components/code/code_block_line.styles.js +45 -0
- package/lib/components/code/code_block_overflow.js +82 -0
- package/lib/components/code/code_block_virtualized.js +72 -0
- package/lib/components/code/code_syntax.styles.js +57 -0
- package/lib/components/code/utils.js +40 -39
- package/lib/components/collapsible_nav/collapsible_nav.js +0 -5
- package/lib/components/datagrid/controls/column_selector.js +1 -1
- package/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/lib/components/header/header_links/header_links.js +6 -0
- package/lib/components/loading/loading_spinner.js +13 -2
- package/lib/components/loading/loading_spinner.styles.js +14 -6
- package/lib/components/modal/modal.js +23 -2
- package/lib/components/overlay_mask/overlay_mask.js +9 -14
- package/lib/components/overlay_mask/overlay_mask.styles.js +13 -17
- package/lib/components/overlay_mask/overlay_mask_body.styles.js +20 -0
- package/lib/components/page_template/page_template.js +6 -9
- package/lib/components/popover/popover.js +13 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/lib/components/popover/popover_panel/_popover_panel.js +8 -2
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/lib/components/provider/provider.js +7 -12
- package/lib/components/resizable_container/helpers.js +2 -2
- package/lib/components/resizable_container/resizable_container.js +7 -9
- package/lib/components/resizable_container/resizable_container.styles.js +31 -0
- package/lib/components/resizable_container/resizable_panel.js +28 -49
- package/lib/components/resizable_container/resizable_panel.styles.js +74 -0
- package/lib/components/search_bar/query/ast.js +14 -3
- package/lib/components/search_bar/search_bar.js +40 -5
- package/lib/components/search_bar/search_box.js +38 -4
- package/lib/components/tabs/tab.js +33 -12
- package/lib/components/tabs/tab.styles.js +56 -0
- package/lib/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/lib/components/tabs/tabs.js +24 -14
- package/lib/components/tabs/tabs.styles.js +34 -0
- package/lib/components/tool_tip/tool_tip.js +3 -2
- package/lib/components/tool_tip/tool_tip.styles.js +18 -26
- package/lib/components/tool_tip/tool_tip_arrow.js +19 -4
- package/lib/components/tool_tip/tool_tip_popover.js +6 -6
- package/lib/components/tour/tour.styles.js +3 -2
- package/lib/components/tour/tour_step.js +7 -5
- package/lib/global_styling/functions/logicals.js +5 -3
- package/lib/global_styling/functions/math.js +37 -19
- package/lib/global_styling/mixins/_padding.js +17 -10
- package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -6
- package/optimize/es/components/basic_table/in_memory_table.js +1 -1
- package/optimize/es/components/button/button_display/_button_display.js +6 -5
- package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/es/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/optimize/es/components/code/code.js +7 -3
- package/optimize/es/components/code/code.styles.js +32 -0
- package/optimize/es/components/code/code_block.js +70 -299
- package/optimize/es/components/code/code_block.styles.js +153 -0
- package/optimize/es/components/code/code_block_controls.js +29 -0
- package/optimize/es/components/code/code_block_controls.styles.js +43 -0
- package/optimize/es/components/code/code_block_copy.js +55 -0
- package/optimize/es/components/code/code_block_full_screen.js +80 -0
- package/optimize/es/components/code/code_block_line.styles.js +49 -0
- package/optimize/es/components/code/code_block_overflow.js +67 -0
- package/optimize/es/components/code/code_block_virtualized.js +59 -0
- package/optimize/es/components/code/code_syntax.styles.js +43 -0
- package/optimize/es/components/code/utils.js +43 -37
- package/optimize/es/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/es/components/loading/loading_spinner.js +13 -3
- package/optimize/es/components/loading/loading_spinner.styles.js +11 -7
- package/optimize/es/components/modal/modal.js +17 -2
- package/optimize/es/components/overlay_mask/overlay_mask.js +8 -9
- package/optimize/es/components/overlay_mask/overlay_mask.styles.js +4 -14
- package/optimize/es/components/overlay_mask/overlay_mask_body.styles.js +18 -0
- package/optimize/es/components/page_template/page_template.js +6 -9
- package/optimize/es/components/popover/popover.js +7 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/optimize/es/components/provider/provider.js +1 -5
- package/optimize/es/components/resizable_container/helpers.js +2 -2
- package/optimize/es/components/resizable_container/resizable_container.js +6 -9
- package/optimize/es/components/resizable_container/resizable_container.styles.js +28 -0
- package/optimize/es/components/resizable_container/resizable_panel.js +25 -48
- package/optimize/es/components/resizable_container/resizable_panel.styles.js +69 -0
- package/optimize/es/components/search_bar/query/ast.js +14 -3
- package/optimize/es/components/search_bar/search_bar.js +31 -5
- package/optimize/es/components/search_bar/search_box.js +29 -3
- package/optimize/es/components/tabs/tab.js +21 -13
- package/optimize/es/components/tabs/tab.styles.js +50 -0
- package/optimize/es/components/tabs/tabs.js +20 -14
- package/optimize/es/components/tabs/tabs.styles.js +23 -0
- package/optimize/es/components/tool_tip/tool_tip.js +3 -2
- package/optimize/es/components/tool_tip/tool_tip.styles.js +17 -22
- package/optimize/es/components/tool_tip/tool_tip_arrow.js +9 -3
- package/optimize/es/components/tool_tip/tool_tip_popover.js +7 -7
- package/optimize/es/components/tour/tour.styles.js +4 -3
- package/optimize/es/components/tour/tour_step.js +7 -5
- package/optimize/es/global_styling/functions/logicals.js +5 -3
- package/optimize/es/global_styling/functions/math.js +35 -17
- package/optimize/es/global_styling/mixins/_padding.js +13 -9
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -13
- package/optimize/lib/components/basic_table/in_memory_table.js +1 -1
- package/optimize/lib/components/button/button_display/_button_display.js +7 -6
- package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/lib/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/optimize/lib/components/code/code.js +9 -3
- package/optimize/lib/components/code/code.styles.js +35 -0
- package/optimize/lib/components/code/code_block.js +71 -306
- package/optimize/lib/components/code/code_block.styles.js +156 -0
- package/optimize/lib/components/code/code_block_controls.js +48 -0
- package/optimize/lib/components/code/code_block_controls.styles.js +39 -0
- package/optimize/lib/components/code/code_block_copy.js +78 -0
- package/optimize/lib/components/code/code_block_full_screen.js +108 -0
- package/optimize/lib/components/code/code_block_line.styles.js +45 -0
- package/optimize/lib/components/code/code_block_overflow.js +82 -0
- package/optimize/lib/components/code/code_block_virtualized.js +81 -0
- package/optimize/lib/components/code/code_syntax.styles.js +57 -0
- package/optimize/lib/components/code/utils.js +40 -37
- package/optimize/lib/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/lib/components/loading/loading_spinner.js +14 -2
- package/optimize/lib/components/loading/loading_spinner.styles.js +14 -6
- package/optimize/lib/components/modal/modal.js +22 -2
- package/optimize/lib/components/overlay_mask/overlay_mask.js +9 -9
- package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +13 -17
- package/optimize/lib/components/overlay_mask/overlay_mask_body.styles.js +20 -0
- package/optimize/lib/components/page_template/page_template.js +6 -9
- package/optimize/lib/components/popover/popover.js +7 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/optimize/lib/components/provider/provider.js +7 -12
- package/optimize/lib/components/resizable_container/helpers.js +2 -2
- package/optimize/lib/components/resizable_container/resizable_container.js +7 -9
- package/optimize/lib/components/resizable_container/resizable_container.styles.js +31 -0
- package/optimize/lib/components/resizable_container/resizable_panel.js +28 -49
- package/optimize/lib/components/resizable_container/resizable_panel.styles.js +76 -0
- package/optimize/lib/components/search_bar/query/ast.js +14 -3
- package/optimize/lib/components/search_bar/search_bar.js +31 -5
- package/optimize/lib/components/search_bar/search_box.js +30 -3
- package/optimize/lib/components/tabs/tab.js +21 -12
- package/optimize/lib/components/tabs/tab.styles.js +56 -0
- package/optimize/lib/components/tabs/tabs.js +24 -14
- package/optimize/lib/components/tabs/tabs.styles.js +34 -0
- package/optimize/lib/components/tool_tip/tool_tip.js +3 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +18 -26
- package/optimize/lib/components/tool_tip/tool_tip_arrow.js +10 -10
- package/optimize/lib/components/tool_tip/tool_tip_popover.js +6 -6
- package/optimize/lib/components/tour/tour.styles.js +3 -2
- package/optimize/lib/components/tour/tour_step.js +7 -5
- package/optimize/lib/global_styling/functions/logicals.js +4 -10
- package/optimize/lib/global_styling/functions/math.js +37 -19
- package/optimize/lib/global_styling/mixins/_padding.js +17 -10
- package/package.json +10 -9
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -8
- package/src/components/index.scss +0 -2
- package/src/components/resizable_container/_index.scss +0 -2
- package/src/global_styling/mixins/_header.scss +1 -1
- package/src/global_styling/variables/_index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -2
- package/test-env/components/badge/beta_badge/beta_badge.js +6 -13
- package/test-env/components/basic_table/in_memory_table.js +16 -2
- package/test-env/components/button/button_display/_button_display.js +7 -6
- package/test-env/components/button/button_display/_button_display.styles.js +4 -4
- package/test-env/components/button/button_display/_button_display_content.js +6 -9
- package/test-env/components/button/button_display/_button_display_content.styles.js +10 -40
- package/test-env/components/code/code.styles.js +35 -0
- package/test-env/components/code/code_block.styles.js +156 -0
- package/test-env/components/code/code_block_controls.js +48 -0
- package/test-env/components/code/code_block_controls.styles.js +39 -0
- package/test-env/components/code/code_block_copy.js +78 -0
- package/test-env/components/code/code_block_full_screen.js +108 -0
- package/test-env/components/code/code_block_line.styles.js +45 -0
- package/test-env/components/code/code_block_overflow.js +82 -0
- package/test-env/components/code/code_block_virtualized.js +81 -0
- package/test-env/components/code/code_syntax.styles.js +57 -0
- package/test-env/components/code/utils.js +40 -37
- package/test-env/components/collapsible_nav/collapsible_nav.js +0 -5
- package/test-env/components/datagrid/controls/column_selector.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting.js +1 -1
- package/test-env/components/header/header_links/header_links.js +6 -0
- package/test-env/components/loading/loading_spinner.js +14 -2
- package/test-env/components/loading/loading_spinner.styles.js +14 -6
- package/test-env/components/modal/modal.js +22 -2
- package/test-env/components/overlay_mask/overlay_mask.js +9 -14
- package/test-env/components/overlay_mask/overlay_mask.styles.js +13 -17
- package/test-env/components/overlay_mask/overlay_mask_body.styles.js +20 -0
- package/test-env/components/page_template/page_template.js +6 -9
- package/test-env/components/popover/popover.js +13 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/test-env/components/popover/popover_panel/_popover_panel.js +8 -2
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/test-env/components/provider/provider.js +7 -12
- package/test-env/components/resizable_container/helpers.js +2 -2
- package/test-env/components/resizable_container/resizable_container.js +7 -9
- package/test-env/components/resizable_container/resizable_container.styles.js +31 -0
- package/test-env/components/resizable_container/resizable_panel.js +28 -49
- package/test-env/components/resizable_container/resizable_panel.styles.js +76 -0
- package/test-env/components/search_bar/query/ast.js +14 -3
- package/test-env/components/search_bar/search_bar.js +39 -5
- package/test-env/components/search_bar/search_box.js +38 -4
- package/test-env/components/tabs/tab.js +33 -12
- package/test-env/components/tabs/tab.styles.js +56 -0
- package/test-env/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/test-env/components/tabs/tabs.js +24 -14
- package/test-env/components/tabs/tabs.styles.js +34 -0
- package/test-env/components/tool_tip/tool_tip.js +3 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +18 -26
- package/test-env/components/tool_tip/tool_tip_arrow.js +16 -11
- package/test-env/components/tool_tip/tool_tip_popover.js +6 -6
- package/test-env/components/tour/tour.styles.js +3 -2
- package/test-env/components/tour/tour_step.js +7 -5
- package/test-env/global_styling/functions/logicals.js +4 -10
- package/test-env/global_styling/functions/math.js +37 -19
- package/test-env/global_styling/mixins/_padding.js +17 -10
- package/src/components/code/_code.scss +0 -15
- package/src/components/code/_code_block.scss +0 -177
- package/src/components/code/_index.scss +0 -4
- package/src/components/code/_mixins.scss +0 -127
- package/src/components/code/_variables.scss +0 -5
- package/src/components/resizable_container/_resizable_container.scss +0 -8
- package/src/components/resizable_container/_resizable_panel.scss +0 -51
- package/src/components/tabs/_index.scss +0 -1
- package/src/components/tabs/_tabs.scss +0 -110
- package/src/global_styling/variables/_colors_code.scss +0 -23
- package/src/themes/amsterdam/overrides/_code.scss +0 -9
- package/src/themes/amsterdam/overrides/_tabs.scss +0 -80
|
@@ -12,7 +12,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
import { css, keyframes } from '@emotion/react';
|
|
15
|
-
import { logicalCSS, logicalSizeCSS, euiFontSize, mathWithUnits } from '../../global_styling';
|
|
15
|
+
import { logicalCSS, logicalSizeCSS, euiFontSize, euiCanAnimate, mathWithUnits } from '../../global_styling';
|
|
16
16
|
import { COLOR_MODES_STANDARD, tint, shade } from '../../services';
|
|
17
17
|
import { euiShadow } from '../../themes/amsterdam';
|
|
18
18
|
export var euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
|
|
@@ -33,39 +33,34 @@ var euiToolTipAnimationHorizontal = function euiToolTipAnimationHorizontal(size)
|
|
|
33
33
|
export var euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
|
|
34
34
|
var euiTheme = euiThemeContext.euiTheme,
|
|
35
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
|
-
*/
|
|
36
|
+
var animationTiming = "".concat(euiTheme.animation.slow, " ease-out 0s forwards"); // Shift arrow 1px more than half its size to account for border radius
|
|
40
37
|
|
|
41
38
|
var arrowSize = euiTheme.size.m;
|
|
42
39
|
var arrowPlusSize = mathWithUnits(arrowSize, function (x) {
|
|
43
40
|
return (x / 2 + 1) * -1;
|
|
44
|
-
});
|
|
45
|
-
|
|
41
|
+
});
|
|
46
42
|
var arrowMinusSize = mathWithUnits(arrowSize, function (x) {
|
|
47
43
|
return (x / 2 - 1) * -1;
|
|
48
|
-
});
|
|
49
|
-
|
|
44
|
+
});
|
|
50
45
|
return {
|
|
51
46
|
// Base
|
|
52
47
|
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;"),
|
|
53
48
|
// Sizes
|
|
54
49
|
s: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";;label:s;"),
|
|
55
50
|
// Positions
|
|
56
|
-
top: /*#__PURE__*/css("animation:", euiToolTipAnimationVertical("-".concat(euiTheme.size.base)), " ", animationTiming, "
|
|
57
|
-
bottom: /*#__PURE__*/css("animation:", euiToolTipAnimationVertical(euiTheme.size.base), " ", animationTiming, ";
|
|
58
|
-
left: /*#__PURE__*/css("animation:", euiToolTipAnimationHorizontal("-".concat(euiTheme.size.base)), " ", animationTiming, ";
|
|
59
|
-
right: /*#__PURE__*/css("animation:", euiToolTipAnimationHorizontal(euiTheme.size.base), " ", animationTiming, ";
|
|
60
|
-
//
|
|
61
|
-
euiToolTip__arrow: /*#__PURE__*/css("content:'';position:absolute;transform-origin:center;border-radius:2px;background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";", logicalSizeCSS(arrowSize, arrowSize), "
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
//
|
|
51
|
+
top: /*#__PURE__*/css(euiCanAnimate, "{animation:", euiToolTipAnimationVertical("-".concat(euiTheme.size.base)), " ", animationTiming, ";};label:top;"),
|
|
52
|
+
bottom: /*#__PURE__*/css(euiCanAnimate, "{animation:", euiToolTipAnimationVertical(euiTheme.size.base), " ", animationTiming, ";};label:bottom;"),
|
|
53
|
+
left: /*#__PURE__*/css(euiCanAnimate, "{animation:", euiToolTipAnimationHorizontal("-".concat(euiTheme.size.base)), " ", animationTiming, ";};label:left;"),
|
|
54
|
+
right: /*#__PURE__*/css(euiCanAnimate, "{animation:", euiToolTipAnimationHorizontal(euiTheme.size.base), " ", animationTiming, ";};label:right;"),
|
|
55
|
+
// Arrow
|
|
56
|
+
euiToolTip__arrow: /*#__PURE__*/css("content:'';position:absolute;transform-origin:center;border-radius:2px;background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";", logicalSizeCSS(arrowSize, arrowSize), ";;label:euiToolTip__arrow;"),
|
|
57
|
+
arrowPositions: {
|
|
58
|
+
top: /*#__PURE__*/css("transform:translateY(", arrowPlusSize, ") rotateZ(45deg);;label:top;"),
|
|
59
|
+
bottom: /*#__PURE__*/css("transform:translateY(", arrowMinusSize, ") rotateZ(45deg);;label:bottom;"),
|
|
60
|
+
left: /*#__PURE__*/css("transform:translateX(", arrowPlusSize, ") rotateZ(45deg);;label:left;"),
|
|
61
|
+
right: /*#__PURE__*/css("transform:translateX(", arrowMinusSize, ") rotateZ(45deg);;label:right;")
|
|
62
|
+
},
|
|
63
|
+
// Title
|
|
69
64
|
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;")
|
|
70
65
|
};
|
|
71
66
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["position"];
|
|
2
4
|
|
|
3
5
|
/*
|
|
4
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,10 +13,14 @@ import React from 'react';
|
|
|
11
13
|
import { useEuiTheme } from '../../services';
|
|
12
14
|
import { euiToolTipStyles } from './tool_tip.styles';
|
|
13
15
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
-
export var EuiToolTipArrow = function EuiToolTipArrow(
|
|
16
|
+
export var EuiToolTipArrow = function EuiToolTipArrow(_ref) {
|
|
17
|
+
var position = _ref.position,
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
|
|
15
20
|
var euiTheme = useEuiTheme();
|
|
16
|
-
var
|
|
21
|
+
var styles = euiToolTipStyles(euiTheme);
|
|
22
|
+
var cssStyles = [styles.euiToolTip__arrow, styles.arrowPositions[position]];
|
|
17
23
|
return ___EmotionJSX("div", _extends({
|
|
18
|
-
css:
|
|
24
|
+
css: cssStyles
|
|
19
25
|
}, props));
|
|
20
26
|
};
|
|
@@ -12,7 +12,7 @@ var _excluded = ["children", "title", "className", "positionToolTip", "popoverRe
|
|
|
12
12
|
import React, { useEffect, useRef, useCallback } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { useEuiTheme } from '../../services';
|
|
15
|
-
import { euiToolTipStyles
|
|
15
|
+
import { euiToolTipStyles } from './tool_tip.styles';
|
|
16
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
17
|
export var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
18
18
|
var children = _ref.children,
|
|
@@ -25,9 +25,8 @@ export var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
|
25
25
|
|
|
26
26
|
var popover = useRef();
|
|
27
27
|
var euiTheme = useEuiTheme();
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var titleCss = [popoverStyles.euiToolTip__title];
|
|
28
|
+
var styles = euiToolTipStyles(euiTheme);
|
|
29
|
+
var cssStyles = [styles.euiToolTip, calculatedPosition && styles[calculatedPosition]];
|
|
31
30
|
var updateDimensions = useCallback(function () {
|
|
32
31
|
requestAnimationFrame(function () {
|
|
33
32
|
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
@@ -53,11 +52,12 @@ export var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
|
53
52
|
}, [updateDimensions]);
|
|
54
53
|
var classes = classNames('euiToolTipPopover', className);
|
|
55
54
|
return ___EmotionJSX("div", _extends({
|
|
56
|
-
css:
|
|
55
|
+
css: cssStyles,
|
|
57
56
|
className: classes,
|
|
58
|
-
ref: setPopoverRef
|
|
57
|
+
ref: setPopoverRef,
|
|
58
|
+
"data-position": calculatedPosition
|
|
59
59
|
}, rest), title && ___EmotionJSX("div", {
|
|
60
|
-
css:
|
|
60
|
+
css: styles.euiToolTip__title,
|
|
61
61
|
className: "euiToolTip__title"
|
|
62
62
|
}, title), children);
|
|
63
63
|
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
9
|
import { shade, tint, COLOR_MODES_STANDARD } from '../../services';
|
|
10
|
-
import { logicalCSS, mathWithUnits } from '../../global_styling';
|
|
10
|
+
import { logicalCSS, mathWithUnits, euiCanAnimate } from '../../global_styling';
|
|
11
11
|
import { openAnimationTiming } from '../popover/popover_panel/_popover_panel.styles';
|
|
12
12
|
import { popoverArrowSize } from '../popover/popover_arrow/_popover_arrow.styles';
|
|
13
13
|
|
|
@@ -20,7 +20,7 @@ export var euiTourStyles = function euiTourStyles(_ref) {
|
|
|
20
20
|
colorMode = _ref.colorMode;
|
|
21
21
|
return {
|
|
22
22
|
// Targets EuiPopoverPanel
|
|
23
|
-
euiTour: /*#__PURE__*/css("
|
|
23
|
+
euiTour: /*#__PURE__*/css("[data-popover-arrow='top']::before{", logicalCSS('border-top-color', backgroundColor(euiTheme.colors.lightestShade, colorMode)), ";};label:euiTour;")
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
@@ -34,7 +34,8 @@ export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
|
34
34
|
});
|
|
35
35
|
return {
|
|
36
36
|
// Base
|
|
37
|
-
euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], "
|
|
37
|
+
euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;", euiCanAnimate, "{opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], ";};label:euiTourBeacon;"),
|
|
38
|
+
isOpen: /*#__PURE__*/css(euiCanAnimate, "{opacity:1;};label:isOpen;"),
|
|
38
39
|
// Positions
|
|
39
40
|
right: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowOffset), ";;label:right;"),
|
|
40
41
|
left: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowSize), ";;label:left;"),
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
|
-
var _excluded = ["anchorPosition", "anchor", "children", "className", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction"];
|
|
6
|
+
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction", "panelProps"];
|
|
7
7
|
|
|
8
8
|
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; }
|
|
9
9
|
|
|
@@ -34,6 +34,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
34
34
|
anchor = _ref.anchor,
|
|
35
35
|
children = _ref.children,
|
|
36
36
|
className = _ref.className,
|
|
37
|
+
css = _ref.css,
|
|
37
38
|
_ref$closePopover = _ref.closePopover,
|
|
38
39
|
closePopover = _ref$closePopover === void 0 ? function () {} : _ref$closePopover,
|
|
39
40
|
content = _ref.content,
|
|
@@ -53,6 +54,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
53
54
|
_ref$decoration = _ref.decoration,
|
|
54
55
|
decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
|
|
55
56
|
footerAction = _ref.footerAction,
|
|
57
|
+
panelProps = _ref.panelProps,
|
|
56
58
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
57
59
|
|
|
58
60
|
var titleId = useGeneratedHtmlId();
|
|
@@ -96,7 +98,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
96
98
|
var headerStyles = euiTourHeaderStyles(euiTheme);
|
|
97
99
|
var footerStyles = euiTourFooterStyles(euiTheme);
|
|
98
100
|
var beaconStyles = euiTourBeaconStyles(euiTheme);
|
|
99
|
-
var beaconCss = [beaconStyles.euiTourBeacon, popoverPosition && beaconStyles[popoverPosition]];
|
|
101
|
+
var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
|
|
100
102
|
var finishButtonProps = {
|
|
101
103
|
color: 'text',
|
|
102
104
|
flush: 'right',
|
|
@@ -157,9 +159,9 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
157
159
|
ownFocus: false,
|
|
158
160
|
panelClassName: classes,
|
|
159
161
|
panelStyle: style,
|
|
160
|
-
panelProps: {
|
|
161
|
-
css: tourStyles.euiTour
|
|
162
|
-
},
|
|
162
|
+
panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
|
|
163
|
+
css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
|
|
164
|
+
}),
|
|
163
165
|
offset: hasBeacon ? 10 : 0,
|
|
164
166
|
'aria-labelledby': titleId,
|
|
165
167
|
arrowChildren: hasBeacon && ___EmotionJSX(EuiBeacon, {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
3
7
|
/*
|
|
4
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
9
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -83,9 +87,7 @@ export var logicalSizeCSS = function logicalSizeCSS(width, height) {
|
|
|
83
87
|
*/
|
|
84
88
|
|
|
85
89
|
export var logicalSizeStyle = function logicalSizeStyle(width, height) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return _ref2 = {}, _defineProperty(_ref2, logicals.width, width), _defineProperty(_ref2, logicals.height, height), _ref2;
|
|
90
|
+
return _objectSpread(_objectSpread({}, logicalStyle('width', width)), logicalStyle('height', height));
|
|
89
91
|
}; // Text alignment is separate because its the value that changes not the property
|
|
90
92
|
|
|
91
93
|
export var logicalText = {
|
|
@@ -19,26 +19,44 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return
|
|
|
19
19
|
* Example usage:
|
|
20
20
|
* mathWithUnits('4px', (x) => x / 2) = '2px';
|
|
21
21
|
* mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
|
|
22
|
+
* mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
// Unfortunately, this is the CSSProperties[] type used for several euiTheme vars
|
|
25
|
+
export var mathWithUnits = function mathWithUnits(values, callback) {
|
|
24
26
|
var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
27
|
+
if (!Array.isArray(values)) values = [values];
|
|
28
|
+
var foundNumericValues = [];
|
|
29
|
+
var foundUnit = '';
|
|
30
|
+
values.forEach(function (value) {
|
|
31
|
+
if (typeof value === 'string') {
|
|
32
|
+
var _matches$groups, _matches$groups2;
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\.0-9]+)(%|[A-Za-z]*)/, {
|
|
35
|
+
value: 1,
|
|
36
|
+
unit: 2
|
|
37
|
+
});
|
|
28
38
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
unit: 2
|
|
32
|
-
});
|
|
39
|
+
var matches = regex.exec(value);
|
|
40
|
+
var numericValue = Number(matches === null || matches === void 0 ? void 0 : (_matches$groups = matches.groups) === null || _matches$groups === void 0 ? void 0 : _matches$groups.value);
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
if (!isNaN(numericValue)) {
|
|
43
|
+
foundNumericValues.push(numericValue);
|
|
44
|
+
} else {
|
|
45
|
+
throw new Error('No valid numeric value found');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!unit && matches !== null && matches !== void 0 && (_matches$groups2 = matches.groups) !== null && _matches$groups2 !== void 0 && _matches$groups2.unit) {
|
|
49
|
+
if (!foundUnit) {
|
|
50
|
+
foundUnit = matches.groups.unit;
|
|
51
|
+
} else if (foundUnit !== matches.groups.unit) {
|
|
52
|
+
throw new Error('Multiple units found. Use `calc()` to mix and math multiple unit types (e.g. `%` & `px`) instead');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
} else if (typeof value === 'number') {
|
|
56
|
+
foundNumericValues.push(value);
|
|
57
|
+
} else {
|
|
58
|
+
throw new Error('Invalid value type - pass a string or number');
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return "".concat(callback.apply(void 0, foundNumericValues)).concat(unit || foundUnit);
|
|
44
62
|
};
|
|
@@ -23,18 +23,22 @@ export var euiPaddingSize = function euiPaddingSize(_ref, size) {
|
|
|
23
23
|
return euiTheme.size[size];
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
+
export var euiPaddingSizeCSS = function euiPaddingSizeCSS(euiThemeContext, side) {
|
|
27
|
+
var property = side ? "padding-".concat(logicalSide[side]) : 'padding';
|
|
28
|
+
return {
|
|
29
|
+
none: null,
|
|
30
|
+
xs: /*#__PURE__*/css(property, ":", euiPaddingSize(euiThemeContext, 'xs'), ";;label:xs;"),
|
|
31
|
+
s: /*#__PURE__*/css(property, ":", euiPaddingSize(euiThemeContext, 's'), ";;label:s;"),
|
|
32
|
+
m: /*#__PURE__*/css(property, ":", euiPaddingSize(euiThemeContext, 'm'), ";;label:m;"),
|
|
33
|
+
l: /*#__PURE__*/css(property, ":", euiPaddingSize(euiThemeContext, 'l'), ";;label:l;"),
|
|
34
|
+
xl: /*#__PURE__*/css(property, ":", euiPaddingSize(euiThemeContext, 'xl'), ";;label:xl;")
|
|
35
|
+
};
|
|
36
|
+
};
|
|
26
37
|
export var useEuiPaddingSize = function useEuiPaddingSize(size) {
|
|
27
38
|
var euiTheme = useEuiTheme();
|
|
28
39
|
return euiPaddingSize(euiTheme, size);
|
|
29
40
|
};
|
|
30
41
|
export var useEuiPaddingCSS = function useEuiPaddingCSS(side) {
|
|
31
|
-
var
|
|
32
|
-
return
|
|
33
|
-
none: null,
|
|
34
|
-
xs: /*#__PURE__*/css(property, ":", useEuiPaddingSize('xs'), ";;label:xs;"),
|
|
35
|
-
s: /*#__PURE__*/css(property, ":", useEuiPaddingSize('s'), ";;label:s;"),
|
|
36
|
-
m: /*#__PURE__*/css(property, ":", useEuiPaddingSize('m'), ";;label:m;"),
|
|
37
|
-
l: /*#__PURE__*/css(property, ":", useEuiPaddingSize('l'), ";;label:l;"),
|
|
38
|
-
xl: /*#__PURE__*/css(property, ":", useEuiPaddingSize('xl'), ";;label:xl;")
|
|
39
|
-
};
|
|
42
|
+
var euiTheme = useEuiTheme();
|
|
43
|
+
return euiPaddingSizeCSS(euiTheme, side);
|
|
40
44
|
};
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -15,7 +13,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
13
|
|
|
16
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
15
|
|
|
18
|
-
var _react =
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
19
17
|
|
|
20
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
19
|
|
|
@@ -30,11 +28,6 @@ var _beta_badge = require("./beta_badge.styles");
|
|
|
30
28
|
var _react2 = require("@emotion/react");
|
|
31
29
|
|
|
32
30
|
var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "anchorProps", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
|
|
33
|
-
|
|
34
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
|
-
|
|
36
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
-
|
|
38
31
|
var COLORS = ['accent', 'subdued', 'hollow'];
|
|
39
32
|
exports.COLORS = COLORS;
|
|
40
33
|
var SIZES = ['s', 'm'];
|
|
@@ -114,7 +107,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
114
107
|
anchorProps: anchorProps
|
|
115
108
|
}, content);
|
|
116
109
|
} else {
|
|
117
|
-
return (0, _react2.jsx)(
|
|
110
|
+
return (0, _react2.jsx)("span", anchorProps, content);
|
|
118
111
|
}
|
|
119
112
|
} else {
|
|
120
113
|
if (tooltipContent) {
|
|
@@ -136,11 +129,11 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
136
129
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat((0, _typeof2.default)(spanTitle)));
|
|
137
130
|
}
|
|
138
131
|
|
|
139
|
-
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
140
|
-
css: cssStyles,
|
|
132
|
+
return (0, _react2.jsx)("span", anchorProps, (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
141
133
|
className: classes,
|
|
142
|
-
title: spanTitle
|
|
143
|
-
|
|
134
|
+
title: spanTitle,
|
|
135
|
+
css: cssStyles
|
|
136
|
+
}, rest), icon || label));
|
|
144
137
|
}
|
|
145
138
|
}
|
|
146
139
|
};
|
|
@@ -401,7 +401,7 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
401
401
|
sortName = _this$state2.sortName,
|
|
402
402
|
pageIndex = _this$state2.pageIndex,
|
|
403
403
|
pageSize = _this$state2.pageSize;
|
|
404
|
-
var matchingItems = query ? _search_bar.EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
404
|
+
var matchingItems = query !== null && (executeQueryOptions === null || executeQueryOptions === void 0 ? void 0 : executeQueryOptions.enabled) !== false ? _search_bar.EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
405
405
|
var sortedItems = sortName ? matchingItems.slice(0) // avoid mutating the source array
|
|
406
406
|
.sort(this.getItemSorter()) // sort, causes mutation
|
|
407
407
|
: matchingItems;
|
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
10
10
|
exports.EuiButtonDisplay = void 0;
|
|
11
11
|
exports.isButtonDisabled = isButtonDisabled;
|
|
12
12
|
|
|
13
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
-
|
|
15
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
14
|
|
|
15
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
16
|
+
|
|
17
17
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
18
18
|
|
|
19
19
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -58,7 +58,8 @@ function isButtonDisabled(_ref) {
|
|
|
58
58
|
var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
59
59
|
var children = _ref2.children,
|
|
60
60
|
iconType = _ref2.iconType,
|
|
61
|
-
iconSide = _ref2.iconSide,
|
|
61
|
+
_ref2$iconSide = _ref2.iconSide,
|
|
62
|
+
iconSide = _ref2$iconSide === void 0 ? 'left' : _ref2$iconSide,
|
|
62
63
|
iconSize = _ref2.iconSize,
|
|
63
64
|
_ref2$size = _ref2.size,
|
|
64
65
|
size = _ref2$size === void 0 ? 'm' : _ref2$size,
|
|
@@ -92,7 +93,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
92
93
|
iconType: iconType,
|
|
93
94
|
iconSide: iconSide,
|
|
94
95
|
iconSize: iconSize,
|
|
95
|
-
textProps:
|
|
96
|
+
textProps: textProps
|
|
96
97
|
}, contentProps), children);
|
|
97
98
|
var element = href && !buttonIsDisabled ? 'a' : 'button';
|
|
98
99
|
var elementProps = {}; // Element-specific attributes
|
|
@@ -120,8 +121,8 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
120
121
|
|
|
121
122
|
return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
|
|
122
123
|
css: cssStyles,
|
|
123
|
-
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
124
|
-
|
|
124
|
+
style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
|
|
125
|
+
minInlineSize: minWidth
|
|
125
126
|
}) : style,
|
|
126
127
|
ref: ref
|
|
127
128
|
}, elementProps), relObj), rest), innerNode);
|
|
@@ -24,11 +24,11 @@ var _buttonSize = function _buttonSize(size) {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
27
|
-
name: "
|
|
28
|
-
styles: "
|
|
27
|
+
name: "8595p9-isDisabled",
|
|
28
|
+
styles: "cursor:not-allowed;label:isDisabled;"
|
|
29
29
|
} : {
|
|
30
|
-
name: "
|
|
31
|
-
styles: "
|
|
30
|
+
name: "8595p9-isDisabled",
|
|
31
|
+
styles: "cursor:not-allowed;label:isDisabled;",
|
|
32
32
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -41,13 +41,12 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
41
41
|
iconType = _ref.iconType,
|
|
42
42
|
_ref$iconSize = _ref.iconSize,
|
|
43
43
|
iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
|
|
44
|
-
iconSide = _ref.iconSide,
|
|
44
|
+
_ref$iconSide = _ref.iconSide,
|
|
45
|
+
iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
|
|
45
46
|
contentProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
46
47
|
var theme = (0, _services.useEuiTheme)();
|
|
47
48
|
var styles = (0, _button_display_content.euiButtonDisplayContentStyles)(theme);
|
|
48
|
-
var cssStyles = [styles.euiButtonDisplayContent
|
|
49
|
-
var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
|
|
50
|
-
var cssIconStyles = [styles.euiButtonDisplayContent__icon, iconSize && styles[iconSize]]; // Add an icon to the button if one exists.
|
|
49
|
+
var cssStyles = [styles.euiButtonDisplayContent]; // Add an icon to the button if one exists.
|
|
51
50
|
|
|
52
51
|
var icon; // When the button is disabled the text gets gray
|
|
53
52
|
// and in some buttons the background gets a light gray
|
|
@@ -56,18 +55,16 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
56
55
|
// are always visible. The default spinner color could be very light.
|
|
57
56
|
|
|
58
57
|
var loadingSpinnerColor = isDisabled ? {
|
|
59
|
-
border: '
|
|
58
|
+
border: 'currentcolor'
|
|
60
59
|
} : undefined;
|
|
61
60
|
|
|
62
61
|
if (isLoading) {
|
|
63
62
|
icon = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
64
|
-
css: cssSpinnerStyles,
|
|
65
63
|
size: iconSize,
|
|
66
64
|
color: loadingSpinnerColor
|
|
67
65
|
});
|
|
68
66
|
} else if (iconType) {
|
|
69
67
|
icon = (0, _react2.jsx)(_icon.EuiIcon, {
|
|
70
|
-
css: cssIconStyles,
|
|
71
68
|
type: iconType,
|
|
72
69
|
size: iconSize,
|
|
73
70
|
color: "inherit" // forces the icon to inherit its parent color
|
|
@@ -78,9 +75,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
78
75
|
var isText = typeof children === 'string';
|
|
79
76
|
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
80
77
|
css: cssStyles
|
|
81
|
-
}, contentProps), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
78
|
+
}, contentProps), iconSide === 'left' && icon, isText || textProps ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
82
79
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
83
|
-
}), children) : children);
|
|
80
|
+
}), children) : children, iconSide === 'right' && icon);
|
|
84
81
|
};
|
|
85
82
|
|
|
86
83
|
exports.EuiButtonDisplayContent = EuiButtonDisplayContent;
|
|
@@ -9,48 +9,18 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
|
|
10
10
|
var _global_styling = require("../../../global_styling");
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
24
|
-
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
25
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
|
|
26
|
-
} : {
|
|
27
|
-
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
28
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;",
|
|
29
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
33
|
-
name: "qfl6yj-right",
|
|
34
|
-
styles: "flex-direction:row-reverse;label:right;"
|
|
35
|
-
} : {
|
|
36
|
-
name: "qfl6yj-right",
|
|
37
|
-
styles: "flex-direction:row-reverse;label:right;",
|
|
38
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
|
|
42
|
-
var euiTheme = _ref4.euiTheme;
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref) {
|
|
20
|
+
var euiTheme = _ref.euiTheme;
|
|
43
21
|
return {
|
|
44
22
|
// Base
|
|
45
|
-
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
46
|
-
// Icon side
|
|
47
|
-
left: /*#__PURE__*/(0, _react.css)(";label:left;"),
|
|
48
|
-
right: _ref3,
|
|
49
|
-
euiButtonDisplayContent__spinner: _ref2,
|
|
50
|
-
euiButtonDisplayContent__icon: _ref,
|
|
51
|
-
// Icon size
|
|
52
|
-
s: /*#__PURE__*/(0, _react.css)(";label:s;"),
|
|
53
|
-
m: /*#__PURE__*/(0, _react.css)(";label:m;")
|
|
23
|
+
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
54
24
|
};
|
|
55
25
|
};
|
|
56
26
|
|
|
@@ -21,6 +21,10 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
21
21
|
|
|
22
22
|
var _utils = require("./utils");
|
|
23
23
|
|
|
24
|
+
var _services = require("../../services");
|
|
25
|
+
|
|
26
|
+
var _code = require("./code.styles");
|
|
27
|
+
|
|
24
28
|
var _react2 = require("@emotion/react");
|
|
25
29
|
|
|
26
30
|
var _excluded = ["transparentBackground", "language", "children", "className"];
|
|
@@ -51,11 +55,13 @@ var EuiCode = function EuiCode(_ref) {
|
|
|
51
55
|
var content = (0, _react.useMemo)(function () {
|
|
52
56
|
return (0, _utils.getHtmlContent)(data, children);
|
|
53
57
|
}, [data, children]);
|
|
54
|
-
var classes = (0, _classnames.default)('euiCode',
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
var classes = (0, _classnames.default)('euiCode', className);
|
|
59
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
60
|
+
var styles = (0, _code.euiCodeStyles)(euiTheme);
|
|
61
|
+
var cssStyles = [styles.euiCode, transparentBackground && styles.transparentBackground];
|
|
57
62
|
return (0, _react2.jsx)("code", (0, _extends2.default)({
|
|
58
63
|
className: classes,
|
|
64
|
+
css: cssStyles,
|
|
59
65
|
"data-code-language": language
|
|
60
66
|
}, rest), content);
|
|
61
67
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiCodeStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _code_syntax = require("./code_syntax.styles");
|
|
11
|
+
|
|
12
|
+
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)."; }
|
|
13
|
+
|
|
14
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
+
name: "gfiv3z-transparentBackground",
|
|
16
|
+
styles: "background:transparent;label:transparentBackground;"
|
|
17
|
+
} : {
|
|
18
|
+
name: "gfiv3z-transparentBackground",
|
|
19
|
+
styles: "background:transparent;label:transparentBackground;",
|
|
20
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var euiCodeStyles = function euiCodeStyles(euiThemeContext) {
|
|
24
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
25
|
+
var euiCodeSyntax = (0, _code_syntax.euiCodeSyntaxColors)(euiThemeContext);
|
|
26
|
+
return {
|
|
27
|
+
/*
|
|
28
|
+
* 1. Size the code against the text its embedded within.
|
|
29
|
+
*/
|
|
30
|
+
euiCode: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;padding:0.2em 0.5em;background:", euiCodeSyntax.backgroundColor, ";border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.bold, ";color:", euiCodeSyntax.inlineCodeColor, ";", (0, _code_syntax.euiCodeSyntaxTokens)(euiThemeContext), ";;label:euiCode;"),
|
|
31
|
+
transparentBackground: _ref
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.euiCodeStyles = euiCodeStyles;
|