@elastic/eui 65.0.0 → 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 +28 -197
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +28 -197
- 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/date_picker/react-datepicker/original.package.json +124 -0
- 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 +4 -3
- 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 +3 -10
- 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/functions/logicals.json +56 -0
- 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/date_picker/react-datepicker/original.package.json +124 -0
- 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 +4 -3
- 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 +3 -10
- 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/functions/logicals.json +56 -0
- 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/date_picker/react-datepicker/original.package.json +124 -0
- 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 +4 -3
- 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 +3 -10
- 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/functions/logicals.json +56 -0
- 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/date_picker/react-datepicker/original.package.json +124 -0
- 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 +4 -3
- 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 +3 -10
- 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/functions/logicals.json +56 -0
- 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/_data_grid_data_row.scss +7 -0
- 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/date_picker/react-datepicker/original.package.json +124 -0
- 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 +4 -3
- 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/functions/logicals.json +56 -0
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef"],
|
|
4
|
+
var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText"],
|
|
5
5
|
_excluded2 = ["iconType", "alwaysShow", "className", "isDisabled"];
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -58,6 +58,7 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
58
58
|
showToolTip = _ref$showToolTip === void 0 ? false : _ref$showToolTip,
|
|
59
59
|
wrapText = _ref.wrapText,
|
|
60
60
|
buttonRef = _ref.buttonRef,
|
|
61
|
+
toolTipText = _ref.toolTipText,
|
|
61
62
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
62
63
|
|
|
63
64
|
var isHrefValid = !href || validateHref(href);
|
|
@@ -159,7 +160,7 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
|
|
|
159
160
|
className: classes
|
|
160
161
|
}, ___EmotionJSX(EuiToolTip, {
|
|
161
162
|
anchorClassName: "euiListGroupItem__tooltip",
|
|
162
|
-
content: label,
|
|
163
|
+
content: toolTipText !== null && toolTipText !== void 0 ? toolTipText : label,
|
|
163
164
|
position: "right",
|
|
164
165
|
delay: "long"
|
|
165
166
|
}, itemContent));
|
|
@@ -56,7 +56,7 @@ export var EuiMutationObserver = /*#__PURE__*/function (_EuiObserver) {
|
|
|
56
56
|
}(EuiObserver);
|
|
57
57
|
|
|
58
58
|
var makeMutationObserver = function makeMutationObserver(node, _observerOptions, callback) {
|
|
59
|
-
//
|
|
59
|
+
// The MutationObserver polyfill used in Kibana (for Jest) implements
|
|
60
60
|
// an older spec in which specifying `attributeOldValue` or `attributeFilter`
|
|
61
61
|
// without specifying `attributes` results in a `SyntaxError`.
|
|
62
62
|
// The following logic patches the newer spec in which `attributes: true` can be
|
|
@@ -46,13 +46,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
|
46
46
|
setInlineStyles = _useState2[1];
|
|
47
47
|
|
|
48
48
|
useEffect(function () {
|
|
49
|
+
var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
|
|
50
|
+
|
|
49
51
|
if (sticky) {
|
|
50
52
|
var _document$body$datase;
|
|
51
53
|
|
|
52
54
|
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
53
55
|
var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
54
|
-
|
|
56
|
+
updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
|
|
55
57
|
}
|
|
58
|
+
|
|
59
|
+
setInlineStyles(updatedStyles);
|
|
56
60
|
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
57
61
|
return ___EmotionJSX("div", _extends({
|
|
58
62
|
className: className,
|
|
@@ -118,24 +118,6 @@ export var EuiTabbedContent = /*#__PURE__*/function (_Component) {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
_createClass(EuiTabbedContent, [{
|
|
121
|
-
key: "componentDidMount",
|
|
122
|
-
value: function componentDidMount() {
|
|
123
|
-
// IE11 doesn't support the `relatedTarget` event property for blur events
|
|
124
|
-
// but does add it for focusout. React doesn't support `onFocusOut` so here we are.
|
|
125
|
-
if (this.tabsRef.current) {
|
|
126
|
-
// Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
|
|
127
|
-
this.tabsRef.current.addEventListener('focusout', this.removeFocus);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}, {
|
|
131
|
-
key: "componentWillUnmount",
|
|
132
|
-
value: function componentWillUnmount() {
|
|
133
|
-
if (this.tabsRef.current) {
|
|
134
|
-
// Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
|
|
135
|
-
this.tabsRef.current.removeEventListener('focusout', this.removeFocus);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}, {
|
|
139
121
|
key: "render",
|
|
140
122
|
value: function render() {
|
|
141
123
|
var _this2 = this;
|
|
@@ -164,7 +146,8 @@ export var EuiTabbedContent = /*#__PURE__*/function (_Component) {
|
|
|
164
146
|
ref: this.tabsRef,
|
|
165
147
|
expand: expand,
|
|
166
148
|
size: size,
|
|
167
|
-
onFocus: this.initializeFocus
|
|
149
|
+
onFocus: this.initializeFocus,
|
|
150
|
+
onBlur: this.removeFocus
|
|
168
151
|
}, tabs.map(function (tab) {
|
|
169
152
|
var id = tab.id,
|
|
170
153
|
name = tab.name,
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"height": "block-size",
|
|
3
|
+
"width": "inline-size",
|
|
4
|
+
"max-height": "max-block-size",
|
|
5
|
+
"max-width": "max-inline-size",
|
|
6
|
+
"min-height": "min-block-size",
|
|
7
|
+
"min-width": "min-inline-size",
|
|
8
|
+
"top": "inset-block-start",
|
|
9
|
+
"right": "inset-inline-end",
|
|
10
|
+
"bottom": "inset-block-end",
|
|
11
|
+
"left": "inset-inline-start",
|
|
12
|
+
"horizontal": "inset-block",
|
|
13
|
+
"vertical": "inset-inline",
|
|
14
|
+
"margin-left": "margin-inline-start",
|
|
15
|
+
"margin-right": "margin-inline-end",
|
|
16
|
+
"margin-top": "margin-block-start",
|
|
17
|
+
"margin-bottom": "margin-block-end",
|
|
18
|
+
"margin-horizontal": "margin-inline",
|
|
19
|
+
"margin-vertical": "margin-block",
|
|
20
|
+
"padding-left": "padding-inline-start",
|
|
21
|
+
"padding-right": "padding-inline-end",
|
|
22
|
+
"padding-top": "padding-block-start",
|
|
23
|
+
"padding-bottom": "padding-block-end",
|
|
24
|
+
"padding-horizontal": "padding-inline",
|
|
25
|
+
"padding-vertical": "padding-block",
|
|
26
|
+
"overflow-x": "overflow-inline",
|
|
27
|
+
"overflow-y": "overflow-block",
|
|
28
|
+
"border-horizontal": "border-inline",
|
|
29
|
+
"border-horizontal-color": "border-inline-color",
|
|
30
|
+
"border-horizontal-width": "border-inline-width",
|
|
31
|
+
"border-horizontal-style": "border-inline-style",
|
|
32
|
+
"border-vertical": "border-block",
|
|
33
|
+
"border-vertical-color": "border-block-color",
|
|
34
|
+
"border-vertical-width": "border-block-width",
|
|
35
|
+
"border-vertical-style": "border-block-style",
|
|
36
|
+
"border-bottom": "border-block-end",
|
|
37
|
+
"border-bottom-color": "border-block-end-color",
|
|
38
|
+
"border-bottom-style": "border-block-end-style",
|
|
39
|
+
"border-bottom-width": "border-block-end-width",
|
|
40
|
+
"border-top": "border-block-start",
|
|
41
|
+
"border-top-color": "border-block-start-color",
|
|
42
|
+
"border-top-style": "border-block-start-style",
|
|
43
|
+
"border-top-width": "border-block-start-width",
|
|
44
|
+
"border-right": "border-inline-end",
|
|
45
|
+
"border-right-color": "border-inline-end-color",
|
|
46
|
+
"border-right-style": "border-inline-end-style",
|
|
47
|
+
"border-right-width": "border-inline-end-width",
|
|
48
|
+
"border-left": "border-inline-start",
|
|
49
|
+
"border-left-color": "border-inline-start-color",
|
|
50
|
+
"border-left-style": "border-inline-start-style",
|
|
51
|
+
"border-left-width": "border-inline-start-width",
|
|
52
|
+
"border-top-left-radius": "border-start-start-radius",
|
|
53
|
+
"border-top-right-radius": "border-start-end-radius",
|
|
54
|
+
"border-bottom-left-radius": "border-end-start-radius",
|
|
55
|
+
"border-bottom-right-radius": "border-end-end-radius"
|
|
56
|
+
}
|
|
@@ -29,7 +29,7 @@ export var useEuiFontSize = function useEuiFontSize(scale, options) {
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
export var euiTextBreakWord = function euiTextBreakWord() {
|
|
32
|
-
return "\n overflow-wrap: break-word !important; // makes sure the long string will wrap and not bust out of the container\n word-
|
|
32
|
+
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";
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* Prevent text from wrapping onto multiple lines, and truncate with an ellipsis.
|
|
@@ -7,18 +7,21 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
7
7
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
8
|
* Side Public License, v 1.
|
|
9
9
|
*/
|
|
10
|
-
import React, { forwardRef, useContext } from 'react';
|
|
10
|
+
import React, { forwardRef, useContext, useMemo } from 'react';
|
|
11
11
|
import { EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
|
|
12
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
13
|
export var useEuiTheme = function useEuiTheme() {
|
|
14
14
|
var theme = useContext(EuiThemeContext);
|
|
15
15
|
var colorMode = useContext(EuiColorModeContext);
|
|
16
16
|
var modifications = useContext(EuiModificationsContext);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
var assembledTheme = useMemo(function () {
|
|
18
|
+
return {
|
|
19
|
+
euiTheme: theme,
|
|
20
|
+
colorMode: colorMode,
|
|
21
|
+
modifications: modifications
|
|
22
|
+
};
|
|
23
|
+
}, [theme, colorMode, modifications]);
|
|
24
|
+
return assembledTheme;
|
|
22
25
|
};
|
|
23
26
|
// Provide the component props interface as the generic to allow the docs props table to populate.
|
|
24
27
|
// e.g., `const EuiComponent = withEuiTheme<EuiComponentProps>(_EuiComponent)`
|
|
@@ -26,17 +29,9 @@ export var withEuiTheme = function withEuiTheme(Component) {
|
|
|
26
29
|
var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
|
|
27
30
|
|
|
28
31
|
var Render = function Render(props, ref) {
|
|
29
|
-
var
|
|
30
|
-
euiTheme = _useEuiTheme.euiTheme,
|
|
31
|
-
colorMode = _useEuiTheme.colorMode,
|
|
32
|
-
modifications = _useEuiTheme.modifications;
|
|
33
|
-
|
|
32
|
+
var theme = useEuiTheme();
|
|
34
33
|
return ___EmotionJSX(Component, _extends({
|
|
35
|
-
theme:
|
|
36
|
-
euiTheme: euiTheme,
|
|
37
|
-
colorMode: colorMode,
|
|
38
|
-
modifications: modifications
|
|
39
|
-
},
|
|
34
|
+
theme: theme,
|
|
40
35
|
ref: ref
|
|
41
36
|
}, props));
|
|
42
37
|
};
|
|
@@ -87,14 +87,14 @@ var euiCardStyles = function euiCardStyles(euiThemeContext, paddingSize, color)
|
|
|
87
87
|
euiCard__description: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', halfSpacing), ";;label:euiCard__description;"),
|
|
88
88
|
euiCard__footer: /*#__PURE__*/(0, _react.css)("flex-grow:0;", (0, _global_styling.logicalCSS)('width', '100%'), ";", (0, _global_styling.logicalCSS)('margin-top', spacing), ";;label:euiCard__footer;"),
|
|
89
89
|
top: {
|
|
90
|
-
euiCard__top: /*#__PURE__*/(0, _react.css)("flex-grow:0;font-size:0;position:relative;", (0, _global_styling.logicalCSS)('
|
|
90
|
+
euiCard__top: /*#__PURE__*/(0, _react.css)("flex-grow:0;font-size:0;position:relative;", (0, _global_styling.logicalCSS)('margin-bottom', spacing), ";;label:euiCard__top;"),
|
|
91
91
|
layout: {
|
|
92
92
|
vertical: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:vertical;"),
|
|
93
93
|
horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', 'auto'), ";;label:horizontal;")
|
|
94
94
|
},
|
|
95
95
|
disabled: _ref2
|
|
96
96
|
},
|
|
97
|
-
euiCard__image: /*#__PURE__*/(0, _react.css)("position:relative;overflow:hidden;", (0, _global_styling.logicalCSS)('width', "calc(100% + (".concat(paddingAmount, " * 2))")), ";", (0, _global_styling.logicalCSS)('left', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('top', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('margin-bottom', "-".concat(paddingAmount)), ";", _global_styling.
|
|
97
|
+
euiCard__image: /*#__PURE__*/(0, _react.css)("position:relative;overflow:hidden;", (0, _global_styling.logicalCSS)('width', "calc(100% + (".concat(paddingAmount, " * 2))")), ";", (0, _global_styling.logicalCSS)('left', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('top', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('margin-bottom', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('border-top-left-radius', "calc(".concat(euiTheme.border.radius.medium, " - ").concat(euiTheme.border.width.thin, ")")), " ", _global_styling.logicals['border-top-right-radius'], ":calc(", euiTheme.border.radius.medium, " - ", euiTheme.border.width.thin, ");", color === 'transparent' ? "border-radius: ".concat(euiTheme.border.radius.medium, ";") : undefined, " img{", (0, _global_styling.logicalCSS)('width', '100%'), ";};label:euiCard__image;"),
|
|
98
98
|
icon: {
|
|
99
99
|
euiCard__icon: /*#__PURE__*/(0, _react.css)(";label:euiCard__icon;"),
|
|
100
100
|
withImage: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('top', '50%'), ";", (0, _global_styling.logicalCSS)('left', '50%'), ";transform:translate(-50%, calc(-50% + -", paddingAmount, "))!important;;label:withImage;"),
|
|
@@ -93,17 +93,9 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
93
93
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rootId", (0, _services.htmlIdGenerator)());
|
|
94
94
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "comboBoxRefInstance", null);
|
|
95
95
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "comboBoxRefCallback", function (ref) {
|
|
96
|
-
// IE11 doesn't support the `relatedTarget` event property for blur events
|
|
97
|
-
// but does add it for focusout. React doesn't support `onFocusOut` so here we are.
|
|
98
|
-
if (_this.comboBoxRefInstance) {
|
|
99
|
-
_this.comboBoxRefInstance.removeEventListener('focusout', _this.onContainerBlur);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
96
|
_this.comboBoxRefInstance = ref;
|
|
103
97
|
|
|
104
98
|
if (_this.comboBoxRefInstance) {
|
|
105
|
-
_this.comboBoxRefInstance.addEventListener('focusout', _this.onContainerBlur);
|
|
106
|
-
|
|
107
99
|
var comboBoxBounds = _this.comboBoxRefInstance.getBoundingClientRect();
|
|
108
100
|
|
|
109
101
|
_this.setState({
|
|
@@ -388,13 +380,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
388
380
|
});
|
|
389
381
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onContainerBlur", function (event) {
|
|
390
382
|
// close the options list, unless the user clicked on an option
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* FireFox returns `relatedTarget` as `null` for security reasons, but provides a proprietary `explicitOriginalTarget`.
|
|
394
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Event/explicitOriginalTarget
|
|
395
|
-
*/
|
|
396
|
-
var focusEvent = event;
|
|
397
|
-
var relatedTarget = focusEvent.relatedTarget || focusEvent.explicitOriginalTarget;
|
|
383
|
+
var relatedTarget = event.relatedTarget;
|
|
398
384
|
|
|
399
385
|
var focusedInOptionsList = relatedTarget && _this.listRefInstance && _this.listRefInstance.contains(relatedTarget);
|
|
400
386
|
|
|
@@ -825,6 +811,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
825
811
|
className: classes,
|
|
826
812
|
"data-test-subj": dataTestSubj,
|
|
827
813
|
onKeyDown: this.onKeyDown,
|
|
814
|
+
onBlur: this.onContainerBlur,
|
|
828
815
|
ref: this.comboBoxRefCallback
|
|
829
816
|
}), (0, _react2.jsx)(_combo_box_input.EuiComboBoxInput, {
|
|
830
817
|
autoSizeInputRef: this.autoSizeInputRefCallback,
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "HackerOne",
|
|
3
|
+
"name": "@elastic/react-datepicker",
|
|
4
|
+
"description": "Forked from Hacker0x01/react-datepicker for accessibility - simple and reusable datepicker component for React",
|
|
5
|
+
"private": true,
|
|
6
|
+
"version": "2.0.0",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/Hacker0x01/react-datepicker",
|
|
9
|
+
"main": "lib",
|
|
10
|
+
"files": [
|
|
11
|
+
"*.md",
|
|
12
|
+
"dist",
|
|
13
|
+
"datepicker-lib",
|
|
14
|
+
"es",
|
|
15
|
+
"src/stylesheets"
|
|
16
|
+
],
|
|
17
|
+
"resolutions": {
|
|
18
|
+
"**/diff": "^3.5.0"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"babel-core": "^6.26.0",
|
|
22
|
+
"babel-eslint": "^8.0.2",
|
|
23
|
+
"babel-loader": "^6.2.10",
|
|
24
|
+
"babel-plugin-add-react-displayname": "^0.0.4",
|
|
25
|
+
"babel-plugin-external-helpers": "^6.22.0",
|
|
26
|
+
"babel-plugin-react-transform": "^3.0.0",
|
|
27
|
+
"babel-plugin-transform-class-properties": "^6.24.1",
|
|
28
|
+
"babel-plugin-transform-react-remove-prop-types": "^0.4.10",
|
|
29
|
+
"babel-polyfill": "^6.26.0",
|
|
30
|
+
"babel-preset-airbnb": "^2.4.0",
|
|
31
|
+
"babel-preset-env": "^1.6.1",
|
|
32
|
+
"babel-preset-react": "^6.24.1",
|
|
33
|
+
"babel-preset-stage-0": "^6.24.1",
|
|
34
|
+
"chai": "^3.5.0",
|
|
35
|
+
"cross-env": "^5.1.1",
|
|
36
|
+
"css-loader": "^1.0.0",
|
|
37
|
+
"enzyme": "^3.10.0",
|
|
38
|
+
"enzyme-adapter-react-16": "^1.14.0",
|
|
39
|
+
"eslint": "^4.18.2",
|
|
40
|
+
"eslint-plugin-import": "^2.8.0",
|
|
41
|
+
"eslint-plugin-node": "^5.2.1",
|
|
42
|
+
"eslint-plugin-promise": "^3.6.0",
|
|
43
|
+
"eslint-plugin-react": "^7.4.0",
|
|
44
|
+
"express": "^4.16.2",
|
|
45
|
+
"extract-text-webpack-plugin": "^1.0.1",
|
|
46
|
+
"flow-bin": "^0.68.0",
|
|
47
|
+
"highlight.js": "^9.12.0",
|
|
48
|
+
"husky": "^0.14.3",
|
|
49
|
+
"isparta-loader": "^2.0.0",
|
|
50
|
+
"karma": "^1.7.1",
|
|
51
|
+
"karma-chai": "^0.1.0",
|
|
52
|
+
"karma-coverage": "^1.1.1",
|
|
53
|
+
"karma-firefox-launcher": "^1.0.1",
|
|
54
|
+
"karma-mocha": "^1.3.0",
|
|
55
|
+
"karma-sinon": "^1.0.5",
|
|
56
|
+
"karma-sourcemap-loader": "^0.3.7",
|
|
57
|
+
"karma-webpack": "^2.0.5",
|
|
58
|
+
"lint-staged": "^6.0.0",
|
|
59
|
+
"lodash": "^4.17.13",
|
|
60
|
+
"mocha": "^4.0.1",
|
|
61
|
+
"moment": "^2.20.1",
|
|
62
|
+
"node-sass": "^4.13.1",
|
|
63
|
+
"npm-run-all": "^4.1.2",
|
|
64
|
+
"prettier": "^1.9.2",
|
|
65
|
+
"react": "^16.2.0",
|
|
66
|
+
"react-docgen": "^2.20.0",
|
|
67
|
+
"react-dom": "^16.2.0",
|
|
68
|
+
"react-test-renderer": "^16.8.6",
|
|
69
|
+
"react-transform-hmr": "^1.0.4",
|
|
70
|
+
"rimraf": "^2.6.2",
|
|
71
|
+
"rollup": "^0.62.0",
|
|
72
|
+
"rollup-plugin-babel": "^3.0.2",
|
|
73
|
+
"rollup-plugin-commonjs": "^8.2.6",
|
|
74
|
+
"rollup-plugin-node-resolve": "^3.0.0",
|
|
75
|
+
"rollup-plugin-uglify": "^2.0.1",
|
|
76
|
+
"sass-lint": "^1.12.1",
|
|
77
|
+
"sass-loader": "^4.1.1",
|
|
78
|
+
"sinon": "^4.1.2",
|
|
79
|
+
"style-loader": "^0.19.0",
|
|
80
|
+
"webpack": "^1.13.0",
|
|
81
|
+
"webpack-dev-middleware": "^1.12.0",
|
|
82
|
+
"webpack-dev-server": "^3.1.14",
|
|
83
|
+
"webpack-hot-middleware": "^2.20.0"
|
|
84
|
+
},
|
|
85
|
+
"peerDependencies": {
|
|
86
|
+
"moment": "^2.20.0",
|
|
87
|
+
"react": "^16.0.0",
|
|
88
|
+
"react-dom": "^16.0.0"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"classnames": "^2.2.5",
|
|
92
|
+
"focus-trap-react": "^4.0.0",
|
|
93
|
+
"json-loader": "^0.5.7",
|
|
94
|
+
"prop-types": "^15.6.0",
|
|
95
|
+
"react-onclickoutside": "^6.7.1",
|
|
96
|
+
"react-popper": "^1.0.2"
|
|
97
|
+
},
|
|
98
|
+
"scripts": {
|
|
99
|
+
"eslint": "eslint {src,test,docs-site/src}/**/*.{js,jsx} *.js",
|
|
100
|
+
"flow": "flow",
|
|
101
|
+
"precommit": "lint-staged",
|
|
102
|
+
"sass-lint": "sass-lint --config .sass-lint.yml 'src/stylesheets/*.scss, docs-site/src/*.scss' -i 'docs-site/src/higlight.scss, docs-site/src/reset.scss'",
|
|
103
|
+
"lint": "run-p eslint flow sass-lint",
|
|
104
|
+
"start": "cross-env MODULES=false node server.js",
|
|
105
|
+
"test": "cross-env NODE_ENV=test karma start karma.conf.js --single-run",
|
|
106
|
+
"prepublish": "test $(npm -v | tr . '\\n' | head -n 1) -ge '4' || exit 1",
|
|
107
|
+
"prepare": "npm run build",
|
|
108
|
+
"prebuild": "rimraf es lib dist",
|
|
109
|
+
"build": "cross-env NODE_ENV=production run-p build:** && run-p css:**",
|
|
110
|
+
"build-dev": "cross-env NODE_ENV=development run-p build:** && run-p css:**",
|
|
111
|
+
"css:prod": "mkdir -p lib && node-sass --output-style compressed src/stylesheets/datepicker.scss > lib/react-datepicker.min.css",
|
|
112
|
+
"css:modules:prod": "mkdir -p lib && node-sass --output-style compressed src/stylesheets/datepicker-cssmodules.scss > lib/react-datepicker-cssmodules.min.css",
|
|
113
|
+
"css:dev": "mkdir -p lib && node-sass --output-style expanded src/stylesheets/datepicker.scss > lib/react-datepicker.css",
|
|
114
|
+
"css:modules:dev": "mkdir -p lib && node-sass --output-style expanded src/stylesheets/datepicker-cssmodules.scss > lib/react-datepicker-cssmodules.css",
|
|
115
|
+
"build:es": "cross-env BABEL_ENV=cjs rollup -c -i src/index.jsx -o ../react-datepicker.js",
|
|
116
|
+
"build:docs": "cross-env MODULES=false webpack --config webpack.docs.config.js"
|
|
117
|
+
},
|
|
118
|
+
"lint-staged": {
|
|
119
|
+
"*.{js,jsx,json,css,scss,md}": [
|
|
120
|
+
"prettier --write",
|
|
121
|
+
"git add"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -27,7 +27,7 @@ var _description_list_context = require("./description_list_context");
|
|
|
27
27
|
|
|
28
28
|
var _react2 = require("@emotion/react");
|
|
29
29
|
|
|
30
|
-
var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type"];
|
|
30
|
+
var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "gutterSize"];
|
|
31
31
|
|
|
32
32
|
var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
33
33
|
var _ref$align = _ref.align,
|
|
@@ -43,6 +43,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
43
43
|
titleProps = _ref.titleProps,
|
|
44
44
|
_ref$type = _ref.type,
|
|
45
45
|
type = _ref$type === void 0 ? 'row' : _ref$type,
|
|
46
|
+
_ref$gutterSize = _ref.gutterSize,
|
|
47
|
+
gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
|
|
46
48
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
47
49
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
48
50
|
var styles = (0, _description_list.euiDescriptionListStyles)(euiTheme);
|
|
@@ -67,7 +69,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
67
69
|
type: type,
|
|
68
70
|
compressed: compressed,
|
|
69
71
|
textStyle: textStyle,
|
|
70
|
-
align: align
|
|
72
|
+
align: align,
|
|
73
|
+
gutterSize: gutterSize
|
|
71
74
|
}
|
|
72
75
|
}, (0, _react2.jsx)("dl", (0, _extends2.default)({
|
|
73
76
|
className: classes,
|
|
@@ -17,7 +17,8 @@ var _react = require("react");
|
|
|
17
17
|
var contextDefaults = {
|
|
18
18
|
type: 'row',
|
|
19
19
|
textStyle: 'normal',
|
|
20
|
-
align: 'left'
|
|
20
|
+
align: 'left',
|
|
21
|
+
gutterSize: 'm'
|
|
21
22
|
};
|
|
22
23
|
exports.contextDefaults = contextDefaults;
|
|
23
24
|
var EuiDescriptionListContext = /*#__PURE__*/(0, _react.createContext)(contextDefaults);
|
|
@@ -42,7 +42,8 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
|
|
|
42
42
|
type = _useContext.type,
|
|
43
43
|
textStyle = _useContext.textStyle,
|
|
44
44
|
compressed = _useContext.compressed,
|
|
45
|
-
align = _useContext.align
|
|
45
|
+
align = _useContext.align,
|
|
46
|
+
gutterSize = _useContext.gutterSize;
|
|
46
47
|
|
|
47
48
|
var theme = (0, _services.useEuiTheme)();
|
|
48
49
|
var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
|
|
@@ -59,6 +60,7 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
|
|
|
59
60
|
conditionalStyles.push(styles.left);
|
|
60
61
|
}
|
|
61
62
|
|
|
63
|
+
conditionalStyles.push(styles[gutterSize]);
|
|
62
64
|
break;
|
|
63
65
|
}
|
|
64
66
|
|
|
@@ -24,7 +24,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
24
24
|
|
|
25
25
|
var euiDescriptionListDescriptionStyles = function euiDescriptionListDescriptionStyles(euiThemeContext) {
|
|
26
26
|
var euiTheme = euiThemeContext.euiTheme;
|
|
27
|
-
var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "
|
|
27
|
+
var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n ");
|
|
28
28
|
return {
|
|
29
29
|
euiDescriptionList__description: /*#__PURE__*/(0, _react.css)(";label:euiDescriptionList__description;"),
|
|
30
30
|
// Types
|
|
@@ -44,7 +44,10 @@ var euiDescriptionListDescriptionStyles = function euiDescriptionListDescription
|
|
|
44
44
|
normal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:normal;")
|
|
45
45
|
},
|
|
46
46
|
// Column types should align description text to the left when EuiDecriptionList is centered
|
|
47
|
-
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
|
|
47
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
|
|
48
|
+
// Gutter
|
|
49
|
+
s: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), ";};label:s;"),
|
|
50
|
+
m: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:m;")
|
|
48
51
|
};
|
|
49
52
|
};
|
|
50
53
|
|
|
@@ -42,11 +42,12 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
42
42
|
type = _useContext.type,
|
|
43
43
|
textStyle = _useContext.textStyle,
|
|
44
44
|
compressed = _useContext.compressed,
|
|
45
|
-
align = _useContext.align
|
|
45
|
+
align = _useContext.align,
|
|
46
|
+
gutterSize = _useContext.gutterSize;
|
|
46
47
|
|
|
47
48
|
var theme = (0, _services.useEuiTheme)();
|
|
48
49
|
var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
|
|
49
|
-
var conditionalStyles = compressed && textStyle
|
|
50
|
+
var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
50
51
|
|
|
51
52
|
switch (type) {
|
|
52
53
|
case 'inline':
|
|
@@ -62,7 +63,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
62
63
|
break;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
var cssStyles = [styles.euiDescriptionList__title, styles[type]].concat((0, _toConsumableArray2.default)(conditionalStyles));
|
|
66
|
+
var cssStyles = [styles.euiDescriptionList__title, styles[type], styles[gutterSize]].concat((0, _toConsumableArray2.default)(conditionalStyles));
|
|
66
67
|
var classes = (0, _classnames.default)('euiDescriptionList__title', className);
|
|
67
68
|
return (0, _react2.jsx)("dt", (0, _extends2.default)({
|
|
68
69
|
className: classes,
|
|
@@ -23,9 +23,9 @@ var _title = require("../title/title.styles");
|
|
|
23
23
|
var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiThemeContext) {
|
|
24
24
|
var euiTheme = euiThemeContext.euiTheme,
|
|
25
25
|
colorMode = euiThemeContext.colorMode;
|
|
26
|
-
var columnDisplay = "\n
|
|
26
|
+
var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), "\n ");
|
|
27
27
|
return {
|
|
28
|
-
euiDescriptionList__title: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), "
|
|
28
|
+
euiDescriptionList__title: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";;label:euiDescriptionList__title;"),
|
|
29
29
|
// Types
|
|
30
30
|
row: /*#__PURE__*/(0, _react.css)(";label:row;"),
|
|
31
31
|
column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
|
|
@@ -43,7 +43,11 @@ var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiTh
|
|
|
43
43
|
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";", (0, _global_styling.logicalCSS)('padding-vertical', '0'), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
|
|
44
44
|
},
|
|
45
45
|
// Alignment
|
|
46
|
-
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;")
|
|
46
|
+
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;"),
|
|
47
|
+
// Gutter
|
|
48
|
+
// Add margin only to the non-first <dt>.
|
|
49
|
+
s: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), ";};label:s;"),
|
|
50
|
+
m: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:m;")
|
|
47
51
|
};
|
|
48
52
|
};
|
|
49
53
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TYPES = exports.TEXT_STYLES = exports.ALIGNMENTS = void 0;
|
|
6
|
+
exports.TYPES = exports.TEXT_STYLES = exports.GUTTER_SIZES = exports.ALIGNMENTS = void 0;
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -17,4 +17,6 @@ exports.TYPES = TYPES;
|
|
|
17
17
|
var ALIGNMENTS = ['center', 'left'];
|
|
18
18
|
exports.ALIGNMENTS = ALIGNMENTS;
|
|
19
19
|
var TEXT_STYLES = ['normal', 'reverse'];
|
|
20
|
-
exports.TEXT_STYLES = TEXT_STYLES;
|
|
20
|
+
exports.TEXT_STYLES = TEXT_STYLES;
|
|
21
|
+
var GUTTER_SIZES = ['s', 'm'];
|
|
22
|
+
exports.GUTTER_SIZES = GUTTER_SIZES;
|
|
@@ -90,26 +90,16 @@ var EuiFieldSearch = /*#__PURE__*/function (_Component) {
|
|
|
90
90
|
|
|
91
91
|
if (nativeInputValueSetter) {
|
|
92
92
|
nativeInputValueSetter.call(_this.inputElement, '');
|
|
93
|
-
} // dispatch input event
|
|
93
|
+
} // dispatch input event
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
var event
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
bubbles: true,
|
|
101
|
-
cancelable: false
|
|
102
|
-
});
|
|
103
|
-
} else {
|
|
104
|
-
// IE11
|
|
105
|
-
event = document.createEvent('Event');
|
|
106
|
-
event.initEvent('input', true, false);
|
|
107
|
-
}
|
|
96
|
+
var event = new Event('input', {
|
|
97
|
+
bubbles: true,
|
|
98
|
+
cancelable: false
|
|
99
|
+
});
|
|
108
100
|
|
|
109
101
|
if (_this.inputElement) {
|
|
110
|
-
|
|
111
|
-
_this.inputElement.dispatchEvent(event);
|
|
112
|
-
} // set focus on the search field
|
|
102
|
+
_this.inputElement.dispatchEvent(event); // set focus on the search field
|
|
113
103
|
|
|
114
104
|
|
|
115
105
|
_this.inputElement.focus();
|
|
@@ -35,7 +35,7 @@ var EuiRangeInput = function EuiRangeInput(_ref) {
|
|
|
35
35
|
_ref$autoSize = _ref.autoSize,
|
|
36
36
|
autoSize = _ref$autoSize === void 0 ? true : _ref$autoSize,
|
|
37
37
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
38
|
-
// Chrome will properly size the input based on the max value, but FF
|
|
38
|
+
// Chrome will properly size the input based on the max value, but FF does not.
|
|
39
39
|
// Calculate the width of the input based on highest number of characters.
|
|
40
40
|
// Add 2 to accommodate for input stepper
|
|
41
41
|
var widthStyle = autoSize ? {
|
|
@@ -30,10 +30,11 @@ var EuiHeaderSectionItem = function EuiHeaderSectionItem(_ref) {
|
|
|
30
30
|
children = _ref.children,
|
|
31
31
|
className = _ref.className,
|
|
32
32
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
33
|
-
var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className);
|
|
34
|
-
|
|
33
|
+
var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className); // we check if there is any children and if not, we don't render anything
|
|
34
|
+
|
|
35
|
+
return children ? (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
35
36
|
className: classes
|
|
36
|
-
}, rest), children);
|
|
37
|
+
}, rest), children) : null;
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
exports.EuiHeaderSectionItem = EuiHeaderSectionItem;
|