@elastic/eui 95.6.0 → 95.7.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 +0 -642
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -642
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/combo_box/combo_box.js +54 -50
- package/es/components/combo_box/combo_box.styles.js +14 -0
- package/es/components/combo_box/combo_box_input/combo_box_input.js +69 -62
- package/es/components/combo_box/combo_box_input/combo_box_input.styles.js +60 -0
- package/es/components/combo_box/combo_box_input/combo_box_pill.js +50 -138
- package/es/components/combo_box/combo_box_input/combo_box_pill.styles.js +25 -0
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +22 -0
- package/es/components/combo_box/combo_box_options_list/index.js +0 -1
- package/es/components/combo_box/utils.js +26 -3
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +3 -4
- package/es/components/flyout/flyout.styles.js +3 -3
- package/es/components/form/form.styles.js +16 -8
- package/es/components/list_group/list_group.styles.js +3 -3
- package/es/components/popover/input_popover.js +3 -3
- package/es/components/search_bar/search_bar.styles.js +2 -4
- package/es/components/selectable/selectable.js +9 -8
- package/es/components/selectable/selectable.styles.js +22 -0
- package/es/components/selectable/selectable_list/selectable_list.js +38 -29
- package/es/components/selectable/selectable_list/selectable_list.styles.js +35 -0
- package/es/components/selectable/selectable_list/selectable_list_item.js +18 -17
- package/es/components/selectable/selectable_list/selectable_list_item.styles.js +56 -0
- package/es/components/selectable/selectable_message/selectable_message.js +6 -3
- package/es/components/selectable/selectable_message/selectable_message.styles.js +17 -0
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +12 -9
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +47 -0
- package/es/components/selectable/selectable_templates/selectable_template_sitewide_option.js +40 -10
- package/es/services/theme/index.js +1 -1
- package/es/services/theme/style_memoization.js +14 -0
- package/eui.d.ts +146 -46
- package/i18ntokens.json +118 -118
- package/lib/components/combo_box/combo_box.js +53 -49
- package/lib/components/combo_box/combo_box.styles.js +20 -0
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +68 -61
- package/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +64 -0
- package/lib/components/combo_box/combo_box_input/combo_box_pill.js +55 -144
- package/lib/components/combo_box/combo_box_input/combo_box_pill.styles.js +31 -0
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +28 -0
- package/lib/components/combo_box/combo_box_options_list/index.js +0 -7
- package/lib/components/combo_box/utils.js +29 -9
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +2 -3
- package/lib/components/flyout/flyout.styles.js +2 -2
- package/lib/components/form/form.styles.js +16 -9
- package/lib/components/list_group/list_group.styles.js +2 -2
- package/lib/components/popover/input_popover.js +2 -2
- package/lib/components/search_bar/search_bar.styles.js +1 -3
- package/lib/components/selectable/selectable.js +9 -8
- package/lib/components/selectable/selectable.styles.js +26 -0
- package/lib/components/selectable/selectable_list/selectable_list.js +38 -29
- package/lib/components/selectable/selectable_list/selectable_list.styles.js +38 -0
- package/lib/components/selectable/selectable_list/selectable_list_item.js +18 -16
- package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +60 -0
- package/lib/components/selectable/selectable_message/selectable_message.js +6 -3
- package/lib/components/selectable/selectable_message/selectable_message.styles.js +23 -0
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +11 -8
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +51 -0
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide_option.js +40 -10
- package/lib/services/theme/index.js +6 -0
- package/lib/services/theme/style_memoization.js +15 -1
- package/optimize/es/components/combo_box/combo_box.js +54 -50
- package/optimize/es/components/combo_box/combo_box.styles.js +14 -0
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +64 -62
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.styles.js +60 -0
- package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +51 -78
- package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.styles.js +25 -0
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +22 -0
- package/optimize/es/components/combo_box/combo_box_options_list/index.js +0 -1
- package/optimize/es/components/combo_box/utils.js +23 -3
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +3 -4
- package/optimize/es/components/flyout/flyout.styles.js +3 -3
- package/optimize/es/components/form/form.styles.js +16 -8
- package/optimize/es/components/list_group/list_group.styles.js +3 -3
- package/optimize/es/components/popover/input_popover.js +3 -3
- package/optimize/es/components/search_bar/search_bar.styles.js +2 -4
- package/optimize/es/components/selectable/selectable.js +9 -8
- package/optimize/es/components/selectable/selectable.styles.js +22 -0
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +38 -29
- package/optimize/es/components/selectable/selectable_list/selectable_list.styles.js +35 -0
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +18 -14
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +56 -0
- package/optimize/es/components/selectable/selectable_message/selectable_message.js +6 -3
- package/optimize/es/components/selectable/selectable_message/selectable_message.styles.js +17 -0
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.js +12 -9
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +47 -0
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide_option.js +35 -10
- package/optimize/es/services/theme/index.js +1 -1
- package/optimize/es/services/theme/style_memoization.js +14 -0
- package/optimize/lib/components/combo_box/combo_box.js +53 -49
- package/optimize/lib/components/combo_box/combo_box.styles.js +20 -0
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +63 -61
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +64 -0
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +52 -81
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.styles.js +31 -0
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +28 -0
- package/optimize/lib/components/combo_box/combo_box_options_list/index.js +0 -7
- package/optimize/lib/components/combo_box/utils.js +26 -9
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +2 -3
- package/optimize/lib/components/flyout/flyout.styles.js +2 -2
- package/optimize/lib/components/form/form.styles.js +16 -9
- package/optimize/lib/components/list_group/list_group.styles.js +2 -2
- package/optimize/lib/components/popover/input_popover.js +2 -2
- package/optimize/lib/components/search_bar/search_bar.styles.js +1 -3
- package/optimize/lib/components/selectable/selectable.js +9 -8
- package/optimize/lib/components/selectable/selectable.styles.js +26 -0
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +38 -29
- package/optimize/lib/components/selectable/selectable_list/selectable_list.styles.js +38 -0
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +18 -14
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +60 -0
- package/optimize/lib/components/selectable/selectable_message/selectable_message.js +6 -3
- package/optimize/lib/components/selectable/selectable_message/selectable_message.styles.js +23 -0
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +11 -8
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +51 -0
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide_option.js +35 -10
- package/optimize/lib/services/theme/index.js +6 -0
- package/optimize/lib/services/theme/style_memoization.js +15 -1
- package/package.json +1 -1
- package/src/components/index.scss +0 -2
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/combo_box/combo_box.js +53 -49
- package/test-env/components/combo_box/combo_box.styles.js +20 -0
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +63 -61
- package/test-env/components/combo_box/combo_box_input/combo_box_input.styles.js +64 -0
- package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +51 -135
- package/test-env/components/combo_box/combo_box_input/combo_box_pill.styles.js +31 -0
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +28 -0
- package/test-env/components/combo_box/combo_box_options_list/index.js +0 -7
- package/test-env/components/combo_box/utils.js +26 -9
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +2 -3
- package/test-env/components/flyout/flyout.styles.js +2 -2
- package/test-env/components/form/form.styles.js +16 -9
- package/test-env/components/list_group/list_group.styles.js +2 -2
- package/test-env/components/popover/input_popover.js +2 -2
- package/test-env/components/search_bar/search_bar.styles.js +1 -3
- package/test-env/components/selectable/selectable.js +9 -8
- package/test-env/components/selectable/selectable.styles.js +26 -0
- package/test-env/components/selectable/selectable_list/selectable_list.js +38 -29
- package/test-env/components/selectable/selectable_list/selectable_list.styles.js +38 -0
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +18 -14
- package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +60 -0
- package/test-env/components/selectable/selectable_message/selectable_message.js +6 -3
- package/test-env/components/selectable/selectable_message/selectable_message.styles.js +23 -0
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +11 -8
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +51 -0
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide_option.js +35 -10
- package/test-env/services/theme/index.js +6 -0
- package/test-env/services/theme/style_memoization.js +15 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_option.js +0 -153
- package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +0 -160
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_option.js +0 -90
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_option.js +0 -98
- package/src/components/combo_box/_combo_box.scss +0 -147
- package/src/components/combo_box/_index.scss +0 -3
- package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +0 -38
- package/src/components/combo_box/combo_box_input/_index.scss +0 -1
- package/src/components/combo_box/combo_box_options_list/_combo_box_option.scss +0 -72
- package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +0 -28
- package/src/components/combo_box/combo_box_options_list/_combo_box_title.scss +0 -12
- package/src/components/combo_box/combo_box_options_list/_index.scss +0 -3
- package/src/components/selectable/_index.scss +0 -5
- package/src/components/selectable/_selectable.scss +0 -8
- package/src/components/selectable/selectable_list/_index.scss +0 -3
- package/src/components/selectable/selectable_list/_selectable_list.scss +0 -38
- package/src/components/selectable/selectable_list/_selectable_list_item.scss +0 -62
- package/src/components/selectable/selectable_list/_variables.scss +0 -2
- package/src/components/selectable/selectable_message/_index.scss +0 -1
- package/src/components/selectable/selectable_message/_selectable_message.scss +0 -19
- package/src/components/selectable/selectable_search/_index.scss +0 -1
- package/src/components/selectable/selectable_search/_selectable_search.scss +0 -3
- package/src/components/selectable/selectable_templates/_index.scss +0 -2
- package/src/components/selectable/selectable_templates/_selectable_template_sitewide_option.scss +0 -39
- package/src/components/selectable/selectable_templates/_variables.scss +0 -26
- package/src/themes/amsterdam/overrides/_combo_box.scss +0 -50
- package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +0 -154
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { euiPaletteColorBlind, makeHighContrastColor } from '../../../services';
|
|
12
|
+
import { euiFontSize, logicalCSS } from '../../../global_styling';
|
|
13
|
+
var visColors = euiPaletteColorBlind();
|
|
14
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
+
name: "q12130-euiSelectableTemplateSitewide__listItem",
|
|
16
|
+
styles: "&:hover,&.euiSelectableListItem-isFocused{&:not([aria-disabled='true']){.euiSelectableListItem__text{text-decoration:none;}.euiSelectableTemplateSitewide__listItemTitle{text-decoration:underline;}}};label:euiSelectableTemplateSitewide__listItem;"
|
|
17
|
+
} : {
|
|
18
|
+
name: "q12130-euiSelectableTemplateSitewide__listItem",
|
|
19
|
+
styles: "&:hover,&.euiSelectableListItem-isFocused{&:not([aria-disabled='true']){.euiSelectableListItem__text{text-decoration:none;}.euiSelectableTemplateSitewide__listItemTitle{text-decoration:underline;}}};label:euiSelectableTemplateSitewide__listItem;",
|
|
20
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
+
};
|
|
22
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
23
|
+
name: "rsb9r7-euiSelectableTemplateSitewide",
|
|
24
|
+
styles: "display:block;label:euiSelectableTemplateSitewide;"
|
|
25
|
+
} : {
|
|
26
|
+
name: "rsb9r7-euiSelectableTemplateSitewide",
|
|
27
|
+
styles: "display:block;label:euiSelectableTemplateSitewide;",
|
|
28
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
+
};
|
|
30
|
+
export var euiSelectableTemplateSitewideStyles = function euiSelectableTemplateSitewideStyles(euiThemeContext) {
|
|
31
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
32
|
+
return {
|
|
33
|
+
euiSelectableTemplateSitewide: _ref2,
|
|
34
|
+
// Override EuiSelectable's default item underline
|
|
35
|
+
euiSelectableTemplateSitewide__listItem: _ref,
|
|
36
|
+
euiSelectableTemplateSitewide__optionMetasList: /*#__PURE__*/css("display:block;", logicalCSS('margin-top', euiTheme.size.xs), " ", euiFontSize(euiThemeContext, 'xs'), " color:", euiTheme.colors.subduedText, ";;label:euiSelectableTemplateSitewide__optionMetasList;"),
|
|
37
|
+
euiSelectableTemplateSitewide__optionMeta: /*#__PURE__*/css("&:not(:last-of-type)::after{content:'\u2022';", logicalCSS('margin-horizontal', euiTheme.size.xs), " color:", euiTheme.colors.subduedText, ";};label:euiSelectableTemplateSitewide__optionMeta;"),
|
|
38
|
+
metaTypes: {
|
|
39
|
+
fontWeight: "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n "),
|
|
40
|
+
application: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[1])(euiTheme), ";;label:application;"),
|
|
41
|
+
deployment: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[0])(euiTheme), ";;label:deployment;"),
|
|
42
|
+
article: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[3])(euiTheme), ";;label:article;"),
|
|
43
|
+
case: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[9])(euiTheme), ";;label:case;"),
|
|
44
|
+
platform: /*#__PURE__*/css("color:", makeHighContrastColor(visColors[5])(euiTheme), ";;label:platform;")
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
@@ -14,25 +15,32 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
15
|
|
|
15
16
|
import React from 'react';
|
|
16
17
|
import classNames from 'classnames';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { RenderWithEuiStylesMemoizer } from '../../../services';
|
|
19
|
+
import { EuiIcon } from '../../icon';
|
|
20
|
+
import { EuiAvatar } from '../../avatar';
|
|
21
|
+
import { EuiHighlight } from '../../highlight';
|
|
22
|
+
import { euiSelectableTemplateSitewideStyles } from './selectable_template_sitewide.styles';
|
|
20
23
|
|
|
21
24
|
/**
|
|
22
25
|
* The generic extension allows consumers to keep their data objects
|
|
23
26
|
* intact without needing to do key lookups when using `renderOption`
|
|
24
27
|
*/
|
|
25
28
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
|
-
export var euiSelectableTemplateSitewideFormatOptions = function euiSelectableTemplateSitewideFormatOptions(options) {
|
|
29
|
+
export var euiSelectableTemplateSitewideFormatOptions = function euiSelectableTemplateSitewideFormatOptions(options, styles) {
|
|
27
30
|
return options.map(function (item) {
|
|
28
31
|
var title = item.label;
|
|
29
32
|
if (item.meta && item.meta.length) {
|
|
30
|
-
title += " \u2022".concat(renderOptionMeta(
|
|
33
|
+
title += " \u2022".concat(renderOptionMeta({
|
|
34
|
+
meta: item.meta,
|
|
35
|
+
stringsOnly: true,
|
|
36
|
+
styles: styles
|
|
37
|
+
}));
|
|
31
38
|
}
|
|
32
39
|
return _objectSpread(_objectSpread({
|
|
33
40
|
key: item.label,
|
|
34
41
|
title: title
|
|
35
42
|
}, item), {}, {
|
|
43
|
+
css: [styles.euiSelectableTemplateSitewide__listItem, item.css],
|
|
36
44
|
className: classNames('euiSelectableTemplateSitewide__listItem', item.className),
|
|
37
45
|
prepend: item.icon ? ___EmotionJSX(EuiIcon, _extends({
|
|
38
46
|
color: "subdued",
|
|
@@ -49,11 +57,22 @@ export var euiSelectableTemplateSitewideRenderOptions = function euiSelectableTe
|
|
|
49
57
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiHighlight, {
|
|
50
58
|
className: "euiSelectableTemplateSitewide__listItemTitle",
|
|
51
59
|
search: searchValue
|
|
52
|
-
}, option.label),
|
|
60
|
+
}, option.label), ___EmotionJSX(RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
|
|
61
|
+
var styles = stylesMemoizer(euiSelectableTemplateSitewideStyles);
|
|
62
|
+
return renderOptionMeta({
|
|
63
|
+
meta: option.meta,
|
|
64
|
+
styles: styles,
|
|
65
|
+
searchValue: searchValue
|
|
66
|
+
});
|
|
67
|
+
}));
|
|
53
68
|
};
|
|
54
|
-
function renderOptionMeta(
|
|
55
|
-
var
|
|
56
|
-
|
|
69
|
+
var renderOptionMeta = function renderOptionMeta(_ref) {
|
|
70
|
+
var meta = _ref.meta,
|
|
71
|
+
styles = _ref.styles,
|
|
72
|
+
_ref$searchValue = _ref.searchValue,
|
|
73
|
+
searchValue = _ref$searchValue === void 0 ? '' : _ref$searchValue,
|
|
74
|
+
_ref$stringsOnly = _ref.stringsOnly,
|
|
75
|
+
stringsOnly = _ref$stringsOnly === void 0 ? false : _ref$stringsOnly;
|
|
57
76
|
if (!meta || meta.length < 1) return;
|
|
58
77
|
var metas = meta.map(function (meta) {
|
|
59
78
|
var text = meta.text,
|
|
@@ -71,13 +90,19 @@ function renderOptionMeta(meta) {
|
|
|
71
90
|
if (meta.type) {
|
|
72
91
|
metaClasses = classNames(["euiSelectableTemplateSitewide__optionMeta--".concat(meta.type)], metaClasses);
|
|
73
92
|
}
|
|
93
|
+
var hasMetaTypeStyles = function hasMetaTypeStyles(metaType) {
|
|
94
|
+
return metaType in styles.metaTypes;
|
|
95
|
+
};
|
|
96
|
+
var cssStyles = [styles.euiSelectableTemplateSitewide__optionMeta].concat(_toConsumableArray(meta.type && hasMetaTypeStyles(meta.type) ? [styles.metaTypes.fontWeight, styles.metaTypes[meta.type]] : []));
|
|
74
97
|
return ___EmotionJSX(EuiHighlight, _extends({
|
|
75
98
|
search: highlightSearchString ? searchValue : '',
|
|
99
|
+
css: cssStyles,
|
|
76
100
|
className: metaClasses,
|
|
77
101
|
key: text
|
|
78
102
|
}, rest), text);
|
|
79
103
|
});
|
|
80
104
|
return stringsOnly ? metas : ___EmotionJSX("span", {
|
|
105
|
+
css: styles.euiSelectableTemplateSitewide__optionMetasList,
|
|
81
106
|
className: "euiSelectableTemplateSitewide__optionMetasList"
|
|
82
107
|
}, metas);
|
|
83
|
-
}
|
|
108
|
+
};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export { EuiSystemContext, EuiThemeContext, EuiNestedThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
|
|
10
10
|
export { useEuiTheme, withEuiTheme, RenderWithEuiTheme, useEuiThemeCSSVariables } from './hooks';
|
|
11
11
|
export { EuiThemeProvider } from './provider';
|
|
12
|
-
export { useEuiMemoizedStyles, withEuiStylesMemoizer } from './style_memoization';
|
|
12
|
+
export { useEuiMemoizedStyles, withEuiStylesMemoizer, RenderWithEuiStylesMemoizer } from './style_memoization';
|
|
13
13
|
export { getEuiDevProviderWarning, setEuiDevProviderWarning } from './warning';
|
|
14
14
|
export { buildTheme, computed, isInverseColorMode, getColorMode, getComputed, getOn, mergeDeep, setOn, Computed } from './utils';
|
|
15
15
|
export { COLOR_MODES_STANDARD } from './types';
|
|
@@ -89,4 +89,18 @@ export var withEuiStylesMemoizer = function withEuiStylesMemoizer(Component) {
|
|
|
89
89
|
var WithEuiStylesMemoizer = /*#__PURE__*/forwardRef(Render);
|
|
90
90
|
WithEuiStylesMemoizer.displayName = componentName;
|
|
91
91
|
return WithEuiStylesMemoizer;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Render prop alternative for complex class components
|
|
96
|
+
* Most useful for scenarios where a HOC may interfere with typing
|
|
97
|
+
*/
|
|
98
|
+
export var RenderWithEuiStylesMemoizer = function RenderWithEuiStylesMemoizer(_ref2) {
|
|
99
|
+
var children = _ref2.children;
|
|
100
|
+
var memoizedStyles = useContext(EuiThemeMemoizedStylesContext);
|
|
101
|
+
var euiThemeContext = useEuiTheme();
|
|
102
|
+
var stylesMemoizer = useCallback(function (stylesGenerator) {
|
|
103
|
+
return getMemoizedStyles(stylesGenerator, memoizedStyles, euiThemeContext);
|
|
104
|
+
}, [memoizedStyles, euiThemeContext]);
|
|
105
|
+
return children(stylesMemoizer);
|
|
92
106
|
};
|
|
@@ -17,11 +17,14 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
17
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
19
|
var _services = require("../../services");
|
|
20
|
+
var _global_styling = require("../../global_styling");
|
|
20
21
|
var _popover = require("../popover");
|
|
21
22
|
var _i18n = require("../i18n");
|
|
23
|
+
var _form = require("../form/form.styles");
|
|
22
24
|
var _matching_options = require("./matching_options");
|
|
23
25
|
var _combo_box_input = require("./combo_box_input/combo_box_input");
|
|
24
26
|
var _combo_box_options_list = require("./combo_box_options_list");
|
|
27
|
+
var _combo_box = require("./combo_box.styles");
|
|
25
28
|
var _react2 = require("@emotion/react");
|
|
26
29
|
var _excluded = ["data-test-subj", "async", "className", "compressed", "customOptionText", "fullWidth", "id", "inputRef", "isCaseSensitive", "isClearable", "isDisabled", "isInvalid", "isLoading", "noSuggestions", "onBlur", "onChange", "onCreateOption", "onSearchChange", "options", "placeholder", "renderOption", "rowHeight", "selectedOptions", "singleSelection", "prepend", "sortMatchesBy", "delimiter", "append", "autoFocus", "truncationProps", "inputPopoverProps", "optionMatcher", "aria-label", "aria-labelledby"];
|
|
27
30
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -487,10 +490,6 @@ var EuiComboBox = exports.EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
487
490
|
// options, this tells the user that they've entered invalid input.
|
|
488
491
|
var markAsInvalid = !!(isInvalid || (hasFocus === false || isListOpen === false) && searchValue);
|
|
489
492
|
var classes = (0, _classnames.default)('euiComboBox', className, {
|
|
490
|
-
'euiComboBox--compressed': compressed,
|
|
491
|
-
'euiComboBox--fullWidth': fullWidth,
|
|
492
|
-
'euiComboBox--prepended': prepend,
|
|
493
|
-
'euiComboBox--appended': append,
|
|
494
493
|
'euiComboBox-isDisabled': isDisabled,
|
|
495
494
|
'euiComboBox-isInvalid': markAsInvalid,
|
|
496
495
|
'euiComboBox-isOpen': isListOpen
|
|
@@ -543,52 +542,57 @@ var EuiComboBox = exports.EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
543
542
|
*
|
|
544
543
|
* https://www.w3.org/TR/wai-aria-practices-1.2/examples/combobox/combobox-autocomplete-list.html
|
|
545
544
|
*/
|
|
546
|
-
(0, _react2.jsx)(
|
|
547
|
-
|
|
548
|
-
"
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
}, inputPopoverProps, {
|
|
558
|
-
isOpen: isListOpen,
|
|
559
|
-
closePopover: this.closeList,
|
|
560
|
-
input: (0, _react2.jsx)(_combo_box_input.EuiComboBoxInput, {
|
|
561
|
-
compressed: compressed,
|
|
562
|
-
focusedOptionId: this.hasActiveOption() ? this.rootId("_option-".concat(this.state.activeOptionIndex)) : undefined,
|
|
545
|
+
(0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiTheme) {
|
|
546
|
+
var cssStyles = [_combo_box.euiComboBoxStyles.euiComboBox, fullWidth ? _combo_box.euiComboBoxStyles.fullWidth : (0, _global_styling.logicalStyle)('max-width', (0, _form.euiFormMaxWidth)(euiTheme))];
|
|
547
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
548
|
+
css: cssStyles
|
|
549
|
+
}, rest, {
|
|
550
|
+
className: classes,
|
|
551
|
+
"data-test-subj": dataTestSubj,
|
|
552
|
+
onKeyDown: _this2.onKeyDown,
|
|
553
|
+
onBlur: _this2.onContainerBlur,
|
|
554
|
+
ref: _this2.comboBoxRefCallback
|
|
555
|
+
}), (0, _react2.jsx)(_popover.EuiInputPopover, (0, _extends2.default)({
|
|
563
556
|
fullWidth: fullWidth,
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
557
|
+
panelPaddingSize: "none",
|
|
558
|
+
disableFocusTrap: true,
|
|
559
|
+
closeOnScroll: true
|
|
560
|
+
}, inputPopoverProps, {
|
|
561
|
+
isOpen: isListOpen,
|
|
562
|
+
closePopover: _this2.closeList,
|
|
563
|
+
input: (0, _react2.jsx)(_combo_box_input.EuiComboBoxInput, {
|
|
564
|
+
compressed: compressed,
|
|
565
|
+
focusedOptionId: _this2.hasActiveOption() ? _this2.rootId("_option-".concat(_this2.state.activeOptionIndex)) : undefined,
|
|
566
|
+
fullWidth: fullWidth,
|
|
567
|
+
hasSelectedOptions: selectedOptions.length > 0,
|
|
568
|
+
id: inputId,
|
|
569
|
+
inputRef: _this2.searchInputRefCallback,
|
|
570
|
+
isDisabled: isDisabled,
|
|
571
|
+
isListOpen: isListOpen,
|
|
572
|
+
noIcon: !!noSuggestions,
|
|
573
|
+
onChange: _this2.onSearchChange,
|
|
574
|
+
onClear: isClearable && !isDisabled ? _this2.clearSelectedOptions : undefined,
|
|
575
|
+
onClick: _this2.onComboBoxClick,
|
|
576
|
+
onCloseListClick: _this2.closeList,
|
|
577
|
+
onFocus: _this2.onComboBoxFocus,
|
|
578
|
+
onOpenListClick: _this2.onOpenListClick,
|
|
579
|
+
onRemoveOption: _this2.onRemoveOption,
|
|
580
|
+
placeholder: placeholder,
|
|
581
|
+
rootId: _this2.rootId,
|
|
582
|
+
searchValue: searchValue,
|
|
583
|
+
selectedOptions: selectedOptions,
|
|
584
|
+
singleSelection: singleSelection,
|
|
585
|
+
value: value,
|
|
586
|
+
append: singleSelection ? append : undefined,
|
|
587
|
+
prepend: singleSelection ? prepend : undefined,
|
|
588
|
+
isLoading: isLoading,
|
|
589
|
+
isInvalid: markAsInvalid,
|
|
590
|
+
autoFocus: autoFocus,
|
|
591
|
+
"aria-label": ariaLabel,
|
|
592
|
+
"aria-labelledby": ariaLabelledby
|
|
593
|
+
})
|
|
594
|
+
}), optionsList));
|
|
595
|
+
})
|
|
592
596
|
);
|
|
593
597
|
}
|
|
594
598
|
}], [{
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiComboBoxStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../global_styling");
|
|
9
|
+
/*
|
|
10
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
12
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
13
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
|
+
* Side Public License, v 1.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
var euiComboBoxStyles = exports.euiComboBoxStyles = {
|
|
18
|
+
euiComboBox: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('height', 'auto'), ";;label:euiComboBox;"),
|
|
19
|
+
fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:fullWidth;")
|
|
20
|
+
};
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.EuiComboBoxInput = void 0;
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
10
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
@@ -20,9 +21,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
20
21
|
var _services = require("../../../services");
|
|
21
22
|
var _accessibility = require("../../accessibility");
|
|
22
23
|
var _form_control_layout = require("../../form/form_control_layout");
|
|
23
|
-
var _num_icons = require("../../form/form_control_layout/_num_icons");
|
|
24
24
|
var _utils = require("../utils");
|
|
25
25
|
var _combo_box_pill = require("./combo_box_pill");
|
|
26
|
+
var _combo_box_input = require("./combo_box_input.styles");
|
|
26
27
|
var _react2 = require("@emotion/react");
|
|
27
28
|
var _excluded = ["key", "label", "color", "onClick", "append", "prepend", "truncationProps", "toolTipContent", "toolTipProps"];
|
|
28
29
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -173,6 +174,7 @@ var EuiComboBoxInput = exports.EuiComboBoxInput = /*#__PURE__*/function (_Compon
|
|
|
173
174
|
}, {
|
|
174
175
|
key: "render",
|
|
175
176
|
value: function render() {
|
|
177
|
+
var _this2 = this;
|
|
176
178
|
var _this$props5 = this.props,
|
|
177
179
|
compressed = _this$props5.compressed,
|
|
178
180
|
focusedOptionId = _this$props5.focusedOptionId,
|
|
@@ -217,6 +219,7 @@ var EuiComboBoxInput = exports.EuiComboBoxInput = /*#__PURE__*/function (_Compon
|
|
|
217
219
|
id: removeOptionMessageId
|
|
218
220
|
}, removeOptionMessageContent));
|
|
219
221
|
}
|
|
222
|
+
var isInGroup = singleSelection && (prepend || append);
|
|
220
223
|
var showPlaceholder = placeholder && !(selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length) && !searchValue;
|
|
221
224
|
var clickProps = {};
|
|
222
225
|
if (!isDisabled && onClear && hasSelectedOptions) {
|
|
@@ -237,68 +240,67 @@ var EuiComboBoxInput = exports.EuiComboBoxInput = /*#__PURE__*/function (_Compon
|
|
|
237
240
|
type: 'arrowDown'
|
|
238
241
|
};
|
|
239
242
|
}
|
|
240
|
-
var
|
|
241
|
-
|
|
242
|
-
clear: !!clickProps.clear,
|
|
243
|
-
isInvalid: isInvalid,
|
|
244
|
-
isLoading: isLoading
|
|
243
|
+
var wrapClasses = (0, _classnames.default)('euiComboBox__inputWrap', {
|
|
244
|
+
'euiComboBox__inputWrap--plainText': this.asPlainText
|
|
245
245
|
});
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
246
|
+
return (0, _react2.jsx)(_services.RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
|
|
247
|
+
var styles = stylesMemoizer(_combo_box_input.euiComboBoxInputStyles);
|
|
248
|
+
var cssStyles = [styles.euiComboBoxInputWrapper, !singleSelection && styles.multiSelect, compressed ? styles.compressed : styles.uncompressed].concat((0, _toConsumableArray2.default)(_this2.asPlainText || showPlaceholder ? [styles.plainText.plainText, compressed ? styles.plainText.compressed : styles.plainText.uncompressed] : []), [isDisabled ? styles.disabled : isInvalid ? styles.invalid : isListOpen ? styles.open : undefined, isInGroup && styles.inGroup]);
|
|
249
|
+
var formLayoutStyles = [styles.formLayout.euiComboBox__formControlLayout, !singleSelection && styles.formLayout.multiSelect, isInGroup && !append && styles.formLayout.prependOnly, isInGroup && !prepend && styles.formLayout.appendOnly];
|
|
250
|
+
return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, (0, _extends2.default)({
|
|
251
|
+
icon: icon
|
|
252
|
+
}, clickProps, {
|
|
253
|
+
inputId: id,
|
|
254
|
+
isLoading: isLoading,
|
|
255
|
+
isInvalid: isInvalid,
|
|
256
|
+
compressed: compressed,
|
|
257
|
+
fullWidth: fullWidth,
|
|
258
|
+
prepend: prepend,
|
|
259
|
+
append: append,
|
|
260
|
+
css: formLayoutStyles
|
|
261
|
+
}), (0, _react2.jsx)("div", {
|
|
262
|
+
css: cssStyles,
|
|
263
|
+
className: wrapClasses,
|
|
264
|
+
"data-test-subj": "comboBoxInput",
|
|
265
|
+
onClick: onClick,
|
|
266
|
+
tabIndex: -1 // becomes onBlur event's relatedTarget, otherwise relatedTarget is null when clicking on this div
|
|
267
|
+
}, _this2.renderPills(), (0, _react2.jsx)(_utils.EuiComboBoxOptionAppendPrepend, {
|
|
268
|
+
option: _this2.asPlainText ? selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions[0] : undefined,
|
|
269
|
+
classNamePrefix: "euiComboBoxPlainTextSelection",
|
|
270
|
+
marginSize: "xxs"
|
|
271
|
+
}, (0, _react2.jsx)("input", {
|
|
272
|
+
"aria-activedescendant": focusedOptionId,
|
|
273
|
+
"aria-autocomplete": "list",
|
|
274
|
+
"aria-controls": isListOpen ? rootId('listbox') : '',
|
|
275
|
+
"aria-expanded": isListOpen,
|
|
276
|
+
"aria-label": ariaLabel,
|
|
277
|
+
"aria-labelledby": ariaLabelledby,
|
|
278
|
+
"aria-invalid": isInvalid,
|
|
279
|
+
css: styles.euiComboBoxInput,
|
|
280
|
+
className: "euiComboBox__input",
|
|
281
|
+
"data-test-subj": "comboBoxSearchInput",
|
|
282
|
+
disabled: isDisabled,
|
|
283
|
+
id: id,
|
|
284
|
+
onBlur: _this2.onBlur,
|
|
285
|
+
onChange: function onChange(event) {
|
|
286
|
+
return _onChange(event.target.value);
|
|
287
|
+
},
|
|
288
|
+
onFocus: _this2.onFocus,
|
|
289
|
+
onKeyDown: _this2.onKeyDown,
|
|
290
|
+
ref: _this2.inputRefCallback,
|
|
291
|
+
role: "combobox",
|
|
292
|
+
style: {
|
|
293
|
+
inlineSize: _this2.asPlainText || showPlaceholder ? '100%' : _this2.state.inputWidth
|
|
294
|
+
},
|
|
295
|
+
placeholder: showPlaceholder ? placeholder : undefined,
|
|
296
|
+
value: _this2.searchValue,
|
|
297
|
+
autoFocus: autoFocus,
|
|
298
|
+
autoComplete: "off"
|
|
299
|
+
// Force the menu to re-open on every input click - only necessary when plain text
|
|
300
|
+
,
|
|
301
|
+
onClick: _this2.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
|
|
302
|
+
})), removeOptionMessage));
|
|
252
303
|
});
|
|
253
|
-
return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, (0, _extends2.default)({
|
|
254
|
-
icon: icon
|
|
255
|
-
}, clickProps, {
|
|
256
|
-
inputId: id,
|
|
257
|
-
isLoading: isLoading,
|
|
258
|
-
isInvalid: isInvalid,
|
|
259
|
-
compressed: compressed,
|
|
260
|
-
fullWidth: fullWidth,
|
|
261
|
-
prepend: prepend,
|
|
262
|
-
append: append
|
|
263
|
-
}), (0, _react2.jsx)("div", {
|
|
264
|
-
className: wrapClasses,
|
|
265
|
-
"data-test-subj": "comboBoxInput",
|
|
266
|
-
onClick: onClick,
|
|
267
|
-
tabIndex: -1 // becomes onBlur event's relatedTarget, otherwise relatedTarget is null when clicking on this div
|
|
268
|
-
}, this.renderPills(), (0, _react2.jsx)(_utils.EuiComboBoxOptionAppendPrepend, {
|
|
269
|
-
option: this.asPlainText ? selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions[0] : undefined,
|
|
270
|
-
classNamePrefix: "euiComboBoxPlainTextSelection"
|
|
271
|
-
}, (0, _react2.jsx)("input", {
|
|
272
|
-
"aria-activedescendant": focusedOptionId,
|
|
273
|
-
"aria-autocomplete": "list",
|
|
274
|
-
"aria-controls": isListOpen ? rootId('listbox') : '',
|
|
275
|
-
"aria-expanded": isListOpen,
|
|
276
|
-
"aria-label": ariaLabel,
|
|
277
|
-
"aria-labelledby": ariaLabelledby,
|
|
278
|
-
"aria-invalid": isInvalid,
|
|
279
|
-
className: "euiComboBox__input",
|
|
280
|
-
"data-test-subj": "comboBoxSearchInput",
|
|
281
|
-
disabled: isDisabled,
|
|
282
|
-
id: id,
|
|
283
|
-
onBlur: this.onBlur,
|
|
284
|
-
onChange: function onChange(event) {
|
|
285
|
-
return _onChange(event.target.value);
|
|
286
|
-
},
|
|
287
|
-
onFocus: this.onFocus,
|
|
288
|
-
onKeyDown: this.onKeyDown,
|
|
289
|
-
ref: this.inputRefCallback,
|
|
290
|
-
role: "combobox",
|
|
291
|
-
style: {
|
|
292
|
-
inlineSize: this.asPlainText || showPlaceholder ? '100%' : this.state.inputWidth
|
|
293
|
-
},
|
|
294
|
-
placeholder: showPlaceholder ? placeholder : undefined,
|
|
295
|
-
value: this.searchValue,
|
|
296
|
-
autoFocus: autoFocus,
|
|
297
|
-
autoComplete: "off"
|
|
298
|
-
// Force the menu to re-open on every input click - only necessary when plain text
|
|
299
|
-
,
|
|
300
|
-
onClick: this.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
|
|
301
|
-
})), removeOptionMessage));
|
|
302
304
|
}
|
|
303
305
|
}]);
|
|
304
306
|
}(_react.Component);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiComboBoxInputStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
9
|
+
var _form = require("../../form/form.styles");
|
|
10
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
|
+
name: "kedu1h-plainText",
|
|
19
|
+
styles: "align-items:center;cursor:text;label:plainText;"
|
|
20
|
+
} : {
|
|
21
|
+
name: "kedu1h-plainText",
|
|
22
|
+
styles: "align-items:center;cursor:text;label:plainText;",
|
|
23
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
+
};
|
|
25
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
26
|
+
name: "dkzr1g-multiSelect",
|
|
27
|
+
styles: "flex-wrap:wrap;label:multiSelect;"
|
|
28
|
+
} : {
|
|
29
|
+
name: "dkzr1g-multiSelect",
|
|
30
|
+
styles: "flex-wrap:wrap;label:multiSelect;",
|
|
31
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
32
|
+
};
|
|
33
|
+
var euiComboBoxInputStyles = exports.euiComboBoxInputStyles = function euiComboBoxInputStyles(euiThemeContext) {
|
|
34
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
35
|
+
var formStyles = (0, _form.euiFormControlStyles)(euiThemeContext);
|
|
36
|
+
return {
|
|
37
|
+
// Wrapper which visually mimics a form control
|
|
38
|
+
euiComboBoxInputWrapper: /*#__PURE__*/(0, _react.css)((0, _form.euiFormControlDefaultShadow)(euiThemeContext), " display:flex;;label:euiComboBoxInputWrapper;"),
|
|
39
|
+
multiSelect: _ref2,
|
|
40
|
+
uncompressed: "\n ".concat(formStyles.uncompressed, "\n ").concat((0, _global_styling.logicalCSS)('height', 'auto'), "\n ").concat((0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.s), "\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n column-gap: ").concat(euiTheme.size.s, ";\n row-gap: ").concat(euiTheme.size.xs, ";\n "),
|
|
41
|
+
compressed: /*#__PURE__*/(0, _react.css)(formStyles.compressed, " ", (0, _global_styling.logicalCSS)('height', 'auto'), " ", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.xs), " column-gap:", euiTheme.size.xs, ";row-gap:", euiTheme.size.xxs, ";;label:compressed;"),
|
|
42
|
+
plainText: {
|
|
43
|
+
plainText: _ref,
|
|
44
|
+
compressed: "\n ".concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n "),
|
|
45
|
+
uncompressed: "\n ".concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.m), "\n ")
|
|
46
|
+
},
|
|
47
|
+
invalid: /*#__PURE__*/(0, _react.css)(formStyles.invalid, ";label:invalid;"),
|
|
48
|
+
disabled: /*#__PURE__*/(0, _react.css)(formStyles.disabled, ";label:disabled;"),
|
|
49
|
+
open: /*#__PURE__*/(0, _react.css)(formStyles.focus, ";label:open;"),
|
|
50
|
+
inGroup: /*#__PURE__*/(0, _react.css)(formStyles.inGroup, ";label:inGroup;"),
|
|
51
|
+
// Actual input element, which has variable width depending on its value
|
|
52
|
+
euiComboBoxInput: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.l), " ", (0, _global_styling.logicalCSS)('min-width', '2px'), " ", (0, _global_styling.logicalCSS)('max-width', '100%'), (0, _form.euiFormControlText)(euiThemeContext), " background:transparent;&:disabled{color:", euiTheme.colors.disabledText, ";}appearance:none!important;border:none!important;box-shadow:none!important;outline:none!important;;label:euiComboBoxInput;"),
|
|
53
|
+
// EuiFormControlLayout overrides
|
|
54
|
+
formLayout: {
|
|
55
|
+
euiComboBox__formControlLayout: /*#__PURE__*/(0, _react.css)(";label:euiComboBox__formControlLayout;"),
|
|
56
|
+
// Allow the form control to expand to any height to accommodate multiple rows of pills
|
|
57
|
+
// TODO: Remove && specificity override once EuiFormControlLayout is on Emotion
|
|
58
|
+
multiSelect: /*#__PURE__*/(0, _react.css)("&&{", (0, _global_styling.logicalCSS)('height', 'auto'), ";};label:multiSelect;"),
|
|
59
|
+
// Fix overflowing input wrapper background
|
|
60
|
+
prependOnly: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{", (0, _global_styling.logicalCSS)('border-top-right-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-right-radius', 'inherit'), ";};label:prependOnly;"),
|
|
61
|
+
appendOnly: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{", (0, _global_styling.logicalCSS)('border-top-left-radius', 'inherit'), " ", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 'inherit'), ";};label:appendOnly;")
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
};
|