@splunk/react-ui 4.37.0 → 4.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/Accordion.js +131 -153
  2. package/Anchor.js +50 -58
  3. package/Animation.js +64 -59
  4. package/AnimationToggle.js +59 -61
  5. package/Box.js +59 -67
  6. package/Breadcrumbs.js +113 -127
  7. package/Button.js +208 -219
  8. package/ButtonGroup.js +41 -49
  9. package/ButtonSimple.js +264 -295
  10. package/CHANGELOG.md +50 -1
  11. package/Calendar.js +353 -414
  12. package/Card.js +183 -243
  13. package/CardLayout.js +86 -83
  14. package/Chip.js +104 -122
  15. package/Clickable.js +180 -198
  16. package/CloseButton.js +52 -60
  17. package/Code.js +24 -31
  18. package/CollapsiblePanel.js +172 -202
  19. package/Color.js +1107 -980
  20. package/ColumnLayout.js +72 -96
  21. package/ComboBox.js +267 -305
  22. package/Concertina.js +406 -454
  23. package/ControlGroup.js +165 -194
  24. package/Date.js +116 -131
  25. package/DefinitionList.js +125 -149
  26. package/Divider.js +81 -79
  27. package/Dropdown.js +226 -237
  28. package/DualListbox.js +150 -186
  29. package/EventListener.js +4 -1
  30. package/File.js +1032 -955
  31. package/FormRows.js +281 -334
  32. package/Heading.js +27 -35
  33. package/Image.js +101 -116
  34. package/JSONTree.js +301 -344
  35. package/Layer.js +118 -126
  36. package/Link.js +141 -159
  37. package/List.js +61 -77
  38. package/MIGRATION.mdx +92 -38
  39. package/Markdown.js +288 -347
  40. package/Menu.js +512 -530
  41. package/Message.js +173 -196
  42. package/MessageBar.js +58 -66
  43. package/Modal.js +241 -290
  44. package/ModalLayer.js +130 -148
  45. package/Monogram.js +138 -138
  46. package/Multiselect.js +1600 -1923
  47. package/Number.js +159 -178
  48. package/Paginator.js +296 -335
  49. package/Paragraph.js +24 -32
  50. package/Popover.js +448 -441
  51. package/Progress.js +65 -75
  52. package/RadioBar.js +301 -303
  53. package/RadioList.js +77 -119
  54. package/Resize.js +105 -127
  55. package/ResultsMenu.js +373 -385
  56. package/ScreenReaderContent.js +130 -94
  57. package/Scroll.js +209 -244
  58. package/Search.js +375 -384
  59. package/Select.js +1076 -1354
  60. package/SidePanel.js +122 -142
  61. package/Slider.js +192 -222
  62. package/SlidingPanels.js +238 -270
  63. package/SplitButton.js +222 -245
  64. package/StaticContent.js +68 -76
  65. package/StepBar.js +206 -205
  66. package/Switch.js +211 -236
  67. package/TabBar.js +222 -258
  68. package/TabLayout.js +114 -139
  69. package/Table.js +2017 -2180
  70. package/Text.js +401 -512
  71. package/TextArea.js +411 -441
  72. package/Tooltip.js +116 -132
  73. package/TransitionOpen.js +160 -178
  74. package/Tree.js +268 -287
  75. package/Typography.js +48 -52
  76. package/WaitSpinner.js +60 -68
  77. package/cypress/support/commands.ts +9 -0
  78. package/cypress/support/index.d.ts +6 -0
  79. package/cypress/tsconfig.cypress.json +1 -0
  80. package/docker-compose.yml +0 -1
  81. package/package.json +17 -17
  82. package/types/src/Button/Button.d.ts +20 -6
  83. package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
  84. package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
  85. package/types/src/Color/Color.d.ts +5 -2
  86. package/types/src/Color/Palette.d.ts +6 -2
  87. package/types/src/ComboBox/Option.d.ts +1 -1
  88. package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
  89. package/types/src/Date/Date.d.ts +2 -3
  90. package/types/src/File/File.d.ts +2 -3
  91. package/types/src/File/Retry.d.ts +1 -2
  92. package/types/src/Link/Link.d.ts +3 -4
  93. package/types/src/Menu/Item.d.ts +24 -8
  94. package/types/src/Menu/Menu.d.ts +3 -3
  95. package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
  96. package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
  97. package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
  98. package/types/src/Multiselect/Option.d.ts +2 -0
  99. package/types/src/Number/Number.d.ts +3 -3
  100. package/types/src/Popover/Popover.d.ts +3 -4
  101. package/types/src/RadioBar/RadioBar.d.ts +2 -2
  102. package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
  103. package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
  104. package/types/src/Search/Option.d.ts +16 -3
  105. package/types/src/Select/Option.d.ts +3 -1
  106. package/types/src/Select/OptionBase.d.ts +7 -5
  107. package/types/src/Select/Select.d.ts +2 -2
  108. package/types/src/Select/SelectAllOption.d.ts +4 -4
  109. package/types/src/Select/SelectBase.d.ts +0 -1
  110. package/types/src/SidePanel/SidePanel.d.ts +1 -1
  111. package/types/src/Slider/Slider.d.ts +2 -3
  112. package/types/src/Slider/docs/examples/Error.d.ts +2 -0
  113. package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
  114. package/types/src/StepBar/Step.d.ts +1 -2
  115. package/types/src/TabBar/Tab.d.ts +1 -1
  116. package/types/src/TabBar/TabBar.d.ts +3 -1
  117. package/types/src/TabLayout/TabLayout.d.ts +2 -0
  118. package/types/src/Table/HeadDropdownCell.d.ts +2 -0
  119. package/types/src/Table/Table.d.ts +0 -1
  120. package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
  121. package/types/src/Text/IconOutlinedHide.d.ts +1 -2
  122. package/types/src/Text/IconOutlinedView.d.ts +1 -2
  123. package/types/src/Text/Text.d.ts +6 -4
  124. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
  125. package/types/src/TextArea/TextArea.d.ts +2 -2
  126. package/types/src/Tooltip/Tooltip.d.ts +4 -4
  127. package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
  128. package/useForceUpdate.js +30 -32
  129. package/useKeyPress.js +1 -1
  130. package/types/src/Button/docs/examples/Selected.d.ts +0 -2
  131. package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
  132. package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
  133. package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
  134. package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
  135. package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
  136. package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
  137. package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
  138. package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
  139. /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
  140. /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
  141. /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
  142. /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Select.js CHANGED
@@ -61,25 +61,25 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- Divider: () => /* reexport */ T.Divider,
65
- Heading: () => /* reexport */ T.Heading,
66
- Option: () => /* reexport */ nn,
67
- default: () => /* reexport */ wn
64
+ Divider: () => /* reexport */ M.Divider,
65
+ Heading: () => /* reexport */ M.Heading,
66
+ Option: () => /* reexport */ zt,
67
+ default: () => /* reexport */ fn
68
68
  });
69
69
  // CONCATENATED MODULE: external "react"
70
70
  const n = require("react");
71
71
  var r = e.n(n);
72
72
  // CONCATENATED MODULE: external "prop-types"
73
73
  const o = require("prop-types");
74
- var i = e.n(o);
74
+ var l = e.n(o);
75
75
  // CONCATENATED MODULE: external "lodash/has"
76
- const a = require("lodash/has");
77
- var l = e.n(a);
76
+ const i = require("lodash/has");
77
+ var a = e.n(i);
78
78
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
79
- const s = require("@splunk/ui-utils/i18n");
79
+ const u = require("@splunk/ui-utils/i18n");
80
80
  // CONCATENATED MODULE: external "lodash/castArray"
81
81
  const c = require("lodash/castArray");
82
- var u = e.n(c);
82
+ var s = e.n(c);
83
83
  // CONCATENATED MODULE: external "lodash/find"
84
84
  const p = require("lodash/find");
85
85
  var f = e.n(p);
@@ -90,268 +90,251 @@
90
90
  const h = require("lodash/includes");
91
91
  var b = e.n(h);
92
92
  // CONCATENATED MODULE: external "lodash/isUndefined"
93
- const m = require("lodash/isUndefined");
94
- var y = e.n(m);
93
+ const y = require("lodash/isUndefined");
94
+ var m = e.n(y);
95
95
  // CONCATENATED MODULE: external "lodash/keys"
96
96
  const g = require("lodash/keys");
97
97
  var O = e.n(g);
98
98
  // CONCATENATED MODULE: external "lodash/memoize"
99
- const S = require("lodash/memoize");
100
- var w = e.n(S);
99
+ const w = require("lodash/memoize");
100
+ var S = e.n(w);
101
101
  // CONCATENATED MODULE: external "lodash/omit"
102
- const x = require("lodash/omit");
103
- var C = e.n(x);
102
+ const C = require("lodash/omit");
103
+ var x = e.n(C);
104
104
  // CONCATENATED MODULE: external "lodash/pick"
105
105
  const k = require("lodash/pick");
106
- var I = e.n(k);
106
+ var j = e.n(k);
107
107
  // CONCATENATED MODULE: external "lodash/uniq"
108
- const _ = require("lodash/uniq");
109
- var A = e.n(_);
108
+ const P = require("lodash/uniq");
109
+ var E = e.n(P);
110
110
  // CONCATENATED MODULE: external "lodash/without"
111
- const j = require("lodash/without");
112
- var E = e.n(j);
111
+ const I = require("lodash/without");
112
+ var T = e.n(I);
113
113
  // CONCATENATED MODULE: external "@splunk/ui-utils/id"
114
- const M = require("@splunk/ui-utils/id");
114
+ const A = require("@splunk/ui-utils/id");
115
115
  // CONCATENATED MODULE: external "@splunk/react-ui/Menu"
116
- const T = require("@splunk/react-ui/Menu");
116
+ const M = require("@splunk/react-ui/Menu");
117
117
  // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
118
- const P = require("@splunk/react-ui/Dropdown");
119
- var V = e.n(P);
118
+ const _ = require("@splunk/react-ui/Dropdown");
119
+ var V = e.n(_);
120
120
  // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
121
- const R = require("@splunk/ui-utils/keyboard");
121
+ const q = require("@splunk/ui-utils/keyboard");
122
122
  // CONCATENATED MODULE: external "@splunk/ui-utils/filter"
123
- const D = require("@splunk/ui-utils/filter");
123
+ const R = require("@splunk/ui-utils/filter");
124
124
  // CONCATENATED MODULE: external "@splunk/react-ui/Link"
125
125
  const L = require("@splunk/react-ui/Link");
126
- var q = e.n(L);
126
+ var D = e.n(L);
127
127
  // CONCATENATED MODULE: external "@splunk/react-ui/ResultsMenu"
128
- const N = require("@splunk/react-ui/ResultsMenu");
129
- var B = e.n(N);
128
+ const B = require("@splunk/react-ui/ResultsMenu");
129
+ var K = e.n(B);
130
130
  // CONCATENATED MODULE: external "@splunk/react-ui/Text"
131
- const K = require("@splunk/react-ui/Text");
132
- var F = e.n(K);
131
+ const N = require("@splunk/react-ui/Text");
132
+ var F = e.n(N);
133
133
  // CONCATENATED MODULE: external "@splunk/react-icons/CaretSmallDown"
134
134
  const H = require("@splunk/react-icons/CaretSmallDown");
135
- var $ = e.n(H);
135
+ var z = e.n(H);
136
136
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Caret"
137
- const z = require("@splunk/react-icons/enterprise/Caret");
138
- var W = e.n(z);
137
+ const $ = require("@splunk/react-icons/enterprise/Caret");
138
+ var W = e.n($);
139
139
  // CONCATENATED MODULE: external "@splunk/themes"
140
140
  const U = require("@splunk/themes");
141
141
  // CONCATENATED MODULE: ./src/Select/icons/CaretSmallDown.tsx
142
- var G = function e() {
142
+ var J = function e() {
143
143
  var t = (0, U.useSplunkTheme)(), n = t.isEnterprise;
144
144
  var o = n ? r().createElement(W(), {
145
145
  screenReaderText: null,
146
146
  hideDefaultTooltip: true,
147
147
  size: .5
148
- }) : r().createElement($(), null);
148
+ }) : r().createElement(z(), null);
149
149
  return o;
150
150
  };
151
- /* harmony default export */ const J = G;
151
+ /* harmony default export */ const X = J;
152
152
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Search"
153
- const X = require("@splunk/react-icons/enterprise/Search");
154
- var Y = e.n(X);
153
+ const G = require("@splunk/react-icons/enterprise/Search");
154
+ var Q = e.n(G);
155
155
  // CONCATENATED MODULE: external "@splunk/react-icons/Magnifier"
156
- const Q = require("@splunk/react-icons/Magnifier");
157
- var Z = e.n(Q);
156
+ const Y = require("@splunk/react-icons/Magnifier");
157
+ var Z = e.n(Y);
158
158
  // CONCATENATED MODULE: ./src/Select/icons/Search.tsx
159
159
  var ee = function e() {
160
160
  var t = (0, U.useSplunkTheme)(), n = t.isEnterprise, o = t.isCompact;
161
- var i = (0, s._)("Search");
162
- var a = o ? "20px" : "24px";
163
- var l = n ? r().createElement(Y(), {
161
+ var l = (0, u._)("Search");
162
+ var i = o ? "20px" : "24px";
163
+ var a = n ? r().createElement(Q(), {
164
164
  role: "presentation",
165
165
  size: "16px",
166
- screenReaderText: i,
166
+ screenReaderText: l,
167
167
  hideDefaultTooltip: true
168
168
  }) : r().createElement(Z(), {
169
169
  role: "presentation",
170
- "aria-label": i,
171
- width: a,
172
- height: a
170
+ "aria-label": l,
171
+ width: i,
172
+ height: i
173
173
  });
174
- return l;
174
+ return a;
175
175
  };
176
176
  /* harmony default export */ const te = ee;
177
177
  // CONCATENATED MODULE: ./src/Select/OptionBase.tsx
178
178
  function ne(e) {
179
179
  "@babel/helpers - typeof";
180
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
181
- ne = function e(t) {
182
- return typeof t;
183
- };
184
- } else {
185
- ne = function e(t) {
186
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
187
- };
188
- }
189
- return ne(e);
180
+ return ne = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
181
+ return typeof e;
182
+ } : function(e) {
183
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
184
+ }, ne(e);
190
185
  }
191
186
  function re() {
192
- re = Object.assign || function(e) {
187
+ return re = Object.assign ? Object.assign.bind() : function(e) {
193
188
  for (var t = 1; t < arguments.length; t++) {
194
189
  var n = arguments[t];
195
190
  for (var r in n) {
196
- if (Object.prototype.hasOwnProperty.call(n, r)) {
197
- e[r] = n[r];
198
- }
191
+ ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
199
192
  }
200
193
  }
201
194
  return e;
202
- };
203
- return re.apply(this, arguments);
195
+ }, re.apply(null, arguments);
204
196
  }
205
197
  function oe(e, t) {
206
- if (e == null) return {};
207
- var n = ie(e, t);
208
- var r, o;
198
+ if (null == e) return {};
199
+ var n, r, o = le(e, t);
209
200
  if (Object.getOwnPropertySymbols) {
210
- var i = Object.getOwnPropertySymbols(e);
211
- for (o = 0; o < i.length; o++) {
212
- r = i[o];
213
- if (t.indexOf(r) >= 0) continue;
214
- if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
215
- n[r] = e[r];
201
+ var l = Object.getOwnPropertySymbols(e);
202
+ for (r = 0; r < l.length; r++) {
203
+ n = l[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
216
204
  }
217
205
  }
218
- return n;
206
+ return o;
219
207
  }
220
- function ie(e, t) {
221
- if (e == null) return {};
208
+ function le(e, t) {
209
+ if (null == e) return {};
222
210
  var n = {};
223
- var r = Object.keys(e);
224
- var o, i;
225
- for (i = 0; i < r.length; i++) {
226
- o = r[i];
227
- if (t.indexOf(o) >= 0) continue;
228
- n[o] = e[o];
211
+ for (var r in e) {
212
+ if ({}.hasOwnProperty.call(e, r)) {
213
+ if (t.includes(r)) continue;
214
+ n[r] = e[r];
215
+ }
229
216
  }
230
217
  return n;
231
218
  }
232
- function ae(e, t) {
233
- if (!(e instanceof t)) {
234
- throw new TypeError("Cannot call a class as a function");
235
- }
219
+ function ie(e, t) {
220
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
236
221
  }
237
- function le(e, t) {
222
+ function ae(e, t) {
238
223
  for (var n = 0; n < t.length; n++) {
239
224
  var r = t[n];
240
- r.enumerable = r.enumerable || false;
241
- r.configurable = true;
242
- if ("value" in r) r.writable = true;
243
- Object.defineProperty(e, r.key, r);
225
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
226
+ Object.defineProperty(e, ye(r.key), r);
244
227
  }
245
228
  }
246
- function se(e, t, n) {
247
- if (t) le(e.prototype, t);
248
- if (n) le(e, n);
249
- return e;
229
+ function ue(e, t, n) {
230
+ return t && ae(e.prototype, t), n && ae(e, n), Object.defineProperty(e, "prototype", {
231
+ writable: !1
232
+ }), e;
250
233
  }
251
234
  function ce(e, t) {
252
- if (typeof t !== "function" && t !== null) {
253
- throw new TypeError("Super expression must either be null or a function");
254
- }
235
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
255
236
  e.prototype = Object.create(t && t.prototype, {
256
237
  constructor: {
257
238
  value: e,
258
- writable: true,
259
- configurable: true
239
+ writable: !0,
240
+ configurable: !0
260
241
  }
261
- });
262
- if (t) ue(e, t);
242
+ }), Object.defineProperty(e, "prototype", {
243
+ writable: !1
244
+ }), t && se(e, t);
263
245
  }
264
- function ue(e, t) {
265
- ue = Object.setPrototypeOf || function e(t, n) {
266
- t.__proto__ = n;
267
- return t;
268
- };
269
- return ue(e, t);
246
+ function se(e, t) {
247
+ return se = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
248
+ return e.__proto__ = t, e;
249
+ }, se(e, t);
270
250
  }
271
251
  function pe(e) {
272
252
  var t = ve();
273
- return function n() {
274
- var r = he(e), o;
253
+ return function() {
254
+ var n, r = he(e);
275
255
  if (t) {
276
- var i = he(this).constructor;
277
- o = Reflect.construct(r, arguments, i);
278
- } else {
279
- o = r.apply(this, arguments);
280
- }
281
- return fe(this, o);
256
+ var o = he(this).constructor;
257
+ n = Reflect.construct(r, arguments, o);
258
+ } else n = r.apply(this, arguments);
259
+ return fe(this, n);
282
260
  };
283
261
  }
284
262
  function fe(e, t) {
285
- if (t && (ne(t) === "object" || typeof t === "function")) {
286
- return t;
287
- }
263
+ if (t && ("object" == ne(t) || "function" == typeof t)) return t;
264
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
288
265
  return de(e);
289
266
  }
290
267
  function de(e) {
291
- if (e === void 0) {
292
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
293
- }
268
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
294
269
  return e;
295
270
  }
296
271
  function ve() {
297
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
298
- if (Reflect.construct.sham) return false;
299
- if (typeof Proxy === "function") return true;
300
272
  try {
301
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
302
- return true;
303
- } catch (e) {
304
- return false;
305
- }
273
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
274
+ } catch (e) {}
275
+ return (ve = function t() {
276
+ return !!e;
277
+ })();
306
278
  }
307
279
  function he(e) {
308
- he = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
309
- return t.__proto__ || Object.getPrototypeOf(t);
310
- };
311
- return he(e);
280
+ return he = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
281
+ return e.__proto__ || Object.getPrototypeOf(e);
282
+ }, he(e);
312
283
  }
313
284
  function be(e, t, n) {
314
- if (t in e) {
315
- Object.defineProperty(e, t, {
316
- value: n,
317
- enumerable: true,
318
- configurable: true,
319
- writable: true
320
- });
321
- } else {
322
- e[t] = n;
285
+ return (t = ye(t)) in e ? Object.defineProperty(e, t, {
286
+ value: n,
287
+ enumerable: !0,
288
+ configurable: !0,
289
+ writable: !0
290
+ }) : e[t] = n, e;
291
+ }
292
+ function ye(e) {
293
+ var t = me(e, "string");
294
+ return "symbol" == ne(t) ? t : t + "";
295
+ }
296
+ function me(e, t) {
297
+ if ("object" != ne(e) || !e) return e;
298
+ var n = e[Symbol.toPrimitive];
299
+ if (void 0 !== n) {
300
+ var r = n.call(e, t || "default");
301
+ if ("object" != ne(r)) return r;
302
+ throw new TypeError("@@toPrimitive must return a primitive value.");
323
303
  }
324
- return e;
304
+ return ("string" === t ? String : Number)(e);
325
305
  }
326
- var me = {
306
+ var ge = {
327
307
  /** @private */
328
- active: i().bool,
329
- children: i().node,
330
- description: i().string,
331
- descriptionPosition: i().oneOf([ "right", "bottom" ]),
332
- disabled: i().bool,
333
- hidden: i().bool,
334
- icon: i().node,
335
- label: i().string.isRequired,
308
+ active: l().bool,
309
+ children: l().node,
310
+ description: l().string,
311
+ descriptionPosition: l().oneOf([ "right", "bottom" ]),
312
+ disabled: l().bool,
313
+ hidden: l().bool,
314
+ icon: l().node,
315
+ label: l().string.isRequired,
336
316
  /**
337
317
  * @private Passed down from <BaseSelect>
338
318
  */
339
- multiple: i().bool,
340
- matchRanges: i().arrayOf(i().shape({
341
- start: i().number.isRequired,
342
- end: i().number.isRequired
319
+ multiple: l().bool,
320
+ matchRanges: l().arrayOf(l().shape({
321
+ start: l().number.isRequired,
322
+ end: l().number.isRequired
343
323
  })),
344
324
  /** @private */
345
- onClick: i().func,
325
+ onClick: l().func,
346
326
  /** @private */
347
- selected: i().bool,
348
- truncate: i().bool,
349
- value: i().oneOfType([ i().string, i().number, i().bool ]).isRequired
327
+ role: l().oneOf([ "menuitemcheckbox", "option" ]),
328
+ /** @private */
329
+ selected: l().oneOfType([ l().bool, l().oneOf([ "some" ]) ]),
330
+ truncate: l().bool,
331
+ value: l().oneOfType([ l().string, l().number, l().bool ]).isRequired
350
332
  };
351
- var ye = {
333
+ var Oe = {
352
334
  descriptionPosition: "bottom",
353
335
  disabled: false,
354
336
  multiple: false,
337
+ role: "option",
355
338
  selected: false,
356
339
  truncate: false
357
340
  };
@@ -359,20 +342,20 @@
359
342
  * An option within a `Multiselect`. This inherits from
360
343
  * [PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)
361
344
  * so any elements passed to it must also be pure.
362
- */ var ge = function(e) {
345
+ */ var we = function(e) {
363
346
  ce(n, e);
364
347
  var t = pe(n);
365
348
  function n() {
366
349
  var e;
367
- ae(this, n);
368
- for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) {
369
- o[i] = arguments[i];
350
+ ie(this, n);
351
+ for (var r = arguments.length, o = new Array(r), l = 0; l < r; l++) {
352
+ o[l] = arguments[l];
370
353
  }
371
354
  e = t.call.apply(t, [ this ].concat(o));
372
355
  be(de(e), "c", null);
373
356
  be(de(e), "handleClick", (function(t) {
374
- var n = e.props, r = n.onClick, o = n.value, i = n.disabled;
375
- if (!i) {
357
+ var n = e.props, r = n.onClick, o = n.value, l = n.disabled;
358
+ if (!l) {
376
359
  r === null || r === void 0 ? void 0 : r(t, {
377
360
  value: o
378
361
  });
@@ -383,15 +366,19 @@
383
366
  }));
384
367
  return e;
385
368
  }
386
- se(n, [ {
369
+ // @docs-props-type OptionPropsBase
370
+ ue(n, [ {
387
371
  key: "scrollIntoViewIfNeeded",
372
+ // eslint-disable-next-line react/no-unused-class-component-methods
388
373
  value: function e() {
389
374
  var t;
390
375
  (t = this.c) === null || t === void 0 ? void 0 : t.scrollIntoViewIfNeeded();
391
376
  }
392
377
  /**
393
378
  * Place focus on the button.
394
- */ }, {
379
+ */
380
+ // eslint-disable-next-line react/no-unused-class-component-methods
381
+ }, {
395
382
  key: "focus",
396
383
  value: function e() {
397
384
  var t;
@@ -400,279 +387,73 @@
400
387
  }, {
401
388
  key: "render",
402
389
  value: function e() {
403
- var t = this.props, n = t.value, o = t.children, i = t.label, a = t.multiple, l = oe(t, [ "value", "children", "label", "multiple" ]);
390
+ var t = this.props, n = t.value, o = t.children, l = t.label, i = t.multiple, a = t.role, u = t.icon, c = oe(t, [ "value", "children", "label", "multiple", "role", "icon" ]);
391
+ var s = n.toString();
404
392
 
405
- return r().createElement(T.Item, re({
406
- "aria-selected": this.props.selected,
393
+ return r().createElement(M.Item, re({
407
394
  "data-test-value": n,
408
395
  "data-test": "option",
409
396
  ref: this.handleMount
410
- }, l, {
397
+ }, c, {
411
398
  selectable: true,
412
- selectableAppearance: a ? "checkbox" : undefined,
399
+ selectableAppearance: i ? "checkbox" : "checkmark",
413
400
  onClick: this.handleClick,
414
- role: "option",
415
- value: n.toString()
416
- }), o || i);
401
+ role: a,
402
+ value: s,
403
+ startAdornment: u
404
+ }), o || l);
417
405
  }
418
406
  } ]);
419
407
  return n;
420
408
  }(n.PureComponent);
421
- be(ge, "propTypes", me);
422
- be(ge, "defaultProps", ye);
423
- be(ge, "type", T.Item);
424
- /* harmony default export */ const Oe = ge;
425
- // CONCATENATED MODULE: external "styled-components"
426
- const Se = require("styled-components");
427
- var we = e.n(Se);
428
- // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
429
- const xe = require("@splunk/react-ui/Clickable");
430
- var Ce = e.n(xe);
431
- // CONCATENATED MODULE: external "@splunk/react-ui/Switch"
432
- const ke = require("@splunk/react-ui/Switch");
433
- var Ie = e.n(ke);
434
- // CONCATENATED MODULE: ./src/Menu/ItemStyles.ts
435
- var _e = (0, Se.css)([ "color:", ";font-size:", ";line-height:", ";overflow:inherit;white-space:inherit;text-overflow:inherit;" ], (0,
436
- U.pick)({
437
- prisma: U.variables.contentColorDefault,
438
- enterprise: U.variables.textGray
439
- }), U.variables.fontSizeSmall, (0, U.pick)({
440
- prisma: "16px"
441
- }));
442
- var Ae = we().span.withConfig({
443
- displayName: "ItemStyles__StyledItemDescriptionBottom",
444
- componentId: "sc-4kc053-0"
445
- })([ "", ";display:block;" ], _e);
446
- var je = we().span.withConfig({
447
- displayName: "ItemStyles__StyledItemDescriptionRight",
448
- componentId: "sc-4kc053-1"
449
- })([ "", ";float:right;", " max-width:50%;text-align:right;box-sizing:border-box;" ], _e, (0,
450
- U.pick)({
451
- enterprise: (0, Se.css)([ "padding-left:", ";" ], U.variables.spacingLarge)
452
- }));
453
- var Ee = we().div.withConfig({
454
- displayName: "ItemStyles__StyledItemSelectedIcon",
455
- componentId: "sc-4kc053-2"
456
- })([ "position:absolute;", " color:", ";" ], (0, U.pick)({
457
- prisma: (0, Se.css)([ "right:16px;" ]),
458
- enterprise: (0, Se.css)([ "right:3px;left:8px;" ])
459
- }), (0, U.pick)({
460
- prisma: U.variables.contentColorActive,
461
- enterprise: U.variables.accentColorL10
462
- }));
463
- var Me = we().span.withConfig({
464
- displayName: "ItemStyles__StyledItemIcon",
465
- componentId: "sc-4kc053-3"
466
- })([ "flex:0 0 auto;padding-right:", ";min-width:10px;display:inline-block;text-align:center;vertical-align:", ";", "" ], (0,
467
- U.pick)({
468
- prisma: "8px",
469
- enterprise: "3px"
470
- }), (0, U.pick)({
471
- prisma: "initial",
472
- enterprise: "middle"
473
- }), (0, U.pick)({
474
- prisma: (0, Se.css)([ "color:", ";display:inline-flex;align-items:center;min-width:20px;min-height:20px;& > svg{width:20px;height:20px;}" ], U.variables.contentColorMuted),
475
- enterprise: (0, Se.css)([ "transform:translateY(-1px);" ])
476
- }));
477
- var Te = we()(Ce()).withConfig({
478
- displayName: "ItemStyles__StyledClickable",
479
- componentId: "sc-4kc053-4"
480
- })([ "display:block;position:relative;cursor:pointer;color:", ";word-wrap:break-word;max-width:100%;width:100%;padding:", ";", " ", " ", " &:not([disabled],[aria-disabled='true']){&:hover{background:", ";", "}", " ", "}&:focus{outline:0;box-shadow:", ";", "}&[disabled],&[aria-disabled='true']{color:", ";cursor:not-allowed;", ",", "{color:inherit;}", "{cursor:not-allowed;color:", ";}", "}", "" ], (0,
481
- U.pick)({
482
- prisma: U.variables.contentColorActive,
483
- enterprise: {
484
- dark: U.variables.gray96,
485
- light: U.variables.gray22
486
- }
487
- }), (0, U.pick)({
488
- prisma: {
489
- comfortable: "10px 16px",
490
- compact: "6px 16px"
491
- },
492
- enterprise: "6px 10px"
493
- }), (function(e) {
494
- var t = e.$isSelectable, n = e.$selectableAppearance;
495
- return t && (0, U.pick)({
496
- prisma: (0, Se.css)([ "padding-right:44px;", "" ], (function() {
497
- return n === "checkbox" && "padding-left: 42px;";
498
- })),
499
- enterprise: (0, Se.css)([ "padding-right:10px;padding-left:", ";" ], (function() {
500
- return n === "checkbox" ? "32px" : "28px";
501
- }))
502
- });
503
- }), (function(e) {
504
- var t = e.$active, n = e.$preventFocus;
505
- return t && !n && (0, Se.css)([ "box-shadow:", ";" ], U.variables.focusShadowInset);
506
- }), (function(e) {
507
- var t = e.$active;
508
- return t && (0, Se.css)([ "background:", ";font-weight:", ";" ], (0, U.pick)({
509
- enterprise: {
510
- light: U.variables.gray92,
511
- dark: U.variables.gray22
512
- },
513
- prisma: U.variables.neutral100
514
- }), U.variables.fontWeightBold);
515
- }), (0, U.pick)({
516
- prisma: U.variables.interactiveColorOverlayHover,
517
- enterprise: U.variables.backgroundColorHover
518
- }), (function(e) {
519
- var t = e.$selected;
520
- return t && (0, U.pick)({
521
- prisma: (0, Se.css)([ "background:", ";" ], U.mixins.overlayColors(U.variables.interactiveColorOverlaySelected, U.variables.interactiveColorOverlayHover))
522
- });
523
- }), (0, U.pick)({
524
- prisma: (0, Se.css)([ "&:active{background:", ";}" ], U.variables.interactiveColorOverlayActive)
525
- }), (function(e) {
526
- var t = e.$selected;
527
- return t && (0, U.pick)({
528
- prisma: (0, Se.css)([ "background:", ";&:active{background:", ";}" ], U.variables.interactiveColorOverlaySelected, U.mixins.overlayColors(U.variables.interactiveColorOverlaySelected, U.variables.interactiveColorOverlayActive))
529
- });
530
- }), U.variables.focusShadowInset, (0, U.pick)({
531
- prisma: (0, Se.css)([ "background:", ";" ], U.variables.interactiveColorOverlayHover)
532
- }), (0, U.pick)({
533
- enterprise: {
534
- light: U.variables.gray45,
535
- dark: U.variables.contentColorDisabled
536
- },
537
- prisma: U.variables.contentColorDisabled
538
- }),
539
- /* sc-sel */
540
- Ae,
541
- /* sc-sel */
542
- je,
543
- /* sc-sel */
544
- Ee, (0, U.pick)({
545
- prisma: U.variables.contentColorDisabled,
546
- enterprise: U.variables.gray80
547
- }), (0, U.pick)({
548
- prisma: (0, Se.css)([ "& > * > ", "{color:", ";}" ],
549
- /* sc-sel */
550
- Me, U.variables.contentColorDisabled)
551
- }), (function(e) {
552
- var t = e.$selected;
553
- return t && (0, U.pick)({
554
- prisma: (0, Se.css)([ "", "{color:", ";}" ],
555
- /* sc-sel */
556
- Me, U.variables.contentColorActive)
557
- });
558
- }));
559
- var Pe = we()(Ie()).withConfig({
560
- displayName: "ItemStyles__StyledSwitch",
561
- componentId: "sc-4kc053-5"
562
- })([ "position:absolute;left:", ";top:", ";" ], (0, U.pick)({
563
- prisma: "16px",
564
- enterprise: "8px"
565
- }), (0, U.pick)({
566
- prisma: "0px",
567
- enterprise: {
568
- comfortable: "-1px",
569
- compact: "2px"
570
- }
571
- }));
572
- var Ve = we().span.withConfig({
573
- displayName: "ItemStyles__StyledInnerWrapper",
574
- componentId: "sc-4kc053-6"
575
- })([ "display:flex;align-items:flex-start;" ]);
576
- var Re = we().span.withConfig({
577
- displayName: "ItemStyles__StyledTitleAndDescriptionWrapper",
578
- componentId: "sc-4kc053-7"
579
- })([ "display:flex;flex-wrap:wrap;flex-direction:column;max-width:100%;width:100%;align-self:center;word-break:break-word;white-space:normal;", "" ], (function(e) {
580
- var t = e.$truncate;
581
- return t && (0, Se.css)([ "white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ]);
582
- }));
583
- var De = we().div.withConfig({
584
- displayName: "ItemStyles__StyledLabel",
585
- componentId: "sc-4kc053-8"
586
- })([ "overflow:inherit;white-space:inherit;text-overflow:inherit;max-width:100%;min-height:20px;", "" ], (function(e) {
587
- var t = e.$truncate;
588
- return t && (0, Se.css)([ "display:block;clear:both;" ]);
589
- }));
590
- var Le = we().span.withConfig({
591
- displayName: "ItemStyles__StyledMatch",
592
- componentId: "sc-4kc053-9"
593
- })([ "border-bottom:1px solid ", ";" ], (0, U.pick)({
594
- prisma: U.variables.contentColorActive,
595
- enterprise: {
596
- dark: U.variables.gray96,
597
- light: U.variables.gray45
598
- }
599
- }));
600
- var qe = we().span.withConfig({
601
- displayName: "ItemStyles__StyledSubmenu",
602
- componentId: "sc-4kc053-10"
603
- })([ "float:right;padding-left:", ";color:", ";", "" ], U.variables.spacingSmall, (0,
604
- U.pick)({
605
- prisma: "inherit",
606
- enterprise: U.variables.textGray
607
- }), (0, U.pick)({
608
- prisma: (0, Se.css)([ "& > svg{width:20px;height:20px;}" ])
609
- }));
610
- // CONCATENATED MODULE: ./src/Select/SelectAllOptionStyles.ts
611
- var Ne = we()(De).withConfig({
612
- displayName: "SelectAllOptionStyles__StyledSelectAllLabel",
613
- componentId: "y6bn08-0"
614
- })([ "font-weight:", ";" ], U.variables.fontWeightBold);
615
- var Be = we()(Oe).withConfig({
616
- displayName: "SelectAllOptionStyles__StyledSelectAllOption",
617
- componentId: "y6bn08-1"
618
- })([ "padding-inline-start:", ";box-shadow:none;" ], (0, U.pick)({
619
- prisma: "42px;",
620
- enterprise: "32px;"
621
- }));
409
+ be(we, "propTypes", ge);
410
+ be(we, "defaultProps", Oe);
411
+ be(we, "type", M.Item);
412
+ /* harmony default export */ const Se = we;
622
413
  // CONCATENATED MODULE: ./src/Select/SelectAllOption.tsx
623
- var Ke = {
624
- active: i().bool,
625
- elementRef: i().oneOfType([ i().func, i().object ]),
626
- id: i().string,
627
- onClick: i().func,
628
- selectAllLabel: i().string,
629
- totalCount: i().number,
630
- changedToggle: i().bool,
631
- selected: i().oneOf([ false, true, "some" ])
414
+ var Ce = {
415
+ active: l().bool,
416
+ elementRef: l().oneOfType([ l().func, l().object ]),
417
+ id: l().string,
418
+ onClick: l().func,
419
+ selectAllLabel: l().string,
420
+ totalCount: l().number,
421
+ changedToggle: l().bool,
422
+ selected: l().oneOf([ false, true, "some" ])
632
423
  };
633
- var Fe = r().forwardRef((function(e, t) {
634
- var n = e.active, o = e.id, i = e.onClick, a = e.selectAllLabel, l = e.totalCount, c = e.changedToggle, u = e.selected;
424
+ var xe = r().forwardRef((function(e, t) {
425
+ var n = e.active, o = e.id, l = e.onClick, i = e.selectAllLabel, a = e.totalCount, u = e.changedToggle, c = e.selected;
635
426
  // When toggle is changed the total count is not displayed anymore so the count is now shown in the Select all menu item
636
- var p = c ? " (".concat(l === null || l === void 0 ? void 0 : l.toString(), ")") : "";
427
+ var s = u ? " (".concat(a === null || a === void 0 ? void 0 : a.toString(), ")") : "";
637
428
 
638
- return r().createElement(Be, {
639
- label: a,
429
+ return r().createElement(Se, {
430
+ label: i,
640
431
  value: "selectAll",
641
432
  key: "selectAll",
642
- onClick: i,
433
+ onClick: l,
643
434
  "data-test": "select-all",
644
435
  "aria-keyshortcuts": "Control+A",
645
436
  id: o,
646
437
  active: n,
647
438
  ref: t,
648
- tabIndex: -1
649
- }, r().createElement(Pe, {
650
- interactive: false,
651
- selected: u === "some" && "some" || u,
652
- key: "main-checkbox",
653
- value: "main-checkbox",
654
- appearance: "checkbox",
655
- "aria-label": !u && (0, s._)("No options selected") || u === "some" && (0, s._)("Some options selected") || (0,
656
- s._)("All options selected"),
657
- "data-test": "select-all-switch",
658
- selectedLabel: u === true ? (0, s._)("All options selected") : (0, s._)("Option selected"),
659
- unselectedLabel: u === true ? (0, s._)("No options selected") : (0, s._)("Option unselected"),
660
- someSelectedLabel: (0, s._)("Some options selected")
661
- }), r().createElement(je, {
662
- "data-test": "description"
663
- }, "".concat(p, " Ctrl-a")), r().createElement(Ve, null, r().createElement(Re, {
664
- $truncate: false
665
- }, r().createElement(Ne, {
666
- $truncate: false
667
- }, a))));
439
+ tabIndex: -1,
440
+ selected: c,
441
+ description: "".concat(s, " Ctrl-a"),
442
+ descriptionPosition: "right",
443
+ multiple: true,
444
+ role: "menuitemcheckbox"
445
+ });
668
446
  }));
669
- Fe.propTypes = Ke;
670
- /* harmony default export */ const He = Fe;
447
+ xe.propTypes = Ce;
448
+ /* harmony default export */ const ke = xe;
449
+ // CONCATENATED MODULE: external "styled-components"
450
+ const je = require("styled-components");
451
+ var Pe = e.n(je);
671
452
  // CONCATENATED MODULE: external "@splunk/react-ui/Button"
672
- const $e = require("@splunk/react-ui/Button");
673
- var ze = e.n($e);
453
+ const Ee = require("@splunk/react-ui/Button");
454
+ var Ie = e.n(Ee);
674
455
  // CONCATENATED MODULE: ./src/Select/SelectBaseStyles.ts
675
- var We = we()(ze()).withConfig({
456
+ var Te = Pe()(Ie()).withConfig({
676
457
  displayName: "SelectBaseStyles__StyledButton",
677
458
  componentId: "sc-16cj7sk-0"
678
459
  })([ "&[data-inline]{width:", ";}", "" ], (function(e) {
@@ -682,22 +463,22 @@
682
463
  var t = e.$multiple;
683
464
  return !t && "flex-grow: 0;";
684
465
  }));
685
- var Ue = we().span.withConfig({
466
+ var Ae = Pe().span.withConfig({
686
467
  displayName: "SelectBaseStyles__StyledLinkIcon",
687
468
  componentId: "sc-16cj7sk-1"
688
469
  })([ "padding-right:2px;" ]);
689
- var Ge = we().span.withConfig({
470
+ var Me = Pe().span.withConfig({
690
471
  displayName: "SelectBaseStyles__StyledLinkCaret",
691
472
  componentId: "sc-16cj7sk-2"
692
473
  })([ "padding-left:2px;" ]);
693
- var Je = we().div.withConfig({
474
+ var _e = Pe().div.withConfig({
694
475
  displayName: "SelectBaseStyles__StyledFilter",
695
476
  componentId: "sc-16cj7sk-3"
696
477
  })([ "padding:", ";min-width:160px;" ], (0, U.pick)({
697
478
  enterprise: "8px",
698
479
  prisma: "10px 16px"
699
480
  }));
700
- var Xe = we().span.withConfig({
481
+ var Ve = Pe().span.withConfig({
701
482
  displayName: "SelectBaseStyles__StyledSearchIconWrapper",
702
483
  componentId: "sc-16cj7sk-4"
703
484
  })([ "color:", ";pointer-events:none;padding:", ";" ], (0, U.pick)({
@@ -710,18 +491,18 @@
710
491
  comfortable: "0 8px",
711
492
  compact: "0 6px"
712
493
  }));
713
- var Ye = we().span.withConfig({
494
+ var qe = Pe().span.withConfig({
714
495
  displayName: "SelectBaseStyles__StyledCount",
715
496
  componentId: "sc-16cj7sk-5"
716
497
  })([ "padding-right:", ";" ], U.variables.spacingXSmall);
717
- var Qe = we()(q()).withConfig({
498
+ var Re = Pe()(D()).withConfig({
718
499
  displayName: "SelectBaseStyles__StyledControlsLink",
719
500
  componentId: "sc-16cj7sk-6"
720
501
  })([ "margin-right:20px;", ";" ], (function(e) {
721
502
  var t = e.$disabled;
722
- return t && (0, Se.css)([ "color:", ";" ], U.variables.contentColorDisabled);
503
+ return t && (0, je.css)([ "color:", ";" ], U.variables.contentColorDisabled);
723
504
  }));
724
- var Ze = we().div.withConfig({
505
+ var Le = Pe().div.withConfig({
725
506
  displayName: "SelectBaseStyles__StyledToggleAllControls",
726
507
  componentId: "sc-16cj7sk-7"
727
508
  })([ "padding:", ";", "" ], (0, U.pick)({
@@ -729,54 +510,54 @@
729
510
  prisma: "10px 16px"
730
511
  }), (0, U.pickVariant)("$placement", {
731
512
  above: {
732
- enterprise: (0, Se.css)([ "border-top:", ";" ], U.variables.border),
733
- prisma: (0, Se.css)([ "border-top:1px solid ", ";" ], U.variables.neutral200)
513
+ enterprise: (0, je.css)([ "border-top:", ";" ], U.variables.border),
514
+ prisma: (0, je.css)([ "border-top:1px solid ", ";" ], U.variables.neutral200)
734
515
  },
735
516
  below: {
736
- enterprise: (0, Se.css)([ "border-bottom:", ";" ], U.variables.border),
737
- prisma: (0, Se.css)([ "border-bottom:1px solid ", ";" ], U.variables.neutral200)
517
+ enterprise: (0, je.css)([ "border-bottom:", ";" ], U.variables.border),
518
+ prisma: (0, je.css)([ "border-bottom:1px solid ", ";" ], U.variables.neutral200)
738
519
  }
739
520
  }));
740
521
  // CONCATENATED MODULE: ./src/utils/fuzzyMatch.ts
741
522
  // A utility for matching keyboard characters to list values
742
- var et = function e(t, n) {
523
+ var De = function e(t, n) {
743
524
  return t ? t.label.charAt(n).toLowerCase() : "";
744
525
  };
745
- var tt = function e(t, n) {
526
+ var Be = function e(t, n) {
746
527
  if (!t.length) {
747
528
  return t;
748
529
  }
749
530
  var r = null;
750
531
  var o = false;
751
- var i = t.filter((function(e) {
752
- var t = et(e, n.index);
532
+ var l = t.filter((function(e) {
533
+ var t = De(e, n.index);
753
534
  if (t === n.value) {
754
535
  o = true;
755
536
  return true;
756
537
  }
757
- // If we haven't found a match yet, keep track of the next closest match.
538
+ // If we haven't found a match yet, keep track of the next closest match.
758
539
  // Secondary matching looks for the closest character of a higher value, and failing that, closest of a lower value.
759
540
  if (!o) {
760
- var i = et(r, n.index);
761
- if (!i) {
541
+ var l = De(r, n.index);
542
+ if (!l) {
762
543
  r = e;
763
544
  } else if (t > n.value) {
764
- if (i < n.value) {
545
+ if (l < n.value) {
765
546
  r = e;
766
- } else if (i > t) {
547
+ } else if (l > t) {
767
548
  r = e;
768
549
  }
769
- } else if (t > i) {
550
+ } else if (t > l) {
770
551
  r = e;
771
552
  }
772
553
  }
773
554
  return false;
774
555
  }));
775
- return i.length === 0 && r ? [ r ] : i;
556
+ return l.length === 0 && r ? [ r ] : l;
776
557
  };
777
558
  // CONCATENATED MODULE: ./src/utils/ssrDocument.ts
778
559
  /* eslint-disable @typescript-eslint/no-empty-function */
779
- var nt = {
560
+ var Ke = {
780
561
  body: {
781
562
  appendChild: function e() {
782
563
  return [];
@@ -830,14 +611,14 @@
830
611
  search: ""
831
612
  }
832
613
  };
833
- function rt() {
834
- var e = typeof document !== "undefined" ? document : nt;
614
+ function Ne() {
615
+ var e = typeof document !== "undefined" ? document : Ke;
835
616
  return e;
836
617
  }
837
618
  // CONCATENATED MODULE: ./src/utils/ssrWindow.ts
838
619
  /* eslint-disable @typescript-eslint/no-empty-function */
839
- var ot = {
840
- document: nt,
620
+ var Fe = {
621
+ document: Ke,
841
622
  navigator: {
842
623
  userAgent: ""
843
624
  },
@@ -891,267 +672,243 @@
891
672
  clearTimeout(t);
892
673
  }
893
674
  };
894
- function it() {
895
- var e = typeof window !== "undefined" ? window : ot;
675
+ function He() {
676
+ var e = typeof window !== "undefined" ? window : Fe;
896
677
  return e;
897
678
  }
898
679
  // CONCATENATED MODULE: ./src/Select/SelectBase.tsx
899
- function at() {
900
- at = Object.assign || function(e) {
680
+ function ze() {
681
+ return ze = Object.assign ? Object.assign.bind() : function(e) {
901
682
  for (var t = 1; t < arguments.length; t++) {
902
683
  var n = arguments[t];
903
684
  for (var r in n) {
904
- if (Object.prototype.hasOwnProperty.call(n, r)) {
905
- e[r] = n[r];
906
- }
685
+ ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
907
686
  }
908
687
  }
909
688
  return e;
910
- };
911
- return at.apply(this, arguments);
689
+ }, ze.apply(null, arguments);
912
690
  }
913
- function lt(e, t) {
914
- return ut(e) || ct(e, t) || dt(e, t) || st();
691
+ function $e(e, t) {
692
+ return Je(e) || Ue(e, t) || Qe(e, t) || We();
915
693
  }
916
- function st() {
694
+ function We() {
917
695
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
918
696
  }
919
- function ct(e, t) {
920
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
921
- var n = [];
922
- var r = true;
923
- var o = false;
924
- var i = undefined;
925
- try {
926
- for (var a = e[Symbol.iterator](), l; !(r = (l = a.next()).done); r = true) {
927
- n.push(l.value);
928
- if (t && n.length === t) break;
929
- }
930
- } catch (e) {
931
- o = true;
932
- i = e;
933
- } finally {
697
+ function Ue(e, t) {
698
+ var n = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
699
+ if (null != n) {
700
+ var r, o, l, i, a = [], u = !0, c = !1;
934
701
  try {
935
- if (!r && a["return"] != null) a["return"]();
702
+ if (l = (n = n.call(e)).next, 0 === t) {
703
+ if (Object(n) !== n) return;
704
+ u = !1;
705
+ } else for (;!(u = (r = l.call(n)).done) && (a.push(r.value), a.length !== t); u = !0) {
706
+ }
707
+ } catch (e) {
708
+ c = !0, o = e;
936
709
  } finally {
937
- if (o) throw i;
710
+ try {
711
+ if (!u && null != n["return"] && (i = n["return"](), Object(i) !== i)) return;
712
+ } finally {
713
+ if (c) throw o;
714
+ }
938
715
  }
716
+ return a;
939
717
  }
940
- return n;
941
718
  }
942
- function ut(e) {
719
+ function Je(e) {
943
720
  if (Array.isArray(e)) return e;
944
721
  }
945
- function pt(e) {
946
- return ht(e) || vt(e) || dt(e) || ft();
722
+ function Xe(e) {
723
+ return Ze(e) || Ye(e) || Qe(e) || Ge();
947
724
  }
948
- function ft() {
725
+ function Ge() {
949
726
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
950
727
  }
951
- function dt(e, t) {
952
- if (!e) return;
953
- if (typeof e === "string") return bt(e, t);
954
- var n = Object.prototype.toString.call(e).slice(8, -1);
955
- if (n === "Object" && e.constructor) n = e.constructor.name;
956
- if (n === "Map" || n === "Set") return Array.from(e);
957
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return bt(e, t);
728
+ function Qe(e, t) {
729
+ if (e) {
730
+ if ("string" == typeof e) return et(e, t);
731
+ var n = {}.toString.call(e).slice(8, -1);
732
+ 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) ? et(e, t) : void 0;
733
+ }
958
734
  }
959
- function vt(e) {
960
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(e)) return Array.from(e);
735
+ function Ye(e) {
736
+ if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
961
737
  }
962
- function ht(e) {
963
- if (Array.isArray(e)) return bt(e);
738
+ function Ze(e) {
739
+ if (Array.isArray(e)) return et(e);
964
740
  }
965
- function bt(e, t) {
966
- if (t == null || t > e.length) t = e.length;
967
- for (var n = 0, r = new Array(t); n < t; n++) {
741
+ function et(e, t) {
742
+ (null == t || t > e.length) && (t = e.length);
743
+ for (var n = 0, r = Array(t); n < t; n++) {
968
744
  r[n] = e[n];
969
745
  }
970
746
  return r;
971
747
  }
972
- function mt(e, t) {
973
- if (!(e instanceof t)) {
974
- throw new TypeError("Cannot call a class as a function");
975
- }
748
+ function tt(e, t) {
749
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
976
750
  }
977
- function yt(e, t) {
751
+ function nt(e, t) {
978
752
  for (var n = 0; n < t.length; n++) {
979
753
  var r = t[n];
980
- r.enumerable = r.enumerable || false;
981
- r.configurable = true;
982
- if ("value" in r) r.writable = true;
983
- Object.defineProperty(e, r.key, r);
754
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
755
+ Object.defineProperty(e, ht(r.key), r);
984
756
  }
985
757
  }
986
- function gt(e, t, n) {
987
- if (t) yt(e.prototype, t);
988
- if (n) yt(e, n);
989
- return e;
758
+ function rt(e, t, n) {
759
+ return t && nt(e.prototype, t), n && nt(e, n), Object.defineProperty(e, "prototype", {
760
+ writable: !1
761
+ }), e;
990
762
  }
991
- function Ot(e, t) {
992
- if (typeof t !== "function" && t !== null) {
993
- throw new TypeError("Super expression must either be null or a function");
994
- }
763
+ function ot(e, t) {
764
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
995
765
  e.prototype = Object.create(t && t.prototype, {
996
766
  constructor: {
997
767
  value: e,
998
- writable: true,
999
- configurable: true
768
+ writable: !0,
769
+ configurable: !0
1000
770
  }
1001
- });
1002
- if (t) St(e, t);
771
+ }), Object.defineProperty(e, "prototype", {
772
+ writable: !1
773
+ }), t && lt(e, t);
1003
774
  }
1004
- function St(e, t) {
1005
- St = Object.setPrototypeOf || function e(t, n) {
1006
- t.__proto__ = n;
1007
- return t;
1008
- };
1009
- return St(e, t);
1010
- }
1011
- function wt(e) {
1012
- var t = kt();
1013
- return function n() {
1014
- var r = It(e), o;
775
+ function lt(e, t) {
776
+ return lt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
777
+ return e.__proto__ = t, e;
778
+ }, lt(e, t);
779
+ }
780
+ function it(e) {
781
+ var t = ct();
782
+ return function() {
783
+ var n, r = st(e);
1015
784
  if (t) {
1016
- var i = It(this).constructor;
1017
- o = Reflect.construct(r, arguments, i);
1018
- } else {
1019
- o = r.apply(this, arguments);
1020
- }
1021
- return xt(this, o);
785
+ var o = st(this).constructor;
786
+ n = Reflect.construct(r, arguments, o);
787
+ } else n = r.apply(this, arguments);
788
+ return at(this, n);
1022
789
  };
1023
790
  }
1024
- function xt(e, t) {
1025
- if (t && (_t(t) === "object" || typeof t === "function")) {
1026
- return t;
1027
- }
1028
- return Ct(e);
791
+ function at(e, t) {
792
+ if (t && ("object" == pt(t) || "function" == typeof t)) return t;
793
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
794
+ return ut(e);
1029
795
  }
1030
- function Ct(e) {
1031
- if (e === void 0) {
1032
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1033
- }
796
+ function ut(e) {
797
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1034
798
  return e;
1035
799
  }
1036
- function kt() {
1037
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
1038
- if (Reflect.construct.sham) return false;
1039
- if (typeof Proxy === "function") return true;
800
+ function ct() {
1040
801
  try {
1041
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
1042
- return true;
1043
- } catch (e) {
1044
- return false;
1045
- }
802
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
803
+ } catch (e) {}
804
+ return (ct = function t() {
805
+ return !!e;
806
+ })();
1046
807
  }
1047
- function It(e) {
1048
- It = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
1049
- return t.__proto__ || Object.getPrototypeOf(t);
1050
- };
1051
- return It(e);
808
+ function st(e) {
809
+ return st = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
810
+ return e.__proto__ || Object.getPrototypeOf(e);
811
+ }, st(e);
1052
812
  }
1053
- function _t(e) {
813
+ function pt(e) {
1054
814
  "@babel/helpers - typeof";
1055
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1056
- _t = function e(t) {
1057
- return typeof t;
1058
- };
1059
- } else {
1060
- _t = function e(t) {
1061
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1062
- };
1063
- }
1064
- return _t(e);
815
+ return pt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
816
+ return typeof e;
817
+ } : function(e) {
818
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
819
+ }, pt(e);
1065
820
  }
1066
- function At(e, t) {
821
+ function ft(e, t) {
1067
822
  var n = Object.keys(e);
1068
823
  if (Object.getOwnPropertySymbols) {
1069
824
  var r = Object.getOwnPropertySymbols(e);
1070
- if (t) r = r.filter((function(t) {
825
+ t && (r = r.filter((function(t) {
1071
826
  return Object.getOwnPropertyDescriptor(e, t).enumerable;
1072
- }));
1073
- n.push.apply(n, r);
827
+ }))), n.push.apply(n, r);
1074
828
  }
1075
829
  return n;
1076
830
  }
1077
- function jt(e) {
831
+ function dt(e) {
1078
832
  for (var t = 1; t < arguments.length; t++) {
1079
- var n = arguments[t] != null ? arguments[t] : {};
1080
- if (t % 2) {
1081
- At(Object(n), true).forEach((function(t) {
1082
- Et(e, t, n[t]);
1083
- }));
1084
- } else if (Object.getOwnPropertyDescriptors) {
1085
- Object.defineProperties(e, Object.getOwnPropertyDescriptors(n));
1086
- } else {
1087
- At(Object(n)).forEach((function(t) {
1088
- Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
1089
- }));
1090
- }
833
+ var n = null != arguments[t] ? arguments[t] : {};
834
+ t % 2 ? ft(Object(n), !0).forEach((function(t) {
835
+ vt(e, t, n[t]);
836
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ft(Object(n)).forEach((function(t) {
837
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
838
+ }));
1091
839
  }
1092
840
  return e;
1093
841
  }
1094
- function Et(e, t, n) {
1095
- if (t in e) {
1096
- Object.defineProperty(e, t, {
1097
- value: n,
1098
- enumerable: true,
1099
- configurable: true,
1100
- writable: true
1101
- });
1102
- } else {
1103
- e[t] = n;
1104
- }
1105
- return e;
842
+ function vt(e, t, n) {
843
+ return (t = ht(t)) in e ? Object.defineProperty(e, t, {
844
+ value: n,
845
+ enumerable: !0,
846
+ configurable: !0,
847
+ writable: !0
848
+ }) : e[t] = n, e;
1106
849
  }
1107
- var Mt = {
1108
- allowKeyMatching: i().bool,
1109
- allowNewValues: i().bool,
1110
- animateLoading: i().bool,
1111
- appearance: i().oneOf([ "default", "link", "primary", "pill", "toggle", "flat", "subtle" ]),
1112
- append: i().bool,
1113
- children: i().node,
1114
- defaultPlacement: i().oneOf([ "above", "below", "vertical" ]),
1115
- defaultValues: i().array,
1116
- describedBy: i().string,
1117
- disabled: i().bool,
1118
- elementRef: i().oneOfType([ i().func, i().object ]),
1119
- error: i().bool,
1120
- filter: i().oneOf([ false, true, "controlled" ]),
1121
- footerMessage: i().node,
1122
- inline: i().bool,
1123
- inputId: i().string,
1124
- inputRef: i().oneOfType([ i().func, i().object ]),
1125
- isLoadingOptions: i().bool,
1126
- labelledBy: i().string,
1127
- labelText: i().string,
1128
- loadingMessage: i().node,
1129
- menuStyle: i().object,
1130
- multiple: i().bool,
1131
- name: i().string,
1132
- noOptionsMessage: i().node,
1133
- onChange: i().func,
1134
- onClose: i().func,
1135
- onFilterChange: i().func,
1136
- onOpen: i().func,
1137
- onScroll: i().func,
1138
- onScrollBottom: i().func,
850
+ function ht(e) {
851
+ var t = bt(e, "string");
852
+ return "symbol" == pt(t) ? t : t + "";
853
+ }
854
+ function bt(e, t) {
855
+ if ("object" != pt(e) || !e) return e;
856
+ var n = e[Symbol.toPrimitive];
857
+ if (void 0 !== n) {
858
+ var r = n.call(e, t || "default");
859
+ if ("object" != pt(r)) return r;
860
+ throw new TypeError("@@toPrimitive must return a primitive value.");
861
+ }
862
+ return ("string" === t ? String : Number)(e);
863
+ }
864
+ var yt = {
865
+ allowKeyMatching: l().bool,
866
+ allowNewValues: l().bool,
867
+ animateLoading: l().bool,
868
+ appearance: l().oneOf([ "default", "link", "primary", "pill", "toggle", "flat", "subtle" ]),
869
+ append: l().bool,
870
+ children: l().node,
871
+ defaultPlacement: l().oneOf([ "above", "below", "vertical" ]),
872
+ defaultValues: l().array,
873
+ describedBy: l().string,
874
+ disabled: l().bool,
875
+ elementRef: l().oneOfType([ l().func, l().object ]),
876
+ error: l().bool,
877
+ filter: l().oneOf([ false, true, "controlled" ]),
878
+ footerMessage: l().node,
879
+ inline: l().bool,
880
+ inputId: l().string,
881
+ inputRef: l().oneOfType([ l().func, l().object ]),
882
+ isLoadingOptions: l().bool,
883
+ labelledBy: l().string,
884
+ labelText: l().string,
885
+ loadingMessage: l().node,
886
+ menuStyle: l().object,
887
+ multiple: l().bool,
888
+ name: l().string,
889
+ noOptionsMessage: l().node,
890
+ onChange: l().func,
891
+ onClose: l().func,
892
+ onFilterChange: l().func,
893
+ onOpen: l().func,
894
+ onScroll: l().func,
895
+ onScrollBottom: l().func,
1139
896
  /** @private. */
1140
- required: i().bool,
1141
- placeholder: i().string,
1142
- prefixLabel: i().string,
1143
- prepend: i().bool,
1144
- repositionMode: i().oneOf([ "none", "flip" ]),
1145
- selectAllAppearance: i().oneOf([ "buttongroup", "checkbox" ]),
1146
- showSelectedValuesFirst: i().oneOf([ "nextOpen", "immediately", "never" ]),
1147
- suffixLabel: i().string,
1148
- tabConfirmsNewValue: i().bool,
1149
- toggleContent: i().oneOf([ "optionChildren", "optionLabel" ]),
1150
- values: i().array,
897
+ required: l().bool,
898
+ placeholder: l().string,
899
+ prefixLabel: l().string,
900
+ prepend: l().bool,
901
+ repositionMode: l().oneOf([ "none", "flip" ]),
902
+ selectAllAppearance: l().oneOf([ "buttongroup", "checkbox" ]),
903
+ showSelectedValuesFirst: l().oneOf([ "nextOpen", "immediately", "never" ]),
904
+ suffixLabel: l().string,
905
+ tabConfirmsNewValue: l().bool,
906
+ toggleContent: l().oneOf([ "optionChildren", "optionLabel" ]),
907
+ values: l().array,
1151
908
  /** @private. */
1152
- virtualization: i().number
909
+ virtualization: l().number
1153
910
  };
1154
- var Tt = {
911
+ var mt = {
1155
912
  allowKeyMatching: true,
1156
913
  allowNewValues: false,
1157
914
  animateLoading: false,
@@ -1164,40 +921,40 @@
1164
921
  isLoadingOptions: false,
1165
922
  menuStyle: {},
1166
923
  multiple: false,
1167
- noOptionsMessage: (0, s._)("No matches"),
1168
- placeholder: (0, s._)("Select..."),
924
+ noOptionsMessage: (0, u._)("No matches"),
925
+ placeholder: (0, u._)("Select..."),
1169
926
  prepend: false,
1170
927
  repositionMode: "flip",
1171
928
  selectAllAppearance: "buttongroup",
1172
929
  tabConfirmsNewValue: false,
1173
930
  toggleContent: "optionChildren"
1174
931
  };
1175
- var Pt = w()((function(e) {
932
+ var gt = S()((function(e) {
1176
933
  return [ e ];
1177
934
  }));
1178
- // preserve separate widths for single vs. multi mode
1179
- var Vt = w()((function(e) {
935
+ // preserve separate widths for single vs. multi mode
936
+ var Ot = S()((function(e) {
1180
937
  var t = e.anchorWidth, n = e.isMultiple, r = e.maxHeight, o = e.menuStyle;
1181
- return n ? jt({
938
+ return n ? dt({
1182
939
  width: Math.max(t !== null && t !== void 0 ? t : 0, 200),
1183
940
  maxHeight: r
1184
- }, o) : jt({
941
+ }, o) : dt({
1185
942
  minWidth: t !== null && t !== void 0 ? t : undefined,
1186
943
  maxWidth: Math.max(t !== null && t !== void 0 ? t : 0, 300),
1187
944
  maxHeight: r
1188
945
  }, o);
1189
946
  }));
1190
- var Rt = [ "clickAway", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
1191
- function Dt(e) {
1192
- return e && l()(e.props, "value");
947
+ var wt = [ "clickAway", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
948
+ function St(e) {
949
+ return e && a()(e.props, "value");
1193
950
  }
1194
- function Lt(e, t) {
1195
- return "".concat(_t(e), "-").concat(e, "-").concat(t);
951
+ function Ct(e, t) {
952
+ return "".concat(pt(e), "-").concat(e, "-").concat(t);
1196
953
  }
1197
- var qt = function(e) {
1198
- Ot(o, e);
1199
- var t = wt(o);
1200
- gt(o, null, [ {
954
+ var xt = function(e) {
955
+ ot(o, e);
956
+ var t = it(o);
957
+ rt(o, null, [ {
1201
958
  key: "validateAppearance",
1202
959
  // @docs-props-type CompactPropsBase
1203
960
  value: function e(t) {
@@ -1205,612 +962,602 @@
1205
962
  }
1206
963
  } ]);
1207
964
  function o(e) {
1208
- var i;
1209
- mt(this, o);
1210
- i = t.call(this, e);
1211
- Et(Ct(i), "activeItemId", void 0);
1212
- Et(Ct(i), "activeValue", void 0);
1213
- Et(Ct(i), "availableOptionCount", void 0);
1214
- Et(Ct(i), "controlledExternally", void 0);
1215
- Et(Ct(i), "displayedValues", void 0);
1216
- Et(Ct(i), "dropdown", null);
1217
- Et(Ct(i), "firstSelectedEnabledOption", null);
1218
- Et(Ct(i), "firstSelectedOptionIndex", void 0);
1219
- Et(Ct(i), "menuId", void 0);
1220
- Et(Ct(i), "menuListboxId", void 0);
1221
- Et(Ct(i), "previousActiveIndex", null);
1222
- Et(Ct(i), "selectedOptionCount", void 0);
1223
- Et(Ct(i), "optionRefsByKey", void 0);
1224
- Et(Ct(i), "matchCharacter", void 0);
1225
- Et(Ct(i), "matchTimeout", void 0);
1226
- Et(Ct(i), "currentMatchOptions", void 0);
1227
- Et(Ct(i), "availableMatchOptions", void 0);
1228
- Et(Ct(i), "optionSelection", void 0);
1229
- Et(Ct(i), "resetMatches", (function() {
1230
- i.matchCharacter = null;
1231
- i.currentMatchOptions = [];
1232
- if (i.matchTimeout) {
1233
- clearTimeout(i.matchTimeout);
965
+ var l;
966
+ tt(this, o);
967
+ l = t.call(this, e);
968
+ vt(ut(l), "activeItemId", void 0);
969
+ vt(ut(l), "activeValue", void 0);
970
+ vt(ut(l), "availableOptionCount", void 0);
971
+ vt(ut(l), "controlledExternally", void 0);
972
+ vt(ut(l), "displayedValues", void 0);
973
+ vt(ut(l), "dropdown", null);
974
+ vt(ut(l), "firstSelectedEnabledOption", null);
975
+ vt(ut(l), "firstSelectedOptionIndex", void 0);
976
+ vt(ut(l), "menuListboxId", void 0);
977
+ vt(ut(l), "previousActiveIndex", null);
978
+ vt(ut(l), "selectedOptionCount", void 0);
979
+ vt(ut(l), "optionRefsByKey", void 0);
980
+ vt(ut(l), "matchCharacter", void 0);
981
+ vt(ut(l), "matchTimeout", void 0);
982
+ vt(ut(l), "currentMatchOptions", void 0);
983
+ vt(ut(l), "availableMatchOptions", void 0);
984
+ vt(ut(l), "optionSelection", void 0);
985
+ vt(ut(l), "resetMatches", (function() {
986
+ l.matchCharacter = null;
987
+ l.currentMatchOptions = [];
988
+ if (l.matchTimeout) {
989
+ clearTimeout(l.matchTimeout);
1234
990
  }
1235
991
  }));
1236
- Et(Ct(i), "handleSelectAll", (function(e) {
992
+ vt(ut(l), "handleSelectAll", (function(e) {
1237
993
  var t, n, o;
1238
- var a = i.props, l = a.name, s = a.children, c = a.multiple;
994
+ var i = l.props, a = i.name, u = i.children, c = i.multiple;
1239
995
  // this doesn't make sense if we can't select multiple values
1240
996
  if (!c) {
1241
997
  return;
1242
998
  }
1243
- var u = (t = i.getCurrentValues()) !== null && t !== void 0 ? t : [];
1244
- var p = A()(u.concat(i.displayedValues));
1245
- p = r().Children.toArray(s).filter((function(e) {
1246
- return Dt(e) && b()(p, e.props.value) && (!e.props.disabled || b()(u, e.props.value));
999
+ var s = (t = l.getCurrentValues()) !== null && t !== void 0 ? t : [];
1000
+ var p = E()(s.concat(l.displayedValues));
1001
+ p = r().Children.toArray(u).filter((function(e) {
1002
+ return St(e) && b()(p, e.props.value) && (!e.props.disabled || b()(s, e.props.value));
1247
1003
  })).map((function(e) {
1248
1004
  return e.props.value;
1249
1005
  }));
1250
- if (!i.isControlled()) {
1251
- i.setState({
1006
+ if (!l.isControlled()) {
1007
+ l.setState({
1252
1008
  values: p
1253
1009
  });
1254
1010
  }
1255
- (n = (o = i.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
1011
+ (n = (o = l.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
1256
1012
  values: p,
1257
- name: l,
1013
+ name: a,
1258
1014
  reason: "selectAll"
1259
1015
  });
1260
1016
  }));
1261
- Et(Ct(i), "handleClearAll", (function(e) {
1017
+ vt(ut(l), "handleClearAll", (function(e) {
1262
1018
  var t, n, o;
1263
- var a = i.props, l = a.name, s = a.children, c = a.multiple;
1019
+ var i = l.props, a = i.name, u = i.children, c = i.multiple;
1264
1020
  // this doesn't make sense if we can't select multiple values
1265
1021
  if (!c) {
1266
1022
  return;
1267
1023
  }
1268
- var u = (t = i.getCurrentValues()) !== null && t !== void 0 ? t : [];
1269
- var p = E().apply(void 0, [ u ].concat(pt(i.displayedValues)));
1270
- // this will unselect all selected values unless those values are disabled or hidden by the filter
1271
- var f = r().Children.toArray(s).filter((function(e) {
1272
- return Dt(e) && (b()(u, e.props.value) && e.props.disabled || b()(p, e.props.value));
1024
+ var s = (t = l.getCurrentValues()) !== null && t !== void 0 ? t : [];
1025
+ var p = T().apply(void 0, [ s ].concat(Xe(l.displayedValues)));
1026
+ // this will unselect all selected values unless those values are disabled or hidden by the filter
1027
+ var f = r().Children.toArray(u).filter((function(e) {
1028
+ return St(e) && (b()(s, e.props.value) && e.props.disabled || b()(p, e.props.value));
1273
1029
  })).map((function(e) {
1274
1030
  return e.props.value;
1275
1031
  }));
1276
- if (!i.isControlled()) {
1277
- i.setState({
1032
+ if (!l.isControlled()) {
1033
+ l.setState({
1278
1034
  values: f
1279
1035
  });
1280
1036
  }
1281
- (n = (o = i.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
1037
+ (n = (o = l.props).onChange) === null || n === void 0 ? void 0 : n.call(o, e, {
1282
1038
  values: f,
1283
- name: l,
1039
+ name: a,
1284
1040
  reason: "clearAll"
1285
1041
  });
1286
1042
  }));
1287
- Et(Ct(i), "handleTextKeyDown", (function(e) {
1288
- var t = i.props, r = t.children, o = t.onScrollBottom, a = t.tabConfirmsNewValue;
1289
- var l = (0, R.keycode)(e.nativeEvent);
1290
- if (l === "tab") {
1291
- if (a && !y()(i.activeValue) && i.availableOptionCount <= 1) {
1043
+ vt(ut(l), "handleTextKeyDown", (function(e) {
1044
+ var t = l.props, r = t.children, o = t.onScrollBottom, i = t.tabConfirmsNewValue;
1045
+ var a = (0, q.keycode)(e.nativeEvent);
1046
+ if (a === "tab") {
1047
+ if (i && !m()(l.activeValue) && l.availableOptionCount <= 1) {
1292
1048
  e.preventDefault();
1293
- i.toggleValue(e, i.activeValue);
1049
+ l.toggleValue(e, l.activeValue);
1294
1050
  }
1295
1051
  }
1296
1052
  if (e.shiftKey || e.metaKey || e.ctrlKey) {
1297
- if (l === "a" && (e.ctrlKey || e.metaKey)) {
1053
+ if (a === "a" && (e.ctrlKey || e.metaKey)) {
1298
1054
  // handle control + A
1299
- if (i.optionSelection === "all") {
1300
- i.handleClearAll(e);
1055
+ if (l.optionSelection === "all") {
1056
+ l.handleClearAll(e);
1301
1057
  } else {
1302
- i.handleSelectAll(e);
1058
+ l.handleSelectAll(e);
1303
1059
  }
1304
1060
  }
1305
1061
  return;
1306
1062
  }
1307
- if (l === "down") {
1063
+ if (a === "down") {
1308
1064
  e.preventDefault();
1309
- i.setState((function(e) {
1065
+ l.setState((function(e) {
1310
1066
  return {
1311
- activeIndex: Math.min(e.activeIndex + 1, i.props.selectAllAppearance === "checkbox" ? i.availableOptionCount : i.availableOptionCount - 1)
1067
+ activeIndex: Math.min(e.activeIndex + 1, l.props.selectAllAppearance === "checkbox" ? l.availableOptionCount : l.availableOptionCount - 1)
1312
1068
  };
1313
1069
  }));
1314
1070
  if (r && o) {
1315
- var s;
1316
- var c = n.Children.toArray(r).length - (2 + ((s = i.getCurrentValues()) !== null && s !== void 0 ? s : []).length);
1317
- if (i.state.activeIndex === c) {
1318
- i.handleScrollBottom(e);
1071
+ var u;
1072
+ var c = n.Children.toArray(r).length - (2 + ((u = l.getCurrentValues()) !== null && u !== void 0 ? u : []).length);
1073
+ if (l.state.activeIndex === c) {
1074
+ l.handleScrollBottom(e);
1319
1075
  }
1320
1076
  }
1321
1077
  }
1322
- if (l === "up") {
1078
+ if (a === "up") {
1323
1079
  e.preventDefault();
1324
- i.setState((function(e) {
1080
+ l.setState((function(e) {
1325
1081
  return {
1326
1082
  activeIndex: Math.max(e.activeIndex - 1, 0)
1327
1083
  };
1328
1084
  }));
1329
1085
  }
1330
- if (l === "enter" && !y()(i.activeValue) && i.state.open) {
1331
- if (i.activeValue === "selectAll") {
1332
- if (i.optionSelection === "all") {
1333
- i.handleClearAll(e);
1086
+ if (a === "enter" && !m()(l.activeValue) && l.state.open) {
1087
+ if (l.activeValue === "selectAll") {
1088
+ if (l.optionSelection === "all") {
1089
+ l.handleClearAll(e);
1334
1090
  } else {
1335
- i.handleSelectAll(e);
1091
+ l.handleSelectAll(e);
1336
1092
  }
1337
1093
  } else {
1338
1094
  e.preventDefault();
1339
- i.toggleValue(e, i.activeValue);
1095
+ l.toggleValue(e, l.activeValue);
1340
1096
  }
1341
1097
  }
1342
1098
  }));
1343
- Et(Ct(i), "handleMenuOptionClick", (function(e, t) {
1099
+ vt(ut(l), "handleMenuOptionClick", (function(e, t) {
1344
1100
  var n = t.value;
1345
1101
  e.preventDefault();
1346
- if (!i.state.open) {
1102
+ if (!l.state.open) {
1347
1103
  return;
1348
1104
  }
1349
- i.toggleValue(e, n);
1105
+ l.toggleValue(e, n);
1350
1106
  }));
1351
- Et(Ct(i), "handleMenuOptionKeyDown", (function(e, t) {
1107
+ vt(ut(l), "handleMenuOptionKeyDown", (function(e, t) {
1352
1108
  var n = e.nativeEvent.key;
1353
- // Checking for a single character to avoid complications from double-byte languages and emojis.
1109
+ // Checking for a single character to avoid complications from double-byte languages and emojis.
1354
1110
  if (n.length === 1) {
1355
1111
  var r = [];
1356
1112
  var o = {
1357
1113
  index: 0,
1358
1114
  value: n
1359
1115
  };
1360
- if (!i.matchCharacter) {
1116
+ if (!l.matchCharacter) {
1361
1117
  if (n === " ") {
1362
- i.resetMatches();
1118
+ l.resetMatches();
1363
1119
  return;
1364
1120
  }
1365
- r = tt(i.availableMatchOptions, o);
1366
- } else if (i.currentMatchOptions.length > 1) {
1367
- o.index = i.matchCharacter.index + 1;
1368
- r = tt(i.currentMatchOptions, o);
1121
+ r = Be(l.availableMatchOptions, o);
1122
+ } else if (l.currentMatchOptions.length > 1) {
1123
+ o.index = l.matchCharacter.index + 1;
1124
+ r = Be(l.currentMatchOptions, o);
1369
1125
  }
1370
1126
  if (r.length) {
1371
- var a = 0;
1372
- // If the active option is a first character match, cycle to the next matching option.
1127
+ var i = 0;
1128
+ // If the active option is a first character match, cycle to the next matching option.
1373
1129
  if (o.index === 0 && r.length > 1) {
1374
- var l = r.indexOf(i.availableMatchOptions[t]);
1375
- if (l >= 0) {
1376
- a = l === r.length - 1 ? 0 : l + 1;
1130
+ var a = r.indexOf(l.availableMatchOptions[t]);
1131
+ if (a >= 0) {
1132
+ i = a === r.length - 1 ? 0 : a + 1;
1377
1133
  }
1378
1134
  }
1379
- var s = r[a];
1380
- var c = i.optionRefsByKey[Lt(s.value, s.label)];
1135
+ var u = r[i];
1136
+ var c = l.optionRefsByKey[Ct(u.value, u.label)];
1381
1137
  if (c != null) {
1382
- var u;
1383
- (u = c.focus) === null || u === void 0 ? void 0 : u.call(c);
1138
+ var s;
1139
+ (s = c.focus) === null || s === void 0 ? void 0 : s.call(c);
1384
1140
  }
1385
1141
  }
1386
- i.currentMatchOptions = r;
1387
- i.matchCharacter = o;
1388
- if (i.matchTimeout) {
1389
- clearTimeout(i.matchTimeout);
1142
+ l.currentMatchOptions = r;
1143
+ l.matchCharacter = o;
1144
+ if (l.matchTimeout) {
1145
+ clearTimeout(l.matchTimeout);
1390
1146
  }
1391
- i.matchTimeout = setTimeout(i.resetMatches, 500);
1147
+ l.matchTimeout = setTimeout(l.resetMatches, 500);
1392
1148
  e.preventDefault();
1393
1149
  e.stopPropagation();
1394
1150
  }
1395
1151
  }));
1396
- Et(Ct(i), "handleTextChange", (function(e, t) {
1152
+ vt(ut(l), "handleTextChange", (function(e, t) {
1397
1153
  var n, r;
1398
1154
  var o = t.value;
1399
- i.setState({
1155
+ l.setState({
1400
1156
  filterKeyword: o,
1401
1157
  open: true,
1402
1158
  activeIndex: 0
1403
1159
  });
1404
- (n = (r = i.props).onFilterChange) === null || n === void 0 ? void 0 : n.call(r, e, {
1160
+ (n = (r = l.props).onFilterChange) === null || n === void 0 ? void 0 : n.call(r, e, {
1405
1161
  keyword: o
1406
1162
  });
1407
1163
  }));
1408
- Et(Ct(i), "handleTextFocus", (function() {
1409
- i.setState({
1164
+ vt(ut(l), "handleTextFocus", (function() {
1165
+ l.setState({
1410
1166
  textHasFocus: true
1411
1167
  });
1412
1168
  }));
1413
- Et(Ct(i), "handleTextBlur", (function() {
1414
- i.setState({
1169
+ vt(ut(l), "handleTextBlur", (function() {
1170
+ l.setState({
1415
1171
  textHasFocus: false
1416
1172
  });
1417
1173
  }));
1418
- Et(Ct(i), "handleRequestOpen", (function(e) {
1174
+ vt(ut(l), "handleRequestOpen", (function(e) {
1419
1175
  var t = {
1420
1176
  open: true,
1421
- topValues: i.getTopValues()
1177
+ topValues: l.getTopValues()
1422
1178
  };
1423
- // SUI-3234: preserve existing behavior difference between <Select> and <Multiselect.Compact>
1424
- if (i.props.multiple) {
1179
+ // SUI-3234: preserve existing behavior difference between <Select> and <Multiselect.Compact>
1180
+ if (l.props.multiple) {
1425
1181
  t.filterKeyword = "";
1426
1182
  }
1427
- var n = i.state.filterKeyword;
1428
- i.setState(t, (function() {
1183
+ var n = l.state.filterKeyword;
1184
+ l.setState(t, (function() {
1429
1185
  var t, r;
1430
- (t = (r = i.props).onOpen) === null || t === void 0 ? void 0 : t.call(r);
1431
- if (i.firstSelectedEnabledOption && !i.hasFilter()) {
1432
- i.firstSelectedEnabledOption.focus();
1186
+ (t = (r = l.props).onOpen) === null || t === void 0 ? void 0 : t.call(r);
1187
+ if (l.firstSelectedEnabledOption && !l.hasFilter()) {
1188
+ l.firstSelectedEnabledOption.focus();
1433
1189
  } else {
1434
1190
  var o;
1435
- i.setState({
1436
- activeIndex: (o = i.firstSelectedOptionIndex) !== null && o !== void 0 ? o : 0
1191
+ l.setState({
1192
+ activeIndex: (o = l.firstSelectedOptionIndex) !== null && o !== void 0 ? o : 0
1437
1193
  });
1438
1194
  }
1439
- if (n !== i.state.filterKeyword) {
1440
- var a, l;
1441
- (a = (l = i.props).onFilterChange) === null || a === void 0 ? void 0 : a.call(l, e, {
1442
- keyword: i.state.filterKeyword
1195
+ if (n !== l.state.filterKeyword) {
1196
+ var i, a;
1197
+ (i = (a = l.props).onFilterChange) === null || i === void 0 ? void 0 : i.call(a, e, {
1198
+ keyword: l.state.filterKeyword
1443
1199
  });
1444
1200
  }
1445
1201
  }));
1446
1202
  }));
1447
- Et(Ct(i), "handleRequestClose", (function() {
1448
- i.setState({
1203
+ vt(ut(l), "handleRequestClose", (function() {
1204
+ l.setState({
1449
1205
  open: false,
1450
1206
  activeIndex: 0
1451
1207
  }, (function() {
1452
1208
  var e, t;
1453
- i.previousActiveIndex = null;
1454
- (e = (t = i.props).onClose) === null || e === void 0 ? void 0 : e.call(t);
1209
+ l.previousActiveIndex = null;
1210
+ (e = (t = l.props).onClose) === null || e === void 0 ? void 0 : e.call(t);
1455
1211
  }));
1456
1212
  }));
1457
- Et(Ct(i), "handleScrollBottom", (function(e) {
1458
- if (i.state.open && !i.props.isLoadingOptions) {
1213
+ vt(ut(l), "handleScrollBottom", (function(e) {
1214
+ if (l.state.open && !l.props.isLoadingOptions) {
1459
1215
  var t, n;
1460
- (t = (n = i.props).onScrollBottom) === null || t === void 0 ? void 0 : t.call(n, e);
1216
+ (t = (n = l.props).onScrollBottom) === null || t === void 0 ? void 0 : t.call(n, e);
1461
1217
  }
1462
1218
  }));
1463
- Et(Ct(i), "handleActiveOptionMount", (function(e) {
1464
- if (i.previousActiveIndex !== i.state.activeIndex) {
1219
+ vt(ut(l), "handleActiveOptionMount", (function(e) {
1220
+ if (l.previousActiveIndex !== l.state.activeIndex) {
1465
1221
  e === null || e === void 0 ? void 0 : e.scrollIntoViewIfNeeded();
1466
1222
  }
1467
1223
  }));
1468
- Et(Ct(i), "handleOptionMount", (function(e, t, n) {
1224
+ vt(ut(l), "handleOptionMount", (function(e, t, n) {
1469
1225
  if (n) {
1470
- i.firstSelectedEnabledOption = e;
1226
+ l.firstSelectedEnabledOption = e;
1471
1227
  }
1472
1228
  if (e == null) {
1473
- delete i.optionRefsByKey[t];
1229
+ delete l.optionRefsByKey[t];
1474
1230
  } else {
1475
- i.optionRefsByKey[t] = e;
1231
+ l.optionRefsByKey[t] = e;
1476
1232
  }
1477
1233
  }));
1478
- Et(Ct(i), "createToggle", (function() {
1234
+ vt(ut(l), "createToggle", (function() {
1479
1235
  var e;
1480
- var t = i.props, a = t.toggle, l = t.appearance, c = t.children, u = t.describedBy, p = t.disabled, d = t.elementRef, v = t.error, h = t.inline, b = t.labelledBy, m = t.labelText, y = t.multiple, g = t.placeholder, S = t.prefixLabel, w = t.required, x = t.suffixLabel, k = t.toggleContent;
1481
- var _;
1482
- var A;
1483
- var j = [];
1484
- // Generate buttonLabels
1485
- var E = (e = i.getCurrentValues()) !== null && e !== void 0 ? e : [];
1486
- var M = n.Children.toArray(c);
1487
- var T = E.reduce((function(e, t, n, r) {
1488
- var o = f()(M, (function(e) {
1489
- return Dt(e) && e.props.value === t;
1236
+ var t = l.props, i = t.toggle, a = t.appearance, c = t.children, s = t.describedBy, p = t.disabled, d = t.elementRef, v = t.error, h = t.inline, b = t.labelledBy, y = t.labelText, m = t.multiple, g = t.placeholder, w = t.prefixLabel, S = t.required, C = t.suffixLabel, k = t.toggleContent;
1237
+ var P;
1238
+ var E;
1239
+ var I = [];
1240
+ // Generate buttonLabels
1241
+ var T = (e = l.getCurrentValues()) !== null && e !== void 0 ? e : [];
1242
+ var A = n.Children.toArray(c);
1243
+ var M = T.reduce((function(e, t, n, r) {
1244
+ var o = f()(A, (function(e) {
1245
+ return St(e) && e.props.value === t;
1490
1246
  }));
1491
1247
  if (o) {
1492
- var i = k !== "optionLabel" && o.props.children ? o.props.children : o.props.label;
1493
- e.push(i);
1494
- j.push(o.props.label);
1495
- // if not in multiple mode, add the icon
1496
- if (!y && E.length === 1) {
1497
- _ = o.props.icon;
1248
+ var l = k !== "optionLabel" && o.props.children ? o.props.children : o.props.label;
1249
+ e.push(l);
1250
+ I.push(o.props.label);
1251
+ // if not in multiple mode, add the icon
1252
+ if (!m && T.length === 1) {
1253
+ P = o.props.icon;
1498
1254
  }
1499
- } else if (y) {
1255
+ } else if (m) {
1500
1256
  // only add values that don't match an option in "multiple" mode to preserve old behaviour
1501
1257
  e.push(t);
1502
- j.push(t.toString());
1258
+ I.push(t.toString());
1503
1259
  }
1504
1260
  if (n < r.length - 1) {
1505
- e.push((0, s._)(", "));
1506
- j.push((0, s._)(", "));
1261
+ e.push((0, u._)(", "));
1262
+ I.push((0, u._)(", "));
1507
1263
  }
1508
1264
  return e;
1509
1265
  }), []);
1510
- A = T;
1511
- // only apply prefix / suffix if the label is not empty
1512
- if (A.length > 0) {
1513
- A = i.wrapLabel({
1514
- prefixLabel: S,
1515
- label: A,
1516
- suffixLabel: x
1266
+ E = M;
1267
+ // only apply prefix / suffix if the label is not empty
1268
+ if (E.length > 0) {
1269
+ // If there's more than one item selected, read out the selected total
1270
+ // rather than reading out each selected item
1271
+ I = l.wrapLabel({
1272
+ prefixLabel: w,
1273
+ label: E.length > 1 ? [ "".concat(T.length, " items selected") ] : I,
1274
+ suffixLabel: C
1275
+ });
1276
+ E = l.wrapLabel({
1277
+ prefixLabel: w,
1278
+ label: E,
1279
+ suffixLabel: C
1517
1280
  });
1518
1281
  }
1519
- // single <Select> behaviour is to show the placeholder if all parts of the the label
1282
+ // single <Select> behaviour is to show the placeholder if all parts of the label
1520
1283
  // are empty strings so we replicate this behaviour here
1521
- if (A.length === 0 || !y && A.every((function(e) {
1284
+ if (E.length === 0 || !m && E.every((function(e) {
1522
1285
  return e === "";
1523
1286
  }))) {
1524
- A = Pt(g);
1525
- // placeholder has a default value so will not be undefined
1526
- j = Pt(g);
1527
- }
1528
- // If there's more than one item selected, read out the selected total
1529
- // rather than reading out each selected item
1530
- if (A.length > 1) {
1531
- j = i.wrapLabel({
1532
- prefixLabel: S,
1533
- label: [ "".concat(E.length, " items selected") ],
1534
- suffixLabel: x
1535
- });
1536
- } else {
1537
- j = i.wrapLabel({
1538
- prefixLabel: S,
1539
- label: j,
1540
- suffixLabel: x
1541
- });
1287
+ E = gt(g);
1288
+ I = E;
1542
1289
  }
1543
- var P = jt({
1544
- "aria-describedby": u,
1545
- "aria-label": "".concat(m ? "".concat(m, ", ") : "").concat(j.join("")),
1546
- "aria-labelledby": m ? undefined : b,
1547
- "aria-required": w,
1548
- "data-select-appearance": l,
1549
- "data-test": y ? "multiselect" : "select",
1290
+ var _ = dt({
1291
+ "aria-describedby": s,
1292
+ "aria-label": "".concat(y ? "".concat(y, ", ") : "").concat(I.join("")),
1293
+ "aria-labelledby": b,
1294
+ // aria-labelledby takes precedence over aria-label if exists
1295
+ "aria-required": S,
1296
+ "data-select-appearance": a,
1297
+ "data-test": m ? "multiselect" : "select",
1298
+ role: "combobox",
1550
1299
  disabled: p,
1551
1300
  elementRef: d,
1552
1301
  error: v
1553
- }, C()(i.props, O()(o.propTypes)));
1554
- if (y) {
1555
- P["data-test-values"] = JSON.stringify(E);
1302
+ }, x()(l.props, O()(o.propTypes)));
1303
+ if (m) {
1304
+ _["data-test-values"] = JSON.stringify(T);
1556
1305
  } else {
1557
- var V = lt(E, 1), R = V[0];
1558
- P["data-test-value"] = R;
1306
+ var V = $e(T, 1), q = V[0];
1307
+ _["data-test-value"] = q;
1559
1308
  }
1560
- if (a) {
1309
+ if (i) {
1561
1310
 
1562
- return (0, n.cloneElement)(a, P);
1311
+ return (0, n.cloneElement)(i, _);
1563
1312
  }
1564
- if (l === "link") {
1313
+ if (a === "link") {
1565
1314
 
1566
- return r().createElement(q(), at({}, P, {
1315
+ return r().createElement(D(), ze({}, _, {
1567
1316
  "data-select-appearance": "link"
1568
- }), !!_ && r().createElement(Ue, null, _), A || g, r().createElement(Ge, null, r().createElement(J, null)));
1317
+ }), !!P && r().createElement(Ae, null, P), E || g, r().createElement(Me, null, r().createElement(X, null)));
1569
1318
  }
1570
1319
 
1571
- return r().createElement(We, at({}, P, {
1572
- $multiple: y,
1573
- appearance: l,
1574
- label: A,
1320
+ return r().createElement(Te, ze({}, _, {
1321
+ $multiple: m,
1322
+ appearance: a,
1323
+ label: E,
1575
1324
  error: v,
1576
- icon: _,
1325
+ icon: P,
1577
1326
  inline: h,
1578
1327
  isMenu: true,
1579
- "aria-haspopup": "listbox",
1580
- "aria-owns": i.menuId,
1581
- onClick: i.props.onClick
1582
- }, I()(i.props, o.invalidLinkAppearanceProps)), !!E.length && y && r().createElement(Ye, {
1328
+ onClick: l.props.onClick
1329
+ }, j()(l.props, o.invalidLinkAppearanceProps)), !!T.length && m && r().createElement(qe, {
1583
1330
  "data-role": "count"
1584
- }, "(", E.length, ")"));
1331
+ }, "(", T.length, ")"));
1585
1332
  }));
1586
- Et(Ct(i), "createChildren", (function() {
1587
- var e = i.state, t = e.filterKeyword, o = e.textHasFocus, a = e.topValues;
1588
- var l = i.props, c = l.allowKeyMatching, u = l.allowNewValues, p = l.filter, d = l.multiple, h = l.selectAllAppearance, b = l.showSelectedValuesFirst, m = l.isLoadingOptions, y = l.onScrollBottom;
1589
- var g = i.getCurrentValues();
1590
- i.availableOptionCount = 0;
1591
- i.firstSelectedOptionIndex = undefined;
1592
- i.selectedOptionCount = 0;
1593
- i.activeValue = undefined;
1594
- i.availableMatchOptions = [];
1333
+ vt(ut(l), "createChildren", (function() {
1334
+ var e = l.state, t = e.filterKeyword, o = e.textHasFocus, i = e.topValues;
1335
+ var a = l.props, c = a.allowKeyMatching, s = a.allowNewValues, p = a.filter, d = a.multiple, h = a.selectAllAppearance, b = a.showSelectedValuesFirst, y = a.isLoadingOptions, m = a.onScrollBottom;
1336
+ var g = l.getCurrentValues();
1337
+ l.availableOptionCount = 0;
1338
+ l.firstSelectedOptionIndex = undefined;
1339
+ l.selectedOptionCount = 0;
1340
+ l.activeValue = undefined;
1341
+ l.availableMatchOptions = [];
1595
1342
  var O;
1596
- var S = 0;
1597
- var w = false;
1598
- // used to avoid overwriting the selected item ref in multiple mode
1599
- var x;
1600
- var C = b === "immediately" ? i.getTopValues() : a;
1601
- var k = n.Children.toArray(i.props.children).reduce((function(e, t, o) {
1343
+ var w = 0;
1344
+ var S = false;
1345
+ // used to avoid overwriting the selected item ref in multiple mode
1346
+ var C;
1347
+ var x = b === "immediately" ? l.getTopValues() : i;
1348
+ var k = n.Children.toArray(l.props.children).reduce((function(e, t, o) {
1602
1349
  // ignore Headings and Dividers
1603
- if (!Dt(t)) {
1350
+ if (!St(t)) {
1604
1351
  e.push(t);
1605
1352
  return e;
1606
1353
  }
1607
- // Find out if the search string exactly matches a value
1608
- if (t.props.value === i.state.filterKeyword) {
1354
+ // Find out if the search string exactly matches a value
1355
+ if (t.props.value === l.state.filterKeyword) {
1609
1356
  O = true;
1610
1357
  }
1611
- var a = g && g.indexOf(t.props.value) >= 0;
1612
- var l = !!a && !t.props.disabled && !x;
1613
- var s = c && !d && !p && !m && !y;
1614
- var u = Lt(t.props.value, t.props.label);
1358
+ var i = g && g.indexOf(t.props.value) >= 0;
1359
+ var a = !!i && !t.props.disabled && !C;
1360
+ var u = c && !d && !p && !y && !m;
1361
+ var s = Ct(t.props.value, t.props.label);
1615
1362
  var f = -1;
1616
- if (s && !t.props.disabled && !t.props.hidden) {
1617
- i.availableMatchOptions.push({
1363
+ if (u && !t.props.disabled && !t.props.hidden) {
1364
+ l.availableMatchOptions.push({
1618
1365
  label: t.props.label,
1619
1366
  value: t.props.value
1620
1367
  });
1621
- f = i.availableMatchOptions.length - 1;
1368
+ f = l.availableMatchOptions.length - 1;
1622
1369
  }
1623
- // Format the Menu.Item
1370
+ // Format the Menu.Item
1624
1371
  var v = (0, n.cloneElement)(t, {
1625
1372
  key: t.key || o,
1626
- onClick: i.handleMenuOptionClick,
1627
- onKeyDown: s ? function(e) {
1628
- return i.handleMenuOptionKeyDown(e, f);
1373
+ onClick: l.handleMenuOptionClick,
1374
+ onKeyDown: u ? function(e) {
1375
+ return l.handleMenuOptionKeyDown(e, f);
1629
1376
  } : undefined,
1630
- selected: a,
1377
+ selected: i,
1631
1378
  multiple: d,
1632
1379
  role: "option",
1633
1380
  ref: function e(t) {
1634
- return i.handleOptionMount(t, u, l);
1381
+ return l.handleOptionMount(t, s, a);
1635
1382
  }
1636
1383
  });
1637
- if (l) {
1638
- x = true;
1384
+ if (a) {
1385
+ C = true;
1639
1386
  }
1640
- if (C && C.indexOf(t.props.value) >= 0) {
1641
- if (S === 0) {
1642
- e.splice(S, 0, r().createElement(T.Divider, {
1387
+ if (x && x.indexOf(t.props.value) >= 0) {
1388
+ if (w === 0) {
1389
+ e.splice(w, 0, r().createElement(M.Divider, {
1643
1390
  key: "topDivider"
1644
1391
  }));
1645
- w = true;
1392
+ S = true;
1646
1393
  }
1647
- e.splice(S, 0, v);
1648
- S += 1;
1394
+ e.splice(w, 0, v);
1395
+ w += 1;
1649
1396
  } else {
1650
1397
  e.push(v);
1651
1398
  }
1652
1399
  return e;
1653
1400
  }), []);
1654
- // In multiple mode, add missing items
1401
+ // In multiple mode, add missing items
1655
1402
  if (d) {
1656
1403
  v()(g, (function(e) {
1657
1404
  var t = f()(k, (function(t) {
1658
- return Dt(t) && t.props && t.props.value === e;
1405
+ return St(t) && t.props && t.props.value === e;
1659
1406
  }));
1660
1407
  if (!t) {
1661
- if (e === i.state.filterKeyword) {
1408
+ if (e === l.state.filterKeyword) {
1662
1409
  O = true;
1663
1410
  }
1664
- var n = C && C.indexOf(e) >= 0;
1665
- var o = C.length;
1666
- if (S === 0) {
1667
- k.splice(0, 0, r().createElement(T.Divider, {
1411
+ var n = x && x.indexOf(e) >= 0;
1412
+ var o = x.length;
1413
+ if (w === 0) {
1414
+ k.splice(0, 0, r().createElement(M.Divider, {
1668
1415
  key: "topDivider"
1669
1416
  }));
1670
- S += 1;
1671
- w = true;
1417
+ w += 1;
1418
+ S = true;
1672
1419
  }
1673
- k.splice(n ? 0 : o + 1, 0, r().createElement(Oe, {
1420
+ k.splice(n ? 0 : o + 1, 0, r().createElement(Se, {
1674
1421
  label: String(e),
1675
1422
  value: e,
1676
1423
  key: "missing-value-".concat(e),
1677
- onClick: i.handleMenuOptionClick,
1424
+ onClick: l.handleMenuOptionClick,
1678
1425
  multiple: d,
1679
1426
  selected: true
1680
1427
  }));
1681
1428
  if (n) {
1682
- S += 1;
1429
+ w += 1;
1683
1430
  }
1684
1431
  }
1685
1432
  }));
1686
1433
  }
1687
- var I = p === "controlled";
1688
- // Filter the items
1689
- var _ = (0, D.stringToKeywords)(t);
1690
- k = I ? k : k.filter((function(e) {
1691
- if (Dt(e)) {
1692
- return (0, D.testPhrase)(e.props.label, _);
1434
+ var j = p === "controlled";
1435
+ // Filter the items
1436
+ var P = (0, R.stringToKeywords)(t);
1437
+ k = j ? k : k.filter((function(e) {
1438
+ if (St(e)) {
1439
+ return (0, R.testPhrase)(e.props.label, P);
1693
1440
  }
1694
1441
  return true;
1695
1442
  // Keep all headers and non-interactive options
1696
1443
  })).map((function(e) {
1697
- if (!Dt(e)) {
1444
+ if (!St(e)) {
1698
1445
  return e;
1699
1446
  }
1700
- // highlight matched text
1701
- var t = _ && (0, D.keywordLocations)(e.props.label, _);
1447
+ // highlight matched text
1448
+ var t = P && (0, R.keywordLocations)(e.props.label, P);
1702
1449
 
1703
1450
  return (0, n.cloneElement)(e, {
1704
1451
  matchRanges: t || undefined
1705
1452
  });
1706
1453
  }));
1707
- // Add the option to add the new value
1708
- if (u && !O && t) {
1709
- var A = w ? S + 1 : S;
1710
- k.splice(A, 0, r().createElement(Oe, {
1454
+ // Add the option to add the new value
1455
+ if (s && !O && t) {
1456
+ var E = S ? w + 1 : w;
1457
+ k.splice(E, 0, r().createElement(Se, {
1711
1458
  label: "".concat(t, " (new value)"),
1712
1459
  value: t,
1713
1460
  key: "newValue",
1714
1461
  multiple: d,
1715
- onClick: i.handleMenuOptionClick
1462
+ onClick: l.handleMenuOptionClick
1716
1463
  }));
1717
1464
  }
1718
- // When selectAll is a menu item, add an offset so that activeItem accounts for the extra selectAll option.
1719
- var j = h === "checkbox" && d && k.length > 1 ? 1 : 0;
1720
- var E = true;
1721
- // Highlight the selected Items and remove hidden
1465
+ // When selectAll is a menu item, add an offset so that activeItem accounts for the extra selectAll option.
1466
+ var I = h === "checkbox" && d && k.length > 1 ? 1 : 0;
1467
+ var T = true;
1468
+ // Highlight the selected Items and remove hidden
1722
1469
  k = k.reduce((function(e, t) {
1723
1470
  // ignore Dividers & Headings
1724
- if (!Dt(t)) {
1471
+ if (!St(t)) {
1725
1472
  e.push(t);
1726
1473
  return e;
1727
1474
  }
1728
- // Ignore any hidden items
1475
+ // Ignore any hidden items
1729
1476
  if (t.props && t.props.hidden) {
1730
1477
  return e;
1731
1478
  }
1732
- if (t.props.selected && !t.props.disabled && i.firstSelectedOptionIndex == null) {
1733
- i.firstSelectedOptionIndex = i.availableOptionCount;
1479
+ if (t.props.selected && !t.props.disabled && l.firstSelectedOptionIndex == null) {
1480
+ l.firstSelectedOptionIndex = l.availableOptionCount;
1734
1481
  }
1735
- var r = j === i.state.activeIndex;
1736
- j += 1;
1737
- i.availableOptionCount += 1;
1738
- i.selectedOptionCount += t.props.selected ? 1 : 0;
1482
+ var r = I === l.state.activeIndex;
1483
+ I += 1;
1484
+ l.availableOptionCount += 1;
1485
+ l.selectedOptionCount += t.props.selected ? 1 : 0;
1739
1486
  if (t.key !== "newValue" && !t.props.disabled && !t.props.selected) {
1740
- E = false;
1487
+ T = false;
1741
1488
  }
1742
1489
  if (!r || !o) {
1743
1490
  e.push(t);
1744
1491
  return e;
1745
1492
  }
1746
1493
  if (!t.props.disabled) {
1747
- i.activeValue = t.props.value;
1494
+ l.activeValue = t.props.value;
1748
1495
  }
1749
- var a = (0, n.cloneElement)(t, {
1496
+ var i = (0, n.cloneElement)(t, {
1750
1497
  active: r,
1751
- id: i.activeItemId,
1752
- ref: i.handleActiveOptionMount
1498
+ id: l.activeItemId,
1499
+ ref: l.handleActiveOptionMount
1753
1500
  });
1754
- e.push(a);
1501
+ e.push(i);
1755
1502
  return e;
1756
1503
  }), []);
1757
- i.optionSelection = i.selectedOptionCount === 0 && "none" || E && "all" || "some";
1758
- // add select all option
1759
- if (h === "checkbox" && d && i.availableOptionCount > 0) {
1760
- var M;
1761
- var P;
1762
- if (i.optionSelection === "all") {
1504
+ l.optionSelection = l.selectedOptionCount === 0 && "none" || T && "all" || "some";
1505
+ // add select all option
1506
+ if (h === "checkbox" && d && l.availableOptionCount > 0) {
1507
+ var A;
1508
+ var _;
1509
+ if (l.optionSelection === "all") {
1763
1510
  if (t === "") {
1764
- P = (0, s._)("Clear all");
1511
+ _ = (0, u._)("Clear all");
1765
1512
  } else {
1766
- P = (0, s._)("Clear all matches");
1513
+ _ = (0, u._)("Clear all matches");
1767
1514
  }
1768
1515
  } else if (t === "") {
1769
- P = (0, s._)("Select all");
1516
+ _ = (0, u._)("Select all");
1770
1517
  } else {
1771
- P = (0, s._)("Select all matches");
1518
+ _ = (0, u._)("Select all matches");
1772
1519
  }
1773
- if (i.state.activeIndex === 0 && o) {
1774
- i.activeValue = "selectAll";
1520
+ if (l.state.activeIndex === 0 && o) {
1521
+ l.activeValue = "selectAll";
1775
1522
  }
1776
- k.unshift( r().createElement(He, {
1523
+ k.unshift( r().createElement(ke, {
1777
1524
  key: "selectAllOption",
1778
- selected: i.optionSelection === "all" || i.optionSelection !== "none" && "some",
1779
- selectAllLabel: P,
1780
- totalCount: (M = i.getCurrentValues()) === null || M === void 0 ? void 0 : M.length,
1781
- changedToggle: !!i.props.toggle,
1782
- onClick: i.optionSelection === "all" ? i.handleClearAll : i.handleSelectAll,
1783
- id: i.state.activeIndex === 0 ? i.activeItemId : undefined,
1784
- active: i.state.activeIndex === 0,
1785
- ref: i.handleActiveOptionMount,
1525
+ selected: l.optionSelection === "all" || l.optionSelection !== "none" && "some",
1526
+ selectAllLabel: _,
1527
+ totalCount: (A = l.getCurrentValues()) === null || A === void 0 ? void 0 : A.length,
1528
+ changedToggle: !!l.props.toggle,
1529
+ onClick: l.optionSelection === "all" ? l.handleClearAll : l.handleSelectAll,
1530
+ id: l.state.activeIndex === 0 ? l.activeItemId : undefined,
1531
+ active: l.state.activeIndex === 0,
1532
+ ref: l.handleActiveOptionMount,
1786
1533
  tabIndex: -1
1787
- }), r().createElement(T.Divider, {
1534
+ }), r().createElement(M.Divider, {
1788
1535
  key: "selectAllDivider"
1789
1536
  }));
1790
1537
  }
1791
- i.displayedValues = k.reduce((function(e, t) {
1792
- if (Dt(t)) {
1538
+ l.displayedValues = k.reduce((function(e, t) {
1539
+ if (St(t)) {
1793
1540
  e.push(t.props.value);
1794
1541
  }
1795
1542
  return e;
1796
1543
  }), []);
1797
1544
  return k;
1798
1545
  }));
1799
- Et(Ct(i), "wrapLabel", (function(e) {
1546
+ vt(ut(l), "wrapLabel", (function(e) {
1800
1547
  var t = e.prefixLabel, n = e.label, r = e.suffixLabel;
1801
1548
  var o = n;
1802
1549
  if (t) {
1803
1550
  o = [ "".concat(t, ": ") ].concat(o);
1804
1551
  }
1805
1552
  if (r) {
1806
- o = u()(o).concat(" ".concat(r));
1553
+ o = s()(o).concat(" ".concat(r));
1807
1554
  }
1808
1555
  return o;
1809
1556
  }));
1810
- Et(Ct(i), "handleDropdownMount", (function(e) {
1811
- i.dropdown = e;
1557
+ vt(ut(l), "handleDropdownMount", (function(e) {
1558
+ l.dropdown = e;
1812
1559
  }));
1813
- i.state = {
1560
+ l.state = {
1814
1561
  activeIndex: 0,
1815
1562
  filterKeyword: "",
1816
1563
  open: false,
@@ -1818,26 +1565,25 @@
1818
1565
  topValues: [],
1819
1566
  values: e.defaultValues || []
1820
1567
  };
1821
- i.controlledExternally = l()(e, "values");
1822
- i.displayedValues = [];
1823
- i.availableOptionCount = 0;
1824
- i.firstSelectedOptionIndex = undefined;
1825
- i.selectedOptionCount = 0;
1826
- i.matchCharacter = null;
1827
- i.matchTimeout = null;
1828
- i.currentMatchOptions = [];
1829
- i.availableMatchOptions = [];
1830
- i.optionRefsByKey = {};
1831
- i.optionSelection = "none";
1568
+ l.controlledExternally = a()(e, "values");
1569
+ l.displayedValues = [];
1570
+ l.availableOptionCount = 0;
1571
+ l.firstSelectedOptionIndex = undefined;
1572
+ l.selectedOptionCount = 0;
1573
+ l.matchCharacter = null;
1574
+ l.matchTimeout = null;
1575
+ l.currentMatchOptions = [];
1576
+ l.availableMatchOptions = [];
1577
+ l.optionRefsByKey = {};
1578
+ l.optionSelection = "none";
1832
1579
  if (false) {}
1833
1580
  if (false) {}
1834
1581
  o.validateAppearance(e);
1835
- i.menuId = (0, M.createDOMID)("menu");
1836
- i.menuListboxId = (0, M.createDOMID)("menu-listbox");
1837
- i.activeItemId = (0, M.createDOMID)("active-item");
1838
- return i;
1582
+ l.menuListboxId = (0, A.createDOMID)("menu-listbox");
1583
+ l.activeItemId = (0, A.createDOMID)("active-item");
1584
+ return l;
1839
1585
  }
1840
- gt(o, [ {
1586
+ rt(o, [ {
1841
1587
  key: "componentDidUpdate",
1842
1588
  value: function e(t, n) {
1843
1589
  if (false) {}
@@ -1871,16 +1617,16 @@
1871
1617
  }, {
1872
1618
  key: "toggleValue",
1873
1619
  value: function e(t, n) {
1874
- var r, o, i;
1875
- var a = (r = this.getCurrentValues()) !== null && r !== void 0 ? r : [];
1876
- var l = a.indexOf(n);
1877
- var s = this.props, c = s.name, u = s.multiple;
1620
+ var r, o, l;
1621
+ var i = (r = this.getCurrentValues()) !== null && r !== void 0 ? r : [];
1622
+ var a = i.indexOf(n);
1623
+ var u = this.props, c = u.name, s = u.multiple;
1878
1624
  var p;
1879
- if (u) {
1880
- if (l >= 0) {
1881
- p = [].concat(pt(a.slice(0, l)), pt(a.slice(l + 1)));
1625
+ if (s) {
1626
+ if (a >= 0) {
1627
+ p = [].concat(Xe(i.slice(0, a)), Xe(i.slice(a + 1)));
1882
1628
  } else {
1883
- p = a.concat([ n ]);
1629
+ p = i.concat([ n ]);
1884
1630
  }
1885
1631
  } else {
1886
1632
  // non-multiple mode must always have a value
@@ -1892,7 +1638,7 @@
1892
1638
  values: p
1893
1639
  });
1894
1640
  }
1895
- if (u) {
1641
+ if (s) {
1896
1642
  // in uncontrolled multiple mode, keep the menu open
1897
1643
  if (f) {
1898
1644
  this.setState({
@@ -1907,7 +1653,7 @@
1907
1653
  });
1908
1654
  this.focus();
1909
1655
  }
1910
- (o = (i = this.props).onChange) === null || o === void 0 ? void 0 : o.call(i, t, {
1656
+ (o = (l = this.props).onChange) === null || o === void 0 ? void 0 : o.call(l, t, {
1911
1657
  values: p,
1912
1658
  name: c,
1913
1659
  reason: "valueToggle"
@@ -1925,32 +1671,32 @@
1925
1671
  key: "renderControls",
1926
1672
  value: function e(t) {
1927
1673
  var n = t.hasChildren, o = t.placement;
1928
- var i = this.state.filterKeyword;
1929
- var a = this.props, l = a.inputId, c = a.inputRef, u = a.multiple, p = a.selectAllAppearance;
1930
- var f = (0, s._)("Select all options".concat(this.optionSelection === "all" ? " disabled" : ""));
1931
- var d = (0, s._)("Clear all options".concat(this.optionSelection === "none" ? " disabled" : ""));
1932
- // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
1933
- var v = r().createElement(Ze, {
1674
+ var l = this.state.filterKeyword;
1675
+ var i = this.props, a = i.inputId, c = i.inputRef, s = i.multiple, p = i.selectAllAppearance;
1676
+ var f = (0, u._)("Select all options".concat(this.optionSelection === "all" ? " disabled" : ""));
1677
+ var d = (0, u._)("Clear all options".concat(this.optionSelection === "none" ? " disabled" : ""));
1678
+ // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
1679
+ var v = r().createElement(Le, {
1934
1680
  $placement: o,
1935
1681
  key: "selectAll"
1936
- }, r().createElement(Qe, {
1682
+ }, r().createElement(Re, {
1937
1683
  $disabled: this.optionSelection === "all",
1938
1684
  "aria-label": f,
1939
1685
  onClick: this.handleSelectAll,
1940
1686
  "data-test": "select-all"
1941
- }, i ? (0, s._)("Select all Matches") : (0, s._)("Select all")), r().createElement(Qe, {
1687
+ }, l ? (0, u._)("Select all Matches") : (0, u._)("Select all")), r().createElement(Re, {
1942
1688
  $disabled: this.optionSelection === "none",
1943
1689
  "aria-label": d,
1944
1690
  onClick: this.handleClearAll,
1945
1691
  "data-test": "clear-all"
1946
- }, i ? (0, s._)("Clear all Matches") : (0, s._)("Clear all")));
1692
+ }, l ? (0, u._)("Clear all Matches") : (0, u._)("Clear all")));
1947
1693
  return this.hasFilter() && r().createElement("div", {
1948
1694
  key: "controls"
1949
- }, r().createElement(Je, {
1695
+ }, r().createElement(_e, {
1950
1696
  key: "filter",
1951
1697
  "data-test": "filter"
1952
1698
  }, r().createElement(F(), {
1953
- value: i,
1699
+ value: l,
1954
1700
  autoCapitalize: "off",
1955
1701
  autoComplete: "off",
1956
1702
  autoCorrect: "off",
@@ -1959,239 +1705,229 @@
1959
1705
  onKeyDown: this.handleTextKeyDown,
1960
1706
  onFocus: this.handleTextFocus,
1961
1707
  onBlur: this.handleTextBlur,
1962
- placeholder: (0, s._)("filter"),
1708
+ placeholder: (0, u._)("filter"),
1963
1709
  role: "combobox",
1964
1710
  "aria-expanded": "true",
1965
1711
  "aria-controls": this.menuListboxId,
1966
- "aria-label": (0, s._)("Filter"),
1712
+ "aria-owns": n ? this.activeItemId : undefined,
1713
+ "aria-label": (0, u._)("Filter"),
1714
+ "aria-autocomplete": "list",
1967
1715
  "aria-activedescendant": this.state.textHasFocus && n ? this.activeItemId : undefined,
1968
1716
  inputRef: c,
1969
- inputId: l,
1717
+ inputId: a,
1970
1718
  canClear: true,
1971
- startAdornment: r().createElement(Xe, null, r().createElement(te, null))
1972
- })), u && n && p === "buttongroup" && v);
1719
+ startAdornment: r().createElement(Ve, null, r().createElement(te, null))
1720
+ })), s && n && p === "buttongroup" && v);
1973
1721
  }
1974
1722
  }, {
1975
1723
  key: "render",
1976
1724
  value: function e() {
1977
1725
  var t, o = this;
1978
- var i = this.props, a = i.children, l = i.defaultPlacement, s = i.inputId, c = i.multiple, u = i.repositionMode, p = i.virtualization;
1726
+ var l = this.props, i = l.children, a = l.defaultPlacement, u = l.inputId, c = l.multiple, s = l.repositionMode, p = l.virtualization;
1979
1727
  var d = this.hasFilter();
1980
1728
  var v = (t = this.getCurrentValues()) !== null && t !== void 0 ? t : [];
1981
- var h = n.Children.toArray(a);
1729
+ var h = n.Children.toArray(i);
1982
1730
  var b = v.some((function(e) {
1983
1731
  var t = f()(h, (function(t) {
1984
- return Dt(t) && t.props.value === e;
1732
+ return St(t) && t.props.value === e;
1985
1733
  }));
1986
1734
  return t && !t.props.disabled;
1987
1735
  }));
1988
- var m = this.createChildren();
1989
- var y = this.createToggle();
1736
+ var y = this.createChildren();
1737
+ var m = this.createToggle();
1990
1738
  var g = function e(t) {
1991
- var n = t.anchorWidth, i = t.maxHeight, a = t.placement;
1992
- var l = Vt({
1739
+ var n = t.anchorWidth, l = t.maxHeight, i = t.placement;
1740
+ var a = Ot({
1993
1741
  anchorWidth: n,
1994
1742
  isMultiple: o.props.multiple,
1995
- maxHeight: i,
1743
+ maxHeight: l,
1996
1744
  menuStyle: o.props.menuStyle
1997
1745
  });
1998
- var s = v.length > 0 && !b && !o.hasFilter() ? 0 : undefined;
1999
- var u = jt(jt({
1746
+ var u = v.length > 0 && !b && !o.hasFilter() ? 0 : undefined;
1747
+ var s = dt(dt({
2000
1748
  "aria-multiselectable": c || undefined,
2001
1749
  childrenStart: o.renderControls({
2002
- placement: a,
2003
- hasChildren: !!m.length
1750
+ placement: i,
1751
+ hasChildren: y.some((function(e) {
1752
+ return St(e);
1753
+ }))
2004
1754
  }),
2005
1755
  focusMode: o.hasFilter() ? "never" : undefined,
2006
- id: o.menuId,
2007
1756
  isLoading: o.props.isLoadingOptions,
2008
1757
  menuId: o.menuListboxId,
2009
1758
  onScrollBottom: o.props.onScrollBottom ? o.handleScrollBottom : undefined,
2010
- placement: a !== null && a !== void 0 ? a : undefined
2011
- }, I()(o.props, "noOptionsMessage", "footerMessage", "animateLoading", "loadingMessage", "onScroll")), {}, {
2012
- style: l,
2013
- tabIndex: s
1759
+ placement: i !== null && i !== void 0 ? i : undefined
1760
+ }, j()(o.props, "noOptionsMessage", "footerMessage", "animateLoading", "loadingMessage", "onScroll")), {}, {
1761
+ style: a,
1762
+ tabIndex: u
2014
1763
  });
2015
1764
  if (p) {
2016
1765
 
2017
- return r().createElement(N.VirtualizedResultsMenu, at({
1766
+ return r().createElement(B.VirtualizedResultsMenu, ze({
2018
1767
  virtualization: p
2019
- }, u), m);
1768
+ }, s), y);
2020
1769
  }
2021
1770
 
2022
- return r().createElement(B(), u, m);
1771
+ return r().createElement(K(), s, y);
2023
1772
  };
2024
1773
 
2025
1774
  return r().createElement(V(), {
2026
- closeReasons: Rt,
2027
- inputId: s,
2028
- toggle: y,
1775
+ closeReasons: wt,
1776
+ inputId: u,
1777
+ toggle: m,
2029
1778
  onRequestOpen: this.handleRequestOpen,
2030
1779
  onRequestClose: this.handleRequestClose,
2031
1780
  open: this.state.open,
2032
1781
  openWithArrowKeys: true,
2033
- repositionMode: u,
2034
- defaultPlacement: d ? l : undefined,
2035
- canCoverAnchor: it().innerHeight < 500,
1782
+ repositionMode: s,
1783
+ defaultPlacement: d ? a : undefined,
1784
+ canCoverAnchor: He().innerHeight < 500,
2036
1785
  ref: this.handleDropdownMount,
2037
1786
  retainFocus: false,
2038
- takeFocus: v.length === 0 || v.length > 0 && !b || !!d
1787
+ takeFocus: v.length === 0 || v.length > 0 && !b || d
2039
1788
  }, g);
2040
1789
  }
2041
1790
  } ]);
2042
1791
  return o;
2043
1792
  }(n.Component);
2044
- Et(qt, "propTypes", Mt);
2045
- Et(qt, "defaultProps", Tt);
2046
- Et(qt, "Option", Oe);
2047
- Et(qt, "Divider", T.Divider);
2048
- Et(qt, "Heading", T.Heading);
2049
- Et(qt, "invalidLinkAppearanceProps", [ "append", "error", "prepend" ]);
2050
- /* harmony default export */ const Nt = qt;
1793
+ vt(xt, "propTypes", yt);
1794
+ vt(xt, "defaultProps", mt);
1795
+ vt(xt, "Option", Se);
1796
+ vt(xt, "Divider", M.Divider);
1797
+ vt(xt, "Heading", M.Heading);
1798
+ vt(xt, "invalidLinkAppearanceProps", [ "append", "error", "prepend" ]);
1799
+ /* harmony default export */ const kt = xt;
2051
1800
  // CONCATENATED MODULE: ./src/Select/Option.tsx
2052
- function Bt(e) {
1801
+ function jt(e) {
2053
1802
  "@babel/helpers - typeof";
2054
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
2055
- Bt = function e(t) {
2056
- return typeof t;
2057
- };
2058
- } else {
2059
- Bt = function e(t) {
2060
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2061
- };
2062
- }
2063
- return Bt(e);
2064
- }
2065
- function Kt() {
2066
- Kt = Object.assign || function(e) {
1803
+ return jt = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1804
+ return typeof e;
1805
+ } : function(e) {
1806
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1807
+ }, jt(e);
1808
+ }
1809
+ function Pt() {
1810
+ return Pt = Object.assign ? Object.assign.bind() : function(e) {
2067
1811
  for (var t = 1; t < arguments.length; t++) {
2068
1812
  var n = arguments[t];
2069
1813
  for (var r in n) {
2070
- if (Object.prototype.hasOwnProperty.call(n, r)) {
2071
- e[r] = n[r];
2072
- }
1814
+ ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
2073
1815
  }
2074
1816
  }
2075
1817
  return e;
2076
- };
2077
- return Kt.apply(this, arguments);
1818
+ }, Pt.apply(null, arguments);
2078
1819
  }
2079
- function Ft(e, t) {
2080
- if (!(e instanceof t)) {
2081
- throw new TypeError("Cannot call a class as a function");
2082
- }
1820
+ function Et(e, t) {
1821
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
2083
1822
  }
2084
- function Ht(e, t) {
1823
+ function It(e, t) {
2085
1824
  for (var n = 0; n < t.length; n++) {
2086
1825
  var r = t[n];
2087
- r.enumerable = r.enumerable || false;
2088
- r.configurable = true;
2089
- if ("value" in r) r.writable = true;
2090
- Object.defineProperty(e, r.key, r);
1826
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
1827
+ Object.defineProperty(e, Bt(r.key), r);
2091
1828
  }
2092
1829
  }
2093
- function $t(e, t, n) {
2094
- if (t) Ht(e.prototype, t);
2095
- if (n) Ht(e, n);
2096
- return e;
1830
+ function Tt(e, t, n) {
1831
+ return t && It(e.prototype, t), n && It(e, n), Object.defineProperty(e, "prototype", {
1832
+ writable: !1
1833
+ }), e;
2097
1834
  }
2098
- function zt(e, t) {
2099
- if (typeof t !== "function" && t !== null) {
2100
- throw new TypeError("Super expression must either be null or a function");
2101
- }
1835
+ function At(e, t) {
1836
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
2102
1837
  e.prototype = Object.create(t && t.prototype, {
2103
1838
  constructor: {
2104
1839
  value: e,
2105
- writable: true,
2106
- configurable: true
1840
+ writable: !0,
1841
+ configurable: !0
2107
1842
  }
2108
- });
2109
- if (t) Wt(e, t);
1843
+ }), Object.defineProperty(e, "prototype", {
1844
+ writable: !1
1845
+ }), t && Mt(e, t);
2110
1846
  }
2111
- function Wt(e, t) {
2112
- Wt = Object.setPrototypeOf || function e(t, n) {
2113
- t.__proto__ = n;
2114
- return t;
2115
- };
2116
- return Wt(e, t);
1847
+ function Mt(e, t) {
1848
+ return Mt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
1849
+ return e.__proto__ = t, e;
1850
+ }, Mt(e, t);
2117
1851
  }
2118
- function Ut(e) {
2119
- var t = Xt();
2120
- return function n() {
2121
- var r = Yt(e), o;
1852
+ function _t(e) {
1853
+ var t = Rt();
1854
+ return function() {
1855
+ var n, r = Lt(e);
2122
1856
  if (t) {
2123
- var i = Yt(this).constructor;
2124
- o = Reflect.construct(r, arguments, i);
2125
- } else {
2126
- o = r.apply(this, arguments);
2127
- }
2128
- return Gt(this, o);
1857
+ var o = Lt(this).constructor;
1858
+ n = Reflect.construct(r, arguments, o);
1859
+ } else n = r.apply(this, arguments);
1860
+ return Vt(this, n);
2129
1861
  };
2130
1862
  }
2131
- function Gt(e, t) {
2132
- if (t && (Bt(t) === "object" || typeof t === "function")) {
2133
- return t;
2134
- }
2135
- return Jt(e);
1863
+ function Vt(e, t) {
1864
+ if (t && ("object" == jt(t) || "function" == typeof t)) return t;
1865
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
1866
+ return qt(e);
2136
1867
  }
2137
- function Jt(e) {
2138
- if (e === void 0) {
2139
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2140
- }
1868
+ function qt(e) {
1869
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2141
1870
  return e;
2142
1871
  }
2143
- function Xt() {
2144
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
2145
- if (Reflect.construct.sham) return false;
2146
- if (typeof Proxy === "function") return true;
1872
+ function Rt() {
2147
1873
  try {
2148
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
2149
- return true;
2150
- } catch (e) {
2151
- return false;
2152
- }
1874
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
1875
+ } catch (e) {}
1876
+ return (Rt = function t() {
1877
+ return !!e;
1878
+ })();
1879
+ }
1880
+ function Lt(e) {
1881
+ return Lt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
1882
+ return e.__proto__ || Object.getPrototypeOf(e);
1883
+ }, Lt(e);
1884
+ }
1885
+ function Dt(e, t, n) {
1886
+ return (t = Bt(t)) in e ? Object.defineProperty(e, t, {
1887
+ value: n,
1888
+ enumerable: !0,
1889
+ configurable: !0,
1890
+ writable: !0
1891
+ }) : e[t] = n, e;
2153
1892
  }
2154
- function Yt(e) {
2155
- Yt = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
2156
- return t.__proto__ || Object.getPrototypeOf(t);
2157
- };
2158
- return Yt(e);
2159
- }
2160
- function Qt(e, t, n) {
2161
- if (t in e) {
2162
- Object.defineProperty(e, t, {
2163
- value: n,
2164
- enumerable: true,
2165
- configurable: true,
2166
- writable: true
2167
- });
2168
- } else {
2169
- e[t] = n;
1893
+ function Bt(e) {
1894
+ var t = Kt(e, "string");
1895
+ return "symbol" == jt(t) ? t : t + "";
1896
+ }
1897
+ function Kt(e, t) {
1898
+ if ("object" != jt(e) || !e) return e;
1899
+ var n = e[Symbol.toPrimitive];
1900
+ if (void 0 !== n) {
1901
+ var r = n.call(e, t || "default");
1902
+ if ("object" != jt(r)) return r;
1903
+ throw new TypeError("@@toPrimitive must return a primitive value.");
2170
1904
  }
2171
- return e;
1905
+ return ("string" === t ? String : Number)(e);
2172
1906
  }
2173
- var Zt = {
1907
+ var Nt = {
2174
1908
  /** @private */
2175
- active: i().bool,
2176
- children: i().node,
2177
- description: i().string,
2178
- descriptionPosition: i().oneOf([ "right", "bottom" ]),
2179
- disabled: i().bool,
2180
- hidden: i().bool,
2181
- icon: i().node,
2182
- label: i().string.isRequired,
2183
- matchRanges: i().arrayOf(i().shape({
2184
- start: i().number.isRequired,
2185
- end: i().number.isRequired
1909
+ active: l().bool,
1910
+ children: l().node,
1911
+ description: l().string,
1912
+ descriptionPosition: l().oneOf([ "right", "bottom" ]),
1913
+ disabled: l().bool,
1914
+ hidden: l().bool,
1915
+ icon: l().node,
1916
+ label: l().string.isRequired,
1917
+ matchRanges: l().arrayOf(l().shape({
1918
+ start: l().number.isRequired,
1919
+ end: l().number.isRequired
2186
1920
  })),
2187
1921
  /** @private */
2188
- onClick: i().func,
1922
+ onClick: l().func,
2189
1923
  /** @private */
2190
- selected: i().bool,
2191
- truncate: i().bool,
2192
- value: i().oneOfType([ i().string, i().number, i().bool ]).isRequired
1924
+ role: l().oneOf([ "menuitemcheckbox", "option" ]),
1925
+ /** @private */
1926
+ selected: l().bool,
1927
+ truncate: l().bool,
1928
+ value: l().oneOfType([ l().string, l().number, l().bool ]).isRequired
2193
1929
  };
2194
- var en = {
1930
+ var Ft = {
2195
1931
  active: false,
2196
1932
  descriptionPosition: "bottom",
2197
1933
  disabled: false,
@@ -2203,31 +1939,35 @@
2203
1939
  * An option within a `Select`. This inherits from
2204
1940
  * [PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)
2205
1941
  * so any elements passed to it must also be pure.
2206
- */ var tn = function(e) {
2207
- zt(n, e);
2208
- var t = Ut(n);
1942
+ */ var Ht = function(e) {
1943
+ At(n, e);
1944
+ var t = _t(n);
2209
1945
  function n() {
2210
1946
  var e;
2211
- Ft(this, n);
2212
- for (var r = arguments.length, o = new Array(r), i = 0; i < r; i++) {
2213
- o[i] = arguments[i];
1947
+ Et(this, n);
1948
+ for (var r = arguments.length, o = new Array(r), l = 0; l < r; l++) {
1949
+ o[l] = arguments[l];
2214
1950
  }
2215
1951
  e = t.call.apply(t, [ this ].concat(o));
2216
- Qt(Jt(e), "c", null);
2217
- Qt(Jt(e), "handleMount", (function(t) {
1952
+ Dt(qt(e), "c", null);
1953
+ Dt(qt(e), "handleMount", (function(t) {
2218
1954
  e.c = t;
2219
1955
  }));
2220
1956
  return e;
2221
1957
  }
2222
- $t(n, [ {
1958
+ // @docs-props-type OptionPropsBase
1959
+ Tt(n, [ {
2223
1960
  key: "scrollIntoViewIfNeeded",
1961
+ // eslint-disable-next-line react/no-unused-class-component-methods
2224
1962
  value: function e() {
2225
1963
  var t;
2226
1964
  (t = this.c) === null || t === void 0 ? void 0 : t.scrollIntoViewIfNeeded();
2227
1965
  }
2228
1966
  /**
2229
1967
  * Place focus on the button.
2230
- */ }, {
1968
+ */
1969
+ // eslint-disable-next-line react/no-unused-class-component-methods
1970
+ }, {
2231
1971
  key: "focus",
2232
1972
  value: function e() {
2233
1973
  var t;
@@ -2237,7 +1977,7 @@
2237
1977
  key: "render",
2238
1978
  value: function e() {
2239
1979
 
2240
- return r().createElement(Oe, Kt({}, this.props, {
1980
+ return r().createElement(Se, Pt({}, this.props, {
2241
1981
  multiple: false,
2242
1982
  ref: this.handleMount
2243
1983
  }), this.props.children || this.props.label);
@@ -2245,201 +1985,183 @@
2245
1985
  } ]);
2246
1986
  return n;
2247
1987
  }(n.PureComponent);
2248
- Qt(tn, "propTypes", Zt);
2249
- Qt(tn, "defaultProps", en);
2250
- /* harmony default export */ const nn = tn;
1988
+ Dt(Ht, "propTypes", Nt);
1989
+ Dt(Ht, "defaultProps", Ft);
1990
+ /* harmony default export */ const zt = Ht;
2251
1991
  // CONCATENATED MODULE: ./src/Select/Select.tsx
2252
- function rn(e) {
1992
+ function $t(e) {
2253
1993
  "@babel/helpers - typeof";
2254
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
2255
- rn = function e(t) {
2256
- return typeof t;
2257
- };
2258
- } else {
2259
- rn = function e(t) {
2260
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2261
- };
2262
- }
2263
- return rn(e);
2264
- }
2265
- function on() {
2266
- on = Object.assign || function(e) {
1994
+ return $t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1995
+ return typeof e;
1996
+ } : function(e) {
1997
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1998
+ }, $t(e);
1999
+ }
2000
+ function Wt() {
2001
+ return Wt = Object.assign ? Object.assign.bind() : function(e) {
2267
2002
  for (var t = 1; t < arguments.length; t++) {
2268
2003
  var n = arguments[t];
2269
2004
  for (var r in n) {
2270
- if (Object.prototype.hasOwnProperty.call(n, r)) {
2271
- e[r] = n[r];
2272
- }
2005
+ ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
2273
2006
  }
2274
2007
  }
2275
2008
  return e;
2276
- };
2277
- return on.apply(this, arguments);
2009
+ }, Wt.apply(null, arguments);
2278
2010
  }
2279
- function an(e, t) {
2280
- if (e == null) return {};
2281
- var n = ln(e, t);
2282
- var r, o;
2011
+ function Ut(e, t) {
2012
+ if (null == e) return {};
2013
+ var n, r, o = Jt(e, t);
2283
2014
  if (Object.getOwnPropertySymbols) {
2284
- var i = Object.getOwnPropertySymbols(e);
2285
- for (o = 0; o < i.length; o++) {
2286
- r = i[o];
2287
- if (t.indexOf(r) >= 0) continue;
2288
- if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
2289
- n[r] = e[r];
2015
+ var l = Object.getOwnPropertySymbols(e);
2016
+ for (r = 0; r < l.length; r++) {
2017
+ n = l[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
2290
2018
  }
2291
2019
  }
2292
- return n;
2020
+ return o;
2293
2021
  }
2294
- function ln(e, t) {
2295
- if (e == null) return {};
2022
+ function Jt(e, t) {
2023
+ if (null == e) return {};
2296
2024
  var n = {};
2297
- var r = Object.keys(e);
2298
- var o, i;
2299
- for (i = 0; i < r.length; i++) {
2300
- o = r[i];
2301
- if (t.indexOf(o) >= 0) continue;
2302
- n[o] = e[o];
2025
+ for (var r in e) {
2026
+ if ({}.hasOwnProperty.call(e, r)) {
2027
+ if (t.includes(r)) continue;
2028
+ n[r] = e[r];
2029
+ }
2303
2030
  }
2304
2031
  return n;
2305
2032
  }
2306
- function sn(e, t) {
2307
- if (!(e instanceof t)) {
2308
- throw new TypeError("Cannot call a class as a function");
2309
- }
2033
+ function Xt(e, t) {
2034
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
2310
2035
  }
2311
- function cn(e, t) {
2036
+ function Gt(e, t) {
2312
2037
  for (var n = 0; n < t.length; n++) {
2313
2038
  var r = t[n];
2314
- r.enumerable = r.enumerable || false;
2315
- r.configurable = true;
2316
- if ("value" in r) r.writable = true;
2317
- Object.defineProperty(e, r.key, r);
2039
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
2040
+ Object.defineProperty(e, an(r.key), r);
2318
2041
  }
2319
2042
  }
2320
- function un(e, t, n) {
2321
- if (t) cn(e.prototype, t);
2322
- if (n) cn(e, n);
2323
- return e;
2043
+ function Qt(e, t, n) {
2044
+ return t && Gt(e.prototype, t), n && Gt(e, n), Object.defineProperty(e, "prototype", {
2045
+ writable: !1
2046
+ }), e;
2324
2047
  }
2325
- function pn(e, t) {
2326
- if (typeof t !== "function" && t !== null) {
2327
- throw new TypeError("Super expression must either be null or a function");
2328
- }
2048
+ function Yt(e, t) {
2049
+ if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
2329
2050
  e.prototype = Object.create(t && t.prototype, {
2330
2051
  constructor: {
2331
2052
  value: e,
2332
- writable: true,
2333
- configurable: true
2053
+ writable: !0,
2054
+ configurable: !0
2334
2055
  }
2335
- });
2336
- if (t) fn(e, t);
2337
- }
2338
- function fn(e, t) {
2339
- fn = Object.setPrototypeOf || function e(t, n) {
2340
- t.__proto__ = n;
2341
- return t;
2342
- };
2343
- return fn(e, t);
2344
- }
2345
- function dn(e) {
2346
- var t = bn();
2347
- return function n() {
2348
- var r = mn(e), o;
2056
+ }), Object.defineProperty(e, "prototype", {
2057
+ writable: !1
2058
+ }), t && Zt(e, t);
2059
+ }
2060
+ function Zt(e, t) {
2061
+ return Zt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
2062
+ return e.__proto__ = t, e;
2063
+ }, Zt(e, t);
2064
+ }
2065
+ function en(e) {
2066
+ var t = rn();
2067
+ return function() {
2068
+ var n, r = on(e);
2349
2069
  if (t) {
2350
- var i = mn(this).constructor;
2351
- o = Reflect.construct(r, arguments, i);
2352
- } else {
2353
- o = r.apply(this, arguments);
2354
- }
2355
- return vn(this, o);
2070
+ var o = on(this).constructor;
2071
+ n = Reflect.construct(r, arguments, o);
2072
+ } else n = r.apply(this, arguments);
2073
+ return tn(this, n);
2356
2074
  };
2357
2075
  }
2358
- function vn(e, t) {
2359
- if (t && (rn(t) === "object" || typeof t === "function")) {
2360
- return t;
2361
- }
2362
- return hn(e);
2076
+ function tn(e, t) {
2077
+ if (t && ("object" == $t(t) || "function" == typeof t)) return t;
2078
+ if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
2079
+ return nn(e);
2363
2080
  }
2364
- function hn(e) {
2365
- if (e === void 0) {
2366
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2367
- }
2081
+ function nn(e) {
2082
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2368
2083
  return e;
2369
2084
  }
2370
- function bn() {
2371
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
2372
- if (Reflect.construct.sham) return false;
2373
- if (typeof Proxy === "function") return true;
2085
+ function rn() {
2374
2086
  try {
2375
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
2376
- return true;
2377
- } catch (e) {
2378
- return false;
2379
- }
2380
- }
2381
- function mn(e) {
2382
- mn = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
2383
- return t.__proto__ || Object.getPrototypeOf(t);
2384
- };
2385
- return mn(e);
2386
- }
2387
- function yn(e, t, n) {
2388
- if (t in e) {
2389
- Object.defineProperty(e, t, {
2390
- value: n,
2391
- enumerable: true,
2392
- configurable: true,
2393
- writable: true
2394
- });
2395
- } else {
2396
- e[t] = n;
2087
+ var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
2088
+ } catch (e) {}
2089
+ return (rn = function t() {
2090
+ return !!e;
2091
+ })();
2092
+ }
2093
+ function on(e) {
2094
+ return on = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
2095
+ return e.__proto__ || Object.getPrototypeOf(e);
2096
+ }, on(e);
2097
+ }
2098
+ function ln(e, t, n) {
2099
+ return (t = an(t)) in e ? Object.defineProperty(e, t, {
2100
+ value: n,
2101
+ enumerable: !0,
2102
+ configurable: !0,
2103
+ writable: !0
2104
+ }) : e[t] = n, e;
2105
+ }
2106
+ function an(e) {
2107
+ var t = un(e, "string");
2108
+ return "symbol" == $t(t) ? t : t + "";
2109
+ }
2110
+ function un(e, t) {
2111
+ if ("object" != $t(e) || !e) return e;
2112
+ var n = e[Symbol.toPrimitive];
2113
+ if (void 0 !== n) {
2114
+ var r = n.call(e, t || "default");
2115
+ if ("object" != $t(r)) return r;
2116
+ throw new TypeError("@@toPrimitive must return a primitive value.");
2397
2117
  }
2398
- return e;
2118
+ return ("string" === t ? String : Number)(e);
2399
2119
  }
2400
2120
  /* eslint-disable max-classes-per-file */
2401
- /** @public */ var gn = {
2402
- allowKeyMatching: i().bool,
2403
- animateLoading: i().bool,
2404
- appearance: i().oneOf([ "default", "link", "primary", "pill", "toggle", "flat", "subtle" ]),
2405
- append: i().bool,
2406
- children: i().node,
2407
- defaultPlacement: i().oneOf([ "above", "below", "vertical" ]),
2408
- defaultValue: i().oneOfType([ i().string, i().number, i().bool ]),
2409
- describedBy: i().string,
2410
- disabled: i().bool,
2411
- elementRef: i().oneOfType([ i().func, i().object ]),
2412
- error: i().bool,
2413
- filter: i().oneOf([ false, true, "controlled" ]),
2414
- footerMessage: i().node,
2415
- inline: i().bool,
2416
- inputId: i().string,
2417
- inputRef: i().oneOfType([ i().func, i().object ]),
2418
- isLoadingOptions: i().bool,
2419
- labelledBy: i().string,
2420
- labelText: i().string,
2421
- loadingMessage: i().node,
2422
- menuStyle: i().object,
2423
- name: i().string,
2424
- noOptionsMessage: i().node,
2425
- onChange: i().func,
2426
- onClose: i().func,
2427
- onFilterChange: i().func,
2428
- onOpen: i().func,
2429
- onScroll: i().func,
2430
- onScrollBottom: i().func,
2431
- placeholder: i().string,
2432
- prefixLabel: i().string,
2433
- prepend: i().bool,
2434
- suffixLabel: i().string,
2435
- toggleContent: i().oneOf([ "optionChildren", "optionLabel" ]),
2121
+ /** @public */
2122
+ /** @public */
2123
+ /** @public */ var cn = {
2124
+ allowKeyMatching: l().bool,
2125
+ animateLoading: l().bool,
2126
+ appearance: l().oneOf([ "default", "link", "primary", "pill", "toggle", "flat", "subtle" ]),
2127
+ append: l().bool,
2128
+ children: l().node,
2129
+ defaultPlacement: l().oneOf([ "above", "below", "vertical" ]),
2130
+ defaultValue: l().oneOfType([ l().string, l().number, l().bool ]),
2131
+ describedBy: l().string,
2132
+ disabled: l().bool,
2133
+ elementRef: l().oneOfType([ l().func, l().object ]),
2134
+ error: l().bool,
2135
+ filter: l().oneOf([ false, true, "controlled" ]),
2136
+ footerMessage: l().node,
2137
+ inline: l().bool,
2138
+ inputId: l().string,
2139
+ inputRef: l().oneOfType([ l().func, l().object ]),
2140
+ isLoadingOptions: l().bool,
2141
+ labelledBy: l().string,
2142
+ labelText: l().string,
2143
+ loadingMessage: l().node,
2144
+ menuStyle: l().object,
2145
+ name: l().string,
2146
+ noOptionsMessage: l().node,
2147
+ onChange: l().func,
2148
+ onClose: l().func,
2149
+ onFilterChange: l().func,
2150
+ onOpen: l().func,
2151
+ onScroll: l().func,
2152
+ onScrollBottom: l().func,
2153
+ placeholder: l().string,
2154
+ prefixLabel: l().string,
2155
+ prepend: l().bool,
2156
+ suffixLabel: l().string,
2157
+ toggleContent: l().oneOf([ "optionChildren", "optionLabel" ]),
2436
2158
  /** @private. */
2437
- toggle: i().node,
2438
- value: i().oneOfType([ i().string, i().number, i().bool ]),
2159
+ toggle: l().node,
2160
+ value: l().oneOfType([ l().string, l().number, l().bool ]),
2439
2161
  /** @private. */
2440
- virtualization: i().number
2162
+ virtualization: l().number
2441
2163
  };
2442
- var On = {
2164
+ var sn = {
2443
2165
  allowKeyMatching: true,
2444
2166
  animateLoading: false,
2445
2167
  appearance: "toggle",
@@ -2452,23 +2174,23 @@
2452
2174
  inline: true,
2453
2175
  isLoadingOptions: false,
2454
2176
  menuStyle: {},
2455
- noOptionsMessage: (0, s._)("No matches"),
2456
- placeholder: (0, s._)("Select..."),
2177
+ noOptionsMessage: (0, u._)("No matches"),
2178
+ placeholder: (0, u._)("Select..."),
2457
2179
  prepend: false,
2458
2180
  toggleContent: "optionChildren"
2459
2181
  };
2460
- var Sn = function(e) {
2461
- pn(n, e);
2462
- var t = dn(n);
2182
+ var pn = function(e) {
2183
+ Yt(n, e);
2184
+ var t = en(n);
2463
2185
  // @docs-props-type SelectPropsBase
2464
2186
  function n(e) {
2465
2187
  var r;
2466
- sn(this, n);
2188
+ Xt(this, n);
2467
2189
  r = t.call(this, e);
2468
2190
  var o = {};
2469
- // wrap defaultValue in an array once to avoid failing <SelectBase>'s defaultValues comparison check
2191
+ // wrap defaultValue in an array once to avoid failing <SelectBase>'s defaultValues comparison check
2470
2192
  // using "has" to make sure that pre-4.3 behavior is preserved if a user explicitly passes "null" or "undefined"
2471
- if (l()(e, "defaultValue")) {
2193
+ if (a()(e, "defaultValue")) {
2472
2194
  if (e.defaultValue != null) {
2473
2195
  o.defaultValues = [ e.defaultValue ];
2474
2196
  } else {
@@ -2476,12 +2198,12 @@
2476
2198
  }
2477
2199
  }
2478
2200
  r.state = o;
2479
- // `this.props.appearance === 'toggle'` is not included here because it is the default value.
2201
+ // `this.props.appearance === 'toggle'` is not included here because it is the default value.
2480
2202
  // Including it would trigger a warning for every instance of using `Select`.
2481
2203
  if (false) {}
2482
2204
  return r;
2483
2205
  }
2484
- un(n, [ {
2206
+ Qt(n, [ {
2485
2207
  key: "componentDidUpdate",
2486
2208
  value: function e(t) {
2487
2209
  if (false) {}
@@ -2489,41 +2211,41 @@
2489
2211
  }, {
2490
2212
  key: "render",
2491
2213
  value: function e() {
2492
- var t = this.props, n = t.defaultValue, o = t.onChange, i = t.value, a = an(t, [ "defaultValue", "onChange", "value" ]);
2493
- var s = {
2214
+ var t = this.props, n = t.defaultValue, o = t.onChange, l = t.value, i = Ut(t, [ "defaultValue", "onChange", "value" ]);
2215
+ var u = {
2494
2216
  onChange: function e(t, n) {
2495
- var r = n.name, i = n.values;
2217
+ var r = n.name, l = n.values;
2496
2218
  o === null || o === void 0 ? void 0 : o(t, {
2497
2219
  name: r,
2498
- value: i[0]
2220
+ value: l[0]
2499
2221
  });
2500
2222
  }
2501
2223
  };
2502
- // using "has" as opposed to a null check to match SelectBase
2503
- if (l()(this.props, "value")) {
2504
- if (i != null) {
2505
- s.values = [ i ];
2224
+ // using "has" as opposed to a null check to match SelectBase
2225
+ if (a()(this.props, "value")) {
2226
+ if (l != null) {
2227
+ u.values = [ l ];
2506
2228
  } else {
2507
- s.values = [];
2229
+ u.values = [];
2508
2230
  }
2509
2231
  } else if (this.state.defaultValues != null) {
2510
2232
  // using defaultValues from state in order to avoid wrapping defaultValue here
2511
- s.defaultValues = this.state.defaultValues;
2233
+ u.defaultValues = this.state.defaultValues;
2512
2234
  }
2513
2235
 
2514
- return r().createElement(Nt, on({}, a, s, {
2236
+ return r().createElement(kt, Wt({}, i, u, {
2515
2237
  multiple: false
2516
2238
  }));
2517
2239
  }
2518
2240
  } ]);
2519
2241
  return n;
2520
2242
  }(n.Component);
2521
- yn(Sn, "propTypes", gn);
2522
- yn(Sn, "defaultProps", On);
2523
- yn(Sn, "Option", nn);
2524
- yn(Sn, "Heading", T.Heading);
2525
- yn(Sn, "Divider", T.Divider);
2526
- /* harmony default export */ const wn = Sn;
2243
+ ln(pn, "propTypes", cn);
2244
+ ln(pn, "defaultProps", sn);
2245
+ ln(pn, "Option", zt);
2246
+ ln(pn, "Heading", M.Heading);
2247
+ ln(pn, "Divider", M.Divider);
2248
+ /* harmony default export */ const fn = pn;
2527
2249
  // CONCATENATED MODULE: ./src/Select/index.ts
2528
2250
  module.exports = t;
2529
2251
  /******/})();