@splunk/react-ui 5.0.0-beta.5 → 5.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/ButtonSimple.js +92 -168
  2. package/{CHANGELOG.v5.mdx → CHANGELOG.v5.md} +43 -0
  3. package/Calendar.js +148 -151
  4. package/Card.js +139 -139
  5. package/Code.js +197 -167
  6. package/CollapsiblePanel.js +172 -164
  7. package/Color.js +584 -506
  8. package/ComboBox.js +51 -51
  9. package/ControlGroup.js +132 -127
  10. package/Date.js +137 -150
  11. package/Dropdown.js +97 -96
  12. package/DualListbox.js +468 -469
  13. package/FetchOptions.d.ts +2 -2
  14. package/FormRows.js +158 -157
  15. package/JSONTree.js +354 -360
  16. package/{MIGRATION.mdx → MIGRATION.md} +13 -43
  17. package/{MIGRATION.v5.mdx → MIGRATION.v5.md} +67 -1
  18. package/Markdown.js +3 -4
  19. package/Menu.js +194 -195
  20. package/Modal.js +18 -18
  21. package/ModalLayer.js +171 -217
  22. package/Multiselect.js +785 -778
  23. package/Number.js +103 -102
  24. package/Popover.js +48 -46
  25. package/RadioBar.js +144 -146
  26. package/Resize.js +149 -151
  27. package/ResultsMenu.js +112 -114
  28. package/Search.js +49 -49
  29. package/Select.js +455 -457
  30. package/Slider.js +328 -331
  31. package/Switch.js +251 -178
  32. package/TabBar.js +277 -280
  33. package/Table.js +1212 -1178
  34. package/Text.js +45 -46
  35. package/Tooltip.js +192 -189
  36. package/Tree.js +177 -188
  37. package/package.json +10 -9
  38. package/types/src/Code/Code.d.ts +1 -1
  39. package/types/src/Color/Color.d.ts +2 -2
  40. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  41. package/types/src/Dropdown/Dropdown.d.ts +5 -2
  42. package/types/src/Layer/Layer.d.ts +2 -1
  43. package/types/src/Layer/index.d.ts +1 -0
  44. package/types/src/ModalLayer/ModalLayer.d.ts +16 -21
  45. package/types/src/Number/Number.d.ts +1 -1
  46. package/types/src/Popover/Popover.d.ts +5 -2
  47. package/types/src/Table/HeadCell.d.ts +6 -1
  48. package/types/src/Table/HeadInner.d.ts +3 -1
  49. package/types/src/Tooltip/Tooltip.d.ts +7 -7
  50. package/types/src/fixtures/useFetchOptions.d.ts +33 -0
  51. package/useRovingFocus.js +20 -23
  52. package/types/src/fixtures/FetchOptions.d.ts +0 -76
package/Menu.js CHANGED
@@ -61,11 +61,11 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- Divider: () => /* reexport */ H,
65
- Heading: () => /* reexport */ ee,
66
- Item: () => /* reexport */ we,
64
+ Divider: () => /* reexport */ $,
65
+ Heading: () => /* reexport */ Z,
66
+ Item: () => /* reexport */ Se,
67
67
  MenuContext: () => /* reexport */ A,
68
- default: () => /* reexport */ Te
68
+ default: () => /* reexport */ qe
69
69
  });
70
70
  // CONCATENATED MODULE: external "react"
71
71
  const r = require("react");
@@ -76,115 +76,113 @@
76
76
  // CONCATENATED MODULE: external "lodash/omit"
77
77
  const o = require("lodash/omit");
78
78
  var l = e.n(o);
79
- // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
80
- const s = require("@splunk/ui-utils/keyboard");
81
79
  // CONCATENATED MODULE: external "@splunk/ui-utils/focus"
82
- const c = require("@splunk/ui-utils/focus");
80
+ const s = require("@splunk/ui-utils/focus");
83
81
  // CONCATENATED MODULE: external "styled-components"
84
- const u = require("styled-components");
85
- var d = e.n(u);
82
+ const c = require("styled-components");
83
+ var u = e.n(c);
86
84
  // CONCATENATED MODULE: external "@splunk/react-ui/Divider"
87
- const v = require("@splunk/react-ui/Divider");
88
- var p = e.n(v);
85
+ const d = require("@splunk/react-ui/Divider");
86
+ var v = e.n(d);
89
87
  // CONCATENATED MODULE: external "@splunk/themes"
90
- const f = require("@splunk/themes");
88
+ const p = require("@splunk/themes");
91
89
  // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
92
- const m = require("@splunk/react-ui/Clickable");
93
- var b = e.n(m);
90
+ const f = require("@splunk/react-ui/Clickable");
91
+ var m = e.n(f);
94
92
  // CONCATENATED MODULE: external "@splunk/react-ui/NonInteractiveCheckbox"
95
- const y = require("@splunk/react-ui/NonInteractiveCheckbox");
96
- var g = e.n(y);
93
+ const b = require("@splunk/react-ui/NonInteractiveCheckbox");
94
+ var g = e.n(b);
97
95
  // CONCATENATED MODULE: ./src/Menu/ItemStyles.ts
98
- var h = (0, u.css)([ "", " overflow:inherit;white-space:inherit;text-overflow:inherit;" ], f.mixins.typography("smallBody"));
99
- var S = d().div.withConfig({
96
+ var y = (0, c.css)([ "", " overflow:inherit;white-space:inherit;text-overflow:inherit;" ], p.mixins.typography("smallBody"));
97
+ var h = u().div.withConfig({
100
98
  displayName: "ItemStyles__StyledItemDescriptionBottom",
101
99
  componentId: "sc-4kc053-0"
102
- })([ "", ";" ], h);
103
- var w = d().span.withConfig({
100
+ })([ "", ";" ], y);
101
+ var S = u().span.withConfig({
104
102
  displayName: "ItemStyles__StyledItemDescriptionRight",
105
103
  componentId: "sc-4kc053-1"
106
- })([ "", ";display:flex;align-self:flex-start;align-items:center;float:right;padding-left:", ";max-width:50%;min-height:20px;text-align:right;" ], h, f.variables.spacingLarge);
107
- var k = (0, u.css)([ "", " flex:0 0 auto;& > svg{height:20px;}" ], f.mixins.reset("inline-flex"));
108
- var O = d().div.withConfig({
104
+ })([ "", ";display:flex;align-self:flex-start;align-items:center;float:right;padding-left:", ";max-width:50%;min-height:20px;text-align:right;" ], y, p.variables.spacingLarge);
105
+ var w = (0, c.css)([ "", " flex:0 0 auto;& > svg{height:20px;}" ], p.mixins.reset("inline-flex"));
106
+ var k = u().div.withConfig({
109
107
  displayName: "ItemStyles__StyledItemSelectedAdornment",
110
108
  componentId: "sc-4kc053-2"
111
- })([ "", ";padding-left:", ";align-items:flex-start;color:", ";" ], k, f.variables.spacingLarge, f.variables.contentColorActive);
112
- var x = d().span.withConfig({
109
+ })([ "", ";padding-left:", ";align-items:flex-start;color:", ";" ], w, p.variables.spacingLarge, p.variables.contentColorActive);
110
+ var O = u().span.withConfig({
113
111
  displayName: "ItemStyles__StyledItemAdornment",
114
112
  componentId: "sc-4kc053-3"
115
- })([ "", ";", " padding-right:", ";align-items:center;color:", ";" ], k, (function(e) {
113
+ })([ "", ";", " padding-right:", ";align-items:center;color:", ";" ], w, (function(e) {
116
114
  var t = e.endAdornment;
117
- return t && (0, u.css)([ "padding-left:", ";" ], f.variables.spacingSmall);
118
- }), f.variables.spacingSmall, f.variables.contentColorMuted);
119
- var C = d()(g()).withConfig({
115
+ return t && (0, c.css)([ "padding-left:", ";" ], p.variables.spacingSmall);
116
+ }), p.variables.spacingSmall, p.variables.contentColorMuted);
117
+ var x = u()(g()).withConfig({
120
118
  displayName: "ItemStyles__StyledNonInteractiveCheckbox",
121
119
  componentId: "sc-4kc053-4"
122
- })([ "min-height:0;padding-right:", ";" ], f.variables.spacingSmall);
123
- var I = d()(b()).withConfig({
120
+ })([ "min-height:0;padding-right:", ";" ], p.variables.spacingSmall);
121
+ var C = u()(m()).withConfig({
124
122
  displayName: "ItemStyles__StyledClickable",
125
123
  componentId: "sc-4kc053-5"
126
- })([ "display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;min-height:", ";padding:", " ", ";line-height:20px;", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}&:active{background:", ";}", "}&:focus{outline:0;box-shadow:", ";background:", ";}&[disabled],&[aria-disabled='true']{color:", ";", ",", ",", ",", "{color:", ";}}" ], f.variables.contentColorActive, f.variables.inputHeight, f.variables.spacingXSmall, f.variables.spacingLarge, (function(e) {
124
+ })([ "display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;min-height:", ";padding:", " ", ";line-height:20px;", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}&:active{background:", ";}", "}&:focus{outline:0;box-shadow:", ";background:", ";}&[disabled],&[aria-disabled='true']{color:", ";", ",", ",", ",", "{color:", ";}}" ], p.variables.contentColorActive, p.variables.inputHeight, p.variables.spacingXSmall, p.variables.spacingLarge, (function(e) {
127
125
  var t = e.$active, r = e.$preventFocus;
128
- return t && !r && (0, u.css)([ "box-shadow:", ";" ], f.variables.focusShadowInset);
126
+ return t && !r && (0, c.css)([ "box-shadow:", ";" ], p.variables.focusShadowInset);
129
127
  }), (function(e) {
130
128
  var t = e.$active;
131
- return t && (0, u.css)([ "background:", ";font-weight:", ";" ], f.variables.neutral100, f.variables.fontWeightBold);
129
+ return t && (0, c.css)([ "background:", ";font-weight:", ";" ], p.variables.neutral100, p.variables.fontWeightBold);
132
130
  }), (function(e) {
133
131
  var t = e.$isSelectable, r = e.$selectableAppearance, n = e.$selected;
134
132
  return t && !n && r === "checkmark" && // Adds whitespace to right to reserve space for checkmark for selectable Items
135
133
  // spacingLarge x 3 = padding-left + icon size + padding-right
136
- (0, u.css)([ "padding-right:calc(", " * 3);" ], f.variables.spacingLarge);
137
- }), f.variables.interactiveColorOverlayHover, (function(e) {
134
+ (0, c.css)([ "padding-right:calc(", " * 3);" ], p.variables.spacingLarge);
135
+ }), p.variables.interactiveColorOverlayHover, (function(e) {
138
136
  var t = e.$selected;
139
- return t && (0, u.css)([ "background:", ";" ], f.mixins.overlayColors(f.variables.interactiveColorOverlaySelected, f.variables.interactiveColorOverlayHover));
140
- }), f.variables.interactiveColorOverlayActive, (function(e) {
137
+ return t && (0, c.css)([ "background:", ";" ], p.mixins.overlayColors(p.variables.interactiveColorOverlaySelected, p.variables.interactiveColorOverlayHover));
138
+ }), p.variables.interactiveColorOverlayActive, (function(e) {
141
139
  var t = e.$selected;
142
- return t && (0, u.css)([ "background:", ";font-weight:", ";" ], f.variables.interactiveColorOverlaySelected, f.variables.fontWeightSemiBold);
143
- }), f.variables.focusShadowInset, f.variables.interactiveColorOverlayHover, f.variables.contentColorDisabled, /* sc-sel */ S, /* sc-sel */ w, /* sc-sel */ O, /* sc-sel */ x, f.variables.contentColorDisabled);
144
- var E = d().span.withConfig({
140
+ return t && (0, c.css)([ "background:", ";font-weight:", ";" ], p.variables.interactiveColorOverlaySelected, p.variables.fontWeightSemiBold);
141
+ }), p.variables.focusShadowInset, p.variables.interactiveColorOverlayHover, p.variables.contentColorDisabled, /* sc-sel */ h, /* sc-sel */ S, /* sc-sel */ k, /* sc-sel */ O, p.variables.contentColorDisabled);
142
+ var I = u().span.withConfig({
145
143
  displayName: "ItemStyles__StyledInnerWrapper",
146
144
  componentId: "sc-4kc053-6"
147
145
  })([ "display:flex;align-items:flex-start;" ]);
148
- var _ = d().div.withConfig({
146
+ var E = u().div.withConfig({
149
147
  displayName: "ItemStyles__StyledTitleAndDescriptionWrapper",
150
148
  componentId: "sc-4kc053-7"
151
149
  })([ "display:flex;flex:1;width:100%;align-self:flex-start;word-break:break-word;white-space:normal;", " ", "" ], (function(e) {
152
150
  var t = e.$descriptionBottom;
153
- return t && (0, u.css)([ "flex-direction:column;" ]);
151
+ return t && (0, c.css)([ "flex-direction:column;" ]);
154
152
  }), (function(e) {
155
153
  var t = e.$truncate;
156
- return t && (0, u.css)([ "white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ]);
154
+ return t && (0, c.css)([ "white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ]);
157
155
  }));
158
- var P = d().div.withConfig({
156
+ var _ = u().div.withConfig({
159
157
  displayName: "ItemStyles__StyledLabel",
160
158
  componentId: "sc-4kc053-8"
161
159
  })([ "flex:1;overflow:inherit;white-space:inherit;text-overflow:inherit;max-width:100%;min-height:20px;", "" ], (function(e) {
162
160
  var t = e.$truncate;
163
- return t && (0, u.css)([ "display:block;clear:both;" ]);
161
+ return t && (0, c.css)([ "display:block;clear:both;" ]);
164
162
  }));
165
- var j = d().span.withConfig({
163
+ var P = u().span.withConfig({
166
164
  displayName: "ItemStyles__StyledMatch",
167
165
  componentId: "sc-4kc053-9"
168
- })([ "border-bottom:1px solid ", ";" ], f.variables.contentColorActive);
169
- var N = d().span.withConfig({
166
+ })([ "border-bottom:1px solid ", ";" ], p.variables.contentColorActive);
167
+ var j = u().span.withConfig({
170
168
  displayName: "ItemStyles__StyledSubmenu",
171
169
  componentId: "sc-4kc053-10"
172
- })([ "float:right;padding-left:", ";color:", ";" ], f.variables.spacingSmall, f.variables.contentColorDefault);
170
+ })([ "float:right;padding-left:", ";color:", ";" ], p.variables.spacingSmall, p.variables.contentColorDefault);
173
171
  // CONCATENATED MODULE: ./src/Menu/DividerStyles.ts
174
172
  // Adds margin if direct sibling is a Menu.Item to provide spacing between Divider and Item
175
- var D = d()(p()).withConfig({
173
+ var N = u()(v()).withConfig({
176
174
  displayName: "DividerStyles__Styled",
177
175
  componentId: "l3zfh3-0"
178
- })([ "", " + &,& + ", "{margin-block-start:", ";}" ], I, I, f.variables.spacingSmall);
176
+ })([ "", " + &,& + ", "{margin-block-start:", ";}" ], C, C, p.variables.spacingSmall);
179
177
  // CONCATENATED MODULE: ./src/Menu/MenuContext.tsx
180
- var q = (0, r.createContext)({
178
+ var D = (0, r.createContext)({
181
179
  role: "menu",
182
180
  preventFocus: false
183
181
  });
184
- /* harmony default export */ const A = q;
182
+ /* harmony default export */ const A = D;
185
183
  // CONCATENATED MODULE: ./src/Menu/Divider.tsx
186
- function R() {
187
- return R = Object.assign ? Object.assign.bind() : function(e) {
184
+ function T() {
185
+ return T = Object.assign ? Object.assign.bind() : function(e) {
188
186
  for (var t = 1; t < arguments.length; t++) {
189
187
  var r = arguments[t];
190
188
  for (var n in r) {
@@ -192,51 +190,51 @@
192
190
  }
193
191
  }
194
192
  return e;
195
- }, R.apply(null, arguments);
193
+ }, T.apply(null, arguments);
196
194
  }
197
- var T = {};
195
+ var q = {};
198
196
  /**
199
197
  * A non-interactive menu item used to visually separate groups of items in the menu.
200
- */ function $(e) {
201
- var t = R({}, e);
198
+ */ function R(e) {
199
+ var t = T({}, e);
202
200
  // @docs-props-type DividerPropsBase
203
201
  var a = (0, r.useContext)(A), i = a.role;
204
202
 
205
- return n().createElement(D, R({
203
+ return n().createElement(N, T({
206
204
  "aria-hidden": i === "listbox",
207
205
  "data-test": "divider",
208
206
  role: "separator"
209
207
  }, t));
210
208
  }
211
- $.propTypes = T;
212
- /* Remove the item if it is the first item after filtering */ $.filterFirst = true;
213
- /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ $.filterConsecutive = true;
214
- /* Remove the item if it is the last item after filtering. */ $.filterLast = true;
215
- /* Tag the item as Divider */ $.as = "Divider";
216
- /* harmony default export */ const H = $;
209
+ R.propTypes = q;
210
+ /* Remove the item if it is the first item after filtering */ R.filterFirst = true;
211
+ /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ R.filterConsecutive = true;
212
+ /* Remove the item if it is the last item after filtering. */ R.filterLast = true;
213
+ /* Tag the item as Divider */ R.as = "Divider";
214
+ /* harmony default export */ const $ = R;
217
215
  // CONCATENATED MODULE: external "@splunk/react-ui/Heading"
218
- const F = require("@splunk/react-ui/Heading");
219
- var M = e.n(F);
216
+ const H = require("@splunk/react-ui/Heading");
217
+ var F = e.n(H);
220
218
  // CONCATENATED MODULE: ./src/Menu/HeadingStyles.ts
221
- var L = d().div.withConfig({
219
+ var M = u().div.withConfig({
222
220
  displayName: "HeadingStyles__Styled",
223
221
  componentId: "mcd2ws-0"
224
- })([ "", " border-top:1px solid transparent;padding:", " ", ";&:not(:first-child){border-top:1px solid ", ";margin-top:", ";}" ], f.mixins.reset("block"), f.variables.spacingSmall, f.variables.spacingLarge, f.variables.borderColor, f.variables.spacingSmall);
225
- var K = d()(M()).withConfig({
222
+ })([ "", " border-top:1px solid transparent;padding:", " ", ";&:not(:first-child){border-top:1px solid ", ";margin-top:", ";}" ], p.mixins.reset("block"), p.variables.spacingSmall, p.variables.spacingLarge, p.variables.borderColor, p.variables.spacingSmall);
223
+ var L = u()(F()).withConfig({
226
224
  displayName: "HeadingStyles__StyledHeading",
227
225
  componentId: "mcd2ws-1"
228
- })([ "color:", ";" ], f.variables.contentColorDefault);
226
+ })([ "color:", ";" ], p.variables.contentColorDefault);
229
227
  // CONCATENATED MODULE: ./src/Menu/Heading.tsx
230
- function B(e) {
228
+ function K(e) {
231
229
  "@babel/helpers - typeof";
232
- return B = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
230
+ return K = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
233
231
  return typeof e;
234
232
  } : function(e) {
235
233
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
236
- }, B(e);
234
+ }, K(e);
237
235
  }
238
- function W() {
239
- return W = Object.assign ? Object.assign.bind() : function(e) {
236
+ function B() {
237
+ return B = Object.assign ? Object.assign.bind() : function(e) {
240
238
  for (var t = 1; t < arguments.length; t++) {
241
239
  var r = arguments[t];
242
240
  for (var n in r) {
@@ -244,9 +242,9 @@
244
242
  }
245
243
  }
246
244
  return e;
247
- }, W.apply(null, arguments);
245
+ }, B.apply(null, arguments);
248
246
  }
249
- function z(e, t) {
247
+ function W(e, t) {
250
248
  var r = Object.keys(e);
251
249
  if (Object.getOwnPropertySymbols) {
252
250
  var n = Object.getOwnPropertySymbols(e);
@@ -256,42 +254,42 @@
256
254
  }
257
255
  return r;
258
256
  }
259
- function V(e) {
257
+ function z(e) {
260
258
  for (var t = 1; t < arguments.length; t++) {
261
259
  var r = null != arguments[t] ? arguments[t] : {};
262
- t % 2 ? z(Object(r), !0).forEach((function(t) {
263
- X(e, t, r[t]);
264
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : z(Object(r)).forEach((function(t) {
260
+ t % 2 ? W(Object(r), !0).forEach((function(t) {
261
+ V(e, t, r[t]);
262
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : W(Object(r)).forEach((function(t) {
265
263
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
266
264
  }));
267
265
  }
268
266
  return e;
269
267
  }
270
- function X(e, t, r) {
271
- return (t = G(t)) in e ? Object.defineProperty(e, t, {
268
+ function V(e, t, r) {
269
+ return (t = X(t)) in e ? Object.defineProperty(e, t, {
272
270
  value: r,
273
271
  enumerable: !0,
274
272
  configurable: !0,
275
273
  writable: !0
276
274
  }) : e[t] = r, e;
277
275
  }
278
- function G(e) {
279
- var t = J(e, "string");
280
- return "symbol" == B(t) ? t : t + "";
276
+ function X(e) {
277
+ var t = G(e, "string");
278
+ return "symbol" == K(t) ? t : t + "";
281
279
  }
282
- function J(e, t) {
283
- if ("object" != B(e) || !e) return e;
280
+ function G(e, t) {
281
+ if ("object" != K(e) || !e) return e;
284
282
  var r = e[Symbol.toPrimitive];
285
283
  if (void 0 !== r) {
286
284
  var n = r.call(e, t || "default");
287
- if ("object" != B(n)) return n;
285
+ if ("object" != K(n)) return n;
288
286
  throw new TypeError("@@toPrimitive must return a primitive value.");
289
287
  }
290
288
  return ("string" === t ? String : Number)(e);
291
289
  }
292
- function Q(e, t) {
290
+ function J(e, t) {
293
291
  if (null == e) return {};
294
- var r, n, a = U(e, t);
292
+ var r, n, a = Q(e, t);
295
293
  if (Object.getOwnPropertySymbols) {
296
294
  var i = Object.getOwnPropertySymbols(e);
297
295
  for (n = 0; n < i.length; n++) {
@@ -300,7 +298,7 @@
300
298
  }
301
299
  return a;
302
300
  }
303
- function U(e, t) {
301
+ function Q(e, t) {
304
302
  if (null == e) return {};
305
303
  var r = {};
306
304
  for (var n in e) {
@@ -311,18 +309,18 @@
311
309
  }
312
310
  return r;
313
311
  }
314
- var Y = {
312
+ var U = {
315
313
  children: i().node,
316
314
  title: i().bool,
317
315
  outerStyle: i().object
318
316
  };
319
317
  /**
320
318
  * A non-interactive `Menu` item used to separate and label groups of `Menu` items.
321
- */ function Z(e) {
322
- var t = e.children, a = e.outerStyle, i = e.title, o = Q(e, [ "children", "outerStyle", "title" ]);
319
+ */ function Y(e) {
320
+ var t = e.children, a = e.outerStyle, i = e.title, o = J(e, [ "children", "outerStyle", "title" ]);
323
321
  var l = (0, r.useContext)(A), s = l.role;
324
322
  var c = (0, r.useMemo)((function() {
325
- return V(V({}, a), {}, {
323
+ return z(z({}, a), {}, {
326
324
  margin: 0
327
325
  });
328
326
  }), [ a ]);
@@ -331,50 +329,50 @@
331
329
  // of items in the list if it contains a heading or divider
332
330
  // so we set them to aria-hidden to prevent that
333
331
 
334
- return n().createElement(L, {
332
+ return n().createElement(M, {
335
333
  "aria-hidden": s === "listbox" ? true : undefined
336
- }, n().createElement(K, W({
334
+ }, n().createElement(L, B({
337
335
  style: c,
338
336
  level: i ? 4 : 5,
339
337
  variant: i ? "title5" : "title6",
340
338
  "data-test": "heading"
341
339
  }, o), t));
342
340
  }
343
- Z.propTypes = Y;
344
- /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ Z.filterConsecutive = true;
345
- /* Remove the item if it is the last item after filtering. */ Z.filterLast = true;
346
- /* Tag the item as a Heading */ Z.as = "Heading";
347
- /* harmony default export */ const ee = Z;
341
+ Y.propTypes = U;
342
+ /* Remove consecutive items with filterConsecutive = true (Dividers and Headings) */ Y.filterConsecutive = true;
343
+ /* Remove the item if it is the last item after filtering. */ Y.filterLast = true;
344
+ /* Tag the item as a Heading */ Y.as = "Heading";
345
+ /* harmony default export */ const Z = Y;
348
346
  // CONCATENATED MODULE: external "lodash/isString"
349
- const te = require("lodash/isString");
350
- var re = e.n(te);
347
+ const ee = require("lodash/isString");
348
+ var te = e.n(ee);
351
349
  // CONCATENATED MODULE: external "@splunk/react-icons/Checkmark"
352
- const ne = require("@splunk/react-icons/Checkmark");
353
- var ae = e.n(ne);
350
+ const re = require("@splunk/react-icons/Checkmark");
351
+ var ne = e.n(re);
354
352
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
355
- const ie = require("@splunk/react-icons/ChevronRight");
356
- var oe = e.n(ie);
353
+ const ae = require("@splunk/react-icons/ChevronRight");
354
+ var ie = e.n(ae);
357
355
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
358
- const le = require("@splunk/react-ui/ScreenReaderContent");
359
- var se = e.n(le);
356
+ const oe = require("@splunk/react-ui/ScreenReaderContent");
357
+ var le = e.n(oe);
360
358
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
361
- const ce = require("@splunk/ui-utils/i18n");
359
+ const se = require("@splunk/ui-utils/i18n");
362
360
  // CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRightInset"
363
- const ue = require("@splunk/react-icons/ArrowSquareTopRightInset");
364
- var de = e.n(ue);
361
+ const ce = require("@splunk/react-icons/ArrowSquareTopRightInset");
362
+ var ue = e.n(ce);
365
363
  // CONCATENATED MODULE: ./src/Menu/icons/External.tsx
366
- var ve = d()(de()).withConfig({
364
+ var de = u()(ue()).withConfig({
367
365
  displayName: "External__Styled",
368
366
  componentId: "sc-1turs2s-0"
369
367
  })([ "vertical-align:text-top;margin:0 0 0 4px;" ]);
370
- function pe() {
368
+ function ve() {
371
369
 
372
- return n().createElement(ve, null);
370
+ return n().createElement(de, null);
373
371
  }
374
- /* harmony default export */ const fe = pe;
372
+ /* harmony default export */ const pe = ve;
375
373
  // CONCATENATED MODULE: ./src/Menu/Item.tsx
376
- function me() {
377
- return me = Object.assign ? Object.assign.bind() : function(e) {
374
+ function fe() {
375
+ return fe = Object.assign ? Object.assign.bind() : function(e) {
378
376
  for (var t = 1; t < arguments.length; t++) {
379
377
  var r = arguments[t];
380
378
  for (var n in r) {
@@ -382,11 +380,11 @@
382
380
  }
383
381
  }
384
382
  return e;
385
- }, me.apply(null, arguments);
383
+ }, fe.apply(null, arguments);
386
384
  }
387
- function be(e, t) {
385
+ function me(e, t) {
388
386
  if (null == e) return {};
389
- var r, n, a = ye(e, t);
387
+ var r, n, a = be(e, t);
390
388
  if (Object.getOwnPropertySymbols) {
391
389
  var i = Object.getOwnPropertySymbols(e);
392
390
  for (n = 0; n < i.length; n++) {
@@ -395,7 +393,7 @@
395
393
  }
396
394
  return a;
397
395
  }
398
- function ye(e, t) {
396
+ function be(e, t) {
399
397
  if (null == e) return {};
400
398
  var r = {};
401
399
  for (var n in e) {
@@ -435,9 +433,9 @@
435
433
  to: i().string,
436
434
  truncate: i().bool
437
435
  };
438
- var he = (0, ce._)("(Opens new window)");
439
- function Se(e) {
440
- var t = e.active, a = e.children, i = e.description, o = e.descriptionPosition, s = o === void 0 ? "bottom" : o, c = e.disabled, u = e.endAdornment, d = e.elementRef, v = e.hasSubmenu, p = e.itemKey, f = e.matchRanges, m = e.onClick, b = e.onFocus, y = e.openInNewContext, g = e.role, h = e.selectable, k = e.selectableAppearance, D = k === void 0 ? "checkmark" : k, q = e.selected, R = e.startAdornment, T = e.to, $ = e.truncate, H = be(e, [ "active", "children", "description", "descriptionPosition", "disabled", "endAdornment", "elementRef", "hasSubmenu", "itemKey", "matchRanges", "onClick", "onFocus", "openInNewContext", "role", "selectable", "selectableAppearance", "selected", "startAdornment", "to", "truncate" ]);
436
+ var ye = (0, se._)("(Opens new window)");
437
+ function he(e) {
438
+ var t = e.active, a = e.children, i = e.description, o = e.descriptionPosition, s = o === void 0 ? "bottom" : o, c = e.disabled, u = e.endAdornment, d = e.elementRef, v = e.hasSubmenu, p = e.itemKey, f = e.matchRanges, m = e.onClick, b = e.onFocus, g = e.openInNewContext, y = e.role, w = e.selectable, N = e.selectableAppearance, D = N === void 0 ? "checkmark" : N, T = e.selected, q = e.startAdornment, R = e.to, $ = e.truncate, H = me(e, [ "active", "children", "description", "descriptionPosition", "disabled", "endAdornment", "elementRef", "hasSubmenu", "itemKey", "matchRanges", "onClick", "onFocus", "openInNewContext", "role", "selectable", "selectableAppearance", "selected", "startAdornment", "to", "truncate" ]);
441
439
  var F = (0, r.useContext)(A), M = F.preventFocus;
442
440
  (0, r.useEffect)((function() {
443
441
  if (false) {}
@@ -453,7 +451,7 @@
453
451
  }
454
452
  }), [ M ]);
455
453
  var B = (0, r.useMemo)((function() {
456
- if (!f || !re()(a)) {
454
+ if (!f || !te()(a)) {
457
455
  return a;
458
456
  }
459
457
  var e = [];
@@ -463,7 +461,7 @@
463
461
  e.push(
464
462
 
465
463
  // eslint-disable-next-line react/no-array-index-key
466
- n().createElement(j, {
464
+ n().createElement(P, {
467
465
  key: r,
468
466
  "data-test": "match"
469
467
  }, a.substring(t.start, t.end)));
@@ -475,9 +473,9 @@
475
473
  }));
476
474
  return e;
477
475
  }), [ a, f ]);
478
- var W = q === true || q === "some";
479
- var z = h || W;
480
- var V = g || {
476
+ var W = T === true || T === "some";
477
+ var z = w || W;
478
+ var V = y || {
481
479
  nonselectable: "menuitem",
482
480
  checkmark: "menuitemradio",
483
481
  checkbox: "menuitemcheckbox"
@@ -486,29 +484,30 @@
486
484
  "aria-haspopup": v ? true : undefined
487
485
  };
488
486
  if (V === "menuitemradio" || V === "menuitemcheckbox") {
489
- X["aria-checked"] = q === "some" ? "mixed" : W;
487
+ X["aria-checked"] = T === "some" ? "mixed" : W;
490
488
  } else if (V === "option") {
491
489
  X["aria-selected"] = W;
492
490
  }
493
491
  var G = i && s === "right";
494
492
  var J = i && !G;
495
- var Q = q && D === "checkmark" && n().createElement(O, null, n().createElement(ae(), {
493
+ var Q = T && D === "checkmark" && n().createElement(k, null, n().createElement(ne(), {
494
+ "data-test": "selected-checkmark",
496
495
  inline: true
497
496
  }));
498
497
  var U = false;
499
498
  var Y;
500
- if (y) {
499
+ if (g) {
501
500
  U = true;
502
- Y = typeof y === "string" ? y : he;
501
+ Y = typeof g === "string" ? g : ye;
503
502
  }
504
503
 
505
- return n().createElement(I, me({
504
+ return n().createElement(C, fe({
506
505
  $active: t,
507
506
  $isSelectable: z,
508
507
  $preventFocus: M || false,
509
508
  $selectableAppearance: D !== null && D !== void 0 ? D : false,
510
509
  $selected: W,
511
- "data-has-icon": !!R || !!u,
510
+ "data-has-icon": !!q || !!u,
512
511
  "data-test": "item",
513
512
  "data-test-selected": z ? W : null,
514
513
  disabled: c,
@@ -519,43 +518,43 @@
519
518
  openInNewContext: U,
520
519
  role: V,
521
520
  tabIndex: M ? -1 : undefined,
522
- to: T,
523
- title: $ && re()(a) ? a : undefined
524
- }, X, l()(H, "onFocus")), v && n().createElement(N, null, n().createElement(oe(), null)), n().createElement(E, null, h && D === "checkbox" && n().createElement(C, {
521
+ to: R,
522
+ title: $ && te()(a) ? a : undefined
523
+ }, X, l()(H, "onFocus")), v && n().createElement(j, null, n().createElement(ie(), null)), n().createElement(I, null, w && D === "checkbox" && n().createElement(x, {
525
524
  disabled: !!c,
526
- selected: q
527
- }), R && n().createElement(x, null, R), n().createElement(_, {
525
+ selected: T
526
+ }), q && n().createElement(O, null, q), n().createElement(E, {
528
527
  $descriptionBottom: !!J,
529
528
  $truncate: $ !== null && $ !== void 0 ? $ : false
530
- }, n().createElement(P, {
529
+ }, n().createElement(_, {
531
530
  $truncate: $ !== null && $ !== void 0 ? $ : false,
532
531
  "data-test": "label"
533
- }, B, y && n().createElement(n().Fragment, null, n().createElement(fe, null), n().createElement(se(), null, Y))), J && n().createElement(S, {
532
+ }, B, g && n().createElement(n().Fragment, null, n().createElement(pe, null), n().createElement(le(), null, Y))), J && n().createElement(h, {
534
533
  "data-test": "description"
535
- }, i), G && n().createElement(w, {
534
+ }, i), G && n().createElement(S, {
536
535
  "data-test": "description"
537
- }, i)), u && n().createElement(x, {
536
+ }, i)), u && n().createElement(O, {
538
537
  endAdornment: u
539
538
  }, u), Q));
540
539
  }
541
- Se.propTypes = ge;
542
- Se.as = "Item";
543
- /* harmony default export */ const we = Se;
540
+ he.propTypes = ge;
541
+ he.as = "Item";
542
+ /* harmony default export */ const Se = he;
544
543
  // only for styled components using Item
545
544
  // CONCATENATED MODULE: external "@splunk/react-ui/Scroll"
546
- const ke = require("@splunk/react-ui/Scroll");
547
- var Oe = e.n(ke);
545
+ const we = require("@splunk/react-ui/Scroll");
546
+ var ke = e.n(we);
548
547
  // CONCATENATED MODULE: ./src/Menu/MenuStyles.ts
549
- var xe = (0, u.css)([ "border-top:1px solid ", ";" ], f.variables.borderColor);
550
- var Ce = (0, u.css)([ "", ";background-color:", ";border-radius:", ";min-width:60px;overflow:auto;position:relative;padding:", " 0;&:focus{outline:0;box-shadow:", ";background:", ";}& + &{", "}" ], f.mixins.reset("block"), f.variables.backgroundColorPopup, f.variables.borderRadius, f.variables.spacingSmall, f.variables.focusShadowInset, f.variables.interactiveColorOverlayHover, xe);
551
- var Ie = d().div.withConfig({
548
+ var Oe = (0, c.css)([ "border-top:1px solid ", ";" ], p.variables.borderColor);
549
+ var xe = (0, c.css)([ "", ";background-color:", ";border-radius:", ";min-width:60px;overflow:auto;position:relative;padding:", " 0;&:focus{outline:0;box-shadow:", ";background:", ";}& + &{", "}" ], p.mixins.reset("block"), p.variables.backgroundColorPopup, p.variables.borderRadius, p.variables.spacingSmall, p.variables.focusShadowInset, p.variables.interactiveColorOverlayHover, Oe);
550
+ var Ce = u().div.withConfig({
552
551
  displayName: "MenuStyles__Styled",
553
552
  componentId: "sc-1olffp9-0"
554
- })([ "", "" ], Ce);
555
- var Ee = d()(Oe()).withConfig({
553
+ })([ "", "" ], xe);
554
+ var Ie = u()(ke()).withConfig({
556
555
  displayName: "MenuStyles__StyledScroll",
557
556
  componentId: "sc-1olffp9-1"
558
- })([ "", " ", " + &,& + ", "{", "}" ], Ce, /* sc-sel */ Ie, /* sc-sel */ Ie, xe);
557
+ })([ "", " ", " + &,& + ", "{", "}" ], xe, /* sc-sel */ Ce, /* sc-sel */ Ce, Oe);
559
558
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
560
559
  /**
561
560
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
@@ -563,7 +562,7 @@
563
562
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
564
563
  * @param current - The new value of the ref.
565
564
  */
566
- function _e(e, t) {
565
+ function Ee(e, t) {
567
566
  if (e) {
568
567
  if (typeof e === "function") {
569
568
  e(t);
@@ -576,8 +575,8 @@
576
575
  }
577
576
  }
578
577
  // CONCATENATED MODULE: ./src/Menu/Menu.tsx
579
- function Pe() {
580
- return Pe = Object.assign ? Object.assign.bind() : function(e) {
578
+ function _e() {
579
+ return _e = Object.assign ? Object.assign.bind() : function(e) {
581
580
  for (var t = 1; t < arguments.length; t++) {
582
581
  var r = arguments[t];
583
582
  for (var n in r) {
@@ -585,11 +584,11 @@
585
584
  }
586
585
  }
587
586
  return e;
588
- }, Pe.apply(null, arguments);
587
+ }, _e.apply(null, arguments);
589
588
  }
590
- function je(e, t) {
589
+ function Pe(e, t) {
591
590
  if (null == e) return {};
592
- var r, n, a = Ne(e, t);
591
+ var r, n, a = je(e, t);
593
592
  if (Object.getOwnPropertySymbols) {
594
593
  var i = Object.getOwnPropertySymbols(e);
595
594
  for (n = 0; n < i.length; n++) {
@@ -598,7 +597,7 @@
598
597
  }
599
598
  return a;
600
599
  }
601
- function Ne(e, t) {
600
+ function je(e, t) {
602
601
  if (null == e) return {};
603
602
  var r = {};
604
603
  for (var n in e) {
@@ -609,14 +608,14 @@
609
608
  }
610
609
  return r;
611
610
  }
612
- var De = {
611
+ var Ne = {
613
612
  children: i().node,
614
613
  elementRef: i().oneOfType([ i().func, i().object ]),
615
614
  focusMode: i().oneOf([ "roving", "normal", "never" ]),
616
615
  stopScrollPropagation: i().bool
617
616
  };
618
617
  // the default focus control for Menu: loop, verticalArrows(up/down keys), home/end keys
619
- var qe = function e() {
618
+ var De = function e() {
620
619
  return {
621
620
  enableLoop: true,
622
621
  orientation: "vertical",
@@ -625,15 +624,15 @@
625
624
  };
626
625
  };
627
626
  var Ae = function e(t) {
628
- var r = (0, s.keycode)(t.nativeEvent);
629
- // Handle special case for tab navigation
630
- if (r === "tab" && (0, c.isTabKey)(t)) {
631
- return t.shiftKey ? "tabShift" : "tab";
627
+ var r = t.key;
628
+ // Handle special case for tab navigation
629
+ if (r === "Tab" && (0, s.isTabKey)(t)) {
630
+ return t.shiftKey ? "tabShift" : "Tab";
632
631
  }
633
632
  return r;
634
633
  };
635
- function Re(e) {
636
- var t = e.children, a = e.elementRef, i = e.focusMode, o = i === void 0 ? "roving" : i, s = e.stopScrollPropagation, u = je(e, [ "children", "elementRef", "focusMode", "stopScrollPropagation" ]);
634
+ function Te(e) {
635
+ var t = e.children, a = e.elementRef, i = e.focusMode, o = i === void 0 ? "roving" : i, c = e.stopScrollPropagation, u = Pe(e, [ "children", "elementRef", "focusMode", "stopScrollPropagation" ]);
637
636
  // @docs-props-type MenuPropsBase
638
637
  var d = (0, r.useContext)(A), v = d.role, p = v === void 0 ? "menu" : v;
639
638
  var f = (0, r.useRef)(null);
@@ -662,62 +661,62 @@
662
661
  }), []);
663
662
  var b = (0, r.useCallback)((function(e) {
664
663
  f.current = e;
665
- _e(a, e);
664
+ Ee(a, e);
666
665
  }), [ a ]);
667
- var y = qe();
668
- var g = (0, r.useCallback)((function(e) {
666
+ var g = De();
667
+ var y = (0, r.useCallback)((function(e) {
669
668
  // if command key on Mac was pressed ignore
670
669
  if (e.nativeEvent.metaKey) {
671
670
  return;
672
671
  }
673
672
  var t = Ae(e);
674
- var r = t === "tab" || t === "tabShift";
675
- var n = t === "enter";
673
+ var r = t === "Tab" || t === "tabShift";
674
+ var n = t === "Enter";
676
675
  // Allow default behavior for the enter key.
677
676
  // If tab navigation is enabled, prevent default behavior for all other keys.
678
677
  // If tab navigation is disabled, allow default behavior for tab and tab+shift key
679
- if (!n && (y.enableTab || !r)) {
678
+ if (!n && (g.enableTab || !r)) {
680
679
  e.preventDefault();
681
680
  }
682
681
  var a = f.current;
683
682
  var i = [];
684
683
  if (a) {
685
- i = (0, c.getSortedTabbableElements)(a, {
684
+ i = (0, s.getSortedTabbableElements)(a, {
686
685
  ignoreTabIndex: true
687
686
  });
688
687
  }
689
688
  var o = (e === null || e === void 0 ? void 0 : e.target) instanceof Element ? e.target : null;
690
689
  var l = a === null || a === void 0 ? void 0 : a.querySelector(":focus");
691
- var s = o || l;
692
- var u = s ? i.indexOf(s) : -1;
693
- (0, c.handleFocus)(t, i, u, y);
694
- }), [ y ]);
690
+ var c = o || l;
691
+ var u = c ? i.indexOf(c) : -1;
692
+ (0, s.handleFocus)(t, i, u, g);
693
+ }), [ g ]);
695
694
  var h = function e() {
696
695
  return {
697
696
  role: "menu",
698
697
  preventFocus: o === "never"
699
698
  };
700
699
  };
701
- var S = o === "normal" || o === "never" ? undefined : g;
700
+ var S = o === "normal" || o === "never" ? undefined : y;
702
701
  var w = {
703
702
  "data-test": "menu",
704
703
  onKeyDown: S,
705
704
  role: p
706
705
  };
707
- return s ? n().createElement(Ee, Pe({}, w, {
706
+ return c ? n().createElement(Ie, _e({}, w, {
708
707
  elementRef: b,
709
708
  stopScrollPropagation: true
710
- }, l()(u, "tagName")), m) : n().createElement(Ie, Pe({}, w, {
709
+ }, l()(u, "tagName")), m) : n().createElement(Ce, _e({}, w, {
711
710
  ref: b
712
711
  }, u), n().createElement(A.Provider, {
713
712
  value: h()
714
713
  }, m));
715
714
  }
716
- Re.propTypes = De;
717
- Re.Item = we;
718
- Re.Divider = H;
719
- Re.Heading = ee;
720
- /* harmony default export */ const Te = Re;
715
+ Te.propTypes = Ne;
716
+ Te.Item = Se;
717
+ Te.Divider = $;
718
+ Te.Heading = Z;
719
+ /* harmony default export */ const qe = Te;
721
720
  // CONCATENATED MODULE: ./src/Menu/index.ts
722
721
  module.exports = t;
723
722
  /******/})();