@elastic/eui 90.0.0 → 90.0.1

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 (84) hide show
  1. package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
  2. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  3. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
  4. package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
  5. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
  6. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
  7. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +67 -81
  8. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +1 -19
  9. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -102
  10. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  11. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +11 -90
  12. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
  13. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
  14. package/es/components/combo_box/combo_box.js +1 -1
  15. package/es/components/selectable/selectable.js +16 -1
  16. package/es/components/selectable/selectable_list/selectable_list.js +227 -78
  17. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
  18. package/es/components/text_truncate/text_truncate.js +33 -10
  19. package/eui.d.ts +381 -68
  20. package/i18ntokens.json +38 -38
  21. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
  22. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  23. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
  24. package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
  25. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
  26. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
  27. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +66 -80
  28. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
  29. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -104
  30. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  31. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +10 -89
  32. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
  33. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
  34. package/lib/components/combo_box/combo_box.js +1 -1
  35. package/lib/components/selectable/selectable.js +16 -1
  36. package/lib/components/selectable/selectable_list/selectable_list.js +227 -78
  37. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
  38. package/lib/components/text_truncate/text_truncate.js +32 -9
  39. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
  40. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  41. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
  42. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -3
  43. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +10 -5
  44. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +8 -36
  45. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +1 -19
  46. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -23
  47. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  48. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +10 -10
  49. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -5
  50. package/optimize/es/components/selectable/selectable_list/selectable_list.js +199 -76
  51. package/optimize/es/components/text_truncate/text_truncate.js +26 -9
  52. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
  53. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  54. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
  55. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -3
  56. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +10 -5
  57. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +8 -36
  58. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
  59. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -26
  60. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  61. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +9 -9
  62. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -5
  63. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +199 -76
  64. package/optimize/lib/components/text_truncate/text_truncate.js +25 -8
  65. package/package.json +1 -1
  66. package/test-env/components/auto_sizer/auto_sizer.js +10 -3
  67. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
  68. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  69. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +13 -9
  70. package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
  71. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
  72. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
  73. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +66 -80
  74. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
  75. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -105
  76. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  77. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +10 -89
  78. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
  79. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
  80. package/test-env/components/combo_box/combo_box.js +1 -1
  81. package/test-env/components/selectable/selectable.js +16 -1
  82. package/test-env/components/selectable/selectable_list/selectable_list.js +227 -78
  83. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
  84. package/test-env/components/text_truncate/text_truncate.js +32 -9
@@ -1,4 +1,4 @@
1
- var _excluded = ["items", "href", "linkProps", "title", "titleElement", "icon", "iconProps", "isSelected", "accordionProps"];
1
+ var _excluded = ["items", "title", "titleElement", "icon", "iconProps", "isSelected"];
2
2
  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); }
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  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."); }
@@ -19,22 +19,19 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
19
19
  import React, { useState, useCallback } from 'react';
20
20
  import PropTypes from "prop-types";
21
21
  import { useEuiTheme } from '../../../../services';
22
- import { EuiLink } from '../../../link';
23
22
  import { EuiPopover, EuiPopoverTitle } from '../../../popover';
24
23
  import { EuiCollapsibleNavSubItem } from '../collapsible_nav_item';
25
24
  import { EuiCollapsedNavButton } from './collapsed_nav_button';
26
- import { euiCollapsedNavPopoverStyles, euiCollapsedNavPopoverTitleStyles } from './collapsed_nav_popover.styles';
25
+ import { euiCollapsedNavPopoverStyles } from './collapsed_nav_popover.styles';
27
26
  import { jsx as ___EmotionJSX } from "@emotion/react";
28
27
  export var EuiCollapsedNavPopover = function EuiCollapsedNavPopover(_ref) {
29
28
  var items = _ref.items,
30
- href = _ref.href,
31
- linkProps = _ref.linkProps,
32
29
  title = _ref.title,
33
- titleElement = _ref.titleElement,
30
+ _ref$titleElement = _ref.titleElement,
31
+ TitleElement = _ref$titleElement === void 0 ? 'span' : _ref$titleElement,
34
32
  icon = _ref.icon,
35
33
  iconProps = _ref.iconProps,
36
34
  isSelected = _ref.isSelected,
37
- accordionProps = _ref.accordionProps,
38
35
  rest = _objectWithoutProperties(_ref, _excluded);
39
36
  var euiTheme = useEuiTheme();
40
37
  var styles = euiCollapsedNavPopoverStyles(euiTheme);
@@ -66,14 +63,11 @@ export var EuiCollapsedNavPopover = function EuiCollapsedNavPopover(_ref) {
66
63
  isSelected: isSelected,
67
64
  onClick: togglePopover,
68
65
  hideToolTip: isPopoverOpen
69
- // Note: do not pass `linkProps` to buttons that toggle popovers
70
66
  })
71
- }, rest), ___EmotionJSX(EuiCollapsedNavPopoverTitle, {
72
- title: title,
73
- titleElement: titleElement,
74
- href: href,
75
- linkProps: linkProps
76
- }), ___EmotionJSX("div", {
67
+ }, rest), ___EmotionJSX(EuiPopoverTitle, null, ___EmotionJSX(TitleElement, {
68
+ css: styles.euiCollapsedNavPopover__title,
69
+ className: "eui-textTruncate"
70
+ }, title)), ___EmotionJSX("div", {
77
71
  css: styles.euiCollapsedNavPopover__items
78
72
  }, items.map(function (item, index) {
79
73
  return ___EmotionJSX(EuiCollapsibleNavSubItem, _extends({
@@ -82,6 +76,15 @@ export var EuiCollapsedNavPopover = function EuiCollapsedNavPopover(_ref) {
82
76
  })));
83
77
  };
84
78
  EuiCollapsedNavPopover.propTypes = {
79
+ className: PropTypes.string,
80
+ "aria-label": PropTypes.string,
81
+ "data-test-subj": PropTypes.string,
82
+ css: PropTypes.any,
83
+ /**
84
+ * Highlights whether an item is currently selected, e.g.
85
+ * if the user is on the same page as the nav link
86
+ */
87
+ isSelected: PropTypes.bool,
85
88
  /**
86
89
  * Required text to render as the nav item title
87
90
  */
@@ -97,23 +100,22 @@ EuiCollapsedNavPopover.propTypes = {
97
100
  * Optional props to pass to the title icon
98
101
  */
99
102
  iconProps: PropTypes.any,
100
- className: PropTypes.string,
101
- "aria-label": PropTypes.string,
102
- "data-test-subj": PropTypes.string,
103
- css: PropTypes.any,
104
103
  /**
105
- * The nav item link.
106
- * If not included, and no `onClick` is specified, the nav item
107
- * will render as an non-interactive `<span>`.
108
- */
109
- href: PropTypes.string,
110
- /**
111
- * Will render either an accordion or group of nested child item links.
112
- *
113
- * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
114
- * subitem content, pass an object with a `renderItem` callback.
115
- */
116
- items: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({
104
+ * Will render either an accordion or group of nested child item links.
105
+ *
106
+ * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
107
+ * subitem content, pass an object with a `renderItem` callback.
108
+ */
109
+ items: PropTypes.arrayOf(PropTypes.shape({
110
+ className: PropTypes.string,
111
+ "aria-label": PropTypes.string,
112
+ "data-test-subj": PropTypes.string,
113
+ css: PropTypes.any,
114
+ /**
115
+ * Highlights whether an item is currently selected, e.g.
116
+ * if the user is on the same page as the nav link
117
+ */
118
+ isSelected: PropTypes.bool,
117
119
  /**
118
120
  * Required text to render as the nav item title
119
121
  */
@@ -132,56 +134,40 @@ EuiCollapsedNavPopover.propTypes = {
132
134
  * Optional props to pass to the title icon
133
135
  */
134
136
  iconProps: PropTypes.any,
137
+ /**
138
+ * The nav item link.
139
+ *
140
+ * If not included, and no `onClick` is specified, the nav item
141
+ * will render as an non-interactive `<span>`.
142
+ *
143
+ * Should not be used together with `items`, as the title will
144
+ * trigger the accordion collapse/expand action instead of a link.
145
+ */
146
+ href: PropTypes.string,
147
+ /**
148
+ * If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
149
+ */
150
+ linkProps: PropTypes.any,
151
+ /**
152
+ * Will render either an accordion or group of nested child item links.
153
+ *
154
+ * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
155
+ * subitem content, pass an object with a `renderItem` callback.
156
+ */
157
+ items: PropTypes.arrayOf(PropTypes.any.isRequired),
158
+ /**
159
+ * If set to false, will (visually) render an always-open accordion that cannot
160
+ * be toggled closed. Ignored if `items` is not passed.
161
+ *
162
+ * @default true
163
+ */
164
+ isCollapsible: PropTypes.bool,
165
+ /**
166
+ * If `items` is specified, and `isCollapsible` is not set to false, you may
167
+ * use this prop to pass any prop that `EuiAccordion` accepts, including props
168
+ * that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
169
+ */
170
+ accordionProps: PropTypes.any,
135
171
  renderItem: PropTypes.func
136
- }).isRequired), PropTypes.arrayOf(PropTypes.shape({
137
- title: PropTypes.string,
138
- titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
139
- 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", "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.string.isRequired, PropTypes.elementType.isRequired]),
140
- iconProps: PropTypes.any,
141
- renderItem: PropTypes.func
142
- }).isRequired).isRequired]),
143
- /**
144
- * If set to false, will (visually) render an always-open accordion that cannot
145
- * be toggled closed. Ignored if `items` is not passed.
146
- *
147
- * @default true
148
- */
149
- isCollapsible: PropTypes.bool,
150
- /**
151
- * If `items` is specified, and `isCollapsible` is not set to false, you may
152
- * use this prop to pass any prop that `EuiAccordion` accepts, including props
153
- * that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
154
- */
155
- accordionProps: PropTypes.any,
156
- /**
157
- * If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
158
- */
159
- linkProps: PropTypes.any,
160
- /**
161
- * Highlights whether an item is currently selected, e.g.
162
- * if the user is on the same page as the nav link
163
- */
164
- isSelected: PropTypes.bool
165
- };
166
- var EuiCollapsedNavPopoverTitle = function EuiCollapsedNavPopoverTitle(_ref2) {
167
- var title = _ref2.title,
168
- _ref2$titleElement = _ref2.titleElement,
169
- TitleElement = _ref2$titleElement === void 0 ? 'span' : _ref2$titleElement,
170
- href = _ref2.href,
171
- linkProps = _ref2.linkProps;
172
- var euiTheme = useEuiTheme();
173
- var styles = euiCollapsedNavPopoverTitleStyles(euiTheme);
174
- var cssStyles = [styles.euiCollapsedNavPopover__title, href ? styles.link : styles.span, href && (linkProps === null || linkProps === void 0 ? void 0 : linkProps.css)];
175
- return ___EmotionJSX(EuiPopoverTitle, null, href ? ___EmotionJSX(EuiLink, _extends({
176
- href: href,
177
- color: "text"
178
- }, linkProps, {
179
- // ExclusiveUnion shenanigans :|
180
- css: cssStyles
181
- }), ___EmotionJSX(TitleElement, {
182
- className: "eui-textTruncate"
183
- }, title)) : ___EmotionJSX(TitleElement, {
184
- css: cssStyles,
185
- className: "eui-textTruncate"
186
- }, title));
172
+ }).isRequired)
187
173
  };
@@ -1,4 +1,3 @@
1
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
2
1
  /*
3
2
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
3
  * or more contributor license agreements. Licensed under the Elastic License
@@ -9,30 +8,13 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
9
8
 
10
9
  import { css } from '@emotion/react';
11
10
  import { logicalCSS, mathWithUnits, euiYScrollWithShadows } from '../../../../global_styling';
12
- import { euiCollapsibleNavItemVariables } from '../collapsible_nav_item.styles';
13
11
  export var euiCollapsedNavPopoverStyles = function euiCollapsedNavPopoverStyles(euiThemeContext) {
14
12
  var euiTheme = euiThemeContext.euiTheme;
15
13
  return {
16
14
  euiCollapsedNavPopover__panel: /*#__PURE__*/css(logicalCSS('width', mathWithUnits(euiTheme.size.base, function (x) {
17
15
  return x * 15;
18
16
  })), ";;label:euiCollapsedNavPopover__panel;"),
17
+ euiCollapsedNavPopover__title: /*#__PURE__*/css("display:block;padding:", euiTheme.size.m, ";font-weight:", euiTheme.font.weight.bold, ";;label:euiCollapsedNavPopover__title;"),
19
18
  euiCollapsedNavPopover__items: /*#__PURE__*/css(euiYScrollWithShadows(euiThemeContext), " padding-block:", euiTheme.size.s, ";padding-inline:", euiTheme.size.xs, ";", logicalCSS('max-height', '50vh'), "@media (max-height: ", euiTheme.breakpoint.s, "px){", logicalCSS('max-height', '75vh'), ";};label:euiCollapsedNavPopover__items;")
20
19
  };
21
- };
22
- var _ref = process.env.NODE_ENV === "production" ? {
23
- name: "1423k63-span",
24
- styles: "display:block;label:span;"
25
- } : {
26
- name: "1423k63-span",
27
- styles: "display:block;label:span;",
28
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
29
- };
30
- export var euiCollapsedNavPopoverTitleStyles = function euiCollapsedNavPopoverTitleStyles(euiThemeContext) {
31
- var euiTheme = euiThemeContext.euiTheme;
32
- var sharedStyles = euiCollapsibleNavItemVariables(euiThemeContext);
33
- return {
34
- euiCollapsedNavPopover__title: /*#__PURE__*/css("padding:", euiTheme.size.m, ";font-weight:", euiTheme.font.weight.bold, ";;label:euiCollapsedNavPopover__title;"),
35
- link: /*#__PURE__*/css("display:flex;align-items:center;[class*='euiLink__externalIcon']{", logicalCSS('margin-left', 'auto'), " ", logicalCSS('margin-right', euiTheme.size.xxs), " color:", sharedStyles.rightIconColor, ";};label:link;"),
36
- span: _ref
37
- };
38
20
  };
@@ -1,11 +1,11 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["id", "className", "items", "href", "isSubItem", "isSelected", "linkProps", "accordionProps", "buttonContent", "children"];
2
+ var _excluded = ["id", "className", "items", "isSubItem", "isSelected", "accordionProps", "buttonContent", "children"];
3
+ 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); }
3
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- 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); }
9
9
  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; }
10
10
  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; }
11
11
  /*
@@ -16,7 +16,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  * Side Public License, v 1.
17
17
  */
18
18
 
19
- import React, { useCallback } from 'react';
19
+ import React from 'react';
20
20
  import PropTypes from "prop-types";
21
21
  import classNames from 'classnames';
22
22
  import { useEuiTheme, useGeneratedHtmlId } from '../../../services';
@@ -37,10 +37,8 @@ export var EuiCollapsibleNavAccordion = function EuiCollapsibleNavAccordion(_ref
37
37
  var id = _ref.id,
38
38
  className = _ref.className,
39
39
  items = _ref.items,
40
- href = _ref.href,
41
40
  isSubItem = _ref.isSubItem,
42
41
  isSelected = _ref.isSelected,
43
- linkProps = _ref.linkProps,
44
42
  accordionProps = _ref.accordionProps,
45
43
  buttonContent = _ref.buttonContent,
46
44
  _children = _ref.children,
@@ -52,30 +50,15 @@ export var EuiCollapsibleNavAccordion = function EuiCollapsibleNavAccordion(_ref
52
50
  var euiTheme = useEuiTheme();
53
51
  var styles = euiCollapsibleNavAccordionStyles(euiTheme);
54
52
  var cssStyles = [styles.euiCollapsibleNavAccordion, isSubItem ? styles.isSubItem : styles.isTopItem, isSelected && styles.isSelected, accordionProps === null || accordionProps === void 0 ? void 0 : accordionProps.css];
55
- var isTitleInteractive = !!(href || linkProps !== null && linkProps !== void 0 && linkProps.onClick);
56
-
57
- // Stop propagation on the title so that the accordion toggle doesn't occur on click
58
- // (should only occur on accordion arrow click for UX consistency)
59
- var stopPropagationClick = useCallback(function (e) {
60
- var _linkProps$onClick;
61
- e.stopPropagation();
62
- linkProps === null || linkProps === void 0 ? void 0 : (_linkProps$onClick = linkProps.onClick) === null || _linkProps$onClick === void 0 ? void 0 : _linkProps$onClick.call(linkProps, e);
63
- }, [linkProps === null || linkProps === void 0 ? void 0 : linkProps.onClick] // eslint-disable-line react-hooks/exhaustive-deps
64
- );
65
-
66
53
  return ___EmotionJSX(EuiAccordion, _extends({
67
54
  id: groupID,
68
55
  className: classes,
69
56
  initialIsOpen: isSelected,
70
- buttonElement: "div",
71
- buttonContent: ___EmotionJSX(EuiCollapsibleNavLink, _extends({
72
- href: href
73
- }, linkProps, {
57
+ buttonContent: ___EmotionJSX(EuiCollapsibleNavLink, {
74
58
  isSelected: isSelected,
75
59
  isSubItem: isSubItem,
76
- onClick: stopPropagationClick,
77
- isInteractive: isTitleInteractive
78
- }), buttonContent),
60
+ isInteractive: false
61
+ }, buttonContent),
79
62
  arrowDisplay: "right"
80
63
  }, rest, accordionProps, {
81
64
  css: cssStyles,
@@ -95,22 +78,6 @@ EuiCollapsibleNavAccordion.propTypes = {
95
78
  "aria-label": PropTypes.string,
96
79
  "data-test-subj": PropTypes.string,
97
80
  css: PropTypes.any,
98
- /**
99
- * The nav item link.
100
- * If not included, and no `onClick` is specified, the nav item
101
- * will render as an non-interactive `<span>`.
102
- */
103
- href: PropTypes.string,
104
- /**
105
- * If `items` is specified, and `isCollapsible` is not set to false, you may
106
- * use this prop to pass any prop that `EuiAccordion` accepts, including props
107
- * that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
108
- */
109
- accordionProps: PropTypes.any,
110
- /**
111
- * If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
112
- */
113
- linkProps: PropTypes.any,
114
81
  /**
115
82
  * Highlights whether an item is currently selected, e.g.
116
83
  * if the user is on the same page as the nav link
@@ -121,67 +88,5 @@ EuiCollapsibleNavAccordion.propTypes = {
121
88
  * or a nested nav subitem. Set internally by EUI
122
89
  */
123
90
  isSubItem: PropTypes.bool,
124
- buttonContent: PropTypes.node.isRequired,
125
- items: PropTypes.arrayOf(PropTypes.shape({
126
- /**
127
- * Required text to render as the nav item title
128
- */
129
- title: PropTypes.string,
130
- /**
131
- * Allows customizing the title element.
132
- * Consider using a heading element for better accessibility.
133
- * Defaults to an unsemantic `span` or `div`, depending on context.
134
- */
135
- titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
136
- /**
137
- * Optional icon to render to the left of title content
138
- */
139
- 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", "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.string.isRequired, PropTypes.elementType.isRequired]),
140
- /**
141
- * Optional props to pass to the title icon
142
- */
143
- iconProps: PropTypes.any,
144
- className: PropTypes.string,
145
- "aria-label": PropTypes.string,
146
- "data-test-subj": PropTypes.string,
147
- css: PropTypes.any,
148
- /**
149
- * The nav item link.
150
- * If not included, and no `onClick` is specified, the nav item
151
- * will render as an non-interactive `<span>`.
152
- */
153
- href: PropTypes.string,
154
- /**
155
- * Will render either an accordion or group of nested child item links.
156
- *
157
- * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
158
- * subitem content, pass an object with a `renderItem` callback.
159
- */
160
- items: PropTypes.arrayOf(PropTypes.shape({
161
- renderItem: PropTypes.func
162
- }).isRequired),
163
- /**
164
- * If set to false, will (visually) render an always-open accordion that cannot
165
- * be toggled closed. Ignored if `items` is not passed.
166
- *
167
- * @default true
168
- */
169
- isCollapsible: PropTypes.bool,
170
- /**
171
- * If `items` is specified, and `isCollapsible` is not set to false, you may
172
- * use this prop to pass any prop that `EuiAccordion` accepts, including props
173
- * that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
174
- */
175
- accordionProps: PropTypes.any,
176
- /**
177
- * If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
178
- */
179
- linkProps: PropTypes.any,
180
- /**
181
- * Highlights whether an item is currently selected, e.g.
182
- * if the user is on the same page as the nav link
183
- */
184
- isSelected: PropTypes.bool,
185
- renderItem: PropTypes.func
186
- }).isRequired).isRequired
91
+ buttonContent: PropTypes.node.isRequired
187
92
  };
@@ -15,11 +15,11 @@ export var euiCollapsibleNavAccordionStyles = function euiCollapsibleNavAccordio
15
15
  return {
16
16
  // NOTE: Specific usage of `>`s selectors are important here, because accordions can be nested
17
17
  // - just because a parent accordion is open or selected does not mean its child accordion is the same
18
- euiCollapsibleNavAccordion: /*#__PURE__*/css(".euiAccordion__button{overflow:hidden;&:hover,&:focus{cursor:default;text-decoration:none;}}.euiAccordion__triggerWrapper{border-radius:", sharedStyles.borderRadius, ";", euiCanAnimate, "{transition:background-color ", sharedStyles.animation, ";}}.euiAccordion__buttonContent{", logicalCSS('max-width', '100%'), " flex-basis:100%;display:flex;align-items:center;}.euiCollapsibleNavLink{", logicalCSS('width', '100%'), ";};label:euiCollapsibleNavAccordion;"),
19
- isTopItem: /*#__PURE__*/css("margin:", sharedStyles.padding, ";&>.euiAccordion__triggerWrapper{&:hover{background-color:", sharedStyles.backgroundHoverColor, ";}};label:isTopItem;"),
20
- isSelected: /*#__PURE__*/css("&>.euiAccordion__triggerWrapper{background-color:", sharedStyles.backgroundSelectedColor, ";&:hover{background-color:", sharedStyles.backgroundSelectedColor, ";}};label:isSelected;"),
18
+ euiCollapsibleNavAccordion: /*#__PURE__*/css(".euiAccordion__button{overflow:hidden;}&>.euiAccordion__triggerWrapper{border-radius:", sharedStyles.borderRadius, ";overflow:hidden;", euiCanAnimate, "{transition:background-color ", sharedStyles.animation, ";}&:hover,&:focus-within{background-color:", sharedStyles.backgroundHoverColor, ";.euiAccordion__arrow .euiIcon{color:", sharedStyles.color, ";}}&:has(:focus-visible){outline-style:auto;outline-offset:-", euiTheme.focus.width, ";*:focus{outline:none;}}}.euiAccordion__buttonContent{", logicalCSS('max-width', '100%'), " flex-basis:100%;display:flex;align-items:center;}.euiCollapsibleNavLink{", logicalCSS('width', '100%'), ";};label:euiCollapsibleNavAccordion;"),
19
+ isSelected: /*#__PURE__*/css("&>.euiAccordion__triggerWrapper{background-color:", sharedStyles.backgroundSelectedColor, ";&:hover,&:focus-within{background-color:", sharedStyles.backgroundSelectedColor, ";}};label:isSelected;"),
20
+ isTopItem: /*#__PURE__*/css("margin:", sharedStyles.padding, ";;label:isTopItem;"),
21
21
  isSubItem: /*#__PURE__*/css("&.euiAccordion-isOpen .euiAccordion__children::after{content:'';display:block;", logicalCSS('height', 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;")
23
+ euiCollapsibleNavAccordion__arrow: /*#__PURE__*/css("margin:0;", logicalCSS('height', sharedStyles.height), logicalCSS('width', euiTheme.size.xl), "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);}&:hover,&:focus{background-color:transparent;};label:euiCollapsibleNavAccordion__arrow;")
24
24
  };
25
25
  };
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "header", "href", "items", "isSubItem", "isSelected", "linkProps", "children"];
1
+ var _excluded = ["className", "header", "items", "isSubItem", "isSelected", "children"];
2
2
  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); }
3
3
  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; }
4
4
  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; }
@@ -13,7 +13,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
13
13
  import React from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
- import { useEuiTheme } from '../../../services';
16
+ import { useEuiTheme, useGeneratedHtmlId } from '../../../services';
17
17
  import { EuiCollapsibleNavSubItems } from './collapsible_nav_item';
18
18
  import { euiCollapsibleNavItemVariables } from './collapsible_nav_item.styles';
19
19
  import { EuiCollapsibleNavLink } from './collapsible_nav_link';
@@ -29,11 +29,9 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
29
29
  export var EuiCollapsibleNavGroup = function EuiCollapsibleNavGroup(_ref) {
30
30
  var className = _ref.className,
31
31
  header = _ref.header,
32
- href = _ref.href,
33
32
  items = _ref.items,
34
33
  isSubItem = _ref.isSubItem,
35
34
  isSelected = _ref.isSelected,
36
- linkProps = _ref.linkProps,
37
35
  _children = _ref.children,
38
36
  rest = _objectWithoutProperties(_ref, _excluded);
39
37
  var classes = classNames('euiCollapsibleNavGroup', className);
@@ -46,18 +44,20 @@ export var EuiCollapsibleNavGroup = function EuiCollapsibleNavGroup(_ref) {
46
44
  }
47
45
  } : undefined; // Prevents Emotion from generating a selector if no styles need to be applied
48
46
 
47
+ var labelledById = useGeneratedHtmlId();
49
48
  return ___EmotionJSX("div", _extends({
50
49
  className: classes
51
- }, cssStyles, rest), ___EmotionJSX(EuiCollapsibleNavLink, _extends({
52
- href: href
53
- }, linkProps, {
50
+ }, cssStyles, rest), ___EmotionJSX(EuiCollapsibleNavLink, {
51
+ id: labelledById,
54
52
  isSelected: isSelected,
55
53
  isSubItem: isSubItem,
56
- isInteractive: !!(href || rest.onClick || linkProps !== null && linkProps !== void 0 && linkProps.onClick)
57
- }), header), ___EmotionJSX(EuiCollapsibleNavSubItems, {
54
+ isInteractive: false
55
+ }, header), ___EmotionJSX(EuiCollapsibleNavSubItems, {
58
56
  items: items,
59
57
  isSubItem: isSubItem,
60
- className: "euiCollapsibleNavGroup__children"
58
+ className: "euiCollapsibleNavGroup__children",
59
+ role: "group",
60
+ "aria-labelledby": labelledById
61
61
  }));
62
62
  };
63
63
  EuiCollapsibleNavGroup.propTypes = {
@@ -65,23 +65,6 @@ EuiCollapsibleNavGroup.propTypes = {
65
65
  "aria-label": PropTypes.string,
66
66
  "data-test-subj": PropTypes.string,
67
67
  css: PropTypes.any,
68
- /**
69
- * The nav item link.
70
- * If not included, and no `onClick` is specified, the nav item
71
- * will render as an non-interactive `<span>`.
72
- */
73
- href: PropTypes.string,
74
- /**
75
- * If set to false, will (visually) render an always-open accordion that cannot
76
- * be toggled closed. Ignored if `items` is not passed.
77
- *
78
- * @default true
79
- */
80
- isCollapsible: PropTypes.bool,
81
- /**
82
- * If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
83
- */
84
- linkProps: PropTypes.any,
85
68
  /**
86
69
  * Highlights whether an item is currently selected, e.g.
87
70
  * if the user is on the same page as the nav link
@@ -92,67 +75,5 @@ EuiCollapsibleNavGroup.propTypes = {
92
75
  * or a nested nav subitem. Set internally by EUI
93
76
  */
94
77
  isSubItem: PropTypes.bool,
95
- header: PropTypes.node.isRequired,
96
- items: PropTypes.arrayOf(PropTypes.shape({
97
- /**
98
- * Required text to render as the nav item title
99
- */
100
- title: PropTypes.string,
101
- /**
102
- * Allows customizing the title element.
103
- * Consider using a heading element for better accessibility.
104
- * Defaults to an unsemantic `span` or `div`, depending on context.
105
- */
106
- titleElement: PropTypes.oneOf(["h2", "h3", "h4", "h5", "h6", "span", "div"]),
107
- /**
108
- * Optional icon to render to the left of title content
109
- */
110
- 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", "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.string.isRequired, PropTypes.elementType.isRequired]),
111
- /**
112
- * Optional props to pass to the title icon
113
- */
114
- iconProps: PropTypes.any,
115
- className: PropTypes.string,
116
- "aria-label": PropTypes.string,
117
- "data-test-subj": PropTypes.string,
118
- css: PropTypes.any,
119
- /**
120
- * The nav item link.
121
- * If not included, and no `onClick` is specified, the nav item
122
- * will render as an non-interactive `<span>`.
123
- */
124
- href: PropTypes.string,
125
- /**
126
- * Will render either an accordion or group of nested child item links.
127
- *
128
- * Accepts any #EuiCollapsibleNavItemProps. Or, to render completely custom
129
- * subitem content, pass an object with a `renderItem` callback.
130
- */
131
- items: PropTypes.arrayOf(PropTypes.shape({
132
- renderItem: PropTypes.func
133
- }).isRequired),
134
- /**
135
- * If set to false, will (visually) render an always-open accordion that cannot
136
- * be toggled closed. Ignored if `items` is not passed.
137
- *
138
- * @default true
139
- */
140
- isCollapsible: PropTypes.bool,
141
- /**
142
- * If `items` is specified, and `isCollapsible` is not set to false, you may
143
- * use this prop to pass any prop that `EuiAccordion` accepts, including props
144
- * that control the toggled state of the accordion (e.g. `initialIsOpen`, `forceState`)
145
- */
146
- accordionProps: PropTypes.any,
147
- /**
148
- * If a `href` is specified, use this prop to pass any prop that `EuiLink` accepts
149
- */
150
- linkProps: PropTypes.any,
151
- /**
152
- * Highlights whether an item is currently selected, e.g.
153
- * if the user is on the same page as the nav link
154
- */
155
- isSelected: PropTypes.bool,
156
- renderItem: PropTypes.func
157
- }).isRequired).isRequired
78
+ header: PropTypes.node.isRequired
158
79
  };