@elastic/eui 63.0.3 → 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/dist/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/description_list/description_list_title.js +1 -1
- package/es/components/header/header.js +2 -2
- 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_sidebar/page_sidebar.js +8 -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 +10 -2
- package/eui.d.ts +14 -13
- package/lib/components/description_list/description_list_title.js +1 -1
- package/lib/components/header/header.js +2 -2
- 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_sidebar/page_sidebar.js +8 -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 +10 -2
- package/optimize/es/components/description_list/description_list_title.js +1 -1
- package/optimize/es/components/header/header.js +2 -2
- 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_sidebar/page_sidebar.js +8 -2
- package/optimize/es/components/page/page_template.js +3 -1
- package/optimize/es/components/page_template/page_template.js +3 -1
- package/optimize/lib/components/description_list/description_list_title.js +1 -1
- package/optimize/lib/components/header/header.js +2 -2
- 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_sidebar/page_sidebar.js +8 -2
- package/optimize/lib/components/page/page_template.js +3 -1
- package/optimize/lib/components/page_template/page_template.js +3 -1
- package/package.json +1 -1
- package/test-env/components/description_list/description_list_title.js +1 -1
- package/test-env/components/header/header.js +2 -2
- 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_sidebar/page_sidebar.js +8 -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 +10 -2
|
@@ -46,7 +46,7 @@ export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
46
46
|
|
|
47
47
|
var theme = useEuiTheme();
|
|
48
48
|
var styles = euiDescriptionListTitleStyles(theme);
|
|
49
|
-
var conditionalStyles = compressed && textStyle
|
|
49
|
+
var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
50
50
|
|
|
51
51
|
switch (type) {
|
|
52
52
|
case 'inline':
|
|
@@ -47,13 +47,13 @@ export var EuiHeader = function EuiHeader(_ref) {
|
|
|
47
47
|
// Increment fixed header counter for each fixed header
|
|
48
48
|
euiHeaderFixedCounter++;
|
|
49
49
|
document.body.classList.add('euiBody--headerIsFixed');
|
|
50
|
-
document.body.
|
|
50
|
+
document.body.dataset.fixedHeaders = String(euiHeaderFixedCounter);
|
|
51
51
|
return function () {
|
|
52
52
|
// Both decrement the fixed counter AND then check if there are none
|
|
53
53
|
if (--euiHeaderFixedCounter === 0) {
|
|
54
54
|
// If there are none, THEN remove class
|
|
55
55
|
document.body.classList.remove('euiBody--headerIsFixed');
|
|
56
|
-
document.body.
|
|
56
|
+
delete document.body.dataset.fixedHeaders;
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -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,
|
|
@@ -64,11 +64,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
|
64
64
|
setInlineStyles = _useState2[1];
|
|
65
65
|
|
|
66
66
|
useEffect(function () {
|
|
67
|
+
var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
|
|
68
|
+
|
|
67
69
|
if (sticky) {
|
|
68
|
-
var
|
|
70
|
+
var _document$body$datase;
|
|
71
|
+
|
|
72
|
+
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
69
73
|
var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
70
|
-
|
|
74
|
+
updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
|
|
71
75
|
}
|
|
76
|
+
|
|
77
|
+
setInlineStyles(updatedStyles);
|
|
72
78
|
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
73
79
|
return ___EmotionJSX("div", _extends({
|
|
74
80
|
className: className,
|
|
@@ -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
|
};
|
|
@@ -89,7 +89,9 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
89
89
|
});
|
|
90
90
|
useEffect(function () {
|
|
91
91
|
if (_offset === undefined) {
|
|
92
|
-
var
|
|
92
|
+
var _document$body$datase;
|
|
93
|
+
|
|
94
|
+
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
93
95
|
setOffset(euiTheme.base * 3 * euiHeaderFixedCounter);
|
|
94
96
|
}
|
|
95
97
|
}, [_offset, euiTheme.base]); // Sections include page header
|
|
@@ -294,7 +296,12 @@ _EuiPageSection.propTypes = {
|
|
|
294
296
|
/**
|
|
295
297
|
* Passed down to the div wrapper of the section contents
|
|
296
298
|
*/
|
|
297
|
-
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])
|
|
298
305
|
};
|
|
299
306
|
|
|
300
307
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
@@ -342,6 +349,7 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
342
349
|
alignment: PropTypes.any,
|
|
343
350
|
grow: PropTypes.bool,
|
|
344
351
|
contentProps: PropTypes.any,
|
|
352
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired]),
|
|
345
353
|
panelled: PropTypes.bool
|
|
346
354
|
};
|
|
347
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
|
|
|
@@ -60,7 +60,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
60
60
|
|
|
61
61
|
var theme = (0, _services.useEuiTheme)();
|
|
62
62
|
var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
|
|
63
|
-
var conditionalStyles = compressed && textStyle
|
|
63
|
+
var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
64
64
|
|
|
65
65
|
switch (type) {
|
|
66
66
|
case 'inline':
|
|
@@ -61,13 +61,13 @@ var EuiHeader = function EuiHeader(_ref) {
|
|
|
61
61
|
// Increment fixed header counter for each fixed header
|
|
62
62
|
euiHeaderFixedCounter++;
|
|
63
63
|
document.body.classList.add('euiBody--headerIsFixed');
|
|
64
|
-
document.body.
|
|
64
|
+
document.body.dataset.fixedHeaders = String(euiHeaderFixedCounter);
|
|
65
65
|
return function () {
|
|
66
66
|
// Both decrement the fixed counter AND then check if there are none
|
|
67
67
|
if (--euiHeaderFixedCounter === 0) {
|
|
68
68
|
// If there are none, THEN remove class
|
|
69
69
|
document.body.classList.remove('euiBody--headerIsFixed');
|
|
70
|
-
document.body.
|
|
70
|
+
delete document.body.dataset.fixedHeaders;
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}
|
|
@@ -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,
|
|
@@ -76,11 +76,17 @@ var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
|
76
76
|
setInlineStyles = _useState2[1];
|
|
77
77
|
|
|
78
78
|
(0, _react.useEffect)(function () {
|
|
79
|
+
var updatedStyles = _objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth));
|
|
80
|
+
|
|
79
81
|
if (sticky) {
|
|
80
|
-
var
|
|
82
|
+
var _document$body$datase;
|
|
83
|
+
|
|
84
|
+
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
81
85
|
var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
82
|
-
|
|
86
|
+
updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)")));
|
|
83
87
|
}
|
|
88
|
+
|
|
89
|
+
setInlineStyles(updatedStyles);
|
|
84
90
|
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
85
91
|
return (0, _react2.jsx)("div", _extends({
|
|
86
92
|
className: className,
|
|
@@ -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
|
};
|
|
@@ -109,7 +109,9 @@ var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
109
109
|
});
|
|
110
110
|
(0, _react.useEffect)(function () {
|
|
111
111
|
if (_offset === undefined) {
|
|
112
|
-
var
|
|
112
|
+
var _document$body$datase;
|
|
113
|
+
|
|
114
|
+
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
113
115
|
setOffset(euiTheme.base * 3 * euiHeaderFixedCounter);
|
|
114
116
|
}
|
|
115
117
|
}, [_offset, euiTheme.base]); // Sections include page header
|
|
@@ -316,7 +318,12 @@ _EuiPageSection.propTypes = {
|
|
|
316
318
|
/**
|
|
317
319
|
* Passed down to the div wrapper of the section contents
|
|
318
320
|
*/
|
|
319
|
-
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])
|
|
320
327
|
};
|
|
321
328
|
|
|
322
329
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
@@ -364,6 +371,7 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
364
371
|
alignment: _propTypes.default.any,
|
|
365
372
|
grow: _propTypes.default.bool,
|
|
366
373
|
contentProps: _propTypes.default.any,
|
|
374
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
367
375
|
panelled: _propTypes.default.bool
|
|
368
376
|
};
|
|
369
377
|
|
|
@@ -30,7 +30,7 @@ export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
30
30
|
|
|
31
31
|
var theme = useEuiTheme();
|
|
32
32
|
var styles = euiDescriptionListTitleStyles(theme);
|
|
33
|
-
var conditionalStyles = compressed && textStyle
|
|
33
|
+
var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
34
34
|
|
|
35
35
|
switch (type) {
|
|
36
36
|
case 'inline':
|
|
@@ -42,13 +42,13 @@ export var EuiHeader = function EuiHeader(_ref) {
|
|
|
42
42
|
// Increment fixed header counter for each fixed header
|
|
43
43
|
euiHeaderFixedCounter++;
|
|
44
44
|
document.body.classList.add('euiBody--headerIsFixed');
|
|
45
|
-
document.body.
|
|
45
|
+
document.body.dataset.fixedHeaders = String(euiHeaderFixedCounter);
|
|
46
46
|
return function () {
|
|
47
47
|
// Both decrement the fixed counter AND then check if there are none
|
|
48
48
|
if (--euiHeaderFixedCounter === 0) {
|
|
49
49
|
// If there are none, THEN remove class
|
|
50
50
|
document.body.classList.remove('euiBody--headerIsFixed');
|
|
51
|
-
document.body.
|
|
51
|
+
delete document.body.dataset.fixedHeaders;
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
}
|
|
@@ -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,
|
|
@@ -46,11 +46,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
|
46
46
|
setInlineStyles = _useState2[1];
|
|
47
47
|
|
|
48
48
|
useEffect(function () {
|
|
49
|
+
var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
|
|
50
|
+
|
|
49
51
|
if (sticky) {
|
|
50
|
-
var
|
|
52
|
+
var _document$body$datase;
|
|
53
|
+
|
|
54
|
+
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
51
55
|
var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
52
|
-
|
|
56
|
+
updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
|
|
53
57
|
}
|
|
58
|
+
|
|
59
|
+
setInlineStyles(updatedStyles);
|
|
54
60
|
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
55
61
|
return ___EmotionJSX("div", _extends({
|
|
56
62
|
className: className,
|
|
@@ -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;
|
|
@@ -72,7 +72,9 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
72
72
|
});
|
|
73
73
|
useEffect(function () {
|
|
74
74
|
if (_offset === undefined) {
|
|
75
|
-
var
|
|
75
|
+
var _document$body$datase;
|
|
76
|
+
|
|
77
|
+
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
76
78
|
setOffset(euiTheme.base * 3 * euiHeaderFixedCounter);
|
|
77
79
|
}
|
|
78
80
|
}, [_offset, euiTheme.base]); // Sections include page header
|