@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
|
@@ -71,6 +71,11 @@ export var EuiComboBoxPill = /*#__PURE__*/function (_Component) {
|
|
|
71
71
|
onClick: onClick,
|
|
72
72
|
onClickAriaLabel: onClickAriaLabel
|
|
73
73
|
} : {};
|
|
74
|
+
var content = ___EmotionJSX(React.Fragment, null, option.prepend && ___EmotionJSX("span", {
|
|
75
|
+
className: "euiComboBoxPill__prepend"
|
|
76
|
+
}, option.prepend), children, option.append && ___EmotionJSX("span", {
|
|
77
|
+
className: "euiComboBoxPill__append"
|
|
78
|
+
}, option.append));
|
|
74
79
|
if (onClose) {
|
|
75
80
|
return ___EmotionJSX(EuiI18n, {
|
|
76
81
|
token: "euiComboBoxPill.removeSelection",
|
|
@@ -82,24 +87,27 @@ export var EuiComboBoxPill = /*#__PURE__*/function (_Component) {
|
|
|
82
87
|
return ___EmotionJSX(EuiBadge, _extends({
|
|
83
88
|
className: classes,
|
|
84
89
|
color: color,
|
|
90
|
+
"data-test-subj": "euiComboBoxPill",
|
|
85
91
|
iconOnClick: _this2.onCloseButtonClick,
|
|
86
92
|
iconOnClickAriaLabel: removeSelection,
|
|
87
93
|
iconSide: "right",
|
|
88
94
|
iconType: "cross",
|
|
89
95
|
title: children
|
|
90
|
-
}, onClickProps, rest),
|
|
96
|
+
}, onClickProps, rest), content);
|
|
91
97
|
});
|
|
92
98
|
}
|
|
93
99
|
if (asPlainText) {
|
|
94
100
|
return ___EmotionJSX("span", _extends({
|
|
95
|
-
className: classes
|
|
96
|
-
|
|
101
|
+
className: classes,
|
|
102
|
+
"data-test-subj": "euiComboBoxPill"
|
|
103
|
+
}, rest), content);
|
|
97
104
|
}
|
|
98
105
|
return ___EmotionJSX(EuiBadge, _extends({
|
|
99
106
|
className: classes,
|
|
100
107
|
color: color,
|
|
108
|
+
"data-test-subj": "euiComboBoxPill",
|
|
101
109
|
title: children
|
|
102
|
-
}, rest, onClickProps),
|
|
110
|
+
}, rest, onClickProps), content);
|
|
103
111
|
}
|
|
104
112
|
}]);
|
|
105
113
|
return EuiComboBoxPill;
|
|
@@ -125,12 +133,16 @@ EuiComboBoxPill.propTypes = {
|
|
|
125
133
|
key: PropTypes.string,
|
|
126
134
|
options: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
127
135
|
value: PropTypes.any,
|
|
136
|
+
prepend: PropTypes.node,
|
|
137
|
+
append: PropTypes.node,
|
|
128
138
|
className: PropTypes.string,
|
|
129
139
|
"aria-label": PropTypes.string,
|
|
130
140
|
"data-test-subj": PropTypes.string,
|
|
131
141
|
css: PropTypes.any
|
|
132
142
|
}).isRequired),
|
|
133
143
|
value: PropTypes.any,
|
|
144
|
+
prepend: PropTypes.node,
|
|
145
|
+
append: PropTypes.node,
|
|
134
146
|
className: PropTypes.string,
|
|
135
147
|
"aria-label": PropTypes.string,
|
|
136
148
|
"data-test-subj": PropTypes.string,
|
|
@@ -115,12 +115,16 @@ EuiComboBoxOption.propTypes = {
|
|
|
115
115
|
key: PropTypes.string,
|
|
116
116
|
options: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
117
117
|
value: PropTypes.any,
|
|
118
|
+
prepend: PropTypes.node,
|
|
119
|
+
append: PropTypes.node,
|
|
118
120
|
className: PropTypes.string,
|
|
119
121
|
"aria-label": PropTypes.string,
|
|
120
122
|
"data-test-subj": PropTypes.string,
|
|
121
123
|
css: PropTypes.any
|
|
122
124
|
}).isRequired),
|
|
123
125
|
value: PropTypes.any,
|
|
126
|
+
prepend: PropTypes.node,
|
|
127
|
+
append: PropTypes.node,
|
|
124
128
|
className: PropTypes.string,
|
|
125
129
|
"aria-label": PropTypes.string,
|
|
126
130
|
"data-test-subj": PropTypes.string,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["key", "isGroupLabelOption", "label", "value"],
|
|
1
|
+
var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append"],
|
|
2
2
|
_excluded2 = ["data-test-subj", "activeOptionIndex", "areAllOptionsSelected", "customOptionText", "fullWidth", "getSelectedOptionForSearchValue", "isCaseSensitive", "isLoading", "listRef", "matchingOptions", "onCloseList", "onCreateOption", "onOptionClick", "onOptionEnterKey", "onScroll", "optionRef", "options", "position", "renderOption", "rootId", "rowHeight", "scrollToIndex", "searchValue", "selectedOptions", "singleSelection", "updatePosition", "width", "delimiter", "zIndex", "style", "listboxAriaLabel"];
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
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; }
|
|
@@ -100,6 +100,8 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
100
100
|
isGroupLabelOption = option.isGroupLabelOption,
|
|
101
101
|
label = option.label,
|
|
102
102
|
value = option.value,
|
|
103
|
+
prepend = option.prepend,
|
|
104
|
+
append = option.append,
|
|
103
105
|
rest = _objectWithoutProperties(option, _excluded);
|
|
104
106
|
var _this$props = _this.props,
|
|
105
107
|
singleSelection = _this$props.singleSelection,
|
|
@@ -138,13 +140,17 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
138
140
|
title: label
|
|
139
141
|
}, rest), ___EmotionJSX("span", {
|
|
140
142
|
className: "euiComboBoxOption__contentWrapper"
|
|
141
|
-
},
|
|
143
|
+
}, prepend && ___EmotionJSX("span", {
|
|
144
|
+
className: "euiComboBoxOption__prepend"
|
|
145
|
+
}, prepend), renderOption ? ___EmotionJSX("span", {
|
|
142
146
|
className: OPTION_CONTENT_CLASSNAME
|
|
143
147
|
}, renderOption(option, searchValue, 'euiComboBoxOption__renderOption')) : ___EmotionJSX(EuiHighlight, {
|
|
144
148
|
search: searchValue,
|
|
145
149
|
strict: _this.props.isCaseSensitive,
|
|
146
150
|
className: OPTION_CONTENT_CLASSNAME
|
|
147
|
-
}, label),
|
|
151
|
+
}, label), append && ___EmotionJSX("span", {
|
|
152
|
+
className: "euiComboBoxOption__append"
|
|
153
|
+
}, append), optionIsFocused && !optionIsDisabled ? hitEnterBadge : null));
|
|
148
154
|
});
|
|
149
155
|
return _this;
|
|
150
156
|
}
|
|
@@ -398,12 +404,16 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
398
404
|
key: PropTypes.string,
|
|
399
405
|
options: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
400
406
|
value: PropTypes.any,
|
|
407
|
+
prepend: PropTypes.node,
|
|
408
|
+
append: PropTypes.node,
|
|
401
409
|
className: PropTypes.string,
|
|
402
410
|
"aria-label": PropTypes.string,
|
|
403
411
|
"data-test-subj": PropTypes.string,
|
|
404
412
|
css: PropTypes.any
|
|
405
413
|
}).isRequired),
|
|
406
414
|
value: PropTypes.any,
|
|
415
|
+
prepend: PropTypes.node,
|
|
416
|
+
append: PropTypes.node,
|
|
407
417
|
className: PropTypes.string,
|
|
408
418
|
"aria-label": PropTypes.string,
|
|
409
419
|
"data-test-subj": PropTypes.string,
|
|
@@ -428,12 +438,16 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
428
438
|
key: PropTypes.string,
|
|
429
439
|
options: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
430
440
|
value: PropTypes.any,
|
|
441
|
+
prepend: PropTypes.node,
|
|
442
|
+
append: PropTypes.node,
|
|
431
443
|
className: PropTypes.string,
|
|
432
444
|
"aria-label": PropTypes.string,
|
|
433
445
|
"data-test-subj": PropTypes.string,
|
|
434
446
|
css: PropTypes.any
|
|
435
447
|
}).isRequired),
|
|
436
448
|
value: PropTypes.any,
|
|
449
|
+
prepend: PropTypes.node,
|
|
450
|
+
append: PropTypes.node,
|
|
437
451
|
className: PropTypes.string,
|
|
438
452
|
"aria-label": PropTypes.string,
|
|
439
453
|
"data-test-subj": PropTypes.string,
|
|
@@ -455,12 +469,16 @@ EuiComboBoxOptionsList.propTypes = {
|
|
|
455
469
|
key: PropTypes.string,
|
|
456
470
|
options: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
457
471
|
value: PropTypes.any,
|
|
472
|
+
prepend: PropTypes.node,
|
|
473
|
+
append: PropTypes.node,
|
|
458
474
|
className: PropTypes.string,
|
|
459
475
|
"aria-label": PropTypes.string,
|
|
460
476
|
"data-test-subj": PropTypes.string,
|
|
461
477
|
css: PropTypes.any
|
|
462
478
|
}).isRequired),
|
|
463
479
|
value: PropTypes.any,
|
|
480
|
+
prepend: PropTypes.node,
|
|
481
|
+
append: PropTypes.node,
|
|
464
482
|
className: PropTypes.string,
|
|
465
483
|
"aria-label": PropTypes.string,
|
|
466
484
|
"data-test-subj": PropTypes.string,
|
|
@@ -57,7 +57,7 @@ export var EuiErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
57
57
|
var message = error.message,
|
|
58
58
|
stack = error.stack;
|
|
59
59
|
var idx = (stack === null || stack === void 0 ? void 0 : stack.indexOf(message)) || -1;
|
|
60
|
-
var stackStr = idx > -1 ? stack === null || stack === void 0 ? void 0 : stack.
|
|
60
|
+
var stackStr = idx > -1 ? stack === null || stack === void 0 ? void 0 : stack.substring(idx + message.length + 1) : stack;
|
|
61
61
|
var errorMessage = "Error: ".concat(message, "\n").concat(stackStr);
|
|
62
62
|
this.setState({
|
|
63
63
|
hasError: true,
|
|
@@ -8,7 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { logicalCSS, mathWithUnits,
|
|
11
|
+
import { logicalCSS, mathWithUnits, euiBreakpoint } from '../../global_styling';
|
|
12
12
|
import { euiFormVariables } from '../form/form.styles';
|
|
13
13
|
import { euiFilterButtonDisplay } from './filter_button.styles';
|
|
14
14
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -28,7 +28,7 @@ export var euiFilterGroupStyles = function euiFilterGroupStyles(euiThemeContext)
|
|
|
28
28
|
controlCompressedBorderRadius = _euiFormVariables.controlCompressedBorderRadius,
|
|
29
29
|
controlCompressedHeight = _euiFormVariables.controlCompressedHeight;
|
|
30
30
|
return {
|
|
31
|
-
euiFilterGroup: /*#__PURE__*/css("display:inline-flex;", logicalCSS('max-width', '100%'), " overflow:hidden;background-color:", backgroundColor, ";box-shadow:inset 0 0 0 ", euiTheme.border.width.thin, " ", borderColor, ";>*:not(.euiFilterButton){", euiFilterButtonDisplay(euiThemeContext), ";}.euiPopover__anchor{display:block;.euiFilterButton{", logicalCSS('width', '100%'), ";}}",
|
|
31
|
+
euiFilterGroup: /*#__PURE__*/css("display:inline-flex;", logicalCSS('max-width', '100%'), " overflow:hidden;background-color:", backgroundColor, ";box-shadow:inset 0 0 0 ", euiTheme.border.width.thin, " ", borderColor, ";>*:not(.euiFilterButton){", euiFilterButtonDisplay(euiThemeContext), ";}.euiPopover__anchor{display:block;.euiFilterButton{", logicalCSS('width', '100%'), ";}}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{flex-wrap:wrap;}", euiBreakpoint(euiThemeContext, ['xs']), "{display:flex;.euiFilterButton{flex-grow:1;}};label:euiFilterGroup;"),
|
|
32
32
|
fullWidth: _ref,
|
|
33
33
|
uncompressed: /*#__PURE__*/css("border-radius:", controlBorderRadius, ";", buttonChildrenBorderRadii(controlBorderRadius), ";;label:uncompressed;"),
|
|
34
34
|
compressed: /*#__PURE__*/css("border-radius:", controlCompressedBorderRadius, ";", buttonChildrenBorderRadii(controlCompressedBorderRadius), " .euiFilterButton{", logicalCSS('height', controlCompressedHeight), ";};label:compressed;"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "disabled", "checked", "isFocused", "showIcons"];
|
|
1
|
+
var _excluded = ["theme", "children", "className", "disabled", "checked", "isFocused", "showIcons"];
|
|
2
2
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -27,8 +27,10 @@ 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 { withEuiTheme } from '../../services';
|
|
30
31
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
31
32
|
import { EuiIcon } from '../icon';
|
|
33
|
+
import { euiFilterSelectItemStyles } from './filter_select_item.styles';
|
|
32
34
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
33
35
|
var resolveIconAndColor = function resolveIconAndColor(checked) {
|
|
34
36
|
if (!checked) {
|
|
@@ -44,12 +46,19 @@ var resolveIconAndColor = function resolveIconAndColor(checked) {
|
|
|
44
46
|
color: 'text'
|
|
45
47
|
};
|
|
46
48
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* TODO: This component should removed in favor of EuiSelectable usage
|
|
52
|
+
* once EuiComboBox has been converted to dogfood EuiSelectable.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated - Use EuiSelectable instead
|
|
55
|
+
*/
|
|
56
|
+
export var EuiFilterSelectItemClass = /*#__PURE__*/function (_Component) {
|
|
57
|
+
_inherits(EuiFilterSelectItemClass, _Component);
|
|
58
|
+
var _super = _createSuper(EuiFilterSelectItemClass);
|
|
59
|
+
function EuiFilterSelectItemClass() {
|
|
51
60
|
var _this;
|
|
52
|
-
_classCallCheck(this,
|
|
61
|
+
_classCallCheck(this, EuiFilterSelectItemClass);
|
|
53
62
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
54
63
|
args[_key] = arguments[_key];
|
|
55
64
|
}
|
|
@@ -68,11 +77,12 @@ export var EuiFilterSelectItem = /*#__PURE__*/function (_Component) {
|
|
|
68
77
|
});
|
|
69
78
|
return _this;
|
|
70
79
|
}
|
|
71
|
-
_createClass(
|
|
80
|
+
_createClass(EuiFilterSelectItemClass, [{
|
|
72
81
|
key: "render",
|
|
73
82
|
value: function render() {
|
|
74
83
|
var _this2 = this;
|
|
75
84
|
var _this$props = this.props,
|
|
85
|
+
theme = _this$props.theme,
|
|
76
86
|
children = _this$props.children,
|
|
77
87
|
className = _this$props.className,
|
|
78
88
|
disabled = _this$props.disabled,
|
|
@@ -80,9 +90,9 @@ export var EuiFilterSelectItem = /*#__PURE__*/function (_Component) {
|
|
|
80
90
|
isFocused = _this$props.isFocused,
|
|
81
91
|
showIcons = _this$props.showIcons,
|
|
82
92
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
93
|
+
var styles = euiFilterSelectItemStyles(theme);
|
|
94
|
+
var cssStyles = [styles.euiFilterSelectItem, isFocused && styles.isFocused];
|
|
95
|
+
var classes = classNames('euiFilterSelectItem', className);
|
|
86
96
|
var iconNode;
|
|
87
97
|
if (showIcons) {
|
|
88
98
|
var _resolveIconAndColor = resolveIconAndColor(checked),
|
|
@@ -103,6 +113,7 @@ export var EuiFilterSelectItem = /*#__PURE__*/function (_Component) {
|
|
|
103
113
|
type: "button",
|
|
104
114
|
"aria-selected": isFocused,
|
|
105
115
|
className: classes,
|
|
116
|
+
css: cssStyles,
|
|
106
117
|
disabled: disabled,
|
|
107
118
|
"aria-disabled": disabled
|
|
108
119
|
}, rest), ___EmotionJSX(EuiFlexGroup, {
|
|
@@ -111,17 +122,21 @@ export var EuiFilterSelectItem = /*#__PURE__*/function (_Component) {
|
|
|
111
122
|
component: "span",
|
|
112
123
|
responsive: false
|
|
113
124
|
}, iconNode, ___EmotionJSX(EuiFlexItem, {
|
|
114
|
-
className: "euiFilterSelectItem__content",
|
|
125
|
+
className: "euiFilterSelectItem__content eui-textTruncate",
|
|
115
126
|
component: "span"
|
|
116
127
|
}, children)));
|
|
117
128
|
}
|
|
118
129
|
}]);
|
|
119
|
-
return
|
|
130
|
+
return EuiFilterSelectItemClass;
|
|
120
131
|
}(Component);
|
|
121
|
-
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated - Use EuiSelectable instead
|
|
135
|
+
*/
|
|
136
|
+
_defineProperty(EuiFilterSelectItemClass, "defaultProps", {
|
|
122
137
|
showIcons: true
|
|
123
138
|
});
|
|
124
|
-
|
|
139
|
+
EuiFilterSelectItemClass.propTypes = {
|
|
125
140
|
checked: PropTypes.oneOf(["on", "off"]),
|
|
126
141
|
showIcons: PropTypes.bool,
|
|
127
142
|
isFocused: PropTypes.bool,
|
|
@@ -129,4 +144,5 @@ EuiFilterSelectItem.propTypes = {
|
|
|
129
144
|
"aria-label": PropTypes.string,
|
|
130
145
|
"data-test-subj": PropTypes.string,
|
|
131
146
|
css: PropTypes.any
|
|
132
|
-
};
|
|
147
|
+
};
|
|
148
|
+
export var EuiFilterSelectItem = withEuiTheme(EuiFilterSelectItemClass);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { transparentize } from '../../services';
|
|
11
|
+
import { logicalCSS, logicalShorthandCSS, logicalTextAlignCSS, euiFontSize } from '../../global_styling';
|
|
12
|
+
export var euiFilterSelectItemStyles = function euiFilterSelectItemStyles(euiThemeContext) {
|
|
13
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
14
|
+
var focusStyles = "\n color: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(euiTheme.focus.backgroundColor, ";\n outline-offset: -").concat(euiTheme.focus.width, ";\n text-decoration: underline;\n\n &:disabled {\n background-color: ").concat(transparentize(euiTheme.colors.disabled, 0.1), ";\n }\n ");
|
|
15
|
+
return {
|
|
16
|
+
euiFilterSelectItem: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), " ", logicalShorthandCSS('padding', "".concat(euiTheme.size.xs, " ").concat(euiTheme.size.m)), " ", euiFontSize(euiThemeContext, 's'), " ", logicalTextAlignCSS('left'), " color:", euiTheme.colors.text, ";", logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.lightestShade)), " &:hover{cursor:pointer;text-decoration:underline;}&:focus{", focusStyles, ";}&:disabled{cursor:not-allowed;text-decoration:none;color:", euiTheme.colors.disabledText, ";};label:euiFilterSelectItem;"),
|
|
17
|
+
isFocused: /*#__PURE__*/css(focusStyles, ";;label:isFocused;")
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -66,6 +66,7 @@ export var EuiRangeHighlight = function EuiRangeHighlight(_ref) {
|
|
|
66
66
|
css: cssStyles,
|
|
67
67
|
onClick: onClick
|
|
68
68
|
}, (levels && levels.length === 0 || !levels) && ___EmotionJSX("div", {
|
|
69
|
+
"data-test-subj": "euiRangeHighlightProgress",
|
|
69
70
|
className: "euiRangeHighlight__progress",
|
|
70
71
|
css: cssProgressStyles,
|
|
71
72
|
style: progressStyle
|
|
@@ -27,7 +27,7 @@ var highlight = function highlight(searchSubject, searchValue, isStrict, highlig
|
|
|
27
27
|
var end = chunk.end,
|
|
28
28
|
highlight = chunk.highlight,
|
|
29
29
|
start = chunk.start;
|
|
30
|
-
var value = searchSubject.
|
|
30
|
+
var value = searchSubject.substring(start, end);
|
|
31
31
|
if (highlight) {
|
|
32
32
|
return ___EmotionJSX(EuiMark, {
|
|
33
33
|
key: start,
|
|
@@ -43,9 +43,9 @@ var highlight = function highlight(searchSubject, searchValue, isStrict, highlig
|
|
|
43
43
|
if (indexOfMatch === -1) {
|
|
44
44
|
return searchSubject;
|
|
45
45
|
}
|
|
46
|
-
var preMatch = searchSubject.
|
|
47
|
-
var match = searchSubject.
|
|
48
|
-
var postMatch = searchSubject.
|
|
46
|
+
var preMatch = searchSubject.substring(0, indexOfMatch);
|
|
47
|
+
var match = searchSubject.substring(indexOfMatch, indexOfMatch + searchValue.length);
|
|
48
|
+
var postMatch = searchSubject.substring(indexOfMatch + searchValue.length);
|
|
49
49
|
return ___EmotionJSX(Fragment, null, preMatch, ___EmotionJSX(EuiMark, {
|
|
50
50
|
hasScreenReaderHelpText: hasScreenReaderHelpText
|
|
51
51
|
}, match), postMatch);
|
package/es/components/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export * from './call_out';
|
|
|
20
20
|
export * from './card';
|
|
21
21
|
export * from './code';
|
|
22
22
|
export * from './collapsible_nav';
|
|
23
|
+
export * from './collapsible_nav_beta';
|
|
23
24
|
export * from './color_picker';
|
|
24
25
|
export * from './combo_box';
|
|
25
26
|
export * from './comment_list';
|
|
@@ -266,7 +266,8 @@ export var EuiInlineEditForm = function EuiInlineEditForm(_ref) {
|
|
|
266
266
|
size: sizes.buttonSize,
|
|
267
267
|
"data-test-subj": "euiInlineReadModeButton",
|
|
268
268
|
disabled: isReadOnly,
|
|
269
|
-
css: readModeCssStyles
|
|
269
|
+
css: readModeCssStyles,
|
|
270
|
+
title: readModeValue || placeholder
|
|
270
271
|
}, readModeProps, {
|
|
271
272
|
buttonRef: setReadModeRefs,
|
|
272
273
|
"aria-describedby": classNames(readModeDescribedById, readModeProps === null || readModeProps === void 0 ? void 0 : readModeProps['aria-describedby']),
|
|
@@ -158,8 +158,8 @@ export var EuiMarkdownEditor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
158
158
|
var isPreviewing = viewMode === MODE_VIEWING;
|
|
159
159
|
var isEditing = viewMode === MODE_EDITING;
|
|
160
160
|
var replaceNode = useCallback(function (position, next) {
|
|
161
|
-
var leading = value.
|
|
162
|
-
var trailing = value.
|
|
161
|
+
var leading = value.substring(0, position.start.offset);
|
|
162
|
+
var trailing = value.substring(position.end.offset);
|
|
163
163
|
_onChange("".concat(leading).concat(next).concat(trailing));
|
|
164
164
|
}, [value, _onChange]);
|
|
165
165
|
var contextValue = useMemo(function () {
|
|
@@ -6,24 +6,21 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* NOTE: These were quick conversions of their Sass counterparts.
|
|
11
|
-
* The commented out keys have not been established as necessary yet.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
9
|
import { computed } from '../../../../services/theme/utils';
|
|
10
|
+
import { transparentize } from '../../../../services/color/manipulation';
|
|
15
11
|
import { sizeToPixel } from '../../../../global_styling/functions/size';
|
|
16
12
|
export var focus = {
|
|
13
|
+
// Focus ring
|
|
17
14
|
color: 'currentColor',
|
|
18
|
-
width: computed(sizeToPixel(0.125))
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
width: computed(sizeToPixel(0.125)),
|
|
16
|
+
// Focus background
|
|
17
|
+
transparency: {
|
|
18
|
+
LIGHT: 0.1,
|
|
19
|
+
DARK: 0.2
|
|
20
|
+
},
|
|
21
|
+
backgroundColor: computed(function (_ref) {
|
|
22
|
+
var colors = _ref.colors,
|
|
23
|
+
focus = _ref.focus;
|
|
24
|
+
return transparentize(colors.primary, focus.transparency);
|
|
25
|
+
})
|
|
29
26
|
};
|