@khanacademy/wonder-blocks-dropdown 2.6.10 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/es/index.js +36 -140
- package/dist/index.js +88 -198
- package/package.json +10 -9
- package/src/components/__tests__/dropdown-core-virtualized.test.js +0 -9
- package/src/components/__tests__/search-text-input.test.js +124 -57
- package/src/components/dropdown-core.js +12 -0
- package/src/components/search-text-input.js +34 -146
- package/src/components/single-select.stories.js +9 -2
- package/src/util/constants.js +3 -0
package/dist/index.js
CHANGED
|
@@ -127,7 +127,10 @@ const filterableDropdownStyle = {
|
|
|
127
127
|
};
|
|
128
128
|
const searchInputStyle = {
|
|
129
129
|
margin: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xSmall_8,
|
|
130
|
-
marginTop: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xxxSmall_4
|
|
130
|
+
marginTop: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default.a.xxxSmall_4,
|
|
131
|
+
// Set `minHeight` to "auto" to stop the search field from having
|
|
132
|
+
// a height of 0 and being cut off.
|
|
133
|
+
minHeight: "auto"
|
|
131
134
|
}; // The default item height
|
|
132
135
|
|
|
133
136
|
const DROPDOWN_ITEM_HEIGHT = 40;
|
|
@@ -178,12 +181,6 @@ module.exports = require("@khanacademy/wonder-blocks-core");
|
|
|
178
181
|
|
|
179
182
|
/***/ }),
|
|
180
183
|
/* 6 */
|
|
181
|
-
/***/ (function(module, exports) {
|
|
182
|
-
|
|
183
|
-
module.exports = require("@khanacademy/wonder-blocks-icon");
|
|
184
|
-
|
|
185
|
-
/***/ }),
|
|
186
|
-
/* 7 */
|
|
187
184
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
188
185
|
|
|
189
186
|
"use strict";
|
|
@@ -238,209 +235,90 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
238
235
|
});
|
|
239
236
|
|
|
240
237
|
/***/ }),
|
|
241
|
-
/*
|
|
238
|
+
/* 7 */
|
|
242
239
|
/***/ (function(module, exports) {
|
|
243
240
|
|
|
244
241
|
module.exports = require("react-dom");
|
|
245
242
|
|
|
246
243
|
/***/ }),
|
|
247
|
-
/*
|
|
248
|
-
/***/ (function(module, exports) {
|
|
249
|
-
|
|
250
|
-
module.exports = require("@khanacademy/wonder-blocks-typography");
|
|
251
|
-
|
|
252
|
-
/***/ }),
|
|
253
|
-
/* 10 */
|
|
244
|
+
/* 8 */
|
|
254
245
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
255
246
|
|
|
256
247
|
"use strict";
|
|
257
248
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SearchTextInput; });
|
|
258
249
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
259
250
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
260
|
-
/* harmony import */ var
|
|
261
|
-
/* harmony import */ var
|
|
262
|
-
/* harmony import */ var
|
|
263
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__);
|
|
264
|
-
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
|
|
265
|
-
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__);
|
|
266
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29);
|
|
267
|
-
/* 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__);
|
|
268
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6);
|
|
269
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__);
|
|
270
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
|
|
271
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6__);
|
|
272
|
-
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3);
|
|
273
|
-
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__);
|
|
274
|
-
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
|
|
251
|
+
/* harmony import */ var _khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(29);
|
|
252
|
+
/* 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__);
|
|
253
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
275
254
|
// A TextField with a search icon on its left side and X icon on its right side
|
|
276
255
|
|
|
277
256
|
|
|
278
257
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
258
|
class SearchTextInput extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
286
|
-
constructor(...args) {
|
|
287
|
-
super(...args);
|
|
288
|
-
this.state = {
|
|
289
|
-
focused: false,
|
|
290
|
-
labels: {
|
|
291
|
-
clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "e"].clearSearch,
|
|
292
|
-
filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_8__[/* defaultLabels */ "e"].filter,
|
|
293
|
-
...this.props.labels
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
|
|
297
|
-
this.handleChange = e => {
|
|
298
|
-
e.preventDefault();
|
|
299
|
-
this.props.onChange(e.target.value);
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
this.handleDismiss = () => {
|
|
303
|
-
const {
|
|
304
|
-
onClick,
|
|
305
|
-
onChange
|
|
306
|
-
} = this.props; // Empty the search text and focus the SearchTextInput
|
|
307
|
-
|
|
308
|
-
onChange("");
|
|
309
|
-
|
|
310
|
-
if (onClick) {
|
|
311
|
-
onClick();
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
this.handleBlur = e => {
|
|
316
|
-
this.setState({
|
|
317
|
-
focused: false
|
|
318
|
-
});
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
this.handleFocus = e => {
|
|
322
|
-
this.setState({
|
|
323
|
-
focused: true
|
|
324
|
-
});
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
|
|
328
259
|
static isClassOf(instance) {
|
|
329
260
|
return instance && instance.type && instance.type.__IS_SEARCH_TEXT_INPUT__;
|
|
330
261
|
}
|
|
331
262
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
} = this.props;
|
|
347
|
-
const {
|
|
348
|
-
clearSearch
|
|
349
|
-
} = this.state.labels;
|
|
350
|
-
|
|
351
|
-
if (searchText.length > 0) {
|
|
352
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_icon_button__WEBPACK_IMPORTED_MODULE_4___default.a, {
|
|
353
|
-
icon: _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__["icons"].dismiss,
|
|
354
|
-
kind: "tertiary",
|
|
355
|
-
onClick: this.handleDismiss,
|
|
356
|
-
style: styles.dismissIcon,
|
|
357
|
-
"aria-label": clearSearch
|
|
358
|
-
});
|
|
263
|
+
// TODO(WB-1310): Remove `componentDidMount` autofocus on the search field
|
|
264
|
+
// after making the search field sticky.
|
|
265
|
+
componentDidMount() {
|
|
266
|
+
// We need to re-focus on the text input after it mounts because of
|
|
267
|
+
// the case in which the dropdown switches between virtualized and
|
|
268
|
+
// non-virtualized. It can rerender the search field as the user is
|
|
269
|
+
// typing based on the number of search results, which results
|
|
270
|
+
// in losing focus on the field so the user can't type anymore.
|
|
271
|
+
// To work around this issue, this temporary fix auto-focuses on the
|
|
272
|
+
// search field on mount.
|
|
273
|
+
if (this.props.autofocus) {
|
|
274
|
+
var _this$props$itemRef;
|
|
275
|
+
|
|
276
|
+
(_this$props$itemRef = this.props.itemRef) == null ? void 0 : _this$props$itemRef.current.focus();
|
|
359
277
|
}
|
|
360
|
-
|
|
361
|
-
return null;
|
|
362
278
|
}
|
|
363
279
|
|
|
364
280
|
render() {
|
|
365
281
|
const {
|
|
282
|
+
labels,
|
|
283
|
+
onChange,
|
|
366
284
|
onClick,
|
|
367
285
|
itemRef,
|
|
368
286
|
searchText,
|
|
369
287
|
style,
|
|
370
288
|
testId
|
|
371
289
|
} = this.props;
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__["View"], {
|
|
290
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_1___default.a, {
|
|
291
|
+
clearAriaLabel: labels.clearSearch,
|
|
292
|
+
onChange: onChange,
|
|
376
293
|
onClick: onClick,
|
|
377
|
-
|
|
378
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5___default.a, {
|
|
379
|
-
icon: _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__["icons"].search,
|
|
380
|
-
size: "medium",
|
|
381
|
-
color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.offBlack64,
|
|
382
|
-
style: styles.searchIcon,
|
|
383
|
-
"aria-hidden": "true"
|
|
384
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", {
|
|
385
|
-
type: "text",
|
|
386
|
-
onChange: this.handleChange,
|
|
387
|
-
onFocus: this.handleFocus,
|
|
388
|
-
onBlur: this.handleBlur,
|
|
294
|
+
placeholder: labels.filter,
|
|
389
295
|
ref: itemRef,
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}), this.maybeRenderDismissIconButton());
|
|
296
|
+
style: style,
|
|
297
|
+
testId: testId,
|
|
298
|
+
value: searchText
|
|
299
|
+
});
|
|
395
300
|
}
|
|
396
301
|
|
|
397
302
|
}
|
|
398
303
|
SearchTextInput.defaultProps = {
|
|
399
304
|
labels: {
|
|
400
|
-
clearSearch:
|
|
401
|
-
filter:
|
|
305
|
+
clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_2__[/* defaultLabels */ "e"].clearSearch,
|
|
306
|
+
filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_2__[/* defaultLabels */ "e"].filter
|
|
402
307
|
}
|
|
403
308
|
};
|
|
404
309
|
SearchTextInput.__IS_SEARCH_TEXT_INPUT__ = true;
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
},
|
|
418
|
-
focused: {
|
|
419
|
-
border: `1px solid ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.blue}`
|
|
420
|
-
},
|
|
421
|
-
searchIcon: {
|
|
422
|
-
marginLeft: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default.a.xSmall_8,
|
|
423
|
-
marginRight: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default.a.xSmall_8
|
|
424
|
-
},
|
|
425
|
-
dismissIcon: {
|
|
426
|
-
margin: 0,
|
|
427
|
-
":hover": {
|
|
428
|
-
border: "none"
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
|
-
inputStyleReset: {
|
|
432
|
-
display: "flex",
|
|
433
|
-
flex: 1,
|
|
434
|
-
background: "inherit",
|
|
435
|
-
border: "none",
|
|
436
|
-
outline: "none",
|
|
437
|
-
"::placeholder": {
|
|
438
|
-
color: _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_6___default.a.offBlack64
|
|
439
|
-
},
|
|
440
|
-
width: "100%",
|
|
441
|
-
color: "inherit"
|
|
442
|
-
}
|
|
443
|
-
});
|
|
310
|
+
|
|
311
|
+
/***/ }),
|
|
312
|
+
/* 9 */
|
|
313
|
+
/***/ (function(module, exports) {
|
|
314
|
+
|
|
315
|
+
module.exports = require("@khanacademy/wonder-blocks-icon");
|
|
316
|
+
|
|
317
|
+
/***/ }),
|
|
318
|
+
/* 10 */
|
|
319
|
+
/***/ (function(module, exports) {
|
|
320
|
+
|
|
321
|
+
module.exports = require("@khanacademy/wonder-blocks-typography");
|
|
444
322
|
|
|
445
323
|
/***/ }),
|
|
446
324
|
/* 11 */
|
|
@@ -466,7 +344,7 @@ module.exports = require("@khanacademy/wonder-blocks-clickable");
|
|
|
466
344
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__);
|
|
467
345
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
|
|
468
346
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__);
|
|
469
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
347
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
|
|
470
348
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__);
|
|
471
349
|
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11);
|
|
472
350
|
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7__);
|
|
@@ -630,7 +508,7 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
630
508
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
|
|
631
509
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
|
|
632
510
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__);
|
|
633
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
511
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
|
|
634
512
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__);
|
|
635
513
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
|
|
636
514
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__);
|
|
@@ -859,7 +737,7 @@ DropdownOpener.defaultProps = {
|
|
|
859
737
|
"use strict";
|
|
860
738
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
861
739
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
862
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
740
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
863
741
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
864
742
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
|
|
865
743
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_2__);
|
|
@@ -871,13 +749,13 @@ DropdownOpener.defaultProps = {
|
|
|
871
749
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__);
|
|
872
750
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
|
|
873
751
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6__);
|
|
874
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
752
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(10);
|
|
875
753
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_7__);
|
|
876
754
|
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(18);
|
|
877
755
|
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_8__);
|
|
878
756
|
/* harmony import */ var _dropdown_core_virtualized_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(27);
|
|
879
|
-
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
|
880
|
-
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
757
|
+
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(6);
|
|
758
|
+
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8);
|
|
881
759
|
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(1);
|
|
882
760
|
/* harmony import */ var _dropdown_popper_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(30);
|
|
883
761
|
/* harmony import */ var _util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(16);
|
|
@@ -1395,7 +1273,13 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1395
1273
|
this.focusCurrentItem();
|
|
1396
1274
|
},
|
|
1397
1275
|
// apply custom styles
|
|
1398
|
-
style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "h"]
|
|
1276
|
+
style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "h"],
|
|
1277
|
+
// TODO(WB-1310): Remove the autofocus prop after making
|
|
1278
|
+
// the search field sticky.
|
|
1279
|
+
// Currently autofocusing on the search field to work
|
|
1280
|
+
// around it losing focus on mount when switching between
|
|
1281
|
+
// virtualized and non-virtualized dropdown filter results.
|
|
1282
|
+
autofocus: this.focusedIndex === 0
|
|
1399
1283
|
});
|
|
1400
1284
|
} // Render OptionItem and/or ActionItem elements.
|
|
1401
1285
|
|
|
@@ -1441,7 +1325,13 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1441
1325
|
populatedProps: {
|
|
1442
1326
|
style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "h"],
|
|
1443
1327
|
// pass the current ref down to the input element
|
|
1444
|
-
itemRef: this.state.itemRefs[focusIndex] ? this.state.itemRefs[focusIndex].ref : null
|
|
1328
|
+
itemRef: this.state.itemRefs[focusIndex] ? this.state.itemRefs[focusIndex].ref : null,
|
|
1329
|
+
// TODO(WB-1310): Remove the autofocus prop after making
|
|
1330
|
+
// the search field sticky.
|
|
1331
|
+
// Currently autofocusing on the search field to work
|
|
1332
|
+
// around it losing focus on mount when switching between
|
|
1333
|
+
// virtualized and non-virtualized dropdown filter results.
|
|
1334
|
+
autofocus: this.focusedIndex === 0
|
|
1445
1335
|
}
|
|
1446
1336
|
};
|
|
1447
1337
|
}
|
|
@@ -1574,8 +1464,8 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
|
1574
1464
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
|
|
1575
1465
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_0__);
|
|
1576
1466
|
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
|
1577
|
-
/* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
1578
|
-
/* harmony import */ var _components_search_text_input_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
1467
|
+
/* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
1468
|
+
/* harmony import */ var _components_search_text_input_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8);
|
|
1579
1469
|
|
|
1580
1470
|
|
|
1581
1471
|
|
|
@@ -1653,11 +1543,11 @@ module.exports = require("@khanacademy/wonder-blocks-timing");
|
|
|
1653
1543
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
1654
1544
|
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(11);
|
|
1655
1545
|
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5__);
|
|
1656
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
1546
|
+
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9);
|
|
1657
1547
|
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__);
|
|
1658
1548
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3);
|
|
1659
1549
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__);
|
|
1660
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
1550
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(10);
|
|
1661
1551
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__);
|
|
1662
1552
|
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1);
|
|
1663
1553
|
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); }
|
|
@@ -1887,7 +1777,7 @@ module.exports = require("react-window");
|
|
|
1887
1777
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionMenu; });
|
|
1888
1778
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
1889
1779
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1890
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1780
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
1891
1781
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
1892
1782
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
|
|
1893
1783
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_2__);
|
|
@@ -2101,13 +1991,13 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
|
2101
1991
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SingleSelect; });
|
|
2102
1992
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
2103
1993
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2104
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1994
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
2105
1995
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
2106
1996
|
/* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(15);
|
|
2107
1997
|
/* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
|
|
2108
1998
|
/* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(19);
|
|
2109
1999
|
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1);
|
|
2110
|
-
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
2000
|
+
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8);
|
|
2111
2001
|
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); }
|
|
2112
2002
|
|
|
2113
2003
|
|
|
@@ -2377,14 +2267,14 @@ SingleSelect.defaultProps = {
|
|
|
2377
2267
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MultiSelect; });
|
|
2378
2268
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
2379
2269
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2380
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
2270
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
2381
2271
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
2382
2272
|
/* harmony import */ var _action_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
|
|
2383
2273
|
/* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15);
|
|
2384
2274
|
/* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14);
|
|
2385
|
-
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
2275
|
+
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
|
|
2386
2276
|
/* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19);
|
|
2387
|
-
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
2277
|
+
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6);
|
|
2388
2278
|
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
|
|
2389
2279
|
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); }
|
|
2390
2280
|
|
|
@@ -2795,7 +2685,7 @@ module.exports = require("react-router-dom");
|
|
|
2795
2685
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
2796
2686
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
|
|
2797
2687
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
|
|
2798
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
2688
|
+
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
|
|
2799
2689
|
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__);
|
|
2800
2690
|
|
|
2801
2691
|
|
|
@@ -2854,7 +2744,7 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
2854
2744
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
|
|
2855
2745
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
|
|
2856
2746
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__);
|
|
2857
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
2747
|
+
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
|
|
2858
2748
|
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__);
|
|
2859
2749
|
|
|
2860
2750
|
|
|
@@ -2940,15 +2830,15 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
2940
2830
|
"use strict";
|
|
2941
2831
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
2942
2832
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2943
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
2833
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
2944
2834
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
2945
2835
|
/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
|
|
2946
2836
|
/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_window__WEBPACK_IMPORTED_MODULE_2__);
|
|
2947
2837
|
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
|
|
2948
2838
|
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__);
|
|
2949
2839
|
/* harmony import */ var _dropdown_core_virtualized_item_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28);
|
|
2950
|
-
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
2951
|
-
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
2840
|
+
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
|
|
2841
|
+
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6);
|
|
2952
2842
|
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
|
|
2953
2843
|
/* harmony import */ var _util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(16);
|
|
2954
2844
|
|
|
@@ -3138,7 +3028,7 @@ class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
|
|
|
3138
3028
|
"use strict";
|
|
3139
3029
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
3140
3030
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3141
|
-
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3031
|
+
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
|
|
3142
3032
|
|
|
3143
3033
|
|
|
3144
3034
|
|
|
@@ -3189,7 +3079,7 @@ class DropdownVirtualizedItem extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
|
|
|
3189
3079
|
/* 29 */
|
|
3190
3080
|
/***/ (function(module, exports) {
|
|
3191
3081
|
|
|
3192
|
-
module.exports = require("@khanacademy/wonder-blocks-
|
|
3082
|
+
module.exports = require("@khanacademy/wonder-blocks-search-field");
|
|
3193
3083
|
|
|
3194
3084
|
/***/ }),
|
|
3195
3085
|
/* 30 */
|
|
@@ -3199,7 +3089,7 @@ module.exports = require("@khanacademy/wonder-blocks-icon-button");
|
|
|
3199
3089
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DropdownPopper; });
|
|
3200
3090
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
3201
3091
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3202
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3092
|
+
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
3203
3093
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
3204
3094
|
/* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31);
|
|
3205
3095
|
/* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_popper__WEBPACK_IMPORTED_MODULE_2__);
|
|
@@ -3289,13 +3179,13 @@ module.exports = require("@khanacademy/wonder-blocks-modal");
|
|
|
3289
3179
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3290
3180
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
3291
3181
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
3292
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
3182
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
|
|
3293
3183
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__);
|
|
3294
3184
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2);
|
|
3295
3185
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__);
|
|
3296
3186
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
|
|
3297
3187
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
3298
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
3188
|
+
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
|
|
3299
3189
|
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__);
|
|
3300
3190
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
|
|
3301
3191
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6__);
|
|
@@ -3472,7 +3362,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3472
3362
|
/* harmony import */ var _components_option_item_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
|
|
3473
3363
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OptionItem", function() { return _components_option_item_js__WEBPACK_IMPORTED_MODULE_1__["a"]; });
|
|
3474
3364
|
|
|
3475
|
-
/* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
3365
|
+
/* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
3476
3366
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeparatorItem", function() { return _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__["a"]; });
|
|
3477
3367
|
|
|
3478
3368
|
/* harmony import */ var _components_action_menu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-dropdown",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"description": "Dropdown variants for Wonder Blocks.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,17 +16,18 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "^7.16.3",
|
|
19
|
-
"@khanacademy/wonder-blocks-button": "^2.11.
|
|
20
|
-
"@khanacademy/wonder-blocks-clickable": "^2.2.
|
|
19
|
+
"@khanacademy/wonder-blocks-button": "^2.11.6",
|
|
20
|
+
"@khanacademy/wonder-blocks-clickable": "^2.2.7",
|
|
21
21
|
"@khanacademy/wonder-blocks-color": "^1.1.20",
|
|
22
|
-
"@khanacademy/wonder-blocks-core": "^4.3.
|
|
23
|
-
"@khanacademy/wonder-blocks-icon": "^1.2.
|
|
24
|
-
"@khanacademy/wonder-blocks-icon-button": "^3.4.
|
|
25
|
-
"@khanacademy/wonder-blocks-layout": "^1.4.
|
|
26
|
-
"@khanacademy/wonder-blocks-modal": "^2.3.
|
|
22
|
+
"@khanacademy/wonder-blocks-core": "^4.3.2",
|
|
23
|
+
"@khanacademy/wonder-blocks-icon": "^1.2.28",
|
|
24
|
+
"@khanacademy/wonder-blocks-icon-button": "^3.4.7",
|
|
25
|
+
"@khanacademy/wonder-blocks-layout": "^1.4.10",
|
|
26
|
+
"@khanacademy/wonder-blocks-modal": "^2.3.2",
|
|
27
|
+
"@khanacademy/wonder-blocks-search-field": "^1.0.5",
|
|
27
28
|
"@khanacademy/wonder-blocks-spacing": "^3.0.5",
|
|
28
29
|
"@khanacademy/wonder-blocks-timing": "^2.1.0",
|
|
29
|
-
"@khanacademy/wonder-blocks-typography": "^1.1.
|
|
30
|
+
"@khanacademy/wonder-blocks-typography": "^1.1.32"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
33
|
"@popperjs/core": "^2.10.1",
|
|
@@ -8,15 +8,6 @@ import DropdownCoreVirtualized from "../dropdown-core-virtualized.js";
|
|
|
8
8
|
import SearchTextInput from "../search-text-input.js";
|
|
9
9
|
|
|
10
10
|
describe("DropdownCoreVirtualized", () => {
|
|
11
|
-
beforeEach(() => {
|
|
12
|
-
jest.useFakeTimers();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
afterEach(() => {
|
|
16
|
-
jest.runOnlyPendingTimers();
|
|
17
|
-
jest.useRealTimers();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
11
|
it("should sort the items on first load", () => {
|
|
21
12
|
// Arrange
|
|
22
13
|
const optionItems = ["a", "bb", "ccc"].map((item, i) => ({
|