@elastic/eui 69.0.0 → 70.0.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 -375
- 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 -375
- 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/basic_table/in_memory_table.js +8 -2
- 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/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/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/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 +7 -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 +291 -37
- package/i18ntokens.json +22 -22
- package/lib/components/basic_table/in_memory_table.js +8 -2
- 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/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/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/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/basic_table/in_memory_table.js +1 -1
- 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/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/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/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/basic_table/in_memory_table.js +1 -1
- 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/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/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/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 +8 -7
- package/src/components/index.scss +0 -1
- 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 -1
- package/test-env/components/basic_table/in_memory_table.js +8 -2
- 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/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/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/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/global_styling/variables/_colors_code.scss +0 -23
- package/src/themes/amsterdam/overrides/_code.scss +0 -9
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.euiResizablePanelStyles = exports.euiResizablePanelContentStyles = void 0;
|
|
9
|
+
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
|
+
|
|
14
|
+
var _global_styling = require("../../global_styling");
|
|
15
|
+
|
|
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; }
|
|
19
|
+
|
|
20
|
+
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)."; }
|
|
21
|
+
|
|
22
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
23
|
+
name: "11qmbh3-collapsed",
|
|
24
|
+
styles: "overflow:hidden;label:collapsed;"
|
|
25
|
+
} : {
|
|
26
|
+
name: "11qmbh3-collapsed",
|
|
27
|
+
styles: "overflow:hidden;label:collapsed;",
|
|
28
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
32
|
+
name: "15ifdgc-euiResizablePanel",
|
|
33
|
+
styles: "position:relative;label:euiResizablePanel;"
|
|
34
|
+
} : {
|
|
35
|
+
name: "15ifdgc-euiResizablePanel",
|
|
36
|
+
styles: "position:relative;label:euiResizablePanel;",
|
|
37
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var euiResizablePanelStyles = function euiResizablePanelStyles(euiThemeContext) {
|
|
41
|
+
return {
|
|
42
|
+
euiResizablePanel: _ref3,
|
|
43
|
+
collapsed: _ref2,
|
|
44
|
+
paddingSizes: _objectSpread({}, (0, _global_styling.euiPaddingSizeCSS)(euiThemeContext))
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
exports.euiResizablePanelStyles = euiResizablePanelStyles;
|
|
49
|
+
|
|
50
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
51
|
+
name: "597kt8-collapsedChildren",
|
|
52
|
+
styles: "*{display:none;};label:collapsedChildren;"
|
|
53
|
+
} : {
|
|
54
|
+
name: "597kt8-collapsedChildren",
|
|
55
|
+
styles: "*{display:none;};label:collapsedChildren;",
|
|
56
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
var euiResizablePanelContentStyles = function euiResizablePanelContentStyles(euiThemeContext) {
|
|
60
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
61
|
+
return {
|
|
62
|
+
euiResizablePanel__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";;label:euiResizablePanel__content;"),
|
|
63
|
+
scrollable: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " ", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'auto'), ";;label:scrollable;"),
|
|
64
|
+
collapsedChildren: _ref,
|
|
65
|
+
horizontal: {
|
|
66
|
+
collapsed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', '0 !important'), ";;label:collapsed;"),
|
|
67
|
+
hasCollapsibleButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', "".concat(euiTheme.size.l, " !important")), ";;label:hasCollapsibleButton;")
|
|
68
|
+
},
|
|
69
|
+
vertical: {
|
|
70
|
+
collapsed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-height', '0 !important'), ";;label:collapsed;"),
|
|
71
|
+
hasCollapsibleButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-height', "".concat(euiTheme.size.l, " !important")), ";;label:hasCollapsibleButton;")
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
exports.euiResizablePanelContentStyles = euiResizablePanelContentStyles;
|
|
@@ -277,6 +277,10 @@ var arrayIncludesValue = function arrayIncludesValue(array, value) {
|
|
|
277
277
|
return valuesEqual(item, value);
|
|
278
278
|
});
|
|
279
279
|
};
|
|
280
|
+
|
|
281
|
+
var mustToMatch = function mustToMatch(must) {
|
|
282
|
+
return must === true ? Match.MUST : Match.MUST_NOT;
|
|
283
|
+
};
|
|
280
284
|
/**
|
|
281
285
|
* The AST structure is an array of clauses. There are 3 types of clauses that are supported:
|
|
282
286
|
*
|
|
@@ -397,9 +401,16 @@ var _AST = /*#__PURE__*/function () {
|
|
|
397
401
|
}
|
|
398
402
|
}, {
|
|
399
403
|
key: "getOrFieldClause",
|
|
400
|
-
value: function getOrFieldClause(field, value) {
|
|
404
|
+
value: function getOrFieldClause(field, value, must, operator) {
|
|
401
405
|
return this.getFieldClause(field, function (clause) {
|
|
402
|
-
|
|
406
|
+
if (!(0, _predicate.isArray)(clause.value)) {
|
|
407
|
+
return false;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
var matchValue = (0, _predicate.isNil)(value) || arrayIncludesValue(clause.value, value);
|
|
411
|
+
var matchMust = (0, _predicate.isNil)(must) || mustToMatch(must) === clause.match;
|
|
412
|
+
var matchOperator = (0, _predicate.isNil)(operator) || operator === clause.operator;
|
|
413
|
+
return matchValue && matchMust && matchOperator;
|
|
403
414
|
});
|
|
404
415
|
}
|
|
405
416
|
}, {
|
|
@@ -407,7 +418,7 @@ var _AST = /*#__PURE__*/function () {
|
|
|
407
418
|
value: function addOrFieldValue(field, value) {
|
|
408
419
|
var must = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
409
420
|
var operator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Operator.EQ;
|
|
410
|
-
var existingClause = this.getOrFieldClause(field);
|
|
421
|
+
var existingClause = this.getOrFieldClause(field, undefined, must, operator);
|
|
411
422
|
|
|
412
423
|
if (!existingClause) {
|
|
413
424
|
var newClause = must ? Field.must[operator](field, [value]) : Field.mustNot[operator](field, [value]);
|
|
@@ -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.0.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -118,11 +118,12 @@
|
|
|
118
118
|
"@elastic/charts": "^50.0.1",
|
|
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",
|
|
126
127
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
127
128
|
"@svgr/core": "5.5.0",
|
|
128
129
|
"@svgr/plugin-svgo": "^4.0.3",
|
|
@@ -253,8 +254,8 @@
|
|
|
253
254
|
},
|
|
254
255
|
"peerDependencies": {
|
|
255
256
|
"@elastic/datemath": "^5.0.2",
|
|
256
|
-
"@emotion/cache": "11.x",
|
|
257
257
|
"@emotion/react": "11.x",
|
|
258
|
+
"@emotion/css": "11.x",
|
|
258
259
|
"@types/react": "^16.9 || ^17.0",
|
|
259
260
|
"@types/react-dom": "^16.9 || ^17.0",
|
|
260
261
|
"moment": "^2.13.0",
|
|
@@ -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;
|
|
@@ -1204,7 +1204,13 @@ EuiInMemoryTable.propTypes = {
|
|
|
1204
1204
|
executeQueryOptions: _propTypes.default.shape({
|
|
1205
1205
|
defaultFields: _propTypes.default.arrayOf(_propTypes.default.string.isRequired),
|
|
1206
1206
|
isClauseMatcher: _propTypes.default.func,
|
|
1207
|
-
explain: _propTypes.default.bool
|
|
1207
|
+
explain: _propTypes.default.bool,
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* 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.
|
|
1211
|
+
* If the filtering is already done before passing the `items` to the table we can disable the execution by setting `enabled` to `false`.
|
|
1212
|
+
*/
|
|
1213
|
+
enabled: _propTypes.default.bool
|
|
1208
1214
|
}),
|
|
1209
1215
|
|
|
1210
1216
|
/**
|
|
@@ -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;
|