@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
@@ -12,6 +12,16 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
12
12
  import { shade, tint, darken, transparentize, makeHighContrastColor } from '../../services';
13
13
  import { logicalCSS, mathWithUnits, euiCanAnimate, euiFontSize } from '../../global_styling';
14
14
  import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins';
15
+
16
+ // There are multiple components that only need the form max-width size &
17
+ // don't need the extra overhead/color computing expense of every form var.
18
+ // For microperf, we're making this its own util
19
+ export var euiFormMaxWidth = function euiFormMaxWidth(_ref) {
20
+ var euiTheme = _ref.euiTheme;
21
+ return mathWithUnits(euiTheme.size.base, function (x) {
22
+ return x * 25;
23
+ });
24
+ };
15
25
  export var euiFormVariables = function euiFormVariables(euiThemeContext) {
16
26
  var euiTheme = euiThemeContext.euiTheme,
17
27
  colorMode = euiThemeContext.colorMode;
@@ -20,9 +30,7 @@ export var euiFormVariables = function euiFormVariables(euiThemeContext) {
20
30
  var controlHeight = euiTheme.size.xxl;
21
31
  var controlCompressedHeight = euiTheme.size.xl;
22
32
  var sizes = {
23
- maxWidth: mathWithUnits(euiTheme.size.base, function (x) {
24
- return x * 25;
25
- }),
33
+ maxWidth: euiFormMaxWidth(euiThemeContext),
26
34
  controlHeight: controlHeight,
27
35
  controlCompressedHeight: controlCompressedHeight,
28
36
  controlPadding: euiTheme.size.m,
@@ -131,13 +139,13 @@ export var euiFormControlDefaultShadow = function euiFormControlDefaultShadow(eu
131
139
  var form = euiFormVariables(euiThemeContext);
132
140
  return "\n /* We use inset box-shadow instead of border to skip extra hight calculations */\n border: none;\n box-shadow: inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(form.borderColor, ";\n background-color: ").concat(form.backgroundColor, ";\n\n background-repeat: no-repeat;\n background-size: 0% 100%;\n background-image: linear-gradient(to top,\n var(--euiFormControlStateColor),\n var(--euiFormControlStateColor) ").concat(euiTheme.border.width.thick, ",\n transparent ").concat(euiTheme.border.width.thick, ",\n transparent 100%\n );\n\n ").concat(euiCanAnimate, " {\n transition:\n box-shadow ").concat(form.animationTiming, ",\n background-image ").concat(form.animationTiming, ",\n background-size ").concat(form.animationTiming, ",\n background-color ").concat(form.animationTiming, ";\n }\n ");
133
141
  };
134
- export var euiFormControlFocusStyles = function euiFormControlFocusStyles(_ref) {
135
- var euiTheme = _ref.euiTheme,
136
- colorMode = _ref.colorMode;
142
+ export var euiFormControlFocusStyles = function euiFormControlFocusStyles(_ref2) {
143
+ var euiTheme = _ref2.euiTheme,
144
+ colorMode = _ref2.colorMode;
137
145
  return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.primary, ";\n background-color: ").concat(colorMode === 'DARK' ? shade(euiTheme.colors.emptyShade, 0.4) : euiTheme.colors.emptyShade, ";\n background-size: 100% 100%;\n outline: none; /* Remove all outlines and rely on our own bottom border gradient */\n");
138
146
  };
139
- export var euiFormControlInvalidStyles = function euiFormControlInvalidStyles(_ref2) {
140
- var euiTheme = _ref2.euiTheme;
147
+ export var euiFormControlInvalidStyles = function euiFormControlInvalidStyles(_ref3) {
148
+ var euiTheme = _ref3.euiTheme;
141
149
  return "\n --euiFormControlStateColor: ".concat(euiTheme.colors.danger, ";\n background-size: 100% 100%;\n");
142
150
  };
143
151
  export var euiFormControlDisabledStyles = function euiFormControlDisabledStyles(euiThemeContext) {
@@ -9,7 +9,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
9
9
 
10
10
  import { css } from '@emotion/react';
11
11
  import { logicalCSS } from '../../global_styling';
12
- import { euiFormVariables } from '../form/form.styles';
12
+ import { euiFormMaxWidth } from '../form/form.styles';
13
13
  var _ref = process.env.NODE_ENV === "production" ? {
14
14
  name: "1urrzow-flush",
15
15
  styles: "padding:0;border:none;.euiListGroupItem{border-radius:0;};label:flush;"
@@ -28,14 +28,14 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
28
28
  };
29
29
  export var euiListGroupStyles = function euiListGroupStyles(euiThemeContext) {
30
30
  var euiTheme = euiThemeContext.euiTheme;
31
- var form = euiFormVariables(euiThemeContext);
31
+ var formMaxWidth = euiFormMaxWidth(euiThemeContext);
32
32
  return {
33
33
  // Base
34
34
  euiListGroup: _ref2,
35
35
  // Variants
36
36
  flush: _ref,
37
37
  bordered: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";border:", euiTheme.border.thin, ";;label:bordered;"),
38
- maxWidthDefault: /*#__PURE__*/css(logicalCSS('max-width', form.maxWidth), ";;label:maxWidthDefault;"),
38
+ maxWidthDefault: /*#__PURE__*/css(logicalCSS('max-width', formMaxWidth), ";;label:maxWidthDefault;"),
39
39
  // Gutter sizes
40
40
  none: /*#__PURE__*/css(";label:none;"),
41
41
  s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";gap:", euiTheme.size.s, ";;label:s;"),
@@ -21,7 +21,7 @@ import { logicalCSS } from '../../global_styling';
21
21
  import { keys, useCombinedRefs, useEuiTheme } from '../../services';
22
22
  import { useResizeObserver } from '../observer/resize_observer';
23
23
  import { EuiFocusTrap } from '../focus_trap';
24
- import { euiFormVariables } from '../form/form.styles';
24
+ import { euiFormMaxWidth } from '../form/form.styles';
25
25
  import { EuiPopover } from './popover';
26
26
  import { jsx as ___EmotionJSX } from "@emotion/react";
27
27
  // Used by child components that want to know the parent popover width
@@ -59,7 +59,7 @@ export var EuiInputPopover = function EuiInputPopover(_ref) {
59
59
  props = _objectWithoutProperties(_ref, _excluded);
60
60
  var classes = classnames('euiInputPopover', className);
61
61
  var euiTheme = useEuiTheme();
62
- var form = euiFormVariables(euiTheme);
62
+ var formMaxWidth = euiFormMaxWidth(euiTheme);
63
63
 
64
64
  /**
65
65
  * Ref setup
@@ -179,7 +179,7 @@ export var EuiInputPopover = function EuiInputPopover(_ref) {
179
179
  }, [closeOnScroll, closePopover, panelEl, inputEl]);
180
180
  return ___EmotionJSX(EuiPopover, _extends({
181
181
  className: classes,
182
- css: /*#__PURE__*/css(fullWidth ? undefined : logicalCSS('max-width', form.maxWidth), ";label:EuiInputPopover;"),
182
+ css: /*#__PURE__*/css(fullWidth ? undefined : logicalCSS('max-width', formMaxWidth), ";label:EuiInputPopover;"),
183
183
  display: display,
184
184
  button: input,
185
185
  popoverRef: inputRef,
@@ -8,11 +8,9 @@
8
8
 
9
9
  import { css } from '@emotion/react';
10
10
  import { euiBreakpoint, logicalCSS, mathWithUnits } from '../../global_styling';
11
- import { euiFormVariables } from '../form/form.styles';
11
+ import { euiFormMaxWidth } from '../form/form.styles';
12
12
  export var euiSearchBar__searchHolder = function euiSearchBar__searchHolder(euiThemeContext) {
13
- var _euiFormVariables = euiFormVariables(euiThemeContext),
14
- maxWidth = _euiFormVariables.maxWidth;
15
- return /*#__PURE__*/css(logicalCSS('min-width', mathWithUnits(maxWidth, function (x) {
13
+ return /*#__PURE__*/css(logicalCSS('min-width', mathWithUnits(euiFormMaxWidth(euiThemeContext), function (x) {
16
14
  return x / 2;
17
15
  })), ";;label:euiSearchBar__searchHolder;");
18
16
  };
@@ -24,15 +24,16 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
 
25
25
  import React, { Component, createRef } from 'react';
26
26
  import classNames from 'classnames';
27
- import { EuiSelectableSearch } from './selectable_search';
28
- import { EuiSelectableMessage } from './selectable_message';
29
- import { EuiSelectableList } from './selectable_list';
27
+ import { keys, htmlIdGenerator } from '../../services';
30
28
  import { EuiLoadingSpinner } from '../loading';
31
29
  import { EuiSpacer } from '../spacer';
32
- import { createPartialStringEqualityOptionMatcher, getMatchingOptions } from './matching_options';
33
- import { keys, htmlIdGenerator } from '../../services';
34
30
  import { EuiScreenReaderLive, EuiScreenReaderOnly } from '../accessibility';
35
31
  import { EuiI18n } from '../i18n';
32
+ import { EuiSelectableSearch } from './selectable_search';
33
+ import { EuiSelectableMessage } from './selectable_message';
34
+ import { EuiSelectableList } from './selectable_list';
35
+ import { createPartialStringEqualityOptionMatcher, getMatchingOptions } from './matching_options';
36
+ import { euiSelectableStyles as styles } from './selectable.styles';
36
37
 
37
38
  // The `searchable` prop has significant implications for a11y.
38
39
  // When present, we effectively change from adhering
@@ -353,9 +354,8 @@ export var EuiSelectable = /*#__PURE__*/function (_Component) {
353
354
  rowHeight: rowHeight
354
355
  };
355
356
  }
356
- var classes = classNames('euiSelectable', {
357
- 'euiSelectable-fullHeight': height === 'full'
358
- }, className);
357
+ var classes = classNames('euiSelectable', className);
358
+ var cssStyles = [styles.euiSelectable, height === 'full' && styles.fullHeight];
359
359
 
360
360
  /** Create message content that replaces the list if no options are available (yet) */
361
361
  var messageContent;
@@ -522,6 +522,7 @@ export var EuiSelectable = /*#__PURE__*/function (_Component) {
522
522
  });
523
523
  return ___EmotionJSX("div", _extends({
524
524
  ref: this.containerRef,
525
+ css: cssStyles,
525
526
  className: classes,
526
527
  onKeyDown: this.onKeyDown,
527
528
  onBlur: this.onContainerBlur,
@@ -0,0 +1,22 @@
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
+ export var euiSelectableStyles = {
13
+ euiSelectable: process.env.NODE_ENV === "production" ? {
14
+ name: "1sd0qv-euiSelectable",
15
+ styles: "display:flex;flex-direction:column;label:euiSelectable;"
16
+ } : {
17
+ name: "1sd0qv-euiSelectable",
18
+ styles: "display:flex;flex-direction:column;label:euiSelectable;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ },
21
+ fullHeight: /*#__PURE__*/css(logicalCSS('height', '100%'), ";;label:fullHeight;")
22
+ };
@@ -25,11 +25,13 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
25
25
  import React, { Component, memo } from 'react';
26
26
  import classNames from 'classnames';
27
27
  import { FixedSizeList, areEqual } from 'react-window';
28
+ import { RenderWithEuiStylesMemoizer } from '../../../services';
28
29
  import { EuiAutoSizer } from '../../auto_sizer';
29
30
  import { EuiHighlight } from '../../highlight';
30
31
  import { EuiMark } from '../../mark';
31
32
  import { EuiTextTruncate } from '../../text_truncate';
32
33
  import { EuiSelectableListItem } from './selectable_list_item';
34
+ import { euiSelectableListStyles } from './selectable_list.styles';
33
35
 
34
36
  // Consumer Configurable Props via `EuiSelectable.listProps`
35
37
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -133,12 +135,15 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
133
135
  isPreFiltered = _this$props2.isPreFiltered,
134
136
  isVirtualized = _this$props2.isVirtualized;
135
137
  if (isGroupLabel) {
136
- return ___EmotionJSX("li", _extends({
137
- role: "presentation",
138
- className: "euiSelectableList__groupLabel",
139
- style: style
140
- // @ts-ignore complex
141
- }, optionRest), prepend, label, append);
138
+ return ___EmotionJSX(RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
139
+ var styles = stylesMemoizer(euiSelectableListStyles);
140
+ return ___EmotionJSX("li", _extends({
141
+ role: "presentation",
142
+ css: styles.euiSelectableList__groupLabel,
143
+ className: "euiSelectableList__groupLabel",
144
+ style: style
145
+ }, optionRest), prepend, label, append);
146
+ });
142
147
  }
143
148
  var id = makeOptionId(index);
144
149
  var isFocused = activeOptionIndex === index;
@@ -179,10 +184,11 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
179
184
  paddingSize: paddingSize,
180
185
  searchable: searchable,
181
186
  textWrap: textWrap
187
+ // @ts-ignore complex
182
188
  }, optionRest), renderOption ? renderOption( // @ts-ignore complex
183
189
  _objectSpread(_objectSpread({}, _option), optionData), searchValue) : highlightSearch ? _this.renderSearchedText(label, truncationProps) : truncationProps ? _this.renderTruncatedText(label, truncationProps) : label);
184
190
  }, areEqual));
185
- _defineProperty(_this, "renderVirtualizedList", function () {
191
+ _defineProperty(_this, "renderVirtualizedList", function (listClasses) {
186
192
  if (!_this.props.isVirtualized) return null;
187
193
  var _this$state = _this.state,
188
194
  optionArray = _this$state.optionArray,
@@ -193,7 +199,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
193
199
  rowHeight = _this$props3.rowHeight;
194
200
  var heightIsFull = forcedHeight === 'full';
195
201
  var virtualizationProps = _objectSpread({
196
- className: 'euiSelectableList__list',
202
+ className: listClasses,
197
203
  ref: _this.setListRef,
198
204
  outerRef: _this.removeScrollableTabStop,
199
205
  innerRef: _this.setListBoxRef,
@@ -533,27 +539,30 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
533
539
  truncationProps = _this$props11.truncationProps,
534
540
  rest = _objectWithoutProperties(_this$props11, _excluded3);
535
541
  var heightIsFull = forcedHeight === 'full';
536
- var classes = classNames('euiSelectableList', {
537
- 'euiSelectableList-fullHeight': heightIsFull,
538
- 'euiSelectableList-bordered': bordered
539
- }, className);
540
- return ___EmotionJSX("div", _extends({
541
- className: classes
542
- }, rest), isVirtualized ? this.renderVirtualizedList() : ___EmotionJSX("div", {
543
- className: "euiSelectableList__list",
544
- style: !heightIsFull ? {
545
- blockSize: forcedHeight
546
- } : undefined,
547
- ref: this.removeScrollableTabStop
548
- }, ___EmotionJSX("ul", {
549
- ref: this.setListBoxRef
550
- }, this.state.optionArray.map(function (_, index) {
551
- return /*#__PURE__*/React.createElement(_this2.ListRow, {
552
- key: "".concat(index, "-").concat(_this2.listRowRerender),
553
- data: _this2.state.optionArray,
554
- index: index
555
- }, null);
556
- }))));
542
+ var classes = classNames('euiSelectableList', className);
543
+ return ___EmotionJSX(RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
544
+ var styles = stylesMemoizer(euiSelectableListStyles);
545
+ var cssStyles = [styles.euiSelectableList, heightIsFull && styles.fullHeight, bordered && styles.bordered];
546
+ var listClasses = classNames('euiSelectableList__list', styles.euiSelectableList__list);
547
+ return ___EmotionJSX("div", _extends({
548
+ css: cssStyles,
549
+ className: classes
550
+ }, rest), isVirtualized ? _this2.renderVirtualizedList(listClasses) : ___EmotionJSX("div", {
551
+ className: listClasses,
552
+ style: !heightIsFull ? {
553
+ blockSize: forcedHeight
554
+ } : undefined,
555
+ ref: _this2.removeScrollableTabStop
556
+ }, ___EmotionJSX("ul", {
557
+ ref: _this2.setListBoxRef
558
+ }, _this2.state.optionArray.map(function (_, index) {
559
+ return /*#__PURE__*/React.createElement(_this2.ListRow, {
560
+ key: "".concat(index, "-").concat(_this2.listRowRerender),
561
+ data: _this2.state.optionArray,
562
+ index: index
563
+ }, null);
564
+ }))));
565
+ });
557
566
  }
558
567
  }]);
559
568
  }(Component);
@@ -0,0 +1,35 @@
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
+ // .euiSelectableList__list requires a static vanilla className
12
+ // as it's passed down to react-window's virtualization library
13
+ import { css as classNameCss } from '@emotion/css';
14
+ import { euiFocusRing, euiYScrollWithShadows, logicalCSS } from '../../../global_styling';
15
+ import { euiTitle } from '../../title/title.styles';
16
+ import { euiSelectableListItemVariables } from './selectable_list_item.styles';
17
+ var _ref = process.env.NODE_ENV === "production" ? {
18
+ name: "1giu8j5-fullHeight",
19
+ styles: "flex-grow:1;label:fullHeight;"
20
+ } : {
21
+ name: "1giu8j5-fullHeight",
22
+ styles: "flex-grow:1;label:fullHeight;",
23
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
24
+ };
25
+ export var euiSelectableListStyles = function euiSelectableListStyles(euiThemeContext) {
26
+ var euiTheme = euiThemeContext.euiTheme;
27
+ var itemVars = euiSelectableListItemVariables(euiThemeContext);
28
+ return {
29
+ euiSelectableList: /*#__PURE__*/css("&:has(:focus-visible){", euiFocusRing(euiThemeContext, 'outset'), ";};label:euiSelectableList;"),
30
+ fullHeight: _ref,
31
+ bordered: /*#__PURE__*/css("overflow:hidden;border:", euiTheme.border.thin, ";border-radius:", euiTheme.border.radius.medium, ";;label:bordered;"),
32
+ euiSelectableList__list: /*#__PURE__*/classNameCss(euiYScrollWithShadows(euiThemeContext), " &:focus,&>ul:focus{outline:none;};label:euiSelectableList__list;"),
33
+ euiSelectableList__groupLabel: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxxs'), " display:flex;align-items:center;", logicalCSS('border-bottom', itemVars.border), " ", logicalCSS('padding-vertical', itemVars.paddingVertical), " ", logicalCSS('padding-horizontal', itemVars.paddingHorizontal), ";;label:euiSelectableList__groupLabel;")
34
+ };
35
+ };
@@ -1,6 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
4
  var _excluded = ["children", "className", "disabled", "checked", "isFocused", "showIcons", "prepend", "append", "allowExclusions", "onFocusBadge", "paddingSize", "role", "searchable", "textWrap", "toolTipContent", "toolTipProps", "aria-describedby"],
6
5
  _excluded2 = ["children", "className"];
@@ -14,12 +13,13 @@ var _excluded = ["children", "className", "disabled", "checked", "isFocused", "s
14
13
 
15
14
  import classNames from 'classnames';
16
15
  import React, { useState, useEffect, useMemo } from 'react';
17
- import { keysOf } from '../../common';
16
+ import { useEuiMemoizedStyles } from '../../../services';
18
17
  import { EuiI18n } from '../../i18n';
19
18
  import { EuiIcon } from '../../icon';
20
19
  import { EuiScreenReaderOnly } from '../../accessibility';
21
20
  import { EuiBadge } from '../../badge';
22
21
  import { EuiToolTip } from '../../tool_tip';
22
+ import { euiSelectableListItemStyles } from './selectable_list_item.styles';
23
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
24
24
  function resolveIconAndColor(checked) {
25
25
  switch (checked) {
@@ -45,11 +45,7 @@ function resolveIconAndColor(checked) {
45
45
  };
46
46
  }
47
47
  }
48
- var paddingSizeToClassNameMap = {
49
- none: null,
50
- s: 'euiSelectableListItem--paddingSmall'
51
- };
52
- export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
48
+ export var PADDING_SIZES = ['none', 's'];
53
49
  export var EuiSelectableListItem = function EuiSelectableListItem(_ref) {
54
50
  var children = _ref.children,
55
51
  className = _ref.className,
@@ -76,27 +72,31 @@ export var EuiSelectableListItem = function EuiSelectableListItem(_ref) {
76
72
  rest = _objectWithoutProperties(_ref, _excluded);
77
73
  var classes = classNames('euiSelectableListItem', {
78
74
  'euiSelectableListItem-isFocused': isFocused
79
- }, paddingSizeToClassNameMap[paddingSize], className);
80
- var textClasses = classNames('euiSelectableListItem__text', _defineProperty({}, "euiSelectableListItem__text--".concat(textWrap), textWrap));
75
+ }, className);
76
+ var styles = useEuiMemoizedStyles(euiSelectableListItemStyles);
77
+ var cssStyles = [styles.euiSelectableListItem, styles.padding[paddingSize]];
78
+ var textStyles = [styles.euiSelectableListItem__text, styles.textWrap[textWrap]];
81
79
  var optionIcon = useMemo(function () {
82
80
  if (showIcons) {
83
81
  var _resolveIconAndColor = resolveIconAndColor(checked),
84
82
  icon = _resolveIconAndColor.icon,
85
83
  color = _resolveIconAndColor.color;
86
84
  return ___EmotionJSX(EuiIcon, {
85
+ css: styles.euiSelectableListItem__icon,
87
86
  className: "euiSelectableListItem__icon",
88
87
  color: color,
89
88
  type: icon
90
89
  });
91
90
  }
92
- }, [showIcons, checked]);
91
+ }, [showIcons, checked, styles]);
93
92
  var prependNode = useMemo(function () {
94
93
  if (prepend) {
95
94
  return ___EmotionJSX("span", {
95
+ css: styles.euiSelectableListItem__prepend,
96
96
  className: "euiSelectableListItem__prepend"
97
97
  }, prepend);
98
98
  }
99
- }, [prepend]);
99
+ }, [prepend, styles]);
100
100
  var onFocusBadgeNode = useMemo(function () {
101
101
  var defaultOnFocusBadgeProps = {
102
102
  'aria-hidden': true,
@@ -121,10 +121,11 @@ export var EuiSelectableListItem = function EuiSelectableListItem(_ref) {
121
121
  var appendNode = useMemo(function () {
122
122
  if (append || showOnFocusBadge) {
123
123
  return ___EmotionJSX("span", {
124
+ css: styles.euiSelectableListItem__append,
124
125
  className: "euiSelectableListItem__append"
125
126
  }, append, " ", showOnFocusBadge ? onFocusBadgeNode : null);
126
127
  }
127
- }, [append, showOnFocusBadge, onFocusBadgeNode]);
128
+ }, [append, showOnFocusBadge, onFocusBadgeNode, styles]);
128
129
  var screenReaderText = useMemo(function () {
129
130
  var state;
130
131
  var instructions;
@@ -245,9 +246,11 @@ export var EuiSelectableListItem = function EuiSelectableListItem(_ref) {
245
246
  }
246
247
  }, [tooltipRef, _ariaDescribedBy]);
247
248
  var content = ___EmotionJSX("span", {
249
+ css: styles.euiSelectableListItem__content,
248
250
  className: "euiSelectableListItem__content"
249
251
  }, optionIcon, prependNode, ___EmotionJSX("span", {
250
- className: textClasses
252
+ css: textStyles,
253
+ className: "euiSelectableListItem__text"
251
254
  }, children, screenReaderText), appendNode);
252
255
  return ___EmotionJSX("li", _extends({
253
256
  role: role,
@@ -256,13 +259,14 @@ export var EuiSelectableListItem = function EuiSelectableListItem(_ref) {
256
259
  ,
257
260
  "aria-selected": !disabled && isFocused // Whether the item has keyboard focus per W3 spec
258
261
  ,
262
+ css: cssStyles,
259
263
  className: classes
260
264
  }, rest, {
261
265
  "aria-describedby": ariaDescribedBy
262
266
  }), hasToolTip ? ___EmotionJSX(EuiToolTip, _extends({
263
267
  ref: setTooltipRef,
264
268
  content: toolTipContent,
265
- anchorClassName: "euiSelectableListItem__tooltipAnchor",
269
+ anchorClassName: "eui-fullWidth",
266
270
  position: "left"
267
271
  }, toolTipProps), content) : content);
268
272
  };
@@ -0,0 +1,56 @@
1
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
2
+ /*
3
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
+ * or more contributor license agreements. Licensed under the Elastic License
5
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
6
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
7
+ * Side Public License, v 1.
8
+ */
9
+
10
+ import { css } from '@emotion/react';
11
+ import { transparentize } from '../../../services';
12
+ import { euiFontSize, euiTextTruncate, logicalCSS } from '../../../global_styling';
13
+ export var euiSelectableListItemVariables = function euiSelectableListItemVariables(_ref2) {
14
+ var euiTheme = _ref2.euiTheme;
15
+ var lighterBorder = transparentize(euiTheme.border.color, 0.4);
16
+ return {
17
+ border: "".concat(euiTheme.border.width.thin, " solid ").concat(lighterBorder),
18
+ paddingHorizontal: euiTheme.size.m,
19
+ paddingVertical: euiTheme.size.xs
20
+ };
21
+ };
22
+ var _ref = process.env.NODE_ENV === "production" ? {
23
+ name: "1rnenrt-euiSelectableListItem__text",
24
+ styles: "flex-grow:1;label:euiSelectableListItem__text;"
25
+ } : {
26
+ name: "1rnenrt-euiSelectableListItem__text",
27
+ styles: "flex-grow:1;label:euiSelectableListItem__text;",
28
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
+ };
30
+ export var euiSelectableListItemStyles = function euiSelectableListItemStyles(euiThemeContext) {
31
+ var euiTheme = euiThemeContext.euiTheme;
32
+ var _euiSelectableListIte = euiSelectableListItemVariables(euiThemeContext),
33
+ border = _euiSelectableListIte.border,
34
+ paddingHorizontal = _euiSelectableListIte.paddingHorizontal,
35
+ paddingVertical = _euiSelectableListIte.paddingVertical;
36
+ return {
37
+ euiSelectableListItem: /*#__PURE__*/css("display:inline-flex;", logicalCSS('width', '100%'), " line-height:", euiFontSize(euiThemeContext, 'm').lineHeight, ";font-size:", euiFontSize(euiThemeContext, 's').fontSize, ";text-align:start;cursor:pointer;overflow:hidden;&:not(:last-of-type){", logicalCSS('border-bottom', border), ";}&[aria-disabled='true']{color:", euiTheme.colors.disabledText, ";cursor:not-allowed;}&:hover,&.euiSelectableListItem-isFocused{&:not([aria-disabled='true']){color:", euiTheme.colors.primaryText, ";background-color:", euiTheme.focus.backgroundColor, ";.euiSelectableListItem__text{text-decoration:underline;}}};label:euiSelectableListItem;"),
38
+ padding: {
39
+ none: /*#__PURE__*/css(";label:none;"),
40
+ s: /*#__PURE__*/css(logicalCSS('padding-vertical', paddingVertical), " ", logicalCSS('padding-horizontal', paddingHorizontal), ";;label:s;")
41
+ },
42
+ // Child elements
43
+
44
+ euiSelectableListItem__content: /*#__PURE__*/css(logicalCSS('width', '100%'), " display:flex;align-items:center;;label:euiSelectableListItem__content;"),
45
+ euiSelectableListItem__text: _ref,
46
+ textWrap: {
47
+ truncate: /*#__PURE__*/css(euiTextTruncate(), ";label:truncate;"),
48
+ wrap: /*#__PURE__*/css(";label:wrap;")
49
+ },
50
+ euiSelectableListItem__prepend: /*#__PURE__*/css("flex-shrink:0;", logicalCSS('margin-right', paddingHorizontal), ";;label:euiSelectableListItem__prepend;"),
51
+ euiSelectableListItem__append: /*#__PURE__*/css("flex-shrink:0;", logicalCSS('margin-left', paddingHorizontal), ";;label:euiSelectableListItem__append;"),
52
+ get euiSelectableListItem__icon() {
53
+ return this.euiSelectableListItem__prepend;
54
+ }
55
+ };
56
+ };
@@ -11,7 +11,9 @@ var _excluded = ["children", "className", "bordered"];
11
11
 
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
+ import { useEuiMemoizedStyles } from '../../../services';
14
15
  import { EuiText } from '../../text';
16
+ import { euiSelectableMessageStyles } from './selectable_message.styles';
15
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
16
18
  export var EuiSelectableMessage = function EuiSelectableMessage(_ref) {
17
19
  var children = _ref.children,
@@ -19,12 +21,13 @@ export var EuiSelectableMessage = function EuiSelectableMessage(_ref) {
19
21
  _ref$bordered = _ref.bordered,
20
22
  bordered = _ref$bordered === void 0 ? false : _ref$bordered,
21
23
  rest = _objectWithoutProperties(_ref, _excluded);
22
- var classes = classNames('euiSelectableMessage', {
23
- 'euiSelectableMessage--bordered': bordered
24
- }, className);
24
+ var classes = classNames('euiSelectableMessage', className);
25
+ var styles = useEuiMemoizedStyles(euiSelectableMessageStyles);
26
+ var cssStyles = [styles.euiSelectableMessage, bordered && styles.bordered];
25
27
  return ___EmotionJSX(EuiText, _extends({
26
28
  color: "subdued",
27
29
  size: "xs",
30
+ css: cssStyles,
28
31
  className: classes
29
32
  }, rest), children);
30
33
  };
@@ -0,0 +1,17 @@
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
+ export var euiSelectableMessageStyles = function euiSelectableMessageStyles(euiThemeContext) {
11
+ var euiTheme = euiThemeContext.euiTheme;
12
+ return {
13
+ euiSelectableMessage: /*#__PURE__*/css("display:flex;flex-direction:column;justify-content:center;align-items:center;padding:", euiTheme.size.s, ";text-align:center;word-wrap:break-word;;label:euiSelectableMessage;"),
14
+ // Match border from selectable_list
15
+ bordered: /*#__PURE__*/css("overflow:hidden;border:", euiTheme.border.thin, ";border-radius:", euiTheme.border.radius.medium, ";;label:bordered;")
16
+ };
17
+ };
@@ -16,16 +16,17 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
 
17
17
  import React, { useState, useMemo, useCallback } from 'react';
18
18
  import classNames from 'classnames';
19
- import { useCombinedRefs, useCurrentEuiBreakpoint } from '../../../services';
20
- import { EuiSelectable } from '../selectable';
19
+ import { useCombinedRefs, useCurrentEuiBreakpoint, useEuiMemoizedStyles } from '../../../services';
20
+ import { ENTER } from '../../../services/keys';
21
+ import { useEuiI18n, EuiI18n } from '../../i18n';
21
22
  import { EuiPopoverTitle, EuiPopoverFooter } from '../../popover';
22
23
  import { EuiPopover } from '../../popover/popover';
23
- import { useEuiI18n, EuiI18n } from '../../i18n';
24
- import { EuiSelectableMessage } from '../selectable_message';
25
24
  import { EuiLoadingSpinner } from '../../loading';
26
- import { euiSelectableTemplateSitewideFormatOptions, euiSelectableTemplateSitewideRenderOptions } from './selectable_template_sitewide_option';
27
25
  import { EuiSpacer } from '../../spacer';
28
- import { ENTER } from '../../../services/keys';
26
+ import { EuiSelectable } from '../selectable';
27
+ import { EuiSelectableMessage } from '../selectable_message';
28
+ import { euiSelectableTemplateSitewideFormatOptions, euiSelectableTemplateSitewideRenderOptions } from './selectable_template_sitewide_option';
29
+ import { euiSelectableTemplateSitewideStyles } from './selectable_template_sitewide.styles';
29
30
  import { jsx as ___EmotionJSX } from "@emotion/react";
30
31
  export var EuiSelectableTemplateSitewide = function EuiSelectableTemplateSitewide(_ref) {
31
32
  var children = _ref.children,
@@ -106,8 +107,9 @@ export var EuiSelectableTemplateSitewide = function EuiSelectableTemplateSitewid
106
107
  };
107
108
 
108
109
  /**
109
- * Classes
110
+ * Classes & styles
110
111
  */
112
+ var styles = useEuiMemoizedStyles(euiSelectableTemplateSitewideStyles);
111
113
  var classes = classNames('euiSelectableTemplateSitewide', className);
112
114
  var searchClasses = classNames('euiSelectableTemplateSitewide__search', searchProps && searchProps.className);
113
115
  var listClasses = classNames('euiSelectableTemplateSitewide__list', listProps && listProps.className);
@@ -115,7 +117,7 @@ export var EuiSelectableTemplateSitewide = function EuiSelectableTemplateSitewid
115
117
  /**
116
118
  * List options
117
119
  */
118
- var formattedOptions = euiSelectableTemplateSitewideFormatOptions(options);
120
+ var formattedOptions = euiSelectableTemplateSitewideFormatOptions(options, styles);
119
121
  var loadingMessage = ___EmotionJSX(EuiSelectableMessage, {
120
122
  style: {
121
123
  minHeight: 300
@@ -157,6 +159,8 @@ export var EuiSelectableTemplateSitewide = function EuiSelectableTemplateSitewid
157
159
  }, popoverButton);
158
160
  }, [popoverButton, canShowPopoverButton, togglePopover]);
159
161
  return ___EmotionJSX(EuiSelectable, _extends({
162
+ css: styles.euiSelectableTemplateSitewide,
163
+ className: classes,
160
164
  isLoading: isLoading,
161
165
  options: formattedOptions,
162
166
  renderOption: euiSelectableTemplateSitewideRenderOptions,
@@ -188,7 +192,6 @@ export var EuiSelectableTemplateSitewide = function EuiSelectableTemplateSitewid
188
192
  emptyMessage: emptyMessage,
189
193
  noMatchesMessage: emptyMessage
190
194
  }, rest, {
191
- className: classes,
192
195
  searchable: true
193
196
  }), function (list, search) {
194
197
  return ___EmotionJSX(EuiPopover, _extends({