@elastic/eui 85.0.0 → 85.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/dist/eui_charts_theme.js +13 -16
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +47 -90
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +47 -90
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +26 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +16 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +202 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +33 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +296 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +58 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +93 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.styles.js +28 -0
- package/es/components/collapsible_nav_beta/collapsible_nav_item/index.js +9 -0
- package/es/components/collapsible_nav_beta/index.js +15 -0
- package/es/components/color_picker/saturation.js +2 -1
- package/es/components/combo_box/combo_box_input/combo_box_input.js +7 -1
- package/es/components/combo_box/combo_box_input/combo_box_pill.js +16 -4
- package/es/components/combo_box/combo_box_options_list/combo_box_option.js +4 -0
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +21 -3
- package/es/components/error_boundary/error_boundary.js +1 -1
- package/es/components/filter_group/filter_group.styles.js +2 -2
- package/es/components/filter_group/filter_select_item.js +31 -15
- package/es/components/filter_group/filter_select_item.styles.js +19 -0
- package/es/components/form/range/range_highlight.js +1 -0
- package/es/components/highlight/highlight.js +4 -4
- package/es/components/index.js +1 -0
- package/es/components/inline_edit/inline_edit_form.js +2 -1
- package/es/components/markdown_editor/markdown_editor.js +2 -2
- package/es/themes/amsterdam/global_styling/variables/_states.js +13 -16
- package/eui.d.ts +362 -129
- package/i18ntokens.json +50 -50
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +30 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +23 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +211 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +40 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +304 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +63 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +100 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.styles.js +35 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/index.js +12 -0
- package/lib/components/collapsible_nav_beta/index.js +19 -0
- package/lib/components/color_picker/saturation.js +2 -1
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +7 -1
- package/lib/components/combo_box/combo_box_input/combo_box_pill.js +16 -4
- package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +4 -0
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +21 -3
- package/lib/components/error_boundary/error_boundary.js +1 -1
- package/lib/components/filter_group/filter_group.styles.js +1 -1
- package/lib/components/filter_group/filter_select_item.js +33 -17
- package/lib/components/filter_group/filter_select_item.styles.js +26 -0
- package/lib/components/form/range/range_highlight.js +1 -0
- package/lib/components/highlight/highlight.js +4 -4
- package/lib/components/index.js +11 -0
- package/lib/components/inline_edit/inline_edit_form.js +2 -1
- package/lib/components/markdown_editor/markdown_editor.js +2 -2
- package/lib/themes/amsterdam/global_styling/variables/_states.js +13 -16
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +26 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +16 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +113 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +33 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +117 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +55 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +59 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.styles.js +28 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/index.js +9 -0
- package/optimize/es/components/collapsible_nav_beta/index.js +15 -0
- package/optimize/es/components/color_picker/saturation.js +2 -1
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +3 -1
- package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +12 -4
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +9 -3
- package/optimize/es/components/error_boundary/error_boundary.js +1 -1
- package/optimize/es/components/filter_group/filter_group.styles.js +2 -2
- package/optimize/es/components/filter_group/filter_select_item.js +30 -14
- package/optimize/es/components/filter_group/filter_select_item.styles.js +19 -0
- package/optimize/es/components/form/range/range_highlight.js +1 -0
- package/optimize/es/components/highlight/highlight.js +4 -4
- package/optimize/es/components/index.js +1 -0
- package/optimize/es/components/inline_edit/inline_edit_form.js +2 -1
- package/optimize/es/components/markdown_editor/markdown_editor.js +2 -2
- package/optimize/es/themes/amsterdam/global_styling/variables/_states.js +13 -16
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +33 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +23 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +123 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +40 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +124 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +61 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +66 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.styles.js +35 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/index.js +12 -0
- package/optimize/lib/components/collapsible_nav_beta/index.js +19 -0
- package/optimize/lib/components/color_picker/saturation.js +2 -1
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +3 -1
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +12 -4
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +9 -3
- package/optimize/lib/components/error_boundary/error_boundary.js +1 -1
- package/optimize/lib/components/filter_group/filter_group.styles.js +1 -1
- package/optimize/lib/components/filter_group/filter_select_item.js +32 -16
- package/optimize/lib/components/filter_group/filter_select_item.styles.js +26 -0
- package/optimize/lib/components/form/range/range_highlight.js +1 -0
- package/optimize/lib/components/highlight/highlight.js +4 -4
- package/optimize/lib/components/index.js +11 -0
- package/optimize/lib/components/inline_edit/inline_edit_form.js +2 -1
- package/optimize/lib/components/markdown_editor/markdown_editor.js +2 -2
- package/optimize/lib/themes/amsterdam/global_styling/variables/_states.js +13 -16
- package/package.json +1 -1
- package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +24 -3
- package/src/components/combo_box/combo_box_options_list/_combo_box_option.scss +34 -14
- package/src/components/index.scss +0 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +33 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +23 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +208 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +40 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +303 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +61 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +96 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.styles.js +35 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/index.js +12 -0
- package/test-env/components/collapsible_nav_beta/index.js +19 -0
- package/test-env/components/color_picker/saturation.js +2 -1
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +7 -1
- package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +16 -4
- package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +4 -0
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +21 -3
- package/test-env/components/error_boundary/error_boundary.js +1 -1
- package/test-env/components/filter_group/filter_group.styles.js +1 -1
- package/test-env/components/filter_group/filter_select_item.js +33 -17
- package/test-env/components/filter_group/filter_select_item.styles.js +26 -0
- package/test-env/components/form/range/range_highlight.js +1 -0
- package/test-env/components/highlight/highlight.js +4 -4
- package/test-env/components/index.js +11 -0
- package/test-env/components/inline_edit/inline_edit_form.js +2 -1
- package/test-env/components/markdown_editor/markdown_editor.js +2 -2
- package/test-env/themes/amsterdam/global_styling/variables/_states.js +13 -16
- package/src/components/filter_group/_filter_select_item.scss +0 -43
- package/src/components/filter_group/_index.scss +0 -1
package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.EuiCollapsibleNavAccordion = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
var _services = require("../../../services");
|
|
16
|
+
var _accordion = require("../../accordion");
|
|
17
|
+
var _collapsible_nav_item = require("./collapsible_nav_item");
|
|
18
|
+
var _collapsible_nav_link = require("./collapsible_nav_link");
|
|
19
|
+
var _collapsible_nav_accordion = require("./collapsible_nav_accordion.styles");
|
|
20
|
+
var _react2 = require("@emotion/react");
|
|
21
|
+
var _excluded = ["id", "className", "items", "href", "isSubItem", "isSelected", "linkProps", "accordionProps", "buttonContent", "children"];
|
|
22
|
+
/*
|
|
23
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
24
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
25
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
26
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
27
|
+
* Side Public License, v 1.
|
|
28
|
+
*/
|
|
29
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
30
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
+
/**
|
|
34
|
+
* Internal nav accordion component.
|
|
35
|
+
*
|
|
36
|
+
* Renders children as either a nav link or any number/nesting of more nav accordions.
|
|
37
|
+
* Triggering the open/closed state is handled only by the accordion `arrow` for
|
|
38
|
+
* UX consistency, as accordion/nav titles can be their own links to pages.
|
|
39
|
+
*/
|
|
40
|
+
var EuiCollapsibleNavAccordion = function EuiCollapsibleNavAccordion(_ref) {
|
|
41
|
+
var _accordionProps$arrow;
|
|
42
|
+
var id = _ref.id,
|
|
43
|
+
className = _ref.className,
|
|
44
|
+
items = _ref.items,
|
|
45
|
+
href = _ref.href,
|
|
46
|
+
isSubItem = _ref.isSubItem,
|
|
47
|
+
isSelected = _ref.isSelected,
|
|
48
|
+
linkProps = _ref.linkProps,
|
|
49
|
+
accordionProps = _ref.accordionProps,
|
|
50
|
+
buttonContent = _ref.buttonContent,
|
|
51
|
+
_children = _ref.children,
|
|
52
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
53
|
+
var classes = (0, _classnames.default)('euiCollapsibleNavAccordion', className);
|
|
54
|
+
var groupID = (0, _services.useGeneratedHtmlId)({
|
|
55
|
+
conditionalId: id
|
|
56
|
+
});
|
|
57
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
58
|
+
var styles = (0, _collapsible_nav_accordion.euiCollapsibleNavAccordionStyles)(euiTheme);
|
|
59
|
+
var cssStyles = [styles.euiCollapsibleNavAccordion, isSubItem ? styles.isSubItem : styles.isTopItem, isSelected && styles.isSelected, accordionProps === null || accordionProps === void 0 ? void 0 : accordionProps.css];
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Title / accordion trigger
|
|
63
|
+
*/
|
|
64
|
+
var isTitleInteractive = !!(href || linkProps !== null && linkProps !== void 0 && linkProps.onClick);
|
|
65
|
+
|
|
66
|
+
// Stop propagation on the title so that the accordion toggle doesn't occur on click
|
|
67
|
+
// (should only occur on accordion arrow click for UX consistency)
|
|
68
|
+
var stopPropagationClick = (0, _react.useCallback)(function (e) {
|
|
69
|
+
var _linkProps$onClick;
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
linkProps === null || linkProps === void 0 ? void 0 : (_linkProps$onClick = linkProps.onClick) === null || _linkProps$onClick === void 0 ? void 0 : _linkProps$onClick.call(linkProps, e);
|
|
72
|
+
}, [linkProps === null || linkProps === void 0 ? void 0 : linkProps.onClick] // eslint-disable-line react-hooks/exhaustive-deps
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Child items
|
|
77
|
+
*/
|
|
78
|
+
// If any of the sub items have an icon, default to an
|
|
79
|
+
// icon of `empty` so that all text lines up vertically
|
|
80
|
+
var itemsHaveIcons = (0, _react.useMemo)(function () {
|
|
81
|
+
return items.some(function (item) {
|
|
82
|
+
return !!item.icon;
|
|
83
|
+
});
|
|
84
|
+
}, [items]);
|
|
85
|
+
var icon = itemsHaveIcons ? 'empty' : undefined;
|
|
86
|
+
var childrenCssStyles = [styles.children.euiCollapsibleNavAccordion__children, isSubItem ? styles.children.isSubItem : styles.children.isTopItem];
|
|
87
|
+
var children = (0, _react2.jsx)("div", {
|
|
88
|
+
css: childrenCssStyles,
|
|
89
|
+
className: "euiCollapsibleNavAccordion__children"
|
|
90
|
+
}, items.map(function (item, index) {
|
|
91
|
+
return (
|
|
92
|
+
// This is an intentional circular dependency between the accordion & parent item display.
|
|
93
|
+
// EuiSideNavItem is purposely recursive to support any amount of nested sub items,
|
|
94
|
+
// and split up into separate files/components for better dev readability
|
|
95
|
+
(0, _react2.jsx)(_collapsible_nav_item.EuiCollapsibleNavSubItem, (0, _extends2.default)({
|
|
96
|
+
key: index,
|
|
97
|
+
icon: icon
|
|
98
|
+
}, item))
|
|
99
|
+
);
|
|
100
|
+
}));
|
|
101
|
+
return (0, _react2.jsx)(_accordion.EuiAccordion, (0, _extends2.default)({
|
|
102
|
+
id: groupID,
|
|
103
|
+
className: classes,
|
|
104
|
+
initialIsOpen: isSelected,
|
|
105
|
+
buttonElement: "div",
|
|
106
|
+
buttonContent: (0, _react2.jsx)(_collapsible_nav_link.EuiCollapsibleNavLink, (0, _extends2.default)({
|
|
107
|
+
href: href
|
|
108
|
+
}, linkProps, {
|
|
109
|
+
isSelected: isSelected,
|
|
110
|
+
isSubItem: isSubItem,
|
|
111
|
+
onClick: stopPropagationClick,
|
|
112
|
+
isInteractive: isTitleInteractive
|
|
113
|
+
}), buttonContent),
|
|
114
|
+
arrowDisplay: "right"
|
|
115
|
+
}, rest, accordionProps, {
|
|
116
|
+
css: cssStyles,
|
|
117
|
+
arrowProps: _objectSpread(_objectSpread({
|
|
118
|
+
iconSize: 's'
|
|
119
|
+
}, accordionProps === null || accordionProps === void 0 ? void 0 : accordionProps.arrowProps), {}, {
|
|
120
|
+
css: [styles.euiCollapsibleNavAccordion__arrow, accordionProps === null || accordionProps === void 0 ? void 0 : (_accordionProps$arrow = accordionProps.arrowProps) === null || _accordionProps$arrow === void 0 ? void 0 : _accordionProps$arrow.css]
|
|
121
|
+
})
|
|
122
|
+
}), children);
|
|
123
|
+
};
|
|
124
|
+
exports.EuiCollapsibleNavAccordion = EuiCollapsibleNavAccordion;
|
|
125
|
+
EuiCollapsibleNavAccordion.propTypes = {
|
|
126
|
+
/**
|
|
127
|
+
* Determines whether the item should render as a top-level nav item
|
|
128
|
+
* or a nested nav subitem. Set internally by EUI
|
|
129
|
+
*/
|
|
130
|
+
isSubItem: _propTypes.default.bool,
|
|
131
|
+
buttonContent: _propTypes.default.node.isRequired,
|
|
132
|
+
// On the main `EuiCollapsibleNavItem` component, this uses `EuiCollapsibleNavSubItemProps`
|
|
133
|
+
// to allow for section headings, but by the time `items` reaches this component, we
|
|
134
|
+
// know for sure it's an actual accordion item and not a section heading
|
|
135
|
+
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
136
|
+
/**
|
|
137
|
+
* ReactNode to render as this component's title
|
|
138
|
+
*/
|
|
139
|
+
title: _propTypes.default.node.isRequired,
|
|
140
|
+
/**
|
|
141
|
+
* Allows customizing title's element.
|
|
142
|
+
* Consider using a heading element for better accessibility.
|
|
143
|
+
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
144
|
+
*/
|
|
145
|
+
titleElement: _propTypes.default.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
|
|
146
|
+
icon: _propTypes.default.oneOfType([_propTypes.default.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.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
147
|
+
/**
|
|
148
|
+
* Optional props to pass to the title icon
|
|
149
|
+
*/
|
|
150
|
+
iconProps: _propTypes.default.any,
|
|
151
|
+
className: _propTypes.default.string,
|
|
152
|
+
"aria-label": _propTypes.default.string,
|
|
153
|
+
"data-test-subj": _propTypes.default.string,
|
|
154
|
+
css: _propTypes.default.any,
|
|
155
|
+
/**
|
|
156
|
+
* The nav item link.
|
|
157
|
+
* If not included, and no `onClick` is specified, the nav item
|
|
158
|
+
* will render as an non-interactive `<span>`.
|
|
159
|
+
*/
|
|
160
|
+
href: _propTypes.default.string,
|
|
161
|
+
/**
|
|
162
|
+
* When passed, an `EuiAccordion` with nested child item links will be rendered.
|
|
163
|
+
*
|
|
164
|
+
* Accepts any #EuiCollapsibleNavItem prop, and also accepts an
|
|
165
|
+
* #EuiCollapsibleNavSubItemGroupTitle
|
|
166
|
+
*/
|
|
167
|
+
items: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
168
|
+
/**
|
|
169
|
+
* ReactNode to render as this component's title
|
|
170
|
+
*/
|
|
171
|
+
title: _propTypes.default.node,
|
|
172
|
+
/**
|
|
173
|
+
* Allows customizing title's element.
|
|
174
|
+
* Consider using a heading element for better accessibility.
|
|
175
|
+
* Defaults to an unsemantic `span` or `div`, depending on context.
|
|
176
|
+
*/
|
|
177
|
+
titleElement: _propTypes.default.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
|
|
178
|
+
/**
|
|
179
|
+
* Optional icon to render to the left of title content
|
|
180
|
+
*/
|
|
181
|
+
icon: _propTypes.default.oneOfType([_propTypes.default.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.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
182
|
+
/**
|
|
183
|
+
* Optional props to pass to the title icon
|
|
184
|
+
*/
|
|
185
|
+
iconProps: _propTypes.default.any,
|
|
186
|
+
/**
|
|
187
|
+
* Pass this flag to seperate links by group title headings.
|
|
188
|
+
* Strongly consider using the `titleElement` prop for accessibility.
|
|
189
|
+
*/
|
|
190
|
+
isGroupTitle: _propTypes.default.bool
|
|
191
|
+
}).isRequired),
|
|
192
|
+
/**
|
|
193
|
+
* If `items` is specified, use this prop to pass any prop that `EuiAccordion`
|
|
194
|
+
* accepts, including props that control the toggled state of the accordion
|
|
195
|
+
* (e.g. `initialIsOpen`, `forceState`)
|
|
196
|
+
*/
|
|
197
|
+
accordionProps: _propTypes.default.any,
|
|
198
|
+
/**
|
|
199
|
+
* If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
|
|
200
|
+
*/
|
|
201
|
+
linkProps: _propTypes.default.any,
|
|
202
|
+
/**
|
|
203
|
+
* Highlights whether an item is currently selected, e.g.
|
|
204
|
+
* if the user is on the same page as the nav link
|
|
205
|
+
*/
|
|
206
|
+
isSelected: _propTypes.default.bool
|
|
207
|
+
}).isRequired).isRequired
|
|
208
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiCollapsibleNavAccordionStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
9
|
+
var _collapsible_nav_item = require("./collapsible_nav_item.styles");
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
var euiCollapsibleNavAccordionStyles = function euiCollapsibleNavAccordionStyles(euiThemeContext) {
|
|
19
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
20
|
+
var sharedStyles = (0, _collapsible_nav_item.euiCollapsibleNavItemVariables)(euiThemeContext);
|
|
21
|
+
return {
|
|
22
|
+
// NOTE: Specific usage of `>`s selectors are important here, because accordions can be nested
|
|
23
|
+
// - just because a parent accordion is open or selected does not mean its child accordion is the same
|
|
24
|
+
euiCollapsibleNavAccordion: /*#__PURE__*/(0, _react.css)(".euiAccordion__button{overflow:hidden;&:hover,&:focus{cursor:default;text-decoration:none;}}.euiAccordion__triggerWrapper{border-radius:", sharedStyles.borderRadius, ";", _global_styling.euiCanAnimate, "{transition:background-color ", sharedStyles.animation, ";}}.euiAccordion__buttonContent{", (0, _global_styling.logicalCSS)('max-width', '100%'), " flex-basis:100%;display:flex;align-items:center;}.euiCollapsibleNavLink{", (0, _global_styling.logicalCSS)('width', '100%'), ";};label:euiCollapsibleNavAccordion;"),
|
|
25
|
+
isTopItem: /*#__PURE__*/(0, _react.css)("margin:", sharedStyles.padding, ";&>.euiAccordion__triggerWrapper{&:hover{background-color:", sharedStyles.backgroundHoverColor, ";}};label:isTopItem;"),
|
|
26
|
+
isSelected: /*#__PURE__*/(0, _react.css)("&>.euiAccordion__triggerWrapper{background-color:", sharedStyles.backgroundSelectedColor, ";&:hover{background-color:", sharedStyles.backgroundSelectedColor, ";}};label:isSelected;"),
|
|
27
|
+
isSubItem: /*#__PURE__*/(0, _react.css)("&.euiAccordion-isOpen{", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.m), ";};label:isSubItem;"),
|
|
28
|
+
// Arrow element
|
|
29
|
+
euiCollapsibleNavAccordion__arrow: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), _global_styling.euiCanAnimate, "{transition:background-color ", sharedStyles.animation, ";}&:hover,&:focus-visible{background-color:", euiTheme.colors.lightShade, ";&>.euiIcon{color:", sharedStyles.color, ";}}transform:none!important;&>.euiIcon{color:", sharedStyles.rightIconColor, ";transform:rotate(-90deg);", _global_styling.euiCanAnimate, "{transition:transform ", sharedStyles.animation, ",color ", sharedStyles.animation, ";}}&.euiAccordion__iconButton-isOpen>.euiIcon{color:", sharedStyles.color, ";transform:rotate(90deg);};label:euiCollapsibleNavAccordion__arrow;"),
|
|
30
|
+
// Children wrapper
|
|
31
|
+
children: {
|
|
32
|
+
euiCollapsibleNavAccordion__children: /*#__PURE__*/(0, _react.css)(";label:euiCollapsibleNavAccordion__children;"),
|
|
33
|
+
isTopItem: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-top', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.xl), ";;label:isTopItem;"),
|
|
34
|
+
isSubItem: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-left', euiTheme.border.thin), " ", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-left', (0, _global_styling.mathWithUnits)([euiTheme.size.s, euiTheme.border.width.thin], function (x, y) {
|
|
35
|
+
return x - y;
|
|
36
|
+
})), ";;label:isSubItem;")
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
exports.euiCollapsibleNavAccordionStyles = euiCollapsibleNavAccordionStyles;
|