@elastic/eui 85.1.0 → 86.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 (185) hide show
  1. package/dist/eui_charts_theme.js +26 -2
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/es/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
  4. package/es/components/datagrid/body/data_grid_body.js +7 -7
  5. package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
  6. package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  7. package/es/components/datagrid/body/data_grid_cell.js +14 -13
  8. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  9. package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  10. package/es/components/datagrid/body/header/data_grid_header_row.js +5 -5
  11. package/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
  12. package/es/components/datagrid/controls/display_selector.js +1 -1
  13. package/es/components/datagrid/data_grid.js +7 -7
  14. package/es/components/datagrid/utils/in_memory.js +4 -4
  15. package/es/components/datagrid/utils/row_heights.js +4 -4
  16. package/es/components/date_picker/date_picker.js +1 -1
  17. package/es/components/drag_and_drop/drag_drop_context.js +1 -1
  18. package/es/components/drag_and_drop/draggable.js +2 -2
  19. package/es/components/drag_and_drop/droppable.js +1 -1
  20. package/es/components/drag_and_drop/index.js +3 -2
  21. package/es/components/header/header_section/header_section_item_button.js +94 -0
  22. package/es/components/highlight/highlight.js +2 -2
  23. package/es/components/inline_edit/inline_edit_text.js +2 -3
  24. package/es/components/inline_edit/inline_edit_title.js +2 -3
  25. package/es/components/inner_text/index.js +1 -2
  26. package/es/components/markdown_editor/markdown_actions.js +1 -1
  27. package/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
  28. package/es/components/modal/confirm_modal.js +11 -29
  29. package/es/components/outside_click_detector/outside_click_detector.js +10 -11
  30. package/es/components/page/page_template.js +8 -8
  31. package/es/components/popover/wrapping_popover.js +1 -9
  32. package/es/components/portal/portal.js +34 -24
  33. package/es/components/tabs/tabs.js +25 -0
  34. package/es/components/timeline/timeline_item_icon.js +3 -3
  35. package/es/components/tour/tour_step.js +16 -12
  36. package/es/services/color/eui_palettes.js +7 -1
  37. package/es/services/color/index.js +1 -1
  38. package/es/services/index.js +1 -1
  39. package/es/services/time/timer.js +3 -5
  40. package/es/test/rtl/component_helpers.js +1 -1
  41. package/es/test/rtl/index.js +2 -1
  42. package/es/test/rtl/render_hook.js +23 -0
  43. package/eui.d.ts +1234 -748
  44. package/i18ntokens.json +144 -144
  45. package/lib/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
  46. package/lib/components/datagrid/body/data_grid_body.js +7 -7
  47. package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
  48. package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  49. package/lib/components/datagrid/body/data_grid_cell.js +14 -13
  50. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  51. package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  52. package/lib/components/datagrid/body/header/data_grid_header_row.js +5 -5
  53. package/lib/components/datagrid/controls/data_grid_toolbar.js +41 -38
  54. package/lib/components/datagrid/controls/display_selector.js +1 -1
  55. package/lib/components/datagrid/data_grid.js +7 -7
  56. package/lib/components/datagrid/utils/in_memory.js +4 -4
  57. package/lib/components/datagrid/utils/row_heights.js +4 -4
  58. package/lib/components/date_picker/date_picker.js +1 -1
  59. package/lib/components/drag_and_drop/drag_drop_context.js +2 -2
  60. package/lib/components/drag_and_drop/draggable.js +3 -3
  61. package/lib/components/drag_and_drop/droppable.js +2 -2
  62. package/lib/components/header/header_section/header_section_item_button.js +94 -0
  63. package/lib/components/highlight/highlight.js +2 -2
  64. package/lib/components/inline_edit/inline_edit_text.js +2 -3
  65. package/lib/components/inline_edit/inline_edit_title.js +2 -3
  66. package/lib/components/inner_text/index.js +1 -8
  67. package/lib/components/markdown_editor/markdown_actions.js +1 -1
  68. package/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
  69. package/lib/components/modal/confirm_modal.js +10 -28
  70. package/lib/components/outside_click_detector/outside_click_detector.js +10 -11
  71. package/lib/components/page/page_template.js +8 -8
  72. package/lib/components/popover/wrapping_popover.js +1 -9
  73. package/lib/components/portal/portal.js +34 -24
  74. package/lib/components/tabs/tabs.js +25 -0
  75. package/lib/components/timeline/timeline_item_icon.js +6 -3
  76. package/lib/components/tour/tour_step.js +15 -11
  77. package/lib/services/color/eui_palettes.js +9 -2
  78. package/lib/services/color/index.js +7 -0
  79. package/lib/services/index.js +7 -0
  80. package/lib/services/time/timer.js +3 -5
  81. package/lib/test/rtl/component_helpers.js +1 -1
  82. package/lib/test/rtl/index.js +13 -1
  83. package/lib/test/rtl/render_hook.js +29 -0
  84. package/optimize/es/components/datagrid/body/data_grid_cell.js +10 -9
  85. package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
  86. package/optimize/es/components/datagrid/controls/display_selector.js +1 -1
  87. package/optimize/es/components/datagrid/utils/in_memory.js +2 -2
  88. package/optimize/es/components/datagrid/utils/row_heights.js +4 -4
  89. package/optimize/es/components/date_picker/date_picker.js +1 -1
  90. package/optimize/es/components/drag_and_drop/drag_drop_context.js +1 -1
  91. package/optimize/es/components/drag_and_drop/draggable.js +2 -2
  92. package/optimize/es/components/drag_and_drop/droppable.js +1 -1
  93. package/optimize/es/components/drag_and_drop/index.js +3 -2
  94. package/optimize/es/components/highlight/highlight.js +2 -2
  95. package/optimize/es/components/inline_edit/inline_edit_text.js +2 -3
  96. package/optimize/es/components/inline_edit/inline_edit_title.js +2 -3
  97. package/optimize/es/components/inner_text/index.js +1 -2
  98. package/optimize/es/components/markdown_editor/markdown_actions.js +1 -1
  99. package/optimize/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
  100. package/optimize/es/components/modal/confirm_modal.js +11 -24
  101. package/optimize/es/components/outside_click_detector/outside_click_detector.js +10 -11
  102. package/optimize/es/components/popover/wrapping_popover.js +1 -9
  103. package/optimize/es/components/portal/portal.js +34 -25
  104. package/optimize/es/components/timeline/timeline_item_icon.js +3 -3
  105. package/optimize/es/components/tour/tour_step.js +16 -12
  106. package/optimize/es/services/color/eui_palettes.js +7 -1
  107. package/optimize/es/services/color/index.js +1 -1
  108. package/optimize/es/services/index.js +1 -1
  109. package/optimize/es/services/time/timer.js +3 -5
  110. package/optimize/es/test/rtl/component_helpers.js +1 -1
  111. package/optimize/es/test/rtl/index.js +2 -1
  112. package/optimize/es/test/rtl/render_hook.js +23 -0
  113. package/optimize/lib/components/datagrid/body/data_grid_cell.js +10 -9
  114. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +36 -28
  115. package/optimize/lib/components/datagrid/controls/display_selector.js +1 -1
  116. package/optimize/lib/components/datagrid/utils/in_memory.js +2 -2
  117. package/optimize/lib/components/datagrid/utils/row_heights.js +4 -4
  118. package/optimize/lib/components/date_picker/date_picker.js +1 -1
  119. package/optimize/lib/components/drag_and_drop/drag_drop_context.js +2 -2
  120. package/optimize/lib/components/drag_and_drop/draggable.js +3 -3
  121. package/optimize/lib/components/drag_and_drop/droppable.js +2 -2
  122. package/optimize/lib/components/highlight/highlight.js +2 -2
  123. package/optimize/lib/components/inline_edit/inline_edit_text.js +2 -3
  124. package/optimize/lib/components/inline_edit/inline_edit_title.js +2 -3
  125. package/optimize/lib/components/inner_text/index.js +1 -8
  126. package/optimize/lib/components/markdown_editor/markdown_actions.js +1 -1
  127. package/optimize/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
  128. package/optimize/lib/components/modal/confirm_modal.js +10 -23
  129. package/optimize/lib/components/outside_click_detector/outside_click_detector.js +10 -11
  130. package/optimize/lib/components/popover/wrapping_popover.js +1 -9
  131. package/optimize/lib/components/portal/portal.js +34 -25
  132. package/optimize/lib/components/timeline/timeline_item_icon.js +6 -4
  133. package/optimize/lib/components/tour/tour_step.js +15 -11
  134. package/optimize/lib/services/color/eui_palettes.js +9 -2
  135. package/optimize/lib/services/color/index.js +7 -0
  136. package/optimize/lib/services/index.js +7 -0
  137. package/optimize/lib/services/time/timer.js +3 -5
  138. package/optimize/lib/test/rtl/component_helpers.js +1 -1
  139. package/optimize/lib/test/rtl/index.js +13 -1
  140. package/optimize/lib/test/rtl/render_hook.js +29 -0
  141. package/package.json +23 -16
  142. package/test-env/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
  143. package/test-env/components/datagrid/body/data_grid_body.js +7 -7
  144. package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
  145. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  146. package/test-env/components/datagrid/body/data_grid_cell.js +14 -13
  147. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  148. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -1
  149. package/test-env/components/datagrid/body/header/data_grid_header_row.js +5 -5
  150. package/test-env/components/datagrid/controls/data_grid_toolbar.js +36 -28
  151. package/test-env/components/datagrid/controls/display_selector.js +1 -1
  152. package/test-env/components/datagrid/data_grid.js +7 -7
  153. package/test-env/components/datagrid/utils/in_memory.js +4 -4
  154. package/test-env/components/datagrid/utils/row_heights.js +4 -4
  155. package/test-env/components/date_picker/date_picker.js +1 -1
  156. package/test-env/components/drag_and_drop/drag_drop_context.js +2 -2
  157. package/test-env/components/drag_and_drop/draggable.js +3 -3
  158. package/test-env/components/drag_and_drop/droppable.js +2 -2
  159. package/test-env/components/header/header_section/header_section_item_button.js +94 -0
  160. package/test-env/components/highlight/highlight.js +2 -2
  161. package/test-env/components/inline_edit/inline_edit_text.js +2 -3
  162. package/test-env/components/inline_edit/inline_edit_title.js +2 -3
  163. package/test-env/components/inner_text/index.js +1 -8
  164. package/test-env/components/markdown_editor/markdown_actions.js +1 -1
  165. package/test-env/components/markdown_editor/markdown_editor_text_area.js +10 -4
  166. package/test-env/components/modal/confirm_modal.js +10 -23
  167. package/test-env/components/outside_click_detector/outside_click_detector.js +10 -11
  168. package/test-env/components/page/page_template.js +8 -8
  169. package/test-env/components/popover/wrapping_popover.js +1 -9
  170. package/test-env/components/portal/portal.js +34 -25
  171. package/test-env/components/tabs/tabs.js +25 -0
  172. package/test-env/components/timeline/timeline_item_icon.js +6 -3
  173. package/test-env/components/tour/tour_step.js +15 -11
  174. package/test-env/services/color/eui_palettes.js +9 -2
  175. package/test-env/services/color/index.js +7 -0
  176. package/test-env/services/index.js +7 -0
  177. package/test-env/services/time/timer.js +3 -5
  178. package/test-env/test/rtl/component_helpers.js +1 -1
  179. package/test-env/test/rtl/index.js +13 -1
  180. package/test-env/test/rtl/render_hook.js +29 -0
  181. package/es/components/inner_text/render_to_text.js +0 -47
  182. package/lib/components/inner_text/render_to_text.js +0 -54
  183. package/optimize/es/components/inner_text/render_to_text.js +0 -42
  184. package/optimize/lib/components/inner_text/render_to_text.js +0 -52
  185. package/test-env/components/inner_text/render_to_text.js +0 -52
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.EuiHeaderSectionItemButton = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
10
  var _classnames = _interopRequireDefault(require("classnames"));
10
11
  var _badge_notification = require("../../badge/notification_badge/badge_notification");
11
12
  var _icon = require("../../icon");
@@ -176,4 +177,97 @@ ref) {
176
177
  }, children), buttonNotification);
177
178
  });
178
179
  exports.EuiHeaderSectionItemButton = EuiHeaderSectionItemButton;
180
+ EuiHeaderSectionItemButton.propTypes = {
181
+ href: _propTypes.default.string,
182
+ onClick: _propTypes.default.func,
183
+ /**
184
+ * Any of the named color palette options.
185
+ * **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
186
+ */
187
+ /**
188
+ * Any of the named color palette options.
189
+ * **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
190
+ */
191
+ color: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf(["ghost"])]),
192
+ size: _propTypes.default.any,
193
+ /**
194
+ * Ensure the text of the button sits flush to the left, right, or both sides of its container
195
+ */
196
+ /**
197
+ * Ensure the text of the button sits flush to the left, right, or both sides of its container
198
+ */
199
+ flush: _propTypes.default.any,
200
+ /**
201
+ * `disabled` is also allowed
202
+ */
203
+ /**
204
+ * `disabled` is also allowed
205
+ */
206
+ isDisabled: _propTypes.default.bool,
207
+ /**
208
+ * Force disables the button and changes the icon to a loading spinner
209
+ */
210
+ /**
211
+ * Force disables the button and changes the icon to a loading spinner
212
+ */
213
+ isLoading: _propTypes.default.bool,
214
+ /**
215
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
216
+ * *Only use when the readable text does not change between states.*
217
+ */
218
+ /**
219
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
220
+ * *Only use when the readable text does not change between states.*
221
+ */
222
+ isSelected: _propTypes.default.bool,
223
+ target: _propTypes.default.string,
224
+ rel: _propTypes.default.string,
225
+ type: _propTypes.default.oneOf(["button", "submit"]),
226
+ buttonRef: _propTypes.default.any,
227
+ /**
228
+ * Object of props passed to the <span/> wrapping the button's content
229
+ */
230
+ /**
231
+ * Object of props passed to the <span/> wrapping the button's content
232
+ */
233
+ contentProps: _propTypes.default.shape({
234
+ className: _propTypes.default.string,
235
+ "aria-label": _propTypes.default.string,
236
+ "data-test-subj": _propTypes.default.string,
237
+ css: _propTypes.default.any
238
+ }),
239
+ /**
240
+ * Any `type` accepted by EuiIcon
241
+ */
242
+ iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "error", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
243
+ /**
244
+ * Can only be one side `left` or `right`
245
+ */
246
+ iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
247
+ /**
248
+ * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
249
+ */
250
+ textProps: _propTypes.default.shape({
251
+ className: _propTypes.default.string,
252
+ "aria-label": _propTypes.default.string,
253
+ "data-test-subj": _propTypes.default.string,
254
+ css: _propTypes.default.any,
255
+ ref: _propTypes.default.any,
256
+ "data-text": _propTypes.default.string
257
+ }),
258
+ iconSize: _propTypes.default.any,
259
+ className: _propTypes.default.string,
260
+ "aria-label": _propTypes.default.string,
261
+ "data-test-subj": _propTypes.default.string,
262
+ css: _propTypes.default.any,
263
+ /**
264
+ * Inserts the node into a EuiBadgeNotification and places it appropriately against the button.
265
+ * Or pass `true` to render a simple dot
266
+ */
267
+ notification: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.bool.isRequired]),
268
+ /**
269
+ * Changes the color of the notification background
270
+ */
271
+ notificationColor: _propTypes.default.any
272
+ };
179
273
  EuiHeaderSectionItemButton.displayName = 'EuiHeaderSectionItemButton';
@@ -55,9 +55,9 @@ var highlight = function highlight(searchSubject, searchValue, isStrict, highlig
55
55
  var preMatch = searchSubject.substring(0, indexOfMatch);
56
56
  var match = searchSubject.substring(indexOfMatch, indexOfMatch + searchValue.length);
57
57
  var postMatch = searchSubject.substring(indexOfMatch + searchValue.length);
58
- return (0, _react2.jsx)(_react.Fragment, null, preMatch, (0, _react2.jsx)(_mark.EuiMark, {
58
+ return (0, _react2.jsx)(_react.Fragment, null, preMatch || undefined, (0, _react2.jsx)(_mark.EuiMark, {
59
59
  hasScreenReaderHelpText: hasScreenReaderHelpText
60
- }, match), postMatch);
60
+ }, match), postMatch || undefined);
61
61
  };
62
62
  var getHightlightWords = function getHightlightWords(searchSubject, searchValue, isStrict) {
63
63
  var regex = new RegExp(searchValue, isStrict ? 'g' : 'gi');
@@ -13,7 +13,7 @@ var _inline_edit_form = require("./inline_edit_form");
13
13
  var _services = require("../../services");
14
14
  var _inline_edit_text = require("./inline_edit_text.styles");
15
15
  var _react2 = require("@emotion/react");
16
- var _excluded = ["children", "className", "size", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
16
+ var _excluded = ["className", "size", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
17
17
  /*
18
18
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
19
19
  * or more contributor license agreements. Licensed under the Elastic License
@@ -33,8 +33,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
33
33
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
34
34
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
35
35
  var EuiInlineEditText = function EuiInlineEditText(_ref) {
36
- var children = _ref.children,
37
- className = _ref.className,
36
+ var className = _ref.className,
38
37
  _ref$size = _ref.size,
39
38
  size = _ref$size === void 0 ? 'm' : _ref$size,
40
39
  defaultValue = _ref.defaultValue,
@@ -13,7 +13,7 @@ var _inline_edit_form = require("./inline_edit_form");
13
13
  var _services = require("../../services");
14
14
  var _inline_edit_title = require("./inline_edit_title.styles");
15
15
  var _react2 = require("@emotion/react");
16
- var _excluded = ["children", "className", "size", "heading", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
16
+ var _excluded = ["className", "size", "heading", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
17
17
  /*
18
18
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
19
19
  * or more contributor license agreements. Licensed under the Elastic License
@@ -35,8 +35,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
35
35
  var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span'];
36
36
  exports.HEADINGS = HEADINGS;
37
37
  var EuiInlineEditTitle = function EuiInlineEditTitle(_ref) {
38
- var children = _ref.children,
39
- className = _ref.className,
38
+ var className = _ref.className,
40
39
  _ref$size = _ref.size,
41
40
  size = _ref$size === void 0 ? 'm' : _ref$size,
42
41
  heading = _ref.heading,
@@ -15,11 +15,4 @@ Object.defineProperty(exports, "useInnerText", {
15
15
  return _inner_text.useInnerText;
16
16
  }
17
17
  });
18
- Object.defineProperty(exports, "useRenderToText", {
19
- enumerable: true,
20
- get: function get() {
21
- return _render_to_text.useRenderToText;
22
- }
23
- });
24
- var _inner_text = require("./inner_text");
25
- var _render_to_text = require("./render_to_text");
18
+ var _inner_text = require("./inner_text");
@@ -54,8 +54,8 @@ SOFTWARE.
54
54
  var MarkdownActions = /*#__PURE__*/function () {
55
55
  function MarkdownActions(editorID, uiPlugins) {
56
56
  _classCallCheck(this, MarkdownActions);
57
- this.editorID = editorID;
58
57
  _defineProperty(this, "styles", void 0);
58
+ this.editorID = editorID;
59
59
  /**
60
60
  * This object is in the format:
61
61
  * [nameOfAction]: {[styles to apply]}
@@ -40,13 +40,19 @@ var EuiMarkdownEditorTextArea = /*#__PURE__*/(0, _react.forwardRef)(function (_r
40
40
  var classes = (0, _classnames.default)('euiMarkdownEditorTextArea', {
41
41
  'euiMarkdownEditorTextArea-isReadOnly': readOnly
42
42
  });
43
+
44
+ // Ignore invalid empty string style values
45
+ var style = {};
46
+ if (height !== '') {
47
+ style.height = height;
48
+ }
49
+ if (maxHeight !== '') {
50
+ style.maxHeight = maxHeight;
51
+ }
43
52
  return (0, _react2.jsx)("textarea", _extends({
44
53
  ref: ref,
45
54
  "data-test-subj": "euiMarkdownEditorTextArea",
46
- style: {
47
- height: height,
48
- maxHeight: maxHeight
49
- },
55
+ style: style,
50
56
  className: classes
51
57
  }, rest, {
52
58
  rows: 6,
@@ -30,12 +30,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
30
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
31
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
32
32
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
33
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
34
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
35
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
36
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
37
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
38
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
33
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
40
34
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
41
35
  var CONFIRM_BUTTON = 'confirm';
@@ -57,33 +51,21 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
57
51
  defaultFocusedButton = _ref.defaultFocusedButton,
58
52
  isLoading = _ref.isLoading,
59
53
  rest = _objectWithoutProperties(_ref, _excluded);
60
- var _useState = (0, _react.useState)(null),
61
- _useState2 = _slicedToArray(_useState, 2),
62
- cancelButton = _useState2[0],
63
- setCancelButton = _useState2[1];
64
- var _useState3 = (0, _react.useState)(null),
65
- _useState4 = _slicedToArray(_useState3, 2),
66
- confirmButton = _useState4[0],
67
- setConfirmButton = _useState4[1];
54
+ var cancelButtonRef = (0, _react.useRef)(null);
55
+ var confirmButtonRef = (0, _react.useRef)(null);
68
56
  (0, _react.useEffect)(function () {
69
57
  // We have to do this instead of using `autoFocus` because React's polyfill for auto-focusing
70
58
  // elements conflicts with the focus-trap logic we have on EuiModal.
71
59
  // Wait a beat for the focus-trap to complete, and then set focus to the right button. Check that
72
60
  // the buttons exist first, because it's possible the modal has been closed already.
73
- requestAnimationFrame(function () {
74
- if (defaultFocusedButton === CANCEL_BUTTON && cancelButton) {
75
- cancelButton.focus();
76
- } else if (defaultFocusedButton === CONFIRM_BUTTON && confirmButton) {
77
- confirmButton.focus();
61
+ setTimeout(function () {
62
+ if (defaultFocusedButton === CANCEL_BUTTON && cancelButtonRef.current) {
63
+ cancelButtonRef.current.focus();
64
+ } else if (defaultFocusedButton === CONFIRM_BUTTON && confirmButtonRef.current) {
65
+ confirmButtonRef.current.focus();
78
66
  }
79
67
  });
80
- });
81
- var confirmRef = function confirmRef(node) {
82
- return setConfirmButton(node);
83
- };
84
- var cancelRef = function cancelRef(node) {
85
- return setCancelButton(node);
86
- };
68
+ }, [defaultFocusedButton, cancelButtonRef, confirmButtonRef]);
87
69
  var classes = (0, _classnames.default)('euiModal--confirmation', className);
88
70
  var euiTheme = (0, _services.useEuiTheme)();
89
71
  var styles = (0, _modal2.euiModalStyles)(euiTheme);
@@ -109,13 +91,13 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
109
91
  }, message)), (0, _react2.jsx)(_modal_footer.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButtonEmpty, {
110
92
  "data-test-subj": "confirmModalCancelButton",
111
93
  onClick: onCancel,
112
- buttonRef: cancelRef
94
+ buttonRef: cancelButtonRef
113
95
  }, cancelButtonText), (0, _react2.jsx)(_button.EuiButton, {
114
96
  "data-test-subj": "confirmModalConfirmButton",
115
97
  onClick: onConfirm,
116
98
  isLoading: isLoading,
117
99
  fill: true,
118
- buttonRef: confirmRef,
100
+ buttonRef: confirmButtonRef,
119
101
  color: buttonColor,
120
102
  isDisabled: confirmButtonDisabled
121
103
  }, confirmButtonText)));
@@ -33,17 +33,6 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
33
33
  var EuiOutsideClickDetector = /*#__PURE__*/function (_Component) {
34
34
  _inherits(EuiOutsideClickDetector, _Component);
35
35
  var _super = _createSuper(EuiOutsideClickDetector);
36
- // We are working with the assumption that a click event is
37
- // equivalent to a sequential, compound press and release of
38
- // the pointing device (mouse, finger, stylus, etc.).
39
- // A click event's target can be imprecise, as the value will be
40
- // the closest common ancestor of the press (mousedown, touchstart)
41
- // and release (mouseup, touchend) events (often <body />) if
42
- // the the target of each event differs.
43
- // We need the actual event targets to make the correct decisions
44
- // about user intention. So, consider the down/start and up/end
45
- // items below as the deconstruction of a click event.
46
-
47
36
  function EuiOutsideClickDetector(props) {
48
37
  var _this;
49
38
  _classCallCheck(this, EuiOutsideClickDetector);
@@ -65,6 +54,16 @@ var EuiOutsideClickDetector = /*#__PURE__*/function (_Component) {
65
54
  // virtual DOM and executes EuiClickDetector's onClick handler,
66
55
  // stamping the id even though the event originates outside
67
56
  // this component's reified DOM tree.
57
+ // We are working with the assumption that a click event is
58
+ // equivalent to a sequential, compound press and release of
59
+ // the pointing device (mouse, finger, stylus, etc.).
60
+ // A click event's target can be imprecise, as the value will be
61
+ // the closest common ancestor of the press (mousedown, touchstart)
62
+ // and release (mouseup, touchend) events (often <body />) if
63
+ // the the target of each event differs.
64
+ // We need the actual event targets to make the correct decisions
65
+ // about user intention. So, consider the down/start and up/end
66
+ // items below as the deconstruction of a click event.
68
67
  _defineProperty(_assertThisInitialized(_this), "id", void 0);
69
68
  _defineProperty(_assertThisInitialized(_this), "capturedDownIds", void 0);
70
69
  _defineProperty(_assertThisInitialized(_this), "onClickOutside", function (e) {
@@ -401,20 +401,20 @@ EuiPageTemplate_Deprecated.propTypes = {
401
401
  */
402
402
  restrictWidth: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.number.isRequired, _propTypes.default.string.isRequired]),
403
403
  /**
404
- * Sets the HTML element for `EuiPageBody`.
405
- */
404
+ * Sets the HTML element for `EuiPageBody`.
405
+ */
406
406
  component: _propTypes.default.any,
407
407
  /**
408
- * Uses an EuiPanel as the main component instead of a plain div
409
- */
408
+ * Uses an EuiPanel as the main component instead of a plain div
409
+ */
410
410
  panelled: _propTypes.default.bool,
411
411
  /**
412
- * Extends any extra EuiPanel props if `panelled=true`
413
- */
412
+ * Extends any extra EuiPanel props if `panelled=true`
413
+ */
414
414
  panelProps: _propTypes.default.any,
415
415
  /**
416
- * Adjusts the padding
417
- */
416
+ * Adjusts the padding
417
+ */
418
418
  paddingSize: _propTypes.default.any
419
419
  }),
420
420
  /**
@@ -52,23 +52,15 @@ var EuiWrappingPopover = /*#__PURE__*/function (_Component) {
52
52
  }
53
53
  _this = _super.call.apply(_super, [this].concat(args));
54
54
  _defineProperty(_assertThisInitialized(_this), "portal", null);
55
- _defineProperty(_assertThisInitialized(_this), "anchor", null);
56
55
  _defineProperty(_assertThisInitialized(_this), "setPortalRef", function (node) {
57
56
  _this.portal = node;
58
57
  });
59
58
  _defineProperty(_assertThisInitialized(_this), "setAnchorRef", function (node) {
60
- _this.anchor = node;
59
+ node === null || node === void 0 ? void 0 : node.insertAdjacentElement('beforebegin', _this.props.button);
61
60
  });
62
61
  return _this;
63
62
  }
64
63
  _createClass(EuiWrappingPopover, [{
65
- key: "componentDidMount",
66
- value: function componentDidMount() {
67
- if (this.anchor) {
68
- this.anchor.insertAdjacentElement('beforebegin', this.props.button);
69
- }
70
- }
71
- }, {
72
64
  key: "componentWillUnmount",
73
65
  value: function componentWillUnmount() {
74
66
  if (this.props.button.parentNode) {
@@ -47,35 +47,41 @@ var EuiPortal = /*#__PURE__*/function (_Component) {
47
47
  var _this;
48
48
  _classCallCheck(this, EuiPortal);
49
49
  _this = _super.call(this, props);
50
- _defineProperty(_assertThisInitialized(_this), "portalNode", null);
51
- if (typeof window === 'undefined') return _possibleConstructorReturn(_this); // Prevent SSR errors
52
-
53
- var insert = _this.props.insert;
54
- _this.portalNode = document.createElement('div');
55
- _this.portalNode.dataset.euiportal = 'true';
56
- if (insert == null) {
57
- // no insertion defined, append to body
58
- document.body.appendChild(_this.portalNode);
59
- } else {
60
- // inserting before or after an element
61
- var sibling = insert.sibling,
62
- position = insert.position;
63
- sibling.insertAdjacentElement(insertPositions[position], _this.portalNode);
64
- }
50
+ _this.state = {
51
+ portalNode: null
52
+ };
65
53
  return _this;
66
54
  }
67
55
  _createClass(EuiPortal, [{
68
56
  key: "componentDidMount",
69
57
  value: function componentDidMount() {
70
- this.setThemeColor();
71
- this.updatePortalRef(this.portalNode);
58
+ var insert = this.props.insert;
59
+ var portalNode = document.createElement('div');
60
+ portalNode.dataset.euiportal = 'true';
61
+ if (insert == null) {
62
+ // no insertion defined, append to body
63
+ document.body.appendChild(portalNode);
64
+ } else {
65
+ // inserting before or after an element
66
+ var sibling = insert.sibling,
67
+ position = insert.position;
68
+ sibling.insertAdjacentElement(insertPositions[position], portalNode);
69
+ }
70
+ this.setThemeColor(portalNode);
71
+ this.updatePortalRef(portalNode);
72
+
73
+ // Update state with portalNode to intentionally trigger component rerender
74
+ // and call createPortal with correct root element in render()
75
+ this.setState({
76
+ portalNode: portalNode
77
+ });
72
78
  }
73
79
  }, {
74
80
  key: "componentWillUnmount",
75
81
  value: function componentWillUnmount() {
76
- var _this$portalNode;
77
- if ((_this$portalNode = this.portalNode) !== null && _this$portalNode !== void 0 && _this$portalNode.parentNode) {
78
- this.portalNode.parentNode.removeChild(this.portalNode);
82
+ var portalNode = this.state.portalNode;
83
+ if (portalNode !== null && portalNode !== void 0 && portalNode.parentNode) {
84
+ portalNode.parentNode.removeChild(portalNode);
79
85
  }
80
86
  this.updatePortalRef(null);
81
87
  }
@@ -83,13 +89,13 @@ var EuiPortal = /*#__PURE__*/function (_Component) {
83
89
  // Set the inherited color of the portal based on the wrapping EuiThemeProvider
84
90
  }, {
85
91
  key: "setThemeColor",
86
- value: function setThemeColor() {
87
- if (this.portalNode && this.context) {
92
+ value: function setThemeColor(portalNode) {
93
+ if (this.context) {
88
94
  var _this$context = this.context,
89
95
  hasDifferentColorFromGlobalTheme = _this$context.hasDifferentColorFromGlobalTheme,
90
96
  colorClassName = _this$context.colorClassName;
91
97
  if (hasDifferentColorFromGlobalTheme && this.props.insert == null) {
92
- this.portalNode.classList.add(colorClassName);
98
+ portalNode.classList.add(colorClassName);
93
99
  }
94
100
  }
95
101
  }
@@ -103,7 +109,11 @@ var EuiPortal = /*#__PURE__*/function (_Component) {
103
109
  }, {
104
110
  key: "render",
105
111
  value: function render() {
106
- return this.portalNode ? /*#__PURE__*/(0, _reactDom.createPortal)(this.props.children, this.portalNode) : null;
112
+ var portalNode = this.state.portalNode;
113
+ if (!portalNode) {
114
+ return null;
115
+ }
116
+ return /*#__PURE__*/(0, _reactDom.createPortal)(this.props.children, portalNode);
107
117
  }
108
118
  }]);
109
119
  return EuiPortal;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.SIZES = exports.EuiTabs = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
10
  var _classnames = _interopRequireDefault(require("classnames"));
10
11
  var _services = require("../../services");
11
12
  var _tabs = require("./tabs.styles");
@@ -55,4 +56,28 @@ var EuiTabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
55
56
  }, children));
56
57
  });
57
58
  exports.EuiTabs = EuiTabs;
59
+ EuiTabs.propTypes = {
60
+ className: _propTypes.default.string,
61
+ "aria-label": _propTypes.default.string,
62
+ "data-test-subj": _propTypes.default.string,
63
+ css: _propTypes.default.any,
64
+ /**
65
+ * ReactNode to render as this component's content
66
+ */
67
+ children: _propTypes.default.node,
68
+ /**
69
+ * Evenly stretches each tab to fill the
70
+ * horizontal space
71
+ */
72
+ expand: _propTypes.default.bool,
73
+ /**
74
+ * Adds a bottom border to separate it from the content after
75
+ */
76
+ bottomBorder: _propTypes.default.bool,
77
+ /**
78
+ * Sizes affect both font size and overall size.
79
+ * Only use the `xl` size when displayed as page titles.
80
+ */
81
+ size: _propTypes.default.any
82
+ };
58
83
  EuiTabs.displayName = 'EuiTabs';
@@ -1,16 +1,19 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.EuiTimelineItemIcon = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
8
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
10
  var _avatar = require("../avatar");
10
11
  var _services = require("../../services");
11
12
  var _timeline_item_icon = require("./timeline_item_icon.styles");
12
13
  var _react2 = require("@emotion/react");
13
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
14
17
  /*
15
18
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
19
  * or more contributor license agreements. Licensed under the Elastic License
@@ -29,11 +32,11 @@ var EuiTimelineItemIcon = function EuiTimelineItemIcon(_ref) {
29
32
  var cssStyles = [styles.euiTimelineItemIcon, styles[verticalAlign]];
30
33
  var cssContentStyles = styles.euiTimelineItemIcon__content;
31
34
  var ariaLabel = iconAriaLabel ? iconAriaLabel : '';
32
- var iconRender = typeof icon === 'string' ? (0, _react2.jsx)(_avatar.EuiAvatar, {
35
+ var iconRender = /*#__PURE__*/(0, _react.isValidElement)(icon) ? icon : (0, _react2.jsx)(_avatar.EuiAvatar, {
33
36
  color: "subdued",
34
37
  name: ariaLabel,
35
38
  iconType: icon
36
- }) : icon;
39
+ });
37
40
  return (0, _react2.jsx)("div", {
38
41
  css: cssStyles
39
42
  }, (0, _react2.jsx)("div", {
@@ -79,12 +79,10 @@ var EuiTourStep = function EuiTourStep(_ref) {
79
79
  if (step === 0) {
80
80
  console.warn('EuiTourStep `step` should 1-based indexing. Please update to eliminate 0 indexes.');
81
81
  }
82
- var _useState = (0, _react.useState)(false),
82
+ var _useState = (0, _react.useState)(null),
83
83
  _useState2 = _slicedToArray(_useState, 2),
84
- hasValidAnchor = _useState2[0],
85
- setHasValidAnchor = _useState2[1];
86
- var animationFrameId = (0, _react.useRef)();
87
- var anchorNode = (0, _react.useRef)(null);
84
+ anchorNode = _useState2[0],
85
+ setAnchorNode = _useState2[1];
88
86
  var _useState3 = (0, _react.useState)(),
89
87
  _useState4 = _slicedToArray(_useState3, 2),
90
88
  popoverPosition = _useState4[0],
@@ -93,14 +91,20 @@ var EuiTourStep = function EuiTourStep(_ref) {
93
91
  setPopoverPosition(position);
94
92
  };
95
93
  (0, _react.useEffect)(function () {
94
+ var timeout;
96
95
  if (anchor) {
97
- animationFrameId.current = window.requestAnimationFrame(function () {
98
- anchorNode.current = (0, _services.findElementBySelectorOrRef)(anchor);
99
- setHasValidAnchor(anchorNode.current ? true : false);
96
+ // Wait until next tick to find anchor node in case it's not already
97
+ // in DOM requestAnimationFrame isn't used here because we don't need to
98
+ // synchronize with repainting ticks and the updated value still
99
+ // needs to go through a react DOM rerender which may take more than
100
+ // 1 frame (16ms) of time.
101
+ // TODO: It would be ideal to have some kind of intersection observer here instead
102
+ timeout = window.setTimeout(function () {
103
+ setAnchorNode((0, _services.findElementBySelectorOrRef)(anchor));
100
104
  });
101
105
  }
102
106
  return function () {
103
- animationFrameId.current && window.cancelAnimationFrame(animationFrameId.current);
107
+ timeout && window.clearTimeout(timeout);
104
108
  };
105
109
  }, [anchor]);
106
110
  var classes = (0, _classnames.default)('euiTour', className);
@@ -212,8 +216,8 @@ var EuiTourStep = function EuiTourStep(_ref) {
212
216
  button: children
213
217
  }, popoverProps), layout);
214
218
  }
215
- return hasValidAnchor && anchorNode.current ? (0, _react2.jsx)(_popover.EuiWrappingPopover, _extends({
216
- button: anchorNode.current
219
+ return anchorNode ? (0, _react2.jsx)(_popover.EuiWrappingPopover, _extends({
220
+ button: anchorNode
217
221
  }, popoverProps), layout) : null;
218
222
  };
219
223
  exports.EuiTourStep = EuiTourStep;