@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.
Files changed (181) hide show
  1. package/dist/eui_theme_dark.css +0 -642
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -642
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/combo_box/combo_box.js +54 -50
  6. package/es/components/combo_box/combo_box.styles.js +14 -0
  7. package/es/components/combo_box/combo_box_input/combo_box_input.js +69 -62
  8. package/es/components/combo_box/combo_box_input/combo_box_input.styles.js +60 -0
  9. package/es/components/combo_box/combo_box_input/combo_box_pill.js +50 -138
  10. package/es/components/combo_box/combo_box_input/combo_box_pill.styles.js +25 -0
  11. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
  12. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +22 -0
  13. package/es/components/combo_box/combo_box_options_list/index.js +0 -1
  14. package/es/components/combo_box/utils.js +26 -3
  15. package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +3 -4
  16. package/es/components/flyout/flyout.styles.js +3 -3
  17. package/es/components/form/form.styles.js +16 -8
  18. package/es/components/list_group/list_group.styles.js +3 -3
  19. package/es/components/popover/input_popover.js +3 -3
  20. package/es/components/search_bar/search_bar.styles.js +2 -4
  21. package/es/components/selectable/selectable.js +9 -8
  22. package/es/components/selectable/selectable.styles.js +22 -0
  23. package/es/components/selectable/selectable_list/selectable_list.js +38 -29
  24. package/es/components/selectable/selectable_list/selectable_list.styles.js +35 -0
  25. package/es/components/selectable/selectable_list/selectable_list_item.js +18 -17
  26. package/es/components/selectable/selectable_list/selectable_list_item.styles.js +56 -0
  27. package/es/components/selectable/selectable_message/selectable_message.js +6 -3
  28. package/es/components/selectable/selectable_message/selectable_message.styles.js +17 -0
  29. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +12 -9
  30. package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +47 -0
  31. package/es/components/selectable/selectable_templates/selectable_template_sitewide_option.js +40 -10
  32. package/es/services/theme/index.js +1 -1
  33. package/es/services/theme/style_memoization.js +14 -0
  34. package/eui.d.ts +146 -46
  35. package/i18ntokens.json +118 -118
  36. package/lib/components/combo_box/combo_box.js +53 -49
  37. package/lib/components/combo_box/combo_box.styles.js +20 -0
  38. package/lib/components/combo_box/combo_box_input/combo_box_input.js +68 -61
  39. package/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +64 -0
  40. package/lib/components/combo_box/combo_box_input/combo_box_pill.js +55 -144
  41. package/lib/components/combo_box/combo_box_input/combo_box_pill.styles.js +31 -0
  42. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
  43. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +28 -0
  44. package/lib/components/combo_box/combo_box_options_list/index.js +0 -7
  45. package/lib/components/combo_box/utils.js +29 -9
  46. package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +2 -3
  47. package/lib/components/flyout/flyout.styles.js +2 -2
  48. package/lib/components/form/form.styles.js +16 -9
  49. package/lib/components/list_group/list_group.styles.js +2 -2
  50. package/lib/components/popover/input_popover.js +2 -2
  51. package/lib/components/search_bar/search_bar.styles.js +1 -3
  52. package/lib/components/selectable/selectable.js +9 -8
  53. package/lib/components/selectable/selectable.styles.js +26 -0
  54. package/lib/components/selectable/selectable_list/selectable_list.js +38 -29
  55. package/lib/components/selectable/selectable_list/selectable_list.styles.js +38 -0
  56. package/lib/components/selectable/selectable_list/selectable_list_item.js +18 -16
  57. package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +60 -0
  58. package/lib/components/selectable/selectable_message/selectable_message.js +6 -3
  59. package/lib/components/selectable/selectable_message/selectable_message.styles.js +23 -0
  60. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +11 -8
  61. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +51 -0
  62. package/lib/components/selectable/selectable_templates/selectable_template_sitewide_option.js +40 -10
  63. package/lib/services/theme/index.js +6 -0
  64. package/lib/services/theme/style_memoization.js +15 -1
  65. package/optimize/es/components/combo_box/combo_box.js +54 -50
  66. package/optimize/es/components/combo_box/combo_box.styles.js +14 -0
  67. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +64 -62
  68. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.styles.js +60 -0
  69. package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +51 -78
  70. package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.styles.js +25 -0
  71. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
  72. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +22 -0
  73. package/optimize/es/components/combo_box/combo_box_options_list/index.js +0 -1
  74. package/optimize/es/components/combo_box/utils.js +23 -3
  75. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +3 -4
  76. package/optimize/es/components/flyout/flyout.styles.js +3 -3
  77. package/optimize/es/components/form/form.styles.js +16 -8
  78. package/optimize/es/components/list_group/list_group.styles.js +3 -3
  79. package/optimize/es/components/popover/input_popover.js +3 -3
  80. package/optimize/es/components/search_bar/search_bar.styles.js +2 -4
  81. package/optimize/es/components/selectable/selectable.js +9 -8
  82. package/optimize/es/components/selectable/selectable.styles.js +22 -0
  83. package/optimize/es/components/selectable/selectable_list/selectable_list.js +38 -29
  84. package/optimize/es/components/selectable/selectable_list/selectable_list.styles.js +35 -0
  85. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +18 -14
  86. package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +56 -0
  87. package/optimize/es/components/selectable/selectable_message/selectable_message.js +6 -3
  88. package/optimize/es/components/selectable/selectable_message/selectable_message.styles.js +17 -0
  89. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.js +12 -9
  90. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +47 -0
  91. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide_option.js +35 -10
  92. package/optimize/es/services/theme/index.js +1 -1
  93. package/optimize/es/services/theme/style_memoization.js +14 -0
  94. package/optimize/lib/components/combo_box/combo_box.js +53 -49
  95. package/optimize/lib/components/combo_box/combo_box.styles.js +20 -0
  96. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +63 -61
  97. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.styles.js +64 -0
  98. package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +52 -81
  99. package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.styles.js +31 -0
  100. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
  101. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +28 -0
  102. package/optimize/lib/components/combo_box/combo_box_options_list/index.js +0 -7
  103. package/optimize/lib/components/combo_box/utils.js +26 -9
  104. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +2 -3
  105. package/optimize/lib/components/flyout/flyout.styles.js +2 -2
  106. package/optimize/lib/components/form/form.styles.js +16 -9
  107. package/optimize/lib/components/list_group/list_group.styles.js +2 -2
  108. package/optimize/lib/components/popover/input_popover.js +2 -2
  109. package/optimize/lib/components/search_bar/search_bar.styles.js +1 -3
  110. package/optimize/lib/components/selectable/selectable.js +9 -8
  111. package/optimize/lib/components/selectable/selectable.styles.js +26 -0
  112. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +38 -29
  113. package/optimize/lib/components/selectable/selectable_list/selectable_list.styles.js +38 -0
  114. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +18 -14
  115. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +60 -0
  116. package/optimize/lib/components/selectable/selectable_message/selectable_message.js +6 -3
  117. package/optimize/lib/components/selectable/selectable_message/selectable_message.styles.js +23 -0
  118. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +11 -8
  119. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +51 -0
  120. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide_option.js +35 -10
  121. package/optimize/lib/services/theme/index.js +6 -0
  122. package/optimize/lib/services/theme/style_memoization.js +15 -1
  123. package/package.json +1 -1
  124. package/src/components/index.scss +0 -2
  125. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  126. package/test-env/components/combo_box/combo_box.js +53 -49
  127. package/test-env/components/combo_box/combo_box.styles.js +20 -0
  128. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +63 -61
  129. package/test-env/components/combo_box/combo_box_input/combo_box_input.styles.js +64 -0
  130. package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +51 -135
  131. package/test-env/components/combo_box/combo_box_input/combo_box_pill.styles.js +31 -0
  132. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +31 -23
  133. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.styles.js +28 -0
  134. package/test-env/components/combo_box/combo_box_options_list/index.js +0 -7
  135. package/test-env/components/combo_box/utils.js +26 -9
  136. package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.styles.js +2 -3
  137. package/test-env/components/flyout/flyout.styles.js +2 -2
  138. package/test-env/components/form/form.styles.js +16 -9
  139. package/test-env/components/list_group/list_group.styles.js +2 -2
  140. package/test-env/components/popover/input_popover.js +2 -2
  141. package/test-env/components/search_bar/search_bar.styles.js +1 -3
  142. package/test-env/components/selectable/selectable.js +9 -8
  143. package/test-env/components/selectable/selectable.styles.js +26 -0
  144. package/test-env/components/selectable/selectable_list/selectable_list.js +38 -29
  145. package/test-env/components/selectable/selectable_list/selectable_list.styles.js +38 -0
  146. package/test-env/components/selectable/selectable_list/selectable_list_item.js +18 -14
  147. package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +60 -0
  148. package/test-env/components/selectable/selectable_message/selectable_message.js +6 -3
  149. package/test-env/components/selectable/selectable_message/selectable_message.styles.js +23 -0
  150. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +11 -8
  151. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +51 -0
  152. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide_option.js +35 -10
  153. package/test-env/services/theme/index.js +6 -0
  154. package/test-env/services/theme/style_memoization.js +15 -1
  155. package/es/components/combo_box/combo_box_options_list/combo_box_option.js +0 -153
  156. package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +0 -160
  157. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_option.js +0 -90
  158. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_option.js +0 -98
  159. package/src/components/combo_box/_combo_box.scss +0 -147
  160. package/src/components/combo_box/_index.scss +0 -3
  161. package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +0 -38
  162. package/src/components/combo_box/combo_box_input/_index.scss +0 -1
  163. package/src/components/combo_box/combo_box_options_list/_combo_box_option.scss +0 -72
  164. package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +0 -28
  165. package/src/components/combo_box/combo_box_options_list/_combo_box_title.scss +0 -12
  166. package/src/components/combo_box/combo_box_options_list/_index.scss +0 -3
  167. package/src/components/selectable/_index.scss +0 -5
  168. package/src/components/selectable/_selectable.scss +0 -8
  169. package/src/components/selectable/selectable_list/_index.scss +0 -3
  170. package/src/components/selectable/selectable_list/_selectable_list.scss +0 -38
  171. package/src/components/selectable/selectable_list/_selectable_list_item.scss +0 -62
  172. package/src/components/selectable/selectable_list/_variables.scss +0 -2
  173. package/src/components/selectable/selectable_message/_index.scss +0 -1
  174. package/src/components/selectable/selectable_message/_selectable_message.scss +0 -19
  175. package/src/components/selectable/selectable_search/_index.scss +0 -1
  176. package/src/components/selectable/selectable_search/_selectable_search.scss +0 -3
  177. package/src/components/selectable/selectable_templates/_index.scss +0 -2
  178. package/src/components/selectable/selectable_templates/_selectable_template_sitewide_option.scss +0 -39
  179. package/src/components/selectable/selectable_templates/_variables.scss +0 -26
  180. package/src/themes/amsterdam/overrides/_combo_box.scss +0 -50
  181. package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +0 -154
@@ -1,3 +1,4 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
2
  import _typeof from "@babel/runtime/helpers/typeof";
2
3
  import _extends from "@babel/runtime/helpers/extends";
3
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
@@ -20,12 +21,12 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
20
21
 
21
22
  import React, { Component } from 'react';
22
23
  import classNames from 'classnames';
23
- import { keys, CanvasTextUtils } from '../../../services';
24
+ import { keys, CanvasTextUtils, RenderWithEuiStylesMemoizer } from '../../../services';
24
25
  import { EuiScreenReaderOnly } from '../../accessibility';
25
26
  import { EuiFormControlLayout } from '../../form/form_control_layout';
26
- import { getFormControlClassNameForIconCount } from '../../form/form_control_layout/_num_icons';
27
27
  import { EuiComboBoxOptionAppendPrepend } from '../utils';
28
28
  import { EuiComboBoxPill } from './combo_box_pill';
29
+ import { euiComboBoxInputStyles } from './combo_box_input.styles';
29
30
  import { jsx as ___EmotionJSX } from "@emotion/react";
30
31
  export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
31
32
  function EuiComboBoxInput() {
@@ -165,6 +166,7 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
165
166
  }, {
166
167
  key: "render",
167
168
  value: function render() {
169
+ var _this2 = this;
168
170
  var _this$props5 = this.props,
169
171
  compressed = _this$props5.compressed,
170
172
  focusedOptionId = _this$props5.focusedOptionId,
@@ -209,6 +211,7 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
209
211
  id: removeOptionMessageId
210
212
  }, removeOptionMessageContent));
211
213
  }
214
+ var isInGroup = singleSelection && (prepend || append);
212
215
  var showPlaceholder = placeholder && !(selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length) && !searchValue;
213
216
  var clickProps = {};
214
217
  if (!isDisabled && onClear && hasSelectedOptions) {
@@ -229,68 +232,67 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
229
232
  type: 'arrowDown'
230
233
  };
231
234
  }
232
- var numIconsClass = getFormControlClassNameForIconCount({
233
- isDropdown: !noIcon,
234
- clear: !!clickProps.clear,
235
- isInvalid: isInvalid,
236
- isLoading: isLoading
235
+ var wrapClasses = classNames('euiComboBox__inputWrap', {
236
+ 'euiComboBox__inputWrap--plainText': this.asPlainText
237
237
  });
238
- var wrapClasses = classNames('euiComboBox__inputWrap', numIconsClass, {
239
- 'euiComboBox__inputWrap--compressed': compressed,
240
- 'euiComboBox__inputWrap--fullWidth': fullWidth,
241
- 'euiComboBox__inputWrap--noWrap': singleSelection,
242
- 'euiComboBox__inputWrap--plainText': this.asPlainText || showPlaceholder,
243
- 'euiComboBox__inputWrap--inGroup': prepend || append
238
+ return ___EmotionJSX(RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
239
+ var styles = stylesMemoizer(euiComboBoxInputStyles);
240
+ var cssStyles = [styles.euiComboBoxInputWrapper, !singleSelection && styles.multiSelect, compressed ? styles.compressed : styles.uncompressed].concat(_toConsumableArray(_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]);
241
+ var formLayoutStyles = [styles.formLayout.euiComboBox__formControlLayout, !singleSelection && styles.formLayout.multiSelect, isInGroup && !append && styles.formLayout.prependOnly, isInGroup && !prepend && styles.formLayout.appendOnly];
242
+ return ___EmotionJSX(EuiFormControlLayout, _extends({
243
+ icon: icon
244
+ }, clickProps, {
245
+ inputId: id,
246
+ isLoading: isLoading,
247
+ isInvalid: isInvalid,
248
+ compressed: compressed,
249
+ fullWidth: fullWidth,
250
+ prepend: prepend,
251
+ append: append,
252
+ css: formLayoutStyles
253
+ }), ___EmotionJSX("div", {
254
+ css: cssStyles,
255
+ className: wrapClasses,
256
+ "data-test-subj": "comboBoxInput",
257
+ onClick: onClick,
258
+ tabIndex: -1 // becomes onBlur event's relatedTarget, otherwise relatedTarget is null when clicking on this div
259
+ }, _this2.renderPills(), ___EmotionJSX(EuiComboBoxOptionAppendPrepend, {
260
+ option: _this2.asPlainText ? selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions[0] : undefined,
261
+ classNamePrefix: "euiComboBoxPlainTextSelection",
262
+ marginSize: "xxs"
263
+ }, ___EmotionJSX("input", {
264
+ "aria-activedescendant": focusedOptionId,
265
+ "aria-autocomplete": "list",
266
+ "aria-controls": isListOpen ? rootId('listbox') : '',
267
+ "aria-expanded": isListOpen,
268
+ "aria-label": ariaLabel,
269
+ "aria-labelledby": ariaLabelledby,
270
+ "aria-invalid": isInvalid,
271
+ css: styles.euiComboBoxInput,
272
+ className: "euiComboBox__input",
273
+ "data-test-subj": "comboBoxSearchInput",
274
+ disabled: isDisabled,
275
+ id: id,
276
+ onBlur: _this2.onBlur,
277
+ onChange: function onChange(event) {
278
+ return _onChange(event.target.value);
279
+ },
280
+ onFocus: _this2.onFocus,
281
+ onKeyDown: _this2.onKeyDown,
282
+ ref: _this2.inputRefCallback,
283
+ role: "combobox",
284
+ style: {
285
+ inlineSize: _this2.asPlainText || showPlaceholder ? '100%' : _this2.state.inputWidth
286
+ },
287
+ placeholder: showPlaceholder ? placeholder : undefined,
288
+ value: _this2.searchValue,
289
+ autoFocus: autoFocus,
290
+ autoComplete: "off"
291
+ // Force the menu to re-open on every input click - only necessary when plain text
292
+ ,
293
+ onClick: _this2.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
294
+ })), removeOptionMessage));
244
295
  });
245
- return ___EmotionJSX(EuiFormControlLayout, _extends({
246
- icon: icon
247
- }, clickProps, {
248
- inputId: id,
249
- isLoading: isLoading,
250
- isInvalid: isInvalid,
251
- compressed: compressed,
252
- fullWidth: fullWidth,
253
- prepend: prepend,
254
- append: append
255
- }), ___EmotionJSX("div", {
256
- className: wrapClasses,
257
- "data-test-subj": "comboBoxInput",
258
- onClick: onClick,
259
- tabIndex: -1 // becomes onBlur event's relatedTarget, otherwise relatedTarget is null when clicking on this div
260
- }, this.renderPills(), ___EmotionJSX(EuiComboBoxOptionAppendPrepend, {
261
- option: this.asPlainText ? selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions[0] : undefined,
262
- classNamePrefix: "euiComboBoxPlainTextSelection"
263
- }, ___EmotionJSX("input", {
264
- "aria-activedescendant": focusedOptionId,
265
- "aria-autocomplete": "list",
266
- "aria-controls": isListOpen ? rootId('listbox') : '',
267
- "aria-expanded": isListOpen,
268
- "aria-label": ariaLabel,
269
- "aria-labelledby": ariaLabelledby,
270
- "aria-invalid": isInvalid,
271
- className: "euiComboBox__input",
272
- "data-test-subj": "comboBoxSearchInput",
273
- disabled: isDisabled,
274
- id: id,
275
- onBlur: this.onBlur,
276
- onChange: function onChange(event) {
277
- return _onChange(event.target.value);
278
- },
279
- onFocus: this.onFocus,
280
- onKeyDown: this.onKeyDown,
281
- ref: this.inputRefCallback,
282
- role: "combobox",
283
- style: {
284
- inlineSize: this.asPlainText || showPlaceholder ? '100%' : this.state.inputWidth
285
- },
286
- placeholder: showPlaceholder ? placeholder : undefined,
287
- value: this.searchValue,
288
- autoFocus: autoFocus,
289
- autoComplete: "off"
290
- // Force the menu to re-open on every input click - only necessary when plain text
291
- ,
292
- onClick: this.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
293
- })), removeOptionMessage));
294
296
  }
295
297
  }]);
296
298
  }(Component);
@@ -0,0 +1,60 @@
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 { logicalCSS } from '../../../global_styling';
12
+ import { euiFormControlStyles, euiFormControlDefaultShadow, euiFormControlText } from '../../form/form.styles';
13
+ var _ref = process.env.NODE_ENV === "production" ? {
14
+ name: "kedu1h-plainText",
15
+ styles: "align-items:center;cursor:text;label:plainText;"
16
+ } : {
17
+ name: "kedu1h-plainText",
18
+ styles: "align-items:center;cursor:text;label:plainText;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ };
21
+ var _ref2 = process.env.NODE_ENV === "production" ? {
22
+ name: "dkzr1g-multiSelect",
23
+ styles: "flex-wrap:wrap;label:multiSelect;"
24
+ } : {
25
+ name: "dkzr1g-multiSelect",
26
+ styles: "flex-wrap:wrap;label:multiSelect;",
27
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
28
+ };
29
+ export var euiComboBoxInputStyles = function euiComboBoxInputStyles(euiThemeContext) {
30
+ var euiTheme = euiThemeContext.euiTheme;
31
+ var formStyles = euiFormControlStyles(euiThemeContext);
32
+ return {
33
+ // Wrapper which visually mimics a form control
34
+ euiComboBoxInputWrapper: /*#__PURE__*/css(euiFormControlDefaultShadow(euiThemeContext), " display:flex;;label:euiComboBoxInputWrapper;"),
35
+ multiSelect: _ref2,
36
+ uncompressed: "\n ".concat(formStyles.uncompressed, "\n ").concat(logicalCSS('height', 'auto'), "\n ").concat(logicalCSS('padding-vertical', euiTheme.size.s), "\n ").concat(logicalCSS('padding-left', euiTheme.size.s), "\n column-gap: ").concat(euiTheme.size.s, ";\n row-gap: ").concat(euiTheme.size.xs, ";\n "),
37
+ compressed: /*#__PURE__*/css(formStyles.compressed, " ", logicalCSS('height', 'auto'), " ", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-left', euiTheme.size.xs), " column-gap:", euiTheme.size.xs, ";row-gap:", euiTheme.size.xxs, ";;label:compressed;"),
38
+ plainText: {
39
+ plainText: _ref,
40
+ compressed: "\n ".concat(logicalCSS('padding-left', euiTheme.size.s), "\n "),
41
+ uncompressed: "\n ".concat(logicalCSS('padding-left', euiTheme.size.m), "\n ")
42
+ },
43
+ invalid: /*#__PURE__*/css(formStyles.invalid, ";label:invalid;"),
44
+ disabled: /*#__PURE__*/css(formStyles.disabled, ";label:disabled;"),
45
+ open: /*#__PURE__*/css(formStyles.focus, ";label:open;"),
46
+ inGroup: /*#__PURE__*/css(formStyles.inGroup, ";label:inGroup;"),
47
+ // Actual input element, which has variable width depending on its value
48
+ euiComboBoxInput: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.l), " ", logicalCSS('min-width', '2px'), " ", logicalCSS('max-width', '100%'), euiFormControlText(euiThemeContext), " background:transparent;&:disabled{color:", euiTheme.colors.disabledText, ";}appearance:none!important;border:none!important;box-shadow:none!important;outline:none!important;;label:euiComboBoxInput;"),
49
+ // EuiFormControlLayout overrides
50
+ formLayout: {
51
+ euiComboBox__formControlLayout: /*#__PURE__*/css(";label:euiComboBox__formControlLayout;"),
52
+ // Allow the form control to expand to any height to accommodate multiple rows of pills
53
+ // TODO: Remove && specificity override once EuiFormControlLayout is on Emotion
54
+ multiSelect: /*#__PURE__*/css("&&{", logicalCSS('height', 'auto'), ";};label:multiSelect;"),
55
+ // Fix overflowing input wrapper background
56
+ prependOnly: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{", logicalCSS('border-top-right-radius', 'inherit'), " ", logicalCSS('border-bottom-right-radius', 'inherit'), ";};label:prependOnly;"),
57
+ appendOnly: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{", logicalCSS('border-top-left-radius', 'inherit'), " ", logicalCSS('border-bottom-left-radius', 'inherit'), ";};label:appendOnly;")
58
+ }
59
+ };
60
+ };
@@ -1,14 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
- import _createClass from "@babel/runtime/helpers/createClass";
5
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _inherits from "@babel/runtime/helpers/inherits";
8
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
3
  var _excluded = ["children", "className", "color", "onClick", "onClickAriaLabel", "onClose", "option"];
10
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
4
  /*
13
5
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
6
  * or more contributor license agreements. Licensed under the Elastic License
@@ -17,84 +9,65 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
17
9
  * Side Public License, v 1.
18
10
  */
19
11
 
20
- import React, { Component } from 'react';
12
+ import React from 'react';
21
13
  import classNames from 'classnames';
14
+ import { useEuiMemoizedStyles } from '../../../services';
22
15
  import { EuiBadge } from '../../badge';
23
16
  import { EuiI18n } from '../../i18n';
24
17
  import { EuiComboBoxOptionAppendPrepend } from '../utils';
18
+ import { euiComboBoxPillStyles } from './combo_box_pill.styles';
25
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
26
- export var EuiComboBoxPill = /*#__PURE__*/function (_Component) {
27
- function EuiComboBoxPill() {
28
- var _this;
29
- _classCallCheck(this, EuiComboBoxPill);
30
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
31
- args[_key] = arguments[_key];
32
- }
33
- _this = _callSuper(this, EuiComboBoxPill, [].concat(args));
34
- _defineProperty(_this, "onCloseButtonClick", function () {
35
- var _this$props = _this.props,
36
- onClose = _this$props.onClose,
37
- option = _this$props.option;
38
- if (onClose) {
39
- onClose(option);
40
- }
41
- });
42
- return _this;
43
- }
44
- _inherits(EuiComboBoxPill, _Component);
45
- return _createClass(EuiComboBoxPill, [{
46
- key: "render",
47
- value: function render() {
48
- var _this2 = this;
49
- var _this$props2 = this.props,
50
- children = _this$props2.children,
51
- className = _this$props2.className,
52
- color = _this$props2.color,
53
- onClick = _this$props2.onClick,
54
- onClickAriaLabel = _this$props2.onClickAriaLabel,
55
- onClose = _this$props2.onClose,
56
- option = _this$props2.option,
57
- rest = _objectWithoutProperties(_this$props2, _excluded);
58
- var classes = classNames('euiComboBoxPill', className);
59
- var onClickProps = onClick && onClickAriaLabel ? {
60
- onClick: onClick,
61
- onClickAriaLabel: onClickAriaLabel
62
- } : {};
63
- var content = ___EmotionJSX(EuiComboBoxOptionAppendPrepend, {
64
- option: option,
65
- classNamePrefix: "euiComboBoxPill"
66
- }, ___EmotionJSX("span", {
67
- className: "eui-textTruncate"
68
- }, children));
69
- if (onClose) {
70
- return ___EmotionJSX(EuiI18n, {
71
- token: "euiComboBoxPill.removeSelection",
72
- default: "Remove {children} from selection in this group",
73
- values: {
74
- children: children
75
- }
76
- }, function (removeSelection) {
77
- return ___EmotionJSX(EuiBadge, _extends({
78
- className: classes,
79
- color: color,
80
- "data-test-subj": "euiComboBoxPill",
81
- iconOnClick: _this2.onCloseButtonClick,
82
- iconOnClickAriaLabel: removeSelection,
83
- iconSide: "right",
84
- iconType: "cross",
85
- title: children
86
- }, onClickProps, rest), content);
87
- });
20
+ export var EuiComboBoxPill = function EuiComboBoxPill(_ref) {
21
+ var children = _ref.children,
22
+ className = _ref.className,
23
+ _ref$color = _ref.color,
24
+ color = _ref$color === void 0 ? 'hollow' : _ref$color,
25
+ onClick = _ref.onClick,
26
+ onClickAriaLabel = _ref.onClickAriaLabel,
27
+ onClose = _ref.onClose,
28
+ option = _ref.option,
29
+ rest = _objectWithoutProperties(_ref, _excluded);
30
+ var classes = classNames('euiComboBoxPill', className);
31
+ var styles = useEuiMemoizedStyles(euiComboBoxPillStyles);
32
+ var cssStyles = styles.euiComboBoxPill;
33
+ var onClickProps = onClick && onClickAriaLabel ? {
34
+ onClick: onClick,
35
+ onClickAriaLabel: onClickAriaLabel
36
+ } : {};
37
+ var content = ___EmotionJSX(EuiComboBoxOptionAppendPrepend, {
38
+ option: option,
39
+ classNamePrefix: "euiComboBoxPill"
40
+ }, ___EmotionJSX("span", {
41
+ className: "eui-textTruncate"
42
+ }, children));
43
+ if (onClose) {
44
+ return ___EmotionJSX(EuiI18n, {
45
+ token: "euiComboBoxPill.removeSelection",
46
+ default: "Remove {children} from selection in this group",
47
+ values: {
48
+ children: children
88
49
  }
50
+ }, function (removeSelection) {
89
51
  return ___EmotionJSX(EuiBadge, _extends({
52
+ css: cssStyles,
90
53
  className: classes,
91
54
  color: color,
92
55
  "data-test-subj": "euiComboBoxPill",
56
+ iconOnClick: function iconOnClick() {
57
+ return onClose(option);
58
+ },
59
+ iconOnClickAriaLabel: removeSelection,
60
+ iconSide: "right",
61
+ iconType: "cross",
93
62
  title: children
94
- }, rest, onClickProps), content);
95
- }
96
- }]);
97
- }(Component);
98
- _defineProperty(EuiComboBoxPill, "defaultProps", {
99
- color: 'hollow'
100
- });
63
+ }, onClickProps, rest), content);
64
+ });
65
+ }
66
+ return ___EmotionJSX(EuiBadge, _extends({
67
+ css: cssStyles,
68
+ className: classes,
69
+ color: color,
70
+ "data-test-subj": "euiComboBoxPill",
71
+ title: children
72
+ }, rest, onClickProps), content);
73
+ };
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+
9
+ import { css } from '@emotion/react';
10
+ import { logicalCSS, mathWithUnits } from '../../../global_styling';
11
+ export var euiComboBoxPillStyles = function euiComboBoxPillStyles(euiThemeContext) {
12
+ var euiTheme = euiThemeContext.euiTheme;
13
+
14
+ // Ensure the input doesn't drop to the next line when the EuiBadge has a very long text
15
+ var pillMaxWidth = "calc(100% - ".concat(euiTheme.size.xxs, " - ").concat(euiTheme.size.base, ")");
16
+ var pillHeight = mathWithUnits(euiTheme.size.l, function (x) {
17
+ return x - 2;
18
+ });
19
+ var pillLineHeight = mathWithUnits(pillHeight, function (x) {
20
+ return x - 2;
21
+ });
22
+ return {
23
+ euiComboBoxPill: /*#__PURE__*/css(logicalCSS('max-width', pillMaxWidth), " ", logicalCSS('height', pillHeight), " line-height:", pillLineHeight, ";vertical-align:baseline;", logicalCSS('margin-vertical', '1px'), "&+.euiBadge{", logicalCSS('margin-left', 0), ";}.euiBadge__text{display:flex;align-items:center;.euiIcon{display:block;}};label:euiComboBoxPill;")
24
+ };
25
+ };
@@ -24,18 +24,20 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  import React, { Component } from 'react';
25
25
  import classNames from 'classnames';
26
26
  import { FixedSizeList } from 'react-window';
27
+ import { RenderWithEuiStylesMemoizer } from '../../../services';
27
28
  import { EuiFlexGroup, EuiFlexItem } from '../../flex';
28
29
  import { EuiHighlight } from '../../highlight';
29
30
  import { EuiMark } from '../../mark';
30
31
  import { EuiText } from '../../text';
31
32
  import { EuiLoadingSpinner } from '../../loading';
32
- import { EuiComboBoxTitle } from './combo_box_title';
33
33
  import { EuiI18n } from '../../i18n';
34
34
  import { EuiFilterSelectItem } from '../../filter_group/filter_select_item';
35
35
  import { EuiBadge } from '../../badge';
36
36
  import { EuiTextTruncate } from '../../text_truncate';
37
37
  import { EuiInputPopoverWidthContext } from '../../popover/input_popover';
38
38
  import { EuiComboBoxOptionAppendPrepend } from '../utils';
39
+ import { EuiComboBoxTitle } from './combo_box_title';
40
+ import { euiComboBoxOptionListStyles, LIST_MAX_HEIGHT } from './combo_box_options_list.styles';
39
41
  import { jsx as ___EmotionJSX } from "@emotion/react";
40
42
  var hitEnterBadge = ___EmotionJSX(EuiBadge, {
41
43
  className: "euiComboBoxOption__enterBadge",
@@ -119,7 +121,8 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
119
121
  className: "euiComboBoxOption__contentWrapper"
120
122
  }, ___EmotionJSX(EuiComboBoxOptionAppendPrepend, {
121
123
  option: option,
122
- classNamePrefix: "euiComboBoxOption"
124
+ classNamePrefix: "euiComboBoxOption",
125
+ marginSize: "s"
123
126
  }, ___EmotionJSX("span", {
124
127
  className: "euiComboBoxOption__content"
125
128
  }, renderOption ? renderOption(option, searchValue, 'euiComboBoxOption__renderOption') : _this.renderTruncatedOption(label, truncationProps))), optionIsFocused && !optionIsDisabled ? hitEnterBadge : null));
@@ -177,6 +180,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
177
180
  }, {
178
181
  key: "render",
179
182
  value: function render() {
183
+ var _this2 = this;
180
184
  var _this$props2 = this.props,
181
185
  dataTestSubj = _this$props2['data-test-subj'],
182
186
  activeOptionIndex = _this$props2.activeOptionIndex,
@@ -295,31 +299,35 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
295
299
  default: "You've selected all available options"
296
300
  }));
297
301
  }
298
- var emptyState = emptyStateContent ? ___EmotionJSX(EuiText, {
299
- size: "xs",
300
- className: "euiComboBoxOptionsList__empty"
301
- }, emptyStateContent) : undefined;
302
302
  var numVisibleOptions = matchingOptions.length < 7 ? matchingOptions.length : 7;
303
303
  var height = numVisibleOptions * (rowHeight + 1); // Add one for the border
304
304
 
305
305
  // bounded by max-height of .euiComboBoxOptionsList
306
- var boundedHeight = height > 200 ? 200 : height;
307
- var optionsList = ___EmotionJSX(FixedSizeList, {
308
- className: "euiComboBoxOptionsList__virtualization",
309
- height: boundedHeight,
310
- onScroll: onScroll,
311
- itemCount: matchingOptions.length,
312
- itemSize: rowHeight,
313
- itemData: matchingOptions,
314
- ref: this.setListRef,
315
- innerElementType: this.ListInnerElement,
316
- width: this.context
317
- }, this.ListRow);
318
- return ___EmotionJSX("div", _extends({
319
- className: "euiComboBoxOptionsList",
320
- "data-test-subj": classNames('comboBoxOptionsList', dataTestSubj),
321
- ref: listRef
322
- }, rest), emptyState || optionsList);
306
+ var boundedHeight = height > LIST_MAX_HEIGHT ? LIST_MAX_HEIGHT : height;
307
+ return ___EmotionJSX(RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
308
+ var styles = stylesMemoizer(euiComboBoxOptionListStyles);
309
+ return ___EmotionJSX("div", _extends({
310
+ css: styles.euiComboBoxOptionList,
311
+ className: "euiComboBoxOptionsList",
312
+ "data-test-subj": classNames('comboBoxOptionsList', dataTestSubj),
313
+ ref: listRef
314
+ }, rest), emptyStateContent ? ___EmotionJSX(EuiText, {
315
+ size: "xs",
316
+ css: styles.euiComboBoxOptionsList__empty,
317
+ className: "euiComboBoxOptionsList__empty"
318
+ }, emptyStateContent) : ___EmotionJSX(FixedSizeList, {
319
+ css: styles.euiComboBoxOptionList__virtualization,
320
+ className: "euiComboBoxOptionsList__virtualization",
321
+ height: boundedHeight,
322
+ onScroll: onScroll,
323
+ itemCount: matchingOptions.length,
324
+ itemSize: rowHeight,
325
+ itemData: matchingOptions,
326
+ ref: _this2.setListRef,
327
+ innerElementType: _this2.ListInnerElement,
328
+ width: _this2.context
329
+ }, _this2.ListRow));
330
+ });
323
331
  }
324
332
  }]);
325
333
  }(Component);
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+
9
+ import { css } from '@emotion/react';
10
+ import { logicalCSS, mathWithUnits, euiScrollBarStyles, euiTextBreakWord, euiTextTruncate } from '../../../global_styling';
11
+ import { euiTitle } from '../../title/title.styles';
12
+ export var LIST_MAX_HEIGHT = 200;
13
+ export var euiComboBoxOptionListStyles = function euiComboBoxOptionListStyles(euiThemeContext) {
14
+ var euiTheme = euiThemeContext.euiTheme;
15
+ return {
16
+ euiComboBoxOptionList: /*#__PURE__*/css(logicalCSS('max-height', "".concat(LIST_MAX_HEIGHT, "px")), " overflow:hidden;.euiTextTruncate{pointer-events:none;}.euiComboBoxOption__contentWrapper{display:flex;align-items:center;}.euiComboBoxOption__content{flex:1;text-align:start;", euiTextTruncate(), ";}.euiComboBoxOption__emptyStateText{flex:1;text-align:start;", logicalCSS('margin-bottom', 0), ";}.euiComboBoxOption__enterBadge{", logicalCSS('margin-left', euiTheme.size.xs), ";}.euiComboBoxTitle{display:flex;", logicalCSS('padding-horizontal', euiTheme.size.s), logicalCSS('padding-top', mathWithUnits(euiTheme.size.s, function (x) {
17
+ return x + 1;
18
+ })), " ", logicalCSS('padding-bottom', euiTheme.size.xs), " ", euiTitle(euiThemeContext, 'xxxs'), ";};label:euiComboBoxOptionList;"),
19
+ euiComboBoxOptionList__virtualization: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), ";;label:euiComboBoxOptionList__virtualization;"),
20
+ euiComboBoxOptionsList__empty: /*#__PURE__*/css("padding:", euiTheme.size.s, ";text-align:center;", euiTextBreakWord(), ";;label:euiComboBoxOptionsList__empty;")
21
+ };
22
+ };
@@ -7,5 +7,4 @@
7
7
  */
8
8
 
9
9
  export { EuiComboBoxOptionsList } from './combo_box_options_list';
10
- export { EuiComboBoxOption } from './combo_box_option';
11
10
  export { EuiComboBoxTitle } from './combo_box_title';
@@ -1,3 +1,7 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { css as _css } from "@emotion/react";
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
5
  /*
2
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
7
  * or more contributor license agreements. Licensed under the Elastic License
@@ -7,6 +11,8 @@
7
11
  */
8
12
 
9
13
  import React from 'react';
14
+ import { useEuiTheme } from '../../services';
15
+ import { logicalStyle } from '../../global_styling';
10
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
11
17
  /**
12
18
  * DRY util for rendering an option with its prepend and append properties
@@ -14,10 +20,24 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
14
20
  export var EuiComboBoxOptionAppendPrepend = function EuiComboBoxOptionAppendPrepend(_ref) {
15
21
  var children = _ref.children,
16
22
  option = _ref.option,
17
- classNamePrefix = _ref.classNamePrefix;
23
+ classNamePrefix = _ref.classNamePrefix,
24
+ _ref$marginSize = _ref.marginSize,
25
+ marginSize = _ref$marginSize === void 0 ? 'xs' : _ref$marginSize;
26
+ var _useEuiTheme = useEuiTheme(),
27
+ euiTheme = _useEuiTheme.euiTheme;
28
+ var margin = euiTheme.size[marginSize];
18
29
  return ___EmotionJSX(React.Fragment, null, (option === null || option === void 0 ? void 0 : option.prepend) && ___EmotionJSX("span", {
19
- className: "".concat(classNamePrefix, "__prepend")
30
+ className: "".concat(classNamePrefix, "__prepend"),
31
+ css: /*#__PURE__*/_css(_objectSpread(_objectSpread({}, logicalStyle('margin-right', margin)), centerIcons), ";label:EuiComboBoxOptionAppendPrepend;")
20
32
  }, option.prepend), children, (option === null || option === void 0 ? void 0 : option.append) && ___EmotionJSX("span", {
21
- className: "".concat(classNamePrefix, "__append")
33
+ className: "".concat(classNamePrefix, "__append"),
34
+ css: /*#__PURE__*/_css(_objectSpread(_objectSpread({}, logicalStyle('margin-left', margin)), centerIcons), ";label:EuiComboBoxOptionAppendPrepend;")
22
35
  }, option.append));
36
+ };
37
+
38
+ // Fix vertical alignment of EuiIcons in prepend/append nodes
39
+ var centerIcons = {
40
+ '.euiIcon': {
41
+ display: 'block'
42
+ }
23
43
  };
@@ -8,13 +8,12 @@
8
8
 
9
9
  import { css } from '@emotion/react';
10
10
  import { logicalCSS } from '../../../../global_styling';
11
- import { euiFormVariables } from '../../../form/form.styles';
11
+ import { euiFormMaxWidth } from '../../../form/form.styles';
12
12
  export var euiQuickSelectPopoverStyles = function euiQuickSelectPopoverStyles(euiThemeContext) {
13
13
  var euiTheme = euiThemeContext.euiTheme;
14
- var _euiFormVariables = euiFormVariables(euiThemeContext),
15
- maxWidth = _euiFormVariables.maxWidth;
14
+ var formMaxWidth = euiFormMaxWidth(euiThemeContext);
16
15
  return {
17
- euiQuickSelectPopover: /*#__PURE__*/css(logicalCSS('width', maxWidth), " ", logicalCSS('max-width', '100%'), ";;label:euiQuickSelectPopover;"),
16
+ euiQuickSelectPopover: /*#__PURE__*/css(logicalCSS('width', formMaxWidth), " ", logicalCSS('max-width', '100%'), ";;label:euiQuickSelectPopover;"),
18
17
  euiQuickSelectPopoverButton: /*#__PURE__*/css(logicalCSS('border-top-right-radius', 0), " ", logicalCSS('border-bottom-right-radius', 0), ".euiIcon{", logicalCSS('width', euiTheme.size.base), ";};label:euiQuickSelectPopoverButton;"),
19
18
  euiQuickSelectPopoverButton__content: /*#__PURE__*/css("gap:", euiTheme.size.xs, ";;label:euiQuickSelectPopoverButton__content;")
20
19
  };
@@ -12,7 +12,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
12
12
  import { css, keyframes } from '@emotion/react';
13
13
  import { euiCanAnimate, euiMaxBreakpoint, euiMinBreakpoint, logicalCSS, mathWithUnits } from '../../global_styling';
14
14
  import { euiShadowXLarge } from '../../themes/amsterdam/global_styling/mixins';
15
- import { euiFormVariables } from '../form/form.styles';
15
+ import { euiFormMaxWidth } from '../form/form.styles';
16
16
  export var FLYOUT_BREAKPOINT = 'm';
17
17
  export var euiFlyoutSlideInRight = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
18
18
  export var euiFlyoutSlideInLeft = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
@@ -56,7 +56,7 @@ export var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
56
56
  };
57
57
  var composeFlyoutSizing = function composeFlyoutSizing(euiThemeContext, size) {
58
58
  var euiTheme = euiThemeContext.euiTheme;
59
- var form = euiFormVariables(euiThemeContext);
59
+ var formMaxWidth = euiFormMaxWidth(euiThemeContext);
60
60
 
61
61
  // 1. Calculating the minimum width based on the screen takeover breakpoint
62
62
  var flyoutSizes = {
@@ -68,7 +68,7 @@ var composeFlyoutSizing = function composeFlyoutSizing(euiThemeContext, size) {
68
68
  },
69
69
  m: {
70
70
  // Calculated for forms plus padding
71
- min: "".concat(mathWithUnits(form.maxWidth, function (x) {
71
+ min: "".concat(mathWithUnits(formMaxWidth, function (x) {
72
72
  return x + 24;
73
73
  })),
74
74
  width: '50vw',