@splunk/react-ui 4.40.0 → 4.41.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 (61) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/Calendar.js +548 -744
  3. package/Date.js +158 -161
  4. package/FormRows.js +93 -97
  5. package/Link.js +21 -19
  6. package/MIGRATION.mdx +24 -3
  7. package/Menu.js +1 -1
  8. package/MessageBar.js +59 -57
  9. package/Multiselect.js +1161 -1278
  10. package/RadioBar.js +19 -15
  11. package/ResultsMenu.js +1208 -1028
  12. package/Select.js +857 -957
  13. package/Slider.js +346 -300
  14. package/SlidingPanels.js +166 -148
  15. package/TabBar.js +187 -172
  16. package/TabLayout.js +8 -8
  17. package/Table.js +7 -3
  18. package/TransitionOpen.js +44 -65
  19. package/package.json +2 -2
  20. package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -1
  21. package/types/src/Calendar/Calendar.d.ts +28 -30
  22. package/types/src/Calendar/MonthHeader.d.ts +12 -22
  23. package/types/src/Color/Color.d.ts +2 -2
  24. package/types/src/Date/Date.d.ts +18 -19
  25. package/types/src/File/File.d.ts +1 -1
  26. package/types/src/FormRows/FormRows.d.ts +5 -60
  27. package/types/src/FormRows/Row.d.ts +1 -1
  28. package/types/src/Link/Link.d.ts +7 -0
  29. package/types/src/Link/index.d.ts +1 -0
  30. package/types/src/Menu/Item.d.ts +1 -1
  31. package/types/src/Menu/Menu.d.ts +1 -1
  32. package/types/src/Multiselect/Option.d.ts +1 -1
  33. package/types/src/Number/Number.d.ts +2 -2
  34. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  35. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  36. package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +2 -0
  37. package/types/src/Search/Option.d.ts +1 -1
  38. package/types/src/Select/Option.d.ts +5 -1
  39. package/types/src/Select/OptionBase.d.ts +41 -23
  40. package/types/src/Select/SelectAllOption.d.ts +6 -2
  41. package/types/src/Select/SelectBase.d.ts +2 -30
  42. package/types/src/Slider/Slider.d.ts +7 -16
  43. package/types/src/SlidingPanels/SlidingPanels.d.ts +4 -3
  44. package/types/src/TabBar/TabBar.d.ts +10 -2
  45. package/types/src/TabBar/TabBarContext.d.ts +1 -0
  46. package/types/src/TabBar/docs/examples/IconsAbove.d.ts +2 -0
  47. package/types/src/TabBar/docs/examples/IconsLeft.d.ts +2 -0
  48. package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +2 -0
  49. package/types/src/TabBar/docs/examples/VerticalIconsLeft.d.ts +2 -0
  50. package/types/src/TabLayout/TabLayout.d.ts +4 -2
  51. package/types/src/Table/Row.d.ts +0 -2
  52. package/types/src/Table/Table.d.ts +0 -2
  53. package/types/src/Table/docs/examples/Complex.d.ts +14 -3
  54. package/types/src/Text/Text.d.ts +2 -2
  55. package/types/src/TextArea/TextArea.d.ts +2 -2
  56. package/types/src/Typography/Typography.d.ts +4 -2
  57. package/types/src/TabBar/docs/examples/IconsInline.d.ts +0 -2
  58. package/types/src/TabBar/docs/examples/IconsSmall.d.ts +0 -2
  59. package/types/src/TabBar/docs/examples/VerticalSmallIcons.d.ts +0 -2
  60. package/types/src/Table/docs/examples/prisma/Complex.d.ts +0 -48
  61. /package/types/src/Table/docs/examples/{prisma/RowActions.d.ts → RowActions.d.ts} +0 -0
package/Multiselect.js CHANGED
@@ -129,8 +129,8 @@
129
129
  n.d(r, {
130
130
  Divider: () => /* reexport */ f.Divider,
131
131
  Heading: () => /* reexport */ f.Heading,
132
- Option: () => /* reexport */ Z,
133
- default: () => /* reexport */ Dr
132
+ Option: () => /* reexport */ W,
133
+ default: () => /* reexport */ Rr
134
134
  });
135
135
  // EXTERNAL MODULE: external "react"
136
136
  var e = n(9497);
@@ -169,105 +169,39 @@
169
169
  }, d.apply(null, arguments);
170
170
  }
171
171
  function v(e, t) {
172
- if (null == e) return {};
173
- var n, r, o = b(e, t);
172
+ var n = Object.keys(e);
174
173
  if (Object.getOwnPropertySymbols) {
175
- var a = Object.getOwnPropertySymbols(e);
176
- for (r = 0; r < a.length; r++) {
177
- n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
178
- }
179
- }
180
- return o;
181
- }
182
- function b(e, t) {
183
- if (null == e) return {};
184
- var n = {};
185
- for (var r in e) {
186
- if ({}.hasOwnProperty.call(e, r)) {
187
- if (t.includes(r)) continue;
188
- n[r] = e[r];
189
- }
174
+ var r = Object.getOwnPropertySymbols(e);
175
+ t && (r = r.filter((function(t) {
176
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
177
+ }))), n.push.apply(n, r);
190
178
  }
191
179
  return n;
192
180
  }
193
- function y(e, t) {
194
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
195
- }
196
- function m(e, t) {
197
- for (var n = 0; n < t.length; n++) {
198
- var r = t[n];
199
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
200
- Object.defineProperty(e, I(r.key), r);
181
+ function b(e) {
182
+ for (var t = 1; t < arguments.length; t++) {
183
+ var n = null != arguments[t] ? arguments[t] : {};
184
+ t % 2 ? v(Object(n), !0).forEach((function(t) {
185
+ y(e, t, n[t]);
186
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : v(Object(n)).forEach((function(t) {
187
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
188
+ }));
201
189
  }
202
- }
203
- function h(e, t, n) {
204
- return t && m(e.prototype, t), n && m(e, n), Object.defineProperty(e, "prototype", {
205
- writable: !1
206
- }), e;
207
- }
208
- function g(e, t) {
209
- if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
210
- e.prototype = Object.create(t && t.prototype, {
211
- constructor: {
212
- value: e,
213
- writable: !0,
214
- configurable: !0
215
- }
216
- }), Object.defineProperty(e, "prototype", {
217
- writable: !1
218
- }), t && O(e, t);
219
- }
220
- function O(e, t) {
221
- return O = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
222
- return e.__proto__ = t, e;
223
- }, O(e, t);
224
- }
225
- function w(e) {
226
- var t = k();
227
- return function() {
228
- var n, r = x(e);
229
- if (t) {
230
- var o = x(this).constructor;
231
- n = Reflect.construct(r, arguments, o);
232
- } else n = r.apply(this, arguments);
233
- return C(this, n);
234
- };
235
- }
236
- function C(e, t) {
237
- if (t && ("object" == p(t) || "function" == typeof t)) return t;
238
- if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
239
- return S(e);
240
- }
241
- function S(e) {
242
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
243
190
  return e;
244
191
  }
245
- function k() {
246
- try {
247
- var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
248
- } catch (e) {}
249
- return (k = function t() {
250
- return !!e;
251
- })();
252
- }
253
- function x(e) {
254
- return x = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
255
- return e.__proto__ || Object.getPrototypeOf(e);
256
- }, x(e);
257
- }
258
- function j(e, t, n) {
259
- return (t = I(t)) in e ? Object.defineProperty(e, t, {
192
+ function y(e, t, n) {
193
+ return (t = m(t)) in e ? Object.defineProperty(e, t, {
260
194
  value: n,
261
195
  enumerable: !0,
262
196
  configurable: !0,
263
197
  writable: !0
264
198
  }) : e[t] = n, e;
265
199
  }
266
- function I(e) {
267
- var t = P(e, "string");
200
+ function m(e) {
201
+ var t = h(e, "string");
268
202
  return "symbol" == p(t) ? t : t + "";
269
203
  }
270
- function P(e, t) {
204
+ function h(e, t) {
271
205
  if ("object" != p(e) || !e) return e;
272
206
  var n = e[Symbol.toPrimitive];
273
207
  if (void 0 !== n) {
@@ -277,13 +211,36 @@
277
211
  }
278
212
  return ("string" === t ? String : Number)(e);
279
213
  }
280
- var E = {
214
+ function g(e, t) {
215
+ if (null == e) return {};
216
+ var n, r, o = O(e, t);
217
+ if (Object.getOwnPropertySymbols) {
218
+ var a = Object.getOwnPropertySymbols(e);
219
+ for (r = 0; r < a.length; r++) {
220
+ n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
221
+ }
222
+ }
223
+ return o;
224
+ }
225
+ function O(e, t) {
226
+ if (null == e) return {};
227
+ var n = {};
228
+ for (var r in e) {
229
+ if ({}.hasOwnProperty.call(e, r)) {
230
+ if (t.includes(r)) continue;
231
+ n[r] = e[r];
232
+ }
233
+ }
234
+ return n;
235
+ }
236
+ var w = {
281
237
  /** @private */
282
238
  active: a().bool,
283
239
  children: a().node,
284
240
  description: a().string,
285
241
  descriptionPosition: a().oneOf([ "right", "bottom" ]),
286
242
  disabled: a().bool,
243
+ elementRef: a().oneOfType([ a().func, a().object ]),
287
244
  hidden: a().bool,
288
245
  icon: a().node,
289
246
  label: a().string.isRequired,
@@ -304,97 +261,89 @@
304
261
  truncate: a().bool,
305
262
  value: a().oneOfType([ a().string, a().number, a().bool ]).isRequired
306
263
  };
307
- var M = {
308
- descriptionPosition: "bottom",
309
- disabled: false,
310
- multiple: false,
311
- role: "option",
312
- selected: false,
313
- truncate: false
264
+ /**
265
+ * An option within a `Multiselect`.
266
+ */ function S(n) {
267
+ var r = n.children, o = n.descriptionPosition, a = o === void 0 ? "bottom" : o, l = n.disabled, i = n.elementRef, u = n.icon, c = n.label, s = n.multiple, p = n.onClick, v = n.role, y = v === void 0 ? "option" : v, m = n.value, h = g(n, [ "children", "descriptionPosition", "disabled", "elementRef", "icon", "label", "multiple", "onClick", "role", "value" ]);
268
+ // @docs-props-type OptionPropsBase
269
+ var O = (0, e.useCallback)((function(e) {
270
+ if (!l) {
271
+ p === null || p === void 0 ? void 0 : p(e, {
272
+ value: m
273
+ });
274
+ }
275
+ }), [ l, p, m ]);
276
+ var w = m.toString();
277
+ var S = b({
278
+ descriptionPosition: a,
279
+ disabled: l
280
+ }, h);
281
+
282
+ return t().createElement(f.Item, d({
283
+ "data-test-value": m,
284
+ "data-test": "option",
285
+ elementRef: i
286
+ }, S, {
287
+ selectable: true,
288
+ selectableAppearance: s ? "checkbox" : "checkmark",
289
+ startAdornment: u,
290
+ onClick: O,
291
+ role: y,
292
+ value: w
293
+ }), r || c);
294
+ }
295
+ S.propTypes = w;
296
+ S.type = f.Item;
297
+ // For components to distinguish if their children are Options or Headings/Dividers
298
+ /* harmony default export */ const C = S;
299
+ // CONCATENATED MODULE: ./src/utils/scrollIntoViewIfNeeded.ts
300
+ // A utility that attempts to move an element into view by scrolling it's derived parent.
301
+ var k = function e(t) {
302
+ if (!t) {
303
+ return;
304
+ }
305
+ var n = t.offsetParent;
306
+ if (!n) {
307
+ return;
308
+ }
309
+ // Below the bottom of the container.
310
+ if (n.scrollTop + n.clientHeight < t.offsetTop + t.clientHeight) {
311
+ n.scrollTop = t.offsetTop + t.clientHeight - n.clientHeight;
312
+ // Above the top of the container.
313
+ } else if (n.scrollTop > t.offsetTop) {
314
+ n.scrollTop = t.offsetTop;
315
+ }
314
316
  };
317
+ // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
315
318
  /**
316
- * An option within a `Multiselect`. This inherits from
317
- * [PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)
318
- * so any elements passed to it must also be pure.
319
- */ var A = function(e) {
320
- g(r, e);
321
- var n = w(r);
322
- function r() {
323
- var e;
324
- y(this, r);
325
- for (var t = arguments.length, o = new Array(t), a = 0; a < t; a++) {
326
- o[a] = arguments[a];
327
- }
328
- e = n.call.apply(n, [ this ].concat(o));
329
- j(S(e), "c", null);
330
- j(S(e), "handleClick", (function(t) {
331
- var n = e.props, r = n.onClick, o = n.value, a = n.disabled;
332
- if (!a) {
333
- r === null || r === void 0 ? void 0 : r(t, {
334
- value: o
335
- });
336
- }
337
- }));
338
- j(S(e), "handleMount", (function(t) {
339
- e.c = t;
340
- }));
341
- return e;
319
+ * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
320
+ *
321
+ * @param ref - The React callback or object ref. Can be `null` or `undefined`.
322
+ * @param current - The new value of the ref.
323
+ */
324
+ function x(e, t) {
325
+ if (e) {
326
+ if (typeof e === "function") {
327
+ e(t);
328
+ } else {
329
+ // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
330
+ // the intention here is to signal "we will take care of setting 'current', not you".
331
+ e.current = t;
332
+ // eslint-disable-line no-param-reassign
333
+ }
342
334
  }
343
- // @docs-props-type OptionPropsBase
344
- h(r, [ {
345
- key: "scrollIntoViewIfNeeded",
346
- // eslint-disable-next-line react/no-unused-class-component-methods
347
- value: function e() {
348
- var t;
349
- (t = this.c) === null || t === void 0 ? void 0 : t.scrollIntoViewIfNeeded();
350
- }
351
- /**
352
- * Place focus on the button.
353
- */
354
- // eslint-disable-next-line react/no-unused-class-component-methods
355
- }, {
356
- key: "focus",
357
- value: function e() {
358
- var t;
359
- (t = this.c) === null || t === void 0 ? void 0 : t.focus();
360
- }
361
- }, {
362
- key: "render",
363
- value: function e() {
364
- var n = this.props, r = n.value, o = n.children, a = n.label, l = n.multiple, i = n.role, u = n.icon, c = v(n, [ "value", "children", "label", "multiple", "role", "icon" ]);
365
- var s = r.toString();
366
-
367
- return t().createElement(f.Item, d({
368
- "data-test-value": r,
369
- "data-test": "option",
370
- ref: this.handleMount
371
- }, c, {
372
- selectable: true,
373
- selectableAppearance: l ? "checkbox" : "checkmark",
374
- onClick: this.handleClick,
375
- role: i,
376
- value: s,
377
- startAdornment: u
378
- }), o || a);
379
- }
380
- } ]);
381
- return r;
382
- }(e.PureComponent);
383
- j(A, "propTypes", E);
384
- j(A, "defaultProps", M);
385
- j(A, "type", f.Item);
386
- /* harmony default export */ const _ = A;
335
+ }
387
336
  // CONCATENATED MODULE: ./src/Multiselect/Option.tsx
388
- function R(e) {
337
+ function j(e) {
389
338
  "@babel/helpers - typeof";
390
- return R = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
339
+ return j = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
391
340
  return typeof e;
392
341
  } : function(e) {
393
342
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
394
- }, R(e);
343
+ }, j(e);
395
344
  }
396
- function V() {
397
- return V = Object.assign ? Object.assign.bind() : function(e) {
345
+ function P() {
346
+ return P = Object.assign ? Object.assign.bind() : function(e) {
398
347
  for (var t = 1; t < arguments.length; t++) {
399
348
  var n = arguments[t];
400
349
  for (var r in n) {
@@ -402,11 +351,11 @@
402
351
  }
403
352
  }
404
353
  return e;
405
- }, V.apply(null, arguments);
354
+ }, P.apply(null, arguments);
406
355
  }
407
- function T(e, t) {
356
+ function E(e, t) {
408
357
  if (null == e) return {};
409
- var n, r, o = B(e, t);
358
+ var n, r, o = I(e, t);
410
359
  if (Object.getOwnPropertySymbols) {
411
360
  var a = Object.getOwnPropertySymbols(e);
412
361
  for (r = 0; r < a.length; r++) {
@@ -415,7 +364,7 @@
415
364
  }
416
365
  return o;
417
366
  }
418
- function B(e, t) {
367
+ function I(e, t) {
419
368
  if (null == e) return {};
420
369
  var n = {};
421
370
  for (var r in e) {
@@ -426,22 +375,22 @@
426
375
  }
427
376
  return n;
428
377
  }
429
- function q(e, t) {
378
+ function R(e, t) {
430
379
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
431
380
  }
432
- function N(e, t) {
381
+ function M(e, t) {
433
382
  for (var n = 0; n < t.length; n++) {
434
383
  var r = t[n];
435
384
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
436
- Object.defineProperty(e, G(r.key), r);
385
+ Object.defineProperty(e, F(r.key), r);
437
386
  }
438
387
  }
439
- function D(e, t, n) {
440
- return t && N(e.prototype, t), n && N(e, n), Object.defineProperty(e, "prototype", {
388
+ function T(e, t, n) {
389
+ return t && M(e.prototype, t), n && M(e, n), Object.defineProperty(e, "prototype", {
441
390
  writable: !1
442
391
  }), e;
443
392
  }
444
- function L(e, t) {
393
+ function _(e, t) {
445
394
  if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
446
395
  e.prototype = Object.create(t && t.prototype, {
447
396
  constructor: {
@@ -451,69 +400,69 @@
451
400
  }
452
401
  }), Object.defineProperty(e, "prototype", {
453
402
  writable: !1
454
- }), t && F(e, t);
403
+ }), t && B(e, t);
455
404
  }
456
- function F(e, t) {
457
- return F = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
405
+ function B(e, t) {
406
+ return B = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
458
407
  return e.__proto__ = t, e;
459
- }, F(e, t);
408
+ }, B(e, t);
460
409
  }
461
- function K(e) {
462
- var t = z();
410
+ function A(e) {
411
+ var t = D();
463
412
  return function() {
464
- var n, r = W(e);
413
+ var n, r = N(e);
465
414
  if (t) {
466
- var o = W(this).constructor;
415
+ var o = N(this).constructor;
467
416
  n = Reflect.construct(r, arguments, o);
468
417
  } else n = r.apply(this, arguments);
469
- return H(this, n);
418
+ return q(this, n);
470
419
  };
471
420
  }
472
- function H(e, t) {
473
- if (t && ("object" == R(t) || "function" == typeof t)) return t;
421
+ function q(e, t) {
422
+ if (t && ("object" == j(t) || "function" == typeof t)) return t;
474
423
  if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
475
- return $(e);
424
+ return V(e);
476
425
  }
477
- function $(e) {
426
+ function V(e) {
478
427
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
479
428
  return e;
480
429
  }
481
- function z() {
430
+ function D() {
482
431
  try {
483
432
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
484
433
  } catch (e) {}
485
- return (z = function t() {
434
+ return (D = function t() {
486
435
  return !!e;
487
436
  })();
488
437
  }
489
- function W(e) {
490
- return W = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
438
+ function N(e) {
439
+ return N = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
491
440
  return e.__proto__ || Object.getPrototypeOf(e);
492
- }, W(e);
441
+ }, N(e);
493
442
  }
494
- function U(e, t, n) {
495
- return (t = G(t)) in e ? Object.defineProperty(e, t, {
443
+ function L(e, t, n) {
444
+ return (t = F(t)) in e ? Object.defineProperty(e, t, {
496
445
  value: n,
497
446
  enumerable: !0,
498
447
  configurable: !0,
499
448
  writable: !0
500
449
  }) : e[t] = n, e;
501
450
  }
502
- function G(e) {
503
- var t = J(e, "string");
504
- return "symbol" == R(t) ? t : t + "";
451
+ function F(e) {
452
+ var t = K(e, "string");
453
+ return "symbol" == j(t) ? t : t + "";
505
454
  }
506
- function J(e, t) {
507
- if ("object" != R(e) || !e) return e;
455
+ function K(e, t) {
456
+ if ("object" != j(e) || !e) return e;
508
457
  var n = e[Symbol.toPrimitive];
509
458
  if (void 0 !== n) {
510
459
  var r = n.call(e, t || "default");
511
- if ("object" != R(r)) return r;
460
+ if ("object" != j(r)) return r;
512
461
  throw new TypeError("@@toPrimitive must return a primitive value.");
513
462
  }
514
463
  return ("string" === t ? String : Number)(e);
515
464
  }
516
- var X = {
465
+ var H = {
517
466
  /** @private */
518
467
  active: a().bool,
519
468
  children: a().node,
@@ -543,7 +492,7 @@
543
492
  truncate: a().bool,
544
493
  value: a().oneOfType([ a().string, a().number, a().bool ]).isRequired
545
494
  };
546
- var Q = {
495
+ var $ = {
547
496
  compact: false,
548
497
  descriptionPosition: "bottom",
549
498
  disabled: false,
@@ -554,29 +503,28 @@
554
503
  * An option within a `Multiselect`. This inherits from
555
504
  * [PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)
556
505
  * so any elements passed to it must also be pure.
557
- */ var Y = function(e) {
558
- L(r, e);
559
- var n = K(r);
506
+ */ var z = function(e) {
507
+ _(r, e);
508
+ var n = A(r);
560
509
  function r() {
561
510
  var e;
562
- q(this, r);
563
- for (var t = arguments.length, o = new Array(t), a = 0; a < t; a++) {
564
- o[a] = arguments[a];
565
- }
566
- e = n.call.apply(n, [ this ].concat(o));
567
- U($(e), "c", null);
568
- U($(e), "handleMount", (function(t) {
569
- e.c = t;
511
+ R(this, r);
512
+ for (var o = arguments.length, a = new Array(o), l = 0; l < o; l++) {
513
+ a[l] = arguments[l];
514
+ }
515
+ e = n.call.apply(n, [ this ].concat(a));
516
+ L(V(e), "optionBaseRef", t().createRef());
517
+ L(V(e), "handleMount", (function(t) {
518
+ x(e.optionBaseRef, t);
570
519
  }));
571
520
  return e;
572
521
  }
573
522
  // @docs-props-type OptionPropsBase
574
- D(r, [ {
523
+ T(r, [ {
575
524
  key: "scrollIntoViewIfNeeded",
576
525
  // eslint-disable-next-line react/no-unused-class-component-methods
577
526
  value: function e() {
578
- var t;
579
- (t = this.c) === null || t === void 0 ? void 0 : t.scrollIntoViewIfNeeded();
527
+ k(this.optionBaseRef.current);
580
528
  }
581
529
  /**
582
530
  * Place focus on the button.
@@ -585,106 +533,106 @@
585
533
  }, {
586
534
  key: "focus",
587
535
  value: function e() {
588
- var t;
589
- (t = this.c) === null || t === void 0 ? void 0 : t.focus();
536
+ var t, n;
537
+ (t = this.optionBaseRef) === null || t === void 0 ? void 0 : (n = t.current) === null || n === void 0 ? void 0 : n.focus();
590
538
  }
591
539
  }, {
592
540
  key: "render",
593
541
  value: function e() {
594
- var n = this.props, r = n.compact, o = T(n, [ "compact" ]);
542
+ var n = this.props, r = n.compact, o = E(n, [ "compact" ]);
595
543
 
596
- return t().createElement(_, V({}, o, {
597
- multiple: r,
598
- ref: this.handleMount
544
+ return t().createElement(C, P({}, o, {
545
+ elementRef: this.handleMount,
546
+ multiple: r
599
547
  }), this.props.children || this.props.label);
600
548
  }
601
549
  } ]);
602
550
  return r;
603
551
  }(e.PureComponent);
604
- U(Y, "propTypes", X);
605
- U(Y, "defaultProps", Q);
606
- /* harmony default export */ const Z = Y;
552
+ L(z, "propTypes", H);
553
+ L(z, "defaultProps", $);
554
+ /* harmony default export */ const W = z;
607
555
  // CONCATENATED MODULE: external "lodash/castArray"
608
- const ee = require("lodash/castArray");
609
- var te = n.n(ee);
556
+ const U = require("lodash/castArray");
557
+ var G = n.n(U);
610
558
  // CONCATENATED MODULE: external "lodash/find"
611
- const ne = require("lodash/find");
612
- var re = n.n(ne);
559
+ const J = require("lodash/find");
560
+ var X = n.n(J);
613
561
  // CONCATENATED MODULE: external "lodash/forEachRight"
614
- const oe = require("lodash/forEachRight");
615
- var ae = n.n(oe);
562
+ const Q = require("lodash/forEachRight");
563
+ var Y = n.n(Q);
616
564
  // CONCATENATED MODULE: external "lodash/includes"
617
- const le = require("lodash/includes");
618
- var ie = n.n(le);
565
+ const Z = require("lodash/includes");
566
+ var ee = n.n(Z);
619
567
  // CONCATENATED MODULE: external "lodash/memoize"
620
- const ue = require("lodash/memoize");
621
- var ce = n.n(ue);
568
+ const te = require("lodash/memoize");
569
+ var ne = n.n(te);
622
570
  // CONCATENATED MODULE: external "lodash/pick"
623
- const se = require("lodash/pick");
624
- var fe = n.n(se);
571
+ const re = require("lodash/pick");
572
+ var oe = n.n(re);
625
573
  // CONCATENATED MODULE: external "lodash/uniq"
626
- const pe = require("lodash/uniq");
627
- var de = n.n(pe);
574
+ const ae = require("lodash/uniq");
575
+ var le = n.n(ae);
628
576
  // CONCATENATED MODULE: external "lodash/without"
629
- const ve = require("lodash/without");
630
- var be = n.n(ve);
577
+ const ie = require("lodash/without");
578
+ var ue = n.n(ie);
631
579
  // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
632
- const ye = require("@splunk/react-ui/Dropdown");
633
- var me = n.n(ye);
580
+ const ce = require("@splunk/react-ui/Dropdown");
581
+ var se = n.n(ce);
634
582
  // CONCATENATED MODULE: external "@splunk/react-ui/Link"
635
- const he = require("@splunk/react-ui/Link");
636
- var ge = n.n(he);
583
+ const fe = require("@splunk/react-ui/Link");
584
+ var pe = n.n(fe);
637
585
  // CONCATENATED MODULE: external "@splunk/react-ui/ResultsMenu"
638
- const Oe = require("@splunk/react-ui/ResultsMenu");
639
- var we = n.n(Oe);
586
+ const de = require("@splunk/react-ui/ResultsMenu");
587
+ var ve = n.n(de);
640
588
  // CONCATENATED MODULE: external "@splunk/react-ui/Text"
641
- const Ce = require("@splunk/react-ui/Text");
642
- var Se = n.n(Ce);
589
+ const be = require("@splunk/react-ui/Text");
590
+ var ye = n.n(be);
643
591
  // CONCATENATED MODULE: external "@splunk/react-ui/usePrevious"
644
- const ke = require("@splunk/react-ui/usePrevious");
645
- var xe = n.n(ke);
592
+ const me = require("@splunk/react-ui/usePrevious");
593
+ var he = n.n(me);
646
594
  // CONCATENATED MODULE: external "@splunk/ui-utils/filter"
647
- const je = require("@splunk/ui-utils/filter");
595
+ const ge = require("@splunk/ui-utils/filter");
648
596
  // CONCATENATED MODULE: external "@splunk/ui-utils/id"
649
- const Ie = require("@splunk/ui-utils/id");
597
+ const Oe = require("@splunk/ui-utils/id");
650
598
  // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
651
- const Pe = require("@splunk/ui-utils/keyboard");
599
+ const we = require("@splunk/ui-utils/keyboard");
652
600
  // CONCATENATED MODULE: external "@splunk/react-icons/CaretSmallDown"
653
- const Ee = require("@splunk/react-icons/CaretSmallDown");
654
- var Me = n.n(Ee);
601
+ const Se = require("@splunk/react-icons/CaretSmallDown");
602
+ var Ce = n.n(Se);
655
603
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Caret"
656
- const Ae = require("@splunk/react-icons/enterprise/Caret");
657
- var _e = n.n(Ae);
604
+ const ke = require("@splunk/react-icons/enterprise/Caret");
605
+ var xe = n.n(ke);
658
606
  // CONCATENATED MODULE: external "@splunk/themes"
659
- const Re = require("@splunk/themes");
607
+ const je = require("@splunk/themes");
660
608
  // CONCATENATED MODULE: ./src/Select/icons/CaretSmallDown.tsx
661
- var Ve = function e() {
662
- var n = (0, Re.useSplunkTheme)(), r = n.isEnterprise;
663
- var o = r ? t().createElement(_e(), {
609
+ var Pe = function e() {
610
+ var n = (0, je.useSplunkTheme)(), r = n.isEnterprise;
611
+ var o = r ? t().createElement(xe(), {
664
612
  screenReaderText: null,
665
613
  hideDefaultTooltip: true,
666
614
  size: .5
667
- }) : t().createElement(Me(), null);
615
+ }) : t().createElement(Ce(), null);
668
616
  return o;
669
617
  };
670
- /* harmony default export */ const Te = Ve;
618
+ /* harmony default export */ const Ee = Pe;
671
619
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Search"
672
- const Be = require("@splunk/react-icons/enterprise/Search");
673
- var qe = n.n(Be);
620
+ const Ie = require("@splunk/react-icons/enterprise/Search");
621
+ var Re = n.n(Ie);
674
622
  // CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
675
- const Ne = require("@splunk/react-icons/Magnifier");
676
- var De = n.n(Ne);
623
+ const Me = require("@splunk/react-icons/Magnifier");
624
+ var Te = n.n(Me);
677
625
  // CONCATENATED MODULE: ./src/Select/icons/Search.tsx
678
- var Le = function e() {
679
- var n = (0, Re.useSplunkTheme)(), r = n.isEnterprise, o = n.isCompact;
626
+ var _e = function e() {
627
+ var n = (0, je.useSplunkTheme)(), r = n.isEnterprise, o = n.isCompact;
680
628
  var a = (0, s._)("Search");
681
629
  var l = o ? "20px" : "24px";
682
- var i = r ? t().createElement(qe(), {
630
+ var i = r ? t().createElement(Re(), {
683
631
  role: "presentation",
684
632
  size: "16px",
685
633
  screenReaderText: a,
686
634
  hideDefaultTooltip: true
687
- }) : t().createElement(De(), {
635
+ }) : t().createElement(Te(), {
688
636
  role: "presentation",
689
637
  "aria-label": a,
690
638
  width: l,
@@ -692,9 +640,9 @@
692
640
  });
693
641
  return i;
694
642
  };
695
- /* harmony default export */ const Fe = Le;
643
+ /* harmony default export */ const Be = _e;
696
644
  // CONCATENATED MODULE: ./src/Select/SelectAllOption.tsx
697
- var Ke = {
645
+ var Ae = {
698
646
  active: a().bool,
699
647
  changedToggle: a().bool,
700
648
  elementRef: a().oneOfType([ a().func, a().object ]),
@@ -704,13 +652,14 @@
704
652
  selected: a().oneOf([ false, true, "some" ]),
705
653
  totalCount: a().number
706
654
  };
707
- var He = t().forwardRef((function(e, n) {
708
- var r = e.active, o = e.id, a = e.onClick, l = e.selectAllLabel, i = e.totalCount, u = e.changedToggle, c = e.selected;
655
+ function qe(e) {
656
+ var n = e.active, r = e.elementRef, o = e.id, a = e.onClick, l = e.selectAllLabel, i = e.totalCount, u = e.changedToggle, c = e.selected;
709
657
  // When toggle is changed the total count is not displayed anymore so the count is now shown in the Select all menu item
710
658
  var s = u ? " (".concat(i === null || i === void 0 ? void 0 : i.toString(), ")") : "";
711
659
 
712
- return t().createElement(_, {
713
- active: r,
660
+ return t().createElement(C, {
661
+ active: n,
662
+ elementRef: r,
714
663
  "aria-keyshortcuts": "Control+A",
715
664
  "data-test": "select-all",
716
665
  description: "".concat(s, " Ctrl-a"),
@@ -720,23 +669,22 @@
720
669
  label: l,
721
670
  multiple: true,
722
671
  onClick: a,
723
- ref: n,
724
672
  role: "menuitemcheckbox",
725
673
  selected: c,
726
674
  tabIndex: -1,
727
675
  value: "selectAll"
728
676
  });
729
- }));
730
- He.propTypes = Ke;
731
- /* harmony default export */ const $e = He;
677
+ }
678
+ qe.propTypes = Ae;
679
+ /* harmony default export */ const Ve = qe;
732
680
  // CONCATENATED MODULE: external "styled-components"
733
- const ze = require("styled-components");
734
- var We = n.n(ze);
681
+ const De = require("styled-components");
682
+ var Ne = n.n(De);
735
683
  // CONCATENATED MODULE: external "@splunk/react-ui/Button"
736
- const Ue = require("@splunk/react-ui/Button");
737
- var Ge = n.n(Ue);
684
+ const Le = require("@splunk/react-ui/Button");
685
+ var Fe = n.n(Le);
738
686
  // CONCATENATED MODULE: ./src/Select/SelectBaseStyles.ts
739
- var Je = We()(Ge()).withConfig({
687
+ var Ke = Ne()(Fe()).withConfig({
740
688
  displayName: "SelectBaseStyles__StyledButton",
741
689
  componentId: "sc-16cj7sk-0"
742
690
  })([ "&[data-inline]{width:", ";}", "" ], (function(e) {
@@ -746,76 +694,76 @@
746
694
  var t = e.$multiple;
747
695
  return !t && "flex-grow: 0;";
748
696
  }));
749
- var Xe = We().span.withConfig({
697
+ var He = Ne().span.withConfig({
750
698
  displayName: "SelectBaseStyles__StyledLinkIcon",
751
699
  componentId: "sc-16cj7sk-1"
752
700
  })([ "padding-right:2px;" ]);
753
- var Qe = We().span.withConfig({
701
+ var $e = Ne().span.withConfig({
754
702
  displayName: "SelectBaseStyles__StyledLinkCaret",
755
703
  componentId: "sc-16cj7sk-2"
756
704
  })([ "padding-left:2px;" ]);
757
- var Ye = We().div.withConfig({
705
+ var ze = Ne().div.withConfig({
758
706
  displayName: "SelectBaseStyles__StyledFilter",
759
707
  componentId: "sc-16cj7sk-3"
760
- })([ "padding:", ";min-width:160px;" ], (0, Re.pick)({
708
+ })([ "padding:", ";min-width:160px;" ], (0, je.pick)({
761
709
  enterprise: "8px",
762
710
  prisma: "10px 16px"
763
711
  }));
764
- var Ze = We().span.withConfig({
712
+ var We = Ne().span.withConfig({
765
713
  displayName: "SelectBaseStyles__StyledSearchIconWrapper",
766
714
  componentId: "sc-16cj7sk-4"
767
- })([ "color:", ";pointer-events:none;padding:", ";" ], (0, Re.pick)({
715
+ })([ "color:", ";pointer-events:none;padding:", ";" ], (0, je.pick)({
768
716
  enterprise: {
769
- light: Re.variables.gray60,
770
- dark: Re.variables.white
717
+ light: je.variables.gray60,
718
+ dark: je.variables.white
771
719
  },
772
- prisma: Re.variables.contentColorMuted
773
- }), (0, Re.pick)({
720
+ prisma: je.variables.contentColorMuted
721
+ }), (0, je.pick)({
774
722
  comfortable: "0 8px",
775
723
  compact: "0 6px"
776
724
  }));
777
- var et = We().span.withConfig({
725
+ var Ue = Ne().span.withConfig({
778
726
  displayName: "SelectBaseStyles__StyledCount",
779
727
  componentId: "sc-16cj7sk-5"
780
- })([ "padding-right:", ";" ], Re.variables.spacingXSmall);
781
- var tt = We()(ge()).withConfig({
728
+ })([ "padding-right:", ";" ], je.variables.spacingXSmall);
729
+ var Ge = Ne()(pe()).withConfig({
782
730
  displayName: "SelectBaseStyles__StyledControlsLink",
783
731
  componentId: "sc-16cj7sk-6"
784
732
  })([ "margin-right:20px;", ";" ], (function(e) {
785
733
  var t = e.$disabled;
786
- return t && (0, ze.css)([ "color:", ";" ], Re.variables.contentColorDisabled);
734
+ return t && (0, De.css)([ "color:", ";" ], je.variables.contentColorDisabled);
787
735
  }));
788
- var nt = We().div.withConfig({
736
+ var Je = Ne().div.withConfig({
789
737
  displayName: "SelectBaseStyles__StyledToggleAllControls",
790
738
  componentId: "sc-16cj7sk-7"
791
- })([ "padding:", ";", "" ], (0, Re.pick)({
739
+ })([ "padding:", ";", "" ], (0, je.pick)({
792
740
  enterprise: "5px 8px",
793
741
  prisma: "10px 16px"
794
- }), (0, Re.pickVariant)("$placement", {
742
+ }), (0, je.pickVariant)("$placement", {
795
743
  above: {
796
- enterprise: (0, ze.css)([ "border-top:", ";" ], Re.variables.border),
797
- prisma: (0, ze.css)([ "border-top:1px solid ", ";" ], Re.variables.neutral200)
744
+ enterprise: (0, De.css)([ "border-top:", ";" ], je.variables.border),
745
+ prisma: (0, De.css)([ "border-top:1px solid ", ";" ], je.variables.neutral200)
798
746
  },
799
747
  below: {
800
- enterprise: (0, ze.css)([ "border-bottom:", ";" ], Re.variables.border),
801
- prisma: (0, ze.css)([ "border-bottom:1px solid ", ";" ], Re.variables.neutral200)
748
+ enterprise: (0, De.css)([ "border-bottom:", ";" ], je.variables.border),
749
+ prisma: (0, De.css)([ "border-bottom:1px solid ", ";" ], je.variables.neutral200)
802
750
  }
803
751
  }));
804
752
  // EXTERNAL MODULE: ./src/useControlled/index.ts + 1 modules
805
- var rt = n(2907);
753
+ var Xe = n(2907);
806
754
  // CONCATENATED MODULE: ./src/utils/fuzzyMatch.ts
807
755
  // A utility for matching keyboard characters to list values
808
- var ot = function e(t, n) {
756
+ var Qe = function e(t, n) {
809
757
  return t ? t.label.charAt(n).toLowerCase() : "";
810
758
  };
811
- var at = function e(t, n) {
759
+ var Ye = function e(t, n) {
812
760
  if (!t.length) {
813
761
  return t;
814
762
  }
815
763
  var r = null;
816
764
  var o = false;
817
765
  var a = t.filter((function(e) {
818
- var t = ot(e, n.index);
766
+ var t = Qe(e, n.index);
819
767
  if (t === n.value) {
820
768
  o = true;
821
769
  return true;
@@ -823,7 +771,7 @@
823
771
  // If we haven't found a match yet, keep track of the next closest match.
824
772
  // Secondary matching looks for the closest character of a higher value, and failing that, closest of a lower value.
825
773
  if (!o) {
826
- var a = ot(r, n.index);
774
+ var a = Qe(r, n.index);
827
775
  if (!a) {
828
776
  r = e;
829
777
  } else if (t > n.value) {
@@ -842,7 +790,7 @@
842
790
  };
843
791
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
844
792
  /* eslint-disable @typescript-eslint/no-empty-function */
845
- var lt = {
793
+ var Ze = {
846
794
  body: {
847
795
  appendChild: function e() {
848
796
  return [];
@@ -896,14 +844,14 @@
896
844
  search: ""
897
845
  }
898
846
  };
899
- function it() {
900
- var e = typeof document !== "undefined" ? document : lt;
847
+ function et() {
848
+ var e = typeof document !== "undefined" ? document : Ze;
901
849
  return e;
902
850
  }
903
851
  // CONCATENATED MODULE: ./src/utils/ssrWindow.ts
904
852
  /* eslint-disable @typescript-eslint/no-empty-function */
905
- var ut = {
906
- document: lt,
853
+ var tt = {
854
+ document: Ze,
907
855
  navigator: {
908
856
  userAgent: ""
909
857
  },
@@ -957,25 +905,25 @@
957
905
  clearTimeout(t);
958
906
  }
959
907
  };
960
- function ct() {
961
- var e = typeof window !== "undefined" ? window : ut;
908
+ function nt() {
909
+ var e = typeof window !== "undefined" ? window : tt;
962
910
  return e;
963
911
  }
964
912
  // CONCATENATED MODULE: ./src/Select/SelectBase.tsx
965
- function st(e) {
966
- return dt(e) || pt(e) || mt(e) || ft();
913
+ function rt(e) {
914
+ return lt(e) || at(e) || st(e) || ot();
967
915
  }
968
- function ft() {
916
+ function ot() {
969
917
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
970
918
  }
971
- function pt(e) {
919
+ function at(e) {
972
920
  if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
973
921
  }
974
- function dt(e) {
975
- if (Array.isArray(e)) return ht(e);
922
+ function lt(e) {
923
+ if (Array.isArray(e)) return ft(e);
976
924
  }
977
- function vt() {
978
- return vt = Object.assign ? Object.assign.bind() : function(e) {
925
+ function it() {
926
+ return it = Object.assign ? Object.assign.bind() : function(e) {
979
927
  for (var t = 1; t < arguments.length; t++) {
980
928
  var n = arguments[t];
981
929
  for (var r in n) {
@@ -983,29 +931,29 @@
983
931
  }
984
932
  }
985
933
  return e;
986
- }, vt.apply(null, arguments);
934
+ }, it.apply(null, arguments);
987
935
  }
988
- function bt(e, t) {
989
- return Ot(e) || gt(e, t) || mt(e, t) || yt();
936
+ function ut(e, t) {
937
+ return dt(e) || pt(e, t) || st(e, t) || ct();
990
938
  }
991
- function yt() {
939
+ function ct() {
992
940
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
993
941
  }
994
- function mt(e, t) {
942
+ function st(e, t) {
995
943
  if (e) {
996
- if ("string" == typeof e) return ht(e, t);
944
+ if ("string" == typeof e) return ft(e, t);
997
945
  var n = {}.toString.call(e).slice(8, -1);
998
- return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ht(e, t) : void 0;
946
+ return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? ft(e, t) : void 0;
999
947
  }
1000
948
  }
1001
- function ht(e, t) {
949
+ function ft(e, t) {
1002
950
  (null == t || t > e.length) && (t = e.length);
1003
951
  for (var n = 0, r = Array(t); n < t; n++) {
1004
952
  r[n] = e[n];
1005
953
  }
1006
954
  return r;
1007
955
  }
1008
- function gt(e, t) {
956
+ function pt(e, t) {
1009
957
  var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
1010
958
  if (null != n) {
1011
959
  var r, o, a, l, i = [], u = !0, c = !1;
@@ -1027,12 +975,12 @@
1027
975
  return i;
1028
976
  }
1029
977
  }
1030
- function Ot(e) {
978
+ function dt(e) {
1031
979
  if (Array.isArray(e)) return e;
1032
980
  }
1033
- function wt(e, t) {
981
+ function vt(e, t) {
1034
982
  if (null == e) return {};
1035
- var n, r, o = Ct(e, t);
983
+ var n, r, o = bt(e, t);
1036
984
  if (Object.getOwnPropertySymbols) {
1037
985
  var a = Object.getOwnPropertySymbols(e);
1038
986
  for (r = 0; r < a.length; r++) {
@@ -1041,7 +989,7 @@
1041
989
  }
1042
990
  return o;
1043
991
  }
1044
- function Ct(e, t) {
992
+ function bt(e, t) {
1045
993
  if (null == e) return {};
1046
994
  var n = {};
1047
995
  for (var r in e) {
@@ -1052,15 +1000,15 @@
1052
1000
  }
1053
1001
  return n;
1054
1002
  }
1055
- function St(e) {
1003
+ function yt(e) {
1056
1004
  "@babel/helpers - typeof";
1057
- return St = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1005
+ return yt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1058
1006
  return typeof e;
1059
1007
  } : function(e) {
1060
1008
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1061
- }, St(e);
1009
+ }, yt(e);
1062
1010
  }
1063
- function kt(e, t) {
1011
+ function mt(e, t) {
1064
1012
  var n = Object.keys(e);
1065
1013
  if (Object.getOwnPropertySymbols) {
1066
1014
  var r = Object.getOwnPropertySymbols(e);
@@ -1070,40 +1018,40 @@
1070
1018
  }
1071
1019
  return n;
1072
1020
  }
1073
- function xt(e) {
1021
+ function ht(e) {
1074
1022
  for (var t = 1; t < arguments.length; t++) {
1075
1023
  var n = null != arguments[t] ? arguments[t] : {};
1076
- t % 2 ? kt(Object(n), !0).forEach((function(t) {
1077
- jt(e, t, n[t]);
1078
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : kt(Object(n)).forEach((function(t) {
1024
+ t % 2 ? mt(Object(n), !0).forEach((function(t) {
1025
+ gt(e, t, n[t]);
1026
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : mt(Object(n)).forEach((function(t) {
1079
1027
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
1080
1028
  }));
1081
1029
  }
1082
1030
  return e;
1083
1031
  }
1084
- function jt(e, t, n) {
1085
- return (t = It(t)) in e ? Object.defineProperty(e, t, {
1032
+ function gt(e, t, n) {
1033
+ return (t = Ot(t)) in e ? Object.defineProperty(e, t, {
1086
1034
  value: n,
1087
1035
  enumerable: !0,
1088
1036
  configurable: !0,
1089
1037
  writable: !0
1090
1038
  }) : e[t] = n, e;
1091
1039
  }
1092
- function It(e) {
1093
- var t = Pt(e, "string");
1094
- return "symbol" == St(t) ? t : t + "";
1040
+ function Ot(e) {
1041
+ var t = wt(e, "string");
1042
+ return "symbol" == yt(t) ? t : t + "";
1095
1043
  }
1096
- function Pt(e, t) {
1097
- if ("object" != St(e) || !e) return e;
1044
+ function wt(e, t) {
1045
+ if ("object" != yt(e) || !e) return e;
1098
1046
  var n = e[Symbol.toPrimitive];
1099
1047
  if (void 0 !== n) {
1100
1048
  var r = n.call(e, t || "default");
1101
- if ("object" != St(r)) return r;
1049
+ if ("object" != yt(r)) return r;
1102
1050
  throw new TypeError("@@toPrimitive must return a primitive value.");
1103
1051
  }
1104
1052
  return ("string" === t ? String : Number)(e);
1105
1053
  }
1106
- var Et = {
1054
+ var St = {
1107
1055
  allowKeyMatching: a().bool,
1108
1056
  allowNewValues: a().bool,
1109
1057
  animateLoading: a().bool,
@@ -1152,57 +1100,57 @@
1152
1100
  /** @private. */
1153
1101
  virtualization: a().number
1154
1102
  };
1155
- var Mt = ce()((function(e) {
1103
+ var Ct = ne()((function(e) {
1156
1104
  return [ e ];
1157
1105
  }));
1158
1106
  // preserve separate widths for single vs. multi mode
1159
- var At = ce()((function(e) {
1107
+ var kt = ne()((function(e) {
1160
1108
  var t = e.anchorWidth, n = e.isMultiple, r = e.maxHeight, o = e.menuStyle;
1161
- return n ? xt({
1109
+ return n ? ht({
1162
1110
  width: Math.max(t !== null && t !== void 0 ? t : 0, 200),
1163
1111
  maxHeight: r
1164
- }, o) : xt({
1112
+ }, o) : ht({
1165
1113
  minWidth: t !== null && t !== void 0 ? t : undefined,
1166
1114
  maxWidth: Math.max(t !== null && t !== void 0 ? t : 0, 300),
1167
1115
  maxHeight: r
1168
1116
  }, o);
1169
1117
  }));
1170
- var _t = [ "clickAway", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
1171
- function Rt(e) {
1118
+ var xt = [ "clickAway", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
1119
+ function jt(e) {
1172
1120
  return e && i()(e.props, "value");
1173
1121
  }
1174
- function Vt(e, t) {
1175
- return "".concat(St(e), "-").concat(e, "-").concat(t);
1122
+ function Pt(e, t) {
1123
+ return "".concat(yt(e), "-").concat(e, "-").concat(t);
1176
1124
  }
1177
- var Tt = [ "append", "error", "prepend" ];
1178
- var Bt = (0, s._)("No matches");
1179
- var qt = (0, s._)("Select...");
1180
- var Nt = function e(n) {
1125
+ var Et = [ "append", "error", "prepend" ];
1126
+ var It = (0, s._)("No matches");
1127
+ var Rt = (0, s._)("Select...");
1128
+ var Mt = function e(n) {
1181
1129
  var r = n.activeItemId, o = n.filterKeyword, a = n.hasChildren, l = n.inputId, i = n.inputRef, u = n.menuListboxId, c = n.multiple, f = n.onClearAll, p = n.onSelectAll, d = n.onTextBlur, v = n.onTextChange, b = n.onTextFocus, y = n.onTextKeyDown, m = n.optionSelection, h = n.placement, g = n.selectAllAppearance, O = n.textHasFocus;
1182
1130
  var w = (0, s._)("Select all options".concat(m.current === "all" ? " disabled" : ""));
1183
- var C = (0, s._)("Clear all options".concat(m.current === "none" ? " disabled" : ""));
1131
+ var S = (0, s._)("Clear all options".concat(m.current === "none" ? " disabled" : ""));
1184
1132
  // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
1185
- var S = t().createElement(nt, {
1133
+ var C = t().createElement(Je, {
1186
1134
  $placement: h,
1187
1135
  key: "selectAll"
1188
- }, t().createElement(tt, {
1136
+ }, t().createElement(Ge, {
1189
1137
  $disabled: m.current === "all",
1190
1138
  "aria-label": w,
1191
1139
  onClick: p,
1192
1140
  "data-test": "select-all"
1193
- }, o ? (0, s._)("Select all Matches") : (0, s._)("Select all")), t().createElement(tt, {
1141
+ }, o ? (0, s._)("Select all Matches") : (0, s._)("Select all")), t().createElement(Ge, {
1194
1142
  $disabled: m.current === "none",
1195
- "aria-label": C,
1143
+ "aria-label": S,
1196
1144
  onClick: f,
1197
1145
  "data-test": "clear-all"
1198
1146
  }, o ? (0, s._)("Clear all Matches") : (0, s._)("Clear all")));
1199
1147
 
1200
1148
  return t().createElement("div", {
1201
1149
  key: "controls"
1202
- }, t().createElement(Ye, {
1150
+ }, t().createElement(ze, {
1203
1151
  key: "filter",
1204
1152
  "data-test": "filter"
1205
- }, t().createElement(Se(), {
1153
+ }, t().createElement(ye(), {
1206
1154
  value: o,
1207
1155
  autoCapitalize: "off",
1208
1156
  autoComplete: "off",
@@ -1223,251 +1171,37 @@
1223
1171
  inputRef: i,
1224
1172
  inputId: l,
1225
1173
  canClear: true,
1226
- startAdornment: t().createElement(Ze, null, t().createElement(Fe, null))
1227
- })), c && a && g === "buttongroup" && S);
1174
+ startAdornment: t().createElement(We, null, t().createElement(Be, null))
1175
+ })), c && a && g === "buttongroup" && C);
1228
1176
  };
1229
- var Dt = false;
1230
- var Lt = function n(r) {
1231
- var o = r.activeIndex, a = r.activeItemId, l = r.allowKeyMatching, i = r.allowNewValues, u = r.availableMatchOptions, c = r.availableOptionCount, p = r.children, d = r.currentValues, v = r.filter, b = r.filterKeyword, y = r.firstSelectedOptionIndex, m = r.isLoadingOptions, h = r.multiple, g = r.newTopValues, O = r.onActiveOptionMount, w = r.onClearAll, C = r.onClick, S = r.onKeyDown, k = r.onOptionMount, x = r.onScrollBottom, j = r.onSelectAll, I = r.optionSelection, P = r.selectAllAppearance, E = r.selectedOptionCount, M = r.setActiveValue, A = r.setAvailableMatchOptions, R = r.setAvailableOptionCount, V = r.setDisplayedValues, T = r.setFirstSelectedOptionIndex, B = r.setOptionSelection, q = r.setSelectedOptionCount, N = r.textHasFocus, D = r.toggle;
1232
- R(0);
1233
- T(undefined);
1234
- q(0);
1235
- M(undefined);
1236
- A([]);
1237
- var L;
1238
- var F = 0;
1239
- var K = false;
1240
- // used to avoid overwriting the selected item ref in multiple mode
1241
- var H;
1242
- var $ = e.Children.toArray(p).reduce((function(n, r, o) {
1243
- // ignore Headings and Dividers
1244
- if (!Rt(r)) {
1245
- n.push(r);
1246
- return n;
1247
- }
1248
- var a = r.props, i = a.disabled, c = a.hidden, s = a.label, p = a.value;
1249
- // Find out if the search string exactly matches a value
1250
- if (p === b) {
1251
- L = true;
1252
- }
1253
- var y = d && d.indexOf(p) >= 0;
1254
- var O = !!y && !i && !H;
1255
- var w = l && !h && !v && !m && !x;
1256
- var j = Vt(p, s);
1257
- var I = -1;
1258
- if (w && !i && !c) {
1259
- u.current.push({
1260
- label: s,
1261
- value: p
1262
- });
1263
- I = u.current.length - 1;
1264
- }
1265
- // Format the Menu.Item
1266
- var P = (0, e.cloneElement)(r, {
1267
- key: r.key || o,
1268
- onClick: C,
1269
- onKeyDown: w ? function(e) {
1270
- return S(e, I);
1271
- } : undefined,
1272
- selected: y,
1273
- multiple: h,
1274
- role: "option",
1275
- ref: function e(t) {
1276
- return k(t, j, O);
1277
- }
1278
- });
1279
- if (O) {
1280
- H = true;
1281
- }
1282
- if (g && g.indexOf(p) >= 0) {
1283
- if (F === 0) {
1284
- n.splice(F, 0, t().createElement(f.Divider, {
1285
- key: "topDivider"
1286
- }));
1287
- K = true;
1288
- }
1289
- n.splice(F, 0, P);
1290
- F += 1;
1291
- } else {
1292
- n.push(P);
1293
- }
1294
- return n;
1295
- }), []);
1296
- // In multiple mode, add missing items
1297
- if (h) {
1298
- ae()(d, (function(e) {
1299
- var n = re()($, (function(t) {
1300
- return Rt(t) && t.props && t.props.value === e;
1301
- }));
1302
- if (!n) {
1303
- if (e === b) {
1304
- L = true;
1305
- }
1306
- var r = g && g.indexOf(e) >= 0;
1307
- var o = g.length;
1308
- if (F === 0) {
1309
- $.splice(0, 0, t().createElement(f.Divider, {
1310
- key: "topDivider"
1311
- }));
1312
- F += 1;
1313
- K = true;
1314
- }
1315
- $.splice(r ? 0 : o + 1, 0, t().createElement(_, {
1316
- label: String(e),
1317
- value: e,
1318
- key: "missing-value-".concat(e),
1319
- onClick: C,
1320
- multiple: h,
1321
- selected: true
1322
- }));
1323
- if (r) {
1324
- F += 1;
1325
- }
1326
- }
1327
- }));
1328
- }
1329
- var z = v === "controlled";
1330
- // Filter the items
1331
- var W = (0, je.stringToKeywords)(b);
1332
- $ = z ? $ : $.filter((function(e) {
1333
- if (Rt(e)) {
1334
- return (0, je.testPhrase)(e.props.label, W);
1335
- }
1336
- return true;
1337
- // Keep all headers and non-interactive options
1338
- })).map((function(t) {
1339
- if (!Rt(t)) {
1340
- return t;
1341
- }
1342
- // highlight matched text
1343
- var n = W && (0, je.keywordLocations)(t.props.label, W);
1344
-
1345
- return (0, e.cloneElement)(t, {
1346
- matchRanges: n || undefined
1347
- });
1348
- }));
1349
- // Add the option to add the new value
1350
- if (i && !L && b) {
1351
- var U = K ? F + 1 : F;
1352
- $.splice(U, 0, t().createElement(_, {
1353
- label: "".concat(b, " (new value)"),
1354
- value: b,
1355
- key: "newValue",
1356
- multiple: h,
1357
- onClick: C
1358
- }));
1359
- }
1360
- // When selectAll is a menu item, add an offset so that activeItem accounts for the extra selectAll option.
1361
- var G = P === "checkbox" && h && $.length > 1 ? 1 : 0;
1362
- var J = true;
1363
- // Highlight the selected Items and remove hidden
1364
- $ = $.reduce((function(t, n) {
1365
- // ignore Dividers & Headings
1366
- if (!Rt(n)) {
1367
- t.push(n);
1368
- return t;
1369
- }
1370
- // Ignore any hidden items
1371
- if (n.props && n.props.hidden) {
1372
- return t;
1373
- }
1374
- if (n.props.selected && !n.props.disabled && y.current == null) {
1375
- T(c.current);
1376
- }
1377
- var r = G === o;
1378
- G += 1;
1379
- R(c.current + 1);
1380
- q(E.current + (n.props.selected ? 1 : 0));
1381
- if (n.key !== "newValue" && !n.props.disabled && !n.props.selected) {
1382
- J = false;
1383
- }
1384
- if (!r || !N) {
1385
- t.push(n);
1386
- return t;
1387
- }
1388
- if (!n.props.disabled) {
1389
- M(n.props.value);
1390
- }
1391
- var l = (0, e.cloneElement)(n, {
1392
- active: r,
1393
- id: a,
1394
- ref: O
1395
- });
1396
- t.push(l);
1397
- return t;
1398
- }), []);
1399
- B(E.current === 0 && "none" || J && "all" || "some");
1400
- // add select all option
1401
- if (P === "checkbox" && h && c.current > 0) {
1402
- var X;
1403
- if (I.current === "all") {
1404
- if (b === "") {
1405
- X = (0, s._)("Clear all");
1406
- } else {
1407
- X = (0, s._)("Clear all matches");
1408
- }
1409
- } else if (b === "") {
1410
- X = (0, s._)("Select all");
1411
- } else {
1412
- X = (0, s._)("Select all matches");
1413
- }
1414
- if (o === 0 && N) {
1415
- M("selectAll");
1416
- }
1417
- $.unshift( t().createElement($e, {
1418
- active: o === 0,
1419
- changedToggle: !!D,
1420
- id: o === 0 ? a : undefined,
1421
- onClick: I.current === "all" ? w : j,
1422
- selectAllLabel: X,
1423
- selected: I.current === "all" || I.current !== "none" && "some",
1424
- totalCount: d.length,
1425
- tabIndex: -1,
1426
- ref: O
1427
- }), t().createElement(f.Divider, {
1428
- key: "selectAllDivider"
1429
- }));
1430
- }
1431
- V($.reduce((function(e, t) {
1432
- if (Rt(t)) {
1433
- e.push(t.props.value);
1434
- }
1435
- return e;
1436
- }), []));
1437
- Dt = $.some((function(e) {
1438
- return Rt(e);
1439
- }));
1440
- // eslint-disable-next-line react/jsx-no-useless-fragment
1441
-
1442
- return t().createElement(t().Fragment, null, $);
1443
- };
1444
- var Ft = function e(t) {
1177
+ var Tt = false;
1178
+ var _t = function e(t) {
1445
1179
  var n = t.prefixLabel, r = t.label, o = t.suffixLabel;
1446
1180
  var a = r;
1447
1181
  if (n) {
1448
1182
  a = [ "".concat(n, ": ") ].concat(a);
1449
1183
  }
1450
1184
  if (o) {
1451
- a = te()(a).concat(" ".concat(o));
1185
+ a = G()(a).concat(" ".concat(o));
1452
1186
  }
1453
1187
  return a;
1454
1188
  };
1455
- function Kt(n) {
1456
- var r = n.appearance, o = n.append, a = n.children, l = n.currentValues, i = l === void 0 ? [] : l, u = n.describedBy, c = n.disabled, f = n.elementRef, p = n.error, d = n.inline, v = n.labelText, b = n.labelledBy, y = n.multiple, m = n.onClick, h = n.placeholder, g = n.prefixLabel, O = n.prepend, w = n.required, C = n.suffixLabel, S = n.toggle, k = n.toggleContent, x = wt(n, [ "appearance", "append", "children", "currentValues", "describedBy", "disabled", "elementRef", "error", "inline", "labelText", "labelledBy", "multiple", "onClick", "placeholder", "prefixLabel", "prepend", "required", "suffixLabel", "toggle", "toggleContent" ]);
1189
+ function Bt(n) {
1190
+ var r = n.appearance, o = n.append, a = n.children, l = n.currentValues, i = l === void 0 ? [] : l, u = n.describedBy, c = n.disabled, f = n.elementRef, p = n.error, d = n.inline, v = n.labelText, b = n.labelledBy, y = n.multiple, m = n.onClick, h = n.placeholder, g = n.prefixLabel, O = n.prepend, w = n.required, S = n.suffixLabel, C = n.toggle, k = n.toggleContent, x = vt(n, [ "appearance", "append", "children", "currentValues", "describedBy", "disabled", "elementRef", "error", "inline", "labelText", "labelledBy", "multiple", "onClick", "placeholder", "prefixLabel", "prepend", "required", "suffixLabel", "toggle", "toggleContent" ]);
1457
1191
  var j;
1458
- var I;
1459
- var P = [];
1192
+ var P;
1193
+ var E = [];
1460
1194
  // Generate buttonLabels
1461
- var E = e.Children.toArray(a);
1462
- var M = i.reduce((function(e, t, n, r) {
1463
- var o = re()(E, (function(e) {
1464
- return Rt(e) && e.props.value === t;
1195
+ var I = e.Children.toArray(a);
1196
+ var R = i.reduce((function(e, t, n, r) {
1197
+ var o = X()(I, (function(e) {
1198
+ return jt(e) && e.props.value === t;
1465
1199
  }));
1466
1200
  if (o) {
1467
1201
  var a = o.props, l = a.children, u = a.icon, c = a.label;
1468
1202
  var f = k !== "optionLabel" && l ? l : c;
1469
1203
  e.push(f);
1470
- P.push(c);
1204
+ E.push(c);
1471
1205
  // if not in multiple mode, add the icon
1472
1206
  if (!y && i.length === 1) {
1473
1207
  j = u;
@@ -1475,41 +1209,41 @@
1475
1209
  } else if (y) {
1476
1210
  // only add values that don't match an option in "multiple" mode to preserve old behaviour
1477
1211
  e.push(t);
1478
- P.push(t.toString());
1212
+ E.push(t.toString());
1479
1213
  }
1480
1214
  if (n < r.length - 1) {
1481
1215
  e.push((0, s._)(", "));
1482
- P.push((0, s._)(", "));
1216
+ E.push((0, s._)(", "));
1483
1217
  }
1484
1218
  return e;
1485
1219
  }), []);
1486
- I = M;
1220
+ P = R;
1487
1221
  // only apply prefix / suffix if the label is not empty
1488
- if (I.length > 0) {
1222
+ if (P.length > 0) {
1489
1223
  // If there's more than one item selected, read out the selected total
1490
1224
  // rather than reading out each selected item
1491
- P = Ft({
1225
+ E = _t({
1492
1226
  prefixLabel: g,
1493
- label: I.length > 1 ? [ "".concat(i.length, " items selected") ] : P,
1494
- suffixLabel: C
1227
+ label: P.length > 1 ? [ "".concat(i.length, " items selected") ] : E,
1228
+ suffixLabel: S
1495
1229
  });
1496
- I = Ft({
1230
+ P = _t({
1497
1231
  prefixLabel: g,
1498
- label: I,
1499
- suffixLabel: C
1232
+ label: P,
1233
+ suffixLabel: S
1500
1234
  });
1501
1235
  }
1502
1236
  // single <Select> behaviour is to show the placeholder if all parts of the label
1503
1237
  // are empty strings so we replicate this behaviour here
1504
- if (I.length === 0 || !y && I.every((function(e) {
1238
+ if (P.length === 0 || !y && P.every((function(e) {
1505
1239
  return e === "";
1506
1240
  }))) {
1507
- I = Mt(h);
1508
- P = I;
1241
+ P = Ct(h);
1242
+ E = P;
1509
1243
  }
1510
- var A = xt({
1244
+ var M = ht({
1511
1245
  "aria-describedby": u,
1512
- "aria-label": "".concat(v ? "".concat(v, ", ") : "").concat(P.join("")),
1246
+ "aria-label": "".concat(v ? "".concat(v, ", ") : "").concat(E.join("")),
1513
1247
  "aria-labelledby": b,
1514
1248
  // aria-labelledby takes precedence over aria-label if exists
1515
1249
  "aria-required": w,
@@ -1523,148 +1257,125 @@
1523
1257
  error: p
1524
1258
  }, x);
1525
1259
  if (y) {
1526
- A["data-test-values"] = JSON.stringify(i);
1260
+ M["data-test-values"] = JSON.stringify(i);
1527
1261
  } else {
1528
- var _ = bt(i, 1), R = _[0];
1529
- A["data-test-value"] = R;
1262
+ var T = ut(i, 1), _ = T[0];
1263
+ M["data-test-value"] = _;
1530
1264
  }
1531
- if (S) {
1265
+ if (C) {
1532
1266
 
1533
- return (0, e.cloneElement)(S, A);
1267
+ return (0, e.cloneElement)(C, M);
1534
1268
  }
1535
1269
  if (r === "link") {
1536
1270
 
1537
- return t().createElement(ge(), vt({}, A, {
1271
+ return t().createElement(pe(), it({}, M, {
1538
1272
  "data-select-appearance": "link"
1539
- }), !!j && t().createElement(Xe, null, j), I || h, t().createElement(Qe, null, t().createElement(Te, null)));
1273
+ }), !!j && t().createElement(He, null, j), P || h, t().createElement($e, null, t().createElement(Ee, null)));
1540
1274
  }
1541
1275
 
1542
- return t().createElement(Je, vt({}, A, {
1276
+ return t().createElement(Ke, it({}, M, {
1543
1277
  $multiple: y,
1544
1278
  appearance: r,
1545
- label: I,
1279
+ label: P,
1546
1280
  error: p,
1547
1281
  icon: j,
1548
1282
  inline: d,
1549
1283
  isMenu: true,
1550
1284
  onClick: m
1551
- }, fe()(x, Tt)), !!i.length && y && t().createElement(et, {
1285
+ }, oe()(x, Et)), !!i.length && y && t().createElement(Ue, {
1552
1286
  "data-role": "count"
1553
1287
  }, "(", i.length, ")"));
1554
1288
  }
1555
- Kt[ye.legacyRefMode] = true;
1556
- function Ht(n) {
1557
- var r;
1558
- var o = n.allowKeyMatching, a = o === void 0 ? true : o, l = n.animateLoading, i = n.appearance, u = i === void 0 ? "toggle" : i, c = n.append, s = n.allowNewValues, f = n.children, p = n.defaultPlacement, d = p === void 0 ? "vertical" : p, v = n.defaultValues, b = n.describedBy, y = n.disabled, m = n.elementRef, h = n.error, g = n.filter, O = n.footerMessage, w = n.inline, C = n.inputId, S = n.inputRef, k = n.isLoadingOptions, x = n.labelledBy, j = n.labelText, I = n.loadingMessage, P = n.menuStyle, E = P === void 0 ? {} : P, M = n.multiple, A = n.name, _ = n.noOptionsMessage, R = _ === void 0 ? Bt : _, V = n.onChange, T = n.onScroll, B = n.onScrollBottom, q = n.onFilterChange, N = n.onClick, D = n.onClose, L = n.onOpen, F = n.required, K = n.placeholder, H = K === void 0 ? qt : K, $ = n.prefixLabel, z = n.prepend, W = n.repositionMode, U = W === void 0 ? "flip" : W, G = n.selectAllAppearance, J = G === void 0 ? "buttongroup" : G, X = n.showSelectedValuesFirst, Q = n.suffixLabel, Y = n.tabConfirmsNewValue, Z = n.values, ee = n.virtualization, te = n.toggle, ne = n.toggleContent, oe = ne === void 0 ? "optionChildren" : ne, ae = wt(n, [ "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" ]);
1289
+ Bt[ce.legacyRefMode] = true;
1290
+ function At(n) {
1291
+ var r = n.allowKeyMatching, o = r === void 0 ? true : r, a = n.animateLoading, l = n.appearance, i = l === void 0 ? "toggle" : l, u = n.append, c = n.allowNewValues, p = n.children, d = n.defaultPlacement, v = d === void 0 ? "vertical" : d, b = n.defaultValues, y = n.describedBy, m = n.disabled, h = n.elementRef, g = n.error, O = n.filter, w = n.footerMessage, S = n.inline, x = n.inputId, j = n.inputRef, P = n.isLoadingOptions, E = n.labelledBy, I = n.labelText, R = n.loadingMessage, M = n.menuStyle, T = M === void 0 ? {} : M, _ = n.multiple, B = n.name, A = n.noOptionsMessage, q = A === void 0 ? It : A, V = n.onChange, D = n.onScroll, N = n.onScrollBottom, L = n.onFilterChange, F = n.onClick, K = n.onClose, H = n.onOpen, $ = n.required, z = n.placeholder, W = z === void 0 ? Rt : z, U = n.prefixLabel, G = n.prepend, J = n.repositionMode, Q = J === void 0 ? "flip" : J, Z = n.selectAllAppearance, te = Z === void 0 ? "buttongroup" : Z, ne = n.showSelectedValuesFirst, re = n.suffixLabel, oe = n.tabConfirmsNewValue, ae = n.values, ie = n.virtualization, ce = n.toggle, fe = n.toggleContent, pe = fe === void 0 ? "optionChildren" : fe, be = vt(n, [ "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" ]);
1559
1292
  // @docs-props-type SelectBasePropsBase
1560
- var le = (0, rt["default"])({
1561
- value: Z,
1562
- defaultValue: v,
1293
+ var ye = (0, Xe["default"])({
1294
+ value: ae,
1295
+ defaultValue: b,
1563
1296
  componentName: "SelectBase"
1564
1297
  });
1565
1298
  // states
1566
- var ue = (0, e.useState)((function() {
1299
+ var me = (0, e.useState)((function() {
1567
1300
  return {
1568
- activeItemId: (0, Ie.createDOMID)("active-item"),
1569
- menuListboxId: (0, Ie.createDOMID)("menu-listbox")
1301
+ activeItemId: (0, Oe.createDOMID)("active-item"),
1302
+ menuListboxId: (0, Oe.createDOMID)("menu-listbox")
1570
1303
  };
1571
- })), ce = bt(ue, 1), se = ce[0], fe = se.activeItemId, pe = se.menuListboxId;
1572
- var ve = (0, e.useState)(0), ye = bt(ve, 2), he = ye[0], ge = ye[1];
1573
- var Ce = (0, e.useState)(""), Se = bt(Ce, 2), ke = Se[0], je = Se[1];
1574
- var Ee = (0, e.useState)(false), Me = bt(Ee, 2), Ae = Me[0], _e = Me[1];
1575
- var Re = (0, e.useState)(false), Ve = bt(Re, 2), Te = Ve[0], Be = Ve[1];
1576
- var qe = (0, e.useState)([]), Ne = bt(qe, 2), De = Ne[0], Le = Ne[1];
1577
- var Fe = (0, e.useState)(v || []), Ke = bt(Fe, 2), He = Ke[0], $e = Ke[1];
1304
+ })), Se = ut(me, 1), Ce = Se[0], ke = Ce.activeItemId, xe = Ce.menuListboxId;
1305
+ var je = (0, e.useState)(0), Pe = ut(je, 2), Ee = Pe[0], Ie = Pe[1];
1306
+ var Re = (0, e.useState)(""), Me = ut(Re, 2), Te = Me[0], _e = Me[1];
1307
+ var Be = (0, e.useState)(false), Ae = ut(Be, 2), qe = Ae[0], De = Ae[1];
1308
+ var Ne = (0, e.useState)(false), Le = ut(Ne, 2), Fe = Le[0], Ke = Le[1];
1309
+ var He = (0, e.useState)([]), $e = ut(He, 2), ze = $e[0], We = $e[1];
1310
+ var Ue = (0, e.useState)(b || []), Ge = ut(Ue, 2), Je = Ge[0], Qe = Ge[1];
1578
1311
  // previous state
1579
- var ze = xe()(he);
1312
+ var Ze = he()(Ee);
1580
1313
  // refs
1581
- var We = (0, e.useRef)(null);
1582
- var Ue = (0, e.useRef)(null);
1583
- var Ge = (0, e.useRef)(null);
1584
- var Je = (0, e.useRef)([]);
1585
- var Xe = (0, e.useRef)([]);
1586
- var Qe = (0, e.useRef)(ze);
1587
- var Ye = (0, e.useRef)();
1588
- var Ze = (0, e.useRef)({});
1589
- var et = (0, e.useRef)(0);
1590
- var tt = (0, e.useRef)([]);
1591
- var nt = (0, e.useRef)(null);
1592
- var ot = (0, e.useRef)();
1593
- var lt = (0, e.useRef)(0);
1594
- var it = (0, e.useRef)("none");
1595
- // setters for refs used in subcomponents
1596
- var ut = function e(t) {
1597
- et.current = t;
1598
- };
1599
- var ft = function e(t) {
1600
- ot.current = t;
1601
- };
1602
- var pt = function e(t) {
1603
- lt.current = t;
1604
- };
1605
- var dt = function e(t) {
1606
- Ye.current = t;
1607
- };
1608
- var yt = function e(t) {
1609
- Xe.current = t;
1610
- };
1611
- var mt = function e(t) {
1612
- it.current = t;
1613
- };
1614
- var ht = function e(t) {
1615
- tt.current = t;
1616
- };
1314
+ var et = (0, e.useRef)(null);
1315
+ var tt = (0, e.useRef)(null);
1316
+ var ot = (0, e.useRef)(null);
1317
+ var at = (0, e.useRef)([]);
1318
+ var lt = (0, e.useRef)([]);
1319
+ var ct = (0, e.useRef)(Ze);
1320
+ var st = (0, e.useRef)();
1321
+ var ft = (0, e.useRef)({});
1322
+ var pt = (0, e.useRef)(0);
1323
+ var dt = (0, e.useRef)([]);
1324
+ var bt = (0, e.useRef)(null);
1325
+ var yt = (0, e.useRef)();
1326
+ var mt = (0, e.useRef)(0);
1327
+ var ht = (0, e.useRef)("none");
1617
1328
  (0, e.useEffect)((function() {
1618
1329
  if (false) {}
1619
- }), [ u, c, h, z ]);
1330
+ }), [ i, u, g, G ]);
1620
1331
  var gt = (0, e.useCallback)((function() {
1621
- var e = le ? Z : He;
1622
- return M || e == null ? e : e.slice(0, 1);
1623
- }), [ le, M, Z, He ]);
1332
+ var e = ye ? ae : Je;
1333
+ return _ || e == null ? e : e.slice(0, 1);
1334
+ }), [ ye, _, ae, Je ]);
1624
1335
  var Ot = (0, e.useCallback)((function() {
1625
1336
  var e;
1626
1337
  // in non-multiple mode, don't move values to the top of the list
1627
- return M && X !== "never" ? (e = gt()) !== null && e !== void 0 ? e : [] : [];
1628
- }), [ gt, M, X ]);
1629
- var Ct = (0, e.useCallback)((function(e) {
1630
- var t = ke;
1631
- _e(true);
1632
- Le(Ot());
1338
+ return _ && ne !== "never" ? (e = gt()) !== null && e !== void 0 ? e : [] : [];
1339
+ }), [ gt, _, ne ]);
1340
+ var wt = (0, e.useCallback)((function(e) {
1341
+ var t = Te;
1342
+ De(true);
1343
+ We(Ot());
1633
1344
  // SUI-3234: preserve existing behavior difference between <Select> and <Multiselect.Compact>
1634
- if (M) {
1635
- je("");
1345
+ if (_) {
1346
+ _e("");
1636
1347
  }
1637
- if (t !== ke) {
1638
- q === null || q === void 0 ? void 0 : q(e, {
1639
- keyword: ke
1348
+ if (t !== Te) {
1349
+ L === null || L === void 0 ? void 0 : L(e, {
1350
+ keyword: Te
1640
1351
  });
1641
1352
  }
1642
- }), [ ke, Ot, M, q ]);
1353
+ }), [ Te, Ot, _, L ]);
1643
1354
  (0, e.useEffect)((function() {
1644
- if (Ae) {
1645
- L === null || L === void 0 ? void 0 : L();
1646
- if (nt.current && !g) {
1647
- nt.current.focus();
1355
+ if (qe) {
1356
+ H === null || H === void 0 ? void 0 : H();
1357
+ if (bt.current && !O) {
1358
+ bt.current.focus();
1648
1359
  } else {
1649
1360
  var e;
1650
- ge((e = ot.current) !== null && e !== void 0 ? e : 0);
1361
+ Ie((e = yt.current) !== null && e !== void 0 ? e : 0);
1651
1362
  }
1652
1363
  }
1653
- }), [ L, Ae, De, ke, g ]);
1364
+ }), [ H, qe, ze, Te, O ]);
1654
1365
  var St = (0, e.useCallback)((function() {
1655
- _e(false);
1656
- ge(0);
1657
- Qe.current = null;
1658
- D === null || D === void 0 ? void 0 : D();
1659
- }), [ D ]);
1660
- var kt = (0, e.useCallback)((function(e, t) {
1366
+ De(false);
1367
+ Ie(0);
1368
+ ct.current = null;
1369
+ K === null || K === void 0 ? void 0 : K();
1370
+ }), [ K ]);
1371
+ var Ct = (0, e.useCallback)((function(e, t) {
1661
1372
  var n;
1662
1373
  var r = (n = gt()) !== null && n !== void 0 ? n : [];
1663
1374
  var o = r.indexOf(t);
1664
1375
  var a;
1665
- if (M) {
1376
+ if (_) {
1666
1377
  if (o >= 0) {
1667
- a = [].concat(st(r.slice(0, o)), st(r.slice(o + 1)));
1378
+ a = [].concat(rt(r.slice(0, o)), rt(r.slice(o + 1)));
1668
1379
  } else {
1669
1380
  a = r.concat([ t ]);
1670
1381
  }
@@ -1672,14 +1383,14 @@
1672
1383
  // non-multiple mode must always have a value
1673
1384
  a = [ t ];
1674
1385
  }
1675
- var l = !le;
1386
+ var l = !ye;
1676
1387
  if (l) {
1677
- $e(a);
1388
+ Qe(a);
1678
1389
  }
1679
- if (M) {
1390
+ if (_) {
1680
1391
  // in uncontrolled multiple mode, keep the menu open
1681
1392
  if (l) {
1682
- _e(true);
1393
+ De(true);
1683
1394
  }
1684
1395
  } else {
1685
1396
  var i;
@@ -1688,127 +1399,127 @@
1688
1399
  St({
1689
1400
  reason: "contentClick"
1690
1401
  });
1691
- (i = We.current) === null || i === void 0 ? void 0 : i.focus();
1402
+ (i = et.current) === null || i === void 0 ? void 0 : i.focus();
1692
1403
  }
1693
1404
  V === null || V === void 0 ? void 0 : V(e, {
1694
1405
  values: a,
1695
- name: A,
1406
+ name: B,
1696
1407
  reason: "valueToggle"
1697
1408
  });
1698
- }), [ gt, St, le, M, A, V ]);
1699
- var xt = function e() {
1700
- Ue.current = null;
1701
- Je.current = [];
1702
- if (Ge.current) {
1703
- clearTimeout(Ge.current);
1409
+ }), [ gt, St, ye, _, B, V ]);
1410
+ var Et = function e() {
1411
+ tt.current = null;
1412
+ at.current = [];
1413
+ if (ot.current) {
1414
+ clearTimeout(ot.current);
1704
1415
  }
1705
1416
  };
1706
- var jt = (0, e.useCallback)((function(e) {
1417
+ var _t = (0, e.useCallback)((function(e) {
1707
1418
  var n;
1708
1419
  // this doesn't make sense if we can't select multiple values
1709
- if (!M) {
1420
+ if (!_) {
1710
1421
  return;
1711
1422
  }
1712
1423
  var r = (n = gt()) !== null && n !== void 0 ? n : [];
1713
- var o = de()(r.concat(tt.current));
1714
- o = t().Children.toArray(f).filter((function(e) {
1715
- return Rt(e) && ie()(o, e.props.value) && (!e.props.disabled || ie()(r, e.props.value));
1424
+ var o = le()(r.concat(dt.current));
1425
+ o = t().Children.toArray(p).filter((function(e) {
1426
+ return jt(e) && ee()(o, e.props.value) && (!e.props.disabled || ee()(r, e.props.value));
1716
1427
  })).map((function(e) {
1717
1428
  return e.props.value;
1718
1429
  }));
1719
- if (!le) {
1720
- $e(o);
1430
+ if (!ye) {
1431
+ Qe(o);
1721
1432
  }
1722
1433
  V === null || V === void 0 ? void 0 : V(e, {
1723
1434
  values: o,
1724
- name: A,
1435
+ name: B,
1725
1436
  reason: "selectAll"
1726
1437
  });
1727
- }), [ f, gt, le, M, A, V ]);
1728
- var It = (0, e.useCallback)((function(e) {
1438
+ }), [ p, gt, ye, _, B, V ]);
1439
+ var At = (0, e.useCallback)((function(e) {
1729
1440
  var n;
1730
1441
  // this doesn't make sense if we can't select multiple values
1731
- if (!M) {
1442
+ if (!_) {
1732
1443
  return;
1733
1444
  }
1734
1445
  var r = (n = gt()) !== null && n !== void 0 ? n : [];
1735
- var o = be().apply(void 0, [ r ].concat(st(tt.current)));
1446
+ var o = ue().apply(void 0, [ r ].concat(rt(dt.current)));
1736
1447
  // this will unselect all selected values unless those values are disabled or hidden by the filter
1737
- var a = t().Children.toArray(f).filter((function(e) {
1738
- return Rt(e) && (ie()(r, e.props.value) && e.props.disabled || ie()(o, e.props.value));
1448
+ var a = t().Children.toArray(p).filter((function(e) {
1449
+ return jt(e) && (ee()(r, e.props.value) && e.props.disabled || ee()(o, e.props.value));
1739
1450
  })).map((function(e) {
1740
1451
  return e.props.value;
1741
1452
  }));
1742
- if (!le) {
1743
- $e(a);
1453
+ if (!ye) {
1454
+ Qe(a);
1744
1455
  }
1745
1456
  V === null || V === void 0 ? void 0 : V(e, {
1746
1457
  values: a,
1747
- name: A,
1458
+ name: B,
1748
1459
  reason: "clearAll"
1749
1460
  });
1750
- }), [ f, gt, le, M, A, V ]);
1751
- var Pt = (0, e.useCallback)((function(e) {
1752
- if (Ae && !k) {
1753
- B === null || B === void 0 ? void 0 : B(e);
1754
- }
1755
- }), [ Ae, k, B ]);
1756
- var Et = (0, e.useCallback)((function(t) {
1757
- var n = (0, Pe.keycode)(t.nativeEvent);
1461
+ }), [ p, gt, ye, _, B, V ]);
1462
+ var qt = (0, e.useCallback)((function(e) {
1463
+ if (qe && !P) {
1464
+ N === null || N === void 0 ? void 0 : N(e);
1465
+ }
1466
+ }), [ qe, P, N ]);
1467
+ var Vt = (0, e.useCallback)((function(t) {
1468
+ var n = (0, we.keycode)(t.nativeEvent);
1758
1469
  if (n === "tab") {
1759
- if (Y && Ye.current && et.current <= 1) {
1470
+ if (oe && st.current && pt.current <= 1) {
1760
1471
  t.preventDefault();
1761
- kt(t, Ye.current);
1472
+ Ct(t, st.current);
1762
1473
  }
1763
1474
  }
1764
1475
  if (t.shiftKey || t.metaKey || t.ctrlKey) {
1765
1476
  if (n === "a" && (t.ctrlKey || t.metaKey)) {
1766
1477
  // handle control + A
1767
- if (it.current === "all") {
1768
- It(t);
1478
+ if (ht.current === "all") {
1479
+ At(t);
1769
1480
  } else {
1770
- jt(t);
1481
+ _t(t);
1771
1482
  }
1772
1483
  }
1773
1484
  return;
1774
1485
  }
1775
1486
  if (n === "down") {
1776
1487
  t.preventDefault();
1777
- ge(Math.min(he + 1, J === "checkbox" ? et.current : et.current - 1));
1778
- if (f && B) {
1488
+ Ie(Math.min(Ee + 1, te === "checkbox" ? pt.current : pt.current - 1));
1489
+ if (p && N) {
1779
1490
  var r;
1780
- var o = e.Children.toArray(f).length - (2 + ((r = gt()) !== null && r !== void 0 ? r : []).length);
1781
- if (he === o) {
1782
- Pt(t);
1491
+ var o = e.Children.toArray(p).length - (2 + ((r = gt()) !== null && r !== void 0 ? r : []).length);
1492
+ if (Ee === o) {
1493
+ qt(t);
1783
1494
  }
1784
1495
  }
1785
1496
  }
1786
1497
  if (n === "up") {
1787
1498
  t.preventDefault();
1788
- ge(Math.max(he - 1, 0));
1499
+ Ie(Math.max(Ee - 1, 0));
1789
1500
  }
1790
- if (n === "enter" && Ye.current && Ae) {
1791
- if (Ye.current === "selectAll") {
1792
- if (it.current === "all") {
1793
- It(t);
1501
+ if (n === "enter" && st.current && qe) {
1502
+ if (st.current === "selectAll") {
1503
+ if (ht.current === "all") {
1504
+ At(t);
1794
1505
  } else {
1795
- jt(t);
1506
+ _t(t);
1796
1507
  }
1797
1508
  } else {
1798
1509
  t.preventDefault();
1799
- kt(t, Ye.current);
1510
+ Ct(t, st.current);
1800
1511
  }
1801
1512
  }
1802
- }), [ he, f, gt, It, Pt, jt, B, Ae, J, Y, kt ]);
1803
- var Mt = (0, e.useCallback)((function(e, t) {
1513
+ }), [ Ee, p, gt, At, qt, _t, N, qe, te, oe, Ct ]);
1514
+ var Dt = (0, e.useCallback)((function(e, t) {
1804
1515
  var n = t.value;
1805
1516
  e.preventDefault();
1806
- if (!Ae) {
1517
+ if (!qe) {
1807
1518
  return;
1808
1519
  }
1809
- kt(e, n);
1810
- }), [ Ae, kt ]);
1811
- var Tt = (0, e.useCallback)((function(e, t) {
1520
+ Ct(e, n);
1521
+ }), [ qe, Ct ]);
1522
+ var Nt = (0, e.useCallback)((function(e, t) {
1812
1523
  var n = e.nativeEvent.key;
1813
1524
  // Checking for a single character to avoid complications from double-byte languages and emojis.
1814
1525
  if (n.length === 1) {
@@ -1817,227 +1528,414 @@
1817
1528
  index: 0,
1818
1529
  value: n
1819
1530
  };
1820
- if (!Ue.current) {
1531
+ if (!tt.current) {
1821
1532
  if (n === " ") {
1822
- xt();
1533
+ Et();
1823
1534
  return;
1824
1535
  }
1825
- r = at(Xe.current, o);
1826
- } else if (Je.current.length > 1) {
1827
- o.index = Ue.current.index + 1;
1828
- r = at(Je.current, o);
1536
+ r = Ye(lt.current, o);
1537
+ } else if (at.current.length > 1) {
1538
+ o.index = tt.current.index + 1;
1539
+ r = Ye(at.current, o);
1829
1540
  }
1830
1541
  if (r.length) {
1831
- var a = 0;
1542
+ var a;
1543
+ var l = 0;
1832
1544
  // If the active option is a first character match, cycle to the next matching option.
1833
1545
  if (o.index === 0 && r.length > 1) {
1834
- var l = r.indexOf(Xe.current[t]);
1835
- if (l >= 0) {
1836
- a = l === r.length - 1 ? 0 : l + 1;
1546
+ var i = r.indexOf(lt.current[t]);
1547
+ if (i >= 0) {
1548
+ l = i === r.length - 1 ? 0 : i + 1;
1837
1549
  }
1838
1550
  }
1839
- var i = r[a];
1840
- var u = i.value, c = i.label;
1841
- var s = Ze.current[Vt(u, c)];
1842
- if (s != null) {
1843
- var f;
1844
- (f = s.focus) === null || f === void 0 ? void 0 : f.call(s);
1845
- }
1551
+ var u = r[l];
1552
+ var c = u.value, s = u.label;
1553
+ var f = ft.current[Pt(c, s)];
1554
+ f === null || f === void 0 ? void 0 : (a = f.focus) === null || a === void 0 ? void 0 : a.call(f);
1846
1555
  }
1847
- Je.current = r;
1848
- Ue.current = o;
1849
- if (Ge.current) {
1850
- clearTimeout(Ge.current);
1556
+ at.current = r;
1557
+ tt.current = o;
1558
+ if (ot.current) {
1559
+ clearTimeout(ot.current);
1851
1560
  }
1852
- Ge.current = setTimeout(xt, 500);
1561
+ ot.current = setTimeout(Et, 500);
1853
1562
  e.preventDefault();
1854
1563
  e.stopPropagation();
1855
1564
  }
1856
1565
  }), []);
1857
- var Ft = (0, e.useCallback)((function(e, t) {
1566
+ var Lt = (0, e.useCallback)((function(e, t) {
1858
1567
  var n = t.value;
1859
- je(n);
1860
- _e(true);
1861
- ge(0);
1862
- q === null || q === void 0 ? void 0 : q(e, {
1568
+ _e(n);
1569
+ De(true);
1570
+ Ie(0);
1571
+ L === null || L === void 0 ? void 0 : L(e, {
1863
1572
  keyword: n
1864
1573
  });
1865
- }), [ q ]);
1866
- var Ht = (0, e.useCallback)((function() {
1867
- Be(true);
1574
+ }), [ L ]);
1575
+ var Ft = (0, e.useCallback)((function() {
1576
+ Ke(true);
1868
1577
  }), []);
1869
- var $t = (0, e.useCallback)((function() {
1870
- Be(false);
1578
+ var Kt = (0, e.useCallback)((function() {
1579
+ Ke(false);
1871
1580
  }), []);
1872
- var zt = (0, e.useCallback)((function(e) {
1873
- if (Qe.current !== he) {
1874
- e === null || e === void 0 ? void 0 : e.scrollIntoViewIfNeeded();
1581
+ var Ht = (0, e.useCallback)((function(e) {
1582
+ if (ct.current !== Ee) {
1583
+ k(e);
1875
1584
  }
1876
- }), [ he ]);
1877
- var Wt = (0, e.useCallback)((function(e, t, n) {
1585
+ }), [ Ee ]);
1586
+ var $t = (0, e.useCallback)((function(e, t, n) {
1878
1587
  if (n) {
1879
- nt.current = e;
1588
+ bt.current = e;
1880
1589
  }
1881
1590
  if (e == null) {
1882
- delete Ze.current[t];
1591
+ delete ft.current[t];
1883
1592
  } else {
1884
- Ze.current[t] = e;
1593
+ ft.current[t] = e;
1885
1594
  }
1886
- }), []);
1887
- var Ut = (0, e.useCallback)((function(e) {
1888
- We.current = e;
1889
- }), [ We ]);
1890
- var Gt = (r = gt()) !== null && r !== void 0 ? r : [];
1891
- var Jt = e.Children.toArray(f);
1892
- var Xt = Gt.some((function(e) {
1893
- var t = re()(Jt, (function(t) {
1894
- return Rt(t) && t.props.value === e;
1595
+ }), [ ft ]);
1596
+ var zt = (0, e.useCallback)((function(e) {
1597
+ et.current = e;
1598
+ }), [ et ]);
1599
+ var Wt = (0, e.useMemo)((function() {
1600
+ var e;
1601
+ return (e = gt()) !== null && e !== void 0 ? e : [];
1602
+ }), [ gt ]);
1603
+ var Ut = e.Children.toArray(p);
1604
+ var Gt = Wt.some((function(e) {
1605
+ var t = X()(Ut, (function(t) {
1606
+ return jt(t) && t.props.value === e;
1895
1607
  }));
1896
1608
  return t && !t.props.disabled;
1897
1609
  }));
1898
- var Qt = X === "immediately" ? Ot() : De;
1899
- var Yt = {
1900
- activeIndex: he,
1901
- activeItemId: fe,
1902
- allowKeyMatching: a,
1903
- allowNewValues: s,
1904
- availableMatchOptions: Xe,
1905
- availableOptionCount: et,
1906
- children: f,
1907
- currentValues: Gt,
1908
- filter: g,
1909
- filterKeyword: ke,
1910
- firstSelectedOptionIndex: ot,
1911
- isLoadingOptions: k,
1912
- multiple: M,
1913
- newTopValues: Qt,
1914
- onActiveOptionMount: zt,
1915
- onClick: Mt,
1916
- onClearAll: It,
1917
- onKeyDown: Tt,
1918
- onOptionMount: Wt,
1919
- onScrollBottom: B,
1920
- onSelectAll: jt,
1921
- optionSelection: it,
1922
- selectAllAppearance: J,
1923
- selectedOptionCount: lt,
1924
- setActiveValue: dt,
1925
- setAvailableMatchOptions: yt,
1926
- setAvailableOptionCount: ut,
1927
- setDisplayedValues: ht,
1928
- setFirstSelectedOptionIndex: ft,
1929
- setOptionSelection: mt,
1930
- setSelectedOptionCount: pt,
1931
- textHasFocus: Te,
1932
- toggle: te
1933
- };
1934
- var Zt = function e(n) {
1935
- var r = n.anchorWidth, o = n.maxHeight, a = n.placement;
1936
- var i = At({
1610
+ var Jt = ne === "immediately" ? Ot() : ze;
1611
+ var Xt = (0, e.useMemo)((function() {
1612
+ pt.current = 0;
1613
+ yt.current = undefined;
1614
+ mt.current = 0;
1615
+ st.current = undefined;
1616
+ lt.current = [];
1617
+ var n = function e(t, n) {
1618
+ return function(e) {
1619
+ return $t(e, t, n);
1620
+ };
1621
+ };
1622
+ var r;
1623
+ var a = 0;
1624
+ var l = false;
1625
+ // used to avoid overwriting the selected item ref in multiple mode
1626
+ var i;
1627
+ var u = e.Children.toArray(p).reduce((function(u, c, s) {
1628
+ // ignore Headings and Dividers
1629
+ if (!jt(c)) {
1630
+ u.push(c);
1631
+ return u;
1632
+ }
1633
+ var p = c.props, d = p.disabled, v = p.hidden, b = p.label, y = p.value;
1634
+ // Find out if the search string exactly matches a value
1635
+ if (y === Te) {
1636
+ r = true;
1637
+ }
1638
+ var m = Wt && Wt.indexOf(y) >= 0;
1639
+ var h = !!m && !d && !i;
1640
+ var g = o && !_ && !O && !P && !N;
1641
+ var w = Pt(y, b);
1642
+ var S = -1;
1643
+ if (g && !d && !v) {
1644
+ lt.current.push({
1645
+ label: b,
1646
+ value: y
1647
+ });
1648
+ S = lt.current.length - 1;
1649
+ }
1650
+ // Format the Menu.Item
1651
+ var C = (0, e.cloneElement)(c, {
1652
+ elementRef: n(w, h),
1653
+ key: c.key || s,
1654
+ onClick: Dt,
1655
+ onKeyDown: g ? function(e) {
1656
+ return Nt(e, S);
1657
+ } : undefined,
1658
+ selected: m,
1659
+ multiple: _,
1660
+ role: "option"
1661
+ });
1662
+ if (h) {
1663
+ i = true;
1664
+ }
1665
+ if (Jt && Jt.indexOf(y) >= 0) {
1666
+ if (a === 0) {
1667
+ u.splice(a, 0, t().createElement(f.Divider, {
1668
+ key: "topDivider"
1669
+ }));
1670
+ l = true;
1671
+ }
1672
+ u.splice(a, 0, C);
1673
+ a += 1;
1674
+ } else {
1675
+ u.push(C);
1676
+ }
1677
+ return u;
1678
+ }), []);
1679
+ // In multiple mode, add missing items
1680
+ if (_) {
1681
+ Y()(Wt, (function(e) {
1682
+ var o = X()(u, (function(t) {
1683
+ return jt(t) && t.props && t.props.value === e;
1684
+ }));
1685
+ if (!o) {
1686
+ if (e === Te) {
1687
+ r = true;
1688
+ }
1689
+ var i = Jt && Jt.indexOf(e) >= 0;
1690
+ var c = Jt.length;
1691
+ if (a === 0) {
1692
+ u.splice(0, 0, t().createElement(f.Divider, {
1693
+ key: "topDivider"
1694
+ }));
1695
+ a += 1;
1696
+ l = true;
1697
+ }
1698
+ var s = String(e);
1699
+ var p = Pt(e, s);
1700
+ u.splice(i ? 0 : c + 1, 0, t().createElement(C, {
1701
+ elementRef: n(p),
1702
+ label: s,
1703
+ value: e,
1704
+ key: "missing-value-".concat(e),
1705
+ onClick: Dt,
1706
+ multiple: _,
1707
+ selected: true
1708
+ }));
1709
+ if (i) {
1710
+ a += 1;
1711
+ }
1712
+ }
1713
+ }));
1714
+ }
1715
+ var d = O === "controlled";
1716
+ // Filter the items
1717
+ var v = (0, ge.stringToKeywords)(Te);
1718
+ u = d ? u : u.filter((function(e) {
1719
+ if (jt(e)) {
1720
+ return (0, ge.testPhrase)(e.props.label, v);
1721
+ }
1722
+ return true;
1723
+ // Keep all headers and non-interactive options
1724
+ })).map((function(t) {
1725
+ if (!jt(t)) {
1726
+ return t;
1727
+ }
1728
+ // highlight matched text
1729
+ var n = v && (0, ge.keywordLocations)(t.props.label, v);
1730
+
1731
+ return (0, e.cloneElement)(t, {
1732
+ matchRanges: n || undefined
1733
+ });
1734
+ }));
1735
+ // Add the option to add the new value
1736
+ if (c && !r && Te) {
1737
+ var b = l ? a + 1 : a;
1738
+ var y = "".concat(Te, " (new value)");
1739
+ var m = Pt(Te, y);
1740
+ u.splice(b, 0, t().createElement(C, {
1741
+ elementRef: n(m),
1742
+ label: y,
1743
+ value: Te,
1744
+ key: "newValue",
1745
+ multiple: _,
1746
+ onClick: Dt
1747
+ }));
1748
+ }
1749
+ // When selectAll is a menu item, add an offset so that activeItem accounts for the extra selectAll option.
1750
+ var h = te === "checkbox" && _ && u.length > 1 ? 1 : 0;
1751
+ var g = true;
1752
+ // Highlight the selected Items and remove hidden
1753
+ u = u.reduce((function(t, n) {
1754
+ // ignore Dividers & Headings
1755
+ if (!jt(n)) {
1756
+ t.push(n);
1757
+ return t;
1758
+ }
1759
+ // Ignore any hidden items
1760
+ if (n.props && n.props.hidden) {
1761
+ return t;
1762
+ }
1763
+ if (n.props.selected && !n.props.disabled && yt.current == null) {
1764
+ yt.current = pt.current;
1765
+ }
1766
+ var r = h === Ee;
1767
+ h += 1;
1768
+ pt.current += 1;
1769
+ mt.current += n.props.selected ? 1 : 0;
1770
+ if (n.key !== "newValue" && !n.props.disabled && !n.props.selected) {
1771
+ g = false;
1772
+ }
1773
+ if (!r || !Fe) {
1774
+ t.push(n);
1775
+ return t;
1776
+ }
1777
+ if (!n.props.disabled) {
1778
+ st.current = n.props.value;
1779
+ }
1780
+ var o = (0, e.cloneElement)(n, {
1781
+ active: r,
1782
+ elementRef: Ht,
1783
+ id: ke
1784
+ });
1785
+ t.push(o);
1786
+ return t;
1787
+ }), []);
1788
+ ht.current = mt.current === 0 && "none" || g && "all" || "some";
1789
+ // add select all option
1790
+ if (te === "checkbox" && _ && pt.current > 0) {
1791
+ var w;
1792
+ if (ht.current === "all") {
1793
+ if (Te === "") {
1794
+ w = (0, s._)("Clear all");
1795
+ } else {
1796
+ w = (0, s._)("Clear all matches");
1797
+ }
1798
+ } else if (Te === "") {
1799
+ w = (0, s._)("Select all");
1800
+ } else {
1801
+ w = (0, s._)("Select all matches");
1802
+ }
1803
+ if (Ee === 0 && Fe) {
1804
+ st.current = "selectAll";
1805
+ }
1806
+ u.unshift( t().createElement(Ve, {
1807
+ key: "select-all-option",
1808
+ active: Ee === 0,
1809
+ changedToggle: !!ce,
1810
+ elementRef: Ht,
1811
+ id: Ee === 0 ? ke : undefined,
1812
+ onClick: ht.current === "all" ? At : _t,
1813
+ selectAllLabel: w,
1814
+ selected: ht.current === "all" || ht.current !== "none" && "some",
1815
+ totalCount: Wt.length,
1816
+ tabIndex: -1
1817
+ }), t().createElement(f.Divider, {
1818
+ key: "selectAllDivider"
1819
+ }));
1820
+ }
1821
+ dt.current = u.reduce((function(e, t) {
1822
+ if (jt(t)) {
1823
+ e.push(t.props.value);
1824
+ }
1825
+ return e;
1826
+ }), []);
1827
+ Tt = u.some((function(e) {
1828
+ return jt(e);
1829
+ }));
1830
+ return u;
1831
+ }), [ Ee, ke, o, c, p, Wt, O, Te, Ht, At, Dt, Nt, $t, _t, P, _, Jt, N, te, Fe, ce ]);
1832
+ var Qt = function e(n) {
1833
+ var r = n.anchorWidth, o = n.maxHeight, l = n.placement;
1834
+ var i = kt({
1937
1835
  anchorWidth: r,
1938
- isMultiple: M,
1836
+ isMultiple: _,
1939
1837
  maxHeight: o,
1940
- menuStyle: E
1838
+ menuStyle: T
1941
1839
  });
1942
- var u = Gt.length > 0 && !Xt && !g ? 0 : undefined;
1840
+ var u = Wt.length > 0 && !Gt && !O ? 0 : undefined;
1943
1841
  var c = {
1944
- "aria-multiselectable": M || undefined,
1945
- childrenStart: !!g && t().createElement(Nt, {
1946
- activeItemId: fe,
1947
- filterKeyword: ke,
1948
- hasChildren: Dt,
1949
- inputId: C,
1950
- inputRef: S,
1951
- menuListboxId: pe,
1952
- multiple: M,
1953
- onClearAll: It,
1954
- onSelectAll: jt,
1955
- onTextBlur: $t,
1956
- onTextChange: Ft,
1957
- onTextFocus: Ht,
1958
- onTextKeyDown: Et,
1959
- optionSelection: it,
1960
- placement: a,
1961
- selectAllAppearance: J,
1962
- textHasFocus: Te
1842
+ "aria-multiselectable": _ || undefined,
1843
+ childrenStart: !!O && t().createElement(Mt, {
1844
+ activeItemId: ke,
1845
+ filterKeyword: Te,
1846
+ hasChildren: Tt,
1847
+ inputId: x,
1848
+ inputRef: j,
1849
+ menuListboxId: xe,
1850
+ multiple: _,
1851
+ onClearAll: At,
1852
+ onSelectAll: _t,
1853
+ onTextBlur: Kt,
1854
+ onTextChange: Lt,
1855
+ onTextFocus: Ft,
1856
+ onTextKeyDown: Vt,
1857
+ optionSelection: ht,
1858
+ placement: l,
1859
+ selectAllAppearance: te,
1860
+ textHasFocus: Fe
1963
1861
  }),
1964
- focusMode: g ? "never" : undefined,
1965
- isLoading: k,
1966
- menuId: pe,
1967
- onScrollBottom: B ? Pt : undefined,
1968
- placement: a !== null && a !== void 0 ? a : undefined,
1969
- noOptionsMessage: R,
1970
- footerMessage: O,
1971
- animateLoading: l,
1972
- loadingMessage: I,
1973
- onScroll: T,
1862
+ focusMode: O ? "never" : undefined,
1863
+ isLoading: P,
1864
+ menuId: xe,
1865
+ onScrollBottom: N ? qt : undefined,
1866
+ placement: l !== null && l !== void 0 ? l : undefined,
1867
+ noOptionsMessage: q,
1868
+ footerMessage: w,
1869
+ animateLoading: a,
1870
+ loadingMessage: R,
1871
+ onScroll: D,
1974
1872
  style: i,
1975
1873
  tabIndex: u
1976
1874
  };
1977
- if (ee) {
1875
+ if (ie) {
1978
1876
 
1979
- return t().createElement(Oe.VirtualizedResultsMenu, vt({
1980
- virtualization: ee
1981
- }, c), t().createElement(Lt, Yt));
1877
+ return t().createElement(de.VirtualizedResultsMenu, it({
1878
+ virtualization: ie
1879
+ }, c), Xt);
1982
1880
  }
1983
1881
 
1984
- return t().createElement(we(), c, t().createElement(Lt, Yt));
1882
+ return t().createElement(ve(), c, Xt);
1985
1883
  };
1986
1884
 
1987
- return t().createElement(me(), {
1988
- closeReasons: _t,
1989
- inputId: C,
1990
- toggle: t().createElement(Kt, vt({
1991
- appearance: u,
1992
- append: c,
1885
+ return t().createElement(se(), {
1886
+ closeReasons: xt,
1887
+ inputId: x,
1888
+ toggle: t().createElement(Bt, it({
1889
+ appearance: i,
1890
+ append: u,
1993
1891
  currentValues: gt(),
1994
- "data-test": M ? "multiselect" : "select",
1995
- describedBy: b,
1996
- disabled: y,
1997
- elementRef: m,
1998
- error: h,
1999
- inline: w,
2000
- labelText: j,
2001
- labelledBy: x,
2002
- multiple: M,
2003
- onClick: N,
2004
- placeholder: H,
2005
- prefixLabel: $,
2006
- prepend: z,
2007
- required: F,
2008
- suffixLabel: Q,
2009
- toggle: te,
2010
- toggleContent: oe
2011
- }, ae), f),
2012
- onRequestOpen: Ct,
1892
+ "data-test": _ ? "multiselect" : "select",
1893
+ describedBy: y,
1894
+ disabled: m,
1895
+ elementRef: h,
1896
+ error: g,
1897
+ inline: S,
1898
+ labelText: I,
1899
+ labelledBy: E,
1900
+ multiple: _,
1901
+ onClick: F,
1902
+ placeholder: W,
1903
+ prefixLabel: U,
1904
+ prepend: G,
1905
+ required: $,
1906
+ suffixLabel: re,
1907
+ toggle: ce,
1908
+ toggleContent: pe
1909
+ }, be), p),
1910
+ onRequestOpen: wt,
2013
1911
  onRequestClose: St,
2014
- open: Ae,
1912
+ open: qe,
2015
1913
  openWithArrowKeys: true,
2016
- repositionMode: U,
2017
- defaultPlacement: g ? d : undefined,
2018
- canCoverAnchor: ct().innerHeight < 500,
2019
- ref: Ut,
1914
+ repositionMode: Q,
1915
+ defaultPlacement: O ? v : undefined,
1916
+ canCoverAnchor: nt().innerHeight < 500,
1917
+ ref: zt,
2020
1918
  retainFocus: false,
2021
- takeFocus: Gt.length === 0 || Gt.length > 0 && !Xt || !!g
2022
- }, Zt);
2023
- }
2024
- Ht.propTypes = Et;
2025
- Ht.componentType = "SelectBase";
2026
- Ht.Option = _;
2027
- Ht.Divider = f.Divider;
2028
- Ht.Heading = f.Heading;
2029
- /* harmony default export */ const $t = Ht;
1919
+ takeFocus: Wt.length === 0 || Wt.length > 0 && !Gt || !!O
1920
+ }, Qt);
1921
+ }
1922
+ At.propTypes = St;
1923
+ At.componentType = "SelectBase";
1924
+ At.Option = C;
1925
+ At.Divider = f.Divider;
1926
+ At.Heading = f.Heading;
1927
+ /* harmony default export */ const qt = At;
2030
1928
  // CONCATENATED MODULE: ./src/Multiselect/Compact.tsx
2031
- function zt(e) {
1929
+ function Vt(e) {
2032
1930
  "@babel/helpers - typeof";
2033
- return zt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1931
+ return Vt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2034
1932
  return typeof e;
2035
1933
  } : function(e) {
2036
1934
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2037
- }, zt(e);
1935
+ }, Vt(e);
2038
1936
  }
2039
- function Wt() {
2040
- return Wt = Object.assign ? Object.assign.bind() : function(e) {
1937
+ function Dt() {
1938
+ return Dt = Object.assign ? Object.assign.bind() : function(e) {
2041
1939
  for (var t = 1; t < arguments.length; t++) {
2042
1940
  var n = arguments[t];
2043
1941
  for (var r in n) {
@@ -2045,11 +1943,11 @@
2045
1943
  }
2046
1944
  }
2047
1945
  return e;
2048
- }, Wt.apply(null, arguments);
1946
+ }, Dt.apply(null, arguments);
2049
1947
  }
2050
- function Ut(e, t) {
1948
+ function Nt(e, t) {
2051
1949
  if (null == e) return {};
2052
- var n, r, o = Gt(e, t);
1950
+ var n, r, o = Lt(e, t);
2053
1951
  if (Object.getOwnPropertySymbols) {
2054
1952
  var a = Object.getOwnPropertySymbols(e);
2055
1953
  for (r = 0; r < a.length; r++) {
@@ -2058,7 +1956,7 @@
2058
1956
  }
2059
1957
  return o;
2060
1958
  }
2061
- function Gt(e, t) {
1959
+ function Lt(e, t) {
2062
1960
  if (null == e) return {};
2063
1961
  var n = {};
2064
1962
  for (var r in e) {
@@ -2069,22 +1967,22 @@
2069
1967
  }
2070
1968
  return n;
2071
1969
  }
2072
- function Jt(e, t) {
1970
+ function Ft(e, t) {
2073
1971
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
2074
1972
  }
2075
- function Xt(e, t) {
1973
+ function Kt(e, t) {
2076
1974
  for (var n = 0; n < t.length; n++) {
2077
1975
  var r = t[n];
2078
1976
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
2079
- Object.defineProperty(e, ln(r.key), r);
1977
+ Object.defineProperty(e, Yt(r.key), r);
2080
1978
  }
2081
1979
  }
2082
- function Qt(e, t, n) {
2083
- return t && Xt(e.prototype, t), n && Xt(e, n), Object.defineProperty(e, "prototype", {
1980
+ function Ht(e, t, n) {
1981
+ return t && Kt(e.prototype, t), n && Kt(e, n), Object.defineProperty(e, "prototype", {
2084
1982
  writable: !1
2085
1983
  }), e;
2086
1984
  }
2087
- function Yt(e, t) {
1985
+ function $t(e, t) {
2088
1986
  if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
2089
1987
  e.prototype = Object.create(t && t.prototype, {
2090
1988
  constructor: {
@@ -2094,69 +1992,69 @@
2094
1992
  }
2095
1993
  }), Object.defineProperty(e, "prototype", {
2096
1994
  writable: !1
2097
- }), t && Zt(e, t);
1995
+ }), t && zt(e, t);
2098
1996
  }
2099
- function Zt(e, t) {
2100
- return Zt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
1997
+ function zt(e, t) {
1998
+ return zt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
2101
1999
  return e.__proto__ = t, e;
2102
- }, Zt(e, t);
2000
+ }, zt(e, t);
2103
2001
  }
2104
- function en(e) {
2105
- var t = rn();
2002
+ function Wt(e) {
2003
+ var t = Jt();
2106
2004
  return function() {
2107
- var n, r = on(e);
2005
+ var n, r = Xt(e);
2108
2006
  if (t) {
2109
- var o = on(this).constructor;
2007
+ var o = Xt(this).constructor;
2110
2008
  n = Reflect.construct(r, arguments, o);
2111
2009
  } else n = r.apply(this, arguments);
2112
- return tn(this, n);
2010
+ return Ut(this, n);
2113
2011
  };
2114
2012
  }
2115
- function tn(e, t) {
2116
- if (t && ("object" == zt(t) || "function" == typeof t)) return t;
2013
+ function Ut(e, t) {
2014
+ if (t && ("object" == Vt(t) || "function" == typeof t)) return t;
2117
2015
  if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
2118
- return nn(e);
2016
+ return Gt(e);
2119
2017
  }
2120
- function nn(e) {
2018
+ function Gt(e) {
2121
2019
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2122
2020
  return e;
2123
2021
  }
2124
- function rn() {
2022
+ function Jt() {
2125
2023
  try {
2126
2024
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
2127
2025
  } catch (e) {}
2128
- return (rn = function t() {
2026
+ return (Jt = function t() {
2129
2027
  return !!e;
2130
2028
  })();
2131
2029
  }
2132
- function on(e) {
2133
- return on = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2030
+ function Xt(e) {
2031
+ return Xt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2134
2032
  return e.__proto__ || Object.getPrototypeOf(e);
2135
- }, on(e);
2033
+ }, Xt(e);
2136
2034
  }
2137
- function an(e, t, n) {
2138
- return (t = ln(t)) in e ? Object.defineProperty(e, t, {
2035
+ function Qt(e, t, n) {
2036
+ return (t = Yt(t)) in e ? Object.defineProperty(e, t, {
2139
2037
  value: n,
2140
2038
  enumerable: !0,
2141
2039
  configurable: !0,
2142
2040
  writable: !0
2143
2041
  }) : e[t] = n, e;
2144
2042
  }
2145
- function ln(e) {
2146
- var t = un(e, "string");
2147
- return "symbol" == zt(t) ? t : t + "";
2043
+ function Yt(e) {
2044
+ var t = Zt(e, "string");
2045
+ return "symbol" == Vt(t) ? t : t + "";
2148
2046
  }
2149
- function un(e, t) {
2150
- if ("object" != zt(e) || !e) return e;
2047
+ function Zt(e, t) {
2048
+ if ("object" != Vt(e) || !e) return e;
2151
2049
  var n = e[Symbol.toPrimitive];
2152
2050
  if (void 0 !== n) {
2153
2051
  var r = n.call(e, t || "default");
2154
- if ("object" != zt(r)) return r;
2052
+ if ("object" != Vt(r)) return r;
2155
2053
  throw new TypeError("@@toPrimitive must return a primitive value.");
2156
2054
  }
2157
2055
  return ("string" === t ? String : Number)(e);
2158
2056
  }
2159
- var cn = {
2057
+ var en = {
2160
2058
  allowNewValues: a().bool,
2161
2059
  animateLoading: a().bool,
2162
2060
  children: a().node,
@@ -2193,7 +2091,7 @@
2193
2091
  /** @private */
2194
2092
  virtualization: a().number
2195
2093
  };
2196
- var sn = {
2094
+ var tn = {
2197
2095
  allowNewValues: false,
2198
2096
  animateLoading: false,
2199
2097
  defaultPlacement: "vertical",
@@ -2207,18 +2105,18 @@
2207
2105
  tabConfirmsNewValue: false
2208
2106
  };
2209
2107
  // TS: not typed controlled/uncontrolled, handled by Multiselect wrapper component
2210
- var fn = function(n) {
2211
- Yt(o, n);
2212
- var r = en(o);
2108
+ var nn = function(n) {
2109
+ $t(o, n);
2110
+ var r = Wt(o);
2213
2111
  function o() {
2214
- Jt(this, o);
2112
+ Ft(this, o);
2215
2113
  return r.apply(this, arguments);
2216
2114
  }
2217
- Qt(o, [ {
2115
+ Ht(o, [ {
2218
2116
  key: "render",
2219
2117
  // @docs-props-type CompactPropsBase
2220
2118
  value: function n() {
2221
- var r = this.props, o = r.defaultValues, a = r.children, l = r.controlledFilter, i = r.filter, u = r.values, c = Ut(r, [ "defaultValues", "children", "controlledFilter", "filter", "values" ]);
2119
+ var r = this.props, o = r.defaultValues, a = r.children, l = r.controlledFilter, i = r.filter, u = r.values, c = Nt(r, [ "defaultValues", "children", "controlledFilter", "filter", "values" ]);
2222
2120
  var s = true;
2223
2121
  if (i != null) {
2224
2122
  s = i;
@@ -2228,9 +2126,13 @@
2228
2126
  }
2229
2127
  var f = {
2230
2128
  children: e.Children.toArray(a).map((function(e) {
2231
- if (Rt(e)) {
2129
+ if (jt(e)) {
2130
+ var n;
2131
+ var r = (n = e.key) !== null && n !== void 0 ? n : "".concat(e.props.label, "-").concat(e.props.value);
2232
2132
 
2233
- return t().createElement(_, Wt({}, e.props, {
2133
+ return t().createElement(C, Dt({
2134
+ key: r
2135
+ }, e.props, {
2234
2136
  multiple: true
2235
2137
  }));
2236
2138
  }
@@ -2245,184 +2147,165 @@
2245
2147
  f.values = u;
2246
2148
  }
2247
2149
 
2248
- return t().createElement($t, Wt({}, c, f, {
2150
+ return t().createElement(qt, Dt({}, c, f, {
2249
2151
  multiple: true
2250
2152
  }));
2251
2153
  }
2252
2154
  } ]);
2253
2155
  return o;
2254
2156
  }(e.Component);
2255
- an(fn, "propTypes", cn);
2256
- an(fn, "defaultProps", sn);
2257
- an(fn, "Option", Z);
2258
- an(fn, "Divider", f.Divider);
2259
- an(fn, "Heading", f.Heading);
2260
- /* harmony default export */ const pn = fn;
2157
+ Qt(nn, "propTypes", en);
2158
+ Qt(nn, "defaultProps", tn);
2159
+ Qt(nn, "Option", W);
2160
+ Qt(nn, "Divider", f.Divider);
2161
+ Qt(nn, "Heading", f.Heading);
2162
+ /* harmony default export */ const rn = nn;
2261
2163
  // CONCATENATED MODULE: external "lodash/defer"
2262
- const dn = require("lodash/defer");
2263
- var vn = n.n(dn);
2164
+ const on = require("lodash/defer");
2165
+ var an = n.n(on);
2264
2166
  // CONCATENATED MODULE: external "lodash/extend"
2265
- const bn = require("lodash/extend");
2266
- var yn = n.n(bn);
2167
+ const ln = require("lodash/extend");
2168
+ var un = n.n(ln);
2267
2169
  // CONCATENATED MODULE: external "lodash/get"
2268
- const mn = require("lodash/get");
2269
- var hn = n.n(mn);
2170
+ const cn = require("lodash/get");
2171
+ var sn = n.n(cn);
2270
2172
  // CONCATENATED MODULE: external "lodash/isString"
2271
- const gn = require("lodash/isString");
2272
- var On = n.n(gn);
2173
+ const fn = require("lodash/isString");
2174
+ var pn = n.n(fn);
2273
2175
  // CONCATENATED MODULE: external "lodash/isUndefined"
2274
- const wn = require("lodash/isUndefined");
2275
- var Cn = n.n(wn);
2176
+ const dn = require("lodash/isUndefined");
2177
+ var vn = n.n(dn);
2276
2178
  // CONCATENATED MODULE: external "lodash/keys"
2277
- const Sn = require("lodash/keys");
2278
- var kn = n.n(Sn);
2179
+ const bn = require("lodash/keys");
2180
+ var yn = n.n(bn);
2279
2181
  // CONCATENATED MODULE: external "lodash/last"
2280
- const xn = require("lodash/last");
2281
- var jn = n.n(xn);
2182
+ const mn = require("lodash/last");
2183
+ var hn = n.n(mn);
2282
2184
  // CONCATENATED MODULE: external "lodash/pickBy"
2283
- const In = require("lodash/pickBy");
2284
- var Pn = n.n(In);
2185
+ const gn = require("lodash/pickBy");
2186
+ var On = n.n(gn);
2285
2187
  // CONCATENATED MODULE: external "@splunk/react-ui/Chip"
2286
- const En = require("@splunk/react-ui/Chip");
2287
- var Mn = n.n(En);
2188
+ const wn = require("@splunk/react-ui/Chip");
2189
+ var Sn = n.n(wn);
2288
2190
  // CONCATENATED MODULE: external "@splunk/react-ui/Popover"
2289
- const An = require("@splunk/react-ui/Popover");
2290
- var _n = n.n(An);
2191
+ const Cn = require("@splunk/react-ui/Popover");
2192
+ var kn = n.n(Cn);
2291
2193
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
2292
- const Rn = require("@splunk/react-ui/ScreenReaderContent");
2293
- var Vn = n.n(Rn);
2194
+ const xn = require("@splunk/react-ui/ScreenReaderContent");
2195
+ var jn = n.n(xn);
2294
2196
  // CONCATENATED MODULE: external "@splunk/ui-utils/format"
2295
- const Tn = require("@splunk/ui-utils/format");
2197
+ const Pn = require("@splunk/ui-utils/format");
2296
2198
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
2297
- const Bn = require("@splunk/react-ui/Box");
2298
- var qn = n.n(Bn);
2199
+ const En = require("@splunk/react-ui/Box");
2200
+ var In = n.n(En);
2299
2201
  // CONCATENATED MODULE: ./src/Multiselect/NormalStyles.ts
2300
- var Nn = We()(qn()).withConfig({
2202
+ var Rn = Ne()(In()).withConfig({
2301
2203
  displayName: "NormalStyles__StyledBox",
2302
2204
  componentId: "sc-1uwwpco-0"
2303
- })([ "border-radius:", ";align-items:", ";flex-wrap:wrap;min-height:", ";max-height:300px;overflow-y:auto;border:1px solid ", ";padding:", ";", " ", " ", " ", " ", " &[data-inline]{width:400px;}[data-inline='true'] + &{margin-left:", "}" ], Re.variables.borderRadius, (0,
2304
- Re.pick)({
2205
+ })([ "border-radius:", ";align-items:", ";flex-wrap:wrap;min-height:", ";max-height:300px;overflow-y:auto;border:1px solid ", ";padding:", ";", " ", " ", " ", " ", " &[data-inline]{width:400px;}[data-inline='true'] + &{margin-left:", "}" ], je.variables.borderRadius, (0,
2206
+ je.pick)({
2305
2207
  enterprise: "flex-start",
2306
2208
  prisma: "center"
2307
- }), Re.variables.inputHeight, (0, Re.pick)({
2209
+ }), je.variables.inputHeight, (0, je.pick)({
2308
2210
  enterprise: {
2309
- light: Re.variables.gray60,
2310
- dark: Re.variables.borderColor
2211
+ light: je.variables.gray60,
2212
+ dark: je.variables.borderColor
2311
2213
  },
2312
- prisma: Re.variables.interactiveColorBorder
2313
- }), (0, Re.pick)({
2214
+ prisma: je.variables.interactiveColorBorder
2215
+ }), (0, je.pick)({
2314
2216
  enterprise: "2px 0 0 2px",
2315
2217
  prisma: "2px"
2316
- }), (0, Re.pick)({
2218
+ }), (0, je.pick)({
2317
2219
  enterprise: {
2318
- light: (0, ze.css)([ "background-color:", ";" ], Re.variables.white),
2319
- dark: (0, ze.css)([ "background-color:", ";" ], Re.variables.gray22)
2220
+ light: (0, De.css)([ "background-color:", ";" ], je.variables.white),
2221
+ dark: (0, De.css)([ "background-color:", ";" ], je.variables.gray22)
2320
2222
  }
2321
2223
  }), (function(e) {
2322
2224
  var t = e.$hasfocus;
2323
- return t && (0, Re.pick)({
2324
- enterprise: (0, ze.css)([ "box-shadow:", ";" ], Re.variables.focusShadow),
2325
- prisma: (0, ze.css)([ "border-color:", ";" ], Re.variables.focusColor)
2225
+ return t && (0, je.pick)({
2226
+ enterprise: (0, De.css)([ "box-shadow:", ";" ], je.variables.focusShadow),
2227
+ prisma: (0, De.css)([ "border-color:", ";" ], je.variables.focusColor)
2326
2228
  });
2327
2229
  }), (function(e) {
2328
2230
  var t = e.$error;
2329
- return t && (0, ze.css)([ "border-color:", ";color:", ";" ], Re.variables.accentColorNegative, Re.variables.accentColorNegative);
2231
+ return t && (0, De.css)([ "border-color:", ";color:", ";" ], je.variables.accentColorNegative, je.variables.accentColorNegative);
2330
2232
  }), (function(e) {
2331
2233
  var t = e.$disabled, n = e.$hasfocus;
2332
- return t ? (0, Re.pick)({
2234
+ return t ? (0, je.pick)({
2333
2235
  enterprise: {
2334
- light: (0, ze.css)([ "background-color:", ";border-color:", ";cursor:not-allowed;" ], Re.variables.gray96, Re.variables.gray92),
2335
- dark: (0, ze.css)([ "background-color:", ";border-color:", ";cursor:not-allowed;" ], Re.variables.gray22, Re.variables.gray30)
2236
+ light: (0, De.css)([ "background-color:", ";border-color:", ";cursor:not-allowed;" ], je.variables.gray96, je.variables.gray92),
2237
+ dark: (0, De.css)([ "background-color:", ";border-color:", ";cursor:not-allowed;" ], je.variables.gray22, je.variables.gray30)
2336
2238
  },
2337
- prisma: (0, ze.css)([ "border-color:", ";cursor:not-allowed;" ], Re.variables.interactiveColorBorderDisabled)
2338
- }) : !n && (0, ze.css)([ "&:hover{border-color:", ";}" ], (0, Re.pick)({
2339
- enterprise: Re.variables.borderColor,
2340
- prisma: Re.variables.interactiveColorBorderHover
2239
+ prisma: (0, De.css)([ "border-color:", ";cursor:not-allowed;" ], je.variables.interactiveColorBorderDisabled)
2240
+ }) : !n && (0, De.css)([ "&:hover{border-color:", ";}" ], (0, je.pick)({
2241
+ enterprise: je.variables.borderColor,
2242
+ prisma: je.variables.interactiveColorBorderHover
2341
2243
  }));
2342
2244
  }), (function(e) {
2343
2245
  var t = e.$popoverOpen;
2344
- return t && (0, ze.css)([ "position:relative;z-index:calc(", " - 2);" ], Re.variables.zindexFixedNavbar);
2345
- }), Re.variables.spacingSmall);
2346
- var Dn = We().span.withConfig({
2246
+ return t && (0, De.css)([ "position:relative;z-index:calc(", " - 2);" ], je.variables.zindexFixedNavbar);
2247
+ }), je.variables.spacingSmall);
2248
+ var Mn = Ne().span.withConfig({
2347
2249
  displayName: "NormalStyles__StyledButtonsWrapper",
2348
2250
  componentId: "sc-1uwwpco-1"
2349
2251
  })([ "display:contents;" ]);
2350
- var Ln = We().input.withConfig({
2252
+ var Tn = Ne().input.withConfig({
2351
2253
  displayName: "NormalStyles__StyledInput",
2352
2254
  componentId: "sc-1uwwpco-2"
2353
- })([ "", ";flex:1 0 auto;max-width:100%;line-height:12px;", "" ], Re.mixins.reset("block"), (0,
2354
- Re.pick)({
2255
+ })([ "", ";flex:1 0 auto;max-width:100%;line-height:12px;", "" ], je.mixins.reset("block"), (0,
2256
+ je.pick)({
2355
2257
  enterprise: {
2356
- comfortable: (0, ze.css)([ "padding:", ";" ], Re.variables.spacingXSmall),
2357
- compact: (0, ze.css)([ "padding:3px;" ])
2258
+ comfortable: (0, De.css)([ "padding:", ";" ], je.variables.spacingXSmall),
2259
+ compact: (0, De.css)([ "padding:3px;" ])
2358
2260
  },
2359
2261
  prisma: {
2360
- comfortable: (0, ze.css)([ "padding:7px 10px;" ]),
2361
- compact: (0, ze.css)([ "padding:3px;" ])
2262
+ comfortable: (0, De.css)([ "padding:7px 10px;" ]),
2263
+ compact: (0, De.css)([ "padding:3px;" ])
2362
2264
  }
2363
2265
  }));
2364
- var Fn = We().div.withConfig({
2266
+ var _n = Ne().div.withConfig({
2365
2267
  displayName: "NormalStyles__StyledOverlay",
2366
2268
  componentId: "sc-1uwwpco-3"
2367
2269
  })([ "", "" ], (function(e) {
2368
2270
  var t = e.$popoveropen;
2369
- return t && (0, ze.css)([ "position:fixed;top:0;left:0;width:100%;height:100%;z-index:calc(", " - 2);" ], Re.variables.zindexFixedNavbar);
2271
+ return t && (0, De.css)([ "position:fixed;top:0;left:0;width:100%;height:100%;z-index:calc(", " - 2);" ], je.variables.zindexFixedNavbar);
2370
2272
  }));
2371
- // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
2372
- /**
2373
- * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
2374
- *
2375
- * @param ref - The React callback or object ref. Can be `null` or `undefined`.
2376
- * @param current - The new value of the ref.
2377
- */
2378
- function Kn(e, t) {
2379
- if (e) {
2380
- if (typeof e === "function") {
2381
- e(t);
2382
- } else {
2383
- // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
2384
- // the intention here is to signal "we will take care of setting 'current', not you".
2385
- e.current = t;
2386
- // eslint-disable-line no-param-reassign
2387
- }
2388
- }
2389
- }
2390
2273
  // CONCATENATED MODULE: ./src/Multiselect/Normal.tsx
2391
- function Hn(e) {
2274
+ function Bn(e) {
2392
2275
  "@babel/helpers - typeof";
2393
- return Hn = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2276
+ return Bn = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2394
2277
  return typeof e;
2395
2278
  } : function(e) {
2396
2279
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2397
- }, Hn(e);
2280
+ }, Bn(e);
2398
2281
  }
2399
- function $n(e) {
2400
- return Gn(e) || Un(e) || Wn(e) || zn();
2282
+ function An(e) {
2283
+ return Nn(e) || Dn(e) || Vn(e) || qn();
2401
2284
  }
2402
- function zn() {
2285
+ function qn() {
2403
2286
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2404
2287
  }
2405
- function Wn(e, t) {
2288
+ function Vn(e, t) {
2406
2289
  if (e) {
2407
- if ("string" == typeof e) return Jn(e, t);
2290
+ if ("string" == typeof e) return Ln(e, t);
2408
2291
  var n = {}.toString.call(e).slice(8, -1);
2409
- return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Jn(e, t) : void 0;
2292
+ return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ln(e, t) : void 0;
2410
2293
  }
2411
2294
  }
2412
- function Un(e) {
2295
+ function Dn(e) {
2413
2296
  if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
2414
2297
  }
2415
- function Gn(e) {
2416
- if (Array.isArray(e)) return Jn(e);
2298
+ function Nn(e) {
2299
+ if (Array.isArray(e)) return Ln(e);
2417
2300
  }
2418
- function Jn(e, t) {
2301
+ function Ln(e, t) {
2419
2302
  (null == t || t > e.length) && (t = e.length);
2420
2303
  for (var n = 0, r = Array(t); n < t; n++) {
2421
2304
  r[n] = e[n];
2422
2305
  }
2423
2306
  return r;
2424
2307
  }
2425
- function Xn(e, t) {
2308
+ function Fn(e, t) {
2426
2309
  var n = Object.keys(e);
2427
2310
  if (Object.getOwnPropertySymbols) {
2428
2311
  var r = Object.getOwnPropertySymbols(e);
@@ -2432,20 +2315,20 @@
2432
2315
  }
2433
2316
  return n;
2434
2317
  }
2435
- function Qn(e) {
2318
+ function Kn(e) {
2436
2319
  for (var t = 1; t < arguments.length; t++) {
2437
2320
  var n = null != arguments[t] ? arguments[t] : {};
2438
- t % 2 ? Xn(Object(n), !0).forEach((function(t) {
2439
- fr(e, t, n[t]);
2440
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Xn(Object(n)).forEach((function(t) {
2321
+ t % 2 ? Fn(Object(n), !0).forEach((function(t) {
2322
+ nr(e, t, n[t]);
2323
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Fn(Object(n)).forEach((function(t) {
2441
2324
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
2442
2325
  }));
2443
2326
  }
2444
2327
  return e;
2445
2328
  }
2446
- function Yn(e, t) {
2329
+ function Hn(e, t) {
2447
2330
  if (null == e) return {};
2448
- var n, r, o = Zn(e, t);
2331
+ var n, r, o = $n(e, t);
2449
2332
  if (Object.getOwnPropertySymbols) {
2450
2333
  var a = Object.getOwnPropertySymbols(e);
2451
2334
  for (r = 0; r < a.length; r++) {
@@ -2454,7 +2337,7 @@
2454
2337
  }
2455
2338
  return o;
2456
2339
  }
2457
- function Zn(e, t) {
2340
+ function $n(e, t) {
2458
2341
  if (null == e) return {};
2459
2342
  var n = {};
2460
2343
  for (var r in e) {
@@ -2465,8 +2348,8 @@
2465
2348
  }
2466
2349
  return n;
2467
2350
  }
2468
- function er() {
2469
- return er = Object.assign ? Object.assign.bind() : function(e) {
2351
+ function zn() {
2352
+ return zn = Object.assign ? Object.assign.bind() : function(e) {
2470
2353
  for (var t = 1; t < arguments.length; t++) {
2471
2354
  var n = arguments[t];
2472
2355
  for (var r in n) {
@@ -2474,24 +2357,24 @@
2474
2357
  }
2475
2358
  }
2476
2359
  return e;
2477
- }, er.apply(null, arguments);
2360
+ }, zn.apply(null, arguments);
2478
2361
  }
2479
- function tr(e, t) {
2362
+ function Wn(e, t) {
2480
2363
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
2481
2364
  }
2482
- function nr(e, t) {
2365
+ function Un(e, t) {
2483
2366
  for (var n = 0; n < t.length; n++) {
2484
2367
  var r = t[n];
2485
2368
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
2486
- Object.defineProperty(e, pr(r.key), r);
2369
+ Object.defineProperty(e, rr(r.key), r);
2487
2370
  }
2488
2371
  }
2489
- function rr(e, t, n) {
2490
- return t && nr(e.prototype, t), n && nr(e, n), Object.defineProperty(e, "prototype", {
2372
+ function Gn(e, t, n) {
2373
+ return t && Un(e.prototype, t), n && Un(e, n), Object.defineProperty(e, "prototype", {
2491
2374
  writable: !1
2492
2375
  }), e;
2493
2376
  }
2494
- function or(e, t) {
2377
+ function Jn(e, t) {
2495
2378
  if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
2496
2379
  e.prototype = Object.create(t && t.prototype, {
2497
2380
  constructor: {
@@ -2501,69 +2384,69 @@
2501
2384
  }
2502
2385
  }), Object.defineProperty(e, "prototype", {
2503
2386
  writable: !1
2504
- }), t && ar(e, t);
2387
+ }), t && Xn(e, t);
2505
2388
  }
2506
- function ar(e, t) {
2507
- return ar = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
2389
+ function Xn(e, t) {
2390
+ return Xn = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
2508
2391
  return e.__proto__ = t, e;
2509
- }, ar(e, t);
2392
+ }, Xn(e, t);
2510
2393
  }
2511
- function lr(e) {
2512
- var t = cr();
2394
+ function Qn(e) {
2395
+ var t = er();
2513
2396
  return function() {
2514
- var n, r = sr(e);
2397
+ var n, r = tr(e);
2515
2398
  if (t) {
2516
- var o = sr(this).constructor;
2399
+ var o = tr(this).constructor;
2517
2400
  n = Reflect.construct(r, arguments, o);
2518
2401
  } else n = r.apply(this, arguments);
2519
- return ir(this, n);
2402
+ return Yn(this, n);
2520
2403
  };
2521
2404
  }
2522
- function ir(e, t) {
2523
- if (t && ("object" == Hn(t) || "function" == typeof t)) return t;
2405
+ function Yn(e, t) {
2406
+ if (t && ("object" == Bn(t) || "function" == typeof t)) return t;
2524
2407
  if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
2525
- return ur(e);
2408
+ return Zn(e);
2526
2409
  }
2527
- function ur(e) {
2410
+ function Zn(e) {
2528
2411
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2529
2412
  return e;
2530
2413
  }
2531
- function cr() {
2414
+ function er() {
2532
2415
  try {
2533
2416
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
2534
2417
  } catch (e) {}
2535
- return (cr = function t() {
2418
+ return (er = function t() {
2536
2419
  return !!e;
2537
2420
  })();
2538
2421
  }
2539
- function sr(e) {
2540
- return sr = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2422
+ function tr(e) {
2423
+ return tr = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2541
2424
  return e.__proto__ || Object.getPrototypeOf(e);
2542
- }, sr(e);
2425
+ }, tr(e);
2543
2426
  }
2544
- function fr(e, t, n) {
2545
- return (t = pr(t)) in e ? Object.defineProperty(e, t, {
2427
+ function nr(e, t, n) {
2428
+ return (t = rr(t)) in e ? Object.defineProperty(e, t, {
2546
2429
  value: n,
2547
2430
  enumerable: !0,
2548
2431
  configurable: !0,
2549
2432
  writable: !0
2550
2433
  }) : e[t] = n, e;
2551
2434
  }
2552
- function pr(e) {
2553
- var t = dr(e, "string");
2554
- return "symbol" == Hn(t) ? t : t + "";
2435
+ function rr(e) {
2436
+ var t = or(e, "string");
2437
+ return "symbol" == Bn(t) ? t : t + "";
2555
2438
  }
2556
- function dr(e, t) {
2557
- if ("object" != Hn(e) || !e) return e;
2439
+ function or(e, t) {
2440
+ if ("object" != Bn(e) || !e) return e;
2558
2441
  var n = e[Symbol.toPrimitive];
2559
2442
  if (void 0 !== n) {
2560
2443
  var r = n.call(e, t || "default");
2561
- if ("object" != Hn(r)) return r;
2444
+ if ("object" != Bn(r)) return r;
2562
2445
  throw new TypeError("@@toPrimitive must return a primitive value.");
2563
2446
  }
2564
2447
  return ("string" === t ? String : Number)(e);
2565
2448
  }
2566
- var vr = {
2449
+ var ar = {
2567
2450
  allowNewValues: a().bool,
2568
2451
  animateLoading: a().bool,
2569
2452
  children: a().node,
@@ -2598,7 +2481,7 @@
2598
2481
  useClickawayOverlay: a().bool,
2599
2482
  values: a().array
2600
2483
  };
2601
- var br = {
2484
+ var lr = {
2602
2485
  allowNewValues: false,
2603
2486
  animateLoading: false,
2604
2487
  defaultPlacement: "vertical",
@@ -2611,38 +2494,38 @@
2611
2494
  tabConfirmsNewValue: false,
2612
2495
  useClickawayOverlay: false
2613
2496
  };
2614
- var yr = ce()((function(e) {
2497
+ var ir = ne()((function(e) {
2615
2498
  return {
2616
2499
  flexBasis: e,
2617
2500
  width: e
2618
2501
  };
2619
2502
  }));
2620
- var mr = ce()((function(e) {
2503
+ var ur = ne()((function(e) {
2621
2504
  var t = e.anchorWidth, n = e.maxHeight, r = e.menuStyle;
2622
- return yn()({
2505
+ return un()({
2623
2506
  maxHeight: n,
2624
2507
  overflow: "auto",
2625
2508
  width: Math.max(t !== null && t !== void 0 ? t : 0, 200)
2626
2509
  }, r);
2627
2510
  }));
2628
2511
  // TS: not typed controlled/uncontrolled, handled by Multiselect wrapper component
2629
- var hr = function(n) {
2630
- or(o, n);
2631
- var r = lr(o);
2512
+ var cr = function(n) {
2513
+ Jn(o, n);
2514
+ var r = Qn(o);
2632
2515
  // @docs-props-type NormalPropsBase
2633
2516
  function o(n) {
2634
2517
  var a;
2635
- tr(this, o);
2518
+ Wn(this, o);
2636
2519
  a = r.call(this, n);
2637
- fr(ur(a), "activeItemId", void 0);
2638
- fr(ur(a), "activeValue", void 0);
2639
- fr(ur(a), "availableOptionCount", void 0);
2640
- fr(ur(a), "children", void 0);
2641
- fr(ur(a), "controlledExternally", void 0);
2642
- fr(ur(a), "input", null);
2643
- fr(ur(a), "popoverId", void 0);
2644
- fr(ur(a), "previousActiveIndex", null);
2645
- fr(ur(a), "handleClick", (function() {
2520
+ nr(Zn(a), "activeItemId", void 0);
2521
+ nr(Zn(a), "activeValue", void 0);
2522
+ nr(Zn(a), "availableOptionCount", void 0);
2523
+ nr(Zn(a), "children", void 0);
2524
+ nr(Zn(a), "controlledExternally", void 0);
2525
+ nr(Zn(a), "input", null);
2526
+ nr(Zn(a), "popoverId", void 0);
2527
+ nr(Zn(a), "previousActiveIndex", null);
2528
+ nr(Zn(a), "handleClick", (function() {
2646
2529
  if (a.state.hasFocus) {
2647
2530
  a.open({
2648
2531
  resetFilterKeyword: false
@@ -2652,14 +2535,14 @@
2652
2535
  (e = a.input) === null || e === void 0 ? void 0 : e.focus();
2653
2536
  }
2654
2537
  }));
2655
- fr(ur(a), "handleRequestRemove", (function(e, t) {
2538
+ nr(Zn(a), "handleRequestRemove", (function(e, t) {
2656
2539
  var n = t.value;
2657
- vn()((function() {
2540
+ an()((function() {
2658
2541
  return a.removeValue(e, n);
2659
2542
  }));
2660
2543
  // allow the event to bubble before removing.
2661
2544
  }));
2662
- fr(ur(a), "open", (function(e) {
2545
+ nr(Zn(a), "open", (function(e) {
2663
2546
  var t = e.resetFilterKeyword;
2664
2547
  a.setState((function(e) {
2665
2548
  return {
@@ -2672,7 +2555,7 @@
2672
2555
  (e = (t = a.props).onOpen) === null || e === void 0 ? void 0 : e.call(t);
2673
2556
  }));
2674
2557
  }));
2675
- fr(ur(a), "handleInputFocus", (function(e) {
2558
+ nr(Zn(a), "handleInputFocus", (function(e) {
2676
2559
  if (a.state.filterKeyword !== "") {
2677
2560
  var t, n;
2678
2561
  (t = (n = a.props).onFilterChange) === null || t === void 0 ? void 0 : t.call(n, e, {
@@ -2683,12 +2566,12 @@
2683
2566
  resetFilterKeyword: true
2684
2567
  });
2685
2568
  }));
2686
- fr(ur(a), "handleInputKeyDown", (function(t) {
2569
+ nr(Zn(a), "handleInputKeyDown", (function(t) {
2687
2570
  var n, r;
2688
2571
  var o = a.props, l = o.children, i = o.onScrollBottom, u = o.tabConfirmsNewValue;
2689
- var c = (0, Pe.keycode)(t.nativeEvent);
2572
+ var c = (0, we.keycode)(t.nativeEvent);
2690
2573
  if (c === "tab" && a.state.open) {
2691
- if (u && !Cn()(a.activeValue) && a.availableOptionCount <= 1) {
2574
+ if (u && !vn()(a.activeValue) && a.availableOptionCount <= 1) {
2692
2575
  var s;
2693
2576
  t.preventDefault();
2694
2577
  a.addValue(t, a.activeValue);
@@ -2751,14 +2634,14 @@
2751
2634
  });
2752
2635
  }
2753
2636
  }
2754
- if (c === "enter" && !Cn()(a.activeValue) && a.state.open) {
2637
+ if (c === "enter" && !vn()(a.activeValue) && a.state.open) {
2755
2638
  a.addValue(t, a.activeValue);
2756
2639
  }
2757
2640
  if (c === "backspace" && ((n = a.input) === null || n === void 0 ? void 0 : n.value) === "" && ((r = a.getCurrentValues()) === null || r === void 0 ? void 0 : r.length)) {
2758
- a.removeValue(t, jn()(a.getCurrentValues()));
2641
+ a.removeValue(t, hn()(a.getCurrentValues()));
2759
2642
  }
2760
2643
  }));
2761
- fr(ur(a), "handleInputChange", (function(e) {
2644
+ nr(Zn(a), "handleInputChange", (function(e) {
2762
2645
  var t, n;
2763
2646
  a.setState({
2764
2647
  filterKeyword: e.target.value,
@@ -2769,14 +2652,14 @@
2769
2652
  keyword: e.target.value
2770
2653
  });
2771
2654
  }));
2772
- fr(ur(a), "handleMenuOptionClick", (function(e, t) {
2655
+ nr(Zn(a), "handleMenuOptionClick", (function(e, t) {
2773
2656
  var n;
2774
2657
  var r = t.value;
2775
2658
  e.stopPropagation();
2776
2659
  a.addValue(e, r);
2777
2660
  (n = a.input) === null || n === void 0 ? void 0 : n.focus();
2778
2661
  }));
2779
- fr(ur(a), "handleInputBlur", (function(e) {
2662
+ nr(Zn(a), "handleInputBlur", (function(e) {
2780
2663
  var t = document.getElementById(a.popoverId);
2781
2664
  var n = e.relatedTarget || document.activeElement;
2782
2665
  // IE11 doesn't support relatedTarget but sets activeElement
@@ -2795,7 +2678,7 @@
2795
2678
  });
2796
2679
  }
2797
2680
  }));
2798
- fr(ur(a), "handleRequestClose", (function(e) {
2681
+ nr(Zn(a), "handleRequestClose", (function(e) {
2799
2682
  var t;
2800
2683
  var n = e.reason, r = e.event;
2801
2684
  if (n === "escapeKey" || n === "offScreen" || n === "clickAway" && r !== undefined && !((t = a.state.el) === null || t === void 0 ? void 0 : t.contains(r.target))) {
@@ -2812,7 +2695,7 @@
2812
2695
  (o = a.input) === null || o === void 0 ? void 0 : o.focus();
2813
2696
  }
2814
2697
  }));
2815
- fr(ur(a), "handleScrollBottom", (function(e) {
2698
+ nr(Zn(a), "handleScrollBottom", (function(e) {
2816
2699
  if (a.state.open && !a.props.isLoadingOptions) {
2817
2700
  var t, n;
2818
2701
  (t = (n = a.props).onScrollBottom) === null || t === void 0 ? void 0 : t.call(n, e);
@@ -2821,39 +2704,39 @@
2821
2704
  });
2822
2705
  }
2823
2706
  }));
2824
- fr(ur(a), "handleMount", (function(e) {
2707
+ nr(Zn(a), "handleMount", (function(e) {
2825
2708
  a.setState({
2826
2709
  el: e
2827
2710
  });
2828
- Kn(a.props.elementRef, e);
2711
+ x(a.props.elementRef, e);
2829
2712
  }));
2830
- fr(ur(a), "handleInputMount", (function(e) {
2713
+ nr(Zn(a), "handleInputMount", (function(e) {
2831
2714
  a.input = e;
2832
- Kn(a.props.inputRef, e);
2715
+ x(a.props.inputRef, e);
2833
2716
  }));
2834
- fr(ur(a), "handleActiveOptionMount", (function(e) {
2717
+ nr(Zn(a), "handleActiveOptionMount", (function(e) {
2835
2718
  if (a.previousActiveIndex !== a.state.activeIndex) {
2836
2719
  e === null || e === void 0 ? void 0 : e.scrollIntoViewIfNeeded();
2837
2720
  }
2838
2721
  }));
2839
- fr(ur(a), "renderMenu", (function(e) {
2722
+ nr(Zn(a), "renderMenu", (function(e) {
2840
2723
  var n = e.anchorWidth, r = e.maxHeight, o = e.placement;
2841
- var l = mr({
2724
+ var l = ur({
2842
2725
  anchorWidth: n,
2843
2726
  maxHeight: r,
2844
2727
  menuStyle: a.props.menuStyle
2845
2728
  });
2846
2729
 
2847
- return t().createElement(we(), er({
2730
+ return t().createElement(ve(), zn({
2848
2731
  focusMode: "never",
2849
2732
  placement: o !== null && o !== void 0 ? o : undefined,
2850
2733
  isLoading: a.props.isLoadingOptions,
2851
2734
  onScrollBottom: a.props.onScrollBottom ? a.handleScrollBottom : undefined
2852
- }, fe()(a.props, "noOptionsMessage", "footerMessage", "animateLoading", "loadingMessage", "onScroll"), {
2735
+ }, oe()(a.props, "noOptionsMessage", "footerMessage", "animateLoading", "loadingMessage", "onScroll"), {
2853
2736
  style: l
2854
2737
  }), a.children);
2855
2738
  }));
2856
- fr(ur(a), "getSelectedItemsContent", (function(e) {
2739
+ nr(Zn(a), "getSelectedItemsContent", (function(e) {
2857
2740
  return e.map((function(e) {
2858
2741
  var n = e;
2859
2742
  // TS: faking props here
@@ -2863,12 +2746,12 @@
2863
2746
 
2864
2747
  return t().createElement("span", {
2865
2748
  key: l.toString()
2866
- }, o || a, (0, Tn.sprintf)((0, s._)(" selected")));
2749
+ }, o || a, (0, Pn.sprintf)((0, s._)(" selected")));
2867
2750
  }
2868
2751
 
2869
2752
  return t().createElement("span", {
2870
- key: (0, Ie.createGUID)()
2871
- }, t().createElement(t().Fragment, null, n, (0, Tn.sprintf)((0, s._)(" selected"))));
2753
+ key: (0, Oe.createGUID)()
2754
+ }, t().createElement(t().Fragment, null, n, (0, Pn.sprintf)((0, s._)(" selected"))));
2872
2755
  }));
2873
2756
  }));
2874
2757
  a.state = {
@@ -2883,13 +2766,13 @@
2883
2766
  a.availableOptionCount = 0;
2884
2767
  a.children = [];
2885
2768
  a.controlledExternally = i()(n, "values");
2886
- a.activeItemId = (0, Ie.createDOMID)("active-item");
2887
- a.popoverId = (0, Ie.createDOMID)("popover");
2769
+ a.activeItemId = (0, Oe.createDOMID)("active-item");
2770
+ a.popoverId = (0, Oe.createDOMID)("popover");
2888
2771
  if (false) {}
2889
2772
  if (false) {}
2890
2773
  return a;
2891
2774
  }
2892
- rr(o, [ {
2775
+ Gn(o, [ {
2893
2776
  key: "componentDidUpdate",
2894
2777
  value: function e(t, n) {
2895
2778
  if (false) {}
@@ -2950,7 +2833,7 @@
2950
2833
  key: "removeValue",
2951
2834
  value: function e(t, n) {
2952
2835
  var r, o;
2953
- var a = be()(this.getCurrentValues(), n);
2836
+ var a = ue()(this.getCurrentValues(), n);
2954
2837
  var l = this.props.name;
2955
2838
  if (!this.isControlled()) {
2956
2839
  this.setState({
@@ -2974,7 +2857,7 @@
2974
2857
  if (o != null) {
2975
2858
  var a = o.children, l = o.icon, i = o.label, u = o.selectedAppearance, c = o.selectedBackgroundColor, s = o.selectedForegroundColor, f = o.value;
2976
2859
 
2977
- return t().createElement(Mn(), {
2860
+ return t().createElement(Sn(), {
2978
2861
  "aria-selected": true,
2979
2862
  disabled: r.props.disabled,
2980
2863
  icon: l,
@@ -2989,10 +2872,10 @@
2989
2872
  }, a || i);
2990
2873
  }
2991
2874
 
2992
- return t().createElement(Mn(), {
2875
+ return t().createElement(Sn(), {
2993
2876
  "aria-selected": true,
2994
2877
  disabled: r.props.disabled,
2995
- key: (0, Ie.createGUID)(),
2878
+ key: (0, Oe.createGUID)(),
2996
2879
  "data-test": "selected-option",
2997
2880
  onRequestRemove: r.handleRequestRemove,
2998
2881
  role: "option",
@@ -3005,45 +2888,45 @@
3005
2888
  key: "render",
3006
2889
  value: function n() {
3007
2890
  var r, o = this;
3008
- var a = this.props, l = a.allowNewValues, u = a.children, f = a.controlledFilter, p = a.defaultPlacement, d = a.describedBy, v = a.disabled, b = a.error, y = a.inline, m = a.inputId, h = a.labelledBy, g = a.placeholder, O = a.required, w = a.repositionMode, C = a.useClickawayOverlay, S = Yn(a, [ "allowNewValues", "children", "controlledFilter", "defaultPlacement", "describedBy", "disabled", "error", "inline", "inputId", "labelledBy", "placeholder", "required", "repositionMode", "useClickawayOverlay" ]);
3009
- var k = Qn(Qn({}, Pn()(S, (function(e, t) {
2891
+ var a = this.props, l = a.allowNewValues, u = a.children, f = a.controlledFilter, p = a.defaultPlacement, d = a.describedBy, v = a.disabled, b = a.error, y = a.inline, m = a.inputId, h = a.labelledBy, g = a.placeholder, O = a.required, w = a.repositionMode, S = a.useClickawayOverlay, C = Hn(a, [ "allowNewValues", "children", "controlledFilter", "defaultPlacement", "describedBy", "disabled", "error", "inline", "inputId", "labelledBy", "placeholder", "required", "repositionMode", "useClickawayOverlay" ]);
2892
+ var k = Kn(Kn({}, On()(C, (function(e, t) {
3010
2893
  return t === "role" || t.indexOf("aria-") === 0;
3011
2894
  }))), {}, {
3012
2895
  "aria-describedby": d,
3013
2896
  "aria-labelledby": h,
3014
2897
  "aria-invalid": b || undefined
3015
2898
  });
3016
- var x = Qn({}, Pn()(S, (function(e, t) {
2899
+ var x = Kn({}, On()(C, (function(e, t) {
3017
2900
  return t === "aria-label" || t === "aria-describedby";
3018
2901
  })));
3019
2902
  var j = (r = this.getCurrentValues()) !== null && r !== void 0 ? r : [];
3020
- var I = j.slice(0);
3021
- var P = j.indexOf(this.state.filterKeyword) >= 0;
2903
+ var P = j.slice(0);
2904
+ var E = j.indexOf(this.state.filterKeyword) >= 0;
3022
2905
  // Map Options to selected values
3023
2906
  if (j && j.length) {
3024
2907
  e.Children.toArray(u).filter(e.isValidElement).filter((function(e) {
3025
- return e.type === Z;
2908
+ return e.type === W;
3026
2909
  })).forEach((function(e) {
3027
- if (e.type === Z) {
2910
+ if (e.type === W) {
3028
2911
  var t = j.indexOf(e.props.value);
3029
2912
  if (t !== -1) {
3030
- I[t] = e;
2913
+ P[t] = e;
3031
2914
  }
3032
2915
  }
3033
2916
  }));
3034
2917
  }
3035
2918
  // Filter the items
3036
- var E = (0, je.stringToKeywords)(this.state.filterKeyword);
3037
- var M = f ? e.Children.toArray(u) : e.Children.toArray(u).filter((function(e) {
3038
- if (hn()(e, [ "props", "label" ], false)) {
3039
- return (0, je.testPhrase)(e.props.label, E);
2919
+ var I = (0, ge.stringToKeywords)(this.state.filterKeyword);
2920
+ var R = f ? e.Children.toArray(u) : e.Children.toArray(u).filter((function(e) {
2921
+ if (sn()(e, [ "props", "label" ], false)) {
2922
+ return (0, ge.testPhrase)(e.props.label, I);
3040
2923
  }
3041
2924
  return true;
3042
2925
  // Keep all headers and non-interactive options
3043
2926
  }));
3044
2927
  this.availableOptionCount = 0;
3045
2928
  this.activeValue = undefined;
3046
- this.children = e.Children.map(M, (function(t, n) {
2929
+ this.children = e.Children.map(R, (function(t, n) {
3047
2930
  var r = t.props;
3048
2931
  if (!r || !i()(r, "value")) {
3049
2932
  // ignore Headings and Dividers
@@ -3053,7 +2936,7 @@
3053
2936
  var l = a.props, u = l.children, c = l.label, s = l.matchRanges, p = l.value;
3054
2937
  // find out if the search string exactly matches a value
3055
2938
  if (p === o.state.filterKeyword) {
3056
- P = true;
2939
+ E = true;
3057
2940
  }
3058
2941
  // remove items that are already selected
3059
2942
  var d = j.indexOf(p);
@@ -3061,8 +2944,8 @@
3061
2944
  return null;
3062
2945
  }
3063
2946
  // highlight matched text
3064
- var v = u === undefined || On()(u);
3065
- var b = v && !f && !s && E && (0, je.keywordLocations)(c, E);
2947
+ var v = u === undefined || pn()(u);
2948
+ var b = v && !f && !s && I && (0, ge.keywordLocations)(c, I);
3066
2949
  // clone item
3067
2950
  var y = (0, e.cloneElement)(a, {
3068
2951
  // eslint-disable-next-line react/no-array-index-key
@@ -3075,8 +2958,8 @@
3075
2958
  return e !== null;
3076
2959
  }));
3077
2960
  // Add the option to add the new value
3078
- if (l && !P && this.state.filterKeyword) {
3079
- this.children.unshift( t().createElement(Z, {
2961
+ if (l && !E && this.state.filterKeyword) {
2962
+ this.children.unshift( t().createElement(W, {
3080
2963
  label: "".concat(this.state.filterKeyword),
3081
2964
  description: (0, s._)("(New value)"),
3082
2965
  descriptionPosition: "right",
@@ -3111,14 +2994,14 @@
3111
2994
  return s;
3112
2995
  }));
3113
2996
  }
3114
- var A = yr("".concat(this.state.filterKeyword.length * .8, "em"));
2997
+ var M = ir("".concat(this.state.filterKeyword.length * .8, "em"));
3115
2998
 
3116
- return t().createElement(t().Fragment, null, t().createElement(Nn, er({
2999
+ return t().createElement(t().Fragment, null, t().createElement(Rn, zn({
3117
3000
  key: "control",
3118
3001
  "data-test-values": JSON.stringify(j),
3119
3002
  inline: y,
3120
3003
  $hasfocus: this.state.hasFocus
3121
- }, c().apply(void 0, [ S, "animateLoading", "controlledFilter", "defaultValues", "footerMessage", "inputRef", "isLoadingOptions", "labelledBy", "menuStyle", "noOptionsMessage", "onChange", "onFilterChange", "onScroll", "onScrollBottom", "onClose", "onOpen", "values", "useClickawayOverlay" ].concat($n(kn()(k)))), {
3004
+ }, c().apply(void 0, [ C, "animateLoading", "controlledFilter", "defaultValues", "footerMessage", "inputRef", "isLoadingOptions", "labelledBy", "menuStyle", "noOptionsMessage", "onChange", "onFilterChange", "onScroll", "onScrollBottom", "onClose", "onOpen", "values", "useClickawayOverlay" ].concat(An(yn()(k)))), {
3122
3005
  onClick: v ? undefined : this.handleClick,
3123
3006
  $disabled: v,
3124
3007
  $error: b,
@@ -3129,11 +3012,11 @@
3129
3012
  role: "group",
3130
3013
  "aria-disabled": v || undefined,
3131
3014
  "aria-labelledby": h
3132
- }, x), t().createElement(Dn, {
3015
+ }, x), t().createElement(Mn, {
3133
3016
  role: "listbox",
3134
3017
  "aria-invalid": b,
3135
3018
  "aria-multiselectable": "true"
3136
- }, this.renderButtons(I)), !v && t().createElement(Ln, er({
3019
+ }, this.renderButtons(P)), !v && t().createElement(Tn, zn({
3137
3020
  role: "combobox",
3138
3021
  "data-test": "textbox",
3139
3022
  id: m,
@@ -3147,7 +3030,7 @@
3147
3030
  autoComplete: "off",
3148
3031
  autoCorrect: "off",
3149
3032
  spellCheck: false,
3150
- style: A,
3033
+ style: M,
3151
3034
  placeholder: j.length ? "" : g,
3152
3035
  required: O,
3153
3036
  "aria-activedescendant": this.state.open && this.availableOptionCount > 0 ? this.activeItemId : undefined,
@@ -3156,7 +3039,7 @@
3156
3039
  "aria-owns": this.state.open ? this.popoverId : undefined,
3157
3040
  "aria-expanded": this.state.open,
3158
3041
  "aria-haspopup": true
3159
- }, k)), t().createElement(_n(), {
3042
+ }, k)), t().createElement(kn(), {
3160
3043
  open: this.state.open && !!this.state.el,
3161
3044
  autoCloseWhenOffScreen: true,
3162
3045
  anchor: this.state.el,
@@ -3165,38 +3048,38 @@
3165
3048
  defaultPlacement: p,
3166
3049
  repositionMode: w,
3167
3050
  id: this.popoverId
3168
- }, this.renderMenu)), t().createElement(Vn(), {
3051
+ }, this.renderMenu)), t().createElement(jn(), {
3169
3052
  role: "status",
3170
3053
  "aria-relevant": "text"
3171
- }, this.state.loadingMoreMessage), C && this.state.open ? t().createElement(Fn, {
3054
+ }, this.state.loadingMoreMessage), S && this.state.open ? t().createElement(_n, {
3172
3055
  key: "overlay",
3173
3056
  $popoveropen: this.state.open,
3174
3057
  "data-test": "overlay"
3175
- }) : null, t().createElement(Vn(), {
3058
+ }) : null, t().createElement(jn(), {
3176
3059
  role: "alert",
3177
3060
  "aria-relevant": "additions"
3178
- }, this.getSelectedItemsContent(I)));
3061
+ }, this.getSelectedItemsContent(P)));
3179
3062
  }
3180
3063
  } ]);
3181
3064
  return o;
3182
3065
  }(e.Component);
3183
- fr(hr, "propTypes", vr);
3184
- fr(hr, "defaultProps", br);
3185
- fr(hr, "Option", Z);
3186
- fr(hr, "Divider", f.Divider);
3187
- fr(hr, "Heading", f.Heading);
3188
- /* harmony default export */ const gr = hr;
3066
+ nr(cr, "propTypes", ar);
3067
+ nr(cr, "defaultProps", lr);
3068
+ nr(cr, "Option", W);
3069
+ nr(cr, "Divider", f.Divider);
3070
+ nr(cr, "Heading", f.Heading);
3071
+ /* harmony default export */ const sr = cr;
3189
3072
  // CONCATENATED MODULE: ./src/Multiselect/Multiselect.tsx
3190
- function Or(e) {
3073
+ function fr(e) {
3191
3074
  "@babel/helpers - typeof";
3192
- return Or = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
3075
+ return fr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
3193
3076
  return typeof e;
3194
3077
  } : function(e) {
3195
3078
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
3196
- }, Or(e);
3079
+ }, fr(e);
3197
3080
  }
3198
- function wr() {
3199
- return wr = Object.assign ? Object.assign.bind() : function(e) {
3081
+ function pr() {
3082
+ return pr = Object.assign ? Object.assign.bind() : function(e) {
3200
3083
  for (var t = 1; t < arguments.length; t++) {
3201
3084
  var n = arguments[t];
3202
3085
  for (var r in n) {
@@ -3204,24 +3087,24 @@
3204
3087
  }
3205
3088
  }
3206
3089
  return e;
3207
- }, wr.apply(null, arguments);
3090
+ }, pr.apply(null, arguments);
3208
3091
  }
3209
- function Cr(e, t) {
3092
+ function dr(e, t) {
3210
3093
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
3211
3094
  }
3212
- function Sr(e, t) {
3095
+ function vr(e, t) {
3213
3096
  for (var n = 0; n < t.length; n++) {
3214
3097
  var r = t[n];
3215
3098
  r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
3216
- Object.defineProperty(e, Rr(r.key), r);
3099
+ Object.defineProperty(e, kr(r.key), r);
3217
3100
  }
3218
3101
  }
3219
- function kr(e, t, n) {
3220
- return t && Sr(e.prototype, t), n && Sr(e, n), Object.defineProperty(e, "prototype", {
3102
+ function br(e, t, n) {
3103
+ return t && vr(e.prototype, t), n && vr(e, n), Object.defineProperty(e, "prototype", {
3221
3104
  writable: !1
3222
3105
  }), e;
3223
3106
  }
3224
- function xr(e, t) {
3107
+ function yr(e, t) {
3225
3108
  if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
3226
3109
  e.prototype = Object.create(t && t.prototype, {
3227
3110
  constructor: {
@@ -3231,71 +3114,71 @@
3231
3114
  }
3232
3115
  }), Object.defineProperty(e, "prototype", {
3233
3116
  writable: !1
3234
- }), t && jr(e, t);
3117
+ }), t && mr(e, t);
3235
3118
  }
3236
- function jr(e, t) {
3237
- return jr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
3119
+ function mr(e, t) {
3120
+ return mr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
3238
3121
  return e.__proto__ = t, e;
3239
- }, jr(e, t);
3122
+ }, mr(e, t);
3240
3123
  }
3241
- function Ir(e) {
3242
- var t = Mr();
3124
+ function hr(e) {
3125
+ var t = wr();
3243
3126
  return function() {
3244
- var n, r = Ar(e);
3127
+ var n, r = Sr(e);
3245
3128
  if (t) {
3246
- var o = Ar(this).constructor;
3129
+ var o = Sr(this).constructor;
3247
3130
  n = Reflect.construct(r, arguments, o);
3248
3131
  } else n = r.apply(this, arguments);
3249
- return Pr(this, n);
3132
+ return gr(this, n);
3250
3133
  };
3251
3134
  }
3252
- function Pr(e, t) {
3253
- if (t && ("object" == Or(t) || "function" == typeof t)) return t;
3135
+ function gr(e, t) {
3136
+ if (t && ("object" == fr(t) || "function" == typeof t)) return t;
3254
3137
  if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
3255
- return Er(e);
3138
+ return Or(e);
3256
3139
  }
3257
- function Er(e) {
3140
+ function Or(e) {
3258
3141
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
3259
3142
  return e;
3260
3143
  }
3261
- function Mr() {
3144
+ function wr() {
3262
3145
  try {
3263
3146
  var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
3264
3147
  } catch (e) {}
3265
- return (Mr = function t() {
3148
+ return (wr = function t() {
3266
3149
  return !!e;
3267
3150
  })();
3268
3151
  }
3269
- function Ar(e) {
3270
- return Ar = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
3152
+ function Sr(e) {
3153
+ return Sr = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
3271
3154
  return e.__proto__ || Object.getPrototypeOf(e);
3272
- }, Ar(e);
3155
+ }, Sr(e);
3273
3156
  }
3274
- function _r(e, t, n) {
3275
- return (t = Rr(t)) in e ? Object.defineProperty(e, t, {
3157
+ function Cr(e, t, n) {
3158
+ return (t = kr(t)) in e ? Object.defineProperty(e, t, {
3276
3159
  value: n,
3277
3160
  enumerable: !0,
3278
3161
  configurable: !0,
3279
3162
  writable: !0
3280
3163
  }) : e[t] = n, e;
3281
3164
  }
3282
- function Rr(e) {
3283
- var t = Vr(e, "string");
3284
- return "symbol" == Or(t) ? t : t + "";
3165
+ function kr(e) {
3166
+ var t = xr(e, "string");
3167
+ return "symbol" == fr(t) ? t : t + "";
3285
3168
  }
3286
- function Vr(e, t) {
3287
- if ("object" != Or(e) || !e) return e;
3169
+ function xr(e, t) {
3170
+ if ("object" != fr(e) || !e) return e;
3288
3171
  var n = e[Symbol.toPrimitive];
3289
3172
  if (void 0 !== n) {
3290
3173
  var r = n.call(e, t || "default");
3291
- if ("object" != Or(r)) return r;
3174
+ if ("object" != fr(r)) return r;
3292
3175
  throw new TypeError("@@toPrimitive must return a primitive value.");
3293
3176
  }
3294
3177
  return ("string" === t ? String : Number)(e);
3295
3178
  }
3296
3179
  /** @public */
3297
3180
  /** @public */
3298
- /** @public */ var Tr = {
3181
+ /** @public */ var jr = {
3299
3182
  allowNewValues: a().bool,
3300
3183
  animateLoading: a().bool,
3301
3184
  children: a().node,
@@ -3334,7 +3217,7 @@
3334
3217
  /** @private */
3335
3218
  virtualization: a().number
3336
3219
  };
3337
- var Br = {
3220
+ var Pr = {
3338
3221
  allowNewValues: false,
3339
3222
  animateLoading: false,
3340
3223
  compact: false,
@@ -3349,44 +3232,44 @@
3349
3232
  tabConfirmsNewValue: false,
3350
3233
  useClickawayOverlay: false
3351
3234
  };
3352
- function qr(e) {
3235
+ function Er(e) {
3353
3236
  return (e === null || e === void 0 ? void 0 : e.compact) === true;
3354
3237
  }
3355
- var Nr = function(e) {
3356
- xr(r, e);
3357
- var n = Ir(r);
3238
+ var Ir = function(e) {
3239
+ yr(r, e);
3240
+ var n = hr(r);
3358
3241
  function r() {
3359
- Cr(this, r);
3242
+ dr(this, r);
3360
3243
  return n.apply(this, arguments);
3361
3244
  }
3362
- kr(r, [ {
3245
+ br(r, [ {
3363
3246
  key: "render",
3364
3247
  // @docs-props-type MultiselectPropsBase
3365
3248
  // TODO: SUI-3402, this can be removed when ControlGroup no longer needs to inspect componentType
3366
3249
  value: function e() {
3367
- if (qr(this.props)) {
3250
+ if (Er(this.props)) {
3368
3251
 
3369
- return t().createElement(pn, wr({
3252
+ return t().createElement(rn, pr({
3370
3253
  "data-test": "multiselect"
3371
3254
  }, c()(this.props, "compact")));
3372
3255
  }
3373
3256
  if (false) {}
3374
3257
  if (false) {}
3375
3258
 
3376
- return t().createElement(gr, wr({
3259
+ return t().createElement(sr, pr({
3377
3260
  "data-test": "multiselect"
3378
3261
  }, c()(this.props, "compact")));
3379
3262
  }
3380
3263
  } ]);
3381
3264
  return r;
3382
3265
  }(e.Component);
3383
- _r(Nr, "propTypes", Tr);
3384
- _r(Nr, "defaultProps", Br);
3385
- _r(Nr, "componentType", "Multiselect");
3386
- _r(Nr, "Option", Z);
3387
- _r(Nr, "Heading", f.Heading);
3388
- _r(Nr, "Divider", f.Divider);
3389
- /* harmony default export */ const Dr = Nr;
3266
+ Cr(Ir, "propTypes", jr);
3267
+ Cr(Ir, "defaultProps", Pr);
3268
+ Cr(Ir, "componentType", "Multiselect");
3269
+ Cr(Ir, "Option", W);
3270
+ Cr(Ir, "Heading", f.Heading);
3271
+ Cr(Ir, "Divider", f.Divider);
3272
+ /* harmony default export */ const Rr = Ir;
3390
3273
  }) // CONCATENATED MODULE: ./src/Multiselect/index.ts
3391
3274
  ();
3392
3275
  module.exports = r;