@elastic/eui 83.1.0 → 84.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +4 -3
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +4 -3
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.js +4 -14
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/focus_trap/focus_trap.js +1 -0
- package/es/components/form/range/dual_range.js +86 -30
- package/es/components/link/link.styles.js +2 -2
- package/es/components/resizable_container/resizable_collapse_button.js +2 -2
- package/es/components/search_bar/index.js +2 -1
- package/es/components/search_bar/search_bar.js +2 -2
- package/es/components/search_bar/search_filters.js +9 -9
- package/eui.d.ts +28 -33
- package/i18ntokens.json +8 -8
- package/lib/components/accordion/accordion.js +4 -14
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/focus_trap/focus_trap.js +1 -0
- package/lib/components/form/range/dual_range.js +86 -30
- package/lib/components/link/link.styles.js +2 -2
- package/lib/components/resizable_container/resizable_collapse_button.js +2 -2
- package/lib/components/search_bar/index.js +8 -1
- package/lib/components/search_bar/search_bar.js +1 -1
- package/lib/components/search_bar/search_filters.js +11 -11
- package/optimize/es/components/accordion/accordion.js +3 -13
- package/optimize/es/components/focus_trap/focus_trap.js +1 -0
- package/optimize/es/components/form/range/dual_range.js +86 -30
- package/optimize/es/components/link/link.styles.js +2 -2
- package/optimize/es/components/resizable_container/resizable_collapse_button.js +2 -2
- package/optimize/es/components/search_bar/index.js +2 -1
- package/optimize/es/components/search_bar/search_bar.js +2 -2
- package/optimize/es/components/search_bar/search_filters.js +8 -8
- package/optimize/lib/components/accordion/accordion.js +3 -13
- package/optimize/lib/components/focus_trap/focus_trap.js +1 -0
- package/optimize/lib/components/form/range/dual_range.js +86 -30
- package/optimize/lib/components/link/link.styles.js +2 -2
- package/optimize/lib/components/resizable_container/resizable_collapse_button.js +2 -2
- package/optimize/lib/components/search_bar/index.js +8 -1
- package/optimize/lib/components/search_bar/search_bar.js +1 -1
- package/optimize/lib/components/search_bar/search_filters.js +10 -10
- package/package.json +5 -4
- package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +4 -0
- package/src/components/filter_group/_filter_group.scss +0 -4
- package/src/components/resizable_container/_resizable_collapse_button.scss +1 -0
- package/test-env/components/accordion/accordion.js +4 -14
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/form/range/dual_range.js +86 -30
- package/test-env/components/link/link.styles.js +2 -2
- package/test-env/components/resizable_container/resizable_collapse_button.js +2 -2
- package/test-env/components/search_bar/index.js +8 -1
- package/test-env/components/search_bar/search_bar.js +1 -1
- package/test-env/components/search_bar/search_filters.js +11 -11
|
@@ -27,7 +27,6 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
27
27
|
import React, { Component } from 'react';
|
|
28
28
|
import PropTypes from "prop-types";
|
|
29
29
|
import classNames from 'classnames';
|
|
30
|
-
import { keysOf } from '../common';
|
|
31
30
|
import { EuiLoadingSpinner } from '../loading';
|
|
32
31
|
import { EuiResizeObserver } from '../observer/resize_observer';
|
|
33
32
|
import { EuiText } from '../text';
|
|
@@ -37,15 +36,7 @@ import { EuiButtonIcon } from '../button';
|
|
|
37
36
|
import { euiAccordionButtonStyles, euiAccordionChildrenStyles, euiAccordionChildWrapperStyles, euiAccordionIconButtonStyles, euiAccordionOptionalActionStyles, euiAccordionSpinnerStyles, euiAccordionTriggerWrapperStyles } from './accordion.styles';
|
|
38
37
|
import { logicalCSS } from '../../global_styling';
|
|
39
38
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
40
|
-
var
|
|
41
|
-
none: '',
|
|
42
|
-
xs: 'euiAccordion__padding--xs',
|
|
43
|
-
s: 'euiAccordion__padding--s',
|
|
44
|
-
m: 'euiAccordion__padding--m',
|
|
45
|
-
l: 'euiAccordion__padding--l',
|
|
46
|
-
xl: 'euiAccordion__padding--xl'
|
|
47
|
-
};
|
|
48
|
-
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
39
|
+
export var PADDING_SIZES = ['none', 'xs', 's', 'm', 'l', 'xl'];
|
|
49
40
|
export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
50
41
|
_inherits(EuiAccordionClass, _Component);
|
|
51
42
|
var _super = _createSuper(EuiAccordionClass);
|
|
@@ -147,8 +138,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
147
138
|
var classes = classNames('euiAccordion', {
|
|
148
139
|
'euiAccordion-isOpen': isOpen
|
|
149
140
|
}, className);
|
|
150
|
-
var
|
|
151
|
-
var childrenClasses = classNames(paddingClass, {
|
|
141
|
+
var childrenClasses = classNames('euiAccordion__children', {
|
|
152
142
|
'euiAccordion__children-isLoading': isLoading
|
|
153
143
|
});
|
|
154
144
|
var buttonClasses = classNames('euiAccordion__button', buttonClassName, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.className);
|
|
@@ -162,7 +152,7 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
162
152
|
var buttonStyles = euiAccordionButtonStyles(theme);
|
|
163
153
|
var cssButtonStyles = [buttonStyles.euiAccordion__button, isDisabled && buttonStyles.disabled, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.css];
|
|
164
154
|
var childrenStyles = euiAccordionChildrenStyles(theme);
|
|
165
|
-
var cssChildrenStyles = [childrenStyles.euiAccordion__children, isLoading && childrenStyles.isLoading, paddingSize
|
|
155
|
+
var cssChildrenStyles = [childrenStyles.euiAccordion__children, isLoading && childrenStyles.isLoading, paddingSize && paddingSize !== 'none' && childrenStyles[paddingSize]];
|
|
166
156
|
var childWrapperStyles = euiAccordionChildWrapperStyles(theme);
|
|
167
157
|
var cssChildWrapperStyles = [childWrapperStyles.euiAccordion__childWrapper, isOpen && childWrapperStyles.isOpen];
|
|
168
158
|
var iconButtonStyles = euiAccordionIconButtonStyles(theme);
|
|
@@ -321,7 +311,7 @@ EuiAccordionClass.propTypes = {
|
|
|
321
311
|
/**
|
|
322
312
|
* The padding around the exposed accordion content.
|
|
323
313
|
*/
|
|
324
|
-
paddingSize: PropTypes.
|
|
314
|
+
paddingSize: PropTypes.any,
|
|
325
315
|
/**
|
|
326
316
|
* Placement of the arrow indicator, or 'none' to hide it.
|
|
327
317
|
*/
|
|
@@ -231,7 +231,7 @@ EuiCollapsibleNavGroup.propTypes = {
|
|
|
231
231
|
/**
|
|
232
232
|
* The padding around the exposed accordion content.
|
|
233
233
|
*/
|
|
234
|
-
paddingSize: PropTypes.
|
|
234
|
+
paddingSize: PropTypes.any,
|
|
235
235
|
/**
|
|
236
236
|
* Placement of the arrow indicator, or 'none' to hide it.
|
|
237
237
|
*/
|
|
@@ -145,6 +145,7 @@ _defineProperty(EuiFocusTrap, "defaultProps", {
|
|
|
145
145
|
returnFocus: true,
|
|
146
146
|
noIsolation: true,
|
|
147
147
|
scrollLock: false,
|
|
148
|
+
crossFrame: false,
|
|
148
149
|
gapMode: 'padding' // EUI defaults to padding because Kibana's body/layout CSS ignores `margin`
|
|
149
150
|
});
|
|
150
151
|
EuiFocusTrap.propTypes = {
|
|
@@ -375,9 +375,9 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
|
|
|
375
375
|
tickInterval = _this$props.tickInterval,
|
|
376
376
|
ticks = _this$props.ticks,
|
|
377
377
|
levels = _this$props.levels,
|
|
378
|
-
|
|
378
|
+
_onBlur = _this$props.onBlur,
|
|
379
379
|
onChange = _this$props.onChange,
|
|
380
|
-
|
|
380
|
+
_onFocus = _this$props.onFocus,
|
|
381
381
|
showRange = _this$props.showRange,
|
|
382
382
|
value = _this$props.value,
|
|
383
383
|
isInvalid = _this$props.isInvalid,
|
|
@@ -398,57 +398,113 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
|
|
|
398
398
|
// Overridable props
|
|
399
399
|
, _extends({
|
|
400
400
|
"aria-describedby": this.props['aria-describedby'],
|
|
401
|
-
"aria-label": this.props['aria-label']
|
|
401
|
+
"aria-label": this.props['aria-label'],
|
|
402
|
+
disabled: disabled,
|
|
403
|
+
isInvalid: isInvalid,
|
|
404
|
+
name: "".concat(name, "-minValue"),
|
|
405
|
+
value: this.lowerValue,
|
|
406
|
+
readOnly: readOnly
|
|
402
407
|
}, minInputProps, {
|
|
403
408
|
// Non-overridable props
|
|
404
409
|
side: "min",
|
|
405
410
|
min: min,
|
|
406
411
|
max: Number(this.upperValue),
|
|
407
412
|
step: step,
|
|
408
|
-
value: this.lowerValue,
|
|
409
|
-
disabled: disabled,
|
|
410
413
|
compressed: compressed,
|
|
411
|
-
onChange: this.handleLowerInputChange,
|
|
412
|
-
onKeyDown: this.handleInputKeyDown,
|
|
413
|
-
name: "".concat(name, "-minValue"),
|
|
414
|
-
onFocus: canShowDropdown ? this.onInputFocus : onFocus,
|
|
415
|
-
onBlur: canShowDropdown ? this.onInputBlur : onBlur,
|
|
416
|
-
readOnly: readOnly,
|
|
417
414
|
autoSize: !showInputOnly,
|
|
418
415
|
fullWidth: !!showInputOnly && fullWidth,
|
|
419
|
-
isInvalid: isInvalid,
|
|
420
416
|
controlOnly: showInputOnly,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
417
|
+
onChange: function onChange(event) {
|
|
418
|
+
var _minInputProps$onChan;
|
|
419
|
+
_this2.handleLowerInputChange(event);
|
|
420
|
+
minInputProps === null || minInputProps === void 0 ? void 0 : (_minInputProps$onChan = minInputProps.onChange) === null || _minInputProps$onChan === void 0 ? void 0 : _minInputProps$onChan.call(minInputProps, event);
|
|
421
|
+
},
|
|
422
|
+
onKeyDown: function onKeyDown(event) {
|
|
423
|
+
var _minInputProps$onKeyD;
|
|
424
|
+
_this2.handleInputKeyDown(event);
|
|
425
|
+
minInputProps === null || minInputProps === void 0 ? void 0 : (_minInputProps$onKeyD = minInputProps.onKeyDown) === null || _minInputProps$onKeyD === void 0 ? void 0 : _minInputProps$onKeyD.call(minInputProps, event);
|
|
426
|
+
},
|
|
427
|
+
onFocus: function onFocus(event) {
|
|
428
|
+
var _minInputProps$onFocu;
|
|
429
|
+
if (canShowDropdown) {
|
|
430
|
+
_this2.onInputFocus(event);
|
|
431
|
+
} else {
|
|
432
|
+
_onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(event);
|
|
433
|
+
}
|
|
434
|
+
minInputProps === null || minInputProps === void 0 ? void 0 : (_minInputProps$onFocu = minInputProps.onFocus) === null || _minInputProps$onFocu === void 0 ? void 0 : _minInputProps$onFocu.call(minInputProps, event);
|
|
435
|
+
},
|
|
436
|
+
onBlur: function onBlur(event) {
|
|
437
|
+
var _minInputProps$onBlur;
|
|
438
|
+
if (canShowDropdown) {
|
|
439
|
+
_this2.onInputBlur(event);
|
|
440
|
+
} else {
|
|
441
|
+
_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(event);
|
|
442
|
+
}
|
|
443
|
+
minInputProps === null || minInputProps === void 0 ? void 0 : (_minInputProps$onBlur = minInputProps.onBlur) === null || _minInputProps$onBlur === void 0 ? void 0 : _minInputProps$onBlur.call(minInputProps, event);
|
|
444
|
+
},
|
|
445
|
+
onMouseDown: function onMouseDown(event) {
|
|
446
|
+
var _minInputProps$onMous;
|
|
447
|
+
if (showInputOnly) {
|
|
448
|
+
_this2.preventPopoverClose = true;
|
|
449
|
+
}
|
|
450
|
+
minInputProps === null || minInputProps === void 0 ? void 0 : (_minInputProps$onMous = minInputProps.onMouseDown) === null || _minInputProps$onMous === void 0 ? void 0 : _minInputProps$onMous.call(minInputProps, event);
|
|
451
|
+
}
|
|
424
452
|
})) : undefined;
|
|
425
453
|
var maxInput = !!showInput ? ___EmotionJSX(EuiRangeInput
|
|
426
454
|
// Overridable props
|
|
427
455
|
, _extends({
|
|
428
456
|
"aria-describedby": this.props['aria-describedby'],
|
|
429
|
-
"aria-label": this.props['aria-label']
|
|
457
|
+
"aria-label": this.props['aria-label'],
|
|
458
|
+
disabled: disabled,
|
|
459
|
+
isInvalid: isInvalid,
|
|
460
|
+
name: "".concat(name, "-maxValue"),
|
|
461
|
+
value: this.upperValue,
|
|
462
|
+
readOnly: readOnly
|
|
430
463
|
}, maxInputProps, {
|
|
431
464
|
// Non-overridable props
|
|
432
465
|
side: "max",
|
|
433
466
|
min: Number(this.lowerValue),
|
|
434
467
|
max: max,
|
|
435
468
|
step: step,
|
|
436
|
-
value: this.upperValue,
|
|
437
|
-
disabled: disabled,
|
|
438
469
|
compressed: compressed,
|
|
439
|
-
onChange: this.handleUpperInputChange,
|
|
440
|
-
onKeyDown: this.handleInputKeyDown,
|
|
441
|
-
name: "".concat(name, "-maxValue"),
|
|
442
|
-
onFocus: canShowDropdown ? this.onInputFocus : onFocus,
|
|
443
|
-
onBlur: canShowDropdown ? this.onInputBlur : onBlur,
|
|
444
|
-
readOnly: readOnly,
|
|
445
470
|
autoSize: !showInputOnly,
|
|
446
471
|
fullWidth: !!showInputOnly && fullWidth,
|
|
447
472
|
controlOnly: showInputOnly,
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
473
|
+
onChange: function onChange(event) {
|
|
474
|
+
var _maxInputProps$onChan;
|
|
475
|
+
_this2.handleUpperInputChange(event);
|
|
476
|
+
maxInputProps === null || maxInputProps === void 0 ? void 0 : (_maxInputProps$onChan = maxInputProps.onChange) === null || _maxInputProps$onChan === void 0 ? void 0 : _maxInputProps$onChan.call(maxInputProps, event);
|
|
477
|
+
},
|
|
478
|
+
onKeyDown: function onKeyDown(event) {
|
|
479
|
+
var _maxInputProps$onKeyD;
|
|
480
|
+
_this2.handleInputKeyDown(event);
|
|
481
|
+
maxInputProps === null || maxInputProps === void 0 ? void 0 : (_maxInputProps$onKeyD = maxInputProps.onKeyDown) === null || _maxInputProps$onKeyD === void 0 ? void 0 : _maxInputProps$onKeyD.call(maxInputProps, event);
|
|
482
|
+
},
|
|
483
|
+
onFocus: function onFocus(event) {
|
|
484
|
+
var _maxInputProps$onFocu;
|
|
485
|
+
if (canShowDropdown) {
|
|
486
|
+
_this2.onInputFocus(event);
|
|
487
|
+
} else {
|
|
488
|
+
_onFocus === null || _onFocus === void 0 ? void 0 : _onFocus(event);
|
|
489
|
+
}
|
|
490
|
+
maxInputProps === null || maxInputProps === void 0 ? void 0 : (_maxInputProps$onFocu = maxInputProps.onFocus) === null || _maxInputProps$onFocu === void 0 ? void 0 : _maxInputProps$onFocu.call(maxInputProps, event);
|
|
491
|
+
},
|
|
492
|
+
onBlur: function onBlur(event) {
|
|
493
|
+
var _maxInputProps$onBlur;
|
|
494
|
+
if (canShowDropdown) {
|
|
495
|
+
_this2.onInputBlur(event);
|
|
496
|
+
} else {
|
|
497
|
+
_onBlur === null || _onBlur === void 0 ? void 0 : _onBlur(event);
|
|
498
|
+
}
|
|
499
|
+
maxInputProps === null || maxInputProps === void 0 ? void 0 : (_maxInputProps$onBlur = maxInputProps.onBlur) === null || _maxInputProps$onBlur === void 0 ? void 0 : _maxInputProps$onBlur.call(maxInputProps, event);
|
|
500
|
+
},
|
|
501
|
+
onMouseDown: function onMouseDown(event) {
|
|
502
|
+
var _maxInputProps$onMous;
|
|
503
|
+
if (showInputOnly) {
|
|
504
|
+
_this2.preventPopoverClose = true;
|
|
505
|
+
}
|
|
506
|
+
maxInputProps === null || maxInputProps === void 0 ? void 0 : (_maxInputProps$onMous = maxInputProps.onMouseDown) === null || _maxInputProps$onMous === void 0 ? void 0 : _maxInputProps$onMous.call(maxInputProps, event);
|
|
507
|
+
}
|
|
452
508
|
})) : undefined;
|
|
453
509
|
var classes = classNames('euiDualRange', className);
|
|
454
510
|
var dualRangeStyles = euiDualRangeStyles();
|
|
@@ -512,8 +568,8 @@ export var EuiDualRangeClass = /*#__PURE__*/function (_Component) {
|
|
|
512
568
|
"aria-hidden": true,
|
|
513
569
|
tabIndex: -1,
|
|
514
570
|
showRange: showRange,
|
|
515
|
-
onFocus:
|
|
516
|
-
onBlur:
|
|
571
|
+
onFocus: _onFocus,
|
|
572
|
+
onBlur: _onBlur
|
|
517
573
|
}, rest)), _this2.state.rangeSliderRefAvailable && ___EmotionJSX(React.Fragment, null, isDraggable && _this2.isValid && ___EmotionJSX(EuiRangeDraggable, {
|
|
518
574
|
min: min,
|
|
519
575
|
max: max,
|
|
@@ -10,13 +10,13 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
11
|
import { euiFocusRing, logicalCSS, logicalTextAlignCSS } from '../../global_styling';
|
|
12
12
|
var _colorCSS = function _colorCSS(color) {
|
|
13
|
-
return "\n color: ".concat(color, ";\n\n &:
|
|
13
|
+
return "\n color: ".concat(color, ";\n\n &:target {\n color: darken(").concat(color, ", 10%);\n }\n ");
|
|
14
14
|
};
|
|
15
15
|
export var euiLinkHoverCSS = function euiLinkHoverCSS() {
|
|
16
16
|
return "\n text-decoration: underline;\n ";
|
|
17
17
|
};
|
|
18
18
|
export var euiLinkFocusCSS = function euiLinkFocusCSS(euiTheme) {
|
|
19
|
-
return "\n text-decoration: underline;\n text-decoration-thickness: ".concat(euiTheme.border.width.thick, "
|
|
19
|
+
return "\n text-decoration: underline;\n text-decoration-thickness: ".concat(euiTheme.border.width.thick, ";\n ");
|
|
20
20
|
};
|
|
21
21
|
export var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
|
|
22
22
|
var euiTheme = euiThemeContext.euiTheme;
|
|
@@ -45,8 +45,8 @@ export var EuiResizableCollapseButton = function EuiResizableCollapseButton(_ref
|
|
|
45
45
|
break;
|
|
46
46
|
}
|
|
47
47
|
return ___EmotionJSX(EuiButtonIcon, _extends({
|
|
48
|
-
display: isCollapsed ? 'empty' : '
|
|
49
|
-
color:
|
|
48
|
+
display: isCollapsed ? 'empty' : 'base',
|
|
49
|
+
color: "text"
|
|
50
50
|
}, rest, {
|
|
51
51
|
className: classes,
|
|
52
52
|
iconType: isCollapsed ? COLLAPSED_ICON : NOT_COLLAPSED_ICON
|
|
@@ -32,7 +32,7 @@ import { htmlIdGenerator } from '../../services/accessibility';
|
|
|
32
32
|
import { isString } from '../../services/predicate';
|
|
33
33
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
34
34
|
import { EuiSearchBox } from './search_box';
|
|
35
|
-
import {
|
|
35
|
+
import { EuiSearchBarFilters } from './search_filters';
|
|
36
36
|
import { Query } from './query';
|
|
37
37
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
38
38
|
export { Query, AST as Ast } from './query';
|
|
@@ -187,7 +187,7 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
187
187
|
var filtersBar = !filters ? undefined : ___EmotionJSX(EuiFlexItem, {
|
|
188
188
|
className: "euiSearchBar__filtersHolder",
|
|
189
189
|
grow: false
|
|
190
|
-
}, ___EmotionJSX(
|
|
190
|
+
}, ___EmotionJSX(EuiSearchBarFilters, {
|
|
191
191
|
filters: filters,
|
|
192
192
|
query: query,
|
|
193
193
|
onChange: this.onFiltersChange
|
|
@@ -25,14 +25,14 @@ import PropTypes from "prop-types";
|
|
|
25
25
|
import { createFilter } from './filters';
|
|
26
26
|
import { EuiFilterGroup } from '../filter_group';
|
|
27
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
|
-
export var
|
|
29
|
-
_inherits(
|
|
30
|
-
var _super = _createSuper(
|
|
31
|
-
function
|
|
32
|
-
_classCallCheck(this,
|
|
28
|
+
export var EuiSearchBarFilters = /*#__PURE__*/function (_Component) {
|
|
29
|
+
_inherits(EuiSearchBarFilters, _Component);
|
|
30
|
+
var _super = _createSuper(EuiSearchBarFilters);
|
|
31
|
+
function EuiSearchBarFilters() {
|
|
32
|
+
_classCallCheck(this, EuiSearchBarFilters);
|
|
33
33
|
return _super.apply(this, arguments);
|
|
34
34
|
}
|
|
35
|
-
_createClass(
|
|
35
|
+
_createClass(EuiSearchBarFilters, [{
|
|
36
36
|
key: "render",
|
|
37
37
|
value: function render() {
|
|
38
38
|
var _this$props = this.props,
|
|
@@ -54,12 +54,12 @@ export var EuiSearchFilters = /*#__PURE__*/function (_Component) {
|
|
|
54
54
|
return ___EmotionJSX(EuiFilterGroup, null, items);
|
|
55
55
|
}
|
|
56
56
|
}]);
|
|
57
|
-
return
|
|
57
|
+
return EuiSearchBarFilters;
|
|
58
58
|
}(Component);
|
|
59
|
-
_defineProperty(
|
|
59
|
+
_defineProperty(EuiSearchBarFilters, "defaultProps", {
|
|
60
60
|
filters: []
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
EuiSearchBarFilters.propTypes = {
|
|
63
63
|
query: PropTypes.any.isRequired,
|
|
64
64
|
onChange: PropTypes.func.isRequired,
|
|
65
65
|
filters: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
package/eui.d.ts
CHANGED
|
@@ -4245,6 +4245,7 @@ declare module '@elastic/eui/src/components/focus_trap/focus_trap' {
|
|
|
4245
4245
|
returnFocus: boolean;
|
|
4246
4246
|
noIsolation: boolean;
|
|
4247
4247
|
scrollLock: boolean;
|
|
4248
|
+
crossFrame: boolean;
|
|
4248
4249
|
gapMode: string;
|
|
4249
4250
|
};
|
|
4250
4251
|
state: State;
|
|
@@ -5043,12 +5044,30 @@ declare module '@elastic/eui/src/components/form/range/range_levels_colors' {
|
|
|
5043
5044
|
export const euiRangeLevelColor: (color: EuiRangeLevelColor | string, euiTheme: UseEuiTheme['euiTheme']) => string;
|
|
5044
5045
|
export const getLevelColor: (levels: EuiRangeLevel[], value: number) => "primary" | "success" | "warning" | "danger" | import("csstype").Property.Color | undefined;
|
|
5045
5046
|
|
|
5047
|
+
}
|
|
5048
|
+
declare module '@elastic/eui/src/components/form/range/range_input.styles' {
|
|
5049
|
+
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
5050
|
+
export const euiRangeInputStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
5051
|
+
euiRangeInput: import("@emotion/utils").SerializedStyles;
|
|
5052
|
+
};
|
|
5053
|
+
|
|
5054
|
+
}
|
|
5055
|
+
declare module '@elastic/eui/src/components/form/range/range_input' {
|
|
5056
|
+
import { FunctionComponent } from 'react';
|
|
5057
|
+
import { EuiFieldNumberProps } from '@elastic/eui/src/components/form/field_number';
|
|
5058
|
+
import type { _SingleRangeValue, _SharedRangeInputSide } from '@elastic/eui/src/components/form/range/types';
|
|
5059
|
+
export interface EuiRangeInputProps extends Omit<EuiFieldNumberProps, 'max' | 'min' | 'value' | 'step'>, Omit<_SingleRangeValue, 'onChange'>, _SharedRangeInputSide {
|
|
5060
|
+
autoSize?: boolean;
|
|
5061
|
+
}
|
|
5062
|
+
export const EuiRangeInput: FunctionComponent<EuiRangeInputProps>;
|
|
5063
|
+
|
|
5046
5064
|
}
|
|
5047
5065
|
declare module '@elastic/eui/src/components/form/range/types' {
|
|
5048
5066
|
import type { ReactNode, CSSProperties, InputHTMLAttributes } from 'react';
|
|
5049
5067
|
import type { CommonProps } from '@elastic/eui/src/components/common';
|
|
5050
5068
|
import type { EuiFormControlLayoutProps } from '@elastic/eui/src/components/form/form_control_layout';
|
|
5051
5069
|
import type { EuiRangeLevelColor } from '@elastic/eui/src/components/form/range/range_levels_colors';
|
|
5070
|
+
import { EuiRangeInputProps } from '@elastic/eui/src/components/form/range/range_input';
|
|
5052
5071
|
/**
|
|
5053
5072
|
* Internal type atoms split up both for easier categorization
|
|
5054
5073
|
* and for easier reusing/picking
|
|
@@ -5193,7 +5212,7 @@ declare module '@elastic/eui/src/components/form/range/types' {
|
|
|
5193
5212
|
/**
|
|
5194
5213
|
* Intended to be used with aria attributes. Some attributes may be overwritten.
|
|
5195
5214
|
*/
|
|
5196
|
-
minInputProps?: Omit<
|
|
5215
|
+
minInputProps?: Partial<Omit<EuiRangeInputProps, 'max' | 'min' | 'step' | 'compressed' | 'autoSize' | 'fullWidth' | 'controlOnly'>>;
|
|
5197
5216
|
/**
|
|
5198
5217
|
* Intended to be used with aria attributes. Some attributes may be overwritten.
|
|
5199
5218
|
*/
|
|
@@ -5337,23 +5356,6 @@ declare module '@elastic/eui/src/components/form/range/range_highlight' {
|
|
|
5337
5356
|
}
|
|
5338
5357
|
export const EuiRangeHighlight: FunctionComponent<EuiRangeHighlightProps>;
|
|
5339
5358
|
|
|
5340
|
-
}
|
|
5341
|
-
declare module '@elastic/eui/src/components/form/range/range_input.styles' {
|
|
5342
|
-
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
5343
|
-
export const euiRangeInputStyles: ({ euiTheme }: UseEuiTheme) => {
|
|
5344
|
-
euiRangeInput: import("@emotion/utils").SerializedStyles;
|
|
5345
|
-
};
|
|
5346
|
-
|
|
5347
|
-
}
|
|
5348
|
-
declare module '@elastic/eui/src/components/form/range/range_input' {
|
|
5349
|
-
import { FunctionComponent } from 'react';
|
|
5350
|
-
import { EuiFieldNumberProps } from '@elastic/eui/src/components/form/field_number';
|
|
5351
|
-
import type { _SingleRangeValue, _SharedRangeInputSide } from '@elastic/eui/src/components/form/range/types';
|
|
5352
|
-
export interface EuiRangeInputProps extends Omit<EuiFieldNumberProps, 'max' | 'min' | 'value' | 'step'>, Omit<_SingleRangeValue, 'onChange'>, _SharedRangeInputSide {
|
|
5353
|
-
autoSize?: boolean;
|
|
5354
|
-
}
|
|
5355
|
-
export const EuiRangeInput: FunctionComponent<EuiRangeInputProps>;
|
|
5356
|
-
|
|
5357
5359
|
}
|
|
5358
5360
|
declare module '@elastic/eui/src/components/form/range/range_label.styles' {
|
|
5359
5361
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
@@ -8168,16 +8170,9 @@ declare module '@elastic/eui/src/components/accordion/accordion' {
|
|
|
8168
8170
|
import React, { Component, HTMLAttributes, ReactNode } from 'react';
|
|
8169
8171
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
8170
8172
|
import { WithEuiThemeProps } from '@elastic/eui/src/services';
|
|
8171
|
-
import { EuiButtonIconProps } from '@elastic/eui/src/components/button';
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
s: string;
|
|
8175
|
-
m: string;
|
|
8176
|
-
l: string;
|
|
8177
|
-
xl: string;
|
|
8178
|
-
};
|
|
8179
|
-
export const PADDING_SIZES: ("s" | "xs" | "m" | "l" | "xl" | "none")[];
|
|
8180
|
-
export type EuiAccordionSize = keyof typeof paddingSizeToClassNameMap;
|
|
8173
|
+
import { EuiButtonIconProps } from '@elastic/eui/src/components/button';
|
|
8174
|
+
export const PADDING_SIZES: readonly ["none", "xs", "s", "m", "l", "xl"];
|
|
8175
|
+
export type EuiAccordionPaddingSize = (typeof PADDING_SIZES)[number];
|
|
8181
8176
|
export type EuiAccordionProps = CommonProps & Omit<HTMLAttributes<HTMLElement>, 'id'> & {
|
|
8182
8177
|
id: string;
|
|
8183
8178
|
/**
|
|
@@ -8225,7 +8220,7 @@ declare module '@elastic/eui/src/components/accordion/accordion' {
|
|
|
8225
8220
|
/**
|
|
8226
8221
|
* The padding around the exposed accordion content.
|
|
8227
8222
|
*/
|
|
8228
|
-
paddingSize?:
|
|
8223
|
+
paddingSize?: EuiAccordionPaddingSize;
|
|
8229
8224
|
/**
|
|
8230
8225
|
* Placement of the arrow indicator, or 'none' to hide it.
|
|
8231
8226
|
*/
|
|
@@ -8276,7 +8271,6 @@ declare module '@elastic/eui/src/components/accordion/accordion' {
|
|
|
8276
8271
|
render(): JSX.Element;
|
|
8277
8272
|
}
|
|
8278
8273
|
export const EuiAccordion: React.ForwardRefExoticComponent<Omit<EuiAccordionProps, "theme"> & React.RefAttributes<Omit<EuiAccordionProps, "theme">>>;
|
|
8279
|
-
export {};
|
|
8280
8274
|
|
|
8281
8275
|
}
|
|
8282
8276
|
declare module '@elastic/eui/src/components/accordion' {
|
|
@@ -19351,12 +19345,12 @@ declare module '@elastic/eui/src/components/search_bar/search_filters' {
|
|
|
19351
19345
|
import { SearchFilterConfig } from '@elastic/eui/src/components/search_bar/filters';
|
|
19352
19346
|
import { Query } from '@elastic/eui/src/components/search_bar/query';
|
|
19353
19347
|
export type { SearchFilterConfig } from '@elastic/eui/src/components/search_bar/filters';
|
|
19354
|
-
interface
|
|
19348
|
+
interface EuiSearchBarFiltersProps {
|
|
19355
19349
|
query: Query;
|
|
19356
19350
|
onChange: (query: Query) => void;
|
|
19357
19351
|
filters: SearchFilterConfig[];
|
|
19358
|
-
} type DefaultProps = Pick<
|
|
19359
|
-
export class
|
|
19352
|
+
} type DefaultProps = Pick<EuiSearchBarFiltersProps, 'filters'>;
|
|
19353
|
+
export class EuiSearchBarFilters extends Component<EuiSearchBarFiltersProps> {
|
|
19360
19354
|
static defaultProps: DefaultProps;
|
|
19361
19355
|
render(): JSX.Element;
|
|
19362
19356
|
}
|
|
@@ -19447,6 +19441,7 @@ declare module '@elastic/eui/src/components/search_bar/search_bar' {
|
|
|
19447
19441
|
declare module '@elastic/eui/src/components/search_bar' {
|
|
19448
19442
|
export type { EuiSearchBarProps, EuiSearchBarOnChangeArgs, QueryType, } from '@elastic/eui/src/components/search_bar/search_bar';
|
|
19449
19443
|
export { EuiSearchBar, Query, Ast } from '@elastic/eui/src/components/search_bar/search_bar';
|
|
19444
|
+
export { EuiSearchBarFilters } from '@elastic/eui/src/components/search_bar/search_filters';
|
|
19450
19445
|
export type { SearchFilterConfig } from '@elastic/eui/src/components/search_bar/search_filters';
|
|
19451
19446
|
export type { FieldValueOptionType } from '@elastic/eui/src/components/search_bar/filters/field_value_selection_filter';
|
|
19452
19447
|
|
package/i18ntokens.json
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"highlighting": "string",
|
|
6
6
|
"loc": {
|
|
7
7
|
"start": {
|
|
8
|
-
"line":
|
|
8
|
+
"line": 349,
|
|
9
9
|
"column": 16,
|
|
10
|
-
"index":
|
|
10
|
+
"index": 10174
|
|
11
11
|
},
|
|
12
12
|
"end": {
|
|
13
|
-
"line":
|
|
13
|
+
"line": 349,
|
|
14
14
|
"column": 76,
|
|
15
|
-
"index":
|
|
15
|
+
"index": 10234
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"filepath": "src/components/accordion/accordion.tsx"
|
|
@@ -4847,14 +4847,14 @@
|
|
|
4847
4847
|
"highlighting": "string",
|
|
4848
4848
|
"loc": {
|
|
4849
4849
|
"start": {
|
|
4850
|
-
"line":
|
|
4850
|
+
"line": 614,
|
|
4851
4851
|
"column": 6,
|
|
4852
|
-
"index":
|
|
4852
|
+
"index": 18263
|
|
4853
4853
|
},
|
|
4854
4854
|
"end": {
|
|
4855
|
-
"line":
|
|
4855
|
+
"line": 617,
|
|
4856
4856
|
"column": 8,
|
|
4857
|
-
"index":
|
|
4857
|
+
"index": 18498
|
|
4858
4858
|
}
|
|
4859
4859
|
},
|
|
4860
4860
|
"filepath": "src/components/form/range/dual_range.tsx"
|
|
@@ -7,7 +7,6 @@ exports.PADDING_SIZES = exports.EuiAccordionClass = exports.EuiAccordion = void
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
var _common = require("../common");
|
|
11
10
|
var _loading = require("../loading");
|
|
12
11
|
var _resize_observer = require("../observer/resize_observer");
|
|
13
12
|
var _text = require("../text");
|
|
@@ -44,15 +43,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
44
43
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
45
44
|
* Side Public License, v 1.
|
|
46
45
|
*/
|
|
47
|
-
var
|
|
48
|
-
none: '',
|
|
49
|
-
xs: 'euiAccordion__padding--xs',
|
|
50
|
-
s: 'euiAccordion__padding--s',
|
|
51
|
-
m: 'euiAccordion__padding--m',
|
|
52
|
-
l: 'euiAccordion__padding--l',
|
|
53
|
-
xl: 'euiAccordion__padding--xl'
|
|
54
|
-
};
|
|
55
|
-
var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
46
|
+
var PADDING_SIZES = ['none', 'xs', 's', 'm', 'l', 'xl'];
|
|
56
47
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
57
48
|
var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
58
49
|
_inherits(EuiAccordionClass, _Component);
|
|
@@ -155,8 +146,7 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
155
146
|
var classes = (0, _classnames.default)('euiAccordion', {
|
|
156
147
|
'euiAccordion-isOpen': isOpen
|
|
157
148
|
}, className);
|
|
158
|
-
var
|
|
159
|
-
var childrenClasses = (0, _classnames.default)(paddingClass, {
|
|
149
|
+
var childrenClasses = (0, _classnames.default)('euiAccordion__children', {
|
|
160
150
|
'euiAccordion__children-isLoading': isLoading
|
|
161
151
|
});
|
|
162
152
|
var buttonClasses = (0, _classnames.default)('euiAccordion__button', buttonClassName, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.className);
|
|
@@ -170,7 +160,7 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
170
160
|
var buttonStyles = (0, _accordion.euiAccordionButtonStyles)(theme);
|
|
171
161
|
var cssButtonStyles = [buttonStyles.euiAccordion__button, isDisabled && buttonStyles.disabled, buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.css];
|
|
172
162
|
var childrenStyles = (0, _accordion.euiAccordionChildrenStyles)(theme);
|
|
173
|
-
var cssChildrenStyles = [childrenStyles.euiAccordion__children, isLoading && childrenStyles.isLoading, paddingSize
|
|
163
|
+
var cssChildrenStyles = [childrenStyles.euiAccordion__children, isLoading && childrenStyles.isLoading, paddingSize && paddingSize !== 'none' && childrenStyles[paddingSize]];
|
|
174
164
|
var childWrapperStyles = (0, _accordion.euiAccordionChildWrapperStyles)(theme);
|
|
175
165
|
var cssChildWrapperStyles = [childWrapperStyles.euiAccordion__childWrapper, isOpen && childWrapperStyles.isOpen];
|
|
176
166
|
var iconButtonStyles = (0, _accordion.euiAccordionIconButtonStyles)(theme);
|
|
@@ -330,7 +320,7 @@ EuiAccordionClass.propTypes = {
|
|
|
330
320
|
/**
|
|
331
321
|
* The padding around the exposed accordion content.
|
|
332
322
|
*/
|
|
333
|
-
paddingSize: _propTypes.default.
|
|
323
|
+
paddingSize: _propTypes.default.any,
|
|
334
324
|
/**
|
|
335
325
|
* Placement of the arrow indicator, or 'none' to hide it.
|
|
336
326
|
*/
|
|
@@ -239,7 +239,7 @@ EuiCollapsibleNavGroup.propTypes = {
|
|
|
239
239
|
/**
|
|
240
240
|
* The padding around the exposed accordion content.
|
|
241
241
|
*/
|
|
242
|
-
paddingSize: _propTypes.default.
|
|
242
|
+
paddingSize: _propTypes.default.any,
|
|
243
243
|
/**
|
|
244
244
|
* Placement of the arrow indicator, or 'none' to hide it.
|
|
245
245
|
*/
|
|
@@ -153,6 +153,7 @@ _defineProperty(EuiFocusTrap, "defaultProps", {
|
|
|
153
153
|
returnFocus: true,
|
|
154
154
|
noIsolation: true,
|
|
155
155
|
scrollLock: false,
|
|
156
|
+
crossFrame: false,
|
|
156
157
|
gapMode: 'padding' // EUI defaults to padding because Kibana's body/layout CSS ignores `margin`
|
|
157
158
|
});
|
|
158
159
|
EuiFocusTrap.propTypes = {
|