@elastic/eui 92.2.0 → 93.0.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 (157) hide show
  1. package/dist/eui_theme_dark.css +0 -200
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -200
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/basic_table.js +0 -9
  6. package/es/components/basic_table/in_memory_table.js +0 -10
  7. package/es/components/beacon/beacon.js +9 -6
  8. package/es/components/breadcrumbs/breadcrumb.js +0 -10
  9. package/es/components/breadcrumbs/breadcrumbs.js +0 -10
  10. package/es/components/code/code.js +2 -2
  11. package/es/components/code/code.styles.js +2 -4
  12. package/es/components/code/code_block.js +5 -3
  13. package/es/components/code/code_block.styles.js +4 -7
  14. package/es/components/code/code_block_controls.js +2 -2
  15. package/es/components/code/code_block_controls.styles.js +2 -4
  16. package/es/components/code/code_block_full_screen.js +2 -2
  17. package/es/components/code/code_syntax.styles.js +39 -34
  18. package/es/components/comment_list/comment_event.js +3 -2
  19. package/es/components/comment_list/comment_event.styles.js +2 -18
  20. package/es/components/context_menu/context_menu.js +2 -6
  21. package/es/components/context_menu/context_menu_item.js +2 -14
  22. package/es/components/empty_prompt/empty_prompt.js +62 -65
  23. package/es/components/empty_prompt/empty_prompt.styles.js +115 -0
  24. package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +0 -10
  25. package/es/components/header/header_links/header_links.js +0 -10
  26. package/es/components/page/page_header/page_header_content.js +0 -10
  27. package/es/components/popover/popover.js +3 -15
  28. package/es/components/search_bar/search_bar.js +36 -32
  29. package/es/components/search_bar/search_bar.styles.js +22 -0
  30. package/es/components/text_truncate/text_truncate.js +4 -1
  31. package/es/components/tour/_tour_footer.js +97 -0
  32. package/es/components/tour/_tour_footer.styles.js +23 -0
  33. package/es/components/tour/_tour_header.js +37 -0
  34. package/es/components/tour/_tour_header.styles.js +20 -0
  35. package/es/components/tour/tour.styles.js +5 -28
  36. package/es/components/tour/tour_step.js +45 -130
  37. package/es/global_styling/mixins/_color.js +46 -13
  38. package/eui.d.ts +125 -66
  39. package/i18ntokens.json +94 -148
  40. package/lib/components/basic_table/basic_table.js +0 -9
  41. package/lib/components/basic_table/in_memory_table.js +0 -10
  42. package/lib/components/beacon/beacon.js +11 -6
  43. package/lib/components/breadcrumbs/breadcrumb.js +0 -10
  44. package/lib/components/code/code.js +2 -2
  45. package/lib/components/code/code.styles.js +2 -4
  46. package/lib/components/code/code_block.js +5 -3
  47. package/lib/components/code/code_block.styles.js +4 -7
  48. package/lib/components/code/code_block_controls.js +2 -2
  49. package/lib/components/code/code_block_controls.styles.js +2 -4
  50. package/lib/components/code/code_block_full_screen.js +2 -2
  51. package/lib/components/code/code_syntax.styles.js +40 -36
  52. package/lib/components/comment_list/comment_event.js +2 -1
  53. package/lib/components/comment_list/comment_event.styles.js +3 -20
  54. package/lib/components/context_menu/context_menu.js +2 -6
  55. package/lib/components/context_menu/context_menu_item.js +2 -14
  56. package/lib/components/empty_prompt/empty_prompt.js +64 -64
  57. package/lib/components/empty_prompt/empty_prompt.styles.js +120 -0
  58. package/lib/components/popover/popover.js +3 -15
  59. package/lib/components/search_bar/search_bar.js +37 -33
  60. package/lib/components/search_bar/search_bar.styles.js +30 -0
  61. package/lib/components/text_truncate/text_truncate.js +4 -1
  62. package/lib/components/tour/_tour_footer.js +105 -0
  63. package/lib/components/tour/_tour_footer.styles.js +31 -0
  64. package/lib/components/tour/_tour_header.js +48 -0
  65. package/lib/components/tour/_tour_header.styles.js +27 -0
  66. package/lib/components/tour/tour.styles.js +7 -32
  67. package/lib/components/tour/tour_step.js +42 -117
  68. package/lib/global_styling/mixins/_color.js +50 -15
  69. package/optimize/es/components/basic_table/basic_table.js +0 -9
  70. package/optimize/es/components/basic_table/in_memory_table.js +0 -10
  71. package/optimize/es/components/beacon/beacon.js +9 -6
  72. package/optimize/es/components/code/code.js +2 -2
  73. package/optimize/es/components/code/code.styles.js +2 -4
  74. package/optimize/es/components/code/code_block.js +5 -3
  75. package/optimize/es/components/code/code_block.styles.js +4 -7
  76. package/optimize/es/components/code/code_block_controls.js +2 -2
  77. package/optimize/es/components/code/code_block_controls.styles.js +2 -4
  78. package/optimize/es/components/code/code_block_full_screen.js +2 -2
  79. package/optimize/es/components/code/code_syntax.styles.js +39 -34
  80. package/optimize/es/components/comment_list/comment_event.js +3 -2
  81. package/optimize/es/components/comment_list/comment_event.styles.js +2 -18
  82. package/optimize/es/components/context_menu/context_menu.js +2 -6
  83. package/optimize/es/components/context_menu/context_menu_item.js +2 -6
  84. package/optimize/es/components/empty_prompt/empty_prompt.js +62 -62
  85. package/optimize/es/components/empty_prompt/empty_prompt.styles.js +112 -0
  86. package/optimize/es/components/popover/popover.js +3 -5
  87. package/optimize/es/components/search_bar/search_bar.js +36 -32
  88. package/optimize/es/components/search_bar/search_bar.styles.js +22 -0
  89. package/optimize/es/components/text_truncate/text_truncate.js +4 -1
  90. package/optimize/es/components/tour/_tour_footer.js +89 -0
  91. package/optimize/es/components/tour/_tour_footer.styles.js +23 -0
  92. package/optimize/es/components/tour/_tour_header.js +33 -0
  93. package/optimize/es/components/tour/_tour_header.styles.js +20 -0
  94. package/optimize/es/components/tour/tour.styles.js +5 -28
  95. package/optimize/es/components/tour/tour_step.js +45 -113
  96. package/optimize/es/global_styling/mixins/_color.js +46 -13
  97. package/optimize/lib/components/basic_table/basic_table.js +0 -9
  98. package/optimize/lib/components/basic_table/in_memory_table.js +0 -10
  99. package/optimize/lib/components/beacon/beacon.js +12 -6
  100. package/optimize/lib/components/code/code.js +2 -2
  101. package/optimize/lib/components/code/code.styles.js +2 -4
  102. package/optimize/lib/components/code/code_block.js +5 -3
  103. package/optimize/lib/components/code/code_block.styles.js +4 -7
  104. package/optimize/lib/components/code/code_block_controls.js +2 -2
  105. package/optimize/lib/components/code/code_block_controls.styles.js +2 -4
  106. package/optimize/lib/components/code/code_block_full_screen.js +2 -2
  107. package/optimize/lib/components/code/code_syntax.styles.js +40 -36
  108. package/optimize/lib/components/comment_list/comment_event.js +2 -1
  109. package/optimize/lib/components/comment_list/comment_event.styles.js +3 -20
  110. package/optimize/lib/components/context_menu/context_menu.js +2 -6
  111. package/optimize/lib/components/context_menu/context_menu_item.js +2 -6
  112. package/optimize/lib/components/empty_prompt/empty_prompt.js +65 -62
  113. package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +118 -0
  114. package/optimize/lib/components/popover/popover.js +3 -5
  115. package/optimize/lib/components/search_bar/search_bar.js +37 -33
  116. package/optimize/lib/components/search_bar/search_bar.styles.js +30 -0
  117. package/optimize/lib/components/text_truncate/text_truncate.js +4 -1
  118. package/optimize/lib/components/tour/_tour_footer.js +100 -0
  119. package/optimize/lib/components/tour/_tour_footer.styles.js +31 -0
  120. package/optimize/lib/components/tour/_tour_header.js +43 -0
  121. package/optimize/lib/components/tour/_tour_header.styles.js +27 -0
  122. package/optimize/lib/components/tour/tour.styles.js +7 -32
  123. package/optimize/lib/components/tour/tour_step.js +42 -110
  124. package/optimize/lib/global_styling/mixins/_color.js +50 -15
  125. package/package.json +1 -1
  126. package/src/components/index.scss +0 -2
  127. package/test-env/components/basic_table/basic_table.js +0 -9
  128. package/test-env/components/basic_table/in_memory_table.js +0 -10
  129. package/test-env/components/beacon/beacon.js +12 -6
  130. package/test-env/components/breadcrumbs/breadcrumb.js +0 -10
  131. package/test-env/components/code/code.styles.js +2 -4
  132. package/test-env/components/code/code_block.styles.js +4 -7
  133. package/test-env/components/code/code_block_controls.js +2 -2
  134. package/test-env/components/code/code_block_controls.styles.js +2 -4
  135. package/test-env/components/code/code_block_full_screen.js +2 -2
  136. package/test-env/components/code/code_syntax.styles.js +40 -36
  137. package/test-env/components/comment_list/comment_event.js +2 -1
  138. package/test-env/components/comment_list/comment_event.styles.js +3 -20
  139. package/test-env/components/context_menu/context_menu.js +2 -6
  140. package/test-env/components/context_menu/context_menu_item.js +2 -14
  141. package/test-env/components/empty_prompt/empty_prompt.js +65 -62
  142. package/test-env/components/empty_prompt/empty_prompt.styles.js +118 -0
  143. package/test-env/components/popover/popover.js +3 -15
  144. package/test-env/components/search_bar/search_bar.js +37 -33
  145. package/test-env/components/search_bar/search_bar.styles.js +30 -0
  146. package/test-env/components/text_truncate/text_truncate.js +4 -1
  147. package/test-env/components/tour/_tour_footer.js +100 -0
  148. package/test-env/components/tour/_tour_footer.styles.js +31 -0
  149. package/test-env/components/tour/_tour_header.js +48 -0
  150. package/test-env/components/tour/_tour_header.styles.js +27 -0
  151. package/test-env/components/tour/tour.styles.js +7 -32
  152. package/test-env/components/tour/tour_step.js +42 -114
  153. package/test-env/global_styling/mixins/_color.js +50 -15
  154. package/src/components/empty_prompt/_empty_prompt.scss +0 -128
  155. package/src/components/empty_prompt/_index.scss +0 -1
  156. package/src/components/search_bar/_index.scss +0 -1
  157. package/src/components/search_bar/_search_bar.scss +0 -10
@@ -6,39 +6,44 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- import { makeHighContrastColor, euiPaletteColorBlind } from '../../services';
9
+ import { useMemo } from 'react';
10
+ import { useEuiTheme, makeHighContrastColor, euiPaletteColorBlind } from '../../services';
10
11
  var visColors = euiPaletteColorBlind();
11
- export var euiCodeSyntaxColors = function euiCodeSyntaxColors(euiThemeContext) {
12
- var euiTheme = euiThemeContext.euiTheme;
13
- var backgroundColor = euiTheme.colors.lightestShade;
14
- return {
15
- backgroundColor: backgroundColor,
16
- color: makeHighContrastColor(euiTheme.colors.text)(backgroundColor),
17
- inlineCodeColor: makeHighContrastColor(visColors[3])(backgroundColor),
18
- selectedBackgroundColor: 'inherit',
19
- commentColor: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
20
- selectorTagColor: 'inherit',
21
- stringColor: makeHighContrastColor(visColors[2])(backgroundColor),
22
- tagColor: makeHighContrastColor(visColors[1])(backgroundColor),
23
- nameColor: makeHighContrastColor(visColors[1])(backgroundColor),
24
- numberColor: makeHighContrastColor(visColors[0])(backgroundColor),
25
- keywordColor: makeHighContrastColor(visColors[3])(backgroundColor),
26
- functionTitleColor: 'inherit',
27
- typeColor: makeHighContrastColor(visColors[1])(backgroundColor),
28
- attributeColor: 'inherit',
29
- symbolColor: makeHighContrastColor(visColors[9])(backgroundColor),
30
- paramsColor: 'inherit',
31
- metaColor: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
32
- titleColor: makeHighContrastColor(visColors[7])(backgroundColor),
33
- sectionColor: makeHighContrastColor(visColors[9])(backgroundColor),
34
- additionColor: makeHighContrastColor(visColors[0])(backgroundColor),
35
- deletionColor: makeHighContrastColor(euiTheme.colors.danger)(backgroundColor),
36
- selectorClassColor: 'inherit',
37
- selectorIdColor: 'inherit'
38
- };
39
- };
40
- export var euiCodeSyntaxTokens = function euiCodeSyntaxTokens(euiThemeContext) {
41
- var euiTheme = euiThemeContext.euiTheme;
42
- var euiCodeBlock = euiCodeSyntaxColors(euiThemeContext);
43
- return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: .7;\n }\n \n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata,\n .token.coord,\n .token.blockquote {\n color: ".concat(euiCodeBlock.commentColor, ";\n font-style: italic;\n }\n \n .token.selector {\n color: ").concat(euiCodeBlock.selectorTagColor, ";\n }\n \n .token.string,\n .token.interpolation,\n .token.interpolation-punctuation,\n .token.doc-comment .token.keyword,\n .token.attr-value,\n .token.url .token.content {\n color: ").concat(euiCodeBlock.stringColor, ";\n }\n \n .token.number,\n .token.boolean,\n .token.keyword.nil,\n .token.regex,\n .token.variable,\n .token.unit,\n .token.hexcode,\n .token.attr-name,\n .token.attr-equals {\n color: ").concat(euiCodeBlock.numberColor, ";\n }\n \n .token.atrule .token.rule,\n .token.keyword {\n color: ").concat(euiCodeBlock.keywordColor, ";\n }\n \n .token.function {\n color: ").concat(euiCodeBlock.functionTitleColor, ";\n }\n \n .token.tag {\n color: ").concat(euiCodeBlock.tagColor, ";\n }\n \n .token.class-name {\n color: ").concat(euiCodeBlock.typeColor, ";\n }\n \n .token.property {\n color: ").concat(euiCodeBlock.attributeColor, ";\n }\n \n .token.console,\n .token.list-punctuation,\n .token.url-reference,\n .token.url .token.url {\n color: ").concat(euiCodeBlock.symbolColor, ";\n }\n \n .token.paramater {\n color: ").concat(euiCodeBlock.paramsColor, ";\n }\n \n .token.meta,\n .token.important {\n color: ").concat(euiCodeBlock.metaColor, ";\n }\n \n .token.title {\n color: ").concat(euiCodeBlock.titleColor, ";\n }\n \n .token.section {\n color: ").concat(euiCodeBlock.sectionColor, ";\n }\n \n .token.prefix.inserted,\n .token.prefix.deleted {\n padding-inline-start: -").concat(euiTheme.size.xs, ";\n margin-inline-start: -").concat(euiTheme.size.xs, ";\n }\n \n .token.prefix.inserted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(euiCodeBlock.additionColor, ";\n color: ").concat(euiCodeBlock.additionColor, ";\n }\n \n .token.prefix.deleted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(euiCodeBlock.deletionColor, ";\n color: ").concat(euiCodeBlock.deletionColor, ";\n }\n \n .token.selector .token.class {\n color: ").concat(euiCodeBlock.selectorClassColor, ";\n }\n \n .token.selector .token.id {\n color: ").concat(euiCodeBlock.selectorIdColor, ";\n }\n \n .token.italic {\n font-style: italic;\n }\n \n .token.important,\n .token.bold {\n font-weight: ").concat(euiTheme.font.weight.bold, ";\n }\n \n .token.url-reference,\n .token.url .token.url {\n text-decoration: underline;\n }\n \n .token.entity {\n cursor: help;\n }\n ");
12
+
13
+ // These variables are computationally expensive, so it needs
14
+ // to be a hook in order to memoize it per theme
15
+ export var useEuiCodeSyntaxVariables = function useEuiCodeSyntaxVariables() {
16
+ var _useEuiTheme = useEuiTheme(),
17
+ euiTheme = _useEuiTheme.euiTheme;
18
+ return useMemo(function () {
19
+ var backgroundColor = euiTheme.colors.lightestShade;
20
+ return {
21
+ backgroundColor: backgroundColor,
22
+ color: makeHighContrastColor(euiTheme.colors.text)(backgroundColor),
23
+ inlineCodeColor: makeHighContrastColor(visColors[3])(backgroundColor),
24
+ selectedBackgroundColor: 'inherit',
25
+ commentColor: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
26
+ selectorTagColor: 'inherit',
27
+ stringColor: makeHighContrastColor(visColors[2])(backgroundColor),
28
+ tagColor: makeHighContrastColor(visColors[1])(backgroundColor),
29
+ nameColor: makeHighContrastColor(visColors[1])(backgroundColor),
30
+ numberColor: makeHighContrastColor(visColors[0])(backgroundColor),
31
+ keywordColor: makeHighContrastColor(visColors[3])(backgroundColor),
32
+ functionTitleColor: 'inherit',
33
+ typeColor: makeHighContrastColor(visColors[1])(backgroundColor),
34
+ attributeColor: 'inherit',
35
+ symbolColor: makeHighContrastColor(visColors[9])(backgroundColor),
36
+ paramsColor: 'inherit',
37
+ metaColor: makeHighContrastColor(euiTheme.colors.subduedText)(backgroundColor),
38
+ titleColor: makeHighContrastColor(visColors[7])(backgroundColor),
39
+ sectionColor: makeHighContrastColor(visColors[9])(backgroundColor),
40
+ additionColor: makeHighContrastColor(visColors[0])(backgroundColor),
41
+ deletionColor: makeHighContrastColor(euiTheme.colors.danger)(backgroundColor),
42
+ selectorClassColor: 'inherit',
43
+ selectorIdColor: 'inherit',
44
+ get tokensCss() {
45
+ return "\n .token.punctuation:not(.interpolation-punctuation):not([class*='attr-']) {\n opacity: .7;\n }\n\n .token.comment,\n .token.prolog,\n .token.doctype,\n .token.cdata,\n .token.coord,\n .token.blockquote {\n color: ".concat(this.commentColor, ";\n font-style: italic;\n }\n\n .token.selector {\n color: ").concat(this.selectorTagColor, ";\n }\n\n .token.string,\n .token.interpolation,\n .token.interpolation-punctuation,\n .token.doc-comment .token.keyword,\n .token.attr-value,\n .token.url .token.content {\n color: ").concat(this.stringColor, ";\n }\n\n .token.number,\n .token.boolean,\n .token.keyword.nil,\n .token.regex,\n .token.variable,\n .token.unit,\n .token.hexcode,\n .token.attr-name,\n .token.attr-equals {\n color: ").concat(this.numberColor, ";\n }\n\n .token.atrule .token.rule,\n .token.keyword {\n color: ").concat(this.keywordColor, ";\n }\n\n .token.function {\n color: ").concat(this.functionTitleColor, ";\n }\n\n .token.tag {\n color: ").concat(this.tagColor, ";\n }\n\n .token.class-name {\n color: ").concat(this.typeColor, ";\n }\n\n .token.property {\n color: ").concat(this.attributeColor, ";\n }\n\n .token.console,\n .token.list-punctuation,\n .token.url-reference,\n .token.url .token.url {\n color: ").concat(this.symbolColor, ";\n }\n\n .token.paramater {\n color: ").concat(this.paramsColor, ";\n }\n\n .token.meta,\n .token.important {\n color: ").concat(this.metaColor, ";\n }\n\n .token.title {\n color: ").concat(this.titleColor, ";\n }\n\n .token.section {\n color: ").concat(this.sectionColor, ";\n }\n\n .token.prefix.inserted,\n .token.prefix.deleted {\n padding-inline-start: -").concat(euiTheme.size.xs, ";\n margin-inline-start: -").concat(euiTheme.size.xs, ";\n }\n\n .token.prefix.inserted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(this.additionColor, ";\n color: ").concat(this.additionColor, ";\n }\n\n .token.prefix.deleted {\n box-shadow: -").concat(euiTheme.size.xs, " 0 ").concat(this.deletionColor, ";\n color: ").concat(this.deletionColor, ";\n }\n\n .token.selector .token.class {\n color: ").concat(this.selectorClassColor, ";\n }\n\n .token.selector .token.id {\n color: ").concat(this.selectorIdColor, ";\n }\n\n .token.italic {\n font-style: italic;\n }\n\n .token.important,\n .token.bold {\n font-weight: ").concat(euiTheme.font.weight.bold, ";\n }\n\n .token.url-reference,\n .token.url .token.url {\n text-decoration: underline;\n }\n\n .token.entity {\n cursor: help;\n }");
46
+ }
47
+ };
48
+ }, [euiTheme]);
44
49
  };
@@ -9,9 +9,10 @@
9
9
  import React, { useMemo } from 'react';
10
10
  import classNames from 'classnames';
11
11
  import { useEuiTheme } from '../../services';
12
+ import { useEuiBorderColorCSS } from '../../global_styling';
12
13
  import { EuiPanel } from '../panel';
13
14
  import { EuiAvatar } from '../avatar';
14
- import { euiCommentEventBorderColors, euiCommentEventStyles, euiCommentEventHeaderStyles, euiCommentEventBodyStyles } from './comment_event.styles';
15
+ import { euiCommentEventStyles, euiCommentEventHeaderStyles, euiCommentEventBodyStyles } from './comment_event.styles';
15
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
16
17
  export var EuiCommentEvent = function EuiCommentEvent(_ref) {
17
18
  var children = _ref.children,
@@ -63,7 +64,7 @@ export var EuiCommentEvent = function EuiCommentEvent(_ref) {
63
64
  * Styles
64
65
  */
65
66
  var euiTheme = useEuiTheme();
66
- var borderStyles = euiCommentEventBorderColors(euiTheme);
67
+ var borderStyles = useEuiBorderColorCSS();
67
68
  var styles = euiCommentEventStyles(euiTheme);
68
69
  var cssStyles = [styles.euiCommentEvent, showEventBorders && styles.border, showEventBorders && borderStyles[eventColor]];
69
70
  var headerStyles = euiCommentEventHeaderStyles(euiTheme);
@@ -8,23 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
- import { tintOrShade } from '../../services';
12
11
  import { logicalCSS } from '../../global_styling';
13
- export var euiCommentEventBorderColors = function euiCommentEventBorderColors(_ref3) {
14
- var euiTheme = _ref3.euiTheme,
15
- colorMode = _ref3.colorMode;
16
- var ratio = 0.6;
17
- return {
18
- warning: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.warning, 0.4, colorMode), ";;label:warning;"),
19
- accent: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.accent, ratio, colorMode), ";;label:accent;"),
20
- primary: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.primary, ratio, colorMode), ";;label:primary;"),
21
- success: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.success, ratio, colorMode), ";;label:success;"),
22
- danger: /*#__PURE__*/css("border-color:", tintOrShade(euiTheme.colors.danger, ratio, colorMode), ";;label:danger;"),
23
- subdued: /*#__PURE__*/css("border-color:", euiTheme.border.color, ";;label:subdued;"),
24
- transparent: /*#__PURE__*/css("border-color:", euiTheme.border.color, ";;label:transparent;"),
25
- plain: /*#__PURE__*/css("border-color:", euiTheme.border.color, ";;label:plain;")
26
- };
27
- };
28
12
  var _ref2 = process.env.NODE_ENV === "production" ? {
29
13
  name: "yoyozp-euiCommentEvent",
30
14
  styles: "overflow:hidden;label:euiCommentEvent;"
@@ -62,8 +46,8 @@ export var euiCommentEventHeaderStyles = function euiCommentEventHeaderStyles(eu
62
46
  euiCommentEvent__headerActions: /*#__PURE__*/css("display:flex;flex-wrap:wrap;gap:", euiTheme.size.xs, ";;label:euiCommentEvent__headerActions;")
63
47
  };
64
48
  };
65
- export var euiCommentEventBodyStyles = function euiCommentEventBodyStyles(_ref4) {
66
- var euiTheme = _ref4.euiTheme;
49
+ export var euiCommentEventBodyStyles = function euiCommentEventBodyStyles(_ref3) {
50
+ var euiTheme = _ref3.euiTheme;
67
51
  return {
68
52
  euiCommentEvent__body: /*#__PURE__*/css(";label:euiCommentEvent__body;"),
69
53
  // types
@@ -8,7 +8,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  var _excluded = ["isSeparator", "key"],
11
- _excluded2 = ["panel", "name", "key", "icon", "onClick", "toolTipTitle", "toolTipContent"],
11
+ _excluded2 = ["panel", "name", "key", "icon", "onClick"],
12
12
  _excluded3 = ["theme", "panels", "onPanelChange", "className", "initialPanelId", "size"];
13
13
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
14
14
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -211,8 +211,6 @@ export var EuiContextMenuClass = /*#__PURE__*/function (_Component) {
211
211
  key = item.key,
212
212
  icon = item.icon,
213
213
  onClick = item.onClick,
214
- toolTipTitle = item.toolTipTitle,
215
- toolTipContent = item.toolTipContent,
216
214
  rest = _objectWithoutProperties(item, _excluded2);
217
215
  var onClickHandler = panel ? function (event) {
218
216
  if (onClick && event) {
@@ -231,9 +229,7 @@ export var EuiContextMenuClass = /*#__PURE__*/function (_Component) {
231
229
  key: key || (typeof name === 'string' ? name : undefined) || index,
232
230
  icon: icon,
233
231
  onClick: onClickHandler,
234
- hasPanel: Boolean(panel),
235
- toolTipTitle: toolTipTitle,
236
- toolTipContent: toolTipContent
232
+ hasPanel: Boolean(panel)
237
233
  }, rest), name);
238
234
  });
239
235
  }
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "toolTipTitle", "toolTipContent", "toolTipPosition", "toolTipProps", "href", "target", "rel", "size"];
3
+ var _excluded = ["children", "className", "hasPanel", "icon", "buttonRef", "disabled", "layoutAlign", "toolTipContent", "toolTipProps", "href", "target", "rel", "size"];
4
4
  /*
5
5
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
6
6
  * or more contributor license agreements. Licensed under the Elastic License
@@ -34,10 +34,7 @@ export var EuiContextMenuItem = function EuiContextMenuItem(_ref) {
34
34
  _disabled = _ref.disabled,
35
35
  _ref$layoutAlign = _ref.layoutAlign,
36
36
  layoutAlign = _ref$layoutAlign === void 0 ? 'center' : _ref$layoutAlign,
37
- toolTipTitle = _ref.toolTipTitle,
38
37
  toolTipContent = _ref.toolTipContent,
39
- _ref$toolTipPosition = _ref.toolTipPosition,
40
- toolTipPosition = _ref$toolTipPosition === void 0 ? 'right' : _ref$toolTipPosition,
41
38
  toolTipProps = _ref.toolTipProps,
42
39
  href = _ref.href,
43
40
  target = _ref.target,
@@ -108,8 +105,7 @@ export var EuiContextMenuItem = function EuiContextMenuItem(_ref) {
108
105
  if (toolTipContent) {
109
106
  var anchorClasses = classNames('eui-displayBlock', toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorClassName);
110
107
  return ___EmotionJSX(EuiToolTip, _extends({
111
- title: toolTipTitle ? toolTipTitle : null,
112
- position: toolTipPosition
108
+ position: "right"
113
109
  }, toolTipProps, {
114
110
  anchorClassName: anchorClasses,
115
111
  content: toolTipContent
@@ -1,8 +1,6 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["icon", "iconType", "iconColor", "title", "titleSize", "paddingSize", "body", "actions", "className", "layout", "hasBorder", "color", "footer"];
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
4
  /*
7
5
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
8
6
  * or more contributor license agreements. Licensed under the Elastic License
@@ -11,9 +9,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
11
9
  * Side Public License, v 1.
12
10
  */
13
11
 
14
- import React from 'react';
12
+ import React, { useMemo } from 'react';
15
13
  import classNames from 'classnames';
16
- import { keysOf } from '../common';
14
+ import { useEuiTheme } from '../../services';
17
15
  import { EuiTitle } from '../title';
18
16
  import { EuiFlexGroup, EuiFlexItem } from '../flex';
19
17
  import { EuiSpacer } from '../spacer';
@@ -21,14 +19,9 @@ import { EuiIcon } from '../icon';
21
19
  import { isNamedColor } from '../icon/named_colors';
22
20
  import { EuiText } from '../text';
23
21
  import { EuiPanel } from '../panel/panel';
22
+ import { euiEmptyPromptStyles } from './empty_prompt.styles';
24
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
25
- var paddingSizeToClassNameMap = {
26
- none: null,
27
- s: 'euiEmptyPrompt--paddingSmall',
28
- m: 'euiEmptyPrompt--paddingMedium',
29
- l: 'euiEmptyPrompt--paddingLarge'
30
- };
31
- export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
24
+ export var PADDING_SIZES = ['none', 's', 'm', 'l'];
32
25
  export var EuiEmptyPrompt = function EuiEmptyPrompt(_ref) {
33
26
  var icon = _ref.icon,
34
27
  iconType = _ref.iconType,
@@ -48,41 +41,41 @@ export var EuiEmptyPrompt = function EuiEmptyPrompt(_ref) {
48
41
  color = _ref$color === void 0 ? 'transparent' : _ref$color,
49
42
  footer = _ref.footer,
50
43
  rest = _objectWithoutProperties(_ref, _excluded);
51
- var isVerticalLayout = layout === 'vertical';
44
+ var classes = classNames('euiEmptyPrompt', className);
45
+ var euiTheme = useEuiTheme();
46
+ var styles = useMemo(function () {
47
+ return euiEmptyPromptStyles(euiTheme);
48
+ }, [euiTheme]);
49
+ var cssStyles = [styles.euiEmptyPrompt, styles[layout]];
50
+ var mainStyles = [styles.main.euiEmptyPrompt__main, styles.main[layout], styles.main[paddingSize], layout === 'horizontal' && styles.main.horizontalPadding[paddingSize]];
51
+ var contentStyles = [styles.content.euiEmptyPrompt__content, styles.content[layout]];
52
+
52
53
  // Default the iconColor to `subdued`,
53
54
  // otherwise try to match the iconColor with the panel color unless iconColor is specified
54
55
  var iconColor = _iconColor !== null && _iconColor !== void 0 ? _iconColor : isNamedColor(color) ? color : 'subdued';
55
- var iconNode = iconType ? ___EmotionJSX(EuiIcon, {
56
- type: iconType,
57
- size: "xxl",
58
- color: iconColor
59
- }) : icon;
60
- var titleNode;
61
- var bodyNode;
62
- if (body || title) {
63
- if (title) {
64
- titleNode = ___EmotionJSX(EuiTitle, {
65
- size: titleSize
66
- }, title);
67
- }
68
- if (body) {
69
- bodyNode = ___EmotionJSX(React.Fragment, null, title && ___EmotionJSX(EuiSpacer, {
70
- size: "m"
71
- }), ___EmotionJSX(EuiText, {
72
- color: "subdued"
73
- }, body));
74
- }
75
- }
76
- var actionsNode;
77
- if (actions) {
78
- var actionsRow;
56
+ var iconNode = useMemo(function () {
57
+ if (!iconType && !icon) return null;
58
+ var iconStyles = [styles.icon.euiEmptyPrompt__icon, styles.icon[layout]];
59
+ return ___EmotionJSX("div", {
60
+ className: "euiEmptyPrompt__icon",
61
+ css: iconStyles
62
+ }, iconType ? ___EmotionJSX(EuiIcon, {
63
+ type: iconType,
64
+ size: "xxl",
65
+ color: iconColor
66
+ }) : icon);
67
+ }, [icon, iconType, iconColor, layout, styles.icon]);
68
+ var actionsNode = useMemo(function () {
69
+ if (!actions) return null;
79
70
  if (Array.isArray(actions)) {
80
- actionsRow = ___EmotionJSX(EuiFlexGroup, {
71
+ var actionStyles = [styles.actions.euiEmptyPrompt__actions, styles.actions[layout]];
72
+ return ___EmotionJSX(EuiFlexGroup, {
81
73
  className: "euiEmptyPrompt__actions",
74
+ css: actionStyles,
82
75
  gutterSize: "m",
83
76
  alignItems: "center",
84
77
  justifyContent: "center",
85
- direction: isVerticalLayout ? 'column' : 'row'
78
+ direction: layout === 'vertical' ? 'column' : 'row'
86
79
  }, actions.map(function (action, index) {
87
80
  return ___EmotionJSX(EuiFlexItem, {
88
81
  key: index,
@@ -90,30 +83,37 @@ export var EuiEmptyPrompt = function EuiEmptyPrompt(_ref) {
90
83
  }, action);
91
84
  }));
92
85
  } else {
93
- actionsRow = actions;
86
+ return actions;
94
87
  }
95
- actionsNode = ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiSpacer, {
96
- size: "l"
97
- }), actionsRow);
98
- }
99
- var contentNodes = ___EmotionJSX(React.Fragment, null, titleNode, bodyNode, actionsNode);
100
- var classes = classNames('euiEmptyPrompt', ["euiEmptyPrompt--".concat(layout)], paddingSizeToClassNameMap[paddingSize], className);
101
- var panelProps = _objectSpread({
88
+ }, [actions, layout, styles.actions]);
89
+ var footerNode = useMemo(function () {
90
+ if (!footer) return null;
91
+ var footerStyles = [styles.footer.euiEmptyPrompt__footer, styles.footer[paddingSize], styles.footer[color], color === 'transparent' && !hasBorder && styles.footer.roundedBorders];
92
+ return ___EmotionJSX("div", {
93
+ className: "euiEmptyPrompt__footer",
94
+ css: footerStyles
95
+ }, footer);
96
+ }, [footer, paddingSize, color, hasBorder, styles.footer]);
97
+ return ___EmotionJSX(EuiPanel, _extends({
98
+ css: cssStyles,
102
99
  className: classes,
103
100
  color: color,
104
- paddingSize: 'none',
105
- hasBorder: hasBorder,
106
- grow: false
107
- }, rest);
108
- return ___EmotionJSX(EuiPanel, panelProps, ___EmotionJSX("div", {
109
- className: "euiEmptyPrompt__main"
110
- }, iconNode && ___EmotionJSX("div", {
111
- className: "euiEmptyPrompt__icon"
112
- }, iconNode), ___EmotionJSX("div", {
113
- className: "euiEmptyPrompt__content"
114
- }, ___EmotionJSX("div", {
115
- className: "euiEmptyPrompt__contentInner"
116
- }, contentNodes))), footer && ___EmotionJSX("div", {
117
- className: "euiEmptyPrompt__footer"
118
- }, footer));
101
+ paddingSize: "none",
102
+ grow: false,
103
+ hasBorder: hasBorder
104
+ }, rest), ___EmotionJSX("div", {
105
+ className: "euiEmptyPrompt__main",
106
+ css: mainStyles
107
+ }, iconNode, ___EmotionJSX("div", {
108
+ className: "euiEmptyPrompt__content",
109
+ css: contentStyles
110
+ }, title && ___EmotionJSX(EuiTitle, {
111
+ size: titleSize
112
+ }, title), title && body && ___EmotionJSX(EuiSpacer, {
113
+ size: "m"
114
+ }), body && ___EmotionJSX(EuiText, {
115
+ color: "subdued"
116
+ }, body), actionsNode && (body || title) && ___EmotionJSX(EuiSpacer, {
117
+ size: "l"
118
+ }), actionsNode)), footerNode);
119
119
  };
@@ -0,0 +1,112 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ 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)."; }
5
+ /*
6
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
+ * or more contributor license agreements. Licensed under the Elastic License
8
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
10
+ * Side Public License, v 1.
11
+ */
12
+
13
+ import { css } from '@emotion/react';
14
+ import { euiBreakpoint, euiPaddingSize, euiBorderColor, logicalCSS, mathWithUnits } from '../../global_styling';
15
+ var _ref = process.env.NODE_ENV === "production" ? {
16
+ name: "x4698b-roundedBorders",
17
+ styles: "border-radius:inherit;label:roundedBorders;"
18
+ } : {
19
+ name: "x4698b-roundedBorders",
20
+ styles: "border-radius:inherit;label:roundedBorders;",
21
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
22
+ };
23
+ var _ref2 = process.env.NODE_ENV === "production" ? {
24
+ name: "zv101j-euiEmptyPrompt__footer",
25
+ styles: "border-end-end-radius:inherit;border-end-start-radius:inherit;label:euiEmptyPrompt__footer;"
26
+ } : {
27
+ name: "zv101j-euiEmptyPrompt__footer",
28
+ styles: "border-end-end-radius:inherit;border-end-start-radius:inherit;label:euiEmptyPrompt__footer;",
29
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
30
+ };
31
+ var _ref3 = process.env.NODE_ENV === "production" ? {
32
+ name: "1rdinfv-vertical",
33
+ styles: "margin:auto;label:vertical;"
34
+ } : {
35
+ name: "1rdinfv-vertical",
36
+ styles: "margin:auto;label:vertical;",
37
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
38
+ };
39
+ var _ref4 = process.env.NODE_ENV === "production" ? {
40
+ name: "1w25ahh-vertical",
41
+ styles: "justify-content:center;label:vertical;"
42
+ } : {
43
+ name: "1w25ahh-vertical",
44
+ styles: "justify-content:center;label:vertical;",
45
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
46
+ };
47
+ var _ref5 = process.env.NODE_ENV === "production" ? {
48
+ name: "1o9qvqj-euiEmptyPrompt__main",
49
+ styles: "display:flex;flex-direction:column;label:euiEmptyPrompt__main;"
50
+ } : {
51
+ name: "1o9qvqj-euiEmptyPrompt__main",
52
+ styles: "display:flex;flex-direction:column;label:euiEmptyPrompt__main;",
53
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
54
+ };
55
+ export var euiEmptyPromptStyles = function euiEmptyPromptStyles(euiThemeContext) {
56
+ var euiTheme = euiThemeContext.euiTheme;
57
+ var iconMaxWidth = mathWithUnits(euiTheme.size.l, function (x) {
58
+ return x * 15;
59
+ });
60
+ var generatePaddingStyles = function generatePaddingStyles() {
61
+ var property = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'padding';
62
+ return {
63
+ none: null,
64
+ s: /*#__PURE__*/css(property, ":", euiPaddingSize(euiThemeContext, 's'), ";;label:s;"),
65
+ m: /*#__PURE__*/css(property, ":", euiPaddingSize(euiThemeContext, 'm'), ";;label:m;"),
66
+ l: /*#__PURE__*/css(property, ":", euiPaddingSize(euiThemeContext, 'l'), ";;label:l;")
67
+ };
68
+ };
69
+ var generateFooterBorder = function generateFooterBorder(color) {
70
+ return "".concat(euiTheme.border.width.thin, " solid ").concat(euiBorderColor(euiThemeContext, color));
71
+ };
72
+ return {
73
+ euiEmptyPrompt: /*#__PURE__*/css("text-align:center;margin:auto;", euiBreakpoint(euiThemeContext, ['l', 'xl']), "{", logicalCSS('max-width', 'max-content'), ";};label:euiEmptyPrompt;"),
74
+ vertical: /*#__PURE__*/css(";label:vertical;"),
75
+ horizontal: /*#__PURE__*/css(euiBreakpoint(euiThemeContext, ['l', 'xl']), "{justify-content:flex-start;text-align:start;};label:horizontal;"),
76
+ main: _objectSpread(_objectSpread({
77
+ euiEmptyPrompt__main: _ref5,
78
+ vertical: _ref4,
79
+ horizontal: /*#__PURE__*/css("align-items:center;", euiBreakpoint(euiThemeContext, ['l', 'xl']), "{flex-direction:row-reverse;};label:horizontal;")
80
+ }, generatePaddingStyles()), {}, {
81
+ horizontalPadding: generatePaddingStyles('gap')
82
+ }),
83
+ content: {
84
+ euiEmptyPrompt__content: /*#__PURE__*/css(logicalCSS('max-width', '36em'), ";;label:euiEmptyPrompt__content;"),
85
+ vertical: _ref3,
86
+ horizontal: /*#__PURE__*/css(euiBreakpoint(euiThemeContext, ['l', 'xl']), "{padding-block:", euiTheme.size.l, ";padding-inline:0;};label:horizontal;")
87
+ },
88
+ icon: {
89
+ euiEmptyPrompt__icon: /*#__PURE__*/css(logicalCSS('max-width', iconMaxWidth), " margin:auto;&>*{flex-shrink:1;", logicalCSS('max-width', '100%'), ";};label:euiEmptyPrompt__icon;"),
90
+ vertical: /*#__PURE__*/css(logicalCSS('margin-bottom', euiTheme.size.base), ";;label:vertical;"),
91
+ horizontal: /*#__PURE__*/css(euiBreakpoint(euiThemeContext, ['l', 'xl']), "{", logicalCSS('min-width', '40%'), " ", logicalCSS('max-width', '50%'), "&&>*{", logicalCSS('max-width', iconMaxWidth), ";}};label:horizontal;")
92
+ },
93
+ actions: {
94
+ euiEmptyPrompt__actions: /*#__PURE__*/css(";label:euiEmptyPrompt__actions;"),
95
+ vertical: /*#__PURE__*/css(";label:vertical;"),
96
+ horizontal: /*#__PURE__*/css(euiBreakpoint(euiThemeContext, ['l', 'xl']), "{justify-content:flex-start;};label:horizontal;")
97
+ },
98
+ footer: _objectSpread({
99
+ euiEmptyPrompt__footer: _ref2,
100
+ roundedBorders: _ref,
101
+ // Colors
102
+ transparent: /*#__PURE__*/css("background-color:", euiTheme.colors.body, ";;label:transparent;"),
103
+ plain: /*#__PURE__*/css("background-color:", euiTheme.colors.body, ";;label:plain;"),
104
+ subdued: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('subdued')), ";;label:subdued;"),
105
+ primary: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('primary')), ";;label:primary;"),
106
+ accent: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('accent')), ";;label:accent;"),
107
+ danger: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('danger')), ";;label:danger;"),
108
+ warning: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('warning')), ";;label:warning;"),
109
+ success: /*#__PURE__*/css(logicalCSS('border-top', generateFooterBorder('success')), ";;label:success;")
110
+ }, generatePaddingStyles())
111
+ };
112
+ };
@@ -9,7 +9,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
9
9
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
11
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
12
- var _excluded = ["anchorClassName", "anchorPosition", "button", "buttonRef", "insert", "isOpen", "ownFocus", "children", "className", "closePopover", "panelClassName", "panelPaddingSize", "panelProps", "panelRef", "panelStyle", "popoverScreenReaderText", "popoverRef", "hasArrow", "arrowChildren", "repositionOnScroll", "repositionToCrossAxis", "hasDragDrop", "zIndex", "attachToAnchor", "display", "offset", "onPositionChange", "buffer", "aria-label", "aria-labelledby", "container", "focusTrapProps", "initialFocus", "tabIndex"];
12
+ var _excluded = ["anchorPosition", "button", "insert", "isOpen", "ownFocus", "children", "className", "closePopover", "panelClassName", "panelPaddingSize", "panelProps", "panelRef", "panelStyle", "popoverScreenReaderText", "popoverRef", "hasArrow", "arrowChildren", "repositionOnScroll", "repositionToCrossAxis", "hasDragDrop", "zIndex", "attachToAnchor", "display", "offset", "onPositionChange", "buffer", "aria-label", "aria-labelledby", "container", "focusTrapProps", "initialFocus", "tabIndex"];
13
13
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
15
15
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -262,7 +262,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
262
262
  });
263
263
  _defineProperty(_assertThisInitialized(_this), "popoverRef", function (node) {
264
264
  _this.button = node;
265
- setMultipleRefs([_this.props.popoverRef, _this.props.buttonRef], node);
265
+ setMultipleRefs([_this.props.popoverRef], node);
266
266
  });
267
267
  _this.state = {
268
268
  prevProps: {
@@ -343,10 +343,8 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
343
343
  var _panelProps$tabIndex,
344
344
  _this4 = this;
345
345
  var _this$props = this.props,
346
- anchorClassName = _this$props.anchorClassName,
347
346
  anchorPosition = _this$props.anchorPosition,
348
347
  button = _this$props.button,
349
- buttonRef = _this$props.buttonRef,
350
348
  insert = _this$props.insert,
351
349
  isOpen = _this$props.isOpen,
352
350
  ownFocus = _this$props.ownFocus,
@@ -386,7 +384,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
386
384
  }];
387
385
  var classes = classNames('euiPopover', {
388
386
  'euiPopover-isOpen': this.state.isOpening
389
- }, className, anchorClassName);
387
+ }, className);
390
388
  var showArrow = hasArrow && !attachToAnchor;
391
389
  var panel;
392
390
  if (!this.state.suppressingPopover && (isOpen || this.state.isClosing)) {
@@ -22,12 +22,13 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
22
22
  */
23
23
 
24
24
  import React, { Component } from 'react';
25
- import { htmlIdGenerator } from '../../services/accessibility';
25
+ import { RenderWithEuiTheme, htmlIdGenerator } from '../../services';
26
26
  import { isString } from '../../services/predicate';
27
27
  import { EuiFlexGroup, EuiFlexItem } from '../flex';
28
28
  import { EuiSearchBox } from './search_box';
29
29
  import { EuiSearchBarFilters } from './search_filters';
30
30
  import { Query } from './query';
31
+ import { euiSearchBar__searchHolder, euiSearchBar__filtersHolder } from './search_bar.styles';
31
32
  import { jsx as ___EmotionJSX } from "@emotion/react";
32
33
  export { Query, AST as Ast } from './query';
33
34
  var parseQuery = function parseQuery(query, props) {
@@ -178,39 +179,42 @@ export var EuiSearchBar = /*#__PURE__*/function (_Component) {
178
179
  toolsRight = _this$props.toolsRight,
179
180
  hint = _this$props.hint;
180
181
  var toolsLeftEl = this.renderTools(toolsLeft);
181
- var filtersBar = !filters ? undefined : ___EmotionJSX(EuiFlexItem, {
182
- className: "euiSearchBar__filtersHolder",
183
- grow: false
184
- }, ___EmotionJSX(EuiSearchBarFilters, {
185
- filters: filters,
186
- query: query,
187
- onChange: this.onFiltersChange
188
- }));
189
182
  var toolsRightEl = this.renderTools(toolsRight);
190
183
  var isHintVisible = (_hint$popoverProps$is = hint === null || hint === void 0 ? void 0 : (_hint$popoverProps = hint.popoverProps) === null || _hint$popoverProps === void 0 ? void 0 : _hint$popoverProps.isOpen) !== null && _hint$popoverProps$is !== void 0 ? _hint$popoverProps$is : isHintVisibleState;
191
- return ___EmotionJSX(EuiFlexGroup, {
192
- gutterSize: "m",
193
- alignItems: "center",
194
- wrap: true
195
- }, toolsLeftEl, ___EmotionJSX(EuiFlexItem, {
196
- className: "euiSearchBar__searchHolder",
197
- grow: true
198
- }, ___EmotionJSX(EuiSearchBox, _extends({}, box, {
199
- query: queryText,
200
- onSearch: this.onSearch,
201
- isInvalid: error != null,
202
- title: error ? error.message : undefined,
203
- "aria-describedby": isHintVisible ? "".concat(this.hintId) : undefined,
204
- hint: hint ? _objectSpread({
205
- isVisible: isHintVisible,
206
- setIsVisible: function setIsVisible(isVisible) {
207
- _this2.setState({
208
- isHintVisible: isVisible
209
- });
210
- },
211
- id: this.hintId
212
- }, hint) : undefined
213
- }))), filtersBar, toolsRightEl);
184
+ return ___EmotionJSX(RenderWithEuiTheme, null, function (euiTheme) {
185
+ return ___EmotionJSX(EuiFlexGroup, {
186
+ gutterSize: "m",
187
+ alignItems: "center",
188
+ wrap: true
189
+ }, toolsLeftEl, ___EmotionJSX(EuiFlexItem, {
190
+ className: "euiSearchBar__searchHolder",
191
+ css: euiSearchBar__searchHolder(euiTheme),
192
+ grow: true
193
+ }, ___EmotionJSX(EuiSearchBox, _extends({}, box, {
194
+ query: queryText,
195
+ onSearch: _this2.onSearch,
196
+ isInvalid: error != null,
197
+ title: error ? error.message : undefined,
198
+ "aria-describedby": isHintVisible ? "".concat(_this2.hintId) : undefined,
199
+ hint: hint ? _objectSpread({
200
+ isVisible: isHintVisible,
201
+ setIsVisible: function setIsVisible(isVisible) {
202
+ _this2.setState({
203
+ isHintVisible: isVisible
204
+ });
205
+ },
206
+ id: _this2.hintId
207
+ }, hint) : undefined
208
+ }))), filters && ___EmotionJSX(EuiFlexItem, {
209
+ className: "euiSearchBar__filtersHolder",
210
+ css: euiSearchBar__filtersHolder(euiTheme),
211
+ grow: false
212
+ }, ___EmotionJSX(EuiSearchBarFilters, {
213
+ filters: filters,
214
+ query: query,
215
+ onChange: _this2.onFiltersChange
216
+ })), toolsRightEl);
217
+ });
214
218
  }
215
219
  }], [{
216
220
  key: "getDerivedStateFromProps",