@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]);
|
|
@@ -277,7 +277,7 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
277
277
|
toolTipStyles = _this$state.toolTipStyles,
|
|
278
278
|
visible = _this$state.visible,
|
|
279
279
|
calculatedPosition = _this$state.calculatedPosition;
|
|
280
|
-
var classes = (0, _classnames.default)('euiToolTip',
|
|
280
|
+
var classes = (0, _classnames.default)('euiToolTip', className);
|
|
281
281
|
var anchorClasses = (0, _classnames.default)(anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
282
282
|
return (0, _react3.jsx)(_react.default.Fragment, null, (0, _react3.jsx)(_tool_tip_anchor.EuiToolTipAnchor, (0, _extends2.default)({}, anchorProps, {
|
|
283
283
|
ref: this.setAnchorRef,
|
|
@@ -300,7 +300,8 @@ var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
300
300
|
calculatedPosition: calculatedPosition
|
|
301
301
|
}, rest), (0, _react3.jsx)(_tool_tip_arrow.EuiToolTipArrow, {
|
|
302
302
|
style: arrowStyles,
|
|
303
|
-
className: "euiToolTip__arrow"
|
|
303
|
+
className: "euiToolTip__arrow",
|
|
304
|
+
position: calculatedPosition
|
|
304
305
|
}), (0, _react3.jsx)(_resize_observer.EuiResizeObserver, {
|
|
305
306
|
onResize: this.positionToolTip
|
|
306
307
|
}, 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,27 +9,32 @@ 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
|
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
14
18
|
var _services = require("../../services");
|
|
15
19
|
|
|
16
20
|
var _tool_tip = require("./tool_tip.styles");
|
|
17
21
|
|
|
18
22
|
var _react2 = require("@emotion/react");
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* Side Public License, v 1.
|
|
26
|
-
*/
|
|
27
|
-
var EuiToolTipArrow = function EuiToolTipArrow(props) {
|
|
24
|
+
var _excluded = ["position"];
|
|
25
|
+
|
|
26
|
+
var EuiToolTipArrow = function EuiToolTipArrow(_ref) {
|
|
27
|
+
var position = _ref.position,
|
|
28
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
29
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
29
|
-
var
|
|
30
|
+
var styles = (0, _tool_tip.euiToolTipStyles)(euiTheme);
|
|
31
|
+
var cssStyles = [styles.euiToolTip__arrow, styles.arrowPositions[position]];
|
|
30
32
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
31
|
-
css:
|
|
33
|
+
css: cssStyles
|
|
32
34
|
}, props));
|
|
33
35
|
};
|
|
34
36
|
|
|
35
|
-
exports.EuiToolTipArrow = EuiToolTipArrow;
|
|
37
|
+
exports.EuiToolTipArrow = EuiToolTipArrow;
|
|
38
|
+
EuiToolTipArrow.propTypes = {
|
|
39
|
+
position: _propTypes.default.oneOf(["top", "right", "bottom", "left"]).isRequired
|
|
40
|
+
};
|
|
@@ -41,9 +41,8 @@ var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
|
41
41
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
42
42
|
var popover = (0, _react.useRef)();
|
|
43
43
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var titleCss = [popoverStyles.euiToolTip__title];
|
|
44
|
+
var styles = (0, _tool_tip.euiToolTipStyles)(euiTheme);
|
|
45
|
+
var cssStyles = [styles.euiToolTip, calculatedPosition && styles[calculatedPosition]];
|
|
47
46
|
var updateDimensions = (0, _react.useCallback)(function () {
|
|
48
47
|
requestAnimationFrame(function () {
|
|
49
48
|
// Because of this delay, sometimes `positionToolTip` becomes unavailable.
|
|
@@ -69,11 +68,12 @@ var EuiToolTipPopover = function EuiToolTipPopover(_ref) {
|
|
|
69
68
|
}, [updateDimensions]);
|
|
70
69
|
var classes = (0, _classnames.default)('euiToolTipPopover', className);
|
|
71
70
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
72
|
-
css:
|
|
71
|
+
css: cssStyles,
|
|
73
72
|
className: classes,
|
|
74
|
-
ref: setPopoverRef
|
|
73
|
+
ref: setPopoverRef,
|
|
74
|
+
"data-position": calculatedPosition
|
|
75
75
|
}, rest), title && (0, _react2.jsx)("div", {
|
|
76
|
-
css:
|
|
76
|
+
css: styles.euiToolTip__title,
|
|
77
77
|
className: "euiToolTip__title"
|
|
78
78
|
}, title), children);
|
|
79
79
|
};
|
|
@@ -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;"),
|
|
@@ -45,7 +45,7 @@ var _tour = require("./tour.styles");
|
|
|
45
45
|
|
|
46
46
|
var _react2 = require("@emotion/react");
|
|
47
47
|
|
|
48
|
-
var _excluded = ["anchorPosition", "anchor", "children", "className", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction"];
|
|
48
|
+
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction", "panelProps"];
|
|
49
49
|
|
|
50
50
|
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); }
|
|
51
51
|
|
|
@@ -61,6 +61,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
61
61
|
anchor = _ref.anchor,
|
|
62
62
|
children = _ref.children,
|
|
63
63
|
className = _ref.className,
|
|
64
|
+
css = _ref.css,
|
|
64
65
|
_ref$closePopover = _ref.closePopover,
|
|
65
66
|
closePopover = _ref$closePopover === void 0 ? function () {} : _ref$closePopover,
|
|
66
67
|
content = _ref.content,
|
|
@@ -80,6 +81,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
80
81
|
_ref$decoration = _ref.decoration,
|
|
81
82
|
decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
|
|
82
83
|
footerAction = _ref.footerAction,
|
|
84
|
+
panelProps = _ref.panelProps,
|
|
83
85
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
84
86
|
var titleId = (0, _services.useGeneratedHtmlId)();
|
|
85
87
|
|
|
@@ -122,7 +124,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
122
124
|
var headerStyles = (0, _tour.euiTourHeaderStyles)(euiTheme);
|
|
123
125
|
var footerStyles = (0, _tour.euiTourFooterStyles)(euiTheme);
|
|
124
126
|
var beaconStyles = (0, _tour.euiTourBeaconStyles)(euiTheme);
|
|
125
|
-
var beaconCss = [beaconStyles.euiTourBeacon, popoverPosition && beaconStyles[popoverPosition]];
|
|
127
|
+
var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
|
|
126
128
|
var finishButtonProps = {
|
|
127
129
|
color: 'text',
|
|
128
130
|
flush: 'right',
|
|
@@ -181,9 +183,9 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
181
183
|
ownFocus: false,
|
|
182
184
|
panelClassName: classes,
|
|
183
185
|
panelStyle: style,
|
|
184
|
-
panelProps: {
|
|
185
|
-
css: tourStyles.euiTour
|
|
186
|
-
},
|
|
186
|
+
panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
|
|
187
|
+
css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
|
|
188
|
+
}),
|
|
187
189
|
offset: hasBeacon ? 10 : 0,
|
|
188
190
|
'aria-labelledby': titleId,
|
|
189
191
|
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;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* 1. Size the code against the text its embedded within.
|
|
3
|
-
*/
|
|
4
|
-
.euiCode {
|
|
5
|
-
@include euiCodeFont;
|
|
6
|
-
font-size: .9em; /* 1 */
|
|
7
|
-
padding: .2em .5em; /* 1 */
|
|
8
|
-
background: $euiCodeBlockBackgroundColor;
|
|
9
|
-
|
|
10
|
-
&.euiCode--transparentBackground {
|
|
11
|
-
background: transparent;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@include euiCodeSyntaxTokens;
|
|
15
|
-
}
|