@elastic/eui 67.1.6 → 67.1.8
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 +0 -7
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -7
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +4 -4
- package/es/components/basic_table/in_memory_table.js +16 -2
- package/es/components/breadcrumbs/breadcrumb.js +9 -5
- package/es/components/breadcrumbs/breadcrumbs.js +7 -4
- package/es/components/card/card.js +6 -28
- package/es/components/card/checkable_card/checkable_card.js +3 -2
- package/es/components/datagrid/controls/column_selector.js +1 -1
- package/es/components/datagrid/controls/column_sorting.js +1 -1
- package/es/components/header/header_links/header_links.js +6 -0
- package/es/components/modal/modal.js +17 -2
- package/es/components/page_template/page_template.js +6 -9
- package/es/components/popover/popover.js +13 -3
- package/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/es/components/popover/popover_panel/_popover_panel.js +8 -2
- package/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/es/components/search_bar/query/ast.js +14 -3
- package/es/components/search_bar/search_bar.js +39 -5
- package/es/components/search_bar/search_box.js +37 -4
- package/es/components/tour/tour.styles.js +4 -3
- package/es/components/tour/tour_step.js +13 -5
- package/eui.d.ts +43 -8
- package/i18ntokens.json +12 -12
- package/lib/components/badge/beta_badge/beta_badge.js +4 -8
- package/lib/components/basic_table/in_memory_table.js +16 -2
- package/lib/components/breadcrumbs/breadcrumb.js +9 -5
- package/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- package/lib/components/card/card.js +7 -30
- package/lib/components/card/checkable_card/checkable_card.js +3 -2
- package/lib/components/datagrid/controls/column_selector.js +1 -1
- package/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/lib/components/header/header_links/header_links.js +6 -0
- package/lib/components/modal/modal.js +23 -2
- package/lib/components/page_template/page_template.js +6 -9
- package/lib/components/popover/popover.js +13 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/lib/components/popover/popover_panel/_popover_panel.js +8 -2
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/lib/components/search_bar/query/ast.js +14 -3
- package/lib/components/search_bar/search_bar.js +40 -5
- package/lib/components/search_bar/search_box.js +38 -4
- package/lib/components/tour/tour.styles.js +3 -2
- package/lib/components/tour/tour_step.js +7 -5
- package/optimize/es/components/badge/beta_badge/beta_badge.js +4 -4
- package/optimize/es/components/basic_table/in_memory_table.js +1 -1
- package/optimize/es/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +7 -4
- package/optimize/es/components/card/card.js +5 -27
- package/optimize/es/components/card/checkable_card/checkable_card.js +3 -2
- package/optimize/es/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/es/components/modal/modal.js +17 -2
- package/optimize/es/components/page_template/page_template.js +6 -9
- package/optimize/es/components/popover/popover.js +7 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/optimize/es/components/search_bar/query/ast.js +14 -3
- package/optimize/es/components/search_bar/search_bar.js +31 -5
- package/optimize/es/components/search_bar/search_box.js +29 -3
- package/optimize/es/components/tour/tour.styles.js +4 -3
- package/optimize/es/components/tour/tour_step.js +7 -5
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +4 -11
- package/optimize/lib/components/basic_table/in_memory_table.js +1 -1
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- package/optimize/lib/components/card/card.js +6 -29
- package/optimize/lib/components/card/checkable_card/checkable_card.js +3 -2
- package/optimize/lib/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/lib/components/modal/modal.js +22 -2
- package/optimize/lib/components/page_template/page_template.js +6 -9
- package/optimize/lib/components/popover/popover.js +7 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/optimize/lib/components/search_bar/query/ast.js +14 -3
- package/optimize/lib/components/search_bar/search_bar.js +31 -5
- package/optimize/lib/components/search_bar/search_box.js +30 -3
- package/optimize/lib/components/tour/tour.styles.js +3 -2
- package/optimize/lib/components/tour/tour_step.js +7 -5
- package/package.json +1 -1
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -8
- package/src/components/modal/_modal.scss +3 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +4 -11
- package/test-env/components/basic_table/in_memory_table.js +16 -2
- package/test-env/components/breadcrumbs/breadcrumb.js +9 -5
- package/test-env/components/breadcrumbs/breadcrumbs.js +7 -4
- package/test-env/components/card/card.js +7 -30
- package/test-env/components/card/checkable_card/checkable_card.js +3 -2
- package/test-env/components/datagrid/controls/column_selector.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting.js +1 -1
- package/test-env/components/header/header_links/header_links.js +6 -0
- package/test-env/components/modal/modal.js +22 -2
- package/test-env/components/page_template/page_template.js +6 -9
- package/test-env/components/popover/popover.js +13 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/test-env/components/popover/popover_panel/_popover_panel.js +8 -2
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/test-env/components/search_bar/query/ast.js +14 -3
- package/test-env/components/search_bar/search_bar.js +39 -5
- package/test-env/components/search_bar/search_box.js +38 -4
- package/test-env/components/tour/tour.styles.js +3 -2
- package/test-env/components/tour/tour_step.js +7 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
2
|
|
|
3
|
-
var _excluded = ["query", "incremental"];
|
|
3
|
+
var _excluded = ["query", "incremental", "hint"];
|
|
4
4
|
|
|
5
5
|
function _extends() { _extends = Object.assign || 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); }
|
|
6
6
|
|
|
@@ -40,6 +40,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
40
40
|
import React, { Component } from 'react';
|
|
41
41
|
import PropTypes from "prop-types";
|
|
42
42
|
import { EuiFieldSearch } from '../form';
|
|
43
|
+
import { EuiInputPopover } from '../popover';
|
|
43
44
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
44
45
|
export var EuiSearchBox = /*#__PURE__*/function (_Component) {
|
|
45
46
|
_inherits(EuiSearchBox, _Component);
|
|
@@ -78,6 +79,7 @@ export var EuiSearchBox = /*#__PURE__*/function (_Component) {
|
|
|
78
79
|
var _this$props = this.props,
|
|
79
80
|
query = _this$props.query,
|
|
80
81
|
incremental = _this$props.incremental,
|
|
82
|
+
hint = _this$props.hint,
|
|
81
83
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
82
84
|
|
|
83
85
|
var ariaLabel;
|
|
@@ -88,15 +90,39 @@ export var EuiSearchBox = /*#__PURE__*/function (_Component) {
|
|
|
88
90
|
ariaLabel = 'This is a search bar. After typing your query, hit enter to filter the results lower in the page.';
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
var search = ___EmotionJSX(EuiFieldSearch, _extends({
|
|
92
94
|
inputRef: function inputRef(input) {
|
|
93
95
|
return _this2.inputElement = input;
|
|
94
96
|
},
|
|
95
97
|
fullWidth: true,
|
|
96
98
|
defaultValue: query,
|
|
97
99
|
incremental: incremental,
|
|
98
|
-
"aria-label": ariaLabel
|
|
100
|
+
"aria-label": ariaLabel,
|
|
101
|
+
onFocus: function onFocus() {
|
|
102
|
+
hint === null || hint === void 0 ? void 0 : hint.setIsVisible(true);
|
|
103
|
+
}
|
|
99
104
|
}, rest));
|
|
105
|
+
|
|
106
|
+
if (hint) {
|
|
107
|
+
return ___EmotionJSX(EuiInputPopover, _extends({
|
|
108
|
+
disableFocusTrap: true,
|
|
109
|
+
input: search,
|
|
110
|
+
isOpen: hint.isVisible,
|
|
111
|
+
fullWidth: true,
|
|
112
|
+
closePopover: function closePopover() {
|
|
113
|
+
hint.setIsVisible(false);
|
|
114
|
+
},
|
|
115
|
+
panelProps: {
|
|
116
|
+
'aria-live': undefined,
|
|
117
|
+
'aria-modal': undefined,
|
|
118
|
+
role: undefined,
|
|
119
|
+
tabIndex: -1,
|
|
120
|
+
id: hint.id
|
|
121
|
+
}
|
|
122
|
+
}, hint.popoverProps), hint.content);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return search;
|
|
100
126
|
}
|
|
101
127
|
}]);
|
|
102
128
|
|
|
@@ -111,5 +137,12 @@ _defineProperty(EuiSearchBox, "defaultProps", {
|
|
|
111
137
|
EuiSearchBox.propTypes = {
|
|
112
138
|
query: PropTypes.string.isRequired,
|
|
113
139
|
// This is optional in EuiFieldSearchProps
|
|
114
|
-
onSearch: PropTypes.func.isRequired
|
|
140
|
+
onSearch: PropTypes.func.isRequired,
|
|
141
|
+
hint: PropTypes.shape({
|
|
142
|
+
id: PropTypes.string.isRequired,
|
|
143
|
+
isVisible: PropTypes.bool.isRequired,
|
|
144
|
+
setIsVisible: PropTypes.func.isRequired,
|
|
145
|
+
content: PropTypes.node.isRequired,
|
|
146
|
+
popoverProps: PropTypes.any
|
|
147
|
+
})
|
|
115
148
|
};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
9
|
import { shade, tint, COLOR_MODES_STANDARD } from '../../services';
|
|
10
|
-
import { logicalCSS, mathWithUnits } from '../../global_styling';
|
|
10
|
+
import { logicalCSS, mathWithUnits, euiCanAnimate } from '../../global_styling';
|
|
11
11
|
import { openAnimationTiming } from '../popover/popover_panel/_popover_panel.styles';
|
|
12
12
|
import { popoverArrowSize } from '../popover/popover_arrow/_popover_arrow.styles';
|
|
13
13
|
|
|
@@ -20,7 +20,7 @@ export var euiTourStyles = function euiTourStyles(_ref) {
|
|
|
20
20
|
colorMode = _ref.colorMode;
|
|
21
21
|
return {
|
|
22
22
|
// Targets EuiPopoverPanel
|
|
23
|
-
euiTour: /*#__PURE__*/css("
|
|
23
|
+
euiTour: /*#__PURE__*/css("[data-popover-arrow='top']::before{", logicalCSS('border-top-color', backgroundColor(euiTheme.colors.lightestShade, colorMode)), ";};label:euiTour;")
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
@@ -34,7 +34,8 @@ export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
|
34
34
|
});
|
|
35
35
|
return {
|
|
36
36
|
// Base
|
|
37
|
-
euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], "
|
|
37
|
+
euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;", euiCanAnimate, "{opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], ";};label:euiTourBeacon;"),
|
|
38
|
+
isOpen: /*#__PURE__*/css(euiCanAnimate, "{opacity:1;};label:isOpen;"),
|
|
38
39
|
// Positions
|
|
39
40
|
right: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowOffset), ";;label:right;"),
|
|
40
41
|
left: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowSize), ";;label:left;"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["anchorPosition", "anchor", "children", "className", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction"];
|
|
1
|
+
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction", "panelProps"];
|
|
2
2
|
|
|
3
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
@@ -58,6 +58,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
58
58
|
anchor = _ref.anchor,
|
|
59
59
|
children = _ref.children,
|
|
60
60
|
className = _ref.className,
|
|
61
|
+
css = _ref.css,
|
|
61
62
|
_ref$closePopover = _ref.closePopover,
|
|
62
63
|
closePopover = _ref$closePopover === void 0 ? function () {} : _ref$closePopover,
|
|
63
64
|
content = _ref.content,
|
|
@@ -77,6 +78,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
77
78
|
_ref$decoration = _ref.decoration,
|
|
78
79
|
decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
|
|
79
80
|
footerAction = _ref.footerAction,
|
|
81
|
+
panelProps = _ref.panelProps,
|
|
80
82
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
81
83
|
|
|
82
84
|
var titleId = useGeneratedHtmlId();
|
|
@@ -120,7 +122,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
120
122
|
var headerStyles = euiTourHeaderStyles(euiTheme);
|
|
121
123
|
var footerStyles = euiTourFooterStyles(euiTheme);
|
|
122
124
|
var beaconStyles = euiTourBeaconStyles(euiTheme);
|
|
123
|
-
var beaconCss = [beaconStyles.euiTourBeacon, popoverPosition && beaconStyles[popoverPosition]];
|
|
125
|
+
var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
|
|
124
126
|
var finishButtonProps = {
|
|
125
127
|
color: 'text',
|
|
126
128
|
flush: 'right',
|
|
@@ -181,9 +183,9 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
181
183
|
ownFocus: false,
|
|
182
184
|
panelClassName: classes,
|
|
183
185
|
panelStyle: style,
|
|
184
|
-
panelProps: {
|
|
185
|
-
css: tourStyles.euiTour
|
|
186
|
-
},
|
|
186
|
+
panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
|
|
187
|
+
css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
|
|
188
|
+
}),
|
|
187
189
|
offset: hasBeacon ? 10 : 0,
|
|
188
190
|
'aria-labelledby': titleId,
|
|
189
191
|
arrowChildren: hasBeacon && ___EmotionJSX(EuiBeacon, {
|
|
@@ -339,6 +341,12 @@ EuiTourStep.propTypes = {
|
|
|
339
341
|
*/
|
|
340
342
|
repositionOnScroll: PropTypes.bool,
|
|
341
343
|
|
|
344
|
+
/**
|
|
345
|
+
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
346
|
+
* otherwise your nested drag & drop will have incorrect positioning
|
|
347
|
+
*/
|
|
348
|
+
hasDragDrop: PropTypes.bool,
|
|
349
|
+
|
|
342
350
|
/**
|
|
343
351
|
* By default, popover content inherits the z-index of the anchor
|
|
344
352
|
* component; pass `zIndex` to override
|
package/eui.d.ts
CHANGED
|
@@ -4363,6 +4363,13 @@ declare module '@elastic/eui/src/components/popover/popover_panel/_popover_panel
|
|
|
4363
4363
|
left: import("@emotion/utils").SerializedStyles;
|
|
4364
4364
|
right: import("@emotion/utils").SerializedStyles;
|
|
4365
4365
|
};
|
|
4366
|
+
hasDragDrop: {
|
|
4367
|
+
hasDragDrop: import("@emotion/utils").SerializedStyles;
|
|
4368
|
+
top: import("@emotion/utils").SerializedStyles;
|
|
4369
|
+
bottom: import("@emotion/utils").SerializedStyles;
|
|
4370
|
+
left: import("@emotion/utils").SerializedStyles;
|
|
4371
|
+
right: import("@emotion/utils").SerializedStyles;
|
|
4372
|
+
};
|
|
4366
4373
|
};
|
|
4367
4374
|
|
|
4368
4375
|
}
|
|
@@ -4379,6 +4386,7 @@ declare module '@elastic/eui/src/components/popover/popover_panel/_popover_panel
|
|
|
4379
4386
|
isOpen?: boolean;
|
|
4380
4387
|
isAttached?: boolean;
|
|
4381
4388
|
position?: EuiPopoverArrowPositions | null;
|
|
4389
|
+
hasDragDrop?: boolean;
|
|
4382
4390
|
};
|
|
4383
4391
|
/**
|
|
4384
4392
|
* *INTERNAL ONLY*
|
|
@@ -4499,6 +4507,11 @@ declare module '@elastic/eui/src/components/popover/popover' {
|
|
|
4499
4507
|
* an `EuiPopover` in a scrollable container, `repositionOnScroll` should be `true`
|
|
4500
4508
|
*/
|
|
4501
4509
|
repositionOnScroll?: boolean;
|
|
4510
|
+
/**
|
|
4511
|
+
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
4512
|
+
* otherwise your nested drag & drop will have incorrect positioning
|
|
4513
|
+
*/
|
|
4514
|
+
hasDragDrop?: boolean;
|
|
4502
4515
|
/**
|
|
4503
4516
|
* By default, popover content inherits the z-index of the anchor
|
|
4504
4517
|
* component; pass `zIndex` to override
|
|
@@ -8161,6 +8174,7 @@ declare module '@elastic/eui/src/components/breadcrumbs/breadcrumb' {
|
|
|
8161
8174
|
isLastBreadcrumb?: boolean;
|
|
8162
8175
|
isOnlyBreadcrumb?: boolean;
|
|
8163
8176
|
highlightLastBreadcrumb?: boolean;
|
|
8177
|
+
truncateLastBreadcrumb?: boolean;
|
|
8164
8178
|
} & Pick<EuiBreadcrumbProps, 'truncate'>;
|
|
8165
8179
|
export const EuiBreadcrumb: FunctionComponent<HTMLAttributes<HTMLLIElement> & _EuiBreadcrumbProps>;
|
|
8166
8180
|
export const EuiBreadcrumbContent: FunctionComponent<EuiBreadcrumbProps & _EuiBreadcrumbProps>;
|
|
@@ -8331,9 +8345,8 @@ declare module '@elastic/eui/src/components/card/card' {
|
|
|
8331
8345
|
import { EuiBetaBadgeProps } from '@elastic/eui/src/components/badge/beta_badge';
|
|
8332
8346
|
import { EuiIconProps } from '@elastic/eui/src/components/icon';
|
|
8333
8347
|
import { EuiCardSelectProps } from '@elastic/eui/src/components/card/card_select';
|
|
8334
|
-
import { EuiPanelProps } from '@elastic/eui/src/components/panel';
|
|
8335
|
-
export const ALIGNMENTS:
|
|
8336
|
-
export const LAYOUT_ALIGNMENTS: CardLayout[]; type EuiCardPropsLayout = ExclusiveUnion<{
|
|
8348
|
+
import { EuiPanelProps } from '@elastic/eui/src/components/panel';
|
|
8349
|
+
export const ALIGNMENTS: readonly ["left", "center", "right"]; type CardAlignment = typeof ALIGNMENTS[number]; type EuiCardPropsLayout = ExclusiveUnion<{
|
|
8337
8350
|
layout?: 'vertical';
|
|
8338
8351
|
/**
|
|
8339
8352
|
* Changes alignment of the title and description
|
|
@@ -16149,6 +16162,7 @@ declare module '@elastic/eui/src/components/tree_view' {
|
|
|
16149
16162
|
declare module '@elastic/eui/src/components/search_bar/search_box' {
|
|
16150
16163
|
import { Component } from 'react';
|
|
16151
16164
|
import { EuiFieldSearchProps } from '@elastic/eui/src/components/form';
|
|
16165
|
+
import { EuiSearchBarProps } from '@elastic/eui/src/components/search_bar/search_bar';
|
|
16152
16166
|
export interface SchemaType {
|
|
16153
16167
|
strict?: boolean;
|
|
16154
16168
|
fields?: any;
|
|
@@ -16157,6 +16171,11 @@ declare module '@elastic/eui/src/components/search_bar/search_box' {
|
|
|
16157
16171
|
export interface EuiSearchBoxProps extends EuiFieldSearchProps {
|
|
16158
16172
|
query: string;
|
|
16159
16173
|
onSearch: (queryText: string) => void;
|
|
16174
|
+
hint?: {
|
|
16175
|
+
id: string;
|
|
16176
|
+
isVisible: boolean;
|
|
16177
|
+
setIsVisible: (isVisible: boolean) => void;
|
|
16178
|
+
} & EuiSearchBarProps['hint'];
|
|
16160
16179
|
} type DefaultProps = Pick<EuiSearchBoxProps, 'placeholder' | 'incremental'>;
|
|
16161
16180
|
export class EuiSearchBox extends Component<EuiSearchBoxProps> {
|
|
16162
16181
|
static defaultProps: DefaultProps;
|
|
@@ -16303,7 +16322,7 @@ declare module '@elastic/eui/src/components/search_bar/query/ast' {
|
|
|
16303
16322
|
getFieldClauses(field?: string): FieldClause[];
|
|
16304
16323
|
getFieldClause(field: string, predicate: (c: FieldClause) => boolean): FieldClause | undefined;
|
|
16305
16324
|
hasOrFieldClause(field: string, value?: Value): boolean;
|
|
16306
|
-
getOrFieldClause(field: string, value?: Value): FieldClause | undefined;
|
|
16325
|
+
getOrFieldClause(field: string, value?: Value, must?: boolean, operator?: OperatorType): FieldClause | undefined;
|
|
16307
16326
|
addOrFieldValue(field: string, value: Value, must?: boolean, operator?: OperatorType): _AST;
|
|
16308
16327
|
removeOrFieldValue(field: string, value: Value): _AST;
|
|
16309
16328
|
removeOrFieldClauses(field: string): _AST;
|
|
@@ -17483,12 +17502,13 @@ declare module '@elastic/eui/src/components/search_bar/search_filters' {
|
|
|
17483
17502
|
|
|
17484
17503
|
}
|
|
17485
17504
|
declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
17486
|
-
import { Component, ReactElement } from 'react';
|
|
17505
|
+
import React, { Component, ReactElement } from 'react';
|
|
17487
17506
|
import { SchemaType } from '@elastic/eui/src/components/search_bar/search_box';
|
|
17488
17507
|
import { SearchFilterConfig } from '@elastic/eui/src/components/search_bar/search_filters';
|
|
17489
17508
|
import { Query } from '@elastic/eui/src/components/search_bar/query';
|
|
17490
17509
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
17491
17510
|
import { EuiFieldSearchProps } from '@elastic/eui/src/components/form/field_search';
|
|
17511
|
+
import { EuiInputPopoverProps } from '@elastic/eui/src/components/popover';
|
|
17492
17512
|
export { Query, AST as Ast } from '@elastic/eui/src/components/search_bar/query';
|
|
17493
17513
|
export type QueryType = Query | string; type Tools = ReactElement | ReactElement[];
|
|
17494
17514
|
interface ArgsWithQuery {
|
|
@@ -17501,7 +17521,7 @@ declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
|
17501
17521
|
queryText: string;
|
|
17502
17522
|
error: Error;
|
|
17503
17523
|
}
|
|
17504
|
-
export type EuiSearchBarOnChangeArgs = ArgsWithQuery | ArgsWithError;
|
|
17524
|
+
export type EuiSearchBarOnChangeArgs = ArgsWithQuery | ArgsWithError; type HintPopOverProps = Partial<Pick<EuiInputPopoverProps, 'isOpen' | 'closePopover' | 'fullWidth' | 'disableFocusTrap' | 'panelClassName' | 'panelPaddingSize' | 'panelStyle' | 'panelProps' | 'popoverScreenReaderText' | 'repositionOnScroll' | 'zIndex' | 'data-test-subj'>>;
|
|
17505
17525
|
export interface EuiSearchBarProps extends CommonProps {
|
|
17506
17526
|
onChange?: (args: EuiSearchBarOnChangeArgs) => void | boolean;
|
|
17507
17527
|
/**
|
|
@@ -17534,19 +17554,28 @@ declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
|
17534
17554
|
* Date formatter to use when parsing date values
|
|
17535
17555
|
*/
|
|
17536
17556
|
dateFormat?: object;
|
|
17557
|
+
/**
|
|
17558
|
+
* Hint to render below the search bar
|
|
17559
|
+
*/
|
|
17560
|
+
hint?: {
|
|
17561
|
+
content: React.ReactNode;
|
|
17562
|
+
popoverProps?: HintPopOverProps;
|
|
17563
|
+
};
|
|
17537
17564
|
}
|
|
17538
17565
|
interface State {
|
|
17539
17566
|
query: Query;
|
|
17540
17567
|
queryText: string;
|
|
17541
17568
|
error: null | Error;
|
|
17542
|
-
|
|
17569
|
+
isHintVisible: boolean;
|
|
17570
|
+
} type NotifyControllingParent = Pick<State, 'queryText' | 'error'> & {
|
|
17543
17571
|
query: Query | null;
|
|
17544
17572
|
};
|
|
17545
17573
|
export class EuiSearchBar extends Component<EuiSearchBarProps, State> {
|
|
17546
17574
|
static Query: typeof Query;
|
|
17575
|
+
hintId: string;
|
|
17547
17576
|
constructor(props: EuiSearchBarProps);
|
|
17548
17577
|
static getDerivedStateFromProps(nextProps: EuiSearchBarProps, prevState: State): State | null;
|
|
17549
|
-
notifyControllingParent(newState:
|
|
17578
|
+
notifyControllingParent(newState: NotifyControllingParent): void;
|
|
17550
17579
|
onSearch: (queryText: string) => void;
|
|
17551
17580
|
onFiltersChange: (query: Query) => void;
|
|
17552
17581
|
renderTools(tools?: Tools): JSX.Element | JSX.Element[] | undefined;
|
|
@@ -18445,6 +18474,7 @@ declare module '@elastic/eui/src/components/tour/tour.styles' {
|
|
|
18445
18474
|
};
|
|
18446
18475
|
export const euiTourBeaconStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
18447
18476
|
euiTourBeacon: import("@emotion/utils").SerializedStyles;
|
|
18477
|
+
isOpen: import("@emotion/utils").SerializedStyles;
|
|
18448
18478
|
right: import("@emotion/utils").SerializedStyles;
|
|
18449
18479
|
left: import("@emotion/utils").SerializedStyles;
|
|
18450
18480
|
top: import("@emotion/utils").SerializedStyles;
|
|
@@ -19183,6 +19213,11 @@ declare module '@elastic/eui/src/components/basic_table/in_memory_table' {
|
|
|
19183
19213
|
defaultFields?: string[];
|
|
19184
19214
|
isClauseMatcher?: (...args: any) => boolean;
|
|
19185
19215
|
explain?: boolean;
|
|
19216
|
+
/**
|
|
19217
|
+
* When the search bar Query is controlled and passed to the `search` prop it is by default executed against the items passed to the table to filter them out.
|
|
19218
|
+
* If the filtering is already done before passing the `items` to the table we can disable the execution by setting `enabled` to `false`.
|
|
19219
|
+
*/
|
|
19220
|
+
enabled?: boolean;
|
|
19186
19221
|
};
|
|
19187
19222
|
/**
|
|
19188
19223
|
* Insert content between the search bar and table components.
|
package/i18ntokens.json
CHANGED
|
@@ -229,11 +229,11 @@
|
|
|
229
229
|
"highlighting": "string",
|
|
230
230
|
"loc": {
|
|
231
231
|
"start": {
|
|
232
|
-
"line":
|
|
232
|
+
"line": 182,
|
|
233
233
|
"column": 20
|
|
234
234
|
},
|
|
235
235
|
"end": {
|
|
236
|
-
"line":
|
|
236
|
+
"line": 185,
|
|
237
237
|
"column": 3
|
|
238
238
|
}
|
|
239
239
|
},
|
|
@@ -4229,11 +4229,11 @@
|
|
|
4229
4229
|
"highlighting": "string",
|
|
4230
4230
|
"loc": {
|
|
4231
4231
|
"start": {
|
|
4232
|
-
"line":
|
|
4232
|
+
"line": 107,
|
|
4233
4233
|
"column": 10
|
|
4234
4234
|
},
|
|
4235
4235
|
"end": {
|
|
4236
|
-
"line":
|
|
4236
|
+
"line": 110,
|
|
4237
4237
|
"column": 11
|
|
4238
4238
|
}
|
|
4239
4239
|
},
|
|
@@ -4661,11 +4661,11 @@
|
|
|
4661
4661
|
"highlighting": "string",
|
|
4662
4662
|
"loc": {
|
|
4663
4663
|
"start": {
|
|
4664
|
-
"line":
|
|
4664
|
+
"line": 684,
|
|
4665
4665
|
"column": 16
|
|
4666
4666
|
},
|
|
4667
4667
|
"end": {
|
|
4668
|
-
"line":
|
|
4668
|
+
"line": 687,
|
|
4669
4669
|
"column": 18
|
|
4670
4670
|
}
|
|
4671
4671
|
},
|
|
@@ -5605,11 +5605,11 @@
|
|
|
5605
5605
|
"highlighting": "string",
|
|
5606
5606
|
"loc": {
|
|
5607
5607
|
"start": {
|
|
5608
|
-
"line":
|
|
5608
|
+
"line": 234,
|
|
5609
5609
|
"column": 10
|
|
5610
5610
|
},
|
|
5611
5611
|
"end": {
|
|
5612
|
-
"line":
|
|
5612
|
+
"line": 241,
|
|
5613
5613
|
"column": 11
|
|
5614
5614
|
}
|
|
5615
5615
|
},
|
|
@@ -5621,11 +5621,11 @@
|
|
|
5621
5621
|
"highlighting": "string",
|
|
5622
5622
|
"loc": {
|
|
5623
5623
|
"start": {
|
|
5624
|
-
"line":
|
|
5624
|
+
"line": 234,
|
|
5625
5625
|
"column": 10
|
|
5626
5626
|
},
|
|
5627
5627
|
"end": {
|
|
5628
|
-
"line":
|
|
5628
|
+
"line": 241,
|
|
5629
5629
|
"column": 11
|
|
5630
5630
|
}
|
|
5631
5631
|
},
|
|
@@ -5637,11 +5637,11 @@
|
|
|
5637
5637
|
"highlighting": "string",
|
|
5638
5638
|
"loc": {
|
|
5639
5639
|
"start": {
|
|
5640
|
-
"line":
|
|
5640
|
+
"line": 234,
|
|
5641
5641
|
"column": 10
|
|
5642
5642
|
},
|
|
5643
5643
|
"end": {
|
|
5644
|
-
"line":
|
|
5644
|
+
"line": 241,
|
|
5645
5645
|
"column": 11
|
|
5646
5646
|
}
|
|
5647
5647
|
},
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.sizeToClassMap = exports.SIZES = exports.EuiBetaBadge = exports.COLORS = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -25,10 +25,6 @@ var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPositi
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
28
|
-
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); }
|
|
29
|
-
|
|
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
|
-
|
|
32
28
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
33
29
|
|
|
34
30
|
function _extends() { _extends = Object.assign || 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); }
|
|
@@ -130,7 +126,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
130
126
|
anchorProps: anchorProps
|
|
131
127
|
}, content);
|
|
132
128
|
} else {
|
|
133
|
-
return (0, _react2.jsx)(
|
|
129
|
+
return (0, _react2.jsx)("span", anchorProps, content);
|
|
134
130
|
}
|
|
135
131
|
} else {
|
|
136
132
|
if (tooltipContent) {
|
|
@@ -151,10 +147,10 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
151
147
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat(_typeof(spanTitle)));
|
|
152
148
|
}
|
|
153
149
|
|
|
154
|
-
return (0, _react2.jsx)("span", _extends({
|
|
150
|
+
return (0, _react2.jsx)("span", anchorProps, (0, _react2.jsx)("span", _extends({
|
|
155
151
|
className: classes,
|
|
156
152
|
title: spanTitle
|
|
157
|
-
}, rest), icon || label);
|
|
153
|
+
}, rest), icon || label));
|
|
158
154
|
}
|
|
159
155
|
}
|
|
160
156
|
};
|
|
@@ -414,7 +414,7 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
414
414
|
sortName = _this$state2.sortName,
|
|
415
415
|
pageIndex = _this$state2.pageIndex,
|
|
416
416
|
pageSize = _this$state2.pageSize;
|
|
417
|
-
var matchingItems = query ? _search_bar.EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
417
|
+
var matchingItems = query !== null && (executeQueryOptions === null || executeQueryOptions === void 0 ? void 0 : executeQueryOptions.enabled) !== false ? _search_bar.EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
418
418
|
var sortedItems = sortName ? matchingItems.slice(0) // avoid mutating the source array
|
|
419
419
|
.sort(this.getItemSorter()) // sort, causes mutation
|
|
420
420
|
: matchingItems;
|
|
@@ -1149,6 +1149,14 @@ EuiInMemoryTable.propTypes = {
|
|
|
1149
1149
|
* Date formatter to use when parsing date values
|
|
1150
1150
|
*/
|
|
1151
1151
|
dateFormat: _propTypes.default.any,
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* Hint to render below the search bar
|
|
1155
|
+
*/
|
|
1156
|
+
hint: _propTypes.default.shape({
|
|
1157
|
+
content: _propTypes.default.node.isRequired,
|
|
1158
|
+
popoverProps: _propTypes.default.any
|
|
1159
|
+
}),
|
|
1152
1160
|
className: _propTypes.default.string,
|
|
1153
1161
|
"aria-label": _propTypes.default.string,
|
|
1154
1162
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -1213,7 +1221,13 @@ EuiInMemoryTable.propTypes = {
|
|
|
1213
1221
|
executeQueryOptions: _propTypes.default.shape({
|
|
1214
1222
|
defaultFields: _propTypes.default.arrayOf(_propTypes.default.string.isRequired),
|
|
1215
1223
|
isClauseMatcher: _propTypes.default.func,
|
|
1216
|
-
explain: _propTypes.default.bool
|
|
1224
|
+
explain: _propTypes.default.bool,
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
* When the search bar Query is controlled and passed to the `search` prop it is by default executed against the items passed to the table to filter them out.
|
|
1228
|
+
* If the filtering is already done before passing the `items` to the table we can disable the execution by setting `enabled` to `false`.
|
|
1229
|
+
*/
|
|
1230
|
+
enabled: _propTypes.default.bool
|
|
1217
1231
|
}),
|
|
1218
1232
|
|
|
1219
1233
|
/**
|
|
@@ -32,7 +32,7 @@ var _breadcrumb = require("./breadcrumb.styles");
|
|
|
32
32
|
var _react2 = require("@emotion/react");
|
|
33
33
|
|
|
34
34
|
var _excluded = ["children", "className", "type", "truncate"],
|
|
35
|
-
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb"];
|
|
35
|
+
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"];
|
|
36
36
|
|
|
37
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
38
38
|
|
|
@@ -81,7 +81,8 @@ EuiBreadcrumb.propTypes = {
|
|
|
81
81
|
isFirstBreadcrumb: _propTypes.default.bool,
|
|
82
82
|
isLastBreadcrumb: _propTypes.default.bool,
|
|
83
83
|
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
84
|
-
highlightLastBreadcrumb: _propTypes.default.bool
|
|
84
|
+
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
85
|
+
truncateLastBreadcrumb: _propTypes.default.bool
|
|
85
86
|
};
|
|
86
87
|
|
|
87
88
|
var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
@@ -97,12 +98,13 @@ var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
|
97
98
|
isLastBreadcrumb = _ref2.isLastBreadcrumb,
|
|
98
99
|
isOnlyBreadcrumb = _ref2.isOnlyBreadcrumb,
|
|
99
100
|
highlightLastBreadcrumb = _ref2.highlightLastBreadcrumb,
|
|
101
|
+
truncateLastBreadcrumb = _ref2.truncateLastBreadcrumb,
|
|
100
102
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
101
103
|
|
|
102
104
|
var classes = (0, _classnames.default)('euiBreadcrumb__content', className);
|
|
103
105
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
104
106
|
var styles = (0, _breadcrumb.euiBreadcrumbContentStyles)(euiTheme);
|
|
105
|
-
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate &&
|
|
107
|
+
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
106
108
|
|
|
107
109
|
if (type === 'application') {
|
|
108
110
|
if (isOnlyBreadcrumb) {
|
|
@@ -173,7 +175,8 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
173
175
|
isFirstBreadcrumb: _propTypes.default.bool,
|
|
174
176
|
isLastBreadcrumb: _propTypes.default.bool,
|
|
175
177
|
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
176
|
-
highlightLastBreadcrumb: _propTypes.default.bool
|
|
178
|
+
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
179
|
+
truncateLastBreadcrumb: _propTypes.default.bool
|
|
177
180
|
};
|
|
178
181
|
|
|
179
182
|
var EuiBreadcrumbCollapsed = function EuiBreadcrumbCollapsed(_ref3) {
|
|
@@ -222,5 +225,6 @@ EuiBreadcrumbCollapsed.propTypes = {
|
|
|
222
225
|
isFirstBreadcrumb: _propTypes.default.bool,
|
|
223
226
|
isLastBreadcrumb: _propTypes.default.bool,
|
|
224
227
|
isOnlyBreadcrumb: _propTypes.default.bool,
|
|
225
|
-
highlightLastBreadcrumb: _propTypes.default.bool
|
|
228
|
+
highlightLastBreadcrumb: _propTypes.default.bool,
|
|
229
|
+
truncateLastBreadcrumb: _propTypes.default.bool
|
|
226
230
|
};
|
|
@@ -69,12 +69,14 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
69
69
|
}, [breadcrumbs, responsiveMax]);
|
|
70
70
|
var breadcrumbChildren = (0, _react.useMemo)(function () {
|
|
71
71
|
return visibleBreadcrumbs.map(function (breadcrumb, index) {
|
|
72
|
+
var _breadcrumb$truncate;
|
|
73
|
+
|
|
72
74
|
var isFirstBreadcrumb = index === 0;
|
|
73
75
|
var isLastBreadcrumb = index === visibleBreadcrumbs.length - 1;
|
|
74
76
|
var isOnlyBreadcrumb = visibleBreadcrumbs.length === 1;
|
|
75
77
|
var sharedProps = {
|
|
76
78
|
type: type,
|
|
77
|
-
truncate: truncate
|
|
79
|
+
truncate: (_breadcrumb$truncate = breadcrumb.truncate) !== null && _breadcrumb$truncate !== void 0 ? _breadcrumb$truncate : truncate
|
|
78
80
|
};
|
|
79
81
|
return breadcrumb.isCollapsedButton ? (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbCollapsed, _extends({
|
|
80
82
|
key: "collapsed"
|
|
@@ -88,12 +90,13 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
88
90
|
max: 0
|
|
89
91
|
})) : (0, _react2.jsx)(_breadcrumb.EuiBreadcrumb, _extends({
|
|
90
92
|
key: index
|
|
91
|
-
}, sharedProps), (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbContent, _extends({
|
|
93
|
+
}, sharedProps), (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbContent, _extends({}, breadcrumb, sharedProps, {
|
|
92
94
|
isFirstBreadcrumb: isFirstBreadcrumb,
|
|
93
95
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
94
96
|
isOnlyBreadcrumb: isOnlyBreadcrumb,
|
|
95
|
-
highlightLastBreadcrumb: isLastBreadcrumb && lastBreadcrumbIsCurrentPage
|
|
96
|
-
|
|
97
|
+
highlightLastBreadcrumb: isLastBreadcrumb && lastBreadcrumbIsCurrentPage,
|
|
98
|
+
truncateLastBreadcrumb: isLastBreadcrumb && truncate && breadcrumb.truncate == null
|
|
99
|
+
})));
|
|
97
100
|
});
|
|
98
101
|
}, [visibleBreadcrumbs, truncate, type, lastBreadcrumbIsCurrentPage]);
|
|
99
102
|
return (0, _react2.jsx)("nav", _extends({
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.EuiCard = exports.ALIGNMENTS = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -13,10 +13,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
|
|
16
|
-
var _common = require("../common");
|
|
17
|
-
|
|
18
16
|
var _services = require("../../services");
|
|
19
17
|
|
|
18
|
+
var _clone_element = require("../../services/theme/clone_element");
|
|
19
|
+
|
|
20
20
|
var _text = require("../text");
|
|
21
21
|
|
|
22
22
|
var _title = require("../title");
|
|
@@ -58,23 +58,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
58
58
|
|
|
59
59
|
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; }
|
|
60
60
|
|
|
61
|
-
var
|
|
62
|
-
left: 'euiCard--leftAligned',
|
|
63
|
-
center: 'euiCard--centerAligned',
|
|
64
|
-
right: 'euiCard--rightAligned'
|
|
65
|
-
};
|
|
66
|
-
var ALIGNMENTS = (0, _common.keysOf)(textAlignToClassNameMap);
|
|
61
|
+
var ALIGNMENTS = ['left', 'center', 'right'];
|
|
67
62
|
exports.ALIGNMENTS = ALIGNMENTS;
|
|
68
|
-
var layoutToClassNameMap = {
|
|
69
|
-
vertical: '',
|
|
70
|
-
horizontal: 'euiCard--horizontal'
|
|
71
|
-
};
|
|
72
|
-
var LAYOUT_ALIGNMENTS = (0, _common.keysOf)(layoutToClassNameMap);
|
|
73
|
-
/**
|
|
74
|
-
* Certain props are only allowed when the layout is vertical
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
exports.LAYOUT_ALIGNMENTS = LAYOUT_ALIGNMENTS;
|
|
78
63
|
|
|
79
64
|
var EuiCard = function EuiCard(_ref) {
|
|
80
65
|
var className = _ref.className,
|
|
@@ -135,15 +120,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
135
120
|
}
|
|
136
121
|
}
|
|
137
122
|
|
|
138
|
-
var
|
|
139
|
-
var classes = (0, _classnames.default)('euiCard', textAlignToClassNameMap[textAlign], layoutToClassNameMap[layout], {
|
|
140
|
-
'euiCard--isClickable': isClickable,
|
|
141
|
-
'euiCard--hasBetaBadge': betaBadgeProps === null || betaBadgeProps === void 0 ? void 0 : betaBadgeProps.label,
|
|
142
|
-
'euiCard--hasIcon': icon,
|
|
143
|
-
'euiCard--isSelectable': selectable,
|
|
144
|
-
'euiCard-isSelected': selectable === null || selectable === void 0 ? void 0 : selectable.isSelected,
|
|
145
|
-
'euiCard-isDisabled': isDisabled
|
|
146
|
-
}, selectableColorClass, className);
|
|
123
|
+
var classes = (0, _classnames.default)('euiCard', className);
|
|
147
124
|
var ariaId = (0, _accessibility.useGeneratedHtmlId)();
|
|
148
125
|
var ariaDesc = description ? "".concat(ariaId, "Description") : '';
|
|
149
126
|
/**
|
|
@@ -171,7 +148,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
171
148
|
|
|
172
149
|
if (icon) {
|
|
173
150
|
var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
|
|
174
|
-
iconNode =
|
|
151
|
+
iconNode = (0, _clone_element.cloneElementWithCss)(icon, {
|
|
175
152
|
className: (0, _classnames.default)(icon.props.className, 'euiCard__icon'),
|
|
176
153
|
css: iconStyles
|
|
177
154
|
});
|
|
@@ -348,7 +325,7 @@ EuiCard.propTypes = {
|
|
|
348
325
|
/**
|
|
349
326
|
* Changes alignment of the title and description
|
|
350
327
|
*/
|
|
351
|
-
textAlign: _propTypes.default.
|
|
328
|
+
textAlign: _propTypes.default.any,
|
|
352
329
|
|
|
353
330
|
/**
|
|
354
331
|
* Accepts any combination of elements
|