@elastic/eui 88.3.0 → 88.4.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.
Files changed (103) hide show
  1. package/dist/eui_theme_dark.css +0 -142
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -142
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/in_memory_table.js +85 -34
  6. package/es/components/card/card.js +3 -3
  7. package/es/components/combo_box/combo_box.js +16 -4
  8. package/es/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  9. package/es/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  10. package/es/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  11. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +59 -15
  12. package/es/components/datagrid/controls/column_selector.js +5 -3
  13. package/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
  14. package/es/components/description_list/description_list_title.js +0 -1
  15. package/es/components/description_list/description_list_title.styles.js +1 -1
  16. package/es/components/drag_and_drop/draggable.js +18 -23
  17. package/es/components/drag_and_drop/draggable.styles.js +56 -0
  18. package/es/components/drag_and_drop/droppable.js +24 -21
  19. package/es/components/drag_and_drop/droppable.styles.js +51 -0
  20. package/es/components/search_bar/search_box.js +54 -88
  21. package/es/components/table/table_pagination/table_pagination.js +1 -0
  22. package/es/test/rtl/custom_render.js +1 -1
  23. package/eui.d.ts +480 -420
  24. package/i18ntokens.json +142 -88
  25. package/lib/components/basic_table/in_memory_table.js +85 -34
  26. package/lib/components/card/card.js +3 -3
  27. package/lib/components/combo_box/combo_box.js +16 -4
  28. package/lib/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  29. package/lib/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  30. package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  31. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +59 -15
  32. package/lib/components/datagrid/controls/column_selector.js +4 -2
  33. package/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
  34. package/lib/components/description_list/description_list_title.js +0 -1
  35. package/lib/components/description_list/description_list_title.styles.js +1 -1
  36. package/lib/components/drag_and_drop/draggable.js +17 -22
  37. package/lib/components/drag_and_drop/draggable.styles.js +62 -0
  38. package/lib/components/drag_and_drop/droppable.js +26 -22
  39. package/lib/components/drag_and_drop/droppable.styles.js +57 -0
  40. package/lib/components/search_bar/search_box.js +61 -93
  41. package/lib/components/table/table_pagination/table_pagination.js +1 -0
  42. package/lib/test/rtl/custom_render.js +2 -2
  43. package/optimize/es/components/basic_table/in_memory_table.js +62 -34
  44. package/optimize/es/components/card/card.js +3 -3
  45. package/optimize/es/components/combo_box/combo_box.js +6 -4
  46. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  47. package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
  48. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -12
  49. package/optimize/es/components/datagrid/controls/column_selector.js +5 -3
  50. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
  51. package/optimize/es/components/description_list/description_list_title.js +0 -1
  52. package/optimize/es/components/description_list/description_list_title.styles.js +1 -1
  53. package/optimize/es/components/drag_and_drop/draggable.js +17 -22
  54. package/optimize/es/components/drag_and_drop/draggable.styles.js +56 -0
  55. package/optimize/es/components/drag_and_drop/droppable.js +23 -20
  56. package/optimize/es/components/drag_and_drop/droppable.styles.js +51 -0
  57. package/optimize/es/components/search_bar/search_box.js +50 -83
  58. package/optimize/es/components/table/table_pagination/table_pagination.js +1 -0
  59. package/optimize/es/test/rtl/custom_render.js +1 -1
  60. package/optimize/lib/components/basic_table/in_memory_table.js +62 -34
  61. package/optimize/lib/components/card/card.js +3 -3
  62. package/optimize/lib/components/combo_box/combo_box.js +6 -4
  63. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  64. package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
  65. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -12
  66. package/optimize/lib/components/datagrid/controls/column_selector.js +4 -2
  67. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
  68. package/optimize/lib/components/description_list/description_list_title.js +0 -1
  69. package/optimize/lib/components/description_list/description_list_title.styles.js +1 -1
  70. package/optimize/lib/components/drag_and_drop/draggable.js +16 -21
  71. package/optimize/lib/components/drag_and_drop/draggable.styles.js +62 -0
  72. package/optimize/lib/components/drag_and_drop/droppable.js +25 -21
  73. package/optimize/lib/components/drag_and_drop/droppable.styles.js +57 -0
  74. package/optimize/lib/components/search_bar/search_box.js +57 -89
  75. package/optimize/lib/components/table/table_pagination/table_pagination.js +1 -0
  76. package/optimize/lib/test/rtl/custom_render.js +2 -2
  77. package/package.json +4 -4
  78. package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +0 -1
  79. package/src/components/index.scss +0 -1
  80. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  81. package/test-env/components/basic_table/in_memory_table.js +85 -34
  82. package/test-env/components/card/card.js +3 -3
  83. package/test-env/components/combo_box/combo_box.js +16 -4
  84. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  85. package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  86. package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  87. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +58 -14
  88. package/test-env/components/datagrid/controls/column_selector.js +4 -2
  89. package/test-env/components/datagrid/controls/column_sorting_draggable.js +4 -1
  90. package/test-env/components/description_list/description_list_title.js +0 -1
  91. package/test-env/components/description_list/description_list_title.styles.js +1 -1
  92. package/test-env/components/drag_and_drop/draggable.js +17 -22
  93. package/test-env/components/drag_and_drop/draggable.styles.js +62 -0
  94. package/test-env/components/drag_and_drop/droppable.js +26 -22
  95. package/test-env/components/drag_and_drop/droppable.styles.js +57 -0
  96. package/test-env/components/search_bar/search_box.js +60 -88
  97. package/test-env/components/table/table_pagination/table_pagination.js +1 -0
  98. package/test-env/test/rtl/custom_render.js +2 -2
  99. package/src/components/drag_and_drop/_draggable.scss +0 -41
  100. package/src/components/drag_and_drop/_droppable.scss +0 -40
  101. package/src/components/drag_and_drop/_index.scss +0 -3
  102. package/src/components/drag_and_drop/_variables.scss +0 -5
  103. package/src/themes/amsterdam/overrides/_description_list.scss +0 -7
@@ -19,13 +19,15 @@ var _react = _interopRequireWildcard(require("react"));
19
19
  var _basic_table = require("./basic_table");
20
20
  var _predicate = require("../../services/predicate");
21
21
  var _sort2 = require("../../services/sort");
22
- var _search_bar = require("../search_bar");
22
+ var _search_bar = require("../search_bar/search_bar");
23
+ var _search_box = require("../search_bar/search_box");
23
24
  var _spacer = require("../spacer");
24
25
  var _table_pagination = require("../table/table_pagination");
25
26
  var _component_defaults = require("../provider/component_defaults");
26
27
  var _react2 = require("@emotion/react");
27
- var _excluded = ["onChange"],
28
- _excluded2 = ["columns", "loading", "message", "error", "selection", "isSelectable", "hasActions", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
28
+ var _excluded = ["schema"],
29
+ _excluded2 = ["onChange"],
30
+ _excluded3 = ["columns", "loading", "message", "error", "selection", "isSelectable", "hasActions", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
29
31
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
33
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -218,6 +220,15 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
218
220
  };
219
221
  });
220
222
  });
223
+ // Alternative to onQueryChange - allows consumers to specify they want the
224
+ // search bar to ignore EQL syntax and only use the searchbar for plain text
225
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onPlainTextSearch", function (searchValue) {
226
+ var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
227
+ var finalQuery = "\"".concat(escapedQueryText, "\"");
228
+ _this.setState({
229
+ query: _search_bar.EuiSearchBar.Query.parse(finalQuery)
230
+ });
231
+ });
221
232
  var columns = props.columns,
222
233
  _search = props.search,
223
234
  _pagination = props.pagination,
@@ -261,12 +272,26 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
261
272
  }, {
262
273
  key: "renderSearchBar",
263
274
  value: function renderSearchBar() {
264
- var search = this.props.search;
265
- if (search) {
275
+ var _this$props = this.props,
276
+ search = _this$props.search,
277
+ searchFormat = _this$props.searchFormat;
278
+ if (!search) return;
279
+ var searchBar;
280
+ if (searchFormat === 'text') {
281
+ var _searchBoxProps = (search === null || search === void 0 ? void 0 : search.box) || {}; // Work around | boolean type
282
+ var schema = _searchBoxProps.schema,
283
+ searchBoxProps = (0, _objectWithoutProperties2.default)(_searchBoxProps, _excluded); // Destructure `schema` so it doesn't get rendered to DOM
284
+
285
+ searchBar = (0, _react2.jsx)(_search_box.EuiSearchBox, (0, _extends2.default)({
286
+ query: "" // Unused, passed to satisfy Typescript
287
+ }, searchBoxProps, {
288
+ onSearch: this.onPlainTextSearch
289
+ }));
290
+ } else {
266
291
  var searchBarProps = {};
267
292
  if (isEuiSearchBarProps(search)) {
268
293
  var onChange = search.onChange,
269
- _searchBarProps = (0, _objectWithoutProperties2.default)(search, _excluded);
294
+ _searchBarProps = (0, _objectWithoutProperties2.default)(search, _excluded2);
270
295
  searchBarProps = _searchBarProps;
271
296
  if (searchBarProps.box && searchBarProps.box.schema === true) {
272
297
  searchBarProps.box = _objectSpread(_objectSpread({}, searchBarProps.box), {}, {
@@ -274,12 +299,13 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
274
299
  });
275
300
  }
276
301
  }
277
- return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_search_bar.EuiSearchBar, (0, _extends2.default)({
302
+ searchBar = (0, _react2.jsx)(_search_bar.EuiSearchBar, (0, _extends2.default)({
278
303
  onChange: this.onQueryChange
279
- }, searchBarProps)), (0, _react2.jsx)(_spacer.EuiSpacer, {
280
- size: "l"
281
- }));
304
+ }, searchBarProps));
282
305
  }
306
+ return (0, _react2.jsx)(_react.default.Fragment, null, searchBar, (0, _react2.jsx)(_spacer.EuiSpacer, {
307
+ size: "l"
308
+ }));
283
309
  }
284
310
  }, {
285
311
  key: "resolveSearchSchema",
@@ -356,29 +382,30 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
356
382
  }, {
357
383
  key: "render",
358
384
  value: function render() {
359
- var _this$props = this.props,
360
- columns = _this$props.columns,
361
- loading = _this$props.loading,
362
- message = _this$props.message,
363
- error = _this$props.error,
364
- selection = _this$props.selection,
365
- isSelectable = _this$props.isSelectable,
366
- hasActions = _this$props.hasActions,
367
- compressed = _this$props.compressed,
368
- hasPagination = _this$props.pagination,
369
- hasSorting = _this$props.sorting,
370
- itemIdToExpandedRowMap = _this$props.itemIdToExpandedRowMap,
371
- itemId = _this$props.itemId,
372
- rowProps = _this$props.rowProps,
373
- cellProps = _this$props.cellProps,
374
- tableLayout = _this$props.tableLayout,
375
- _unuseditems = _this$props.items,
376
- search = _this$props.search,
377
- onTableChange = _this$props.onTableChange,
378
- executeQueryOptions = _this$props.executeQueryOptions,
379
- allowNeutralSort = _this$props.allowNeutralSort,
380
- childrenBetween = _this$props.childrenBetween,
381
- rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded2);
385
+ var _this$props2 = this.props,
386
+ columns = _this$props2.columns,
387
+ loading = _this$props2.loading,
388
+ message = _this$props2.message,
389
+ error = _this$props2.error,
390
+ selection = _this$props2.selection,
391
+ isSelectable = _this$props2.isSelectable,
392
+ hasActions = _this$props2.hasActions,
393
+ compressed = _this$props2.compressed,
394
+ hasPagination = _this$props2.pagination,
395
+ hasSorting = _this$props2.sorting,
396
+ itemIdToExpandedRowMap = _this$props2.itemIdToExpandedRowMap,
397
+ itemId = _this$props2.itemId,
398
+ rowProps = _this$props2.rowProps,
399
+ cellProps = _this$props2.cellProps,
400
+ tableLayout = _this$props2.tableLayout,
401
+ _unuseditems = _this$props2.items,
402
+ search = _this$props2.search,
403
+ searchFormat = _this$props2.searchFormat,
404
+ onTableChange = _this$props2.onTableChange,
405
+ executeQueryOptions = _this$props2.executeQueryOptions,
406
+ allowNeutralSort = _this$props2.allowNeutralSort,
407
+ childrenBetween = _this$props2.childrenBetween,
408
+ rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded3);
382
409
  var _this$state3 = this.state,
383
410
  pageIndex = _this$state3.pageIndex,
384
411
  pageSize = _this$state3.pageSize,
@@ -502,5 +529,6 @@ exports.EuiInMemoryTable = EuiInMemoryTable;
502
529
  (0, _defineProperty2.default)(EuiInMemoryTable, "contextType", _component_defaults.EuiComponentDefaultsContext);
503
530
  (0, _defineProperty2.default)(EuiInMemoryTable, "defaultProps", {
504
531
  responsive: true,
505
- tableLayout: 'fixed'
532
+ tableLayout: 'fixed',
533
+ searchFormat: 'eql'
506
534
  });
@@ -12,14 +12,14 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _classnames = _interopRequireDefault(require("classnames"));
14
14
  var _services = require("../../services");
15
+ var _accessibility = require("../../services/accessibility");
16
+ var _href_validator = require("../../services/security/href_validator");
15
17
  var _text = require("../text");
16
18
  var _title = require("../title");
17
19
  var _beta_badge = require("../badge/beta_badge");
18
- var _card_select = require("./card_select");
19
- var _accessibility = require("../../services/accessibility");
20
- var _href_validator = require("../../services/security/href_validator");
21
20
  var _panel = require("../panel");
22
21
  var _spacer = require("../spacer");
22
+ var _card_select = require("./card_select");
23
23
  var _card = require("./card.styles");
24
24
  var _react2 = require("@emotion/react");
25
25
  var _excluded = ["className", "description", "isDisabled", "title", "titleElement", "titleSize", "icon", "image", "children", "footer", "onClick", "href", "rel", "target", "textAlign", "betaBadgeProps", "layout", "selectable", "display", "paddingSize"],
@@ -18,14 +18,14 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
18
18
  var _react = _interopRequireWildcard(require("react"));
19
19
  var _classnames = _interopRequireDefault(require("classnames"));
20
20
  var _services = require("../../services");
21
+ var _popover = require("../../services/popover");
21
22
  var _portal = require("../portal");
22
23
  var _i18n = require("../i18n");
23
- var _combo_box_options_list = require("./combo_box_options_list");
24
24
  var _matching_options = require("./matching_options");
25
25
  var _combo_box_input = require("./combo_box_input/combo_box_input");
26
- var _popover = require("../../services/popover");
26
+ var _combo_box_options_list = require("./combo_box_options_list");
27
27
  var _react2 = require("@emotion/react");
28
- 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"];
28
+ 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"];
29
29
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
31
  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; }
@@ -639,6 +639,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
639
639
  delimiter = _this$props8.delimiter,
640
640
  append = _this$props8.append,
641
641
  autoFocus = _this$props8.autoFocus,
642
+ truncationProps = _this$props8.truncationProps,
642
643
  ariaLabel = _this$props8['aria-label'],
643
644
  ariaLabelledby = _this$props8['aria-labelledby'],
644
645
  rest = (0, _objectWithoutProperties2.default)(_this$props8, _excluded);
@@ -707,7 +708,8 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
707
708
  width: width,
708
709
  delimiter: delimiter,
709
710
  getSelectedOptionForSearchValue: _matching_options.getSelectedOptionForSearchValue,
710
- listboxAriaLabel: listboxAriaLabel
711
+ listboxAriaLabel: listboxAriaLabel,
712
+ truncationProps: truncationProps
711
713
  });
712
714
  }));
713
715
  }
@@ -25,7 +25,7 @@ var _form_control_layout = require("../../form/form_control_layout");
25
25
  var _num_icons = require("../../form/form_control_layout/_num_icons");
26
26
  var _combo_box_pill = require("./combo_box_pill");
27
27
  var _react2 = require("@emotion/react");
28
- var _excluded = ["key", "label", "color", "onClick", "append", "prepend"];
28
+ var _excluded = ["key", "label", "color", "onClick", "append", "prepend", "truncationProps"];
29
29
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
31
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -156,6 +156,7 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
156
156
  onClick = option.onClick,
157
157
  append = option.append,
158
158
  prepend = option.prepend,
159
+ truncationProps = option.truncationProps,
159
160
  rest = (0, _objectWithoutProperties2.default)(option, _excluded);
160
161
  var pillOnClose = isDisabled || singleSelection || onClick ? undefined : onRemoveOption;
161
162
  return (0, _react2.jsx)(_combo_box_pill.EuiComboBoxPill, (0, _extends2.default)({
@@ -74,7 +74,9 @@ var EuiComboBoxPill = /*#__PURE__*/function (_Component) {
74
74
  } : {};
75
75
  var content = (0, _react2.jsx)(_react.default.Fragment, null, option.prepend && (0, _react2.jsx)("span", {
76
76
  className: "euiComboBoxPill__prepend"
77
- }, option.prepend), children, option.append && (0, _react2.jsx)("span", {
77
+ }, option.prepend), (0, _react2.jsx)("span", {
78
+ className: "eui-textTruncate"
79
+ }, children), option.append && (0, _react2.jsx)("span", {
78
80
  className: "euiComboBoxPill__append"
79
81
  }, option.append));
80
82
  if (onClose) {
@@ -20,6 +20,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
20
20
  var _reactWindow = require("react-window");
21
21
  var _flex = require("../../flex");
22
22
  var _highlight = require("../../highlight");
23
+ var _mark = require("../../mark");
23
24
  var _text = require("../../text");
24
25
  var _loading = require("../../loading");
25
26
  var _combo_box_title = require("./combo_box_title");
@@ -27,9 +28,10 @@ var _i18n = require("../../i18n");
27
28
  var _filter_select_item = require("../../filter_group/filter_select_item");
28
29
  var _badge = require("../../badge");
29
30
  var _popover_panel = require("../../popover/popover_panel");
31
+ var _text_truncate = require("../../text_truncate");
30
32
  var _react2 = require("@emotion/react");
31
- var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append"],
32
- _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"];
33
+ var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append", "truncationProps"],
34
+ _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"];
33
35
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
34
36
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
37
  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; }
@@ -42,7 +44,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
42
44
  * in compliance with, at your election, the Elastic License 2.0 or the Server
43
45
  * Side Public License, v 1.
44
46
  */
45
- var OPTION_CONTENT_CLASSNAME = 'euiComboBoxOption__content';
46
47
  var hitEnterBadge = (0, _react2.jsx)(_badge.EuiBadge, {
47
48
  className: "euiComboBoxOption__enterBadge",
48
49
  color: "hollow",
@@ -103,6 +104,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
103
104
  value = option.value,
104
105
  prepend = option.prepend,
105
106
  append = option.append,
107
+ _truncationProps = option.truncationProps,
106
108
  rest = (0, _objectWithoutProperties2.default)(option, _excluded);
107
109
  var _this$props = _this.props,
108
110
  singleSelection = _this$props.singleSelection,
@@ -113,6 +115,8 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
113
115
  renderOption = _this$props.renderOption,
114
116
  searchValue = _this$props.searchValue,
115
117
  rootId = _this$props.rootId;
118
+ // Individual truncation settings should override component prop
119
+ var truncationProps = _objectSpread(_objectSpread({}, _this.props.truncationProps), _truncationProps);
116
120
  if (isGroupLabelOption) {
117
121
  return (0, _react2.jsx)("div", {
118
122
  key: key !== null && key !== void 0 ? key : label,
@@ -137,22 +141,54 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
137
141
  isFocused: optionIsFocused,
138
142
  checked: checked,
139
143
  showIcons: singleSelection ? true : false,
140
- id: rootId("_option-".concat(index)),
141
- title: label
144
+ id: rootId("_option-".concat(index))
142
145
  }, rest), (0, _react2.jsx)("span", {
143
146
  className: "euiComboBoxOption__contentWrapper"
144
147
  }, prepend && (0, _react2.jsx)("span", {
145
148
  className: "euiComboBoxOption__prepend"
146
- }, prepend), renderOption ? (0, _react2.jsx)("span", {
147
- className: OPTION_CONTENT_CLASSNAME
148
- }, renderOption(option, searchValue, 'euiComboBoxOption__renderOption')) : (0, _react2.jsx)(_highlight.EuiHighlight, {
149
- search: searchValue,
150
- strict: _this.props.isCaseSensitive,
151
- className: OPTION_CONTENT_CLASSNAME
152
- }, label), append && (0, _react2.jsx)("span", {
149
+ }, prepend), (0, _react2.jsx)("span", {
150
+ className: "euiComboBoxOption__content"
151
+ }, renderOption ? renderOption(option, searchValue, 'euiComboBoxOption__renderOption') : _this.renderTruncatedOption(label, truncationProps)), append && (0, _react2.jsx)("span", {
153
152
  className: "euiComboBoxOption__append"
154
153
  }, append), optionIsFocused && !optionIsDisabled ? hitEnterBadge : null));
155
154
  });
155
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "optionWidth", void 0);
156
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setOptionWidth", function (width) {
157
+ _this.optionWidth = width;
158
+ });
159
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderTruncatedOption", function (text, truncationProps) {
160
+ if (!_this.props.searchValue) {
161
+ return (0, _react2.jsx)(_text_truncate.EuiTextTruncate, (0, _extends2.default)({
162
+ truncation: "end",
163
+ width: _this.optionWidth,
164
+ onResize: _this.setOptionWidth
165
+ }, truncationProps, {
166
+ text: text
167
+ }), function (text) {
168
+ return text;
169
+ });
170
+ }
171
+ var searchValue = _this.props.searchValue.trim();
172
+ var searchPositionStart = _this.props.isCaseSensitive ? text.indexOf(searchValue) : text.toLowerCase().indexOf(searchValue.toLowerCase());
173
+ var searchPositionCenter = searchPositionStart + Math.floor(searchValue.length / 2);
174
+ return (0, _react2.jsx)(_text_truncate.EuiTextTruncate, (0, _extends2.default)({
175
+ width: _this.optionWidth,
176
+ onResize: _this.setOptionWidth
177
+ }, truncationProps, {
178
+ // When searching, don't allow overriding the truncation settings
179
+ truncation: "startEnd",
180
+ truncationPosition: searchPositionCenter,
181
+ text: text
182
+ }), function (text) {
183
+ return (0, _react2.jsx)(_react.default.Fragment, null, text.length >= searchValue.length ? (0, _react2.jsx)(_highlight.EuiHighlight, {
184
+ search: searchValue,
185
+ strict: _this.props.isCaseSensitive
186
+ }, text) :
187
+ // If the available truncated text is shorter than the full search string,
188
+ // just highlight the entire truncated text
189
+ (0, _react2.jsx)(_mark.EuiMark, null, text));
190
+ });
191
+ });
156
192
  return _this;
157
193
  }
158
194
  (0, _createClass2.default)(EuiComboBoxOptionsList, [{
@@ -236,6 +272,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
236
272
  delimiter = _this$props2.delimiter,
237
273
  zIndex = _this$props2.zIndex,
238
274
  style = _this$props2.style,
275
+ truncationProps = _this$props2.truncationProps,
239
276
  listboxAriaLabel = _this$props2.listboxAriaLabel,
240
277
  rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded2);
241
278
  var emptyStateContent;
@@ -147,7 +147,7 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
147
147
  }, (0, _react2.jsx)(_drag_and_drop.EuiDroppable, {
148
148
  droppableId: "columnOrder",
149
149
  isDropDisabled: !isDragEnabled
150
- }, (0, _react2.jsx)(_react.Fragment, null, filteredColumns.map(function (id, index) {
150
+ }, (0, _react2.jsx)(_react.default.Fragment, null, filteredColumns.map(function (id, index) {
151
151
  return (0, _react2.jsx)(_drag_and_drop.EuiDraggable, {
152
152
  key: id,
153
153
  draggableId: id,
@@ -157,7 +157,9 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
157
157
  customDragHandle: true
158
158
  }, function (provided, state) {
159
159
  return (0, _react2.jsx)("div", {
160
- className: "euiDataGridColumnSelector__item ".concat(state.isDragging && 'euiDataGridColumnSelector__item-isDragging'),
160
+ className: (0, _classnames.default)('euiDataGridColumnSelector__item', {
161
+ 'euiDataGridColumnSelector__item-isDragging': state.isDragging
162
+ }),
161
163
  "data-test-subj": "dataGridColumnSelectorColumnItem-".concat(id)
162
164
  }, (0, _react2.jsx)(_flex.EuiFlexGroup, {
163
165
  responsive: false,
@@ -9,6 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = _interopRequireDefault(require("react"));
12
+ var _classnames = _interopRequireDefault(require("classnames"));
12
13
  var _accessibility = require("../../accessibility");
13
14
  var _button = require("../../button");
14
15
  var _drag_and_drop = require("../../drag_and_drop");
@@ -68,7 +69,9 @@ var EuiDataGridColumnSortingDraggable = function EuiDataGridColumnSortingDraggab
68
69
  customDragHandle: true
69
70
  }, rest), function (provided, state) {
70
71
  return (0, _react2.jsx)("div", {
71
- className: "euiDataGridColumnSorting__item ".concat(state.isDragging && 'euiDataGridColumnSorting__item-isDragging')
72
+ className: (0, _classnames.default)('euiDataGridColumnSorting__item', {
73
+ 'euiDataGridColumnSorting__item-isDragging': state.isDragging
74
+ })
72
75
  }, (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", null, (0, _react2.jsx)(_i18n.EuiI18n, {
73
76
  token: "euiColumnSortingDraggable.activeSortLabel",
74
77
  default: "{display} is sorting this data grid",
@@ -42,7 +42,6 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
42
42
  switch (type) {
43
43
  case 'inline':
44
44
  conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
45
- conditionalStyles.push(styles[rowGutterSize]);
46
45
  break;
47
46
  case 'row':
48
47
  conditionalStyles.push(styles[rowGutterSize]);
@@ -33,7 +33,7 @@ var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiTh
33
33
  // Inline types
34
34
  inlineStyles: {
35
35
  normal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), " ", (0, _global_styling.logicalCSS)('padding-vertical', '1px'), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:normal;"),
36
- compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), " ", (0, _global_styling.logicalCSS)('padding-vertical', '0'), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
36
+ compressed: /*#__PURE__*/(0, _react.css)("font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";line-height:", euiTheme.font.lineHeightMultiplier, ";", (0, _global_styling.logicalCSS)('padding-vertical', '0'), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
37
37
  },
38
38
  // Alignment
39
39
  right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;"),
@@ -12,7 +12,9 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _dnd = require("@hello-pangea/dnd");
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
+ var _services = require("../../services");
15
16
  var _droppable = require("./droppable");
17
+ var _draggable = require("./draggable.styles");
16
18
  var _react2 = require("@emotion/react");
17
19
  var _excluded = ["customDragHandle", "draggableId", "isDragDisabled", "hasInteractiveChildren", "isRemovable", "index", "children", "className", "spacing", "style", "data-test-subj"];
18
20
  /*
@@ -26,12 +28,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
26
28
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
27
29
  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; }
28
30
  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) { (0, _defineProperty2.default)(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; }
29
- var spacingToClassNameMap = {
30
- none: null,
31
- s: 'euiDraggable--s',
32
- m: 'euiDraggable--m',
33
- l: 'euiDraggable--l'
34
- };
35
31
  var EuiDraggable = function EuiDraggable(_ref) {
36
32
  var _ref$customDragHandle = _ref.customDragHandle,
37
33
  customDragHandle = _ref$customDragHandle === void 0 ? false : _ref$customDragHandle,
@@ -53,29 +49,26 @@ var EuiDraggable = function EuiDraggable(_ref) {
53
49
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
54
50
  var _useContext = (0, _react.useContext)(_droppable.EuiDroppableContext),
55
51
  cloneItems = _useContext.cloneItems;
52
+ var euiTheme = (0, _services.useEuiTheme)();
53
+ var styles = (0, _draggable.euiDraggableStyles)(euiTheme);
56
54
  return (0, _react2.jsx)(_dnd.Draggable, (0, _extends2.default)({
57
55
  draggableId: draggableId,
58
56
  index: index,
59
57
  isDragDisabled: isDragDisabled
60
58
  }, rest), function (provided, snapshot, rubric) {
61
59
  var _provided$dragHandleP, _provided$dragHandleP2;
62
- var classes = (0, _classnames.default)('euiDraggable', {
63
- 'euiDraggable--hasClone': cloneItems,
64
- 'euiDraggable--hasCustomDragHandle': customDragHandle,
65
- 'euiDraggable--isDragging': snapshot.isDragging,
66
- 'euiDraggable--withoutDropAnimation': isRemovable
67
- }, spacingToClassNameMap[spacing], className);
60
+ var isDragging = snapshot.isDragging;
61
+ var cssStyles = [styles.euiDraggable, cloneItems && !isDragging && styles.hasClone, isDragging && styles.isDragging, isRemovable && styles.isRemovable, styles.spacing[spacing]];
62
+ var classes = (0, _classnames.default)('euiDraggable', className);
68
63
  var childClasses = (0, _classnames.default)('euiDraggable__item', {
69
- 'euiDraggable__item--hasCustomDragHandle': customDragHandle,
70
- 'euiDraggable__item--isDisabled': isDragDisabled,
71
- 'euiDraggable__item--isDragging': snapshot.isDragging,
72
- 'euiDraggable__item--isDropAnimating': snapshot.isDropAnimating
64
+ 'euiDraggable__item-isDisabled': isDragDisabled
73
65
  });
74
66
  var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
75
- return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", (0, _extends2.default)({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
67
+ return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("div", (0, _extends2.default)({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
76
68
  ref: provided.innerRef,
77
69
  "data-test-subj": dataTestSubj,
78
70
  className: classes,
71
+ css: cssStyles,
79
72
  style: _objectSpread(_objectSpread({}, style), provided.draggableProps.style)
80
73
  // We use [role="group"] instead of [role="button"] when we expect a nested
81
74
  // interactive element. Screen readers will cue users that this is a container
@@ -86,10 +79,12 @@ var EuiDraggable = function EuiDraggable(_ref) {
86
79
  // because [role="group"] does not permit or warrant a tab stop
87
80
  ,
88
81
  tabIndex: hasInteractiveChildren ? undefined : (_provided$dragHandleP2 = provided.dragHandleProps) === null || _provided$dragHandleP2 === void 0 ? void 0 : _provided$dragHandleP2.tabIndex
89
- }), /*#__PURE__*/(0, _react.cloneElement)(DraggableElement, {
90
- className: (0, _classnames.default)(DraggableElement.props.className, childClasses)
91
- })), cloneItems && snapshot.isDragging && (0, _react2.jsx)("div", {
92
- className: (0, _classnames.default)(classes, 'euiDraggable--clone')
82
+ }), (0, _services.cloneElementWithCss)(DraggableElement, {
83
+ className: (0, _classnames.default)(DraggableElement.props.className, childClasses),
84
+ css: [_draggable.euiDraggableItemStyles.euiDraggable__item, isDragDisabled && _draggable.euiDraggableItemStyles.disabled]
85
+ })), cloneItems && isDragging && (0, _react2.jsx)("div", {
86
+ className: (0, _classnames.default)(classes, 'euiDraggable--clone'),
87
+ css: cssStyles
93
88
  }, DraggableElement));
94
89
  });
95
90
  };
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiDraggableStyles = exports.euiDraggableItemStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _droppable = require("./droppable.styles");
9
+ 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)."; } /*
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
+ var _ref = process.env.NODE_ENV === "production" ? {
17
+ name: "1nohugb-isRemovable",
18
+ styles: "transition-duration:0.001s!important;label:isRemovable;"
19
+ } : {
20
+ name: "1nohugb-isRemovable",
21
+ styles: "transition-duration:0.001s!important;label:isRemovable;",
22
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
+ };
24
+ var _ref2 = process.env.NODE_ENV === "production" ? {
25
+ name: "1wvdf2m-hasClone",
26
+ styles: "transform:none!important;label:hasClone;"
27
+ } : {
28
+ name: "1wvdf2m-hasClone",
29
+ styles: "transform:none!important;label:hasClone;",
30
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
31
+ };
32
+ var _ref3 = process.env.NODE_ENV === "production" ? {
33
+ name: "oyhf1i-euiDraggable",
34
+ styles: "&:focus{outline:none;&>.euiDraggable__item{outline:auto;}};label:euiDraggable;"
35
+ } : {
36
+ name: "oyhf1i-euiDraggable",
37
+ styles: "&:focus{outline:none;&>.euiDraggable__item{outline:auto;}};label:euiDraggable;",
38
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
39
+ };
40
+ var euiDraggableStyles = function euiDraggableStyles(euiThemeContext) {
41
+ var euiTheme = euiThemeContext.euiTheme;
42
+ return {
43
+ euiDraggable: _ref3,
44
+ isDragging: /*#__PURE__*/(0, _react.css)("z-index:", euiTheme.levels.toast, "!important;;label:isDragging;"),
45
+ hasClone: _ref2,
46
+ isRemovable: _ref,
47
+ spacing: (0, _droppable.sharedSpacingPadding)(euiThemeContext)
48
+ };
49
+ };
50
+ exports.euiDraggableStyles = euiDraggableStyles;
51
+ var euiDraggableItemStyles = {
52
+ euiDraggable__item: /*#__PURE__*/(0, _react.css)(";label:euiDraggable__item;"),
53
+ disabled: process.env.NODE_ENV === "production" ? {
54
+ name: "b86pnw-disabled",
55
+ styles: "cursor:not-allowed;label:disabled;"
56
+ } : {
57
+ name: "b86pnw-disabled",
58
+ styles: "cursor:not-allowed;label:disabled;",
59
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
60
+ }
61
+ };
62
+ exports.euiDraggableItemStyles = euiDraggableItemStyles;