@khanacademy/wonder-blocks-dropdown 2.6.8 → 2.7.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.
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 34);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 35);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ([
@@ -93,23 +93,18 @@ module.exports = require("react");
93
93
 
94
94
  /***/ }),
95
95
  /* 1 */
96
- /***/ (function(module, exports) {
97
-
98
- module.exports = require("@khanacademy/wonder-blocks-color");
99
-
100
- /***/ }),
101
- /* 2 */
102
96
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
103
97
 
104
98
  "use strict";
105
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return keyCodes; });
106
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return selectDropdownStyle; });
107
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return filterableDropdownStyle; });
108
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return searchInputStyle; });
99
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return keyCodes; });
100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return selectDropdownStyle; });
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return filterableDropdownStyle; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return searchInputStyle; });
109
103
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DROPDOWN_ITEM_HEIGHT; });
110
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SEPARATOR_ITEM_HEIGHT; });
111
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return SEARCH_ITEM_HEIGHT; });
112
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return defaultLabels; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_VISIBLE_ITEMS; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SEPARATOR_ITEM_HEIGHT; });
106
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SEARCH_ITEM_HEIGHT; });
107
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return defaultLabels; });
113
108
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
114
109
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0__);
115
110
 
@@ -128,8 +123,7 @@ const selectDropdownStyle = {
128
123
  // Note that these can be overridden by the provided style if needed.
129
124
 
130
125
  const filterableDropdownStyle = {
131
- minHeight: 100,
132
- maxHeight: 384
126
+ minHeight: 100
133
127
  };
134
128
  const searchInputStyle = {
135
129
  margin: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xSmall_8,
@@ -137,6 +131,13 @@ const searchInputStyle = {
137
131
  }; // The default item height
138
132
 
139
133
  const DROPDOWN_ITEM_HEIGHT = 40;
134
+ /**
135
+ * Maximum visible items inside the dropdown list. Based on the defined height
136
+ * that we're using, this is the maximum number of items that can fit into the
137
+ * visible portion of the dropdown's listbox.
138
+ */
139
+
140
+ const MAX_VISIBLE_ITEMS = 9;
140
141
  const SEPARATOR_ITEM_HEIGHT = 9;
141
142
  const SEARCH_ITEM_HEIGHT = DROPDOWN_ITEM_HEIGHT + searchInputStyle.margin + searchInputStyle.marginTop; // The default labels that will be used by different components
142
143
 
@@ -151,6 +152,12 @@ const defaultLabels = {
151
152
  allSelected: "All items"
152
153
  };
153
154
 
155
+ /***/ }),
156
+ /* 2 */
157
+ /***/ (function(module, exports) {
158
+
159
+ module.exports = require("@khanacademy/wonder-blocks-color");
160
+
154
161
  /***/ }),
155
162
  /* 3 */
156
163
  /***/ (function(module, exports) {
@@ -171,12 +178,6 @@ module.exports = require("@khanacademy/wonder-blocks-core");
171
178
 
172
179
  /***/ }),
173
180
  /* 6 */
174
- /***/ (function(module, exports) {
175
-
176
- module.exports = require("@khanacademy/wonder-blocks-icon");
177
-
178
- /***/ }),
179
- /* 7 */
180
181
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
181
182
 
182
183
  "use strict";
@@ -185,7 +186,7 @@ module.exports = require("@khanacademy/wonder-blocks-icon");
185
186
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
186
187
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
187
188
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
188
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
189
+ /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
189
190
  /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
190
191
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
191
192
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__);
@@ -231,209 +232,73 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
231
232
  });
232
233
 
233
234
  /***/ }),
234
- /* 8 */
235
+ /* 7 */
235
236
  /***/ (function(module, exports) {
236
237
 
237
238
  module.exports = require("react-dom");
238
239
 
239
240
  /***/ }),
240
- /* 9 */
241
- /***/ (function(module, exports) {
242
-
243
- module.exports = require("@khanacademy/wonder-blocks-typography");
244
-
245
- /***/ }),
246
- /* 10 */
241
+ /* 8 */
247
242
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
248
243
 
249
244
  "use strict";
250
245
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SearchTextInput; });
251
246
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
252
247
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
253
- /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
254
- /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
255
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
256
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__);
257
- /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
258
- /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__);
259
- /* harmony import */ var _khanacademy_wonder_blocks_icon_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28);
260
- /* harmony import */ var _khanacademy_wonder_blocks_icon_button__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon_button__WEBPACK_IMPORTED_MODULE_4__);
261
- /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6);
262
- /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__);
263
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
264
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6__);
265
- /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3);
266
- /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__);
267
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
248
+ /* harmony import */ var _khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29);
249
+ /* harmony import */ var _khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_1__);
250
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
268
251
  // A TextField with a search icon on its left side and X icon on its right side
269
252
 
270
253
 
271
254
 
272
-
273
-
274
-
275
-
276
-
277
-
278
255
  class SearchTextInput extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
279
- constructor(...args) {
280
- super(...args);
281
- this.state = {
282
- focused: false,
283
- labels: {
284
- clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "d"].clearSearch,
285
- filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "d"].filter,
286
- ...this.props.labels
287
- }
288
- };
289
-
290
- this.handleChange = e => {
291
- e.preventDefault();
292
- this.props.onChange(e.target.value);
293
- };
294
-
295
- this.handleDismiss = () => {
296
- const {
297
- onClick,
298
- onChange
299
- } = this.props; // Empty the search text and focus the SearchTextInput
300
-
301
- onChange("");
302
-
303
- if (onClick) {
304
- onClick();
305
- }
306
- };
307
-
308
- this.handleBlur = e => {
309
- this.setState({
310
- focused: false
311
- });
312
- };
313
-
314
- this.handleFocus = e => {
315
- this.setState({
316
- focused: true
317
- });
318
- };
319
- }
320
-
321
256
  static isClassOf(instance) {
322
257
  return instance && instance.type && instance.type.__IS_SEARCH_TEXT_INPUT__;
323
258
  }
324
259
 
325
- componentDidUpdate(prevProps) {
326
- if (this.props.labels !== prevProps.labels) {
327
- // eslint-disable-next-line react/no-did-update-set-state
328
- this.setState({
329
- labels: { ...this.state.labels,
330
- ...this.props.labels
331
- }
332
- });
333
- }
334
- }
335
-
336
- maybeRenderDismissIconButton() {
337
- const {
338
- searchText
339
- } = this.props;
340
- const {
341
- clearSearch
342
- } = this.state.labels;
343
-
344
- if (searchText.length > 0) {
345
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_icon_button__WEBPACK_IMPORTED_MODULE_4___default.a, {
346
- icon: _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__["icons"].dismiss,
347
- kind: "tertiary",
348
- onClick: this.handleDismiss,
349
- style: styles.dismissIcon,
350
- "aria-label": clearSearch
351
- });
352
- }
353
-
354
- return null;
355
- }
356
-
357
260
  render() {
358
261
  const {
262
+ labels,
263
+ onChange,
359
264
  onClick,
360
265
  itemRef,
361
266
  searchText,
362
267
  style,
363
268
  testId
364
269
  } = this.props;
365
- const {
366
- filter
367
- } = this.state.labels;
368
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
270
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_1___default.a, {
271
+ clearAriaLabel: labels.clearSearch,
272
+ onChange: onChange,
369
273
  onClick: onClick,
370
- style: [styles.inputContainer, this.state.focused && styles.focused, style]
371
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5___default.a, {
372
- icon: _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__["icons"].search,
373
- size: "medium",
374
- color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.offBlack64,
375
- style: styles.searchIcon,
376
- "aria-hidden": "true"
377
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", {
378
- type: "text",
379
- onChange: this.handleChange,
380
- onFocus: this.handleFocus,
381
- onBlur: this.handleBlur,
274
+ placeholder: labels.filter,
382
275
  ref: itemRef,
383
- placeholder: filter,
384
- value: searchText,
385
- className: Object(aphrodite__WEBPACK_IMPORTED_MODULE_1__["css"])(styles.inputStyleReset, _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__["styles"].LabelMedium),
386
- "data-test-id": testId
387
- }), this.maybeRenderDismissIconButton());
276
+ style: style,
277
+ testId: testId,
278
+ value: searchText
279
+ });
388
280
  }
389
281
 
390
282
  }
391
283
  SearchTextInput.defaultProps = {
392
284
  labels: {
393
- clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "d"].clearSearch,
394
- filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "d"].filter
285
+ clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_2__[/* defaultLabels */ "e"].clearSearch,
286
+ filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_2__[/* defaultLabels */ "e"].filter
395
287
  }
396
288
  };
397
289
  SearchTextInput.__IS_SEARCH_TEXT_INPUT__ = true;
398
- const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
399
- inputContainer: {
400
- flexDirection: "row",
401
- border: `1px solid ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.offBlack16}`,
402
- borderRadius: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default.a.xxxSmall_4,
403
- alignItems: "center",
404
- // The height of the text input is 40 in design spec and we need to
405
- // specify the height as well as minHeight to make sure the search text
406
- // input takes enough height to render. (otherwise, it will get
407
- // squashed)
408
- height: _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* DROPDOWN_ITEM_HEIGHT */ "a"],
409
- minHeight: _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* DROPDOWN_ITEM_HEIGHT */ "a"]
410
- },
411
- focused: {
412
- border: `1px solid ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.blue}`
413
- },
414
- searchIcon: {
415
- marginLeft: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default.a.xSmall_8,
416
- marginRight: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default.a.xSmall_8
417
- },
418
- dismissIcon: {
419
- margin: 0,
420
- ":hover": {
421
- border: "none"
422
- }
423
- },
424
- inputStyleReset: {
425
- display: "flex",
426
- flex: 1,
427
- background: "inherit",
428
- border: "none",
429
- outline: "none",
430
- "::placeholder": {
431
- color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.offBlack64
432
- },
433
- width: "100%",
434
- color: "inherit"
435
- }
436
- });
290
+
291
+ /***/ }),
292
+ /* 9 */
293
+ /***/ (function(module, exports) {
294
+
295
+ module.exports = require("@khanacademy/wonder-blocks-icon");
296
+
297
+ /***/ }),
298
+ /* 10 */
299
+ /***/ (function(module, exports) {
300
+
301
+ module.exports = require("@khanacademy/wonder-blocks-typography");
437
302
 
438
303
  /***/ }),
439
304
  /* 11 */
@@ -451,21 +316,21 @@ module.exports = require("@khanacademy/wonder-blocks-clickable");
451
316
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
452
317
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
453
318
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
454
- /* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
319
+ /* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24);
455
320
  /* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_2__);
456
- /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
321
+ /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
457
322
  /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_router__WEBPACK_IMPORTED_MODULE_3__);
458
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
323
+ /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
459
324
  /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__);
460
325
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
461
326
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__);
462
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9);
327
+ /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
463
328
  /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__);
464
329
  /* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11);
465
330
  /* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7__);
466
331
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5);
467
332
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_8__);
468
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2);
333
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1);
469
334
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
470
335
 
471
336
 
@@ -619,19 +484,19 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
619
484
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
620
485
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
621
486
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
622
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
487
+ /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
623
488
  /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
624
489
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
625
490
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__);
626
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
491
+ /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
627
492
  /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__);
628
493
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
629
494
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__);
630
495
  /* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11);
631
496
  /* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_6__);
632
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2);
633
- /* harmony import */ var _check_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24);
634
- /* harmony import */ var _checkbox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25);
497
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
498
+ /* harmony import */ var _check_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25);
499
+ /* harmony import */ var _checkbox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(26);
635
500
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
636
501
 
637
502
 
@@ -852,27 +717,28 @@ DropdownOpener.defaultProps = {
852
717
  "use strict";
853
718
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
854
719
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
855
- /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
720
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
856
721
  /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
857
722
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
858
723
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_2__);
859
- /* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
724
+ /* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
860
725
  /* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_window__WEBPACK_IMPORTED_MODULE_3__);
861
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
726
+ /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2);
862
727
  /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__);
863
728
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
864
729
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__);
865
730
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
866
731
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6__);
867
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9);
732
+ /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(10);
868
733
  /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_7__);
869
- /* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17);
734
+ /* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(18);
870
735
  /* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_8__);
871
- /* harmony import */ var _dropdown_core_virtualized_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(26);
872
- /* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7);
873
- /* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(10);
874
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(2);
875
- /* harmony import */ var _dropdown_popper_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(29);
736
+ /* harmony import */ var _dropdown_core_virtualized_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27);
737
+ /* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(6);
738
+ /* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8);
739
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(1);
740
+ /* harmony import */ var _dropdown_popper_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(30);
741
+ /* harmony import */ var _util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(16);
876
742
  // A menu that consists of action items
877
743
 
878
744
 
@@ -888,6 +754,7 @@ DropdownOpener.defaultProps = {
888
754
 
889
755
 
890
756
 
757
+
891
758
  /**
892
759
  * The number of options to apply the virtualized list to.
893
760
  *
@@ -985,7 +852,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
985
852
  const keyCode = event.which || event.keyCode; // If menu isn't open and user presses down, open the menu
986
853
 
987
854
  if (!open) {
988
- if (keyCode === _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].down) {
855
+ if (keyCode === _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "g"].down) {
989
856
  event.preventDefault();
990
857
  onOpenChanged(true);
991
858
  return;
@@ -996,7 +863,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
996
863
 
997
864
 
998
865
  switch (keyCode) {
999
- case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].tab:
866
+ case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "g"].tab:
1000
867
  // When we show SearchTextInput and that is focused and the
1001
868
  // searchText is entered at least one character, dismiss button
1002
869
  // is displayed. When user presses tab, we should move focus
@@ -1009,7 +876,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1009
876
  onOpenChanged(false);
1010
877
  return;
1011
878
 
1012
- case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].space:
879
+ case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "g"].space:
1013
880
  // When we display SearchTextInput and the focus is on it,
1014
881
  // we should let the user type space.
1015
882
  if (this.hasSearchBox() && this.focusedIndex === 0) {
@@ -1020,12 +887,12 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1020
887
  event.preventDefault();
1021
888
  return;
1022
889
 
1023
- case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].up:
890
+ case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "g"].up:
1024
891
  event.preventDefault();
1025
892
  this.focusPreviousItem();
1026
893
  return;
1027
894
 
1028
- case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].down:
895
+ case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "g"].down:
1029
896
  event.preventDefault();
1030
897
  this.focusNextItem();
1031
898
  return;
@@ -1040,7 +907,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1040
907
  const keyCode = event.which || event.keyCode;
1041
908
 
1042
909
  switch (keyCode) {
1043
- case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].space:
910
+ case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "g"].space:
1044
911
  // When we display SearchTextInput and the focus is on it,
1045
912
  // we should let the user type space.
1046
913
  if (this.hasSearchBox() && this.focusedIndex === 0) {
@@ -1051,7 +918,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1051
918
  event.preventDefault();
1052
919
  return;
1053
920
 
1054
- case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].escape:
921
+ case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "g"].escape:
1055
922
  // Close only the dropdown, not other elements that are
1056
923
  // listening for an escape press
1057
924
  if (open) {
@@ -1100,7 +967,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1100
967
  itemRefs: [],
1101
968
  sameItemsFocusable: false,
1102
969
  labels: {
1103
- noResults: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "d"].noResults,
970
+ noResults: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "e"].noResults,
1104
971
  ...props.labels
1105
972
  }
1106
973
  };
@@ -1386,7 +1253,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1386
1253
  this.focusCurrentItem();
1387
1254
  },
1388
1255
  // apply custom styles
1389
- style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "g"]
1256
+ style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "h"]
1390
1257
  });
1391
1258
  } // Render OptionItem and/or ActionItem elements.
1392
1259
 
@@ -1430,7 +1297,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1430
1297
  this.focusCurrentItem();
1431
1298
  },
1432
1299
  populatedProps: {
1433
- style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "g"],
1300
+ style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "h"],
1434
1301
  // pass the current ref down to the input element
1435
1302
  itemRef: this.state.itemRefs[focusIndex] ? this.state.itemRefs[focusIndex].ref : null
1436
1303
  }
@@ -1469,15 +1336,16 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1469
1336
  // It's only used if the element exists in the DOM
1470
1337
 
1471
1338
  const openerStyle = openerElement && window.getComputedStyle(openerElement);
1472
- const minDropdownWidth = openerStyle ? openerStyle.getPropertyValue("width") : 0;
1339
+ const minDropdownWidth = openerStyle ? openerStyle.getPropertyValue("width") : 0; // Vertical padding of the dropdown menu + borders
1340
+
1341
+ const initialHeight = 12;
1342
+ const maxDropdownHeight = Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_14__[/* getDropdownMenuHeight */ "b"])(this.props.items, initialHeight);
1473
1343
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6__["View"] // Stop propagation to prevent the mouseup listener on the
1474
1344
  // document from closing the menu.
1475
1345
  , {
1476
1346
  onMouseUp: this.handleDropdownMouseUp,
1477
1347
  role: this.props.role,
1478
- style: [styles.dropdown, light && styles.light, isReferenceHidden && styles.hidden, {
1479
- minWidth: minDropdownWidth
1480
- }, dropdownStyle]
1348
+ style: [styles.dropdown, light && styles.light, isReferenceHidden && styles.hidden, Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_14__[/* generateDropdownMenuStyles */ "a"])(minDropdownWidth, maxDropdownHeight), dropdownStyle]
1481
1349
  }, listRenderer, this.maybeRenderNoResults());
1482
1350
  }
1483
1351
 
@@ -1521,7 +1389,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
1521
1389
  DropdownCore.defaultProps = {
1522
1390
  alignment: "left",
1523
1391
  labels: {
1524
- noResults: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "d"].noResults
1392
+ noResults: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "e"].noResults
1525
1393
  },
1526
1394
  light: false
1527
1395
  };
@@ -1556,18 +1424,77 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
1556
1424
 
1557
1425
  /***/ }),
1558
1426
  /* 16 */
1427
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1428
+
1429
+ "use strict";
1430
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getDropdownMenuHeight; });
1431
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return generateDropdownMenuStyles; });
1432
+ /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
1433
+ /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_0__);
1434
+ /* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
1435
+ /* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
1436
+ /* harmony import */ var _components_search_text_input_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8);
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+ /**
1443
+ * The list height that is automatically calculated depending on the
1444
+ * component's type of each item (e.g. Separator, Option, Search, etc)
1445
+ *
1446
+ * @param {Array<DropdownItem>} items - The list of items to calculate the height
1447
+ * @param {number} initialHeight - The initial height of the list
1448
+ *
1449
+ * @returns {number} The list height
1450
+ */
1451
+ function getDropdownMenuHeight(items, initialHeight = 0) {
1452
+ // calculate using the first 10 items on the array as we want to display
1453
+ // this number of elements in the visible area
1454
+ return items.slice(0, _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* MAX_VISIBLE_ITEMS */ "b"]).reduce((sum, item) => {
1455
+ if (_components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].isClassOf(item.component)) {
1456
+ return sum + _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* SEPARATOR_ITEM_HEIGHT */ "d"];
1457
+ } else if (_components_search_text_input_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].isClassOf(item.component)) {
1458
+ // search text input height
1459
+ return sum + _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* SEARCH_ITEM_HEIGHT */ "c"];
1460
+ } else {
1461
+ return sum + _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* DROPDOWN_ITEM_HEIGHT */ "a"];
1462
+ }
1463
+ }, initialHeight);
1464
+ }
1465
+ /**
1466
+ * Wraps the dynamic styles in an Aphrodite style sheet so we can properly apply
1467
+ * the styles to a merged stylesheet (instead of inlining the styles).
1468
+ *
1469
+ * @param {StyleType} customStyles - The custom styles to apply to the dropdown
1470
+ * menu.
1471
+ * @returns The Aphrodite stylesheet for the dropdown menu.
1472
+ */
1473
+
1474
+ function generateDropdownMenuStyles(minWidth, maxHeight) {
1475
+ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_0__["StyleSheet"].create({
1476
+ dropdownMenu: {
1477
+ minWidth,
1478
+ maxHeight
1479
+ }
1480
+ });
1481
+ return styles.dropdownMenu;
1482
+ }
1483
+
1484
+ /***/ }),
1485
+ /* 17 */
1559
1486
  /***/ (function(module, exports) {
1560
1487
 
1561
1488
  module.exports = require("react-router");
1562
1489
 
1563
1490
  /***/ }),
1564
- /* 17 */
1491
+ /* 18 */
1565
1492
  /***/ (function(module, exports) {
1566
1493
 
1567
1494
  module.exports = require("@khanacademy/wonder-blocks-timing");
1568
1495
 
1569
1496
  /***/ }),
1570
- /* 18 */
1497
+ /* 19 */
1571
1498
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1572
1499
 
1573
1500
  "use strict";
@@ -1576,21 +1503,21 @@ module.exports = require("@khanacademy/wonder-blocks-timing");
1576
1503
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1577
1504
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
1578
1505
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
1579
- /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
1506
+ /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
1580
1507
  /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_router__WEBPACK_IMPORTED_MODULE_2__);
1581
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
1508
+ /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
1582
1509
  /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__);
1583
1510
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
1584
1511
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__);
1585
1512
  /* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(11);
1586
1513
  /* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5__);
1587
- /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6);
1514
+ /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9);
1588
1515
  /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__);
1589
1516
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3);
1590
1517
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__);
1591
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9);
1518
+ /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(10);
1592
1519
  /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__);
1593
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2);
1520
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1);
1594
1521
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1595
1522
 
1596
1523
 
@@ -1805,20 +1732,20 @@ const _generateStyles = (light, placeholder) => {
1805
1732
  };
1806
1733
 
1807
1734
  /***/ }),
1808
- /* 19 */
1735
+ /* 20 */
1809
1736
  /***/ (function(module, exports) {
1810
1737
 
1811
1738
  module.exports = require("react-window");
1812
1739
 
1813
1740
  /***/ }),
1814
- /* 20 */
1741
+ /* 21 */
1815
1742
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1816
1743
 
1817
1744
  "use strict";
1818
1745
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionMenu; });
1819
1746
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1820
1747
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1821
- /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
1748
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
1822
1749
  /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
1823
1750
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
1824
1751
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_2__);
@@ -1826,7 +1753,7 @@ module.exports = require("react-window");
1826
1753
  /* harmony import */ var _action_item_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);
1827
1754
  /* harmony import */ var _option_item_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13);
1828
1755
  /* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(15);
1829
- /* harmony import */ var _action_menu_opener_core_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32);
1756
+ /* harmony import */ var _action_menu_opener_core_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33);
1830
1757
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1831
1758
 
1832
1759
 
@@ -2025,20 +1952,20 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
2025
1952
  });
2026
1953
 
2027
1954
  /***/ }),
2028
- /* 21 */
1955
+ /* 22 */
2029
1956
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2030
1957
 
2031
1958
  "use strict";
2032
1959
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SingleSelect; });
2033
1960
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2034
1961
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2035
- /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
1962
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
2036
1963
  /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
2037
1964
  /* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
2038
1965
  /* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
2039
- /* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
2040
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2);
2041
- /* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
1966
+ /* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
1967
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1);
1968
+ /* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8);
2042
1969
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2043
1970
 
2044
1971
 
@@ -2200,8 +2127,8 @@ class SingleSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
2200
2127
  onChange: this.handleSearchTextChanged,
2201
2128
  searchText: this.state.searchText,
2202
2129
  labels: {
2203
- clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* defaultLabels */ "d"].clearSearch,
2204
- filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* defaultLabels */ "d"].filter
2130
+ clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* defaultLabels */ "e"].clearSearch,
2131
+ filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* defaultLabels */ "e"].filter
2205
2132
  }
2206
2133
  }),
2207
2134
  focusable: true,
@@ -2278,7 +2205,7 @@ class SingleSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
2278
2205
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_dropdown_core_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], {
2279
2206
  role: "listbox",
2280
2207
  alignment: alignment,
2281
- dropdownStyle: [isFilterable && _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* filterableDropdownStyle */ "e"], _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* selectDropdownStyle */ "h"], dropdownStyle],
2208
+ dropdownStyle: [isFilterable && _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* filterableDropdownStyle */ "f"], _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* selectDropdownStyle */ "i"], dropdownStyle],
2282
2209
  initialFocusedIndex: this.selectedIndex,
2283
2210
  items: items,
2284
2211
  light: light,
@@ -2301,22 +2228,22 @@ SingleSelect.defaultProps = {
2301
2228
  };
2302
2229
 
2303
2230
  /***/ }),
2304
- /* 22 */
2231
+ /* 23 */
2305
2232
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2306
2233
 
2307
2234
  "use strict";
2308
2235
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MultiSelect; });
2309
2236
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2310
2237
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2311
- /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
2238
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
2312
2239
  /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
2313
2240
  /* harmony import */ var _action_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
2314
2241
  /* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
2315
2242
  /* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
2316
- /* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
2317
- /* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(18);
2318
- /* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7);
2319
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
2243
+ /* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
2244
+ /* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19);
2245
+ /* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6);
2246
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
2320
2247
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2321
2248
 
2322
2249
 
@@ -2426,13 +2353,13 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
2426
2353
  searchText: "",
2427
2354
  lastSelectedValues: [],
2428
2355
  // merge custom labels with the default ones
2429
- labels: { ..._util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "d"],
2356
+ labels: { ..._util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "e"],
2430
2357
  ...props.labels
2431
2358
  },
2432
2359
  openerElement: null
2433
2360
  }; // merge custom labels with the default ones
2434
2361
 
2435
- this.labels = { ..._util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "d"],
2362
+ this.labels = { ..._util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "e"],
2436
2363
  ...props.labels
2437
2364
  };
2438
2365
  }
@@ -2682,7 +2609,7 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
2682
2609
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_dropdown_core_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], {
2683
2610
  role: "listbox",
2684
2611
  alignment: alignment,
2685
- dropdownStyle: [isFilterable && _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* filterableDropdownStyle */ "e"], _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* selectDropdownStyle */ "h"], dropdownStyle],
2612
+ dropdownStyle: [isFilterable && _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* filterableDropdownStyle */ "f"], _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* selectDropdownStyle */ "i"], dropdownStyle],
2686
2613
  items: [].concat(this.getSearchField(), this.getShortcuts(numOptions), filteredItems),
2687
2614
  light: light,
2688
2615
  onOpenChanged: this.handleOpenChanged,
@@ -2709,13 +2636,13 @@ MultiSelect.defaultProps = {
2709
2636
  };
2710
2637
 
2711
2638
  /***/ }),
2712
- /* 23 */
2639
+ /* 24 */
2713
2640
  /***/ (function(module, exports) {
2714
2641
 
2715
2642
  module.exports = require("react-router-dom");
2716
2643
 
2717
2644
  /***/ }),
2718
- /* 24 */
2645
+ /* 25 */
2719
2646
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2720
2647
 
2721
2648
  "use strict";
@@ -2724,9 +2651,9 @@ module.exports = require("react-router-dom");
2724
2651
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2725
2652
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
2726
2653
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
2727
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
2654
+ /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
2728
2655
  /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
2729
- /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
2656
+ /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
2730
2657
  /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__);
2731
2658
 
2732
2659
 
@@ -2772,7 +2699,7 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
2772
2699
  });
2773
2700
 
2774
2701
  /***/ }),
2775
- /* 25 */
2702
+ /* 26 */
2776
2703
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2777
2704
 
2778
2705
  "use strict";
@@ -2781,11 +2708,11 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
2781
2708
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2782
2709
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
2783
2710
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
2784
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
2711
+ /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
2785
2712
  /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
2786
2713
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
2787
2714
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__);
2788
- /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6);
2715
+ /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
2789
2716
  /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__);
2790
2717
 
2791
2718
 
@@ -2865,22 +2792,24 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
2865
2792
  });
2866
2793
 
2867
2794
  /***/ }),
2868
- /* 26 */
2795
+ /* 27 */
2869
2796
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2870
2797
 
2871
2798
  "use strict";
2872
2799
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2873
2800
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2874
- /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
2801
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
2875
2802
  /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
2876
- /* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19);
2803
+ /* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
2877
2804
  /* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_window__WEBPACK_IMPORTED_MODULE_2__);
2878
- /* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
2805
+ /* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
2879
2806
  /* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__);
2880
- /* harmony import */ var _dropdown_core_virtualized_item_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27);
2881
- /* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
2882
- /* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7);
2883
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2);
2807
+ /* harmony import */ var _dropdown_core_virtualized_item_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28);
2808
+ /* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
2809
+ /* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6);
2810
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
2811
+ /* harmony import */ var _util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(16);
2812
+
2884
2813
 
2885
2814
 
2886
2815
 
@@ -2890,25 +2819,13 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
2890
2819
 
2891
2820
 
2892
2821
 
2893
- /**
2894
- * Maximum visible items inside the dropdown list.
2895
- * Based on the defined height that we're using, this is the maximium
2896
- * number of items that can fit into the visible porition of the
2897
- * dropdowns list box.
2898
- */
2899
- const MAX_VISIBLE_ITEMS = 9;
2900
2822
  /**
2901
2823
  * A react-window's List wrapper that instantiates the virtualized list and
2902
2824
  * dynamically calculates the item height depending on the type
2903
2825
  */
2904
-
2905
2826
  class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
2906
- constructor(...args) {
2907
- super(...args);
2908
- this.state = {
2909
- height: this.getHeight(),
2910
- width: this.props.width
2911
- };
2827
+ constructor(props) {
2828
+ super(props);
2912
2829
 
2913
2830
  this.getItemSize = index => {
2914
2831
  // get the current item in the list
@@ -2916,15 +2833,20 @@ class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
2916
2833
 
2917
2834
  if (_separator_item_js__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].isClassOf(item.component)) {
2918
2835
  // this is the separator's height (1px) + vertical margin (8px)
2919
- return _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* SEPARATOR_ITEM_HEIGHT */ "c"];
2836
+ return _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* SEPARATOR_ITEM_HEIGHT */ "d"];
2920
2837
  } else if (_search_text_input_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].isClassOf(item.component)) {
2921
2838
  // search text input height
2922
- return _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* SEARCH_ITEM_HEIGHT */ "b"];
2839
+ return _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* SEARCH_ITEM_HEIGHT */ "c"];
2923
2840
  } else {
2924
2841
  // default dropdown item height
2925
2842
  return _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* DROPDOWN_ITEM_HEIGHT */ "a"];
2926
2843
  }
2927
2844
  };
2845
+
2846
+ this.state = {
2847
+ height: Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_8__[/* getDropdownMenuHeight */ "b"])(props.data),
2848
+ width: props.width
2849
+ };
2928
2850
  }
2929
2851
 
2930
2852
  componentDidMount() {
@@ -2978,31 +2900,11 @@ class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
2978
2900
 
2979
2901
  setHeight() {
2980
2902
  // calculate dropdown's height depending on the type of items
2981
- const height = this.getHeight();
2903
+ const height = Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_8__[/* getDropdownMenuHeight */ "b"])(this.props.data);
2982
2904
  this.setState({
2983
2905
  height
2984
2906
  });
2985
2907
  }
2986
- /**
2987
- * The list height that is automatically calculated depending on the
2988
- * component's type of each item (e.g. Separator, Option, Search, etc)
2989
- */
2990
-
2991
-
2992
- getHeight() {
2993
- // calculate using the first 10 items on the array as we want to display
2994
- // this number of elements in the visible area
2995
- return this.props.data.slice(0, MAX_VISIBLE_ITEMS).reduce((sum, item) => {
2996
- if (_separator_item_js__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].isClassOf(item.component)) {
2997
- return sum + _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* SEPARATOR_ITEM_HEIGHT */ "c"];
2998
- } else if (_search_text_input_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].isClassOf(item.component)) {
2999
- // search text input height
3000
- return sum + _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* SEARCH_ITEM_HEIGHT */ "b"];
3001
- } else {
3002
- return sum + _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* DROPDOWN_ITEM_HEIGHT */ "a"];
3003
- }
3004
- }, 0);
3005
- }
3006
2908
  /**
3007
2909
  * Calculates item height
3008
2910
  */
@@ -3028,7 +2930,7 @@ class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
3028
2930
  return -1;
3029
2931
  }) // 3. only render the possible visible items to minimize layout
3030
2932
  // jumps
3031
- .slice(0, MAX_VISIBLE_ITEMS); // Append longest items to calculate the container width.
2933
+ .slice(0, _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* MAX_VISIBLE_ITEMS */ "b"]); // Append longest items to calculate the container width.
3032
2934
  // We need to hide these sorted elements to avoid any FOUC.
3033
2935
 
3034
2936
  return longestItems.map(item => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](item, {
@@ -3088,13 +2990,13 @@ class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
3088
2990
  /* harmony default export */ __webpack_exports__["a"] = (Object(_khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__["withActionScheduler"])(DropdownCoreVirtualized));
3089
2991
 
3090
2992
  /***/ }),
3091
- /* 27 */
2993
+ /* 28 */
3092
2994
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3093
2995
 
3094
2996
  "use strict";
3095
2997
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3096
2998
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3097
- /* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
2999
+ /* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
3098
3000
 
3099
3001
 
3100
3002
 
@@ -3142,24 +3044,24 @@ class DropdownVirtualizedItem extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
3142
3044
  /* harmony default export */ __webpack_exports__["a"] = (DropdownVirtualizedItem);
3143
3045
 
3144
3046
  /***/ }),
3145
- /* 28 */
3047
+ /* 29 */
3146
3048
  /***/ (function(module, exports) {
3147
3049
 
3148
- module.exports = require("@khanacademy/wonder-blocks-icon-button");
3050
+ module.exports = require("@khanacademy/wonder-blocks-search-field");
3149
3051
 
3150
3052
  /***/ }),
3151
- /* 29 */
3053
+ /* 30 */
3152
3054
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3153
3055
 
3154
3056
  "use strict";
3155
3057
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DropdownPopper; });
3156
3058
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
3157
3059
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3158
- /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
3060
+ /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
3159
3061
  /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
3160
- /* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30);
3062
+ /* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31);
3161
3063
  /* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_popper__WEBPACK_IMPORTED_MODULE_2__);
3162
- /* harmony import */ var _khanacademy_wonder_blocks_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31);
3064
+ /* harmony import */ var _khanacademy_wonder_blocks_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32);
3163
3065
  /* harmony import */ var _khanacademy_wonder_blocks_modal__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_modal__WEBPACK_IMPORTED_MODULE_3__);
3164
3066
 
3165
3067
 
@@ -3224,19 +3126,19 @@ function DropdownPopper({
3224
3126
  }
3225
3127
 
3226
3128
  /***/ }),
3227
- /* 30 */
3129
+ /* 31 */
3228
3130
  /***/ (function(module, exports) {
3229
3131
 
3230
3132
  module.exports = require("react-popper");
3231
3133
 
3232
3134
  /***/ }),
3233
- /* 31 */
3135
+ /* 32 */
3234
3136
  /***/ (function(module, exports) {
3235
3137
 
3236
3138
  module.exports = require("@khanacademy/wonder-blocks-modal");
3237
3139
 
3238
3140
  /***/ }),
3239
- /* 32 */
3141
+ /* 33 */
3240
3142
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3241
3143
 
3242
3144
  "use strict";
@@ -3245,19 +3147,19 @@ module.exports = require("@khanacademy/wonder-blocks-modal");
3245
3147
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
3246
3148
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
3247
3149
  /* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
3248
- /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
3150
+ /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
3249
3151
  /* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__);
3250
- /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
3152
+ /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
3251
3153
  /* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__);
3252
3154
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
3253
3155
  /* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__);
3254
- /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6);
3156
+ /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
3255
3157
  /* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__);
3256
3158
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
3257
3159
  /* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6__);
3258
- /* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33);
3160
+ /* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(34);
3259
3161
  /* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_7__);
3260
- /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
3162
+ /* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
3261
3163
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3262
3164
 
3263
3165
 
@@ -3411,13 +3313,13 @@ const _generateStyles = color => {
3411
3313
  };
3412
3314
 
3413
3315
  /***/ }),
3414
- /* 33 */
3316
+ /* 34 */
3415
3317
  /***/ (function(module, exports) {
3416
3318
 
3417
3319
  module.exports = require("@khanacademy/wonder-blocks-layout");
3418
3320
 
3419
3321
  /***/ }),
3420
- /* 34 */
3322
+ /* 35 */
3421
3323
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3422
3324
 
3423
3325
  "use strict";
@@ -3428,16 +3330,16 @@ __webpack_require__.r(__webpack_exports__);
3428
3330
  /* harmony import */ var _components_option_item_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
3429
3331
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OptionItem", function() { return _components_option_item_js__WEBPACK_IMPORTED_MODULE_1__["a"]; });
3430
3332
 
3431
- /* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
3333
+ /* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
3432
3334
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeparatorItem", function() { return _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__["a"]; });
3433
3335
 
3434
- /* harmony import */ var _components_action_menu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
3336
+ /* harmony import */ var _components_action_menu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21);
3435
3337
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionMenu", function() { return _components_action_menu_js__WEBPACK_IMPORTED_MODULE_3__["a"]; });
3436
3338
 
3437
- /* harmony import */ var _components_single_select_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21);
3339
+ /* harmony import */ var _components_single_select_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22);
3438
3340
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SingleSelect", function() { return _components_single_select_js__WEBPACK_IMPORTED_MODULE_4__["a"]; });
3439
3341
 
3440
- /* harmony import */ var _components_multi_select_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22);
3342
+ /* harmony import */ var _components_multi_select_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23);
3441
3343
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelect", function() { return _components_multi_select_js__WEBPACK_IMPORTED_MODULE_5__["a"]; });
3442
3344
 
3443
3345