@elastic/eui 70.2.4 → 70.3.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 -198
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -198
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +6 -5
- package/es/components/badge/beta_badge/beta_badge.js +11 -3
- package/es/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/es/components/card/card.js +6 -1
- package/es/components/card/card.styles.js +4 -4
- package/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +109 -0
- package/es/components/flyout/flyout.a11y.js +92 -0
- package/es/components/image/image_fullscreen_wrapper.styles.js +3 -11
- package/es/components/modal/confirm_modal.js +11 -0
- package/es/components/modal/modal.a11y.js +70 -0
- package/es/components/modal/modal.js +17 -27
- package/es/components/modal/modal.styles.js +23 -0
- package/es/components/modal/modal_body.js +8 -0
- package/es/components/modal/modal_body.styles.js +16 -0
- package/es/components/modal/modal_footer.js +6 -0
- package/es/components/modal/modal_footer.styles.js +15 -0
- package/es/components/modal/modal_header.js +6 -0
- package/es/components/modal/modal_header.styles.js +14 -0
- package/es/components/modal/modal_header_title.js +3 -1
- package/es/components/page_template/outer/page_outer.js +1 -1
- package/es/components/page_template/page_template.js +28 -6
- package/es/components/popover/popover.a11y.js +83 -0
- package/es/components/search_bar/query/default_syntax.js +2 -1
- package/es/components/tabs/tabs.a11y.js +97 -0
- package/es/components/tree_view/tree_view.a11y.js +74 -0
- package/es/global_styling/utility/animations.js +5 -2
- package/eui.d.ts +58 -7
- package/i18ntokens.json +2 -2
- package/lib/components/accessibility/skip_link/skip_link.js +6 -5
- package/lib/components/badge/beta_badge/beta_badge.js +13 -4
- package/lib/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/lib/components/card/card.js +6 -1
- package/lib/components/card/card.styles.js +4 -4
- package/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
- package/lib/components/flyout/flyout.a11y.js +94 -0
- package/lib/components/image/image_fullscreen_wrapper.styles.js +9 -10
- package/lib/components/modal/confirm_modal.js +13 -0
- package/lib/components/modal/modal.a11y.js +73 -0
- package/lib/components/modal/modal.js +17 -32
- package/lib/components/modal/modal.styles.js +36 -0
- package/lib/components/modal/modal_body.js +10 -0
- package/lib/components/modal/modal_body.styles.js +27 -0
- package/lib/components/modal/modal_footer.js +8 -0
- package/lib/components/modal/modal_footer.styles.js +26 -0
- package/lib/components/modal/modal_header.js +8 -0
- package/lib/components/modal/modal_header.styles.js +24 -0
- package/lib/components/modal/modal_header_title.js +4 -1
- package/lib/components/page_template/outer/page_outer.js +1 -1
- package/lib/components/page_template/page_template.js +32 -10
- package/lib/components/popover/popover.a11y.js +86 -0
- package/lib/components/search_bar/query/default_syntax.js +2 -1
- package/lib/components/tabs/tabs.a11y.js +98 -0
- package/lib/components/tree_view/tree_view.a11y.js +80 -0
- package/lib/global_styling/utility/animations.js +9 -3
- package/optimize/es/components/accessibility/skip_link/skip_link.js +6 -5
- package/optimize/es/components/badge/beta_badge/beta_badge.js +5 -2
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/optimize/es/components/card/card.styles.js +4 -4
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +98 -0
- package/optimize/es/components/flyout/flyout.a11y.js +77 -0
- package/optimize/es/components/image/image_fullscreen_wrapper.styles.js +3 -11
- package/optimize/es/components/modal/confirm_modal.js +6 -0
- package/optimize/es/components/modal/modal.a11y.js +60 -0
- package/optimize/es/components/modal/modal.js +17 -27
- package/optimize/es/components/modal/modal.styles.js +23 -0
- package/optimize/es/components/modal/modal_body.js +8 -0
- package/optimize/es/components/modal/modal_body.styles.js +16 -0
- package/optimize/es/components/modal/modal_footer.js +6 -0
- package/optimize/es/components/modal/modal_footer.styles.js +15 -0
- package/optimize/es/components/modal/modal_header.js +6 -0
- package/optimize/es/components/modal/modal_header.styles.js +14 -0
- package/optimize/es/components/modal/modal_header_title.js +3 -1
- package/optimize/es/components/page_template/page_template.js +5 -3
- package/optimize/es/components/popover/popover.a11y.js +73 -0
- package/optimize/es/components/search_bar/query/default_syntax.js +2 -1
- package/optimize/es/components/tabs/tabs.a11y.js +97 -0
- package/optimize/es/components/tree_view/tree_view.a11y.js +74 -0
- package/optimize/es/global_styling/utility/animations.js +5 -2
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +6 -5
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +7 -3
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/optimize/lib/components/card/card.styles.js +4 -4
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
- package/optimize/lib/components/flyout/flyout.a11y.js +84 -0
- package/optimize/lib/components/image/image_fullscreen_wrapper.styles.js +9 -12
- package/optimize/lib/components/modal/confirm_modal.js +8 -0
- package/optimize/lib/components/modal/modal.a11y.js +73 -0
- package/optimize/lib/components/modal/modal.js +17 -31
- package/optimize/lib/components/modal/modal.styles.js +36 -0
- package/optimize/lib/components/modal/modal_body.js +10 -0
- package/optimize/lib/components/modal/modal_body.styles.js +27 -0
- package/optimize/lib/components/modal/modal_footer.js +8 -0
- package/optimize/lib/components/modal/modal_footer.styles.js +26 -0
- package/optimize/lib/components/modal/modal_header.js +8 -0
- package/optimize/lib/components/modal/modal_header.styles.js +24 -0
- package/optimize/lib/components/modal/modal_header_title.js +4 -1
- package/optimize/lib/components/page_template/page_template.js +5 -3
- package/optimize/lib/components/popover/popover.a11y.js +86 -0
- package/optimize/lib/components/search_bar/query/default_syntax.js +2 -1
- package/optimize/lib/components/tabs/tabs.a11y.js +98 -0
- package/optimize/lib/components/tree_view/tree_view.a11y.js +80 -0
- package/optimize/lib/global_styling/utility/animations.js +9 -3
- package/package.json +5 -4
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +6 -5
- package/test-env/components/badge/beta_badge/beta_badge.js +13 -4
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/test-env/components/card/card.js +6 -1
- package/test-env/components/card/card.styles.js +4 -4
- package/test-env/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
- package/test-env/components/flyout/flyout.a11y.js +84 -0
- package/test-env/components/image/image_fullscreen_wrapper.styles.js +9 -12
- package/test-env/components/modal/confirm_modal.js +13 -0
- package/test-env/components/modal/modal.a11y.js +73 -0
- package/test-env/components/modal/modal.js +17 -31
- package/test-env/components/modal/modal.styles.js +36 -0
- package/test-env/components/modal/modal_body.js +10 -0
- package/test-env/components/modal/modal_body.styles.js +27 -0
- package/test-env/components/modal/modal_footer.js +8 -0
- package/test-env/components/modal/modal_footer.styles.js +26 -0
- package/test-env/components/modal/modal_header.js +8 -0
- package/test-env/components/modal/modal_header.styles.js +24 -0
- package/test-env/components/modal/modal_header_title.js +4 -1
- package/test-env/components/page_template/outer/page_outer.js +1 -1
- package/test-env/components/page_template/page_template.js +32 -10
- package/test-env/components/popover/popover.a11y.js +86 -0
- package/test-env/components/search_bar/query/default_syntax.js +2 -1
- package/test-env/components/tabs/tabs.a11y.js +98 -0
- package/test-env/components/tree_view/tree_view.a11y.js +80 -0
- package/test-env/global_styling/utility/animations.js +9 -3
- package/src/components/modal/_index.scss +0 -1
- package/src/components/modal/_modal.scss +0 -156
- package/src/themes/amsterdam/overrides/_modal.scss +0 -3
|
@@ -1,32 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.euiImageFullscreenWrapperStyles = void 0;
|
|
9
7
|
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
8
|
var _react = require("@emotion/react");
|
|
13
9
|
|
|
14
10
|
var _global_styling = require("../../global_styling");
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
18
19
|
var euiImageFullscreenWrapperStyles = function euiImageFullscreenWrapperStyles(euiThemeContext) {
|
|
19
20
|
var euiTheme = euiThemeContext.euiTheme;
|
|
20
21
|
return {
|
|
21
22
|
// Base
|
|
22
|
-
euiImageFullscreenWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '80vh'), ";", (0, _global_styling.logicalCSS)('max-width', '80vw'), ";", (0, _global_styling.logicalTextAlignCSS)('center'), ";line-height:0;", _global_styling.euiCanAnimate, "{animation:",
|
|
23
|
+
euiImageFullscreenWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '80vh'), ";", (0, _global_styling.logicalCSS)('max-width', '80vw'), ";", (0, _global_styling.logicalTextAlignCSS)('center'), ";line-height:0;", _global_styling.euiCanAnimate, "{animation:", (0, _global_styling.euiAnimSlideInUp)(euiTheme.size.xxxxl), " ", euiTheme.animation.extraSlow, " ", euiTheme.animation.bounce, ";}&:hover [class*='euiImageCaption']{text-decoration:underline;};label:euiImageFullscreenWrapper;"),
|
|
23
24
|
// Sizes
|
|
24
25
|
fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;")
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
exports.euiImageFullscreenWrapperStyles = euiImageFullscreenWrapperStyles;
|
|
29
|
-
|
|
30
|
-
var euiImageFullScreen = function euiImageFullScreen(size) {
|
|
31
|
-
return (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: 0;\n transform: translateY(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])), size);
|
|
32
|
-
};
|
|
29
|
+
exports.euiImageFullscreenWrapperStyles = euiImageFullscreenWrapperStyles;
|
|
@@ -31,6 +31,10 @@ var _modal_header_title = require("./modal_header_title");
|
|
|
31
31
|
|
|
32
32
|
var _modal_body = require("./modal_body");
|
|
33
33
|
|
|
34
|
+
var _services = require("../../services");
|
|
35
|
+
|
|
36
|
+
var _modal2 = require("./modal.styles");
|
|
37
|
+
|
|
34
38
|
var _button = require("../button");
|
|
35
39
|
|
|
36
40
|
var _text = require("../text");
|
|
@@ -96,6 +100,9 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
96
100
|
};
|
|
97
101
|
|
|
98
102
|
var classes = (0, _classnames.default)('euiModal--confirmation', className);
|
|
103
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
104
|
+
var styles = (0, _modal2.euiModalStyles)(euiTheme);
|
|
105
|
+
var cssStyles = [styles.confirmation];
|
|
99
106
|
var modalTitle;
|
|
100
107
|
|
|
101
108
|
if (title) {
|
|
@@ -114,6 +121,7 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
114
121
|
|
|
115
122
|
return (0, _react2.jsx)(_modal.EuiModal, (0, _extends2.default)({
|
|
116
123
|
className: classes,
|
|
124
|
+
css: cssStyles,
|
|
117
125
|
onClose: onCancel
|
|
118
126
|
}, rest), modalTitle, message && (0, _react2.jsx)(_modal_body.EuiModalBody, null, (0, _react2.jsx)(_text.EuiText, {
|
|
119
127
|
"data-test-subj": "confirmModalBodyText"
|
|
@@ -145,6 +153,11 @@ EuiConfirmModal.propTypes = {
|
|
|
145
153
|
onConfirm: _propTypes.default.func,
|
|
146
154
|
confirmButtonDisabled: _propTypes.default.bool,
|
|
147
155
|
className: _propTypes.default.string,
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Allows focusing either the confirm or cancel button on modal initialization.
|
|
159
|
+
* Will take precedence over `initialFocus`, if `initialFocus` is passed.
|
|
160
|
+
*/
|
|
148
161
|
defaultFocusedButton: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
|
|
149
162
|
buttonColor: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf(["ghost"])]),
|
|
150
163
|
// For docs only, will get passed with ...rest
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
|
+
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
|
|
11
|
+
var _index = require("./index");
|
|
12
|
+
|
|
13
|
+
var _button = require("../button");
|
|
14
|
+
|
|
15
|
+
var _react2 = require("@emotion/react");
|
|
16
|
+
|
|
17
|
+
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); }
|
|
18
|
+
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
24
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
25
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
26
|
+
* Side Public License, v 1.
|
|
27
|
+
*/
|
|
28
|
+
/// <reference types="../../../cypress/support"/>
|
|
29
|
+
var Modal = function Modal() {
|
|
30
|
+
var _useState = (0, _react.useState)(false),
|
|
31
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
32
|
+
isModalVisible = _useState2[0],
|
|
33
|
+
setIsModalVisible = _useState2[1];
|
|
34
|
+
|
|
35
|
+
var closeModal = function closeModal() {
|
|
36
|
+
return setIsModalVisible(false);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var showModal = function showModal() {
|
|
40
|
+
return setIsModalVisible(true);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
var modalProps = {
|
|
44
|
+
title: 'Do this thing',
|
|
45
|
+
onClose: closeModal,
|
|
46
|
+
children: _react.default
|
|
47
|
+
};
|
|
48
|
+
return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_button.EuiButton, {
|
|
49
|
+
onClick: showModal
|
|
50
|
+
}, "Show confirm modal"), isModalVisible && (0, _react2.jsx)(_index.EuiModal, modalProps, (0, _react2.jsx)(_index.EuiModalHeader, null, (0, _react2.jsx)(_index.EuiModalHeaderTitle, null, (0, _react2.jsx)("h1", null, "Title of modal"))), (0, _react2.jsx)(_index.EuiModalBody, null, (0, _react2.jsx)("p", null, "This is a simple modal body")), (0, _react2.jsx)(_index.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButton, {
|
|
51
|
+
onClick: closeModal,
|
|
52
|
+
fill: true
|
|
53
|
+
}, "Close"))));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
beforeEach(function () {
|
|
57
|
+
cy.mount((0, _react2.jsx)(Modal, null));
|
|
58
|
+
cy.get('div.euiModal').should('not.exist');
|
|
59
|
+
cy.get('button.euiButton').click();
|
|
60
|
+
cy.get('div.euiModal').should('exist');
|
|
61
|
+
});
|
|
62
|
+
describe('EuiModal', function () {
|
|
63
|
+
describe('Automated accessibility check', function () {
|
|
64
|
+
it('has zero violations when modal is open', function () {
|
|
65
|
+
cy.checkAxe();
|
|
66
|
+
});
|
|
67
|
+
it('has zero violations when modal is closed', function () {
|
|
68
|
+
cy.get('div.euiModalFooter button.euiButton').click();
|
|
69
|
+
cy.get('div.euiModal').should('not.exist');
|
|
70
|
+
cy.checkAxe();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -15,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
13
|
|
|
16
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
15
|
|
|
18
|
-
var _react =
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
19
17
|
|
|
20
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
19
|
|
|
@@ -31,14 +29,12 @@ var _overlay_mask = require("../overlay_mask");
|
|
|
31
29
|
|
|
32
30
|
var _i18n = require("../i18n");
|
|
33
31
|
|
|
32
|
+
var _modal = require("./modal.styles");
|
|
33
|
+
|
|
34
34
|
var _react2 = require("@emotion/react");
|
|
35
35
|
|
|
36
36
|
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "style"];
|
|
37
37
|
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
41
|
-
|
|
42
38
|
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; }
|
|
43
39
|
|
|
44
40
|
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; }
|
|
@@ -52,18 +48,6 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
52
48
|
maxWidth = _ref$maxWidth === void 0 ? true : _ref$maxWidth,
|
|
53
49
|
style = _ref.style,
|
|
54
50
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
55
|
-
// TODO: Remove this onFocus scroll workaround after react-focus-on supports focusOptions
|
|
56
|
-
// @see https://github.com/elastic/eui/issues/6304
|
|
57
|
-
var bodyScrollTop = (0, _react.useRef)(typeof window === 'undefined' ? undefined : window.scrollY // Account for SSR
|
|
58
|
-
);
|
|
59
|
-
var onFocus = (0, _react.useCallback)(function () {
|
|
60
|
-
if (bodyScrollTop.current != null) {
|
|
61
|
-
window.scrollTo({
|
|
62
|
-
top: bodyScrollTop.current
|
|
63
|
-
});
|
|
64
|
-
bodyScrollTop.current = undefined; // Unset after first auto focus
|
|
65
|
-
}
|
|
66
|
-
}, []);
|
|
67
51
|
|
|
68
52
|
var onKeyDown = function onKeyDown(event) {
|
|
69
53
|
if (event.key === _services.keys.ESCAPE) {
|
|
@@ -73,28 +57,29 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
73
57
|
}
|
|
74
58
|
};
|
|
75
59
|
|
|
76
|
-
var newStyle;
|
|
77
|
-
var widthClassName;
|
|
60
|
+
var newStyle = style;
|
|
78
61
|
|
|
79
|
-
if (maxWidth
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var value = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
|
|
83
|
-
newStyle = _objectSpread(_objectSpread({}, style), {}, {
|
|
84
|
-
maxWidth: value
|
|
62
|
+
if (typeof maxWidth !== 'boolean') {
|
|
63
|
+
newStyle = _objectSpread(_objectSpread({}, newStyle), {}, {
|
|
64
|
+
maxInlineSize: maxWidth
|
|
85
65
|
});
|
|
86
66
|
}
|
|
87
67
|
|
|
88
|
-
var classes = (0, _classnames.default)('euiModal',
|
|
68
|
+
var classes = (0, _classnames.default)('euiModal', className);
|
|
69
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
70
|
+
var styles = (0, _modal.euiModalStyles)(euiTheme);
|
|
71
|
+
var cssStyles = [styles.euiModal, maxWidth === true && styles.defaultMaxWidth];
|
|
72
|
+
var cssCloseIconStyles = [styles.euiModal__closeIcon];
|
|
89
73
|
return (0, _react2.jsx)(_overlay_mask.EuiOverlayMask, null, (0, _react2.jsx)(_focus_trap.EuiFocusTrap, {
|
|
90
74
|
initialFocus: initialFocus,
|
|
91
|
-
scrollLock: true
|
|
75
|
+
scrollLock: true,
|
|
76
|
+
preventScrollOnFocus: true
|
|
92
77
|
}, (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
78
|
+
css: cssStyles,
|
|
93
79
|
className: classes,
|
|
94
80
|
onKeyDown: onKeyDown,
|
|
95
81
|
tabIndex: 0,
|
|
96
|
-
|
|
97
|
-
style: newStyle || style
|
|
82
|
+
style: newStyle
|
|
98
83
|
}, rest), (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
99
84
|
token: "euiModal.closeModal",
|
|
100
85
|
default: "Closes this modal window"
|
|
@@ -102,6 +87,7 @@ var EuiModal = function EuiModal(_ref) {
|
|
|
102
87
|
return (0, _react2.jsx)(_button.EuiButtonIcon, {
|
|
103
88
|
iconType: "cross",
|
|
104
89
|
onClick: onClose,
|
|
90
|
+
css: cssCloseIconStyles,
|
|
105
91
|
className: "euiModal__closeIcon",
|
|
106
92
|
color: "text",
|
|
107
93
|
"aria-label": closeModal
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiModalStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _mixins = require("../../themes/amsterdam/global_styling/mixins");
|
|
11
|
+
|
|
12
|
+
var _global_styling = require("../../global_styling");
|
|
13
|
+
|
|
14
|
+
var _form = require("../form/form.styles");
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
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
|
+
*/
|
|
23
|
+
var euiModalStyles = function euiModalStyles(euiThemeContext) {
|
|
24
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
25
|
+
return {
|
|
26
|
+
euiModal: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), " display:flex;flex-direction:column;max-block-size:75vh;position:relative;background-color:", euiTheme.colors.emptyShade, ";border-radius:", euiTheme.border.radius.medium, ";z-index:", euiTheme.levels.modal, ";min-inline-size:", (0, _form.euiFormVariables)(euiThemeContext).maxWidth, ";max-inline-size:calc(100vw - ", euiTheme.size.base, ");", _global_styling.euiCanAnimate, "{animation:", (0, _global_styling.euiAnimSlideInUp)(euiTheme.size.xxl), " ", euiTheme.animation.slow, " ", euiTheme.animation.bounce, ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{position:fixed;inset:0;border-radius:0;inline-size:100vw!important;min-inline-size:0!important;max-inline-size:none!important;max-block-size:100vh!important;}&:focus{outline:none;};label:euiModal;"),
|
|
27
|
+
// Variants
|
|
28
|
+
defaultMaxWidth: /*#__PURE__*/(0, _react.css)("max-inline-size:min(\n ", euiTheme.breakpoint.m, "px,\n calc(100vw - ", euiTheme.size.base, ")\n );;label:defaultMaxWidth;"),
|
|
29
|
+
confirmation: /*#__PURE__*/(0, _react.css)("min-inline-size:", (0, _form.euiFormVariables)(euiThemeContext).maxWidth, ";", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _mixins.euiShadowXLarge)(euiThemeContext, {
|
|
30
|
+
reverse: true
|
|
31
|
+
}), " inset-block-start:auto;};label:confirmation;"),
|
|
32
|
+
euiModal__closeIcon: /*#__PURE__*/(0, _react.css)("position:absolute;inset-inline-end:", euiTheme.size.xs, ";inset-block-start:", euiTheme.size.xs, ";z-index:3;;label:euiModal__closeIcon;")
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.euiModalStyles = euiModalStyles;
|
|
@@ -17,6 +17,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
17
17
|
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
19
|
|
|
20
|
+
var _services = require("../../services");
|
|
21
|
+
|
|
22
|
+
var _modal_body = require("./modal_body.styles");
|
|
23
|
+
|
|
20
24
|
var _react2 = require("@emotion/react");
|
|
21
25
|
|
|
22
26
|
var _excluded = ["className", "children"];
|
|
@@ -26,9 +30,15 @@ var EuiModalBody = function EuiModalBody(_ref) {
|
|
|
26
30
|
children = _ref.children,
|
|
27
31
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
32
|
var classes = (0, _classnames.default)('euiModalBody', className);
|
|
33
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
34
|
+
var styles = (0, _modal_body.euiModalBodyStyles)(euiTheme);
|
|
35
|
+
var cssStyles = [styles.euiModalBody];
|
|
36
|
+
var cssOverflowStyles = [styles.euiModalBody__overflow];
|
|
29
37
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
38
|
+
css: cssStyles,
|
|
30
39
|
className: classes
|
|
31
40
|
}, rest), (0, _react2.jsx)("div", {
|
|
41
|
+
css: cssOverflowStyles,
|
|
32
42
|
className: "euiModalBody__overflow"
|
|
33
43
|
}, children));
|
|
34
44
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiModalBodyStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiModalBodyStyles = function euiModalBodyStyles(euiThemeContext) {
|
|
20
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
21
|
+
return {
|
|
22
|
+
euiModalBody: /*#__PURE__*/(0, _react.css)("flex-grow:1;overflow:hidden;display:flex;flex-direction:column;&:last-of-type .euiModalBody__overflow{padding-block-end:", euiTheme.size.l, ";};label:euiModalBody;"),
|
|
23
|
+
euiModalBody__overflow: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext), ";padding-inline:", euiTheme.size.l, ";padding-block:", euiTheme.size.s, ";", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{padding-block-end:", euiTheme.size.l, ";};label:euiModalBody__overflow;")
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.euiModalBodyStyles = euiModalBodyStyles;
|
|
@@ -17,6 +17,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
17
17
|
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
19
|
|
|
20
|
+
var _services = require("../../services");
|
|
21
|
+
|
|
22
|
+
var _modal_footer = require("./modal_footer.styles");
|
|
23
|
+
|
|
20
24
|
var _react2 = require("@emotion/react");
|
|
21
25
|
|
|
22
26
|
var _excluded = ["className", "children"];
|
|
@@ -26,7 +30,11 @@ var EuiModalFooter = function EuiModalFooter(_ref) {
|
|
|
26
30
|
children = _ref.children,
|
|
27
31
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
32
|
var classes = (0, _classnames.default)('euiModalFooter', className);
|
|
33
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
34
|
+
var styles = (0, _modal_footer.euiModalFooterStyles)(euiTheme);
|
|
35
|
+
var cssStyles = [styles.euiModalFooter];
|
|
29
36
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
37
|
+
css: cssStyles,
|
|
30
38
|
className: classes
|
|
31
39
|
}, rest), children);
|
|
32
40
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiModalFooterStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiModalFooterStyles = function euiModalFooterStyles(euiThemeContext) {
|
|
20
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
21
|
+
return {
|
|
22
|
+
euiModalFooter: /*#__PURE__*/(0, _react.css)("display:flex;justify-content:flex-end;padding-block:", euiTheme.size.base, " ", euiTheme.size.l, ";padding-inline:", euiTheme.size.l, ";flex-grow:0;flex-shrink:0;gap:", euiTheme.size.base, ";", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{background:", euiTheme.colors.lightestShade, ";padding-block:", euiTheme.size.m, ";padding-inline:", euiTheme.size.l, ";justify-content:stretch;gap:", euiTheme.size.s, ";>*{flex:1;}};label:euiModalFooter;")
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.euiModalFooterStyles = euiModalFooterStyles;
|
|
@@ -17,6 +17,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
17
17
|
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
19
|
|
|
20
|
+
var _services = require("../../services");
|
|
21
|
+
|
|
22
|
+
var _modal_header = require("./modal_header.styles");
|
|
23
|
+
|
|
20
24
|
var _react2 = require("@emotion/react");
|
|
21
25
|
|
|
22
26
|
var _excluded = ["className", "children"];
|
|
@@ -26,7 +30,11 @@ var EuiModalHeader = function EuiModalHeader(_ref) {
|
|
|
26
30
|
children = _ref.children,
|
|
27
31
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
32
|
var classes = (0, _classnames.default)('euiModalHeader', className);
|
|
33
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
34
|
+
var styles = (0, _modal_header.euiModalHeaderStyles)(euiTheme);
|
|
35
|
+
var cssStyles = [styles.euiModalHeader];
|
|
29
36
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
37
|
+
css: cssStyles,
|
|
30
38
|
className: classes
|
|
31
39
|
}, rest), children);
|
|
32
40
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiModalHeaderStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
var euiModalHeaderStyles = function euiModalHeaderStyles(euiThemeContext) {
|
|
18
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
19
|
+
return {
|
|
20
|
+
euiModalHeader: /*#__PURE__*/(0, _react.css)("display:flex;justify-content:space-between;align-items:center;padding-inline:", euiTheme.size.l, " ", euiTheme.size.xxl, ";padding-block:", euiTheme.size.l, " ", euiTheme.size.base, ";flex-grow:0;flex-shrink:0;&+.euiModalFooter{padding-block-start:", euiTheme.size.s, ";};label:euiModalHeader;")
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.euiModalHeaderStyles = euiModalHeaderStyles;
|
|
@@ -17,6 +17,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
17
17
|
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
19
|
|
|
20
|
+
var _title = require("../title");
|
|
21
|
+
|
|
20
22
|
var _react2 = require("@emotion/react");
|
|
21
23
|
|
|
22
24
|
var _excluded = ["className", "children"];
|
|
@@ -26,7 +28,8 @@ var EuiModalHeaderTitle = function EuiModalHeaderTitle(_ref) {
|
|
|
26
28
|
children = _ref.children,
|
|
27
29
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
30
|
var classes = (0, _classnames.default)('euiModalHeader__title', className);
|
|
29
|
-
return (0, _react2.jsx)(
|
|
31
|
+
return (0, _react2.jsx)(_title.EuiTitle, (0, _extends2.default)({
|
|
32
|
+
size: "m",
|
|
30
33
|
className: classes
|
|
31
34
|
}, rest), /*#__PURE__*/_react.default.isValidElement(children) ? children : (0, _react2.jsx)("h1", null, children));
|
|
32
35
|
};
|
|
@@ -56,7 +56,7 @@ _EuiPageOuter.propTypes = {
|
|
|
56
56
|
direction: _propTypes.default.oneOf(["row", "column"]),
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* When direction is `row`, it will flip to `column` when within these breakpoints
|
|
59
|
+
* When direction is `row`, it will flip to `column` when within these breakpoints.
|
|
60
60
|
*/
|
|
61
61
|
responsive: _propTypes.default.arrayOf(_propTypes.default.any.isRequired),
|
|
62
62
|
className: _propTypes.default.string,
|
|
@@ -39,7 +39,7 @@ var _global_styling = require("../../global_styling");
|
|
|
39
39
|
|
|
40
40
|
var _react2 = require("@emotion/react");
|
|
41
41
|
|
|
42
|
-
var _excluded = ["children", "restrictWidth", "paddingSize", "grow", "bottomBorder", "offset", "panelled", "contentBorder", "
|
|
42
|
+
var _excluded = ["children", "responsive", "restrictWidth", "paddingSize", "grow", "bottomBorder", "offset", "panelled", "contentBorder", "component", "mainProps", "className", "minHeight"];
|
|
43
43
|
|
|
44
44
|
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); }
|
|
45
45
|
|
|
@@ -63,6 +63,8 @@ exports.TemplateContext = TemplateContext;
|
|
|
63
63
|
*/
|
|
64
64
|
var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
65
65
|
var children = _ref.children,
|
|
66
|
+
_ref$responsive = _ref.responsive,
|
|
67
|
+
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
66
68
|
_ref$restrictWidth = _ref.restrictWidth,
|
|
67
69
|
restrictWidth = _ref$restrictWidth === void 0 ? true : _ref$restrictWidth,
|
|
68
70
|
_ref$paddingSize = _ref.paddingSize,
|
|
@@ -73,12 +75,11 @@ var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
73
75
|
_offset = _ref.offset,
|
|
74
76
|
panelled = _ref.panelled,
|
|
75
77
|
contentBorder = _ref.contentBorder,
|
|
78
|
+
component = _ref.component,
|
|
76
79
|
mainProps = _ref.mainProps,
|
|
77
80
|
className = _ref.className,
|
|
78
81
|
_ref$minHeight = _ref.minHeight,
|
|
79
82
|
minHeight = _ref$minHeight === void 0 ? '460px' : _ref$minHeight,
|
|
80
|
-
_ref$responsive = _ref.responsive,
|
|
81
|
-
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
82
83
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
83
84
|
|
|
84
85
|
var _useEuiTheme = (0, _services.useEuiTheme)(),
|
|
@@ -186,6 +187,7 @@ var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
186
187
|
style: pageStyle,
|
|
187
188
|
className: classes
|
|
188
189
|
}), sidebar, (0, _react2.jsx)(_inner._EuiPageInner, (0, _extends2.default)({}, mainProps, {
|
|
190
|
+
component: component,
|
|
189
191
|
id: pageInnerId,
|
|
190
192
|
border: innerBordered(),
|
|
191
193
|
panelled: innerPanelled(),
|
|
@@ -208,13 +210,27 @@ _EuiPageTemplate.propTypes = {
|
|
|
208
210
|
direction: _propTypes.default.oneOf(["row", "column"]),
|
|
209
211
|
|
|
210
212
|
/**
|
|
211
|
-
|
|
213
|
+
* Decides at which point the main content wrapper will be 100vw.
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* When direction is `row`, it will flip to `column` when within these breakpoints.
|
|
212
218
|
*/
|
|
213
219
|
responsive: _propTypes.default.arrayOf(_propTypes.default.any.isRequired),
|
|
214
|
-
className: _propTypes.default.string,
|
|
215
|
-
"aria-label": _propTypes.default.string,
|
|
216
|
-
"data-test-subj": _propTypes.default.string,
|
|
217
|
-
css: _propTypes.default.any,
|
|
220
|
+
className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
221
|
+
"aria-label": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
222
|
+
"data-test-subj": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
223
|
+
css: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.any]),
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Adds a white background and shadow to define the area.
|
|
227
|
+
*/
|
|
228
|
+
panelled: _propTypes.default.bool,
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Adjust the overall padding.
|
|
232
|
+
*/
|
|
233
|
+
paddingSize: _propTypes.default.any,
|
|
218
234
|
|
|
219
235
|
/**
|
|
220
236
|
* Sets the max-width of the page,
|
|
@@ -235,7 +251,7 @@ _EuiPageTemplate.propTypes = {
|
|
|
235
251
|
* Applies a top or left border to the inner contents
|
|
236
252
|
* to add separation between content and sidebar when a sidebar exists.
|
|
237
253
|
*/
|
|
238
|
-
contentBorder: _propTypes.default.
|
|
254
|
+
contentBorder: _propTypes.default.any,
|
|
239
255
|
|
|
240
256
|
/**
|
|
241
257
|
* Minimum height in which to enforce scrolling
|
|
@@ -257,7 +273,13 @@ _EuiPageTemplate.propTypes = {
|
|
|
257
273
|
"aria-label": _propTypes.default.string,
|
|
258
274
|
"data-test-subj": _propTypes.default.string,
|
|
259
275
|
css: _propTypes.default.any
|
|
260
|
-
})
|
|
276
|
+
}),
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Sets which HTML element to render for the `main` content wrapper
|
|
280
|
+
* @default main
|
|
281
|
+
*/
|
|
282
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
261
283
|
};
|
|
262
284
|
|
|
263
285
|
var _EuiPageSection = function _EuiPageSection(props) {
|