@splunk/react-ui 5.0.0 → 5.1.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 (94) hide show
  1. package/Accordion.js +59 -59
  2. package/Avatar.js +20 -20
  3. package/Breadcrumbs.js +46 -46
  4. package/Button.js +24 -24
  5. package/CHANGELOG.md +21 -2
  6. package/Calendar.js +69 -69
  7. package/Card.js +68 -68
  8. package/Chip.js +16 -16
  9. package/Clickable.js +29 -29
  10. package/Code.js +654 -519
  11. package/CollapsiblePanel.js +112 -112
  12. package/Color.js +107 -107
  13. package/ColumnLayout.js +35 -35
  14. package/ComboBox.js +190 -206
  15. package/ControlGroup.js +128 -120
  16. package/Date.js +148 -146
  17. package/DefinitionList.js +26 -26
  18. package/DualListbox.js +701 -717
  19. package/File.js +403 -403
  20. package/FormRows.js +66 -63
  21. package/Image.js +15 -15
  22. package/JSONTree.js +458 -357
  23. package/Layer.js +60 -72
  24. package/Markdown.js +66 -66
  25. package/Menu.js +44 -44
  26. package/Modal.js +49 -49
  27. package/ModalLayer.js +6 -6
  28. package/Monogram.js +16 -16
  29. package/Multiselect.js +622 -624
  30. package/Number.js +100 -100
  31. package/Paginator.js +7 -7
  32. package/Popover.js +453 -407
  33. package/Progress.js +12 -12
  34. package/Prose.js +6 -6
  35. package/RadioBar.js +180 -166
  36. package/RadioList.js +80 -79
  37. package/ResultsMenu.js +15 -15
  38. package/Scroll.js +50 -50
  39. package/Search.js +148 -164
  40. package/Select.js +668 -670
  41. package/Slider.js +30 -30
  42. package/SlidingPanels.js +24 -24
  43. package/SplitButton.js +50 -50
  44. package/StepBar.js +100 -100
  45. package/Switch.js +45 -45
  46. package/TabBar.js +196 -196
  47. package/TabLayout.js +16 -16
  48. package/Table.js +1207 -1193
  49. package/Text.js +65 -65
  50. package/TextArea.js +108 -93
  51. package/Tooltip.js +203 -197
  52. package/Tree.js +464 -366
  53. package/package.json +6 -6
  54. package/stubs-dependencies.d.ts +0 -70
  55. package/stubs-splunkui.d.ts +4 -0
  56. package/types/src/Code/Code.d.ts +17 -1
  57. package/types/src/Code/LineHighlights.d.ts +11 -0
  58. package/types/src/Code/LineNumbers.d.ts +6 -0
  59. package/types/src/Code/docs/examples/LineHighlights.d.ts +3 -0
  60. package/types/src/Code/docs/examples/LineNumbers.d.ts +3 -0
  61. package/types/src/Code/docs/examples/LineNumbersCustomStart.d.ts +3 -0
  62. package/types/src/Date/Date.d.ts +6 -1
  63. package/types/src/DefinitionList/DefinitionList.d.ts +6 -6
  64. package/types/src/FormRows/FormRows.d.ts +1 -1
  65. package/types/src/JSONTree/JSONTreeItem.d.ts +5 -2
  66. package/types/src/Markdown/Markdown.d.ts +1 -1
  67. package/types/src/Markdown/renderers/MarkdownBlockquote.d.ts +1 -1
  68. package/types/src/Markdown/renderers/MarkdownCodeBlock.d.ts +1 -1
  69. package/types/src/Markdown/renderers/index.d.ts +1 -1
  70. package/types/src/Popover/Popover.d.ts +1 -1
  71. package/types/src/RadioBar/Option.d.ts +1 -1
  72. package/types/src/RadioBar/RadioBar.d.ts +13 -6
  73. package/types/src/RadioBar/RadioBarContext.d.ts +4 -2
  74. package/types/src/RadioList/RadioList.d.ts +2 -1
  75. package/types/src/ScreenReaderContent/docs/examples/SkipLink.d.ts +3 -0
  76. package/types/src/Scroll/Inner.d.ts +1 -1
  77. package/types/src/Select/Option.d.ts +1 -1
  78. package/types/src/Select/Select.d.ts +1 -1
  79. package/types/src/Slider/docs/examples/Controlled.d.ts +1 -1
  80. package/types/src/TabLayout/Panel.d.ts +0 -1
  81. package/types/src/Table/Head.d.ts +1 -0
  82. package/types/src/Table/HeadCell.d.ts +2 -3
  83. package/types/src/Table/HeadDropdownCell.d.ts +2 -2
  84. package/types/src/Table/HeadInner.d.ts +4 -4
  85. package/types/src/Table/KeyboardSensor.d.ts +1 -1
  86. package/types/src/Table/RowDragCell.d.ts +1 -1
  87. package/types/src/Tooltip/Tooltip.d.ts +10 -5
  88. package/types/src/Tree/Item.d.ts +63 -0
  89. package/types/src/Tree/Tree.d.ts +13 -6
  90. package/types/src/Tree/TreeContext.d.ts +1 -1
  91. package/types/src/Tree/index.d.ts +1 -1
  92. package/types/src/useControlled/useControlled.d.ts +3 -1
  93. package/useControlled.js +29 -13
  94. package/types/src/Tree/TreeItem.d.ts +0 -44
package/Select.js CHANGED
@@ -2,18 +2,33 @@
2
2
  // webpackBootstrap
3
3
  /******/ "use strict";
4
4
  /******/ var e = {
5
- /***/ 2907:
5
+ /***/ 3639:
6
6
  /***/ (e, n, t) => {
7
7
  // EXPORTS
8
8
  t.d(n, {
9
- default: () => /* reexport */ i
9
+ default: () => /* reexport */ s
10
10
  });
11
+ // UNUSED EXPORTS: isAllowedType, isPrimitive
11
12
  // EXTERNAL MODULE: external "react"
12
13
  var r = t(9497);
14
+ // CONCATENATED MODULE: external "lodash/isEqual"
15
+ const l = require("lodash/isEqual");
13
16
  // EXTERNAL MODULE: external "lodash/has"
14
- var l = t(5919);
15
- var a = t.n(l);
17
+ var a = t(5919);
18
+ var o = t.n(a);
16
19
  // CONCATENATED MODULE: ./src/useControlled/useControlled.tsx
20
+ function i(e) {
21
+ return e === null || e === undefined || typeof e === "boolean" || typeof e === "string" || typeof e === "number";
22
+ }
23
+ function u(e) {
24
+ if (i(e)) {
25
+ return true;
26
+ }
27
+ if (Array.isArray(e)) {
28
+ return e.every(i);
29
+ }
30
+ return false;
31
+ }
17
32
  /**
18
33
  * This is a private component not intended for use outside @splunk/react-ui
19
34
  *
@@ -23,10 +38,9 @@
23
38
  * are not happening.
24
39
  *
25
40
  * Return the controlled state of the component.
26
- */
27
- function o(e) {
28
- var n = e.componentProps, t = e.componentName, l = t === void 0 ? "this component" : t, o = e.defaultValuePropName, i = o === void 0 ? "defaultValue" : o, u = e.valuePropName, c = u === void 0 ? "value" : u;
29
- var s = (0, r.useRef)(a()(n, c));
41
+ */ function c(e) {
42
+ var n = e.componentProps, t = e.componentName, l = t === void 0 ? "this component" : t, a = e.defaultValuePropName, i = a === void 0 ? "defaultValue" : a, u = e.valuePropName, c = u === void 0 ? "value" : u;
43
+ var s = (0, r.useRef)(o()(n, c));
30
44
  var f = (0, r.useRef)(n[i]);
31
45
  (0, r.useEffect)((function() {
32
46
  if (false) {}
@@ -34,10 +48,11 @@
34
48
  (0, r.useEffect)((function() {
35
49
  if (false) {}
36
50
  if (false) {}
51
+ if (false) {}
37
52
  }), [ l, n, i, c ]);
38
53
  return s.current;
39
54
  }
40
- /* harmony default export */ const i = o;
55
+ /* harmony default export */ const s = c;
41
56
  } // CONCATENATED MODULE: ./src/useControlled/index.ts
42
57
  /***/ ,
43
58
  /***/ 5919:
@@ -134,10 +149,10 @@
134
149
  t.r(r);
135
150
  // EXPORTS
136
151
  t.d(r, {
137
- Divider: () => /* reexport */ q.Divider,
138
- Heading: () => /* reexport */ q.Heading,
139
- Option: () => /* reexport */ Sn,
140
- default: () => /* reexport */ Rn
152
+ Divider: () => /* reexport */ c.Divider,
153
+ Heading: () => /* reexport */ c.Heading,
154
+ Option: () => /* reexport */ E,
155
+ default: () => /* reexport */ An
141
156
  });
142
157
  // EXTERNAL MODULE: external "react"
143
158
  var e = t(9497);
@@ -150,74 +165,19 @@
150
165
  var i = t.n(o);
151
166
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
152
167
  const u = require("@splunk/ui-utils/i18n");
153
- // CONCATENATED MODULE: external "lodash/castArray"
154
- const c = require("lodash/castArray");
155
- var s = t.n(c);
156
- // CONCATENATED MODULE: external "lodash/find"
157
- const f = require("lodash/find");
158
- var d = t.n(f);
159
- // CONCATENATED MODULE: external "lodash/forEachRight"
160
- const p = require("lodash/forEachRight");
161
- var v = t.n(p);
162
- // EXTERNAL MODULE: external "lodash/has"
163
- var b = t(5919);
164
- var m = t.n(b);
165
- // CONCATENATED MODULE: external "lodash/includes"
166
- const g = require("lodash/includes");
167
- var y = t.n(g);
168
- // CONCATENATED MODULE: external "lodash/memoize"
169
- const h = require("lodash/memoize");
170
- var O = t.n(h);
171
- // CONCATENATED MODULE: external "lodash/pick"
172
- const C = require("lodash/pick");
173
- var S = t.n(C);
174
- // CONCATENATED MODULE: external "lodash/uniq"
175
- const k = require("lodash/uniq");
176
- var w = t.n(k);
177
- // CONCATENATED MODULE: external "lodash/without"
178
- const x = require("lodash/without");
179
- var j = t.n(x);
180
- // CONCATENATED MODULE: external "@splunk/react-icons/CaretSmallDown"
181
- const P = require("@splunk/react-icons/CaretSmallDown");
182
- var T = t.n(P);
183
- // CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
184
- const E = require("@splunk/react-icons/Magnifier");
185
- var R = t.n(E);
186
- // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
187
- const A = require("@splunk/react-ui/Dropdown");
188
- var M = t.n(A);
189
- // CONCATENATED MODULE: external "@splunk/react-ui/Link"
190
- const L = require("@splunk/react-ui/Link");
191
- var I = t.n(L);
192
168
  // CONCATENATED MODULE: external "@splunk/react-ui/Menu"
193
- const q = require("@splunk/react-ui/Menu");
194
- // CONCATENATED MODULE: external "@splunk/react-ui/ResultsMenu"
195
- const D = require("@splunk/react-ui/ResultsMenu");
196
- var _ = t.n(D);
197
- // CONCATENATED MODULE: external "@splunk/react-ui/Text"
198
- const B = require("@splunk/react-ui/Text");
199
- var N = t.n(B);
200
- // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
201
- const V = require("@splunk/react-ui/ScreenReaderContent");
202
- var K = t.n(V);
203
- // CONCATENATED MODULE: external "@splunk/react-ui/usePrevious"
204
- const F = require("@splunk/react-ui/usePrevious");
205
- var H = t.n(F);
206
- // CONCATENATED MODULE: external "@splunk/ui-utils/filter"
207
- const z = require("@splunk/ui-utils/filter");
208
- // CONCATENATED MODULE: external "@splunk/ui-utils/id"
209
- const W = require("@splunk/ui-utils/id");
169
+ const c = require("@splunk/react-ui/Menu");
210
170
  // CONCATENATED MODULE: ./src/Select/OptionBase.tsx
211
- function $(e) {
171
+ function s(e) {
212
172
  "@babel/helpers - typeof";
213
- return $ = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
173
+ return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
214
174
  return typeof e;
215
175
  } : function(e) {
216
176
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
217
- }, $(e);
177
+ }, s(e);
218
178
  }
219
- function X() {
220
- return X = Object.assign ? Object.assign.bind() : function(e) {
179
+ function f() {
180
+ return f = Object.assign ? Object.assign.bind() : function(e) {
221
181
  for (var n = 1; n < arguments.length; n++) {
222
182
  var t = arguments[n];
223
183
  for (var r in t) {
@@ -225,9 +185,9 @@
225
185
  }
226
186
  }
227
187
  return e;
228
- }, X.apply(null, arguments);
188
+ }, f.apply(null, arguments);
229
189
  }
230
- function U(e, n) {
190
+ function d(e, n) {
231
191
  var t = Object.keys(e);
232
192
  if (Object.getOwnPropertySymbols) {
233
193
  var r = Object.getOwnPropertySymbols(e);
@@ -237,42 +197,42 @@
237
197
  }
238
198
  return t;
239
199
  }
240
- function J(e) {
200
+ function p(e) {
241
201
  for (var n = 1; n < arguments.length; n++) {
242
202
  var t = null != arguments[n] ? arguments[n] : {};
243
- n % 2 ? U(Object(t), !0).forEach((function(n) {
244
- G(e, n, t[n]);
245
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : U(Object(t)).forEach((function(n) {
203
+ n % 2 ? d(Object(t), !0).forEach((function(n) {
204
+ v(e, n, t[n]);
205
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : d(Object(t)).forEach((function(n) {
246
206
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
247
207
  }));
248
208
  }
249
209
  return e;
250
210
  }
251
- function G(e, n, t) {
252
- return (n = Q(n)) in e ? Object.defineProperty(e, n, {
211
+ function v(e, n, t) {
212
+ return (n = b(n)) in e ? Object.defineProperty(e, n, {
253
213
  value: t,
254
214
  enumerable: !0,
255
215
  configurable: !0,
256
216
  writable: !0
257
217
  }) : e[n] = t, e;
258
218
  }
259
- function Q(e) {
260
- var n = Y(e, "string");
261
- return "symbol" == $(n) ? n : n + "";
219
+ function b(e) {
220
+ var n = m(e, "string");
221
+ return "symbol" == s(n) ? n : n + "";
262
222
  }
263
- function Y(e, n) {
264
- if ("object" != $(e) || !e) return e;
223
+ function m(e, n) {
224
+ if ("object" != s(e) || !e) return e;
265
225
  var t = e[Symbol.toPrimitive];
266
226
  if (void 0 !== t) {
267
227
  var r = t.call(e, n || "default");
268
- if ("object" != $(r)) return r;
228
+ if ("object" != s(r)) return r;
269
229
  throw new TypeError("@@toPrimitive must return a primitive value.");
270
230
  }
271
231
  return ("string" === n ? String : Number)(e);
272
232
  }
273
- function Z(e, n) {
233
+ function g(e, n) {
274
234
  if (null == e) return {};
275
- var t, r, l = ee(e, n);
235
+ var t, r, l = y(e, n);
276
236
  if (Object.getOwnPropertySymbols) {
277
237
  var a = Object.getOwnPropertySymbols(e);
278
238
  for (r = 0; r < a.length; r++) {
@@ -281,7 +241,7 @@
281
241
  }
282
242
  return l;
283
243
  }
284
- function ee(e, n) {
244
+ function y(e, n) {
285
245
  if (null == e) return {};
286
246
  var t = {};
287
247
  for (var r in e) {
@@ -292,7 +252,7 @@
292
252
  }
293
253
  return t;
294
254
  }
295
- var ne = {
255
+ var h = {
296
256
  /** @private */
297
257
  active: a().bool,
298
258
  children: a().node,
@@ -322,41 +282,174 @@
322
282
  };
323
283
  /**
324
284
  * An option within a `Multiselect`.
325
- */ function te(t) {
326
- var r = t.children, l = t.descriptionPosition, a = l === void 0 ? "bottom" : l, o = t.disabled, i = t.elementRef, u = t.icon, c = t.label, s = t.multiple, f = t.onClick, d = t.role, p = d === void 0 ? "option" : d, v = t.value, b = Z(t, [ "children", "descriptionPosition", "disabled", "elementRef", "icon", "label", "multiple", "onClick", "role", "value" ]);
285
+ */ function O(t) {
286
+ var r = t.children, l = t.descriptionPosition, a = l === void 0 ? "bottom" : l, o = t.disabled, i = t.elementRef, u = t.icon, s = t.label, d = t.multiple, v = t.onClick, b = t.role, m = b === void 0 ? "option" : b, y = t.value, h = g(t, [ "children", "descriptionPosition", "disabled", "elementRef", "icon", "label", "multiple", "onClick", "role", "value" ]);
327
287
  // @docs-props-type OptionPropsBase
328
- var m = (0, e.useCallback)((function(e) {
288
+ var O = (0, e.useCallback)((function(e) {
329
289
  if (!o) {
330
- f === null || f === void 0 ? void 0 : f(e, {
331
- value: v
290
+ v === null || v === void 0 ? void 0 : v(e, {
291
+ value: y
332
292
  });
333
293
  }
334
- }), [ o, f, v ]);
335
- var g = v.toString();
336
- var y = J({
294
+ }), [ o, v, y ]);
295
+ var C = y.toString();
296
+ var S = p({
337
297
  descriptionPosition: a,
338
298
  disabled: o ? "disabled" : undefined
339
- }, b);
299
+ }, h);
340
300
 
341
- return n().createElement(q.Item, X({
342
- "data-test-value": v,
301
+ return n().createElement(c.Item, f({
302
+ "data-test-value": y,
343
303
  "data-test": "option",
344
304
  elementRef: i
345
- }, y, {
305
+ }, S, {
346
306
  selectable: true,
347
- selectableAppearance: s ? "checkbox" : "checkmark",
307
+ selectableAppearance: d ? "checkbox" : "checkmark",
348
308
  startAdornment: u,
349
- onClick: m,
350
- role: p,
351
- value: g
352
- }), r || c);
309
+ onClick: O,
310
+ role: m,
311
+ value: C
312
+ }), r || s);
353
313
  }
354
- te.propTypes = ne;
355
- te.type = q.Item;
314
+ O.propTypes = h;
315
+ O.type = c.Item;
356
316
  // For components to distinguish if their children are Options or Headings/Dividers
357
- /* harmony default export */ const re = te;
317
+ /* harmony default export */ const C = O;
318
+ // CONCATENATED MODULE: ./src/Select/Option.tsx
319
+ function S() {
320
+ return S = Object.assign ? Object.assign.bind() : function(e) {
321
+ for (var n = 1; n < arguments.length; n++) {
322
+ var t = arguments[n];
323
+ for (var r in t) {
324
+ ({}).hasOwnProperty.call(t, r) && (e[r] = t[r]);
325
+ }
326
+ }
327
+ return e;
328
+ }, S.apply(null, arguments);
329
+ }
330
+ function k(e, n) {
331
+ if (null == e) return {};
332
+ var t, r, l = w(e, n);
333
+ if (Object.getOwnPropertySymbols) {
334
+ var a = Object.getOwnPropertySymbols(e);
335
+ for (r = 0; r < a.length; r++) {
336
+ t = a[r], n.includes(t) || {}.propertyIsEnumerable.call(e, t) && (l[t] = e[t]);
337
+ }
338
+ }
339
+ return l;
340
+ }
341
+ function w(e, n) {
342
+ if (null == e) return {};
343
+ var t = {};
344
+ for (var r in e) {
345
+ if ({}.hasOwnProperty.call(e, r)) {
346
+ if (n.includes(r)) continue;
347
+ t[r] = e[r];
348
+ }
349
+ }
350
+ return t;
351
+ }
352
+ var x = {
353
+ /** @private */
354
+ active: a().bool,
355
+ children: a().node,
356
+ description: a().string,
357
+ descriptionPosition: a().oneOf([ "right", "bottom" ]),
358
+ disabled: a().bool,
359
+ elementRef: a().oneOfType([ a().func, a().object ]),
360
+ hidden: a().bool,
361
+ icon: a().node,
362
+ label: a().string.isRequired,
363
+ matchRanges: a().arrayOf(a().shape({
364
+ start: a().number.isRequired,
365
+ end: a().number.isRequired
366
+ })),
367
+ /** @private */
368
+ onClick: a().func,
369
+ /** @private */
370
+ role: a().oneOf([ "menuitemcheckbox", "option" ]),
371
+ /** @private */
372
+ selected: a().bool,
373
+ truncate: a().bool,
374
+ value: a().oneOfType([ a().string, a().number, a().bool ]).isRequired
375
+ };
376
+ /**
377
+ * An option within a `Select`. Any elements passed to it should be memoized.
378
+ */ function j(e) {
379
+ var t = e.children, r = e.descriptionPosition, l = r === void 0 ? "bottom" : r, a = e.elementRef, o = e.label, i = k(e, [ "children", "descriptionPosition", "elementRef", "label" ]);
380
+ // @docs-props-type OptionPropsBase
381
+
382
+ return n().createElement(C, S({
383
+ descriptionPosition: l,
384
+ label: o
385
+ }, i, {
386
+ elementRef: a,
387
+ multiple: false
388
+ }), t || o);
389
+ }
390
+ var P = (0, e.memo)(j);
391
+ // @ts-expect-error Need to set propTypes on OptionMemoized so that javascript propType validation will work
392
+ P.propTypes = x;
393
+ /* harmony default export */ const E = P;
394
+ // CONCATENATED MODULE: external "lodash/castArray"
395
+ const R = require("lodash/castArray");
396
+ var A = t.n(R);
397
+ // CONCATENATED MODULE: external "lodash/find"
398
+ const T = require("lodash/find");
399
+ var M = t.n(T);
400
+ // CONCATENATED MODULE: external "lodash/forEachRight"
401
+ const I = require("lodash/forEachRight");
402
+ var L = t.n(I);
403
+ // EXTERNAL MODULE: external "lodash/has"
404
+ var q = t(5919);
405
+ var D = t.n(q);
406
+ // CONCATENATED MODULE: external "lodash/includes"
407
+ const _ = require("lodash/includes");
408
+ var B = t.n(_);
409
+ // CONCATENATED MODULE: external "lodash/memoize"
410
+ const N = require("lodash/memoize");
411
+ var V = t.n(N);
412
+ // CONCATENATED MODULE: external "lodash/pick"
413
+ const K = require("lodash/pick");
414
+ var F = t.n(K);
415
+ // CONCATENATED MODULE: external "lodash/uniq"
416
+ const H = require("lodash/uniq");
417
+ var z = t.n(H);
418
+ // CONCATENATED MODULE: external "lodash/without"
419
+ const W = require("lodash/without");
420
+ var $ = t.n(W);
421
+ // CONCATENATED MODULE: external "@splunk/react-icons/CaretSmallDown"
422
+ const X = require("@splunk/react-icons/CaretSmallDown");
423
+ var U = t.n(X);
424
+ // CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
425
+ const J = require("@splunk/react-icons/Magnifier");
426
+ var G = t.n(J);
427
+ // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
428
+ const Q = require("@splunk/react-ui/Dropdown");
429
+ var Y = t.n(Q);
430
+ // CONCATENATED MODULE: external "@splunk/react-ui/Link"
431
+ const Z = require("@splunk/react-ui/Link");
432
+ var ee = t.n(Z);
433
+ // CONCATENATED MODULE: external "@splunk/react-ui/ResultsMenu"
434
+ const ne = require("@splunk/react-ui/ResultsMenu");
435
+ var te = t.n(ne);
436
+ // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
437
+ const re = require("@splunk/react-ui/ScreenReaderContent");
438
+ var le = t.n(re);
439
+ // CONCATENATED MODULE: external "@splunk/react-ui/Text"
440
+ const ae = require("@splunk/react-ui/Text");
441
+ var oe = t.n(ae);
442
+ // CONCATENATED MODULE: external "@splunk/react-ui/usePrevious"
443
+ const ie = require("@splunk/react-ui/usePrevious");
444
+ var ue = t.n(ie);
445
+ // CONCATENATED MODULE: external "@splunk/ui-utils/filter"
446
+ const ce = require("@splunk/ui-utils/filter");
447
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
448
+ const se = require("@splunk/ui-utils/id");
449
+ // CONCATENATED MODULE: external "@splunk/ui-utils/scroll"
450
+ const fe = require("@splunk/ui-utils/scroll");
358
451
  // CONCATENATED MODULE: ./src/Select/SelectAllOption.tsx
359
- var le = {
452
+ var de = {
360
453
  active: a().bool,
361
454
  changedToggle: a().bool,
362
455
  elementRef: a().oneOfType([ a().func, a().object ]),
@@ -366,12 +459,12 @@
366
459
  selected: a().oneOfType([ a().bool, a().oneOf([ "some" ]) ]),
367
460
  totalCount: a().number
368
461
  };
369
- function ae(e) {
462
+ function pe(e) {
370
463
  var t = e.active, r = e.elementRef, l = e.id, a = e.onClick, o = e.selectAllLabel, i = e.totalCount, u = e.changedToggle, c = e.selected;
371
464
  // When toggle is changed the total count is not displayed anymore so the count is now shown in the Select all menu item
372
465
  var s = u ? " (".concat(i === null || i === void 0 ? void 0 : i.toString(), ")") : "";
373
466
 
374
- return n().createElement(re, {
467
+ return n().createElement(C, {
375
468
  active: t,
376
469
  elementRef: r,
377
470
  "aria-keyshortcuts": "Control+A",
@@ -389,21 +482,21 @@
389
482
  value: "selectAll"
390
483
  });
391
484
  }
392
- ae.propTypes = le;
393
- /* harmony default export */ const oe = ae;
485
+ pe.propTypes = de;
486
+ /* harmony default export */ const ve = pe;
394
487
  // CONCATENATED MODULE: external "styled-components"
395
- const ie = require("styled-components");
396
- var ue = t.n(ie);
488
+ const be = require("styled-components");
489
+ var me = t.n(be);
397
490
  // CONCATENATED MODULE: external "@splunk/react-ui/Button"
398
- const ce = require("@splunk/react-ui/Button");
399
- var se = t.n(ce);
491
+ const ge = require("@splunk/react-ui/Button");
492
+ var ye = t.n(ge);
400
493
  // CONCATENATED MODULE: external "@splunk/react-ui/Divider"
401
- const fe = require("@splunk/react-ui/Divider");
402
- var de = t.n(fe);
494
+ const he = require("@splunk/react-ui/Divider");
495
+ var Oe = t.n(he);
403
496
  // CONCATENATED MODULE: external "@splunk/themes"
404
- const pe = require("@splunk/themes");
497
+ const Ce = require("@splunk/themes");
405
498
  // CONCATENATED MODULE: ./src/Select/SelectBaseStyles.ts
406
- var ve = ue()(se()).withConfig({
499
+ var Se = me()(ye()).withConfig({
407
500
  displayName: "SelectBaseStyles__StyledButton",
408
501
  componentId: "sc-16cj7sk-0"
409
502
  })([ "&[data-inline]{width:", ";}", "" ], (function(e) {
@@ -413,52 +506,52 @@
413
506
  var n = e.$multiple;
414
507
  return !n && "flex-grow: 0;";
415
508
  }));
416
- var be = ue().span.withConfig({
509
+ var ke = me().span.withConfig({
417
510
  displayName: "SelectBaseStyles__StyledLinkIcon",
418
511
  componentId: "sc-16cj7sk-1"
419
- })([ "padding-right:", ";" ], pe.variables.spacingXSmall);
420
- var me = ue().span.withConfig({
512
+ })([ "padding-right:", ";" ], Ce.variables.spacingXSmall);
513
+ var we = me().span.withConfig({
421
514
  displayName: "SelectBaseStyles__StyledLinkCaret",
422
515
  componentId: "sc-16cj7sk-2"
423
- })([ "padding-left:", ";" ], pe.variables.spacingXSmall);
424
- var ge = ue().div.withConfig({
516
+ })([ "padding-left:", ";" ], Ce.variables.spacingXSmall);
517
+ var xe = me().div.withConfig({
425
518
  displayName: "SelectBaseStyles__StyledFilter",
426
519
  componentId: "sc-16cj7sk-3"
427
- })([ "padding:", " ", " ", ";min-width:160px;" ], pe.variables.spacingLarge, pe.variables.spacingLarge, pe.variables.spacingSmall);
428
- var ye = ue().span.withConfig({
520
+ })([ "padding:", " ", " ", ";min-width:160px;" ], Ce.variables.spacingLarge, Ce.variables.spacingLarge, Ce.variables.spacingSmall);
521
+ var je = me().span.withConfig({
429
522
  displayName: "SelectBaseStyles__StyledCount",
430
523
  componentId: "sc-16cj7sk-4"
431
- })([ "padding-right:", ";" ], pe.variables.spacingXSmall);
432
- var he = ue()(I()).withConfig({
524
+ })([ "padding-right:", ";" ], Ce.variables.spacingXSmall);
525
+ var Pe = me()(ee()).withConfig({
433
526
  displayName: "SelectBaseStyles__StyledControlsLink",
434
527
  componentId: "sc-16cj7sk-5"
435
528
  })([ "", ";" ], (function(e) {
436
529
  var n = e.$disabled;
437
- return n && (0, ie.css)([ "color:", ";" ], pe.variables.contentColorDisabled);
530
+ return n && (0, be.css)([ "color:", ";" ], Ce.variables.contentColorDisabled);
438
531
  }));
439
- var Oe = ue().div.withConfig({
532
+ var Ee = me().div.withConfig({
440
533
  displayName: "SelectBaseStyles__StyledToggleAllControls",
441
534
  componentId: "sc-16cj7sk-6"
442
- })([ "", ";gap:", ";padding:", " ", " ", ";" ], pe.mixins.reset("flex"), pe.variables.spacingMedium, pe.variables.spacingXSmall, pe.variables.spacingLarge, pe.variables.spacingSmall);
443
- var Ce = ue()(de()).withConfig({
535
+ })([ "", ";gap:", ";padding:", " ", " ", ";" ], Ce.mixins.reset("flex"), Ce.variables.spacingMedium, Ce.variables.spacingXSmall, Ce.variables.spacingLarge, Ce.variables.spacingSmall);
536
+ var Re = me()(Oe()).withConfig({
444
537
  displayName: "SelectBaseStyles__StyledControlsDivider",
445
538
  componentId: "sc-16cj7sk-7"
446
- })([ "border-color:", ";" ], pe.variables.borderColor);
447
- // EXTERNAL MODULE: ./src/useControlled/index.ts + 1 modules
448
- var Se = t(2907);
539
+ })([ "border-color:", ";" ], Ce.variables.borderColor);
540
+ // EXTERNAL MODULE: ./src/useControlled/index.ts + 2 modules
541
+ var Ae = t(3639);
449
542
  // CONCATENATED MODULE: ./src/utils/fuzzyMatch.ts
450
543
  // A utility for matching keyboard characters to list values
451
- var ke = function e(n, t) {
544
+ var Te = function e(n, t) {
452
545
  return n ? n.label.charAt(t).toLowerCase() : "";
453
546
  };
454
- var we = function e(n, t) {
547
+ var Me = function e(n, t) {
455
548
  if (!n.length) {
456
549
  return n;
457
550
  }
458
551
  var r = null;
459
552
  var l = false;
460
553
  var a = n.filter((function(e) {
461
- var n = ke(e, t.index);
554
+ var n = Te(e, t.index);
462
555
  if (n === t.value) {
463
556
  l = true;
464
557
  return true;
@@ -466,7 +559,7 @@
466
559
  // If we haven't found a match yet, keep track of the next closest match.
467
560
  // Secondary matching looks for the closest character of a higher value, and failing that, closest of a lower value.
468
561
  if (!l) {
469
- var a = ke(r, t.index);
562
+ var a = Te(r, t.index);
470
563
  if (!a) {
471
564
  r = e;
472
565
  } else if (n > t.value) {
@@ -483,27 +576,9 @@
483
576
  }));
484
577
  return a.length === 0 && r ? [ r ] : a;
485
578
  };
486
- // CONCATENATED MODULE: ./src/utils/scrollIntoViewIfNeeded.ts
487
- // A utility that attempts to move an element into view by scrolling it's derived parent.
488
- var xe = function e(n) {
489
- if (!n) {
490
- return;
491
- }
492
- var t = n.offsetParent;
493
- if (!t) {
494
- return;
495
- }
496
- // Below the bottom of the container.
497
- if (t.scrollTop + t.clientHeight < n.offsetTop + n.clientHeight) {
498
- t.scrollTop = n.offsetTop + n.clientHeight - t.clientHeight;
499
- // Above the top of the container.
500
- } else if (t.scrollTop > n.offsetTop) {
501
- t.scrollTop = n.offsetTop;
502
- }
503
- };
504
579
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
505
580
  /* eslint-disable @typescript-eslint/no-empty-function */
506
- var je = {
581
+ var Ie = {
507
582
  body: {
508
583
  appendChild: function e() {
509
584
  return [];
@@ -557,16 +632,16 @@
557
632
  search: ""
558
633
  }
559
634
  };
560
- function Pe() {
561
- var e = typeof document !== "undefined" ? document : je;
635
+ function Le() {
636
+ var e = typeof document !== "undefined" ? document : Ie;
562
637
  return e;
563
638
  }
564
- var Te = Pe();
565
- /* harmony default export */ const Ee = /* unused pure expression or super */ null && Te;
639
+ var qe = Le();
640
+ /* harmony default export */ const De = /* unused pure expression or super */ null && qe;
566
641
  // CONCATENATED MODULE: ./src/utils/ssrWindow.ts
567
642
  /* eslint-disable @typescript-eslint/no-empty-function */
568
- var Re = {
569
- document: je,
643
+ var _e = {
644
+ document: Ie,
570
645
  navigator: {
571
646
  userAgent: ""
572
647
  },
@@ -620,12 +695,12 @@
620
695
  clearTimeout(n);
621
696
  }
622
697
  };
623
- function Ae() {
624
- var e = typeof window !== "undefined" ? window : Re;
698
+ function Be() {
699
+ var e = typeof window !== "undefined" ? window : _e;
625
700
  return e;
626
701
  }
627
- var Me = Ae();
628
- /* harmony default export */ const Le = /* unused pure expression or super */ null && Me;
702
+ var Ne = Be();
703
+ /* harmony default export */ const Ve = /* unused pure expression or super */ null && Ne;
629
704
  // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
630
705
  /**
631
706
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
@@ -633,7 +708,7 @@
633
708
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
634
709
  * @param current - The new value of the ref.
635
710
  */
636
- function Ie(e, n) {
711
+ function Ke(e, n) {
637
712
  if (e) {
638
713
  if (typeof e === "function") {
639
714
  e(n);
@@ -646,20 +721,20 @@
646
721
  }
647
722
  }
648
723
  // CONCATENATED MODULE: ./src/Select/SelectBase.tsx
649
- function qe(e) {
650
- return Be(e) || _e(e) || Fe(e) || De();
724
+ function Fe(e) {
725
+ return We(e) || ze(e) || Je(e) || He();
651
726
  }
652
- function De() {
727
+ function He() {
653
728
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
654
729
  }
655
- function _e(e) {
730
+ function ze(e) {
656
731
  if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
657
732
  }
658
- function Be(e) {
659
- if (Array.isArray(e)) return He(e);
733
+ function We(e) {
734
+ if (Array.isArray(e)) return Ge(e);
660
735
  }
661
- function Ne() {
662
- return Ne = Object.assign ? Object.assign.bind() : function(e) {
736
+ function $e() {
737
+ return $e = Object.assign ? Object.assign.bind() : function(e) {
663
738
  for (var n = 1; n < arguments.length; n++) {
664
739
  var t = arguments[n];
665
740
  for (var r in t) {
@@ -667,29 +742,29 @@
667
742
  }
668
743
  }
669
744
  return e;
670
- }, Ne.apply(null, arguments);
745
+ }, $e.apply(null, arguments);
671
746
  }
672
- function Ve(e, n) {
673
- return We(e) || ze(e, n) || Fe(e, n) || Ke();
747
+ function Xe(e, n) {
748
+ return Ye(e) || Qe(e, n) || Je(e, n) || Ue();
674
749
  }
675
- function Ke() {
750
+ function Ue() {
676
751
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
677
752
  }
678
- function Fe(e, n) {
753
+ function Je(e, n) {
679
754
  if (e) {
680
- if ("string" == typeof e) return He(e, n);
755
+ if ("string" == typeof e) return Ge(e, n);
681
756
  var t = {}.toString.call(e).slice(8, -1);
682
- return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? He(e, n) : void 0;
757
+ return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Ge(e, n) : void 0;
683
758
  }
684
759
  }
685
- function He(e, n) {
760
+ function Ge(e, n) {
686
761
  (null == n || n > e.length) && (n = e.length);
687
762
  for (var t = 0, r = Array(n); t < n; t++) {
688
763
  r[t] = e[t];
689
764
  }
690
765
  return r;
691
766
  }
692
- function ze(e, n) {
767
+ function Qe(e, n) {
693
768
  var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
694
769
  if (null != t) {
695
770
  var r, l, a, o, i = [], u = !0, c = !1;
@@ -711,12 +786,12 @@
711
786
  return i;
712
787
  }
713
788
  }
714
- function We(e) {
789
+ function Ye(e) {
715
790
  if (Array.isArray(e)) return e;
716
791
  }
717
- function $e(e, n) {
792
+ function Ze(e, n) {
718
793
  if (null == e) return {};
719
- var t, r, l = Xe(e, n);
794
+ var t, r, l = en(e, n);
720
795
  if (Object.getOwnPropertySymbols) {
721
796
  var a = Object.getOwnPropertySymbols(e);
722
797
  for (r = 0; r < a.length; r++) {
@@ -725,7 +800,7 @@
725
800
  }
726
801
  return l;
727
802
  }
728
- function Xe(e, n) {
803
+ function en(e, n) {
729
804
  if (null == e) return {};
730
805
  var t = {};
731
806
  for (var r in e) {
@@ -736,15 +811,15 @@
736
811
  }
737
812
  return t;
738
813
  }
739
- function Ue(e) {
814
+ function nn(e) {
740
815
  "@babel/helpers - typeof";
741
- return Ue = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
816
+ return nn = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
742
817
  return typeof e;
743
818
  } : function(e) {
744
819
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
745
- }, Ue(e);
820
+ }, nn(e);
746
821
  }
747
- function Je(e, n) {
822
+ function tn(e, n) {
748
823
  var t = Object.keys(e);
749
824
  if (Object.getOwnPropertySymbols) {
750
825
  var r = Object.getOwnPropertySymbols(e);
@@ -754,40 +829,40 @@
754
829
  }
755
830
  return t;
756
831
  }
757
- function Ge(e) {
832
+ function rn(e) {
758
833
  for (var n = 1; n < arguments.length; n++) {
759
834
  var t = null != arguments[n] ? arguments[n] : {};
760
- n % 2 ? Je(Object(t), !0).forEach((function(n) {
761
- Qe(e, n, t[n]);
762
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Je(Object(t)).forEach((function(n) {
835
+ n % 2 ? tn(Object(t), !0).forEach((function(n) {
836
+ ln(e, n, t[n]);
837
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : tn(Object(t)).forEach((function(n) {
763
838
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
764
839
  }));
765
840
  }
766
841
  return e;
767
842
  }
768
- function Qe(e, n, t) {
769
- return (n = Ye(n)) in e ? Object.defineProperty(e, n, {
843
+ function ln(e, n, t) {
844
+ return (n = an(n)) in e ? Object.defineProperty(e, n, {
770
845
  value: t,
771
846
  enumerable: !0,
772
847
  configurable: !0,
773
848
  writable: !0
774
849
  }) : e[n] = t, e;
775
850
  }
776
- function Ye(e) {
777
- var n = Ze(e, "string");
778
- return "symbol" == Ue(n) ? n : n + "";
851
+ function an(e) {
852
+ var n = on(e, "string");
853
+ return "symbol" == nn(n) ? n : n + "";
779
854
  }
780
- function Ze(e, n) {
781
- if ("object" != Ue(e) || !e) return e;
855
+ function on(e, n) {
856
+ if ("object" != nn(e) || !e) return e;
782
857
  var t = e[Symbol.toPrimitive];
783
858
  if (void 0 !== t) {
784
859
  var r = t.call(e, n || "default");
785
- if ("object" != Ue(r)) return r;
860
+ if ("object" != nn(r)) return r;
786
861
  throw new TypeError("@@toPrimitive must return a primitive value.");
787
862
  }
788
863
  return ("string" === n ? String : Number)(e);
789
864
  }
790
- var en = {
865
+ var un = {
791
866
  allowKeyMatching: a().bool,
792
867
  allowNewValues: a().bool,
793
868
  animateLoading: a().bool,
@@ -836,47 +911,47 @@
836
911
  /** @private. */
837
912
  virtualization: a().number
838
913
  };
839
- var nn = O()((function(e) {
914
+ var cn = V()((function(e) {
840
915
  return [ e ];
841
916
  }));
842
917
  // preserve separate widths for single vs. multi mode
843
- var tn = O()((function(e) {
918
+ var sn = V()((function(e) {
844
919
  var n = e.anchorWidth, t = e.isMultiple, r = e.maxHeight, l = e.menuStyle;
845
- return t ? Ge({
920
+ return t ? rn({
846
921
  width: Math.max(n !== null && n !== void 0 ? n : 0, 200),
847
922
  maxHeight: r
848
- }, l) : Ge({
923
+ }, l) : rn({
849
924
  minWidth: n !== null && n !== void 0 ? n : undefined,
850
925
  maxWidth: Math.max(n !== null && n !== void 0 ? n : 0, 300),
851
926
  maxHeight: r
852
927
  }, l);
853
928
  }));
854
- var rn = [ "clickAway", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
855
- function ln(e) {
856
- return e && m()(e.props, "value");
929
+ var fn = [ "clickAway", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
930
+ function dn(e) {
931
+ return e && D()(e.props, "value");
857
932
  }
858
- function an(e, n) {
859
- return "".concat(Ue(e), "-").concat(e, "-").concat(n);
933
+ function pn(e, n) {
934
+ return "".concat(nn(e), "-").concat(e, "-").concat(n);
860
935
  }
861
- var on = [ "append", "error", "prepend" ];
862
- var un = (0, u._)("No matches");
863
- var cn = (0, u._)("Select...");
864
- var sn = n().createElement(R(), null);
865
- var fn = function e(t) {
936
+ var vn = [ "append", "error", "prepend" ];
937
+ var bn = (0, u._)("No matches");
938
+ var mn = (0, u._)("Select...");
939
+ var gn = n().createElement(G(), null);
940
+ var yn = function e(t) {
866
941
  var r = t.activeItemId, l = t.filterA11yId, a = t.filterKeyword, o = t.hasChildren, i = t.inputId, c = t.inputRef, s = t.menuListboxId, f = t.multiple, d = t.onClearAll, p = t.onSelectAll, v = t.onTextBlur, b = t.onTextChange, m = t.onTextFocus, g = t.onTextKeyDown, y = t.optionSelection, h = t.placement, O = t.selectAllAppearance, C = t.textHasFocus;
867
942
  var S = (0, u._)("Select all options".concat(y.current === "all" ? " disabled" : ""));
868
943
  var k = (0, u._)("Clear all options".concat(y.current === "none" ? " disabled" : ""));
869
944
  // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
870
- var w = n().createElement(Oe, {
945
+ var w = n().createElement(Ee, {
871
946
  key: "selectAll"
872
- }, n().createElement(he, {
947
+ }, n().createElement(Pe, {
873
948
  disabled: y.current === "all",
874
949
  appearance: "standalone",
875
950
  "aria-label": S,
876
951
  onClick: p,
877
952
  "data-test": "select-all",
878
953
  tag: "button"
879
- }, a ? (0, u._)("Select all Matches") : (0, u._)("Select all")), n().createElement(he, {
954
+ }, a ? (0, u._)("Select all Matches") : (0, u._)("Select all")), n().createElement(Pe, {
880
955
  disabled: y.current === "none",
881
956
  appearance: "standalone",
882
957
  "aria-label": k,
@@ -887,12 +962,12 @@
887
962
 
888
963
  return n().createElement("div", {
889
964
  key: "controls"
890
- }, l && n().createElement(K(), {
965
+ }, l && n().createElement(le(), {
891
966
  id: l
892
- }, (0, u._)("Type to filter")), h === "above" && n().createElement(Ce, null), n().createElement(ge, {
967
+ }, (0, u._)("Type to filter")), h === "above" && n().createElement(Re, null), n().createElement(xe, {
893
968
  key: "filter",
894
969
  "data-test": "filter"
895
- }, n().createElement(N(), {
970
+ }, n().createElement(oe(), {
896
971
  value: a,
897
972
  autoCapitalize: "off",
898
973
  autoComplete: "off",
@@ -913,131 +988,131 @@
913
988
  inputRef: c,
914
989
  inputId: i,
915
990
  canClear: true,
916
- startAdornment: sn
917
- })), f && o && O === "buttongroup" && w, h === "below" && n().createElement(Ce, null));
991
+ startAdornment: gn
992
+ })), f && o && O === "buttongroup" && w, h === "below" && n().createElement(Re, null));
918
993
  };
919
- var dn = function e(n) {
994
+ var hn = function e(n) {
920
995
  var t = n.prefixLabel, r = n.label, l = n.suffixLabel;
921
996
  var a = r;
922
997
  if (t) {
923
998
  a = [ "".concat(t, ": ") ].concat(a);
924
999
  }
925
1000
  if (l) {
926
- a = s()(a).concat(" ".concat(l));
1001
+ a = A()(a).concat(" ".concat(l));
927
1002
  }
928
1003
  return a;
929
1004
  };
930
- var pn = n().forwardRef((function(t, r) {
931
- var l = t.appearance, a = l === void 0 ? "default" : l, o = t.append, i = t.children, c = t.currentValues, s = c === void 0 ? [] : c, f = t.describedBy, p = t.disabled, v = t.elementRef, b = t.error, m = t.inline, g = t.labelText, y = t.labelledBy, h = t.multiple, O = t.onClick, C = t.placeholder, k = t.prefixLabel, w = t.prepend, x = t.required, j = t.suffixLabel, P = t.toggle, E = t.toggleContent, R = $e(t, [ "appearance", "append", "children", "currentValues", "describedBy", "disabled", "elementRef", "error", "inline", "labelText", "labelledBy", "multiple", "onClick", "placeholder", "prefixLabel", "prepend", "required", "suffixLabel", "toggle", "toggleContent" ]);
932
- var A;
933
- var M;
934
- var L = [];
1005
+ var On = n().forwardRef((function(t, r) {
1006
+ var l = t.appearance, a = l === void 0 ? "default" : l, o = t.append, i = t.children, c = t.currentValues, s = c === void 0 ? [] : c, f = t.describedBy, d = t.disabled, p = t.elementRef, v = t.error, b = t.inline, m = t.labelText, g = t.labelledBy, y = t.multiple, h = t.onClick, O = t.placeholder, C = t.prefixLabel, S = t.prepend, k = t.required, w = t.suffixLabel, x = t.toggle, j = t.toggleContent, P = Ze(t, [ "appearance", "append", "children", "currentValues", "describedBy", "disabled", "elementRef", "error", "inline", "labelText", "labelledBy", "multiple", "onClick", "placeholder", "prefixLabel", "prepend", "required", "suffixLabel", "toggle", "toggleContent" ]);
1007
+ var E;
1008
+ var R;
1009
+ var A = [];
935
1010
  // Generate buttonLabels
936
- var q = e.Children.toArray(i);
937
- var D = s.reduce((function(e, n, t, r) {
938
- var l = d()(q, (function(e) {
939
- return ln(e) && e.props.value === n;
1011
+ var T = e.Children.toArray(i);
1012
+ var I = s.reduce((function(e, n, t, r) {
1013
+ var l = M()(T, (function(e) {
1014
+ return dn(e) && e.props.value === n;
940
1015
  }));
941
1016
  if (l) {
942
1017
  var a = l.props, o = a.children, i = a.icon, c = a.label;
943
- var f = E !== "optionLabel" && o ? o : c;
1018
+ var f = j !== "optionLabel" && o ? o : c;
944
1019
  e.push(f);
945
- L.push(c);
1020
+ A.push(c);
946
1021
  // if not in multiple mode, add the icon
947
- if (!h && s.length === 1) {
948
- A = i;
1022
+ if (!y && s.length === 1) {
1023
+ E = i;
949
1024
  }
950
- } else if (h) {
1025
+ } else if (y) {
951
1026
  // only add values that don't match an option in "multiple" mode to preserve old behaviour
952
1027
  e.push(n);
953
- L.push(n.toString());
1028
+ A.push(n.toString());
954
1029
  }
955
1030
  if (t < r.length - 1) {
956
1031
  e.push((0, u._)(", "));
957
- L.push((0, u._)(", "));
1032
+ A.push((0, u._)(", "));
958
1033
  }
959
1034
  return e;
960
1035
  }), []);
961
- M = D;
1036
+ R = I;
962
1037
  // only apply prefix / suffix if the label is not empty
963
- if (M.length > 0) {
1038
+ if (R.length > 0) {
964
1039
  // If there's more than one item selected, read out the selected total
965
1040
  // rather than reading out each selected item
966
- L = dn({
967
- prefixLabel: k,
968
- label: M.length > 1 ? [ "".concat(s.length, " items selected") ] : L,
969
- suffixLabel: j
1041
+ A = hn({
1042
+ prefixLabel: C,
1043
+ label: R.length > 1 ? [ "".concat(s.length, " items selected") ] : A,
1044
+ suffixLabel: w
970
1045
  });
971
- M = dn({
972
- prefixLabel: k,
973
- label: M,
974
- suffixLabel: j
1046
+ R = hn({
1047
+ prefixLabel: C,
1048
+ label: R,
1049
+ suffixLabel: w
975
1050
  });
976
1051
  }
977
1052
  // single <Select> behaviour is to show the placeholder if all parts of the label
978
1053
  // are empty strings so we replicate this behaviour here
979
- if (M.length === 0 || !h && M.every((function(e) {
1054
+ if (R.length === 0 || !y && R.every((function(e) {
980
1055
  return e === "";
981
1056
  }))) {
982
- M = nn(C);
983
- L = M;
1057
+ R = cn(O);
1058
+ A = R;
984
1059
  }
985
- var _ = Object.keys(R).includes("aria-labelledby");
986
- var B = Ge({
1060
+ var L = Object.keys(P).includes("aria-labelledby");
1061
+ var q = rn({
987
1062
  "aria-describedby": f,
988
- "aria-label": y || _ ? undefined : "".concat(g ? "".concat(g, ", ") : "").concat(L.join("")),
1063
+ "aria-label": g || L ? undefined : "".concat(m ? "".concat(m, ", ") : "").concat(A.join("")),
989
1064
  // aria-labelledby takes precedence over aria-label, so existence of both is redundant
990
- "aria-labelledby": y,
991
- "aria-required": x,
1065
+ "aria-labelledby": g,
1066
+ "aria-required": k,
992
1067
  "data-select-appearance": a,
993
1068
  append: o,
994
- prepend: w,
995
- onClick: O,
1069
+ prepend: S,
1070
+ onClick: h,
996
1071
  role: "combobox",
997
- disabled: p ? "disabled" : undefined,
998
- elementRef: v,
999
- error: b,
1072
+ disabled: d ? "disabled" : undefined,
1073
+ elementRef: p,
1074
+ error: v,
1000
1075
  ref: r
1001
- }, R);
1002
- if (h) {
1003
- B["data-test-values"] = JSON.stringify(s);
1076
+ }, P);
1077
+ if (y) {
1078
+ q["data-test-values"] = JSON.stringify(s);
1004
1079
  } else {
1005
- var N = Ve(s, 1), V = N[0];
1006
- B["data-test-value"] = V;
1080
+ var D = Xe(s, 1), _ = D[0];
1081
+ q["data-test-value"] = _;
1007
1082
  }
1008
- if (P) {
1083
+ if (x) {
1009
1084
 
1010
- return (0, e.cloneElement)(P, B);
1085
+ return (0, e.cloneElement)(x, q);
1011
1086
  }
1012
1087
  if (a === "link") {
1013
1088
 
1014
- return n().createElement(I(), Ne({
1089
+ return n().createElement(ee(), $e({
1015
1090
  tag: "button",
1016
1091
  appearance: "standalone"
1017
- }, B, {
1092
+ }, q, {
1018
1093
  "data-select-appearance": "link"
1019
- }), !!A && n().createElement(be, null, A), M || C, n().createElement(me, null, n().createElement(T(), null)));
1094
+ }), !!E && n().createElement(ke, null, E), R || O, n().createElement(we, null, n().createElement(U(), null)));
1020
1095
  }
1021
1096
  // Using Button's secondary appearance as Select's default appearance.
1022
- var K = a === "default" ? "secondary" : a;
1097
+ var B = a === "default" ? "secondary" : a;
1023
1098
 
1024
- return n().createElement(ve, Ne({}, B, {
1025
- $multiple: h,
1026
- appearance: K,
1027
- label: M,
1028
- error: b,
1029
- icon: A,
1030
- inline: m,
1099
+ return n().createElement(Se, $e({}, q, {
1100
+ $multiple: y,
1101
+ appearance: B,
1102
+ label: R,
1103
+ error: v,
1104
+ icon: E,
1105
+ inline: b,
1031
1106
  isMenu: true,
1032
- onClick: O
1033
- }, S()(R, on)), !!s.length && h && n().createElement(ye, {
1107
+ onClick: h
1108
+ }, F()(P, vn)), !!s.length && y && n().createElement(je, {
1034
1109
  "data-role": "count"
1035
1110
  }, "(", s.length, ")"));
1036
1111
  }));
1037
- function vn(t) {
1038
- var r = t.allowKeyMatching, l = r === void 0 ? true : r, a = t.animateLoading, o = t.appearance, i = o === void 0 ? "default" : o, c = t.append, s = t.allowNewValues, f = t.children, p = t.defaultPlacement, b = p === void 0 ? "vertical" : p, m = t.defaultValues, g = t.describedBy, h = t.disabled, O = t.elementRef, C = t.error, S = t.filter, k = t.footerMessage, x = t.inline, P = t.inputId, T = t.inputRef, E = t.isLoadingOptions, R = t.labelledBy, A = t.labelText, L = t.loadingMessage, I = t.menuStyle, B = I === void 0 ? {} : I, N = t.multiple, V = t.name, K = t.noOptionsMessage, F = K === void 0 ? un : K, $ = t.onChange, X = t.onScroll, U = t.onScrollBottom, J = t.onFilterChange, G = t.onClick, Q = t.onClose, Y = t.onOpen, Z = t.required, ee = t.placeholder, ne = ee === void 0 ? cn : ee, te = t.prefixLabel, le = t.prepend, ae = t.repositionMode, ie = ae === void 0 ? "flip" : ae, ue = t.selectAllAppearance, ce = ue === void 0 ? "buttongroup" : ue, se = t.showSelectedValuesFirst, fe = t.suffixLabel, de = t.tabConfirmsNewValue, pe = t.values, ve = t.virtualization, be = t.toggle, me = t.toggleContent, ge = me === void 0 ? "optionChildren" : me, ye = $e(t, [ "allowKeyMatching", "animateLoading", "appearance", "append", "allowNewValues", "children", "defaultPlacement", "defaultValues", "describedBy", "disabled", "elementRef", "error", "filter", "footerMessage", "inline", "inputId", "inputRef", "isLoadingOptions", "labelledBy", "labelText", "loadingMessage", "menuStyle", "multiple", "name", "noOptionsMessage", "onChange", "onScroll", "onScrollBottom", "onFilterChange", "onClick", "onClose", "onOpen", "required", "placeholder", "prefixLabel", "prepend", "repositionMode", "selectAllAppearance", "showSelectedValuesFirst", "suffixLabel", "tabConfirmsNewValue", "values", "virtualization", "toggle", "toggleContent" ]);
1112
+ function Cn(t) {
1113
+ var r = t.allowKeyMatching, l = r === void 0 ? true : r, a = t.animateLoading, o = t.appearance, i = o === void 0 ? "default" : o, s = t.append, f = t.allowNewValues, d = t.children, p = t.defaultPlacement, v = p === void 0 ? "vertical" : p, b = t.defaultValues, m = t.describedBy, g = t.disabled, y = t.elementRef, h = t.error, O = t.filter, S = t.footerMessage, k = t.inline, w = t.inputId, x = t.inputRef, j = t.isLoadingOptions, P = t.labelledBy, E = t.labelText, R = t.loadingMessage, A = t.menuStyle, T = A === void 0 ? {} : A, I = t.multiple, q = t.name, D = t.noOptionsMessage, _ = D === void 0 ? bn : D, N = t.onChange, V = t.onScroll, K = t.onScrollBottom, F = t.onFilterChange, H = t.onClick, W = t.onClose, X = t.onOpen, U = t.required, J = t.placeholder, G = J === void 0 ? mn : J, Q = t.prefixLabel, Z = t.prepend, ee = t.repositionMode, re = ee === void 0 ? "flip" : ee, le = t.selectAllAppearance, ae = le === void 0 ? "buttongroup" : le, oe = t.showSelectedValuesFirst, ie = t.suffixLabel, de = t.tabConfirmsNewValue, pe = t.values, be = t.virtualization, me = t.toggle, ge = t.toggleContent, ye = ge === void 0 ? "optionChildren" : ge, he = Ze(t, [ "allowKeyMatching", "animateLoading", "appearance", "append", "allowNewValues", "children", "defaultPlacement", "defaultValues", "describedBy", "disabled", "elementRef", "error", "filter", "footerMessage", "inline", "inputId", "inputRef", "isLoadingOptions", "labelledBy", "labelText", "loadingMessage", "menuStyle", "multiple", "name", "noOptionsMessage", "onChange", "onScroll", "onScrollBottom", "onFilterChange", "onClick", "onClose", "onOpen", "required", "placeholder", "prefixLabel", "prepend", "repositionMode", "selectAllAppearance", "showSelectedValuesFirst", "suffixLabel", "tabConfirmsNewValue", "values", "virtualization", "toggle", "toggleContent" ]);
1039
1114
  // @docs-props-type SelectBasePropsBase
1040
- var he = (0, Se["default"])({
1115
+ var Oe = (0, Ae["default"])({
1041
1116
  componentName: "SelectBase",
1042
1117
  /* eslint-disable-next-line prefer-rest-params */
1043
1118
  componentProps: arguments[0],
@@ -1046,28 +1121,28 @@
1046
1121
  valuePropName: "values"
1047
1122
  });
1048
1123
  // states
1049
- var Oe = (0, e.useState)((function() {
1124
+ var Ce = (0, e.useState)((function() {
1050
1125
  return {
1051
- activeItemId: (0, W.createDOMID)("active-item"),
1052
- menuListboxId: (0, W.createDOMID)("menu-listbox")
1126
+ activeItemId: (0, se.createDOMID)("active-item"),
1127
+ menuListboxId: (0, se.createDOMID)("menu-listbox")
1053
1128
  };
1054
- })), Ce = Ve(Oe, 1), ke = Ce[0], je = ke.activeItemId, Pe = ke.menuListboxId;
1055
- var Te = (0, e.useState)(0), Ee = Ve(Te, 2), Re = Ee[0], Me = Ee[1];
1056
- var Le = (0, e.useState)(""), De = Ve(Le, 2), _e = De[0], Be = De[1];
1057
- var Ke = (0, e.useState)(false), Fe = Ve(Ke, 2), He = Fe[0], ze = Fe[1];
1058
- var We = (0, e.useState)(false), Xe = Ve(We, 2), Ue = Xe[0], Je = Xe[1];
1059
- var Ge = (0, e.useState)([]), Qe = Ve(Ge, 2), Ye = Qe[0], Ze = Qe[1];
1060
- var en = (0, e.useState)(m || []), nn = Ve(en, 2), on = nn[0], sn = nn[1];
1129
+ })), Se = Xe(Ce, 1), ke = Se[0], we = ke.activeItemId, xe = ke.menuListboxId;
1130
+ var je = (0, e.useState)(0), Pe = Xe(je, 2), Ee = Pe[0], Re = Pe[1];
1131
+ var Te = (0, e.useState)(""), Ie = Xe(Te, 2), Le = Ie[0], qe = Ie[1];
1132
+ var De = (0, e.useState)(false), _e = Xe(De, 2), Ne = _e[0], Ve = _e[1];
1133
+ var He = (0, e.useState)(false), ze = Xe(He, 2), We = ze[0], Ue = ze[1];
1134
+ var Je = (0, e.useState)([]), Ge = Xe(Je, 2), Qe = Ge[0], Ye = Ge[1];
1135
+ var en = (0, e.useState)(b || []), nn = Xe(en, 2), tn = nn[0], rn = nn[1];
1061
1136
  // previous state
1062
- var dn = H()(Re);
1137
+ var ln = ue()(Ee);
1063
1138
  // refs
1064
- var vn = (0, e.useRef)(null);
1065
- var bn = (0, e.useRef)(null);
1066
- var mn = (0, e.useRef)(null);
1067
- var gn = (0, e.useRef)([]);
1068
- var yn = (0, e.useRef)([]);
1069
- var hn = (0, e.useRef)(dn);
1070
- var On = (0, e.useRef)();
1139
+ var an = (0, e.useRef)(null);
1140
+ var on = (0, e.useRef)(null);
1141
+ var un = (0, e.useRef)(null);
1142
+ var cn = (0, e.useRef)([]);
1143
+ var vn = (0, e.useRef)([]);
1144
+ var gn = (0, e.useRef)(ln);
1145
+ var hn = (0, e.useRef)();
1071
1146
  var Cn = (0, e.useRef)({});
1072
1147
  var Sn = (0, e.useRef)(0);
1073
1148
  var kn = (0, e.useRef)([]);
@@ -1075,58 +1150,58 @@
1075
1150
  var xn = (0, e.useRef)();
1076
1151
  var jn = (0, e.useRef)(0);
1077
1152
  var Pn = (0, e.useRef)("none");
1078
- var Tn = (0, e.useState)(S ? (0, W.createDOMID)("filter") : undefined), En = Ve(Tn, 1), Rn = En[0];
1153
+ var En = (0, e.useState)(O ? (0, se.createDOMID)("filter") : undefined), Rn = Xe(En, 1), An = Rn[0];
1079
1154
  (0, e.useEffect)((function() {
1080
1155
  if (false) {}
1081
- }), [ i, c, C, le ]);
1082
- var An = (0, e.useCallback)((function() {
1083
- var e = he ? pe : on;
1084
- return N || e == null ? e : e.slice(0, 1);
1085
- }), [ he, N, pe, on ]);
1156
+ }), [ i, s, h, Z ]);
1157
+ var Tn = (0, e.useCallback)((function() {
1158
+ var e = Oe ? pe : tn;
1159
+ return I || e == null ? e : e.slice(0, 1);
1160
+ }), [ Oe, I, pe, tn ]);
1086
1161
  var Mn = (0, e.useCallback)((function() {
1087
1162
  var e;
1088
1163
  // in non-multiple mode, don't move values to the top of the list
1089
- return N && se !== "never" ? (e = An()) !== null && e !== void 0 ? e : [] : [];
1090
- }), [ An, N, se ]);
1091
- var Ln = (0, e.useCallback)((function(e) {
1092
- var n = _e;
1093
- ze(true);
1094
- Ze(Mn());
1164
+ return I && oe !== "never" ? (e = Tn()) !== null && e !== void 0 ? e : [] : [];
1165
+ }), [ Tn, I, oe ]);
1166
+ var In = (0, e.useCallback)((function(e) {
1167
+ var n = Le;
1168
+ Ve(true);
1169
+ Ye(Mn());
1095
1170
  // SUI-3234: preserve existing behavior difference between <Select> and <Multiselect.Compact>
1096
- if (N) {
1097
- Be("");
1171
+ if (I) {
1172
+ qe("");
1098
1173
  }
1099
- if (n !== _e) {
1100
- J === null || J === void 0 ? void 0 : J(e, {
1101
- keyword: _e
1174
+ if (n !== Le) {
1175
+ F === null || F === void 0 ? void 0 : F(e, {
1176
+ keyword: Le
1102
1177
  });
1103
1178
  }
1104
- }), [ _e, Mn, N, J ]);
1179
+ }), [ Le, Mn, I, F ]);
1105
1180
  (0, e.useEffect)((function() {
1106
- if (He) {
1107
- Y === null || Y === void 0 ? void 0 : Y();
1108
- if (wn.current && !S) {
1181
+ if (Ne) {
1182
+ X === null || X === void 0 ? void 0 : X();
1183
+ if (wn.current && !O) {
1109
1184
  wn.current.focus();
1110
1185
  } else {
1111
1186
  var e;
1112
- Me((e = xn.current) !== null && e !== void 0 ? e : 0);
1187
+ Re((e = xn.current) !== null && e !== void 0 ? e : 0);
1113
1188
  }
1114
1189
  }
1115
- }), [ Y, He, Ye, _e, S ]);
1116
- var In = (0, e.useCallback)((function() {
1117
- ze(false);
1118
- Me(0);
1119
- hn.current = null;
1120
- Q === null || Q === void 0 ? void 0 : Q();
1121
- }), [ Q ]);
1190
+ }), [ X, Ne, Qe, Le, O ]);
1191
+ var Ln = (0, e.useCallback)((function() {
1192
+ Ve(false);
1193
+ Re(0);
1194
+ gn.current = null;
1195
+ W === null || W === void 0 ? void 0 : W();
1196
+ }), [ W ]);
1122
1197
  var qn = (0, e.useCallback)((function(e, n) {
1123
1198
  var t;
1124
- var r = (t = An()) !== null && t !== void 0 ? t : [];
1199
+ var r = (t = Tn()) !== null && t !== void 0 ? t : [];
1125
1200
  var l = r.indexOf(n);
1126
1201
  var a;
1127
- if (N) {
1202
+ if (I) {
1128
1203
  if (l >= 0) {
1129
- a = [].concat(qe(r.slice(0, l)), qe(r.slice(l + 1)));
1204
+ a = [].concat(Fe(r.slice(0, l)), Fe(r.slice(l + 1)));
1130
1205
  } else {
1131
1206
  a = r.concat([ n ]);
1132
1207
  }
@@ -1134,93 +1209,93 @@
1134
1209
  // non-multiple mode must always have a value
1135
1210
  a = [ n ];
1136
1211
  }
1137
- var o = !he;
1212
+ var o = !Oe;
1138
1213
  if (o) {
1139
- sn(a);
1214
+ rn(a);
1140
1215
  }
1141
- if (N) {
1216
+ if (I) {
1142
1217
  // in uncontrolled multiple mode, keep the menu open
1143
1218
  if (o) {
1144
- ze(true);
1219
+ Ve(true);
1145
1220
  }
1146
1221
  } else {
1147
1222
  var i;
1148
1223
  // non-multiple mode only supports a single selection
1149
1224
  // so close the menu once a selection is made
1150
- In({
1225
+ Ln({
1151
1226
  reason: "contentClick"
1152
1227
  });
1153
- (i = vn.current) === null || i === void 0 ? void 0 : i.focus();
1228
+ (i = an.current) === null || i === void 0 ? void 0 : i.focus();
1154
1229
  }
1155
- $ === null || $ === void 0 ? void 0 : $(e, {
1230
+ N === null || N === void 0 ? void 0 : N(e, {
1156
1231
  values: a,
1157
- name: V,
1232
+ name: q,
1158
1233
  reason: "valueToggle"
1159
1234
  });
1160
- }), [ An, In, he, N, V, $ ]);
1235
+ }), [ Tn, Ln, Oe, I, q, N ]);
1161
1236
  var Dn = function e() {
1162
- bn.current = null;
1163
- gn.current = [];
1164
- if (mn.current) {
1165
- clearTimeout(mn.current);
1237
+ on.current = null;
1238
+ cn.current = [];
1239
+ if (un.current) {
1240
+ clearTimeout(un.current);
1166
1241
  }
1167
1242
  };
1168
1243
  var _n = (0, e.useCallback)((function(e) {
1169
1244
  var t;
1170
1245
  // this doesn't make sense if we can't select multiple values
1171
- if (!N) {
1246
+ if (!I) {
1172
1247
  return;
1173
1248
  }
1174
- var r = (t = An()) !== null && t !== void 0 ? t : [];
1175
- var l = w()(r.concat(kn.current));
1176
- l = n().Children.toArray(f).filter((function(e) {
1177
- return ln(e) && y()(l, e.props.value) && (!e.props.disabled || y()(r, e.props.value));
1249
+ var r = (t = Tn()) !== null && t !== void 0 ? t : [];
1250
+ var l = z()(r.concat(kn.current));
1251
+ l = n().Children.toArray(d).filter((function(e) {
1252
+ return dn(e) && B()(l, e.props.value) && (!e.props.disabled || B()(r, e.props.value));
1178
1253
  })).map((function(e) {
1179
1254
  return e.props.value;
1180
1255
  }));
1181
- if (!he) {
1182
- sn(l);
1256
+ if (!Oe) {
1257
+ rn(l);
1183
1258
  }
1184
- $ === null || $ === void 0 ? void 0 : $(e, {
1259
+ N === null || N === void 0 ? void 0 : N(e, {
1185
1260
  values: l,
1186
- name: V,
1261
+ name: q,
1187
1262
  reason: "selectAll"
1188
1263
  });
1189
- }), [ f, An, he, N, V, $ ]);
1264
+ }), [ d, Tn, Oe, I, q, N ]);
1190
1265
  var Bn = (0, e.useCallback)((function(e) {
1191
1266
  var t;
1192
1267
  // this doesn't make sense if we can't select multiple values
1193
- if (!N) {
1268
+ if (!I) {
1194
1269
  return;
1195
1270
  }
1196
- var r = (t = An()) !== null && t !== void 0 ? t : [];
1197
- var l = j().apply(void 0, [ r ].concat(qe(kn.current)));
1271
+ var r = (t = Tn()) !== null && t !== void 0 ? t : [];
1272
+ var l = $().apply(void 0, [ r ].concat(Fe(kn.current)));
1198
1273
  // this will unselect all selected values unless those values are disabled or hidden by the filter
1199
- var a = n().Children.toArray(f).filter((function(e) {
1200
- return ln(e) && (y()(r, e.props.value) && e.props.disabled || y()(l, e.props.value));
1274
+ var a = n().Children.toArray(d).filter((function(e) {
1275
+ return dn(e) && (B()(r, e.props.value) && e.props.disabled || B()(l, e.props.value));
1201
1276
  })).map((function(e) {
1202
1277
  return e.props.value;
1203
1278
  }));
1204
- if (!he) {
1205
- sn(a);
1279
+ if (!Oe) {
1280
+ rn(a);
1206
1281
  }
1207
- $ === null || $ === void 0 ? void 0 : $(e, {
1282
+ N === null || N === void 0 ? void 0 : N(e, {
1208
1283
  values: a,
1209
- name: V,
1284
+ name: q,
1210
1285
  reason: "clearAll"
1211
1286
  });
1212
- }), [ f, An, he, N, V, $ ]);
1287
+ }), [ d, Tn, Oe, I, q, N ]);
1213
1288
  var Nn = (0, e.useCallback)((function(e) {
1214
- if (He && !E) {
1215
- U === null || U === void 0 ? void 0 : U(e);
1289
+ if (Ne && !j) {
1290
+ K === null || K === void 0 ? void 0 : K(e);
1216
1291
  }
1217
- }), [ He, E, U ]);
1292
+ }), [ Ne, j, K ]);
1218
1293
  var Vn = (0, e.useCallback)((function(n) {
1219
1294
  var t = n.key;
1220
1295
  if (t === "Tab") {
1221
- if (de && On.current && Sn.current <= 1) {
1296
+ if (de && hn.current && Sn.current <= 1) {
1222
1297
  n.preventDefault();
1223
- qn(n, On.current);
1298
+ qn(n, hn.current);
1224
1299
  }
1225
1300
  }
1226
1301
  if (n.shiftKey || n.metaKey || n.ctrlKey) {
@@ -1236,21 +1311,21 @@
1236
1311
  }
1237
1312
  if (t === "ArrowDown") {
1238
1313
  n.preventDefault();
1239
- Me(Math.min(Re + 1, ce === "checkbox" ? Sn.current : Sn.current - 1));
1240
- if (f && U) {
1314
+ Re(Math.min(Ee + 1, ae === "checkbox" ? Sn.current : Sn.current - 1));
1315
+ if (d && K) {
1241
1316
  var r;
1242
- var l = e.Children.toArray(f).length - (2 + ((r = An()) !== null && r !== void 0 ? r : []).length);
1243
- if (Re === l) {
1317
+ var l = e.Children.toArray(d).length - (2 + ((r = Tn()) !== null && r !== void 0 ? r : []).length);
1318
+ if (Ee === l) {
1244
1319
  Nn(n);
1245
1320
  }
1246
1321
  }
1247
1322
  }
1248
1323
  if (t === "ArrowUp") {
1249
1324
  n.preventDefault();
1250
- Me(Math.max(Re - 1, 0));
1325
+ Re(Math.max(Ee - 1, 0));
1251
1326
  }
1252
- if (t === "Enter" && On.current && He) {
1253
- if (On.current === "selectAll") {
1327
+ if (t === "Enter" && hn.current && Ne) {
1328
+ if (hn.current === "selectAll") {
1254
1329
  if (Pn.current === "all") {
1255
1330
  Bn(n);
1256
1331
  } else {
@@ -1258,18 +1333,18 @@
1258
1333
  }
1259
1334
  } else {
1260
1335
  n.preventDefault();
1261
- qn(n, On.current);
1336
+ qn(n, hn.current);
1262
1337
  }
1263
1338
  }
1264
- }), [ Re, f, An, Bn, Nn, _n, U, He, ce, de, qn ]);
1339
+ }), [ Ee, d, Tn, Bn, Nn, _n, K, Ne, ae, de, qn ]);
1265
1340
  var Kn = (0, e.useCallback)((function(e, n) {
1266
1341
  var t = n.value;
1267
1342
  e.preventDefault();
1268
- if (!He) {
1343
+ if (!Ne) {
1269
1344
  return;
1270
1345
  }
1271
1346
  qn(e, t);
1272
- }), [ He, qn ]);
1347
+ }), [ Ne, qn ]);
1273
1348
  var Fn = (0, e.useCallback)((function(e, n) {
1274
1349
  var t = e.nativeEvent.key;
1275
1350
  // Checking for a single character to avoid complications from double-byte languages and emojis.
@@ -1279,61 +1354,61 @@
1279
1354
  index: 0,
1280
1355
  value: t
1281
1356
  };
1282
- if (!bn.current) {
1357
+ if (!on.current) {
1283
1358
  if (t === " ") {
1284
1359
  Dn();
1285
1360
  return;
1286
1361
  }
1287
- r = we(yn.current, l);
1288
- } else if (gn.current.length > 1) {
1289
- l.index = bn.current.index + 1;
1290
- r = we(gn.current, l);
1362
+ r = Me(vn.current, l);
1363
+ } else if (cn.current.length > 1) {
1364
+ l.index = on.current.index + 1;
1365
+ r = Me(cn.current, l);
1291
1366
  }
1292
1367
  if (r.length) {
1293
1368
  var a;
1294
1369
  var o = 0;
1295
1370
  // If the active option is a first character match, cycle to the next matching option.
1296
1371
  if (l.index === 0 && r.length > 1) {
1297
- var i = r.indexOf(yn.current[n]);
1372
+ var i = r.indexOf(vn.current[n]);
1298
1373
  if (i >= 0) {
1299
1374
  o = i === r.length - 1 ? 0 : i + 1;
1300
1375
  }
1301
1376
  }
1302
1377
  var u = r[o];
1303
1378
  var c = u.value, s = u.label;
1304
- var f = Cn.current[an(c, s)];
1379
+ var f = Cn.current[pn(c, s)];
1305
1380
  f === null || f === void 0 ? void 0 : (a = f.focus) === null || a === void 0 ? void 0 : a.call(f);
1306
1381
  }
1307
- gn.current = r;
1308
- bn.current = l;
1309
- if (mn.current) {
1310
- clearTimeout(mn.current);
1382
+ cn.current = r;
1383
+ on.current = l;
1384
+ if (un.current) {
1385
+ clearTimeout(un.current);
1311
1386
  }
1312
- mn.current = setTimeout(Dn, 500);
1387
+ un.current = setTimeout(Dn, 500);
1313
1388
  e.preventDefault();
1314
1389
  e.stopPropagation();
1315
1390
  }
1316
1391
  }), []);
1317
1392
  var Hn = (0, e.useCallback)((function(e, n) {
1318
1393
  var t = n.value;
1319
- Be(t);
1320
- ze(true);
1321
- Me(0);
1322
- J === null || J === void 0 ? void 0 : J(e, {
1394
+ qe(t);
1395
+ Ve(true);
1396
+ Re(0);
1397
+ F === null || F === void 0 ? void 0 : F(e, {
1323
1398
  keyword: t
1324
1399
  });
1325
- }), [ J ]);
1400
+ }), [ F ]);
1326
1401
  var zn = (0, e.useCallback)((function() {
1327
- Je(true);
1402
+ Ue(true);
1328
1403
  }), []);
1329
1404
  var Wn = (0, e.useCallback)((function() {
1330
- Je(false);
1405
+ Ue(false);
1331
1406
  }), []);
1332
1407
  var $n = (0, e.useCallback)((function(e) {
1333
- if (hn.current !== Re) {
1334
- xe(e);
1408
+ if (gn.current !== Ee) {
1409
+ (0, fe.scrollIntoViewIfNeeded)(e);
1335
1410
  }
1336
- }), [ Re ]);
1411
+ }), [ Ee ]);
1337
1412
  var Xn = (0, e.useCallback)((function(e, n, t) {
1338
1413
  if (t) {
1339
1414
  wn.current = e;
@@ -1345,27 +1420,27 @@
1345
1420
  }
1346
1421
  }), [ Cn ]);
1347
1422
  var Un = (0, e.useCallback)((function(e) {
1348
- vn.current = e;
1349
- Ie(O, e);
1350
- }), [ O, vn ]);
1423
+ an.current = e;
1424
+ Ke(y, e);
1425
+ }), [ y, an ]);
1351
1426
  var Jn = (0, e.useMemo)((function() {
1352
1427
  var e;
1353
- return (e = An()) !== null && e !== void 0 ? e : [];
1354
- }), [ An ]);
1355
- var Gn = e.Children.toArray(f);
1428
+ return (e = Tn()) !== null && e !== void 0 ? e : [];
1429
+ }), [ Tn ]);
1430
+ var Gn = e.Children.toArray(d);
1356
1431
  var Qn = Jn.some((function(e) {
1357
- var n = d()(Gn, (function(n) {
1358
- return ln(n) && n.props.value === e;
1432
+ var n = M()(Gn, (function(n) {
1433
+ return dn(n) && n.props.value === e;
1359
1434
  }));
1360
1435
  return n && !n.props.disabled;
1361
1436
  }));
1362
- var Yn = se === "immediately" ? Mn() : Ye;
1437
+ var Yn = oe === "immediately" ? Mn() : Qe;
1363
1438
  var Zn = (0, e.useMemo)((function() {
1364
1439
  Sn.current = 0;
1365
1440
  xn.current = undefined;
1366
1441
  jn.current = 0;
1367
- On.current = undefined;
1368
- yn.current = [];
1442
+ hn.current = undefined;
1443
+ vn.current = [];
1369
1444
  var t = function e(n, t) {
1370
1445
  return function(e) {
1371
1446
  return Xn(e, n, t);
@@ -1376,86 +1451,86 @@
1376
1451
  var o = false;
1377
1452
  // used to avoid overwriting the selected item ref in multiple mode
1378
1453
  var i;
1379
- var c = e.Children.toArray(f).reduce((function(u, c, s) {
1454
+ var s = e.Children.toArray(d).reduce((function(u, s, f) {
1380
1455
  // ignore Headings and Dividers
1381
- if (!ln(c)) {
1382
- u.push(c);
1456
+ if (!dn(s)) {
1457
+ u.push(s);
1383
1458
  return u;
1384
1459
  }
1385
- var f = c.props, d = f.disabled, p = f.hidden, v = f.label, b = f.value;
1460
+ var d = s.props, p = d.disabled, v = d.hidden, b = d.label, m = d.value;
1386
1461
  // Find out if the search string exactly matches a value
1387
- if (b === _e) {
1462
+ if (m === Le) {
1388
1463
  r = true;
1389
1464
  }
1390
- var m = Jn && Jn.indexOf(b) >= 0;
1391
- var g = !!m && !d && !i;
1392
- var y = l && !N && !S && !E && !U;
1393
- var h = an(b, v);
1394
- var O = -1;
1395
- if (y && !d && !p) {
1396
- yn.current.push({
1397
- label: v,
1398
- value: b
1465
+ var g = Jn && Jn.indexOf(m) >= 0;
1466
+ var y = !!g && !p && !i;
1467
+ var h = l && !I && !O && !j && !K;
1468
+ var C = pn(m, b);
1469
+ var S = -1;
1470
+ if (h && !p && !v) {
1471
+ vn.current.push({
1472
+ label: b,
1473
+ value: m
1399
1474
  });
1400
- O = yn.current.length - 1;
1475
+ S = vn.current.length - 1;
1401
1476
  }
1402
1477
  // Format the Menu.Item
1403
- var C = (0, e.cloneElement)(c, {
1404
- elementRef: t(h, g),
1405
- key: c.key || s,
1478
+ var k = (0, e.cloneElement)(s, {
1479
+ elementRef: t(C, y),
1480
+ key: s.key || f,
1406
1481
  onClick: Kn,
1407
- onKeyDown: y ? function(e) {
1408
- return Fn(e, O);
1482
+ onKeyDown: h ? function(e) {
1483
+ return Fn(e, S);
1409
1484
  } : undefined,
1410
- selected: m,
1411
- multiple: N,
1485
+ selected: g,
1486
+ multiple: I,
1412
1487
  role: "option"
1413
1488
  });
1414
- if (g) {
1489
+ if (y) {
1415
1490
  i = true;
1416
1491
  }
1417
- if (Yn && Yn.indexOf(b) >= 0) {
1492
+ if (Yn && Yn.indexOf(m) >= 0) {
1418
1493
  if (a === 0) {
1419
- u.splice(a, 0, n().createElement(q.Divider, {
1494
+ u.splice(a, 0, n().createElement(c.Divider, {
1420
1495
  key: "topDivider"
1421
1496
  }));
1422
1497
  o = true;
1423
1498
  }
1424
- u.splice(a, 0, C);
1499
+ u.splice(a, 0, k);
1425
1500
  a += 1;
1426
1501
  } else {
1427
- u.push(C);
1502
+ u.push(k);
1428
1503
  }
1429
1504
  return u;
1430
1505
  }), []);
1431
1506
  // In multiple mode, add missing items
1432
- if (N) {
1433
- v()(Jn, (function(e) {
1434
- var l = d()(c, (function(n) {
1435
- return ln(n) && n.props && n.props.value === e;
1507
+ if (I) {
1508
+ L()(Jn, (function(e) {
1509
+ var l = M()(s, (function(n) {
1510
+ return dn(n) && n.props && n.props.value === e;
1436
1511
  }));
1437
1512
  if (!l) {
1438
- if (e === _e) {
1513
+ if (e === Le) {
1439
1514
  r = true;
1440
1515
  }
1441
1516
  var i = Yn && Yn.indexOf(e) >= 0;
1442
1517
  var u = Yn.length;
1443
1518
  if (a === 0) {
1444
- c.splice(0, 0, n().createElement(q.Divider, {
1519
+ s.splice(0, 0, n().createElement(c.Divider, {
1445
1520
  key: "topDivider"
1446
1521
  }));
1447
1522
  a += 1;
1448
1523
  o = true;
1449
1524
  }
1450
- var s = String(e);
1451
- var f = an(e, s);
1452
- c.splice(i ? 0 : u + 1, 0, n().createElement(re, {
1453
- elementRef: t(f),
1454
- label: s,
1525
+ var f = String(e);
1526
+ var d = pn(e, f);
1527
+ s.splice(i ? 0 : u + 1, 0, n().createElement(C, {
1528
+ elementRef: t(d),
1529
+ label: f,
1455
1530
  value: e,
1456
1531
  key: "missing-value-".concat(e),
1457
1532
  onClick: Kn,
1458
- multiple: N,
1533
+ multiple: I,
1459
1534
  selected: true
1460
1535
  }));
1461
1536
  if (i) {
@@ -1464,47 +1539,47 @@
1464
1539
  }
1465
1540
  }));
1466
1541
  }
1467
- var p = S === "controlled";
1542
+ var p = O === "controlled";
1468
1543
  // Filter the items
1469
- var b = (0, z.stringToKeywords)(_e);
1470
- c = p ? c : c.filter((function(e) {
1471
- if (ln(e)) {
1472
- return (0, z.testPhrase)(e.props.label, b);
1544
+ var v = (0, ce.stringToKeywords)(Le);
1545
+ s = p ? s : s.filter((function(e) {
1546
+ if (dn(e)) {
1547
+ return (0, ce.testPhrase)(e.props.label, v);
1473
1548
  }
1474
1549
  return true;
1475
1550
  // Keep all headers and non-interactive options
1476
1551
  })).map((function(n) {
1477
- if (!ln(n)) {
1552
+ if (!dn(n)) {
1478
1553
  return n;
1479
1554
  }
1480
1555
  // highlight matched text
1481
- var t = b && (0, z.keywordLocations)(n.props.label, b);
1556
+ var t = v && (0, ce.keywordLocations)(n.props.label, v);
1482
1557
 
1483
1558
  return (0, e.cloneElement)(n, {
1484
1559
  matchRanges: t || undefined
1485
1560
  });
1486
1561
  }));
1487
1562
  // Add the option to add the new value
1488
- if (s && !r && _e) {
1489
- var m = o ? a + 1 : a;
1490
- var g = "".concat(_e, " (new value)");
1491
- var y = an(_e, g);
1492
- c.splice(m, 0, n().createElement(re, {
1493
- elementRef: t(y),
1494
- label: g,
1495
- value: _e,
1563
+ if (f && !r && Le) {
1564
+ var b = o ? a + 1 : a;
1565
+ var m = "".concat(Le, " (new value)");
1566
+ var g = pn(Le, m);
1567
+ s.splice(b, 0, n().createElement(C, {
1568
+ elementRef: t(g),
1569
+ label: m,
1570
+ value: Le,
1496
1571
  key: "newValue",
1497
- multiple: N,
1572
+ multiple: I,
1498
1573
  onClick: Kn
1499
1574
  }));
1500
1575
  }
1501
1576
  // When selectAll is a menu item, add an offset so that activeItem accounts for the extra selectAll option.
1502
- var h = ce === "checkbox" && N && c.length > 1 ? 1 : 0;
1503
- var O = true;
1577
+ var y = ae === "checkbox" && I && s.length > 1 ? 1 : 0;
1578
+ var h = true;
1504
1579
  // Highlight the selected Items and remove hidden
1505
- c = c.reduce((function(n, t) {
1580
+ s = s.reduce((function(n, t) {
1506
1581
  // ignore Dividers & Headings
1507
- if (!ln(t)) {
1582
+ if (!dn(t)) {
1508
1583
  n.push(t);
1509
1584
  return n;
1510
1585
  }
@@ -1515,91 +1590,91 @@
1515
1590
  if (t.props.selected && !t.props.disabled && xn.current == null) {
1516
1591
  xn.current = Sn.current;
1517
1592
  }
1518
- var r = h === Re;
1519
- h += 1;
1593
+ var r = y === Ee;
1594
+ y += 1;
1520
1595
  Sn.current += 1;
1521
1596
  jn.current += t.props.selected ? 1 : 0;
1522
1597
  if (t.key !== "newValue" && !t.props.disabled && !t.props.selected) {
1523
- O = false;
1598
+ h = false;
1524
1599
  }
1525
- if (!r || !Ue) {
1600
+ if (!r || !We) {
1526
1601
  n.push(t);
1527
1602
  return n;
1528
1603
  }
1529
1604
  if (!t.props.disabled) {
1530
- On.current = t.props.value;
1605
+ hn.current = t.props.value;
1531
1606
  }
1532
1607
  var l = (0, e.cloneElement)(t, {
1533
1608
  active: r,
1534
1609
  elementRef: $n,
1535
- id: je
1610
+ id: we
1536
1611
  });
1537
1612
  n.push(l);
1538
1613
  return n;
1539
1614
  }), []);
1540
- Pn.current = jn.current === 0 && "none" || O && "all" || "some";
1615
+ Pn.current = jn.current === 0 && "none" || h && "all" || "some";
1541
1616
  // add select all option
1542
- if (ce === "checkbox" && N && Sn.current > 0) {
1543
- var C;
1617
+ if (ae === "checkbox" && I && Sn.current > 0) {
1618
+ var S;
1544
1619
  if (Pn.current === "all") {
1545
- if (_e === "") {
1546
- C = (0, u._)("Clear all");
1620
+ if (Le === "") {
1621
+ S = (0, u._)("Clear all");
1547
1622
  } else {
1548
- C = (0, u._)("Clear all matches");
1623
+ S = (0, u._)("Clear all matches");
1549
1624
  }
1550
- } else if (_e === "") {
1551
- C = (0, u._)("Select all");
1625
+ } else if (Le === "") {
1626
+ S = (0, u._)("Select all");
1552
1627
  } else {
1553
- C = (0, u._)("Select all matches");
1628
+ S = (0, u._)("Select all matches");
1554
1629
  }
1555
- if (Re === 0 && Ue) {
1556
- On.current = "selectAll";
1630
+ if (Ee === 0 && We) {
1631
+ hn.current = "selectAll";
1557
1632
  }
1558
- c.unshift( n().createElement(oe, {
1633
+ s.unshift( n().createElement(ve, {
1559
1634
  key: "select-all-option",
1560
- active: Re === 0,
1561
- changedToggle: !!be,
1635
+ active: Ee === 0,
1636
+ changedToggle: !!me,
1562
1637
  elementRef: $n,
1563
- id: Re === 0 ? je : undefined,
1638
+ id: Ee === 0 ? we : undefined,
1564
1639
  onClick: Pn.current === "all" ? Bn : _n,
1565
- selectAllLabel: C,
1640
+ selectAllLabel: S,
1566
1641
  selected: Pn.current === "all" || Pn.current !== "none" && "some",
1567
1642
  totalCount: Jn.length,
1568
1643
  tabIndex: -1
1569
- }), n().createElement(q.Divider, {
1644
+ }), n().createElement(c.Divider, {
1570
1645
  key: "selectAllDivider"
1571
1646
  }));
1572
1647
  }
1573
- kn.current = c.reduce((function(e, n) {
1574
- if (ln(n)) {
1648
+ kn.current = s.reduce((function(e, n) {
1649
+ if (dn(n)) {
1575
1650
  e.push(n.props.value);
1576
1651
  }
1577
1652
  return e;
1578
1653
  }), []);
1579
- return c;
1580
- }), [ Re, je, l, s, f, Jn, S, _e, $n, Bn, Kn, Fn, Xn, _n, E, N, Yn, U, ce, Ue, be ]);
1654
+ return s;
1655
+ }), [ Ee, we, l, f, d, Jn, O, Le, $n, Bn, Kn, Fn, Xn, _n, j, I, Yn, K, ae, We, me ]);
1581
1656
  var et = function e(t) {
1582
1657
  var r = t.anchorWidth, l = t.maxHeight, o = t.placement, i = t.toggleId;
1583
- var u = tn({
1658
+ var u = sn({
1584
1659
  anchorWidth: r,
1585
- isMultiple: N,
1660
+ isMultiple: I,
1586
1661
  maxHeight: l,
1587
- menuStyle: B
1662
+ menuStyle: T
1588
1663
  });
1589
- var c = Jn.length > 0 && !Qn && !S ? 0 : undefined;
1664
+ var c = Jn.length > 0 && !Qn && !O ? 0 : undefined;
1590
1665
  var s = {
1591
- "aria-multiselectable": N || undefined,
1592
- childrenStart: !!S && n().createElement(fn, {
1593
- activeItemId: je,
1594
- filterA11yId: Rn,
1595
- filterKeyword: _e,
1666
+ "aria-multiselectable": I || undefined,
1667
+ childrenStart: !!O && n().createElement(yn, {
1668
+ activeItemId: we,
1669
+ filterA11yId: An,
1670
+ filterKeyword: Le,
1596
1671
  hasChildren: Zn.some((function(e) {
1597
- return ln(e);
1672
+ return dn(e);
1598
1673
  })),
1599
- inputId: P,
1600
- inputRef: T,
1601
- menuListboxId: Pe,
1602
- multiple: N,
1674
+ inputId: w,
1675
+ inputRef: x,
1676
+ menuListboxId: xe,
1677
+ multiple: I,
1603
1678
  onClearAll: Bn,
1604
1679
  onSelectAll: _n,
1605
1680
  onTextBlur: Wn,
@@ -1608,156 +1683,80 @@
1608
1683
  onTextKeyDown: Vn,
1609
1684
  optionSelection: Pn,
1610
1685
  placement: o,
1611
- selectAllAppearance: ce,
1612
- textHasFocus: Ue
1686
+ selectAllAppearance: ae,
1687
+ textHasFocus: We
1613
1688
  }),
1614
- focusMode: S ? "never" : undefined,
1615
- isLoading: E,
1616
- labelledBy: "".concat(Rn !== null && Rn !== void 0 ? Rn : "", " ").concat(i !== null && i !== void 0 ? i : "").trim(),
1689
+ focusMode: O ? "never" : undefined,
1690
+ isLoading: j,
1691
+ labelledBy: "".concat(An !== null && An !== void 0 ? An : "", " ").concat(i !== null && i !== void 0 ? i : "").trim(),
1617
1692
  // NVDA ignores aria-labelledby attribute on popover, but reads it on menu
1618
- menuId: Pe,
1619
- onScrollBottom: U ? Nn : undefined,
1693
+ menuId: xe,
1694
+ onScrollBottom: K ? Nn : undefined,
1620
1695
  placement: o !== null && o !== void 0 ? o : undefined,
1621
- noOptionsMessage: F,
1622
- footerMessage: k,
1696
+ noOptionsMessage: _,
1697
+ footerMessage: S,
1623
1698
  animateLoading: a,
1624
- loadingMessage: L,
1625
- onScroll: X,
1699
+ loadingMessage: R,
1700
+ onScroll: V,
1626
1701
  style: u,
1627
1702
  tabIndex: c
1628
1703
  };
1629
- if (ve) {
1704
+ if (be) {
1630
1705
 
1631
- return n().createElement(D.VirtualizedResultsMenu, Ne({
1632
- virtualization: ve
1706
+ return n().createElement(ne.VirtualizedResultsMenu, $e({
1707
+ virtualization: be
1633
1708
  }, s), Zn);
1634
1709
  }
1635
1710
 
1636
- return n().createElement(_(), s, Zn);
1711
+ return n().createElement(te(), s, Zn);
1637
1712
  };
1638
1713
  var nt = (0, e.useMemo)((function() {
1639
1714
 
1640
- return n().createElement(pn, Ne({
1715
+ return n().createElement(On, $e({
1641
1716
  appearance: i,
1642
- append: c,
1643
- currentValues: An(),
1644
- "data-test": N ? "multiselect" : "select",
1645
- describedBy: g,
1646
- disabled: h,
1717
+ append: s,
1718
+ currentValues: Tn(),
1719
+ "data-test": I ? "multiselect" : "select",
1720
+ describedBy: m,
1721
+ disabled: g,
1647
1722
  elementRef: Un,
1648
- error: C,
1649
- inline: x,
1650
- labelText: A,
1651
- labelledBy: R,
1652
- multiple: N,
1653
- onClick: G,
1654
- placeholder: ne,
1655
- prefixLabel: te,
1656
- prepend: le,
1657
- required: Z,
1658
- suffixLabel: fe,
1659
- toggle: be,
1660
- toggleContent: ge
1661
- }, ye), f);
1662
- }), [ i, c, An, N, g, h, C, Un, x, A, R, G, ne, te, le, Z, fe, be, ge, ye, f ]);
1723
+ error: h,
1724
+ inline: k,
1725
+ labelText: E,
1726
+ labelledBy: P,
1727
+ multiple: I,
1728
+ onClick: H,
1729
+ placeholder: G,
1730
+ prefixLabel: Q,
1731
+ prepend: Z,
1732
+ required: U,
1733
+ suffixLabel: ie,
1734
+ toggle: me,
1735
+ toggleContent: ye
1736
+ }, he), d);
1737
+ }), [ i, s, Tn, I, m, g, h, Un, k, E, P, H, G, Q, Z, U, ie, me, ye, he, d ]);
1663
1738
 
1664
- return n().createElement(M(), {
1665
- closeReasons: rn,
1666
- inputId: P,
1667
- "aria-labelledby": Rn,
1739
+ return n().createElement(Y(), {
1740
+ closeReasons: fn,
1741
+ inputId: w,
1742
+ "aria-labelledby": An,
1668
1743
  toggle: nt,
1669
- onRequestOpen: Ln,
1670
- onRequestClose: In,
1671
- open: He,
1744
+ onRequestOpen: In,
1745
+ onRequestClose: Ln,
1746
+ open: Ne,
1672
1747
  openWithArrowKeys: true,
1673
- repositionMode: ie,
1674
- defaultPlacement: b,
1675
- canCoverAnchor: Ae().innerHeight < 500,
1748
+ repositionMode: re,
1749
+ defaultPlacement: v,
1750
+ canCoverAnchor: Be().innerHeight < 500,
1676
1751
  retainFocus: false,
1677
- takeFocus: Jn.length === 0 || Jn.length > 0 && !Qn || !!S
1752
+ takeFocus: Jn.length === 0 || Jn.length > 0 && !Qn || !!O
1678
1753
  }, et);
1679
1754
  }
1680
- vn.propTypes = en;
1681
- vn.componentType = "SelectBase";
1682
- vn.Option = re;
1683
- vn.Divider = q.Divider;
1684
- vn.Heading = q.Heading;
1685
- /* harmony default export */ const bn = vn;
1686
- // CONCATENATED MODULE: ./src/Select/Option.tsx
1687
- function mn() {
1688
- return mn = Object.assign ? Object.assign.bind() : function(e) {
1689
- for (var n = 1; n < arguments.length; n++) {
1690
- var t = arguments[n];
1691
- for (var r in t) {
1692
- ({}).hasOwnProperty.call(t, r) && (e[r] = t[r]);
1693
- }
1694
- }
1695
- return e;
1696
- }, mn.apply(null, arguments);
1697
- }
1698
- function gn(e, n) {
1699
- if (null == e) return {};
1700
- var t, r, l = yn(e, n);
1701
- if (Object.getOwnPropertySymbols) {
1702
- var a = Object.getOwnPropertySymbols(e);
1703
- for (r = 0; r < a.length; r++) {
1704
- t = a[r], n.includes(t) || {}.propertyIsEnumerable.call(e, t) && (l[t] = e[t]);
1705
- }
1706
- }
1707
- return l;
1708
- }
1709
- function yn(e, n) {
1710
- if (null == e) return {};
1711
- var t = {};
1712
- for (var r in e) {
1713
- if ({}.hasOwnProperty.call(e, r)) {
1714
- if (n.includes(r)) continue;
1715
- t[r] = e[r];
1716
- }
1717
- }
1718
- return t;
1719
- }
1720
- var hn = {
1721
- /** @private */
1722
- active: a().bool,
1723
- children: a().node,
1724
- description: a().string,
1725
- descriptionPosition: a().oneOf([ "right", "bottom" ]),
1726
- disabled: a().bool,
1727
- elementRef: a().oneOfType([ a().func, a().object ]),
1728
- hidden: a().bool,
1729
- icon: a().node,
1730
- label: a().string.isRequired,
1731
- matchRanges: a().arrayOf(a().shape({
1732
- start: a().number.isRequired,
1733
- end: a().number.isRequired
1734
- })),
1735
- /** @private */
1736
- onClick: a().func,
1737
- /** @private */
1738
- role: a().oneOf([ "menuitemcheckbox", "option" ]),
1739
- /** @private */
1740
- selected: a().bool,
1741
- truncate: a().bool,
1742
- value: a().oneOfType([ a().string, a().number, a().bool ]).isRequired
1743
- };
1744
- /**
1745
- * An option within a `Select`. Any elements passed to it should be memoized.
1746
- */ function On(e) {
1747
- var t = e.children, r = e.descriptionPosition, l = r === void 0 ? "bottom" : r, a = e.elementRef, o = e.label, i = gn(e, [ "children", "descriptionPosition", "elementRef", "label" ]);
1748
- // @docs-props-type OptionPropsBase
1749
-
1750
- return n().createElement(re, mn({
1751
- descriptionPosition: l,
1752
- label: o
1753
- }, i, {
1754
- elementRef: a,
1755
- multiple: false
1756
- }), t || o);
1757
- }
1758
- var Cn = (0, e.memo)(On);
1759
- // @ts-expect-error Need to set propTypes on OptionMemoized so that javascript propType validation will work
1760
- Cn.propTypes = hn;
1755
+ Cn.propTypes = un;
1756
+ Cn.componentType = "SelectBase";
1757
+ Cn.Option = C;
1758
+ Cn.Divider = c.Divider;
1759
+ Cn.Heading = c.Heading;
1761
1760
  /* harmony default export */ const Sn = Cn;
1762
1761
  // CONCATENATED MODULE: ./src/Select/Select.tsx
1763
1762
  function kn() {
@@ -1838,9 +1837,9 @@
1838
1837
  virtualization: a().number
1839
1838
  };
1840
1839
  var Pn = (0, u._)("No matches");
1841
- var Tn = (0, u._)("Select...");
1842
- function En(t) {
1843
- var r = t.allowKeyMatching, l = r === void 0 ? true : r, a = t.appearance, o = a === void 0 ? "default" : a, u = t.defaultPlacement, c = u === void 0 ? "vertical" : u, s = t.defaultValue, f = t.inline, d = f === void 0 ? true : f, p = t.noOptionsMessage, v = p === void 0 ? Pn : p, b = t.onChange, m = t.placeholder, g = m === void 0 ? Tn : m, y = t.toggleContent, h = y === void 0 ? "optionChildren" : y, O = t.value, C = wn(t, [ "allowKeyMatching", "appearance", "defaultPlacement", "defaultValue", "inline", "noOptionsMessage", "onChange", "placeholder", "toggleContent", "value" ]);
1840
+ var En = (0, u._)("Select...");
1841
+ function Rn(t) {
1842
+ var r = t.allowKeyMatching, l = r === void 0 ? true : r, a = t.appearance, o = a === void 0 ? "default" : a, u = t.defaultPlacement, c = u === void 0 ? "vertical" : u, s = t.defaultValue, f = t.inline, d = f === void 0 ? true : f, p = t.noOptionsMessage, v = p === void 0 ? Pn : p, b = t.onChange, m = t.placeholder, g = m === void 0 ? En : m, y = t.toggleContent, h = y === void 0 ? "optionChildren" : y, O = t.value, C = wn(t, [ "allowKeyMatching", "appearance", "defaultPlacement", "defaultValue", "inline", "noOptionsMessage", "onChange", "placeholder", "toggleContent", "value" ]);
1844
1843
  // @docs-props-type SelectPropsBase
1845
1844
  if (false) {}
1846
1845
  var S = i()({
@@ -1848,8 +1847,7 @@
1848
1847
  /* eslint-disable-next-line prefer-rest-params */
1849
1848
  componentProps: arguments[0]
1850
1849
  });
1851
- // Memoized otherwise useControlled in SelectBase can trigger "default props changed after render" warning even though nothing changed on subsequent renders
1852
- var k = (0, e.useMemo)((function() {
1850
+ var k = (0, e.useMemo)((function() {
1853
1851
  // wrap defaultValue in an array once to avoid failing <SelectBase>'s defaultValues comparison check
1854
1852
  if (s != null) {
1855
1853
  return [ s ];
@@ -1877,7 +1875,7 @@
1877
1875
  return t;
1878
1876
  }), [ k, b, S, O ]);
1879
1877
 
1880
- return n().createElement(bn, kn({
1878
+ return n().createElement(Sn, kn({
1881
1879
  allowKeyMatching: l,
1882
1880
  appearance: o,
1883
1881
  defaultPlacement: c,
@@ -1889,11 +1887,11 @@
1889
1887
  multiple: false
1890
1888
  }));
1891
1889
  }
1892
- En.propTypes = jn;
1893
- En.Option = Sn;
1894
- En.Heading = q.Heading;
1895
- En.Divider = q.Divider;
1896
- /* harmony default export */ const Rn = En;
1890
+ Rn.propTypes = jn;
1891
+ Rn.Option = E;
1892
+ Rn.Heading = c.Heading;
1893
+ Rn.Divider = c.Divider;
1894
+ /* harmony default export */ const An = Rn;
1897
1895
  }) // CONCATENATED MODULE: ./src/Select/index.ts
1898
1896
  ();
1899
1897
  module.exports = r;