@elastic/eui 91.3.1 → 92.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 (160) hide show
  1. package/dist/eui_charts_theme.js.map +1 -1
  2. package/dist/eui_theme_dark.css +0 -513
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +0 -513
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/basic_table/basic_table.js +5 -5
  7. package/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  8. package/es/components/filter_group/filter_button.js +20 -13
  9. package/es/components/filter_group/filter_button.styles.js +11 -20
  10. package/es/components/flyout/flyout.js +4 -4
  11. package/es/components/flyout/flyout_resizable.js +127 -0
  12. package/es/components/flyout/flyout_resizable.styles.js +27 -0
  13. package/es/components/flyout/index.js +2 -1
  14. package/es/components/form/range/dual_range.js +15 -66
  15. package/es/components/form/range/range.js +6 -5
  16. package/es/components/form/range/range_slider.js +28 -22
  17. package/es/components/form/text_area/text_area.js +39 -3
  18. package/es/components/index.js +0 -2
  19. package/es/components/markdown_editor/markdown_editor.js +12 -13
  20. package/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  21. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  22. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -0
  23. package/es/components/tree_view/tree_view.js +23 -25
  24. package/es/utils/prop_types/is.js +2 -2
  25. package/eui.d.ts +825 -1141
  26. package/i18ntokens.json +68 -338
  27. package/lib/components/basic_table/basic_table.js +5 -5
  28. package/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  29. package/lib/components/filter_group/filter_button.js +20 -13
  30. package/lib/components/filter_group/filter_button.styles.js +11 -20
  31. package/lib/components/flyout/flyout.js +4 -4
  32. package/lib/components/flyout/flyout_resizable.js +136 -0
  33. package/lib/components/flyout/flyout_resizable.styles.js +32 -0
  34. package/lib/components/flyout/index.js +8 -1
  35. package/lib/components/form/range/dual_range.js +15 -66
  36. package/lib/components/form/range/range.js +6 -5
  37. package/lib/components/form/range/range_slider.js +27 -21
  38. package/lib/components/form/text_area/text_area.js +42 -3
  39. package/lib/components/index.js +0 -22
  40. package/lib/components/markdown_editor/markdown_editor.js +12 -13
  41. package/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  42. package/lib/components/pagination/pagination_button.js +79 -2
  43. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  44. package/lib/components/tree_view/tree_view.js +23 -25
  45. package/lib/utils/prop_types/is.js +2 -2
  46. package/optimize/es/components/basic_table/basic_table.js +5 -5
  47. package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  48. package/optimize/es/components/filter_group/filter_button.js +20 -13
  49. package/optimize/es/components/filter_group/filter_button.styles.js +11 -20
  50. package/optimize/es/components/flyout/flyout.js +4 -4
  51. package/optimize/es/components/flyout/flyout_resizable.js +121 -0
  52. package/optimize/es/components/flyout/flyout_resizable.styles.js +27 -0
  53. package/optimize/es/components/flyout/index.js +2 -1
  54. package/optimize/es/components/form/range/dual_range.js +15 -66
  55. package/optimize/es/components/form/range/range.js +6 -5
  56. package/optimize/es/components/form/range/range_slider.js +26 -21
  57. package/optimize/es/components/form/text_area/text_area.js +29 -3
  58. package/optimize/es/components/index.js +0 -2
  59. package/optimize/es/components/markdown_editor/markdown_editor.js +12 -13
  60. package/optimize/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  61. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  62. package/optimize/es/components/tree_view/tree_view.js +23 -25
  63. package/optimize/es/utils/prop_types/is.js +2 -2
  64. package/optimize/lib/components/basic_table/basic_table.js +5 -5
  65. package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  66. package/optimize/lib/components/filter_group/filter_button.js +20 -13
  67. package/optimize/lib/components/filter_group/filter_button.styles.js +11 -20
  68. package/optimize/lib/components/flyout/flyout.js +4 -4
  69. package/optimize/lib/components/flyout/flyout_resizable.js +131 -0
  70. package/optimize/lib/components/flyout/flyout_resizable.styles.js +32 -0
  71. package/optimize/lib/components/flyout/index.js +8 -1
  72. package/optimize/lib/components/form/range/dual_range.js +15 -66
  73. package/optimize/lib/components/form/range/range.js +6 -5
  74. package/optimize/lib/components/form/range/range_slider.js +26 -21
  75. package/optimize/lib/components/form/text_area/text_area.js +32 -3
  76. package/optimize/lib/components/index.js +0 -22
  77. package/optimize/lib/components/markdown_editor/markdown_editor.js +12 -13
  78. package/optimize/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  79. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  80. package/optimize/lib/components/tree_view/tree_view.js +23 -25
  81. package/optimize/lib/utils/prop_types/is.js +2 -2
  82. package/package.json +2 -2
  83. package/src/components/index.scss +0 -2
  84. package/test-env/components/basic_table/basic_table.js +5 -5
  85. package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  86. package/test-env/components/filter_group/filter_button.js +20 -13
  87. package/test-env/components/filter_group/filter_button.styles.js +11 -20
  88. package/test-env/components/flyout/flyout_resizable.js +131 -0
  89. package/test-env/components/flyout/flyout_resizable.styles.js +32 -0
  90. package/test-env/components/flyout/index.js +8 -1
  91. package/test-env/components/form/range/dual_range.js +15 -66
  92. package/test-env/components/form/range/range.js +6 -5
  93. package/test-env/components/form/range/range_slider.js +27 -21
  94. package/test-env/components/form/text_area/text_area.js +42 -3
  95. package/test-env/components/index.js +0 -22
  96. package/test-env/components/markdown_editor/markdown_editor.js +12 -13
  97. package/test-env/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  98. package/test-env/components/pagination/pagination_button.js +79 -2
  99. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  100. package/test-env/components/tree_view/tree_view.js +23 -25
  101. package/test-env/utils/prop_types/is.js +2 -2
  102. package/es/components/control_bar/control_bar.a11y.js +0 -133
  103. package/es/components/control_bar/control_bar.js +0 -609
  104. package/es/components/control_bar/index.js +0 -9
  105. package/es/components/notification/index.js +0 -9
  106. package/es/components/notification/notification_event.a11y.js +0 -104
  107. package/es/components/notification/notification_event.js +0 -288
  108. package/es/components/notification/notification_event_messages.js +0 -79
  109. package/es/components/notification/notification_event_meta.js +0 -148
  110. package/es/components/notification/notification_event_read_button.js +0 -86
  111. package/es/components/notification/notification_event_read_icon.js +0 -77
  112. package/lib/components/control_bar/control_bar.a11y.js +0 -134
  113. package/lib/components/control_bar/control_bar.js +0 -441
  114. package/lib/components/control_bar/index.js +0 -12
  115. package/lib/components/notification/index.js +0 -12
  116. package/lib/components/notification/notification_event.a11y.js +0 -105
  117. package/lib/components/notification/notification_event.js +0 -297
  118. package/lib/components/notification/notification_event_messages.js +0 -88
  119. package/lib/components/notification/notification_event_meta.js +0 -157
  120. package/lib/components/notification/notification_event_read_button.js +0 -93
  121. package/lib/components/notification/notification_event_read_icon.js +0 -64
  122. package/optimize/es/components/control_bar/control_bar.a11y.js +0 -128
  123. package/optimize/es/components/control_bar/control_bar.js +0 -308
  124. package/optimize/es/components/control_bar/index.js +0 -9
  125. package/optimize/es/components/notification/index.js +0 -9
  126. package/optimize/es/components/notification/notification_event.a11y.js +0 -99
  127. package/optimize/es/components/notification/notification_event.js +0 -114
  128. package/optimize/es/components/notification/notification_event_messages.js +0 -63
  129. package/optimize/es/components/notification/notification_event_meta.js +0 -106
  130. package/optimize/es/components/notification/notification_event_read_button.js +0 -44
  131. package/optimize/es/components/notification/notification_event_read_icon.js +0 -44
  132. package/optimize/lib/components/control_bar/control_bar.a11y.js +0 -134
  133. package/optimize/lib/components/control_bar/control_bar.js +0 -301
  134. package/optimize/lib/components/control_bar/index.js +0 -12
  135. package/optimize/lib/components/notification/index.js +0 -12
  136. package/optimize/lib/components/notification/notification_event.a11y.js +0 -105
  137. package/optimize/lib/components/notification/notification_event.js +0 -123
  138. package/optimize/lib/components/notification/notification_event_messages.js +0 -74
  139. package/optimize/lib/components/notification/notification_event_meta.js +0 -117
  140. package/optimize/lib/components/notification/notification_event_read_button.js +0 -51
  141. package/optimize/lib/components/notification/notification_event_read_icon.js +0 -51
  142. package/src/components/control_bar/_control_bar.scss +0 -232
  143. package/src/components/control_bar/_index.scss +0 -2
  144. package/src/components/control_bar/_variables.scss +0 -12
  145. package/src/components/notification/_index.scss +0 -5
  146. package/src/components/notification/_notification_event.scss +0 -40
  147. package/src/components/notification/_notification_event_messages.scss +0 -17
  148. package/src/components/notification/_notification_event_meta.scss +0 -44
  149. package/src/components/notification/_notification_event_read_button.scss +0 -5
  150. package/src/components/notification/_notification_event_read_icon.scss +0 -12
  151. package/test-env/components/control_bar/control_bar.a11y.js +0 -134
  152. package/test-env/components/control_bar/control_bar.js +0 -436
  153. package/test-env/components/control_bar/index.js +0 -12
  154. package/test-env/components/notification/index.js +0 -12
  155. package/test-env/components/notification/notification_event.a11y.js +0 -105
  156. package/test-env/components/notification/notification_event.js +0 -296
  157. package/test-env/components/notification/notification_event_messages.js +0 -85
  158. package/test-env/components/notification/notification_event_meta.js +0 -154
  159. package/test-env/components/notification/notification_event_read_button.js +0 -92
  160. package/test-env/components/notification/notification_event_read_icon.js +0 -63
@@ -223,17 +223,6 @@ Object.keys(_context_menu).forEach(function (key) {
223
223
  }
224
224
  });
225
225
  });
226
- var _control_bar = require("./control_bar");
227
- Object.keys(_control_bar).forEach(function (key) {
228
- if (key === "default" || key === "__esModule") return;
229
- if (key in exports && exports[key] === _control_bar[key]) return;
230
- Object.defineProperty(exports, key, {
231
- enumerable: true,
232
- get: function get() {
233
- return _control_bar[key];
234
- }
235
- });
236
- });
237
226
  var _copy = require("./copy");
238
227
  Object.keys(_copy).forEach(function (key) {
239
228
  if (key === "default" || key === "__esModule") return;
@@ -597,17 +586,6 @@ Object.keys(_mutation_observer).forEach(function (key) {
597
586
  }
598
587
  });
599
588
  });
600
- var _notification = require("./notification");
601
- Object.keys(_notification).forEach(function (key) {
602
- if (key === "default" || key === "__esModule") return;
603
- if (key in exports && exports[key] === _notification[key]) return;
604
- Object.defineProperty(exports, key, {
605
- enumerable: true,
606
- get: function get() {
607
- return _notification[key];
608
- }
609
- });
610
- });
611
589
  var _outside_click_detector = require("./outside_click_detector");
612
590
  Object.keys(_outside_click_detector).forEach(function (key) {
613
591
  if (key === "default" || key === "__esModule") return;
@@ -267,20 +267,19 @@ var EuiMarkdownEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
267
267
  setEditorToolbarHeight(editorToolbarRef.current.offsetHeight);
268
268
  }, [setEditorToolbarHeight]);
269
269
  (0, _react.useEffect)(function () {
270
- if (isPreviewing && autoExpandPreview && height !== 'full') {
271
- if (previewRef.current.scrollHeight > currentHeight) {
272
- // scrollHeight does not include the border or margin
273
- // so we ask for the computed value for those,
274
- // which is always in pixels because getComputedValue
275
- // returns the resolved values
276
- var elementComputedStyle = window.getComputedStyle(previewRef.current);
277
- var borderWidth = parseFloat(elementComputedStyle.borderTopWidth) + parseFloat(elementComputedStyle.borderBottomWidth);
278
- var marginWidth = parseFloat(elementComputedStyle.marginTop) + parseFloat(elementComputedStyle.marginBottom);
270
+ if (height === 'full' || currentHeight === 'full') return;
271
+ if (isPreviewing && autoExpandPreview && previewRef.current.scrollHeight > currentHeight) {
272
+ // scrollHeight does not include the border or margin
273
+ // so we ask for the computed value for those,
274
+ // which is always in pixels because getComputedValue
275
+ // returns the resolved values
276
+ var elementComputedStyle = window.getComputedStyle(previewRef.current);
277
+ var borderWidth = parseFloat(elementComputedStyle.borderTopWidth) + parseFloat(elementComputedStyle.borderBottomWidth);
278
+ var marginWidth = parseFloat(elementComputedStyle.marginTop) + parseFloat(elementComputedStyle.marginBottom);
279
279
 
280
- // then add an extra pixel for safety and because the scrollHeight value is rounded
281
- var extraHeight = borderWidth + marginWidth + 1;
282
- setCurrentHeight(previewRef.current.scrollHeight + extraHeight);
283
- }
280
+ // then add an extra pixel for safety and because the scrollHeight value is rounded
281
+ var extraHeight = borderWidth + marginWidth + 1;
282
+ setCurrentHeight(previewRef.current.scrollHeight + extraHeight);
284
283
  }
285
284
  }, [currentHeight, isPreviewing, height, autoExpandPreview]);
286
285
  var previewHeight = height === 'full' ? "calc(100% - ".concat(editorFooterHeight, "px)") : currentHeight;
@@ -63,7 +63,7 @@ var _EuiPageBottomBar = function _EuiPageBottomBar(_ref2) {
63
63
  // Hide the overflow in case of larger flex margins than padding
64
64
  ,
65
65
  css: _ref
66
- // Using unknown here because of the possible conflict with overriding props and position `sticky`
66
+ // Using object here because of the possible conflict with overriding props and position `sticky`
67
67
  }, rest), (0, _react.jsx)(_page_section.EuiPageSection, {
68
68
  paddingSize: paddingSize,
69
69
  restrictWidth: restrictWidth
@@ -72,8 +72,85 @@ var EuiPaginationButton = function EuiPaginationButton(_ref) {
72
72
  };
73
73
  exports.EuiPaginationButton = EuiPaginationButton;
74
74
  EuiPaginationButton.propTypes = {
75
- href: _propTypes.default.string,
76
- onClick: _propTypes.default.func,
75
+ href: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]), _propTypes.default.string]),
76
+ onClick: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.func]),
77
+ /**
78
+ * Any of the named color palette options.
79
+ */
80
+ color: _propTypes.default.any,
81
+ size: _propTypes.default.any,
82
+ /**
83
+ * Ensure the text of the button sits flush to the left, right, or both sides of its container
84
+ */
85
+ /**
86
+ * Ensure the text of the button sits flush to the left, right, or both sides of its container
87
+ */
88
+ flush: _propTypes.default.any,
89
+ /**
90
+ * `disabled` is also allowed
91
+ */
92
+ /**
93
+ * `disabled` is also allowed
94
+ */
95
+ isDisabled: _propTypes.default.bool,
96
+ /**
97
+ * Force disables the button and changes the icon to a loading spinner
98
+ */
99
+ /**
100
+ * Force disables the button and changes the icon to a loading spinner
101
+ */
102
+ isLoading: _propTypes.default.bool,
103
+ /**
104
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
105
+ * *Only use when the readable text does not change between states.*
106
+ */
107
+ /**
108
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
109
+ * *Only use when the readable text does not change between states.*
110
+ */
111
+ isSelected: _propTypes.default.bool,
112
+ target: _propTypes.default.string,
113
+ rel: _propTypes.default.string,
114
+ type: _propTypes.default.oneOf(["button", "submit"]),
115
+ buttonRef: _propTypes.default.any,
116
+ /**
117
+ * Object of props passed to the `<span>` wrapping the button's content
118
+ */
119
+ /**
120
+ * Object of props passed to the `<span>` wrapping the button's content
121
+ */
122
+ contentProps: _propTypes.default.shape({
123
+ className: _propTypes.default.string,
124
+ "aria-label": _propTypes.default.string,
125
+ "data-test-subj": _propTypes.default.string,
126
+ css: _propTypes.default.any
127
+ }),
128
+ /**
129
+ * Any `type` accepted by EuiIcon
130
+ */
131
+ 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", "endpoint", "eql", "eraser", "error", "esqlVis", "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", "grabOmnidirectional", "gradient", "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", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "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", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "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", "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", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
132
+ /**
133
+ * Can only be one side `left` or `right`
134
+ */
135
+ iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
136
+ /**
137
+ * Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
138
+ *
139
+ * This span wrapper can be removed by passing `textProps={false}`.
140
+ */
141
+ textProps: _propTypes.default.oneOfType([_propTypes.default.shape({
142
+ className: _propTypes.default.string,
143
+ "aria-label": _propTypes.default.string,
144
+ "data-test-subj": _propTypes.default.string,
145
+ css: _propTypes.default.any,
146
+ ref: _propTypes.default.any,
147
+ "data-text": _propTypes.default.string
148
+ }).isRequired, _propTypes.default.oneOf([false])]),
149
+ iconSize: _propTypes.default.any,
150
+ className: _propTypes.default.string,
151
+ "aria-label": _propTypes.default.string,
152
+ "data-test-subj": _propTypes.default.string,
153
+ css: _propTypes.default.any,
77
154
  isActive: _propTypes.default.bool,
78
155
  pageIndex: _propTypes.default.number.isRequired,
79
156
  totalPages: _propTypes.default.number
@@ -218,7 +218,7 @@ var EuiSelectableListItem = /*#__PURE__*/function (_Component) {
218
218
  onFocusBadgeNode = (0, _react2.jsx)(_badge.EuiBadge, (0, _extends2.default)({
219
219
  className: "euiSelectableListItem__onFocusBadge"
220
220
  }, defaultOnFocusBadgeProps));
221
- } else if (!!onFocusBadge && onFocusBadge !== false) {
221
+ } else if (typeof onFocusBadge !== 'boolean' && !!onFocusBadge) {
222
222
  var _children = onFocusBadge.children,
223
223
  _className = onFocusBadge.className,
224
224
  restBadgeProps = (0, _objectWithoutProperties2.default)(onFocusBadge, _excluded2);
@@ -51,34 +51,12 @@ var displayToClassNameMap = {
51
51
  var EuiTreeView = /*#__PURE__*/function (_Component) {
52
52
  (0, _inherits2.default)(EuiTreeView, _Component);
53
53
  var _super = _createSuper(EuiTreeView);
54
- function EuiTreeView() {
54
+ function EuiTreeView(props, context) {
55
55
  var _this;
56
56
  (0, _classCallCheck2.default)(this, EuiTreeView);
57
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
58
- args[_key] = arguments[_key];
59
- }
60
- _this = _super.call.apply(_super, [this].concat(args));
57
+ _this = _super.call(this, props, context);
61
58
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "treeIdGenerator", (0, _services.htmlIdGenerator)('euiTreeView'));
62
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isNested", !!_this.context);
63
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
64
- openItems: _this.props.expandByDefault ? _this.props.items.map(function (_ref) {
65
- var id = _ref.id,
66
- children = _ref.children;
67
- return children ? id : null;
68
- }).filter(function (x) {
69
- return x != null;
70
- }) : _this.props.items.map(function (_ref2) {
71
- var id = _ref2.id,
72
- children = _ref2.children,
73
- isExpanded = _ref2.isExpanded;
74
- return children && isExpanded ? id : null;
75
- }).filter(function (x) {
76
- return x != null;
77
- }),
78
- activeItem: '',
79
- treeID: getTreeId(_this.props.id, _this.context, _this.treeIdGenerator),
80
- expandChildNodes: _this.props.expandByDefault || false
81
- });
59
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isNested", void 0);
82
60
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "buttonRef", []);
83
61
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setButtonRef", function (ref, index) {
84
62
  _this.buttonRef[index] = ref;
@@ -173,6 +151,26 @@ var EuiTreeView = /*#__PURE__*/function (_Component) {
173
151
  _this.buttonRef[index].focus();
174
152
  }
175
153
  });
154
+ _this.isNested = !!_this.context;
155
+ _this.state = {
156
+ openItems: _this.props.expandByDefault ? _this.props.items.map(function (_ref) {
157
+ var id = _ref.id,
158
+ children = _ref.children;
159
+ return children ? id : null;
160
+ }).filter(function (x) {
161
+ return x != null;
162
+ }) : _this.props.items.map(function (_ref2) {
163
+ var id = _ref2.id,
164
+ children = _ref2.children,
165
+ isExpanded = _ref2.isExpanded;
166
+ return children && isExpanded ? id : null;
167
+ }).filter(function (x) {
168
+ return x != null;
169
+ }),
170
+ activeItem: '',
171
+ treeID: getTreeId(_this.props.id, context, _this.treeIdGenerator),
172
+ expandChildNodes: _this.props.expandByDefault || false
173
+ };
176
174
  return _this;
177
175
  }
178
176
  (0, _createClass2.default)(EuiTreeView, [{
@@ -18,7 +18,7 @@ var is = function is(expectedValue) {
18
18
  var compName = componentName || 'ANONYMOUS';
19
19
  var value = props[propName];
20
20
  if (value !== expectedValue) {
21
- return new Error("[".concat(propName, "] property in [").concat(compName, "] component is expected to equal [").concat(expectedValue, "] but\n [").concat(value, "] was provided instead."));
21
+ return new Error("[".concat(propName.toString(), "] property in [").concat(compName, "] component is expected to equal [").concat(expectedValue, "] but\n [").concat(value, "] was provided instead."));
22
22
  }
23
23
  return null;
24
24
  };
@@ -26,7 +26,7 @@ var is = function is(expectedValue) {
26
26
  var compName = componentName || 'ANONYMOUS';
27
27
  var value = props[propName];
28
28
  if ((0, _predicate.isNil)(value)) {
29
- return new Error("[".concat(propName, "] property in [").concat(compName, "] component is required but seems to be missing"));
29
+ return new Error("[".concat(propName.toString(), "] property in [").concat(compName, "] component is required but seems to be missing"));
30
30
  }
31
31
  return validator(props, propName, componentName);
32
32
  };
@@ -1,133 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- 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."); }
3
- 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); }
4
- 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; }
5
- 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; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- /*
8
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
- * or more contributor license agreements. Licensed under the Elastic License
10
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
- * in compliance with, at your election, the Elastic License 2.0 or the Server
12
- * Side Public License, v 1.
13
- */
14
-
15
- /// <reference types="cypress" />
16
- /// <reference types="cypress-real-events" />
17
- /// <reference types="../../../cypress/support" />
18
-
19
- import React, { useState } from 'react';
20
- import { EuiButton } from '../button';
21
- import { EuiControlBar } from './control_bar';
22
- import { EuiPanel } from '../panel';
23
- import { EuiText } from '../text';
24
- import { jsx as ___EmotionJSX } from "@emotion/react";
25
- var ControlBar = function ControlBar() {
26
- var _useState = useState(false),
27
- _useState2 = _slicedToArray(_useState, 2),
28
- contentIsVisible = _useState2[0],
29
- setVisibility = _useState2[1];
30
- var _useState3 = useState(false),
31
- _useState4 = _slicedToArray(_useState3, 2),
32
- isDisplaying = _useState4[0],
33
- setDisplay = _useState4[1];
34
- var toggleContent = function toggleContent() {
35
- setVisibility(!contentIsVisible);
36
- };
37
- var toggleDisplay = function toggleDisplay() {
38
- setDisplay(!isDisplaying);
39
- setVisibility(false);
40
- };
41
- var codeControls = [{
42
- controlType: 'icon',
43
- id: 'root_icon',
44
- iconType: 'submodule',
45
- 'aria-label': 'Project Root'
46
- }, {
47
- controlType: 'breadcrumbs',
48
- id: 'current_file_path',
49
- breadcrumbs: [{
50
- text: 'src'
51
- }, {
52
- text: 'components'
53
- }]
54
- }, {
55
- controlType: 'spacer'
56
- }, {
57
- controlType: 'icon',
58
- id: 'status_icon',
59
- iconType: 'warning',
60
- color: 'warning',
61
- 'aria-label': 'Repo Status'
62
- }, {
63
- controlType: 'divider'
64
- }, {
65
- controlType: 'icon',
66
- id: 'branch_icon',
67
- iconType: 'branch',
68
- 'aria-label': 'Branch Icon'
69
- }, {
70
- controlType: 'text',
71
- id: 'branch_name',
72
- text: 'some_long_branch'
73
- }, {
74
- controlType: 'divider'
75
- }, {
76
- controlType: 'icon',
77
- id: 'github_icon',
78
- iconType: 'logoGithub',
79
- onClick: function onClick() {},
80
- title: 'Open in Github',
81
- 'aria-label': 'Open in Github'
82
- }, {
83
- controlType: 'divider'
84
- }, {
85
- controlType: 'button',
86
- id: 'open_history_view',
87
- label: contentIsVisible ? 'Hide history' : 'Show history',
88
- color: 'primary',
89
- onClick: toggleContent
90
- }];
91
- var display;
92
- if (isDisplaying) {
93
- display = ___EmotionJSX(EuiControlBar, {
94
- controls: codeControls,
95
- showContent: contentIsVisible
96
- }, ___EmotionJSX("div", {
97
- style: {
98
- padding: '2rem',
99
- maxWidth: '60rem',
100
- margin: '0 auto'
101
- }
102
- }, ___EmotionJSX(EuiPanel, null, ___EmotionJSX(EuiText, null, ___EmotionJSX("h1", null, "1984"), ___EmotionJSX("h3", null, "By: George Orwell"), ___EmotionJSX("p", null, "It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him."), ___EmotionJSX("p", null, "The hallway smelt of boiled cabbage and old rag mats. At one end of it a coloured poster, too large for indoor display, had been tacked to the wall. It depicted simply an enormous face, more than a metre wide: the face of a man of about forty-five, with a heavy black moustache and ruggedly handsome features. Winston made for the stairs. It was no use trying the lift. Even at the best of times it was seldom working, and at present the electric current was cut off during daylight hours. It was part of the economy drive in preparation for Hate Week. The flat was seven flights up, and Winston, who was thirty-nine and had a varicose ulcer above his right ankle, went slowly, resting several times on the way. On each landing, opposite the lift-shaft, the poster with the enormous face gazed from the wall. It was one of those pictures which are so contrived that the eyes follow you about when you move. BIG BROTHER IS WATCHING YOU, the caption beneath it ran."), ___EmotionJSX("p", null, "Inside the flat a fruity voice was reading out a list of figures which had something to do with the production of pig-iron. The voice came from an oblong metal plaque like a dulled mirror which formed part of the surface of the right-hand wall. Winston turned a switch and the voice sank somewhat, though the words were still distinguishable. The instrument (the telescreen, it was called) could be dimmed, but there was no way of shutting it off completely. He moved over to the window: a smallish, frail figure, the meagreness of his body merely emphasized by the blue overalls which were the uniform of the party. His hair was very fair, his face naturally sanguine, his skin roughened by coarse soap and blunt razor blades and the cold of the winter that had just ended.")))));
103
- }
104
- return ___EmotionJSX("div", null, ___EmotionJSX(EuiButton, {
105
- onClick: toggleDisplay
106
- }, "Toggle example"), display);
107
- };
108
- beforeEach(function () {
109
- cy.viewport(1024, 768);
110
- cy.mount(___EmotionJSX(ControlBar, null));
111
- cy.get('section[aria-label="Page level controls"]').should('not.exist');
112
- });
113
- describe('EuiControlBar', function () {
114
- describe('Automated accessibility check', function () {
115
- it('has zero violations on render', function () {
116
- cy.checkAxe();
117
- });
118
- it('has zero violations when control bar is shown', function () {
119
- cy.get('button.euiButton').contains('Toggle example').realClick();
120
- cy.get('section[aria-label="Page level controls"]').should('exist');
121
- cy.checkAxe({
122
- context: 'section[aria-label="Page level controls"]'
123
- });
124
- });
125
- it('has zero violations when control bar is hidden', function () {
126
- cy.get('button.euiButton').contains('Toggle example').realClick();
127
- cy.get('section[aria-label="Page level controls"]').should('exist');
128
- cy.get('button.euiButton').contains('Toggle example').realClick();
129
- cy.get('section[aria-label="Page level controls"]').should('not.exist');
130
- cy.checkAxe();
131
- });
132
- });
133
- });