@splunk/react-ui 4.37.0 → 4.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/Accordion.js +131 -153
  2. package/Anchor.js +50 -58
  3. package/Animation.js +64 -59
  4. package/AnimationToggle.js +59 -61
  5. package/Box.js +59 -67
  6. package/Breadcrumbs.js +113 -127
  7. package/Button.js +208 -219
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +50 -1
  11. package/Calendar.js +353 -414
  12. package/Card.js +183 -243
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +104 -122
  15. package/Clickable.js +180 -198
  16. package/CloseButton.js +52 -60
  17. package/Code.js +24 -31
  18. package/CollapsiblePanel.js +172 -202
  19. package/Color.js +1107 -980
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +267 -305
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +165 -194
  24. package/Date.js +116 -131
  25. package/DefinitionList.js +125 -149
  26. package/Divider.js +81 -79
  27. package/Dropdown.js +226 -237
  28. package/DualListbox.js +150 -186
  29. package/EventListener.js +4 -1
  30. package/File.js +1032 -955
  31. package/FormRows.js +281 -334
  32. package/Heading.js +27 -35
  33. package/Image.js +101 -116
  34. package/JSONTree.js +301 -344
  35. package/Layer.js +118 -126
  36. package/Link.js +141 -159
  37. package/List.js +61 -77
  38. package/MIGRATION.mdx +92 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +512 -530
  41. package/Message.js +173 -196
  42. package/MessageBar.js +58 -66
  43. package/Modal.js +241 -290
  44. package/ModalLayer.js +130 -148
  45. package/Monogram.js +138 -138
  46. package/Multiselect.js +1600 -1923
  47. package/Number.js +159 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +448 -441
  51. package/Progress.js +65 -75
  52. package/RadioBar.js +301 -303
  53. package/RadioList.js +77 -119
  54. package/Resize.js +105 -127
  55. package/ResultsMenu.js +373 -385
  56. package/ScreenReaderContent.js +130 -94
  57. package/Scroll.js +209 -244
  58. package/Search.js +375 -384
  59. package/Select.js +1076 -1354
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +192 -222
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.js +222 -245
  64. package/StaticContent.js +68 -76
  65. package/StepBar.js +206 -205
  66. package/Switch.js +211 -236
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +401 -512
  71. package/TextArea.js +411 -441
  72. package/Tooltip.js +116 -132
  73. package/TransitionOpen.js +160 -178
  74. package/Tree.js +268 -287
  75. package/Typography.js +48 -52
  76. package/WaitSpinner.js +60 -68
  77. package/cypress/support/commands.ts +9 -0
  78. package/cypress/support/index.d.ts +6 -0
  79. package/cypress/tsconfig.cypress.json +1 -0
  80. package/docker-compose.yml +0 -1
  81. package/package.json +17 -17
  82. package/types/src/Button/Button.d.ts +20 -6
  83. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  85. package/types/src/Color/Color.d.ts +5 -2
  86. package/types/src/Color/Palette.d.ts +6 -2
  87. package/types/src/ComboBox/Option.d.ts +1 -1
  88. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  89. package/types/src/Date/Date.d.ts +2 -3
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Link/Link.d.ts +3 -4
  93. package/types/src/Menu/Item.d.ts +24 -8
  94. package/types/src/Menu/Menu.d.ts +3 -3
  95. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  96. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  97. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  98. package/types/src/Multiselect/Option.d.ts +2 -0
  99. package/types/src/Number/Number.d.ts +3 -3
  100. package/types/src/Popover/Popover.d.ts +3 -4
  101. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  102. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  103. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  104. package/types/src/Search/Option.d.ts +16 -3
  105. package/types/src/Select/Option.d.ts +3 -1
  106. package/types/src/Select/OptionBase.d.ts +7 -5
  107. package/types/src/Select/Select.d.ts +2 -2
  108. package/types/src/Select/SelectAllOption.d.ts +4 -4
  109. package/types/src/Select/SelectBase.d.ts +0 -1
  110. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  111. package/types/src/Slider/Slider.d.ts +2 -3
  112. package/types/src/Slider/docs/examples/Error.d.ts +2 -0
  113. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  114. package/types/src/StepBar/Step.d.ts +1 -2
  115. package/types/src/TabBar/Tab.d.ts +1 -1
  116. package/types/src/TabBar/TabBar.d.ts +3 -1
  117. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  118. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  119. package/types/src/Table/Table.d.ts +0 -1
  120. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  121. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  122. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  123. package/types/src/Text/Text.d.ts +6 -4
  124. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
  125. package/types/src/TextArea/TextArea.d.ts +2 -2
  126. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  127. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  128. package/useForceUpdate.js +30 -32
  129. package/useKeyPress.js +1 -1
  130. package/types/src/Button/docs/examples/Selected.d.ts +0 -2
  131. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  132. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  133. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  134. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  135. package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
  136. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  137. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  138. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  139. /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
  140. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  141. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  142. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Menu.js CHANGED
@@ -62,20 +62,20 @@
62
62
  // EXPORTS
63
63
  e.d(t, {
64
64
  Divider: () => /* reexport */ w,
65
- Heading: () => /* reexport */ F,
66
- Item: () => /* reexport */ Ke,
67
- MenuContext: () => /* reexport */ y,
68
- default: () => /* reexport */ nt
65
+ Heading: () => /* reexport */ M,
66
+ Item: () => /* reexport */ Ye,
67
+ MenuContext: () => /* reexport */ h,
68
+ default: () => /* reexport */ pt
69
69
  });
70
70
  // CONCATENATED MODULE: external "react"
71
71
  const r = require("react");
72
72
  var n = e.n(r);
73
73
  // CONCATENATED MODULE: external "prop-types"
74
74
  const i = require("prop-types");
75
- var a = e.n(i);
75
+ var o = e.n(i);
76
76
  // CONCATENATED MODULE: external "lodash/omit"
77
- const o = require("lodash/omit");
78
- var l = e.n(o);
77
+ const a = require("lodash/omit");
78
+ var l = e.n(a);
79
79
  // CONCATENATED MODULE: external "@splunk/react-ui/Popover"
80
80
  const s = require("@splunk/react-ui/Popover");
81
81
  // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
@@ -84,42 +84,39 @@
84
84
  const p = require("@splunk/ui-utils/focus");
85
85
  // CONCATENATED MODULE: external "styled-components"
86
86
  const u = require("styled-components");
87
- var f = e.n(u);
87
+ var d = e.n(u);
88
88
  // CONCATENATED MODULE: external "@splunk/react-ui/Divider"
89
- const d = require("@splunk/react-ui/Divider");
90
- var v = e.n(d);
89
+ const f = require("@splunk/react-ui/Divider");
90
+ var v = e.n(f);
91
91
  // CONCATENATED MODULE: external "@splunk/themes"
92
- const b = require("@splunk/themes");
92
+ const m = require("@splunk/themes");
93
93
  // CONCATENATED MODULE: ./src/Menu/DividerStyles.ts
94
- var m = f()(v()).withConfig({
94
+ var b = d()(v()).withConfig({
95
95
  displayName: "DividerStyles__Styled",
96
96
  componentId: "l3zfh3-0"
97
- })([ "", "" ], (0, b.pick)({
97
+ })([ "", "" ], (0, m.pick)({
98
98
  prisma: {
99
99
  comfortable: (0, u.css)([ "margin:8px 0;" ]),
100
100
  compact: (0, u.css)([ "margin:6px 0;" ])
101
101
  }
102
102
  }));
103
103
  // CONCATENATED MODULE: ./src/Menu/MenuContext.tsx
104
- var h = (0, r.createContext)({
104
+ var y = (0, r.createContext)({
105
105
  role: "menu",
106
106
  preventFocus: false
107
107
  });
108
- /* harmony default export */ const y = h;
108
+ /* harmony default export */ const h = y;
109
109
  // CONCATENATED MODULE: ./src/Menu/Divider.tsx
110
110
  function g() {
111
- g = Object.assign || function(e) {
111
+ return g = Object.assign ? Object.assign.bind() : function(e) {
112
112
  for (var t = 1; t < arguments.length; t++) {
113
113
  var r = arguments[t];
114
114
  for (var n in r) {
115
- if (Object.prototype.hasOwnProperty.call(r, n)) {
116
- e[n] = r[n];
117
- }
115
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
118
116
  }
119
117
  }
120
118
  return e;
121
- };
122
- return g.apply(this, arguments);
119
+ }, g.apply(null, arguments);
123
120
  }
124
121
  var k = {};
125
122
  /**
@@ -127,10 +124,10 @@
127
124
  */ function x(e) {
128
125
  var t = g({}, e);
129
126
  // @docs-props-type DividerPropsBase
130
- var i = (0, r.useContext)(y), a = i.role;
127
+ var i = (0, r.useContext)(h), o = i.role;
131
128
 
132
- return n().createElement(m, g({
133
- "aria-hidden": a === "listbox",
129
+ return n().createElement(b, g({
130
+ "aria-hidden": o === "listbox",
134
131
  "data-test": "divider",
135
132
  role: "separator"
136
133
  }, t));
@@ -146,226 +143,239 @@
146
143
  var O = e.n(S);
147
144
  // CONCATENATED MODULE: external "@splunk/themes/useSplunkTheme"
148
145
  const C = require("@splunk/themes/useSplunkTheme");
149
- var I = e.n(C);
146
+ var P = e.n(C);
150
147
  // CONCATENATED MODULE: ./src/Menu/HeadingStyles.ts
151
- var P = f().div.withConfig({
148
+ var E = d().div.withConfig({
152
149
  displayName: "HeadingStyles__Styled",
153
150
  componentId: "mcd2ws-0"
154
- })([ "", " border-top:1px solid transparent;", ";&:not(:first-child){", ";}" ], b.mixins.reset("block"), (0,
155
- b.pick)({
156
- enterprise: (0, u.css)([ "padding:", " ", " 6px;" ], b.variables.spacingXSmall, b.variables.spacingSmall),
151
+ })([ "", " border-top:1px solid transparent;", ";&:not(:first-child){", ";}" ], m.mixins.reset("block"), (0,
152
+ m.pick)({
153
+ enterprise: (0, u.css)([ "padding:", " ", " 6px;" ], m.variables.spacingXSmall, m.variables.spacingSmall),
157
154
  prisma: {
158
155
  comfortable: "padding: 13px 16px 10px 16px",
159
156
  compact: "padding: 9px 16px 6px 16px"
160
157
  }
161
- }), (0, b.pick)({
162
- enterprise: (0, u.css)([ "border-top:", ";" ], b.variables.border),
158
+ }), (0, m.pick)({
159
+ enterprise: (0, u.css)([ "border-top:", ";" ], m.variables.border),
163
160
  prisma: {
164
- comfortable: (0, u.css)([ "border-top:1px solid ", ";margin-top:6px;padding-top:19px;" ], b.variables.neutral200),
165
- compact: (0, u.css)([ "border-top:1px solid ", ";margin-top:6px;padding-top:15px;" ], b.variables.neutral200)
161
+ comfortable: (0, u.css)([ "border-top:1px solid ", ";margin-top:6px;padding-top:19px;" ], m.variables.neutral200),
162
+ compact: (0, u.css)([ "border-top:1px solid ", ";margin-top:6px;padding-top:15px;" ], m.variables.neutral200)
166
163
  }
167
164
  }));
168
- var _ = f().h5.withConfig({
165
+ var I = d().h5.withConfig({
169
166
  displayName: "HeadingStyles__PrismaSectionTitle",
170
167
  componentId: "mcd2ws-1"
171
- })([ "", " font-size:", ";line-height:", ";font-weight:", ";letter-spacing:0.02em;" ], b.mixins.reset("block"), b.variables.fontSizeSmall, b.variables.lineHeight, b.variables.fontWeightBold);
168
+ })([ "", " font-size:", ";line-height:", ";font-weight:", ";letter-spacing:0.02em;" ], m.mixins.reset("block"), m.variables.fontSizeSmall, m.variables.lineHeight, m.variables.fontWeightBold);
172
169
  // CONCATENATED MODULE: ./src/Menu/Heading.tsx
173
- function j() {
174
- j = Object.assign || function(e) {
170
+ function j(e) {
171
+ "@babel/helpers - typeof";
172
+ return j = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
173
+ return typeof e;
174
+ } : function(e) {
175
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
176
+ }, j(e);
177
+ }
178
+ function _() {
179
+ return _ = Object.assign ? Object.assign.bind() : function(e) {
175
180
  for (var t = 1; t < arguments.length; t++) {
176
181
  var r = arguments[t];
177
182
  for (var n in r) {
178
- if (Object.prototype.hasOwnProperty.call(r, n)) {
179
- e[n] = r[n];
180
- }
183
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
181
184
  }
182
185
  }
183
186
  return e;
184
- };
185
- return j.apply(this, arguments);
187
+ }, _.apply(null, arguments);
186
188
  }
187
- function E(e, t) {
189
+ function T(e, t) {
188
190
  var r = Object.keys(e);
189
191
  if (Object.getOwnPropertySymbols) {
190
192
  var n = Object.getOwnPropertySymbols(e);
191
- if (t) n = n.filter((function(t) {
193
+ t && (n = n.filter((function(t) {
192
194
  return Object.getOwnPropertyDescriptor(e, t).enumerable;
193
- }));
194
- r.push.apply(r, n);
195
+ }))), r.push.apply(r, n);
195
196
  }
196
197
  return r;
197
198
  }
198
- function T(e) {
199
+ function D(e) {
199
200
  for (var t = 1; t < arguments.length; t++) {
200
- var r = arguments[t] != null ? arguments[t] : {};
201
- if (t % 2) {
202
- E(Object(r), true).forEach((function(t) {
203
- D(e, t, r[t]);
204
- }));
205
- } else if (Object.getOwnPropertyDescriptors) {
206
- Object.defineProperties(e, Object.getOwnPropertyDescriptors(r));
207
- } else {
208
- E(Object(r)).forEach((function(t) {
209
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
210
- }));
211
- }
201
+ var r = null != arguments[t] ? arguments[t] : {};
202
+ t % 2 ? T(Object(r), !0).forEach((function(t) {
203
+ q(e, t, r[t]);
204
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : T(Object(r)).forEach((function(t) {
205
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
206
+ }));
212
207
  }
213
208
  return e;
214
209
  }
215
- function D(e, t, r) {
216
- if (t in e) {
217
- Object.defineProperty(e, t, {
218
- value: r,
219
- enumerable: true,
220
- configurable: true,
221
- writable: true
222
- });
223
- } else {
224
- e[t] = r;
210
+ function q(e, t, r) {
211
+ return (t = N(t)) in e ? Object.defineProperty(e, t, {
212
+ value: r,
213
+ enumerable: !0,
214
+ configurable: !0,
215
+ writable: !0
216
+ }) : e[t] = r, e;
217
+ }
218
+ function N(e) {
219
+ var t = A(e, "string");
220
+ return "symbol" == j(t) ? t : t + "";
221
+ }
222
+ function A(e, t) {
223
+ if ("object" != j(e) || !e) return e;
224
+ var r = e[Symbol.toPrimitive];
225
+ if (void 0 !== r) {
226
+ var n = r.call(e, t || "default");
227
+ if ("object" != j(n)) return n;
228
+ throw new TypeError("@@toPrimitive must return a primitive value.");
225
229
  }
226
- return e;
230
+ return ("string" === t ? String : Number)(e);
227
231
  }
228
- function q(e, t) {
229
- if (e == null) return {};
230
- var r = R(e, t);
231
- var n, i;
232
+ function R(e, t) {
233
+ if (null == e) return {};
234
+ var r, n, i = F(e, t);
232
235
  if (Object.getOwnPropertySymbols) {
233
- var a = Object.getOwnPropertySymbols(e);
234
- for (i = 0; i < a.length; i++) {
235
- n = a[i];
236
- if (t.indexOf(n) >= 0) continue;
237
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
238
- r[n] = e[n];
236
+ var o = Object.getOwnPropertySymbols(e);
237
+ for (n = 0; n < o.length; n++) {
238
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (i[r] = e[r]);
239
239
  }
240
240
  }
241
- return r;
241
+ return i;
242
242
  }
243
- function R(e, t) {
244
- if (e == null) return {};
243
+ function F(e, t) {
244
+ if (null == e) return {};
245
245
  var r = {};
246
- var n = Object.keys(e);
247
- var i, a;
248
- for (a = 0; a < n.length; a++) {
249
- i = n[a];
250
- if (t.indexOf(i) >= 0) continue;
251
- r[i] = e[i];
246
+ for (var n in e) {
247
+ if ({}.hasOwnProperty.call(e, n)) {
248
+ if (t.includes(n)) continue;
249
+ r[n] = e[n];
250
+ }
252
251
  }
253
252
  return r;
254
253
  }
255
- var N = {
256
- children: a().node,
257
- title: a().bool,
258
- outerStyle: a().object
254
+ var H = {
255
+ children: o().node,
256
+ title: o().bool,
257
+ outerStyle: o().object
259
258
  };
260
259
  /**
261
260
  * A non-interactive `Menu` item used to separate and label groups of `Menu` items.
262
- */ function H(e) {
263
- var t = e.children, i = e.outerStyle, a = e.title, o = q(e, [ "children", "outerStyle", "title" ]);
264
- var l = (0, r.useContext)(y), s = l.role;
265
- var c = I()(), p = c.family;
261
+ */ function $(e) {
262
+ var t = e.children, i = e.outerStyle, o = e.title, a = R(e, [ "children", "outerStyle", "title" ]);
263
+ var l = (0, r.useContext)(h), s = l.role;
264
+ var c = P()(), p = c.family;
266
265
  var u = (0, r.useMemo)((function() {
267
- return T(T({}, i), {}, {
266
+ return D(D({}, i), {}, {
268
267
  margin: 0
269
268
  });
270
269
  }), [ i ]);
271
- var f = p === "prisma" ? n().createElement(_, j({
272
- as: a ? "h4" : "h5",
270
+ var d = p === "prisma" ? n().createElement(I, _({
271
+ as: o ? "h4" : "h5",
273
272
  "data-test": "heading",
274
273
  style: i
275
- }, o), t) : n().createElement(O(), j({
274
+ }, a), t) : n().createElement(O(), _({
276
275
  "data-test": "heading",
277
- level: a ? 4 : "ss",
276
+ level: o ? 4 : "ss",
278
277
  style: u
279
- }, o), t);
280
- // headings are not supported in role="listbox"
278
+ }, a), t);
279
+ // headings are not supported in role="listbox"
281
280
  // this causes Firefox to incorrectly read the total number
282
281
  // of items in the list if it contains a heading or divider
283
282
  // so we set them to aria-hidden to prevent that
284
283
 
285
- return n().createElement(P, {
284
+ return n().createElement(E, {
286
285
  "aria-hidden": s === "listbox"
287
- }, f);
286
+ }, d);
288
287
  }
289
- H.propTypes = N;
290
- /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ H.filterConsecutive = true;
291
- /* Remove the item if it is the last item after filtering. */ H.filterLast = true;
292
- /* Tag the item as a Heading */ H.as = "Heading";
293
- /* harmony default export */ const F = H;
288
+ $.propTypes = H;
289
+ /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ $.filterConsecutive = true;
290
+ /* Remove the item if it is the last item after filtering. */ $.filterLast = true;
291
+ /* Tag the item as a Heading */ $.as = "Heading";
292
+ /* harmony default export */ const M = $;
294
293
  // CONCATENATED MODULE: external "lodash/isString"
295
- const $ = require("lodash/isString");
296
- var A = e.n($);
294
+ const L = require("lodash/isString");
295
+ var z = e.n(L);
297
296
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
298
- const M = require("@splunk/react-icons/ChevronRight");
299
- var L = e.n(M);
297
+ const K = require("@splunk/react-icons/ChevronRight");
298
+ var B = e.n(K);
300
299
  // CONCATENATED MODULE: external "@splunk/react-icons/Checkmark"
301
- const z = require("@splunk/react-icons/Checkmark");
302
- var K = e.n(z);
300
+ const W = require("@splunk/react-icons/Checkmark");
301
+ var G = e.n(W);
303
302
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Check"
304
- const W = require("@splunk/react-icons/enterprise/Check");
305
- var B = e.n(W);
303
+ const V = require("@splunk/react-icons/enterprise/Check");
304
+ var U = e.n(V);
306
305
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
307
- const G = require("@splunk/react-icons/enterprise/ChevronRight");
308
- var V = e.n(G);
306
+ const X = require("@splunk/react-icons/enterprise/ChevronRight");
307
+ var Y = e.n(X);
308
+ // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
309
+ const J = require("@splunk/react-ui/ScreenReaderContent");
310
+ var Q = e.n(J);
311
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
312
+ const Z = require("@splunk/ui-utils/i18n");
309
313
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
310
- const U = require("@splunk/react-ui/Clickable");
311
- var X = e.n(U);
314
+ const ee = require("@splunk/react-ui/Clickable");
315
+ var te = e.n(ee);
312
316
  // CONCATENATED MODULE: external "@splunk/react-ui/Switch"
313
- const Y = require("@splunk/react-ui/Switch");
314
- var J = e.n(Y);
317
+ const re = require("@splunk/react-ui/Switch");
318
+ var ne = e.n(re);
315
319
  // CONCATENATED MODULE: ./src/Menu/ItemStyles.ts
316
- var Q = (0, u.css)([ "color:", ";font-size:", ";line-height:", ";overflow:inherit;white-space:inherit;text-overflow:inherit;" ], (0,
317
- b.pick)({
318
- prisma: b.variables.contentColorDefault,
319
- enterprise: b.variables.textGray
320
- }), b.variables.fontSizeSmall, (0, b.pick)({
320
+ var ie = (0, u.css)([ "color:", ";font-size:", ";line-height:", ";overflow:inherit;white-space:inherit;text-overflow:inherit;" ], (0,
321
+ m.pick)({
322
+ prisma: m.variables.contentColorDefault,
323
+ enterprise: m.variables.textGray
324
+ }), m.variables.fontSizeSmall, (0, m.pick)({
321
325
  prisma: "16px"
322
326
  }));
323
- var Z = f().span.withConfig({
327
+ var oe = d().span.withConfig({
324
328
  displayName: "ItemStyles__StyledItemDescriptionBottom",
325
329
  componentId: "sc-4kc053-0"
326
- })([ "", ";display:block;" ], Q);
327
- var ee = f().span.withConfig({
330
+ })([ "", ";display:block;" ], ie);
331
+ var ae = d().span.withConfig({
328
332
  displayName: "ItemStyles__StyledItemDescriptionRight",
329
333
  componentId: "sc-4kc053-1"
330
- })([ "", ";float:right;", " max-width:50%;text-align:right;box-sizing:border-box;" ], Q, (0,
331
- b.pick)({
332
- enterprise: (0, u.css)([ "padding-left:", ";" ], b.variables.spacingLarge)
334
+ })([ "", ";display:flex;align-items:center;float:right;", " max-width:50%;min-height:20px;text-align:right;box-sizing:border-box;" ], ie, (0,
335
+ m.pick)({
336
+ enterprise: (0, u.css)([ "padding-left:", ";" ], m.variables.spacingLarge)
333
337
  }));
334
- var te = f().div.withConfig({
335
- displayName: "ItemStyles__StyledItemSelectedIcon",
338
+ var le = d().div.withConfig({
339
+ displayName: "ItemStyles__StyledItemSelectedAdornment",
336
340
  componentId: "sc-4kc053-2"
337
- })([ "position:absolute;", " color:", ";" ], (0, b.pick)({
341
+ })([ "position:absolute;", " color:", ";" ], (0, m.pick)({
338
342
  prisma: (0, u.css)([ "right:16px;" ]),
339
343
  enterprise: (0, u.css)([ "right:3px;left:8px;" ])
340
- }), (0, b.pick)({
341
- prisma: b.variables.contentColorActive,
342
- enterprise: b.variables.accentColorL10
344
+ }), (0, m.pick)({
345
+ prisma: m.variables.contentColorActive,
346
+ enterprise: m.variables.accentColorL10
343
347
  }));
344
- var re = f().span.withConfig({
345
- displayName: "ItemStyles__StyledItemIcon",
348
+ var se = d().span.withConfig({
349
+ displayName: "ItemStyles__StyledItemAdornment",
346
350
  componentId: "sc-4kc053-3"
347
- })([ "flex:0 0 auto;padding-right:", ";min-width:10px;display:inline-block;text-align:center;vertical-align:", ";", "" ], (0,
348
- b.pick)({
351
+ })([ "flex:0 0 auto;padding-right:", ";", " min-width:10px;display:inline-block;text-align:center;vertical-align:", ";", "" ], (0,
352
+ m.pick)({
349
353
  prisma: "8px",
350
354
  enterprise: "3px"
351
- }), (0, b.pick)({
355
+ }), (function(e) {
356
+ var t = e.endAdornment;
357
+ return t && (0, u.css)([ "padding-left:", ";" ], (0, m.pick)({
358
+ prisma: "8px",
359
+ enterprise: "3px"
360
+ }));
361
+ }), (0, m.pick)({
352
362
  prisma: "initial",
353
363
  enterprise: "middle"
354
- }), (0, b.pick)({
355
- prisma: (0, u.css)([ "color:", ";display:inline-flex;align-items:center;min-width:20px;min-height:20px;& > svg{width:20px;height:20px;}" ], b.variables.contentColorMuted),
364
+ }), (0, m.pick)({
365
+ prisma: (0, u.css)([ "color:", ";display:inline-flex;align-items:center;min-width:20px;min-height:20px;& > svg{width:20px;height:20px;}" ], m.variables.contentColorMuted),
356
366
  enterprise: (0, u.css)([ "transform:translateY(-1px);" ])
357
367
  }));
358
- var ne = f()(X()).withConfig({
368
+ var ce = d()(te()).withConfig({
359
369
  displayName: "ItemStyles__StyledClickable",
360
370
  componentId: "sc-4kc053-4"
361
371
  })([ "display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;padding:", ";", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}", " ", "}&:focus{outline:0;box-shadow:", ";", "}&[disabled],&[aria-disabled='true']{color:", ";cursor:not-allowed;", ",", "{color:inherit;}", "{cursor:not-allowed;color:", ";}", "}", "" ], (0,
362
- b.pick)({
363
- prisma: b.variables.contentColorActive,
372
+ m.pick)({
373
+ prisma: m.variables.contentColorActive,
364
374
  enterprise: {
365
- dark: b.variables.gray96,
366
- light: b.variables.gray22
375
+ dark: m.variables.gray96,
376
+ light: m.variables.gray22
367
377
  }
368
- }), (0, b.pick)({
378
+ }), (0, m.pick)({
369
379
  prisma: {
370
380
  comfortable: "10px 16px",
371
381
  compact: "6px 16px"
@@ -373,7 +383,7 @@
373
383
  enterprise: "6px 10px"
374
384
  }), (function(e) {
375
385
  var t = e.$isSelectable, r = e.$selectableAppearance;
376
- return t && (0, b.pick)({
386
+ return t && (0, m.pick)({
377
387
  prisma: (0, u.css)([ "padding-right:44px;", "" ], (function() {
378
388
  return r === "checkbox" && "padding-left: 42px;";
379
389
  })),
@@ -383,142 +393,128 @@
383
393
  });
384
394
  }), (function(e) {
385
395
  var t = e.$active, r = e.$preventFocus;
386
- return t && !r && (0, u.css)([ "box-shadow:", ";" ], b.variables.focusShadowInset);
396
+ return t && !r && (0, u.css)([ "box-shadow:", ";" ], m.variables.focusShadowInset);
387
397
  }), (function(e) {
388
398
  var t = e.$active;
389
- return t && (0, u.css)([ "background:", ";font-weight:", ";" ], (0, b.pick)({
399
+ return t && (0, u.css)([ "background:", ";font-weight:", ";" ], (0, m.pick)({
390
400
  enterprise: {
391
- light: b.variables.gray92,
392
- dark: b.variables.gray22
401
+ light: m.variables.gray92,
402
+ dark: m.variables.gray22
393
403
  },
394
- prisma: b.variables.neutral100
395
- }), b.variables.fontWeightBold);
396
- }), (0, b.pick)({
397
- prisma: b.variables.interactiveColorOverlayHover,
398
- enterprise: b.variables.backgroundColorHover
404
+ prisma: m.variables.neutral100
405
+ }), m.variables.fontWeightBold);
406
+ }), (0, m.pick)({
407
+ prisma: m.variables.interactiveColorOverlayHover,
408
+ enterprise: m.variables.backgroundColorHover
399
409
  }), (function(e) {
400
410
  var t = e.$selected;
401
- return t && (0, b.pick)({
402
- prisma: (0, u.css)([ "background:", ";" ], b.mixins.overlayColors(b.variables.interactiveColorOverlaySelected, b.variables.interactiveColorOverlayHover))
411
+ return t && (0, m.pick)({
412
+ prisma: (0, u.css)([ "background:", ";" ], m.mixins.overlayColors(m.variables.interactiveColorOverlaySelected, m.variables.interactiveColorOverlayHover))
403
413
  });
404
- }), (0, b.pick)({
405
- prisma: (0, u.css)([ "&:active{background:", ";}" ], b.variables.interactiveColorOverlayActive)
414
+ }), (0, m.pick)({
415
+ prisma: (0, u.css)([ "&:active{background:", ";}" ], m.variables.interactiveColorOverlayActive)
406
416
  }), (function(e) {
407
417
  var t = e.$selected;
408
- return t && (0, b.pick)({
409
- prisma: (0, u.css)([ "background:", ";&:active{background:", ";}" ], b.variables.interactiveColorOverlaySelected, b.mixins.overlayColors(b.variables.interactiveColorOverlaySelected, b.variables.interactiveColorOverlayActive))
418
+ return t && (0, m.pick)({
419
+ prisma: (0, u.css)([ "background:", ";&:active{background:", ";}" ], m.variables.interactiveColorOverlaySelected, m.mixins.overlayColors(m.variables.interactiveColorOverlaySelected, m.variables.interactiveColorOverlayActive))
410
420
  });
411
- }), b.variables.focusShadowInset, (0, b.pick)({
412
- prisma: (0, u.css)([ "background:", ";" ], b.variables.interactiveColorOverlayHover)
413
- }), (0, b.pick)({
421
+ }), m.variables.focusShadowInset, (0, m.pick)({
422
+ prisma: (0, u.css)([ "background:", ";" ], m.variables.interactiveColorOverlayHover)
423
+ }), (0, m.pick)({
414
424
  enterprise: {
415
- light: b.variables.gray45,
416
- dark: b.variables.contentColorDisabled
425
+ light: m.variables.gray45,
426
+ dark: m.variables.contentColorDisabled
417
427
  },
418
- prisma: b.variables.contentColorDisabled
419
- }),
420
- /* sc-sel */
421
- Z,
422
- /* sc-sel */
423
- ee,
424
- /* sc-sel */
425
- te, (0, b.pick)({
426
- prisma: b.variables.contentColorDisabled,
427
- enterprise: b.variables.gray80
428
- }), (0, b.pick)({
429
- prisma: (0, u.css)([ "& > * > ", "{color:", ";}" ],
430
- /* sc-sel */
431
- re, b.variables.contentColorDisabled)
428
+ prisma: m.variables.contentColorDisabled
429
+ }), /* sc-sel */ oe, /* sc-sel */ ae, /* sc-sel */ le, (0, m.pick)({
430
+ prisma: m.variables.contentColorDisabled,
431
+ enterprise: m.variables.gray80
432
+ }), (0, m.pick)({
433
+ prisma: (0, u.css)([ "& > * > ", "{color:", ";}" ], /* sc-sel */ se, m.variables.contentColorDisabled)
432
434
  }), (function(e) {
433
435
  var t = e.$selected;
434
- return t && (0, b.pick)({
435
- prisma: (0, u.css)([ "", "{color:", ";}" ],
436
- /* sc-sel */
437
- re, b.variables.contentColorActive)
436
+ return t && (0, m.pick)({
437
+ prisma: (0, u.css)([ "", "{color:", ";}" ], /* sc-sel */ se, m.variables.contentColorActive)
438
438
  });
439
439
  }));
440
- var ie = f()(J()).withConfig({
440
+ var pe = d()(ne()).withConfig({
441
441
  displayName: "ItemStyles__StyledSwitch",
442
442
  componentId: "sc-4kc053-5"
443
- })([ "position:absolute;left:", ";top:", ";" ], (0, b.pick)({
443
+ })([ "position:absolute;left:", ";top:", ";" ], (0, m.pick)({
444
444
  prisma: "16px",
445
445
  enterprise: "8px"
446
- }), (0, b.pick)({
446
+ }), (0, m.pick)({
447
447
  prisma: "0px",
448
448
  enterprise: {
449
449
  comfortable: "-1px",
450
450
  compact: "2px"
451
451
  }
452
452
  }));
453
- var ae = f().span.withConfig({
453
+ var ue = d().span.withConfig({
454
454
  displayName: "ItemStyles__StyledInnerWrapper",
455
455
  componentId: "sc-4kc053-6"
456
456
  })([ "display:flex;align-items:flex-start;" ]);
457
- var oe = f().span.withConfig({
457
+ var de = d().span.withConfig({
458
458
  displayName: "ItemStyles__StyledTitleAndDescriptionWrapper",
459
459
  componentId: "sc-4kc053-7"
460
460
  })([ "display:flex;flex-wrap:wrap;flex-direction:column;max-width:100%;width:100%;align-self:center;word-break:break-word;white-space:normal;", "" ], (function(e) {
461
461
  var t = e.$truncate;
462
462
  return t && (0, u.css)([ "white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ]);
463
463
  }));
464
- var le = f().div.withConfig({
464
+ var fe = d().div.withConfig({
465
465
  displayName: "ItemStyles__StyledLabel",
466
466
  componentId: "sc-4kc053-8"
467
467
  })([ "overflow:inherit;white-space:inherit;text-overflow:inherit;max-width:100%;min-height:20px;", "" ], (function(e) {
468
468
  var t = e.$truncate;
469
469
  return t && (0, u.css)([ "display:block;clear:both;" ]);
470
470
  }));
471
- var se = f().span.withConfig({
471
+ var ve = d().span.withConfig({
472
472
  displayName: "ItemStyles__StyledMatch",
473
473
  componentId: "sc-4kc053-9"
474
- })([ "border-bottom:1px solid ", ";" ], (0, b.pick)({
475
- prisma: b.variables.contentColorActive,
474
+ })([ "border-bottom:1px solid ", ";" ], (0, m.pick)({
475
+ prisma: m.variables.contentColorActive,
476
476
  enterprise: {
477
- dark: b.variables.gray96,
478
- light: b.variables.gray45
477
+ dark: m.variables.gray96,
478
+ light: m.variables.gray45
479
479
  }
480
480
  }));
481
- var ce = f().span.withConfig({
481
+ var me = d().span.withConfig({
482
482
  displayName: "ItemStyles__StyledSubmenu",
483
483
  componentId: "sc-4kc053-10"
484
- })([ "float:right;padding-left:", ";color:", ";", "" ], b.variables.spacingSmall, (0,
485
- b.pick)({
484
+ })([ "float:right;padding-left:", ";color:", ";", "" ], m.variables.spacingSmall, (0,
485
+ m.pick)({
486
486
  prisma: "inherit",
487
- enterprise: b.variables.textGray
488
- }), (0, b.pick)({
487
+ enterprise: m.variables.textGray
488
+ }), (0, m.pick)({
489
489
  prisma: (0, u.css)([ "& > svg{width:20px;height:20px;}" ])
490
490
  }));
491
491
  // CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRight"
492
- const pe = require("@splunk/react-icons/ArrowSquareTopRight");
493
- var ue = e.n(pe);
492
+ const be = require("@splunk/react-icons/ArrowSquareTopRight");
493
+ var ye = e.n(be);
494
494
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/External"
495
- const fe = require("@splunk/react-icons/enterprise/External");
496
- var de = e.n(fe);
497
- // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
498
- const ve = require("@splunk/ui-utils/i18n");
495
+ const he = require("@splunk/react-icons/enterprise/External");
496
+ var ge = e.n(he);
499
497
  // CONCATENATED MODULE: ./src/Menu/icons/External.tsx
500
- var be = (0, ve._)("Open externally");
501
- var me = (0, u.css)([ "width:0.8em;height:0.8em;vertical-align:baseline;" ]);
502
- var he = f()(de()).withConfig({
498
+ var ke = (0, u.css)([ "width:0.8em;height:0.8em;vertical-align:baseline;" ]);
499
+ var xe = d()(ge()).withConfig({
503
500
  displayName: "External__StyledEnterprise",
504
501
  componentId: "sc-1turs2s-0"
505
- })([ "", " margin:0 0 0 3px;" ], me);
506
- var ye = f()(ue()).withConfig({
502
+ })([ "", " margin:0 0 0 3px;" ], ke);
503
+ var we = d()(ye()).withConfig({
507
504
  displayName: "External__StyledPrisma",
508
505
  componentId: "sc-1turs2s-1"
509
- })([ "", " margin:0 0 0 4px;" ], me);
510
- function ge() {
511
- var e = (0, b.useSplunkTheme)(), t = e.isEnterprise, r = e.isCompact;
506
+ })([ "", " margin:0 0 0 4px;" ], ke);
507
+ function Se() {
508
+ var e = (0, m.useSplunkTheme)(), t = e.isEnterprise, r = e.isCompact;
512
509
  var i = r ? "20px" : "24px";
513
- return t ? n().createElement(he, {
514
- screenReaderText: be
515
- }) : n().createElement(ye, {
516
- "aria-label": be,
510
+ return t ? n().createElement(xe, {
511
+ screenReaderText: null
512
+ }) : n().createElement(we, {
517
513
  height: i,
518
514
  width: i
519
- }, n().createElement("title", null, be));
515
+ });
520
516
  }
521
- /* harmony default export */ const ke = ge;
517
+ /* harmony default export */ const Oe = Se;
522
518
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
523
519
  /**
524
520
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
@@ -526,7 +522,7 @@
526
522
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
527
523
  * @param current - The new value of the ref.
528
524
  */
529
- function xe(e, t) {
525
+ function Ce(e, t) {
530
526
  if (e) {
531
527
  if (typeof e === "function") {
532
528
  e(t);
@@ -540,7 +536,7 @@
540
536
  }
541
537
  // CONCATENATED MODULE: ./src/utils/scrollIntoViewIfNeeded.ts
542
538
  // A utility that attempts to move an element into view by scrolling it's derived parent.
543
- var we = function e(t) {
539
+ var Pe = function e(t) {
544
540
  if (!t) {
545
541
  return;
546
542
  }
@@ -548,194 +544,176 @@
548
544
  if (!r) {
549
545
  return;
550
546
  }
551
- // Below the bottom of the container.
547
+ // Below the bottom of the container.
552
548
  if (r.scrollTop + r.clientHeight < t.offsetTop + t.clientHeight) {
553
549
  r.scrollTop = t.offsetTop + t.clientHeight - r.clientHeight;
554
- // Above the top of the container.
550
+ // Above the top of the container.
555
551
  } else if (r.scrollTop > t.offsetTop) {
556
552
  r.scrollTop = t.offsetTop;
557
553
  }
558
554
  };
559
555
  // CONCATENATED MODULE: ./src/Menu/Item.tsx
560
- function Se(e) {
556
+ function Ee(e) {
561
557
  "@babel/helpers - typeof";
562
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
563
- Se = function e(t) {
564
- return typeof t;
565
- };
566
- } else {
567
- Se = function e(t) {
568
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
569
- };
570
- }
571
- return Se(e);
558
+ return Ee = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
559
+ return typeof e;
560
+ } : function(e) {
561
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
562
+ }, Ee(e);
572
563
  }
573
- function Oe() {
574
- Oe = Object.assign || function(e) {
564
+ function Ie() {
565
+ return Ie = Object.assign ? Object.assign.bind() : function(e) {
575
566
  for (var t = 1; t < arguments.length; t++) {
576
567
  var r = arguments[t];
577
568
  for (var n in r) {
578
- if (Object.prototype.hasOwnProperty.call(r, n)) {
579
- e[n] = r[n];
580
- }
569
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
581
570
  }
582
571
  }
583
572
  return e;
584
- };
585
- return Oe.apply(this, arguments);
573
+ }, Ie.apply(null, arguments);
586
574
  }
587
- function Ce(e, t) {
588
- if (e == null) return {};
589
- var r = Ie(e, t);
590
- var n, i;
575
+ function je(e, t) {
576
+ if (null == e) return {};
577
+ var r, n, i = _e(e, t);
591
578
  if (Object.getOwnPropertySymbols) {
592
- var a = Object.getOwnPropertySymbols(e);
593
- for (i = 0; i < a.length; i++) {
594
- n = a[i];
595
- if (t.indexOf(n) >= 0) continue;
596
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
597
- r[n] = e[n];
579
+ var o = Object.getOwnPropertySymbols(e);
580
+ for (n = 0; n < o.length; n++) {
581
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (i[r] = e[r]);
598
582
  }
599
583
  }
600
- return r;
584
+ return i;
601
585
  }
602
- function Ie(e, t) {
603
- if (e == null) return {};
586
+ function _e(e, t) {
587
+ if (null == e) return {};
604
588
  var r = {};
605
- var n = Object.keys(e);
606
- var i, a;
607
- for (a = 0; a < n.length; a++) {
608
- i = n[a];
609
- if (t.indexOf(i) >= 0) continue;
610
- r[i] = e[i];
589
+ for (var n in e) {
590
+ if ({}.hasOwnProperty.call(e, n)) {
591
+ if (t.includes(n)) continue;
592
+ r[n] = e[n];
593
+ }
611
594
  }
612
595
  return r;
613
596
  }
614
- function Pe(e, t) {
615
- if (!(e instanceof t)) {
616
- throw new TypeError("Cannot call a class as a function");
617
- }
597
+ function Te(e, t) {
598
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
618
599
  }
619
- function _e(e, t) {
600
+ function De(e, t) {
620
601
  for (var r = 0; r < t.length; r++) {
621
602
  var n = t[r];
622
- n.enumerable = n.enumerable || false;
623
- n.configurable = true;
624
- if ("value" in n) n.writable = true;
625
- Object.defineProperty(e, n.key, n);
603
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0),
604
+ Object.defineProperty(e, ze(n.key), n);
626
605
  }
627
606
  }
628
- function je(e, t, r) {
629
- if (t) _e(e.prototype, t);
630
- if (r) _e(e, r);
631
- return e;
607
+ function qe(e, t, r) {
608
+ return t && De(e.prototype, t), r && De(e, r), Object.defineProperty(e, "prototype", {
609
+ writable: !1
610
+ }), e;
632
611
  }
633
- function Ee(e, t) {
634
- if (typeof t !== "function" && t !== null) {
635
- throw new TypeError("Super expression must either be null or a function");
636
- }
612
+ function Ne(e, t) {
613
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
637
614
  e.prototype = Object.create(t && t.prototype, {
638
615
  constructor: {
639
616
  value: e,
640
- writable: true,
641
- configurable: true
617
+ writable: !0,
618
+ configurable: !0
642
619
  }
643
- });
644
- if (t) Te(e, t);
620
+ }), Object.defineProperty(e, "prototype", {
621
+ writable: !1
622
+ }), t && Ae(e, t);
645
623
  }
646
- function Te(e, t) {
647
- Te = Object.setPrototypeOf || function e(t, r) {
648
- t.__proto__ = r;
649
- return t;
650
- };
651
- return Te(e, t);
624
+ function Ae(e, t) {
625
+ return Ae = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
626
+ return e.__proto__ = t, e;
627
+ }, Ae(e, t);
652
628
  }
653
- function De(e) {
654
- var t = Ne();
655
- return function r() {
656
- var n = He(e), i;
629
+ function Re(e) {
630
+ var t = $e();
631
+ return function() {
632
+ var r, n = Me(e);
657
633
  if (t) {
658
- var a = He(this).constructor;
659
- i = Reflect.construct(n, arguments, a);
660
- } else {
661
- i = n.apply(this, arguments);
662
- }
663
- return qe(this, i);
634
+ var i = Me(this).constructor;
635
+ r = Reflect.construct(n, arguments, i);
636
+ } else r = n.apply(this, arguments);
637
+ return Fe(this, r);
664
638
  };
665
639
  }
666
- function qe(e, t) {
667
- if (t && (Se(t) === "object" || typeof t === "function")) {
668
- return t;
669
- }
670
- return Re(e);
640
+ function Fe(e, t) {
641
+ if (t && ("object" == Ee(t) || "function" == typeof t)) return t;
642
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
643
+ return He(e);
671
644
  }
672
- function Re(e) {
673
- if (e === void 0) {
674
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
675
- }
645
+ function He(e) {
646
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
676
647
  return e;
677
648
  }
678
- function Ne() {
679
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
680
- if (Reflect.construct.sham) return false;
681
- if (typeof Proxy === "function") return true;
649
+ function $e() {
682
650
  try {
683
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
684
- return true;
685
- } catch (e) {
686
- return false;
687
- }
651
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
652
+ } catch (e) {}
653
+ return ($e = function t() {
654
+ return !!e;
655
+ })();
688
656
  }
689
- function He(e) {
690
- He = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
691
- return t.__proto__ || Object.getPrototypeOf(t);
692
- };
693
- return He(e);
657
+ function Me(e) {
658
+ return Me = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
659
+ return e.__proto__ || Object.getPrototypeOf(e);
660
+ }, Me(e);
694
661
  }
695
- function Fe(e, t, r) {
696
- if (t in e) {
697
- Object.defineProperty(e, t, {
698
- value: r,
699
- enumerable: true,
700
- configurable: true,
701
- writable: true
702
- });
703
- } else {
704
- e[t] = r;
662
+ function Le(e, t, r) {
663
+ return (t = ze(t)) in e ? Object.defineProperty(e, t, {
664
+ value: r,
665
+ enumerable: !0,
666
+ configurable: !0,
667
+ writable: !0
668
+ }) : e[t] = r, e;
669
+ }
670
+ function ze(e) {
671
+ var t = Ke(e, "string");
672
+ return "symbol" == Ee(t) ? t : t + "";
673
+ }
674
+ function Ke(e, t) {
675
+ if ("object" != Ee(e) || !e) return e;
676
+ var r = e[Symbol.toPrimitive];
677
+ if (void 0 !== r) {
678
+ var n = r.call(e, t || "default");
679
+ if ("object" != Ee(n)) return n;
680
+ throw new TypeError("@@toPrimitive must return a primitive value.");
705
681
  }
706
- return e;
682
+ return ("string" === t ? String : Number)(e);
707
683
  }
708
- var $e = {
709
- active: a().bool,
710
- children: a().node,
711
- description: a().string,
712
- descriptionPosition: a().oneOf([ "right", "bottom" ]),
713
- disabled: a().oneOfType([ a().bool, a().oneOf([ "dimmed" ]) ]),
714
- elementRef: a().oneOfType([ a().func, a().object ]),
715
- hasSubmenu: a().bool,
716
- icon: a().node,
684
+ var Be = {
685
+ active: o().bool,
686
+ children: o().node,
687
+ description: o().string,
688
+ descriptionPosition: o().oneOf([ "right", "bottom" ]),
689
+ disabled: o().oneOfType([ o().bool, o().oneOf([ "dimmed" ]) ]),
690
+ elementRef: o().oneOfType([ o().func, o().object ]),
691
+ endAdornment: o().node,
692
+ hasSubmenu: o().bool,
693
+ icon: o().node,
717
694
  /** @private. The internal key of the tab */
718
- itemKey: a().number,
719
- matchRanges: a().arrayOf(a().shape({
720
- start: a().number.isRequired,
721
- end: a().number.isRequired
695
+ itemKey: o().number,
696
+ matchRanges: o().arrayOf(o().shape({
697
+ start: o().number.isRequired,
698
+ end: o().number.isRequired
722
699
  })),
723
- onClick: a().func,
700
+ onClick: o().func,
724
701
  /** @private */
725
- onFocus: a().func,
726
- openInNewContext: a().bool,
702
+ onFocus: o().func,
703
+ openInNewContext: o().oneOfType([ o().bool, o().string ]),
727
704
  /** @private */
728
- preventFocus: a().bool,
729
- role: a().oneOf([ "menuitem", "menuitemradio", "menuitemcheckbox", "listboxitem", "option" ]),
730
- selectable: a().bool,
731
- selectableAppearance: a().oneOf([ "checkmark", "checkbox" ]),
732
- selected: a().bool,
705
+ preventFocus: o().bool,
706
+ role: o().oneOf([ "menuitem", "menuitemradio", "menuitemcheckbox", "listboxitem", "option" ]),
707
+ selectable: o().bool,
708
+ selectableAppearance: o().oneOf([ "checkmark", "checkbox" ]),
709
+ selected: o().oneOfType([ o().bool, o().oneOf([ "some" ]) ]),
733
710
  /** @private */
734
- splunkTheme: a().object,
735
- to: a().string,
736
- truncate: a().bool
711
+ splunkTheme: o().object,
712
+ startAdornment: o().node,
713
+ to: o().string,
714
+ truncate: o().bool
737
715
  };
738
- var Ae = {
716
+ var We = {
739
717
  active: false,
740
718
  descriptionPosition: "bottom",
741
719
  hasSubmenu: false,
@@ -746,10 +724,11 @@
746
724
  selected: false,
747
725
  truncate: false
748
726
  };
749
- var Me = function(e) {
750
- Ee(r, e);
751
- var t = De(r);
752
- je(r, null, [ {
727
+ var Ge = (0, Z._)("(Opens new window)");
728
+ var Ve = function(e) {
729
+ Ne(r, e);
730
+ var t = Re(r);
731
+ qe(r, null, [ {
753
732
  key: "validateProps",
754
733
  // @docs-props-type ItemPropsBase
755
734
  value: function e(t) {
@@ -758,230 +737,233 @@
758
737
  } ]);
759
738
  function r(e) {
760
739
  var n;
761
- Pe(this, r);
740
+ Te(this, r);
762
741
  n = t.call(this, e);
763
- Fe(Re(n), "el", null);
764
- Fe(Re(n), "handleFocus", (function(e) {
742
+ Le(He(n), "el", null);
743
+ Le(He(n), "handleFocus", (function(e) {
765
744
  var t = n.props, r = t.onFocus, i = t.itemKey;
766
745
  r === null || r === void 0 ? void 0 : r(e, {
767
746
  itemKey: i
768
747
  });
769
748
  }));
770
- Fe(Re(n), "handleMount", (function(e) {
749
+ Le(He(n), "handleMount", (function(e) {
771
750
  n.el = e;
772
- xe(n.props.elementRef, e);
751
+ Ce(n.props.elementRef, e);
773
752
  }));
774
753
  r.validateProps(e);
775
754
  return n;
776
755
  }
777
- je(r, [ {
756
+ qe(r, [ {
778
757
  key: "componentDidUpdate",
779
758
  value: function e() {
780
759
  r.validateProps(this.props);
781
760
  }
782
761
  }, {
783
762
  key: "focus",
763
+ // eslint-disable-next-line react/no-unused-class-component-methods
784
764
  value: function e() {
785
765
  var t;
786
766
  (t = this.el) === null || t === void 0 ? void 0 : t.focus();
787
767
  }
788
- }, {
768
+ // eslint-disable-next-line react/no-unused-class-component-methods
769
+ }, {
789
770
  key: "scrollIntoViewIfNeeded",
790
771
  value: function e() {
791
- we(this.el);
772
+ Pe(this.el);
792
773
  }
793
774
  }, {
794
775
  key: "renderLabel",
795
776
  value: function e() {
796
777
  var t = this.props, r = t.children, i = t.matchRanges;
797
- if (!i || !A()(r)) {
778
+ if (!i || !z()(r)) {
798
779
  return r;
799
780
  }
800
- var a = [];
801
- // before first match. May be empty string.
802
- a.push(r.substring(0, i[0].start));
781
+ var o = [];
782
+ // before first match. May be empty string.
783
+ o.push(r.substring(0, i[0].start));
803
784
  i.forEach((function(e, t) {
804
- a.push(
785
+ o.push(
805
786
 
806
787
  // eslint-disable-next-line react/no-array-index-key
807
- n().createElement(se, {
788
+ n().createElement(ve, {
808
789
  key: t,
809
790
  "data-test": "match"
810
791
  }, r.substring(e.start, e.end)));
811
792
  if (t < i.length - 1) {
812
- a.push(r.substring(e.end, i[t + 1].start));
793
+ o.push(r.substring(e.end, i[t + 1].start));
813
794
  } else {
814
- a.push(r.substring(e.end, r.length));
795
+ o.push(r.substring(e.end, r.length));
815
796
  }
816
797
  }));
817
- return a;
798
+ return o;
818
799
  }
819
800
  }, {
820
801
  key: "render",
821
802
  value: function e() {
822
- var t = this.props, r = t.active, i = t.children, a = t.hasSubmenu, o = t.selectable, s = t.selectableAppearance, c = t.selected, p = t.icon, u = t.description, f = t.disabled, d = t.onClick, v = t.role, b = t.splunkTheme, m = t.to, h = t.truncate, y = t.descriptionPosition, g = t.openInNewContext, k = Ce(t, [ "active", "children", "hasSubmenu", "selectable", "selectableAppearance", "selected", "icon", "description", "disabled", "onClick", "role", "splunkTheme", "to", "truncate", "descriptionPosition", "openInNewContext" ]);
823
- var x = b.isEnterprise, w = b.isPrisma;
824
- var S = this.context.preventFocus;
825
- var O = o || c;
826
- var C = {
803
+ var t = this.props, r = t.active, i = t.children, o = t.hasSubmenu, a = t.selectable, s = t.selectableAppearance, c = t.selected, p = t.icon, u = t.description, d = t.disabled, f = t.onClick, v = t.role, m = t.splunkTheme, b = t.to, y = t.truncate, h = t.descriptionPosition, g = t.openInNewContext, k = t.endAdornment, x = t.startAdornment, w = je(t, [ "active", "children", "hasSubmenu", "selectable", "selectableAppearance", "selected", "icon", "description", "disabled", "onClick", "role", "splunkTheme", "to", "truncate", "descriptionPosition", "openInNewContext", "endAdornment", "startAdornment" ]);
804
+ var S = m.isEnterprise, O = m.isPrisma;
805
+ var C = this.context.preventFocus;
806
+ var P = c === true || c === "some";
807
+ var E = a || P;
808
+ var I = v || {
827
809
  nonselectable: "menuitem",
828
810
  checkmark: "menuitemradio",
829
811
  checkbox: "menuitemcheckbox"
830
- }[O ? s : "nonselectable"];
831
- // aria-checked updates only with checkmark appearance for now SUI-2578
832
- var I = {
833
- "aria-haspopup": a ? true : undefined,
834
- "aria-checked": s === "checkmark" && c ? true : undefined
812
+ }[E ? s : "nonselectable"];
813
+ var j = {
814
+ "aria-haspopup": o ? true : undefined
835
815
  };
836
- var P = w ? "right" : "left";
837
- var _ = u && y === "right";
838
- var j = u && !_;
839
- var E = c && s === "checkmark" && n().createElement(te, null, w ? n().createElement(K(), {
816
+ if (I === "menuitemradio" || I === "menuitemcheckbox") {
817
+ j["aria-checked"] = c === "some" ? "mixed" : P;
818
+ } else if (I === "option") {
819
+ j["aria-selected"] = P;
820
+ }
821
+ var _ = O ? "right" : "left";
822
+ var T = u && h === "right";
823
+ var D = u && !T;
824
+ var q = c && s === "checkmark" && n().createElement(le, null, O ? n().createElement(G(), {
840
825
  inline: true,
841
826
  height: "16",
842
827
  width: "16"
843
- }) : n().createElement(B(), {
828
+ }) : n().createElement(U(), {
844
829
  hideDefaultTooltip: true,
845
830
  inline: true,
846
831
  screenReaderText: null,
847
832
  size: .85
848
833
  }));
834
+ var N = false;
835
+ var A;
836
+ if (g) {
837
+ N = true;
838
+ A = typeof g === "string" ? g : Ge;
839
+ }
849
840
 
850
- return n().createElement(ne, Oe({
851
- $isSelectable: O,
841
+ return n().createElement(ce, Ie({
842
+ $isSelectable: E,
852
843
  $selectableAppearance: s,
853
- $selected: c,
844
+ $selected: P,
854
845
  $active: r,
855
- $preventFocus: S || false,
856
- "data-test-selected": O ? c : null,
846
+ $preventFocus: C || false,
847
+ "data-test-selected": E ? P : null,
857
848
  "data-test": "item",
858
- "data-has-icon": !!p,
859
- disabled: f,
860
- onClick: d,
849
+ "data-has-icon": !!p || !!x || !!k,
850
+ disabled: d,
851
+ onClick: f,
861
852
  onFocus: this.handleFocus,
862
853
  onMouseDown: function e(t) {
863
- if (S) {
854
+ if (C) {
864
855
  t.preventDefault();
865
856
  }
866
857
  },
867
- role: v || C,
868
- tabIndex: S ? -1 : undefined,
869
- to: m,
870
- title: h && A()(i) ? i : undefined,
871
- openInNewContext: g
872
- }, I, l()(k, "onFocus"), {
858
+ role: I,
859
+ tabIndex: C ? -1 : undefined,
860
+ to: b,
861
+ title: y && z()(i) ? i : undefined,
862
+ openInNewContext: N
863
+ }, j, l()(w, "onFocus"), {
873
864
  elementRef: this.handleMount
874
- }), o && s === "checkbox" && n().createElement(ie, {
865
+ }), a && s === "checkbox" && n().createElement(pe, {
875
866
  interactive: false,
876
- selected: c,
867
+ value: "menu-item",
877
868
  selectedLabel: "Selected",
878
- value: "menu-item"
879
- }), a && n().createElement(ce, null, x ? n().createElement(V(), {
869
+ selected: c
870
+ }), o && n().createElement(me, null, S ? n().createElement(Y(), {
880
871
  hideDefaultTooltip: true,
881
872
  screenReaderText: null
882
- }) : n().createElement(L(), null)), _ && n().createElement(ee, {
873
+ }) : n().createElement(B(), null)), T && n().createElement(ae, {
883
874
  "data-test": "description"
884
- }, u), n().createElement(ae, null, p && n().createElement(re, null, p), n().createElement(oe, {
885
- $truncate: h
886
- }, P === "left" && E, n().createElement(le, {
887
- $truncate: h,
875
+ }, u), n().createElement(ue, null, x ? n().createElement(se, null, x) : p && n().createElement(se, null, p), n().createElement(de, {
876
+ $truncate: y
877
+ }, _ === "left" && q, n().createElement(fe, {
878
+ $truncate: y,
888
879
  "data-test": "label"
889
- }, this.renderLabel(), g && n().createElement(ke, null)), j && n().createElement(Z, {
880
+ }, this.renderLabel(), g && n().createElement(n().Fragment, null, n().createElement(Oe, null), n().createElement(Q(), null, A))), D && n().createElement(oe, {
890
881
  "data-test": "description"
891
- }, u), P === "right" && E)));
882
+ }, u), _ === "right" && q), k && n().createElement(se, {
883
+ endAdornment: k
884
+ }, k)));
892
885
  }
893
886
  } ]);
894
887
  return r;
895
888
  }(r.Component);
896
- Fe(Me, "propTypes", $e);
897
- Fe(Me, "defaultProps", Ae);
898
- Fe(Me, "as", void 0);
899
- Fe(Me, "contextType", y);
900
- var Le = (0, b.withSplunkTheme)(Me);
901
- var ze = Le;
902
- ze.propTypes = Me.propTypes;
903
- ze.as = "Item";
904
- /* harmony default export */ const Ke = ze;
905
- // CONCATENATED MODULE: external "@splunk/react-ui/Scroll"
906
- const We = require("@splunk/react-ui/Scroll");
907
- var Be = e.n(We);
889
+ Le(Ve, "propTypes", Be);
890
+ Le(Ve, "defaultProps", We);
891
+ Le(Ve, "as", void 0);
892
+ Le(Ve, "contextType", h);
893
+ var Ue = (0, m.withSplunkTheme)(Ve);
894
+ var Xe = Ue;
895
+ Xe.propTypes = Ve.propTypes;
896
+ Xe.as = "Item";
897
+ /* harmony default export */ const Ye = Xe;
898
+ // only for styled components using Item
899
+ // CONCATENATED MODULE: external "@splunk/react-ui/Scroll"
900
+ const Je = require("@splunk/react-ui/Scroll");
901
+ var Qe = e.n(Je);
908
902
  // CONCATENATED MODULE: ./src/Menu/MenuStyles.ts
909
- var Ge = (0, u.css)([ "border-top:1px solid ", ";" ], (0, b.pick)({
910
- enterprise: b.variables.gray60,
911
- prisma: b.variables.neutral200
903
+ var Ze = (0, u.css)([ "border-top:1px solid ", ";" ], (0, m.pick)({
904
+ enterprise: m.variables.gray60,
905
+ prisma: m.variables.neutral200
912
906
  }));
913
- var Ve = (0, u.css)([ "", ";background-color:", ";border-radius:", ";min-width:60px;overflow:auto;position:relative;", " &:focus{outline:0;box-shadow:", ";", "}& + &{", "}" ], b.mixins.reset("block"), (0,
914
- b.pick)({
915
- enterprise: b.variables.backgroundColor,
916
- prisma: b.variables.backgroundColorPopup
917
- }), b.variables.borderRadius, (0, b.pick)({
907
+ var et = (0, u.css)([ "", ";background-color:", ";border-radius:", ";min-width:60px;overflow:auto;position:relative;", " &:focus{outline:0;box-shadow:", ";", "}& + &{", "}" ], m.mixins.reset("block"), (0,
908
+ m.pick)({
909
+ enterprise: m.variables.backgroundColor,
910
+ prisma: m.variables.backgroundColorPopup
911
+ }), m.variables.borderRadius, (0, m.pick)({
918
912
  prisma: (0, u.css)([ "padding:8px 0;" ])
919
- }), b.variables.focusShadowInset, (0, b.pick)({
920
- prisma: (0, u.css)([ "background:", ";" ], b.variables.interactiveColorOverlayHover)
921
- }), Ge);
922
- var Ue = f().div.withConfig({
913
+ }), m.variables.focusShadowInset, (0, m.pick)({
914
+ prisma: (0, u.css)([ "background:", ";" ], m.variables.interactiveColorOverlayHover)
915
+ }), Ze);
916
+ var tt = d().div.withConfig({
923
917
  displayName: "MenuStyles__Styled",
924
918
  componentId: "sc-1olffp9-0"
925
- })([ "", "" ], Ve);
926
- var Xe = f()(Be()).withConfig({
919
+ })([ "", "" ], et);
920
+ var rt = d()(Qe()).withConfig({
927
921
  displayName: "MenuStyles__StyledScroll",
928
922
  componentId: "sc-1olffp9-1"
929
- })([ "", " ", " + &,& + ", "{", "}" ], Ve,
930
- /* sc-sel */
931
- Ue,
932
- /* sc-sel */
933
- Ue, Ge);
923
+ })([ "", " ", " + &,& + ", "{", "}" ], et, /* sc-sel */ tt, /* sc-sel */ tt, Ze);
934
924
  // CONCATENATED MODULE: ./src/Menu/Menu.tsx
935
- function Ye() {
936
- Ye = Object.assign || function(e) {
925
+ function nt() {
926
+ return nt = Object.assign ? Object.assign.bind() : function(e) {
937
927
  for (var t = 1; t < arguments.length; t++) {
938
928
  var r = arguments[t];
939
929
  for (var n in r) {
940
- if (Object.prototype.hasOwnProperty.call(r, n)) {
941
- e[n] = r[n];
942
- }
930
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
943
931
  }
944
932
  }
945
933
  return e;
946
- };
947
- return Ye.apply(this, arguments);
934
+ }, nt.apply(null, arguments);
948
935
  }
949
- function Je(e, t) {
950
- if (e == null) return {};
951
- var r = Qe(e, t);
952
- var n, i;
936
+ function it(e, t) {
937
+ if (null == e) return {};
938
+ var r, n, i = ot(e, t);
953
939
  if (Object.getOwnPropertySymbols) {
954
- var a = Object.getOwnPropertySymbols(e);
955
- for (i = 0; i < a.length; i++) {
956
- n = a[i];
957
- if (t.indexOf(n) >= 0) continue;
958
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
959
- r[n] = e[n];
940
+ var o = Object.getOwnPropertySymbols(e);
941
+ for (n = 0; n < o.length; n++) {
942
+ r = o[n], t.includes(r) || {}.propertyIsEnumerable.call(e, r) && (i[r] = e[r]);
960
943
  }
961
944
  }
962
- return r;
945
+ return i;
963
946
  }
964
- function Qe(e, t) {
965
- if (e == null) return {};
947
+ function ot(e, t) {
948
+ if (null == e) return {};
966
949
  var r = {};
967
- var n = Object.keys(e);
968
- var i, a;
969
- for (a = 0; a < n.length; a++) {
970
- i = n[a];
971
- if (t.indexOf(i) >= 0) continue;
972
- r[i] = e[i];
950
+ for (var n in e) {
951
+ if ({}.hasOwnProperty.call(e, n)) {
952
+ if (t.includes(n)) continue;
953
+ r[n] = e[n];
954
+ }
973
955
  }
974
956
  return r;
975
957
  }
976
- var Ze = {
977
- children: a().node,
978
- elementRef: a().oneOfType([ a().func, a().object ]),
979
- focusMode: a().oneOf([ "roving", "normal", "never" ]),
980
- retainFocus: a().bool,
981
- stopScrollPropagation: a().bool
958
+ var at = {
959
+ children: o().node,
960
+ elementRef: o().oneOfType([ o().func, o().object ]),
961
+ focusMode: o().oneOf([ "roving", "normal", "never" ]),
962
+ retainFocus: o().bool,
963
+ stopScrollPropagation: o().bool
982
964
  };
983
965
  // the default focus control for Menu: loop, verticalArrows(up/down keys), home/end keys
984
- var et = function e(t) {
966
+ var lt = function e(t) {
985
967
  return {
986
968
  enableLoop: true,
987
969
  orientation: "vertical",
@@ -989,28 +971,28 @@
989
971
  enableHomeEnd: true
990
972
  };
991
973
  };
992
- var tt = function e(t) {
974
+ var st = function e(t) {
993
975
  var r = (0, c.keycode)(t.nativeEvent);
994
- // Handle special case for tab navigation
976
+ // Handle special case for tab navigation
995
977
  if (r === "tab" && (0, p.isTabKey)(t)) {
996
978
  return t.shiftKey ? "tabShift" : "tab";
997
979
  }
998
980
  return r;
999
981
  };
1000
- function rt(e) {
1001
- var t = e.children, i = e.elementRef, a = e.focusMode, o = e.retainFocus, c = e.stopScrollPropagation, u = Je(e, [ "children", "elementRef", "focusMode", "retainFocus", "stopScrollPropagation" ]);
982
+ function ct(e) {
983
+ var t = e.children, i = e.elementRef, o = e.focusMode, a = e.retainFocus, c = e.stopScrollPropagation, u = it(e, [ "children", "elementRef", "focusMode", "retainFocus", "stopScrollPropagation" ]);
1002
984
  // @docs-props-type MenuPropsBase
1003
985
  if (false) {}
1004
- var f = (0, r.useContext)(y), d = f.role, v = d === void 0 ? "menu" : d;
1005
- var b = (0, r.useContext)(s.PopoverContext), m = b.retainFocus;
1006
- var h = (0, r.useRef)(null);
986
+ var d = (0, r.useContext)(h), f = d.role, v = f === void 0 ? "menu" : f;
987
+ var m = (0, r.useContext)(s.PopoverContext), b = m.retainFocus;
988
+ var y = (0, r.useRef)(null);
1007
989
  var g = true;
1008
- if (o != null) {
1009
- g = o;
1010
- } else if (a === "roving") {
990
+ if (a != null) {
991
+ g = a;
992
+ } else if (o === "roving") {
1011
993
  g = false;
1012
- } else if (m != null) {
1013
- g = m;
994
+ } else if (b != null) {
995
+ g = b;
1014
996
  }
1015
997
  var k = r.Children.toArray(t).filter(r.isValidElement).reduce((function(e, t, r, n) {
1016
998
  /* Filter out initial Dividers
@@ -1020,7 +1002,7 @@
1020
1002
  if (t.type.as === "Divider" && e.length === 0) {
1021
1003
  return e;
1022
1004
  }
1023
- // Filter out consecutive Dividers and Headings
1005
+ // Filter out consecutive Dividers and Headings
1024
1006
  // If Divider is next to Heading then it will remove both Heading and Divider unless Heading has title prop set to it
1025
1007
  if ((t.type.as === "Heading" || t.type.as === "Divider") && !t.props.title && t.type.filterConsecutive && n.length > r + 1) {
1026
1008
  var i = n[r + 1];
@@ -1028,7 +1010,7 @@
1028
1010
  return e;
1029
1011
  }
1030
1012
  }
1031
- // Filter out last Dividers and Headings
1013
+ // Filter out last Dividers and Headings
1032
1014
  if ((t.type.as === "Divider" || t.type.as === "Heading") && r === n.length - 1) {
1033
1015
  return e;
1034
1016
  }
@@ -1036,59 +1018,59 @@
1036
1018
  return e;
1037
1019
  }), []);
1038
1020
  var x = (0, r.useCallback)((function(e) {
1039
- h.current = e;
1040
- xe(i, e);
1021
+ y.current = e;
1022
+ Ce(i, e);
1041
1023
  }), [ i ]);
1042
- var w = et(g);
1024
+ var w = lt(g);
1043
1025
  var S = (0, r.useCallback)((function(e) {
1044
- var t = tt(e);
1026
+ var t = st(e);
1045
1027
  var r = t === "tab" || t === "tabShift";
1046
1028
  var n = t === "enter";
1047
- // Allow default behavior for the enter key.
1029
+ // Allow default behavior for the enter key.
1048
1030
  // If tab navigation is enabled, prevent default behavior for all other keys.
1049
1031
  // If tab navigation is disabled, allow default behavior for tab and tab+shift key
1050
1032
  if (!n && (w.enableTab || !r)) {
1051
1033
  e.preventDefault();
1052
1034
  }
1053
- var i = h.current;
1054
- var a = [];
1035
+ var i = y.current;
1036
+ var o = [];
1055
1037
  if (i) {
1056
- a = (0, p.getSortedTabbableElements)(i, {
1038
+ o = (0, p.getSortedTabbableElements)(i, {
1057
1039
  ignoreTabIndex: true
1058
1040
  });
1059
1041
  }
1060
- var o = (e === null || e === void 0 ? void 0 : e.target) instanceof Element ? e.target : null;
1042
+ var a = (e === null || e === void 0 ? void 0 : e.target) instanceof Element ? e.target : null;
1061
1043
  var l = i === null || i === void 0 ? void 0 : i.querySelector(":focus");
1062
- var s = o || l;
1063
- var c = s ? a.indexOf(s) : -1;
1064
- (0, p.handleFocus)(t, a, c, w);
1044
+ var s = a || l;
1045
+ var c = s ? o.indexOf(s) : -1;
1046
+ (0, p.handleFocus)(t, o, c, w);
1065
1047
  }), [ w ]);
1066
1048
  var O = function e() {
1067
1049
  return {
1068
1050
  role: "menu",
1069
- preventFocus: a === "never"
1051
+ preventFocus: o === "never"
1070
1052
  };
1071
1053
  };
1072
- var C = a === "normal" || a === "never" ? undefined : S;
1073
- var I = {
1054
+ var C = o === "normal" || o === "never" ? undefined : S;
1055
+ var P = {
1074
1056
  "data-test": "menu",
1075
1057
  onKeyDown: C,
1076
1058
  role: v
1077
1059
  };
1078
- return c ? n().createElement(Xe, Ye({}, I, {
1060
+ return c ? n().createElement(rt, nt({}, P, {
1079
1061
  elementRef: x,
1080
1062
  stopScrollPropagation: true
1081
- }, l()(u, "tagName")), k) : n().createElement(Ue, Ye({}, I, {
1063
+ }, l()(u, "tagName")), k) : n().createElement(tt, nt({}, P, {
1082
1064
  ref: x
1083
- }, u), n().createElement(y.Provider, {
1065
+ }, u), n().createElement(h.Provider, {
1084
1066
  value: O()
1085
1067
  }, k));
1086
1068
  }
1087
- rt.propTypes = Ze;
1088
- rt.Item = Ke;
1089
- rt.Divider = w;
1090
- rt.Heading = F;
1091
- /* harmony default export */ const nt = rt;
1069
+ ct.propTypes = at;
1070
+ ct.Item = Ye;
1071
+ ct.Divider = w;
1072
+ ct.Heading = M;
1073
+ /* harmony default export */ const pt = ct;
1092
1074
  // CONCATENATED MODULE: ./src/Menu/index.ts
1093
1075
  module.exports = t;
1094
1076
  /******/})();