@elastic/eui 88.5.0 → 88.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +8 -21
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +8 -21
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +20 -6
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +4 -14
- package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +57 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +25 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +156 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +19 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_group/index.js +9 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -7
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +3 -7
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +4 -8
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +16 -63
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +2 -10
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +122 -41
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -3
- package/es/components/combo_box/combo_box.js +12 -25
- package/es/components/combo_box/combo_box_input/combo_box_input.js +61 -54
- package/es/components/text_truncate/index.js +1 -1
- package/es/components/text_truncate/utils.js +88 -138
- package/es/services/canvas/canvas_text_utils.js +64 -0
- package/es/services/canvas/index.js +9 -0
- package/es/services/index.js +1 -0
- package/eui.d.ts +186 -105
- package/i18ntokens.json +8 -8
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +20 -6
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +11 -19
- package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +67 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +33 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +166 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +26 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/index.js +12 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -7
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +3 -7
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +4 -8
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +14 -61
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -9
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +122 -39
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -4
- package/lib/components/combo_box/combo_box.js +12 -25
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +60 -53
- package/lib/components/text_truncate/index.js +0 -6
- package/lib/components/text_truncate/utils.js +97 -148
- package/lib/services/canvas/canvas_text_utils.js +70 -0
- package/lib/services/canvas/index.js +12 -0
- package/lib/services/index.js +8 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +17 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +4 -14
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +56 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +25 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +48 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +19 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/index.js +9 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -33
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +2 -10
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +54 -21
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -3
- package/optimize/es/components/combo_box/combo_box.js +12 -25
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +61 -53
- package/optimize/es/components/text_truncate/index.js +1 -1
- package/optimize/es/components/text_truncate/utils.js +87 -137
- package/optimize/es/services/canvas/canvas_text_utils.js +60 -0
- package/optimize/es/services/canvas/index.js +9 -0
- package/optimize/es/services/index.js +1 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +15 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +11 -19
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +66 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +33 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +58 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +26 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/index.js +12 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +5 -31
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -9
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +54 -20
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -4
- package/optimize/lib/components/combo_box/combo_box.js +12 -25
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +60 -52
- package/optimize/lib/components/text_truncate/index.js +0 -6
- package/optimize/lib/components/text_truncate/utils.js +96 -147
- package/optimize/lib/services/canvas/canvas_text_utils.js +67 -0
- package/optimize/lib/services/canvas/index.js +12 -0
- package/optimize/lib/services/index.js +8 -0
- package/package.json +2 -5
- package/src/components/combo_box/_combo_box.scss +12 -19
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +20 -6
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +11 -19
- package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +66 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +33 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +165 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +26 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/index.js +12 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -7
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +3 -7
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +4 -8
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +14 -61
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -9
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +122 -39
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -4
- package/test-env/components/combo_box/combo_box.js +12 -25
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +60 -53
- package/test-env/components/text_truncate/index.js +0 -6
- package/test-env/components/text_truncate/utils.js +96 -147
- package/test-env/services/canvas/canvas_text_utils.js +30 -0
- package/test-env/services/canvas/index.js +12 -0
- package/test-env/services/index.js +8 -0
|
@@ -36,8 +36,7 @@ import { euiHeaderVariables } from '../header/header.styles';
|
|
|
36
36
|
import { EuiCollapsibleNavContext } from './context';
|
|
37
37
|
import { EuiCollapsibleNavButton } from './collapsible_nav_button';
|
|
38
38
|
import { euiCollapsibleNavBetaStyles } from './collapsible_nav_beta.styles';
|
|
39
|
-
|
|
40
|
-
export var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
|
|
39
|
+
var _EuiCollapsibleNavBeta = function _EuiCollapsibleNavBeta(_ref) {
|
|
41
40
|
var id = _ref.id,
|
|
42
41
|
children = _ref.children,
|
|
43
42
|
className = _ref.className,
|
|
@@ -158,7 +157,11 @@ export var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
|
|
|
158
157
|
"aria-controls": flyoutID
|
|
159
158
|
}), !hideFlyout && flyout);
|
|
160
159
|
};
|
|
161
|
-
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Combined export with subcomponents
|
|
163
|
+
*/
|
|
164
|
+
_EuiCollapsibleNavBeta.propTypes = {
|
|
162
165
|
className: PropTypes.string,
|
|
163
166
|
/**
|
|
164
167
|
* Overlay flyouts are considered dialogs, and dialogs must have a label.
|
|
@@ -173,8 +176,9 @@ EuiCollapsibleNavBeta.propTypes = {
|
|
|
173
176
|
"data-test-subj": PropTypes.string,
|
|
174
177
|
css: PropTypes.any,
|
|
175
178
|
/**
|
|
176
|
-
* ReactNode(s) to render as navigation flyout content, typically `
|
|
177
|
-
* You
|
|
179
|
+
* ReactNode(s) to render as navigation flyout content, typically `EuiCollapsibleNavBeta.Item`s.
|
|
180
|
+
* You will likely want to use `EuiCollapsibleNavBeta.Body` and `EuiCollapsibleNavBeta.Footer`
|
|
181
|
+
* for organization.
|
|
178
182
|
*/
|
|
179
183
|
children: PropTypes.node,
|
|
180
184
|
/**
|
|
@@ -201,4 +205,14 @@ EuiCollapsibleNavBeta.propTypes = {
|
|
|
201
205
|
* take up the full width of the page.
|
|
202
206
|
*/
|
|
203
207
|
width: PropTypes.number
|
|
204
|
-
};
|
|
208
|
+
};
|
|
209
|
+
import { EuiCollapsibleNavBody, EuiCollapsibleNavFooter } from './collapsible_nav_body_footer';
|
|
210
|
+
import { EuiCollapsibleNavGroup } from './collapsible_nav_group';
|
|
211
|
+
import { EuiCollapsibleNavItem } from './collapsible_nav_item';
|
|
212
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
213
|
+
export var EuiCollapsibleNavBeta = Object.assign(_EuiCollapsibleNavBeta, {
|
|
214
|
+
Body: EuiCollapsibleNavBody,
|
|
215
|
+
Footer: EuiCollapsibleNavFooter,
|
|
216
|
+
Group: EuiCollapsibleNavGroup,
|
|
217
|
+
Item: EuiCollapsibleNavItem
|
|
218
|
+
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
1
|
/*
|
|
3
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -8,17 +7,10 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
9
|
import { css } from '@emotion/react';
|
|
11
|
-
import { logicalCSS
|
|
10
|
+
import { logicalCSS } from '../../global_styling';
|
|
12
11
|
import { euiShadowFlat } from '../../themes';
|
|
13
12
|
import { euiHeaderVariables } from '../header/header.styles';
|
|
14
|
-
|
|
15
|
-
name: "1adm1dw-isPushCollapsed",
|
|
16
|
-
styles: "&,.euiFlyoutBody__overflow{scrollbar-width:none;&::-webkit-scrollbar{display:none;}};label:isPushCollapsed;"
|
|
17
|
-
} : {
|
|
18
|
-
name: "1adm1dw-isPushCollapsed",
|
|
19
|
-
styles: "&,.euiFlyoutBody__overflow{scrollbar-width:none;&::-webkit-scrollbar{display:none;}};label:isPushCollapsed;",
|
|
20
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
-
};
|
|
13
|
+
import { euiCollapsibleNavBodyStyles } from './collapsible_nav_body_footer.styles';
|
|
22
14
|
export var euiCollapsibleNavBetaStyles = function euiCollapsibleNavBetaStyles(euiThemeContext) {
|
|
23
15
|
var euiTheme = euiThemeContext.euiTheme;
|
|
24
16
|
|
|
@@ -28,13 +20,11 @@ export var euiCollapsibleNavBetaStyles = function euiCollapsibleNavBetaStyles(eu
|
|
|
28
20
|
var defaultHeaderHeight = euiHeaderVariables(euiThemeContext).height;
|
|
29
21
|
var fixedHeaderOffset = "var(--euiFixedHeadersOffset, ".concat(defaultHeaderHeight, ")");
|
|
30
22
|
return {
|
|
31
|
-
euiCollapsibleNavBeta: /*#__PURE__*/css(logicalCSS('top', fixedHeaderOffset),
|
|
32
|
-
height: 'inherit'
|
|
33
|
-
}), logicalCSS('padding-bottom', euiTheme.size.xs), ".euiFlyoutBody{", logicalCSS('min-height', '50%'), ";}.euiFlyoutFooter{background-color:", euiTheme.colors.emptyShade, ";", logicalCSS('border-top', euiTheme.border.thin), ";};label:euiCollapsibleNavBeta;"),
|
|
23
|
+
euiCollapsibleNavBeta: /*#__PURE__*/css(logicalCSS('top', fixedHeaderOffset), logicalCSS('padding-bottom', euiTheme.size.xs), ";;label:euiCollapsibleNavBeta;"),
|
|
34
24
|
left: /*#__PURE__*/css(logicalCSS('border-right', euiTheme.border.thin), ";;label:left;"),
|
|
35
25
|
right: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thin), ";;label:right;"),
|
|
36
26
|
isPush: /*#__PURE__*/css(euiShadowFlat(euiThemeContext), ";;label:isPush;"),
|
|
37
|
-
isPushCollapsed:
|
|
27
|
+
isPushCollapsed: /*#__PURE__*/css(euiCollapsibleNavBodyStyles._isPushCollapsed, ";;label:isPushCollapsed;"),
|
|
38
28
|
isOverlayFullWidth: /*#__PURE__*/css("&.euiFlyout{", logicalCSS('max-width', '100% !important'), ";};label:isOverlayFullWidth;")
|
|
39
29
|
};
|
|
40
30
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var _excluded = ["className"],
|
|
2
|
+
_excluded2 = ["className"];
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
/*
|
|
7
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
8
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
9
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
10
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
11
|
+
* Side Public License, v 1.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import React, { useContext } from 'react';
|
|
15
|
+
import classNames from 'classnames';
|
|
16
|
+
import { useEuiTheme } from '../../services';
|
|
17
|
+
import { EuiFlyoutBody, EuiFlyoutFooter } from '../flyout';
|
|
18
|
+
import { EuiCollapsibleNavContext } from './context';
|
|
19
|
+
import { euiCollapsibleNavBodyStyles as bodyStyles, euiCollapsibleNavFooterStyles } from './collapsible_nav_body_footer.styles';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* These components are incredibly light wrappers around `EuiFlyoutBody`
|
|
23
|
+
* and `EuiFlyoutFooter` with collapsible nav-specific styling/considerations.
|
|
24
|
+
*
|
|
25
|
+
* Note: They are not intended to be used standalone outside of EuiCollapsibleNav
|
|
26
|
+
*/
|
|
27
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
|
+
export var EuiCollapsibleNavBody = function EuiCollapsibleNavBody(_ref) {
|
|
29
|
+
var className = _ref.className,
|
|
30
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var classes = classNames('euiCollapsibleNav__body', className);
|
|
32
|
+
var _useContext = useContext(EuiCollapsibleNavContext),
|
|
33
|
+
isCollapsed = _useContext.isCollapsed,
|
|
34
|
+
isPush = _useContext.isPush;
|
|
35
|
+
var cssStyles = [bodyStyles.euiCollapsibleNav__body, isCollapsed && isPush && bodyStyles.isPushCollapsed];
|
|
36
|
+
return ___EmotionJSX(EuiFlyoutBody, _extends({
|
|
37
|
+
className: classes,
|
|
38
|
+
css: cssStyles
|
|
39
|
+
// Since this is a nav, we can almost guarantee there will be clickable
|
|
40
|
+
// children/links that will enable scrolling. As such, we're optimistically
|
|
41
|
+
// removing the extra tab stop
|
|
42
|
+
,
|
|
43
|
+
scrollableTabIndex: -1
|
|
44
|
+
}, props));
|
|
45
|
+
};
|
|
46
|
+
export var EuiCollapsibleNavFooter = function EuiCollapsibleNavFooter(_ref2) {
|
|
47
|
+
var className = _ref2.className,
|
|
48
|
+
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
49
|
+
var classes = classNames('euiCollapsibleNav__footer', className);
|
|
50
|
+
var euiTheme = useEuiTheme();
|
|
51
|
+
var styles = euiCollapsibleNavFooterStyles(euiTheme);
|
|
52
|
+
var cssStyles = [styles.euiCollapsibleNav__footer];
|
|
53
|
+
return ___EmotionJSX(EuiFlyoutFooter, _extends({
|
|
54
|
+
className: classes,
|
|
55
|
+
css: cssStyles
|
|
56
|
+
}, props));
|
|
57
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { logicalCSS } from '../../global_styling';
|
|
11
|
+
export var euiCollapsibleNavBodyStyles = {
|
|
12
|
+
// In case things get really dire responsively, ensure the footer doesn't overtake the body
|
|
13
|
+
euiCollapsibleNav__body: /*#__PURE__*/css(logicalCSS('min-height', '50%'), ";;label:euiCollapsibleNav__body;"),
|
|
14
|
+
get isPushCollapsed() {
|
|
15
|
+
return /*#__PURE__*/css(".euiFlyoutBody__overflow{", this._isPushCollapsed, ";};label:isPushCollapsed;");
|
|
16
|
+
},
|
|
17
|
+
// CSS is reused by main euiCollapsibleNav styles in case the body component isn't used
|
|
18
|
+
_isPushCollapsed: "\n /* Hide the scrollbar for docked mode (while still keeping the nav scrollable)\n Otherwise if scrollbars are visible, button icon visibility suffers. */\n scrollbar-width: none; /* Firefox */\n\n &::-webkit-scrollbar {\n display: none; /* Chrome, Edge, & Safari */\n }\n "
|
|
19
|
+
};
|
|
20
|
+
export var euiCollapsibleNavFooterStyles = function euiCollapsibleNavFooterStyles(_ref) {
|
|
21
|
+
var euiTheme = _ref.euiTheme;
|
|
22
|
+
return {
|
|
23
|
+
euiCollapsibleNav__footer: /*#__PURE__*/css("background-color:", euiTheme.colors.emptyShade, ";", logicalCSS('border-top', euiTheme.border.thin), ";;label:euiCollapsibleNav__footer;")
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
var _excluded = ["items", "className", "wrapperProps"];
|
|
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
|
+
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
|
+
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; }
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import React, { useContext } from 'react';
|
|
14
|
+
import PropTypes from "prop-types";
|
|
15
|
+
import classNames from 'classnames';
|
|
16
|
+
import { useEuiTheme } from '../../../services';
|
|
17
|
+
import { EuiCollapsibleNavContext } from '../context';
|
|
18
|
+
import { EuiCollapsibleNavItem, EuiCollapsibleNavSubItems } from '../collapsible_nav_item/collapsible_nav_item';
|
|
19
|
+
import { EuiCollapsedNavPopover } from '../collapsible_nav_item/collapsed/collapsed_nav_popover';
|
|
20
|
+
import { euiCollapsibleNavGroupStyles } from './collapsible_nav_group.styles';
|
|
21
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
|
+
/**
|
|
23
|
+
* This component should only ever be used as a **top-level component**, and not as a sub-item.
|
|
24
|
+
* It also should **not** be used in the nav footer.
|
|
25
|
+
*/
|
|
26
|
+
export var EuiCollapsibleNavGroup = function EuiCollapsibleNavGroup(_ref) {
|
|
27
|
+
var items = _ref.items,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
wrapperProps = _ref.wrapperProps,
|
|
30
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var _useContext = useContext(EuiCollapsibleNavContext),
|
|
32
|
+
isCollapsed = _useContext.isCollapsed,
|
|
33
|
+
isPush = _useContext.isPush;
|
|
34
|
+
var classes = classNames('euiCollapsibleNavGroup', className, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.className);
|
|
35
|
+
var euiTheme = useEuiTheme();
|
|
36
|
+
var styles = euiCollapsibleNavGroupStyles(euiTheme);
|
|
37
|
+
var cssStyles = [styles.euiCollapsibleNavGroup, isPush && isCollapsed ? styles.euiCollapsibleNavGroup__title : styles.isWrapper, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.css];
|
|
38
|
+
return ___EmotionJSX("div", _extends({}, wrapperProps, {
|
|
39
|
+
className: classes,
|
|
40
|
+
css: cssStyles
|
|
41
|
+
}), isCollapsed && isPush ? ___EmotionJSX(EuiCollapsedNavPopover, _extends({
|
|
42
|
+
className: classes,
|
|
43
|
+
items: items
|
|
44
|
+
}, props)) : ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiCollapsibleNavItem, _extends({}, props, {
|
|
45
|
+
css: styles.euiCollapsibleNavGroup__title
|
|
46
|
+
})), ___EmotionJSX(EuiCollapsibleNavSubItems, {
|
|
47
|
+
items: items,
|
|
48
|
+
isGroup: true
|
|
49
|
+
})));
|
|
50
|
+
};
|
|
51
|
+
EuiCollapsibleNavGroup.propTypes = {
|
|
52
|
+
/**
|
|
53
|
+
* Required text to render as the nav item title
|
|
54
|
+
*/
|
|
55
|
+
title: PropTypes.string.isRequired,
|
|
56
|
+
/**
|
|
57
|
+
* Allows customizing the title element.
|
|
58
|
+
* Consider using a heading element for better accessibility.
|
|
59
|
+
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
60
|
+
*/
|
|
61
|
+
titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
|
|
62
|
+
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", "grabOmnidirectional", "gradient", "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", "palette", "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", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "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]),
|
|
63
|
+
/**
|
|
64
|
+
* Optional props to pass to the title icon
|
|
65
|
+
*/
|
|
66
|
+
iconProps: PropTypes.any,
|
|
67
|
+
className: PropTypes.string,
|
|
68
|
+
"aria-label": PropTypes.string,
|
|
69
|
+
"data-test-subj": PropTypes.string,
|
|
70
|
+
css: PropTypes.any,
|
|
71
|
+
/**
|
|
72
|
+
* The nav item link.
|
|
73
|
+
* If not included, and no `onClick` is specified, the nav item
|
|
74
|
+
* will render as an non-interactive `<span>`.
|
|
75
|
+
*/
|
|
76
|
+
href: PropTypes.string,
|
|
77
|
+
/**
|
|
78
|
+
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
79
|
+
*/
|
|
80
|
+
linkProps: PropTypes.any,
|
|
81
|
+
/**
|
|
82
|
+
* Highlights whether an item is currently selected, e.g.
|
|
83
|
+
* if the user is on the same page as the nav link
|
|
84
|
+
*/
|
|
85
|
+
isSelected: PropTypes.bool,
|
|
86
|
+
/**
|
|
87
|
+
* Will render an array of `EuiCollapsibleNavItems`.
|
|
88
|
+
*
|
|
89
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
90
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
91
|
+
*/
|
|
92
|
+
items: PropTypes.arrayOf(PropTypes.shape({
|
|
93
|
+
/**
|
|
94
|
+
* Required text to render as the nav item title
|
|
95
|
+
*/
|
|
96
|
+
title: PropTypes.string,
|
|
97
|
+
/**
|
|
98
|
+
* Allows customizing the title element.
|
|
99
|
+
* Consider using a heading element for better accessibility.
|
|
100
|
+
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
101
|
+
*/
|
|
102
|
+
titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
|
|
103
|
+
/**
|
|
104
|
+
* Optional icon to render to the left of title content
|
|
105
|
+
*/
|
|
106
|
+
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", "grabOmnidirectional", "gradient", "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", "palette", "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", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "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]),
|
|
107
|
+
/**
|
|
108
|
+
* Optional props to pass to the title icon
|
|
109
|
+
*/
|
|
110
|
+
iconProps: PropTypes.any,
|
|
111
|
+
className: PropTypes.string,
|
|
112
|
+
"aria-label": PropTypes.string,
|
|
113
|
+
"data-test-subj": PropTypes.string,
|
|
114
|
+
css: PropTypes.any,
|
|
115
|
+
/**
|
|
116
|
+
* The nav item link.
|
|
117
|
+
* If not included, and no `onClick` is specified, the nav item
|
|
118
|
+
* will render as an non-interactive `<span>`.
|
|
119
|
+
*/
|
|
120
|
+
href: PropTypes.string,
|
|
121
|
+
/**
|
|
122
|
+
* When passed, an `EuiAccordion` with nested child item links will be rendered.
|
|
123
|
+
*
|
|
124
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
125
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
126
|
+
*/
|
|
127
|
+
items: PropTypes.arrayOf(PropTypes.shape({
|
|
128
|
+
renderItem: PropTypes.func
|
|
129
|
+
}).isRequired),
|
|
130
|
+
/**
|
|
131
|
+
* If `items` is specified, use this prop to pass any prop that `EuiAccordion`
|
|
132
|
+
* accepts, including props that control the toggled state of the accordion
|
|
133
|
+
* (e.g. `initialIsOpen`, `forceState`)
|
|
134
|
+
*/
|
|
135
|
+
accordionProps: PropTypes.any,
|
|
136
|
+
/**
|
|
137
|
+
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
138
|
+
*/
|
|
139
|
+
linkProps: PropTypes.any,
|
|
140
|
+
/**
|
|
141
|
+
* Highlights whether an item is currently selected, e.g.
|
|
142
|
+
* if the user is on the same page as the nav link
|
|
143
|
+
*/
|
|
144
|
+
isSelected: PropTypes.bool,
|
|
145
|
+
renderItem: PropTypes.func
|
|
146
|
+
}).isRequired).isRequired,
|
|
147
|
+
/**
|
|
148
|
+
* Optional props to pass to the wrapping div
|
|
149
|
+
*/
|
|
150
|
+
wrapperProps: PropTypes.shape({
|
|
151
|
+
className: PropTypes.string,
|
|
152
|
+
"aria-label": PropTypes.string,
|
|
153
|
+
"data-test-subj": PropTypes.string,
|
|
154
|
+
css: PropTypes.any
|
|
155
|
+
})
|
|
156
|
+
};
|
package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { euiCollapsibleNavItemVariables } from '../collapsible_nav_item/collapsible_nav_item.styles';
|
|
11
|
+
export var euiCollapsibleNavGroupStyles = function euiCollapsibleNavGroupStyles(euiThemeContext) {
|
|
12
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
13
|
+
var sharedStyles = euiCollapsibleNavItemVariables(euiThemeContext);
|
|
14
|
+
return {
|
|
15
|
+
euiCollapsibleNavGroup: /*#__PURE__*/css(";label:euiCollapsibleNavGroup;"),
|
|
16
|
+
isWrapper: /*#__PURE__*/css("margin:", sharedStyles.padding, ";;label:isWrapper;"),
|
|
17
|
+
euiCollapsibleNavGroup__title: /*#__PURE__*/css("margin-block:", euiTheme.size.base, ";margin-inline:0;.euiIcon{transform:scale(1.25);};label:euiCollapsibleNavGroup__title;")
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { EuiCollapsibleNavGroup } from './collapsible_nav_group';
|
package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js
CHANGED
|
@@ -91,8 +91,8 @@ EuiCollapsedNavButton.propTypes = {
|
|
|
91
91
|
/**
|
|
92
92
|
* When passed, an `EuiAccordion` with nested child item links will be rendered.
|
|
93
93
|
*
|
|
94
|
-
* Accepts any #
|
|
95
|
-
*
|
|
94
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
95
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
96
96
|
*/
|
|
97
97
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
98
98
|
/**
|
|
@@ -113,11 +113,7 @@ EuiCollapsedNavButton.propTypes = {
|
|
|
113
113
|
* Optional props to pass to the title icon
|
|
114
114
|
*/
|
|
115
115
|
iconProps: PropTypes.any,
|
|
116
|
-
|
|
117
|
-
* Pass this flag to seperate links by group title headings.
|
|
118
|
-
* Strongly consider using the `titleElement` prop for accessibility.
|
|
119
|
-
*/
|
|
120
|
-
isGroupTitle: PropTypes.bool
|
|
116
|
+
renderItem: PropTypes.func
|
|
121
117
|
}).isRequired),
|
|
122
118
|
/**
|
|
123
119
|
* If `items` is specified, use this prop to pass any prop that `EuiAccordion`
|
package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js
CHANGED
|
@@ -65,8 +65,8 @@ EuiCollapsedNavItem.propTypes = {
|
|
|
65
65
|
/**
|
|
66
66
|
* When passed, an `EuiAccordion` with nested child item links will be rendered.
|
|
67
67
|
*
|
|
68
|
-
* Accepts any #
|
|
69
|
-
*
|
|
68
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
69
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
70
70
|
*/
|
|
71
71
|
items: PropTypes.arrayOf(PropTypes.shape({
|
|
72
72
|
/**
|
|
@@ -87,11 +87,7 @@ EuiCollapsedNavItem.propTypes = {
|
|
|
87
87
|
* Optional props to pass to the title icon
|
|
88
88
|
*/
|
|
89
89
|
iconProps: PropTypes.any,
|
|
90
|
-
|
|
91
|
-
* Pass this flag to seperate links by group title headings.
|
|
92
|
-
* Strongly consider using the `titleElement` prop for accessibility.
|
|
93
|
-
*/
|
|
94
|
-
isGroupTitle: PropTypes.bool
|
|
90
|
+
renderItem: PropTypes.func
|
|
95
91
|
}).isRequired),
|
|
96
92
|
/**
|
|
97
93
|
* If `items` is specified, use this prop to pass any prop that `EuiAccordion`
|
package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js
CHANGED
|
@@ -110,8 +110,8 @@ EuiCollapsedNavPopover.propTypes = {
|
|
|
110
110
|
/**
|
|
111
111
|
* When passed, an `EuiAccordion` with nested child item links will be rendered.
|
|
112
112
|
*
|
|
113
|
-
* Accepts any #
|
|
114
|
-
*
|
|
113
|
+
* Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
|
|
114
|
+
* subitem content, pass an object with a `renderItem` callback.
|
|
115
115
|
*/
|
|
116
116
|
items: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
|
|
117
117
|
/**
|
|
@@ -132,17 +132,13 @@ EuiCollapsedNavPopover.propTypes = {
|
|
|
132
132
|
* Optional props to pass to the title icon
|
|
133
133
|
*/
|
|
134
134
|
iconProps: PropTypes.any,
|
|
135
|
-
|
|
136
|
-
* Pass this flag to seperate links by group title headings.
|
|
137
|
-
* Strongly consider using the `titleElement` prop for accessibility.
|
|
138
|
-
*/
|
|
139
|
-
isGroupTitle: PropTypes.bool
|
|
135
|
+
renderItem: PropTypes.func
|
|
140
136
|
}).isRequired), PropTypes.arrayOf(PropTypes.shape({
|
|
141
137
|
title: PropTypes.string,
|
|
142
138
|
titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
|
|
143
139
|
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", "grabOmnidirectional", "gradient", "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", "palette", "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", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "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
140
|
iconProps: PropTypes.any,
|
|
145
|
-
|
|
141
|
+
renderItem: PropTypes.func
|
|
146
142
|
}).isRequired).isRequired]),
|
|
147
143
|
/**
|
|
148
144
|
* If `items` is specified, use this prop to pass any prop that `EuiAccordion`
|