@elastic/eui 63.0.5 → 63.0.6
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/es/components/page/page_content/page_content.js +1 -2
- package/es/components/page/page_content/page_content_body.js +1 -2
- package/es/components/page/page_content/page_content_header.js +1 -2
- package/es/components/page/page_content/page_content_header_section.js +1 -2
- package/es/components/page/page_section/page_section.js +10 -3
- package/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/es/components/page/page_template.js +3 -1
- package/es/components/page_template/empty_prompt/page_empty_prompt.js +5 -0
- package/es/components/page_template/page_template.js +7 -1
- package/eui.d.ts +14 -13
- package/lib/components/page/page_content/page_content.js +1 -2
- package/lib/components/page/page_content/page_content_body.js +1 -2
- package/lib/components/page/page_content/page_content_header.js +1 -2
- package/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/lib/components/page/page_section/page_section.js +10 -3
- package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/lib/components/page/page_template.js +3 -1
- package/lib/components/page_template/empty_prompt/page_empty_prompt.js +5 -0
- package/lib/components/page_template/page_template.js +7 -1
- package/optimize/es/components/page/page_content/page_content.js +1 -2
- package/optimize/es/components/page/page_content/page_content_body.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/es/components/page/page_section/page_section.js +4 -2
- package/optimize/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/es/components/page/page_template.js +3 -1
- package/optimize/lib/components/page/page_content/page_content.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_body.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/lib/components/page/page_section/page_section.js +4 -2
- package/optimize/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/lib/components/page/page_template.js +3 -1
- package/package.json +1 -1
- package/test-env/components/page/page_content/page_content.js +1 -2
- package/test-env/components/page/page_content/page_content_body.js +1 -2
- package/test-env/components/page/page_content/page_content_header.js +1 -2
- package/test-env/components/page/page_content/page_content_header_section.js +1 -2
- package/test-env/components/page/page_section/page_section.js +10 -3
- package/test-env/components/page/page_side_bar/page_side_bar.js +1 -2
- package/test-env/components/page/page_template.js +3 -1
- package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +5 -0
- package/test-env/components/page_template/page_template.js +7 -1
|
@@ -26,8 +26,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* Use EuiPageSection instead
|
|
29
|
+
* @deprecated Use EuiPageSection instead
|
|
31
30
|
*/
|
|
32
31
|
export var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
33
32
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -30,8 +30,7 @@ var paddingSizeToClassNameMap = {
|
|
|
30
30
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* Use EuiPageSection instead
|
|
33
|
+
* @deprecated Use EuiPageSection instead
|
|
35
34
|
*/
|
|
36
35
|
export var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
37
36
|
var children = _ref.children,
|
|
@@ -19,8 +19,7 @@ import classNames from 'classnames';
|
|
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
* Use EuiPageHeader instead
|
|
22
|
+
* @deprecated Use EuiPageHeader instead
|
|
24
23
|
*/
|
|
25
24
|
export var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
26
25
|
var children = _ref.children,
|
|
@@ -19,8 +19,7 @@ import classNames from 'classnames';
|
|
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
* Use EuiPageHeader instead
|
|
22
|
+
* @deprecated Use EuiPageHeader instead
|
|
24
23
|
*/
|
|
25
24
|
export var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
26
25
|
var children = _ref.children,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
1
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
|
|
@@ -34,6 +34,8 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
34
34
|
_ref$grow = _ref.grow,
|
|
35
35
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
36
36
|
contentProps = _ref.contentProps,
|
|
37
|
+
_ref$component = _ref.component,
|
|
38
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
37
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
40
|
|
|
39
41
|
// Set max-width as a style prop
|
|
@@ -46,7 +48,7 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
46
48
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
47
49
|
var contentStyles = euiPageSectionContentStyles();
|
|
48
50
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
49
|
-
return ___EmotionJSX(
|
|
51
|
+
return ___EmotionJSX(Component, _extends({
|
|
50
52
|
css: cssStyles
|
|
51
53
|
}, rest), ___EmotionJSX("div", _extends({
|
|
52
54
|
css: cssContentStyles
|
|
@@ -98,5 +100,10 @@ EuiPageSection.propTypes = {
|
|
|
98
100
|
/**
|
|
99
101
|
* Passed down to the div wrapper of the section contents
|
|
100
102
|
*/
|
|
101
|
-
contentProps: PropTypes.any
|
|
103
|
+
contentProps: PropTypes.any,
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Sets which HTML element to render.
|
|
107
|
+
*/
|
|
108
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired])
|
|
102
109
|
};
|
|
@@ -27,8 +27,7 @@ var paddingSizeToClassNameMap = {
|
|
|
27
27
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* Use the new EuiPageSidebar instead
|
|
30
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
32
31
|
*/
|
|
33
32
|
export var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
34
33
|
var children = _ref.children,
|
|
@@ -38,7 +38,9 @@ export var TEMPLATES = ['default', 'centeredBody', 'centeredContent', 'empty'];
|
|
|
38
38
|
/**
|
|
39
39
|
* This component has been deprecated in favor of the new
|
|
40
40
|
* namespaced version. You can still import this component
|
|
41
|
-
*
|
|
41
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
42
|
+
*
|
|
43
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
42
44
|
*/
|
|
43
45
|
export var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
44
46
|
var _pageBodyProps2;
|
|
@@ -103,5 +103,10 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
103
103
|
* Passed down to the div wrapper of the section contents
|
|
104
104
|
*/
|
|
105
105
|
contentProps: PropTypes.any,
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Sets which HTML element to render.
|
|
109
|
+
*/
|
|
110
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired]),
|
|
106
111
|
panelled: PropTypes.bool
|
|
107
112
|
};
|
|
@@ -296,7 +296,12 @@ _EuiPageSection.propTypes = {
|
|
|
296
296
|
/**
|
|
297
297
|
* Passed down to the div wrapper of the section contents
|
|
298
298
|
*/
|
|
299
|
-
contentProps: PropTypes.any
|
|
299
|
+
contentProps: PropTypes.any,
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Sets which HTML element to render.
|
|
303
|
+
*/
|
|
304
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired])
|
|
300
305
|
};
|
|
301
306
|
|
|
302
307
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
@@ -344,6 +349,7 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
344
349
|
alignment: PropTypes.any,
|
|
345
350
|
grow: PropTypes.bool,
|
|
346
351
|
contentProps: PropTypes.any,
|
|
352
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired]),
|
|
347
353
|
panelled: PropTypes.bool
|
|
348
354
|
};
|
|
349
355
|
|
package/eui.d.ts
CHANGED
|
@@ -14986,8 +14986,7 @@ declare module '@elastic/eui/src/components/page/page_content/page_content' {
|
|
|
14986
14986
|
role?: HTMLAttributes['role'] | null;
|
|
14987
14987
|
};
|
|
14988
14988
|
/**
|
|
14989
|
-
*
|
|
14990
|
-
* Use EuiPageSection instead
|
|
14989
|
+
* @deprecated Use EuiPageSection instead
|
|
14991
14990
|
*/
|
|
14992
14991
|
export const EuiPageContent_Deprecated: FunctionComponent<EuiPageContentProps>;
|
|
14993
14992
|
|
|
@@ -15005,8 +15004,7 @@ declare module '@elastic/eui/src/components/page/page_content/page_content_body'
|
|
|
15005
15004
|
paddingSize?: typeof PADDING_SIZES[number];
|
|
15006
15005
|
}
|
|
15007
15006
|
/**
|
|
15008
|
-
*
|
|
15009
|
-
* Use EuiPageSection instead
|
|
15007
|
+
* @deprecated Use EuiPageSection instead
|
|
15010
15008
|
*/
|
|
15011
15009
|
export const EuiPageContentBody_Deprecated: FunctionComponent<EuiPageContentBodyProps>;
|
|
15012
15010
|
|
|
@@ -15022,8 +15020,7 @@ declare module '@elastic/eui/src/components/page/page_content/page_content_heade
|
|
|
15022
15020
|
responsive?: boolean;
|
|
15023
15021
|
}
|
|
15024
15022
|
/**
|
|
15025
|
-
*
|
|
15026
|
-
* Use EuiPageHeader instead
|
|
15023
|
+
* @deprecated Use EuiPageHeader instead
|
|
15027
15024
|
*/
|
|
15028
15025
|
export const EuiPageContentHeader_Deprecated: FunctionComponent<EuiPageContentHeaderProps>;
|
|
15029
15026
|
|
|
@@ -15034,8 +15031,7 @@ declare module '@elastic/eui/src/components/page/page_content/page_content_heade
|
|
|
15034
15031
|
export interface EuiPageContentHeaderSectionProps extends CommonProps, HTMLAttributes<HTMLDivElement> {
|
|
15035
15032
|
}
|
|
15036
15033
|
/**
|
|
15037
|
-
*
|
|
15038
|
-
* Use EuiPageHeader instead
|
|
15034
|
+
* @deprecated Use EuiPageHeader instead
|
|
15039
15035
|
*/
|
|
15040
15036
|
export const EuiPageContentHeaderSection_Deprecated: FunctionComponent<EuiPageContentHeaderSectionProps>;
|
|
15041
15037
|
|
|
@@ -15245,7 +15241,7 @@ declare module '@elastic/eui/src/components/page/page_section/page_section.style
|
|
|
15245
15241
|
|
|
15246
15242
|
}
|
|
15247
15243
|
declare module '@elastic/eui/src/components/page/page_section/page_section' {
|
|
15248
|
-
import { FunctionComponent, HTMLAttributes } from 'react';
|
|
15244
|
+
import { FunctionComponent, ComponentType, HTMLAttributes } from 'react';
|
|
15249
15245
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
15250
15246
|
import { _EuiPageRestrictWidth } from '@elastic/eui/src/components/page/_restrict_width';
|
|
15251
15247
|
import { _EuiPageBottomBorder } from '@elastic/eui/src/components/page/_bottom_border';
|
|
@@ -15273,7 +15269,11 @@ declare module '@elastic/eui/src/components/page/page_section/page_section' {
|
|
|
15273
15269
|
* Passed down to the div wrapper of the section contents
|
|
15274
15270
|
*/
|
|
15275
15271
|
contentProps?: HTMLAttributes<HTMLDivElement>;
|
|
15276
|
-
|
|
15272
|
+
/**
|
|
15273
|
+
* Sets which HTML element to render.
|
|
15274
|
+
*/
|
|
15275
|
+
component?: keyof JSX.IntrinsicElements | ComponentType;
|
|
15276
|
+
} & Omit<HTMLAttributes<Element>, 'color'>;
|
|
15277
15277
|
export const EuiPageSection: FunctionComponent<EuiPageSectionProps>;
|
|
15278
15278
|
|
|
15279
15279
|
}
|
|
@@ -15297,8 +15297,7 @@ declare module '@elastic/eui/src/components/page/page_side_bar/page_side_bar' {
|
|
|
15297
15297
|
paddingSize?: typeof PADDING_SIZES[number];
|
|
15298
15298
|
}
|
|
15299
15299
|
/**
|
|
15300
|
-
*
|
|
15301
|
-
* Use the new EuiPageSidebar instead
|
|
15300
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
15302
15301
|
*/
|
|
15303
15302
|
export const EuiPageSideBar_Deprecated: FunctionComponent<EuiPageSideBarProps>;
|
|
15304
15303
|
|
|
@@ -15426,7 +15425,9 @@ declare module '@elastic/eui/src/components/page/page_template' {
|
|
|
15426
15425
|
/**
|
|
15427
15426
|
* This component has been deprecated in favor of the new
|
|
15428
15427
|
* namespaced version. You can still import this component
|
|
15429
|
-
*
|
|
15428
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
15429
|
+
*
|
|
15430
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
15430
15431
|
*/
|
|
15431
15432
|
export const EuiPageTemplate_Deprecated: FunctionComponent<EuiPageTemplateProps_Deprecated>;
|
|
15432
15433
|
|
|
@@ -33,8 +33,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* Use EuiPageSection instead
|
|
36
|
+
* @deprecated Use EuiPageSection instead
|
|
38
37
|
*/
|
|
39
38
|
var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
40
39
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -39,8 +39,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
39
39
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
* Use EuiPageSection instead
|
|
42
|
+
* @deprecated Use EuiPageSection instead
|
|
44
43
|
*/
|
|
45
44
|
var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
46
45
|
var children = _ref.children,
|
|
@@ -24,8 +24,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Use EuiPageHeader instead
|
|
27
|
+
* @deprecated Use EuiPageHeader instead
|
|
29
28
|
*/
|
|
30
29
|
var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
31
30
|
var children = _ref.children,
|
|
@@ -24,8 +24,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Use EuiPageHeader instead
|
|
27
|
+
* @deprecated Use EuiPageHeader instead
|
|
29
28
|
*/
|
|
30
29
|
var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
31
30
|
var children = _ref.children,
|
|
@@ -19,7 +19,7 @@ var _global_styling = require("../../../global_styling");
|
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
22
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -43,6 +43,8 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
43
43
|
_ref$grow = _ref.grow,
|
|
44
44
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
45
45
|
contentProps = _ref.contentProps,
|
|
46
|
+
_ref$component = _ref.component,
|
|
47
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
46
48
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
49
|
|
|
48
50
|
// Set max-width as a style prop
|
|
@@ -55,7 +57,7 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
55
57
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
56
58
|
var contentStyles = (0, _page_section.euiPageSectionContentStyles)();
|
|
57
59
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
58
|
-
return (0, _react2.jsx)(
|
|
60
|
+
return (0, _react2.jsx)(Component, _extends({
|
|
59
61
|
css: cssStyles
|
|
60
62
|
}, rest), (0, _react2.jsx)("div", _extends({
|
|
61
63
|
css: cssContentStyles
|
|
@@ -109,5 +111,10 @@ EuiPageSection.propTypes = {
|
|
|
109
111
|
/**
|
|
110
112
|
* Passed down to the div wrapper of the section contents
|
|
111
113
|
*/
|
|
112
|
-
contentProps: _propTypes.default.any
|
|
114
|
+
contentProps: _propTypes.default.any,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Sets which HTML element to render.
|
|
118
|
+
*/
|
|
119
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
113
120
|
};
|
|
@@ -35,8 +35,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
35
35
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
* Use the new EuiPageSidebar instead
|
|
38
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
40
39
|
*/
|
|
41
40
|
var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
42
41
|
var children = _ref.children,
|
|
@@ -53,7 +53,9 @@ exports.TEMPLATES = TEMPLATES;
|
|
|
53
53
|
/**
|
|
54
54
|
* This component has been deprecated in favor of the new
|
|
55
55
|
* namespaced version. You can still import this component
|
|
56
|
-
*
|
|
56
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
57
59
|
*/
|
|
58
60
|
var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
59
61
|
var _pageBodyProps2;
|
|
@@ -112,5 +112,10 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
112
112
|
* Passed down to the div wrapper of the section contents
|
|
113
113
|
*/
|
|
114
114
|
contentProps: _propTypes.default.any,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Sets which HTML element to render.
|
|
118
|
+
*/
|
|
119
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
115
120
|
panelled: _propTypes.default.bool
|
|
116
121
|
};
|
|
@@ -318,7 +318,12 @@ _EuiPageSection.propTypes = {
|
|
|
318
318
|
/**
|
|
319
319
|
* Passed down to the div wrapper of the section contents
|
|
320
320
|
*/
|
|
321
|
-
contentProps: _propTypes.default.any
|
|
321
|
+
contentProps: _propTypes.default.any,
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Sets which HTML element to render.
|
|
325
|
+
*/
|
|
326
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
322
327
|
};
|
|
323
328
|
|
|
324
329
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
@@ -366,6 +371,7 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
366
371
|
alignment: _propTypes.default.any,
|
|
367
372
|
grow: _propTypes.default.bool,
|
|
368
373
|
contentProps: _propTypes.default.any,
|
|
374
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
369
375
|
panelled: _propTypes.default.bool
|
|
370
376
|
};
|
|
371
377
|
|
|
@@ -21,8 +21,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* Use EuiPageSection instead
|
|
24
|
+
* @deprecated Use EuiPageSection instead
|
|
26
25
|
*/
|
|
27
26
|
export var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
28
27
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -24,8 +24,7 @@ var paddingSizeToClassNameMap = {
|
|
|
24
24
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Use EuiPageSection instead
|
|
27
|
+
* @deprecated Use EuiPageSection instead
|
|
29
28
|
*/
|
|
30
29
|
export var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
31
30
|
var children = _ref.children,
|
|
@@ -14,8 +14,7 @@ import classNames from 'classnames';
|
|
|
14
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* Use EuiPageHeader instead
|
|
17
|
+
* @deprecated Use EuiPageHeader instead
|
|
19
18
|
*/
|
|
20
19
|
export var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
21
20
|
var children = _ref.children,
|
|
@@ -14,8 +14,7 @@ import classNames from 'classnames';
|
|
|
14
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* Use EuiPageHeader instead
|
|
17
|
+
* @deprecated Use EuiPageHeader instead
|
|
19
18
|
*/
|
|
20
19
|
export var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
21
20
|
var children = _ref.children,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
3
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -29,6 +29,8 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
29
29
|
_ref$grow = _ref.grow,
|
|
30
30
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
31
31
|
contentProps = _ref.contentProps,
|
|
32
|
+
_ref$component = _ref.component,
|
|
33
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
32
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
35
|
|
|
34
36
|
// Set max-width as a style prop
|
|
@@ -41,7 +43,7 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
41
43
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
42
44
|
var contentStyles = euiPageSectionContentStyles();
|
|
43
45
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
44
|
-
return ___EmotionJSX(
|
|
46
|
+
return ___EmotionJSX(Component, _extends({
|
|
45
47
|
css: cssStyles
|
|
46
48
|
}, rest), ___EmotionJSX("div", _extends({
|
|
47
49
|
css: cssContentStyles
|
|
@@ -22,8 +22,7 @@ var paddingSizeToClassNameMap = {
|
|
|
22
22
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Use the new EuiPageSidebar instead
|
|
25
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
27
26
|
*/
|
|
28
27
|
export var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
29
28
|
var children = _ref.children,
|
|
@@ -32,7 +32,9 @@ export var TEMPLATES = ['default', 'centeredBody', 'centeredContent', 'empty'];
|
|
|
32
32
|
/**
|
|
33
33
|
* This component has been deprecated in favor of the new
|
|
34
34
|
* namespaced version. You can still import this component
|
|
35
|
-
*
|
|
35
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
36
38
|
*/
|
|
37
39
|
export var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
38
40
|
var _pageBodyProps2;
|
|
@@ -28,8 +28,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
* Use EuiPageSection instead
|
|
31
|
+
* @deprecated Use EuiPageSection instead
|
|
33
32
|
*/
|
|
34
33
|
var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
35
34
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -34,8 +34,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
34
34
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
* Use EuiPageSection instead
|
|
37
|
+
* @deprecated Use EuiPageSection instead
|
|
39
38
|
*/
|
|
40
39
|
var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
41
40
|
var children = _ref.children,
|
|
@@ -20,8 +20,7 @@ var _react2 = require("@emotion/react");
|
|
|
20
20
|
var _excluded = ["children", "className", "responsive"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* Use EuiPageHeader instead
|
|
23
|
+
* @deprecated Use EuiPageHeader instead
|
|
25
24
|
*/
|
|
26
25
|
var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
27
26
|
var children = _ref.children,
|
|
@@ -20,8 +20,7 @@ var _react2 = require("@emotion/react");
|
|
|
20
20
|
var _excluded = ["children", "className"];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
* Use EuiPageHeader instead
|
|
23
|
+
* @deprecated Use EuiPageHeader instead
|
|
25
24
|
*/
|
|
26
25
|
var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
27
26
|
var children = _ref.children,
|
|
@@ -23,7 +23,7 @@ var _global_styling = require("../../../global_styling");
|
|
|
23
23
|
|
|
24
24
|
var _react2 = require("@emotion/react");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
26
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
27
27
|
|
|
28
28
|
var EuiPageSection = function EuiPageSection(_ref) {
|
|
29
29
|
var children = _ref.children,
|
|
@@ -39,6 +39,8 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
39
39
|
_ref$grow = _ref.grow,
|
|
40
40
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
41
41
|
contentProps = _ref.contentProps,
|
|
42
|
+
_ref$component = _ref.component,
|
|
43
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
42
44
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
45
|
// Set max-width as a style prop
|
|
44
46
|
var widthStyles = (0, _restrict_width.setStyleForRestrictedPageWidth)(restrictWidth, contentProps === null || contentProps === void 0 ? void 0 : contentProps.style);
|
|
@@ -50,7 +52,7 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
50
52
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
51
53
|
var contentStyles = (0, _page_section.euiPageSectionContentStyles)();
|
|
52
54
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
53
|
-
return (0, _react2.jsx)(
|
|
55
|
+
return (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
54
56
|
css: cssStyles
|
|
55
57
|
}, rest), (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
56
58
|
css: cssContentStyles
|
|
@@ -30,8 +30,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
30
30
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* Use the new EuiPageSidebar instead
|
|
33
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
35
34
|
*/
|
|
36
35
|
var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
37
36
|
var children = _ref.children,
|
|
@@ -49,7 +49,9 @@ exports.TEMPLATES = TEMPLATES;
|
|
|
49
49
|
/**
|
|
50
50
|
* This component has been deprecated in favor of the new
|
|
51
51
|
* namespaced version. You can still import this component
|
|
52
|
-
*
|
|
52
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
53
55
|
*/
|
|
54
56
|
var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
55
57
|
var _pageBodyProps2;
|
package/package.json
CHANGED
|
@@ -30,8 +30,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* Use EuiPageSection instead
|
|
33
|
+
* @deprecated Use EuiPageSection instead
|
|
35
34
|
*/
|
|
36
35
|
var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
37
36
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -36,8 +36,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
36
36
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
* Use EuiPageSection instead
|
|
39
|
+
* @deprecated Use EuiPageSection instead
|
|
41
40
|
*/
|
|
42
41
|
var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
43
42
|
var children = _ref.children,
|
|
@@ -22,8 +22,7 @@ var _react2 = require("@emotion/react");
|
|
|
22
22
|
var _excluded = ["children", "className", "responsive"];
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Use EuiPageHeader instead
|
|
25
|
+
* @deprecated Use EuiPageHeader instead
|
|
27
26
|
*/
|
|
28
27
|
var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
29
28
|
var children = _ref.children,
|
|
@@ -22,8 +22,7 @@ var _react2 = require("@emotion/react");
|
|
|
22
22
|
var _excluded = ["children", "className"];
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Use EuiPageHeader instead
|
|
25
|
+
* @deprecated Use EuiPageHeader instead
|
|
27
26
|
*/
|
|
28
27
|
var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
29
28
|
var children = _ref.children,
|
|
@@ -25,7 +25,7 @@ var _global_styling = require("../../../global_styling");
|
|
|
25
25
|
|
|
26
26
|
var _react2 = require("@emotion/react");
|
|
27
27
|
|
|
28
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
28
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
29
29
|
|
|
30
30
|
var EuiPageSection = function EuiPageSection(_ref) {
|
|
31
31
|
var children = _ref.children,
|
|
@@ -41,6 +41,8 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
41
41
|
_ref$grow = _ref.grow,
|
|
42
42
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
43
43
|
contentProps = _ref.contentProps,
|
|
44
|
+
_ref$component = _ref.component,
|
|
45
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
44
46
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
45
47
|
// Set max-width as a style prop
|
|
46
48
|
var widthStyles = (0, _restrict_width.setStyleForRestrictedPageWidth)(restrictWidth, contentProps === null || contentProps === void 0 ? void 0 : contentProps.style);
|
|
@@ -52,7 +54,7 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
52
54
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
53
55
|
var contentStyles = (0, _page_section.euiPageSectionContentStyles)();
|
|
54
56
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
55
|
-
return (0, _react2.jsx)(
|
|
57
|
+
return (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
56
58
|
css: cssStyles
|
|
57
59
|
}, rest), (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
58
60
|
css: cssContentStyles
|
|
@@ -106,5 +108,10 @@ EuiPageSection.propTypes = {
|
|
|
106
108
|
/**
|
|
107
109
|
* Passed down to the div wrapper of the section contents
|
|
108
110
|
*/
|
|
109
|
-
contentProps: _propTypes.default.any
|
|
111
|
+
contentProps: _propTypes.default.any,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Sets which HTML element to render.
|
|
115
|
+
*/
|
|
116
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
110
117
|
};
|
|
@@ -32,8 +32,7 @@ var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
|
32
32
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
* Use the new EuiPageSidebar instead
|
|
35
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
37
36
|
*/
|
|
38
37
|
var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
39
38
|
var children = _ref.children,
|
|
@@ -51,7 +51,9 @@ exports.TEMPLATES = TEMPLATES;
|
|
|
51
51
|
/**
|
|
52
52
|
* This component has been deprecated in favor of the new
|
|
53
53
|
* namespaced version. You can still import this component
|
|
54
|
-
*
|
|
54
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
55
|
+
*
|
|
56
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
55
57
|
*/
|
|
56
58
|
var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
57
59
|
var _pageBodyProps2;
|
|
@@ -110,5 +110,10 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
110
110
|
* Passed down to the div wrapper of the section contents
|
|
111
111
|
*/
|
|
112
112
|
contentProps: _propTypes.default.any,
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Sets which HTML element to render.
|
|
116
|
+
*/
|
|
117
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
113
118
|
panelled: _propTypes.default.bool
|
|
114
119
|
};
|
|
@@ -306,7 +306,12 @@ _EuiPageSection.propTypes = {
|
|
|
306
306
|
/**
|
|
307
307
|
* Passed down to the div wrapper of the section contents
|
|
308
308
|
*/
|
|
309
|
-
contentProps: _propTypes.default.any
|
|
309
|
+
contentProps: _propTypes.default.any,
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Sets which HTML element to render.
|
|
313
|
+
*/
|
|
314
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
310
315
|
};
|
|
311
316
|
|
|
312
317
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
@@ -354,6 +359,7 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
354
359
|
alignment: _propTypes.default.any,
|
|
355
360
|
grow: _propTypes.default.bool,
|
|
356
361
|
contentProps: _propTypes.default.any,
|
|
362
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
357
363
|
panelled: _propTypes.default.bool
|
|
358
364
|
};
|
|
359
365
|
|