@elastic/eui 59.1.0-rc1 → 59.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +42 -7
- package/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/es/components/avatar/avatar.js +7 -9
- package/es/components/bottom_bar/bottom_bar.js +9 -8
- package/es/components/breadcrumbs/breadcrumbs.js +1 -2
- package/es/components/call_out/call_out.js +8 -9
- package/es/components/expression/expression.js +10 -11
- package/es/components/facet/facet_button.js +8 -9
- package/es/components/facet/facet_group.js +7 -8
- package/es/components/health/health.js +6 -7
- package/es/components/horizontal_rule/horizontal_rule.js +6 -7
- package/es/components/link/link.js +7 -8
- package/es/components/loading/loading_chart.js +6 -7
- package/es/components/loading/loading_content.js +6 -7
- package/es/components/loading/loading_logo.js +6 -7
- package/es/components/loading/loading_spinner.js +6 -7
- package/es/components/mark/mark.js +8 -9
- package/es/components/markdown_editor/markdown_format.js +6 -7
- package/es/components/panel/panel.js +7 -8
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +5 -39
- package/es/components/spacer/spacer.js +6 -7
- package/es/components/text/text.js +6 -7
- package/es/components/text/text_color.js +6 -7
- package/es/components/timeline/timeline_item.js +6 -7
- package/es/components/timeline/timeline_item_icon.js +6 -7
- package/es/components/title/title.js +6 -7
- package/es/services/theme/hooks.js +2 -2
- package/es/services/theme/provider.js +5 -1
- package/{optimize/es/components/provider/cache → es/themes/amsterdam}/index.js +2 -2
- package/es/themes/index.js +2 -1
- package/eui.d.ts +337 -827
- package/i18ntokens.json +12 -12
- package/lib/components/accessibility/skip_link/skip_link.js +45 -11
- package/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/lib/components/avatar/avatar.js +8 -12
- package/lib/components/bottom_bar/bottom_bar.js +6 -9
- package/lib/components/breadcrumbs/breadcrumbs.js +1 -2
- package/lib/components/call_out/call_out.js +10 -14
- package/lib/components/expression/expression.js +12 -14
- package/lib/components/facet/facet_button.js +10 -12
- package/lib/components/facet/facet_group.js +9 -11
- package/lib/components/health/health.js +8 -10
- package/lib/components/horizontal_rule/horizontal_rule.js +8 -10
- package/lib/components/link/link.js +7 -13
- package/lib/components/loading/loading_chart.js +8 -10
- package/lib/components/loading/loading_content.js +8 -10
- package/lib/components/loading/loading_logo.js +8 -10
- package/lib/components/loading/loading_spinner.js +8 -10
- package/lib/components/mark/mark.js +10 -12
- package/lib/components/markdown_editor/markdown_format.js +8 -10
- package/lib/components/panel/panel.js +9 -11
- package/lib/components/provider/index.js +7 -12
- package/lib/components/provider/provider.js +5 -40
- package/lib/components/spacer/spacer.js +8 -10
- package/lib/components/text/text.js +8 -10
- package/lib/components/text/text_color.js +8 -10
- package/lib/components/timeline/timeline_item.js +8 -10
- package/lib/components/timeline/timeline_item_icon.js +8 -10
- package/lib/components/title/title.js +9 -11
- package/lib/services/theme/hooks.js +2 -2
- package/lib/services/theme/provider.js +6 -3
- package/{test-env/components/provider/system → lib/themes/amsterdam}/index.js +4 -4
- package/lib/themes/index.js +21 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +27 -6
- package/optimize/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/es/components/avatar/avatar.js +5 -7
- package/optimize/es/components/bottom_bar/bottom_bar.js +9 -8
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +1 -2
- package/optimize/es/components/call_out/call_out.js +7 -8
- package/optimize/es/components/expression/expression.js +9 -10
- package/optimize/es/components/facet/facet_button.js +7 -8
- package/optimize/es/components/facet/facet_group.js +6 -7
- package/optimize/es/components/health/health.js +5 -6
- package/optimize/es/components/horizontal_rule/horizontal_rule.js +5 -6
- package/optimize/es/components/link/link.js +6 -7
- package/optimize/es/components/loading/loading_chart.js +5 -6
- package/optimize/es/components/loading/loading_content.js +5 -6
- package/optimize/es/components/loading/loading_logo.js +5 -6
- package/optimize/es/components/loading/loading_spinner.js +5 -6
- package/optimize/es/components/mark/mark.js +7 -8
- package/optimize/es/components/markdown_editor/markdown_format.js +5 -6
- package/optimize/es/components/panel/panel.js +6 -7
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +5 -39
- package/optimize/es/components/spacer/spacer.js +5 -6
- package/optimize/es/components/text/text.js +5 -6
- package/optimize/es/components/text/text_color.js +5 -6
- package/optimize/es/components/timeline/timeline_item.js +5 -6
- package/optimize/es/components/timeline/timeline_item_icon.js +5 -6
- package/optimize/es/components/title/title.js +5 -6
- package/optimize/es/services/theme/hooks.js +2 -2
- package/optimize/es/services/theme/provider.js +5 -1
- package/optimize/es/{components/provider/system → themes/amsterdam}/index.js +2 -1
- package/optimize/es/themes/index.js +2 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +30 -8
- package/optimize/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/lib/components/avatar/avatar.js +5 -9
- package/optimize/lib/components/bottom_bar/bottom_bar.js +6 -9
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +1 -2
- package/optimize/lib/components/call_out/call_out.js +9 -13
- package/optimize/lib/components/expression/expression.js +9 -11
- package/optimize/lib/components/facet/facet_button.js +7 -9
- package/optimize/lib/components/facet/facet_group.js +6 -8
- package/optimize/lib/components/health/health.js +5 -7
- package/optimize/lib/components/horizontal_rule/horizontal_rule.js +5 -7
- package/optimize/lib/components/link/link.js +6 -12
- package/optimize/lib/components/loading/loading_chart.js +5 -7
- package/optimize/lib/components/loading/loading_content.js +5 -7
- package/optimize/lib/components/loading/loading_logo.js +5 -7
- package/optimize/lib/components/loading/loading_spinner.js +5 -7
- package/optimize/lib/components/mark/mark.js +7 -9
- package/optimize/lib/components/markdown_editor/markdown_format.js +5 -7
- package/optimize/lib/components/panel/panel.js +6 -8
- package/optimize/lib/components/provider/index.js +7 -12
- package/optimize/lib/components/provider/provider.js +5 -40
- package/optimize/lib/components/spacer/spacer.js +5 -7
- package/optimize/lib/components/text/text.js +5 -7
- package/optimize/lib/components/text/text_color.js +5 -7
- package/optimize/lib/components/timeline/timeline_item.js +5 -7
- package/optimize/lib/components/timeline/timeline_item_icon.js +5 -7
- package/optimize/lib/components/title/title.js +6 -8
- package/optimize/lib/services/theme/hooks.js +2 -2
- package/optimize/lib/services/theme/provider.js +6 -3
- package/{lib/components/provider/system → optimize/lib/themes/amsterdam}/index.js +4 -4
- package/optimize/lib/themes/index.js +21 -1
- package/package.json +1 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +46 -11
- package/test-env/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/test-env/components/avatar/avatar.js +8 -12
- package/test-env/components/bottom_bar/bottom_bar.js +6 -9
- package/test-env/components/breadcrumbs/breadcrumbs.js +1 -2
- package/test-env/components/call_out/call_out.js +10 -14
- package/test-env/components/expression/expression.js +12 -14
- package/test-env/components/facet/facet_button.js +10 -12
- package/test-env/components/facet/facet_group.js +9 -11
- package/test-env/components/health/health.js +8 -10
- package/test-env/components/horizontal_rule/horizontal_rule.js +8 -10
- package/test-env/components/link/link.js +7 -13
- package/test-env/components/loading/loading_chart.js +8 -10
- package/test-env/components/loading/loading_content.js +8 -10
- package/test-env/components/loading/loading_logo.js +8 -10
- package/test-env/components/loading/loading_spinner.js +8 -10
- package/test-env/components/mark/mark.js +10 -12
- package/test-env/components/markdown_editor/markdown_format.js +8 -10
- package/test-env/components/panel/panel.js +9 -11
- package/test-env/components/provider/index.js +7 -12
- package/test-env/components/provider/provider.js +5 -40
- package/test-env/components/spacer/spacer.js +8 -10
- package/test-env/components/text/text.js +8 -10
- package/test-env/components/text/text_color.js +8 -10
- package/test-env/components/timeline/timeline_item.js +8 -10
- package/test-env/components/timeline/timeline_item_icon.js +8 -10
- package/test-env/components/title/title.js +9 -11
- package/test-env/services/theme/hooks.js +2 -2
- package/test-env/services/theme/provider.js +6 -3
- package/{optimize/lib/components/provider/system → test-env/themes/amsterdam}/index.js +4 -4
- package/test-env/themes/index.js +21 -1
- package/es/components/provider/cache/cache_context.js +0 -12
- package/es/components/provider/cache/cache_provider.js +0 -17
- package/es/components/provider/cache/index.js +0 -9
- package/es/components/provider/system/index.js +0 -8
- package/es/components/provider/system/system.js +0 -33
- package/es/global_styling/utility/utility.js +0 -27
- package/lib/components/provider/cache/cache_context.js +0 -24
- package/lib/components/provider/cache/cache_provider.js +0 -29
- package/lib/components/provider/cache/index.js +0 -31
- package/lib/components/provider/system/system.js +0 -45
- package/lib/global_styling/utility/utility.js +0 -31
- package/optimize/es/components/provider/cache/cache_context.js +0 -12
- package/optimize/es/components/provider/cache/cache_provider.js +0 -17
- package/optimize/es/components/provider/system/system.js +0 -33
- package/optimize/es/global_styling/utility/utility.js +0 -27
- package/optimize/lib/components/provider/cache/cache_context.js +0 -24
- package/optimize/lib/components/provider/cache/cache_provider.js +0 -29
- package/optimize/lib/components/provider/cache/index.js +0 -31
- package/optimize/lib/components/provider/system/system.js +0 -54
- package/optimize/lib/global_styling/utility/utility.js +0 -31
- package/test-env/components/provider/cache/cache_context.js +0 -24
- package/test-env/components/provider/cache/cache_provider.js +0 -29
- package/test-env/components/provider/cache/index.js +0 -31
- package/test-env/components/provider/system/system.js +0 -54
- package/test-env/global_styling/utility/utility.js +0 -31
package/i18ntokens.json
CHANGED
|
@@ -181,11 +181,11 @@
|
|
|
181
181
|
"highlighting": "string",
|
|
182
182
|
"loc": {
|
|
183
183
|
"start": {
|
|
184
|
-
"line":
|
|
184
|
+
"line": 181,
|
|
185
185
|
"column": 8
|
|
186
186
|
},
|
|
187
187
|
"end": {
|
|
188
|
-
"line":
|
|
188
|
+
"line": 184,
|
|
189
189
|
"column": 9
|
|
190
190
|
}
|
|
191
191
|
},
|
|
@@ -197,11 +197,11 @@
|
|
|
197
197
|
"highlighting": "string",
|
|
198
198
|
"loc": {
|
|
199
199
|
"start": {
|
|
200
|
-
"line":
|
|
200
|
+
"line": 211,
|
|
201
201
|
"column": 14
|
|
202
202
|
},
|
|
203
203
|
"end": {
|
|
204
|
-
"line":
|
|
204
|
+
"line": 215,
|
|
205
205
|
"column": 16
|
|
206
206
|
}
|
|
207
207
|
},
|
|
@@ -213,11 +213,11 @@
|
|
|
213
213
|
"highlighting": "string",
|
|
214
214
|
"loc": {
|
|
215
215
|
"start": {
|
|
216
|
-
"line":
|
|
216
|
+
"line": 217,
|
|
217
217
|
"column": 14
|
|
218
218
|
},
|
|
219
219
|
"end": {
|
|
220
|
-
"line":
|
|
220
|
+
"line": 220,
|
|
221
221
|
"column": 16
|
|
222
222
|
}
|
|
223
223
|
},
|
|
@@ -3749,11 +3749,11 @@
|
|
|
3749
3749
|
"highlighting": "string",
|
|
3750
3750
|
"loc": {
|
|
3751
3751
|
"start": {
|
|
3752
|
-
"line":
|
|
3752
|
+
"line": 107,
|
|
3753
3753
|
"column": 10
|
|
3754
3754
|
},
|
|
3755
3755
|
"end": {
|
|
3756
|
-
"line":
|
|
3756
|
+
"line": 110,
|
|
3757
3757
|
"column": 12
|
|
3758
3758
|
}
|
|
3759
3759
|
},
|
|
@@ -3765,11 +3765,11 @@
|
|
|
3765
3765
|
"highlighting": "string",
|
|
3766
3766
|
"loc": {
|
|
3767
3767
|
"start": {
|
|
3768
|
-
"line":
|
|
3768
|
+
"line": 117,
|
|
3769
3769
|
"column": 20
|
|
3770
3770
|
},
|
|
3771
3771
|
"end": {
|
|
3772
|
-
"line":
|
|
3772
|
+
"line": 117,
|
|
3773
3773
|
"column": 77
|
|
3774
3774
|
}
|
|
3775
3775
|
},
|
|
@@ -3829,11 +3829,11 @@
|
|
|
3829
3829
|
"highlighting": "string",
|
|
3830
3830
|
"loc": {
|
|
3831
3831
|
"start": {
|
|
3832
|
-
"line":
|
|
3832
|
+
"line": 37,
|
|
3833
3833
|
"column": 27
|
|
3834
3834
|
},
|
|
3835
3835
|
"end": {
|
|
3836
|
-
"line":
|
|
3836
|
+
"line": 37,
|
|
3837
3837
|
"column": 77
|
|
3838
3838
|
}
|
|
3839
3839
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.POSITIONS = exports.EuiSkipLink = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,9 +11,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _services = require("../../../services");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _button = require("../../button/button");
|
|
17
17
|
|
|
18
18
|
var _screen_reader_only = require("../screen_reader_only");
|
|
19
19
|
|
|
@@ -21,12 +21,18 @@ var _skip_link = require("./skip_link.styles");
|
|
|
21
21
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["destinationId", "tabIndex", "position", "children", "className"
|
|
24
|
+
var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
28
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
30
36
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
37
|
|
|
32
38
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -34,16 +40,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
34
40
|
var POSITIONS = ['static', 'fixed', 'absolute'];
|
|
35
41
|
exports.POSITIONS = POSITIONS;
|
|
36
42
|
|
|
37
|
-
var
|
|
43
|
+
var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
38
44
|
var destinationId = _ref.destinationId,
|
|
45
|
+
overrideLinkBehavior = _ref.overrideLinkBehavior,
|
|
39
46
|
tabIndex = _ref.tabIndex,
|
|
40
47
|
_ref$position = _ref.position,
|
|
41
48
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
42
49
|
children = _ref.children,
|
|
43
50
|
className = _ref.className,
|
|
44
|
-
euiTheme = _ref.euiTheme,
|
|
45
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
46
52
|
|
|
53
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
47
54
|
var styles = (0, _skip_link.euiSkipLinkStyles)(euiTheme);
|
|
48
55
|
var classes = (0, _classnames.default)('euiSkipLink', className);
|
|
49
56
|
var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
|
|
@@ -56,6 +63,22 @@ var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
56
63
|
};
|
|
57
64
|
}
|
|
58
65
|
|
|
66
|
+
if (overrideLinkBehavior) {
|
|
67
|
+
optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
|
|
68
|
+
onClick: function onClick(e) {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
var destinationEl = document.getElementById(destinationId);
|
|
71
|
+
if (!destinationEl) return;
|
|
72
|
+
destinationEl.scrollIntoView();
|
|
73
|
+
destinationEl.tabIndex = -1; // Ensure the destination content is focusable
|
|
74
|
+
|
|
75
|
+
destinationEl.focus({
|
|
76
|
+
preventScroll: true
|
|
77
|
+
}); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
59
82
|
return (0, _react2.jsx)(_screen_reader_only.EuiScreenReaderOnly, {
|
|
60
83
|
showOnFocus: true
|
|
61
84
|
}, (0, _react2.jsx)(_button.EuiButton, _extends({
|
|
@@ -67,8 +90,8 @@ var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
67
90
|
}, optionalProps, rest), children));
|
|
68
91
|
};
|
|
69
92
|
|
|
70
|
-
exports.
|
|
71
|
-
|
|
93
|
+
exports.EuiSkipLink = EuiSkipLink;
|
|
94
|
+
EuiSkipLink.propTypes = {
|
|
72
95
|
href: _propTypes.default.string,
|
|
73
96
|
onClick: _propTypes.default.func,
|
|
74
97
|
|
|
@@ -94,6 +117,19 @@ _EuiSkipLink.propTypes = {
|
|
|
94
117
|
*/
|
|
95
118
|
destinationId: _propTypes.default.string.isRequired,
|
|
96
119
|
|
|
120
|
+
/**
|
|
121
|
+
* If default HTML anchor link behavior is not desired (e.g. for SPAs with hash routing),
|
|
122
|
+
* setting this flag to true will manually scroll to and focus the destination element
|
|
123
|
+
* without changing the browser URL's hash
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* If default HTML anchor link behavior is not desired (e.g. for SPAs with hash routing),
|
|
128
|
+
* setting this flag to true will manually scroll to and focus the destination element
|
|
129
|
+
* without changing the browser URL's hash
|
|
130
|
+
*/
|
|
131
|
+
overrideLinkBehavior: _propTypes.default.bool,
|
|
132
|
+
|
|
97
133
|
/**
|
|
98
134
|
* When position is fixed, this is forced to `0`
|
|
99
135
|
*/
|
|
@@ -177,6 +213,4 @@ _EuiSkipLink.propTypes = {
|
|
|
177
213
|
"aria-label": _propTypes.default.string,
|
|
178
214
|
"data-test-subj": _propTypes.default.string,
|
|
179
215
|
buttonRef: _propTypes.default.any
|
|
180
|
-
};
|
|
181
|
-
var EuiSkipLink = (0, _system.withEuiSystem)(_EuiSkipLink);
|
|
182
|
-
exports.EuiSkipLink = EuiSkipLink;
|
|
216
|
+
};
|
|
@@ -35,7 +35,7 @@ var euiSkipLinkStyles = function euiSkipLinkStyles(_ref3) {
|
|
|
35
35
|
// Set positions on focus only as to not override screenReaderOnly position
|
|
36
36
|
// When positioned absolutely, consumers still need to tell it WHERE (top,left,etc...)
|
|
37
37
|
absolute: _ref,
|
|
38
|
-
fixed: /*#__PURE__*/(0, _react.css)("
|
|
38
|
+
fixed: /*#__PURE__*/(0, _react.css)("position:fixed!important;&:focus{inset-block-start:", euiTheme.size.xs, ";inset-inline-start:", euiTheme.size.xs, ";z-index:", Number(euiTheme.levels.header) + 1, ";};label:fixed;")
|
|
39
39
|
};
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.checkValidColor = exports.
|
|
6
|
+
exports.checkValidColor = exports.TYPES = exports.SIZES = exports.EuiAvatar = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -13,8 +13,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _color = require("../../services/color");
|
|
15
15
|
|
|
16
|
-
var _system = require("../provider/system");
|
|
17
|
-
|
|
18
16
|
var _services = require("../../services");
|
|
19
17
|
|
|
20
18
|
var _icon = require("../icon");
|
|
@@ -23,7 +21,7 @@ var _avatar = require("./avatar.styles");
|
|
|
23
21
|
|
|
24
22
|
var _react2 = require("@emotion/react");
|
|
25
23
|
|
|
26
|
-
var _excluded = ["className", "color", "
|
|
24
|
+
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
27
25
|
|
|
28
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
27
|
|
|
@@ -52,12 +50,11 @@ exports.SIZES = SIZES;
|
|
|
52
50
|
var TYPES = ['space', 'user'];
|
|
53
51
|
exports.TYPES = TYPES;
|
|
54
52
|
|
|
55
|
-
var
|
|
53
|
+
var EuiAvatar = function EuiAvatar(_ref) {
|
|
56
54
|
var _classNames;
|
|
57
55
|
|
|
58
56
|
var className = _ref.className,
|
|
59
57
|
color = _ref.color,
|
|
60
|
-
euiTheme = _ref.euiTheme,
|
|
61
58
|
imageUrl = _ref.imageUrl,
|
|
62
59
|
initials = _ref.initials,
|
|
63
60
|
initialsLength = _ref.initialsLength,
|
|
@@ -74,6 +71,7 @@ var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
74
71
|
style = _ref.style,
|
|
75
72
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
76
73
|
|
|
74
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
77
75
|
var styles = (0, _avatar.euiAvatarStyles)(euiTheme);
|
|
78
76
|
var visColors = (0, _services.euiPaletteColorBlindBehindText)();
|
|
79
77
|
var isPlain = color === 'plain';
|
|
@@ -126,10 +124,11 @@ var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
126
124
|
role: isDisabled ? 'presentation' : 'img',
|
|
127
125
|
title: name
|
|
128
126
|
}, rest), content);
|
|
129
|
-
};
|
|
127
|
+
}; // TODO: Migrate to a service
|
|
128
|
+
|
|
130
129
|
|
|
131
|
-
exports.
|
|
132
|
-
|
|
130
|
+
exports.EuiAvatar = EuiAvatar;
|
|
131
|
+
EuiAvatar.propTypes = {
|
|
133
132
|
className: _propTypes.default.string,
|
|
134
133
|
"aria-label": _propTypes.default.string,
|
|
135
134
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -190,9 +189,6 @@ _EuiAvatar.propTypes = {
|
|
|
190
189
|
*/
|
|
191
190
|
isDisabled: _propTypes.default.bool
|
|
192
191
|
};
|
|
193
|
-
var EuiAvatar = (0, _system.withEuiSystem)(_EuiAvatar); // TODO: Migrate to a service
|
|
194
|
-
|
|
195
|
-
exports.EuiAvatar = EuiAvatar;
|
|
196
192
|
|
|
197
193
|
var checkValidColor = function checkValidColor(color) {
|
|
198
194
|
var validHex = color && (0, _color.isValidHex)(color) || color === 'plain' || color === 'subdued';
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.paddingSizeToClassNameMap = exports.
|
|
8
|
+
exports.paddingSizeToClassNameMap = exports.POSITIONS = exports.EuiBottomBar = void 0;
|
|
9
9
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
|
|
@@ -23,15 +23,13 @@ var _resize_observer = require("../observer/resize_observer");
|
|
|
23
23
|
|
|
24
24
|
var _portal = require("../portal");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _bottom_bar = require("./bottom_bar.styles");
|
|
27
27
|
|
|
28
28
|
var _provider = require("../../services/theme/provider");
|
|
29
29
|
|
|
30
|
-
var _bottom_bar = require("./bottom_bar.styles");
|
|
31
|
-
|
|
32
30
|
var _react2 = require("@emotion/react");
|
|
33
31
|
|
|
34
|
-
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"
|
|
32
|
+
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
|
|
35
33
|
|
|
36
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
35
|
|
|
@@ -95,9 +93,9 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
95
93
|
bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
|
|
96
94
|
top = _ref.top,
|
|
97
95
|
style = _ref.style,
|
|
98
|
-
euiTheme = _ref.euiTheme,
|
|
99
96
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
100
97
|
|
|
98
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
101
99
|
var styles = (0, _bottom_bar.euiBottomBarStyles)(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
|
|
102
100
|
|
|
103
101
|
affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
|
|
@@ -171,7 +169,6 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
171
169
|
return usePortal ? (0, _react2.jsx)(_portal.EuiPortal, null, bar) : bar;
|
|
172
170
|
});
|
|
173
171
|
|
|
174
|
-
exports._EuiBottomBar = _EuiBottomBar;
|
|
175
172
|
_EuiBottomBar.propTypes = {
|
|
176
173
|
className: _propTypes.default.string,
|
|
177
174
|
"aria-label": _propTypes.default.string,
|
|
@@ -236,9 +233,9 @@ _EuiBottomBar.propTypes = {
|
|
|
236
233
|
left: _propTypes.default.any
|
|
237
234
|
};
|
|
238
235
|
var EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
239
|
-
var BottomBar =
|
|
236
|
+
var BottomBar = _EuiBottomBar;
|
|
240
237
|
return (0, _react2.jsx)(_provider.EuiThemeProvider, {
|
|
241
|
-
colorMode:
|
|
238
|
+
colorMode: 'dark'
|
|
242
239
|
}, (0, _react2.jsx)(BottomBar, _extends({
|
|
243
240
|
ref: ref
|
|
244
241
|
}, props)));
|
|
@@ -197,8 +197,7 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
197
197
|
}, linkProps, breadcrumbRest), text);
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
return (0, _react2.jsx)(_link.EuiLink
|
|
201
|
-
, _extends({
|
|
200
|
+
return (0, _react2.jsx)(_link.EuiLink, _extends({
|
|
202
201
|
ref: ref,
|
|
203
202
|
color: isLastBreadcrumb ? 'text' : 'subdued',
|
|
204
203
|
onClick: onClick,
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.HEADINGS = exports.EuiCallOut = exports.COLORS = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ var _icon = require("../icon");
|
|
|
17
17
|
|
|
18
18
|
var _text = require("../text");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _services = require("../../services");
|
|
21
21
|
|
|
22
22
|
var _panel = require("../panel");
|
|
23
23
|
|
|
@@ -27,7 +27,7 @@ var _call_out = require("./call_out.styles");
|
|
|
27
27
|
|
|
28
28
|
var _react2 = require("@emotion/react");
|
|
29
29
|
|
|
30
|
-
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"
|
|
30
|
+
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"];
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
@@ -47,8 +47,7 @@ var COLORS = ['primary', 'success', 'warning', 'danger'];
|
|
|
47
47
|
exports.COLORS = COLORS;
|
|
48
48
|
var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
|
|
49
49
|
exports.HEADINGS = HEADINGS;
|
|
50
|
-
|
|
51
|
-
var _EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
50
|
+
var EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
52
51
|
var title = _ref.title,
|
|
53
52
|
_ref$color = _ref.color,
|
|
54
53
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
@@ -59,14 +58,14 @@ var _EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
59
58
|
className = _ref.className,
|
|
60
59
|
_ref$heading = _ref.heading,
|
|
61
60
|
heading = _ref$heading === void 0 ? 'p' : _ref$heading,
|
|
62
|
-
euiTheme = _ref.euiTheme,
|
|
63
61
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
64
62
|
|
|
65
|
-
var
|
|
63
|
+
var theme = (0, _services.useEuiTheme)();
|
|
64
|
+
var styles = (0, _call_out.euiCallOutStyles)(theme);
|
|
66
65
|
var cssStyles = [styles.euiCallOut];
|
|
67
66
|
var cssIconStyle = [styles.euiCallOut__icon];
|
|
68
67
|
var cssDescriptionStyle = [styles.euiCallOut__description];
|
|
69
|
-
var headerStyles = (0, _call_out.euiCallOutHeadingStyles)(
|
|
68
|
+
var headerStyles = (0, _call_out.euiCallOutHeadingStyles)(theme);
|
|
70
69
|
var cssHeaderStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
|
|
71
70
|
var classes = (0, _classnames.default)('euiCallOut', _defineProperty({}, "euiCallOut--".concat(color), color), className);
|
|
72
71
|
var headerIcon;
|
|
@@ -114,9 +113,8 @@ var _EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
114
113
|
grow: false
|
|
115
114
|
}, rest), header, optionalChildren);
|
|
116
115
|
});
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
_EuiCallOut.propTypes = {
|
|
116
|
+
exports.EuiCallOut = EuiCallOut;
|
|
117
|
+
EuiCallOut.propTypes = {
|
|
120
118
|
className: _propTypes.default.string,
|
|
121
119
|
"aria-label": _propTypes.default.string,
|
|
122
120
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -126,6 +124,4 @@ _EuiCallOut.propTypes = {
|
|
|
126
124
|
size: _propTypes.default.oneOf(["s", "m"]),
|
|
127
125
|
heading: _propTypes.default.any
|
|
128
126
|
};
|
|
129
|
-
|
|
130
|
-
var EuiCallOut = (0, _system.withEuiSystem)(_EuiCallOut);
|
|
131
|
-
exports.EuiCallOut = EuiCallOut;
|
|
127
|
+
EuiCallOut.displayName = 'EuiCallOut';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.EuiExpression = exports.COLORS = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -13,13 +13,13 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _icon = require("../icon");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _services = require("../../services");
|
|
17
17
|
|
|
18
18
|
var _expression = require("./expression.styles");
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"
|
|
22
|
+
var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -38,7 +38,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
38
38
|
var COLORS = ['subdued', 'primary', 'success', 'accent', 'warning', 'danger'];
|
|
39
39
|
exports.COLORS = COLORS;
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var EuiExpression = function EuiExpression(_ref) {
|
|
42
42
|
var className = _ref.className,
|
|
43
43
|
description = _ref.description,
|
|
44
44
|
descriptionProps = _ref.descriptionProps,
|
|
@@ -59,17 +59,17 @@ var _EuiExpression = function _EuiExpression(_ref) {
|
|
|
59
59
|
isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
|
|
60
60
|
_ref$textWrap = _ref.textWrap,
|
|
61
61
|
textWrap = _ref$textWrap === void 0 ? 'break-word' : _ref$textWrap,
|
|
62
|
-
euiTheme = _ref.euiTheme,
|
|
63
62
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
64
63
|
|
|
65
64
|
var calculatedColor = isInvalid ? 'danger' : color;
|
|
66
|
-
var
|
|
65
|
+
var theme = (0, _services.useEuiTheme)();
|
|
66
|
+
var styles = (0, _expression.euiExpressionStyles)(theme);
|
|
67
67
|
var cssStyles = [styles.euiExpression, onClick && styles.isClickable, styles[color], isActive && styles.isActive.base, isActive && styles.isActive[color], display === 'columns' && styles.columns, textWrap === 'truncate' && styles.truncate];
|
|
68
|
-
var descriptionStyles = (0, _expression.euiExpressionDescriptionStyles)(
|
|
68
|
+
var descriptionStyles = (0, _expression.euiExpressionDescriptionStyles)(theme);
|
|
69
69
|
var cssDescriptionStyles = [descriptionStyles.euiExpression__description, isInvalid ? descriptionStyles.danger : descriptionStyles[color], uppercase && descriptionStyles.isUppercase, textWrap === 'truncate' && descriptionStyles.truncate, display === 'columns' && descriptionStyles.columns];
|
|
70
|
-
var valueStyles = (0, _expression.euiExpressionValueStyles)(
|
|
70
|
+
var valueStyles = (0, _expression.euiExpressionValueStyles)(theme);
|
|
71
71
|
var cssValueStyles = [valueStyles.euiExpression__value, textWrap === 'truncate' && valueStyles.truncate, display === 'columns' && valueStyles.columns];
|
|
72
|
-
var iconStyles = (0, _expression.euiExpressionIconStyles)(
|
|
72
|
+
var iconStyles = (0, _expression.euiExpressionIconStyles)(theme);
|
|
73
73
|
var cssIconStyles = [iconStyles.euiExpression__icon, display === 'columns' && iconStyles.columns];
|
|
74
74
|
var classes = (0, _classnames.default)('euiExpression', className);
|
|
75
75
|
var Component = onClick ? 'button' : 'span';
|
|
@@ -97,8 +97,8 @@ var _EuiExpression = function _EuiExpression(_ref) {
|
|
|
97
97
|
}, valueProps), value), invalidIcon);
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
exports.
|
|
101
|
-
|
|
100
|
+
exports.EuiExpression = EuiExpression;
|
|
101
|
+
EuiExpression.propTypes = {
|
|
102
102
|
className: _propTypes.default.string,
|
|
103
103
|
"aria-label": _propTypes.default.string,
|
|
104
104
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -200,6 +200,4 @@ _EuiExpression.propTypes = {
|
|
|
200
200
|
* Sets how to handle the wrapping of long text.
|
|
201
201
|
*/
|
|
202
202
|
textWrap: _propTypes.default.oneOf(["break-word", "truncate"])
|
|
203
|
-
};
|
|
204
|
-
var EuiExpression = (0, _system.withEuiSystem)(_EuiExpression);
|
|
205
|
-
exports.EuiExpression = EuiExpression;
|
|
203
|
+
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.EuiFacetButton = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ var _inner_text = require("../inner_text");
|
|
|
19
19
|
|
|
20
20
|
var _clone_element = require("../../services/theme/clone_element");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _services = require("../../services");
|
|
23
23
|
|
|
24
24
|
var _facet_button = require("./facet_button.styles");
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ var _button_display = require("../button/button_display/_button_display");
|
|
|
27
27
|
|
|
28
28
|
var _react2 = require("@emotion/react");
|
|
29
29
|
|
|
30
|
-
var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef"
|
|
30
|
+
var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef"];
|
|
31
31
|
|
|
32
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
33
|
|
|
@@ -37,7 +37,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
37
37
|
|
|
38
38
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var EuiFacetButton = function EuiFacetButton(_ref) {
|
|
41
41
|
var children = _ref.children,
|
|
42
42
|
className = _ref.className,
|
|
43
43
|
icon = _ref.icon,
|
|
@@ -49,16 +49,16 @@ var _EuiFacetButton = function _EuiFacetButton(_ref) {
|
|
|
49
49
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
50
50
|
quantity = _ref.quantity,
|
|
51
51
|
buttonRef = _ref.buttonRef,
|
|
52
|
-
euiTheme = _ref.euiTheme,
|
|
53
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
54
53
|
|
|
55
54
|
// If in the loading state, force disabled to true
|
|
56
55
|
isDisabled = isLoading ? true : isDisabled;
|
|
57
56
|
var selection = isSelected ? 'isSelected' : 'unSelected';
|
|
58
57
|
var classes = (0, _classnames.default)('euiFacetButton', className);
|
|
59
|
-
var
|
|
58
|
+
var theme = (0, _services.useEuiTheme)();
|
|
59
|
+
var styles = (0, _facet_button.euiFacetButtonStyles)(theme);
|
|
60
60
|
var cssStyles = [styles.euiFacetButton];
|
|
61
|
-
var textStyles = (0, _facet_button.euiFacetButtonTextStyles)(
|
|
61
|
+
var textStyles = (0, _facet_button.euiFacetButtonTextStyles)(theme);
|
|
62
62
|
var cssTextStyles = [textStyles.euiFacetButton__text, textStyles[selection]];
|
|
63
63
|
var quantityStyles = (0, _facet_button.euiFacetButtonQuantityStyles)();
|
|
64
64
|
var cssQuantityStyles = [quantityStyles.euiFacetButton__quantity, isDisabled && quantityStyles.isDisabled];
|
|
@@ -111,8 +111,8 @@ var _EuiFacetButton = function _EuiFacetButton(_ref) {
|
|
|
111
111
|
});
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
exports.
|
|
115
|
-
|
|
114
|
+
exports.EuiFacetButton = EuiFacetButton;
|
|
115
|
+
EuiFacetButton.propTypes = {
|
|
116
116
|
buttonRef: _propTypes.default.any,
|
|
117
117
|
|
|
118
118
|
/**
|
|
@@ -144,6 +144,4 @@ _EuiFacetButton.propTypes = {
|
|
|
144
144
|
className: _propTypes.default.string,
|
|
145
145
|
"aria-label": _propTypes.default.string,
|
|
146
146
|
"data-test-subj": _propTypes.default.string
|
|
147
|
-
};
|
|
148
|
-
var EuiFacetButton = (0, _system.withEuiSystem)(_EuiFacetButton);
|
|
149
|
-
exports.EuiFacetButton = EuiFacetButton;
|
|
147
|
+
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.LAYOUTS = exports.GUTTER_SIZES = exports.EuiFacetGroup = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,13 +11,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _services = require("../../services");
|
|
15
15
|
|
|
16
16
|
var _facet_group = require("./facet_group.styles");
|
|
17
17
|
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
|
|
20
|
-
var _excluded = ["children", "className", "layout", "gutterSize"
|
|
20
|
+
var _excluded = ["children", "className", "layout", "gutterSize"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
@@ -32,17 +32,17 @@ exports.LAYOUTS = LAYOUTS;
|
|
|
32
32
|
var GUTTER_SIZES = ['none', 's', 'm', 'l'];
|
|
33
33
|
exports.GUTTER_SIZES = GUTTER_SIZES;
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var EuiFacetGroup = function EuiFacetGroup(_ref) {
|
|
36
36
|
var children = _ref.children,
|
|
37
37
|
className = _ref.className,
|
|
38
38
|
_ref$layout = _ref.layout,
|
|
39
39
|
layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
|
|
40
40
|
_ref$gutterSize = _ref.gutterSize,
|
|
41
41
|
gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
|
|
42
|
-
euiTheme = _ref.euiTheme,
|
|
43
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
44
43
|
|
|
45
|
-
var
|
|
44
|
+
var theme = (0, _services.useEuiTheme)();
|
|
45
|
+
var styles = (0, _facet_group.euiFacetGroupStyles)(theme, layout);
|
|
46
46
|
var cssStyles = [styles.euiFacetGroup, styles[gutterSize], styles[layout]];
|
|
47
47
|
var classes = (0, _classnames.default)('euiFacetGroup', className);
|
|
48
48
|
return (0, _react2.jsx)("div", _extends({
|
|
@@ -51,8 +51,8 @@ var _EuiFacetGroup = function _EuiFacetGroup(_ref) {
|
|
|
51
51
|
}, rest), children);
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
exports.
|
|
55
|
-
|
|
54
|
+
exports.EuiFacetGroup = EuiFacetGroup;
|
|
55
|
+
EuiFacetGroup.propTypes = {
|
|
56
56
|
className: _propTypes.default.string,
|
|
57
57
|
"aria-label": _propTypes.default.string,
|
|
58
58
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -67,6 +67,4 @@ _EuiFacetGroup.propTypes = {
|
|
|
67
67
|
* Horizontal layout always adds more distance horizontally between buttons.
|
|
68
68
|
*/
|
|
69
69
|
gutterSize: _propTypes.default.any
|
|
70
|
-
};
|
|
71
|
-
var EuiFacetGroup = (0, _system.withEuiSystem)(_EuiFacetGroup);
|
|
72
|
-
exports.EuiFacetGroup = EuiFacetGroup;
|
|
70
|
+
};
|