@khanacademy/wonder-blocks-dropdown 2.7.3 → 2.7.6
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 +24 -0
- package/dist/es/index.js +92 -162
- package/dist/index.js +285 -374
- package/package.json +6 -6
- package/src/components/__docs__/action-menu.argtypes.js +44 -0
- package/src/components/__docs__/action-menu.stories.js +435 -0
- package/src/components/__docs__/base-select.argtypes.js +54 -0
- package/src/components/__docs__/multi-select.stories.js +509 -0
- package/src/components/__docs__/single-select.accessibility.stories.mdx +59 -0
- package/src/components/__docs__/single-select.argtypes.js +54 -0
- package/src/components/__docs__/single-select.stories.js +464 -0
- package/src/components/__tests__/dropdown-core-virtualized.test.js +0 -15
- package/src/components/__tests__/dropdown-core.test.js +114 -208
- package/src/components/__tests__/multi-select.test.js +1 -3
- package/src/components/__tests__/single-select.test.js +15 -47
- package/src/components/action-menu.js +11 -0
- package/src/components/dropdown-core-virtualized.js +0 -5
- package/src/components/dropdown-core.js +140 -126
- package/src/components/multi-select.js +17 -33
- package/src/components/single-select.js +15 -30
- package/src/util/__tests__/dropdown-menu-styles.test.js +0 -26
- package/src/util/constants.js +0 -11
- package/src/util/dropdown-menu-styles.js +0 -5
- package/src/util/types.js +2 -5
- package/src/components/__tests__/search-text-input.test.js +0 -212
- package/src/components/action-menu.stories.js +0 -48
- package/src/components/multi-select.stories.js +0 -124
- package/src/components/search-text-input.js +0 -115
- package/src/components/single-select.stories.js +0 -247
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 =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 34);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ([
|
|
@@ -93,18 +93,22 @@ 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 */
|
|
96
102
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
97
103
|
|
|
98
104
|
"use strict";
|
|
99
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
100
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
101
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
102
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return searchInputStyle; });
|
|
105
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return keyCodes; });
|
|
106
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return selectDropdownStyle; });
|
|
107
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return filterableDropdownStyle; });
|
|
103
108
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DROPDOWN_ITEM_HEIGHT; });
|
|
104
109
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_VISIBLE_ITEMS; });
|
|
105
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
106
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
107
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return defaultLabels; });
|
|
110
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return SEPARATOR_ITEM_HEIGHT; });
|
|
111
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return defaultLabels; });
|
|
108
112
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
|
109
113
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_0__);
|
|
110
114
|
|
|
@@ -124,13 +128,6 @@ const selectDropdownStyle = {
|
|
|
124
128
|
|
|
125
129
|
const filterableDropdownStyle = {
|
|
126
130
|
minHeight: 100
|
|
127
|
-
};
|
|
128
|
-
const searchInputStyle = {
|
|
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,
|
|
131
|
-
// Set `minHeight` to "auto" to stop the search field from having
|
|
132
|
-
// a height of 0 and being cut off.
|
|
133
|
-
minHeight: "auto"
|
|
134
131
|
}; // The default item height
|
|
135
132
|
|
|
136
133
|
const DROPDOWN_ITEM_HEIGHT = 40;
|
|
@@ -141,8 +138,7 @@ const DROPDOWN_ITEM_HEIGHT = 40;
|
|
|
141
138
|
*/
|
|
142
139
|
|
|
143
140
|
const MAX_VISIBLE_ITEMS = 9;
|
|
144
|
-
const SEPARATOR_ITEM_HEIGHT = 9;
|
|
145
|
-
const SEARCH_ITEM_HEIGHT = DROPDOWN_ITEM_HEIGHT + searchInputStyle.margin + searchInputStyle.marginTop; // The default labels that will be used by different components
|
|
141
|
+
const SEPARATOR_ITEM_HEIGHT = 9; // The default labels that will be used by different components
|
|
146
142
|
|
|
147
143
|
const defaultLabels = {
|
|
148
144
|
clearSearch: "Clear search",
|
|
@@ -155,12 +151,6 @@ const defaultLabels = {
|
|
|
155
151
|
allSelected: "All items"
|
|
156
152
|
};
|
|
157
153
|
|
|
158
|
-
/***/ }),
|
|
159
|
-
/* 2 */
|
|
160
|
-
/***/ (function(module, exports) {
|
|
161
|
-
|
|
162
|
-
module.exports = require("@khanacademy/wonder-blocks-color");
|
|
163
|
-
|
|
164
154
|
/***/ }),
|
|
165
155
|
/* 3 */
|
|
166
156
|
/***/ (function(module, exports) {
|
|
@@ -189,7 +179,7 @@ module.exports = require("@khanacademy/wonder-blocks-core");
|
|
|
189
179
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
190
180
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
191
181
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
192
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
182
|
+
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
193
183
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
|
|
194
184
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
|
|
195
185
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__);
|
|
@@ -242,92 +232,24 @@ module.exports = require("react-dom");
|
|
|
242
232
|
|
|
243
233
|
/***/ }),
|
|
244
234
|
/* 8 */
|
|
245
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
246
|
-
|
|
247
|
-
"use strict";
|
|
248
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SearchTextInput; });
|
|
249
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
250
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
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);
|
|
254
|
-
// A TextField with a search icon on its left side and X icon on its right side
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
class SearchTextInput extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
259
|
-
static isClassOf(instance) {
|
|
260
|
-
return instance && instance.type && instance.type.__IS_SEARCH_TEXT_INPUT__;
|
|
261
|
-
}
|
|
262
|
-
|
|
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();
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
render() {
|
|
281
|
-
const {
|
|
282
|
-
labels,
|
|
283
|
-
onChange,
|
|
284
|
-
onClick,
|
|
285
|
-
itemRef,
|
|
286
|
-
searchText,
|
|
287
|
-
style,
|
|
288
|
-
testId
|
|
289
|
-
} = this.props;
|
|
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,
|
|
293
|
-
onClick: onClick,
|
|
294
|
-
placeholder: labels.filter,
|
|
295
|
-
ref: itemRef,
|
|
296
|
-
style: style,
|
|
297
|
-
testId: testId,
|
|
298
|
-
value: searchText
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
SearchTextInput.defaultProps = {
|
|
304
|
-
labels: {
|
|
305
|
-
clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_2__[/* defaultLabels */ "e"].clearSearch,
|
|
306
|
-
filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_2__[/* defaultLabels */ "e"].filter
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
SearchTextInput.__IS_SEARCH_TEXT_INPUT__ = true;
|
|
310
|
-
|
|
311
|
-
/***/ }),
|
|
312
|
-
/* 9 */
|
|
313
235
|
/***/ (function(module, exports) {
|
|
314
236
|
|
|
315
237
|
module.exports = require("@khanacademy/wonder-blocks-icon");
|
|
316
238
|
|
|
317
239
|
/***/ }),
|
|
318
|
-
/*
|
|
240
|
+
/* 9 */
|
|
319
241
|
/***/ (function(module, exports) {
|
|
320
242
|
|
|
321
243
|
module.exports = require("@khanacademy/wonder-blocks-typography");
|
|
322
244
|
|
|
323
245
|
/***/ }),
|
|
324
|
-
/*
|
|
246
|
+
/* 10 */
|
|
325
247
|
/***/ (function(module, exports) {
|
|
326
248
|
|
|
327
249
|
module.exports = require("@khanacademy/wonder-blocks-clickable");
|
|
328
250
|
|
|
329
251
|
/***/ }),
|
|
330
|
-
/*
|
|
252
|
+
/* 11 */
|
|
331
253
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
332
254
|
|
|
333
255
|
"use strict";
|
|
@@ -336,21 +258,21 @@ module.exports = require("@khanacademy/wonder-blocks-clickable");
|
|
|
336
258
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
337
259
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
338
260
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
339
|
-
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
261
|
+
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
|
|
340
262
|
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_router_dom__WEBPACK_IMPORTED_MODULE_2__);
|
|
341
|
-
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
263
|
+
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
|
|
342
264
|
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_router__WEBPACK_IMPORTED_MODULE_3__);
|
|
343
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
265
|
+
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
|
|
344
266
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__);
|
|
345
267
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
|
|
346
268
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__);
|
|
347
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
269
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9);
|
|
348
270
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_6__);
|
|
349
|
-
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
271
|
+
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(10);
|
|
350
272
|
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_7__);
|
|
351
273
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5);
|
|
352
274
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_8__);
|
|
353
|
-
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
275
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2);
|
|
354
276
|
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); }
|
|
355
277
|
|
|
356
278
|
|
|
@@ -495,7 +417,7 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
495
417
|
});
|
|
496
418
|
|
|
497
419
|
/***/ }),
|
|
498
|
-
/*
|
|
420
|
+
/* 12 */
|
|
499
421
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
500
422
|
|
|
501
423
|
"use strict";
|
|
@@ -504,19 +426,19 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
504
426
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
505
427
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
506
428
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
507
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
429
|
+
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
508
430
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
|
|
509
431
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
|
|
510
432
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_3__);
|
|
511
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
433
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
|
|
512
434
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_4__);
|
|
513
435
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
|
|
514
436
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_5__);
|
|
515
|
-
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
437
|
+
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
|
|
516
438
|
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_6__);
|
|
517
|
-
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
518
|
-
/* harmony import */ var _check_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
519
|
-
/* harmony import */ var _checkbox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
439
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2);
|
|
440
|
+
/* harmony import */ var _check_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24);
|
|
441
|
+
/* harmony import */ var _checkbox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25);
|
|
520
442
|
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); }
|
|
521
443
|
|
|
522
444
|
|
|
@@ -670,13 +592,13 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
670
592
|
});
|
|
671
593
|
|
|
672
594
|
/***/ }),
|
|
673
|
-
/*
|
|
595
|
+
/* 13 */
|
|
674
596
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
675
597
|
|
|
676
598
|
"use strict";
|
|
677
599
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
678
600
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
679
|
-
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
601
|
+
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
|
|
680
602
|
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_1__);
|
|
681
603
|
|
|
682
604
|
|
|
@@ -731,7 +653,7 @@ DropdownOpener.defaultProps = {
|
|
|
731
653
|
/* harmony default export */ __webpack_exports__["a"] = (DropdownOpener);
|
|
732
654
|
|
|
733
655
|
/***/ }),
|
|
734
|
-
/*
|
|
656
|
+
/* 14 */
|
|
735
657
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
736
658
|
|
|
737
659
|
"use strict";
|
|
@@ -741,24 +663,25 @@ DropdownOpener.defaultProps = {
|
|
|
741
663
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
742
664
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
|
|
743
665
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_2__);
|
|
744
|
-
/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
666
|
+
/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(19);
|
|
745
667
|
/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_window__WEBPACK_IMPORTED_MODULE_3__);
|
|
746
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
668
|
+
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
|
|
747
669
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__);
|
|
748
670
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
|
|
749
671
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5__);
|
|
750
672
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
|
|
751
673
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6__);
|
|
752
|
-
/* harmony import */ var
|
|
753
|
-
/* harmony import */ var
|
|
754
|
-
/* harmony import */ var
|
|
755
|
-
/* harmony import */ var
|
|
756
|
-
/* harmony import */ var
|
|
757
|
-
/* harmony import */ var
|
|
758
|
-
/* harmony import */ var
|
|
759
|
-
/* harmony import */ var
|
|
760
|
-
/* harmony import */ var
|
|
761
|
-
/* harmony import */ var
|
|
674
|
+
/* harmony import */ var _khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(26);
|
|
675
|
+
/* harmony import */ var _khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_7__);
|
|
676
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9);
|
|
677
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__);
|
|
678
|
+
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(17);
|
|
679
|
+
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_9__);
|
|
680
|
+
/* harmony import */ var _dropdown_core_virtualized_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27);
|
|
681
|
+
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(6);
|
|
682
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(2);
|
|
683
|
+
/* harmony import */ var _dropdown_popper_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(29);
|
|
684
|
+
/* harmony import */ var _util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(15);
|
|
762
685
|
// A menu that consists of action items
|
|
763
686
|
|
|
764
687
|
|
|
@@ -851,6 +774,8 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
851
774
|
constructor(props) {
|
|
852
775
|
super(props); // Apply our initial focus index
|
|
853
776
|
|
|
777
|
+
this.searchFieldRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createRef"]();
|
|
778
|
+
|
|
854
779
|
this.handleInteract = event => {
|
|
855
780
|
const {
|
|
856
781
|
open,
|
|
@@ -873,7 +798,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
873
798
|
const keyCode = event.which || event.keyCode; // If menu isn't open and user presses down, open the menu
|
|
874
799
|
|
|
875
800
|
if (!open) {
|
|
876
|
-
if (keyCode === _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "
|
|
801
|
+
if (keyCode === _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].down) {
|
|
877
802
|
event.preventDefault();
|
|
878
803
|
onOpenChanged(true);
|
|
879
804
|
return;
|
|
@@ -884,12 +809,12 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
884
809
|
|
|
885
810
|
|
|
886
811
|
switch (keyCode) {
|
|
887
|
-
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "
|
|
888
|
-
// When we show
|
|
812
|
+
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].tab:
|
|
813
|
+
// When we show SearchField and that is focused and the
|
|
889
814
|
// searchText is entered at least one character, dismiss button
|
|
890
|
-
// is displayed. When user presses tab, we should move focus
|
|
891
|
-
//
|
|
892
|
-
if (this.
|
|
815
|
+
// is displayed. When user presses tab, we should move focus to
|
|
816
|
+
// the dismiss button.
|
|
817
|
+
if (this.isSearchFieldFocused() && searchText) {
|
|
893
818
|
return;
|
|
894
819
|
}
|
|
895
820
|
|
|
@@ -897,10 +822,10 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
897
822
|
onOpenChanged(false);
|
|
898
823
|
return;
|
|
899
824
|
|
|
900
|
-
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "
|
|
901
|
-
// When we display
|
|
902
|
-
//
|
|
903
|
-
if (this.
|
|
825
|
+
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].space:
|
|
826
|
+
// When we display SearchField and the focus is on it, we should
|
|
827
|
+
// let the user type space.
|
|
828
|
+
if (this.isSearchFieldFocused()) {
|
|
904
829
|
return;
|
|
905
830
|
} // Prevent space from scrolling down the page
|
|
906
831
|
|
|
@@ -908,12 +833,12 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
908
833
|
event.preventDefault();
|
|
909
834
|
return;
|
|
910
835
|
|
|
911
|
-
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "
|
|
836
|
+
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].up:
|
|
912
837
|
event.preventDefault();
|
|
913
838
|
this.focusPreviousItem();
|
|
914
839
|
return;
|
|
915
840
|
|
|
916
|
-
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "
|
|
841
|
+
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].down:
|
|
917
842
|
event.preventDefault();
|
|
918
843
|
this.focusNextItem();
|
|
919
844
|
return;
|
|
@@ -928,10 +853,10 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
928
853
|
const keyCode = event.which || event.keyCode;
|
|
929
854
|
|
|
930
855
|
switch (keyCode) {
|
|
931
|
-
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "
|
|
932
|
-
// When we display
|
|
933
|
-
//
|
|
934
|
-
if (this.
|
|
856
|
+
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].space:
|
|
857
|
+
// When we display SearchField and the focus is on it, we should
|
|
858
|
+
// let the user type space.
|
|
859
|
+
if (this.isSearchFieldFocused()) {
|
|
935
860
|
return;
|
|
936
861
|
} // Prevent space from scrolling down the page
|
|
937
862
|
|
|
@@ -939,7 +864,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
939
864
|
event.preventDefault();
|
|
940
865
|
return;
|
|
941
866
|
|
|
942
|
-
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "
|
|
867
|
+
case _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* keyCodes */ "f"].escape:
|
|
943
868
|
// Close only the dropdown, not other elements that are
|
|
944
869
|
// listening for an escape press
|
|
945
870
|
if (open) {
|
|
@@ -982,13 +907,23 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
982
907
|
}
|
|
983
908
|
};
|
|
984
909
|
|
|
910
|
+
this.handleSearchTextChanged = searchText => {
|
|
911
|
+
const {
|
|
912
|
+
onSearchTextChanged
|
|
913
|
+
} = this.props;
|
|
914
|
+
|
|
915
|
+
if (onSearchTextChanged) {
|
|
916
|
+
onSearchTextChanged(searchText);
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
|
|
985
920
|
this.resetFocusedIndex();
|
|
986
921
|
this.state = {
|
|
987
922
|
prevItems: this.props.items,
|
|
988
923
|
itemRefs: [],
|
|
989
924
|
sameItemsFocusable: false,
|
|
990
925
|
labels: {
|
|
991
|
-
noResults: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "
|
|
926
|
+
noResults: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "d"].noResults,
|
|
992
927
|
...props.labels
|
|
993
928
|
}
|
|
994
929
|
};
|
|
@@ -1057,29 +992,20 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1057
992
|
this.removeEventListeners();
|
|
1058
993
|
}
|
|
1059
994
|
|
|
1060
|
-
|
|
1061
|
-
return !!this.props.onSearchTextChanged && typeof this.props.searchText === "string";
|
|
1062
|
-
} // Resets our initial focus index to what was passed in
|
|
1063
|
-
// via the props
|
|
1064
|
-
|
|
1065
|
-
|
|
995
|
+
// Resets our initial focus index to what was passed in via the props
|
|
1066
996
|
resetFocusedIndex() {
|
|
1067
997
|
const {
|
|
1068
998
|
initialFocusedIndex
|
|
1069
|
-
} = this.props; // If we are given an initial focus index, select it.
|
|
1070
|
-
//
|
|
1071
|
-
|
|
1072
|
-
if (initialFocusedIndex) {
|
|
1073
|
-
|
|
1074
|
-
// index is going to be offset by 1, since the orginal
|
|
1075
|
-
// index doesn't account for the search box's
|
|
1076
|
-
// existence.
|
|
1077
|
-
if (this.hasSearchBox()) {
|
|
1078
|
-
this.focusedIndex = initialFocusedIndex + 1;
|
|
1079
|
-
} else {
|
|
1080
|
-
this.focusedIndex = initialFocusedIndex;
|
|
1081
|
-
}
|
|
999
|
+
} = this.props; // If we are given an initial focus index, select it. Otherwise default
|
|
1000
|
+
// to the first item
|
|
1001
|
+
|
|
1002
|
+
if (typeof initialFocusedIndex !== "undefined") {
|
|
1003
|
+
this.focusedIndex = initialFocusedIndex;
|
|
1082
1004
|
} else {
|
|
1005
|
+
if (this.hasSearchField() && !this.isSearchFieldFocused()) {
|
|
1006
|
+
return this.focusSearchField();
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1083
1009
|
this.focusedIndex = 0;
|
|
1084
1010
|
}
|
|
1085
1011
|
} // Figure out focus states for the dropdown after it has changed from open
|
|
@@ -1128,31 +1054,50 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1128
1054
|
}
|
|
1129
1055
|
|
|
1130
1056
|
focusCurrentItem() {
|
|
1131
|
-
const
|
|
1057
|
+
const focusedItemRef = this.state.itemRefs[this.focusedIndex];
|
|
1132
1058
|
|
|
1133
|
-
if (
|
|
1059
|
+
if (focusedItemRef) {
|
|
1134
1060
|
// force react-window to scroll to ensure the focused item is visible
|
|
1135
1061
|
if (this.virtualizedListRef.current) {
|
|
1136
1062
|
// Our focused index does not include disabled items, but the
|
|
1137
1063
|
// react-window index system does include the disabled items
|
|
1138
1064
|
// in the count. So we need to use "originalIndex", which
|
|
1139
1065
|
// does account for disabled items.
|
|
1140
|
-
this.virtualizedListRef.current.scrollToItem(
|
|
1066
|
+
this.virtualizedListRef.current.scrollToItem(focusedItemRef.originalIndex);
|
|
1141
1067
|
}
|
|
1142
1068
|
|
|
1143
|
-
const node = react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.findDOMNode(
|
|
1069
|
+
const node = react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.findDOMNode(focusedItemRef.ref.current);
|
|
1144
1070
|
|
|
1145
1071
|
if (node) {
|
|
1146
1072
|
node.focus(); // Keep track of the original index of the newly focused item.
|
|
1147
1073
|
// To be used if the set of focusable items in the menu changes
|
|
1148
1074
|
|
|
1149
|
-
this.focusedOriginalIndex =
|
|
1075
|
+
this.focusedOriginalIndex = focusedItemRef.originalIndex;
|
|
1150
1076
|
}
|
|
1151
1077
|
}
|
|
1152
1078
|
}
|
|
1153
1079
|
|
|
1080
|
+
focusSearchField() {
|
|
1081
|
+
if (this.searchFieldRef.current) {
|
|
1082
|
+
this.searchFieldRef.current.focus();
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
hasSearchField() {
|
|
1087
|
+
return !!this.props.isFilterable;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
isSearchFieldFocused() {
|
|
1091
|
+
return this.hasSearchField() && document.activeElement === this.searchFieldRef.current;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1154
1094
|
focusPreviousItem() {
|
|
1155
1095
|
if (this.focusedIndex === 0) {
|
|
1096
|
+
// Move the focus to the search field if it is the first item.
|
|
1097
|
+
if (this.hasSearchField() && !this.isSearchFieldFocused()) {
|
|
1098
|
+
return this.focusSearchField();
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1156
1101
|
this.focusedIndex = this.state.itemRefs.length - 1;
|
|
1157
1102
|
} else {
|
|
1158
1103
|
this.focusedIndex -= 1;
|
|
@@ -1163,6 +1108,11 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1163
1108
|
|
|
1164
1109
|
focusNextItem() {
|
|
1165
1110
|
if (this.focusedIndex === this.state.itemRefs.length - 1) {
|
|
1111
|
+
// Move the focus to the search field if it is the last item.
|
|
1112
|
+
if (this.hasSearchField() && !this.isSearchFieldFocused()) {
|
|
1113
|
+
return this.focusSearchField();
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1166
1116
|
this.focusedIndex = 0;
|
|
1167
1117
|
} else {
|
|
1168
1118
|
this.focusedIndex += 1;
|
|
@@ -1201,19 +1151,15 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1201
1151
|
maybeRenderNoResults() {
|
|
1202
1152
|
const {
|
|
1203
1153
|
items,
|
|
1204
|
-
onSearchTextChanged,
|
|
1205
|
-
searchText,
|
|
1206
1154
|
labels: {
|
|
1207
1155
|
noResults
|
|
1208
1156
|
}
|
|
1209
|
-
} = this.props;
|
|
1210
|
-
const showSearchTextInput = !!onSearchTextChanged && typeof searchText === "string";
|
|
1211
|
-
const includeSearchCount = showSearchTextInput ? 1 : 0; // Verify if there are items to be rendered or not
|
|
1157
|
+
} = this.props; // Verify if there are items to be rendered or not
|
|
1212
1158
|
|
|
1213
|
-
const numResults = items.length
|
|
1159
|
+
const numResults = items.length;
|
|
1214
1160
|
|
|
1215
1161
|
if (numResults === 0) {
|
|
1216
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
1162
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__["LabelMedium"], {
|
|
1217
1163
|
style: styles.noResult,
|
|
1218
1164
|
testId: "dropdown-core-no-results"
|
|
1219
1165
|
}, noResults);
|
|
@@ -1245,7 +1191,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1245
1191
|
const itemRole = this.getItemRole(); // if we don't need to virtualize, we can render the list directly
|
|
1246
1192
|
|
|
1247
1193
|
return this.props.items.map((item, index) => {
|
|
1248
|
-
if (
|
|
1194
|
+
if (_separator_item_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].isClassOf(item.component)) {
|
|
1249
1195
|
return item.component;
|
|
1250
1196
|
}
|
|
1251
1197
|
|
|
@@ -1261,29 +1207,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1261
1207
|
|
|
1262
1208
|
const focusIndex = focusCounter - 1; // The reference to the item is used to restore focus.
|
|
1263
1209
|
|
|
1264
|
-
const currentRef = this.state.itemRefs[focusIndex] ? this.state.itemRefs[focusIndex].ref : null; // Render
|
|
1265
|
-
|
|
1266
|
-
if (_search_text_input_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].isClassOf(component)) {
|
|
1267
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](component, { ...populatedProps,
|
|
1268
|
-
key: "search-text-input",
|
|
1269
|
-
// pass the current ref down to the input element
|
|
1270
|
-
itemRef: currentRef,
|
|
1271
|
-
// override to avoid losing focus when pressing a key
|
|
1272
|
-
onClick: () => {
|
|
1273
|
-
this.handleClickFocus(0);
|
|
1274
|
-
this.focusCurrentItem();
|
|
1275
|
-
},
|
|
1276
|
-
// apply custom styles
|
|
1277
|
-
style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "h"],
|
|
1278
|
-
// TODO(WB-1310): Remove the autofocus prop after making
|
|
1279
|
-
// the search field sticky.
|
|
1280
|
-
// Currently autofocusing on the search field to work
|
|
1281
|
-
// around it losing focus on mount when switching between
|
|
1282
|
-
// virtualized and non-virtualized dropdown filter results.
|
|
1283
|
-
autofocus: this.focusedIndex === 0
|
|
1284
|
-
});
|
|
1285
|
-
} // Render OptionItem and/or ActionItem elements.
|
|
1286
|
-
|
|
1210
|
+
const currentRef = this.state.itemRefs[focusIndex] ? this.state.itemRefs[focusIndex].ref : null; // Render OptionItem and/or ActionItem elements.
|
|
1287
1211
|
|
|
1288
1212
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](component, { ...populatedProps,
|
|
1289
1213
|
key: index,
|
|
@@ -1310,33 +1234,11 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1310
1234
|
let focusCounter = 0;
|
|
1311
1235
|
const itemRole = this.getItemRole();
|
|
1312
1236
|
return this.props.items.map((item, index) => {
|
|
1313
|
-
if (!
|
|
1237
|
+
if (!_separator_item_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].isClassOf(item.component) && item.focusable) {
|
|
1314
1238
|
focusCounter += 1;
|
|
1315
1239
|
}
|
|
1316
1240
|
|
|
1317
1241
|
const focusIndex = focusCounter - 1;
|
|
1318
|
-
|
|
1319
|
-
if (_search_text_input_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].isClassOf(item.component)) {
|
|
1320
|
-
return { ...item,
|
|
1321
|
-
// override to avoid losing focus when pressing a key
|
|
1322
|
-
onClick: () => {
|
|
1323
|
-
this.handleClickFocus(0);
|
|
1324
|
-
this.focusCurrentItem();
|
|
1325
|
-
},
|
|
1326
|
-
populatedProps: {
|
|
1327
|
-
style: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* searchInputStyle */ "h"],
|
|
1328
|
-
// pass the current ref down to the input element
|
|
1329
|
-
itemRef: this.state.itemRefs[focusIndex] ? this.state.itemRefs[focusIndex].ref : null,
|
|
1330
|
-
// TODO(WB-1310): Remove the autofocus prop after making
|
|
1331
|
-
// the search field sticky.
|
|
1332
|
-
// Currently autofocusing on the search field to work
|
|
1333
|
-
// around it losing focus on mount when switching between
|
|
1334
|
-
// virtualized and non-virtualized dropdown filter results.
|
|
1335
|
-
autofocus: this.focusedIndex === 0
|
|
1336
|
-
}
|
|
1337
|
-
};
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
1242
|
return { ...item,
|
|
1341
1243
|
role: itemRole,
|
|
1342
1244
|
ref: item.focusable ? this.state.itemRefs[focusIndex] ? this.state.itemRefs[focusIndex].ref : null : null,
|
|
@@ -1354,12 +1256,29 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1354
1256
|
renderVirtualizedList() {
|
|
1355
1257
|
// preprocess items data to pass it to the renderer
|
|
1356
1258
|
const virtualizedItems = this.parseVirtualizedItems();
|
|
1357
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
1259
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_dropdown_core_virtualized_js__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], {
|
|
1358
1260
|
data: virtualizedItems,
|
|
1359
1261
|
listRef: this.virtualizedListRef
|
|
1360
1262
|
});
|
|
1361
1263
|
}
|
|
1362
1264
|
|
|
1265
|
+
renderSearchField() {
|
|
1266
|
+
const {
|
|
1267
|
+
searchText
|
|
1268
|
+
} = this.props;
|
|
1269
|
+
const {
|
|
1270
|
+
labels
|
|
1271
|
+
} = this.state;
|
|
1272
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_search_field__WEBPACK_IMPORTED_MODULE_7___default.a, {
|
|
1273
|
+
clearAriaLabel: labels.clearSearch,
|
|
1274
|
+
onChange: this.handleSearchTextChanged,
|
|
1275
|
+
placeholder: labels.filter,
|
|
1276
|
+
ref: this.searchFieldRef,
|
|
1277
|
+
style: styles.searchInputStyle,
|
|
1278
|
+
value: searchText || ""
|
|
1279
|
+
});
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1363
1282
|
renderDropdownMenu(listRenderer, isReferenceHidden) {
|
|
1364
1283
|
const {
|
|
1365
1284
|
dropdownStyle,
|
|
@@ -1369,17 +1288,18 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1369
1288
|
// It's only used if the element exists in the DOM
|
|
1370
1289
|
|
|
1371
1290
|
const openerStyle = openerElement && window.getComputedStyle(openerElement);
|
|
1372
|
-
const minDropdownWidth = openerStyle ? openerStyle.getPropertyValue("width") : 0;
|
|
1373
|
-
|
|
1374
|
-
const initialHeight = 12;
|
|
1375
|
-
const maxDropdownHeight = Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_14__[/* getDropdownMenuHeight */ "b"])(this.props.items, initialHeight);
|
|
1291
|
+
const minDropdownWidth = openerStyle ? openerStyle.getPropertyValue("width") : 0;
|
|
1292
|
+
const maxDropdownHeight = Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_14__[/* getDropdownMenuHeight */ "b"])(this.props.items);
|
|
1376
1293
|
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
|
|
1377
1294
|
// document from closing the menu.
|
|
1378
1295
|
, {
|
|
1379
1296
|
onMouseUp: this.handleDropdownMouseUp,
|
|
1297
|
+
style: [styles.dropdown, light && styles.light, isReferenceHidden && styles.hidden, dropdownStyle],
|
|
1298
|
+
testId: "dropdown-core-container"
|
|
1299
|
+
}, this.props.isFilterable && this.renderSearchField(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_6__["View"], {
|
|
1380
1300
|
role: this.props.role,
|
|
1381
|
-
style: [styles.
|
|
1382
|
-
}, listRenderer, this.maybeRenderNoResults());
|
|
1301
|
+
style: [styles.listboxOrMenu, Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_14__[/* generateDropdownMenuStyles */ "a"])(minDropdownWidth, maxDropdownHeight)]
|
|
1302
|
+
}, listRenderer), this.maybeRenderNoResults());
|
|
1383
1303
|
}
|
|
1384
1304
|
|
|
1385
1305
|
renderDropdown() {
|
|
@@ -1410,7 +1330,7 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1410
1330
|
const {
|
|
1411
1331
|
labels
|
|
1412
1332
|
} = this.state;
|
|
1413
|
-
const totalItems =
|
|
1333
|
+
const totalItems = items.length;
|
|
1414
1334
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](StyledSpan, {
|
|
1415
1335
|
"aria-live": "polite",
|
|
1416
1336
|
"aria-atomic": "true",
|
|
@@ -1440,8 +1360,10 @@ class DropdownCore extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
1440
1360
|
DropdownCore.defaultProps = {
|
|
1441
1361
|
alignment: "left",
|
|
1442
1362
|
labels: {
|
|
1443
|
-
|
|
1444
|
-
|
|
1363
|
+
clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "d"].clearSearch,
|
|
1364
|
+
filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "d"].filter,
|
|
1365
|
+
noResults: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "d"].noResults,
|
|
1366
|
+
someSelected: _util_constants_js__WEBPACK_IMPORTED_MODULE_12__[/* defaultLabels */ "d"].someSelected
|
|
1445
1367
|
},
|
|
1446
1368
|
light: false
|
|
1447
1369
|
};
|
|
@@ -1455,13 +1377,15 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
|
1455
1377
|
paddingTop: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default.a.xxxSmall_4,
|
|
1456
1378
|
paddingBottom: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default.a.xxxSmall_4,
|
|
1457
1379
|
border: `solid 1px ${_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default.a.offBlack16}`,
|
|
1458
|
-
boxShadow: `0px 8px 8px 0px ${Object(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__["fade"])(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default.a.offBlack, 0.1)}
|
|
1459
|
-
overflowY: "auto"
|
|
1380
|
+
boxShadow: `0px 8px 8px 0px ${Object(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4__["fade"])(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_4___default.a.offBlack, 0.1)}`
|
|
1460
1381
|
},
|
|
1461
1382
|
light: {
|
|
1462
1383
|
// Pretty much just remove the border
|
|
1463
1384
|
border: "none"
|
|
1464
1385
|
},
|
|
1386
|
+
listboxOrMenu: {
|
|
1387
|
+
overflowY: "auto"
|
|
1388
|
+
},
|
|
1465
1389
|
hidden: {
|
|
1466
1390
|
pointerEvents: "none",
|
|
1467
1391
|
visibility: "hidden"
|
|
@@ -1471,6 +1395,13 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
|
1471
1395
|
alignSelf: "center",
|
|
1472
1396
|
marginTop: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default.a.xxSmall_6
|
|
1473
1397
|
},
|
|
1398
|
+
searchInputStyle: {
|
|
1399
|
+
margin: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default.a.xSmall_8,
|
|
1400
|
+
marginTop: _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_5___default.a.xxxSmall_4,
|
|
1401
|
+
// Set `minHeight` to "auto" to stop the search field from having
|
|
1402
|
+
// a height of 0 and being cut off.
|
|
1403
|
+
minHeight: "auto"
|
|
1404
|
+
},
|
|
1474
1405
|
srOnly: {
|
|
1475
1406
|
border: 0,
|
|
1476
1407
|
clip: "rect(0,0,0,0)",
|
|
@@ -1482,10 +1413,10 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
|
1482
1413
|
width: 1
|
|
1483
1414
|
}
|
|
1484
1415
|
});
|
|
1485
|
-
/* harmony default export */ __webpack_exports__["a"] = (Object(
|
|
1416
|
+
/* harmony default export */ __webpack_exports__["a"] = (Object(_khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_9__["withActionScheduler"])(DropdownCore));
|
|
1486
1417
|
|
|
1487
1418
|
/***/ }),
|
|
1488
|
-
/*
|
|
1419
|
+
/* 15 */
|
|
1489
1420
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1490
1421
|
|
|
1491
1422
|
"use strict";
|
|
@@ -1493,10 +1424,8 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
|
1493
1424
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return generateDropdownMenuStyles; });
|
|
1494
1425
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
|
|
1495
1426
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_0__);
|
|
1496
|
-
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1427
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
|
1497
1428
|
/* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
1498
|
-
/* harmony import */ var _components_search_text_input_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8);
|
|
1499
|
-
|
|
1500
1429
|
|
|
1501
1430
|
|
|
1502
1431
|
|
|
@@ -1515,10 +1444,7 @@ function getDropdownMenuHeight(items, initialHeight = 0) {
|
|
|
1515
1444
|
// this number of elements in the visible area
|
|
1516
1445
|
return items.slice(0, _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* MAX_VISIBLE_ITEMS */ "b"]).reduce((sum, item) => {
|
|
1517
1446
|
if (_components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].isClassOf(item.component)) {
|
|
1518
|
-
return sum + _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* SEPARATOR_ITEM_HEIGHT */ "
|
|
1519
|
-
} else if (_components_search_text_input_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].isClassOf(item.component)) {
|
|
1520
|
-
// search text input height
|
|
1521
|
-
return sum + _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* SEARCH_ITEM_HEIGHT */ "c"];
|
|
1447
|
+
return sum + _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* SEPARATOR_ITEM_HEIGHT */ "c"];
|
|
1522
1448
|
} else {
|
|
1523
1449
|
return sum + _constants_js__WEBPACK_IMPORTED_MODULE_1__[/* DROPDOWN_ITEM_HEIGHT */ "a"];
|
|
1524
1450
|
}
|
|
@@ -1544,19 +1470,19 @@ function generateDropdownMenuStyles(minWidth, maxHeight) {
|
|
|
1544
1470
|
}
|
|
1545
1471
|
|
|
1546
1472
|
/***/ }),
|
|
1547
|
-
/*
|
|
1473
|
+
/* 16 */
|
|
1548
1474
|
/***/ (function(module, exports) {
|
|
1549
1475
|
|
|
1550
1476
|
module.exports = require("react-router");
|
|
1551
1477
|
|
|
1552
1478
|
/***/ }),
|
|
1553
|
-
/*
|
|
1479
|
+
/* 17 */
|
|
1554
1480
|
/***/ (function(module, exports) {
|
|
1555
1481
|
|
|
1556
1482
|
module.exports = require("@khanacademy/wonder-blocks-timing");
|
|
1557
1483
|
|
|
1558
1484
|
/***/ }),
|
|
1559
|
-
/*
|
|
1485
|
+
/* 18 */
|
|
1560
1486
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1561
1487
|
|
|
1562
1488
|
"use strict";
|
|
@@ -1565,21 +1491,21 @@ module.exports = require("@khanacademy/wonder-blocks-timing");
|
|
|
1565
1491
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1566
1492
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
1567
1493
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
1568
|
-
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
1494
|
+
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
|
|
1569
1495
|
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_router__WEBPACK_IMPORTED_MODULE_2__);
|
|
1570
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
1496
|
+
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
|
|
1571
1497
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__);
|
|
1572
1498
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
|
|
1573
1499
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
1574
|
-
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
1500
|
+
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
|
|
1575
1501
|
/* harmony import */ var _khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_clickable__WEBPACK_IMPORTED_MODULE_5__);
|
|
1576
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
1502
|
+
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8);
|
|
1577
1503
|
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_6__);
|
|
1578
1504
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3);
|
|
1579
1505
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_7__);
|
|
1580
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
1506
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9);
|
|
1581
1507
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_8__);
|
|
1582
|
-
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
1508
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2);
|
|
1583
1509
|
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); }
|
|
1584
1510
|
|
|
1585
1511
|
|
|
@@ -1794,13 +1720,13 @@ const _generateStyles = (light, placeholder) => {
|
|
|
1794
1720
|
};
|
|
1795
1721
|
|
|
1796
1722
|
/***/ }),
|
|
1797
|
-
/*
|
|
1723
|
+
/* 19 */
|
|
1798
1724
|
/***/ (function(module, exports) {
|
|
1799
1725
|
|
|
1800
1726
|
module.exports = require("react-window");
|
|
1801
1727
|
|
|
1802
1728
|
/***/ }),
|
|
1803
|
-
/*
|
|
1729
|
+
/* 20 */
|
|
1804
1730
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1805
1731
|
|
|
1806
1732
|
"use strict";
|
|
@@ -1811,11 +1737,11 @@ module.exports = require("react-window");
|
|
|
1811
1737
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
1812
1738
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
|
|
1813
1739
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_2__);
|
|
1814
|
-
/* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
1815
|
-
/* harmony import */ var _action_item_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
1816
|
-
/* harmony import */ var _option_item_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
1817
|
-
/* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
1818
|
-
/* harmony import */ var _action_menu_opener_core_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
1740
|
+
/* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
|
|
1741
|
+
/* harmony import */ var _action_item_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(11);
|
|
1742
|
+
/* harmony import */ var _option_item_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12);
|
|
1743
|
+
/* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(14);
|
|
1744
|
+
/* harmony import */ var _action_menu_opener_core_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32);
|
|
1819
1745
|
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); }
|
|
1820
1746
|
|
|
1821
1747
|
|
|
@@ -1829,6 +1755,17 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
1829
1755
|
|
|
1830
1756
|
/**
|
|
1831
1757
|
* A menu that consists of various types of items.
|
|
1758
|
+
*
|
|
1759
|
+
* ## Usage
|
|
1760
|
+
*
|
|
1761
|
+
* ```jsx
|
|
1762
|
+
* import {ActionMenu, ActionItem} from "@khanacademy/wonder-blocks-dropdown";
|
|
1763
|
+
*
|
|
1764
|
+
* <ActionMenu menuText="Menu">
|
|
1765
|
+
* <ActionItem href="/profile" label="Profile" />
|
|
1766
|
+
* <ActionItem label="Settings" onClick={() => {}} />
|
|
1767
|
+
* </ActionMenu>
|
|
1768
|
+
* ```
|
|
1832
1769
|
*/
|
|
1833
1770
|
class ActionMenu extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
1834
1771
|
constructor(...args) {
|
|
@@ -2014,7 +1951,7 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
|
2014
1951
|
});
|
|
2015
1952
|
|
|
2016
1953
|
/***/ }),
|
|
2017
|
-
/*
|
|
1954
|
+
/* 21 */
|
|
2018
1955
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2019
1956
|
|
|
2020
1957
|
"use strict";
|
|
@@ -2023,11 +1960,10 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_2__["StyleSheet"].create({
|
|
|
2023
1960
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2024
1961
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
2025
1962
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
2026
|
-
/* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2027
|
-
/* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
2028
|
-
/* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
2029
|
-
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
2030
|
-
/* harmony import */ var _search_text_input_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8);
|
|
1963
|
+
/* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14);
|
|
1964
|
+
/* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
|
|
1965
|
+
/* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
|
|
1966
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2);
|
|
2031
1967
|
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); }
|
|
2032
1968
|
|
|
2033
1969
|
|
|
@@ -2037,7 +1973,6 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2037
1973
|
|
|
2038
1974
|
|
|
2039
1975
|
|
|
2040
|
-
|
|
2041
1976
|
/**
|
|
2042
1977
|
* The single select allows the selection of one item. Clients are responsible
|
|
2043
1978
|
* for keeping track of the selected item in the select.
|
|
@@ -2045,11 +1980,23 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2045
1980
|
* The single select dropdown closes after the selection of an item. If the same
|
|
2046
1981
|
* item is selected, there is no callback.
|
|
2047
1982
|
*
|
|
2048
|
-
*
|
|
1983
|
+
* **NOTE:** If there are more than 125 items, the component automatically uses
|
|
2049
1984
|
* [react-window](https://github.com/bvaughn/react-window) to improve
|
|
2050
1985
|
* performance when rendering these elements and is capable of handling many
|
|
2051
1986
|
* hundreds of items without performance problems.
|
|
2052
1987
|
*
|
|
1988
|
+
* ## Usage
|
|
1989
|
+
*
|
|
1990
|
+
* ```jsx
|
|
1991
|
+
* import {OptionItem, SingleSelect} from "@khanacademy/wonder-blocks-dropdown";
|
|
1992
|
+
*
|
|
1993
|
+
* const [selectedValue, setSelectedValue] = useState("");
|
|
1994
|
+
*
|
|
1995
|
+
* <SingleSelect placeholder="Choose a fruit" onChange={setSelectedValue} selectedValue={selectedValue}>
|
|
1996
|
+
* <OptionItem value="pear">Pear</OptionItem>
|
|
1997
|
+
* <OptionItem value="mango">Mango</OptionItem>
|
|
1998
|
+
* </SingleSelect>
|
|
1999
|
+
* ```
|
|
2053
2000
|
*/
|
|
2054
2001
|
class SingleSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
2055
2002
|
constructor(props) {
|
|
@@ -2178,26 +2125,6 @@ class SingleSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2178
2125
|
return this.mapOptionItemsToDropdownItems(isFilterable ? this.filterChildren(children) : children);
|
|
2179
2126
|
}
|
|
2180
2127
|
|
|
2181
|
-
getSearchField() {
|
|
2182
|
-
if (!this.props.isFilterable) {
|
|
2183
|
-
return null;
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
return {
|
|
2187
|
-
component: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_search_text_input_js__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
|
|
2188
|
-
key: "search-text-input",
|
|
2189
|
-
onChange: this.handleSearchTextChanged,
|
|
2190
|
-
searchText: this.state.searchText,
|
|
2191
|
-
labels: {
|
|
2192
|
-
clearSearch: _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* defaultLabels */ "e"].clearSearch,
|
|
2193
|
-
filter: _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* defaultLabels */ "e"].filter
|
|
2194
|
-
}
|
|
2195
|
-
}),
|
|
2196
|
-
focusable: true,
|
|
2197
|
-
populatedProps: {}
|
|
2198
|
-
};
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
2128
|
renderOpener(numItems) {
|
|
2202
2129
|
const {
|
|
2203
2130
|
children,
|
|
@@ -2260,14 +2187,12 @@ class SingleSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2260
2187
|
searchText
|
|
2261
2188
|
} = this.state;
|
|
2262
2189
|
const allChildren = react__WEBPACK_IMPORTED_MODULE_0__["Children"].toArray(children).filter(Boolean);
|
|
2263
|
-
const
|
|
2190
|
+
const items = this.getMenuItems(allChildren);
|
|
2264
2191
|
const opener = this.renderOpener(allChildren.length);
|
|
2265
|
-
const searchField = this.getSearchField();
|
|
2266
|
-
const items = searchField ? [searchField].concat(filteredItems) : filteredItems;
|
|
2267
2192
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_dropdown_core_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], {
|
|
2268
2193
|
role: "listbox",
|
|
2269
2194
|
alignment: alignment,
|
|
2270
|
-
dropdownStyle: [isFilterable && _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* filterableDropdownStyle */ "
|
|
2195
|
+
dropdownStyle: [isFilterable && _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* filterableDropdownStyle */ "e"], _util_constants_js__WEBPACK_IMPORTED_MODULE_5__[/* selectDropdownStyle */ "g"], dropdownStyle],
|
|
2271
2196
|
initialFocusedIndex: this.selectedIndex,
|
|
2272
2197
|
items: items,
|
|
2273
2198
|
light: light,
|
|
@@ -2277,6 +2202,7 @@ class SingleSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2277
2202
|
openerElement: this.state.openerElement,
|
|
2278
2203
|
style: style,
|
|
2279
2204
|
className: className,
|
|
2205
|
+
isFilterable: isFilterable,
|
|
2280
2206
|
onSearchTextChanged: isFilterable ? this.handleSearchTextChanged : null,
|
|
2281
2207
|
searchText: isFilterable ? searchText : ""
|
|
2282
2208
|
});
|
|
@@ -2290,7 +2216,7 @@ SingleSelect.defaultProps = {
|
|
|
2290
2216
|
};
|
|
2291
2217
|
|
|
2292
2218
|
/***/ }),
|
|
2293
|
-
/*
|
|
2219
|
+
/* 22 */
|
|
2294
2220
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2295
2221
|
|
|
2296
2222
|
"use strict";
|
|
@@ -2299,13 +2225,12 @@ SingleSelect.defaultProps = {
|
|
|
2299
2225
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2300
2226
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
2301
2227
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
2302
|
-
/* harmony import */ var _action_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2303
|
-
/* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
2304
|
-
/* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
2305
|
-
/* harmony import */ var
|
|
2306
|
-
/* harmony import */ var
|
|
2307
|
-
/* harmony import */ var
|
|
2308
|
-
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
|
|
2228
|
+
/* harmony import */ var _action_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
|
|
2229
|
+
/* harmony import */ var _dropdown_core_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(14);
|
|
2230
|
+
/* harmony import */ var _dropdown_opener_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
|
|
2231
|
+
/* harmony import */ var _select_opener_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(18);
|
|
2232
|
+
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6);
|
|
2233
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2);
|
|
2309
2234
|
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); }
|
|
2310
2235
|
|
|
2311
2236
|
|
|
@@ -2317,7 +2242,6 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2317
2242
|
|
|
2318
2243
|
|
|
2319
2244
|
|
|
2320
|
-
|
|
2321
2245
|
/**
|
|
2322
2246
|
* A dropdown that consists of multiple selection items. This select allows
|
|
2323
2247
|
* multiple options to be selected. Clients are responsible for keeping track
|
|
@@ -2325,6 +2249,17 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2325
2249
|
*
|
|
2326
2250
|
* The multi select stays open until closed by the user. The onChange callback
|
|
2327
2251
|
* happens every time there is a change in the selection of the items.
|
|
2252
|
+
*
|
|
2253
|
+
* ## Usage
|
|
2254
|
+
*
|
|
2255
|
+
* ```jsx
|
|
2256
|
+
* import {OptionItem, MultiSelect} from "@khanacademy/wonder-blocks-dropdown";
|
|
2257
|
+
*
|
|
2258
|
+
* <MultiSelect onChange={setSelectedValues} selectedValues={selectedValues}>
|
|
2259
|
+
* <OptionItem value="pear">Pear</OptionItem>
|
|
2260
|
+
* <OptionItem value="mango">Mango</OptionItem>
|
|
2261
|
+
* </MultiSelect>
|
|
2262
|
+
* ```
|
|
2328
2263
|
*/
|
|
2329
2264
|
class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
2330
2265
|
constructor(props) {
|
|
@@ -2415,13 +2350,13 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2415
2350
|
searchText: "",
|
|
2416
2351
|
lastSelectedValues: [],
|
|
2417
2352
|
// merge custom labels with the default ones
|
|
2418
|
-
labels: { ...
|
|
2353
|
+
labels: { ..._util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* defaultLabels */ "d"],
|
|
2419
2354
|
...props.labels
|
|
2420
2355
|
},
|
|
2421
2356
|
openerElement: null
|
|
2422
2357
|
}; // merge custom labels with the default ones
|
|
2423
2358
|
|
|
2424
|
-
this.labels = { ...
|
|
2359
|
+
this.labels = { ..._util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* defaultLabels */ "d"],
|
|
2425
2360
|
...props.labels
|
|
2426
2361
|
};
|
|
2427
2362
|
}
|
|
@@ -2481,30 +2416,6 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2481
2416
|
}
|
|
2482
2417
|
}
|
|
2483
2418
|
|
|
2484
|
-
getSearchField() {
|
|
2485
|
-
if (!this.props.isFilterable) {
|
|
2486
|
-
return [];
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
|
-
const {
|
|
2490
|
-
clearSearch,
|
|
2491
|
-
filter
|
|
2492
|
-
} = this.state.labels;
|
|
2493
|
-
return [{
|
|
2494
|
-
component: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_search_text_input_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], {
|
|
2495
|
-
key: "search-text-input",
|
|
2496
|
-
onChange: this.handleSearchTextChanged,
|
|
2497
|
-
searchText: this.state.searchText,
|
|
2498
|
-
labels: {
|
|
2499
|
-
clearSearch,
|
|
2500
|
-
filter
|
|
2501
|
-
}
|
|
2502
|
-
}),
|
|
2503
|
-
focusable: true,
|
|
2504
|
-
populatedProps: {}
|
|
2505
|
-
}];
|
|
2506
|
-
}
|
|
2507
|
-
|
|
2508
2419
|
getShortcuts(numOptions) {
|
|
2509
2420
|
const {
|
|
2510
2421
|
selectedValues,
|
|
@@ -2539,7 +2450,7 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2539
2450
|
populatedProps: {}
|
|
2540
2451
|
};
|
|
2541
2452
|
const separator = {
|
|
2542
|
-
component: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
2453
|
+
component: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_separator_item_js__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
|
|
2543
2454
|
key: "shortcuts-separator"
|
|
2544
2455
|
}),
|
|
2545
2456
|
focusable: false,
|
|
@@ -2586,7 +2497,7 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2586
2497
|
|
|
2587
2498
|
if (lastSelectedChildren.length && restOfTheChildren.length) {
|
|
2588
2499
|
lastSelectedItems.push({
|
|
2589
|
-
component: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
2500
|
+
component: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_separator_item_js__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"], {
|
|
2590
2501
|
key: "selected-separator"
|
|
2591
2502
|
}),
|
|
2592
2503
|
focusable: false,
|
|
@@ -2634,7 +2545,7 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2634
2545
|
disabled: numOptions === 0 || disabled,
|
|
2635
2546
|
ref: this.handleOpenerRef,
|
|
2636
2547
|
text: menuText
|
|
2637
|
-
}, opener) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](
|
|
2548
|
+
}, opener) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_select_opener_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], _extends({}, sharedProps, {
|
|
2638
2549
|
disabled: numOptions === 0 || disabled,
|
|
2639
2550
|
id: id,
|
|
2640
2551
|
isPlaceholder: menuText === noneSelected,
|
|
@@ -2662,6 +2573,8 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2662
2573
|
searchText
|
|
2663
2574
|
} = this.state;
|
|
2664
2575
|
const {
|
|
2576
|
+
clearSearch,
|
|
2577
|
+
filter,
|
|
2665
2578
|
noResults,
|
|
2666
2579
|
someSelected
|
|
2667
2580
|
} = this.state.labels;
|
|
@@ -2672,8 +2585,9 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2672
2585
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_dropdown_core_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], {
|
|
2673
2586
|
role: "listbox",
|
|
2674
2587
|
alignment: alignment,
|
|
2675
|
-
dropdownStyle: [isFilterable &&
|
|
2676
|
-
|
|
2588
|
+
dropdownStyle: [isFilterable && _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* filterableDropdownStyle */ "e"], _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* selectDropdownStyle */ "g"], dropdownStyle],
|
|
2589
|
+
isFilterable: isFilterable,
|
|
2590
|
+
items: [].concat(this.getShortcuts(numOptions), filteredItems),
|
|
2677
2591
|
light: light,
|
|
2678
2592
|
onOpenChanged: this.handleOpenChanged,
|
|
2679
2593
|
open: open,
|
|
@@ -2684,6 +2598,8 @@ class MultiSelect extends react__WEBPACK_IMPORTED_MODULE_0__["Component"] {
|
|
|
2684
2598
|
onSearchTextChanged: isFilterable ? this.handleSearchTextChanged : null,
|
|
2685
2599
|
searchText: isFilterable ? searchText : "",
|
|
2686
2600
|
labels: {
|
|
2601
|
+
clearSearch,
|
|
2602
|
+
filter,
|
|
2687
2603
|
noResults,
|
|
2688
2604
|
someSelected
|
|
2689
2605
|
}
|
|
@@ -2700,13 +2616,13 @@ MultiSelect.defaultProps = {
|
|
|
2700
2616
|
};
|
|
2701
2617
|
|
|
2702
2618
|
/***/ }),
|
|
2703
|
-
/*
|
|
2619
|
+
/* 23 */
|
|
2704
2620
|
/***/ (function(module, exports) {
|
|
2705
2621
|
|
|
2706
2622
|
module.exports = require("react-router-dom");
|
|
2707
2623
|
|
|
2708
2624
|
/***/ }),
|
|
2709
|
-
/*
|
|
2625
|
+
/* 24 */
|
|
2710
2626
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2711
2627
|
|
|
2712
2628
|
"use strict";
|
|
@@ -2715,9 +2631,9 @@ module.exports = require("react-router-dom");
|
|
|
2715
2631
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2716
2632
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
2717
2633
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
2718
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2634
|
+
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
2719
2635
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
|
|
2720
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
2636
|
+
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8);
|
|
2721
2637
|
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_3__);
|
|
2722
2638
|
|
|
2723
2639
|
|
|
@@ -2763,7 +2679,7 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
2763
2679
|
});
|
|
2764
2680
|
|
|
2765
2681
|
/***/ }),
|
|
2766
|
-
/*
|
|
2682
|
+
/* 25 */
|
|
2767
2683
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2768
2684
|
|
|
2769
2685
|
"use strict";
|
|
@@ -2772,11 +2688,11 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
2772
2688
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2773
2689
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
2774
2690
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
2775
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2691
|
+
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
2776
2692
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_2__);
|
|
2777
2693
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
|
|
2778
2694
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_3__);
|
|
2779
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
2695
|
+
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
|
|
2780
2696
|
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_4__);
|
|
2781
2697
|
|
|
2782
2698
|
|
|
@@ -2855,6 +2771,12 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
2855
2771
|
}
|
|
2856
2772
|
});
|
|
2857
2773
|
|
|
2774
|
+
/***/ }),
|
|
2775
|
+
/* 26 */
|
|
2776
|
+
/***/ (function(module, exports) {
|
|
2777
|
+
|
|
2778
|
+
module.exports = require("@khanacademy/wonder-blocks-search-field");
|
|
2779
|
+
|
|
2858
2780
|
/***/ }),
|
|
2859
2781
|
/* 27 */
|
|
2860
2782
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
@@ -2864,16 +2786,14 @@ const styles = aphrodite__WEBPACK_IMPORTED_MODULE_1__["StyleSheet"].create({
|
|
|
2864
2786
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2865
2787
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
2866
2788
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
2867
|
-
/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2789
|
+
/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19);
|
|
2868
2790
|
/* harmony import */ var react_window__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_window__WEBPACK_IMPORTED_MODULE_2__);
|
|
2869
|
-
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
2791
|
+
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
|
|
2870
2792
|
/* harmony import */ var _khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_timing__WEBPACK_IMPORTED_MODULE_3__);
|
|
2871
2793
|
/* harmony import */ var _dropdown_core_virtualized_item_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(28);
|
|
2872
|
-
/* harmony import */ var
|
|
2873
|
-
/* harmony import */ var
|
|
2874
|
-
/* harmony import */ var
|
|
2875
|
-
/* harmony import */ var _util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(16);
|
|
2876
|
-
|
|
2794
|
+
/* harmony import */ var _separator_item_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6);
|
|
2795
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
|
|
2796
|
+
/* harmony import */ var _util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(15);
|
|
2877
2797
|
|
|
2878
2798
|
|
|
2879
2799
|
|
|
@@ -2895,20 +2815,17 @@ class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
|
|
|
2895
2815
|
// get the current item in the list
|
|
2896
2816
|
const item = this.props.data[index];
|
|
2897
2817
|
|
|
2898
|
-
if (
|
|
2818
|
+
if (_separator_item_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].isClassOf(item.component)) {
|
|
2899
2819
|
// this is the separator's height (1px) + vertical margin (8px)
|
|
2900
|
-
return
|
|
2901
|
-
} else if (_search_text_input_js__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].isClassOf(item.component)) {
|
|
2902
|
-
// search text input height
|
|
2903
|
-
return _util_constants_js__WEBPACK_IMPORTED_MODULE_7__[/* SEARCH_ITEM_HEIGHT */ "c"];
|
|
2820
|
+
return _util_constants_js__WEBPACK_IMPORTED_MODULE_6__[/* SEPARATOR_ITEM_HEIGHT */ "c"];
|
|
2904
2821
|
} else {
|
|
2905
2822
|
// default dropdown item height
|
|
2906
|
-
return
|
|
2823
|
+
return _util_constants_js__WEBPACK_IMPORTED_MODULE_6__[/* DROPDOWN_ITEM_HEIGHT */ "a"];
|
|
2907
2824
|
}
|
|
2908
2825
|
};
|
|
2909
2826
|
|
|
2910
2827
|
this.state = {
|
|
2911
|
-
height: Object(
|
|
2828
|
+
height: Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_7__[/* getDropdownMenuHeight */ "b"])(props.data),
|
|
2912
2829
|
width: props.width
|
|
2913
2830
|
};
|
|
2914
2831
|
}
|
|
@@ -2964,7 +2881,7 @@ class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
|
|
|
2964
2881
|
|
|
2965
2882
|
setHeight() {
|
|
2966
2883
|
// calculate dropdown's height depending on the type of items
|
|
2967
|
-
const height = Object(
|
|
2884
|
+
const height = Object(_util_dropdown_menu_styles_js__WEBPACK_IMPORTED_MODULE_7__[/* getDropdownMenuHeight */ "b"])(this.props.data);
|
|
2968
2885
|
this.setState({
|
|
2969
2886
|
height
|
|
2970
2887
|
});
|
|
@@ -2994,7 +2911,7 @@ class DropdownCoreVirtualized extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
|
|
|
2994
2911
|
return -1;
|
|
2995
2912
|
}) // 3. only render the possible visible items to minimize layout
|
|
2996
2913
|
// jumps
|
|
2997
|
-
.slice(0,
|
|
2914
|
+
.slice(0, _util_constants_js__WEBPACK_IMPORTED_MODULE_6__[/* MAX_VISIBLE_ITEMS */ "b"]); // Append longest items to calculate the container width.
|
|
2998
2915
|
// We need to hide these sorted elements to avoid any FOUC.
|
|
2999
2916
|
|
|
3000
2917
|
return longestItems.map(item => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](item, {
|
|
@@ -3109,12 +3026,6 @@ class DropdownVirtualizedItem extends react__WEBPACK_IMPORTED_MODULE_0__["Compon
|
|
|
3109
3026
|
|
|
3110
3027
|
/***/ }),
|
|
3111
3028
|
/* 29 */
|
|
3112
|
-
/***/ (function(module, exports) {
|
|
3113
|
-
|
|
3114
|
-
module.exports = require("@khanacademy/wonder-blocks-search-field");
|
|
3115
|
-
|
|
3116
|
-
/***/ }),
|
|
3117
|
-
/* 30 */
|
|
3118
3029
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3119
3030
|
|
|
3120
3031
|
"use strict";
|
|
@@ -3123,9 +3034,9 @@ module.exports = require("@khanacademy/wonder-blocks-search-field");
|
|
|
3123
3034
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3124
3035
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
|
|
3125
3036
|
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
|
3126
|
-
/* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
3037
|
+
/* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30);
|
|
3127
3038
|
/* harmony import */ var react_popper__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_popper__WEBPACK_IMPORTED_MODULE_2__);
|
|
3128
|
-
/* harmony import */ var _khanacademy_wonder_blocks_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
3039
|
+
/* harmony import */ var _khanacademy_wonder_blocks_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31);
|
|
3129
3040
|
/* harmony import */ var _khanacademy_wonder_blocks_modal__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_modal__WEBPACK_IMPORTED_MODULE_3__);
|
|
3130
3041
|
|
|
3131
3042
|
|
|
@@ -3190,19 +3101,19 @@ function DropdownPopper({
|
|
|
3190
3101
|
}
|
|
3191
3102
|
|
|
3192
3103
|
/***/ }),
|
|
3193
|
-
/*
|
|
3104
|
+
/* 30 */
|
|
3194
3105
|
/***/ (function(module, exports) {
|
|
3195
3106
|
|
|
3196
3107
|
module.exports = require("react-popper");
|
|
3197
3108
|
|
|
3198
3109
|
/***/ }),
|
|
3199
|
-
/*
|
|
3110
|
+
/* 31 */
|
|
3200
3111
|
/***/ (function(module, exports) {
|
|
3201
3112
|
|
|
3202
3113
|
module.exports = require("@khanacademy/wonder-blocks-modal");
|
|
3203
3114
|
|
|
3204
3115
|
/***/ }),
|
|
3205
|
-
/*
|
|
3116
|
+
/* 32 */
|
|
3206
3117
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3207
3118
|
|
|
3208
3119
|
"use strict";
|
|
@@ -3211,19 +3122,19 @@ module.exports = require("@khanacademy/wonder-blocks-modal");
|
|
|
3211
3122
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3212
3123
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
3213
3124
|
/* harmony import */ var aphrodite__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(aphrodite__WEBPACK_IMPORTED_MODULE_1__);
|
|
3214
|
-
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
3125
|
+
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
|
|
3215
3126
|
/* harmony import */ var _khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_typography__WEBPACK_IMPORTED_MODULE_2__);
|
|
3216
|
-
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
3127
|
+
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
|
|
3217
3128
|
/* harmony import */ var _khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_color__WEBPACK_IMPORTED_MODULE_3__);
|
|
3218
3129
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
|
|
3219
3130
|
/* harmony import */ var _khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
3220
|
-
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
3131
|
+
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
|
|
3221
3132
|
/* harmony import */ var _khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_icon__WEBPACK_IMPORTED_MODULE_5__);
|
|
3222
3133
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
|
|
3223
3134
|
/* harmony import */ var _khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_spacing__WEBPACK_IMPORTED_MODULE_6__);
|
|
3224
|
-
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
3135
|
+
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33);
|
|
3225
3136
|
/* harmony import */ var _khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_khanacademy_wonder_blocks_layout__WEBPACK_IMPORTED_MODULE_7__);
|
|
3226
|
-
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
3137
|
+
/* harmony import */ var _util_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2);
|
|
3227
3138
|
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); }
|
|
3228
3139
|
|
|
3229
3140
|
|
|
@@ -3377,33 +3288,33 @@ const _generateStyles = color => {
|
|
|
3377
3288
|
};
|
|
3378
3289
|
|
|
3379
3290
|
/***/ }),
|
|
3380
|
-
/*
|
|
3291
|
+
/* 33 */
|
|
3381
3292
|
/***/ (function(module, exports) {
|
|
3382
3293
|
|
|
3383
3294
|
module.exports = require("@khanacademy/wonder-blocks-layout");
|
|
3384
3295
|
|
|
3385
3296
|
/***/ }),
|
|
3386
|
-
/*
|
|
3297
|
+
/* 34 */
|
|
3387
3298
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3388
3299
|
|
|
3389
3300
|
"use strict";
|
|
3390
3301
|
__webpack_require__.r(__webpack_exports__);
|
|
3391
|
-
/* harmony import */ var _components_action_item_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3302
|
+
/* harmony import */ var _components_action_item_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
|
3392
3303
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionItem", function() { return _components_action_item_js__WEBPACK_IMPORTED_MODULE_0__["a"]; });
|
|
3393
3304
|
|
|
3394
|
-
/* harmony import */ var _components_option_item_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3305
|
+
/* harmony import */ var _components_option_item_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
|
|
3395
3306
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "OptionItem", function() { return _components_option_item_js__WEBPACK_IMPORTED_MODULE_1__["a"]; });
|
|
3396
3307
|
|
|
3397
3308
|
/* harmony import */ var _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
3398
3309
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SeparatorItem", function() { return _components_separator_item_js__WEBPACK_IMPORTED_MODULE_2__["a"]; });
|
|
3399
3310
|
|
|
3400
|
-
/* harmony import */ var _components_action_menu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
3311
|
+
/* harmony import */ var _components_action_menu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20);
|
|
3401
3312
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionMenu", function() { return _components_action_menu_js__WEBPACK_IMPORTED_MODULE_3__["a"]; });
|
|
3402
3313
|
|
|
3403
|
-
/* harmony import */ var _components_single_select_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
3314
|
+
/* harmony import */ var _components_single_select_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(21);
|
|
3404
3315
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SingleSelect", function() { return _components_single_select_js__WEBPACK_IMPORTED_MODULE_4__["a"]; });
|
|
3405
3316
|
|
|
3406
|
-
/* harmony import */ var _components_multi_select_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
3317
|
+
/* harmony import */ var _components_multi_select_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22);
|
|
3407
3318
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MultiSelect", function() { return _components_multi_select_js__WEBPACK_IMPORTED_MODULE_5__["a"]; });
|
|
3408
3319
|
|
|
3409
3320
|
|