@elastic/eui 62.2.2 → 63.0.2
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 +3 -270
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +3 -270
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/bottom_bar/bottom_bar.js +20 -3
- package/es/components/header/header.js +2 -0
- package/es/components/header/header_links/header_links.js +2 -1
- package/es/components/index.js +1 -0
- package/es/components/page/_bottom_border.js +1 -0
- package/es/components/page/_restrict_width.js +34 -7
- package/es/components/page/index.js +5 -3
- package/es/components/page/page.js +19 -30
- package/es/components/page/page.styles.js +43 -0
- package/es/components/page/page_body/page_body.js +18 -26
- package/es/components/page/page_body/page_body.styles.js +16 -0
- package/es/components/page/page_content/index.js +4 -4
- package/es/components/page/page_content/page_content.js +7 -2
- package/es/components/page/page_content/page_content_body.js +12 -7
- package/es/components/page/page_content/page_content_header.js +7 -2
- package/es/components/page/page_content/page_content_header_section.js +7 -2
- package/es/components/page/page_header/page_header.js +29 -172
- package/es/components/page/page_header/page_header.styles.js +16 -0
- package/es/components/page/page_header/page_header_content.js +84 -16
- package/es/components/page/page_header/page_header_content.styles.js +84 -0
- package/es/components/page/page_section/index.js +8 -0
- package/es/components/page/page_section/page_section.js +102 -0
- package/es/components/page/page_section/page_section.styles.js +43 -0
- package/es/components/page/page_side_bar/index.js +1 -1
- package/es/components/page/page_side_bar/page_side_bar.js +8 -3
- package/es/components/page/page_sidebar/index.js +8 -0
- package/es/components/page/page_sidebar/page_sidebar.js +110 -0
- package/es/components/page/page_sidebar/page_sidebar.styles.js +29 -0
- package/es/components/page/page_template.js +54 -154
- package/es/components/page_template/bottom_bar/page_bottom_bar.js +102 -0
- package/es/components/page_template/empty_prompt/page_empty_prompt.js +107 -0
- package/es/components/page_template/index.js +8 -0
- package/es/components/page_template/inner/index.js +8 -0
- package/es/components/page_template/inner/page_inner.js +51 -0
- package/es/components/page_template/inner/page_inner.styles.js +22 -0
- package/es/components/page_template/outer/index.js +8 -0
- package/es/components/page_template/outer/page_outer.js +59 -0
- package/es/components/page_template/outer/page_outer.styles.js +49 -0
- package/es/components/page_template/page_template.js +376 -0
- package/es/global_styling/functions/logicals.js +1 -1
- package/es/global_styling/mixins/_helpers.js +27 -9
- package/eui.d.ts +423 -49
- package/lib/components/bottom_bar/bottom_bar.js +20 -3
- package/lib/components/header/header.js +2 -0
- package/lib/components/header/header_links/header_links.js +2 -1
- package/lib/components/index.js +13 -0
- package/lib/components/page/_bottom_border.js +5 -0
- package/lib/components/page/_restrict_width.js +38 -7
- package/lib/components/page/index.js +28 -12
- package/lib/components/page/page.js +22 -34
- package/lib/components/page/page.styles.js +46 -0
- package/lib/components/page/page_body/page_body.js +20 -29
- package/lib/components/page/page_body/page_body.styles.js +27 -0
- package/lib/components/page/page_content/index.js +8 -8
- package/lib/components/page/page_content/page_content.js +8 -4
- package/lib/components/page/page_content/page_content_body.js +13 -9
- package/lib/components/page/page_content/page_content_header.js +8 -4
- package/lib/components/page/page_content/page_content_header_section.js +8 -4
- package/lib/components/page/page_header/page_header.js +31 -175
- package/lib/components/page/page_header/page_header.styles.js +27 -0
- package/lib/components/page/page_header/page_header_content.js +108 -16
- package/lib/components/page/page_header/page_header_content.styles.js +87 -0
- package/lib/components/page/page_section/index.js +13 -0
- package/lib/components/page/page_section/page_section.js +113 -0
- package/lib/components/page/page_section/page_section.styles.js +51 -0
- package/lib/components/page/page_side_bar/index.js +2 -2
- package/lib/components/page/page_side_bar/page_side_bar.js +9 -5
- package/lib/components/page/page_sidebar/index.js +13 -0
- package/lib/components/page/page_sidebar/page_sidebar.js +124 -0
- package/lib/components/page/page_sidebar/page_sidebar.styles.js +32 -0
- package/lib/components/page/page_template.js +76 -177
- package/lib/components/page_template/bottom_bar/page_bottom_bar.js +114 -0
- package/lib/components/page_template/empty_prompt/page_empty_prompt.js +116 -0
- package/lib/components/page_template/index.js +13 -0
- package/lib/components/page_template/inner/index.js +13 -0
- package/lib/components/page_template/inner/page_inner.js +60 -0
- package/lib/components/page_template/inner/page_inner.styles.js +35 -0
- package/lib/components/page_template/outer/index.js +13 -0
- package/lib/components/page_template/outer/page_outer.js +68 -0
- package/lib/components/page_template/outer/page_outer.styles.js +51 -0
- package/lib/components/page_template/page_template.js +399 -0
- package/lib/global_styling/functions/logicals.js +1 -1
- package/lib/global_styling/mixins/_helpers.js +27 -9
- package/optimize/es/components/bottom_bar/bottom_bar.js +1 -1
- package/optimize/es/components/header/header.js +2 -0
- package/optimize/es/components/header/header_links/header_links.js +2 -1
- package/optimize/es/components/index.js +1 -0
- package/optimize/es/components/page/_bottom_border.js +1 -0
- package/optimize/es/components/page/_restrict_width.js +34 -7
- package/optimize/es/components/page/index.js +5 -3
- package/optimize/es/components/page/page.js +18 -28
- package/optimize/es/components/page/page.styles.js +43 -0
- package/optimize/es/components/page/page_body/page_body.js +18 -25
- package/optimize/es/components/page/page_body/page_body.styles.js +16 -0
- package/optimize/es/components/page/page_content/index.js +4 -4
- package/optimize/es/components/page/page_content/page_content.js +6 -1
- package/optimize/es/components/page/page_content/page_content_body.js +10 -5
- package/optimize/es/components/page/page_content/page_content_header.js +6 -1
- package/optimize/es/components/page/page_content/page_content_header_section.js +6 -1
- package/optimize/es/components/page/page_header/page_header.js +20 -32
- package/optimize/es/components/page/page_header/page_header.styles.js +16 -0
- package/optimize/es/components/page/page_header/page_header_content.js +62 -14
- package/optimize/es/components/page/page_header/page_header_content.styles.js +84 -0
- package/optimize/es/components/page/page_section/index.js +8 -0
- package/optimize/es/components/page/page_section/page_section.js +51 -0
- package/optimize/es/components/page/page_section/page_section.styles.js +43 -0
- package/optimize/es/components/page/page_side_bar/index.js +1 -1
- package/optimize/es/components/page/page_side_bar/page_side_bar.js +6 -1
- package/optimize/es/components/page/page_sidebar/index.js +8 -0
- package/optimize/es/components/page/page_sidebar/page_sidebar.js +60 -0
- package/optimize/es/components/page/page_sidebar/page_sidebar.styles.js +29 -0
- package/optimize/es/components/page/page_template.js +29 -9
- package/optimize/es/components/page_template/bottom_bar/page_bottom_bar.js +70 -0
- package/optimize/es/components/page_template/empty_prompt/page_empty_prompt.js +61 -0
- package/optimize/es/components/page_template/index.js +8 -0
- package/optimize/es/components/page_template/inner/index.js +8 -0
- package/optimize/es/components/page_template/inner/page_inner.js +47 -0
- package/optimize/es/components/page_template/inner/page_inner.styles.js +22 -0
- package/optimize/es/components/page_template/outer/index.js +8 -0
- package/optimize/es/components/page_template/outer/page_outer.js +33 -0
- package/optimize/es/components/page_template/outer/page_outer.styles.js +49 -0
- package/optimize/es/components/page_template/page_template.js +202 -0
- package/optimize/es/global_styling/functions/logicals.js +1 -1
- package/optimize/es/global_styling/mixins/_helpers.js +27 -9
- package/optimize/lib/components/bottom_bar/bottom_bar.js +1 -1
- package/optimize/lib/components/header/header.js +2 -0
- package/optimize/lib/components/header/header_links/header_links.js +2 -1
- package/optimize/lib/components/index.js +13 -0
- package/optimize/lib/components/page/_bottom_border.js +5 -0
- package/optimize/lib/components/page/_restrict_width.js +38 -7
- package/optimize/lib/components/page/index.js +28 -12
- package/optimize/lib/components/page/page.js +21 -33
- package/optimize/lib/components/page/page.styles.js +46 -0
- package/optimize/lib/components/page/page_body/page_body.js +20 -29
- package/optimize/lib/components/page/page_body/page_body.styles.js +27 -0
- package/optimize/lib/components/page/page_content/index.js +8 -8
- package/optimize/lib/components/page/page_content/page_content.js +7 -3
- package/optimize/lib/components/page/page_content/page_content_body.js +11 -7
- package/optimize/lib/components/page/page_content/page_content_header.js +7 -3
- package/optimize/lib/components/page/page_content/page_content_header_section.js +7 -3
- package/optimize/lib/components/page/page_header/page_header.js +22 -36
- package/optimize/lib/components/page/page_header/page_header.styles.js +27 -0
- package/optimize/lib/components/page/page_header/page_header_content.js +66 -13
- package/optimize/lib/components/page/page_header/page_header_content.styles.js +87 -0
- package/optimize/lib/components/page/page_section/index.js +13 -0
- package/optimize/lib/components/page/page_section/page_section.js +62 -0
- package/optimize/lib/components/page/page_section/page_section.styles.js +51 -0
- package/optimize/lib/components/page/page_side_bar/index.js +2 -2
- package/optimize/lib/components/page/page_side_bar/page_side_bar.js +7 -3
- package/optimize/lib/components/page/page_sidebar/index.js +13 -0
- package/optimize/lib/components/page/page_sidebar/page_sidebar.js +79 -0
- package/optimize/lib/components/page/page_sidebar/page_sidebar.styles.js +32 -0
- package/optimize/lib/components/page/page_template.js +51 -33
- package/optimize/lib/components/page_template/bottom_bar/page_bottom_bar.js +85 -0
- package/optimize/lib/components/page_template/empty_prompt/page_empty_prompt.js +71 -0
- package/optimize/lib/components/page_template/index.js +13 -0
- package/optimize/lib/components/page_template/inner/index.js +13 -0
- package/optimize/lib/components/page_template/inner/page_inner.js +57 -0
- package/optimize/lib/components/page_template/inner/page_inner.styles.js +35 -0
- package/optimize/lib/components/page_template/outer/index.js +13 -0
- package/optimize/lib/components/page_template/outer/page_outer.js +42 -0
- package/optimize/lib/components/page_template/outer/page_outer.styles.js +51 -0
- package/optimize/lib/components/page_template/page_template.js +228 -0
- package/optimize/lib/global_styling/functions/logicals.js +1 -1
- package/optimize/lib/global_styling/mixins/_helpers.js +27 -9
- package/package.json +1 -1
- package/src/components/page/_index.scss +0 -5
- package/src/components/page/page_content/_page_content_body.scss +10 -1
- package/src/components/tabs/_tabs.scss +2 -0
- package/test-env/components/bottom_bar/bottom_bar.js +20 -3
- package/test-env/components/header/header.js +2 -0
- package/test-env/components/header/header_links/header_links.js +2 -1
- package/test-env/components/index.js +13 -0
- package/test-env/components/page/_bottom_border.js +5 -0
- package/test-env/components/page/_restrict_width.js +38 -7
- package/test-env/components/page/index.js +28 -12
- package/test-env/components/page/page.js +22 -34
- package/test-env/components/page/page.styles.js +46 -0
- package/test-env/components/page/page_body/page_body.js +20 -29
- package/test-env/components/page/page_body/page_body.styles.js +27 -0
- package/test-env/components/page/page_content/index.js +8 -8
- package/test-env/components/page/page_content/page_content.js +8 -4
- package/test-env/components/page/page_content/page_content_body.js +13 -9
- package/test-env/components/page/page_content/page_content_header.js +8 -4
- package/test-env/components/page/page_content/page_content_header_section.js +8 -4
- package/test-env/components/page/page_header/page_header.js +31 -175
- package/test-env/components/page/page_header/page_header.styles.js +27 -0
- package/test-env/components/page/page_header/page_header_content.js +109 -16
- package/test-env/components/page/page_header/page_header_content.styles.js +87 -0
- package/test-env/components/page/page_section/index.js +13 -0
- package/test-env/components/page/page_section/page_section.js +110 -0
- package/test-env/components/page/page_section/page_section.styles.js +51 -0
- package/test-env/components/page/page_side_bar/index.js +2 -2
- package/test-env/components/page/page_side_bar/page_side_bar.js +9 -5
- package/test-env/components/page/page_sidebar/index.js +13 -0
- package/test-env/components/page/page_sidebar/page_sidebar.js +113 -0
- package/test-env/components/page/page_sidebar/page_sidebar.styles.js +32 -0
- package/test-env/components/page/page_template.js +76 -178
- package/test-env/components/page_template/bottom_bar/page_bottom_bar.js +102 -0
- package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +114 -0
- package/test-env/components/page_template/index.js +13 -0
- package/test-env/components/page_template/inner/index.js +13 -0
- package/test-env/components/page_template/inner/page_inner.js +57 -0
- package/test-env/components/page_template/inner/page_inner.styles.js +35 -0
- package/test-env/components/page_template/outer/index.js +13 -0
- package/test-env/components/page_template/outer/page_outer.js +65 -0
- package/test-env/components/page_template/outer/page_outer.styles.js +51 -0
- package/test-env/components/page_template/page_template.js +387 -0
- package/test-env/global_styling/functions/logicals.js +1 -1
- package/test-env/global_styling/mixins/_helpers.js +27 -9
- package/src/components/page/_mixins.scss +0 -12
- package/src/components/page/_page.scss +0 -41
- package/src/components/page/page_body/_index.scss +0 -1
- package/src/components/page/page_body/_page_body.scss +0 -45
- package/src/components/page/page_header/_index.scss +0 -3
- package/src/components/page/page_header/_page_header.scss +0 -78
- package/src/components/page/page_header/_page_header_content.scss +0 -15
- package/src/components/page/page_header/_page_header_section.scss +0 -26
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TEMPLATES = exports.
|
|
6
|
+
exports.TEMPLATES = exports.EuiPageTemplate_Deprecated = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,6 +11,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
15
|
+
|
|
14
16
|
var _page = require("./page");
|
|
15
17
|
|
|
16
18
|
var _page_side_bar = require("./page_side_bar");
|
|
@@ -27,7 +29,7 @@ var _services = require("../../services");
|
|
|
27
29
|
|
|
28
30
|
var _flex = require("../flex");
|
|
29
31
|
|
|
30
|
-
var
|
|
32
|
+
var _global_styling = require("../../global_styling");
|
|
31
33
|
|
|
32
34
|
var _excluded = ["template", "restrictWidth", "grow", "paddingSize", "fullHeight", "children", "className", "pageSideBar", "pageSideBarProps", "pageHeader", "pageBodyProps", "pageContentProps", "pageContentBodyProps", "bottomBar", "bottomBarProps", "minHeight"];
|
|
33
35
|
|
|
@@ -48,7 +50,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
48
50
|
var TEMPLATES = ['default', 'centeredBody', 'centeredContent', 'empty'];
|
|
49
51
|
exports.TEMPLATES = TEMPLATES;
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
/**
|
|
54
|
+
* This component has been deprecated in favor of the new
|
|
55
|
+
* namespaced version. You can still import this component
|
|
56
|
+
* for a period of time by importing `as EuiPageTemplate`.
|
|
57
|
+
*/
|
|
58
|
+
var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
52
59
|
var _pageBodyProps2;
|
|
53
60
|
|
|
54
61
|
var _ref$template = _ref.template,
|
|
@@ -74,9 +81,12 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
74
81
|
minHeight = _ref$minHeight === void 0 ? 460 : _ref$minHeight,
|
|
75
82
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
76
83
|
|
|
84
|
+
// BWC page header margin to match padding
|
|
85
|
+
var headerMargin = /*#__PURE__*/(0, _react2.css)("margin-bottom: ".concat((0, _global_styling.useEuiPaddingSize)(paddingSize)), ";label:headerMargin;");
|
|
77
86
|
/**
|
|
78
87
|
* Full height ~madness~ logic
|
|
79
88
|
*/
|
|
89
|
+
|
|
80
90
|
var canFullHeight = (0, _services.useIsWithinBreakpoints)(['m', 'l', 'xl']) && (template === 'default' || template === 'empty');
|
|
81
91
|
var fullHeightClass = {
|
|
82
92
|
'eui-fullHeight': fullHeight && canFullHeight
|
|
@@ -134,18 +144,19 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
134
144
|
grow: grow
|
|
135
145
|
}, rest, {
|
|
136
146
|
style: pageStyle
|
|
137
|
-
}), (0, _react2.jsx)(_page_side_bar.
|
|
147
|
+
}), (0, _react2.jsx)(_page_side_bar.EuiPageSideBar_Deprecated, _extends({
|
|
138
148
|
sticky: true,
|
|
139
149
|
paddingSize: paddingSize
|
|
140
150
|
}, pageSideBarProps), pageSideBar), (0, _react2.jsx)(_page_body.EuiPageBody, _extends({
|
|
141
151
|
paddingSize: paddingSize
|
|
142
152
|
}, pageBodyProps), pageHeader && (0, _react2.jsx)(_page_header.EuiPageHeader, _extends({
|
|
143
|
-
restrictWidth: restrictWidth
|
|
144
|
-
|
|
153
|
+
restrictWidth: restrictWidth,
|
|
154
|
+
css: headerMargin
|
|
155
|
+
}, pageHeader)), (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, _extends({
|
|
145
156
|
verticalPosition: "center",
|
|
146
157
|
horizontalPosition: "center",
|
|
147
158
|
paddingSize: paddingSize
|
|
148
|
-
}, pageContentProps), (0, _react2.jsx)(_page_content.
|
|
159
|
+
}, pageContentProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, _extends({
|
|
149
160
|
restrictWidth: restrictWidth
|
|
150
161
|
}, pageContentBodyProps), children)))) : (0, _react2.jsx)(_page.EuiPage, _extends({
|
|
151
162
|
className: classes,
|
|
@@ -158,12 +169,13 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
158
169
|
}, pageBodyProps), pageHeader && (0, _react2.jsx)(_page_header.EuiPageHeader, _extends({
|
|
159
170
|
paddingSize: "none",
|
|
160
171
|
restrictWidth: false,
|
|
172
|
+
css: headerMargin,
|
|
161
173
|
bottomBorder: true
|
|
162
|
-
}, pageHeader)), (0, _react2.jsx)(_page_body.EuiPageBody, null, (0, _react2.jsx)(_page_content.
|
|
174
|
+
}, pageHeader)), (0, _react2.jsx)(_page_body.EuiPageBody, null, (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, _extends({
|
|
163
175
|
verticalPosition: "center",
|
|
164
176
|
horizontalPosition: "center",
|
|
165
177
|
paddingSize: paddingSize
|
|
166
|
-
}, pageContentProps), (0, _react2.jsx)(_page_content.
|
|
178
|
+
}, pageContentProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, _extends({
|
|
167
179
|
paddingSize: "none",
|
|
168
180
|
restrictWidth: restrictWidth
|
|
169
181
|
}, pageContentBodyProps), children)))));
|
|
@@ -180,21 +192,22 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
180
192
|
grow: grow
|
|
181
193
|
}, rest, {
|
|
182
194
|
style: pageStyle
|
|
183
|
-
}), (0, _react2.jsx)(_page_side_bar.
|
|
195
|
+
}), (0, _react2.jsx)(_page_side_bar.EuiPageSideBar_Deprecated, _extends({
|
|
184
196
|
sticky: true,
|
|
185
197
|
paddingSize: paddingSize
|
|
186
198
|
}, pageSideBarProps), pageSideBar), (0, _react2.jsx)(_page_body.EuiPageBody, _extends({
|
|
187
199
|
panelled: true,
|
|
188
200
|
paddingSize: paddingSize
|
|
189
201
|
}, pageBodyProps), pageHeader && (0, _react2.jsx)(_page_header.EuiPageHeader, _extends({
|
|
190
|
-
restrictWidth: restrictWidth
|
|
191
|
-
|
|
202
|
+
restrictWidth: restrictWidth,
|
|
203
|
+
css: headerMargin
|
|
204
|
+
}, pageHeader)), (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, _extends({
|
|
192
205
|
verticalPosition: "center",
|
|
193
206
|
horizontalPosition: "center",
|
|
194
207
|
hasShadow: false,
|
|
195
208
|
color: "subdued",
|
|
196
209
|
paddingSize: paddingSize
|
|
197
|
-
}, pageContentProps), (0, _react2.jsx)(_page_content.
|
|
210
|
+
}, pageContentProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, _extends({
|
|
198
211
|
restrictWidth: restrictWidth
|
|
199
212
|
}, pageContentBodyProps), children)))) : (0, _react2.jsx)(_page.EuiPage, _extends({
|
|
200
213
|
className: classes,
|
|
@@ -204,8 +217,9 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
204
217
|
style: pageStyle
|
|
205
218
|
}), (0, _react2.jsx)(_page_body.EuiPageBody, pageBodyProps, pageHeader && (0, _react2.jsx)(_page_header.EuiPageHeader, _extends({
|
|
206
219
|
paddingSize: paddingSize,
|
|
207
|
-
restrictWidth: restrictWidth
|
|
208
|
-
|
|
220
|
+
restrictWidth: restrictWidth,
|
|
221
|
+
bottomBorder: "extended"
|
|
222
|
+
}, pageHeader)), (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, {
|
|
209
223
|
role: null,
|
|
210
224
|
borderRadius: "none",
|
|
211
225
|
hasShadow: false,
|
|
@@ -213,13 +227,13 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
213
227
|
style: {
|
|
214
228
|
display: 'flex'
|
|
215
229
|
}
|
|
216
|
-
}, (0, _react2.jsx)(_page_content.
|
|
230
|
+
}, (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, _extends({
|
|
217
231
|
verticalPosition: "center",
|
|
218
232
|
horizontalPosition: "center",
|
|
219
233
|
hasShadow: false,
|
|
220
234
|
color: "subdued",
|
|
221
235
|
paddingSize: paddingSize
|
|
222
|
-
}, pageContentProps), (0, _react2.jsx)(_page_content.
|
|
236
|
+
}, pageContentProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, _extends({
|
|
223
237
|
restrictWidth: restrictWidth
|
|
224
238
|
}, pageContentBodyProps), children)))));
|
|
225
239
|
|
|
@@ -235,20 +249,22 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
235
249
|
grow: grow
|
|
236
250
|
}, rest, {
|
|
237
251
|
style: pageStyle
|
|
238
|
-
}), (0, _react2.jsx)(_page_side_bar.
|
|
252
|
+
}), (0, _react2.jsx)(_page_side_bar.EuiPageSideBar_Deprecated, _extends({
|
|
239
253
|
sticky: true,
|
|
240
254
|
paddingSize: paddingSize
|
|
241
255
|
}, pageSideBarProps), pageSideBar), (0, _react2.jsx)(_page_body.EuiPageBody, _extends({
|
|
242
256
|
paddingSize: paddingSize
|
|
243
257
|
}, pageBodyProps), pageHeader && (0, _react2.jsx)(_page_header.EuiPageHeader, _extends({
|
|
244
|
-
restrictWidth: restrictWidth
|
|
245
|
-
|
|
258
|
+
restrictWidth: restrictWidth,
|
|
259
|
+
bottomBorder: true,
|
|
260
|
+
css: headerMargin
|
|
261
|
+
}, pageHeader)), (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, _extends({
|
|
246
262
|
hasBorder: false,
|
|
247
263
|
hasShadow: false,
|
|
248
264
|
paddingSize: 'none',
|
|
249
265
|
color: 'transparent',
|
|
250
266
|
borderRadius: 'none'
|
|
251
|
-
}, pageContentProps), (0, _react2.jsx)(_page_content.
|
|
267
|
+
}, pageContentProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, _extends({
|
|
252
268
|
restrictWidth: restrictWidth
|
|
253
269
|
}, pageContentBodyProps), children)))) : (0, _react2.jsx)(_page.EuiPage, _extends({
|
|
254
270
|
className: classes,
|
|
@@ -261,14 +277,15 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
261
277
|
}, pageBodyProps), pageHeader && (0, _react2.jsx)(_page_header.EuiPageHeader, _extends({
|
|
262
278
|
paddingSize: "none",
|
|
263
279
|
restrictWidth: false,
|
|
280
|
+
css: headerMargin,
|
|
264
281
|
bottomBorder: true
|
|
265
|
-
}, pageHeader)), (0, _react2.jsx)(_page_content.
|
|
282
|
+
}, pageHeader)), (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, _extends({
|
|
266
283
|
hasBorder: false,
|
|
267
284
|
hasShadow: false,
|
|
268
285
|
paddingSize: 'none',
|
|
269
286
|
color: 'transparent',
|
|
270
287
|
borderRadius: 'none'
|
|
271
|
-
}, pageContentProps), (0, _react2.jsx)(_page_content.
|
|
288
|
+
}, pageContentProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, _extends({
|
|
272
289
|
paddingSize: "none"
|
|
273
290
|
}, pageContentBodyProps), children))));
|
|
274
291
|
|
|
@@ -283,7 +300,7 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
283
300
|
paddingSize: paddingSize,
|
|
284
301
|
position: canFullHeight && fullHeight ? 'static' : 'sticky' // Using uknown here because of the possible conflict with overriding props and position `sticky`
|
|
285
302
|
|
|
286
|
-
}, bottomBarProps), (0, _react2.jsx)(_page_content.
|
|
303
|
+
}, bottomBarProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, {
|
|
287
304
|
paddingSize: 'none',
|
|
288
305
|
restrictWidth: restrictWidth
|
|
289
306
|
}, bottomBar)) : undefined;
|
|
@@ -293,7 +310,7 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
293
310
|
grow: grow
|
|
294
311
|
}, rest, {
|
|
295
312
|
style: pageStyle
|
|
296
|
-
}), (0, _react2.jsx)(_page_side_bar.
|
|
313
|
+
}), (0, _react2.jsx)(_page_side_bar.EuiPageSideBar_Deprecated, _extends({
|
|
297
314
|
sticky: true,
|
|
298
315
|
paddingSize: paddingSize
|
|
299
316
|
}, pageSideBarProps), pageSideBar), (0, _react2.jsx)(_page_body.EuiPageBody, _extends({
|
|
@@ -305,14 +322,15 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
305
322
|
className: (_pageBodyProps2 = pageBodyProps) === null || _pageBodyProps2 === void 0 ? void 0 : _pageBodyProps2.className
|
|
306
323
|
}, pageHeader && (0, _react2.jsx)(_page_header.EuiPageHeader, _extends({
|
|
307
324
|
bottomBorder: true,
|
|
308
|
-
restrictWidth: restrictWidth
|
|
309
|
-
|
|
325
|
+
restrictWidth: restrictWidth,
|
|
326
|
+
css: headerMargin
|
|
327
|
+
}, pageHeader)), (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, _extends({
|
|
310
328
|
hasShadow: false,
|
|
311
329
|
hasBorder: false,
|
|
312
330
|
color: 'transparent',
|
|
313
331
|
borderRadius: 'none',
|
|
314
332
|
paddingSize: "none"
|
|
315
|
-
}, pageContentProps), (0, _react2.jsx)(_page_content.
|
|
333
|
+
}, pageContentProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, _extends({
|
|
316
334
|
restrictWidth: restrictWidth
|
|
317
335
|
}, pageContentBodyProps), children))), bottomBarNode)) : (0, _react2.jsx)(_page.EuiPage, _extends({
|
|
318
336
|
className: classes,
|
|
@@ -322,22 +340,23 @@ var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
322
340
|
style: pageStyle
|
|
323
341
|
}), (0, _react2.jsx)(_page_body.EuiPageBody, pageBodyProps, pageHeader && (0, _react2.jsx)(_page_header.EuiPageHeader, _extends({
|
|
324
342
|
restrictWidth: restrictWidth,
|
|
325
|
-
paddingSize: paddingSize
|
|
326
|
-
|
|
343
|
+
paddingSize: paddingSize,
|
|
344
|
+
bottomBorder: "extended"
|
|
345
|
+
}, pageHeader)), (0, _react2.jsx)(_page_content.EuiPageContent_Deprecated, _extends({
|
|
327
346
|
hasBorder: pageHeader === undefined ? false : undefined,
|
|
328
347
|
hasShadow: false,
|
|
329
348
|
paddingSize: 'none',
|
|
330
349
|
color: 'plain',
|
|
331
350
|
borderRadius: 'none'
|
|
332
|
-
}, pageContentProps), (0, _react2.jsx)(_page_content.
|
|
351
|
+
}, pageContentProps), (0, _react2.jsx)(_page_content.EuiPageContentBody_Deprecated, _extends({
|
|
333
352
|
restrictWidth: restrictWidth,
|
|
334
353
|
paddingSize: paddingSize
|
|
335
354
|
}, pageContentBodyProps), children)), bottomBarNode));
|
|
336
355
|
}
|
|
337
356
|
};
|
|
338
357
|
|
|
339
|
-
exports.
|
|
340
|
-
|
|
358
|
+
exports.EuiPageTemplate_Deprecated = EuiPageTemplate_Deprecated;
|
|
359
|
+
EuiPageTemplate_Deprecated.propTypes = {
|
|
341
360
|
/**
|
|
342
361
|
* Choose between 3 types of templates.
|
|
343
362
|
* `default`: Typical layout with nothing centered
|
|
@@ -351,7 +370,7 @@ EuiPageTemplate.propTypes = {
|
|
|
351
370
|
* Padding size will not get applied to the over-arching #EuiPage,
|
|
352
371
|
* but will propogate through all the components to keep them in sync
|
|
353
372
|
*/
|
|
354
|
-
paddingSize: _propTypes.default.
|
|
373
|
+
paddingSize: _propTypes.default.oneOf(["none", "s", "m", "l"]),
|
|
355
374
|
|
|
356
375
|
/**
|
|
357
376
|
* Optionally include #EuiPageSideBar content.
|
|
@@ -364,7 +383,7 @@ EuiPageTemplate.propTypes = {
|
|
|
364
383
|
*/
|
|
365
384
|
pageSideBarProps: _propTypes.default.shape({
|
|
366
385
|
/**
|
|
367
|
-
* Adds `position: sticky`
|
|
386
|
+
* Adds `position: sticky`
|
|
368
387
|
*/
|
|
369
388
|
sticky: _propTypes.default.bool,
|
|
370
389
|
|
|
@@ -382,157 +401,27 @@ EuiPageTemplate.propTypes = {
|
|
|
382
401
|
*/
|
|
383
402
|
pageHeader: _propTypes.default.shape({
|
|
384
403
|
/**
|
|
385
|
-
* Adjust the padding.
|
|
386
|
-
* When using this setting it's best to be consistent throughout all similar usages
|
|
404
|
+
* Adjust the overall padding.
|
|
387
405
|
*/
|
|
388
406
|
paddingSize: _propTypes.default.any,
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Adds a bottom border to separate it from the content after
|
|
392
|
-
*/
|
|
393
|
-
bottomBorder: _propTypes.default.bool,
|
|
394
407
|
className: _propTypes.default.string,
|
|
395
408
|
"aria-label": _propTypes.default.string,
|
|
396
409
|
"data-test-subj": _propTypes.default.string,
|
|
397
410
|
|
|
398
|
-
/**
|
|
399
|
-
* Set to false if you don't want the children to stack at small screen sizes.
|
|
400
|
-
* Set to `reverse` to display the right side content first for the sake of hierarchy (like global time)
|
|
401
|
-
*/
|
|
402
|
-
responsive: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.oneOf(["reverse"])]),
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Vertical alignment of the left and right side content;
|
|
406
|
-
* Default is `middle` for custom content, but `top` for when `pageTitle` or `tabs` are included
|
|
407
|
-
*/
|
|
408
|
-
alignItems: _propTypes.default.any,
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Pass custom an array of content to this side usually up to 3 buttons.
|
|
412
|
-
* The first button should be primary, usually with `fill` and will be visually displayed as the last item,
|
|
413
|
-
* but first in the tab order
|
|
414
|
-
*/
|
|
415
|
-
rightSideItems: _propTypes.default.arrayOf(_propTypes.default.node.isRequired),
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Additional EuiFlexGroup props to pass to the container of the `rightSideItems`
|
|
419
|
-
*/
|
|
420
|
-
rightSideGroupProps: _propTypes.default.any,
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Custom children will be rendered before the `tabs` unless no `pageTitle` is present, then it will be the last item
|
|
424
|
-
*/
|
|
425
|
-
children: _propTypes.default.node,
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Position is dependent on existing with a `pageTitle` or `tabs`
|
|
429
|
-
* Automatically get wrapped in a single paragraph tag inside an EuiText block
|
|
430
|
-
*/
|
|
431
|
-
description: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.node.isRequired]),
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Wrapped in an `H1` so choose appropriately.
|
|
435
|
-
* A simple string is best
|
|
436
|
-
*/
|
|
437
|
-
pageTitle: _propTypes.default.node,
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Additional props to pass to the EuiTitle
|
|
441
|
-
*/
|
|
442
|
-
pageTitleProps: _propTypes.default.shape({
|
|
443
|
-
className: _propTypes.default.string,
|
|
444
|
-
"aria-label": _propTypes.default.string,
|
|
445
|
-
"data-test-subj": _propTypes.default.string,
|
|
446
|
-
textTransform: _propTypes.default.any,
|
|
447
|
-
id: _propTypes.default.string
|
|
448
|
-
}),
|
|
449
|
-
|
|
450
|
-
/**
|
|
451
|
-
* Optional icon to place to the left of the title
|
|
452
|
-
*/
|
|
453
|
-
iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Additional EuiIcon props to apply to the optional icon
|
|
457
|
-
*/
|
|
458
|
-
iconProps: _propTypes.default.any,
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* Optional array breadcrumbs that render before the `pageTitle`
|
|
462
|
-
*/
|
|
463
|
-
breadcrumbs: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
464
|
-
className: _propTypes.default.string,
|
|
465
|
-
"aria-label": _propTypes.default.string,
|
|
466
|
-
"data-test-subj": _propTypes.default.string,
|
|
467
|
-
href: _propTypes.default.string,
|
|
468
|
-
rel: _propTypes.default.string,
|
|
469
|
-
onClick: _propTypes.default.func,
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Visible label of the breadcrumb
|
|
473
|
-
*/
|
|
474
|
-
text: _propTypes.default.node.isRequired,
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
* Force a max-width on the breadcrumb text
|
|
478
|
-
*/
|
|
479
|
-
truncate: _propTypes.default.bool,
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Accepts any EuiLink `color` when rendered as one (has `href` or `onClick`)
|
|
483
|
-
*/
|
|
484
|
-
color: _propTypes.default.any,
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Override the existing `aria-current` which defaults to `page` for the last breadcrumb
|
|
488
|
-
*/
|
|
489
|
-
"aria-current": _propTypes.default.any
|
|
490
|
-
}).isRequired),
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Adjust the props of [EuiBreadcrumbs](#/navigation/breadcrumbs)
|
|
494
|
-
*/
|
|
495
|
-
breadcrumbProps: _propTypes.default.any,
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* In-app navigation presented as large borderless tabs.
|
|
499
|
-
* Accepts an array of `EuiTab` objects;
|
|
500
|
-
*/
|
|
501
|
-
tabs: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
502
|
-
/**
|
|
503
|
-
* Visible text of the tab
|
|
504
|
-
*/
|
|
505
|
-
label: _propTypes.default.node.isRequired
|
|
506
|
-
}).isRequired),
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Any extras to apply to the outer tabs container.
|
|
510
|
-
* Extends `EuiTabs`
|
|
511
|
-
*/
|
|
512
|
-
tabsProps: _propTypes.default.shape({
|
|
513
|
-
className: _propTypes.default.string,
|
|
514
|
-
"aria-label": _propTypes.default.string,
|
|
515
|
-
"data-test-subj": _propTypes.default.string,
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* ReactNode to render as this component's content
|
|
519
|
-
*/
|
|
520
|
-
children: _propTypes.default.node,
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* Adds a bottom border to separate it from the content after
|
|
524
|
-
*/
|
|
525
|
-
bottomBorder: _propTypes.default.bool
|
|
526
|
-
}),
|
|
527
|
-
|
|
528
411
|
/**
|
|
529
412
|
* Sets the max-width of the page,
|
|
530
|
-
* set to `true` to use the default size of `
|
|
413
|
+
* set to `true` to use the default size of `1200px`,
|
|
531
414
|
* set to `false` to not restrict the width,
|
|
532
415
|
* set to a number for a custom width in px,
|
|
533
416
|
* set to a string for a custom width in custom measurement.
|
|
534
417
|
*/
|
|
535
|
-
restrictWidth: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.number.isRequired, _propTypes.default.string.isRequired])
|
|
418
|
+
restrictWidth: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.number.isRequired, _propTypes.default.string.isRequired]),
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Adds a bottom border to separate it from the content after;
|
|
422
|
+
* Passing `extended` will ensure the border touches the sides of the parent container.
|
|
423
|
+
*/
|
|
424
|
+
bottomBorder: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.oneOf(["extended"])])
|
|
536
425
|
}),
|
|
537
426
|
|
|
538
427
|
/**
|
|
@@ -545,7 +434,7 @@ EuiPageTemplate.propTypes = {
|
|
|
545
434
|
|
|
546
435
|
/**
|
|
547
436
|
* Sets the max-width of the page,
|
|
548
|
-
* set to `true` to use the default size of `
|
|
437
|
+
* set to `true` to use the default size of `1200px`,
|
|
549
438
|
* set to `false` to not restrict the width,
|
|
550
439
|
* set to a number for a custom width in px,
|
|
551
440
|
* set to a string for a custom width in custom measurement.
|
|
@@ -667,7 +556,7 @@ EuiPageTemplate.propTypes = {
|
|
|
667
556
|
|
|
668
557
|
/**
|
|
669
558
|
* Sets the max-width of the page,
|
|
670
|
-
* set to `true` to use the default size of `
|
|
559
|
+
* set to `true` to use the default size of `1200px`,
|
|
671
560
|
* set to `false` to not restrict the width,
|
|
672
561
|
* set to a number for a custom width in px,
|
|
673
562
|
* set to a string for a custom width in custom measurement.
|
|
@@ -698,7 +587,17 @@ EuiPageTemplate.propTypes = {
|
|
|
698
587
|
* Whether to wrap in an EuiPortal which appends the component to the body element.
|
|
699
588
|
* Only works if `position` is `fixed`.
|
|
700
589
|
*/
|
|
701
|
-
usePortal: _propTypes.default.bool,
|
|
590
|
+
usePortal: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
|
|
591
|
+
/**
|
|
592
|
+
* ReactNode to render as this component's content
|
|
593
|
+
*/
|
|
594
|
+
children: _propTypes.default.node.isRequired,
|
|
595
|
+
insert: _propTypes.default.shape({
|
|
596
|
+
sibling: _propTypes.default.any.isRequired,
|
|
597
|
+
position: _propTypes.default.oneOf(["before", "after"]).isRequired
|
|
598
|
+
}),
|
|
599
|
+
portalRef: _propTypes.default.func
|
|
600
|
+
}).isRequired]),
|
|
702
601
|
|
|
703
602
|
/**
|
|
704
603
|
* Whether the component should apply padding on the document body element to afford for its own displacement height.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports._EuiPageBottomBar = void 0;
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
|
+
|
|
14
|
+
var _react2 = _interopRequireWildcard(require("react"));
|
|
15
|
+
|
|
16
|
+
var _reactDom = require("react-dom");
|
|
17
|
+
|
|
18
|
+
var _services = require("../../../services");
|
|
19
|
+
|
|
20
|
+
var _bottom_bar = require("../../bottom_bar");
|
|
21
|
+
|
|
22
|
+
var _page_section = require("../../page/page_section");
|
|
23
|
+
|
|
24
|
+
var _excluded = ["children", "paddingSize", "restrictWidth", "parent"];
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
36
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
+
|
|
38
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
|
+
|
|
40
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
41
|
+
|
|
42
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
43
|
+
|
|
44
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
+
|
|
46
|
+
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; }
|
|
47
|
+
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
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)."; }
|
|
51
|
+
|
|
52
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
53
|
+
name: "1y6dyt1-bar",
|
|
54
|
+
styles: "overflow:hidden;flex-shrink:0;label:bar;"
|
|
55
|
+
} : {
|
|
56
|
+
name: "1y6dyt1-bar",
|
|
57
|
+
styles: "overflow:hidden;flex-shrink:0;label:bar;",
|
|
58
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var _EuiPageBottomBar = function _EuiPageBottomBar(_ref2) {
|
|
62
|
+
var children = _ref2.children,
|
|
63
|
+
paddingSize = _ref2.paddingSize,
|
|
64
|
+
restrictWidth = _ref2.restrictWidth,
|
|
65
|
+
parent = _ref2.parent,
|
|
66
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
67
|
+
|
|
68
|
+
// In order for the bottom bar to be placed at the end of the content,
|
|
69
|
+
// it must know what parent element to insert into
|
|
70
|
+
var _useState = (0, _react2.useState)(false),
|
|
71
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
72
|
+
hasValidAnchor = _useState2[0],
|
|
73
|
+
setHasValidAnchor = _useState2[1];
|
|
74
|
+
|
|
75
|
+
var animationFrameId = (0, _react2.useRef)();
|
|
76
|
+
var parentNode = (0, _react2.useRef)(null);
|
|
77
|
+
(0, _react2.useEffect)(function () {
|
|
78
|
+
animationFrameId.current = window.requestAnimationFrame(function () {
|
|
79
|
+
parentNode.current = (0, _services.findElementBySelectorOrRef)(parent);
|
|
80
|
+
setHasValidAnchor(parentNode.current ? true : false);
|
|
81
|
+
});
|
|
82
|
+
return function () {
|
|
83
|
+
animationFrameId.current && window.cancelAnimationFrame(animationFrameId.current);
|
|
84
|
+
};
|
|
85
|
+
}, [parent]);
|
|
86
|
+
var bar = (0, _react.jsx)(_bottom_bar.EuiBottomBar, _extends({
|
|
87
|
+
paddingSize: 'none',
|
|
88
|
+
position: "sticky" // Hide the overflow in case of larger flex margins than padding
|
|
89
|
+
,
|
|
90
|
+
css: _ref // Using unknown here because of the possible conflict with overriding props and position `sticky`
|
|
91
|
+
|
|
92
|
+
}, rest), (0, _react.jsx)(_page_section.EuiPageSection, {
|
|
93
|
+
paddingSize: paddingSize,
|
|
94
|
+
restrictWidth: restrictWidth
|
|
95
|
+
}, children));
|
|
96
|
+
return hasValidAnchor && parentNode.current ? /*#__PURE__*/(0, _reactDom.createPortal)(bar, parentNode.current) : bar;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
exports._EuiPageBottomBar = _EuiPageBottomBar;
|
|
100
|
+
_EuiPageBottomBar.propTypes = {
|
|
101
|
+
/**
|
|
102
|
+
* The reference id of the element to insert into
|
|
103
|
+
*/
|
|
104
|
+
parent: _propTypes.default.string,
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Sets the max-width of the page,
|
|
108
|
+
* set to `true` to use the default size of `1200px`,
|
|
109
|
+
* set to `false` to not restrict the width,
|
|
110
|
+
* set to a number for a custom width in px,
|
|
111
|
+
* set to a string for a custom width in custom measurement.
|
|
112
|
+
*/
|
|
113
|
+
restrictWidth: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.number.isRequired, _propTypes.default.string.isRequired])
|
|
114
|
+
};
|