@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
|
@@ -13,7 +13,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
13
13
|
*/
|
|
14
14
|
import React, { createElement } from 'react';
|
|
15
15
|
import { listLanguages, highlight } from 'refractor';
|
|
16
|
-
import
|
|
16
|
+
import { cx } from '@emotion/css';
|
|
17
|
+
import { euiCodeBlockLineStyles } from './code_block_line.styles';
|
|
18
|
+
/**
|
|
19
|
+
* Utils shared between EuiCode and EuiCodeBlock
|
|
20
|
+
*/
|
|
21
|
+
|
|
17
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
23
|
export var SUPPORTED_LANGUAGES = listLanguages();
|
|
19
24
|
export var DEFAULT_LANGUAGE = 'text';
|
|
@@ -40,7 +45,7 @@ export var nodeToHtml = function nodeToHtml(node, idx, nodes) {
|
|
|
40
45
|
children = node.children;
|
|
41
46
|
return /*#__PURE__*/createElement(tagName, _objectSpread(_objectSpread({}, properties), {}, {
|
|
42
47
|
key: key,
|
|
43
|
-
className:
|
|
48
|
+
className: cx(properties.className)
|
|
44
49
|
}), children && children.map(function (el, i) {
|
|
45
50
|
return nodeToHtml(el, i, nodes, depth + 1);
|
|
46
51
|
}));
|
|
@@ -55,8 +60,7 @@ export var nodeToHtml = function nodeToHtml(node, idx, nodes) {
|
|
|
55
60
|
*/
|
|
56
61
|
|
|
57
62
|
// Approximate width of a single digit/character
|
|
58
|
-
var CHAR_SIZE = 8;
|
|
59
|
-
var $euiSizeS = 8; // Creates an array of numbers from comma-separeated
|
|
63
|
+
var CHAR_SIZE = 8; // Creates an array of numbers from comma-separeated
|
|
60
64
|
// string of numbers or number ranges using `-`
|
|
61
65
|
// (e.g., "1, 3-10, 15")
|
|
62
66
|
|
|
@@ -129,8 +133,7 @@ var addLineData = function addLineData(nodes, data) {
|
|
|
129
133
|
}, []);
|
|
130
134
|
};
|
|
131
135
|
|
|
132
|
-
function wrapLines(nodes, options) {
|
|
133
|
-
var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
|
|
136
|
+
function wrapLines(nodes, options, euiTheme) {
|
|
134
137
|
var grouped = [];
|
|
135
138
|
nodes.forEach(function (node) {
|
|
136
139
|
var lineStart = node.lineStart - 1;
|
|
@@ -142,41 +145,44 @@ function wrapLines(nodes, options) {
|
|
|
142
145
|
}
|
|
143
146
|
});
|
|
144
147
|
var wrapped = [];
|
|
145
|
-
var digits = grouped.length.toString().length;
|
|
146
|
-
var width = digits * CHAR_SIZE;
|
|
147
148
|
grouped.forEach(function (node, i) {
|
|
148
|
-
var
|
|
149
|
-
|
|
150
|
-
var
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
149
|
+
var children = node;
|
|
150
|
+
var styles = euiCodeBlockLineStyles(euiTheme);
|
|
151
|
+
var lineStyles = cx([styles.euiCodeBlock__line, options.showLineNumbers && styles.hasLineNumbers]);
|
|
152
|
+
|
|
153
|
+
if (options.showLineNumbers) {
|
|
154
|
+
var _properties;
|
|
155
|
+
|
|
156
|
+
var lineNumber = i + 1;
|
|
157
|
+
var digits = grouped.length.toString().length;
|
|
158
|
+
var width = digits * CHAR_SIZE;
|
|
159
|
+
var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
|
|
160
|
+
var lineTextStyles = cx([styles.lineText.euiCodeBlock__lineText, highlights.includes(lineNumber) && styles.lineText.isHighlighted]);
|
|
161
|
+
var lineNumberStyles = cx(styles.lineNumber.euiCodeBlock__lineNumber);
|
|
162
|
+
children = [{
|
|
163
|
+
type: 'element',
|
|
164
|
+
tagName: 'span',
|
|
165
|
+
properties: (_properties = {
|
|
166
|
+
style: {
|
|
167
|
+
inlineSize: width
|
|
168
|
+
}
|
|
169
|
+
}, _defineProperty(_properties, 'data-line-number', lineNumber), _defineProperty(_properties, 'aria-hidden', true), _defineProperty(_properties, "className", ['euiCodeBlock__lineNumber', lineNumberStyles]), _properties),
|
|
170
|
+
children: []
|
|
171
|
+
}, {
|
|
172
|
+
type: 'element',
|
|
173
|
+
tagName: 'span',
|
|
174
|
+
properties: {
|
|
175
|
+
className: ['euiCodeBlock__lineText', lineTextStyles]
|
|
170
176
|
},
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
children: node
|
|
178
|
+
}];
|
|
179
|
+
}
|
|
180
|
+
|
|
175
181
|
wrapped.push({
|
|
176
182
|
type: 'element',
|
|
177
183
|
tagName: 'span',
|
|
178
184
|
properties: {
|
|
179
|
-
className: [
|
|
185
|
+
className: ['euiCodeBlock__line', lineStyles]
|
|
180
186
|
},
|
|
181
187
|
children: children
|
|
182
188
|
});
|
|
@@ -184,11 +190,11 @@ function wrapLines(nodes, options) {
|
|
|
184
190
|
return wrapped;
|
|
185
191
|
}
|
|
186
192
|
|
|
187
|
-
export var highlightByLine = function highlightByLine(children, language, data) {
|
|
193
|
+
export var highlightByLine = function highlightByLine(children, language, data, euiTheme) {
|
|
188
194
|
return wrapLines(addLineData(highlight(children, language), {
|
|
189
195
|
lineNumber: data.start
|
|
190
196
|
}), {
|
|
191
197
|
showLineNumbers: data.show,
|
|
192
198
|
highlight: data.highlight
|
|
193
|
-
});
|
|
199
|
+
}, euiTheme);
|
|
194
200
|
};
|
|
@@ -187,11 +187,6 @@ EuiCollapsibleNav.propTypes = {
|
|
|
187
187
|
* Adjustments to the EuiOverlayMask that is added when `ownFocus = true`
|
|
188
188
|
*/
|
|
189
189
|
maskProps: PropTypes.shape({
|
|
190
|
-
className: PropTypes.string,
|
|
191
|
-
"aria-label": PropTypes.string,
|
|
192
|
-
"data-test-subj": PropTypes.string,
|
|
193
|
-
css: PropTypes.any,
|
|
194
|
-
|
|
195
190
|
/**
|
|
196
191
|
* ReactNode to render as this component's content
|
|
197
192
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "children", "headerZindexLocation", "maskRef"
|
|
1
|
+
var _excluded = ["className", "children", "headerZindexLocation", "maskRef"];
|
|
2
2
|
|
|
3
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
4
|
|
|
@@ -30,12 +30,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
30
30
|
*/
|
|
31
31
|
import React, { useEffect, useState } from 'react';
|
|
32
32
|
import PropTypes from "prop-types";
|
|
33
|
-
import
|
|
33
|
+
import { cx } from '@emotion/css';
|
|
34
34
|
import { Global } from '@emotion/react';
|
|
35
35
|
import { keysOf } from '../common';
|
|
36
36
|
import { useCombinedRefs, useEuiTheme } from '../../services';
|
|
37
37
|
import { EuiPortal } from '../portal';
|
|
38
|
-
import { euiOverlayMaskStyles
|
|
38
|
+
import { euiOverlayMaskStyles } from './overlay_mask.styles';
|
|
39
|
+
import { euiOverlayMaskBodyStyles } from './overlay_mask_body.styles';
|
|
39
40
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
40
41
|
export var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
41
42
|
var className = _ref.className,
|
|
@@ -43,7 +44,6 @@ export var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
|
43
44
|
_ref$headerZindexLoca = _ref.headerZindexLocation,
|
|
44
45
|
headerZindexLocation = _ref$headerZindexLoca === void 0 ? 'above' : _ref$headerZindexLoca,
|
|
45
46
|
maskRef = _ref.maskRef,
|
|
46
|
-
css = _ref.css,
|
|
47
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
48
|
|
|
49
49
|
var _useState = useState(null),
|
|
@@ -54,7 +54,7 @@ export var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
|
54
54
|
var combinedMaskRef = useCombinedRefs([setOverlayMaskNode, maskRef]);
|
|
55
55
|
var euiTheme = useEuiTheme();
|
|
56
56
|
var styles = euiOverlayMaskStyles(euiTheme);
|
|
57
|
-
var cssStyles = [styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]];
|
|
57
|
+
var cssStyles = cx([styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]]);
|
|
58
58
|
useEffect(function () {
|
|
59
59
|
if (!overlayMaskNode) return;
|
|
60
60
|
keysOf(rest).forEach(function (key) {
|
|
@@ -70,22 +70,16 @@ export var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
|
70
70
|
|
|
71
71
|
useEffect(function () {
|
|
72
72
|
if (!overlayMaskNode) return;
|
|
73
|
-
overlayMaskNode.className =
|
|
74
|
-
|
|
73
|
+
overlayMaskNode.className = cx('euiOverlayMask', cssStyles, className);
|
|
74
|
+
overlayMaskNode.dataset.relativeToHeader = headerZindexLocation;
|
|
75
|
+
}, [overlayMaskNode, className, cssStyles, headerZindexLocation]);
|
|
75
76
|
return ___EmotionJSX(EuiPortal, {
|
|
76
77
|
portalRef: combinedMaskRef
|
|
77
78
|
}, ___EmotionJSX(Global, {
|
|
78
79
|
styles: euiOverlayMaskBodyStyles
|
|
79
|
-
}), ___EmotionJSX(Global, {
|
|
80
|
-
styles: cssStyles
|
|
81
80
|
}), children);
|
|
82
81
|
};
|
|
83
82
|
EuiOverlayMask.propTypes = {
|
|
84
|
-
className: PropTypes.string,
|
|
85
|
-
"aria-label": PropTypes.string,
|
|
86
|
-
"data-test-subj": PropTypes.string,
|
|
87
|
-
css: PropTypes.any,
|
|
88
|
-
|
|
89
83
|
/**
|
|
90
84
|
* ReactNode to render as this component's content
|
|
91
85
|
*/
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
-
|
|
3
1
|
/*
|
|
4
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -7,22 +5,14 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
7
5
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
6
|
* Side Public License, v 1.
|
|
9
7
|
*/
|
|
10
|
-
import { css } from '@emotion/
|
|
8
|
+
import { css } from '@emotion/css';
|
|
11
9
|
import { logicalCSS, euiAnimFadeIn } from '../../global_styling';
|
|
12
10
|
import { transparentize } from '../../services';
|
|
13
11
|
export var euiOverlayMaskStyles = function euiOverlayMaskStyles(_ref) {
|
|
14
12
|
var euiTheme = _ref.euiTheme;
|
|
15
13
|
return {
|
|
16
|
-
euiOverlayMask: /*#__PURE__*/css("
|
|
17
|
-
aboveHeader: /*#__PURE__*/css("
|
|
18
|
-
belowHeader: /*#__PURE__*/css("
|
|
14
|
+
euiOverlayMask: /*#__PURE__*/css("position:fixed;", logicalCSS('top', 0), " ", logicalCSS('left', 0), " ", logicalCSS('right', 0), " ", logicalCSS('bottom', 0), " display:flex;align-items:center;justify-content:center;", logicalCSS('padding-bottom', '10vh'), ";animation:", euiAnimFadeIn, " ", euiTheme.animation.fast, " ease-in;background:", transparentize(euiTheme.colors.ink, 0.5), ";;label:euiOverlayMask;"),
|
|
15
|
+
aboveHeader: /*#__PURE__*/css("z-index:", euiTheme.levels.mask, ";;label:aboveHeader;"),
|
|
16
|
+
belowHeader: /*#__PURE__*/css("z-index:", euiTheme.levels.maskBelowHeader, ";", logicalCSS('top', "".concat(euiTheme.base * 3, "px")), ";;label:belowHeader;")
|
|
19
17
|
};
|
|
20
|
-
};
|
|
21
|
-
export var euiOverlayMaskBodyStyles = process.env.NODE_ENV === "production" ? {
|
|
22
|
-
name: "131160-euiOverlayMaskBodyStyles",
|
|
23
|
-
styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;"
|
|
24
|
-
} : {
|
|
25
|
-
name: "131160-euiOverlayMaskBodyStyles",
|
|
26
|
-
styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;",
|
|
27
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
18
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
export var euiOverlayMaskBodyStyles = process.env.NODE_ENV === "production" ? {
|
|
12
|
+
name: "131160-euiOverlayMaskBodyStyles",
|
|
13
|
+
styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;"
|
|
14
|
+
} : {
|
|
15
|
+
name: "131160-euiOverlayMaskBodyStyles",
|
|
16
|
+
styles: "body{overflow:hidden;};label:euiOverlayMaskBodyStyles;",
|
|
17
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
18
|
+
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import
|
|
9
|
+
import { cache as fallbackCache } from '@emotion/css';
|
|
10
10
|
import { EuiGlobalStyles } from '../../global_styling/reset/global_styles';
|
|
11
11
|
import { EuiUtilityClasses } from '../../global_styling/utility/utility';
|
|
12
12
|
import { EuiThemeProvider, CurrentEuiBreakpointProvider } from '../../services';
|
|
@@ -18,10 +18,6 @@ var isEmotionCacheObject = function isEmotionCacheObject(obj) {
|
|
|
18
18
|
return obj.hasOwnProperty('key');
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
var fallbackCache = createCache({
|
|
22
|
-
key: 'css'
|
|
23
|
-
});
|
|
24
|
-
fallbackCache.compat = true;
|
|
25
21
|
export var EuiProvider = function EuiProvider(_ref) {
|
|
26
22
|
var _defaultCache;
|
|
27
23
|
|
|
@@ -45,7 +45,7 @@ export var sizesOnly = function sizesOnly(panelObject) {
|
|
|
45
45
|
|
|
46
46
|
var _getPanelMinSize = function _getPanelMinSize(panelMinSize, containerSize) {
|
|
47
47
|
var panelMinSizePercent = 0;
|
|
48
|
-
var panelMinSizeInt =
|
|
48
|
+
var panelMinSizeInt = parseFloat(panelMinSize);
|
|
49
49
|
|
|
50
50
|
if (panelMinSize.indexOf('px') > -1) {
|
|
51
51
|
panelMinSizePercent = pxToPercent(panelMinSizeInt, containerSize);
|
|
@@ -75,7 +75,7 @@ var getSiblingPanel = function getSiblingPanel(element, adjacency) {
|
|
|
75
75
|
var sibling = element[method];
|
|
76
76
|
|
|
77
77
|
while (sibling) {
|
|
78
|
-
if (sibling.matches('.euiResizablePanel:not(
|
|
78
|
+
if (sibling.matches('.euiResizablePanel:not([data-collapsed])')) {
|
|
79
79
|
return sibling;
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -40,11 +40,8 @@ import { EuiResizableContainerContextProvider } from './context';
|
|
|
40
40
|
import { euiResizableButtonWithControls } from './resizable_button';
|
|
41
41
|
import { euiResizablePanelWithControls, getModeType } from './resizable_panel';
|
|
42
42
|
import { useContainerCallbacks, getPosition } from './helpers';
|
|
43
|
+
import { euiResizableContainerStyles } from './resizable_container.styles';
|
|
43
44
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
44
|
-
var containerDirections = {
|
|
45
|
-
vertical: 'vertical',
|
|
46
|
-
horizontal: 'horizontal'
|
|
47
|
-
};
|
|
48
45
|
var initialState = {
|
|
49
46
|
isDragging: false,
|
|
50
47
|
currentResizerPos: -1,
|
|
@@ -66,11 +63,10 @@ export var EuiResizableContainer = function EuiResizableContainer(_ref) {
|
|
|
66
63
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
67
64
|
|
|
68
65
|
var containerRef = useRef(null);
|
|
69
|
-
var isHorizontal = direction ===
|
|
70
|
-
var classes = classNames('euiResizableContainer',
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}, className);
|
|
66
|
+
var isHorizontal = direction === 'horizontal';
|
|
67
|
+
var classes = classNames('euiResizableContainer', className);
|
|
68
|
+
var styles = euiResizableContainerStyles();
|
|
69
|
+
var cssStyles = [styles.euiResizableContainer, styles[direction]];
|
|
74
70
|
|
|
75
71
|
var _useContainerCallback = useContainerCallbacks({
|
|
76
72
|
initialState: _objectSpread(_objectSpread({}, initialState), {}, {
|
|
@@ -243,6 +239,7 @@ export var EuiResizableContainer = function EuiResizableContainer(_ref) {
|
|
|
243
239
|
resizers: reducerState.resizers
|
|
244
240
|
}
|
|
245
241
|
}, ___EmotionJSX("div", _extends({
|
|
242
|
+
css: cssStyles,
|
|
246
243
|
className: classes,
|
|
247
244
|
ref: containerRef,
|
|
248
245
|
onMouseMove: reducerState.isDragging ? onMouseMove : undefined,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { logicalCSS } from '../../global_styling';
|
|
12
|
+
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "omnk2l-vertical",
|
|
15
|
+
styles: "flex-direction:column;label:vertical;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "omnk2l-vertical",
|
|
18
|
+
styles: "flex-direction:column;label:vertical;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export var euiResizableContainerStyles = function euiResizableContainerStyles() {
|
|
23
|
+
return {
|
|
24
|
+
euiResizableContainer: /*#__PURE__*/css("display:flex;", logicalCSS('width', '100%'), ";;label:euiResizableContainer;"),
|
|
25
|
+
horizontal: /*#__PURE__*/css(";label:horizontal;"),
|
|
26
|
+
vertical: _ref
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -25,20 +25,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
25
25
|
*/
|
|
26
26
|
import React, { useEffect, useMemo, useRef } from 'react';
|
|
27
27
|
import classNames from 'classnames';
|
|
28
|
+
import { useGeneratedHtmlId, useEuiTheme } from '../../services';
|
|
29
|
+
import { logicalSizeStyle, euiPaddingSize } from '../../global_styling';
|
|
28
30
|
import { useEuiResizableContainerContext } from './context';
|
|
29
|
-
import { useGeneratedHtmlId } from '../../services';
|
|
30
31
|
import { EuiPanel } from '../panel';
|
|
31
32
|
import { useEuiI18n } from '../i18n';
|
|
32
33
|
import { EuiResizableCollapseButton } from './resizable_collapse_button';
|
|
34
|
+
import { euiResizablePanelStyles, euiResizablePanelContentStyles } from './resizable_panel.styles';
|
|
33
35
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
34
|
-
var panelPaddingValues = {
|
|
35
|
-
none: 0,
|
|
36
|
-
xs: 4,
|
|
37
|
-
s: 8,
|
|
38
|
-
m: 16,
|
|
39
|
-
l: 24,
|
|
40
|
-
xl: 32
|
|
41
|
-
};
|
|
42
36
|
var defaultToggleOptions = {
|
|
43
37
|
className: null,
|
|
44
38
|
'data-test-subj': undefined,
|
|
@@ -50,12 +44,6 @@ export var getModeType = function getModeType(mode) {
|
|
|
50
44
|
export var getToggleOptions = function getToggleOptions(mode) {
|
|
51
45
|
return _typeof(mode) === 'object' ? _objectSpread(_objectSpread({}, defaultToggleOptions), mode[1]) : defaultToggleOptions;
|
|
52
46
|
};
|
|
53
|
-
var paddingSizeToClassNameMap = {
|
|
54
|
-
none: null,
|
|
55
|
-
s: 'euiResizablePanel--paddingSmall',
|
|
56
|
-
m: 'euiResizablePanel--paddingMedium',
|
|
57
|
-
l: 'euiResizablePanel--paddingLarge'
|
|
58
|
-
};
|
|
59
47
|
|
|
60
48
|
var getPosition = function getPosition(ref) {
|
|
61
49
|
var position = 'middle';
|
|
@@ -162,34 +150,18 @@ export var EuiResizablePanel = function EuiResizablePanel(_ref) {
|
|
|
162
150
|
|
|
163
151
|
return direction;
|
|
164
152
|
}, [isCollapsed, isCollapsible, position, panels, panelId]);
|
|
165
|
-
var
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
var
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
var
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
var dimensions;
|
|
178
|
-
|
|
179
|
-
if (size) {
|
|
180
|
-
dimensions = {
|
|
181
|
-
width: isHorizontal ? "".concat(size, "%") : '100%',
|
|
182
|
-
height: isHorizontal ? 'auto' : "".concat(size, "%")
|
|
183
|
-
};
|
|
184
|
-
} else {
|
|
185
|
-
dimensions = {
|
|
186
|
-
width: isHorizontal ? "".concat(innerSize, "%") : '100%',
|
|
187
|
-
height: isHorizontal ? 'auto' : "".concat(innerSize, "%")
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
var styles = _objectSpread(_objectSpread({}, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style), dimensions);
|
|
192
|
-
|
|
153
|
+
var axis = isHorizontal ? 'horizontal' : 'vertical';
|
|
154
|
+
var euiTheme = useEuiTheme();
|
|
155
|
+
var styles = euiResizablePanelStyles(euiTheme);
|
|
156
|
+
var cssStyles = [styles.euiResizablePanel, isCollapsed && styles.collapsed, styles.paddingSizes[wrapperPadding]];
|
|
157
|
+
var contentStyles = euiResizablePanelContentStyles(euiTheme);
|
|
158
|
+
var contentCssStyles = [contentStyles.euiResizablePanel__content, scrollable && contentStyles.scrollable, isCollapsed && contentStyles.collapsedChildren, isCollapsed && !isCollapsible && contentStyles[axis].collapsed, isCollapsible && contentStyles[axis].hasCollapsibleButton];
|
|
159
|
+
var classes = classNames('euiResizablePanel', wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.className);
|
|
160
|
+
var panelClasses = classNames('euiResizablePanel__content', className);
|
|
161
|
+
|
|
162
|
+
var inlineStyles = _objectSpread(_objectSpread({}, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style), isHorizontal ? logicalSizeStyle("".concat(size || innerSize, "%"), 'auto') : logicalSizeStyle('100%', "".concat(size || innerSize, "%")));
|
|
163
|
+
|
|
164
|
+
var padding = euiPaddingSize(euiTheme, paddingSize) || '0px';
|
|
193
165
|
useEffect(function () {
|
|
194
166
|
if (!registration) return;
|
|
195
167
|
var initSize = size !== null && size !== void 0 ? size : initialSize || 0;
|
|
@@ -241,7 +213,7 @@ export var EuiResizablePanel = function EuiResizablePanel(_ref) {
|
|
|
241
213
|
theResizer = resizers[resizerIds.current[0]];
|
|
242
214
|
theToggle = ___EmotionJSX(EuiResizableCollapseButton, {
|
|
243
215
|
externalPosition: "before",
|
|
244
|
-
direction:
|
|
216
|
+
direction: axis,
|
|
245
217
|
isVisible: theResizer && (theResizer.isFocused || theResizer.isDisabled),
|
|
246
218
|
isCollapsed: theResizer && theResizer.isDisabled,
|
|
247
219
|
internalPosition: toggleOpts.position,
|
|
@@ -253,7 +225,7 @@ export var EuiResizablePanel = function EuiResizablePanel(_ref) {
|
|
|
253
225
|
theResizer = resizers[resizerIds.current[1]];
|
|
254
226
|
theToggle = ___EmotionJSX(EuiResizableCollapseButton, {
|
|
255
227
|
externalPosition: "after",
|
|
256
|
-
direction:
|
|
228
|
+
direction: axis,
|
|
257
229
|
isVisible: theResizer && (theResizer.isFocused || theResizer.isDisabled),
|
|
258
230
|
isCollapsed: theResizer && theResizer.isDisabled,
|
|
259
231
|
internalPosition: toggleOpts.position,
|
|
@@ -263,12 +235,17 @@ export var EuiResizablePanel = function EuiResizablePanel(_ref) {
|
|
|
263
235
|
});
|
|
264
236
|
}
|
|
265
237
|
|
|
266
|
-
return ___EmotionJSX("div", _extends({
|
|
238
|
+
return ___EmotionJSX("div", _extends({
|
|
239
|
+
css: cssStyles
|
|
240
|
+
}, wrapperProps, {
|
|
267
241
|
id: panelId,
|
|
268
242
|
ref: divRef,
|
|
269
|
-
style:
|
|
270
|
-
className: classes
|
|
243
|
+
style: inlineStyles,
|
|
244
|
+
className: classes,
|
|
245
|
+
"data-collapsed": isCollapsed || undefined,
|
|
246
|
+
"data-position": position
|
|
271
247
|
}), hasVisibleToggle && hasLeftToggle && theToggle, ___EmotionJSX(EuiPanel, _extends({
|
|
248
|
+
css: contentCssStyles,
|
|
272
249
|
className: panelClasses,
|
|
273
250
|
hasShadow: hasShadow,
|
|
274
251
|
borderRadius: borderRadius,
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
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)."; }
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
12
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
13
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
|
+
* Side Public License, v 1.
|
|
15
|
+
*/
|
|
16
|
+
import { css } from '@emotion/react';
|
|
17
|
+
import { logicalCSS, logicalCSSWithFallback, euiScrollBarStyles, euiPaddingSizeCSS } from '../../global_styling';
|
|
18
|
+
|
|
19
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
20
|
+
name: "11qmbh3-collapsed",
|
|
21
|
+
styles: "overflow:hidden;label:collapsed;"
|
|
22
|
+
} : {
|
|
23
|
+
name: "11qmbh3-collapsed",
|
|
24
|
+
styles: "overflow:hidden;label:collapsed;",
|
|
25
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
29
|
+
name: "15ifdgc-euiResizablePanel",
|
|
30
|
+
styles: "position:relative;label:euiResizablePanel;"
|
|
31
|
+
} : {
|
|
32
|
+
name: "15ifdgc-euiResizablePanel",
|
|
33
|
+
styles: "position:relative;label:euiResizablePanel;",
|
|
34
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export var euiResizablePanelStyles = function euiResizablePanelStyles(euiThemeContext) {
|
|
38
|
+
return {
|
|
39
|
+
euiResizablePanel: _ref3,
|
|
40
|
+
collapsed: _ref2,
|
|
41
|
+
paddingSizes: _objectSpread({}, euiPaddingSizeCSS(euiThemeContext))
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
46
|
+
name: "597kt8-collapsedChildren",
|
|
47
|
+
styles: "*{display:none;};label:collapsedChildren;"
|
|
48
|
+
} : {
|
|
49
|
+
name: "597kt8-collapsedChildren",
|
|
50
|
+
styles: "*{display:none;};label:collapsedChildren;",
|
|
51
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export var euiResizablePanelContentStyles = function euiResizablePanelContentStyles(euiThemeContext) {
|
|
55
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
56
|
+
return {
|
|
57
|
+
euiResizablePanel__content: /*#__PURE__*/css(logicalCSS('height', '100%'), ";;label:euiResizablePanel__content;"),
|
|
58
|
+
scrollable: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " ", logicalCSSWithFallback('overflow-y', 'auto'), ";;label:scrollable;"),
|
|
59
|
+
collapsedChildren: _ref,
|
|
60
|
+
horizontal: {
|
|
61
|
+
collapsed: /*#__PURE__*/css(logicalCSS('min-width', '0 !important'), ";;label:collapsed;"),
|
|
62
|
+
hasCollapsibleButton: /*#__PURE__*/css(logicalCSS('min-width', "".concat(euiTheme.size.l, " !important")), ";;label:hasCollapsibleButton;")
|
|
63
|
+
},
|
|
64
|
+
vertical: {
|
|
65
|
+
collapsed: /*#__PURE__*/css(logicalCSS('min-height', '0 !important'), ";;label:collapsed;"),
|
|
66
|
+
hasCollapsibleButton: /*#__PURE__*/css(logicalCSS('min-height', "".concat(euiTheme.size.l, " !important")), ";;label:hasCollapsibleButton;")
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -283,6 +283,10 @@ var arrayIncludesValue = function arrayIncludesValue(array, value) {
|
|
|
283
283
|
return valuesEqual(item, value);
|
|
284
284
|
});
|
|
285
285
|
};
|
|
286
|
+
|
|
287
|
+
var mustToMatch = function mustToMatch(must) {
|
|
288
|
+
return must === true ? Match.MUST : Match.MUST_NOT;
|
|
289
|
+
};
|
|
286
290
|
/**
|
|
287
291
|
* The AST structure is an array of clauses. There are 3 types of clauses that are supported:
|
|
288
292
|
*
|
|
@@ -407,9 +411,16 @@ export var _AST = /*#__PURE__*/function () {
|
|
|
407
411
|
}
|
|
408
412
|
}, {
|
|
409
413
|
key: "getOrFieldClause",
|
|
410
|
-
value: function getOrFieldClause(field, value) {
|
|
414
|
+
value: function getOrFieldClause(field, value, must, operator) {
|
|
411
415
|
return this.getFieldClause(field, function (clause) {
|
|
412
|
-
|
|
416
|
+
if (!isArray(clause.value)) {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
var matchValue = isNil(value) || arrayIncludesValue(clause.value, value);
|
|
421
|
+
var matchMust = isNil(must) || mustToMatch(must) === clause.match;
|
|
422
|
+
var matchOperator = isNil(operator) || operator === clause.operator;
|
|
423
|
+
return matchValue && matchMust && matchOperator;
|
|
413
424
|
});
|
|
414
425
|
}
|
|
415
426
|
}, {
|
|
@@ -417,7 +428,7 @@ export var _AST = /*#__PURE__*/function () {
|
|
|
417
428
|
value: function addOrFieldValue(field, value) {
|
|
418
429
|
var must = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
419
430
|
var operator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Operator.EQ;
|
|
420
|
-
var existingClause = this.getOrFieldClause(field);
|
|
431
|
+
var existingClause = this.getOrFieldClause(field, undefined, must, operator);
|
|
421
432
|
|
|
422
433
|
if (!existingClause) {
|
|
423
434
|
var newClause = must ? Field.must[operator](field, [value]) : Field.mustNot[operator](field, [value]);
|
|
@@ -280,7 +280,7 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
280
280
|
toolTipStyles = _this$state.toolTipStyles,
|
|
281
281
|
visible = _this$state.visible,
|
|
282
282
|
calculatedPosition = _this$state.calculatedPosition;
|
|
283
|
-
var classes = classNames('euiToolTip',
|
|
283
|
+
var classes = classNames('euiToolTip', className);
|
|
284
284
|
var anchorClasses = classNames(anchorClassName, anchorProps === null || anchorProps === void 0 ? void 0 : anchorProps.className);
|
|
285
285
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiToolTipAnchor, _extends({}, anchorProps, {
|
|
286
286
|
ref: this.setAnchorRef,
|
|
@@ -303,7 +303,8 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
303
303
|
calculatedPosition: calculatedPosition
|
|
304
304
|
}, rest), ___EmotionJSX(EuiToolTipArrow, {
|
|
305
305
|
style: arrowStyles,
|
|
306
|
-
className: "euiToolTip__arrow"
|
|
306
|
+
className: "euiToolTip__arrow",
|
|
307
|
+
position: calculatedPosition
|
|
307
308
|
}), ___EmotionJSX(EuiResizeObserver, {
|
|
308
309
|
onResize: this.positionToolTip
|
|
309
310
|
}, function (resizeRef) {
|