@elastic/eui 87.0.0 → 87.1.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/es/components/accordion/accordion.js +82 -35
- package/es/components/auto_sizer/index.js +1 -1
- package/es/components/breadcrumbs/breadcrumb.js +2 -3
- package/es/components/breadcrumbs/breadcrumbs.js +2 -3
- package/es/components/code/code_block_virtualized.js +25 -17
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +14 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +8 -7
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +6 -6
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +7 -7
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -6
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -9
- package/es/components/color_picker/color_palette_picker/color_palette_picker.js +1 -1
- package/es/components/control_bar/control_bar.js +2 -3
- package/es/components/date_picker/date_picker_range.js +5 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.js +2 -2
- package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +0 -1
- package/es/components/flyout/flyout.js +9 -7
- package/es/components/flyout/flyout_body.js +15 -3
- package/es/components/form/range/dual_range.js +33 -6
- package/es/components/form/range/range.js +31 -6
- package/es/components/form/super_select/super_select.js +1 -1
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +2 -3
- package/es/components/header/header_links/header_links.js +2 -3
- package/es/components/page/page_header/page_header_content.js +2 -3
- package/es/components/page/page_sidebar/page_sidebar.js +2 -2
- package/es/components/page_template/page_template.js +12 -4
- package/es/components/popover/input_popover.js +24 -9
- package/es/components/popover/popover.js +4 -6
- package/es/components/selectable/selectable_list/selectable_list.js +97 -79
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/components/tool_tip/tool_tip.js +4 -14
- package/es/components/tool_tip/tool_tip_anchor.js +5 -14
- package/es/components/tour/tour_step.js +2 -3
- package/eui.d.ts +85 -37
- package/i18ntokens.json +54 -36
- package/lib/components/accordion/accordion.js +82 -35
- package/lib/components/auto_sizer/index.js +11 -7
- package/lib/components/breadcrumbs/breadcrumb.js +2 -3
- package/lib/components/code/code_block_virtualized.js +25 -17
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +14 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +8 -7
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +6 -6
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +7 -7
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -6
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -9
- package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +1 -1
- package/lib/components/date_picker/date_picker_range.js +5 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +2 -2
- package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +0 -1
- package/lib/components/flyout/flyout.js +9 -7
- package/lib/components/flyout/flyout_body.js +15 -3
- package/lib/components/form/range/dual_range.js +33 -6
- package/lib/components/form/range/range.js +14 -6
- package/lib/components/form/super_select/super_select.js +1 -1
- package/lib/components/page/page_sidebar/page_sidebar.js +1 -1
- package/lib/components/page_template/page_template.js +12 -4
- package/lib/components/popover/input_popover.js +23 -8
- package/lib/components/popover/popover.js +4 -6
- package/lib/components/selectable/selectable_list/selectable_list.js +97 -79
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/components/tool_tip/tool_tip.js +4 -14
- package/lib/components/tool_tip/tool_tip_anchor.js +5 -13
- package/optimize/es/components/accordion/accordion.js +82 -35
- package/optimize/es/components/auto_sizer/index.js +1 -1
- package/optimize/es/components/code/code_block_virtualized.js +25 -17
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +5 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -1
- package/optimize/es/components/date_picker/date_picker_range.js +5 -2
- package/optimize/es/components/flyout/flyout.js +9 -7
- package/optimize/es/components/flyout/flyout_body.js +4 -2
- package/optimize/es/components/form/range/dual_range.js +7 -4
- package/optimize/es/components/form/range/range.js +5 -4
- package/optimize/es/components/page/page_sidebar/page_sidebar.js +2 -2
- package/optimize/es/components/page_template/page_template.js +12 -4
- package/optimize/es/components/popover/input_popover.js +13 -8
- package/optimize/es/components/popover/popover.js +2 -3
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +97 -79
- package/optimize/es/components/tool_tip/tool_tip.js +3 -13
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +4 -8
- package/optimize/lib/components/accordion/accordion.js +82 -35
- package/optimize/lib/components/auto_sizer/index.js +11 -7
- package/optimize/lib/components/code/code_block_virtualized.js +25 -17
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +5 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -1
- package/optimize/lib/components/date_picker/date_picker_range.js +5 -2
- package/optimize/lib/components/flyout/flyout.js +9 -7
- package/optimize/lib/components/flyout/flyout_body.js +4 -2
- package/optimize/lib/components/form/range/dual_range.js +7 -4
- package/optimize/lib/components/form/range/range.js +5 -4
- package/optimize/lib/components/page/page_sidebar/page_sidebar.js +1 -1
- package/optimize/lib/components/page_template/page_template.js +12 -4
- package/optimize/lib/components/popover/input_popover.js +12 -7
- package/optimize/lib/components/popover/popover.js +2 -3
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +97 -79
- package/optimize/lib/components/tool_tip/tool_tip.js +3 -13
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +4 -8
- package/package.json +7 -9
- package/test-env/components/accordion/accordion.js +82 -35
- package/test-env/components/auto_sizer/index.js +11 -7
- package/test-env/components/breadcrumbs/breadcrumb.js +2 -3
- package/test-env/components/code/code_block_virtualized.js +25 -17
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +14 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +8 -7
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +6 -6
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +7 -7
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -6
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -9
- package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +1 -1
- package/test-env/components/date_picker/date_picker_range.js +5 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +2 -2
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +0 -1
- package/test-env/components/flyout/flyout_body.js +15 -3
- package/test-env/components/form/range/dual_range.js +33 -6
- package/test-env/components/form/range/range.js +14 -6
- package/test-env/components/form/super_select/super_select.js +1 -1
- package/test-env/components/page/page_sidebar/page_sidebar.js +1 -1
- package/test-env/components/page_template/page_template.js +12 -4
- package/test-env/components/popover/input_popover.js +23 -8
- package/test-env/components/popover/popover.js +4 -6
- package/test-env/components/selectable/selectable_list/selectable_list.js +97 -79
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/components/tool_tip/tool_tip.js +4 -14
- package/test-env/components/tool_tip/tool_tip_anchor.js +5 -11
|
@@ -27,6 +27,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
27
27
|
import React, { Component } from 'react';
|
|
28
28
|
import PropTypes from "prop-types";
|
|
29
29
|
import classNames from 'classnames';
|
|
30
|
+
import { tabbable } from 'tabbable';
|
|
30
31
|
import { EuiLoadingSpinner } from '../loading';
|
|
31
32
|
import { EuiResizeObserver } from '../observer/resize_observer';
|
|
32
33
|
import { EuiText } from '../text';
|
|
@@ -49,33 +50,68 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
49
50
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
50
51
|
_defineProperty(_assertThisInitialized(_this), "childContent", null);
|
|
51
52
|
_defineProperty(_assertThisInitialized(_this), "childWrapper", null);
|
|
53
|
+
_defineProperty(_assertThisInitialized(_this), "tabbableChildren", null);
|
|
52
54
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
53
55
|
isOpen: _this.props.forceState ? _this.props.forceState === 'open' : _this.props.initialIsOpen
|
|
54
56
|
});
|
|
55
57
|
_defineProperty(_assertThisInitialized(_this), "setChildContentHeight", function () {
|
|
56
|
-
var forceState = _this.props.forceState;
|
|
57
58
|
requestAnimationFrame(function () {
|
|
58
|
-
var height = _this.childContent &&
|
|
59
|
+
var height = _this.childContent && _this.isOpen ? _this.childContent.clientHeight : 0;
|
|
59
60
|
_this.childWrapper && _this.childWrapper.setAttribute('style', logicalCSS('height', "".concat(height, "px")));
|
|
60
61
|
});
|
|
61
62
|
});
|
|
62
63
|
_defineProperty(_assertThisInitialized(_this), "onToggle", function () {
|
|
63
64
|
var forceState = _this.props.forceState;
|
|
64
65
|
if (forceState) {
|
|
65
|
-
_this
|
|
66
|
+
var _this$props$onToggle, _this$props;
|
|
67
|
+
(_this$props$onToggle = (_this$props = _this.props).onToggle) === null || _this$props$onToggle === void 0 ? void 0 : _this$props$onToggle.call(_this$props, forceState === 'open' ? false : true);
|
|
66
68
|
} else {
|
|
67
69
|
_this.setState(function (prevState) {
|
|
68
70
|
return {
|
|
69
71
|
isOpen: !prevState.isOpen
|
|
70
72
|
};
|
|
71
73
|
}, function () {
|
|
74
|
+
var _this$props$onToggle2, _this$props2;
|
|
72
75
|
if (_this.state.isOpen && _this.childWrapper) {
|
|
73
76
|
_this.childWrapper.focus();
|
|
74
77
|
}
|
|
75
|
-
_this.props.onToggle
|
|
78
|
+
(_this$props$onToggle2 = (_this$props2 = _this.props).onToggle) === null || _this$props$onToggle2 === void 0 ? void 0 : _this$props$onToggle2.call(_this$props2, _this.state.isOpen);
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
81
|
});
|
|
82
|
+
// When accordions are closed, tabbable children should not be present in the tab order
|
|
83
|
+
_defineProperty(_assertThisInitialized(_this), "preventTabbing", function () {
|
|
84
|
+
if (_this.childContent) {
|
|
85
|
+
// Re-check for children on every close - content can change dynamically
|
|
86
|
+
_this.tabbableChildren = tabbable(_this.childContent);
|
|
87
|
+
_this.tabbableChildren.forEach(function (element) {
|
|
88
|
+
// If the element has an existing `tabIndex` set, make sure we can restore it
|
|
89
|
+
var originalTabIndex = element.getAttribute('tabIndex');
|
|
90
|
+
if (originalTabIndex) {
|
|
91
|
+
element.setAttribute('data-original-tabindex', originalTabIndex);
|
|
92
|
+
}
|
|
93
|
+
element.setAttribute('tabIndex', '-1');
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
_defineProperty(_assertThisInitialized(_this), "enableTabbing", function () {
|
|
98
|
+
// If no tabbable children were set, we don't need to re-enable anything
|
|
99
|
+
if (_this.tabbableChildren) {
|
|
100
|
+
_this.tabbableChildren.forEach(function (element) {
|
|
101
|
+
var originalTabIndex = element.getAttribute('data-original-tabindex');
|
|
102
|
+
if (originalTabIndex) {
|
|
103
|
+
// If the element originally had an existing `tabIndex` set, restore it
|
|
104
|
+
element.setAttribute('tabIndex', originalTabIndex);
|
|
105
|
+
element.removeAttribute('data-original-tabindex');
|
|
106
|
+
} else {
|
|
107
|
+
// If not, remove the tabIndex property
|
|
108
|
+
element.removeAttribute('tabIndex');
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
// Cleanup - unset the list of children
|
|
112
|
+
_this.tabbableChildren = null;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
79
115
|
_defineProperty(_assertThisInitialized(_this), "setChildContentRef", function (node) {
|
|
80
116
|
_this.childContent = node;
|
|
81
117
|
});
|
|
@@ -90,44 +126,55 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
90
126
|
return _this;
|
|
91
127
|
}
|
|
92
128
|
_createClass(EuiAccordionClass, [{
|
|
129
|
+
key: "isOpen",
|
|
130
|
+
get: function get() {
|
|
131
|
+
return this.props.forceState ? this.props.forceState === 'open' : this.state.isOpen;
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
93
134
|
key: "componentDidMount",
|
|
94
135
|
value: function componentDidMount() {
|
|
95
136
|
this.setChildContentHeight();
|
|
137
|
+
if (!this.isOpen) this.preventTabbing();
|
|
96
138
|
}
|
|
97
139
|
}, {
|
|
98
140
|
key: "componentDidUpdate",
|
|
99
|
-
value: function componentDidUpdate() {
|
|
141
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
100
142
|
this.setChildContentHeight();
|
|
143
|
+
if (prevProps.forceState === 'open' && this.props.forceState === 'closed' || prevState.isOpen === true && this.state.isOpen === false) {
|
|
144
|
+
this.preventTabbing();
|
|
145
|
+
}
|
|
146
|
+
if (prevProps.forceState === 'closed' && this.props.forceState === 'open' || prevState.isOpen === false && this.state.isOpen === true) {
|
|
147
|
+
this.enableTabbing();
|
|
148
|
+
}
|
|
101
149
|
}
|
|
102
150
|
}, {
|
|
103
151
|
key: "render",
|
|
104
152
|
value: function render() {
|
|
105
153
|
var _buttonProps$id,
|
|
106
154
|
_this2 = this;
|
|
107
|
-
var _this$
|
|
108
|
-
children = _this$
|
|
109
|
-
buttonContent = _this$
|
|
110
|
-
className = _this$
|
|
111
|
-
id = _this$
|
|
112
|
-
_this$
|
|
113
|
-
Element = _this$
|
|
114
|
-
buttonClassName = _this$
|
|
115
|
-
buttonContentClassName = _this$
|
|
116
|
-
extraAction = _this$
|
|
117
|
-
paddingSize = _this$
|
|
118
|
-
initialIsOpen = _this$
|
|
119
|
-
arrowDisplay = _this$
|
|
120
|
-
forceState = _this$
|
|
121
|
-
isLoading = _this$
|
|
122
|
-
isLoadingMessage = _this$
|
|
123
|
-
isDisabled = _this$
|
|
124
|
-
buttonProps = _this$
|
|
125
|
-
_this$
|
|
126
|
-
_ButtonElement = _this$
|
|
127
|
-
arrowProps = _this$
|
|
128
|
-
theme = _this$
|
|
129
|
-
rest = _objectWithoutProperties(_this$
|
|
130
|
-
var isOpen = forceState ? forceState === 'open' : this.state.isOpen;
|
|
155
|
+
var _this$props3 = this.props,
|
|
156
|
+
children = _this$props3.children,
|
|
157
|
+
buttonContent = _this$props3.buttonContent,
|
|
158
|
+
className = _this$props3.className,
|
|
159
|
+
id = _this$props3.id,
|
|
160
|
+
_this$props3$element = _this$props3.element,
|
|
161
|
+
Element = _this$props3$element === void 0 ? 'div' : _this$props3$element,
|
|
162
|
+
buttonClassName = _this$props3.buttonClassName,
|
|
163
|
+
buttonContentClassName = _this$props3.buttonContentClassName,
|
|
164
|
+
extraAction = _this$props3.extraAction,
|
|
165
|
+
paddingSize = _this$props3.paddingSize,
|
|
166
|
+
initialIsOpen = _this$props3.initialIsOpen,
|
|
167
|
+
arrowDisplay = _this$props3.arrowDisplay,
|
|
168
|
+
forceState = _this$props3.forceState,
|
|
169
|
+
isLoading = _this$props3.isLoading,
|
|
170
|
+
isLoadingMessage = _this$props3.isLoadingMessage,
|
|
171
|
+
isDisabled = _this$props3.isDisabled,
|
|
172
|
+
buttonProps = _this$props3.buttonProps,
|
|
173
|
+
_this$props3$buttonEl = _this$props3.buttonElement,
|
|
174
|
+
_ButtonElement = _this$props3$buttonEl === void 0 ? 'button' : _this$props3$buttonEl,
|
|
175
|
+
arrowProps = _this$props3.arrowProps,
|
|
176
|
+
theme = _this$props3.theme,
|
|
177
|
+
rest = _objectWithoutProperties(_this$props3, _excluded);
|
|
131
178
|
|
|
132
179
|
// Force button element to be a legend if the element is a fieldset
|
|
133
180
|
var ButtonElement = Element === 'fieldset' ? 'legend' : _ButtonElement;
|
|
@@ -136,7 +183,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
136
183
|
// Force visibility of arrow button if button element is not focusable
|
|
137
184
|
var _arrowDisplay = arrowDisplay === 'none' && !buttonElementIsFocusable ? 'left' : arrowDisplay;
|
|
138
185
|
var classes = classNames('euiAccordion', {
|
|
139
|
-
'euiAccordion-isOpen': isOpen
|
|
186
|
+
'euiAccordion-isOpen': this.isOpen
|
|
140
187
|
}, className);
|
|
141
188
|
var childrenClasses = classNames('euiAccordion__children', {
|
|
142
189
|
'euiAccordion__children-isLoading': isLoading
|
|
@@ -144,7 +191,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
144
191
|
var buttonClasses = classNames('euiAccordion__button', buttonClassName, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.className);
|
|
145
192
|
var buttonContentClasses = classNames('euiAccordion__buttonContent', buttonContentClassName);
|
|
146
193
|
var iconButtonClasses = classNames('euiAccordion__iconButton', {
|
|
147
|
-
'euiAccordion__iconButton-isOpen': isOpen,
|
|
194
|
+
'euiAccordion__iconButton-isOpen': this.isOpen,
|
|
148
195
|
'euiAccordion__iconButton--right': _arrowDisplay === 'right'
|
|
149
196
|
}, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.className);
|
|
150
197
|
|
|
@@ -154,9 +201,9 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
154
201
|
var childrenStyles = euiAccordionChildrenStyles(theme);
|
|
155
202
|
var cssChildrenStyles = [childrenStyles.euiAccordion__children, isLoading && childrenStyles.isLoading, paddingSize && paddingSize !== 'none' && childrenStyles[paddingSize]];
|
|
156
203
|
var childWrapperStyles = euiAccordionChildWrapperStyles(theme);
|
|
157
|
-
var cssChildWrapperStyles = [childWrapperStyles.euiAccordion__childWrapper, isOpen && childWrapperStyles.isOpen];
|
|
204
|
+
var cssChildWrapperStyles = [childWrapperStyles.euiAccordion__childWrapper, this.isOpen && childWrapperStyles.isOpen];
|
|
158
205
|
var iconButtonStyles = euiAccordionIconButtonStyles(theme);
|
|
159
|
-
var cssIconButtonStyles = [iconButtonStyles.euiAccordion__iconButton, isOpen && iconButtonStyles.isOpen, _arrowDisplay === 'right' && iconButtonStyles.arrowRight, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.css];
|
|
206
|
+
var cssIconButtonStyles = [iconButtonStyles.euiAccordion__iconButton, this.isOpen && iconButtonStyles.isOpen, _arrowDisplay === 'right' && iconButtonStyles.arrowRight, arrowProps === null || arrowProps === void 0 ? void 0 : arrowProps.css];
|
|
160
207
|
var optionalActionStyles = euiAccordionOptionalActionStyles();
|
|
161
208
|
var cssOptionalActionStyles = [optionalActionStyles.euiAccordion__optionalAction];
|
|
162
209
|
var spinnerStyles = euiAccordionSpinnerStyles(theme);
|
|
@@ -174,7 +221,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
174
221
|
iconType: "arrowRight",
|
|
175
222
|
onClick: this.onToggle,
|
|
176
223
|
"aria-controls": id,
|
|
177
|
-
"aria-expanded": isOpen,
|
|
224
|
+
"aria-expanded": this.isOpen,
|
|
178
225
|
"aria-labelledby": buttonId,
|
|
179
226
|
tabIndex: buttonElementIsFocusable ? -1 : 0,
|
|
180
227
|
isDisabled: isDisabled
|
|
@@ -208,7 +255,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
208
255
|
"aria-controls": id
|
|
209
256
|
// `aria-expanded` is only a valid attribute on interactive controls - axe-core throws a violation otherwise
|
|
210
257
|
,
|
|
211
|
-
"aria-expanded": ButtonElement === 'button' ? isOpen : undefined,
|
|
258
|
+
"aria-expanded": ButtonElement === 'button' ? this.isOpen : undefined,
|
|
212
259
|
onClick: isDisabled ? undefined : this.onToggle,
|
|
213
260
|
type: ButtonElement === 'button' ? 'button' : undefined,
|
|
214
261
|
disabled: ButtonElement === 'button' ? isDisabled : undefined
|
|
@@ -185,9 +185,8 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
185
185
|
*/
|
|
186
186
|
anchorPosition: PropTypes.any,
|
|
187
187
|
/**
|
|
188
|
-
* Style and position alteration for arrow-less
|
|
189
|
-
*
|
|
190
|
-
* EuiInputPopover
|
|
188
|
+
* Style and position alteration for arrow-less attachment.
|
|
189
|
+
* Intended for use with inputs as anchors, e.g. EuiInputPopover
|
|
191
190
|
*/
|
|
192
191
|
attachToAnchor: PropTypes.bool,
|
|
193
192
|
buttonRef: PropTypes.any,
|
|
@@ -160,9 +160,8 @@ EuiBreadcrumbs.propTypes = {
|
|
|
160
160
|
*/
|
|
161
161
|
anchorPosition: PropTypes.any,
|
|
162
162
|
/**
|
|
163
|
-
* Style and position alteration for arrow-less
|
|
164
|
-
*
|
|
165
|
-
* EuiInputPopover
|
|
163
|
+
* Style and position alteration for arrow-less attachment.
|
|
164
|
+
* Intended for use with inputs as anchors, e.g. EuiInputPopover
|
|
166
165
|
*/
|
|
167
166
|
attachToAnchor: PropTypes.bool,
|
|
168
167
|
buttonRef: PropTypes.any,
|
|
@@ -45,26 +45,34 @@ export var EuiCodeBlockVirtualized = function EuiCodeBlockVirtualized(_ref) {
|
|
|
45
45
|
}, codeProps));
|
|
46
46
|
});
|
|
47
47
|
}, [codeProps]);
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
var virtualizationProps = {
|
|
49
|
+
itemData: data,
|
|
50
|
+
itemSize: rowHeight,
|
|
51
|
+
itemCount: data.length,
|
|
52
|
+
outerElementType: VirtualizedOuterElement,
|
|
53
|
+
innerElementType: VirtualizedInnerElement
|
|
54
|
+
};
|
|
55
|
+
return typeof overflowHeight === 'number' ? ___EmotionJSX(EuiAutoSizer, {
|
|
56
|
+
disableHeight: true
|
|
50
57
|
}, function (_ref4) {
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
var width = _ref4.width;
|
|
59
|
+
return ___EmotionJSX(FixedSizeList, _extends({
|
|
60
|
+
height: overflowHeight,
|
|
61
|
+
width: width
|
|
62
|
+
}, virtualizationProps), ListRow);
|
|
63
|
+
}) : ___EmotionJSX(EuiAutoSizer, null, function (_ref5) {
|
|
64
|
+
var height = _ref5.height,
|
|
65
|
+
width = _ref5.width;
|
|
66
|
+
return ___EmotionJSX(FixedSizeList, _extends({
|
|
67
|
+
height: height,
|
|
68
|
+
width: width
|
|
69
|
+
}, virtualizationProps), ListRow);
|
|
62
70
|
});
|
|
63
71
|
};
|
|
64
|
-
var ListRow = function ListRow(
|
|
65
|
-
var data =
|
|
66
|
-
index =
|
|
67
|
-
style =
|
|
72
|
+
var ListRow = function ListRow(_ref6) {
|
|
73
|
+
var data = _ref6.data,
|
|
74
|
+
index = _ref6.index,
|
|
75
|
+
style = _ref6.style;
|
|
68
76
|
var row = data[index];
|
|
69
77
|
row.properties.style = logicalStyles(style);
|
|
70
78
|
return nodeToHtml(row, index, data, 0);
|
|
@@ -32,6 +32,7 @@ import classNames from 'classnames';
|
|
|
32
32
|
import { useEuiTheme, useGeneratedHtmlId, throttle } from '../../services';
|
|
33
33
|
import { mathWithUnits, logicalStyle } from '../../global_styling';
|
|
34
34
|
import { EuiFlyout } from '../flyout';
|
|
35
|
+
import { useEuiI18n } from '../i18n';
|
|
35
36
|
import { euiHeaderVariables } from '../header/header.styles';
|
|
36
37
|
import { EuiCollapsibleNavContext } from './context';
|
|
37
38
|
import { EuiCollapsibleNavButton } from './collapsible_nav_button';
|
|
@@ -135,6 +136,7 @@ export var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
|
|
|
135
136
|
conditionalId: id,
|
|
136
137
|
suffix: 'euiCollapsibleNav'
|
|
137
138
|
});
|
|
139
|
+
var defaultAriaLabel = useEuiI18n('euiCollapsibleNavBeta.ariaLabel', 'Site menu');
|
|
138
140
|
var buttonRef = useRef(null);
|
|
139
141
|
var focusTrapProps = useMemo(function () {
|
|
140
142
|
return _objectSpread(_objectSpread({}, _focusTrapProps), {}, {
|
|
@@ -146,7 +148,9 @@ export var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
|
|
|
146
148
|
var cssStyles = [styles.euiCollapsibleNavBeta, styles[side], isPush && styles.isPush, isPush && isCollapsed && styles.isPushCollapsed, isOverlayFullWidth && styles.isOverlayFullWidth];
|
|
147
149
|
|
|
148
150
|
// Wait for any fixed headers to be queried before rendering (prevents position jumping)
|
|
149
|
-
var flyout = fixedHeadersCount !== false && ___EmotionJSX(EuiFlyout, _extends({
|
|
151
|
+
var flyout = fixedHeadersCount !== false && ___EmotionJSX(EuiFlyout, _extends({
|
|
152
|
+
"aria-label": defaultAriaLabel
|
|
153
|
+
}, rest, {
|
|
150
154
|
// EuiCollapsibleNav is significantly less permissive than EuiFlyout
|
|
151
155
|
id: flyoutID,
|
|
152
156
|
css: cssStyles,
|
|
@@ -177,6 +181,15 @@ export var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
|
|
|
177
181
|
};
|
|
178
182
|
EuiCollapsibleNavBeta.propTypes = {
|
|
179
183
|
className: PropTypes.string,
|
|
184
|
+
/**
|
|
185
|
+
* Overlay flyouts are considered dialogs, and dialogs must have a label.
|
|
186
|
+
* By default, a label of `Site menu` will be applied.
|
|
187
|
+
*
|
|
188
|
+
* If your usage of this component is not actually for site-wide navigation,
|
|
189
|
+
* please set your own `aria-label` or `aria-labelledby`.
|
|
190
|
+
*
|
|
191
|
+
* @default 'Site menu'
|
|
192
|
+
*/
|
|
180
193
|
"aria-label": PropTypes.string,
|
|
181
194
|
"data-test-subj": PropTypes.string,
|
|
182
195
|
css: PropTypes.any,
|
package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js
CHANGED
|
@@ -51,7 +51,8 @@ export var EuiCollapsedNavButton = function EuiCollapsedNavButton(_ref) {
|
|
|
51
51
|
size: "s",
|
|
52
52
|
color: "text",
|
|
53
53
|
href: href,
|
|
54
|
-
onClick: onClick
|
|
54
|
+
onClick: onClick,
|
|
55
|
+
"aria-label": title
|
|
55
56
|
}, linkProps, {
|
|
56
57
|
// Exclusive union shenanigans
|
|
57
58
|
className: buttonClassName,
|
|
@@ -63,11 +64,11 @@ export var EuiCollapsedNavButton = function EuiCollapsedNavButton(_ref) {
|
|
|
63
64
|
};
|
|
64
65
|
EuiCollapsedNavButton.propTypes = {
|
|
65
66
|
/**
|
|
66
|
-
*
|
|
67
|
+
* Required text to render as the nav item title
|
|
67
68
|
*/
|
|
68
|
-
title: PropTypes.
|
|
69
|
+
title: PropTypes.string.isRequired,
|
|
69
70
|
/**
|
|
70
|
-
* Allows customizing title
|
|
71
|
+
* Allows customizing the title element.
|
|
71
72
|
* Consider using a heading element for better accessibility.
|
|
72
73
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
73
74
|
*/
|
|
@@ -95,11 +96,11 @@ EuiCollapsedNavButton.propTypes = {
|
|
|
95
96
|
*/
|
|
96
97
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
97
98
|
/**
|
|
98
|
-
*
|
|
99
|
+
* Required text to render as the nav item title
|
|
99
100
|
*/
|
|
100
|
-
title: PropTypes.
|
|
101
|
+
title: PropTypes.string,
|
|
101
102
|
/**
|
|
102
|
-
* Allows customizing title
|
|
103
|
+
* Allows customizing the title element.
|
|
103
104
|
* Consider using a heading element for better accessibility.
|
|
104
105
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
105
106
|
*/
|
package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js
CHANGED
|
@@ -38,11 +38,11 @@ export var EuiCollapsedNavItem = function EuiCollapsedNavItem(_ref) {
|
|
|
38
38
|
};
|
|
39
39
|
EuiCollapsedNavItem.propTypes = {
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Required text to render as the nav item title
|
|
42
42
|
*/
|
|
43
|
-
title: PropTypes.
|
|
43
|
+
title: PropTypes.string.isRequired,
|
|
44
44
|
/**
|
|
45
|
-
* Allows customizing title
|
|
45
|
+
* Allows customizing the title element.
|
|
46
46
|
* Consider using a heading element for better accessibility.
|
|
47
47
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
48
48
|
*/
|
|
@@ -70,11 +70,11 @@ EuiCollapsedNavItem.propTypes = {
|
|
|
70
70
|
*/
|
|
71
71
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Required text to render as the nav item title
|
|
74
74
|
*/
|
|
75
|
-
title: PropTypes.
|
|
75
|
+
title: PropTypes.string,
|
|
76
76
|
/**
|
|
77
|
-
* Allows customizing title
|
|
77
|
+
* Allows customizing the title element.
|
|
78
78
|
* Consider using a heading element for better accessibility.
|
|
79
79
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
80
80
|
*/
|
package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js
CHANGED
|
@@ -83,11 +83,11 @@ export var EuiCollapsedNavPopover = function EuiCollapsedNavPopover(_ref) {
|
|
|
83
83
|
};
|
|
84
84
|
EuiCollapsedNavPopover.propTypes = {
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Required text to render as the nav item title
|
|
87
87
|
*/
|
|
88
|
-
title: PropTypes.
|
|
88
|
+
title: PropTypes.string.isRequired,
|
|
89
89
|
/**
|
|
90
|
-
* Allows customizing title
|
|
90
|
+
* Allows customizing the title element.
|
|
91
91
|
* Consider using a heading element for better accessibility.
|
|
92
92
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
93
93
|
*/
|
|
@@ -115,11 +115,11 @@ EuiCollapsedNavPopover.propTypes = {
|
|
|
115
115
|
*/
|
|
116
116
|
items: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Required text to render as the nav item title
|
|
119
119
|
*/
|
|
120
|
-
title: PropTypes.
|
|
120
|
+
title: PropTypes.string,
|
|
121
121
|
/**
|
|
122
|
-
* Allows customizing title
|
|
122
|
+
* Allows customizing the title element.
|
|
123
123
|
* Consider using a heading element for better accessibility.
|
|
124
124
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
125
125
|
*/
|
|
@@ -138,7 +138,7 @@ EuiCollapsedNavPopover.propTypes = {
|
|
|
138
138
|
*/
|
|
139
139
|
isGroupTitle: PropTypes.bool
|
|
140
140
|
}).isRequired), PropTypes.arrayOf(PropTypes.shape({
|
|
141
|
-
title: PropTypes.
|
|
141
|
+
title: PropTypes.string,
|
|
142
142
|
titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
|
|
143
143
|
icon: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "error", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
|
|
144
144
|
iconProps: PropTypes.any,
|
package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js
CHANGED
|
@@ -128,11 +128,11 @@ EuiCollapsibleNavAccordion.propTypes = {
|
|
|
128
128
|
// know for sure it's an actual accordion item and not a section heading
|
|
129
129
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Required text to render as the nav item title
|
|
132
132
|
*/
|
|
133
|
-
title: PropTypes.
|
|
133
|
+
title: PropTypes.string.isRequired,
|
|
134
134
|
/**
|
|
135
|
-
* Allows customizing title
|
|
135
|
+
* Allows customizing the title element.
|
|
136
136
|
* Consider using a heading element for better accessibility.
|
|
137
137
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
138
138
|
*/
|
|
@@ -160,11 +160,11 @@ EuiCollapsibleNavAccordion.propTypes = {
|
|
|
160
160
|
*/
|
|
161
161
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
162
162
|
/**
|
|
163
|
-
*
|
|
163
|
+
* Required text to render as the nav item title
|
|
164
164
|
*/
|
|
165
|
-
title: PropTypes.
|
|
165
|
+
title: PropTypes.string,
|
|
166
166
|
/**
|
|
167
|
-
* Allows customizing title
|
|
167
|
+
* Allows customizing the title element.
|
|
168
168
|
* Consider using a heading element for better accessibility.
|
|
169
169
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
170
170
|
*/
|
|
@@ -67,11 +67,11 @@ var EuiCollapsibleNavItemDisplay = function EuiCollapsibleNavItemDisplay(_ref) {
|
|
|
67
67
|
*/
|
|
68
68
|
EuiCollapsibleNavItemDisplay.propTypes = {
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* Required text to render as the nav item title
|
|
71
71
|
*/
|
|
72
|
-
title: PropTypes.
|
|
72
|
+
title: PropTypes.string.isRequired,
|
|
73
73
|
/**
|
|
74
|
-
* Allows customizing title
|
|
74
|
+
* Allows customizing the title element.
|
|
75
75
|
* Consider using a heading element for better accessibility.
|
|
76
76
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
77
77
|
*/
|
|
@@ -175,11 +175,11 @@ export var EuiCollapsibleNavSubItem = function EuiCollapsibleNavSubItem(_ref3) {
|
|
|
175
175
|
*/
|
|
176
176
|
EuiCollapsibleNavSubItem.propTypes = {
|
|
177
177
|
/**
|
|
178
|
-
*
|
|
178
|
+
* Required text to render as the nav item title
|
|
179
179
|
*/
|
|
180
|
-
title: PropTypes.
|
|
180
|
+
title: PropTypes.string,
|
|
181
181
|
/**
|
|
182
|
-
* Allows customizing title
|
|
182
|
+
* Allows customizing the title element.
|
|
183
183
|
* Consider using a heading element for better accessibility.
|
|
184
184
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
185
185
|
*/
|
|
@@ -247,11 +247,11 @@ export var EuiCollapsibleNavItem = function EuiCollapsibleNavItem(_ref4) {
|
|
|
247
247
|
};
|
|
248
248
|
EuiCollapsibleNavItem.propTypes = {
|
|
249
249
|
/**
|
|
250
|
-
*
|
|
250
|
+
* Required text to render as the nav item title
|
|
251
251
|
*/
|
|
252
|
-
title: PropTypes.
|
|
252
|
+
title: PropTypes.string.isRequired,
|
|
253
253
|
/**
|
|
254
|
-
* Allows customizing title
|
|
254
|
+
* Allows customizing the title element.
|
|
255
255
|
* Consider using a heading element for better accessibility.
|
|
256
256
|
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
257
257
|
*/
|
|
@@ -143,7 +143,7 @@ EuiColorPalettePicker.propTypes = {
|
|
|
143
143
|
*/
|
|
144
144
|
isOpen: PropTypes.bool,
|
|
145
145
|
/**
|
|
146
|
-
* Optional props to pass to the underlying [
|
|
146
|
+
* Optional props to pass to the underlying [EuiInputPopover](/#/layout/popover#popover-attached-to-input-element).
|
|
147
147
|
* Allows fine-grained control of the popover dropdown menu, including
|
|
148
148
|
* `repositionOnScroll` for EuiSuperSelects used within scrollable containers,
|
|
149
149
|
* and customizing popover panel styling.
|
|
@@ -390,9 +390,8 @@ EuiControlBar.propTypes = {
|
|
|
390
390
|
*/
|
|
391
391
|
anchorPosition: PropTypes.any,
|
|
392
392
|
/**
|
|
393
|
-
* Style and position alteration for arrow-less
|
|
394
|
-
*
|
|
395
|
-
* EuiInputPopover
|
|
393
|
+
* Style and position alteration for arrow-less attachment.
|
|
394
|
+
* Intended for use with inputs as anchors, e.g. EuiInputPopover
|
|
396
395
|
*/
|
|
397
396
|
attachToAnchor: PropTypes.bool,
|
|
398
397
|
buttonRef: PropTypes.any,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "startDateControl", "endDateControl", "iconType", "inline", "shadow", "fullWidth", "isCustom", "readOnly", "isLoading", "isInvalid", "disabled", "onFocus", "onBlur", "append", "prepend"];
|
|
1
|
+
var _excluded = ["children", "className", "startDateControl", "endDateControl", "iconType", "inline", "shadow", "fullWidth", "compressed", "isCustom", "readOnly", "isLoading", "isInvalid", "disabled", "onFocus", "onBlur", "append", "prepend"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -28,6 +28,7 @@ export var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
|
|
|
28
28
|
_ref$shadow = _ref.shadow,
|
|
29
29
|
shadow = _ref$shadow === void 0 ? true : _ref$shadow,
|
|
30
30
|
_fullWidth = _ref.fullWidth,
|
|
31
|
+
_compressed = _ref.compressed,
|
|
31
32
|
isCustom = _ref.isCustom,
|
|
32
33
|
readOnly = _ref.readOnly,
|
|
33
34
|
isLoading = _ref.isLoading,
|
|
@@ -38,8 +39,9 @@ export var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
|
|
|
38
39
|
append = _ref.append,
|
|
39
40
|
prepend = _ref.prepend,
|
|
40
41
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
-
// `fullWidth` should not affect inline datepickers (matches non-range behavior)
|
|
42
|
+
// `fullWidth` and `compressed` should not affect inline datepickers (matches non-range behavior)
|
|
42
43
|
var fullWidth = _fullWidth && !inline;
|
|
44
|
+
var compressed = _compressed && !inline;
|
|
43
45
|
var classes = classNames('euiDatePickerRange', className);
|
|
44
46
|
var euiTheme = useEuiTheme();
|
|
45
47
|
var styles = euiDatePickerRangeStyles(euiTheme);
|
|
@@ -111,6 +113,7 @@ export var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
|
|
|
111
113
|
startControl: startControl,
|
|
112
114
|
endControl: endControl,
|
|
113
115
|
fullWidth: fullWidth,
|
|
116
|
+
compressed: compressed,
|
|
114
117
|
readOnly: readOnly,
|
|
115
118
|
isDisabled: disabled,
|
|
116
119
|
isInvalid: isInvalid,
|
|
@@ -609,7 +609,7 @@ EuiSuperDatePickerInternal.propTypes = {
|
|
|
609
609
|
/**
|
|
610
610
|
* Common display alternatives for the anchor wrapper
|
|
611
611
|
*/
|
|
612
|
-
display: PropTypes.
|
|
612
|
+
display: PropTypes.any,
|
|
613
613
|
/**
|
|
614
614
|
* Delay before showing tooltip. Good for repeatable items.
|
|
615
615
|
*/
|
|
@@ -790,7 +790,7 @@ EuiSuperDatePicker.propTypes = {
|
|
|
790
790
|
children: PropTypes.element.isRequired,
|
|
791
791
|
className: PropTypes.string,
|
|
792
792
|
content: PropTypes.node,
|
|
793
|
-
display: PropTypes.
|
|
793
|
+
display: PropTypes.any,
|
|
794
794
|
delay: PropTypes.oneOf(["regular", "long"]).isRequired,
|
|
795
795
|
title: PropTypes.node,
|
|
796
796
|
id: PropTypes.string,
|
|
@@ -212,7 +212,7 @@ EuiSuperUpdateButton.propTypes = {
|
|
|
212
212
|
/**
|
|
213
213
|
* Common display alternatives for the anchor wrapper
|
|
214
214
|
*/
|
|
215
|
-
display: PropTypes.
|
|
215
|
+
display: PropTypes.any,
|
|
216
216
|
/**
|
|
217
217
|
* Delay before showing tooltip. Good for repeatable items.
|
|
218
218
|
*/
|