@elastic/eui 64.0.1 → 64.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_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +4 -1
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +4 -1
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/button/button_display/_button_display.js +6 -1
- package/es/components/button/button_empty/button_empty.js +10 -1
- package/es/components/card/card.js +10 -1
- package/es/components/card/card_select.js +10 -1
- package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
- package/es/components/description_list/description_list_title.js +1 -1
- package/es/components/expression/expression.js +12 -2
- package/es/components/header/header_links/header_link.js +10 -1
- package/es/components/image/image.js +6 -1
- package/es/components/notification/notification_event.js +10 -1
- 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 +15 -3
- package/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/es/components/page/page_sidebar/page_sidebar.js +5 -1
- package/es/components/page/page_template.js +3 -1
- package/es/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/es/components/page_template/page_template.js +18 -2
- package/es/components/pagination/pagination_button.js +10 -1
- package/es/components/progress/progress.js +6 -1
- package/es/components/provider/cache/cache_provider.js +3 -9
- package/es/components/provider/provider.js +25 -2
- package/es/components/resizable_container/resizable_panel.js +6 -1
- package/es/components/side_nav/side_nav.js +5 -0
- package/es/services/theme/hooks.js +11 -16
- package/eui.d.ts +26 -24
- package/i18ntokens.json +4 -4
- package/lib/components/button/button_display/_button_display.js +6 -1
- package/lib/components/button/button_empty/button_empty.js +10 -1
- package/lib/components/card/card.js +10 -1
- package/lib/components/card/card_select.js +10 -1
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/lib/components/description_list/description_list_title.js +1 -1
- package/lib/components/expression/expression.js +12 -2
- package/lib/components/header/header_links/header_link.js +10 -1
- package/lib/components/image/image.js +6 -1
- package/lib/components/notification/notification_event.js +10 -1
- 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 +15 -3
- package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
- package/lib/components/page/page_template.js +3 -1
- package/lib/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/lib/components/page_template/page_template.js +18 -2
- package/lib/components/progress/progress.js +6 -1
- package/lib/components/provider/cache/cache_provider.js +3 -11
- package/lib/components/provider/provider.js +31 -6
- package/lib/components/resizable_container/resizable_panel.js +6 -1
- package/lib/components/side_nav/side_nav.js +5 -0
- package/lib/services/theme/hooks.js +10 -15
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +0 -1
- package/optimize/es/components/description_list/description_list_title.js +1 -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_sidebar/page_sidebar.js +5 -1
- package/optimize/es/components/page/page_template.js +3 -1
- package/optimize/es/components/provider/cache/cache_provider.js +3 -9
- package/optimize/es/components/provider/provider.js +25 -2
- package/optimize/es/services/theme/hooks.js +11 -16
- package/optimize/lib/components/description_list/description_list_title.js +1 -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_sidebar/page_sidebar.js +5 -1
- package/optimize/lib/components/page/page_template.js +3 -1
- package/optimize/lib/components/provider/cache/cache_provider.js +3 -11
- package/optimize/lib/components/provider/provider.js +31 -6
- package/optimize/lib/services/theme/hooks.js +10 -15
- package/package.json +1 -1
- package/src/components/datagrid/_data_grid_data_row.scss +7 -0
- package/test-env/components/button/button_display/_button_display.js +6 -1
- package/test-env/components/button/button_empty/button_empty.js +10 -1
- package/test-env/components/card/card.js +10 -1
- package/test-env/components/card/card_select.js +10 -1
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/test-env/components/description_list/description_list_title.js +1 -1
- package/test-env/components/expression/expression.js +12 -2
- package/test-env/components/header/header_links/header_link.js +10 -1
- package/test-env/components/image/image.js +6 -1
- package/test-env/components/notification/notification_event.js +10 -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 +15 -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 +5 -1
- package/test-env/components/page/page_template.js +3 -1
- package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/test-env/components/page_template/page_template.js +18 -2
- package/test-env/components/progress/progress.js +6 -1
- package/test-env/components/provider/cache/cache_provider.js +3 -11
- package/test-env/components/provider/provider.js +31 -6
- package/test-env/components/resizable_container/resizable_panel.js +6 -1
- package/test-env/components/side_nav/side_nav.js +5 -0
- package/test-env/services/theme/hooks.js +10 -15
|
@@ -32,11 +32,14 @@ var useEuiTheme = function useEuiTheme() {
|
|
|
32
32
|
var theme = (0, _react.useContext)(_context.EuiThemeContext);
|
|
33
33
|
var colorMode = (0, _react.useContext)(_context.EuiColorModeContext);
|
|
34
34
|
var modifications = (0, _react.useContext)(_context.EuiModificationsContext);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
var assembledTheme = (0, _react.useMemo)(function () {
|
|
36
|
+
return {
|
|
37
|
+
euiTheme: theme,
|
|
38
|
+
colorMode: colorMode,
|
|
39
|
+
modifications: modifications
|
|
40
|
+
};
|
|
41
|
+
}, [theme, colorMode, modifications]);
|
|
42
|
+
return assembledTheme;
|
|
40
43
|
};
|
|
41
44
|
|
|
42
45
|
exports.useEuiTheme = useEuiTheme;
|
|
@@ -47,17 +50,9 @@ var withEuiTheme = function withEuiTheme(Component) {
|
|
|
47
50
|
var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
|
|
48
51
|
|
|
49
52
|
var Render = function Render(props, ref) {
|
|
50
|
-
var
|
|
51
|
-
euiTheme = _useEuiTheme.euiTheme,
|
|
52
|
-
colorMode = _useEuiTheme.colorMode,
|
|
53
|
-
modifications = _useEuiTheme.modifications;
|
|
54
|
-
|
|
53
|
+
var theme = useEuiTheme();
|
|
55
54
|
return (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
56
|
-
theme:
|
|
57
|
-
euiTheme: euiTheme,
|
|
58
|
-
colorMode: colorMode,
|
|
59
|
-
modifications: modifications
|
|
60
|
-
},
|
|
55
|
+
theme: theme,
|
|
61
56
|
ref: ref
|
|
62
57
|
}, props));
|
|
63
58
|
};
|
package/package.json
CHANGED
|
@@ -104,6 +104,13 @@
|
|
|
104
104
|
max-width: 400px !important;
|
|
105
105
|
max-height: 400px !important;
|
|
106
106
|
z-index: $euiZDataGridCellPopover !important;
|
|
107
|
+
// Workaround for a Safari CSS bug when using both `overflow: auto` & `filter: drop-shadow`
|
|
108
|
+
// (see https://github.com/elastic/eui/issues/6151)
|
|
109
|
+
// Disables the default EuiPopover filter drop-shadow and uses box-shadow instead,
|
|
110
|
+
// since we don't use the popover arrow in any case for cell popovers
|
|
111
|
+
filter: none;
|
|
112
|
+
// sass-lint:disable-block mixins-before-declarations
|
|
113
|
+
@include euiBottomShadow; // TODO: Convert to euiShadowMedium() in Emotion
|
|
107
114
|
}
|
|
108
115
|
|
|
109
116
|
.euiDataGridRowCell__expandFlex {
|
|
@@ -106,7 +106,12 @@ EuiButtonDisplay.propTypes = {
|
|
|
106
106
|
/**
|
|
107
107
|
* Object of props passed to the <span/> wrapping the button's content
|
|
108
108
|
*/
|
|
109
|
-
contentProps: _propTypes.default.
|
|
109
|
+
contentProps: _propTypes.default.shape({
|
|
110
|
+
className: _propTypes.default.string,
|
|
111
|
+
"aria-label": _propTypes.default.string,
|
|
112
|
+
"data-test-subj": _propTypes.default.string,
|
|
113
|
+
css: _propTypes.default.any
|
|
114
|
+
}),
|
|
110
115
|
style: _propTypes.default.any,
|
|
111
116
|
|
|
112
117
|
/**
|
|
@@ -199,7 +199,16 @@ EuiButtonEmpty.propTypes = {
|
|
|
199
199
|
/**
|
|
200
200
|
* Object of props passed to the <span/> wrapping the button's content
|
|
201
201
|
*/
|
|
202
|
-
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
205
|
+
*/
|
|
206
|
+
contentProps: _propTypes.default.shape({
|
|
207
|
+
className: _propTypes.default.string,
|
|
208
|
+
"aria-label": _propTypes.default.string,
|
|
209
|
+
"data-test-subj": _propTypes.default.string,
|
|
210
|
+
css: _propTypes.default.any
|
|
211
|
+
}),
|
|
203
212
|
|
|
204
213
|
/**
|
|
205
214
|
* Any `type` accepted by EuiIcon
|
|
@@ -414,7 +414,16 @@ EuiCard.propTypes = {
|
|
|
414
414
|
/**
|
|
415
415
|
* Object of props passed to the <span/> wrapping the button's content
|
|
416
416
|
*/
|
|
417
|
-
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
420
|
+
*/
|
|
421
|
+
contentProps: _propTypes.default.shape({
|
|
422
|
+
className: _propTypes.default.string,
|
|
423
|
+
"aria-label": _propTypes.default.string,
|
|
424
|
+
"data-test-subj": _propTypes.default.string,
|
|
425
|
+
css: _propTypes.default.any
|
|
426
|
+
}),
|
|
418
427
|
|
|
419
428
|
/**
|
|
420
429
|
* Any `type` accepted by EuiIcon
|
|
@@ -111,7 +111,16 @@ EuiCardSelect.propTypes = {
|
|
|
111
111
|
/**
|
|
112
112
|
* Object of props passed to the <span/> wrapping the button's content
|
|
113
113
|
*/
|
|
114
|
-
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
117
|
+
*/
|
|
118
|
+
contentProps: _propTypes.default.shape({
|
|
119
|
+
className: _propTypes.default.string,
|
|
120
|
+
"aria-label": _propTypes.default.string,
|
|
121
|
+
"data-test-subj": _propTypes.default.string,
|
|
122
|
+
css: _propTypes.default.any
|
|
123
|
+
}),
|
|
115
124
|
|
|
116
125
|
/**
|
|
117
126
|
* Any `type` accepted by EuiIcon
|
|
@@ -212,7 +212,12 @@ EuiAutoRefreshButton.propTypes = {
|
|
|
212
212
|
/**
|
|
213
213
|
* Object of props passed to the <span/> wrapping the button's content
|
|
214
214
|
*/
|
|
215
|
-
contentProps: _propTypes.default.
|
|
215
|
+
contentProps: _propTypes.default.shape({
|
|
216
|
+
className: _propTypes.default.string,
|
|
217
|
+
"aria-label": _propTypes.default.string,
|
|
218
|
+
"data-test-subj": _propTypes.default.string,
|
|
219
|
+
css: _propTypes.default.any
|
|
220
|
+
}),
|
|
216
221
|
|
|
217
222
|
/**
|
|
218
223
|
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js
CHANGED
|
@@ -100,7 +100,12 @@ var EuiDatePopoverButton = function EuiDatePopoverButton(props) {
|
|
|
100
100
|
exports.EuiDatePopoverButton = EuiDatePopoverButton;
|
|
101
101
|
EuiDatePopoverButton.propTypes = {
|
|
102
102
|
className: _propTypes.default.string,
|
|
103
|
-
buttonProps: _propTypes.default.
|
|
103
|
+
buttonProps: _propTypes.default.shape({
|
|
104
|
+
className: _propTypes.default.string,
|
|
105
|
+
"aria-label": _propTypes.default.string,
|
|
106
|
+
"data-test-subj": _propTypes.default.string,
|
|
107
|
+
css: _propTypes.default.any
|
|
108
|
+
}),
|
|
104
109
|
dateFormat: _propTypes.default.string.isRequired,
|
|
105
110
|
isDisabled: _propTypes.default.bool,
|
|
106
111
|
isInvalid: _propTypes.default.bool,
|
|
@@ -48,7 +48,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
48
48
|
|
|
49
49
|
var theme = (0, _services.useEuiTheme)();
|
|
50
50
|
var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
|
|
51
|
-
var conditionalStyles = compressed && textStyle
|
|
51
|
+
var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
52
52
|
|
|
53
53
|
switch (type) {
|
|
54
54
|
case 'inline':
|
|
@@ -109,7 +109,12 @@ EuiExpression.propTypes = {
|
|
|
109
109
|
* First part of the expression
|
|
110
110
|
*/
|
|
111
111
|
description: _propTypes.default.node.isRequired,
|
|
112
|
-
descriptionProps: _propTypes.default.
|
|
112
|
+
descriptionProps: _propTypes.default.shape({
|
|
113
|
+
className: _propTypes.default.string,
|
|
114
|
+
"aria-label": _propTypes.default.string,
|
|
115
|
+
"data-test-subj": _propTypes.default.string,
|
|
116
|
+
css: _propTypes.default.any
|
|
117
|
+
}),
|
|
113
118
|
|
|
114
119
|
/**
|
|
115
120
|
* Second part of the expression
|
|
@@ -119,7 +124,12 @@ EuiExpression.propTypes = {
|
|
|
119
124
|
* Second part of the expression
|
|
120
125
|
*/
|
|
121
126
|
value: _propTypes.default.node,
|
|
122
|
-
valueProps: _propTypes.default.
|
|
127
|
+
valueProps: _propTypes.default.shape({
|
|
128
|
+
className: _propTypes.default.string,
|
|
129
|
+
"aria-label": _propTypes.default.string,
|
|
130
|
+
"data-test-subj": _propTypes.default.string,
|
|
131
|
+
css: _propTypes.default.any
|
|
132
|
+
}),
|
|
123
133
|
|
|
124
134
|
/**
|
|
125
135
|
* Color of the `description`
|
|
@@ -104,7 +104,16 @@ EuiHeaderLink.propTypes = {
|
|
|
104
104
|
/**
|
|
105
105
|
* Object of props passed to the <span/> wrapping the button's content
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
110
|
+
*/
|
|
111
|
+
contentProps: _propTypes.default.shape({
|
|
112
|
+
className: _propTypes.default.string,
|
|
113
|
+
"aria-label": _propTypes.default.string,
|
|
114
|
+
"data-test-subj": _propTypes.default.string,
|
|
115
|
+
css: _propTypes.default.any
|
|
116
|
+
}),
|
|
108
117
|
|
|
109
118
|
/**
|
|
110
119
|
* Any `type` accepted by EuiIcon
|
|
@@ -174,5 +174,10 @@ EuiImage.propTypes = {
|
|
|
174
174
|
/**
|
|
175
175
|
* Props to add to the wrapping figure element
|
|
176
176
|
*/
|
|
177
|
-
wrapperProps: _propTypes.default.
|
|
177
|
+
wrapperProps: _propTypes.default.shape({
|
|
178
|
+
className: _propTypes.default.string,
|
|
179
|
+
"aria-label": _propTypes.default.string,
|
|
180
|
+
"data-test-subj": _propTypes.default.string,
|
|
181
|
+
css: _propTypes.default.any
|
|
182
|
+
})
|
|
178
183
|
};
|
|
@@ -270,7 +270,16 @@ EuiNotificationEvent.propTypes = {
|
|
|
270
270
|
/**
|
|
271
271
|
* Object of props passed to the <span/> wrapping the button's content
|
|
272
272
|
*/
|
|
273
|
-
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
276
|
+
*/
|
|
277
|
+
contentProps: _propTypes.default.shape({
|
|
278
|
+
className: _propTypes.default.string,
|
|
279
|
+
"aria-label": _propTypes.default.string,
|
|
280
|
+
"data-test-subj": _propTypes.default.string,
|
|
281
|
+
css: _propTypes.default.any
|
|
282
|
+
}),
|
|
274
283
|
|
|
275
284
|
/**
|
|
276
285
|
* Any `type` accepted by EuiIcon
|
|
@@ -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
|
|
@@ -107,5 +109,15 @@ EuiPageSection.propTypes = {
|
|
|
107
109
|
/**
|
|
108
110
|
* Passed down to the div wrapper of the section contents
|
|
109
111
|
*/
|
|
110
|
-
contentProps: _propTypes.default.
|
|
112
|
+
contentProps: _propTypes.default.shape({
|
|
113
|
+
className: _propTypes.default.string,
|
|
114
|
+
"aria-label": _propTypes.default.string,
|
|
115
|
+
"data-test-subj": _propTypes.default.string,
|
|
116
|
+
css: _propTypes.default.any
|
|
117
|
+
}),
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Sets which HTML element to render.
|
|
121
|
+
*/
|
|
122
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
111
123
|
};
|
|
@@ -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,
|
|
@@ -65,13 +65,17 @@ var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
|
65
65
|
setInlineStyles = _useState2[1];
|
|
66
66
|
|
|
67
67
|
(0, _react.useEffect)(function () {
|
|
68
|
+
var updatedStyles = _objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth));
|
|
69
|
+
|
|
68
70
|
if (sticky) {
|
|
69
71
|
var _document$body$datase;
|
|
70
72
|
|
|
71
73
|
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
72
74
|
var offset = (0, _typeof2.default)(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
73
|
-
|
|
75
|
+
updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)")));
|
|
74
76
|
}
|
|
77
|
+
|
|
78
|
+
setInlineStyles(updatedStyles);
|
|
75
79
|
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
76
80
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
77
81
|
className: className,
|
|
@@ -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,6 +110,16 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
110
110
|
/**
|
|
111
111
|
* Passed down to the div wrapper of the section contents
|
|
112
112
|
*/
|
|
113
|
-
contentProps: _propTypes.default.
|
|
113
|
+
contentProps: _propTypes.default.shape({
|
|
114
|
+
className: _propTypes.default.string,
|
|
115
|
+
"aria-label": _propTypes.default.string,
|
|
116
|
+
"data-test-subj": _propTypes.default.string,
|
|
117
|
+
css: _propTypes.default.any
|
|
118
|
+
}),
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Sets which HTML element to render.
|
|
122
|
+
*/
|
|
123
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
114
124
|
panelled: _propTypes.default.bool
|
|
115
125
|
};
|
|
@@ -309,7 +309,17 @@ _EuiPageSection.propTypes = {
|
|
|
309
309
|
/**
|
|
310
310
|
* Passed down to the div wrapper of the section contents
|
|
311
311
|
*/
|
|
312
|
-
contentProps: _propTypes.default.
|
|
312
|
+
contentProps: _propTypes.default.shape({
|
|
313
|
+
className: _propTypes.default.string,
|
|
314
|
+
"aria-label": _propTypes.default.string,
|
|
315
|
+
"data-test-subj": _propTypes.default.string,
|
|
316
|
+
css: _propTypes.default.any
|
|
317
|
+
}),
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Sets which HTML element to render.
|
|
321
|
+
*/
|
|
322
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired])
|
|
313
323
|
};
|
|
314
324
|
|
|
315
325
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
@@ -358,7 +368,13 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
358
368
|
paddingSize: _propTypes.default.any,
|
|
359
369
|
alignment: _propTypes.default.any,
|
|
360
370
|
grow: _propTypes.default.bool,
|
|
361
|
-
contentProps: _propTypes.default.
|
|
371
|
+
contentProps: _propTypes.default.shape({
|
|
372
|
+
className: _propTypes.default.string,
|
|
373
|
+
"aria-label": _propTypes.default.string,
|
|
374
|
+
"data-test-subj": _propTypes.default.string,
|
|
375
|
+
css: _propTypes.default.any
|
|
376
|
+
}),
|
|
377
|
+
component: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.elementType.isRequired]),
|
|
362
378
|
panelled: _propTypes.default.bool
|
|
363
379
|
};
|
|
364
380
|
|
|
@@ -160,5 +160,10 @@ EuiProgress.propTypes = {
|
|
|
160
160
|
/**
|
|
161
161
|
* Object of props passed to the <span/> wrapping the determinate progress's label
|
|
162
162
|
*/
|
|
163
|
-
labelProps: _propTypes.default.
|
|
163
|
+
labelProps: _propTypes.default.shape({
|
|
164
|
+
className: _propTypes.default.string,
|
|
165
|
+
"aria-label": _propTypes.default.string,
|
|
166
|
+
"data-test-subj": _propTypes.default.string,
|
|
167
|
+
css: _propTypes.default.any
|
|
168
|
+
})
|
|
164
169
|
};
|
|
@@ -9,8 +9,6 @@ exports.EuiCacheProvider = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var _cache = _interopRequireDefault(require("@emotion/cache"));
|
|
13
|
-
|
|
14
12
|
var _react2 = require("@emotion/react");
|
|
15
13
|
|
|
16
14
|
/*
|
|
@@ -20,18 +18,12 @@ var _react2 = require("@emotion/react");
|
|
|
20
18
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
19
|
* Side Public License, v 1.
|
|
22
20
|
*/
|
|
23
|
-
var defaultCache = (0, _cache.default)({
|
|
24
|
-
key: 'css'
|
|
25
|
-
});
|
|
26
|
-
defaultCache.compat = true;
|
|
27
|
-
|
|
28
21
|
var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
29
|
-
var
|
|
30
|
-
cache = _ref$cache === void 0 ? defaultCache : _ref$cache,
|
|
22
|
+
var cache = _ref.cache,
|
|
31
23
|
children = _ref.children;
|
|
32
|
-
return (0, _react2.jsx)(_react2.CacheProvider, {
|
|
24
|
+
return children && cache ? (0, _react2.jsx)(_react2.CacheProvider, {
|
|
33
25
|
value: cache
|
|
34
|
-
}, children);
|
|
26
|
+
}, children) : (0, _react2.jsx)(_react.default.Fragment, null, children);
|
|
35
27
|
};
|
|
36
28
|
|
|
37
29
|
exports.EuiCacheProvider = EuiCacheProvider;
|
|
@@ -9,6 +9,8 @@ exports.EuiProvider = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
+
var _cache = _interopRequireDefault(require("@emotion/cache"));
|
|
13
|
+
|
|
12
14
|
var _global_styles = require("../../global_styling/reset/global_styles");
|
|
13
15
|
|
|
14
16
|
var _utility = require("../../global_styling/utility/utility");
|
|
@@ -17,7 +19,7 @@ var _services = require("../../services");
|
|
|
17
19
|
|
|
18
20
|
var _themes = require("../../themes");
|
|
19
21
|
|
|
20
|
-
var
|
|
22
|
+
var _cache2 = require("./cache");
|
|
21
23
|
|
|
22
24
|
var _react2 = require("@emotion/react");
|
|
23
25
|
|
|
@@ -32,8 +34,16 @@ var isEmotionCacheObject = function isEmotionCacheObject(obj) {
|
|
|
32
34
|
return obj.hasOwnProperty('key');
|
|
33
35
|
};
|
|
34
36
|
|
|
37
|
+
var fallbackCache = (0, _cache.default)({
|
|
38
|
+
key: 'css'
|
|
39
|
+
});
|
|
40
|
+
fallbackCache.compat = true;
|
|
41
|
+
|
|
35
42
|
var EuiProvider = function EuiProvider(_ref) {
|
|
36
|
-
var
|
|
43
|
+
var _defaultCache;
|
|
44
|
+
|
|
45
|
+
var _ref$cache = _ref.cache,
|
|
46
|
+
cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
|
|
37
47
|
_ref$theme = _ref.theme,
|
|
38
48
|
theme = _ref$theme === void 0 ? _themes.EuiThemeAmsterdam : _ref$theme,
|
|
39
49
|
_ref$globalStyles = _ref.globalStyles,
|
|
@@ -49,24 +59,39 @@ var EuiProvider = function EuiProvider(_ref) {
|
|
|
49
59
|
|
|
50
60
|
if (cache) {
|
|
51
61
|
if (isEmotionCacheObject(cache)) {
|
|
62
|
+
cache.compat = true;
|
|
52
63
|
defaultCache = cache;
|
|
53
64
|
} else {
|
|
65
|
+
if (cache.default) {
|
|
66
|
+
cache.default.compat = true;
|
|
67
|
+
}
|
|
68
|
+
|
|
54
69
|
defaultCache = cache.default;
|
|
70
|
+
|
|
71
|
+
if (cache.global) {
|
|
72
|
+
cache.global.compat = true;
|
|
73
|
+
}
|
|
74
|
+
|
|
55
75
|
globalCache = cache.global;
|
|
76
|
+
|
|
77
|
+
if (cache.utility) {
|
|
78
|
+
cache.utility.compat = true;
|
|
79
|
+
}
|
|
80
|
+
|
|
56
81
|
utilityCache = cache.utility;
|
|
57
82
|
}
|
|
58
83
|
}
|
|
59
84
|
|
|
60
|
-
return (0, _react2.jsx)(
|
|
61
|
-
cache: defaultCache
|
|
85
|
+
return (0, _react2.jsx)(_cache2.EuiCacheProvider, {
|
|
86
|
+
cache: (_defaultCache = defaultCache) !== null && _defaultCache !== void 0 ? _defaultCache : fallbackCache
|
|
62
87
|
}, (0, _react2.jsx)(_services.EuiThemeProvider, {
|
|
63
88
|
theme: theme !== null && theme !== void 0 ? theme : undefined,
|
|
64
89
|
colorMode: colorMode,
|
|
65
90
|
modify: modify
|
|
66
|
-
}, theme && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(
|
|
91
|
+
}, theme && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_cache2.EuiCacheProvider, {
|
|
67
92
|
cache: globalCache,
|
|
68
93
|
children: Globals && (0, _react2.jsx)(Globals, null)
|
|
69
|
-
}), (0, _react2.jsx)(
|
|
94
|
+
}), (0, _react2.jsx)(_cache2.EuiCacheProvider, {
|
|
70
95
|
cache: utilityCache,
|
|
71
96
|
children: Utilities && (0, _react2.jsx)(Utilities, null)
|
|
72
97
|
})), (0, _react2.jsx)(_services.CurrentEuiBreakpointProvider, null, children)));
|
|
@@ -355,7 +355,12 @@ EuiResizablePanel.propTypes = {
|
|
|
355
355
|
/**
|
|
356
356
|
* Props to add to the wrapping `.euiResizablePanel` div
|
|
357
357
|
*/
|
|
358
|
-
wrapperProps: _propTypes.default.
|
|
358
|
+
wrapperProps: _propTypes.default.shape({
|
|
359
|
+
className: _propTypes.default.string,
|
|
360
|
+
"aria-label": _propTypes.default.string,
|
|
361
|
+
"data-test-subj": _propTypes.default.string,
|
|
362
|
+
css: _propTypes.default.any
|
|
363
|
+
}),
|
|
359
364
|
|
|
360
365
|
/**
|
|
361
366
|
* Padding to add directly to the wrapping `.euiResizablePanel` div
|
|
@@ -255,6 +255,11 @@ EuiSideNav.propTypes = {
|
|
|
255
255
|
* Adds a couple extra #EuiSideNavHeading props and extends the props of EuiTitle that wraps the `heading`
|
|
256
256
|
*/
|
|
257
257
|
headingProps: _propTypes.default.shape({
|
|
258
|
+
className: _propTypes.default.string,
|
|
259
|
+
"aria-label": _propTypes.default.string,
|
|
260
|
+
"data-test-subj": _propTypes.default.string,
|
|
261
|
+
css: _propTypes.default.any,
|
|
262
|
+
|
|
258
263
|
/**
|
|
259
264
|
* The actual HTML heading element to wrap the `heading`.
|
|
260
265
|
* Default is `h2`
|
|
@@ -32,11 +32,14 @@ var useEuiTheme = function useEuiTheme() {
|
|
|
32
32
|
var theme = (0, _react.useContext)(_context.EuiThemeContext);
|
|
33
33
|
var colorMode = (0, _react.useContext)(_context.EuiColorModeContext);
|
|
34
34
|
var modifications = (0, _react.useContext)(_context.EuiModificationsContext);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
var assembledTheme = (0, _react.useMemo)(function () {
|
|
36
|
+
return {
|
|
37
|
+
euiTheme: theme,
|
|
38
|
+
colorMode: colorMode,
|
|
39
|
+
modifications: modifications
|
|
40
|
+
};
|
|
41
|
+
}, [theme, colorMode, modifications]);
|
|
42
|
+
return assembledTheme;
|
|
40
43
|
};
|
|
41
44
|
|
|
42
45
|
exports.useEuiTheme = useEuiTheme;
|
|
@@ -47,17 +50,9 @@ var withEuiTheme = function withEuiTheme(Component) {
|
|
|
47
50
|
var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
|
|
48
51
|
|
|
49
52
|
var Render = function Render(props, ref) {
|
|
50
|
-
var
|
|
51
|
-
euiTheme = _useEuiTheme.euiTheme,
|
|
52
|
-
colorMode = _useEuiTheme.colorMode,
|
|
53
|
-
modifications = _useEuiTheme.modifications;
|
|
54
|
-
|
|
53
|
+
var theme = useEuiTheme();
|
|
55
54
|
return (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
56
|
-
theme:
|
|
57
|
-
euiTheme: euiTheme,
|
|
58
|
-
colorMode: colorMode,
|
|
59
|
-
modifications: modifications
|
|
60
|
-
},
|
|
55
|
+
theme: theme,
|
|
61
56
|
ref: ref
|
|
62
57
|
}, props));
|
|
63
58
|
};
|