@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
|
@@ -275,7 +275,7 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
275
275
|
toolTipStyles = _this$state.toolTipStyles,
|
|
276
276
|
visible = _this$state.visible,
|
|
277
277
|
calculatedPosition = _this$state.calculatedPosition;
|
|
278
|
-
var classes = (0, _classnames.default)('euiToolTip',
|
|
278
|
+
var classes = (0, _classnames.default)('euiToolTip', className);
|
|
279
279
|
var anchorClasses = (0, _classnames.default)(anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
280
280
|
return (0, _react3.jsx)(_react.default.Fragment, null, (0, _react3.jsx)(_tool_tip_anchor.EuiToolTipAnchor, (0, _extends2.default)({}, anchorProps, {
|
|
281
281
|
ref: this.setAnchorRef,
|
|
@@ -298,7 +298,8 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
298
298
|
calculatedPosition: calculatedPosition
|
|
299
299
|
}, rest), (0, _react3.jsx)(_tool_tip_arrow.EuiToolTipArrow, {
|
|
300
300
|
style: arrowStyles,
|
|
301
|
-
className: "euiToolTip__arrow"
|
|
301
|
+
className: "euiToolTip__arrow",
|
|
302
|
+
position: calculatedPosition
|
|
302
303
|
}), (0, _react3.jsx)(_resize_observer.EuiResizeObserver, {
|
|
303
304
|
onResize: this.positionToolTip
|
|
304
305
|
}, function (resizeRef) {
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.euiToolTipStyles = exports.
|
|
8
|
+
exports.euiToolTipStyles = exports.euiToolTipBorderColor = exports.euiToolTipBackgroundColor = exports.euiToolTipAnchorStyles = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
@@ -44,47 +44,39 @@ var euiToolTipAnimationHorizontal = function euiToolTipAnimationHorizontal(size)
|
|
|
44
44
|
var euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
|
|
45
45
|
var euiTheme = euiThemeContext.euiTheme,
|
|
46
46
|
colorMode = euiThemeContext.colorMode;
|
|
47
|
-
var animationTiming = "".concat(euiTheme.animation.slow, " ease-out 0s forwards");
|
|
48
|
-
/*
|
|
49
|
-
* 1. Shift arrow 1px more than half its size to account for border radius
|
|
50
|
-
*/
|
|
47
|
+
var animationTiming = "".concat(euiTheme.animation.slow, " ease-out 0s forwards"); // Shift arrow 1px more than half its size to account for border radius
|
|
51
48
|
|
|
52
49
|
var arrowSize = euiTheme.size.m;
|
|
53
50
|
var arrowPlusSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
54
51
|
return (x / 2 + 1) * -1;
|
|
55
|
-
});
|
|
56
|
-
|
|
52
|
+
});
|
|
57
53
|
var arrowMinusSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
58
54
|
return (x / 2 - 1) * -1;
|
|
59
|
-
});
|
|
60
|
-
|
|
55
|
+
});
|
|
61
56
|
return {
|
|
62
57
|
// Base
|
|
63
58
|
euiToolTip: /*#__PURE__*/(0, _react.css)((0, _amsterdam.euiShadow)(euiThemeContext), ";border-radius:", euiTheme.border.radius.medium, ";background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";color:", euiTheme.colors.ghost, ";z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('max-width', '256px'), " overflow-wrap:break-word;padding:", euiTheme.size.s, ";", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";position:absolute;[class*='euiHorizontalRule']{background-color:", euiToolTipBorderColor(euiTheme, colorMode), ";};label:euiToolTip;"),
|
|
64
59
|
// Sizes
|
|
65
60
|
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";;label:s;"),
|
|
66
61
|
// Positions
|
|
67
|
-
top: /*#__PURE__*/(0, _react.css)("animation:", euiToolTipAnimationVertical("-".concat(euiTheme.size.base)), " ", animationTiming, "
|
|
68
|
-
bottom: /*#__PURE__*/(0, _react.css)("animation:", euiToolTipAnimationVertical(euiTheme.size.base), " ", animationTiming, ";
|
|
69
|
-
left: /*#__PURE__*/(0, _react.css)("animation:", euiToolTipAnimationHorizontal("-".concat(euiTheme.size.base)), " ", animationTiming, ";
|
|
70
|
-
right: /*#__PURE__*/(0, _react.css)("animation:", euiToolTipAnimationHorizontal(euiTheme.size.base), " ", animationTiming, ";
|
|
71
|
-
//
|
|
72
|
-
euiToolTip__arrow: /*#__PURE__*/(0, _react.css)("content:'';position:absolute;transform-origin:center;border-radius:2px;background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";", (0, _global_styling.logicalSizeCSS)(arrowSize, arrowSize), "
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
colorMode = _ref4.colorMode;
|
|
81
|
-
return {
|
|
82
|
-
// Elements
|
|
62
|
+
top: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiToolTipAnimationVertical("-".concat(euiTheme.size.base)), " ", animationTiming, ";};label:top;"),
|
|
63
|
+
bottom: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiToolTipAnimationVertical(euiTheme.size.base), " ", animationTiming, ";};label:bottom;"),
|
|
64
|
+
left: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiToolTipAnimationHorizontal("-".concat(euiTheme.size.base)), " ", animationTiming, ";};label:left;"),
|
|
65
|
+
right: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{animation:", euiToolTipAnimationHorizontal(euiTheme.size.base), " ", animationTiming, ";};label:right;"),
|
|
66
|
+
// Arrow
|
|
67
|
+
euiToolTip__arrow: /*#__PURE__*/(0, _react.css)("content:'';position:absolute;transform-origin:center;border-radius:2px;background-color:", euiToolTipBackgroundColor(euiTheme, colorMode), ";", (0, _global_styling.logicalSizeCSS)(arrowSize, arrowSize), ";;label:euiToolTip__arrow;"),
|
|
68
|
+
arrowPositions: {
|
|
69
|
+
top: /*#__PURE__*/(0, _react.css)("transform:translateY(", arrowPlusSize, ") rotateZ(45deg);;label:top;"),
|
|
70
|
+
bottom: /*#__PURE__*/(0, _react.css)("transform:translateY(", arrowMinusSize, ") rotateZ(45deg);;label:bottom;"),
|
|
71
|
+
left: /*#__PURE__*/(0, _react.css)("transform:translateX(", arrowPlusSize, ") rotateZ(45deg);;label:left;"),
|
|
72
|
+
right: /*#__PURE__*/(0, _react.css)("transform:translateX(", arrowMinusSize, ") rotateZ(45deg);;label:right;")
|
|
73
|
+
},
|
|
74
|
+
// Title
|
|
83
75
|
euiToolTip__title: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.bold, ";", (0, _global_styling.logicalCSS)('border-bottom', "solid ".concat(euiTheme.border.width.thin, " ").concat(euiToolTipBorderColor(euiTheme, colorMode))), ";", (0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), ";", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.xs), ";;label:euiToolTip__title;")
|
|
84
76
|
};
|
|
85
77
|
};
|
|
86
78
|
|
|
87
|
-
exports.
|
|
79
|
+
exports.euiToolTipStyles = euiToolTipStyles;
|
|
88
80
|
|
|
89
81
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
90
82
|
name: "fzilnk-inlineBlock",
|
|
@@ -9,6 +9,8 @@ exports.EuiToolTipArrow = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
12
14
|
var _react = _interopRequireDefault(require("react"));
|
|
13
15
|
|
|
14
16
|
var _services = require("../../services");
|
|
@@ -17,18 +19,16 @@ var _tool_tip = require("./tool_tip.styles");
|
|
|
17
19
|
|
|
18
20
|
var _react2 = require("@emotion/react");
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* Side Public License, v 1.
|
|
26
|
-
*/
|
|
27
|
-
var EuiToolTipArrow = function EuiToolTipArrow(props) {
|
|
22
|
+
var _excluded = ["position"];
|
|
23
|
+
|
|
24
|
+
var EuiToolTipArrow = function EuiToolTipArrow(_ref) {
|
|
25
|
+
var position = _ref.position,
|
|
26
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
27
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
29
|
-
var
|
|
28
|
+
var styles = (0, _tool_tip.euiToolTipStyles)(euiTheme);
|
|
29
|
+
var cssStyles = [styles.euiToolTip__arrow, styles.arrowPositions[position]];
|
|
30
30
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
31
|
-
css:
|
|
31
|
+
css: cssStyles
|
|
32
32
|
}, props));
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -39,9 +39,8 @@ var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
|
39
39
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
40
|
var popover = (0, _react.useRef)();
|
|
41
41
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var titleCss = [popoverStyles.euiToolTip__title];
|
|
42
|
+
var styles = (0, _tool_tip.euiToolTipStyles)(euiTheme);
|
|
43
|
+
var cssStyles = [styles.euiToolTip, calculatedPosition && styles[calculatedPosition]];
|
|
45
44
|
var updateDimensions = (0, _react.useCallback)(function () {
|
|
46
45
|
requestAnimationFrame(function () {
|
|
47
46
|
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
@@ -67,11 +66,12 @@ var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
|
67
66
|
}, [updateDimensions]);
|
|
68
67
|
var classes = (0, _classnames.default)('euiToolTipPopover', className);
|
|
69
68
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
70
|
-
css:
|
|
69
|
+
css: cssStyles,
|
|
71
70
|
className: classes,
|
|
72
|
-
ref: setPopoverRef
|
|
71
|
+
ref: setPopoverRef,
|
|
72
|
+
"data-position": calculatedPosition
|
|
73
73
|
}, rest), title && (0, _react2.jsx)("div", {
|
|
74
|
-
css:
|
|
74
|
+
css: styles.euiToolTip__title,
|
|
75
75
|
className: "euiToolTip__title"
|
|
76
76
|
}, title), children);
|
|
77
77
|
};
|
|
@@ -31,7 +31,7 @@ var euiTourStyles = function euiTourStyles(_ref) {
|
|
|
31
31
|
colorMode = _ref.colorMode;
|
|
32
32
|
return {
|
|
33
33
|
// Targets EuiPopoverPanel
|
|
34
|
-
euiTour: /*#__PURE__*/(0, _react.css)("
|
|
34
|
+
euiTour: /*#__PURE__*/(0, _react.css)("[data-popover-arrow='top']::before{", (0, _global_styling.logicalCSS)('border-top-color', backgroundColor(euiTheme.colors.lightestShade, colorMode)), ";};label:euiTour;")
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
|
|
@@ -48,7 +48,8 @@ var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
|
48
48
|
});
|
|
49
49
|
return {
|
|
50
50
|
// Base
|
|
51
|
-
euiTourBeacon: /*#__PURE__*/(0, _react.css)("pointer-events:none;position:absolute;opacity:0;transition:opacity 0s ", euiTheme.animation[_popover_panel.openAnimationTiming], "
|
|
51
|
+
euiTourBeacon: /*#__PURE__*/(0, _react.css)("pointer-events:none;position:absolute;", _global_styling.euiCanAnimate, "{opacity:0;transition:opacity 0s ", euiTheme.animation[_popover_panel.openAnimationTiming], ";};label:euiTourBeacon;"),
|
|
52
|
+
isOpen: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{opacity:1;};label:isOpen;"),
|
|
52
53
|
// Positions
|
|
53
54
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), ";", (0, _global_styling.logicalCSS)('left', arrowOffset), ";;label:right;"),
|
|
54
55
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), ";", (0, _global_styling.logicalCSS)('left', arrowSize), ";;label:left;"),
|
|
@@ -43,7 +43,7 @@ var _tour = require("./tour.styles");
|
|
|
43
43
|
|
|
44
44
|
var _react2 = require("@emotion/react");
|
|
45
45
|
|
|
46
|
-
var _excluded = ["anchorPosition", "anchor", "children", "className", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction"];
|
|
46
|
+
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction", "panelProps"];
|
|
47
47
|
|
|
48
48
|
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); }
|
|
49
49
|
|
|
@@ -59,6 +59,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
59
59
|
anchor = _ref.anchor,
|
|
60
60
|
children = _ref.children,
|
|
61
61
|
className = _ref.className,
|
|
62
|
+
css = _ref.css,
|
|
62
63
|
_ref$closePopover = _ref.closePopover,
|
|
63
64
|
closePopover = _ref$closePopover === void 0 ? function () {} : _ref$closePopover,
|
|
64
65
|
content = _ref.content,
|
|
@@ -78,6 +79,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
78
79
|
_ref$decoration = _ref.decoration,
|
|
79
80
|
decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
|
|
80
81
|
footerAction = _ref.footerAction,
|
|
82
|
+
panelProps = _ref.panelProps,
|
|
81
83
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
82
84
|
var titleId = (0, _services.useGeneratedHtmlId)();
|
|
83
85
|
|
|
@@ -120,7 +122,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
120
122
|
var headerStyles = (0, _tour.euiTourHeaderStyles)(euiTheme);
|
|
121
123
|
var footerStyles = (0, _tour.euiTourFooterStyles)(euiTheme);
|
|
122
124
|
var beaconStyles = (0, _tour.euiTourBeaconStyles)(euiTheme);
|
|
123
|
-
var beaconCss = [beaconStyles.euiTourBeacon, popoverPosition && beaconStyles[popoverPosition]];
|
|
125
|
+
var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
|
|
124
126
|
var finishButtonProps = {
|
|
125
127
|
color: 'text',
|
|
126
128
|
flush: 'right',
|
|
@@ -179,9 +181,9 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
179
181
|
ownFocus: false,
|
|
180
182
|
panelClassName: classes,
|
|
181
183
|
panelStyle: style,
|
|
182
|
-
panelProps: {
|
|
183
|
-
css: tourStyles.euiTour
|
|
184
|
-
},
|
|
184
|
+
panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
|
|
185
|
+
css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
|
|
186
|
+
}),
|
|
185
187
|
offset: hasBeacon ? 10 : 0,
|
|
186
188
|
'aria-labelledby': titleId,
|
|
187
189
|
arrowChildren: hasBeacon && (0, _react2.jsx)(_beacon.EuiBeacon, {
|
|
@@ -13,13 +13,9 @@ var _common = require("../../components/common");
|
|
|
13
13
|
|
|
14
14
|
var _logicals = _interopRequireDefault(require("./logicals.json"));
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
20
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
|
-
* Side Public License, v 1.
|
|
22
|
-
*/
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
23
19
|
|
|
24
20
|
/**
|
|
25
21
|
* EUI utilizes logical CSS properties to enable directional writing-modes.
|
|
@@ -110,9 +106,7 @@ var logicalSizeCSS = function logicalSizeCSS(width, height) {
|
|
|
110
106
|
exports.logicalSizeCSS = logicalSizeCSS;
|
|
111
107
|
|
|
112
108
|
var logicalSizeStyle = function logicalSizeStyle(width, height) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return _ref2 = {}, (0, _defineProperty2.default)(_ref2, logicals.width, width), (0, _defineProperty2.default)(_ref2, logicals.height, height), _ref2;
|
|
109
|
+
return _objectSpread(_objectSpread({}, logicalStyle('width', width)), logicalStyle('height', height));
|
|
116
110
|
}; // Text alignment is separate because its the value that changes not the property
|
|
117
111
|
|
|
118
112
|
|
|
@@ -30,28 +30,46 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return
|
|
|
30
30
|
* Example usage:
|
|
31
31
|
* mathWithUnits('4px', (x) => x / 2) = '2px';
|
|
32
32
|
* mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
|
|
33
|
+
* mathWithUnits([euiTheme.size.l, euiTheme.size.s], (x, y) => x - y) = '16px';
|
|
33
34
|
*/
|
|
34
|
-
|
|
35
|
+
// Unfortunately, this is the CSSProperties[] type used for several euiTheme vars
|
|
36
|
+
var mathWithUnits = function mathWithUnits(values, callback) {
|
|
35
37
|
var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
38
|
+
if (!Array.isArray(values)) values = [values];
|
|
39
|
+
var foundNumericValues = [];
|
|
40
|
+
var foundUnit = '';
|
|
41
|
+
values.forEach(function (value) {
|
|
42
|
+
if (typeof value === 'string') {
|
|
43
|
+
var _matches$groups, _matches$groups2;
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\.0-9]+)(%|[A-Za-z]*)/, {
|
|
46
|
+
value: 1,
|
|
47
|
+
unit: 2
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
var matches = regex.exec(value);
|
|
51
|
+
var numericValue = Number(matches === null || matches === void 0 ? void 0 : (_matches$groups = matches.groups) === null || _matches$groups === void 0 ? void 0 : _matches$groups.value);
|
|
52
|
+
|
|
53
|
+
if (!isNaN(numericValue)) {
|
|
54
|
+
foundNumericValues.push(numericValue);
|
|
55
|
+
} else {
|
|
56
|
+
throw new Error('No valid numeric value found');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!unit && matches !== null && matches !== void 0 && (_matches$groups2 = matches.groups) !== null && _matches$groups2 !== void 0 && _matches$groups2.unit) {
|
|
60
|
+
if (!foundUnit) {
|
|
61
|
+
foundUnit = matches.groups.unit;
|
|
62
|
+
} else if (foundUnit !== matches.groups.unit) {
|
|
63
|
+
throw new Error('Multiple units found. Use `calc()` to mix and math multiple unit types (e.g. `%` & `px`) instead');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
} else if (typeof value === 'number') {
|
|
67
|
+
foundNumericValues.push(value);
|
|
68
|
+
} else {
|
|
69
|
+
throw new Error('Invalid value type - pass a string or number');
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return "".concat(callback.apply(void 0, foundNumericValues)).concat(unit || foundUnit);
|
|
55
73
|
};
|
|
56
74
|
|
|
57
75
|
exports.mathWithUnits = mathWithUnits;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useEuiPaddingSize = exports.useEuiPaddingCSS = exports.euiPaddingSize = exports.PADDING_SIZES = void 0;
|
|
6
|
+
exports.useEuiPaddingSize = exports.useEuiPaddingCSS = exports.euiPaddingSizeCSS = exports.euiPaddingSize = exports.PADDING_SIZES = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
|
|
@@ -38,6 +38,20 @@ var euiPaddingSize = function euiPaddingSize(_ref, size) {
|
|
|
38
38
|
|
|
39
39
|
exports.euiPaddingSize = euiPaddingSize;
|
|
40
40
|
|
|
41
|
+
var euiPaddingSizeCSS = function euiPaddingSizeCSS(euiThemeContext, side) {
|
|
42
|
+
var property = side ? "padding-".concat(_functions.logicalSide[side]) : 'padding';
|
|
43
|
+
return {
|
|
44
|
+
none: null,
|
|
45
|
+
xs: /*#__PURE__*/(0, _react.css)(property, ":", euiPaddingSize(euiThemeContext, 'xs'), ";;label:xs;"),
|
|
46
|
+
s: /*#__PURE__*/(0, _react.css)(property, ":", euiPaddingSize(euiThemeContext, 's'), ";;label:s;"),
|
|
47
|
+
m: /*#__PURE__*/(0, _react.css)(property, ":", euiPaddingSize(euiThemeContext, 'm'), ";;label:m;"),
|
|
48
|
+
l: /*#__PURE__*/(0, _react.css)(property, ":", euiPaddingSize(euiThemeContext, 'l'), ";;label:l;"),
|
|
49
|
+
xl: /*#__PURE__*/(0, _react.css)(property, ":", euiPaddingSize(euiThemeContext, 'xl'), ";;label:xl;")
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.euiPaddingSizeCSS = euiPaddingSizeCSS;
|
|
54
|
+
|
|
41
55
|
var useEuiPaddingSize = function useEuiPaddingSize(size) {
|
|
42
56
|
var euiTheme = (0, _theme.useEuiTheme)();
|
|
43
57
|
return euiPaddingSize(euiTheme, size);
|
|
@@ -46,15 +60,8 @@ var useEuiPaddingSize = function useEuiPaddingSize(size) {
|
|
|
46
60
|
exports.useEuiPaddingSize = useEuiPaddingSize;
|
|
47
61
|
|
|
48
62
|
var useEuiPaddingCSS = function useEuiPaddingCSS(side) {
|
|
49
|
-
var
|
|
50
|
-
return
|
|
51
|
-
none: null,
|
|
52
|
-
xs: /*#__PURE__*/(0, _react.css)(property, ":", useEuiPaddingSize('xs'), ";;label:xs;"),
|
|
53
|
-
s: /*#__PURE__*/(0, _react.css)(property, ":", useEuiPaddingSize('s'), ";;label:s;"),
|
|
54
|
-
m: /*#__PURE__*/(0, _react.css)(property, ":", useEuiPaddingSize('m'), ";;label:m;"),
|
|
55
|
-
l: /*#__PURE__*/(0, _react.css)(property, ":", useEuiPaddingSize('l'), ";;label:l;"),
|
|
56
|
-
xl: /*#__PURE__*/(0, _react.css)(property, ":", useEuiPaddingSize('xl'), ";;label:xl;")
|
|
57
|
-
};
|
|
63
|
+
var euiTheme = (0, _theme.useEuiTheme)();
|
|
64
|
+
return euiPaddingSizeCSS(euiTheme, side);
|
|
58
65
|
};
|
|
59
66
|
|
|
60
67
|
exports.useEuiPaddingCSS = useEuiPaddingCSS;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui",
|
|
3
3
|
"description": "Elastic UI Component Library",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "70.1.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -115,14 +115,16 @@
|
|
|
115
115
|
"@cypress/code-coverage": "^3.10.0",
|
|
116
116
|
"@cypress/react": "^5.10.3",
|
|
117
117
|
"@cypress/webpack-dev-server": "^1.7.0",
|
|
118
|
-
"@elastic/charts": "^50.0.
|
|
118
|
+
"@elastic/charts": "^50.0.2",
|
|
119
119
|
"@elastic/datemath": "^5.0.3",
|
|
120
120
|
"@elastic/eslint-config-kibana": "^0.15.0",
|
|
121
|
-
"@emotion/babel-preset-css-prop": "^11.
|
|
122
|
-
"@emotion/cache": "^11.
|
|
123
|
-
"@emotion/
|
|
124
|
-
"@emotion/
|
|
125
|
-
"@emotion/
|
|
121
|
+
"@emotion/babel-preset-css-prop": "^11.10.0",
|
|
122
|
+
"@emotion/cache": "^11.10.3",
|
|
123
|
+
"@emotion/css": "^11.10.0",
|
|
124
|
+
"@emotion/eslint-plugin": "^11.10.0",
|
|
125
|
+
"@emotion/jest": "^11.10.0",
|
|
126
|
+
"@emotion/react": "^11.10.4",
|
|
127
|
+
"@faker-js/faker": "^7.6.0",
|
|
126
128
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
127
129
|
"@svgr/core": "5.5.0",
|
|
128
130
|
"@svgr/plugin-svgo": "^4.0.3",
|
|
@@ -191,7 +193,6 @@
|
|
|
191
193
|
"eslint-plugin-react": "^7.21.3",
|
|
192
194
|
"eslint-plugin-react-hooks": "^4.1.2",
|
|
193
195
|
"expose-gc": "^1.0.0",
|
|
194
|
-
"faker": "^4.1.0",
|
|
195
196
|
"file-loader": "^6.1.0",
|
|
196
197
|
"findup": "^0.1.5",
|
|
197
198
|
"fork-ts-checker-webpack-plugin": "^5.1.0",
|
|
@@ -253,7 +254,7 @@
|
|
|
253
254
|
},
|
|
254
255
|
"peerDependencies": {
|
|
255
256
|
"@elastic/datemath": "^5.0.2",
|
|
256
|
-
"@emotion/
|
|
257
|
+
"@emotion/css": "11.x",
|
|
257
258
|
"@emotion/react": "11.x",
|
|
258
259
|
"@types/react": "^16.9 || ^17.0",
|
|
259
260
|
"@types/react-dom": "^16.9 || ^17.0",
|
|
@@ -52,14 +52,6 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.euiDataGrid__controlPopoverWithDragDrop {
|
|
56
|
-
// Hack because the fixed positions of drag and drop don't work inside of transformed elements
|
|
57
|
-
// sass-lint:disable-block no-important
|
|
58
|
-
transform: none !important;
|
|
59
|
-
transition: none !important;
|
|
60
|
-
margin-top: -$euiSizeS;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
55
|
.euiDataGrid__controlScroll {
|
|
64
56
|
@include euiYScrollWithShadows;
|
|
65
57
|
max-height: $euiDataGridPopoverMaxHeight;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
@import 'accordion/index';
|
|
4
4
|
@import 'basic_table/index';
|
|
5
5
|
@import 'button/index';
|
|
6
|
-
@import 'code/index';
|
|
7
6
|
@import 'collapsible_nav/index';
|
|
8
7
|
@import 'color_picker/index';
|
|
9
8
|
@import 'combo_box/index';
|
|
@@ -30,4 +29,3 @@
|
|
|
30
29
|
@import 'steps/index';
|
|
31
30
|
@import 'suggest/index';
|
|
32
31
|
@import 'table/index';
|
|
33
|
-
@import 'tabs/index';
|
|
@@ -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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
19
|
|
|
@@ -32,11 +30,6 @@ var _beta_badge = require("./beta_badge.styles");
|
|
|
32
30
|
var _react2 = require("@emotion/react");
|
|
33
31
|
|
|
34
32
|
var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "anchorProps", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
33
|
var COLORS = ['accent', 'subdued', 'hollow'];
|
|
41
34
|
exports.COLORS = COLORS;
|
|
42
35
|
var SIZES = ['s', 'm'];
|
|
@@ -116,7 +109,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
116
109
|
anchorProps: anchorProps
|
|
117
110
|
}, content);
|
|
118
111
|
} else {
|
|
119
|
-
return (0, _react2.jsx)(
|
|
112
|
+
return (0, _react2.jsx)("span", anchorProps, content);
|
|
120
113
|
}
|
|
121
114
|
} else {
|
|
122
115
|
if (tooltipContent) {
|
|
@@ -138,11 +131,11 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
138
131
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat((0, _typeof2.default)(spanTitle)));
|
|
139
132
|
}
|
|
140
133
|
|
|
141
|
-
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
142
|
-
css: cssStyles,
|
|
134
|
+
return (0, _react2.jsx)("span", anchorProps, (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
143
135
|
className: classes,
|
|
144
|
-
title: spanTitle
|
|
145
|
-
|
|
136
|
+
title: spanTitle,
|
|
137
|
+
css: cssStyles
|
|
138
|
+
}, rest), icon || label));
|
|
146
139
|
}
|
|
147
140
|
}
|
|
148
141
|
};
|
|
@@ -403,7 +403,7 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
403
403
|
sortName = _this$state2.sortName,
|
|
404
404
|
pageIndex = _this$state2.pageIndex,
|
|
405
405
|
pageSize = _this$state2.pageSize;
|
|
406
|
-
var matchingItems = query ? _search_bar.EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
406
|
+
var matchingItems = query !== null && (executeQueryOptions === null || executeQueryOptions === void 0 ? void 0 : executeQueryOptions.enabled) !== false ? _search_bar.EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
407
407
|
var sortedItems = sortName ? matchingItems.slice(0) // avoid mutating the source array
|
|
408
408
|
.sort(this.getItemSorter()) // sort, causes mutation
|
|
409
409
|
: matchingItems;
|
|
@@ -1140,6 +1140,14 @@ EuiInMemoryTable.propTypes = {
|
|
|
1140
1140
|
* Date formatter to use when parsing date values
|
|
1141
1141
|
*/
|
|
1142
1142
|
dateFormat: _propTypes.default.any,
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Hint to render below the search bar
|
|
1146
|
+
*/
|
|
1147
|
+
hint: _propTypes.default.shape({
|
|
1148
|
+
content: _propTypes.default.node.isRequired,
|
|
1149
|
+
popoverProps: _propTypes.default.any
|
|
1150
|
+
}),
|
|
1143
1151
|
className: _propTypes.default.string,
|
|
1144
1152
|
"aria-label": _propTypes.default.string,
|
|
1145
1153
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -1204,7 +1212,13 @@ EuiInMemoryTable.propTypes = {
|
|
|
1204
1212
|
executeQueryOptions: _propTypes.default.shape({
|
|
1205
1213
|
defaultFields: _propTypes.default.arrayOf(_propTypes.default.string.isRequired),
|
|
1206
1214
|
isClauseMatcher: _propTypes.default.func,
|
|
1207
|
-
explain: _propTypes.default.bool
|
|
1215
|
+
explain: _propTypes.default.bool,
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* When the search bar Query is controlled and passed to the `search` prop it is by default executed against the items passed to the table to filter them out.
|
|
1219
|
+
* If the filtering is already done before passing the `items` to the table we can disable the execution by setting `enabled` to `false`.
|
|
1220
|
+
*/
|
|
1221
|
+
enabled: _propTypes.default.bool
|
|
1208
1222
|
}),
|
|
1209
1223
|
|
|
1210
1224
|
/**
|
|
@@ -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"));
|
|
@@ -60,7 +60,8 @@ function isButtonDisabled(_ref) {
|
|
|
60
60
|
var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
61
61
|
var children = _ref2.children,
|
|
62
62
|
iconType = _ref2.iconType,
|
|
63
|
-
iconSide = _ref2.iconSide,
|
|
63
|
+
_ref2$iconSide = _ref2.iconSide,
|
|
64
|
+
iconSide = _ref2$iconSide === void 0 ? 'left' : _ref2$iconSide,
|
|
64
65
|
iconSize = _ref2.iconSize,
|
|
65
66
|
_ref2$size = _ref2.size,
|
|
66
67
|
size = _ref2$size === void 0 ? 'm' : _ref2$size,
|
|
@@ -94,7 +95,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
94
95
|
iconType: iconType,
|
|
95
96
|
iconSide: iconSide,
|
|
96
97
|
iconSize: iconSize,
|
|
97
|
-
textProps:
|
|
98
|
+
textProps: textProps
|
|
98
99
|
}, contentProps), children);
|
|
99
100
|
var element = href && !buttonIsDisabled ? 'a' : 'button';
|
|
100
101
|
var elementProps = {}; // Element-specific attributes
|
|
@@ -122,8 +123,8 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
122
123
|
|
|
123
124
|
return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
|
|
124
125
|
css: cssStyles,
|
|
125
|
-
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
126
|
-
|
|
126
|
+
style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
|
|
127
|
+
minInlineSize: minWidth
|
|
127
128
|
}) : style,
|
|
128
129
|
ref: ref
|
|
129
130
|
}, elementProps), relObj), rest), innerNode);
|