@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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { setStyleForRestrictedPageWidth } from '../_restrict_width';
|
|
14
|
+
import { useEuiTheme } from '../../../services';
|
|
15
|
+
import { euiPageSectionContentStyles, euiPageSectionStyles } from './page_section.styles';
|
|
16
|
+
import { useEuiPaddingCSS, useEuiBackgroundColorCSS } from '../../../global_styling';
|
|
17
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
+
export var EuiPageSection = function EuiPageSection(_ref) {
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
_ref$alignment = _ref.alignment,
|
|
21
|
+
alignment = _ref$alignment === void 0 ? 'top' : _ref$alignment,
|
|
22
|
+
_ref$restrictWidth = _ref.restrictWidth,
|
|
23
|
+
restrictWidth = _ref$restrictWidth === void 0 ? false : _ref$restrictWidth,
|
|
24
|
+
bottomBorder = _ref.bottomBorder,
|
|
25
|
+
_ref$paddingSize = _ref.paddingSize,
|
|
26
|
+
paddingSize = _ref$paddingSize === void 0 ? 'l' : _ref$paddingSize,
|
|
27
|
+
_ref$color = _ref.color,
|
|
28
|
+
color = _ref$color === void 0 ? 'transparent' : _ref$color,
|
|
29
|
+
_ref$grow = _ref.grow,
|
|
30
|
+
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
31
|
+
contentProps = _ref.contentProps,
|
|
32
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
|
+
|
|
34
|
+
// Set max-width as a style prop
|
|
35
|
+
var widthStyles = setStyleForRestrictedPageWidth(restrictWidth, contentProps === null || contentProps === void 0 ? void 0 : contentProps.style);
|
|
36
|
+
var useTheme = useEuiTheme();
|
|
37
|
+
var styles = euiPageSectionStyles(useTheme);
|
|
38
|
+
var inlinePadding = useEuiPaddingCSS('horizontal');
|
|
39
|
+
var blockPadding = useEuiPaddingCSS('vertical');
|
|
40
|
+
var colors = useEuiBackgroundColorCSS();
|
|
41
|
+
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
42
|
+
var contentStyles = euiPageSectionContentStyles();
|
|
43
|
+
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
44
|
+
return ___EmotionJSX("div", _extends({
|
|
45
|
+
css: cssStyles
|
|
46
|
+
}, rest), ___EmotionJSX("div", _extends({
|
|
47
|
+
css: cssContentStyles
|
|
48
|
+
}, contentProps, {
|
|
49
|
+
style: widthStyles
|
|
50
|
+
}), children));
|
|
51
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { logicalCSS } from '../../../global_styling';
|
|
12
|
+
export var ALIGNMENTS = ['top', 'center', 'horizontalCenter'];
|
|
13
|
+
|
|
14
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
+
name: "122lw0e-grow",
|
|
16
|
+
styles: "flex-grow:1;label:grow;"
|
|
17
|
+
} : {
|
|
18
|
+
name: "122lw0e-grow",
|
|
19
|
+
styles: "flex-grow:1;label:grow;",
|
|
20
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export var euiPageSectionStyles = function euiPageSectionStyles(_ref2) {
|
|
24
|
+
var euiTheme = _ref2.euiTheme;
|
|
25
|
+
return {
|
|
26
|
+
euiPageSection: /*#__PURE__*/css(logicalCSS('width', '100%'), ";", logicalCSS('min-width', '0'), ";display:flex;flex-direction:column;;label:euiPageSection;"),
|
|
27
|
+
grow: _ref,
|
|
28
|
+
border: /*#__PURE__*/css(logicalCSS('border-bottom', euiTheme.border.thin), ";;label:border;"),
|
|
29
|
+
// Alignments
|
|
30
|
+
top: /*#__PURE__*/css(";label:top;"),
|
|
31
|
+
center: /*#__PURE__*/css(logicalCSS('width', 'auto'), ";align-items:center;justify-content:center;;label:center;"),
|
|
32
|
+
horizontalCenter: /*#__PURE__*/css(logicalCSS('width', 'auto'), ";align-items:center;;label:horizontalCenter;")
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export var euiPageSectionContentStyles = function euiPageSectionContentStyles() {
|
|
36
|
+
return {
|
|
37
|
+
euiPageSection__content: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:euiPageSection__content;"),
|
|
38
|
+
// Alignments
|
|
39
|
+
center: /*#__PURE__*/css(logicalCSS('width', 'auto'), ";", logicalCSS('margin-horizontal', 'auto'), ";;label:center;"),
|
|
40
|
+
// Max widths
|
|
41
|
+
restrictWidth: /*#__PURE__*/css(logicalCSS('margin-horizontal', 'auto'), ";;label:restrictWidth;")
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -20,7 +20,12 @@ var paddingSizeToClassNameMap = {
|
|
|
20
20
|
l: 'euiPageSideBar--paddingLarge'
|
|
21
21
|
};
|
|
22
22
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* **DEPRECATED**
|
|
26
|
+
* Use the new EuiPageSidebar instead
|
|
27
|
+
*/
|
|
28
|
+
export var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
24
29
|
var children = _ref.children,
|
|
25
30
|
className = _ref.className,
|
|
26
31
|
sticky = _ref.sticky,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export { EuiPageSidebar } from './page_sidebar';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
|
+
var _excluded = ["children", "className", "sticky", "paddingSize", "minWidth", "responsive", "style"];
|
|
7
|
+
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
|
|
10
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
import React, { useEffect, useState } from 'react';
|
|
20
|
+
import { logicalStyle, useEuiPaddingCSS } from '../../../global_styling';
|
|
21
|
+
import { useEuiTheme, useIsWithinBreakpoints } from '../../../services';
|
|
22
|
+
import { euiPageSidebarStyles } from './page_sidebar.styles';
|
|
23
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
|
+
export var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
25
|
+
var children = _ref.children,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
_ref$sticky = _ref.sticky,
|
|
28
|
+
sticky = _ref$sticky === void 0 ? false : _ref$sticky,
|
|
29
|
+
_ref$paddingSize = _ref.paddingSize,
|
|
30
|
+
paddingSize = _ref$paddingSize === void 0 ? 'none' : _ref$paddingSize,
|
|
31
|
+
_ref$minWidth = _ref.minWidth,
|
|
32
|
+
minWidth = _ref$minWidth === void 0 ? 248 : _ref$minWidth,
|
|
33
|
+
_ref$responsive = _ref.responsive,
|
|
34
|
+
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
35
|
+
style = _ref.style,
|
|
36
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
+
|
|
38
|
+
var themeContext = useEuiTheme();
|
|
39
|
+
var styles = euiPageSidebarStyles(themeContext);
|
|
40
|
+
var isResponding = useIsWithinBreakpoints(responsive);
|
|
41
|
+
var cssStyles = [styles.euiPageSidebar, !isResponding && sticky && styles.sticky, useEuiPaddingCSS()[paddingSize]]; // Inline styles for setting up width and sticky offsets
|
|
42
|
+
|
|
43
|
+
var _useState = useState(_objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth))),
|
|
44
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
45
|
+
inlineStyles = _useState2[0],
|
|
46
|
+
setInlineStyles = _useState2[1];
|
|
47
|
+
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
if (sticky) {
|
|
50
|
+
var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
|
|
51
|
+
var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
52
|
+
setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth)), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)"))));
|
|
53
|
+
}
|
|
54
|
+
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
55
|
+
return ___EmotionJSX("div", _extends({
|
|
56
|
+
className: className,
|
|
57
|
+
css: cssStyles,
|
|
58
|
+
style: inlineStyles
|
|
59
|
+
}, rest), children);
|
|
60
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { euiYScroll } from '../../../global_styling';
|
|
12
|
+
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "wtyx0k-euiPageSidebar",
|
|
15
|
+
styles: "flex:0 1 0%;label:euiPageSidebar;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "wtyx0k-euiPageSidebar",
|
|
18
|
+
styles: "flex:0 1 0%;label:euiPageSidebar;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export var euiPageSidebarStyles = function euiPageSidebarStyles(euiThemeContext) {
|
|
23
|
+
return {
|
|
24
|
+
euiPageSidebar: _ref,
|
|
25
|
+
sticky: /*#__PURE__*/css(euiYScroll(euiThemeContext, {
|
|
26
|
+
height: 'auto'
|
|
27
|
+
}), ";flex-grow:1;position:sticky;;label:sticky;")
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -16,17 +16,25 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
16
16
|
*/
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
+
import { css } from '@emotion/react';
|
|
19
20
|
import { EuiPage } from './page';
|
|
20
|
-
import { EuiPageSideBar } from './page_side_bar';
|
|
21
|
+
import { EuiPageSideBar_Deprecated as EuiPageSideBar } from './page_side_bar';
|
|
21
22
|
import { EuiPageBody } from './page_body';
|
|
22
23
|
import { EuiPageHeader } from './page_header';
|
|
23
|
-
import { EuiPageContent, EuiPageContentBody } from './page_content';
|
|
24
|
+
import { EuiPageContent_Deprecated as EuiPageContent, EuiPageContentBody_Deprecated as EuiPageContentBody } from './page_content';
|
|
24
25
|
import { EuiBottomBar } from '../bottom_bar';
|
|
25
26
|
import { useIsWithinBreakpoints } from '../../services';
|
|
26
27
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
28
|
+
import { useEuiPaddingSize } from '../../global_styling';
|
|
27
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
30
|
export var TEMPLATES = ['default', 'centeredBody', 'centeredContent', 'empty'];
|
|
29
|
-
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* This component has been deprecated in favor of the new
|
|
34
|
+
* namespaced version. You can still import this component
|
|
35
|
+
* for a period of time by importing `as EuiPageTemplate`.
|
|
36
|
+
*/
|
|
37
|
+
export var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
30
38
|
var _pageBodyProps2;
|
|
31
39
|
|
|
32
40
|
var _ref$template = _ref.template,
|
|
@@ -52,9 +60,12 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
52
60
|
minHeight = _ref$minHeight === void 0 ? 460 : _ref$minHeight,
|
|
53
61
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
54
62
|
|
|
63
|
+
// BWC page header margin to match padding
|
|
64
|
+
var headerMargin = /*#__PURE__*/css("margin-bottom: ".concat(useEuiPaddingSize(paddingSize)), ";label:headerMargin;");
|
|
55
65
|
/**
|
|
56
66
|
* Full height ~madness~ logic
|
|
57
67
|
*/
|
|
68
|
+
|
|
58
69
|
var canFullHeight = useIsWithinBreakpoints(['m', 'l', 'xl']) && (template === 'default' || template === 'empty');
|
|
59
70
|
var fullHeightClass = {
|
|
60
71
|
'eui-fullHeight': fullHeight && canFullHeight
|
|
@@ -118,7 +129,8 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
118
129
|
}, pageSideBarProps), pageSideBar), ___EmotionJSX(EuiPageBody, _extends({
|
|
119
130
|
paddingSize: paddingSize
|
|
120
131
|
}, pageBodyProps), pageHeader && ___EmotionJSX(EuiPageHeader, _extends({
|
|
121
|
-
restrictWidth: restrictWidth
|
|
132
|
+
restrictWidth: restrictWidth,
|
|
133
|
+
css: headerMargin
|
|
122
134
|
}, pageHeader)), ___EmotionJSX(EuiPageContent, _extends({
|
|
123
135
|
verticalPosition: "center",
|
|
124
136
|
horizontalPosition: "center",
|
|
@@ -136,6 +148,7 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
136
148
|
}, pageBodyProps), pageHeader && ___EmotionJSX(EuiPageHeader, _extends({
|
|
137
149
|
paddingSize: "none",
|
|
138
150
|
restrictWidth: false,
|
|
151
|
+
css: headerMargin,
|
|
139
152
|
bottomBorder: true
|
|
140
153
|
}, pageHeader)), ___EmotionJSX(EuiPageBody, null, ___EmotionJSX(EuiPageContent, _extends({
|
|
141
154
|
verticalPosition: "center",
|
|
@@ -165,7 +178,8 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
165
178
|
panelled: true,
|
|
166
179
|
paddingSize: paddingSize
|
|
167
180
|
}, pageBodyProps), pageHeader && ___EmotionJSX(EuiPageHeader, _extends({
|
|
168
|
-
restrictWidth: restrictWidth
|
|
181
|
+
restrictWidth: restrictWidth,
|
|
182
|
+
css: headerMargin
|
|
169
183
|
}, pageHeader)), ___EmotionJSX(EuiPageContent, _extends({
|
|
170
184
|
verticalPosition: "center",
|
|
171
185
|
horizontalPosition: "center",
|
|
@@ -182,7 +196,8 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
182
196
|
style: pageStyle
|
|
183
197
|
}), ___EmotionJSX(EuiPageBody, pageBodyProps, pageHeader && ___EmotionJSX(EuiPageHeader, _extends({
|
|
184
198
|
paddingSize: paddingSize,
|
|
185
|
-
restrictWidth: restrictWidth
|
|
199
|
+
restrictWidth: restrictWidth,
|
|
200
|
+
bottomBorder: "extended"
|
|
186
201
|
}, pageHeader)), ___EmotionJSX(EuiPageContent, {
|
|
187
202
|
role: null,
|
|
188
203
|
borderRadius: "none",
|
|
@@ -219,7 +234,9 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
219
234
|
}, pageSideBarProps), pageSideBar), ___EmotionJSX(EuiPageBody, _extends({
|
|
220
235
|
paddingSize: paddingSize
|
|
221
236
|
}, pageBodyProps), pageHeader && ___EmotionJSX(EuiPageHeader, _extends({
|
|
222
|
-
restrictWidth: restrictWidth
|
|
237
|
+
restrictWidth: restrictWidth,
|
|
238
|
+
bottomBorder: true,
|
|
239
|
+
css: headerMargin
|
|
223
240
|
}, pageHeader)), ___EmotionJSX(EuiPageContent, _extends({
|
|
224
241
|
hasBorder: false,
|
|
225
242
|
hasShadow: false,
|
|
@@ -239,6 +256,7 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
239
256
|
}, pageBodyProps), pageHeader && ___EmotionJSX(EuiPageHeader, _extends({
|
|
240
257
|
paddingSize: "none",
|
|
241
258
|
restrictWidth: false,
|
|
259
|
+
css: headerMargin,
|
|
242
260
|
bottomBorder: true
|
|
243
261
|
}, pageHeader)), ___EmotionJSX(EuiPageContent, _extends({
|
|
244
262
|
hasBorder: false,
|
|
@@ -283,7 +301,8 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
283
301
|
className: (_pageBodyProps2 = pageBodyProps) === null || _pageBodyProps2 === void 0 ? void 0 : _pageBodyProps2.className
|
|
284
302
|
}, pageHeader && ___EmotionJSX(EuiPageHeader, _extends({
|
|
285
303
|
bottomBorder: true,
|
|
286
|
-
restrictWidth: restrictWidth
|
|
304
|
+
restrictWidth: restrictWidth,
|
|
305
|
+
css: headerMargin
|
|
287
306
|
}, pageHeader)), ___EmotionJSX(EuiPageContent, _extends({
|
|
288
307
|
hasShadow: false,
|
|
289
308
|
hasBorder: false,
|
|
@@ -300,7 +319,8 @@ export var EuiPageTemplate = function EuiPageTemplate(_ref) {
|
|
|
300
319
|
style: pageStyle
|
|
301
320
|
}), ___EmotionJSX(EuiPageBody, pageBodyProps, pageHeader && ___EmotionJSX(EuiPageHeader, _extends({
|
|
302
321
|
restrictWidth: restrictWidth,
|
|
303
|
-
paddingSize: paddingSize
|
|
322
|
+
paddingSize: paddingSize,
|
|
323
|
+
bottomBorder: "extended"
|
|
304
324
|
}, pageHeader)), ___EmotionJSX(EuiPageContent, _extends({
|
|
305
325
|
hasBorder: pageHeader === undefined ? false : undefined,
|
|
306
326
|
hasShadow: false,
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["children", "paddingSize", "restrictWidth", "parent"];
|
|
5
|
+
|
|
6
|
+
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)."; }
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
10
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
11
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
12
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
13
|
+
* Side Public License, v 1.
|
|
14
|
+
*/
|
|
15
|
+
import { css } from '@emotion/react';
|
|
16
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
17
|
+
import { createPortal } from 'react-dom';
|
|
18
|
+
import { findElementBySelectorOrRef } from '../../../services';
|
|
19
|
+
import { EuiBottomBar } from '../../bottom_bar';
|
|
20
|
+
import { EuiPageSection } from '../../page/page_section';
|
|
21
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
|
+
|
|
23
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
24
|
+
name: "1y6dyt1-bar",
|
|
25
|
+
styles: "overflow:hidden;flex-shrink:0;label:bar;"
|
|
26
|
+
} : {
|
|
27
|
+
name: "1y6dyt1-bar",
|
|
28
|
+
styles: "overflow:hidden;flex-shrink:0;label:bar;",
|
|
29
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export var _EuiPageBottomBar = function _EuiPageBottomBar(_ref2) {
|
|
33
|
+
var children = _ref2.children,
|
|
34
|
+
paddingSize = _ref2.paddingSize,
|
|
35
|
+
restrictWidth = _ref2.restrictWidth,
|
|
36
|
+
parent = _ref2.parent,
|
|
37
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
38
|
+
|
|
39
|
+
// In order for the bottom bar to be placed at the end of the content,
|
|
40
|
+
// it must know what parent element to insert into
|
|
41
|
+
var _useState = useState(false),
|
|
42
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
+
hasValidAnchor = _useState2[0],
|
|
44
|
+
setHasValidAnchor = _useState2[1];
|
|
45
|
+
|
|
46
|
+
var animationFrameId = useRef();
|
|
47
|
+
var parentNode = useRef(null);
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
animationFrameId.current = window.requestAnimationFrame(function () {
|
|
50
|
+
parentNode.current = findElementBySelectorOrRef(parent);
|
|
51
|
+
setHasValidAnchor(parentNode.current ? true : false);
|
|
52
|
+
});
|
|
53
|
+
return function () {
|
|
54
|
+
animationFrameId.current && window.cancelAnimationFrame(animationFrameId.current);
|
|
55
|
+
};
|
|
56
|
+
}, [parent]);
|
|
57
|
+
|
|
58
|
+
var bar = ___EmotionJSX(EuiBottomBar, _extends({
|
|
59
|
+
paddingSize: 'none',
|
|
60
|
+
position: "sticky" // Hide the overflow in case of larger flex margins than padding
|
|
61
|
+
,
|
|
62
|
+
css: _ref // Using unknown here because of the possible conflict with overriding props and position `sticky`
|
|
63
|
+
|
|
64
|
+
}, rest), ___EmotionJSX(EuiPageSection, {
|
|
65
|
+
paddingSize: paddingSize,
|
|
66
|
+
restrictWidth: restrictWidth
|
|
67
|
+
}, children));
|
|
68
|
+
|
|
69
|
+
return hasValidAnchor && parentNode.current ? /*#__PURE__*/createPortal(bar, parentNode.current) : bar;
|
|
70
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "alignment", "restrictWidth", "paddingSize", "grow", "panelled", "color"];
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { EuiEmptyPrompt } from '../../empty_prompt';
|
|
14
|
+
import { EuiPageSection } from '../../page/page_section';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
export var _EuiPageEmptyPrompt = function _EuiPageEmptyPrompt(_ref) {
|
|
17
|
+
var children = _ref.children,
|
|
18
|
+
_ref$alignment = _ref.alignment,
|
|
19
|
+
alignment = _ref$alignment === void 0 ? 'center' : _ref$alignment,
|
|
20
|
+
_ref$restrictWidth = _ref.restrictWidth,
|
|
21
|
+
restrictWidth = _ref$restrictWidth === void 0 ? false : _ref$restrictWidth,
|
|
22
|
+
_ref$paddingSize = _ref.paddingSize,
|
|
23
|
+
paddingSize = _ref$paddingSize === void 0 ? 'l' : _ref$paddingSize,
|
|
24
|
+
_ref$grow = _ref.grow,
|
|
25
|
+
grow = _ref$grow === void 0 ? true : _ref$grow,
|
|
26
|
+
panelled = _ref.panelled,
|
|
27
|
+
color = _ref.color,
|
|
28
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* If panelled = true, then either the section or empty prompt must be plain;
|
|
32
|
+
* If color is anything but plain, then it must be the section that is plain;
|
|
33
|
+
* If panelled = true, but color is undefined, then default to the empty prompt being plain;
|
|
34
|
+
*/
|
|
35
|
+
var sectionColor;
|
|
36
|
+
var emptyPromptColor;
|
|
37
|
+
|
|
38
|
+
if (panelled && color === undefined) {
|
|
39
|
+
sectionColor = 'plain';
|
|
40
|
+
emptyPromptColor = 'subdued';
|
|
41
|
+
} else if (panelled && color !== 'plain') {
|
|
42
|
+
sectionColor = 'plain';
|
|
43
|
+
emptyPromptColor = color;
|
|
44
|
+
} else {
|
|
45
|
+
sectionColor = 'transparent';
|
|
46
|
+
emptyPromptColor = color || 'plain';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return ___EmotionJSX(EuiPageSection, {
|
|
50
|
+
paddingSize: paddingSize,
|
|
51
|
+
color: sectionColor,
|
|
52
|
+
grow: grow,
|
|
53
|
+
restrictWidth: restrictWidth,
|
|
54
|
+
alignment: alignment
|
|
55
|
+
}, ___EmotionJSX(EuiEmptyPrompt // @ts-expect-error Hasn't been updated to use all the new values yet
|
|
56
|
+
, _extends({
|
|
57
|
+
paddingSize: paddingSize,
|
|
58
|
+
color: emptyPromptColor,
|
|
59
|
+
body: children
|
|
60
|
+
}, rest)));
|
|
61
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export { EuiPageTemplate } from './page_template';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export { _EuiPageInner } from './page_inner';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "component", "panelled", "border", "paddingSize", "responsive"];
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { useEuiPaddingCSS } from '../../../global_styling';
|
|
14
|
+
import { useEuiTheme, useIsWithinBreakpoints } from '../../../services';
|
|
15
|
+
import { euiPageInnerStyles } from './page_inner.styles';
|
|
16
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
|
+
export var _EuiPageInner = function _EuiPageInner(_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
_ref$component = _ref.component,
|
|
20
|
+
Component = _ref$component === void 0 ? 'main' : _ref$component,
|
|
21
|
+
panelled = _ref.panelled,
|
|
22
|
+
border = _ref.border,
|
|
23
|
+
_ref$paddingSize = _ref.paddingSize,
|
|
24
|
+
paddingSize = _ref$paddingSize === void 0 ? 'none' : _ref$paddingSize,
|
|
25
|
+
_ref$responsive = _ref.responsive,
|
|
26
|
+
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
+
|
|
29
|
+
var themeContext = useEuiTheme();
|
|
30
|
+
var isResponding = useIsWithinBreakpoints(responsive);
|
|
31
|
+
var styles = euiPageInnerStyles(themeContext);
|
|
32
|
+
var paddingStyles = useEuiPaddingCSS()[paddingSize];
|
|
33
|
+
var borderSide;
|
|
34
|
+
|
|
35
|
+
if (border && isResponding) {
|
|
36
|
+
borderSide = 'top';
|
|
37
|
+
} else if (border) {
|
|
38
|
+
borderSide = 'left';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
var cssStyles = [styles.euiPageInner, paddingStyles, panelled && styles.panelled, borderSide && styles.border[borderSide]];
|
|
42
|
+
return (// @ts-expect-error Generic element type mismatch
|
|
43
|
+
___EmotionJSX(Component, _extends({
|
|
44
|
+
css: cssStyles
|
|
45
|
+
}, rest), children)
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { euiShadow } from '../../../themes/amsterdam/global_styling/mixins';
|
|
10
|
+
import { euiBackgroundColor, logicalCSS } from '../../../global_styling';
|
|
11
|
+
import { transparentize } from '../../../services';
|
|
12
|
+
export var euiPageInnerStyles = function euiPageInnerStyles(euiThemeContext) {
|
|
13
|
+
var borderColor = transparentize(euiThemeContext.euiTheme.colors.lightShade, 0.7);
|
|
14
|
+
return {
|
|
15
|
+
euiPageInner: /*#__PURE__*/css("display:flex;flex-direction:column;align-items:stretch;flex:1 1 100%;", logicalCSS('max-width', '100%'), " ", logicalCSS('min-width', '0'), ";;label:euiPageInner;"),
|
|
16
|
+
panelled: /*#__PURE__*/css("background:", euiBackgroundColor(euiThemeContext, 'plain'), ";", euiShadow(euiThemeContext, 'm'), ";;label:panelled;"),
|
|
17
|
+
border: {
|
|
18
|
+
top: /*#__PURE__*/css("border-top:", euiThemeContext.euiTheme.border.width.thin, " solid ", borderColor, ";;label:top;"),
|
|
19
|
+
left: /*#__PURE__*/css("border-left:", euiThemeContext.euiTheme.border.width.thin, " solid ", borderColor, ";;label:left;")
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export { _EuiPageOuter } from './page_outer';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "grow", "direction", "responsive"];
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { useEuiTheme, useIsWithinBreakpoints } from '../../../services';
|
|
14
|
+
import { euiPageOuterStyles } from './page_outer.styles';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
export var _EuiPageOuter = function _EuiPageOuter(_ref) {
|
|
17
|
+
var children = _ref.children,
|
|
18
|
+
_ref$grow = _ref.grow,
|
|
19
|
+
grow = _ref$grow === void 0 ? true : _ref$grow,
|
|
20
|
+
_ref$direction = _ref.direction,
|
|
21
|
+
direction = _ref$direction === void 0 ? 'row' : _ref$direction,
|
|
22
|
+
_ref$responsive = _ref.responsive,
|
|
23
|
+
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
24
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
|
|
26
|
+
var themeContext = useEuiTheme();
|
|
27
|
+
var styles = euiPageOuterStyles(themeContext);
|
|
28
|
+
var isResponding = useIsWithinBreakpoints(responsive);
|
|
29
|
+
var cssStyles = [styles.euiPageOuter, styles[isResponding ? 'column' : direction], grow && styles.grow];
|
|
30
|
+
return ___EmotionJSX("div", _extends({
|
|
31
|
+
css: cssStyles
|
|
32
|
+
}, rest), children);
|
|
33
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "15mvjmo-row",
|
|
14
|
+
styles: "flex-direction:row;label:row;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "15mvjmo-row",
|
|
17
|
+
styles: "flex-direction:row;label:row;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
22
|
+
name: "ll8kmq-column",
|
|
23
|
+
styles: "flex-direction:column;label:column;"
|
|
24
|
+
} : {
|
|
25
|
+
name: "ll8kmq-column",
|
|
26
|
+
styles: "flex-direction:column;label:column;",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
31
|
+
name: "122lw0e-grow",
|
|
32
|
+
styles: "flex-grow:1;label:grow;"
|
|
33
|
+
} : {
|
|
34
|
+
name: "122lw0e-grow",
|
|
35
|
+
styles: "flex-grow:1;label:grow;",
|
|
36
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export var euiPageOuterStyles = function euiPageOuterStyles(_ref4) {
|
|
40
|
+
var euiTheme = _ref4.euiTheme;
|
|
41
|
+
return {
|
|
42
|
+
euiPageOuter: /*#__PURE__*/css("display:flex;background-color:", euiTheme.colors.body, ";flex-shrink:0;max-width:100%;;label:euiPageOuter;"),
|
|
43
|
+
// Grow
|
|
44
|
+
grow: _ref3,
|
|
45
|
+
// Direction
|
|
46
|
+
column: _ref2,
|
|
47
|
+
row: _ref
|
|
48
|
+
};
|
|
49
|
+
};
|