@elastic/eui 88.3.0 → 88.4.1
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 +7 -142
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +7 -142
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/in_memory_table.js +85 -34
- package/es/components/card/card.js +3 -3
- package/es/components/combo_box/combo_box.js +16 -4
- package/es/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/es/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +62 -13
- package/es/components/datagrid/controls/column_selector.js +5 -3
- package/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/es/components/description_list/description_list_title.js +0 -1
- package/es/components/description_list/description_list_title.styles.js +1 -1
- package/es/components/drag_and_drop/draggable.js +18 -23
- package/es/components/drag_and_drop/draggable.styles.js +56 -0
- package/es/components/drag_and_drop/droppable.js +24 -21
- package/es/components/drag_and_drop/droppable.styles.js +51 -0
- package/es/components/search_bar/search_box.js +54 -88
- package/es/components/table/table_pagination/table_pagination.js +1 -0
- package/es/components/text_truncate/text_truncate.js +12 -6
- package/es/components/text_truncate/text_truncate.styles.js +10 -10
- package/es/test/rtl/custom_render.js +1 -1
- package/eui.d.ts +480 -420
- package/i18ntokens.json +142 -88
- package/lib/components/basic_table/in_memory_table.js +85 -34
- package/lib/components/card/card.js +3 -3
- package/lib/components/combo_box/combo_box.js +16 -4
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/lib/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +62 -13
- package/lib/components/datagrid/controls/column_selector.js +4 -2
- package/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/lib/components/description_list/description_list_title.js +0 -1
- package/lib/components/description_list/description_list_title.styles.js +1 -1
- package/lib/components/drag_and_drop/draggable.js +17 -22
- package/lib/components/drag_and_drop/draggable.styles.js +62 -0
- package/lib/components/drag_and_drop/droppable.js +26 -22
- package/lib/components/drag_and_drop/droppable.styles.js +57 -0
- package/lib/components/search_bar/search_box.js +61 -93
- package/lib/components/table/table_pagination/table_pagination.js +1 -0
- package/lib/components/text_truncate/text_truncate.js +10 -4
- package/lib/components/text_truncate/text_truncate.styles.js +10 -10
- package/lib/test/rtl/custom_render.js +2 -2
- package/optimize/es/components/basic_table/in_memory_table.js +62 -34
- package/optimize/es/components/card/card.js +3 -3
- package/optimize/es/components/combo_box/combo_box.js +6 -4
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +52 -10
- package/optimize/es/components/datagrid/controls/column_selector.js +5 -3
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/optimize/es/components/description_list/description_list_title.js +0 -1
- package/optimize/es/components/description_list/description_list_title.styles.js +1 -1
- package/optimize/es/components/drag_and_drop/draggable.js +17 -22
- package/optimize/es/components/drag_and_drop/draggable.styles.js +56 -0
- package/optimize/es/components/drag_and_drop/droppable.js +23 -20
- package/optimize/es/components/drag_and_drop/droppable.styles.js +51 -0
- package/optimize/es/components/search_bar/search_box.js +50 -83
- package/optimize/es/components/table/table_pagination/table_pagination.js +1 -0
- package/optimize/es/components/text_truncate/text_truncate.js +12 -6
- package/optimize/es/components/text_truncate/text_truncate.styles.js +10 -10
- package/optimize/es/test/rtl/custom_render.js +1 -1
- package/optimize/lib/components/basic_table/in_memory_table.js +62 -34
- package/optimize/lib/components/card/card.js +3 -3
- package/optimize/lib/components/combo_box/combo_box.js +6 -4
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +52 -10
- package/optimize/lib/components/datagrid/controls/column_selector.js +4 -2
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/optimize/lib/components/description_list/description_list_title.js +0 -1
- package/optimize/lib/components/description_list/description_list_title.styles.js +1 -1
- package/optimize/lib/components/drag_and_drop/draggable.js +16 -21
- package/optimize/lib/components/drag_and_drop/draggable.styles.js +62 -0
- package/optimize/lib/components/drag_and_drop/droppable.js +25 -21
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +57 -0
- package/optimize/lib/components/search_bar/search_box.js +57 -89
- package/optimize/lib/components/table/table_pagination/table_pagination.js +1 -0
- package/optimize/lib/components/text_truncate/text_truncate.js +10 -4
- package/optimize/lib/components/text_truncate/text_truncate.styles.js +10 -10
- package/optimize/lib/test/rtl/custom_render.js +2 -2
- package/package.json +4 -4
- package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +0 -1
- package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +8 -0
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/basic_table/in_memory_table.js +85 -34
- package/test-env/components/card/card.js +3 -3
- package/test-env/components/combo_box/combo_box.js +16 -4
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +61 -12
- package/test-env/components/datagrid/controls/column_selector.js +4 -2
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/test-env/components/description_list/description_list_title.js +0 -1
- package/test-env/components/description_list/description_list_title.styles.js +1 -1
- package/test-env/components/drag_and_drop/draggable.js +17 -22
- package/test-env/components/drag_and_drop/draggable.styles.js +62 -0
- package/test-env/components/drag_and_drop/droppable.js +26 -22
- package/test-env/components/drag_and_drop/droppable.styles.js +57 -0
- package/test-env/components/search_bar/search_box.js +60 -88
- package/test-env/components/table/table_pagination/table_pagination.js +1 -0
- package/test-env/components/text_truncate/text_truncate.js +10 -4
- package/test-env/components/text_truncate/text_truncate.styles.js +10 -10
- package/test-env/test/rtl/custom_render.js +2 -2
- package/src/components/drag_and_drop/_draggable.scss +0 -41
- package/src/components/drag_and_drop/_droppable.scss +0 -40
- package/src/components/drag_and_drop/_index.scss +0 -3
- package/src/components/drag_and_drop/_variables.scss +0 -5
- package/src/themes/amsterdam/overrides/_description_list.scss +0 -7
|
@@ -7,7 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
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", "aria-label", "aria-labelledby"];
|
|
10
|
+
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", "aria-label", "aria-labelledby"];
|
|
11
11
|
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; }
|
|
12
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -27,12 +27,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
27
27
|
import React, { Component } from 'react';
|
|
28
28
|
import classNames from 'classnames';
|
|
29
29
|
import { findPopoverPosition, htmlIdGenerator, keys } from '../../services';
|
|
30
|
+
import { getElementZIndex } from '../../services/popover';
|
|
30
31
|
import { EuiPortal } from '../portal';
|
|
31
32
|
import { EuiI18n } from '../i18n';
|
|
32
|
-
import { EuiComboBoxOptionsList } from './combo_box_options_list';
|
|
33
33
|
import { getMatchingOptions, flattenOptionGroups, getSelectedOptionForSearchValue, transformForCaseSensitivity } from './matching_options';
|
|
34
34
|
import { EuiComboBoxInput } from './combo_box_input/combo_box_input';
|
|
35
|
-
import {
|
|
35
|
+
import { EuiComboBoxOptionsList } from './combo_box_options_list';
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Because of how TypeScript's LibraryManagedAttributes is designed to handle defaultProps (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#support-for-defaultprops-in-jsx)
|
|
@@ -634,6 +634,7 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
634
634
|
delimiter = _this$props8.delimiter,
|
|
635
635
|
append = _this$props8.append,
|
|
636
636
|
autoFocus = _this$props8.autoFocus,
|
|
637
|
+
truncationProps = _this$props8.truncationProps,
|
|
637
638
|
ariaLabel = _this$props8['aria-label'],
|
|
638
639
|
ariaLabelledby = _this$props8['aria-labelledby'],
|
|
639
640
|
rest = _objectWithoutProperties(_this$props8, _excluded);
|
|
@@ -702,7 +703,8 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
702
703
|
width: width,
|
|
703
704
|
delimiter: delimiter,
|
|
704
705
|
getSelectedOptionForSearchValue: getSelectedOptionForSearchValue,
|
|
705
|
-
listboxAriaLabel: listboxAriaLabel
|
|
706
|
+
listboxAriaLabel: listboxAriaLabel,
|
|
707
|
+
truncationProps: truncationProps
|
|
706
708
|
});
|
|
707
709
|
}));
|
|
708
710
|
}
|
|
@@ -8,7 +8,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
-
var _excluded = ["key", "label", "color", "onClick", "append", "prepend"];
|
|
11
|
+
var _excluded = ["key", "label", "color", "onClick", "append", "prepend", "truncationProps"];
|
|
12
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
14
|
/*
|
|
@@ -148,6 +148,7 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
148
148
|
onClick = option.onClick,
|
|
149
149
|
append = option.append,
|
|
150
150
|
prepend = option.prepend,
|
|
151
|
+
truncationProps = option.truncationProps,
|
|
151
152
|
rest = _objectWithoutProperties(option, _excluded);
|
|
152
153
|
var pillOnClose = isDisabled || singleSelection || onClick ? undefined : onRemoveOption;
|
|
153
154
|
return ___EmotionJSX(EuiComboBoxPill, _extends({
|
|
@@ -66,7 +66,9 @@ export var EuiComboBoxPill = /*#__PURE__*/function (_Component) {
|
|
|
66
66
|
} : {};
|
|
67
67
|
var content = ___EmotionJSX(React.Fragment, null, option.prepend && ___EmotionJSX("span", {
|
|
68
68
|
className: "euiComboBoxPill__prepend"
|
|
69
|
-
}, option.prepend),
|
|
69
|
+
}, option.prepend), ___EmotionJSX("span", {
|
|
70
|
+
className: "eui-textTruncate"
|
|
71
|
+
}, children), option.append && ___EmotionJSX("span", {
|
|
70
72
|
className: "euiComboBoxPill__append"
|
|
71
73
|
}, option.append));
|
|
72
74
|
if (onClose) {
|
|
@@ -7,8 +7,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append"],
|
|
11
|
-
_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"];
|
|
10
|
+
var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append", "truncationProps"],
|
|
11
|
+
_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", "truncationProps", "listboxAriaLabel"];
|
|
12
12
|
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; }
|
|
13
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
14
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -26,6 +26,7 @@ import classNames from 'classnames';
|
|
|
26
26
|
import { FixedSizeList } from 'react-window';
|
|
27
27
|
import { EuiFlexGroup, EuiFlexItem } from '../../flex';
|
|
28
28
|
import { EuiHighlight } from '../../highlight';
|
|
29
|
+
import { EuiMark } from '../../mark';
|
|
29
30
|
import { EuiText } from '../../text';
|
|
30
31
|
import { EuiLoadingSpinner } from '../../loading';
|
|
31
32
|
import { EuiComboBoxTitle } from './combo_box_title';
|
|
@@ -33,8 +34,8 @@ import { EuiI18n } from '../../i18n';
|
|
|
33
34
|
import { EuiFilterSelectItem } from '../../filter_group/filter_select_item';
|
|
34
35
|
import { EuiBadge } from '../../badge';
|
|
35
36
|
import { EuiPopoverPanel } from '../../popover/popover_panel';
|
|
37
|
+
import { EuiTextTruncate } from '../../text_truncate';
|
|
36
38
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
37
|
-
var OPTION_CONTENT_CLASSNAME = 'euiComboBoxOption__content';
|
|
38
39
|
var hitEnterBadge = ___EmotionJSX(EuiBadge, {
|
|
39
40
|
className: "euiComboBoxOption__enterBadge",
|
|
40
41
|
color: "hollow",
|
|
@@ -95,6 +96,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
95
96
|
value = option.value,
|
|
96
97
|
prepend = option.prepend,
|
|
97
98
|
append = option.append,
|
|
99
|
+
_truncationProps = option.truncationProps,
|
|
98
100
|
rest = _objectWithoutProperties(option, _excluded);
|
|
99
101
|
var _this$props = _this.props,
|
|
100
102
|
singleSelection = _this$props.singleSelection,
|
|
@@ -105,6 +107,9 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
105
107
|
renderOption = _this$props.renderOption,
|
|
106
108
|
searchValue = _this$props.searchValue,
|
|
107
109
|
rootId = _this$props.rootId;
|
|
110
|
+
var hasTruncationProps = _this.props.truncationProps || _truncationProps;
|
|
111
|
+
var truncationProps = hasTruncationProps ? // Individual truncation settings should override component prop
|
|
112
|
+
_objectSpread(_objectSpread({}, _this.props.truncationProps), _truncationProps) : undefined;
|
|
108
113
|
if (isGroupLabelOption) {
|
|
109
114
|
return ___EmotionJSX("div", {
|
|
110
115
|
key: key !== null && key !== void 0 ? key : label,
|
|
@@ -135,16 +140,52 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
135
140
|
className: "euiComboBoxOption__contentWrapper"
|
|
136
141
|
}, prepend && ___EmotionJSX("span", {
|
|
137
142
|
className: "euiComboBoxOption__prepend"
|
|
138
|
-
}, prepend),
|
|
139
|
-
className:
|
|
140
|
-
}, renderOption(option, searchValue, 'euiComboBoxOption__renderOption')
|
|
141
|
-
search: searchValue,
|
|
142
|
-
strict: _this.props.isCaseSensitive,
|
|
143
|
-
className: OPTION_CONTENT_CLASSNAME
|
|
144
|
-
}, label), append && ___EmotionJSX("span", {
|
|
143
|
+
}, prepend), ___EmotionJSX("span", {
|
|
144
|
+
className: "euiComboBoxOption__content"
|
|
145
|
+
}, renderOption ? renderOption(option, searchValue, 'euiComboBoxOption__renderOption') : _this.renderTruncatedOption(label, truncationProps)), append && ___EmotionJSX("span", {
|
|
145
146
|
className: "euiComboBoxOption__append"
|
|
146
147
|
}, append), optionIsFocused && !optionIsDisabled ? hitEnterBadge : null));
|
|
147
148
|
});
|
|
149
|
+
_defineProperty(_assertThisInitialized(_this), "optionWidth", void 0);
|
|
150
|
+
_defineProperty(_assertThisInitialized(_this), "setOptionWidth", function (width) {
|
|
151
|
+
_this.optionWidth = width;
|
|
152
|
+
});
|
|
153
|
+
_defineProperty(_assertThisInitialized(_this), "renderTruncatedOption", function (text, truncationProps) {
|
|
154
|
+
var searchValue = _this.props.searchValue.trim();
|
|
155
|
+
if (!truncationProps && !searchValue) {
|
|
156
|
+
// Default to CSS text-overflow
|
|
157
|
+
return text;
|
|
158
|
+
}
|
|
159
|
+
if (!searchValue) {
|
|
160
|
+
return ___EmotionJSX(EuiTextTruncate, _extends({
|
|
161
|
+
width: _this.optionWidth,
|
|
162
|
+
onResize: _this.setOptionWidth
|
|
163
|
+
}, truncationProps, {
|
|
164
|
+
text: text
|
|
165
|
+
}), function (text) {
|
|
166
|
+
return text;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
var searchPositionStart = _this.props.isCaseSensitive ? text.indexOf(searchValue) : text.toLowerCase().indexOf(searchValue.toLowerCase());
|
|
170
|
+
var searchPositionCenter = searchPositionStart + Math.floor(searchValue.length / 2);
|
|
171
|
+
return ___EmotionJSX(EuiTextTruncate, _extends({
|
|
172
|
+
width: _this.optionWidth,
|
|
173
|
+
onResize: _this.setOptionWidth
|
|
174
|
+
}, truncationProps, {
|
|
175
|
+
// When searching, don't allow overriding the truncation settings
|
|
176
|
+
truncation: "startEnd",
|
|
177
|
+
truncationPosition: searchPositionCenter,
|
|
178
|
+
text: text
|
|
179
|
+
}), function (text) {
|
|
180
|
+
return ___EmotionJSX(React.Fragment, null, text.length >= searchValue.length ? ___EmotionJSX(EuiHighlight, {
|
|
181
|
+
search: searchValue,
|
|
182
|
+
strict: _this.props.isCaseSensitive
|
|
183
|
+
}, text) :
|
|
184
|
+
// If the available truncated text is shorter than the full search string,
|
|
185
|
+
// just highlight the entire truncated text
|
|
186
|
+
___EmotionJSX(EuiMark, null, text));
|
|
187
|
+
});
|
|
188
|
+
});
|
|
148
189
|
return _this;
|
|
149
190
|
}
|
|
150
191
|
_createClass(EuiComboBoxOptionsList, [{
|
|
@@ -228,6 +269,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
228
269
|
delimiter = _this$props2.delimiter,
|
|
229
270
|
zIndex = _this$props2.zIndex,
|
|
230
271
|
style = _this$props2.style,
|
|
272
|
+
truncationProps = _this$props2.truncationProps,
|
|
231
273
|
listboxAriaLabel = _this$props2.listboxAriaLabel,
|
|
232
274
|
rest = _objectWithoutProperties(_this$props2, _excluded2);
|
|
233
275
|
var emptyStateContent;
|
|
@@ -9,7 +9,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
9
9
|
* Side Public License, v 1.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import React, {
|
|
12
|
+
import React, { useState, useMemo, useCallback } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { EuiPopover, EuiPopoverFooter, EuiPopoverTitle } from '../../popover';
|
|
15
15
|
import { EuiI18n, useEuiI18n } from '../../i18n';
|
|
@@ -137,7 +137,7 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
|
|
|
137
137
|
}, ___EmotionJSX(EuiDroppable, {
|
|
138
138
|
droppableId: "columnOrder",
|
|
139
139
|
isDropDisabled: !isDragEnabled
|
|
140
|
-
}, ___EmotionJSX(Fragment, null, filteredColumns.map(function (id, index) {
|
|
140
|
+
}, ___EmotionJSX(React.Fragment, null, filteredColumns.map(function (id, index) {
|
|
141
141
|
return ___EmotionJSX(EuiDraggable, {
|
|
142
142
|
key: id,
|
|
143
143
|
draggableId: id,
|
|
@@ -147,7 +147,9 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
|
|
|
147
147
|
customDragHandle: true
|
|
148
148
|
}, function (provided, state) {
|
|
149
149
|
return ___EmotionJSX("div", {
|
|
150
|
-
className:
|
|
150
|
+
className: classNames('euiDataGridColumnSelector__item', {
|
|
151
|
+
'euiDataGridColumnSelector__item-isDragging': state.isDragging
|
|
152
|
+
}),
|
|
151
153
|
"data-test-subj": "dataGridColumnSelectorColumnItem-".concat(id)
|
|
152
154
|
}, ___EmotionJSX(EuiFlexGroup, {
|
|
153
155
|
responsive: false,
|
|
@@ -11,6 +11,7 @@ var _excluded = ["id", "display", "direction", "index", "sorting", "schema", "sc
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
|
+
import classNames from 'classnames';
|
|
14
15
|
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
15
16
|
import { EuiButtonGroup, EuiButtonIcon } from '../../button';
|
|
16
17
|
import { EuiDraggable } from '../../drag_and_drop';
|
|
@@ -60,7 +61,9 @@ export var EuiDataGridColumnSortingDraggable = function EuiDataGridColumnSorting
|
|
|
60
61
|
customDragHandle: true
|
|
61
62
|
}, rest), function (provided, state) {
|
|
62
63
|
return ___EmotionJSX("div", {
|
|
63
|
-
className:
|
|
64
|
+
className: classNames('euiDataGridColumnSorting__item', {
|
|
65
|
+
'euiDataGridColumnSorting__item-isDragging': state.isDragging
|
|
66
|
+
})
|
|
64
67
|
}, ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", null, ___EmotionJSX(EuiI18n, {
|
|
65
68
|
token: "euiColumnSortingDraggable.activeSortLabel",
|
|
66
69
|
default: "{display} is sorting this data grid",
|
|
@@ -34,7 +34,6 @@ export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
34
34
|
switch (type) {
|
|
35
35
|
case 'inline':
|
|
36
36
|
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
37
|
-
conditionalStyles.push(styles[rowGutterSize]);
|
|
38
37
|
break;
|
|
39
38
|
case 'row':
|
|
40
39
|
conditionalStyles.push(styles[rowGutterSize]);
|
|
@@ -27,7 +27,7 @@ export var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyle
|
|
|
27
27
|
// Inline types
|
|
28
28
|
inlineStyles: {
|
|
29
29
|
normal: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), " ", logicalCSS('padding-vertical', '1px'), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), ";;label:normal;"),
|
|
30
|
-
compressed: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " ", logicalCSS('padding-vertical', '0'), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
|
|
30
|
+
compressed: /*#__PURE__*/css("font-size:", euiFontSize(euiThemeContext, 'xs').fontSize, ";line-height:", euiTheme.font.lineHeightMultiplier, ";", logicalCSS('padding-vertical', '0'), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
|
|
31
31
|
},
|
|
32
32
|
// Alignment
|
|
33
33
|
right: /*#__PURE__*/css(logicalTextAlignCSS('right'), ";;label:right;"),
|
|
@@ -12,17 +12,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import React, {
|
|
15
|
+
import React, { useContext } from 'react';
|
|
16
16
|
import { Draggable } from '@hello-pangea/dnd';
|
|
17
17
|
import classNames from 'classnames';
|
|
18
|
+
import { useEuiTheme, cloneElementWithCss } from '../../services';
|
|
18
19
|
import { EuiDroppableContext } from './droppable';
|
|
20
|
+
import { euiDraggableStyles, euiDraggableItemStyles } from './draggable.styles';
|
|
19
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
|
-
var spacingToClassNameMap = {
|
|
21
|
-
none: null,
|
|
22
|
-
s: 'euiDraggable--s',
|
|
23
|
-
m: 'euiDraggable--m',
|
|
24
|
-
l: 'euiDraggable--l'
|
|
25
|
-
};
|
|
26
22
|
export var EuiDraggable = function EuiDraggable(_ref) {
|
|
27
23
|
var _ref$customDragHandle = _ref.customDragHandle,
|
|
28
24
|
customDragHandle = _ref$customDragHandle === void 0 ? false : _ref$customDragHandle,
|
|
@@ -44,29 +40,26 @@ export var EuiDraggable = function EuiDraggable(_ref) {
|
|
|
44
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
41
|
var _useContext = useContext(EuiDroppableContext),
|
|
46
42
|
cloneItems = _useContext.cloneItems;
|
|
43
|
+
var euiTheme = useEuiTheme();
|
|
44
|
+
var styles = euiDraggableStyles(euiTheme);
|
|
47
45
|
return ___EmotionJSX(Draggable, _extends({
|
|
48
46
|
draggableId: draggableId,
|
|
49
47
|
index: index,
|
|
50
48
|
isDragDisabled: isDragDisabled
|
|
51
49
|
}, rest), function (provided, snapshot, rubric) {
|
|
52
50
|
var _provided$dragHandleP, _provided$dragHandleP2;
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
'euiDraggable--isDragging': snapshot.isDragging,
|
|
57
|
-
'euiDraggable--withoutDropAnimation': isRemovable
|
|
58
|
-
}, spacingToClassNameMap[spacing], className);
|
|
51
|
+
var isDragging = snapshot.isDragging;
|
|
52
|
+
var cssStyles = [styles.euiDraggable, cloneItems && !isDragging && styles.hasClone, isDragging && styles.isDragging, isRemovable && styles.isRemovable, styles.spacing[spacing]];
|
|
53
|
+
var classes = classNames('euiDraggable', className);
|
|
59
54
|
var childClasses = classNames('euiDraggable__item', {
|
|
60
|
-
'euiDraggable__item
|
|
61
|
-
'euiDraggable__item--isDisabled': isDragDisabled,
|
|
62
|
-
'euiDraggable__item--isDragging': snapshot.isDragging,
|
|
63
|
-
'euiDraggable__item--isDropAnimating': snapshot.isDropAnimating
|
|
55
|
+
'euiDraggable__item-isDisabled': isDragDisabled
|
|
64
56
|
});
|
|
65
57
|
var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
|
|
66
|
-
return ___EmotionJSX(Fragment, null, ___EmotionJSX("div", _extends({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
|
|
58
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", _extends({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
|
|
67
59
|
ref: provided.innerRef,
|
|
68
60
|
"data-test-subj": dataTestSubj,
|
|
69
61
|
className: classes,
|
|
62
|
+
css: cssStyles,
|
|
70
63
|
style: _objectSpread(_objectSpread({}, style), provided.draggableProps.style)
|
|
71
64
|
// We use [role="group"] instead of [role="button"] when we expect a nested
|
|
72
65
|
// interactive element. Screen readers will cue users that this is a container
|
|
@@ -77,10 +70,12 @@ export var EuiDraggable = function EuiDraggable(_ref) {
|
|
|
77
70
|
// because [role="group"] does not permit or warrant a tab stop
|
|
78
71
|
,
|
|
79
72
|
tabIndex: hasInteractiveChildren ? undefined : (_provided$dragHandleP2 = provided.dragHandleProps) === null || _provided$dragHandleP2 === void 0 ? void 0 : _provided$dragHandleP2.tabIndex
|
|
80
|
-
}),
|
|
81
|
-
className: classNames(DraggableElement.props.className, childClasses)
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
}), cloneElementWithCss(DraggableElement, {
|
|
74
|
+
className: classNames(DraggableElement.props.className, childClasses),
|
|
75
|
+
css: [euiDraggableItemStyles.euiDraggable__item, isDragDisabled && euiDraggableItemStyles.disabled]
|
|
76
|
+
})), cloneItems && isDragging && ___EmotionJSX("div", {
|
|
77
|
+
className: classNames(classes, 'euiDraggable--clone'),
|
|
78
|
+
css: cssStyles
|
|
84
79
|
}, DraggableElement));
|
|
85
80
|
});
|
|
86
81
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { sharedSpacingPadding } from './droppable.styles';
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "1nohugb-isRemovable",
|
|
14
|
+
styles: "transition-duration:0.001s!important;label:isRemovable;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "1nohugb-isRemovable",
|
|
17
|
+
styles: "transition-duration:0.001s!important;label:isRemovable;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
20
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
21
|
+
name: "1wvdf2m-hasClone",
|
|
22
|
+
styles: "transform:none!important;label:hasClone;"
|
|
23
|
+
} : {
|
|
24
|
+
name: "1wvdf2m-hasClone",
|
|
25
|
+
styles: "transform:none!important;label:hasClone;",
|
|
26
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
|
+
};
|
|
28
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
29
|
+
name: "oyhf1i-euiDraggable",
|
|
30
|
+
styles: "&:focus{outline:none;&>.euiDraggable__item{outline:auto;}};label:euiDraggable;"
|
|
31
|
+
} : {
|
|
32
|
+
name: "oyhf1i-euiDraggable",
|
|
33
|
+
styles: "&:focus{outline:none;&>.euiDraggable__item{outline:auto;}};label:euiDraggable;",
|
|
34
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
35
|
+
};
|
|
36
|
+
export var euiDraggableStyles = function euiDraggableStyles(euiThemeContext) {
|
|
37
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
38
|
+
return {
|
|
39
|
+
euiDraggable: _ref3,
|
|
40
|
+
isDragging: /*#__PURE__*/css("z-index:", euiTheme.levels.toast, "!important;;label:isDragging;"),
|
|
41
|
+
hasClone: _ref2,
|
|
42
|
+
isRemovable: _ref,
|
|
43
|
+
spacing: sharedSpacingPadding(euiThemeContext)
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export var euiDraggableItemStyles = {
|
|
47
|
+
euiDraggable__item: /*#__PURE__*/css(";label:euiDraggable__item;"),
|
|
48
|
+
disabled: process.env.NODE_ENV === "production" ? {
|
|
49
|
+
name: "b86pnw-disabled",
|
|
50
|
+
styles: "cursor:not-allowed;label:disabled;"
|
|
51
|
+
} : {
|
|
52
|
+
name: "b86pnw-disabled",
|
|
53
|
+
styles: "cursor:not-allowed;label:disabled;",
|
|
54
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -12,14 +12,12 @@ var _excluded = ["droppableId", "direction", "isDropDisabled", "children", "clas
|
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
13
|
import { Droppable } from '@hello-pangea/dnd';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
+
import { useEuiTheme } from '../../services';
|
|
16
|
+
import { EuiPanel } from '../panel';
|
|
15
17
|
import { EuiDragDropContextContext } from './drag_drop_context';
|
|
18
|
+
import { euiDroppableStyles } from './droppable.styles';
|
|
16
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
|
-
var
|
|
18
|
-
none: null,
|
|
19
|
-
s: 'euiDroppable--s',
|
|
20
|
-
m: 'euiDroppable--m',
|
|
21
|
-
l: 'euiDroppable--l'
|
|
22
|
-
};
|
|
20
|
+
export var SPACINGS = ['none', 's', 'm', 'l'];
|
|
23
21
|
export var EuiDroppableContext = /*#__PURE__*/React.createContext({
|
|
24
22
|
cloneItems: false
|
|
25
23
|
});
|
|
@@ -47,35 +45,40 @@ export var EuiDroppable = function EuiDroppable(_ref) {
|
|
|
47
45
|
var _useContext = useContext(EuiDragDropContextContext),
|
|
48
46
|
isDraggingType = _useContext.isDraggingType;
|
|
49
47
|
var dropIsDisabled = cloneDraggables ? true : isDropDisabled;
|
|
48
|
+
var euiTheme = useEuiTheme();
|
|
49
|
+
var styles = euiDroppableStyles(euiTheme);
|
|
50
50
|
return ___EmotionJSX(Droppable, _extends({
|
|
51
51
|
isDropDisabled: dropIsDisabled,
|
|
52
52
|
droppableId: droppableId,
|
|
53
53
|
direction: direction,
|
|
54
54
|
type: type
|
|
55
55
|
}, rest), function (provided, snapshot) {
|
|
56
|
+
var isDraggingOver = snapshot.isDraggingOver;
|
|
57
|
+
var PanelOrDiv = withPanel ? EuiPanel : 'div';
|
|
58
|
+
var panelOrDivProps = withPanel ? {
|
|
59
|
+
panelRef: provided.innerRef,
|
|
60
|
+
hasShadow: true,
|
|
61
|
+
paddingSize: 'none'
|
|
62
|
+
} : {
|
|
63
|
+
ref: provided.innerRef
|
|
64
|
+
};
|
|
65
|
+
var cssStyles = [styles.euiDroppable, isDraggingType === type && !dropIsDisabled && styles.isDragging, isDraggingOver && styles.isDraggingOver, grow ? styles.grow : styles.noGrow, styles.spacing[spacing]];
|
|
56
66
|
var classes = classNames('euiDroppable', {
|
|
57
|
-
'euiDroppable
|
|
58
|
-
|
|
59
|
-
'euiDroppable--isDraggingType': isDraggingType === type,
|
|
60
|
-
'euiDroppable--withPanel': withPanel,
|
|
61
|
-
'euiDroppable--grow': grow,
|
|
62
|
-
'euiDroppable--noGrow': !grow
|
|
63
|
-
}, spacingToClassNameMap[spacing], className);
|
|
64
|
-
var placeholderClasses = classNames('euiDroppable__placeholder', {
|
|
65
|
-
'euiDroppable__placeholder--isHidden': cloneDraggables
|
|
66
|
-
});
|
|
67
|
+
'euiDroppable-isDisabled': dropIsDisabled
|
|
68
|
+
}, className);
|
|
67
69
|
var DroppableElement = typeof children === 'function' ? children(provided, snapshot) : children;
|
|
68
|
-
return ___EmotionJSX(
|
|
69
|
-
ref: provided.innerRef,
|
|
70
|
+
return ___EmotionJSX(PanelOrDiv, _extends({}, provided.droppableProps, panelOrDivProps, {
|
|
70
71
|
style: style,
|
|
71
72
|
"data-test-subj": dataTestSubj,
|
|
72
|
-
className: classes
|
|
73
|
+
className: classes,
|
|
74
|
+
css: cssStyles
|
|
73
75
|
}), ___EmotionJSX(EuiDroppableContext.Provider, {
|
|
74
76
|
value: {
|
|
75
77
|
cloneItems: cloneDraggables
|
|
76
78
|
}
|
|
77
79
|
}, DroppableElement), ___EmotionJSX("div", {
|
|
78
|
-
className:
|
|
80
|
+
className: "euiDroppable__placeholder",
|
|
81
|
+
hidden: cloneDraggables
|
|
79
82
|
}, provided.placeholder));
|
|
80
83
|
});
|
|
81
84
|
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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 { transparentize } from '../../services';
|
|
12
|
+
import { euiCanAnimate } from '../../global_styling';
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "jkp921-noGrow",
|
|
15
|
+
styles: "flex-grow:0;label:noGrow;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "jkp921-noGrow",
|
|
18
|
+
styles: "flex-grow:0;label:noGrow;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
22
|
+
name: "122lw0e-grow",
|
|
23
|
+
styles: "flex-grow:1;label:grow;"
|
|
24
|
+
} : {
|
|
25
|
+
name: "122lw0e-grow",
|
|
26
|
+
styles: "flex-grow:1;label:grow;",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
};
|
|
29
|
+
export var euiDroppableStyles = function euiDroppableStyles(euiThemeContext) {
|
|
30
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
31
|
+
var droppableColor = euiTheme.colors.success;
|
|
32
|
+
return {
|
|
33
|
+
euiDroppable: /*#__PURE__*/css(euiCanAnimate, "{transition:background-color ", euiTheme.animation.slow, " ease;};label:euiDroppable;"),
|
|
34
|
+
isDragging: /*#__PURE__*/css("background-color:", transparentize(droppableColor, 0.1), ";;label:isDragging;"),
|
|
35
|
+
isDraggingOver: /*#__PURE__*/css("background-color:", transparentize(droppableColor, 0.25), ";;label:isDraggingOver;"),
|
|
36
|
+
grow: _ref2,
|
|
37
|
+
noGrow: _ref,
|
|
38
|
+
spacing: sharedSpacingPadding(euiThemeContext)
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Droppable and draggable components both have the same shared spacing/padding values
|
|
43
|
+
export var sharedSpacingPadding = function sharedSpacingPadding(_ref3) {
|
|
44
|
+
var euiTheme = _ref3.euiTheme;
|
|
45
|
+
return {
|
|
46
|
+
none: null,
|
|
47
|
+
s: /*#__PURE__*/css("padding:", euiTheme.size.xxs, ";;label:s;"),
|
|
48
|
+
m: /*#__PURE__*/css("padding:", euiTheme.size.xs, ";;label:m;"),
|
|
49
|
+
l: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:l;")
|
|
50
|
+
};
|
|
51
|
+
};
|