@elastic/eui 65.0.2 → 66.0.0
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 +24 -196
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +24 -196
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.js +13 -2
- package/es/components/basic_table/in_memory_table.js +13 -2
- package/es/components/card/card.styles.js +2 -2
- package/es/components/combo_box/combo_box.js +2 -15
- package/es/components/datagrid/body/data_grid_body.js +17 -6
- package/es/components/datagrid/body/data_grid_cell.js +29 -12
- package/es/components/datagrid/body/header/data_grid_header_cell.js +17 -6
- package/es/components/datagrid/body/header/data_grid_header_row.js +17 -6
- package/es/components/datagrid/data_grid.js +17 -6
- package/es/components/datagrid/utils/in_memory.js +17 -6
- package/es/components/description_list/description_list.js +11 -3
- package/es/components/description_list/description_list_context.js +2 -1
- package/es/components/description_list/description_list_description.js +3 -1
- package/es/components/description_list/description_list_description.styles.js +5 -2
- package/es/components/description_list/description_list_title.js +3 -2
- package/es/components/description_list/description_list_title.styles.js +7 -3
- package/es/components/description_list/description_list_types.js +2 -1
- package/es/components/form/field_search/field_search.js +6 -16
- package/es/components/form/range/range_input.js +1 -1
- package/es/components/header/header_section/header_section_item.js +4 -3
- package/es/components/icon/icon.js +1 -9
- package/es/components/list_group/list_group.js +7 -1
- package/es/components/list_group/list_group_item.js +10 -3
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
- package/es/components/modal/modal.js +1 -3
- package/es/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/es/components/page/page_sidebar/page_sidebar.js +5 -1
- package/es/components/table/table_row_cell.js +4 -6
- package/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/es/global_styling/mixins/_typography.js +1 -1
- package/es/services/theme/hooks.js +11 -16
- package/eui.d.ts +29 -10
- package/i18ntokens.json +18 -18
- package/lib/components/basic_table/basic_table.js +13 -2
- package/lib/components/basic_table/in_memory_table.js +13 -2
- package/lib/components/card/card.styles.js +2 -2
- package/lib/components/combo_box/combo_box.js +2 -15
- package/lib/components/datagrid/body/data_grid_body.js +17 -6
- package/lib/components/datagrid/body/data_grid_cell.js +29 -12
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +17 -6
- package/lib/components/datagrid/body/header/data_grid_header_row.js +17 -6
- package/lib/components/datagrid/data_grid.js +17 -6
- package/lib/components/datagrid/utils/in_memory.js +17 -6
- package/lib/components/description_list/description_list.js +11 -3
- package/lib/components/description_list/description_list_context.js +2 -1
- package/lib/components/description_list/description_list_description.js +3 -1
- package/lib/components/description_list/description_list_description.styles.js +5 -2
- package/lib/components/description_list/description_list_title.js +3 -2
- package/lib/components/description_list/description_list_title.styles.js +7 -3
- package/lib/components/description_list/description_list_types.js +4 -2
- package/lib/components/form/field_search/field_search.js +6 -16
- package/lib/components/form/range/range_input.js +1 -1
- package/lib/components/header/header_section/header_section_item.js +4 -3
- package/lib/components/icon/icon.js +1 -9
- package/lib/components/list_group/list_group.js +7 -1
- package/lib/components/list_group/list_group_item.js +10 -3
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
- package/lib/components/modal/modal.js +1 -3
- package/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
- package/lib/components/table/table_row_cell.js +4 -6
- package/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/lib/global_styling/mixins/_typography.js +1 -1
- package/lib/services/theme/hooks.js +10 -15
- package/optimize/es/components/card/card.styles.js +2 -2
- package/optimize/es/components/combo_box/combo_box.js +2 -15
- package/optimize/es/components/description_list/description_list.js +5 -2
- package/optimize/es/components/description_list/description_list_context.js +2 -1
- package/optimize/es/components/description_list/description_list_description.js +3 -1
- package/optimize/es/components/description_list/description_list_description.styles.js +5 -2
- package/optimize/es/components/description_list/description_list_title.js +3 -2
- package/optimize/es/components/description_list/description_list_title.styles.js +7 -3
- package/optimize/es/components/description_list/description_list_types.js +2 -1
- package/optimize/es/components/form/field_search/field_search.js +6 -16
- package/optimize/es/components/form/range/range_input.js +1 -1
- package/optimize/es/components/header/header_section/header_section_item.js +4 -3
- package/optimize/es/components/icon/icon.js +1 -9
- package/optimize/es/components/list_group/list_group_item.js +3 -2
- package/optimize/es/components/modal/modal.js +1 -3
- package/optimize/es/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/optimize/es/components/page/page_sidebar/page_sidebar.js +5 -1
- package/optimize/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/optimize/es/global_styling/mixins/_typography.js +1 -1
- package/optimize/es/services/theme/hooks.js +11 -16
- package/optimize/lib/components/card/card.styles.js +2 -2
- package/optimize/lib/components/combo_box/combo_box.js +2 -15
- package/optimize/lib/components/description_list/description_list.js +5 -2
- package/optimize/lib/components/description_list/description_list_context.js +2 -1
- package/optimize/lib/components/description_list/description_list_description.js +3 -1
- package/optimize/lib/components/description_list/description_list_description.styles.js +5 -2
- package/optimize/lib/components/description_list/description_list_title.js +3 -2
- package/optimize/lib/components/description_list/description_list_title.styles.js +7 -3
- package/optimize/lib/components/description_list/description_list_types.js +4 -2
- package/optimize/lib/components/form/field_search/field_search.js +6 -16
- package/optimize/lib/components/form/range/range_input.js +1 -1
- package/optimize/lib/components/header/header_section/header_section_item.js +4 -3
- package/optimize/lib/components/icon/icon.js +1 -9
- package/optimize/lib/components/list_group/list_group_item.js +3 -2
- package/optimize/lib/components/modal/modal.js +1 -3
- package/optimize/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/optimize/lib/components/page/page_sidebar/page_sidebar.js +5 -1
- package/optimize/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/optimize/lib/global_styling/mixins/_typography.js +1 -1
- package/optimize/lib/services/theme/hooks.js +10 -15
- package/package.json +1 -1
- package/src/components/badge/_badge.scss +0 -5
- package/src/components/datagrid/body/header/_data_grid_header_row.scss +1 -1
- package/src/components/filter_group/_filter_group.scss +3 -1
- package/src/components/flex/_flex_group.scss +2 -11
- package/src/components/flex/_flex_item.scss +0 -6
- package/src/components/form/field_search/_field_search.scss +0 -5
- package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +0 -3
- package/src/components/form/form_row/_form_row.scss +0 -1
- package/src/components/header/header_section/_header_section_item.scss +1 -1
- package/src/components/list_group/_list_group_item.scss +3 -25
- package/src/components/modal/_modal.scss +5 -20
- package/src/components/page/page_content/_page_content.scss +0 -1
- package/src/components/table/_responsive.scss +0 -1
- package/src/components/table/_table.scss +0 -5
- package/src/global_styling/mixins/_form.scss +0 -4
- package/src/global_styling/mixins/_helpers.scss +0 -8
- package/src/global_styling/mixins/_typography.scss +1 -5
- package/src/global_styling/utility/_index.scss +0 -1
- package/test-env/components/basic_table/basic_table.js +13 -2
- package/test-env/components/basic_table/in_memory_table.js +13 -2
- package/test-env/components/card/card.styles.js +2 -2
- package/test-env/components/combo_box/combo_box.js +2 -15
- package/test-env/components/datagrid/body/data_grid_body.js +17 -6
- package/test-env/components/datagrid/body/data_grid_cell.js +29 -12
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +17 -6
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +17 -6
- package/test-env/components/datagrid/data_grid.js +17 -6
- package/test-env/components/datagrid/utils/in_memory.js +17 -6
- package/test-env/components/description_list/description_list.js +11 -3
- package/test-env/components/description_list/description_list_context.js +2 -1
- package/test-env/components/description_list/description_list_description.js +3 -1
- package/test-env/components/description_list/description_list_description.styles.js +5 -2
- package/test-env/components/description_list/description_list_title.js +3 -2
- package/test-env/components/description_list/description_list_title.styles.js +7 -3
- package/test-env/components/description_list/description_list_types.js +4 -2
- package/test-env/components/form/field_search/field_search.js +6 -16
- package/test-env/components/form/range/range_input.js +1 -1
- package/test-env/components/header/header_section/header_section_item.js +4 -3
- package/test-env/components/list_group/list_group.js +7 -1
- package/test-env/components/list_group/list_group_item.js +10 -3
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
- package/test-env/components/modal/modal.js +1 -3
- package/test-env/components/observer/mutation_observer/mutation_observer.js +1 -1
- package/test-env/components/page/page_sidebar/page_sidebar.js +5 -1
- package/test-env/components/table/table_row_cell.js +4 -6
- package/test-env/components/tabs/tabbed_content/tabbed_content.js +2 -19
- package/test-env/global_styling/mixins/_typography.js +1 -1
- package/test-env/services/theme/hooks.js +10 -15
- package/src/global_styling/utility/_utility.scss +0 -15
|
@@ -249,6 +249,12 @@ EuiPinnableListGroup.propTypes = {
|
|
|
249
249
|
*/
|
|
250
250
|
buttonRef: _propTypes.default.any,
|
|
251
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Text to be displayed in the tooltip when `showToolTip` is true.
|
|
254
|
+
* By default the text will be same as the label text.
|
|
255
|
+
*/
|
|
256
|
+
toolTipText: _propTypes.default.string,
|
|
257
|
+
|
|
252
258
|
/**
|
|
253
259
|
* Saves the pinned status and changes the visibility of the pin icon
|
|
254
260
|
*/
|
|
@@ -359,7 +365,13 @@ EuiPinnableListGroup.propTypes = {
|
|
|
359
365
|
* Pass-through ref reference specifically for targeting
|
|
360
366
|
* instances where the item content is rendered as a `button`
|
|
361
367
|
*/
|
|
362
|
-
buttonRef: _propTypes.default.any
|
|
368
|
+
buttonRef: _propTypes.default.any,
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Text to be displayed in the tooltip when `showToolTip` is true.
|
|
372
|
+
* By default the text will be same as the label text.
|
|
373
|
+
*/
|
|
374
|
+
toolTipText: _propTypes.default.string
|
|
363
375
|
}).isRequired)]),
|
|
364
376
|
|
|
365
377
|
/**
|
|
@@ -63,7 +63,7 @@ var EuiMutationObserver = /*#__PURE__*/function (_EuiObserver) {
|
|
|
63
63
|
exports.EuiMutationObserver = EuiMutationObserver;
|
|
64
64
|
|
|
65
65
|
var makeMutationObserver = function makeMutationObserver(node, _observerOptions, callback) {
|
|
66
|
-
//
|
|
66
|
+
// The MutationObserver polyfill used in Kibana (for Jest) implements
|
|
67
67
|
// an older spec in which specifying `attributeOldValue` or `attributeFilter`
|
|
68
68
|
// without specifying `attributes` results in a `SyntaxError`.
|
|
69
69
|
// The following logic patches the newer spec in which `attributes: true` can be
|
|
@@ -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,
|
|
@@ -216,9 +216,8 @@ EuiTableRowCell.propTypes = {
|
|
|
216
216
|
showOnHover: _propTypes.default.bool,
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* `.eui-textBreakWord`.
|
|
219
|
+
* Creates a text wrapper around cell content that helps word break or truncate
|
|
220
|
+
* long text correctly.
|
|
222
221
|
*/
|
|
223
222
|
textOnly: _propTypes.default.bool,
|
|
224
223
|
|
|
@@ -239,9 +238,8 @@ EuiTableRowCell.propTypes = {
|
|
|
239
238
|
showOnHover: _propTypes.default.bool,
|
|
240
239
|
|
|
241
240
|
/**
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
* `.eui-textBreakWord`.
|
|
241
|
+
* Creates a text wrapper around cell content that helps word break or truncate
|
|
242
|
+
* long text correctly.
|
|
245
243
|
*/
|
|
246
244
|
textOnly: _propTypes.default.bool,
|
|
247
245
|
|
|
@@ -135,24 +135,6 @@ var EuiTabbedContent = /*#__PURE__*/function (_Component) {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
(0, _createClass2.default)(EuiTabbedContent, [{
|
|
138
|
-
key: "componentDidMount",
|
|
139
|
-
value: function componentDidMount() {
|
|
140
|
-
// IE11 doesn't support the `relatedTarget` event property for blur events
|
|
141
|
-
// but does add it for focusout. React doesn't support `onFocusOut` so here we are.
|
|
142
|
-
if (this.tabsRef.current) {
|
|
143
|
-
// Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
|
|
144
|
-
this.tabsRef.current.addEventListener('focusout', this.removeFocus);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}, {
|
|
148
|
-
key: "componentWillUnmount",
|
|
149
|
-
value: function componentWillUnmount() {
|
|
150
|
-
if (this.tabsRef.current) {
|
|
151
|
-
// Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
|
|
152
|
-
this.tabsRef.current.removeEventListener('focusout', this.removeFocus);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}, {
|
|
156
138
|
key: "render",
|
|
157
139
|
value: function render() {
|
|
158
140
|
var _this2 = this;
|
|
@@ -180,7 +162,8 @@ var EuiTabbedContent = /*#__PURE__*/function (_Component) {
|
|
|
180
162
|
ref: this.tabsRef,
|
|
181
163
|
expand: expand,
|
|
182
164
|
size: size,
|
|
183
|
-
onFocus: this.initializeFocus
|
|
165
|
+
onFocus: this.initializeFocus,
|
|
166
|
+
onBlur: this.removeFocus
|
|
184
167
|
}, tabs.map(function (tab) {
|
|
185
168
|
var id = tab.id,
|
|
186
169
|
name = tab.name,
|
|
@@ -45,7 +45,7 @@ var useEuiFontSize = function useEuiFontSize(scale, options) {
|
|
|
45
45
|
exports.useEuiFontSize = useEuiFontSize;
|
|
46
46
|
|
|
47
47
|
var euiTextBreakWord = function euiTextBreakWord() {
|
|
48
|
-
return "\n overflow-wrap: break-word !important; // makes sure the long string will wrap and not bust out of the container\n word-
|
|
48
|
+
return "\n overflow-wrap: break-word !important; // makes sure the long string will wrap and not bust out of the container\n word-break: break-word;\n";
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* Prevent text from wrapping onto multiple lines, and truncate with an ellipsis.
|
|
@@ -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
|
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// This file utilizes !importants on purpose
|
|
2
|
-
// sass-lint:disable no-important
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* IE doesn't properly wrap groups if it is within a flex-item of a flex-group.
|
|
6
|
-
* Adding the following styles to the flex-item that contains the wrapping group, will fix IE.
|
|
7
|
-
* https://github.com/philipwalton/flexbugs/issues/104
|
|
8
|
-
*/
|
|
9
|
-
.euiIEFlexWrapFix {
|
|
10
|
-
@include internetExplorerOnly {
|
|
11
|
-
flex-grow: 1;
|
|
12
|
-
flex-shrink: 1;
|
|
13
|
-
flex-basis: 0%;
|
|
14
|
-
}
|
|
15
|
-
}
|