@elastic/eui 88.5.0 → 88.5.2

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 (107) hide show
  1. package/dist/eui_theme_dark.css +8 -21
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +8 -21
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +20 -6
  6. package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +4 -14
  7. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +57 -0
  8. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +25 -0
  9. package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +156 -0
  10. package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +19 -0
  11. package/es/components/collapsible_nav_beta/collapsible_nav_group/index.js +9 -0
  12. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -7
  13. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +3 -7
  14. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +4 -8
  15. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +16 -63
  16. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +2 -10
  17. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +122 -41
  18. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -3
  19. package/es/components/combo_box/combo_box.js +12 -25
  20. package/es/components/combo_box/combo_box_input/combo_box_input.js +61 -54
  21. package/es/components/text_truncate/index.js +1 -1
  22. package/es/components/text_truncate/utils.js +88 -138
  23. package/es/services/canvas/canvas_text_utils.js +64 -0
  24. package/es/services/canvas/index.js +9 -0
  25. package/es/services/index.js +1 -0
  26. package/eui.d.ts +186 -105
  27. package/i18ntokens.json +8 -8
  28. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +20 -6
  29. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +11 -19
  30. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +67 -0
  31. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +33 -0
  32. package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +166 -0
  33. package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +26 -0
  34. package/lib/components/collapsible_nav_beta/collapsible_nav_group/index.js +12 -0
  35. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -7
  36. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +3 -7
  37. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +4 -8
  38. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +14 -61
  39. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -9
  40. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +122 -39
  41. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -4
  42. package/lib/components/combo_box/combo_box.js +12 -25
  43. package/lib/components/combo_box/combo_box_input/combo_box_input.js +60 -53
  44. package/lib/components/text_truncate/index.js +0 -6
  45. package/lib/components/text_truncate/utils.js +97 -148
  46. package/lib/services/canvas/canvas_text_utils.js +70 -0
  47. package/lib/services/canvas/index.js +12 -0
  48. package/lib/services/index.js +8 -0
  49. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +17 -3
  50. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +4 -14
  51. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +56 -0
  52. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +25 -0
  53. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +48 -0
  54. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +19 -0
  55. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/index.js +9 -0
  56. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -33
  57. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +2 -10
  58. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +54 -21
  59. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -3
  60. package/optimize/es/components/combo_box/combo_box.js +12 -25
  61. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +61 -53
  62. package/optimize/es/components/text_truncate/index.js +1 -1
  63. package/optimize/es/components/text_truncate/utils.js +87 -137
  64. package/optimize/es/services/canvas/canvas_text_utils.js +60 -0
  65. package/optimize/es/services/canvas/index.js +9 -0
  66. package/optimize/es/services/index.js +1 -0
  67. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +15 -1
  68. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +11 -19
  69. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +66 -0
  70. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +33 -0
  71. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +58 -0
  72. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +26 -0
  73. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/index.js +12 -0
  74. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +5 -31
  75. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -9
  76. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +54 -20
  77. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -4
  78. package/optimize/lib/components/combo_box/combo_box.js +12 -25
  79. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +60 -52
  80. package/optimize/lib/components/text_truncate/index.js +0 -6
  81. package/optimize/lib/components/text_truncate/utils.js +96 -147
  82. package/optimize/lib/services/canvas/canvas_text_utils.js +67 -0
  83. package/optimize/lib/services/canvas/index.js +12 -0
  84. package/optimize/lib/services/index.js +8 -0
  85. package/package.json +2 -5
  86. package/src/components/combo_box/_combo_box.scss +12 -19
  87. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +20 -6
  88. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +11 -19
  89. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +66 -0
  90. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +33 -0
  91. package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +165 -0
  92. package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +26 -0
  93. package/test-env/components/collapsible_nav_beta/collapsible_nav_group/index.js +12 -0
  94. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -7
  95. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +3 -7
  96. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +4 -8
  97. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +14 -61
  98. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -9
  99. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +122 -39
  100. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +13 -4
  101. package/test-env/components/combo_box/combo_box.js +12 -25
  102. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +60 -53
  103. package/test-env/components/text_truncate/index.js +0 -6
  104. package/test-env/components/text_truncate/utils.js +96 -147
  105. package/test-env/services/canvas/canvas_text_utils.js +30 -0
  106. package/test-env/services/canvas/index.js +12 -0
  107. package/test-env/services/index.js +8 -0
@@ -16,12 +16,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  * Side Public License, v 1.
17
17
  */
18
18
 
19
- import React, { useCallback, useMemo } from 'react';
19
+ import React, { useCallback } from 'react';
20
20
  import PropTypes from "prop-types";
21
21
  import classNames from 'classnames';
22
22
  import { useEuiTheme, useGeneratedHtmlId } from '../../../services';
23
23
  import { EuiAccordion } from '../../accordion';
24
- import { EuiCollapsibleNavSubItem } from './collapsible_nav_item';
24
+ import { EuiCollapsibleNavSubItems } from './collapsible_nav_item';
25
25
  import { EuiCollapsibleNavLink } from './collapsible_nav_link';
26
26
  import { euiCollapsibleNavAccordionStyles } from './collapsible_nav_accordion.styles';
27
27
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -52,10 +52,6 @@ export var EuiCollapsibleNavAccordion = function EuiCollapsibleNavAccordion(_ref
52
52
  var euiTheme = useEuiTheme();
53
53
  var styles = euiCollapsibleNavAccordionStyles(euiTheme);
54
54
  var cssStyles = [styles.euiCollapsibleNavAccordion, isSubItem ? styles.isSubItem : styles.isTopItem, isSelected && styles.isSelected, accordionProps === null || accordionProps === void 0 ? void 0 : accordionProps.css];
55
-
56
- /**
57
- * Title / accordion trigger
58
- */
59
55
  var isTitleInteractive = !!(href || linkProps !== null && linkProps !== void 0 && linkProps.onClick);
60
56
 
61
57
  // Stop propagation on the title so that the accordion toggle doesn't occur on click
@@ -67,32 +63,6 @@ export var EuiCollapsibleNavAccordion = function EuiCollapsibleNavAccordion(_ref
67
63
  }, [linkProps === null || linkProps === void 0 ? void 0 : linkProps.onClick] // eslint-disable-line react-hooks/exhaustive-deps
68
64
  );
69
65
 
70
- /**
71
- * Child items
72
- */
73
- // If any of the sub items have an icon, default to an
74
- // icon of `empty` so that all text lines up vertically
75
- var itemsHaveIcons = useMemo(function () {
76
- return items.some(function (item) {
77
- return !!item.icon;
78
- });
79
- }, [items]);
80
- var icon = itemsHaveIcons ? 'empty' : undefined;
81
- var childrenCssStyles = [styles.children.euiCollapsibleNavAccordion__children, isSubItem ? styles.children.isSubItem : styles.children.isTopItem];
82
- var children = ___EmotionJSX("div", {
83
- css: childrenCssStyles,
84
- className: "euiCollapsibleNavAccordion__children"
85
- }, items.map(function (item, index) {
86
- return (
87
- // This is an intentional circular dependency between the accordion & parent item display.
88
- // EuiSideNavItem is purposely recursive to support any amount of nested sub items,
89
- // and split up into separate files/components for better dev readability
90
- ___EmotionJSX(EuiCollapsibleNavSubItem, _extends({
91
- key: index,
92
- icon: icon
93
- }, item))
94
- );
95
- }));
96
66
  return ___EmotionJSX(EuiAccordion, _extends({
97
67
  id: groupID,
98
68
  className: classes,
@@ -114,7 +84,11 @@ export var EuiCollapsibleNavAccordion = function EuiCollapsibleNavAccordion(_ref
114
84
  }, accordionProps === null || accordionProps === void 0 ? void 0 : accordionProps.arrowProps), {}, {
115
85
  css: [styles.euiCollapsibleNavAccordion__arrow, accordionProps === null || accordionProps === void 0 ? void 0 : (_accordionProps$arrow = accordionProps.arrowProps) === null || _accordionProps$arrow === void 0 ? void 0 : _accordionProps$arrow.css]
116
86
  })
117
- }), children);
87
+ }), ___EmotionJSX(EuiCollapsibleNavSubItems, {
88
+ items: items,
89
+ isSubItem: isSubItem,
90
+ className: "euiCollapsibleNavAccordion__children"
91
+ }));
118
92
  };
119
93
  EuiCollapsibleNavAccordion.propTypes = {
120
94
  /**
@@ -123,20 +97,20 @@ EuiCollapsibleNavAccordion.propTypes = {
123
97
  */
124
98
  isSubItem: PropTypes.bool,
125
99
  buttonContent: PropTypes.node.isRequired,
126
- // On the main `EuiCollapsibleNavItem` component, this uses `EuiCollapsibleNavSubItemProps`
127
- // to allow for section headings, but by the time `items` reaches this component, we
128
- // know for sure it's an actual accordion item and not a section heading
129
100
  items: PropTypes.arrayOf(PropTypes.shape({
130
101
  /**
131
102
  * Required text to render as the nav item title
132
103
  */
133
- title: PropTypes.string.isRequired,
104
+ title: PropTypes.string,
134
105
  /**
135
106
  * Allows customizing the title element.
136
107
  * Consider using a heading element for better accessibility.
137
108
  * Defaults to an unsemantic `span` or `div`, depending on context.
138
109
  */
139
110
  titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
111
+ /**
112
+ * Optional icon to render to the left of title content
113
+ */
140
114
  icon: PropTypes.oneOfType([PropTypes.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", "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", "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", "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", "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.string.isRequired, PropTypes.elementType.isRequired]),
141
115
  /**
142
116
  * Optional props to pass to the title icon
@@ -155,33 +129,11 @@ EuiCollapsibleNavAccordion.propTypes = {
155
129
  /**
156
130
  * When passed, an `EuiAccordion` with nested child item links will be rendered.
157
131
  *
158
- * Accepts any #EuiCollapsibleNavItem prop, and also accepts an
159
- * #EuiCollapsibleNavSubItemGroupTitle
132
+ * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
133
+ * subitem content, pass an object with a `renderItem` callback.
160
134
  */
161
135
  items: PropTypes.arrayOf(PropTypes.shape({
162
- /**
163
- * Required text to render as the nav item title
164
- */
165
- title: PropTypes.string,
166
- /**
167
- * Allows customizing the title element.
168
- * Consider using a heading element for better accessibility.
169
- * Defaults to an unsemantic `span` or `div`, depending on context.
170
- */
171
- titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
172
- /**
173
- * Optional icon to render to the left of title content
174
- */
175
- icon: PropTypes.oneOfType([PropTypes.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", "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", "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", "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", "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.string.isRequired, PropTypes.elementType.isRequired]),
176
- /**
177
- * Optional props to pass to the title icon
178
- */
179
- iconProps: PropTypes.any,
180
- /**
181
- * Pass this flag to seperate links by group title headings.
182
- * Strongly consider using the `titleElement` prop for accessibility.
183
- */
184
- isGroupTitle: PropTypes.bool
136
+ renderItem: PropTypes.func
185
137
  }).isRequired),
186
138
  /**
187
139
  * If `items` is specified, use this prop to pass any prop that `EuiAccordion`
@@ -197,6 +149,7 @@ EuiCollapsibleNavAccordion.propTypes = {
197
149
  * Highlights whether an item is currently selected, e.g.
198
150
  * if the user is on the same page as the nav link
199
151
  */
200
- isSelected: PropTypes.bool
152
+ isSelected: PropTypes.bool,
153
+ renderItem: PropTypes.func
201
154
  }).isRequired).isRequired
202
155
  };
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { css } from '@emotion/react';
10
- import { logicalCSS, mathWithUnits, euiCanAnimate } from '../../../global_styling';
10
+ import { logicalCSS, euiCanAnimate } from '../../../global_styling';
11
11
  import { euiCollapsibleNavItemVariables } from './collapsible_nav_item.styles';
12
12
  export var euiCollapsibleNavAccordionStyles = function euiCollapsibleNavAccordionStyles(euiThemeContext) {
13
13
  var euiTheme = euiThemeContext.euiTheme;
@@ -20,14 +20,6 @@ export var euiCollapsibleNavAccordionStyles = function euiCollapsibleNavAccordio
20
20
  isSelected: /*#__PURE__*/css("&>.euiAccordion__triggerWrapper{background-color:", sharedStyles.backgroundSelectedColor, ";&:hover{background-color:", sharedStyles.backgroundSelectedColor, ";}};label:isSelected;"),
21
21
  isSubItem: /*#__PURE__*/css("&.euiAccordion-isOpen{", logicalCSS('margin-bottom', euiTheme.size.m), ";};label:isSubItem;"),
22
22
  // Arrow element
23
- euiCollapsibleNavAccordion__arrow: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.xs), euiCanAnimate, "{transition:background-color ", sharedStyles.animation, ";}&:hover,&:focus-visible{background-color:", euiTheme.colors.lightShade, ";&>.euiIcon{color:", sharedStyles.color, ";}}transform:none!important;&>.euiIcon{color:", sharedStyles.rightIconColor, ";transform:rotate(90deg);", euiCanAnimate, "{transition:transform ", sharedStyles.animation, ",color ", sharedStyles.animation, ";}}&.euiAccordion__arrow[aria-expanded='true']>.euiIcon{color:", sharedStyles.color, ";transform:rotate(-90deg);};label:euiCollapsibleNavAccordion__arrow;"),
24
- // Children wrapper
25
- children: {
26
- euiCollapsibleNavAccordion__children: /*#__PURE__*/css(";label:euiCollapsibleNavAccordion__children;"),
27
- isTopItem: /*#__PURE__*/css(logicalCSS('padding-top', euiTheme.size.xs), " ", logicalCSS('padding-left', euiTheme.size.xl), ";;label:isTopItem;"),
28
- isSubItem: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thin), " ", logicalCSS('margin-left', euiTheme.size.s), " ", logicalCSS('padding-left', mathWithUnits([euiTheme.size.s, euiTheme.border.width.thin], function (x, y) {
29
- return x - y;
30
- })), ";;label:isSubItem;")
31
- }
23
+ euiCollapsibleNavAccordion__arrow: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.xs), euiCanAnimate, "{transition:background-color ", sharedStyles.animation, ";}&:hover,&:focus-visible{background-color:", euiTheme.colors.lightShade, ";&>.euiIcon{color:", sharedStyles.color, ";}}transform:none!important;&>.euiIcon{color:", sharedStyles.rightIconColor, ";transform:rotate(90deg);", euiCanAnimate, "{transition:transform ", sharedStyles.animation, ",color ", sharedStyles.animation, ";}}&.euiAccordion__arrow[aria-expanded='true']>.euiIcon{color:", sharedStyles.color, ";transform:rotate(-90deg);};label:euiCollapsibleNavAccordion__arrow;")
32
24
  };
33
25
  };
@@ -1,6 +1,7 @@
1
1
  var _excluded = ["isSubItem", "title", "titleElement", "icon", "iconProps", "items", "children"],
2
- _excluded2 = ["isGroupTitle", "className"],
3
- _excluded3 = ["className"];
2
+ _excluded2 = ["renderItem", "className"],
3
+ _excluded3 = ["items", "isSubItem", "isGroup", "className"],
4
+ _excluded4 = ["className"];
4
5
  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); }
5
6
  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; }
6
7
  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; }
@@ -12,17 +13,16 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
12
13
  * Side Public License, v 1.
13
14
  */
14
15
 
15
- import React, { useContext } from 'react';
16
+ import React, { useContext, useMemo } from 'react';
16
17
  import PropTypes from "prop-types";
17
18
  import classNames from 'classnames';
18
19
  import { useEuiTheme } from '../../../services';
19
20
  import { EuiIcon } from '../../icon';
20
- import { EuiTitle } from '../../title';
21
21
  import { EuiCollapsibleNavContext } from '../context';
22
22
  import { EuiCollapsedNavItem } from './collapsed';
23
23
  import { EuiCollapsibleNavAccordion } from './collapsible_nav_accordion';
24
24
  import { EuiCollapsibleNavLink } from './collapsible_nav_link';
25
- import { euiCollapsibleNavItemTitleStyles, euiCollapsibleNavSubItemGroupTitleStyles } from './collapsible_nav_item.styles';
25
+ import { euiCollapsibleNavItemTitleStyles, euiCollapsibleNavSubItemsStyles } from './collapsible_nav_item.styles';
26
26
  import { jsx as ___EmotionJSX } from "@emotion/react";
27
27
  /**
28
28
  * Internal DRY subcomponent shared between top level items and sub items
@@ -97,15 +97,11 @@ EuiCollapsibleNavItemDisplay.propTypes = {
97
97
  /**
98
98
  * When passed, an `EuiAccordion` with nested child item links will be rendered.
99
99
  *
100
- * Accepts any #EuiCollapsibleNavItem prop, and also accepts an
101
- * #EuiCollapsibleNavSubItemGroupTitle
100
+ * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
101
+ * subitem content, pass an object with a `renderItem` callback.
102
102
  */
103
103
  items: PropTypes.arrayOf(PropTypes.shape({
104
- /**
105
- * Pass this flag to seperate links by group title headings.
106
- * Strongly consider using the `titleElement` prop for accessibility.
107
- */
108
- isGroupTitle: PropTypes.bool
104
+ renderItem: PropTypes.func
109
105
  }).isRequired),
110
106
  /**
111
107
  * If `items` is specified, use this prop to pass any prop that `EuiAccordion`
@@ -128,7 +124,7 @@ EuiCollapsibleNavItemDisplay.propTypes = {
128
124
  */
129
125
  isSubItem: PropTypes.bool
130
126
  };
131
- var EuiCollapsibleNavItemTitle = function EuiCollapsibleNavItemTitle(_ref2) {
127
+ export var EuiCollapsibleNavItemTitle = function EuiCollapsibleNavItemTitle(_ref2) {
132
128
  var title = _ref2.title,
133
129
  _ref2$titleElement = _ref2.titleElement,
134
130
  titleElement = _ref2$titleElement === void 0 ? 'span' : _ref2$titleElement,
@@ -145,23 +141,16 @@ var EuiCollapsibleNavItemTitle = function EuiCollapsibleNavItemTitle(_ref2) {
145
141
  };
146
142
 
147
143
  /**
148
- * Sub-items can either be a group title, to visually separate sections
149
- * of nav links, or they can simply be more links or accordions
144
+ * Sub-items can either be a totally custom rendered item,
145
+ * or they can simply be more links or accordions
150
146
  */
151
147
  export var EuiCollapsibleNavSubItem = function EuiCollapsibleNavSubItem(_ref3) {
152
- var isGroupTitle = _ref3.isGroupTitle,
148
+ var renderItem = _ref3.renderItem,
153
149
  className = _ref3.className,
154
150
  props = _objectWithoutProperties(_ref3, _excluded2);
155
- var euiTheme = useEuiTheme();
156
- var styles = euiCollapsibleNavSubItemGroupTitleStyles(euiTheme);
157
151
  var classes = classNames('euiCollapsibleNavSubItem', className);
158
- if (isGroupTitle) {
159
- var TitleElement = props.titleElement || 'div';
160
- return ___EmotionJSX(EuiTitle, {
161
- size: "xxxs",
162
- css: styles.euiCollapsibleNavItem__groupTitle,
163
- className: "euiCollapsibleNavItem__groupTitle eui-textTruncate"
164
- }, ___EmotionJSX(TitleElement, null, props.title));
152
+ if (renderItem) {
153
+ return ___EmotionJSX(React.Fragment, null, renderItem());
165
154
  }
166
155
  return ___EmotionJSX(EuiCollapsibleNavItemDisplay, _extends({
167
156
  className: classes
@@ -171,7 +160,8 @@ export var EuiCollapsibleNavSubItem = function EuiCollapsibleNavSubItem(_ref3) {
171
160
  };
172
161
 
173
162
  /**
174
- * The actual exported component
163
+ * Reuseable component for rendering a group of sub items
164
+ * Used by both `EuiCollapsibleNavGroup` and `EuiCollapsibleNavAccordion`
175
165
  */
176
166
  EuiCollapsibleNavSubItem.propTypes = {
177
167
  /**
@@ -205,8 +195,8 @@ EuiCollapsibleNavSubItem.propTypes = {
205
195
  /**
206
196
  * When passed, an `EuiAccordion` with nested child item links will be rendered.
207
197
  *
208
- * Accepts any #EuiCollapsibleNavItem prop, and also accepts an
209
- * #EuiCollapsibleNavSubItemGroupTitle
198
+ * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
199
+ * subitem content, pass an object with a `renderItem` callback.
210
200
  */
211
201
  items: PropTypes.arrayOf(PropTypes.any.isRequired),
212
202
  /**
@@ -224,15 +214,110 @@ EuiCollapsibleNavSubItem.propTypes = {
224
214
  * if the user is on the same page as the nav link
225
215
  */
226
216
  isSelected: PropTypes.bool,
217
+ renderItem: PropTypes.func
218
+ };
219
+ export var EuiCollapsibleNavSubItems = function EuiCollapsibleNavSubItems(_ref4) {
220
+ var items = _ref4.items,
221
+ isSubItem = _ref4.isSubItem,
222
+ isGroup = _ref4.isGroup,
223
+ className = _ref4.className,
224
+ rest = _objectWithoutProperties(_ref4, _excluded3);
225
+ var classes = classNames('euiCollapsibleNavItem__items', className);
226
+ var euiTheme = useEuiTheme();
227
+ var styles = euiCollapsibleNavSubItemsStyles(euiTheme);
228
+ var cssStyles = [styles.euiCollapsibleNavItem__items, isGroup ? styles.isGroup : isSubItem ? styles.isSubItem : styles.isTopItem];
229
+ var itemsHaveIcons = useMemo(function () {
230
+ return items.some(function (item) {
231
+ return !!item.icon;
232
+ });
233
+ }, [items]);
234
+ return ___EmotionJSX("div", _extends({
235
+ className: classes,
236
+ css: cssStyles
237
+ }, rest), items.map(function (item, index) {
238
+ // If any of the sub items have an icon, default to an
239
+ // icon of `empty` so that all text lines up vertically
240
+ if (!item.renderItem && itemsHaveIcons && !item.icon) {
241
+ item.icon = 'empty';
242
+ }
243
+ return (
244
+ // This is an intentional circular dependency between the accordion & parent item display.
245
+ // EuiSideNavItem is purposely recursive to support any amount of nested sub items,
246
+ // and split up into separate files/components for better dev readability
247
+ ___EmotionJSX(EuiCollapsibleNavSubItem, _extends({
248
+ key: index
249
+ }, item))
250
+ );
251
+ }));
252
+ };
253
+
254
+ /**
255
+ * The actual exported component
256
+ */
257
+ EuiCollapsibleNavSubItems.propTypes = {
227
258
  /**
228
- * Pass this flag to seperate links by group title headings.
229
- * Strongly consider using the `titleElement` prop for accessibility.
259
+ * Determines whether the item should render as a top-level nav item
260
+ * or a nested nav subitem. Set internally by EUI
230
261
  */
231
- isGroupTitle: PropTypes.bool
262
+ isSubItem: PropTypes.bool,
263
+ items: PropTypes.arrayOf(PropTypes.shape({
264
+ /**
265
+ * Required text to render as the nav item title
266
+ */
267
+ title: PropTypes.string,
268
+ /**
269
+ * Allows customizing the title element.
270
+ * Consider using a heading element for better accessibility.
271
+ * Defaults to an unsemantic `span` or `div`, depending on context.
272
+ */
273
+ titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
274
+ /**
275
+ * Optional icon to render to the left of title content
276
+ */
277
+ icon: PropTypes.oneOfType([PropTypes.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", "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", "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", "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", "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.string.isRequired, PropTypes.elementType.isRequired]),
278
+ /**
279
+ * Optional props to pass to the title icon
280
+ */
281
+ iconProps: PropTypes.any,
282
+ className: PropTypes.string,
283
+ "aria-label": PropTypes.string,
284
+ "data-test-subj": PropTypes.string,
285
+ css: PropTypes.any,
286
+ /**
287
+ * The nav item link.
288
+ * If not included, and no `onClick` is specified, the nav item
289
+ * will render as an non-interactive `<span>`.
290
+ */
291
+ href: PropTypes.string,
292
+ /**
293
+ * When passed, an `EuiAccordion` with nested child item links will be rendered.
294
+ *
295
+ * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
296
+ * subitem content, pass an object with a `renderItem` callback.
297
+ */
298
+ items: PropTypes.arrayOf(PropTypes.any.isRequired),
299
+ /**
300
+ * If `items` is specified, use this prop to pass any prop that `EuiAccordion`
301
+ * accepts, including props that control the toggled state of the accordion
302
+ * (e.g. `initialIsOpen`, `forceState`)
303
+ */
304
+ accordionProps: PropTypes.any,
305
+ /**
306
+ * If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
307
+ */
308
+ linkProps: PropTypes.any,
309
+ /**
310
+ * Highlights whether an item is currently selected, e.g.
311
+ * if the user is on the same page as the nav link
312
+ */
313
+ isSelected: PropTypes.bool,
314
+ renderItem: PropTypes.func
315
+ }).isRequired).isRequired,
316
+ isGroup: PropTypes.bool
232
317
  };
233
- export var EuiCollapsibleNavItem = function EuiCollapsibleNavItem(_ref4) {
234
- var className = _ref4.className,
235
- props = _objectWithoutProperties(_ref4, _excluded3);
318
+ export var EuiCollapsibleNavItem = function EuiCollapsibleNavItem(_ref5) {
319
+ var className = _ref5.className,
320
+ props = _objectWithoutProperties(_ref5, _excluded4);
236
321
  var classes = classNames('euiCollapsibleNavItem', className);
237
322
  var _useContext = useContext(EuiCollapsibleNavContext),
238
323
  isCollapsed = _useContext.isCollapsed,
@@ -277,15 +362,11 @@ EuiCollapsibleNavItem.propTypes = {
277
362
  /**
278
363
  * When passed, an `EuiAccordion` with nested child item links will be rendered.
279
364
  *
280
- * Accepts any #EuiCollapsibleNavItem prop, and also accepts an
281
- * #EuiCollapsibleNavSubItemGroupTitle
365
+ * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
366
+ * subitem content, pass an object with a `renderItem` callback.
282
367
  */
283
368
  items: PropTypes.arrayOf(PropTypes.shape({
284
- /**
285
- * Pass this flag to seperate links by group title headings.
286
- * Strongly consider using the `titleElement` prop for accessibility.
287
- */
288
- isGroupTitle: PropTypes.bool
369
+ renderItem: PropTypes.func
289
370
  }).isRequired),
290
371
  /**
291
372
  * If `items` is specified, use this prop to pass any prop that `EuiAccordion`
@@ -14,7 +14,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
14
14
  */
15
15
 
16
16
  import { css } from '@emotion/react';
17
- import { logicalCSS, logicalShorthandCSS, euiFontSize } from '../../../global_styling';
17
+ import { logicalCSS, mathWithUnits, euiFontSize } from '../../../global_styling';
18
18
  import { euiButtonColor } from '../../../themes/amsterdam/global_styling/mixins/button';
19
19
 
20
20
  /**
@@ -50,9 +50,19 @@ export var euiCollapsibleNavItemTitleStyles = {
50
50
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
51
51
  }
52
52
  };
53
- export var euiCollapsibleNavSubItemGroupTitleStyles = function euiCollapsibleNavSubItemGroupTitleStyles(_ref) {
53
+
54
+ /**
55
+ * Sub item groups
56
+ */
57
+
58
+ export var euiCollapsibleNavSubItemsStyles = function euiCollapsibleNavSubItemsStyles(_ref) {
54
59
  var euiTheme = _ref.euiTheme;
55
60
  return {
56
- euiCollapsibleNavItem__groupTitle: /*#__PURE__*/css(logicalCSS('margin-top', euiTheme.size.base), " ", logicalShorthandCSS('padding', "".concat(euiTheme.size.xs, " ").concat(euiTheme.size.s)), ";;label:euiCollapsibleNavItem__groupTitle;")
61
+ euiCollapsibleNavItem__items: /*#__PURE__*/css(";label:euiCollapsibleNavItem__items;"),
62
+ isGroup: /*#__PURE__*/css(logicalCSS('padding-top', euiTheme.size.xs), " ", logicalCSS('padding-left', euiTheme.size.s), ";;label:isGroup;"),
63
+ isTopItem: /*#__PURE__*/css(logicalCSS('padding-top', euiTheme.size.xs), " ", logicalCSS('padding-left', euiTheme.size.xl), ";;label:isTopItem;"),
64
+ isSubItem: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thin), " ", logicalCSS('margin-left', euiTheme.size.s), " ", logicalCSS('padding-left', mathWithUnits([euiTheme.size.s, euiTheme.border.width.thin], function (x, y) {
65
+ return x - y;
66
+ })), ";;label:isSubItem;")
57
67
  };
58
68
  };
@@ -93,10 +93,6 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
93
93
  });
94
94
  }
95
95
  });
96
- _defineProperty(_assertThisInitialized(_this), "autoSizeInputRefInstance", null);
97
- _defineProperty(_assertThisInitialized(_this), "autoSizeInputRefCallback", function (ref) {
98
- _this.autoSizeInputRefInstance = ref;
99
- });
100
96
  _defineProperty(_assertThisInitialized(_this), "searchInputRefInstance", null);
101
97
  _defineProperty(_assertThisInitialized(_this), "searchInputRefCallback", function (ref) {
102
98
  _this.searchInputRefInstance = ref;
@@ -569,15 +565,7 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
569
565
  _createClass(EuiComboBox, [{
570
566
  key: "componentDidMount",
571
567
  value: function componentDidMount() {
572
- var _this2 = this;
573
568
  this._isMounted = true;
574
-
575
- // TODO: This will need to be called once the actual stylesheet loads.
576
- setTimeout(function () {
577
- if (_this2.autoSizeInputRefInstance) {
578
- _this2.autoSizeInputRefInstance.copyInputStyles();
579
- }
580
- }, 100);
581
569
  }
582
570
  }, {
583
571
  key: "componentDidUpdate",
@@ -610,7 +598,7 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
610
598
  }, {
611
599
  key: "render",
612
600
  value: function render() {
613
- var _this3 = this;
601
+ var _this2 = this;
614
602
  var _this$props8 = this.props,
615
603
  dataTestSubj = _this$props8['data-test-subj'],
616
604
  async = _this$props8.async,
@@ -681,32 +669,32 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
681
669
  default: "Choose from the following options"
682
670
  }, function (listboxAriaLabel) {
683
671
  return ___EmotionJSX(EuiComboBoxOptionsList, {
684
- zIndex: _this3.state.listZIndex,
685
- activeOptionIndex: _this3.state.activeOptionIndex,
686
- areAllOptionsSelected: _this3.areAllOptionsSelected(),
672
+ zIndex: _this2.state.listZIndex,
673
+ activeOptionIndex: _this2.state.activeOptionIndex,
674
+ areAllOptionsSelected: _this2.areAllOptionsSelected(),
687
675
  customOptionText: customOptionText,
688
676
  "data-test-subj": optionsListDataTestSubj,
689
677
  fullWidth: fullWidth,
690
678
  isCaseSensitive: isCaseSensitive,
691
679
  isLoading: isLoading,
692
- listRef: _this3.listRefCallback,
680
+ listRef: _this2.listRefCallback,
693
681
  matchingOptions: matchingOptions,
694
- onCloseList: _this3.closeList,
682
+ onCloseList: _this2.closeList,
695
683
  onCreateOption: onCreateOption,
696
- onOptionClick: _this3.onOptionClick,
697
- onOptionEnterKey: _this3.onOptionEnterKey,
698
- onScroll: _this3.onOptionListScroll,
699
- optionRef: _this3.optionRefCallback,
684
+ onOptionClick: _this2.onOptionClick,
685
+ onOptionEnterKey: _this2.onOptionEnterKey,
686
+ onScroll: _this2.onOptionListScroll,
687
+ optionRef: _this2.optionRefCallback,
700
688
  options: options,
701
689
  position: listPosition,
702
690
  singleSelection: singleSelection,
703
691
  renderOption: renderOption,
704
- rootId: _this3.rootId,
692
+ rootId: _this2.rootId,
705
693
  rowHeight: rowHeight,
706
694
  scrollToIndex: activeOptionIndex,
707
695
  searchValue: searchValue,
708
696
  selectedOptions: selectedOptions,
709
- updatePosition: _this3.updatePosition,
697
+ updatePosition: _this2.updatePosition,
710
698
  width: width,
711
699
  delimiter: delimiter,
712
700
  getSelectedOptionForSearchValue: getSelectedOptionForSearchValue,
@@ -730,7 +718,6 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
730
718
  onBlur: this.onContainerBlur,
731
719
  ref: this.comboBoxRefCallback
732
720
  }), ___EmotionJSX(EuiComboBoxInput, {
733
- autoSizeInputRef: this.autoSizeInputRefCallback,
734
721
  compressed: compressed,
735
722
  focusedOptionId: this.hasActiveOption() ? this.rootId("_option-".concat(this.state.activeOptionIndex)) : undefined,
736
723
  fullWidth: fullWidth,