@splunk/react-ui 4.38.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 (136) 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 +151 -169
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +28 -0
  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 +371 -412
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +266 -303
  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 +506 -532
  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 +1589 -1902
  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 +50 -58
  57. package/Scroll.js +209 -244
  58. package/Search.js +379 -391
  59. package/Select.js +1077 -1345
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +132 -145
  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 +176 -205
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +379 -493
  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 +14 -14
  82. package/types/src/Button/Button.d.ts +5 -1
  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 +2 -2
  86. package/types/src/Color/Palette.d.ts +4 -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 -2
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Menu/Item.d.ts +18 -5
  93. package/types/src/Menu/Menu.d.ts +3 -3
  94. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  95. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  96. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  97. package/types/src/Multiselect/Option.d.ts +2 -0
  98. package/types/src/Number/Number.d.ts +3 -3
  99. package/types/src/Popover/Popover.d.ts +3 -4
  100. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  101. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  102. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  103. package/types/src/Search/Option.d.ts +9 -3
  104. package/types/src/Select/Option.d.ts +3 -1
  105. package/types/src/Select/OptionBase.d.ts +7 -5
  106. package/types/src/Select/Select.d.ts +1 -1
  107. package/types/src/Select/SelectAllOption.d.ts +4 -4
  108. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  109. package/types/src/Slider/Slider.d.ts +2 -2
  110. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  111. package/types/src/StepBar/Step.d.ts +1 -2
  112. package/types/src/Switch/Switch.d.ts +0 -1
  113. package/types/src/TabBar/Tab.d.ts +1 -1
  114. package/types/src/TabBar/TabBar.d.ts +3 -1
  115. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  116. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  117. package/types/src/Table/Table.d.ts +0 -1
  118. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  119. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  120. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  121. package/types/src/Text/Text.d.ts +2 -2
  122. package/types/src/TextArea/TextArea.d.ts +2 -2
  123. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  124. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  125. package/useForceUpdate.js +30 -32
  126. package/useKeyPress.js +1 -1
  127. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  128. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  129. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  130. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  131. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  132. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  133. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  134. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  135. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  136. /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 */ H,
66
- Item: () => /* reexport */ Be,
67
- MenuContext: () => /* reexport */ y,
68
- default: () => /* reexport */ at
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,231 +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 F(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
- F.propTypes = N;
290
- /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ F.filterConsecutive = true;
291
- /* Remove the item if it is the last item after filtering. */ F.filterLast = true;
292
- /* Tag the item as a Heading */ F.as = "Heading";
293
- /* harmony default export */ const H = F;
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);
309
308
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
310
- const U = require("@splunk/react-ui/ScreenReaderContent");
311
- var X = e.n(U);
309
+ const J = require("@splunk/react-ui/ScreenReaderContent");
310
+ var Q = e.n(J);
312
311
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
313
- const Y = require("@splunk/ui-utils/i18n");
312
+ const Z = require("@splunk/ui-utils/i18n");
314
313
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
315
- const J = require("@splunk/react-ui/Clickable");
316
- var Q = e.n(J);
314
+ const ee = require("@splunk/react-ui/Clickable");
315
+ var te = e.n(ee);
317
316
  // CONCATENATED MODULE: external "@splunk/react-ui/Switch"
318
- const Z = require("@splunk/react-ui/Switch");
319
- var ee = e.n(Z);
317
+ const re = require("@splunk/react-ui/Switch");
318
+ var ne = e.n(re);
320
319
  // CONCATENATED MODULE: ./src/Menu/ItemStyles.ts
321
- var te = (0, u.css)([ "color:", ";font-size:", ";line-height:", ";overflow:inherit;white-space:inherit;text-overflow:inherit;" ], (0,
322
- b.pick)({
323
- prisma: b.variables.contentColorDefault,
324
- enterprise: b.variables.textGray
325
- }), 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)({
326
325
  prisma: "16px"
327
326
  }));
328
- var re = f().span.withConfig({
327
+ var oe = d().span.withConfig({
329
328
  displayName: "ItemStyles__StyledItemDescriptionBottom",
330
329
  componentId: "sc-4kc053-0"
331
- })([ "", ";display:block;" ], te);
332
- var ne = f().span.withConfig({
330
+ })([ "", ";display:block;" ], ie);
331
+ var ae = d().span.withConfig({
333
332
  displayName: "ItemStyles__StyledItemDescriptionRight",
334
333
  componentId: "sc-4kc053-1"
335
- })([ "", ";float:right;", " max-width:50%;text-align:right;box-sizing:border-box;" ], te, (0,
336
- b.pick)({
337
- 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)
338
337
  }));
339
- var ie = f().div.withConfig({
340
- displayName: "ItemStyles__StyledItemSelectedIcon",
338
+ var le = d().div.withConfig({
339
+ displayName: "ItemStyles__StyledItemSelectedAdornment",
341
340
  componentId: "sc-4kc053-2"
342
- })([ "position:absolute;", " color:", ";" ], (0, b.pick)({
341
+ })([ "position:absolute;", " color:", ";" ], (0, m.pick)({
343
342
  prisma: (0, u.css)([ "right:16px;" ]),
344
343
  enterprise: (0, u.css)([ "right:3px;left:8px;" ])
345
- }), (0, b.pick)({
346
- prisma: b.variables.contentColorActive,
347
- enterprise: b.variables.accentColorL10
344
+ }), (0, m.pick)({
345
+ prisma: m.variables.contentColorActive,
346
+ enterprise: m.variables.accentColorL10
348
347
  }));
349
- var ae = f().span.withConfig({
350
- displayName: "ItemStyles__StyledItemIcon",
348
+ var se = d().span.withConfig({
349
+ displayName: "ItemStyles__StyledItemAdornment",
351
350
  componentId: "sc-4kc053-3"
352
- })([ "flex:0 0 auto;padding-right:", ";min-width:10px;display:inline-block;text-align:center;vertical-align:", ";", "" ], (0,
353
- b.pick)({
351
+ })([ "flex:0 0 auto;padding-right:", ";", " min-width:10px;display:inline-block;text-align:center;vertical-align:", ";", "" ], (0,
352
+ m.pick)({
354
353
  prisma: "8px",
355
354
  enterprise: "3px"
356
- }), (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)({
357
362
  prisma: "initial",
358
363
  enterprise: "middle"
359
- }), (0, b.pick)({
360
- 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),
361
366
  enterprise: (0, u.css)([ "transform:translateY(-1px);" ])
362
367
  }));
363
- var oe = f()(Q()).withConfig({
368
+ var ce = d()(te()).withConfig({
364
369
  displayName: "ItemStyles__StyledClickable",
365
370
  componentId: "sc-4kc053-4"
366
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,
367
- b.pick)({
368
- prisma: b.variables.contentColorActive,
372
+ m.pick)({
373
+ prisma: m.variables.contentColorActive,
369
374
  enterprise: {
370
- dark: b.variables.gray96,
371
- light: b.variables.gray22
375
+ dark: m.variables.gray96,
376
+ light: m.variables.gray22
372
377
  }
373
- }), (0, b.pick)({
378
+ }), (0, m.pick)({
374
379
  prisma: {
375
380
  comfortable: "10px 16px",
376
381
  compact: "6px 16px"
@@ -378,7 +383,7 @@
378
383
  enterprise: "6px 10px"
379
384
  }), (function(e) {
380
385
  var t = e.$isSelectable, r = e.$selectableAppearance;
381
- return t && (0, b.pick)({
386
+ return t && (0, m.pick)({
382
387
  prisma: (0, u.css)([ "padding-right:44px;", "" ], (function() {
383
388
  return r === "checkbox" && "padding-left: 42px;";
384
389
  })),
@@ -388,138 +393,128 @@
388
393
  });
389
394
  }), (function(e) {
390
395
  var t = e.$active, r = e.$preventFocus;
391
- return t && !r && (0, u.css)([ "box-shadow:", ";" ], b.variables.focusShadowInset);
396
+ return t && !r && (0, u.css)([ "box-shadow:", ";" ], m.variables.focusShadowInset);
392
397
  }), (function(e) {
393
398
  var t = e.$active;
394
- return t && (0, u.css)([ "background:", ";font-weight:", ";" ], (0, b.pick)({
399
+ return t && (0, u.css)([ "background:", ";font-weight:", ";" ], (0, m.pick)({
395
400
  enterprise: {
396
- light: b.variables.gray92,
397
- dark: b.variables.gray22
401
+ light: m.variables.gray92,
402
+ dark: m.variables.gray22
398
403
  },
399
- prisma: b.variables.neutral100
400
- }), b.variables.fontWeightBold);
401
- }), (0, b.pick)({
402
- prisma: b.variables.interactiveColorOverlayHover,
403
- 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
404
409
  }), (function(e) {
405
410
  var t = e.$selected;
406
- return t && (0, b.pick)({
407
- 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))
408
413
  });
409
- }), (0, b.pick)({
410
- prisma: (0, u.css)([ "&:active{background:", ";}" ], b.variables.interactiveColorOverlayActive)
414
+ }), (0, m.pick)({
415
+ prisma: (0, u.css)([ "&:active{background:", ";}" ], m.variables.interactiveColorOverlayActive)
411
416
  }), (function(e) {
412
417
  var t = e.$selected;
413
- return t && (0, b.pick)({
414
- 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))
415
420
  });
416
- }), b.variables.focusShadowInset, (0, b.pick)({
417
- prisma: (0, u.css)([ "background:", ";" ], b.variables.interactiveColorOverlayHover)
418
- }), (0, b.pick)({
421
+ }), m.variables.focusShadowInset, (0, m.pick)({
422
+ prisma: (0, u.css)([ "background:", ";" ], m.variables.interactiveColorOverlayHover)
423
+ }), (0, m.pick)({
419
424
  enterprise: {
420
- light: b.variables.gray45,
421
- dark: b.variables.contentColorDisabled
425
+ light: m.variables.gray45,
426
+ dark: m.variables.contentColorDisabled
422
427
  },
423
- prisma: b.variables.contentColorDisabled
424
- }),
425
- /* sc-sel */
426
- re,
427
- /* sc-sel */
428
- ne,
429
- /* sc-sel */
430
- ie, (0, b.pick)({
431
- prisma: b.variables.contentColorDisabled,
432
- enterprise: b.variables.gray80
433
- }), (0, b.pick)({
434
- prisma: (0, u.css)([ "& > * > ", "{color:", ";}" ],
435
- /* sc-sel */
436
- ae, 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)
437
434
  }), (function(e) {
438
435
  var t = e.$selected;
439
- return t && (0, b.pick)({
440
- prisma: (0, u.css)([ "", "{color:", ";}" ],
441
- /* sc-sel */
442
- ae, b.variables.contentColorActive)
436
+ return t && (0, m.pick)({
437
+ prisma: (0, u.css)([ "", "{color:", ";}" ], /* sc-sel */ se, m.variables.contentColorActive)
443
438
  });
444
439
  }));
445
- var le = f()(ee()).withConfig({
440
+ var pe = d()(ne()).withConfig({
446
441
  displayName: "ItemStyles__StyledSwitch",
447
442
  componentId: "sc-4kc053-5"
448
- })([ "position:absolute;left:", ";top:", ";" ], (0, b.pick)({
443
+ })([ "position:absolute;left:", ";top:", ";" ], (0, m.pick)({
449
444
  prisma: "16px",
450
445
  enterprise: "8px"
451
- }), (0, b.pick)({
446
+ }), (0, m.pick)({
452
447
  prisma: "0px",
453
448
  enterprise: {
454
449
  comfortable: "-1px",
455
450
  compact: "2px"
456
451
  }
457
452
  }));
458
- var se = f().span.withConfig({
453
+ var ue = d().span.withConfig({
459
454
  displayName: "ItemStyles__StyledInnerWrapper",
460
455
  componentId: "sc-4kc053-6"
461
456
  })([ "display:flex;align-items:flex-start;" ]);
462
- var ce = f().span.withConfig({
457
+ var de = d().span.withConfig({
463
458
  displayName: "ItemStyles__StyledTitleAndDescriptionWrapper",
464
459
  componentId: "sc-4kc053-7"
465
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) {
466
461
  var t = e.$truncate;
467
462
  return t && (0, u.css)([ "white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ]);
468
463
  }));
469
- var pe = f().div.withConfig({
464
+ var fe = d().div.withConfig({
470
465
  displayName: "ItemStyles__StyledLabel",
471
466
  componentId: "sc-4kc053-8"
472
467
  })([ "overflow:inherit;white-space:inherit;text-overflow:inherit;max-width:100%;min-height:20px;", "" ], (function(e) {
473
468
  var t = e.$truncate;
474
469
  return t && (0, u.css)([ "display:block;clear:both;" ]);
475
470
  }));
476
- var ue = f().span.withConfig({
471
+ var ve = d().span.withConfig({
477
472
  displayName: "ItemStyles__StyledMatch",
478
473
  componentId: "sc-4kc053-9"
479
- })([ "border-bottom:1px solid ", ";" ], (0, b.pick)({
480
- prisma: b.variables.contentColorActive,
474
+ })([ "border-bottom:1px solid ", ";" ], (0, m.pick)({
475
+ prisma: m.variables.contentColorActive,
481
476
  enterprise: {
482
- dark: b.variables.gray96,
483
- light: b.variables.gray45
477
+ dark: m.variables.gray96,
478
+ light: m.variables.gray45
484
479
  }
485
480
  }));
486
- var fe = f().span.withConfig({
481
+ var me = d().span.withConfig({
487
482
  displayName: "ItemStyles__StyledSubmenu",
488
483
  componentId: "sc-4kc053-10"
489
- })([ "float:right;padding-left:", ";color:", ";", "" ], b.variables.spacingSmall, (0,
490
- b.pick)({
484
+ })([ "float:right;padding-left:", ";color:", ";", "" ], m.variables.spacingSmall, (0,
485
+ m.pick)({
491
486
  prisma: "inherit",
492
- enterprise: b.variables.textGray
493
- }), (0, b.pick)({
487
+ enterprise: m.variables.textGray
488
+ }), (0, m.pick)({
494
489
  prisma: (0, u.css)([ "& > svg{width:20px;height:20px;}" ])
495
490
  }));
496
491
  // CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRight"
497
- const de = require("@splunk/react-icons/ArrowSquareTopRight");
498
- var ve = e.n(de);
492
+ const be = require("@splunk/react-icons/ArrowSquareTopRight");
493
+ var ye = e.n(be);
499
494
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/External"
500
- const be = require("@splunk/react-icons/enterprise/External");
501
- var me = e.n(be);
495
+ const he = require("@splunk/react-icons/enterprise/External");
496
+ var ge = e.n(he);
502
497
  // CONCATENATED MODULE: ./src/Menu/icons/External.tsx
503
- var he = (0, u.css)([ "width:0.8em;height:0.8em;vertical-align:baseline;" ]);
504
- var ye = f()(me()).withConfig({
498
+ var ke = (0, u.css)([ "width:0.8em;height:0.8em;vertical-align:baseline;" ]);
499
+ var xe = d()(ge()).withConfig({
505
500
  displayName: "External__StyledEnterprise",
506
501
  componentId: "sc-1turs2s-0"
507
- })([ "", " margin:0 0 0 3px;" ], he);
508
- var ge = f()(ve()).withConfig({
502
+ })([ "", " margin:0 0 0 3px;" ], ke);
503
+ var we = d()(ye()).withConfig({
509
504
  displayName: "External__StyledPrisma",
510
505
  componentId: "sc-1turs2s-1"
511
- })([ "", " margin:0 0 0 4px;" ], he);
512
- function ke() {
513
- 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;
514
509
  var i = r ? "20px" : "24px";
515
- return t ? n().createElement(ye, {
510
+ return t ? n().createElement(xe, {
516
511
  screenReaderText: null
517
- }) : n().createElement(ge, {
512
+ }) : n().createElement(we, {
518
513
  height: i,
519
514
  width: i
520
515
  });
521
516
  }
522
- /* harmony default export */ const xe = ke;
517
+ /* harmony default export */ const Oe = Se;
523
518
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
524
519
  /**
525
520
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
@@ -527,7 +522,7 @@
527
522
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
528
523
  * @param current - The new value of the ref.
529
524
  */
530
- function we(e, t) {
525
+ function Ce(e, t) {
531
526
  if (e) {
532
527
  if (typeof e === "function") {
533
528
  e(t);
@@ -541,7 +536,7 @@
541
536
  }
542
537
  // CONCATENATED MODULE: ./src/utils/scrollIntoViewIfNeeded.ts
543
538
  // A utility that attempts to move an element into view by scrolling it's derived parent.
544
- var Se = function e(t) {
539
+ var Pe = function e(t) {
545
540
  if (!t) {
546
541
  return;
547
542
  }
@@ -549,194 +544,176 @@
549
544
  if (!r) {
550
545
  return;
551
546
  }
552
- // Below the bottom of the container.
547
+ // Below the bottom of the container.
553
548
  if (r.scrollTop + r.clientHeight < t.offsetTop + t.clientHeight) {
554
549
  r.scrollTop = t.offsetTop + t.clientHeight - r.clientHeight;
555
- // Above the top of the container.
550
+ // Above the top of the container.
556
551
  } else if (r.scrollTop > t.offsetTop) {
557
552
  r.scrollTop = t.offsetTop;
558
553
  }
559
554
  };
560
555
  // CONCATENATED MODULE: ./src/Menu/Item.tsx
561
- function Oe(e) {
556
+ function Ee(e) {
562
557
  "@babel/helpers - typeof";
563
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
564
- Oe = function e(t) {
565
- return typeof t;
566
- };
567
- } else {
568
- Oe = function e(t) {
569
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
570
- };
571
- }
572
- return Oe(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);
573
563
  }
574
- function Ce() {
575
- Ce = Object.assign || function(e) {
564
+ function Ie() {
565
+ return Ie = Object.assign ? Object.assign.bind() : function(e) {
576
566
  for (var t = 1; t < arguments.length; t++) {
577
567
  var r = arguments[t];
578
568
  for (var n in r) {
579
- if (Object.prototype.hasOwnProperty.call(r, n)) {
580
- e[n] = r[n];
581
- }
569
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
582
570
  }
583
571
  }
584
572
  return e;
585
- };
586
- return Ce.apply(this, arguments);
573
+ }, Ie.apply(null, arguments);
587
574
  }
588
- function Ie(e, t) {
589
- if (e == null) return {};
590
- var r = Pe(e, t);
591
- var n, i;
575
+ function je(e, t) {
576
+ if (null == e) return {};
577
+ var r, n, i = _e(e, t);
592
578
  if (Object.getOwnPropertySymbols) {
593
- var a = Object.getOwnPropertySymbols(e);
594
- for (i = 0; i < a.length; i++) {
595
- n = a[i];
596
- if (t.indexOf(n) >= 0) continue;
597
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
598
- 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]);
599
582
  }
600
583
  }
601
- return r;
584
+ return i;
602
585
  }
603
- function Pe(e, t) {
604
- if (e == null) return {};
586
+ function _e(e, t) {
587
+ if (null == e) return {};
605
588
  var r = {};
606
- var n = Object.keys(e);
607
- var i, a;
608
- for (a = 0; a < n.length; a++) {
609
- i = n[a];
610
- if (t.indexOf(i) >= 0) continue;
611
- 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
+ }
612
594
  }
613
595
  return r;
614
596
  }
615
- function _e(e, t) {
616
- if (!(e instanceof t)) {
617
- throw new TypeError("Cannot call a class as a function");
618
- }
597
+ function Te(e, t) {
598
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
619
599
  }
620
- function je(e, t) {
600
+ function De(e, t) {
621
601
  for (var r = 0; r < t.length; r++) {
622
602
  var n = t[r];
623
- n.enumerable = n.enumerable || false;
624
- n.configurable = true;
625
- if ("value" in n) n.writable = true;
626
- 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);
627
605
  }
628
606
  }
629
- function Ee(e, t, r) {
630
- if (t) je(e.prototype, t);
631
- if (r) je(e, r);
632
- 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;
633
611
  }
634
- function Te(e, t) {
635
- if (typeof t !== "function" && t !== null) {
636
- throw new TypeError("Super expression must either be null or a function");
637
- }
612
+ function Ne(e, t) {
613
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
638
614
  e.prototype = Object.create(t && t.prototype, {
639
615
  constructor: {
640
616
  value: e,
641
- writable: true,
642
- configurable: true
617
+ writable: !0,
618
+ configurable: !0
643
619
  }
644
- });
645
- if (t) De(e, t);
620
+ }), Object.defineProperty(e, "prototype", {
621
+ writable: !1
622
+ }), t && Ae(e, t);
646
623
  }
647
- function De(e, t) {
648
- De = Object.setPrototypeOf || function e(t, r) {
649
- t.__proto__ = r;
650
- return t;
651
- };
652
- return De(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);
653
628
  }
654
- function qe(e) {
655
- var t = Fe();
656
- return function r() {
657
- var n = He(e), i;
629
+ function Re(e) {
630
+ var t = $e();
631
+ return function() {
632
+ var r, n = Me(e);
658
633
  if (t) {
659
- var a = He(this).constructor;
660
- i = Reflect.construct(n, arguments, a);
661
- } else {
662
- i = n.apply(this, arguments);
663
- }
664
- return Re(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);
665
638
  };
666
639
  }
667
- function Re(e, t) {
668
- if (t && (Oe(t) === "object" || typeof t === "function")) {
669
- return t;
670
- }
671
- return Ne(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);
672
644
  }
673
- function Ne(e) {
674
- if (e === void 0) {
675
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
676
- }
645
+ function He(e) {
646
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
677
647
  return e;
678
648
  }
679
- function Fe() {
680
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
681
- if (Reflect.construct.sham) return false;
682
- if (typeof Proxy === "function") return true;
649
+ function $e() {
683
650
  try {
684
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
685
- return true;
686
- } catch (e) {
687
- return false;
688
- }
651
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
652
+ } catch (e) {}
653
+ return ($e = function t() {
654
+ return !!e;
655
+ })();
689
656
  }
690
- function He(e) {
691
- He = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
692
- return t.__proto__ || Object.getPrototypeOf(t);
693
- };
694
- 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);
695
661
  }
696
- function $e(e, t, r) {
697
- if (t in e) {
698
- Object.defineProperty(e, t, {
699
- value: r,
700
- enumerable: true,
701
- configurable: true,
702
- writable: true
703
- });
704
- } else {
705
- 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.");
706
681
  }
707
- return e;
682
+ return ("string" === t ? String : Number)(e);
708
683
  }
709
- var Ae = {
710
- active: a().bool,
711
- children: a().node,
712
- description: a().string,
713
- descriptionPosition: a().oneOf([ "right", "bottom" ]),
714
- disabled: a().oneOfType([ a().bool, a().oneOf([ "dimmed" ]) ]),
715
- elementRef: a().oneOfType([ a().func, a().object ]),
716
- hasSubmenu: a().bool,
717
- 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,
718
694
  /** @private. The internal key of the tab */
719
- itemKey: a().number,
720
- matchRanges: a().arrayOf(a().shape({
721
- start: a().number.isRequired,
722
- end: a().number.isRequired
695
+ itemKey: o().number,
696
+ matchRanges: o().arrayOf(o().shape({
697
+ start: o().number.isRequired,
698
+ end: o().number.isRequired
723
699
  })),
724
- onClick: a().func,
700
+ onClick: o().func,
725
701
  /** @private */
726
- onFocus: a().func,
727
- openInNewContext: a().oneOfType([ a().bool, a().string ]),
702
+ onFocus: o().func,
703
+ openInNewContext: o().oneOfType([ o().bool, o().string ]),
728
704
  /** @private */
729
- preventFocus: a().bool,
730
- role: a().oneOf([ "menuitem", "menuitemradio", "menuitemcheckbox", "listboxitem", "option" ]),
731
- selectable: a().bool,
732
- selectableAppearance: a().oneOf([ "checkmark", "checkbox" ]),
733
- 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" ]) ]),
734
710
  /** @private */
735
- splunkTheme: a().object,
736
- to: a().string,
737
- truncate: a().bool
711
+ splunkTheme: o().object,
712
+ startAdornment: o().node,
713
+ to: o().string,
714
+ truncate: o().bool
738
715
  };
739
- var Me = {
716
+ var We = {
740
717
  active: false,
741
718
  descriptionPosition: "bottom",
742
719
  hasSubmenu: false,
@@ -747,11 +724,11 @@
747
724
  selected: false,
748
725
  truncate: false
749
726
  };
750
- var Le = (0, Y._)("(Opens new window)");
751
- var ze = function(e) {
752
- Te(r, e);
753
- var t = qe(r);
754
- Ee(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, [ {
755
732
  key: "validateProps",
756
733
  // @docs-props-type ItemPropsBase
757
734
  value: function e(t) {
@@ -760,236 +737,233 @@
760
737
  } ]);
761
738
  function r(e) {
762
739
  var n;
763
- _e(this, r);
740
+ Te(this, r);
764
741
  n = t.call(this, e);
765
- $e(Ne(n), "el", null);
766
- $e(Ne(n), "handleFocus", (function(e) {
742
+ Le(He(n), "el", null);
743
+ Le(He(n), "handleFocus", (function(e) {
767
744
  var t = n.props, r = t.onFocus, i = t.itemKey;
768
745
  r === null || r === void 0 ? void 0 : r(e, {
769
746
  itemKey: i
770
747
  });
771
748
  }));
772
- $e(Ne(n), "handleMount", (function(e) {
749
+ Le(He(n), "handleMount", (function(e) {
773
750
  n.el = e;
774
- we(n.props.elementRef, e);
751
+ Ce(n.props.elementRef, e);
775
752
  }));
776
753
  r.validateProps(e);
777
754
  return n;
778
755
  }
779
- Ee(r, [ {
756
+ qe(r, [ {
780
757
  key: "componentDidUpdate",
781
758
  value: function e() {
782
759
  r.validateProps(this.props);
783
760
  }
784
761
  }, {
785
762
  key: "focus",
763
+ // eslint-disable-next-line react/no-unused-class-component-methods
786
764
  value: function e() {
787
765
  var t;
788
766
  (t = this.el) === null || t === void 0 ? void 0 : t.focus();
789
767
  }
790
- }, {
768
+ // eslint-disable-next-line react/no-unused-class-component-methods
769
+ }, {
791
770
  key: "scrollIntoViewIfNeeded",
792
771
  value: function e() {
793
- Se(this.el);
772
+ Pe(this.el);
794
773
  }
795
774
  }, {
796
775
  key: "renderLabel",
797
776
  value: function e() {
798
777
  var t = this.props, r = t.children, i = t.matchRanges;
799
- if (!i || !A()(r)) {
778
+ if (!i || !z()(r)) {
800
779
  return r;
801
780
  }
802
- var a = [];
803
- // before first match. May be empty string.
804
- 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));
805
784
  i.forEach((function(e, t) {
806
- a.push(
785
+ o.push(
807
786
 
808
787
  // eslint-disable-next-line react/no-array-index-key
809
- n().createElement(ue, {
788
+ n().createElement(ve, {
810
789
  key: t,
811
790
  "data-test": "match"
812
791
  }, r.substring(e.start, e.end)));
813
792
  if (t < i.length - 1) {
814
- a.push(r.substring(e.end, i[t + 1].start));
793
+ o.push(r.substring(e.end, i[t + 1].start));
815
794
  } else {
816
- a.push(r.substring(e.end, r.length));
795
+ o.push(r.substring(e.end, r.length));
817
796
  }
818
797
  }));
819
- return a;
798
+ return o;
820
799
  }
821
800
  }, {
822
801
  key: "render",
823
802
  value: function e() {
824
- 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 = Ie(t, [ "active", "children", "hasSubmenu", "selectable", "selectableAppearance", "selected", "icon", "description", "disabled", "onClick", "role", "splunkTheme", "to", "truncate", "descriptionPosition", "openInNewContext" ]);
825
- var x = b.isEnterprise, w = b.isPrisma;
826
- var S = this.context.preventFocus;
827
- var O = o || c;
828
- var C = v || {
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 || {
829
809
  nonselectable: "menuitem",
830
810
  checkmark: "menuitemradio",
831
811
  checkbox: "menuitemcheckbox"
832
- }[O ? s : "nonselectable"];
833
- var I = {
834
- "aria-haspopup": a ? true : undefined,
835
- "aria-checked": C === "menuitemradio" || C === "menuitemcheckbox" ? c : undefined,
836
- "aria-selected": C === "option" && c ? true : undefined
812
+ }[E ? s : "nonselectable"];
813
+ var j = {
814
+ "aria-haspopup": o ? true : undefined
837
815
  };
838
- var P = w ? "right" : "left";
839
- var _ = u && y === "right";
840
- var j = u && !_;
841
- var E = c && s === "checkmark" && n().createElement(ie, 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(), {
842
825
  inline: true,
843
826
  height: "16",
844
827
  width: "16"
845
- }) : n().createElement(B(), {
828
+ }) : n().createElement(U(), {
846
829
  hideDefaultTooltip: true,
847
830
  inline: true,
848
831
  screenReaderText: null,
849
832
  size: .85
850
833
  }));
851
- var T = false;
852
- var D;
834
+ var N = false;
835
+ var A;
853
836
  if (g) {
854
- T = true;
855
- D = typeof g === "string" ? g : Le;
837
+ N = true;
838
+ A = typeof g === "string" ? g : Ge;
856
839
  }
857
840
 
858
- return n().createElement(oe, Ce({
859
- $isSelectable: O,
841
+ return n().createElement(ce, Ie({
842
+ $isSelectable: E,
860
843
  $selectableAppearance: s,
861
- $selected: c,
844
+ $selected: P,
862
845
  $active: r,
863
- $preventFocus: S || false,
864
- "data-test-selected": O ? c : null,
846
+ $preventFocus: C || false,
847
+ "data-test-selected": E ? P : null,
865
848
  "data-test": "item",
866
- "data-has-icon": !!p,
867
- disabled: f,
868
- onClick: d,
849
+ "data-has-icon": !!p || !!x || !!k,
850
+ disabled: d,
851
+ onClick: f,
869
852
  onFocus: this.handleFocus,
870
853
  onMouseDown: function e(t) {
871
- if (S) {
854
+ if (C) {
872
855
  t.preventDefault();
873
856
  }
874
857
  },
875
- role: C,
876
- tabIndex: S ? -1 : undefined,
877
- to: m,
878
- title: h && A()(i) ? i : undefined,
879
- openInNewContext: T
880
- }, 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"), {
881
864
  elementRef: this.handleMount
882
- }), o && s === "checkbox" && n().createElement(le, {
865
+ }), a && s === "checkbox" && n().createElement(pe, {
883
866
  interactive: false,
884
- selected: c,
867
+ value: "menu-item",
885
868
  selectedLabel: "Selected",
886
- value: "menu-item"
887
- }), a && n().createElement(fe, null, x ? n().createElement(V(), {
869
+ selected: c
870
+ }), o && n().createElement(me, null, S ? n().createElement(Y(), {
888
871
  hideDefaultTooltip: true,
889
872
  screenReaderText: null
890
- }) : n().createElement(L(), null)), _ && n().createElement(ne, {
873
+ }) : n().createElement(B(), null)), T && n().createElement(ae, {
891
874
  "data-test": "description"
892
- }, u), n().createElement(se, null, p && n().createElement(ae, null, p), n().createElement(ce, {
893
- $truncate: h
894
- }, P === "left" && E, n().createElement(pe, {
895
- $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,
896
879
  "data-test": "label"
897
- }, this.renderLabel(), g && n().createElement(n().Fragment, null, n().createElement(xe, null), n().createElement(X(), null, D))), j && n().createElement(re, {
880
+ }, this.renderLabel(), g && n().createElement(n().Fragment, null, n().createElement(Oe, null), n().createElement(Q(), null, A))), D && n().createElement(oe, {
898
881
  "data-test": "description"
899
- }, u), P === "right" && E)));
882
+ }, u), _ === "right" && q), k && n().createElement(se, {
883
+ endAdornment: k
884
+ }, k)));
900
885
  }
901
886
  } ]);
902
887
  return r;
903
888
  }(r.Component);
904
- $e(ze, "propTypes", Ae);
905
- $e(ze, "defaultProps", Me);
906
- $e(ze, "as", void 0);
907
- $e(ze, "contextType", y);
908
- var Ke = (0, b.withSplunkTheme)(ze);
909
- var We = Ke;
910
- We.propTypes = ze.propTypes;
911
- We.as = "Item";
912
- /* harmony default export */ const Be = We;
913
- // CONCATENATED MODULE: external "@splunk/react-ui/Scroll"
914
- const Ge = require("@splunk/react-ui/Scroll");
915
- var Ve = e.n(Ge);
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);
916
902
  // CONCATENATED MODULE: ./src/Menu/MenuStyles.ts
917
- var Ue = (0, u.css)([ "border-top:1px solid ", ";" ], (0, b.pick)({
918
- enterprise: b.variables.gray60,
919
- 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
920
906
  }));
921
- var Xe = (0, u.css)([ "", ";background-color:", ";border-radius:", ";min-width:60px;overflow:auto;position:relative;", " &:focus{outline:0;box-shadow:", ";", "}& + &{", "}" ], b.mixins.reset("block"), (0,
922
- b.pick)({
923
- enterprise: b.variables.backgroundColor,
924
- prisma: b.variables.backgroundColorPopup
925
- }), 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)({
926
912
  prisma: (0, u.css)([ "padding:8px 0;" ])
927
- }), b.variables.focusShadowInset, (0, b.pick)({
928
- prisma: (0, u.css)([ "background:", ";" ], b.variables.interactiveColorOverlayHover)
929
- }), Ue);
930
- var Ye = 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({
931
917
  displayName: "MenuStyles__Styled",
932
918
  componentId: "sc-1olffp9-0"
933
- })([ "", "" ], Xe);
934
- var Je = f()(Ve()).withConfig({
919
+ })([ "", "" ], et);
920
+ var rt = d()(Qe()).withConfig({
935
921
  displayName: "MenuStyles__StyledScroll",
936
922
  componentId: "sc-1olffp9-1"
937
- })([ "", " ", " + &,& + ", "{", "}" ], Xe,
938
- /* sc-sel */
939
- Ye,
940
- /* sc-sel */
941
- Ye, Ue);
923
+ })([ "", " ", " + &,& + ", "{", "}" ], et, /* sc-sel */ tt, /* sc-sel */ tt, Ze);
942
924
  // CONCATENATED MODULE: ./src/Menu/Menu.tsx
943
- function Qe() {
944
- Qe = Object.assign || function(e) {
925
+ function nt() {
926
+ return nt = Object.assign ? Object.assign.bind() : function(e) {
945
927
  for (var t = 1; t < arguments.length; t++) {
946
928
  var r = arguments[t];
947
929
  for (var n in r) {
948
- if (Object.prototype.hasOwnProperty.call(r, n)) {
949
- e[n] = r[n];
950
- }
930
+ ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
951
931
  }
952
932
  }
953
933
  return e;
954
- };
955
- return Qe.apply(this, arguments);
934
+ }, nt.apply(null, arguments);
956
935
  }
957
- function Ze(e, t) {
958
- if (e == null) return {};
959
- var r = et(e, t);
960
- var n, i;
936
+ function it(e, t) {
937
+ if (null == e) return {};
938
+ var r, n, i = ot(e, t);
961
939
  if (Object.getOwnPropertySymbols) {
962
- var a = Object.getOwnPropertySymbols(e);
963
- for (i = 0; i < a.length; i++) {
964
- n = a[i];
965
- if (t.indexOf(n) >= 0) continue;
966
- if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
967
- 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]);
968
943
  }
969
944
  }
970
- return r;
945
+ return i;
971
946
  }
972
- function et(e, t) {
973
- if (e == null) return {};
947
+ function ot(e, t) {
948
+ if (null == e) return {};
974
949
  var r = {};
975
- var n = Object.keys(e);
976
- var i, a;
977
- for (a = 0; a < n.length; a++) {
978
- i = n[a];
979
- if (t.indexOf(i) >= 0) continue;
980
- 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
+ }
981
955
  }
982
956
  return r;
983
957
  }
984
- var tt = {
985
- children: a().node,
986
- elementRef: a().oneOfType([ a().func, a().object ]),
987
- focusMode: a().oneOf([ "roving", "normal", "never" ]),
988
- retainFocus: a().bool,
989
- 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
990
964
  };
991
965
  // the default focus control for Menu: loop, verticalArrows(up/down keys), home/end keys
992
- var rt = function e(t) {
966
+ var lt = function e(t) {
993
967
  return {
994
968
  enableLoop: true,
995
969
  orientation: "vertical",
@@ -997,28 +971,28 @@
997
971
  enableHomeEnd: true
998
972
  };
999
973
  };
1000
- var nt = function e(t) {
974
+ var st = function e(t) {
1001
975
  var r = (0, c.keycode)(t.nativeEvent);
1002
- // Handle special case for tab navigation
976
+ // Handle special case for tab navigation
1003
977
  if (r === "tab" && (0, p.isTabKey)(t)) {
1004
978
  return t.shiftKey ? "tabShift" : "tab";
1005
979
  }
1006
980
  return r;
1007
981
  };
1008
- function it(e) {
1009
- var t = e.children, i = e.elementRef, a = e.focusMode, o = e.retainFocus, c = e.stopScrollPropagation, u = Ze(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" ]);
1010
984
  // @docs-props-type MenuPropsBase
1011
985
  if (false) {}
1012
- var f = (0, r.useContext)(y), d = f.role, v = d === void 0 ? "menu" : d;
1013
- var b = (0, r.useContext)(s.PopoverContext), m = b.retainFocus;
1014
- 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);
1015
989
  var g = true;
1016
- if (o != null) {
1017
- g = o;
1018
- } else if (a === "roving") {
990
+ if (a != null) {
991
+ g = a;
992
+ } else if (o === "roving") {
1019
993
  g = false;
1020
- } else if (m != null) {
1021
- g = m;
994
+ } else if (b != null) {
995
+ g = b;
1022
996
  }
1023
997
  var k = r.Children.toArray(t).filter(r.isValidElement).reduce((function(e, t, r, n) {
1024
998
  /* Filter out initial Dividers
@@ -1028,7 +1002,7 @@
1028
1002
  if (t.type.as === "Divider" && e.length === 0) {
1029
1003
  return e;
1030
1004
  }
1031
- // Filter out consecutive Dividers and Headings
1005
+ // Filter out consecutive Dividers and Headings
1032
1006
  // If Divider is next to Heading then it will remove both Heading and Divider unless Heading has title prop set to it
1033
1007
  if ((t.type.as === "Heading" || t.type.as === "Divider") && !t.props.title && t.type.filterConsecutive && n.length > r + 1) {
1034
1008
  var i = n[r + 1];
@@ -1036,7 +1010,7 @@
1036
1010
  return e;
1037
1011
  }
1038
1012
  }
1039
- // Filter out last Dividers and Headings
1013
+ // Filter out last Dividers and Headings
1040
1014
  if ((t.type.as === "Divider" || t.type.as === "Heading") && r === n.length - 1) {
1041
1015
  return e;
1042
1016
  }
@@ -1044,59 +1018,59 @@
1044
1018
  return e;
1045
1019
  }), []);
1046
1020
  var x = (0, r.useCallback)((function(e) {
1047
- h.current = e;
1048
- we(i, e);
1021
+ y.current = e;
1022
+ Ce(i, e);
1049
1023
  }), [ i ]);
1050
- var w = rt(g);
1024
+ var w = lt(g);
1051
1025
  var S = (0, r.useCallback)((function(e) {
1052
- var t = nt(e);
1026
+ var t = st(e);
1053
1027
  var r = t === "tab" || t === "tabShift";
1054
1028
  var n = t === "enter";
1055
- // Allow default behavior for the enter key.
1029
+ // Allow default behavior for the enter key.
1056
1030
  // If tab navigation is enabled, prevent default behavior for all other keys.
1057
1031
  // If tab navigation is disabled, allow default behavior for tab and tab+shift key
1058
1032
  if (!n && (w.enableTab || !r)) {
1059
1033
  e.preventDefault();
1060
1034
  }
1061
- var i = h.current;
1062
- var a = [];
1035
+ var i = y.current;
1036
+ var o = [];
1063
1037
  if (i) {
1064
- a = (0, p.getSortedTabbableElements)(i, {
1038
+ o = (0, p.getSortedTabbableElements)(i, {
1065
1039
  ignoreTabIndex: true
1066
1040
  });
1067
1041
  }
1068
- 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;
1069
1043
  var l = i === null || i === void 0 ? void 0 : i.querySelector(":focus");
1070
- var s = o || l;
1071
- var c = s ? a.indexOf(s) : -1;
1072
- (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);
1073
1047
  }), [ w ]);
1074
1048
  var O = function e() {
1075
1049
  return {
1076
1050
  role: "menu",
1077
- preventFocus: a === "never"
1051
+ preventFocus: o === "never"
1078
1052
  };
1079
1053
  };
1080
- var C = a === "normal" || a === "never" ? undefined : S;
1081
- var I = {
1054
+ var C = o === "normal" || o === "never" ? undefined : S;
1055
+ var P = {
1082
1056
  "data-test": "menu",
1083
1057
  onKeyDown: C,
1084
1058
  role: v
1085
1059
  };
1086
- return c ? n().createElement(Je, Qe({}, I, {
1060
+ return c ? n().createElement(rt, nt({}, P, {
1087
1061
  elementRef: x,
1088
1062
  stopScrollPropagation: true
1089
- }, l()(u, "tagName")), k) : n().createElement(Ye, Qe({}, I, {
1063
+ }, l()(u, "tagName")), k) : n().createElement(tt, nt({}, P, {
1090
1064
  ref: x
1091
- }, u), n().createElement(y.Provider, {
1065
+ }, u), n().createElement(h.Provider, {
1092
1066
  value: O()
1093
1067
  }, k));
1094
1068
  }
1095
- it.propTypes = tt;
1096
- it.Item = Be;
1097
- it.Divider = w;
1098
- it.Heading = H;
1099
- /* harmony default export */ const at = it;
1069
+ ct.propTypes = at;
1070
+ ct.Item = Ye;
1071
+ ct.Divider = w;
1072
+ ct.Heading = M;
1073
+ /* harmony default export */ const pt = ct;
1100
1074
  // CONCATENATED MODULE: ./src/Menu/index.ts
1101
1075
  module.exports = t;
1102
1076
  /******/})();